@everymatrix/general-registration 1.94.21 → 1.94.22

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.
@@ -2,7 +2,8 @@ import { h } from "@stencil/core";
2
2
  import { getTranslations, translate, TRANSLATIONS, DEFAULT_LANGUAGE, CONSTANTS } from "../../utils/locale.utils";
3
3
  import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
4
4
  import { dispatchCustomEvent } from "../../../../../../../../libs/custom-events/src/index";
5
- import { checkEmptyValue } from "../../../../../../../../libs/common/src/utils/index";
5
+ import { checkEmptyValue, getSlottedElement } from "../../../../../../../../libs/common/src/utils/index";
6
+ import { createTurnstile, TURNSTILE_TOKEN_RESPONSE_HEADER, TURNSTILE_IS_VISIBLE_HEADER, CAPTCHA_CONTAINER_SLOT, } from "../../../../../../../../libs/common/src/captcha/index";
6
7
  import "../../../../../general-input/dist/types/index";
7
8
  import "../../../../../../svelte/player-consents/es2015/player-consents";
8
9
  export class GeneralRegistration {
@@ -10,6 +11,7 @@ export class GeneralRegistration {
10
11
  this.isSelectingAddress = false;
11
12
  this.lastPostalCode = null;
12
13
  this.isRestoringAfterError = false;
14
+ this.captchaInstance = null;
13
15
  this.selectedCountry = '';
14
16
  this.listOfInputValues = [];
15
17
  this.listOfInputValidity = [];
@@ -54,6 +56,7 @@ export class GeneralRegistration {
54
56
  this.enableManualDateInput = false;
55
57
  this.enableCustomRegexValidation = false;
56
58
  this.gmversion = '';
59
+ this.turnstileSiteKey = undefined;
57
60
  this.errorMessage = '';
58
61
  this.isFormValid = false;
59
62
  this.isConsentValid = false;
@@ -273,9 +276,14 @@ export class GeneralRegistration {
273
276
  this.registrationWidgetLoaded.emit();
274
277
  window.postMessage({ type: 'registrationWidgetLoaded' }, window.location.href);
275
278
  this.handleClientStyling();
279
+ if (this.turnstileSiteKey)
280
+ this.initializeCaptcha();
276
281
  }
277
282
  disconnectedCallback() {
283
+ var _a, _b;
278
284
  this.stylingSubscription && this.stylingSubscription.unsubscribe();
285
+ if (this.turnstileSiteKey)
286
+ (_b = (_a = this.captchaInstance) === null || _a === void 0 ? void 0 : _a.cleanup) === null || _b === void 0 ? void 0 : _b.call(_a);
279
287
  }
280
288
  /**
281
289
  * This function produces the conditionalValidationMap object presented below
@@ -461,6 +469,16 @@ export class GeneralRegistration {
461
469
  }
462
470
  }, window.location.href);
463
471
  }
472
+ async initializeCaptcha() {
473
+ if (!this.turnstileSiteKey)
474
+ return;
475
+ const captchaContainerEl = getSlottedElement(this.host, CAPTCHA_CONTAINER_SLOT);
476
+ this.captchaInstance = createTurnstile({
477
+ action: 'login',
478
+ siteKey: this.turnstileSiteKey,
479
+ });
480
+ await this.captchaInstance.render(captchaContainerEl);
481
+ }
464
482
  getRegisterConfig(registrationID) {
465
483
  const configPath = this.gmversion === 'gm2'
466
484
  ? '/api/pam/v2/legislation/register/config'
@@ -682,18 +700,39 @@ export class GeneralRegistration {
682
700
  }
683
701
  return acceptedConsents;
684
702
  }
685
- setRegister() {
703
+ async setRegister() {
704
+ var _a;
686
705
  this.isLoading = true;
687
706
  this.registerErrors = false;
688
- const registerPath = this.gmversion === 'gm2'
707
+ const isGm2 = this.gmversion === 'gm2';
708
+ const turnstileEnabled = this.turnstileSiteKey && this.captchaInstance && !isGm2;
709
+ const registerPath = isGm2
689
710
  ? '/api/pam/v2/legislation/register'
690
711
  : '/v1/player/legislation/register/';
691
712
  const url = new URL(`${this.endpoint}${registerPath}`);
692
713
  const headers = new Headers();
693
714
  headers.append('Content-Type', 'application/json');
694
715
  headers.append('Accept', 'application/json');
716
+ if (turnstileEnabled) {
717
+ try {
718
+ const token = await ((_a = this.captchaInstance) === null || _a === void 0 ? void 0 : _a.ensureToken());
719
+ headers.append(TURNSTILE_TOKEN_RESPONSE_HEADER, token !== null && token !== void 0 ? token : "");
720
+ headers.append(TURNSTILE_IS_VISIBLE_HEADER, "false");
721
+ }
722
+ catch (error) {
723
+ this.registerErrors = true;
724
+ this.isLoading = false;
725
+ if (error !== null) {
726
+ this.errorMessage = translate(`generalError`, this.language);
727
+ window.postMessage({ type: 'registrationFailed', errorMessage: this.errorMessage }, window.location.href);
728
+ this.triggerNotification(this.errorMessage);
729
+ dispatchCustomEvent('register_fail', { error: this.errorMessage });
730
+ }
731
+ return;
732
+ }
733
+ }
695
734
  const options = {
696
- method: this.gmversion === 'gm2' ? 'POST' : 'PUT',
735
+ method: isGm2 ? 'POST' : 'PUT',
697
736
  body: JSON.stringify({ registrationId: this.registrationID }),
698
737
  headers
699
738
  };
@@ -743,7 +782,10 @@ export class GeneralRegistration {
743
782
  console.error(err);
744
783
  })
745
784
  .finally(() => {
785
+ var _a;
746
786
  this.isLoading = false;
787
+ if (turnstileEnabled)
788
+ (_a = this.captchaInstance) === null || _a === void 0 ? void 0 : _a.reset();
747
789
  });
748
790
  }
749
791
  formatConfig(config) {
@@ -1018,13 +1060,11 @@ export class GeneralRegistration {
1018
1060
  && h("svg", { class: "spinner", viewBox: "0 0 50 50" }, h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "5" })), !this.isLoadingPOST && h("div", { class: `registration__buttons-wrapper ${this.autofilled ? 'registration__buttons-wrapper--autofilled' : ''}` }, h("button", { class: `registration__button registration__button--next ${this.isFormValid ? '' : 'registration__button--disabled'}`, type: 'submit', form: `RegistrationForm${this.registrationStep}`, onClick: (e) => this.nextHandler(e), disabled: !this.isFormValid }, this.lastStep === this.registrationStep ? translate('doneButton', this.language) : translate('nextButton', this.language)), h("button", { class: `registration__button registration__button--back ${this.registrationStep == 'Step1' ? 'registration__button--first-step' : ''}`, onClick: (e) => this.backHandler(e) }, translate('backButton', this.language)))));
1019
1061
  }
1020
1062
  render() {
1021
- if (this.isLoading && !this.registerErrors) {
1022
- return h("p", { class: `registration registration__loading-message` }, translate('loadingMessage', this.language));
1023
- }
1024
- else if (!this.isLoading && this.registerErrors) {
1025
- return this.renderErrorMessage(this.errorMessage);
1026
- }
1027
- return (h("div", { ref: (el) => (this.stylingContainer = el), class: `registration registration__${this.registrationStep}` }, this.renderForm(), !this.buttonInsideForm && this.renderButtons()));
1063
+ const isLoading = this.isLoading && !this.registerErrors;
1064
+ const isError = !this.isLoading && this.registerErrors;
1065
+ const showForm = !(isLoading || isError);
1066
+ return (h("div", { key: 'f9c3c3d27ba6d0f0a38802dae5cc59a3d92e80ce', ref: (el) => (this.stylingContainer = el), class: `registration registration__${this.registrationStep}` }, isLoading && h("p", { key: 'a9264b766c150388bc3c1711eec78c25b5c03398', class: `registration registration__loading-message` }, translate('loadingMessage', this.language)), isError && this.renderErrorMessage(this.errorMessage), showForm && this.renderForm(), showForm && !this.buttonInsideForm && this.renderButtons(), this.turnstileSiteKey &&
1067
+ h("div", { key: '43b923b05cebe033ac4b186f9101c6d24d2f54bb', class: "captcha-wrapper" }, h("slot", { key: '386643816479c11f6c0856aa4ca82c87e5878bc4', name: CAPTCHA_CONTAINER_SLOT }))));
1028
1068
  }
1029
1069
  static get is() { return "general-registration"; }
1030
1070
  static get encapsulation() { return "shadow"; }
@@ -1305,6 +1345,23 @@ export class GeneralRegistration {
1305
1345
  "attribute": "gmversion",
1306
1346
  "reflect": true,
1307
1347
  "defaultValue": "''"
1348
+ },
1349
+ "turnstileSiteKey": {
1350
+ "type": "string",
1351
+ "mutable": false,
1352
+ "complexType": {
1353
+ "original": "string",
1354
+ "resolved": "string",
1355
+ "references": {}
1356
+ },
1357
+ "required": false,
1358
+ "optional": true,
1359
+ "docs": {
1360
+ "tags": [],
1361
+ "text": "Cloudflare Turnstile site key.\nActs as the enable/disable flag for Turnstile."
1362
+ },
1363
+ "attribute": "turnstile-site-key",
1364
+ "reflect": false
1308
1365
  }
1309
1366
  };
1310
1367
  }
@@ -14500,6 +14500,231 @@ const checkEmptyValue = (val) => {
14500
14500
  return false;
14501
14501
  };
14502
14502
 
14503
+ /**
14504
+ * Get first assigned element from a named slot
14505
+ *
14506
+ * @param {HTMLElement} host
14507
+ * @param {string} slotName
14508
+ * @returns {HTMLElement | null}
14509
+ */
14510
+ const getSlottedElement = (host, slotName) => {
14511
+ const slot = /** @type {HTMLSlotElement | null} */ (
14512
+ host.shadowRoot?.querySelector(`slot[name="${slotName}"]`)
14513
+ );
14514
+
14515
+ if (!slot) {
14516
+ console.error(`[${host.tagName.toLowerCase()}] slot "${slotName}" not found.`);
14517
+ return null;
14518
+ }
14519
+
14520
+ const assignedElement = /** @type {HTMLElement | null} */ (
14521
+ slot.assignedElements?.()[0] ?? null
14522
+ );
14523
+
14524
+ if (!assignedElement) {
14525
+ console.error( `[${host.tagName.toLowerCase()}] no element assigned to slot "${slotName}".`);
14526
+ return null;
14527
+ }
14528
+
14529
+ return assignedElement;
14530
+ };
14531
+
14532
+ const SCRIPT_SRC = 'https://challenges.cloudflare.com/turnstile/v0/api.js';
14533
+ const RETRY_INTERVAL_MS = 3000;
14534
+ const DEFAULT_RETRY_COUNT = 5;
14535
+ const SCRIPT_LOAD_TIMEOUT_MS = 10000;
14536
+ const TURNSTILE_TOKEN_EXPIRY_MS = 5 * 60 * 1000;
14537
+ const DUMMY_TURNSTILE_RESPONSE = 'XXXX.DUMMY.TOKEN.XXXX';
14538
+ const TURNSTILE_TOKEN_RESPONSE_HEADER = 'cf-captcha-response';
14539
+ const TURNSTILE_IS_VISIBLE_HEADER = 'cfCaptchaIsVisible';
14540
+ let scriptPromise = null;
14541
+ function loadTurnstile() {
14542
+ if (typeof window === 'undefined') {
14543
+ return Promise.reject(new Error('[Turnstile] SSR'));
14544
+ }
14545
+ if (window.turnstile)
14546
+ return Promise.resolve();
14547
+ if (!scriptPromise) {
14548
+ scriptPromise = new Promise((resolve, reject) => {
14549
+ const timeout = setTimeout(() => {
14550
+ scriptPromise = null;
14551
+ reject(new Error('[Turnstile] script load timeout'));
14552
+ }, SCRIPT_LOAD_TIMEOUT_MS);
14553
+ const script = document.createElement('script');
14554
+ script.src = SCRIPT_SRC;
14555
+ script.async = true;
14556
+ script.defer = true;
14557
+ script.onload = () => {
14558
+ clearTimeout(timeout);
14559
+ resolve();
14560
+ };
14561
+ script.onerror = () => {
14562
+ clearTimeout(timeout);
14563
+ scriptPromise = null;
14564
+ reject(new Error('[Turnstile] script failed to load'));
14565
+ };
14566
+ document.head.appendChild(script);
14567
+ });
14568
+ }
14569
+ return scriptPromise;
14570
+ }
14571
+ function createTurnstile(options) {
14572
+ const { siteKey, action, isEnabled = true, enableFallback = false, retryCount = DEFAULT_RETRY_COUNT } = options;
14573
+ let token = null;
14574
+ let tokenIssuedAt = 0;
14575
+ let widgetId;
14576
+ let container;
14577
+ let isDestroyed = false;
14578
+ let errorCount = 0;
14579
+ let resolveToken = null;
14580
+ let rejectToken = null;
14581
+ function setToken(value) {
14582
+ var _a;
14583
+ token = value;
14584
+ if (value)
14585
+ tokenIssuedAt = Date.now();
14586
+ (_a = options.onTokenChange) === null || _a === void 0 ? void 0 : _a.call(options, value);
14587
+ }
14588
+ function renderWidget() {
14589
+ if (widgetId || !container || !window.turnstile)
14590
+ return;
14591
+ widgetId = window.turnstile.render(container, {
14592
+ sitekey: siteKey,
14593
+ retry: 'auto',
14594
+ action,
14595
+ appearance: 'interaction-only',
14596
+ execution: 'execute',
14597
+ theme: 'light',
14598
+ 'retry-interval': RETRY_INTERVAL_MS,
14599
+ callback: (receivedToken) => {
14600
+ var _a;
14601
+ if (isDestroyed)
14602
+ return;
14603
+ errorCount = 0;
14604
+ setToken(receivedToken);
14605
+ (_a = options.onLoadingChange) === null || _a === void 0 ? void 0 : _a.call(options, false);
14606
+ resolveToken === null || resolveToken === void 0 ? void 0 : resolveToken(receivedToken);
14607
+ resolveToken = null;
14608
+ rejectToken = null;
14609
+ },
14610
+ 'error-callback': (errorCode) => {
14611
+ var _a;
14612
+ if (isDestroyed)
14613
+ return true;
14614
+ errorCount += 1;
14615
+ if (errorCount <= retryCount) {
14616
+ return false;
14617
+ }
14618
+ errorCount = 0;
14619
+ (_a = options.onLoadingChange) === null || _a === void 0 ? void 0 : _a.call(options, false);
14620
+ if (widgetId && window.turnstile) {
14621
+ try {
14622
+ window.turnstile.reset(widgetId);
14623
+ }
14624
+ catch (_b) { }
14625
+ }
14626
+ if (enableFallback) {
14627
+ resolveToken === null || resolveToken === void 0 ? void 0 : resolveToken(DUMMY_TURNSTILE_RESPONSE);
14628
+ }
14629
+ else {
14630
+ const error = `[Turnstile] Verification failed (${errorCode}). Please try again.`;
14631
+ console.error(error);
14632
+ rejectToken === null || rejectToken === void 0 ? void 0 : rejectToken(new Error(error));
14633
+ }
14634
+ resolveToken = null;
14635
+ rejectToken = null;
14636
+ return true;
14637
+ },
14638
+ 'expired-callback': () => {
14639
+ setToken(null);
14640
+ }
14641
+ });
14642
+ }
14643
+ async function render(hostContainer) {
14644
+ var _a;
14645
+ if (!isEnabled)
14646
+ return;
14647
+ container = hostContainer;
14648
+ try {
14649
+ await loadTurnstile();
14650
+ renderWidget();
14651
+ (_a = options.onReady) === null || _a === void 0 ? void 0 : _a.call(options);
14652
+ }
14653
+ catch (err) {
14654
+ console.error('[Turnstile] script load error', err);
14655
+ }
14656
+ }
14657
+ async function getToken() {
14658
+ var _a;
14659
+ if (!isEnabled)
14660
+ return undefined;
14661
+ if (!widgetId) {
14662
+ await loadTurnstile();
14663
+ renderWidget();
14664
+ if (!widgetId)
14665
+ throw new Error('[Turnstile] widget not ready');
14666
+ }
14667
+ (_a = options.onLoadingChange) === null || _a === void 0 ? void 0 : _a.call(options, true);
14668
+ return new Promise((resolve, reject) => {
14669
+ var _a;
14670
+ resolveToken = resolve;
14671
+ rejectToken = reject;
14672
+ try {
14673
+ window.turnstile.execute(widgetId);
14674
+ }
14675
+ catch (e) {
14676
+ console.error('[Turnstile] execute error', e);
14677
+ (_a = options.onLoadingChange) === null || _a === void 0 ? void 0 : _a.call(options, false);
14678
+ resolveToken = null;
14679
+ rejectToken = null;
14680
+ reject(e);
14681
+ }
14682
+ });
14683
+ }
14684
+ async function ensureToken() {
14685
+ if (!isEnabled)
14686
+ return undefined;
14687
+ if (token && Date.now() - tokenIssuedAt < TURNSTILE_TOKEN_EXPIRY_MS)
14688
+ return token;
14689
+ return getToken();
14690
+ }
14691
+ function reset() {
14692
+ var _a;
14693
+ if (widgetId && window.turnstile) {
14694
+ try {
14695
+ window.turnstile.reset(widgetId);
14696
+ }
14697
+ catch (_b) { }
14698
+ }
14699
+ errorCount = 0;
14700
+ setToken(null);
14701
+ (_a = options.onLoadingChange) === null || _a === void 0 ? void 0 : _a.call(options, false);
14702
+ rejectToken === null || rejectToken === void 0 ? void 0 : rejectToken(new Error('[Turnstile] reset by caller'));
14703
+ resolveToken = null;
14704
+ rejectToken = null;
14705
+ }
14706
+ function cleanup() {
14707
+ var _a;
14708
+ isDestroyed = true;
14709
+ if (widgetId && window.turnstile) {
14710
+ try {
14711
+ window.turnstile.remove(widgetId);
14712
+ }
14713
+ catch (_b) { }
14714
+ }
14715
+ errorCount = 0;
14716
+ rejectToken === null || rejectToken === void 0 ? void 0 : rejectToken(null);
14717
+ resolveToken = null;
14718
+ rejectToken = null;
14719
+ widgetId = undefined;
14720
+ setToken(null);
14721
+ (_a = options.onLoadingChange) === null || _a === void 0 ? void 0 : _a.call(options, false);
14722
+ }
14723
+ return { render, getToken, ensureToken, reset, cleanup };
14724
+ }
14725
+
14726
+ const CAPTCHA_CONTAINER_SLOT = "captchaContainer";
14727
+
14503
14728
  if (typeof window != "undefined") {
14504
14729
  let n = function(e) {
14505
14730
  return function(...s) {
@@ -14517,7 +14742,7 @@ if (typeof window != "undefined") {
14517
14742
  });
14518
14743
  }
14519
14744
 
14520
- const generalRegistrationCss = "*,\n*::before,\n*::after {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.registration__form.hidden {\n display: none;\n}\n\n.registration {\n font-family: \"Roboto\";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n container-type: inline-size;\n}\n.registration__wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.registration__error-message {\n color: var(--emw--color-error, var(--emw--color-red, #ed0909));\n font-size: var(--emw-font-size-small, 13px);\n display: block;\n justify-content: center;\n text-align: center;\n}\n.registration__loading-message {\n padding-top: 20px;\n text-align: center;\n}\n.registration__form {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n gap: 40px;\n justify-items: stretch;\n align-content: flex-start;\n overflow: auto;\n width: 100%;\n height: 100%;\n}\n.registration__buttons-wrapper {\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n align-items: center;\n position: relative;\n}\n.registration__button {\n border-radius: 5px;\n background: var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));\n border: 1px solid var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));\n color: var(--emw--button-typography, var(--emw--color-white, #FFFFFF));\n text-transform: uppercase;\n font-size: 20px;\n height: 44px;\n width: 100%;\n margin: 0px auto;\n padding: 10px 20px;\n font-weight: normal;\n box-shadow: none;\n cursor: pointer;\n}\n.registration__button--disabled {\n background: var(--emw--color-gray-100, #E6E6E6);\n border: 1px solid var(--emw--color-gray-150, #828282);\n pointer-events: none;\n box-shadow: none;\n}\n.registration__button--first-step {\n display: none;\n}\n\n@container (min-width: 450px) {\n .registration__form {\n grid-template-columns: repeat(2, 1fr);\n }\n .registration__buttons-wrapper {\n flex-direction: row-reverse;\n gap: 15px;\n }\n}\n.hide-btag {\n display: none;\n}\n\n.spinner {\n animation: rotate 2s linear infinite;\n z-index: 2;\n position: absolute;\n top: 50%;\n left: 50%;\n margin: -25px 0 0 -25px;\n width: 50px;\n height: 50px;\n}\n.spinner .path {\n stroke: var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n}\n\n.input-description {\n margin-top: 5px;\n font-size: var(--emw-font-size-x-small, 12px);\n}\n\n@keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}";
14745
+ const generalRegistrationCss = "*,\n*::before,\n*::after {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.registration__form.hidden {\n display: none;\n}\n\n.registration {\n font-family: \"Roboto\";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n container-type: inline-size;\n}\n.registration__wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.registration__error-message {\n color: var(--emw--color-error, var(--emw--color-red, #ed0909));\n font-size: var(--emw-font-size-small, 13px);\n display: block;\n justify-content: center;\n text-align: center;\n}\n.registration__loading-message {\n padding-top: 20px;\n text-align: center;\n}\n.registration__form {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n gap: 40px;\n justify-items: stretch;\n align-content: flex-start;\n overflow: auto;\n width: 100%;\n height: 100%;\n}\n.registration__buttons-wrapper {\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n align-items: center;\n position: relative;\n}\n.registration__button {\n border-radius: 5px;\n background: var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));\n border: 1px solid var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));\n color: var(--emw--button-typography, var(--emw--color-white, #FFFFFF));\n text-transform: uppercase;\n font-size: 20px;\n height: 44px;\n width: 100%;\n margin: 0px auto;\n padding: 10px 20px;\n font-weight: normal;\n box-shadow: none;\n cursor: pointer;\n}\n.registration__button--disabled {\n background: var(--emw--color-gray-100, #E6E6E6);\n border: 1px solid var(--emw--color-gray-150, #828282);\n pointer-events: none;\n box-shadow: none;\n}\n.registration__button--first-step {\n display: none;\n}\n\n@container (min-width: 450px) {\n .registration__form {\n grid-template-columns: repeat(2, 1fr);\n }\n .registration__buttons-wrapper {\n flex-direction: row-reverse;\n gap: 15px;\n }\n}\n.hide-btag {\n display: none;\n}\n\n.spinner {\n animation: rotate 2s linear infinite;\n z-index: 2;\n position: absolute;\n top: 50%;\n left: 50%;\n margin: -25px 0 0 -25px;\n width: 50px;\n height: 50px;\n}\n.spinner .path {\n stroke: var(--emw--login-color-primary, var(--emw--color-primary, #22B04E));\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n}\n\n.input-description {\n margin-top: 5px;\n font-size: var(--emw-font-size-x-small, 12px);\n}\n\n@keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}\n.captcha-wrapper {\n width: 100%;\n display: flex;\n overflow: hidden;\n}";
14521
14746
  const GeneralRegistrationStyle0 = generalRegistrationCss;
14522
14747
 
14523
14748
  const GeneralRegistration = class {
@@ -14529,6 +14754,7 @@ const GeneralRegistration = class {
14529
14754
  this.isSelectingAddress = false;
14530
14755
  this.lastPostalCode = null;
14531
14756
  this.isRestoringAfterError = false;
14757
+ this.captchaInstance = null;
14532
14758
  this.selectedCountry = '';
14533
14759
  this.listOfInputValues = [];
14534
14760
  this.listOfInputValidity = [];
@@ -14573,6 +14799,7 @@ const GeneralRegistration = class {
14573
14799
  this.enableManualDateInput = false;
14574
14800
  this.enableCustomRegexValidation = false;
14575
14801
  this.gmversion = '';
14802
+ this.turnstileSiteKey = undefined;
14576
14803
  this.errorMessage = '';
14577
14804
  this.isFormValid = false;
14578
14805
  this.isConsentValid = false;
@@ -14792,9 +15019,14 @@ const GeneralRegistration = class {
14792
15019
  this.registrationWidgetLoaded.emit();
14793
15020
  window.postMessage({ type: 'registrationWidgetLoaded' }, window.location.href);
14794
15021
  this.handleClientStyling();
15022
+ if (this.turnstileSiteKey)
15023
+ this.initializeCaptcha();
14795
15024
  }
14796
15025
  disconnectedCallback() {
15026
+ var _a, _b;
14797
15027
  this.stylingSubscription && this.stylingSubscription.unsubscribe();
15028
+ if (this.turnstileSiteKey)
15029
+ (_b = (_a = this.captchaInstance) === null || _a === void 0 ? void 0 : _a.cleanup) === null || _b === void 0 ? void 0 : _b.call(_a);
14798
15030
  }
14799
15031
  /**
14800
15032
  * This function produces the conditionalValidationMap object presented below
@@ -14980,6 +15212,16 @@ const GeneralRegistration = class {
14980
15212
  }
14981
15213
  }, window.location.href);
14982
15214
  }
15215
+ async initializeCaptcha() {
15216
+ if (!this.turnstileSiteKey)
15217
+ return;
15218
+ const captchaContainerEl = getSlottedElement(this.host, CAPTCHA_CONTAINER_SLOT);
15219
+ this.captchaInstance = createTurnstile({
15220
+ action: 'login',
15221
+ siteKey: this.turnstileSiteKey,
15222
+ });
15223
+ await this.captchaInstance.render(captchaContainerEl);
15224
+ }
14983
15225
  getRegisterConfig(registrationID) {
14984
15226
  const configPath = this.gmversion === 'gm2'
14985
15227
  ? '/api/pam/v2/legislation/register/config'
@@ -15201,18 +15443,39 @@ const GeneralRegistration = class {
15201
15443
  }
15202
15444
  return acceptedConsents;
15203
15445
  }
15204
- setRegister() {
15446
+ async setRegister() {
15447
+ var _a;
15205
15448
  this.isLoading = true;
15206
15449
  this.registerErrors = false;
15207
- const registerPath = this.gmversion === 'gm2'
15450
+ const isGm2 = this.gmversion === 'gm2';
15451
+ const turnstileEnabled = this.turnstileSiteKey && this.captchaInstance && !isGm2;
15452
+ const registerPath = isGm2
15208
15453
  ? '/api/pam/v2/legislation/register'
15209
15454
  : '/v1/player/legislation/register/';
15210
15455
  const url = new URL(`${this.endpoint}${registerPath}`);
15211
15456
  const headers = new Headers();
15212
15457
  headers.append('Content-Type', 'application/json');
15213
15458
  headers.append('Accept', 'application/json');
15459
+ if (turnstileEnabled) {
15460
+ try {
15461
+ const token = await ((_a = this.captchaInstance) === null || _a === void 0 ? void 0 : _a.ensureToken());
15462
+ headers.append(TURNSTILE_TOKEN_RESPONSE_HEADER, token !== null && token !== void 0 ? token : "");
15463
+ headers.append(TURNSTILE_IS_VISIBLE_HEADER, "false");
15464
+ }
15465
+ catch (error) {
15466
+ this.registerErrors = true;
15467
+ this.isLoading = false;
15468
+ if (error !== null) {
15469
+ this.errorMessage = translate(`generalError`, this.language);
15470
+ window.postMessage({ type: 'registrationFailed', errorMessage: this.errorMessage }, window.location.href);
15471
+ this.triggerNotification(this.errorMessage);
15472
+ dispatchCustomEvent('register_fail', { error: this.errorMessage });
15473
+ }
15474
+ return;
15475
+ }
15476
+ }
15214
15477
  const options = {
15215
- method: this.gmversion === 'gm2' ? 'POST' : 'PUT',
15478
+ method: isGm2 ? 'POST' : 'PUT',
15216
15479
  body: JSON.stringify({ registrationId: this.registrationID }),
15217
15480
  headers
15218
15481
  };
@@ -15262,7 +15525,10 @@ const GeneralRegistration = class {
15262
15525
  console.error(err);
15263
15526
  })
15264
15527
  .finally(() => {
15528
+ var _a;
15265
15529
  this.isLoading = false;
15530
+ if (turnstileEnabled)
15531
+ (_a = this.captchaInstance) === null || _a === void 0 ? void 0 : _a.reset();
15266
15532
  });
15267
15533
  }
15268
15534
  formatConfig(config) {
@@ -15536,13 +15802,11 @@ const GeneralRegistration = class {
15536
15802
  && h("svg", { class: "spinner", viewBox: "0 0 50 50" }, h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "5" })), !this.isLoadingPOST && h("div", { class: `registration__buttons-wrapper ${this.autofilled ? 'registration__buttons-wrapper--autofilled' : ''}` }, h("button", { class: `registration__button registration__button--next ${this.isFormValid ? '' : 'registration__button--disabled'}`, type: 'submit', form: `RegistrationForm${this.registrationStep}`, onClick: (e) => this.nextHandler(e), disabled: !this.isFormValid }, this.lastStep === this.registrationStep ? translate('doneButton', this.language) : translate('nextButton', this.language)), h("button", { class: `registration__button registration__button--back ${this.registrationStep == 'Step1' ? 'registration__button--first-step' : ''}`, onClick: (e) => this.backHandler(e) }, translate('backButton', this.language)))));
15537
15803
  }
15538
15804
  render() {
15539
- if (this.isLoading && !this.registerErrors) {
15540
- return h("p", { class: `registration registration__loading-message` }, translate('loadingMessage', this.language));
15541
- }
15542
- else if (!this.isLoading && this.registerErrors) {
15543
- return this.renderErrorMessage(this.errorMessage);
15544
- }
15545
- return (h("div", { ref: (el) => (this.stylingContainer = el), class: `registration registration__${this.registrationStep}` }, this.renderForm(), !this.buttonInsideForm && this.renderButtons()));
15805
+ const isLoading = this.isLoading && !this.registerErrors;
15806
+ const isError = !this.isLoading && this.registerErrors;
15807
+ const showForm = !(isLoading || isError);
15808
+ return (h("div", { key: 'f9c3c3d27ba6d0f0a38802dae5cc59a3d92e80ce', ref: (el) => (this.stylingContainer = el), class: `registration registration__${this.registrationStep}` }, isLoading && h("p", { key: 'a9264b766c150388bc3c1711eec78c25b5c03398', class: `registration registration__loading-message` }, translate('loadingMessage', this.language)), isError && this.renderErrorMessage(this.errorMessage), showForm && this.renderForm(), showForm && !this.buttonInsideForm && this.renderButtons(), this.turnstileSiteKey &&
15809
+ h("div", { key: '43b923b05cebe033ac4b186f9101c6d24d2f54bb', class: "captcha-wrapper" }, h("slot", { key: '386643816479c11f6c0856aa4ca82c87e5878bc4', name: CAPTCHA_CONTAINER_SLOT }))));
15546
15810
  }
15547
15811
  get host() { return getElement(this); }
15548
15812
  static get watchers() { return {
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy(JSON.parse("[[\"checkbox-group-input_15\",[[1,\"general-registration\",{\"endpoint\":[513],\"language\":[513],\"clientStyling\":[1537,\"client-styling\"],\"mbSource\":[1,\"mb-source\"],\"clientStylingUrl\":[513,\"client-styling-url\"],\"translationUrl\":[513,\"translation-url\"],\"dateFormat\":[513,\"date-format\"],\"buttonInsideForm\":[516,\"button-inside-form\"],\"btag\":[513],\"emitOnClick\":[516,\"emit-on-click\"],\"haspostalcodelookup\":[516],\"ignorebtag\":[516],\"enableManualDateInput\":[516,\"enable-manual-date-input\"],\"enableCustomRegexValidation\":[516,\"enable-custom-regex-validation\"],\"gmversion\":[513],\"errorMessage\":[32],\"isFormValid\":[32],\"isConsentValid\":[32],\"isConsentReady\":[32],\"isLoading\":[32],\"isLoadingPOST\":[32],\"registrationStep\":[32],\"forms\":[32],\"autofilled\":[32],\"isInitalInteraction\":[32],\"addresses\":[32],\"addressUpdateKey\":[32]},[[0,\"sendValidityState\",\"checkInputsValidityHandler\"],[0,\"sendInputValue\",\"getInputsValueHandler\"],[0,\"sendAddressValue\",\"handleAddressSelection\"],[8,\"countryCodeUpdated\",\"handleCountryCodeUpdateGlobal\"],[0,\"resendCode\",\"handleRequestTwofa\"],[8,\"message\",\"messageHandler\"]],{\"registrationStep\":[\"sendStep\"],\"clientStyling\":[\"handleClientStylingChange\"],\"clientStylingUrl\":[\"handleClientStylingChangeURL\"],\"forms\":[\"setFormValidity\"],\"btag\":[\"addBtag\"]}],[1,\"general-input\",{\"type\":[513],\"name\":[513],\"displayName\":[513,\"display-name\"],\"placeholder\":[513],\"action\":[513],\"validation\":[16],\"options\":[520],\"language\":[513],\"autofilled\":[516],\"tooltip\":[513],\"defaultValue\":[520,\"default-value\"],\"emitValue\":[516,\"emit-value\"],\"isDuplicateInput\":[516,\"is-duplicate-input\"],\"hidePasswordComplexity\":[516,\"hide-password-complexity\"],\"noValidation\":[516,\"no-validation\"],\"clientStyling\":[520,\"client-styling\"],\"clientStylingUrl\":[513,\"client-styling-url\"],\"dateFormat\":[513,\"date-format\"],\"translationUrl\":[513,\"translation-url\"],\"emitOnClick\":[516,\"emit-on-click\"],\"twofaDestination\":[513,\"twofa-destination\"],\"twofaResendIntervalSeconds\":[514,\"twofa-resend-interval-seconds\"],\"haspostalcodelookup\":[516],\"postalcodelength\":[514],\"addresses\":[520],\"ignoreCountry\":[516,\"ignore-country\"],\"enableSouthAfricanMode\":[516,\"enable-south-african-mode\"],\"enableManualDateInput\":[516,\"enable-manual-date-input\"],\"pinAttemptsExceeded\":[516,\"pin-attempts-exceeded\"],\"mbSource\":[513,\"mb-source\"],\"enableCustomRegexValidation\":[516,\"enable-custom-regex-validation\"]},null,{\"clientStyling\":[\"handleClientStylingChange\"],\"clientStylingUrl\":[\"handleClientStylingChangeURL\"]}],[1,\"toggle-checkbox-input\",{\"name\":[513],\"displayName\":[513,\"display-name\"],\"defaultValue\":[513,\"default-value\"],\"options\":[16],\"autofilled\":[516],\"tooltip\":[513],\"validation\":[16],\"language\":[513],\"emitValue\":[516,\"emit-value\"],\"clientStyling\":[513,\"client-styling\"],\"mbSource\":[513,\"mb-source\"],\"errorMessage\":[32],\"isValid\":[32],\"showTooltip\":[32],\"showFields\":[32]},[[10,\"click\",\"handleClickOutside\"]],{\"clientStyling\":[\"handleClientStylingChange\"]}],[1,\"checkbox-group-input\",{\"name\":[513],\"displayName\":[513,\"display-name\"],\"defaultValue\":[513,\"default-value\"],\"autofilled\":[516],\"tooltip\":[513],\"options\":[16],\"validation\":[16],\"language\":[513],\"emitValue\":[516,\"emit-value\"],\"clientStyling\":[513,\"client-styling\"],\"mbSource\":[513,\"mb-source\"],\"errorMessage\":[32],\"isValid\":[32],\"showTooltip\":[32],\"selectedValues\":[32],\"showCheckboxes\":[32]},[[10,\"click\",\"handleClickOutside\"]],{\"clientStyling\":[\"handleClientStylingChange\"],\"isValid\":[\"validityChanged\"],\"selectedValues\":[\"setValue\"],\"emitValue\":[\"emitValueHandler\"]}],[1,\"checkbox-input\",{\"name\":[513],\"displayName\":[513,\"display-name\"],\"defaultValue\":[513,\"default-value\"],\"autofilled\":[516],\"tooltip\":[513],\"validation\":[16],\"language\":[513],\"emitValue\":[516,\"emit-value\"],\"clientStyling\":[513,\"client-styling\"],\"mbSource\":[513,\"mb-source\"],\"errorMessage\":[32],\"isValid\":[32],\"showTooltip\":[32]},[[10,\"click\",\"handleClickOutside\"]],{\"clientStyling\":[\"handleClientStylingChange\"],\"isValid\":[\"validityChanged\"],\"emitValue\":[\"emitValueHandler\"]}],[1,\"date-input\",{\"name\":[513],\"displayName\":[513,\"display-name\"],\"placeholder\":[513],\"validation\":[16],\"defaultValue\":[513,\"default-value\"],\"autofilled\":[516],\"tooltip\":[513],\"language\":[513],\"emitValue\":[516,\"emit-value\"],\"clientStyling\":[513,\"client-styling\"],\"dateFormat\":[513,\"date-format\"],\"emitOnClick\":[516,\"emit-on-click\"],\"enableSouthAfricanMode\":[516,\"enable-south-african-mode\"],\"enableManualDateInput\":[516,\"enable-manual-date-input\"],\"mbSource\":[513,\"mb-source\"],\"errorMessage\":[32],\"isValid\":[32],\"showTooltip\":[32]},[[10,\"click\",\"handleClickOutside\"]],{\"clientStyling\":[\"handleClientStylingChange\"],\"isValid\":[\"validityChanged\"],\"emitValue\":[\"emitValueHandler\"],\"enableSouthAfricanMode\":[\"handleCustomRegistrationChange\"]}],[1,\"email-input\",{\"name\":[513],\"displayName\":[513,\"display-name\"],\"placeholder\":[513],\"validation\":[16],\"defaultValue\":[513,\"default-value\"],\"autofilled\":[516],\"tooltip\":[513],\"language\":[513],\"emitValue\":[516,\"emit-value\"],\"isDuplicateInput\":[516,\"is-duplicate-input\"],\"clientStyling\":[513,\"client-styling\"],\"mbSource\":[513,\"mb-source\"],\"errorMessage\":[32],\"isValid\":[32],\"showTooltip\":[32]},[[10,\"click\",\"handleClickOutside\"],[16,\"sendInputValue\",\"valueChangedHandler\"]],{\"clientStyling\":[\"handleClientStylingChange\"],\"isValid\":[\"validityChanged\"],\"emitValue\":[\"emitValueHandler\"]}],[1,\"number-input\",{\"name\":[513],\"displayName\":[513,\"display-name\"],\"placeholder\":[513],\"validation\":[16],\"defaultValue\":[513,\"default-value\"],\"autofilled\":[516],\"tooltip\":[513],\"language\":[513],\"emitValue\":[516,\"emit-value\"],\"clientStyling\":[513,\"client-styling\"],\"mbSource\":[513,\"mb-source\"],\"errorMessage\":[32],\"isValid\":[32],\"showTooltip\":[32]},[[10,\"click\",\"handleClickOutside\"]],{\"clientStyling\":[\"handleClientStylingChange\"],\"isValid\":[\"validityChanged\"],\"emitValue\":[\"emitValueHandler\"]}],[1,\"password-input\",{\"name\":[513],\"displayName\":[513,\"display-name\"],\"placeholder\":[513],\"defaultValue\":[513,\"default-value\"],\"autofilled\":[516],\"tooltip\":[513],\"validation\":[16],\"noValidation\":[516,\"no-validation\"],\"language\":[513],\"emitValue\":[516,\"emit-value\"],\"isDuplicateInput\":[516,\"is-duplicate-input\"],\"hidePasswordComplexity\":[516,\"hide-password-complexity\"],\"clientStyling\":[513,\"client-styling\"],\"enableSouthAfricanMode\":[516,\"enable-south-african-mode\"],\"mbSource\":[513,\"mb-source\"],\"isValid\":[32],\"errorMessage\":[32],\"showTooltip\":[32],\"passwordComplexity\":[32],\"showPopup\":[32],\"value\":[32]},[[16,\"sendOriginalValidityState\",\"originalValidityChangedHandler\"],[16,\"sendInputValue\",\"valueChangedHandler\"],[10,\"click\",\"handleClickOutside\"]],{\"clientStyling\":[\"handleClientStylingChange\"],\"isValid\":[\"validityChanged\"],\"value\":[\"valueChanged\"],\"emitValue\":[\"emitValueHandler\"]}],[1,\"postalcode-input\",{\"name\":[513],\"displayName\":[513,\"display-name\"],\"placeholder\":[513],\"validation\":[16],\"defaultValue\":[513,\"default-value\"],\"autofilled\":[516],\"tooltip\":[513],\"language\":[513],\"emitValue\":[516,\"emit-value\"],\"clientStyling\":[513,\"client-styling\"],\"postalcodelength\":[520],\"addresses\":[520],\"ignoreCountry\":[516,\"ignore-country\"],\"mbSource\":[513,\"mb-source\"],\"isValid\":[32],\"errorMessage\":[32],\"showTooltip\":[32],\"selectedCountryCode\":[32],\"currentPostalCode\":[32],\"openAddressDropdown\":[32],\"showNoResultsMessage\":[32],\"refreshTrigger\":[32],\"isFetchingAddresses\":[32]},[[10,\"click\",\"handleClickOutside\"],[8,\"countryCodeUpdated\",\"handleCountryCodeUpdate\"],[8,\"addressFetchStarted\",\"handleFetchStarted\"]],{\"clientStyling\":[\"handleClientStylingChange\"],\"isValid\":[\"validityChanged\"],\"emitValue\":[\"emitValueHandler\"],\"addresses\":[\"handleAddresses\"]}],[1,\"radio-input\",{\"name\":[513],\"displayName\":[513,\"display-name\"],\"optionsGroup\":[16],\"validation\":[16],\"tooltip\":[513],\"language\":[513],\"emitValue\":[516,\"emit-value\"],\"clientStyling\":[513,\"client-styling\"],\"mbSource\":[513,\"mb-source\"],\"errorMessage\":[32],\"isValid\":[32],\"showTooltip\":[32]},[[10,\"click\",\"handleClickOutside\"]],{\"clientStyling\":[\"handleClientStylingChange\"],\"isValid\":[\"validityChanged\"],\"emitValue\":[\"emitValueHandler\"]}],[1,\"select-input\",{\"name\":[513],\"displayName\":[513,\"display-name\"],\"placeholder\":[513],\"action\":[513],\"defaultValue\":[513,\"default-value\"],\"autofilled\":[516],\"tooltip\":[513],\"options\":[16],\"validation\":[16],\"language\":[513],\"emitValue\":[516,\"emit-value\"],\"clientStyling\":[513,\"client-styling\"],\"mbSource\":[513,\"mb-source\"],\"errorMessage\":[32],\"isValid\":[32],\"showTooltip\":[32]},[[10,\"click\",\"handleClickOutside\"]],{\"clientStyling\":[\"handleClientStylingChange\"],\"isValid\":[\"validityChanged\"],\"emitValue\":[\"emitValueHandler\"]}],[1,\"tel-input\",{\"name\":[513],\"displayName\":[513,\"display-name\"],\"placeholder\":[513],\"showLabels\":[516,\"show-labels\"],\"action\":[513],\"validation\":[16],\"defaultValue\":[520,\"default-value\"],\"autofilled\":[516],\"tooltip\":[513],\"language\":[513],\"emitValue\":[516,\"emit-value\"],\"clientStyling\":[513,\"client-styling\"],\"mbSource\":[513,\"mb-source\"],\"enableCustomRegexValidation\":[516,\"enable-custom-regex-validation\"],\"isValid\":[32],\"errorMessage\":[32],\"showTooltip\":[32],\"disablePhonePrefix\":[32],\"phoneValue\":[32],\"phoneCodesOptions\":[32]},[[10,\"click\",\"handleClickOutside\"]],{\"clientStyling\":[\"handleClientStylingChange\"],\"isValid\":[\"validityChanged\"],\"emitValue\":[\"emitValueHandler\"]}],[1,\"text-input\",{\"name\":[513],\"displayName\":[513,\"display-name\"],\"placeholder\":[513],\"validation\":[16],\"defaultValue\":[513,\"default-value\"],\"autofilled\":[516],\"tooltip\":[513],\"language\":[513],\"checkValidity\":[516,\"check-validity\"],\"emitValue\":[516,\"emit-value\"],\"isDuplicateInput\":[516,\"is-duplicate-input\"],\"clientStyling\":[513,\"client-styling\"],\"haspostalcodelookup\":[516],\"enableSouthAfricanMode\":[516,\"enable-south-african-mode\"],\"mbSource\":[513,\"mb-source\"],\"isValid\":[32],\"errorMessage\":[32],\"showTooltip\":[32],\"selectedCountryCode\":[32]},[[10,\"click\",\"handleClickOutside\"],[16,\"sendInputValue\",\"valueChangedHandler\"],[16,\"validationChange\",\"handleValidationChange\"],[8,\"countryCodeUpdated\",\"handleCountryCodeUpdate\"],[16,\"sendAddressValue\",\"handleAddressSelection\"],[8,\"documentNumberUpdatedExternally\",\"handleExternalDocUpdate\"],[8,\"documentNumberResetValidation\",\"handleDocReset\"]],{\"clientStyling\":[\"handleClientStylingChange\"],\"isValid\":[\"validityChanged\"],\"emitValue\":[\"emitValueHandler\"]}],[1,\"twofa-input\",{\"name\":[513],\"displayName\":[513,\"display-name\"],\"placeholder\":[513],\"validation\":[16],\"tooltip\":[513],\"language\":[513],\"emitValue\":[516,\"emit-value\"],\"destination\":[513],\"resendIntervalSeconds\":[514,\"resend-interval-seconds\"],\"clientStyling\":[513,\"client-styling\"],\"enableSouthAfricanMode\":[516,\"enable-south-african-mode\"],\"pinAttemptsExceeded\":[516,\"pin-attempts-exceeded\"],\"clientStylingUrl\":[513,\"client-styling-url\"],\"mbSource\":[513,\"mb-source\"],\"isValid\":[32],\"isResendButtonAvailable\":[32],\"showTooltip\":[32],\"errorMessage\":[32],\"code\":[32],\"resendIntervalSecondsLeft\":[32],\"revealedIndexes\":[32]},[[10,\"click\",\"handleClickOutside\"]],{\"isValid\":[\"validityChanged\"],\"emitValue\":[\"emitValueHandler\"],\"clientStyling\":[\"handleClientStylingChange\"],\"clientStylingUrl\":[\"handleClientStylingChangeURL\"]}]]]]"), options);
19
+ return bootstrapLazy(JSON.parse("[[\"checkbox-group-input_15\",[[1,\"general-registration\",{\"endpoint\":[513],\"language\":[513],\"clientStyling\":[1537,\"client-styling\"],\"mbSource\":[1,\"mb-source\"],\"clientStylingUrl\":[513,\"client-styling-url\"],\"translationUrl\":[513,\"translation-url\"],\"dateFormat\":[513,\"date-format\"],\"buttonInsideForm\":[516,\"button-inside-form\"],\"btag\":[513],\"emitOnClick\":[516,\"emit-on-click\"],\"haspostalcodelookup\":[516],\"ignorebtag\":[516],\"enableManualDateInput\":[516,\"enable-manual-date-input\"],\"enableCustomRegexValidation\":[516,\"enable-custom-regex-validation\"],\"gmversion\":[513],\"turnstileSiteKey\":[1,\"turnstile-site-key\"],\"errorMessage\":[32],\"isFormValid\":[32],\"isConsentValid\":[32],\"isConsentReady\":[32],\"isLoading\":[32],\"isLoadingPOST\":[32],\"registrationStep\":[32],\"forms\":[32],\"autofilled\":[32],\"isInitalInteraction\":[32],\"addresses\":[32],\"addressUpdateKey\":[32]},[[0,\"sendValidityState\",\"checkInputsValidityHandler\"],[0,\"sendInputValue\",\"getInputsValueHandler\"],[0,\"sendAddressValue\",\"handleAddressSelection\"],[8,\"countryCodeUpdated\",\"handleCountryCodeUpdateGlobal\"],[0,\"resendCode\",\"handleRequestTwofa\"],[8,\"message\",\"messageHandler\"]],{\"registrationStep\":[\"sendStep\"],\"clientStyling\":[\"handleClientStylingChange\"],\"clientStylingUrl\":[\"handleClientStylingChangeURL\"],\"forms\":[\"setFormValidity\"],\"btag\":[\"addBtag\"]}],[1,\"general-input\",{\"type\":[513],\"name\":[513],\"displayName\":[513,\"display-name\"],\"placeholder\":[513],\"action\":[513],\"validation\":[16],\"options\":[520],\"language\":[513],\"autofilled\":[516],\"tooltip\":[513],\"defaultValue\":[520,\"default-value\"],\"emitValue\":[516,\"emit-value\"],\"isDuplicateInput\":[516,\"is-duplicate-input\"],\"hidePasswordComplexity\":[516,\"hide-password-complexity\"],\"noValidation\":[516,\"no-validation\"],\"clientStyling\":[520,\"client-styling\"],\"clientStylingUrl\":[513,\"client-styling-url\"],\"dateFormat\":[513,\"date-format\"],\"translationUrl\":[513,\"translation-url\"],\"emitOnClick\":[516,\"emit-on-click\"],\"twofaDestination\":[513,\"twofa-destination\"],\"twofaResendIntervalSeconds\":[514,\"twofa-resend-interval-seconds\"],\"haspostalcodelookup\":[516],\"postalcodelength\":[514],\"addresses\":[520],\"ignoreCountry\":[516,\"ignore-country\"],\"enableSouthAfricanMode\":[516,\"enable-south-african-mode\"],\"enableManualDateInput\":[516,\"enable-manual-date-input\"],\"pinAttemptsExceeded\":[516,\"pin-attempts-exceeded\"],\"mbSource\":[513,\"mb-source\"],\"enableCustomRegexValidation\":[516,\"enable-custom-regex-validation\"]},null,{\"clientStyling\":[\"handleClientStylingChange\"],\"clientStylingUrl\":[\"handleClientStylingChangeURL\"]}],[1,\"toggle-checkbox-input\",{\"name\":[513],\"displayName\":[513,\"display-name\"],\"defaultValue\":[513,\"default-value\"],\"options\":[16],\"autofilled\":[516],\"tooltip\":[513],\"validation\":[16],\"language\":[513],\"emitValue\":[516,\"emit-value\"],\"clientStyling\":[513,\"client-styling\"],\"mbSource\":[513,\"mb-source\"],\"errorMessage\":[32],\"isValid\":[32],\"showTooltip\":[32],\"showFields\":[32]},[[10,\"click\",\"handleClickOutside\"]],{\"clientStyling\":[\"handleClientStylingChange\"]}],[1,\"checkbox-group-input\",{\"name\":[513],\"displayName\":[513,\"display-name\"],\"defaultValue\":[513,\"default-value\"],\"autofilled\":[516],\"tooltip\":[513],\"options\":[16],\"validation\":[16],\"language\":[513],\"emitValue\":[516,\"emit-value\"],\"clientStyling\":[513,\"client-styling\"],\"mbSource\":[513,\"mb-source\"],\"errorMessage\":[32],\"isValid\":[32],\"showTooltip\":[32],\"selectedValues\":[32],\"showCheckboxes\":[32]},[[10,\"click\",\"handleClickOutside\"]],{\"clientStyling\":[\"handleClientStylingChange\"],\"isValid\":[\"validityChanged\"],\"selectedValues\":[\"setValue\"],\"emitValue\":[\"emitValueHandler\"]}],[1,\"checkbox-input\",{\"name\":[513],\"displayName\":[513,\"display-name\"],\"defaultValue\":[513,\"default-value\"],\"autofilled\":[516],\"tooltip\":[513],\"validation\":[16],\"language\":[513],\"emitValue\":[516,\"emit-value\"],\"clientStyling\":[513,\"client-styling\"],\"mbSource\":[513,\"mb-source\"],\"errorMessage\":[32],\"isValid\":[32],\"showTooltip\":[32]},[[10,\"click\",\"handleClickOutside\"]],{\"clientStyling\":[\"handleClientStylingChange\"],\"isValid\":[\"validityChanged\"],\"emitValue\":[\"emitValueHandler\"]}],[1,\"date-input\",{\"name\":[513],\"displayName\":[513,\"display-name\"],\"placeholder\":[513],\"validation\":[16],\"defaultValue\":[513,\"default-value\"],\"autofilled\":[516],\"tooltip\":[513],\"language\":[513],\"emitValue\":[516,\"emit-value\"],\"clientStyling\":[513,\"client-styling\"],\"dateFormat\":[513,\"date-format\"],\"emitOnClick\":[516,\"emit-on-click\"],\"enableSouthAfricanMode\":[516,\"enable-south-african-mode\"],\"enableManualDateInput\":[516,\"enable-manual-date-input\"],\"mbSource\":[513,\"mb-source\"],\"errorMessage\":[32],\"isValid\":[32],\"showTooltip\":[32]},[[10,\"click\",\"handleClickOutside\"]],{\"clientStyling\":[\"handleClientStylingChange\"],\"isValid\":[\"validityChanged\"],\"emitValue\":[\"emitValueHandler\"],\"enableSouthAfricanMode\":[\"handleCustomRegistrationChange\"]}],[1,\"email-input\",{\"name\":[513],\"displayName\":[513,\"display-name\"],\"placeholder\":[513],\"validation\":[16],\"defaultValue\":[513,\"default-value\"],\"autofilled\":[516],\"tooltip\":[513],\"language\":[513],\"emitValue\":[516,\"emit-value\"],\"isDuplicateInput\":[516,\"is-duplicate-input\"],\"clientStyling\":[513,\"client-styling\"],\"mbSource\":[513,\"mb-source\"],\"errorMessage\":[32],\"isValid\":[32],\"showTooltip\":[32]},[[10,\"click\",\"handleClickOutside\"],[16,\"sendInputValue\",\"valueChangedHandler\"]],{\"clientStyling\":[\"handleClientStylingChange\"],\"isValid\":[\"validityChanged\"],\"emitValue\":[\"emitValueHandler\"]}],[1,\"number-input\",{\"name\":[513],\"displayName\":[513,\"display-name\"],\"placeholder\":[513],\"validation\":[16],\"defaultValue\":[513,\"default-value\"],\"autofilled\":[516],\"tooltip\":[513],\"language\":[513],\"emitValue\":[516,\"emit-value\"],\"clientStyling\":[513,\"client-styling\"],\"mbSource\":[513,\"mb-source\"],\"errorMessage\":[32],\"isValid\":[32],\"showTooltip\":[32]},[[10,\"click\",\"handleClickOutside\"]],{\"clientStyling\":[\"handleClientStylingChange\"],\"isValid\":[\"validityChanged\"],\"emitValue\":[\"emitValueHandler\"]}],[1,\"password-input\",{\"name\":[513],\"displayName\":[513,\"display-name\"],\"placeholder\":[513],\"defaultValue\":[513,\"default-value\"],\"autofilled\":[516],\"tooltip\":[513],\"validation\":[16],\"noValidation\":[516,\"no-validation\"],\"language\":[513],\"emitValue\":[516,\"emit-value\"],\"isDuplicateInput\":[516,\"is-duplicate-input\"],\"hidePasswordComplexity\":[516,\"hide-password-complexity\"],\"clientStyling\":[513,\"client-styling\"],\"enableSouthAfricanMode\":[516,\"enable-south-african-mode\"],\"mbSource\":[513,\"mb-source\"],\"isValid\":[32],\"errorMessage\":[32],\"showTooltip\":[32],\"passwordComplexity\":[32],\"showPopup\":[32],\"value\":[32]},[[16,\"sendOriginalValidityState\",\"originalValidityChangedHandler\"],[16,\"sendInputValue\",\"valueChangedHandler\"],[10,\"click\",\"handleClickOutside\"]],{\"clientStyling\":[\"handleClientStylingChange\"],\"isValid\":[\"validityChanged\"],\"value\":[\"valueChanged\"],\"emitValue\":[\"emitValueHandler\"]}],[1,\"postalcode-input\",{\"name\":[513],\"displayName\":[513,\"display-name\"],\"placeholder\":[513],\"validation\":[16],\"defaultValue\":[513,\"default-value\"],\"autofilled\":[516],\"tooltip\":[513],\"language\":[513],\"emitValue\":[516,\"emit-value\"],\"clientStyling\":[513,\"client-styling\"],\"postalcodelength\":[520],\"addresses\":[520],\"ignoreCountry\":[516,\"ignore-country\"],\"mbSource\":[513,\"mb-source\"],\"isValid\":[32],\"errorMessage\":[32],\"showTooltip\":[32],\"selectedCountryCode\":[32],\"currentPostalCode\":[32],\"openAddressDropdown\":[32],\"showNoResultsMessage\":[32],\"refreshTrigger\":[32],\"isFetchingAddresses\":[32]},[[10,\"click\",\"handleClickOutside\"],[8,\"countryCodeUpdated\",\"handleCountryCodeUpdate\"],[8,\"addressFetchStarted\",\"handleFetchStarted\"]],{\"clientStyling\":[\"handleClientStylingChange\"],\"isValid\":[\"validityChanged\"],\"emitValue\":[\"emitValueHandler\"],\"addresses\":[\"handleAddresses\"]}],[1,\"radio-input\",{\"name\":[513],\"displayName\":[513,\"display-name\"],\"optionsGroup\":[16],\"validation\":[16],\"tooltip\":[513],\"language\":[513],\"emitValue\":[516,\"emit-value\"],\"clientStyling\":[513,\"client-styling\"],\"mbSource\":[513,\"mb-source\"],\"errorMessage\":[32],\"isValid\":[32],\"showTooltip\":[32]},[[10,\"click\",\"handleClickOutside\"]],{\"clientStyling\":[\"handleClientStylingChange\"],\"isValid\":[\"validityChanged\"],\"emitValue\":[\"emitValueHandler\"]}],[1,\"select-input\",{\"name\":[513],\"displayName\":[513,\"display-name\"],\"placeholder\":[513],\"action\":[513],\"defaultValue\":[513,\"default-value\"],\"autofilled\":[516],\"tooltip\":[513],\"options\":[16],\"validation\":[16],\"language\":[513],\"emitValue\":[516,\"emit-value\"],\"clientStyling\":[513,\"client-styling\"],\"mbSource\":[513,\"mb-source\"],\"errorMessage\":[32],\"isValid\":[32],\"showTooltip\":[32]},[[10,\"click\",\"handleClickOutside\"]],{\"clientStyling\":[\"handleClientStylingChange\"],\"isValid\":[\"validityChanged\"],\"emitValue\":[\"emitValueHandler\"]}],[1,\"tel-input\",{\"name\":[513],\"displayName\":[513,\"display-name\"],\"placeholder\":[513],\"showLabels\":[516,\"show-labels\"],\"action\":[513],\"validation\":[16],\"defaultValue\":[520,\"default-value\"],\"autofilled\":[516],\"tooltip\":[513],\"language\":[513],\"emitValue\":[516,\"emit-value\"],\"clientStyling\":[513,\"client-styling\"],\"mbSource\":[513,\"mb-source\"],\"enableCustomRegexValidation\":[516,\"enable-custom-regex-validation\"],\"isValid\":[32],\"errorMessage\":[32],\"showTooltip\":[32],\"disablePhonePrefix\":[32],\"phoneValue\":[32],\"phoneCodesOptions\":[32]},[[10,\"click\",\"handleClickOutside\"]],{\"clientStyling\":[\"handleClientStylingChange\"],\"isValid\":[\"validityChanged\"],\"emitValue\":[\"emitValueHandler\"]}],[1,\"text-input\",{\"name\":[513],\"displayName\":[513,\"display-name\"],\"placeholder\":[513],\"validation\":[16],\"defaultValue\":[513,\"default-value\"],\"autofilled\":[516],\"tooltip\":[513],\"language\":[513],\"checkValidity\":[516,\"check-validity\"],\"emitValue\":[516,\"emit-value\"],\"isDuplicateInput\":[516,\"is-duplicate-input\"],\"clientStyling\":[513,\"client-styling\"],\"haspostalcodelookup\":[516],\"enableSouthAfricanMode\":[516,\"enable-south-african-mode\"],\"mbSource\":[513,\"mb-source\"],\"isValid\":[32],\"errorMessage\":[32],\"showTooltip\":[32],\"selectedCountryCode\":[32]},[[10,\"click\",\"handleClickOutside\"],[16,\"sendInputValue\",\"valueChangedHandler\"],[16,\"validationChange\",\"handleValidationChange\"],[8,\"countryCodeUpdated\",\"handleCountryCodeUpdate\"],[16,\"sendAddressValue\",\"handleAddressSelection\"],[8,\"documentNumberUpdatedExternally\",\"handleExternalDocUpdate\"],[8,\"documentNumberResetValidation\",\"handleDocReset\"]],{\"clientStyling\":[\"handleClientStylingChange\"],\"isValid\":[\"validityChanged\"],\"emitValue\":[\"emitValueHandler\"]}],[1,\"twofa-input\",{\"name\":[513],\"displayName\":[513,\"display-name\"],\"placeholder\":[513],\"validation\":[16],\"tooltip\":[513],\"language\":[513],\"emitValue\":[516,\"emit-value\"],\"destination\":[513],\"resendIntervalSeconds\":[514,\"resend-interval-seconds\"],\"clientStyling\":[513,\"client-styling\"],\"enableSouthAfricanMode\":[516,\"enable-south-african-mode\"],\"pinAttemptsExceeded\":[516,\"pin-attempts-exceeded\"],\"clientStylingUrl\":[513,\"client-styling-url\"],\"mbSource\":[513,\"mb-source\"],\"isValid\":[32],\"isResendButtonAvailable\":[32],\"showTooltip\":[32],\"errorMessage\":[32],\"code\":[32],\"resendIntervalSecondsLeft\":[32],\"revealedIndexes\":[32]},[[10,\"click\",\"handleClickOutside\"]],{\"isValid\":[\"validityChanged\"],\"emitValue\":[\"emitValueHandler\"],\"clientStyling\":[\"handleClientStylingChange\"],\"clientStylingUrl\":[\"handleClientStylingChangeURL\"]}]]]]"), options);
20
20
  });