@prosopo/procaptcha-bundle 3.0.13 → 3.2.2
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 → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/index.d.ts.map +1 -1
- package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/index.js +10 -1
- package/.rollup.cache/home/chris/dev/prosopo/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/index.js.map +1 -0
- package/.rollup.cache/home/chris/dev/prosopo/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/tests/procaptchaReady.unit.test.d.ts +2 -0
- package/.rollup.cache/home/chris/dev/prosopo/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/tests/procaptchaReady.unit.test.d.ts.map +1 -0
- package/.rollup.cache/home/chris/dev/prosopo/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/tests/procaptchaReady.unit.test.js +32 -0
- package/.rollup.cache/home/chris/dev/prosopo/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/tests/procaptchaReady.unit.test.js.map +1 -0
- package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.js +19 -9
- package/.rollup.cache/home/chris/dev/prosopo/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.js.map +1 -0
- package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.d.ts.map +1 -1
- package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.js +1 -1
- package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.js.map +1 -1
- package/{dist → .rollup.cache/home/chris/dev/prosopo/captcha-private/captcha/packages/procaptcha-bundle/dist}/bundle/util/captcha/captchaProps.d.ts +1 -0
- package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.d.ts.map +1 -1
- package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.d.ts +1 -1
- package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.d.ts.map +1 -1
- package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js +2 -1
- package/.rollup.cache/home/chris/dev/prosopo/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js.map +1 -0
- package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.d.ts.map +1 -1
- package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.js +2 -2
- package/.rollup.cache/home/chris/dev/prosopo/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.js.map +1 -0
- package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.d.ts.map +1 -1
- package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.js +0 -1
- package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.js.map +1 -1
- package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.d.ts.map +1 -1
- package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.js +6 -2
- package/.rollup.cache/home/chris/dev/prosopo/captcha-private/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.js.map +1 -0
- package/CHANGELOG.md +440 -0
- package/coverage/base.css +224 -0
- package/coverage/block-navigation.js +87 -0
- package/coverage/clover.xml +599 -0
- package/coverage/coverage-final.json +17 -0
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +161 -0
- package/coverage/prettify.css +1 -0
- package/coverage/prettify.js +2 -0
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +210 -0
- package/coverage/src/components.ts.html +139 -0
- package/coverage/src/index.html +131 -0
- package/coverage/src/index.ts.html +844 -0
- package/coverage/src/util/captcha/captchaComponentProvider.tsx.html +214 -0
- package/coverage/src/util/captcha/captchaComponentsList.ts.html +178 -0
- package/coverage/src/util/captcha/captchaProps.ts.html +166 -0
- package/coverage/src/util/captcha/captchaRenderer.tsx.html +481 -0
- package/coverage/src/util/captcha/captchaType.ts.html +181 -0
- package/coverage/src/util/captcha/components/frictionlessCaptcha.tsx.html +205 -0
- package/coverage/src/util/captcha/components/imageCaptcha.tsx.html +178 -0
- package/coverage/src/util/captcha/components/index.html +146 -0
- package/coverage/src/util/captcha/components/powCaptcha.tsx.html +178 -0
- package/coverage/src/util/captcha/index.html +176 -0
- package/coverage/src/util/config.ts.html +172 -0
- package/coverage/src/util/configCreator.ts.html +241 -0
- package/coverage/src/util/index.html +191 -0
- package/coverage/src/util/language.ts.html +244 -0
- package/coverage/src/util/timeout.ts.html +214 -0
- package/coverage/src/util/widgetFactory.ts.html +532 -0
- package/coverage/src/util/widgetThemeResolver.ts.html +205 -0
- package/dist/bundle/{ProcaptchaWidget-CXxnCzl2.js → ProcaptchaWidget-CuMH13Bh.js} +340 -320
- package/dist/bundle/{ProcaptchaWidget-BIt2pcrz.js → ProcaptchaWidget-DsflBBn_.js} +25 -25
- package/dist/bundle/{browser-ponyfill-CvzSbL_o.js → browser-ponyfill-DXriyH6D.js} +4 -4
- package/dist/bundle/{builder-DNHtDoNG.js → builder-ByZ5z580.js} +3 -1
- package/dist/bundle/captchaComponentProvider-D02Su4nd.js +1013 -0
- package/dist/bundle/captchaRenderer-BV-WgbEA.js +70 -0
- package/dist/bundle/{commonChunk-BKceWhtS.js → commonChunk-PB26mndo.js} +66 -69
- package/dist/bundle/{emotion-element-5486c51c.browser.esm-CimrRZxS.js → emotion-element-c39617d8.browser.esm-DG1XhEZ1.js} +343 -345
- package/dist/bundle/{index-KHTbPva_.js → index-B9KeZfID.js} +3 -3
- package/dist/bundle/{index-hrOz2CPm.js → index-Calnfnac.js} +97 -87
- package/dist/bundle/index-DU371vQ0.js +1634 -0
- package/dist/bundle/index.d.ts.map +1 -1
- package/dist/bundle/nobleChunk-Bbltwf44.js +2728 -0
- package/dist/bundle/procaptcha.bundle.js +2 -2
- package/dist/bundle/tests/procaptchaReady.unit.test.d.ts.map +1 -0
- package/dist/bundle/util/captcha/captchaComponentProvider.d.ts.map +1 -1
- package/dist/bundle/util/captcha/captchaProps.d.ts.map +1 -1
- package/dist/bundle/util/captcha/captchaRenderer.d.ts.map +1 -1
- package/dist/bundle/util/captcha/components/frictionlessCaptcha.d.ts.map +1 -1
- package/dist/bundle/util/configCreator.d.ts.map +1 -1
- package/dist/bundle/util/widgetFactory.d.ts.map +1 -1
- package/dist/bundle/{utilChunk-DPr6oTOj.js → utilChunk-WRTGKXbU.js} +109 -102
- package/dist/bundle/{utilCryptoChunk-BKe3CKqn.js → utilCryptoChunk-B4ZdOwus.js} +252 -243
- package/dist/bundle/{web2Chunk-Cqw91v-J.js → web2Chunk-BGN6Hv-C.js} +1097 -1002
- package/dist/bundle/web3Chunk-BIX2T9Eo.js +525 -0
- package/dist/bundle/{zodChunk-wTu9ZHzV.js → zodChunk-CaINhWMQ.js} +10 -10
- package/dist/cjs/index.cjs +10 -1
- package/dist/cjs/util/captcha/captchaComponentProvider.cjs +3 -2
- package/dist/cjs/util/captcha/captchaRenderer.cjs +4 -3
- package/dist/cjs/util/captcha/components/frictionlessCaptcha.cjs +4 -3
- package/dist/cjs/util/captcha/components/imageCaptcha.cjs +1 -1
- package/dist/cjs/util/captcha/components/powCaptcha.cjs +1 -1
- package/dist/cjs/util/configCreator.cjs +0 -1
- package/dist/cjs/util/widgetFactory.cjs +7 -2
- package/dist/components.d.ts.map +1 -0
- package/dist/components.js +5 -0
- package/dist/components.js.map +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -0
- package/dist/tests/procaptchaReady.unit.test.d.ts +2 -0
- package/dist/tests/procaptchaReady.unit.test.d.ts.map +1 -0
- package/dist/tests/procaptchaReady.unit.test.js +32 -0
- package/dist/tests/procaptchaReady.unit.test.js.map +1 -0
- package/dist/tests/util/captchaType.test.d.ts.map +1 -0
- package/dist/tests/util/captchaType.test.js +36 -0
- package/dist/tests/util/captchaType.test.js.map +1 -0
- package/dist/tests/util/config.test.d.ts.map +1 -0
- package/dist/tests/util/config.test.js +69 -0
- package/dist/tests/util/config.test.js.map +1 -0
- package/dist/tests/util/renderLogic.test.d.ts.map +1 -0
- package/dist/tests/util/renderLogic.test.js +136 -0
- package/dist/tests/util/renderLogic.test.js.map +1 -0
- package/dist/util/captcha/captchaComponentProvider.d.ts.map +1 -0
- package/dist/util/captcha/captchaComponentProvider.js +3 -2
- package/dist/util/captcha/captchaComponentProvider.js.map +1 -0
- package/dist/util/captcha/captchaComponentsList.d.ts.map +1 -0
- package/dist/util/captcha/captchaComponentsList.js.map +1 -0
- package/{.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle → dist}/util/captcha/captchaProps.d.ts +1 -0
- 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/{bundle/util → util}/captcha/captchaRenderer.d.ts +1 -1
- package/dist/util/captcha/captchaRenderer.d.ts.map +1 -0
- package/dist/util/captcha/captchaRenderer.js +4 -3
- 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/captcha/components/frictionlessCaptcha.d.ts.map +1 -0
- package/dist/util/captcha/components/frictionlessCaptcha.js +4 -3
- package/dist/util/captcha/components/frictionlessCaptcha.js.map +1 -0
- package/dist/util/captcha/components/imageCaptcha.d.ts.map +1 -0
- package/dist/util/captcha/components/imageCaptcha.js +1 -1
- package/dist/util/captcha/components/imageCaptcha.js.map +1 -0
- package/dist/util/captcha/components/powCaptcha.d.ts.map +1 -0
- package/dist/util/captcha/components/powCaptcha.js +1 -1
- package/dist/util/captcha/components/powCaptcha.js.map +1 -0
- package/dist/util/config.d.ts.map +1 -0
- package/dist/util/config.js.map +1 -0
- package/dist/util/configCreator.d.ts.map +1 -0
- package/dist/util/configCreator.js +0 -1
- package/dist/util/configCreator.js.map +1 -0
- package/dist/util/language.d.ts.map +1 -0
- package/dist/util/language.js.map +1 -0
- package/dist/util/timeout.d.ts.map +1 -0
- package/dist/util/timeout.js.map +1 -0
- package/dist/util/widgetFactory.d.ts.map +1 -0
- package/dist/util/widgetFactory.js +7 -2
- package/dist/util/widgetFactory.js.map +1 -0
- package/dist/util/widgetThemeResolver.d.ts.map +1 -0
- package/dist/util/widgetThemeResolver.js.map +1 -0
- package/package.json +24 -25
- package/stats.html +2239 -2132
- package/vite.test.config.ts +3 -2
- package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/index.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.js.map +0 -1
- package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.js.map +0 -1
- package/dist/bundle/captchaComponentProvider-BGEAkC9Y.js +0 -968
- package/dist/bundle/captchaRenderer-CqnUYyKY.js +0 -70
- package/dist/bundle/index-7Xh-Mf8v.js +0 -1318
- package/dist/bundle/nobleChunk-CQ4ENyKh.js +0 -3769
- package/dist/bundle/web3Chunk-BcwDKvjL.js +0 -517
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/components.d.ts +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/components.d.ts.map +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/components.js +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/components.js.map +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/index.d.ts +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.d.ts +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.d.ts.map +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.js +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/captchaType.test.js.map +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/config.test.d.ts +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/config.test.d.ts.map +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/config.test.js +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/config.test.js.map +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.d.ts +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/tests/util/renderLogic.test.d.ts.map +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.d.ts +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.d.ts +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.d.ts.map +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.js +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.js.map +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.js +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaProps.js.map +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.d.ts +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.d.ts.map +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.js +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaType.js.map +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/frictionlessCaptcha.d.ts +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.d.ts +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.d.ts.map +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.js +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/imageCaptcha.js.map +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.d.ts +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.d.ts.map +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.js +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/components/powCaptcha.js.map +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/config.d.ts +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/config.d.ts.map +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/config.js +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/config.js.map +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.d.ts +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/language.d.ts +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/language.d.ts.map +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/language.js +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/language.js.map +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/timeout.d.ts +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/timeout.d.ts.map +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/timeout.js +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/timeout.js.map +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetFactory.d.ts +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.d.ts +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.d.ts.map +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.js +0 -0
- /package/.rollup.cache/home/{runner/work/captcha → chris/dev/prosopo/captcha-private}/captcha/packages/procaptcha-bundle/dist/bundle/util/widgetThemeResolver.js.map +0 -0
- /package/dist/{bundle/components.d.ts → components.d.ts} +0 -0
- /package/dist/{bundle/index.d.ts → index.d.ts} +0 -0
- /package/dist/{bundle/tests → tests}/util/captchaType.test.d.ts +0 -0
- /package/dist/{bundle/tests → tests}/util/config.test.d.ts +0 -0
- /package/dist/{bundle/tests → tests}/util/renderLogic.test.d.ts +0 -0
- /package/dist/{bundle/util → util}/captcha/captchaComponentProvider.d.ts +0 -0
- /package/dist/{bundle/util → util}/captcha/captchaComponentsList.d.ts +0 -0
- /package/dist/{bundle/util → util}/captcha/captchaType.d.ts +0 -0
- /package/dist/{bundle/util → util}/captcha/components/frictionlessCaptcha.d.ts +0 -0
- /package/dist/{bundle/util → util}/captcha/components/imageCaptcha.d.ts +0 -0
- /package/dist/{bundle/util → util}/captcha/components/powCaptcha.d.ts +0 -0
- /package/dist/{bundle/util → util}/config.d.ts +0 -0
- /package/dist/{bundle/util → util}/configCreator.d.ts +0 -0
- /package/dist/{bundle/util → util}/language.d.ts +0 -0
- /package/dist/{bundle/util → util}/timeout.d.ts +0 -0
- /package/dist/{bundle/util → util}/widgetFactory.d.ts +0 -0
- /package/dist/{bundle/util → util}/widgetThemeResolver.d.ts +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { r as
|
|
3
|
-
import { b as _,
|
|
4
|
-
import { b as
|
|
5
|
-
import { u as
|
|
6
|
-
import { w as
|
|
7
|
-
import { l as M, d as D } from "./index-
|
|
8
|
-
import { r as
|
|
9
|
-
const
|
|
1
|
+
import { j as d, a as P, g as ie, p as z, b as ce, P as le, E as de, c as ue, C as he } from "./captchaComponentProvider-D02Su4nd.js";
|
|
2
|
+
import { r as C, u as Z, a as v, A, g as pe, h as ge, i as fe, s as me, P as Q, j as xe, l as Ce } from "./web2Chunk-BGN6Hv-C.js";
|
|
3
|
+
import { b as _, P as T, a as H } from "./commonChunk-PB26mndo.js";
|
|
4
|
+
import { b as we, u as be } from "./builder-ByZ5z580.js";
|
|
5
|
+
import { u as U, v as ye } from "./utilCryptoChunk-B4ZdOwus.js";
|
|
6
|
+
import { w as Ae } from "./utilChunk-WRTGKXbU.js";
|
|
7
|
+
import { l as M, d as D } from "./index-Calnfnac.js";
|
|
8
|
+
import { r as ve } from "./index-B9KeZfID.js";
|
|
9
|
+
const Ee = {
|
|
10
10
|
border: "none",
|
|
11
11
|
paddingTop: "6px",
|
|
12
12
|
paddingBottom: "6px",
|
|
@@ -15,29 +15,29 @@ const Ce = {
|
|
|
15
15
|
width: "39px",
|
|
16
16
|
borderRadius: "50%",
|
|
17
17
|
display: "flex"
|
|
18
|
-
},
|
|
18
|
+
}, Te = ({
|
|
19
19
|
themeColor: r,
|
|
20
20
|
onReload: e
|
|
21
21
|
}) => {
|
|
22
|
-
const
|
|
22
|
+
const n = C.useMemo(
|
|
23
23
|
() => r === "light" ? M : D,
|
|
24
24
|
[r]
|
|
25
|
-
), [
|
|
25
|
+
), [o, t] = C.useState(!1), i = C.useMemo(() => ({
|
|
26
26
|
...{
|
|
27
|
-
...
|
|
28
|
-
backgroundColor:
|
|
29
|
-
color:
|
|
30
|
-
border: `1px solid ${
|
|
27
|
+
...Ee,
|
|
28
|
+
backgroundColor: n.palette.background.default,
|
|
29
|
+
color: o ? n.palette.primary.contrastText : n.palette.background.contrastText,
|
|
30
|
+
border: `1px solid ${n.palette.grey[500]}`,
|
|
31
31
|
borderRadius: "50%",
|
|
32
32
|
transition: "background-color 0.3s",
|
|
33
|
-
boxShadow: `0px 1px 3px 0px ${
|
|
33
|
+
boxShadow: `0px 1px 3px 0px ${n.palette.grey[500]}`,
|
|
34
34
|
justifyContent: "center",
|
|
35
35
|
alignItems: "center",
|
|
36
36
|
margin: "0 auto"
|
|
37
37
|
},
|
|
38
|
-
backgroundColor:
|
|
39
|
-
}), [
|
|
40
|
-
return /* @__PURE__ */
|
|
38
|
+
backgroundColor: o ? n.palette.grey[700] : n.palette.background.default
|
|
39
|
+
}), [o, n]);
|
|
40
|
+
return /* @__PURE__ */ d(
|
|
41
41
|
"button",
|
|
42
42
|
{
|
|
43
43
|
className: "reload-button",
|
|
@@ -49,7 +49,7 @@ const Ce = {
|
|
|
49
49
|
onClick: (a) => {
|
|
50
50
|
a.preventDefault(), e();
|
|
51
51
|
},
|
|
52
|
-
children: /* @__PURE__ */
|
|
52
|
+
children: /* @__PURE__ */ P(
|
|
53
53
|
"svg",
|
|
54
54
|
{
|
|
55
55
|
width: "16px",
|
|
@@ -60,12 +60,12 @@ const Ce = {
|
|
|
60
60
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
61
61
|
style: { display: "flex" },
|
|
62
62
|
children: [
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ d("title", { children: "reload" }),
|
|
64
|
+
/* @__PURE__ */ d(
|
|
65
65
|
"path",
|
|
66
66
|
{
|
|
67
67
|
shapeRendering: "optimizeQuality",
|
|
68
|
-
fill:
|
|
68
|
+
fill: o ? n.palette.primary.contrastText : n.palette.grey[700],
|
|
69
69
|
transform: "scale(0.0416)",
|
|
70
70
|
d: "M234.666667,149.333333 L234.666667,106.666667 L314.564847,106.664112 C287.579138,67.9778918 242.745446,42.6666667 192,42.6666667 C109.525477,42.6666667 42.6666667,109.525477 42.6666667,192 C42.6666667,274.474523 109.525477,341.333333 192,341.333333 C268.201293,341.333333 331.072074,284.258623 340.195444,210.526102 L382.537159,215.817985 C370.807686,310.617565 289.973536,384 192,384 C85.961328,384 1.42108547e-14,298.038672 1.42108547e-14,192 C1.42108547e-14,85.961328 85.961328,1.42108547e-14 192,1.42108547e-14 C252.316171,1.42108547e-14 306.136355,27.8126321 341.335366,71.3127128 L341.333333,1.42108547e-14 L384,1.42108547e-14 L384,149.333333 L234.666667,149.333333 Z"
|
|
71
71
|
}
|
|
@@ -75,23 +75,23 @@ const Ce = {
|
|
|
75
75
|
)
|
|
76
76
|
}
|
|
77
77
|
);
|
|
78
|
-
},
|
|
78
|
+
}, Ie = (r) => {
|
|
79
79
|
if (!r.hash)
|
|
80
80
|
throw new _("CAPTCHA.MISSING_ITEM_HASH", {
|
|
81
81
|
context: { item: r }
|
|
82
82
|
});
|
|
83
83
|
return r.hash;
|
|
84
|
-
},
|
|
84
|
+
}, Ne = ({
|
|
85
85
|
challenge: r,
|
|
86
86
|
solution: e,
|
|
87
|
-
onClick:
|
|
88
|
-
themeColor:
|
|
87
|
+
onClick: n,
|
|
88
|
+
themeColor: o
|
|
89
89
|
}) => {
|
|
90
|
-
const t = r.items, i =
|
|
91
|
-
() =>
|
|
92
|
-
[
|
|
90
|
+
const t = r.items, i = C.useMemo(
|
|
91
|
+
() => o === "light" ? M : D,
|
|
92
|
+
[o]
|
|
93
93
|
), a = `${i.spacing.unit}px`;
|
|
94
|
-
return /* @__PURE__ */
|
|
94
|
+
return /* @__PURE__ */ d(
|
|
95
95
|
"div",
|
|
96
96
|
{
|
|
97
97
|
style: {
|
|
@@ -107,16 +107,16 @@ const Ce = {
|
|
|
107
107
|
paddingTop: a,
|
|
108
108
|
gap: "10px"
|
|
109
109
|
},
|
|
110
|
-
children: t.map((s,
|
|
111
|
-
const
|
|
112
|
-
return /* @__PURE__ */
|
|
110
|
+
children: t.map((s, l) => {
|
|
111
|
+
const h = Ie(s);
|
|
112
|
+
return /* @__PURE__ */ d("div", { style: {
|
|
113
113
|
// enable the items in the grid to grow in width to use up excess space
|
|
114
114
|
flexGrow: 1,
|
|
115
115
|
// make the width of each item 1/3rd of the width overall, i.e. 3 columns
|
|
116
116
|
flexBasis: "calc(33.333% - 10px)",
|
|
117
117
|
// include the padding / margin / border in the width
|
|
118
118
|
boxSizing: "border-box"
|
|
119
|
-
}, children: /* @__PURE__ */
|
|
119
|
+
}, children: /* @__PURE__ */ P(
|
|
120
120
|
"div",
|
|
121
121
|
{
|
|
122
122
|
style: {
|
|
@@ -127,9 +127,21 @@ const Ce = {
|
|
|
127
127
|
padding: 0,
|
|
128
128
|
margin: 0
|
|
129
129
|
},
|
|
130
|
-
onClick: () =>
|
|
130
|
+
onClick: (u) => {
|
|
131
|
+
if (u.isTrusted) {
|
|
132
|
+
if ("touches" in u && u.touches.length > 0 && u.touches[0]) {
|
|
133
|
+
n(h, u.touches[0].clientX, u.touches[0].clientY);
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
if ("clientX" in u && "clientY" in u) {
|
|
137
|
+
n(h, u.clientX, u.clientY);
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
n(h, 0, 0);
|
|
141
|
+
}
|
|
142
|
+
},
|
|
131
143
|
children: [
|
|
132
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ d(
|
|
133
145
|
"img",
|
|
134
146
|
{
|
|
135
147
|
style: {
|
|
@@ -149,10 +161,14 @@ const Ce = {
|
|
|
149
161
|
borderColor: i.palette.grey[300]
|
|
150
162
|
},
|
|
151
163
|
src: s.data,
|
|
152
|
-
alt: `Captcha image ${
|
|
164
|
+
alt: `Captcha image ${l + 1}`,
|
|
165
|
+
onError: (u) => {
|
|
166
|
+
const f = u.currentTarget;
|
|
167
|
+
f._retryCount = (f._retryCount || 0) + 1, f._retryCount <= 3 && (f.src = `${s.data}?retry=${Date.now()}`);
|
|
168
|
+
}
|
|
153
169
|
}
|
|
154
170
|
),
|
|
155
|
-
/* @__PURE__ */
|
|
171
|
+
/* @__PURE__ */ d(
|
|
156
172
|
"div",
|
|
157
173
|
{
|
|
158
174
|
style: {
|
|
@@ -169,9 +185,9 @@ const Ce = {
|
|
|
169
185
|
justifyContent: "center",
|
|
170
186
|
// make bg half opacity, i.e. shadowing the item's img
|
|
171
187
|
backgroundColor: "rgba(0,0,0,0.5)",
|
|
172
|
-
visibility: e.
|
|
188
|
+
visibility: e.some((u) => u[0] === h) ? "visible" : "hidden"
|
|
173
189
|
},
|
|
174
|
-
children: /* @__PURE__ */
|
|
190
|
+
children: /* @__PURE__ */ d(
|
|
175
191
|
"svg",
|
|
176
192
|
{
|
|
177
193
|
style: {
|
|
@@ -191,7 +207,7 @@ const Ce = {
|
|
|
191
207
|
viewBox: "0 0 24 24",
|
|
192
208
|
"data-testid": "CheckIcon",
|
|
193
209
|
"aria-label": "Check icon",
|
|
194
|
-
children: /* @__PURE__ */
|
|
210
|
+
children: /* @__PURE__ */ d("path", { d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" })
|
|
195
211
|
}
|
|
196
212
|
)
|
|
197
213
|
}
|
|
@@ -203,22 +219,22 @@ const Ce = {
|
|
|
203
219
|
}
|
|
204
220
|
);
|
|
205
221
|
};
|
|
206
|
-
function
|
|
222
|
+
function He(r = {}) {
|
|
207
223
|
return Object.keys(r).reduce(
|
|
208
224
|
// biome-ignore lint/performance/noAccumulatingSpread: TODO fix
|
|
209
|
-
(e,
|
|
225
|
+
(e, n) => ({ ...e, [`data-${n}`]: r[n] }),
|
|
210
226
|
{}
|
|
211
227
|
);
|
|
212
228
|
}
|
|
213
|
-
function
|
|
229
|
+
function J({
|
|
214
230
|
general: r,
|
|
215
231
|
dev: e
|
|
216
232
|
}) {
|
|
217
233
|
return {
|
|
218
|
-
...
|
|
234
|
+
...He(r)
|
|
219
235
|
};
|
|
220
236
|
}
|
|
221
|
-
const
|
|
237
|
+
const Pe = {
|
|
222
238
|
display: "inline-flex",
|
|
223
239
|
alignItems: "center",
|
|
224
240
|
justifyContent: "center",
|
|
@@ -241,18 +257,18 @@ const ve = {
|
|
|
241
257
|
borderRadius: "4px",
|
|
242
258
|
transition: "background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
|
|
243
259
|
backgroundColor: "#ffffff"
|
|
244
|
-
},
|
|
260
|
+
}, F = ({
|
|
245
261
|
themeColor: r,
|
|
246
262
|
buttonType: e,
|
|
247
|
-
text:
|
|
248
|
-
onClick:
|
|
263
|
+
text: n,
|
|
264
|
+
onClick: o
|
|
249
265
|
}) => {
|
|
250
|
-
const t =
|
|
266
|
+
const t = C.useMemo(
|
|
251
267
|
() => r === "light" ? M : D,
|
|
252
268
|
[r]
|
|
253
|
-
), [i, a] =
|
|
254
|
-
const
|
|
255
|
-
...
|
|
269
|
+
), [i, a] = C.useState(!1), s = C.useMemo(() => {
|
|
270
|
+
const l = {
|
|
271
|
+
...Pe,
|
|
256
272
|
border: `1px solid ${t.palette.grey[500]}`,
|
|
257
273
|
boxShadow: `0px 1px 3px 0px ${t.palette.grey[500]}`,
|
|
258
274
|
fontFamily: t.font.fontFamily,
|
|
@@ -260,43 +276,43 @@ const ve = {
|
|
|
260
276
|
color: i ? t.palette.primary.contrastText : t.palette.background.contrastText
|
|
261
277
|
};
|
|
262
278
|
return e === "cancel" ? {
|
|
263
|
-
...
|
|
279
|
+
...l,
|
|
264
280
|
backgroundColor: i ? t.palette.grey[600] : "transparent"
|
|
265
281
|
} : {
|
|
266
|
-
...
|
|
282
|
+
...l,
|
|
267
283
|
backgroundColor: i ? t.palette.primary.main : t.palette.background.default
|
|
268
284
|
};
|
|
269
285
|
}, [e, i, t]);
|
|
270
|
-
return /* @__PURE__ */
|
|
286
|
+
return /* @__PURE__ */ d(
|
|
271
287
|
"button",
|
|
272
288
|
{
|
|
273
|
-
...
|
|
289
|
+
...J({ dev: {} }),
|
|
274
290
|
onMouseEnter: () => a(!0),
|
|
275
291
|
onMouseLeave: () => a(!1),
|
|
276
292
|
style: s,
|
|
277
|
-
onClick: (
|
|
278
|
-
|
|
293
|
+
onClick: (l) => {
|
|
294
|
+
l.isTrusted && (l.preventDefault(), o());
|
|
279
295
|
},
|
|
280
|
-
"aria-label":
|
|
281
|
-
children:
|
|
296
|
+
"aria-label": n,
|
|
297
|
+
children: n
|
|
282
298
|
}
|
|
283
299
|
);
|
|
284
|
-
},
|
|
300
|
+
}, K = ({
|
|
285
301
|
challenge: r,
|
|
286
302
|
index: e,
|
|
287
|
-
solutions:
|
|
288
|
-
onSubmit:
|
|
303
|
+
solutions: n,
|
|
304
|
+
onSubmit: o,
|
|
289
305
|
onCancel: t,
|
|
290
306
|
onClick: i,
|
|
291
307
|
onNext: a,
|
|
292
308
|
onReload: s,
|
|
293
|
-
themeColor:
|
|
309
|
+
themeColor: l
|
|
294
310
|
}) => {
|
|
295
|
-
const { t:
|
|
296
|
-
() =>
|
|
297
|
-
[
|
|
298
|
-
),
|
|
299
|
-
return /* @__PURE__ */
|
|
311
|
+
const { t: h } = Z(), b = r.captchas ? v(r.captchas, e) : null, u = n ? v(n, e) : [], f = C.useMemo(
|
|
312
|
+
() => l === "light" ? M : D,
|
|
313
|
+
[l]
|
|
314
|
+
), R = `${f.spacing.unit * 2}px`, g = `${f.spacing.unit}px`;
|
|
315
|
+
return /* @__PURE__ */ d(C.Suspense, { fallback: /* @__PURE__ */ d("div", { children: "Loading..." }), children: /* @__PURE__ */ d(
|
|
300
316
|
"div",
|
|
301
317
|
{
|
|
302
318
|
style: {
|
|
@@ -310,16 +326,16 @@ const ve = {
|
|
|
310
326
|
border: "1px solid #dddddd",
|
|
311
327
|
boxShadow: "rgba(255, 255, 255, 0.2) 0px 0px 4px",
|
|
312
328
|
borderRadius: "4px",
|
|
313
|
-
backgroundColor:
|
|
329
|
+
backgroundColor: f.palette.background.default,
|
|
314
330
|
userSelect: "none",
|
|
315
331
|
touchAction: "none",
|
|
316
332
|
overscrollBehavior: "none"
|
|
317
333
|
},
|
|
318
|
-
children: /* @__PURE__ */
|
|
334
|
+
children: /* @__PURE__ */ P(
|
|
319
335
|
"div",
|
|
320
336
|
{
|
|
321
337
|
style: {
|
|
322
|
-
backgroundColor:
|
|
338
|
+
backgroundColor: f.palette.background.default,
|
|
323
339
|
display: "flex",
|
|
324
340
|
flexDirection: "column",
|
|
325
341
|
minWidth: "300px",
|
|
@@ -328,7 +344,7 @@ const ve = {
|
|
|
328
344
|
justifyContent: "center"
|
|
329
345
|
},
|
|
330
346
|
children: [
|
|
331
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ d(
|
|
332
348
|
"div",
|
|
333
349
|
{
|
|
334
350
|
style: {
|
|
@@ -336,23 +352,23 @@ const ve = {
|
|
|
336
352
|
alignItems: "center",
|
|
337
353
|
width: "100%"
|
|
338
354
|
},
|
|
339
|
-
children: /* @__PURE__ */
|
|
355
|
+
children: /* @__PURE__ */ d(
|
|
340
356
|
"div",
|
|
341
357
|
{
|
|
342
358
|
style: {
|
|
343
|
-
backgroundColor:
|
|
359
|
+
backgroundColor: f.palette.primary.main,
|
|
344
360
|
width: "100%",
|
|
345
361
|
marginTop: g
|
|
346
362
|
},
|
|
347
|
-
children: /* @__PURE__ */
|
|
363
|
+
children: /* @__PURE__ */ P(
|
|
348
364
|
"div",
|
|
349
365
|
{
|
|
350
366
|
style: {
|
|
351
|
-
padding: `${
|
|
352
|
-
fontFamily:
|
|
367
|
+
padding: `${f.spacing.half}px`,
|
|
368
|
+
fontFamily: f.font.fontFamily
|
|
353
369
|
},
|
|
354
370
|
children: [
|
|
355
|
-
/* @__PURE__ */
|
|
371
|
+
/* @__PURE__ */ P(
|
|
356
372
|
"p",
|
|
357
373
|
{
|
|
358
374
|
style: {
|
|
@@ -361,14 +377,14 @@ const ve = {
|
|
|
361
377
|
lineHeight: 1.5
|
|
362
378
|
},
|
|
363
379
|
children: [
|
|
364
|
-
|
|
380
|
+
h("WIDGET.SELECT_ALL"),
|
|
365
381
|
":",
|
|
366
382
|
" ",
|
|
367
|
-
/* @__PURE__ */
|
|
383
|
+
/* @__PURE__ */ d("span", { children: `${v(r.captchas, e).target} ` })
|
|
368
384
|
]
|
|
369
385
|
}
|
|
370
386
|
),
|
|
371
|
-
/* @__PURE__ */
|
|
387
|
+
/* @__PURE__ */ d(
|
|
372
388
|
"p",
|
|
373
389
|
{
|
|
374
390
|
style: {
|
|
@@ -377,7 +393,7 @@ const ve = {
|
|
|
377
393
|
lineHeight: 0.8,
|
|
378
394
|
fontSize: "0.8rem"
|
|
379
395
|
},
|
|
380
|
-
children:
|
|
396
|
+
children: h("WIDGET.IF_NONE_CLICK_NEXT")
|
|
381
397
|
}
|
|
382
398
|
)
|
|
383
399
|
]
|
|
@@ -387,23 +403,23 @@ const ve = {
|
|
|
387
403
|
)
|
|
388
404
|
}
|
|
389
405
|
),
|
|
390
|
-
/* @__PURE__ */
|
|
406
|
+
/* @__PURE__ */ d(
|
|
391
407
|
"div",
|
|
392
408
|
{
|
|
393
|
-
...
|
|
409
|
+
...J({ dev: {} }),
|
|
394
410
|
style: { overflow: "hidden" },
|
|
395
|
-
children:
|
|
396
|
-
|
|
411
|
+
children: b && /* @__PURE__ */ d(
|
|
412
|
+
Ne,
|
|
397
413
|
{
|
|
398
|
-
challenge:
|
|
399
|
-
solution:
|
|
414
|
+
challenge: b,
|
|
415
|
+
solution: u,
|
|
400
416
|
onClick: i,
|
|
401
|
-
themeColor:
|
|
417
|
+
themeColor: l
|
|
402
418
|
}
|
|
403
419
|
)
|
|
404
420
|
}
|
|
405
421
|
),
|
|
406
|
-
/* @__PURE__ */
|
|
422
|
+
/* @__PURE__ */ d(
|
|
407
423
|
"div",
|
|
408
424
|
{
|
|
409
425
|
style: {
|
|
@@ -411,24 +427,23 @@ const ve = {
|
|
|
411
427
|
alignItems: "center",
|
|
412
428
|
justifyContent: "space-between",
|
|
413
429
|
lineHeight: 1.75,
|
|
414
|
-
padding: `${g} 0 ${
|
|
430
|
+
padding: `${g} 0 ${R} 0`
|
|
415
431
|
},
|
|
416
|
-
children: /* @__PURE__ */
|
|
432
|
+
children: /* @__PURE__ */ P(
|
|
417
433
|
"div",
|
|
418
434
|
{
|
|
419
435
|
style: {
|
|
420
436
|
// expand to full height / width of parent
|
|
421
437
|
width: "100%",
|
|
422
438
|
height: "100%",
|
|
423
|
-
// display children in flex, spreading them evenly
|
|
439
|
+
// display children in flex, spreading them evenly
|
|
424
440
|
display: "flex",
|
|
425
441
|
flexDirection: "row",
|
|
426
|
-
flexWrap: "wrap",
|
|
427
442
|
justifyContent: "space-between",
|
|
428
443
|
gap: "10px"
|
|
429
444
|
},
|
|
430
445
|
children: [
|
|
431
|
-
/* @__PURE__ */
|
|
446
|
+
/* @__PURE__ */ d(
|
|
432
447
|
"div",
|
|
433
448
|
{
|
|
434
449
|
style: {
|
|
@@ -437,19 +452,19 @@ const ve = {
|
|
|
437
452
|
// make the width of each item 1/3rd of the width overall, i.e. 3 columns
|
|
438
453
|
flexBasis: "calc(33.333% - 10px)"
|
|
439
454
|
},
|
|
440
|
-
children: /* @__PURE__ */
|
|
441
|
-
|
|
455
|
+
children: /* @__PURE__ */ d(
|
|
456
|
+
F,
|
|
442
457
|
{
|
|
443
|
-
themeColor:
|
|
458
|
+
themeColor: l,
|
|
444
459
|
buttonType: "cancel",
|
|
445
460
|
onClick: t,
|
|
446
|
-
text:
|
|
447
|
-
"aria-label":
|
|
461
|
+
text: h("WIDGET.CANCEL"),
|
|
462
|
+
"aria-label": h("WIDGET.CANCEL")
|
|
448
463
|
}
|
|
449
464
|
)
|
|
450
465
|
}
|
|
451
466
|
),
|
|
452
|
-
/* @__PURE__ */
|
|
467
|
+
/* @__PURE__ */ d(
|
|
453
468
|
"div",
|
|
454
469
|
{
|
|
455
470
|
style: {
|
|
@@ -458,10 +473,10 @@ const ve = {
|
|
|
458
473
|
// make the width of each item 1/3rd of the width overall, i.e. 3 columns
|
|
459
474
|
flexBasis: "calc(33.333% - 10px)"
|
|
460
475
|
},
|
|
461
|
-
children: /* @__PURE__ */
|
|
476
|
+
children: /* @__PURE__ */ d(Te, { themeColor: l, onReload: s })
|
|
462
477
|
}
|
|
463
478
|
),
|
|
464
|
-
/* @__PURE__ */
|
|
479
|
+
/* @__PURE__ */ d(
|
|
465
480
|
"div",
|
|
466
481
|
{
|
|
467
482
|
style: {
|
|
@@ -470,14 +485,14 @@ const ve = {
|
|
|
470
485
|
// make the width of each item 1/3rd of the width overall, i.e. 3 columns
|
|
471
486
|
flexBasis: "calc(33.333% - 10px)"
|
|
472
487
|
},
|
|
473
|
-
children: /* @__PURE__ */
|
|
474
|
-
|
|
488
|
+
children: /* @__PURE__ */ d(
|
|
489
|
+
F,
|
|
475
490
|
{
|
|
476
|
-
themeColor:
|
|
491
|
+
themeColor: l,
|
|
477
492
|
buttonType: "next",
|
|
478
|
-
text: e < r.captchas.length - 1 ?
|
|
479
|
-
onClick: e < r.captchas.length - 1 ? a :
|
|
480
|
-
"aria-label": e < r.captchas.length - 1 ?
|
|
493
|
+
text: e < r.captchas.length - 1 ? h("WIDGET.NEXT") : h("WIDGET.SUBMIT"),
|
|
494
|
+
onClick: e < r.captchas.length - 1 ? a : o,
|
|
495
|
+
"aria-label": e < r.captchas.length - 1 ? h("WIDGET.NEXT") : h("WIDGET.SUBMIT"),
|
|
481
496
|
"data-cy": "button-next"
|
|
482
497
|
}
|
|
483
498
|
)
|
|
@@ -494,26 +509,26 @@ const ve = {
|
|
|
494
509
|
}
|
|
495
510
|
) });
|
|
496
511
|
};
|
|
497
|
-
function
|
|
498
|
-
return
|
|
512
|
+
function Re(r) {
|
|
513
|
+
return U([
|
|
499
514
|
r.captchaId,
|
|
500
515
|
r.captchaContentId,
|
|
501
516
|
[...r.solution].sort(),
|
|
502
517
|
r.salt
|
|
503
518
|
]);
|
|
504
519
|
}
|
|
505
|
-
class
|
|
520
|
+
class V {
|
|
506
521
|
constructor(e) {
|
|
507
522
|
this.hash = e, this.parent = null;
|
|
508
523
|
}
|
|
509
524
|
}
|
|
510
|
-
class
|
|
525
|
+
class ke {
|
|
511
526
|
constructor() {
|
|
512
527
|
this.leaves = [], this.layers = [];
|
|
513
528
|
}
|
|
514
529
|
getRoot() {
|
|
515
530
|
if (this.root === void 0)
|
|
516
|
-
throw new
|
|
531
|
+
throw new T("DATASET.MERKLE_ERROR", {
|
|
517
532
|
context: {
|
|
518
533
|
error: "root undefined",
|
|
519
534
|
failedFuncName: this.getRoot.name
|
|
@@ -523,114 +538,112 @@ class Te {
|
|
|
523
538
|
}
|
|
524
539
|
build(e) {
|
|
525
540
|
this.layers.length && (this.layers = []);
|
|
526
|
-
const
|
|
527
|
-
for (const
|
|
528
|
-
const t = new
|
|
529
|
-
this.leaves.push(t),
|
|
541
|
+
const n = [];
|
|
542
|
+
for (const o of e) {
|
|
543
|
+
const t = new V(o);
|
|
544
|
+
this.leaves.push(t), n.push(t.hash);
|
|
530
545
|
}
|
|
531
|
-
this.layers.push(
|
|
546
|
+
this.layers.push(n), this.root = this.buildMerkleTree(this.leaves)[0];
|
|
532
547
|
}
|
|
533
548
|
buildMerkleTree(e) {
|
|
534
|
-
const
|
|
535
|
-
if (
|
|
549
|
+
const n = e.length;
|
|
550
|
+
if (n === 1)
|
|
536
551
|
return e;
|
|
537
|
-
const
|
|
552
|
+
const o = [];
|
|
538
553
|
let t = 0;
|
|
539
554
|
const i = [];
|
|
540
|
-
for (; t <
|
|
555
|
+
for (; t < n; ) {
|
|
541
556
|
const a = e[t];
|
|
542
557
|
if (a === void 0)
|
|
543
|
-
throw new
|
|
558
|
+
throw new T("DEVELOPER.GENERAL", {
|
|
544
559
|
context: { error: "leftChild undefined" }
|
|
545
560
|
});
|
|
546
|
-
const s = t + 1 <
|
|
547
|
-
i.push(
|
|
561
|
+
const s = t + 1 < n ? v(e, t + 1) : a, l = this.createParent(a, s);
|
|
562
|
+
i.push(l.hash), o.push(l), t += 2;
|
|
548
563
|
}
|
|
549
|
-
return this.layers.push(i), this.buildMerkleTree(
|
|
564
|
+
return this.layers.push(i), this.buildMerkleTree(o);
|
|
550
565
|
}
|
|
551
|
-
createParent(e,
|
|
552
|
-
const
|
|
553
|
-
|
|
554
|
-
);
|
|
555
|
-
return e.parent = n.hash, o.parent = n.hash, n;
|
|
566
|
+
createParent(e, n) {
|
|
567
|
+
const o = new V(U([e.hash, n.hash]));
|
|
568
|
+
return e.parent = o.hash, n.parent = o.hash, o;
|
|
556
569
|
}
|
|
557
570
|
proof(e) {
|
|
558
|
-
const
|
|
559
|
-
let
|
|
560
|
-
for (;
|
|
561
|
-
const i = this.layers[
|
|
571
|
+
const n = [];
|
|
572
|
+
let o = 0;
|
|
573
|
+
for (; o < this.layers.length - 1; ) {
|
|
574
|
+
const i = this.layers[o];
|
|
562
575
|
if (i === void 0)
|
|
563
|
-
throw new
|
|
576
|
+
throw new T("DATASET.MERKLE_ERROR", {
|
|
564
577
|
context: {
|
|
565
578
|
error: "layer undefined",
|
|
566
579
|
failedFuncName: this.proof.name,
|
|
567
|
-
layerNum:
|
|
580
|
+
layerNum: o
|
|
568
581
|
}
|
|
569
582
|
});
|
|
570
583
|
const a = i.indexOf(e);
|
|
571
584
|
let s = a % 2 && a > 0 ? a - 1 : a + 1;
|
|
572
585
|
s > i.length - 1 && (s = a);
|
|
573
|
-
const
|
|
574
|
-
s > a ?
|
|
586
|
+
const l = [e], h = v(i, s);
|
|
587
|
+
s > a ? l.push(h) : l.unshift(h), n.push([v(l, 0), v(l, 1)]), o += 1, e = U(l);
|
|
575
588
|
}
|
|
576
|
-
const t =
|
|
577
|
-
return [...
|
|
589
|
+
const t = v(this.layers, this.layers.length - 1);
|
|
590
|
+
return [...n, [v(t, 0)]];
|
|
578
591
|
}
|
|
579
592
|
}
|
|
580
|
-
class
|
|
581
|
-
constructor(e,
|
|
582
|
-
this.userAccount = e, this.provider =
|
|
593
|
+
class X {
|
|
594
|
+
constructor(e, n, o, t, i) {
|
|
595
|
+
this.userAccount = e, this.provider = n, this.providerApi = o, this._web2 = t, this.dappAccount = i;
|
|
583
596
|
}
|
|
584
597
|
get web2() {
|
|
585
598
|
return this._web2;
|
|
586
599
|
}
|
|
587
600
|
async getCaptchaChallenge(e) {
|
|
588
601
|
try {
|
|
589
|
-
const
|
|
602
|
+
const n = await this.providerApi.getCaptchaChallenge(
|
|
590
603
|
this.userAccount,
|
|
591
604
|
this.provider,
|
|
592
605
|
e
|
|
593
606
|
);
|
|
594
|
-
if (
|
|
595
|
-
return
|
|
596
|
-
for (const
|
|
597
|
-
for (const t of
|
|
607
|
+
if (n[A.error])
|
|
608
|
+
return n;
|
|
609
|
+
for (const o of n.captchas)
|
|
610
|
+
for (const t of o.items)
|
|
598
611
|
t.data && (t.data = `https://${t.data.replace(/^http(s)*:\/\//, "")}`);
|
|
599
|
-
return
|
|
600
|
-
} catch (
|
|
601
|
-
throw new
|
|
602
|
-
context: { error:
|
|
612
|
+
return n;
|
|
613
|
+
} catch (n) {
|
|
614
|
+
throw new H("CAPTCHA.INVALID_CAPTCHA_CHALLENGE", {
|
|
615
|
+
context: { error: n }
|
|
603
616
|
});
|
|
604
617
|
}
|
|
605
618
|
}
|
|
606
|
-
async submitCaptchaSolution(e,
|
|
607
|
-
const a = new
|
|
608
|
-
(
|
|
619
|
+
async submitCaptchaSolution(e, n, o, t, i) {
|
|
620
|
+
const a = new ke(), s = o.map(
|
|
621
|
+
(b) => Re(b)
|
|
609
622
|
);
|
|
610
623
|
if (a.build(s), !a.root)
|
|
611
624
|
throw new _("CAPTCHA.INVALID_CAPTCHA_CHALLENGE", {
|
|
612
625
|
context: { error: "Merkle tree root is undefined" }
|
|
613
626
|
});
|
|
614
|
-
const
|
|
615
|
-
let
|
|
627
|
+
const l = a.root.hash;
|
|
628
|
+
let h;
|
|
616
629
|
try {
|
|
617
|
-
|
|
618
|
-
n,
|
|
630
|
+
h = await this.providerApi.submitCaptchaSolution(
|
|
619
631
|
o,
|
|
632
|
+
n,
|
|
620
633
|
this.userAccount,
|
|
621
634
|
t,
|
|
622
635
|
i,
|
|
623
636
|
e
|
|
624
637
|
);
|
|
625
|
-
} catch (
|
|
638
|
+
} catch (b) {
|
|
626
639
|
throw new _("CAPTCHA.INVALID_CAPTCHA_CHALLENGE", {
|
|
627
|
-
context: { error:
|
|
640
|
+
context: { error: b }
|
|
628
641
|
});
|
|
629
642
|
}
|
|
630
|
-
return [
|
|
643
|
+
return [h, l];
|
|
631
644
|
}
|
|
632
645
|
}
|
|
633
|
-
const
|
|
646
|
+
const Le = () => ({
|
|
634
647
|
// note order matters! see buildUpdateState. These fields are set in order, so disable modal first, then set loading to false, etc.
|
|
635
648
|
showModal: !1,
|
|
636
649
|
loading: !1,
|
|
@@ -642,17 +655,17 @@ const Ie = () => ({
|
|
|
642
655
|
account: void 0
|
|
643
656
|
// don't handle timeout here, this should be handled by the state management
|
|
644
657
|
});
|
|
645
|
-
function
|
|
646
|
-
const i =
|
|
658
|
+
function _e(r, e, n, o, t) {
|
|
659
|
+
const i = ie(o), a = we(e, n), s = () => {
|
|
647
660
|
const c = {
|
|
648
661
|
userAccountAddress: "",
|
|
649
662
|
...r
|
|
650
663
|
};
|
|
651
|
-
return e.account && (c.userAccountAddress = e.account.account.address),
|
|
652
|
-
},
|
|
653
|
-
i.onOpen(), await
|
|
664
|
+
return e.account && (c.userAccountAddress = e.account.account.address), Q.parse(c);
|
|
665
|
+
}, l = async () => {
|
|
666
|
+
i.onOpen(), await z(
|
|
654
667
|
async () => {
|
|
655
|
-
var
|
|
668
|
+
var I;
|
|
656
669
|
if (e.loading || e.isHuman)
|
|
657
670
|
return;
|
|
658
671
|
a({ loading: !0 }), a({
|
|
@@ -661,25 +674,25 @@ function Ne(r, e, o, n, t) {
|
|
|
661
674
|
sessionId: t == null ? void 0 : t.sessionId
|
|
662
675
|
});
|
|
663
676
|
const c = s();
|
|
664
|
-
a({ dappAccount: c.account.address }), await
|
|
665
|
-
const
|
|
677
|
+
a({ dappAccount: c.account.address }), await me(100);
|
|
678
|
+
const m = await ee();
|
|
666
679
|
let x = e.captchaApi;
|
|
667
680
|
if (t != null && t.provider) {
|
|
668
|
-
const
|
|
669
|
-
x = new
|
|
670
|
-
|
|
681
|
+
const w = t.provider.provider.url, y = await g(w);
|
|
682
|
+
x = new X(
|
|
683
|
+
m.account.address,
|
|
671
684
|
t.provider,
|
|
672
685
|
y,
|
|
673
686
|
c.web2,
|
|
674
687
|
c.account.address || ""
|
|
675
688
|
), a({ captchaApi: x });
|
|
676
689
|
} else {
|
|
677
|
-
const
|
|
678
|
-
s()
|
|
679
|
-
), y =
|
|
680
|
-
x = new
|
|
681
|
-
|
|
682
|
-
|
|
690
|
+
const w = await ce(
|
|
691
|
+
s().defaultEnvironment
|
|
692
|
+
), y = w.provider.url, E = await g(y);
|
|
693
|
+
x = new X(
|
|
694
|
+
m.account.address,
|
|
695
|
+
w,
|
|
683
696
|
E,
|
|
684
697
|
c.web2,
|
|
685
698
|
c.account.address || ""
|
|
@@ -695,15 +708,15 @@ function Ne(r, e, o, n, t) {
|
|
|
695
708
|
message: p.error.message,
|
|
696
709
|
key: p.error.key || "API.UNKNOWN_ERROR"
|
|
697
710
|
}
|
|
698
|
-
}), i.onError(new Error((
|
|
711
|
+
}), i.onError(new Error((I = p.error) == null ? void 0 : I.message));
|
|
699
712
|
else {
|
|
700
713
|
if (p.captchas.length <= 0)
|
|
701
714
|
throw new _("DEVELOPER.PROVIDER_NO_CAPTCHA");
|
|
702
|
-
const
|
|
715
|
+
const w = p.captchas.map(
|
|
703
716
|
(E) => E.timeLimitMs || c.captchas.image.challengeTimeout
|
|
704
|
-
).reduce((E,
|
|
717
|
+
).reduce((E, W) => E + W), y = setTimeout(() => {
|
|
705
718
|
i.onChallengeExpired(), a({ isHuman: !1, showModal: !1, loading: !1 });
|
|
706
|
-
},
|
|
719
|
+
}, w);
|
|
707
720
|
a({
|
|
708
721
|
index: 0,
|
|
709
722
|
solutions: p.captchas.map(() => []),
|
|
@@ -714,169 +727,176 @@ function Ne(r, e, o, n, t) {
|
|
|
714
727
|
});
|
|
715
728
|
}
|
|
716
729
|
},
|
|
717
|
-
|
|
718
|
-
|
|
730
|
+
l,
|
|
731
|
+
L,
|
|
719
732
|
e.attemptCount,
|
|
720
733
|
10
|
|
721
734
|
);
|
|
722
|
-
},
|
|
723
|
-
await
|
|
735
|
+
}, h = async () => {
|
|
736
|
+
await z(
|
|
724
737
|
async () => {
|
|
725
|
-
if (
|
|
726
|
-
throw new
|
|
738
|
+
if (N(), !e.challenge)
|
|
739
|
+
throw new T("CAPTCHA.NO_CAPTCHA", {
|
|
727
740
|
context: { error: "Cannot submit, no Captcha found in state" }
|
|
728
741
|
});
|
|
729
742
|
a({ showModal: !1 });
|
|
730
|
-
const c = e.challenge,
|
|
731
|
-
(O,
|
|
732
|
-
const
|
|
743
|
+
const c = e.challenge, m = e.challenge.captchas.map(
|
|
744
|
+
(O, oe) => {
|
|
745
|
+
const B = v(e.solutions, oe), j = B.flatMap(([k, $, se]) => [$, se]), ae = ye(
|
|
746
|
+
j.map((k) => k.toString(16).length + 4).reduce((k, $) => k + $, 0)
|
|
747
|
+
), re = pe(ae, j);
|
|
733
748
|
return {
|
|
734
749
|
captchaId: O.captchaId,
|
|
735
750
|
captchaContentId: O.captchaContentId,
|
|
736
|
-
salt:
|
|
737
|
-
solution:
|
|
751
|
+
salt: re,
|
|
752
|
+
solution: B.flatMap((k) => k[0])
|
|
738
753
|
};
|
|
739
754
|
}
|
|
740
|
-
),
|
|
741
|
-
if (!
|
|
755
|
+
), x = G(), p = ne(x).signer;
|
|
756
|
+
if (!v(c.captchas, 0).datasetId)
|
|
742
757
|
throw new _("CAPTCHA.INVALID_CAPTCHA_ID", {
|
|
743
758
|
context: { error: "No datasetId set for challenge" }
|
|
744
759
|
});
|
|
745
|
-
const
|
|
746
|
-
if (!
|
|
747
|
-
throw new
|
|
760
|
+
const w = e.captchaApi;
|
|
761
|
+
if (!w)
|
|
762
|
+
throw new T("CAPTCHA.INVALID_TOKEN", {
|
|
748
763
|
context: { error: "No Captcha API found in state" }
|
|
749
764
|
});
|
|
750
|
-
if (!
|
|
751
|
-
throw new
|
|
765
|
+
if (!p || !p.signRaw)
|
|
766
|
+
throw new H("GENERAL.CANT_FIND_KEYRINGPAIR", {
|
|
752
767
|
context: {
|
|
753
768
|
error: "Signer is not defined, cannot sign message to prove account ownership"
|
|
754
769
|
}
|
|
755
770
|
});
|
|
756
|
-
const
|
|
757
|
-
address:
|
|
758
|
-
data:
|
|
771
|
+
const y = await p.signRaw({
|
|
772
|
+
address: x.account.address,
|
|
773
|
+
data: Ae(c[A.timestamp]),
|
|
759
774
|
type: "bytes"
|
|
760
|
-
}),
|
|
761
|
-
|
|
775
|
+
}), E = await w.submitCaptchaSolution(
|
|
776
|
+
y.signature,
|
|
762
777
|
c.requestHash,
|
|
763
|
-
|
|
778
|
+
m,
|
|
764
779
|
c.timestamp,
|
|
765
780
|
c.signature.provider.requestHash
|
|
766
|
-
),
|
|
781
|
+
), W = E[0].verified;
|
|
767
782
|
if (a({
|
|
768
|
-
submission:
|
|
769
|
-
isHuman:
|
|
783
|
+
submission: E,
|
|
784
|
+
isHuman: W,
|
|
770
785
|
loading: !1
|
|
771
786
|
}), e.isHuman) {
|
|
772
|
-
const O =
|
|
787
|
+
const O = w.provider.provider.url;
|
|
773
788
|
i.onHuman(
|
|
774
|
-
|
|
775
|
-
[
|
|
776
|
-
[
|
|
777
|
-
[
|
|
778
|
-
[
|
|
779
|
-
[
|
|
780
|
-
[
|
|
781
|
-
[
|
|
782
|
-
[
|
|
789
|
+
ge({
|
|
790
|
+
[A.providerUrl]: O,
|
|
791
|
+
[A.user]: x.account.address,
|
|
792
|
+
[A.dapp]: te(),
|
|
793
|
+
[A.commitmentId]: fe(E[1]),
|
|
794
|
+
[A.timestamp]: c.timestamp,
|
|
795
|
+
[A.signature]: {
|
|
796
|
+
[A.provider]: {
|
|
797
|
+
[A.requestHash]: c.signature.provider.requestHash
|
|
783
798
|
},
|
|
784
|
-
[
|
|
785
|
-
[
|
|
799
|
+
[A.user]: {
|
|
800
|
+
[A.timestamp]: y.signature
|
|
786
801
|
}
|
|
787
802
|
}
|
|
788
803
|
})
|
|
789
804
|
), S();
|
|
790
805
|
} else
|
|
791
|
-
i.onFailed(),
|
|
806
|
+
i.onFailed(), L(t == null ? void 0 : t.restart);
|
|
792
807
|
},
|
|
793
|
-
|
|
794
|
-
|
|
808
|
+
l,
|
|
809
|
+
L,
|
|
795
810
|
e.attemptCount,
|
|
796
811
|
10
|
|
797
812
|
);
|
|
798
|
-
},
|
|
799
|
-
|
|
800
|
-
},
|
|
801
|
-
|
|
802
|
-
},
|
|
813
|
+
}, b = async () => {
|
|
814
|
+
N(), L(t == null ? void 0 : t.restart), i.onClose();
|
|
815
|
+
}, u = async () => {
|
|
816
|
+
N(), i.onReload(), L(t == null ? void 0 : t.restart), t != null && t.restart || await l();
|
|
817
|
+
}, f = (c, m, x) => {
|
|
803
818
|
if (!e.challenge)
|
|
804
|
-
throw new
|
|
819
|
+
throw new T("CAPTCHA.NO_CAPTCHA", {
|
|
805
820
|
context: { error: "Cannot select, no Captcha found in state" }
|
|
806
821
|
});
|
|
807
822
|
if (e.index >= e.challenge.captchas.length || e.index < 0)
|
|
808
|
-
throw new
|
|
823
|
+
throw new T("CAPTCHA.NO_CAPTCHA", {
|
|
809
824
|
context: {
|
|
810
825
|
error: "Cannot select, index is out of range for this Captcha"
|
|
811
826
|
}
|
|
812
827
|
});
|
|
813
|
-
const
|
|
814
|
-
|
|
815
|
-
|
|
828
|
+
const p = e.index, I = e.solutions, w = v(I, p);
|
|
829
|
+
if (w.some((y) => y[0] === c)) {
|
|
830
|
+
const y = w.filter((E) => E[0] !== c);
|
|
831
|
+
I[p] = y;
|
|
832
|
+
} else
|
|
833
|
+
I[p] = [...w, [c, m || 0, x || 0]];
|
|
834
|
+
a({ solutions: I });
|
|
835
|
+
}, R = () => {
|
|
816
836
|
if (!e.challenge)
|
|
817
|
-
throw new
|
|
837
|
+
throw new T("CAPTCHA.NO_CAPTCHA", {
|
|
818
838
|
context: { error: "Cannot select, no Captcha found in state" }
|
|
819
839
|
});
|
|
820
840
|
if (e.index + 1 >= e.challenge.captchas.length)
|
|
821
|
-
throw new
|
|
841
|
+
throw new T("CAPTCHA.NO_CAPTCHA", {
|
|
822
842
|
context: {
|
|
823
843
|
error: "Cannot select, index is out of range for this Captcha"
|
|
824
844
|
}
|
|
825
845
|
});
|
|
826
846
|
a({ index: e.index + 1 });
|
|
827
847
|
}, g = async (c) => {
|
|
828
|
-
const
|
|
829
|
-
if (!
|
|
830
|
-
throw new
|
|
831
|
-
return new
|
|
832
|
-
},
|
|
848
|
+
const m = s();
|
|
849
|
+
if (!m.account.address)
|
|
850
|
+
throw new H("GENERAL.SITE_KEY_MISSING");
|
|
851
|
+
return new le(c, m.account.address);
|
|
852
|
+
}, N = () => {
|
|
833
853
|
window.clearTimeout(Number(e.timeout)), a({ timeout: void 0 });
|
|
834
854
|
}, S = () => {
|
|
835
|
-
const c = r.captchas.image.solutionTimeout,
|
|
855
|
+
const c = r.captchas.image.solutionTimeout, m = setTimeout(() => {
|
|
836
856
|
a({ isHuman: !1 }), i.onExpired();
|
|
837
857
|
}, c);
|
|
838
|
-
a({ successfullChallengeTimeout:
|
|
839
|
-
},
|
|
840
|
-
|
|
841
|
-
},
|
|
858
|
+
a({ successfullChallengeTimeout: m });
|
|
859
|
+
}, L = (c) => {
|
|
860
|
+
N(), a(Le()), i.onReset(), c && c();
|
|
861
|
+
}, ee = async () => {
|
|
842
862
|
const c = s();
|
|
843
863
|
if (!c.web2 && !c.userAccountAddress)
|
|
844
|
-
throw new
|
|
864
|
+
throw new H("GENERAL.ACCOUNT_NOT_FOUND", {
|
|
845
865
|
context: { error: "Account address has not been set for web3 mode" }
|
|
846
866
|
});
|
|
847
867
|
const x = await (async () => {
|
|
848
|
-
const p = new (await
|
|
868
|
+
const p = new (await de(c.web2))();
|
|
849
869
|
return t ? t.userAccount : await p.getAccount(c);
|
|
850
870
|
})();
|
|
851
871
|
return a({ account: x }), G();
|
|
852
872
|
}, G = () => {
|
|
853
873
|
if (!e.account)
|
|
854
|
-
throw new
|
|
874
|
+
throw new H("GENERAL.ACCOUNT_NOT_FOUND", {
|
|
855
875
|
context: { error: "Account not loaded" }
|
|
856
876
|
});
|
|
857
877
|
return e.account;
|
|
858
|
-
},
|
|
878
|
+
}, te = () => {
|
|
859
879
|
if (!e.dappAccount)
|
|
860
|
-
throw new
|
|
880
|
+
throw new H("GENERAL.SITE_KEY_MISSING");
|
|
861
881
|
return e.dappAccount;
|
|
862
|
-
},
|
|
863
|
-
const
|
|
864
|
-
if (!
|
|
865
|
-
throw new
|
|
882
|
+
}, ne = (c) => {
|
|
883
|
+
const m = c || G();
|
|
884
|
+
if (!m.extension)
|
|
885
|
+
throw new H("ACCOUNT.NO_POLKADOT_EXTENSION", {
|
|
866
886
|
context: { error: "Extension not loaded" }
|
|
867
887
|
});
|
|
868
|
-
return
|
|
888
|
+
return m.extension;
|
|
869
889
|
};
|
|
870
890
|
return {
|
|
871
|
-
start:
|
|
872
|
-
cancel:
|
|
873
|
-
submit:
|
|
874
|
-
select:
|
|
875
|
-
nextRound:
|
|
876
|
-
reload:
|
|
891
|
+
start: l,
|
|
892
|
+
cancel: b,
|
|
893
|
+
submit: h,
|
|
894
|
+
select: f,
|
|
895
|
+
nextRound: R,
|
|
896
|
+
reload: u
|
|
877
897
|
};
|
|
878
898
|
}
|
|
879
|
-
const
|
|
899
|
+
const Me = ue`
|
|
880
900
|
position: absolute;
|
|
881
901
|
top: 50%;
|
|
882
902
|
left: 50%;
|
|
@@ -895,8 +915,8 @@ const He = se`
|
|
|
895
915
|
@supports (-webkit-touch-callout: none) {
|
|
896
916
|
transform: translate(-50%, -100%);
|
|
897
917
|
}
|
|
898
|
-
`,
|
|
899
|
-
const { show: e, children:
|
|
918
|
+
`, Y = xe.memo((r) => {
|
|
919
|
+
const { show: e, children: n } = r, t = {
|
|
900
920
|
position: "fixed",
|
|
901
921
|
zIndex: 2147483646,
|
|
902
922
|
inset: 0,
|
|
@@ -905,88 +925,88 @@ const He = se`
|
|
|
905
925
|
justifyContent: "center",
|
|
906
926
|
minHeight: "100vh"
|
|
907
927
|
};
|
|
908
|
-
return
|
|
909
|
-
/* @__PURE__ */
|
|
928
|
+
return ve.createPortal(
|
|
929
|
+
/* @__PURE__ */ d("div", { className: "prosopo-modalOuter", style: t, children: /* @__PURE__ */ d("div", { className: "prosopo-modalInner", css: Me, children: n }) }),
|
|
910
930
|
document.body
|
|
911
931
|
);
|
|
912
|
-
}),
|
|
913
|
-
var
|
|
914
|
-
const { t: e, ready:
|
|
915
|
-
|
|
932
|
+
}), q = "procaptcha:execute", je = (r) => {
|
|
933
|
+
var R;
|
|
934
|
+
const { t: e, ready: n } = Z(), o = Q.parse(r.config), t = r.frictionlessState, i = r.i18n, a = r.callbacks || {}, [s, l] = be(C.useState, C.useRef), [h, b] = C.useState(!1), u = _e(
|
|
935
|
+
o,
|
|
916
936
|
s,
|
|
917
|
-
|
|
937
|
+
l,
|
|
918
938
|
a,
|
|
919
939
|
t
|
|
920
|
-
),
|
|
921
|
-
return
|
|
922
|
-
|
|
923
|
-
g.language !==
|
|
940
|
+
), f = r.config.theme === "light" ? M : D;
|
|
941
|
+
return C.useEffect(() => {
|
|
942
|
+
o.language && (i ? i.language !== o.language && i.changeLanguage(o.language).then((g) => g) : Ce().then((g) => {
|
|
943
|
+
g.language !== o.language && g.changeLanguage(o.language).then((N) => N);
|
|
924
944
|
}));
|
|
925
|
-
}, [i,
|
|
926
|
-
s.error && (
|
|
945
|
+
}, [i, o.language]), C.useEffect(() => {
|
|
946
|
+
s.error && (b(!1), s.error.key === "CAPTCHA.NO_SESSION_FOUND" && t && setTimeout(() => {
|
|
927
947
|
t.restart();
|
|
928
948
|
}, 3e3));
|
|
929
|
-
}, [s.error, t]),
|
|
930
|
-
const g = (
|
|
931
|
-
if (
|
|
949
|
+
}, [s.error, t]), C.useEffect(() => {
|
|
950
|
+
const g = (N) => {
|
|
951
|
+
if (l({
|
|
932
952
|
showModal: !0
|
|
933
|
-
}), !s.challenge &&
|
|
953
|
+
}), !s.challenge && u.start)
|
|
934
954
|
try {
|
|
935
|
-
|
|
955
|
+
u.start();
|
|
936
956
|
} catch (S) {
|
|
937
957
|
console.error("Error starting verification:", S);
|
|
938
958
|
}
|
|
939
959
|
};
|
|
940
|
-
return document.addEventListener(
|
|
960
|
+
return document.addEventListener(q, g), () => {
|
|
941
961
|
document.removeEventListener(
|
|
942
|
-
|
|
962
|
+
q,
|
|
943
963
|
g
|
|
944
964
|
);
|
|
945
965
|
};
|
|
946
|
-
}, [
|
|
947
|
-
|
|
966
|
+
}, [u, s.challenge, l]), o.mode === "invisible" ? /* @__PURE__ */ d(Y, { show: s.showModal, children: s.challenge ? /* @__PURE__ */ d(
|
|
967
|
+
K,
|
|
948
968
|
{
|
|
949
969
|
challenge: s.challenge,
|
|
950
970
|
index: s.index,
|
|
951
971
|
solutions: s.solutions,
|
|
952
|
-
onSubmit:
|
|
953
|
-
onCancel:
|
|
954
|
-
onClick:
|
|
955
|
-
onNext:
|
|
956
|
-
onReload:
|
|
957
|
-
themeColor:
|
|
972
|
+
onSubmit: u.submit,
|
|
973
|
+
onCancel: u.cancel,
|
|
974
|
+
onClick: u.select,
|
|
975
|
+
onNext: u.nextRound,
|
|
976
|
+
onReload: u.reload,
|
|
977
|
+
themeColor: o.theme ?? "light"
|
|
958
978
|
}
|
|
959
|
-
) : null }) : /* @__PURE__ */
|
|
960
|
-
/* @__PURE__ */
|
|
961
|
-
|
|
979
|
+
) : null }) : /* @__PURE__ */ P("div", { className: "image-captcha", children: [
|
|
980
|
+
/* @__PURE__ */ d(Y, { show: s.showModal, children: s.challenge ? /* @__PURE__ */ d(
|
|
981
|
+
K,
|
|
962
982
|
{
|
|
963
983
|
challenge: s.challenge,
|
|
964
984
|
index: s.index,
|
|
965
985
|
solutions: s.solutions,
|
|
966
|
-
onSubmit:
|
|
967
|
-
onCancel:
|
|
968
|
-
onClick:
|
|
969
|
-
onNext:
|
|
970
|
-
onReload:
|
|
971
|
-
themeColor:
|
|
986
|
+
onSubmit: u.submit,
|
|
987
|
+
onCancel: u.cancel,
|
|
988
|
+
onClick: u.select,
|
|
989
|
+
onNext: u.nextRound,
|
|
990
|
+
onReload: u.reload,
|
|
991
|
+
themeColor: o.theme ?? "light"
|
|
972
992
|
}
|
|
973
|
-
) : /* @__PURE__ */
|
|
974
|
-
/* @__PURE__ */
|
|
975
|
-
|
|
993
|
+
) : /* @__PURE__ */ d("div", { children: "No challenge set." }) }),
|
|
994
|
+
/* @__PURE__ */ d(
|
|
995
|
+
he,
|
|
976
996
|
{
|
|
977
|
-
theme:
|
|
978
|
-
onChange: async () => {
|
|
979
|
-
|
|
997
|
+
theme: f,
|
|
998
|
+
onChange: async (g) => {
|
|
999
|
+
g.isTrusted && (h || (b(!0), await u.start(), b(!1)));
|
|
980
1000
|
},
|
|
981
1001
|
checked: s.isHuman,
|
|
982
|
-
labelText:
|
|
983
|
-
error: (
|
|
1002
|
+
labelText: n ? e("WIDGET.I_AM_HUMAN") : "",
|
|
1003
|
+
error: (R = s.error) == null ? void 0 : R.message,
|
|
984
1004
|
"aria-label": "human checkbox",
|
|
985
|
-
loading:
|
|
1005
|
+
loading: h
|
|
986
1006
|
}
|
|
987
1007
|
)
|
|
988
1008
|
] });
|
|
989
1009
|
};
|
|
990
1010
|
export {
|
|
991
|
-
|
|
1011
|
+
je as default
|
|
992
1012
|
};
|