{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/9wD3PivBQLrOwsQi12c9/uPSwXLO1JCiWk5aMwrmT/Embed.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useIsOnCanvas}from\"https://framer.com/m/framer/default-utils.js@0.44.0\";function Instructions(props){return /*#__PURE__*/ _jsxs(\"div\",{style:{...containerStyle,background:\"rgba(136, 85, 255, 0.1)\"},children:[/*#__PURE__*/ _jsx(\"p\",{children:\" \uD83D\uDDBC \"}),/*#__PURE__*/ _jsxs(\"p\",{style:{margin:0,marginBottom:5},children:[\" \",\"Add a URL in the properties panel\"]}),/*#__PURE__*/ _jsxs(\"p\",{style:{margin:0,fontWeight:500,opacity:.5,fontSize:14,width:440},children:[\"Make sure the given web address starts with \",/*#__PURE__*/ _jsx(\"b\",{children:\"http://\"}),\" or\",\" \",/*#__PURE__*/ _jsx(\"b\",{children:\"https://\"}),\".\"]})]});}function isUrlInvalid(text){const startsWithHttp=text.startsWith(\"http://\")||text.startsWith(\"https://\");if(text===undefined||text===null||text===\"\"||!startsWithHttp){return true;}else{return false;}}const baseUrlBoxUrl=\"https://api.urlbox.io/v1/xsxnBMh5ojGp7MBU/f8ce112e84322e7122285a4b3f22e0f54c6c793a/png?wait_until=requestsfinished&retina=true&lowercase=86400&unique=2021-08-03T12%3A02%3A08.187Z&quality=95\";/**\n * @framerIntrinsicWidth 800\n * @framerIntrinsicHeight 600\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */ export default function Embed(props){const{text,renderOnCanvas}=props;const isOnCanvas=useIsOnCanvas();if(isUrlInvalid(text)){return /*#__PURE__*/ _jsx(Instructions,{...props});}const shouldRender=renderOnCanvas||!renderOnCanvas&&!isOnCanvas;// url=https%3A%2F%2Fframer.com%2Fshare%2Fp0ssjuuaq74QASXWVUqy%3Ffullscreen%3D1&width=700&height=525&\n// const placeholderImage = useMemo(() => {\n//     const url = new URL(baseUrlBoxUrl)\n//     url.searchParams.append(\"url\", encodeURIComponent(text))\n//     url.searchParams.append(\"height\", \"500\")\n//     url.searchParams.append(\"width\", \"500\")\n//     console.log(Array.from(url.searchParams.entries()))\n//     console.log(url.toString())\n//     return url.toString()\n// }, [text])\n//             <img src={placeholderImage} style={{ height: 50, width: 50 }} />\nreturn /*#__PURE__*/ _jsx(\"div\",{style:{...containerStyle,background:shouldRender?\"none\":\"rgba(136, 85, 255, 0.1)\"},children:shouldRender?/*#__PURE__*/ _jsx(\"iframe\",{onError:e=>console.log(\"meep\",e),src:props.text,frameBorder:0,style:{width:\"100%\",height:\"100%\"}}):/*#__PURE__*/ _jsx(\"h3\",{children:\"Hidden\"})});};Embed.defaultProps={text:\"\",// text: \"http://www.framer.com\",\nrenderOnCanvas:true,width:800,height:600};addPropertyControls(Embed,{text:{type:ControlType.String,title:\"URL\",defaultValue:Embed.defaultProps.text},renderOnCanvas:{type:ControlType.Boolean,title:\"On Canvas\",enabledTitle:\"Show\",disabledTitle:\"Hide\"}});const containerStyle={height:\"100%\",width:\"100%\",display:\"flex\",overflow:\"hidden\",borderRadius:\"20px\",alignItems:\"center\",justifyContent:\"center\",fontSize:16,fontWeight:600,color:\"#BB88FF\",flexDirection:\"column\",textAlign:\"center\"};\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Embed\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicHeight\":\"600\",\"framerIntrinsicWidth\":\"800\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Embed.map"],
  "mappings": "yGAA4L,SAASA,EAAaC,EAAM,CAAC,OAAqBC,EAAM,MAAM,CAAC,MAAM,CAAC,GAAGC,EAAe,WAAW,yBAAyB,EAAE,SAAS,CAAeC,EAAK,IAAI,CA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ab,EAAM,aAAa,IAAI,EAAE,eAAe,CAAC,KAAKa,EAAY,QAAQ,MAAM,YAAY,aAAa,OAAO,cAAc,MAAM,CAAC,CAAC,EAAE,IAAMH,EAAe,CAAC,OAAO,OAAO,MAAM,OAAO,QAAQ,OAAO,SAAS,SAAS,aAAa,OAAO,WAAW,SAAS,eAAe,SAAS,SAAS,GAAG,WAAW,IAAI,MAAM,UAAU,cAAc,SAAS,UAAU,QAAQ",
  "names": ["Instructions", "props", "u", "containerStyle", "p", "isUrlInvalid", "text", "startsWithHttp", "Embed", "props", "text", "renderOnCanvas", "isOnCanvas", "useIsOnCanvas", "isUrlInvalid", "p", "Instructions", "shouldRender", "containerStyle", "e", "addPropertyControls", "ControlType"]
}
