{"version":3,"file":"AutoDownload.C34xpYDy.mjs","names":["__esmMin","init_ssg_sandbox_shims","window","c","init_jsx_runtime","init_npm_react_18_3_1","ce","RenderTarget","init_framer_CKT6jEEQ","addPropertyControls","ControlType","AutoDownload","props","url","key","done","t","frame","style","init_AutoDownload"],"sources":["https:/framerusercontent.com/modules/rcu5LF2DzcbnLT9Plcra/exhALBphIg39wcr1b5Lk/AutoDownload.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";import{RenderTarget,addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function AutoDownload(props){const{url,style}=props;useEffect(()=>{if(RenderTarget.current()!==RenderTarget.canvas&&url){const key=\"autodl:\"+url;let done=false;try{done=window.sessionStorage.getItem(key)===\"1\";}catch(e){}if(done)return;const t=window.setTimeout(()=>{const frame=document.createElement(\"iframe\");frame.style.display=\"none\";frame.setAttribute(\"aria-hidden\",\"true\");frame.src=url;document.body.appendChild(frame);try{window.sessionStorage.setItem(key,\"1\");}catch(e){}window.setTimeout(()=>frame.remove(),6e4);},800);return()=>window.clearTimeout(t);}},[url]);return /*#__PURE__*/_jsx(\"div\",{style:{...style,width:1,height:1,overflow:\"hidden\"},\"aria-hidden\":\"true\"});}AutoDownload.defaultProps={url:\"\",width:1,height:1};addPropertyControls(AutoDownload,{url:{type:ControlType.String,title:\"Download URL\",defaultValue:\"\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AutoDownload\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./AutoDownload.map"],"mappings":"A,gMAGG,SAAwBW,EAAa,EAAM,CAAC,GAAK,CAAC,MAAI,SAAOC,EAA+gB,OAAzgBN,MAAc,CAAC,GAAGC,EAAa,QAAQ,IAAIA,EAAa,QAAQM,EAAI,CAAC,IAAMC,EAAI,UAAUD,EAAQE,EAAK,GAAM,GAAG,CAAC,EAAKb,EAAO,eAAe,QAAQY,CAAG,IAAI,GAAI,MAAS,CAAC,CAAC,GAAGC,EAAK,OAAO,IAAMC,EAAEd,EAAO,eAAe,CAAC,IAAMe,EAAM,SAAS,cAAc,QAAQ,EAAE,EAAM,MAAM,QAAQ,OAAOA,EAAM,aAAa,cAAc,MAAM,EAAE,EAAM,IAAIJ,EAAI,SAAS,KAAK,YAAYI,CAAK,EAAE,GAAG,CAACf,EAAO,eAAe,QAAQY,EAAI,GAAG,CAAE,MAAS,CAAC,CAACZ,EAAO,eAAee,EAAM,OAAO,EAAE,GAAG,CAAE,EAAE,GAAG,EAAE,UAAUf,EAAO,aAAac,CAAC,CAAE,CAAC,EAAE,CAACH,CAAG,CAAC,EAAsB,gBAAK,MAAM,CAAC,MAAM,CAAC,GAAGK,EAAM,MAAM,EAAE,OAAO,EAAE,SAAS,QAAQ,EAAE,cAAc,MAAM,CAAC,CAAE,C,8CAAC,EAAa,aAAa,CAAC,IAAI,GAAG,MAAM,EAAE,OAAO,CAAC,EAAET,EAAoBE,EAAa,CAAC,IAAI,CAAC,KAAKD,EAAY,OAAO,MAAM,eAAe,aAAa,EAAE,CAAC,CAAC,C"}