{"version":3,"file":"ResponsiveEmbed.DANuEHWn.mjs","names":["__esmMin","init_jsx_runtime","p","c","init_framer_DxfB3JJo","addPropertyControls","useIsStaticRenderer","ControlType","AisolResponsiveEmbed","props","isStatic","ratio","aspectRatio","src","toEmbedUrl","url","radius","borderColor","style","trimmed","yt","vimeo","init_ResponsiveEmbed"],"sources":["https:/framerusercontent.com/modules/tK7rVmSQymhpI1YCQ4Hr/XqR8olk9bpwfFc3492xV/ResponsiveEmbed.js"],"sourcesContent":["// @framerDisableUnlink\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * AisolResponsiveEmbed\n * Embeds any YouTube / Vimeo / iframe URL as a responsive, aspect-locked frame.\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any\n */export default function AisolResponsiveEmbed(props){const{url,aspectRatio,radius,borderColor,style}=props;const isStatic=useIsStaticRenderer();const ratioMap={\"16:9\":16/9,\"4:3\":4/3,\"1:1\":1,\"21:9\":21/9};const ratio=ratioMap[aspectRatio]||16/9;const src=isStatic?\"\":toEmbedUrl(url);return /*#__PURE__*/_jsxs(\"div\",{style:{width:\"100%\",position:\"relative\",borderRadius:radius,overflow:\"hidden\",border:`1px solid ${borderColor}`,background:\"#08080C\",...style},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",paddingTop:`${100/ratio}%`}}),src?/*#__PURE__*/_jsx(\"iframe\",{src:src,title:\"Responsive embed\",allow:\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\",allowFullScreen:true,style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",border:\"none\"}}):/*#__PURE__*/_jsx(\"div\",{style:{position:\"absolute\",inset:0,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",color:\"#6D5EF6\",fontFamily:\"Inter, sans-serif\",fontSize:14},children:isStatic?\"Video embed\":\"Paste a video or iframe URL\"})]});}function toEmbedUrl(url){if(!url||typeof url!==\"string\")return\"\";const trimmed=url.trim();// YouTube\nconst yt=trimmed.match(/(?:youtube\\.com\\/(?:watch\\?v=|embed\\/|shorts\\/)|youtu\\.be\\/)([\\w-]{11})/);if(yt)return`https://www.youtube.com/embed/${yt[1]}`;// Vimeo\nconst vimeo=trimmed.match(/vimeo\\.com\\/(?:video\\/)?(\\d+)/);if(vimeo)return`https://player.vimeo.com/video/${vimeo[1]}`;// Already an embed / generic iframe URL\nreturn trimmed;}AisolResponsiveEmbed.defaultProps={width:640,height:360,url:\"https://www.youtube.com/watch?v=dQw4w9WgXcQ\"};addPropertyControls(AisolResponsiveEmbed,{url:{type:ControlType.String,title:\"URL\",defaultValue:\"https://www.youtube.com/watch?v=dQw4w9WgXcQ\",placeholder:\"YouTube / Vimeo / iframe URL\"},aspectRatio:{type:ControlType.Enum,title:\"Ratio\",defaultValue:\"16:9\",options:[\"16:9\",\"4:3\",\"1:1\",\"21:9\"],optionTitles:[\"16:9\",\"4:3\",\"1:1\",\"21:9\"],displaySegmentedControl:true},radius:{type:ControlType.Number,title:\"Radius\",defaultValue:16,min:0,max:80,step:1,unit:\"px\"},borderColor:{type:ControlType.Color,title:\"Border\",defaultValue:\"rgba(109,94,246,0.25)\",description:\"More components at Aisol Studio → aisol.studio\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"AisolResponsiveEmbed\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ResponsiveEmbed.map"],"mappings":"A,2KAOG,SAAwBQ,EAAqB,EAAM,CAAC,GAAK,CAAC,MAAI,cAAY,SAAO,cAAY,SAAOC,EAAYC,EAASJ,EAAoB,EAAmEK,EAAM,CAAvD,OAAO,GAAG,EAAE,MAAM,EAAE,EA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