{"version":3,"file":"TimeAndDate.fUGkm_M8.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/h9HlIIIJy3XaoFAso1db/EWNqENEDqh9hheV2HaSA/TimeAndDate.js"],"sourcesContent":["// Time and date component with customizable format and timezone support\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function TimeAndDate(props){const{showDate=true,showTime=true,dateFormat=\"long\",timeFormat=\"12h\",showSeconds=true,showYear=true,timezone=\"local\",textColor=\"#000000\",font,style}=props;const[currentTime,setCurrentTime]=useState(new Date);useEffect(()=>{if(typeof window===\"undefined\")return;const interval=setInterval(()=>{startTransition(()=>{setCurrentTime(new Date);});},showSeconds?1e3:6e4);return()=>clearInterval(interval);},[showSeconds]);const formatDate=date=>{const options={timeZone:timezone===\"local\"?undefined:timezone};if(dateFormat===\"short\"){options.month=\"short\";options.day=\"numeric\";if(showYear)options.year=\"numeric\";}else if(dateFormat===\"long\"){options.weekday=\"long\";options.month=\"long\";options.day=\"numeric\";if(showYear)options.year=\"numeric\";}else{options.month=\"2-digit\";options.day=\"2-digit\";if(showYear)options.year=\"numeric\";}return date.toLocaleDateString(undefined,options);};const formatTime=date=>{const options={hour:\"2-digit\",minute:\"2-digit\",hour12:timeFormat===\"12h\",timeZone:timezone===\"local\"?undefined:timezone};if(showSeconds){options.second=\"2-digit\";}return date.toLocaleTimeString(undefined,options);};const dateString=showDate?formatDate(currentTime):\"\";const timeString=showTime?formatTime(currentTime):\"\";return /*#__PURE__*/_jsxs(\"div\",{style:{...style,display:\"inline-flex\",flexDirection:\"row\",alignItems:\"center\",justifyContent:\"center\",borderRadius:8,gap:5,minWidth:\"max-content\"},children:[showDate&&/*#__PURE__*/_jsxs(\"div\",{style:{color:textColor,...font,whiteSpace:\"nowrap\"},children:[dateString,!showYear&&\",\"]}),showTime&&/*#__PURE__*/_jsx(\"div\",{style:{color:textColor,...font,whiteSpace:\"nowrap\"},children:timeString})]});}addPropertyControls(TimeAndDate,{showDate:{type:ControlType.Boolean,title:\"Show Date\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},showTime:{type:ControlType.Boolean,title:\"Show Time\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\"},dateFormat:{type:ControlType.Enum,title:\"Date Format\",options:[\"short\",\"long\",\"numeric\"],optionTitles:[\"Short\",\"Long\",\"Numeric\"],defaultValue:\"long\",displaySegmentedControl:true,hidden:({showDate})=>!showDate},showYear:{type:ControlType.Boolean,title:\"Show Year\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\",hidden:({showDate})=>!showDate},timeFormat:{type:ControlType.Enum,title:\"Time Format\",options:[\"12h\",\"24h\"],optionTitles:[\"12 Hour\",\"24 Hour\"],defaultValue:\"12h\",displaySegmentedControl:true,hidden:({showTime})=>!showTime},showSeconds:{type:ControlType.Boolean,title:\"Show Seconds\",defaultValue:true,enabledTitle:\"Show\",disabledTitle:\"Hide\",hidden:({showTime})=>!showTime},timezone:{type:ControlType.Enum,title:\"Timezone\",options:[\"local\",\"Africa/Abidjan\",\"Africa/Accra\",\"Africa/Addis_Ababa\",\"Africa/Algiers\",\"Africa/Bamako\",\"Africa/Cairo\",\"Africa/Casablanca\",\"Africa/Conakry\",\"Africa/Dakar\",\"Africa/Dar_es_Salaam\",\"Africa/Gaborone\",\"Africa/Harare\",\"Africa/Johannesburg\",\"Africa/Kampala\",\"Africa/Khartoum\",\"Africa/Kigali\",\"Africa/Lagos\",\"Africa/Lusaka\",\"Africa/Maputo\",\"Africa/Monrovia\",\"Africa/Nairobi\",\"Africa/Tripoli\",\"Africa/Tunis\",\"Africa/Windhoek\",\"America/Anchorage\",\"America/Asuncion\",\"America/Barbados\",\"America/Belize\",\"America/Bermuda\",\"America/Bogota\",\"America/Buenos_Aires\",\"America/Caracas\",\"America/Chicago\",\"America/Costa_Rica\",\"America/Cuiaba\",\"America/Denver\",\"America/Detroit\",\"America/Edmonton\",\"America/Fortaleza\",\"America/Godthab\",\"America/Guayaquil\",\"America/Guatemala\",\"America/Halifax\",\"America/Havana\",\"America/Juneau\",\"America/Kingston\",\"America/La_Paz\",\"America/Lima\",\"America/Los_Angeles\",\"America/Managua\",\"America/Manaus\",\"America/Mexico_City\",\"America/Montevideo\",\"America/Montreal\",\"America/Nassau\",\"America/New_York\",\"America/Panama\",\"America/Phoenix\",\"America/Port_of_Spain\",\"America/Recife\",\"America/Regina\",\"America/Rio_Branco\",\"America/San_Salvador\",\"America/Santiago\",\"America/Santo_Domingo\",\"America/Sao_Paulo\",\"America/St_Johns\",\"America/Tegucigalpa\",\"America/Toronto\",\"America/Vancouver\",\"America/Winnipeg\",\"Asia/Almaty\",\"Asia/Amman\",\"Asia/Ashgabat\",\"Asia/Baghdad\",\"Asia/Bahrain\",\"Asia/Baku\",\"Asia/Bangkok\",\"Asia/Beijing\",\"Asia/Beirut\",\"Asia/Bishkek\",\"Asia/Brunei\",\"Asia/Chongqing\",\"Asia/Colombo\",\"Asia/Damascus\",\"Asia/Dhaka\",\"Asia/Dubai\",\"Asia/Dushanbe\",\"Asia/Ho_Chi_Minh\",\"Asia/Hong_Kong\",\"Asia/Irkutsk\",\"Asia/Jakarta\",\"Asia/Jerusalem\",\"Asia/Kabul\",\"Asia/Kamchatka\",\"Asia/Karachi\",\"Asia/Kathmandu\",\"Asia/Kolkata\",\"Asia/Kuala_Lumpur\",\"Asia/Kuwait\",\"Asia/Macau\",\"Asia/Magadan\",\"Asia/Makassar\",\"Asia/Manila\",\"Asia/Muscat\",\"Asia/Nicosia\",\"Asia/Phnom_Penh\",\"Asia/Pyongyang\",\"Asia/Qatar\",\"Asia/Riyadh\",\"Asia/Seoul\",\"Asia/Shanghai\",\"Asia/Singapore\",\"Asia/Taipei\",\"Asia/Tashkent\",\"Asia/Tbilisi\",\"Asia/Tehran\",\"Asia/Tokyo\",\"Asia/Ulaanbaatar\",\"Asia/Vientiane\",\"Asia/Vladivostok\",\"Asia/Yakutsk\",\"Asia/Yangon\",\"Asia/Yerevan\",\"Atlantic/Azores\",\"Atlantic/Canary\",\"Atlantic/Cape_Verde\",\"Atlantic/Madeira\",\"Atlantic/Reykjavik\",\"Australia/Adelaide\",\"Australia/Brisbane\",\"Australia/Canberra\",\"Australia/Darwin\",\"Australia/Hobart\",\"Australia/Melbourne\",\"Australia/Perth\",\"Australia/Sydney\",\"Europe/Amsterdam\",\"Europe/Andorra\",\"Europe/Athens\",\"Europe/Belgrade\",\"Europe/Berlin\",\"Europe/Bratislava\",\"Europe/Brussels\",\"Europe/Bucharest\",\"Europe/Budapest\",\"Europe/Chisinau\",\"Europe/Copenhagen\",\"Europe/Dublin\",\"Europe/Gibraltar\",\"Europe/Helsinki\",\"Europe/Istanbul\",\"Europe/Kiev\",\"Europe/Lisbon\",\"Europe/Ljubljana\",\"Europe/London\",\"Europe/Luxembourg\",\"Europe/Madrid\",\"Europe/Malta\",\"Europe/Minsk\",\"Europe/Monaco\",\"Europe/Moscow\",\"Europe/Oslo\",\"Europe/Paris\",\"Europe/Podgorica\",\"Europe/Prague\",\"Europe/Riga\",\"Europe/Rome\",\"Europe/Samara\",\"Europe/San_Marino\",\"Europe/Sarajevo\",\"Europe/Skopje\",\"Europe/Sofia\",\"Europe/Stockholm\",\"Europe/Tallinn\",\"Europe/Tirane\",\"Europe/Vatican\",\"Europe/Vienna\",\"Europe/Vilnius\",\"Europe/Warsaw\",\"Europe/Zagreb\",\"Europe/Zurich\",\"Indian/Maldives\",\"Indian/Mauritius\",\"Indian/Seychelles\",\"Pacific/Apia\",\"Pacific/Auckland\",\"Pacific/Chatham\",\"Pacific/Fiji\",\"Pacific/Guam\",\"Pacific/Honolulu\",\"Pacific/Kiritimati\",\"Pacific/Majuro\",\"Pacific/Noumea\",\"Pacific/Pago_Pago\",\"Pacific/Port_Moresby\",\"Pacific/Tahiti\",\"Pacific/Tongatapu\"],optionTitles:[\"Local\",\"Abidjan\",\"Accra\",\"Addis Ababa\",\"Algiers\",\"Almaty\",\"Amman\",\"Amsterdam\",\"Anchorage\",\"Andorra\",\"Apia\",\"Ashgabat\",\"Asunci\\xf3n\",\"Athens\",\"Auckland\",\"Azores\",\"Baghdad\",\"Baku\",\"Bamako\",\"Bandar Seri Begawan\",\"Bangkok\",\"Beijing\",\"Beirut\",\"Belgrade\",\"Belize City\",\"Berlin\",\"Bermuda\",\"Bishkek\",\"Bogot\\xe1\",\"Bratislava\",\"Bridgetown\",\"Brisbane\",\"Brussels\",\"Bucharest\",\"Budapest\",\"Buenos Aires\",\"Cairo\",\"Canberra\",\"Canary Islands\",\"Cape Verde\",\"Caracas\",\"Casablanca\",\"Chatham Islands\",\"Chicago (CST)\",\"Chișinău\",\"Chongqing\",\"Colombo\",\"Conakry\",\"Copenhagen\",\"Cuiab\\xe1\",\"Dakar\",\"Damascus\",\"Dar es Salaam\",\"Darwin\",\"Denver (MST)\",\"Detroit\",\"Dhaka\",\"Doha\",\"Dubai\",\"Dublin\",\"Dushanbe\",\"Edmonton\",\"Fiji\",\"Fortaleza\",\"Gaborone\",\"Gibraltar\",\"Guam\",\"Guayaquil\",\"Guatemala City\",\"Halifax\",\"Harare\",\"Havana\",\"Helsinki\",\"Ho Chi Minh City\",\"Hobart\",\"Hong Kong\",\"Honolulu\",\"Irkutsk\",\"Istanbul\",\"Jakarta\",\"Jerusalem\",\"Johannesburg\",\"Juneau\",\"Kabul\",\"Kamchatka\",\"Kampala\",\"Karachi\",\"Kathmandu\",\"Khartoum\",\"Kigali\",\"Kingston\",\"Kiritimati\",\"Kuala Lumpur\",\"Kuwait City\",\"Kyiv\",\"La Paz\",\"Lagos\",\"Lima\",\"Lisbon\",\"Ljubljana\",\"London (GMT)\",\"Los Angeles (PST)\",\"Lusaka\",\"Luxembourg\",\"Macau\",\"Madeira\",\"Madrid\",\"Magadan\",\"Majuro\",\"Makassar\",\"Maldives\",\"Malta\",\"Manama\",\"Managua\",\"Manaus\",\"Manila\",\"Maputo\",\"Mauritius\",\"Melbourne\",\"Mexico City\",\"Minsk\",\"Monaco\",\"Monrovia\",\"Montevideo\",\"Montreal\",\"Moscow\",\"Mumbai\",\"Muscat\",\"Nairobi\",\"Nassau\",\"New York (EST)\",\"Nicosia\",\"Noum\\xe9a\",\"Nuku'alofa\",\"Nuuk\",\"Oslo\",\"Pago Pago\",\"Panama City\",\"Paris (CET)\",\"Perth\",\"Phnom Penh\",\"Phoenix\",\"Podgorica\",\"Port Moresby\",\"Port of Spain\",\"Prague\",\"Pyongyang\",\"Recife\",\"Regina\",\"Reykjavik\",\"Riga\",\"Rio Branco\",\"Riyadh\",\"Rome\",\"Samara\",\"San Jos\\xe9\",\"San Marino\",\"San Salvador\",\"Santiago\",\"Santo Domingo\",\"S\\xe3o Paulo\",\"Sarajevo\",\"Seoul\",\"Seychelles\",\"Shanghai (CST)\",\"Singapore\",\"Skopje\",\"Sofia\",\"St. John's\",\"Stockholm\",\"Sydney (AEDT)\",\"Tahiti\",\"Taipei\",\"Tallinn\",\"Tashkent\",\"Tbilisi\",\"Tegucigalpa\",\"Tehran\",\"Tirana\",\"Tokyo (JST)\",\"Toronto\",\"Tripoli\",\"Tunis\",\"Ulaanbaatar\",\"Vancouver\",\"Vatican City\",\"Vientiane\",\"Vienna\",\"Vilnius\",\"Vladivostok\",\"Warsaw\",\"Windhoek\",\"Winnipeg\",\"Yakutsk\",\"Yangon\",\"Yerevan\",\"Zagreb\",\"Zurich\"],defaultValue:\"local\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"TimeAndDate\",\"slots\":[],\"annotations\":{\"framerS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