1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,348039,e=>{"use strict";var t=e.i(670878),l=e.i(637984),i=e.i(950014),r=e.i(337959),n=e.i(653290);function a(e){return""!==e.src}e.s(["DetailIncomingPhotos",0,function(e){let s,o,d,c,m,u,h,f,x,b,p,g,y,k,w,v,j,N,S=(0,l.c)(52),{locationTitle:z,addPhotoPath:C,photos:_,fallbackSrc:A,sectionTitle:$,addLinkLabel:E,emptyMessage:M,galleryMode:L,modalDesktopAdHtml:T,modalMobileAdHtml:I}=e,B=void 0===$?"Gelen FotoÄraflar":$,R=void 0===E?"FotoÄraf Ekle":E,G=void 0===M?"Bu içerik için henüz onaylı fotoÄraf bulunmuyor.":M,F=void 0!==L&&L,O=void 0===T?"":T,U=void 0===I?"":I,[K,P]=(0,i.useState)(!1),[W,D]=(0,i.useState)(0);S[0]===Symbol.for("react.memo_cache_sentinel")?(s=new Set,S[0]=s):s=S[0];let[q,H]=(0,i.useState)(s),[Y,V]=(0,i.useState)(!1),[J,Z]=(0,i.useState)(!1),Q=(0,i.useRef)(null);if(S[1]!==z||S[2]!==_){let e;S[4]!==z?(e=(e,t)=>({id:String(e.id),src:String(e.imageUrl??"").trim(),alt:e.caption?.trim()||`${z} - FotoÄraf ${t+1}`}),S[4]=z,S[5]=e):e=S[5],o=_.map(e).filter(a),S[1]=z,S[2]=_,S[3]=o}else o=S[3];let X=o;if(S[6]!==q||S[7]!==X){let e;S[9]!==q?(e=e=>!q.has(e.id),S[9]=q,S[10]=e):e=S[10],d=X.filter(e),S[6]=q,S[7]=X,S[8]=d}else d=S[8];let ee=d;S[11]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{H(new Set)},S[11]=c):c=S[11],S[12]!==X?(m=[X],S[12]=X,S[13]=m):m=S[13],(0,i.useEffect)(c,m),S[14]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{let e=Q.current;if(!e)return;let t=Math.max(0,e.scrollWidth-e.clientWidth);V(e.scrollLeft>6),Z(t-e.scrollLeft>6)},S[14]=u):u=S[14];let et=u;S[15]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{let e=Q.current;if(!e)return;et();let t=window.requestAnimationFrame(et),l=window.setTimeout(et,140);e.addEventListener("scroll",et,{passive:!0});let i=new ResizeObserver(et);return i.observe(e),()=>{window.cancelAnimationFrame(t),window.clearTimeout(l),e.removeEventListener("scroll",et),i.disconnect()}},S[15]=h):h=S[15],S[16]!==ee.length?(f=[ee.length,et],S[16]=ee.length,S[17]=f):f=S[17],(0,i.useEffect)(h,f),S[18]===Symbol.for("react.memo_cache_sentinel")?(x=function(e){let t=Q.current;if(!t)return;let l=t.firstElementChild,i=Math.max((l?.clientWidth??210)+(Number.parseInt(window.getComputedStyle(t).columnGap||"12",10)||12),Math.floor(.68*t.clientWidth));t.scrollBy({left:e*i,behavior:"smooth"}),window.requestAnimationFrame(et),window.setTimeout(et,260)},S[18]=x):x=S[18];let el=x,ei=F?"w-[88vw] min-w-[88vw] max-w-[88vw] sm:w-[248px] sm:min-w-[248px] sm:max-w-[248px]":"w-[210px] min-w-[210px] max-w-[210px]",er=F?"h-[178px] sm:h-[150px]":"h-[132px]",en=F?"mt-8 border-t border-[#d8dde4] pt-6 -mx-4 px-4 sm:mx-0 sm:px-0":"mt-8 border-t border-[#d8dde4] pt-6";S[19]!==B?(b=(0,t.jsx)("h2",{className:"landing-drone-title !text-[1.32rem] !font-medium text-[#2f3d4d] md:!text-[1.52rem]",children:B}),S[19]=B,S[20]=b):b=S[20],S[21]===Symbol.for("react.memo_cache_sentinel")?(p=(0,t.jsx)("span",{className:"landing-drone-title-line"}),S[21]=p):p=S[21],S[22]!==b?(g=(0,t.jsxs)("div",{className:"landing-drone-header mb-0",children:[b,p]}),S[22]=b,S[23]=g):g=S[23],S[24]!==R||S[25]!==C?(y=(0,t.jsx)(r.AuthModalLink,{href:C,className:"text-base font-semibold text-[#111111] underline underline-offset-2 md:text-[1.05rem]",children:R}),S[24]=R,S[25]=C,S[26]=y):y=S[26],S[27]!==g||S[28]!==y?(k=(0,t.jsxs)("div",{className:"mb-3 flex flex-wrap items-end justify-between gap-3",children:[g,y]}),S[27]=g,S[28]=y,S[29]=k):k=S[29],S[30]!==Y||S[31]!==J||S[32]!==ei||S[33]!==G||S[34]!==A||S[35]!==F||S[36]!==er||S[37]!==ee?(w=ee.length>0?(0,t.jsxs)("div",{className:"landing-drone-carousel",children:[Y?(0,t.jsx)("button",{type:"button",onClick:()=>el(-1),className:"landing-drone-arrow landing-drone-arrow-left","aria-label":"Gelen fotoÄraflarda sola kaydır",children:"â"}):null,J?(0,t.jsx)("button",{type:"button",onClick:()=>el(1),className:"landing-drone-arrow landing-drone-arrow-right","aria-label":"Gelen fotoÄraflarda saÄa kaydır",children:"â"}):null,(0,t.jsx)("div",{ref:Q,className:"landing-drone-scroller flex gap-3 overflow-x-auto",children:ee.map((e,l)=>(0,t.jsx)("div",{className:"contents",children:(0,t.jsx)("button",{type:"button",onClick:()=>{D(l),P(!0)},className:`${ei} shrink-0 overflow-hidden rounded-lg border border-[#dce3dd] bg-white shadow-[0_6px_12px_rgba(15,61,46,0.06)]`,children:(0,t.jsx)("div",{className:`${er} w-full bg-[#e8ece8]`,children:(0,t.jsx)("img",{src:e.src,alt:e.alt,className:"h-full w-full object-cover",loading:"lazy",decoding:"async",onError:t=>{if(F)return void H(t=>{if(t.has(e.id))return t;let l=new Set(t);return l.add(e.id),l});let l=t.currentTarget;l.src.endsWith(A)||(l.src=A)}})})})},`incoming-photo-wrap-${e.id}`))})]}):(0,t.jsx)("div",{className:"rounded-xl border border-dashed border-[#cdd7d1] bg-white px-4 py-5 text-sm text-[#55675f]",children:G}),S[30]=Y,S[31]=J,S[32]=ei,S[33]=G,S[34]=A,S[35]=F,S[36]=er,S[37]=ee,S[38]=w):w=S[38];let ea=`${z} fotoÄrafları`;return S[39]===Symbol.for("react.memo_cache_sentinel")?(v=()=>P(!1),S[39]=v):v=S[39],S[40]!==O||S[41]!==W||S[42]!==U||S[43]!==K||S[44]!==ea||S[45]!==ee?(j=(0,t.jsx)(n.PhotoGalleryModal,{open:K,title:ea,images:ee,initialIndex:W,desktopAdHtml:O,mobileAdHtml:U,onClose:v}),S[40]=O,S[41]=W,S[42]=U,S[43]=K,S[44]=ea,S[45]=ee,S[46]=j):j=S[46],S[47]!==en||S[48]!==k||S[49]!==w||S[50]!==j?(N=(0,t.jsxs)("section",{className:en,children:[k,w,j]}),S[47]=en,S[48]=k,S[49]=w,S[50]=j,S[51]=N):N=S[51],N}])},680565,e=>{"use strict";var t=e.i(670878),l=e.i(157289),i=e.i(87825),r=e.i(950014),n=e.i(6
153290);function a(e){let t=String(e??"").trim();return t?t.startsWith("//")?`https:${t}`:/^https?:\/\//i.test(t)||t.startsWith("/")?t:`/${t.replace(/^\/+/,"")}`:""}e.s(["DetailRememberedAlbum",0,function({locationId:e,locationTitle:s,locationSeoLink:o,provinceName:d,districtName:c,photos:m,fallbackSrc:u}){let{userId:h}=(0,i.useAuth)(),[f,x]=(0,r.useState)(!1),[b,p]=(0,r.useState)(""),[g,y]=(0,r.useState)(null),[k,w]=(0,r.useState)(""),[v,j]=(0,r.useState)(!1),[N,S]=(0,r.useState)(""),[z,C]=(0,r.useState)(""),[_,A]=(0,r.useState)(!1),[$,E]=(0,r.useState)(0),[M,L]=(0,r.useState)(!1),[T,I]=(0,r.useState)(!1),[B,R]=(0,r.useState)({}),G=(0,r.useRef)(null),F=(0,r.useMemo)(()=>m.map(e=>{let t,l;return{...e,key:String(e.id),candidates:(t=function(e){let t=a(e);if(!t)return[];let l=[],i=new Set,r=e=>{let t=a(e);!t||i.has(t)||(i.add(t),l.push(t))};if(r(t),t.startsWith("/")&&(r(`https://www.koylerim.com${t}`),r(`https://koylerim.com${t}`),r(`https://d.koylerim.com${t}`)),/^https?:\/\//i.test(t))try{let e=new URL(t),l=e.pathname||"";r(l),r(`https://${e.host}${l}`),r(`https://www.koylerim.com${l}`),r(`https://koylerim.com${l}`),r(`https://d.koylerim.com${l}`)}catch{}let n=t.match(/\/uploads\/unutmadiklarimiz\/([^/?#]+)$/i);if(n?.[1]){let e=n[1];r(`/uploads/unutmadiklarimiz/${e}`),r(`https://www.koylerim.com/uploads/unutmadiklarimiz/${e}`),r(`https://koylerim.com/uploads/unutmadiklarimiz/${e}`),r(`https://d.koylerim.com/uploads/unutmadiklarimiz/${e}`),r(`https://d.koylerim.com/unutmadiklarimiz/${e}`)}return l}(e.imageUrl),(l=a(u))&&!t.includes(l)&&t.push(l),t)}}),[m,u]);(0,r.useEffect)(()=>{R({})},[F]);let O=(0,r.useMemo)(()=>F.filter(e=>e.candidates.length>0),[F]),U=(0,r.useMemo)(()=>O.map((e,t)=>{let l=Math.max(0,B[e.key]??0),i=e.candidates[l]||e.candidates[0]||u;return{id:e.key,src:i,alt:`${e.fullName} - ${s} - ${t+1}`,caption:e.fullName}}),[O,B,u,s]),K=(0,r.useCallback)(()=>{let e=G.current;if(!e)return;let t=Math.max(0,e.scrollWidth-e.clientWidth);L(e.scrollLeft>6),I(t-e.scrollLeft>6)},[]);function P(e){let t=G.current;if(!t)return;let l=t.firstElementChild,i=Math.max((l?.clientWidth??210)+(Number.parseInt(window.getComputedStyle(t).columnGap||"12",10)||12),Math.floor(.68*t.clientWidth));t.scrollBy({left:e*i,behavior:"smooth"}),window.requestAnimationFrame(K),window.setTimeout(K,260)}function W(){x(!1),p(""),y(null),k&&URL.revokeObjectURL(k),w(""),S(""),C(""),j(!1)}async function D(){let t=String(b??"").replace(/\s+/g," ").trim().slice(0,190);if(t.length<3)return void S("Ad Soyad alanı zorunludur.");if(!g)return void S("FotoÄraf seçmelisiniz.");j(!0),S(""),C("");try{let l=new FormData;l.append("locationId",String(e)),l.append("locationTitle",s),l.append("locationSeoLink",o),l.append("provinceName",d),l.append("districtName",c),l.append("fullName",t),l.append("image",g,g.name);let i=await fetch("/api/unutmadiklarimiz/submit",{method:"POST",body:l}),r=await i.json();if(!i.ok||!r.ok)return void S(r.error||"Gönderim baÅarısız.");C("TeÅekkürler. Gönderiniz editör onayına alındı."),setTimeout(()=>{W()},1800)}catch{S("Gönderim sırasında bir hata oluÅtu.")}finally{j(!1)}}return(0,r.useEffect)(()=>{let e=G.current;if(!e)return;K();let t=window.requestAnimationFrame(K),l=window.setTimeout(K,140);e.addEventListener("scroll",K,{passive:!0});let i=new ResizeObserver(K);return i.observe(e),()=>{window.cancelAnimationFrame(t),window.clearTimeout(l),e.removeEventListener("scroll",K),i.disconnect()}},[O.length,K]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("section",{id:"unutmadiklarimiz",className:"mt-8 scroll-mt-24 border-t border-[#d8dde4] pt-6",children:[(0,t.jsxs)("div",{className:"mb-3 flex flex-wrap items-end justify-between gap-3",children:[(0,t.jsxs)("div",{className:"landing-drone-header mb-0",children:[(0,t.jsx)("h2",{className:"landing-drone-title !text-[1.32rem] !font-medium text-[#2f3d4d] md:!text-[1.52rem]",children:"Unutmadıklarımız Albümü"}),(0,t.jsx)("span",{className:"landing-drone-title-line"})]}),h?(0,t.jsx)("button",{type:"button",onClick:function(){x(!0),S(""),C("")},className:"inline-flex items-center justify-center rounded-full border border-[#2d3870] bg-white px-4 py-2 text-sm font-semibold text-[#1a275c] shadow-sm hover:bg-[#edf1ff]",children:"Albüme Ekle"}):(0,t.jsx)(l.SignInButton,{mode:"modal",children:(0,t.jsx)("button",{type:"button",className:"inline-flex items-center justify-center rounded-full border border-[#2d3870] bg-white px-4 py-2 text-sm font-semibold text-[#1a275c] shadow-sm hover:bg-[#edf1ff]",children:"Albüme Ekle"})})]}),O.length>0?(0,t.jsxs)("div",{className:"landing-drone-carousel",children:[M?(0,t.jsx)("button",{type:"button",onClick:()=>P(-1),className:"landing-drone-arrow landing-drone-arrow-left","aria-label":"Unutmadıklarımız albümünde sola kaydır",children:"â"}):null,T?(0,t.jsx)("button",{type:"button",onClick:()=>P(1),className:"landing-drone-arrow landing-drone-arrow-right","aria-label":"Unutmadıklarımız albümünde saÄa kaydır",children:"â"}):null,(0,t.jsx)("div",{ref:G,className:"landing-drone-scroller flex gap-3 overflow-x-auto",children:O.map((e,l)=>{let i=Math.max(0,B[e.key]??0),r=e.candidates[i]||e.candidates[0]||u;return(0,t.jsxs)("button",{type:"button",onClick:()=>{E(l),A(!0)},className:"group w-[210px] min-w-[210px] max-w-[210px] shrink-0 overflow-hidden rounded-lg border border-[#dce3dd] bg-white text-left shadow-[0_6px_12px_rgba(15,61,46,0.06)]",children:[(0,t.jsx)("div",{className:"h-[132px] w-full bg-[#eef2ef]",children:(0,t.jsx)("img",{src:r,alt:`${e.fullName} - ${s}`,className:"h-full w-full object-cover transition duration-300 group-hover:scale-[1.04]",loading:"lazy",decoding:"async",onError:()=>{let t=i+1;t<e.candidates.length&&R(l=>({...l,[e.key]:t}))}})}),(0,t.jsx)("div",{className:"px-2.5 py-2 text-left",children:(0,t.jsx)("p",{className:"truncate text-xs font-semibold text-[#1a275c]",children:e.fullName})})]},e.key)})})]}):(0,t.jsx)("div",{className:"rounded-xl border border-dashed border-[#cdd7d1] bg-white px-4 py-5 text-sm text-[#55675f]",children:"Bu köy için henüz albüm kaydı bulunmuyor. İlk fotoÄrafı sen ekleyebilirsin."})]}),f?(0,t.jsx)("div",{className:"fixed inset-0 z-[120] bg-black/50 px-4 py-6",onClick:W,role:"presentation",children:(0,t.jsxs)("div",{className:"mx-auto w-full max-w-[520px] overflow-hidden rounded-2xl bg-white",onClick:e=>e.stopPropagation(),role:"dialog","aria-modal":"true","aria-label":"Unutmadıklarımız albümü",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-zinc-200 px-4 py-3",children:[(0,t.jsx)("h4",{className:"text-xl font-semibold text-[#242833]",children:"Unutmadıklarımız Albümü"}),(0,t.jsx)("button",{type:"button",className:"text-2xl leading-none text-zinc-500 hover:text-zinc-800",onClick:W,"aria-label":"Kapat",children:"Ã"})]}),(0,t.jsxs)("div",{className:"space-y-3 px-4 py-4",children:[(0,t.jsx)("p",{className:"text-sm text-zinc-600",children:s}),(0,t.jsx)("p",{className:"rounded-lg bg-[#f4f6fb] px-3 py-2 text-sm text-[#374151]",children:"Köyümüzden vefat eden tanıdıklarımızı bu albüme ekliyor, hatıralarını birlikte yaÅatıyoruz."}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"mb-1 block text-sm font-medium text-zinc-700",children:"Ad Soyad *"}),(0,t.jsx)("input",{value:b,onChange:e=>p(e.target.value),maxLength:190,className:"h-10 w-full rounded-lg border border-zinc-300 px-3 text-sm outline-none focus:border-[#2d3870]",placeholder:"Ãrn: Ahmet Yılmaz"})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"mb-1 block text-sm font-medium text-zinc-700",children:"FotoÄraf Ekle *"}),(0,t.jsx)("input",{type:"file",accept:"image/*",onChange:e=>{let t=e.target.files?.[0]??null;y(t),S(""),k&&URL.revokeObjectURL(k),t?w(URL.createObjectURL(t)):w("")},className:"block w-full rounded-lg border border-zinc-300 px-3 py-2 text-sm file:mr-3 file:rounded file:border-0 file:bg-[#edf1ff] file:px-3 file:py-1.5 file:text-xs file:font-semibold file:text-[#1a275c]"})]}),k?(0,t.jsx)("div",{className:"overflow-hidden rounded-lg border border-zinc-200 bg-zinc-100",children:(0,t.jsx)("img",{src:k,alt:"Seçili fotoÄraf",className:"max-h-[220px] w-full object-contain",loading:"lazy",decoding:"async"})}):null,N?(0,t.jsx)("p",{className:"text-sm font-medium text-rose-700",children:N}):null,z?(0,t.jsx)("p",{className:"text-sm font-medium text-emerald-700",children:z}):null]}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t border-zinc-200 px-4 py-3",children:[(0,t.jsx)("button",{type:"button",onClick:W,className:"inline-flex h-10 items-center justify-center rounded-lg px-4 text-sm font-medium text-zinc-700 hover:bg-zinc-100",children:"Kapat"}),(0,t.jsx)("button",{type:"button",onClick:D,disabled:v,className:"inline-flex h-10 items-center justify-center rounded-lg bg-[#1a275c] px-4 text-sm font-semibold text-white hover:bg-[#2d3870] disabled:cursor-not-allowed disabled:opacity-60",children:v?"Gönderiliyor...":"Gönder"})]})]})}):null,(0,t.jsx)(n.PhotoGalleryModal,{open:_,title:`${s} - Unutmadıklarımız`,images:U,initialIndex:$,onClose:()=>A(!1)})]})}])},85527,e=>{"use strict";var t=e.i(670878),l=e.i(157289),i=e.i(87825),r=e.i(950014);let n=["nufus","soyadlar","gelenekler","gezilecek_yerler","geleneksel_yemekler","tarihcesi","altyapi","saglik"],a={muhtar:"Muhtar",nufus:"Nüfus",soyadlar:"Köydeki Soyadlar",gelenekler:"Gelenekler",gezile
1cek_yerler:"Gezilecek Yerler",geleneksel_yemekler:"Geleneksel Yemekler",tarihcesi:"Tarihçesi",altyapi:"Altyapı",saglik:"SaÄlık"},s={nufus:"Ãrn: 2025 nüfusu: 1.245",soyadlar:"Ãrn: Yılmaz, Demir, Kaya, Aydın, Åahin",gelenekler:"Ãrn: Her yıl mayıs ayında köy meydanında bahar ÅenliÄi yapılır, düÄünlerde davul-zurna ve yöresel oyunlar oynanır.",gezilecek_yerler:"Ãrn: Köyün 2 km üstündeki seyir tepesi, tarihi çeÅme ve dere kenarındaki piknik alanı en çok ziyaret edilen yerlerdir.",geleneksel_yemekler:"Ãrn: KeÅkek, etli bulgur pilavı, eriÅte ve tandır ekmeÄi öne çıkar; özellikle bayramlarda toplu olarak hazırlanır.",tarihcesi:"Ãrn: Köyün geçmiÅi 1800'lü yıllara dayanır. Eski yerleÅim izleri köyün güney yamacında görülür, adı da buradan gelir.",altyapi:"Ãrn: İçme suyu Åebekesi ve kanalizasyon vardır, internet altyapısı merkezde güçlüdür; bazı mezralarda çekim zayıf olabilir.",saglik:"Ãrn: Köyde haftanın belirli günleri aile hekimi hizmeti verilir, en yakın devlet hastanesi ilçe merkezindedir."};e.s(["DetailMuhtarCard",0,function({locationId:e,locationTitle:o,locationSeoLink:d,provinceName:c,districtName:m,muhtar:u,villageInfos:h,pendingMuhtar:f,pendingVillageInfos:x}){let{userId:b}=(0,i.useAuth)(),p=!!b,[g,y]=(0,r.useState)(!1),[k,w]=(0,r.useState)("muhtar"),[v,j]=(0,r.useState)(u?.muhtarName??""),[N,S]=(0,r.useState)(""),[z,C]=(0,r.useState)(""),[_,A]=(0,r.useState)(h),[$,E]=(0,r.useState)(f),[M,L]=(0,r.useState)(x),[T,I]=(0,r.useState)(!1),[B,R]=(0,r.useState)(null),[G,F]=(0,r.useState)(null),[O,U]=(0,r.useState)(null),[K,P]=(0,r.useState)(!1);(0,r.useEffect)(()=>{A(h)},[h]),(0,r.useEffect)(()=>{E(f)},[f]),(0,r.useEffect)(()=>{L(x)},[x]),(0,r.useEffect)(()=>{u&&j(u.muhtarName??"")},[u]);let W=(0,r.useMemo)(()=>[m,c].filter(Boolean).join(" / "),[m,c]),D=(0,r.useMemo)(()=>{let e=String(d||"unknown").trim().toLowerCase(),t=String(b||"guest").trim().toLowerCase();return`koylerim:village-info-prompt:${e}:${t}`},[d,b]),q=(0,r.useCallback)(e=>{w(e),R(null),F(null),U(null),"muhtar"===e?(j(u?.muhtarName??""),S("")):C(_[e]?.value??""),y(!0)},[u?.muhtarName,_]);async function H(){if(p&&!T){I(!0),R(null),F(null),U(null);try{if("muhtar"===k){if(v.trim().length<2)throw Error("Muhtar adı en az 2 karakter olmalı.");let t=await fetch("/api/muhtar/submit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({locationId:e,locationTitle:o,locationSeoLink:d,provinceName:c,districtName:m,muhtarName:v,note:N})}),l=await t.json();if(!t.ok||!l.ok)throw Error(l.error||"Muhtar bilgisi gönderilemedi.");F("TeÅekkür ederiz. Bilginiz editör onayına alındı."),await new Promise(e=>setTimeout(e,2400)),E(!0),U("Muhtar bilgisi editör onayına gönderildi."),y(!1),F(null);return}if(!("muhtar"===k||n.includes(k)))throw Error("Geçersiz bilgi tipi.");let t=z.trim();if(t.length<2)throw Error("Bilgi en az 2 karakter olmalı.");let l=await fetch("/api/village-info/submit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({locationId:e,locationTitle:o,locationSeoLink:d,provinceName:c,districtName:m,infoType:k,infoValue:t})}),i=await l.json();if(!l.ok||!i.ok||!i.item)throw Error(i.error||"Bilgi gönderilemedi.");F("TeÅekkür ederiz. Bilginiz editör onayına alındı."),await new Promise(e=>setTimeout(e,2400)),L(e=>({...e,[k]:!0})),U(`${a[k]} bilgisi edit\xf6r onayına g\xf6nderildi.`),y(!1),F(null)}catch(e){R(e instanceof Error?e.message:"Bilgi gönderilemedi.")}finally{I(!1)}}}(0,r.useEffect)(()=>{if(K||!p)return;let e=null;if(!(e=u?.muhtarName?.trim()||$?n.find(e=>(_[e]?.value??"").trim().length<2&&!M[e])??null:"muhtar"))return void P(!0);let t=Number.parseInt(window.localStorage.getItem(D)||"0",10),l=Date.now();if(Number.isFinite(t)&&t>0&&l-t<36e5)return void P(!0);let i=window.setTimeout(()=>{window.localStorage.setItem(D,String(Date.now())),q(e),P(!0)},3e4);return()=>{window.clearTimeout(i)}},[K,p,u,_,$,M,D,q]);let Y=a[k],V="muhtar"===k,J=T||(V?v.trim().length<2:z.trim().length<2),Z=!!u?.muhtarName?.trim(),Q=!!_.nufus?.value?.trim(),X=$?"Onay bekliyor":Z?"Güncelle":"Muhtar ekle";return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("section",{id:"koy-muhtari",className:"scroll-mt-20 overflow-hidden rounded-2xl border border-[#c8d8ec] bg-[#f7fbff]",children:[(0,t.jsxs)("div",{className:"divide-y divide-[#d6e2f1]",children:[(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{className:"mb-2 flex items-center justify-between gap-2",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-[#1a275c]",children:"Muhtar"}),$?(0,t.jsx)("button",{type:"button",disabled:!0,className:"inline-flex h-8 cursor-not-allowed items-center justify-center rounded-full border border-[#c8d8ec] bg-[#eef3f8] px-3 text-xs font-semibold text-[#6d8098]",children:X}):p?(0,t.jsx)("button",{type:"button",onClick:()=>q("muhtar"),className:"inline-flex h-8 items-center justify-center rounded-full border border-[#2d3870] bg-white px-3 text-xs font-semibold text-[#1a275c] hover:bg-[#edf1ff]",children:X}):(0,t.jsx)(l.SignInButton,{mode:"modal",children:(0,t.jsx)("button",{type:"button",className:"inline-flex h-8 items-center justify-center rounded-full border border-[#2d3870] bg-white px-3 text-xs font-semibold text-[#1a275c] hover:bg-[#edf1ff]",children:X})})]}),u?(0,t.jsxs)("div",{className:"space-y-1.5 text-sm text-[#2f3d4d]",children:[(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"font-semibold",children:"Ad Soyad:"})," ",u.muhtarName]}),(0,t.jsxs)("p",{className:"pt-1 text-xs text-[#6d8098]",children:["Son Güncellenme: ",u.updatedAt||"-"]})]}):(0,t.jsx)("p",{className:"text-sm leading-6 text-[#6d8098]",children:$?"Muhtar bilgisi gönderildi ve editör onayı bekliyor.":"Bu köyün güncel muhtar bilgisi henüz eklenmedi. Muhtarın adını ekleyerek katkıda bulunabilirsiniz."})]}),Q?(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{className:"mb-2 flex items-center justify-between gap-2",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-[#1a275c]",children:"Nüfus"}),p?(0,t.jsx)("button",{type:"button",onClick:()=>q("nufus"),className:"inline-flex h-8 items-center justify-center rounded-full border border-[#2d3870] bg-white px-3 text-xs font-semibold text-[#1a275c] hover:bg-[#edf1ff]",children:"Güncelle"}):(0,t.jsx)(l.SignInButton,{mode:"modal",children:(0,t.jsx)("button",{type:"button",className:"inline-flex h-8 items-center justify-center rounded-full border border-[#2d3870] bg-white px-3 text-xs font-semibold text-[#1a275c] hover:bg-[#edf1ff]",children:"Güncelle"})})]}),_.nufus?.value?(0,t.jsxs)("div",{className:"space-y-1.5 text-sm text-[#2f3d4d]",children:[(0,t.jsx)("p",{children:_.nufus.value}),(0,t.jsxs)("p",{className:"pt-1 text-xs text-[#6d8098]",children:["Son Güncellenme: ",_.nufus.updatedAt||"-"]})]}):null]}):null]}),W?(0,t.jsx)("p",{className:"border-t border-[#d6e2f1] px-4 py-2 text-xs text-[#6d8098]",children:W}):null,O?(0,t.jsx)("p",{className:"border-t border-[#d6e2f1] px-4 py-2 text-xs font-semibold text-emerald-700",children:O}):null]}),g?(0,t.jsx)("div",{className:"fixed inset-0 z-[120] bg-black/50 px-4 py-6",onClick:()=>y(!1),children:(0,t.jsxs)("div",{className:"mx-auto w-full max-w-[520px] overflow-hidden rounded-2xl bg-white",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-zinc-200 px-4 py-3",children:[(0,t.jsxs)("h4",{className:"text-xl font-semibold text-[#242833]",children:[Y," Bilgisini Ekle"]}),(0,t.jsx)("button",{type:"button",className:"text-2xl leading-none text-zinc-500 hover:text-zinc-800",onClick:()=>y(!1),"aria-label":"Kapat",children:"Ã"})]}),(0,t.jsxs)("div",{className:"space-y-3 px-4 py-4",children:[(0,t.jsx)("p",{className:"text-sm text-zinc-600",children:o}),(0,t.jsx)("p",{className:"rounded-lg border border-[#d9e5f7] bg-[#f5f9ff] px-3 py-2 text-sm text-[#355070]",children:"Köy bilgilerinin tamamlanmasına katkı sunduÄunuz için teÅekkür ederiz. PaylaÅtıÄınız içerik Köylerim sayfalarının daha faydalı olmasına yardımcı olur."}),V?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"mb-1 block text-sm font-medium text-zinc-700",children:"Muhtar Adı Soyadı"}
1),(0,t.jsx)("input",{value:v,onChange:e=>j(e.target.value),maxLength:160,className:"h-10 w-full rounded-lg border border-zinc-300 px-3 text-sm outline-none focus:border-[#2d3870]",placeholder:"Ãrn: Ahmet Yılmaz"})]}),(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"mb-1 block text-sm font-medium text-zinc-700",children:"Kısa Not (opsiyonel)"}),(0,t.jsx)("textarea",{value:N,onChange:e=>S(e.target.value),maxLength:500,rows:3,className:"w-full rounded-lg border border-zinc-300 px-3 py-2 text-sm outline-none focus:border-[#2d3870]",placeholder:"Kısa ek not yazabilirsiniz."})]})]}):"nufus"===k||"soyadlar"===k?(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"mb-1 block text-sm font-medium text-zinc-700",children:"nufus"===k?"Nüfus Bilgisi":"Köydeki Soyadlar"}),(0,t.jsx)("input",{value:z,onChange:e=>C(e.target.value),maxLength:"nufus"===k?180:400,className:"h-10 w-full rounded-lg border border-zinc-300 px-3 text-sm outline-none focus:border-[#2d3870]",placeholder:s[k]})]}):(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"mb-1 block text-sm font-medium text-zinc-700",children:Y}),(0,t.jsx)("textarea",{value:z,onChange:e=>C(e.target.value),maxLength:2e3,rows:4,className:"w-full rounded-lg border border-zinc-300 px-3 py-2 text-sm outline-none focus:border-[#2d3870]",placeholder:s[k]})]}),B?(0,t.jsx)("p",{className:"text-sm font-medium text-rose-700",children:B}):null,G?(0,t.jsx)("p",{className:"text-sm font-medium text-emerald-700",children:G}):null]}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t border-zinc-200 px-4 py-3",children:[(0,t.jsx)("button",{type:"button",onClick:()=>y(!1),className:"inline-flex h-10 items-center justify-center rounded-lg px-4 text-sm font-medium text-zinc-700 hover:bg-zinc-100",children:"Kapat"}),(0,t.jsx)("button",{type:"button",onClick:H,disabled:J,className:"inline-flex h-10 items-center justify-center rounded-lg bg-[#1a275c] px-4 text-sm font-semibold text-white hover:bg-[#2d3870] disabled:cursor-not-allowed disabled:opacity-60",children:T?"Gönderiliyor...":"Gönder"})]})]})}):null]})}])},466610,e=>{"use strict";var t=e.i(670878),l=e.i(637984),i=e.i(157289),r=e.i(87825),n=e.i(14872),a=e.i(385550),s=e.i(950014);let o=["soyadlar","gelenekler","gezilecek_yerler","geleneksel_yemekler","tarihcesi","altyapi","saglik"],d={soyadlar:"Köydeki Soyadlar",gelenekler:"Gelenekler",gezilecek_yerler:"Gezilecek Yerler",geleneksel_yemekler:"Geleneksel Yemekler",tarihcesi:"Tarihçesi",altyapi:"Altyapı",saglik:"SaÄlık"},c={soyadlar:"Ãrn: Yılmaz, Demir, Kaya, Aydın, Åahin",gelenekler:"Gelenekler ile ilgili kısa bilgi paylaÅın...",gezilecek_yerler:"Gezilecek yerler ile ilgili kısa bilgi paylaÅın...",geleneksel_yemekler:"Geleneksel yemekler ile ilgili kısa bilgi paylaÅın...",tarihcesi:"Tarihçesi ile ilgili kısa bilgi paylaÅın...",altyapi:"Altyapı ile ilgili kısa bilgi paylaÅın...",saglik:"SaÄlık ile ilgili kısa bilgi paylaÅın..."};function m(e){let i,r,n=(0,l.c)(3),{type:a}=e;n[0]===Symbol.for("react.memo_cache_sentinel")?(i={fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round"},n[0]=i):i=n[0];let s=i;return n[1]!==a?(r=(0,t.jsx)("span",{className:"inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-[linear-gradient(145deg,#dceeff,#edf7ff)] text-[#176ca8] shadow-[inset_0_0_0_1px_rgba(86,157,211,0.18)]",children:(0,t.jsx)("svg",{viewBox:"0 0 24 24",className:"h-5 w-5","aria-hidden":"true",...s,children:"soyadlar"===a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("circle",{cx:"9",cy:"8",r:"3"}),(0,t.jsx)("path",{d:"M3.5 19c.4-3.2 2.2-5 5.5-5s5.1 1.8 5.5 5"}),(0,t.jsx)("path",{d:"M15 6.3a3 3 0 0 1 0 5.4M16 14c2.7.3 4.1 2 4.5 4.5"})]}):"gelenekler"===a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("path",{d:"m12 3 1.4 4.1L17.5 8.5l-4.1 1.4L12 14l-1.4-4.1-4.1-1.4 4.1-1.4L12 3Z"}),(0,t.jsx)("path",{d:"m18.5 14 .7 2.3 2.3.7-2.3.7-.7 2.3-.7-2.3-2.3-.7 2.3-.7.7-2.3Z"})]}):"gezilecek_yerler"===a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("path",{d:"M20 10c0 5-8 11-8 11S4 15 4 10a8 8 0 1 1 16 0Z"}),(0,t.jsx)("circle",{cx:"12",cy:"10",r:"2.5"})]}):"geleneksel_yemekler"===a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("path",{d:"M7 3v7M4.5 3v4.5A2.5 2.5 0 0 0 7 10a2.5 2.5 0 0 0 2.5-2.5V3M7 10v11"}),(0,t.jsx)("path",{d:"M16 3v18M16 3c3 1.5 4 5.5 0 8"})]}):"tarihcesi"===a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("path",{d:"M4 5.5A3.5 3.5 0 0 1 7.5 2H11v17H7.5A3.5 3.5 0 0 0 4 22V5.5Z"}),(0,t.jsx)("path",{d:"M20 5.5A3.5 3.5 0 0 0 16.5 2H13v17h3.5A3.5 3.5 0 0 1 20 22V5.5Z"})]}):"altyapi"===a?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("path",{d:"M4 21V8l8-5 8 5v13M2 21h20"}),(0,t.jsx)("path",{d:"M8 11h2M14 11h2M8 15h2M14 15h2M10 21v-3h4v3"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("path",{d:"M12 21s-8-4.6-8-11a4.5 4.5 0 0 1 8-2.8A4.5 4.5 0 0 1 20 10c0 6.4-8 11-8 11Z"}),(0,t.jsx)("path",{d:"M9 12h6M12 9v6"})]})})}),n[1]=a,n[2]=r):r=n[2],r}e.s(["DetailVillageInfoInline",0,function({locationId:e,locationTitle:l,locationSeoLink:u,provinceName:h,districtName:f,infos:x,pendingInfos:b}){let{userId:p}
1=(0,r.useAuth)(),g=!!p,[y,k]=(0,s.useState)(!1),[w,v]=(0,s.useState)("gelenekler"),[j,N]=(0,s.useState)(""),[S,z]=(0,s.useState)(!1),[C,_]=(0,s.useState)(null),[A,$]=(0,s.useState)(null),[E,M]=(0,s.useState)(null),[L,T]=(0,s.useState)(b);(0,s.useEffect)(()=>{T(b)},[b]);let I=(0,s.useMemo)(()=>d[w],[w]);async function B(){if(g&&!S&&!(j.trim().length<2)){z(!0),_(null),$(null);try{let t=await fetch("/api/village-info/submit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({locationId:e,locationTitle:l,locationSeoLink:u,provinceName:h,districtName:f,infoType:w,infoValue:j.trim()})}),i=await t.json();if(!t.ok||!i.ok)throw Error(i.error||"Bilgi gönderilemedi.");$("TeÅekkür ederiz. Güncellemeniz editör onayına alındı."),await new Promise(e=>setTimeout(e,2400)),T(e=>({...e,[w]:!0})),M(`${d[w]} bilgisi onaya g\xf6nderildi.`),k(!1),$(null)}catch(e){_(e instanceof Error?e.message:"Bilgi gönderilemedi.")}finally{z(!1)}}}return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"mt-5 rounded-[26px] border border-[#c9def1] bg-[linear-gradient(145deg,#edf7ff_0%,#f5faff_48%,#eaf4ff_100%)] p-3 shadow-[0_14px_34px_rgba(37,91,143,0.08)] sm:p-4 md:p-5",children:[(0,t.jsxs)("div",{className:"mb-4 px-1 sm:px-2",children:[(0,t.jsx)("p",{className:"text-[11px] font-bold uppercase tracking-[0.16em] text-[#4f7ca2]",children:"Köyü birlikte tanıyalım"}),(0,t.jsx)("h2",{className:"mt-1 text-xl font-extrabold tracking-[-0.02em] text-[#174f80] sm:text-2xl",children:"Köy Bilgileri"}),(0,t.jsx)("p",{className:"mt-1 text-sm leading-6 text-[#66819a]",children:"BildiÄiniz bilgileri ekleyerek köy sayfasının güncel kalmasına katkıda bulunabilirsiniz."})]}),(0,t.jsx)("div",{className:"space-y-3",children:o.map(e=>{let l,r=x[e],s=!!r?.value?.trim(),o=!!L[e],c=o?"Onay bekliyor":s?"Yeni bilgi ekle":"soyadlar"===e?"Soyisim ekle":"Bilgi ekle";return(0,t.jsxs)("section",{id:"soyadlar"===e?"koy-soyisimleri":void 0,className:"scroll-mt-20 rounded-2xl border border-white/90 bg-white/80 p-4 shadow-[0_5px_18px_rgba(37,91,143,0.06)] backdrop-blur-sm transition hover:border-[#b7d5ec] hover:bg-white sm:p-5",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,t.jsx)(m,{type:e}),(0,t.jsx)("h3",{className:"text-[16px] font-extrabold leading-5 text-[#214c73] sm:text-[17px]",children:d[e]})]}),o?(0,t.jsx)("button",{type:"button",disabled:!0,className:"inline-flex h-8 shrink-0 cursor-not-allowed items-center justify-center rounded-full border border-[#c8d8ec] bg-[#eef3f8] px-3 text-xs font-semibold text-[#6d8098]",children:c}):g?(0,t.jsx)("button",{type:"button",onClick:()=>{v(e),N(""),_(null),$(null),M(null),k(!0)},className:"inline-flex h-8 shrink-0 items-center justify-center rounded-full border border-[#75a9d0] bg-[#f7fbff] px-3 text-xs font-bold text-[#195f93] transition hover:border-[#267db8] hover:bg-[#eaf5ff]",children:c}):(0,t.jsx)(i.SignInButton,{mode:"modal",children:(0,t.jsx)("button",{type:"button",className:"inline-flex h-8 shrink-0 items-center justify-center rounded-full border border-[#75a9d0] bg-[#f7fbff] px-3 text-xs font-bold text-[#195f93] transition hover:border-[#267db8] hover:bg-[#eaf5ff]",children:c})})]}),r?.value?(0,t.jsx)("div",{className:"mt-3 space-y-1 pl-[52px] max-sm:pl-0",children:"soyadlar"===e?0===(l=(0,a.parseVillageSurnameList)(r.value)).length?(0,t.jsx)("p",{className:"text-[15px] leading-7 text-[#6d8098]",children:"Henüz soyadı bilgisi eklenmedi."}):(0,t.jsx)("div",{className:"rounded-xl bg-[#edf7ff] p-3",children:(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:l.map(e=>(0,t.jsx)(n.default,{href:`/search?q=${encodeURIComponent(e)}`,className:"inline-flex items-center rounded-full border border-[#d2e5f4] bg-white px-3 py-1 text-[14px] font-semibold text-[#24577f] transition hover:border-[#91bcdd] hover:bg-[#f7fbff] hover:text-[#006bb6]","aria-label":`${e} soyadı arama sonu\xe7ları`,children:e},e))})}):(0,t.jsx)("p",{className:"whitespace-pre-wrap text-[15px] leading-7 text-[#365d7d]",children:r.value})}):(0,t.jsx)("p",{className:"mt-3 text-[14px] leading-6 text-[#6b8297] sm:pl-[52px] sm:text-[15px] sm:leading-7",children:o?`${d[e]} bilgisi g\xf6nderildi ve edit\xf6r onayı bekliyor.`:`${d[e]} bilgisi hen\xfcz eklenmedi. Bu bilgiyi ekleyerek k\xf6y sayfasına katkıda bulunabilirsiniz.`})]},e)})})]}),E?(0,t.jsx)("p",{className:"mt-2 text-xs font-semibold text-emerald-700",children:E}):null,y?(0,t.jsx)("div",{className:"fixed inset-0 z-[120] bg-black/50 px-4 py-6",onClick:()=>k(!1),children:(0,t.jsxs)("div",{className:"mx-auto w-full max-w-[520px] overflow-hidden rounded-2xl bg-white",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-zinc-200 px-4 py-3",children:[(0,t.jsxs)("h4",{className:"text-xl font-semibold text-[#242833]",children:[I," Bilgisi Ekle"]}),(0,t.jsx)("button",{type:"button",className:"text-2xl leading-none text-zinc-500 hover:text-zinc-800",onClick:()=>k(!1),"aria-label":"Kapat",children:"Ã"})]}),(0,t.jsxs)("div",{className:"space-y-3 px-4 py-4",children:[(0,t.jsx)("p",{className:"text-sm text-zinc-600",children:l}),x[w]?.value?(0,t.jsxs)("div",{className:"rounded-xl border border-[#cfe2f2] bg-[#eef7ff] p-3",children:[(0,t.jsx)("span",{className:"inline-flex rounded-full border border-[#b7d5ec] bg-white px-2.5 py-1 text-[11px] font-bold uppercase tracking-[0.08em] text-[#24628f]",children:"Mevcut bilgi · korunur"}),"soyadlar"===w?(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:(0,a.parseVillageSurnameList)(x[w]?.value??"").map(e=>(0,t.jsx)("span",{className:"inline-flex rounded-full border border-[#c7dfef] bg-white px-3 py-1 text-xs font-semibold text-[#24577f]",children:e},e))}):(0,t.jsx)("p",{className:"mt-2 whitespace-pre-wrap text-sm leading-6 text-[#365d7d]",children:x[w]?.value})]}):null,(0,t.jsxs)("label",{className:"block",children:[(0,t.jsx)("span",{className:"mb-1 block text-sm font-medium text-zinc-700",children:x[w]?.value?"Yeni bilgi ekleyin":I}),(0,t.jsx)("textarea",{value:j,onChange:e=>N(e.target.value),maxLength:"soyadlar"===w?400:2e3,rows:"soyadlar"===w?2:4,className:"w-full rounded-lg border border-zinc-300 px-3 py-2 text-sm outline-none focus:border-[#2d3870]",placeholder:c[w]})]}),C?(0,t.jsx)("p",{className:"text-sm font-medium text-rose-700",children:C}):null,A?(0,t.jsx)("p",{className:"text-sm font-medium text-emerald-700",children:A}):null]}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t border-zinc-200 px-4 py-3",children:[(0,t.jsx)("button",{type:"button",onClick:()=>k(!1),className:"inline-flex h-10 items-center justify-center rounded-lg px-4 text-sm font-medium text-zinc-700 hover:bg-zinc-100",children:"Kapat"}),(0,t.jsx)("button",{type:"button",onClick:B,disabled:S||j.trim().length<2,className:"inline-flex h-10 items-center justify-center rounded-lg bg-[#1a275c] px-4 text-sm font-semibold text-white hover:bg-[#2d3870] disabled:cursor-not-allowed disabled:opacity-60",children:S?"Gönderiliyor...":"Yeni Bilgiyi Gönder"})]})]})}):null]})}])},717689,e=>{"use strict";var t=e.i(637984),l=e.i(950014);function i(e){let t=String(e??"").trim();if(!t)return"";if(t.startsWith("http://")||t.startsWith("https://"))try{let e=new URL(t);return i(e.pathname)}catch{return""}let l=t.split("?")[0]?.split("#")[0]?.trim()??"";return l?l.startsWith("/")?l:`/${l}`:""}function r(e){return e.path}function n(e){return!!e.element}function a(e){return Number.isFinite(e.id)&&e.id>0&&e.path}function s(e){return{id:Number(e.id),path:i(e.path)}}e.s(["DetailContinuationUrlSync",0,function(e){let o,d,c,m,u=(0,t.c)(10),{defaultPath:h,items:f,continuationSectionId:x,reviewAnchorId:b,itemIdPrefix:p}=e,g=void 0===b?"reviews":b,y=void 0===p?"detail-continuation-item-":p,
1k=(0,l.useRef)("");u[0]===Symbol.for("react.memo_cache_sentinel")?(o=new Set,u[0]=o):o=u[0];let w=(0,l.useRef)(o);u[1]!==f?(d=f.map(s).filter(a),u[1]=f,u[2]=d):d=u[2];let v=d;return u[3]!==x||u[4]!==h||u[5]!==y||u[6]!==v||u[7]!==g?(c=()=>{if(0===v.length)return;let e=i(h);if(!e)return;let t=document.getElementById(x);if(!t)return;k.current=i(window.location.pathname)||e;let l=v.map(e=>({...e,element:document.getElementById(`${y}${e.id}`)})).filter(n);if(0===l.length)return;let a=new Map;for(let e of l)a.set(e.element,e.path);let s=new Set(l.map(r)),o=new Map,d=e=>{let t=i(e);if(t&&t!==k.current){i(window.location.pathname)!==t&&window.history.replaceState(window.history.state,"",t),k.current=t;let e=i(t);if(e&&!(e.startsWith("/admin")||e.startsWith("/api")||e.startsWith("/_next"))&&(fetch("/api/stats/hit",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:e}),keepalive:!0}).catch(()=>{}),"function"==typeof window.gtag))try{window.gtag("event","page_view",{page_path:e,page_title:document.title,page_location:`${window.location.origin}${e}`})}catch{}if(s.has(t)&&!w.current.has(t)){let e;w.current.add(t),(e=i(t))&&fetch("/api/legacy/read-hit",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:e}),keepalive:!0}).catch(()=>{})}}},c=new IntersectionObserver(e=>{for(let t of e){let e=a.get(t.target);e&&o.set(e,t.isIntersecting?t.intersectionRatio:0)}let t="",l=0;for(let[e,i]of o.entries())i>l&&(l=i,t=e);t&&d(t)},{threshold:[0,.2,.45,.7],rootMargin:"-20% 0px -45% 0px"});for(let e of l)c.observe(e.element);let m=document.getElementById(g),u=m?new IntersectionObserver(t=>{let l=t[0];l?.isIntersecting&&d(e)},{threshold:.25}):null;m&&u&&u.observe(m);let f=new IntersectionObserver(t=>{let l=t[0];l&&!l.isIntersecting&&l.boundingClientRect.top>0&&d(e)},{threshold:0});return f.observe(t),()=>{c.disconnect(),f.disconnect(),u?.disconnect()}},m=[x,h,y,v,g],u[3]=x,u[4]=h,u[5]=y,u[6]=v,u[7]=g,u[8]=c,u[9]=m):(c=u[8],m=u[9]),(0,l.useEffect)(c,m),null}])},74604,e=>{"use strict";var t=e.i(637984),l=e.i(961461),i=e.i(950014);function r(){if(window.location.hash)return;let e=window.requestAnimationFrame(n);return()=>{window.cancelAnimationFrame(e)}}function n(){let e=document.querySelector(".landing-header-wrap");if(!e)return void window.scrollTo({top:0,left:0,behavior:"auto"});let t=Math.max(0,Math.round(e.getBoundingClientRect().bottom+window.scrollY-8));window.scrollTo({top:t,left:0,behavior:"auto"})}e.s(["DetailPageInitialScroll",0,function(){let e,n=(0,t.c)(2),a=(0,l.usePathname)();return n[0]!==a?(e=[a],n[0]=a,n[1]=e):e=n[1],(0,i.useEffect)(r,e),null}])},150674,e=>{"use strict";var t=e.i(670878),l=e.i(637984),i=e.i(950014);e.s(["DetailImageWithFallback",0,function(e){let r,n,a,s,o=(0,l.c)(20),{src:d,alt:c,className:m,fallbackSrc:u,secondarySrc:h,tertiarySrc:f,loading:x,decoding:b}=e,p=void 0===x?"lazy":x,g=void 0===b?"async":b,[y,k]=(0,i.useState)(d),[w,v]=(0,i.useState)(!1),[j,N]=(0,i.useState)(!1);return o[0]!==d?(r=()=>{k(d),v(!1),N(!1)},o[0]=d,o[1]=r):r=o[1],o[2]!==h||o[3]!==d||o[4]!==f?(n=[d,h,f],o[2]=h,o[3]=d,o[4]=f,o[5]=n):n=o[5],(0,i.useEffect)(r,n),o[6]!==y||o[7]!==u||o[8]!==h||o[9]!==f||o[10]!==w||o[11]!==j?(a=()=>{let e=String(h??"").trim(),t=String(f??"").trim();if(!w&&e&&y!==e){k(e),v(!0);return}if(!j&&t&&y!==t){k(t),N(!0);return}y!==u&&k(u)},o[6]=y,o[7]=u,o[8]=h,o[9]=f,o[10]=w,o[11]=j,o[12]=a):a=o[12],o[13]!==c||o[14]!==m||o[15]!==y||o[16]!==g||o[17]!==p||o[18]!==a?(s=(0,t.jsx)("img",{src:y,alt:c,className:m,loading:p,decoding:g,onError:a}),o[13]=c,o[14]=m,o[15]=y,o[16]=g,o[17]=p,o[18]=a,o[19]=s):s=o[19],s}])},57188,e=>{"use strict";var t=e.i(670878),l=e.i(637984),i=e.i(950014);let r='[data-legacy-content="1"] img',n="data-legacy-img-bound";function a(e){let t=String(e??"").trim();if(!t)return"";let l=t.startsWith("//")?`https:${t}`:t;try{return new URL(l,window.location.origin).toString()}catch{return""}}function s(e){let t=String(e??"").trim().toLowerCase();return!t||t.startsWith("data:image/gif")||t.includes("r0lgodlhaqab")}function o(e,t,l){let i=a(l);!i||t.has(i)||(t.add(i),e.push(i))}function d(e){let t=[],l=new Set;for(let i of[e.getAttribute("src"),e.currentSrc,e.getAttribute("data-src"),e.getAttribute("data-original"),e.getAttribute("data-lazy-src"),e.getAttribute("data-legacy-src")])if(i)for(let e of(o(t,l,
1i),function(e){let t=[],l=new Set,i=a(e);if(!i)return t;let r=new URL(i),n=r.hostname.toLowerCase(),s=r.pathname,d=r.search??"",c=s.match(/^\/news_t\/(\d+)(?:\.[a-z0-9]+)?$/i);if(c?.[1]){let e=c[1];o(t,l,`https://d.koylerim.com/d/news/${e}.jpg`),o(t,l,`https://d.koylerim.com/d/news_ts/${e}.jpg`),o(t,l,`https://www.koylerim.com/d/news/${e}.jpg`),o(t,l,`https://www.koylerim.com/d/news_ts/${e}.jpg`)}let m=s.match(/^\/video_t\/(\d+)(?:\.[a-z0-9]+)?$/i);if(m?.[1]){let e=m[1];o(t,l,`https://d.koylerim.com/d/video/${e}.jpg`),o(t,l,`https://www.koylerim.com/d/video/${e}.jpg`)}return s.startsWith("/other/")&&(o(t,l,`https://d.koylerim.com/d${s}${d}`),o(t,l,`https://www.koylerim.com${s}${d}`),o(t,l,`https://www.koylerim.com/d${s}${d}`)),"d.koylerim.com"===n&&o(t,l,`https://www.koylerim.com${s}${d}`),t}(i)))o(t,l,e);return t}function c(e){let t=a(e.currentSrc||e.getAttribute("src")||"");return t&&!s(t)?t:d(e).find(e=>!s(e))||t}function m(e){let t=String(e??"").trim().toLowerCase();return!!t&&/\.(avif|webp|png|jpe?g|gif)(?:\?.*)?(?:#.*)?$/.test(t)}function u(e){return e.stopPropagation()}function h(e){return!s(e)}e.s(["LegacyContentImageRecovery",0,function(){let e,o,f,x,b,p=(0,l.c)(7),[g,y]=(0,i.useState)(null);return p[0]!==g?(e=()=>{if(!g)return;let e=e=>{"Escape"===e.key&&y(null)};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},o=[g],p[0]=g,p[1]=e,p[2]=o):(e=p[1],o=p[2]),(0,i.useEffect)(e,o),p[3]===Symbol.for("react.memo_cache_sentinel")?(f=()=>{let e=[],t=t=>{if("1"===t.getAttribute(n))return;t.setAttribute(n,"1");let l=d(t);s(t.getAttribute("src")??"")&&l.length>=1&&!s(l[0])&&(t.src=l[0]);let i=a(t.currentSrc||t.getAttribute("src")||""),r=Math.max(0,l.findIndex(e=>e===i));if(r<0&&(r=0),s(i)){let e=l.find(h);e&&e!==i&&(t.src=e,r=Math.max(0,l.indexOf(e)))}let o=()=>{for(let e=r+1;e<l.length;e+=1){let i=l[e];if(i&&i!==t.src){r=e,t.src=i;return}}},u=e=>{let l=t.closest("a"),i=l?.getAttribute("href")??"";if(!(!l||!i||m(i)))return;let r=c(t);r&&(e.preventDefault(),y({src:r,alt:t.getAttribute("alt")||"Icerik gorseli"}))},f=e=>{let l=t.closest("a"),i=l?.getAttribute("href")??"";if(!(!l||!i||m(i))||"Enter"!==e.key&&" "!==e.key)return;let r=c(t);r&&(e.preventDefault(),y({src:r,alt:t.getAttribute("alt")||"Icerik gorseli"}))};t.closest("a")||(t.style.cursor="zoom-in",t.setAttribute("tabindex","0")),t.addEventListener("error",o),t.addEventListener("click",u),t.addEventListener("keydown",f),e.push(()=>t.removeEventListener("error",o)),e.push(()=>t.removeEventListener("click",u)),e.push(()=>t.removeEventListener("keydown",f)),e.push(()=>t.removeAttribute(n))},l=e=>{for(let l of Array.from(e.querySelectorAll(r)))t(l)};l(document);let i=new MutationObserver(e=>{for(let i of e)for(let e of Array.from(i.addedNodes))e instanceof Element&&(e.matches?.(r)&&t(e),l(e))});return document.body&&i.observe(document.body,{childList:!0,subtree:!0}),()=>{for(let t of(i.disconnect(),e))t()}},x=[],p[3]=f,p[4]=x):(f=p[3],x=p[4]),(0,i.useEffect)(f,x),p[5]!==g?(b=g?(0,t.jsxs)("div",{className:"fixed inset-0 z-[140] flex items-center justify-center bg-black/90 p-4",role:"dialog","aria-modal":"true",onClick:()=>y(null),children:[(0,t.jsx)("button",{type:"button",className:"absolute right-4 top-4 roun
1ded border border-white/30 bg-black/40 px-3 py-1.5 text-sm font-semibold text-white",onClick:()=>y(null),children:"Kapat"}),(0,t.jsx)("img",{src:g.src,alt:g.alt,className:"max-h-[92vh] max-w-[92vw] object-contain",onClick:u})]}):null,p[5]=g,p[6]=b):b=p[6],b}])},425717,e=>{"use strict";let t;var l=e.i(670878),i=e.i(331134),r=e.i(961461),n=e.i(950014);e.s(["PrivateAdBanner",0,function({className:e=""}){let a=(0,r.usePathname)(),[s,o]=(0,n.useState)(null),[d,c]=(0,n.useState)(""),m=(0,n.useRef)(null),u=(0,n.useRef)(""),h=(0,n.useRef)(new Set);function f(e){if(!s||!u.current)return;let t=`${u.current}:${s.id}:${e}`;h.current.has(t)||(h.current.add(t),fetch("/api/private-ads/event",{method:"POST",headers:{"Content-Type":"application/json"},keepalive:!0,body:JSON.stringify({id:s.id,viewId:u.current,event:e,device:window.matchMedia("(min-width: 1024px)").matches?"desktop":"mobile"})}).then(e=>{e.ok||h.current.delete(t)}).catch(()=>h.current.delete(t)))}return((0,n.useEffect)(()=>{let e,l=(t&&t.path===a||(t={path:a,id:crypto.randomUUID(),owners:0}),e=t,e.owners++,{id:e.id,release:()=>{e.owners--,e.owners||t!==e||(t=void 0)}});u.current=l.id,h.current.clear();let i=new AbortController;return fetch("/api/private-ads/active",{cache:"no-store",signal:i.signal}).then(e=>e.ok?e.json():{ad:null}).then(e=>{i.signal.aborted||o(e.ad)}).catch(()=>{i.signal.aborted||o(null)}),()=>{i.abort(),l.release()}},[a]),(0,n.useEffect)(()=>{let e,t=m.current;if(!t||!s||d!==s.imageUrl)return;let l=!1,i=()=>{clearTimeout(e),l&&"visible"===document.visibilityState&&(e=setTimeout(()=>f("impression"),1e3))},r=new IntersectionObserver(e=>{l=e[0].isIntersecting&&e[0].intersectionRatio>=.5,i()},{threshold:[0,.5]});return r.observe(t),document.addEventListener("visibilitychange",i),()=>{clearTimeout(e),r.disconnect(),document.removeEventListener("visibilitychange",i)}},[s,d,a]),s)?(0,l.jsx)("a",{ref:m,href:s.targetUrl,target:"_blank",rel:"noopener noreferrer sponsored",onClick:()=>f("click"),onAuxClick:e=>{1===e.button&&f("click")},"aria-label":`${s.title} - Reklam (yeni sekmede a\xe7ılır)`,className:`overflow-hidden rounded-2xl border border-[#cbdff0] bg-[#10243a] shadow-sm transition-shadow hover:shadow-md focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[#0071bc] ${e}`,children:(0,l.jsx)(i.default,{src:s.imageUrl,alt:s.altText,width:s.width,height:s.height,unoptimized:!0,onLoad:()=>c(s.imageUrl),onError:()=>c(""),className:"block h-auto w-full"})}):null}])},77341,e=>{"use strict";var t=e.i(670878),l=e.i(637984),i=e.i(950014);function r(e){return!e}e.s(["CollapsibleLegacyContent",0,function(e){let n,a,s,o,d,c,m,u,h,f,x=(0,l.c)(32),{summary:b,html:p,collapsible:g}=e,y=void 0===g||g,k=(0,i.useRef)(null),[w,v]=(0,i.useState)(!1),[j,N]=(0,i.useState)(!0),[S,z]=(0,i.useState)(330),[C,_]=(0,i.useState)(!1);x[0]!==y?(n=()=>{if(!y)return;let e=k.current;if(!e)return;let t=()=>{let t=e.querySelector('[data-koylerim-toc="1"]'),l=330;if(t){let i=e.getBoundingClientRect(),r=Math.ceil(t.getBoundingClientRect().bottom-i.top);Number.isFinite(r)&&r>0&&(l=r)}z(l),_(!!t),N(e.scrollHeight>l+8)};t();let l=new ResizeObserver(t);l.observe(e);let i=e.querySelector('[data-koylerim-toc="1"]'),r=e.querySelector('[data-collapsible-summary="1"]');return i&&l.observe(i),r&&l.observe(r),window.addEventListener("resize",t),document.fonts?.ready.then(t),()=>{l.disconnect(),window.removeEventListener("resize",t)}},x[0]=y,x[1]=n):n=x[1],x[2]!==y||x[3]!==p||x[4]!==b?(a=[p,b,y],x[2]=y,x[3]=p,x[4]=b,x[5]=a):a=x[5],(0,i.useEffect)(n,a);let A=y&&!w,$=A?"overflow-hidden":"overflow-visible";return x[6]!==S||x[7]!==A?(s=A?{maxHeight:`${S}px`}:void 0,x[6]=S,x[7]=A,x[8]=s):s=x[8],x[9]!==b?(o=b?(0,t.jsx)("p",{"data-collapsible-summary":"1",className:"mb-5 text-[17px] font-normal leading-8 text-[#244f7a]",children:b}):null,x[9]=b,x[10]=o):o=x[10],x[11]!==p?(d=(0,t.jsx)("div",{className:"legacy-content details-content collapsible-about-copy","data-legacy-content":"1",dangerouslySetInnerHTML:{__html:p}}),x[11]=p,x[12]=d):d=x[12],x[13]!==$||x[14]!==s||x[15]!==o||x[16]!==d?(c=(0,t.jsxs)("div",{ref:k,className:$,style:s,children:[o,d]}),x[13]=$,x[14]=s,x[15]=o,x[16]=d,x[17]=c):c=x[17],x[18]!==j||x[19]!==C||x[20]!==A?(m=A&&j&&!C?(0,t.jsx)("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-28 bg-gradient-to-b from-transparent via-white/80 to-white","aria-hidden":!0}):null,x[18]=j,x[19]=C,x[20]=A,x[21]=m):m=x[21],x[22]!==c||x[23]!==m?(u=(0,t.jsxs)("div",{className:"relative",children:[c,m]}),x[22]=c,x[23]=m,x[24]=u):u=x[24],x[25]!==j||x[26]!==y||x[27]!==w?(h=y&&j?(0,t.jsx)("div",{className:"relative z-10 mt-5 flex justify-center",children:(0,t.jsxs)("button",{type:"button",onClick:()=>v(r),"aria-expanded":w,className:"inline-flex min-h-11 items-center justify-center gap-3 rounded-full border border-[#9fc7e8] bg-[#f6faff] px-5 text-sm font-semibold text-[#155f99] shadow-[0_5px_16px_rgba(21,95,153,0.08)] transition hover:border-[#4d96cf] hover:bg-white",children:[w?"Açıklamayı kısalt":"Tüm açıklamayı göster",(0,t.jsx)("svg",{viewBox:"0 0 20 20",className:`h-4 w-4 transition-transform ${w?"rotate-180":""}`,fill:"none",stroke:"currentColor",strokeWidth:"1.8","aria-hidden":!0,
1children:(0,t.jsx)("path",{d:"m6.5 8 3.5 3.5L13.5 8",strokeLinecap:"round",strokeLinejoin:"round"})})]})}):null,x[25]=j,x[26]=y,x[27]=w,x[28]=h):h=x[28],x[29]!==u||x[30]!==h?(f=(0,t.jsxs)("div",{className:"collapsible-about mt-5",children:[u,h]}),x[29]=u,x[30]=h,x[31]=f):f=x[31],f}])}]);
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.