@prosopo/client-bundle-example 2.9.5 → 2.10.5

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +134 -0
  2. package/dist/cjs/index.cjs +49 -0
  3. package/dist/index.js +49 -1
  4. package/package.json +5 -9
  5. package/vite.config.ts +1 -0
  6. package/dist/assets/captcha-BaCo3bEP.js +0 -1
  7. package/dist/assets/captcha-DAWM1slf.css +0 -1
  8. package/dist/assets/dummy.txt +0 -0
  9. package/dist/assets/frictionless-explicit-CtnTw8dK.js +0 -1
  10. package/dist/assets/frictionless-implicit-BH7anfOq.js +0 -1
  11. package/dist/assets/image-explicit-Dm_JoW0N.js +0 -4
  12. package/dist/assets/image-implicit-M0Y7U93R.js +0 -1
  13. package/dist/assets/index-Ck5HfpfQ.js +0 -1
  14. package/dist/assets/invisible-frictionless-explicit-CSPYfcNr.js +0 -4
  15. package/dist/assets/invisible-frictionless-implicit-D0saDt4U.js +0 -1
  16. package/dist/assets/invisible-image-explicit-erOMAo-F.js +0 -4
  17. package/dist/assets/invisible-image-implicit-c0sMfk2s.js +0 -1
  18. package/dist/assets/invisible-pow-explicit-BgMt7lhN.js +0 -4
  19. package/dist/assets/invisible-pow-implicit-CnxS8gw2.js +0 -4
  20. package/dist/assets/pow-explicit-BgDWNJK9.js +0 -4
  21. package/dist/assets/pow-implicit-Ck5HfpfQ.js +0 -1
  22. package/dist/frictionless-explicit.html +0 -875
  23. package/dist/frictionless-implicit.html +0 -874
  24. package/dist/image-explicit.html +0 -877
  25. package/dist/index.html +0 -850
  26. package/dist/invisible-frictionless-explicit.html +0 -877
  27. package/dist/invisible-frictionless-implicit.html +0 -884
  28. package/dist/invisible-image-explicit.html +0 -878
  29. package/dist/invisible-image-implicit.html +0 -884
  30. package/dist/invisible-pow-explicit.html +0 -878
  31. package/dist/invisible-pow-implicit.html +0 -878
  32. package/dist/plugins/explanation-injector.ts +0 -250
  33. package/dist/plugins/form-filler-injector.ts +0 -233
  34. package/dist/plugins/navigation-injector.ts +0 -602
  35. package/dist/plugins/status-log-injector.ts +0 -199
  36. package/dist/pow-explicit.html +0 -877
  37. package/dist/pow-implicit.html +0 -881
package/CHANGELOG.md CHANGED
@@ -1,5 +1,139 @@
1
1
  # @prosopo/client-bundle-example
2
2
 
3
+ ## 2.10.5
4
+ ### Patch Changes
5
+
6
+ - Updated dependencies [1e3a838]
7
+ - @prosopo/config@3.1.20
8
+
9
+ ## 2.10.4
10
+ ### Patch Changes
11
+
12
+ - 5659b24: Release 3.4.4
13
+ - Updated dependencies [5659b24]
14
+ - @prosopo/config@3.1.19
15
+
16
+ ## 2.10.3
17
+ ### Patch Changes
18
+
19
+ - 50c4120: Release 3.4.3
20
+ - Updated dependencies [50c4120]
21
+ - @prosopo/config@3.1.18
22
+
23
+ ## 2.10.2
24
+ ### Patch Changes
25
+
26
+ - 618703f: Release 3.4.2
27
+ - Updated dependencies [618703f]
28
+ - @prosopo/config@3.1.17
29
+
30
+ ## 2.10.1
31
+ ### Patch Changes
32
+
33
+ - 11303d9: Release 3.4.0
34
+ - 18cb28b: Release 3.4.1
35
+ - Updated dependencies [11303d9]
36
+ - Updated dependencies [18cb28b]
37
+ - @prosopo/config@3.1.16
38
+
39
+ ## 2.10.0
40
+ ### Minor Changes
41
+
42
+ - 6768f14: Update salt
43
+
44
+ ### Patch Changes
45
+
46
+ - f3f7aec: Release 3.4.0
47
+ - Updated dependencies [f3f7aec]
48
+ - @prosopo/config@3.1.15
49
+
50
+ ## 2.9.17
51
+ ### Patch Changes
52
+
53
+ - Release 3.3.1
54
+ - 0824221: Release 3.2.4
55
+ - Updated dependencies
56
+ - Updated dependencies [0824221]
57
+ - @prosopo/config@3.1.14
58
+
59
+ ## 2.9.16
60
+ ### Patch Changes
61
+
62
+ - 008d112: Release 3.3.0
63
+ - Updated dependencies [008d112]
64
+ - @prosopo/config@3.1.13
65
+
66
+ ## 2.9.15
67
+ ### Patch Changes
68
+
69
+ - 0824221: Release 3.2.4
70
+ - Updated dependencies [0824221]
71
+ - @prosopo/config@3.1.12
72
+
73
+ ## 2.9.14
74
+ ### Patch Changes
75
+
76
+ - 1a23649: Release 3.2.3
77
+ - Updated dependencies [1a23649]
78
+ - @prosopo/config@3.1.11
79
+
80
+ ## 2.9.13
81
+ ### Patch Changes
82
+
83
+ - 657a827: Release 3.2.2
84
+ - Updated dependencies [657a827]
85
+ - @prosopo/config@3.1.10
86
+
87
+ ## 2.9.12
88
+ ### Patch Changes
89
+
90
+ - 4440947: fix type-only tsc compilation
91
+ - 7bdaca6: Release 3.2.1
92
+ - Updated dependencies [4440947]
93
+ - Updated dependencies [7bdaca6]
94
+ - Updated dependencies [809b984]
95
+ - Updated dependencies [809b984]
96
+ - @prosopo/config@3.1.9
97
+
98
+ ## 2.9.11
99
+ ### Patch Changes
100
+
101
+ - 6fe8570: Release 3.2.0
102
+ - Updated dependencies [6fe8570]
103
+ - @prosopo/config@3.1.8
104
+
105
+ ## 2.9.10
106
+ ### Patch Changes
107
+
108
+ - 181e0f5: Hot fix migrate Ips script
109
+ - f304be9: Release 3.1.13
110
+ - Updated dependencies [f304be9]
111
+ - @prosopo/config@3.1.7
112
+
113
+ ## 2.9.9
114
+ ### Patch Changes
115
+
116
+ - Updated dependencies [9eed772]
117
+ - @prosopo/config@3.1.6
118
+
119
+ ## 2.9.8
120
+ ### Patch Changes
121
+
122
+ - 6960643: lint detect missing and unneccessary imports
123
+
124
+ ## 2.9.7
125
+ ### Patch Changes
126
+
127
+ - Updated dependencies [30e7d4d]
128
+ - @prosopo/config@3.1.5
129
+
130
+ ## 2.9.6
131
+ ### Patch Changes
132
+
133
+ - Updated dependencies [44ffda2]
134
+ - Updated dependencies [a49b538]
135
+ - @prosopo/config@3.1.4
136
+
3
137
  ## 2.9.5
4
138
  ### Patch Changes
5
139
 
@@ -1 +1,50 @@
1
1
  "use strict";
2
+ (() => {
3
+ function whenDOMReady(fn) {
4
+ if (document.readyState !== "loading") fn();
5
+ else document.addEventListener("DOMContentLoaded", fn);
6
+ }
7
+ whenDOMReady(() => {
8
+ const wrappers = Array.from(
9
+ document.querySelectorAll(".mui-textfield--float-label")
10
+ );
11
+ for (const wrapper of wrappers) {
12
+ const input = wrapper.querySelector("input, textarea, select");
13
+ const label = wrapper.querySelector("label");
14
+ if (!input || !label) return;
15
+ if (!input.getAttribute("aria-label") && label.textContent) {
16
+ input.setAttribute("aria-label", label.textContent.trim());
17
+ }
18
+ const update = () => {
19
+ const isChecked = input.type === "checkbox" || input.type === "radio";
20
+ const hasValue = isChecked ? input.checked : input.value && input.value.trim() !== "";
21
+ if (document.activeElement === input || hasValue) {
22
+ wrapper.classList.add("label-hidden");
23
+ } else {
24
+ wrapper.classList.remove("label-hidden");
25
+ }
26
+ };
27
+ for (const evt of [
28
+ "focus",
29
+ "input",
30
+ "blur",
31
+ "change",
32
+ "keyup",
33
+ "paste"
34
+ ]) {
35
+ input.addEventListener(evt, update, { passive: true });
36
+ }
37
+ update();
38
+ }
39
+ const maxChecks = 12;
40
+ let checks = 0;
41
+ const iv = setInterval(() => {
42
+ checks++;
43
+ for (const w of wrappers) {
44
+ const input = w.querySelector("input,textarea,select");
45
+ if (input) input.dispatchEvent(new Event("input", { bubbles: true }));
46
+ }
47
+ if (checks >= maxChecks) clearInterval(iv);
48
+ }, 250);
49
+ });
50
+ })();
package/dist/index.js CHANGED
@@ -1 +1,49 @@
1
-
1
+ (() => {
2
+ function whenDOMReady(fn) {
3
+ if (document.readyState !== "loading") fn();
4
+ else document.addEventListener("DOMContentLoaded", fn);
5
+ }
6
+ whenDOMReady(() => {
7
+ const wrappers = Array.from(
8
+ document.querySelectorAll(".mui-textfield--float-label")
9
+ );
10
+ for (const wrapper of wrappers) {
11
+ const input = wrapper.querySelector("input, textarea, select");
12
+ const label = wrapper.querySelector("label");
13
+ if (!input || !label) return;
14
+ if (!input.getAttribute("aria-label") && label.textContent) {
15
+ input.setAttribute("aria-label", label.textContent.trim());
16
+ }
17
+ const update = () => {
18
+ const isChecked = input.type === "checkbox" || input.type === "radio";
19
+ const hasValue = isChecked ? input.checked : input.value && input.value.trim() !== "";
20
+ if (document.activeElement === input || hasValue) {
21
+ wrapper.classList.add("label-hidden");
22
+ } else {
23
+ wrapper.classList.remove("label-hidden");
24
+ }
25
+ };
26
+ for (const evt of [
27
+ "focus",
28
+ "input",
29
+ "blur",
30
+ "change",
31
+ "keyup",
32
+ "paste"
33
+ ]) {
34
+ input.addEventListener(evt, update, { passive: true });
35
+ }
36
+ update();
37
+ }
38
+ const maxChecks = 12;
39
+ let checks = 0;
40
+ const iv = setInterval(() => {
41
+ checks++;
42
+ for (const w of wrappers) {
43
+ const input = w.querySelector("input,textarea,select");
44
+ if (input) input.dispatchEvent(new Event("input", { bubbles: true }));
45
+ }
46
+ if (checks >= maxChecks) clearInterval(iv);
47
+ }, 250);
48
+ });
49
+ })();
package/package.json CHANGED
@@ -17,22 +17,18 @@
17
17
  "scripts": {
18
18
  "clean": "del-cli --verbose dist tsconfig.tsbuildinfo",
19
19
  "build": "NODE_ENV=${NODE_ENV:-development}; vite build --config vite.esm.config.ts --mode $NODE_ENV",
20
+ "build:tsc": "tsc --build --verbose",
20
21
  "build:cjs": "NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV",
21
22
  "bundle": "NODE_ENV=${NODE_ENV:-development}; vite build --config vite.config.ts --mode $NODE_ENV",
22
- "typecheck": "tsc --build --declaration --emitDeclarationOnly",
23
+ "typecheck": "tsc --project tsconfig.types.json",
23
24
  "start": "NODE_ENV=${NODE_ENV:-development}; vite serve ./src --port 9232 --config vite.config.ts --mode=$NODE_ENV"
24
25
  },
25
- "version": "2.9.5",
26
+ "version": "2.10.5",
26
27
  "dependencies": {
27
- "@typegoose/auto-increment": "4.13.0",
28
- "axios": "1.10.0",
29
- "esbuild": "0.25.6",
30
- "openpgp": "5.11.3",
31
- "webpack-dev-server": "5.2.2",
32
- "@prosopo/config": "3.1.3"
28
+ "@prosopo/config": "3.1.20"
33
29
  },
34
30
  "devDependencies": {
35
- "@prosopo/dotenv": "3.0.7",
31
+ "@prosopo/dotenv": "3.0.25",
36
32
  "@types/node": "22.5.5",
37
33
  "@vitest/coverage-v8": "3.0.9",
38
34
  "concurrently": "9.0.1",
package/vite.config.ts CHANGED
@@ -196,6 +196,7 @@ export default defineConfig(({ command, mode }) => {
196
196
  console.log("Copying additional files from src to dist...");
197
197
  // Only copy assets and other non-HTML files since HTML files are processed by Vite
198
198
  const srcAssetsDir = path.resolve(__dirname, "src/assets");
199
+
199
200
  const destAssetsDir = path.resolve(__dirname, "dist/assets");
200
201
  if (fs.existsSync(srcAssetsDir)) {
201
202
  copyDirContents(srcAssetsDir, destAssetsDir);
@@ -1 +0,0 @@
1
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function s(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?r.credentials="include":e.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(e){if(e.ep)return;e.ep=!0;const r=s(e);fetch(e.href,r)}})();
@@ -1 +0,0 @@
1
- .console-output{margin-top:20px;padding:10px;background-color:#f5f5f5;border:1px solid #ddd;border-radius:4px;font-family:monospace;white-space:pre-wrap;max-height:200px;overflow-y:auto}.info-box{background-color:#e7f3fe;border-left:4px solid #2196f3;padding:15px;margin:20px 0}.explanation{margin:20px 0;padding:20px;background-color:#f9f9f9;border-radius:5px;border:1px solid #ddd}code{background-color:#f0f0f0;padding:2px 4px;border-radius:3px;font-family:monospace}pre{background-color:#f5f5f5;padding:10px;border-radius:5px;overflow-x:auto;border:1px solid #ddd}.captcha-status{margin-top:20px;padding:15px;background-color:#f0f8ff;border:2px solid #2196f3;border-radius:5px;font-family:monospace;font-size:14px}.status-item{margin:5px 0;padding:5px}.status-success{color:#4caf50;font-weight:700}.status-error{color:#f44336;font-weight:700}.status-info{color:#2196f3}.status-warning{color:#ff9800}.status-title{font-weight:700;margin-bottom:10px;border-bottom:1px solid #2196f3;padding-bottom:5px}.account-select{margin:10px 0;padding:10px;background-color:#f9f9f9;border-radius:5px;border:1px solid #ddd}
File without changes
@@ -1 +0,0 @@
1
- import"./captcha-BaCo3bEP.js";import{render as l}from"http://localhost:9269/procaptcha.bundle.js";window.onCaptchaFailed=function(){console.log("Challenge failed"),updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error")};window.addEventListener("load",()=>{updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info"),window.setIsError=s=>{const t=document.getElementById("messageContainer");t.style.color=s?"red":"black",t.style.display="block"},window.setMessage=s=>{document.getElementById("message").innerText=s},window.onLoggedIn=s=>{updateCaptchaStatus("Logged in, fetching private resource","info");const t=new URL("/private",config.serverUrl).href;console.log("getting private resource with token ",s,"at",t),fetch(t,{method:"GET",headers:{Origin:"http://localhost:9232","Content-Type":"application/json",Authorization:`Bearer ${s}`}}).then(async e=>{try{const a=await e.json();e.status===200?(updateCaptchaStatus("Successfully accessed private resource","success"),setMessage(a.message)):updateCaptchaStatus(`Failed to access private resource: ${e.status}`,"error")}catch(a){console.log(a),updateCaptchaStatus(`Error parsing response: ${a}`,"error")}}).catch(e=>{console.log(e),updateCaptchaStatus(`Fetch error: ${e}`,"error")})},window.onActionHandler=()=>{updateCaptchaStatus("Form submission initiated","info");const s=document.getElementsByName("procaptcha-response");if(!s.length){updateCaptchaStatus("Error: No CAPTCHA response found","error"),alert("Must complete captcha");return}const t=s[0].value;updateCaptchaStatus(`Token received: ${t.substring(0,15)}...`,"success");const e={email:document.getElementById("email").value,name:document.getElementById("name").value,password:document.getElementById("password").value,"procaptcha-response":t},a=new URL("signup",void 0).href;console.log("posting to",a,"with payload",e),fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),contentType:"application/json"}).then(o=>new Promise(n=>o.json().then(r=>n({status:o.status,ok:o.ok,json:r})))).then(async({status:o,json:n,ok:r})=>{console.log("status",o,"json",n.message,"ok",r),console.log("json",n);try{o!==200?(updateCaptchaStatus(`API Error: ${n.message}`,"error"),setIsError(!0),setMessage(n.message)):(updateCaptchaStatus(`API Success: ${n.message}`,"success"),setIsError(!1),setMessage(n.message))}catch(i){console.log(i),updateCaptchaStatus(`Error processing response: ${i}`,"error")}}).catch(o=>{console.log(o),updateCaptchaStatus(`Fetch error: ${o}`,"error"),setIsError(!0),setMessage("Error: "+o)})};const c=new MutationObserver(s=>{s.forEach(t=>{if(t.addedNodes.length)for(let e=0;e<t.addedNodes.length;e++){const a=t.addedNodes[e];if(a.classList&&(a.classList.contains("procaptcha")||a.querySelector&&a.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),c.disconnect();break}}})});c.observe(document.body,{childList:!0,subtree:!0})});function d(c){console.log("Challenge passed"),window.updateCaptchaStatus("Challenge passed successfully!","success"),window.updateCaptchaStatus(`Token generated: ${c.substring(0,15)}...`,"success")}const p=document.getElementById("procaptcha-container");l(p,{siteKey:void 0,captchaType:"frictionless",callback:d,"failed-callback":function(){console.log("Challenge failed"),window.updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error")}});
@@ -1 +0,0 @@
1
- import"./captcha-BaCo3bEP.js";import{render as d}from"http://localhost:9269/procaptcha.bundle.js";window.addEventListener("load",()=>{updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info"),window.setIsError=s=>{const t=document.getElementById("messageContainer");t.style.color=s?"red":"black",t.style.display="block"},window.setMessage=s=>{document.getElementById("message").innerText=s},window.onLoggedIn=s=>{updateCaptchaStatus("Logged in, fetching private resource","info");const t=new URL("/private",config.serverUrl).href;console.log("getting private resource with token ",s,"at",t),fetch(t,{method:"GET",headers:{Origin:"http://localhost:9232","Content-Type":"application/json",Authorization:`Bearer ${s}`}}).then(async e=>{try{const a=await e.json();e.status===200?(updateCaptchaStatus("Successfully accessed private resource","success"),setMessage(a.message)):updateCaptchaStatus(`Failed to access private resource: ${e.status}`,"error")}catch(a){console.log(a),updateCaptchaStatus(`Error parsing response: ${a}`,"error")}}).catch(e=>{console.log(e),updateCaptchaStatus(`Fetch error: ${e}`,"error")})},window.onActionHandler=()=>{updateCaptchaStatus("Form submission initiated","info");const s=document.getElementsByName("procaptcha-response");if(!s.length){updateCaptchaStatus("Error: No CAPTCHA response found","error"),alert("Must complete captcha");return}const t=s[0].value;updateCaptchaStatus(`Token received: ${t.substring(0,15)}...`,"success");const e={email:document.getElementById("email").value,name:document.getElementById("name").value,password:document.getElementById("password").value,"procaptcha-response":t},a=new URL("signup",void 0).href;console.log("posting to",a,"with payload",e),fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),contentType:"application/json"}).then(o=>new Promise(n=>o.json().then(c=>n({status:o.status,ok:o.ok,json:c})))).then(async({status:o,json:n,ok:c})=>{console.log("status",o,"json",n.message,"ok",c),console.log("json",n);try{o!==200?(updateCaptchaStatus(`API Error: ${n.message}`,"error"),setIsError(!0),setMessage(n.message)):(updateCaptchaStatus(`API Success: ${n.message}`,"success"),setIsError(!1),setMessage(n.message))}catch(i){console.log(i),updateCaptchaStatus(`Error processing response: ${i}`,"error")}}).catch(o=>{console.log(o),updateCaptchaStatus(`Fetch error: ${o}`,"error"),setIsError(!0),setMessage("Error: "+o)})};const r=new MutationObserver(s=>{s.forEach(t=>{if(t.addedNodes.length)for(let e=0;e<t.addedNodes.length;e++){const a=t.addedNodes[e];if(a.classList&&(a.classList.contains("procaptcha")||a.querySelector&&a.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),r.disconnect();break}}})});r.observe(document.body,{childList:!0,subtree:!0})});function l(r){console.log("Challenge passed"),window.updateCaptchaStatus("Challenge passed successfully!","success"),window.updateCaptchaStatus(`Token generated: ${r.substring(0,15)}...`,"success")}const p=document.getElementById("procaptcha-container"),u=d(p,{siteKey:void 0,captchaType:"frictionless",callback:l,"failed-callback":function(){console.log("Challenge failed"),window.updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error")}});window.updateCaptchaStatus("CAPTCHA render function called with widget ID: "+u,"info");
@@ -1,4 +0,0 @@
1
- import"./captcha-BaCo3bEP.js";import{render as o}from"http://localhost:9269/procaptcha.bundle.js";document.addEventListener("DOMContentLoaded",function(){updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const t=new MutationObserver(a=>{a.forEach(e=>{if(e.addedNodes.length)for(let n=0;n<e.addedNodes.length;n++){const i=e.addedNodes[n];if(i.classList&&(i.classList.contains("procaptcha")||i.querySelector&&i.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),t.disconnect();break}}})});t.observe(document.body,{childList:!0,subtree:!0})});function d(){const t=document.getElementById("name"),a=document.getElementById("email"),e=document.getElementById("error");return!t.value||!a.value?(e.textContent="Please fill out all fields",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Empty fields","error"),!1):/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a.value)?(e.style.display="none",window.updateCaptchaStatus("Form validation passed","info"),!0):(e.textContent="Please enter a valid email address",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Invalid email format","error"),!1)}function s(t){console.log("Procaptcha verified, token:",t),window.updateCaptchaStatus("Challenge passed successfully!","success"),window.updateCaptchaStatus(`Token generated: ${t.substring(0,15)}...`,"success");const a=document.getElementById("name").value,e=document.getElementById("email").value,n=document.getElementById("result");n.innerHTML=`<strong>Form submitted with:</strong><br>
2
- - Name: ${a}<br>
3
- - Email: ${e}<br>
4
- - Procaptcha verified: Yes`,n.style.display="block",window.updateCaptchaStatus("Form submission completed","success")}function l(){console.log("Captcha verification failed"),window.updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error"),document.getElementById("error").textContent="CAPTCHA verification failed. Please try again.",document.getElementById("error").style.display="block"}document.addEventListener("DOMContentLoaded",function(){window.updateCaptchaStatus("Initializing CAPTCHA with explicit render call","info");const t=o(document.getElementById("procaptcha-container"),{siteKey:void 0,captchaType:"image",callback:s,"failed-callback":l});window.updateCaptchaStatus("CAPTCHA render function called with widget ID: "+t,"info"),document.getElementById("demo-form").addEventListener("submit",function(a){a.preventDefault(),window.updateCaptchaStatus("Form submission attempted","info"),d()&&window.updateCaptchaStatus("Waiting for CAPTCHA verification","info")})});
@@ -1 +0,0 @@
1
- import"./captcha-BaCo3bEP.js";import"./index-Ck5HfpfQ.js";
@@ -1 +0,0 @@
1
- import"./captcha-BaCo3bEP.js";window.addEventListener("load",()=>{window.setIsError=s=>{const t=document.getElementById("messageContainer");t.style.color=s?"red":"black",t.style.display="block"},window.setMessage=s=>{document.getElementById("message").innerText=s},window.onLoggedIn=s=>{updateCaptchaStatus("Logged in, fetching private resource","info");const t=new URL("/private",config.serverUrl).href;console.log("getting private resource with token ",s,"at",t),fetch(t,{method:"GET",headers:{Origin:"http://localhost:9232","Content-Type":"application/json",Authorization:`Bearer ${s}`}}).then(async e=>{try{const a=await e.json();e.status===200?(updateCaptchaStatus("Successfully accessed private resource","success"),setMessage(a.message)):updateCaptchaStatus(`Failed to access private resource: ${e.status}`,"error")}catch(a){console.log(a),updateCaptchaStatus(`Error parsing response: ${a}`,"error")}}).catch(e=>{console.log(e),updateCaptchaStatus(`Fetch error: ${e}`,"error")})},window.onActionHandler=()=>{updateCaptchaStatus("Form submission initiated","info");const s=document.getElementsByName("procaptcha-response");if(!s.length){updateCaptchaStatus("Error: No CAPTCHA response found","error"),alert("Must complete captcha");return}const t=s[0].value;updateCaptchaStatus(`Token received: ${t.substring(0,15)}...`,"success");const e={email:document.getElementById("email").value,name:document.getElementById("name").value,password:document.getElementById("password").value,"procaptcha-response":t},a=new URL("signup",void 0).href;console.log("posting to",a,"with payload",e),fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),contentType:"application/json"}).then(o=>new Promise(n=>o.json().then(c=>n({status:o.status,ok:o.ok,json:c})))).then(async({status:o,json:n,ok:c})=>{console.log("status",o,"json",n.message,"ok",c),console.log("json",n);try{o!==200?(updateCaptchaStatus(`API Error: ${n.message}`,"error"),setIsError(!0),setMessage(n.message)):(updateCaptchaStatus(`API Success: ${n.message}`,"success"),setIsError(!1),setMessage(n.message))}catch(i){console.log(i),updateCaptchaStatus(`Error processing response: ${i}`,"error")}}).catch(o=>{console.log(o),updateCaptchaStatus(`Fetch error: ${o}`,"error"),setIsError(!0),setMessage("Error: "+o)})},updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const r=new MutationObserver(s=>{s.forEach(t=>{if(t.addedNodes.length)for(let e=0;e<t.addedNodes.length;e++){const a=t.addedNodes[e];if(a.classList&&(a.classList.contains("procaptcha")||a.querySelector&&a.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),r.disconnect();break}}})});r.observe(document.body,{childList:!0,subtree:!0})});window.onCaptchaFailed=function(){console.log("Challenge failed"),updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error")};window.onCaptchaVerified=r=>{console.log("Challenge passed"),updateCaptchaStatus("Challenge passed successfully!","success"),updateCaptchaStatus(`Token generated: ${r.substring(0,15)}...`,"success")};document.addEventListener("DOMContentLoaded",function(){setTimeout(()=>{updateCaptchaStatus("CAPTCHA script loaded and initialized","info"),updateCaptchaStatus("Waiting for user interaction...","info")},500)});
@@ -1,4 +0,0 @@
1
- import"./captcha-BaCo3bEP.js";import{render as i,execute as o}from"http://localhost:9269/procaptcha.bundle.js";function l(){const t=document.getElementById("name"),a=document.getElementById("email"),e=document.getElementById("error");return!t.value||!a.value?(e.textContent="Please fill out all fields",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Empty fields","error"),!1):/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a.value)?(e.style.display="none",window.updateCaptchaStatus("Form validation passed","info"),!0):(e.textContent="Please enter a valid email address",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Invalid email format","error"),!1)}function d(t){console.log("Procaptcha verified, token:",t),window.updateCaptchaStatus("Challenge passed successfully!","success"),window.updateCaptchaStatus(`Token generated: ${t.substring(0,15)}...`,"success");const a=document.getElementById("name").value,e=document.getElementById("email").value,n=document.getElementById("result");n.innerHTML=`<strong>Form submitted with:</strong><br>
2
- - Name: ${a}<br>
3
- - Email: ${e}<br>
4
- - Procaptcha verified: Yes`,n.style.display="block",window.updateCaptchaStatus("Form submission completed","success")}function s(){console.log("Captcha verification failed"),window.updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error"),document.getElementById("error").textContent="CAPTCHA verification failed. Please try again.",document.getElementById("error").style.display="block"}document.addEventListener("DOMContentLoaded",function(){window.updateCaptchaStatus("Initializing CAPTCHA with explicit render call","info");const t=i(document.getElementById("procaptcha-container"),{siteKey:void 0,captchaType:"frictionless",callback:d,"failed-callback":s,size:"invisible"});window.updateCaptchaStatus("CAPTCHA render function called with widget ID: "+t,"info"),document.getElementById("demo-form").addEventListener("submit",function(a){a.preventDefault(),window.updateCaptchaStatus("Form submission attempted","info"),l()&&(window.updateCaptchaStatus("Waiting for CAPTCHA verification","info"),o())})});
@@ -1 +0,0 @@
1
- import"./captcha-BaCo3bEP.js";window.onCaptchaFailed=function(){updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error")};window.onCaptchaVerified=function(s){updateCaptchaStatus("Challenge passed successfully!","success"),updateCaptchaStatus(`Token generated: ${s.substring(0,15)}...`,"success")};window.onActionHandler=function(s){if(updateCaptchaStatus("CAPTCHA callback executed with token","success"),!s){updateCaptchaStatus("Error: No token received from CAPTCHA","error"),alert("Must complete captcha");return}updateCaptchaStatus("Form submission initiated with valid CAPTCHA token","info");const o={email:document.getElementById("email").value,name:document.getElementById("name").value,password:document.getElementById("password").value,"procaptcha-response":s},a=new URL("signup",void 0).href;console.log("Posting to",a,"with payload",o),fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o),contentType:"application/json"}).then(e=>new Promise(t=>e.json().then(n=>t({status:e.status,ok:e.ok,json:n})))).then(async({status:e,json:t,ok:n})=>{console.log("Response status:",e,"message:",t.message,"ok:",n),console.log("Full response:",t);try{e!==200?(window.setIsError(!0),window.setMessage(t.message),updateCaptchaStatus(`API Error: ${t.message}`,"error")):(window.setIsError(!1),window.setMessage(t.message),updateCaptchaStatus(`API Success: ${t.message}`,"success"))}catch(r){console.log("Error processing response:",r),updateCaptchaStatus(`Error processing response: ${r}`,"error")}}).catch(e=>{console.log("Fetch error:",e),window.setIsError(!0),window.setMessage("Error: "+e),updateCaptchaStatus(`Fetch error: ${e}`,"error")})};window.addEventListener("load",()=>{window.setIsError=o=>{const a=document.getElementById("messageContainer");a.style.color=o?"red":"black",a.style.display="block"},window.setMessage=o=>{document.getElementById("message").innerText=o},window.onLoggedIn=o=>{const a=new URL("/private",config.serverUrl).href;console.log("getting private resource with token ",o,"at",a),fetch(a,{method:"GET",headers:{Origin:"http://localhost:9232","Content-Type":"application/json",Authorization:`Bearer ${o}`}}).then(async e=>{try{const t=await e.json();e.status===200&&setMessage(t.message)}catch(t){console.log(t)}}).catch(e=>{console.log(e)})},updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const s=new MutationObserver(o=>{o.forEach(a=>{if(a.addedNodes.length)for(let e=0;e<a.addedNodes.length;e++){const t=a.addedNodes[e];if(t.classList&&(t.classList.contains("procaptcha")||t.querySelector&&t.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),s.disconnect();break}}})});s.observe(document.body,{childList:!0,subtree:!0})});document.addEventListener("procaptcha:execute",function(s){updateCaptchaStatus("CAPTCHA execution started: type=frictionless, mode=invisible","info"),updateCaptchaStatus(`Container: ${s.detail.containerId}, timestamp: ${new Date(s.detail.timestamp).toLocaleTimeString()}`,"info")});document.addEventListener("DOMContentLoaded",function(){setTimeout(()=>{updateCaptchaStatus("CAPTCHA script loaded and initialized","info"),updateCaptchaStatus("Waiting for user interaction...","info")},500)});
@@ -1,4 +0,0 @@
1
- import"./captcha-BaCo3bEP.js";import{render as o,execute as d}from"http://localhost:9269/procaptcha.bundle.js";document.addEventListener("DOMContentLoaded",function(){updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const t=new MutationObserver(a=>{a.forEach(e=>{if(e.addedNodes.length)for(let n=0;n<e.addedNodes.length;n++){const i=e.addedNodes[n];if(i.classList&&(i.classList.contains("procaptcha")||i.querySelector&&i.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),t.disconnect();break}}})});t.observe(document.body,{childList:!0,subtree:!0})});function s(){const t=document.getElementById("name"),a=document.getElementById("email"),e=document.getElementById("error");return!t.value||!a.value?(e.textContent="Please fill out all fields",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Empty fields","error"),!1):/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a.value)?(e.style.display="none",window.updateCaptchaStatus("Form validation passed","info"),!0):(e.textContent="Please enter a valid email address",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Invalid email format","error"),!1)}function l(t){console.log("Procaptcha verified, token:",t),window.updateCaptchaStatus("Challenge passed successfully!","success"),window.updateCaptchaStatus(`Token generated: ${t.substring(0,15)}...`,"success");const a=document.getElementById("name").value,e=document.getElementById("email").value,n=document.getElementById("result");n.innerHTML=`<strong>Form submitted with:</strong><br>
2
- - Name: ${a}<br>
3
- - Email: ${e}<br>
4
- - Procaptcha verified: Yes`,n.style.display="block",window.updateCaptchaStatus("Form submission completed","success")}function c(){console.log("Captcha verification failed"),window.updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error"),document.getElementById("error").textContent="CAPTCHA verification failed. Please try again.",document.getElementById("error").style.display="block"}document.addEventListener("DOMContentLoaded",function(){window.updateCaptchaStatus("Initializing CAPTCHA with explicit render call","info");const t=o(document.getElementById("procaptcha-container"),{siteKey:void 0,captchaType:"image",callback:l,"failed-callback":c,size:"invisible"});window.updateCaptchaStatus("CAPTCHA render function called with widget ID: "+t,"info"),document.getElementById("demo-form").addEventListener("submit",function(a){a.preventDefault(),window.updateCaptchaStatus("Form submission attempted","info"),s()&&(window.updateCaptchaStatus("Waiting for CAPTCHA verification","info"),d())})});
@@ -1 +0,0 @@
1
- import"./captcha-BaCo3bEP.js";window.onCaptchaFailed=function(){updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error")};window.onCaptchaVerified=function(s){updateCaptchaStatus("Challenge passed successfully!","success"),updateCaptchaStatus(`Token generated: ${s.substring(0,15)}...`,"success")};window.onActionHandler=function(s){if(updateCaptchaStatus("CAPTCHA callback executed with token","success"),!s){updateCaptchaStatus("Error: No token received from CAPTCHA","error"),alert("Must complete captcha");return}updateCaptchaStatus("Form submission initiated with valid CAPTCHA token","info");const o={email:document.getElementById("email").value,name:document.getElementById("name").value,password:document.getElementById("password").value,"procaptcha-response":s},a=new URL("signup",void 0).href;console.log("Posting to",a,"with payload",o),fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o),contentType:"application/json"}).then(e=>new Promise(t=>e.json().then(n=>t({status:e.status,ok:e.ok,json:n})))).then(async({status:e,json:t,ok:n})=>{console.log("Response status:",e,"message:",t.message,"ok:",n),console.log("Full response:",t);try{e!==200?(window.setIsError(!0),window.setMessage(t.message),updateCaptchaStatus(`API Error: ${t.message}`,"error")):(window.setIsError(!1),window.setMessage(t.message),updateCaptchaStatus(`API Success: ${t.message}`,"success"))}catch(r){console.log("Error processing response:",r),updateCaptchaStatus(`Error processing response: ${r}`,"error")}}).catch(e=>{console.log("Fetch error:",e),window.setIsError(!0),window.setMessage("Error: "+e),updateCaptchaStatus(`Fetch error: ${e}`,"error")})};window.addEventListener("load",()=>{window.setIsError=o=>{const a=document.getElementById("messageContainer");a.style.color=o?"red":"black",a.style.display="block"},window.setMessage=o=>{document.getElementById("message").innerText=o},window.onLoggedIn=o=>{const a=new URL("/private",config.serverUrl).href;console.log("getting private resource with token ",o,"at",a),fetch(a,{method:"GET",headers:{Origin:"http://localhost:9232","Content-Type":"application/json",Authorization:`Bearer ${o}`}}).then(async e=>{try{const t=await e.json();e.status===200&&setMessage(t.message)}catch(t){console.log(t)}}).catch(e=>{console.log(e)})},updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const s=new MutationObserver(o=>{o.forEach(a=>{if(a.addedNodes.length)for(let e=0;e<a.addedNodes.length;e++){const t=a.addedNodes[e];if(t.classList&&(t.classList.contains("procaptcha")||t.querySelector&&t.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),s.disconnect();break}}})});s.observe(document.body,{childList:!0,subtree:!0})});document.addEventListener("procaptcha:execute",function(s){updateCaptchaStatus("CAPTCHA execution started: type=image, mode=invisible","info"),updateCaptchaStatus(`Container: ${s.detail.containerId}, timestamp: ${new Date(s.detail.timestamp).toLocaleTimeString()}`,"info")});document.addEventListener("DOMContentLoaded",function(){setTimeout(()=>{updateCaptchaStatus("CAPTCHA script loaded and initialized","info"),updateCaptchaStatus("Waiting for user interaction...","info")},500)});
@@ -1,4 +0,0 @@
1
- import"./captcha-BaCo3bEP.js";import{render as o,execute as d}from"http://localhost:9269/procaptcha.bundle.js";document.addEventListener("DOMContentLoaded",function(){updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const t=new MutationObserver(a=>{a.forEach(e=>{if(e.addedNodes.length)for(let n=0;n<e.addedNodes.length;n++){const i=e.addedNodes[n];if(i.classList&&(i.classList.contains("procaptcha")||i.querySelector&&i.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),t.disconnect();break}}})});t.observe(document.body,{childList:!0,subtree:!0})});function s(){const t=document.getElementById("name"),a=document.getElementById("email"),e=document.getElementById("error");return!t.value||!a.value?(e.textContent="Please fill out all fields",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Empty fields","error"),!1):/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a.value)?(e.style.display="none",window.updateCaptchaStatus("Form validation passed","info"),!0):(e.textContent="Please enter a valid email address",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Invalid email format","error"),!1)}function l(t){console.log("Procaptcha verified, token:",t),window.updateCaptchaStatus("Challenge passed successfully!","success"),window.updateCaptchaStatus(`Token generated: ${t.substring(0,15)}...`,"success");const a=document.getElementById("name").value,e=document.getElementById("email").value,n=document.getElementById("result");n.innerHTML=`<strong>Form submitted with:</strong><br>
2
- - Name: ${a}<br>
3
- - Email: ${e}<br>
4
- - Procaptcha verified: Yes`,n.style.display="block",window.updateCaptchaStatus("Form submission completed","success")}function c(){console.log("Captcha verification failed"),window.updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error"),document.getElementById("error").textContent="CAPTCHA verification failed. Please try again.",document.getElementById("error").style.display="block"}document.addEventListener("DOMContentLoaded",function(){window.updateCaptchaStatus("Initializing CAPTCHA with explicit render call","info");const t=o(document.getElementById("procaptcha-container"),{siteKey:void 0,captchaType:"pow",callback:l,"failed-callback":c,size:"invisible"});window.updateCaptchaStatus("CAPTCHA render function called with widget ID: "+t,"info"),document.getElementById("demo-form").addEventListener("submit",function(a){a.preventDefault(),window.updateCaptchaStatus("Form submission attempted","info"),s()&&(window.updateCaptchaStatus("Waiting for CAPTCHA verification","info"),d())})});
@@ -1,4 +0,0 @@
1
- import"./captcha-BaCo3bEP.js";document.addEventListener("DOMContentLoaded",function(){updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const e=new MutationObserver(n=>{n.forEach(a=>{if(a.addedNodes.length)for(let t=0;t<a.addedNodes.length;t++){const s=a.addedNodes[t];if(s.classList&&(s.classList.contains("procaptcha")||s.querySelector&&s.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),e.disconnect();break}}})});e.observe(document.body,{childList:!0,subtree:!0})});document.addEventListener("procaptcha:execute",function(e){updateCaptchaStatus("CAPTCHA execution started: type=pow, mode=invisible","info"),updateCaptchaStatus(`Container: ${e.detail.containerId}, timestamp: ${new Date(e.detail.timestamp).toLocaleTimeString()}`,"info")});window.onSubmit=function(e){console.log("Procaptcha verified, token: "+e),updateCaptchaStatus("Challenge passed successfully!","success"),updateCaptchaStatus(`Token generated: ${e.substring(0,15)}...`,"success");const n=document.getElementById("name").value,a=document.getElementById("email").value,t=document.getElementById("result");return t&&(t.innerHTML=`<strong>Form submitted with:</strong><br>
2
- - Name: ${n}<br>
3
- - Email: ${a}<br>
4
- - Procaptcha verified: Yes`,t.style.display="block"),updateCaptchaStatus("Form submission completed","success"),!1};
@@ -1,4 +0,0 @@
1
- import"./captcha-BaCo3bEP.js";import{render as i}from"http://localhost:9269/procaptcha.bundle.js";document.addEventListener("DOMContentLoaded",function(){updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const t=new MutationObserver(a=>{a.forEach(e=>{if(e.addedNodes.length)for(let n=0;n<e.addedNodes.length;n++){const o=e.addedNodes[n];if(o.classList&&(o.classList.contains("procaptcha")||o.querySelector&&o.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),t.disconnect();break}}})});t.observe(document.body,{childList:!0,subtree:!0})});function d(){const t=document.getElementById("name"),a=document.getElementById("email"),e=document.getElementById("error");return!t.value||!a.value?(e.textContent="Please fill out all fields",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Empty fields","error"),!1):/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(a.value)?(e.style.display="none",window.updateCaptchaStatus("Form validation passed","info"),!0):(e.textContent="Please enter a valid email address",e.style.display="block",window.updateCaptchaStatus("Form validation failed: Invalid email format","error"),!1)}function s(t){console.log("Procaptcha verified, token:",t),window.updateCaptchaStatus("Challenge passed successfully!","success"),window.updateCaptchaStatus(`Token generated: ${t.substring(0,15)}...`,"success");const a=document.getElementById("name").value,e=document.getElementById("email").value,n=document.getElementById("result");n.innerHTML=`<strong>Form submitted with:</strong><br>
2
- - Name: ${a}<br>
3
- - Email: ${e}<br>
4
- - Procaptcha verified: Yes`,n.style.display="block",window.updateCaptchaStatus("Form submission completed","success")}function l(){console.log("Captcha verification failed"),window.updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error"),document.getElementById("error").textContent="CAPTCHA verification failed. Please try again.",document.getElementById("error").style.display="block"}document.addEventListener("DOMContentLoaded",function(){window.updateCaptchaStatus("Initializing CAPTCHA with explicit render call","info");const t=i(document.getElementById("procaptcha-container"),{siteKey:void 0,captchaType:"pow",callback:s,"failed-callback":l});window.updateCaptchaStatus("CAPTCHA render function called with widget ID: "+t,"info"),document.getElementById("demo-form").addEventListener("submit",function(a){a.preventDefault(),window.updateCaptchaStatus("Form submission attempted","info"),d()&&window.updateCaptchaStatus("Waiting for CAPTCHA verification","info")})});
@@ -1 +0,0 @@
1
- import"./captcha-BaCo3bEP.js";window.addEventListener("load",()=>{window.setIsError=s=>{const t=document.getElementById("messageContainer");t.style.color=s?"red":"black",t.style.display="block"},window.setMessage=s=>{document.getElementById("message").innerText=s},window.onLoggedIn=s=>{updateCaptchaStatus("Logged in, fetching private resource","info");const t=new URL("/private",config.serverUrl).href;console.log("getting private resource with token ",s,"at",t),fetch(t,{method:"GET",headers:{Origin:"http://localhost:9232","Content-Type":"application/json",Authorization:`Bearer ${s}`}}).then(async e=>{try{const a=await e.json();e.status===200?(updateCaptchaStatus("Successfully accessed private resource","success"),setMessage(a.message)):updateCaptchaStatus(`Failed to access private resource: ${e.status}`,"error")}catch(a){console.log(a),updateCaptchaStatus(`Error parsing response: ${a}`,"error")}}).catch(e=>{console.log(e),updateCaptchaStatus(`Fetch error: ${e}`,"error")})},window.onActionHandler=()=>{updateCaptchaStatus("Form submission initiated","info");const s=document.getElementsByName("procaptcha-response");if(!s.length){updateCaptchaStatus("Error: No CAPTCHA response found","error"),alert("Must complete captcha");return}const t=s[0].value;updateCaptchaStatus(`Token received: ${t.substring(0,15)}...`,"success");const e={email:document.getElementById("email").value,name:document.getElementById("name").value,password:document.getElementById("password").value,"procaptcha-response":t},a=new URL("signup",void 0).href;console.log("posting to",a,"with payload",e),fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),contentType:"application/json"}).then(o=>new Promise(n=>o.json().then(c=>n({status:o.status,ok:o.ok,json:c})))).then(async({status:o,json:n,ok:c})=>{console.log("status",o,"json",n.message,"ok",c),console.log("json",n);try{o!==200?(updateCaptchaStatus(`API Error: ${n.message}`,"error"),setIsError(!0),setMessage(n.message)):(updateCaptchaStatus(`API Success: ${n.message}`,"success"),setIsError(!1),setMessage(n.message))}catch(i){console.log(i),updateCaptchaStatus(`Error processing response: ${i}`,"error")}}).catch(o=>{console.log(o),updateCaptchaStatus(`Fetch error: ${o}`,"error"),setIsError(!0),setMessage("Error: "+o)})},updateCaptchaStatus("Page loaded - Initializing CAPTCHA system","info");const r=new MutationObserver(s=>{s.forEach(t=>{if(t.addedNodes.length)for(let e=0;e<t.addedNodes.length;e++){const a=t.addedNodes[e];if(a.classList&&(a.classList.contains("procaptcha")||a.querySelector&&a.querySelector(".procaptcha"))){updateCaptchaStatus("CAPTCHA DOM elements initialized","info"),r.disconnect();break}}})});r.observe(document.body,{childList:!0,subtree:!0})});window.onCaptchaFailed=function(){console.log("Challenge failed"),updateCaptchaStatus("Challenge failed - CAPTCHA verification could not be completed","error")};window.onCaptchaVerified=r=>{console.log("Challenge passed"),updateCaptchaStatus("Challenge passed successfully!","success"),updateCaptchaStatus(`Token generated: ${r.substring(0,15)}...`,"success")};document.addEventListener("DOMContentLoaded",function(){setTimeout(()=>{updateCaptchaStatus("CAPTCHA script loaded and initialized","info"),updateCaptchaStatus("Waiting for user interaction...","info")},500)});