{"version":3,"file":"TimeDisplay.Bj0zitaa.mjs","names":["_Fragment","useState"],"sources":["https:/framerusercontent.com/modules/9ajhXMTvNHa3o84QkAph/PajmEC9KX2YkEmLmmwER/StopScroll_Prod.js","https:/framerusercontent.com/modules/sSrUJ5clx5Qt2pRUGVvB/fxMhCgPD3oExCK8aSwCS/TimeDisplay.js"],"sourcesContent":["import{jsx as _jsx,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerDisableUnlink\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function StopScroll(props){const{toggle}=props;return toggle?/*#__PURE__*/_jsx(\"style\",{\"data-frameruni-stop-scroll\":true,children:`body { overflow: hidden !important; }`}):/*#__PURE__*/_jsx(_Fragment,{});}StopScroll.displayName=\"Stop Scroll\";addPropertyControls(StopScroll,{toggle:{type:ControlType.Boolean,title:\"Block Scroll\",description:\"More components at [Framer University](https://frameruni.link/cc).\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StopScroll\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"*\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StopScroll_Prod.map","// Text override that displays the current time, with a toggle to switch between local time and a user-selected location\nimport{jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * TimeDisplay\n *\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 40\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function TimeDisplay(props){const{useCustomLocation,location,customLocation,font,fontSize,color,style}=props;const[time,setTime]=useState(\"\");// List of supported IANA time zones for dropdown\nconst supportedTimeZones=[\"Europe/London\",\"America/New_York\",\"America/Los_Angeles\",\"Europe/Paris\",\"Asia/Tokyo\",\"Australia/Sydney\",\"Asia/Kolkata\",\"Europe/Berlin\",\"America/Chicago\",\"America/Sao_Paulo\",\"Africa/Johannesburg\",\"Pacific/Auckland\"];useEffect(()=>{if(typeof window===\"undefined\")return;let timer;function updateTime(){if(useCustomLocation){if(location===\"Custom\"){startTransition(()=>setTime(\"Custom not supported\"));return;}try{const now=new Date;const formatted=new Intl.DateTimeFormat(undefined,{hour:\"2-digit\",minute:\"2-digit\",second:\"2-digit\",hour12:false,timeZone:location}).format(now);startTransition(()=>setTime(formatted));}catch{startTransition(()=>setTime(\"Invalid location\"));}}else{const now=new Date;startTransition(()=>setTime(now.toLocaleTimeString()));}}updateTime();timer=window.setInterval(updateTime,1e3);return()=>clearInterval(timer);},[useCustomLocation,location]);// Map location to city label\nconst cityLabels={\"Europe/London\":\"LON\",\"America/New_York\":\"NY\",\"America/Los_Angeles\":\"LA\",\"Europe/Paris\":\"PAR\",\"Asia/Tokyo\":\"TYO\",\"Australia/Sydney\":\"SYD\",\"Asia/Kolkata\":\"CCU\",\"Europe/Berlin\":\"BER\",\"America/Chicago\":\"CHI\",\"America/Sao_Paulo\":\"SAO\",\"Africa/Johannesburg\":\"JNB\",\"Pacific/Auckland\":\"AKL\"};let cityLabel=\"\";if(useCustomLocation){if(location===\"Custom\"){cityLabel=customLocation||\"Custom\";}else{cityLabel=cityLabels[location]||location;}}return /*#__PURE__*/_jsxs(\"span\",{style:{...font,fontSize:`${fontSize}px`,color,...style,width:\"max-content\",minWidth:\"max-content\",display:\"inline-block\"},children:[time,\" \",useCustomLocation?cityLabel:\"\"]});}addPropertyControls(TimeDisplay,{useCustomLocation:{type:ControlType.Boolean,title:\"Custom Location\",defaultValue:false,enabledTitle:\"On\",disabledTitle:\"Local\"},location:{type:ControlType.Enum,title:\"Location\",options:[\"Europe/London\",\"America/New_York\",\"America/Los_Angeles\",\"Europe/Paris\",\"Asia/Tokyo\",\"Australia/Sydney\",\"Asia/Kolkata\",\"Europe/Berlin\",\"America/Chicago\",\"America/Sao_Paulo\",\"Africa/Johannesburg\",\"Pacific/Auckland\",\"Custom\"],optionTitles:[\"London\",\"New York\",\"Los Angeles\",\"Paris\",\"Tokyo\",\"Sydney\",\"Kolkata\",\"Berlin\",\"Chicago\",\"Sao Paulo\",\"Johannesburg\",\"Auckland\",\"Custom...\"],defaultValue:\"Europe/London\",hidden:({useCustomLocation})=>!useCustomLocation},customLocation:{type:ControlType.String,title:\"Custom Location\",placeholder:\"e.g. Europe/Lisbon\",defaultValue:\"Europe/Lisbon\",hidden:({useCustomLocation,location})=>!useCustomLocation||location!==\"Custom\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"13px\",variant:\"Semibold\",letterSpacing:\"-0.03em\",lineHeight:\"1em\"}},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:13,min:8,max:72,step:1,unit:\"px\"},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"#000000\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TimeDisplay\",\"slots\":[],\"annotations\":{\"framerIntrinsicWidth\":\"200\",\"framerIntrinsicHeight\":\"40\",\"framerSupportedLayoutWidth\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TimeDisplay.map"],"mappings":"oNAKG,SAAwB,EAAW,EAAM,CAAC,GAAK,CAAC,UAAQ,EAAM,OAAO,EAAoB,EAAK,QAAQ,CAAC,6BAA6B,GAAK,SAAS,wCAAwC,CAAC,CAAc,EAAKA,EAAU,EAAE,CAAC,kBAL7J,IAAoD,CAK2G,EAAW,YAAY,cAAc,EAAoB,EAAW,CAAC,OAAO,CAAC,KAAK,EAAY,QAAQ,MAAM,eAAe,YAAY,qEAAqE,CAAC,CAAC,ICG3a,SAAwB,EA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