ng-recaptcha-2 15.0.3 → 16.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,92 +1,88 @@
1
1
  <a name="15.0.3"></a>
2
- ## 15.0.3 (2025-03-26)
3
2
 
3
+ ## 15.0.3 (2025-03-26)
4
4
 
5
5
  ### Bug Fixes
6
6
 
7
- * **build:** fix AoT builds ([921be50](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/921be50)), closes [#57](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/57) [#65](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/65)
8
- * **component-v3:** fix a potential metadata error in v3 service ([ed885b5](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/ed885b5))
9
- * **component:** catch and propagate grecaptcha errors, closes [#175](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/175) ([075edd0](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/075edd0))
10
- * **component:** correct type when using strict mode ([a687d13](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/a687d13)), closes [#211](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/211)
11
- * **component:** correctly emit `resolved` event ([25d4246](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/25d4246))
12
- * **component:** correctly reset captcha during `ngOnDestroy` ([b31d57f](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/b31d57f)), closes [#12](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/12)
13
- * **component:** delay invisible recaptcha execution until it's rendered ([99292b7](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/99292b7)), closes [#127](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/127)
14
- * **component:** emit `resolved(null)` event when recaptcha expires ([491d99a](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/491d99a)), closes [#11](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/11)
15
- * **component:** ensure that component is destroyed safely ([1e51d56](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/1e51d56)), closes [#46](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/46)
16
- * **component:** fix a potential error during recaptcha rendering ([1c395b5](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/1c395b5))
17
- * **component:** fix custom languages for reCAPTCHA v3 ([a2b145d](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/a2b145d)), closes [#174](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/174)
18
- * **component:** fix server-side rendering ([7a5bc6c](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/7a5bc6c)), closes [#34](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/34) [/github.com/angular/angular/blob/master/CHANGELOG.md#features-20](https://github.com//github.com/angular/angular/blob/master/CHANGELOG.md/issues/features-20)
19
- * **component:** fix the injection error when using slandalone `RecaptchaV3Module` ([c93b99c](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/c93b99c))
20
- * **component:** handle id input parameter correctly ([b578fe5](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/b578fe5))
21
- * **component:** handle top-level `execute` errors for reCAPTCHA v3 ([c7d02ce](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/c7d02ce)), closes [#194](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/194)
22
- * **component:** improve reCAPTCHA v2 and v3 interoperability ([79fc85b](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/79fc85b)), closes [#152](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/152)
23
- * **component:** mark `forRoot()` method as deprecated ([dea31e5](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/dea31e5))
24
- * **component:** Replace `OpaqueToken` with `InjectionToken` ([2b7db9b](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/2b7db9b))
25
- * **component:** reset form-bound captcha value after component destruction ([9e5c5e7](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/9e5c5e7)), closes [#201](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/201)
26
- * **component:** reset form-bound captcha value after component destruction ([0e550c4](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/0e550c4)), closes [#201](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/201)
27
- * **component:** reset the captcha when the component is destroyed ([e1441c8](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/e1441c8)), closes [#10](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/10)
28
- * **component:** set CSP nonce as attribute ([abcb9a6](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/abcb9a6))
29
- * **component:** unblock protractor tests after <re-captcha> destruction ([a5f2fe9](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/a5f2fe9))
30
- * **component:** use ElementRef to access component's native element ([d3a8409](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/d3a8409)), closes [#48](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/48) [#68](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/68)
31
- * **demo:** re-add a missing systemjs config file ([b51694a](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/b51694a))
32
- * **module:** Adding the value accessor directive to the forms barrel, which was missing. ([ad73e2e](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/ad73e2e))
33
- * **package:** convert the `README.md` file back to a proper symlink ([e0c5c99](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/e0c5c99))
34
- * **package:** fix publishing empty package ([e4685fe](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/e4685fe))
35
- * **package:** make `[@types](https://github.com/types)/grecaptcha` a non-optional dependency ([bc5ad51](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/bc5ad51)), closes [#205](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/205)
36
- * **rxjs:** change import of `of` operator ([3e0bda6](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/3e0bda6)), closes [#95](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/95)
37
-
7
+ - **build:** fix AoT builds ([921be50](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/921be50)), closes [#57](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/57) [#65](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/65)
8
+ - **component-v3:** fix a potential metadata error in v3 service ([ed885b5](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/ed885b5))
9
+ - **component:** catch and propagate grecaptcha errors, closes [#175](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/175) ([075edd0](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/075edd0))
10
+ - **component:** correct type when using strict mode ([a687d13](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/a687d13)), closes [#211](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/211)
11
+ - **component:** correctly emit `resolved` event ([25d4246](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/25d4246))
12
+ - **component:** correctly reset captcha during `ngOnDestroy` ([b31d57f](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/b31d57f)), closes [#12](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/12)
13
+ - **component:** delay invisible recaptcha execution until it's rendered ([99292b7](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/99292b7)), closes [#127](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/127)
14
+ - **component:** emit `resolved(null)` event when recaptcha expires ([491d99a](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/491d99a)), closes [#11](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/11)
15
+ - **component:** ensure that component is destroyed safely ([1e51d56](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/1e51d56)), closes [#46](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/46)
16
+ - **component:** fix a potential error during recaptcha rendering ([1c395b5](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/1c395b5))
17
+ - **component:** fix custom languages for reCAPTCHA v3 ([a2b145d](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/a2b145d)), closes [#174](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/174)
18
+ - **component:** fix server-side rendering ([7a5bc6c](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/7a5bc6c)), closes [#34](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/34) [/github.com/angular/angular/blob/master/CHANGELOG.md#features-20](https://github.com//github.com/angular/angular/blob/master/CHANGELOG.md/issues/features-20)
19
+ - **component:** fix the injection error when using slandalone `RecaptchaV3Module` ([c93b99c](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/c93b99c))
20
+ - **component:** handle id input parameter correctly ([b578fe5](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/b578fe5))
21
+ - **component:** handle top-level `execute` errors for reCAPTCHA v3 ([c7d02ce](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/c7d02ce)), closes [#194](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/194)
22
+ - **component:** improve reCAPTCHA v2 and v3 interoperability ([79fc85b](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/79fc85b)), closes [#152](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/152)
23
+ - **component:** mark `forRoot()` method as deprecated ([dea31e5](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/dea31e5))
24
+ - **component:** Replace `OpaqueToken` with `InjectionToken` ([2b7db9b](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/2b7db9b))
25
+ - **component:** reset form-bound captcha value after component destruction ([9e5c5e7](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/9e5c5e7)), closes [#201](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/201)
26
+ - **component:** reset form-bound captcha value after component destruction ([0e550c4](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/0e550c4)), closes [#201](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/201)
27
+ - **component:** reset the captcha when the component is destroyed ([e1441c8](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/e1441c8)), closes [#10](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/10)
28
+ - **component:** set CSP nonce as attribute ([abcb9a6](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/abcb9a6))
29
+ - **component:** unblock protractor tests after <re-captcha> destruction ([a5f2fe9](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/a5f2fe9))
30
+ - **component:** use ElementRef to access component's native element ([d3a8409](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/d3a8409)), closes [#48](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/48) [#68](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/68)
31
+ - **demo:** re-add a missing systemjs config file ([b51694a](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/b51694a))
32
+ - **module:** Adding the value accessor directive to the forms barrel, which was missing. ([ad73e2e](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/ad73e2e))
33
+ - **package:** convert the `README.md` file back to a proper symlink ([e0c5c99](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/e0c5c99))
34
+ - **package:** fix publishing empty package ([e4685fe](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/e4685fe))
35
+ - **package:** make `[@types](https://github.com/types)/grecaptcha` a non-optional dependency ([bc5ad51](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/bc5ad51)), closes [#205](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/205)
36
+ - **rxjs:** change import of `of` operator ([3e0bda6](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/3e0bda6)), closes [#95](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/95)
38
37
 
39
38
  ### Features
40
39
 
41
- * **component:** *deprecate* `error` output in favor of `errored` ([6b002bb](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/6b002bb))
42
- * **component:** add `exportAs` annotation ([3e2e217](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/3e2e217))
43
- * **component:** add a new `RECAPTCHA_LOADER_OPTIONS` injection token as a way of manipulating script load parameters (such as base URL, language, trusted types, WAF, etc) ([b3c7213](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/b3c7213))
44
- * **component:** Add Angular 11 support ([918fe90](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/918fe90))
45
- * **component:** add support for `badge` property ([5a16430](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/5a16430)), closes [#30](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/30)
46
- * **component:** add support for invisible reCAPTCHA ([c19489d](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/c19489d)), closes [#18](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/18)
47
- * **component:** add support for reCAPTCHA v3 ([4a083c6](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/4a083c6)), closes [#129](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/129)
48
- * **component:** add the ability to handle reCAPTCHA errors ([80c9e6e](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/80c9e6e)), closes [#199](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/199)
49
- * **component:** add the ability to provide `nonce` to the script tag ([8f55b19](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/8f55b19)), closes [#100](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/100)
50
- * **component:** add the ability to specify component props globally ([d9c5f55](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/d9c5f55)), closes [#45](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/45)
51
- * **component:** adjust dependencies for Angular 6 support ([736c7ae](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/736c7ae))
52
- * **component:** allow to specify a base url for loading recaptcha ([df505fd](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/df505fd)), closes [#101](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/101)
53
- * **component:** change component and directive selectors ([58a01b4](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/58a01b4))
54
- * **component:** load recaptcha script using code compatible with trusted types ([88d257b](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/88d257b)), closes [#304](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/304)
55
- * **component:** make Angular 10.0.0 a supported peer dependency ([3d7756b](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/3d7756b)), closes [#177](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/177)
56
- * **component:** make Angular 8.0.0 a supported peer dependency ([f003ff2](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/f003ff2))
57
- * **component:** make Angular 9.0.0 a supported peer dependency ([98edce6](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/98edce6)), closes [#168](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/168)
58
- * **component:** remove deprecated `forRoot` method ([514beaf](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/514beaf))
59
- * **misc:** Annotating a static field with nocollapse so that we doesn't have issues closure compiler in advanced mode. ([55e5932](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/55e5932))
60
- * **module:** change the way recaptcha modules work ([6e13389](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/6e13389))
61
- * **module:** skip `forRoot()` when importing `RecaptchaModule` ([7fb97fb](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/7fb97fb)), closes [#113](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/113) [#116](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/116)
62
- * **package management:** add `[@types](https://github.com/types)/grecaptcha` as optional dependency ([85fbfba](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/85fbfba))
63
- * **package:** add Angular 12 support ([a212a21](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/a212a21))
64
- * **package:** add Angular 14 support ([eac6858](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/eac6858))
65
- * **package:** add Angular 15 support ([6c62634](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/6c62634)), closes [#275](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/275)
66
- * **package:** add Angular 16 support ([77a7d1f](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/77a7d1f)), closes [#288](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/288)
67
- * **package:** add Angular 17 support ([83714aa](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/83714aa)), closes [#310](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/310)
68
- * **package:** implement Angular Package format ([71340c4](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/71340c4))
69
- * **package:** update `"[@types](https://github.com/types)/grecaptcha"` optional dependency version to ^3 ([e1ee7b9](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/e1ee7b9))
70
- * **package:** update peer dependencies to include Angular 7 ([929ef7a](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/929ef7a))
71
- * **package:** update peer dependencies to include Angular v4 ([b2f04e8](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/b2f04e8))
72
- * **package:** upgrade to Angular 13 ([af08641](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/af08641)), closes [#245](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/245)
73
-
40
+ - **component:** _deprecate_ `error` output in favor of `errored` ([6b002bb](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/6b002bb))
41
+ - **component:** add `exportAs` annotation ([3e2e217](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/3e2e217))
42
+ - **component:** add a new `RECAPTCHA_LOADER_OPTIONS` injection token as a way of manipulating script load parameters (such as base URL, language, trusted types, WAF, etc) ([b3c7213](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/b3c7213))
43
+ - **component:** Add Angular 11 support ([918fe90](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/918fe90))
44
+ - **component:** add support for `badge` property ([5a16430](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/5a16430)), closes [#30](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/30)
45
+ - **component:** add support for invisible reCAPTCHA ([c19489d](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/c19489d)), closes [#18](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/18)
46
+ - **component:** add support for reCAPTCHA v3 ([4a083c6](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/4a083c6)), closes [#129](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/129)
47
+ - **component:** add the ability to handle reCAPTCHA errors ([80c9e6e](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/80c9e6e)), closes [#199](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/199)
48
+ - **component:** add the ability to provide `nonce` to the script tag ([8f55b19](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/8f55b19)), closes [#100](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/100)
49
+ - **component:** add the ability to specify component props globally ([d9c5f55](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/d9c5f55)), closes [#45](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/45)
50
+ - **component:** adjust dependencies for Angular 6 support ([736c7ae](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/736c7ae))
51
+ - **component:** allow to specify a base url for loading recaptcha ([df505fd](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/df505fd)), closes [#101](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/101)
52
+ - **component:** change component and directive selectors ([58a01b4](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/58a01b4))
53
+ - **component:** load recaptcha script using code compatible with trusted types ([88d257b](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/88d257b)), closes [#304](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/304)
54
+ - **component:** make Angular 10.0.0 a supported peer dependency ([3d7756b](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/3d7756b)), closes [#177](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/177)
55
+ - **component:** make Angular 8.0.0 a supported peer dependency ([f003ff2](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/f003ff2))
56
+ - **component:** make Angular 9.0.0 a supported peer dependency ([98edce6](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/98edce6)), closes [#168](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/168)
57
+ - **component:** remove deprecated `forRoot` method ([514beaf](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/514beaf))
58
+ - **misc:** Annotating a static field with nocollapse so that we doesn't have issues closure compiler in advanced mode. ([55e5932](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/55e5932))
59
+ - **module:** change the way recaptcha modules work ([6e13389](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/6e13389))
60
+ - **module:** skip `forRoot()` when importing `RecaptchaModule` ([7fb97fb](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/7fb97fb)), closes [#113](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/113) [#116](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/116)
61
+ - **package management:** add `[@types](https://github.com/types)/grecaptcha` as optional dependency ([85fbfba](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/85fbfba))
62
+ - **package:** add Angular 12 support ([a212a21](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/a212a21))
63
+ - **package:** add Angular 14 support ([eac6858](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/eac6858))
64
+ - **package:** add Angular 15 support ([6c62634](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/6c62634)), closes [#275](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/275)
65
+ - **package:** add Angular 16 support ([77a7d1f](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/77a7d1f)), closes [#288](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/288)
66
+ - **package:** add Angular 17 support ([83714aa](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/83714aa)), closes [#310](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/310)
67
+ - **package:** implement Angular Package format ([71340c4](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/71340c4))
68
+ - **package:** update `"[@types](https://github.com/types)/grecaptcha"` optional dependency version to ^3 ([e1ee7b9](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/e1ee7b9))
69
+ - **package:** update peer dependencies to include Angular 7 ([929ef7a](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/929ef7a))
70
+ - **package:** update peer dependencies to include Angular v4 ([b2f04e8](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/b2f04e8))
71
+ - **package:** upgrade to Angular 13 ([af08641](https://github.com/LakhveerChahal/ng-recaptcha-2/commit/af08641)), closes [#245](https://github.com/LakhveerChahal/ng-recaptcha-2/issues/245)
74
72
 
75
73
  ### BREAKING CHANGES
76
74
 
77
- * **package:** - Angular v16 is no longer supported with this version. Pin `ng-recaptcha` to `v12.x.x` to retain support for a previous Angular version
78
- * **package:** - Angular v15 is no longer supported with this version. Pin `ng-recaptcha` to `v11.x.x` to retain support for a previous Angular version
79
- * **component:** Support for previous versions of Angular has been dropped. Starting from v7 only one version of Angular will be supported.
80
- * **component:** The `RecaptchaModule.forRoot()` method has been obsolete since v4.1.0 (since it has no longer been required). It is now removed. To migrate your code, simply use `RecaptchaModule` where you previously used `RecaptchaModule.forRoot()`
81
- * **package:** * `ng-recaptcha/forms` entry point has been removed. `RecaptchaFormsModule` and `RecaptchaValueAccessorDirective` should now be imported directly from `ng-recaptcha`
82
- * `tslib` is now a package dependency to ensure minimum possible bundle size. If your project doesn't yet have a dependency on `tslib`, run `npm install -D tslib@^1.9.0` (or `yarn add -D tslib@^1.9.0` if you use yarn)
83
- * **component:** The peer dependency for `@angular/core` has been bumped to `^6.0.0`
84
- * **component:**
85
- * **component:** component selector changed from `recaptcha` to `re-captcha`
86
- * **module:** module handling has changed.
87
- Users of `RecaptchaNoFormsModule` should instead use `import { RecaptchaModule } from 'ng-recaptcha'`. Users of v1 `RecaptchaModule` should also `import { RecaptchaFormsModule } from 'ng-recaptcha/forms'`. SystemJS users must also re-setup module "main" file to `index.js`
88
-
89
-
75
+ - **package:** - Angular v16 is no longer supported with this version. Pin `ng-recaptcha` to `v12.x.x` to retain support for a previous Angular version
76
+ - **package:** - Angular v15 is no longer supported with this version. Pin `ng-recaptcha` to `v11.x.x` to retain support for a previous Angular version
77
+ - **component:** Support for previous versions of Angular has been dropped. Starting from v7 only one version of Angular will be supported.
78
+ - **component:** The `RecaptchaModule.forRoot()` method has been obsolete since v4.1.0 (since it has no longer been required). It is now removed. To migrate your code, simply use `RecaptchaModule` where you previously used `RecaptchaModule.forRoot()`
79
+ - **package:** \* `ng-recaptcha/forms` entry point has been removed. `RecaptchaFormsModule` and `RecaptchaValueAccessorDirective` should now be imported directly from `ng-recaptcha`
80
+ - `tslib` is now a package dependency to ensure minimum possible bundle size. If your project doesn't yet have a dependency on `tslib`, run `npm install -D tslib@^1.9.0` (or `yarn add -D tslib@^1.9.0` if you use yarn)
81
+ - **component:** The peer dependency for `@angular/core` has been bumped to `^6.0.0`
82
+ - **component:**
83
+ - **component:** component selector changed from `recaptcha` to `re-captcha`
84
+ - **module:** module handling has changed.
85
+ Users of `RecaptchaNoFormsModule` should instead use `import { RecaptchaModule } from 'ng-recaptcha'`. Users of v1 `RecaptchaModule` should also `import { RecaptchaFormsModule } from 'ng-recaptcha/forms'`. SystemJS users must also re-setup module "main" file to `index.js`
90
86
 
91
87
  <a name="15.0.2"></a>
92
88
 
package/README.md CHANGED
@@ -206,6 +206,7 @@ Besides specifying these options on the component itself, you can provide a glob
206
206
 
207
207
  | `ng-recaptcha-2` version | Supported Angular versions |
208
208
  | ------------------------ | -------------------------- |
209
+ | `16.x.x` | `20.x.x` |
209
210
  | `15.x.x` | `19.x.x` |
210
211
  | `14.x.x` | `18.x.x` |
211
212
 
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, PLATFORM_ID, Injectable, Inject, Optional, EventEmitter, Component, Input, HostBinding, Output, NgModule, forwardRef, Directive, HostListener } from '@angular/core';
2
+ import { InjectionToken, PLATFORM_ID, Inject, Optional, Injectable, EventEmitter, Output, Input, HostBinding, Component, NgModule, forwardRef, HostListener, Directive } from '@angular/core';
3
3
  import { isPlatformBrowser } from '@angular/common';
4
4
  import { of, BehaviorSubject, Subject } from 'rxjs';
5
5
  import { filter } from 'rxjs/operators';
@@ -108,10 +108,10 @@ class RecaptchaLoaderService {
108
108
  });
109
109
  return subject;
110
110
  }
111
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaLoaderService, deps: [{ token: PLATFORM_ID }, { token: RECAPTCHA_LANGUAGE, optional: true }, { token: RECAPTCHA_BASE_URL, optional: true }, { token: RECAPTCHA_NONCE, optional: true }, { token: RECAPTCHA_V3_SITE_KEY, optional: true }, { token: RECAPTCHA_LOADER_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
112
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaLoaderService }); }
111
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: RecaptchaLoaderService, deps: [{ token: PLATFORM_ID }, { token: RECAPTCHA_LANGUAGE, optional: true }, { token: RECAPTCHA_BASE_URL, optional: true }, { token: RECAPTCHA_NONCE, optional: true }, { token: RECAPTCHA_V3_SITE_KEY, optional: true }, { token: RECAPTCHA_LOADER_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
112
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: RecaptchaLoaderService }); }
113
113
  }
114
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaLoaderService, decorators: [{
114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: RecaptchaLoaderService, decorators: [{
115
115
  type: Injectable
116
116
  }], ctorParameters: () => [{ type: Object, decorators: [{
117
117
  type: Inject,
@@ -268,10 +268,10 @@ class RecaptchaComponent {
268
268
  this.execute();
269
269
  }
270
270
  }
271
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaComponent, deps: [{ token: i0.ElementRef }, { token: RecaptchaLoaderService }, { token: i0.NgZone }, { token: RECAPTCHA_SETTINGS, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
272
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.0", type: RecaptchaComponent, isStandalone: false, selector: "re-captcha", inputs: { id: "id", siteKey: "siteKey", theme: "theme", type: "type", size: "size", tabIndex: "tabIndex", badge: "badge", errorMode: "errorMode" }, outputs: { resolved: "resolved", error: "error", errored: "errored" }, host: { properties: { "attr.id": "this.id" } }, exportAs: ["reCaptcha"], ngImport: i0, template: ``, isInline: true }); }
271
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: RecaptchaComponent, deps: [{ token: i0.ElementRef }, { token: RecaptchaLoaderService }, { token: i0.NgZone }, { token: RECAPTCHA_SETTINGS, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
272
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.1", type: RecaptchaComponent, isStandalone: false, selector: "re-captcha", inputs: { id: "id", siteKey: "siteKey", theme: "theme", type: "type", size: "size", tabIndex: "tabIndex", badge: "badge", errorMode: "errorMode" }, outputs: { resolved: "resolved", error: "error", errored: "errored" }, host: { properties: { "attr.id": "this.id" } }, exportAs: ["reCaptcha"], ngImport: i0, template: ``, isInline: true }); }
273
273
  }
274
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaComponent, decorators: [{
274
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: RecaptchaComponent, decorators: [{
275
275
  type: Component,
276
276
  args: [{
277
277
  exportAs: "reCaptcha",
@@ -312,11 +312,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
312
312
  }] } });
313
313
 
314
314
  class RecaptchaCommonModule {
315
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
316
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaCommonModule, declarations: [RecaptchaComponent], exports: [RecaptchaComponent] }); }
317
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaCommonModule }); }
315
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: RecaptchaCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
316
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.1", ngImport: i0, type: RecaptchaCommonModule, declarations: [RecaptchaComponent], exports: [RecaptchaComponent] }); }
317
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: RecaptchaCommonModule }); }
318
318
  }
319
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaCommonModule, decorators: [{
319
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: RecaptchaCommonModule, decorators: [{
320
320
  type: NgModule,
321
321
  args: [{
322
322
  declarations: [RecaptchaComponent],
@@ -325,11 +325,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
325
325
  }] });
326
326
 
327
327
  class RecaptchaModule {
328
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
329
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaModule, imports: [RecaptchaCommonModule], exports: [RecaptchaComponent] }); }
330
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaModule, providers: [RecaptchaLoaderService], imports: [RecaptchaCommonModule] }); }
328
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: RecaptchaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
329
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.1", ngImport: i0, type: RecaptchaModule, imports: [RecaptchaCommonModule], exports: [RecaptchaComponent] }); }
330
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: RecaptchaModule, providers: [RecaptchaLoaderService], imports: [RecaptchaCommonModule] }); }
331
331
  }
332
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaModule, decorators: [{
332
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: RecaptchaModule, decorators: [{
333
333
  type: NgModule,
334
334
  args: [{
335
335
  exports: [RecaptchaComponent],
@@ -429,10 +429,10 @@ class ReCaptchaV3Service {
429
429
  }
430
430
  });
431
431
  }
432
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: ReCaptchaV3Service, deps: [{ token: i0.NgZone }, { token: RecaptchaLoaderService }, { token: RECAPTCHA_V3_SITE_KEY }], target: i0.ɵɵFactoryTarget.Injectable }); }
433
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: ReCaptchaV3Service }); }
432
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: ReCaptchaV3Service, deps: [{ token: i0.NgZone }, { token: RecaptchaLoaderService }, { token: RECAPTCHA_V3_SITE_KEY }], target: i0.ɵɵFactoryTarget.Injectable }); }
433
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: ReCaptchaV3Service }); }
434
434
  }
435
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: ReCaptchaV3Service, decorators: [{
435
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: ReCaptchaV3Service, decorators: [{
436
436
  type: Injectable
437
437
  }], ctorParameters: () => [{ type: i0.NgZone }, { type: RecaptchaLoaderService }, { type: undefined, decorators: [{
438
438
  type: Inject,
@@ -440,11 +440,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
440
440
  }] }] });
441
441
 
442
442
  class RecaptchaV3Module {
443
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaV3Module, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
444
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaV3Module }); }
445
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaV3Module, providers: [ReCaptchaV3Service, RecaptchaLoaderService] }); }
443
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: RecaptchaV3Module, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
444
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.1", ngImport: i0, type: RecaptchaV3Module }); }
445
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: RecaptchaV3Module, providers: [ReCaptchaV3Service, RecaptchaLoaderService] }); }
446
446
  }
447
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaV3Module, decorators: [{
447
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: RecaptchaV3Module, decorators: [{
448
448
  type: NgModule,
449
449
  args: [{
450
450
  providers: [ReCaptchaV3Service, RecaptchaLoaderService],
@@ -489,8 +489,8 @@ class RecaptchaValueAccessorDirective {
489
489
  this.onTouched();
490
490
  }
491
491
  }
492
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaValueAccessorDirective, deps: [{ token: RecaptchaComponent }], target: i0.ɵɵFactoryTarget.Directive }); }
493
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0", type: RecaptchaValueAccessorDirective, isStandalone: false, selector: "re-captcha[formControlName],re-captcha[formControl],re-captcha[ngModel]", host: { listeners: { "resolved": "onResolve($event)" } }, providers: [
492
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: RecaptchaValueAccessorDirective, deps: [{ token: RecaptchaComponent }], target: i0.ɵɵFactoryTarget.Directive }); }
493
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.0.1", type: RecaptchaValueAccessorDirective, isStandalone: false, selector: "re-captcha[formControlName],re-captcha[formControl],re-captcha[ngModel]", host: { listeners: { "resolved": "onResolve($event)" } }, providers: [
494
494
  {
495
495
  multi: true,
496
496
  provide: NG_VALUE_ACCESSOR,
@@ -498,7 +498,7 @@ class RecaptchaValueAccessorDirective {
498
498
  },
499
499
  ], ngImport: i0 }); }
500
500
  }
501
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaValueAccessorDirective, decorators: [{
501
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: RecaptchaValueAccessorDirective, decorators: [{
502
502
  type: Directive,
503
503
  args: [{
504
504
  providers: [
@@ -517,11 +517,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
517
517
  }] } });
518
518
 
519
519
  class RecaptchaFormsModule {
520
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
521
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaFormsModule, declarations: [RecaptchaValueAccessorDirective], imports: [FormsModule, RecaptchaCommonModule], exports: [RecaptchaValueAccessorDirective] }); }
522
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaFormsModule, imports: [FormsModule, RecaptchaCommonModule] }); }
520
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: RecaptchaFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
521
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.1", ngImport: i0, type: RecaptchaFormsModule, declarations: [RecaptchaValueAccessorDirective], imports: [FormsModule, RecaptchaCommonModule], exports: [RecaptchaValueAccessorDirective] }); }
522
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: RecaptchaFormsModule, imports: [FormsModule, RecaptchaCommonModule] }); }
523
523
  }
524
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: RecaptchaFormsModule, decorators: [{
524
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: RecaptchaFormsModule, decorators: [{
525
525
  type: NgModule,
526
526
  args: [{
527
527
  declarations: [RecaptchaValueAccessorDirective],
@@ -1 +1 @@
1
- {"version":3,"file":"ng-recaptcha-2.mjs","sources":["../../../projects/ng-recaptcha/src/lib/tokens.ts","../../../projects/ng-recaptcha/src/lib/load-script.ts","../../../projects/ng-recaptcha/src/lib/recaptcha-loader.service.ts","../../../projects/ng-recaptcha/src/lib/recaptcha.component.ts","../../../projects/ng-recaptcha/src/lib/recaptcha-common.module.ts","../../../projects/ng-recaptcha/src/lib/recaptcha.module.ts","../../../projects/ng-recaptcha/src/lib/recaptcha-v3.service.ts","../../../projects/ng-recaptcha/src/lib/recaptcha-v3.module.ts","../../../projects/ng-recaptcha/src/lib/recaptcha-value-accessor.directive.ts","../../../projects/ng-recaptcha/src/lib/recaptcha-forms.module.ts","../../../projects/ng-recaptcha/src/index.ts","../../../projects/ng-recaptcha/src/ng-recaptcha-2.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\n\nimport { RecaptchaSettings } from \"./recaptcha-settings\";\n\n/** @deprecated Use `LOADER_OPTIONS` instead. See `RecaptchaLoaderOptions.onBeforeLoad` */\nexport const RECAPTCHA_LANGUAGE = new InjectionToken<string>(\"recaptcha-language\");\n/** @deprecated Use `LOADER_OPTIONS` instead. See `RecaptchaLoaderOptions.onBeforeLoad` */\nexport const RECAPTCHA_BASE_URL = new InjectionToken<string>(\"recaptcha-base-url\");\n/** @deprecated Use `LOADER_OPTIONS` instead. See `RecaptchaLoaderOptions.onBeforeLoad` */\nexport const RECAPTCHA_NONCE = new InjectionToken<string>(\"recaptcha-nonce-tag\");\nexport const RECAPTCHA_SETTINGS = new InjectionToken<RecaptchaSettings>(\"recaptcha-settings\");\nexport const RECAPTCHA_V3_SITE_KEY = new InjectionToken<string>(\"recaptcha-v3-site-key\");\n\n/**\n * Specifies the options for loading the reCAPTCHA script tag.\n */\nexport type RecaptchaLoaderOptions = {\n /**\n * Invoked before the `<script>` tag is appended to the DOM.\n * Use this function as an opportunity to set `nonce`, as well as modify the URL of the tag.\n *\n * Use the `url.searchParams` to set additional query string attributes (including reCAPTCHA language),\n * or use an entirely different base URL altogether.\n *\n * The URL that you provide will then properly set the `\"render\"` and `\"onload\"` attributes which are required for proper `ng-recaptcha` wire-up.\n *\n * @param url the current URL that was composed. Either modify it in-place, or return a completely new URL.\n * @returns the final URL that is going to be used as the `src` for the `<script>` tag, along with (optionally) a nonce.\n *\n * @example\n * Provide nonce:\n * ```ts\n * {\n * provide: RECAPTCHA_LOADER_OPTIONS,\n * useValue: {\n * onBeforeLoad(url) {\n * return {\n * url,\n * nonce: \"YOUR_NONCE\"\n * };\n * }\n * }\n * }\n * ```\n *\n * Set the reCAPTCHA language:\n * ```ts\n * {\n * provide: RECAPTCHA_LOADER_OPTIONS,\n * useValue: {\n * onBeforeLoad(url) {\n * url.searchParams.set(\"hl\", \"en-GB\")\n *\n * return { url };\n * }\n * }\n * }\n * ```\n *\n * Use a different base URL for loading reCAPTCHA\n * ```ts\n * {\n * provide: RECAPTCHA_LOADER_OPTIONS,\n * useValue: {\n * onBeforeLoad(_url) {\n * const chinaCompatibleUrl = new URL(\"https://www.recaptcha.net/recaptcha/api.js\");\n * // optionally, set the locale:\n * // chinaCompatibleUrl.searchParams.set(\"hl\", \"zh-CN\");\n *\n * return {\n * url: chinaCompatibleUrl\n * };\n * }\n * }\n * }\n * ```\n */\n onBeforeLoad?(url: URL): { url: URL; nonce?: string };\n\n /**\n * Allows you to change the `grecaptcha` that the `ng-recaptcha` will be relying on.\n * This method is useful when you need to use `grecaptcha.enterprise` instead of the base `grecaptcha`\n *\n * @param recaptcha the value of `window.grecaptcha` upon script load.\n * @returns the {ReCaptchaV2.ReCaptcha} instance that the `ng-recaptcha` lib will use.\n *\n * @example\n * Using the Enterprise version of `grecaptcha`:\n *\n * ```ts\n * {\n * provide: RECAPTCHA_LOADER_OPTIONS,\n * useValue: {\n * onBeforeLoad() {\n * const recaptchaEnterpriseUrl = new URL(\"https://www.google.com/recaptcha/enterprise.js\");\n * // optionally, if you're using the reCAPTCHA session-tokens, set the `&waf=session` param,\n * // see https://cloud.google.com/recaptcha-enterprise/docs/implement-waf-ca#session-token\n * // recaptchaEnterpriseUrl.searchParams.set(\"waf\", \"session\");\n *\n * return {\n * url: recaptchaEnterpriseUrl,\n * }\n * },\n * onLoaded(recaptcha) {\n * return recaptcha.enterprise;\n * }\n * }\n * }\n * ```\n */\n onLoaded?(recaptcha: ReCaptchaV2.ReCaptcha): ReCaptchaV2.ReCaptcha;\n};\n\n/**\n * See the documentation for `RecaptchaLoaderOptions`.\n */\nexport const RECAPTCHA_LOADER_OPTIONS = new InjectionToken<RecaptchaLoaderOptions>(\"recaptcha-loader-options\");\n","import { RecaptchaLoaderOptions } from \"./tokens\";\n\ndeclare global {\n interface Window {\n ng2recaptchaloaded?(): void;\n }\n}\n\nexport type RenderMode = \"explicit\" | { key: string };\n\nfunction loadScript(\n renderMode: RenderMode,\n onBeforeLoad: (url: URL) => { url: URL; nonce?: string },\n onLoaded: (grecaptcha: ReCaptchaV2.ReCaptcha) => void,\n { url, lang, nonce }: { url?: string; lang?: string; nonce?: string } = {},\n): void {\n window.ng2recaptchaloaded = () => {\n onLoaded(grecaptcha);\n };\n const script = document.createElement(\"script\");\n script.innerHTML = \"\";\n\n const { url: baseUrl, nonce: onBeforeLoadNonce } = onBeforeLoad(\n new URL(url || \"https://www.google.com/recaptcha/api.js\"),\n );\n baseUrl.searchParams.set(\"render\", renderMode === \"explicit\" ? renderMode : renderMode.key);\n baseUrl.searchParams.set(\"onload\", \"ng2recaptchaloaded\");\n baseUrl.searchParams.set(\"trustedtypes\", \"true\");\n if (lang) {\n baseUrl.searchParams.set(\"hl\", lang);\n }\n\n script.src = baseUrl.href;\n\n const nonceValue = onBeforeLoadNonce || nonce;\n\n if (nonceValue) {\n script.setAttribute(\"nonce\", nonceValue);\n }\n script.async = true;\n script.defer = true;\n document.head.appendChild(script);\n}\n\nfunction newLoadScript({\n v3SiteKey,\n onBeforeLoad,\n onLoaded,\n}: { v3SiteKey: string | undefined; onLoaded(recaptcha: ReCaptchaV2.ReCaptcha): void } & Pick<\n Required<RecaptchaLoaderOptions>,\n \"onBeforeLoad\"\n>) {\n const renderMode: RenderMode = v3SiteKey ? { key: v3SiteKey } : \"explicit\";\n\n loader.loadScript(renderMode, onBeforeLoad, onLoaded);\n}\n\nexport const loader = { loadScript, newLoadScript };\n","import { isPlatformBrowser } from \"@angular/common\";\nimport { Inject, Injectable, Optional, PLATFORM_ID } from \"@angular/core\";\nimport { BehaviorSubject, Observable, of } from \"rxjs\";\nimport { filter } from \"rxjs/operators\";\n\nimport { loader } from \"./load-script\";\nimport {\n RECAPTCHA_LOADER_OPTIONS,\n RECAPTCHA_BASE_URL,\n RECAPTCHA_LANGUAGE,\n RECAPTCHA_NONCE,\n RECAPTCHA_V3_SITE_KEY,\n RecaptchaLoaderOptions,\n} from \"./tokens\";\n\nfunction toNonNullObservable<T>(subject: BehaviorSubject<T | null>): Observable<T> {\n return subject.asObservable().pipe(filter<T>((value) => value !== null));\n}\n\n@Injectable()\nexport class RecaptchaLoaderService {\n /**\n * @internal\n * @nocollapse\n */\n private static ready: BehaviorSubject<ReCaptchaV2.ReCaptcha | null> | null = null;\n\n public ready: Observable<ReCaptchaV2.ReCaptcha>;\n\n /** @internal */\n private language?: string;\n /** @internal */\n private baseUrl?: string;\n /** @internal */\n private nonce?: string;\n /** @internal */\n private v3SiteKey?: string;\n /** @internal */\n private options?: RecaptchaLoaderOptions;\n\n constructor(\n // eslint-disable-next-line @typescript-eslint/ban-types\n @Inject(PLATFORM_ID) private readonly platformId: Object,\n // eslint-disable-next-line deprecation/deprecation\n @Optional() @Inject(RECAPTCHA_LANGUAGE) language?: string,\n // eslint-disable-next-line deprecation/deprecation\n @Optional() @Inject(RECAPTCHA_BASE_URL) baseUrl?: string,\n // eslint-disable-next-line deprecation/deprecation\n @Optional() @Inject(RECAPTCHA_NONCE) nonce?: string,\n @Optional() @Inject(RECAPTCHA_V3_SITE_KEY) v3SiteKey?: string,\n @Optional() @Inject(RECAPTCHA_LOADER_OPTIONS) options?: RecaptchaLoaderOptions,\n ) {\n this.language = language;\n this.baseUrl = baseUrl;\n this.nonce = nonce;\n this.v3SiteKey = v3SiteKey;\n this.options = options;\n const subject = this.init();\n this.ready = subject ? toNonNullObservable(subject) : of();\n }\n\n /** @internal */\n private init(): BehaviorSubject<ReCaptchaV2.ReCaptcha | null> | undefined {\n if (RecaptchaLoaderService.ready) {\n return RecaptchaLoaderService.ready;\n }\n\n if (!isPlatformBrowser(this.platformId)) {\n return undefined;\n }\n\n const subject = new BehaviorSubject<ReCaptchaV2.ReCaptcha | null>(null);\n RecaptchaLoaderService.ready = subject;\n\n loader.newLoadScript({\n v3SiteKey: this.v3SiteKey,\n onBeforeLoad: (url) => {\n if (this.options?.onBeforeLoad) {\n return this.options.onBeforeLoad(url);\n }\n\n const newUrl = new URL(this.baseUrl ?? url);\n\n if (this.language) {\n newUrl.searchParams.set(\"hl\", this.language);\n }\n\n return {\n url: newUrl,\n nonce: this.nonce,\n };\n },\n onLoaded: (recaptcha) => {\n let value = recaptcha;\n if (this.options?.onLoaded) {\n value = this.options.onLoaded(recaptcha);\n }\n\n subject.next(value);\n },\n });\n\n return subject;\n }\n}\n","import {\n AfterViewInit,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Output,\n} from \"@angular/core\";\nimport { Subscription } from \"rxjs\";\n\nimport { RecaptchaLoaderService } from \"./recaptcha-loader.service\";\nimport { RecaptchaSettings } from \"./recaptcha-settings\";\nimport { RECAPTCHA_SETTINGS } from \"./tokens\";\n\nlet nextId = 0;\n\nexport type NeverUndefined<T> = T extends undefined ? never : T;\n\nexport type RecaptchaErrorParameters = Parameters<NeverUndefined<ReCaptchaV2.Parameters[\"error-callback\"]>>;\n\n@Component({\n exportAs: \"reCaptcha\",\n selector: \"re-captcha\",\n template: ``,\n standalone: false,\n})\nexport class RecaptchaComponent implements AfterViewInit, OnDestroy {\n @Input()\n @HostBinding(\"attr.id\")\n public id = `ngrecaptcha-${nextId++}`;\n\n @Input() public siteKey?: string;\n @Input() public theme?: ReCaptchaV2.Theme;\n @Input() public type?: ReCaptchaV2.Type;\n @Input() public size?: ReCaptchaV2.Size;\n @Input() public tabIndex?: number;\n @Input() public badge?: ReCaptchaV2.Badge;\n @Input() public errorMode: \"handled\" | \"default\" = \"default\";\n\n @Output() public resolved = new EventEmitter<string | null>();\n /**\n * @deprecated `(error) output will be removed in the next major version. Use (errored) instead\n */\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() public error = new EventEmitter<RecaptchaErrorParameters>();\n @Output() public errored = new EventEmitter<RecaptchaErrorParameters>();\n\n /** @internal */\n private subscription: Subscription;\n /** @internal */\n private widget: number;\n /** @internal */\n private grecaptcha: ReCaptchaV2.ReCaptcha;\n /** @internal */\n private executeRequested: boolean;\n\n constructor(\n private elementRef: ElementRef<HTMLElement>,\n private loader: RecaptchaLoaderService,\n private zone: NgZone,\n @Optional() @Inject(RECAPTCHA_SETTINGS) settings?: RecaptchaSettings,\n ) {\n if (settings) {\n this.siteKey = settings.siteKey;\n this.theme = settings.theme;\n this.type = settings.type;\n this.size = settings.size;\n this.badge = settings.badge;\n }\n }\n\n public ngAfterViewInit(): void {\n this.subscription = this.loader.ready.subscribe((grecaptcha: ReCaptchaV2.ReCaptcha) => {\n if (grecaptcha != null && grecaptcha.render instanceof Function) {\n this.grecaptcha = grecaptcha;\n this.renderRecaptcha();\n }\n });\n }\n\n public ngOnDestroy(): void {\n // reset the captcha to ensure it does not leave anything behind\n // after the component is no longer needed\n this.grecaptchaReset();\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n\n /**\n * Executes the invisible recaptcha.\n * Does nothing if component's size is not set to \"invisible\".\n */\n public execute(): void {\n if (this.size !== \"invisible\") {\n return;\n }\n\n if (this.widget != null) {\n void this.grecaptcha.execute(this.widget);\n } else {\n // delay execution of recaptcha until it actually renders\n this.executeRequested = true;\n }\n }\n\n public reset(): void {\n if (this.widget != null) {\n if (this.grecaptcha.getResponse(this.widget)) {\n // Only emit an event in case if something would actually change.\n // That way we do not trigger \"touching\" of the control if someone does a \"reset\"\n // on a non-resolved captcha.\n this.resolved.emit(null);\n }\n\n this.grecaptchaReset();\n }\n }\n\n /**\n * ⚠️ Warning! Use this property at your own risk!\n *\n * While this member is `public`, it is not a part of the component's public API.\n * The semantic versioning guarantees _will not be honored_! Thus, you might find that this property behavior changes in incompatible ways in minor or even patch releases.\n * You are **strongly advised** against using this property.\n * Instead, use more idiomatic ways to get reCAPTCHA value, such as `resolved` EventEmitter, or form-bound methods (ngModel, formControl, and the likes).å\n */\n public get __unsafe_widgetValue(): string | null {\n return this.widget != null ? this.grecaptcha.getResponse(this.widget) : null;\n }\n\n /** @internal */\n private expired() {\n this.resolved.emit(null);\n }\n\n /** @internal */\n private onError(args: RecaptchaErrorParameters) {\n // eslint-disable-next-line deprecation/deprecation\n this.error.emit(args);\n this.errored.emit(args);\n }\n\n /** @internal */\n private captchaResponseCallback(response: string) {\n this.resolved.emit(response);\n }\n\n /** @internal */\n private grecaptchaReset() {\n if (this.widget != null) {\n this.zone.runOutsideAngular(() => this.grecaptcha.reset(this.widget));\n }\n }\n\n /** @internal */\n private renderRecaptcha() {\n // This `any` can be removed after @types/grecaptcha get updated\n const renderOptions: ReCaptchaV2.Parameters = {\n badge: this.badge,\n callback: (response: string) => {\n this.zone.run(() => this.captchaResponseCallback(response));\n },\n \"expired-callback\": () => {\n this.zone.run(() => this.expired());\n },\n sitekey: this.siteKey,\n size: this.size,\n tabindex: this.tabIndex,\n theme: this.theme,\n type: this.type,\n };\n\n if (this.errorMode === \"handled\") {\n renderOptions[\"error-callback\"] = (...args: RecaptchaErrorParameters) => {\n this.zone.run(() => this.onError(args));\n };\n }\n\n this.widget = this.grecaptcha.render(this.elementRef.nativeElement, renderOptions);\n\n if (this.executeRequested === true) {\n this.executeRequested = false;\n this.execute();\n }\n }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { RecaptchaComponent } from \"./recaptcha.component\";\n\n@NgModule({\n declarations: [RecaptchaComponent],\n exports: [RecaptchaComponent],\n})\nexport class RecaptchaCommonModule {}\n","import { NgModule } from \"@angular/core\";\n\nimport { RecaptchaCommonModule } from \"./recaptcha-common.module\";\nimport { RecaptchaLoaderService } from \"./recaptcha-loader.service\";\nimport { RecaptchaComponent } from \"./recaptcha.component\";\n\n@NgModule({\n exports: [RecaptchaComponent],\n imports: [RecaptchaCommonModule],\n providers: [RecaptchaLoaderService],\n})\nexport class RecaptchaModule {}\n","import { Inject, Injectable, NgZone } from \"@angular/core\";\nimport { Observable, Subject } from \"rxjs\";\n\nimport { RECAPTCHA_V3_SITE_KEY } from \"./tokens\";\nimport { RecaptchaLoaderService } from \"./recaptcha-loader.service\";\n\nexport interface OnExecuteData {\n /**\n * The name of the action that has been executed.\n */\n action: string;\n /**\n * The token that reCAPTCHA v3 provided when executing the action.\n */\n token: string;\n}\n\nexport interface OnExecuteErrorData {\n /**\n * The name of the action that has been executed.\n */\n action: string;\n /**\n * The error which was encountered\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n error: any;\n}\n\ntype ActionBacklogEntry = [string, Subject<string>];\n\n/**\n * The main service for working with reCAPTCHA v3 APIs.\n *\n * Use the `execute` method for executing a single action, and\n * `onExecute` observable for listening to all actions at once.\n */\n@Injectable()\nexport class ReCaptchaV3Service {\n /** @internal */\n private readonly siteKey: string;\n /** @internal */\n private readonly zone: NgZone;\n /** @internal */\n private actionBacklog: ActionBacklogEntry[] | undefined;\n /** @internal */\n private grecaptcha: ReCaptchaV2.ReCaptcha;\n\n /** @internal */\n private onExecuteSubject: Subject<OnExecuteData>;\n /** @internal */\n private onExecuteErrorSubject: Subject<OnExecuteErrorData>;\n /** @internal */\n private onExecuteObservable: Observable<OnExecuteData>;\n /** @internal */\n private onExecuteErrorObservable: Observable<OnExecuteErrorData>;\n\n constructor(\n zone: NgZone,\n public recaptchaLoader: RecaptchaLoaderService,\n @Inject(RECAPTCHA_V3_SITE_KEY) siteKey: string,\n ) {\n this.zone = zone;\n this.siteKey = siteKey;\n\n this.init();\n }\n\n public get onExecute(): Observable<OnExecuteData> {\n if (!this.onExecuteSubject) {\n this.onExecuteSubject = new Subject<OnExecuteData>();\n this.onExecuteObservable = this.onExecuteSubject.asObservable();\n }\n\n return this.onExecuteObservable;\n }\n\n public get onExecuteError(): Observable<OnExecuteErrorData> {\n if (!this.onExecuteErrorSubject) {\n this.onExecuteErrorSubject = new Subject<OnExecuteErrorData>();\n this.onExecuteErrorObservable = this.onExecuteErrorSubject.asObservable();\n }\n\n return this.onExecuteErrorObservable;\n }\n\n /**\n * Executes the provided `action` with reCAPTCHA v3 API.\n * Use the emitted token value for verification purposes on the backend.\n *\n * For more information about reCAPTCHA v3 actions and tokens refer to the official documentation at\n * https://developers.google.com/recaptcha/docs/v3.\n *\n * @param {string} action the action to execute\n * @returns {Observable<string>} an `Observable` that will emit the reCAPTCHA v3 string `token` value whenever ready.\n * The returned `Observable` completes immediately after emitting a value.\n */\n public execute(action: string): Observable<string> {\n const subject = new Subject<string>();\n if (!this.grecaptcha) {\n if (!this.actionBacklog) {\n this.actionBacklog = [];\n }\n\n this.actionBacklog.push([action, subject]);\n } else {\n this.executeActionWithSubject(action, subject);\n }\n\n return subject.asObservable();\n }\n\n /** @internal */\n private executeActionWithSubject(action: string, subject: Subject<string>): void {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const onError = (error: any) => {\n this.zone.run(() => {\n subject.error(error);\n if (this.onExecuteErrorSubject) {\n // We don't know any better at this point, unfortunately, so have to resort to `any`\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n this.onExecuteErrorSubject.next({ action, error });\n }\n });\n };\n\n this.zone.runOutsideAngular(() => {\n try {\n this.grecaptcha.execute(this.siteKey, { action }).then((token: string) => {\n this.zone.run(() => {\n subject.next(token);\n subject.complete();\n if (this.onExecuteSubject) {\n this.onExecuteSubject.next({ action, token });\n }\n });\n }, onError);\n } catch (e) {\n onError(e);\n }\n });\n }\n\n /** @internal */\n private init() {\n this.recaptchaLoader.ready.subscribe((value) => {\n this.grecaptcha = value;\n if (this.actionBacklog && this.actionBacklog.length > 0) {\n this.actionBacklog.forEach(([action, subject]) => this.executeActionWithSubject(action, subject));\n this.actionBacklog = undefined;\n }\n });\n }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { ReCaptchaV3Service } from \"./recaptcha-v3.service\";\nimport { RecaptchaLoaderService } from \"./recaptcha-loader.service\";\n\n@NgModule({\n providers: [ReCaptchaV3Service, RecaptchaLoaderService],\n})\nexport class RecaptchaV3Module {}\n","import { Directive, forwardRef, HostListener } from \"@angular/core\";\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from \"@angular/forms\";\n\nimport { RecaptchaComponent } from \"./recaptcha.component\";\n\n@Directive({\n providers: [\n {\n multi: true,\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RecaptchaValueAccessorDirective),\n },\n ],\n selector: \"re-captcha[formControlName],re-captcha[formControl],re-captcha[ngModel]\",\n standalone: false,\n})\nexport class RecaptchaValueAccessorDirective implements ControlValueAccessor {\n /** @internal */\n private onChange: (value: string | null) => void;\n\n /** @internal */\n private onTouched: () => void;\n\n private requiresControllerReset = false;\n\n constructor(private host: RecaptchaComponent) {}\n\n public writeValue(value: string): void {\n if (!value) {\n this.host.reset();\n } else {\n // In this case, it is most likely that a form controller has requested to write a specific value into the component.\n // This isn't really a supported case - reCAPTCHA values are single-use, and, in a sense, readonly.\n // What this means is that the form controller has recaptcha control state of X, while reCAPTCHA itself can't \"restore\"\n // to that state. In order to make form controller aware of this discrepancy, and to fix the said misalignment,\n // we'll be telling the controller to \"reset\" the value back to null.\n if (this.host.__unsafe_widgetValue !== value && Boolean(this.host.__unsafe_widgetValue) === false) {\n this.requiresControllerReset = true;\n }\n }\n }\n\n public registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n if (this.requiresControllerReset) {\n this.requiresControllerReset = false;\n this.onChange(null);\n }\n }\n public registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n @HostListener(\"resolved\", [\"$event\"]) public onResolve($event: string): void {\n if (this.onChange) {\n this.onChange($event);\n }\n if (this.onTouched) {\n this.onTouched();\n }\n }\n}\n","import { NgModule } from \"@angular/core\";\nimport { FormsModule } from \"@angular/forms\";\n\nimport { RecaptchaCommonModule } from \"./recaptcha-common.module\";\nimport { RecaptchaValueAccessorDirective } from \"./recaptcha-value-accessor.directive\";\n\n@NgModule({\n declarations: [RecaptchaValueAccessorDirective],\n exports: [RecaptchaValueAccessorDirective],\n imports: [FormsModule, RecaptchaCommonModule],\n})\nexport class RecaptchaFormsModule {}\n","/// <reference types=\"grecaptcha\" preserve=\"true\"/>\n\nexport { RecaptchaComponent, RecaptchaErrorParameters } from \"./lib/recaptcha.component\";\nexport { RecaptchaLoaderService } from \"./lib/recaptcha-loader.service\";\nexport { RecaptchaModule } from \"./lib/recaptcha.module\";\nexport { RecaptchaSettings } from \"./lib/recaptcha-settings\";\n\nexport { RecaptchaV3Module } from \"./lib/recaptcha-v3.module\";\nexport { OnExecuteData, OnExecuteErrorData, ReCaptchaV3Service } from \"./lib/recaptcha-v3.service\";\n\nexport { RecaptchaFormsModule } from \"./lib/recaptcha-forms.module\";\nexport { RecaptchaValueAccessorDirective } from \"./lib/recaptcha-value-accessor.directive\";\n\nexport {\n // eslint-disable-next-line deprecation/deprecation\n RECAPTCHA_LANGUAGE,\n // eslint-disable-next-line deprecation/deprecation\n RECAPTCHA_BASE_URL,\n // eslint-disable-next-line deprecation/deprecation\n RECAPTCHA_NONCE,\n RECAPTCHA_SETTINGS,\n RECAPTCHA_V3_SITE_KEY,\n RECAPTCHA_LOADER_OPTIONS,\n RecaptchaLoaderOptions,\n} from \"./lib/tokens\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.RecaptchaComponent"],"mappings":";;;;;;;AAIA;MACa,kBAAkB,GAAG,IAAI,cAAc,CAAS,oBAAoB;AACjF;MACa,kBAAkB,GAAG,IAAI,cAAc,CAAS,oBAAoB;AACjF;MACa,eAAe,GAAG,IAAI,cAAc,CAAS,qBAAqB;MAClE,kBAAkB,GAAG,IAAI,cAAc,CAAoB,oBAAoB;MAC/E,qBAAqB,GAAG,IAAI,cAAc,CAAS,uBAAuB;AAsGvF;;AAEG;MACU,wBAAwB,GAAG,IAAI,cAAc,CAAyB,0BAA0B;;AC1G7G,SAAS,UAAU,CACjB,UAAsB,EACtB,YAAwD,EACxD,QAAqD,EACrD,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,KAAsD,EAAE,EAAA;AAE1E,IAAA,MAAM,CAAC,kBAAkB,GAAG,MAAK;QAC/B,QAAQ,CAAC,UAAU,CAAC;AACtB,KAAC;IACD,MAAM,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC;AAC/C,IAAA,MAAM,CAAC,SAAS,GAAG,EAAE;IAErB,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,GAAG,YAAY,CAC7D,IAAI,GAAG,CAAC,GAAG,IAAI,yCAAyC,CAAC,CAC1D;IACD,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAU,KAAK,UAAU,GAAG,UAAU,GAAG,UAAU,CAAC,GAAG,CAAC;IAC3F,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,EAAE,oBAAoB,CAAC;IACxD,OAAO,CAAC,YAAY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,YAAY;uBAAC,UAAU,EAAE,CAAC,QAAQ,CAAC;;;MC1CzB,oBAAoB,CAAA;8GAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAApB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,iBAJhB,+BAA+B,CAAA,EAAA,OAAA,EAAA,CAEpC,WAAW,EAAE,qBAAqB,aADlC,+BAA+B,CAAA,EAAA,CAAA,CAAA;+GAG9B,oBAAoB,EAAA,OAAA,EAAA,CAFrB,WAAW,EAAE,qBAAqB,CAAA,EAAA,CAAA,CAAA;;2FAEjC,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBALhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,+BAA+B,CAAC;oBAC/C,OAAO,EAAE,CAAC,+BAA+B,CAAC;AAC1C,oBAAA,OAAO,EAAE,CAAC,WAAW,EAAE,qBAAqB,CAAC;AAC9C,iBAAA;;;ACVD;;ACAA;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-recaptcha-2.mjs","sources":["../../../projects/ng-recaptcha/src/lib/tokens.ts","../../../projects/ng-recaptcha/src/lib/load-script.ts","../../../projects/ng-recaptcha/src/lib/recaptcha-loader.service.ts","../../../projects/ng-recaptcha/src/lib/recaptcha.component.ts","../../../projects/ng-recaptcha/src/lib/recaptcha-common.module.ts","../../../projects/ng-recaptcha/src/lib/recaptcha.module.ts","../../../projects/ng-recaptcha/src/lib/recaptcha-v3.service.ts","../../../projects/ng-recaptcha/src/lib/recaptcha-v3.module.ts","../../../projects/ng-recaptcha/src/lib/recaptcha-value-accessor.directive.ts","../../../projects/ng-recaptcha/src/lib/recaptcha-forms.module.ts","../../../projects/ng-recaptcha/src/index.ts","../../../projects/ng-recaptcha/src/ng-recaptcha-2.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\n\nimport { RecaptchaSettings } from \"./recaptcha-settings\";\n\n/** @deprecated Use `LOADER_OPTIONS` instead. See `RecaptchaLoaderOptions.onBeforeLoad` */\nexport const RECAPTCHA_LANGUAGE = new InjectionToken<string>(\"recaptcha-language\");\n/** @deprecated Use `LOADER_OPTIONS` instead. See `RecaptchaLoaderOptions.onBeforeLoad` */\nexport const RECAPTCHA_BASE_URL = new InjectionToken<string>(\"recaptcha-base-url\");\n/** @deprecated Use `LOADER_OPTIONS` instead. See `RecaptchaLoaderOptions.onBeforeLoad` */\nexport const RECAPTCHA_NONCE = new InjectionToken<string>(\"recaptcha-nonce-tag\");\nexport const RECAPTCHA_SETTINGS = new InjectionToken<RecaptchaSettings>(\"recaptcha-settings\");\nexport const RECAPTCHA_V3_SITE_KEY = new InjectionToken<string>(\"recaptcha-v3-site-key\");\n\n/**\n * Specifies the options for loading the reCAPTCHA script tag.\n */\nexport type RecaptchaLoaderOptions = {\n /**\n * Invoked before the `<script>` tag is appended to the DOM.\n * Use this function as an opportunity to set `nonce`, as well as modify the URL of the tag.\n *\n * Use the `url.searchParams` to set additional query string attributes (including reCAPTCHA language),\n * or use an entirely different base URL altogether.\n *\n * The URL that you provide will then properly set the `\"render\"` and `\"onload\"` attributes which are required for proper `ng-recaptcha` wire-up.\n *\n * @param url the current URL that was composed. Either modify it in-place, or return a completely new URL.\n * @returns the final URL that is going to be used as the `src` for the `<script>` tag, along with (optionally) a nonce.\n *\n * @example\n * Provide nonce:\n * ```ts\n * {\n * provide: RECAPTCHA_LOADER_OPTIONS,\n * useValue: {\n * onBeforeLoad(url) {\n * return {\n * url,\n * nonce: \"YOUR_NONCE\"\n * };\n * }\n * }\n * }\n * ```\n *\n * Set the reCAPTCHA language:\n * ```ts\n * {\n * provide: RECAPTCHA_LOADER_OPTIONS,\n * useValue: {\n * onBeforeLoad(url) {\n * url.searchParams.set(\"hl\", \"en-GB\")\n *\n * return { url };\n * }\n * }\n * }\n * ```\n *\n * Use a different base URL for loading reCAPTCHA\n * ```ts\n * {\n * provide: RECAPTCHA_LOADER_OPTIONS,\n * useValue: {\n * onBeforeLoad(_url) {\n * const chinaCompatibleUrl = new URL(\"https://www.recaptcha.net/recaptcha/api.js\");\n * // optionally, set the locale:\n * // chinaCompatibleUrl.searchParams.set(\"hl\", \"zh-CN\");\n *\n * return {\n * url: chinaCompatibleUrl\n * };\n * }\n * }\n * }\n * ```\n */\n onBeforeLoad?(url: URL): { url: URL; nonce?: string };\n\n /**\n * Allows you to change the `grecaptcha` that the `ng-recaptcha` will be relying on.\n * This method is useful when you need to use `grecaptcha.enterprise` instead of the base `grecaptcha`\n *\n * @param recaptcha the value of `window.grecaptcha` upon script load.\n * @returns the {ReCaptchaV2.ReCaptcha} instance that the `ng-recaptcha` lib will use.\n *\n * @example\n * Using the Enterprise version of `grecaptcha`:\n *\n * ```ts\n * {\n * provide: RECAPTCHA_LOADER_OPTIONS,\n * useValue: {\n * onBeforeLoad() {\n * const recaptchaEnterpriseUrl = new URL(\"https://www.google.com/recaptcha/enterprise.js\");\n * // optionally, if you're using the reCAPTCHA session-tokens, set the `&waf=session` param,\n * // see https://cloud.google.com/recaptcha-enterprise/docs/implement-waf-ca#session-token\n * // recaptchaEnterpriseUrl.searchParams.set(\"waf\", \"session\");\n *\n * return {\n * url: recaptchaEnterpriseUrl,\n * }\n * },\n * onLoaded(recaptcha) {\n * return recaptcha.enterprise;\n * }\n * }\n * }\n * ```\n */\n onLoaded?(recaptcha: ReCaptchaV2.ReCaptcha): ReCaptchaV2.ReCaptcha;\n};\n\n/**\n * See the documentation for `RecaptchaLoaderOptions`.\n */\nexport const RECAPTCHA_LOADER_OPTIONS = new InjectionToken<RecaptchaLoaderOptions>(\"recaptcha-loader-options\");\n","import { RecaptchaLoaderOptions } from \"./tokens\";\n\ndeclare global {\n interface Window {\n ng2recaptchaloaded?(): void;\n }\n}\n\nexport type RenderMode = \"explicit\" | { key: string };\n\nfunction loadScript(\n this: void,\n renderMode: RenderMode,\n onBeforeLoad: (url: URL) => { url: URL; nonce?: string },\n onLoaded: (grecaptcha: ReCaptchaV2.ReCaptcha) => void,\n { url, lang, nonce }: { url?: string; lang?: string; nonce?: string } = {},\n): void {\n window.ng2recaptchaloaded = () => {\n onLoaded(grecaptcha);\n };\n const script = document.createElement(\"script\");\n script.innerHTML = \"\";\n\n const { url: baseUrl, nonce: onBeforeLoadNonce } = onBeforeLoad(\n new URL(url || \"https://www.google.com/recaptcha/api.js\"),\n );\n baseUrl.searchParams.set(\"render\", renderMode === \"explicit\" ? renderMode : renderMode.key);\n baseUrl.searchParams.set(\"onload\", \"ng2recaptchaloaded\");\n baseUrl.searchParams.set(\"trustedtypes\", \"true\");\n if (lang) {\n baseUrl.searchParams.set(\"hl\", lang);\n }\n\n script.src = baseUrl.href;\n\n const nonceValue = onBeforeLoadNonce || nonce;\n\n if (nonceValue) {\n script.setAttribute(\"nonce\", nonceValue);\n }\n script.async = true;\n script.defer = true;\n document.head.appendChild(script);\n}\n\nfunction newLoadScript(this:void, {\n v3SiteKey,\n onBeforeLoad,\n onLoaded,\n}: { v3SiteKey: string | undefined; onLoaded(recaptcha: ReCaptchaV2.ReCaptcha): void } & Pick<\n Required<RecaptchaLoaderOptions>,\n \"onBeforeLoad\"\n>) {\n const renderMode: RenderMode = v3SiteKey ? { key: v3SiteKey } : \"explicit\";\n\n loader.loadScript(renderMode, onBeforeLoad, onLoaded);\n}\n\nexport const loader = { loadScript, newLoadScript };\n","import { isPlatformBrowser } from \"@angular/common\";\nimport { Inject, Injectable, Optional, PLATFORM_ID } from \"@angular/core\";\nimport { BehaviorSubject, Observable, of } from \"rxjs\";\nimport { filter } from \"rxjs/operators\";\n\nimport { loader } from \"./load-script\";\nimport {\n RECAPTCHA_LOADER_OPTIONS,\n RECAPTCHA_BASE_URL,\n RECAPTCHA_LANGUAGE,\n RECAPTCHA_NONCE,\n RECAPTCHA_V3_SITE_KEY,\n RecaptchaLoaderOptions,\n} from \"./tokens\";\n\nfunction toNonNullObservable<T>(subject: BehaviorSubject<T | null>): Observable<T> {\n return subject.asObservable().pipe(filter<T>((value) => value !== null));\n}\n\n@Injectable()\nexport class RecaptchaLoaderService {\n /**\n * @internal\n * @nocollapse\n */\n private static ready: BehaviorSubject<ReCaptchaV2.ReCaptcha | null> | null = null;\n\n public ready: Observable<ReCaptchaV2.ReCaptcha>;\n\n /** @internal */\n private language?: string;\n /** @internal */\n private baseUrl?: string;\n /** @internal */\n private nonce?: string;\n /** @internal */\n private v3SiteKey?: string;\n /** @internal */\n private options?: RecaptchaLoaderOptions;\n\n constructor(\n // eslint-disable-next-line @typescript-eslint/ban-types\n @Inject(PLATFORM_ID) private readonly platformId: Object,\n // eslint-disable-next-line deprecation/deprecation\n @Optional() @Inject(RECAPTCHA_LANGUAGE) language?: string,\n // eslint-disable-next-line deprecation/deprecation\n @Optional() @Inject(RECAPTCHA_BASE_URL) baseUrl?: string,\n // eslint-disable-next-line deprecation/deprecation\n @Optional() @Inject(RECAPTCHA_NONCE) nonce?: string,\n @Optional() @Inject(RECAPTCHA_V3_SITE_KEY) v3SiteKey?: string,\n @Optional() @Inject(RECAPTCHA_LOADER_OPTIONS) options?: RecaptchaLoaderOptions,\n ) {\n this.language = language;\n this.baseUrl = baseUrl;\n this.nonce = nonce;\n this.v3SiteKey = v3SiteKey;\n this.options = options;\n const subject = this.init();\n this.ready = subject ? toNonNullObservable(subject) : of();\n }\n\n /** @internal */\n private init(): BehaviorSubject<ReCaptchaV2.ReCaptcha | null> | undefined {\n if (RecaptchaLoaderService.ready) {\n return RecaptchaLoaderService.ready;\n }\n\n if (!isPlatformBrowser(this.platformId)) {\n return undefined;\n }\n\n const subject = new BehaviorSubject<ReCaptchaV2.ReCaptcha | null>(null);\n RecaptchaLoaderService.ready = subject;\n\n loader.newLoadScript({\n v3SiteKey: this.v3SiteKey,\n onBeforeLoad: (url) => {\n if (this.options?.onBeforeLoad) {\n return this.options.onBeforeLoad(url);\n }\n\n const newUrl = new URL(this.baseUrl ?? url);\n\n if (this.language) {\n newUrl.searchParams.set(\"hl\", this.language);\n }\n\n return {\n url: newUrl,\n nonce: this.nonce,\n };\n },\n onLoaded: (recaptcha) => {\n let value = recaptcha;\n if (this.options?.onLoaded) {\n value = this.options.onLoaded(recaptcha);\n }\n\n subject.next(value);\n },\n });\n\n return subject;\n }\n}\n","import {\n AfterViewInit,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Output,\n} from \"@angular/core\";\nimport { Subscription } from \"rxjs\";\n\nimport { RecaptchaLoaderService } from \"./recaptcha-loader.service\";\nimport { RecaptchaSettings } from \"./recaptcha-settings\";\nimport { RECAPTCHA_SETTINGS } from \"./tokens\";\n\nlet nextId = 0;\n\nexport type NeverUndefined<T> = T extends undefined ? never : T;\n\nexport type RecaptchaErrorParameters = Parameters<NeverUndefined<ReCaptchaV2.Parameters[\"error-callback\"]>>;\n\n@Component({\n exportAs: \"reCaptcha\",\n selector: \"re-captcha\",\n template: ``,\n standalone: false,\n})\nexport class RecaptchaComponent implements AfterViewInit, OnDestroy {\n @Input()\n @HostBinding(\"attr.id\")\n public id = `ngrecaptcha-${nextId++}`;\n\n @Input() public siteKey?: string;\n @Input() public theme?: ReCaptchaV2.Theme;\n @Input() public type?: ReCaptchaV2.Type;\n @Input() public size?: ReCaptchaV2.Size;\n @Input() public tabIndex?: number;\n @Input() public badge?: ReCaptchaV2.Badge;\n @Input() public errorMode: \"handled\" | \"default\" = \"default\";\n\n @Output() public resolved = new EventEmitter<string | null>();\n /**\n * @deprecated `(error) output will be removed in the next major version. Use (errored) instead\n */\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() public error = new EventEmitter<RecaptchaErrorParameters>();\n @Output() public errored = new EventEmitter<RecaptchaErrorParameters>();\n\n /** @internal */\n private subscription: Subscription;\n /** @internal */\n private widget: number;\n /** @internal */\n private grecaptcha: ReCaptchaV2.ReCaptcha;\n /** @internal */\n private executeRequested: boolean;\n\n constructor(\n private elementRef: ElementRef<HTMLElement>,\n private loader: RecaptchaLoaderService,\n private zone: NgZone,\n @Optional() @Inject(RECAPTCHA_SETTINGS) settings?: RecaptchaSettings,\n ) {\n if (settings) {\n this.siteKey = settings.siteKey;\n this.theme = settings.theme;\n this.type = settings.type;\n this.size = settings.size;\n this.badge = settings.badge;\n }\n }\n\n public ngAfterViewInit(): void {\n this.subscription = this.loader.ready.subscribe((grecaptcha: ReCaptchaV2.ReCaptcha) => {\n if (grecaptcha != null && grecaptcha.render instanceof Function) {\n this.grecaptcha = grecaptcha;\n this.renderRecaptcha();\n }\n });\n }\n\n public ngOnDestroy(): void {\n // reset the captcha to ensure it does not leave anything behind\n // after the component is no longer needed\n this.grecaptchaReset();\n if (this.subscription) {\n this.subscription.unsubscribe();\n }\n }\n\n /**\n * Executes the invisible recaptcha.\n * Does nothing if component's size is not set to \"invisible\".\n */\n public execute(): void {\n if (this.size !== \"invisible\") {\n return;\n }\n\n if (this.widget != null) {\n void this.grecaptcha.execute(this.widget);\n } else {\n // delay execution of recaptcha until it actually renders\n this.executeRequested = true;\n }\n }\n\n public reset(): void {\n if (this.widget != null) {\n if (this.grecaptcha.getResponse(this.widget)) {\n // Only emit an event in case if something would actually change.\n // That way we do not trigger \"touching\" of the control if someone does a \"reset\"\n // on a non-resolved captcha.\n this.resolved.emit(null);\n }\n\n this.grecaptchaReset();\n }\n }\n\n /**\n * ⚠️ Warning! Use this property at your own risk!\n *\n * While this member is `public`, it is not a part of the component's public API.\n * The semantic versioning guarantees _will not be honored_! Thus, you might find that this property behavior changes in incompatible ways in minor or even patch releases.\n * You are **strongly advised** against using this property.\n * Instead, use more idiomatic ways to get reCAPTCHA value, such as `resolved` EventEmitter, or form-bound methods (ngModel, formControl, and the likes).å\n */\n public get __unsafe_widgetValue(): string | null {\n return this.widget != null ? this.grecaptcha.getResponse(this.widget) : null;\n }\n\n /** @internal */\n private expired() {\n this.resolved.emit(null);\n }\n\n /** @internal */\n private onError(args: RecaptchaErrorParameters) {\n // eslint-disable-next-line deprecation/deprecation\n this.error.emit(args);\n this.errored.emit(args);\n }\n\n /** @internal */\n private captchaResponseCallback(response: string) {\n this.resolved.emit(response);\n }\n\n /** @internal */\n private grecaptchaReset() {\n if (this.widget != null) {\n this.zone.runOutsideAngular(() => this.grecaptcha.reset(this.widget));\n }\n }\n\n /** @internal */\n private renderRecaptcha() {\n // This `any` can be removed after @types/grecaptcha get updated\n const renderOptions: ReCaptchaV2.Parameters = {\n badge: this.badge,\n callback: (response: string) => {\n this.zone.run(() => this.captchaResponseCallback(response));\n },\n \"expired-callback\": () => {\n this.zone.run(() => this.expired());\n },\n sitekey: this.siteKey,\n size: this.size,\n tabindex: this.tabIndex,\n theme: this.theme,\n type: this.type,\n };\n\n if (this.errorMode === \"handled\") {\n renderOptions[\"error-callback\"] = (...args: RecaptchaErrorParameters) => {\n this.zone.run(() => this.onError(args));\n };\n }\n\n this.widget = this.grecaptcha.render(this.elementRef.nativeElement, renderOptions);\n\n if (this.executeRequested === true) {\n this.executeRequested = false;\n this.execute();\n }\n }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { RecaptchaComponent } from \"./recaptcha.component\";\n\n@NgModule({\n declarations: [RecaptchaComponent],\n exports: [RecaptchaComponent],\n})\nexport class RecaptchaCommonModule {}\n","import { NgModule } from \"@angular/core\";\n\nimport { RecaptchaCommonModule } from \"./recaptcha-common.module\";\nimport { RecaptchaLoaderService } from \"./recaptcha-loader.service\";\nimport { RecaptchaComponent } from \"./recaptcha.component\";\n\n@NgModule({\n exports: [RecaptchaComponent],\n imports: [RecaptchaCommonModule],\n providers: [RecaptchaLoaderService],\n})\nexport class RecaptchaModule {}\n","import { Inject, Injectable, NgZone } from \"@angular/core\";\nimport { Observable, Subject } from \"rxjs\";\n\nimport { RECAPTCHA_V3_SITE_KEY } from \"./tokens\";\nimport { RecaptchaLoaderService } from \"./recaptcha-loader.service\";\n\nexport interface OnExecuteData {\n /**\n * The name of the action that has been executed.\n */\n action: string;\n /**\n * The token that reCAPTCHA v3 provided when executing the action.\n */\n token: string;\n}\n\nexport interface OnExecuteErrorData {\n /**\n * The name of the action that has been executed.\n */\n action: string;\n /**\n * The error which was encountered\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n error: any;\n}\n\ntype ActionBacklogEntry = [string, Subject<string>];\n\n/**\n * The main service for working with reCAPTCHA v3 APIs.\n *\n * Use the `execute` method for executing a single action, and\n * `onExecute` observable for listening to all actions at once.\n */\n@Injectable()\nexport class ReCaptchaV3Service {\n /** @internal */\n private readonly siteKey: string;\n /** @internal */\n private readonly zone: NgZone;\n /** @internal */\n private actionBacklog: ActionBacklogEntry[] | undefined;\n /** @internal */\n private grecaptcha: ReCaptchaV2.ReCaptcha;\n\n /** @internal */\n private onExecuteSubject: Subject<OnExecuteData>;\n /** @internal */\n private onExecuteErrorSubject: Subject<OnExecuteErrorData>;\n /** @internal */\n private onExecuteObservable: Observable<OnExecuteData>;\n /** @internal */\n private onExecuteErrorObservable: Observable<OnExecuteErrorData>;\n\n constructor(\n zone: NgZone,\n public recaptchaLoader: RecaptchaLoaderService,\n @Inject(RECAPTCHA_V3_SITE_KEY) siteKey: string,\n ) {\n this.zone = zone;\n this.siteKey = siteKey;\n\n this.init();\n }\n\n public get onExecute(): Observable<OnExecuteData> {\n if (!this.onExecuteSubject) {\n this.onExecuteSubject = new Subject<OnExecuteData>();\n this.onExecuteObservable = this.onExecuteSubject.asObservable();\n }\n\n return this.onExecuteObservable;\n }\n\n public get onExecuteError(): Observable<OnExecuteErrorData> {\n if (!this.onExecuteErrorSubject) {\n this.onExecuteErrorSubject = new Subject<OnExecuteErrorData>();\n this.onExecuteErrorObservable = this.onExecuteErrorSubject.asObservable();\n }\n\n return this.onExecuteErrorObservable;\n }\n\n /**\n * Executes the provided `action` with reCAPTCHA v3 API.\n * Use the emitted token value for verification purposes on the backend.\n *\n * For more information about reCAPTCHA v3 actions and tokens refer to the official documentation at\n * https://developers.google.com/recaptcha/docs/v3.\n *\n * @param {string} action the action to execute\n * @returns {Observable<string>} an `Observable` that will emit the reCAPTCHA v3 string `token` value whenever ready.\n * The returned `Observable` completes immediately after emitting a value.\n */\n public execute(action: string): Observable<string> {\n const subject = new Subject<string>();\n if (!this.grecaptcha) {\n if (!this.actionBacklog) {\n this.actionBacklog = [];\n }\n\n this.actionBacklog.push([action, subject]);\n } else {\n this.executeActionWithSubject(action, subject);\n }\n\n return subject.asObservable();\n }\n\n /** @internal */\n private executeActionWithSubject(action: string, subject: Subject<string>): void {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const onError = (error: any) => {\n this.zone.run(() => {\n subject.error(error);\n if (this.onExecuteErrorSubject) {\n // We don't know any better at this point, unfortunately, so have to resort to `any`\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n this.onExecuteErrorSubject.next({ action, error });\n }\n });\n };\n\n this.zone.runOutsideAngular(() => {\n try {\n this.grecaptcha.execute(this.siteKey, { action }).then((token: string) => {\n this.zone.run(() => {\n subject.next(token);\n subject.complete();\n if (this.onExecuteSubject) {\n this.onExecuteSubject.next({ action, token });\n }\n });\n }, onError);\n } catch (e) {\n onError(e);\n }\n });\n }\n\n /** @internal */\n private init() {\n this.recaptchaLoader.ready.subscribe((value) => {\n this.grecaptcha = value;\n if (this.actionBacklog && this.actionBacklog.length > 0) {\n this.actionBacklog.forEach(([action, subject]) => this.executeActionWithSubject(action, subject));\n this.actionBacklog = undefined;\n }\n });\n }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { ReCaptchaV3Service } from \"./recaptcha-v3.service\";\nimport { RecaptchaLoaderService } from \"./recaptcha-loader.service\";\n\n@NgModule({\n providers: [ReCaptchaV3Service, RecaptchaLoaderService],\n})\nexport class RecaptchaV3Module {}\n","import { Directive, forwardRef, HostListener } from \"@angular/core\";\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from \"@angular/forms\";\n\nimport { RecaptchaComponent } from \"./recaptcha.component\";\n\n@Directive({\n providers: [\n {\n multi: true,\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RecaptchaValueAccessorDirective),\n },\n ],\n selector: \"re-captcha[formControlName],re-captcha[formControl],re-captcha[ngModel]\",\n standalone: false,\n})\nexport class RecaptchaValueAccessorDirective implements ControlValueAccessor {\n /** @internal */\n private onChange: (value: string | null) => void;\n\n /** @internal */\n private onTouched: () => void;\n\n private requiresControllerReset = false;\n\n constructor(private host: RecaptchaComponent) {}\n\n public writeValue(value: string): void {\n if (!value) {\n this.host.reset();\n } else {\n // In this case, it is most likely that a form controller has requested to write a specific value into the component.\n // This isn't really a supported case - reCAPTCHA values are single-use, and, in a sense, readonly.\n // What this means is that the form controller has recaptcha control state of X, while reCAPTCHA itself can't \"restore\"\n // to that state. In order to make form controller aware of this discrepancy, and to fix the said misalignment,\n // we'll be telling the controller to \"reset\" the value back to null.\n if (this.host.__unsafe_widgetValue !== value && Boolean(this.host.__unsafe_widgetValue) === false) {\n this.requiresControllerReset = true;\n }\n }\n }\n\n public registerOnChange(fn: (value: string) => void): void {\n this.onChange = fn;\n if (this.requiresControllerReset) {\n this.requiresControllerReset = false;\n this.onChange(null);\n }\n }\n public registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n @HostListener(\"resolved\", [\"$event\"]) public onResolve($event: string): void {\n if (this.onChange) {\n this.onChange($event);\n }\n if (this.onTouched) {\n this.onTouched();\n }\n }\n}\n","import { NgModule } from \"@angular/core\";\nimport { FormsModule } from \"@angular/forms\";\n\nimport { RecaptchaCommonModule } from \"./recaptcha-common.module\";\nimport { RecaptchaValueAccessorDirective } from \"./recaptcha-value-accessor.directive\";\n\n@NgModule({\n declarations: [RecaptchaValueAccessorDirective],\n exports: [RecaptchaValueAccessorDirective],\n imports: [FormsModule, RecaptchaCommonModule],\n})\nexport class RecaptchaFormsModule {}\n","/// <reference types=\"grecaptcha\" preserve=\"true\"/>\n\nexport { RecaptchaComponent, RecaptchaErrorParameters } from \"./lib/recaptcha.component\";\nexport { RecaptchaLoaderService } from \"./lib/recaptcha-loader.service\";\nexport { RecaptchaModule } from \"./lib/recaptcha.module\";\nexport { RecaptchaSettings } from \"./lib/recaptcha-settings\";\n\nexport { RecaptchaV3Module } from \"./lib/recaptcha-v3.module\";\nexport { OnExecuteData, OnExecuteErrorData, ReCaptchaV3Service } from \"./lib/recaptcha-v3.service\";\n\nexport { RecaptchaFormsModule } from \"./lib/recaptcha-forms.module\";\nexport { RecaptchaValueAccessorDirective } from \"./lib/recaptcha-value-accessor.directive\";\n\nexport {\n // eslint-disable-next-line deprecation/deprecation\n RECAPTCHA_LANGUAGE,\n // eslint-disable-next-line deprecation/deprecation\n RECAPTCHA_BASE_URL,\n // eslint-disable-next-line deprecation/deprecation\n RECAPTCHA_NONCE,\n RECAPTCHA_SETTINGS,\n RECAPTCHA_V3_SITE_KEY,\n RECAPTCHA_LOADER_OPTIONS,\n RecaptchaLoaderOptions,\n} from \"./lib/tokens\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.RecaptchaComponent"],"mappings":";;;;;;;AAIA;MACa,kBAAkB,GAAG,IAAI,cAAc,CAAS,oBAAoB;AACjF;MACa,kBAAkB,GAAG,IAAI,cAAc,CAAS,oBAAoB;AACjF;MACa,eAAe,GAAG,IAAI,cAAc,CAAS,qBAAqB;MAClE,kBAAkB,GAAG,IAAI,cAAc,CAAoB,oBAAoB;MAC/E,qBAAqB,GAAG,IAAI,cAAc,CAAS,uBAAuB;AAsGvF;;AAEG;MACU,wBAAwB,GAAG,IAAI,cAAc,CAAyB,0BAA0B;;AC1G7G,SAAS,UAAU,CAEjB,UAAsB,EACtB,YAAwD,EACxD,QAAqD,EACrD,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,KAAsD,EAAE,EAAA;AAE1E,IAAA,MAAM,CAAC,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