{"version":3,"file":"shared-lib.C0Za3-rS.mjs","names":["useState","__esmMin","init_npm_react_18_3_1","init_ssg_sandbox_shims","window","_e","c","J","ce","withEastAfricaTime","rest","props","time","setTime","fmt","id","start","Component","style","init_EastAfricaTime","init_jsx_runtime","f","d","p","n"],"sources":["https:/framerusercontent.com/modules/wDgzK1MQHZdbhDXo3KKR/6ALZpa68lr1k2shC5YUD/EastAfricaTime.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{forwardRef,useEffect,useState}from\"react\";// Live East Africa Time (Nairobi, Kampala, Dar es Salaam, Addis Ababa: UTC+3), updated every second.\nconst fmt=(()=>{let f=null;return()=>{try{if(!f)f=new Intl.DateTimeFormat(\"en-GB\",{timeZone:\"Africa/Nairobi\",hour:\"2-digit\",minute:\"2-digit\",second:\"2-digit\",hourCycle:\"h23\"});return f.format(new Date)+\" EAT\";}catch{const d=new Date(Date.now()+3*3600*1e3);const p=n=>String(n).padStart(2,\"0\");return p(d.getUTCHours())+\":\"+p(d.getUTCMinutes())+\":\"+p(d.getUTCSeconds())+\" EAT\";}};})();export function withEastAfricaTime(Component){return /*#__PURE__*/forwardRef(function EastAfricaTime(props,ref){const{style,...rest}=props;const[time,setTime]=useState(null);useEffect(()=>{setTime(fmt());let id=0;// tick on the second boundary so it changes exactly with the clock\nconst start=window.setTimeout(()=>{setTime(fmt());id=window.setInterval(()=>setTime(fmt()),1e3);},1e3-Date.now()%1e3);return()=>{window.clearTimeout(start);window.clearInterval(id);};},[]);return /*#__PURE__*/_jsx(Component,{...rest,ref:ref,...time?{text:time}:{},style:{...style,fontVariantNumeric:\"tabular-nums\",whiteSpace:\"nowrap\"}});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withEastAfricaTime\":{\"type\":\"reactHoc\",\"name\":\"withEastAfricaTime\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./EastAfricaTime.map"],"mappings":"A,yIACg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