{"version":3,"file":"PasswordGate.DCujKfgi.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/5ZlyHrATiDggUzip8cZX/ABnhSV4RGB2VutCRvcud/PasswordGate.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useState}from\"react\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight auto\n * @framerIntrinsicWidth 400\n */export default function PasswordGate({password,fallbackUrl,kitFormId,width}){const[showRequest,setShowRequest]=useState(false);const[passwordInput,setPasswordInput]=useState(\"\");const[passwordError,setPasswordError]=useState(false);const[name,setName]=useState(\"\");const[email,setEmail]=useState(\"\");const[submitted,setSubmitted]=useState(false);const[submitting,setSubmitting]=useState(false);const handlePasswordSubmit=e=>{e.preventDefault();if(passwordInput.trim().toLowerCase()===password.trim().toLowerCase()){try{sessionStorage.setItem(\"twbtw_auth\",\"granted\");const returnTo=sessionStorage.getItem(\"twbtw_return_to\")||fallbackUrl;sessionStorage.removeItem(\"twbtw_return_to\");window.location.href=returnTo;}catch{window.location.href=fallbackUrl;}}else{setPasswordError(true);setTimeout(()=>setPasswordError(false),3e3);}};const handleRequestSubmit=async e=>{e.preventDefault();setSubmitting(true);try{await fetch(`https://app.convertkit.com/forms/${kitFormId}/subscriptions`,{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({first_name:name,email_address:email})});}catch{}setSubmitted(true);setSubmitting(false);};// Glass vocabulary aligned with LiquidGlassPlayer / TransmissionDetailCard.\nconst glass={width:\"100%\",background:\"rgba(20, 20, 22, 0.10)\",border:\"1px solid rgba(255, 255, 255, 0.10)\",backdropFilter:\"blur(14px) saturate(140%)\",WebkitBackdropFilter:\"blur(14px) saturate(140%)\",boxShadow:\"0 24px 64px rgba(0,0,0,0.50), inset 0 1px 0 rgba(255,255,255,0.10)\",borderRadius:100,padding:\"18px 26px\",color:\"rgba(255,255,255,0.95)\",fontSize:13,fontWeight:500,outline:\"none\",fontFamily:\"'Poppins', -apple-system, BlinkMacSystemFont, 'Inter', sans-serif\",boxSizing:\"border-box\"};const btn={...glass,cursor:\"pointer\",textAlign:\"center\",letterSpacing:\"0.18em\",transition:\"background 0.2s, border-color 0.2s\"};const linkBtn={background:\"none\",border:\"none\",color:\"rgba(255,255,255,0.55)\",fontSize:11,fontWeight:500,letterSpacing:\"0.18em\",textTransform:\"uppercase\",cursor:\"pointer\",fontFamily:\"'Poppins', -apple-system, BlinkMacSystemFont, 'Inter', sans-serif\",padding:\"6px 0\",textAlign:\"center\",textDecoration:\"underline\",textDecorationColor:\"rgba(255,255,255,0.25)\",textUnderlineOffset:\"4px\",width:\"100%\",transition:\"color 0.2s\"};return /*#__PURE__*/_jsxs(\"div\",{style:{width:width,display:\"flex\",flexDirection:\"column\",gap:10},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                .pwgate-input::placeholder {\n                    color: rgba(255,255,255,0.55);\n                    font-weight: 500;\n                    letter-spacing: 0.18em;\n                    text-transform: uppercase;\n                    opacity: 1;\n                }\n            `}),/*#__PURE__*/_jsxs(\"form\",{onSubmit:handlePasswordSubmit,children:[/*#__PURE__*/_jsx(\"input\",{className:\"pwgate-input\",type:\"password\",placeholder:\"ENTER PASSWORD\",value:passwordInput,onChange:e=>setPasswordInput(e.target.value),style:{...glass,textAlign:\"center\",textTransform:\"uppercase\",letterSpacing:\"0.18em\",color:\"rgba(255,255,255,0.95)\",fontWeight:500,borderColor:passwordError?\"rgba(255,80,80,0.4)\":\"rgba(255, 255, 255, 0.10)\"}}),passwordError&&/*#__PURE__*/_jsx(\"p\",{style:{color:\"rgba(255,140,140,0.85)\",fontSize:11,margin:\"8px 0 0\",paddingLeft:2,fontFamily:\"inherit\",textAlign:\"center\",fontWeight:500,letterSpacing:\"0.06em\"},children:\"That frequency doesn't match. Try again.\"})]}),submitted?/*#__PURE__*/_jsx(\"p\",{style:{color:\"rgba(255,255,255,0.70)\",fontSize:13,textAlign:\"center\",margin:\"8px 0 0\",fontFamily:\"inherit\",lineHeight:1.6},children:\"✨ Check your inbox — your password is on its way.\"}):/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"button\",{onClick:()=>setShowRequest(v=>!v),style:linkBtn,children:showRequest?\"NEVER MIND\":\"REQUEST A PASSWORD\"}),showRequest&&/*#__PURE__*/_jsxs(\"form\",{onSubmit:handleRequestSubmit,style:{display:\"flex\",flexDirection:\"column\",gap:10,marginTop:2},children:[/*#__PURE__*/_jsx(\"input\",{className:\"pwgate-input\",type:\"text\",placeholder:\"YOUR NAME\",value:name,onChange:e=>setName(e.target.value),required:true,style:glass}),/*#__PURE__*/_jsx(\"input\",{className:\"pwgate-input\",type:\"email\",placeholder:\"YOUR EMAIL\",value:email,onChange:e=>setEmail(e.target.value),required:true,style:glass}),/*#__PURE__*/_jsx(\"button\",{type:\"submit\",disabled:submitting,style:{...btn,opacity:submitting?.6:1,textTransform:\"uppercase\"},children:submitting?\"SENDING...\":\"REQUEST PASSWORD\"})]})]})]});}PasswordGate.defaultProps={password:\"frequency\",fallbackUrl:\"/welcome\",kitFormId:\"b73f5acf6b\",width:400};addPropertyControls(PasswordGate,{password:{type:ControlType.String,title:\"Password\",defaultValue:\"frequency\",obscured:true},fallbackUrl:{type:ControlType.String,title:\"Fallback URL\",defaultValue:\"/welcome\",description:\"Where to go if no return URL is saved (e.g. direct visit to home page)\"},kitFormId:{type:ControlType.String,title:\"Kit Form ID\",defaultValue:\"b73f5acf6b\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PasswordGate\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"400\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PasswordGate.map"],"mappings":"sMAIG,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