@prosopo/procaptcha-bundle 2.5.1 → 2.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/components.d.ts +4 -4
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/components.d.ts.map +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/components.js +4 -4
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/components.js.map +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/index.d.ts +3 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/index.d.ts.map +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/index.js +83 -13
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/index.js.map +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.js +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.js.map +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.js +5 -6
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.js.map +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.d.ts +8 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.js +11 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.d.ts +6 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/{renderLogic/captcha/componentsList.js → captcha/captchaComponentsList.js} +3 -3
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/{renderLogic/captcha/captcha.d.ts → captcha/captchaProps.d.ts} +3 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.js +2 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.d.ts +24 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js +51 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/{renderLogic/captcha → captcha}/components/frictionlessCaptcha.d.ts +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.d.ts.map +1 -0
- package/{dist/util/renderLogic → .rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util}/captcha/components/frictionlessCaptcha.js +2 -2
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/{renderLogic/captcha → captcha}/components/imageCaptcha.d.ts +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/{renderLogic/captcha → captcha}/components/imageCaptcha.js +2 -2
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/{renderLogic/captcha → captcha}/components/powCaptcha.d.ts +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/{renderLogic/captcha → captcha}/components/powCaptcha.js +2 -2
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/config.d.ts +0 -2
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/config.d.ts.map +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/config.js +0 -19
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/config.js.map +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.d.ts +5 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.js +24 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.d.ts +18 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.js +57 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.js.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.d.ts +9 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.d.ts.map +1 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.js +19 -0
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.js.map +1 -0
- package/dist/bundle/ProcaptchaWidget-BlWWnPeB.js +615 -0
- package/dist/bundle/ProcaptchaWidget-Dnwno-4N.js +156 -0
- package/dist/bundle/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/bundle/{asU8a-Br9wz334.js → asU8a-JliaME7-.js} +1 -1
- package/dist/bundle/{bip39-BtaWByKg.js → bip39-CFjno8fK.js} +2 -2
- package/dist/bundle/{browser-ponyfill-Ck_bwPOY.js → browser-ponyfill-Dy1JBTMg.js} +20 -20
- package/dist/bundle/captchaComponentProvider-dcMua0p9.js +1013 -0
- package/dist/bundle/captchaRenderer-D-du50M4.js +5478 -0
- package/dist/bundle/components.d.ts +4 -4
- package/dist/bundle/components.d.ts.map +1 -1
- package/dist/bundle/emotion-element-5486c51c.browser.esm-Bywq83R5.js +1838 -0
- package/dist/bundle/{hash-KElfghPn.js → hash-CtL1HOjf.js} +1 -1
- package/dist/bundle/i18nFrontend-C_RgmvGh.js +2273 -0
- package/dist/bundle/index-B8oMghZ3.js +1120 -0
- package/dist/bundle/{index-Cb-XcaMX.js → index-BMjJnq60.js} +11 -10
- package/dist/bundle/index-BTlHNFX8.js +504 -0
- package/dist/bundle/{index-B0trzdT2.js → index-DcG_c-Na.js} +20 -19
- package/dist/bundle/index.d.ts +3 -1
- package/dist/bundle/index.d.ts.map +1 -1
- package/dist/bundle/locales/de/translation.json +2 -1
- package/dist/bundle/locales/en/translation.json +2 -1
- package/dist/bundle/locales/es/translation.json +2 -1
- package/dist/bundle/locales/fr/translation.json +2 -1
- package/dist/bundle/locales/it/translation.json +2 -1
- package/dist/bundle/locales/pt/translation.json +2 -1
- package/dist/bundle/locales/pt-BR/translation.json +2 -1
- package/dist/bundle/procaptcha.bundle.js +4 -3
- package/dist/bundle/translations-B0P9axY3.js +2885 -0
- package/dist/bundle/useTranslation-7b6JJ18N.js +158 -0
- package/dist/bundle/util/captcha/captchaComponentProvider.d.ts +8 -0
- package/dist/bundle/util/captcha/captchaComponentProvider.d.ts.map +1 -0
- package/dist/bundle/util/captcha/captchaComponentsList.d.ts +6 -0
- package/dist/bundle/util/captcha/captchaComponentsList.d.ts.map +1 -0
- package/dist/{util/renderLogic/captcha/captcha.d.ts → bundle/util/captcha/captchaProps.d.ts} +3 -1
- package/dist/bundle/util/captcha/captchaProps.d.ts.map +1 -0
- package/dist/bundle/util/captcha/captchaRenderer.d.ts +24 -0
- package/dist/bundle/util/captcha/captchaRenderer.d.ts.map +1 -0
- package/dist/bundle/util/captcha/captchaType.d.ts.map +1 -0
- package/dist/bundle/util/{renderLogic/captcha → captcha}/components/frictionlessCaptcha.d.ts +1 -1
- package/dist/bundle/util/captcha/components/frictionlessCaptcha.d.ts.map +1 -0
- package/dist/bundle/util/{renderLogic/captcha → captcha}/components/imageCaptcha.d.ts +1 -1
- package/dist/bundle/util/captcha/components/imageCaptcha.d.ts.map +1 -0
- package/dist/bundle/util/{renderLogic/captcha → captcha}/components/powCaptcha.d.ts +1 -1
- package/dist/bundle/util/captcha/components/powCaptcha.d.ts.map +1 -0
- package/dist/bundle/util/config.d.ts +0 -2
- package/dist/bundle/util/config.d.ts.map +1 -1
- package/dist/bundle/util/configCreator.d.ts +5 -0
- package/dist/bundle/util/configCreator.d.ts.map +1 -0
- package/dist/bundle/util/widgetFactory.d.ts +18 -0
- package/dist/bundle/util/widgetFactory.d.ts.map +1 -0
- package/dist/bundle/util/widgetThemeResolver.d.ts +9 -0
- package/dist/bundle/util/widgetThemeResolver.d.ts.map +1 -0
- package/dist/components.d.ts +4 -4
- package/dist/components.d.ts.map +1 -1
- package/dist/components.js +4 -4
- package/dist/components.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +83 -13
- package/dist/index.js.map +1 -1
- package/dist/tests/util/captchaType.test.js +1 -1
- package/dist/tests/util/captchaType.test.js.map +1 -1
- package/dist/tests/util/renderLogic.test.js +5 -6
- package/dist/tests/util/renderLogic.test.js.map +1 -1
- package/dist/util/captcha/captchaComponentProvider.d.ts +8 -0
- package/dist/util/captcha/captchaComponentProvider.d.ts.map +1 -0
- package/dist/util/captcha/captchaComponentProvider.js +11 -0
- package/dist/util/captcha/captchaComponentProvider.js.map +1 -0
- package/dist/util/captcha/captchaComponentsList.d.ts +6 -0
- package/dist/util/captcha/captchaComponentsList.d.ts.map +1 -0
- package/dist/util/{renderLogic/captcha/componentsList.js → captcha/captchaComponentsList.js} +3 -3
- package/dist/util/captcha/captchaComponentsList.js.map +1 -0
- package/dist/{bundle/util/renderLogic/captcha/captcha.d.ts → util/captcha/captchaProps.d.ts} +3 -1
- package/dist/util/captcha/captchaProps.d.ts.map +1 -0
- package/dist/util/captcha/captchaProps.js +2 -0
- package/dist/util/captcha/captchaProps.js.map +1 -0
- package/dist/util/captcha/captchaRenderer.d.ts +24 -0
- package/dist/util/captcha/captchaRenderer.d.ts.map +1 -0
- package/dist/util/captcha/captchaRenderer.js +51 -0
- package/dist/util/captcha/captchaRenderer.js.map +1 -0
- package/dist/util/captcha/captchaType.d.ts.map +1 -0
- package/dist/util/captcha/captchaType.js.map +1 -0
- package/dist/util/{renderLogic/captcha → captcha}/components/frictionlessCaptcha.d.ts +1 -1
- package/dist/util/captcha/components/frictionlessCaptcha.d.ts.map +1 -0
- package/{.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic → dist/util}/captcha/components/frictionlessCaptcha.js +2 -2
- package/dist/util/captcha/components/frictionlessCaptcha.js.map +1 -0
- package/dist/util/{renderLogic/captcha → captcha}/components/imageCaptcha.d.ts +1 -1
- package/dist/util/captcha/components/imageCaptcha.d.ts.map +1 -0
- package/dist/util/{renderLogic/captcha → captcha}/components/imageCaptcha.js +2 -2
- package/dist/util/captcha/components/imageCaptcha.js.map +1 -0
- package/dist/util/{renderLogic/captcha → captcha}/components/powCaptcha.d.ts +1 -1
- package/dist/util/captcha/components/powCaptcha.d.ts.map +1 -0
- package/dist/util/{renderLogic/captcha → captcha}/components/powCaptcha.js +2 -2
- package/dist/util/captcha/components/powCaptcha.js.map +1 -0
- package/dist/util/config.d.ts +0 -2
- package/dist/util/config.d.ts.map +1 -1
- package/dist/util/config.js +0 -19
- package/dist/util/config.js.map +1 -1
- package/dist/util/configCreator.d.ts +5 -0
- package/dist/util/configCreator.d.ts.map +1 -0
- package/dist/util/configCreator.js +24 -0
- package/dist/util/configCreator.js.map +1 -0
- package/dist/util/widgetFactory.d.ts +18 -0
- package/dist/util/widgetFactory.d.ts.map +1 -0
- package/dist/util/widgetFactory.js +57 -0
- package/dist/util/widgetFactory.js.map +1 -0
- package/dist/util/widgetThemeResolver.d.ts +9 -0
- package/dist/util/widgetThemeResolver.d.ts.map +1 -0
- package/dist/util/widgetThemeResolver.js +19 -0
- package/dist/util/widgetThemeResolver.js.map +1 -0
- package/package.json +10 -9
- package/stats.html +1 -1
- package/vite.cjs.config.ts +1 -1
- package/vite.config.ts +1 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captchaType.d.ts.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captchaType.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captcha.d.ts.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captcha.js +0 -2
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captcha.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captchaRenderer.d.ts +0 -8
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captchaRenderer.d.ts.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captchaRenderer.js +0 -11
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/captchaRenderer.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/frictionlessCaptcha.d.ts.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/frictionlessCaptcha.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/imageCaptcha.d.ts.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/imageCaptcha.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/powCaptcha.d.ts.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/components/powCaptcha.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/componentsList.d.ts +0 -6
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/componentsList.d.ts.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/captcha/componentsList.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/webComponent.d.ts +0 -8
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/webComponent.d.ts.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/webComponent.js +0 -29
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/webComponent.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/widgetRenderer.d.ts +0 -23
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/widgetRenderer.d.ts.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/widgetRenderer.js +0 -52
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic/widgetRenderer.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic.d.ts +0 -3
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic.d.ts.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic.js +0 -14
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/renderLogic.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/theme.d.ts +0 -3
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/theme.d.ts.map +0 -1
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/theme.js +0 -9
- package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/theme.js.map +0 -1
- package/dist/bundle/ProcaptchaWidget-CAyH6qD7.js +0 -161
- package/dist/bundle/ProcaptchaWidget-CY3qomFu.js +0 -619
- package/dist/bundle/index-VYSrdSle.js +0 -11587
- package/dist/bundle/index-n-2hvBzo.js +0 -1190
- package/dist/bundle/useTranslation-CcYxvTxi.js +0 -2435
- package/dist/bundle/util/captchaType.d.ts.map +0 -1
- package/dist/bundle/util/renderLogic/captcha/captcha.d.ts.map +0 -1
- package/dist/bundle/util/renderLogic/captcha/captchaRenderer.d.ts +0 -8
- package/dist/bundle/util/renderLogic/captcha/captchaRenderer.d.ts.map +0 -1
- package/dist/bundle/util/renderLogic/captcha/components/frictionlessCaptcha.d.ts.map +0 -1
- package/dist/bundle/util/renderLogic/captcha/components/imageCaptcha.d.ts.map +0 -1
- package/dist/bundle/util/renderLogic/captcha/components/powCaptcha.d.ts.map +0 -1
- package/dist/bundle/util/renderLogic/captcha/componentsList.d.ts +0 -6
- package/dist/bundle/util/renderLogic/captcha/componentsList.d.ts.map +0 -1
- package/dist/bundle/util/renderLogic/webComponent.d.ts +0 -8
- package/dist/bundle/util/renderLogic/webComponent.d.ts.map +0 -1
- package/dist/bundle/util/renderLogic/widgetRenderer.d.ts +0 -23
- package/dist/bundle/util/renderLogic/widgetRenderer.d.ts.map +0 -1
- package/dist/bundle/util/renderLogic.d.ts +0 -3
- package/dist/bundle/util/renderLogic.d.ts.map +0 -1
- package/dist/bundle/util/theme.d.ts +0 -3
- package/dist/bundle/util/theme.d.ts.map +0 -1
- package/dist/util/captchaType.d.ts.map +0 -1
- package/dist/util/captchaType.js.map +0 -1
- package/dist/util/renderLogic/captcha/captcha.d.ts.map +0 -1
- package/dist/util/renderLogic/captcha/captcha.js +0 -2
- package/dist/util/renderLogic/captcha/captcha.js.map +0 -1
- package/dist/util/renderLogic/captcha/captchaRenderer.d.ts +0 -8
- package/dist/util/renderLogic/captcha/captchaRenderer.d.ts.map +0 -1
- package/dist/util/renderLogic/captcha/captchaRenderer.js +0 -11
- package/dist/util/renderLogic/captcha/captchaRenderer.js.map +0 -1
- package/dist/util/renderLogic/captcha/components/frictionlessCaptcha.d.ts.map +0 -1
- package/dist/util/renderLogic/captcha/components/frictionlessCaptcha.js.map +0 -1
- package/dist/util/renderLogic/captcha/components/imageCaptcha.d.ts.map +0 -1
- package/dist/util/renderLogic/captcha/components/imageCaptcha.js.map +0 -1
- package/dist/util/renderLogic/captcha/components/powCaptcha.d.ts.map +0 -1
- package/dist/util/renderLogic/captcha/components/powCaptcha.js.map +0 -1
- package/dist/util/renderLogic/captcha/componentsList.d.ts +0 -6
- package/dist/util/renderLogic/captcha/componentsList.d.ts.map +0 -1
- package/dist/util/renderLogic/captcha/componentsList.js.map +0 -1
- package/dist/util/renderLogic/webComponent.d.ts +0 -8
- package/dist/util/renderLogic/webComponent.d.ts.map +0 -1
- package/dist/util/renderLogic/webComponent.js +0 -29
- package/dist/util/renderLogic/webComponent.js.map +0 -1
- package/dist/util/renderLogic/widgetRenderer.d.ts +0 -23
- package/dist/util/renderLogic/widgetRenderer.d.ts.map +0 -1
- package/dist/util/renderLogic/widgetRenderer.js +0 -52
- package/dist/util/renderLogic/widgetRenderer.js.map +0 -1
- package/dist/util/renderLogic.d.ts +0 -3
- package/dist/util/renderLogic.d.ts.map +0 -1
- package/dist/util/renderLogic.js +0 -14
- package/dist/util/renderLogic.js.map +0 -1
- package/dist/util/theme.d.ts +0 -3
- package/dist/util/theme.d.ts.map +0 -1
- package/dist/util/theme.js +0 -9
- package/dist/util/theme.js.map +0 -1
- /package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/{captchaType.d.ts → captcha/captchaType.d.ts} +0 -0
- /package/.rollup.cache/home/runner/work/captcha-private/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/{captchaType.js → captcha/captchaType.js} +0 -0
- /package/dist/bundle/util/{captchaType.d.ts → captcha/captchaType.d.ts} +0 -0
- /package/dist/util/{captchaType.d.ts → captcha/captchaType.d.ts} +0 -0
- /package/dist/util/{captchaType.js → captcha/captchaType.js} +0 -0
|
@@ -0,0 +1,1013 @@
|
|
|
1
|
+
import { g as Se, h as le, j as b, a as ue, b as pe, d as we, w as St, r as v, T as wt, u as xt, i as Pt, e as _t, f as Ct, k as Lt, l as w, A as i, S as xe, m as Pe, n as F, U as te, P as _e } from "./emotion-element-5486c51c.browser.esm-Bywq83R5.js";
|
|
2
|
+
import { e as Ce } from "./translations-B0P9axY3.js";
|
|
3
|
+
import { a as Le, W as Ee, l as Te, b as Ae, d as Ie, C as R } from "./index-BTlHNFX8.js";
|
|
4
|
+
import { g as It } from "./_commonjsHelpers-DaMA6jEr.js";
|
|
5
|
+
const je = { t: (t) => t };
|
|
6
|
+
class U extends Error {
|
|
7
|
+
constructor(e, r) {
|
|
8
|
+
const o = (r == null ? void 0 : r.logger) || Me(), s = (r == null ? void 0 : r.logLevel) || "error", n = (r == null ? void 0 : r.i18n) || je;
|
|
9
|
+
e instanceof Error ? (super(n.t(e.message)), this.translationKey = r == null ? void 0 : r.translationKey, this.context = {
|
|
10
|
+
...r == null ? void 0 : r.context,
|
|
11
|
+
...r != null && r.translationKey ? { translationMessage: n.t(r.translationKey) } : {}
|
|
12
|
+
}) : (super(n.t(e)), this.translationKey = e, this.context = r == null ? void 0 : r.context), r != null && r.silent || this.logError(o, s, r == null ? void 0 : r.name);
|
|
13
|
+
}
|
|
14
|
+
logError(e, r, o) {
|
|
15
|
+
const s = { error: this.message, context: this.context }, n = { errorType: o || this.name, errorParams: s };
|
|
16
|
+
r === "debug" && e.debug(this.stack), e[r](n);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
class jt extends U {
|
|
20
|
+
constructor(e, r) {
|
|
21
|
+
const o = (r == null ? void 0 : r.name) || "ProsopoError", s = { ...r, name: o };
|
|
22
|
+
super(e, s);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
class W extends U {
|
|
26
|
+
constructor(e, r) {
|
|
27
|
+
const o = (r == null ? void 0 : r.name) || "ProsopoEnvError", s = { ...r, name: o };
|
|
28
|
+
super(e, s);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
class Nt extends U {
|
|
32
|
+
constructor(e, r) {
|
|
33
|
+
const o = (r == null ? void 0 : r.name) || "ProsopoDatasetError", s = { ...r, name: o };
|
|
34
|
+
super(e, s);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const u = {
|
|
38
|
+
fatal: 0,
|
|
39
|
+
error: 0,
|
|
40
|
+
warn: 1,
|
|
41
|
+
log: 2,
|
|
42
|
+
info: 3,
|
|
43
|
+
success: 3,
|
|
44
|
+
fail: 3,
|
|
45
|
+
debug: 4,
|
|
46
|
+
trace: 5,
|
|
47
|
+
verbose: Number.POSITIVE_INFINITY
|
|
48
|
+
}, re = {
|
|
49
|
+
// Silent
|
|
50
|
+
silent: {
|
|
51
|
+
level: -1
|
|
52
|
+
},
|
|
53
|
+
// Level 0
|
|
54
|
+
fatal: {
|
|
55
|
+
level: u.fatal
|
|
56
|
+
},
|
|
57
|
+
error: {
|
|
58
|
+
level: u.error
|
|
59
|
+
},
|
|
60
|
+
// Level 1
|
|
61
|
+
warn: {
|
|
62
|
+
level: u.warn
|
|
63
|
+
},
|
|
64
|
+
// Level 2
|
|
65
|
+
log: {
|
|
66
|
+
level: u.log
|
|
67
|
+
},
|
|
68
|
+
// Level 3
|
|
69
|
+
info: {
|
|
70
|
+
level: u.info
|
|
71
|
+
},
|
|
72
|
+
success: {
|
|
73
|
+
level: u.success
|
|
74
|
+
},
|
|
75
|
+
fail: {
|
|
76
|
+
level: u.fail
|
|
77
|
+
},
|
|
78
|
+
ready: {
|
|
79
|
+
level: u.info
|
|
80
|
+
},
|
|
81
|
+
start: {
|
|
82
|
+
level: u.info
|
|
83
|
+
},
|
|
84
|
+
box: {
|
|
85
|
+
level: u.info
|
|
86
|
+
},
|
|
87
|
+
// Level 4
|
|
88
|
+
debug: {
|
|
89
|
+
level: u.debug
|
|
90
|
+
},
|
|
91
|
+
// Level 5
|
|
92
|
+
trace: {
|
|
93
|
+
level: u.trace
|
|
94
|
+
},
|
|
95
|
+
// Verbose
|
|
96
|
+
verbose: {
|
|
97
|
+
level: u.verbose
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
function M(t) {
|
|
101
|
+
return t !== null && typeof t == "object";
|
|
102
|
+
}
|
|
103
|
+
function z(t, e, r = ".", o) {
|
|
104
|
+
if (!M(e))
|
|
105
|
+
return z(t, {}, r);
|
|
106
|
+
const s = Object.assign({}, e);
|
|
107
|
+
for (const n in t) {
|
|
108
|
+
if (n === "__proto__" || n === "constructor")
|
|
109
|
+
continue;
|
|
110
|
+
const a = t[n];
|
|
111
|
+
a != null && (Array.isArray(a) && Array.isArray(s[n]) ? s[n] = [...a, ...s[n]] : M(a) && M(s[n]) ? s[n] = z(
|
|
112
|
+
a,
|
|
113
|
+
s[n],
|
|
114
|
+
(r ? `${r}.` : "") + n.toString()
|
|
115
|
+
) : s[n] = a);
|
|
116
|
+
}
|
|
117
|
+
return s;
|
|
118
|
+
}
|
|
119
|
+
function Ne(t) {
|
|
120
|
+
return (...e) => (
|
|
121
|
+
// eslint-disable-next-line unicorn/no-array-reduce
|
|
122
|
+
e.reduce((r, o) => z(r, o, ""), {})
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
const Oe = Ne();
|
|
126
|
+
function $e(t) {
|
|
127
|
+
return Object.prototype.toString.call(t) === "[object Object]";
|
|
128
|
+
}
|
|
129
|
+
function ke(t) {
|
|
130
|
+
return !(!$e(t) || !t.message && !t.args || t.stack);
|
|
131
|
+
}
|
|
132
|
+
let D = !1;
|
|
133
|
+
const oe = [];
|
|
134
|
+
class h {
|
|
135
|
+
constructor(e = {}) {
|
|
136
|
+
const r = e.types || re;
|
|
137
|
+
this.options = Oe(
|
|
138
|
+
{
|
|
139
|
+
...e,
|
|
140
|
+
defaults: { ...e.defaults },
|
|
141
|
+
level: K(e.level, r),
|
|
142
|
+
reporters: [...e.reporters || []]
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
types: re,
|
|
146
|
+
throttle: 1e3,
|
|
147
|
+
throttleMin: 5,
|
|
148
|
+
formatOptions: {
|
|
149
|
+
date: !0,
|
|
150
|
+
colors: !1,
|
|
151
|
+
compact: !0
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
);
|
|
155
|
+
for (const o in r) {
|
|
156
|
+
const s = {
|
|
157
|
+
type: o,
|
|
158
|
+
...this.options.defaults,
|
|
159
|
+
...r[o]
|
|
160
|
+
};
|
|
161
|
+
this[o] = this._wrapLogFn(s), this[o].raw = this._wrapLogFn(
|
|
162
|
+
s,
|
|
163
|
+
!0
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
this.options.mockFn && this.mockTypes(), this._lastLog = {};
|
|
167
|
+
}
|
|
168
|
+
get level() {
|
|
169
|
+
return this.options.level;
|
|
170
|
+
}
|
|
171
|
+
set level(e) {
|
|
172
|
+
this.options.level = K(
|
|
173
|
+
e,
|
|
174
|
+
this.options.types,
|
|
175
|
+
this.options.level
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
prompt(e, r) {
|
|
179
|
+
if (!this.options.prompt)
|
|
180
|
+
throw new Error("prompt is not supported!");
|
|
181
|
+
return this.options.prompt(e, r);
|
|
182
|
+
}
|
|
183
|
+
create(e) {
|
|
184
|
+
const r = new h({
|
|
185
|
+
...this.options,
|
|
186
|
+
...e
|
|
187
|
+
});
|
|
188
|
+
return this._mockFn && r.mockTypes(this._mockFn), r;
|
|
189
|
+
}
|
|
190
|
+
withDefaults(e) {
|
|
191
|
+
return this.create({
|
|
192
|
+
...this.options,
|
|
193
|
+
defaults: {
|
|
194
|
+
...this.options.defaults,
|
|
195
|
+
...e
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
withTag(e) {
|
|
200
|
+
return this.withDefaults({
|
|
201
|
+
tag: this.options.defaults.tag ? this.options.defaults.tag + ":" + e : e
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
addReporter(e) {
|
|
205
|
+
return this.options.reporters.push(e), this;
|
|
206
|
+
}
|
|
207
|
+
removeReporter(e) {
|
|
208
|
+
if (e) {
|
|
209
|
+
const r = this.options.reporters.indexOf(e);
|
|
210
|
+
if (r >= 0)
|
|
211
|
+
return this.options.reporters.splice(r, 1);
|
|
212
|
+
} else
|
|
213
|
+
this.options.reporters.splice(0);
|
|
214
|
+
return this;
|
|
215
|
+
}
|
|
216
|
+
setReporters(e) {
|
|
217
|
+
return this.options.reporters = Array.isArray(e) ? e : [e], this;
|
|
218
|
+
}
|
|
219
|
+
wrapAll() {
|
|
220
|
+
this.wrapConsole(), this.wrapStd();
|
|
221
|
+
}
|
|
222
|
+
restoreAll() {
|
|
223
|
+
this.restoreConsole(), this.restoreStd();
|
|
224
|
+
}
|
|
225
|
+
wrapConsole() {
|
|
226
|
+
for (const e in this.options.types)
|
|
227
|
+
console["__" + e] || (console["__" + e] = console[e]), console[e] = this[e].raw;
|
|
228
|
+
}
|
|
229
|
+
restoreConsole() {
|
|
230
|
+
for (const e in this.options.types)
|
|
231
|
+
console["__" + e] && (console[e] = console["__" + e], delete console["__" + e]);
|
|
232
|
+
}
|
|
233
|
+
wrapStd() {
|
|
234
|
+
this._wrapStream(this.options.stdout, "log"), this._wrapStream(this.options.stderr, "log");
|
|
235
|
+
}
|
|
236
|
+
_wrapStream(e, r) {
|
|
237
|
+
e && (e.__write || (e.__write = e.write), e.write = (o) => {
|
|
238
|
+
this[r].raw(String(o).trim());
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
restoreStd() {
|
|
242
|
+
this._restoreStream(this.options.stdout), this._restoreStream(this.options.stderr);
|
|
243
|
+
}
|
|
244
|
+
_restoreStream(e) {
|
|
245
|
+
e && e.__write && (e.write = e.__write, delete e.__write);
|
|
246
|
+
}
|
|
247
|
+
pauseLogs() {
|
|
248
|
+
D = !0;
|
|
249
|
+
}
|
|
250
|
+
resumeLogs() {
|
|
251
|
+
D = !1;
|
|
252
|
+
const e = oe.splice(0);
|
|
253
|
+
for (const r of e)
|
|
254
|
+
r[0]._logFn(r[1], r[2]);
|
|
255
|
+
}
|
|
256
|
+
mockTypes(e) {
|
|
257
|
+
const r = e || this.options.mockFn;
|
|
258
|
+
if (this._mockFn = r, typeof r == "function")
|
|
259
|
+
for (const o in this.options.types)
|
|
260
|
+
this[o] = r(o, this.options.types[o]) || this[o], this[o].raw = this[o];
|
|
261
|
+
}
|
|
262
|
+
_wrapLogFn(e, r) {
|
|
263
|
+
return (...o) => {
|
|
264
|
+
if (D) {
|
|
265
|
+
oe.push([this, e, o, r]);
|
|
266
|
+
return;
|
|
267
|
+
}
|
|
268
|
+
return this._logFn(e, o, r);
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
_logFn(e, r, o) {
|
|
272
|
+
if ((e.level || 0) > this.level)
|
|
273
|
+
return !1;
|
|
274
|
+
const s = {
|
|
275
|
+
date: /* @__PURE__ */ new Date(),
|
|
276
|
+
args: [],
|
|
277
|
+
...e,
|
|
278
|
+
level: K(e.level, this.options.types)
|
|
279
|
+
};
|
|
280
|
+
!o && r.length === 1 && ke(r[0]) ? Object.assign(s, r[0]) : s.args = [...r], s.message && (s.args.unshift(s.message), delete s.message), s.additional && (Array.isArray(s.additional) || (s.additional = s.additional.split(`
|
|
281
|
+
`)), s.args.push(`
|
|
282
|
+
` + s.additional.join(`
|
|
283
|
+
`)), delete s.additional), s.type = typeof s.type == "string" ? s.type.toLowerCase() : "log", s.tag = typeof s.tag == "string" ? s.tag : "";
|
|
284
|
+
const n = (c = !1) => {
|
|
285
|
+
const p = (this._lastLog.count || 0) - this.options.throttleMin;
|
|
286
|
+
if (this._lastLog.object && p > 0) {
|
|
287
|
+
const S = [...this._lastLog.object.args];
|
|
288
|
+
p > 1 && S.push(`(repeated ${p} times)`), this._log({ ...this._lastLog.object, args: S }), this._lastLog.count = 1;
|
|
289
|
+
}
|
|
290
|
+
c && (this._lastLog.object = s, this._log(s));
|
|
291
|
+
};
|
|
292
|
+
clearTimeout(this._lastLog.timeout);
|
|
293
|
+
const a = this._lastLog.time && s.date ? s.date.getTime() - this._lastLog.time.getTime() : 0;
|
|
294
|
+
if (this._lastLog.time = s.date, a < this.options.throttle)
|
|
295
|
+
try {
|
|
296
|
+
const c = JSON.stringify([
|
|
297
|
+
s.type,
|
|
298
|
+
s.tag,
|
|
299
|
+
s.args
|
|
300
|
+
]), p = this._lastLog.serialized === c;
|
|
301
|
+
if (this._lastLog.serialized = c, p && (this._lastLog.count = (this._lastLog.count || 0) + 1, this._lastLog.count > this.options.throttleMin)) {
|
|
302
|
+
this._lastLog.timeout = setTimeout(
|
|
303
|
+
n,
|
|
304
|
+
this.options.throttle
|
|
305
|
+
);
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
} catch {
|
|
309
|
+
}
|
|
310
|
+
n(!0);
|
|
311
|
+
}
|
|
312
|
+
_log(e) {
|
|
313
|
+
for (const r of this.options.reporters)
|
|
314
|
+
r.log(e, {
|
|
315
|
+
options: this.options
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
function K(t, e = {}, r = 3) {
|
|
320
|
+
return t === void 0 ? r : typeof t == "number" ? t : e[t] && e[t].level !== void 0 ? e[t].level : r;
|
|
321
|
+
}
|
|
322
|
+
h.prototype.add = h.prototype.addReporter;
|
|
323
|
+
h.prototype.remove = h.prototype.removeReporter;
|
|
324
|
+
h.prototype.clear = h.prototype.removeReporter;
|
|
325
|
+
h.prototype.withScope = h.prototype.withTag;
|
|
326
|
+
h.prototype.mock = h.prototype.mockTypes;
|
|
327
|
+
h.prototype.pause = h.prototype.pauseLogs;
|
|
328
|
+
h.prototype.resume = h.prototype.resumeLogs;
|
|
329
|
+
function Fe(t = {}) {
|
|
330
|
+
return new h(t);
|
|
331
|
+
}
|
|
332
|
+
class Re {
|
|
333
|
+
constructor(e) {
|
|
334
|
+
this.options = { ...e }, this.defaultColor = "#7f8c8d", this.levelColorMap = {
|
|
335
|
+
0: "#c0392b",
|
|
336
|
+
// Red
|
|
337
|
+
1: "#f39c12",
|
|
338
|
+
// Yellow
|
|
339
|
+
3: "#00BCD4"
|
|
340
|
+
// Cyan
|
|
341
|
+
}, this.typeColorMap = {
|
|
342
|
+
success: "#2ecc71"
|
|
343
|
+
// Green
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
_getLogFn(e) {
|
|
347
|
+
return e < 1 ? console.__error || console.error : e === 1 ? console.__warn || console.warn : console.__log || console.log;
|
|
348
|
+
}
|
|
349
|
+
log(e) {
|
|
350
|
+
const r = this._getLogFn(e.level), o = e.type === "log" ? "" : e.type, s = e.tag || "", a = `
|
|
351
|
+
background: ${this.typeColorMap[e.type] || this.levelColorMap[e.level] || this.defaultColor};
|
|
352
|
+
border-radius: 0.5em;
|
|
353
|
+
color: white;
|
|
354
|
+
font-weight: bold;
|
|
355
|
+
padding: 2px 0.5em;
|
|
356
|
+
`, c = `%c${[s, o].filter(Boolean).join(":")}`;
|
|
357
|
+
typeof e.args[0] == "string" ? r(
|
|
358
|
+
`${c}%c ${e.args[0]}`,
|
|
359
|
+
a,
|
|
360
|
+
// Empty string as style resets to default console style
|
|
361
|
+
"",
|
|
362
|
+
...e.args.slice(1)
|
|
363
|
+
) : r(c, a, ...e.args);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
function fe(t = {}) {
|
|
367
|
+
return Fe({
|
|
368
|
+
reporters: t.reporters || [new Re({})],
|
|
369
|
+
prompt(r, o = {}) {
|
|
370
|
+
return o.type === "confirm" ? Promise.resolve(confirm(r)) : Promise.resolve(prompt(r));
|
|
371
|
+
},
|
|
372
|
+
...t
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
fe();
|
|
376
|
+
const x = Ce([
|
|
377
|
+
"trace",
|
|
378
|
+
"debug",
|
|
379
|
+
"info",
|
|
380
|
+
"warn",
|
|
381
|
+
"error",
|
|
382
|
+
"fatal",
|
|
383
|
+
"log"
|
|
384
|
+
]);
|
|
385
|
+
function Me() {
|
|
386
|
+
return ze;
|
|
387
|
+
}
|
|
388
|
+
const De = (t, e) => {
|
|
389
|
+
const r = process != null && process.stdout ? process.stdout.write.bind(process.stdout) : console.info, o = process != null && process.stderr ? process.stderr.write.bind(process.stderr) : console.error;
|
|
390
|
+
e.options.level === u.error ? o(`${JSON.stringify(t)}
|
|
391
|
+
`) : r(`${JSON.stringify(t)}
|
|
392
|
+
`);
|
|
393
|
+
}, Ke = (t, e, r) => {
|
|
394
|
+
const o = fe({
|
|
395
|
+
reporters: [
|
|
396
|
+
{
|
|
397
|
+
log: (a, c) => {
|
|
398
|
+
const p = De, S = { ...a, requestId: r };
|
|
399
|
+
p(S, c);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
],
|
|
403
|
+
formatOptions: { colors: !0, date: !0 }
|
|
404
|
+
}).withTag(e);
|
|
405
|
+
let s = t;
|
|
406
|
+
const n = {
|
|
407
|
+
log: o.log,
|
|
408
|
+
info: o.info,
|
|
409
|
+
debug: o.debug,
|
|
410
|
+
trace: o.trace,
|
|
411
|
+
warn: o.warn,
|
|
412
|
+
error: o.error,
|
|
413
|
+
fatal: o.fatal,
|
|
414
|
+
setLogLevel: (a) => {
|
|
415
|
+
let c = Number.NaN;
|
|
416
|
+
const p = He(a);
|
|
417
|
+
switch (p) {
|
|
418
|
+
case x.enum.trace:
|
|
419
|
+
c = u.trace;
|
|
420
|
+
break;
|
|
421
|
+
case x.enum.debug:
|
|
422
|
+
c = u.debug;
|
|
423
|
+
break;
|
|
424
|
+
case x.enum.info:
|
|
425
|
+
c = u.info;
|
|
426
|
+
break;
|
|
427
|
+
case x.enum.warn:
|
|
428
|
+
c = u.warn;
|
|
429
|
+
break;
|
|
430
|
+
case x.enum.error:
|
|
431
|
+
c = u.error;
|
|
432
|
+
break;
|
|
433
|
+
case x.enum.fatal:
|
|
434
|
+
c = u.fatal;
|
|
435
|
+
break;
|
|
436
|
+
case x.enum.log:
|
|
437
|
+
c = u.log;
|
|
438
|
+
break;
|
|
439
|
+
default:
|
|
440
|
+
throw new Error(`Invalid log level translation to consola's log level: ${a}`);
|
|
441
|
+
}
|
|
442
|
+
o.level = c, s = p;
|
|
443
|
+
},
|
|
444
|
+
getLogLevel: () => s
|
|
445
|
+
};
|
|
446
|
+
return n.setLogLevel(t), n;
|
|
447
|
+
};
|
|
448
|
+
function He(t) {
|
|
449
|
+
const r = (t || process.env.PROSOPO_LOG_LEVEL || "Info").toString().toLowerCase();
|
|
450
|
+
try {
|
|
451
|
+
return x.parse(r);
|
|
452
|
+
} catch {
|
|
453
|
+
throw new W("CONFIG.INVALID_LOG_LEVEL", {
|
|
454
|
+
context: { logLevel: t }
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
const ze = Ke(x.enum.info, "global"), se = (t) => Object.values(t), Ue = async (t) => {
|
|
459
|
+
if (t === "production") {
|
|
460
|
+
const e = await fetch("https://provider-list.prosopo.io/", {
|
|
461
|
+
method: "GET",
|
|
462
|
+
mode: "cors"
|
|
463
|
+
}).then((r) => r.json());
|
|
464
|
+
return se(e);
|
|
465
|
+
}
|
|
466
|
+
if (t === "staging") {
|
|
467
|
+
const e = await fetch("https://provider-list.prosopo.io/staging.json", { method: "GET", mode: "cors" }).then((r) => r.json());
|
|
468
|
+
return se(e);
|
|
469
|
+
}
|
|
470
|
+
if (t === "development")
|
|
471
|
+
return [
|
|
472
|
+
{
|
|
473
|
+
address: "5EjTA28bKSbFPPyMbUjNtArxyqjwq38r1BapVmLZShaqEedV",
|
|
474
|
+
url: "http://localhost:9229",
|
|
475
|
+
datasetId: "0x9f460e81ac9c71b486f796a21bb36e2263694756a6621134d110da217fd3ef25"
|
|
476
|
+
}
|
|
477
|
+
];
|
|
478
|
+
throw new W("CONFIG.UNKNOWN_ENVIRONMENT", {
|
|
479
|
+
context: { environment: t }
|
|
480
|
+
});
|
|
481
|
+
}, We = async (t) => {
|
|
482
|
+
const e = (s, n) => Math.floor(Math.random() * (n - s + 1) + s), r = await Ue(t.defaultEnvironment), o = Le(r, e(0, r.length - 1));
|
|
483
|
+
return {
|
|
484
|
+
providerAccount: o.address,
|
|
485
|
+
provider: {
|
|
486
|
+
url: o.url,
|
|
487
|
+
datasetId: o.datasetId
|
|
488
|
+
}
|
|
489
|
+
};
|
|
490
|
+
}, Ge = async (t, e, r, o, s) => {
|
|
491
|
+
try {
|
|
492
|
+
await t();
|
|
493
|
+
} catch (n) {
|
|
494
|
+
if (o >= s)
|
|
495
|
+
return console.error(n), console.error(`Max retries (${o} of ${s}) reached, aborting`), r();
|
|
496
|
+
console.error(n), r(), await e();
|
|
497
|
+
}
|
|
498
|
+
}, C = (t) => ({
|
|
499
|
+
...Se(void 0),
|
|
500
|
+
...t
|
|
501
|
+
}), Be = async (t) => t ? (await import("./index-DcG_c-Na.js")).ExtensionWeb2 : (await import("./index-DcG_c-Na.js")).ExtensionWeb3;
|
|
502
|
+
var he = { exports: {} }, l = {};
|
|
503
|
+
var f = typeof Symbol == "function" && Symbol.for, G = f ? Symbol.for("react.element") : 60103, B = f ? Symbol.for("react.portal") : 60106, L = f ? Symbol.for("react.fragment") : 60107, E = f ? Symbol.for("react.strict_mode") : 60108, T = f ? Symbol.for("react.profiler") : 60114, A = f ? Symbol.for("react.provider") : 60109, I = f ? Symbol.for("react.context") : 60110, V = f ? Symbol.for("react.async_mode") : 60111, j = f ? Symbol.for("react.concurrent_mode") : 60111, N = f ? Symbol.for("react.forward_ref") : 60112, O = f ? Symbol.for("react.suspense") : 60113, Ve = f ? Symbol.for("react.suspense_list") : 60120, $ = f ? Symbol.for("react.memo") : 60115, k = f ? Symbol.for("react.lazy") : 60116, qe = f ? Symbol.for("react.block") : 60121, Je = f ? Symbol.for("react.fundamental") : 60117, Ye = f ? Symbol.for("react.responder") : 60118, Qe = f ? Symbol.for("react.scope") : 60119;
|
|
504
|
+
function m(t) {
|
|
505
|
+
if (typeof t == "object" && t !== null) {
|
|
506
|
+
var e = t.$$typeof;
|
|
507
|
+
switch (e) {
|
|
508
|
+
case G:
|
|
509
|
+
switch (t = t.type, t) {
|
|
510
|
+
case V:
|
|
511
|
+
case j:
|
|
512
|
+
case L:
|
|
513
|
+
case T:
|
|
514
|
+
case E:
|
|
515
|
+
case O:
|
|
516
|
+
return t;
|
|
517
|
+
default:
|
|
518
|
+
switch (t = t && t.$$typeof, t) {
|
|
519
|
+
case I:
|
|
520
|
+
case N:
|
|
521
|
+
case k:
|
|
522
|
+
case $:
|
|
523
|
+
case A:
|
|
524
|
+
return t;
|
|
525
|
+
default:
|
|
526
|
+
return e;
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
case B:
|
|
530
|
+
return e;
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
function de(t) {
|
|
535
|
+
return m(t) === j;
|
|
536
|
+
}
|
|
537
|
+
l.AsyncMode = V;
|
|
538
|
+
l.ConcurrentMode = j;
|
|
539
|
+
l.ContextConsumer = I;
|
|
540
|
+
l.ContextProvider = A;
|
|
541
|
+
l.Element = G;
|
|
542
|
+
l.ForwardRef = N;
|
|
543
|
+
l.Fragment = L;
|
|
544
|
+
l.Lazy = k;
|
|
545
|
+
l.Memo = $;
|
|
546
|
+
l.Portal = B;
|
|
547
|
+
l.Profiler = T;
|
|
548
|
+
l.StrictMode = E;
|
|
549
|
+
l.Suspense = O;
|
|
550
|
+
l.isAsyncMode = function(t) {
|
|
551
|
+
return de(t) || m(t) === V;
|
|
552
|
+
};
|
|
553
|
+
l.isConcurrentMode = de;
|
|
554
|
+
l.isContextConsumer = function(t) {
|
|
555
|
+
return m(t) === I;
|
|
556
|
+
};
|
|
557
|
+
l.isContextProvider = function(t) {
|
|
558
|
+
return m(t) === A;
|
|
559
|
+
};
|
|
560
|
+
l.isElement = function(t) {
|
|
561
|
+
return typeof t == "object" && t !== null && t.$$typeof === G;
|
|
562
|
+
};
|
|
563
|
+
l.isForwardRef = function(t) {
|
|
564
|
+
return m(t) === N;
|
|
565
|
+
};
|
|
566
|
+
l.isFragment = function(t) {
|
|
567
|
+
return m(t) === L;
|
|
568
|
+
};
|
|
569
|
+
l.isLazy = function(t) {
|
|
570
|
+
return m(t) === k;
|
|
571
|
+
};
|
|
572
|
+
l.isMemo = function(t) {
|
|
573
|
+
return m(t) === $;
|
|
574
|
+
};
|
|
575
|
+
l.isPortal = function(t) {
|
|
576
|
+
return m(t) === B;
|
|
577
|
+
};
|
|
578
|
+
l.isProfiler = function(t) {
|
|
579
|
+
return m(t) === T;
|
|
580
|
+
};
|
|
581
|
+
l.isStrictMode = function(t) {
|
|
582
|
+
return m(t) === E;
|
|
583
|
+
};
|
|
584
|
+
l.isSuspense = function(t) {
|
|
585
|
+
return m(t) === O;
|
|
586
|
+
};
|
|
587
|
+
l.isValidElementType = function(t) {
|
|
588
|
+
return typeof t == "string" || typeof t == "function" || t === L || t === j || t === T || t === E || t === O || t === Ve || typeof t == "object" && t !== null && (t.$$typeof === k || t.$$typeof === $ || t.$$typeof === A || t.$$typeof === I || t.$$typeof === N || t.$$typeof === Je || t.$$typeof === Ye || t.$$typeof === Qe || t.$$typeof === qe);
|
|
589
|
+
};
|
|
590
|
+
l.typeOf = m;
|
|
591
|
+
he.exports = l;
|
|
592
|
+
var Xe = he.exports, ge = Xe;
|
|
593
|
+
var Ze = {
|
|
594
|
+
$$typeof: !0,
|
|
595
|
+
render: !0,
|
|
596
|
+
defaultProps: !0,
|
|
597
|
+
displayName: !0,
|
|
598
|
+
propTypes: !0
|
|
599
|
+
}, et = {
|
|
600
|
+
$$typeof: !0,
|
|
601
|
+
compare: !0,
|
|
602
|
+
defaultProps: !0,
|
|
603
|
+
displayName: !0,
|
|
604
|
+
propTypes: !0,
|
|
605
|
+
type: !0
|
|
606
|
+
}, me = {};
|
|
607
|
+
me[ge.ForwardRef] = Ze;
|
|
608
|
+
me[ge.Memo] = et;
|
|
609
|
+
var Ot = Object.prototype;
|
|
610
|
+
function g(t, e, r) {
|
|
611
|
+
return le.call(e, "css") ? b.jsx(ue, pe(t, e), r) : b.jsx(t, e, r);
|
|
612
|
+
}
|
|
613
|
+
function tt(t, e, r) {
|
|
614
|
+
return le.call(e, "css") ? b.jsxs(ue, pe(t, e), r) : b.jsxs(t, e, r);
|
|
615
|
+
}
|
|
616
|
+
function ye() {
|
|
617
|
+
for (var t = arguments.length, e = new Array(t), r = 0; r < t; r++)
|
|
618
|
+
e[r] = arguments[r];
|
|
619
|
+
return we(e);
|
|
620
|
+
}
|
|
621
|
+
const rt = ye`{
|
|
622
|
+
&:before {
|
|
623
|
+
content: '""';
|
|
624
|
+
position: absolute;
|
|
625
|
+
height: 100%;
|
|
626
|
+
width: 100%;
|
|
627
|
+
}
|
|
628
|
+
}`, ot = {
|
|
629
|
+
width: "28px",
|
|
630
|
+
height: "28px",
|
|
631
|
+
minWidth: "14px",
|
|
632
|
+
minHeight: "14px",
|
|
633
|
+
top: "auto",
|
|
634
|
+
left: "auto",
|
|
635
|
+
opacity: "1",
|
|
636
|
+
borderRadius: "12.5%",
|
|
637
|
+
appearance: "none",
|
|
638
|
+
cursor: "pointer",
|
|
639
|
+
margin: "0",
|
|
640
|
+
borderStyle: "solid",
|
|
641
|
+
borderWidth: "1px"
|
|
642
|
+
}, ne = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", st = "https://docs.prosopo.io/en/basics/faq/", nt = () => Array.from({ length: 8 }, () => ne[Math.floor(Math.random() * ne.length)]).join(""), ae = ye`
|
|
643
|
+
display: none;
|
|
644
|
+
@media (min-width: 216px) {
|
|
645
|
+
display: flex;
|
|
646
|
+
font-size: 12px;
|
|
647
|
+
}
|
|
648
|
+
@media (min-width: 268px) {
|
|
649
|
+
display: flex;
|
|
650
|
+
font-size: 16px;
|
|
651
|
+
}
|
|
652
|
+
`, at = ({ theme: t, onChange: e, checked: r, labelText: o, error: s, loading: n }) => {
|
|
653
|
+
const a = {
|
|
654
|
+
...ot,
|
|
655
|
+
border: `1px solid ${t.palette.background.contrastText}`
|
|
656
|
+
}, [c, p] = v.useState(!1), S = v.useMemo(() => ({
|
|
657
|
+
...a,
|
|
658
|
+
borderColor: c ? t.palette.background.contrastText : t.palette.border,
|
|
659
|
+
appearance: r ? "auto" : "none",
|
|
660
|
+
flex: 1,
|
|
661
|
+
margin: "15px",
|
|
662
|
+
minWidth: "14px",
|
|
663
|
+
minHeight: "14px"
|
|
664
|
+
}), [c, t, r]), P = nt();
|
|
665
|
+
return tt("span", { style: {
|
|
666
|
+
display: "inline-flex",
|
|
667
|
+
alignItems: "center",
|
|
668
|
+
minHeight: "58px"
|
|
669
|
+
}, children: [n ? g("div", { className: "checkbox__outer", children: g("div", { className: "checkbox__wrapper", children: g("div", { className: "checkbox__inner", children: g("div", { className: "checkbox__content", children: g("div", { className: Ee, "aria-label": "Loading spinner" }) }) }) }) }) : g("input", { name: P, id: P, onMouseEnter: () => p(!0), onMouseLeave: () => p(!1), css: rt, type: "checkbox", "aria-live": "assertive", "aria-label": o, onChange: (_) => {
|
|
670
|
+
_.preventDefault(), _.stopPropagation(), p(!1), e();
|
|
671
|
+
}, checked: r, style: S, disabled: s !== void 0, className: n ? "checkbox__loading-spinner" : "", "data-cy": "captcha-checkbox" }), s ? g("label", { css: {
|
|
672
|
+
color: t.palette.error.main,
|
|
673
|
+
position: "relative",
|
|
674
|
+
display: "flex",
|
|
675
|
+
cursor: "pointer",
|
|
676
|
+
userSelect: "none",
|
|
677
|
+
...ae
|
|
678
|
+
}, htmlFor: P, children: g("a", { css: {
|
|
679
|
+
color: t.palette.error.main
|
|
680
|
+
}, href: st, children: s }) }) : g("label", { css: {
|
|
681
|
+
color: t.palette.background.contrastText,
|
|
682
|
+
position: "relative",
|
|
683
|
+
display: "flex",
|
|
684
|
+
cursor: "pointer",
|
|
685
|
+
userSelect: "none",
|
|
686
|
+
...ae
|
|
687
|
+
}, htmlFor: P, children: o })] });
|
|
688
|
+
};
|
|
689
|
+
class H extends Error {
|
|
690
|
+
constructor(e, r, o) {
|
|
691
|
+
super(`HTTP error! status: ${e} (${r}) for URL: ${o}`), this.status = e, this.statusText = r, this.url = o, this.name = "HttpError";
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
class it {
|
|
695
|
+
constructor(e, r = "") {
|
|
696
|
+
this.baseURL = e + r;
|
|
697
|
+
}
|
|
698
|
+
async fetch(e, r) {
|
|
699
|
+
var o;
|
|
700
|
+
try {
|
|
701
|
+
const s = await fetch(this.baseURL + e, r);
|
|
702
|
+
if (!s.ok && s.status !== 400 && !((o = s.headers.get("content-type")) != null && o.includes("application/json")))
|
|
703
|
+
throw new H(s.status, s.statusText, s.url);
|
|
704
|
+
return this.responseHandler(s);
|
|
705
|
+
} catch (s) {
|
|
706
|
+
return this.errorHandler(s);
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
async post(e, r, o) {
|
|
710
|
+
var n;
|
|
711
|
+
const s = {
|
|
712
|
+
"Content-Type": "application/json",
|
|
713
|
+
...(o == null ? void 0 : o.headers) || {}
|
|
714
|
+
};
|
|
715
|
+
try {
|
|
716
|
+
const a = await fetch(this.baseURL + e, {
|
|
717
|
+
method: "POST",
|
|
718
|
+
body: JSON.stringify(r),
|
|
719
|
+
...o,
|
|
720
|
+
headers: s
|
|
721
|
+
});
|
|
722
|
+
if (!a.ok && a.status !== 400 && !((n = a.headers.get("content-type")) != null && n.includes("application/json")))
|
|
723
|
+
throw new H(a.status, a.statusText, a.url);
|
|
724
|
+
return this.responseHandler(a);
|
|
725
|
+
} catch (a) {
|
|
726
|
+
return this.errorHandler(a);
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
async responseHandler(e) {
|
|
730
|
+
try {
|
|
731
|
+
return await e.json();
|
|
732
|
+
} catch (r) {
|
|
733
|
+
throw console.error("Error parsing JSON:", r), r;
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
errorHandler(e) {
|
|
737
|
+
return e instanceof H ? console.error("HTTP error:", e) : console.error("API request error:", e), Promise.reject(e);
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
class ct extends it {
|
|
741
|
+
constructor(e, r) {
|
|
742
|
+
const o = e.startsWith("http") ? e : `https://${e}`;
|
|
743
|
+
super(o), this.account = r;
|
|
744
|
+
}
|
|
745
|
+
getCaptchaChallenge(e, r, o) {
|
|
746
|
+
const { provider: s } = r, n = this.account, a = {
|
|
747
|
+
[i.dapp]: n,
|
|
748
|
+
[i.user]: e,
|
|
749
|
+
[i.datasetId]: s.datasetId
|
|
750
|
+
};
|
|
751
|
+
return o && (a[i.sessionId] = o), this.post(w.GetImageCaptchaChallenge, a, {
|
|
752
|
+
headers: {
|
|
753
|
+
"Prosopo-Site-Key": this.account,
|
|
754
|
+
"Prosopo-User": e
|
|
755
|
+
}
|
|
756
|
+
});
|
|
757
|
+
}
|
|
758
|
+
submitCaptchaSolution(e, r, o, s, n, a) {
|
|
759
|
+
const c = {
|
|
760
|
+
[i.user]: o,
|
|
761
|
+
[i.dapp]: this.account,
|
|
762
|
+
[i.captchas]: e,
|
|
763
|
+
[i.requestHash]: r,
|
|
764
|
+
[i.timestamp]: s,
|
|
765
|
+
[i.signature]: {
|
|
766
|
+
[i.user]: {
|
|
767
|
+
[i.timestamp]: a
|
|
768
|
+
},
|
|
769
|
+
[i.provider]: {
|
|
770
|
+
[i.requestHash]: n
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
};
|
|
774
|
+
return this.post(w.SubmitImageCaptchaSolution, c, {
|
|
775
|
+
headers: {
|
|
776
|
+
"Prosopo-Site-Key": this.account,
|
|
777
|
+
"Prosopo-User": o
|
|
778
|
+
}
|
|
779
|
+
});
|
|
780
|
+
}
|
|
781
|
+
verifyDappUser(e, r, o, s) {
|
|
782
|
+
const n = {
|
|
783
|
+
[i.token]: e,
|
|
784
|
+
[i.dappSignature]: r
|
|
785
|
+
};
|
|
786
|
+
return s && (n[i.maxVerifiedTime] = s), this.post(w.VerifyImageCaptchaSolutionDapp, n, {
|
|
787
|
+
headers: {
|
|
788
|
+
"Prosopo-Site-Key": this.account,
|
|
789
|
+
"Prosopo-User": o
|
|
790
|
+
}
|
|
791
|
+
});
|
|
792
|
+
}
|
|
793
|
+
getPowCaptchaChallenge(e, r, o) {
|
|
794
|
+
const s = {
|
|
795
|
+
[i.user]: e.toString(),
|
|
796
|
+
[i.dapp]: r.toString(),
|
|
797
|
+
...o && { [i.sessionId]: o }
|
|
798
|
+
};
|
|
799
|
+
return this.post(w.GetPowCaptchaChallenge, s, {
|
|
800
|
+
headers: {
|
|
801
|
+
"Prosopo-Site-Key": this.account,
|
|
802
|
+
"Prosopo-User": e
|
|
803
|
+
}
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
submitPowCaptchaSolution(e, r, o, s, n, a) {
|
|
807
|
+
const c = xe.parse({
|
|
808
|
+
[i.challenge]: e.challenge,
|
|
809
|
+
[i.difficulty]: e.difficulty,
|
|
810
|
+
[i.timestamp]: e.timestamp,
|
|
811
|
+
[i.user]: r.toString(),
|
|
812
|
+
[i.dapp]: o.toString(),
|
|
813
|
+
[i.nonce]: s,
|
|
814
|
+
[i.verifiedTimeout]: a,
|
|
815
|
+
[i.signature]: {
|
|
816
|
+
[i.provider]: e[i.signature][i.provider],
|
|
817
|
+
[i.user]: {
|
|
818
|
+
[i.timestamp]: n
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
});
|
|
822
|
+
return this.post(w.SubmitPowCaptchaSolution, c, {
|
|
823
|
+
headers: {
|
|
824
|
+
"Prosopo-Site-Key": this.account,
|
|
825
|
+
"Prosopo-User": r
|
|
826
|
+
}
|
|
827
|
+
});
|
|
828
|
+
}
|
|
829
|
+
getFrictionlessCaptcha(e, r, o) {
|
|
830
|
+
const s = {
|
|
831
|
+
[i.token]: e,
|
|
832
|
+
[i.dapp]: r,
|
|
833
|
+
[i.user]: o
|
|
834
|
+
};
|
|
835
|
+
return this.post(w.GetFrictionlessCaptchaChallenge, s, {
|
|
836
|
+
headers: {
|
|
837
|
+
"Prosopo-Site-Key": this.account,
|
|
838
|
+
"Prosopo-User": o
|
|
839
|
+
}
|
|
840
|
+
});
|
|
841
|
+
}
|
|
842
|
+
submitUserEvents(e, r) {
|
|
843
|
+
return this.post(w.SubmitUserEvents, { events: e, string: r }, {
|
|
844
|
+
headers: {
|
|
845
|
+
"Prosopo-Site-Key": this.account
|
|
846
|
+
}
|
|
847
|
+
});
|
|
848
|
+
}
|
|
849
|
+
getProviderStatus() {
|
|
850
|
+
return this.fetch(w.GetProviderStatus, {
|
|
851
|
+
headers: {
|
|
852
|
+
"Prosopo-Site-Key": this.account
|
|
853
|
+
}
|
|
854
|
+
});
|
|
855
|
+
}
|
|
856
|
+
getProviderDetails() {
|
|
857
|
+
return this.fetch(Pe.GetProviderDetails, {
|
|
858
|
+
headers: {
|
|
859
|
+
"Prosopo-Site-Key": this.account
|
|
860
|
+
}
|
|
861
|
+
});
|
|
862
|
+
}
|
|
863
|
+
submitPowCaptchaVerify(e, r, o, s) {
|
|
864
|
+
const n = {
|
|
865
|
+
[i.token]: e,
|
|
866
|
+
[i.dappSignature]: r,
|
|
867
|
+
[i.verifiedTimeout]: o
|
|
868
|
+
};
|
|
869
|
+
return this.post(w.VerifyPowCaptchaSolution, n, {
|
|
870
|
+
headers: {
|
|
871
|
+
"Prosopo-Site-Key": this.account,
|
|
872
|
+
"Prosopo-User": s
|
|
873
|
+
}
|
|
874
|
+
});
|
|
875
|
+
}
|
|
876
|
+
registerSiteKey(e, r, o, s, n) {
|
|
877
|
+
const a = { siteKey: e, tier: r, settings: o };
|
|
878
|
+
return this.post(F.SiteKeyRegister, a, {
|
|
879
|
+
headers: {
|
|
880
|
+
"Prosopo-Site-Key": this.account,
|
|
881
|
+
timestamp: s,
|
|
882
|
+
signature: n
|
|
883
|
+
}
|
|
884
|
+
});
|
|
885
|
+
}
|
|
886
|
+
updateDetectorKey(e, r, o) {
|
|
887
|
+
return this.post(F.UpdateDetectorKey, te.parse({ detectorKey: e }), {
|
|
888
|
+
headers: {
|
|
889
|
+
"Prosopo-Site-Key": this.account,
|
|
890
|
+
timestamp: r,
|
|
891
|
+
signature: o
|
|
892
|
+
}
|
|
893
|
+
});
|
|
894
|
+
}
|
|
895
|
+
removeDetectorKey(e, r, o) {
|
|
896
|
+
return this.post(F.RemoveDetectorKey, te.parse({ detectorKey: e }), {
|
|
897
|
+
headers: {
|
|
898
|
+
"Prosopo-Site-Key": this.account,
|
|
899
|
+
timestamp: r,
|
|
900
|
+
signature: o
|
|
901
|
+
}
|
|
902
|
+
});
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
const lt = v.lazy(async () => import("./ProcaptchaWidget-Dnwno-4N.js")), ve = (t) => g(v.Suspense, { children: g(lt, { config: t.config, callbacks: t.callbacks, frictionlessState: t.frictionlessState, i18n: t.i18n }) }), ut = v.lazy(async () => import("./ProcaptchaWidget-BlWWnPeB.js")), be = (t) => g(v.Suspense, { children: g(ut, { config: t.config, callbacks: t.callbacks, frictionlessState: t.frictionlessState }) }), pt = async () => (await import("./index-B8oMghZ3.js")).default, ft = async (t) => {
|
|
906
|
+
const r = await (await pt())(), s = await new (await Be(t.web2))().getAccount(t);
|
|
907
|
+
if (!t.account.address)
|
|
908
|
+
throw new W("GENERAL.SITE_KEY_MISSING");
|
|
909
|
+
const n = await We(t), c = await new ct(n.provider.url, t.account.address).getFrictionlessCaptcha(r.token, t.account.address, s.account.address);
|
|
910
|
+
return {
|
|
911
|
+
captchaType: c.captchaType,
|
|
912
|
+
sessionId: c.sessionId,
|
|
913
|
+
provider: n,
|
|
914
|
+
status: c.status,
|
|
915
|
+
userAccount: s,
|
|
916
|
+
error: c.error
|
|
917
|
+
};
|
|
918
|
+
}, ie = (t, e, r, o, s) => {
|
|
919
|
+
const n = t === "light" ? Ae : Ie;
|
|
920
|
+
return e === "invisible" ? null : b.jsx(at, { theme: n, onChange: async () => {
|
|
921
|
+
}, checked: !1, labelText: o("WIDGET.I_AM_HUMAN"), error: r, "aria-label": "human checkbox", loading: s });
|
|
922
|
+
}, ce = (t) => ({
|
|
923
|
+
loading: !1,
|
|
924
|
+
attemptCount: t || 0
|
|
925
|
+
}), ht = ({ config: t, callbacks: e, restart: r, i18n: o, detectBot: s = ft }) => {
|
|
926
|
+
const n = v.useRef(ce(0)), a = C(e);
|
|
927
|
+
v.useEffect(() => {
|
|
928
|
+
t.language && (o ? o.language !== t.language && o.changeLanguage(t.language).then((y) => y) : Te().then((y) => {
|
|
929
|
+
y.language !== t.language && y.changeLanguage(t.language).then((d) => d);
|
|
930
|
+
}));
|
|
931
|
+
}, [o, t.language]);
|
|
932
|
+
const [c, p] = v.useState(ie(t.theme, t.mode, n.current.errorMessage, o.t, !0)), S = (y) => {
|
|
933
|
+
n.current = ce(y || n.current.attemptCount);
|
|
934
|
+
}, P = (y, d) => {
|
|
935
|
+
d === "CAPTCHA.NO_SESSION_FOUND" && setTimeout(() => {
|
|
936
|
+
_();
|
|
937
|
+
}, 0), p(ie(t.theme, t.mode, y || "Cannot load CAPTCHA", o.t, !1));
|
|
938
|
+
}, _ = () => {
|
|
939
|
+
setTimeout(() => {
|
|
940
|
+
S(0), a.onReset(), r();
|
|
941
|
+
}, 1e4);
|
|
942
|
+
}, q = async () => {
|
|
943
|
+
await Ge(async () => {
|
|
944
|
+
var Y, Q, X, Z, ee;
|
|
945
|
+
n.current.attemptCount += 1;
|
|
946
|
+
const y = _e.parse(t), d = await s(y);
|
|
947
|
+
if ((Y = d.error) != null && Y.message) {
|
|
948
|
+
n.current = {
|
|
949
|
+
...n.current,
|
|
950
|
+
loading: !1,
|
|
951
|
+
errorMessage: (Q = d.error) == null ? void 0 : Q.message
|
|
952
|
+
}, a.onError(new Error((X = d.error) == null ? void 0 : X.message)), P((Z = d.error) == null ? void 0 : Z.message, (ee = d.error) == null ? void 0 : ee.key);
|
|
953
|
+
return;
|
|
954
|
+
}
|
|
955
|
+
const J = {
|
|
956
|
+
provider: d.provider,
|
|
957
|
+
sessionId: d.sessionId,
|
|
958
|
+
userAccount: d.userAccount,
|
|
959
|
+
restart: r
|
|
960
|
+
};
|
|
961
|
+
d.captchaType === "image" ? p(b.jsx(be, { config: t, callbacks: e, frictionlessState: J, i18n: o })) : (p(b.jsx(ve, { config: t, callbacks: e, frictionlessState: J, i18n: o })), n.current = {
|
|
962
|
+
...n.current,
|
|
963
|
+
loading: !1
|
|
964
|
+
});
|
|
965
|
+
}, q, S, n.current.attemptCount, 5).finally(() => {
|
|
966
|
+
n.current.attemptCount >= 5 && (P(), _());
|
|
967
|
+
});
|
|
968
|
+
};
|
|
969
|
+
return v.useEffect(() => {
|
|
970
|
+
(async () => {
|
|
971
|
+
await q();
|
|
972
|
+
})();
|
|
973
|
+
}, [t, e, s, t.language]), c;
|
|
974
|
+
}, dt = (t) => {
|
|
975
|
+
const { config: e, callbacks: r, i18n: o } = t, [s, n] = v.useState(0), a = () => {
|
|
976
|
+
n((c) => c + 1);
|
|
977
|
+
};
|
|
978
|
+
return b.jsx(ht, { config: e, callbacks: C(r), restart: a, i18n: o }, s);
|
|
979
|
+
}, gt = (t) => {
|
|
980
|
+
const { config: e, callbacks: r, i18n: o } = t;
|
|
981
|
+
return b.jsx(be, { config: e, callbacks: C(r), i18n: o });
|
|
982
|
+
}, mt = (t) => {
|
|
983
|
+
const { config: e, callbacks: r, i18n: o } = t;
|
|
984
|
+
return b.jsx(ve, { config: e, callbacks: C(r), i18n: o });
|
|
985
|
+
}, yt = {
|
|
986
|
+
[R.image]: gt,
|
|
987
|
+
[R.pow]: mt,
|
|
988
|
+
[R.frictionless]: dt
|
|
989
|
+
};
|
|
990
|
+
class vt {
|
|
991
|
+
getCaptchaComponent(e, r) {
|
|
992
|
+
const o = yt[e];
|
|
993
|
+
return "rendering ".concat(e), b.jsx(o, { config: r.config, callbacks: r.callbacks, i18n: r.i18n });
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
const $t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
997
|
+
__proto__: null,
|
|
998
|
+
CaptchaComponentProvider: vt
|
|
999
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1000
|
+
export {
|
|
1001
|
+
at as C,
|
|
1002
|
+
Be as E,
|
|
1003
|
+
Nt as P,
|
|
1004
|
+
tt as a,
|
|
1005
|
+
jt as b,
|
|
1006
|
+
W as c,
|
|
1007
|
+
We as d,
|
|
1008
|
+
ct as e,
|
|
1009
|
+
$t as f,
|
|
1010
|
+
C as g,
|
|
1011
|
+
g as j,
|
|
1012
|
+
Ge as p
|
|
1013
|
+
};
|