{"version":3,"file":"PasswordGate.C1-eY1Rd.mjs","names":["useState","e"],"sources":["https:/framerusercontent.com/modules/zBfHDCW9CwNfeU5UXpPS/CisFfQSVeRHckCDAYq2M/PasswordGate.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function PasswordGate(props){const{password=\"omnia2026\",title=\"Acc\\xe8s priv\\xe9\",subtitle=\"Cette page est prot\\xe9g\\xe9e\",placeholder=\"Mot de passe\",buttonText=\"Acc\\xe9der\",errorText=\"Mot de passe incorrect\",bgColor=\"#0a0a0a\",textColor=\"#ffffff\",accentColor=\"#ffffff\",accentTextColor=\"#000000\",rememberMe=true}=props;const[input,setInput]=useState(\"\");const[unlocked,setUnlocked]=useState(false);const[checked,setChecked]=useState(false);const[error,setError]=useState(false);const[focused,setFocused]=useState(false);const[hovered,setHovered]=useState(false);const storageKey=\"pg_\"+password.length;useEffect(()=>{try{if(rememberMe&&localStorage.getItem(storageKey)===password){setUnlocked(true);}}catch(e){}setChecked(true);},[password,rememberMe]);const handleSubmit=e=>{e.preventDefault();if(input===password){setUnlocked(true);try{if(rememberMe)localStorage.setItem(storageKey,password);}catch(e){}}else{setError(true);setInput(\"\");setTimeout(()=>setError(false),2e3);}};if(unlocked)return null;if(!checked){return /*#__PURE__*/_jsx(\"div\",{style:{position:\"fixed\",inset:0,background:bgColor,zIndex:99999}});}return /*#__PURE__*/_jsx(\"div\",{style:{position:\"fixed\",inset:0,background:bgColor,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",zIndex:99999,fontFamily:\"-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif\",padding:24},children:/*#__PURE__*/_jsxs(\"form\",{onSubmit:handleSubmit,style:{display:\"flex\",flexDirection:\"column\",alignItems:\"stretch\",gap:14,maxWidth:420,width:\"100%\"},children:[/*#__PURE__*/_jsx(\"h2\",{style:{color:textColor,fontSize:32,fontWeight:300,margin:0,textAlign:\"center\",letterSpacing:\"0.08em\"},children:title}),/*#__PURE__*/_jsx(\"p\",{style:{color:textColor,opacity:.6,textAlign:\"center\",margin:\"0 0 16px 0\",fontSize:14,lineHeight:1.5},children:subtitle}),/*#__PURE__*/_jsx(\"input\",{type:\"password\",value:input,onChange:e=>setInput(e.target.value),onFocus:()=>setFocused(true),onBlur:()=>setFocused(false),placeholder:placeholder,autoFocus:true,style:{width:\"100%\",padding:\"16px 20px\",background:\"rgba(255,255,255,0.05)\",border:`1px solid ${error?\"#ff4444\":focused?textColor:\"rgba(255,255,255,0.15)\"}`,borderRadius:8,color:textColor,fontSize:15,outline:\"none\",boxSizing:\"border-box\",transition:\"border-color 0.2s\"}}),/*#__PURE__*/_jsx(\"div\",{style:{minHeight:18,color:\"#ff4444\",fontSize:13,textAlign:\"center\",opacity:error?1:0,transition:\"opacity 0.2s\"},children:errorText}),/*#__PURE__*/_jsx(\"button\",{type:\"submit\",onMouseEnter:()=>setHovered(true),onMouseLeave:()=>setHovered(false),style:{width:\"100%\",padding:\"16px 20px\",background:accentColor,color:accentTextColor,border:\"none\",borderRadius:8,fontSize:15,fontWeight:500,cursor:\"pointer\",letterSpacing:\"0.05em\",opacity:hovered?.85:1,transition:\"opacity 0.15s\"},children:buttonText})]})});}addPropertyControls(PasswordGate,{password:{type:ControlType.String,title:\"Password\",defaultValue:\"omnia2026\"},title:{type:ControlType.String,title:\"Title\",defaultValue:\"Acc\\xe8s priv\\xe9\"},subtitle:{type:ControlType.String,title:\"Subtitle\",defaultValue:\"Cette page est prot\\xe9g\\xe9e\"},placeholder:{type:ControlType.String,title:\"Placeholder\",defaultValue:\"Mot de passe\"},buttonText:{type:ControlType.String,title:\"Button\",defaultValue:\"Acc\\xe9der\"},errorText:{type:ControlType.String,title:\"Error\",defaultValue:\"Mot de passe incorrect\"},bgColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#0a0a0a\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#ffffff\"},accentColor:{type:ControlType.Color,title:\"Button BG\",defaultValue:\"#ffffff\"},accentTextColor:{type:ControlType.Color,title:\"Button Text\",defaultValue:\"#000000\"},rememberMe:{type:ControlType.Boolean,title:\"Remember\",defaultValue:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PasswordGate\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PasswordGate.map"],"mappings":"wLAAmJ,SAAwB,EAAa,EAAM,CAAC,GAAK,CAAC,WAAS,YAAY,QAAM,cAAoB,WAAS,0BAAgC,cAAY,eAAe,aAAW,UAAa,YAAU,yBAAyB,UAAQ,UAAU,YAAU,UAAU,cAAY,UAAU,kBAAgB,UAAU,aAAW,IAAM,EAAW,CAAC,EAAM,GAAUA,EAAS,GAAG,CAAM,CAAC,EAAS,GAAaA,EAAS,GAAM,CAAM,CAAC,EAAQ,GAAYA,EAAS,GAAM,CAAM,CAAC,EAAM,GAAUA,EAAS,GAAM,CAAM,CAAC,EAAQ,GAAYA,EAAS,GAAM,CAAM,CAAC,EAAQ,GAAYA,EAAS,GAAM,CAAO,EAAW,MAAM,EAAS,OAAwgB,OAAjgB,MAAc,CAAC,GAAG,CAAI,GAAY,aAAa,QAAQ,EAAW,GAAG,GAAU,EAAY,GAAK,MAAW,EAAE,EAAW,GAAK,EAAG,CAAC,EAAS,EAAW,CAAC,CAAqO,EAAgB,KAAS,EAAiI,EAAK,MAAM,CAAC,MAAM,CAAC,SAAS,QAAQ,MAAM,EAAE,WAAW,EAAQ,QAAQ,OAAO,WAAW,SAAS,eAAe,SAAS,OAAO,MAAM,WAAW,4DAA4D,QAAQ,GAAG,CAAC,SAAsB,EAAM,OAAO,CAAC,SAAzmB,GAAG,CAAoB,GAAnB,EAAE,gBAAgB,CAAI,IAAQ,EAAS,CAAC,EAAY,GAAK,CAAC,GAAG,CAAI,GAAW,aAAa,Q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