{"version":3,"file":"IPhone_vid.DqPHnirg.mjs","names":["React.useState"],"sources":["https:/framerusercontent.com/modules/ysxdGMKDbHwm7n3BzwpY/XTI0oa7nGoZusI1tfWEt/IPhone_vid.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * HeroSafetyVideo — iPhone-style video block for Framer.\n * Paste a public, direct Cloudflare R2 video URL in Video URL.\n * Autoplays muted, loops, and fills the phone screen with object-fit: cover.\n * Includes native playback, seeking, audio and fullscreen controls.\n * Use a vertical MP4 for the best crop. Set an optional poster image.\n */export default function HeroSafetyVideo(props){const{videoUrl,posterImage,caption,durationLabel,accentFrom,accentTo,showCaption}=props;const[muted,setMuted]=React.useState(true);const[hasError,setHasError]=React.useState(false);const source=(videoUrl||\"\").trim();const thumbnailUrl=posterImage&&(posterImage.src||posterImage)||undefined;React.useEffect(()=>{setMuted(true);setHasError(false);},[source]);return /*#__PURE__*/_jsxs(\"div\",{style:outerStyle,children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                video.tga-hero-safety-video:fullscreen {\n                    object-fit: contain;\n                    background: #000;\n                }\n                video.tga-hero-safety-video:-webkit-full-screen {\n                    object-fit: contain;\n                    background: #000;\n                }\n            `}),/*#__PURE__*/_jsx(\"div\",{style:{...glowStyle,background:`radial-gradient(circle at 30% 30%, ${accentFrom}59, ${accentTo}40 60%, transparent 75%)`}}),/*#__PURE__*/_jsxs(\"div\",{style:colStyle,children:[/*#__PURE__*/_jsxs(\"div\",{style:phoneOuterWrap,children:[/*#__PURE__*/_jsx(\"div\",{style:{...sideButton,...muteSwitch}}),/*#__PURE__*/_jsx(\"div\",{style:{...sideButton,...volUp}}),/*#__PURE__*/_jsx(\"div\",{style:{...sideButton,...volDown}}),/*#__PURE__*/_jsx(\"div\",{style:{...sideButton,...powerButton}}),/*#__PURE__*/_jsx(\"div\",{style:phoneFrameStyle,children:/*#__PURE__*/_jsxs(\"div\",{style:phoneInnerStyle,children:[source&&!hasError?/*#__PURE__*/_jsx(\"video\",{className:\"tga-hero-safety-video\",src:source,poster:thumbnailUrl,style:videoStyle,autoPlay:true,muted:muted,loop:true,playsInline:true,preload:\"metadata\",controls:true,\"aria-label\":\"Child safety video\",onVolumeChange:event=>setMuted(event.currentTarget.muted),onError:()=>setHasError(true)},source):thumbnailUrl?/*#__PURE__*/_jsx(\"img\",{src:thumbnailUrl,alt:\"Video preview\",style:videoStyle}):/*#__PURE__*/_jsx(\"div\",{style:{...placeholderStyle,background:`linear-gradient(200deg, #F3DDB2 0%, ${accentTo} 45%, ${accentFrom} 100%)`},children:hasError?\"Video could not load. Check the public video URL.\":\"Paste your direct video URL\"}),/*#__PURE__*/_jsx(\"div\",{style:screenGloss}),/*#__PURE__*/_jsx(\"div\",{style:dynamicIsland}),durationLabel&&/*#__PURE__*/_jsx(\"div\",{style:durationTagStyle,children:durationLabel}),/*#__PURE__*/_jsx(\"div\",{style:homeIndicator})]})})]}),showCaption&&caption&&/*#__PURE__*/_jsx(\"p\",{style:captionStyle,children:caption})]})]});}const outerStyle={position:\"relative\",display:\"flex\",justifyContent:\"center\",alignItems:\"flex-start\",width:\"100%\",height:\"100%\"};const glowStyle={position:\"absolute\",width:440,height:440,top:-30,filter:\"blur(2px)\",zIndex:0,pointerEvents:\"none\"};const colStyle={position:\"relative\",zIndex:1,display:\"flex\",flexDirection:\"column\",alignItems:\"center\"};const phoneOuterWrap={position:\"relative\",width:290,aspectRatio:\"9 / 18.5\"};const phoneFrameStyle={width:\"100%\",height:\"100%\",borderRadius:46,padding:12,boxSizing:\"border-box\",background:\"linear-gradient(155deg, #3a3d42 0%, #1c1d20 45%, #0c0d0e 100%)\",boxShadow:\"0 40px 70px -24px rgba(20,20,24,0.5), 0 12px 24px rgba(20,20,24,0.25), inset 0 0 0 1px rgba(255,255,255,0.06)\"};const phoneInnerStyle={position:\"relative\",width:\"100%\",height:\"100%\",borderRadius:34,overflow:\"hidden\",background:\"#000\",boxShadow:\"inset 0 0 0 2px rgba(0,0,0,0.6)\"};const videoStyle={width:\"100%\",height:\"100%\",objectFit:\"cover\",display:\"block\"};const screenGloss={position:\"absolute\",inset:0,background:\"linear-gradient(115deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 22%, rgba(255,255,255,0) 78%, rgba(255,255,255,0.05) 100%)\",pointerEvents:\"none\"};const dynamicIsland={pointerEvents:\"none\",position:\"absolute\",top:14,left:\"50%\",transform:\"translateX(-50%)\",width:84,height:24,borderRadius:14,background:\"#000\",boxShadow:\"inset 0 0 0 1px rgba(255,255,255,0.08)\"};const homeIndicator={pointerEvents:\"none\",position:\"absolute\",bottom:10,left:\"50%\",transform:\"translateX(-50%)\",width:100,height:4,borderRadius:3,background:\"rgba(255,255,255,0.75)\"};const placeholderStyle={width:\"100%\",height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",color:\"#4C525C\",fontSize:13,fontWeight:600,textAlign:\"center\",padding:20,boxSizing:\"border-box\"};const durationTagStyle={position:\"absolute\",top:50,left:16,pointerEvents:\"none\",background:\"rgba(0,0,0,0.45)\",color:\"#fff\",fontSize:12,fontWeight:600,padding:\"5px 10px\",borderRadius:999,backdropFilter:\"blur(4px)\"};const captionStyle={textAlign:\"center\",fontSize:13,color:\"#80848B\",marginTop:18,maxWidth:290,fontFamily:\"Poppins, sans-serif\"};// --- side buttons (purely decorative, positioned on the outer wrap) ---\nconst sideButton={position:\"absolute\",background:\"linear-gradient(180deg, #2c2e32, #17181a)\",boxShadow:\"inset 0 0 0 1px rgba(255,255,255,0.05)\"};const muteSwitch={left:-3,top:\"13%\",width:3,height:\"3.5%\",borderRadius:\"2px 0 0 2px\"};const volUp={left:-3,top:\"20%\",width:3,height:\"7%\",borderRadius:\"2px 0 0 2px\"};const volDown={left:-3,top:\"29%\",width:3,height:\"7%\",borderRadius:\"2px 0 0 2px\"};const powerButton={right:-3,top:\"22%\",width:3,height:\"10%\",borderRadius:\"0 2px 2px 0\"};addPropertyControls(HeroSafetyVideo,{videoUrl:{type:ControlType.String,title:\"Video URL\",placeholder:\"https://your-video-domain.com/video.mp4\",description:\"Paste the public, direct URL of your Cloudflare R2 video file.\",defaultValue:\"\"},posterImage:{type:ControlType.Image,title:\"Poster (optional)\",description:\"Shown while the video loads and as a fallback if it cannot load.\"},durationLabel:{type:ControlType.String,title:\"Duration\",defaultValue:\"0:52\",placeholder:\"0:52\"},showCaption:{type:ControlType.Boolean,title:\"Show caption\",defaultValue:true},caption:{type:ControlType.String,title:\"Caption\",defaultValue:\"“Safety lives in the small moments.”\\nEducators & families, in their own words.\",displayTextArea:true,hidden:props=>!props.showCaption},accentFrom:{type:ControlType.Color,title:\"Accent 1\",defaultValue:\"#A1C87E\"},accentTo:{type:ControlType.Color,title:\"Accent 2\",defaultValue:\"#EDB558\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"HeroSafetyVideo\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./IPhone_vid.map"],"mappings":"yLAMG,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,WAAS,cAAY,UAAQ,gBAAc,aAAW,WAAS,eAAa,EAAW,CAAC,EAAM,GAAUA,EAAe,EAAI,EAAO,CAAC,EAAS,GAAaA,EAAe,EAAK,EAAQ,GAAQ,GAAU,GAAA,CAAI,KAAK,EAAQ,EAAa,IAAc,EAAY,KAAK,IAAc,IAAA,GAA6E,OAAnE,MAAoB,CAAC,EAAS,EAAI,EAAE,EAAY,EAAK,CAAE,EAAE,CAAC,CAAM,CAAC,EAAsB,EAAM,MAAM,CAAC,MAAM,EAAW,SAAS,CAAc,EAAK,QAAQ,CAAC,SAAS;;;;;;;;;aAS1e,CAAC,EAAe,EAAK,MAAM,CAAC,MAAM,CAAC,GAAG,EAAU,WAAW,sCAAsC,EAAW,MAAM,EAAS,yBAA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