{"version":3,"file":"Video.CL3S8340.mjs","names":["React","ObjectFitType","SrcType","defaultEvents"],"sources":["https:/framer.com/m/hero-icons/Home.js@0.0.27","https:/framerusercontent.com/modules/hKjtTuWGYB451ckw6eTN/rQJeCcsGr1fSnWO0FT2G/Hero.js","https:/framerusercontent.com/modules/lRDHiNWNVWmE0lqtoVHP/qXQVWG1AZxpdrbBmhE1U/Video.js"],"sourcesContent":["let r;var l=e=>{if(!r){const t=({size:o=24,...a},n)=>e.createElement(\"svg\",{viewBox:\"0 0 20 20\",fill:\"currentColor\",width:o,height:o,ref:n,...a},e.createElement(\"path\",{d:\"M10.707 2.293a1 1 0 00-1.414 0l-7 7a1 1 0 001.414 1.414L4 10.414V17a1 1 0 001 1h2a1 1 0 001-1v-2a1 1 0 011-1h2a1 1 0 011 1v2a1 1 0 001 1h2a1 1 0 001-1v-6.586l.293.293a1 1 0 001.414-1.414l-7-7z\"}));r=e.forwardRef(t)}return r};export{l as default};\n","import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{useState,useEffect,useRef}from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{motion}from\"framer-motion\";import{NullState}from\"https://framer.com/m/framer/icon-nullstate.js@0.7.0\";import HomeFactory from\"https://framer.com/m/hero-icons/Home.js@0.0.27\";import{defaultEvents,useIconSelection}from\"https://framerusercontent.com/modules/Ma20hU0GGRxLxZphbywl/OSpwWF91FHPVFyQJjMHt/utils.js\";export const iconKeys=[\"AcademicCap\",\"AcademicCapOutline\",\"Adjustments\",\"AdjustmentsOutline\",\"Annotation\",\"AnnotationOutline\",\"Archive\",\"ArchiveOutline\",\"ArrowCircleDown\",\"ArrowCircleLeft\",\"ArrowCircleRight\",\"ArrowCircleUp\",\"ArrowCircleUpOutline\",\"ArrowDown\",\"ArrowDownOutline\",\"ArrowLeft\",\"ArrowLeftOutline\",\"ArrowNarrowDown\",\"ArrowNarrowLeft\",\"ArrowNarrowRight\",\"ArrowNarrowUp\",\"ArrowNarrowUpOutline\",\"ArrowRight\",\"ArrowRightOutline\",\"ArrowUp\",\"ArrowUpOutline\",\"ArrowsExpand\",\"ArrowsExpandOutline\",\"AtSymbol\",\"AtSymbolOutline\",\"Backspace\",\"BackspaceOutline\",\"BadgeCheck\",\"BadgeCheckOutline\",\"Ban\",\"BanOutline\",\"Beaker\",\"BeakerOutline\",\"Bell\",\"BellOutline\",\"BookOpen\",\"BookOpenOutline\",\"Bookmark\",\"BookmarkAlt\",\"BookmarkAltOutline\",\"BookmarkOutline\",\"Briefcase\",\"BriefcaseOutline\",\"Cake\",\"CakeOutline\",\"Calculator\",\"CalculatorOutline\",\"Calendar\",\"CalendarOutline\",\"Camera\",\"CameraOutline\",\"Cash\",\"CashOutline\",\"ChartBar\",\"ChartBarOutline\",\"ChartPie\",\"ChartPieOutline\",\"ChartSquareBar\",\"Chat\",\"ChatAlt\",\"ChatAlt2\",\"ChatAlt2Outline\",\"ChatAltOutline\",\"ChatOutline\",\"Check\",\"CheckCircle\",\"CheckCircleOutline\",\"CheckOutline\",\"ChevronDoubleDown\",\"ChevronDoubleLeft\",\"ChevronDoubleRight\",\"ChevronDoubleUp\",\"ChevronDown\",\"ChevronDownOutline\",\"ChevronLeft\",\"ChevronLeftOutline\",\"ChevronRight\",\"ChevronRightOutline\",\"ChevronUp\",\"ChevronUpOutline\",\"Chip\",\"ChipOutline\",\"Clipboard\",\"ClipboardCheck\",\"ClipboardCopy\",\"ClipboardCopyOutline\",\"ClipboardList\",\"ClipboardListOutline\",\"ClipboardOutline\",\"Clock\",\"ClockOutline\",\"Cloud\",\"CloudDownload\",\"CloudDownloadOutline\",\"CloudOutline\",\"CloudUpload\",\"CloudUploadOutline\",\"Code\",\"CodeOutline\",\"Cog\",\"CogOutline\",\"Collection\",\"CollectionOutline\",\"ColorSwatch\",\"ColorSwatchOutline\",\"CreditCard\",\"CreditCardOutline\",\"Cube\",\"CubeOutline\",\"CubeTransparent\",\"CurrencyBangladeshi\",\"CurrencyDollar\",\"CurrencyEuro\",\"CurrencyEuroOutline\",\"CurrencyPound\",\"CurrencyPoundOutline\",\"CurrencyRupee\",\"CurrencyRupeeOutline\",\"CurrencyYen\",\"CurrencyYenOutline\",\"CursorClick\",\"CursorClickOutline\",\"Database\",\"DatabaseOutline\",\"DesktopComputer\",\"DeviceMobile\",\"DeviceMobileOutline\",\"DeviceTablet\",\"DeviceTabletOutline\",\"Document\",\"DocumentAdd\",\"DocumentAddOutline\",\"DocumentDownload\",\"DocumentDuplicate\",\"DocumentOutline\",\"DocumentRemove\",\"DocumentReport\",\"DocumentSearch\",\"DocumentText\",\"DocumentTextOutline\",\"DotsCircleHorizontal\",\"DotsHorizontal\",\"DotsVertical\",\"DotsVerticalOutline\",\"Download\",\"DownloadOutline\",\"Duplicate\",\"DuplicateOutline\",\"EmojiHappy\",\"EmojiHappyOutline\",\"EmojiSad\",\"EmojiSadOutline\",\"Exclamation\",\"ExclamationCircle\",\"ExclamationOutline\",\"ExternalLink\",\"ExternalLinkOutline\",\"Eye\",\"EyeOff\",\"EyeOffOutline\",\"EyeOutline\",\"FastForward\",\"FastForwardOutline\",\"Film\",\"FilmOutline\",\"Filter\",\"FilterOutline\",\"FingerPrint\",\"FingerPrintOutline\",\"Fire\",\"FireOutline\",\"Flag\",\"FlagOutline\",\"Folder\",\"FolderAdd\",\"FolderAddOutline\",\"FolderDownload\",\"FolderOpen\",\"FolderOpenOutline\",\"FolderOutline\",\"FolderRemove\",\"FolderRemoveOutline\",\"Gift\",\"GiftOutline\",\"Globe\",\"GlobeAlt\",\"GlobeAltOutline\",\"GlobeOutline\",\"Hand\",\"HandOutline\",\"Hashtag\",\"HashtagOutline\",\"Heart\",\"HeartOutline\",\"Home\",\"HomeOutline\",\"Identification\",\"Inbox\",\"InboxIn\",\"InboxInOutline\",\"InboxOutline\",\"InformationCircle\",\"Key\",\"KeyOutline\",\"Library\",\"LibraryOutline\",\"LightBulb\",\"LightBulbOutline\",\"LightningBolt\",\"LightningBoltOutline\",\"Link\",\"LinkOutline\",\"LocationMarker\",\"LockClosed\",\"LockClosedOutline\",\"LockOpen\",\"LockOpenOutline\",\"Login\",\"LoginOutline\",\"Logout\",\"LogoutOutline\",\"Mail\",\"MailOpen\",\"MailOpenOutline\",\"MailOutline\",\"Map\",\"MapOutline\",\"Menu\",\"MenuAlt1\",\"MenuAlt1Outline\",\"MenuAlt2\",\"MenuAlt2Outline\",\"MenuAlt3\",\"MenuAlt3Outline\",\"MenuAlt4\",\"MenuAlt4Outline\",\"MenuOutline\",\"Microphone\",\"MicrophoneOutline\",\"Minus\",\"MinusCircle\",\"MinusCircleOutline\",\"MinusOutline\",\"MinusSm\",\"MinusSmOutline\",\"Moon\",\"MoonOutline\",\"MusicNote\",\"MusicNoteOutline\",\"Newspaper\",\"NewspaperOutline\",\"OfficeBuilding\",\"PaperAirplane\",\"PaperAirplaneOutline\",\"PaperClip\",\"PaperClipOutline\",\"Pause\",\"PauseOutline\",\"Pencil\",\"PencilAlt\",\"PencilAltOutline\",\"PencilOutline\",\"Phone\",\"PhoneIncoming\",\"PhoneIncomingOutline\",\"PhoneMissedCall\",\"PhoneOutgoing\",\"PhoneOutgoingOutline\",\"PhoneOutline\",\"Photograph\",\"PhotographOutline\",\"Play\",\"PlayOutline\",\"Plus\",\"PlusCircle\",\"PlusCircleOutline\",\"PlusOutline\",\"PlusSm\",\"PlusSmOutline\",\"PresentationChartBar\",\"Printer\",\"PrinterOutline\",\"Puzzle\",\"PuzzleOutline\",\"Qrcode\",\"QrcodeOutline\",\"QuestionMarkCircle\",\"ReceiptRefund\",\"ReceiptRefundOutline\",\"ReceiptTax\",\"ReceiptTaxOutline\",\"Refresh\",\"RefreshOutline\",\"Reply\",\"ReplyOutline\",\"Rewind\",\"RewindOutline\",\"Rss\",\"RssOutline\",\"Save\",\"SaveAs\",\"SaveAsOutline\",\"SaveOutline\",\"Scale\",\"ScaleOutline\",\"Scissors\",\"ScissorsOutline\",\"Search\",\"SearchCircle\",\"SearchCircleOutline\",\"SearchOutline\",\"Selector\",\"SelectorOutline\",\"Server\",\"ServerOutline\",\"Share\",\"ShareOutline\",\"ShieldCheck\",\"ShieldCheckOutline\",\"ShieldExclamation\",\"ShoppingBag\",\"ShoppingBagOutline\",\"ShoppingCart\",\"ShoppingCartOutline\",\"SortAscending\",\"SortAscendingOutline\",\"SortDescending\",\"Sparkles\",\"SparklesOutline\",\"Speakerphone\",\"SpeakerphoneOutline\",\"Star\",\"StarOutline\",\"StatusOffline\",\"StatusOfflineOutline\",\"StatusOnline\",\"StatusOnlineOutline\",\"Stop\",\"StopOutline\",\"Sun\",\"SunOutline\",\"Support\",\"SupportOutline\",\"SwitchHorizontal\",\"SwitchVertical\",\"Table\",\"TableOutline\",\"Tag\",\"TagOutline\",\"Template\",\"TemplateOutline\",\"Terminal\",\"TerminalOutline\",\"ThumbDown\",\"ThumbDownOutline\",\"ThumbUp\",\"ThumbUpOutline\",\"Ticket\",\"TicketOutline\",\"Translate\",\"TranslateOutline\",\"Trash\",\"TrashOutline\",\"TrendingDown\",\"TrendingDownOutline\",\"TrendingUp\",\"TrendingUpOutline\",\"Truck\",\"TruckOutline\",\"Upload\",\"UploadOutline\",\"User\",\"UserAdd\",\"UserAddOutline\",\"UserCircle\",\"UserCircleOutline\",\"UserGroup\",\"UserGroupOutline\",\"UserOutline\",\"UserRemove\",\"UserRemoveOutline\",\"Users\",\"UsersOutline\",\"Variable\",\"VariableOutline\",\"VideoCamera\",\"VideoCameraOutline\",\"ViewBoards\",\"ViewBoardsOutline\",\"ViewGrid\",\"ViewGridAdd\",\"ViewGridAddOutline\",\"ViewGridOutline\",\"ViewList\",\"ViewListOutline\",\"VolumeOff\",\"VolumeOffOutline\",\"VolumeUp\",\"VolumeUpOutline\",\"Wifi\",\"WifiOutline\",\"X\",\"XCircle\",\"XCircleOutline\",\"XOutline\",\"ZoomIn\",\"ZoomInOutline\",\"ZoomOut\",\"ZoomOutOutline\",];const moduleBaseUrl=\"https://framer.com/m/hero-icons/\";const lowercaseIconKeyPairs=iconKeys.reduce((res,key)=>{res[key.toLowerCase()]=key;return res;},{});/**\n * HERO\n *\n * @framerIntrinsicWidth 24\n * @framerIntrinsicHeight 24\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */ export function Icon(props){const{color,selectByList,iconSearch,iconSelection,onClick,onMouseDown,onMouseUp,onMouseEnter,onMouseLeave,mirrored}=props;const isMounted=useRef(false);const iconKey=useIconSelection(iconKeys,selectByList,iconSearch,iconSelection,lowercaseIconKeyPairs);// Selected Icon Module\nconst[SelectedIcon,setSelectedIcon]=useState(iconKey===\"Home\"?HomeFactory(React):null);// Import the selected module or reset so null state\nasync function importModule(){// Get the selected module\ntry{const iconModuleUrl=`${moduleBaseUrl}${iconKey}.js@0.0.27`;const module=await import(/* webpackIgnore: true */ iconModuleUrl);if(isMounted.current)setSelectedIcon(module.default(React));}catch{if(isMounted.current)setSelectedIcon(null);}}// Import module when new style or icon is selected\nuseEffect(()=>{isMounted.current=true;importModule();return()=>{isMounted.current=false;};},[iconKey]);const isOnCanvas=RenderTarget.current()===RenderTarget.canvas;const emptyState=isOnCanvas?/*#__PURE__*/ _jsx(NullState,{}):null;return /*#__PURE__*/ _jsx(motion.div,{style:{display:\"contents\"},onClick,onMouseEnter,onMouseLeave,onMouseDown,onMouseUp,children:SelectedIcon?/*#__PURE__*/ _jsx(SelectedIcon,{style:{width:\"100%\",height:\"100%\",transform:mirrored?\"scale(-1, 1)\":undefined},color:color}):emptyState});}Icon.displayName=\"Hero\";Icon.defaultProps={width:24,height:24,iconSelection:\"Home\",iconSearch:\"Home\",color:\"#66F\",selectByList:true,mirrored:false};addPropertyControls(Icon,{selectByList:{type:ControlType.Boolean,title:\"Select\",enabledTitle:\"List\",disabledTitle:\"Search\",defaultValue:Icon.defaultProps.selectByList},iconSelection:{type:ControlType.Enum,options:iconKeys,defaultValue:Icon.defaultProps.iconSelection,title:\"Name\",hidden:({selectByList})=>!selectByList,description:\"Find every icon name on the [Hero site](https://heroicons.com/)\"},iconSearch:{type:ControlType.String,title:\"Name\",placeholder:\"Menu, Wifi, Box…\",hidden:({selectByList})=>selectByList},mirrored:{type:ControlType.Boolean,enabledTitle:\"Yes\",disabledTitle:\"No\",defaultValue:Icon.defaultProps.mirrored},color:{type:ControlType.Color,title:\"Color\",defaultValue:Icon.defaultProps.color},...defaultEvents});\nexport const __FramerMetadata__ = {\"exports\":{\"iconKeys\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Icon\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicHeight\":\"24\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"24\"}},\"IconProps\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Hero.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,useIsInCurrentNavigationTarget}from\"framer\";import{isMotionValue,useInView}from\"framer-motion\";import{borderRadiusControl,defaultEvents,useIsBrowserSafari,useIsOnCanvas,useOnEnter,useOnExit,useRadius}from\"https://framer.com/m/framer/default-utils.js@^0.45.0\";import{memo,useCallback,useEffect,useMemo,useRef,useState}from\"react\";var ObjectFitType;(function(ObjectFitType){ObjectFitType[\"Fill\"]=\"fill\";ObjectFitType[\"Contain\"]=\"contain\";ObjectFitType[\"Cover\"]=\"cover\";ObjectFitType[\"None\"]=\"none\";ObjectFitType[\"ScaleDown\"]=\"scale-down\";})(ObjectFitType||(ObjectFitType={}));var SrcType;(function(SrcType){SrcType[\"Video\"]=\"Upload\";SrcType[\"Url\"]=\"URL\";})(SrcType||(SrcType={}));// Reduce renders\nfunction getProps(props){const{width,height,topLeft,topRight,bottomRight,bottomLeft,id,children,...rest}=props;return rest;}/**\n * VIDEO\n *\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 112\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n */ export function Video(props){const newProps=getProps(props);return /*#__PURE__*/ _jsx(VideoMemo,{...newProps});}function usePlaybackControls(videoRef){const isInCurrentNavigationTarget=useIsInCurrentNavigationTarget();const requestingPlay=useRef(false);const setProgress=useCallback(rawProgress=>{if(!videoRef.current)return;const newProgress=(rawProgress===1?.999:rawProgress)*videoRef.current.duration;const isAlreadySet=Math.abs(videoRef.current.currentTime-newProgress)<.1;if(videoRef.current.duration>0&&!isAlreadySet){videoRef.current.currentTime=newProgress;}},[]);const play=useCallback(()=>{const isPlaying=videoRef.current.currentTime>0&&videoRef.current.onplaying&&!videoRef.current.paused&&!videoRef.current.ended&&videoRef.current.readyState>videoRef.current.HAVE_CURRENT_DATA;if(!isPlaying&&videoRef.current&&!requestingPlay.current&&isInCurrentNavigationTarget){requestingPlay.current=true;videoRef.current.play().catch(e=>{}) // It's likely fine, swallow error\n.finally(()=>requestingPlay.current=false);}},[]);const pause=useCallback(()=>{if(!videoRef.current||requestingPlay.current)return;videoRef.current.pause();},[]);return{play,pause,setProgress};}function useAutoplayBehavior({playingProp,muted,loop,playsinline,controls}){const[initialPlayingProp]=useState(()=>playingProp);const[hasPlayingPropChanged,setHasPlayingPropChanged]=useState(false);if(playingProp!==initialPlayingProp&&!hasPlayingPropChanged){setHasPlayingPropChanged(true);}const behavesAsGif=// passing `playing === true` on mount indicates that the video should\n// autoplay, like a GIF\ninitialPlayingProp&&muted&&loop&&playsinline&&!controls&&// Some users of the <Video> component use it by wrapping it with\n// another smart component and adding their own controls on top. (The\n// controls use transitions to control the video: e.g., when clicking\n// the play button, the smart component will transition to a state with\n// <Video playing={true} />.) In this case, we don't want the video to\n// behave as a gif, as it will be weird if the video suddenly started\n// acting as such (and auto-pausing when leaving the viewport) as soon\n// as the site visitor mutes it and clicks “Play”.\n!hasPlayingPropChanged;let autoplay;if(behavesAsGif)autoplay=\"on-viewport\";else if(initialPlayingProp)autoplay=\"on-mount\";else autoplay=\"no-autoplay\";return autoplay;}/**\n * The Video component has some effects that sync the video element with props\n * like `startTime`, `progress`, etc. React calls these effects whenever these\n * props change. However, it also calls them on the first mount, and this is\n * troublesome – if we’re doing SSR, and the user changed the video state before\n * the video was hydrated, the initial `useEffect` call will reset the video\n * state. To avoid this, we use this flag.\n */ let isMountedAndReadyForProgressChanges=false;const VideoMemo=/*#__PURE__*/ memo(function VideoInner(props){const{srcType,srcFile,srcUrl,playing:playingProp,muted,playsinline,controls,progress,objectFit,backgroundColor,onSeeked,onPause,onPlay,onEnd,onClick,onMouseEnter,onMouseLeave,onMouseDown,onMouseUp,poster,posterEnabled,startTime:startTimeProp,volume,loop}=props;const videoRef=useRef();const isSafari=useIsBrowserSafari();const wasPausedOnLeave=useRef(null);const wasEndedOnLeave=useRef(null);const isOnCanvas=useIsOnCanvas();const borderRadius=useRadius(props);// Hard-coding `autoplayBehavior` and `isInViewport` when on canvas as a\n// tiny perf optimization. isOnCanvas won’t change through the lifecycle of\n// the component, so using these hooks conditionally should be safe\nconst autoplayBehavior=isOnCanvas?\"no-autoplay\":useAutoplayBehavior({playingProp,muted,loop,playsinline,controls});const isInViewport=isOnCanvas?true:useInView(videoRef);// Video elements behave oddly at 100% duration\nconst startTime=startTimeProp===100?99.9:startTimeProp;const{play,pause,setProgress}=usePlaybackControls(videoRef);// Pause/play via props\nuseEffect(()=>{if(isOnCanvas)return;if(playingProp)play();else pause();},[playingProp]);// Pause/play via viewport\nuseEffect(()=>{if(isOnCanvas)return;if(autoplayBehavior!==\"on-viewport\")return;if(isInViewport)play();else pause();},[autoplayBehavior,isInViewport]);// Allow scrubbling via progress prop\n// 1) Handle cases when the progress prop itself changes\nuseEffect(()=>{if(!isMountedAndReadyForProgressChanges){isMountedAndReadyForProgressChanges=true;return;}const rawProgressValue=isMotionValue(progress)?progress.get():(progress!==null&&progress!==void 0?progress:0)*.01;setProgress(// When the progress value exists (e.g. <Video startTime={10}\n// progress={50} />), we respect the `progress` value over\n// `startTime`, even if `startTime` changes. That’s because\n// `startTime` == start == changing it shouldn’t affect the current\n// progress\n(rawProgressValue!==null&&rawProgressValue!==void 0?rawProgressValue:0)||// Then why fall back to `startTime` when `progress` doesn’t exist,\n// you might ask? Now, that’s for\n// - canvas UX: we want the video progress to change when the user\n//   is scrobbling the “Start Time” in component settings.\n// - backwards compatibility: maybe some users *are* scrobbling\n//   using `startTime` instead of `progress`? We don’t know, and it\n//   always supported it, so let’s not break it\n(startTime!==null&&startTime!==void 0?startTime:0)/100);},[startTime,srcFile,srcUrl,progress]);// 2) Handle cases when the motion value inside the progress prop changes\nuseEffect(()=>{if(!isMotionValue(progress))return;return progress.on(\"change\",value=>setProgress(value));},[progress]);// (Prototyping) Checking if we need to play on navigation enter\nuseOnEnter(()=>{if(wasPausedOnLeave.current===null)return;if(videoRef.current){// if (restartOnEnter) setProgress(0)\nif(!wasEndedOnLeave&&loop||!wasPausedOnLeave.current)play();}});// (Prototyping) Pausing & saving playing state on navigation exit\nuseOnExit(()=>{if(videoRef.current){wasEndedOnLeave.current=videoRef.current.ended;wasPausedOnLeave.current=videoRef.current.paused;pause();}});const src=useMemo(()=>{let fragment=\"\";// if (\n//     startTime > 0 &&\n//     videoRef.current &&\n//     !isNaN(videoRef.current.duration) &&\n//     !isOnCanvas\n// ) {\n//     console.log(startTime, videoRef.current.duration)\n//     fragment = `#t=${startTime * videoRef.current.duration}`\n// }\nif(srcType===SrcType.Url)return srcUrl+fragment;if(srcType===SrcType.Video)return srcFile+fragment;},[srcType,srcFile,srcUrl,startTime]);// Autoplay via JS to work in Safari\nuseEffect(()=>{if(isSafari&&videoRef.current&&autoplayBehavior===\"on-mount\"){setTimeout(()=>play(),50);}},[]);// Volume Control\nuseEffect(()=>{if(videoRef.current&&!muted)videoRef.current.volume=(volume!==null&&volume!==void 0?volume:0)/100;},[volume]);// When video is ready, set start-time, then autoplay if needed\nconst handleReady=()=>{if(!videoRef.current)return;if(videoRef.current.currentTime<.3)setProgress((startTime!==null&&startTime!==void 0?startTime:0)*.01);if(autoplayBehavior===\"on-mount\")play();};return /*#__PURE__*/ _jsx(\"video\",{onClick,onMouseEnter,onMouseLeave,onMouseDown,onMouseUp,src:src,loop:loop,ref:videoRef,onSeeked:e=>{return onSeeked===null||onSeeked===void 0?void 0:onSeeked(e);},onPause:e=>{return onPause===null||onPause===void 0?void 0:onPause(e);},onPlay:e=>{return onPlay===null||onPlay===void 0?void 0:onPlay(e);},onEnded:e=>{return onEnd===null||onEnd===void 0?void 0:onEnd(e);},autoPlay:autoplayBehavior===\"on-mount\",poster:posterEnabled?poster:undefined,onLoadedData:handleReady,controls:controls,muted:isOnCanvas?true:muted,playsInline:playsinline,style:{cursor:!!onClick?\"pointer\":\"auto\",width:\"100%\",height:\"100%\",borderRadius,display:\"block\",objectFit:objectFit,backgroundColor:backgroundColor,objectPosition:\"50% 50%\"}});});Video.displayName=\"Video\";Video.defaultProps={srcType:SrcType.Url,srcUrl:\"https://assets.mixkit.co/videos/preview/mixkit-ice-cream-glass-of-red-soda-5094-small.mp4\",srcFile:\"\",posterEnabled:false,controls:false,playing:true,loop:true,muted:true,playsinline:true,restartOnEnter:false,objectFit:ObjectFitType.Cover,backgroundColor:\"rgba(0,0,0,0)\",radius:0,volume:25,startTime:0};const groupsRegex=/[A-Z]{2,}|[A-Z][a-z]+|[a-z]+|[A-Z]|\\d+/gu;function capitalizeFirstLetter(value){return value.charAt(0).toUpperCase()+value.slice(1);}export function titleCase(value){const groups=value.match(groupsRegex)||[];return groups.map(capitalizeFirstLetter).join(\" \");}const objectFitOptions=[ObjectFitType.Cover,ObjectFitType.Fill,ObjectFitType.Contain,ObjectFitType.ScaleDown,ObjectFitType.None,];addPropertyControls(Video,{srcType:{type:ControlType.Enum,displaySegmentedControl:true,title:\"Source\",options:[SrcType.Url,SrcType.Video]},srcUrl:{type:ControlType.String,title:\" \",placeholder:\"../example.mp4\",hidden(props){return props.srcType===SrcType.Video;},description:\"Hosted video file URL. For YouTube, use the YouTube component.\"},srcFile:{type:ControlType.File,title:\" \",allowedFileTypes:[\"mp4\"],hidden(props){return props.srcType===SrcType.Url;}},playing:{type:ControlType.Boolean,title:\"Playing\",enabledTitle:\"Yes\",disabledTitle:\"No\"},posterEnabled:{type:ControlType.Boolean,title:\"Poster\",enabledTitle:\"Yes\",disabledTitle:\"No\"},poster:{type:ControlType.Image,title:\" \",hidden:({posterEnabled})=>!posterEnabled},backgroundColor:{type:ControlType.Color,title:\"Background\"},...borderRadiusControl,startTime:{title:\"Start Time\",type:ControlType.Number,min:0,max:100,step:.1,unit:\"%\"},loop:{type:ControlType.Boolean,title:\"Loop\",enabledTitle:\"Yes\",disabledTitle:\"No\"},objectFit:{type:ControlType.Enum,title:\"Fit\",options:objectFitOptions,optionTitles:objectFitOptions.map(titleCase)},// restartOnEnter: {\n//     type: ControlType.Boolean,\n//     title: \"On ReEnter\",\n//     enabledTitle: \"Restart\",\n//     disabledTitle: \"Resume\",\n// },\ncontrols:{type:ControlType.Boolean,title:\"Controls\",enabledTitle:\"Show\",disabledTitle:\"Hide\"},muted:{type:ControlType.Boolean,title:\"Muted\",enabledTitle:\"Yes\",disabledTitle:\"No\"},volume:{type:ControlType.Number,max:100,min:0,unit:\"%\",hidden:({muted})=>muted},onEnd:{type:ControlType.EventHandler},onSeeked:{type:ControlType.EventHandler},onPause:{type:ControlType.EventHandler},onPlay:{type:ControlType.EventHandler},...defaultEvents});\nexport const __FramerMetadata__ = {\"exports\":{\"VideoProps\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"titleCase\":{\"type\":\"function\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Video\":{\"type\":\"reactComponent\",\"name\":\"Video\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"200\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerSupportedLayoutWidth\":\"fix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