{"version":3,"file":"BannerCountdown.BXccBTYP.mjs","names":["React.useState","React.useRef"],"sources":["https:/framerusercontent.com/modules/zTn2ONw3WBmICOLZVBjM/qJTZGeFqLkNxqNopn97s/Z45SWmU8E.js","https:/framerusercontent.com/modules/COn0ZnKceOFZLASlkqkH/SLftXQfP5NmcMFXEWTXP/BannerCountdown.js"],"sourcesContent":["// Generated by Framer (6ca5d98)\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,cx,motion,useSVGTemplate,withCSS}from\"framer\";import*as React from\"react\";import{forwardRef}from\"react\";const mask=\"var(--framer-icon-mask)\";const Base=/*#__PURE__*/forwardRef(function(props,ref){return /*#__PURE__*/_jsx(\"svg\",{...props,ref:ref,children:props.children});});const MotionSVG=motion.create(Base);const SVG=/*#__PURE__*/forwardRef((props,ref)=>{const{animated,layoutId,children,...rest}=props;return animated?/*#__PURE__*/_jsx(MotionSVG,{...rest,layoutId:layoutId,ref:ref,children:children}):/*#__PURE__*/_jsx(\"svg\",{...rest,ref:ref,children:children});});const svg='<svg display=\"block\" role=\"presentation\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 0 7.25 C 0 3.246 3.246 0 7.25 0 C 11.254 0 14.5 3.246 14.5 7.25 C 14.5 11.254 11.254 14.5 7.25 14.5 C 3.246 14.5 0 11.254 0 7.25 Z\" fill=\"transparent\" height=\"14.5px\" id=\"fFZExCmfI\" stroke-dasharray=\"\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\" stroke-miterlimit=\"10\" stroke-width=\"var(--1335ju, 1.5)\" stroke=\"var(--18mrqx2, rgb(0, 0, 0))\" transform=\"translate(4.75 4.75)\" width=\"14.5px\"/><path d=\"M 0 0 L 0 4 L 2 6\" fill=\"transparent\" height=\"6px\" id=\"GcmmBShi9\" stroke-dasharray=\"\" stroke-linecap=\"butt\" stroke-linejoin=\"miter\" stroke-miterlimit=\"10\" stroke-width=\"var(--1335ju, 1.5)\" stroke=\"var(--18mrqx2, rgb(0, 0, 0))\" transform=\"translate(12 8)\" width=\"2px\"/></svg>';const getProps=({dots,height,id,stroke,width,width1,...props})=>{return{...props,BKVe8Pgvw:dots??props.BKVe8Pgvw??1,fICyAUQY1:stroke??props.fICyAUQY1??\"rgb(0, 0, 0)\",lKf_CQTz5:width1??props.lKf_CQTz5??1.5};};const Component=/*#__PURE__*/React.forwardRef(function(props,ref){const{style,className,layoutId,variant,fICyAUQY1,lKf_CQTz5,BKVe8Pgvw,...restProps}=getProps(props);const href=useSVGTemplate(\"1709215641\",svg);return /*#__PURE__*/_jsx(SVG,{...restProps,className:cx(\"framer-WHcdb\",className),layoutId:layoutId,ref:ref,role:\"presentation\",style:{\"--1335ju\":lKf_CQTz5,\"--18mrqx2\":fICyAUQY1,...style},viewBox:\"0 0 24 24\",children:/*#__PURE__*/_jsx(\"use\",{href:href})});});const css=[`.framer-WHcdb { -webkit-mask: ${mask}; aspect-ratio: 1; display: block; mask: ${mask}; width: 24px; }`];/**\n * This is a generated Framer component.\n * @framerIntrinsicWidth 24\n * @framerIntrinsicHeight 24\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight any-prefer-fixed\n * @framerVariables {\"fICyAUQY1\":\"stroke\",\"lKf_CQTz5\":\"width1\",\"BKVe8Pgvw\":\"dots\"}\n * @framerImmutableVariables true\n * @framerVector {\"name\":\"Clock\",\"color\":{\"type\":\"variable\",\"value\":\"18mrqx2\"},\"set\":{\"localId\":\"vectorSet/SuYHhKUZG\",\"id\":\"SuYHhKUZG\",\"moduleId\":\"EqX8thWQjdZcOB1c6p5N\"}}\n * @framerDisableUnlink true\n */const Icon=withCSS(Component,css,\"framer-WHcdb\");Icon.displayName=\"Clock\";export default Icon;addPropertyControls(Icon,{fICyAUQY1:{defaultValue:\"rgb(0, 0, 0)\",hidden:false,title:\"Stroke\",type:ControlType.Color},lKf_CQTz5:{defaultValue:1.5,displayStepper:true,hidden:false,max:4,min:0,step:.5,title:\"Width\",type:ControlType.Number},BKVe8Pgvw:{defaultValue:1,displayStepper:true,hidden:true,max:4,min:1,title:\"Dots\",type:ControlType.Number}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Icon\",\"slots\":[],\"annotations\":{\"framerVector\":\"{\\\"name\\\":\\\"Clock\\\",\\\"color\\\":{\\\"type\\\":\\\"variable\\\",\\\"value\\\":\\\"18mrqx2\\\"},\\\"set\\\":{\\\"localId\\\":\\\"vectorSet/SuYHhKUZG\\\",\\\"id\\\":\\\"SuYHhKUZG\\\",\\\"moduleId\\\":\\\"EqX8thWQjdZcOB1c6p5N\\\"}}\",\"framerContractVersion\":\"1\",\"framerImmutableVariables\":\"true\",\"framerSupportedLayoutHeight\":\"any-prefer-fixed\",\"framerDisableUnlink\":\"true\",\"framerVariables\":\"{\\\"fICyAUQY1\\\":\\\"stroke\\\",\\\"lKf_CQTz5\\\":\\\"width1\\\",\\\"BKVe8Pgvw\\\":\\\"dots\\\"}\",\"framerIntrinsicWidth\":\"24\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerIntrinsicHeight\":\"24\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";export function DailyCycleCountdown(props){const{prefix,fontFamily,fontSize,fontWeight,color,textAlign,storageKey=\"unive_daily_15min_countdown\",reset=false}=props;const DURATION=15*60*1e3// 15 minutes in ms\n;const STORAGE_KEY=`dcc:end:${storageKey}`;// Hydration-safe initial text\nconst[display,setDisplay]=React.useState(\"15 : 00\");const endRef=React.useRef(null);const timerIdRef=React.useRef(null);React.useEffect(()=>{// Read or initialize end time\nconst now=Date.now();const stored=!reset?Number(localStorage.getItem(STORAGE_KEY)):NaN;let end=!isNaN(stored)&&stored>now?stored:now+DURATION;// If reset was requested or nothing valid stored, set new end\nif(reset||isNaN(stored)||stored<=now){localStorage.setItem(STORAGE_KEY,String(end));}endRef.current=end;const format=ms=>{const total=Math.max(0,Math.floor(ms/1e3));const m=String(Math.floor(total/60)).padStart(2,\"0\");const s=String(total%60).padStart(2,\"0\");return`${m} : ${s}`;};const tick=()=>{const endTime=endRef.current;const remaining=endTime-Date.now();setDisplay(format(remaining));if(remaining<=0&&timerIdRef.current){window.clearInterval(timerIdRef.current);timerIdRef.current=null;}};// Start ticking\ntick();timerIdRef.current=window.setInterval(tick,1e3);// Sync across tabs/windows\nconst onStorage=e=>{if(e.key===STORAGE_KEY&&e.newValue){const updatedEnd=Number(e.newValue);if(!isNaN(updatedEnd)){endRef.current=updatedEnd;tick();}}};window.addEventListener(\"storage\",onStorage);return()=>{if(timerIdRef.current)window.clearInterval(timerIdRef.current);window.removeEventListener(\"storage\",onStorage);};},[STORAGE_KEY,reset]);const justify=textAlign===\"left\"?\"flex-start\":textAlign===\"right\"?\"flex-end\":\"center\";return /*#__PURE__*/_jsxs(\"div\",{style:{display:\"inline-flex\",alignItems:\"center\",justifyContent:justify,fontFamily,fontSize,fontWeight,color,whiteSpace:\"nowrap\",userSelect:\"none\"},children:[prefix?/*#__PURE__*/_jsx(\"span\",{style:{marginRight:8},children:prefix}):null,/*#__PURE__*/_jsx(\"span\",{children:display})]});}DailyCycleCountdown.defaultProps={width:240,height:48,prefix:\"Ends in\",fontFamily:\"Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif\",fontSize:36,fontWeight:700,color:\"#111111\",textAlign:\"center\",storageKey:\"unive_daily_15min_countdown\",reset:false};addPropertyControls(DailyCycleCountdown,{prefix:{title:\"Prefix\",type:ControlType.String,defaultValue:\"Ends in\"},fontFamily:{title:\"Font\",type:ControlType.String},fontSize:{title:\"Size\",type:ControlType.Number,defaultValue:36,min:8,max:200,displayStepper:true},fontWeight:{title:\"Weight\",type:ControlType.Enum,options:[300,400,500,600,700,800,900],optionTitles:[\"300\",\"400\",\"500\",\"600\",\"700\",\"800\",\"900\"],defaultValue:700},color:{title:\"Color\",type:ControlType.Color,defaultValue:\"#111111\"},textAlign:{title:\"Align\",type:ControlType.SegmentedEnum,options:[\"left\",\"center\",\"right\"],optionTitles:[\"Left\",\"Center\",\"Right\"],defaultValue:\"center\"},storageKey:{title:\"Storage Key\",type:ControlType.String,defaultValue:\"unive_daily_15min_countdown\"},reset:{title:\"Reset Now\",type:ControlType.Boolean,defaultValue:false}});\nexport const __FramerMetadata__ = {\"exports\":{\"DailyCycleCountdown\":{\"type\":\"reactComponent\",\"name\":\"DailyCycleCountdown\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BannerCountdown.map"],"mappings":"qcAC2C,IAAqF,IAA4B,CAAoC,EAAK,0BAAgC,EAAkB,EAAW,SAAS,EAAM,EAAI,CAAC,OAAoB,EAAK,MAAM,CAAC,GAAG,EAAU,MAAI,SAAS,EAAM,SAAS,CAAC,EAAG,CAAO,EAAU,EAAO,OAAO,EAAK,CAAO,EAAiB,GAAY,EAAM,IAAM,CAAC,GAAK,CAAC,WAAS,WAAS,WAAS,GAAG,GAAM,EAAM,OAAO,EAAsB,EAAK,EAAU,CAAC,GAAG,EAAc,WAAa,MAAa,WAAS,CAAC,CAAc,EAAK,MAAM,CAAC,GAAG,EAAS,MAAa,WAAS,CAAC,EAAG,CAAO,EAAI,ixBAAuxB,GAAU,CAAC,OAAK,SAAO,KAAG,SAAO,QAAM,SAAO,GAAG,MAAgB,CAAC,GAAG,EAAM,UAAU,GAAM,EAAM,WAAW,EAAE,UAAU,GAAQ,EAAM,WAAW,eAAe,UAAU,GAAQ,EAAM,WAAW,IAAI,EAAS,EAAuB,EAAiB,SAAS,EAAM,EAAI,CAAC,GAAK,CAAC,QAAM,YAAU,WAAS,UAAQ,YAAU,YAAU,YAAU,GAAG,GAAW,EAAS,EAAM,CAAO,EAAK,EAAe,aAAa,EAAI,CAAC,OAAoB,EAAK,EAAI,CAAC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