PageSourceSearch

https://clockety.com/assets/CityDetailPage-DIiRvlzA.js

js clockety.com collected 2026-10-08 02:31:57 UTC 17,798 bytes, 16 lines download raw bytes

1import{j as e}from"./ui-core-YkX9ufhw.js";import{g as N,D as M,C as m,h as d,B as j,j as y,k as v,u as E,L as D,r as L,H as _}from"./index-Dgrh25g1.js";import{L as c,b as P}from"./vendor-router-c2u0I7nJ.js";import{q as H,G as $,c as b,j as p,z as K,D as F,f as G,J as O,K as V,d as R,T as W}from"./vendor-icons-4guMy4-W.js";import{R as q,B as X,X as Y,Y as J,T as Q,b as ee,c as se}from"./vendor-misc-BmNsVLiH.js";import{T as te,a as ae,b as Z,c as C,d as re,e as T}from"./table-Bj748hmT.js";import{r as k}from"./vendor-react-CffrGP6S.js";import"./ui-extended-MmrHYtjS.js";import"./vendor-utils-EL5wpLGY.js";const ne=({city:t})=>{const{t:s}=N();return e.jsxs(e.Fragment,{children:[e.jsxs(c,{to:"/cities",className:"text-primary hover:underline mb-4 inline-block flex items-center",children:[e.jsx(H,{className:"h-4 w-4 mx-1"})," ",s("common.back")||"Back to"," ",s("nav.cities")||"Cities"]}),e.jsxs("div",{className:"flex flex-wrap items-baseline gap-2 mb-4",children:[e.jsx("h1",{className:"text-3xl md:text-4xl font-bold",children:t.name}),e.jsx("span",{className:"text-lg md:text-xl text-muted-foreground",children:t.country})]}),e.jsxs("div",{className:"mb-8",children:[e.jsx(M,{cityName:t.name,timeZone:t.timeZone,size:"lg",className:"mb-4"}),e.jsxs("div",{className:"flex flex-wrap gap-3 mt-4",children:[e.jsxs(c,{to:`/time-zone-converter?from=${t.timeZone}`,className:"text-primary hover:underline flex items-center text-sm",children:[e.jsx($,{className:"h-4 w-4 mr-1"}),s("city.convertTime")||"Convert time from"," ",t.name]}),e.jsxs(c,{to:"/clocks",className:"text-primary hover:underline flex items-center text-sm",children:[e.jsx(b,{className:"h-4 w-4 mr-1"}),s("city.addToClock")||"Add to World Clocks"]}),e.jsxs(c,{to:"/calendar",className:"text-primary hover:underline flex items-center text-sm",children:[e.jsx(p,{className:"h-4 w-4 mr-1"}),s("city.viewHolidays")||"View local holidays"]})]})]})]})},ie=({city:t})=>{const{t:s}=N(),a=o=>new Intl.NumberFormat().format(o);return e.jsx(m,{className:"mb-6",children:e.jsxs(d,{className:"pt-6",children:[e.jsxs("h2",{className:"text-xl font-semibold mb-4",children:[s("city.about")," ",t.name]}),e.jsx("p",{className:"mb-4",children:t.description}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mt-6",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx(K,{className:"h-5 w-5 mr-2 text-muted-foreground"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:s("city.population")}),e.jsx("div",{className:"font-medium",children:a(t.population)})]})]}),e.jsxs("div",{className:"flex items-center",children:[e.jsx($,{className:"h-5 w-5 mr-2 text-muted-foreground"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:s("city.timezone")}),e.jsx("div",{className:"font-medium",children:t.timeZone})]})]}),e.jsxs("div",{className:"flex items-center",children:[e.jsx(p,{className:"h-5 w-5 mr-2 text-muted-foreground"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:s("city.coordinates")}),e.jsxs("div",{className:"font-medium",children:[t.coordinates.lat,", ",t.coordinates.lng]})]})]}),e.jsxs("div",{className:"flex items-center",children:[e.jsx(F,{className:"h-5 w-5 mr-2 text-muted-foreground"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:s("city.country")}),e.jsx("div",{className:"font-medium",children:t.country})]})]})]})]})})},ce=({city:t})=>{const a={sunrise:"06:00 AM",sunset:"06:45 PM",dayLength:"12h 45m",solarNoon:"12:23 PM",solarTimeOffset:"+23 minutes"};return e.jsx(m,{className:"mb-6",children:e.jsxs(d,{className:"pt-6",children:[e.jsxs("h2",{className:"text-xl font-semibold mb-4 flex items-center",children:[e.jsx(G,{className:"mr-2 h-5 w-5"}),"Sunrise, sunset and solar time"]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx(O,{className:"h-5 w-5 mr-2 text-amber-500"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"Sunrise"}),e.jsx("div",{className:"font-medium",children:a.sunrise})]})]}),e.jsxs("div",{className:"flex items-center",children:[e.jsx(V,{className:"h-5 w-5 mr-2 text-amber-500"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"Sunset"}),e.jsx("div",{className:"font-medium",children:a.sunset})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"Day length"}),e.jsx("div",{className:"font-medium",children:a.dayLength})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:"Solar noon"}),e.jsx("div",{className:"font-medium",children:a.solarNoon})]})]}),e.jsxs("p",{className:"text-sm mt-4",children:["The current local time in ",t.name," is ",a.solarTimeOff
1set," of apparent solar time."]})]})})},oe=({city:t})=>{const{t:s}=N(),a=t.landmarks||[];return e.jsx(m,{className:"mb-6",children:e.jsxs(d,{className:"pt-6",children:[e.jsxs("h2",{className:"text-xl font-semibold mb-4 flex items-center",children:[e.jsx(p,{className:"h-5 w-5 mr-2 text-primary"}),s("city.landmarks")]}),e.jsx("ul",{className:"list-disc pl-5 space-y-2",children:a.map((o,n)=>e.jsx("li",{className:"text-base",children:o},n))}),e.jsx("div",{className:"mt-6 pt-4 border-t border-border",children:e.jsxs("p",{className:"text-muted-foreground text-sm",children:[s("city.moreInfo")," ",t.name," ",s("footer.on")," "," ",e.jsx(c,{to:"/calendar",className:"text-primary hover:underline",children:s("footer.worldCalendar")})," ",s("footer.pageOr")," "," ",e.jsx(c,{to:"/cities",className:"text-primary hover:underline",children:s("nav.cities")})," ",s("footer.aroundWorld"),".",s("footer.checkAlso")," ",e.jsx(c,{to:"/timezone-info",className:"text-primary hover:underline",children:s("footer.tzInfo")})," ",s("footer.for")," ",t.country,"."]})})]})})},le=({city:t})=>{const{t:s}=N();return e.jsx(m,{className:"sticky top-24",children:e.jsxs(d,{className:"pt-6",children:[e.jsxs("h2",{className:"text-xl font-semibold mb-4",children:[s("city.moreInfo")," - ",t.name]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(j,{variant:"outline",className:"w-full justify-start",asChild:!0,children:e.jsxs(c,{to:`/time-zone-converter?from=${t.timeZone}`,children:[e.jsx($,{className:"h-4 w-4 mr-2"}),s("city.convertTime")," ",t.name]})}),e.jsx(j,{variant:"outline",className:"w-full justify-start",asChild:!0,children:e.jsxs(c,{to:"/clocks",children:[e.jsx(b,{className:"h-4 w-4 mr-2"}),s("city.addToClock")]})}),e.jsx(j,{variant:"outline",className:"w-full justify-start",asChild:!0,children:e.jsxs(c,{to:"/timezone-info",children:[e.jsx(p,{className:"h-4 w-4 mr-2"}),s("footer.tzInfo")]})}),e.jsx(j,{variant:"outline",className:"w-full justify-start",asChild:!0,children:e.jsxs(c,{to:"/unix-time",children:[e.jsx(b,{className:"h-4 w-4 mr-2"}),s("footer.unixTime")]})}),e.jsx(j,{variant:"outline",className:"w-full justify-start",asChild:!0,children:e.jsxs(c,{to:"/calendar",children:[e.jsx(R,{className:"h-4 w-4 mr-2"}),s("footer.worldCalendar")]})}),e.jsx(j,{variant:"outline",className:"w-full justify-start",asChild:!0,children:e.jsxs(c,{to:"/timers",children:[e.jsx(W,{className:"h-4 w-4 mr-2"}),s("nav.timers")]})})]}),e.jsxs("div",{className:"mt-6 pt-4 border-t border-border",children:[e.jsx("h3",{className:"font-semibold mb-2 text-base",children:s("city.relatedCities")}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(c,{to:"/cities",className:"text-primary hover:underline block",children:s("city.viewAllCities")}),e.jsx(c,{to:"/time-zone-converter",className:"text-primary hover:underline block",children:s("nav.timezones")}),e.jsx(c,{to:"/dst-2025",className:"text-primary hover:underline block",children:s("footer.dst")})]})]})]})})},me=({cityName:t,cityTimeZone:s,comparisons:a})=>{const{t:o}=N(),n=[...a].sort((r,i)=>Math.abs(i.difference)-Math.abs(r.difference)).slice(0,10).map(r=>({name:r.city,difference:r.difference,displayValue:`${r.difference>0?"+":""}${r.difference} ${o("city.hours")}`,barColor:"#ea384c"})),x=Math.min(...n.map(r=>r.difference)),h=Math.max(...n.map(r=>r.difference)),l=2,u=[Math.floor(x)-l,Math.ceil(h)+l],w=Array.from({length:u[1]-u[0]+1},(r,i)=>u[0]+i);return e.jsxs(m,{className:"bg-white mb-6",children:[e.jsx(y,{children:e.jsxs(v,{className:"text-gray-800",children:[o("city.timeDifference"),e.jsxs("div",{className:"text-lg font-normal mt-1 text-gray-600",children:[o("city.from")," ",t]})]})}),e.jsx(d,{children:e.jsx("div",{className:"h-[500px]",children:e.jsx(q,{width:"100%",height:"100%",children:e.jsxs(X,{data:n,layout:"vertical",margin:{top:20,right:150,left:120,bottom:5},children:[e.jsx(Y,{type:"number",domain:u,ticks:w,axisLine:{stroke:"#666"},tickLine:{stroke:"#666"},tick:{fill:"#333"}}),e.jsx(J,{type:"category",dataKey:"name",width:100,axisLine:!1,tickLine:!1,tick:{fill:"#333"}}),e.jsx(Q,{content:({active:r,payload:i})=>{if(r&&i&&i.length){const f=i[0].payload;return e.jsxs("div",{className:"bg-white p-2 rounded shadow border border-gray-200",children:[e.jsx("p",{className:"text-gray-800",children:f.name}),e.jsx("p",{className:"text-gray-600 font-bold",children:f.displayValue})]})}return null}}),e.jsx(ee,{x:0,stroke:"#666",strokeWidth:2}),e.jsx(se,{dataKey:"difference",fill:"#ea384c",radius:[4,4,4,4],name:"Time Difference"}),n.map((r,i)=>e.jsx("g",{children:e.jsx("text",{x:r.difference>=0?750:450,y:45+i*41,textAnchor:r.difference>=0?"start":"end",fill:"#666",fontSize:"12",children:r.displayValue})},`label-${i}`))]})})})})]})},de=({city:t})=>{const{t:s}=N(),a=`https://www.google.com/maps?q=${t.coordinates.lat},${t.coordinates.lng}`,o=`https://maps.google.com/maps?q=${t.coordinates.lat},${t.coordinates.lng}&z=10&output=embed`;return e.jsxs(m,{className:"mb-6",children:[e.jsx(y,{children:e.jsxs(v,{className:"flex items-center gap-2",children:[e.jsx(p,{className:"h-5 w-5"}),t.name," ",s("city.onTheMap")]})}),e.jsx(d,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"relative h-[400px] w-full rounded-lg overflow-hidden border border-border shadow-sm",children:e.jsx("iframe",{title:`${t.name} Map`,width:"100%",height:"100%",style:{border:0},src:o,allowFullScreen:!0,loading:"lazy",referrerPolicy:"no-referrer-when-downgrade"})}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 pt-2",children:[e.jsxs("div",{className:"space-y-2 p-3 bg-muted/50 rounded-lg",children:[e.jsxs("p",{className:"text-sm",children:[e.jsxs("span",{className:"font-semibold text-muted-foreground mr-2",children:[s("city.country"),":"]})," ",t.country]}),e.jsxs("p",{className:"text-sm",children:[e.jsxs("span",{className:"font-semibold text-muted-foreground mr-2",children:[s("city.latitude"),":"]})," ",t.coordinates.lat,"°"]}),e.jsxs("p",{className:"text-sm",children:[e.jsxs("span",{className:"font-semibold text-muted-foreground mr-2",children:[s("city.longitude"),":"]})," ",t.coordinates.lng,"°"]})]}),e.jsxs("div",{className:"space-y-3 flex flex-col justify-center",children:[e.jsxs("p",{className:"text-sm",children:[e.jsxs("span",{className:"font-semibold text-muted-foreground mr-2",children:[s("city.population"),":"]})," ",new Intl.NumberFormat().format(t.population)]}),e.jsx(j,{variant:"outline",className:"w-full h-10 shadow-sm",asChild:!0,children:e.jsxs("a",{href:a,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(p,{className:"h-4 w-4 mr-2"}),s("city.openInGoogleMaps")]})})]})]})]})})]})},xe=({cityName:t,comparisons:s})=>{const{t:a}=N(),o=[...s].sort((n,x)=>Math.abs(x.difference)-Math.abs(n.difference)).slice(0,12);return e.jsxs(m,{className:"mb-6",children:[e.jsx(y,{children:e.jsxs(v,{className:"flex items-center gap-2",children:[e.jsx(b,{className:"h-5 w-5"}),a("city.timeDifference")," ",a("city.from")," ",t]})}),e.jsx(d,{children:e.jsxs(te,{children:[e.jsx(ae,{children:e.jsxs(Z,{children:[e.jsx(C,{children:a("city.name")}
1),e.jsx(C,{children:a("city.difference")}),e.jsx(C,{children:a("city.currentTime")})]})}),e.jsx(re,{children:o.map(n=>{const x=new Date,h=new Date(x.getTime()+n.difference*60*60*1e3);return e.jsxs(Z,{children:[e.jsx(T,{className:"font-medium",children:n.city}),e.jsxs(T,{children:[n.difference>0?"+":"",n.difference," ",a("city.hours")]}),e.jsx(T,{children:h.toLocaleTimeString()})]},n.city)})})]})})]})},he=()=>{const[t,s]=k.useState(null),[a,o]=k.useState(!0),{toast:n}=E();return k.useEffect(()=>{(async()=>{try{const l=await(await fetch("https://ipapi.co/json/")).json();if(l.error)throw new Error("Failed to get location information");s({city:l.city,country:l.country_name,timezone:l.timezone,latitude:l.latitude,longitude:l.longitude})}catch{n({title:"Error",description:"Could not determine your location. Using default timezone.",variant:"destructive"})}finally{o(!1)}})()},[n]),a?e.jsx("div",{className:"container px-4 py-8",children:e.jsx("p",{className:"text-lg",children:"Loading location information..."})}):t?e.jsxs("div",{className:"container px-4 py-8",children:[e.jsx(c,{to:"/cities",className:"text-primary hover:underline mb-4 inline-block",children:"← Back to Cities"}),e.jsx("div",{className:"mb-8",children:e.jsxs("h1",{className:"text-3xl md:text-4xl font-bold",children:[t.city,", ",t.country]})}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[e.jsxs(m,{children:[e.jsx(y,{children:e.jsxs(v,{className:"flex items-center gap-2",children:[e.jsx(b,{className:"h-5 w-5"}),"Current Local Time"]})}),e.jsx(d,{children:e.jsx(M,{cityName:t.city,timeZone:t.timezone,size:"lg"})})]}),e.jsxs(m,{children:[e.jsx(y,{children:e.jsxs(v,{className:"flex items-center gap-2",children:[e.jsx(p,{className:"h-5 w-5"}),"Location Information"]})}),e.jsx(d,{children:e.jsxs("div",{className:"space-y-2",children:[e.jsxs("p",{children:[e.jsx("strong",{children:"City:"})," ",t.city]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Country:"})," ",t.country]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Time Zone:"})," ",t.timezone]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Coordinates:"})," ",t.latitude,"°, ",t.longitude,"°"]})]})})]})]})]}):e.jsxs("div",{className:"container px-4 py-8",children:[e.jsx("h1",{className:"text-3xl font-bold mb-4",children:"Location Not Found"}),e.jsx("p",{className:"mb-4",children:"We couldn't determine your current location."}),e.jsx(c,{to:"/cities",className:"text-primary hover:underline",children:"View all available cities"})]})},Ce=()=>{const{cityId:t}=P(),s=t&&L[t];if(!s)return e.jsx(D,{children:e.jsx(he,{})});const a=Object.entries(L).filter(([r])=>r!==t).slice(0,100).map(([r,i])=>({city:i.name,difference:o(s?.timeZone||"",i.timeZone)}));function o(r,i){try{const f=new Date,g=new Date(f.toLocaleString("en-US",{timeZone:r}));return(new Date(f.toLocaleString("en-US",{timeZone:i})).getTime()-g.getTime())/(1e3*60*60)}catch(f){console.error(`Error calculating time difference between ${r} and ${i}:`,f);try{const g=new Date,z=g.getTime()+g.getTimezoneOffset()*6e4,A={"Africa/Antananarivo":"Indian/Antananarivo","Africa/Asmara":"Africa/Nairobi","Asia/Calcutta":"Asia/Kolkata","America/Buenos_Aires":"America/Argentina/Buenos_Aires","America/Argentina/Buenos_Aires":"America/Sao_Paulo","Asia/Saigon":"Asia/Ho_Chi_Minh","Asia/Katmandu":"Asia/Kathmandu","America/Godthab":"America/Nuuk","America/Cordoba":"America/Argentina/Cordoba","Europe/Kiev":"Europe/Kyiv"},I=A[r]||r,B=A[i]||i,S=new Date,U=new Date(S.toLocaleString("en-US",{timeZone:I}));return(new Date(S.toLocaleString("en-US",{timeZone:B})).getTime()-U.getTime())/(1e3*60*60)}catch(g){return console.error("Fallback method also failed:",g),0}}}const n=new Date,x=n.toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}),h=n.toLocaleTimeString("en-US",{hour:"numeric",minute:"numeric",hour12:!0}),l=`Current Time in ${s.name}, ${s.country} | ${h} Local Time (${s.timeZone})`,u=`Exact current time in ${s.name}, ${s.country} is ${h} on ${x}. Get time zone info (${s.timeZone}), time difference calculator, sunrise/sunset times, and key information about ${s.name}.`,w=`${s.name} time, ${s.name} current time, ${s.country} time zones, ${s.name} clock, ${s.timeZone}, ${s.name} local time, time difference ${s.name}`;return e.jsxs(D,{children:[e.jsxs(_,{children:[e.jsx("title",{children:l}),e.jsx("meta",{name:"description",content:u}),e.jsx("meta",{name:"keywords",content:w}),e.jsx("link",{rel:"canonical",href:`https://clockety.com/cities/${t}`}),e.jsx("meta",{property:"og:title",content:l}),e.jsx("meta",{property:"og:description",content:u}),e.jsx("meta",{property:"og:type",content:"website"}),e.jsx("meta",{property:"og:url",content:`https://clockety.com/cities/${t}`}),e.jsx("script",{type:"application/ld+json",children:`{
2            "@context": "https://schema.org",
3            "@type": "City",
4            "name": "${s.name}",
5            "description": "${s.description||`${s.name} is a city in ${s.country}`}",
6            "address": {
7              "@type": "PostalAddress",
8              "addressCountry": "${s.country}"
9            },
10            "geo": {
11              "@type": "GeoCoordinates",
12              "latitude": ${s.coordinates.lat},
13              "longitude": ${s.coordinates.lng}
14            }
15          }`})]}),e.jsxs("div",{className:"container px-4 py-8",children:[e.jsx(ne,{city:s}
15),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[e.jsxs("div",{className:"lg:col-span-2",children:[e.jsx(ie,{city:s}),e.jsx(ce,{city:s}),e.jsx(me,{cityName:s.name,cityTimeZone:s.timeZone,comparisons:a}),e.jsx(xe,{cityName:s.name,comparisons:a}),e.jsx(de,{city:s}),e.jsx(oe,{city:s})]}),e.jsx("div",{children:e.jsx(le,{city:s})})]})]})]})};export{Ce as default};
16//# sourceMappingURL=CityDetailPage-DIiRvlzA.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.