1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1538],{11538:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o});var r=a(12115),s=a(20063);let o=e=>{let{}=e,t=(0,s.useSearchParams)().get("email"),[a]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e=async()=>{if(!t)return;let e=new URL("".concat("https://zps-strapi.prod.dx.zndbx.cloud","/api/lead-users"));e.searchParams.append("filters[email][$eq]",t);let a=await fetch(e.toString(),{method:"GET",headers:{"Content-Type":"application/json"}});if(!a.ok)throw Error("Failed to fetch user");let r=(await a.json()).data[0];if(!r)throw Error("User not found");let s="".concat("https://zps-strapi.prod.dx.zndbx.cloud","/api/lead-users/").concat(r.documentId);if(!(await fetch(s,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:{subscribed:!1}})})).ok)throw Error("Failed to update user")};t&&!a&&e()},[t,a]),null}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.