PageSourceSearch

https://imgrosetta.webtekno.com/static/production/js/main2.js?v=mr92xtp2

js webtekno.com collected 2026-09-24 17:11:25 UTC 76,526 bytes, 333 lines download raw bytes

1const He="modulepreload",$e=function(d){return"/build/"+d},Ce={},Te=function(l,a,e){let v=Promise.resolve();if(a&&a.length>0){document.getElementsByTagName("link");const t=document.querySelector("meta[property=csp-nonce]"),L=(t==null?void 0:t.nonce)||(t==null?void 0:t.getAttribute("nonce"));v=Promise.allSettled(a.map(j=>{if(j=$e(j),j in Ce)return;Ce[j]=!0;const _=j.endsWith(".css"),z=_?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${j}"]${z}`))return;const C=document.createElement("link");if(C.rel=_?"stylesheet":He,_||(C.as="script"),C.crossOrigin="",C.href=j,L&&C.setAttribute("nonce",L),document.head.appendChild(C),_)return new Promise((I,F)=>{C.addEventListener("load",I),C.addEventListener("error",()=>F(new Error(`Unable to preload CSS for ${j}`)))})}))}function E(t){const L=new Event("vite:preloadError",{cancelable:!0});if(L.payload=t,window.dispatchEvent(L),!L.defaultPrevented)throw t}return v.then(t=>{for(const L of t||[])L.status==="rejected"&&E(L.reason);return l().catch(E)})};var Ge={exports:{}};(function(d){(function(l,a){var e=a(l,l.document,Date);l.lazySizes=e,d.exports&&(d.exports=e)})(typeof window<"u"?window:{},function(a,e,v){var E,t;if(function(){var o,n={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",fastLoadedClass:"ls-is-cached",iframeLoadMode:0,srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};t=a.lazySizesConfig||a.lazysizesConfig||{};for(o in n)o in t||(t[o]=n[o])}(),!e||!e.getElementsByClassName)return{init:function(){},cfg:t,noSupport:!0};var L=e.documentElement,j=a.HTMLPictureElement,_="addEventListener",z="getAttribute",C=a[_].bind(a),I=a.setTimeout,F=a.requestAnimationFrame||I,G=a.requestIdleCallback,N=/^picture$/i,Z=["load","error","lazyincluded","_lazyloaded"],g={},r=Array.prototype.forEach,m=function(o,n){return g[n]||(g[n]=new RegExp("(\\s|^)"+n+"(\\s|$)")),g[n].test(o[z]("class")||"")&&g[n]},y=function(o,n){m(o,n)||o.setAttribute("class",(o[z]("class")||"").trim()+" "+n)},B=function(o,n){var f;(f=m(o,n))&&o.setAttribute("class",(o[z]("class")||"").replace(f," "))},H=function(o,n,f){var q=f?_:"removeEventListener";f&&H(o,n),Z.forEach(function(P){o[q](P,n)})},Y=function(o,n,f,q,P){var s=e.createEvent("Event");return f||(f={}),f.instance=E,s.initEvent(n,!q,!P),s.detail=f,o.dispatchEvent(s),s},R=function(o,n){var f;!j&&(f=a.picturefill||t.pf)?(n&&n.src&&!o[z]("srcset")&&o.setAttribute("srcset",n.src),f({reevaluate:!0,elements:[o]})):n&&n.src&&(o.src=n.src)},S=function(o,n){return(getComputedStyle(o,null)||{})[n]},c=function(o,n,f){for(f=f||o.offsetWidth;f<t.minSize&&n&&!o._lazysizesWidth;)f=n.offsetWidth,n=n.parentNode;return f},u=function(){var o,n,f=[],q=[],P=f,s=function(){var p=P;for(P=f.length?q:f,o=!0,n=!1;p.length;)p.shift()();o=!1},x=function(p,b){o&&!b?p.apply(this,arguments):(P.push(p),n||(n=!0,(e.hidden?I:F)(s)))};return x._lsFlush=s,x}(),T=function(o,n){return n?function(){u(o)}:function(){var f=this,q=arguments;u(function(){o.apply(f,q)})}},$=function(o){var n,f=0,q=t.throttleDelay,P=t.ricTimeout,s=function(){n=!1,f=v.now(),o()},x=G&&P>49?function(){G(s,{timeout:P}),P!==t.ricTimeout&&(P=t.ricTimeout)}:T(function(){I(s)},!0);return function(p){var b;(p=p===!0)&&(P=33),!n&&(n=!0,b=q-(v.now()-f),b<0&&(b=0),p||b<9?x():I(x,b))}},A=function(o){var n,f,q=99,P=function(){n=null,o()}
1,s=function(){var x=v.now()-f;x<q?I(s,q-x):(G||P)(P)};return function(){f=v.now(),n||(n=I(s,q))}},k=function(){var o,n,f,q,P,s,x,p,b,D,W,ee,ae=/^img$/i,K=/^iframe$/i,_e="onscroll"in a&&!/(gle|ing)bot/.test(navigator.userAgent),Fe=0,ce=0,te=0,de=-1,be=function(i){te--,(!i||te<0||!i.target)&&(te=0)},xe=function(i){return ee==null&&(ee=S(e.body,"visibility")=="hidden"),ee||!(S(i.parentNode,"visibility")=="hidden"&&S(i,"visibility")=="hidden")},Oe=function(i,w){var O,U=i,X=xe(i);for(p-=w,W+=w,b-=w,D+=w;X&&(U=U.offsetParent)&&U!=e.body&&U!=L;)X=(S(U,"opacity")||1)>0,X&&S(U,"overflow")!="visible"&&(O=U.getBoundingClientRect(),X=D>O.left&&b<O.right&&W>O.top-1&&p<O.bottom+1);return X},we=function(){var i,w,O,U,X,V,re,oe,se,ne,ie,le,Q=E.elements;if((q=t.loadMode)&&te<8&&(i=Q.length)){for(w=0,de++;w<i;w++)if(!(!Q[w]||Q[w]._lazyRace)){if(!_e||E.prematureUnveil&&E.prematureUnveil(Q[w])){ue(Q[w]);continue}if((!(oe=Q[w][z]("data-expand"))||!(V=oe*1))&&(V=ce),ne||(ne=!t.expand||t.expand<1?L.clientHeight>500&&L.clientWidth>500?500:370:t.expand,E._defEx=ne,ie=ne*t.expFactor,le=t.hFac,ee=null,ce<ie&&te<1&&de>2&&q>2&&!e.hidden?(ce=ie,de=0):q>1&&de>1&&te<6?ce=ne:ce=Fe),se!==V&&(s=innerWidth+V*le,x=innerHeight+V,re=V*-1,se=V),O=Q[w].getBoundingClientRect(),(W=O.bottom)>=re&&(p=O.top)<=x&&(D=O.right)>=re*le&&(b=O.left)<=s&&(W||D||b||p)&&(t.loadHidden||xe(Q[w]))&&(n&&te<3&&!oe&&(q<3||de<4)||Oe(Q[w],V))){if(ue(Q[w]),X=!0,te>9)break}else!X&&n&&!U&&te<4&&de<4&&q>2&&(o[0]||t.preloadAfterLoad)&&(o[0]||!oe&&(W||D||b||p||Q[w][z](t.sizesAttr)!="auto"))&&(U=o[0]||Q[w])}U&&!X&&ue(U)}},J=$(we),Ee=function(i){var w=i.target;if(w._lazyCache){delete w._lazyCache;return}be(i),y(w,t.loadedClass),B(w,t.loadingClass),H(w,ke),Y(w,"lazyloaded")},je=T(Ee),ke=function(i){je({target:i.target})},Pe=function(i,w){var O=i.getAttribute("data-load-mode")||t.iframeLoadMode;O==0?i.contentWindow.location.replace(w):O==1&&(i.src=w)},qe=function(i){var w,O=i[z](t.srcsetAttr);(w=t.customMedia[i[z]("data-media")||i[z]("media")])&&i.setAttribute("media",w),O&&i.setAttribute("srcset",O)},Re=T(function(i,w,O,U,X){var V,re,oe,se,ne,ie;(ne=Y(i,"lazybeforeunveil",w)).defaultPrevented||(U&&(O?y(i,t.autosizesClass):i.setAttribute("sizes",U)),re=i[z](t.srcsetAttr),V=i[z](t.srcAttr),X&&(oe=i.parentNode,se=oe&&N.test(oe.nodeName||"")),ie=w.firesLoad||"src"in i&&(re||V||se),ne={target:i},y(i,t.loadingClass),ie&&(clearTimeout(f),f=I(be,2500),H(i,ke,!0)),se&&r.call(oe.getElementsByTagName("source"),qe),re?i.setAttribute("srcset",re):V&&!se&&(K.test(i.nodeName)?Pe(i,V):i.src=V),X&&(re||se)&&R(i,{src:V})),i._lazyRace&&delete i._lazyRace,B(i,t.lazyClass),u(function(){var le=i.complete&&i.naturalWidth>1;(!ie||le)&&(le&&y(i,t.fastLoadedClass),Ee(ne),i._lazyCache=!0,I(function(){"_lazyCache"in i&&delete i._lazyCache},9)),i.loading=="lazy"&&te--},!0)}),ue=function(i){if(!i._lazyRace){var w,O=ae.test(i.nodeName),U=O&&(i[z](t.sizesAttr)||i[z]("sizes")),X=U=="auto";(X||!n)&&O&&(i[z]("src")||i.srcset)&&!i.complete&&!m(i,t.errorClass)&&m(i,t.lazyClass)||(w=Y(i,"lazyunveilread").detail,X&&h.updateElem(i,!0,i.offsetWidth),i._lazyRace=!0,te++,Re(i,w,X,U,O))}},Ne=A(function(){t.loadMode=3,J()}),Le=function(){t.loadMode==3&&(t.loadMode=2),Ne()},me=function(){if(!n){if(v.now()-P<999){I(me,999);return}n=!0,t.loadMode=3,J(),C("scroll",Le,!0)}};return{_:function(){P=v.now(),E.elements=e.getElementsByClassName(t.lazyClass),o=e.getElementsByClassName(t.lazyClass+" "+t.preloadClass),C("scroll",J,!0),C("resize",J,!0),C("pageshow",function(i){if(i.persisted){var w=e.querySelectorAll("."+t.loadingClass);w.length&&w.forEach&&F(function(){w.forEach(function(O){O.complete&&ue(O)})})}}),a.MutationObserver?new MutationObserver(J).observe(L,{childList:!0,subtree:!0,attributes:!0}):(L[_]("DOMNodeInserted",J,!0),L[_]("DOMAttrModified",J,!0),setInterval(J,999)),C("hashchange",J,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach(function(i){e[_](i,J,!0)}),/d$|^c/.test(e.readyState)?me():(C("load",me),e[_]("DOMContentLoaded",J),I(me,2e4)),E.elements.length?(we(),u._lsFlush()):J()},checkElems:J,unveil:ue,_aLSL:Le}}(),h=function(){var o,n=T(function(s,x,p,b){var D,W,ee;if(s._lazysizesWidth=b,b+="px",s.setAttribute("sizes",b),N.test(x.nodeName||""))for(D=x.getElementsByTagName("source"),W=0,ee=D.length;W<ee;W++)D[W].setAttribute("sizes",b);p.detail.dataAttr||R(s,p.detail)}),f=function(s,x,p){var b,D=s.parentNode;D&&(p=c(s,D,p),b=Y(s,"lazybeforesizes",{width:p,dataAttr:!!x}),b.defaultPrevented||(p=b.detail.width,p&&p!==s._lazysizesWidth&&n(s,D,b,p)))},q=function(){var s,x=o.length;if(x)for(s=0;s<x;s++)f(o[s])},P=A(q);return{_:function(){o=e.getElementsByClassName(t.autosizesClass),C("resize",P)},checkElems:P,updateElem:f}}(),M=function(){!M.i&&e.getElementsByClassName&&(M.i=!0,h._(),k._())};return I(function(){t.init&&M()}),E={cfg:t,autoSizer:h,loader:k,init:M,uP:R,aC:y,rC:B,hC:m,fire:Y,gW:c,rAF:u},E})})(Ge);let fe=null,Be=null;function Ke(){return fe||(fe=document.createElement("div"),fe.className="favorite-tooltip",document.body.appendChild(fe)),fe}window.toggleMyList=function(d){let l=JSON.parse(localStorage.getItem("webtekno_mylist"))||[];const a={title:d.getAttribute("data-post-title"),url:d.getAttribute("data-post-url"),image:d.getAttribute("data-post-image"),author:d.getAttribute("data-post-author"),date:d.getAttribute("data-post-date")},e=l.findIndex(v=>v.url===a.url);e>-1?(l.splice(e,1),d.classList.remove("selected"),requestAnimationFrame(()=>Se(d,"removed"))):(l.push(a),d.classList.add("selected"),requestAnimationFrame(()=>Se(d,"added"))),"requestIdleCallback"in window?requestIdleCallback(()=>{localStorage.setItem("webtekno_mylist",JSON.stringify(l))},{timeout:1e3}):localStorage.setItem("webtekno_mylist",JSON.stringify(l))};function Se(d,l="added"){const a=Ke();a.style.transform="",l==="removed"?a.innerHTML='Favorilerinizden kaldırdınız. Görmek için <a href="/favorilerim" target="_blank" class="text-blue-300 hover:text-blue-200 underline">tıklayın.</a>':a.innerHTML='Favorilerinize eklediniz. Görmek için <a href="/favorilerim" target="_blank" class="text-blue-300 hover:text-blue-200 underline">tıklayın.</a>';const e=d.getBoundingClientRect();requestAnimationFrame(()=>{a.style.left=e.left+e.width/2+"px",a.style.top=e.top-10+"px",a.dataset.open="",requestAnimationFrame(()=>{const v=a.getBoundingClientRect(),E=window.innerWidth;v.left<10&&(a.style.left=v.width/2+10+"px"),v.right>
1E-10&&(a.style.left=E-v.width/2-10+"px"),e.top-v.height<10&&(a.style.top=e.bottom+10+"px",a.style.transform="translateX(-50%) translateY(0)")})}),clearTimeout(Be),Be=setTimeout(()=>{delete a.dataset.open},3e3)}document.addEventListener("DOMContentLoaded",function(){initializeFavoriteButtons()});document.addEventListener("contentReinitialized",function(d){d.detail&&d.detail.container&&initializeFavoriteButtons(d.detail.container)});window.initializeFavoriteButtons=function(d=document){let l=JSON.parse(localStorage.getItem("webtekno_mylist"))||[];d.querySelectorAll(".added-list").forEach(e=>{const v=e.getAttribute("data-post-url");l.some(E=>E.url===v)?e.classList.add("selected"):e.classList.remove("selected")})};document.addEventListener("DOMContentLoaded",()=>{var g;let d=(g=document.querySelector('meta[name="csrf-token"]'))==null?void 0:g.getAttribute("content");document.body.insertAdjacentHTML("beforeend",`
2        <div id="followSettingsModal" class="fixed inset-0 bg-black/70 z-[10000] hidden flex items-center justify-center p-4">
3            <div class="w-full max-w-[500px] mx-auto relative max-h-[90vh] overflow-y-auto rounded-md">
4                <button id="closeFollowSettings" class="absolute right-3 top-3 w-9 h-9 flex items-center justify-center rounded-full text-[#222] hover:bg-[#F3F3F3] dark:text-white dark:hover:bg-[#333] transition-colors z-10" aria-label="Kapat">
5                    <svg width="24" height="24" viewBox="0 0 24 24" fill="none">
6                        <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" fill="currentColor"/>
7                    </svg>
8                </button>
9
10                <div class="bg-white dark:bg-[#1a1a1a] rounded-[20px] shadow-lg">
11                    <div class="px-8 py-6">
12                        <div class="text-center mb-6">
13                            <h3 class="text-lg font-semibold text-gray-700 dark:text-gray-200">Takip Ayarları</h3>
14                            <p class="text-sm text-gray-500 dark:text-gray-400 mt-1">Takip etmek istediğiniz yazarları seçin</p>
15                        </div>
16
17                        <div id="followAuthorsSearch" class="mb-4">
18                            <input type="text" id="authorSearchInput" placeholder="Yazar ara..."
19                                class="w-full px-4 py-2 border border-gray-300 dark:border-[#444] dark:bg-[#2a2a2a] dark:text-white dark:placeholder-gray-500 rounded-lg focus:outline-none focus:ring-1 focus:ring-[#D92E2E] focus:border-[#D92E2E] text-sm">
20                        </div>
21
22                        <div id="followAuthorsLoading" class="flex justify-center py-8">
23                            <svg class="animate-spin h-8 w-8 text-[#D92E2E]" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
24                                <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
25                                <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
26                            </svg>
27                        </div>
28
29                        <div id="followAuthorsList" class="space-y-2 max-h-[50vh] overflow-y-auto hidden"></div>
30
31                        <div id="followAuthorsEmpty" class="text-center py-8 text-gray-500 dark:text-gray-400 text-sm hidden">
32                            Yazar bulunamadı.
33                        </div>
34
35                        <div id="followStatus" class="hidden px-4 py-3 rounded-lg mt-4 text-sm"></div>
36                    </div>
37                </div>
38            </div>
39        </div>
40    `);const a=document.getElementById("followSettingsModal"),e=document.getElementById("closeFollowSettings"),v=document.getElementById("followAuthorsList"),E=document.getElementById("followAuthorsLoading"),t=document.getElementById("followAuthorsEmpty"),L=document.getElementById("authorSearchInput"),j=document.getElementById("followStatus");let _=[];const z=async()=>{var r;try{const y=await(await fetch("/csrf-token",{method:"POST",headers:{"Content-Type":"application/json"}})).json();y.token&&(d=y.token,(r=document.querySelector('meta[name="csrf-token"]'))==null||r.setAttribute("content",y.token))}catch(m){console.error("CSRF token güncellenirken hata:",m)}},C=(r,m=!1)=>{j.textContent=r,j.classList.remove("hidden","bg-green-50","text-green-700","bg-red-50","text-red-700","border-green-200","border-red-200","dark:bg-green-900/30","dark:text-green-400","dark:border-green-800","dark:bg-red-900/30","dark:text-red-400","dark:border-red-800"),j.classList.add("border"),m?j.classList.add("bg-red-50","text-red-700","border-red-200","dark:bg-red-900/30","dark:text-red-400","dark:border-red-800"):j.classList.add("bg-green-50","text-green-700","border-green-200","dark:bg-green-900/30","dark:text-green-400","dark:border-green-800"),setTimeout(()=>j.classList.add("hidden"),3e3)},I=r=>{if(!r.length){v.classList.add("hidden"),t.classList.remove("hidden");return}t.classList.add("hidden"),v.classList.remove("hidden"),v.innerHTML=r.map(m=>`
41            <div class="flex items-center justify-between p-3 rounded-lg hover:bg-gray-50 dark:hover:bg-[#2a2a2a] transition-colors" data-author-id="${m.id}">
42                <div class="flex items-center gap-3">
43                    <img src="${m.avatar}" alt="${m.name}" class="w-10 h-10 rounded-full object-cover border border-gray-200 dark:border-[#444]">
44                    <div>
45                        <div class="text-sm font-medium text-gray-800 dark:text-gray-200">${m.name}</div>
46                        <div class="text-xs text-gray-500 dark:text-gray-400">@${m.username||""}</div>
47                    </div>
48                </div>
49                <button type="button"
50                    data-follow-toggle
51                    data-author-key="${m.id}"
52                    data-followed="${m.is_followed?"1":"0"}"
53                    class="px-4 py-1.5 rounded-full text-xs font-medium transition-all duration-200 ${m.is_followed?"bg-gray-200 text-gray-700 hover:bg-red-50 hover:text-red-600 dark:bg-[#333] dark:text-gray-300 dark:hover:bg-red-900/30 dark:hover:text-red-400":"bg-[#D92E2E] text-white hover:bg-[#c02828]"}">
54                    ${m.is_followed?"Takiptesin":"Takip Et"}
55                </button>
56            </div>
57        `).join("")},F=async()=>{E.classList.remove("hidden"),v.classList.add("hidden"),t.classList.add("hidden"),j.classList.add("hidden");try{const m=await(await fetch("/auth/follows/authors",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest","X-CSRF-TOKEN":d},credentials:"same-origin"})).json();E.classList.add("hidden"),m.success&&m.authors?(_=m.authors,I(_)):t.classList.remove("hidden")}catch(r){E.classList.add("hidden"),C("Yazarlar yüklenirken bir hata oluştu.",!0),console.error("Yazarlar yüklenirken hata:",r)}},G=async r=>{const m=r.getAttribute("data-author-key"),y=r.getAttribute("data-followed")==="1";r.disabled=!0,r.textContent="...";try{const R=await(await fetch("/auth/follows",{method:y?"DELETE":"POST",headers:{"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest","X-CSRF-TOKEN":d},credentials:"same-origin",body:JSON.stringify({follow_type:"author",follow_key:String(m)})})).json();if(R.success){const S=!y;r.setAttribute("data-followed",S?"1":"0"),r.textContent=S?"Takiptesin":"Takip Et",r.className=`px-4 py-1.5 rounded-full text-xs font-medium transition-all duration-200 ${S?"bg-gray-200 text-gray-700 hover:bg-red-50 hover:text-red-600 dark:bg-[#333] dark:text-gray-300 dark:hover:bg-red-900/30 dark:hover:text-red-400":"bg-[#D92E2E] text-white hover:bg-[#c02828]"}`;const c=_.find(u=>String(u.id)===String(m));c&&(c.is_followed=S),C(R.message),document.dispatchEvent(new CustomEvent("followsChanged"))}else r.textContent=y?"Takiptesin":"Takip Et",C(R.message||"Bir hata oluştu.",!0)}catch(B){r.textContent=y?"Takiptesin":"Takip Et",C("İşlem sırasında bir hata oluştu.",!0),console.error("Takip işlemi hatası:",B)}finally{r.disabled=!1}},N=async()=>{await z(),a.classList.remove("hidden"),document.body.style.overflow="hidden",L.value="",await F()},Z=()=>{a.classList.add("hidden"),document.body.style.overflow=""};document.addEventListener("click",r=>{if(r.target.closest("[data-follow-settings]")){r.preventDefault(),N();return}const y=r.target.closest("[data-follow-toggle]");y&&(r.preventDefault(),G(y))}),e&&e.addEventListener("click",Z),a&&a.addEventListener("click",r=>{r.target===a&&Z()}),L&&L.addEventListener("input",r=>{const m=r.target.value.toLowerCase().trim();if(!m){I(_);return}const y=_.filter(B=>B.name.toLowerCase().includes(m)||B.username&&B.username.toLowerCase().includes(m));I(y)})});
57class Ue{constructor(){this.clientId=null,this.csrfToken=null}init(){var a;const l=document.querySelector('meta[name="google-client-id"]');return l?(this.clientId=l.getAttribute("content"),this.clientId?(this.csrfToken=(a=document.querySelector('meta[name="csrf-token"]'))==null?void 0:a.getAttribute("content"),this.bindEvents(),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>this.initializeOneTap()):setTimeout(()=>this.initializeOneTap(),500),!0):(console.warn("Google Client ID bulunamadı"),!1)):!1}async handleCredentialResponse(l){if(!this.csrfToken){console.error("CSRF token bulunamadı");return}try{const a=await fetch("/auth/social/google/one-tap",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-TOKEN":this.csrfToken,Accept:"application/json"},body:JSON.stringify({credential:l.credential})}),e=await a.json();a.ok&&e.success?(typeof trackUserLogin<"u"&&e.user_id&&trackUserLogin(e.user_id,"google_one_tap"),typeof Livewire<"u"&&Livewire.dispatch("loginSuccessful"),window.location.reload()):(console.error("Google One Tap login hatası:",e.message),this.showOneTapError(e.message||"Giriş yapılamadı"))}catch(a){console.error("Google One Tap request hatası:",a),this.showOneTapError("Bağlantı hatası oluştu")}}showOneTapError(l){const a=document.getElementById("login-status");a&&(a.textContent=l,a.classList.remove("hidden","bg-green-50","text-green-700"),a.classList.add("bg-red-50","text-red-700"))}initializeOneTap(){if(typeof google>"u"||!google.accounts){setTimeout(()=>this.initializeOneTap(),100);return}try{google.accounts.id.initialize({client_id:this.clientId,callback:l=>this.handleCredentialResponse(l),auto_select:!1,cancel_on_tap_outside:!1,itp_support:!1}),google.accounts.id.prompt()}catch(l){console.error("Google One Tap initialization hatası:",l)}}bindEvents(){document.addEventListener("click",l=>{l.target.matches('[data-name="login-button"]')&&this.cancel()})}cancel(){typeof google<"u"&&google.accounts&&google.accounts.id.cancel()}}document.addEventListener("DOMContentLoaded",()=>{var P;const d=document.getElementById("personalFeedDock"),l=document.getElementById("personalFeedDockDesktop");if(console.log("[PersonalDrawer] init, dock:",!!d,"dockDesktop:",!!l),!d&&!l)return;const a=document.getElementById("personalFeedOverlay"),e=document.getElementById("personalFeedDrawer"),v=document.getElementById("personalFeedClose"),E=document.getElementById("personalFeedRetry"),t=document.getElementById("personalFeedSkeleton"),L=document.getElementById("personalFeedList"),j=document.getElementById("personalFeedEmpty"),_=document.getElementById("personalFeedEmptyText"),z=document.getElementById("personalFeedError"),C=document.getElementById("personalFeedSwipeHandle"),I=document.getElementById("personalFeedBody"),F=document.getElementById("personalFeedAuthorsLink"),G=document.getElementById("personalFeedFilters"),N=document.getElementById("personalFeedFilterList");let Z=(P=document.querySelector('meta[name="csrf-token"]'))==null?void 0:P.getAttribute("content"),g=!1,r=!1,m=!1,y=null,B=null;const H=()=>window.matchMedia("(max-width: 768px)").matches,Y=async()=>{try{const x=await(await fetch("/csrf-token",{method:"POST",headers:{"Content-Type":"application/json"}})).json();if(x.token){Z=x.token;const p=document.querySelector('meta[name="csrf-token"]');p&&p.setAttribute("content",x.token)}}catch{}},R=()=>({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest","X-CSRF-TOKEN":Z}),S=async(s,x=null)=>{const p={method:"POST",headers:R(),credentials:"include"};x&&(p.body=JSON.stringify(x));let b=await fetch(s,p);return b.status===419&&(await Y(),p.headers=R(),b=await fetch(s,p)),b},c=s=>{const x=document.createElement("a");x.href=s.url||"#",x.className="flex gap-3 p-2 rounded-lg hover:bg-[#F5F5F5] dark:hover:bg-[#2a2a2a] transition-colors no-underline group",x.setAttribute("target","_blank"),x.setAttribute("rel","noopener");const p=document.createElement("div");p.className="w-[100px] h-[66px] rounded overflow-hidden shrink-0 bg-[#e5e5e5] dark:bg-[#333]";const b=document.createElement("img");b.src=s.image||"",b.alt=s.title||"",b.className="w-full h-full object-cover",b.loading="lazy",b.onerror=()=>{b.style.display="none"},p.appendChild(b);const D=document.createElement("div");D.className="flex-1 min-w-0";const W=document.createElement("div");if(W.className="flex items-center gap-1.5 mb-1",s.category){const K=document.createElement("span");K.className="text-[11px] font-bold text-[#D92E2E] uppercase truncate",K.textContent=s.category,W.appendChild(K)}if(s.post_type==="video"){const K=document.createElement("span");K.className="text-[10px] bg-[#D92E2E] text-white px-1.5 py-0.5 rounded font-bold leading-none",K.textContent="VİDEO",W.appendChild(K)}const ee=document.createElement("h3");ee.className="text-[13px] leading-[18px] font-medium text-[#222] dar
57k:text-[#e0e0e0] m-0 line-clamp-2 group-hover:text-[#D92E2E] transition-colors",ee.textContent=s.title||"";const ae=document.createElement("div");if(ae.className="flex items-center gap-1.5 mt-1 text-[11px] text-[#999]",s.author){const K=document.createElement("span");K.textContent=s.author,ae.appendChild(K)}if(s.author&&s.date){const K=document.createElement("span");K.textContent="·",ae.appendChild(K)}if(s.date){const K=document.createElement("span");K.textContent=s.date,ae.appendChild(K)}return D.appendChild(W),D.appendChild(ee),D.appendChild(ae),x.appendChild(p),x.appendChild(D),x},u=s=>{switch(t.classList.add("hidden"),L.classList.add("hidden"),j.classList.add("hidden"),z.classList.add("hidden"),F==null||F.classList.add("hidden"),s){case"skeleton":t.classList.remove("hidden");break;case"list":L.classList.remove("hidden");break;case"empty":j.classList.remove("hidden");break;case"error":z.classList.remove("hidden");break}},T=s=>{if(!N||!G)return;if(!s||s.length===0){G.classList.add("hidden");return}N.replaceChildren();const x=(p,b)=>{const D=document.createElement("button");D.type="button";const W=p===y;return D.className=`shrink-0 cursor-pointer rounded-full border-0 px-3 py-1.5 text-xs font-medium whitespace-nowrap transition-colors ${W?"bg-[#D92E2E] text-white":"bg-[#f3f3f3] text-[#555] hover:bg-[#e8e8e8] dark:bg-[#2a2a2a] dark:text-[#b4b4b4] dark:hover:bg-[#333]"}`,D.textContent=b,D.addEventListener("click",()=>{y!==p&&(y=p,m=!1,$(p),T(B))}),D};
57N.appendChild(x(null,"Tümü")),s.forEach(p=>{N.appendChild(x(p.slug,p.name))}),G.classList.remove("hidden")},$=async(s=null)=>{if(console.log("[PersonalDrawer] loadFeed called",{isLoading:r,feedLoaded:m,categorySlug:s}),!r){r=!0,u("skeleton");try{const p=await S("/auth/personal-feed",s?{category_slug:s}:null);if(console.log("[PersonalDrawer] feed response",{status:p.status,ok:p.ok}),!p.ok){if(p.status===401){u("empty"),_.textContent="İçerik görmek için giriş yapıp profil ayarlarınızı yapmanız gerekiyor.";return}throw new Error(`HTTP ${p.status}`)}const b=await p.json();if(!b||typeof b.success!="boolean")throw new Error("Geçersiz response");if(!b.success)throw new Error(b.message||"Bilinmeyen hata");if(Array.isArray(b.categories)&&b.categories.length>0&&!B&&(B=b.categories,T(B)),!Array.isArray(b.items)||b.items.length===0){_.textContent=s?"Bu kategoride içerik bulunamadı.":b.message||"Henüz takip ettiğiniz yazar bulunmuyor.",u("empty"),s||F==null||F.classList.remove("hidden"),m=!1;return}L.replaceChildren(),b.items.forEach(D=>{D&&typeof D.title=="string"&&L.appendChild(c(D))}),u("list"),m=!0}catch(x){console.error("PersonalFeed:",x),u("error")}finally{r=!1}}};document.addEventListener("followsChanged",()=>{m=!1,B=null,y=null});const A=()=>{console.log("[PersonalDrawer] openDrawer called",{isOpen:g,feedLoaded:m}),!g&&(g=!0,a.classList.remove("opacity-0","pointer-events-none"),document.body.classList.add("overflow-hidden"),H()?(e.classList.remove("translate-x-full"),e.style.transform="",e.classList.add("drawer-open")):e.classList.remove("translate-x-full"),m||$(y))},k=()=>{g&&(g=!1,a.classList.add("opacity-0","pointer-events-none"),document.body.classList.remove("overflow-hidden"),H()&&(e.classList.remove("drawer-open"),e.style.transform=""),e.classList.add("translate-x-full"))};d==null||d.addEventListener("click",s=>{console.log("[PersonalDrawer] dock clicked",{isMobile:H(),isOpen:g,target:s.target.tagName}),A()}),l==null||l.addEventListener("click",s=>{console.log("[PersonalDrawer] dockDesktop clicked",{isOpen:g,target:s.target.tagName}),A()}),v.addEventListener("click",k),a.addEventListener("click",k),F==null||F.addEventListener("click",()=>k()),E==null||E.addEventListener("click",()=>{m=!1,$(y)}),document.addEventListener("keydown",s=>{s.key==="Escape"&&g&&k()});let h=0,M=0,o=!1;const n=s=>{if(!H()||!g)return;const x=I.scrollTop<=0,p=C.contains(s.target);!x&&!p||(h=s.touches[0].clientY,M=h,o=!0,e.style.transition="none")},f=s=>{if(!o)return;M=s.touches[0].clientY;const x=M-h;x<0||(e.style.transform=`translateY(${x}px)`)},q=()=>{if(!o)return;o=!1,e.style.transition="",M-h>100?k():(e.style.transform="",e.classList.add("drawer-open"))};e.addEventListener("touchstart",n,{passive:!0}),e.addEventListener("touchmove",f,{passive:!0}),e.addEventListener("touchend",q,{passive:!0})});document.addEventListener("DOMContentLoaded",()=>{const d=document.querySelector('meta[name="csrf-token"]').getAttribute("content"),l=`
58        <div id="profileModal" class="fixed inset-0 bg-black/70 z-150 hidden flex items-center justify-center p-4">
59            <div class="w-full max-w-[500px] mx-auto relative max-h-[90vh] overflow-y-auto rounded-md">
60                <button id="closeProfileModal" class="absolute right-3 top-3 w-9 h-9 flex items-center justify-center rounded-full text-[#222] hover:bg-[#F3F3F3] dark:text-white dark:hover:bg-[#333] transition-colors z-10" aria-label="Kapat">
61                    <svg width="24" height="24" viewBox="0 0 24 24" fill="none">
62                        <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" fill="currentColor"/>
63                    </svg>
64                </button>
65
66                <div class="bg-white dark:bg-[#1a1a1a] rounded-[20px] shadow-lg">
67                    <div class="px-8 py-6">
68                        <form id="profileEditForm" enctype="multipart/form-data" class="space-y-6">
69                            <input type="hidden" name="_token" value="${d}">
70
71                            <div class="space-y-2">
72                                <div class="text-center">
73                                    <h3 class="text-lg font-semibold text-gray-700 dark:text-gray-200 mb-2">Profil Bilgileri</h3>
74                                </div>
75
76                                <div class="flex justify-center">
77                                    <div class="relative">
78                                        <div id="profileImageContainer" class="w-24 h-24 rounded-full bg-gray-200 dark:bg-[#333] border-4 border-gray-300 dark:border-[#444] overflow-hidden shadow-lg">
79                                            <div class="w-full h-full flex items-center justify-center text-gray-400">
80                                                <img src="https://imgrosetta.webtekno.com/static/img/pp_default.png" alt="Profil resmi" class="w-full h-full object-cover" />
81                                            </div>
82                                        </div>
83
84                                        <button type="button" id="editImageBtn" class="absolute -bottom-1 -right-1 w-8 h-8 bg-[#D92E2E] rounded-full flex items-center justify-center text-white hover:bg-[#c02828] transition-all duration-200 shadow-lg border-2 border-white dark:border-[#1a1a1a] z-10">
85                                            <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
86                                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.
86664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"></path>
87                                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 13a3 3 0 11-6 0 3 3 0 016 0z"></path>
88                                            </svg>
89                                        </button>
90
91                                        <input type="file" id="imageInput" name="image" accept="image/*" class="hidden">
92                                    </div>
93                                </div>
94
95                                <div class="text-center">
96                                    <div id="image-error" class="text-red-500 text-sm hidden"></div>
97                                </div>
98                            </div>
99                            <div class="text-sm text-gray-500 dark:text-gray-400 text-xs text-center" id="username-span"></div>
100
101                            <div class="space-y-1">
102                                <label for="name" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Ad Soyad</label>
103                                <input type="text" id="name" name="name" placeholder="Ad ve soyadınızı girin" class="w-full px-4 py-3 border border-gray-300 dark:border-[#444] dark:bg-[#2a2a2a] dark:text-white dark:placeholder-gray-500 rounded-lg focus:outline-none focus:ring-1 focus:ring-[#D92E2E] focus:border-[#D92E2E]">
104                                <div id="name-error" class="text-red-500 text-sm mt-1 hidden"></div>
105                            </div>
106
107                            <div class="space-y-1">
108                                <label for="username" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Kullanıcı Adı</label>
109                                <input type="text" id="username" name="username" placeholder="Kullanıcı adınızı girin" class="w-full px-4 py-3 border border-gray-300 dark:border-[#444] dark:bg-[#2a2a2a] dark:text-white dark:placeholder-gray-500 rounded-lg focus:outline-none focus:ring-1 focus:ring-[#D92E2E] focus:border-[#D92E2E] disabled:bg-gray-100 disabled:text-gray-500 dark:disabled:bg-[#222] dark:disabled:text-gray-600 disabled:cursor-not-allowed" disabled>
110                                <div id="username-error" class="text-red-500 text-sm mt-1 hidden"></div>
111                            </div>
112
113                            <div class="space-y-1">
114                                <label for="email" class="block text-sm font-medium text-gray-700 dark:text-gray-300">E-posta</label>
115                                <input type="text" id="email" name="email" placeholder="E-posta adresinizi girin" class="w-full px-4 py-3 border border-gray-300 dark:border-[#444] dark:bg-[#2a2a2a] dark:text-white dark:placeholder-gray-500 rounded-lg focus:outline-none focus:ring-1 focus:ring-[#D92E2E] focus:border-[#D92E2E] disabled:bg-gray-100 disabled:text-gray-500 dark:disabled:bg-[#222] dark:disabled:text-gray-600 disabled:cursor-not-allowed" disabled>
116                                <div id="email-error" class="text-red-500 text-sm mt-1 hidden"></div>
117                            </div>
118
119                            <div class="space-y-1">
120                                <label for="biography" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Biyografi</label>
121                                <textarea id="biography" name="biography" rows="3" placeholder="Kendiniz hakkında kısa bir bilgi yazın..." class="w-full px-4 py-3 border border-gray-300 dark:border-[#444] dark:bg-[#2a2a2a] dark:text-white dark:placeholder-gray-500 rounded-lg focus:outline-none focus:ring-1 focus:ring-[#D92E2E] focus:border-[#D92E2E] resize-none"></textarea>
122                                <div id="biography-error" class="text-red-500 text-sm mt-1 hidden"></div>
123                            </div>
124
125                            <div class="space-y-2">
126                                <div class="text-center">
127                                    <h3 class="text-lg font-semibold text-gray-700 dark:text-gray-200 mb-2">Şifre Değiştir</h3>
128                                    <p class="text-sm text-gray-500 dark:text-gray-400">Şifrenizi değiştirmek istiyorsanız aşağıdaki alanları doldurun</p>
129                                </div>
130
131                                <div class="space-y-1">
132                                    <label for="current_password" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Mevcut Şifre</label>
133                                    <input type="password" id="current_password" name="current_password" placeholder="Mevcut şifrenizi girin" class="w-full px-4 py-3 border border-gray-300 dark:border-[#444] dark:bg-[#2a2a2a] dark:text-white dark:placeholder-gray-500 rounded-lg focus:outline-none focus:ring-1 focus:ring-[#D92E2E] focus:border-[#D92E2E]">
134                                    <div id="current_password-error" class="text-red-500 text-sm mt-1 hidden"></div>
135                                </div>
136
137                                <div class="space-y-1">
138                                    <label for="new_password" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Yeni Şifre</label>
139                                    <input type="password" id="new_password" name="new_password" placeholder="Yeni şifrenizi girin" class="w-full px-4 py-3 border border-gray-300 dark:border-[#444] dark:bg-[#2a2a2a] dark:text-white dark:placeholder-gray-500 rounded-lg focus:outline-none focus:ring-1 focus:ring-[#D92E2E] focus:border-[#D92E2E]">
140                                    <div id="new_password-error" class="text-red-500 text-sm mt-1 hidden"></div>
141                                </div>
142
143                                <div class="space-y-1">
144                                    <label for="new_password_confirmation" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Şifre Tekrarı</label>
145                                    <input type="password" id="new_password_confirmation" name="new_password_confirmation" placeholder="Yeni şifrenizi tekrar girin" class="w-full px-4 py-3 border border-gray-300 dark:border-[#444] dark:bg-[#2a2a2a] dark:text-white dark:placeholder-gray-500 rounded-lg focus:outline-none focus:ring-1 focus:ring-[#D92E2E] focus:border-[#D92E2E]">
146                                    <div id="new_password_confirmation-error" class="text-red-500 text-sm mt-1 hidden"></div>
147                                </div>
148                            </div>
149
150                            <button type="submit" id="updateBtn" class="w-full bg-[#D92E2E] text-white py-3 px-4 roun
150ded-lg hover:bg-[#c02828] focus:outline-none focus:ring-1 focus:ring-[#D92E2E] focus:ring-offset-2 dark:focus:ring-offset-[#1a1a1a] transition-all duration-200 font-medium shadow-lg">
151                                <span class="submit-text">GÜNCELLE</span>
152                                <span class="loading-text hidden">Güncelleniyor...</span>
153                            </button>
154
155                            <div class="text-center mt-4">
156                                <button type="button" id="deleteMembershipBtn" class="text-gray-500 hover:text-red-600 dark:text-gray-400 dark:hover:text-red-400 text-sm transition-all duration-200 font-medium py-2 px-4 rounded border border-transparent hover:bg-red-50 hover:border-red-200 dark:hover:bg-red-900/20 dark:hover:border-red-800">
157                                    Üyeliğimi Sil
158                                </button>
159                            </div>
160
161                            <div id="profile-status" class="hidden px-4 py-3 rounded-lg"></div>
162                        </form>
163                    </div>
164                </div>
165            </div>
166        </div>
167    `;document.body.insertAdjacentHTML("beforeend",l);const a=document.getElementById("profileModal"),e=document.getElementById("closeProfileModal"),v=document.getElementById("profileEditForm"),E=document.getElementById("editImageBtn"),t=document.getElementById("imageInput"),L=document.getElementById("updateBtn"),j=async()=>{try{const r=await(await fetch("/csrf-token",{method:"POST",headers:{"Content-Type":"application/json"}})).json();r.token&&(document.querySelector('meta[name="csrf-token"]').setAttribute("content",r.token),document.querySelector('#profileEditForm input[name="_token"]').value=r.token)}catch(g){console.error("CSRF token güncellenirken hata oluştu:",g)}await z(),a&&(a.classList.remove("hidden"),document.body.style.overflow="hidden")},_=()=>{a&&(a.classList.add("hidden"),document.body.style.overflow="")},z=async()=>{try{const g=await fetch("/auth/profil/gor",{method:"POST",headers:{Accept:"application/json","X-CSRF-TOKEN":d}});if(g.ok){const r=await g.json();r.user&&(document.getElementById("name").value=r.user.name||"",document.getElementById("username").value=r.user.username||"",document.getElementById("email").value=r.user.email||"",document.getElementById("biography").value=r.user.biography||"",document.getElementById("username-span").textContent=r.user.username||"",C(r.user.image))}}catch(g){console.error("Profil bilgileri yüklenirken hata:",g)}},C=g=>{const r=document.getElementById("profileImageContainer");g&&g?r.innerHTML=`<img src="${g}" alt="Profil resmi" class="w-full h-full object-cover">`:r.innerHTML=`
168                <div class="w-full h-full flex items-center justify-center text-gray-400">
169                    <img src="https://imgrosetta.webtekno.com/static/img/pp_default.png" alt="Profil resmi" class="w-full h-full object-cover" />
170                </div>
171            `},I=()=>{document.querySelectorAll('[id$="-error"]').forEach(g=>{g.classList.add("hidden"),g.textContent=""}),document.getElementById("profile-status").classList.add("hidden")},F=(g,r)=>{const m=document.getElementById(g+"-error");m&&(m.textContent=r,m.classList.remove("hidden"))},G=g=>{const r=document.getElementById("profile-status");r.textContent=g,r.classList.remove("hidden","bg-red-50","text-red-700","dark:bg-red-900/30","dark:text-red-400","border-red-200","dark:border-red-800"),r.classList.add("bg-green-50","text-green-700","border","border-green-200","dark:bg-green-900/30","dark:text-green-400","dark:border-green-800"),setTimeout(()=>{r.classList.add("hidden")},3e3)},N=g=>{const r=L.querySelector(".submit-text"),m=L.querySelector(".loading-text");g?(r.classList.add("hidden"),m.classList.remove("hidden"),L.disabled=!0,L.style.backgroundColor="#c02828"):(r.classList.remove("hidden"),m.classList.add("hidden"),L.disabled=!1,L.style.backgroundColor="#D92E2E")},Z=g=>["image/jpeg","image/png","image/jpg","image/gif","image/webp"].includes(g.type)?g.size>2097152?(F("image","Resim dosyası 2MB'dan küçük olmalıdır."),
171!1):!0:(F("image","Sadece JPEG, PNG, JPG, GIF ve WEBP formatları desteklenir."),!1);document.addEventListener("click",g=>{g.target.closest("[data-profile-edit]")&&(g.preventDefault(),j())}),e&&e.addEventListener("click",_),a&&a.addEventListener("click",g=>{g.target===a&&_()}),E&&E.addEventListener("click",()=>{t.click()}),t&&t.addEventListener("change",g=>{const r=g.target.files[0];if(r){if(I(),!Z(r))return;const m=new FileReader;m.onload=function(y){const B=document.getElementById("profileImageContainer");B.innerHTML=`<img src="${y.target.result}" alt="Profil resmi" class="w-full h-full object-cover">`},m.readAsDataURL(r),G("Resim seçildi. Formu gönderdiğinizde yüklenecek.")}}),v&&v.addEventListener("submit",async g=>{g.preventDefault(),I();const r=new FormData(v);N(!0);try{const y=await(await fetch("/auth/profil",{method:"POST",body:r,headers:{"X-CSRF-TOKEN":d}})).json();if(N(!1),y.success){G(y.message),document.getElementById("current_password").value="",document.getElementById("new_password").value="",document.getElementById("new_password_confirmation").value="",t.files.length>0&&(t.value=""),y.user&&y.user.image&&C(y.user.image);const B=document.querySelector("#userDropdownBtn span");B&&y.user&&(B.textContent=y.user.username||y.user.name||y.user.email)}else if(y.errors)Object.keys(y.errors).forEach(B=>{F(B,y.errors[B][0])});else{const B=document.getElementById("profile-status");B.textContent=y.message,B.classList.remove("hidden","bg-green-50","text-green-700","dark:bg-green-900/30","dark:text-green-400","border-green-200","dark:border-green-800"),B.classList.add("bg-red-50","text-red-700","border","border-red-200","dark:bg-red-900/30","dark:text-red-400","dark:border-red-800")}}catch(m){N(!1),console.error("Error:",m);const y=document.getElementById("profile-status");y.textContent="Bir hata oluştu. Lütfen tekrar deneyin.",y.classList.remove("hidden","bg-green-50","text-green-700","dark:bg-green-900/30","dark:text-green-400","border-green-200","dark:border-green-800"),y.classList.add("bg-red-50","text-red-700","border","border-red-200","dark:bg-red-900/30","dark:text-red-400","dark:border-red-800")}}),deleteMembershipBtn&&(deleteMembershipBtn.addEventListener("mouseenter",function(){this.style.color="#dc2626",this.style.backgroundColor="#fef2f2",this.style.borderColor="#fecaca"}),deleteMembershipBtn.addEventListener("mouseleave",function(){this.style.color="#6b7280",this.style.backgroundColor="transparent",this.style.borderColor="transparent"}),deleteMembershipBtn.addEventListener("click",function(){if(!confirm("Üyeliğinizi silmek istediğinizden emin misiniz? Bu işlem geri alınamaz."))return;const g=document.querySelector('#profileEditForm input[name="_token"]');if(!g){alert("Güvenlik doğrulaması bulunamadı. Sayfayı yenileyip tekrar deneyin.");return}deleteMembershipBtn.disabled=!0,deleteMembershipBtn.textContent="Siliniyor...",fetch("/auth/profil/sil",{method:"POST",headers:{"X-CSRF-TOKEN":g.value,Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({})}).then(r=>r.json()).then(r=>{r.success&&r.redirect?window.location.href=r.redirect:(deleteMembershipBtn.disabled=!1,deleteMembershipBtn.textContent="Üyeliğimi Sil",alert(r.message||"Hesap silinirken bir hata oluştu."))}).catch(()=>{deleteMembershipBtn.disabled=!1,deleteMembershipBtn.textContent="Üyeliğimi Sil",alert("Bir hata oluştu. Lütfen tekrar deneyin.")})}))});document.addEventListener("DOMContentLoaded",()=>{const d=document.querySelector('meta[name="csrf-token"]').getAttribute("content");document.body.insertAdjacentHTML("beforeend",`
172        <div id="authModal" class="fixed inset-0 bg-black/70 z-[10000] hidden flex items-center justify-center">
173            <div class="w-[90%] md:w-full max-w-[400px] mx-auto relative">
174                <!-- Close Button -->
175                <button id="closeAuthModal" class="absolute right-3 top-3 w-9 h-9 flex items-center justify-center rounded-full hover:bg-[#F3F3F3] transition-colors" aria-label="Kapat">
176                    <svg width="24" height="24" viewBox="0 0 24 24" fill="none">
177                        <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z" fill="#222222"/>
177
178                    </svg>
179                </button>
180                <!-- Logo -->
181                <div class="flex justify-center pt-8 pb-4 bg-white rounded-t-[20px]">
182                    <img src="https://imgrosetta.webtekno.com/static/img/webtekno-logo.svg" alt="Webtekno" class="h-8 max-w-[143px]">
183                </div>
184                <!-- Tab Buttons -->
185                <div class="flex bg-white overflow-hidden border-b border-[#F3F3F3]">
186                    <button id="tab-login" class="tab-btn flex-1 py-4 font-roboto font-bold text-[17px] text-[#222222] border-b-3 border-transparent transition-colors">Giriş Yap</button>
187                    <button id="tab-register" class="tab-btn flex-1 py-4 font-roboto font-bold text-[17px] text-[#222222] border-b-3 border-transparent transition-colors">Kayıt Ol</button>
188                </div>
189                <!-- Popups -->
190                <div class="bg-white rounded-b-[20px] px-12 py-8 shadow-lg">
191                    <!-- Login Popup -->
192                    <form id="popup-login" class="space-y-6" method="POST" action="/login">
193                        <input type="hidden" name="_token">
194                        <div id="login-status" class="mb-4 bg-green-50 border border-gray-200 text-green-700 px-4 py-3 rounded relative hidden" role="alert"></div>
195                        <div>
196                            <input type="text" name="username" class="w-full h-12 px-4 rounded-[10px] border border-[#DDDDDD] font-roboto text-[15px] focus:outline-none focus:border-[#D92E2E]" placeholder="Kullanıcı adınız">
197                            <p class="mt-2 text-sm text-red-600 hidden" id="username-error"></p>
198                        </div>
199                        <div>
200                            <input type="password" name="password" class="w-full h-12 px-4 rounded-[10px] border border-[#DDDDDD] font-roboto text-[15px] focus:outline-none focus:border-[#D92E2E]" placeholder="Şifreniz">
201                            <p class="mt-2 text-sm text-red-600 hidden" id="password-error"></p>
202                        </div>
203                        <div class="flex items-center justify-between">
204                            <label class="flex items-center gap-2 font-roboto text-[15px] text-[#222222]">
205                                <input type="checkbox" name="remember" class="accent-[#D92E2E]">
206                                Beni hatırla
207                            </label>
208                            <button type="button" id="to-forgot" class="font-roboto text-[15px] text-[#D92E2E] hover:underline">Şifremi unuttum?</button>
209                        </div>
210                        <button type="submit" class="bg-[#222222] rounded-[10px] font-roboto font-bold text-white text-[15px] px-8 py-3 mx-auto block">Giriş Yap</button>
211                        <div class="flex flex-col gap-3 mt-6">
212                            <button type="button" id="google-login-btn" class="flex items-center justify-center gap-2 w-full rounded-[10px] border border-[#5957BA] bg-white h-12 font-roboto text-[15px] font-medium text-[#222222] hover:bg-[#f5f6fd] transition">
213                                <img src="https://www.svgrepo.com/show/475656/google-color.svg" alt="Google" class="w-5 h-5">
214                                Google ile Giriş Yap
215                            </button>
216                        </div>
217                        <div class="text-center mt-2">
218                            <span class="font-roboto text-[15px] text-[#222222]">Hesabın yok mu?</span>
219                            <button type="button" id="to-register" class="font-roboto text-[15px] text-[#D92E2E] ml-1 hover:underline">Kayıt Ol</button>
220                        </div>
221                    </form>
222                    <!-- Register Popup -->
223                    <form id="popup-register" class="space-y-6 hidden" method="POST" action="/register">
224                        <input type="hidden" name="_token">
225                        <div>
226                            <input type="text" name="name" class="w-full h-12 px-4 rounded-[10px] border border-[#DDDDDD] font-roboto text-[15px] focus:outline-none focus:border-[#D92E2E]" placeholder="Adınız Soyadınız">
227                            <p class="mt-2 text-sm text-red-600 hidden" id="register-name-error"></p>
228                        </div>
229                        <div>
230                            <input type="text" name="username" class="w-full h-12 px-4 roun
230ded-[10px] border border-[#DDDDDD] font-roboto text-[15px] focus:outline-none focus:border-[#D92E2E]" placeholder="Kullanıcı adınız">
231                            <p class="mt-2 text-sm text-red-600 hidden" id="register-username-error"></p>
232                        </div>
233                        <div>
234                            <input type="email" name="email" class="w-full h-12 px-4 rounded-[10px] border border-[#DDDDDD] font-roboto text-[15px] focus:outline-none focus:border-[#D92E2E]" placeholder="E-posta adresiniz">
235                            <p class="mt-2 text-sm text-red-600 hidden" id="register-email-error"></p>
236                        </div>
237                        <div>
238                            <input type="password" name="password" class="w-full h-12 px-4 rounded-[10px] border border-[#DDDDDD] font-roboto text-[15px] focus:outline-none focus:border-[#D92E2E]" placeholder="Şifreniz">
239                            <p class="mt-2 text-sm text-red-600 hidden" id="register-password-error"></p>
240                        </div>
241                        <div>
242                            <input type="password" name="password_confirmation" class="w-full h-12 px-4 rounded-[10px] border border-[#DDDDDD] font-roboto text-[15px] focus:outline-none focus:border-[#D92E2E]" placeholder="Şifre Tekrar">
243                            <p class="mt-2 text-sm text-red-600 hidden" id="register-password-confirmation-error"></p>
244                        </div>
245                        <div class="text-center text-xs text-[#999] mb-6 font-roboto">
246                            Kaydet butonuna tıklayarak<br>
247                            <a href="/gizlilik" class="underline text-[#D92E2E]">Şartlar ve Koşullar'ı</a> kabul etmiş olursunuz.
248                        </div>
249                        <button type="submit" class="bg-[#222222] rounded-[10px] font-roboto font-bold text-white text-[15px] px-8 py-3 mx-auto block">Kayıt Ol</button>
250                        <!-- <div class="flex flex-col gap-3 mt-6">
251                            <a href="/auth/social/google/redirect" class="flex items-center justify-center gap-2 w-full rounded-[10px] border border-[#5957BA] bg-white h-12 font-roboto text-[15px] font-medium text-[#222222] hover:bg-[#f5f6fd] transition">
252                                <img src="https://www.svgrepo.com/show/475656/google-color.svg" alt="Google" class="w-5 h-5">
253                                Google ile Kayıt Ol
254                            </a>
255                            <a href="/auth/social/facebook/redirect" class="flex items-center justify-center gap-2 w-full rounded-[10px] border border-[#5957BA] bg-white h-12 font-roboto text-[15px] font-medium text-[#222222] hover:bg-[#f5f6fd] transition">
256                                <svg class="w-5 h-5" viewBox="0 0 24 24" fill="#5957BA"><path d="M22.675 0h-21.35C.595 0 0 .592 0 1.326v21.348C0 23.408.595 24 1.325 24h11.495v-9.294H9.692v-3.622h3.128V8.413c0-3.1 1.893-4.788 4.659-4.788 1.325 0 2.463.099 2.797.143v3.24l-1.918.001c-1.504 0-1.797.715-1.797 1.763v2.313h3.587l-.467 3.622h-3.12V24h6.116C23.406 24 24 23.408 24 22.674V1.326C24 .592 23.406 0 22.675 0"/></svg>
257                                Facebook ile Kayıt Ol
258                            </a>
259                        </div> -->
260                        <div class="text-center mt-2">
261                            <span class="font-roboto text-[15px] text-[#222222]">Zaten hesabın var mı?</span>
262                            <button type="button" id="to-login" class="font-roboto text-[15px] text-[#D92E2E] ml-1 hover:underline">Giriş Yap</button>
263                        </div>
264                    </form>
265                    <!-- Forgot Password Popup (hidden, only for navigation) -->
266                    <form id="popup-forgot" class="space-y-6 hidden">
267                        <input type="hidden" name="_token">
268                        <div id="forgot-status" class="mb-4 bg-green-50 border border-green-200 text-green-700 px-4 py-3 rounded relative hidden" role="alert"></div>
269                        <div class="text-center text-xs text-[#666] mb-4 font-roboto">
270                            Lütfen e-posta adresinizi girin.<br>
271                            Şifrenizi sıfırlamanız için size bir e-posta göndereceğiz.
272                        </div>
273                        <div>
274                            <input id="forgot-email" name="email" type="email" class="w-full h-12 px-4 roun
274ded-[10px] border border-[#DDDDDD] font-roboto text-[15px] focus:outline-none focus:border-[#D92E2E]" placeholder="E-posta adresiniz">
275                            <p class="mt-2 text-sm text-red-600 hidden" id="forgot-email-error"></p>
276                        </div>
277                        <button type="submit" class="bg-[#222222] rounded-[10px] font-roboto font-bold text-white text-[15px] px-8 py-3 mx-auto block">Şifreyi Sıfırla</button>
278                        <div class="flex justify-center mt-2">
279                            <button type="button" id="to-login2" class="font-roboto text-[15px] text-[#D92E2E] ml-1 hover:underline flex items-center gap-1">
280                                <svg class="w-4 h-4" fill="none" stroke="#D92E2E" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7"/></svg>
281                                Giriş Ekranına Dön
282                            </button>
283                        </div>
284                    </form>
285                </div>
286            </div>
287        </div>
288    `),document.querySelectorAll('input[name="_token"]').forEach(S=>{S.value=d});const e=document.getElementById("authModal"),v=document.querySelectorAll('[data-name="login-button"]'),E=document.getElementById("closeAuthModal"),t=document.getElementById("pushMenu"),L=document.getElementById("pushMenuOverlay"),j=async()=>{t&&L&&(t.classList.add("-translate-x-full"),L.classList.add("opacity-0","pointer-events-none"),document.body.style.overflow="hidden"),document.body.classList.remove("overflow-hidden"),await fetchCSRFToken(),e&&e.classList.remove("hidden")},_=()=>{e&&(e.classList.add("hidden"),document.body.style.overflow="")};v.forEach(S=>{S.dataset.auth==="0"&&S.addEventListener("click",j)}),E&&E.addEventListener("click",_),e&&e.addEventListener("click",S=>{S.target===e&&_()});const z=document.getElementById("tab-login"),C=document.getElementById("tab-register"),I=document.getElementById("popup-login"),F=document.getElementById("popup-register"),G=document.getElementById("popup-forgot");function N(S){z&&C&&I&&F&&G&&(z.classList.remove("active"),C.classList.remove("active"),I.classList.add("hidden"),F.classList.add("hidden"),G.classList.add("hidden"),S==="login"?(z.classList.add("active"),I.classList.remove("hidden")):S==="register"&&(C.classList.add("active"),F.classList.remove("hidden")))}z&&(z.onclick=()=>N("login")),C&&(C.onclick=()=>N("register"));const Z=document.getElementById("to-register"),g=document.getElementById("to-login"),r=document.getElementById("to-login2"),m=document.getElementById("to-forgot");Z&&(Z.onclick=()=>N("register")),g&&(g.onclick=()=>N("login")),r&&(r.onclick=()=>N("login")),m&&(m.onclick=()=>{I&&F&&G&&(I.classList.add("hidden"),F.classList.add("hidden"),G.classList.remove("hidden"))}),z&&C&&I&&F&&G&&N("login");const y=document.getElementById("google-login-btn");y&&y.addEventListener("click",()=>{const u=(window.innerWidth-600)/2,T=(window.innerHeight-700)/2,$=window.open("/auth/social/google/redirect?popup=1","google-login",`width=600,height=700,left=${u},top=${T},toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes`),A=h=>{if(h.origin===window.location.origin){if(h.data.type==="social-login-success"){const M=h.data.data;typeof Livewire<"u"&&Livewire.dispatch("loginSuccessful"),typeof trackUserLogin<"u"&&M.user_id&&trackUserLogin(M.user_id,"google"),_(),window.location.reload(),window.removeEventListener("message",A)}else if(h.data.type==="social-login-error"){const M=document.getElementById("login-status");M&&(M.textContent="Google ile giriş yapılırken bir hata oluştu: "+h.data.error,M.classList.remove("hidden"),M.classList.remove("bg-green-50","text-green-700"),M.classList.add("bg-red-50","text-red-700")),window.removeEventListener("message",A)}}};window.addEventListener("message",A);const k=setInterval(()=>{$&&$.closed&&(clearInterval(k),window.removeEventListener("message",A))},500)});const B=document.getElementById("popup-login"),H=document.getElementById("popup-register"),Y=document.getElementById("popup-forgot");B&&B.addEventListener("submit",async S=>{S.preventDefault(),document.getElementById("username-error").classList.add("hidden"),document.getElementById("password-error").classList.add("hidden"),document.getElementById("login-status").classList.add("hidden");const c=B.querySelector('button[type="submit"]'),u=c?c.textContent:"Giriş Yap",T=new FormData(B);let $=!1;if(!T.get("username")){const A=document.getElementById("username-error");A.textContent="Kullanıcı adı gereklidir",A.classList.remove("hidden"),$=!0}if(!T.get("password")){const A=document.getElementById("password-error");A.textContent="Şifre gereklidir",A.classList.remove("hidden"),$=!0}if(!$){c&&(c.textContent="Giriş yapılıyor...",c.disabled=!0,c.style.cursor="not-allowed",c.classList.remove("cursor-pointer"));try{const A=await fetch("/login",{method:"POST",headers:{"X-CSRF-TOKEN":d,Accept:"application/json"},body:T});if(A.status===200){const h=await A.json();typeof Livewire<"u"&&Livewire.dispatch("loginSuccessful"),typeof trackUserLogin<"u"&&h.user_id&&trackUserLogin(h.user_id,"mail"),window.location.reload();return}const k=await A.json();if(k.errors){if(k.errors.username){const h=document.getElementById("username-error");h.textContent=k.errors.username[0],h.classList.remove("hidden")}if(k.errors.password){const h=document.getElementById("password-error");h.textContent=k.errors.password[0],h.classList.remove("hidden")}if(k.message){const h=document.getElementById("login-status");h.textContent=k.message,h.classList.remove("hidden"),h.classList.remove("bg-green-50","text-green-700"),h.classList.add("bg-red-50","text-red-700")}c&&(c.textContent=u,c.disabled=!1,c.style.cursor="",c.classList.add("cursor-pointer"))}
288else if(k.success||k.user||k.user_id){if(typeof Livewire<"u"&&Livewire.dispatch("loginSuccessful"),typeof trackUserLogin<"u"){const h=k.user_id||k.user&&k.user.id;h&&trackUserLogin(h,"mail")}window.location.reload()}else if(k.message){const h=document.getElementById("login-status");h.textContent=k.message,h.classList.remove("hidden"),h.classList.remove("bg-green-50","text-green-700"),h.classList.add("bg-red-50","text-red-700"),c&&(c.textContent=u,c.disabled=!1,c.style.cursor="",c.classList.add("cursor-pointer"))}}catch{const k=document.getElementById("login-status");k.textContent="Sunucu hatası. Lütfen tekrar deneyin.",k.classList.remove("hidden"),k.classList.remove("bg-green-50","text-green-700"),k.classList.add("bg-red-50","text-red-700"),c&&(c.textContent=u,c.disabled=!1,c.style.cursor="",c.classList.add("cursor-pointer"))}}}),H&&H.addEventListener("submit",async S=>{S.preventDefault(),document.getElementById("register-name-error").classList.add("hidden"),document.getElementById("register-username-error").classList.add("hidden"),document.getElementById("register-email-error").classList.add("hidden"),document.getElementById("register-password-error").classList.add("hidden"),document.getElementById("register-password-confirmation-error").classList.add("hidden");let c=H.querySelector(".register-status");c||(c=document.createElement("div"),c.className="register-status mb-4 px-4 py-3 rounded relative hidden",H.prepend(c)),c.classList.add("hidden");const u=H.querySelector('input[name="name"]').value,T=H.querySelector('input[name="username"]').value,$=H.querySelector('input[name="email"]').value,A=H.querySelector('input[name="password"]').value,k=H.querySelector('input[name="password_confirmation"]').value;let h=!1;if(!u){const o=document.getElementById("register-name-error");o.textContent="Adınız gereklidir",o.classList.remove("hidden"),h=!0}if(!T){const o=document.getElementById("register-username-error");o.textContent="Kullanıcı adı gereklidir",o.classList.remove("hidden"),h=!0}if(!$){const o=document.getElementById("register-email-error");o.textContent="E-posta gereklidir",o.classList.remove("hidden"),h=!0}if(!A){const o=document.getElementById("register-password-error");o.textContent="Şifre gereklidir",o.classList.remove("hidden"),h=!0}if(!k){const o=document.getElementById("register-password-confirmation-error");o.textContent="Şifre tekrar gereklidir",o.classList.remove("hidden"),h=!0}if(A&&k&&A!==k){const o=document.getElementById("register-password-confirmation-error");o.textContent="Şifreler eşleşmiyor",o.classList.remove("hidden"),h=!0}if(h)return;const M=new FormData(H);try{const o=await fetch("/register",{method:"POST",headers:{"X-CSRF-TOKEN":d,Accept:"application/json"},body:M});if(o.status===201){const f=await o.json();typeof Livewire<"u"&&Livewire.dispatch("loginSuccessful"),typeof trackUserSignup<"u"&&f.user_id&&trackUserSignup(f.user_id,"mail"),window.location.reload();return}const n=await o.json();if(n.errors){if(n.errors.name){const f=document.getElementById("register-name-error");f.textContent=n.errors.name[0],f.classList.remove("hidden")}if(n.errors.username){const f=document.getElementById("register-username-error");f.textContent=n.errors.username[0],f.classList.remove("hidden")}if(n.errors.email){const f=document.getElementById("register-email-error");f.textContent=n.errors.email[0],f.classList.remove("hidden")}if(n.errors.password){const f=document.getElementById("register-password-error");f.textContent=n.errors.password[0],f.classList.remove("hidden")}if(n.errors.password_confirmation){const f=document.getElementById("register-password-confirmation-error");f.textContent=n.errors.password_confirmation[0],f.classList.remove("hidden")}n.message&&(c.textContent=n.message,c.classList.remove("hidden","bg-green-50","text-green-700"),c.classList.add("bg-red-50","text-red-700"))}else if(n.success||n.user||n.user_id){if(typeof Livewire<"u"&&Livewire.dispatch("loginSuccessful"),typeof trackUserSignup<"u"){const f=n.user_id||n.user&&n.user.id;f&&trackUserSignup(f,"mail")}window.location.reload()}else n.message&&(c.textContent=n.message,c.classList.remove("hidden","bg-green-50","text-green-700"),c.classList.add("bg-red-50","text-red-700"))}catch{c.textContent="Sunucu hatası. Lütfen tekrar deneyin.",c.classList.remove("hidden","bg-green-50","text-green-700"),c.classList.add("bg-red-50","text-red-700")}}),Y&&Y.addEventListener("submit",async S=>{S.preventDefault(),document.getElementById("forgot-email-error").classList.add("hidden");const c=document.getElementById("forgot-status");c.classList.add("hidden"),c.classList.remove("bg-red-50","text-red-700","bg-green-50","text-green-700");const u=Y.querySelector('button[type="submit"]'),T=u?u.textContent:"Şifreyi Sıfırla",$=Y.querySelector('input[name="email"]').value;let A=!1;if(!$){const h=document.getElementById("forgot-email-error");h.textContent="E-posta gereklidir",h.classList.remove("hidden"),A=!0}if(A){u&&(u.textContent=T,u.disabled=!1,u.style.cursor="",u.classList.add("cursor-pointer"));return}u&&(u.textContent="Şifre sıfırlanıyor...",u.disabled=!0,u.style.cursor="not-allowed",u.classList.remove("cursor-pointer"));const k=new FormData(Y);try{const h=await fetch("/password/email",{method:"POST",headers:{"X-CSRF-TOKEN":d,Accept:"application/json"},body:k});if(h.status===204||h.status===200){c.textContent="Şifre sıfırlama bağlantısı e-posta adresinize gönderildi.",c.classList.remove("hidden","bg-red-50","text-red-700"),c.classList.add("bg-green-50","text-green-700","text-sm"),Y.reset(),u&&(u.textContent=T,u.disabled=!1,u.style.cursor="",u.classList.add("cursor-pointer"));return}const M=await h.json();if(M.errors&&M.errors.email){const o=document.getElementById("forgot-email-error");o.textContent=M.errors.email[0],o.classList.remove("hidden"),u&&(u.textContent=T,u.disabled=!1,u.style.cursor="",u.classList.add("cursor-pointer"))}else M.status?(c.textContent=M.status,c.classList.remove("hidden","bg-red-50","text-red-700"),c.classList.add("bg-green-50","text-green-700"),Y.reset(),u&&(u.textContent=T,u.disabled=!1,u.style.cursor="",u.classList.add("cursor-pointer"))):M.message&&(c.textContent=M.message,c.classList.remove("hidden","bg-green-50","text-green-700"),c.classList.add("bg-red-50","text-red-700"),u&&(u.textContent=T,u.disabled=!1,u.style.cursor="",u.classList.add("cursor-pointer")))}catch{c.textContent="Sunucu hatası. Lütfen tekrar deneyin.",c.classList.remove("hidden","bg-green-50","text-green-700"),c.classList.add("bg-red-50","text-red-700"),u&&(u.textContent=T,u.disabled=!1,u.style.cursor="",u.classList.add("cursor-pointer"))}});const R=document.querySelector('[data-name="logout-button"]');R&&R.addEventListener("click",async S=>{S.preventDefault();const c=R.textContent;R.textContent="Çıkış yapılıyor...",R.disabled=!0,R.style.cursor="not-allowed",R.classList.remove("cursor-pointer");const u=new FormData;u.append("_token",d);try{const T=await fetch("/logout",{method:"POST",headers:{"X-CSRF-TOKEN":d,Accept:"application/json"},body:u});if(T.status===204||T.status===200)typeof Livewire<"u"&&Livewire.dispatch("logoutSuccessful"),window.location.reload();else{const $=await T.json();$.message&&console.error("Logout hatası:",$.message),window.location.reload()}}catch(T){console.error("Logout işlemi sırasında hata:",T),R.textContent=c,R.disabled=!1,R.style.cursor="",R.classList.add("cursor-pointer"),window.location.reload()}})});window.fetchCSRFToken=async function(){try{const l=await(await fetch("/csrf-token",{method:"POST",headers:{"Content-Type":"application/json"}})).json();l.token&&(document.querySelector('meta[name="csrf-token"]').setAttribute("content",l.token),document.querySelectorAll('input[name="_token"]').forEach(e
288=>{e.value=l.token}))}catch(d){console.error("CSRF token güncellenirken hata oluştu:",d)}};const he=document.getElementById("pushMenu"),ve=document.getElementById("pushMenuOverlay"),Ae=document.querySelectorAll('[data-name="menu-all"]'),We=document.getElementById("closePushMenu"),Ye=()=>{he.classList.remove("-translate-x-full"),ve.classList.remove("opacity-0","pointer-events-none"),document.body.classList.add("overflow-hidden")},ye=()=>{he.classList.add("-translate-x-full"),ve.classList.add("opacity-0","pointer-events-none"),document.body.classList.remove("overflow-hidden")};Ae.forEach(d=>{d.addEventListener("click",Ye)});We.addEventListener("click",ye);ve.addEventListener("click",ye);document.addEventListener("click",d=>{!he.contains(d.target)&&!Array.from(Ae).some(l=>l.contains(d.target))&&ye()});document.addEventListener("DOMContentLoaded",()=>{window.innerWidth>=1024&&document.body.classList.contains("home-page")&&document.querySelectorAll("a").forEach(l=>{l.getAttribute("data-name")==="menu-all"||l.closest(".header-logo")||l.closest(".pagination-link")||l.hasAttribute("target")||l.setAttribute("target","_blank")})});const Xe=()=>localStorage.getItem("darkMode")==="true";let ge=Xe();const pe=document.querySelector(".toggler"),ze=document.documentElement,Me=()=>{ge?(ze.classList.add("dark"),pe.children[0].classList.add("mode-moon")):(ze.classList.remove("dark"),pe.children[0].classList.remove("mode-moon"))},Ve=()=>{pe.addEventListener("click",()=>{ge=!ge,localStorage.setItem("darkMode",ge),Me()})};document.addEventListener("DOMContentLoaded",()=>{Me(),Ve()});document.addEventListener("DOMContentLoaded",function(){var e;const d=document.getElementById("userMenuContainer"),l=document.getElementById("pushMenuUserArea");if(!d&&!l)return;const a=(e=document.querySelector('meta[name="csrf-token"]'))==null?void 0:e.getAttribute("content");fetch("/auth/user-menu",{method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest","X-CSRF-TOKEN":a},credentials:"same-origin"}).then(v=>v.json()).then(v=>{var E;v.success&&v.authenticated&&(d&&(d.innerHTML=`
289                    <div class="relative group">
290                        <button
291                            class="login-button cursor-pointer hidden md:flex items-center bg-[#D92E2E] hover:bg-[#c02828] rounded-[20px] px-5 h-9 relative transition-colors duration-200 ml-2"
292                            id="userDropdownBtn" type="button" data-auth="1">
293                            <img src="${v.avatar}" alt="User" class="w-5 h-5 mr-2 rounded-full object-cover">
294                            <span
295                                class="font-pt-sans font-bold text-[14px] leading-[18px] text-white whitespace-nowrap max-w-[60px] overflow-hidden text-ellipsis inline-block align-middle">
296                                ${v.username}
297                            </span>
298                            <svg class="ml-2 w-3 h-3" fill="#ffffff" stroke="currentColor" stroke-width="0" viewBox="0 0 24 24">
299                                <path stroke-linecap="round" stroke-linejoin="round" d="M19 9l-7 7-7-7" />
300                            </svg>
301                        </button>
302                        <div class="absolute right-4 mt-0 w-40 bg-white rounded shadow-lg hidden group-hover:block z-50"
303                            id="userDropdownMenu">
304                            <a href="javascript:;" data-profile-edit class="block w-full text-left px-4 py-2 text-gray-700 hover:bg-gray-100 cursor-pointer">Profilimi Düzenle</a>
305                            <a href="javascript:;" data-follow-settings class="block w-full text-left px-4 py-2 text-gray-700 hover:bg-gray-100 cursor-pointer">Profil Ayarlarım</a>
306                            <form method="POST" action="${v.logoutUrl}">
307                                <input type="hidden" name="_token" value="${v.csrfToken}">
308                                <button type="submit" data-name="logout-button" class="block w-full text-left px-4 py-2 text-[#D92E2E] hover:bg-gray-100 cursor-pointer">Çıkış Yap</button>
309                            </form>
310                        </div>
311                    </div>
312                `),l&&(l.innerHTML=`
313                    <div class="relative" id="pushMenuUserDropdown">
314                        <button type="button" class="flex items-center gap-2 cursor-pointer bg-transparent border-0 p-0" id="pushMenuUserBtn">
315                            <span class="w-8 h-8 rounded-full bg-[#D92E2E] flex items-center justify-center">
316                                <img src="${v.avatar}" alt="User" class="w-8 h-8 rounded-full object-cover">
317                            </span>
318                            <span class="font-roboto font-bold text-sm text-[#222222] dark:text-[#b4b4b4]">${v.username}</span>
319                            <svg class="w-3 h-3" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
320                                <path stroke-linecap="round" stroke-linejoin="round" d="M19 9l-7 7-7-7" />
321                            </svg>
322                        </button>
323                        <div class="absolute left-0 top-full mt-1 w-48 rounded bg-white shadow-lg dark:bg-[#222] hidden z-50" id="pushMenuUserMenu">
324                            <a href="javascript:;" data-profile-edit class="block px-4 py-2.5 text-sm text-[#222] hover:bg-[#f3f3f3] dark:text-[#b4b4b4] dark:hover:bg-[#333] cursor-pointer">Profilimi Düzenle</a>
325                            <a href="javascript:;" data-follow-settings class="block px-4 py-2.5 text-sm text-[#222] hover:bg-[#f3f3f3] dark:text-[#b4b4b4] dark:hover:bg-[#333] cursor-pointer">Profil Ayarlarım</a>
326                            <div class="border-t border-[#eee] dark:border-[#333]"></div>
327                            <form method="POST" action="${v.logoutUrl}">
328                                <input type="hidden" name="_token" value="${v.csrfToken}">
329                                <button type="submit" class="block w-full cursor-pointer border-0 bg-transparent px-4 py-2.5 text-left text-sm text-[#D92E2E] hover:bg-[#f3f3f3] dark:hover:bg-[#333]">Çıkış Yap</button>
330                            </form>
331                        </div>
332                    </div>
333                `,(E=document.getElementById("pushMenuUserBtn"))==null||E.addEventListener("click",function(){var t;(t=document.getElementById("pushMenuUserMenu"))==null||t.classList.toggle("hidden")})))}).catch(v=>{console.error("Error loading user menu:",v)})});function Je(d,l={}){const{timeout:a=2e3,delay:e=1e3}=l;if(document.querySelector(`script[src*="${d}"]`))return;function E(){const t=document.createElement("script");t.src=d,t.async=!0,t.onerror=function(){console.warn(`Script yüklenemedi: ${d}`)},document.body.appendChild(t)}window.requestIdleCallback?requestIdleCallback(E,{timeout:a}):document.readyState==="complete"?setTimeout(E,e):window.addEventListener("load",function(){setTimeout(E,e)})}window.loadScriptLazy=Je;document.addEventListener("DOMContentLoaded",async()=>{if(console.log("GA4Events initialize ediliyor..."),!window.ga4Events){const{default:d}=await Te(async()=>{const{default:l}=await import("./ga4-events.js");return{default:l}},[]);window.ga4Events=new d,console.log("GA4Events başarıyla initialize edildi")}});const Ze=new Ue;Ze.init();const Ie=document.querySelector(".footer-accordion");if(Ie){const d=new IntersectionObserver(l=>{l[0].isIntersecting&&(Te(()=>import("./footerAccordion.js"),[]),d.disconnect())});d.observe(Ie)}const De=document.getElementById("pushMenu");De&&De.addEventListener("click",d=>{const l=d.target.closest(".push-menu-accordion-btn");if(!l)return;const e=l.closest(".push-menu-accordion-item").querySelector(".push-menu-accordion-content"),v=l.querySelector(".push-menu-accordion-icon");l.getAttribute("aria-expanded")==="true"?(e.style.maxHeight="0",l.setAttribute("aria-expanded","false"),v.style.transform="rotate(0deg)"):(e.style.maxHeight=e.scrollHeight+"px",l.setAttribute("aria-expanded","true"),v.style.transform="rotate(180deg)")});

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.