{"version":3,"file":"OnClickAddParams.Ck2M6il3.mjs","names":[],"sources":["https:/framerusercontent.com/modules/Kpxg7nf4B5qKxIvm6wRN/dTMSY305doI7DEnF9JJo/OnClickAddParams.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect}from\"react\";// Learn more: https://www.framer.com/developers/overrides/\nexport function withLoadAddParams(Component){return /*#__PURE__*/forwardRef((props,ref)=>{useEffect(()=>{const userAgent=navigator.userAgent;const url=new URL(window.location.href);const origin_encode_url=url.href;const params=url.searchParams;if(userAgent.includes(\"mutual\")){if(!params.has(\"share_type\")){params.append(\"share_type\",\"url\");window.history.replaceState({},\"\",`${url.pathname}?${params.toString()}`);}if(params.has(\"share_type\")&&!params.has(\"share_url\")){params.append(\"share_url\",origin_encode_url);window.history.replaceState({},\"\",`${url.pathname}?${params.toString()}`);}}},[]);return /*#__PURE__*/_jsx(Component,{...props});});}export function withClickAddParams(Component){return /*#__PURE__*/forwardRef((props,ref)=>{const handleClick=()=>{// Get current link\nconst link=props.href;const current_domain=window.location.hostname;const share_link=\"https://\"+current_domain+link.replace(/\\./g,\"\");props.href=link+\"?share_type=url&share_url=\"+encodeURIComponent(share_link);alert(props.href);props?.onClick();};return /*#__PURE__*/_jsx(Component,{...props,onClick:handleClick});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withClickAddParams\":{\"type\":\"reactHoc\",\"name\":\"withClickAddParams\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withLoadAddParams\":{\"type\":\"reactHoc\",\"name\":\"withLoadAddParams\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./OnClickAddParams.map"],"mappings":"8IACA,SAAgB,EAAkB,EAAU,CAAC,OAAoB,GAAY,EAAM,KAAO,MAAc,CAAC,IAAM,EAAU,EAAU,UAAgB,EAAI,IAAI,IAAI,EAAO,SAAS,IAAI,EAAQ,EAAkB,EAAI,KAAW,EAAO,EAAI,aAAgB,EAAU,SAAS,QAAQ,IAAO,EAAO,IAAI,YAAY,IAAG,EAAO,OAAO,aAAa,KAAK,EAAE,EAAO,QAAQ,aAAa,CAAC,EAAE,GAAG,GAAG,EAAI,SAAS,GAAG,EAAO,SAAS,GAAG,GAAM,EAAO,IAAI,YAAY,GAAG,CAAC,EAAO,IAAI,WAAW,IAAG,EAAO,OAAO,YAAY,CAAiB,EAAE,EAAO,QAAQ,aAAa,CAAC,EAAE,GAAG,GAAG,EAAI,SAAS,GAAG,EAAO,SAAS,GAAG,GAAI,EAAE,CAAC,CAAC,EAAsB,EAAK,EAAU,CAAC,GAAG,CAAK,CAAC,EAAG,CAAE,qBAD9lB,IAAwC"}