{"version":3,"file":"TextVideoMask.C2ajQX7X.mjs","names":["__esmMin","p","init_jsx_runtime","addPropertyControls","ControlType","init_framer_D1IzEvwH","TextVideoMask","props","maskId","videoSource","useVideoFile","videoFile","videoUrl","font","text","autoplay","init_TextVideoMask"],"sources":["https:/framerusercontent.com/modules/g2P5pMK1acsdX3cwyXTu/5D05uprmgYr7nCdN85TJ/TextVideoMask.js"],"sourcesContent":["// Video mask component that uses text to mask a video with full text control\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */export default function TextVideoMask(props){const{useVideoFile=true,videoFile=\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",videoUrl=\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",text=\"VIDEO\",font,textColor=\"#FFFFFF\",backgroundColor=\"#000000\",autoplay=true,loop=true,muted=true}=props;const maskId=`video-mask-${Math.random().toString(36).substr(2,9)}`;const videoSource=useVideoFile?videoFile:videoUrl;return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\",backgroundColor,overflow:\"hidden\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\"},children:[/*#__PURE__*/_jsx(\"svg\",{style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\"},children:/*#__PURE__*/_jsx(\"defs\",{children:/*#__PURE__*/_jsxs(\"mask\",{id:maskId,children:[/*#__PURE__*/_jsx(\"rect\",{width:\"100%\",height:\"100%\",fill:\"black\"}),/*#__PURE__*/_jsx(\"text\",{x:\"50%\",y:\"50%\",textAnchor:\"middle\",dominantBaseline:\"middle\",fill:\"white\",style:{fontSize:font?.fontSize||\"48px\",fontFamily:font?.fontFamily||\"Inter\",fontWeight:font?.fontWeight||700,fontStyle:font?.fontStyle||\"normal\",letterSpacing:font?.letterSpacing||\"-0.02em\"},children:text})]})})}),/*#__PURE__*/_jsx(\"video\",{src:videoSource,autoPlay:autoplay,loop:loop,muted:muted,playsInline:true,style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",objectFit:\"cover\",mask:`url(#${maskId})`,WebkitMask:`url(#${maskId})`}})]});}addPropertyControls(TextVideoMask,{useVideoFile:{type:ControlType.Boolean,title:\"Video\",defaultValue:true,enabledTitle:\"Upload\",disabledTitle:\"URL\"},videoFile:{type:ControlType.File,allowedFileTypes:[\"mp4\",\"webm\",\"mov\"],title:\"Upload\",hidden:({useVideoFile})=>!useVideoFile},videoUrl:{type:ControlType.String,title:\"Video URL\",defaultValue:\"https://framerusercontent.com/assets/MLWPbW1dUQawJLhhun3dBwpgJak.mp4\",placeholder:\"Enter video URL...\",hidden:({useVideoFile})=>useVideoFile},text:{type:ControlType.String,title:\"Mask Text\",defaultValue:\"VIDEO\"},font:{type:ControlType.Font,title:\"Text Font\",defaultValue:{fontSize:\"48px\",variant:\"Bold\",letterSpacing:\"-0.02em\",lineHeight:\"1em\",textAlign:\"center\"},controls:\"extended\",defaultFontType:\"sans-serif\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#FFFFFF\"},backgroundColor:{type:ControlType.Color,title:\"Background Color\",defaultValue:\"#000000\"},autoplay:{type:ControlType.Boolean,title:\"Autoplay\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},loop:{type:ControlType.Boolean,title:\"Loop\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},muted:{type:ControlType.Boolean,title:\"Muted\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TextVideoMask\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerContractVersion\":\"1\"}},\"__FramerM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