{"version":3,"file":"LocalTime.CuhOlEyg.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/YHZT5R6X7UnOROixvwHW/KHr32bDoR5Ea7TV27hV3/LocalTime.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * The current time in an office's time zone, refreshed every half minute.\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function LocalTime(props){const{timeZone=\"UTC\",font,color,style}=props;const[text,setText]=useState(\"\");useEffect(()=>{let format;try{format=new Intl.DateTimeFormat(undefined,{hour:\"2-digit\",minute:\"2-digit\",timeZone});}catch{return;}const tick=()=>setText(format.format(new Date));tick();const id=window.setInterval(tick,3e4);return()=>window.clearInterval(id);},[timeZone]);return /*#__PURE__*/_jsx(\"span\",{style:{...style,...font,color,whiteSpace:\"nowrap\",fontVariantNumeric:\"tabular-nums\"},children:text||\"\\xa0\"});}addPropertyControls(LocalTime,{timeZone:{type:ControlType.String,title:\"Time Zone\",defaultValue:\"America/New_York\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:12,lineHeight:1.4}},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"var(--token-64b1ba9b-b23e-4cc8-b4df-33e3e2fc17fd)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LocalTime\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LocalTime.map"],"mappings":"+LAIG,SAAwB,EAAU,EAAM,CAAC,GAAK,CAAC,WAAS,MAAM,OAAK,QAAM,SAAO,EAAW,CAAC,EAAK,GAASA,EAAS,EAAE,EAAkR,OAAhR,MAAc,CAAC,IAAI,EAAO,GAAG,CAAC,EAAO,IAAI,KAAK,eAAe,IAAA,GAAU,CAAC,KAAK,UAAU,OAAO,UAAU,UAAQ,CAAC,CAAE,MAAM,CAAC,MAAO,CAAC,IAAM,MAAS,EAAQ,EAAO,OAAO,IAAI,IAAI,CAAC,EAAE,EAAK,EAAE,IAAM,EAAG,EAAO,YAAY,EAAK,GAAG,EAAE,UAAU,EAAO,cAAc,CAAE,CAAE,EAAE,CAAC,CAAQ,CAAC,EAAsB,EAAK,OAAO,CAAC,MAAM,CAAC,GAAG,EAAM,GAAG,EAAK,QAAM,WAAW,SAAS,mBAAmB,cAAc,EAAE,SAAS,GAAM,MAAM,CAAC,CAAE,qBAJ9e,IAAsC,IAAoD,EAIqZ,EAAoB,EAAU,CAAC,SAAS,CAAC,KAAK,EAAY,OAAO,MAAM,YAAY,aAAa,kBAAkB,EAAE,KAAK,CAAC,KAAK,EAAY,KAAK,MAAM,OAAO,SAAS,WAAW,gBAAgB,aAAa,aAAa,CAAC,SAAS,GAAG,WAAW,GAAG,CAAC,EAAE,MAAM,CAAC,KAAK,EAAY,MAAM,MAAM,QAAQ,aAAa,mDAAmD,CAAC,CAAC"}