authing_ruby 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/authing_ruby.gemspec +4 -2
- data/lib/authing_ruby/common/PublicKeyManager.rb +12 -1
- data/lib/authing_ruby/version.rb +1 -1
- metadata +10 -467
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/CONTRIBUTION.md +0 -23
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/LICENSE +0 -21
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/README.md +0 -303
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build-doc.js +0 -520
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/browser/index.min.js +0 -2
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/browser/index.min.js.LICENSE.txt +0 -91
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/index.d.ts +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/index.js +0 -20
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/AuthenticationClient.d.ts +0 -1118
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/AuthenticationClient.js +0 -2859
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/AuthenticationTokenProvider.d.ts +0 -13
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/AuthenticationTokenProvider.js +0 -56
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/BaseAuthenticationClient.d.ts +0 -6
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/BaseAuthenticationClient.js +0 -31
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/EnterpriseAuthenticationClient.d.ts +0 -92
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/EnterpriseAuthenticationClient.js +0 -250
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/MfaAuthenticationClient.d.ts +0 -303
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/MfaAuthenticationClient.js +0 -665
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/QrCodeAuthenticationClient.d.ts +0 -232
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/QrCodeAuthenticationClient.js +0 -622
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/SocialAuthenticationClient.d.ts +0 -104
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/SocialAuthenticationClient.js +0 -180
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/types.d.ts +0 -341
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/authentication/types.js +0 -69
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/GraphqlClient.d.ts +0 -14
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/GraphqlClient.js +0 -127
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/HttpClient.d.ts +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/HttpClient.js +0 -151
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/PublicKeyManager.d.ts +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/common/PublicKeyManager.js +0 -81
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/graphqlapi.d.ts +0 -121
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/graphqlapi.js +0 -2002
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/AclManagementClient.d.ts +0 -236
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/AclManagementClient.js +0 -863
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/AgreementManagementClient.d.ts +0 -65
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/AgreementManagementClient.js +0 -195
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ApplicationsManagementClient.d.ts +0 -216
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ApplicationsManagementClient.js +0 -533
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/GroupsManagementClient.d.ts +0 -188
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/GroupsManagementClient.js +0 -404
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/MFAManagementClient.d.ts +0 -58
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/MFAManagementClient.js +0 -126
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ManagementClient.d.ts +0 -79
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ManagementClient.js +0 -203
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ManagementTokenProvider.d.ts +0 -39
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/ManagementTokenProvider.js +0 -159
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/OrgManagementClient.d.ts +0 -521
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/OrgManagementClient.js +0 -840
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/PoliciesManagementClient.d.ts +0 -304
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/PoliciesManagementClient.js +0 -512
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/RolesManagementClient.d.ts +0 -296
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/RolesManagementClient.js +0 -711
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/StatisticsManagementClient.d.ts +0 -56
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/StatisticsManagementClient.js +0 -198
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UdfManagementClient.d.ts +0 -146
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UdfManagementClient.js +0 -264
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UserActionManagementClient.d.ts +0 -44
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UserActionManagementClient.js +0 -106
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UserpoolManagementClient.d.ts +0 -142
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UserpoolManagementClient.js +0 -241
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UsersManagementClient.d.ts +0 -784
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/UsersManagementClient.js +0 -1251
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/WhitelistManagementClient.d.ts +0 -114
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/WhitelistManagementClient.js +0 -259
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/types.d.ts +0 -992
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/management/types.js +0 -96
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/platform/express/index.d.ts +0 -30
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/platform/express/index.js +0 -126
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/testing-helper.d.ts +0 -31
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/testing-helper.js +0 -67
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/utils.d.ts +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/utils.js +0 -343
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/version.d.ts +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/lib/version.js +0 -5
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/types/graphql.v2.d.ts +0 -6241
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/types/graphql.v2.js +0 -251
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/types/index.d.ts +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/main/types/index.js +0 -3
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/index.d.ts +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/index.js +0 -8
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/AuthenticationClient.d.ts +0 -1118
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/AuthenticationClient.js +0 -2853
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/AuthenticationTokenProvider.d.ts +0 -13
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/AuthenticationTokenProvider.js +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/BaseAuthenticationClient.d.ts +0 -6
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/BaseAuthenticationClient.js +0 -28
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/EnterpriseAuthenticationClient.d.ts +0 -92
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/EnterpriseAuthenticationClient.js +0 -247
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/MfaAuthenticationClient.d.ts +0 -303
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/MfaAuthenticationClient.js +0 -662
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/QrCodeAuthenticationClient.d.ts +0 -232
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/QrCodeAuthenticationClient.js +0 -619
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/SocialAuthenticationClient.d.ts +0 -104
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/SocialAuthenticationClient.js +0 -177
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/types.d.ts +0 -341
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/authentication/types.js +0 -66
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/GraphqlClient.d.ts +0 -14
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/GraphqlClient.js +0 -121
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/HttpClient.d.ts +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/HttpClient.js +0 -145
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/PublicKeyManager.d.ts +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/common/PublicKeyManager.js +0 -78
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/graphqlapi.d.ts +0 -121
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/graphqlapi.js +0 -1999
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/AclManagementClient.d.ts +0 -236
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/AclManagementClient.js +0 -860
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/AgreementManagementClient.d.ts +0 -65
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/AgreementManagementClient.js +0 -192
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ApplicationsManagementClient.d.ts +0 -216
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ApplicationsManagementClient.js +0 -530
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/GroupsManagementClient.d.ts +0 -188
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/GroupsManagementClient.js +0 -401
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/MFAManagementClient.d.ts +0 -58
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/MFAManagementClient.js +0 -123
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ManagementClient.d.ts +0 -79
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ManagementClient.js +0 -197
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ManagementTokenProvider.d.ts +0 -39
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/ManagementTokenProvider.js +0 -153
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/OrgManagementClient.d.ts +0 -521
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/OrgManagementClient.js +0 -818
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/PoliciesManagementClient.d.ts +0 -304
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/PoliciesManagementClient.js +0 -509
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/RolesManagementClient.d.ts +0 -296
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/RolesManagementClient.js +0 -708
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/StatisticsManagementClient.d.ts +0 -56
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/StatisticsManagementClient.js +0 -195
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UdfManagementClient.d.ts +0 -146
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UdfManagementClient.js +0 -261
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UserActionManagementClient.d.ts +0 -44
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UserActionManagementClient.js +0 -103
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UserpoolManagementClient.d.ts +0 -142
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UserpoolManagementClient.js +0 -238
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UsersManagementClient.d.ts +0 -784
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/UsersManagementClient.js +0 -1248
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/WhitelistManagementClient.d.ts +0 -114
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/WhitelistManagementClient.js +0 -256
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/types.d.ts +0 -992
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/management/types.js +0 -93
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/platform/express/index.d.ts +0 -30
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/platform/express/index.js +0 -123
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/testing-helper.d.ts +0 -31
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/testing-helper.js +0 -62
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/utils.d.ts +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/utils.js +0 -336
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/version.d.ts +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/lib/version.js +0 -2
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/types/graphql.v2.d.ts +0 -6241
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/types/graphql.v2.js +0 -248
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/types/index.d.ts +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/module/types/index.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/index.d.ts +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/index.js +0 -30
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/AuthenticationClient.d.ts +0 -1118
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/AuthenticationClient.js +0 -2869
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/AuthenticationTokenProvider.d.ts +0 -13
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/AuthenticationTokenProvider.js +0 -66
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/BaseAuthenticationClient.d.ts +0 -6
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/BaseAuthenticationClient.js +0 -41
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/EnterpriseAuthenticationClient.d.ts +0 -92
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/EnterpriseAuthenticationClient.js +0 -260
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/MfaAuthenticationClient.d.ts +0 -303
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/MfaAuthenticationClient.js +0 -675
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/QrCodeAuthenticationClient.d.ts +0 -232
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/QrCodeAuthenticationClient.js +0 -632
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/SocialAuthenticationClient.d.ts +0 -104
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/SocialAuthenticationClient.js +0 -190
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/types.d.ts +0 -341
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/authentication/types.js +0 -79
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/GraphqlClient.d.ts +0 -14
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/GraphqlClient.js +0 -137
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/HttpClient.d.ts +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/HttpClient.js +0 -161
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/PublicKeyManager.d.ts +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/common/PublicKeyManager.js +0 -91
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/graphqlapi.d.ts +0 -121
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/graphqlapi.js +0 -2012
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/AclManagementClient.d.ts +0 -236
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/AclManagementClient.js +0 -873
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/AgreementManagementClient.d.ts +0 -65
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/AgreementManagementClient.js +0 -205
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ApplicationsManagementClient.d.ts +0 -216
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ApplicationsManagementClient.js +0 -543
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/GroupsManagementClient.d.ts +0 -188
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/GroupsManagementClient.js +0 -414
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/MFAManagementClient.d.ts +0 -58
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/MFAManagementClient.js +0 -136
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ManagementClient.d.ts +0 -79
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ManagementClient.js +0 -213
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ManagementTokenProvider.d.ts +0 -39
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/ManagementTokenProvider.js +0 -169
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/OrgManagementClient.d.ts +0 -521
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/OrgManagementClient.js +0 -850
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/PoliciesManagementClient.d.ts +0 -304
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/PoliciesManagementClient.js +0 -522
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/RolesManagementClient.d.ts +0 -296
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/RolesManagementClient.js +0 -721
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/StatisticsManagementClient.d.ts +0 -56
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/StatisticsManagementClient.js +0 -208
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UdfManagementClient.d.ts +0 -146
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UdfManagementClient.js +0 -274
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UserActionManagementClient.d.ts +0 -44
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UserActionManagementClient.js +0 -116
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UserpoolManagementClient.d.ts +0 -142
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UserpoolManagementClient.js +0 -251
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UsersManagementClient.d.ts +0 -784
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/UsersManagementClient.js +0 -1261
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/WhitelistManagementClient.d.ts +0 -114
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/WhitelistManagementClient.js +0 -269
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/types.d.ts +0 -992
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/management/types.js +0 -106
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/platform/express/index.d.ts +0 -30
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/platform/express/index.js +0 -136
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/testing-helper.d.ts +0 -31
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/testing-helper.js +0 -77
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/utils.d.ts +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/utils.js +0 -353
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/version.d.ts +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/lib/version.js +0 -15
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/types/graphql.v2.d.ts +0 -6241
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/types/graphql.v2.js +0 -261
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/types/index.d.ts +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/umd/types/index.js +0 -13
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/CHANGELOG.md +0 -413
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/LICENSE +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/README.md +0 -709
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/UPGRADE_GUIDE.md +0 -162
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/dist/axios.js +0 -1715
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/dist/axios.map +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/dist/axios.min.js +0 -3
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/dist/axios.min.map +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/index.d.ts +0 -157
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/index.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/adapters/README.md +0 -37
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/adapters/http.js +0 -279
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/adapters/xhr.js +0 -180
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/axios.js +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/cancel/Cancel.js +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/cancel/CancelToken.js +0 -57
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/cancel/isCancel.js +0 -5
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/Axios.js +0 -94
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/InterceptorManager.js +0 -52
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/README.md +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/buildFullPath.js +0 -20
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/createError.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/dispatchRequest.js +0 -79
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/enhanceError.js +0 -42
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/mergeConfig.js +0 -73
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/settle.js +0 -25
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/core/transformData.js +0 -20
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/defaults.js +0 -97
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/README.md +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/bind.js +0 -11
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/buildURL.js +0 -71
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/combineURLs.js +0 -14
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/cookies.js +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/deprecatedMethod.js +0 -24
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -14
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -68
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/normalizeHeaderName.js +0 -12
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/parseHeaders.js +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/helpers/spread.js +0 -27
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/lib/utils.js +0 -344
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/axios/package.json +0 -84
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/LICENSE +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/README.md +0 -155
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/http.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/https.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/index.js +0 -322
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/node_modules/follow-redirects/package.json +0 -60
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/package.json +0 -129
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/tests/index.html +0 -21
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/tsconfig.brower.json +0 -45
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/tsconfig.node.json +0 -0
- data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/webpack.config.js +0 -41
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/CHANGELOG.md +0 -685
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/LICENSE +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/README.md +0 -800
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/UPGRADE_GUIDE.md +0 -162
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/dist/axios.js +0 -1756
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/dist/axios.map +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/dist/axios.min.js +0 -3
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/dist/axios.min.map +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/index.d.ts +0 -161
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/index.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/adapters/README.md +0 -37
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/adapters/http.js +0 -303
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/adapters/xhr.js +0 -179
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/axios.js +0 -56
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/cancel/Cancel.js +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/cancel/CancelToken.js +0 -57
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/cancel/isCancel.js +0 -5
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/Axios.js +0 -95
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/InterceptorManager.js +0 -52
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/README.md +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/buildFullPath.js +0 -20
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/createError.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/dispatchRequest.js +0 -79
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/enhanceError.js +0 -42
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/mergeConfig.js +0 -87
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/settle.js +0 -25
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/core/transformData.js +0 -20
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/defaults.js +0 -98
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/README.md +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/bind.js +0 -11
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/buildURL.js +0 -70
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/combineURLs.js +0 -14
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/cookies.js +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/deprecatedMethod.js +0 -24
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -14
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/isAxiosError.js +0 -11
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -68
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/normalizeHeaderName.js +0 -12
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/parseHeaders.js +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/helpers/spread.js +0 -27
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/lib/utils.js +0 -351
- data/lib/authing_ruby/test/js_sdk_test/node_modules/axios/package.json +0 -86
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/CONTRIBUTING.md +0 -28
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/LICENSE +0 -24
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/README.md +0 -249
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/aes.js +0 -234
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/bower.json +0 -35
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/cipher-core.js +0 -890
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/core.js +0 -797
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/crypto-js.js +0 -6059
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/docs/QuickStartGuide.wiki +0 -470
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-base64.js +0 -136
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-hex.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-latin1.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-utf16.js +0 -149
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/enc-utf8.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/evpkdf.js +0 -134
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/format-hex.js +0 -66
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/format-openssl.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-md5.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-ripemd160.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha1.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha224.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha256.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha3.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha384.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac-sha512.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/hmac.js +0 -143
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/index.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/lib-typedarrays.js +0 -76
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/md5.js +0 -268
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-cfb.js +0 -80
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-ctr-gladman.js +0 -116
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-ctr.js +0 -58
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-ecb.js +0 -40
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/mode-ofb.js +0 -54
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/package.json +0 -38
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-ansix923.js +0 -49
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-iso10126.js +0 -44
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-iso97971.js +0 -40
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-nopadding.js +0 -30
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-pkcs7.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pad-zeropadding.js +0 -47
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/pbkdf2.js +0 -145
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/rabbit-legacy.js +0 -190
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/rabbit.js +0 -192
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/rc4.js +0 -139
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/ripemd160.js +0 -267
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha1.js +0 -150
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha224.js +0 -80
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha256.js +0 -199
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha3.js +0 -326
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha384.js +0 -83
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/sha512.js +0 -326
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/tripledes.js +0 -779
- data/lib/authing_ruby/test/js_sdk_test/node_modules/crypto-js/x64-core.js +0 -304
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/CHANGELOG.md +0 -395
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/LICENSE +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/Makefile +0 -58
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/README.md +0 -368
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/karma.conf.js +0 -70
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/node.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/package.json +0 -43
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/src/browser.js +0 -195
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/src/debug.js +0 -225
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/src/index.js +0 -10
- data/lib/authing_ruby/test/js_sdk_test/node_modules/debug/src/node.js +0 -186
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/CHANGELOG.md +0 -210
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/LICENSE +0 -23
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/README.md +0 -275
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/config.js +0 -11
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/lib/cli-options.js +0 -13
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/lib/env-options.js +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/lib/main.js +0 -118
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/package.json +0 -57
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/types/index.d.ts +0 -59
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/types/test.ts +0 -19
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/types/tsconfig.json +0 -15
- data/lib/authing_ruby/test/js_sdk_test/node_modules/dotenv/types/tslint.json +0 -6
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/LICENSE +0 -18
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/README.md +0 -148
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/debug.js +0 -14
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/http.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/https.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/index.js +0 -531
- data/lib/authing_ruby/test/js_sdk_test/node_modules/follow-redirects/package.json +0 -59
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/LICENSE.txt +0 -107
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/README.md +0 -192
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/bin/jsencrypt.js +0 -249
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/bin/jsencrypt.min.js +0 -2
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/bin/jsencrypt.min.js.LICENSE.txt +0 -8
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/JSEncrypt.d.ts +0 -116
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/JSEncrypt.js +0 -186
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/JSEncryptRSAKey.d.ts +0 -142
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/JSEncryptRSAKey.js +0 -315
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/index.d.ts +0 -3
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/index.js +0 -3
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/asn1.d.ts +0 -51
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/asn1.js +0 -565
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/base64.d.ts +0 -5
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/base64.js +0 -88
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/hex.d.ts +0 -3
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/hex.js +0 -64
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/int10.d.ts +0 -9
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/int10.js +0 -87
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/oids.d.ts +0 -9778
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/asn1js/oids.js +0 -1962
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/base64.d.ts +0 -3
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/base64.js +0 -76
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/jsbn.d.ts +0 -98
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/jsbn.js +0 -1754
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/prng4.d.ts +0 -10
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/prng4.js +0 -46
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/rng.d.ts +0 -3
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/rng.js +0 -76
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/rsa.d.ts +0 -23
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/rsa.js +0 -373
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/util.d.ts +0 -7
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsbn/util.js +0 -58
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js +0 -1593
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/lib/jsrsasign/yahoo.js +0 -69
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/lib/version.json +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jsencrypt/package.json +0 -49
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/Gruntfile.js +0 -78
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/LICENSE +0 -21
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/README.md +0 -55
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/bower.json +0 -20
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/build/jwt-decode.js +0 -125
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/build/jwt-decode.min.js +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/jwt-decode.html +0 -2
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/lib/atob.js +0 -38
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/lib/base64_url_decode.js +0 -33
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/lib/index.js +0 -26
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/package.json +0 -37
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/standalone.js +0 -16
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/test/tests.js +0 -53
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/test_harness.html +0 -29
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/testem.yml +0 -46
- data/lib/authing_ruby/test/js_sdk_test/node_modules/jwt-decode/testem_dev.yml +0 -1
- data/lib/authing_ruby/test/js_sdk_test/node_modules/ms/index.js +0 -152
- data/lib/authing_ruby/test/js_sdk_test/node_modules/ms/license.md +0 -21
- data/lib/authing_ruby/test/js_sdk_test/node_modules/ms/package.json +0 -37
- data/lib/authing_ruby/test/js_sdk_test/node_modules/ms/readme.md +0 -51
data/lib/authing_ruby/test/js_sdk_test/node_modules/authing-js-sdk/build/browser/index.min.js
DELETED
@@ -1,2 +0,0 @@
|
|
1
|
-
/*! For license information please see index.min.js.LICENSE.txt */
|
2
|
-
(()=>{var __webpack_modules__={9809:(t,e,n)=>{"use strict";const r=e;r.bignum=n(4590),r.define=n(2500).define,r.base=n(1979),r.constants=n(6826),r.decoders=n(8307),r.encoders=n(6579)},2500:(t,e,n)=>{"use strict";const r=n(6579),i=n(8307),o=n(5717);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 n(t){this._initNamed(t,e)}return o(n,t),n.prototype._initNamed=function(e,n){t.call(this,e,n)},new n(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,n){return this._getDecoder(e).decode(t,n)},s.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(r[t])),this.encoders[t]},s.prototype.encode=function(t,e,n){return this._getEncoder(e).encode(t,n)}},6625:(t,e,n)=>{"use strict";const r=n(5717),i=n(8465).b,o=n(2399).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}}r(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 n=new s(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+t,this.offset+=t,n},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(n){n.join(t,e),e+=n.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}},1979:(t,e,n)=>{"use strict";const r=e;r.Reporter=n(8465).b,r.DecoderBuffer=n(6625).C,r.EncoderBuffer=n(6625).R,r.Node=n(1949)},1949:(t,e,n)=>{"use strict";const r=n(8465).b,i=n(6625).R,o=n(6625).C,s=n(9746),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 h(t,e,n){const r={};this._baseState=r,r.name=n,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}t.exports=h;const c=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];h.prototype.clone=function(){const t=this._baseState,e={};c.forEach((function(n){e[n]=t[n]}));const n=new this.constructor(e.parent);return n._baseState=e,n},h.prototype._wrap=function(){const t=this._baseState;u.forEach((function(e){this[e]=function(){const n=new this.constructor(this);return t.children.push(n),n[e].apply(n,arguments)}}),this)},h.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")},h.prototype._useArgs=function(t){const e=this._baseState,n=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==n.length&&(s(null===e.children),e.children=n,n.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(n){n==(0|n)&&(n|=0);const r=t[n];e[r]=n})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){h.prototype[t]=function(){const e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),a.forEach((function(t){h.prototype[t]=function(){const e=this._baseState,n=Array.prototype.slice.call(arguments);return s(null===e.tag),e.tag=t,this._useArgs(n),this}})),h.prototype.use=function(t){s(t);const e=this._baseState;return s(null===e.use),e.use=t,this},h.prototype.optional=function(){return this._baseState.optional=!0,this},h.prototype.def=function(t){const e=this._baseState;return s(null===e.default),e.default=t,e.optional=!0,this},h.prototype.explicit=function(t){const e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.explicit=t,this},h.prototype.implicit=function(t){const e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.implicit=t,this},h.prototype.obj=function(){const t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},h.prototype.key=function(t){const e=this._baseState;return s(null===e.key),e.key=t,this},h.prototype.any=function(){return this._baseState.any=!0,this},h.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},h.prototype.contains=function(t){const e=this._baseState;return s(null===e.use),e.contains=t,this},h.prototype._decode=function(t,e){const n=this._baseState;if(null===n.parent)return t.wrapResult(n.children[0]._decode(t,e));let r,i=n.default,s=!0,a=null;if(null!==n.key&&(a=t.enterKey(n.key)),n.optional){let r=null;if(null!==n.explicit?r=n.explicit:null!==n.implicit?r=n.implicit:null!==n.tag&&(r=n.tag),null!==r||n.any){if(s=this._peekTag(t,r,n.any),t.isError(s))return s}else{const r=t.save();try{null===n.choice?this._decodeGeneric(n.tag,t,e):this._decodeChoice(t,e),s=!0}catch(t){s=!1}t.restore(r)}}if(n.obj&&s&&(r=t.enterObject()),s){if(null!==n.explicit){const e=this._decodeTag(t,n.explicit);if(t.isError(e))return e;t=e}const r=t.offset;if(null===n.use&&null===n.choice){let e;n.any&&(e=t.save());const r=this._decodeTag(t,null!==n.implicit?n.implicit:n.tag,n.any);if(t.isError(r))return r;n.any?i=t.raw(e):t=r}if(e&&e.track&&null!==n.tag&&e.track(t.path(),r,t.length,"tagged"),e&&e.track&&null!==n.tag&&e.track(t.path(),t.offset,t.length,"content"),n.any||(i=null===n.choice?this._decodeGeneric(n.tag,t,e):this._decodeChoice(t,e)),t.isError(i))return i;if(n.any||null!==n.choice||null===n.children||n.children.forEach((function(n){n._decode(t,e)})),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){const r=new o(i);i=this._getUse(n.contains,t._reporterState.obj)._decode(r,e)}}return n.obj&&s&&(i=t.leaveObject(r)),null===n.key||null===i&&!0!==s?null!==a&&t.exitKey(a):t.leaveKey(a,n.key,i),i},h.prototype._decodeGeneric=function(t,e,n){const r=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,r.args[0],n):/str$/.test(t)?this._decodeStr(e,t,n):"objid"===t&&r.args?this._decodeObjid(e,r.args[0],r.args[1],n):"objid"===t?this._decodeObjid(e,null,null,n):"gentime"===t||"utctime"===t?this._decodeTime(e,t,n):"null_"===t?this._decodeNull(e,n):"bool"===t?this._decodeBool(e,n):"objDesc"===t?this._decodeStr(e,t,n):"int"===t||"enum"===t?this._decodeInt(e,r.args&&r.args[0],n):null!==r.use?this._getUse(r.use,e._reporterState.obj)._decode(e,n):e.error("unknown tag: "+t)},h.prototype._getUse=function(t,e){const n=this._baseState;return n.useDecoder=this._use(t,e),s(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},h.prototype._decodeChoice=function(t,e){const n=this._baseState;let r=null,i=!1;return Object.keys(n.choice).some((function(o){const s=t.save(),a=n.choice[o];try{const n=a._decode(t,e);if(t.isError(n))return!1;r={type:o,value:n},i=!0}catch(e){return t.restore(s),!1}return!0}),this),i?r:t.error("Choice not matched")},h.prototype._createEncoderBuffer=function(t){return new i(t,this.reporter)},h.prototype._encode=function(t,e,n){const r=this._baseState;if(null!==r.default&&r.default===t)return;const i=this._encodeValue(t,e,n);return void 0===i||this._skipDefault(i,e,n)?void 0:i},h.prototype._encodeValue=function(t,e,n){const i=this._baseState;if(null===i.parent)return i.children[0]._encode(t,e||new r);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,n)._encode(t,e),a=!0;else if(i.children)s=i.children.map((function(n){if("null_"===n._baseState.tag)return n._encode(null,e,t);if(null===n._baseState.key)return e.error("Child should have a key");const r=e.enterKey(n._baseState.key);if("object"!=typeof t)return e.error("Child expected, but input is not object");const i=n._encode(t[n._baseState.key],e,t);return e.leaveKey(r),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 n=this.clone();n._baseState.implicit=null,s=this._createEncoderBuffer(t.map((function(n){const r=this._baseState;return this._getUse(r.args[0],t)._encode(n,e)}),n))}else null!==i.use?o=this._getUse(i.use,n)._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,n=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,n,s))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},h.prototype._encodeChoice=function(t,e){const n=this._baseState,r=n.choice[t.type];return r||s(!1,t.type+" not found in "+JSON.stringify(Object.keys(n.choice))),r._encode(t.value,e)},h.prototype._encodePrimitive=function(t,e){const n=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&n.args)return this._encodeObjid(e,n.reverseArgs[0],n.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,n.args&&n.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},h.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},h.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(t)}},8465:(t,e,n)=>{"use strict";const r=n(5717);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,n){const r=this._reporterState;this.exitKey(t),null!==r.obj&&(r.obj[e]=n)},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,n=e.obj;return e.obj=t,n},i.prototype.error=function(t){let e;const n=this._reporterState,r=t instanceof o;if(e=r?t:new o(n.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!n.options.partial)throw e;return r||n.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},r(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}},160:(t,e)=>{"use strict";function n(t){const e={};return Object.keys(t).forEach((function(n){(0|n)==n&&(n|=0);const r=t[n];e[r]=n})),e}e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=n(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=n(e.tag)},6826:(t,e,n)=>{"use strict";const r=e;r._reverse=function(t){const e={};return Object.keys(t).forEach((function(n){(0|n)==n&&(n|=0);const r=t[n];e[r]=n})),e},r.der=n(160)},1671:(t,e,n)=>{"use strict";const r=n(5717),i=n(4590),o=n(6625).C,s=n(1949),a=n(160);function u(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new h,this.tree._init(t.body)}function h(t){s.call(this,"der",t)}function c(t,e){let n=t.readUInt8(e);if(t.isError(n))return n;const r=a.tagClass[n>>6],i=0==(32&n);if(31==(31&n)){let r=n;for(n=0;128==(128&r);){if(r=t.readUInt8(e),t.isError(r))return r;n<<=7,n|=127&r}}else n&=31;return{cls:r,primitive:i,tag:n,tagStr:a.tag[n]}}function l(t,e,n){let r=t.readUInt8(n);if(t.isError(r))return r;if(!e&&128===r)return null;if(0==(128&r))return r;const i=127&r;if(i>4)return t.error("length octect is too long");r=0;for(let e=0;e<i;e++){r<<=8;const e=t.readUInt8(n);if(t.isError(e))return e;r|=e}return r}t.exports=u,u.prototype.decode=function(t,e){return o.isDecoderBuffer(t)||(t=new o(t,e)),this.tree._decode(t,e)},r(h,s),h.prototype._peekTag=function(t,e,n){if(t.isEmpty())return!1;const r=t.save(),i=c(t,'Failed to peek tag: "'+e+'"');return t.isError(i)?i:(t.restore(r),i.tag===e||i.tagStr===e||i.tagStr+"of"===e||n)},h.prototype._decodeTag=function(t,e,n){const r=c(t,'Failed to decode tag of "'+e+'"');if(t.isError(r))return r;let i=l(t,r.primitive,'Failed to get length of "'+e+'"');if(t.isError(i))return i;if(!n&&r.tag!==e&&r.tagStr!==e&&r.tagStr+"of"!==e)return t.error('Failed to match tag: "'+e+'"');if(r.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+'"'))},h.prototype._skipUntilEnd=function(t,e){for(;;){const n=c(t,e);if(t.isError(n))return n;const r=l(t,n.primitive,e);if(t.isError(r))return r;let i;if(i=n.primitive||null!==r?t.skip(r):this._skipUntilEnd(t,e),t.isError(i))return i;if("end"===n.tagStr)break}},h.prototype._decodeList=function(t,e,n,r){const i=[];for(;!t.isEmpty();){const e=this._peekTag(t,"end");if(t.isError(e))return e;const o=n.decode(t,"der",r);if(t.isError(o)&&e)break;i.push(o)}return i},h.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 n="";for(let t=0;t<e.length/2;t++)n+=String.fromCharCode(e.readUInt16BE(2*t));return n}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")},h.prototype._decodeObjid=function(t,e,n){let r;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(r=n?i:[a,u].concat(i.slice(1)),e){let t=e[r.join(" ")];void 0===t&&(t=e[r.join(".")]),void 0!==t&&(r=t)}return r},h.prototype._decodeTime=function(t,e){const n=t.raw().toString();let r,i,o,s,a,u;if("gentime"===e)r=0|n.slice(0,4),i=0|n.slice(4,6),o=0|n.slice(6,8),s=0|n.slice(8,10),a=0|n.slice(10,12),u=0|n.slice(12,14);else{if("utctime"!==e)return t.error("Decoding "+e+" time is not supported yet");r=0|n.slice(0,2),i=0|n.slice(2,4),o=0|n.slice(4,6),s=0|n.slice(6,8),a=0|n.slice(8,10),u=0|n.slice(10,12),r=r<70?2e3+r:1900+r}return Date.UTC(r,i-1,o,s,a,u,0)},h.prototype._decodeNull=function(){return null},h.prototype._decodeBool=function(t){const e=t.readUInt8();return t.isError(e)?e:0!==e},h.prototype._decodeInt=function(t,e){const n=t.raw();let r=new i(n);return e&&(r=e[r.toString(10)]||r),r},h.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getDecoder("der").tree}},8307:(t,e,n)=>{"use strict";const r=e;r.der=n(1671),r.pem=n(9631)},9631:(t,e,n)=>{"use strict";const r=n(5717),i=n(2399).Buffer,o=n(1671);function s(t){o.call(this,t),this.enc="pem"}r(s,o),t.exports=s,s.prototype.decode=function(t,e){const n=t.toString().split(/[\r\n]+/g),r=e.label.toUpperCase(),s=/^-----(BEGIN|END) ([^-]+)-----$/;let a=-1,u=-1;for(let t=0;t<n.length;t++){const e=n[t].match(s);if(null!==e&&e[2]===r){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: "+r);const h=n.slice(a+1,u).join("");h.replace(/[^a-z0-9+/=]+/gi,"");const c=i.from(h,"base64");return o.prototype.decode.call(this,c,e)}},6984:(t,e,n)=>{"use strict";const r=n(5717),i=n(2399).Buffer,o=n(1949),s=n(160);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 h(t){return t<10?"0"+t:t}t.exports=a,a.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},r(u,o),u.prototype._encodeComposite=function(t,e,n,r){const o=function(t,e,n,r){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 r.error("Unknown tag: "+t);i=t}return i>=31?r.error("Multi-octet tag encoding unsupported"):(e||(i|=32),i|=s.tagClassByName[n||"universal"]<<6,i)}(t,e,n,this.reporter);if(r.length<128){const t=i.alloc(2);return t[0]=o,t[1]=r.length,this._createEncoderBuffer([t,r])}let a=1;for(let t=r.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=r.length;e>0;t--,e>>=8)u[t]=255&e;return this._createEncoderBuffer([u,r])},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 n=0;n<t.length;n++)e.writeUInt16BE(t.charCodeAt(n),2*n);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,n){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(!n){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}let r=0;for(let e=0;e<t.length;e++){let n=t[e];for(r++;n>=128;n>>=7)r++}const o=i.alloc(r);let s=o.length-1;for(let e=t.length-1;e>=0;e--){let n=t[e];for(o[s--]=127&n;(n>>=7)>0;)o[s--]=128|127&n}return this._createEncoderBuffer(o)},u.prototype._encodeTime=function(t,e){let n;const r=new Date(t);return"gentime"===e?n=[h(r.getUTCFullYear()),h(r.getUTCMonth()+1),h(r.getUTCDate()),h(r.getUTCHours()),h(r.getUTCMinutes()),h(r.getUTCSeconds()),"Z"].join(""):"utctime"===e?n=[h(r.getUTCFullYear()%100),h(r.getUTCMonth()+1),h(r.getUTCDate()),h(r.getUTCHours()),h(r.getUTCMinutes()),h(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(n,"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 n=i.alloc(e);return t.copy(n),0===t.length&&(n[0]=0),this._createEncoderBuffer(n)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);let n=1;for(let e=t;e>=256;e>>=8)n++;const r=new Array(n);for(let e=r.length-1;e>=0;e--)r[e]=255&t,t>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(i.from(r))},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,n){const r=this._baseState;let i;if(null===r.default)return!1;const o=t.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,e,n).join()),o.length!==r.defaultBuffer.length)return!1;for(i=0;i<o.length;i++)if(o[i]!==r.defaultBuffer[i])return!1;return!0}},6579:(t,e,n)=>{"use strict";const r=e;r.der=n(6984),r.pem=n(2883)},2883:(t,e,n)=>{"use strict";const r=n(5717),i=n(6984);function o(t){i.call(this,t),this.enc="pem"}r(o,i),t.exports=o,o.prototype.encode=function(t,e){const n=i.prototype.encode.call(this,t).toString("base64"),r=["-----BEGIN "+e.label+"-----"];for(let t=0;t<n.length;t+=64)r.push(n.slice(t,t+64));return r.push("-----END "+e.label+"-----"),r.join("\n")}},4590:function(t,e,n){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"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:n(950).Buffer}catch(t){}function a(t,e){var n=t.charCodeAt(e);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function u(t,e,n){var r=a(t,n);return n-1>=e&&(r|=a(t,n-1)<<4),r}function h(t,e,n,r){for(var i=0,o=Math.min(t.length,n),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=r,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,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(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,n):(this._parseBase(t,e,i),"le"===n&&this._initArray(this.toArray(),e,n)))},o.prototype._initNumber=function(t,e,n){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):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initArray=function(t,e,n){if(r("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"===n)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"===n)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,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,s=0;if("be"===n)for(r=t.length-1;r>=e;r-=2)i=u(t,e,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)i=u(t,e,r)<<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,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,s=o%r,a=Math.min(o,o-s)+n,u=0,c=n;c<a;c+=r)u=h(t,c,c+r,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=h(t,c,t.length,e),c=0;c<s;c++)l*=e;this.imuln(l),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 c=["","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"],l=[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 f(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var h=1;h<r;h++){for(var c=u>>>26,l=67108863&u,d=Math.min(h,e.length-1),f=Math.max(0,h-t.length+1);f<=d;f++){var p=h-f|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[f])+l)/67108864|0,l=67108863&s}n.words[h]=0|l,u=0|c}return 0!==u?n.words[h]=0|u:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);n=0!=(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var h=l[t],f=d[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(t);n=(p=p.idivn(f)).isZero()?m+n:c[h-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!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&&r(!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 r(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,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,h=new t(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[a]=s;for(;a<o;a++)h[a]=0}else{for(a=0;a<o-i;a++)h[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[o-a-1]=s}return h},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},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 n=this._zeroBits(this.words[e]);if(t+=n,26!==n)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 r(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 n=0;n<e.length;n++)this.words[n]=this.words[n]&t.words[n];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return r(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,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;r<n.length;r++)this.words[r]=e.words[r]^n.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return r(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){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,n,r;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?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o<r.length;o++)e=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<n.length;o++)e=(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.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 n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(e=(0|n.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<n.length;s++)o=(e=(0|n.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,n){var r,i,o,s=t.words,a=e.words,u=n.words,h=0,c=0|s[0],l=8191&c,d=c>>>13,f=0|s[1],p=8191&f,m=f>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,_=y>>>13,M=0|s[4],S=8191&M,E=M>>>13,A=0|s[5],k=8191&A,x=A>>>13,R=0|s[6],I=8191&R,T=R>>>13,C=0|s[7],B=8191&C,D=C>>>13,P=0|s[8],U=8191&P,O=P>>>13,N=0|s[9],q=8191&N,L=N>>>13,j=0|a[0],K=8191&j,$=j>>>13,z=0|a[1],H=8191&z,W=z>>>13,V=0|a[2],F=8191&V,J=V>>>13,G=0|a[3],Z=8191&G,Y=G>>>13,X=0|a[4],Q=8191&X,tt=X>>>13,et=0|a[5],nt=8191&et,rt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ht=at>>>13,ct=0|a[8],lt=8191&ct,dt=ct>>>13,ft=0|a[9],pt=8191&ft,mt=ft>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(h+(r=Math.imul(l,K))|0)+((8191&(i=(i=Math.imul(l,$))+Math.imul(d,K)|0))<<13)|0;h=((o=Math.imul(d,$))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,K),i=(i=Math.imul(p,$))+Math.imul(m,K)|0,o=Math.imul(m,$);var vt=(h+(r=r+Math.imul(l,H)|0)|0)+((8191&(i=(i=i+Math.imul(l,W)|0)+Math.imul(d,H)|0))<<13)|0;h=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,K),i=(i=Math.imul(v,$))+Math.imul(b,K)|0,o=Math.imul(b,$),r=r+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var bt=(h+(r=r+Math.imul(l,F)|0)|0)+((8191&(i=(i=i+Math.imul(l,J)|0)+Math.imul(d,F)|0))<<13)|0;h=((o=o+Math.imul(d,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,K),i=(i=Math.imul(w,$))+Math.imul(_,K)|0,o=Math.imul(_,$),r=r+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,W)|0,r=r+Math.imul(p,F)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,F)|0,o=o+Math.imul(m,J)|0;var yt=(h+(r=r+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(d,Z)|0))<<13)|0;h=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,K),i=(i=Math.imul(S,$))+Math.imul(E,K)|0,o=Math.imul(E,$),r=r+Math.imul(w,H)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,r=r+Math.imul(v,F)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(b,F)|0,o=o+Math.imul(b,J)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,Y)|0;var wt=(h+(r=r+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(d,Q)|0))<<13)|0;h=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,K),i=(i=Math.imul(k,$))+Math.imul(x,K)|0,o=Math.imul(x,$),r=r+Math.imul(S,H)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(E,H)|0,o=o+Math.imul(E,W)|0,r=r+Math.imul(w,F)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,F)|0,o=o+Math.imul(_,J)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,Y)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var _t=(h+(r=r+Math.imul(l,nt)|0)|0)+((8191&(i=(i=i+Math.imul(l,rt)|0)+Math.imul(d,nt)|0))<<13)|0;h=((o=o+Math.imul(d,rt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(I,K),i=(i=Math.imul(I,$))+Math.imul(T,K)|0,o=Math.imul(T,$),r=r+Math.imul(k,H)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,W)|0,r=r+Math.imul(S,F)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(E,F)|0,o=o+Math.imul(E,J)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,Y)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var Mt=(h+(r=r+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;h=((o=o+Math.imul(d,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(B,K),i=(i=Math.imul(B,$))+Math.imul(D,K)|0,o=Math.imul(D,$),r=r+Math.imul(I,H)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,W)|0,r=r+Math.imul(k,F)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(x,F)|0,o=o+Math.imul(x,J)|0,r=r+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(E,Z)|0,o=o+Math.imul(E,Y)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(v,nt)|0,i=(i=i+Math.imul(v,rt)|0)+Math.imul(b,nt)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(h+(r=r+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(d,ut)|0))<<13)|0;h=((o=o+Math.imul(d,ht)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(U,K),i=(i=Math.imul(U,$))+Math.imul(O,K)|0,o=Math.imul(O,$),r=r+Math.imul(B,H)|0,i=(i=i+Math.imul(B,W)|0)+Math.imul(D,H)|0,o=o+Math.imul(D,W)|0,r=r+Math.imul(I,F)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(T,F)|0,o=o+Math.imul(T,J)|0,r=r+Math.imul(k,Z)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(w,nt)|0,i=(i=i+Math.imul(w,rt)|0)+Math.imul(_,nt)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var Et=(h+(r=r+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;h=((o=o+Math.imul(d,dt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,K),i=(i=Math.imul(q,$))+Math.imul(L,K)|0,o=Math.imul(L,$),r=r+Math.imul(U,H)|0,i=(i=i+Math.imul(U,W)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,W)|0,r=r+Math.imul(B,F)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(D,F)|0,o=o+Math.imul(D,J)|0,r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,Y)|0,r=r+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,r=r+Math.imul(S,nt)|0,i=(i=i+Math.imul(S,rt)|0)+Math.imul(E,nt)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,r=r+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ht)|0,r=r+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var At=(h+(r=r+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;h=((o=o+Math.imul(d,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,H),i=(i=Math.imul(q,W))+Math.imul(L,H)|0,o=Math.imul(L,W),r=r+Math.imul(U,F)|0,i=(i=i+Math.imul(U,J)|0)+Math.imul(O,F)|0,o=o+Math.imul(O,J)|0,r=r+Math.imul(B,Z)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,Y)|0,r=r+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,nt)|0,i=(i=i+Math.imul(k,rt)|0)+Math.imul(x,nt)|0,o=o+Math.imul(x,rt)|0,r=r+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ht)|0,r=r+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(h+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,F),i=(i=Math.imul(q,J))+Math.imul(L,F)|0,o=Math.imul(L,J),r=r+Math.imul(U,Z)|0,i=(i=i+Math.imul(U,Y)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Y)|0,r=r+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(I,nt)|0,i=(i=i+Math.imul(I,rt)|0)+Math.imul(T,nt)|0,o=o+Math.imul(T,rt)|0,r=r+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,r=r+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,ht)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ht)|0,r=r+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,dt)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,dt)|0;var xt=(h+(r=r+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;h=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(q,Z),i=(i=Math.imul(q,Y))+Math.imul(L,Z)|0,o=Math.imul(L,Y),r=r+Math.imul(U,Q)|0,i=(i=i+Math.imul(U,tt)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,r=r+Math.imul(B,nt)|0,i=(i=i+Math.imul(B,rt)|0)+Math.imul(D,nt)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ht)|0,r=r+Math.imul(S,lt)|0,i=(i=i+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var Rt=(h+(r=r+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;h=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,Q),i=(i=Math.imul(q,tt))+Math.imul(L,Q)|0,o=Math.imul(L,tt),r=r+Math.imul(U,nt)|0,i=(i=i+Math.imul(U,rt)|0)+Math.imul(O,nt)|0,o=o+Math.imul(O,rt)|0,r=r+Math.imul(B,ot)|0,i=(i=i+Math.imul(B,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ht)|0,r=r+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,dt)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,dt)|0;var It=(h+(r=r+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;h=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,nt),i=(i=Math.imul(q,rt))+Math.imul(L,nt)|0,o=Math.imul(L,rt),r=r+Math.imul(U,ot)|0,i=(i=i+Math.imul(U,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,r=r+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,ht)|0)+Math.imul(D,ut)|0,o=o+Math.imul(D,ht)|0,r=r+Math.imul(I,lt)|0,i=(i=i+Math.imul(I,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(h+(r=r+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,mt)|0)+Math.imul(x,pt)|0))<<13)|0;h=((o=o+Math.imul(x,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),i=(i=Math.imul(q,st))+Math.imul(L,ot)|0,o=Math.imul(L,st),r=r+Math.imul(U,ut)|0,i=(i=i+Math.imul(U,ht)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,ht)|0,r=r+Math.imul(B,lt)|0,i=(i=i+Math.imul(B,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Ct=(h+(r=r+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(T,pt)|0))<<13)|0;h=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(q,ut),i=(i=Math.imul(q,ht))+Math.imul(L,ut)|0,o=Math.imul(L,ht),r=r+Math.imul(U,lt)|0,i=(i=i+Math.imul(U,dt)|0)+Math.imul(O,lt)|0,o=o+Math.imul(O,dt)|0;var Bt=(h+(r=r+Math.imul(B,pt)|0)|0)+((8191&(i=(i=i+Math.imul(B,mt)|0)+Math.imul(D,pt)|0))<<13)|0;h=((o=o+Math.imul(D,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,lt),i=(i=Math.imul(q,dt))+Math.imul(L,lt)|0,o=Math.imul(L,dt);var Dt=(h+(r=r+Math.imul(U,pt)|0)|0)+((8191&(i=(i=i+Math.imul(U,mt)|0)+Math.imul(O,pt)|0))<<13)|0;h=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Pt=(h+(r=Math.imul(q,pt))|0)+((8191&(i=(i=Math.imul(q,mt))+Math.imul(L,pt)|0))<<13)|0;return h=((o=Math.imul(L,mt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=gt,u[1]=vt,u[2]=bt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=St,u[8]=Et,u[9]=At,u[10]=kt,u[11]=xt,u[12]=Rt,u[13]=It,u[14]=Tt,u[15]=Ct,u[16]=Bt,u[17]=Dt,u[18]=Pt,0!==h&&(u[19]=h,n.length++),n};function m(t,e,n){return(new g).mulp(t,e,n)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=f),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):n<63?f(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,u=Math.min(o,e.length-1),h=Math.max(0,o-t.length+1);h<=u;h++){var c=o-h,l=(0|t.words[c])*(0|e.words[h]),d=67108863&l;a=67108863&(d=d+a|0),i+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):m(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,n,t);return e},g.prototype.revBin=function(t,e,n){if(0===t||t===n-1)return t;for(var r=0,i=0;i<e;i++)r|=(1&t)<<e-i-1,t>>=1;return r},g.prototype.permute=function(t,e,n,r,i,o){for(var s=0;s<o;s++)r[s]=e[t[s]],i[s]=n[t[s]]},g.prototype.transform=function(t,e,n,r,i,o){this.permute(o,t,e,n,r,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),h=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var l=u,d=h,f=0;f<s;f++){var p=n[c+f],m=r[c+f],g=n[c+f+s],v=r[c+f+s],b=l*g-d*v;v=l*v+d*g,g=b,n[c+f]=p+g,r[c+f]=m+v,n[c+f+s]=p-g,r[c+f+s]=m-v,f!==a&&(b=u*l-h*d,d=u*d+h*l,l=b)}},g.prototype.guessLen13b=function(t,e){var n=1|Math.max(e,t),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},g.prototype.conjugate=function(t,e,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=t[r];t[r]=t[n-r-1],t[n-r-1]=i,i=e[r],e[r]=-e[n-r-1],e[n-r-1]=-i}},g.prototype.normalize13b=function(t,e){for(var n=0,r=0;r<e/2;r++){var i=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+n;t[r]=67108863&i,n=i<67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,n,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],n[2*s]=8191&o,o>>>=13,n[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)n[s]=0;r(0===o),r(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=0;return e},g.prototype.mulp=function(t,e,n){var r=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(r),o=this.stub(r),s=new Array(r),a=new Array(r),u=new Array(r),h=new Array(r),c=new Array(r),l=new Array(r),d=n.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,h,r),this.transform(s,o,a,u,r,i),this.transform(h,o,c,l,r,i);for(var f=0;f<r;f++){var p=a[f]*c[f]-u[f]*l[f];u[f]=a[f]*l[f]+u[f]*c[f],a[f]=p}return this.conjugate(a,u,r),this.transform(a,u,d,o,r,i),this.conjugate(d,o,r),this.normalize13b(d,r),n.negative=t.negative^e.negative,n.length=t.length+e.length,n.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){r("number"==typeof t),r(t<67108864);for(var e=0,n=0;n<this.length;n++){var i=(0|this.words[n])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=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()),n=0;n<e.length;n++){var r=n/26|0,i=n%26;e[n]=(t.words[r]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r<e.length&&0===e[r];r++,n=n.sqr());if(++r<e.length)for(var i=n.sqr();r<e.length;r++,i=i.sqr())0!==e[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<n;this.words[e]=u|s,s=a>>>26-n}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 r(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,n){var i;r("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=n;if(i-=s,i=Math.max(0,i),u){for(var h=0;h<s;h++)u.words[h]=this.words[h];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,h=0;h<this.length;h++)this.words[h]=this.words[h+s];else this.words[0]=0,this.length=1;var c=0;for(h=this.length-1;h>=0&&(0!==c||h>=i);h--){var l=0|this.words[h];this.words[h]=c<<26-o|l>>>o,c=l&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},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){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<<e;return!(this.length<=n||!(this.words[n]&i))},o.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,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 r("number"==typeof t),r(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(r("number"==typeof t),r(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,n){var i,o,s=t.length+n;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+n])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)a=(o=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&o;if(0===a)return this.strip();for(r(-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 n=(this.length,t.length),r=this.clone(),i=t,s=0|i.words[i.length-1];0!=(n=26-this._countBits(s))&&(i=i.ushln(n),r.iushln(n),s=0|i.words[i.length-1]);var a,u=r.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h<a.length;h++)a.words[h]=0}var c=r.clone()._ishlnsubmul(i,1,u);0===c.negative&&(r=c,a&&(a.words[u]=1));for(var l=u-1;l>=0;l--){var d=67108864*(0|r.words[i.length+l])+(0|r.words[i.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(i,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,l),r.isZero()||(r.negative^=1);a&&(a.words[l]=d)}return a&&a.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!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(),n&&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(),n&&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 n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);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){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=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),h=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++h;for(var c=n.clone(),l=e.clone();!e.isZero();){for(var d=0,f=1;0==(e.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(l)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(l)),a.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(a),s.isub(u)):(n.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:n.iushln(h)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var h=0,c=1;0==(e.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,d=1;0==(n.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(n.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(n)>=0?(e.isub(n),s.isub(a)):(n.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(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},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){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,s=n;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,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(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,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){r<i?e=-1:r>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 S(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function b(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 y(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){S.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)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(y,b),y.prototype.split=function(t,e){for(var n=4194303,r=Math.min(t.length,9),i=0;i<r;i++)e.words[i]=t.words[i];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&n,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&n)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n<t.length;n++){var r=0|t.words[n];e+=977*r,t.words[n]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(w,b),i(_,b),i(M,b),M.prototype.imulK=function(t){for(var e=0,n=0;n<t.length;n++){var r=19*(0|t.words[n])+e,i=67108863&r;r>>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new y;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 M}return v[t]=e,e},S.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var l=this.pow(c,i),d=this.pow(t,i.addn(1).iushrn(1)),f=this.pow(t,i),p=s;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<p);var v=this.pow(l,new o(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),f=f.redMul(l),p=g}return d},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=t;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],t);var i=n[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),r=e.length-1;r>=0;r--){for(var h=e.words[r],c=u-1;c>=0;c--){var l=h>>c&1;i!==n[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===r&&0===c)&&(i=this.mul(i,n[s]),a=0,s=0)):a=0}u=26}return i},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new E(t)},i(E,S),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).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)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).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)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=n.nmd(t),this)},9669:(t,e,n)=>{t.exports=n(1609)},5448:(t,e,n)=>{"use strict";var r=n(4867),i=n(6026),o=n(5327),s=n(4097),a=n(4109),u=n(7985),h=n(5061);t.exports=function(t){return new Promise((function(e,c){var l=t.data,d=t.headers;r.isFormData(l)&&delete d["Content-Type"];var f=new XMLHttpRequest;if(t.auth){var p=t.auth.username||"",m=t.auth.password||"";d.Authorization="Basic "+btoa(p+":"+m)}var g=s(t.baseURL,t.url);if(f.open(t.method.toUpperCase(),o(g,t.params,t.paramsSerializer),!0),f.timeout=t.timeout,f.onreadystatechange=function(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in f?a(f.getAllResponseHeaders()):null,r={data:t.responseType&&"text"!==t.responseType?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:n,config:t,request:f};i(e,c,r),f=null}},f.onabort=function(){f&&(c(h("Request aborted",t,"ECONNABORTED",f)),f=null)},f.onerror=function(){c(h("Network Error",t,null,f)),f=null},f.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),c(h(e,t,"ECONNABORTED",f)),f=null},r.isStandardBrowserEnv()){var v=n(4372),b=(t.withCredentials||u(g))&&t.xsrfCookieName?v.read(t.xsrfCookieName):void 0;b&&(d[t.xsrfHeaderName]=b)}if("setRequestHeader"in f&&r.forEach(d,(function(t,e){void 0===l&&"content-type"===e.toLowerCase()?delete d[e]:f.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(f.withCredentials=!!t.withCredentials),t.responseType)try{f.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&f.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){f&&(f.abort(),c(t),f=null)})),void 0===l&&(l=null),f.send(l)}))}},1609:(t,e,n)=>{"use strict";var r=n(4867),i=n(1849),o=n(321),s=n(7185);function a(t){var e=new o(t),n=i(o.prototype.request,e);return r.extend(n,o.prototype,e),r.extend(n,e),n}var u=a(n(5655));u.Axios=o,u.create=function(t){return a(s(u.defaults,t))},u.Cancel=n(5263),u.CancelToken=n(4972),u.isCancel=n(6502),u.all=function(t){return Promise.all(t)},u.spread=n(8713),t.exports=u,t.exports.default=u},5263:t=>{"use strict";function e(t){this.message=t}e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,t.exports=e},4972:(t,e,n)=>{"use strict";var r=n(5263);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var n=this;t((function(t){n.reason||(n.reason=new r(t),e(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var t;return{token:new i((function(e){t=e})),cancel:t}},t.exports=i},6502:t=>{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},321:(t,e,n)=>{"use strict";var r=n(4867),i=n(5327),o=n(782),s=n(3572),a=n(7185);function u(t){this.defaults=t,this.interceptors={request:new o,response:new o}}u.prototype.request=function(t){"string"==typeof t?(t=arguments[1]||{}).url=arguments[0]:t=t||{},(t=a(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var e=[s,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach((function(t){e.unshift(t.fulfilled,t.rejected)})),this.interceptors.response.forEach((function(t){e.push(t.fulfilled,t.rejected)}));e.length;)n=n.then(e.shift(),e.shift());return n},u.prototype.getUri=function(t){return t=a(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(t){u.prototype[t]=function(e,n){return this.request(r.merge(n||{},{method:t,url:e}))}})),r.forEach(["post","put","patch"],(function(t){u.prototype[t]=function(e,n,i){return this.request(r.merge(i||{},{method:t,url:e,data:n}))}})),t.exports=u},782:(t,e,n)=>{"use strict";var r=n(4867);function i(){this.handlers=[]}i.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(t){r.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=i},4097:(t,e,n)=>{"use strict";var r=n(1793),i=n(7303);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},5061:(t,e,n)=>{"use strict";var r=n(481);t.exports=function(t,e,n,i,o){var s=new Error(t);return r(s,e,n,i,o)}},3572:(t,e,n)=>{"use strict";var r=n(4867),i=n(8527),o=n(6502),s=n(5655);function a(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return a(t),t.headers=t.headers||{},t.data=i(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||s.adapter)(t).then((function(e){return a(t),e.data=i(e.data,e.headers,t.transformResponse),e}),(function(e){return o(e)||(a(t),e&&e.response&&(e.response.data=i(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},481:t=>{"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},7185:(t,e,n)=>{"use strict";var r=n(4867);t.exports=function(t,e){e=e||{};var n={},i=["url","method","params","data"],o=["headers","auth","proxy"],s=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];r.forEach(i,(function(t){void 0!==e[t]&&(n[t]=e[t])})),r.forEach(o,(function(i){r.isObject(e[i])?n[i]=r.deepMerge(t[i],e[i]):void 0!==e[i]?n[i]=e[i]:r.isObject(t[i])?n[i]=r.deepMerge(t[i]):void 0!==t[i]&&(n[i]=t[i])})),r.forEach(s,(function(r){void 0!==e[r]?n[r]=e[r]:void 0!==t[r]&&(n[r]=t[r])}));var a=i.concat(o).concat(s),u=Object.keys(e).filter((function(t){return-1===a.indexOf(t)}));return r.forEach(u,(function(r){void 0!==e[r]?n[r]=e[r]:void 0!==t[r]&&(n[r]=t[r])})),n}},6026:(t,e,n)=>{"use strict";var r=n(5061);t.exports=function(t,e,n){var i=n.config.validateStatus;!i||i(n.status)?t(n):e(r("Request failed with status code "+n.status,n.config,null,n.request,n))}},8527:(t,e,n)=>{"use strict";var r=n(4867);t.exports=function(t,e,n){return r.forEach(n,(function(n){t=n(t,e)})),t}},5655:(t,e,n)=>{"use strict";var r=n(4155),i=n(4867),o=n(6016),s={"Content-Type":"application/x-www-form-urlencoded"};function a(t,e){!i.isUndefined(t)&&i.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var u,h={adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==r&&"[object process]"===Object.prototype.toString.call(r))&&(u=n(5448)),u),transformRequest:[function(t,e){return o(e,"Accept"),o(e,"Content-Type"),i.isFormData(t)||i.isArrayBuffer(t)||i.isBuffer(t)||i.isStream(t)||i.isFile(t)||i.isBlob(t)?t:i.isArrayBufferView(t)?t.buffer:i.isURLSearchParams(t)?(a(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):i.isObject(t)?(a(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};i.forEach(["delete","get","head"],(function(t){h.headers[t]={}})),i.forEach(["post","put","patch"],(function(t){h.headers[t]=i.merge(s)})),t.exports=h},1849:t=>{"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},5327:(t,e,n)=>{"use strict";var r=n(4867);function i(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(r.isURLSearchParams(e))o=e.toString();else{var s=[];r.forEach(e,(function(t,e){null!=t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,(function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),s.push(i(e)+"="+i(t))})))})),o=s.join("&")}if(o){var a=t.indexOf("#");-1!==a&&(t=t.slice(0,a)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}},7303:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},4372:(t,e,n)=>{"use strict";var r=n(4867);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,i,o,s){var a=[];a.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),r.isString(i)&&a.push("path="+i),r.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},7985:(t,e,n)=>{"use strict";var r=n(4867);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=i(window.location.href),function(e){var n=r.isString(e)?i(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},6016:(t,e,n)=>{"use strict";var r=n(4867);t.exports=function(t,e){r.forEach(t,(function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])}))}},4109:(t,e,n)=>{"use strict";var r=n(4867),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,o,s={};return t?(r.forEach(t.split("\n"),(function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e){if(s[e]&&i.indexOf(e)>=0)return;s[e]="set-cookie"===e?(s[e]?s[e]:[]).concat([n]):s[e]?s[e]+", "+n:n}})),s):s}},8713:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},4867:(t,e,n)=>{"use strict";var r=n(1849),i=Object.prototype.toString;function o(t){return"[object Array]"===i.call(t)}function s(t){return void 0===t}function a(t){return null!==t&&"object"==typeof t}function u(t){return"[object Function]"===i.call(t)}function h(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),o(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:o,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:function(t){return null!==t&&!s(t)&&null!==t.constructor&&!s(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:a,isUndefined:s,isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:u,isStream:function(t){return a(t)&&u(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:h,merge:function t(){var e={};function n(n,r){"object"==typeof e[r]&&"object"==typeof n?e[r]=t(e[r],n):e[r]=n}for(var r=0,i=arguments.length;r<i;r++)h(arguments[r],n);return e},deepMerge:function t(){var e={};function n(n,r){"object"==typeof e[r]&&"object"==typeof n?e[r]=t(e[r],n):e[r]="object"==typeof n?t({},n):n}for(var r=0,i=arguments.length;r<i;r++)h(arguments[r],n);return e},extend:function(t,e,n){return h(e,(function(e,i){t[i]=n&&"function"==typeof e?r(e,n):e})),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}}},9742:(t,e)=>{"use strict";e.byteLength=function(t){var e=u(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,o=u(t),s=o[0],a=o[1],h=new i(function(t,e,n){return 3*(e+n)/4-n}(0,s,a)),c=0,l=a>0?s-4:s;for(n=0;n<l;n+=4)e=r[t.charCodeAt(n)]<<18|r[t.charCodeAt(n+1)]<<12|r[t.charCodeAt(n+2)]<<6|r[t.charCodeAt(n+3)],h[c++]=e>>16&255,h[c++]=e>>8&255,h[c++]=255&e;return 2===a&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,h[c++]=255&e),1===a&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,h[c++]=e>>8&255,h[c++]=255&e),h},e.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(h(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=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)n[s]=o[s],r[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 n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function h(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("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},3550:function(t,e,n){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"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:n(6601).Buffer}catch(t){}function a(t,e){var n=t.charCodeAt(e);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+t)}function u(t,e,n){var r=a(t,n);return n-1>=e&&(r|=a(t,n-1)<<4),r}function h(t,e,n,i){for(var o=0,s=0,a=Math.min(t.length,n),u=e;u<a;u++){var h=t.charCodeAt(u)-48;o*=i,s=h>=49?h-49+10:h>=17?h-17+10:h,r(h>=0&&s<i,"Invalid character"),o+=s}return o}function c(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,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(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,n):(this._parseBase(t,e,i),"le"===n&&this._initArray(this.toArray(),e,n)))},o.prototype._initNumber=function(t,e,n){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):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initArray=function(t,e,n){if(r("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"===n)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"===n)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,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,s=0;if("be"===n)for(r=t.length-1;r>=e;r-=2)i=u(t,e,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)i=u(t,e,r)<<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,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,s=o%r,a=Math.min(o,o-s)+n,u=0,c=n;c<a;c+=r)u=h(t,c,c+r,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=h(t,c,t.length,e),c=0;c<s;c++)l*=e;this.imuln(l),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){c(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")]=l}catch(t){o.prototype.inspect=l}else o.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","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"],f=[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],p=[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 m(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var h=1;h<r;h++){for(var c=u>>>26,l=67108863&u,d=Math.min(h,e.length-1),f=Math.max(0,h-t.length+1);f<=d;f++){var p=h-f|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[f])+l)/67108864|0,l=67108863&s}n.words[h]=0|l,u=0|c}return 0!==u?n.words[h]=0|u:n.length--,n._strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);n=0!=(o=a>>>24-i&16777215)||s!==this.length-1?d[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var h=f[t],c=p[t];n="";var l=this.clone();for(l.negative=0;!l.isZero();){var m=l.modrn(c).toString(t);n=(l=l.idivn(c)).isZero()?m+n:d[h-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!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&&r(!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,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(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 n=0,r=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|r;t[n++]=255&s,n<t.length&&(t[n++]=s>>8&255),n<t.length&&(t[n++]=s>>16&255),6===o?(n<t.length&&(t[n++]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(n<t.length)for(t[n++]=r;n<t.length;)t[n++]=0},o.prototype._toArrayLikeBE=function(t,e){for(var n=t.length-1,r=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|r;t[n--]=255&s,n>=0&&(t[n--]=s>>8&255),n>=0&&(t[n--]=s>>16&255),6===o?(n>=0&&(t[n--]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(n>=0)for(t[n--]=r;n>=0;)t[n--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},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 n=this._zeroBits(this.words[e]);if(t+=n,26!==n)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 r(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 n=0;n<e.length;n++)this.words[n]=this.words[n]&t.words[n];return this.length=e.length,this._strip()},o.prototype.iand=function(t){return r(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,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;r<n.length;r++)this.words[r]=e.words[r]^n.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this._strip()},o.prototype.ixor=function(t){return r(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){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<i:this.words[n]&~(1<<i),this._strip()},o.prototype.iadd=function(t){var e,n,r;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?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o<r.length;o++)e=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<n.length;o++)e=(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.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 n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(e=(0|n.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<n.length;s++)o=(e=(0|n.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var g=function(t,e,n){var r,i,o,s=t.words,a=e.words,u=n.words,h=0,c=0|s[0],l=8191&c,d=c>>>13,f=0|s[1],p=8191&f,m=f>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,_=y>>>13,M=0|s[4],S=8191&M,E=M>>>13,A=0|s[5],k=8191&A,x=A>>>13,R=0|s[6],I=8191&R,T=R>>>13,C=0|s[7],B=8191&C,D=C>>>13,P=0|s[8],U=8191&P,O=P>>>13,N=0|s[9],q=8191&N,L=N>>>13,j=0|a[0],K=8191&j,$=j>>>13,z=0|a[1],H=8191&z,W=z>>>13,V=0|a[2],F=8191&V,J=V>>>13,G=0|a[3],Z=8191&G,Y=G>>>13,X=0|a[4],Q=8191&X,tt=X>>>13,et=0|a[5],nt=8191&et,rt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ht=at>>>13,ct=0|a[8],lt=8191&ct,dt=ct>>>13,ft=0|a[9],pt=8191&ft,mt=ft>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(h+(r=Math.imul(l,K))|0)+((8191&(i=(i=Math.imul(l,$))+Math.imul(d,K)|0))<<13)|0;h=((o=Math.imul(d,$))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,K),i=(i=Math.imul(p,$))+Math.imul(m,K)|0,o=Math.imul(m,$);var vt=(h+(r=r+Math.imul(l,H)|0)|0)+((8191&(i=(i=i+Math.imul(l,W)|0)+Math.imul(d,H)|0))<<13)|0;h=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,K),i=(i=Math.imul(v,$))+Math.imul(b,K)|0,o=Math.imul(b,$),r=r+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var bt=(h+(r=r+Math.imul(l,F)|0)|0)+((8191&(i=(i=i+Math.imul(l,J)|0)+Math.imul(d,F)|0))<<13)|0;h=((o=o+Math.imul(d,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,K),i=(i=Math.imul(w,$))+Math.imul(_,K)|0,o=Math.imul(_,$),r=r+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,W)|0,r=r+Math.imul(p,F)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,F)|0,o=o+Math.imul(m,J)|0;var yt=(h+(r=r+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(d,Z)|0))<<13)|0;h=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,K),i=(i=Math.imul(S,$))+Math.imul(E,K)|0,o=Math.imul(E,$),r=r+Math.imul(w,H)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,r=r+Math.imul(v,F)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(b,F)|0,o=o+Math.imul(b,J)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,Y)|0;var wt=(h+(r=r+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(d,Q)|0))<<13)|0;h=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,K),i=(i=Math.imul(k,$))+Math.imul(x,K)|0,o=Math.imul(x,$),r=r+Math.imul(S,H)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(E,H)|0,o=o+Math.imul(E,W)|0,r=r+Math.imul(w,F)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,F)|0,o=o+Math.imul(_,J)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,Y)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var _t=(h+(r=r+Math.imul(l,nt)|0)|0)+((8191&(i=(i=i+Math.imul(l,rt)|0)+Math.imul(d,nt)|0))<<13)|0;h=((o=o+Math.imul(d,rt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(I,K),i=(i=Math.imul(I,$))+Math.imul(T,K)|0,o=Math.imul(T,$),r=r+Math.imul(k,H)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,W)|0,r=r+Math.imul(S,F)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(E,F)|0,o=o+Math.imul(E,J)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,Y)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var Mt=(h+(r=r+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;h=((o=o+Math.imul(d,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(B,K),i=(i=Math.imul(B,$))+Math.imul(D,K)|0,o=Math.imul(D,$),r=r+Math.imul(I,H)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,W)|0,r=r+Math.imul(k,F)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(x,F)|0,o=o+Math.imul(x,J)|0,r=r+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(E,Z)|0,o=o+Math.imul(E,Y)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(v,nt)|0,i=(i=i+Math.imul(v,rt)|0)+Math.imul(b,nt)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(h+(r=r+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(d,ut)|0))<<13)|0;h=((o=o+Math.imul(d,ht)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(U,K),i=(i=Math.imul(U,$))+Math.imul(O,K)|0,o=Math.imul(O,$),r=r+Math.imul(B,H)|0,i=(i=i+Math.imul(B,W)|0)+Math.imul(D,H)|0,o=o+Math.imul(D,W)|0,r=r+Math.imul(I,F)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(T,F)|0,o=o+Math.imul(T,J)|0,r=r+Math.imul(k,Z)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(w,nt)|0,i=(i=i+Math.imul(w,rt)|0)+Math.imul(_,nt)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var Et=(h+(r=r+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;h=((o=o+Math.imul(d,dt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,K),i=(i=Math.imul(q,$))+Math.imul(L,K)|0,o=Math.imul(L,$),r=r+Math.imul(U,H)|0,i=(i=i+Math.imul(U,W)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,W)|0,r=r+Math.imul(B,F)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(D,F)|0,o=o+Math.imul(D,J)|0,r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,Y)|0,r=r+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,r=r+Math.imul(S,nt)|0,i=(i=i+Math.imul(S,rt)|0)+Math.imul(E,nt)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,r=r+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ht)|0,r=r+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var At=(h+(r=r+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;h=((o=o+Math.imul(d,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,H),i=(i=Math.imul(q,W))+Math.imul(L,H)|0,o=Math.imul(L,W),r=r+Math.imul(U,F)|0,i=(i=i+Math.imul(U,J)|0)+Math.imul(O,F)|0,o=o+Math.imul(O,J)|0,r=r+Math.imul(B,Z)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,Y)|0,r=r+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,nt)|0,i=(i=i+Math.imul(k,rt)|0)+Math.imul(x,nt)|0,o=o+Math.imul(x,rt)|0,r=r+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ht)|0,r=r+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(h+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,F),i=(i=Math.imul(q,J))+Math.imul(L,F)|0,o=Math.imul(L,J),r=r+Math.imul(U,Z)|0,i=(i=i+Math.imul(U,Y)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Y)|0,r=r+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(I,nt)|0,i=(i=i+Math.imul(I,rt)|0)+Math.imul(T,nt)|0,o=o+Math.imul(T,rt)|0,r=r+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,r=r+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,ht)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ht)|0,r=r+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,dt)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,dt)|0;var xt=(h+(r=r+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;h=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(q,Z),i=(i=Math.imul(q,Y))+Math.imul(L,Z)|0,o=Math.imul(L,Y),r=r+Math.imul(U,Q)|0,i=(i=i+Math.imul(U,tt)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,r=r+Math.imul(B,nt)|0,i=(i=i+Math.imul(B,rt)|0)+Math.imul(D,nt)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ht)|0,r=r+Math.imul(S,lt)|0,i=(i=i+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var Rt=(h+(r=r+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;h=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,Q),i=(i=Math.imul(q,tt))+Math.imul(L,Q)|0,o=Math.imul(L,tt),r=r+Math.imul(U,nt)|0,i=(i=i+Math.imul(U,rt)|0)+Math.imul(O,nt)|0,o=o+Math.imul(O,rt)|0,r=r+Math.imul(B,ot)|0,i=(i=i+Math.imul(B,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ht)|0,r=r+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,dt)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,dt)|0;var It=(h+(r=r+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;h=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,nt),i=(i=Math.imul(q,rt))+Math.imul(L,nt)|0,o=Math.imul(L,rt),r=r+Math.imul(U,ot)|0,i=(i=i+Math.imul(U,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,r=r+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,ht)|0)+Math.imul(D,ut)|0,o=o+Math.imul(D,ht)|0,r=r+Math.imul(I,lt)|0,i=(i=i+Math.imul(I,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(h+(r=r+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,mt)|0)+Math.imul(x,pt)|0))<<13)|0;h=((o=o+Math.imul(x,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),i=(i=Math.imul(q,st))+Math.imul(L,ot)|0,o=Math.imul(L,st),r=r+Math.imul(U,ut)|0,i=(i=i+Math.imul(U,ht)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,ht)|0,r=r+Math.imul(B,lt)|0,i=(i=i+Math.imul(B,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Ct=(h+(r=r+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(T,pt)|0))<<13)|0;h=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(q,ut),i=(i=Math.imul(q,ht))+Math.imul(L,ut)|0,o=Math.imul(L,ht),r=r+Math.imul(U,lt)|0,i=(i=i+Math.imul(U,dt)|0)+Math.imul(O,lt)|0,o=o+Math.imul(O,dt)|0;var Bt=(h+(r=r+Math.imul(B,pt)|0)|0)+((8191&(i=(i=i+Math.imul(B,mt)|0)+Math.imul(D,pt)|0))<<13)|0;h=((o=o+Math.imul(D,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,lt),i=(i=Math.imul(q,dt))+Math.imul(L,lt)|0,o=Math.imul(L,dt);var Dt=(h+(r=r+Math.imul(U,pt)|0)|0)+((8191&(i=(i=i+Math.imul(U,mt)|0)+Math.imul(O,pt)|0))<<13)|0;h=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Pt=(h+(r=Math.imul(q,pt))|0)+((8191&(i=(i=Math.imul(q,mt))+Math.imul(L,pt)|0))<<13)|0;return h=((o=Math.imul(L,mt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=gt,u[1]=vt,u[2]=bt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=St,u[8]=Et,u[9]=At,u[10]=kt,u[11]=xt,u[12]=Rt,u[13]=It,u[14]=Tt,u[15]=Ct,u[16]=Bt,u[17]=Dt,u[18]=Pt,0!==h&&(u[19]=h,n.length++),n};function v(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,u=Math.min(o,e.length-1),h=Math.max(0,o-t.length+1);h<=u;h++){var c=o-h,l=(0|t.words[c])*(0|e.words[h]),d=67108863&l;a=67108863&(d=d+a|0),i+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n._strip()}function b(t,e,n){return v(t,e,n)}function y(t,e){this.x=t,this.y=e}Math.imul||(g=m),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?g(this,t,e):n<63?m(this,t,e):n<1024?v(this,t,e):b(this,t,e)},y.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,n,t);return e},y.prototype.revBin=function(t,e,n){if(0===t||t===n-1)return t;for(var r=0,i=0;i<e;i++)r|=(1&t)<<e-i-1,t>>=1;return r},y.prototype.permute=function(t,e,n,r,i,o){for(var s=0;s<o;s++)r[s]=e[t[s]],i[s]=n[t[s]]},y.prototype.transform=function(t,e,n,r,i,o){this.permute(o,t,e,n,r,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),h=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var l=u,d=h,f=0;f<s;f++){var p=n[c+f],m=r[c+f],g=n[c+f+s],v=r[c+f+s],b=l*g-d*v;v=l*v+d*g,g=b,n[c+f]=p+g,r[c+f]=m+v,n[c+f+s]=p-g,r[c+f+s]=m-v,f!==a&&(b=u*l-h*d,d=u*d+h*l,l=b)}},y.prototype.guessLen13b=function(t,e){var n=1|Math.max(e,t),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},y.prototype.conjugate=function(t,e,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=t[r];t[r]=t[n-r-1],t[n-r-1]=i,i=e[r],e[r]=-e[n-r-1],e[n-r-1]=-i}},y.prototype.normalize13b=function(t,e){for(var n=0,r=0;r<e/2;r++){var i=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+n;t[r]=67108863&i,n=i<67108864?0:i/67108864|0}return t},y.prototype.convert13b=function(t,e,n,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],n[2*s]=8191&o,o>>>=13,n[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)n[s]=0;r(0===o),r(0==(-8192&o))},y.prototype.stub=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=0;return e},y.prototype.mulp=function(t,e,n){var r=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(r),o=this.stub(r),s=new Array(r),a=new Array(r),u=new Array(r),h=new Array(r),c=new Array(r),l=new Array(r),d=n.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,h,r),this.transform(s,o,a,u,r,i),this.transform(h,o,c,l,r,i);for(var f=0;f<r;f++){var p=a[f]*c[f]-u[f]*l[f];u[f]=a[f]*l[f]+u[f]*c[f],a[f]=p}return this.conjugate(a,u,r),this.transform(a,u,d,o,r,i),this.conjugate(d,o,r),this.normalize13b(d,r),n.negative=t.negative^e.negative,n.length=t.length+e.length,n._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),b(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),r("number"==typeof t),r(t<67108864);for(var n=0,i=0;i<this.length;i++){var o=(0|this.words[i])*t,s=(67108863&o)+(67108863&n);n>>=26,n+=o/67108864|0,n+=s>>>26,this.words[i]=67108863&s}return 0!==n&&(this.words[i]=n,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()),n=0;n<e.length;n++){var r=n/26|0,i=n%26;e[n]=t.words[r]>>>i&1}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r<e.length&&0===e[r];r++,n=n.sqr());if(++r<e.length)for(var i=n.sqr();r<e.length;r++,i=i.sqr())0!==e[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<n;this.words[e]=u|s,s=a>>>26-n}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 r(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,n){var i;r("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=n;if(i-=s,i=Math.max(0,i),u){for(var h=0;h<s;h++)u.words[h]=this.words[h];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,h=0;h<this.length;h++)this.words[h]=this.words[h+s];else this.words[0]=0,this.length=1;var c=0;for(h=this.length-1;h>=0&&(0!==c||h>=i);h--){var l=0|this.words[h];this.words[h]=c<<26-o|l>>>o,c=l&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},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){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<<e;return!(this.length<=n||!(this.words[n]&i))},o.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,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 r("number"==typeof t),r(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(r("number"==typeof t),r(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,n){var i,o,s=t.length+n;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+n])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)a=(o=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&o;if(0===a)return this._strip();for(r(-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 n=(this.length,t.length),r=this.clone(),i=t,s=0|i.words[i.length-1];0!=(n=26-this._countBits(s))&&(i=i.ushln(n),r.iushln(n),s=0|i.words[i.length-1]);var a,u=r.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h<a.length;h++)a.words[h]=0}var c=r.clone()._ishlnsubmul(i,1,u);0===c.negative&&(r=c,a&&(a.words[u]=1));for(var l=u-1;l>=0;l--){var d=67108864*(0|r.words[i.length+l])+(0|r.words[i.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(i,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,l),r.isZero()||(r.negative^=1);a&&(a.words[l]=d)}return a&&a._strip(),r._strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!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(),n&&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(),n&&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 n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);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),r(t<=67108863);for(var n=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(n*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),r(t<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/t|0,n=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=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),h=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++h;for(var c=n.clone(),l=e.clone();!e.isZero();){for(var d=0,f=1;0==(e.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(l)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(l)),a.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(a),s.isub(u)):(n.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:n.iushln(h)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var h=0,c=1;0==(e.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,d=1;0==(n.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(n.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(n)>=0?(e.isub(n),s.isub(a)):(n.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(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},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){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,s=n;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,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)e=1;else{n&&(t=-t),r(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,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){r<i?e=-1:r>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 r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(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 M(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){_.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 r(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,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},i(M,_),M.prototype.split=function(t,e){for(var n=4194303,r=Math.min(t.length,9),i=0;i<r;i++)e.words[i]=t.words[i];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&n,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&n)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},M.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n<t.length;n++){var r=0|t.words[n];e+=977*r,t.words[n]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(S,_),i(E,_),i(A,_),A.prototype.imulK=function(t){for(var e=0,n=0;n<t.length;n++){var r=19*(0|t.words[n])+e,i=67108863&r;r>>>=26,t.words[n]=i,e=r}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 M;else if("p224"===t)e=new S;else if("p192"===t)e=new E;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new A}return w[t]=e,e},k.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},k.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(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):(c(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 n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},k.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},k.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},k.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},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(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var l=this.pow(c,i),d=this.pow(t,i.addn(1).iushrn(1)),f=this.pow(t,i),p=s;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<p);var v=this.pow(l,new o(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),f=f.redMul(l),p=g}return d},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 n=new Array(16);n[0]=new o(1).toRed(this),n[1]=t;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],t);var i=n[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),r=e.length-1;r>=0;r--){for(var h=e.words[r],c=u-1;c>=0;c--){var l=h>>c&1;i!==n[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===r&&0===c)&&(i=this.mul(i,n[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 n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).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 n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).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=n.nmd(t),this)},9931:(t,e,n)=>{var r;function i(t){this.rand=t}if(t.exports=function(t){return r||(r=new i(null)),r.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),n=0;n<e.length;n++)e[n]=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=n(9214);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(t){return o.randomBytes(t)}}catch(t){}},4497:(t,e,n)=>{var r=n(9509).Buffer;function i(t){r.isBuffer(t)||(t=r.from(t));for(var e=t.length/4|0,n=new Array(e),i=0;i<e;i++)n[i]=t.readUInt32BE(4*i);return n}function o(t){for(;0<t.length;t++)t[0]=0}function s(t,e,n,r,i){for(var o,s,a,u,h=n[0],c=n[1],l=n[2],d=n[3],f=t[0]^e[0],p=t[1]^e[1],m=t[2]^e[2],g=t[3]^e[3],v=4,b=1;b<i;b++)o=h[f>>>24]^c[p>>>16&255]^l[m>>>8&255]^d[255&g]^e[v++],s=h[p>>>24]^c[m>>>16&255]^l[g>>>8&255]^d[255&f]^e[v++],a=h[m>>>24]^c[g>>>16&255]^l[f>>>8&255]^d[255&p]^e[v++],u=h[g>>>24]^c[f>>>16&255]^l[p>>>8&255]^d[255&m]^e[v++],f=o,p=s,m=a,g=u;return o=(r[f>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&g])^e[v++],s=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[g>>>8&255]<<8|r[255&f])^e[v++],a=(r[m>>>24]<<24|r[g>>>16&255]<<16|r[f>>>8&255]<<8|r[255&p])^e[v++],u=(r[g>>>24]<<24|r[f>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^e[v++],[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 n=[],r=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,u=0;u<256;++u){var h=a^a<<1^a<<2^a<<3^a<<4;h=h>>>8^255&h^99,n[s]=h,r[h]=s;var c=t[s],l=t[c],d=t[l],f=257*t[h]^16843008*h;i[0][s]=f<<24|f>>>8,i[1][s]=f<<16|f>>>16,i[2][s]=f<<8|f>>>24,i[3][s]=f,f=16843009*d^65537*l^257*c^16843008*s,o[0][h]=f<<24|f>>>8,o[1][h]=f<<16|f>>>16,o[2][h]=f<<8|f>>>24,o[3][h]=f,0===s?s=a=1:(s=c^t[t[t[d^c]]],a^=t[t[a]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:i,INV_SUB_MIX:o}}();function h(t){this._key=i(t),this._reset()}h.blockSize=16,h.keySize=32,h.prototype.blockSize=h.blockSize,h.prototype.keySize=h.keySize,h.prototype._reset=function(){for(var t=this._key,e=t.length,n=e+6,r=4*(n+1),i=[],o=0;o<e;o++)i[o]=t[o];for(o=e;o<r;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 h=[],c=0;c<r;c++){var l=r-c,d=i[l-(c%4?0:4)];h[c]=c<4||l<=4?d:u.INV_SUB_MIX[0][u.SBOX[d>>>24]]^u.INV_SUB_MIX[1][u.SBOX[d>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[d>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&d]]}this._nRounds=n,this._keySchedule=i,this._invKeySchedule=h},h.prototype.encryptBlockRaw=function(t){return s(t=i(t),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},h.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),n=r.allocUnsafe(16);return n.writeUInt32BE(e[0],0),n.writeUInt32BE(e[1],4),n.writeUInt32BE(e[2],8),n.writeUInt32BE(e[3],12),n},h.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var n=s(t,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=r.allocUnsafe(16);return o.writeUInt32BE(n[0],0),o.writeUInt32BE(n[3],4),o.writeUInt32BE(n[2],8),o.writeUInt32BE(n[1],12),o},h.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=h},2422:(t,e,n)=>{var r=n(4497),i=n(9509).Buffer,o=n(1027),s=n(5717),a=n(3288),u=n(7295),h=n(685);function c(t,e,n,s){o.call(this);var u=i.alloc(4,0);this._cipher=new r.AES(e);var c=this._cipher.encryptBlock(u);this._ghash=new a(c),n=function(t,e,n){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 r=new a(n),o=e.length,s=o%16;r.update(e),s&&(s=16-s,r.update(i.alloc(s,0))),r.update(i.alloc(8,0));var u=8*o,c=i.alloc(8);c.writeUIntBE(u,0,8),r.update(c),t._finID=r.state;var l=i.from(t._finID);return h(l),l}(this,n,c),this._prev=i.from(n),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(c,o),c.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 n=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(n),this._len+=t.length,n},c.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 n=0;t.length!==e.length&&n++;for(var r=Math.min(t.length,e.length),i=0;i<r;++i)n+=t[i]^e[i];return n}(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()},c.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},c.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},c.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=c},4696:(t,e,n)=>{var r=n(1494),i=n(6193),o=n(5415);e.createCipher=e.Cipher=r.createCipher,e.createCipheriv=e.Cipheriv=r.createCipheriv,e.createDecipher=e.Decipher=i.createDecipher,e.createDecipheriv=e.Decipheriv=i.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(o)}},6193:(t,e,n)=>{var r=n(2422),i=n(9509).Buffer,o=n(45),s=n(5969),a=n(1027),u=n(4497),h=n(3048);function c(t,e,n){a.call(this),this._cache=new l,this._last=void 0,this._cipher=new u.AES(e),this._prev=i.from(n),this._mode=t,this._autopadding=!0}function l(){this.cache=i.allocUnsafe(0)}function d(t,e,n){var a=o[t.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=i.from(n)),"GCM"!==a.mode&&n.length!==a.iv)throw new TypeError("invalid iv length "+n.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,n,!0):"auth"===a.type?new r(a.module,e,n,!0):new c(a.module,e,n)}n(5717)(c,a),c.prototype._update=function(t){var e,n;this._cache.add(t);for(var r=[];e=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,e),r.push(n);return i.concat(r)},c.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 n=-1;++n<e;)if(t[n+(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")},c.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},l.prototype.add=function(t){this.cache=i.concat([this.cache,t])},l.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},l.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var n=o[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=h(e,!1,n.key,n.iv);return d(t,r.key,r.iv)},e.createDecipheriv=d},1494:(t,e,n)=>{var r=n(45),i=n(2422),o=n(9509).Buffer,s=n(5969),a=n(1027),u=n(4497),h=n(3048);function c(t,e,n){a.call(this),this._cache=new d,this._cipher=new u.AES(e),this._prev=o.from(n),this._mode=t,this._autopadding=!0}n(5717)(c,a),c.prototype._update=function(t){var e,n;this._cache.add(t);for(var r=[];e=this._cache.get();)n=this._mode.encrypt(this,e),r.push(n);return o.concat(r)};var l=o.alloc(16,16);function d(){this.cache=o.allocUnsafe(0)}function f(t,e,n){var a=r[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 n&&(n=o.from(n)),"GCM"!==a.mode&&n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===a.type?new s(a.module,e,n):"auth"===a.type?new i(a.module,e,n):new c(a.module,e,n)}c.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(l))throw this._cipher.scrub(),new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},d.prototype.add=function(t){this.cache=o.concat([this.cache,t])},d.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},d.prototype.flush=function(){for(var t=16-this.cache.length,e=o.allocUnsafe(t),n=-1;++n<t;)e.writeUInt8(t,n);return o.concat([this.cache,e])},e.createCipheriv=f,e.createCipher=function(t,e){var n=r[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var i=h(e,!1,n.key,n.iv);return f(t,i.key,i.iv)}},3288:(t,e,n)=>{var r=n(9509).Buffer,i=r.alloc(16,0);function o(t){var e=r.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=r.alloc(16,0),this.cache=r.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,n,r=[(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]^=r[0],i[1]^=r[1],i[2]^=r[2],i[3]^=r[3]),n=0!=(1&r[3]),e=3;e>0;e--)r[e]=r[e]>>>1|(1&r[e-1])<<31;r[0]=r[0]>>>1,n&&(r[0]=r[0]^225<<24)}this.state=o(i)},s.prototype.update=function(t){var e;for(this.cache=r.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(r.concat([this.cache,i],16)),this.ghash(o([0,t,0,e])),this.state},t.exports=s},685:t=>{t.exports=function(t){for(var e,n=t.length;n--;){if(255!==(e=t.readUInt8(n))){e++,t.writeUInt8(e,n);break}t.writeUInt8(0,n)}}},5292:(t,e,n)=>{var r=n(7295);e.encrypt=function(t,e){var n=r(e,t._prev);return t._prev=t._cipher.encryptBlock(n),t._prev},e.decrypt=function(t,e){var n=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return r(i,n)}},6311:(t,e,n)=>{var r=n(9509).Buffer,i=n(7295);function o(t,e,n){var o=e.length,s=i(e,t._cache);return t._cache=t._cache.slice(o),t._prev=r.concat([t._prev,n?e:s]),s}e.encrypt=function(t,e,n){for(var i,s=r.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=r.allocUnsafe(0)),!(t._cache.length<=e.length)){s=r.concat([s,o(t,e,n)]);break}i=t._cache.length,s=r.concat([s,o(t,e.slice(0,i),n)]),e=e.slice(i)}return s}},1510:(t,e,n)=>{var r=n(9509).Buffer;function i(t,e,n){for(var r,i,s=-1,a=0;++s<8;)r=e&1<<7-s?128:0,a+=(128&(i=t._cipher.encryptBlock(t._prev)[0]^r))>>s%8,t._prev=o(t._prev,n?r:i);return a}function o(t,e){var n=t.length,i=-1,o=r.allocUnsafe(t.length);for(t=r.concat([t,r.from([e])]);++i<n;)o[i]=t[i]<<1|t[i+1]>>7;return o}e.encrypt=function(t,e,n){for(var o=e.length,s=r.allocUnsafe(o),a=-1;++a<o;)s[a]=i(t,e[a],n);return s}},1964:(t,e,n)=>{var r=n(9509).Buffer;function i(t,e,n){var i=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=r.concat([t._prev.slice(1),r.from([n?e:i])]),i}e.encrypt=function(t,e,n){for(var o=e.length,s=r.allocUnsafe(o),a=-1;++a<o;)s[a]=i(t,e[a],n);return s}},6009:(t,e,n)=>{var r=n(7295),i=n(9509).Buffer,o=n(685);function s(t){var e=t._cipher.encryptBlockRaw(t._prev);return o(t._prev),e}e.encrypt=function(t,e){var n=Math.ceil(e.length/16),o=t._cache.length;t._cache=i.concat([t._cache,i.allocUnsafe(16*n)]);for(var a=0;a<n;a++){var u=s(t),h=o+16*a;t._cache.writeUInt32BE(u[0],h+0),t._cache.writeUInt32BE(u[1],h+4),t._cache.writeUInt32BE(u[2],h+8),t._cache.writeUInt32BE(u[3],h+12)}var c=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),r(e,c)}},1084:(t,e)=>{e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},45:(t,e,n)=>{var r={ECB:n(1084),CBC:n(5292),CFB:n(6311),CFB8:n(1964),CFB1:n(1510),OFB:n(8861),CTR:n(6009),GCM:n(6009)},i=n(5415);for(var o in i)i[o].module=r[i[o].mode];t.exports=i},5415: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"}}')},8861:(t,e,n)=>{var r=n(8764).Buffer,i=n(7295);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=r.concat([t._cache,o(t)]);var n=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),i(e,n)}},5969:(t,e,n)=>{var r=n(4497),i=n(9509).Buffer,o=n(1027);function s(t,e,n,s){o.call(this),this._cipher=new r.AES(e),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._mode=t}n(5717)(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},3614:(t,e,n)=>{var r=n(7667),i=n(4696),o=n(45),s=n(9715),a=n(3048);function u(t,e,n){if(t=t.toLowerCase(),o[t])return i.createCipheriv(t,e,n);if(s[t])return new r({key:e,iv:n,mode:t});throw new TypeError("invalid suite type")}function h(t,e,n){if(t=t.toLowerCase(),o[t])return i.createDecipheriv(t,e,n);if(s[t])return new r({key:e,iv:n,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}e.createCipher=e.Cipher=function(t,e){var n,r;if(t=t.toLowerCase(),o[t])n=o[t].key,r=o[t].iv;else{if(!s[t])throw new TypeError("invalid suite type");n=8*s[t].key,r=s[t].iv}var i=a(e,!1,n,r);return u(t,i.key,i.iv)},e.createCipheriv=e.Cipheriv=u,e.createDecipher=e.Decipher=function(t,e){var n,r;if(t=t.toLowerCase(),o[t])n=o[t].key,r=o[t].iv;else{if(!s[t])throw new TypeError("invalid suite type");n=8*s[t].key,r=s[t].iv}var i=a(e,!1,n,r);return h(t,i.key,i.iv)},e.createDecipheriv=e.Decipheriv=h,e.listCiphers=e.getCiphers=function(){return Object.keys(s).concat(i.getCiphers())}},7667:(t,e,n)=>{var r=n(1027),i=n(5251),o=n(5717),s=n(9509).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){r.call(this);var e,n=t.mode.toLowerCase(),i=a[n];e=t.decrypt?"decrypt":"encrypt";var o=t.key;s.isBuffer(o)||(o=s.from(o)),"des-ede"!==n&&"des-ede-cbc"!==n||(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,r),u.prototype._update=function(t){return s.from(this._des.update(t))},u.prototype._final=function(){return s.from(this._des.final())}},9715:(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}},3663:(t,e,n)=>{var r=n(8764).Buffer,i=n(3550),o=n(1798);function s(t){var e,n=t.modulus.byteLength();do{e=new i(o(n))}while(e.cmp(t.modulus)>=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function a(t,e){var n=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(n.blinder).umod(e.modulus),u=a.toRed(i.mont(e.prime1)),h=a.toRed(i.mont(e.prime2)),c=e.coefficient,l=e.prime1,d=e.prime2,f=u.redPow(e.exponent1).fromRed(),p=h.redPow(e.exponent2).fromRed(),m=f.isub(p).imul(c).umod(l).imul(d);return p.iadd(m).imul(n.unblinder).umod(e.modulus).toArrayLike(r,"be",o)}a.getr=s,t.exports=a},6042:(t,e,n)=>{t.exports=n(2063)},2063: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"}}')},2236: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"}')},4743:(t,e,n)=>{var r=n(5679).Buffer,i=n(3482),o=n(8473),s=n(5717),a=n(2957),u=n(7753),h=n(2063);function c(t){o.Writable.call(this);var e=h[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 l(t){o.Writable.call(this);var e=h[t];if(!e)throw new Error("Unknown message digest");this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function d(t){return new c(t)}function f(t){return new l(t)}Object.keys(h).forEach((function(t){h[t].id=r.from(h[t].id,"hex"),h[t.toLowerCase()]=h[t]})),s(c,o.Writable),c.prototype._write=function(t,e,n){this._hash.update(t),n()},c.prototype.update=function(t,e){return"string"==typeof t&&(t=r.from(t,e)),this._hash.update(t),this},c.prototype.sign=function(t,e){this.end();var n=this._hash.digest(),r=a(n,t,this._hashType,this._signType,this._tag);return e?r.toString(e):r},s(l,o.Writable),l.prototype._write=function(t,e,n){this._hash.update(t),n()},l.prototype.update=function(t,e){return"string"==typeof t&&(t=r.from(t,e)),this._hash.update(t),this},l.prototype.verify=function(t,e,n){"string"==typeof e&&(e=r.from(e,n)),this.end();var i=this._hash.digest();return u(e,i,t,this._signType,this._tag)},t.exports={Sign:d,Verify:f,createSign:d,createVerify:f}},2957:(t,e,n)=>{var r=n(5679).Buffer,i=n(8355),o=n(3663),s=n(6266).ec,a=n(3550),u=n(980),h=n(2236);function c(t,e,n,o){if((t=r.from(t.toArray())).length<e.byteLength()){var s=r.alloc(e.byteLength()-t.length);t=r.concat([s,t])}var a=n.length,u=function(t,e){t=(t=l(t,e)).mod(e);var n=r.from(t.toArray());if(n.length<e.byteLength()){var i=r.alloc(e.byteLength()-n.length);n=r.concat([i,n])}return n}(n,e),h=r.alloc(a);h.fill(1);var c=r.alloc(a);return c=i(o,c).update(h).update(r.from([0])).update(t).update(u).digest(),h=i(o,c).update(h).digest(),{k:c=i(o,c).update(h).update(r.from([1])).update(t).update(u).digest(),v:h=i(o,c).update(h).digest()}}function l(t,e){var n=new a(t),r=(t.length<<3)-e.bitLength();return r>0&&n.ishrn(r),n}function d(t,e,n){var o,s;do{for(o=r.alloc(0);8*o.length<t.bitLength();)e.v=i(n,e.k).update(e.v).digest(),o=r.concat([o,e.v]);s=l(o,t),e.k=i(n,e.k).update(e.v).update(r.from([0])).digest(),e.v=i(n,e.k).update(e.v).digest()}while(-1!==s.cmp(t));return s}function f(t,e,n,r){return t.toRed(a.mont(n)).redPow(e).fromRed().mod(r)}t.exports=function(t,e,n,i,p){var m=u(e);if(m.curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");return function(t,e){var n=h[e.curve.join(".")];if(!n)throw new Error("unknown curve "+e.curve.join("."));var i=new s(n).keyFromPrivate(e.privateKey).sign(t);return r.from(i.toDER())}(t,m)}if("dsa"===m.type){if("dsa"!==i)throw new Error("wrong private key type");return function(t,e,n){for(var i,o=e.params.priv_key,s=e.params.p,u=e.params.q,h=e.params.g,p=new a(0),m=l(t,u).mod(u),g=!1,v=c(o,u,t,n);!1===g;)p=f(h,i=d(u,v,n),s,u),0===(g=i.invm(u).imul(m.add(o.mul(p))).mod(u)).cmpn(0)&&(g=!1,p=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 n=[48,t.length+e.length+4,2,t.length];return n=n.concat(t,[2,e.length],e),r.from(n)}(p,g)}(t,m,n)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");t=r.concat([p,t]);for(var g=m.modulus.byteLength(),v=[0,1];t.length+v.length+1<g;)v.push(255);v.push(0);for(var b=-1;++b<t.length;)v.push(t[b]);return o(v,m)},t.exports.getKey=c,t.exports.makeKey=d},7753:(t,e,n)=>{var r=n(5679).Buffer,i=n(3550),o=n(6266).ec,s=n(980),a=n(2236);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,n,h,c){var l=s(n);if("ec"===l.type){if("ecdsa"!==h&&"ecdsa/rsa"!==h)throw new Error("wrong public key type");return function(t,e,n){var r=a[n.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var i=new o(r),s=n.data.subjectPrivateKey.data;return i.verify(e,t,s)}(t,e,l)}if("dsa"===l.type){if("dsa"!==h)throw new Error("wrong public key type");return function(t,e,n){var r=n.data.p,o=n.data.q,a=n.data.g,h=n.data.pub_key,c=s.signature.decode(t,"der"),l=c.s,d=c.r;u(l,o),u(d,o);var f=i.mont(r),p=l.invm(o);return 0===a.toRed(f).redPow(new i(e).mul(p).mod(o)).fromRed().mul(h.toRed(f).redPow(d.mul(p).mod(o)).fromRed()).mod(r).mod(o).cmp(d)}(t,e,l)}if("rsa"!==h&&"ecdsa/rsa"!==h)throw new Error("wrong public key type");e=r.concat([c,e]);for(var d=l.modulus.byteLength(),f=[1],p=0;e.length+f.length+2<d;)f.push(255),p++;f.push(0);for(var m=-1;++m<e.length;)f.push(e[m]);f=r.from(f);var g=i.mont(l.modulus);t=(t=new i(t).toRed(g)).redPow(new i(l.publicExponent)),t=r.from(t.fromRed().toArray());var v=p<8?1:0;for(d=Math.min(t.length,f.length),t.length!==f.length&&(v=1),m=-1;++m<d;)v|=t[m]^f[m];return 0===v}},5679:(t,e,n)=>{var r=n(8764),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function s(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},s.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},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 r.SlowBuffer(t)}},7295:(t,e,n)=>{var r=n(8764).Buffer;t.exports=function(t,e){for(var n=Math.min(t.length,e.length),i=new r(n),o=0;o<n;++o)i[o]=t[o]^e[o];return i}},8764:(t,e,n)=>{"use strict";const r=n(9742),i=n(645),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;const s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return h(t,e,n)}function h(t,e,n){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=0|m(t,e);let r=a(n);const i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(G(t,Uint8Array)){const e=new Uint8Array(t);return f(e.buffer,e.byteOffset,e.byteLength)}return d(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(G(t,ArrayBuffer)||t&&G(t.buffer,ArrayBuffer))return f(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(G(t,SharedArrayBuffer)||t&&G(t.buffer,SharedArrayBuffer)))return f(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return u.from(r,e,n);const i=function(t){if(u.isBuffer(t)){const e=0|p(t.length),n=a(e);return 0===n.length||t.copy(n,0,0,e),n}return void 0!==t.length?"number"!=typeof t.length||Z(t.length)?a(0):d(t):"Buffer"===t.type&&Array.isArray(t.data)?d(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,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function c(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 l(t){return c(t),a(t<0?0:0|p(t))}function d(t){const e=t.length<0?0:0|p(t.length),n=a(e);for(let r=0;r<e;r+=1)n[r]=255&t[r];return n}function f(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n),Object.setPrototypeOf(r,u.prototype),r}function p(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function m(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||G(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);const n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(t).length;default:if(i)return r?-1:V(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,n){let r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,n);case"utf8":case"utf-8":return k(this,e,n);case"ascii":return R(this,e,n);case"latin1":case"binary":return I(this,e,n);case"base64":return A(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function v(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function b(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Z(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:y(t,e,n,r,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):y(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,n,r,i){let o,s=1,a=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}function h(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let r=-1;for(o=n;o<a;o++)if(h(t,o)===h(e,-1===r?0:o-r)){if(-1===r&&(r=o),o-r+1===u)return r*s}else-1!==r&&(o-=o-r),r=-1}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){let n=!0;for(let r=0;r<u;r++)if(h(t,o+r)!==h(e,r)){n=!1;break}if(n)return o}return-1}function w(t,e,n,r){n=Number(n)||0;const i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;const o=e.length;let s;for(r>o/2&&(r=o/2),s=0;s<r;++s){const r=parseInt(e.substr(2*s,2),16);if(Z(r))return s;t[n+s]=r}return s}function _(t,e,n,r){return J(V(e,t.length-n),t,n,r)}function M(t,e,n,r){return J(function(t){const e=[];for(let n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function S(t,e,n,r){return J(F(e),t,n,r)}function E(t,e,n,r){return J(function(t,e){let n,r,i;const o=[];for(let s=0;s<t.length&&!((e-=2)<0);++s)n=t.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function A(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function k(t,e,n){n=Math.min(t.length,n);const r=[];let i=e;for(;i<n;){const e=t[i];let o=null,s=e>239?4:e>223?3:e>191?2:1;if(i+s<=n){let n,r,a,u;switch(s){case 1:e<128&&(o=e);break;case 2:n=t[i+1],128==(192&n)&&(u=(31&e)<<6|63&n,u>127&&(o=u));break;case 3:n=t[i+1],r=t[i+2],128==(192&n)&&128==(192&r)&&(u=(15&e)<<12|(63&n)<<6|63&r,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:n=t[i+1],r=t[i+2],a=t[i+3],128==(192&n)&&128==(192&r)&&128==(192&a)&&(u=(15&e)<<18|(63&n)<<12|(63&r)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=s}return function(t){const e=t.length;if(e<=x)return String.fromCharCode.apply(String,t);let n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=x));return n}(r)}e.kMaxLength=s,u.TYPED_ARRAY_SUPPORT=function(){try{const 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,n){return h(t,e,n)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,n){return function(t,e,n){return c(t),t<=0?a(t):void 0!==e?"string"==typeof n?a(t).fill(e,n):a(t).fill(e):a(t)}(t,e,n)},u.allocUnsafe=function(t){return l(t)},u.allocUnsafeSlow=function(t){return l(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(G(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),G(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;let n=t.length,r=e.length;for(let i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?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);let n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;const r=u.allocUnsafe(e);let i=0;for(n=0;n<t.length;++n){let e=t[n];if(G(e,Uint8Array))i+e.length>r.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(r,i)):Uint8Array.prototype.set.call(r,e,i);else{if(!u.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(r,i)}i+=e.length}return r},u.byteLength=m,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)v(this,e,e+1);return this},u.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},u.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)v(this,e,e+7),v(this,e+1,e+6),v(this,e+2,e+5),v(this,e+3,e+4);return this},u.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?k(this,0,t):g.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(){let t="";const n=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(t,e,n,r,i){if(G(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===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;let o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(e>>>=0);const a=Math.min(o,s),h=this.slice(r,i),c=t.slice(e,n);for(let t=0;t<a;++t)if(h[t]!==c[t]){o=h[t],s=c[t];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return b(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return b(this,t,e,n,!1)},u.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return w(this,t,e,n);case"utf8":case"utf-8":return _(this,t,e,n);case"ascii":case"latin1":case"binary":return M(this,t,e,n);case"base64":return S(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const x=4096;function R(t,e,n){let r="";n=Math.min(t.length,n);for(let i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function I(t,e,n){let r="";n=Math.min(t.length,n);for(let i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function T(t,e,n){const r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=e;r<n;++r)i+=Y[t[r]];return i}function C(t,e,n){const r=t.slice(e,n);let i="";for(let t=0;t<r.length-1;t+=2)i+=String.fromCharCode(r[t]+256*r[t+1]);return i}function B(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function D(t,e,n,r,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(n+r>t.length)throw new RangeError("Index out of range")}function P(t,e,n,r,i){$(e,r,i,t,n,7);let o=Number(e&BigInt(4294967295));t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=s,s>>=8,t[n++]=s,s>>=8,t[n++]=s,s>>=8,t[n++]=s,n}function U(t,e,n,r,i){$(e,r,i,t,n,7);let o=Number(e&BigInt(4294967295));t[n+7]=o,o>>=8,t[n+6]=o,o>>=8,t[n+5]=o,o>>=8,t[n+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=s,s>>=8,t[n+2]=s,s>>=8,t[n+1]=s,s>>=8,t[n]=s,n+8}function O(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(t,e,n,r,o){return e=+e,n>>>=0,o||O(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function q(t,e,n,r,o){return e=+e,n>>>=0,o||O(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){const n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);const r=this.subarray(t,e);return Object.setPrototypeOf(r,u.prototype),r},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||B(t,e,this.length);let r=this[t],i=1,o=0;for(;++o<e&&(i*=256);)r+=this[t+o]*i;return r},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||B(t,e,this.length);let r=this[t+--e],i=1;for(;e>0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||B(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||B(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||B(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||B(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||B(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=X((function(t){z(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const r=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))})),u.prototype.readBigUInt64BE=X((function(t){z(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const r=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||B(t,e,this.length);let r=this[t],i=1,o=0;for(;++o<e&&(i*=256);)r+=this[t+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||B(t,e,this.length);let r=e,i=1,o=this[t+--r];for(;r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return t>>>=0,e||B(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||B(t,2,this.length);const n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){t>>>=0,e||B(t,2,this.length);const n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||B(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||B(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=X((function(t){z(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const r=this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),u.prototype.readBigInt64BE=X((function(t){z(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||H(t,this.length-8);const r=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(r)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+n)})),u.prototype.readFloatLE=function(t,e){return t>>>=0,e||B(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||B(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||B(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||B(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||D(this,t,e,n,Math.pow(2,8*n)-1,0);let i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||D(this,t,e,n,Math.pow(2,8*n)-1,0);let i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||D(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,n){return t=+t,e>>>=0,n||D(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,n){return t=+t,e>>>=0,n||D(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,n){return t=+t,e>>>=0,n||D(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.writeBigUInt64LE=X((function(t,e=0){return P(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=X((function(t,e=0){return U(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);D(this,t,e,n,r-1,-r)}let i=0,o=1,s=0;for(this[e]=255&t;++i<n&&(o*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);D(this,t,e,n,r-1,-r)}let i=n-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||D(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,n){return t=+t,e>>>=0,n||D(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.writeBigInt64LE=X((function(t,e=0){return P(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=X((function(t,e=0){return U(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(t,e,n){return N(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return N(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return q(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return q(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);const i=r-n;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,n,r):Uint8Array.prototype.set.call(t,this.subarray(n,r),e),i},u.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===t.length){const e=t.charCodeAt(0);("utf8"===r&&e<128||"latin1"===r)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;let i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{const o=u.isBuffer(t)?t:u.from(t,r),s=o.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<n-e;++i)this[i+e]=o[i%s]}return this};const L={};function j(t,e,n){L[t]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function K(t){let e="",n=t.length;const r="-"===t[0]?1:0;for(;n>=r+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function $(t,e,n,r,i,o){if(t>n||t<e){const r="bigint"==typeof e?"n":"";let i;throw i=o>3?0===e||e===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${e}${r} and <= ${n}${r}`,new L.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,n){z(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||H(e,t.length-(n+1))}(r,i,o)}function z(t,e){if("number"!=typeof t)throw new L.ERR_INVALID_ARG_TYPE(e,"number",t)}function H(t,e,n){if(Math.floor(t)!==t)throw z(t,n),new L.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new L.ERR_BUFFER_OUT_OF_BOUNDS;throw new L.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${e}`,t)}j("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),j("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),j("ERR_OUT_OF_RANGE",(function(t,e,n){let r=`The value of "${t}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=K(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=K(i)),i+="n"),r+=` It must be ${e}. Received ${i}`,r}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function V(t,e){let n;e=e||1/0;const r=t.length;let i=null;const o=[];for(let s=0;s<r;++s){if(n=t.charCodeAt(s),n>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function F(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function J(t,e,n,r){let i;for(i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function G(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Z(t){return t!=t}const Y=function(){const t="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)e[r+i]=t[n]+t[i]}return e}();function X(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},1027:(t,e,n)=>{var r=n(9509).Buffer,i=n(2830).Transform,o=n(2553).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}n(5717)(s,i),s.prototype.update=function(t,e,n){"string"==typeof t&&(t=r.from(t,e));var i=this._update(t);return this.hashMode?this:(n&&(i=this._toString(i,n)),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,n){var r;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){r=t}finally{n(r)}},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()||r.alloc(0);return t&&(e=this._toString(e,t,!0)),e},s.prototype._toString=function(t,e,n){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var r=this._decoder.write(t);return n&&(r+=this._decoder.end()),r},t.exports=s},6393:(t,e,n)=>{var r=n(8764).Buffer,i=n(6266),o=n(6426);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,n){Array.isArray(t)||(t=t.toArray());var i=new r(t);if(n&&i.length<n){var o=new r(n-i.length);o.fill(0),i=r.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,n){return e=e||"utf8",r.isBuffer(t)||(t=new r(t,e)),u(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),n,this.curveType.byteLength)},a.prototype.getPublicKey=function(t,e){var n=this.keys.getPublic("compressed"===e,!0);return"hybrid"===e&&(n[n.length-1]%2?n[0]=7:n[0]=6),u(n,t)},a.prototype.getPrivateKey=function(t){return u(this.keys.getPrivate(),t)},a.prototype.setPublicKey=function(t,e){return e=e||"utf8",r.isBuffer(t)||(t=new r(t,e)),this.keys._importPublic(t),this},a.prototype.setPrivateKey=function(t,e){e=e||"utf8",r.isBuffer(t)||(t=new r(t,e));var n=new o(t);return n=n.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(n),this}},6426:function(t,e,n){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"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:n(8623).Buffer}catch(t){}function a(t,e){var n=t.charCodeAt(e);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function u(t,e,n){var r=a(t,n);return n-1>=e&&(r|=a(t,n-1)<<4),r}function h(t,e,n,r){for(var i=0,o=Math.min(t.length,n),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=r,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,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(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,n):(this._parseBase(t,e,i),"le"===n&&this._initArray(this.toArray(),e,n)))},o.prototype._initNumber=function(t,e,n){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):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initArray=function(t,e,n){if(r("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"===n)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"===n)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,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,s=0;if("be"===n)for(r=t.length-1;r>=e;r-=2)i=u(t,e,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)i=u(t,e,r)<<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,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,s=o%r,a=Math.min(o,o-s)+n,u=0,c=n;c<a;c+=r)u=h(t,c,c+r,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=h(t,c,t.length,e),c=0;c<s;c++)l*=e;this.imuln(l),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 c=["","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"],l=[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 f(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var h=1;h<r;h++){for(var c=u>>>26,l=67108863&u,d=Math.min(h,e.length-1),f=Math.max(0,h-t.length+1);f<=d;f++){var p=h-f|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[f])+l)/67108864|0,l=67108863&s}n.words[h]=0|l,u=0|c}return 0!==u?n.words[h]=0|u:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);n=0!=(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var h=l[t],f=d[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(t);n=(p=p.idivn(f)).isZero()?m+n:c[h-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!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&&r(!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 r(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,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,h=new t(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[a]=s;for(;a<o;a++)h[a]=0}else{for(a=0;a<o-i;a++)h[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[o-a-1]=s}return h},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},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 n=this._zeroBits(this.words[e]);if(t+=n,26!==n)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 r(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 n=0;n<e.length;n++)this.words[n]=this.words[n]&t.words[n];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return r(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,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;r<n.length;r++)this.words[r]=e.words[r]^n.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return r(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){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,n,r;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?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o<r.length;o++)e=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<n.length;o++)e=(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.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 n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(e=(0|n.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<n.length;s++)o=(e=(0|n.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,n){var r,i,o,s=t.words,a=e.words,u=n.words,h=0,c=0|s[0],l=8191&c,d=c>>>13,f=0|s[1],p=8191&f,m=f>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,_=y>>>13,M=0|s[4],S=8191&M,E=M>>>13,A=0|s[5],k=8191&A,x=A>>>13,R=0|s[6],I=8191&R,T=R>>>13,C=0|s[7],B=8191&C,D=C>>>13,P=0|s[8],U=8191&P,O=P>>>13,N=0|s[9],q=8191&N,L=N>>>13,j=0|a[0],K=8191&j,$=j>>>13,z=0|a[1],H=8191&z,W=z>>>13,V=0|a[2],F=8191&V,J=V>>>13,G=0|a[3],Z=8191&G,Y=G>>>13,X=0|a[4],Q=8191&X,tt=X>>>13,et=0|a[5],nt=8191&et,rt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ht=at>>>13,ct=0|a[8],lt=8191&ct,dt=ct>>>13,ft=0|a[9],pt=8191&ft,mt=ft>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(h+(r=Math.imul(l,K))|0)+((8191&(i=(i=Math.imul(l,$))+Math.imul(d,K)|0))<<13)|0;h=((o=Math.imul(d,$))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,K),i=(i=Math.imul(p,$))+Math.imul(m,K)|0,o=Math.imul(m,$);var vt=(h+(r=r+Math.imul(l,H)|0)|0)+((8191&(i=(i=i+Math.imul(l,W)|0)+Math.imul(d,H)|0))<<13)|0;h=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,K),i=(i=Math.imul(v,$))+Math.imul(b,K)|0,o=Math.imul(b,$),r=r+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var bt=(h+(r=r+Math.imul(l,F)|0)|0)+((8191&(i=(i=i+Math.imul(l,J)|0)+Math.imul(d,F)|0))<<13)|0;h=((o=o+Math.imul(d,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,K),i=(i=Math.imul(w,$))+Math.imul(_,K)|0,o=Math.imul(_,$),r=r+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,W)|0,r=r+Math.imul(p,F)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,F)|0,o=o+Math.imul(m,J)|0;var yt=(h+(r=r+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(d,Z)|0))<<13)|0;h=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,K),i=(i=Math.imul(S,$))+Math.imul(E,K)|0,o=Math.imul(E,$),r=r+Math.imul(w,H)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,r=r+Math.imul(v,F)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(b,F)|0,o=o+Math.imul(b,J)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,Y)|0;var wt=(h+(r=r+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(d,Q)|0))<<13)|0;h=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,K),i=(i=Math.imul(k,$))+Math.imul(x,K)|0,o=Math.imul(x,$),r=r+Math.imul(S,H)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(E,H)|0,o=o+Math.imul(E,W)|0,r=r+Math.imul(w,F)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,F)|0,o=o+Math.imul(_,J)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,Y)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var _t=(h+(r=r+Math.imul(l,nt)|0)|0)+((8191&(i=(i=i+Math.imul(l,rt)|0)+Math.imul(d,nt)|0))<<13)|0;h=((o=o+Math.imul(d,rt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(I,K),i=(i=Math.imul(I,$))+Math.imul(T,K)|0,o=Math.imul(T,$),r=r+Math.imul(k,H)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,W)|0,r=r+Math.imul(S,F)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(E,F)|0,o=o+Math.imul(E,J)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,Y)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var Mt=(h+(r=r+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;h=((o=o+Math.imul(d,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(B,K),i=(i=Math.imul(B,$))+Math.imul(D,K)|0,o=Math.imul(D,$),r=r+Math.imul(I,H)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,W)|0,r=r+Math.imul(k,F)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(x,F)|0,o=o+Math.imul(x,J)|0,r=r+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(E,Z)|0,o=o+Math.imul(E,Y)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(v,nt)|0,i=(i=i+Math.imul(v,rt)|0)+Math.imul(b,nt)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(h+(r=r+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(d,ut)|0))<<13)|0;h=((o=o+Math.imul(d,ht)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(U,K),i=(i=Math.imul(U,$))+Math.imul(O,K)|0,o=Math.imul(O,$),r=r+Math.imul(B,H)|0,i=(i=i+Math.imul(B,W)|0)+Math.imul(D,H)|0,o=o+Math.imul(D,W)|0,r=r+Math.imul(I,F)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(T,F)|0,o=o+Math.imul(T,J)|0,r=r+Math.imul(k,Z)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(w,nt)|0,i=(i=i+Math.imul(w,rt)|0)+Math.imul(_,nt)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var Et=(h+(r=r+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;h=((o=o+Math.imul(d,dt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,K),i=(i=Math.imul(q,$))+Math.imul(L,K)|0,o=Math.imul(L,$),r=r+Math.imul(U,H)|0,i=(i=i+Math.imul(U,W)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,W)|0,r=r+Math.imul(B,F)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(D,F)|0,o=o+Math.imul(D,J)|0,r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,Y)|0,r=r+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,r=r+Math.imul(S,nt)|0,i=(i=i+Math.imul(S,rt)|0)+Math.imul(E,nt)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,r=r+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ht)|0,r=r+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var At=(h+(r=r+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;h=((o=o+Math.imul(d,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,H),i=(i=Math.imul(q,W))+Math.imul(L,H)|0,o=Math.imul(L,W),r=r+Math.imul(U,F)|0,i=(i=i+Math.imul(U,J)|0)+Math.imul(O,F)|0,o=o+Math.imul(O,J)|0,r=r+Math.imul(B,Z)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,Y)|0,r=r+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,nt)|0,i=(i=i+Math.imul(k,rt)|0)+Math.imul(x,nt)|0,o=o+Math.imul(x,rt)|0,r=r+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ht)|0,r=r+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(h+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,F),i=(i=Math.imul(q,J))+Math.imul(L,F)|0,o=Math.imul(L,J),r=r+Math.imul(U,Z)|0,i=(i=i+Math.imul(U,Y)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Y)|0,r=r+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(I,nt)|0,i=(i=i+Math.imul(I,rt)|0)+Math.imul(T,nt)|0,o=o+Math.imul(T,rt)|0,r=r+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,r=r+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,ht)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ht)|0,r=r+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,dt)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,dt)|0;var xt=(h+(r=r+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;h=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(q,Z),i=(i=Math.imul(q,Y))+Math.imul(L,Z)|0,o=Math.imul(L,Y),r=r+Math.imul(U,Q)|0,i=(i=i+Math.imul(U,tt)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,r=r+Math.imul(B,nt)|0,i=(i=i+Math.imul(B,rt)|0)+Math.imul(D,nt)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ht)|0,r=r+Math.imul(S,lt)|0,i=(i=i+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var Rt=(h+(r=r+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;h=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,Q),i=(i=Math.imul(q,tt))+Math.imul(L,Q)|0,o=Math.imul(L,tt),r=r+Math.imul(U,nt)|0,i=(i=i+Math.imul(U,rt)|0)+Math.imul(O,nt)|0,o=o+Math.imul(O,rt)|0,r=r+Math.imul(B,ot)|0,i=(i=i+Math.imul(B,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ht)|0,r=r+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,dt)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,dt)|0;var It=(h+(r=r+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;h=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,nt),i=(i=Math.imul(q,rt))+Math.imul(L,nt)|0,o=Math.imul(L,rt),r=r+Math.imul(U,ot)|0,i=(i=i+Math.imul(U,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,r=r+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,ht)|0)+Math.imul(D,ut)|0,o=o+Math.imul(D,ht)|0,r=r+Math.imul(I,lt)|0,i=(i=i+Math.imul(I,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(h+(r=r+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,mt)|0)+Math.imul(x,pt)|0))<<13)|0;h=((o=o+Math.imul(x,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),i=(i=Math.imul(q,st))+Math.imul(L,ot)|0,o=Math.imul(L,st),r=r+Math.imul(U,ut)|0,i=(i=i+Math.imul(U,ht)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,ht)|0,r=r+Math.imul(B,lt)|0,i=(i=i+Math.imul(B,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Ct=(h+(r=r+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(T,pt)|0))<<13)|0;h=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(q,ut),i=(i=Math.imul(q,ht))+Math.imul(L,ut)|0,o=Math.imul(L,ht),r=r+Math.imul(U,lt)|0,i=(i=i+Math.imul(U,dt)|0)+Math.imul(O,lt)|0,o=o+Math.imul(O,dt)|0;var Bt=(h+(r=r+Math.imul(B,pt)|0)|0)+((8191&(i=(i=i+Math.imul(B,mt)|0)+Math.imul(D,pt)|0))<<13)|0;h=((o=o+Math.imul(D,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,lt),i=(i=Math.imul(q,dt))+Math.imul(L,lt)|0,o=Math.imul(L,dt);var Dt=(h+(r=r+Math.imul(U,pt)|0)|0)+((8191&(i=(i=i+Math.imul(U,mt)|0)+Math.imul(O,pt)|0))<<13)|0;h=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Pt=(h+(r=Math.imul(q,pt))|0)+((8191&(i=(i=Math.imul(q,mt))+Math.imul(L,pt)|0))<<13)|0;return h=((o=Math.imul(L,mt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=gt,u[1]=vt,u[2]=bt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=St,u[8]=Et,u[9]=At,u[10]=kt,u[11]=xt,u[12]=Rt,u[13]=It,u[14]=Tt,u[15]=Ct,u[16]=Bt,u[17]=Dt,u[18]=Pt,0!==h&&(u[19]=h,n.length++),n};function m(t,e,n){return(new g).mulp(t,e,n)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=f),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):n<63?f(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,u=Math.min(o,e.length-1),h=Math.max(0,o-t.length+1);h<=u;h++){var c=o-h,l=(0|t.words[c])*(0|e.words[h]),d=67108863&l;a=67108863&(d=d+a|0),i+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):m(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,n,t);return e},g.prototype.revBin=function(t,e,n){if(0===t||t===n-1)return t;for(var r=0,i=0;i<e;i++)r|=(1&t)<<e-i-1,t>>=1;return r},g.prototype.permute=function(t,e,n,r,i,o){for(var s=0;s<o;s++)r[s]=e[t[s]],i[s]=n[t[s]]},g.prototype.transform=function(t,e,n,r,i,o){this.permute(o,t,e,n,r,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),h=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var l=u,d=h,f=0;f<s;f++){var p=n[c+f],m=r[c+f],g=n[c+f+s],v=r[c+f+s],b=l*g-d*v;v=l*v+d*g,g=b,n[c+f]=p+g,r[c+f]=m+v,n[c+f+s]=p-g,r[c+f+s]=m-v,f!==a&&(b=u*l-h*d,d=u*d+h*l,l=b)}},g.prototype.guessLen13b=function(t,e){var n=1|Math.max(e,t),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},g.prototype.conjugate=function(t,e,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=t[r];t[r]=t[n-r-1],t[n-r-1]=i,i=e[r],e[r]=-e[n-r-1],e[n-r-1]=-i}},g.prototype.normalize13b=function(t,e){for(var n=0,r=0;r<e/2;r++){var i=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+n;t[r]=67108863&i,n=i<67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,n,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],n[2*s]=8191&o,o>>>=13,n[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)n[s]=0;r(0===o),r(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=0;return e},g.prototype.mulp=function(t,e,n){var r=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(r),o=this.stub(r),s=new Array(r),a=new Array(r),u=new Array(r),h=new Array(r),c=new Array(r),l=new Array(r),d=n.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,h,r),this.transform(s,o,a,u,r,i),this.transform(h,o,c,l,r,i);for(var f=0;f<r;f++){var p=a[f]*c[f]-u[f]*l[f];u[f]=a[f]*l[f]+u[f]*c[f],a[f]=p}return this.conjugate(a,u,r),this.transform(a,u,d,o,r,i),this.conjugate(d,o,r),this.normalize13b(d,r),n.negative=t.negative^e.negative,n.length=t.length+e.length,n.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){r("number"==typeof t),r(t<67108864);for(var e=0,n=0;n<this.length;n++){var i=(0|this.words[n])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=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()),n=0;n<e.length;n++){var r=n/26|0,i=n%26;e[n]=(t.words[r]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r<e.length&&0===e[r];r++,n=n.sqr());if(++r<e.length)for(var i=n.sqr();r<e.length;r++,i=i.sqr())0!==e[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<n;this.words[e]=u|s,s=a>>>26-n}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 r(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,n){var i;r("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=n;if(i-=s,i=Math.max(0,i),u){for(var h=0;h<s;h++)u.words[h]=this.words[h];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,h=0;h<this.length;h++)this.words[h]=this.words[h+s];else this.words[0]=0,this.length=1;var c=0;for(h=this.length-1;h>=0&&(0!==c||h>=i);h--){var l=0|this.words[h];this.words[h]=c<<26-o|l>>>o,c=l&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},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){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<<e;return!(this.length<=n||!(this.words[n]&i))},o.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,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 r("number"==typeof t),r(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(r("number"==typeof t),r(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,n){var i,o,s=t.length+n;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+n])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)a=(o=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&o;if(0===a)return this.strip();for(r(-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 n=(this.length,t.length),r=this.clone(),i=t,s=0|i.words[i.length-1];0!=(n=26-this._countBits(s))&&(i=i.ushln(n),r.iushln(n),s=0|i.words[i.length-1]);var a,u=r.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h<a.length;h++)a.words[h]=0}var c=r.clone()._ishlnsubmul(i,1,u);0===c.negative&&(r=c,a&&(a.words[u]=1));for(var l=u-1;l>=0;l--){var d=67108864*(0|r.words[i.length+l])+(0|r.words[i.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(i,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,l),r.isZero()||(r.negative^=1);a&&(a.words[l]=d)}return a&&a.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!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(),n&&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(),n&&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 n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);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){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=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),h=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++h;for(var c=n.clone(),l=e.clone();!e.isZero();){for(var d=0,f=1;0==(e.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(l)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(l)),a.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(a),s.isub(u)):(n.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:n.iushln(h)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var h=0,c=1;0==(e.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,d=1;0==(n.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(n.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(n)>=0?(e.isub(n),s.isub(a)):(n.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(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},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){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,s=n;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,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(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,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){r<i?e=-1:r>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 S(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function b(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 y(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){S.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)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(y,b),y.prototype.split=function(t,e){for(var n=4194303,r=Math.min(t.length,9),i=0;i<r;i++)e.words[i]=t.words[i];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&n,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&n)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n<t.length;n++){var r=0|t.words[n];e+=977*r,t.words[n]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(w,b),i(_,b),i(M,b),M.prototype.imulK=function(t){for(var e=0,n=0;n<t.length;n++){var r=19*(0|t.words[n])+e,i=67108863&r;r>>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new y;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 M}return v[t]=e,e},S.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var l=this.pow(c,i),d=this.pow(t,i.addn(1).iushrn(1)),f=this.pow(t,i),p=s;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<p);var v=this.pow(l,new o(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),f=f.redMul(l),p=g}return d},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=t;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],t);var i=n[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),r=e.length-1;r>=0;r--){for(var h=e.words[r],c=u-1;c>=0;c--){var l=h>>c&1;i!==n[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===r&&0===c)&&(i=this.mul(i,n[s]),a=0,s=0)):a=0}u=26}return i},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new E(t)},i(E,S),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).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)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).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)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=n.nmd(t),this)},3482:(t,e,n)=>{"use strict";var r=n(5717),i=n(2318),o=n(9785),s=n(9072),a=n(1027);function u(t){a.call(this,"digest"),this._hash=t}r(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))}},8028:(t,e,n)=>{var r=n(2318);t.exports=function(t){return(new r).update(t).digest()}},8355:(t,e,n)=>{"use strict";var r=n(5717),i=n(1031),o=n(1027),s=n(9509).Buffer,a=n(8028),u=n(9785),h=n(9072),c=s.alloc(128);function l(t,e){o.call(this,"digest"),"string"==typeof e&&(e=s.from(e));var n="sha512"===t||"sha384"===t?128:64;this._alg=t,this._key=e,e.length>n?e=("rmd160"===t?new u:h(t)).update(e).digest():e.length<n&&(e=s.concat([e,c],n));for(var r=this._ipad=s.allocUnsafe(n),i=this._opad=s.allocUnsafe(n),a=0;a<n;a++)r[a]=54^e[a],i[a]=92^e[a];this._hash="rmd160"===t?new u:h(t),this._hash.update(r)}r(l,o),l.prototype._update=function(t){this._hash.update(t)},l.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new u:h(this._alg)).update(this._opad).update(t).digest()},t.exports=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new l("rmd160",e):"md5"===t?new i(a,e):new l(t,e)}},1031:(t,e,n)=>{"use strict";var r=n(5717),i=n(9509).Buffer,o=n(1027),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 n=this._ipad=i.allocUnsafe(a),r=this._opad=i.allocUnsafe(a),u=0;u<a;u++)n[u]=54^e[u],r[u]=92^e[u];this._hash=[n]}r(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},5835:(t,e,n)=>{"use strict";e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=n(1798),e.createHash=e.Hash=n(3482),e.createHmac=e.Hmac=n(8355);var r=n(6042),i=Object.keys(r),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);e.getHashes=function(){return o};var s=n(5632);e.pbkdf2=s.pbkdf2,e.pbkdf2Sync=s.pbkdf2Sync;var a=n(3614);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=n(2607);e.DiffieHellmanGroup=u.DiffieHellmanGroup,e.createDiffieHellmanGroup=u.createDiffieHellmanGroup,e.getDiffieHellman=u.getDiffieHellman,e.createDiffieHellman=u.createDiffieHellman,e.DiffieHellman=u.DiffieHellman;var h=n(4743);e.createSign=h.createSign,e.Sign=h.Sign,e.createVerify=h.createVerify,e.Verify=h.Verify,e.createECDH=n(6393);var c=n(7900);e.publicEncrypt=c.publicEncrypt,e.privateEncrypt=c.privateEncrypt,e.publicDecrypt=c.publicDecrypt,e.privateDecrypt=c.privateDecrypt;var l=n(7963);e.randomFill=l.randomFill,e.randomFillSync=l.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}},452:function(t,e,n){var r;t.exports=(r=n(8249),n(8269),n(8214),n(888),n(5109),function(){var t=r,e=t.lib.BlockCipher,n=t.algo,i=[],o=[],s=[],a=[],u=[],h=[],c=[],l=[],d=[],f=[];!function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var n=0,r=0;for(e=0;e<256;e++){var p=r^r<<1^r<<2^r<<3^r<<4;p=p>>>8^255&p^99,i[n]=p,o[p]=n;var m=t[n],g=t[m],v=t[g],b=257*t[p]^16843008*p;s[n]=b<<24|b>>>8,a[n]=b<<16|b>>>16,u[n]=b<<8|b>>>24,h[n]=b,b=16843009*v^65537*g^257*m^16843008*n,c[p]=b<<24|b>>>8,l[p]=b<<16|b>>>16,d[p]=b<<8|b>>>24,f[p]=b,n?(n=m^t[t[t[v^m]]],r^=t[t[r]]):n=r=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=e.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,n=t.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],s=0;s<r;s++)s<n?o[s]=e[s]:(h=o[s-1],s%n?n>6&&s%n==4&&(h=i[h>>>24]<<24|i[h>>>16&255]<<16|i[h>>>8&255]<<8|i[255&h]):(h=i[(h=h<<8|h>>>24)>>>24]<<24|i[h>>>16&255]<<16|i[h>>>8&255]<<8|i[255&h],h^=p[s/n|0]<<24),o[s]=o[s-n]^h);for(var a=this._invKeySchedule=[],u=0;u<r;u++){if(s=r-u,u%4)var h=o[s];else h=o[s-4];a[u]=u<4||s<=4?h:c[i[h>>>24]]^l[i[h>>>16&255]]^d[i[h>>>8&255]]^f[i[255&h]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,s,a,u,h,i)},decryptBlock:function(t,e){var n=t[e+1];t[e+1]=t[e+3],t[e+3]=n,this._doCryptBlock(t,e,this._invKeySchedule,c,l,d,f,o),n=t[e+1],t[e+1]=t[e+3],t[e+3]=n},_doCryptBlock:function(t,e,n,r,i,o,s,a){for(var u=this._nRounds,h=t[e]^n[0],c=t[e+1]^n[1],l=t[e+2]^n[2],d=t[e+3]^n[3],f=4,p=1;p<u;p++){var m=r[h>>>24]^i[c>>>16&255]^o[l>>>8&255]^s[255&d]^n[f++],g=r[c>>>24]^i[l>>>16&255]^o[d>>>8&255]^s[255&h]^n[f++],v=r[l>>>24]^i[d>>>16&255]^o[h>>>8&255]^s[255&c]^n[f++],b=r[d>>>24]^i[h>>>16&255]^o[c>>>8&255]^s[255&l]^n[f++];h=m,c=g,l=v,d=b}m=(a[h>>>24]<<24|a[c>>>16&255]<<16|a[l>>>8&255]<<8|a[255&d])^n[f++],g=(a[c>>>24]<<24|a[l>>>16&255]<<16|a[d>>>8&255]<<8|a[255&h])^n[f++],v=(a[l>>>24]<<24|a[d>>>16&255]<<16|a[h>>>8&255]<<8|a[255&c])^n[f++],b=(a[d>>>24]<<24|a[h>>>16&255]<<16|a[c>>>8&255]<<8|a[255&l])^n[f++],t[e]=m,t[e+1]=g,t[e+2]=v,t[e+3]=b},keySize:8});t.AES=e._createHelper(m)}(),r.AES)},5109:function(t,e,n){var r,i,o,s,a,u,h,c,l,d,f,p,m,g,v,b,y,w,_;t.exports=(r=n(8249),n(888),void(r.lib.Cipher||(i=r,o=i.lib,s=o.Base,a=o.WordArray,u=o.BufferedBlockAlgorithm,h=i.enc,h.Utf8,c=h.Base64,l=i.algo.EvpKDF,d=o.Cipher=u.extend({cfg:s.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,n){this.cfg=this.cfg.extend(n),this._xformMode=t,this._key=e,this.reset()},reset:function(){u.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function t(t){return"string"==typeof t?_:y}return function(e){return{encrypt:function(n,r,i){return t(r).encrypt(e,n,r,i)},decrypt:function(n,r,i){return t(r).decrypt(e,n,r,i)}}}}()}),o.StreamCipher=d.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),f=i.mode={},p=o.BlockCipherMode=s.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),m=f.CBC=function(){var t=p.extend();function e(t,e,n){var r,i=this._iv;i?(r=i,this._iv=void 0):r=this._prevBlock;for(var o=0;o<n;o++)t[e+o]^=r[o]}return t.Encryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize;e.call(this,t,n,i),r.encryptBlock(t,n),this._prevBlock=t.slice(n,n+i)}}),t.Decryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize,o=t.slice(n,n+i);r.decryptBlock(t,n),e.call(this,t,n,i),this._prevBlock=o}}),t}(),g=(i.pad={}).Pkcs7={pad:function(t,e){for(var n=4*e,r=n-t.sigBytes%n,i=r<<24|r<<16|r<<8|r,o=[],s=0;s<r;s+=4)o.push(i);var u=a.create(o,r);t.concat(u)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},o.BlockCipher=d.extend({cfg:d.cfg.extend({mode:m,padding:g}),reset:function(){var t;d.reset.call(this);var e=this.cfg,n=e.iv,r=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=r.createEncryptor:(t=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,n&&n.words):(this._mode=t.call(r,this,n&&n.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4}),v=o.CipherParams=s.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}}),b=(i.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,n=t.salt;return(n?a.create([1398893684,1701076831]).concat(n).concat(e):e).toString(c)},parse:function(t){var e,n=c.parse(t),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(e=a.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),v.create({ciphertext:n,salt:e})}},y=o.SerializableCipher=s.extend({cfg:s.extend({format:b}),encrypt:function(t,e,n,r){r=this.cfg.extend(r);var i=t.createEncryptor(n,r),o=i.finalize(e),s=i.cfg;return v.create({ciphertext:o,key:n,iv:s.iv,algorithm:t,mode:s.mode,padding:s.padding,blockSize:t.blockSize,formatter:r.format})},decrypt:function(t,e,n,r){return r=this.cfg.extend(r),e=this._parse(e,r.format),t.createDecryptor(n,r).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),w=(i.kdf={}).OpenSSL={execute:function(t,e,n,r){r||(r=a.random(8));var i=l.create({keySize:e+n}).compute(t,r),o=a.create(i.words.slice(e),4*n);return i.sigBytes=4*e,v.create({key:i,iv:o,salt:r})}},_=o.PasswordBasedCipher=y.extend({cfg:y.cfg.extend({kdf:w}),encrypt:function(t,e,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,t.keySize,t.ivSize);r.iv=i.iv;var o=y.encrypt.call(this,t,e,i.key,r);return o.mixIn(i),o},decrypt:function(t,e,n,r){r=this.cfg.extend(r),e=this._parse(e,r.format);var i=r.kdf.execute(n,t.keySize,t.ivSize,e.salt);return r.iv=i.iv,y.decrypt.call(this,t,e,i.key,r)}}))))},8249:function(t,e,n){var r;t.exports=r=r||function(t,e){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==n.g&&n.g.crypto&&(r=n.g.crypto),!r)try{r=n(5835)}catch(t){}var i=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),s={},a=s.lib={},u=a.Base={extend:function(t){var e=o(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},h=a.WordArray=u.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||l).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,i=t.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var s=n[o>>>2]>>>24-o%4*8&255;e[r+o>>>2]|=s<<24-(r+o)%4*8}else for(o=0;o<i;o+=4)e[r+o>>>2]=n[o>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=u.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],n=0;n<t;n+=4)e.push(i());return new h.init(e,t)}}),c=s.enc={},l=c.Hex={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var o=e[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r+=2)n[r>>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new h.init(n,e/2)}},d=c.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i++){var o=e[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r<e;r++)n[r>>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new h.init(n,e)}},f=c.Utf8={stringify:function(t){try{return decodeURIComponent(escape(d.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return d.parse(unescape(encodeURIComponent(t)))}},p=a.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new h.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=f.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n,r=this._data,i=r.words,o=r.sigBytes,s=this.blockSize,a=o/(4*s),u=(a=e?t.ceil(a):t.max((0|a)-this._minBufferSize,0))*s,c=t.min(4*u,o);if(u){for(var l=0;l<u;l+=s)this._doProcessBlock(i,l);n=i.splice(0,u),r.sigBytes-=c}return new h.init(n,c)},clone:function(){var t=u.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),m=(a.Hasher=p.extend({cfg:u.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,n){return new t.init(n).finalize(e)}},_createHmacHelper:function(t){return function(e,n){return new m.HMAC.init(t,n).finalize(e)}}}),s.algo={});return s}(Math)},8269:function(t,e,n){var r,i,o;t.exports=(r=n(8249),o=(i=r).lib.WordArray,i.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,r=this._map;t.clamp();for(var i=[],o=0;o<n;o+=3)for(var s=(e[o>>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;a<4&&o+.75*a<n;a++)i.push(r.charAt(s>>>6*(3-a)&63));var u=r.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(t){var e=t.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var i=0;i<n.length;i++)r[n.charCodeAt(i)]=i}var s=n.charAt(64);if(s){var a=t.indexOf(s);-1!==a&&(e=a)}return function(t,e,n){for(var r=[],i=0,s=0;s<e;s++)if(s%4){var a=n[t.charCodeAt(s-1)]<<s%4*2|n[t.charCodeAt(s)]>>>6-s%4*2;r[i>>>2]|=a<<24-i%4*8,i++}return o.create(r,i)}(t,e,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},r.enc.Base64)},298:function(t,e,n){var r;t.exports=(r=n(8249),function(){var t=r,e=t.lib.WordArray,n=t.enc;function i(t){return t<<8&4278255360|t>>>8&16711935}n.Utf16=n.Utf16BE={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i<n;i+=2){var o=e[i>>>2]>>>16-i%4*8&65535;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var n=t.length,r=[],i=0;i<n;i++)r[i>>>1]|=t.charCodeAt(i)<<16-i%2*16;return e.create(r,2*n)}},n.Utf16LE={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],o=0;o<n;o+=2){var s=i(e[o>>>2]>>>16-o%4*8&65535);r.push(String.fromCharCode(s))}return r.join("")},parse:function(t){for(var n=t.length,r=[],o=0;o<n;o++)r[o>>>1]|=i(t.charCodeAt(o)<<16-o%2*16);return e.create(r,2*n)}}}(),r.enc.Utf16)},888:function(t,e,n){var r,i,o,s,a,u,h,c;t.exports=(c=n(8249),n(2783),n(9824),o=(i=(r=c).lib).Base,s=i.WordArray,u=(a=r.algo).MD5,h=a.EvpKDF=o.extend({cfg:o.extend({keySize:4,hasher:u,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n,r=this.cfg,i=r.hasher.create(),o=s.create(),a=o.words,u=r.keySize,h=r.iterations;a.length<u;){n&&i.update(n),n=i.update(t).finalize(e),i.reset();for(var c=1;c<h;c++)n=i.finalize(n),i.reset();o.concat(n)}return o.sigBytes=4*u,o}}),r.EvpKDF=function(t,e,n){return h.create(n).compute(t,e)},c.EvpKDF)},2209:function(t,e,n){var r,i,o,s;t.exports=(s=n(8249),n(5109),i=(r=s).lib.CipherParams,o=r.enc.Hex,r.format.Hex={stringify:function(t){return t.ciphertext.toString(o)},parse:function(t){var e=o.parse(t);return i.create({ciphertext:e})}},s.format.Hex)},9824:function(t,e,n){var r,i,o;t.exports=(i=(r=n(8249)).lib.Base,o=r.enc.Utf8,void(r.algo.HMAC=i.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=o.parse(e));var n=t.blockSize,r=4*n;e.sigBytes>r&&(e=t.finalize(e)),e.clamp();for(var i=this._oKey=e.clone(),s=this._iKey=e.clone(),a=i.words,u=s.words,h=0;h<n;h++)a[h]^=1549556828,u[h]^=909522486;i.sigBytes=s.sigBytes=r,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,n=e.finalize(t);return e.reset(),e.finalize(this._oKey.clone().concat(n))}})))},1354:function(t,e,n){var r;t.exports=(r=n(8249),n(4938),n(4433),n(298),n(8269),n(8214),n(2783),n(2153),n(7792),n(34),n(7460),n(3327),n(706),n(9824),n(2112),n(888),n(5109),n(8568),n(4242),n(9968),n(7660),n(1148),n(3615),n(2807),n(1077),n(6475),n(6991),n(2209),n(452),n(4253),n(1857),n(4454),n(3974),r)},4433:function(t,e,n){var r;t.exports=(r=n(8249),function(){if("function"==typeof ArrayBuffer){var t=r.lib.WordArray,e=t.init;(t.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var n=t.byteLength,r=[],i=0;i<n;i++)r[i>>>2]|=t[i]<<24-i%4*8;e.call(this,r,n)}else e.apply(this,arguments)}).prototype=t}}(),r.lib.WordArray)},8214:function(t,e,n){var r;t.exports=(r=n(8249),function(t){var e=r,n=e.lib,i=n.WordArray,o=n.Hasher,s=e.algo,a=[];!function(){for(var e=0;e<64;e++)a[e]=4294967296*t.abs(t.sin(e+1))|0}();var u=s.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var r=e+n,i=t[r];t[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,s=t[e+0],u=t[e+1],f=t[e+2],p=t[e+3],m=t[e+4],g=t[e+5],v=t[e+6],b=t[e+7],y=t[e+8],w=t[e+9],_=t[e+10],M=t[e+11],S=t[e+12],E=t[e+13],A=t[e+14],k=t[e+15],x=o[0],R=o[1],I=o[2],T=o[3];x=h(x,R,I,T,s,7,a[0]),T=h(T,x,R,I,u,12,a[1]),I=h(I,T,x,R,f,17,a[2]),R=h(R,I,T,x,p,22,a[3]),x=h(x,R,I,T,m,7,a[4]),T=h(T,x,R,I,g,12,a[5]),I=h(I,T,x,R,v,17,a[6]),R=h(R,I,T,x,b,22,a[7]),x=h(x,R,I,T,y,7,a[8]),T=h(T,x,R,I,w,12,a[9]),I=h(I,T,x,R,_,17,a[10]),R=h(R,I,T,x,M,22,a[11]),x=h(x,R,I,T,S,7,a[12]),T=h(T,x,R,I,E,12,a[13]),I=h(I,T,x,R,A,17,a[14]),x=c(x,R=h(R,I,T,x,k,22,a[15]),I,T,u,5,a[16]),T=c(T,x,R,I,v,9,a[17]),I=c(I,T,x,R,M,14,a[18]),R=c(R,I,T,x,s,20,a[19]),x=c(x,R,I,T,g,5,a[20]),T=c(T,x,R,I,_,9,a[21]),I=c(I,T,x,R,k,14,a[22]),R=c(R,I,T,x,m,20,a[23]),x=c(x,R,I,T,w,5,a[24]),T=c(T,x,R,I,A,9,a[25]),I=c(I,T,x,R,p,14,a[26]),R=c(R,I,T,x,y,20,a[27]),x=c(x,R,I,T,E,5,a[28]),T=c(T,x,R,I,f,9,a[29]),I=c(I,T,x,R,b,14,a[30]),x=l(x,R=c(R,I,T,x,S,20,a[31]),I,T,g,4,a[32]),T=l(T,x,R,I,y,11,a[33]),I=l(I,T,x,R,M,16,a[34]),R=l(R,I,T,x,A,23,a[35]),x=l(x,R,I,T,u,4,a[36]),T=l(T,x,R,I,m,11,a[37]),I=l(I,T,x,R,b,16,a[38]),R=l(R,I,T,x,_,23,a[39]),x=l(x,R,I,T,E,4,a[40]),T=l(T,x,R,I,s,11,a[41]),I=l(I,T,x,R,p,16,a[42]),R=l(R,I,T,x,v,23,a[43]),x=l(x,R,I,T,w,4,a[44]),T=l(T,x,R,I,S,11,a[45]),I=l(I,T,x,R,k,16,a[46]),x=d(x,R=l(R,I,T,x,f,23,a[47]),I,T,s,6,a[48]),T=d(T,x,R,I,b,10,a[49]),I=d(I,T,x,R,A,15,a[50]),R=d(R,I,T,x,g,21,a[51]),x=d(x,R,I,T,S,6,a[52]),T=d(T,x,R,I,p,10,a[53]),I=d(I,T,x,R,_,15,a[54]),R=d(R,I,T,x,u,21,a[55]),x=d(x,R,I,T,y,6,a[56]),T=d(T,x,R,I,k,10,a[57]),I=d(I,T,x,R,v,15,a[58]),R=d(R,I,T,x,E,21,a[59]),x=d(x,R,I,T,m,6,a[60]),T=d(T,x,R,I,M,10,a[61]),I=d(I,T,x,R,f,15,a[62]),R=d(R,I,T,x,w,21,a[63]),o[0]=o[0]+x|0,o[1]=o[1]+R|0,o[2]=o[2]+I|0,o[3]=o[3]+T|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var o=t.floor(r/4294967296),s=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),e.sigBytes=4*(n.length+1),this._process();for(var a=this._hash,u=a.words,h=0;h<4;h++){var c=u[h];u[h]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return a},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});function h(t,e,n,r,i,o,s){var a=t+(e&n|~e&r)+i+s;return(a<<o|a>>>32-o)+e}function c(t,e,n,r,i,o,s){var a=t+(e&r|n&~r)+i+s;return(a<<o|a>>>32-o)+e}function l(t,e,n,r,i,o,s){var a=t+(e^n^r)+i+s;return(a<<o|a>>>32-o)+e}function d(t,e,n,r,i,o,s){var a=t+(n^(e|~r))+i+s;return(a<<o|a>>>32-o)+e}e.MD5=o._createHelper(u),e.HmacMD5=o._createHmacHelper(u)}(Math),r.MD5)},8568:function(t,e,n){var r;t.exports=(r=n(8249),n(5109),r.mode.CFB=function(){var t=r.lib.BlockCipherMode.extend();function e(t,e,n,r){var i,o=this._iv;o?(i=o.slice(0),this._iv=void 0):i=this._prevBlock,r.encryptBlock(i,0);for(var s=0;s<n;s++)t[e+s]^=i[s]}return t.Encryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize;e.call(this,t,n,i,r),this._prevBlock=t.slice(n,n+i)}}),t.Decryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize,o=t.slice(n,n+i);e.call(this,t,n,i,r),this._prevBlock=o}}),t}(),r.mode.CFB)},9968:function(t,e,n){var r;t.exports=(r=n(8249),n(5109),r.mode.CTRGladman=function(){var t=r.lib.BlockCipherMode.extend();function e(t){if(255==(t>>24&255)){var e=t>>16&255,n=t>>8&255,r=255&t;255===e?(e=0,255===n?(n=0,255===r?r=0:++r):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=r}else t+=1<<24;return t}var n=t.Encryptor=t.extend({processBlock:function(t,n){var r=this._cipher,i=r.blockSize,o=this._iv,s=this._counter;o&&(s=this._counter=o.slice(0),this._iv=void 0),function(t){0===(t[0]=e(t[0]))&&(t[1]=e(t[1]))}(s);var a=s.slice(0);r.encryptBlock(a,0);for(var u=0;u<i;u++)t[n+u]^=a[u]}});return t.Decryptor=n,t}(),r.mode.CTRGladman)},4242:function(t,e,n){var r,i,o;t.exports=(o=n(8249),n(5109),o.mode.CTR=(i=(r=o.lib.BlockCipherMode.extend()).Encryptor=r.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize,i=this._iv,o=this._counter;i&&(o=this._counter=i.slice(0),this._iv=void 0);var s=o.slice(0);n.encryptBlock(s,0),o[r-1]=o[r-1]+1|0;for(var a=0;a<r;a++)t[e+a]^=s[a]}}),r.Decryptor=i,r),o.mode.CTR)},1148:function(t,e,n){var r,i;t.exports=(i=n(8249),n(5109),i.mode.ECB=((r=i.lib.BlockCipherMode.extend()).Encryptor=r.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),r.Decryptor=r.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),r),i.mode.ECB)},7660:function(t,e,n){var r,i,o;t.exports=(o=n(8249),n(5109),o.mode.OFB=(i=(r=o.lib.BlockCipherMode.extend()).Encryptor=r.extend({processBlock:function(t,e){var n=this._cipher,r=n.blockSize,i=this._iv,o=this._keystream;i&&(o=this._keystream=i.slice(0),this._iv=void 0),n.encryptBlock(o,0);for(var s=0;s<r;s++)t[e+s]^=o[s]}}),r.Decryptor=i,r),o.mode.OFB)},3615:function(t,e,n){var r;t.exports=(r=n(8249),n(5109),r.pad.AnsiX923={pad:function(t,e){var n=t.sigBytes,r=4*e,i=r-n%r,o=n+i-1;t.clamp(),t.words[o>>>2]|=i<<24-o%4*8,t.sigBytes+=i},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},r.pad.Ansix923)},2807:function(t,e,n){var r;t.exports=(r=n(8249),n(5109),r.pad.Iso10126={pad:function(t,e){var n=4*e,i=n-t.sigBytes%n;t.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},r.pad.Iso10126)},1077:function(t,e,n){var r;t.exports=(r=n(8249),n(5109),r.pad.Iso97971={pad:function(t,e){t.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(t,e)},unpad:function(t){r.pad.ZeroPadding.unpad(t),t.sigBytes--}},r.pad.Iso97971)},6991:function(t,e,n){var r;t.exports=(r=n(8249),n(5109),r.pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding)},6475:function(t,e,n){var r;t.exports=(r=n(8249),n(5109),r.pad.ZeroPadding={pad:function(t,e){var n=4*e;t.clamp(),t.sigBytes+=n-(t.sigBytes%n||n)},unpad:function(t){var e=t.words,n=t.sigBytes-1;for(n=t.sigBytes-1;n>=0;n--)if(e[n>>>2]>>>24-n%4*8&255){t.sigBytes=n+1;break}}},r.pad.ZeroPadding)},2112:function(t,e,n){var r,i,o,s,a,u,h,c,l;t.exports=(l=n(8249),n(2783),n(9824),o=(i=(r=l).lib).Base,s=i.WordArray,u=(a=r.algo).SHA1,h=a.HMAC,c=a.PBKDF2=o.extend({cfg:o.extend({keySize:4,hasher:u,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var n=this.cfg,r=h.create(n.hasher,t),i=s.create(),o=s.create([1]),a=i.words,u=o.words,c=n.keySize,l=n.iterations;a.length<c;){var d=r.update(e).finalize(o);r.reset();for(var f=d.words,p=f.length,m=d,g=1;g<l;g++){m=r.finalize(m),r.reset();for(var v=m.words,b=0;b<p;b++)f[b]^=v[b]}i.concat(d),u[0]++}return i.sigBytes=4*c,i}}),r.PBKDF2=function(t,e,n){return c.create(n).compute(t,e)},l.PBKDF2)},3974:function(t,e,n){var r;t.exports=(r=n(8249),n(8269),n(8214),n(888),n(5109),function(){var t=r,e=t.lib.StreamCipher,n=t.algo,i=[],o=[],s=[],a=n.RabbitLegacy=e.extend({_doReset:function(){var t=this._key.words,e=this.cfg.iv,n=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],r=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];this._b=0;for(var i=0;i<4;i++)u.call(this);for(i=0;i<8;i++)r[i]^=n[i+4&7];if(e){var o=e.words,s=o[0],a=o[1],h=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=h>>>16|4294901760&c,d=c<<16|65535&h;for(r[0]^=h,r[1]^=l,r[2]^=c,r[3]^=d,r[4]^=h,r[5]^=l,r[6]^=c,r[7]^=d,i=0;i<4;i++)u.call(this)}},_doProcessBlock:function(t,e){var n=this._X;u.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),t[e+r]^=i[r]},blockSize:4,ivSize:2});function u(){for(var t=this._X,e=this._C,n=0;n<8;n++)o[n]=e[n];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<o[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<o[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<o[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<o[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<o[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<o[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<o[6]>>>0?1:0)|0,this._b=e[7]>>>0<o[7]>>>0?1:0,n=0;n<8;n++){var r=t[n]+e[n],i=65535&r,a=r>>>16,u=((i*i>>>17)+i*a>>>15)+a*a,h=((4294901760&r)*r|0)+((65535&r)*r|0);s[n]=u^h}t[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,t[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,t[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,t[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,t[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,t[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,t[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,t[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}t.RabbitLegacy=e._createHelper(a)}(),r.RabbitLegacy)},4454:function(t,e,n){var r;t.exports=(r=n(8249),n(8269),n(8214),n(888),n(5109),function(){var t=r,e=t.lib.StreamCipher,n=t.algo,i=[],o=[],s=[],a=n.Rabbit=e.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,n=0;n<4;n++)t[n]=16711935&(t[n]<<8|t[n]>>>24)|4278255360&(t[n]<<24|t[n]>>>8);var r=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];for(this._b=0,n=0;n<4;n++)u.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(e){var o=e.words,s=o[0],a=o[1],h=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),c=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=h>>>16|4294901760&c,d=c<<16|65535&h;for(i[0]^=h,i[1]^=l,i[2]^=c,i[3]^=d,i[4]^=h,i[5]^=l,i[6]^=c,i[7]^=d,n=0;n<4;n++)u.call(this)}},_doProcessBlock:function(t,e){var n=this._X;u.call(this),i[0]=n[0]^n[5]>>>16^n[3]<<16,i[1]=n[2]^n[7]>>>16^n[5]<<16,i[2]=n[4]^n[1]>>>16^n[7]<<16,i[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)i[r]=16711935&(i[r]<<8|i[r]>>>24)|4278255360&(i[r]<<24|i[r]>>>8),t[e+r]^=i[r]},blockSize:4,ivSize:2});function u(){for(var t=this._X,e=this._C,n=0;n<8;n++)o[n]=e[n];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<o[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<o[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<o[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<o[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<o[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<o[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<o[6]>>>0?1:0)|0,this._b=e[7]>>>0<o[7]>>>0?1:0,n=0;n<8;n++){var r=t[n]+e[n],i=65535&r,a=r>>>16,u=((i*i>>>17)+i*a>>>15)+a*a,h=((4294901760&r)*r|0)+((65535&r)*r|0);s[n]=u^h}t[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,t[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,t[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,t[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,t[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,t[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,t[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,t[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}t.Rabbit=e._createHelper(a)}(),r.Rabbit)},1857:function(t,e,n){var r;t.exports=(r=n(8249),n(8269),n(8214),n(888),n(5109),function(){var t=r,e=t.lib.StreamCipher,n=t.algo,i=n.RC4=e.extend({_doReset:function(){for(var t=this._key,e=t.words,n=t.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;i=0;for(var o=0;i<256;i++){var s=i%n,a=e[s>>>2]>>>24-s%4*8&255;o=(o+r[i]+a)%256;var u=r[i];r[i]=r[o],r[o]=u}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var t=this._S,e=this._i,n=this._j,r=0,i=0;i<4;i++){n=(n+t[e=(e+1)%256])%256;var o=t[e];t[e]=t[n],t[n]=o,r|=t[(t[e]+t[n])%256]<<24-8*i}return this._i=e,this._j=n,r}t.RC4=e._createHelper(i);var s=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var t=this.cfg.drop;t>0;t--)o.call(this)}});t.RC4Drop=e._createHelper(s)}(),r.RC4)},706:function(t,e,n){var r;t.exports=(r=n(8249),function(t){var e=r,n=e.lib,i=n.WordArray,o=n.Hasher,s=e.algo,a=i.create([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=i.create([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]),h=i.create([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]),c=i.create([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]),l=i.create([0,1518500249,1859775393,2400959708,2840853838]),d=i.create([1352829926,1548603684,1836072691,2053994217,0]),f=s.RIPEMD160=o.extend({_doReset:function(){this._hash=i.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=0;n<16;n++){var r=e+n,i=t[r];t[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o,s,f,w,_,M,S,E,A,k,x,R=this._hash.words,I=l.words,T=d.words,C=a.words,B=u.words,D=h.words,P=c.words;for(M=o=R[0],S=s=R[1],E=f=R[2],A=w=R[3],k=_=R[4],n=0;n<80;n+=1)x=o+t[e+C[n]]|0,x+=n<16?p(s,f,w)+I[0]:n<32?m(s,f,w)+I[1]:n<48?g(s,f,w)+I[2]:n<64?v(s,f,w)+I[3]:b(s,f,w)+I[4],x=(x=y(x|=0,D[n]))+_|0,o=_,_=w,w=y(f,10),f=s,s=x,x=M+t[e+B[n]]|0,x+=n<16?b(S,E,A)+T[0]:n<32?v(S,E,A)+T[1]:n<48?g(S,E,A)+T[2]:n<64?m(S,E,A)+T[3]:p(S,E,A)+T[4],x=(x=y(x|=0,P[n]))+k|0,M=k,k=A,A=y(E,10),E=S,S=x;x=R[1]+f+A|0,R[1]=R[2]+w+k|0,R[2]=R[3]+_+M|0,R[3]=R[4]+o+S|0,R[4]=R[0]+s+E|0,R[0]=x},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),t.sigBytes=4*(e.length+1),this._process();for(var i=this._hash,o=i.words,s=0;s<5;s++){var a=o[s];o[s]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return i},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});function p(t,e,n){return t^e^n}function m(t,e,n){return t&e|~t&n}function g(t,e,n){return(t|~e)^n}function v(t,e,n){return t&n|e&~n}function b(t,e,n){return t^(e|~n)}function y(t,e){return t<<e|t>>>32-e}e.RIPEMD160=o._createHelper(f),e.HmacRIPEMD160=o._createHmacHelper(f)}(Math),r.RIPEMD160)},2783:function(t,e,n){var r,i,o,s,a,u,h,c;t.exports=(i=(r=c=n(8249)).lib,o=i.WordArray,s=i.Hasher,a=r.algo,u=[],h=a.SHA1=s.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],s=n[3],a=n[4],h=0;h<80;h++){if(h<16)u[h]=0|t[e+h];else{var c=u[h-3]^u[h-8]^u[h-14]^u[h-16];u[h]=c<<1|c>>>31}var l=(r<<5|r>>>27)+a+u[h];l+=h<20?1518500249+(i&o|~i&s):h<40?1859775393+(i^o^s):h<60?(i&o|i&s|o&s)-1894007588:(i^o^s)-899497514,a=s,s=o,o=i<<30|i>>>2,i=r,r=l}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+a|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),e[15+(r+64>>>9<<4)]=n,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=s.clone.call(this);return t._hash=this._hash.clone(),t}}),r.SHA1=s._createHelper(h),r.HmacSHA1=s._createHmacHelper(h),c.SHA1)},7792:function(t,e,n){var r,i,o,s,a,u;t.exports=(u=n(8249),n(2153),i=(r=u).lib.WordArray,o=r.algo,s=o.SHA256,a=o.SHA224=s.extend({_doReset:function(){this._hash=new i.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=s._doFinalize.call(this);return t.sigBytes-=4,t}}),r.SHA224=s._createHelper(a),r.HmacSHA224=s._createHmacHelper(a),u.SHA224)},2153:function(t,e,n){var r;t.exports=(r=n(8249),function(t){var e=r,n=e.lib,i=n.WordArray,o=n.Hasher,s=e.algo,a=[],u=[];!function(){function e(e){for(var n=t.sqrt(e),r=2;r<=n;r++)if(!(e%r))return!1;return!0}function n(t){return 4294967296*(t-(0|t))|0}for(var r=2,i=0;i<64;)e(r)&&(i<8&&(a[i]=n(t.pow(r,.5))),u[i]=n(t.pow(r,1/3)),i++),r++}();var h=[],c=s.SHA256=o.extend({_doReset:function(){this._hash=new i.init(a.slice(0))},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],s=n[3],a=n[4],c=n[5],l=n[6],d=n[7],f=0;f<64;f++){if(f<16)h[f]=0|t[e+f];else{var p=h[f-15],m=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=h[f-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;h[f]=m+h[f-7]+v+h[f-16]}var b=r&i^r&o^i&o,y=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),w=d+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&c^~a&l)+u[f]+h[f];d=l,l=c,c=a,a=s+w|0,s=o,o=i,i=r,r=w+(y+b)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+a|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+d|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=t.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=o._createHelper(c),e.HmacSHA256=o._createHmacHelper(c)}(Math),r.SHA256)},3327:function(t,e,n){var r;t.exports=(r=n(8249),n(4938),function(t){var e=r,n=e.lib,i=n.WordArray,o=n.Hasher,s=e.x64.Word,a=e.algo,u=[],h=[],c=[];!function(){for(var t=1,e=0,n=0;n<24;n++){u[t+5*e]=(n+1)*(n+2)/2%64;var r=(2*t+3*e)%5;t=e%5,e=r}for(t=0;t<5;t++)for(e=0;e<5;e++)h[t+5*e]=e+(2*t+3*e)%5*5;for(var i=1,o=0;o<24;o++){for(var a=0,l=0,d=0;d<7;d++){if(1&i){var f=(1<<d)-1;f<32?l^=1<<f:a^=1<<f-32}128&i?i=i<<1^113:i<<=1}c[o]=s.create(a,l)}}();var l=[];!function(){for(var t=0;t<25;t++)l[t]=s.create()}();var d=a.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var t=this._state=[],e=0;e<25;e++)t[e]=new s.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(t,e){for(var n=this._state,r=this.blockSize/2,i=0;i<r;i++){var o=t[e+2*i],s=t[e+2*i+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),(R=n[i]).high^=s,R.low^=o}for(var a=0;a<24;a++){for(var d=0;d<5;d++){for(var f=0,p=0,m=0;m<5;m++)f^=(R=n[d+5*m]).high,p^=R.low;var g=l[d];g.high=f,g.low=p}for(d=0;d<5;d++){var v=l[(d+4)%5],b=l[(d+1)%5],y=b.high,w=b.low;for(f=v.high^(y<<1|w>>>31),p=v.low^(w<<1|y>>>31),m=0;m<5;m++)(R=n[d+5*m]).high^=f,R.low^=p}for(var _=1;_<25;_++){var M=(R=n[_]).high,S=R.low,E=u[_];E<32?(f=M<<E|S>>>32-E,p=S<<E|M>>>32-E):(f=S<<E-32|M>>>64-E,p=M<<E-32|S>>>64-E);var A=l[h[_]];A.high=f,A.low=p}var k=l[0],x=n[0];for(k.high=x.high,k.low=x.low,d=0;d<5;d++)for(m=0;m<5;m++){var R=n[_=d+5*m],I=l[_],T=l[(d+1)%5+5*m],C=l[(d+2)%5+5*m];R.high=I.high^~T.high&C.high,R.low=I.low^~T.low&C.low}R=n[0];var B=c[a];R.high^=B.high,R.low^=B.low}},_doFinalize:function(){var e=this._data,n=e.words,r=(this._nDataBytes,8*e.sigBytes),o=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(t.ceil((r+1)/o)*o>>>5)-1]|=128,e.sigBytes=4*n.length,this._process();for(var s=this._state,a=this.cfg.outputLength/8,u=a/8,h=[],c=0;c<u;c++){var l=s[c],d=l.high,f=l.low;d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),h.push(f),h.push(d)}return new i.init(h,a)},clone:function(){for(var t=o.clone.call(this),e=t._state=this._state.slice(0),n=0;n<25;n++)e[n]=e[n].clone();return t}});e.SHA3=o._createHelper(d),e.HmacSHA3=o._createHmacHelper(d)}(Math),r.SHA3)},7460:function(t,e,n){var r,i,o,s,a,u,h,c;t.exports=(c=n(8249),n(4938),n(34),i=(r=c).x64,o=i.Word,s=i.WordArray,a=r.algo,u=a.SHA512,h=a.SHA384=u.extend({_doReset:function(){this._hash=new s.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var t=u._doFinalize.call(this);return t.sigBytes-=16,t}}),r.SHA384=u._createHelper(h),r.HmacSHA384=u._createHmacHelper(h),c.SHA384)},34:function(t,e,n){var r;t.exports=(r=n(8249),n(4938),function(){var t=r,e=t.lib.Hasher,n=t.x64,i=n.Word,o=n.WordArray,s=t.algo;function a(){return i.create.apply(i,arguments)}var u=[a(1116352408,3609767458),a(1899447441,602891725),a(3049323471,3964484399),a(3921009573,2173295548),a(961987163,4081628472),a(1508970993,3053834265),a(2453635748,2937671579),a(2870763221,3664609560),a(3624381080,2734883394),a(310598401,1164996542),a(607225278,1323610764),a(1426881987,3590304994),a(1925078388,4068182383),a(2162078206,991336113),a(2614888103,633803317),a(3248222580,3479774868),a(3835390401,2666613458),a(4022224774,944711139),a(264347078,2341262773),a(604807628,2007800933),a(770255983,1495990901),a(1249150122,1856431235),a(1555081692,3175218132),a(1996064986,2198950837),a(2554220882,3999719339),a(2821834349,766784016),a(2952996808,2566594879),a(3210313671,3203337956),a(3336571891,1034457026),a(3584528711,2466948901),a(113926993,3758326383),a(338241895,168717936),a(666307205,1188179964),a(773529912,1546045734),a(1294757372,1522805485),a(1396182291,2643833823),a(1695183700,2343527390),a(1986661051,1014477480),a(2177026350,1206759142),a(2456956037,344077627),a(2730485921,1290863460),a(2820302411,3158454273),a(3259730800,3505952657),a(3345764771,106217008),a(3516065817,3606008344),a(3600352804,1432725776),a(4094571909,1467031594),a(275423344,851169720),a(430227734,3100823752),a(506948616,1363258195),a(659060556,3750685593),a(883997877,3785050280),a(958139571,3318307427),a(1322822218,3812723403),a(1537002063,2003034995),a(1747873779,3602036899),a(1955562222,1575990012),a(2024104815,1125592928),a(2227730452,2716904306),a(2361852424,442776044),a(2428436474,593698344),a(2756734187,3733110249),a(3204031479,2999351573),a(3329325298,3815920427),a(3391569614,3928383900),a(3515267271,566280711),a(3940187606,3454069534),a(4118630271,4000239992),a(116418474,1914138554),a(174292421,2731055270),a(289380356,3203993006),a(460393269,320620315),a(685471733,587496836),a(852142971,1086792851),a(1017036298,365543100),a(1126000580,2618297676),a(1288033470,3409855158),a(1501505948,4234509866),a(1607167915,987167468),a(1816402316,1246189591)],h=[];!function(){for(var t=0;t<80;t++)h[t]=a()}();var c=s.SHA512=e.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],s=n[3],a=n[4],c=n[5],l=n[6],d=n[7],f=r.high,p=r.low,m=i.high,g=i.low,v=o.high,b=o.low,y=s.high,w=s.low,_=a.high,M=a.low,S=c.high,E=c.low,A=l.high,k=l.low,x=d.high,R=d.low,I=f,T=p,C=m,B=g,D=v,P=b,U=y,O=w,N=_,q=M,L=S,j=E,K=A,$=k,z=x,H=R,W=0;W<80;W++){var V,F,J=h[W];if(W<16)F=J.high=0|t[e+2*W],V=J.low=0|t[e+2*W+1];else{var G=h[W-15],Z=G.high,Y=G.low,X=(Z>>>1|Y<<31)^(Z>>>8|Y<<24)^Z>>>7,Q=(Y>>>1|Z<<31)^(Y>>>8|Z<<24)^(Y>>>7|Z<<25),tt=h[W-2],et=tt.high,nt=tt.low,rt=(et>>>19|nt<<13)^(et<<3|nt>>>29)^et>>>6,it=(nt>>>19|et<<13)^(nt<<3|et>>>29)^(nt>>>6|et<<26),ot=h[W-7],st=ot.high,at=ot.low,ut=h[W-16],ht=ut.high,ct=ut.low;F=(F=(F=X+st+((V=Q+at)>>>0<Q>>>0?1:0))+rt+((V+=it)>>>0<it>>>0?1:0))+ht+((V+=ct)>>>0<ct>>>0?1:0),J.high=F,J.low=V}var lt,dt=N&L^~N&K,ft=q&j^~q&$,pt=I&C^I&D^C&D,mt=T&B^T&P^B&P,gt=(I>>>28|T<<4)^(I<<30|T>>>2)^(I<<25|T>>>7),vt=(T>>>28|I<<4)^(T<<30|I>>>2)^(T<<25|I>>>7),bt=(N>>>14|q<<18)^(N>>>18|q<<14)^(N<<23|q>>>9),yt=(q>>>14|N<<18)^(q>>>18|N<<14)^(q<<23|N>>>9),wt=u[W],_t=wt.high,Mt=wt.low,St=z+bt+((lt=H+yt)>>>0<H>>>0?1:0),Et=vt+mt;z=K,H=$,K=L,$=j,L=N,j=q,N=U+(St=(St=(St=St+dt+((lt+=ft)>>>0<ft>>>0?1:0))+_t+((lt+=Mt)>>>0<Mt>>>0?1:0))+F+((lt+=V)>>>0<V>>>0?1:0))+((q=O+lt|0)>>>0<O>>>0?1:0)|0,U=D,O=P,D=C,P=B,C=I,B=T,I=St+(gt+pt+(Et>>>0<vt>>>0?1:0))+((T=lt+Et|0)>>>0<lt>>>0?1:0)|0}p=r.low=p+T,r.high=f+I+(p>>>0<T>>>0?1:0),g=i.low=g+B,i.high=m+C+(g>>>0<B>>>0?1:0),b=o.low=b+P,o.high=v+D+(b>>>0<P>>>0?1:0),w=s.low=w+O,s.high=y+U+(w>>>0<O>>>0?1:0),M=a.low=M+q,a.high=_+N+(M>>>0<q>>>0?1:0),E=c.low=E+j,c.high=S+L+(E>>>0<j>>>0?1:0),k=l.low=k+$,l.high=A+K+(k>>>0<$>>>0?1:0),R=d.low=R+H,d.high=x+z+(R>>>0<H>>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),e[31+(r+128>>>10<<5)]=n,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=e.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});t.SHA512=e._createHelper(c),t.HmacSHA512=e._createHmacHelper(c)}(),r.SHA512)},4253:function(t,e,n){var r;t.exports=(r=n(8249),n(8269),n(8214),n(888),n(5109),function(){var t=r,e=t.lib,n=e.WordArray,i=e.BlockCipher,o=t.algo,s=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],a=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],h=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],c=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],l=o.DES=i.extend({_doReset:function(){for(var t=this._key.words,e=[],n=0;n<56;n++){var r=s[n]-1;e[n]=t[r>>>5]>>>31-r%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var h=i[o]=[],c=u[o];for(n=0;n<24;n++)h[n/6|0]|=e[(a[n]-1+c)%28]<<31-n%6,h[4+(n/6|0)]|=e[28+(a[n+24]-1+c)%28]<<31-n%6;for(h[0]=h[0]<<1|h[0]>>>31,n=1;n<7;n++)h[n]=h[n]>>>4*(n-1)+3;h[7]=h[7]<<5|h[7]>>>27}var l=this._invSubKeys=[];for(n=0;n<16;n++)l[n]=i[15-n]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,n){this._lBlock=t[e],this._rBlock=t[e+1],d.call(this,4,252645135),d.call(this,16,65535),f.call(this,2,858993459),f.call(this,8,16711935),d.call(this,1,1431655765);for(var r=0;r<16;r++){for(var i=n[r],o=this._lBlock,s=this._rBlock,a=0,u=0;u<8;u++)a|=h[u][((s^i[u])&c[u])>>>0];this._lBlock=s,this._rBlock=o^a}var l=this._lBlock;this._lBlock=this._rBlock,this._rBlock=l,d.call(this,1,1431655765),f.call(this,8,16711935),f.call(this,2,858993459),d.call(this,16,65535),d.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function d(t,e){var n=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=n,this._lBlock^=n<<t}function f(t,e){var n=(this._rBlock>>>t^this._lBlock)&e;this._lBlock^=n,this._rBlock^=n<<t}t.DES=i._createHelper(l);var p=o.TripleDES=i.extend({_doReset:function(){var t=this._key.words;if(2!==t.length&&4!==t.length&&t.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var e=t.slice(0,2),r=t.length<4?t.slice(0,2):t.slice(2,4),i=t.length<6?t.slice(0,2):t.slice(4,6);this._des1=l.createEncryptor(n.create(e)),this._des2=l.createEncryptor(n.create(r)),this._des3=l.createEncryptor(n.create(i))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=i._createHelper(p)}(),r.TripleDES)},4938:function(t,e,n){var r,i,o,s,a,u;t.exports=(r=n(8249),o=(i=r).lib,s=o.Base,a=o.WordArray,(u=i.x64={}).Word=s.extend({init:function(t,e){this.high=t,this.low=e}}),u.WordArray=s.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:8*t.length},toX32:function(){for(var t=this.words,e=t.length,n=[],r=0;r<e;r++){var i=t[r];n.push(i.high),n.push(i.low)}return a.create(n,this.sigBytes)},clone:function(){for(var t=s.clone.call(this),e=t.words=this.words.slice(0),n=e.length,r=0;r<n;r++)e[r]=e[r].clone();return t}}),r)},5251:(t,e,n)=>{"use strict";e.utils=n(1278),e.Cipher=n(5756),e.DES=n(778),e.CBC=n(9051),e.EDE=n(651)},9051:(t,e,n)=>{"use strict";var r=n(9746),i=n(5717),o={};function s(t){r.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 n=Object.keys(o),r=0;r<n.length;r++){var s=n[r];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,n,r){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,n,r),a=0;a<this.blockSize;a++)s[a]=n[r+a]}else{for(o._update.call(this,t,e,n,r),a=0;a<this.blockSize;a++)n[r+a]^=s[a];for(a=0;a<this.blockSize;a++)s[a]=t[e+a]}}},5756:(t,e,n)=>{"use strict";var r=n(9746);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 n=Math.min(this.buffer.length-this.bufferOff,t.length-e),r=0;r<n;r++)this.buffer[this.bufferOff+r]=t[e+r];return this.bufferOff+=n,n},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,n=0,r=(this.bufferOff+t.length)/this.blockSize|0,i=new Array(r*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(n+=this._flushBuffer(i,n)));for(var o=t.length-(t.length-e)%this.blockSize;e<o;e+=this.blockSize)this._update(t,e,i,n),n+=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,n=0,r=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,i=new Array(r*this.blockSize);r>0;r--)e+=this._buffer(t,e),n+=this._flushBuffer(i,n);return e+=this._buffer(t,e),i},i.prototype.final=function(t){var e,n;return t&&(e=this.update(t)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(n):n},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(){r.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)}},778:(t,e,n)=>{"use strict";var r=n(9746),i=n(5717),o=n(1278),s=n(5756);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 h=[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),r.equal(e.length,this.blockSize,"Invalid key length");var n=o.readUInt32BE(e,0),i=o.readUInt32BE(e,4);o.pc1(n,i,t.tmp,0),n=t.tmp[0],i=t.tmp[1];for(var s=0;s<t.keys.length;s+=2){var a=h[s>>>1];n=o.r28shl(n,a),i=o.r28shl(i,a),o.pc2(n,i,t.keys,s)}},u.prototype._update=function(t,e,n,r){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(n,s,r),o.writeUInt32BE(n,a,r+4)},u.prototype._pad=function(t,e){for(var n=t.length-e,r=e;r<t.length;r++)t[r]=n;return!0},u.prototype._unpad=function(t){for(var e=t[t.length-1],n=t.length-e;n<t.length;n++)r.equal(t[n],e);return t.slice(0,t.length-e)},u.prototype._encrypt=function(t,e,n,r,i){for(var s=e,a=n,u=0;u<t.keys.length;u+=2){var h=t.keys[u],c=t.keys[u+1];o.expand(a,t.tmp,0),h^=t.tmp[0],c^=t.tmp[1];var l=o.substitute(h,c),d=a;a=(s^o.permute(l))>>>0,s=d}o.rip(a,s,r,i)},u.prototype._decrypt=function(t,e,n,r,i){for(var s=n,a=e,u=t.keys.length-2;u>=0;u-=2){var h=t.keys[u],c=t.keys[u+1];o.expand(s,t.tmp,0),h^=t.tmp[0],c^=t.tmp[1];var l=o.substitute(h,c),d=s;s=(a^o.permute(l))>>>0,a=d}o.rip(s,a,r,i)}},651:(t,e,n)=>{"use strict";var r=n(9746),i=n(5717),o=n(5756),s=n(778);function a(t,e){r.equal(e.length,24,"Invalid key length");var n=e.slice(0,8),i=e.slice(8,16),o=e.slice(16,24);this.ciphers="encrypt"===t?[s.create({type:"encrypt",key:n}),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:n})]}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,n,r){var i=this._edeState;i.ciphers[0]._update(t,e,n,r),i.ciphers[1]._update(n,r,n,r),i.ciphers[2]._update(n,r,n,r)},u.prototype._pad=s.prototype._pad,u.prototype._unpad=s.prototype._unpad},1278:(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,n){t[0+n]=e>>>24,t[1+n]=e>>>16&255,t[2+n]=e>>>8&255,t[3+n]=255&e},e.ip=function(t,e,n,r){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}n[r+0]=i>>>0,n[r+1]=o>>>0},e.rip=function(t,e,n,r){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;n[r+0]=i>>>0,n[r+1]=o>>>0},e.pc1=function(t,e,n,r){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;n[r+0]=i>>>0,n[r+1]=o>>>0},e.r28shl=function(t,e){return t<<e&268435455|t>>>28-e};var n=[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,r,i){for(var o=0,s=0,a=n.length>>>1,u=0;u<a;u++)o<<=1,o|=t>>>n[u]&1;for(u=a;u<n.length;u++)s<<=1,s|=e>>>n[u]&1;r[i+0]=o>>>0,r[i+1]=s>>>0},e.expand=function(t,e,n){var r=0,i=0;r=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)r<<=6,r|=t>>>o&63;for(o=11;o>=3;o-=4)i|=t>>>o&63,i<<=6;i|=(31&t)<<1|t>>>31,e[n+0]=r>>>0,e[n+1]=i>>>0};var r=[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 n=0,i=0;i<4;i++)n<<=4,n|=r[64*i+(t>>>18-6*i&63)];for(i=0;i<4;i++)n<<=4,n|=r[256+64*i+(e>>>18-6*i&63)];return n>>>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,n=0;n<i.length;n++)e<<=1,e|=t>>>i[n]&1;return e>>>0},e.padSplit=function(t,e,n){for(var r=t.toString(2);r.length<e;)r="0"+r;for(var i=[],o=0;o<e;o+=n)i.push(r.slice(o,o+n));return i.join(" ")}},2607:(t,e,n)=>{var r=n(8764).Buffer,i=n(3590),o=n(1930),s=n(7426),a={binary:!0,hex:!0,base64:!0};e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=function(t){var e=new r(o[t].prime,"hex"),n=new r(o[t].gen,"hex");return new s(e,n)},e.createDiffieHellman=e.DiffieHellman=function t(e,n,o,u){return r.isBuffer(n)||void 0===a[n]?t(e,"binary",n,o):(n=n||"binary",u=u||"binary",o=o||new r([2]),r.isBuffer(o)||(o=new r(o,u)),"number"==typeof e?new s(i(e,o),o,!0):(r.isBuffer(e)||(e=new r(e,n)),new s(e,o,!0)))}},7426:(t,e,n)=>{var r=n(8764).Buffer,i=n(3620),o=new(n(3047)),s=new i(24),a=new i(11),u=new i(10),h=new i(3),c=new i(7),l=n(3590),d=n(1798);function f(t,e){return e=e||"utf8",r.isBuffer(t)||(t=new r(t,e)),this._pub=new i(t),this}function p(t,e){return e=e||"utf8",r.isBuffer(t)||(t=new r(t,e)),this._priv=new i(t),this}t.exports=g;var m={};function g(t,e,n){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,n?(this.setPublicKey=f,this.setPrivateKey=p):this._primeCode=8}function v(t,e){var n=new r(t.toArray());return e?n.toString(e):n}Object.defineProperty(g.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,e){var n=e.toString("hex"),r=[n,t.toString(16)].join("_");if(r in m)return m[r];var i,d=0;if(t.isEven()||!l.simpleSieve||!l.fermatTest(t)||!o.test(t))return d+=1,d+="02"===n||"05"===n?8:4,m[r]=d,d;switch(o.test(t.shrn(1))||(d+=2),n){case"02":t.mod(s).cmp(a)&&(d+=8);break;case"05":(i=t.mod(u)).cmp(h)&&i.cmp(c)&&(d+=8);break;default:d+=4}return m[r]=d,d}(this.__prime,this.__gen)),this._primeCode}}),g.prototype.generateKeys=function(){return this._priv||(this._priv=new i(d(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},g.prototype.computeSecret=function(t){var e=(t=(t=new i(t)).toRed(this._prime)).redPow(this._priv).fromRed(),n=new r(e.toArray()),o=this.getPrime();if(n.length<o.length){var s=new r(o.length-n.length);s.fill(0),n=r.concat([s,n])}return n},g.prototype.getPublicKey=function(t){return v(this._pub,t)},g.prototype.getPrivateKey=function(t){return v(this._priv,t)},g.prototype.getPrime=function(t){return v(this.__prime,t)},g.prototype.getGenerator=function(t){return v(this._gen,t)},g.prototype.setGenerator=function(t,e){return e=e||"utf8",r.isBuffer(t)||(t=new r(t,e)),this.__gen=t,this._gen=new i(t),this}},3590:(t,e,n)=>{var r=n(1798);t.exports=b,b.simpleSieve=g,b.fermatTest=v;var i=n(3620),o=new i(24),s=new(n(3047)),a=new i(1),u=new i(2),h=new i(5),c=(new i(16),new i(8),new i(10)),l=new i(3),d=(new i(7),new i(11)),f=new i(4),p=(new i(12),null);function m(){if(null!==p)return p;var t=[];t[0]=2;for(var e=1,n=3;n<1048576;n+=2){for(var r=Math.ceil(Math.sqrt(n)),i=0;i<e&&t[i]<=r&&n%t[i]!=0;i++);e!==i&&t[i]<=r||(t[e++]=n)}return p=t,t}function g(t){for(var e=m(),n=0;n<e.length;n++)if(0===t.modn(e[n]))return 0===t.cmpn(e[n]);return!0}function v(t){var e=i.mont(t);return 0===u.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)}function b(t,e){if(t<16)return new i(2===e||5===e?[140,123]:[140,39]);var n,p;for(e=new i(e);;){for(n=new i(r(Math.ceil(t/8)));n.bitLength()>t;)n.ishrn(1);if(n.isEven()&&n.iadd(a),n.testn(1)||n.iadd(u),e.cmp(u)){if(!e.cmp(h))for(;n.mod(c).cmp(l);)n.iadd(f)}else for(;n.mod(o).cmp(d);)n.iadd(f);if(g(p=n.shrn(1))&&g(n)&&v(p)&&v(n)&&s.test(p)&&s.test(n))return n}}},1930: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"}}')},3620:function(t,e,n){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"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:n(7748).Buffer}catch(t){}function a(t,e){var n=t.charCodeAt(e);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function u(t,e,n){var r=a(t,n);return n-1>=e&&(r|=a(t,n-1)<<4),r}function h(t,e,n,r){for(var i=0,o=Math.min(t.length,n),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=r,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,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(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,n):(this._parseBase(t,e,i),"le"===n&&this._initArray(this.toArray(),e,n)))},o.prototype._initNumber=function(t,e,n){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):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initArray=function(t,e,n){if(r("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"===n)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"===n)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,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,s=0;if("be"===n)for(r=t.length-1;r>=e;r-=2)i=u(t,e,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)i=u(t,e,r)<<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,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,s=o%r,a=Math.min(o,o-s)+n,u=0,c=n;c<a;c+=r)u=h(t,c,c+r,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=h(t,c,t.length,e),c=0;c<s;c++)l*=e;this.imuln(l),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 c=["","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"],l=[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 f(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var h=1;h<r;h++){for(var c=u>>>26,l=67108863&u,d=Math.min(h,e.length-1),f=Math.max(0,h-t.length+1);f<=d;f++){var p=h-f|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[f])+l)/67108864|0,l=67108863&s}n.words[h]=0|l,u=0|c}return 0!==u?n.words[h]=0|u:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);n=0!=(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var h=l[t],f=d[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(t);n=(p=p.idivn(f)).isZero()?m+n:c[h-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!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&&r(!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 r(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,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,h=new t(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[a]=s;for(;a<o;a++)h[a]=0}else{for(a=0;a<o-i;a++)h[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[o-a-1]=s}return h},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},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 n=this._zeroBits(this.words[e]);if(t+=n,26!==n)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 r(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 n=0;n<e.length;n++)this.words[n]=this.words[n]&t.words[n];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return r(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,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;r<n.length;r++)this.words[r]=e.words[r]^n.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return r(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){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,n,r;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?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o<r.length;o++)e=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<n.length;o++)e=(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.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 n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(e=(0|n.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<n.length;s++)o=(e=(0|n.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,n){var r,i,o,s=t.words,a=e.words,u=n.words,h=0,c=0|s[0],l=8191&c,d=c>>>13,f=0|s[1],p=8191&f,m=f>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,_=y>>>13,M=0|s[4],S=8191&M,E=M>>>13,A=0|s[5],k=8191&A,x=A>>>13,R=0|s[6],I=8191&R,T=R>>>13,C=0|s[7],B=8191&C,D=C>>>13,P=0|s[8],U=8191&P,O=P>>>13,N=0|s[9],q=8191&N,L=N>>>13,j=0|a[0],K=8191&j,$=j>>>13,z=0|a[1],H=8191&z,W=z>>>13,V=0|a[2],F=8191&V,J=V>>>13,G=0|a[3],Z=8191&G,Y=G>>>13,X=0|a[4],Q=8191&X,tt=X>>>13,et=0|a[5],nt=8191&et,rt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ht=at>>>13,ct=0|a[8],lt=8191&ct,dt=ct>>>13,ft=0|a[9],pt=8191&ft,mt=ft>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(h+(r=Math.imul(l,K))|0)+((8191&(i=(i=Math.imul(l,$))+Math.imul(d,K)|0))<<13)|0;h=((o=Math.imul(d,$))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,K),i=(i=Math.imul(p,$))+Math.imul(m,K)|0,o=Math.imul(m,$);var vt=(h+(r=r+Math.imul(l,H)|0)|0)+((8191&(i=(i=i+Math.imul(l,W)|0)+Math.imul(d,H)|0))<<13)|0;h=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,K),i=(i=Math.imul(v,$))+Math.imul(b,K)|0,o=Math.imul(b,$),r=r+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var bt=(h+(r=r+Math.imul(l,F)|0)|0)+((8191&(i=(i=i+Math.imul(l,J)|0)+Math.imul(d,F)|0))<<13)|0;h=((o=o+Math.imul(d,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,K),i=(i=Math.imul(w,$))+Math.imul(_,K)|0,o=Math.imul(_,$),r=r+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,W)|0,r=r+Math.imul(p,F)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,F)|0,o=o+Math.imul(m,J)|0;var yt=(h+(r=r+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(d,Z)|0))<<13)|0;h=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,K),i=(i=Math.imul(S,$))+Math.imul(E,K)|0,o=Math.imul(E,$),r=r+Math.imul(w,H)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,r=r+Math.imul(v,F)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(b,F)|0,o=o+Math.imul(b,J)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,Y)|0;var wt=(h+(r=r+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(d,Q)|0))<<13)|0;h=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,K),i=(i=Math.imul(k,$))+Math.imul(x,K)|0,o=Math.imul(x,$),r=r+Math.imul(S,H)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(E,H)|0,o=o+Math.imul(E,W)|0,r=r+Math.imul(w,F)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,F)|0,o=o+Math.imul(_,J)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,Y)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var _t=(h+(r=r+Math.imul(l,nt)|0)|0)+((8191&(i=(i=i+Math.imul(l,rt)|0)+Math.imul(d,nt)|0))<<13)|0;h=((o=o+Math.imul(d,rt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(I,K),i=(i=Math.imul(I,$))+Math.imul(T,K)|0,o=Math.imul(T,$),r=r+Math.imul(k,H)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,W)|0,r=r+Math.imul(S,F)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(E,F)|0,o=o+Math.imul(E,J)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,Y)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var Mt=(h+(r=r+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;h=((o=o+Math.imul(d,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(B,K),i=(i=Math.imul(B,$))+Math.imul(D,K)|0,o=Math.imul(D,$),r=r+Math.imul(I,H)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,W)|0,r=r+Math.imul(k,F)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(x,F)|0,o=o+Math.imul(x,J)|0,r=r+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(E,Z)|0,o=o+Math.imul(E,Y)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(v,nt)|0,i=(i=i+Math.imul(v,rt)|0)+Math.imul(b,nt)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(h+(r=r+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(d,ut)|0))<<13)|0;h=((o=o+Math.imul(d,ht)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(U,K),i=(i=Math.imul(U,$))+Math.imul(O,K)|0,o=Math.imul(O,$),r=r+Math.imul(B,H)|0,i=(i=i+Math.imul(B,W)|0)+Math.imul(D,H)|0,o=o+Math.imul(D,W)|0,r=r+Math.imul(I,F)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(T,F)|0,o=o+Math.imul(T,J)|0,r=r+Math.imul(k,Z)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(w,nt)|0,i=(i=i+Math.imul(w,rt)|0)+Math.imul(_,nt)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var Et=(h+(r=r+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;h=((o=o+Math.imul(d,dt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,K),i=(i=Math.imul(q,$))+Math.imul(L,K)|0,o=Math.imul(L,$),r=r+Math.imul(U,H)|0,i=(i=i+Math.imul(U,W)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,W)|0,r=r+Math.imul(B,F)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(D,F)|0,o=o+Math.imul(D,J)|0,r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,Y)|0,r=r+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,r=r+Math.imul(S,nt)|0,i=(i=i+Math.imul(S,rt)|0)+Math.imul(E,nt)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,r=r+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ht)|0,r=r+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var At=(h+(r=r+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;h=((o=o+Math.imul(d,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,H),i=(i=Math.imul(q,W))+Math.imul(L,H)|0,o=Math.imul(L,W),r=r+Math.imul(U,F)|0,i=(i=i+Math.imul(U,J)|0)+Math.imul(O,F)|0,o=o+Math.imul(O,J)|0,r=r+Math.imul(B,Z)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,Y)|0,r=r+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,nt)|0,i=(i=i+Math.imul(k,rt)|0)+Math.imul(x,nt)|0,o=o+Math.imul(x,rt)|0,r=r+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ht)|0,r=r+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(h+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,F),i=(i=Math.imul(q,J))+Math.imul(L,F)|0,o=Math.imul(L,J),r=r+Math.imul(U,Z)|0,i=(i=i+Math.imul(U,Y)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Y)|0,r=r+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(I,nt)|0,i=(i=i+Math.imul(I,rt)|0)+Math.imul(T,nt)|0,o=o+Math.imul(T,rt)|0,r=r+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,r=r+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,ht)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ht)|0,r=r+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,dt)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,dt)|0;var xt=(h+(r=r+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;h=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(q,Z),i=(i=Math.imul(q,Y))+Math.imul(L,Z)|0,o=Math.imul(L,Y),r=r+Math.imul(U,Q)|0,i=(i=i+Math.imul(U,tt)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,r=r+Math.imul(B,nt)|0,i=(i=i+Math.imul(B,rt)|0)+Math.imul(D,nt)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ht)|0,r=r+Math.imul(S,lt)|0,i=(i=i+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var Rt=(h+(r=r+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;h=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,Q),i=(i=Math.imul(q,tt))+Math.imul(L,Q)|0,o=Math.imul(L,tt),r=r+Math.imul(U,nt)|0,i=(i=i+Math.imul(U,rt)|0)+Math.imul(O,nt)|0,o=o+Math.imul(O,rt)|0,r=r+Math.imul(B,ot)|0,i=(i=i+Math.imul(B,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ht)|0,r=r+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,dt)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,dt)|0;var It=(h+(r=r+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;h=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,nt),i=(i=Math.imul(q,rt))+Math.imul(L,nt)|0,o=Math.imul(L,rt),r=r+Math.imul(U,ot)|0,i=(i=i+Math.imul(U,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,r=r+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,ht)|0)+Math.imul(D,ut)|0,o=o+Math.imul(D,ht)|0,r=r+Math.imul(I,lt)|0,i=(i=i+Math.imul(I,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(h+(r=r+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,mt)|0)+Math.imul(x,pt)|0))<<13)|0;h=((o=o+Math.imul(x,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),i=(i=Math.imul(q,st))+Math.imul(L,ot)|0,o=Math.imul(L,st),r=r+Math.imul(U,ut)|0,i=(i=i+Math.imul(U,ht)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,ht)|0,r=r+Math.imul(B,lt)|0,i=(i=i+Math.imul(B,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Ct=(h+(r=r+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(T,pt)|0))<<13)|0;h=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(q,ut),i=(i=Math.imul(q,ht))+Math.imul(L,ut)|0,o=Math.imul(L,ht),r=r+Math.imul(U,lt)|0,i=(i=i+Math.imul(U,dt)|0)+Math.imul(O,lt)|0,o=o+Math.imul(O,dt)|0;var Bt=(h+(r=r+Math.imul(B,pt)|0)|0)+((8191&(i=(i=i+Math.imul(B,mt)|0)+Math.imul(D,pt)|0))<<13)|0;h=((o=o+Math.imul(D,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,lt),i=(i=Math.imul(q,dt))+Math.imul(L,lt)|0,o=Math.imul(L,dt);var Dt=(h+(r=r+Math.imul(U,pt)|0)|0)+((8191&(i=(i=i+Math.imul(U,mt)|0)+Math.imul(O,pt)|0))<<13)|0;h=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Pt=(h+(r=Math.imul(q,pt))|0)+((8191&(i=(i=Math.imul(q,mt))+Math.imul(L,pt)|0))<<13)|0;return h=((o=Math.imul(L,mt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=gt,u[1]=vt,u[2]=bt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=St,u[8]=Et,u[9]=At,u[10]=kt,u[11]=xt,u[12]=Rt,u[13]=It,u[14]=Tt,u[15]=Ct,u[16]=Bt,u[17]=Dt,u[18]=Pt,0!==h&&(u[19]=h,n.length++),n};function m(t,e,n){return(new g).mulp(t,e,n)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=f),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):n<63?f(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,u=Math.min(o,e.length-1),h=Math.max(0,o-t.length+1);h<=u;h++){var c=o-h,l=(0|t.words[c])*(0|e.words[h]),d=67108863&l;a=67108863&(d=d+a|0),i+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):m(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,n,t);return e},g.prototype.revBin=function(t,e,n){if(0===t||t===n-1)return t;for(var r=0,i=0;i<e;i++)r|=(1&t)<<e-i-1,t>>=1;return r},g.prototype.permute=function(t,e,n,r,i,o){for(var s=0;s<o;s++)r[s]=e[t[s]],i[s]=n[t[s]]},g.prototype.transform=function(t,e,n,r,i,o){this.permute(o,t,e,n,r,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),h=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var l=u,d=h,f=0;f<s;f++){var p=n[c+f],m=r[c+f],g=n[c+f+s],v=r[c+f+s],b=l*g-d*v;v=l*v+d*g,g=b,n[c+f]=p+g,r[c+f]=m+v,n[c+f+s]=p-g,r[c+f+s]=m-v,f!==a&&(b=u*l-h*d,d=u*d+h*l,l=b)}},g.prototype.guessLen13b=function(t,e){var n=1|Math.max(e,t),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},g.prototype.conjugate=function(t,e,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=t[r];t[r]=t[n-r-1],t[n-r-1]=i,i=e[r],e[r]=-e[n-r-1],e[n-r-1]=-i}},g.prototype.normalize13b=function(t,e){for(var n=0,r=0;r<e/2;r++){var i=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+n;t[r]=67108863&i,n=i<67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,n,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],n[2*s]=8191&o,o>>>=13,n[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)n[s]=0;r(0===o),r(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=0;return e},g.prototype.mulp=function(t,e,n){var r=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(r),o=this.stub(r),s=new Array(r),a=new Array(r),u=new Array(r),h=new Array(r),c=new Array(r),l=new Array(r),d=n.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,h,r),this.transform(s,o,a,u,r,i),this.transform(h,o,c,l,r,i);for(var f=0;f<r;f++){var p=a[f]*c[f]-u[f]*l[f];u[f]=a[f]*l[f]+u[f]*c[f],a[f]=p}return this.conjugate(a,u,r),this.transform(a,u,d,o,r,i),this.conjugate(d,o,r),this.normalize13b(d,r),n.negative=t.negative^e.negative,n.length=t.length+e.length,n.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){r("number"==typeof t),r(t<67108864);for(var e=0,n=0;n<this.length;n++){var i=(0|this.words[n])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=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()),n=0;n<e.length;n++){var r=n/26|0,i=n%26;e[n]=(t.words[r]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r<e.length&&0===e[r];r++,n=n.sqr());if(++r<e.length)for(var i=n.sqr();r<e.length;r++,i=i.sqr())0!==e[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<n;this.words[e]=u|s,s=a>>>26-n}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 r(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,n){var i;r("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=n;if(i-=s,i=Math.max(0,i),u){for(var h=0;h<s;h++)u.words[h]=this.words[h];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,h=0;h<this.length;h++)this.words[h]=this.words[h+s];else this.words[0]=0,this.length=1;var c=0;for(h=this.length-1;h>=0&&(0!==c||h>=i);h--){var l=0|this.words[h];this.words[h]=c<<26-o|l>>>o,c=l&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},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){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<<e;return!(this.length<=n||!(this.words[n]&i))},o.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,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 r("number"==typeof t),r(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(r("number"==typeof t),r(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,n){var i,o,s=t.length+n;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+n])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)a=(o=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&o;if(0===a)return this.strip();for(r(-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 n=(this.length,t.length),r=this.clone(),i=t,s=0|i.words[i.length-1];0!=(n=26-this._countBits(s))&&(i=i.ushln(n),r.iushln(n),s=0|i.words[i.length-1]);var a,u=r.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h<a.length;h++)a.words[h]=0}var c=r.clone()._ishlnsubmul(i,1,u);0===c.negative&&(r=c,a&&(a.words[u]=1));for(var l=u-1;l>=0;l--){var d=67108864*(0|r.words[i.length+l])+(0|r.words[i.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(i,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,l),r.isZero()||(r.negative^=1);a&&(a.words[l]=d)}return a&&a.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!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(),n&&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(),n&&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 n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);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){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=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),h=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++h;for(var c=n.clone(),l=e.clone();!e.isZero();){for(var d=0,f=1;0==(e.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(l)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(l)),a.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(a),s.isub(u)):(n.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:n.iushln(h)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var h=0,c=1;0==(e.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,d=1;0==(n.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(n.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(n)>=0?(e.isub(n),s.isub(a)):(n.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(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},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){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,s=n;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,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(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,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){r<i?e=-1:r>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 S(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function b(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 y(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){S.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)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(y,b),y.prototype.split=function(t,e){for(var n=4194303,r=Math.min(t.length,9),i=0;i<r;i++)e.words[i]=t.words[i];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&n,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&n)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n<t.length;n++){var r=0|t.words[n];e+=977*r,t.words[n]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(w,b),i(_,b),i(M,b),M.prototype.imulK=function(t){for(var e=0,n=0;n<t.length;n++){var r=19*(0|t.words[n])+e,i=67108863&r;r>>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new y;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 M}return v[t]=e,e},S.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var l=this.pow(c,i),d=this.pow(t,i.addn(1).iushrn(1)),f=this.pow(t,i),p=s;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<p);var v=this.pow(l,new o(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),f=f.redMul(l),p=g}return d},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=t;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],t);var i=n[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),r=e.length-1;r>=0;r--){for(var h=e.words[r],c=u-1;c>=0;c--){var l=h>>c&1;i!==n[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===r&&0===c)&&(i=this.mul(i,n[s]),a=0,s=0)):a=0}u=26}return i},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new E(t)},i(E,S),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).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)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).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)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=n.nmd(t),this)},6266:(t,e,n)=>{"use strict";var r=e;r.version=n(7519).i8,r.utils=n(953),r.rand=n(9931),r.curve=n(8254),r.curves=n(5427),r.ec=n(7954),r.eddsa=n(5980)},4918:(t,e,n)=>{"use strict";var r=n(3785),i=n(953),o=i.getNAF,s=i.getJSF,a=i.assert;function u(t,e){this.type=t,this.p=new r(e.p,16),this.red=e.prime?r.red(e.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=e.n&&new r(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 n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function h(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 n=t._getDoubles(),r=o(e,1,this._bitLength),i=(1<<n.step+1)-(n.step%2==0?2:1);i/=3;var s,u,h=[];for(s=0;s<r.length;s+=n.step){u=0;for(var c=s+n.step-1;c>=s;c--)u=(u<<1)+r[c];h.push(u)}for(var l=this.jpoint(null,null,null),d=this.jpoint(null,null,null),f=i;f>0;f--){for(s=0;s<h.length;s++)(u=h[s])===f?d=d.mixedAdd(n.points[s]):u===-f&&(d=d.mixedAdd(n.points[s].neg()));l=l.add(d)}return l.toP()},u.prototype._wnafMul=function(t,e){var n=4,r=t._getNAFPoints(n);n=r.wnd;for(var i=r.points,s=o(e,n,this._bitLength),u=this.jpoint(null,null,null),h=s.length-1;h>=0;h--){for(var c=0;h>=0&&0===s[h];h--)c++;if(h>=0&&c++,u=u.dblp(c),h<0)break;var l=s[h];a(0!==l),u="affine"===t.type?l>0?u.mixedAdd(i[l-1>>1]):u.mixedAdd(i[-l-1>>1].neg()):l>0?u.add(i[l-1>>1]):u.add(i[-l-1>>1].neg())}return"affine"===t.type?u.toP():u},u.prototype._wnafMulAdd=function(t,e,n,r,i){var a,u,h,c=this._wnafT1,l=this._wnafT2,d=this._wnafT3,f=0;for(a=0;a<r;a++){var p=(h=e[a])._getNAFPoints(t);c[a]=p.wnd,l[a]=p.points}for(a=r-1;a>=1;a-=2){var m=a-1,g=a;if(1===c[m]&&1===c[g]){var v=[e[m],null,null,e[g]];0===e[m].y.cmp(e[g].y)?(v[1]=e[m].add(e[g]),v[2]=e[m].toJ().mixedAdd(e[g].neg())):0===e[m].y.cmp(e[g].y.redNeg())?(v[1]=e[m].toJ().mixedAdd(e[g]),v[2]=e[m].add(e[g].neg())):(v[1]=e[m].toJ().mixedAdd(e[g]),v[2]=e[m].toJ().mixedAdd(e[g].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],y=s(n[m],n[g]);for(f=Math.max(y[0].length,f),d[m]=new Array(f),d[g]=new Array(f),u=0;u<f;u++){var w=0|y[0][u],_=0|y[1][u];d[m][u]=b[3*(w+1)+(_+1)],d[g][u]=0,l[m]=v}}else d[m]=o(n[m],c[m],this._bitLength),d[g]=o(n[g],c[g],this._bitLength),f=Math.max(d[m].length,f),f=Math.max(d[g].length,f)}var M=this.jpoint(null,null,null),S=this._wnafT4;for(a=f;a>=0;a--){for(var E=0;a>=0;){var A=!0;for(u=0;u<r;u++)S[u]=0|d[u][a],0!==S[u]&&(A=!1);if(!A)break;E++,a--}if(a>=0&&E++,M=M.dblp(E),a<0)break;for(u=0;u<r;u++){var k=S[u];0!==k&&(k>0?h=l[u][k-1>>1]:k<0&&(h=l[u][-k-1>>1].neg()),M="affine"===h.type?M.mixedAdd(h):M.add(h))}}for(a=0;a<r;a++)l[a]=null;return i?M:M.toP()},u.BasePoint=h,h.prototype.eq=function(){throw new Error("Not implemented")},h.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(t,e){t=i.toArray(t,e);var n=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*n)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+n),t.slice(1+n,1+2*n));if((2===t[0]||3===t[0])&&t.length-1===n)return this.pointFromX(t.slice(1,1+n),3===t[0]);throw new Error("Unknown point format")},h.prototype.encodeCompressed=function(t){return this.encode(t,!0)},h.prototype._encode=function(t){var e=this.curve.p.byteLength(),n=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",e))},h.prototype.encode=function(t,e){return i.encode(this._encode(e),t)},h.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},h.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)},h.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<e;i+=t){for(var o=0;o<t;o++)r=r.dbl();n.push(r)}return{step:t,points:n}},h.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],n=(1<<t)-1,r=1===n?null:this.dbl(),i=1;i<n;i++)e[i]=e[i-1].add(r);return{wnd:t,points:e}},h.prototype._getBeta=function(){return null},h.prototype.dblp=function(t){for(var e=this,n=0;n<t;n++)e=e.dbl();return e}},1138:(t,e,n)=>{"use strict";var r=n(953),i=n(3785),o=n(5717),s=n(4918),a=r.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 h(t,e,n,r,o){s.BasePoint.call(this,t,"projective"),null===e&&null===n&&null===r?(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(n,16),this.z=r?new i(r,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,n,r){return this.point(t,e,n,r)},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var n=t.redSqr(),r=this.c2.redSub(this.a.redMul(n)),o=this.one.redSub(this.c2.redMul(this.d).redMul(n)),s=r.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 n=t.redSqr(),r=n.redSub(this.c2),o=n.redMul(this.d).redMul(this.c2).redSub(this.a),s=r.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(),n=t.y.redSqr(),r=e.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(n)));return 0===r.cmp(i)},o(h,s.BasePoint),u.prototype.pointFromJSON=function(t){return h.fromJSON(this,t)},u.prototype.point=function(t,e,n,r){return new h(this,t,e,n,r)},h.fromJSON=function(t,e){return new h(t,e[0],e[1],e[2])},h.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)+">"},h.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},h.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var r=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=r.redAdd(e),s=o.redSub(n),a=r.redSub(e),u=i.redMul(s),h=o.redMul(a),c=i.redMul(a),l=s.redMul(o);return this.curve.point(u,h,l,c)},h.prototype._projDbl=function(){var t,e,n,r,i,o,s=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var h=(r=this.curve._mulA(a)).redAdd(u);this.zOne?(t=s.redSub(a).redSub(u).redMul(h.redSub(this.curve.two)),e=h.redMul(r.redSub(u)),n=h.redSqr().redSub(h).redSub(h)):(i=this.z.redSqr(),o=h.redSub(i).redISub(i),t=s.redSub(a).redISub(u).redMul(o),e=h.redMul(r.redSub(u)),n=h.redMul(o))}else r=a.redAdd(u),i=this.curve._mulC(this.z).redSqr(),o=r.redSub(i).redSub(i),t=this.curve._mulC(s.redISub(r)).redMul(o),e=this.curve._mulC(r).redMul(a.redISub(u)),n=r.redMul(o);return this.curve.point(t,e,n)},h.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},h.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),n=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),r=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),o=n.redSub(e),s=i.redSub(r),a=i.redAdd(r),u=n.redAdd(e),h=o.redMul(s),c=a.redMul(u),l=o.redMul(u),d=s.redMul(a);return this.curve.point(h,c,d,l)},h.prototype._projAdd=function(t){var e,n,r=this.z.redMul(t.z),i=r.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),h=i.redAdd(a),c=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(s),l=r.redMul(u).redMul(c);return this.curve.twisted?(e=r.redMul(h).redMul(s.redSub(this.curve._mulA(o))),n=u.redMul(h)):(e=r.redMul(h).redMul(s.redSub(o)),n=this.curve._mulC(u).redMul(h)),this.curve.point(l,e,n)},h.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},h.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},h.prototype.mulAdd=function(t,e,n){return this.curve._wnafMulAdd(1,[this,e],[t,n],2,!1)},h.prototype.jmulAdd=function(t,e,n){return this.curve._wnafMulAdd(1,[this,e],[t,n],2,!0)},h.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},h.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},h.prototype.getX=function(){return this.normalize(),this.x.fromRed()},h.prototype.getY=function(){return this.normalize(),this.y.fromRed()},h.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},h.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var n=t.clone(),r=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(r),0===this.x.cmp(e))return!0}},h.prototype.toP=h.prototype.normalize,h.prototype.mixedAdd=h.prototype.add},8254:(t,e,n)=>{"use strict";var r=e;r.base=n(4918),r.short=n(6673),r.mont=n(2881),r.edwards=n(1138)},2881:(t,e,n)=>{"use strict";var r=n(3785),i=n(5717),o=n(4918),s=n(953);function a(t){o.call(this,"mont",t),this.a=new r(t.a,16).toRed(this.red),this.b=new r(t.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(t,e,n){o.BasePoint.call(this,t,"projective"),null===e&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(e,16),this.z=new r(n,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,n=e.redSqr(),r=n.redMul(e).redAdd(n.redMul(this.a)).redAdd(e);return 0===r.redSqrt().redSqr().cmp(r)},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(),n=t.redSub(e),r=t.redMul(e),i=n.redMul(e.redAdd(this.curve.a24.redMul(n)));return this.curve.point(r,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(t,e){var n=this.x.redAdd(this.z),r=this.x.redSub(this.z),i=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(n),s=i.redMul(r),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(),n=this,r=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]?(n=n.diffAdd(r,this),r=r.dbl()):(r=n.diffAdd(r,this),n=n.dbl());return r},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()}},6673:(t,e,n)=>{"use strict";var r=n(953),i=n(3785),o=n(5717),s=n(4918),a=r.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 h(t,e,n,r){s.BasePoint.call(this,t,"affine"),null===e&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(e,16),this.y=new i(n,16),r&&(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 c(t,e,n,r){s.BasePoint.call(this,t,"jacobian"),null===e&&null===n&&null===r?(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(n,16),this.z=new i(r,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,n;if(t.beta)e=new i(t.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);e=(e=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(t.lambda)n=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))?n=o[0]:(n=o[1],a(0===this.g.mul(n).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:n,basis:t.basis?t.basis.map((function(t){return{a:new i(t.a,16),b:new i(t.b,16)}})):this._getEndoBasis(n)}}},u.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:i.mont(t),n=new i(2).toRed(e).redInvm(),r=n.redNeg(),o=new i(3).toRed(e).redNeg().redSqrt().redMul(n);return[r.redAdd(o).fromRed(),r.redSub(o).fromRed()]},u.prototype._getEndoBasis=function(t){for(var e,n,r,o,s,a,u,h,c,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=t,f=this.n.clone(),p=new i(1),m=new i(0),g=new i(0),v=new i(1),b=0;0!==d.cmpn(0);){var y=f.div(d);h=f.sub(y.mul(d)),c=g.sub(y.mul(p));var w=v.sub(y.mul(m));if(!r&&h.cmp(l)<0)e=u.neg(),n=p,r=h.neg(),o=c;else if(r&&2==++b)break;u=h,f=d,d=h,g=p,p=c,v=m,m=w}s=h.neg(),a=c;var _=r.sqr().add(o.sqr());return s.sqr().add(a.sqr()).cmp(_)>=0&&(s=e,a=n),r.negative&&(r=r.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:r,b:o},{a:s,b:a}]},u.prototype._endoSplit=function(t){var e=this.endo.basis,n=e[0],r=e[1],i=r.b.mul(t).divRound(this.n),o=n.b.neg().mul(t).divRound(this.n),s=i.mul(n.a),a=o.mul(r.a),u=i.mul(n.b),h=o.mul(r.b);return{k1:t.sub(s).sub(a),k2:u.add(h).neg()}},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var n=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var o=r.fromRed().isOdd();return(e&&!o||!e&&o)&&(r=r.redNeg()),this.point(t,r)},u.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,n=t.y,r=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(t,e,n){for(var r=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)),r[2*o]=a,r[2*o+1]=u,i[2*o]=s.k1,i[2*o+1]=s.k2}for(var h=this._wnafMulAdd(1,r,i,2*o,n),c=0;c<2*o;c++)r[c]=null,i[c]=null;return h},o(h,s.BasePoint),u.prototype.point=function(t,e,n){return new h(this,t,e,n)},u.prototype.pointFromJSON=function(t,e){return h.fromJSON(this,t,e)},h.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 n=this.curve,r=function(t){return n.point(t.x.redMul(n.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(r)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(r)}}}return e}},h.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]},h.fromJSON=function(t,e,n){"string"==typeof e&&(e=JSON.parse(e));var r=t.point(e[0],e[1],n);if(!e[2])return r;function i(e){return t.point(e[0],e[1],n)}var o=e[2];return r.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[r].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[r].concat(o.naf.points.map(i))}},r},h.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)+">"},h.prototype.isInfinity=function(){return this.inf},h.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 n=e.redSqr().redISub(this.x).redISub(t.x),r=e.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},h.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,n=this.x.redSqr(),r=t.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(e).redMul(r),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)},h.prototype.getX=function(){return this.x.fromRed()},h.prototype.getY=function(){return this.y.fromRed()},h.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)},h.prototype.mulAdd=function(t,e,n){var r=[this,e],i=[t,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},h.prototype.jmulAdd=function(t,e,n){var r=[this,e],i=[t,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i,!0):this.curve._wnafMulAdd(1,r,i,2,!0)},h.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))},h.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var n=this.precomputed,r=function(t){return t.neg()};e.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return e},h.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(c,s.BasePoint),u.prototype.jpoint=function(t,e,n){return new c(this,t,e,n)},c.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),n=this.x.redMul(e),r=this.y.redMul(e).redMul(t);return this.curve.point(n,r)},c.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},c.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(e),i=t.x.redMul(n),o=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(n.redMul(this.z)),a=r.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 h=a.redSqr(),c=h.redMul(a),l=r.redMul(h),d=u.redSqr().redIAdd(c).redISub(l).redISub(l),f=u.redMul(l.redISub(d)).redISub(o.redMul(c)),p=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(d,f,p)},c.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),n=this.x,r=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),s=n.redSub(r),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(),h=u.redMul(s),c=n.redMul(u),l=a.redSqr().redIAdd(h).redISub(c).redISub(c),d=a.redMul(c.redISub(l)).redISub(i.redMul(h)),f=this.z.redMul(s);return this.curve.jpoint(l,d,f)},c.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 n=this;for(e=0;e<t;e++)n=n.dbl();return n}var r=this.curve.a,i=this.curve.tinv,o=this.x,s=this.y,a=this.z,u=a.redSqr().redSqr(),h=s.redAdd(s);for(e=0;e<t;e++){var c=o.redSqr(),l=h.redSqr(),d=l.redSqr(),f=c.redAdd(c).redIAdd(c).redIAdd(r.redMul(u)),p=o.redMul(l),m=f.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),v=f.redMul(g);v=v.redIAdd(v).redISub(d);var b=h.redMul(a);e+1<t&&(u=u.redMul(d)),o=m,a=b,h=v}return this.curve.jpoint(o,h.redMul(i),a)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},c.prototype._zeroDbl=function(){var t,e,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(r).redISub(o);s=s.redIAdd(s);var a=r.redAdd(r).redIAdd(r),u=a.redSqr().redISub(s).redISub(s),h=o.redIAdd(o);h=(h=h.redIAdd(h)).redIAdd(h),t=u,e=a.redMul(s.redISub(u)).redISub(h),n=this.y.redAdd(this.y)}else{var c=this.x.redSqr(),l=this.y.redSqr(),d=l.redSqr(),f=this.x.redAdd(l).redSqr().redISub(c).redISub(d);f=f.redIAdd(f);var p=c.redAdd(c).redIAdd(c),m=p.redSqr(),g=d.redIAdd(d);g=(g=g.redIAdd(g)).redIAdd(g),t=m.redISub(f).redISub(f),e=p.redMul(f.redISub(t)).redISub(g),n=(n=this.y.redMul(this.z)).redIAdd(n)}return this.curve.jpoint(t,e,n)},c.prototype._threeDbl=function(){var t,e,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(r).redISub(o);s=s.redIAdd(s);var a=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),u=a.redSqr().redISub(s).redISub(s);t=u;var h=o.redIAdd(o);h=(h=h.redIAdd(h)).redIAdd(h),e=a.redMul(s.redISub(u)).redISub(h),n=this.y.redAdd(this.y)}else{var c=this.z.redSqr(),l=this.y.redSqr(),d=this.x.redMul(l),f=this.x.redSub(c).redMul(this.x.redAdd(c));f=f.redAdd(f).redIAdd(f);var p=d.redIAdd(d),m=(p=p.redIAdd(p)).redAdd(p);t=f.redSqr().redISub(m),n=this.y.redAdd(this.z).redSqr().redISub(l).redISub(c);var g=l.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),e=f.redMul(p.redISub(t)).redISub(g)}return this.curve.jpoint(t,e,n)},c.prototype._dbl=function(){var t=this.curve.a,e=this.x,n=this.y,r=this.z,i=r.redSqr().redSqr(),o=e.redSqr(),s=n.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(i)),u=e.redAdd(e),h=(u=u.redIAdd(u)).redMul(s),c=a.redSqr().redISub(h.redAdd(h)),l=h.redISub(c),d=s.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var f=a.redMul(l).redISub(d),p=n.redAdd(n).redMul(r);return this.curve.jpoint(c,f,p)},c.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),n=this.z.redSqr(),r=e.redSqr(),i=t.redAdd(t).redIAdd(t),o=i.redSqr(),s=this.x.redAdd(e).redSqr().redISub(t).redISub(r),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),u=r.redIAdd(r);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var h=i.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(u),c=e.redMul(h);c=(c=c.redIAdd(c)).redIAdd(c);var l=this.x.redMul(a).redISub(c);l=(l=l.redIAdd(l)).redIAdd(l);var d=this.y.redMul(h.redMul(u.redISub(h)).redISub(s.redMul(a)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var f=this.z.redAdd(s).redSqr().redISub(n).redISub(a);return this.curve.jpoint(l,d,f)},c.prototype.mul=function(t,e){return t=new i(t,e),this.curve._wnafMul(this,t)},c.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),n=t.z.redSqr();if(0!==this.x.redMul(n).redISub(t.x.redMul(e)).cmpn(0))return!1;var r=e.redMul(this.z),i=n.redMul(t.z);return 0===this.y.redMul(i).redISub(t.y.redMul(r)).cmpn(0)},c.prototype.eqXToP=function(t){var e=this.z.redSqr(),n=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(n))return!0;for(var r=t.clone(),i=this.curve.redN.redMul(e);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},c.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)+">"},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},5427:(t,e,n)=>{"use strict";var r,i=e,o=n(3715),s=n(8254),a=n(953).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 h(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var n=new u(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:n}),n}})}i.PresetCurve=u,h("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"]}),h("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"]}),h("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"]}),h("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"]}),h("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"]}),h("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"]}),h("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{r=n(1037)}catch(t){r=void 0}h("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",r]})},7954:(t,e,n)=>{"use strict";var r=n(3785),i=n(2156),o=n(953),s=n(5427),a=n(9931),u=o.assert,h=n(1251),c=n(611);function l(t){if(!(this instanceof l))return new l(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=l,l.prototype.keyPair=function(t){return new h(this,t)},l.prototype.keyFromPrivate=function(t,e){return h.fromPrivate(this,t,e)},l.prototype.keyFromPublic=function(t,e){return h.fromPublic(this,t,e)},l.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()}),n=this.n.byteLength(),o=this.n.sub(new r(2));;){var s=new r(e.generate(n));if(!(s.cmp(o)>0))return s.iaddn(1),this.keyFromPrivate(s)}},l.prototype._truncateToN=function(t,e){var n=8*t.byteLength()-this.n.bitLength();return n>0&&(t=t.ushrn(n)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},l.prototype.sign=function(t,e,n,o){"object"==typeof n&&(o=n,n=null),o||(o={}),e=this.keyFromPrivate(e,n),t=this._truncateToN(new r(t,16));for(var s=this.n.byteLength(),a=e.getPrivate().toArray("be",s),u=t.toArray("be",s),h=new i({hash:this.hash,entropy:a,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),l=this.n.sub(new r(1)),d=0;;d++){var f=o.k?o.k(d):new r(h.generate(this.n.byteLength()));if(!((f=this._truncateToN(f,!0)).cmpn(1)<=0||f.cmp(l)>=0)){var p=this.g.mul(f);if(!p.isInfinity()){var m=p.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var v=f.invm(this.n).mul(g.mul(e.getPrivate()).iadd(t));if(0!==(v=v.umod(this.n)).cmpn(0)){var b=(p.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return o.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),b^=1),new c({r:g,s:v,recoveryParam:b})}}}}}},l.prototype.verify=function(t,e,n,i){t=this._truncateToN(new r(t,16)),n=this.keyFromPublic(n,i);var o=(e=new c(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),h=u.mul(t).umod(this.n),l=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(h,n.getPublic(),l)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(h,n.getPublic(),l)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},l.prototype.recoverPubKey=function(t,e,n,i){u((3&n)===n,"The recovery param is more than two bits"),e=new c(e,i);var o=this.n,s=new r(t),a=e.r,h=e.s,l=1&n,d=n>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&d)throw new Error("Unable to find sencond key candinate");a=d?this.curve.pointFromX(a.add(this.curve.n),l):this.curve.pointFromX(a,l);var f=e.r.invm(o),p=o.sub(s).mul(f).umod(o),m=h.mul(f).umod(o);return this.g.mulAdd(p,a,m)},l.prototype.getKeyRecoveryParam=function(t,e,n,r){if(null!==(e=new c(e,r)).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(n))return i}throw new Error("Unable to find valid recovery factor")}},1251:(t,e,n)=>{"use strict";var r=n(3785),i=n(953).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,n){return e instanceof o?e:new o(t,{pub:e,pubEnc:n})},o.fromPrivate=function(t,e,n){return e instanceof o?e:new o(t,{priv:e,privEnc:n})},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 r(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,n){return this.ec.sign(t,this,e,n)},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())+" >"}},611:(t,e,n)=>{"use strict";var r=n(3785),i=n(953),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 r(t.r,16),this.s=new r(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function a(){this.place=0}function u(t,e){var n=t[e.place++];if(!(128&n))return n;var r=15&n;if(0===r||r>4)return!1;for(var i=0,o=0,s=e.place;o<r;o++,s++)i<<=8,i|=t[s],i>>>=0;return!(i<=127)&&(e.place=s,i)}function h(t){for(var e=0,n=t.length-1;!t[e]&&!(128&t[e+1])&&e<n;)e++;return 0===e?t:t.slice(e)}function c(t,e){if(e<128)t.push(e);else{var n=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|n);--n;)t.push(e>>>(n<<3)&255);t.push(e)}}t.exports=s,s.prototype._importDER=function(t,e){t=i.toArray(t,e);var n=new a;if(48!==t[n.place++])return!1;var o=u(t,n);if(!1===o)return!1;if(o+n.place!==t.length)return!1;if(2!==t[n.place++])return!1;var s=u(t,n);if(!1===s)return!1;var h=t.slice(n.place,s+n.place);if(n.place+=s,2!==t[n.place++])return!1;var c=u(t,n);if(!1===c)return!1;if(t.length!==c+n.place)return!1;var l=t.slice(n.place,c+n.place);if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1)}if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}return this.r=new r(h),this.s=new r(l),this.recoveryParam=null,!0},s.prototype.toDER=function(t){var e=this.r.toArray(),n=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&n[0]&&(n=[0].concat(n)),e=h(e),n=h(n);!(n[0]||128&n[1]);)n=n.slice(1);var r=[2];c(r,e.length),(r=r.concat(e)).push(2),c(r,n.length);var o=r.concat(n),s=[48];return c(s,o.length),s=s.concat(o),i.encode(s,t)}},5980:(t,e,n)=>{"use strict";var r=n(3715),i=n(5427),o=n(953),s=o.assert,a=o.parseBytes,u=n(9087),h=n(3622);function c(t){if(s("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof c))return new c(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=r.sha512}t.exports=c,c.prototype.sign=function(t,e){t=a(t);var n=this.keyFromSecret(e),r=this.hashInt(n.messagePrefix(),t),i=this.g.mul(r),o=this.encodePoint(i),s=this.hashInt(o,n.pubBytes(),t).mul(n.priv()),u=r.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},c.prototype.verify=function(t,e,n){t=a(t),e=this.makeSignature(e);var r=this.keyFromPublic(n),i=this.hashInt(e.Rencoded(),r.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(r.pub().mul(i)).eq(o)},c.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)},c.prototype.keyFromPublic=function(t){return u.fromPublic(this,t)},c.prototype.keyFromSecret=function(t){return u.fromSecret(this,t)},c.prototype.makeSignature=function(t){return t instanceof h?t:new h(this,t)},c.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},c.prototype.decodePoint=function(t){var e=(t=o.parseBytes(t)).length-1,n=t.slice(0,e).concat(-129&t[e]),r=0!=(128&t[e]),i=o.intFromLE(n);return this.curve.pointFromY(i,r)},c.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},c.prototype.decodeInt=function(t){return o.intFromLE(t)},c.prototype.isPoint=function(t){return t instanceof this.pointClass}},9087:(t,e,n)=>{"use strict";var r=n(953),i=r.assert,o=r.parseBytes,s=r.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(),n=t.encodingLength-1,r=e.slice(0,t.encodingLength);return r[0]&=248,r[n]&=127,r[n]|=64,r})),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"),r.encode(this.secret(),t)},a.prototype.getPublic=function(t){return r.encode(this.pubBytes(),t)},t.exports=a},3622:(t,e,n)=>{"use strict";var r=n(3785),i=n(953),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 r&&(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},1037: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"]]}}},953:(t,e,n)=>{"use strict";var r=e,i=n(3785),o=n(9746),s=n(4504);r.assert=o,r.toArray=s.toArray,r.zero2=s.zero2,r.toHex=s.toHex,r.encode=s.encode,r.getNAF=function(t,e,n){var r=new Array(Math.max(t.bitLength(),n)+1);r.fill(0);for(var i=1<<e+1,o=t.clone(),s=0;s<r.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,r[s]=a,o.iushrn(1)}return r},r.getJSF=function(t,e){var n=[[],[]];t=t.clone(),e=e.clone();for(var r,i=0,o=0;t.cmpn(-i)>0||e.cmpn(-o)>0;){var s,a,u=t.andln(3)+i&3,h=e.andln(3)+o&3;3===u&&(u=-1),3===h&&(h=-1),s=0==(1&u)?0:3!=(r=t.andln(7)+i&7)&&5!==r||2!==h?u:-u,n[0].push(s),a=0==(1&h)?0:3!=(r=e.andln(7)+o&7)&&5!==r||2!==u?h:-h,n[1].push(a),2*i===s+1&&(i=1-i),2*o===a+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return n},r.cachedProperty=function(t,e,n){var r="_"+e;t.prototype[e]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},r.parseBytes=function(t){return"string"==typeof t?r.toArray(t,"hex"):t},r.intFromLE=function(t){return new i(t,"hex","le")}},3785:function(t,e,n){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"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:n(5568).Buffer}catch(t){}function a(t,e){var n=t.charCodeAt(e);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function u(t,e,n){var r=a(t,n);return n-1>=e&&(r|=a(t,n-1)<<4),r}function h(t,e,n,r){for(var i=0,o=Math.min(t.length,n),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=r,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,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(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,n):(this._parseBase(t,e,i),"le"===n&&this._initArray(this.toArray(),e,n)))},o.prototype._initNumber=function(t,e,n){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):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initArray=function(t,e,n){if(r("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"===n)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"===n)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,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,s=0;if("be"===n)for(r=t.length-1;r>=e;r-=2)i=u(t,e,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)i=u(t,e,r)<<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,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,s=o%r,a=Math.min(o,o-s)+n,u=0,c=n;c<a;c+=r)u=h(t,c,c+r,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=h(t,c,t.length,e),c=0;c<s;c++)l*=e;this.imuln(l),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 c=["","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"],l=[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 f(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var h=1;h<r;h++){for(var c=u>>>26,l=67108863&u,d=Math.min(h,e.length-1),f=Math.max(0,h-t.length+1);f<=d;f++){var p=h-f|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[f])+l)/67108864|0,l=67108863&s}n.words[h]=0|l,u=0|c}return 0!==u?n.words[h]=0|u:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);n=0!=(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var h=l[t],f=d[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(t);n=(p=p.idivn(f)).isZero()?m+n:c[h-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!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&&r(!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 r(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,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,h=new t(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[a]=s;for(;a<o;a++)h[a]=0}else{for(a=0;a<o-i;a++)h[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[o-a-1]=s}return h},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},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 n=this._zeroBits(this.words[e]);if(t+=n,26!==n)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 r(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 n=0;n<e.length;n++)this.words[n]=this.words[n]&t.words[n];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return r(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,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;r<n.length;r++)this.words[r]=e.words[r]^n.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return r(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){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,n,r;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?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o<r.length;o++)e=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<n.length;o++)e=(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.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 n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(e=(0|n.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<n.length;s++)o=(e=(0|n.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,n){var r,i,o,s=t.words,a=e.words,u=n.words,h=0,c=0|s[0],l=8191&c,d=c>>>13,f=0|s[1],p=8191&f,m=f>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,_=y>>>13,M=0|s[4],S=8191&M,E=M>>>13,A=0|s[5],k=8191&A,x=A>>>13,R=0|s[6],I=8191&R,T=R>>>13,C=0|s[7],B=8191&C,D=C>>>13,P=0|s[8],U=8191&P,O=P>>>13,N=0|s[9],q=8191&N,L=N>>>13,j=0|a[0],K=8191&j,$=j>>>13,z=0|a[1],H=8191&z,W=z>>>13,V=0|a[2],F=8191&V,J=V>>>13,G=0|a[3],Z=8191&G,Y=G>>>13,X=0|a[4],Q=8191&X,tt=X>>>13,et=0|a[5],nt=8191&et,rt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ht=at>>>13,ct=0|a[8],lt=8191&ct,dt=ct>>>13,ft=0|a[9],pt=8191&ft,mt=ft>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(h+(r=Math.imul(l,K))|0)+((8191&(i=(i=Math.imul(l,$))+Math.imul(d,K)|0))<<13)|0;h=((o=Math.imul(d,$))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,K),i=(i=Math.imul(p,$))+Math.imul(m,K)|0,o=Math.imul(m,$);var vt=(h+(r=r+Math.imul(l,H)|0)|0)+((8191&(i=(i=i+Math.imul(l,W)|0)+Math.imul(d,H)|0))<<13)|0;h=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,K),i=(i=Math.imul(v,$))+Math.imul(b,K)|0,o=Math.imul(b,$),r=r+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var bt=(h+(r=r+Math.imul(l,F)|0)|0)+((8191&(i=(i=i+Math.imul(l,J)|0)+Math.imul(d,F)|0))<<13)|0;h=((o=o+Math.imul(d,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,K),i=(i=Math.imul(w,$))+Math.imul(_,K)|0,o=Math.imul(_,$),r=r+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,W)|0,r=r+Math.imul(p,F)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,F)|0,o=o+Math.imul(m,J)|0;var yt=(h+(r=r+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(d,Z)|0))<<13)|0;h=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,K),i=(i=Math.imul(S,$))+Math.imul(E,K)|0,o=Math.imul(E,$),r=r+Math.imul(w,H)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,r=r+Math.imul(v,F)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(b,F)|0,o=o+Math.imul(b,J)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,Y)|0;var wt=(h+(r=r+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(d,Q)|0))<<13)|0;h=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,K),i=(i=Math.imul(k,$))+Math.imul(x,K)|0,o=Math.imul(x,$),r=r+Math.imul(S,H)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(E,H)|0,o=o+Math.imul(E,W)|0,r=r+Math.imul(w,F)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,F)|0,o=o+Math.imul(_,J)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,Y)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var _t=(h+(r=r+Math.imul(l,nt)|0)|0)+((8191&(i=(i=i+Math.imul(l,rt)|0)+Math.imul(d,nt)|0))<<13)|0;h=((o=o+Math.imul(d,rt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(I,K),i=(i=Math.imul(I,$))+Math.imul(T,K)|0,o=Math.imul(T,$),r=r+Math.imul(k,H)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,W)|0,r=r+Math.imul(S,F)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(E,F)|0,o=o+Math.imul(E,J)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,Y)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var Mt=(h+(r=r+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;h=((o=o+Math.imul(d,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(B,K),i=(i=Math.imul(B,$))+Math.imul(D,K)|0,o=Math.imul(D,$),r=r+Math.imul(I,H)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,W)|0,r=r+Math.imul(k,F)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(x,F)|0,o=o+Math.imul(x,J)|0,r=r+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(E,Z)|0,o=o+Math.imul(E,Y)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(v,nt)|0,i=(i=i+Math.imul(v,rt)|0)+Math.imul(b,nt)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(h+(r=r+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(d,ut)|0))<<13)|0;h=((o=o+Math.imul(d,ht)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(U,K),i=(i=Math.imul(U,$))+Math.imul(O,K)|0,o=Math.imul(O,$),r=r+Math.imul(B,H)|0,i=(i=i+Math.imul(B,W)|0)+Math.imul(D,H)|0,o=o+Math.imul(D,W)|0,r=r+Math.imul(I,F)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(T,F)|0,o=o+Math.imul(T,J)|0,r=r+Math.imul(k,Z)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(w,nt)|0,i=(i=i+Math.imul(w,rt)|0)+Math.imul(_,nt)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var Et=(h+(r=r+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;h=((o=o+Math.imul(d,dt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,K),i=(i=Math.imul(q,$))+Math.imul(L,K)|0,o=Math.imul(L,$),r=r+Math.imul(U,H)|0,i=(i=i+Math.imul(U,W)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,W)|0,r=r+Math.imul(B,F)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(D,F)|0,o=o+Math.imul(D,J)|0,r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,Y)|0,r=r+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,r=r+Math.imul(S,nt)|0,i=(i=i+Math.imul(S,rt)|0)+Math.imul(E,nt)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,r=r+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ht)|0,r=r+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var At=(h+(r=r+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;h=((o=o+Math.imul(d,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,H),i=(i=Math.imul(q,W))+Math.imul(L,H)|0,o=Math.imul(L,W),r=r+Math.imul(U,F)|0,i=(i=i+Math.imul(U,J)|0)+Math.imul(O,F)|0,o=o+Math.imul(O,J)|0,r=r+Math.imul(B,Z)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,Y)|0,r=r+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,nt)|0,i=(i=i+Math.imul(k,rt)|0)+Math.imul(x,nt)|0,o=o+Math.imul(x,rt)|0,r=r+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ht)|0,r=r+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(h+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,F),i=(i=Math.imul(q,J))+Math.imul(L,F)|0,o=Math.imul(L,J),r=r+Math.imul(U,Z)|0,i=(i=i+Math.imul(U,Y)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Y)|0,r=r+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(I,nt)|0,i=(i=i+Math.imul(I,rt)|0)+Math.imul(T,nt)|0,o=o+Math.imul(T,rt)|0,r=r+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,r=r+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,ht)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ht)|0,r=r+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,dt)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,dt)|0;var xt=(h+(r=r+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;h=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(q,Z),i=(i=Math.imul(q,Y))+Math.imul(L,Z)|0,o=Math.imul(L,Y),r=r+Math.imul(U,Q)|0,i=(i=i+Math.imul(U,tt)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,r=r+Math.imul(B,nt)|0,i=(i=i+Math.imul(B,rt)|0)+Math.imul(D,nt)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ht)|0,r=r+Math.imul(S,lt)|0,i=(i=i+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var Rt=(h+(r=r+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;h=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,Q),i=(i=Math.imul(q,tt))+Math.imul(L,Q)|0,o=Math.imul(L,tt),r=r+Math.imul(U,nt)|0,i=(i=i+Math.imul(U,rt)|0)+Math.imul(O,nt)|0,o=o+Math.imul(O,rt)|0,r=r+Math.imul(B,ot)|0,i=(i=i+Math.imul(B,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ht)|0,r=r+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,dt)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,dt)|0;var It=(h+(r=r+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;h=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,nt),i=(i=Math.imul(q,rt))+Math.imul(L,nt)|0,o=Math.imul(L,rt),r=r+Math.imul(U,ot)|0,i=(i=i+Math.imul(U,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,r=r+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,ht)|0)+Math.imul(D,ut)|0,o=o+Math.imul(D,ht)|0,r=r+Math.imul(I,lt)|0,i=(i=i+Math.imul(I,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(h+(r=r+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,mt)|0)+Math.imul(x,pt)|0))<<13)|0;h=((o=o+Math.imul(x,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),i=(i=Math.imul(q,st))+Math.imul(L,ot)|0,o=Math.imul(L,st),r=r+Math.imul(U,ut)|0,i=(i=i+Math.imul(U,ht)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,ht)|0,r=r+Math.imul(B,lt)|0,i=(i=i+Math.imul(B,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Ct=(h+(r=r+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(T,pt)|0))<<13)|0;h=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(q,ut),i=(i=Math.imul(q,ht))+Math.imul(L,ut)|0,o=Math.imul(L,ht),r=r+Math.imul(U,lt)|0,i=(i=i+Math.imul(U,dt)|0)+Math.imul(O,lt)|0,o=o+Math.imul(O,dt)|0;var Bt=(h+(r=r+Math.imul(B,pt)|0)|0)+((8191&(i=(i=i+Math.imul(B,mt)|0)+Math.imul(D,pt)|0))<<13)|0;h=((o=o+Math.imul(D,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,lt),i=(i=Math.imul(q,dt))+Math.imul(L,lt)|0,o=Math.imul(L,dt);var Dt=(h+(r=r+Math.imul(U,pt)|0)|0)+((8191&(i=(i=i+Math.imul(U,mt)|0)+Math.imul(O,pt)|0))<<13)|0;h=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Pt=(h+(r=Math.imul(q,pt))|0)+((8191&(i=(i=Math.imul(q,mt))+Math.imul(L,pt)|0))<<13)|0;return h=((o=Math.imul(L,mt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=gt,u[1]=vt,u[2]=bt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=St,u[8]=Et,u[9]=At,u[10]=kt,u[11]=xt,u[12]=Rt,u[13]=It,u[14]=Tt,u[15]=Ct,u[16]=Bt,u[17]=Dt,u[18]=Pt,0!==h&&(u[19]=h,n.length++),n};function m(t,e,n){return(new g).mulp(t,e,n)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=f),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):n<63?f(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,u=Math.min(o,e.length-1),h=Math.max(0,o-t.length+1);h<=u;h++){var c=o-h,l=(0|t.words[c])*(0|e.words[h]),d=67108863&l;a=67108863&(d=d+a|0),i+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):m(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,n,t);return e},g.prototype.revBin=function(t,e,n){if(0===t||t===n-1)return t;for(var r=0,i=0;i<e;i++)r|=(1&t)<<e-i-1,t>>=1;return r},g.prototype.permute=function(t,e,n,r,i,o){for(var s=0;s<o;s++)r[s]=e[t[s]],i[s]=n[t[s]]},g.prototype.transform=function(t,e,n,r,i,o){this.permute(o,t,e,n,r,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),h=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var l=u,d=h,f=0;f<s;f++){var p=n[c+f],m=r[c+f],g=n[c+f+s],v=r[c+f+s],b=l*g-d*v;v=l*v+d*g,g=b,n[c+f]=p+g,r[c+f]=m+v,n[c+f+s]=p-g,r[c+f+s]=m-v,f!==a&&(b=u*l-h*d,d=u*d+h*l,l=b)}},g.prototype.guessLen13b=function(t,e){var n=1|Math.max(e,t),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},g.prototype.conjugate=function(t,e,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=t[r];t[r]=t[n-r-1],t[n-r-1]=i,i=e[r],e[r]=-e[n-r-1],e[n-r-1]=-i}},g.prototype.normalize13b=function(t,e){for(var n=0,r=0;r<e/2;r++){var i=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+n;t[r]=67108863&i,n=i<67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,n,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],n[2*s]=8191&o,o>>>=13,n[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)n[s]=0;r(0===o),r(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=0;return e},g.prototype.mulp=function(t,e,n){var r=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(r),o=this.stub(r),s=new Array(r),a=new Array(r),u=new Array(r),h=new Array(r),c=new Array(r),l=new Array(r),d=n.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,h,r),this.transform(s,o,a,u,r,i),this.transform(h,o,c,l,r,i);for(var f=0;f<r;f++){var p=a[f]*c[f]-u[f]*l[f];u[f]=a[f]*l[f]+u[f]*c[f],a[f]=p}return this.conjugate(a,u,r),this.transform(a,u,d,o,r,i),this.conjugate(d,o,r),this.normalize13b(d,r),n.negative=t.negative^e.negative,n.length=t.length+e.length,n.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){r("number"==typeof t),r(t<67108864);for(var e=0,n=0;n<this.length;n++){var i=(0|this.words[n])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=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()),n=0;n<e.length;n++){var r=n/26|0,i=n%26;e[n]=(t.words[r]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r<e.length&&0===e[r];r++,n=n.sqr());if(++r<e.length)for(var i=n.sqr();r<e.length;r++,i=i.sqr())0!==e[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<n;this.words[e]=u|s,s=a>>>26-n}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 r(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,n){var i;r("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=n;if(i-=s,i=Math.max(0,i),u){for(var h=0;h<s;h++)u.words[h]=this.words[h];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,h=0;h<this.length;h++)this.words[h]=this.words[h+s];else this.words[0]=0,this.length=1;var c=0;for(h=this.length-1;h>=0&&(0!==c||h>=i);h--){var l=0|this.words[h];this.words[h]=c<<26-o|l>>>o,c=l&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},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){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<<e;return!(this.length<=n||!(this.words[n]&i))},o.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,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 r("number"==typeof t),r(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(r("number"==typeof t),r(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,n){var i,o,s=t.length+n;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+n])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)a=(o=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&o;if(0===a)return this.strip();for(r(-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 n=(this.length,t.length),r=this.clone(),i=t,s=0|i.words[i.length-1];0!=(n=26-this._countBits(s))&&(i=i.ushln(n),r.iushln(n),s=0|i.words[i.length-1]);var a,u=r.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h<a.length;h++)a.words[h]=0}var c=r.clone()._ishlnsubmul(i,1,u);0===c.negative&&(r=c,a&&(a.words[u]=1));for(var l=u-1;l>=0;l--){var d=67108864*(0|r.words[i.length+l])+(0|r.words[i.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(i,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,l),r.isZero()||(r.negative^=1);a&&(a.words[l]=d)}return a&&a.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!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(),n&&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(),n&&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 n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);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){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=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),h=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++h;for(var c=n.clone(),l=e.clone();!e.isZero();){for(var d=0,f=1;0==(e.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(l)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(l)),a.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(a),s.isub(u)):(n.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:n.iushln(h)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var h=0,c=1;0==(e.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,d=1;0==(n.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(n.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(n)>=0?(e.isub(n),s.isub(a)):(n.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(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},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){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,s=n;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,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(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,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){r<i?e=-1:r>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 S(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function b(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 y(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){S.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)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(y,b),y.prototype.split=function(t,e){for(var n=4194303,r=Math.min(t.length,9),i=0;i<r;i++)e.words[i]=t.words[i];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&n,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&n)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n<t.length;n++){var r=0|t.words[n];e+=977*r,t.words[n]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(w,b),i(_,b),i(M,b),M.prototype.imulK=function(t){for(var e=0,n=0;n<t.length;n++){var r=19*(0|t.words[n])+e,i=67108863&r;r>>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new y;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 M}return v[t]=e,e},S.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var l=this.pow(c,i),d=this.pow(t,i.addn(1).iushrn(1)),f=this.pow(t,i),p=s;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<p);var v=this.pow(l,new o(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),f=f.redMul(l),p=g}return d},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=t;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],t);var i=n[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),r=e.length-1;r>=0;r--){for(var h=e.words[r],c=u-1;c>=0;c--){var l=h>>c&1;i!==n[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===r&&0===c)&&(i=this.mul(i,n[s]),a=0,s=0)):a=0}u=26}return i},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new E(t)},i(E,S),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).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)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).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)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=n.nmd(t),this)},7519:t=>{"use strict";t.exports={i8:"6.5.4"}},7187:t=>{"use strict";var e,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};e=n&&"function"==typeof n.ownKeys?n.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(n,r){function i(n){t.removeListener(e,o),r(n)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),n([].slice.call(arguments))}m(t,e,o,{once:!0}),"error"!==e&&function(t,e,n){"function"==typeof t.on&&m(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 h(t,e,n,r){var i,o,s,h;if(a(n),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),s=o[e]),void 0===s)s=o[e]=n,++t._eventsCount;else if("function"==typeof s?s=o[e]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=u(t))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=s.length,h=c,console&&console.warn&&console.warn(h)}return t}function c(){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 l(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=c.bind(r);return i.listener=n,r.wrapFn=i,i}function d(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(i):p(i,i.length)}function f(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function p(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function m(t,e,n,r){if("function"==typeof t.on)r.once?t.once(e,n):t.on(e,n);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){r.once&&t.removeEventListener(e,i),n(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=[],n=1;n<arguments.length;n++)e.push(arguments[n]);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)r(u,this,e);else{var h=u.length,c=p(u,h);for(n=0;n<h;++n)r(c[n],this,e)}return!0},o.prototype.addListener=function(t,e){return h(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return h(this,t,e,!0)},o.prototype.once=function(t,e){return a(e),this.on(t,l(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return a(e),this.prependListener(t,l(this,t,e)),this},o.prototype.removeListener=function(t,e){var n,r,i,o,s;if(a(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===e||n[o].listener===e){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,i),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,s||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},o.prototype.listeners=function(t){return d(this,t,!0)},o.prototype.rawListeners=function(t){return d(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):f.call(t,e)},o.prototype.listenerCount=f,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},3048:(t,e,n)=>{var r=n(9509).Buffer,i=n(2318);t.exports=function(t,e,n,o){if(r.isBuffer(t)||(t=r.from(t,"binary")),e&&(r.isBuffer(e)||(e=r.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=n/8,a=r.alloc(s),u=r.alloc(o||0),h=r.alloc(0);s>0||o>0;){var c=new i;c.update(h),c.update(t),e&&c.update(e),h=c.digest();var l=0;if(s>0){var d=a.length-s;l=Math.min(s,h.length),h.copy(a,d,0,l),s-=l}if(l<h.length&&o>0){var f=u.length-o,p=Math.min(o,h.length-l);h.copy(u,f,l,l+p),o-=p}}return h.fill(0),{key:a,iv:u}}},3349:(t,e,n)=>{"use strict";var r=n(213).Buffer,i=n(8473).Transform;function o(t){i.call(this),this._block=r.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n(5717)(o,i),o.prototype._transform=function(t,e,n){var r=null;try{this.update(t,e)}catch(t){r=t}n(r)},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(!r.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");r.isBuffer(t)||(t=r.from(t,e));for(var n=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)n[o++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)n[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 n=0;n<4;++n)this._length[n]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},213:(t,e,n)=>{var r=n(8764),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function s(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},s.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},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 r.SlowBuffer(t)}},3715:(t,e,n)=>{var r=e;r.utils=n(6436),r.common=n(5772),r.sha=n(9041),r.ripemd=n(2949),r.hmac=n(2344),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},5772:(t,e,n)=>{"use strict";var r=n(6436),i=n(9746);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=r.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var n=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-n,t.length),0===this.pending.length&&(this.pending=null),t=r.join32(t,0,t.length-n,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,n=e-(t+this.padLength)%e,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=t>>>24&255,r[i++]=t>>>16&255,r[i++]=t>>>8&255,r[i++]=255&t}else for(r[i++]=255&t,r[i++]=t>>>8&255,r[i++]=t>>>16&255,r[i++]=t>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o<this.padLength;o++)r[i++]=0;return r}},2344:(t,e,n)=>{"use strict";var r=n(6436),i=n(9746);function o(t,e,n){if(!(this instanceof o))return new o(t,e,n);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(e,n))}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)}},2949:(t,e,n)=>{"use strict";var r=n(6436),i=n(5772),o=r.rotl32,s=r.sum32,a=r.sum32_3,u=r.sum32_4,h=i.BlockHash;function c(){if(!(this instanceof c))return new c;h.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function l(t,e,n,r){return t<=15?e^n^r:t<=31?e&n|~e&r:t<=47?(e|~n)^r:t<=63?e&r|n&~r:e^(n|~r)}function d(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function f(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}r.inherits(c,h),e.ripemd160=c,c.blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(t,e){for(var n=this.h[0],r=this.h[1],i=this.h[2],h=this.h[3],c=this.h[4],b=n,y=r,w=i,_=h,M=c,S=0;S<80;S++){var E=s(o(u(n,l(S,r,i,h),t[p[S]+e],d(S)),g[S]),c);n=c,c=h,h=o(i,10),i=r,r=E,E=s(o(u(b,l(79-S,y,w,_),t[m[S]+e],f(S)),v[S]),M),b=M,M=_,_=o(w,10),w=y,y=E}E=a(this.h[1],i,_),this.h[1]=a(this.h[2],h,M),this.h[2]=a(this.h[3],c,b),this.h[3]=a(this.h[4],n,y),this.h[4]=a(this.h[0],r,w),this.h[0]=E},c.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"little"):r.split32(this.h,"little")};var p=[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],m=[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],g=[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],v=[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]},9041:(t,e,n)=>{"use strict";e.sha1=n(4761),e.sha224=n(799),e.sha256=n(9344),e.sha384=n(772),e.sha512=n(5900)},4761:(t,e,n)=>{"use strict";var r=n(6436),i=n(5772),o=n(7038),s=r.rotl32,a=r.sum32,u=r.sum32_5,h=o.ft_1,c=i.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(d,c),t.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(t,e){for(var n=this.W,r=0;r<16;r++)n[r]=t[e+r];for(;r<n.length;r++)n[r]=s(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],o=this.h[1],c=this.h[2],d=this.h[3],f=this.h[4];for(r=0;r<n.length;r++){var p=~~(r/20),m=u(s(i,5),h(p,o,c,d),f,n[r],l[p]);f=d,d=c,c=s(o,30),o=i,i=m}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],c),this.h[3]=a(this.h[3],d),this.h[4]=a(this.h[4],f)},d.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},799:(t,e,n)=>{"use strict";var r=n(6436),i=n(9344);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}r.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?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")}},9344:(t,e,n)=>{"use strict";var r=n(6436),i=n(5772),o=n(7038),s=n(9746),a=r.sum32,u=r.sum32_4,h=r.sum32_5,c=o.ch32,l=o.maj32,d=o.s0_256,f=o.s1_256,p=o.g0_256,m=o.g1_256,g=i.BlockHash,v=[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 b(){if(!(this instanceof b))return new b;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}r.inherits(b,g),t.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(t,e){for(var n=this.W,r=0;r<16;r++)n[r]=t[e+r];for(;r<n.length;r++)n[r]=u(m(n[r-2]),n[r-7],p(n[r-15]),n[r-16]);var i=this.h[0],o=this.h[1],g=this.h[2],v=this.h[3],b=this.h[4],y=this.h[5],w=this.h[6],_=this.h[7];for(s(this.k.length===n.length),r=0;r<n.length;r++){var M=h(_,f(b),c(b,y,w),this.k[r],n[r]),S=a(d(i),l(i,o,g));_=w,w=y,y=b,b=a(v,M),v=g,g=o,o=i,i=a(M,S)}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],g),this.h[3]=a(this.h[3],v),this.h[4]=a(this.h[4],b),this.h[5]=a(this.h[5],y),this.h[6]=a(this.h[6],w),this.h[7]=a(this.h[7],_)},b.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},772:(t,e,n)=>{"use strict";var r=n(6436),i=n(5900);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]}r.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?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")}},5900:(t,e,n)=>{"use strict";var r=n(6436),i=n(5772),o=n(9746),s=r.rotr64_hi,a=r.rotr64_lo,u=r.shr64_hi,h=r.shr64_lo,c=r.sum64,l=r.sum64_hi,d=r.sum64_lo,f=r.sum64_4_hi,p=r.sum64_4_lo,m=r.sum64_5_hi,g=r.sum64_5_lo,v=i.BlockHash,b=[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 y(){if(!(this instanceof y))return new y;v.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b,this.W=new Array(160)}function w(t,e,n,r,i){var o=t&n^~t&i;return o<0&&(o+=4294967296),o}function _(t,e,n,r,i,o){var s=e&r^~e&o;return s<0&&(s+=4294967296),s}function M(t,e,n,r,i){var o=t&n^t&i^n&i;return o<0&&(o+=4294967296),o}function S(t,e,n,r,i,o){var s=e&r^e&o^r&o;return s<0&&(s+=4294967296),s}function E(t,e){var n=s(t,e,28)^s(e,t,2)^s(e,t,7);return n<0&&(n+=4294967296),n}function A(t,e){var n=a(t,e,28)^a(e,t,2)^a(e,t,7);return n<0&&(n+=4294967296),n}function k(t,e){var n=a(t,e,14)^a(t,e,18)^a(e,t,9);return n<0&&(n+=4294967296),n}function x(t,e){var n=s(t,e,1)^s(t,e,8)^u(t,e,7);return n<0&&(n+=4294967296),n}function R(t,e){var n=a(t,e,1)^a(t,e,8)^h(t,e,7);return n<0&&(n+=4294967296),n}function I(t,e){var n=a(t,e,19)^a(e,t,29)^h(t,e,6);return n<0&&(n+=4294967296),n}r.inherits(y,v),t.exports=y,y.blockSize=1024,y.outSize=512,y.hmacStrength=192,y.padLength=128,y.prototype._prepareBlock=function(t,e){for(var n=this.W,r=0;r<32;r++)n[r]=t[e+r];for(;r<n.length;r+=2){var i=(g=n[r-4],v=n[r-3],b=void 0,(b=s(g,v,19)^s(v,g,29)^u(g,v,6))<0&&(b+=4294967296),b),o=I(n[r-4],n[r-3]),a=n[r-14],h=n[r-13],c=x(n[r-30],n[r-29]),l=R(n[r-30],n[r-29]),d=n[r-32],m=n[r-31];n[r]=f(i,o,a,h,c,l,d,m),n[r+1]=p(i,o,a,h,c,l,d,m)}var g,v,b},y.prototype._update=function(t,e){this._prepareBlock(t,e);var n,r,i,a=this.W,u=this.h[0],h=this.h[1],f=this.h[2],p=this.h[3],v=this.h[4],b=this.h[5],y=this.h[6],x=this.h[7],R=this.h[8],I=this.h[9],T=this.h[10],C=this.h[11],B=this.h[12],D=this.h[13],P=this.h[14],U=this.h[15];o(this.k.length===a.length);for(var O=0;O<a.length;O+=2){var N=P,q=U,L=(i=void 0,(i=s(n=R,r=I,14)^s(n,r,18)^s(r,n,9))<0&&(i+=4294967296),i),j=k(R,I),K=w(R,0,T,0,B),$=_(0,I,0,C,0,D),z=this.k[O],H=this.k[O+1],W=a[O],V=a[O+1],F=m(N,q,L,j,K,$,z,H,W,V),J=g(N,q,L,j,K,$,z,H,W,V);N=E(u,h),q=A(u,h),L=M(u,0,f,0,v),j=S(0,h,0,p,0,b);var G=l(N,q,L,j),Z=d(N,q,L,j);P=B,U=D,B=T,D=C,T=R,C=I,R=l(y,x,F,J),I=d(x,x,F,J),y=v,x=b,v=f,b=p,f=u,p=h,u=l(F,J,G,Z),h=d(F,J,G,Z)}c(this.h,0,u,h),c(this.h,2,f,p),c(this.h,4,v,b),c(this.h,6,y,x),c(this.h,8,R,I),c(this.h,10,T,C),c(this.h,12,B,D),c(this.h,14,P,U)},y.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},7038:(t,e,n)=>{"use strict";var r=n(6436).rotr32;function i(t,e,n){return t&e^~t&n}function o(t,e,n){return t&e^t&n^e&n}function s(t,e,n){return t^e^n}e.ft_1=function(t,e,n,r){return 0===t?i(e,n,r):1===t||3===t?s(e,n,r):2===t?o(e,n,r):void 0},e.ch32=i,e.maj32=o,e.p32=s,e.s0_256=function(t){return r(t,2)^r(t,13)^r(t,22)},e.s1_256=function(t){return r(t,6)^r(t,11)^r(t,25)},e.g0_256=function(t){return r(t,7)^r(t,18)^t>>>3},e.g1_256=function(t){return r(t,17)^r(t,19)^t>>>10}},6436:(t,e,n)=>{"use strict";var r=n(9746),i=n(5717);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 n=[];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)n.push(parseInt(t[i]+t[i+1],16))}else for(var r=0,i=0;i<t.length;i++){var s=t.charCodeAt(i);s<128?n[r++]=s:s<2048?(n[r++]=s>>6|192,n[r++]=63&s|128):o(t,i)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++i)),n[r++]=s>>18|240,n[r++]=s>>12&63|128,n[r++]=s>>6&63|128,n[r++]=63&s|128):(n[r++]=s>>12|224,n[r++]=s>>6&63|128,n[r++]=63&s|128)}else for(i=0;i<t.length;i++)n[i]=0|t[i];return n},e.toHex=function(t){for(var e="",n=0;n<t.length;n++)e+=a(t[n].toString(16));return e},e.htonl=s,e.toHex32=function(t,e){for(var n="",r=0;r<t.length;r++){var i=t[r];"little"===e&&(i=s(i)),n+=u(i.toString(16))}return n},e.zero2=a,e.zero8=u,e.join32=function(t,e,n,i){var o=n-e;r(o%4==0);for(var s=new Array(o/4),a=0,u=e;a<s.length;a++,u+=4){var h;h="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]=h>>>0}return s},e.split32=function(t,e){for(var n=new Array(4*t.length),r=0,i=0;r<t.length;r++,i+=4){var o=t[r];"big"===e?(n[i]=o>>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},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,n){return t+e+n>>>0},e.sum32_4=function(t,e,n,r){return t+e+n+r>>>0},e.sum32_5=function(t,e,n,r,i){return t+e+n+r+i>>>0},e.sum64=function(t,e,n,r){var i=t[e],o=r+t[e+1]>>>0,s=(o<r?1:0)+n+i;t[e]=s>>>0,t[e+1]=o},e.sum64_hi=function(t,e,n,r){return(e+r>>>0<e?1:0)+t+n>>>0},e.sum64_lo=function(t,e,n,r){return e+r>>>0},e.sum64_4_hi=function(t,e,n,r,i,o,s,a){var u=0,h=e;return u+=(h=h+r>>>0)<e?1:0,u+=(h=h+o>>>0)<o?1:0,t+n+i+s+(u+=(h=h+a>>>0)<a?1:0)>>>0},e.sum64_4_lo=function(t,e,n,r,i,o,s,a){return e+r+o+a>>>0},e.sum64_5_hi=function(t,e,n,r,i,o,s,a,u,h){var c=0,l=e;return c+=(l=l+r>>>0)<e?1:0,c+=(l=l+o>>>0)<o?1:0,c+=(l=l+a>>>0)<a?1:0,t+n+i+s+u+(c+=(l=l+h>>>0)<h?1:0)>>>0},e.sum64_5_lo=function(t,e,n,r,i,o,s,a,u,h){return e+r+o+a+h>>>0},e.rotr64_hi=function(t,e,n){return(e<<32-n|t>>>n)>>>0},e.rotr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0},e.shr64_hi=function(t,e,n){return t>>>n},e.shr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0}},2156:(t,e,n)=>{"use strict";var r=n(3715),i=n(4504),o=n(9746);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"),n=i.toArray(t.nonce,t.nonceEnc||"hex"),r=i.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,n,r)}t.exports=s,s.prototype._init=function(t,e,n){var r=t.concat(e).concat(n);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(r),this._reseed=1,this.reseedInterval=281474976710656},s.prototype._hmac=function(){return new r.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,n,r){"string"!=typeof e&&(r=n,n=e,e=null),t=i.toArray(t,e),n=i.toArray(n,r),o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(n||[])),this._reseed=1},s.prototype.generate=function(t,e,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(r=n,n=e,e=null),n&&(n=i.toArray(n,r||"hex"),this._update(n));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(n),this._reseed++,i.encode(s,e)}},645:(t,e)=>{e.read=function(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,h=u>>1,c=-7,l=n?i-1:0,d=n?-1:1,f=t[e+l];for(l+=d,o=f&(1<<-c)-1,f>>=-c,c+=a;c>0;o=256*o+t[e+l],l+=d,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=r;c>0;s=256*s+t[e+l],l+=d,c-=8);if(0===o)o=1-h;else{if(o===u)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,r),o-=h}return(f?-1:1)*s*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var s,a,u,h=8*o-i-1,c=(1<<h)-1,l=c>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,p=r?1:-1,m=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=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+l>=1?d/u:d*Math.pow(2,1-l))*u>=2&&(s++,u/=2),s+l>=c?(a=0,s=c):s+l>=1?(a=(e*u-1)*Math.pow(2,i),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[n+f]=255&a,f+=p,a/=256,i-=8);for(s=s<<i|a,h+=i;h>0;t[n+f]=255&s,f+=p,s/=256,h-=8);t[n+f-p]|=128*m}},5717: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 n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},8965:module=>{var factory;window,factory=function(){return(()=>{"use strict";var __webpack_modules__={"./lib/JSEncrypt.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"JSEncrypt\": () => (/* binding */ JSEncrypt)\n/* harmony export */ });\n/* harmony import */ var _lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/jsbn/base64 */ \"./lib/lib/jsbn/base64.js\");\n/* harmony import */ var _JSEncryptRSAKey__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./JSEncryptRSAKey */ \"./lib/JSEncryptRSAKey.js\");\n/* harmony import */ var _version_json__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./version.json */ \"./lib/version.json\");\n\n\n\n/**\n *\n * @param {Object} [options = {}] - An object to customize JSEncrypt behaviour\n * possible parameters are:\n * - default_key_size {number} default: 1024 the key size in bit\n * - default_public_exponent {string} default: '010001' the hexadecimal representation of the public exponent\n * - log {boolean} default: false whether log warn/error or not\n * @constructor\n */\nvar JSEncrypt = /** @class */ (function () {\n function JSEncrypt(options) {\n options = options || {};\n this.default_key_size = options.default_key_size ? parseInt(options.default_key_size, 10) : 1024;\n this.default_public_exponent = options.default_public_exponent || \"010001\"; // 65537 default openssl public exponent for rsa key type\n this.log = options.log || false;\n // The private and public key.\n this.key = null;\n }\n /**\n * Method to set the rsa key parameter (one method is enough to set both the public\n * and the private key, since the private key contains the public key paramenters)\n * Log a warning if logs are enabled\n * @param {Object|string} key the pem encoded string or an object (with or without header/footer)\n * @public\n */\n JSEncrypt.prototype.setKey = function (key) {\n if (this.log && this.key) {\n console.warn(\"A key was already set, overriding existing.\");\n }\n this.key = new _JSEncryptRSAKey__WEBPACK_IMPORTED_MODULE_1__.JSEncryptRSAKey(key);\n };\n /**\n * Proxy method for setKey, for api compatibility\n * @see setKey\n * @public\n */\n JSEncrypt.prototype.setPrivateKey = function (privkey) {\n // Create the key.\n this.setKey(privkey);\n };\n /**\n * Proxy method for setKey, for api compatibility\n * @see setKey\n * @public\n */\n JSEncrypt.prototype.setPublicKey = function (pubkey) {\n // Sets the public key.\n this.setKey(pubkey);\n };\n /**\n * Proxy method for RSAKey object's decrypt, decrypt the string using the private\n * components of the rsa key object. Note that if the object was not set will be created\n * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor\n * @param {string} str base64 encoded crypted string to decrypt\n * @return {string} the decrypted string\n * @public\n */\n JSEncrypt.prototype.decrypt = function (str) {\n // Return the decrypted string.\n try {\n return this.getKey().decrypt((0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.b64tohex)(str));\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Proxy method for RSAKey object's encrypt, encrypt the string using the public\n * components of the rsa key object. Note that if the object was not set will be created\n * on the fly (by the getKey method) using the parameters passed in the JSEncrypt constructor\n * @param {string} str the string to encrypt\n * @return {string} the encrypted string encoded in base64\n * @public\n */\n JSEncrypt.prototype.encrypt = function (str) {\n // Return the encrypted string.\n try {\n return (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.hex2b64)(this.getKey().encrypt(str));\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Proxy method for RSAKey object's sign.\n * @param {string} str the string to sign\n * @param {function} digestMethod hash method\n * @param {string} digestName the name of the hash algorithm\n * @return {string} the signature encoded in base64\n * @public\n */\n JSEncrypt.prototype.sign = function (str, digestMethod, digestName) {\n // return the RSA signature of 'str' in 'hex' format.\n try {\n return (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.hex2b64)(this.getKey().sign(str, digestMethod, digestName));\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Proxy method for RSAKey object's verify.\n * @param {string} str the string to verify\n * @param {string} signature the signature encoded in base64 to compare the string to\n * @param {function} digestMethod hash method\n * @return {boolean} whether the data and signature match\n * @public\n */\n JSEncrypt.prototype.verify = function (str, signature, digestMethod) {\n // Return the decrypted 'digest' of the signature.\n try {\n return this.getKey().verify(str, (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.b64tohex)(signature), digestMethod);\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Getter for the current JSEncryptRSAKey object. If it doesn't exists a new object\n * will be created and returned\n * @param {callback} [cb] the callback to be called if we want the key to be generated\n * in an async fashion\n * @returns {JSEncryptRSAKey} the JSEncryptRSAKey object\n * @public\n */\n JSEncrypt.prototype.getKey = function (cb) {\n // Only create new if it does not exist.\n if (!this.key) {\n // Get a new private key.\n this.key = new _JSEncryptRSAKey__WEBPACK_IMPORTED_MODULE_1__.JSEncryptRSAKey();\n if (cb && {}.toString.call(cb) === \"[object Function]\") {\n this.key.generateAsync(this.default_key_size, this.default_public_exponent, cb);\n return;\n }\n // Generate the key.\n this.key.generate(this.default_key_size, this.default_public_exponent);\n }\n return this.key;\n };\n /**\n * Returns the pem encoded representation of the private key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the private key WITH header and footer\n * @public\n */\n JSEncrypt.prototype.getPrivateKey = function () {\n // Return the private representation of this key.\n return this.getKey().getPrivateKey();\n };\n /**\n * Returns the pem encoded representation of the private key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the private key WITHOUT header and footer\n * @public\n */\n JSEncrypt.prototype.getPrivateKeyB64 = function () {\n // Return the private representation of this key.\n return this.getKey().getPrivateBaseKeyB64();\n };\n /**\n * Returns the pem encoded representation of the public key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the public key WITH header and footer\n * @public\n */\n JSEncrypt.prototype.getPublicKey = function () {\n // Return the private representation of this key.\n return this.getKey().getPublicKey();\n };\n /**\n * Returns the pem encoded representation of the public key\n * If the key doesn't exists a new key will be created\n * @returns {string} pem encoded representation of the public key WITHOUT header and footer\n * @public\n */\n JSEncrypt.prototype.getPublicKeyB64 = function () {\n // Return the private representation of this key.\n return this.getKey().getPublicBaseKeyB64();\n };\n JSEncrypt.version = _version_json__WEBPACK_IMPORTED_MODULE_2__.version;\n return JSEncrypt;\n}());\n\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/JSEncrypt.js?")},"./lib/JSEncryptRSAKey.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "JSEncryptRSAKey": () => (/* binding */ JSEncryptRSAKey)\n/* harmony export */ });\n/* harmony import */ var _lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/jsbn/base64 */ "./lib/lib/jsbn/base64.js");\n/* harmony import */ var _lib_asn1js_hex__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/asn1js/hex */ "./lib/lib/asn1js/hex.js");\n/* harmony import */ var _lib_asn1js_base64__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/asn1js/base64 */ "./lib/lib/asn1js/base64.js");\n/* harmony import */ var _lib_asn1js_asn1__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lib/asn1js/asn1 */ "./lib/lib/asn1js/asn1.js");\n/* harmony import */ var _lib_jsbn_rsa__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lib/jsbn/rsa */ "./lib/lib/jsbn/rsa.js");\n/* harmony import */ var _lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lib/jsbn/jsbn */ "./lib/lib/jsbn/jsbn.js");\n/* harmony import */ var _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./lib/jsrsasign/asn1-1.0 */ "./lib/lib/jsrsasign/asn1-1.0.js");\nvar __extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== "function" && b !== null)\n throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\n\n\n\n/**\n * Create a new JSEncryptRSAKey that extends Tom Wu\'s RSA key object.\n * This object is just a decorator for parsing the key parameter\n * @param {string|Object} key - The key in string format, or an object containing\n * the parameters needed to build a RSAKey object.\n * @constructor\n */\nvar JSEncryptRSAKey = /** @class */ (function (_super) {\n __extends(JSEncryptRSAKey, _super);\n function JSEncryptRSAKey(key) {\n var _this = _super.call(this) || this;\n // Call the super constructor.\n // RSAKey.call(this);\n // If a key key was provided.\n if (key) {\n // If this is a string...\n if (typeof key === "string") {\n _this.parseKey(key);\n }\n else if (JSEncryptRSAKey.hasPrivateKeyProperty(key) ||\n JSEncryptRSAKey.hasPublicKeyProperty(key)) {\n // Set the values for the key.\n _this.parsePropertiesFrom(key);\n }\n }\n return _this;\n }\n /**\n * Method to parse a pem encoded string containing both a public or private key.\n * The method will translate the pem encoded string in a der encoded string and\n * will parse private key and public key parameters. This method accepts public key\n * in the rsaencryption pkcs #1 format (oid: 1.2.840.113549.1.1.1).\n *\n * @todo Check how many rsa formats use the same format of pkcs #1.\n *\n * The format is defined as:\n * PublicKeyInfo ::= SEQUENCE {\n * algorithm AlgorithmIdentifier,\n * PublicKey BIT STRING\n * }\n * Where AlgorithmIdentifier is:\n * AlgorithmIdentifier ::= SEQUENCE {\n * algorithm OBJECT IDENTIFIER, the OID of the enc algorithm\n * parameters ANY DEFINED BY algorithm OPTIONAL (NULL for PKCS #1)\n * }\n * and PublicKey is a SEQUENCE encapsulated in a BIT STRING\n * RSAPublicKey ::= SEQUENCE {\n * modulus INTEGER, -- n\n * publicExponent INTEGER -- e\n * }\n * it\'s possible to examine the structure of the keys obtained from openssl using\n * an asn.1 dumper as the one used here to parse the components: http://lapo.it/asn1js/\n * @argument {string} pem the pem encoded string, can include the BEGIN/END header/footer\n * @private\n */\n JSEncryptRSAKey.prototype.parseKey = function (pem) {\n try {\n var modulus = 0;\n var public_exponent = 0;\n var reHex = /^\\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\\s*)+$/;\n var der = reHex.test(pem) ? _lib_asn1js_hex__WEBPACK_IMPORTED_MODULE_1__.Hex.decode(pem) : _lib_asn1js_base64__WEBPACK_IMPORTED_MODULE_2__.Base64.unarmor(pem);\n var asn1 = _lib_asn1js_asn1__WEBPACK_IMPORTED_MODULE_3__.ASN1.decode(der);\n // Fixes a bug with OpenSSL 1.0+ private keys\n if (asn1.sub.length === 3) {\n asn1 = asn1.sub[2].sub[0];\n }\n if (asn1.sub.length === 9) {\n // Parse the private key.\n modulus = asn1.sub[1].getHexStringValue(); // bigint\n this.n = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(modulus, 16);\n public_exponent = asn1.sub[2].getHexStringValue(); // int\n this.e = parseInt(public_exponent, 16);\n var private_exponent = asn1.sub[3].getHexStringValue(); // bigint\n this.d = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(private_exponent, 16);\n var prime1 = asn1.sub[4].getHexStringValue(); // bigint\n this.p = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(prime1, 16);\n var prime2 = asn1.sub[5].getHexStringValue(); // bigint\n this.q = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(prime2, 16);\n var exponent1 = asn1.sub[6].getHexStringValue(); // bigint\n this.dmp1 = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(exponent1, 16);\n var exponent2 = asn1.sub[7].getHexStringValue(); // bigint\n this.dmq1 = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(exponent2, 16);\n var coefficient = asn1.sub[8].getHexStringValue(); // bigint\n this.coeff = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(coefficient, 16);\n }\n else if (asn1.sub.length === 2) {\n // Parse the public key.\n var bit_string = asn1.sub[1];\n var sequence = bit_string.sub[0];\n modulus = sequence.sub[0].getHexStringValue();\n this.n = (0,_lib_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_5__.parseBigInt)(modulus, 16);\n public_exponent = sequence.sub[1].getHexStringValue();\n this.e = parseInt(public_exponent, 16);\n }\n else {\n return false;\n }\n return true;\n }\n catch (ex) {\n return false;\n }\n };\n /**\n * Translate rsa parameters in a hex encoded string representing the rsa key.\n *\n * The translation follow the ASN.1 notation :\n * RSAPrivateKey ::= SEQUENCE {\n * version Version,\n * modulus INTEGER, -- n\n * publicExponent INTEGER, -- e\n * privateExponent INTEGER, -- d\n * prime1 INTEGER, -- p\n * prime2 INTEGER, -- q\n * exponent1 INTEGER, -- d mod (p1)\n * exponent2 INTEGER, -- d mod (q-1)\n * coefficient INTEGER, -- (inverse of q) mod p\n * }\n * @returns {string} DER Encoded String representing the rsa private key\n * @private\n */\n JSEncryptRSAKey.prototype.getPrivateBaseKey = function () {\n var options = {\n array: [\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ int: 0 }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.n }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ int: this.e }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.d }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.p }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.q }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.dmp1 }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.dmq1 }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.coeff })\n ]\n };\n var seq = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERSequence(options);\n return seq.getEncodedHex();\n };\n /**\n * base64 (pem) encoded version of the DER encoded representation\n * @returns {string} pem encoded representation without header and footer\n * @public\n */\n JSEncryptRSAKey.prototype.getPrivateBaseKeyB64 = function () {\n return (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.hex2b64)(this.getPrivateBaseKey());\n };\n /**\n * Translate rsa parameters in a hex encoded string representing the rsa public key.\n * The representation follow the ASN.1 notation :\n * PublicKeyInfo ::= SEQUENCE {\n * algorithm AlgorithmIdentifier,\n * PublicKey BIT STRING\n * }\n * Where AlgorithmIdentifier is:\n * AlgorithmIdentifier ::= SEQUENCE {\n * algorithm OBJECT IDENTIFIER, the OID of the enc algorithm\n * parameters ANY DEFINED BY algorithm OPTIONAL (NULL for PKCS #1)\n * }\n * and PublicKey is a SEQUENCE encapsulated in a BIT STRING\n * RSAPublicKey ::= SEQUENCE {\n * modulus INTEGER, -- n\n * publicExponent INTEGER -- e\n * }\n * @returns {string} DER Encoded String representing the rsa public key\n * @private\n */\n JSEncryptRSAKey.prototype.getPublicBaseKey = function () {\n var first_sequence = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERSequence({\n array: [\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERObjectIdentifier({ oid: "1.2.840.113549.1.1.1" }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERNull()\n ]\n });\n var second_sequence = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERSequence({\n array: [\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ bigint: this.n }),\n new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERInteger({ int: this.e })\n ]\n });\n var bit_string = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERBitString({\n hex: "00" + second_sequence.getEncodedHex()\n });\n var seq = new _lib_jsrsasign_asn1_1_0__WEBPACK_IMPORTED_MODULE_6__.KJUR.asn1.DERSequence({\n array: [\n first_sequence,\n bit_string\n ]\n });\n return seq.getEncodedHex();\n };\n /**\n * base64 (pem) encoded version of the DER encoded representation\n * @returns {string} pem encoded representation without header and footer\n * @public\n */\n JSEncryptRSAKey.prototype.getPublicBaseKeyB64 = function () {\n return (0,_lib_jsbn_base64__WEBPACK_IMPORTED_MODULE_0__.hex2b64)(this.getPublicBaseKey());\n };\n /**\n * wrap the string in block of width chars. The default value for rsa keys is 64\n * characters.\n * @param {string} str the pem encoded string without header and footer\n * @param {Number} [width=64] - the length the string has to be wrapped at\n * @returns {string}\n * @private\n */\n JSEncryptRSAKey.wordwrap = function (str, width) {\n width = width || 64;\n if (!str) {\n return str;\n }\n var regex = "(.{1," + width + "})( +|$\\n?)|(.{1," + width + "})";\n return str.match(RegExp(regex, "g")).join("\\n");\n };\n /**\n * Retrieve the pem encoded private key\n * @returns {string} the pem encoded private key with header/footer\n * @public\n */\n JSEncryptRSAKey.prototype.getPrivateKey = function () {\n var key = "-----BEGIN RSA PRIVATE KEY-----\\n";\n key += JSEncryptRSAKey.wordwrap(this.getPrivateBaseKeyB64()) + "\\n";\n key += "-----END RSA PRIVATE KEY-----";\n return key;\n };\n /**\n * Retrieve the pem encoded public key\n * @returns {string} the pem encoded public key with header/footer\n * @public\n */\n JSEncryptRSAKey.prototype.getPublicKey = function () {\n var key = "-----BEGIN PUBLIC KEY-----\\n";\n key += JSEncryptRSAKey.wordwrap(this.getPublicBaseKeyB64()) + "\\n";\n key += "-----END PUBLIC KEY-----";\n return key;\n };\n /**\n * Check if the object contains the necessary parameters to populate the rsa modulus\n * and public exponent parameters.\n * @param {Object} [obj={}] - An object that may contain the two public key\n * parameters\n * @returns {boolean} true if the object contains both the modulus and the public exponent\n * properties (n and e)\n * @todo check for types of n and e. N should be a parseable bigInt object, E should\n * be a parseable integer number\n * @private\n */\n JSEncryptRSAKey.hasPublicKeyProperty = function (obj) {\n obj = obj || {};\n return (obj.hasOwnProperty("n") &&\n obj.hasOwnProperty("e"));\n };\n /**\n * Check if the object contains ALL the parameters of an RSA key.\n * @param {Object} [obj={}] - An object that may contain nine rsa key\n * parameters\n * @returns {boolean} true if the object contains all the parameters needed\n * @todo check for types of the parameters all the parameters but the public exponent\n * should be parseable bigint objects, the public exponent should be a parseable integer number\n * @private\n */\n JSEncryptRSAKey.hasPrivateKeyProperty = function (obj) {\n obj = obj || {};\n return (obj.hasOwnProperty("n") &&\n obj.hasOwnProperty("e") &&\n obj.hasOwnProperty("d") &&\n obj.hasOwnProperty("p") &&\n obj.hasOwnProperty("q") &&\n obj.hasOwnProperty("dmp1") &&\n obj.hasOwnProperty("dmq1") &&\n obj.hasOwnProperty("coeff"));\n };\n /**\n * Parse the properties of obj in the current rsa object. Obj should AT LEAST\n * include the modulus and public exponent (n, e) parameters.\n * @param {Object} obj - the object containing rsa parameters\n * @private\n */\n JSEncryptRSAKey.prototype.parsePropertiesFrom = function (obj) {\n this.n = obj.n;\n this.e = obj.e;\n if (obj.hasOwnProperty("d")) {\n this.d = obj.d;\n this.p = obj.p;\n this.q = obj.q;\n this.dmp1 = obj.dmp1;\n this.dmq1 = obj.dmq1;\n this.coeff = obj.coeff;\n }\n };\n return JSEncryptRSAKey;\n}(_lib_jsbn_rsa__WEBPACK_IMPORTED_MODULE_4__.RSAKey));\n\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/JSEncryptRSAKey.js?')},"./lib/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "JSEncrypt": () => (/* reexport safe */ _JSEncrypt__WEBPACK_IMPORTED_MODULE_0__.JSEncrypt),\n/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _JSEncrypt__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./JSEncrypt */ "./lib/JSEncrypt.js");\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_JSEncrypt__WEBPACK_IMPORTED_MODULE_0__.JSEncrypt);\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/index.js?')},"./lib/lib/asn1js/asn1.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "Stream": () => (/* binding */ Stream),\n/* harmony export */ "ASN1": () => (/* binding */ ASN1),\n/* harmony export */ "ASN1Tag": () => (/* binding */ ASN1Tag)\n/* harmony export */ });\n/* harmony import */ var _int10__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./int10 */ "./lib/lib/asn1js/int10.js");\n// ASN.1 JavaScript decoder\n// Copyright (c) 2008-2014 Lapo Luchini <lapo@lapo.it>\n// Permission to use, copy, modify, and/or distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n//\n// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */\n/*global oids */\n\nvar ellipsis = "\\u2026";\nvar reTimeS = /^(\\d\\d)(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])([01]\\d|2[0-3])(?:([0-5]\\d)(?:([0-5]\\d)(?:[.,](\\d{1,3}))?)?)?(Z|[-+](?:[0]\\d|1[0-2])([0-5]\\d)?)?$/;\nvar reTimeL = /^(\\d\\d\\d\\d)(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])([01]\\d|2[0-3])(?:([0-5]\\d)(?:([0-5]\\d)(?:[.,](\\d{1,3}))?)?)?(Z|[-+](?:[0]\\d|1[0-2])([0-5]\\d)?)?$/;\nfunction stringCut(str, len) {\n if (str.length > len) {\n str = str.substring(0, len) + ellipsis;\n }\n return str;\n}\nvar Stream = /** @class */ (function () {\n function Stream(enc, pos) {\n this.hexDigits = "0123456789ABCDEF";\n if (enc instanceof Stream) {\n this.enc = enc.enc;\n this.pos = enc.pos;\n }\n else {\n // enc should be an array or a binary string\n this.enc = enc;\n this.pos = pos;\n }\n }\n Stream.prototype.get = function (pos) {\n if (pos === undefined) {\n pos = this.pos++;\n }\n if (pos >= this.enc.length) {\n throw new Error("Requesting byte offset " + pos + " on a stream of length " + this.enc.length);\n }\n return ("string" === typeof this.enc) ? this.enc.charCodeAt(pos) : this.enc[pos];\n };\n Stream.prototype.hexByte = function (b) {\n return this.hexDigits.charAt((b >> 4) & 0xF) + this.hexDigits.charAt(b & 0xF);\n };\n Stream.prototype.hexDump = function (start, end, raw) {\n var s = "";\n for (var i = start; i < end; ++i) {\n s += this.hexByte(this.get(i));\n if (raw !== true) {\n switch (i & 0xF) {\n case 0x7:\n s += " ";\n break;\n case 0xF:\n s += "\\n";\n break;\n default:\n s += " ";\n }\n }\n }\n return s;\n };\n Stream.prototype.isASCII = function (start, end) {\n for (var i = start; i < end; ++i) {\n var c = this.get(i);\n if (c < 32 || c > 176) {\n return false;\n }\n }\n return true;\n };\n Stream.prototype.parseStringISO = function (start, end) {\n var s = "";\n for (var i = start; i < end; ++i) {\n s += String.fromCharCode(this.get(i));\n }\n return s;\n };\n Stream.prototype.parseStringUTF = function (start, end) {\n var s = "";\n for (var i = start; i < end;) {\n var c = this.get(i++);\n if (c < 128) {\n s += String.fromCharCode(c);\n }\n else if ((c > 191) && (c < 224)) {\n s += String.fromCharCode(((c & 0x1F) << 6) | (this.get(i++) & 0x3F));\n }\n else {\n s += String.fromCharCode(((c & 0x0F) << 12) | ((this.get(i++) & 0x3F) << 6) | (this.get(i++) & 0x3F));\n }\n }\n return s;\n };\n Stream.prototype.parseStringBMP = function (start, end) {\n var str = "";\n var hi;\n var lo;\n for (var i = start; i < end;) {\n hi = this.get(i++);\n lo = this.get(i++);\n str += String.fromCharCode((hi << 8) | lo);\n }\n return str;\n };\n Stream.prototype.parseTime = function (start, end, shortYear) {\n var s = this.parseStringISO(start, end);\n var m = (shortYear ? reTimeS : reTimeL).exec(s);\n if (!m) {\n return "Unrecognized time: " + s;\n }\n if (shortYear) {\n // to avoid querying the timer, use the fixed range [1970, 2069]\n // it will conform with ITU X.400 [-10, +40] sliding window until 2030\n m[1] = +m[1];\n m[1] += (+m[1] < 70) ? 2000 : 1900;\n }\n s = m[1] + "-" + m[2] + "-" + m[3] + " " + m[4];\n if (m[5]) {\n s += ":" + m[5];\n if (m[6]) {\n s += ":" + m[6];\n if (m[7]) {\n s += "." + m[7];\n }\n }\n }\n if (m[8]) {\n s += " UTC";\n if (m[8] != "Z") {\n s += m[8];\n if (m[9]) {\n s += ":" + m[9];\n }\n }\n }\n return s;\n };\n Stream.prototype.parseInteger = function (start, end) {\n var v = this.get(start);\n var neg = (v > 127);\n var pad = neg ? 255 : 0;\n var len;\n var s = "";\n // skip unuseful bits (not allowed in DER)\n while (v == pad && ++start < end) {\n v = this.get(start);\n }\n len = end - start;\n if (len === 0) {\n return neg ? -1 : 0;\n }\n // show bit length of huge integers\n if (len > 4) {\n s = v;\n len <<= 3;\n while (((+s ^ pad) & 0x80) == 0) {\n s = +s << 1;\n --len;\n }\n s = "(" + len + " bit)\\n";\n }\n // decode the integer\n if (neg) {\n v = v - 256;\n }\n var n = new _int10__WEBPACK_IMPORTED_MODULE_0__.Int10(v);\n for (var i = start + 1; i < end; ++i) {\n n.mulAdd(256, this.get(i));\n }\n return s + n.toString();\n };\n Stream.prototype.parseBitString = function (start, end, maxLength) {\n var unusedBit = this.get(start);\n var lenBit = ((end - start - 1) << 3) - unusedBit;\n var intro = "(" + lenBit + " bit)\\n";\n var s = "";\n for (var i = start + 1; i < end; ++i) {\n var b = this.get(i);\n var skip = (i == end - 1) ? unusedBit : 0;\n for (var j = 7; j >= skip; --j) {\n s += (b >> j) & 1 ? "1" : "0";\n }\n if (s.length > maxLength) {\n return intro + stringCut(s, maxLength);\n }\n }\n return intro + s;\n };\n Stream.prototype.parseOctetString = function (start, end, maxLength) {\n if (this.isASCII(start, end)) {\n return stringCut(this.parseStringISO(start, end), maxLength);\n }\n var len = end - start;\n var s = "(" + len + " byte)\\n";\n maxLength /= 2; // we work in bytes\n if (len > maxLength) {\n end = start + maxLength;\n }\n for (var i = start; i < end; ++i) {\n s += this.hexByte(this.get(i));\n }\n if (len > maxLength) {\n s += ellipsis;\n }\n return s;\n };\n Stream.prototype.parseOID = function (start, end, maxLength) {\n var s = "";\n var n = new _int10__WEBPACK_IMPORTED_MODULE_0__.Int10();\n var bits = 0;\n for (var i = start; i < end; ++i) {\n var v = this.get(i);\n n.mulAdd(128, v & 0x7F);\n bits += 7;\n if (!(v & 0x80)) { // finished\n if (s === "") {\n n = n.simplify();\n if (n instanceof _int10__WEBPACK_IMPORTED_MODULE_0__.Int10) {\n n.sub(80);\n s = "2." + n.toString();\n }\n else {\n var m = n < 80 ? n < 40 ? 0 : 1 : 2;\n s = m + "." + (n - m * 40);\n }\n }\n else {\n s += "." + n.toString();\n }\n if (s.length > maxLength) {\n return stringCut(s, maxLength);\n }\n n = new _int10__WEBPACK_IMPORTED_MODULE_0__.Int10();\n bits = 0;\n }\n }\n if (bits > 0) {\n s += ".incomplete";\n }\n return s;\n };\n return Stream;\n}());\n\nvar ASN1 = /** @class */ (function () {\n function ASN1(stream, header, length, tag, sub) {\n if (!(tag instanceof ASN1Tag)) {\n throw new Error("Invalid tag value.");\n }\n this.stream = stream;\n this.header = header;\n this.length = length;\n this.tag = tag;\n this.sub = sub;\n }\n ASN1.prototype.typeName = function () {\n switch (this.tag.tagClass) {\n case 0: // universal\n switch (this.tag.tagNumber) {\n case 0x00:\n return "EOC";\n case 0x01:\n return "BOOLEAN";\n case 0x02:\n return "INTEGER";\n case 0x03:\n return "BIT_STRING";\n case 0x04:\n return "OCTET_STRING";\n case 0x05:\n return "NULL";\n case 0x06:\n return "OBJECT_IDENTIFIER";\n case 0x07:\n return "ObjectDescriptor";\n case 0x08:\n return "EXTERNAL";\n case 0x09:\n return "REAL";\n case 0x0A:\n return "ENUMERATED";\n case 0x0B:\n return "EMBEDDED_PDV";\n case 0x0C:\n return "UTF8String";\n case 0x10:\n return "SEQUENCE";\n case 0x11:\n return "SET";\n case 0x12:\n return "NumericString";\n case 0x13:\n return "PrintableString"; // ASCII subset\n case 0x14:\n return "TeletexString"; // aka T61String\n case 0x15:\n return "VideotexString";\n case 0x16:\n return "IA5String"; // ASCII\n case 0x17:\n return "UTCTime";\n case 0x18:\n return "GeneralizedTime";\n case 0x19:\n return "GraphicString";\n case 0x1A:\n return "VisibleString"; // ASCII subset\n case 0x1B:\n return "GeneralString";\n case 0x1C:\n return "UniversalString";\n case 0x1E:\n return "BMPString";\n }\n return "Universal_" + this.tag.tagNumber.toString();\n case 1:\n return "Application_" + this.tag.tagNumber.toString();\n case 2:\n return "[" + this.tag.tagNumber.toString() + "]"; // Context\n case 3:\n return "Private_" + this.tag.tagNumber.toString();\n }\n };\n ASN1.prototype.content = function (maxLength) {\n if (this.tag === undefined) {\n return null;\n }\n if (maxLength === undefined) {\n maxLength = Infinity;\n }\n var content = this.posContent();\n var len = Math.abs(this.length);\n if (!this.tag.isUniversal()) {\n if (this.sub !== null) {\n return "(" + this.sub.length + " elem)";\n }\n return this.stream.parseOctetString(content, content + len, maxLength);\n }\n switch (this.tag.tagNumber) {\n case 0x01: // BOOLEAN\n return (this.stream.get(content) === 0) ? "false" : "true";\n case 0x02: // INTEGER\n return this.stream.parseInteger(content, content + len);\n case 0x03: // BIT_STRING\n return this.sub ? "(" + this.sub.length + " elem)" :\n this.stream.parseBitString(content, content + len, maxLength);\n case 0x04: // OCTET_STRING\n return this.sub ? "(" + this.sub.length + " elem)" :\n this.stream.parseOctetString(content, content + len, maxLength);\n // case 0x05: // NULL\n case 0x06: // OBJECT_IDENTIFIER\n return this.stream.parseOID(content, content + len, maxLength);\n // case 0x07: // ObjectDescriptor\n // case 0x08: // EXTERNAL\n // case 0x09: // REAL\n // case 0x0A: // ENUMERATED\n // case 0x0B: // EMBEDDED_PDV\n case 0x10: // SEQUENCE\n case 0x11: // SET\n if (this.sub !== null) {\n return "(" + this.sub.length + " elem)";\n }\n else {\n return "(no elem)";\n }\n case 0x0C: // UTF8String\n return stringCut(this.stream.parseStringUTF(content, content + len), maxLength);\n case 0x12: // NumericString\n case 0x13: // PrintableString\n case 0x14: // TeletexString\n case 0x15: // VideotexString\n case 0x16: // IA5String\n // case 0x19: // GraphicString\n case 0x1A: // VisibleString\n // case 0x1B: // GeneralString\n // case 0x1C: // UniversalString\n return stringCut(this.stream.parseStringISO(content, content + len), maxLength);\n case 0x1E: // BMPString\n return stringCut(this.stream.parseStringBMP(content, content + len), maxLength);\n case 0x17: // UTCTime\n case 0x18: // GeneralizedTime\n return this.stream.parseTime(content, content + len, (this.tag.tagNumber == 0x17));\n }\n return null;\n };\n ASN1.prototype.toString = function () {\n return this.typeName() + "@" + this.stream.pos + "[header:" + this.header + ",length:" + this.length + ",sub:" + ((this.sub === null) ? "null" : this.sub.length) + "]";\n };\n ASN1.prototype.toPrettyString = function (indent) {\n if (indent === undefined) {\n indent = "";\n }\n var s = indent + this.typeName() + " @" + this.stream.pos;\n if (this.length >= 0) {\n s += "+";\n }\n s += this.length;\n if (this.tag.tagConstructed) {\n s += " (constructed)";\n }\n else if ((this.tag.isUniversal() && ((this.tag.tagNumber == 0x03) || (this.tag.tagNumber == 0x04))) && (this.sub !== null)) {\n s += " (encapsulates)";\n }\n s += "\\n";\n if (this.sub !== null) {\n indent += " ";\n for (var i = 0, max = this.sub.length; i < max; ++i) {\n s += this.sub[i].toPrettyString(indent);\n }\n }\n return s;\n };\n ASN1.prototype.posStart = function () {\n return this.stream.pos;\n };\n ASN1.prototype.posContent = function () {\n return this.stream.pos + this.header;\n };\n ASN1.prototype.posEnd = function () {\n return this.stream.pos + this.header + Math.abs(this.length);\n };\n ASN1.prototype.toHexString = function () {\n return this.stream.hexDump(this.posStart(), this.posEnd(), true);\n };\n ASN1.decodeLength = function (stream) {\n var buf = stream.get();\n var len = buf & 0x7F;\n if (len == buf) {\n return len;\n }\n // no reason to use Int10, as it would be a huge buffer anyways\n if (len > 6) {\n throw new Error("Length over 48 bits not supported at position " + (stream.pos - 1));\n }\n if (len === 0) {\n return null;\n } // undefined\n buf = 0;\n for (var i = 0; i < len; ++i) {\n buf = (buf * 256) + stream.get();\n }\n return buf;\n };\n /**\n * Retrieve the hexadecimal value (as a string) of the current ASN.1 element\n * @returns {string}\n * @public\n */\n ASN1.prototype.getHexStringValue = function () {\n var hexString = this.toHexString();\n var offset = this.header * 2;\n var length = this.length * 2;\n return hexString.substr(offset, length);\n };\n ASN1.decode = function (str) {\n var stream;\n if (!(str instanceof Stream)) {\n stream = new Stream(str, 0);\n }\n else {\n stream = str;\n }\n var streamStart = new Stream(stream);\n var tag = new ASN1Tag(stream);\n var len = ASN1.decodeLength(stream);\n var start = stream.pos;\n var header = start - streamStart.pos;\n var sub = null;\n var getSub = function () {\n var ret = [];\n if (len !== null) {\n // definite length\n var end = start + len;\n while (stream.pos < end) {\n ret[ret.length] = ASN1.decode(stream);\n }\n if (stream.pos != end) {\n throw new Error("Content size is not correct for container starting at offset " + start);\n }\n }\n else {\n // undefined length\n try {\n for (;;) {\n var s = ASN1.decode(stream);\n if (s.tag.isEOC()) {\n break;\n }\n ret[ret.length] = s;\n }\n len = start - stream.pos; // undefined lengths are represented as negative values\n }\n catch (e) {\n throw new Error("Exception while decoding undefined length content: " + e);\n }\n }\n return ret;\n };\n if (tag.tagConstructed) {\n // must have valid content\n sub = getSub();\n }\n else if (tag.isUniversal() && ((tag.tagNumber == 0x03) || (tag.tagNumber == 0x04))) {\n // sometimes BitString and OctetString are used to encapsulate ASN.1\n try {\n if (tag.tagNumber == 0x03) {\n if (stream.get() != 0) {\n throw new Error("BIT STRINGs with unused bits cannot encapsulate.");\n }\n }\n sub = getSub();\n for (var i = 0; i < sub.length; ++i) {\n if (sub[i].tag.isEOC()) {\n throw new Error("EOC is not supposed to be actual content.");\n }\n }\n }\n catch (e) {\n // but silently ignore when they don\'t\n sub = null;\n }\n }\n if (sub === null) {\n if (len === null) {\n throw new Error("We can\'t skip over an invalid tag with undefined length at offset " + start);\n }\n stream.pos = start + Math.abs(len);\n }\n return new ASN1(streamStart, header, len, tag, sub);\n };\n return ASN1;\n}());\n\nvar ASN1Tag = /** @class */ (function () {\n function ASN1Tag(stream) {\n var buf = stream.get();\n this.tagClass = buf >> 6;\n this.tagConstructed = ((buf & 0x20) !== 0);\n this.tagNumber = buf & 0x1F;\n if (this.tagNumber == 0x1F) { // long tag\n var n = new _int10__WEBPACK_IMPORTED_MODULE_0__.Int10();\n do {\n buf = stream.get();\n n.mulAdd(128, buf & 0x7F);\n } while (buf & 0x80);\n this.tagNumber = n.simplify();\n }\n }\n ASN1Tag.prototype.isUniversal = function () {\n return this.tagClass === 0x00;\n };\n ASN1Tag.prototype.isEOC = function () {\n return this.tagClass === 0x00 && this.tagNumber === 0x00;\n };\n return ASN1Tag;\n}());\n\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/lib/asn1js/asn1.js?')},"./lib/lib/asn1js/base64.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "Base64": () => (/* binding */ Base64)\n/* harmony export */ });\n// Base64 JavaScript decoder\n// Copyright (c) 2008-2013 Lapo Luchini <lapo@lapo.it>\n// Permission to use, copy, modify, and/or distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n//\n// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */\nvar decoder;\nvar Base64 = {\n decode: function (a) {\n var i;\n if (decoder === undefined) {\n var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var ignore = "= \\f\\n\\r\\t\\u00A0\\u2028\\u2029";\n decoder = Object.create(null);\n for (i = 0; i < 64; ++i) {\n decoder[b64.charAt(i)] = i;\n }\n decoder[\'-\'] = 62; //+\n decoder[\'_\'] = 63; //-\n for (i = 0; i < ignore.length; ++i) {\n decoder[ignore.charAt(i)] = -1;\n }\n }\n var out = [];\n var bits = 0;\n var char_count = 0;\n for (i = 0; i < a.length; ++i) {\n var c = a.charAt(i);\n if (c == "=") {\n break;\n }\n c = decoder[c];\n if (c == -1) {\n continue;\n }\n if (c === undefined) {\n throw new Error("Illegal character at offset " + i);\n }\n bits |= c;\n if (++char_count >= 4) {\n out[out.length] = (bits >> 16);\n out[out.length] = (bits >> 8) & 0xFF;\n out[out.length] = bits & 0xFF;\n bits = 0;\n char_count = 0;\n }\n else {\n bits <<= 6;\n }\n }\n switch (char_count) {\n case 1:\n throw new Error("Base64 encoding incomplete: at least 2 bits missing");\n case 2:\n out[out.length] = (bits >> 10);\n break;\n case 3:\n out[out.length] = (bits >> 16);\n out[out.length] = (bits >> 8) & 0xFF;\n break;\n }\n return out;\n },\n re: /-----BEGIN [^-]+-----([A-Za-z0-9+\\/=\\s]+)-----END [^-]+-----|begin-base64[^\\n]+\\n([A-Za-z0-9+\\/=\\s]+)====/,\n unarmor: function (a) {\n var m = Base64.re.exec(a);\n if (m) {\n if (m[1]) {\n a = m[1];\n }\n else if (m[2]) {\n a = m[2];\n }\n else {\n throw new Error("RegExp out of sync");\n }\n }\n return Base64.decode(a);\n }\n};\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/lib/asn1js/base64.js?')},"./lib/lib/asn1js/hex.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "Hex": () => (/* binding */ Hex)\n/* harmony export */ });\n// Hex JavaScript decoder\n// Copyright (c) 2008-2013 Lapo Luchini <lapo@lapo.it>\n// Permission to use, copy, modify, and/or distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n//\n// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */\nvar decoder;\nvar Hex = {\n decode: function (a) {\n var i;\n if (decoder === undefined) {\n var hex = "0123456789ABCDEF";\n var ignore = " \\f\\n\\r\\t\\u00A0\\u2028\\u2029";\n decoder = {};\n for (i = 0; i < 16; ++i) {\n decoder[hex.charAt(i)] = i;\n }\n hex = hex.toLowerCase();\n for (i = 10; i < 16; ++i) {\n decoder[hex.charAt(i)] = i;\n }\n for (i = 0; i < ignore.length; ++i) {\n decoder[ignore.charAt(i)] = -1;\n }\n }\n var out = [];\n var bits = 0;\n var char_count = 0;\n for (i = 0; i < a.length; ++i) {\n var c = a.charAt(i);\n if (c == "=") {\n break;\n }\n c = decoder[c];\n if (c == -1) {\n continue;\n }\n if (c === undefined) {\n throw new Error("Illegal character at offset " + i);\n }\n bits |= c;\n if (++char_count >= 2) {\n out[out.length] = bits;\n bits = 0;\n char_count = 0;\n }\n else {\n bits <<= 4;\n }\n }\n if (char_count) {\n throw new Error("Hex encoding incomplete: 4 bits missing");\n }\n return out;\n }\n};\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/lib/asn1js/hex.js?')},"./lib/lib/asn1js/int10.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "Int10": () => (/* binding */ Int10)\n/* harmony export */ });\n// Big integer base-10 printing library\n// Copyright (c) 2014 Lapo Luchini <lapo@lapo.it>\n// Permission to use, copy, modify, and/or distribute this software for any\n// purpose with or without fee is hereby granted, provided that the above\n// copyright notice and this permission notice appear in all copies.\n//\n// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\n// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n/*jshint browser: true, strict: true, immed: true, latedef: true, undef: true, regexdash: false */\nvar max = 10000000000000; // biggest integer that can still fit 2^53 when multiplied by 256\nvar Int10 = /** @class */ (function () {\n function Int10(value) {\n this.buf = [+value || 0];\n }\n Int10.prototype.mulAdd = function (m, c) {\n // assert(m <= 256)\n var b = this.buf;\n var l = b.length;\n var i;\n var t;\n for (i = 0; i < l; ++i) {\n t = b[i] * m + c;\n if (t < max) {\n c = 0;\n }\n else {\n c = 0 | (t / max);\n t -= c * max;\n }\n b[i] = t;\n }\n if (c > 0) {\n b[i] = c;\n }\n };\n Int10.prototype.sub = function (c) {\n // assert(m <= 256)\n var b = this.buf;\n var l = b.length;\n var i;\n var t;\n for (i = 0; i < l; ++i) {\n t = b[i] - c;\n if (t < 0) {\n t += max;\n c = 1;\n }\n else {\n c = 0;\n }\n b[i] = t;\n }\n while (b[b.length - 1] === 0) {\n b.pop();\n }\n };\n Int10.prototype.toString = function (base) {\n if ((base || 10) != 10) {\n throw new Error("only base 10 is supported");\n }\n var b = this.buf;\n var s = b[b.length - 1].toString();\n for (var i = b.length - 2; i >= 0; --i) {\n s += (max + b[i]).toString().substring(1);\n }\n return s;\n };\n Int10.prototype.valueOf = function () {\n var b = this.buf;\n var v = 0;\n for (var i = b.length - 1; i >= 0; --i) {\n v = v * max + b[i];\n }\n return v;\n };\n Int10.prototype.simplify = function () {\n var b = this.buf;\n return (b.length == 1) ? b[0] : this;\n };\n return Int10;\n}());\n\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/lib/asn1js/int10.js?')},"./lib/lib/jsbn/base64.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "hex2b64": () => (/* binding */ hex2b64),\n/* harmony export */ "b64tohex": () => (/* binding */ b64tohex),\n/* harmony export */ "b64toBA": () => (/* binding */ b64toBA)\n/* harmony export */ });\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./lib/lib/jsbn/util.js");\n\nvar b64map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\nvar b64pad = "=";\nfunction hex2b64(h) {\n var i;\n var c;\n var ret = "";\n for (i = 0; i + 3 <= h.length; i += 3) {\n c = parseInt(h.substring(i, i + 3), 16);\n ret += b64map.charAt(c >> 6) + b64map.charAt(c & 63);\n }\n if (i + 1 == h.length) {\n c = parseInt(h.substring(i, i + 1), 16);\n ret += b64map.charAt(c << 2);\n }\n else if (i + 2 == h.length) {\n c = parseInt(h.substring(i, i + 2), 16);\n ret += b64map.charAt(c >> 2) + b64map.charAt((c & 3) << 4);\n }\n while ((ret.length & 3) > 0) {\n ret += b64pad;\n }\n return ret;\n}\n// convert a base64 string to hex\nfunction b64tohex(s) {\n var ret = "";\n var i;\n var k = 0; // b64 state, 0-3\n var slop = 0;\n for (i = 0; i < s.length; ++i) {\n if (s.charAt(i) == b64pad) {\n break;\n }\n var v = b64map.indexOf(s.charAt(i));\n if (v < 0) {\n continue;\n }\n if (k == 0) {\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(v >> 2);\n slop = v & 3;\n k = 1;\n }\n else if (k == 1) {\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)((slop << 2) | (v >> 4));\n slop = v & 0xf;\n k = 2;\n }\n else if (k == 2) {\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(slop);\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(v >> 2);\n slop = v & 3;\n k = 3;\n }\n else {\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)((slop << 2) | (v >> 4));\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(v & 0xf);\n k = 0;\n }\n }\n if (k == 1) {\n ret += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(slop << 2);\n }\n return ret;\n}\n// convert a base64 string to a byte/number array\nfunction b64toBA(s) {\n // piggyback on b64tohex for now, optimize later\n var h = b64tohex(s);\n var i;\n var a = [];\n for (i = 0; 2 * i < h.length; ++i) {\n a[i] = parseInt(h.substring(2 * i, 2 * i + 2), 16);\n }\n return a;\n}\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/lib/jsbn/base64.js?')},"./lib/lib/jsbn/jsbn.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "BigInteger": () => (/* binding */ BigInteger),\n/* harmony export */ "nbi": () => (/* binding */ nbi),\n/* harmony export */ "parseBigInt": () => (/* binding */ parseBigInt),\n/* harmony export */ "intAt": () => (/* binding */ intAt),\n/* harmony export */ "nbv": () => (/* binding */ nbv),\n/* harmony export */ "nbits": () => (/* binding */ nbits)\n/* harmony export */ });\n/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./lib/lib/jsbn/util.js");\n// Copyright (c) 2005 Tom Wu\n// All Rights Reserved.\n// See "LICENSE" for details.\n// Basic JavaScript BN library - subset useful for RSA encryption.\n\n// Bits per digit\nvar dbits;\n// JavaScript engine analysis\nvar canary = 0xdeadbeefcafe;\nvar j_lm = ((canary & 0xffffff) == 0xefcafe);\n//#region\nvar lowprimes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997];\nvar lplim = (1 << 26) / lowprimes[lowprimes.length - 1];\n//#endregion\n// (public) Constructor\nvar BigInteger = /** @class */ (function () {\n function BigInteger(a, b, c) {\n if (a != null) {\n if ("number" == typeof a) {\n this.fromNumber(a, b, c);\n }\n else if (b == null && "string" != typeof a) {\n this.fromString(a, 256);\n }\n else {\n this.fromString(a, b);\n }\n }\n }\n //#region PUBLIC\n // BigInteger.prototype.toString = bnToString;\n // (public) return string representation in given radix\n BigInteger.prototype.toString = function (b) {\n if (this.s < 0) {\n return "-" + this.negate().toString(b);\n }\n var k;\n if (b == 16) {\n k = 4;\n }\n else if (b == 8) {\n k = 3;\n }\n else if (b == 2) {\n k = 1;\n }\n else if (b == 32) {\n k = 5;\n }\n else if (b == 4) {\n k = 2;\n }\n else {\n return this.toRadix(b);\n }\n var km = (1 << k) - 1;\n var d;\n var m = false;\n var r = "";\n var i = this.t;\n var p = this.DB - (i * this.DB) % k;\n if (i-- > 0) {\n if (p < this.DB && (d = this[i] >> p) > 0) {\n m = true;\n r = (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(d);\n }\n while (i >= 0) {\n if (p < k) {\n d = (this[i] & ((1 << p) - 1)) << (k - p);\n d |= this[--i] >> (p += this.DB - k);\n }\n else {\n d = (this[i] >> (p -= k)) & km;\n if (p <= 0) {\n p += this.DB;\n --i;\n }\n }\n if (d > 0) {\n m = true;\n }\n if (m) {\n r += (0,_util__WEBPACK_IMPORTED_MODULE_0__.int2char)(d);\n }\n }\n }\n return m ? r : "0";\n };\n // BigInteger.prototype.negate = bnNegate;\n // (public) -this\n BigInteger.prototype.negate = function () {\n var r = nbi();\n BigInteger.ZERO.subTo(this, r);\n return r;\n };\n // BigInteger.prototype.abs = bnAbs;\n // (public) |this|\n BigInteger.prototype.abs = function () {\n return (this.s < 0) ? this.negate() : this;\n };\n // BigInteger.prototype.compareTo = bnCompareTo;\n // (public) return + if this > a, - if this < a, 0 if equal\n BigInteger.prototype.compareTo = function (a) {\n var r = this.s - a.s;\n if (r != 0) {\n return r;\n }\n var i = this.t;\n r = i - a.t;\n if (r != 0) {\n return (this.s < 0) ? -r : r;\n }\n while (--i >= 0) {\n if ((r = this[i] - a[i]) != 0) {\n return r;\n }\n }\n return 0;\n };\n // BigInteger.prototype.bitLength = bnBitLength;\n // (public) return the number of bits in "this"\n BigInteger.prototype.bitLength = function () {\n if (this.t <= 0) {\n return 0;\n }\n return this.DB * (this.t - 1) + nbits(this[this.t - 1] ^ (this.s & this.DM));\n };\n // BigInteger.prototype.mod = bnMod;\n // (public) this mod a\n BigInteger.prototype.mod = function (a) {\n var r = nbi();\n this.abs().divRemTo(a, null, r);\n if (this.s < 0 && r.compareTo(BigInteger.ZERO) > 0) {\n a.subTo(r, r);\n }\n return r;\n };\n // BigInteger.prototype.modPowInt = bnModPowInt;\n // (public) this^e % m, 0 <= e < 2^32\n BigInteger.prototype.modPowInt = function (e, m) {\n var z;\n if (e < 256 || m.isEven()) {\n z = new Classic(m);\n }\n else {\n z = new Montgomery(m);\n }\n return this.exp(e, z);\n };\n // BigInteger.prototype.clone = bnClone;\n // (public)\n BigInteger.prototype.clone = function () {\n var r = nbi();\n this.copyTo(r);\n return r;\n };\n // BigInteger.prototype.intValue = bnIntValue;\n // (public) return value as integer\n BigInteger.prototype.intValue = function () {\n if (this.s < 0) {\n if (this.t == 1) {\n return this[0] - this.DV;\n }\n else if (this.t == 0) {\n return -1;\n }\n }\n else if (this.t == 1) {\n return this[0];\n }\n else if (this.t == 0) {\n return 0;\n }\n // assumes 16 < DB < 32\n return ((this[1] & ((1 << (32 - this.DB)) - 1)) << this.DB) | this[0];\n };\n // BigInteger.prototype.byteValue = bnByteValue;\n // (public) return value as byte\n BigInteger.prototype.byteValue = function () {\n return (this.t == 0) ? this.s : (this[0] << 24) >> 24;\n };\n // BigInteger.prototype.shortValue = bnShortValue;\n // (public) return value as short (assumes DB>=16)\n BigInteger.prototype.shortValue = function () {\n return (this.t == 0) ? this.s : (this[0] << 16) >> 16;\n };\n // BigInteger.prototype.signum = bnSigNum;\n // (public) 0 if this == 0, 1 if this > 0\n BigInteger.prototype.signum = function () {\n if (this.s < 0) {\n return -1;\n }\n else if (this.t <= 0 || (this.t == 1 && this[0] <= 0)) {\n return 0;\n }\n else {\n return 1;\n }\n };\n // BigInteger.prototype.toByteArray = bnToByteArray;\n // (public) convert to bigendian byte array\n BigInteger.prototype.toByteArray = function () {\n var i = this.t;\n var r = [];\n r[0] = this.s;\n var p = this.DB - (i * this.DB) % 8;\n var d;\n var k = 0;\n if (i-- > 0) {\n if (p < this.DB && (d = this[i] >> p) != (this.s & this.DM) >> p) {\n r[k++] = d | (this.s << (this.DB - p));\n }\n while (i >= 0) {\n if (p < 8) {\n d = (this[i] & ((1 << p) - 1)) << (8 - p);\n d |= this[--i] >> (p += this.DB - 8);\n }\n else {\n d = (this[i] >> (p -= 8)) & 0xff;\n if (p <= 0) {\n p += this.DB;\n --i;\n }\n }\n if ((d & 0x80) != 0) {\n d |= -256;\n }\n if (k == 0 && (this.s & 0x80) != (d & 0x80)) {\n ++k;\n }\n if (k > 0 || d != this.s) {\n r[k++] = d;\n }\n }\n }\n return r;\n };\n // BigInteger.prototype.equals = bnEquals;\n BigInteger.prototype.equals = function (a) {\n return (this.compareTo(a) == 0);\n };\n // BigInteger.prototype.min = bnMin;\n BigInteger.prototype.min = function (a) {\n return (this.compareTo(a) < 0) ? this : a;\n };\n // BigInteger.prototype.max = bnMax;\n BigInteger.prototype.max = function (a) {\n return (this.compareTo(a) > 0) ? this : a;\n };\n // BigInteger.prototype.and = bnAnd;\n BigInteger.prototype.and = function (a) {\n var r = nbi();\n this.bitwiseTo(a, _util__WEBPACK_IMPORTED_MODULE_0__.op_and, r);\n return r;\n };\n // BigInteger.prototype.or = bnOr;\n BigInteger.prototype.or = function (a) {\n var r = nbi();\n this.bitwiseTo(a, _util__WEBPACK_IMPORTED_MODULE_0__.op_or, r);\n return r;\n };\n // BigInteger.prototype.xor = bnXor;\n BigInteger.prototype.xor = function (a) {\n var r = nbi();\n this.bitwiseTo(a, _util__WEBPACK_IMPORTED_MODULE_0__.op_xor, r);\n return r;\n };\n // BigInteger.prototype.andNot = bnAndNot;\n BigInteger.prototype.andNot = function (a) {\n var r = nbi();\n this.bitwiseTo(a, _util__WEBPACK_IMPORTED_MODULE_0__.op_andnot, r);\n return r;\n };\n // BigInteger.prototype.not = bnNot;\n // (public) ~this\n BigInteger.prototype.not = function () {\n var r = nbi();\n for (var i = 0; i < this.t; ++i) {\n r[i] = this.DM & ~this[i];\n }\n r.t = this.t;\n r.s = ~this.s;\n return r;\n };\n // BigInteger.prototype.shiftLeft = bnShiftLeft;\n // (public) this << n\n BigInteger.prototype.shiftLeft = function (n) {\n var r = nbi();\n if (n < 0) {\n this.rShiftTo(-n, r);\n }\n else {\n this.lShiftTo(n, r);\n }\n return r;\n };\n // BigInteger.prototype.shiftRight = bnShiftRight;\n // (public) this >> n\n BigInteger.prototype.shiftRight = function (n) {\n var r = nbi();\n if (n < 0) {\n this.lShiftTo(-n, r);\n }\n else {\n this.rShiftTo(n, r);\n }\n return r;\n };\n // BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;\n // (public) returns index of lowest 1-bit (or -1 if none)\n BigInteger.prototype.getLowestSetBit = function () {\n for (var i = 0; i < this.t; ++i) {\n if (this[i] != 0) {\n return i * this.DB + (0,_util__WEBPACK_IMPORTED_MODULE_0__.lbit)(this[i]);\n }\n }\n if (this.s < 0) {\n return this.t * this.DB;\n }\n return -1;\n };\n // BigInteger.prototype.bitCount = bnBitCount;\n // (public) return number of set bits\n BigInteger.prototype.bitCount = function () {\n var r = 0;\n var x = this.s & this.DM;\n for (var i = 0; i < this.t; ++i) {\n r += (0,_util__WEBPACK_IMPORTED_MODULE_0__.cbit)(this[i] ^ x);\n }\n return r;\n };\n // BigInteger.prototype.testBit = bnTestBit;\n // (public) true iff nth bit is set\n BigInteger.prototype.testBit = function (n) {\n var j = Math.floor(n / this.DB);\n if (j >= this.t) {\n return (this.s != 0);\n }\n return ((this[j] & (1 << (n % this.DB))) != 0);\n };\n // BigInteger.prototype.setBit = bnSetBit;\n // (public) this | (1<<n)\n BigInteger.prototype.setBit = function (n) {\n return this.changeBit(n, _util__WEBPACK_IMPORTED_MODULE_0__.op_or);\n };\n // BigInteger.prototype.clearBit = bnClearBit;\n // (public) this & ~(1<<n)\n BigInteger.prototype.clearBit = function (n) {\n return this.changeBit(n, _util__WEBPACK_IMPORTED_MODULE_0__.op_andnot);\n };\n // BigInteger.prototype.flipBit = bnFlipBit;\n // (public) this ^ (1<<n)\n BigInteger.prototype.flipBit = function (n) {\n return this.changeBit(n, _util__WEBPACK_IMPORTED_MODULE_0__.op_xor);\n };\n // BigInteger.prototype.add = bnAdd;\n // (public) this + a\n BigInteger.prototype.add = function (a) {\n var r = nbi();\n this.addTo(a, r);\n return r;\n };\n // BigInteger.prototype.subtract = bnSubtract;\n // (public) this - a\n BigInteger.prototype.subtract = function (a) {\n var r = nbi();\n this.subTo(a, r);\n return r;\n };\n // BigInteger.prototype.multiply = bnMultiply;\n // (public) this * a\n BigInteger.prototype.multiply = function (a) {\n var r = nbi();\n this.multiplyTo(a, r);\n return r;\n };\n // BigInteger.prototype.divide = bnDivide;\n // (public) this / a\n BigInteger.prototype.divide = function (a) {\n var r = nbi();\n this.divRemTo(a, r, null);\n return r;\n };\n // BigInteger.prototype.remainder = bnRemainder;\n // (public) this % a\n BigInteger.prototype.remainder = function (a) {\n var r = nbi();\n this.divRemTo(a, null, r);\n return r;\n };\n // BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder;\n // (public) [this/a,this%a]\n BigInteger.prototype.divideAndRemainder = function (a) {\n var q = nbi();\n var r = nbi();\n this.divRemTo(a, q, r);\n return [q, r];\n };\n // BigInteger.prototype.modPow = bnModPow;\n // (public) this^e % m (HAC 14.85)\n BigInteger.prototype.modPow = function (e, m) {\n var i = e.bitLength();\n var k;\n var r = nbv(1);\n var z;\n if (i <= 0) {\n return r;\n }\n else if (i < 18) {\n k = 1;\n }\n else if (i < 48) {\n k = 3;\n }\n else if (i < 144) {\n k = 4;\n }\n else if (i < 768) {\n k = 5;\n }\n else {\n k = 6;\n }\n if (i < 8) {\n z = new Classic(m);\n }\n else if (m.isEven()) {\n z = new Barrett(m);\n }\n else {\n z = new Montgomery(m);\n }\n // precomputation\n var g = [];\n var n = 3;\n var k1 = k - 1;\n var km = (1 << k) - 1;\n g[1] = z.convert(this);\n if (k > 1) {\n var g2 = nbi();\n z.sqrTo(g[1], g2);\n while (n <= km) {\n g[n] = nbi();\n z.mulTo(g2, g[n - 2], g[n]);\n n += 2;\n }\n }\n var j = e.t - 1;\n var w;\n var is1 = true;\n var r2 = nbi();\n var t;\n i = nbits(e[j]) - 1;\n while (j >= 0) {\n if (i >= k1) {\n w = (e[j] >> (i - k1)) & km;\n }\n else {\n w = (e[j] & ((1 << (i + 1)) - 1)) << (k1 - i);\n if (j > 0) {\n w |= e[j - 1] >> (this.DB + i - k1);\n }\n }\n n = k;\n while ((w & 1) == 0) {\n w >>= 1;\n --n;\n }\n if ((i -= n) < 0) {\n i += this.DB;\n --j;\n }\n if (is1) { // ret == 1, don\'t bother squaring or multiplying it\n g[w].copyTo(r);\n is1 = false;\n }\n else {\n while (n > 1) {\n z.sqrTo(r, r2);\n z.sqrTo(r2, r);\n n -= 2;\n }\n if (n > 0) {\n z.sqrTo(r, r2);\n }\n else {\n t = r;\n r = r2;\n r2 = t;\n }\n z.mulTo(r2, g[w], r);\n }\n while (j >= 0 && (e[j] & (1 << i)) == 0) {\n z.sqrTo(r, r2);\n t = r;\n r = r2;\n r2 = t;\n if (--i < 0) {\n i = this.DB - 1;\n --j;\n }\n }\n }\n return z.revert(r);\n };\n // BigInteger.prototype.modInverse = bnModInverse;\n // (public) 1/this % m (HAC 14.61)\n BigInteger.prototype.modInverse = function (m) {\n var ac = m.isEven();\n if ((this.isEven() && ac) || m.signum() == 0) {\n return BigInteger.ZERO;\n }\n var u = m.clone();\n var v = this.clone();\n var a = nbv(1);\n var b = nbv(0);\n var c = nbv(0);\n var d = nbv(1);\n while (u.signum() != 0) {\n while (u.isEven()) {\n u.rShiftTo(1, u);\n if (ac) {\n if (!a.isEven() || !b.isEven()) {\n a.addTo(this, a);\n b.subTo(m, b);\n }\n a.rShiftTo(1, a);\n }\n else if (!b.isEven()) {\n b.subTo(m, b);\n }\n b.rShiftTo(1, b);\n }\n while (v.isEven()) {\n v.rShiftTo(1, v);\n if (ac) {\n if (!c.isEven() || !d.isEven()) {\n c.addTo(this, c);\n d.subTo(m, d);\n }\n c.rShiftTo(1, c);\n }\n else if (!d.isEven()) {\n d.subTo(m, d);\n }\n d.rShiftTo(1, d);\n }\n if (u.compareTo(v) >= 0) {\n u.subTo(v, u);\n if (ac) {\n a.subTo(c, a);\n }\n b.subTo(d, b);\n }\n else {\n v.subTo(u, v);\n if (ac) {\n c.subTo(a, c);\n }\n d.subTo(b, d);\n }\n }\n if (v.compareTo(BigInteger.ONE) != 0) {\n return BigInteger.ZERO;\n }\n if (d.compareTo(m) >= 0) {\n return d.subtract(m);\n }\n if (d.signum() < 0) {\n d.addTo(m, d);\n }\n else {\n return d;\n }\n if (d.signum() < 0) {\n return d.add(m);\n }\n else {\n return d;\n }\n };\n // BigInteger.prototype.pow = bnPow;\n // (public) this^e\n BigInteger.prototype.pow = function (e) {\n return this.exp(e, new NullExp());\n };\n // BigInteger.prototype.gcd = bnGCD;\n // (public) gcd(this,a) (HAC 14.54)\n BigInteger.prototype.gcd = function (a) {\n var x = (this.s < 0) ? this.negate() : this.clone();\n var y = (a.s < 0) ? a.negate() : a.clone();\n if (x.compareTo(y) < 0) {\n var t = x;\n x = y;\n y = t;\n }\n var i = x.getLowestSetBit();\n var g = y.getLowestSetBit();\n if (g < 0) {\n return x;\n }\n if (i < g) {\n g = i;\n }\n if (g > 0) {\n x.rShiftTo(g, x);\n y.rShiftTo(g, y);\n }\n while (x.signum() > 0) {\n if ((i = x.getLowestSetBit()) > 0) {\n x.rShiftTo(i, x);\n }\n if ((i = y.getLowestSetBit()) > 0) {\n y.rShiftTo(i, y);\n }\n if (x.compareTo(y) >= 0) {\n x.subTo(y, x);\n x.rShiftTo(1, x);\n }\n else {\n y.subTo(x, y);\n y.rShiftTo(1, y);\n }\n }\n if (g > 0) {\n y.lShiftTo(g, y);\n }\n return y;\n };\n // BigInteger.prototype.isProbablePrime = bnIsProbablePrime;\n // (public) test primality with certainty >= 1-.5^t\n BigInteger.prototype.isProbablePrime = function (t) {\n var i;\n var x = this.abs();\n if (x.t == 1 && x[0] <= lowprimes[lowprimes.length - 1]) {\n for (i = 0; i < lowprimes.length; ++i) {\n if (x[0] == lowprimes[i]) {\n return true;\n }\n }\n return false;\n }\n if (x.isEven()) {\n return false;\n }\n i = 1;\n while (i < lowprimes.length) {\n var m = lowprimes[i];\n var j = i + 1;\n while (j < lowprimes.length && m < lplim) {\n m *= lowprimes[j++];\n }\n m = x.modInt(m);\n while (i < j) {\n if (m % lowprimes[i++] == 0) {\n return false;\n }\n }\n }\n return x.millerRabin(t);\n };\n //#endregion PUBLIC\n //#region PROTECTED\n // BigInteger.prototype.copyTo = bnpCopyTo;\n // (protected) copy this to r\n BigInteger.prototype.copyTo = function (r) {\n for (var i = this.t - 1; i >= 0; --i) {\n r[i] = this[i];\n }\n r.t = this.t;\n r.s = this.s;\n };\n // BigInteger.prototype.fromInt = bnpFromInt;\n // (protected) set from integer value x, -DV <= x < DV\n BigInteger.prototype.fromInt = function (x) {\n this.t = 1;\n this.s = (x < 0) ? -1 : 0;\n if (x > 0) {\n this[0] = x;\n }\n else if (x < -1) {\n this[0] = x + this.DV;\n }\n else {\n this.t = 0;\n }\n };\n // BigInteger.prototype.fromString = bnpFromString;\n // (protected) set from string and radix\n BigInteger.prototype.fromString = function (s, b) {\n var k;\n if (b == 16) {\n k = 4;\n }\n else if (b == 8) {\n k = 3;\n }\n else if (b == 256) {\n k = 8;\n /* byte array */\n }\n else if (b == 2) {\n k = 1;\n }\n else if (b == 32) {\n k = 5;\n }\n else if (b == 4) {\n k = 2;\n }\n else {\n this.fromRadix(s, b);\n return;\n }\n this.t = 0;\n this.s = 0;\n var i = s.length;\n var mi = false;\n var sh = 0;\n while (--i >= 0) {\n var x = (k == 8) ? (+s[i]) & 0xff : intAt(s, i);\n if (x < 0) {\n if (s.charAt(i) == "-") {\n mi = true;\n }\n continue;\n }\n mi = false;\n if (sh == 0) {\n this[this.t++] = x;\n }\n else if (sh + k > this.DB) {\n this[this.t - 1] |= (x & ((1 << (this.DB - sh)) - 1)) << sh;\n this[this.t++] = (x >> (this.DB - sh));\n }\n else {\n this[this.t - 1] |= x << sh;\n }\n sh += k;\n if (sh >= this.DB) {\n sh -= this.DB;\n }\n }\n if (k == 8 && ((+s[0]) & 0x80) != 0) {\n this.s = -1;\n if (sh > 0) {\n this[this.t - 1] |= ((1 << (this.DB - sh)) - 1) << sh;\n }\n }\n this.clamp();\n if (mi) {\n BigInteger.ZERO.subTo(this, this);\n }\n };\n // BigInteger.prototype.clamp = bnpClamp;\n // (protected) clamp off excess high words\n BigInteger.prototype.clamp = function () {\n var c = this.s & this.DM;\n while (this.t > 0 && this[this.t - 1] == c) {\n --this.t;\n }\n };\n // BigInteger.prototype.dlShiftTo = bnpDLShiftTo;\n // (protected) r = this << n*DB\n BigInteger.prototype.dlShiftTo = function (n, r) {\n var i;\n for (i = this.t - 1; i >= 0; --i) {\n r[i + n] = this[i];\n }\n for (i = n - 1; i >= 0; --i) {\n r[i] = 0;\n }\n r.t = this.t + n;\n r.s = this.s;\n };\n // BigInteger.prototype.drShiftTo = bnpDRShiftTo;\n // (protected) r = this >> n*DB\n BigInteger.prototype.drShiftTo = function (n, r) {\n for (var i = n; i < this.t; ++i) {\n r[i - n] = this[i];\n }\n r.t = Math.max(this.t - n, 0);\n r.s = this.s;\n };\n // BigInteger.prototype.lShiftTo = bnpLShiftTo;\n // (protected) r = this << n\n BigInteger.prototype.lShiftTo = function (n, r) {\n var bs = n % this.DB;\n var cbs = this.DB - bs;\n var bm = (1 << cbs) - 1;\n var ds = Math.floor(n / this.DB);\n var c = (this.s << bs) & this.DM;\n for (var i = this.t - 1; i >= 0; --i) {\n r[i + ds + 1] = (this[i] >> cbs) | c;\n c = (this[i] & bm) << bs;\n }\n for (var i = ds - 1; i >= 0; --i) {\n r[i] = 0;\n }\n r[ds] = c;\n r.t = this.t + ds + 1;\n r.s = this.s;\n r.clamp();\n };\n // BigInteger.prototype.rShiftTo = bnpRShiftTo;\n // (protected) r = this >> n\n BigInteger.prototype.rShiftTo = function (n, r) {\n r.s = this.s;\n var ds = Math.floor(n / this.DB);\n if (ds >= this.t) {\n r.t = 0;\n return;\n }\n var bs = n % this.DB;\n var cbs = this.DB - bs;\n var bm = (1 << bs) - 1;\n r[0] = this[ds] >> bs;\n for (var i = ds + 1; i < this.t; ++i) {\n r[i - ds - 1] |= (this[i] & bm) << cbs;\n r[i - ds] = this[i] >> bs;\n }\n if (bs > 0) {\n r[this.t - ds - 1] |= (this.s & bm) << cbs;\n }\n r.t = this.t - ds;\n r.clamp();\n };\n // BigInteger.prototype.subTo = bnpSubTo;\n // (protected) r = this - a\n BigInteger.prototype.subTo = function (a, r) {\n var i = 0;\n var c = 0;\n var m = Math.min(a.t, this.t);\n while (i < m) {\n c += this[i] - a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n if (a.t < this.t) {\n c -= a.s;\n while (i < this.t) {\n c += this[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while (i < a.t) {\n c -= a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c -= a.s;\n }\n r.s = (c < 0) ? -1 : 0;\n if (c < -1) {\n r[i++] = this.DV + c;\n }\n else if (c > 0) {\n r[i++] = c;\n }\n r.t = i;\n r.clamp();\n };\n // BigInteger.prototype.multiplyTo = bnpMultiplyTo;\n // (protected) r = this * a, r != this,a (HAC 14.12)\n // "this" should be the larger one if appropriate.\n BigInteger.prototype.multiplyTo = function (a, r) {\n var x = this.abs();\n var y = a.abs();\n var i = x.t;\n r.t = i + y.t;\n while (--i >= 0) {\n r[i] = 0;\n }\n for (i = 0; i < y.t; ++i) {\n r[i + x.t] = x.am(0, y[i], r, i, 0, x.t);\n }\n r.s = 0;\n r.clamp();\n if (this.s != a.s) {\n BigInteger.ZERO.subTo(r, r);\n }\n };\n // BigInteger.prototype.squareTo = bnpSquareTo;\n // (protected) r = this^2, r != this (HAC 14.16)\n BigInteger.prototype.squareTo = function (r) {\n var x = this.abs();\n var i = r.t = 2 * x.t;\n while (--i >= 0) {\n r[i] = 0;\n }\n for (i = 0; i < x.t - 1; ++i) {\n var c = x.am(i, x[i], r, 2 * i, 0, 1);\n if ((r[i + x.t] += x.am(i + 1, 2 * x[i], r, 2 * i + 1, c, x.t - i - 1)) >= x.DV) {\n r[i + x.t] -= x.DV;\n r[i + x.t + 1] = 1;\n }\n }\n if (r.t > 0) {\n r[r.t - 1] += x.am(i, x[i], r, 2 * i, 0, 1);\n }\n r.s = 0;\n r.clamp();\n };\n // BigInteger.prototype.divRemTo = bnpDivRemTo;\n // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)\n // r != q, this != m. q or r may be null.\n BigInteger.prototype.divRemTo = function (m, q, r) {\n var pm = m.abs();\n if (pm.t <= 0) {\n return;\n }\n var pt = this.abs();\n if (pt.t < pm.t) {\n if (q != null) {\n q.fromInt(0);\n }\n if (r != null) {\n this.copyTo(r);\n }\n return;\n }\n if (r == null) {\n r = nbi();\n }\n var y = nbi();\n var ts = this.s;\n var ms = m.s;\n var nsh = this.DB - nbits(pm[pm.t - 1]); // normalize modulus\n if (nsh > 0) {\n pm.lShiftTo(nsh, y);\n pt.lShiftTo(nsh, r);\n }\n else {\n pm.copyTo(y);\n pt.copyTo(r);\n }\n var ys = y.t;\n var y0 = y[ys - 1];\n if (y0 == 0) {\n return;\n }\n var yt = y0 * (1 << this.F1) + ((ys > 1) ? y[ys - 2] >> this.F2 : 0);\n var d1 = this.FV / yt;\n var d2 = (1 << this.F1) / yt;\n var e = 1 << this.F2;\n var i = r.t;\n var j = i - ys;\n var t = (q == null) ? nbi() : q;\n y.dlShiftTo(j, t);\n if (r.compareTo(t) >= 0) {\n r[r.t++] = 1;\n r.subTo(t, r);\n }\n BigInteger.ONE.dlShiftTo(ys, t);\n t.subTo(y, y); // "negative" y so we can replace sub with am later\n while (y.t < ys) {\n y[y.t++] = 0;\n }\n while (--j >= 0) {\n // Estimate quotient digit\n var qd = (r[--i] == y0) ? this.DM : Math.floor(r[i] * d1 + (r[i - 1] + e) * d2);\n if ((r[i] += y.am(0, qd, r, j, 0, ys)) < qd) { // Try it out\n y.dlShiftTo(j, t);\n r.subTo(t, r);\n while (r[i] < --qd) {\n r.subTo(t, r);\n }\n }\n }\n if (q != null) {\n r.drShiftTo(ys, q);\n if (ts != ms) {\n BigInteger.ZERO.subTo(q, q);\n }\n }\n r.t = ys;\n r.clamp();\n if (nsh > 0) {\n r.rShiftTo(nsh, r);\n } // Denormalize remainder\n if (ts < 0) {\n BigInteger.ZERO.subTo(r, r);\n }\n };\n // BigInteger.prototype.invDigit = bnpInvDigit;\n // (protected) return "-1/this % 2^DB"; useful for Mont. reduction\n // justification:\n // xy == 1 (mod m)\n // xy = 1+km\n // xy(2-xy) = (1+km)(1-km)\n // x[y(2-xy)] = 1-k^2m^2\n // x[y(2-xy)] == 1 (mod m^2)\n // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2\n // should reduce x and y(2-xy) by m^2 at each step to keep size bounded.\n // JS multiply "overflows" differently from C/C++, so care is needed here.\n BigInteger.prototype.invDigit = function () {\n if (this.t < 1) {\n return 0;\n }\n var x = this[0];\n if ((x & 1) == 0) {\n return 0;\n }\n var y = x & 3; // y == 1/x mod 2^2\n y = (y * (2 - (x & 0xf) * y)) & 0xf; // y == 1/x mod 2^4\n y = (y * (2 - (x & 0xff) * y)) & 0xff; // y == 1/x mod 2^8\n y = (y * (2 - (((x & 0xffff) * y) & 0xffff))) & 0xffff; // y == 1/x mod 2^16\n // last step - calculate inverse mod DV directly;\n // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints\n y = (y * (2 - x * y % this.DV)) % this.DV; // y == 1/x mod 2^dbits\n // we really want the negative inverse, and -DV < y < DV\n return (y > 0) ? this.DV - y : -y;\n };\n // BigInteger.prototype.isEven = bnpIsEven;\n // (protected) true iff this is even\n BigInteger.prototype.isEven = function () {\n return ((this.t > 0) ? (this[0] & 1) : this.s) == 0;\n };\n // BigInteger.prototype.exp = bnpExp;\n // (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79)\n BigInteger.prototype.exp = function (e, z) {\n if (e > 0xffffffff || e < 1) {\n return BigInteger.ONE;\n }\n var r = nbi();\n var r2 = nbi();\n var g = z.convert(this);\n var i = nbits(e) - 1;\n g.copyTo(r);\n while (--i >= 0) {\n z.sqrTo(r, r2);\n if ((e & (1 << i)) > 0) {\n z.mulTo(r2, g, r);\n }\n else {\n var t = r;\n r = r2;\n r2 = t;\n }\n }\n return z.revert(r);\n };\n // BigInteger.prototype.chunkSize = bnpChunkSize;\n // (protected) return x s.t. r^x < DV\n BigInteger.prototype.chunkSize = function (r) {\n return Math.floor(Math.LN2 * this.DB / Math.log(r));\n };\n // BigInteger.prototype.toRadix = bnpToRadix;\n // (protected) convert to radix string\n BigInteger.prototype.toRadix = function (b) {\n if (b == null) {\n b = 10;\n }\n if (this.signum() == 0 || b < 2 || b > 36) {\n return "0";\n }\n var cs = this.chunkSize(b);\n var a = Math.pow(b, cs);\n var d = nbv(a);\n var y = nbi();\n var z = nbi();\n var r = "";\n this.divRemTo(d, y, z);\n while (y.signum() > 0) {\n r = (a + z.intValue()).toString(b).substr(1) + r;\n y.divRemTo(d, y, z);\n }\n return z.intValue().toString(b) + r;\n };\n // BigInteger.prototype.fromRadix = bnpFromRadix;\n // (protected) convert from radix string\n BigInteger.prototype.fromRadix = function (s, b) {\n this.fromInt(0);\n if (b == null) {\n b = 10;\n }\n var cs = this.chunkSize(b);\n var d = Math.pow(b, cs);\n var mi = false;\n var j = 0;\n var w = 0;\n for (var i = 0; i < s.length; ++i) {\n var x = intAt(s, i);\n if (x < 0) {\n if (s.charAt(i) == "-" && this.signum() == 0) {\n mi = true;\n }\n continue;\n }\n w = b * w + x;\n if (++j >= cs) {\n this.dMultiply(d);\n this.dAddOffset(w, 0);\n j = 0;\n w = 0;\n }\n }\n if (j > 0) {\n this.dMultiply(Math.pow(b, j));\n this.dAddOffset(w, 0);\n }\n if (mi) {\n BigInteger.ZERO.subTo(this, this);\n }\n };\n // BigInteger.prototype.fromNumber = bnpFromNumber;\n // (protected) alternate constructor\n BigInteger.prototype.fromNumber = function (a, b, c) {\n if ("number" == typeof b) {\n // new BigInteger(int,int,RNG)\n if (a < 2) {\n this.fromInt(1);\n }\n else {\n this.fromNumber(a, c);\n if (!this.testBit(a - 1)) {\n // force MSB set\n this.bitwiseTo(BigInteger.ONE.shiftLeft(a - 1), _util__WEBPACK_IMPORTED_MODULE_0__.op_or, this);\n }\n if (this.isEven()) {\n this.dAddOffset(1, 0);\n } // force odd\n while (!this.isProbablePrime(b)) {\n this.dAddOffset(2, 0);\n if (this.bitLength() > a) {\n this.subTo(BigInteger.ONE.shiftLeft(a - 1), this);\n }\n }\n }\n }\n else {\n // new BigInteger(int,RNG)\n var x = [];\n var t = a & 7;\n x.length = (a >> 3) + 1;\n b.nextBytes(x);\n if (t > 0) {\n x[0] &= ((1 << t) - 1);\n }\n else {\n x[0] = 0;\n }\n this.fromString(x, 256);\n }\n };\n // BigInteger.prototype.bitwiseTo = bnpBitwiseTo;\n // (protected) r = this op a (bitwise)\n BigInteger.prototype.bitwiseTo = function (a, op, r) {\n var i;\n var f;\n var m = Math.min(a.t, this.t);\n for (i = 0; i < m; ++i) {\n r[i] = op(this[i], a[i]);\n }\n if (a.t < this.t) {\n f = a.s & this.DM;\n for (i = m; i < this.t; ++i) {\n r[i] = op(this[i], f);\n }\n r.t = this.t;\n }\n else {\n f = this.s & this.DM;\n for (i = m; i < a.t; ++i) {\n r[i] = op(f, a[i]);\n }\n r.t = a.t;\n }\n r.s = op(this.s, a.s);\n r.clamp();\n };\n // BigInteger.prototype.changeBit = bnpChangeBit;\n // (protected) this op (1<<n)\n BigInteger.prototype.changeBit = function (n, op) {\n var r = BigInteger.ONE.shiftLeft(n);\n this.bitwiseTo(r, op, r);\n return r;\n };\n // BigInteger.prototype.addTo = bnpAddTo;\n // (protected) r = this + a\n BigInteger.prototype.addTo = function (a, r) {\n var i = 0;\n var c = 0;\n var m = Math.min(a.t, this.t);\n while (i < m) {\n c += this[i] + a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n if (a.t < this.t) {\n c += a.s;\n while (i < this.t) {\n c += this[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += this.s;\n }\n else {\n c += this.s;\n while (i < a.t) {\n c += a[i];\n r[i++] = c & this.DM;\n c >>= this.DB;\n }\n c += a.s;\n }\n r.s = (c < 0) ? -1 : 0;\n if (c > 0) {\n r[i++] = c;\n }\n else if (c < -1) {\n r[i++] = this.DV + c;\n }\n r.t = i;\n r.clamp();\n };\n // BigInteger.prototype.dMultiply = bnpDMultiply;\n // (protected) this *= n, this >= 0, 1 < n < DV\n BigInteger.prototype.dMultiply = function (n) {\n this[this.t] = this.am(0, n - 1, this, 0, 0, this.t);\n ++this.t;\n this.clamp();\n };\n // BigInteger.prototype.dAddOffset = bnpDAddOffset;\n // (protected) this += n << w words, this >= 0\n BigInteger.prototype.dAddOffset = function (n, w) {\n if (n == 0) {\n return;\n }\n while (this.t <= w) {\n this[this.t++] = 0;\n }\n this[w] += n;\n while (this[w] >= this.DV) {\n this[w] -= this.DV;\n if (++w >= this.t) {\n this[this.t++] = 0;\n }\n ++this[w];\n }\n };\n // BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;\n // (protected) r = lower n words of "this * a", a.t <= n\n // "this" should be the larger one if appropriate.\n BigInteger.prototype.multiplyLowerTo = function (a, n, r) {\n var i = Math.min(this.t + a.t, n);\n r.s = 0; // assumes a,this >= 0\n r.t = i;\n while (i > 0) {\n r[--i] = 0;\n }\n for (var j = r.t - this.t; i < j; ++i) {\n r[i + this.t] = this.am(0, a[i], r, i, 0, this.t);\n }\n for (var j = Math.min(a.t, n); i < j; ++i) {\n this.am(0, a[i], r, i, 0, n - i);\n }\n r.clamp();\n };\n // BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;\n // (protected) r = "this * a" without lower n words, n > 0\n // "this" should be the larger one if appropriate.\n BigInteger.prototype.multiplyUpperTo = function (a, n, r) {\n --n;\n var i = r.t = this.t + a.t - n;\n r.s = 0; // assumes a,this >= 0\n while (--i >= 0) {\n r[i] = 0;\n }\n for (i = Math.max(n - this.t, 0); i < a.t; ++i) {\n r[this.t + i - n] = this.am(n - i, a[i], r, 0, 0, this.t + i - n);\n }\n r.clamp();\n r.drShiftTo(1, r);\n };\n // BigInteger.prototype.modInt = bnpModInt;\n // (protected) this % n, n < 2^26\n BigInteger.prototype.modInt = function (n) {\n if (n <= 0) {\n return 0;\n }\n var d = this.DV % n;\n var r = (this.s < 0) ? n - 1 : 0;\n if (this.t > 0) {\n if (d == 0) {\n r = this[0] % n;\n }\n else {\n for (var i = this.t - 1; i >= 0; --i) {\n r = (d * r + this[i]) % n;\n }\n }\n }\n return r;\n };\n // BigInteger.prototype.millerRabin = bnpMillerRabin;\n // (protected) true if probably prime (HAC 4.24, Miller-Rabin)\n BigInteger.prototype.millerRabin = function (t) {\n var n1 = this.subtract(BigInteger.ONE);\n var k = n1.getLowestSetBit();\n if (k <= 0) {\n return false;\n }\n var r = n1.shiftRight(k);\n t = (t + 1) >> 1;\n if (t > lowprimes.length) {\n t = lowprimes.length;\n }\n var a = nbi();\n for (var i = 0; i < t; ++i) {\n // Pick bases at random, instead of starting at 2\n a.fromInt(lowprimes[Math.floor(Math.random() * lowprimes.length)]);\n var y = a.modPow(r, this);\n if (y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {\n var j = 1;\n while (j++ < k && y.compareTo(n1) != 0) {\n y = y.modPowInt(2, this);\n if (y.compareTo(BigInteger.ONE) == 0) {\n return false;\n }\n }\n if (y.compareTo(n1) != 0) {\n return false;\n }\n }\n }\n return true;\n };\n // BigInteger.prototype.square = bnSquare;\n // (public) this^2\n BigInteger.prototype.square = function () {\n var r = nbi();\n this.squareTo(r);\n return r;\n };\n //#region ASYNC\n // Public API method\n BigInteger.prototype.gcda = function (a, callback) {\n var x = (this.s < 0) ? this.negate() : this.clone();\n var y = (a.s < 0) ? a.negate() : a.clone();\n if (x.compareTo(y) < 0) {\n var t = x;\n x = y;\n y = t;\n }\n var i = x.getLowestSetBit();\n var g = y.getLowestSetBit();\n if (g < 0) {\n callback(x);\n return;\n }\n if (i < g) {\n g = i;\n }\n if (g > 0) {\n x.rShiftTo(g, x);\n y.rShiftTo(g, y);\n }\n // Workhorse of the algorithm, gets called 200 - 800 times per 512 bit keygen.\n var gcda1 = function () {\n if ((i = x.getLowestSetBit()) > 0) {\n x.rShiftTo(i, x);\n }\n if ((i = y.getLowestSetBit()) > 0) {\n y.rShiftTo(i, y);\n }\n if (x.compareTo(y) >= 0) {\n x.subTo(y, x);\n x.rShiftTo(1, x);\n }\n else {\n y.subTo(x, y);\n y.rShiftTo(1, y);\n }\n if (!(x.signum() > 0)) {\n if (g > 0) {\n y.lShiftTo(g, y);\n }\n setTimeout(function () { callback(y); }, 0); // escape\n }\n else {\n setTimeout(gcda1, 0);\n }\n };\n setTimeout(gcda1, 10);\n };\n // (protected) alternate constructor\n BigInteger.prototype.fromNumberAsync = function (a, b, c, callback) {\n if ("number" == typeof b) {\n if (a < 2) {\n this.fromInt(1);\n }\n else {\n this.fromNumber(a, c);\n if (!this.testBit(a - 1)) {\n this.bitwiseTo(BigInteger.ONE.shiftLeft(a - 1), _util__WEBPACK_IMPORTED_MODULE_0__.op_or, this);\n }\n if (this.isEven()) {\n this.dAddOffset(1, 0);\n }\n var bnp_1 = this;\n var bnpfn1_1 = function () {\n bnp_1.dAddOffset(2, 0);\n if (bnp_1.bitLength() > a) {\n bnp_1.subTo(BigInteger.ONE.shiftLeft(a - 1), bnp_1);\n }\n if (bnp_1.isProbablePrime(b)) {\n setTimeout(function () { callback(); }, 0); // escape\n }\n else {\n setTimeout(bnpfn1_1, 0);\n }\n };\n setTimeout(bnpfn1_1, 0);\n }\n }\n else {\n var x = [];\n var t = a & 7;\n x.length = (a >> 3) + 1;\n b.nextBytes(x);\n if (t > 0) {\n x[0] &= ((1 << t) - 1);\n }\n else {\n x[0] = 0;\n }\n this.fromString(x, 256);\n }\n };\n return BigInteger;\n}());\n\n//#region REDUCERS\n//#region NullExp\nvar NullExp = /** @class */ (function () {\n function NullExp() {\n }\n // NullExp.prototype.convert = nNop;\n NullExp.prototype.convert = function (x) {\n return x;\n };\n // NullExp.prototype.revert = nNop;\n NullExp.prototype.revert = function (x) {\n return x;\n };\n // NullExp.prototype.mulTo = nMulTo;\n NullExp.prototype.mulTo = function (x, y, r) {\n x.multiplyTo(y, r);\n };\n // NullExp.prototype.sqrTo = nSqrTo;\n NullExp.prototype.sqrTo = function (x, r) {\n x.squareTo(r);\n };\n return NullExp;\n}());\n// Modular reduction using "classic" algorithm\nvar Classic = /** @class */ (function () {\n function Classic(m) {\n this.m = m;\n }\n // Classic.prototype.convert = cConvert;\n Classic.prototype.convert = function (x) {\n if (x.s < 0 || x.compareTo(this.m) >= 0) {\n return x.mod(this.m);\n }\n else {\n return x;\n }\n };\n // Classic.prototype.revert = cRevert;\n Classic.prototype.revert = function (x) {\n return x;\n };\n // Classic.prototype.reduce = cReduce;\n Classic.prototype.reduce = function (x) {\n x.divRemTo(this.m, null, x);\n };\n // Classic.prototype.mulTo = cMulTo;\n Classic.prototype.mulTo = function (x, y, r) {\n x.multiplyTo(y, r);\n this.reduce(r);\n };\n // Classic.prototype.sqrTo = cSqrTo;\n Classic.prototype.sqrTo = function (x, r) {\n x.squareTo(r);\n this.reduce(r);\n };\n return Classic;\n}());\n//#endregion\n//#region Montgomery\n// Montgomery reduction\nvar Montgomery = /** @class */ (function () {\n function Montgomery(m) {\n this.m = m;\n this.mp = m.invDigit();\n this.mpl = this.mp & 0x7fff;\n this.mph = this.mp >> 15;\n this.um = (1 << (m.DB - 15)) - 1;\n this.mt2 = 2 * m.t;\n }\n // Montgomery.prototype.convert = montConvert;\n // xR mod m\n Montgomery.prototype.convert = function (x) {\n var r = nbi();\n x.abs().dlShiftTo(this.m.t, r);\n r.divRemTo(this.m, null, r);\n if (x.s < 0 && r.compareTo(BigInteger.ZERO) > 0) {\n this.m.subTo(r, r);\n }\n return r;\n };\n // Montgomery.prototype.revert = montRevert;\n // x/R mod m\n Montgomery.prototype.revert = function (x) {\n var r = nbi();\n x.copyTo(r);\n this.reduce(r);\n return r;\n };\n // Montgomery.prototype.reduce = montReduce;\n // x = x/R mod m (HAC 14.32)\n Montgomery.prototype.reduce = function (x) {\n while (x.t <= this.mt2) {\n // pad x so am has enough room later\n x[x.t++] = 0;\n }\n for (var i = 0; i < this.m.t; ++i) {\n // faster way of calculating u0 = x[i]*mp mod DV\n var j = x[i] & 0x7fff;\n var u0 = (j * this.mpl + (((j * this.mph + (x[i] >> 15) * this.mpl) & this.um) << 15)) & x.DM;\n // use am to combine the multiply-shift-add into one call\n j = i + this.m.t;\n x[j] += this.m.am(0, u0, x, i, 0, this.m.t);\n // propagate carry\n while (x[j] >= x.DV) {\n x[j] -= x.DV;\n x[++j]++;\n }\n }\n x.clamp();\n x.drShiftTo(this.m.t, x);\n if (x.compareTo(this.m) >= 0) {\n x.subTo(this.m, x);\n }\n };\n // Montgomery.prototype.mulTo = montMulTo;\n // r = "xy/R mod m"; x,y != r\n Montgomery.prototype.mulTo = function (x, y, r) {\n x.multiplyTo(y, r);\n this.reduce(r);\n };\n // Montgomery.prototype.sqrTo = montSqrTo;\n // r = "x^2/R mod m"; x != r\n Montgomery.prototype.sqrTo = function (x, r) {\n x.squareTo(r);\n this.reduce(r);\n };\n return Montgomery;\n}());\n//#endregion Montgomery\n//#region Barrett\n// Barrett modular reduction\nvar Barrett = /** @class */ (function () {\n function Barrett(m) {\n this.m = m;\n // setup Barrett\n this.r2 = nbi();\n this.q3 = nbi();\n BigInteger.ONE.dlShiftTo(2 * m.t, this.r2);\n this.mu = this.r2.divide(m);\n }\n // Barrett.prototype.convert = barrettConvert;\n Barrett.prototype.convert = function (x) {\n if (x.s < 0 || x.t > 2 * this.m.t) {\n return x.mod(this.m);\n }\n else if (x.compareTo(this.m) < 0) {\n return x;\n }\n else {\n var r = nbi();\n x.copyTo(r);\n this.reduce(r);\n return r;\n }\n };\n // Barrett.prototype.revert = barrettRevert;\n Barrett.prototype.revert = function (x) {\n return x;\n };\n // Barrett.prototype.reduce = barrettReduce;\n // x = x mod m (HAC 14.42)\n Barrett.prototype.reduce = function (x) {\n x.drShiftTo(this.m.t - 1, this.r2);\n if (x.t > this.m.t + 1) {\n x.t = this.m.t + 1;\n x.clamp();\n }\n this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3);\n this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2);\n while (x.compareTo(this.r2) < 0) {\n x.dAddOffset(1, this.m.t + 1);\n }\n x.subTo(this.r2, x);\n while (x.compareTo(this.m) >= 0) {\n x.subTo(this.m, x);\n }\n };\n // Barrett.prototype.mulTo = barrettMulTo;\n // r = x*y mod m; x,y != r\n Barrett.prototype.mulTo = function (x, y, r) {\n x.multiplyTo(y, r);\n this.reduce(r);\n };\n // Barrett.prototype.sqrTo = barrettSqrTo;\n // r = x^2 mod m; x != r\n Barrett.prototype.sqrTo = function (x, r) {\n x.squareTo(r);\n this.reduce(r);\n };\n return Barrett;\n}());\n//#endregion\n//#endregion REDUCERS\n// return new, unset BigInteger\nfunction nbi() { return new BigInteger(null); }\nfunction parseBigInt(str, r) {\n return new BigInteger(str, r);\n}\n// am: Compute w_j += (x*this_i), propagate carries,\n// c is initial carry, returns final carry.\n// c < 3*dvalue, x < 2*dvalue, this_i < dvalue\n// We need to select the fastest one that works in this environment.\nvar inBrowser = typeof navigator !== "undefined";\nif (inBrowser && j_lm && (navigator.appName == "Microsoft Internet Explorer")) {\n // am2 avoids a big mult-and-extract completely.\n // Max digit bits should be <= 30 because we do bitwise ops\n // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)\n BigInteger.prototype.am = function am2(i, x, w, j, c, n) {\n var xl = x & 0x7fff;\n var xh = x >> 15;\n while (--n >= 0) {\n var l = this[i] & 0x7fff;\n var h = this[i++] >> 15;\n var m = xh * l + h * xl;\n l = xl * l + ((m & 0x7fff) << 15) + w[j] + (c & 0x3fffffff);\n c = (l >>> 30) + (m >>> 15) + xh * h + (c >>> 30);\n w[j++] = l & 0x3fffffff;\n }\n return c;\n };\n dbits = 30;\n}\nelse if (inBrowser && j_lm && (navigator.appName != "Netscape")) {\n // am1: use a single mult and divide to get the high bits,\n // max digit bits should be 26 because\n // max internal value = 2*dvalue^2-2*dvalue (< 2^53)\n BigInteger.prototype.am = function am1(i, x, w, j, c, n) {\n while (--n >= 0) {\n var v = x * this[i++] + w[j] + c;\n c = Math.floor(v / 0x4000000);\n w[j++] = v & 0x3ffffff;\n }\n return c;\n };\n dbits = 26;\n}\nelse { // Mozilla/Netscape seems to prefer am3\n // Alternately, set max digit bits to 28 since some\n // browsers slow down when dealing with 32-bit numbers.\n BigInteger.prototype.am = function am3(i, x, w, j, c, n) {\n var xl = x & 0x3fff;\n var xh = x >> 14;\n while (--n >= 0) {\n var l = this[i] & 0x3fff;\n var h = this[i++] >> 14;\n var m = xh * l + h * xl;\n l = xl * l + ((m & 0x3fff) << 14) + w[j] + c;\n c = (l >> 28) + (m >> 14) + xh * h;\n w[j++] = l & 0xfffffff;\n }\n return c;\n };\n dbits = 28;\n}\nBigInteger.prototype.DB = dbits;\nBigInteger.prototype.DM = ((1 << dbits) - 1);\nBigInteger.prototype.DV = (1 << dbits);\nvar BI_FP = 52;\nBigInteger.prototype.FV = Math.pow(2, BI_FP);\nBigInteger.prototype.F1 = BI_FP - dbits;\nBigInteger.prototype.F2 = 2 * dbits - BI_FP;\n// Digit conversions\nvar BI_RC = [];\nvar rr;\nvar vv;\nrr = "0".charCodeAt(0);\nfor (vv = 0; vv <= 9; ++vv) {\n BI_RC[rr++] = vv;\n}\nrr = "a".charCodeAt(0);\nfor (vv = 10; vv < 36; ++vv) {\n BI_RC[rr++] = vv;\n}\nrr = "A".charCodeAt(0);\nfor (vv = 10; vv < 36; ++vv) {\n BI_RC[rr++] = vv;\n}\nfunction intAt(s, i) {\n var c = BI_RC[s.charCodeAt(i)];\n return (c == null) ? -1 : c;\n}\n// return bigint initialized to value\nfunction nbv(i) {\n var r = nbi();\n r.fromInt(i);\n return r;\n}\n// returns bit length of the integer x\nfunction nbits(x) {\n var r = 1;\n var t;\n if ((t = x >>> 16) != 0) {\n x = t;\n r += 16;\n }\n if ((t = x >> 8) != 0) {\n x = t;\n r += 8;\n }\n if ((t = x >> 4) != 0) {\n x = t;\n r += 4;\n }\n if ((t = x >> 2) != 0) {\n x = t;\n r += 2;\n }\n if ((t = x >> 1) != 0) {\n x = t;\n r += 1;\n }\n return r;\n}\n// "constants"\nBigInteger.ZERO = nbv(0);\nBigInteger.ONE = nbv(1);\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/lib/jsbn/jsbn.js?')},"./lib/lib/jsbn/prng4.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "Arcfour": () => (/* binding */ Arcfour),\n/* harmony export */ "prng_newstate": () => (/* binding */ prng_newstate),\n/* harmony export */ "rng_psize": () => (/* binding */ rng_psize)\n/* harmony export */ });\n// prng4.js - uses Arcfour as a PRNG\nvar Arcfour = /** @class */ (function () {\n function Arcfour() {\n this.i = 0;\n this.j = 0;\n this.S = [];\n }\n // Arcfour.prototype.init = ARC4init;\n // Initialize arcfour context from key, an array of ints, each from [0..255]\n Arcfour.prototype.init = function (key) {\n var i;\n var j;\n var t;\n for (i = 0; i < 256; ++i) {\n this.S[i] = i;\n }\n j = 0;\n for (i = 0; i < 256; ++i) {\n j = (j + this.S[i] + key[i % key.length]) & 255;\n t = this.S[i];\n this.S[i] = this.S[j];\n this.S[j] = t;\n }\n this.i = 0;\n this.j = 0;\n };\n // Arcfour.prototype.next = ARC4next;\n Arcfour.prototype.next = function () {\n var t;\n this.i = (this.i + 1) & 255;\n this.j = (this.j + this.S[this.i]) & 255;\n t = this.S[this.i];\n this.S[this.i] = this.S[this.j];\n this.S[this.j] = t;\n return this.S[(t + this.S[this.i]) & 255];\n };\n return Arcfour;\n}());\n\n// Plug in your RNG constructor here\nfunction prng_newstate() {\n return new Arcfour();\n}\n// Pool size must be a multiple of 4 and greater than 32.\n// An array of bytes the size of the pool will be passed to init()\nvar rng_psize = 256;\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/lib/jsbn/prng4.js?')},"./lib/lib/jsbn/rng.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "SecureRandom": () => (/* binding */ SecureRandom)\n/* harmony export */ });\n/* harmony import */ var _prng4__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./prng4 */ "./lib/lib/jsbn/prng4.js");\n// Random number generator - requires a PRNG backend, e.g. prng4.js\n\nvar rng_state;\nvar rng_pool = null;\nvar rng_pptr;\n// Initialize the pool with junk if needed.\nif (rng_pool == null) {\n rng_pool = [];\n rng_pptr = 0;\n var t = void 0;\n if (window.crypto && window.crypto.getRandomValues) {\n // Extract entropy (2048 bits) from RNG if available\n var z = new Uint32Array(256);\n window.crypto.getRandomValues(z);\n for (t = 0; t < z.length; ++t) {\n rng_pool[rng_pptr++] = z[t] & 255;\n }\n }\n // Use mouse events for entropy, if we do not have enough entropy by the time\n // we need it, entropy will be generated by Math.random.\n var count = 0;\n var onMouseMoveListener_1 = function (ev) {\n count = count || 0;\n if (count >= 256 || rng_pptr >= _prng4__WEBPACK_IMPORTED_MODULE_0__.rng_psize) {\n if (window.removeEventListener) {\n window.removeEventListener("mousemove", onMouseMoveListener_1, false);\n }\n else if (window.detachEvent) {\n window.detachEvent("onmousemove", onMouseMoveListener_1);\n }\n return;\n }\n try {\n var mouseCoordinates = ev.x + ev.y;\n rng_pool[rng_pptr++] = mouseCoordinates & 255;\n count += 1;\n }\n catch (e) {\n // Sometimes Firefox will deny permission to access event properties for some reason. Ignore.\n }\n };\n if (window.addEventListener) {\n window.addEventListener("mousemove", onMouseMoveListener_1, false);\n }\n else if (window.attachEvent) {\n window.attachEvent("onmousemove", onMouseMoveListener_1);\n }\n}\nfunction rng_get_byte() {\n if (rng_state == null) {\n rng_state = (0,_prng4__WEBPACK_IMPORTED_MODULE_0__.prng_newstate)();\n // At this point, we may not have collected enough entropy. If not, fall back to Math.random\n while (rng_pptr < _prng4__WEBPACK_IMPORTED_MODULE_0__.rng_psize) {\n var random = Math.floor(65536 * Math.random());\n rng_pool[rng_pptr++] = random & 255;\n }\n rng_state.init(rng_pool);\n for (rng_pptr = 0; rng_pptr < rng_pool.length; ++rng_pptr) {\n rng_pool[rng_pptr] = 0;\n }\n rng_pptr = 0;\n }\n // TODO: allow reseeding after first request\n return rng_state.next();\n}\nvar SecureRandom = /** @class */ (function () {\n function SecureRandom() {\n }\n SecureRandom.prototype.nextBytes = function (ba) {\n for (var i = 0; i < ba.length; ++i) {\n ba[i] = rng_get_byte();\n }\n };\n return SecureRandom;\n}());\n\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/lib/jsbn/rng.js?')},"./lib/lib/jsbn/rsa.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "RSAKey": () => (/* binding */ RSAKey)\n/* harmony export */ });\n/* harmony import */ var _jsbn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./jsbn */ "./lib/lib/jsbn/jsbn.js");\n/* harmony import */ var _rng__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rng */ "./lib/lib/jsbn/rng.js");\n// Depends on jsbn.js and rng.js\n// Version 1.1: support utf-8 encoding in pkcs1pad2\n// convert a (hex) string to a bignum object\n\n\n// function linebrk(s,n) {\n// var ret = "";\n// var i = 0;\n// while(i + n < s.length) {\n// ret += s.substring(i,i+n) + "\\n";\n// i += n;\n// }\n// return ret + s.substring(i,s.length);\n// }\n// function byte2Hex(b) {\n// if(b < 0x10)\n// return "0" + b.toString(16);\n// else\n// return b.toString(16);\n// }\nfunction pkcs1pad1(s, n) {\n if (n < s.length + 22) {\n console.error("Message too long for RSA");\n return null;\n }\n var len = n - s.length - 6;\n var filler = "";\n for (var f = 0; f < len; f += 2) {\n filler += "ff";\n }\n var m = "0001" + filler + "00" + s;\n return (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(m, 16);\n}\n// PKCS#1 (type 2, random) pad input string s to n bytes, and return a bigint\nfunction pkcs1pad2(s, n) {\n if (n < s.length + 11) { // TODO: fix for utf-8\n console.error("Message too long for RSA");\n return null;\n }\n var ba = [];\n var i = s.length - 1;\n while (i >= 0 && n > 0) {\n var c = s.charCodeAt(i--);\n if (c < 128) { // encode using utf-8\n ba[--n] = c;\n }\n else if ((c > 127) && (c < 2048)) {\n ba[--n] = (c & 63) | 128;\n ba[--n] = (c >> 6) | 192;\n }\n else {\n ba[--n] = (c & 63) | 128;\n ba[--n] = ((c >> 6) & 63) | 128;\n ba[--n] = (c >> 12) | 224;\n }\n }\n ba[--n] = 0;\n var rng = new _rng__WEBPACK_IMPORTED_MODULE_1__.SecureRandom();\n var x = [];\n while (n > 2) { // random non-zero pad\n x[0] = 0;\n while (x[0] == 0) {\n rng.nextBytes(x);\n }\n ba[--n] = x[0];\n }\n ba[--n] = 2;\n ba[--n] = 0;\n return new _jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(ba);\n}\n// "empty" RSA key constructor\nvar RSAKey = /** @class */ (function () {\n function RSAKey() {\n this.n = null;\n this.e = 0;\n this.d = null;\n this.p = null;\n this.q = null;\n this.dmp1 = null;\n this.dmq1 = null;\n this.coeff = null;\n }\n //#region PROTECTED\n // protected\n // RSAKey.prototype.doPublic = RSADoPublic;\n // Perform raw public operation on "x": return x^e (mod n)\n RSAKey.prototype.doPublic = function (x) {\n return x.modPowInt(this.e, this.n);\n };\n // RSAKey.prototype.doPrivate = RSADoPrivate;\n // Perform raw private operation on "x": return x^d (mod n)\n RSAKey.prototype.doPrivate = function (x) {\n if (this.p == null || this.q == null) {\n return x.modPow(this.d, this.n);\n }\n // TODO: re-calculate any missing CRT params\n var xp = x.mod(this.p).modPow(this.dmp1, this.p);\n var xq = x.mod(this.q).modPow(this.dmq1, this.q);\n while (xp.compareTo(xq) < 0) {\n xp = xp.add(this.p);\n }\n return xp.subtract(xq).multiply(this.coeff).mod(this.p).multiply(this.q).add(xq);\n };\n //#endregion PROTECTED\n //#region PUBLIC\n // RSAKey.prototype.setPublic = RSASetPublic;\n // Set the public key fields N and e from hex strings\n RSAKey.prototype.setPublic = function (N, E) {\n if (N != null && E != null && N.length > 0 && E.length > 0) {\n this.n = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(N, 16);\n this.e = parseInt(E, 16);\n }\n else {\n console.error("Invalid RSA public key");\n }\n };\n // RSAKey.prototype.encrypt = RSAEncrypt;\n // Return the PKCS#1 RSA encryption of "text" as an even-length hex string\n RSAKey.prototype.encrypt = function (text) {\n var maxLength = (this.n.bitLength() + 7) >> 3;\n var m = pkcs1pad2(text, maxLength);\n if (m == null) {\n return null;\n }\n var c = this.doPublic(m);\n if (c == null) {\n return null;\n }\n var h = c.toString(16);\n var length = h.length;\n // fix zero before result\n for (var i = 0; i < maxLength * 2 - length; i++) {\n h = "0" + h;\n }\n return h;\n };\n // RSAKey.prototype.setPrivate = RSASetPrivate;\n // Set the private key fields N, e, and d from hex strings\n RSAKey.prototype.setPrivate = function (N, E, D) {\n if (N != null && E != null && N.length > 0 && E.length > 0) {\n this.n = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(N, 16);\n this.e = parseInt(E, 16);\n this.d = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(D, 16);\n }\n else {\n console.error("Invalid RSA private key");\n }\n };\n // RSAKey.prototype.setPrivateEx = RSASetPrivateEx;\n // Set the private key fields N, e, d and CRT params from hex strings\n RSAKey.prototype.setPrivateEx = function (N, E, D, P, Q, DP, DQ, C) {\n if (N != null && E != null && N.length > 0 && E.length > 0) {\n this.n = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(N, 16);\n this.e = parseInt(E, 16);\n this.d = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(D, 16);\n this.p = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(P, 16);\n this.q = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(Q, 16);\n this.dmp1 = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(DP, 16);\n this.dmq1 = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(DQ, 16);\n this.coeff = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(C, 16);\n }\n else {\n console.error("Invalid RSA private key");\n }\n };\n // RSAKey.prototype.generate = RSAGenerate;\n // Generate a new random private key B bits long, using public expt E\n RSAKey.prototype.generate = function (B, E) {\n var rng = new _rng__WEBPACK_IMPORTED_MODULE_1__.SecureRandom();\n var qs = B >> 1;\n this.e = parseInt(E, 16);\n var ee = new _jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(E, 16);\n for (;;) {\n for (;;) {\n this.p = new _jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(B - qs, 1, rng);\n if (this.p.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE).gcd(ee).compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE) == 0 && this.p.isProbablePrime(10)) {\n break;\n }\n }\n for (;;) {\n this.q = new _jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(qs, 1, rng);\n if (this.q.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE).gcd(ee).compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE) == 0 && this.q.isProbablePrime(10)) {\n break;\n }\n }\n if (this.p.compareTo(this.q) <= 0) {\n var t = this.p;\n this.p = this.q;\n this.q = t;\n }\n var p1 = this.p.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE);\n var q1 = this.q.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE);\n var phi = p1.multiply(q1);\n if (phi.gcd(ee).compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE) == 0) {\n this.n = this.p.multiply(this.q);\n this.d = ee.modInverse(phi);\n this.dmp1 = this.d.mod(p1);\n this.dmq1 = this.d.mod(q1);\n this.coeff = this.q.modInverse(this.p);\n break;\n }\n }\n };\n // RSAKey.prototype.decrypt = RSADecrypt;\n // Return the PKCS#1 RSA decryption of "ctext".\n // "ctext" is an even-length hex string and the output is a plain string.\n RSAKey.prototype.decrypt = function (ctext) {\n var c = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(ctext, 16);\n var m = this.doPrivate(c);\n if (m == null) {\n return null;\n }\n return pkcs1unpad2(m, (this.n.bitLength() + 7) >> 3);\n };\n // Generate a new random private key B bits long, using public expt E\n RSAKey.prototype.generateAsync = function (B, E, callback) {\n var rng = new _rng__WEBPACK_IMPORTED_MODULE_1__.SecureRandom();\n var qs = B >> 1;\n this.e = parseInt(E, 16);\n var ee = new _jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(E, 16);\n var rsa = this;\n // These functions have non-descript names because they were originally for(;;) loops.\n // I don\'t know about cryptography to give them better names than loop1-4.\n var loop1 = function () {\n var loop4 = function () {\n if (rsa.p.compareTo(rsa.q) <= 0) {\n var t = rsa.p;\n rsa.p = rsa.q;\n rsa.q = t;\n }\n var p1 = rsa.p.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE);\n var q1 = rsa.q.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE);\n var phi = p1.multiply(q1);\n if (phi.gcd(ee).compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE) == 0) {\n rsa.n = rsa.p.multiply(rsa.q);\n rsa.d = ee.modInverse(phi);\n rsa.dmp1 = rsa.d.mod(p1);\n rsa.dmq1 = rsa.d.mod(q1);\n rsa.coeff = rsa.q.modInverse(rsa.p);\n setTimeout(function () { callback(); }, 0); // escape\n }\n else {\n setTimeout(loop1, 0);\n }\n };\n var loop3 = function () {\n rsa.q = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.nbi)();\n rsa.q.fromNumberAsync(qs, 1, rng, function () {\n rsa.q.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE).gcda(ee, function (r) {\n if (r.compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE) == 0 && rsa.q.isProbablePrime(10)) {\n setTimeout(loop4, 0);\n }\n else {\n setTimeout(loop3, 0);\n }\n });\n });\n };\n var loop2 = function () {\n rsa.p = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.nbi)();\n rsa.p.fromNumberAsync(B - qs, 1, rng, function () {\n rsa.p.subtract(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE).gcda(ee, function (r) {\n if (r.compareTo(_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE) == 0 && rsa.p.isProbablePrime(10)) {\n setTimeout(loop3, 0);\n }\n else {\n setTimeout(loop2, 0);\n }\n });\n });\n };\n setTimeout(loop2, 0);\n };\n setTimeout(loop1, 0);\n };\n RSAKey.prototype.sign = function (text, digestMethod, digestName) {\n var header = getDigestHeader(digestName);\n var digest = header + digestMethod(text).toString();\n var m = pkcs1pad1(digest, this.n.bitLength() / 4);\n if (m == null) {\n return null;\n }\n var c = this.doPrivate(m);\n if (c == null) {\n return null;\n }\n var h = c.toString(16);\n if ((h.length & 1) == 0) {\n return h;\n }\n else {\n return "0" + h;\n }\n };\n RSAKey.prototype.verify = function (text, signature, digestMethod) {\n var c = (0,_jsbn__WEBPACK_IMPORTED_MODULE_0__.parseBigInt)(signature, 16);\n var m = this.doPublic(c);\n if (m == null) {\n return null;\n }\n var unpadded = m.toString(16).replace(/^1f+00/, "");\n var digest = removeDigestHeader(unpadded);\n return digest == digestMethod(text).toString();\n };\n return RSAKey;\n}());\n\n// Undo PKCS#1 (type 2, random) padding and, if valid, return the plaintext\nfunction pkcs1unpad2(d, n) {\n var b = d.toByteArray();\n var i = 0;\n while (i < b.length && b[i] == 0) {\n ++i;\n }\n if (b.length - i != n - 1 || b[i] != 2) {\n return null;\n }\n ++i;\n while (b[i] != 0) {\n if (++i >= b.length) {\n return null;\n }\n }\n var ret = "";\n while (++i < b.length) {\n var c = b[i] & 255;\n if (c < 128) { // utf-8 decode\n ret += String.fromCharCode(c);\n }\n else if ((c > 191) && (c < 224)) {\n ret += String.fromCharCode(((c & 31) << 6) | (b[i + 1] & 63));\n ++i;\n }\n else {\n ret += String.fromCharCode(((c & 15) << 12) | ((b[i + 1] & 63) << 6) | (b[i + 2] & 63));\n i += 2;\n }\n }\n return ret;\n}\n// https://tools.ietf.org/html/rfc3447#page-43\nvar DIGEST_HEADERS = {\n md2: "3020300c06082a864886f70d020205000410",\n md5: "3020300c06082a864886f70d020505000410",\n sha1: "3021300906052b0e03021a05000414",\n sha224: "302d300d06096086480165030402040500041c",\n sha256: "3031300d060960864801650304020105000420",\n sha384: "3041300d060960864801650304020205000430",\n sha512: "3051300d060960864801650304020305000440",\n ripemd160: "3021300906052b2403020105000414"\n};\nfunction getDigestHeader(name) {\n return DIGEST_HEADERS[name] || "";\n}\nfunction removeDigestHeader(str) {\n for (var name_1 in DIGEST_HEADERS) {\n if (DIGEST_HEADERS.hasOwnProperty(name_1)) {\n var header = DIGEST_HEADERS[name_1];\n var len = header.length;\n if (str.substr(0, len) == header) {\n return str.substr(len);\n }\n }\n }\n return str;\n}\n// Return the PKCS#1 RSA encryption of "text" as a Base64-encoded string\n// function RSAEncryptB64(text) {\n// var h = this.encrypt(text);\n// if(h) return hex2b64(h); else return null;\n// }\n// public\n// RSAKey.prototype.encrypt_b64 = RSAEncryptB64;\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/lib/jsbn/rsa.js?')},"./lib/lib/jsbn/util.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "int2char": () => (/* binding */ int2char),\n/* harmony export */ "op_and": () => (/* binding */ op_and),\n/* harmony export */ "op_or": () => (/* binding */ op_or),\n/* harmony export */ "op_xor": () => (/* binding */ op_xor),\n/* harmony export */ "op_andnot": () => (/* binding */ op_andnot),\n/* harmony export */ "lbit": () => (/* binding */ lbit),\n/* harmony export */ "cbit": () => (/* binding */ cbit)\n/* harmony export */ });\nvar BI_RM = "0123456789abcdefghijklmnopqrstuvwxyz";\nfunction int2char(n) {\n return BI_RM.charAt(n);\n}\n//#region BIT_OPERATIONS\n// (public) this & a\nfunction op_and(x, y) {\n return x & y;\n}\n// (public) this | a\nfunction op_or(x, y) {\n return x | y;\n}\n// (public) this ^ a\nfunction op_xor(x, y) {\n return x ^ y;\n}\n// (public) this & ~a\nfunction op_andnot(x, y) {\n return x & ~y;\n}\n// return index of lowest 1-bit in x, x < 2^31\nfunction lbit(x) {\n if (x == 0) {\n return -1;\n }\n var r = 0;\n if ((x & 0xffff) == 0) {\n x >>= 16;\n r += 16;\n }\n if ((x & 0xff) == 0) {\n x >>= 8;\n r += 8;\n }\n if ((x & 0xf) == 0) {\n x >>= 4;\n r += 4;\n }\n if ((x & 3) == 0) {\n x >>= 2;\n r += 2;\n }\n if ((x & 1) == 0) {\n ++r;\n }\n return r;\n}\n// return number of 1 bits in x\nfunction cbit(x) {\n var r = 0;\n while (x != 0) {\n x &= x - 1;\n ++r;\n }\n return r;\n}\n//#endregion BIT_OPERATIONS\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/lib/jsbn/util.js?')},"./lib/lib/jsrsasign/asn1-1.0.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"KJUR\": () => (/* binding */ KJUR)\n/* harmony export */ });\n/* harmony import */ var _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../jsbn/jsbn */ \"./lib/lib/jsbn/jsbn.js\");\n/* harmony import */ var _yahoo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./yahoo */ \"./lib/lib/jsrsasign/yahoo.js\");\n/* asn1-1.0.13.js (c) 2013-2017 Kenji Urushima | kjur.github.com/jsrsasign/license\n */\n/*\n * asn1.js - ASN.1 DER encoder classes\n *\n * Copyright (c) 2013-2017 Kenji Urushima (kenji.urushima@gmail.com)\n *\n * This software is licensed under the terms of the MIT License.\n * https://kjur.github.io/jsrsasign/license\n *\n * The above copyright and license notice shall be\n * included in all copies or substantial portions of the Software.\n */\n\n\n/**\n * @fileOverview\n * @name asn1-1.0.js\n * @author Kenji Urushima kenji.urushima@gmail.com\n * @version asn1 1.0.13 (2017-Jun-02)\n * @since jsrsasign 2.1\n * @license <a href=\"https://kjur.github.io/jsrsasign/license/\">MIT License</a>\n */\n/**\n * kjur's class library name space\n * <p>\n * This name space provides following name spaces:\n * <ul>\n * <li>{@link KJUR.asn1} - ASN.1 primitive hexadecimal encoder</li>\n * <li>{@link KJUR.asn1.x509} - ASN.1 structure for X.509 certificate and CRL</li>\n * <li>{@link KJUR.crypto} - Java Cryptographic Extension(JCE) style MessageDigest/Signature\n * class and utilities</li>\n * </ul>\n * </p>\n * NOTE: Please ignore method summary and document of this namespace. This caused by a bug of jsdoc2.\n * @name KJUR\n * @namespace kjur's class library name space\n */\nvar KJUR = {};\n/**\n * kjur's ASN.1 class library name space\n * <p>\n * This is ITU-T X.690 ASN.1 DER encoder class library and\n * class structure and methods is very similar to\n * org.bouncycastle.asn1 package of\n * well known BouncyCaslte Cryptography Library.\n * <h4>PROVIDING ASN.1 PRIMITIVES</h4>\n * Here are ASN.1 DER primitive classes.\n * <ul>\n * <li>0x01 {@link KJUR.asn1.DERBoolean}</li>\n * <li>0x02 {@link KJUR.asn1.DERInteger}</li>\n * <li>0x03 {@link KJUR.asn1.DERBitString}</li>\n * <li>0x04 {@link KJUR.asn1.DEROctetString}</li>\n * <li>0x05 {@link KJUR.asn1.DERNull}</li>\n * <li>0x06 {@link KJUR.asn1.DERObjectIdentifier}</li>\n * <li>0x0a {@link KJUR.asn1.DEREnumerated}</li>\n * <li>0x0c {@link KJUR.asn1.DERUTF8String}</li>\n * <li>0x12 {@link KJUR.asn1.DERNumericString}</li>\n * <li>0x13 {@link KJUR.asn1.DERPrintableString}</li>\n * <li>0x14 {@link KJUR.asn1.DERTeletexString}</li>\n * <li>0x16 {@link KJUR.asn1.DERIA5String}</li>\n * <li>0x17 {@link KJUR.asn1.DERUTCTime}</li>\n * <li>0x18 {@link KJUR.asn1.DERGeneralizedTime}</li>\n * <li>0x30 {@link KJUR.asn1.DERSequence}</li>\n * <li>0x31 {@link KJUR.asn1.DERSet}</li>\n * </ul>\n * <h4>OTHER ASN.1 CLASSES</h4>\n * <ul>\n * <li>{@link KJUR.asn1.ASN1Object}</li>\n * <li>{@link KJUR.asn1.DERAbstractString}</li>\n * <li>{@link KJUR.asn1.DERAbstractTime}</li>\n * <li>{@link KJUR.asn1.DERAbstractStructured}</li>\n * <li>{@link KJUR.asn1.DERTaggedObject}</li>\n * </ul>\n * <h4>SUB NAME SPACES</h4>\n * <ul>\n * <li>{@link KJUR.asn1.cades} - CAdES long term signature format</li>\n * <li>{@link KJUR.asn1.cms} - Cryptographic Message Syntax</li>\n * <li>{@link KJUR.asn1.csr} - Certificate Signing Request (CSR/PKCS#10)</li>\n * <li>{@link KJUR.asn1.tsp} - RFC 3161 Timestamping Protocol Format</li>\n * <li>{@link KJUR.asn1.x509} - RFC 5280 X.509 certificate and CRL</li>\n * </ul>\n * </p>\n * NOTE: Please ignore method summary and document of this namespace.\n * This caused by a bug of jsdoc2.\n * @name KJUR.asn1\n * @namespace\n */\nif (typeof KJUR.asn1 == \"undefined\" || !KJUR.asn1)\n KJUR.asn1 = {};\n/**\n * ASN1 utilities class\n * @name KJUR.asn1.ASN1Util\n * @class ASN1 utilities class\n * @since asn1 1.0.2\n */\nKJUR.asn1.ASN1Util = new function () {\n this.integerToByteHex = function (i) {\n var h = i.toString(16);\n if ((h.length % 2) == 1)\n h = '0' + h;\n return h;\n };\n this.bigIntToMinTwosComplementsHex = function (bigIntegerValue) {\n var h = bigIntegerValue.toString(16);\n if (h.substr(0, 1) != '-') {\n if (h.length % 2 == 1) {\n h = '0' + h;\n }\n else {\n if (!h.match(/^[0-7]/)) {\n h = '00' + h;\n }\n }\n }\n else {\n var hPos = h.substr(1);\n var xorLen = hPos.length;\n if (xorLen % 2 == 1) {\n xorLen += 1;\n }\n else {\n if (!h.match(/^[0-7]/)) {\n xorLen += 2;\n }\n }\n var hMask = '';\n for (var i = 0; i < xorLen; i++) {\n hMask += 'f';\n }\n var biMask = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(hMask, 16);\n var biNeg = biMask.xor(bigIntegerValue).add(_jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger.ONE);\n h = biNeg.toString(16).replace(/^-/, '');\n }\n return h;\n };\n /**\n * get PEM string from hexadecimal data and header string\n * @name getPEMStringFromHex\n * @memberOf KJUR.asn1.ASN1Util\n * @function\n * @param {String} dataHex hexadecimal string of PEM body\n * @param {String} pemHeader PEM header string (ex. 'RSA PRIVATE KEY')\n * @return {String} PEM formatted string of input data\n * @description\n * This method converts a hexadecimal string to a PEM string with\n * a specified header. Its line break will be CRLF(\"\\r\\n\").\n * @example\n * var pem = KJUR.asn1.ASN1Util.getPEMStringFromHex('616161', 'RSA PRIVATE KEY');\n * // value of pem will be:\n * -----BEGIN PRIVATE KEY-----\n * YWFh\n * -----END PRIVATE KEY-----\n */\n this.getPEMStringFromHex = function (dataHex, pemHeader) {\n return hextopem(dataHex, pemHeader);\n };\n /**\n * generate ASN1Object specifed by JSON parameters\n * @name newObject\n * @memberOf KJUR.asn1.ASN1Util\n * @function\n * @param {Array} param JSON parameter to generate ASN1Object\n * @return {KJUR.asn1.ASN1Object} generated object\n * @since asn1 1.0.3\n * @description\n * generate any ASN1Object specified by JSON param\n * including ASN.1 primitive or structured.\n * Generally 'param' can be described as follows:\n * <blockquote>\n * {TYPE-OF-ASNOBJ: ASN1OBJ-PARAMETER}\n * </blockquote>\n * 'TYPE-OF-ASN1OBJ' can be one of following symbols:\n * <ul>\n * <li>'bool' - DERBoolean</li>\n * <li>'int' - DERInteger</li>\n * <li>'bitstr' - DERBitString</li>\n * <li>'octstr' - DEROctetString</li>\n * <li>'null' - DERNull</li>\n * <li>'oid' - DERObjectIdentifier</li>\n * <li>'enum' - DEREnumerated</li>\n * <li>'utf8str' - DERUTF8String</li>\n * <li>'numstr' - DERNumericString</li>\n * <li>'prnstr' - DERPrintableString</li>\n * <li>'telstr' - DERTeletexString</li>\n * <li>'ia5str' - DERIA5String</li>\n * <li>'utctime' - DERUTCTime</li>\n * <li>'gentime' - DERGeneralizedTime</li>\n * <li>'seq' - DERSequence</li>\n * <li>'set' - DERSet</li>\n * <li>'tag' - DERTaggedObject</li>\n * </ul>\n * @example\n * newObject({'prnstr': 'aaa'});\n * newObject({'seq': [{'int': 3}, {'prnstr': 'aaa'}]})\n * // ASN.1 Tagged Object\n * newObject({'tag': {'tag': 'a1',\n * 'explicit': true,\n * 'obj': {'seq': [{'int': 3}, {'prnstr': 'aaa'}]}}});\n * // more simple representation of ASN.1 Tagged Object\n * newObject({'tag': ['a1',\n * true,\n * {'seq': [\n * {'int': 3},\n * {'prnstr': 'aaa'}]}\n * ]});\n */\n this.newObject = function (param) {\n var _KJUR = KJUR, _KJUR_asn1 = _KJUR.asn1, _DERBoolean = _KJUR_asn1.DERBoolean, _DERInteger = _KJUR_asn1.DERInteger, _DERBitString = _KJUR_asn1.DERBitString, _DEROctetString = _KJUR_asn1.DEROctetString, _DERNull = _KJUR_asn1.DERNull, _DERObjectIdentifier = _KJUR_asn1.DERObjectIdentifier, _DEREnumerated = _KJUR_asn1.DEREnumerated, _DERUTF8String = _KJUR_asn1.DERUTF8String, _DERNumericString = _KJUR_asn1.DERNumericString, _DERPrintableString = _KJUR_asn1.DERPrintableString, _DERTeletexString = _KJUR_asn1.DERTeletexString, _DERIA5String = _KJUR_asn1.DERIA5String, _DERUTCTime = _KJUR_asn1.DERUTCTime, _DERGeneralizedTime = _KJUR_asn1.DERGeneralizedTime, _DERSequence = _KJUR_asn1.DERSequence, _DERSet = _KJUR_asn1.DERSet, _DERTaggedObject = _KJUR_asn1.DERTaggedObject, _newObject = _KJUR_asn1.ASN1Util.newObject;\n var keys = Object.keys(param);\n if (keys.length != 1)\n throw \"key of param shall be only one.\";\n var key = keys[0];\n if (\":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:\".indexOf(\":\" + key + \":\") == -1)\n throw \"undefined key: \" + key;\n if (key == \"bool\")\n return new _DERBoolean(param[key]);\n if (key == \"int\")\n return new _DERInteger(param[key]);\n if (key == \"bitstr\")\n return new _DERBitString(param[key]);\n if (key == \"octstr\")\n return new _DEROctetString(param[key]);\n if (key == \"null\")\n return new _DERNull(param[key]);\n if (key == \"oid\")\n return new _DERObjectIdentifier(param[key]);\n if (key == \"enum\")\n return new _DEREnumerated(param[key]);\n if (key == \"utf8str\")\n return new _DERUTF8String(param[key]);\n if (key == \"numstr\")\n return new _DERNumericString(param[key]);\n if (key == \"prnstr\")\n return new _DERPrintableString(param[key]);\n if (key == \"telstr\")\n return new _DERTeletexString(param[key]);\n if (key == \"ia5str\")\n return new _DERIA5String(param[key]);\n if (key == \"utctime\")\n return new _DERUTCTime(param[key]);\n if (key == \"gentime\")\n return new _DERGeneralizedTime(param[key]);\n if (key == \"seq\") {\n var paramList = param[key];\n var a = [];\n for (var i = 0; i < paramList.length; i++) {\n var asn1Obj = _newObject(paramList[i]);\n a.push(asn1Obj);\n }\n return new _DERSequence({ 'array': a });\n }\n if (key == \"set\") {\n var paramList = param[key];\n var a = [];\n for (var i = 0; i < paramList.length; i++) {\n var asn1Obj = _newObject(paramList[i]);\n a.push(asn1Obj);\n }\n return new _DERSet({ 'array': a });\n }\n if (key == \"tag\") {\n var tagParam = param[key];\n if (Object.prototype.toString.call(tagParam) === '[object Array]' &&\n tagParam.length == 3) {\n var obj = _newObject(tagParam[2]);\n return new _DERTaggedObject({ tag: tagParam[0],\n explicit: tagParam[1],\n obj: obj });\n }\n else {\n var newParam = {};\n if (tagParam.explicit !== undefined)\n newParam.explicit = tagParam.explicit;\n if (tagParam.tag !== undefined)\n newParam.tag = tagParam.tag;\n if (tagParam.obj === undefined)\n throw \"obj shall be specified for 'tag'.\";\n newParam.obj = _newObject(tagParam.obj);\n return new _DERTaggedObject(newParam);\n }\n }\n };\n /**\n * get encoded hexadecimal string of ASN1Object specifed by JSON parameters\n * @name jsonToASN1HEX\n * @memberOf KJUR.asn1.ASN1Util\n * @function\n * @param {Array} param JSON parameter to generate ASN1Object\n * @return hexadecimal string of ASN1Object\n * @since asn1 1.0.4\n * @description\n * As for ASN.1 object representation of JSON object,\n * please see {@link newObject}.\n * @example\n * jsonToASN1HEX({'prnstr': 'aaa'});\n */\n this.jsonToASN1HEX = function (param) {\n var asn1Obj = this.newObject(param);\n return asn1Obj.getEncodedHex();\n };\n};\n/**\n * get dot noted oid number string from hexadecimal value of OID\n * @name oidHexToInt\n * @memberOf KJUR.asn1.ASN1Util\n * @function\n * @param {String} hex hexadecimal value of object identifier\n * @return {String} dot noted string of object identifier\n * @since jsrsasign 4.8.3 asn1 1.0.7\n * @description\n * This static method converts from hexadecimal string representation of\n * ASN.1 value of object identifier to oid number string.\n * @example\n * KJUR.asn1.ASN1Util.oidHexToInt('550406') → \"2.5.4.6\"\n */\nKJUR.asn1.ASN1Util.oidHexToInt = function (hex) {\n var s = \"\";\n var i01 = parseInt(hex.substr(0, 2), 16);\n var i0 = Math.floor(i01 / 40);\n var i1 = i01 % 40;\n var s = i0 + \".\" + i1;\n var binbuf = \"\";\n for (var i = 2; i < hex.length; i += 2) {\n var value = parseInt(hex.substr(i, 2), 16);\n var bin = (\"00000000\" + value.toString(2)).slice(-8);\n binbuf = binbuf + bin.substr(1, 7);\n if (bin.substr(0, 1) == \"0\") {\n var bi = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(binbuf, 2);\n s = s + \".\" + bi.toString(10);\n binbuf = \"\";\n }\n }\n ;\n return s;\n};\n/**\n * get hexadecimal value of object identifier from dot noted oid value\n * @name oidIntToHex\n * @memberOf KJUR.asn1.ASN1Util\n * @function\n * @param {String} oidString dot noted string of object identifier\n * @return {String} hexadecimal value of object identifier\n * @since jsrsasign 4.8.3 asn1 1.0.7\n * @description\n * This static method converts from object identifier value string.\n * to hexadecimal string representation of it.\n * @example\n * KJUR.asn1.ASN1Util.oidIntToHex(\"2.5.4.6\") → \"550406\"\n */\nKJUR.asn1.ASN1Util.oidIntToHex = function (oidString) {\n var itox = function (i) {\n var h = i.toString(16);\n if (h.length == 1)\n h = '0' + h;\n return h;\n };\n var roidtox = function (roid) {\n var h = '';\n var bi = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(roid, 10);\n var b = bi.toString(2);\n var padLen = 7 - b.length % 7;\n if (padLen == 7)\n padLen = 0;\n var bPad = '';\n for (var i = 0; i < padLen; i++)\n bPad += '0';\n b = bPad + b;\n for (var i = 0; i < b.length - 1; i += 7) {\n var b8 = b.substr(i, 7);\n if (i != b.length - 7)\n b8 = '1' + b8;\n h += itox(parseInt(b8, 2));\n }\n return h;\n };\n if (!oidString.match(/^[0-9.]+$/)) {\n throw \"malformed oid string: \" + oidString;\n }\n var h = '';\n var a = oidString.split('.');\n var i0 = parseInt(a[0]) * 40 + parseInt(a[1]);\n h += itox(i0);\n a.splice(0, 2);\n for (var i = 0; i < a.length; i++) {\n h += roidtox(a[i]);\n }\n return h;\n};\n// ********************************************************************\n// Abstract ASN.1 Classes\n// ********************************************************************\n// ********************************************************************\n/**\n * base class for ASN.1 DER encoder object\n * @name KJUR.asn1.ASN1Object\n * @class base class for ASN.1 DER encoder object\n * @property {Boolean} isModified flag whether internal data was changed\n * @property {String} hTLV hexadecimal string of ASN.1 TLV\n * @property {String} hT hexadecimal string of ASN.1 TLV tag(T)\n * @property {String} hL hexadecimal string of ASN.1 TLV length(L)\n * @property {String} hV hexadecimal string of ASN.1 TLV value(V)\n * @description\n */\nKJUR.asn1.ASN1Object = function () {\n var isModified = true;\n var hTLV = null;\n var hT = '00';\n var hL = '00';\n var hV = '';\n /**\n * get hexadecimal ASN.1 TLV length(L) bytes from TLV value(V)\n * @name getLengthHexFromValue\n * @memberOf KJUR.asn1.ASN1Object#\n * @function\n * @return {String} hexadecimal string of ASN.1 TLV length(L)\n */\n this.getLengthHexFromValue = function () {\n if (typeof this.hV == \"undefined\" || this.hV == null) {\n throw \"this.hV is null or undefined.\";\n }\n if (this.hV.length % 2 == 1) {\n throw \"value hex must be even length: n=\" + hV.length + \",v=\" + this.hV;\n }\n var n = this.hV.length / 2;\n var hN = n.toString(16);\n if (hN.length % 2 == 1) {\n hN = \"0\" + hN;\n }\n if (n < 128) {\n return hN;\n }\n else {\n var hNlen = hN.length / 2;\n if (hNlen > 15) {\n throw \"ASN.1 length too long to represent by 8x: n = \" + n.toString(16);\n }\n var head = 128 + hNlen;\n return head.toString(16) + hN;\n }\n };\n /**\n * get hexadecimal string of ASN.1 TLV bytes\n * @name getEncodedHex\n * @memberOf KJUR.asn1.ASN1Object#\n * @function\n * @return {String} hexadecimal string of ASN.1 TLV\n */\n this.getEncodedHex = function () {\n if (this.hTLV == null || this.isModified) {\n this.hV = this.getFreshValueHex();\n this.hL = this.getLengthHexFromValue();\n this.hTLV = this.hT + this.hL + this.hV;\n this.isModified = false;\n //alert(\"first time: \" + this.hTLV);\n }\n return this.hTLV;\n };\n /**\n * get hexadecimal string of ASN.1 TLV value(V) bytes\n * @name getValueHex\n * @memberOf KJUR.asn1.ASN1Object#\n * @function\n * @return {String} hexadecimal string of ASN.1 TLV value(V) bytes\n */\n this.getValueHex = function () {\n this.getEncodedHex();\n return this.hV;\n };\n this.getFreshValueHex = function () {\n return '';\n };\n};\n// == BEGIN DERAbstractString ================================================\n/**\n * base class for ASN.1 DER string classes\n * @name KJUR.asn1.DERAbstractString\n * @class base class for ASN.1 DER string classes\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @property {String} s internal string of value\n * @extends KJUR.asn1.ASN1Object\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>str - specify initial ASN.1 value(V) by a string</li>\n * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>\n * </ul>\n * NOTE: 'params' can be omitted.\n */\nKJUR.asn1.DERAbstractString = function (params) {\n KJUR.asn1.DERAbstractString.superclass.constructor.call(this);\n var s = null;\n var hV = null;\n /**\n * get string value of this string object\n * @name getString\n * @memberOf KJUR.asn1.DERAbstractString#\n * @function\n * @return {String} string value of this string object\n */\n this.getString = function () {\n return this.s;\n };\n /**\n * set value by a string\n * @name setString\n * @memberOf KJUR.asn1.DERAbstractString#\n * @function\n * @param {String} newS value by a string to set\n */\n this.setString = function (newS) {\n this.hTLV = null;\n this.isModified = true;\n this.s = newS;\n this.hV = stohex(this.s);\n };\n /**\n * set value by a hexadecimal string\n * @name setStringHex\n * @memberOf KJUR.asn1.DERAbstractString#\n * @function\n * @param {String} newHexString value by a hexadecimal string to set\n */\n this.setStringHex = function (newHexString) {\n this.hTLV = null;\n this.isModified = true;\n this.s = null;\n this.hV = newHexString;\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n if (typeof params != \"undefined\") {\n if (typeof params == \"string\") {\n this.setString(params);\n }\n else if (typeof params['str'] != \"undefined\") {\n this.setString(params['str']);\n }\n else if (typeof params['hex'] != \"undefined\") {\n this.setStringHex(params['hex']);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERAbstractString, KJUR.asn1.ASN1Object);\n// == END DERAbstractString ================================================\n// == BEGIN DERAbstractTime ==================================================\n/**\n * base class for ASN.1 DER Generalized/UTCTime class\n * @name KJUR.asn1.DERAbstractTime\n * @class base class for ASN.1 DER Generalized/UTCTime class\n * @param {Array} params associative array of parameters (ex. {'str': '130430235959Z'})\n * @extends KJUR.asn1.ASN1Object\n * @description\n * @see KJUR.asn1.ASN1Object - superclass\n */\nKJUR.asn1.DERAbstractTime = function (params) {\n KJUR.asn1.DERAbstractTime.superclass.constructor.call(this);\n var s = null;\n var date = null;\n // --- PRIVATE METHODS --------------------\n this.localDateToUTC = function (d) {\n utc = d.getTime() + (d.getTimezoneOffset() * 60000);\n var utcDate = new Date(utc);\n return utcDate;\n };\n /*\n * format date string by Data object\n * @name formatDate\n * @memberOf KJUR.asn1.AbstractTime;\n * @param {Date} dateObject\n * @param {string} type 'utc' or 'gen'\n * @param {boolean} withMillis flag for with millisections or not\n * @description\n * 'withMillis' flag is supported from asn1 1.0.6.\n */\n this.formatDate = function (dateObject, type, withMillis) {\n var pad = this.zeroPadding;\n var d = this.localDateToUTC(dateObject);\n var year = String(d.getFullYear());\n if (type == 'utc')\n year = year.substr(2, 2);\n var month = pad(String(d.getMonth() + 1), 2);\n var day = pad(String(d.getDate()), 2);\n var hour = pad(String(d.getHours()), 2);\n var min = pad(String(d.getMinutes()), 2);\n var sec = pad(String(d.getSeconds()), 2);\n var s = year + month + day + hour + min + sec;\n if (withMillis === true) {\n var millis = d.getMilliseconds();\n if (millis != 0) {\n var sMillis = pad(String(millis), 3);\n sMillis = sMillis.replace(/[0]+$/, \"\");\n s = s + \".\" + sMillis;\n }\n }\n return s + \"Z\";\n };\n this.zeroPadding = function (s, len) {\n if (s.length >= len)\n return s;\n return new Array(len - s.length + 1).join('0') + s;\n };\n // --- PUBLIC METHODS --------------------\n /**\n * get string value of this string object\n * @name getString\n * @memberOf KJUR.asn1.DERAbstractTime#\n * @function\n * @return {String} string value of this time object\n */\n this.getString = function () {\n return this.s;\n };\n /**\n * set value by a string\n * @name setString\n * @memberOf KJUR.asn1.DERAbstractTime#\n * @function\n * @param {String} newS value by a string to set such like \"130430235959Z\"\n */\n this.setString = function (newS) {\n this.hTLV = null;\n this.isModified = true;\n this.s = newS;\n this.hV = stohex(newS);\n };\n /**\n * set value by a Date object\n * @name setByDateValue\n * @memberOf KJUR.asn1.DERAbstractTime#\n * @function\n * @param {Integer} year year of date (ex. 2013)\n * @param {Integer} month month of date between 1 and 12 (ex. 12)\n * @param {Integer} day day of month\n * @param {Integer} hour hours of date\n * @param {Integer} min minutes of date\n * @param {Integer} sec seconds of date\n */\n this.setByDateValue = function (year, month, day, hour, min, sec) {\n var dateObject = new Date(Date.UTC(year, month - 1, day, hour, min, sec, 0));\n this.setByDate(dateObject);\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERAbstractTime, KJUR.asn1.ASN1Object);\n// == END DERAbstractTime ==================================================\n// == BEGIN DERAbstractStructured ============================================\n/**\n * base class for ASN.1 DER structured class\n * @name KJUR.asn1.DERAbstractStructured\n * @class base class for ASN.1 DER structured class\n * @property {Array} asn1Array internal array of ASN1Object\n * @extends KJUR.asn1.ASN1Object\n * @description\n * @see KJUR.asn1.ASN1Object - superclass\n */\nKJUR.asn1.DERAbstractStructured = function (params) {\n KJUR.asn1.DERAbstractString.superclass.constructor.call(this);\n var asn1Array = null;\n /**\n * set value by array of ASN1Object\n * @name setByASN1ObjectArray\n * @memberOf KJUR.asn1.DERAbstractStructured#\n * @function\n * @param {array} asn1ObjectArray array of ASN1Object to set\n */\n this.setByASN1ObjectArray = function (asn1ObjectArray) {\n this.hTLV = null;\n this.isModified = true;\n this.asn1Array = asn1ObjectArray;\n };\n /**\n * append an ASN1Object to internal array\n * @name appendASN1Object\n * @memberOf KJUR.asn1.DERAbstractStructured#\n * @function\n * @param {ASN1Object} asn1Object to add\n */\n this.appendASN1Object = function (asn1Object) {\n this.hTLV = null;\n this.isModified = true;\n this.asn1Array.push(asn1Object);\n };\n this.asn1Array = new Array();\n if (typeof params != \"undefined\") {\n if (typeof params['array'] != \"undefined\") {\n this.asn1Array = params['array'];\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERAbstractStructured, KJUR.asn1.ASN1Object);\n// ********************************************************************\n// ASN.1 Object Classes\n// ********************************************************************\n// ********************************************************************\n/**\n * class for ASN.1 DER Boolean\n * @name KJUR.asn1.DERBoolean\n * @class class for ASN.1 DER Boolean\n * @extends KJUR.asn1.ASN1Object\n * @description\n * @see KJUR.asn1.ASN1Object - superclass\n */\nKJUR.asn1.DERBoolean = function () {\n KJUR.asn1.DERBoolean.superclass.constructor.call(this);\n this.hT = \"01\";\n this.hTLV = \"0101ff\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERBoolean, KJUR.asn1.ASN1Object);\n// ********************************************************************\n/**\n * class for ASN.1 DER Integer\n * @name KJUR.asn1.DERInteger\n * @class class for ASN.1 DER Integer\n * @extends KJUR.asn1.ASN1Object\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>int - specify initial ASN.1 value(V) by integer value</li>\n * <li>bigint - specify initial ASN.1 value(V) by BigInteger object</li>\n * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>\n * </ul>\n * NOTE: 'params' can be omitted.\n */\nKJUR.asn1.DERInteger = function (params) {\n KJUR.asn1.DERInteger.superclass.constructor.call(this);\n this.hT = \"02\";\n /**\n * set value by Tom Wu's BigInteger object\n * @name setByBigInteger\n * @memberOf KJUR.asn1.DERInteger#\n * @function\n * @param {BigInteger} bigIntegerValue to set\n */\n this.setByBigInteger = function (bigIntegerValue) {\n this.hTLV = null;\n this.isModified = true;\n this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(bigIntegerValue);\n };\n /**\n * set value by integer value\n * @name setByInteger\n * @memberOf KJUR.asn1.DERInteger\n * @function\n * @param {Integer} integer value to set\n */\n this.setByInteger = function (intValue) {\n var bi = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(String(intValue), 10);\n this.setByBigInteger(bi);\n };\n /**\n * set value by integer value\n * @name setValueHex\n * @memberOf KJUR.asn1.DERInteger#\n * @function\n * @param {String} hexadecimal string of integer value\n * @description\n * <br/>\n * NOTE: Value shall be represented by minimum octet length of\n * two's complement representation.\n * @example\n * new KJUR.asn1.DERInteger(123);\n * new KJUR.asn1.DERInteger({'int': 123});\n * new KJUR.asn1.DERInteger({'hex': '1fad'});\n */\n this.setValueHex = function (newHexString) {\n this.hV = newHexString;\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n if (typeof params != \"undefined\") {\n if (typeof params['bigint'] != \"undefined\") {\n this.setByBigInteger(params['bigint']);\n }\n else if (typeof params['int'] != \"undefined\") {\n this.setByInteger(params['int']);\n }\n else if (typeof params == \"number\") {\n this.setByInteger(params);\n }\n else if (typeof params['hex'] != \"undefined\") {\n this.setValueHex(params['hex']);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERInteger, KJUR.asn1.ASN1Object);\n// ********************************************************************\n/**\n * class for ASN.1 DER encoded BitString primitive\n * @name KJUR.asn1.DERBitString\n * @class class for ASN.1 DER encoded BitString primitive\n * @extends KJUR.asn1.ASN1Object\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>bin - specify binary string (ex. '10111')</li>\n * <li>array - specify array of boolean (ex. [true,false,true,true])</li>\n * <li>hex - specify hexadecimal string of ASN.1 value(V) including unused bits</li>\n * <li>obj - specify {@link KJUR.asn1.ASN1Util.newObject}\n * argument for \"BitString encapsulates\" structure.</li>\n * </ul>\n * NOTE1: 'params' can be omitted.<br/>\n * NOTE2: 'obj' parameter have been supported since\n * asn1 1.0.11, jsrsasign 6.1.1 (2016-Sep-25).<br/>\n * @example\n * // default constructor\n * o = new KJUR.asn1.DERBitString();\n * // initialize with binary string\n * o = new KJUR.asn1.DERBitString({bin: \"1011\"});\n * // initialize with boolean array\n * o = new KJUR.asn1.DERBitString({array: [true,false,true,true]});\n * // initialize with hexadecimal string (04 is unused bits)\n * o = new KJUR.asn1.DEROctetString({hex: \"04bac0\"});\n * // initialize with ASN1Util.newObject argument for encapsulated\n * o = new KJUR.asn1.DERBitString({obj: {seq: [{int: 3}, {prnstr: 'aaa'}]}});\n * // above generates a ASN.1 data like this:\n * // BIT STRING, encapsulates {\n * // SEQUENCE {\n * // INTEGER 3\n * // PrintableString 'aaa'\n * // }\n * // }\n */\nKJUR.asn1.DERBitString = function (params) {\n if (params !== undefined && typeof params.obj !== \"undefined\") {\n var o = KJUR.asn1.ASN1Util.newObject(params.obj);\n params.hex = \"00\" + o.getEncodedHex();\n }\n KJUR.asn1.DERBitString.superclass.constructor.call(this);\n this.hT = \"03\";\n /**\n * set ASN.1 value(V) by a hexadecimal string including unused bits\n * @name setHexValueIncludingUnusedBits\n * @memberOf KJUR.asn1.DERBitString#\n * @function\n * @param {String} newHexStringIncludingUnusedBits\n */\n this.setHexValueIncludingUnusedBits = function (newHexStringIncludingUnusedBits) {\n this.hTLV = null;\n this.isModified = true;\n this.hV = newHexStringIncludingUnusedBits;\n };\n /**\n * set ASN.1 value(V) by unused bit and hexadecimal string of value\n * @name setUnusedBitsAndHexValue\n * @memberOf KJUR.asn1.DERBitString#\n * @function\n * @param {Integer} unusedBits\n * @param {String} hValue\n */\n this.setUnusedBitsAndHexValue = function (unusedBits, hValue) {\n if (unusedBits < 0 || 7 < unusedBits) {\n throw \"unused bits shall be from 0 to 7: u = \" + unusedBits;\n }\n var hUnusedBits = \"0\" + unusedBits;\n this.hTLV = null;\n this.isModified = true;\n this.hV = hUnusedBits + hValue;\n };\n /**\n * set ASN.1 DER BitString by binary string<br/>\n * @name setByBinaryString\n * @memberOf KJUR.asn1.DERBitString#\n * @function\n * @param {String} binaryString binary value string (i.e. '10111')\n * @description\n * Its unused bits will be calculated automatically by length of\n * 'binaryValue'. <br/>\n * NOTE: Trailing zeros '0' will be ignored.\n * @example\n * o = new KJUR.asn1.DERBitString();\n * o.setByBooleanArray(\"01011\");\n */\n this.setByBinaryString = function (binaryString) {\n binaryString = binaryString.replace(/0+$/, '');\n var unusedBits = 8 - binaryString.length % 8;\n if (unusedBits == 8)\n unusedBits = 0;\n for (var i = 0; i <= unusedBits; i++) {\n binaryString += '0';\n }\n var h = '';\n for (var i = 0; i < binaryString.length - 1; i += 8) {\n var b = binaryString.substr(i, 8);\n var x = parseInt(b, 2).toString(16);\n if (x.length == 1)\n x = '0' + x;\n h += x;\n }\n this.hTLV = null;\n this.isModified = true;\n this.hV = '0' + unusedBits + h;\n };\n /**\n * set ASN.1 TLV value(V) by an array of boolean<br/>\n * @name setByBooleanArray\n * @memberOf KJUR.asn1.DERBitString#\n * @function\n * @param {array} booleanArray array of boolean (ex. [true, false, true])\n * @description\n * NOTE: Trailing falses will be ignored in the ASN.1 DER Object.\n * @example\n * o = new KJUR.asn1.DERBitString();\n * o.setByBooleanArray([false, true, false, true, true]);\n */\n this.setByBooleanArray = function (booleanArray) {\n var s = '';\n for (var i = 0; i < booleanArray.length; i++) {\n if (booleanArray[i] == true) {\n s += '1';\n }\n else {\n s += '0';\n }\n }\n this.setByBinaryString(s);\n };\n /**\n * generate an array of falses with specified length<br/>\n * @name newFalseArray\n * @memberOf KJUR.asn1.DERBitString\n * @function\n * @param {Integer} nLength length of array to generate\n * @return {array} array of boolean falses\n * @description\n * This static method may be useful to initialize boolean array.\n * @example\n * o = new KJUR.asn1.DERBitString();\n * o.newFalseArray(3) → [false, false, false]\n */\n this.newFalseArray = function (nLength) {\n var a = new Array(nLength);\n for (var i = 0; i < nLength; i++) {\n a[i] = false;\n }\n return a;\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n if (typeof params != \"undefined\") {\n if (typeof params == \"string\" && params.toLowerCase().match(/^[0-9a-f]+$/)) {\n this.setHexValueIncludingUnusedBits(params);\n }\n else if (typeof params['hex'] != \"undefined\") {\n this.setHexValueIncludingUnusedBits(params['hex']);\n }\n else if (typeof params['bin'] != \"undefined\") {\n this.setByBinaryString(params['bin']);\n }\n else if (typeof params['array'] != \"undefined\") {\n this.setByBooleanArray(params['array']);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERBitString, KJUR.asn1.ASN1Object);\n// ********************************************************************\n/**\n * class for ASN.1 DER OctetString<br/>\n * @name KJUR.asn1.DEROctetString\n * @class class for ASN.1 DER OctetString\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * This class provides ASN.1 OctetString simple type.<br/>\n * Supported \"params\" attributes are:\n * <ul>\n * <li>str - to set a string as a value</li>\n * <li>hex - to set a hexadecimal string as a value</li>\n * <li>obj - to set a encapsulated ASN.1 value by JSON object\n * which is defined in {@link KJUR.asn1.ASN1Util.newObject}</li>\n * </ul>\n * NOTE: A parameter 'obj' have been supported\n * for \"OCTET STRING, encapsulates\" structure.\n * since asn1 1.0.11, jsrsasign 6.1.1 (2016-Sep-25).\n * @see KJUR.asn1.DERAbstractString - superclass\n * @example\n * // default constructor\n * o = new KJUR.asn1.DEROctetString();\n * // initialize with string\n * o = new KJUR.asn1.DEROctetString({str: \"aaa\"});\n * // initialize with hexadecimal string\n * o = new KJUR.asn1.DEROctetString({hex: \"616161\"});\n * // initialize with ASN1Util.newObject argument\n * o = new KJUR.asn1.DEROctetString({obj: {seq: [{int: 3}, {prnstr: 'aaa'}]}});\n * // above generates a ASN.1 data like this:\n * // OCTET STRING, encapsulates {\n * // SEQUENCE {\n * // INTEGER 3\n * // PrintableString 'aaa'\n * // }\n * // }\n */\nKJUR.asn1.DEROctetString = function (params) {\n if (params !== undefined && typeof params.obj !== \"undefined\") {\n var o = KJUR.asn1.ASN1Util.newObject(params.obj);\n params.hex = o.getEncodedHex();\n }\n KJUR.asn1.DEROctetString.superclass.constructor.call(this, params);\n this.hT = \"04\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DEROctetString, KJUR.asn1.DERAbstractString);\n// ********************************************************************\n/**\n * class for ASN.1 DER Null\n * @name KJUR.asn1.DERNull\n * @class class for ASN.1 DER Null\n * @extends KJUR.asn1.ASN1Object\n * @description\n * @see KJUR.asn1.ASN1Object - superclass\n */\nKJUR.asn1.DERNull = function () {\n KJUR.asn1.DERNull.superclass.constructor.call(this);\n this.hT = \"05\";\n this.hTLV = \"0500\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERNull, KJUR.asn1.ASN1Object);\n// ********************************************************************\n/**\n * class for ASN.1 DER ObjectIdentifier\n * @name KJUR.asn1.DERObjectIdentifier\n * @class class for ASN.1 DER ObjectIdentifier\n * @param {Array} params associative array of parameters (ex. {'oid': '2.5.4.5'})\n * @extends KJUR.asn1.ASN1Object\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>oid - specify initial ASN.1 value(V) by a oid string (ex. 2.5.4.13)</li>\n * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>\n * </ul>\n * NOTE: 'params' can be omitted.\n */\nKJUR.asn1.DERObjectIdentifier = function (params) {\n var itox = function (i) {\n var h = i.toString(16);\n if (h.length == 1)\n h = '0' + h;\n return h;\n };\n var roidtox = function (roid) {\n var h = '';\n var bi = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(roid, 10);\n var b = bi.toString(2);\n var padLen = 7 - b.length % 7;\n if (padLen == 7)\n padLen = 0;\n var bPad = '';\n for (var i = 0; i < padLen; i++)\n bPad += '0';\n b = bPad + b;\n for (var i = 0; i < b.length - 1; i += 7) {\n var b8 = b.substr(i, 7);\n if (i != b.length - 7)\n b8 = '1' + b8;\n h += itox(parseInt(b8, 2));\n }\n return h;\n };\n KJUR.asn1.DERObjectIdentifier.superclass.constructor.call(this);\n this.hT = \"06\";\n /**\n * set value by a hexadecimal string\n * @name setValueHex\n * @memberOf KJUR.asn1.DERObjectIdentifier#\n * @function\n * @param {String} newHexString hexadecimal value of OID bytes\n */\n this.setValueHex = function (newHexString) {\n this.hTLV = null;\n this.isModified = true;\n this.s = null;\n this.hV = newHexString;\n };\n /**\n * set value by a OID string<br/>\n * @name setValueOidString\n * @memberOf KJUR.asn1.DERObjectIdentifier#\n * @function\n * @param {String} oidString OID string (ex. 2.5.4.13)\n * @example\n * o = new KJUR.asn1.DERObjectIdentifier();\n * o.setValueOidString(\"2.5.4.13\");\n */\n this.setValueOidString = function (oidString) {\n if (!oidString.match(/^[0-9.]+$/)) {\n throw \"malformed oid string: \" + oidString;\n }\n var h = '';\n var a = oidString.split('.');\n var i0 = parseInt(a[0]) * 40 + parseInt(a[1]);\n h += itox(i0);\n a.splice(0, 2);\n for (var i = 0; i < a.length; i++) {\n h += roidtox(a[i]);\n }\n this.hTLV = null;\n this.isModified = true;\n this.s = null;\n this.hV = h;\n };\n /**\n * set value by a OID name\n * @name setValueName\n * @memberOf KJUR.asn1.DERObjectIdentifier#\n * @function\n * @param {String} oidName OID name (ex. 'serverAuth')\n * @since 1.0.1\n * @description\n * OID name shall be defined in 'KJUR.asn1.x509.OID.name2oidList'.\n * Otherwise raise error.\n * @example\n * o = new KJUR.asn1.DERObjectIdentifier();\n * o.setValueName(\"serverAuth\");\n */\n this.setValueName = function (oidName) {\n var oid = KJUR.asn1.x509.OID.name2oid(oidName);\n if (oid !== '') {\n this.setValueOidString(oid);\n }\n else {\n throw \"DERObjectIdentifier oidName undefined: \" + oidName;\n }\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n if (params !== undefined) {\n if (typeof params === \"string\") {\n if (params.match(/^[0-2].[0-9.]+$/)) {\n this.setValueOidString(params);\n }\n else {\n this.setValueName(params);\n }\n }\n else if (params.oid !== undefined) {\n this.setValueOidString(params.oid);\n }\n else if (params.hex !== undefined) {\n this.setValueHex(params.hex);\n }\n else if (params.name !== undefined) {\n this.setValueName(params.name);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERObjectIdentifier, KJUR.asn1.ASN1Object);\n// ********************************************************************\n/**\n * class for ASN.1 DER Enumerated\n * @name KJUR.asn1.DEREnumerated\n * @class class for ASN.1 DER Enumerated\n * @extends KJUR.asn1.ASN1Object\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>int - specify initial ASN.1 value(V) by integer value</li>\n * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>\n * </ul>\n * NOTE: 'params' can be omitted.\n * @example\n * new KJUR.asn1.DEREnumerated(123);\n * new KJUR.asn1.DEREnumerated({int: 123});\n * new KJUR.asn1.DEREnumerated({hex: '1fad'});\n */\nKJUR.asn1.DEREnumerated = function (params) {\n KJUR.asn1.DEREnumerated.superclass.constructor.call(this);\n this.hT = \"0a\";\n /**\n * set value by Tom Wu's BigInteger object\n * @name setByBigInteger\n * @memberOf KJUR.asn1.DEREnumerated#\n * @function\n * @param {BigInteger} bigIntegerValue to set\n */\n this.setByBigInteger = function (bigIntegerValue) {\n this.hTLV = null;\n this.isModified = true;\n this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(bigIntegerValue);\n };\n /**\n * set value by integer value\n * @name setByInteger\n * @memberOf KJUR.asn1.DEREnumerated#\n * @function\n * @param {Integer} integer value to set\n */\n this.setByInteger = function (intValue) {\n var bi = new _jsbn_jsbn__WEBPACK_IMPORTED_MODULE_0__.BigInteger(String(intValue), 10);\n this.setByBigInteger(bi);\n };\n /**\n * set value by integer value\n * @name setValueHex\n * @memberOf KJUR.asn1.DEREnumerated#\n * @function\n * @param {String} hexadecimal string of integer value\n * @description\n * <br/>\n * NOTE: Value shall be represented by minimum octet length of\n * two's complement representation.\n */\n this.setValueHex = function (newHexString) {\n this.hV = newHexString;\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n if (typeof params != \"undefined\") {\n if (typeof params['int'] != \"undefined\") {\n this.setByInteger(params['int']);\n }\n else if (typeof params == \"number\") {\n this.setByInteger(params);\n }\n else if (typeof params['hex'] != \"undefined\") {\n this.setValueHex(params['hex']);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DEREnumerated, KJUR.asn1.ASN1Object);\n// ********************************************************************\n/**\n * class for ASN.1 DER UTF8String\n * @name KJUR.asn1.DERUTF8String\n * @class class for ASN.1 DER UTF8String\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * @see KJUR.asn1.DERAbstractString - superclass\n */\nKJUR.asn1.DERUTF8String = function (params) {\n KJUR.asn1.DERUTF8String.superclass.constructor.call(this, params);\n this.hT = \"0c\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERUTF8String, KJUR.asn1.DERAbstractString);\n// ********************************************************************\n/**\n * class for ASN.1 DER NumericString\n * @name KJUR.asn1.DERNumericString\n * @class class for ASN.1 DER NumericString\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * @see KJUR.asn1.DERAbstractString - superclass\n */\nKJUR.asn1.DERNumericString = function (params) {\n KJUR.asn1.DERNumericString.superclass.constructor.call(this, params);\n this.hT = \"12\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERNumericString, KJUR.asn1.DERAbstractString);\n// ********************************************************************\n/**\n * class for ASN.1 DER PrintableString\n * @name KJUR.asn1.DERPrintableString\n * @class class for ASN.1 DER PrintableString\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * @see KJUR.asn1.DERAbstractString - superclass\n */\nKJUR.asn1.DERPrintableString = function (params) {\n KJUR.asn1.DERPrintableString.superclass.constructor.call(this, params);\n this.hT = \"13\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERPrintableString, KJUR.asn1.DERAbstractString);\n// ********************************************************************\n/**\n * class for ASN.1 DER TeletexString\n * @name KJUR.asn1.DERTeletexString\n * @class class for ASN.1 DER TeletexString\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * @see KJUR.asn1.DERAbstractString - superclass\n */\nKJUR.asn1.DERTeletexString = function (params) {\n KJUR.asn1.DERTeletexString.superclass.constructor.call(this, params);\n this.hT = \"14\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERTeletexString, KJUR.asn1.DERAbstractString);\n// ********************************************************************\n/**\n * class for ASN.1 DER IA5String\n * @name KJUR.asn1.DERIA5String\n * @class class for ASN.1 DER IA5String\n * @param {Array} params associative array of parameters (ex. {'str': 'aaa'})\n * @extends KJUR.asn1.DERAbstractString\n * @description\n * @see KJUR.asn1.DERAbstractString - superclass\n */\nKJUR.asn1.DERIA5String = function (params) {\n KJUR.asn1.DERIA5String.superclass.constructor.call(this, params);\n this.hT = \"16\";\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERIA5String, KJUR.asn1.DERAbstractString);\n// ********************************************************************\n/**\n * class for ASN.1 DER UTCTime\n * @name KJUR.asn1.DERUTCTime\n * @class class for ASN.1 DER UTCTime\n * @param {Array} params associative array of parameters (ex. {'str': '130430235959Z'})\n * @extends KJUR.asn1.DERAbstractTime\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>str - specify initial ASN.1 value(V) by a string (ex.'130430235959Z')</li>\n * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>\n * <li>date - specify Date object.</li>\n * </ul>\n * NOTE: 'params' can be omitted.\n * <h4>EXAMPLES</h4>\n * @example\n * d1 = new KJUR.asn1.DERUTCTime();\n * d1.setString('130430125959Z');\n *\n * d2 = new KJUR.asn1.DERUTCTime({'str': '130430125959Z'});\n * d3 = new KJUR.asn1.DERUTCTime({'date': new Date(Date.UTC(2015, 0, 31, 0, 0, 0, 0))});\n * d4 = new KJUR.asn1.DERUTCTime('130430125959Z');\n */\nKJUR.asn1.DERUTCTime = function (params) {\n KJUR.asn1.DERUTCTime.superclass.constructor.call(this, params);\n this.hT = \"17\";\n /**\n * set value by a Date object<br/>\n * @name setByDate\n * @memberOf KJUR.asn1.DERUTCTime#\n * @function\n * @param {Date} dateObject Date object to set ASN.1 value(V)\n * @example\n * o = new KJUR.asn1.DERUTCTime();\n * o.setByDate(new Date(\"2016/12/31\"));\n */\n this.setByDate = function (dateObject) {\n this.hTLV = null;\n this.isModified = true;\n this.date = dateObject;\n this.s = this.formatDate(this.date, 'utc');\n this.hV = stohex(this.s);\n };\n this.getFreshValueHex = function () {\n if (typeof this.date == \"undefined\" && typeof this.s == \"undefined\") {\n this.date = new Date();\n this.s = this.formatDate(this.date, 'utc');\n this.hV = stohex(this.s);\n }\n return this.hV;\n };\n if (params !== undefined) {\n if (params.str !== undefined) {\n this.setString(params.str);\n }\n else if (typeof params == \"string\" && params.match(/^[0-9]{12}Z$/)) {\n this.setString(params);\n }\n else if (params.hex !== undefined) {\n this.setStringHex(params.hex);\n }\n else if (params.date !== undefined) {\n this.setByDate(params.date);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERUTCTime, KJUR.asn1.DERAbstractTime);\n// ********************************************************************\n/**\n * class for ASN.1 DER GeneralizedTime\n * @name KJUR.asn1.DERGeneralizedTime\n * @class class for ASN.1 DER GeneralizedTime\n * @param {Array} params associative array of parameters (ex. {'str': '20130430235959Z'})\n * @property {Boolean} withMillis flag to show milliseconds or not\n * @extends KJUR.asn1.DERAbstractTime\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>str - specify initial ASN.1 value(V) by a string (ex.'20130430235959Z')</li>\n * <li>hex - specify initial ASN.1 value(V) by a hexadecimal string</li>\n * <li>date - specify Date object.</li>\n * <li>millis - specify flag to show milliseconds (from 1.0.6)</li>\n * </ul>\n * NOTE1: 'params' can be omitted.\n * NOTE2: 'withMillis' property is supported from asn1 1.0.6.\n */\nKJUR.asn1.DERGeneralizedTime = function (params) {\n KJUR.asn1.DERGeneralizedTime.superclass.constructor.call(this, params);\n this.hT = \"18\";\n this.withMillis = false;\n /**\n * set value by a Date object\n * @name setByDate\n * @memberOf KJUR.asn1.DERGeneralizedTime#\n * @function\n * @param {Date} dateObject Date object to set ASN.1 value(V)\n * @example\n * When you specify UTC time, use 'Date.UTC' method like this:<br/>\n * o1 = new DERUTCTime();\n * o1.setByDate(date);\n *\n * date = new Date(Date.UTC(2015, 0, 31, 23, 59, 59, 0)); #2015JAN31 23:59:59\n */\n this.setByDate = function (dateObject) {\n this.hTLV = null;\n this.isModified = true;\n this.date = dateObject;\n this.s = this.formatDate(this.date, 'gen', this.withMillis);\n this.hV = stohex(this.s);\n };\n this.getFreshValueHex = function () {\n if (this.date === undefined && this.s === undefined) {\n this.date = new Date();\n this.s = this.formatDate(this.date, 'gen', this.withMillis);\n this.hV = stohex(this.s);\n }\n return this.hV;\n };\n if (params !== undefined) {\n if (params.str !== undefined) {\n this.setString(params.str);\n }\n else if (typeof params == \"string\" && params.match(/^[0-9]{14}Z$/)) {\n this.setString(params);\n }\n else if (params.hex !== undefined) {\n this.setStringHex(params.hex);\n }\n else if (params.date !== undefined) {\n this.setByDate(params.date);\n }\n if (params.millis === true) {\n this.withMillis = true;\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERGeneralizedTime, KJUR.asn1.DERAbstractTime);\n// ********************************************************************\n/**\n * class for ASN.1 DER Sequence\n * @name KJUR.asn1.DERSequence\n * @class class for ASN.1 DER Sequence\n * @extends KJUR.asn1.DERAbstractStructured\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>array - specify array of ASN1Object to set elements of content</li>\n * </ul>\n * NOTE: 'params' can be omitted.\n */\nKJUR.asn1.DERSequence = function (params) {\n KJUR.asn1.DERSequence.superclass.constructor.call(this, params);\n this.hT = \"30\";\n this.getFreshValueHex = function () {\n var h = '';\n for (var i = 0; i < this.asn1Array.length; i++) {\n var asn1Obj = this.asn1Array[i];\n h += asn1Obj.getEncodedHex();\n }\n this.hV = h;\n return this.hV;\n };\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERSequence, KJUR.asn1.DERAbstractStructured);\n// ********************************************************************\n/**\n * class for ASN.1 DER Set\n * @name KJUR.asn1.DERSet\n * @class class for ASN.1 DER Set\n * @extends KJUR.asn1.DERAbstractStructured\n * @description\n * <br/>\n * As for argument 'params' for constructor, you can specify one of\n * following properties:\n * <ul>\n * <li>array - specify array of ASN1Object to set elements of content</li>\n * <li>sortflag - flag for sort (default: true). ASN.1 BER is not sorted in 'SET OF'.</li>\n * </ul>\n * NOTE1: 'params' can be omitted.<br/>\n * NOTE2: sortflag is supported since 1.0.5.\n */\nKJUR.asn1.DERSet = function (params) {\n KJUR.asn1.DERSet.superclass.constructor.call(this, params);\n this.hT = \"31\";\n this.sortFlag = true; // item shall be sorted only in ASN.1 DER\n this.getFreshValueHex = function () {\n var a = new Array();\n for (var i = 0; i < this.asn1Array.length; i++) {\n var asn1Obj = this.asn1Array[i];\n a.push(asn1Obj.getEncodedHex());\n }\n if (this.sortFlag == true)\n a.sort();\n this.hV = a.join('');\n return this.hV;\n };\n if (typeof params != \"undefined\") {\n if (typeof params.sortflag != \"undefined\" &&\n params.sortflag == false)\n this.sortFlag = false;\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERSet, KJUR.asn1.DERAbstractStructured);\n// ********************************************************************\n/**\n * class for ASN.1 DER TaggedObject\n * @name KJUR.asn1.DERTaggedObject\n * @class class for ASN.1 DER TaggedObject\n * @extends KJUR.asn1.ASN1Object\n * @description\n * <br/>\n * Parameter 'tagNoNex' is ASN.1 tag(T) value for this object.\n * For example, if you find '[1]' tag in a ASN.1 dump,\n * 'tagNoHex' will be 'a1'.\n * <br/>\n * As for optional argument 'params' for constructor, you can specify *ANY* of\n * following properties:\n * <ul>\n * <li>explicit - specify true if this is explicit tag otherwise false\n * (default is 'true').</li>\n * <li>tag - specify tag (default is 'a0' which means [0])</li>\n * <li>obj - specify ASN1Object which is tagged</li>\n * </ul>\n * @example\n * d1 = new KJUR.asn1.DERUTF8String({'str':'a'});\n * d2 = new KJUR.asn1.DERTaggedObject({'obj': d1});\n * hex = d2.getEncodedHex();\n */\nKJUR.asn1.DERTaggedObject = function (params) {\n KJUR.asn1.DERTaggedObject.superclass.constructor.call(this);\n this.hT = \"a0\";\n this.hV = '';\n this.isExplicit = true;\n this.asn1Object = null;\n /**\n * set value by an ASN1Object\n * @name setString\n * @memberOf KJUR.asn1.DERTaggedObject#\n * @function\n * @param {Boolean} isExplicitFlag flag for explicit/implicit tag\n * @param {Integer} tagNoHex hexadecimal string of ASN.1 tag\n * @param {ASN1Object} asn1Object ASN.1 to encapsulate\n */\n this.setASN1Object = function (isExplicitFlag, tagNoHex, asn1Object) {\n this.hT = tagNoHex;\n this.isExplicit = isExplicitFlag;\n this.asn1Object = asn1Object;\n if (this.isExplicit) {\n this.hV = this.asn1Object.getEncodedHex();\n this.hTLV = null;\n this.isModified = true;\n }\n else {\n this.hV = null;\n this.hTLV = asn1Object.getEncodedHex();\n this.hTLV = this.hTLV.replace(/^../, tagNoHex);\n this.isModified = false;\n }\n };\n this.getFreshValueHex = function () {\n return this.hV;\n };\n if (typeof params != \"undefined\") {\n if (typeof params['tag'] != \"undefined\") {\n this.hT = params['tag'];\n }\n if (typeof params['explicit'] != \"undefined\") {\n this.isExplicit = params['explicit'];\n }\n if (typeof params['obj'] != \"undefined\") {\n this.asn1Object = params['obj'];\n this.setASN1Object(this.isExplicit, this.hT, this.asn1Object);\n }\n }\n};\n_yahoo__WEBPACK_IMPORTED_MODULE_1__.YAHOO.lang.extend(KJUR.asn1.DERTaggedObject, KJUR.asn1.ASN1Object);\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/lib/jsrsasign/asn1-1.0.js?")},"./lib/lib/jsrsasign/yahoo.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ "YAHOO": () => (/* binding */ YAHOO)\n/* harmony export */ });\n/*!\nCopyright (c) 2011, Yahoo! Inc. All rights reserved.\nCode licensed under the BSD License:\nhttp://developer.yahoo.com/yui/license.html\nversion: 2.9.0\n*/\nvar YAHOO = {};\nYAHOO.lang = {\n /**\n * Utility to set up the prototype, constructor and superclass properties to\n * support an inheritance strategy that can chain constructors and methods.\n * Static members will not be inherited.\n *\n * @method extend\n * @static\n * @param {Function} subc the object to modify\n * @param {Function} superc the object to inherit\n * @param {Object} overrides additional properties/methods to add to the\n * subclass prototype. These will override the\n * matching items obtained from the superclass\n * if present.\n */\n extend: function (subc, superc, overrides) {\n if (!superc || !subc) {\n throw new Error("YAHOO.lang.extend failed, please check that " +\n "all dependencies are included.");\n }\n var F = function () { };\n F.prototype = superc.prototype;\n subc.prototype = new F();\n subc.prototype.constructor = subc;\n subc.superclass = superc.prototype;\n if (superc.prototype.constructor == Object.prototype.constructor) {\n superc.prototype.constructor = superc;\n }\n if (overrides) {\n var i;\n for (i in overrides) {\n subc.prototype[i] = overrides[i];\n }\n /*\n * IE will not enumerate native functions in a derived object even if the\n * function was overridden. This is a workaround for specific functions\n * we care about on the Object prototype.\n * @property _IEEnumFix\n * @param {Function} r the object to receive the augmentation\n * @param {Function} s the object that supplies the properties to augment\n * @static\n * @private\n */\n var _IEEnumFix = function () { }, ADD = ["toString", "valueOf"];\n try {\n if (/MSIE/.test(navigator.userAgent)) {\n _IEEnumFix = function (r, s) {\n for (i = 0; i < ADD.length; i = i + 1) {\n var fname = ADD[i], f = s[fname];\n if (typeof f === \'function\' && f != Object.prototype[fname]) {\n r[fname] = f;\n }\n }\n };\n }\n }\n catch (ex) { }\n ;\n _IEEnumFix(subc.prototype, overrides);\n }\n }\n};\n\n\n//# sourceURL=webpack://JSEncrypt/./lib/lib/jsrsasign/yahoo.js?')},"./lib/version.json":module=>{eval('module.exports = {"version":"3.2.0"};\n\n//# sourceURL=webpack://JSEncrypt/./lib/version.json?')}},__webpack_module_cache__={};function __nested_webpack_require_204218__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var n=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t](n,n.exports,__nested_webpack_require_204218__),n.exports}__nested_webpack_require_204218__.d=(t,e)=>{for(var n in e)__nested_webpack_require_204218__.o(e,n)&&!__nested_webpack_require_204218__.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},__nested_webpack_require_204218__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__nested_webpack_require_204218__.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var __webpack_exports__=__nested_webpack_require_204218__("./lib/index.js");return __webpack_exports__=__webpack_exports__.default,__webpack_exports__})()},module.exports=factory()},1168:t=>{function e(t){this.message=t}e.prototype=new Error,e.prototype.name="InvalidCharacterError",t.exports="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var n=String(t).replace(/=+$/,"");if(n.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,o=0,s=0,a="";i=n.charAt(s++);~i&&(r=o%4?64*r+i:i,o++%4)?a+=String.fromCharCode(255&r>>(-2*o&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return a}},4491:(t,e,n)=>{var r=n(1168);t.exports=function(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return function(t){return decodeURIComponent(r(t).replace(/(.)/g,(function(t,e){var n=e.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(e)}catch(t){return r(e)}}},6489:(t,e,n)=>{"use strict";var r=n(4491);function i(t){this.message=t}i.prototype=new Error,i.prototype.name="InvalidTokenError",t.exports=function(t,e){if("string"!=typeof t)throw new i("Invalid token specified");var n=!0===(e=e||{}).header?0:1;try{return JSON.parse(r(t.split(".")[n]))}catch(t){throw new i("Invalid token specified: "+t.message)}},t.exports.InvalidTokenError=i},2318:(t,e,n)=>{"use strict";var r=n(5717),i=n(3349),o=n(9509).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 h(t,e,n,r,i,o,s){return u(t+(e&n|~e&r)+i+o|0,s)+e|0}function c(t,e,n,r,i,o,s){return u(t+(e&r|n&~r)+i+o|0,s)+e|0}function l(t,e,n,r,i,o,s){return u(t+(e^n^r)+i+o|0,s)+e|0}function d(t,e,n,r,i,o,s){return u(t+(n^(e|~r))+i+o|0,s)+e|0}r(a,i),a.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var n=this._a,r=this._b,i=this._c,o=this._d;n=h(n,r,i,o,t[0],3614090360,7),o=h(o,n,r,i,t[1],3905402710,12),i=h(i,o,n,r,t[2],606105819,17),r=h(r,i,o,n,t[3],3250441966,22),n=h(n,r,i,o,t[4],4118548399,7),o=h(o,n,r,i,t[5],1200080426,12),i=h(i,o,n,r,t[6],2821735955,17),r=h(r,i,o,n,t[7],4249261313,22),n=h(n,r,i,o,t[8],1770035416,7),o=h(o,n,r,i,t[9],2336552879,12),i=h(i,o,n,r,t[10],4294925233,17),r=h(r,i,o,n,t[11],2304563134,22),n=h(n,r,i,o,t[12],1804603682,7),o=h(o,n,r,i,t[13],4254626195,12),i=h(i,o,n,r,t[14],2792965006,17),n=c(n,r=h(r,i,o,n,t[15],1236535329,22),i,o,t[1],4129170786,5),o=c(o,n,r,i,t[6],3225465664,9),i=c(i,o,n,r,t[11],643717713,14),r=c(r,i,o,n,t[0],3921069994,20),n=c(n,r,i,o,t[5],3593408605,5),o=c(o,n,r,i,t[10],38016083,9),i=c(i,o,n,r,t[15],3634488961,14),r=c(r,i,o,n,t[4],3889429448,20),n=c(n,r,i,o,t[9],568446438,5),o=c(o,n,r,i,t[14],3275163606,9),i=c(i,o,n,r,t[3],4107603335,14),r=c(r,i,o,n,t[8],1163531501,20),n=c(n,r,i,o,t[13],2850285829,5),o=c(o,n,r,i,t[2],4243563512,9),i=c(i,o,n,r,t[7],1735328473,14),n=l(n,r=c(r,i,o,n,t[12],2368359562,20),i,o,t[5],4294588738,4),o=l(o,n,r,i,t[8],2272392833,11),i=l(i,o,n,r,t[11],1839030562,16),r=l(r,i,o,n,t[14],4259657740,23),n=l(n,r,i,o,t[1],2763975236,4),o=l(o,n,r,i,t[4],1272893353,11),i=l(i,o,n,r,t[7],4139469664,16),r=l(r,i,o,n,t[10],3200236656,23),n=l(n,r,i,o,t[13],681279174,4),o=l(o,n,r,i,t[0],3936430074,11),i=l(i,o,n,r,t[3],3572445317,16),r=l(r,i,o,n,t[6],76029189,23),n=l(n,r,i,o,t[9],3654602809,4),o=l(o,n,r,i,t[12],3873151461,11),i=l(i,o,n,r,t[15],530742520,16),n=d(n,r=l(r,i,o,n,t[2],3299628645,23),i,o,t[0],4096336452,6),o=d(o,n,r,i,t[7],1126891415,10),i=d(i,o,n,r,t[14],2878612391,15),r=d(r,i,o,n,t[5],4237533241,21),n=d(n,r,i,o,t[12],1700485571,6),o=d(o,n,r,i,t[3],2399980690,10),i=d(i,o,n,r,t[10],4293915773,15),r=d(r,i,o,n,t[1],2240044497,21),n=d(n,r,i,o,t[8],1873313359,6),o=d(o,n,r,i,t[15],4264355552,10),i=d(i,o,n,r,t[6],2734768916,15),r=d(r,i,o,n,t[13],1309151649,21),n=d(n,r,i,o,t[4],4149444226,6),o=d(o,n,r,i,t[11],3174756917,10),i=d(i,o,n,r,t[2],718787259,15),r=d(r,i,o,n,t[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+r|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},3047:(t,e,n)=>{var r=n(6240),i=n(9931);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(),n=Math.ceil(e/8);do{var i=new r(this.rand.generate(n))}while(i.cmp(t)>=0);return i},o.prototype._randrange=function(t,e){var n=e.sub(t);return t.add(this._randbelow(n))},o.prototype.test=function(t,e,n){var i=t.bitLength(),o=r.mont(t),s=new r(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 h=t.shrn(u),c=a.toRed(o);e>0;e--){var l=this._randrange(new r(2),a);n&&n(l);var d=l.toRed(o).redPow(h);if(0!==d.cmp(s)&&0!==d.cmp(c)){for(var f=1;f<u;f++){if(0===(d=d.redSqr()).cmp(s))return!1;if(0===d.cmp(c))break}if(f===u)return!1}}return!0},o.prototype.getDivisor=function(t,e){var n=t.bitLength(),i=r.mont(t),o=new r(1).toRed(i);e||(e=Math.max(1,n/48|0));for(var s=t.subn(1),a=0;!s.testn(a);a++);for(var u=t.shrn(a),h=s.toRed(i);e>0;e--){var c=this._randrange(new r(2),s),l=t.gcd(c);if(0!==l.cmpn(1))return l;var d=c.toRed(i).redPow(u);if(0!==d.cmp(o)&&0!==d.cmp(h)){for(var f=1;f<a;f++){if(0===(d=d.redSqr()).cmp(o))return d.fromRed().subn(1).gcd(t);if(0===d.cmp(h))break}if(f===a)return(d=d.redSqr()).fromRed().subn(1).gcd(t)}}return!1}},6240:function(t,e,n){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"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:n(6619).Buffer}catch(t){}function a(t,e){var n=t.charCodeAt(e);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function u(t,e,n){var r=a(t,n);return n-1>=e&&(r|=a(t,n-1)<<4),r}function h(t,e,n,r){for(var i=0,o=Math.min(t.length,n),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=r,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,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(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,n):(this._parseBase(t,e,i),"le"===n&&this._initArray(this.toArray(),e,n)))},o.prototype._initNumber=function(t,e,n){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):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initArray=function(t,e,n){if(r("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"===n)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"===n)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,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,s=0;if("be"===n)for(r=t.length-1;r>=e;r-=2)i=u(t,e,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)i=u(t,e,r)<<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,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,s=o%r,a=Math.min(o,o-s)+n,u=0,c=n;c<a;c+=r)u=h(t,c,c+r,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=h(t,c,t.length,e),c=0;c<s;c++)l*=e;this.imuln(l),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 c=["","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"],l=[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 f(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var h=1;h<r;h++){for(var c=u>>>26,l=67108863&u,d=Math.min(h,e.length-1),f=Math.max(0,h-t.length+1);f<=d;f++){var p=h-f|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[f])+l)/67108864|0,l=67108863&s}n.words[h]=0|l,u=0|c}return 0!==u?n.words[h]=0|u:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);n=0!=(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var h=l[t],f=d[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(t);n=(p=p.idivn(f)).isZero()?m+n:c[h-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!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&&r(!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 r(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,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,h=new t(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[a]=s;for(;a<o;a++)h[a]=0}else{for(a=0;a<o-i;a++)h[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[o-a-1]=s}return h},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},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 n=this._zeroBits(this.words[e]);if(t+=n,26!==n)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 r(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 n=0;n<e.length;n++)this.words[n]=this.words[n]&t.words[n];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return r(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,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;r<n.length;r++)this.words[r]=e.words[r]^n.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return r(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){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,n,r;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?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o<r.length;o++)e=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<n.length;o++)e=(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.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 n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(e=(0|n.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<n.length;s++)o=(e=(0|n.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,n){var r,i,o,s=t.words,a=e.words,u=n.words,h=0,c=0|s[0],l=8191&c,d=c>>>13,f=0|s[1],p=8191&f,m=f>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,_=y>>>13,M=0|s[4],S=8191&M,E=M>>>13,A=0|s[5],k=8191&A,x=A>>>13,R=0|s[6],I=8191&R,T=R>>>13,C=0|s[7],B=8191&C,D=C>>>13,P=0|s[8],U=8191&P,O=P>>>13,N=0|s[9],q=8191&N,L=N>>>13,j=0|a[0],K=8191&j,$=j>>>13,z=0|a[1],H=8191&z,W=z>>>13,V=0|a[2],F=8191&V,J=V>>>13,G=0|a[3],Z=8191&G,Y=G>>>13,X=0|a[4],Q=8191&X,tt=X>>>13,et=0|a[5],nt=8191&et,rt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ht=at>>>13,ct=0|a[8],lt=8191&ct,dt=ct>>>13,ft=0|a[9],pt=8191&ft,mt=ft>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(h+(r=Math.imul(l,K))|0)+((8191&(i=(i=Math.imul(l,$))+Math.imul(d,K)|0))<<13)|0;h=((o=Math.imul(d,$))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,K),i=(i=Math.imul(p,$))+Math.imul(m,K)|0,o=Math.imul(m,$);var vt=(h+(r=r+Math.imul(l,H)|0)|0)+((8191&(i=(i=i+Math.imul(l,W)|0)+Math.imul(d,H)|0))<<13)|0;h=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,K),i=(i=Math.imul(v,$))+Math.imul(b,K)|0,o=Math.imul(b,$),r=r+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var bt=(h+(r=r+Math.imul(l,F)|0)|0)+((8191&(i=(i=i+Math.imul(l,J)|0)+Math.imul(d,F)|0))<<13)|0;h=((o=o+Math.imul(d,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,K),i=(i=Math.imul(w,$))+Math.imul(_,K)|0,o=Math.imul(_,$),r=r+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,W)|0,r=r+Math.imul(p,F)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,F)|0,o=o+Math.imul(m,J)|0;var yt=(h+(r=r+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(d,Z)|0))<<13)|0;h=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,K),i=(i=Math.imul(S,$))+Math.imul(E,K)|0,o=Math.imul(E,$),r=r+Math.imul(w,H)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,r=r+Math.imul(v,F)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(b,F)|0,o=o+Math.imul(b,J)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,Y)|0;var wt=(h+(r=r+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(d,Q)|0))<<13)|0;h=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,K),i=(i=Math.imul(k,$))+Math.imul(x,K)|0,o=Math.imul(x,$),r=r+Math.imul(S,H)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(E,H)|0,o=o+Math.imul(E,W)|0,r=r+Math.imul(w,F)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,F)|0,o=o+Math.imul(_,J)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,Y)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var _t=(h+(r=r+Math.imul(l,nt)|0)|0)+((8191&(i=(i=i+Math.imul(l,rt)|0)+Math.imul(d,nt)|0))<<13)|0;h=((o=o+Math.imul(d,rt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(I,K),i=(i=Math.imul(I,$))+Math.imul(T,K)|0,o=Math.imul(T,$),r=r+Math.imul(k,H)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,W)|0,r=r+Math.imul(S,F)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(E,F)|0,o=o+Math.imul(E,J)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,Y)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var Mt=(h+(r=r+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;h=((o=o+Math.imul(d,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(B,K),i=(i=Math.imul(B,$))+Math.imul(D,K)|0,o=Math.imul(D,$),r=r+Math.imul(I,H)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,W)|0,r=r+Math.imul(k,F)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(x,F)|0,o=o+Math.imul(x,J)|0,r=r+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(E,Z)|0,o=o+Math.imul(E,Y)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(v,nt)|0,i=(i=i+Math.imul(v,rt)|0)+Math.imul(b,nt)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(h+(r=r+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(d,ut)|0))<<13)|0;h=((o=o+Math.imul(d,ht)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(U,K),i=(i=Math.imul(U,$))+Math.imul(O,K)|0,o=Math.imul(O,$),r=r+Math.imul(B,H)|0,i=(i=i+Math.imul(B,W)|0)+Math.imul(D,H)|0,o=o+Math.imul(D,W)|0,r=r+Math.imul(I,F)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(T,F)|0,o=o+Math.imul(T,J)|0,r=r+Math.imul(k,Z)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(w,nt)|0,i=(i=i+Math.imul(w,rt)|0)+Math.imul(_,nt)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var Et=(h+(r=r+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;h=((o=o+Math.imul(d,dt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,K),i=(i=Math.imul(q,$))+Math.imul(L,K)|0,o=Math.imul(L,$),r=r+Math.imul(U,H)|0,i=(i=i+Math.imul(U,W)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,W)|0,r=r+Math.imul(B,F)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(D,F)|0,o=o+Math.imul(D,J)|0,r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,Y)|0,r=r+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,r=r+Math.imul(S,nt)|0,i=(i=i+Math.imul(S,rt)|0)+Math.imul(E,nt)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,r=r+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ht)|0,r=r+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var At=(h+(r=r+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;h=((o=o+Math.imul(d,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,H),i=(i=Math.imul(q,W))+Math.imul(L,H)|0,o=Math.imul(L,W),r=r+Math.imul(U,F)|0,i=(i=i+Math.imul(U,J)|0)+Math.imul(O,F)|0,o=o+Math.imul(O,J)|0,r=r+Math.imul(B,Z)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,Y)|0,r=r+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,nt)|0,i=(i=i+Math.imul(k,rt)|0)+Math.imul(x,nt)|0,o=o+Math.imul(x,rt)|0,r=r+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ht)|0,r=r+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(h+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,F),i=(i=Math.imul(q,J))+Math.imul(L,F)|0,o=Math.imul(L,J),r=r+Math.imul(U,Z)|0,i=(i=i+Math.imul(U,Y)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Y)|0,r=r+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(I,nt)|0,i=(i=i+Math.imul(I,rt)|0)+Math.imul(T,nt)|0,o=o+Math.imul(T,rt)|0,r=r+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,r=r+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,ht)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ht)|0,r=r+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,dt)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,dt)|0;var xt=(h+(r=r+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;h=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(q,Z),i=(i=Math.imul(q,Y))+Math.imul(L,Z)|0,o=Math.imul(L,Y),r=r+Math.imul(U,Q)|0,i=(i=i+Math.imul(U,tt)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,r=r+Math.imul(B,nt)|0,i=(i=i+Math.imul(B,rt)|0)+Math.imul(D,nt)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ht)|0,r=r+Math.imul(S,lt)|0,i=(i=i+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var Rt=(h+(r=r+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;h=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,Q),i=(i=Math.imul(q,tt))+Math.imul(L,Q)|0,o=Math.imul(L,tt),r=r+Math.imul(U,nt)|0,i=(i=i+Math.imul(U,rt)|0)+Math.imul(O,nt)|0,o=o+Math.imul(O,rt)|0,r=r+Math.imul(B,ot)|0,i=(i=i+Math.imul(B,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ht)|0,r=r+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,dt)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,dt)|0;var It=(h+(r=r+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;h=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,nt),i=(i=Math.imul(q,rt))+Math.imul(L,nt)|0,o=Math.imul(L,rt),r=r+Math.imul(U,ot)|0,i=(i=i+Math.imul(U,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,r=r+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,ht)|0)+Math.imul(D,ut)|0,o=o+Math.imul(D,ht)|0,r=r+Math.imul(I,lt)|0,i=(i=i+Math.imul(I,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(h+(r=r+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,mt)|0)+Math.imul(x,pt)|0))<<13)|0;h=((o=o+Math.imul(x,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),i=(i=Math.imul(q,st))+Math.imul(L,ot)|0,o=Math.imul(L,st),r=r+Math.imul(U,ut)|0,i=(i=i+Math.imul(U,ht)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,ht)|0,r=r+Math.imul(B,lt)|0,i=(i=i+Math.imul(B,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Ct=(h+(r=r+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(T,pt)|0))<<13)|0;h=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(q,ut),i=(i=Math.imul(q,ht))+Math.imul(L,ut)|0,o=Math.imul(L,ht),r=r+Math.imul(U,lt)|0,i=(i=i+Math.imul(U,dt)|0)+Math.imul(O,lt)|0,o=o+Math.imul(O,dt)|0;var Bt=(h+(r=r+Math.imul(B,pt)|0)|0)+((8191&(i=(i=i+Math.imul(B,mt)|0)+Math.imul(D,pt)|0))<<13)|0;h=((o=o+Math.imul(D,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,lt),i=(i=Math.imul(q,dt))+Math.imul(L,lt)|0,o=Math.imul(L,dt);var Dt=(h+(r=r+Math.imul(U,pt)|0)|0)+((8191&(i=(i=i+Math.imul(U,mt)|0)+Math.imul(O,pt)|0))<<13)|0;h=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Pt=(h+(r=Math.imul(q,pt))|0)+((8191&(i=(i=Math.imul(q,mt))+Math.imul(L,pt)|0))<<13)|0;return h=((o=Math.imul(L,mt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=gt,u[1]=vt,u[2]=bt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=St,u[8]=Et,u[9]=At,u[10]=kt,u[11]=xt,u[12]=Rt,u[13]=It,u[14]=Tt,u[15]=Ct,u[16]=Bt,u[17]=Dt,u[18]=Pt,0!==h&&(u[19]=h,n.length++),n};function m(t,e,n){return(new g).mulp(t,e,n)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=f),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):n<63?f(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,u=Math.min(o,e.length-1),h=Math.max(0,o-t.length+1);h<=u;h++){var c=o-h,l=(0|t.words[c])*(0|e.words[h]),d=67108863&l;a=67108863&(d=d+a|0),i+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):m(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,n,t);return e},g.prototype.revBin=function(t,e,n){if(0===t||t===n-1)return t;for(var r=0,i=0;i<e;i++)r|=(1&t)<<e-i-1,t>>=1;return r},g.prototype.permute=function(t,e,n,r,i,o){for(var s=0;s<o;s++)r[s]=e[t[s]],i[s]=n[t[s]]},g.prototype.transform=function(t,e,n,r,i,o){this.permute(o,t,e,n,r,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),h=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var l=u,d=h,f=0;f<s;f++){var p=n[c+f],m=r[c+f],g=n[c+f+s],v=r[c+f+s],b=l*g-d*v;v=l*v+d*g,g=b,n[c+f]=p+g,r[c+f]=m+v,n[c+f+s]=p-g,r[c+f+s]=m-v,f!==a&&(b=u*l-h*d,d=u*d+h*l,l=b)}},g.prototype.guessLen13b=function(t,e){var n=1|Math.max(e,t),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},g.prototype.conjugate=function(t,e,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=t[r];t[r]=t[n-r-1],t[n-r-1]=i,i=e[r],e[r]=-e[n-r-1],e[n-r-1]=-i}},g.prototype.normalize13b=function(t,e){for(var n=0,r=0;r<e/2;r++){var i=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+n;t[r]=67108863&i,n=i<67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,n,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],n[2*s]=8191&o,o>>>=13,n[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)n[s]=0;r(0===o),r(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=0;return e},g.prototype.mulp=function(t,e,n){var r=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(r),o=this.stub(r),s=new Array(r),a=new Array(r),u=new Array(r),h=new Array(r),c=new Array(r),l=new Array(r),d=n.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,h,r),this.transform(s,o,a,u,r,i),this.transform(h,o,c,l,r,i);for(var f=0;f<r;f++){var p=a[f]*c[f]-u[f]*l[f];u[f]=a[f]*l[f]+u[f]*c[f],a[f]=p}return this.conjugate(a,u,r),this.transform(a,u,d,o,r,i),this.conjugate(d,o,r),this.normalize13b(d,r),n.negative=t.negative^e.negative,n.length=t.length+e.length,n.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){r("number"==typeof t),r(t<67108864);for(var e=0,n=0;n<this.length;n++){var i=(0|this.words[n])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=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()),n=0;n<e.length;n++){var r=n/26|0,i=n%26;e[n]=(t.words[r]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r<e.length&&0===e[r];r++,n=n.sqr());if(++r<e.length)for(var i=n.sqr();r<e.length;r++,i=i.sqr())0!==e[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<n;this.words[e]=u|s,s=a>>>26-n}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 r(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,n){var i;r("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=n;if(i-=s,i=Math.max(0,i),u){for(var h=0;h<s;h++)u.words[h]=this.words[h];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,h=0;h<this.length;h++)this.words[h]=this.words[h+s];else this.words[0]=0,this.length=1;var c=0;for(h=this.length-1;h>=0&&(0!==c||h>=i);h--){var l=0|this.words[h];this.words[h]=c<<26-o|l>>>o,c=l&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},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){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<<e;return!(this.length<=n||!(this.words[n]&i))},o.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,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 r("number"==typeof t),r(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(r("number"==typeof t),r(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,n){var i,o,s=t.length+n;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+n])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)a=(o=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&o;if(0===a)return this.strip();for(r(-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 n=(this.length,t.length),r=this.clone(),i=t,s=0|i.words[i.length-1];0!=(n=26-this._countBits(s))&&(i=i.ushln(n),r.iushln(n),s=0|i.words[i.length-1]);var a,u=r.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h<a.length;h++)a.words[h]=0}var c=r.clone()._ishlnsubmul(i,1,u);0===c.negative&&(r=c,a&&(a.words[u]=1));for(var l=u-1;l>=0;l--){var d=67108864*(0|r.words[i.length+l])+(0|r.words[i.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(i,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,l),r.isZero()||(r.negative^=1);a&&(a.words[l]=d)}return a&&a.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!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(),n&&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(),n&&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 n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);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){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=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),h=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++h;for(var c=n.clone(),l=e.clone();!e.isZero();){for(var d=0,f=1;0==(e.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(l)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(l)),a.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(a),s.isub(u)):(n.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:n.iushln(h)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var h=0,c=1;0==(e.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,d=1;0==(n.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(n.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(n)>=0?(e.isub(n),s.isub(a)):(n.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(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},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){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,s=n;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,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(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,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){r<i?e=-1:r>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 S(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function b(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 y(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){S.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)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(y,b),y.prototype.split=function(t,e){for(var n=4194303,r=Math.min(t.length,9),i=0;i<r;i++)e.words[i]=t.words[i];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&n,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&n)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n<t.length;n++){var r=0|t.words[n];e+=977*r,t.words[n]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(w,b),i(_,b),i(M,b),M.prototype.imulK=function(t){for(var e=0,n=0;n<t.length;n++){var r=19*(0|t.words[n])+e,i=67108863&r;r>>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new y;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 M}return v[t]=e,e},S.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var l=this.pow(c,i),d=this.pow(t,i.addn(1).iushrn(1)),f=this.pow(t,i),p=s;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<p);var v=this.pow(l,new o(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),f=f.redMul(l),p=g}return d},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=t;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],t);var i=n[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),r=e.length-1;r>=0;r--){for(var h=e.words[r],c=u-1;c>=0;c--){var l=h>>c&1;i!==n[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===r&&0===c)&&(i=this.mul(i,n[s]),a=0,s=0)):a=0}u=26}return i},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new E(t)},i(E,S),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).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)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).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)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=n.nmd(t),this)},9746:t=>{function e(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,n){if(t!=e)throw new Error(n||"Assertion failed: "+t+" != "+e)}},4504:(t,e)=>{"use strict";var n=e;function r(t){return 1===t.length?"0"+t:t}function i(t){for(var e="",n=0;n<t.length;n++)e+=r(t[n].toString(16));return e}n.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"!=typeof t){for(var r=0;r<t.length;r++)n[r]=0|t[r];return n}if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),r=0;r<t.length;r+=2)n.push(parseInt(t[r]+t[r+1],16));else for(r=0;r<t.length;r++){var i=t.charCodeAt(r),o=i>>8,s=255&i;o?n.push(o,s):n.push(s)}return n},n.zero2=r,n.toHex=i,n.encode=function(t,e){return"hex"===e?i(t):t}},873: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"}')},2818:(t,e,n)=>{"use strict";var r=n(9809);e.certificate=n(1934);var i=r.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=r.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));e.RSAPublicKey=o;var s=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())}));e.PublicKey=s;var a=r.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=r.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(a),this.key("subjectPrivateKey").octstr())}));e.PrivateKey=u;var h=r.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=h;var c=r.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=c,e.DSAparam=r.define("DSAparam",(function(){this.int()}));var l=r.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(d),this.key("publicKey").optional().explicit(1).bitstr())}));e.ECPrivateKey=l;var d=r.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));e.signature=r.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},1934:(t,e,n)=>{"use strict";var r=n(9809),i=r.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=r.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),s=r.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),a=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())})),u=r.define("RelativeDistinguishedName",(function(){this.setof(o)})),h=r.define("RDNSequence",(function(){this.seqof(u)})),c=r.define("Name",(function(){this.choice({rdnSequence:this.use(h)})})),l=r.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),d=r.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),f=r.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(c),this.key("validity").use(l),this.key("subject").use(c),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(d).optional())})),p=r.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(f),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())}));t.exports=p},7631:(t,e,n)=>{var r=/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=n(3048),a=n(4696),u=n(9509).Buffer;t.exports=function(t,e){var n,h=t.toString(),c=h.match(r);if(c){var l="aes"+c[1],d=u.from(c[2],"hex"),f=u.from(c[3].replace(/[\r\n]/g,""),"base64"),p=s(e,d.slice(0,8),parseInt(c[1],10)).key,m=[],g=a.createDecipheriv(l,p,d);m.push(g.update(f)),m.push(g.final()),n=u.concat(m)}else{var v=h.match(o);n=u.from(v[2].replace(/[\r\n]/g,""),"base64")}return{tag:h.match(i)[1],data:n}}},980:(t,e,n)=>{var r=n(2818),i=n(873),o=n(7631),s=n(4696),a=n(5632),u=n(9509).Buffer;function h(t){var e;"object"!=typeof t||u.isBuffer(t)||(e=t.passphrase,t=t.key),"string"==typeof t&&(t=u.from(t));var n,h,c=o(t,e),l=c.tag,d=c.data;switch(l){case"CERTIFICATE":h=r.certificate.decode(d,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(h||(h=r.PublicKey.decode(d,"der")),n=h.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(h.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return h.subjectPrivateKey=h.subjectPublicKey,{type:"ec",data:h};case"1.2.840.10040.4.1":return h.algorithm.params.pub_key=r.DSAparam.decode(h.subjectPublicKey.data,"der"),{type:"dsa",data:h.algorithm.params};default:throw new Error("unknown key id "+n)}case"ENCRYPTED PRIVATE KEY":d=function(t,e){var n=t.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=i[t.algorithm.decrypt.cipher.algo.join(".")],h=t.algorithm.decrypt.cipher.iv,c=t.subjectPrivateKey,l=parseInt(o.split("-")[1],10)/8,d=a.pbkdf2Sync(e,n,r,l,"sha1"),f=s.createDecipheriv(o,d,h),p=[];return p.push(f.update(c)),p.push(f.final()),u.concat(p)}(d=r.EncryptedPrivateKey.decode(d,"der"),e);case"PRIVATE KEY":switch(n=(h=r.PrivateKey.decode(d,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(h.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:h.algorithm.curve,privateKey:r.ECPrivateKey.decode(h.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return h.algorithm.params.priv_key=r.DSAparam.decode(h.subjectPrivateKey,"der"),{type:"dsa",params:h.algorithm.params};default:throw new Error("unknown key id "+n)}case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(d,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(d,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(d,"der")};case"EC PRIVATE KEY":return{curve:(d=r.ECPrivateKey.decode(d,"der")).parameters.value,privateKey:d.privateKey};default:throw new Error("unknown key type "+l)}}t.exports=h,h.signature=r.signature},5632:(t,e,n)=>{e.pbkdf2=n(8638),e.pbkdf2Sync=n(1257)},8638:(t,e,n)=>{var r,i,o=n(9509).Buffer,s=n(7357),a=n(2368),u=n(1257),h=n(7777),c=n.g.crypto&&n.g.crypto.subtle,l={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"},d=[];function f(){return i||(i=n.g.process&&n.g.process.nextTick?n.g.process.nextTick:n.g.queueMicrotask?n.g.queueMicrotask:n.g.setImmediate?n.g.setImmediate:n.g.setTimeout)}function p(t,e,n,r,i){return c.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then((function(t){return c.deriveBits({name:"PBKDF2",salt:e,iterations:n,hash:{name:i}},t,r<<3)})).then((function(t){return o.from(t)}))}t.exports=function(t,e,i,m,g,v){"function"==typeof g&&(v=g,g=void 0);var b=l[(g=g||"sha1").toLowerCase()];if(b&&"function"==typeof n.g.Promise){if(s(i,m),t=h(t,a,"Password"),e=h(e,a,"Salt"),"function"!=typeof v)throw new Error("No callback provided to pbkdf2");!function(t,e){t.then((function(t){f()((function(){e(null,t)}))}),(function(t){f()((function(){e(t)}))}))}(function(t){if(n.g.process&&!n.g.process.browser)return Promise.resolve(!1);if(!c||!c.importKey||!c.deriveBits)return Promise.resolve(!1);if(void 0!==d[t])return d[t];var e=p(r=r||o.alloc(8),r,10,128,t).then((function(){return!0})).catch((function(){return!1}));return d[t]=e,e}(b).then((function(n){return n?p(t,e,i,m,b):u(t,e,i,m,g)})),v)}else f()((function(){var n;try{n=u(t,e,i,m,g)}catch(t){return v(t)}v(null,n)}))}},2368:(t,e,n)=>{var r,i=n(4155);r=n.g.process&&n.g.process.browser?"utf-8":n.g.process&&n.g.process.version?parseInt(i.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",t.exports=r},7357:t=>{var e=Math.pow(2,30)-1;t.exports=function(t,n){if("number"!=typeof t)throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if("number"!=typeof n)throw new TypeError("Key length not a number");if(n<0||n>e||n!=n)throw new TypeError("Bad key length")}},1257:(t,e,n)=>{var r=n(8028),i=n(9785),o=n(9072),s=n(9509).Buffer,a=n(7357),u=n(2368),h=n(7777),c=s.alloc(128),l={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function d(t,e,n){var a=function(t){return"rmd160"===t||"ripemd160"===t?function(t){return(new i).update(t).digest()}:"md5"===t?r: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,c],u));for(var h=s.allocUnsafe(u+l[t]),d=s.allocUnsafe(u+l[t]),f=0;f<u;f++)h[f]=54^e[f],d[f]=92^e[f];var p=s.allocUnsafe(u+n+4);h.copy(p,0,0,u),this.ipad1=p,this.ipad2=h,this.opad=d,this.alg=t,this.blocksize=u,this.hash=a,this.size=l[t]}d.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,n,r,i){a(n,r);var o=new d(i=i||"sha1",t=h(t,u,"Password"),(e=h(e,u,"Salt")).length),c=s.allocUnsafe(r),f=s.allocUnsafe(e.length+4);e.copy(f,0,0,e.length);for(var p=0,m=l[i],g=Math.ceil(r/m),v=1;v<=g;v++){f.writeUInt32BE(v,e.length);for(var b=o.run(f,o.ipad1),y=b,w=1;w<n;w++){y=o.run(y,o.ipad2);for(var _=0;_<m;_++)b[_]^=y[_]}b.copy(c,p),p+=m}return c}},7777:(t,e,n)=>{var r=n(9509).Buffer;t.exports=function(t,e,n){if(r.isBuffer(t))return t;if("string"==typeof t)return r.from(t,e);if(ArrayBuffer.isView(t))return r.from(t.buffer);throw new TypeError(n+" must be a string, a Buffer, a typed array or a DataView")}},4155:t=>{var e,n,r=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(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var a,u=[],h=!1,c=-1;function l(){h&&a&&(h=!1,a.length?u=a.concat(u):c=-1,u.length&&d())}function d(){if(!h){var t=s(l);h=!0;for(var e=u.length;e;){for(a=u,u=[];++c<e;)a&&a[c].run();c=-1,e=u.length}a=null,h=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function p(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new f(t,e)),1!==u.length||h||s(d)},f.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=p,r.addListener=p,r.once=p,r.off=p,r.removeListener=p,r.removeAllListeners=p,r.emit=p,r.prependListener=p,r.prependOnceListener=p,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},7900:(t,e,n)=>{e.publicEncrypt=n(6559),e.privateDecrypt=n(6138),e.privateEncrypt=function(t,n){return e.publicEncrypt(t,n,!0)},e.publicDecrypt=function(t,n){return e.privateDecrypt(t,n,!0)}},9199:(t,e,n)=>{var r=n(3482),i=n(9509).Buffer;function o(t){var e=i.allocUnsafe(4);return e.writeUInt32BE(t,0),e}t.exports=function(t,e){for(var n,s=i.alloc(0),a=0;s.length<e;)n=o(a++),s=i.concat([s,r("sha1").update(t).update(n).digest()]);return s.slice(0,e)}},2144:function(t,e,n){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"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:n(7108).Buffer}catch(t){}function a(t,e){var n=t.charCodeAt(e);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function u(t,e,n){var r=a(t,n);return n-1>=e&&(r|=a(t,n-1)<<4),r}function h(t,e,n,r){for(var i=0,o=Math.min(t.length,n),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=r,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,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(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,n):(this._parseBase(t,e,i),"le"===n&&this._initArray(this.toArray(),e,n)))},o.prototype._initNumber=function(t,e,n){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):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initArray=function(t,e,n){if(r("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"===n)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"===n)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,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,o=0,s=0;if("be"===n)for(r=t.length-1;r>=e;r-=2)i=u(t,e,r)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)i=u(t,e,r)<<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,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,s=o%r,a=Math.min(o,o-s)+n,u=0,c=n;c<a;c+=r)u=h(t,c,c+r,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var l=1;for(u=h(t,c,t.length,e),c=0;c<s;c++)l*=e;this.imuln(l),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 c=["","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"],l=[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 f(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;n.words[0]=a;for(var h=1;h<r;h++){for(var c=u>>>26,l=67108863&u,d=Math.min(h,e.length-1),f=Math.max(0,h-t.length+1);f<=d;f++){var p=h-f|0;c+=(s=(i=0|t.words[p])*(o=0|e.words[f])+l)/67108864|0,l=67108863&s}n.words[h]=0|l,u=0|c}return 0!==u?n.words[h]=0|u:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);n=0!=(o=a>>>24-i&16777215)||s!==this.length-1?c[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var h=l[t],f=d[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(t);n=(p=p.idivn(f)).isZero()?m+n:c[h-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!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&&r(!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 r(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,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,h=new t(o),c=this.clone();if(u){for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[a]=s;for(;a<o;a++)h[a]=0}else{for(a=0;a<o-i;a++)h[a]=0;for(a=0;!c.isZero();a++)s=c.andln(255),c.iushrn(8),h[o-a-1]=s}return h},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},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 n=this._zeroBits(this.words[e]);if(t+=n,26!==n)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 r(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 n=0;n<e.length;n++)this.words[n]=this.words[n]&t.words[n];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return r(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,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;r<n.length;r++)this.words[r]=e.words[r]^n.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return r(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){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,n,r;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?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o<r.length;o++)e=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<n.length;o++)e=(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.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 n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,s=0;s<r.length;s++)o=(e=(0|n.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<n.length;s++)o=(e=(0|n.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<n.length&&n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this.length=Math.max(this.length,s),n!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,n){var r,i,o,s=t.words,a=e.words,u=n.words,h=0,c=0|s[0],l=8191&c,d=c>>>13,f=0|s[1],p=8191&f,m=f>>>13,g=0|s[2],v=8191&g,b=g>>>13,y=0|s[3],w=8191&y,_=y>>>13,M=0|s[4],S=8191&M,E=M>>>13,A=0|s[5],k=8191&A,x=A>>>13,R=0|s[6],I=8191&R,T=R>>>13,C=0|s[7],B=8191&C,D=C>>>13,P=0|s[8],U=8191&P,O=P>>>13,N=0|s[9],q=8191&N,L=N>>>13,j=0|a[0],K=8191&j,$=j>>>13,z=0|a[1],H=8191&z,W=z>>>13,V=0|a[2],F=8191&V,J=V>>>13,G=0|a[3],Z=8191&G,Y=G>>>13,X=0|a[4],Q=8191&X,tt=X>>>13,et=0|a[5],nt=8191&et,rt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ht=at>>>13,ct=0|a[8],lt=8191&ct,dt=ct>>>13,ft=0|a[9],pt=8191&ft,mt=ft>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(h+(r=Math.imul(l,K))|0)+((8191&(i=(i=Math.imul(l,$))+Math.imul(d,K)|0))<<13)|0;h=((o=Math.imul(d,$))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,K),i=(i=Math.imul(p,$))+Math.imul(m,K)|0,o=Math.imul(m,$);var vt=(h+(r=r+Math.imul(l,H)|0)|0)+((8191&(i=(i=i+Math.imul(l,W)|0)+Math.imul(d,H)|0))<<13)|0;h=((o=o+Math.imul(d,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,K),i=(i=Math.imul(v,$))+Math.imul(b,K)|0,o=Math.imul(b,$),r=r+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var bt=(h+(r=r+Math.imul(l,F)|0)|0)+((8191&(i=(i=i+Math.imul(l,J)|0)+Math.imul(d,F)|0))<<13)|0;h=((o=o+Math.imul(d,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,K),i=(i=Math.imul(w,$))+Math.imul(_,K)|0,o=Math.imul(_,$),r=r+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(b,H)|0,o=o+Math.imul(b,W)|0,r=r+Math.imul(p,F)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,F)|0,o=o+Math.imul(m,J)|0;var yt=(h+(r=r+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,Y)|0)+Math.imul(d,Z)|0))<<13)|0;h=((o=o+Math.imul(d,Y)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(S,K),i=(i=Math.imul(S,$))+Math.imul(E,K)|0,o=Math.imul(E,$),r=r+Math.imul(w,H)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,r=r+Math.imul(v,F)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(b,F)|0,o=o+Math.imul(b,J)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,Y)|0;var wt=(h+(r=r+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(d,Q)|0))<<13)|0;h=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(k,K),i=(i=Math.imul(k,$))+Math.imul(x,K)|0,o=Math.imul(x,$),r=r+Math.imul(S,H)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(E,H)|0,o=o+Math.imul(E,W)|0,r=r+Math.imul(w,F)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,F)|0,o=o+Math.imul(_,J)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,Y)|0)+Math.imul(b,Z)|0,o=o+Math.imul(b,Y)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var _t=(h+(r=r+Math.imul(l,nt)|0)|0)+((8191&(i=(i=i+Math.imul(l,rt)|0)+Math.imul(d,nt)|0))<<13)|0;h=((o=o+Math.imul(d,rt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(I,K),i=(i=Math.imul(I,$))+Math.imul(T,K)|0,o=Math.imul(T,$),r=r+Math.imul(k,H)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,W)|0,r=r+Math.imul(S,F)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(E,F)|0,o=o+Math.imul(E,J)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,Y)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var Mt=(h+(r=r+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,st)|0)+Math.imul(d,ot)|0))<<13)|0;h=((o=o+Math.imul(d,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(B,K),i=(i=Math.imul(B,$))+Math.imul(D,K)|0,o=Math.imul(D,$),r=r+Math.imul(I,H)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(T,H)|0,o=o+Math.imul(T,W)|0,r=r+Math.imul(k,F)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(x,F)|0,o=o+Math.imul(x,J)|0,r=r+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,Y)|0)+Math.imul(E,Z)|0,o=o+Math.imul(E,Y)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(v,nt)|0,i=(i=i+Math.imul(v,rt)|0)+Math.imul(b,nt)|0,o=o+Math.imul(b,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(h+(r=r+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(d,ut)|0))<<13)|0;h=((o=o+Math.imul(d,ht)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(U,K),i=(i=Math.imul(U,$))+Math.imul(O,K)|0,o=Math.imul(O,$),r=r+Math.imul(B,H)|0,i=(i=i+Math.imul(B,W)|0)+Math.imul(D,H)|0,o=o+Math.imul(D,W)|0,r=r+Math.imul(I,F)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(T,F)|0,o=o+Math.imul(T,J)|0,r=r+Math.imul(k,Z)|0,i=(i=i+Math.imul(k,Y)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Y)|0,r=r+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(w,nt)|0,i=(i=i+Math.imul(w,rt)|0)+Math.imul(_,nt)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ht)|0;var Et=(h+(r=r+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;h=((o=o+Math.imul(d,dt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(q,K),i=(i=Math.imul(q,$))+Math.imul(L,K)|0,o=Math.imul(L,$),r=r+Math.imul(U,H)|0,i=(i=i+Math.imul(U,W)|0)+Math.imul(O,H)|0,o=o+Math.imul(O,W)|0,r=r+Math.imul(B,F)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(D,F)|0,o=o+Math.imul(D,J)|0,r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,Y)|0,r=r+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,tt)|0,r=r+Math.imul(S,nt)|0,i=(i=i+Math.imul(S,rt)|0)+Math.imul(E,nt)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,r=r+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(b,ut)|0,o=o+Math.imul(b,ht)|0,r=r+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,dt)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,dt)|0;var At=(h+(r=r+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,mt)|0)+Math.imul(d,pt)|0))<<13)|0;h=((o=o+Math.imul(d,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(q,H),i=(i=Math.imul(q,W))+Math.imul(L,H)|0,o=Math.imul(L,W),r=r+Math.imul(U,F)|0,i=(i=i+Math.imul(U,J)|0)+Math.imul(O,F)|0,o=o+Math.imul(O,J)|0,r=r+Math.imul(B,Z)|0,i=(i=i+Math.imul(B,Y)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,Y)|0,r=r+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(k,nt)|0,i=(i=i+Math.imul(k,rt)|0)+Math.imul(x,nt)|0,o=o+Math.imul(x,rt)|0,r=r+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,r=r+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ht)|0,r=r+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,dt)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,dt)|0;var kt=(h+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;h=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(q,F),i=(i=Math.imul(q,J))+Math.imul(L,F)|0,o=Math.imul(L,J),r=r+Math.imul(U,Z)|0,i=(i=i+Math.imul(U,Y)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,Y)|0,r=r+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,tt)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(I,nt)|0,i=(i=i+Math.imul(I,rt)|0)+Math.imul(T,nt)|0,o=o+Math.imul(T,rt)|0,r=r+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,r=r+Math.imul(S,ut)|0,i=(i=i+Math.imul(S,ht)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ht)|0,r=r+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,dt)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,dt)|0;var xt=(h+(r=r+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(b,pt)|0))<<13)|0;h=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(q,Z),i=(i=Math.imul(q,Y))+Math.imul(L,Z)|0,o=Math.imul(L,Y),r=r+Math.imul(U,Q)|0,i=(i=i+Math.imul(U,tt)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,tt)|0,r=r+Math.imul(B,nt)|0,i=(i=i+Math.imul(B,rt)|0)+Math.imul(D,nt)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,r=r+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ht)|0,r=r+Math.imul(S,lt)|0,i=(i=i+Math.imul(S,dt)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,dt)|0;var Rt=(h+(r=r+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;h=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,r=Math.imul(q,Q),i=(i=Math.imul(q,tt))+Math.imul(L,Q)|0,o=Math.imul(L,tt),r=r+Math.imul(U,nt)|0,i=(i=i+Math.imul(U,rt)|0)+Math.imul(O,nt)|0,o=o+Math.imul(O,rt)|0,r=r+Math.imul(B,ot)|0,i=(i=i+Math.imul(B,st)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,st)|0,r=r+Math.imul(I,ut)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ht)|0,r=r+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,dt)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,dt)|0;var It=(h+(r=r+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;h=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(q,nt),i=(i=Math.imul(q,rt))+Math.imul(L,nt)|0,o=Math.imul(L,rt),r=r+Math.imul(U,ot)|0,i=(i=i+Math.imul(U,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,r=r+Math.imul(B,ut)|0,i=(i=i+Math.imul(B,ht)|0)+Math.imul(D,ut)|0,o=o+Math.imul(D,ht)|0,r=r+Math.imul(I,lt)|0,i=(i=i+Math.imul(I,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var Tt=(h+(r=r+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,mt)|0)+Math.imul(x,pt)|0))<<13)|0;h=((o=o+Math.imul(x,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(q,ot),i=(i=Math.imul(q,st))+Math.imul(L,ot)|0,o=Math.imul(L,st),r=r+Math.imul(U,ut)|0,i=(i=i+Math.imul(U,ht)|0)+Math.imul(O,ut)|0,o=o+Math.imul(O,ht)|0,r=r+Math.imul(B,lt)|0,i=(i=i+Math.imul(B,dt)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,dt)|0;var Ct=(h+(r=r+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(T,pt)|0))<<13)|0;h=((o=o+Math.imul(T,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(q,ut),i=(i=Math.imul(q,ht))+Math.imul(L,ut)|0,o=Math.imul(L,ht),r=r+Math.imul(U,lt)|0,i=(i=i+Math.imul(U,dt)|0)+Math.imul(O,lt)|0,o=o+Math.imul(O,dt)|0;var Bt=(h+(r=r+Math.imul(B,pt)|0)|0)+((8191&(i=(i=i+Math.imul(B,mt)|0)+Math.imul(D,pt)|0))<<13)|0;h=((o=o+Math.imul(D,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,r=Math.imul(q,lt),i=(i=Math.imul(q,dt))+Math.imul(L,lt)|0,o=Math.imul(L,dt);var Dt=(h+(r=r+Math.imul(U,pt)|0)|0)+((8191&(i=(i=i+Math.imul(U,mt)|0)+Math.imul(O,pt)|0))<<13)|0;h=((o=o+Math.imul(O,mt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863;var Pt=(h+(r=Math.imul(q,pt))|0)+((8191&(i=(i=Math.imul(q,mt))+Math.imul(L,pt)|0))<<13)|0;return h=((o=Math.imul(L,mt))+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,u[0]=gt,u[1]=vt,u[2]=bt,u[3]=yt,u[4]=wt,u[5]=_t,u[6]=Mt,u[7]=St,u[8]=Et,u[9]=At,u[10]=kt,u[11]=xt,u[12]=Rt,u[13]=It,u[14]=Tt,u[15]=Ct,u[16]=Bt,u[17]=Dt,u[18]=Pt,0!==h&&(u[19]=h,n.length++),n};function m(t,e,n){return(new g).mulp(t,e,n)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=f),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):n<63?f(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var s=i;i=0;for(var a=67108863&r,u=Math.min(o,e.length-1),h=Math.max(0,o-t.length+1);h<=u;h++){var c=o-h,l=(0|t.words[c])*(0|e.words[h]),d=67108863&l;a=67108863&(d=d+a|0),i+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}n.words[o]=a,r=s,s=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):m(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,n,t);return e},g.prototype.revBin=function(t,e,n){if(0===t||t===n-1)return t;for(var r=0,i=0;i<e;i++)r|=(1&t)<<e-i-1,t>>=1;return r},g.prototype.permute=function(t,e,n,r,i,o){for(var s=0;s<o;s++)r[s]=e[t[s]],i[s]=n[t[s]]},g.prototype.transform=function(t,e,n,r,i,o){this.permute(o,t,e,n,r,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),h=Math.sin(2*Math.PI/a),c=0;c<i;c+=a)for(var l=u,d=h,f=0;f<s;f++){var p=n[c+f],m=r[c+f],g=n[c+f+s],v=r[c+f+s],b=l*g-d*v;v=l*v+d*g,g=b,n[c+f]=p+g,r[c+f]=m+v,n[c+f+s]=p-g,r[c+f+s]=m-v,f!==a&&(b=u*l-h*d,d=u*d+h*l,l=b)}},g.prototype.guessLen13b=function(t,e){var n=1|Math.max(e,t),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},g.prototype.conjugate=function(t,e,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=t[r];t[r]=t[n-r-1],t[n-r-1]=i,i=e[r],e[r]=-e[n-r-1],e[n-r-1]=-i}},g.prototype.normalize13b=function(t,e){for(var n=0,r=0;r<e/2;r++){var i=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+n;t[r]=67108863&i,n=i<67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,n,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],n[2*s]=8191&o,o>>>=13,n[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)n[s]=0;r(0===o),r(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=0;return e},g.prototype.mulp=function(t,e,n){var r=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(r),o=this.stub(r),s=new Array(r),a=new Array(r),u=new Array(r),h=new Array(r),c=new Array(r),l=new Array(r),d=n.words;d.length=r,this.convert13b(t.words,t.length,s,r),this.convert13b(e.words,e.length,h,r),this.transform(s,o,a,u,r,i),this.transform(h,o,c,l,r,i);for(var f=0;f<r;f++){var p=a[f]*c[f]-u[f]*l[f];u[f]=a[f]*l[f]+u[f]*c[f],a[f]=p}return this.conjugate(a,u,r),this.transform(a,u,d,o,r,i),this.conjugate(d,o,r),this.normalize13b(d,r),n.negative=t.negative^e.negative,n.length=t.length+e.length,n.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){r("number"==typeof t),r(t<67108864);for(var e=0,n=0;n<this.length;n++){var i=(0|this.words[n])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=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()),n=0;n<e.length;n++){var r=n/26|0,i=n%26;e[n]=(t.words[r]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r<e.length&&0===e[r];r++,n=n.sqr());if(++r<e.length)for(var i=n.sqr();r<e.length;r++,i=i.sqr())0!==e[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<n;this.words[e]=u|s,s=a>>>26-n}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 r(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,n){var i;r("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=n;if(i-=s,i=Math.max(0,i),u){for(var h=0;h<s;h++)u.words[h]=this.words[h];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,h=0;h<this.length;h++)this.words[h]=this.words[h+s];else this.words[0]=0,this.length=1;var c=0;for(h=this.length-1;h>=0&&(0!==c||h>=i);h--){var l=0|this.words[h];this.words[h]=c<<26-o|l>>>o,c=l&a}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},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){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<<e;return!(this.length<=n||!(this.words[n]&i))},o.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,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 r("number"==typeof t),r(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(r("number"==typeof t),r(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,n){var i,o,s=t.length+n;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+n])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)a=(o=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&o;if(0===a)return this.strip();for(r(-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 n=(this.length,t.length),r=this.clone(),i=t,s=0|i.words[i.length-1];0!=(n=26-this._countBits(s))&&(i=i.ushln(n),r.iushln(n),s=0|i.words[i.length-1]);var a,u=r.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var h=0;h<a.length;h++)a.words[h]=0}var c=r.clone()._ishlnsubmul(i,1,u);0===c.negative&&(r=c,a&&(a.words[u]=1));for(var l=u-1;l>=0;l--){var d=67108864*(0|r.words[i.length+l])+(0|r.words[i.length+l-1]);for(d=Math.min(d/s|0,67108863),r._ishlnsubmul(i,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,l),r.isZero()||(r.negative^=1);a&&(a.words[l]=d)}return a&&a.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!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(),n&&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(),n&&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 n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);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){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=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),h=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++h;for(var c=n.clone(),l=e.clone();!e.isZero();){for(var d=0,f=1;0==(e.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(c),s.isub(l)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(c),u.isub(l)),a.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(a),s.isub(u)):(n.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:n.iushln(h)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var h=0,c=1;0==(e.words[0]&c)&&h<26;++h,c<<=1);if(h>0)for(e.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var l=0,d=1;0==(n.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(n.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(n)>=0?(e.isub(n),s.isub(a)):(n.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(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},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){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,s=n;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,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(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,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){r<i?e=-1:r>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 S(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(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 r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function b(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 y(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){S.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)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(y,b),y.prototype.split=function(t,e){for(var n=4194303,r=Math.min(t.length,9),i=0;i<r;i++)e.words[i]=t.words[i];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&n,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&n)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n<t.length;n++){var r=0|t.words[n];e+=977*r,t.words[n]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(w,b),i(_,b),i(M,b),M.prototype.imulK=function(t){for(var e=0,n=0;n<t.length;n++){var r=19*(0|t.words[n])+e,i=67108863&r;r>>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new y;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 M}return v[t]=e,e},S.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);r(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),h=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,h).cmp(u);)c.redIAdd(u);for(var l=this.pow(c,i),d=this.pow(t,i.addn(1).iushrn(1)),f=this.pow(t,i),p=s;0!==f.cmp(a);){for(var m=f,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g<p);var v=this.pow(l,new o(1).iushln(p-g-1));d=d.redMul(v),l=v.redSqr(),f=f.redMul(l),p=g}return d},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=t;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],t);var i=n[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),r=e.length-1;r>=0;r--){for(var h=e.words[r],c=u-1;c>=0;c--){var l=h>>c&1;i!==n[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===r&&0===c)&&(i=this.mul(i,n[s]),a=0,s=0)):a=0}u=26}return i},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new E(t)},i(E,S),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).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)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).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)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=n.nmd(t),this)},6138:(t,e,n)=>{var r=n(980),i=n(9199),o=n(7859),s=n(2144),a=n(3663),u=n(3482),h=n(4818),c=n(9509).Buffer;t.exports=function(t,e,n){var l;l=t.padding?t.padding:n?1:4;var d,f=r(t),p=f.modulus.byteLength();if(e.length>p||new s(e).cmp(f.modulus)>=0)throw new Error("decryption error");d=n?h(new s(e),f):a(e,f);var m=c.alloc(p-d.length);if(d=c.concat([m,d],p),4===l)return function(t,e){var n=t.modulus.byteLength(),r=u("sha1").update(c.alloc(0)).digest(),s=r.length;if(0!==e[0])throw new Error("decryption error");var a=e.slice(1,s+1),h=e.slice(s+1),l=o(a,i(h,s)),d=o(h,i(l,n-s-1));if(function(t,e){t=c.from(t),e=c.from(e);var n=0,r=t.length;t.length!==e.length&&(n++,r=Math.min(t.length,e.length));for(var i=-1;++i<r;)n+=t[i]^e[i];return n}(r,d.slice(0,s)))throw new Error("decryption error");for(var f=s;0===d[f];)f++;if(1!==d[f++])throw new Error("decryption error");return d.slice(f)}(f,d);if(1===l)return function(t,e,n){for(var r=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"!==r.toString("hex")&&!n||"0001"!==r.toString("hex")&&n)&&o++,s.length<8&&o++,o)throw new Error("decryption error");return e.slice(i)}(0,d,n);if(3===l)return d;throw new Error("unknown padding")}},6559:(t,e,n)=>{var r=n(980),i=n(1798),o=n(3482),s=n(9199),a=n(7859),u=n(2144),h=n(4818),c=n(3663),l=n(9509).Buffer;t.exports=function(t,e,n){var d;d=t.padding?t.padding:n?1:4;var f,p=r(t);if(4===d)f=function(t,e){var n=t.modulus.byteLength(),r=e.length,h=o("sha1").update(l.alloc(0)).digest(),c=h.length,d=2*c;if(r>n-d-2)throw new Error("message too long");var f=l.alloc(n-r-d-2),p=n-c-1,m=i(c),g=a(l.concat([h,f,l.alloc(1,1),e],p),s(m,p)),v=a(m,s(g,c));return new u(l.concat([l.alloc(1),v,g],n))}(p,e);else if(1===d)f=function(t,e,n){var r,o=e.length,s=t.modulus.byteLength();if(o>s-11)throw new Error("message too long");return r=n?l.alloc(s-o-3,255):function(t){for(var e,n=l.allocUnsafe(t),r=0,o=i(2*t),s=0;r<t;)s===o.length&&(o=i(2*t),s=0),(e=o[s++])&&(n[r++]=e);return n}(s-o-3),new u(l.concat([l.from([0,n?1:2]),r,l.alloc(1),e],s))}(p,e,n);else{if(3!==d)throw new Error("unknown padding");if((f=new u(e)).cmp(p.modulus)>=0)throw new Error("data too long for modulus")}return n?c(f,p):h(f,p)}},4818:(t,e,n)=>{var r=n(2144),i=n(9509).Buffer;t.exports=function(t,e){return i.from(t.toRed(r.mont(e.modulus)).redPow(new r(e.publicExponent)).fromRed().toArray())}},7859:t=>{t.exports=function(t,e){for(var n=t.length,r=-1;++r<n;)t[r]^=e[r];return t}},1798:(t,e,n)=>{"use strict";var r=n(4155),i=65536,o=n(9509).Buffer,s=n.g.crypto||n.g.msCrypto;s&&s.getRandomValues?t.exports=function(t,e){if(t>4294967295)throw new RangeError("requested too many random bytes");var n=o.allocUnsafe(t);if(t>0)if(t>i)for(var a=0;a<t;a+=i)s.getRandomValues(n.slice(a,a+i));else s.getRandomValues(n);return"function"==typeof e?r.nextTick((function(){e(null,n)})):n}:t.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}},7963:(t,e,n)=>{"use strict";var r=n(4155);function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=n(9509),s=n(1798),a=o.Buffer,u=o.kMaxLength,h=n.g.crypto||n.g.msCrypto,c=Math.pow(2,32)-1;function l(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(t>c||t<0)throw new TypeError("offset must be a uint32");if(t>u||t>e)throw new RangeError("offset out of range")}function d(t,e,n){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>c||t<0)throw new TypeError("size must be a uint32");if(t+e>n||t>u)throw new RangeError("buffer too small")}function f(t,e,n,i){if(r.browser){var o=t.buffer,a=new Uint8Array(o,e,n);return h.getRandomValues(a),i?void r.nextTick((function(){i(null,t)})):t}if(!i)return s(n).copy(t,e),t;s(n,(function(n,r){if(n)return i(n);r.copy(t,e),i(null,t)}))}h&&h.getRandomValues||!r.browser?(e.randomFill=function(t,e,r,i){if(!(a.isBuffer(t)||t instanceof n.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof e)i=e,e=0,r=t.length;else if("function"==typeof r)i=r,r=t.length-e;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return l(e,t.length),d(r,e,t.length),f(t,e,r,i)},e.randomFillSync=function(t,e,r){if(void 0===e&&(e=0),!(a.isBuffer(t)||t instanceof n.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return l(e,t.length),void 0===r&&(r=t.length-e),d(r,e,t.length),f(t,e,r)}):(e.randomFill=i,e.randomFillSync=i)},4281:t=>{"use strict";var e={};function n(t,n,r){r||(r=Error);var i=function(t){var e,r;function i(e,r,i){return t.call(this,function(t,e,r){return"string"==typeof n?n:n(t,e,r)}(e,r,i))||this}return r=t,(e=i).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r,i}(r);i.prototype.name=r.name,i.prototype.code=t,e[t]=i}function r(t,e){if(Array.isArray(t)){var n=t.length;return t=t.map((function(t){return String(t)})),n>2?"one of ".concat(e," ").concat(t.slice(0,n-1).join(", "),", or ")+t[n-1]:2===n?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}n("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(t,e,n){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,n){return(void 0===n||n>t.length)&&(n=t.length),t.substring(n-e.length,n)===e}(t," argument"))s="The ".concat(t," ").concat(i," ").concat(r(e,"type"));else{var h=("number"!=typeof u&&(u=0),u+".".length>(a=t).length||-1===a.indexOf(".",u)?"argument":"property");s='The "'.concat(t,'" ').concat(h," ").concat(i," ").concat(r(e,"type"))}return s+". Received type ".concat(typeof n)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=e},6753:(t,e,n)=>{"use strict";var r=n(4155),i=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=c;var o=n(9481),s=n(4229);n(5717)(c,o);for(var a=i(s.prototype),u=0;u<a.length;u++){var h=a[u];c.prototype[h]||(c.prototype[h]=s.prototype[h])}function c(t){if(!(this instanceof c))return new c(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",l)))}function l(){this._writableState.ended||r.nextTick(d,this)}function d(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.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)}})},2725:(t,e,n)=>{"use strict";t.exports=i;var r=n(4605);function i(t){if(!(this instanceof i))return new i(t);r.call(this,t)}n(5717)(i,r),i.prototype._transform=function(t,e,n){n(null,t)}},9481:(t,e,n)=>{"use strict";var r,i=n(4155);t.exports=A,A.ReadableState=E,n(7187).EventEmitter;var o,s=function(t,e){return t.listeners(e).length},a=n(2503),u=n(8764).Buffer,h=n.g.Uint8Array||function(){},c=n(4616);o=c&&c.debuglog?c.debuglog("stream"):function(){};var l,d,f,p=n(7327),m=n(1195),g=n(2457).getHighWaterMark,v=n(4281).q,b=v.ERR_INVALID_ARG_TYPE,y=v.ERR_STREAM_PUSH_AFTER_EOF,w=v.ERR_METHOD_NOT_IMPLEMENTED,_=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(5717)(A,a);var M=m.errorOrDestroy,S=["error","close","destroy","pause","resume"];function E(t,e,i){r=r||n(6753),t=t||{},"boolean"!=typeof i&&(i=e instanceof r),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",i),this.buffer=new p,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&&(l||(l=n(2553).s),this.decoder=new l(t.encoding),this.encoding=t.encoding)}function A(t){if(r=r||n(6753),!(this instanceof A))return new A(t);var e=this instanceof r;this._readableState=new E(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,n,r,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 n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,e.sync?T(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,C(t)))}}(t,a);else if(i||(s=function(t,e){var n,r;return r=e,u.isBuffer(r)||r instanceof h||"string"==typeof e||void 0===e||t.objectMode||(n=new b("chunk",["string","Buffer","Uint8Array"],e)),n}(a,e)),s)M(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)),r)a.endEmitted?M(t,new _):x(t,a,e,!0);else if(a.ended)M(t,new y);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(e=a.decoder.write(e),a.objectMode||0!==e.length?x(t,a,e,!1):B(t,a)):x(t,a,e,!1)}else r||(a.reading=!1,B(t,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function x(t,e,n,r){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",n)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&T(t)),B(t,e)}Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),A.prototype.destroy=m.destroy,A.prototype._undestroy=m.undestroy,A.prototype._destroy=function(t,e){e(t)},A.prototype.push=function(t,e){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof t&&((e=e||r.defaultEncoding)!==r.encoding&&(t=u.from(t,e),e=""),n=!0),k(this,t,e,!1,n)},A.prototype.unshift=function(t){return k(this,t,null,!0,!1)},A.prototype.isPaused=function(){return!1===this._readableState.flowing},A.prototype.setEncoding=function(t){l||(l=n(2553).s);var e=new l(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var R=1073741824;function I(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>=R?t=R:(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(C,t))}function C(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,N(t)}function B(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(D,t,e))}function D(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var n=e.length;if(o("maybeReadMore read 0"),t.read(0),n===e.length)break}e.readingMore=!1}function P(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 U(t){o("readable nexttick read 0"),t.read(0)}function O(t,e){o("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),N(t),e.flowing&&!e.reading&&t.read(0)}function N(t){var e=t._readableState;for(o("flow",e.flowing);e.flowing&&null!==t.read(););}function q(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):n=e.buffer.consume(t,e.decoder),n);var n}function L(t){var e=t._readableState;o("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,i.nextTick(j,e,t))}function j(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 n=e._writableState;(!n||n.autoDestroy&&n.finished)&&e.destroy()}}function K(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}A.prototype.read=function(t){o("read",t),t=parseInt(t,10);var e=this._readableState,n=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?L(this):T(this),null;if(0===(t=I(t,e))&&e.ended)return 0===e.length&&L(this),null;var r,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=I(n,e))),null===(r=t>0?q(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),n!==t&&e.ended&&L(this)),null!==r&&this.emit("data",r),r},A.prototype._read=function(t){M(this,new w("_read()"))},A.prototype.pipe=function(t,e){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=t;break;case 1:r.pipes=[r.pipes,t];break;default:r.pipes.push(t)}r.pipesCount+=1,o("pipe count=%d opts=%j",r.pipesCount,e);var a=e&&!1===e.end||t===i.stdout||t===i.stderr?m:u;function u(){o("onend"),t.end()}r.endEmitted?i.nextTick(a):n.once("end",a),t.on("unpipe",(function e(i,s){o("onunpipe"),i===n&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,o("cleanup"),t.removeListener("close",f),t.removeListener("finish",p),t.removeListener("drain",h),t.removeListener("error",d),t.removeListener("unpipe",e),n.removeListener("end",u),n.removeListener("end",m),n.removeListener("data",l),c=!0,!r.awaitDrain||t._writableState&&!t._writableState.needDrain||h())}));var h=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,N(t))}}(n);t.on("drain",h);var c=!1;function l(e){o("ondata");var i=t.write(e);o("dest.write",i),!1===i&&((1===r.pipesCount&&r.pipes===t||r.pipesCount>1&&-1!==K(r.pipes,t))&&!c&&(o("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function d(e){o("onerror",e),m(),t.removeListener("error",d),0===s(t,"error")&&M(t,e)}function f(){t.removeListener("finish",p),m()}function p(){o("onfinish"),t.removeListener("close",f),m()}function m(){o("unpipe"),n.unpipe(t)}return n.on("data",l),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events.error?Array.isArray(t._events.error)?t._events.error.unshift(n):t._events.error=[n,t._events.error]:t.on(e,n)}(t,"error",d),t.once("close",f),t.once("finish",p),t.emit("pipe",n),r.flowing||(o("pipe resume"),n.resume()),t},A.prototype.unpipe=function(t){var e=this._readableState,n={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,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=K(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,n)),this},A.prototype.on=function(t,e){var n=a.prototype.on.call(this,t,e),r=this._readableState;return"data"===t?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===t&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,o("on readable",r.length,r.reading),r.length?T(this):r.reading||i.nextTick(U,this))),n},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(t,e){var n=a.prototype.removeListener.call(this,t,e);return"readable"===t&&i.nextTick(P,this),n},A.prototype.removeAllListeners=function(t){var e=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||i.nextTick(P,this),e},A.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(O,t,e))}(this,t)),t.paused=!1,this},A.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},A.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(o("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){o("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i||(n.objectMode||i&&i.length)&&(e.push(i)||(r=!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<S.length;s++)t.on(S[s],this.emit.bind(this,S[s]));return this._read=function(e){o("wrapped _read",e),r&&(r=!1,t.resume())},this},"function"==typeof Symbol&&(A.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=n(5850)),d(this)}),Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),A._fromList=q,Object.defineProperty(A.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(A.from=function(t,e){return void 0===f&&(f=n(5167)),f(A,t,e)})},4605:(t,e,n)=>{"use strict";t.exports=c;var r=n(4281).q,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,s=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=r.ERR_TRANSFORM_WITH_LENGTH_0,u=n(6753);function h(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function c(t){if(!(this instanceof c))return new c(t);u.call(this,t),this._transformState={afterTransform:h.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",l)}function l(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?d(this,null,null):this._flush((function(e,n){d(t,e,n)}))}function d(t,e,n){if(e)return t.emit("error",e);if(null!=n&&t.push(n),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}n(5717)(c,u),c.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},c.prototype._transform=function(t,e,n){n(new i("_transform()"))},c.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},c.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))},c.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},4229:(t,e,n)=>{"use strict";var r,i=n(4155);function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(undefined),r=r.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=A,A.WritableState=E;var s,a={deprecate:n(4927)},u=n(2503),h=n(8764).Buffer,c=n.g.Uint8Array||function(){},l=n(1195),d=n(2457).getHighWaterMark,f=n(4281).q,p=f.ERR_INVALID_ARG_TYPE,m=f.ERR_METHOD_NOT_IMPLEMENTED,g=f.ERR_MULTIPLE_CALLBACK,v=f.ERR_STREAM_CANNOT_PIPE,b=f.ERR_STREAM_DESTROYED,y=f.ERR_STREAM_NULL_VALUES,w=f.ERR_STREAM_WRITE_AFTER_END,_=f.ERR_UNKNOWN_ENCODING,M=l.errorOrDestroy;function S(){}function E(t,e,s){r=r||n(6753),t=t||{},"boolean"!=typeof s&&(s=e instanceof r),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=d(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 n=t._writableState,r=n.sync,o=n.writecb;if("function"!=typeof o)throw new g;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,r,o){--e.pendingcb,n?(i.nextTick(o,r),i.nextTick(C,t,e),t._writableState.errorEmitted=!0,M(t,r)):(o(r),t._writableState.errorEmitted=!0,M(t,r),C(t,e))}(t,n,r,e,o);else{var s=I(n)||t.destroyed;s||n.corked||n.bufferProcessing||!n.bufferedRequest||R(t,n),r?i.nextTick(x,t,n,s,o):x(t,n,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 A(t){var e=this instanceof(r=r||n(6753));if(!e&&!s.call(A,this))return new A(t);this._writableState=new E(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,n,r,i,o,s){e.writelen=r,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new b("write")):n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function x(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),C(t,e)}function R(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),s=e.corkedRequestsFree;s.entry=n;for(var a=0,u=!0;n;)i[a]=n,n.isBuf||(u=!1),n=n.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(;n;){var h=n.chunk,c=n.encoding,l=n.callback;if(k(t,e,!1,e.objectMode?1:h.length,h,c,l),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function I(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function T(t,e){t._final((function(n){e.pendingcb--,n&&M(t,n),e.prefinished=!0,t.emit("prefinish"),C(t,e)}))}function C(t,e){var n=I(e);if(n&&(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 r=t._readableState;(!r||r.autoDestroy&&r.endEmitted)&&t.destroy()}return n}n(5717)(A,u),E.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(E.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(A,Symbol.hasInstance,{value:function(t){return!!s.call(this,t)||this===A&&t&&t._writableState instanceof E}})):s=function(t){return t instanceof this},A.prototype.pipe=function(){M(this,new v)},A.prototype.write=function(t,e,n){var r,o=this._writableState,s=!1,a=!o.objectMode&&(r=t,h.isBuffer(r)||r instanceof c);return a&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"==typeof e&&(n=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof n&&(n=S),o.ending?function(t,e){var n=new w;M(t,n),i.nextTick(e,n)}(this,n):(a||function(t,e,n,r){var o;return null===n?o=new y:"string"==typeof n||e.objectMode||(o=new p("chunk",["string","Buffer"],n)),!o||(M(t,o),i.nextTick(r,o),!1)}(this,o,t,n))&&(o.pendingcb++,s=function(t,e,n,r,i,o){if(!n){var s=function(t,e,n){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=h.from(e,n)),e}(e,r,i);r!==s&&(n=!0,i="buffer",r=s)}var a=e.objectMode?1:r.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:r,encoding:i,isBuf:n,callback:o,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else k(t,e,!1,a,r,i,o);return u}(this,o,a,t,e,n)),s},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||R(this,t))},A.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(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(t,e,n){n(new m("_write()"))},A.prototype._writev=null,A.prototype.end=function(t,e,n){var r=this._writableState;return"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||function(t,e,n){e.ending=!0,C(t,e),n&&(e.finished?i.nextTick(n):t.once("finish",n)),e.ended=!0,t.writable=!1}(this,r,n),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),A.prototype.destroy=l.destroy,A.prototype._undestroy=l.undestroy,A.prototype._destroy=function(t,e){e(t)}},5850:(t,e,n)=>{"use strict";var r,i=n(4155);function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s=n(8610),a=Symbol("lastResolve"),u=Symbol("lastReject"),h=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),d=Symbol("handlePromise"),f=Symbol("stream");function p(t,e){return{value:t,done:e}}function m(t){var e=t[a];if(null!==e){var n=t[f].read();null!==n&&(t[l]=null,t[a]=null,t[u]=null,e(p(n,!1)))}}function g(t){i.nextTick(m,t)}var v=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((o(r={get stream(){return this[f]},next:function(){var t=this,e=this[h];if(null!==e)return Promise.reject(e);if(this[c])return Promise.resolve(p(void 0,!0));if(this[f].destroyed)return new Promise((function(e,n){i.nextTick((function(){t[h]?n(t[h]):e(p(void 0,!0))}))}));var n,r=this[l];if(r)n=new Promise(function(t,e){return function(n,r){t.then((function(){e[c]?n(p(void 0,!0)):e[d](n,r)}),r)}}(r,this));else{var o=this[f].read();if(null!==o)return Promise.resolve(p(o,!1));n=new Promise(this[d])}return this[l]=n,n}},Symbol.asyncIterator,(function(){return this})),o(r,"return",(function(){var t=this;return new Promise((function(e,n){t[f].destroy(null,(function(t){t?n(t):e(p(void 0,!0))}))}))})),r),v);t.exports=function(t){var e,n=Object.create(b,(o(e={},f,{value:t,writable:!0}),o(e,a,{value:null,writable:!0}),o(e,u,{value:null,writable:!0}),o(e,h,{value:null,writable:!0}),o(e,c,{value:t._readableState.endEmitted,writable:!0}),o(e,d,{value:function(t,e){var r=n[f].read();r?(n[l]=null,n[a]=null,n[u]=null,t(p(r,!1))):(n[a]=t,n[u]=e)},writable:!0}),e));return n[l]=null,s(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=n[u];return null!==e&&(n[l]=null,n[a]=null,n[u]=null,e(t)),void(n[h]=t)}var r=n[a];null!==r&&(n[l]=null,n[a]=null,n[u]=null,r(p(void 0,!0))),n[c]=!0})),t.on("readable",g.bind(null,n)),n}},7327:(t,e,n)=>{"use strict";function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var s=n(8764).Buffer,a=n(2361).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,n;return e=t,(n=[{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,n=""+e.data;e=e.next;)n+=t+e.data;return n}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,n,r,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,n=i,r=a,s.prototype.copy.call(e,n,r),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var n;return t<this.head.data.length?(n=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):n=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,n=1,r=e.data;for(t-=r.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?r+=i:r+=i.slice(0,t),0==(t-=o)){o===i.length?(++n,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),n=this.head,r=1;for(n.data.copy(e),t-=n.data.length;n=n.next;){var i=n.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=i.slice(o));break}++r}return this.length-=r,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&o(e.prototype,n),t}()},1195:(t,e,n)=>{"use strict";var r=n(4155);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 n=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,r.nextTick(s,this,t)):r.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?n._writableState?n._writableState.errorEmitted?r.nextTick(o,n):(n._writableState.errorEmitted=!0,r.nextTick(i,n,t)):r.nextTick(i,n,t):e?(r.nextTick(o,n),e(t)):r.nextTick(o,n)})),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 n=t._readableState,r=t._writableState;n&&n.autoDestroy||r&&r.autoDestroy?t.destroy(e):t.emit("error",e)}}},8610:(t,e,n)=>{"use strict";var r=n(4281).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,n,o){if("function"==typeof n)return t(e,null,n);n||(n={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];t.apply(this,r)}}}(o||i);var s=n.readable||!1!==n.readable&&e.readable,a=n.writable||!1!==n.writable&&e.writable,u=function(){e.writable||c()},h=e._writableState&&e._writableState.finished,c=function(){a=!1,h=!0,s||o.call(e)},l=e._readableState&&e._readableState.endEmitted,d=function(){s=!1,l=!0,a||o.call(e)},f=function(t){o.call(e,t)},p=function(){var t;return s&&!l?(e._readableState&&e._readableState.ended||(t=new r),o.call(e,t)):a&&!h?(e._writableState&&e._writableState.ended||(t=new r),o.call(e,t)):void 0},m=function(){e.req.on("finish",c)};return function(t){return t.setHeader&&"function"==typeof t.abort}(e)?(e.on("complete",c),e.on("abort",p),e.req?m():e.on("request",m)):a&&!e._writableState&&(e.on("end",u),e.on("close",u)),e.on("end",d),e.on("finish",c),!1!==n.error&&e.on("error",f),e.on("close",p),function(){e.removeListener("complete",c),e.removeListener("abort",p),e.removeListener("request",m),e.req&&e.req.removeListener("finish",c),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",c),e.removeListener("end",d),e.removeListener("error",f),e.removeListener("close",p)}}},5167:t=>{t.exports=function(){throw new Error("Readable.from is not available in the browser")}},9946:(t,e,n)=>{"use strict";var r,i=n(4281).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===r&&(r=n(8610)),r(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 h(t){t()}function c(t,e){return t.pipe(e)}function l(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),n=0;n<t;n++)e[n]=arguments[n];var r,i=l(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var s=e.map((function(t,n){var o=n<e.length-1;return u(t,o,n>0,(function(t){r||(r=t),t&&s.forEach(h),o||(s.forEach(h),i(r))}))}));return e.reduce(c)}},2457:(t,e,n)=>{"use strict";var r=n(4281).q.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,n,i){var o=function(t,e,n){return null!=t.highWaterMark?t.highWaterMark:e?t[n]:null}(e,i,n);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new r(i?n:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},2503:(t,e,n)=>{t.exports=n(7187).EventEmitter},8473:(t,e,n)=>{(e=t.exports=n(9481)).Stream=e,e.Readable=e,e.Writable=n(4229),e.Duplex=n(6753),e.Transform=n(4605),e.PassThrough=n(2725),e.finished=n(8610),e.pipeline=n(9946)},9785:(t,e,n)=>{"use strict";var r=n(8764).Buffer,i=n(5717),o=n(3349),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],h=[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],c=[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],l=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0];function f(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(t,e){return t<<e|t>>>32-e}function m(t,e,n,r,i,o,s,a){return p(t+(e^n^r)+o+s|0,a)+i|0}function g(t,e,n,r,i,o,s,a){return p(t+(e&n|~e&r)+o+s|0,a)+i|0}function v(t,e,n,r,i,o,s,a){return p(t+((e|~n)^r)+o+s|0,a)+i|0}function b(t,e,n,r,i,o,s,a){return p(t+(e&r|n&~r)+o+s|0,a)+i|0}function y(t,e,n,r,i,o,s,a){return p(t+(e^(n|~r))+o+s|0,a)+i|0}i(f,o),f.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var n=0|this._a,r=0|this._b,i=0|this._c,o=0|this._d,f=0|this._e,w=0|this._a,_=0|this._b,M=0|this._c,S=0|this._d,E=0|this._e,A=0;A<80;A+=1){var k,x;A<16?(k=m(n,r,i,o,f,t[a[A]],l[0],h[A]),x=y(w,_,M,S,E,t[u[A]],d[0],c[A])):A<32?(k=g(n,r,i,o,f,t[a[A]],l[1],h[A]),x=b(w,_,M,S,E,t[u[A]],d[1],c[A])):A<48?(k=v(n,r,i,o,f,t[a[A]],l[2],h[A]),x=v(w,_,M,S,E,t[u[A]],d[2],c[A])):A<64?(k=b(n,r,i,o,f,t[a[A]],l[3],h[A]),x=g(w,_,M,S,E,t[u[A]],d[3],c[A])):(k=y(n,r,i,o,f,t[a[A]],l[4],h[A]),x=m(w,_,M,S,E,t[u[A]],d[4],c[A])),n=f,f=o,o=p(i,10),i=r,r=k,w=E,E=S,S=p(M,10),M=_,_=x}var R=this._b+i+S|0;this._b=this._c+o+E|0,this._c=this._d+f+w|0,this._d=this._e+n+_|0,this._e=this._a+r+M|0,this._a=R},f.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=r.alloc?r.alloc(20):new r(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=f},9509:(t,e,n)=>{var r=n(8764),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function s(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=s),o(i,s),s.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},s.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},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 r.SlowBuffer(t)}},2399:(t,e,n)=>{"use strict";var r,i=n(4155),o=n(8764),s=o.Buffer,a={};for(r in o)o.hasOwnProperty(r)&&"SlowBuffer"!==r&&"Buffer"!==r&&(a[r]=o[r]);var u=a.Buffer={};for(r in s)s.hasOwnProperty(r)&&"allocUnsafe"!==r&&"allocUnsafeSlow"!==r&&(u[r]=s[r]);if(a.Buffer.prototype=s.prototype,u.from&&u.from!==Uint8Array.from||(u.from=function(t,e,n){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,n)}),u.alloc||(u.alloc=function(t,e,n){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 r=s(t);return e&&0!==e.length?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r}),!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},4189:(t,e,n)=>{var r=n(9509).Buffer;function i(t,e){this._block=r.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=r.from(t,e));for(var n=this._block,i=this._blockSize,o=t.length,s=this._len,a=0;a<o;){for(var u=s%i,h=Math.min(o-a,i-u),c=0;c<h;c++)n[u+c]=t[a+c];a+=h,(s+=h)%i==0&&this._update(n)}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 n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,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},9072:(t,e,n)=>{var r=t.exports=function(t){t=t.toLowerCase();var e=r[t];if(!e)throw new Error(t+" is not supported (we accept pull requests)");return new e};r.sha=n(4448),r.sha1=n(8336),r.sha224=n(8432),r.sha256=n(7499),r.sha384=n(1686),r.sha512=n(7816)},4448:(t,e,n)=>{var r=n(5717),i=n(4189),o=n(9509).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function h(t){return t<<30|t>>>2}function c(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}r(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,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,l=0;l<16;++l)n[l]=t.readInt32BE(4*l);for(;l<80;++l)n[l]=n[l-3]^n[l-8]^n[l-14]^n[l-16];for(var d=0;d<80;++d){var f=~~(d/20),p=0|((e=r)<<5|e>>>27)+c(f,i,o,a)+u+n[d]+s[f];u=a,a=o,o=h(i),i=r,r=p}this._a=r+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},8336:(t,e,n)=>{var r=n(5717),i=n(4189),o=n(9509).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function h(t){return t<<5|t>>>27}function c(t){return t<<30|t>>>2}function l(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}r(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,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,d=0;d<16;++d)n[d]=t.readInt32BE(4*d);for(;d<80;++d)n[d]=(e=n[d-3]^n[d-8]^n[d-14]^n[d-16])<<1|e>>>31;for(var f=0;f<80;++f){var p=~~(f/20),m=h(r)+l(p,i,o,a)+u+n[f]+s[p]|0;u=a,a=o,o=c(i),i=r,r=m}this._a=r+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},8432:(t,e,n)=>{var r=n(5717),i=n(7499),o=n(4189),s=n(9509).Buffer,a=new Array(64);function u(){this.init(),this._w=a,o.call(this,64,56)}r(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},7499:(t,e,n)=>{var r=n(5717),i=n(4189),o=n(9509).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 h(t,e,n){return n^t&(e^n)}function c(t,e,n){return t&e|n&(t|e)}function l(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function d(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function f(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}r(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,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,p=0|this._f,m=0|this._g,g=0|this._h,v=0;v<16;++v)n[v]=t.readInt32BE(4*v);for(;v<64;++v)n[v]=0|(((e=n[v-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+n[v-7]+f(n[v-15])+n[v-16];for(var b=0;b<64;++b){var y=g+d(u)+h(u,p,m)+s[b]+n[b]|0,w=l(r)+c(r,i,o)|0;g=m,m=p,p=u,u=a+y|0,a=o,o=i,i=r,r=y+w|0}this._a=r+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=p+this._f|0,this._g=m+this._g|0,this._h=g+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},1686:(t,e,n)=>{var r=n(5717),i=n(7816),o=n(4189),s=n(9509).Buffer,a=new Array(160);function u(){this.init(),this._w=a,o.call(this,128,112)}r(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,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+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},7816:(t,e,n)=>{var r=n(5717),i=n(4189),o=n(9509).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 h(t,e,n){return n^t&(e^n)}function c(t,e,n){return t&e|n&(t|e)}function l(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function d(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function f(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function v(t,e){return t>>>0<e>>>0?1:0}r(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,n=0|this._ah,r=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,u=0|this._fh,b=0|this._gh,y=0|this._hh,w=0|this._al,_=0|this._bl,M=0|this._cl,S=0|this._dl,E=0|this._el,A=0|this._fl,k=0|this._gl,x=0|this._hl,R=0;R<32;R+=2)e[R]=t.readInt32BE(4*R),e[R+1]=t.readInt32BE(4*R+4);for(;R<160;R+=2){var I=e[R-30],T=e[R-30+1],C=f(I,T),B=p(T,I),D=m(I=e[R-4],T=e[R-4+1]),P=g(T,I),U=e[R-14],O=e[R-14+1],N=e[R-32],q=e[R-32+1],L=B+O|0,j=C+U+v(L,B)|0;j=(j=j+D+v(L=L+P|0,P)|0)+N+v(L=L+q|0,q)|0,e[R]=j,e[R+1]=L}for(var K=0;K<160;K+=2){j=e[K],L=e[K+1];var $=c(n,r,i),z=c(w,_,M),H=l(n,w),W=l(w,n),V=d(a,E),F=d(E,a),J=s[K],G=s[K+1],Z=h(a,u,b),Y=h(E,A,k),X=x+F|0,Q=y+V+v(X,x)|0;Q=(Q=(Q=Q+Z+v(X=X+Y|0,Y)|0)+J+v(X=X+G|0,G)|0)+j+v(X=X+L|0,L)|0;var tt=W+z|0,et=H+$+v(tt,W)|0;y=b,x=k,b=u,k=A,u=a,A=E,a=o+Q+v(E=S+X|0,S)|0,o=i,S=M,i=r,M=_,r=n,_=w,n=Q+et+v(w=X+tt|0,X)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+M|0,this._dl=this._dl+S|0,this._el=this._el+E|0,this._fl=this._fl+A|0,this._gl=this._gl+k|0,this._hl=this._hl+x|0,this._ah=this._ah+n+v(this._al,w)|0,this._bh=this._bh+r+v(this._bl,_)|0,this._ch=this._ch+i+v(this._cl,M)|0,this._dh=this._dh+o+v(this._dl,S)|0,this._eh=this._eh+a+v(this._el,E)|0,this._fh=this._fh+u+v(this._fl,A)|0,this._gh=this._gh+b+v(this._gl,k)|0,this._hh=this._hh+y+v(this._hl,x)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+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},2830:(t,e,n)=>{t.exports=i;var r=n(7187).EventEmitter;function i(){r.call(this)}n(5717)(i,r),i.Readable=n(9481),i.Writable=n(4229),i.Duplex=n(6753),i.Transform=n(4605),i.PassThrough=n(2725),i.finished=n(8610),i.pipeline=n(9946),i.Stream=i,i.prototype.pipe=function(t,e){var n=this;function i(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(n.on("end",a),n.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 h(t){if(c(),0===r.listenerCount(this,"error"))throw t}function c(){n.removeListener("data",i),t.removeListener("drain",o),n.removeListener("end",a),n.removeListener("close",u),n.removeListener("error",h),t.removeListener("error",h),n.removeListener("end",c),n.removeListener("close",c),t.removeListener("close",c)}return n.on("error",h),t.on("error",h),n.on("end",c),n.on("close",c),t.on("close",c),t.emit("pipe",n),t}},2553:(t,e,n)=>{"use strict";var r=n(396).Buffer,i=r.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&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=h,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=c,this.end=l,e=3;break;default:return this.write=d,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.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,n=function(t,e,n){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!==n?n: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 n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function h(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function c(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?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-n))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function d(t){return t.toString(this.encoding)}function f(t){return t&&t.length?this.write(t):""}e.s=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<t.length?e?e+this.text(t,n):this.text(t,n):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 n=function(t,e,n){var r=e.length-1;if(r<n)return 0;var i=s(e[r]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--r<n||-2===i?0:(i=s(e[r]))>=0?(i>0&&(t.lastNeed=i-2),i):--r<n||-2===i?0:(i=s(e[r]))>=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=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},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}},396:(t,e,n)=>{var r=n(8764),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function s(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},s.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},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 r.SlowBuffer(t)}},3607:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||e.hasOwnProperty(n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),i(n(4849),e),i(n(6730),e),i(n(3707),e),i(n(212),e),i(n(158),e),i(n(3242),e),i(n(9676),e)},158:function(t,e,n){"use strict";var r=n(8764).Buffer,i=this&&this.__assign||function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},o=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.AuthenticationClient=void 0;var u=n(3242),h=a(n(2153)),c=a(n(1354)),l=n(9550),d=n(1277),f=n(212),p=n(9676),m=n(406),g=n(6151),v=n(9584),b=n(1721),y=a(n(6489)),w=n(5618),_=n(1764),M=n(9370),S=n(9039),E={appId:void 0,appHost:void 0,protocol:"oidc",tokenEndPointAuthMethod:"client_secret_post",introspectionEndPointAuthMethod:"client_secret_post",revocationEndPointAuthMethod:"client_secret_post",timeout:1e4,onError:function(t,e,n){throw{code:t,message:e,data:n}},requestFrom:"sdk",encryptFunction:b.encrypt,host:"https://core.authing.cn",headers:{"userpool-id":"x-authing-userpool-id","app-id":"x-authing-app-id","request-from":"x-authing-request-from","sdk-version":"x-authing-sdk-version",lang:"x-authing-lang"}},A=function(){function t(t){this.options=Object.assign({},E,t),this.baseClient=new S.BaseAuthenticationClient(this.options);var e=this.baseClient.appHost+"/graphql/v2";this.graphqlClient=new(this.options.graphqlClient||d.GraphqlClient)(e,this.options),this.tokenProvider=new(this.options.tokenProvider||u.AuthenticationTokenProvider)(this.options),this.httpClient=new(this.options.httpClient||v.HttpClient)(this.options,this.tokenProvider),this.naiveHttpClient=new v.NaiveHttpClient(this.options,this.tokenProvider),this.publicKeyManager=new _.PublicKeyManager(this.options,this.httpClient),this.wxqrcode=new m.QrCodeAuthenticationClient(this.options,this.tokenProvider,this.httpClient,"WXAPP_AUTH"),this.qrcode=new m.QrCodeAuthenticationClient(this.options,this.tokenProvider,this.httpClient,"APP_AUTH"),this.mfa=new g.MfaAuthenticationClient(this.options,this.tokenProvider,this.httpClient),this.social=new w.SocialAuthenticationClient(this.options,this.tokenProvider,this.httpClient),this.enterprise=new M.EnterpriseAuthenticationClient(this.options,this.tokenProvider,this.httpClient),this.options.token&&this.setToken(this.options.token)}return t.prototype.checkLoggedIn=function(){var t,e=this.tokenProvider.getUser();if(e)return e.id;var n=this.tokenProvider.getToken();if(!n)throw new Error("请先登录!");var r=y.default(n),i=r.sub||(null===(t=r.data)||void 0===t?void 0:t.id);if(!i)throw new Error("不合法的 accessToken");return i},t.prototype.setCurrentUser=function(t){this.tokenProvider.setUser(t)},t.prototype.setToken=function(t){this.tokenProvider.setToken(t)},t.prototype.registerByEmail=function(t,e,n,r){return o(this,void 0,void 0,(function(){var i,o,a,u,h,c,d,f,p,m,g,v,y,w;return s(this,(function(s){switch(s.label){case 0:return n=n||{},i=(r=r||{}).forceLogin,o=void 0!==i&&i,a=r.generateToken,u=void 0!==a&&a,h=r.clientIp,c=r.params,d=r.context,f=r.customData,m=(p=this.options).encryptFunction,g=[e],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,m.apply(p,g.concat([s.sent()]))];case 2:return e=s.sent(),v=null,f?v=JSON.stringify(b.convertObjectToKeyValueList(f)):c&&(v=JSON.stringify(c)),y=null,d&&(y=JSON.stringify(d)),[4,l.registerByEmail(this.graphqlClient,this.tokenProvider,{input:{email:t,password:e,profile:n,forceLogin:o,generateToken:u,clientIp:h,params:v,context:y}})];case 3:return w=s.sent().registerByEmail,this.setCurrentUser(w),[2,w]}}))}))},t.prototype.registerByUsername=function(t,e,n,r){return o(this,void 0,void 0,(function(){var i,o,a,u,h,c,d,f,p,m,g,v,y,w;return s(this,(function(s){switch(s.label){case 0:return n=n||{},i=(r=r||{}).forceLogin,o=void 0!==i&&i,a=r.generateToken,u=void 0!==a&&a,h=r.clientIp,c=r.params,d=r.context,f=r.customData,m=(p=this.options).encryptFunction,g=[e],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,m.apply(p,g.concat([s.sent()]))];case 2:return e=s.sent(),v=null,f?v=JSON.stringify(b.convertObjectToKeyValueList(f)):c&&(v=JSON.stringify(c)),y=null,d&&(y=JSON.stringify(d)),[4,l.registerByUsername(this.graphqlClient,this.tokenProvider,{input:{username:t,password:e,profile:n,forceLogin:o,generateToken:u,clientIp:h,params:v,context:y}})];case 3:return w=s.sent().registerByUsername,this.setCurrentUser(w),[2,w]}}))}))},t.prototype.registerByPhoneCode=function(t,e,n,r,i){return o(this,void 0,void 0,(function(){var o,a,u,h,c,d,f,p,m,g,v,y,w,_;return s(this,(function(s){switch(s.label){case 0:return r=r||{},o=(i=i||{}).forceLogin,a=void 0!==o&&o,u=i.generateToken,h=void 0!==u&&u,c=i.clientIp,d=i.params,f=i.context,p=i.customData,n?(g=(m=this.options).encryptFunction,v=[n],[4,this.publicKeyManager.getPublicKey()]):[3,3];case 1:return[4,g.apply(m,v.concat([s.sent()]))];case 2:n=s.sent(),s.label=3;case 3:return y=null,p?y=JSON.stringify(b.convertObjectToKeyValueList(p)):d&&(y=JSON.stringify(d)),w=null,f&&(w=JSON.stringify(f)),[4,l.registerByPhoneCode(this.graphqlClient,this.tokenProvider,{input:{phone:t,code:e,password:n,profile:r,forceLogin:a,generateToken:h,clientIp:c,params:y,context:w}})];case 4:return _=s.sent().registerByPhoneCode,this.setCurrentUser(_),[2,_]}}))}))},t.prototype.checkPasswordStrength=function(t){return o(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,l.checkPasswordStrength(this.graphqlClient,this.tokenProvider,{password:t})];case 1:return[2,e.sent().checkPasswordStrength]}}))}))},t.prototype.sendSmsCode=function(t){return o(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e=this.baseClient.appHost+"/api/v2/sms/send",[4,this.httpClient.request({method:"POST",url:e,data:{phone:t}})];case 1:return[2,n.sent()]}}))}))},t.prototype.loginByEmail=function(t,e,n){return o(this,void 0,void 0,(function(){var r,i,o,a,u,h,c,d,f,p,m,g,v;return s(this,(function(s){switch(s.label){case 0:return r=(n=n||{}).autoRegister,i=void 0!==r&&r,o=n.captchaCode,a=n.clientIp,u=n.params,h=n.context,c=n.customData,f=(d=this.options).encryptFunction,p=[e],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,f.apply(d,p.concat([s.sent()]))];case 2:return e=s.sent(),m=null,c?m=JSON.stringify(b.convertObjectToKeyValueList(c)):u&&(m=JSON.stringify(u)),g=null,h&&(g=JSON.stringify(h)),[4,l.loginByEmail(this.graphqlClient,this.tokenProvider,{input:{email:t,password:e,autoRegister:i,captchaCode:o,clientIp:a,params:m,context:g}})];case 3:return v=s.sent().loginByEmail,this.setCurrentUser(v),[2,v]}}))}))},t.prototype.loginByUsername=function(t,e,n){return o(this,void 0,void 0,(function(){var r,i,o,a,u,h,c,d,f,p,m,g,v;return s(this,(function(s){switch(s.label){case 0:return r=(n=n||{}).autoRegister,i=void 0!==r&&r,o=n.captchaCode,a=n.clientIp,u=n.params,h=n.context,c=n.customData,f=(d=this.options).encryptFunction,p=[e],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,f.apply(d,p.concat([s.sent()]))];case 2:return e=s.sent(),m=null,c?m=JSON.stringify(b.convertObjectToKeyValueList(c)):u&&(m=JSON.stringify(u)),g=null,h&&(g=JSON.stringify(h)),[4,l.loginByUsername(this.graphqlClient,this.tokenProvider,{input:{username:t,password:e,autoRegister:i,captchaCode:o,clientIp:a,params:m,context:g}})];case 3:return v=s.sent().loginByUsername,this.setCurrentUser(v),[2,v]}}))}))},t.prototype.loginByPhoneCode=function(t,e,n){return o(this,void 0,void 0,(function(){var r,i,o,a,u,h,c;return s(this,(function(s){switch(s.label){case 0:return r=(n=n||{}).clientIp,i=n.params,o=n.context,a=n.customData,u=null,a?u=JSON.stringify(b.convertObjectToKeyValueList(a)):i&&(u=JSON.stringify(i)),h=null,o&&(h=JSON.stringify(o)),[4,l.loginByPhoneCode(this.graphqlClient,this.tokenProvider,{input:{phone:t,code:e,clientIp:r,params:u,context:h}})];case 1:return c=s.sent().loginByPhoneCode,this.setCurrentUser(c),[2,c]}}))}))},t.prototype.loginByPhonePassword=function(t,e,n){return o(this,void 0,void 0,(function(){var r,i,o,a,u,h,c,d,f,p,m,g,v;return s(this,(function(s){switch(s.label){case 0:return r=(n=n||{}).captchaCode,i=n.autoRegister,o=void 0!==i&&i,a=n.clientIp,u=n.params,h=n.context,c=n.customData,f=(d=this.options).encryptFunction,p=[e],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,f.apply(d,p.concat([s.sent()]))];case 2:return e=s.sent(),m=null,c?m=JSON.stringify(b.convertObjectToKeyValueList(c)):u&&(m=JSON.stringify(u)),g=null,h&&(g=JSON.stringify(h)),[4,l.loginByPhonePassword(this.graphqlClient,this.tokenProvider,{input:{phone:t,password:e,captchaCode:r,autoRegister:o,clientIp:a,params:m,context:g}})];case 3:return v=s.sent().loginByPhonePassword,this.setCurrentUser(v),[2,v]}}))}))},t.prototype.loginBySubAccount=function(t,e,n){return o(this,void 0,void 0,(function(){var r,i,o,a,u,h;return s(this,(function(s){switch(s.label){case 0:return r=(n=n||{}).captchaCode,i=n.clientIp,a=(o=this.options).encryptFunction,u=[e],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,a.apply(o,u.concat([s.sent()]))];case 2:return e=s.sent(),[4,l.loginBySubAccount(this.graphqlClient,this.tokenProvider,{account:t,password:e,captchaCode:r,clientIp:i})];case 3:return h=s.sent().loginBySubAccount,this.setCurrentUser(h),[2,h]}}))}))},t.prototype.checkLoginStatus=function(t){return o(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,l.checkLoginStatus(this.graphqlClient,this.tokenProvider,{token:t})];case 1:return[2,e.sent().checkLoginStatus]}}))}))},t.prototype.sendEmail=function(t,e){return o(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:return[4,l.sendEmail(this.graphqlClient,this.tokenProvider,{email:t,scene:e})];case 1:return[2,n.sent().sendEmail]}}))}))},t.prototype.resetPasswordByPhoneCode=function(t,e,n){return o(this,void 0,void 0,(function(){var r,i,o;return s(this,(function(s){switch(s.label){case 0:return i=(r=this.options).encryptFunction,o=[n],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,i.apply(r,o.concat([s.sent()]))];case 2:return n=s.sent(),[4,l.resetPassword(this.graphqlClient,this.tokenProvider,{phone:t,code:e,newPassword:n})];case 3:return[2,s.sent().resetPassword]}}))}))},t.prototype.resetPasswordByEmailCode=function(t,e,n){return o(this,void 0,void 0,(function(){var r,i,o;return s(this,(function(s){switch(s.label){case 0:return i=(r=this.options).encryptFunction,o=[n],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,i.apply(r,o.concat([s.sent()]))];case 2:return n=s.sent(),[4,l.resetPassword(this.graphqlClient,this.tokenProvider,{email:t,code:e,newPassword:n})];case 3:return[2,s.sent().resetPassword]}}))}))},t.prototype.resetPasswordByFirstLoginToken=function(t){return o(this,void 0,void 0,(function(){var e,n,r,i,o;return s(this,(function(s){switch(s.label){case 0:return e=t.token,n=t.password,i=(r=this.options).encryptFunction,o=[n],[4,this.publicKeyManager.getPublicKey()];case 1:return[4,i.apply(r,o.concat([s.sent()]))];case 2:return n=s.sent(),[4,l.resetPasswordByFirstLoginToken(this.graphqlClient,this.tokenProvider,{token:e,password:n})];case 3:return[2,s.sent().resetPasswordByFirstLoginToken]}}))}))},t.prototype.updateProfile=function(t){return o(this,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e=this.checkLoggedIn(),t&&t.password&&delete t.password,[4,l.updateUser(this.graphqlClient,this.tokenProvider,{id:e,input:t})];case 1:return n=r.sent().updateUser,this.setCurrentUser(n),[2,n]}}))}))},t.prototype.updatePassword=function(t,e){return o(this,void 0,void 0,(function(){var n,r,i,o,a,u,h,c;return s(this,(function(s){switch(s.label){case 0:return(n=t)?(i=(r=this.options).encryptFunction,o=[t],[4,this.publicKeyManager.getPublicKey()]):[3,3];case 1:return[4,i.apply(r,o.concat([s.sent()]))];case 2:n=s.sent(),s.label=3;case 3:return t=n,(a=e)?(h=(u=this.options).encryptFunction,c=[e],[4,this.publicKeyManager.getPublicKey()]):[3,6];case 4:return[4,h.apply(u,c.concat([s.sent()]))];case 5:a=s.sent(),s.label=6;case 6:return e=a,[4,l.updatePassword(this.graphqlClient,this.tokenProvider,{newPassword:t,oldPassword:e})];case 7:return[2,s.sent().updatePassword]}}))}))},t.prototype.updatePhone=function(t,e,n,r){return o(this,void 0,void 0,(function(){return s(this,(function(i){switch(i.label){case 0:return[4,l.updatePhone(this.graphqlClient,this.tokenProvider,{phone:t,phoneCode:e,oldPhone:n,oldPhoneCode:r})];case 1:return[2,i.sent().updatePhone]}}))}))},t.prototype.updateEmail=function(t,e,n,r){return o(this,void 0,void 0,(function(){return s(this,(function(i){switch(i.label){case 0:return[4,l.updateEmail(this.graphqlClient,this.tokenProvider,{email:t,emailCode:e,oldEmail:n,oldEmailCode:r})];case 1:return[2,i.sent().updateEmail]}}))}))},t.prototype.refreshToken=function(){return o(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return[4,l.refreshToken(this.graphqlClient,this.tokenProvider,{})];case 1:return t=e.sent().refreshToken,this.setToken(t.token),[2,t]}}))}))},t.prototype.linkAccount=function(t){return o(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.httpClient.request({method:"POST",url:this.baseClient.appHost+"/api/v2/users/link",data:{primaryUserToken:t.primaryUserToken,secondaryUserToken:t.secondaryUserToken}})];case 1:return e.sent(),[2,{code:200,message:"绑定成功"}]}}))}))},t.prototype.unLinkAccount=function(t){return o(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.httpClient.request({method:"POST",url:this.baseClient.appHost+"/api/v2/users/unlink",data:{primaryUserToken:t.primaryUserToken,provider:t.provider}})];case 1:return e.sent(),[2,{code:200,message:"解绑成功"}]}}))}))},t.prototype.bindPhone=function(t,e){return o(this,void 0,void 0,(function(){var n;return s(this,(function(r){switch(r.label){case 0:return[4,l.bindPhone(this.graphqlClient,this.tokenProvider,{phone:t,phoneCode:e})];case 1:return n=r.sent().bindPhone,this.setCurrentUser(n),[2,n]}}))}))},t.prototype.unbindPhone=function(){return o(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return[4,l.unbindPhone(this.graphqlClient,this.tokenProvider,{})];case 1:return t=e.sent().unbindPhone,this.setCurrentUser(t),[2,t]}}))}))},t.prototype.bindEmail=function(t,e){return o(this,void 0,void 0,(function(){var n;return s(this,(function(r){switch(r.label){case 0:return[4,l.bindEmail(this.graphqlClient,this.tokenProvider,{email:t,emailCode:e})];case 1:return n=r.sent().bindEmail,this.setCurrentUser(n),[2,n]}}))}))},t.prototype.unbindEmail=function(){return o(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return[4,l.unbindEmail(this.graphqlClient,this.tokenProvider,{})];case 1:return t=e.sent().unbindEmail,this.setCurrentUser(t),[2,t]}}))}))},t.prototype.getCurrentUser=function(){return o(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,l.user(this.graphqlClient,this.tokenProvider,{})];case 1:return t=e.sent().user,this.setCurrentUser(t),[2,t];case 2:return e.sent(),[2,null];case 3:return[2]}}))}))},t.prototype.logout=function(){return o(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.httpClient.request({method:"GET",url:this.baseClient.appHost+"/api/v2/logout?app_id="+this.options.appId,withCredentials:!0})];case 1:return t.sent(),this.tokenProvider.clearUser(),[2]}}))}))},t.prototype.listUdv=function(){return o(this,void 0,void 0,(function(){var t,e;return s(this,(function(n){switch(n.label){case 0:return t=this.checkLoggedIn(),[4,l.udv(this.graphqlClient,this.tokenProvider,{targetType:p.UdfTargetType.User,targetId:t})];case 1:return e=n.sent().udv,[2,b.convertUdv(e)]}}))}))},t.prototype.setUdv=function(t,e){return o(this,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n=this.checkLoggedIn(),e=JSON.stringify(e),[4,l.setUdv(this.graphqlClient,this.tokenProvider,{targetType:p.UdfTargetType.User,targetId:n,key:t,value:e})];case 1:return r=i.sent().setUdv,[2,b.convertUdv(r)]}}))}))},t.prototype.removeUdv=function(t){return o(this,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e=this.checkLoggedIn(),[4,l.removeUdv(this.graphqlClient,this.tokenProvider,{targetType:p.UdfTargetType.User,targetId:e,key:t})];case 1:return n=r.sent().removeUdv,[2,b.convertUdv(n)]}}))}))},t.prototype.listOrgs=function(){return o(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.httpClient.request({method:"GET",url:this.baseClient.appHost+"/api/v2/users/me/orgs"})];case 1:return[2,t.sent()]}}))}))},t.prototype.listDepartments=function(){return o(this,void 0,void 0,(function(){var t;return s(this,(function(e){switch(e.label){case 0:return t=this.checkLoggedIn(),[4,l.getUserDepartments(this.graphqlClient,this.tokenProvider,{id:t})];case 1:return[2,e.sent().user.departments]}}))}))},t.prototype.loginByLdap=function(t,e,n){return o(this,void 0,void 0,(function(){var r,i;return s(this,(function(o){switch(o.label){case 0:return n=n||{},r=this.baseClient.appHost+"/api/v2/ldap/verify-user",[4,this.httpClient.request({method:"POST",url:r,data:{username:t,password:e}})];case 1:return i=o.sent(),this.setCurrentUser(i),[2,i]}}))}))},t.prototype.loginByAd=function(t,e){return o(this,void 0,void 0,(function(){var n,r,i,o;return s(this,(function(s){switch(s.label){case 0:return n=new URL(this.baseClient.appHost).hostname.split(".").slice(1).join("."),r=this.options.websocketHost||"https://ws."+n,i=r+"/api/v2/ad/verify-user",[4,this.httpClient.request({method:"POST",url:i,data:{username:t,password:e}})];case 1:return o=s.sent(),this.setCurrentUser(o),[2,o]}}))}))},t.prototype.uploadPhoto=function(t,e){t=t||"image/*";var n=this;b.uploadFile({accept:t,url:this.baseClient.appHost+"/api/v2/upload?folder=avatar"}).then((function(t){var n=t.url;return e(n)})).catch((function(t){var e=t.code,r=t.message;return n.options.onError(e,r)}))},t.prototype.updateAvatar=function(t){return o(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.uploadAvatar(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.uploadAvatar=function(t){return o(this,void 0,void 0,(function(){var e,n,r,i=this;return s(this,(function(o){switch(o.label){case 0:return e=(t||{}).accept,this.checkLoggedIn(),[4,new Promise((function(t){i.uploadPhoto(e,(function(e){t(e)}))}))];case 1:return n=o.sent(),[4,this.updateProfile({photo:n})];case 2:return r=o.sent(),this.setCurrentUser(r),[2,r]}}))}))},t.prototype.getUdfValue=function(){return o(this,void 0,void 0,(function(){var t,e;return s(this,(function(n){switch(n.label){case 0:return t=this.checkLoggedIn(),[4,l.udv(this.graphqlClient,this.tokenProvider,{targetType:p.UdfTargetType.User,targetId:t})];case 1:return e=n.sent().udv,[2,b.convertUdvToKeyValuePair(e)]}}))}))},t.prototype.setUdfValue=function(t){return o(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:if(0===Object.keys(t).length)throw new Error("empty udf value list");return e=this.checkLoggedIn(),[4,l.setUdvBatch(this.graphqlClient,this.tokenProvider,{targetType:p.UdfTargetType.User,targetId:e,udvList:Object.keys(t).map((function(e){return{key:e,value:JSON.stringify(t[e])}}))})];case 1:return n.sent(),[2]}}))}))},t.prototype.removeUdfValue=function(t){return o(this,void 0,void 0,(function(){var e;return s(this,(function(n){switch(n.label){case 0:return e=this.checkLoggedIn(),[4,l.removeUdv(this.graphqlClient,this.tokenProvider,{targetType:p.UdfTargetType.User,targetId:e,key:t})];case 1:return n.sent(),[2]}}))}))},t.prototype.getSecurityLevel=function(){return o(this,void 0,void 0,(function(){return s(this,(function(t){switch(t.label){case 0:return[4,this.httpClient.request({method:"GET",url:this.baseClient.appHost+"/api/v2/users/me/security-level"})];case 1:return[2,t.sent()]}}))}))},t.prototype.listAuthorizedResources=function(t,e){return o(this,void 0,void 0,(function(){var n,r,i,o,a,u;return s(this,(function(s){switch(s.label){case 0:return n=this.checkLoggedIn(),r=(e||{}).resourceType,[4,l.listUserAuthorizedResources(this.graphqlClient,this.tokenProvider,{id:n,namespace:t,resourceType:r})];case 1:if(!(i=s.sent().user))throw new Error("用户不存在");return o=i.authorizedResources,a=o.list,u=o.totalCount,[2,{list:a=b.formatAuthorizedResources(a),totalCount:u}]}}))}))},t.prototype.computedPasswordSecurityLevel=function(t){if("string"!=typeof t)throw"password must be a `string`";var e=new RegExp(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{12,}$/g),n=new RegExp(/^(?=.*[a-zA-Z])(?=.*\d)[^]{8,}$/g);return null!==t.match(e)?f.PasswordSecurityLevel.HIGH:null!==t.match(n)?f.PasswordSecurityLevel.MIDDLE:f.PasswordSecurityLevel.LOW},t.prototype._generateTokenRequest=function(t){var e={};return Object.keys(t).map((function(n){void 0!==t[n]&&(e[n]=t[n])})),new URLSearchParams(e).toString()},t.prototype._generateBasicAuthToken=function(t,e){var n=t||this.options.appId,i=e||this.options.secret;return"Basic "+r.from(n+":"+i).toString("base64")},t.prototype._getAccessTokenByCodeWithClientSecretPost=function(t,e){return o(this,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n=this._generateTokenRequest({client_id:this.options.appId,client_secret:this.options.secret,grant_type:"authorization_code",code:t,redirect_uri:this.options.redirectUri,code_verifier:e}),r="","oidc"===this.options.protocol?r=this.baseClient.appHost+"/oidc/token":"oauth"===this.options.protocol&&(r=this.baseClient.appHost+"/oauth/token"),[4,this.naiveHttpClient.request({method:"POST",url:r,data:n,headers:{"Content-Type":"application/x-www-form-urlencoded"}})];case 1:return[2,i.sent()]}}))}))},t.prototype._getAccessTokenByCodeWithClientSecretBasic=function(t,e){return o(this,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="","oidc"===this.options.protocol?n=this.baseClient.appHost+"/oidc/token":"oauth"===this.options.protocol&&(n=this.baseClient.appHost+"/oauth/token"),r=this._generateTokenRequest({grant_type:"authorization_code",code:t,redirect_uri:this.options.redirectUri,code_verifier:e}),[4,this.naiveHttpClient.request({data:r,method:"POST",url:n,headers:{Authorization:this._generateBasicAuthToken()}})];case 1:return[2,i.sent()]}}))}))},t.prototype._getAccessTokenByCodeWithNone=function(t,e){return o(this,void 0,void 0,(function(){var n,r;return s(this,(function(i){switch(i.label){case 0:return n="","oidc"===this.options.protocol?n=this.baseClient.appHost+"/oidc/token":"oauth"===this.options.protocol&&(n=this.baseClient.appHost+"/oauth/token"),r=this._generateTokenRequest({client_id:this.options.appId,grant_type:"authorization_code",code:t,redirect_uri:this.options.redirectUri,code_verifier:e}),[4,this.naiveHttpClient.request({method:"POST",url:n,data:r})];case 1:return[2,i.sent()]}}))}))},t.prototype.getAccessTokenByCode=function(t,e){return o(this,void 0,void 0,(function(){return s(this,(function(n){switch(n.label){case 0:if(!["oauth","oidc"].includes(this.options.protocol))throw new Error("初始化 AuthenticationClient 时传入的 protocol 参数必须为 oauth 或 oidc,请检查参数");if(!this.options.secret&&"none"!==this.options.tokenEndPointAuthMethod)throw new Error("请在初始化 AuthenticationClient 时传入 appId 和 secret 参数");return"client_secret_post"!==this.options.tokenEndPointAuthMethod?[3,2]:[4,this._getAccessTokenByCodeWithClientSecretPost(t,null==e?void 0:e.codeVerifier)];case 1:return[2,n.sent()];case 2:return"client_secret_basic"!==this.options.tokenEndPointAuthMethod?[3,4]:[4,this._getAccessTokenByCodeWithClientSecretBasic(t,null==e?void 0:e.codeVerifier)];case 3:return[2,n.sent()];case 4:return"none"!==this.options.tokenEndPointAuthMethod?[3,6]:[4,this._getAccessTokenByCodeWithNone(t,null==e?void 0:e.codeVerifier)];case 5:return[2,n.sent()];case 6:return[2]}}))}))},t.prototype.generateCodeChallenge=function(){return b.generateRandomString(43)},t.prototype.getCodeChallengeDigest=function(t){if(!t)throw new Error("请提供 options 参数,options.codeChallenge 为一个长度大于等于 43 的字符串,options.method 可选值为 S256、plain");if(!t.codeChallenge)throw new Error("请提供 options.codeChallenge,值为一个长度大于等于 43 的字符串");var e=t.method,n=void 0===e?"S256":e;if("S256"===n)return h.default(t.codeChallenge).toString(c.default.enc.Base64).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"");if("plain"===n)return t.codeChallenge;throw new Error("不支持的 options.method,可选值为 S256、plain")},t.prototype.getAccessTokenByClientCredentials=function(t,e){return o(this,void 0,void 0,(function(){var n,r,i,o;return s(this,(function(s){switch(s.label){case 0:if(!t)throw new Error("请传入 scope 参数,请看文档:https://docs.authing.cn/v2/guides/authorization/m2m-authz.html");if(!e)throw new Error("请在调用本方法时传入 { accessKey: string, accessSecret: string },请看文档:https://docs.authing.cn/v2/guides/authorization/m2m-authz.html");return n=(null==e?void 0:e.accessKey)||this.options.appId,r=(null==e?void 0:e.accessSecret)||this.options.secret,i=this._generateTokenRequest({client_id:n,client_secret:r,grant_type:"client_credentials",scope:t}),o="","oidc"===this.options.protocol?o=this.baseClient.appHost+"/oidc/token":"oauth"===this.options.protocol&&(o=this.baseClient.appHost+"/oauth/token"),[4,this.naiveHttpClient.request({method:"POST",url:o,data:i,headers:{"Content-Type":"application/x-www-form-urlencoded"}})];case 1:return[2,s.sent()]}}))}))},t.prototype.getUserInfoByAccessToken=function(t,e){return o(this,void 0,void 0,(function(){var n;return s(this,(function(r){switch(r.label){case 0:if(e){if(e.method&&!["POST","GET"].includes(e.method))throw new Error("options.method 参数的可选值为 POST、GET,请检查输入");if(e.tokenPlace&&!["query","header","body"].includes(e.tokenPlace))throw new Error("options.tokenPlace 参数的可选值为 query、header、body,请检查输入");if("GET"===e.method&&"body"===e.tokenPlace)throw new Error("options.method 参数为 GET 时,options.tokenPlace 参数不能为 body");e.method=e.method||"GET",e.tokenPlace=e.tokenPlace||"query"}return n="","oidc"===this.options.protocol?n=this.baseClient.appHost+"/oidc/me":"oauth"===this.options.protocol&&(n=this.baseClient.appHost+"/oauth/me"),"POST"!==(null==e?void 0:e.method)?[3,7]:"header"!==(null==e?void 0:e.tokenPlace)?[3,2]:[4,this.naiveHttpClient.request({method:"POST",url:n,headers:{Authorization:"Bearer "+t}})];case 1:return[2,r.sent()];case 2:return"query"!==(null==e?void 0:e.tokenPlace)?[3,4]:[4,this.naiveHttpClient.request({method:"POST",url:n,params:{access_token:t}})];case 3:return[2,r.sent()];case 4:return"body"!==(null==e?void 0:e.tokenPlace)?[3,6]:[4,this.naiveHttpClient.request({method:"POST",url:n,data:b.objectToQueryString({access_token:t}).slice(1)})];case 5:return[2,r.sent()];case 6:return[3,14];case 7:return"GET"!==(null==e?void 0:e.method)?[3,12]:"header"!==(null==e?void 0:e.tokenPlace)?[3,9]:[4,this.naiveHttpClient.request({method:"GET",url:n,headers:{Authorization:"Bearer "+t}})];case 8:return[2,r.sent()];case 9:return"query"!==(null==e?void 0:e.tokenPlace)?[3,11]:[4,this.naiveHttpClient.request({method:"GET",url:n,params:{access_token:t}})];case 10:return[2,r.sent()];case 11:return[3,14];case 12:return[4,this.naiveHttpClient.request({method:"GET",url:n,params:{access_token:t}})];case 13:return[2,r.sent()];case 14:return[2]}}))}))},t.prototype.buildAuthorizeUrl=function(t){if(!this.baseClient.appHost)throw new Error("请在初始化 AuthenticationClient 时传入应用域名 appHost 参数,形如:https://app1.authing.cn");if("oidc"===this.options.protocol)return this._buildOidcAuthorizeUrl(t);if("oauth"===this.options.protocol)return this._buildOauthAuthorizeUrl(t);if("saml"===this.options.protocol)return this._buildSamlAuthorizeUrl();if("cas"===this.options.protocol)return this._buildCasAuthorizeUrl(t);throw new Error("不支持的协议类型,请在初始化 AuthenticationClient 时传入 protocol 参数,可选值为 oidc、oauth、saml、cas")},t.prototype._buildOidcAuthorizeUrl=function(t){var e={appId:"client_id",scope:"scope",state:"state",nonce:"nonce",responseMode:"response_mode",responseType:"response_type",redirectUri:"redirect_uri",codeChallenge:"code_challenge",codeChallengeMethod:"code_challenge_method"},n={nonce:Math.random().toString().slice(2),state:Math.random().toString().slice(2),scope:"openid profile email phone address",client_id:this.options.appId,redirect_uri:this.options.redirectUri,response_type:"code"};Object.keys(e).forEach((function(r){t&&t[r]&&("scope"===r&&t.scope.includes("offline_access")&&(n.prompt="consent"),n[e[r]]=t[r])}));var r=new URLSearchParams(n);return this.baseClient.appHost+"/oidc/auth?"+r.toString()},t.prototype._buildOauthAuthorizeUrl=function(t){var e={appId:"client_id",scope:"scope",state:"state",responseType:"response_type",redirectUri:"redirect_uri"},n={state:Math.random().toString().slice(2),scope:"user",client_id:this.options.appId,redirect_uri:this.options.redirectUri,response_type:"code"};Object.keys(e).forEach((function(r){t&&t[r]&&(n[e[r]]=t[r])}));var r=new URLSearchParams(n);return this.baseClient.appHost+"/oauth/auth?"+r.toString()},t.prototype._buildSamlAuthorizeUrl=function(){return this.baseClient.appHost+"/api/v2/saml-idp/"+this.options.appId},t.prototype._buildCasAuthorizeUrl=function(t){return(null==t?void 0:t.service)?this.baseClient.appHost+"/cas-idp/"+this.options.appId+"?service="+(null==t?void 0:t.service):this.baseClient.appHost+"/cas-idp/"+this.options.appId},t.prototype._buildCasLogoutUrl=function(t){return(null==t?void 0:t.redirectUri)?this.baseClient.appHost+"/cas-idp/logout?url="+t.redirectUri:this.baseClient.appHost+"/cas-idp/logout"},t.prototype._buildOidcLogoutUrl=function(t){if(t&&(!t.idToken||!t.redirectUri))throw new Error("必须同时传入 idToken 和 redirectUri 参数,或者同时都不传入");return(null==t?void 0:t.redirectUri)?this.baseClient.appHost+"/oidc/session/end?id_token_hint="+t.idToken+"&post_logout_redirect_uri="+t.redirectUri:this.baseClient.appHost+"/oidc/session/end"},t.prototype._buildEasyLogoutUrl=function(t){return(null==t?void 0:t.redirectUri)?this.baseClient.appHost+"/login/profile/logout?redirect_uri="+t.redirectUri:this.baseClient.appHost+"/login/profile/logout"},t.prototype.buildLogoutUrl=function(t){return"cas"===this.options.protocol?this._buildCasLogoutUrl(t):"oidc"===this.options.protocol&&(null==t?void 0:t.expert)?this._buildOidcLogoutUrl(t):this._buildEasyLogoutUrl(t)},t.prototype._getNewAccessTokenByRefreshTokenWithClientSecretPost=function(t){return o(this,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e=this._generateTokenRequest({client_id:this.options.appId,client_secret:this.options.secret,grant_type:"refresh_token",refresh_token:t}),n="","oidc"===this.options.protocol?n=this.baseClient.appHost+"/oidc/token":"oauth"===this.options.protocol&&(n=this.baseClient.appHost+"/oauth/token"),[4,this.naiveHttpClient.request({method:"POST",url:n,data:e,headers:{"Content-Type":"application/x-www-form-urlencoded"}})];case 1:return[2,r.sent()]}}))}))},t.prototype._getNewAccessTokenByRefreshTokenWithClientSecretBasic=function(t){return o(this,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="","oidc"===this.options.protocol?e=this.baseClient.appHost+"/oidc/token":"oauth"===this.options.protocol&&(e=this.baseClient.appHost+"/oauth/token"),n=this._generateTokenRequest({grant_type:"refresh_token",refresh_token:t}),[4,this.naiveHttpClient.request({data:n,method:"POST",url:e,headers:{Authorization:this._generateBasicAuthToken()}})];case 1:return[2,r.sent()]}}))}))},t.prototype._getNewAccessTokenByRefreshTokenWithNone=function(t){return o(this,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="","oidc"===this.options.protocol?e=this.baseClient.appHost+"/oidc/token":"oauth"===this.options.protocol&&(e=this.baseClient.appHost+"/oauth/token"),n=this._generateTokenRequest({client_id:this.options.appId,grant_type:"refresh_token",refresh_token:t}),[4,this.naiveHttpClient.request({method:"POST",url:e,data:n})];case 1:return[2,r.sent()]}}))}))},t.prototype.getNewAccessTokenByRefreshToken=function(t){return o(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:if(!["oauth","oidc"].includes(this.options.protocol))throw new Error("初始化 AuthenticationClient 时传入的 protocol 参数必须为 oauth 或 oidc,请检查参数");if(!this.options.secret&&"none"!==this.options.tokenEndPointAuthMethod)throw new Error("请在初始化 AuthenticationClient 时传入 appId 和 secret 参数");return"client_secret_post"!==this.options.tokenEndPointAuthMethod?[3,2]:[4,this._getNewAccessTokenByRefreshTokenWithClientSecretPost(t)];case 1:return[2,e.sent()];case 2:return"client_secret_basic"!==this.options.tokenEndPointAuthMethod?[3,4]:[4,this._getNewAccessTokenByRefreshTokenWithClientSecretBasic(t)];case 3:return[2,e.sent()];case 4:return"none"!==this.options.tokenEndPointAuthMethod?[3,6]:[4,this._getNewAccessTokenByRefreshTokenWithNone(t)];case 5:return[2,e.sent()];case 6:return[2]}}))}))},t.prototype._revokeTokenWithClientSecretPost=function(t){return o(this,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e=this._generateTokenRequest({client_id:this.options.appId,client_secret:this.options.secret,token:t}),n="","oidc"===this.options.protocol?n=this.baseClient.appHost+"/oidc/token/revocation":"oauth"===this.options.protocol&&(n=this.baseClient.appHost+"/oauth/token/revocation"),[4,this.naiveHttpClient.request({method:"POST",url:n,data:e,headers:{"Content-Type":"application/x-www-form-urlencoded"}})];case 1:return[2,r.sent()]}}))}))},t.prototype._revokeTokenWithClientSecretBasic=function(t){return o(this,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:if(e="","oidc"===this.options.protocol)e=this.baseClient.appHost+"/oidc/token/revocation";else if("oauth"===this.options.protocol)throw new Error("OAuth 2.0 暂不支持用 client_secret_basic 模式身份验证撤回 Token");return n=this._generateTokenRequest({token:t}),[4,this.naiveHttpClient.request({data:n,method:"POST",url:e,headers:{Authorization:this._generateBasicAuthToken()}})];case 1:return[2,r.sent()]}}))}))},t.prototype._revokeTokenWithNone=function(t){return o(this,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="","oidc"===this.options.protocol?e=this.baseClient.appHost+"/oidc/token/revocation":"oauth"===this.options.protocol&&(e=this.baseClient.appHost+"/oauth/token/revocation"),n=this._generateTokenRequest({client_id:this.options.appId,token:t}),[4,this.naiveHttpClient.request({method:"POST",url:e,data:n})];case 1:return[2,r.sent()]}}))}))},t.prototype.revokeToken=function(t){return o(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:if(!["oauth","oidc"].includes(this.options.protocol))throw new Error("初始化 AuthenticationClient 时传入的 protocol 参数必须为 oauth 或 oidc,请检查参数");if(!this.options.secret&&"none"!==this.options.revocationEndPointAuthMethod)throw new Error("请在初始化 AuthenticationClient 时传入 appId 和 secret 参数");return"client_secret_post"!==this.options.revocationEndPointAuthMethod?[3,2]:[4,this._revokeTokenWithClientSecretPost(t)];case 1:return e.sent(),[2,!0];case 2:return"client_secret_basic"!==this.options.revocationEndPointAuthMethod?[3,4]:[4,this._revokeTokenWithClientSecretBasic(t)];case 3:return e.sent(),[2,!0];case 4:return"none"!==this.options.revocationEndPointAuthMethod?[3,6]:[4,this._revokeTokenWithNone(t)];case 5:return e.sent(),[2,!0];case 6:throw new Error("初始化 AuthenticationClient 时传入的 revocationEndPointAuthMethod 参数可选值为 client_secret_base、client_secret_post、none,请检查参数")}}))}))},t.prototype._introspectTokenWithClientSecretPost=function(t){return o(this,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e=this._generateTokenRequest({client_id:this.options.appId,client_secret:this.options.secret,token:t}),n="","oidc"===this.options.protocol?n=this.baseClient.appHost+"/oidc/token/introspection":"oauth"===this.options.protocol&&(n=this.baseClient.appHost+"/oauth/token/introspection"),[4,this.naiveHttpClient.request({method:"POST",url:n,data:e,headers:{"Content-Type":"application/x-www-form-urlencoded"}})];case 1:return[2,r.sent()]}}))}))},t.prototype._introspectTokenWithClientSecretBasic=function(t){return o(this,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="","oidc"===this.options.protocol?e=this.baseClient.appHost+"/oidc/token/introspection":"oauth"===this.options.protocol&&(e=this.baseClient.appHost+"/oauth/token/introspection"),n=this._generateTokenRequest({token:t}),[4,this.naiveHttpClient.request({data:n,method:"POST",url:e,headers:{Authorization:this._generateBasicAuthToken()}})];case 1:return[2,r.sent()]}}))}))},t.prototype._introspectTokenWithNone=function(t){return o(this,void 0,void 0,(function(){var e,n;return s(this,(function(r){switch(r.label){case 0:return e="","oidc"===this.options.protocol?e=this.baseClient.appHost+"/oidc/token/introspection":"oauth"===this.options.protocol&&(e=this.baseClient.appHost+"/oauth/token/introspection"),n=this._generateTokenRequest({client_id:this.options.appId,token:t}),[4,this.naiveHttpClient.request({method:"POST",url:e,data:n})];case 1:return[2,r.sent()]}}))}))},t.prototype.introspectToken=function(t){return o(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:if(!["oauth","oidc"].includes(this.options.protocol))throw new Error("初始化 AuthenticationClient 时传入的 protocol 参数必须为 oauth 或 oidc,请检查参数");if(!this.options.secret&&"none"!==this.options.introspectionEndPointAuthMethod)throw new Error("请在初始化 AuthenticationClient 时传入 appId 和 secret 参数");return"client_secret_post"!==this.options.introspectionEndPointAuthMethod?[3,2]:[4,this._introspectTokenWithClientSecretPost(t)];case 1:return[2,e.sent()];case 2:return"client_secret_basic"!==this.options.introspectionEndPointAuthMethod?[3,4]:[4,this._introspectTokenWithClientSecretBasic(t)];case 3:return[2,e.sent()];case 4:return"none"!==this.options.introspectionEndPointAuthMethod?[3,6]:[4,this._introspectTokenWithNone(t)];case 5:return[2,e.sent()];case 6:throw new Error("初始化 AuthenticationClient 时传入的 introspectionEndPointAuthMethod 参数可选值为 client_secret_base、client_secret_post、none,请检查参数")}}))}))},t.prototype.validateTicketV1=function(t,e){return o(this,void 0,void 0,(function(){var n,r,o,a,u;return s(this,(function(s){switch(s.label){case 0:return n=this.baseClient.appHost+"/cas-idp/"+this.options.appId+"/validate",[4,this.naiveHttpClient.request({method:"GET",url:n,params:{service:e,ticket:t}})];case 1:return r=s.sent(),o=r.split("\n"),a=o[0],u=o[1],[2,i(i({valid:"yes"===a},u&&{username:u}),"yes"!==a&&{message:"ticket 不合法"})]}}))}))},t.prototype.hasRole=function(t,e){return o(this,void 0,void 0,(function(){var n,r,i;return s(this,(function(o){switch(o.label){case 0:return[4,l.getUserRoles(this.graphqlClient,this.tokenProvider,{id:this.checkLoggedIn(),namespace:e})];case 1:return(n=o.sent().user)?(r=n.roles).totalCount<1?[2,!1]:(i=!1,r.list.forEach((function(e){e.code===t&&(i=!0)})),[2,i]):[2,!1]}}))}))},t.prototype.listApplications=function(t){return o(this,void 0,void 0,(function(){var e,n,r,i,o;return s(this,(function(s){switch(s.label){case 0:return n=(e=t||{}).page,r=void 0===n?1:n,i=e.limit,o=void 0===i?10:i,[4,this.httpClient.request({url:this.baseClient.appHost+"/api/v2/users/me/applications/allowed?page="+r+"&limit="+o,method:"GET"})];case 1:return[2,s.sent()]}}))}))},t.prototype.validateToken=function(t){return o(this,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:if(!t)throw new Error("请在传入的参数对象中包含 accessToken 或 idToken 字段");if(t.accessToken&&t.idToken)throw new Error("accessToken 和 idToken 只能传入一个,不能同时传入");return t.idToken?[4,this.naiveHttpClient.request({url:this.baseClient.appHost+"/api/v2/oidc/validate_token",method:"GET",params:{id_token:t.idToken}})]:[3,2];case 1:return[2,e.sent()];case 2:return t.accessToken?[4,this.naiveHttpClient.request({url:this.baseClient.appHost+"/api/v2/oidc/validate_token",method:"GET",params:{access_token:t.accessToken}})]:[3,4];case 3:return[2,e.sent()];case 4:return[2]}}))}))},t.prototype.setLang=function(t){this.options.lang=t},t}();e.AuthenticationClient=A},3242:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AuthenticationTokenProvider=void 0;var n="_authing_token",r="_authing_user",i=function(){function t(t){this.options=t,this.token=null,this.user=null}return t.prototype.setToken=function(t){"undefined"!=typeof localStorage?localStorage.setItem(n,t):this.token=t},t.prototype.getToken=function(){return"undefined"!=typeof localStorage?localStorage.getItem(n)||"":this.token},t.prototype.getUser=function(){return"undefined"!=typeof localStorage?localStorage.getItem(r)?JSON.parse(localStorage.getItem(r)):null:this.user},t.prototype.setUser=function(t){"undefined"!=typeof localStorage?(localStorage.setItem(r,JSON.stringify(t)),localStorage.setItem(n,t.token)):(this.user=t,this.token=t.token)},t.prototype.clearUser=function(){"undefined"!=typeof localStorage?(localStorage.removeItem(r),localStorage.removeItem(n)):(this.user=null,this.token=null)},t}();e.AuthenticationTokenProvider=i},9039:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseAuthenticationClient=void 0;var n=function(){function t(t){this.options=t}return Object.defineProperty(t.prototype,"appHost",{get:function(){var t=this.options,e=t.appHost,n=t.domain,r=t.host;return e?e.replace(/\/$/,""):n?new URL(this.options.host).protocol+"//"+this.options.domain:r},enumerable:!1,configurable:!0}),t}();e.BaseAuthenticationClient=n},9370:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.EnterpriseAuthenticationClient=void 0;var o=n(212),s=n(1721),a=n(1721),u=n(9039),h=function(){function t(t,e,n){this.options=t,this.baseClient=new u.BaseAuthenticationClient(t),this.tokenProvider=e,this.httpClient=n}return t.prototype.initProviderContext=function(t){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.httpClient.request({method:"GET",url:this.baseClient.appHost+"/api/v2/applications/"+t+"/public-config"})];case 1:return[2,e.sent()]}}))}))},t.prototype.getProviderConfigAndError=function(t,e,n){var r,i,o=null===(i=null===(r=e.identityProviders)||void 0===r?void 0:r.find((function(e){return e.protocol===t&&e.identifier===n})))||void 0===i?void 0:i.config;if(!o)throw new Error("身份源配置不存在");return o},t.prototype.getLoginUrl=function(t,e,n,r){var i=this.getProviderConfigAndError(t,e,n);switch(t){case o.Protocol.OIDC:i=i;var u=s.objectToQueryString({state:r,client_id:i.clientId,redirect_uri:i.redirectUri,scope:i.scopes,response_type:i.responseType,nonce:a.generateUidKey(32)});return i.authorizationEdpoint+"?"+u;case o.Protocol.SAML:return(i=i).samlRequest;case o.Protocol.CAS:return(i=i).casConnectionLoginUrl;case o.Protocol.OAUTH:return(i=i).authUrl;case o.Protocol.AZURE_AD:return(i=i).authorizationUrl;default:return""}},t.prototype.authorize=function(t,e,n){return r(this,void 0,void 0,(function(){var r,u,h,c,l,d,f,p,m,g,v=this;return i(this,(function(i){switch(i.label){case 0:return r=(n=n||{}).position,u=n.popup,h=void 0===u||u,c=n.onSuccess,l=n.onError,d=this.options.appId,[4,this.initProviderContext(d)];case 1:return f=i.sent(),p=a.generateUidKey(32),t!==o.Protocol.OIDC?[3,3]:[4,this.httpClient.request({method:"POST",url:this.baseClient.appHost+"/api/v2/connections/oidc/start-interaction",data:{state:p,protocol:t,userPoolId:f.userPoolId,appId:d,referer:window.location.href,connection:{providerIentifier:e}}})];case 2:i.sent(),i.label=3;case 3:return m=this.getLoginUrl(t,f,e,p),g=function(t){var e=t.data,n=e.code,r=e.message,i=e.data,o=e.event,s=(o=o||{}).source,a=o.eventType;if("authing"===s&&"enterpriseLogin"===a){try{var u=JSON.parse(r);r=u.message,n=u.code}catch(t){}200===n?(v.tokenProvider.setUser(i),c&&c(i)):l&&l(n,r),window.removeEventListener("message",g)}},window.addEventListener("message",g),s.isWechatBrowser()?window.location.href=m:h?s.popupCenter(m,r):window.open(m),[2]}}))}))},t}();e.EnterpriseAuthenticationClient=h},6151:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.MfaAuthenticationClient=void 0;var o=n(9039),s=n(1721),a=function(){function t(t,e,n){this.options=t,this.tokenProvider=e,this.httpClient=n,this.baseClient=new o.BaseAuthenticationClient(t)}return t.prototype.getMfaAuthenticators=function(t){return void 0===t&&(t={type:"totp",source:"SELF"}),r(this,void 0,void 0,(function(){var e,n,r,o,s;return i(this,(function(i){switch(i.label){case 0:return e=t.type,n=t.mfaToken,r=t.source,o=this.baseClient.appHost+"/api/v2/mfa/authenticator",s={},n&&(s.authorization="Bearer "+n),[4,this.httpClient.request({method:"GET",url:o,params:{type:e,source:r},headers:s})];case 1:return[2,i.sent()]}}))}))},t.prototype.assosicateMfaAuthenticator=function(t){return void 0===t&&(t={authenticatorType:"totp",source:"SELF"}),r(this,void 0,void 0,(function(){var e,n,r,o,s;return i(this,(function(i){switch(i.label){case 0:return e=t.authenticatorType,n=t.mfaToken,r=t.source,o={},n&&(o.authorization="Bearer "+n),s=this.baseClient.appHost+"/api/v2/mfa/totp/associate",[4,this.httpClient.request({method:"POST",url:s,data:{authenticator_type:e,source:r},headers:o})];case 1:return[2,i.sent()]}}))}))},t.prototype.deleteMfaAuthenticator=function(){return r(this,void 0,void 0,(function(){var t;return i(this,(function(e){switch(e.label){case 0:return t=this.baseClient.appHost+"/api/v2/mfa/totp/associate",[4,this.httpClient.request({method:"DELETE",url:t})];case 1:return e.sent(),[2,{code:200,message:"TOTP MFA 解绑成功"}]}}))}))},t.prototype.confirmAssosicateMfaAuthenticator=function(t){return void 0===t&&(t={authenticatorType:"totp",source:"SELF"}),r(this,void 0,void 0,(function(){var e,n,r,o,s,a;return i(this,(function(i){switch(i.label){case 0:return e=this.baseClient.appHost+"/api/v2/mfa/totp/associate/confirm",n=t.authenticatorType,r=t.totp,o=t.source,s=t.mfaToken,a={},s&&(a.authorization="Bearer "+s),[4,this.httpClient.request({method:"POST",url:e,data:{authenticator_type:n,totp:r,source:o}})];case 1:return i.sent(),[2,{code:200,message:"TOTP MFA 绑定成功"}]}}))}))},t.prototype.verifyTotpMfa=function(t){return r(this,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e=this.baseClient.appHost+"/api/v2/mfa/totp/verify",[4,this.httpClient.request({method:"POST",url:e,data:{totp:t.totp},headers:{authorization:"Bearer "+t.mfaToken}})];case 1:return[2,n.sent()]}}))}))},t.prototype.verifyAppSmsMfa=function(t){return r(this,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e=this.baseClient.appHost+"/api/v2/applications/mfa/sms/verify",[4,this.httpClient.request({method:"POST",url:e,data:{phone:t.phone,code:t.code},headers:{authorization:"Bearer "+t.mfaToken}})];case 1:return[2,n.sent()]}}))}))},t.prototype.verifyAppEmailMfa=function(t){return r(this,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e=this.baseClient.appHost+"/api/v2/applications/mfa/email/verify",[4,this.httpClient.request({method:"POST",url:e,data:{email:t.email,code:t.code},headers:{authorization:"Bearer "+t.mfaToken}})];case 1:return[2,n.sent()]}}))}))},t.prototype.phoneOrEmailBindable=function(t){var e=t.phone,n=t.email,o=t.mfaToken;return r(this,void 0,void 0,(function(){var t;return i(this,(function(r){switch(r.label){case 0:return t=this.baseClient.appHost+"/api/v2/applications/mfa/check",[4,this.httpClient.request({method:"POST",url:t,data:{email:n,phone:e},headers:{authorization:"Bearer "+o}})];case 1:return[2,r.sent()]}}))}))},t.prototype.verifyTotpRecoveryCode=function(t){return r(this,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e=this.baseClient.appHost+"/api/v2/mfa/totp/recovery",[4,this.httpClient.request({method:"POST",url:e,data:{recoveryCode:t.recoveryCode},headers:{authorization:"Bearer "+t.mfaToken}})];case 1:return[2,n.sent()]}}))}))},t.prototype.associateFaceByUrl=function(t){return r(this,void 0,void 0,(function(){var e,n,r,o,s;return i(this,(function(i){switch(i.label){case 0:return e=t.baseFace,n=t.compareFace,r=t.mfaToken,o={},r&&(o.authorization="Bearer "+r),s=this.baseClient.appHost+"/api/v2/mfa/face/associate",[4,this.httpClient.request({method:"POST",url:s,data:{photoA:e,photoB:n,isExternal:!0},headers:o})];case 1:return[2,i.sent()]}}))}))},t.prototype.associateFaceByLocalFile=function(t){return r(this,void 0,void 0,(function(){var e,n,r,o;return i(this,(function(i){switch(i.label){case 0:e={},t&&(e.authorization="Bearer "+t),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,s.uploadFile({accept:".jpeg,.jpg,.png,.bmp",url:this.baseClient.appHost+"/api/v2/upload?folder=face-photo&private=true"})];case 2:return r=i.sent().key,n=r,[3,4];case 3:return o=i.sent(),this.options.onError(o.code,o.message),[3,4];case 4:return[4,this.httpClient.request({method:"POST",url:this.baseClient.appHost+"/api/v2/mfa/face/associate",data:{photoA:n,photoB:n},headers:e})];case 5:return[2,i.sent()]}}))}))},t.prototype.associateFaceByBlob=function(t){return r(this,void 0,void 0,(function(){var e,n,r,o,a,u,h,c,l,d;return i(this,(function(i){switch(i.label){case 0:e=t.baseFace,n=t.compareFace,r=t.mfaToken,o={},r&&(o.authorization="Bearer "+r),h=this.baseClient.appHost+"/api/v2/upload?folder=face-photo&private=true",i.label=1;case 1:return i.trys.push([1,6,,7]),[4,s.xhrUpload(e,h)];case 2:return c=i.sent().key,a=c,n?[4,s.xhrUpload(n,h)]:[3,4];case 3:return l=i.sent().key,u=l,[3,5];case 4:u=c,i.label=5;case 5:return[3,7];case 6:return d=i.sent(),this.options.onError(d.code,d.message),[3,7];case 7:return[4,this.httpClient.request({method:"POST",url:this.baseClient.appHost+"/api/v2/mfa/face/associate",data:{photoA:a,photoB:u},headers:o})];case 8:return[2,i.sent()]}}))}))},t.prototype.verifyFaceMfa=function(t,e){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return n=this.baseClient.appHost+"/api/v2/mfa/face/verify",[4,this.httpClient.request({method:"POST",url:n,data:{photo:t},headers:{authorization:"Bearer "+e}})];case 1:return[2,r.sent()]}}))}))},t}();e.MfaAuthenticationClient=a},406:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.QrCodeAuthenticationClient=void 0;var o=n(1721),s=n(9039),a=function(){function t(t,e,n,r){this.options=t,this.tokenProvider=e,this.httpClient=n,this.scene=r,this.baseClient=new s.BaseAuthenticationClient(t)}return t.prototype.startScanning=function(t,e){return r(this,void 0,void 0,(function(){var n,s,a,u,h,c,l,d,f,p,m,g,v,b,y,w,_,M,S,E,A,k,x,R,I,T,C,B,D,P,U,O,N,q,L,j,K,$,z,H,W,V,F,J,G,Z,Y=this;return i(this,(function(X){return n=(e=e||{}).autoExchangeUserInfo,s=void 0!==n&&n,a=e.size,u=void 0===a?{height:240,width:240}:a,h=e.containerSize,c=void 0===h?{height:300,width:300}:h,l=e.interval,d=void 0===l?800:l,f=e.onStart,p=e.onResult,m=e.onScanned,g=e.onExpired,v=e.onSuccess,b=e.onCancel,y=e.onError,w=e.onCodeShow,_=e.onCodeLoaded,M=e.onCodeLoadFailed,S=e.tips,E=void 0===S?{}:S,A=e.context,k=e.customData,x=this.options.lang,R="zh-CN"===x,I=E.title,T=void 0===I?R?"使用 <strong> "+("WXAPP_AUTH"===this.scene?"微信":"APP")+" </strong> 扫码登录":"use <strong> "+("WXAPP_AUTH"===this.scene?"Wechat":"APP")+" </strong> scan code login":I,C=E.canceled,B=void 0===C?R?"用户取消授权":"User cancel authorization":C,D=E.expired,P=void 0===D?R?"二维码已过期":"QR code has expired":D,U=E.succeed,O=void 0===U?R?"扫码成功":"Scan code successfully":U,N=E.retry,q=void 0===N?R?"重试":"Retry":N,L=document.getElementById(t),K=!1,L?L.style.position="relative":((L=document.createElement("div")).id=t,o.createCssClassStyleSheet("__authing-qrcode-node-mount","z-index: 65535;position: fixed;background: #fff;width: "+c.width+"px;height: "+c.height+"px;left: 50%;margin-left: -"+c.width/2+"px;display: flex;justify-content: center;align-items: center;top: 50%;margin-top: -"+c.height/2+"px;border: 1px solid #ccc;"),L.classList.add("__authing-qrcode-node-mount"),document.getElementsByTagName("body")[0].appendChild(L),K=!0),$=document.createElement("style"),z="#authing__retry a:hover{outline:0px;text-decoration:none;}#authing__spinner{position:absolute;left:50%;margin-left:-6px;}.spinner{margin:100px auto;width:20px;height:20px;position:relative}.container1>div,.container2>div,.container3>div{width:6px;height:6px;background-color:#00a1ea;border-radius:100%;position:absolute;-webkit-animation:bouncedelay 1.2s infinite ease-in-out;animation:bouncedelay 1.2s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.spinner .spinner-container{position:absolute;width:100%;height:100%}.container2{-webkit-transform:rotateZ(45deg);transform:rotateZ(45deg)}.container3{-webkit-transform:rotateZ(90deg);transform:rotateZ(90deg)}.circle1{top:0;left:0}.circle2{top:0;right:0}.circle3{right:0;bottom:0}.circle4{left:0;bottom:0}.container2 .circle1{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.container3 .circle1{-webkit-animation-delay:-1.0s;animation-delay:-1.0s}.container1 .circle2{-webkit-animation-delay:-0.9s;animation-delay:-0.9s}.container2 .circle2{-webkit-animation-delay:-0.8s;animation-delay:-0.8s}.container3 .circle2{-webkit-animation-delay:-0.7s;animation-delay:-0.7s}.container1 .circle3{-webkit-animation-delay:-0.6s;animation-delay:-0.6s}.container2 .circle3{-webkit-animation-delay:-0.5s;animation-delay:-0.5s}.container3 .circle3{-webkit-animation-delay:-0.4s;animation-delay:-0.4s}.container1 .circle4{-webkit-animation-delay:-0.3s;animation-delay:-0.3s}.container2 .circle4{-webkit-animation-delay:-0.2s;animation-delay:-0.2s}.container3 .circle4{-webkit-animation-delay:-0.1s;animation-delay:-0.1s}@-webkit-keyframes bouncedelay{0%,80%,100%{-webkit-transform:scale(0.0)}40%{-webkit-transform:scale(1.0)}}@keyframes bouncedelay{0%,80%,100%{transform:scale(0.0);-webkit-transform:scale(0.0)}40%{transform:scale(1.0);-webkit-transform:scale(1.0)}}",$.type="text/css",$.style?$.style.cssText=z:$.innerHTML=z,document.getElementsByTagName("head")[0].appendChild($),H=function(){L.innerHTML='<div id="authing__spinner" class="spinner"><div class="spinner-container container1"><div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div></div><div class="spinner-container container2"><div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div></div><div class="spinner-container container3"><div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div></div></div>'},W=function(){var t=document.getElementById("authing__spinner");t&&L.removeChild(t)},V=function(t){var e;try{e=JSON.parse(t).message||t}catch(n){e=t}var n=document.createElement("span");return n.className="authing__heading-subtitle",K?(o.createCssClassStyleSheet("__authing__heading-subtitle-style","display: block;font-weight: 400;font-size: 12px;color: #888;"),n.classList.add("__authing__heading-subtitle-style")):(o.createCssClassStyleSheet("__authing__heading-subtitle-style","display: block;font-weight: 400;font-size: 15px;color: #888;line-height: 48px;"),n.classList.add("__authing__heading-subtitle-style")),n.innerHTML=e,n},F=function(t){var e=document.createElement("img");return e.className="authing__qrcode",e.src=t,e.width=u.width,e.height=u.height,e},J=function(t,e,n){var r="authing__retry";document.getElementById(r)&&document.getElementById(r).remove();var i=document.createElement("div");i.id=r,o.createCssClassStyleSheet("__authing-shadow-style","text-align:center;width: "+u.width+"px;height: "+u.height+"px;position: absolute;left: 50%;top: 0px;margin-left: -"+u.width/2+"px;background-color: rgba(0,0,0, 0.5);line-height:"+u.height+"px;color:#fff;font-weight:600;"),i.classList.add("__authing-shadow-style");var s=document.createElement("a");return s.innerHTML=t,s.style.color="#fff",s.style.borderBottom="1px solid #fff",s.style.cursor="pointer",e&&s.addEventListener("click",e),s.id=n,i.appendChild(s),i},G=function(t,e){var n="authing__retry";document.getElementById(n)&&document.getElementById(n).remove();var r=document.createElement("div");o.createCssClassStyleSheet("__authing-shadow-style-position","text-align:center;width: "+u.width+"px;height: "+u.height+"px;position: absolute;left: 50%;top: 0px;margin-left: -"+u.width/2+"px;line-height:"+u.height+"px;color:#fff;font-weight:600;display: flex;\n align-items: center; /*垂直居中*/\n justify-content: center; /*水平居中*/"),r.classList.add("__authing-shadow-style-position"),r.id=n;var i=document.createElement("img");return i.id="authing__scanned-user",i.src=e,i.style.width="100px",i.style.height="100px",r.appendChild(i),r},(Z=function(){return r(Y,void 0,void 0,(function(){var t,e,n,r,o,a=this;return i(this,(function(i){switch(i.label){case 0:H(),t=null,e=null,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.geneCode({context:A,customData:k})];case 2:return n=i.sent(),t=n.random,e=n.url,[3,4];case 3:return r=i.sent(),function(t,e,n){var r=V(e);(j=document.createElement("div")).id="authing__qrcode-wrapper",j.style.textAlign="center",j.style.position="relative";var i=F("https://usercontents.authing.cn/0ab3a1bf19c0d7106673e494d532f91a.png");i.style.marginTop=K?"16px":"12px",i.onload=function(){W()};var o=J(q,(function(){Z()}),"__authing_retry_btn");j.appendChild(i),j.appendChild(o),j.appendChild(r),t.appendChild(j)}(L,(r=r).message),M&&M(r),[2];case 4:return _&&_(t,e),(j=document.createElement("div")).id="authing__qrcode-wrapper",j.style.textAlign="center",j.style.position="relative",(o=F(e)).onload=function(){W(),w&&w(t,e),a.startPolling(t,{interval:d,onStart:f,onResult:p,onScanned:function(t){var e=G(t.nickname,t.photo);j.appendChild(e),m&&m(t)},onExpired:function(){var t=J(P,(function(){j.innerHTML="",Z()}),"__authing_success_tip");j.appendChild(t),g&&g()},onSuccess:function(t,e){var n=J(O,null,"__authing_success_tip");j.appendChild(n),v&&(s?t.token||a.exchangeUserInfo(e).then((function(t){a.tokenProvider.setUser(t),v(t,e)})):v(t,e))},onCancel:function(){var t=J(B,null,"__authing_success_tip");j.appendChild(t),b&&b()},onError:function(t){var e=t.message;y&&y(e)}});var n=V(T);j.appendChild(o),j.appendChild(n),L.appendChild(j)},[2]}}))}))})(),[2]}))}))},t.prototype.geneCode=function(t){return r(this,void 0,void 0,(function(){var e,n,r,o;return i(this,(function(i){switch(i.label){case 0:return n=(e=t||{}).context,r=e.customData,o=this.baseClient.appHost+"/api/v2/qrcode/gene",[4,this.httpClient.request({method:"POST",url:o,data:{scene:this.scene,context:n,params:r}})];case 1:return[2,i.sent()]}}))}))},t.prototype.checkStatus=function(t){return r(this,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e=this.baseClient.appHost+"/api/v2/qrcode/check?random="+t,[4,this.httpClient.request({method:"GET",url:e})];case 1:return[2,n.sent()]}}))}))},t.prototype.exchangeUserInfo=function(t){return r(this,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e=this.baseClient.appHost+"/api/v2/qrcode/userinfo",[4,this.httpClient.request({method:"POST",url:e,data:{ticket:t}})];case 1:return[2,n.sent()]}}))}))},t.prototype.startPolling=function(t,e){return r(this,void 0,void 0,(function(){var n,o,s,a,u,h,c,l,d,f,p,m,g=this;return i(this,(function(v){return n=(e=e||{}).interval,o=void 0===n?800:n,s=e.onStart,a=e.onResult,u=e.onScanned,h=e.onExpired,c=e.onSuccess,l=e.onCancel,d=e.onError,f=!1,p=!1,[2,m=setInterval((function(){return r(g,void 0,void 0,(function(){var e,n,r,o,g;return i(this,(function(i){switch(i.label){case 0:s&&!p&&(s(m),p=!0),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.checkStatus(t)];case 2:return e=i.sent(),n=e.status,r=e.ticket,o=e.userInfo,a&&a(e),-1===n&&(clearInterval(m),h&&h()),1===n&&u&&!f&&(u(o),f=!0),2===n&&(clearInterval(m),c&&c(o,r)),3===n&&(clearInterval(m),l&&l()),[3,4];case 3:return g=i.sent(),d&&d(g),clearInterval(m),[2];case 4:return[2]}}))}))}),o)]}))}))},t.prototype.stopPolling=function(t){return r(this,void 0,void 0,(function(){return i(this,(function(e){return clearInterval(t),[2]}))}))},t}();e.QrCodeAuthenticationClient=a},5618:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.SocialAuthenticationClient=void 0;var o=n(1721),s=n(9039),a=function(){function t(t,e,n){this.options=t,this.tokenProvider=e,this.httpClient=n,this.baseClient=new s.BaseAuthenticationClient(t)}return t.prototype.authorize=function(t,e){return r(this,void 0,void 0,(function(){var n,r,s,a,u,h,c,l,d,f,p,m,g,v,b=this;return i(this,(function(i){return n=(e=e||{}).position,r=e.popup,s=void 0===r||r,a=e.onSuccess,u=e.onError,h=e.authorization_params,c=e.authorizationParams,l=e.context,d=e.customData,f=e.withIdentities,p=void 0!==f&&f,m={from_guard:"1",app_id:this.options.appId,authorization_params:JSON.stringify(h||c),with_identities:p?"1":"0"},l&&(m.context=JSON.stringify(l)),d&&(m.custom_data=JSON.stringify(d)),g=this.baseClient.appHost+"/connections/social/"+t+o.objectToQueryString(m),v=function(t){var e=t.data,n=e.code,r=e.message,i=e.data,o=e.event,s=(o=o||{}).source,h=o.eventType;if("authing"===s&&"socialLogin"===h){try{var c=JSON.parse(r);r=c.message,n=c.code}catch(t){}200===n?(b.tokenProvider.setUser(i),a&&a(i)):u&&u(n,r),window.removeEventListener("message",v)}},window.addEventListener("message",v),o.isWechatBrowser()?window.location.href=g:s?o.popupCenter(g,n):window.open(g),[2]}))}))},t}();e.SocialAuthenticationClient=a},212:(t,e)=>{"use strict";var n,r,i,o,s,a,u;Object.defineProperty(e,"__esModule",{value:!0}),e.OIDCConnectionMode=e.LoginMethods=e.RegisterMethods=e.AppPasswordStrengthLimit=e.Protocol=e.SocialConnectionProvider=e.PasswordSecurityLevel=void 0,(u=e.PasswordSecurityLevel||(e.PasswordSecurityLevel={}))[u.LOW=1]="LOW",u[u.MIDDLE=2]="MIDDLE",u[u.HIGH=3]="HIGH",(a=e.SocialConnectionProvider||(e.SocialConnectionProvider={})).ALIPAY="alipay",a.GOOGLE="google",a.WECHATPC="wechat:pc",a.WECHATMP="wechat:webpage-authorization",a.WECHAT_MINIPROGRAM="wechat:miniprogram:default",a.WECHAT_MINIPROGRAM_QRCODE="wechat:miniprogram:qrconnect",a.WECHAT_MINIPROGRAM_APPLAUNCH="wechat:miniprogram:app-launch",a.WECHATMOBILE="wechat:mobile",a.GITHUB="github",a.QQ="qq",a.WECHATWORK_ADDRESS_BOOK="wechatwork:addressbook",a.WECHATWORK_CORP_QRCONNECT="wechatwork:corp:qrconnect",a.WECHATWORK_SERVICEPROVIDER_QRCONNECT="wechatwork:service-provider:qrconnect",a.DINGTALK="dingtalk",a.WEIBO="weibo",a.APPLE="apple",a.APPLE_WEB="apple:web",a.OAUTH="oauth",a.BAIDU="baidu",(s=e.Protocol||(e.Protocol={})).OIDC="oidc",s.OAUTH="oauth",s.SAML="saml",s.CAS="cas",s.AZURE_AD="azure-ad",(o=e.AppPasswordStrengthLimit||(e.AppPasswordStrengthLimit={}))[o.NoCheck=0]="NoCheck",o[o.Low=1]="Low",o[o.Middle=2]="Middle",o[o.High=3]="High",(i=e.RegisterMethods||(e.RegisterMethods={})).Email="email",i.Phone="phone",(r=e.LoginMethods||(e.LoginMethods={})).LDAP="ldap",r.AppQr="app-qrcode",r.Password="password",r.PhoneCode="phone-code",r.WxMinQr="wechat-miniprogram-qrcode",r.AD="ad",(n=e.OIDCConnectionMode||(e.OIDCConnectionMode={})).FRONT_CHANNEL="FRONT_CHANNEL",n.BACK_CHANNEL="BACK_CHANNEL"},1277:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.GraphqlClient=void 0;var s=n(8217),a=o(n(9669)),u=function(){function t(t,e){this.endpoint=t,this.options=e,this.axios=a.default.create({withCredentials:!0})}return t.prototype.request=function(t){var e,n;return r(this,void 0,void 0,(function(){var r,o,a,u,h,c,l,d,f,p,m,g,v,b=this;return i(this,(function(i){switch(i.label){case 0:r=t.query,o=t.token,a=t.variables,(u={"content-type":"application/json"})[this.options.headers["app-id"]]=this.options.appId||"",u[this.options.headers["userpool-id"]]=this.options.userPoolId||"",u[this.options.headers["request-from"]]=this.options.requestFrom||"sdk",u[this.options.headers["sdk-version"]]="js:"+s.SDK_VERSION,u[this.options.headers.lang]=this.options.lang||"",o&&(u.Authorization="Bearer "+o),h=null,c=null,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.axios({url:this.endpoint,data:{query:r,variables:a},method:"post",headers:u,timeout:this.options.timeout})];case 2:return l=i.sent().data,h=l.data,c=l.errors,[3,4];case 3:throw d=i.sent(),f=d.code||(null===(e=null==d?void 0:d.response)||void 0===e?void 0:e.status),p=d.message||(null===(n=null==d?void 0:d.response)||void 0===n?void 0:n.data),this.options.onError(f||500,d.message,p),{code:f||500,message:d.message,data:p};case 4:if((null==c?void 0:c.length)>0)throw m=null,g=null,v=null,c.map((function(t){var e=t.message,n=e.code,r=e.message,i=e.data;g=n,m=r,v=i,b.options.onError(n,r,v)})),{code:g,message:m,data:v};return[2,h]}}))}))},t}();e.GraphqlClient=u},9584:function(t,e,n){"use strict";var r,i=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},s=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},a=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},u=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.NaiveHttpClient=e.HttpClient=void 0;var h=n(8217),c=u(n(9669)),l=function(){function t(t,e){this.options=t,this.tokenProvider=e,this.axios=c.default.create({withCredentials:!0})}return t.prototype.request=function(t){return s(this,void 0,void 0,(function(){var e,n,r,i,o;return a(this,(function(s){switch(s.label){case 0:return(e={})[this.options.headers["app-id"]]=this.options.appId||"",e[this.options.headers["userpool-id"]]=this.options.userPoolId||"",e[this.options.headers["request-from"]]=this.options.requestFrom||"sdk",e[this.options.headers["sdk-version"]]="js:"+h.SDK_VERSION,e[this.options.headers.lang]=this.options.lang||"",t&&t.headers&&t.headers.authorization?[3,2]:[4,this.tokenProvider.getToken()];case 1:return(n=s.sent())&&(e.Authorization="Bearer "+n),[3,3];case 2:e.authorization=t.headers.authorization,s.label=3;case 3:return t.headers=e,t.timeout=this.options.timeout,[4,this.axios.request(t)];case 4:if(r=s.sent().data,i=r.code,o=r.message,200!==i)throw this.options.onError(i,o,r.data),new Error(JSON.stringify({code:i,message:o,data:r.data}));return[2,r.data]}}))}))},t}();e.HttpClient=l;var d=function(t){function e(e,n){return t.call(this,e,n)||this}return i(e,t),e.prototype.request=function(t){return s(this,void 0,void 0,(function(){var e;return a(this,(function(n){switch(n.label){case 0:return(e={})[this.options.headers["app-id"]]=this.options.appId||"",e[this.options.headers["userpool-id"]]=this.options.userPoolId||"",e[this.options.headers["request-from"]]=this.options.requestFrom||"sdk",e[this.options.headers["sdk-version"]]="js:"+h.SDK_VERSION,e[this.options.headers.lang]=this.options.lang||"",t.headers=o(o({},e),t.headers),t.timeout=this.options.timeout,[4,this.axios.request(t)];case 1:return[2,n.sent().data]}}))}))},e}(l);e.NaiveHttpClient=d},1764:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.PublicKeyManager=void 0;var o=n(9039),s=function(){function t(t,e){this.options=t,this.baseClient=new o.BaseAuthenticationClient(this.options),this.httpClient=e}return t.prototype.getPublicKey=function(){return r(this,void 0,void 0,(function(){var t,e,n;return i(this,(function(r){switch(r.label){case 0:return this.options.publicKey?[2,this.options.publicKey]:this.publicKey?[2,this.publicKey]:(t=this.baseClient.appHost+"/api/v2/.well-known",[4,this.httpClient.request({method:"GET",url:t})]);case 1:return e=r.sent(),n=e.publicKey,this.publicKey=n,[2,this.publicKey]}}))}))},t}();e.PublicKeyManager=s},9550:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.searchNodes=e.authorizedTargets=e.authorizeResource=e.listAuthorizedResources=e.listNodeByCodeAuthorizedResources=e.listNodeByIdAuthorizedResources=e.listGroupAuthorizedResources=e.listRoleAuthorizedResources=e.listUserAuthorizedResources=e.refreshAccessToken=e.getAccessToken=e.unbindEmail=e.getUserGroups=e.removeUserFromGroup=e.addUserToGroup=e.deleteGroups=e.updateGroup=e.createGroup=e.groupWithUsersWithCustomData=e.groupWithUsers=e.group=e.getGroups=e.checkLoginStatus=e.disablePolicyAssignment=e.enablePolicyAssignment=e.removePolicyAssignments=e.addPolicyAssignments=e.policyAssignments=e.deletePolicies=e.deletePolicy=e.updatePolicy=e.policy=e.createPolicy=e.policies=e.deleteRoles=e.deleteRole=e.udf=e.removeUdf=e.setUdf=e.removeUdv=e.setUdfValueBatch=e.setUdvBatch=e.setUdv=e.udfValueBatch=e.udv=e.addWhiteList=e.removeWhiteList=e.getWhiteList=e.allow=e.setMainDepartment=e.getUserDepartments=e.getUserRoles=e.userBatchWithCustomData=e.userBatch=e.unbindPhone=e.bindEmail=e.bindPhone=e.updateEmail=e.updatePhone=e.updatePassword=e.isUserExists=e.refreshToken=e.removeMembers=e.moveNode=e.nodeById=e.deleteNode=e.updateNode=e.addNode=e.updateRole=e.roleWithUsersWithCustomData=e.roleWithUsers=e.role=e.roles=e.deleteUsers=e.deleteUser=e.createUser=e.findUserWithCustomData=e.findUser=e.searchUserWithCustomData=e.searchUser=e.updateUser=e.updateUserpool=e.archivedUsers=e.usersWithCustomData=e.users=e.resetPasswordByFirstLoginToken=e.resetPassword=e.sendFirstLoginVerifyEmail=e.sendEmail=e.getMembersByCode=e.getMembersById=e.moveMembers=e.addMember=e.revokeRole=e.assignRole=e.addRole=e.registerByPhoneCode=e.registerByUsername=e.loginBySubAccount=e.loginByPhonePassword=e.loginByPhoneCode=e.loginByUsername=e.loginByEmail=e.registerByEmail=e.checkPasswordStrength=e.isDenied=e.deleteOrg=e.createOrg=e.userWithCustomData=e.user=e.getUserPoolDetail=e.orgs=e.rootNode=e.isRootNode=e.org=e.getChildrenNodes=e.isAllowed=void 0;var o=n(9676);e.isAllowed=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.IsActionAllowedDocument,[4,e.getToken()];case 1:return s=i.sent(),[4,t.request({query:r,token:s,variables:n})];case 2:return[2,i.sent()]}}))}))},e.getChildrenNodes=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.ChildrenNodesDocument,[4,e.getToken()];case 1:return s=i.sent(),[4,t.request({query:r,token:s,variables:n})];case 2:return[2,i.sent()]}}))}))},e.org=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.OrgDocument,[4,e.getToken()];case 1:return s=i.sent(),[4,t.request({query:r,token:s,variables:n})];case 2:return[2,i.sent()]}}))}))},e.isRootNode=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.IsRootNodeDocument,[4,e.getToken()];case 1:return s=i.sent(),[4,t.request({query:r,token:s,variables:n})];case 2:return[2,i.sent()]}}))}))},e.rootNode=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.RootNodeDocument,[4,e.getToken()];case 1:return s=i.sent(),[4,t.request({query:r,token:s,variables:n})];case 2:return[2,i.sent()]}}))}))},e.orgs=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.OrgsDocument,[4,e.getToken()];case 1:return s=i.sent(),[4,t.request({query:r,token:s,variables:n})];case 2:return[2,i.sent()]}}))}))},e.getUserPoolDetail=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.UserpoolDocument,[4,e.getToken()];case 1:return s=i.sent(),[4,t.request({query:r,token:s,variables:n})];case 2:return[2,i.sent()]}}))}))},e.user=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.UserDocument,[4,e.getToken()];case 1:return s=i.sent(),[4,t.request({query:r,token:s,variables:n})];case 2:return[2,i.sent()]}}))}))},e.userWithCustomData=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.UserWithCustomDataDocument,[4,e.getToken()];case 1:return s=i.sent(),[4,t.request({query:r,token:s,variables:n})];case 2:return[2,i.sent()]}}))}))},e.createOrg=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.CreateOrgDocument,[4,e.getToken()];case 1:return s=i.sent(),[4,t.request({query:r,token:s,variables:n})];case 2:return[2,i.sent()]}}))}))},e.deleteOrg=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.DeleteOrgDocument,[4,e.getToken()];case 1:return s=i.sent(),[4,t.request({query:r,token:s,variables:n})];case 2:return[2,i.sent()]}}))}))},e.isDenied=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.IsActionDeniedDocument,[4,e.getToken()];case 1:return s=i.sent(),[4,t.request({query:r,token:s,variables:n})];case 2:return[2,i.sent()]}}))}))},e.checkPasswordStrength=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.CheckPasswordStrengthDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.registerByEmail=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.RegisterByEmailDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.loginByEmail=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){return r=o.LoginByEmailDocument,s=e.getToken(),[2,t.request({query:r,token:s,variables:n})]}))}))},e.loginByUsername=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){return r=o.LoginByUsernameDocument,s=e.getToken(),[2,t.request({query:r,token:s,variables:n})]}))}))},e.loginByPhoneCode=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){return r=o.LoginByPhoneCodeDocument,s=e.getToken(),[2,t.request({query:r,token:s,variables:n})]}))}))},e.loginByPhonePassword=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){return r=o.LoginByPhonePasswordDocument,s=e.getToken(),[2,t.request({query:r,token:s,variables:n})]}))}))},e.loginBySubAccount=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){return r=o.LoginBySubAccountDocument,s=e.getToken(),[2,t.request({query:r,token:s,variables:n})]}))}))},e.registerByUsername=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){return r=o.RegisterByUsernameDocument,s=e.getToken(),[2,t.request({query:r,token:s,variables:n})]}))}))},e.registerByPhoneCode=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){return r=o.RegisterByPhoneCodeDocument,s=e.getToken(),[2,t.request({query:r,token:s,variables:n})]}))}))},e.addRole=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.CreateRoleDocument,[4,e.getToken()];case 1:return s=i.sent(),[4,t.request({query:r,token:s,variables:n})];case 2:return[2,i.sent()]}}))}))},e.assignRole=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.AssignRoleDocument,[4,e.getToken()];case 1:return s=i.sent(),[4,t.request({query:r,token:s,variables:n})];case 2:return[2,i.sent()]}}))}))},e.revokeRole=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.RevokeRoleDocument,[4,e.getToken()];case 1:return s=i.sent(),[4,t.request({query:r,token:s,variables:n})];case 2:return[2,i.sent()]}}))}))},e.addMember=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.AddMemberDocument,[4,e.getToken()];case 1:return s=i.sent(),[4,t.request({query:r,token:s,variables:n})];case 2:return[2,i.sent()]}}))}))},e.moveMembers=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.MoveMembersDocument,[4,e.getToken()];case 1:return s=i.sent(),[4,t.request({query:r,token:s,variables:n})];case 2:return[2,i.sent()]}}))}))},e.getMembersById=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.NodeByIdWithMembersDocument,[4,e.getToken()];case 1:return s=i.sent(),[4,t.request({query:r,token:s,variables:n})];case 2:return[2,i.sent()]}}))}))},e.getMembersByCode=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.NodeByCodeWithMembersDocument,[4,e.getToken()];case 1:return s=i.sent(),[4,t.request({query:r,token:s,variables:n})];case 2:return[2,i.sent()]}}))}))},e.sendEmail=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.SendEmailDocument,[4,e.getToken()];case 1:return s=i.sent(),[4,t.request({query:r,token:s,variables:n})];case 2:return[2,i.sent()]}}))}))},e.sendFirstLoginVerifyEmail=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.SendFirstLoginVerifyEmailDocument,[4,e.getToken()];case 1:return s=i.sent(),[4,t.request({query:r,token:s,variables:n})];case 2:return[2,i.sent()]}}))}))},e.resetPassword=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.ResetPasswordDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.resetPasswordByFirstLoginToken=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.ResetPasswordByFirstLoginTokenDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.users=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.UsersDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.usersWithCustomData=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.UsersWithCustomDataDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.archivedUsers=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.ArchivedUsersDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.updateUserpool=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.UpdateUserpoolDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.updateUser=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.UpdateUserDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.searchUser=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.SearchUserDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.searchUserWithCustomData=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.SearchUserWithCustomDataDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.findUser=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.FindUserDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.findUserWithCustomData=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.FindUserWithCustomDataDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.createUser=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.CreateUserDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.deleteUser=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.DeleteUserDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.deleteUsers=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.DeleteUsersDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.roles=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.RolesDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.role=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.RoleDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.roleWithUsers=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.RoleWithUsersDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.roleWithUsersWithCustomData=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.RoleWithUsersWithCustomDataDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.updateRole=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.UpdateRoleDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.addNode=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.AddNodeV2Document,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.updateNode=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.UpdateNodeDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.deleteNode=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.DeleteNodeDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.nodeById=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.NodeByIdDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.moveNode=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.MoveNodeDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.removeMembers=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.RemoveMemberDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.refreshToken=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.RefreshTokenDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.isUserExists=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.IsUserExistsDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.updatePassword=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.UpdatePasswordDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.updatePhone=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.UpdatePhoneDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.updateEmail=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.UpdateEmailDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.bindPhone=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.BindPhoneDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.bindEmail=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.BindEmailDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.unbindPhone=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.UnbindPhoneDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.userBatch=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.UserBatchDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.userBatchWithCustomData=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.UserBatchWithCustomDataDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.getUserRoles=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.GetUserRolesDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.getUserDepartments=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.GetUserDepartmentsDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.setMainDepartment=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.SetMainDepartmentDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.allow=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.AllowDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.getWhiteList=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.WhitelistDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.removeWhiteList=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.RemoveWhitelistDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.addWhiteList=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.AddWhitelistDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.udv=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.UdvDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.udfValueBatch=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.UdfValueBatchDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.setUdv=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.SetUdvDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.setUdvBatch=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.SetUdvBatchDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.setUdfValueBatch=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.SetUdfValueBatchDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.removeUdv=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.RemoveUdvDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.setUdf=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.SetUdfDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.removeUdf=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.RemoveUdfDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.udf=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.UdfDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.deleteRole=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.DeleteRoleDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.deleteRoles=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.DeleteRolesDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.policies=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.PoliciesDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.createPolicy=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.CreatePolicyDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.policy=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.PolicyDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.updatePolicy=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.UpdatePolicyDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.deletePolicy=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.DeletePolicyDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.deletePolicies=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.DeletePoliciesDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.policyAssignments=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.PolicyAssignmentsDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.addPolicyAssignments=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.AddPolicyAssignmentsDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.removePolicyAssignments=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.RemovePolicyAssignmentsDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.enablePolicyAssignment=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.EnablePolicyAssignmentDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.disablePolicyAssignment=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.DisbalePolicyAssignmentDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.checkLoginStatus=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.CheckLoginStatusDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.getGroups=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.GroupsDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.group=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.GroupDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.groupWithUsers=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.GroupWithUsersDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.groupWithUsersWithCustomData=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.GroupWithUsersWithCustomDataDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.createGroup=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.CreateGroupDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.updateGroup=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.UpdateGroupDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.deleteGroups=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.DeleteGroupsDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.addUserToGroup=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.AddUserToGroupDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.removeUserFromGroup=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.RemoveUserFromGroupDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.getUserGroups=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.GetUserGroupsDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.unbindEmail=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.UnbindEmailDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.getAccessToken=function(t,e){return r(void 0,void 0,void 0,(function(){var n;return i(this,(function(r){return n=o.AccessTokenDocument,[2,t.request({query:n,variables:e})]}))}))},e.refreshAccessToken=function(t,e){return r(void 0,void 0,void 0,(function(){var n;return i(this,(function(r){return n=o.RefreshTokenDocument,[2,t.request({query:n,variables:e})]}))}))},e.listUserAuthorizedResources=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.ListUserAuthorizedResourcesDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.listRoleAuthorizedResources=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.ListRoleAuthorizedResourcesDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.listGroupAuthorizedResources=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.ListGroupAuthorizedResourcesDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.listNodeByIdAuthorizedResources=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.ListNodeByIdAuthorizedResourcesDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.listNodeByCodeAuthorizedResources=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.ListNodeByCodeAuthorizedResourcesDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.listAuthorizedResources=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.AuthorizedResourcesDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.authorizeResource=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.AuthorizeResourceDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.authorizedTargets=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.AuthorizedTargetsDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))},e.searchNodes=function(t,e,n){return r(void 0,void 0,void 0,(function(){var r,s;return i(this,(function(i){switch(i.label){case 0:return r=o.SearchNodesDocument,[4,e.getToken()];case 1:return s=i.sent(),[2,t.request({query:r,token:s,variables:n})]}}))}))}},7522:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.AclManagementClient=void 0;var s=n(9550),a=n(1721),u=function(){function t(t,e,n,r){this.options=t,this.graphqlClient=e,this.httpClient=n,this.tokenProvider=r}return t.randomString=function(t){void 0===t&&(t=32),t=t||32;for(var e="abcdefhijkmnprstwxyz2345678",n=e.length,r="",i=0;i<t;i++)r+=e.charAt(Math.floor(Math.random()*n));return r},t.prototype.allow=function(t,e,n,r){return i(this,void 0,void 0,(function(){return o(this,(function(i){switch(i.label){case 0:return[4,s.allow(this.graphqlClient,this.tokenProvider,{resource:e,action:n,userId:t,namespace:r})];case 1:return[2,i.sent().allow]}}))}))},t.prototype.isAllowed=function(t,e,n,r){return i(this,void 0,void 0,(function(){var i;return o(this,(function(o){switch(o.label){case 0:return i=(r||{}).namespace,[4,s.isAllowed(this.graphqlClient,this.tokenProvider,{resource:e,action:n,userId:t,namespace:i})];case 1:return[2,o.sent().isActionAllowed]}}))}))},t.prototype.listAuthorizedResources=function(t,e,n,r){return i(this,void 0,void 0,(function(){var i,u,h,c;return o(this,(function(o){switch(o.label){case 0:return i=(r||{}).resourceType,[4,s.listAuthorizedResources(this.graphqlClient,this.tokenProvider,{targetType:t,targetIdentifier:e,namespace:n,resourceType:i})];case 1:return u=o.sent().authorizedResources,h=u.list,c=u.totalCount,[2,{list:h=a.formatAuthorizedResources(h),totalCount:c}]}}))}))},t.prototype.authorizeResource=function(t){return i(this,void 0,void 0,(function(){var e,n,r;return o(this,(function(i){switch(i.label){case 0:return e=t.namespace,n=t.resource,r=t.opts,[4,s.authorizeResource(this.graphqlClient,this.tokenProvider,{namespace:e,resource:n,opts:r})];case 1:return[2,i.sent().authorizeResource]}}))}))},t.prototype.getAuthorizedTargets=function(t){return i(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:if(!t)throw new Error("请传入 options.namespace、options.resource、options.actions,含义为权限分组标识、资源标识、资源操作标识");if(!t.namespace)throw new Error("请传入 options.namespace,含义为权限分组标识");if(!t.resource)throw new Error("请传入 options.resource,含义为资源标识");if(!t.resourceType)throw new Error("请传入 options.resourceType,含义为资源类型");return[4,s.authorizedTargets(this.graphqlClient,this.tokenProvider,{namespace:t.namespace,resourceType:t.resourceType,resource:t.resource,targetType:t.targetType,actions:t.actions})];case 1:return[2,e.sent().authorizedTargets]}}))}))},t.prototype.listResources=function(t){return i(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.httpClient.request({method:"GET",url:this.options.host+"/api/v2/resources",params:{namespace:(null==t?void 0:t.namespace)||(null==t?void 0:t.namespaceCode),type:null==t?void 0:t.type,limit:(null==t?void 0:t.limit)||10,page:(null==t?void 0:t.page)||1}})];case 1:return[2,e.sent()]}}))}))},t.prototype.getResources=function(t){return i(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.listResources(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.createResource=function(t){return i(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:if(!t)throw new Error("请传入资源数据");if(!t.code)throw new Error("请为资源设定一个资源标识符");if(!t.actions||0===(null==t?void 0:t.actions.length))throw new Error("请至少定义一个资源操作");if(!t.namespace)throw new Error("请传入权限分组标识符");return[4,this.httpClient.request({method:"POST",url:this.options.host+"/api/v2/resources",data:t})];case 1:return[2,e.sent()]}}))}))},t.prototype.updateResource=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:if(!t)throw new Error("请传入资源标识符");return[4,this.httpClient.request({method:"POST",url:this.options.host+"/api/v2/resources/"+t,data:e})];case 1:return[2,n.sent()]}}))}))},t.prototype.deleteResource=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:if(!t)throw new Error("请传入资源标识符");if(!e)throw new Error("请传入权限分组标识符");return[4,this.httpClient.request({method:"DELETE",url:this.options.host+"/api/v2/resources/"+t,params:{namespace:e}})];case 1:return n.sent(),[2,!0]}}))}))},t.prototype.getApplicationAccessPolicies=function(t){return i(this,void 0,void 0,(function(){var e,n,r;return o(this,(function(i){switch(i.label){case 0:if(!(null==t?void 0:t.appId))throw new Error("请传入 appId");return e=t.appId,n=t.page,r=t.limit,[4,this.httpClient.request({method:"GET",url:this.options.host+"/api/v2/applications/"+e+"/authorization/records",params:{page:n,limit:r}})];case 1:return[2,i.sent()]}}))}))},t.prototype.enableApplicationAccessPolicy=function(t){return i(this,void 0,void 0,(function(){var e,n,r,i,s;return o(this,(function(o){switch(o.label){case 0:if(!(null==t?void 0:t.appId))throw new Error("请传入 appId");if(!(null==t?void 0:t.targetType))throw new Error("请传入主体类型,可选值为 USER、ROLE、ORG、GROUP,含义为用户、角色、组织机构节点、用户分组");if(!(null==t?void 0:t.targetIdentifiers))throw new Error("请传入主体 id");return e=t.namespace,n=t.targetIdentifiers,r=t.targetType,i=t.appId,s=t.inheritByChildren,[4,this.httpClient.request({method:"POST",url:this.options.host+"/api/v2/applications/"+i+"/authorization/enable-effect",data:{targetType:r,namespace:e,targetIdentifiers:n,inheritByChildren:s}})];case 1:return o.sent(),[2,{code:200,message:"启用应用访问控制策略成功"}]}}))}))},t.prototype.disableApplicationAccessPolicy=function(t){return i(this,void 0,void 0,(function(){var e,n,r,i,s;return o(this,(function(o){switch(o.label){case 0:if(!(null==t?void 0:t.appId))throw new Error("请传入 appId");if(!(null==t?void 0:t.targetType))throw new Error("请传入主体类型,可选值为 USER、ROLE、ORG、GROUP,含义为用户、角色、组织机构节点、用户分组");if(!(null==t?void 0:t.targetIdentifiers))throw new Error("请传入主体 id");return e=t.namespace,n=t.targetIdentifiers,r=t.targetType,i=t.appId,s=t.inheritByChildren,[4,this.httpClient.request({method:"POST",url:this.options.host+"/api/v2/applications/"+i+"/authorization/disable-effect",data:{targetType:r,namespace:e,targetIdentifiers:n,inheritByChildren:s}})];case 1:return o.sent(),[2,{code:200,message:"停用应用访问控制策略成功"}]}}))}))},t.prototype.deleteApplicationAccessPolicy=function(t){return i(this,void 0,void 0,(function(){var e,n,r,i,s;return o(this,(function(o){switch(o.label){case 0:if(!(null==t?void 0:t.appId))throw new Error("请传入 appId");if(!(null==t?void 0:t.targetType))throw new Error("请传入主体类型,可选值为 USER、ROLE、ORG、GROUP,含义为用户、角色、组织机构节点、用户分组");if(!(null==t?void 0:t.targetIdentifiers))throw new Error("请传入主体 id");return e=t.namespace,n=t.targetIdentifiers,r=t.targetType,i=t.appId,s=t.inheritByChildren,[4,this.httpClient.request({method:"POST",url:this.options.host+"/api/v2/applications/"+i+"/authorization/revoke",data:{targetType:r,namespace:e,targetIdentifiers:n,inheritByChildren:s}})];case 1:return o.sent(),[2,{code:200,message:"删除应用访问控制策略成功"}]}}))}))},t.prototype.allowAccessApplication=function(t){return i(this,void 0,void 0,(function(){var e,n,r,i,s;return o(this,(function(o){switch(o.label){case 0:if(!(null==t?void 0:t.appId))throw new Error("请传入 appId");if(!(null==t?void 0:t.targetType))throw new Error("请传入主体类型,可选值为 USER、ROLE、ORG、GROUP,含义为用户、角色、组织机构节点、用户分组");if(!(null==t?void 0:t.targetIdentifiers))throw new Error("请传入主体 id");return e=t.namespace,n=t.targetIdentifiers,r=t.targetType,i=t.appId,s=t.inheritByChildren,[4,this.httpClient.request({method:"POST",url:this.options.host+"/api/v2/applications/"+i+"/authorization/allow",data:{targetType:r,namespace:e,targetIdentifiers:n,inheritByChildren:s}})];case 1:return o.sent(),[2,{code:200,message:"允许主体访问应用的策略配置已生效"}]}}))}))},t.prototype.denyAccessApplication=function(t){return i(this,void 0,void 0,(function(){var e,n,r,i,s;return o(this,(function(o){switch(o.label){case 0:if(!(null==t?void 0:t.appId))throw new Error("请传入 appId");if(!(null==t?void 0:t.targetType))throw new Error("请传入主体类型,可选值为 USER、ROLE、ORG、GROUP,含义为用户、角色、组织机构节点、用户分组");if(!(null==t?void 0:t.targetIdentifiers))throw new Error("请传入主体 id");return e=t.namespace,n=t.targetIdentifiers,r=t.targetType,i=t.appId,s=t.inheritByChildren,[4,this.httpClient.request({method:"POST",url:this.options.host+"/api/v2/applications/"+i+"/authorization/deny",data:{targetType:r,namespace:e,targetIdentifiers:n,inheritByChildren:s}})];case 1:return o.sent(),[2,{code:200,message:"拒绝主体访问应用的策略配置已生效"}]}}))}))},t.prototype.updateDefaultApplicationAccessPolicy=function(t){return i(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:if(!(null==t?void 0:t.appId))throw new Error("请传入应用 id");if(!(null==t?void 0:t.defaultStrategy))throw new Error("请传入默认策略,可选值为 ALLOW_ALL、DENY_ALL,含义为默认允许所有用户登录应用、默认拒绝所有用户登录应用");return[4,this.httpClient.request({method:"POST",url:this.options.host+"/api/v2/applications/"+t.appId,data:{permissionStrategy:{defaultStrategy:t.defaultStrategy}}})];case 1:return[2,e.sent()]}}))}))},t.prototype.programmaticAccessAccountList=function(t,e,n){return void 0===e&&(e=1),void 0===n&&(n=10),i(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,this.httpClient.request({method:"GET",url:this.options.host+"/api/v2/applications/"+t+"/programmatic-access-accounts?limit="+n+"&page="+e})];case 1:return[2,r.sent()]}}))}))},t.prototype.createProgrammaticAccessAccount=function(t,e){return void 0===e&&(e={tokenLifetime:600}),i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.httpClient.request({method:"POST",url:this.options.host+"/api/v2/applications/"+t+"/programmatic-access-accounts",data:r({},e)})];case 1:return[2,n.sent()]}}))}))},t.prototype.deleteProgrammaticAccessAccount=function(t){return i(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.httpClient.request({method:"DELETE",url:this.options.host+"/api/v2/applications/programmatic-access-accounts?id="+t})];case 1:return e.sent(),[2,!0];case 2:throw e.sent();case 3:return[2]}}))}))},t.prototype.refreshProgrammaticAccessAccountSecret=function(e,n){return void 0===n&&(n=t.randomString(32)),i(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.httpClient.request({method:"PATCH",url:this.options.host+"/api/v2/applications/programmatic-access-accounts",data:{id:e,secret:n}})];case 1:return[2,t.sent()]}}))}))},t.prototype.enableProgrammaticAccessAccount=function(t){return i(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.httpClient.request({method:"PATCH",url:this.options.host+"/api/v2/applications/programmatic-access-accounts",data:{id:t,enabled:!0}})];case 1:return[2,e.sent()]}}))}))},t.prototype.disableProgrammaticAccessAccount=function(t){return i(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.httpClient.request({method:"PATCH",url:this.options.host+"/api/v2/applications/programmatic-access-accounts",data:{id:t,enabled:!1}})];case 1:return[2,e.sent()]}}))}))},t.prototype.listNamespaces=function(t,e){return void 0===t&&(t=1),void 0===e&&(e=10),i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.httpClient.request({method:"GET",url:this.options.host+"/api/v2/resource-namespace/"+this.options.userPoolId+a.objectToQueryString({page:null==t?void 0:t.toString(),limit:null==e?void 0:e.toString()})})];case 1:return[2,n.sent()]}}))}))},t.prototype.deleteNamespace=function(t){return i(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.httpClient.request({method:"DELETE",url:this.options.host+"/api/v2/resource-namespace/"+this.options.userPoolId+"/code/"+t})];case 1:return e.sent(),[2,!0];case 2:throw e.sent();case 3:return[2]}}))}))},t.prototype.createNamespace=function(t,e,n){return i(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,this.httpClient.request({method:"POST",url:this.options.host+"/api/v2/resource-namespace/"+this.options.userPoolId,data:{name:e,code:t,description:n}})];case 1:return[2,r.sent()];case 2:throw r.sent();case 3:return[2]}}))}))},t.prototype.updateNamespace=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.httpClient.request({method:"PUT",url:this.options.host+"/api/v2/resource-namespace/"+this.options.userPoolId+"/code/"+t,data:{name:e.name,code:e.code,description:e.description}})];case 1:return[2,n.sent()];case 2:throw n.sent();case 3:return[2]}}))}))},t}();e.AclManagementClient=u},7746:function(t,e){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.AgreementManagementClient=void 0;var o=function(){function t(t,e,n,r){this.options=t,this.httpClient=n,this.graphqlClient=e,this.tokenProvider=r}return t.prototype.create=function(t,e){return r(this,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return r=n({lang:"zh-CN",required:!0},e),[4,this.httpClient.request({url:this.options.host+"/api/v2/applications/"+t+"/agreements",method:"POST",data:r})];case 1:return[2,i.sent()]}}))}))},t.prototype.list=function(t){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.httpClient.request({url:this.options.host+"/api/v2/applications/"+t+"/agreements",method:"GET"})];case 1:return[2,e.sent()]}}))}))},t.prototype.delete=function(t,e){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.httpClient.request({url:this.options.host+"/api/v2/applications/"+t+"/agreements/"+e,method:"DELETE"})];case 1:return n.sent(),[2,!0]}}))}))},t.prototype.modify=function(t,e,n){return r(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,this.httpClient.request({url:this.options.host+"/api/v2/applications/"+t+"/agreements/"+e,method:"PUT",data:n})];case 1:return[2,r.sent()]}}))}))},t.prototype.sort=function(t,e){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.httpClient.request({url:this.options.host+"/api/v2/applications/"+t+"/agreements/sort",method:"POST",data:{ids:e}})];case 1:return n.sent(),[2,!0]}}))}))},t}();e.AgreementManagementClient=o},2038:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},i=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},o=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.ApplicationsManagementClient=void 0;var s=n(7522),a=n(2006),u=n(7746),h=function(){function t(t,e,n,r){this.options=t,this.httpClient=e,this.graphqlClient=n,this.tokenProvider=r,this.acl=new s.AclManagementClient(t,n,e,r),this.roles=new a.RolesManagementClient(t,n,r),this.agreements=new u.AgreementManagementClient(t,n,e,r)}return t.prototype.list=function(t){return i(this,void 0,void 0,(function(){var e,n,r,i,s;return o(this,(function(o){switch(o.label){case 0:return n=(e=t||{}).page,r=void 0===n?1:n,i=e.limit,s=void 0===i?10:i,[4,this.httpClient.request({url:this.options.host+"/api/v2/applications",method:"GET",params:{page:r,limit:s}})];case 1:return[2,o.sent()]}}))}))},t.prototype.create=function(t){return i(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.httpClient.request({method:"POST",url:this.options.host+"/api/v2/applications",data:r({},t)})];case 1:return[2,e.sent()]}}))}))},t.prototype.delete=function(t){return i(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.httpClient.request({method:"DELETE",url:this.options.host+"/api/v2/applications/"+t})];case 1:return e.sent(),[2,!0];case 2:throw e.sent();case 3:return[2]}}))}))},t.prototype.findById=function(t){return i(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:if(!t)throw new Error("params id is required!");return[4,this.httpClient.request({url:this.options.host+"/api/v2/applications/"+t,method:"GET"})];case 1:return[2,e.sent()]}}))}))},t.prototype.listResources=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.acl.getResources(r(r({},e),{namespace:t}))];case 1:return[2,n.sent()]}}))}))},t.prototype.createResource=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.acl.createResource(r(r({},e),{namespace:t}))];case 1:return[2,n.sent()]}}))}))},t.prototype.updateResource=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.acl.updateResource(e.code,r(r({},e),{namespace:t}))];case 1:return[2,n.sent()]}}))}))},t.prototype.deleteResource=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.acl.deleteResource(e,t)];case 1:return[2,n.sent()]}}))}))},t.prototype.getAccessPolicies=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.acl.getApplicationAccessPolicies(r(r({},e),{appId:t}))];case 1:return[2,n.sent()]}}))}))},t.prototype.enableAccessPolicy=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.acl.enableApplicationAccessPolicy(r(r({},e),{appId:t,namespace:t}))];case 1:return[2,n.sent()]}}))}))},t.prototype.disableAccessPolicy=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.acl.disableApplicationAccessPolicy(r(r({},e),{appId:t,namespace:t}))];case 1:return[2,n.sent()]}}))}))},t.prototype.deleteAccessPolicy=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.acl.deleteApplicationAccessPolicy(r(r({},e),{appId:t,namespace:t}))];case 1:return[2,n.sent()]}}))}))},t.prototype.allowAccess=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.acl.allowAccessApplication(r(r({},e),{appId:t,namespace:t}))];case 1:return[2,n.sent()]}}))}))},t.prototype.denyAccess=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.acl.denyAccessApplication(r(r({},e),{appId:t,namespace:t}))];case 1:return[2,n.sent()]}}))}))},t.prototype.updateDefaultAccessPolicy=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.acl.updateDefaultApplicationAccessPolicy({appId:t,defaultStrategy:e})];case 1:return[2,n.sent()]}}))}))},t.prototype.createRole=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.roles.create(e.code,e.description,t)];case 1:return[2,n.sent()]}}))}))},t.prototype.deleteRole=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.roles.delete(e,t)];case 1:return[2,n.sent()]}}))}))},t.prototype.deleteRoles=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.roles.deleteMany(e,t)];case 1:return[2,n.sent()]}}))}))},t.prototype.updateRole=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.roles.update(e.code,r(r({},e),{namespace:t}))];case 1:return[2,n.sent()]}}))}))},t.prototype.findRole=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){return[2,this.roles.detail(e,t)]}))}))},t.prototype.getRoles=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.roles.list(r(r({},e),{namespace:t}))];case 1:return[2,n.sent()]}}))}))},t.prototype.getUsersByRoleCode=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.roles.listUsers(e,{namespace:t})];case 1:return[2,n.sent()]}}))}))},t.prototype.addUsersToRole=function(t,e,n){return i(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,this.roles.addUsers(e,n,t)];case 1:return[2,r.sent()]}}))}))},t.prototype.removeUsersFromRole=function(t,e,n){return i(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,this.roles.removeUsers(e,n,t)];case 1:return[2,r.sent()]}}))}))},t.prototype.listAuthorizedResourcesByRole=function(t,e,n){return i(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,this.roles.listAuthorizedResources(e,t,{resourceType:n})];case 1:return[2,r.sent()]}}))}))},t.prototype.createAgreement=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.agreements.create(t,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.deleteAgreement=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.agreements.delete(t,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.modifyAgreement=function(t,e,n){return i(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,this.agreements.modify(t,e,n)];case 1:return[2,r.sent()]}}))}))},t.prototype.listAgreement=function(t){return i(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.agreements.list(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.sortAgreement=function(t,e){return i(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return[4,this.agreements.sort(t,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.activeUsers=function(t,e,n){return void 0===e&&(e=1),void 0===n&&(n=10),i(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return[4,this.httpClient.request({method:"GET",url:this.options.host+"/api/v2/applications/"+t+"/active-users?page="+e+"&limit="+n})];case 1:return[2,r.sent()]}}))}))},t.prototype.refreshApplicationSecret=function(t){return i(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this.httpClient.request({method:"PATCH",url:this.options.host+"/api/v2/application/"+t+"/refresh-secret"})];case 1:return[2,e.sent()]}}))}))},t}();e.ApplicationsManagementClient=h},6641:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.GroupsManagementClient=void 0;var o=n(9550),s=n(1721),a=function(){function t(t,e,n){this.options=t,this.graphqlClient=e,this.tokenProvider=n}return t.prototype.create=function(t,e,n){return r(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,o.createGroup(this.graphqlClient,this.tokenProvider,{code:t,name:e,description:n})];case 1:return[2,r.sent().createGroup]}}))}))},t.prototype.delete=function(t){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,o.deleteGroups(this.graphqlClient,this.tokenProvider,{codeList:[t]})];case 1:return[2,e.sent().deleteGroups]}}))}))},t.prototype.update=function(t,e){return r(this,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return n=e.description,r=e.newCode,s=e.name,[4,o.updateGroup(this.graphqlClient,this.tokenProvider,{code:t,name:s,description:n,newCode:r})];case 1:return[2,i.sent().updateGroup]}}))}))},t.prototype.detail=function(t){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,o.group(this.graphqlClient,this.tokenProvider,{code:t})];case 1:return[2,e.sent().group]}}))}))},t.prototype.list=function(t,e){return void 0===t&&(t=1),void 0===e&&(e=10),r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,o.getGroups(this.graphqlClient,this.tokenProvider,{page:t,limit:e})];case 1:return[2,n.sent().groups]}}))}))},t.prototype.deleteMany=function(t){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,o.deleteGroups(this.graphqlClient,this.tokenProvider,{codeList:t})];case 1:return[2,e.sent().deleteGroups]}}))}))},t.prototype.listUsers=function(t,e){return r(this,void 0,void 0,(function(){var n,r,s,a,u,h,c,l,d,f,p;return i(this,(function(i){switch(i.label){case 0:return r=(n=e||{}).withCustomData,s=void 0!==r&&r,a=n.page,u=void 0===a?1:a,h=n.limit,c=void 0===h?10:h,s?[3,2]:[4,o.groupWithUsers(this.graphqlClient,this.tokenProvider,{code:t,page:u,limit:c})];case 1:return[2,(l=i.sent().group).users];case 2:return[4,o.groupWithUsersWithCustomData(this.graphqlClient,this.tokenProvider,{code:t,page:u,limit:c})];case 3:return l=i.sent().group,d=l.users,f=d.totalCount,p=(p=d.list).map((function(t){return t.customData=convertUdvToKeyValuePair(t.customData),t})),[2,{totalCount:f,list:p}]}}))}))},t.prototype.addUsers=function(t,e){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,o.addUserToGroup(this.graphqlClient,this.tokenProvider,{code:t,userIds:e})];case 1:return[2,n.sent().addUserToGroup]}}))}))},t.prototype.removeUsers=function(t,e){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,o.removeUserFromGroup(this.graphqlClient,this.tokenProvider,{code:t,userIds:e})];case 1:return[2,n.sent().removeUserFromGroup]}}))}))},t.prototype.listAuthorizedResources=function(t,e,n){return r(this,void 0,void 0,(function(){var r,a,u,h,c;return i(this,(function(i){switch(i.label){case 0:return r=(n||{}).resourceType,[4,o.listGroupAuthorizedResources(this.graphqlClient,this.tokenProvider,{code:t,namespace:e,resourceType:r})];case 1:if(!(a=i.sent().group))throw new Error("分组不存在");return u=a.authorizedResources,h=u.list,c=u.totalCount,[2,{list:h=s.formatAuthorizedResources(h),totalCount:c}]}}))}))},t}();e.GroupsManagementClient=a},4067:function(t,e){"use strict";var n=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},r=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.MFAManagementClient=void 0;var i=function(){function t(t,e,n,r){this.options=t,this.httpClient=n,this.graphqlClient=e,this.tokenProvider=r}return t.prototype.getStatus=function(t){return n(this,void 0,void 0,(function(){return r(this,(function(e){switch(e.label){case 0:return[4,this.httpClient.request({method:"GET",url:this.options.host+"/api/v2/users/"+t+"/mfa-bound"})];case 1:return[2,e.sent()]}}))}))},t.prototype.unAssociateMfa=function(t,e){return n(this,void 0,void 0,(function(){return r(this,(function(n){switch(n.label){case 0:return[4,this.httpClient.request({method:"DELETE",url:this.options.host+"/api/v2/users/"+t+"/mfa-bound?type="+e})];case 1:return n.sent(),[2,!0]}}))}))},t}();e.MFAManagementClient=i},4849:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ManagementClient=void 0;var s=n(642),a=n(1277),u=n(3707),h=n(9196),c=n(9865),l=n(9550),d=n(9584),f=o(n(9669)),p=n(2006),m=n(1698),g=n(9713),v=n(6641),b=n(7522),y=n(6113),w=n(1679),_=o(n(6489)),M=n(1721),S=n(1764),E=n(8475),A=n(2038),k=n(4067),x={timeout:1e4,onError:function(t,e){throw{code:t,message:e}},host:"https://core.authing.cn",requestFrom:"sdk",encryptFunction:M.encrypt,headers:{"userpool-id":"x-authing-userpool-id","app-id":"x-authing-app-id","request-from":"x-authing-request-from","sdk-version":"x-authing-sdk-version",lang:"x-authing-lang"}},R=function(){function t(t){if(this.options=Object.assign({},x,t),!this.options.userPoolId&&!this.options.appId)throw new Error("请提供 userPoolId 或者 appId!");var e=this.options.host+"/graphql/v2";this.options.secret||this.options.accessToken||this.options.onError(1e3,"Init Management Client failed, must provide at least secret or accessToken !"),f.default.defaults.baseURL=this.options.host,this.graphqlClient=new(this.options.graphqlClient||a.GraphqlClient)(e,this.options),this.tokenProvider=new u.ManagementTokenProvider(this.options,this.graphqlClient),this.httpClient=new(this.options.httpClient||d.HttpClient)(this.options,this.tokenProvider),this.publicKeyManager=new S.PublicKeyManager(this.options,this.httpClient),this.users=new c.UsersManagementClient(this.options,this.graphqlClient,this.httpClient,this.tokenProvider,this.publicKeyManager),this.userpool=new h.UserPoolManagementClient(this.options,this.httpClient,this.graphqlClient,this.tokenProvider),this.org=new s.OrgManagementClient(this.options,this.graphqlClient,this.httpClient,this.tokenProvider),this.roles=new p.RolesManagementClient(this.options,this.graphqlClient,this.tokenProvider),this.policies=new m.PoliciesManagementClient(this.options,this.graphqlClient,this.tokenProvider),this.udf=new g.UdfManagementClient(this.options,this.graphqlClient,this.tokenProvider),this.acl=new b.AclManagementClient(this.options,this.graphqlClient,this.httpClient,this.tokenProvider),this.whitelist=new y.WhitelistManagementClient(this.options,this.graphqlClient,this.tokenProvider),this.groups=new v.GroupsManagementClient(this.options,this.graphqlClient,this.tokenProvider),this.statistics=new w.StatisticsManagementClient(this.options,this.httpClient,this.tokenProvider),this.userAction=new E.UserActionManagementClient(this.options,this.httpClient,this.tokenProvider),this.applications=new A.ApplicationsManagementClient(this.options,this.httpClient,this.graphqlClient,this.tokenProvider),this.mfa=new k.MFAManagementClient(this.options,this.graphqlClient,this.httpClient,this.tokenProvider)}return t.prototype.sendEmail=function(t,e){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,l.sendEmail(this.graphqlClient,this.tokenProvider,{email:t,scene:e})];case 1:return[2,n.sent().sendEmail]}}))}))},t.prototype.checkLoginStatus=function(t,e){return r(this,void 0,void 0,(function(){var n,r,o,s,a;return i(this,(function(i){switch(i.label){case 0:if(n=(e=e||{}).fetchUserDetail,r=void 0!==n&&n,!t)return[2,null];o=null;try{o=_.default(t)}catch(t){return[2,null]}return s=o.data,r?[3,1]:[2,s];case 1:return a=s.id,[4,this.users.detail(a)];case 2:return[2,i.sent()]}}))}))},t.prototype.isPasswordValid=function(t){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.httpClient.request({method:"POST",url:this.options.host+"/api/v2/password/check",data:{password:t}})];case 1:return[2,e.sent()]}}))}))},t.prototype.setLang=function(t){this.options.lang=t},t}();e.ManagementClient=R},3707:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.ManagementTokenProvider=void 0;var s=o(n(6489)),a=n(9550),u=function(){function t(t,e){this.options=t,this.graphqlClient=e;var n=this.options.accessToken;if(n){this._accessToken=n;var r=s.default(n).exp;this._accessTokenExpriredAt=1e3*r}}return t.prototype.getClientWhenSdkInit=function(){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,a.getAccessToken(this.graphqlClient,{userPoolId:this.options.userPoolId,secret:this.options.secret})];case 1:return[2,t.sent().accessToken.accessToken]}}))}))},t.prototype.refreshToken=function(){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,a.refreshAccessToken(this.graphqlClient,{accessToken:this.options.accessToken})];case 1:return[2,t.sent().refreshAccessToken.accessToken]}}))}))},t.prototype.getToken=function(){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.options.accessToken?[2,this.options.accessToken]:this._accessToken&&this._accessTokenExpriredAt>(new Date).getTime()+36e5?[2,this._accessToken]:[4,this.getAccessTokenFromServer()];case 1:return[2,t.sent()]}}))}))},t.prototype.getAccessTokenFromServer=function(){return r(this,void 0,void 0,(function(){var t,e,n;return i(this,(function(r){switch(r.label){case 0:return t=null,this.options.secret?[4,this.getClientWhenSdkInit()]:[3,2];case 1:return t=r.sent(),[3,4];case 2:return[4,this.refreshToken()];case 3:t=r.sent(),r.label=4;case 4:return this._accessToken=t,e=s.default(this._accessToken),n=e.exp,this._accessTokenExpriredAt=1e3*n,[2,this._accessToken]}}))}))},t}();e.ManagementTokenProvider=u},642:function(t,e,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),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 n in t)"default"!==n&&Object.hasOwnProperty.call(t,n)&&i(e,t,n);return o(e,t),e},a=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},u=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.OrgManagementClient=void 0;var h=s(n(1721)),c=n(9550),l=function(){function t(t,e,n,r){this.options=t,this.httpClient=n,this.graphqlClient=e,this.tokenProvider=r}return t.prototype.buildTree=function(t){return t.tree=h.default(JSON.parse(JSON.stringify(t.nodes))),t},t.prototype.create=function(t,e,n){return a(this,void 0,void 0,(function(){return u(this,(function(r){switch(r.label){case 0:return[4,c.createOrg(this.graphqlClient,this.tokenProvider,{name:t,description:e,code:n})];case 1:return[2,r.sent().createOrg]}}))}))},t.prototype.deleteById=function(t){return a(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,c.deleteOrg(this.graphqlClient,this.tokenProvider,{id:t})];case 1:return[2,e.sent().deleteOrg]}}))}))},t.prototype.list=function(t,e){return void 0===t&&(t=1),void 0===e&&(e=10),a(this,void 0,void 0,(function(){var n,r,i=this;return u(this,(function(o){switch(o.label){case 0:return[4,c.orgs(this.graphqlClient,this.tokenProvider,{page:t,limit:e})];case 1:return n=o.sent().orgs,r=n.list,[2,{totalCount:n.totalCount,list:r.map((function(t){return i.buildTree(t)}))}]}}))}))},t.prototype.addNode=function(t,e,n){return a(this,void 0,void 0,(function(){var r,i,o,s,a,h;return u(this,(function(u){switch(u.label){case 0:return r=n.name,i=n.code,o=n.order,s=n.nameI18n,a=n.description,h=n.descriptionI18n,[4,c.addNode(this.graphqlClient,this.tokenProvider,{orgId:t,parentNodeId:e,name:r,code:i,order:o,nameI18n:s,description:a,descriptionI18n:h})];case 1:return[2,u.sent().addNodeV2]}}))}))},t.prototype.getNodeById=function(t){return a(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,c.nodeById(this.graphqlClient,this.tokenProvider,{id:t})];case 1:return[2,e.sent().nodeById]}}))}))},t.prototype.updateNode=function(t,e){return a(this,void 0,void 0,(function(){var n,r,i;return u(this,(function(o){switch(o.label){case 0:return n=e.name,r=e.code,i=e.description,[4,c.updateNode(this.graphqlClient,this.tokenProvider,{id:t,name:n,code:r,description:i})];case 1:return[2,o.sent().updateNode]}}))}))},t.prototype.findById=function(t){return a(this,void 0,void 0,(function(){var e;return u(this,(function(n){switch(n.label){case 0:return[4,c.org(this.graphqlClient,this.tokenProvider,{id:t})];case 1:return e=n.sent().org,[2,this.buildTree(e)]}}))}))},t.prototype.deleteNode=function(t,e){return a(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,c.deleteNode(this.graphqlClient,this.tokenProvider,{orgId:t,nodeId:e})];case 1:return[2,n.sent().deleteNode]}}))}))},t.prototype.moveNode=function(t,e,n){return a(this,void 0,void 0,(function(){var r;return u(this,(function(i){switch(i.label){case 0:return[4,c.moveNode(this.graphqlClient,this.tokenProvider,{orgId:t,nodeId:e,targetParentId:n})];case 1:return r=i.sent().moveNode,[2,this.buildTree(r)]}}))}))},t.prototype.isRootNode=function(t,e){return a(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,c.isRootNode(this.graphqlClient,this.tokenProvider,{orgId:t,nodeId:e})];case 1:return[2,n.sent().isRootNode]}}))}))},t.prototype.listChildren=function(t){return a(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,c.getChildrenNodes(this.graphqlClient,this.tokenProvider,{nodeId:t})];case 1:return[2,e.sent().childrenNodes]}}))}))},t.prototype.rootNode=function(t){return a(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,c.rootNode(this.graphqlClient,this.tokenProvider,{orgId:t})];case 1:return[2,e.sent().rootNode]}}))}))},t.prototype.importByJson=function(t){return a(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.httpClient.request({method:"POST",url:this.options.host+"/api/v2/orgs/import",data:{filetype:"json",file:t}})];case 1:return[2,e.sent()]}}))}))},t.prototype.addMembers=function(t,e){return a(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,c.addMember(this.graphqlClient,this.tokenProvider,{nodeId:t,userIds:e})];case 1:return[2,n.sent().addMember.users]}}))}))},t.prototype.moveMembers=function(t){return a(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,c.moveMembers(this.graphqlClient,this.tokenProvider,t)];case 1:return e.sent(),[2,!0]}}))}))},t.prototype.listMembers=function(t,e){return a(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,c.getMembersById(this.graphqlClient,this.tokenProvider,r({id:t},e))];case 1:return[2,n.sent().nodeById.users]}}))}))},t.prototype.removeMembers=function(t,e){return a(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,c.removeMembers(this.graphqlClient,this.tokenProvider,{nodeId:t,userIds:e})];case 1:return[2,n.sent().removeMember.users]}}))}))},t.prototype.setMainDepartment=function(t,e){return a(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return[4,c.setMainDepartment(this.graphqlClient,this.tokenProvider,{userId:t,departmentId:e})];case 1:return[2,n.sent().setMainDepartment]}}))}))},t.prototype.exportAll=function(){return a(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return[4,this.httpClient.request({method:"GET",url:this.options.host+"/api/v2/orgs/export"})];case 1:return[2,t.sent()]}}))}))},t.prototype.exportByOrgId=function(t){return a(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,this.httpClient.request({method:"GET",url:this.options.host+"/api/v2/orgs/export?org_id="+t})];case 1:return[2,e.sent()]}}))}))},t.prototype.listAuthorizedResourcesByNodeId=function(t,e,n){return a(this,void 0,void 0,(function(){var r,i,o,s,a;return u(this,(function(u){switch(u.label){case 0:return r=(n||{}).resourceType,[4,c.listNodeByIdAuthorizedResources(this.graphqlClient,this.tokenProvider,{id:t,namespace:e,resourceType:r})];case 1:if(!(i=u.sent().nodeById))throw new Error("组织机构节点不存在");return o=i.authorizedResources,s=o.list,a=o.totalCount,[2,{list:s=h.formatAuthorizedResources(s),totalCount:a}]}}))}))},t.prototype.listAuthorizedResourcesByNodeCode=function(t,e,n,r){return a(this,void 0,void 0,(function(){var i,o,s,a,l;return u(this,(function(u){switch(u.label){case 0:return i=(r||{}).resourceType,[4,c.listNodeByCodeAuthorizedResources(this.graphqlClient,this.tokenProvider,{orgId:t,code:e,namespace:n,resourceType:i})];case 1:if(!(o=u.sent().nodeByCode))throw new Error("组织机构节点不存在");return s=o.authorizedResources,a=s.list,l=s.totalCount,[2,{list:a=h.formatAuthorizedResources(a),totalCount:l}]}}))}))},t.prototype.startSync=function(t){return a(this,void 0,void 0,(function(){var e,n,r,i;return u(this,(function(o){switch(o.label){case 0:if(e=t.providerType,n=t.adConnectorId,r="",i={},"wechatwork"===e)r=this.options.host+"/connections/enterprise/wechatwork/start-sync";else if("dingtalk"===e)r=this.options.host+"/connections/enterprise/dingtalk/start-sync";else if("ad"===e){if(!n)throw new Error("must provider adConnectorId");r=this.options.host+"/api/v2/ad/sync",i={connectionId:n}}return[4,this.httpClient.request({method:"POST",url:r,data:i})];case 1:return o.sent(),[2,!0]}}))}))},t.prototype.searchNodes=function(t){return a(this,void 0,void 0,(function(){return u(this,(function(e){switch(e.label){case 0:return[4,c.searchNodes(this.graphqlClient,this.tokenProvider,{keyword:t})];case 1:return[2,e.sent().searchNodes]}}))}))},t}();e.OrgManagementClient=l},1698:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.PoliciesManagementClient=void 0;var o=n(9550),s=function(){function t(t,e,n){this.options=t,this.graphqlClient=e,this.tokenProvider=n}return t.prototype.create=function(t){var e=t.code,n=t.statements,s=t.description,a=t.namespace;return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,o.createPolicy(this.graphqlClient,this.tokenProvider,{code:e,statements:n,description:s,namespace:a})];case 1:return[2,t.sent().createPolicy]}}))}))},t.prototype.delete=function(t,e){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,o.deletePolicy(this.graphqlClient,this.tokenProvider,{code:t,namespace:e})];case 1:return[2,n.sent().deletePolicy]}}))}))},t.prototype.deleteMany=function(t,e){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,o.deletePolicies(this.graphqlClient,this.tokenProvider,{codeList:t,namespace:e})];case 1:return[2,n.sent().deletePolicies]}}))}))},t.prototype.update=function(t,e){return r(this,void 0,void 0,(function(){var n,r,s,a;return i(this,(function(i){switch(i.label){case 0:return n=e.description,r=e.statements,s=e.newCode,a=e.namespace,[4,o.updatePolicy(this.graphqlClient,this.tokenProvider,{code:t,description:n,statements:r,newCode:s,namespace:a})];case 1:return[2,i.sent().updatePolicy]}}))}))},t.prototype.detail=function(t,e){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,o.policy(this.graphqlClient,this.tokenProvider,{code:t,namespace:e})];case 1:return[2,n.sent().policy]}}))}))},t.prototype.list=function(t){return r(this,void 0,void 0,(function(){var e,n,r,s,a;return i(this,(function(i){switch(i.label){case 0:return e=(t=t||{}).page,n=void 0===e?1:e,r=t.limit,s=void 0===r?10:r,a=t.namespace,[4,o.policies(this.graphqlClient,this.tokenProvider,{page:n,limit:s,namespace:a})];case 1:return[2,i.sent().policies]}}))}))},t.prototype.listAssignments=function(t){var e=t.code,n=t.namespace,s=t.page,a=void 0===s?1:s,u=t.limit,h=void 0===u?10:u;return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,o.policyAssignments(this.graphqlClient,this.tokenProvider,{code:e,page:a,limit:h,namespace:n})];case 1:return[2,t.sent().policyAssignments]}}))}))},t.prototype.addAssignments=function(t,e,n,s){return r(this,void 0,void 0,(function(){var r,a,u;return i(this,(function(i){switch(i.label){case 0:return a=(r=s||{}).inheritByChildren,u=r.namespace,[4,o.addPolicyAssignments(this.graphqlClient,this.tokenProvider,{policies:t,targetType:e,targetIdentifiers:n,inheritByChildren:a,namespace:u})];case 1:return[2,i.sent().addPolicyAssignments]}}))}))},t.prototype.removeAssignments=function(t,e,n,s){return r(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,o.removePolicyAssignments(this.graphqlClient,this.tokenProvider,{policies:t,targetType:e,targetIdentifiers:n,namespace:s})];case 1:return[2,r.sent().removePolicyAssignments]}}))}))},t.prototype.enableAssignment=function(t,e,n,s){return r(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,o.enablePolicyAssignment(this.graphqlClient,this.tokenProvider,{policy:t,targetType:e,targetIdentifier:n,namespace:s})];case 1:return[2,r.sent().enablePolicyAssignment]}}))}))},t.prototype.disableAssignment=function(t,e,n,s){return r(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,o.disablePolicyAssignment(this.graphqlClient,this.tokenProvider,{policy:t,targetType:e,targetIdentifier:n,namespace:s})];case 1:return[2,r.sent().disbalePolicyAssignment]}}))}))},t}();e.PoliciesManagementClient=s},2006:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.RolesManagementClient=void 0;var o=n(9676),s=n(9550),a=n(1721),u=function(){function t(t,e,n){this.options=t,this.graphqlClient=e,this.tokenProvider=n}return t.prototype.create=function(t,e,n){return r(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,s.addRole(this.graphqlClient,this.tokenProvider,{code:t,description:e,namespace:n})];case 1:return[2,r.sent().createRole]}}))}))},t.prototype.delete=function(t,e){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,s.deleteRole(this.graphqlClient,this.tokenProvider,{code:t,namespace:e})];case 1:return[2,n.sent().deleteRole]}}))}))},t.prototype.deleteMany=function(t,e){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,s.deleteRoles(this.graphqlClient,this.tokenProvider,{codeList:t,namespace:e})];case 1:return[2,n.sent().deleteRoles]}}))}))},t.prototype.update=function(t,e){return r(this,void 0,void 0,(function(){var n,r,o;return i(this,(function(i){switch(i.label){case 0:return n=e.description,r=e.newCode,o=e.namespace,[4,s.updateRole(this.graphqlClient,this.tokenProvider,{code:t,description:n,newCode:r,namespace:o})];case 1:return[2,i.sent().updateRole]}}))}))},t.prototype.detail=function(t,e){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,s.role(this.graphqlClient,this.tokenProvider,{code:t,namespace:e})];case 1:return[2,n.sent().role]}}))}))},t.prototype.findByCode=function(t,e){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.detail(t,e)];case 1:return[2,n.sent()]}}))}))},t.prototype.list=function(t){return r(this,void 0,void 0,(function(){var e,n,r,o,a,u;return i(this,(function(i){switch(i.label){case 0:return n=(e=t||{}).page,r=void 0===n?1:n,o=e.limit,a=void 0===o?10:o,u=e.namespace,[4,s.roles(this.graphqlClient,this.tokenProvider,{page:r,limit:a,namespace:u})];case 1:return[2,i.sent().roles]}}))}))},t.prototype.listUsers=function(t,e){return r(this,void 0,void 0,(function(){var n,r,o,u,h,c,l,d,f,p,m,g;return i(this,(function(i){switch(i.label){case 0:return r=(n=e||{}).namespace,o=n.withCustomData,u=void 0!==o&&o,h=n.page,c=void 0===h?1:h,l=n.limit,d=void 0===l?10:l,u?[3,2]:[4,s.roleWithUsers(this.graphqlClient,this.tokenProvider,{code:t,namespace:r,page:c,limit:d})];case 1:return(f=i.sent().role)?[2,f.users]:[2,{totalCount:0,list:[]}];case 2:return[4,s.roleWithUsersWithCustomData(this.graphqlClient,this.tokenProvider,{code:t,namespace:r,page:c,limit:d})];case 3:return(f=i.sent().role)?(p=f.users,m=p.totalCount,g=(g=p.list).map((function(t){return t.customData=a.convertUdvToKeyValuePair(t.customData),t})),[2,{totalCount:m,list:g}]):[2,{totalCount:0,list:[]}]}}))}))},t.prototype.addUsers=function(t,e,n){return r(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,s.assignRole(this.graphqlClient,this.tokenProvider,{roleCode:t,userIds:e,namespace:n})];case 1:return[2,r.sent().assignRole]}}))}))},t.prototype.removeUsers=function(t,e,n){return r(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,s.revokeRole(this.graphqlClient,this.tokenProvider,{roleCode:t,userIds:e,namespace:n})];case 1:return[2,r.sent().revokeRole]}}))}))},t.prototype.listPolicies=function(t,e,n){return void 0===e&&(e=1),void 0===n&&(n=10),r(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,s.policyAssignments(this.graphqlClient,this.tokenProvider,{targetType:o.PolicyAssignmentTargetType.Role,targetIdentifier:t,page:e,limit:n})];case 1:return[2,r.sent().policyAssignments]}}))}))},t.prototype.addPolicies=function(t,e){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,s.addPolicyAssignments(this.graphqlClient,this.tokenProvider,{targetType:o.PolicyAssignmentTargetType.User,targetIdentifiers:[t],policies:e})];case 1:return[2,n.sent().addPolicyAssignments]}}))}))},t.prototype.removePolicies=function(t,e){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,s.removePolicyAssignments(this.graphqlClient,this.tokenProvider,{targetType:o.PolicyAssignmentTargetType.User,targetIdentifiers:[t],policies:e})];case 1:return[2,n.sent().removePolicyAssignments]}}))}))},t.prototype.listAuthorizedResources=function(t,e,n){return r(this,void 0,void 0,(function(){var r,o,u,h,c;return i(this,(function(i){switch(i.label){case 0:return r=(n||{}).resourceType,[4,s.listRoleAuthorizedResources(this.graphqlClient,this.tokenProvider,{code:t,namespace:e,resourceType:r})];case 1:if(!(o=i.sent().role))throw new Error("角色不存在");return u=o.authorizedResources,h=u.list,c=u.totalCount,[2,{list:h=a.formatAuthorizedResources(h),totalCount:c}]}}))}))},t.prototype.getUdfValue=function(t){return r(this,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return[4,s.udv(this.graphqlClient,this.tokenProvider,{targetType:o.UdfTargetType.Role,targetId:t})];case 1:return e=n.sent().udv,[2,a.convertUdvToKeyValuePair(e)]}}))}))},t.prototype.getSpecificUdfValue=function(t,e){return r(this,void 0,void 0,(function(){var n,r,u,h;return i(this,(function(i){switch(i.label){case 0:return[4,s.udv(this.graphqlClient,this.tokenProvider,{targetType:o.UdfTargetType.Role,targetId:t})];case 1:for(h in n=i.sent().udv,r=a.convertUdvToKeyValuePair(n),u={},r)e===h&&(u[h]=r[h]);return[2,u]}}))}))},t.prototype.getUdfValueBatch=function(t){return r(this,void 0,void 0,(function(){var e,n,r,u,h,c,l;return i(this,(function(i){switch(i.label){case 0:if(0===t.length)throw new Error("empty user id list");return[4,s.udfValueBatch(this.graphqlClient,this.tokenProvider,{targetType:o.UdfTargetType.Role,targetIds:t})];case 1:for(e=i.sent().udfValueBatch,n={},r=0,u=e;r<u.length;r++)h=u[r],c=h.targetId,l=h.data,n[c]=a.convertUdvToKeyValuePair(l);return[2,n]}}))}))},t.prototype.setUdfValue=function(t,e){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:if(0===Object.keys(e).length)throw new Error("empty udf value list");return[4,s.setUdvBatch(this.graphqlClient,this.tokenProvider,{targetType:o.UdfTargetType.Role,targetId:t,udvList:Object.keys(e).map((function(t){return{key:t,value:JSON.stringify(e[t])}}))})];case 1:return n.sent(),[2]}}))}))},t.prototype.setUdfValueBatch=function(t){return r(this,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:if(0===t.length)throw new Error("empty input list");return e=[],t.forEach((function(t){for(var n=t.roleId,r=t.data,i=0,o=Object.keys(r);i<o.length;i++){var s=o[i];e.push({targetId:n,key:s,value:JSON.stringify(r[s])})}})),[4,s.setUdfValueBatch(this.graphqlClient,this.tokenProvider,{targetType:o.UdfTargetType.Role,input:e})];case 1:return n.sent(),[2]}}))}))},t.prototype.removeUdfValue=function(t,e){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,s.removeUdv(this.graphqlClient,this.tokenProvider,{targetType:o.UdfTargetType.Role,targetId:t,key:e})];case 1:return n.sent(),[2]}}))}))},t}();e.RolesManagementClient=u},1679:function(t,e){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.StatisticsManagementClient=void 0;var o=function(){function t(t,e,n){this.options=t,this.httpClient=e,this.tokenProvider=n}return t.prototype.listUserActions=function(t){var e;return r(this,void 0,void 0,(function(){var r,o,s,a,u=this;return i(this,(function(i){switch(i.label){case 0:return r={},(null==t?void 0:t.clientIp)&&(r.clientip=t.clientIp),(null==t?void 0:t.operationNames)&&(r.operation_name=t.operationNames),(null===(e=null==t?void 0:t.userIds)||void 0===e?void 0:e.length)&&(r.operator_arn=t.userIds.map((function(t){return"arn:cn:authing:"+u.options.userPoolId+":user:"+t}))),(null==t?void 0:t.page)&&(r.page=t.page),(null==t?void 0:t.limit)&&(r.limit=t.limit),[4,this.httpClient.request({method:"GET",url:this.options.host+"/api/v2/analysis/user-action",params:n({},r)})];case 1:return o=i.sent(),s=o.list,a=o.totalCount,[2,{list:s.map((function(t){var e,n,r,i,o,s;return{userpoolId:t.userpool_id,userId:null===(e=t.user)||void 0===e?void 0:e.id,username:null===(n=t.user)||void 0===n?void 0:n.displayName,cityName:null===(r=t.geoip)||void 0===r?void 0:r.city_name,regionName:null===(i=t.geoip)||void 0===i?void 0:i.region_name,clientIp:null===(o=t.geoip)||void 0===o?void 0:o.ip,operationDesc:t.operation_desc,operationName:t.operation_name,timestamp:t.timestamp,appId:t.app_id,appName:null===(s=t.app)||void 0===s?void 0:s.name}})),totalCount:a}]}}))}))},t.prototype.listAuditLogs=function(t){return r(this,void 0,void 0,(function(){var e,r,o,s;return i(this,(function(i){switch(i.label){case 0:return e={},(null==t?void 0:t.clientIp)&&(e.clientip=t.clientIp),(null==t?void 0:t.operationNames)&&(e.operation_name=t.operationNames),(null==t?void 0:t.operatorArns)&&(e.operator_arn=t.operatorArns),(null==t?void 0:t.page)&&(e.page=t.page),(null==t?void 0:t.limit)&&(e.limit=t.limit),[4,this.httpClient.request({method:"GET",url:this.options.host+"/api/v2/analysis/audit",params:n({},e)})];case 1:return r=i.sent(),o=r.list,s=r.totalCount,[2,{list:o.map((function(t){var e,n,r,i,o;return{userpoolId:t.userpool_id,operatorType:t.operator_type,operatorId:null===(e=t.operator_detail)||void 0===e?void 0:e.id,operatorName:null===(n=t.operator_detail)||void 0===n?void 0:n.displayName,operationName:t.operation_name,cityName:null===(r=t.geoip)||void 0===r?void 0:r.city_name,regionName:null===(i=t.geoip)||void 0===i?void 0:i.region_name,clientIp:null===(o=t.geoip)||void 0===o?void 0:o.ip,resourceType:t.resource_type,resourceDesc:t.resource_desc,resource_arn:t.resource_arn,timestamp:t.timestamp}})),totalCount:s}]}}))}))},t}();e.StatisticsManagementClient=o},9713:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.UdfManagementClient=void 0;var o=n(9550),s=n(1721),a=function(){function t(t,e,n){this.options=t,this.graphqlClient=e,this.tokenProvider=n}return t.prototype.set=function(t,e,n,s){return r(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,o.setUdf(this.graphqlClient,this.tokenProvider,{targetType:t,dataType:n,key:e,label:s})];case 1:return[2,r.sent().setUdf]}}))}))},t.prototype.remove=function(t,e){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,o.removeUdf(this.graphqlClient,this.tokenProvider,{targetType:t,key:e})];case 1:return[2,n.sent().removeUdf]}}))}))},t.prototype.list=function(t){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,o.udf(this.graphqlClient,this.tokenProvider,{targetType:t})];case 1:return[2,e.sent().udf]}}))}))},t.prototype.listUdv=function(t,e){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,o.udv(this.graphqlClient,this.tokenProvider,{targetType:t,targetId:e})];case 1:return n=r.sent().udv,[2,s.convertUdv(n)]}}))}))},t.prototype.setUdvBatch=function(t,e,n){return r(this,void 0,void 0,(function(){var r;return i(this,(function(i){switch(i.label){case 0:return[4,o.setUdvBatch(this.graphqlClient,this.tokenProvider,{targetType:t,targetId:e,udvList:n.map((function(t){return{key:t.key,value:JSON.stringify(t.value)}}))})];case 1:return r=i.sent().setUdvBatch,[2,s.convertUdv(r)]}}))}))},t}();e.UdfManagementClient=a},8475:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.UserActionManagementClient=void 0;var o=n(1721),s=function(){function t(t,e,n){this.options=t,this.httpClient=e,this.tokenProvider=n}return t.prototype.list=function(t){var e,n;return void 0===t&&(t={page:1,limit:10}),r(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,this.httpClient.request({method:"GET",url:this.options.host+"/api/v2/analysis/user-action"+o.objectToQueryString({page:null===(e=t.page)||void 0===e?void 0:e.toString(),limit:null===(n=t.limit)||void 0===n?void 0:n.toString(),clientip:t.clientIp,operation_name:t.operationName,operator_arn:t.operatoArn})})];case 1:return[2,r.sent()]}}))}))},t}();e.UserActionManagementClient=s},9196:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.UserPoolManagementClient=void 0;var o=n(9550),s=function(){function t(t,e,n,r){this.options=t,this.httpClient=e,this.graphqlClient=n,this.tokenProvider=r}return t.prototype.detail=function(){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.httpClient.request({method:"GET",url:this.options.host+"/api/v2/userpools/detail"})];case 1:return[2,t.sent()]}}))}))},t.prototype.update=function(t){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,o.updateUserpool(this.graphqlClient,this.tokenProvider,{input:t})];case 1:return[2,e.sent().updateUserpool]}}))}))},t.prototype.listEnv=function(){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.httpClient.request({method:"GET",url:this.options.host+"/api/v2/env"})];case 1:return[2,t.sent()]}}))}))},t.prototype.addEnv=function(t,e){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.httpClient.request({method:"POST",url:this.options.host+"/api/v2/env",data:{key:t,value:e}})];case 1:return[2,n.sent()]}}))}))},t.prototype.removeEnv=function(t){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.httpClient.request({method:"DELETE",url:this.options.host+"/api/v2/env/"+t})];case 1:return[2,e.sent()]}}))}))},t}();e.UserPoolManagementClient=s},9865:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.UsersManagementClient=void 0;var o=n(1721),s=n(9550),a=n(9676),u=n(1721),h=function(){function t(t,e,n,r,i){this.options=t,this.graphqlClient=e,this.tokenProvider=r,this.httpClient=n,this.publickKeyManager=i}return t.prototype.create=function(t,e){return r(this,void 0,void 0,(function(){var n,r,o,a,u,h,c,l,d;return i(this,(function(i){switch(i.label){case 0:return r=(n=e||{}).keepPassword,o=void 0!==r&&r,a=n.resetPasswordOnFirstLogin,u=void 0!==a&&a,(null==t?void 0:t.password)?(h=t,l=(c=this.options).encryptFunction,d=[t.password],[4,this.publickKeyManager.getPublicKey()]):[3,3];case 1:return[4,l.apply(c,d.concat([i.sent()]))];case 2:h.password=i.sent(),i.label=3;case 3:return[4,s.createUser(this.graphqlClient,this.tokenProvider,{userInfo:t,keepPassword:o,resetPasswordOnFirstLogin:u})];case 4:return[2,i.sent().createUser]}}))}))},t.prototype.update=function(t,e){return r(this,void 0,void 0,(function(){var n,r,o,a;return i(this,(function(i){switch(i.label){case 0:return e&&e.password?(n=e,o=(r=this.options).encryptFunction,a=[e.password],[4,this.publickKeyManager.getPublicKey()]):[3,3];case 1:return[4,o.apply(r,a.concat([i.sent()]))];case 2:n.password=i.sent(),i.label=3;case 3:return[4,s.updateUser(this.graphqlClient,this.tokenProvider,{id:t,input:e})];case 4:return[2,i.sent().updateUser]}}))}))},t.prototype.detail=function(t,e){return r(this,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return void 0!==(n=(e||{}).withCustomData)&&n?[4,s.userWithCustomData(this.graphqlClient,this.tokenProvider,{id:t})]:[3,2];case 1:return(r=i.sent().user).customData=u.convertUdvToKeyValuePair(r.customData),[2,r];case 2:return[4,s.user(this.graphqlClient,this.tokenProvider,{id:t})];case 3:return[2,r=i.sent().user]}}))}))},t.prototype.delete=function(t){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,s.deleteUser(this.graphqlClient,this.tokenProvider,{id:t})];case 1:return[2,e.sent().deleteUser]}}))}))},t.prototype.deleteMany=function(t){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,s.deleteUsers(this.graphqlClient,this.tokenProvider,{ids:t})];case 1:return[2,e.sent().deleteUsers]}}))}))},t.prototype.batch=function(t,e){return r(this,void 0,void 0,(function(){var n,r,o,a;return i(this,(function(i){switch(i.label){case 0:return r=(n=e||{}).queryField,o=void 0===r?"id":r,void 0!==(a=n.withCustomData)&&a?[4,s.userBatchWithCustomData(this.graphqlClient,this.tokenProvider,{ids:t,type:o})]:[3,2];case 1:return[2,i.sent().userBatch.map((function(t){return t.customData=u.convertUdvToKeyValuePair(t.customData),t}))];case 2:return[4,s.userBatch(this.graphqlClient,this.tokenProvider,{ids:t,type:o})];case 3:return[2,i.sent().userBatch]}}))}))},t.prototype.list=function(t,e,n){return void 0===t&&(t=1),void 0===e&&(e=10),r(this,void 0,void 0,(function(){var r,o,a,h;return i(this,(function(i){switch(i.label){case 0:return void 0!==(r=(n||{}).withCustomData)&&r?[4,s.usersWithCustomData(this.graphqlClient,this.tokenProvider,{page:t,limit:e})]:[3,2];case 1:return h=i.sent().users,o=h.totalCount,a=(a=h.list).map((function(t){return t.customData=u.convertUdvToKeyValuePair(t.customData),t})),[2,{totalCount:o,list:a}];case 2:return[4,s.users(this.graphqlClient,this.tokenProvider,{page:t,limit:e})];case 3:return[2,h=i.sent().users]}}))}))},t.prototype.listArchivedUsers=function(t,e){return void 0===t&&(t=1),void 0===e&&(e=10),r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,s.archivedUsers(this.graphqlClient,this.tokenProvider,{page:t,limit:e})];case 1:return[2,n.sent().archivedUsers]}}))}))},t.prototype.exists=function(t){return r(this,void 0,void 0,(function(){var e,n,r,o;return i(this,(function(i){switch(i.label){case 0:return e=t.username,n=t.email,r=t.phone,o=t.externalId,[4,s.isUserExists(this.graphqlClient,this.tokenProvider,{username:e,email:n,phone:r,externalId:o})];case 1:return[2,i.sent().isUserExists]}}))}))},t.prototype.find=function(t){return r(this,void 0,void 0,(function(){var e,n,r,o,a,h;return i(this,(function(i){switch(i.label){case 0:return e=t.username,n=t.email,r=t.phone,o=t.externalId,void 0!==(a=t.withCustomData)&&a?[4,s.findUserWithCustomData(this.graphqlClient,this.tokenProvider,{username:e,email:n,phone:r,externalId:o})]:[3,2];case 1:return(h=i.sent().findUser).customData=u.convertUdvToKeyValuePair(h.customData),[2,h];case 2:return[4,s.findUser(this.graphqlClient,this.tokenProvider,{username:e,email:n,phone:r,externalId:o})];case 3:return[2,i.sent().findUser]}}))}))},t.prototype.search=function(t,e){return r(this,void 0,void 0,(function(){var n,r,o,a,h,c,l,d,f,p,m,g;return i(this,(function(i){switch(i.label){case 0:return n=(e=e||{}).fields,r=e.page,o=void 0===r?1:r,a=e.limit,h=void 0===a?10:a,c=e.departmentOpts,l=e.groupOpts,d=e.roleOpts,void 0!==(f=e.withCustomData)&&f?[3,2]:[4,s.searchUser(this.graphqlClient,this.tokenProvider,{query:t,fields:n,page:o,limit:h,departmentOpts:c,groupOpts:l,roleOpts:d})];case 1:return[2,p=i.sent().searchUser];case 2:return[4,s.searchUserWithCustomData(this.graphqlClient,this.tokenProvider,{query:t,fields:n,page:o,limit:h,departmentOpts:c,groupOpts:l,roleOpts:d})];case 3:return p=i.sent().searchUser,m=p.totalCount,g=(g=p.list).map((function(t){return t.customData=u.convertUdvToKeyValuePair(t.customData),t})),[2,{totalCount:m,list:g}]}}))}))},t.prototype.refreshToken=function(t){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,s.refreshToken(this.graphqlClient,this.tokenProvider,{id:t})];case 1:return[2,e.sent().refreshToken]}}))}))},t.prototype.listGroups=function(t){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,s.getUserGroups(this.graphqlClient,this.tokenProvider,{id:t})];case 1:return[2,e.sent().user.groups]}}))}))},t.prototype.addGroup=function(t,e){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,s.addUserToGroup(this.graphqlClient,this.tokenProvider,{userIds:[t],code:e})];case 1:return[2,n.sent().addUserToGroup]}}))}))},t.prototype.removeGroup=function(t,e){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,s.removeUserFromGroup(this.graphqlClient,this.tokenProvider,{code:e,userIds:[t]})];case 1:return[2,n.sent().removeUserFromGroup]}}))}))},t.prototype.listRoles=function(t,e){return r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return[4,s.getUserRoles(this.graphqlClient,this.tokenProvider,{id:t,namespace:e})];case 1:if(!(n=r.sent().user))throw new Error("用户不存在!");return[2,n.roles]}}))}))},t.prototype.addRoles=function(t,e,n){return r(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,s.assignRole(this.graphqlClient,this.tokenProvider,{roleCodes:e,userIds:[t],namespace:n})];case 1:return[2,r.sent().assignRole]}}))}))},t.prototype.removeRoles=function(t,e,n){return r(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,s.revokeRole(this.graphqlClient,this.tokenProvider,{roleCodes:e,userIds:[t],namespace:n})];case 1:return[2,r.sent().revokeRole]}}))}))},t.prototype.listOrgs=function(t){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.httpClient.request({method:"GET",url:this.options.host+"/api/v2/users/"+t+"/orgs"})];case 1:return[2,e.sent()]}}))}))},t.prototype.listDepartment=function(t){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,s.getUserDepartments(this.graphqlClient,this.tokenProvider,{id:t})];case 1:return[2,e.sent().user.departments]}}))}))},t.prototype.listAuthorizedResources=function(t,e,n){return r(this,void 0,void 0,(function(){var r,o,a,h,c;return i(this,(function(i){switch(i.label){case 0:return r=(n||{}).resourceType,[4,s.listUserAuthorizedResources(this.graphqlClient,this.tokenProvider,{id:t,namespace:e,resourceType:r})];case 1:if(!(o=i.sent().user))throw new Error("用户不存在");return a=o.authorizedResources,h=a.list,c=a.totalCount,[2,{list:h=u.formatAuthorizedResources(h),totalCount:c}]}}))}))},t.prototype.getUdfValue=function(t){return r(this,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return[4,s.udv(this.graphqlClient,this.tokenProvider,{targetType:a.UdfTargetType.User,targetId:t})];case 1:return e=n.sent().udv,[2,u.convertUdvToKeyValuePair(e)]}}))}))},t.prototype.getUdfValueBatch=function(t){return r(this,void 0,void 0,(function(){var e,n,r,o,h,c,l;return i(this,(function(i){switch(i.label){case 0:if(0===t.length)throw new Error("empty user id list");return[4,s.udfValueBatch(this.graphqlClient,this.tokenProvider,{targetType:a.UdfTargetType.User,targetIds:t})];case 1:for(e=i.sent().udfValueBatch,n={},r=0,o=e;r<o.length;r++)h=o[r],c=h.targetId,l=h.data,n[c]=u.convertUdvToKeyValuePair(l);return[2,n]}}))}))},t.prototype.setUdfValue=function(t,e){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:if(0===Object.keys(e).length)throw new Error("empty udf value list");return[4,s.setUdvBatch(this.graphqlClient,this.tokenProvider,{targetType:a.UdfTargetType.User,targetId:t,udvList:Object.keys(e).map((function(t){return{key:t,value:JSON.stringify(e[t])}}))})];case 1:return n.sent(),[2]}}))}))},t.prototype.setUdfValueBatch=function(t){return r(this,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:if(0===t.length)throw new Error("empty input list");return e=[],t.forEach((function(t){for(var n=t.userId,r=t.data,i=0,o=Object.keys(r);i<o.length;i++){var s=o[i];e.push({targetId:n,key:s,value:JSON.stringify(r[s])})}})),[4,s.setUdfValueBatch(this.graphqlClient,this.tokenProvider,{targetType:a.UdfTargetType.User,input:e})];case 1:return n.sent(),[2]}}))}))},t.prototype.removeUdfValue=function(t,e){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,s.removeUdv(this.graphqlClient,this.tokenProvider,{targetType:a.UdfTargetType.User,targetId:t,key:e})];case 1:return n.sent(),[2]}}))}))},t.prototype.hasRole=function(t,e,n){return r(this,void 0,void 0,(function(){var r,o;return i(this,(function(i){switch(i.label){case 0:return[4,this.listRoles(t,n)];case 1:return(r=i.sent()).totalCount<1?[2,!1]:(o=!1,r.list.forEach((function(t){t.code===e&&(o=!0)})),[2,o])}}))}))},t.prototype.kick=function(t){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.httpClient.request({url:this.options.host+"/api/v2/users/kick",method:"POST",data:{userIds:t}})];case 1:return e.sent(),[2,{code:200,message:"强制下线成功"}]}}))}))},t.prototype.logout=function(t){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:if(!t||!t.userId)throw new Error("请传入 options.userId,内容为要下线的用户 ID");return[4,this.httpClient.request({url:this.options.host+"/logout",method:"GET",params:{appId:t.appId,userId:t.userId}})];case 1:return e.sent(),[2,{code:200,message:"强制下线成功"}]}}))}))},t.prototype.checkLoginStatus=function(t,e,n){return r(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,this.httpClient.request({method:"GET",url:this.options.host+"/api/v2/users/login-status",params:{userId:t,appId:e,deviceId:n}})];case 1:return[2,r.sent()]}}))}))},t.prototype.listUserActions=function(t){var e,n;return void 0===t&&(t={page:1,limit:10}),r(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,this.httpClient.request({method:"GET",url:this.options.host+"/api/v2/analysis/user-action"+o.objectToQueryString({page:null===(e=t.page)||void 0===e?void 0:e.toString(),limit:null===(n=t.limit)||void 0===n?void 0:n.toString(),clientip:t.clientIp,operation_name:t.operationName,operator_arn:t.operatoArn})})];case 1:return[2,r.sent()]}}))}))},t.prototype.sendFirstLoginVerifyEmail=function(t){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,s.sendFirstLoginVerifyEmail(this.graphqlClient,this.tokenProvider,t)];case 1:return e.sent(),[2,!0]}}))}))},t}();e.UsersManagementClient=h},6113:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.WhitelistManagementClient=void 0;var o=n(9676),s=n(9550),a=function(){function t(t,e,n){this.options=t,this.graphqlClient=e,this.tokenProvider=n}return t.prototype.list=function(t){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,s.getWhiteList(this.graphqlClient,this.tokenProvider,{type:t})];case 1:return[2,e.sent().whitelist]}}))}))},t.prototype.add=function(t,e){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,s.addWhiteList(this.graphqlClient,this.tokenProvider,{type:t,list:e})];case 1:return[2,n.sent().addWhitelist]}}))}))},t.prototype.remove=function(t,e){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,s.removeWhiteList(this.graphqlClient,this.tokenProvider,{type:t,list:e})];case 1:return[2,n.sent().removeWhitelist]}}))}))},t.prototype.enable=function(t){return r(this,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e={},t===o.WhitelistType.Email?e.emailEnabled=!0:t===o.WhitelistType.Phone?e.phoneEnabled=!0:t===o.WhitelistType.Username?e.usernameEnabled=!0:this.options.onError(500,"不支持的白名单类型"),[4,s.updateUserpool(this.graphqlClient,this.tokenProvider,{input:{whitelist:e}})];case 1:return n.sent(),[2]}}))}))},t.prototype.disable=function(t){return r(this,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return e={},t===o.WhitelistType.Email?e.emailEnabled=!1:t===o.WhitelistType.Phone?e.phoneEnabled=!1:t===o.WhitelistType.Username?e.usernameEnabled=!1:this.options.onError(500,"不支持的白名单类型"),[4,s.updateUserpool(this.graphqlClient,this.tokenProvider,{input:{whitelist:e}})];case 1:return n.sent(),[2]}}))}))},t}();e.WhitelistManagementClient=a},6730:(t,e)=>{"use strict";var n,r;Object.defineProperty(e,"__esModule",{value:!0}),e.SupportedAdminActionEnum=e.SupportedUserActionEnum=void 0,(r=e.SupportedUserActionEnum||(e.SupportedUserActionEnum={})).LOGIN="login",r.REGISTER="register",r.DELETE_ACCOUNT="deleteAccount",r.UPDATE_USER_INFO="updateUserinfo",r.REFRESH_TOKEN="refreshToken",r.UPDATE_EMAIL="updateEmail",r.UPDATE_PHONE="updatePhone",r.UPDATE_PASSWORD="updatePassword",r.VERIFY_MFA="verifyMfa",(n=e.SupportedAdminActionEnum||(e.SupportedAdminActionEnum={})).DELETE_USER="deleteUser",n.DELETE_USERS="deleteUsers",n.CREATE_USER="createUser",n.REFRESH_TOKEN="refreshToken",n.IMPORT_USER="importUser",n.EXPORT_USER="exportUser",n.REFRESH_SECRET="refreshSecret",n.DELETE_USERPOOL="deleteUserpool",n.CREATE_USERPOOL="createUserpool",n.USERPOOL_UPDATE_CONFIG="userpool:UpdateConfig",n.REFRESH_USERPOOL_SECRET="refreshUserpoolSecret"},1721:function(t,e,n){"use strict";var r=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function s(t){try{u(r.next(t))}catch(t){o(t)}}function a(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}u((r=r.apply(t,e||[])).next())}))},i=this&&this.__generator||function(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(e,"__esModule",{value:!0}),e.generateRandomString=e.convertObjectToKeyValueList=e.convertKeyValueListToObject=e.uploadFile=e.xhrUpload=e.generateUidKey=e.formatAuthorizedResources=e.isWechatBrowser=e.convertUdvToKeyValuePair=e.convertUdv=e.objectToQueryString=e.serialize=e.createCssClassStyleSheet=e.popupCenter=e.deepEqual=e.encrypt=void 0;var o=n(9676);"undefined"==typeof window&&n.g&&(n.g.window={});var s=n(8965);e.encrypt=function(t,e){return r(void 0,void 0,void 0,(function(){return i(this,(function(n){return[2,new Promise((function(n,r){var i=new s({});i.setPublicKey(e);var o=i.encrypt(t);o?n(o):r(o)}))]}))}))},e.default=function(t){var e=[t.find((function(t){return!0===t.root}))],n=function(e){var r=t.find((function(t){return t.id===e}))||null;return Array.isArray(r.children)&&r.children.length>0&&(r.children=r.children.map(n).filter((function(t){return null!==t}))),r};return e.map((function(t){return t.children=t.children.map(n).filter((function(t){return null!==t})),t}))[0]},e.deepEqual=function(t,n){if(t===n)return!0;if("object"==typeof t&&null!=t&&"object"==typeof n&&null!=n){if(Object.keys(t).length!=Object.keys(n).length)return!1;for(var r in t){if(!n.hasOwnProperty(r))return!1;if(!e.deepEqual(t[r],n[r]))return!1}return!0}return!1},e.popupCenter=function(t,e){var n=void 0===e?{w:585,h:649}:e,r=n.w,i=n.h,o=void 0!==window.screenLeft?window.screenLeft:window.screenX,s=void 0!==window.screenTop?window.screenTop:window.screenY,a=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:window.screen.width,u=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:window.screen.height,h=a/window.screen.availWidth,c=(a-r)/2/h+o,l=(u-i)/2/h+s,d=window.open(t,"_blank","\n toolbar=no,\n menubar=no,\n scrollbars=no,\n resizable=no,\n location=no,\n status=no\n width="+r/h+",\n height="+i/h+",\n top="+l+",\n left="+c+"\n ");null==d||d.focus()},e.createCssClassStyleSheet=function(t,e){var n=document.createElement("style"),r="\n ."+t+" {\n "+e+"\n }\n ",i=document.createTextNode(r);n.appendChild(i),document.head.appendChild(n)},e.serialize=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e.join("&")},e.objectToQueryString=function(t){return t?Object.entries(t).reduce((function(t,e){var n=e[0],r=e[1],i=0===t.length?"?":"&";return t+("string"==typeof r?""+i+n+"="+r:"")}),""):""},e.convertUdv=function(t){for(var e=0,n=t;e<n.length;e++){var r=n[e],i=r.dataType,s=r.value;i===o.UdfDataType.Number||i===o.UdfDataType.Boolean?r.value=JSON.parse(s):i===o.UdfDataType.Datetime?r.value=new Date(parseInt(s)):i===o.UdfDataType.Object&&(r.value=JSON.parse(s))}return t},e.convertUdvToKeyValuePair=function(t){for(var e=0,n=t;e<n.length;e++){var r=(h=n[e]).dataType,i=h.value;r===o.UdfDataType.Number||r===o.UdfDataType.Boolean?h.value=JSON.parse(i):r===o.UdfDataType.Datetime?h.value=new Date(parseInt(i)):r===o.UdfDataType.Object&&(h.value=JSON.parse(i))}for(var s={},a=0,u=t;a<u.length;a++){var h;s[(h=u[a]).key]=h.value}return s},e.isWechatBrowser=function(){return/MicroMessenger/i.test(null===navigator||void 0===navigator?void 0:navigator.userAgent)},e.formatAuthorizedResources=function(t){return t.map((function(t){for(var e in t)t[e]||delete t[e];return t}))},e.generateUidKey=function(t){for(var e=[],n=97;n<123;n++)e.push(String.fromCharCode(n));for(var r=[];t--;){var i=Math.floor(16*Math.random());r.push(e[i])}return r.join("")},e.xhrUpload=function(t,e){return new Promise((function(n,r){var i=new FormData;i.append("file",t,t instanceof Blob?"personal.jpeg":void 0);var o=new XMLHttpRequest;o.onreadystatechange=function(){if(4===this.readyState)try{var t=JSON.parse(this.responseText),e=t.code,i=t.message,o=t.data;200!==e&&r({code:e,message:i}),n(o)}catch(t){e=500,i="上传图片失败, error = "+t.message,r({code:e,message:i})}},o.open("POST",e),o.send(i)}))},e.uploadFile=function(t){var n=t.url,r=t.accept,i=t.multiple;return new Promise((function(t,o){var s=document.createElement("input");s.type="file",s.accept=r,s.multiple=i,s.onchange=function(){var r=s.files;if(i){for(var a=[],u=0;u<r.length;)a.push(e.xhrUpload(r[u],n)),u++;Promise.all(a).then((function(e){return t(e)})).catch((function(t){return o(t)}))}else{var h=r[0];e.xhrUpload(h,n).then((function(e){return t(e)})).catch((function(t){return o(t)}))}},s.click()}))},e.convertKeyValueListToObject=function(t){for(var e={},n=0,r=t;n<r.length;n++){var i=r[n],o=i.key,s=i.value;e[o]=s}return e},e.convertObjectToKeyValueList=function(t){for(var e=[],n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];e.push({key:i,value:t[i]})}return e},e.generateRandomString=function(t){void 0===t&&(t=30);for(var e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,i=0;i<t;i++)e+=n.charAt(Math.floor(Math.random()*r));return e}},8217:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SDK_VERSION=void 0,e.SDK_VERSION="4.20.4"},9676:(t,e)=>{"use strict";var n,r,i,o,s,a,u,h,c,l,d;Object.defineProperty(e,"__esModule",{value:!0}),e.WhitelistDocument=e.UsersWithCustomDataDocument=e.UsersDocument=e.UserpoolsDocument=e.UserpoolTypesDocument=e.UserpoolDocument=e.UserWithCustomDataDocument=e.UserBatchWithCustomDataDocument=e.UserBatchDocument=e.UserDocument=e.UdvDocument=e.UdfValueBatchDocument=e.UdfDocument=e.TemplateCodeDocument=e.SocialConnectionsDocument=e.SocialConnectionInstancesDocument=e.SocialConnectionInstanceDocument=e.SocialConnectionDocument=e.SearchUserWithCustomDataDocument=e.SearchUserDocument=e.SearchNodesDocument=e.RootNodeDocument=e.RolesDocument=e.RoleWithUsersWithCustomDataDocument=e.RoleWithUsersDocument=e.RoleDocument=e.QueryMfaDocument=e.QiniuUptokenDocument=e.PreviewEmailDocument=e.PolicyWithAssignmentsDocument=e.PolicyAssignmentsDocument=e.PolicyDocument=e.PoliciesDocument=e.OrgsDocument=e.OrgDocument=e.NodeByIdWithMembersDocument=e.NodeByIdDocument=e.NodeByCodeWithMembersDocument=e.NodeByCodeDocument=e.ListUserAuthorizedResourcesDocument=e.ListRoleAuthorizedResourcesDocument=e.ListNodeByIdAuthorizedResourcesDocument=e.ListNodeByCodeAuthorizedResourcesDocument=e.ListGroupAuthorizedResourcesDocument=e.AuthorizedResourcesDocument=e.IsUserExistsDocument=e.IsRootNodeDocument=e.IsDomainAvaliableDocument=e.IsActionDeniedDocument=e.IsActionAllowedDocument=e.GroupsDocument=e.GroupWithUsersWithCustomDataDocument=e.GroupWithUsersDocument=e.GroupDocument=e.GetUserRolesDocument=e.GetUserGroupsDocument=e.GetUserDepartmentsDocument=e.FunctionsDocument=e.FunctionDocument=e.FindUserWithCustomDataDocument=e.FindUserDocument=e.EmailTemplatesDocument=e.ChildrenNodesDocument=e.CheckPasswordStrengthDocument=e.CheckLoginStatusDocument=e.AuthorizedTargetsDocument=e.ArchivedUsersDocument=e.AccessTokenDocument=e.UpdateUserpoolDocument=e.UpdateUserDocument=e.UpdateRoleDocument=e.UpdatePolicyDocument=e.UpdatePhoneDocument=e.UpdatePasswordDocument=e.UpdateNodeDocument=e.UpdateGroupDocument=e.UpdateFunctionDocument=e.UpdateEmailDocument=e.UnbindPhoneDocument=e.UnbindEmailDocument=e.SetUdvBatchDocument=e.SetUdvDocument=e.SetUdfValueBatchDocument=e.SetUdfDocument=e.SetMainDepartmentDocument=e.SendFirstLoginVerifyEmailDocument=e.SendEmailDocument=e.RevokeRoleDocument=e.ResetPasswordByFirstLoginTokenDocument=e.ResetPasswordDocument=e.RemoveWhitelistDocument=e.RemoveUserFromGroupDocument=e.RemoveUdvDocument=e.RemoveUdfDocument=e.RemovePolicyAssignmentsDocument=e.RemoveMemberDocument=e.RegisterByUsernameDocument=e.RegisterByPhoneCodeDocument=e.RegisterByEmailDocument=e.RefreshUserpoolSecretDocument=e.RefreshTokenDocument=e.RefreshAccessTokenDocument=e.MoveNodeDocument=e.MoveMembersDocument=e.LoginByUsernameDocument=e.LoginBySubAccountDocument=e.LoginByPhonePasswordDocument=e.LoginByPhoneCodeDocument=e.LoginByEmailDocument=e.EnableSocialConnectionInstanceDocument=e.EnablePolicyAssignmentDocument=e.EnableEmailTemplateDocument=e.DisbalePolicyAssignmentDocument=e.DisableSocialConnectionInstanceDocument=e.DisableEmailTemplateDocument=e.DeleteUsersDocument=e.DeleteUserpoolDocument=e.DeleteUserDocument=e.DeleteRolesDocument=e.DeleteRoleDocument=e.DeletePolicyDocument=e.DeletePoliciesDocument=e.DeleteOrgDocument=e.DeleteNodeDocument=e.DeleteGroupsDocument=e.DeleteFunctionDocument=e.CreateUserpoolDocument=e.CreateUserWithCustomDataDocument=e.CreateUserDocument=e.CreateSocialConnectionInstanceDocument=e.CreateRoleDocument=e.CreatePolicyDocument=e.CreateOrgDocument=e.CreateGroupDocument=e.CreateFunctionDocument=e.ConfigEmailTemplateDocument=e.ChangeMfaDocument=e.BindPhoneDocument=e.BindEmailDocument=e.AuthorizeResourceDocument=e.AssignRoleDocument=e.AllowDocument=e.AddWhitelistDocument=e.AddUserToGroupDocument=e.AddPolicyAssignmentsDocument=e.AddNodeV2Document=e.AddNodeDocument=e.AddMemberDocument=e.EmailScene=e.WhitelistType=e.UdfTargetType=e.PolicyEffect=e.UdfDataType=e.UserStatus=e.SortByEnum=e.EmailTemplateType=e.Operator=e.PolicyAssignmentTargetType=e.ResourceType=void 0,(d=e.ResourceType||(e.ResourceType={})).Data="DATA",d.Api="API",d.Menu="MENU",d.Ui="UI",d.Button="BUTTON",(l=e.PolicyAssignmentTargetType||(e.PolicyAssignmentTargetType={})).User="USER",l.Role="ROLE",l.Group="GROUP",l.Org="ORG",l.AkSk="AK_SK",(c=e.Operator||(e.Operator={})).And="AND",c.Or="OR",(h=e.EmailTemplateType||(e.EmailTemplateType={})).ResetPassword="RESET_PASSWORD",h.PasswordResetedNotification="PASSWORD_RESETED_NOTIFICATION",h.ChangePassword="CHANGE_PASSWORD",h.Welcome="WELCOME",h.VerifyEmail="VERIFY_EMAIL",h.ChangeEmail="CHANGE_EMAIL",(u=e.SortByEnum||(e.SortByEnum={})).CreatedatDesc="CREATEDAT_DESC",u.CreatedatAsc="CREATEDAT_ASC",u.UpdatedatDesc="UPDATEDAT_DESC",u.UpdatedatAsc="UPDATEDAT_ASC",(a=e.UserStatus||(e.UserStatus={})).Suspended="Suspended",a.Resigned="Resigned",a.Activated="Activated",a.Archived="Archived",(s=e.UdfDataType||(e.UdfDataType={})).String="STRING",s.Number="NUMBER",s.Datetime="DATETIME",s.Boolean="BOOLEAN",s.Object="OBJECT",(o=e.PolicyEffect||(e.PolicyEffect={})).Allow="ALLOW",o.Deny="DENY",(i=e.UdfTargetType||(e.UdfTargetType={})).Node="NODE",i.Org="ORG",i.User="USER",i.Userpool="USERPOOL",i.Role="ROLE",i.Permission="PERMISSION",i.Application="APPLICATION",(r=e.WhitelistType||(e.WhitelistType={})).Username="USERNAME",r.Email="EMAIL",r.Phone="PHONE",(n=e.EmailScene||(e.EmailScene={})).ResetPassword="RESET_PASSWORD",n.VerifyEmail="VERIFY_EMAIL",n.ChangeEmail="CHANGE_EMAIL",n.MfaVerify="MFA_VERIFY",e.AddMemberDocument="\n mutation addMember($page: Int, $limit: Int, $sortBy: SortByEnum, $includeChildrenNodes: Boolean, $nodeId: String, $orgId: String, $nodeCode: String, $userIds: [String!]!, $isLeader: Boolean) {\n addMember(nodeId: $nodeId, orgId: $orgId, nodeCode: $nodeCode, userIds: $userIds, isLeader: $isLeader) {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n createdAt\n updatedAt\n children\n users(page: $page, limit: $limit, sortBy: $sortBy, includeChildrenNodes: $includeChildrenNodes) {\n totalCount\n list {\n id\n arn\n userPoolId\n username\n status\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n }\n }\n}\n ",e.AddNodeDocument="\n mutation addNode($orgId: String!, $parentNodeId: String, $name: String!, $nameI18n: String, $description: String, $descriptionI18n: String, $order: Int, $code: String) {\n addNode(orgId: $orgId, parentNodeId: $parentNodeId, name: $name, nameI18n: $nameI18n, description: $description, descriptionI18n: $descriptionI18n, order: $order, code: $code) {\n id\n rootNode {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n createdAt\n updatedAt\n children\n }\n nodes {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n createdAt\n updatedAt\n children\n }\n }\n}\n ",e.AddNodeV2Document="\n mutation addNodeV2($orgId: String!, $parentNodeId: String, $name: String!, $nameI18n: String, $description: String, $descriptionI18n: String, $order: Int, $code: String) {\n addNodeV2(orgId: $orgId, parentNodeId: $parentNodeId, name: $name, nameI18n: $nameI18n, description: $description, descriptionI18n: $descriptionI18n, order: $order, code: $code) {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n createdAt\n updatedAt\n children\n }\n}\n ",e.AddPolicyAssignmentsDocument="\n mutation addPolicyAssignments($policies: [String!]!, $targetType: PolicyAssignmentTargetType!, $targetIdentifiers: [String!], $inheritByChildren: Boolean, $namespace: String) {\n addPolicyAssignments(policies: $policies, targetType: $targetType, targetIdentifiers: $targetIdentifiers, inheritByChildren: $inheritByChildren, namespace: $namespace) {\n message\n code\n }\n}\n ",e.AddUserToGroupDocument="\n mutation addUserToGroup($userIds: [String!]!, $code: String) {\n addUserToGroup(userIds: $userIds, code: $code) {\n message\n code\n }\n}\n ",e.AddWhitelistDocument="\n mutation addWhitelist($type: WhitelistType!, $list: [String!]!) {\n addWhitelist(type: $type, list: $list) {\n createdAt\n updatedAt\n value\n }\n}\n ",e.AllowDocument="\n mutation allow($resource: String!, $action: String!, $userId: String, $userIds: [String!], $roleCode: String, $roleCodes: [String!], $namespace: String) {\n allow(resource: $resource, action: $action, userId: $userId, userIds: $userIds, roleCode: $roleCode, roleCodes: $roleCodes, namespace: $namespace) {\n message\n code\n }\n}\n ",e.AssignRoleDocument="\n mutation assignRole($namespace: String, $roleCode: String, $roleCodes: [String], $userIds: [String!], $groupCodes: [String!], $nodeCodes: [String!]) {\n assignRole(namespace: $namespace, roleCode: $roleCode, roleCodes: $roleCodes, userIds: $userIds, groupCodes: $groupCodes, nodeCodes: $nodeCodes) {\n message\n code\n }\n}\n ",e.AuthorizeResourceDocument="\n mutation authorizeResource($namespace: String, $resource: String, $resourceType: ResourceType, $opts: [AuthorizeResourceOpt]) {\n authorizeResource(namespace: $namespace, resource: $resource, resourceType: $resourceType, opts: $opts) {\n code\n message\n }\n}\n ",e.BindEmailDocument="\n mutation bindEmail($email: String!, $emailCode: String!) {\n bindEmail(email: $email, emailCode: $emailCode) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n }\n}\n ",e.BindPhoneDocument="\n mutation bindPhone($phone: String!, $phoneCode: String!) {\n bindPhone(phone: $phone, phoneCode: $phoneCode) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n }\n}\n ",e.ChangeMfaDocument="\n mutation changeMfa($enable: Boolean, $id: String, $userId: String, $userPoolId: String, $refresh: Boolean) {\n changeMfa(enable: $enable, id: $id, userId: $userId, userPoolId: $userPoolId, refresh: $refresh) {\n id\n userId\n userPoolId\n enable\n secret\n }\n}\n ",e.ConfigEmailTemplateDocument="\n mutation configEmailTemplate($input: ConfigEmailTemplateInput!) {\n configEmailTemplate(input: $input) {\n type\n name\n subject\n sender\n content\n redirectTo\n hasURL\n expiresIn\n enabled\n isSystem\n }\n}\n ",e.CreateFunctionDocument="\n mutation createFunction($input: CreateFunctionInput!) {\n createFunction(input: $input) {\n id\n name\n sourceCode\n description\n url\n }\n}\n ",e.CreateGroupDocument="\n mutation createGroup($code: String!, $name: String!, $description: String) {\n createGroup(code: $code, name: $name, description: $description) {\n code\n name\n description\n createdAt\n updatedAt\n }\n}\n ",e.CreateOrgDocument="\n mutation createOrg($name: String!, $code: String, $description: String) {\n createOrg(name: $name, code: $code, description: $description) {\n id\n rootNode {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n createdAt\n updatedAt\n children\n }\n nodes {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n createdAt\n updatedAt\n children\n }\n }\n}\n ",e.CreatePolicyDocument="\n mutation createPolicy($namespace: String, $code: String!, $description: String, $statements: [PolicyStatementInput!]!) {\n createPolicy(namespace: $namespace, code: $code, description: $description, statements: $statements) {\n namespace\n code\n isDefault\n description\n statements {\n resource\n actions\n effect\n condition {\n param\n operator\n value\n }\n }\n createdAt\n updatedAt\n assignmentsCount\n }\n}\n ",e.CreateRoleDocument="\n mutation createRole($namespace: String, $code: String!, $description: String, $parent: String) {\n createRole(namespace: $namespace, code: $code, description: $description, parent: $parent) {\n id\n namespace\n code\n arn\n description\n createdAt\n updatedAt\n parent {\n namespace\n code\n arn\n description\n createdAt\n updatedAt\n }\n }\n}\n ",e.CreateSocialConnectionInstanceDocument="\n mutation createSocialConnectionInstance($input: CreateSocialConnectionInstanceInput!) {\n createSocialConnectionInstance(input: $input) {\n provider\n enabled\n fields {\n key\n value\n }\n }\n}\n ",e.CreateUserDocument="\n mutation createUser($userInfo: CreateUserInput!, $keepPassword: Boolean, $resetPasswordOnFirstLogin: Boolean) {\n createUser(userInfo: $userInfo, keepPassword: $keepPassword, resetPasswordOnFirstLogin: $resetPasswordOnFirstLogin) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n}\n ",e.CreateUserWithCustomDataDocument="\n mutation createUserWithCustomData($userInfo: CreateUserInput!, $keepPassword: Boolean, $params: String) {\n createUser(userInfo: $userInfo, keepPassword: $keepPassword, params: $params) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n customData {\n key\n value\n dataType\n label\n }\n }\n}\n ",e.CreateUserpoolDocument="\n mutation createUserpool($name: String!, $domain: String!, $description: String, $logo: String, $userpoolTypes: [String!]) {\n createUserpool(name: $name, domain: $domain, description: $description, logo: $logo, userpoolTypes: $userpoolTypes) {\n id\n name\n domain\n description\n secret\n jwtSecret\n userpoolTypes {\n code\n name\n description\n image\n sdks\n }\n logo\n createdAt\n updatedAt\n emailVerifiedDefault\n sendWelcomeEmail\n registerDisabled\n appSsoEnabled\n showWxQRCodeWhenRegisterDisabled\n allowedOrigins\n tokenExpiresAfter\n isDeleted\n frequentRegisterCheck {\n timeInterval\n limit\n enabled\n }\n loginFailCheck {\n timeInterval\n limit\n enabled\n }\n changePhoneStrategy {\n verifyOldPhone\n }\n changeEmailStrategy {\n verifyOldEmail\n }\n qrcodeLoginStrategy {\n qrcodeExpiresAfter\n returnFullUserInfo\n allowExchangeUserInfoFromBrowser\n ticketExpiresAfter\n }\n app2WxappLoginStrategy {\n ticketExpriresAfter\n ticketExchangeUserInfoNeedSecret\n }\n whitelist {\n phoneEnabled\n emailEnabled\n usernameEnabled\n }\n customSMSProvider {\n enabled\n provider\n }\n packageType\n }\n}\n ",e.DeleteFunctionDocument="\n mutation deleteFunction($id: String!) {\n deleteFunction(id: $id) {\n message\n code\n }\n}\n ",e.DeleteGroupsDocument="\n mutation deleteGroups($codeList: [String!]!) {\n deleteGroups(codeList: $codeList) {\n message\n code\n }\n}\n ",e.DeleteNodeDocument="\n mutation deleteNode($orgId: String!, $nodeId: String!) {\n deleteNode(orgId: $orgId, nodeId: $nodeId) {\n message\n code\n }\n}\n ",e.DeleteOrgDocument="\n mutation deleteOrg($id: String!) {\n deleteOrg(id: $id) {\n message\n code\n }\n}\n ",e.DeletePoliciesDocument="\n mutation deletePolicies($codeList: [String!]!, $namespace: String) {\n deletePolicies(codeList: $codeList, namespace: $namespace) {\n message\n code\n }\n}\n ",e.DeletePolicyDocument="\n mutation deletePolicy($code: String!, $namespace: String) {\n deletePolicy(code: $code, namespace: $namespace) {\n message\n code\n }\n}\n ",e.DeleteRoleDocument="\n mutation deleteRole($code: String!, $namespace: String) {\n deleteRole(code: $code, namespace: $namespace) {\n message\n code\n }\n}\n ",e.DeleteRolesDocument="\n mutation deleteRoles($codeList: [String!]!, $namespace: String) {\n deleteRoles(codeList: $codeList, namespace: $namespace) {\n message\n code\n }\n}\n ",e.DeleteUserDocument="\n mutation deleteUser($id: String!) {\n deleteUser(id: $id) {\n message\n code\n }\n}\n ",e.DeleteUserpoolDocument="\n mutation deleteUserpool {\n deleteUserpool {\n message\n code\n }\n}\n ",e.DeleteUsersDocument="\n mutation deleteUsers($ids: [String!]!) {\n deleteUsers(ids: $ids) {\n message\n code\n }\n}\n ",e.DisableEmailTemplateDocument="\n mutation disableEmailTemplate($type: EmailTemplateType!) {\n disableEmailTemplate(type: $type) {\n type\n name\n subject\n sender\n content\n redirectTo\n hasURL\n expiresIn\n enabled\n isSystem\n }\n}\n ",e.DisableSocialConnectionInstanceDocument="\n mutation disableSocialConnectionInstance($provider: String!) {\n disableSocialConnectionInstance(provider: $provider) {\n provider\n enabled\n fields {\n key\n value\n }\n }\n}\n ",e.DisbalePolicyAssignmentDocument="\n mutation disbalePolicyAssignment($policy: String!, $targetType: PolicyAssignmentTargetType!, $targetIdentifier: String!, $namespace: String) {\n disbalePolicyAssignment(policy: $policy, targetType: $targetType, targetIdentifier: $targetIdentifier, namespace: $namespace) {\n message\n code\n }\n}\n ",e.EnableEmailTemplateDocument="\n mutation enableEmailTemplate($type: EmailTemplateType!) {\n enableEmailTemplate(type: $type) {\n type\n name\n subject\n sender\n content\n redirectTo\n hasURL\n expiresIn\n enabled\n isSystem\n }\n}\n ",e.EnablePolicyAssignmentDocument="\n mutation enablePolicyAssignment($policy: String!, $targetType: PolicyAssignmentTargetType!, $targetIdentifier: String!, $namespace: String) {\n enablePolicyAssignment(policy: $policy, targetType: $targetType, targetIdentifier: $targetIdentifier, namespace: $namespace) {\n message\n code\n }\n}\n ",e.EnableSocialConnectionInstanceDocument="\n mutation enableSocialConnectionInstance($provider: String!) {\n enableSocialConnectionInstance(provider: $provider) {\n provider\n enabled\n fields {\n key\n value\n }\n }\n}\n ",e.LoginByEmailDocument="\n mutation loginByEmail($input: LoginByEmailInput!) {\n loginByEmail(input: $input) {\n id\n arn\n status\n userPoolId\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n}\n ",e.LoginByPhoneCodeDocument="\n mutation loginByPhoneCode($input: LoginByPhoneCodeInput!) {\n loginByPhoneCode(input: $input) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n}\n ",e.LoginByPhonePasswordDocument="\n mutation loginByPhonePassword($input: LoginByPhonePasswordInput!) {\n loginByPhonePassword(input: $input) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n}\n ",e.LoginBySubAccountDocument="\n mutation loginBySubAccount($account: String!, $password: String!, $captchaCode: String, $clientIp: String) {\n loginBySubAccount(account: $account, password: $password, captchaCode: $captchaCode, clientIp: $clientIp) {\n id\n arn\n status\n userPoolId\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n}\n ",e.LoginByUsernameDocument="\n mutation loginByUsername($input: LoginByUsernameInput!) {\n loginByUsername(input: $input) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n}\n ",e.MoveMembersDocument="\n mutation moveMembers($userIds: [String!]!, $sourceNodeId: String!, $targetNodeId: String!) {\n moveMembers(userIds: $userIds, sourceNodeId: $sourceNodeId, targetNodeId: $targetNodeId) {\n code\n message\n }\n}\n ",e.MoveNodeDocument="\n mutation moveNode($orgId: String!, $nodeId: String!, $targetParentId: String!) {\n moveNode(orgId: $orgId, nodeId: $nodeId, targetParentId: $targetParentId) {\n id\n rootNode {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n createdAt\n updatedAt\n children\n }\n nodes {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n createdAt\n updatedAt\n children\n }\n }\n}\n ",e.RefreshAccessTokenDocument="\n mutation refreshAccessToken($accessToken: String) {\n refreshAccessToken(accessToken: $accessToken) {\n accessToken\n exp\n iat\n }\n}\n ",e.RefreshTokenDocument="\n mutation refreshToken($id: String) {\n refreshToken(id: $id) {\n token\n iat\n exp\n }\n}\n ",e.RefreshUserpoolSecretDocument="\n mutation refreshUserpoolSecret {\n refreshUserpoolSecret\n}\n ",e.RegisterByEmailDocument="\n mutation registerByEmail($input: RegisterByEmailInput!) {\n registerByEmail(input: $input) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n}\n ",e.RegisterByPhoneCodeDocument="\n mutation registerByPhoneCode($input: RegisterByPhoneCodeInput!) {\n registerByPhoneCode(input: $input) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n}\n ",e.RegisterByUsernameDocument="\n mutation registerByUsername($input: RegisterByUsernameInput!) {\n registerByUsername(input: $input) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n}\n ",e.RemoveMemberDocument="\n mutation removeMember($page: Int, $limit: Int, $sortBy: SortByEnum, $includeChildrenNodes: Boolean, $nodeId: String, $orgId: String, $nodeCode: String, $userIds: [String!]!) {\n removeMember(nodeId: $nodeId, orgId: $orgId, nodeCode: $nodeCode, userIds: $userIds) {\n id\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n createdAt\n updatedAt\n children\n users(page: $page, limit: $limit, sortBy: $sortBy, includeChildrenNodes: $includeChildrenNodes) {\n totalCount\n list {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n }\n }\n }\n}\n ",e.RemovePolicyAssignmentsDocument="\n mutation removePolicyAssignments($policies: [String!]!, $targetType: PolicyAssignmentTargetType!, $targetIdentifiers: [String!], $namespace: String) {\n removePolicyAssignments(policies: $policies, targetType: $targetType, targetIdentifiers: $targetIdentifiers, namespace: $namespace) {\n message\n code\n }\n}\n ",e.RemoveUdfDocument="\n mutation removeUdf($targetType: UDFTargetType!, $key: String!) {\n removeUdf(targetType: $targetType, key: $key) {\n message\n code\n }\n}\n ",e.RemoveUdvDocument="\n mutation removeUdv($targetType: UDFTargetType!, $targetId: String!, $key: String!) {\n removeUdv(targetType: $targetType, targetId: $targetId, key: $key) {\n key\n dataType\n value\n label\n }\n}\n ",e.RemoveUserFromGroupDocument="\n mutation removeUserFromGroup($userIds: [String!]!, $code: String) {\n removeUserFromGroup(userIds: $userIds, code: $code) {\n message\n code\n }\n}\n ",e.RemoveWhitelistDocument="\n mutation removeWhitelist($type: WhitelistType!, $list: [String!]!) {\n removeWhitelist(type: $type, list: $list) {\n createdAt\n updatedAt\n value\n }\n}\n ",e.ResetPasswordDocument="\n mutation resetPassword($phone: String, $email: String, $code: String!, $newPassword: String!) {\n resetPassword(phone: $phone, email: $email, code: $code, newPassword: $newPassword) {\n message\n code\n }\n}\n ",e.ResetPasswordByFirstLoginTokenDocument="\n mutation resetPasswordByFirstLoginToken($token: String!, $password: String!) {\n resetPasswordByFirstLoginToken(token: $token, password: $password) {\n message\n code\n }\n}\n ",e.RevokeRoleDocument="\n mutation revokeRole($namespace: String, $roleCode: String, $roleCodes: [String], $userIds: [String!], $groupCodes: [String!], $nodeCodes: [String!]) {\n revokeRole(namespace: $namespace, roleCode: $roleCode, roleCodes: $roleCodes, userIds: $userIds, groupCodes: $groupCodes, nodeCodes: $nodeCodes) {\n message\n code\n }\n}\n ",e.SendEmailDocument="\n mutation sendEmail($email: String!, $scene: EmailScene!) {\n sendEmail(email: $email, scene: $scene) {\n message\n code\n }\n}\n ",e.SendFirstLoginVerifyEmailDocument="\n mutation sendFirstLoginVerifyEmail($userId: String!, $appId: String!) {\n sendFirstLoginVerifyEmail(userId: $userId, appId: $appId) {\n message\n code\n }\n}\n ",e.SetMainDepartmentDocument="\n mutation setMainDepartment($userId: String!, $departmentId: String) {\n setMainDepartment(userId: $userId, departmentId: $departmentId) {\n message\n code\n }\n}\n ",e.SetUdfDocument="\n mutation setUdf($targetType: UDFTargetType!, $key: String!, $dataType: UDFDataType!, $label: String!, $options: String) {\n setUdf(targetType: $targetType, key: $key, dataType: $dataType, label: $label, options: $options) {\n targetType\n dataType\n key\n label\n options\n }\n}\n ",e.SetUdfValueBatchDocument="\n mutation setUdfValueBatch($targetType: UDFTargetType!, $input: [SetUdfValueBatchInput!]!) {\n setUdfValueBatch(targetType: $targetType, input: $input) {\n code\n message\n }\n}\n ",e.SetUdvDocument="\n mutation setUdv($targetType: UDFTargetType!, $targetId: String!, $key: String!, $value: String!) {\n setUdv(targetType: $targetType, targetId: $targetId, key: $key, value: $value) {\n key\n dataType\n value\n label\n }\n}\n ",e.SetUdvBatchDocument="\n mutation setUdvBatch($targetType: UDFTargetType!, $targetId: String!, $udvList: [UserDefinedDataInput!]) {\n setUdvBatch(targetType: $targetType, targetId: $targetId, udvList: $udvList) {\n key\n dataType\n value\n label\n }\n}\n ",e.UnbindEmailDocument="\n mutation unbindEmail {\n unbindEmail {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n }\n}\n ",e.UnbindPhoneDocument="\n mutation unbindPhone {\n unbindPhone {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n }\n}\n ",e.UpdateEmailDocument="\n mutation updateEmail($email: String!, $emailCode: String!, $oldEmail: String, $oldEmailCode: String) {\n updateEmail(email: $email, emailCode: $emailCode, oldEmail: $oldEmail, oldEmailCode: $oldEmailCode) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n }\n}\n ",e.UpdateFunctionDocument="\n mutation updateFunction($input: UpdateFunctionInput!) {\n updateFunction(input: $input) {\n id\n name\n sourceCode\n description\n url\n }\n}\n ",e.UpdateGroupDocument="\n mutation updateGroup($code: String!, $name: String, $description: String, $newCode: String) {\n updateGroup(code: $code, name: $name, description: $description, newCode: $newCode) {\n code\n name\n description\n createdAt\n updatedAt\n }\n}\n ",e.UpdateNodeDocument="\n mutation updateNode($page: Int, $limit: Int, $sortBy: SortByEnum, $includeChildrenNodes: Boolean, $id: String!, $name: String, $code: String, $description: String) {\n updateNode(id: $id, name: $name, code: $code, description: $description) {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n createdAt\n updatedAt\n children\n users(page: $page, limit: $limit, sortBy: $sortBy, includeChildrenNodes: $includeChildrenNodes) {\n totalCount\n }\n }\n}\n ",e.UpdatePasswordDocument="\n mutation updatePassword($newPassword: String!, $oldPassword: String) {\n updatePassword(newPassword: $newPassword, oldPassword: $oldPassword) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n }\n}\n ",e.UpdatePhoneDocument="\n mutation updatePhone($phone: String!, $phoneCode: String!, $oldPhone: String, $oldPhoneCode: String) {\n updatePhone(phone: $phone, phoneCode: $phoneCode, oldPhone: $oldPhone, oldPhoneCode: $oldPhoneCode) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n }\n}\n ",e.UpdatePolicyDocument="\n mutation updatePolicy($namespace: String, $code: String!, $description: String, $statements: [PolicyStatementInput!], $newCode: String) {\n updatePolicy(namespace: $namespace, code: $code, description: $description, statements: $statements, newCode: $newCode) {\n namespace\n code\n description\n statements {\n resource\n actions\n effect\n condition {\n param\n operator\n value\n }\n }\n createdAt\n updatedAt\n }\n}\n ",e.UpdateRoleDocument="\n mutation updateRole($code: String!, $description: String, $newCode: String, $namespace: String) {\n updateRole(code: $code, description: $description, newCode: $newCode, namespace: $namespace) {\n id\n namespace\n code\n arn\n description\n createdAt\n updatedAt\n parent {\n namespace\n code\n arn\n description\n createdAt\n updatedAt\n }\n }\n}\n ",e.UpdateUserDocument="\n mutation updateUser($id: String, $input: UpdateUserInput!) {\n updateUser(id: $id, input: $input) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n}\n ",e.UpdateUserpoolDocument="\n mutation updateUserpool($input: UpdateUserpoolInput!) {\n updateUserpool(input: $input) {\n id\n name\n domain\n description\n secret\n jwtSecret\n userpoolTypes {\n code\n name\n description\n image\n sdks\n }\n logo\n createdAt\n updatedAt\n emailVerifiedDefault\n sendWelcomeEmail\n registerDisabled\n appSsoEnabled\n showWxQRCodeWhenRegisterDisabled\n allowedOrigins\n tokenExpiresAfter\n isDeleted\n frequentRegisterCheck {\n timeInterval\n limit\n enabled\n }\n loginFailCheck {\n timeInterval\n limit\n enabled\n }\n changePhoneStrategy {\n verifyOldPhone\n }\n changeEmailStrategy {\n verifyOldEmail\n }\n qrcodeLoginStrategy {\n qrcodeExpiresAfter\n returnFullUserInfo\n allowExchangeUserInfoFromBrowser\n ticketExpiresAfter\n }\n app2WxappLoginStrategy {\n ticketExpriresAfter\n ticketExchangeUserInfoNeedSecret\n }\n whitelist {\n phoneEnabled\n emailEnabled\n usernameEnabled\n }\n customSMSProvider {\n enabled\n provider\n config\n }\n packageType\n useCustomUserStore\n loginRequireEmailVerified\n verifyCodeLength\n }\n}\n ",e.AccessTokenDocument="\n query accessToken($userPoolId: String!, $secret: String!) {\n accessToken(userPoolId: $userPoolId, secret: $secret) {\n accessToken\n exp\n iat\n }\n}\n ",e.ArchivedUsersDocument="\n query archivedUsers($page: Int, $limit: Int) {\n archivedUsers(page: $page, limit: $limit) {\n totalCount\n list {\n id\n arn\n status\n userPoolId\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n }\n}\n ",e.AuthorizedTargetsDocument="\n query authorizedTargets($namespace: String!, $resourceType: ResourceType!, $resource: String!, $targetType: PolicyAssignmentTargetType, $actions: AuthorizedTargetsActionsInput) {\n authorizedTargets(namespace: $namespace, resource: $resource, resourceType: $resourceType, targetType: $targetType, actions: $actions) {\n totalCount\n list {\n targetType\n targetIdentifier\n actions\n }\n }\n}\n ",e.CheckLoginStatusDocument="\n query checkLoginStatus($token: String) {\n checkLoginStatus(token: $token) {\n code\n message\n status\n exp\n iat\n data {\n id\n userPoolId\n arn\n }\n }\n}\n ",e.CheckPasswordStrengthDocument="\n query checkPasswordStrength($password: String!) {\n checkPasswordStrength(password: $password) {\n valid\n message\n }\n}\n ",e.ChildrenNodesDocument="\n query childrenNodes($nodeId: String!) {\n childrenNodes(nodeId: $nodeId) {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n createdAt\n updatedAt\n children\n }\n}\n ",e.EmailTemplatesDocument="\n query emailTemplates {\n emailTemplates {\n type\n name\n subject\n sender\n content\n redirectTo\n hasURL\n expiresIn\n enabled\n isSystem\n }\n}\n ",e.FindUserDocument="\n query findUser($email: String, $phone: String, $username: String, $externalId: String) {\n findUser(email: $email, phone: $phone, username: $username, externalId: $externalId) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n}\n ",e.FindUserWithCustomDataDocument="\n query findUserWithCustomData($email: String, $phone: String, $username: String, $externalId: String) {\n findUser(email: $email, phone: $phone, username: $username, externalId: $externalId) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n customData {\n key\n value\n dataType\n label\n }\n }\n}\n ",e.FunctionDocument="\n query function($id: String) {\n function(id: $id) {\n id\n name\n sourceCode\n description\n url\n }\n}\n ",e.FunctionsDocument="\n query functions($page: Int, $limit: Int, $sortBy: SortByEnum) {\n functions(page: $page, limit: $limit, sortBy: $sortBy) {\n list {\n id\n name\n sourceCode\n description\n url\n }\n totalCount\n }\n}\n ",e.GetUserDepartmentsDocument="\n query getUserDepartments($id: String!, $orgId: String) {\n user(id: $id) {\n departments(orgId: $orgId) {\n totalCount\n list {\n department {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n codePath\n namePath\n createdAt\n updatedAt\n children\n }\n isMainDepartment\n joinedAt\n }\n }\n }\n}\n ",e.GetUserGroupsDocument="\n query getUserGroups($id: String!) {\n user(id: $id) {\n groups {\n totalCount\n list {\n code\n name\n description\n createdAt\n updatedAt\n }\n }\n }\n}\n ",e.GetUserRolesDocument="\n query getUserRoles($id: String!, $namespace: String) {\n user(id: $id) {\n roles(namespace: $namespace) {\n totalCount\n list {\n code\n namespace\n arn\n description\n createdAt\n updatedAt\n parent {\n code\n namespace\n arn\n description\n createdAt\n updatedAt\n }\n }\n }\n }\n}\n ",e.GroupDocument="\n query group($code: String!) {\n group(code: $code) {\n code\n name\n description\n createdAt\n updatedAt\n }\n}\n ",e.GroupWithUsersDocument="\n query groupWithUsers($code: String!, $page: Int, $limit: Int) {\n group(code: $code) {\n users(page: $page, limit: $limit) {\n totalCount\n list {\n id\n arn\n userPoolId\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n }\n }\n}\n ",e.GroupWithUsersWithCustomDataDocument="\n query groupWithUsersWithCustomData($code: String!, $page: Int, $limit: Int) {\n group(code: $code) {\n users(page: $page, limit: $limit) {\n totalCount\n list {\n id\n arn\n userPoolId\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n customData {\n key\n value\n dataType\n label\n }\n }\n }\n }\n}\n ",e.GroupsDocument="\n query groups($userId: String, $page: Int, $limit: Int, $sortBy: SortByEnum) {\n groups(userId: $userId, page: $page, limit: $limit, sortBy: $sortBy) {\n totalCount\n list {\n code\n name\n description\n createdAt\n updatedAt\n }\n }\n}\n ",e.IsActionAllowedDocument="\n query isActionAllowed($resource: String!, $action: String!, $userId: String!, $namespace: String) {\n isActionAllowed(resource: $resource, action: $action, userId: $userId, namespace: $namespace)\n}\n ",e.IsActionDeniedDocument="\n query isActionDenied($resource: String!, $action: String!, $userId: String!) {\n isActionDenied(resource: $resource, action: $action, userId: $userId)\n}\n ",e.IsDomainAvaliableDocument="\n query isDomainAvaliable($domain: String!) {\n isDomainAvaliable(domain: $domain)\n}\n ",e.IsRootNodeDocument="\n query isRootNode($nodeId: String!, $orgId: String!) {\n isRootNode(nodeId: $nodeId, orgId: $orgId)\n}\n ",e.IsUserExistsDocument="\n query isUserExists($email: String, $phone: String, $username: String, $externalId: String) {\n isUserExists(email: $email, phone: $phone, username: $username, externalId: $externalId)\n}\n ",e.AuthorizedResourcesDocument="\n query authorizedResources($targetType: PolicyAssignmentTargetType, $targetIdentifier: String, $namespace: String, $resourceType: String) {\n authorizedResources(targetType: $targetType, targetIdentifier: $targetIdentifier, namespace: $namespace, resourceType: $resourceType) {\n totalCount\n list {\n code\n type\n actions\n }\n }\n}\n ",e.ListGroupAuthorizedResourcesDocument="\n query listGroupAuthorizedResources($code: String!, $namespace: String, $resourceType: String) {\n group(code: $code) {\n authorizedResources(namespace: $namespace, resourceType: $resourceType) {\n totalCount\n list {\n code\n type\n actions\n }\n }\n }\n}\n ",e.ListNodeByCodeAuthorizedResourcesDocument="\n query listNodeByCodeAuthorizedResources($orgId: String!, $code: String!, $namespace: String, $resourceType: String) {\n nodeByCode(orgId: $orgId, code: $code) {\n authorizedResources(namespace: $namespace, resourceType: $resourceType) {\n totalCount\n list {\n code\n type\n actions\n }\n }\n }\n}\n ",e.ListNodeByIdAuthorizedResourcesDocument="\n query listNodeByIdAuthorizedResources($id: String!, $namespace: String, $resourceType: String) {\n nodeById(id: $id) {\n authorizedResources(namespace: $namespace, resourceType: $resourceType) {\n totalCount\n list {\n code\n type\n actions\n }\n }\n }\n}\n ",e.ListRoleAuthorizedResourcesDocument="\n query listRoleAuthorizedResources($code: String!, $namespace: String, $resourceType: String) {\n role(code: $code, namespace: $namespace) {\n authorizedResources(resourceType: $resourceType) {\n totalCount\n list {\n code\n type\n actions\n }\n }\n }\n}\n ",e.ListUserAuthorizedResourcesDocument="\n query listUserAuthorizedResources($id: String!, $namespace: String, $resourceType: String) {\n user(id: $id) {\n authorizedResources(namespace: $namespace, resourceType: $resourceType) {\n totalCount\n list {\n code\n type\n actions\n }\n }\n }\n}\n ",e.NodeByCodeDocument="\n query nodeByCode($orgId: String!, $code: String!) {\n nodeByCode(orgId: $orgId, code: $code) {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n createdAt\n updatedAt\n children\n }\n}\n ",e.NodeByCodeWithMembersDocument="\n query nodeByCodeWithMembers($page: Int, $limit: Int, $sortBy: SortByEnum, $includeChildrenNodes: Boolean, $orgId: String!, $code: String!) {\n nodeByCode(orgId: $orgId, code: $code) {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n createdAt\n updatedAt\n children\n users(page: $page, limit: $limit, sortBy: $sortBy, includeChildrenNodes: $includeChildrenNodes) {\n totalCount\n list {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n }\n }\n}\n ",e.NodeByIdDocument="\n query nodeById($id: String!) {\n nodeById(id: $id) {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n createdAt\n updatedAt\n children\n }\n}\n ",e.NodeByIdWithMembersDocument="\n query nodeByIdWithMembers($page: Int, $limit: Int, $sortBy: SortByEnum, $includeChildrenNodes: Boolean, $id: String!) {\n nodeById(id: $id) {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n createdAt\n updatedAt\n children\n users(page: $page, limit: $limit, sortBy: $sortBy, includeChildrenNodes: $includeChildrenNodes) {\n totalCount\n list {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n }\n }\n}\n ",e.OrgDocument="\n query org($id: String!) {\n org(id: $id) {\n id\n rootNode {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n createdAt\n updatedAt\n children\n }\n nodes {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n createdAt\n updatedAt\n children\n }\n }\n}\n ",e.OrgsDocument="\n query orgs($page: Int, $limit: Int, $sortBy: SortByEnum) {\n orgs(page: $page, limit: $limit, sortBy: $sortBy) {\n totalCount\n list {\n id\n rootNode {\n id\n name\n nameI18n\n path\n description\n descriptionI18n\n order\n code\n root\n depth\n createdAt\n updatedAt\n children\n }\n nodes {\n id\n name\n path\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n createdAt\n updatedAt\n children\n }\n }\n }\n}\n ",e.PoliciesDocument="\n query policies($page: Int, $limit: Int, $namespace: String) {\n policies(page: $page, limit: $limit, namespace: $namespace) {\n totalCount\n list {\n namespace\n code\n description\n createdAt\n updatedAt\n statements {\n resource\n actions\n effect\n condition {\n param\n operator\n value\n }\n }\n }\n }\n}\n ",e.PolicyDocument="\n query policy($namespace: String, $code: String!) {\n policy(code: $code, namespace: $namespace) {\n namespace\n code\n isDefault\n description\n statements {\n resource\n actions\n effect\n condition {\n param\n operator\n value\n }\n }\n createdAt\n updatedAt\n }\n}\n ",e.PolicyAssignmentsDocument="\n query policyAssignments($namespace: String, $code: String, $targetType: PolicyAssignmentTargetType, $targetIdentifier: String, $page: Int, $limit: Int) {\n policyAssignments(namespace: $namespace, code: $code, targetType: $targetType, targetIdentifier: $targetIdentifier, page: $page, limit: $limit) {\n totalCount\n list {\n code\n targetType\n targetIdentifier\n }\n }\n}\n ",e.PolicyWithAssignmentsDocument="\n query policyWithAssignments($page: Int, $limit: Int, $code: String!) {\n policy(code: $code) {\n code\n isDefault\n description\n statements {\n resource\n actions\n effect\n }\n createdAt\n updatedAt\n assignmentsCount\n assignments(page: $page, limit: $limit) {\n code\n targetType\n targetIdentifier\n }\n }\n}\n ",e.PreviewEmailDocument="\n query previewEmail($type: EmailTemplateType!) {\n previewEmail(type: $type)\n}\n ",e.QiniuUptokenDocument="\n query qiniuUptoken($type: String) {\n qiniuUptoken(type: $type)\n}\n ",e.QueryMfaDocument="\n query queryMfa($id: String, $userId: String, $userPoolId: String) {\n queryMfa(id: $id, userId: $userId, userPoolId: $userPoolId) {\n id\n userId\n userPoolId\n enable\n secret\n }\n}\n ",e.RoleDocument="\n query role($code: String!, $namespace: String) {\n role(code: $code, namespace: $namespace) {\n id\n namespace\n code\n arn\n description\n createdAt\n updatedAt\n parent {\n namespace\n code\n arn\n description\n createdAt\n updatedAt\n }\n }\n}\n ",e.RoleWithUsersDocument="\n query roleWithUsers($code: String!, $namespace: String, $page: Int, $limit: Int) {\n role(code: $code, namespace: $namespace) {\n users(page: $page, limit: $limit) {\n totalCount\n list {\n id\n arn\n status\n userPoolId\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n }\n }\n}\n ",e.RoleWithUsersWithCustomDataDocument="\n query roleWithUsersWithCustomData($code: String!, $namespace: String, $page: Int, $limit: Int) {\n role(code: $code, namespace: $namespace) {\n users(page: $page, limit: $limit) {\n totalCount\n list {\n id\n arn\n status\n userPoolId\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n customData {\n key\n value\n dataType\n label\n }\n }\n }\n }\n}\n ",e.RolesDocument="\n query roles($namespace: String, $page: Int, $limit: Int, $sortBy: SortByEnum) {\n roles(namespace: $namespace, page: $page, limit: $limit, sortBy: $sortBy) {\n totalCount\n list {\n id\n namespace\n code\n arn\n description\n createdAt\n updatedAt\n }\n }\n}\n ",e.RootNodeDocument="\n query rootNode($orgId: String!) {\n rootNode(orgId: $orgId) {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n codePath\n namePath\n createdAt\n updatedAt\n children\n }\n}\n ",e.SearchNodesDocument="\n query searchNodes($keyword: String!) {\n searchNodes(keyword: $keyword) {\n id\n orgId\n name\n nameI18n\n description\n descriptionI18n\n order\n code\n root\n depth\n path\n codePath\n namePath\n createdAt\n updatedAt\n children\n }\n}\n ",e.SearchUserDocument="\n query searchUser($query: String!, $fields: [String], $page: Int, $limit: Int, $departmentOpts: [SearchUserDepartmentOpt], $groupOpts: [SearchUserGroupOpt], $roleOpts: [SearchUserRoleOpt]) {\n searchUser(query: $query, fields: $fields, page: $page, limit: $limit, departmentOpts: $departmentOpts, groupOpts: $groupOpts, roleOpts: $roleOpts) {\n totalCount\n list {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n }\n}\n ",e.SearchUserWithCustomDataDocument="\n query searchUserWithCustomData($query: String!, $fields: [String], $page: Int, $limit: Int, $departmentOpts: [SearchUserDepartmentOpt], $groupOpts: [SearchUserGroupOpt], $roleOpts: [SearchUserRoleOpt]) {\n searchUser(query: $query, fields: $fields, page: $page, limit: $limit, departmentOpts: $departmentOpts, groupOpts: $groupOpts, roleOpts: $roleOpts) {\n totalCount\n list {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n customData {\n key\n value\n dataType\n label\n }\n }\n }\n}\n ",e.SocialConnectionDocument="\n query socialConnection($provider: String!) {\n socialConnection(provider: $provider) {\n provider\n name\n logo\n description\n fields {\n key\n label\n type\n placeholder\n }\n }\n}\n ",e.SocialConnectionInstanceDocument="\n query socialConnectionInstance($provider: String!) {\n socialConnectionInstance(provider: $provider) {\n provider\n enabled\n fields {\n key\n value\n }\n }\n}\n ",e.SocialConnectionInstancesDocument="\n query socialConnectionInstances {\n socialConnectionInstances {\n provider\n enabled\n fields {\n key\n value\n }\n }\n}\n ",e.SocialConnectionsDocument="\n query socialConnections {\n socialConnections {\n provider\n name\n logo\n description\n fields {\n key\n label\n type\n placeholder\n }\n }\n}\n ",e.TemplateCodeDocument="\n query templateCode {\n templateCode\n}\n ",e.UdfDocument="\n query udf($targetType: UDFTargetType!) {\n udf(targetType: $targetType) {\n targetType\n dataType\n key\n label\n options\n }\n}\n ",e.UdfValueBatchDocument="\n query udfValueBatch($targetType: UDFTargetType!, $targetIds: [String!]!) {\n udfValueBatch(targetType: $targetType, targetIds: $targetIds) {\n targetId\n data {\n key\n dataType\n value\n label\n }\n }\n}\n ",e.UdvDocument="\n query udv($targetType: UDFTargetType!, $targetId: String!) {\n udv(targetType: $targetType, targetId: $targetId) {\n key\n dataType\n value\n label\n }\n}\n ",e.UserDocument="\n query user($id: String) {\n user(id: $id) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n identities {\n openid\n userIdInIdp\n userId\n connectionId\n isSocial\n provider\n userPoolId\n }\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n}\n ",e.UserBatchDocument="\n query userBatch($ids: [String!]!, $type: String) {\n userBatch(ids: $ids, type: $type) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n}\n ",e.UserBatchWithCustomDataDocument="\n query userBatchWithCustomData($ids: [String!]!, $type: String) {\n userBatch(ids: $ids, type: $type) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n customData {\n key\n value\n dataType\n label\n }\n }\n}\n ",e.UserWithCustomDataDocument="\n query userWithCustomData($id: String) {\n user(id: $id) {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n identities {\n openid\n userIdInIdp\n userId\n connectionId\n isSocial\n provider\n userPoolId\n }\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n customData {\n key\n value\n dataType\n label\n }\n }\n}\n ",e.UserpoolDocument="\n query userpool {\n userpool {\n id\n name\n domain\n description\n secret\n jwtSecret\n ownerId\n userpoolTypes {\n code\n name\n description\n image\n sdks\n }\n logo\n createdAt\n updatedAt\n emailVerifiedDefault\n sendWelcomeEmail\n registerDisabled\n appSsoEnabled\n showWxQRCodeWhenRegisterDisabled\n allowedOrigins\n tokenExpiresAfter\n isDeleted\n frequentRegisterCheck {\n timeInterval\n limit\n enabled\n }\n loginFailCheck {\n timeInterval\n limit\n enabled\n }\n changePhoneStrategy {\n verifyOldPhone\n }\n changeEmailStrategy {\n verifyOldEmail\n }\n qrcodeLoginStrategy {\n qrcodeExpiresAfter\n returnFullUserInfo\n allowExchangeUserInfoFromBrowser\n ticketExpiresAfter\n }\n app2WxappLoginStrategy {\n ticketExpriresAfter\n ticketExchangeUserInfoNeedSecret\n }\n whitelist {\n phoneEnabled\n emailEnabled\n usernameEnabled\n }\n customSMSProvider {\n enabled\n provider\n config\n }\n packageType\n useCustomUserStore\n loginRequireEmailVerified\n verifyCodeLength\n }\n}\n ",e.UserpoolTypesDocument="\n query userpoolTypes {\n userpoolTypes {\n code\n name\n description\n image\n sdks\n }\n}\n ",e.UserpoolsDocument="\n query userpools($page: Int, $limit: Int, $sortBy: SortByEnum) {\n userpools(page: $page, limit: $limit, sortBy: $sortBy) {\n totalCount\n list {\n id\n name\n domain\n ownerId\n description\n secret\n jwtSecret\n logo\n createdAt\n updatedAt\n emailVerifiedDefault\n sendWelcomeEmail\n registerDisabled\n appSsoEnabled\n showWxQRCodeWhenRegisterDisabled\n allowedOrigins\n tokenExpiresAfter\n isDeleted\n packageType\n useCustomUserStore\n loginRequireEmailVerified\n verifyCodeLength\n }\n }\n}\n ",e.UsersDocument="\n query users($page: Int, $limit: Int, $sortBy: SortByEnum) {\n users(page: $page, limit: $limit, sortBy: $sortBy) {\n totalCount\n list {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n }\n }\n}\n ",e.UsersWithCustomDataDocument="\n query usersWithCustomData($page: Int, $limit: Int, $sortBy: SortByEnum) {\n users(page: $page, limit: $limit, sortBy: $sortBy) {\n totalCount\n list {\n id\n arn\n userPoolId\n status\n username\n email\n emailVerified\n phone\n phoneVerified\n unionid\n openid\n nickname\n registerSource\n photo\n password\n oauth\n token\n tokenExpiredAt\n loginsCount\n lastLogin\n lastIP\n signedUp\n blocked\n isDeleted\n device\n browser\n company\n name\n givenName\n familyName\n middleName\n profile\n preferredUsername\n website\n gender\n birthdate\n zoneinfo\n locale\n address\n formatted\n streetAddress\n locality\n region\n postalCode\n city\n province\n country\n createdAt\n updatedAt\n externalId\n customData {\n key\n value\n dataType\n label\n }\n }\n }\n}\n ",e.WhitelistDocument="\n query whitelist($type: WhitelistType!) {\n whitelist(type: $type) {\n createdAt\n updatedAt\n value\n }\n}\n "},4927:(t,e,n)=>{function r(t){try{if(!n.g.localStorage)return!1}catch(t){return!1}var e=n.g.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=function(t,e){if(r("noDeprecation"))return t;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}},950:()=>{},6601:()=>{},9214:()=>{},8623:()=>{},7748:()=>{},5568:()=>{},6619:()=>{},7108:()=>{},2361:()=>{},4616:()=>{}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var n=__webpack_module_cache__[t]={id:t,loaded:!1,exports:{}};return __webpack_modules__[t].call(n.exports,n,n.exports,__webpack_require__),n.loaded=!0,n.exports}__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var __webpack_exports__=__webpack_require__(3607);window.Authing=__webpack_exports__})();
|
@@ -1,91 +0,0 @@
|
|
1
|
-
/*!
|
2
|
-
* The buffer module from node.js, for the browser.
|
3
|
-
*
|
4
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
5
|
-
* @license MIT
|
6
|
-
*/
|
7
|
-
|
8
|
-
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
9
|
-
|
10
|
-
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
11
|
-
|
12
|
-
/*!**********************!*\
|
13
|
-
!*** ./lib/index.js ***!
|
14
|
-
\**********************/
|
15
|
-
|
16
|
-
/*!**************************!*\
|
17
|
-
!*** ./lib/JSEncrypt.js ***!
|
18
|
-
\**************************/
|
19
|
-
|
20
|
-
/*!**************************!*\
|
21
|
-
!*** ./lib/version.json ***!
|
22
|
-
\**************************/
|
23
|
-
|
24
|
-
/*!*****************************!*\
|
25
|
-
!*** ./lib/lib/jsbn/rng.js ***!
|
26
|
-
\*****************************/
|
27
|
-
|
28
|
-
/*!*****************************!*\
|
29
|
-
!*** ./lib/lib/jsbn/rsa.js ***!
|
30
|
-
\*****************************/
|
31
|
-
|
32
|
-
/*!******************************!*\
|
33
|
-
!*** ./lib/lib/jsbn/jsbn.js ***!
|
34
|
-
\******************************/
|
35
|
-
|
36
|
-
/*!******************************!*\
|
37
|
-
!*** ./lib/lib/jsbn/util.js ***!
|
38
|
-
\******************************/
|
39
|
-
|
40
|
-
/*!*******************************!*\
|
41
|
-
!*** ./lib/lib/asn1js/hex.js ***!
|
42
|
-
\*******************************/
|
43
|
-
|
44
|
-
/*!*******************************!*\
|
45
|
-
!*** ./lib/lib/jsbn/prng4.js ***!
|
46
|
-
\*******************************/
|
47
|
-
|
48
|
-
/*!********************************!*\
|
49
|
-
!*** ./lib/JSEncryptRSAKey.js ***!
|
50
|
-
\********************************/
|
51
|
-
|
52
|
-
/*!********************************!*\
|
53
|
-
!*** ./lib/lib/asn1js/asn1.js ***!
|
54
|
-
\********************************/
|
55
|
-
|
56
|
-
/*!********************************!*\
|
57
|
-
!*** ./lib/lib/jsbn/base64.js ***!
|
58
|
-
\********************************/
|
59
|
-
|
60
|
-
/*!*********************************!*\
|
61
|
-
!*** ./lib/lib/asn1js/int10.js ***!
|
62
|
-
\*********************************/
|
63
|
-
|
64
|
-
/*!**********************************!*\
|
65
|
-
!*** ./lib/lib/asn1js/base64.js ***!
|
66
|
-
\**********************************/
|
67
|
-
|
68
|
-
/*!************************************!*\
|
69
|
-
!*** ./lib/lib/jsrsasign/yahoo.js ***!
|
70
|
-
\************************************/
|
71
|
-
|
72
|
-
/*!***************************************!*\
|
73
|
-
!*** ./lib/lib/jsrsasign/asn1-1.0.js ***!
|
74
|
-
\***************************************/
|
75
|
-
|
76
|
-
/** @preserve
|
77
|
-
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
78
|
-
* derived from CryptoJS.mode.CTR
|
79
|
-
* Jan Hruby jhruby.web@gmail.com
|
80
|
-
*/
|
81
|
-
|
82
|
-
/** @preserve
|
83
|
-
(c) 2012 by Cédric Mesnil. All rights reserved.
|
84
|
-
|
85
|
-
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
86
|
-
|
87
|
-
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
88
|
-
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
89
|
-
|
90
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
91
|
-
*/
|
@@ -1,7 +0,0 @@
|
|
1
|
-
export * from './lib/management/ManagementClient';
|
2
|
-
export * from './lib/management/types';
|
3
|
-
export * from './lib/management/ManagementTokenProvider';
|
4
|
-
export * from './lib/authentication/types';
|
5
|
-
export * from './lib/authentication/AuthenticationClient';
|
6
|
-
export * from './lib/authentication/AuthenticationTokenProvider';
|
7
|
-
export * from './types/graphql.v2';
|
@@ -1,20 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
5
|
-
}) : (function(o, m, k, k2) {
|
6
|
-
if (k2 === undefined) k2 = k;
|
7
|
-
o[k2] = m[k];
|
8
|
-
}));
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
10
|
-
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
|
11
|
-
};
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
13
|
-
__exportStar(require("./lib/management/ManagementClient"), exports);
|
14
|
-
__exportStar(require("./lib/management/types"), exports);
|
15
|
-
__exportStar(require("./lib/management/ManagementTokenProvider"), exports);
|
16
|
-
__exportStar(require("./lib/authentication/types"), exports);
|
17
|
-
__exportStar(require("./lib/authentication/AuthenticationClient"), exports);
|
18
|
-
__exportStar(require("./lib/authentication/AuthenticationTokenProvider"), exports);
|
19
|
-
__exportStar(require("./types/graphql.v2"), exports);
|
20
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0FBQUEsb0VBQWtEO0FBQ2xELHlEQUF1QztBQUN2QywyRUFBeUQ7QUFDekQsNkRBQTJDO0FBQzNDLDRFQUEwRDtBQUMxRCxtRkFBaUU7QUFDakUscURBQW1DIn0=
|
@@ -1,1118 +0,0 @@
|
|
1
|
-
import { AuthenticationTokenProvider } from './AuthenticationTokenProvider';
|
2
|
-
import { GraphqlClient } from '../common/GraphqlClient';
|
3
|
-
import { AuthenticationClientOptions, ICasParams, ILogoutParams, IOauthParams, IOidcParams, PasswordSecurityLevel, ProviderType, SecurityLevel } from './types';
|
4
|
-
import { CheckPasswordStrengthResult, CommonMessage, EmailScene, JwtTokenStatus, PaginatedAuthorizedResources, RefreshToken, RegisterProfile, ResourceType, UpdateUserInput, User, UserDefinedData } from '../../types/graphql.v2';
|
5
|
-
import { QrCodeAuthenticationClient } from './QrCodeAuthenticationClient';
|
6
|
-
import { MfaAuthenticationClient } from './MfaAuthenticationClient';
|
7
|
-
import { HttpClient, NaiveHttpClient } from '../common/HttpClient';
|
8
|
-
import { SocialAuthenticationClient } from './SocialAuthenticationClient';
|
9
|
-
import { KeyValuePair, Lang } from '../../types';
|
10
|
-
import { EnterpriseAuthenticationClient } from './EnterpriseAuthenticationClient';
|
11
|
-
import { BaseAuthenticationClient } from './BaseAuthenticationClient';
|
12
|
-
import { ApplicationPublicDetail } from '../management/types';
|
13
|
-
/**
|
14
|
-
* @class AuthenticationClient 认证核心模块
|
15
|
-
* @description 此模块包含注册登录、重置手机号邮箱、修改账号信息等方法,是以你的终端用户(End User)的身份进行请求,适合在需要验证用户身份的情况下使用。
|
16
|
-
*
|
17
|
-
* @example
|
18
|
-
*
|
19
|
-
* 使用方法:
|
20
|
-
*
|
21
|
-
* \`\`\`javascript
|
22
|
-
* import { AuthenticationClient } from "authing-js-sdk"
|
23
|
-
* const authenticationClient = new AuthenticationClient({
|
24
|
-
* appId: "YOUR_APP_ID",
|
25
|
-
* })
|
26
|
-
* authenticationClient.registerByEmail // 使用邮箱注册
|
27
|
-
* authenticationClient.loginByEmail // 使用邮箱登录
|
28
|
-
* \`\`\`
|
29
|
-
*
|
30
|
-
*
|
31
|
-
* @name AuthenticationClient
|
32
|
-
*/
|
33
|
-
export declare class AuthenticationClient {
|
34
|
-
options: AuthenticationClientOptions;
|
35
|
-
baseClient: BaseAuthenticationClient;
|
36
|
-
graphqlClient: GraphqlClient;
|
37
|
-
httpClient: HttpClient;
|
38
|
-
naiveHttpClient: NaiveHttpClient;
|
39
|
-
tokenProvider: AuthenticationTokenProvider;
|
40
|
-
wxqrcode: QrCodeAuthenticationClient;
|
41
|
-
qrcode: QrCodeAuthenticationClient;
|
42
|
-
mfa: MfaAuthenticationClient;
|
43
|
-
social: SocialAuthenticationClient;
|
44
|
-
enterprise: EnterpriseAuthenticationClient;
|
45
|
-
private publicKeyManager;
|
46
|
-
constructor(options: AuthenticationClientOptions);
|
47
|
-
checkLoggedIn(): string;
|
48
|
-
setCurrentUser(user: User): void;
|
49
|
-
setToken(token: string): void;
|
50
|
-
/**
|
51
|
-
* @name registerByEmail
|
52
|
-
* @name_zh 使用邮箱注册
|
53
|
-
* @description 使用邮箱注册,此接口不要求用户对邮箱进行验证,用户注册之后 emailVerified 字段会为 false 。如果你希望邮箱未验证的用户不能进行登录,可以使用 pipeline 对此类请求进行拦截。
|
54
|
-
*
|
55
|
-
* @param {string} email 邮箱
|
56
|
-
* @param {string} password 密码
|
57
|
-
* @param {RegisterProfile} [profile] 用户资料
|
58
|
-
* @param {Object} [options]
|
59
|
-
* @param {boolean} [options.forceLogin] 是否走一遍完整的登录的,会触发登录前后的 pipeline 函数以及登录事件 webhook ,同时该用户的累计登录次数会加 1 。默认为 false 。
|
60
|
-
* @param {boolean} [options.generateToken] 是否为该用户生成 token,不会触发登录后的完整流程,用户的累计登录次数不会加 1。默认为 false 。
|
61
|
-
* @param {string} [options.clientIp] 客户端真实 IP,如果你在服务器端调用此接口,请务必将此参数设置为终端用户的真实 IP。
|
62
|
-
*
|
63
|
-
* @example
|
64
|
-
*
|
65
|
-
* authenticationClient.registerByEmail(
|
66
|
-
* 'test@example.com',
|
67
|
-
* 'passw0rd',
|
68
|
-
* {
|
69
|
-
* nickname: 'Nick'
|
70
|
-
* },
|
71
|
-
* {
|
72
|
-
* generateToken: true
|
73
|
-
* }
|
74
|
-
* )
|
75
|
-
*
|
76
|
-
* @example
|
77
|
-
* authenticationClient.registerByEmail('test@example.com', 'passw0rd')
|
78
|
-
*
|
79
|
-
*
|
80
|
-
* @returns {Promise<User>}
|
81
|
-
* @memberof AuthenticationClient
|
82
|
-
*/
|
83
|
-
registerByEmail(email: string, password: string, profile?: RegisterProfile, options?: {
|
84
|
-
forceLogin?: boolean;
|
85
|
-
generateToken?: boolean;
|
86
|
-
clientIp?: string;
|
87
|
-
/**
|
88
|
-
* @deprecated use customData instead
|
89
|
-
*/
|
90
|
-
params?: Array<{
|
91
|
-
key: string;
|
92
|
-
value: any;
|
93
|
-
}>;
|
94
|
-
/**
|
95
|
-
* @description 将会写入配置的用户自定义字段
|
96
|
-
*/
|
97
|
-
customData?: {
|
98
|
-
[x: string]: any;
|
99
|
-
};
|
100
|
-
/**
|
101
|
-
* @description 请求上下文,将会传递到 Pipeline 中
|
102
|
-
*/
|
103
|
-
context?: {
|
104
|
-
[x: string]: any;
|
105
|
-
};
|
106
|
-
}): Promise<User>;
|
107
|
-
/**
|
108
|
-
* @name registerByUsername
|
109
|
-
* @name_zh 使用用户名注册
|
110
|
-
* @description 使用用户名注册
|
111
|
-
*
|
112
|
-
* @param {string} username 用户名
|
113
|
-
* @param {string} password 密码
|
114
|
-
* @param {RegisterProfile} [profile] 用户资料
|
115
|
-
* @param {Object} [options]
|
116
|
-
* @param {boolean} [options.forceLogin] 是否走一遍完整的登录的,会触发登录前后的 pipeline 函数以及登录事件 webhook ,同时该用户的累计登录次数会加 1 。默认为 false 。
|
117
|
-
* @param {boolean} [options.generateToken] 是否为该用户生成 token,不会触发登录后的完整流程,用户的累计登录次数不会加 1。默认为 false 。
|
118
|
-
* @param {string} [options.clientIp] 客户端真实 IP,如果你在服务器端调用此接口,请务必将此参数设置为终端用户的真实 IP。
|
119
|
-
*
|
120
|
-
*
|
121
|
-
* @example
|
122
|
-
*
|
123
|
-
* authenticationClient.registerByUsername(
|
124
|
-
* 'bob',
|
125
|
-
* 'passw0rd',
|
126
|
-
* {
|
127
|
-
* nickname: 'Nick'
|
128
|
-
* },
|
129
|
-
* {
|
130
|
-
* generateToken: true
|
131
|
-
* }
|
132
|
-
* )
|
133
|
-
*
|
134
|
-
* @example
|
135
|
-
* authenticationClient.registerByUsername('bob', 'passw0rd')
|
136
|
-
*
|
137
|
-
*
|
138
|
-
* @returns {Promise<User>}
|
139
|
-
* @memberof AuthenticationClient
|
140
|
-
*/
|
141
|
-
registerByUsername(username: string, password: string, profile?: RegisterProfile, options?: {
|
142
|
-
forceLogin?: boolean;
|
143
|
-
generateToken?: boolean;
|
144
|
-
clientIp?: string;
|
145
|
-
/**
|
146
|
-
* @deprecated use customData instead
|
147
|
-
*/
|
148
|
-
params?: Array<{
|
149
|
-
key: string;
|
150
|
-
value: any;
|
151
|
-
}>;
|
152
|
-
/**
|
153
|
-
* @description 将会写入配置的用户自定义字段
|
154
|
-
*/
|
155
|
-
customData?: {
|
156
|
-
[x: string]: any;
|
157
|
-
};
|
158
|
-
/**
|
159
|
-
* @description 请求上下文,将会传递到 Pipeline 中
|
160
|
-
*/
|
161
|
-
context?: {
|
162
|
-
[x: string]: any;
|
163
|
-
};
|
164
|
-
}): Promise<User>;
|
165
|
-
/**
|
166
|
-
* @name registerByPhoneCode
|
167
|
-
* @name_zh 使用手机号注册
|
168
|
-
* @description 使用手机号注册,你可以同时设置该账号的初始密码。发送短信的接口请见 sendSmsCode
|
169
|
-
*
|
170
|
-
* @param {string} phone 手机号
|
171
|
-
* @param {string} code 短信验证码
|
172
|
-
* @param {string} password 初始密码
|
173
|
-
* @param {RegisterProfile} [profile] 用户资料
|
174
|
-
* @param {Object} [options]
|
175
|
-
* @param {boolean} [options.forceLogin] 是否走一遍完整的登录的,会触发登录前后的 pipeline 函数以及登录事件 webhook ,同时该用户的累计登录次数会加 1 。默认为 false 。
|
176
|
-
* @param {boolean} [options.generateToken] 是否为该用户生成 token,不会触发登录后的完整流程,用户的累计登录次数不会加 1。默认为 false 。
|
177
|
-
* @param {string} [options.clientIp] 客户端真实 IP,如果你在服务器端调用此接口,请务必将此参数设置为终端用户的真实 IP。
|
178
|
-
*
|
179
|
-
* @example
|
180
|
-
*
|
181
|
-
* authenticationClient.registerByPhoneCode(
|
182
|
-
* '176xxxx7041',
|
183
|
-
* '1234',
|
184
|
-
* 'passw0rd',
|
185
|
-
* {
|
186
|
-
* nickname: 'Nick'
|
187
|
-
* },
|
188
|
-
* {
|
189
|
-
* generateToken: true
|
190
|
-
* }
|
191
|
-
* )
|
192
|
-
*
|
193
|
-
* @example
|
194
|
-
* authenticationClient.registerByPhoneCode('176xxxx7041', '1234')
|
195
|
-
*
|
196
|
-
*
|
197
|
-
* @returns {Promise<User>}
|
198
|
-
* @memberof AuthenticationClient
|
199
|
-
*/
|
200
|
-
registerByPhoneCode(phone: string, code: string, password?: string, profile?: RegisterProfile, options?: {
|
201
|
-
forceLogin?: boolean;
|
202
|
-
generateToken?: boolean;
|
203
|
-
clientIp?: string;
|
204
|
-
/**
|
205
|
-
* @deprecated use customData instead
|
206
|
-
*/
|
207
|
-
params?: Array<{
|
208
|
-
key: string;
|
209
|
-
value: any;
|
210
|
-
}>;
|
211
|
-
/**
|
212
|
-
* @description 将会写入配置的用户自定义字段
|
213
|
-
*/
|
214
|
-
customData?: {
|
215
|
-
[x: string]: any;
|
216
|
-
};
|
217
|
-
/**
|
218
|
-
* @description 请求上下文,将会传递到 Pipeline 中
|
219
|
-
*/
|
220
|
-
context?: {
|
221
|
-
[x: string]: any;
|
222
|
-
};
|
223
|
-
}): Promise<User>;
|
224
|
-
/**
|
225
|
-
* @name checkPasswordStrength
|
226
|
-
* @name_zh 检查密码强度
|
227
|
-
* @description 检查密码强度,详情请见: https://docs.authing.co/v2/guides/security/config-password.html
|
228
|
-
*
|
229
|
-
* @param {string} password
|
230
|
-
* @example
|
231
|
-
* authenticationClient.checkPasswordStrength('weak')
|
232
|
-
*
|
233
|
-
* @example
|
234
|
-
* authenticationClient.checkPasswordStrength('strongPassw0rd!')
|
235
|
-
*
|
236
|
-
* @returns {Promise<CheckPasswordStrengthResult>}
|
237
|
-
* @memberof AuthenticationClient
|
238
|
-
*/
|
239
|
-
checkPasswordStrength(password: string): Promise<CheckPasswordStrengthResult>;
|
240
|
-
/**
|
241
|
-
* @name sendSmsCode
|
242
|
-
* @name_zh 发送短信验证码
|
243
|
-
* @description 发送短信验证码, 短信验证码的有效时间为 60 s。
|
244
|
-
*
|
245
|
-
* @param {string} phone
|
246
|
-
* @example
|
247
|
-
* authenticationClient.sendSmsCode('176xxxx6754')
|
248
|
-
*
|
249
|
-
* @returns {Promise<CommonMessage>}
|
250
|
-
* @memberof AuthenticationClient
|
251
|
-
*/
|
252
|
-
sendSmsCode(phone: string): Promise<CommonMessage>;
|
253
|
-
/**
|
254
|
-
* @name loginByEmail
|
255
|
-
* @name_zh 使用邮箱登录
|
256
|
-
* @description 使用邮箱登录,该接口默认不会限制未验证的邮箱进行登录,如果你希望邮箱未验证的用户不能进行登录,可以使用 pipeline 对此类请求进行拦截。
|
257
|
-
*
|
258
|
-
* 如果你的用户池配置了登录失败检测,当同一 IP 下登录多次失败的时候会要求用户输入图形验证码(code 为 2000)。
|
259
|
-
*
|
260
|
-
* @param {string} email 邮箱
|
261
|
-
* @param {string} password 密码
|
262
|
-
* @param {Object} [options]
|
263
|
-
* @param {boolean} [options.autoRegister] 是否自动注册。如果检测到用户不存在,会根据登录账密自动创建一个账号。
|
264
|
-
* @param {string} [options.captchaCode] 图形验证码
|
265
|
-
* @param {string} [options.clientIp] 客户端真实 IP,如果你在服务器端调用此接口,请务必将此参数设置为终端用户的真实 IP。
|
266
|
-
*
|
267
|
-
* @example
|
268
|
-
*
|
269
|
-
* authenticationClient.loginByEmail(
|
270
|
-
* 'test@example.com',
|
271
|
-
* 'passw0rd',
|
272
|
-
* {
|
273
|
-
* autoRegister: true,
|
274
|
-
* captchaCode: 'xj72'
|
275
|
-
* }
|
276
|
-
* )
|
277
|
-
*
|
278
|
-
* @example
|
279
|
-
* authenticationClient.loginByEmail('test@example.com', 'passw0rd')
|
280
|
-
*
|
281
|
-
*
|
282
|
-
* @returns {Promise<User>}
|
283
|
-
* @memberof AuthenticationClient
|
284
|
-
*/
|
285
|
-
loginByEmail(email: string, password: string, options?: {
|
286
|
-
autoRegister?: boolean;
|
287
|
-
captchaCode?: string;
|
288
|
-
clientIp?: string;
|
289
|
-
/**
|
290
|
-
* @deprecated use customData instead
|
291
|
-
*/
|
292
|
-
params?: Array<{
|
293
|
-
key: string;
|
294
|
-
value: any;
|
295
|
-
}>;
|
296
|
-
/**
|
297
|
-
* @description 将会写入配置的用户自定义字段
|
298
|
-
*/
|
299
|
-
customData?: {
|
300
|
-
[x: string]: any;
|
301
|
-
};
|
302
|
-
/**
|
303
|
-
* @description 请求上下文,将会传递到 Pipeline 中
|
304
|
-
*/
|
305
|
-
context?: {
|
306
|
-
[x: string]: any;
|
307
|
-
};
|
308
|
-
}): Promise<User>;
|
309
|
-
/**
|
310
|
-
* @name loginByUsername
|
311
|
-
* @name_zh 使用用户名登录
|
312
|
-
* @description 使用用户名登录。
|
313
|
-
*
|
314
|
-
* 如果你的用户池配置了登录失败检测,当同一 IP 下登录多次失败的时候会要求用户输入图形验证码(code 为 2000)。
|
315
|
-
*
|
316
|
-
* @param {string} username 用户名
|
317
|
-
* @param {string} password 密码
|
318
|
-
* @param {Object} [options]
|
319
|
-
* @param {boolean} [options.autoRegister] 是否自动注册。如果检测到用户不存在,会根据登录账密自动创建一个账号。
|
320
|
-
* @param {string} [options.captchaCode] 图形验证码
|
321
|
-
* @param {string} [options.clientIp] 客户端真实 IP,如果你在服务器端调用此接口,请务必将此参数设置为终端用户的真实 IP。
|
322
|
-
*
|
323
|
-
*
|
324
|
-
* @example
|
325
|
-
*
|
326
|
-
* authenticationClient.loginByEmail(
|
327
|
-
* 'test@example.com',
|
328
|
-
* 'passw0rd',
|
329
|
-
* {
|
330
|
-
* autoRegister: true,
|
331
|
-
* captchaCode: 'xj72'
|
332
|
-
* }
|
333
|
-
* )
|
334
|
-
*
|
335
|
-
* @example
|
336
|
-
* authenticationClient.loginByEmail('test@example.com', 'passw0rd')
|
337
|
-
*
|
338
|
-
*
|
339
|
-
* @returns {Promise<User>}
|
340
|
-
* @memberof AuthenticationClient
|
341
|
-
*/
|
342
|
-
loginByUsername(username: string, password: string, options?: {
|
343
|
-
autoRegister?: boolean;
|
344
|
-
captchaCode?: string;
|
345
|
-
clientIp?: string;
|
346
|
-
/**
|
347
|
-
* @deprecated use customData instead
|
348
|
-
*/
|
349
|
-
params?: Array<{
|
350
|
-
key: string;
|
351
|
-
value: any;
|
352
|
-
}>;
|
353
|
-
/**
|
354
|
-
* @description 将会写入配置的用户自定义字段
|
355
|
-
*/
|
356
|
-
customData?: {
|
357
|
-
[x: string]: any;
|
358
|
-
};
|
359
|
-
/**
|
360
|
-
* @description 请求上下文,将会传递到 Pipeline 中
|
361
|
-
*/
|
362
|
-
context?: {
|
363
|
-
[x: string]: any;
|
364
|
-
};
|
365
|
-
}): Promise<User>;
|
366
|
-
/**
|
367
|
-
* @name loginByPhoneCode
|
368
|
-
* @name_zh 使用手机号验证码登录
|
369
|
-
* @description 使用手机号验证码登录。
|
370
|
-
*
|
371
|
-
*
|
372
|
-
* @param {string} phone 手机号
|
373
|
-
* @param {string} code 短信验证码
|
374
|
-
* @param {string} [options.clientIp] 客户端真实 IP,如果你在服务器端调用此接口,请务必将此参数设置为终端用户的真实 IP。
|
375
|
-
*
|
376
|
-
* @example
|
377
|
-
*
|
378
|
-
* authenticationClient.loginByPhoneCode(
|
379
|
-
* '176xxxx7041',
|
380
|
-
* '1234',
|
381
|
-
* )
|
382
|
-
*
|
383
|
-
*
|
384
|
-
* @returns {Promise<User>}
|
385
|
-
* @memberof AuthenticationClient
|
386
|
-
*/
|
387
|
-
loginByPhoneCode(phone: string, code: string, options?: {
|
388
|
-
clientIp?: string;
|
389
|
-
/**
|
390
|
-
* @deprecated use customData instead
|
391
|
-
*/
|
392
|
-
params?: Array<{
|
393
|
-
key: string;
|
394
|
-
value: any;
|
395
|
-
}>;
|
396
|
-
/**
|
397
|
-
* @description 请求上下文,将会传递到 Pipeline 中
|
398
|
-
*/
|
399
|
-
context?: {
|
400
|
-
[x: string]: any;
|
401
|
-
};
|
402
|
-
/**
|
403
|
-
* @description 将会写入配置的用户自定义字段
|
404
|
-
*/
|
405
|
-
customData?: {
|
406
|
-
[x: string]: any;
|
407
|
-
};
|
408
|
-
}): Promise<User>;
|
409
|
-
/**
|
410
|
-
* @name loginByPhonePassword
|
411
|
-
* @name_zh 使用手机号密码登录
|
412
|
-
* @description 使用手机号密码登录。
|
413
|
-
*
|
414
|
-
*
|
415
|
-
* @param {string} phone 手机号
|
416
|
-
* @param {string} password 密码
|
417
|
-
* @param {Object} [options]
|
418
|
-
* @param {string} [options.captchaCode] 图形验证码
|
419
|
-
* @param {string} [options.clientIp] 客户端真实 IP,如果你在服务器端调用此接口,请务必将此参数设置为终端用户的真实 IP。
|
420
|
-
*
|
421
|
-
* @example
|
422
|
-
*
|
423
|
-
* authenticationClient.loginByPhonePassword(
|
424
|
-
* '176xxxx7041',
|
425
|
-
* 'passw0rd',
|
426
|
-
* {
|
427
|
-
* captchaCode: 'xj72'
|
428
|
-
* }
|
429
|
-
* )
|
430
|
-
*
|
431
|
-
* @example
|
432
|
-
* authenticationClient.loginByPhonePassword('176xxxx7041', 'passw0rd')
|
433
|
-
*
|
434
|
-
*
|
435
|
-
* @returns {Promise<User>}
|
436
|
-
* @memberof AuthenticationClient
|
437
|
-
*/
|
438
|
-
loginByPhonePassword(phone: string, password: string, options?: {
|
439
|
-
captchaCode?: string;
|
440
|
-
autoRegister?: boolean;
|
441
|
-
clientIp?: string;
|
442
|
-
/**
|
443
|
-
* @deprecated use customData instead
|
444
|
-
*/
|
445
|
-
params?: Array<{
|
446
|
-
key: string;
|
447
|
-
value: any;
|
448
|
-
}>;
|
449
|
-
/**
|
450
|
-
* @description 将会写入配置的用户自定义字段
|
451
|
-
*/
|
452
|
-
customData?: {
|
453
|
-
[x: string]: any;
|
454
|
-
};
|
455
|
-
/**
|
456
|
-
* @description 请求上下文,将会传递到 Pipeline 中
|
457
|
-
*/
|
458
|
-
context?: {
|
459
|
-
[x: string]: any;
|
460
|
-
};
|
461
|
-
}): Promise<User>;
|
462
|
-
loginBySubAccount(account: string, password: string, options?: {
|
463
|
-
captchaCode?: string;
|
464
|
-
clientIp?: string;
|
465
|
-
}): Promise<User>;
|
466
|
-
/**
|
467
|
-
* @name checkLoginStatus
|
468
|
-
* @name_zh 检测 Token 登录状态
|
469
|
-
* @description 检测 Token 登录状态
|
470
|
-
*
|
471
|
-
* @param {string} token 用户的登录凭证 token
|
472
|
-
*
|
473
|
-
* @example
|
474
|
-
*
|
475
|
-
* authenticationClient.checkLoginStatus('TOKEN')
|
476
|
-
*
|
477
|
-
* @returns {Promise<JwtTokenStatus>}
|
478
|
-
* @memberof AuthenticationClient
|
479
|
-
*/
|
480
|
-
checkLoginStatus(token?: string): Promise<JwtTokenStatus>;
|
481
|
-
/**
|
482
|
-
* @name sendEmail
|
483
|
-
* @name_zh 发送邮件
|
484
|
-
* @description 发送邮件
|
485
|
-
*
|
486
|
-
* @param {string} email 邮箱
|
487
|
-
* @param {EmailScene} scene 发送场景,可选值为 RESET_PASSWORD(发送重置密码邮件,邮件中包含验证码)、VerifyEmail(发送验证邮箱的邮件)、ChangeEmail(发送修改邮箱邮件,邮件中包含验证码)
|
488
|
-
*
|
489
|
-
* @example
|
490
|
-
*
|
491
|
-
* import { EmailScene } from "authing-js-sdk"
|
492
|
-
* authenticationClient.sendEmail('test@example.com', EmailScene.RESET_PASSWORD)
|
493
|
-
*
|
494
|
-
* @returns {Promise<CommonMessage>}
|
495
|
-
* @memberof AuthenticationClient
|
496
|
-
*/
|
497
|
-
sendEmail(email: string, scene: EmailScene): Promise<CommonMessage>;
|
498
|
-
/**
|
499
|
-
* @name resetPasswordByPhoneCode
|
500
|
-
* @name_zh 通过短信验证码重置密码
|
501
|
-
* @description 通过短信验证码重置密码,你需要先调用 sendSmsCode 接口发送重置密码邮件。
|
502
|
-
*
|
503
|
-
* @param {string} phone 手机号
|
504
|
-
* @param {string} code 验证码
|
505
|
-
* @param {string} newPassword 新的密码
|
506
|
-
*
|
507
|
-
* @example
|
508
|
-
*
|
509
|
-
* authenticationClient.resetPasswordByPhoneCode('176xxxx7041', '1234', 'passw0rd')
|
510
|
-
*
|
511
|
-
* @returns {Promise<CommonMessage>}
|
512
|
-
* @memberof AuthenticationClient
|
513
|
-
*/
|
514
|
-
resetPasswordByPhoneCode(phone: string, code: string, newPassword: string): Promise<CommonMessage>;
|
515
|
-
/**
|
516
|
-
* @name resetPasswordByEmailCode
|
517
|
-
* @name_zh 通过邮件验证码重置密码
|
518
|
-
* @description 通过邮件验证码重置密码,你需要先调用 sendEmail 接口发送重置密码邮件。
|
519
|
-
*
|
520
|
-
* @param {string} phone 手机号
|
521
|
-
* @param {string} code 验证码
|
522
|
-
* @param {string} newPassword 新的密码
|
523
|
-
*
|
524
|
-
* @example
|
525
|
-
*
|
526
|
-
* authenticationClient.resetPasswordByEmailCode('test@example.com', '1234', 'passw0rd')
|
527
|
-
*
|
528
|
-
* @returns {Promise<CommonMessage>}
|
529
|
-
* @memberof AuthenticationClient
|
530
|
-
*/
|
531
|
-
resetPasswordByEmailCode(email: string, code: string, newPassword: string): Promise<CommonMessage>;
|
532
|
-
resetPasswordByFirstLoginToken(params: {
|
533
|
-
token: string;
|
534
|
-
password: string;
|
535
|
-
}): Promise<{
|
536
|
-
message?: string;
|
537
|
-
code?: number;
|
538
|
-
}>;
|
539
|
-
/**
|
540
|
-
* @name updateProfile
|
541
|
-
* @name_zh 修改用户资料
|
542
|
-
* @description 修改用户资料,此接口不能用于修改手机号、邮箱、密码,如果需要请调用 updatePhone、updateEmail、updatePassword 接口。
|
543
|
-
*
|
544
|
-
* @param {UpdateUserInput} updates 修改的用户资料
|
545
|
-
* @param {string} updates.username 用户名
|
546
|
-
* @param {string} updates.nickname 昵称
|
547
|
-
* @param {string} updates.photo 头像
|
548
|
-
* @param {string} updates.company 公司
|
549
|
-
* @param {string} updates.browser 浏览器
|
550
|
-
* @param {string} updates.device 设备
|
551
|
-
* @param {string} updates.lastIP 最近登录的 IP
|
552
|
-
* @param {string} updates.name Name
|
553
|
-
* @param {string} updates.givenName Given Name
|
554
|
-
* @param {string} updates.familyName Family Name
|
555
|
-
* @param {string} updates.middleName Middle Name
|
556
|
-
* @param {string} updates.profile Profile Url
|
557
|
-
* @param {string} updates.preferredUsername Preferred Name
|
558
|
-
* @param {string} updates.website 个人网站
|
559
|
-
* @param {string} updates.gender 性别, F 表示男性、W 表示女性、未知表示 U
|
560
|
-
* @param {string} updates.birthdate 生日
|
561
|
-
* @param {string} updates.zoneinfo 时区
|
562
|
-
* @param {string} updates.locale 语言
|
563
|
-
* @param {string} updates.address 地址
|
564
|
-
* @param {string} updates.streetAddress 街道地址
|
565
|
-
* @param {string} updates.locality
|
566
|
-
* @param {string} updates.region 地域
|
567
|
-
* @param {string} updates.postalCode 邮编
|
568
|
-
* @param {string} updates.city 城市
|
569
|
-
* @param {string} updates.province 省份
|
570
|
-
* @param {string} updates.country 国家
|
571
|
-
*
|
572
|
-
* @example
|
573
|
-
*
|
574
|
-
* authenticationClient.updateProfile({
|
575
|
-
* nickname: "Nick",
|
576
|
-
* lastIp: "111.111.111.111"
|
577
|
-
* })
|
578
|
-
*
|
579
|
-
* @returns {Promise<User>}
|
580
|
-
* @memberof AuthenticationClient
|
581
|
-
*/
|
582
|
-
updateProfile(updates: UpdateUserInput): Promise<User>;
|
583
|
-
/**
|
584
|
-
* @name updatePassword
|
585
|
-
* @name_zh 更新用户密码
|
586
|
-
* @description 更新用户密码
|
587
|
-
*
|
588
|
-
* @param {string} newPassword 新密码
|
589
|
-
* @param {string} [oldPassword] 旧密码,如果用户没有设置密码,可以不填。
|
590
|
-
*
|
591
|
-
* @example
|
592
|
-
*
|
593
|
-
* authenticationClient.updatePassword('passw0rd') // 由手机号、社会化登录等其他方式注册的,首次没有设置密码,oldPassword 留空。
|
594
|
-
*
|
595
|
-
* @example
|
596
|
-
*
|
597
|
-
* authenticationClient.updatePassword('passw0rd', 'oldPassw0rd') // 用户之前设置了密码
|
598
|
-
*
|
599
|
-
* @returns {Promise<User>}
|
600
|
-
* @memberof AuthenticationClient
|
601
|
-
*/
|
602
|
-
updatePassword(newPassword: string, oldPassword?: string): Promise<User>;
|
603
|
-
/**
|
604
|
-
* @name updatePhone
|
605
|
-
* @name_zh 更新用户手机号
|
606
|
-
* @description 更新用户手机号。和修改邮箱一样,默认情况下,如果用户当前已经绑定了手机号,需要同时验证原有手机号(目前账号绑定的手机号)和当前邮箱(将要绑定的手机号)。
|
607
|
-
* 也就是说,用户 A 当前绑定的手机号为 15888888888,想修改为 15899999999,那么就需要同时验证这两个手机号。
|
608
|
-
* 开发者也可以选择不开启 “验证原有手机号“ ,可以在 Authing 控制台 的 设置目录下的安全信息模块进行关闭。
|
609
|
-
* 用户首次绑定手机号请使用 bindPhone 接口。
|
610
|
-
*
|
611
|
-
* @param {string} phone 新手机号
|
612
|
-
* @param {string} phoneCode 新手机号的验证码
|
613
|
-
* @param {string} [oldPhone] 旧手机号
|
614
|
-
* @param {string} [oldPhoneCode] 旧手机号的验证码
|
615
|
-
*
|
616
|
-
* @example
|
617
|
-
*
|
618
|
-
* authenticationClient.updatePhone('176xxxx7041', '1234') // 关闭了“验证原有手机号“选项
|
619
|
-
*
|
620
|
-
* @example
|
621
|
-
*
|
622
|
-
* authenticationClient.updatePhone('176xxxx7041', '1234', '156xxxx9876', '1234') // 开启了“验证原有手机号“选项
|
623
|
-
*
|
624
|
-
*
|
625
|
-
* @returns {Promise<User>}
|
626
|
-
* @memberof AuthenticationClient
|
627
|
-
*/
|
628
|
-
updatePhone(phone: string, phoneCode: string, oldPhone?: string, oldPhoneCode?: string): Promise<User>;
|
629
|
-
/**
|
630
|
-
* @name updateEmail
|
631
|
-
* @name_zh 更新用户邮箱
|
632
|
-
* @description 如果用户已经绑定了邮箱,默认情况下,需要同时验证原有邮箱(目前账号绑定的邮箱)和当前邮箱(将要绑定的邮箱)。也就是说,用户 A 当前绑定的邮箱为 123456@qq.com,想修改为 1234567@qq.com,那么就需要同时验证这两个邮箱。
|
633
|
-
* 开发者也可以选择不开启 “验证原有邮箱“ ,可以在 Authing 控制台 的 设置目录下的安全信息模块进行关闭。
|
634
|
-
* 用户首次绑定手机号请使用 bindEmail 接口。
|
635
|
-
*
|
636
|
-
* @param {string} email 新邮箱
|
637
|
-
* @param {string} emailCode 新邮箱的验证码
|
638
|
-
* @param {string} [oldEmail] 旧邮箱
|
639
|
-
* @param {string} [oldEmailCode] 旧邮箱的验证码
|
640
|
-
*
|
641
|
-
* @example
|
642
|
-
*
|
643
|
-
* authenticationClient.updateEmail('test@example.com', '1234') // 关闭了“验证原有邮箱“选项
|
644
|
-
*
|
645
|
-
* @example
|
646
|
-
*
|
647
|
-
* authenticationClient.updateEmail('test@example.com', '1234', 'test2@example.com', '1234') // 开启了“验证原有邮箱“选项
|
648
|
-
*
|
649
|
-
*
|
650
|
-
* @returns {Promise<User>}
|
651
|
-
* @memberof AuthenticationClient
|
652
|
-
*/
|
653
|
-
updateEmail(email: string, emailCode: string, oldEmail?: string, oldEmailCode?: string): Promise<User>;
|
654
|
-
/**
|
655
|
-
* @name refreshToken
|
656
|
-
* @name_zh 刷新当前用户的 token
|
657
|
-
* @description 刷新当前用户的 token,调用此接口要求先登录。
|
658
|
-
*
|
659
|
-
* @example
|
660
|
-
*
|
661
|
-
* authenticationClient.updateEmail()
|
662
|
-
*
|
663
|
-
* @returns {Promise<RefreshToken>}
|
664
|
-
* @memberof AuthenticationClient
|
665
|
-
*/
|
666
|
-
refreshToken(): Promise<RefreshToken>;
|
667
|
-
/**
|
668
|
-
* @name linkAccount
|
669
|
-
* @name_zh 关联账号
|
670
|
-
* @description 将社交账号绑定到主账号(手机号、邮箱账号)。
|
671
|
-
*
|
672
|
-
* @param {Object} options
|
673
|
-
* @param {string} options.primaryUserToken 主账号 Token
|
674
|
-
* @param {string} options.secondaryUserToken 社交账号 Token
|
675
|
-
*
|
676
|
-
* @example
|
677
|
-
*
|
678
|
-
* authenticationClient.linkAccount({ primaryUserToken: '', secondaryUserToken: '' })
|
679
|
-
*
|
680
|
-
* @returns {{code: 200, message: "绑定成功"}}
|
681
|
-
* @memberof AuthenticationClient
|
682
|
-
*/
|
683
|
-
linkAccount(options: {
|
684
|
-
primaryUserToken: string;
|
685
|
-
secondaryUserToken: string;
|
686
|
-
}): Promise<{
|
687
|
-
code: number;
|
688
|
-
message: string;
|
689
|
-
}>;
|
690
|
-
/**
|
691
|
-
* @name unLinkAccount
|
692
|
-
* @name_zh 解除账号绑定
|
693
|
-
* @description 将社交账号从主账号(手机号、邮箱账号)解绑。
|
694
|
-
*
|
695
|
-
* @param {Object} options
|
696
|
-
* @param {string} options.primaryUserToken 主账号 Token
|
697
|
-
* @param {string} options.provider 社交账号的提供商名称
|
698
|
-
*
|
699
|
-
* @example
|
700
|
-
*
|
701
|
-
* authenticationClient.unLinkAccount({ primaryUserToken: '', provider: 'wechat:pc' })
|
702
|
-
*
|
703
|
-
* @returns {{code: 200, message: "解绑成功"}}
|
704
|
-
* @memberof AuthenticationClient
|
705
|
-
*/
|
706
|
-
unLinkAccount(options: {
|
707
|
-
primaryUserToken: string;
|
708
|
-
provider: ProviderType;
|
709
|
-
}): Promise<{
|
710
|
-
code: number;
|
711
|
-
message: string;
|
712
|
-
}>;
|
713
|
-
/**
|
714
|
-
* @name bindPhone
|
715
|
-
* @name_zh 绑定手机号
|
716
|
-
* @description 用户初次绑定手机号,如果需要修改手机号请使用 updatePhone 接口。
|
717
|
-
*
|
718
|
-
* @param {string} phone
|
719
|
-
* @param {string} phoneCode
|
720
|
-
*
|
721
|
-
* @example
|
722
|
-
*
|
723
|
-
* authenticationClient.bindPhone('176xxxx7041', '1234')
|
724
|
-
*
|
725
|
-
* @returns {Promise<User>}
|
726
|
-
* @memberof AuthenticationClient
|
727
|
-
*/
|
728
|
-
bindPhone(phone: string, phoneCode: string): Promise<User>;
|
729
|
-
/**
|
730
|
-
* @name unbindPhone
|
731
|
-
* @name_zh 解绑手机号
|
732
|
-
* @description 用户解绑手机号
|
733
|
-
*
|
734
|
-
* @example
|
735
|
-
*
|
736
|
-
* authenticationClient.unbindPhone()
|
737
|
-
*
|
738
|
-
* @returns {Promise<User>}
|
739
|
-
* @memberof AuthenticationClient
|
740
|
-
*/
|
741
|
-
unbindPhone(): Promise<User>;
|
742
|
-
/**
|
743
|
-
* @name bindEmail
|
744
|
-
* @name_zh 绑定邮箱号
|
745
|
-
* @description 用户邮箱号
|
746
|
-
*
|
747
|
-
* @param {string} email
|
748
|
-
* @param {string} emailCode
|
749
|
-
*
|
750
|
-
* @example
|
751
|
-
*
|
752
|
-
* authenticationClient.bindEmail('test@example.com', '1234')
|
753
|
-
*
|
754
|
-
* @returns {Promise<User>}
|
755
|
-
* @memberof AuthenticationClient
|
756
|
-
*/
|
757
|
-
bindEmail(email: string, emailCode: string): Promise<User>;
|
758
|
-
/**
|
759
|
-
* @name unbindEmail
|
760
|
-
* @name_zh 解绑邮箱号
|
761
|
-
* @description 用户解绑邮箱号
|
762
|
-
*
|
763
|
-
* @example
|
764
|
-
*
|
765
|
-
* authenticationClient.unbindPhone()
|
766
|
-
*
|
767
|
-
* @returns {Promise<User>}
|
768
|
-
* @memberof AuthenticationClient
|
769
|
-
*/
|
770
|
-
unbindEmail(): Promise<User>;
|
771
|
-
/**
|
772
|
-
* @name getCurrentUser
|
773
|
-
* @name_zh 获取当前登录的用户信息
|
774
|
-
* @description 获取当前登录的用户信息
|
775
|
-
*
|
776
|
-
* @example
|
777
|
-
*
|
778
|
-
* authenticationClient.getCurrentUser()
|
779
|
-
*
|
780
|
-
* @returns {Promise<User>}
|
781
|
-
* @memberof AuthenticationClient
|
782
|
-
*/
|
783
|
-
getCurrentUser(): Promise<User | null>;
|
784
|
-
/**
|
785
|
-
* @name logout
|
786
|
-
* @name_zh 退出登录
|
787
|
-
* @description 退出登录,清空 localStorage 里的 user 和 token
|
788
|
-
*
|
789
|
-
* @example
|
790
|
-
*
|
791
|
-
* authenticationClient.logout()
|
792
|
-
*
|
793
|
-
* @returns {null}
|
794
|
-
* @memberof AuthenticationClient
|
795
|
-
*/
|
796
|
-
logout(): Promise<void>;
|
797
|
-
/**
|
798
|
-
* @name listUdv
|
799
|
-
* @name_zh 获取当前用户的自定义数据列表
|
800
|
-
* @description 获取当前用户的自定义数据列表
|
801
|
-
* @deprecated use getUdfValue instead
|
802
|
-
*
|
803
|
-
* @example
|
804
|
-
*
|
805
|
-
* authenticationClient.listUdv()
|
806
|
-
*
|
807
|
-
* @returns {Promise<Array<UserDefinedData>>}
|
808
|
-
* @memberof AuthenticationClient
|
809
|
-
*/
|
810
|
-
listUdv(): Promise<Array<UserDefinedData>>;
|
811
|
-
/**
|
812
|
-
* @name setUdv
|
813
|
-
* @name_zh 添加自定义数据
|
814
|
-
* @description 添加自定义数据
|
815
|
-
*
|
816
|
-
* @param {string} key 自定义字段的 key
|
817
|
-
* @param {any} value 自定义数据的值,值的类型必须要和用户池定义的自定义字段类型一致。
|
818
|
-
*
|
819
|
-
* @example
|
820
|
-
*
|
821
|
-
* authenticationClient.setUdv('school', '清华大学') // 要求用户必须定义了 school 这个字段。
|
822
|
-
*
|
823
|
-
* @returns {Promise<Array<UserDefinedData>>}
|
824
|
-
* @memberof AuthenticationClient
|
825
|
-
*/
|
826
|
-
setUdv(key: string, value: any): Promise<Array<UserDefinedData>>;
|
827
|
-
/**
|
828
|
-
* @name removeUdv
|
829
|
-
* @name_zh 删除自定义数据
|
830
|
-
* @description 删除自定义数据
|
831
|
-
*
|
832
|
-
* @param key 自定义字段的 key
|
833
|
-
*
|
834
|
-
* @example
|
835
|
-
*
|
836
|
-
* authenticationClient.removeUdv('school')
|
837
|
-
*
|
838
|
-
*
|
839
|
-
* @returns {Promise<Array<UserDefinedData>>}
|
840
|
-
* @memberof AuthenticationClient
|
841
|
-
*/
|
842
|
-
removeUdv(key: string): Promise<Array<UserDefinedData>>;
|
843
|
-
/**
|
844
|
-
* @name listOrg
|
845
|
-
* @name_zh 获取用户所在组织机构
|
846
|
-
* @description 获取用户所在的组织机构立碑,以及他所属的节点在此组织机构内的完整路径。
|
847
|
-
*
|
848
|
-
* @example
|
849
|
-
*
|
850
|
-
* const data = await authenticationClient.listOrgs();
|
851
|
-
*
|
852
|
-
* @returns {Promise<UserOrgList>}
|
853
|
-
*
|
854
|
-
* @memberof AuthenticationClient
|
855
|
-
*/
|
856
|
-
listOrgs(): Promise<any>;
|
857
|
-
/**
|
858
|
-
* @description 获取用户
|
859
|
-
*
|
860
|
-
*/
|
861
|
-
listDepartments(): Promise<{
|
862
|
-
totalCount: number;
|
863
|
-
list: {
|
864
|
-
isMainDepartment: boolean;
|
865
|
-
joinedAt?: string;
|
866
|
-
department: {
|
867
|
-
id: string;
|
868
|
-
orgId?: string;
|
869
|
-
name: string;
|
870
|
-
nameI18n?: string;
|
871
|
-
description?: string;
|
872
|
-
descriptionI18n?: string;
|
873
|
-
order?: number;
|
874
|
-
code?: string;
|
875
|
-
root?: boolean;
|
876
|
-
depth?: number;
|
877
|
-
path: string[];
|
878
|
-
codePath: string[];
|
879
|
-
namePath: string[];
|
880
|
-
createdAt?: string;
|
881
|
-
updatedAt?: string;
|
882
|
-
children?: string[];
|
883
|
-
};
|
884
|
-
}[];
|
885
|
-
}>;
|
886
|
-
/**
|
887
|
-
* @name loginByLdap
|
888
|
-
* @name_zh 使用 LDAP 用户名登录
|
889
|
-
* @description 使用 LDAP 用户名登录。
|
890
|
-
*
|
891
|
-
* 如果你的用户池配置了登录失败检测,当同一 IP 下登录多次失败的时候会要求用户输入图形验证码(code 为 2000)。
|
892
|
-
*
|
893
|
-
* @param {string} username 用户名
|
894
|
-
* @param {string} password 密码
|
895
|
-
* @param {Object} [options]
|
896
|
-
* @param {boolean} [options.autoRegister] 是否自动注册。如果检测到用户不存在,会根据登录账密自动创建一个账号。
|
897
|
-
* @param {string} [options.captchaCode] 图形验证码
|
898
|
-
* @param {string} [options.clientIp] 客户端真实 IP,如果你在服务器端调用此接口,请务必将此参数设置为终端用户的真实 IP。
|
899
|
-
*
|
900
|
-
*
|
901
|
-
* @example
|
902
|
-
* const authenticationClient = new AuthenticationClient({
|
903
|
-
* appId: '应用 ID'
|
904
|
-
* })
|
905
|
-
*
|
906
|
-
* authenticationClient.loginByLdap(
|
907
|
-
* 'admin',
|
908
|
-
* 'admin',
|
909
|
-
* )
|
910
|
-
*
|
911
|
-
*
|
912
|
-
* @returns {Promise<User>}
|
913
|
-
* @memberof AuthenticationClient
|
914
|
-
*/
|
915
|
-
loginByLdap(username: string, password: string, options?: {
|
916
|
-
autoRegister?: boolean;
|
917
|
-
captchaCode?: string;
|
918
|
-
clientIp?: string;
|
919
|
-
}): Promise<User>;
|
920
|
-
/**
|
921
|
-
* @name loginByAd
|
922
|
-
* @name_zh 使用 AD 用户名登录
|
923
|
-
* @description 使用 AD 用户名登录。
|
924
|
-
*
|
925
|
-
* @param {string} username 用户名
|
926
|
-
* @param {string} password 密码
|
927
|
-
*
|
928
|
-
*
|
929
|
-
* @example
|
930
|
-
* const authenticationClient = new AuthenticationClient({
|
931
|
-
* appId: '应用 ID'
|
932
|
-
* })
|
933
|
-
*
|
934
|
-
* authenticationClient.loginByAd(
|
935
|
-
* 'admin',
|
936
|
-
* 'admin',
|
937
|
-
* )
|
938
|
-
*
|
939
|
-
* @returns {Promise<User>}
|
940
|
-
* @memberof AuthenticationClient
|
941
|
-
*/
|
942
|
-
loginByAd(username: string, password: string): Promise<User>;
|
943
|
-
/**
|
944
|
-
* @description 上传图片
|
945
|
-
*/
|
946
|
-
private uploadPhoto;
|
947
|
-
/**
|
948
|
-
* @deprecated use uploadAvatar instead
|
949
|
-
* @description 更新用户头像
|
950
|
-
*/
|
951
|
-
updateAvatar(options?: {
|
952
|
-
accept?: string;
|
953
|
-
}): Promise<User>;
|
954
|
-
/**
|
955
|
-
* @description 一键上传图片并更新用户头像
|
956
|
-
*
|
957
|
-
* @param {Object} options
|
958
|
-
* @param {string} options.accept 支持的图片格式,默认为 'image/*'
|
959
|
-
*
|
960
|
-
* @example
|
961
|
-
* const authenticationClient = new AuthenticationClient({
|
962
|
-
* appId: 'APP_ID',
|
963
|
-
* appHost: 'https://xxx.authing.cn'
|
964
|
-
* })
|
965
|
-
*
|
966
|
-
* // 会自动打开浏览器文件上传框,并自动完成图片文件上传 CDN、修改用户头像操作。
|
967
|
-
* authenticationClient.uploadAvatar()
|
968
|
-
*
|
969
|
-
* // 只支持 png 格式图片
|
970
|
-
* authenticationClient.uploadAvatar({
|
971
|
-
* accept: '.png'
|
972
|
-
* })
|
973
|
-
*
|
974
|
-
* @returns
|
975
|
-
*/
|
976
|
-
uploadAvatar(options?: {
|
977
|
-
accept?: string;
|
978
|
-
}): Promise<User>;
|
979
|
-
/**
|
980
|
-
* @description 获取当前用户的所有自定义数据
|
981
|
-
*
|
982
|
-
*/
|
983
|
-
getUdfValue(): Promise<KeyValuePair>;
|
984
|
-
/**
|
985
|
-
* @description 设置自定义字段值
|
986
|
-
*
|
987
|
-
*/
|
988
|
-
setUdfValue(data: KeyValuePair): Promise<void>;
|
989
|
-
/**
|
990
|
-
* @description 删除用户自定义数据
|
991
|
-
*/
|
992
|
-
removeUdfValue(key: string): Promise<void>;
|
993
|
-
/**
|
994
|
-
* @name getSecurityLevel
|
995
|
-
* @name_zh 用户安全等级
|
996
|
-
* @description 获取用户的安全等级评分
|
997
|
-
*
|
998
|
-
* @example
|
999
|
-
*
|
1000
|
-
* const data = await authenticationClient.getSecurityLevel();
|
1001
|
-
*
|
1002
|
-
* @returns {Promise<SecurityLevel>}
|
1003
|
-
*
|
1004
|
-
* @memberof AuthenticationClient
|
1005
|
-
*/
|
1006
|
-
getSecurityLevel(): Promise<SecurityLevel>;
|
1007
|
-
/**
|
1008
|
-
* @description 获取用户被授权的所有资源
|
1009
|
-
*
|
1010
|
-
* @param userId
|
1011
|
-
* @param namespace
|
1012
|
-
*/
|
1013
|
-
listAuthorizedResources(namespace: string, options?: {
|
1014
|
-
resourceType?: ResourceType;
|
1015
|
-
}): Promise<PaginatedAuthorizedResources>;
|
1016
|
-
/**
|
1017
|
-
* @name computedPasswordSecurityLevel
|
1018
|
-
* @name_zh 计算密码安全等级
|
1019
|
-
* @description 计算密码安全等级
|
1020
|
-
*
|
1021
|
-
* @example
|
1022
|
-
*
|
1023
|
-
* const data = authenticationClient.computedPasswordSecurityLevel('xxxxxxxx');
|
1024
|
-
*
|
1025
|
-
* @returns {PasswordSecurityLevel}
|
1026
|
-
*
|
1027
|
-
* @memberof AuthenticationClient
|
1028
|
-
*/
|
1029
|
-
computedPasswordSecurityLevel(password: string): PasswordSecurityLevel;
|
1030
|
-
_generateTokenRequest(params: {
|
1031
|
-
[x: string]: string;
|
1032
|
-
}): string;
|
1033
|
-
_generateBasicAuthToken(appId?: string, secret?: string): string;
|
1034
|
-
/**
|
1035
|
-
* @param {string} code 授权码 code
|
1036
|
-
* @param {string} codeVerifier 校验码 codeVerifier
|
1037
|
-
*/
|
1038
|
-
_getAccessTokenByCodeWithClientSecretPost(code: string, codeVerifier?: string): Promise<any>;
|
1039
|
-
/**
|
1040
|
-
* @param {string} code 授权码 code
|
1041
|
-
* @param {string} codeVerifier 校验码 codeVerifier
|
1042
|
-
*/
|
1043
|
-
_getAccessTokenByCodeWithClientSecretBasic(code: string, codeVerifier?: string): Promise<any>;
|
1044
|
-
/**
|
1045
|
-
* @param {string} code 授权码 code
|
1046
|
-
* @param {string} codeVerifier 校验码 codeVerifier
|
1047
|
-
*/
|
1048
|
-
_getAccessTokenByCodeWithNone(code: string, codeVerifier?: string): Promise<any>;
|
1049
|
-
getAccessTokenByCode(code: string, options?: {
|
1050
|
-
codeVerifier?: string;
|
1051
|
-
}): Promise<any>;
|
1052
|
-
generateCodeChallenge(): string;
|
1053
|
-
getCodeChallengeDigest(options: {
|
1054
|
-
codeChallenge: string;
|
1055
|
-
method: 'S256' | 'plain';
|
1056
|
-
}): string;
|
1057
|
-
getAccessTokenByClientCredentials(scope: string, options?: {
|
1058
|
-
accessKey: string;
|
1059
|
-
accessSecret: string;
|
1060
|
-
}): Promise<any>;
|
1061
|
-
getUserInfoByAccessToken(accessToken: string, options?: {
|
1062
|
-
method?: 'POST' | 'GET';
|
1063
|
-
tokenPlace?: 'query' | 'header' | 'body';
|
1064
|
-
}): Promise<any>;
|
1065
|
-
buildAuthorizeUrl(options?: IOidcParams | IOauthParams | ICasParams): string;
|
1066
|
-
_buildOidcAuthorizeUrl(options: IOidcParams): string;
|
1067
|
-
_buildOauthAuthorizeUrl(options: IOauthParams): string;
|
1068
|
-
_buildSamlAuthorizeUrl(): string;
|
1069
|
-
_buildCasAuthorizeUrl(options: ICasParams): string;
|
1070
|
-
_buildCasLogoutUrl(options: ILogoutParams): string;
|
1071
|
-
_buildOidcLogoutUrl(options: ILogoutParams): string;
|
1072
|
-
_buildEasyLogoutUrl(options?: ILogoutParams): string;
|
1073
|
-
buildLogoutUrl(options?: ILogoutParams): string;
|
1074
|
-
_getNewAccessTokenByRefreshTokenWithClientSecretPost(refreshToken: string): Promise<any>;
|
1075
|
-
_getNewAccessTokenByRefreshTokenWithClientSecretBasic(refreshToken: string): Promise<any>;
|
1076
|
-
_getNewAccessTokenByRefreshTokenWithNone(refreshToken: string): Promise<any>;
|
1077
|
-
getNewAccessTokenByRefreshToken(refreshToken: string): Promise<any>;
|
1078
|
-
_revokeTokenWithClientSecretPost(token: string): Promise<any>;
|
1079
|
-
_revokeTokenWithClientSecretBasic(token: string): Promise<any>;
|
1080
|
-
_revokeTokenWithNone(token: string): Promise<any>;
|
1081
|
-
revokeToken(token: string): Promise<boolean>;
|
1082
|
-
_introspectTokenWithClientSecretPost(token: string): Promise<any>;
|
1083
|
-
_introspectTokenWithClientSecretBasic(token: string): Promise<any>;
|
1084
|
-
_introspectTokenWithNone(token: string): Promise<any>;
|
1085
|
-
introspectToken(token: string): Promise<any>;
|
1086
|
-
validateTicketV1(ticket: string, service: string): Promise<{
|
1087
|
-
message: string;
|
1088
|
-
username: any;
|
1089
|
-
valid: boolean;
|
1090
|
-
}>;
|
1091
|
-
/**
|
1092
|
-
* 判断 "我" 是否有某个角色
|
1093
|
-
* @param roleCode 角色 Code
|
1094
|
-
* @param namespace 权限分组 ID
|
1095
|
-
*/
|
1096
|
-
hasRole(roleCode: string, namespace?: string): Promise<boolean>;
|
1097
|
-
/**
|
1098
|
-
* @description 获取当前用户能够访问的应用
|
1099
|
-
*/
|
1100
|
-
listApplications(params?: {
|
1101
|
-
page: number;
|
1102
|
-
limit: number;
|
1103
|
-
}): Promise<{
|
1104
|
-
totalCount: number;
|
1105
|
-
list: ApplicationPublicDetail[];
|
1106
|
-
}>;
|
1107
|
-
/**
|
1108
|
-
* @description 检验 idToken 或 accessToken
|
1109
|
-
*/
|
1110
|
-
validateToken(options: {
|
1111
|
-
accessToken?: string;
|
1112
|
-
idToken?: string;
|
1113
|
-
}): Promise<any>;
|
1114
|
-
/**
|
1115
|
-
* @description 设置语言
|
1116
|
-
*/
|
1117
|
-
setLang(lang: Lang): void;
|
1118
|
-
}
|