{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/tI8iQYoG81DH9c9BhWrX/oBDrTiqTKahC697VX3Xp/Searchboxincode.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";function SearchBox(){const[url,setUrl]=React.useState(\"\");const[shake,setShake]=React.useState({});const[isHovered,setIsHovered]=React.useState(false);const[buttonWidth,setButtonWidth]=React.useState(249);React.useEffect(()=>{const handleResize=()=>{setButtonWidth(window.innerWidth<=450?140:249);};window.addEventListener(\"resize\",handleResize);handleResize()// Set initial state\n;return()=>window.removeEventListener(\"resize\",handleResize);},[]);const handleInputChange=event=>{setUrl(event.target.value);};const handleSubmit=()=>{if(url.trim()===\"\"){setShake({transform:\"translateX(10px)\",transition:\"transform 0.2s ease-out\"});setTimeout(()=>setShake({}),200);}else{let finalUrl=url;if(!finalUrl.startsWith(\"http://\")&&!finalUrl.startsWith(\"https://\")){finalUrl=\"https://\"+finalUrl;}const redirectToUrl=`https://app.optimalux.com/experiment/start?url=${encodeURIComponent(finalUrl)}`;window.location.href=redirectToUrl;}};const handleKeyDown=event=>{if(event.key===\"Enter\"){handleSubmit();}};const handleMouseEnter=()=>setIsHovered(true);const handleMouseLeave=()=>setIsHovered(false);const handleClick=()=>{setIsHovered(false);handleSubmit();};const containerStyles={display:\"flex\",alignItems:\"center\",justifyContent:\"space-between\",backgroundColor:\"#FFFFFF\",borderRadius:\"20px\",border:\"0.5px solid #E9E9E9\",boxShadow:\"0 1px 2px rgba(0, 0, 0, 0.1)\",padding:\"2px 2px 2px 12px\",fontFamily:\"'Inter', sans-serif\",fontSize:\"20px\",fontWeight:\"300\",color:\"#000\",width:\"100%\",maxWidth:\"680px\",...shake};const inputButtonContainerStyles={flexGrow:1,marginRight:\"10px\",border:\"none\",outline:\"none\",borderRadius:\"inherit\",fontFamily:\"inherit\",fontSize:\"inherit\",fontWeight:\"inherit\",color:\"inherit\",padding:\"10px\",lineHeight:\"normal\",textAlign:\"left\",minWidth:\"0\"};const buttonStyle={cursor:\"pointer\",width:`${buttonWidth}px`,minWidth:\"140px\",height:\"60px\",padding:\"10px 12px\",background:isHovered?\"linear-gradient(to bottom, #6C7BC6, #4C5A9C)\":\"linear-gradient(to bottom, #5E6CAF, #46538C)\",color:\"#FFFFFF\",textAlign:\"center\",margin:\"2px\",borderRadius:\"14px\",transform:isHovered?\"scale(1.03)\":\"scale(1)\",fontSize:buttonWidth<=140?\"16px\":\"20px\",border:\"none\",boxShadow:isHovered?\"0 4px 20px rgba(94, 108, 175, 0.4)\":\"none\",transition:\"all 0.3s ease-in-out\"};return /*#__PURE__*/_jsxs(\"div\",{style:containerStyles,children:[/*#__PURE__*/_jsx(\"input\",{type:\"text\",value:url,onChange:handleInputChange,onKeyDown:handleKeyDown,placeholder:\"mywebsite.com\",style:inputButtonContainerStyles}),/*#__PURE__*/_jsx(\"button\",{onClick:handleClick,onMouseEnter:handleMouseEnter,onMouseLeave:handleMouseLeave,style:buttonStyle,children:\"Start Experimenting\"})]});}export default SearchBox;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SearchBox\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Searchboxincode.map"],
  "mappings": "mHAAAA,IAAqF,SAASC,GAAW,CAAC,GAAK,CAACC,EAAIC,CAAM,EAAQC,EAAS,EAAE,EAAO,CAACC,EAAMC,CAAQ,EAAQF,EAAS,CAAC,CAAC,EAAO,CAACG,EAAUC,CAAY,EAAQJ,EAAS,EAAK,EAAO,CAACK,EAAYC,CAAc,EAAQN,EAAS,GAAG,EAAQO,EAAU,IAAI,CAAC,IAAMC,EAAa,IAAI,CAACF,EAAe,OAAO,YAAY,IAAI,IAAI,GAAG,CAAE,EAAE,cAAO,iBAAiB,SAASE,CAAY,EAAEA,EAAa,EACrb,IAAI,OAAO,oBAAoB,SAASA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,GAAa,IAAI,OAAO,OAAO,OAAO,OAAO,UAAUF,EAAU,qCAAqC,OAAO,WAAW,sBAAsB,EAAE,OAAoBkB,EAAM,MAAM,CAAC,MAAMH,EAAgB,SAAS,CAAcI,EAAK,QAAQ,CAAC,KAAK,OAAO,MAAMxB,EAAI,SAASW,EAAkB,UAAUK,EAAc,YAAY,gBAAgB,MAAMK,CAA0B,CAAC,EAAeG,EAAK,SAAS,CAAC,QAAQL,EAAY,aAAaF,EAAiB,aAAaC,EAAiB,MAAMI,EAAY,SAAS,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC,IAAOG,EAAQ1B",
  "names": ["init_ssg_sandbox_shims", "SearchBox", "url", "setUrl", "ye", "shake", "setShake", "isHovered", "setIsHovered", "buttonWidth", "setButtonWidth", "ue", "handleResize", "handleInputChange", "event", "handleSubmit", "finalUrl", "redirectToUrl", "handleKeyDown", "handleMouseEnter", "handleMouseLeave", "handleClick", "containerStyles", "inputButtonContainerStyles", "buttonStyle", "u", "p", "Searchboxincode_default"]
}
