{"version":3,"file":"SubsplashGiving.Dfr5bbME.mjs","names":["useRef","__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","window","c","init_jsx_runtime","ce","de","init_framer_DKtAEkcX","addPropertyControls","ControlType","RenderTarget","SubsplashGiving","props","containerRef","isCanvas","container","anchor","embedId","run","path","baseUrl","script","SCRIPT_SRC","init_SubsplashGiving"],"sources":["https:/framerusercontent.com/modules/qk1z3ksclmbJIsVrtKkf/0a9NDMR56xojHwsFNToI/SubsplashGiving.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useRef}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";const SCRIPT_SRC=\"https://dashboard.static.subsplash.com/production/web-client/external/embed-1.1.0.js\";/**\n * Subsplash giving form embed.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight auto\n */export default function SubsplashGiving(props){const{path,baseUrl,embedId,minHeight}=props;const containerRef=useRef(null);const isCanvas=RenderTarget.current()===RenderTarget.canvas;useEffect(()=>{if(isCanvas||typeof window===\"undefined\")return;const container=containerRef.current;if(!container)return;// Fresh anchor element that Subsplash targets by id\ncontainer.innerHTML=\"\";const anchor=document.createElement(\"div\");anchor.id=embedId;container.appendChild(anchor);const run=()=>{if(window.subsplashEmbed){window.subsplashEmbed(path,baseUrl,embedId);}};if(window.subsplashEmbed){run();return;}let script=document.querySelector(`script[src=\"${SCRIPT_SRC}\"]`);if(script){script.addEventListener(\"load\",run);}else{script=document.createElement(\"script\");script.type=\"text/javascript\";script.src=SCRIPT_SRC;script.onload=run;container.insertBefore(script,anchor);}return()=>{script?.removeEventListener(\"load\",run);};},[path,baseUrl,embedId,isCanvas]);if(isCanvas){return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",minHeight,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",borderRadius:16,border:\"2px dashed rgba(23,23,23,0.2)\",background:\"rgba(73,188,245,0.08)\",fontFamily:\"Source Sans 3, sans-serif\",fontSize:16,color:\"rgb(23,23,23)\",textAlign:\"center\",padding:24,boxSizing:\"border-box\"},children:\"Subsplash giving form — shows in Preview and on the published site\"});}return /*#__PURE__*/_jsx(\"div\",{ref:containerRef,style:{width:\"100%\",minHeight}});}SubsplashGiving.defaultProps={path:\"u/-XSGVDG/give?&embed=true\",baseUrl:\"https://subsplash.com/\",embedId:\"subsplash-embed-2682\",minHeight:600};addPropertyControls(SubsplashGiving,{path:{type:ControlType.String,title:\"Path\",defaultValue:\"u/-XSGVDG/give?&embed=true\"},baseUrl:{type:ControlType.String,title:\"Base URL\",defaultValue:\"https://subsplash.com/\"},embedId:{type:ControlType.String,title:\"Embed ID\",defaultValue:\"subsplash-embed-2682\"},minHeight:{type:ControlType.Number,title:\"Min Height\",defaultValue:600,min:200,max:2e3,step:10}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"SubsplashGiving\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./SubsplashGiving.map"],"mappings":"A,uMAKG,SAAwBa,EAAgB,EAAM,CAAC,GAAK,CAAC,OAAK,UAAQ,UAAQ,aAAWC,EAAYC,EAAaf,EAAO,IAAI,EAAQgB,EAASJ,EAAa,QAAQ,IAAIA,EAAa,OACk1B,OAD30BL,MAAc,CAAC,GAAGS,GAAiBZ,IAAS,OAAY,OAAO,IAAMa,EAAUF,EAAa,QAAQ,GAAG,CAACE,EAAU,OAC5S,EAAU,UAAU,GAAG,IAAMC,EAAO,SAAS,cAAc,KAAK,EAAE,EAAO,GAAGC,EAAQF,EAAU,YAAYC,CAAM,EAAE,IAAME,MAAQ,CAAIhB,EAAO,gBAAgBA,EAAO,eAAeiB,EAAKC,EAAQH,CAAO,CAAG,EAAE,GAAGf,EAAO,eAAe,CAACgB,EAAI,EAAE,MAA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