1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[865],{50673:function(e,a,n){n.d(a,{x:function(){return d}});var o=n(3011),t=n(95812),r=n(53230);let c=(0,o.U)(e=>({isSettingsOpen:!1,setSettingsOpen:a=>e({isSettingsOpen:a}),toggleSettings:()=>e(e=>({isSettingsOpen:!e.isSettingsOpen})),viewTab:"modern",setViewTab:a=>e({viewTab:a}),calendarViewMode:"list",setCalendarViewMode:a=>e({calendarViewMode:a}),selectedDay:null,setSelectedDay:a=>e({selectedDay:a})}));function d(e){var a;let n=(0,t.P)(e=>e.location),o=(0,t.P)(e=>e.method),d=null!==(a=(0,t.P)(e=>e.fiqhJafria))&&void 0!==a&&a,s=(0,t.P)(e=>e.timeAdjustments),i=(0,t.P)(e=>e.hasHydrated),l=(0,t.P)(e=>e.setLocation),m=(0,t.P)(e=>e.setMethod),u=(0,t.P)(e=>e.setFiqhJafria),h=(0,t.P)(e=>e.setTimeAdjustment),x=(0,t.P)(e=>e.resetTimeAdjustments),g=(0,t.P)(e=>e.resetSettings),p=(0,t.P)(e=>e.setHasHydrated),b=(0,r.h)(e=>e.hijriAdjustment),f=(0,r.h)(e=>e.setHijriAdjustment),y=c(e=>e.isSettingsOpen),N=c(e=>e.setSettingsOpen),j=c(e=>e.toggleSettings),v=c(e=>e.viewTab),S=c(e=>e.setViewTab),C=c(e=>e.calendarViewMode);return e({location:n,method:o,fiqhJafria:d,adjustments:s,hijriAdjustment:b,hasHydrated:i,isSettingsOpen:y,setSettingsOpen:N,toggleSettings:j,setLocation:l,setMethod:m,setFiqhJafria:u,setHijriAdjustment:f,setAdjustment:h,resetAdjustments:x,resetSettings:g,setHasHydrated:p,viewTab:v,setViewTab:S,calendarViewMode:C,setCalendarViewMode:c(e=>e.setCalendarViewMode),selectedDay:c(e=>e.selectedDay),setSelectedDay:c(e=>e.setSelectedDay)})}},34060:function(e,a,n){n.d(a,{o:function(){return o}});let o=[{code:"AF",name:"Afghanistan"},{code:"AX",name:"Aland Islands"},{code:"AL",name:"Albania"},{code:"DZ",name:"Algeria"},{code:"AS",name:"American Samoa"},{code:"AD",name:"Andorra"},{code:"AO",name:"Angola"},{code:"AI",name:"Anguilla"},{code:"AQ",name:"Antarctica"},{code:"AG",name:"Antigua and Barbuda"},{code:"AR",name:"Argentina"},{code:"AM",name:"Armenia"},{code:"AW",name:"Aruba"},{code:"AC",name:"Ascension Island"},{code:"AU",name:"Australia"},{code:"AT",name:"Austria"},{code:"AZ",name:"Azerbaijan"},{code:"BS",name:"Bahamas"},{code:"BH",name:"Bahrain"},{code:"BD",name:"Bangladesh"},{code:"BB",name:"Barbados"},{code:"BY",name:"Belarus"},{code:"BE",name:"Belgium"},{code:"BZ",name:"Belize"},{code:"BJ",name:"Benin"},{code:"BM",name:"Bermuda"},{code:"BT",name:"Bhutan"},{code:"BO",name:"Bolivia"},{code:"BQ",name:"Bonaire, Sint Eustatius and Saba"},{code:"BA",name:"Bosnia and Herzegovina"},{code:"BW",name:"Botswana"},{code:"BV",name:"Bouvet Island"},{code:"BR",name:"Brazil"},{code:"IO",name:"British Indian Ocean Territory"},{code:"VG",name:"British Virgin Islands"},{code:"BN",name:"Brunei Darussalam"},{code:"BG",name:"Bulgaria"},{code:"BF",name:"Burkina Faso"},{code:"BU",name:"Burma"},{code:"BI",name:"Burundi"},{code:"CV",name:"Cabo Verde"},{code:"KH",name:"Cambodia"},{code:"CM",name:"Cameroon"},{code:"CA",name:"Canada"},{code:"IC",name:"Canary Islands"},{code:"KY",name:"Cayman Islands"},{code:"CF",name:"Central African Republic"},{code:"EA",name:"Ceuta, Melilla"},{code:"TD",name:"Chad"},{code:"CL",name:"Chile"},{code:"CN",name:"China"},{code:"CX",name:"Christmas Island"},{code:"CP",name:"Clipperton Island"},{code:"CC",name:"Cocos (Keeling) Islands"},{code:"CO",name:"Colombia"},{code:"KM",name:"Comoros"},{code:"CG",name:"Congo"},{code:"CK",name:"Cook Islands"},{code:"CR",name:"Costa Rica"},{code:"CI",name:"Cote d'Ivoire"},{code:"HR",name:"Croatia"},{code:"CU",name:"Cuba"},{code:"CW",name:"Curacao"},{code:"CY",name:"Cyprus"},{code:"CZ",name:"Czechia"},{code:"KP",name:"Democratic People's Republic of Korea"},{code:"YD",name:"Democratic Yemen"},{code:"DK",name:"Denmark"},{code:"DG",name:"Diego Garcia"},{code:"DJ",name:"Djibouti"},{code:"DM",name:"Dominica"},{code:"DO",name:"Dominican Republic"},{code:"TP",name:"East Timor"},{code:"EC",name:"Ecuador"},{code:"EG",name:"Egypt"},{code:"SV",name:"El Salvador"},{code:"GQ",name:"Equatorial Guinea"},{code:"ER",name:"Eritrea"},{code:"EE",name:"Estonia"},{code:"SZ",name:"Eswatini"},{code:"ET",name:"Ethiopia"},{code:"EU",name:"European Union"},{code:"EZ",name:"Eurozone"},{code:"FK",name:"Falkland Islands (Malvinas)"},{code:"FO",name:"Faroe Islands"},{code:"FM",name:"Federated States of Micronesia"},{code:"FJ",name:"Fiji"},{code:"FI",name:"Finland"},{code:"FR",name:"France"},{code:"GF",name:"French Guiana"},{code:"PF",name:"French Polynesia"},{code:"TF",name:"French Southern Territories"},{code:"GA",name:"Gabon"},{code:"GM",name:"Gambia"},{code:"GE",name:"Georgia"},{code:"DD",name:"German Democratic Republic"},{code:"DE",name:"Germany"},{code:"GH",name:"Ghana"},{code:"GI",name:"Gibraltar"},{code:"GR",name:"Greece"},{code:"GL",name:"Greenland"},{code:"GD",name:"Grenada"},{code:"GP",name:"Guadeloupe"},{code:"GU",name:"Guam"},{code:"GT",name:"Guatemala"}
1,{code:"GG",name:"Guernsey"},{code:"GN",name:"Guinea"},{code:"GW",name:"Guinea-Bissau"},{code:"GY",name:"Guyana"},{code:"HT",name:"Haiti"},{code:"HM",name:"Heard Island and McDonald Islands"},{code:"VA",name:"Holy See (Vatican City State)"},{code:"HN",name:"Honduras"},{code:"HK",name:"Hong Kong"},{code:"HU",name:"Hungary"},{code:"IS",name:"Iceland"},{code:"IN",name:"India"},{code:"ID",name:"Indonesia"},{code:"IQ",name:"Iraq"},{code:"IE",name:"Ireland"},{code:"IR",name:"Islamic Republic of Iran"},{code:"IM",name:"Isle of Man"},{code:"IL",name:"Israel"},{code:"IT",name:"Italy"},{code:"JM",name:"Jamaica"},{code:"JP",name:"Japan"},{code:"JE",name:"Jersey"},{code:"JO",name:"Jordan"},{code:"KZ",name:"Kazakhstan"},{code:"KE",name:"Kenya"},{code:"KI",name:"Kiribati"},{code:"KW",name:"Kuwait"},{code:"KG",name:"Kyrgyzstan"},{code:"LA",name:"Lao People's Democratic Republic"},{code:"LV",name:"Latvia"},{code:"LB",name:"Lebanon"},{code:"LS",name:"Lesotho"},{code:"LR",name:"Liberia"},{code:"LY",name:"Libya"},{code:"LI",name:"Liechtenstein"},{code:"LT",name:"Lithuania"},{code:"LU",name:"Luxembourg"},{code:"MO",name:"Macao"},{code:"MG",name:"Madagascar"},{code:"MW",name:"Malawi"},{code:"MY",name:"Malaysia"},{code:"MV",name:"Maldives"},{code:"ML",name:"Mali"},{code:"MT",name:"Malta"},{code:"MH",name:"Marshall Islands"},{code:"MQ",name:"Martinique"},{code:"MR",name:"Mauritania"},{code:"MU",name:"Mauritius"},{code:"YT",name:"Mayotte"},{code:"FX",name:"Metropolitan France"},{code:"MX",name:"Mexico"},{code:"MD",name:"Moldova"},{code:"MC",name:"Monaco"},{code:"MN",name:"Mongolia"},{code:"ME",name:"Montenegro"},{code:"MS",name:"Montserrat"},{code:"MA",name:"Morocco"},{code:"MZ",name:"Mozambique"},{code:"MM",name:"Myanmar"},{code:"NA",name:"Namibia"},{code:"NR",name:"Nauru"},{code:"NP",name:"Nepal"},{code:"NL",name:"Netherlands"},{code:"AN",name:"Netherlands Antilles"},{code:"NT",name:"Neutral Zone"},{code:"NC",name:"New Caledonia"},{code:"NZ",name:"New Zealand"},{code:"NI",name:"Nicaragua"},{code:"NE",name:"Niger"},{code:"NG",name:"Nigeria"},{code:"NU",name:"Niue"},{code:"NF",name:"Norfolk Island"},{code:"MK",name:"North Macedonia"},{code:"MP",name:"Northern Mariana Islands"},{code:"NO",name:"Norway"},{code:"OM",name:"Oman"},{code:"PK",name:"Pakistan"},{code:"PW",name:"Palau"},{code:"PA",name:"Panama"},{code:"PG",name:"Papua New Guinea"},{code:"PY",name:"Paraguay"},{code:"PE",name:"Peru"},{code:"PH",name:"Philippines"},{code:"PN",name:"Pitcairn"},{code:"PL",name:"Poland"},{code:"PT",name:"Portugal"},{code:"PR",name:"Puerto Rico"},{code:"QA",name:"Qatar"},{code:"KR",name:"Republic of Korea"},{code:"RE",name:"Reunion"},{code:"RO",name:"Romania"},{code:"RU",name:"Russian Federation"},{code:"RW",name:"Rwanda"},{code:"BL",name:"Saint Barthelemy"},{code:"SH",name:"Saint Helena, Ascension and Tristan da Cunha"},{code:"KN",name:"Saint Kitts and Nevis"},{code:"LC",name:"Saint Lucia"},{code:"MF",name:"Saint Martin (French part)"},{code:"PM",name:"Saint Pierre and Miquelon"},{code:"VC",name:"Saint Vincent and the Grenadines"},{code:"WS",name:"Samoa"},{code:"SM",name:"San Marino"},{code:"ST",name:"Sao Tome and Principe"},{code:"CQ",name:"Sark"},{code:"SA",name:"Saudi Arabia"},{code:"SN",name:"Senegal"},{code:"RS",name:"Serbia"},{code:"CS",name:"Serbia and Montenegro"},{code:"SC",name:"Seychelles"},{code:"SL",name:"Sierra Leone"},{code:"SG",name:"Singapore"},{code:"SX",name:"Sint Maarten (Dutch part)"},{code:"SK",name:"Slovakia"},{code:"SI",name:"Slovenia"},{code:"SB",name:"Solomon Islands"},{code:"SO",name:"Somalia"},{code:"ZA",name:"South Africa"},{code:"GS",name:"South Georgia and the South Sandwich Islands"},{code:"SS",name:"South Sudan"},{code:"ES",name:"Spain"},{code:"LK",name:"Sri Lanka"},{code:"PS",name:"State of Palestine"},{code:"SD",name:"Sudan"},{code:"SR",name:"Suriname"},{code:"SJ",name:"Svalbard and Jan Mayen"},{code:"SE",name:"Sweden"},{code:"CH",name:"Switzerland"},{code:"SY",name:"Syrian Arab Republic"},{code:"TW",name:"Taiwan, Province of China"},{code:"TJ",name:"Tajikistan"},{code:"TH",name:"Thailand"},{code:"CD",name:"The Democratic Republic of the Congo"},{code:"TL",name:"Timor-Leste"},{code:"TG",name:"Togo"},{code:"TK",name:"Tokelau"}
1,{code:"TO",name:"Tonga"},{code:"TT",name:"Trinidad and Tobago"},{code:"TA",name:"Tristan da Cunha"},{code:"TN",name:"Tunisia"},{code:"TR",name:"Turkiye"},{code:"TM",name:"Turkmenistan"},{code:"TC",name:"Turks and Caicos Islands"},{code:"TV",name:"Tuvalu"},{code:"VI",name:"U.S. Virgin Islands"},{code:"UG",name:"Uganda"},{code:"UA",name:"Ukraine"},{code:"SU",name:"Union of Soviet Socialist Republics"},{code:"AE",name:"United Arab Emirates"},{code:"GB",name:"United Kingdom"},{code:"UN",name:"United Nations"},{code:"TZ",name:"United Republic of Tanzania"},{code:"US",name:"United States"},{code:"UM",name:"United States Minor Outlying Islands"},{code:"UY",name:"Uruguay"},{code:"UZ",name:"Uzbekistan"},{code:"VU",name:"Vanuatu"},{code:"VE",name:"Venezuela"},{code:"VN",name:"Viet Nam"},{code:"WF",name:"Wallis and Futuna"},{code:"EH",name:"Western Sahara"},{code:"YE",name:"Yemen"},{code:"YU",name:"Yugoslavia"},{code:"ZR",name:"Zaire"},{code:"ZM",name:"Zambia"},{code:"ZW",name:"Zimbabwe"}]},6114:function(e,a,n){n.d(a,{U:function(){return L}});var o=n(57437),t=n(2265),r=n(42586),c=n(51817),d=n(77877),s=n(29202),i=n(40875),l=n(73247),m=n(32489),u=n(83774),h=n(10407),x=n(52062),g=n.n(x),p=n(34060);let b=[{name:"Makkah",nameLocal:"Ù
ÙØ© اÙÙ
ÙØ±Ù
Ø©",country:"SA",lat:21.4225,lon:39.8262},{name:"Madinah",nameLocal:"اÙÙ
دÙÙØ© اÙÙ
ÙÙØ±Ø©",country:"SA",lat:24.5247,lon:39.5692},{name:"Jerusalem",nameLocal:"اÙÙØ¯Ø³",country:"PS",lat:31.7683,lon:35.2137},{name:"Istanbul",nameLocal:"İstanbul",country:"TR",lat:41.0082,lon:28.9784},{name:"Cairo",nameLocal:"اÙÙØ§Ùرة",country:"EG",lat:30.0444,lon:31.2357},{name:"Dubai",nameLocal:"دبÙ",country:"AE",lat:25.2048,lon:55.2708},{name:"Lahore",nameLocal:"ÙØ§ÛÙØ±",country:"PK",lat:31.5204,lon:74.3587},{name:"Karachi",nameLocal:"کراÚÛ",country:"PK",lat:24.8607,lon:67.0011},{name:"Jakarta",nameLocal:"Jakarta",country:"ID",lat:-6.2088,lon:106.8456},{name:"Kuala Lumpur",nameLocal:"Kuala Lumpur",country:"MY",lat:3.139,lon:101.6869},{name:"London",nameLocal:"London",country:"GB",lat:51.5074,lon:-.1278},{name:"New York",nameLocal:"New York",country:"US",lat:40.7128,lon:-74.006}],f="isl.am.geo.cache.v2",y="isl.am.recent-locations",N=e=>{var a,n,o,t;if(null==e?void 0:e.nameLocal)return e;let r=null!==(a=null==e?void 0:e.name)&&void 0!==a?a:"";return{nameLocal:r,nameEnglish:r,admin:null!==(n=null==e?void 0:e.admin)&&void 0!==n?n:"",lat:Number(null!==(o=null==e?void 0:e.lat)&&void 0!==o?o:0),lon:Number(null!==(t=null==e?void 0:e.lon)&&void 0!==t?t:0)}},j=e=>e.map(e=>N(e)),v=()=>{try{let e=window.localStorage.getItem(f);if(!e)return{};let a=JSON.parse(e),n=Object.entries(a).map(e=>{let[a,n]=e;return[a,Array.isArray(n)?j(n):[]]});return Object.fromEntries(n)}catch(e){return{}}},S=e=>{try{window.localStorage.setItem(f,JSON.stringify(e))}catch(e){}},C=()=>{try{let e=window.localStorage.getItem(y);return e?JSON.parse(e):[]}catch(e){return[]}},w=e=>{try{let a=C().filter(a=>a.cityLocal!==e.cityLocal||a.countryCode!==e.countryCode);a.unshift(e),window.localStorage.setItem(y,JSON.stringify(a.slice(0,3)))}catch(e){}},M=e=>{if(!e||e.length<2)return"\uD83C\uDF0D";try{let a=e.toUpperCase().split("").map(e=>127397+e.charCodeAt(0));return String.fromCodePoint(...a)}catch(e){return"\uD83C\uDF0D"}},L=e=>{var a,n,x,f;let{value:y,onChange:N}=e,L=(0,r.useTranslations)("prayerTimes.locationSearch"),[T,A]=(0,t.useState)(""),[P,k]=(0,t.useState)([]),[I,E]=(0,t.useState)(!1),[G,B]=(0,t.useState)(""),[D,Z]=(0,t.useState)(!1),[R,F]=(0,t.useState)(!1),[U,K]=(0,t.useState)(!1),[O,H]=(0,t.useState)(!1),[J,V]=(0,t.useState)([]),Y=(0,t.useRef)({}),z=(0,t.useRef)(null),q=(null==y?void 0:y.countryCode)||"SA",W=(null==y?void 0:y.cityLocal)||"",Q=(null==y?void 0:y.cityEnglish)||"",X=null!==(x=null==y?void 0:null===(a=y.coordinates)||void 0===a?void 0:a.lat)&&void 0!==x?x:21.3891,_=null!==(f=null==y?void 0:null===(n=y.coordinates)||void 0===n?void 0:n.lon)&&void 0!==f?f:39.8579,$=(null==y?void 0:y.timeZone)||"Asia/Riyadh",[ee,ea]=(0,t.useState)(X.toString()),[en,eo]=(0,t.useState)(_.toString()),[et,er]=(0,t.useState)($);(0,t.useEffect)(()=>{Y.current=v(),V(C())},[]),(0,t.useEffect)(()=>{ea(X.toString()),eo(_.toString()),er($)},[X,_,$]),(0,t.useEffect)(()=>
1{if(!T||T.length<2||!D){k([]),E(!1),B("");return}let e=window.setTimeout(async()=>{let e="".concat(q,":").concat(T.toLowerCase()),a=Y.current[e];if(a){k(j(a)),E(!1),B("");return}E(!0),B("");try{let a=await fetch("/api/geo/search?country=".concat(q,"&q=").concat(encodeURIComponent(T)));if(!a.ok)throw Error("Geo search failed");let n=await a.json(),o=j(n.candidates);Y.current[e]=o,S(Y.current),k(o)}catch(e){B(L("errors.unableToFetchCities")),k([])}finally{E(!1)}},350);return()=>window.clearTimeout(e)},[T,q,D,L]);let ec=(0,t.useMemo)(()=>{var e;return null!==(e=p.o.find(e=>e.code===q))&&void 0!==e?e:null},[q]),ed=(0,t.useMemo)(()=>{let e=T.trim().toLowerCase();return e?p.o.filter(a=>"".concat(a.name," ").concat(a.code).toLowerCase().includes(e)).slice(0,15):p.o.slice(0,10)},[T]),es=(0,t.useCallback)((e,a,n,o,t)=>{let r=g()(o,t),c={countryCode:n,cityLocal:e,cityEnglish:a,coordinates:{lat:o,lon:t},timeZone:r};N(c),w(c),V(C()),A(""),k([]),Z(!1),F(!1)},[N]),ei=e=>{es(e.nameLocal||e.nameEnglish,e.nameEnglish||e.nameLocal,q,e.lat,e.lon)},el=e=>{es(e.nameLocal,e.name,e.country,e.lat,e.lon)},em=e=>{N(e),A(""),Z(!1)},eu=e=>{N({countryCode:e,cityLocal:W,cityEnglish:Q,coordinates:{lat:X,lon:_},timeZone:$}),F(!1),A(""),setTimeout(()=>{var e;return null===(e=z.current)||void 0===e?void 0:e.focus()},100)},eh=async()=>{if(!navigator.geolocation){B(L("errors.geolocationUnsupported"));return}H(!0),B(""),navigator.geolocation.getCurrentPosition(async e=>{let{latitude:a,longitude:n}=e.coords,o=g()(a,n);try{let e=await fetch("/api/geo/reverse?lat=".concat(a,"&lon=").concat(n));if(e.ok){let o=await e.json();if(o.city&&o.country){es(o.cityLocal||o.city,o.city,o.country,a,n),H(!1);return}}}catch(e){}N({countryCode:q,cityLocal:"Current Location",cityEnglish:"Current Location",coordinates:{lat:a,lon:n},timeZone:o}),H(!1)},e=>{B(1===e.code?L("errors.permissionDenied"):L("errors.couldNotDetect")),H(!1)},{enableHighAccuracy:!0,timeout:1e4})},ex=D&&(P.length>0||I||T.length>=2&&!R);return(0,o.jsxs)("div",{className:"space-y-4",children:[(0,o.jsxs)("button",{type:"button",onClick:eh,disabled:O,className:"flex items-center justify-center gap-2 w-full py-2.5 rounded-xl border border-border/50 bg-muted/30 hover:bg-muted/50 transition-colors text-sm font-medium text-foreground disabled:opacity-50",children:[O?(0,o.jsx)(c.Z,{className:"h-4 w-4 animate-spin"}):(0,o.jsx)(d.Z,{className:"h-4 w-4"}),O?L("detecting"):L("useMyLocation")]}),(0,o.jsxs)("div",{children:[(0,o.jsxs)("button",{type:"button",onClick:()=>F(!R),className:"flex items-center justify-between w-full px-3 py-2.5 rounded-xl border border-border/50 bg-muted/30 hover:bg-muted/50 transition-colors",children:[(0,o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,o.jsx)(s.Z,{className:"h-4 w-4 text-muted-foreground"}),(0,o.jsx)("span",{className:"text-sm font-medium",children:ec?(0,o.jsxs)("span",{className:"flex items-center gap-2",children:[(0,o.jsx)("span",{children:M(q)}),(0,o.jsx)("span",{children:ec.name})]}):L("selectCountry")})]}),(0,o.jsx)(i.Z,{className:"h-4 w-4 text-muted-foreground transition-transform ".concat(R?"rotate-180":"")})]}),R&&(0,o.jsxs)("div",{className:"mt-2 rounded-xl border border-border/50 bg-background overflow-hidden",children:[(0,o.jsx)("div",{className:"p-2 border-b border-border/30",children:(0,o.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded-lg bg-muted/50",children:[(0,o.jsx)(l.Z,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,o.jsx)("input",{type:"text",value:T,onChange:e=>A(e.target.value),placeholder:L("searchCountries"),className:"flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60",autoFocus:!0}),T&&(0,o.jsx)("button",{type:"button",onClick:()=>A(""),children:(0,o.jsx)(m.Z,{className:"h-3.5 w-3.5 text-muted-foreground hover:text-foreground"})})]})}),(0,o.jsx)("div",{className:"max-h-48 overflow-y-auto",children:ed.map(e=>(0,o.jsxs)("button",{type:"button",onClick:()=>eu(e.code),className:"flex items-center gap-3 w-full px-3 py-2 text-start hover:bg-muted/50 transition-colors ".concat(e.code===q?"bg-primary/5":""),children:[(0,o.jsx)("span",{className:"text-base",children:M(e.code)}),(0,o.jsx)("span",{className:"flex-1 text-sm",children:e.name}),e.code===q&&(0,o.jsx)("div",{className:"h-2 w-2 rounded-full bg-primary"})]},e.code))})]})]}
1),!R&&(0,o.jsxs)("div",{className:"relative",children:[(0,o.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2.5 rounded-xl border border-border/50 bg-muted/30 focus-within:border-primary focus-within:ring-1 focus-within:ring-primary/30",children:[(0,o.jsx)(l.Z,{className:"h-4 w-4 text-muted-foreground"}),(0,o.jsx)("input",{ref:z,type:"text",value:T,onChange:e=>A(e.target.value),onFocus:()=>Z(!0),onBlur:()=>setTimeout(()=>Z(!1),200),placeholder:L("searchCity",{country:(null==ec?void 0:ec.name)||L("selectedCountryFallback")}),className:"flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}),T&&(0,o.jsx)("button",{type:"button",onClick:()=>A(""),children:(0,o.jsx)(m.Z,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"})})]}),ex&&(0,o.jsxs)("div",{className:"absolute z-10 left-0 right-0 mt-2 rounded-xl border border-border/50 bg-background shadow-lg overflow-hidden",children:[I&&(0,o.jsxs)("div",{className:"flex items-center gap-2 px-3 py-3 text-sm text-muted-foreground",children:[(0,o.jsx)(c.Z,{className:"h-4 w-4 animate-spin"}),L("searching")]}),!I&&0===P.length&&T.length>=2&&(0,o.jsx)("p",{className:"px-3 py-3 text-sm text-muted-foreground",children:L("noCities")}),P.map(e=>(0,o.jsxs)("button",{type:"button",onClick:()=>ei(e),className:"flex items-center gap-3 w-full px-3 py-2.5 text-start hover:bg-muted/50 transition-colors",children:[(0,o.jsx)(u.Z,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),(0,o.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,o.jsx)("p",{className:"text-sm font-medium truncate",children:e.nameLocal||e.nameEnglish}),(0,o.jsxs)("p",{className:"text-xs text-muted-foreground truncate",children:[e.nameEnglish!==e.nameLocal&&e.nameEnglish,e.admin&&" \xb7 ".concat(e.admin)]})]})]},"".concat(e.nameLocal,"-").concat(e.lat)))]})]}),!R&&!D&&(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2",children:L("popularCities")}),(0,o.jsx)("div",{className:"flex flex-wrap gap-1.5",children:b.slice(0,8).map(e=>(0,o.jsxs)("button",{type:"button",onClick:()=>el(e),className:"inline-flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg text-xs font-medium transition-colors ".concat(Q===e.name||W===e.nameLocal?"bg-primary text-primary-foreground":"bg-muted/50 hover:bg-muted text-foreground"),children:[(0,o.jsx)("span",{children:M(e.country)}),(0,o.jsx)("span",{children:e.name})]},e.name))})]}),!R&&!D&&J.length>0&&(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider mb-2",children:L("recent")}),(0,o.jsx)("div",{className:"space-y-1",children:J.map((e,a)=>(0,o.jsxs)("button",{type:"button",onClick:()=>em(e),className:"flex items-center gap-2 w-full px-2.5 py-2 rounded-lg text-start hover:bg-muted/50 transition-colors",children:[(0,o.jsx)("span",{children:M(e.countryCode)}),(0,o.jsx)("span",{className:"text-sm",children:e.cityLocal}),(0,o.jsxs)("span",{className:"text-xs text-muted-foreground",children:["\xb7 ",e.timeZone]})]},"".concat(e.cityLocal,"-").concat(a)))})]}),G&&(0,o.jsx)("p",{className:"text-xs text-destructive px-1",children:G}),(0,o.jsxs)("div",{className:"pt-2",children:[(0,o.jsxs)("button",{type:"button",onClick:()=>K(!U),className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[(0,o.jsx)(h.Z,{className:"h-3.5 w-3.5 transition-transform ".concat(U?"rotate-90":"")}),L("advanced")]}),U&&(0,o.jsxs)("div",{className:"mt-3 p-3 rounded-xl border border-border/50 bg-muted/20",children:[(0,o.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("label",{className:"text-xs text-muted-foreground",children:L("latitude")}),(0,o.jsx)("input",{className:"mt-1 w-full rounded-lg border border-border/50 bg-background px-3 py-2 text-sm",placeholder:L("latitudePlaceholder"),value:ee,onChange:e=>ea(e.target.value)})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("label",{className:"text-xs text-muted-foreground",children:L("longitude")}),(0,o.jsx)("input",{className:"mt-1 w-full rounded-lg border border-border/50 bg-background px-3 py-2 text-sm",placeholder:L("longitudePlaceholder"),value:en,onChange:e=>eo(e.target.value)})]})]}),(0,o.jsxs)("div",{className:"mt-2",children:[(0,o.jsx)("label",{className:"text-xs text-muted-foreground",children:L("timezone")}),(0,o.jsx)("input",{className:"mt-1 w-full rounded-lg border border-border/50 bg-background px-3 py-2 text-sm",placeholder:L("timezonePlaceholder"),value:et,onChange:e=>er(e.target.value)})]}),(0,o.jsx)("button",{type:"button",className:"mt-3 w-full rounded-lg bg-primary px-3 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90 transition-colors",onClick:()=>{let e=Number(ee),a=Number(en);
1Number.isNaN(e)||Number.isNaN(a)||(N({countryCode:q,cityLocal:W||"Custom",cityEnglish:Q||W||"Custom",coordinates:{lat:e,lon:a},timeZone:et||g()(e,a)}),K(!1))},children:L("applyCoordinates")})]})]})]})}},36015:function(e,a,n){n.d(a,{L:function(){return p},g:function(){return b}});var o=n(57437),t=n(42586),r=n(21047),c=n(99397),d=n(10866),s=n(69076),i=n(86215),l=n(85929),m=n(53891),u=n(97226),h=n(95812);function x(e){let{label:a,sublabel:n,value:d,onChange:s,icon:i,highlight:l}=e,m=(0,t.useTranslations)("prayerTimes.settings.adjustments");return(0,o.jsxs)("div",{className:"flex items-center justify-between px-3 py-2.5 rounded-xl ".concat(l?"bg-primary/5 border border-primary/20":"bg-muted/30"),children:[(0,o.jsxs)("div",{className:"flex items-center gap-2.5",children:[i&&(0,o.jsx)("span",{className:"text-muted-foreground",children:i}),(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"text-sm font-medium ".concat(l?"text-primary":"text-foreground"),children:a}),n&&(0,o.jsx)("p",{className:"text-xs text-muted-foreground",children:n})]})]}),(0,o.jsxs)("div",{className:"flex items-center gap-1",children:[(0,o.jsx)("button",{type:"button",onClick:()=>s(Math.max(-30,d-1)),disabled:d<=-30,className:"h-8 w-8 flex items-center justify-center rounded-lg bg-muted hover:bg-muted/80 disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-label":m("decrease",{label:a}),children:(0,o.jsx)(r.Z,{className:"h-3.5 w-3.5"})}),(0,o.jsx)("span",{className:"w-12 text-center text-sm font-medium tabular-nums ".concat(0===d?"text-muted-foreground":d>0?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"),children:d>0?"+".concat(d):d}),(0,o.jsx)("button",{type:"button",onClick:()=>s(Math.min(30,d+1)),disabled:d>=30,className:"h-8 w-8 flex items-center justify-center rounded-lg bg-muted hover:bg-muted/80 disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-label":m("increase",{label:a}),children:(0,o.jsx)(c.Z,{className:"h-3.5 w-3.5"})})]})]})}let g={fajr:0,sunrise:0,dhuhr:0,asr:0,maghrib:0,isha:0};function p(e){var a;let{showFiqhJafria:n=!1}=e,r=(0,t.useTranslations)("prayerTimes.settings.adjustments"),c=(0,t.useTranslations)("prayerTimes.prayers"),p=(0,h.P)(e=>e.timeAdjustments),b=null!==(a=(0,h.P)(e=>e.fiqhJafria))&&void 0!==a&&a,f=(0,h.P)(e=>e.setTimeAdjustment),y=(0,h.P)(e=>e.resetTimeAdjustments),N=(0,h.P)(e=>e.setFiqhJafria),j=null!=p?p:g,v=Object.values(j).some(e=>0!==e);return(0,o.jsxs)("div",{className:"space-y-4",children:[n&&(0,o.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 rounded-xl bg-muted/40 border border-border/30",children:[(0,o.jsxs)("div",{className:"flex items-center gap-3",children:[(0,o.jsx)(d.Z,{className:"h-4 w-4 text-muted-foreground"}),(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"text-sm font-medium text-foreground",children:r("fiqhJafria")}),(0,o.jsx)("p",{className:"text-xs text-muted-foreground",children:r("fiqhJafriaHint")})]})]}),(0,o.jsxs)("label",{className:"relative inline-flex items-center cursor-pointer",children:[(0,o.jsx)("input",{type:"checkbox",checked:b,onChange:e=>N(e.target.checked),className:"sr-only peer"}),(0,o.jsx)("div",{className:"w-11 h-6 bg-muted peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-primary/20 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-primary"})]})]}),(0,o.jsxs)("div",{className:"space-y-2",children:[(0,o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,o.jsx)("label",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:r("heading")}),v&&(0,o.jsxs)("button",{type:"button",onClick:y,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[(0,o.jsx)(s.Z,{className:"h-3 w-3"}),r("reset")]})]}),(0,o.jsxs)("div",{className:"space-y-1.5",children:[(0,o.jsx)(x,{label:c("fajr"),value:j.fajr,onChange:e=>f("fajr",e),icon:(0,o.jsx)(i.Z,{className:"h-4 w-4"})}),(0,o.jsx)(x,{label:c("sunrise"),value:j.sunrise,onChange:e=>f("sunrise",e),icon:(0,o.jsx)(i.Z,{className:"h-4 w-4"})}),(0,o.jsx)(x,{label:c("dhuhr"),value:j.dhuhr,onChange:e=>f("dhuhr",e),icon:(0,o.jsx)(l.Z,{className:"h-4 w-4"})}),(0,o.jsx)(x,{label:c("asr"),value:j.asr,onChange:e=>f("asr",e),icon:(0,o.jsx)(l.Z,{className:"h-4 w-4"})}),(0,o.jsx)(x,{label:c("maghrib"),value:j.maghrib,onChange:e=>f("maghrib",e),icon:(0,o.jsx)(m.Z,{className:"h-4 w-4"})}),(0,o.jsx)(x,{label:c("isha"),value:j.isha,onChange:e=>f("isha",e),icon:(0,o.jsx)(u.Z,{className:"h-4 w-4"})})]}
1),(0,o.jsx)("p",{className:"text-xs text-muted-foreground/70 mt-2",children:r("hint")})]})]})}function b(){var e;let a=(0,t.useTranslations)("prayerTimes.settings.adjustments"),n=(0,h.P)(e=>e.timeAdjustments),o=null!==(e=(0,h.P)(e=>e.fiqhJafria))&&void 0!==e&&e,r=null!=n?n:g;return Object.values(r).some(e=>0!==e)?a("summaryCount",{count:Object.values(r).filter(e=>0!==e).length}):a(o?"summaryFiqhJafria":"summaryStandard")}},17246:function(e,a,n){n.d(a,{q:function(){return t}});var o=n(2265);let t=(e,a)=>{(0,o.useEffect)(()=>{if(!a)return;let n=a=>{"Escape"===a.key&&e()};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[a,e])}}}]);
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.