{"version":3,"file":"GifEmbed.GyaeR5da.mjs","names":["p"],"sources":["https:/framerusercontent.com/modules/kGTO1DItiO9OkUfHQEZt/sIFIdfbfCojpkSTmREyC/GifEmbed.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * ExternalMedia\n * ─────────────\n * Renders an animated asset (GIF, animated WebP, MP4, or WebM) from an\n * external HTTPS URL — typically Cloudflare R2 or AWS S3 — instead of from\n * Framer's CDN. Use this to keep heavy media off your Framer plan's\n * bandwidth budget.\n *\n * How to use\n * ──────────\n *   1. In Framer: Insert › Code Component, paste this whole file.\n *   2. Drop the component on a page, OR insert it inside a CMS Rich Text\n *      body field (Product Updates, Blog Posts) via \"Add Component\".\n *   3. Set `Source URL` to the public URL of your asset, e.g.\n *        https://videos.supernormal.com/feature-demo.mp4\n *        https://videos.supernormal.com/feature-demo.gif\n *   4. The component auto-detects format from the file extension:\n *        - .mp4 / .webm  → <video> autoplay + loop + muted + playsinline\n *        - everything else (.gif, .webp, .png, .jpg, …) → <img>\n *   5. `Poster URL` (videos only) gives an instant first paint while the\n *      video is fetching.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function ExternalMedia(props){const{style,src,alt,fit,borderRadius,poster}=props;// Wrapper takes Framer's layout dimensions via the style spread.\n// border-radius + overflow live on the wrapper, never on the media.\nconst wrapperStyle={...style,overflow:\"hidden\",borderRadius,position:\"relative\"};// Empty / invalid src → placeholder (don't crash).\nif(!src||typeof src!==\"string\"||src.trim()===\"\"){return /*#__PURE__*/_jsx(\"div\",{style:{...wrapperStyle,background:\"#f0f0f0\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",color:\"#888\",fontFamily:\"Inter, system-ui, -apple-system, sans-serif\",fontSize:14},children:\"No source URL\"});}// Format detection: lowercase, strip query + hash, check extension.\nconst cleaned=src.toLowerCase().split(\"?\")[0].split(\"#\")[0];const isVideo=cleaned.endsWith(\".mp4\")||cleaned.endsWith(\".webm\");const mediaStyle={width:\"100%\",height:\"100%\",objectFit:fit,display:\"block\"};if(isVideo){return /*#__PURE__*/_jsx(\"div\",{style:wrapperStyle,children:/*#__PURE__*/_jsx(\"video\",{src:src,poster:poster||undefined,autoPlay:true,loop:true,muted:true,playsInline:true,preload:\"metadata\",\"aria-label\":alt||undefined,style:mediaStyle})});}return /*#__PURE__*/_jsx(\"div\",{style:wrapperStyle,children:/*#__PURE__*/_jsx(\"img\",{src:src,alt:alt||\"\",loading:\"lazy\",decoding:\"async\",style:mediaStyle})});}ExternalMedia.defaultProps={width:400,height:300,src:\"\",alt:\"\",fit:\"cover\",borderRadius:0,poster:\"\"};addPropertyControls(ExternalMedia,{src:{type:ControlType.String,title:\"Source URL\",defaultValue:\"\",placeholder:\"https://videos.example.com/asset.mp4\"},alt:{type:ControlType.String,title:\"Alt text\",defaultValue:\"\",placeholder:\"Describe the asset\"},fit:{type:ControlType.Enum,title:\"Fit\",options:[\"cover\",\"contain\",\"fill\"],optionTitles:[\"Cover\",\"Contain\",\"Fill\"],defaultValue:\"cover\"},borderRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:0,min:0,max:200,step:1,unit:\"px\"},poster:{type:ControlType.String,title:\"Poster URL\",defaultValue:\"\",placeholder:\"https://… (videos only)\",hidden:p=>{const s=(p?.src||\"\").toLowerCase().split(\"?\")[0].split(\"#\")[0];return!(s.endsWith(\".mp4\")||s.endsWith(\".webm\"));}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ExternalMedia\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GifEmbed.map"],"mappings":"6JAwBG,SAAwB,EAAc,EAAM,CAAC,GAAK,CAAC,QAAM,MAAI,MAAI,MAAI,eAAa,UAAQ,EAEvF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