1import{d as X,u as Z,v as ee,w as te,c as r,a as e,b as S,e as g,n as c,t as n,j as w,g as x,h as se,F as Y,r as E,z as ae,K,G as i,l as h,T as M,f as ne,o as l}from"./CeiIIN3h.js";import{_ as oe}from"./6PyalRL4.js";import{u as le}from"./CV3YBOY9.js";import"./Brda5cYg.js";import"./BRLrPitK.js";const re={class:"p-4 sm:p-6 space-y-4"},ie={class:"flex items-center gap-2 flex-wrap"},de=["disabled"],ue={key:0,class:"inline-flex items-center h-[35px] px-3 rounded-[5.25px] bg-secondary text-[12px] font-semibold text-foreground"},ce={class:"ml-auto text-[12px] text-muted-foreground"},xe={key:0,class:"bg-amber-50 border border-amber-200 rounded-[10.5px] px-4 py-3 text-[13px] text-amber-900 flex items-center gap-3"},pe={class:"flex-1"},be={class:"bg-white rounded-[10.5px] shadow-[0_1px_1px_rgba(0,0,0,0.05)] overflow-hidden"},fe={key:0,class:"p-8 text-center text-sm text-muted-foreground"},me={key:1,class:"p-8 text-center"},ye={key:2,class:"overflow-x-auto"},ve={class:"w-full min-w-[880px] text-[13px]"},ge={class:"border-b border-border/40 bg-secondary/40 text-[10.5px] font-semibold uppercase tracking-[0.06em] text-muted-foreground"},he={class:"w-12 px-4 py-3"},_e=["checked"],ke={class:"px-4 py-3"},we=["checked","disabled","onChange"],Ce={class:"px-4 py-3"},$e=["href"],ze={class:"text-[11px] text-muted-foreground"},Ae={class:"px-4 py-3"},Be={class:"font-semibold text-foreground"},Se=["href"],Fe={class:"px-3 py-3 whitespace-nowrap tabular-nums"},je={class:"px-3 py-3 whitespace-nowrap tabular-nums"},De={class:"px-3 py-3 text-center"},Ge={key:1,class:"text-muted-foreground"},He={class:"px-3 py-3 text-center"},Ne=["title"],Le={class:"bg-white rounded-2xl shadow-2xl w-full max-w-[520px]"},Te={class:"px-6 pt-5 pb-3 border-b border-border/40"},Ve={class:"text-[12px] text-muted-foreground mt-0.5"},Ye={class:"px-6 py-4 space-y-4"},Ee={class:"grid grid-cols-3 gap-2"},Ke=["onClick"],Me={class:"text-[13px] font-bold text-foreground"},Ue={class:"text-[11px] text-muted-foreground tabular-nums"},Oe={class:"rounded-xl bg-secondary/40 px-4 py-3 text-[13px] space-y-1"},Re={class:"flex justify-between"},qe={class:"text-muted-foreground"},Pe={class:"tabular-nums"},Ie={class:"flex justify-between"},Je={key:0,class:"text-[13px] text-rose-600 font-medium"},Qe={class:"px-6 pb-5 pt-2 flex items-center justify-end gap-2 border-t border-border/40"},at=X({__name:"linklerim",async setup(We){let _,F;Z({title:"Footer Linklerim - Backlink Ajans"});const{user:U,fetchUser:j}=ee(),{data:D,pending:O,refresh:R}=([_,F]=te(()=>le("/api/footer/linklerim",{key:"footer-linklerim"},"$gwjHES7xpq")),_=await _,F(),_),p=i(()=>D.value?.linkler||[]),C=i(()=>D.value?.fiyatlar||{3:300,6:550,12:1e3}),G=i(()=>p.value.filter(s=>s.durum==="yayinda")),q=i(()=>p.value.filter(s=>s.durum==="bitti")),$=i(()=>G.value.filter(s=>s.kalanGun<=5)),H=s=>s.durum==="yayinda"||s.durum==="bitti",o=h([]),z=i(()=>p.value.filter(H).map(s=>s.id)),N=i(()=>z.value.length>0&&z.value.every(s=>o.value.includes(s)));function P(s){o.value=o.value.includes(s)?o.value.filter(t=>t!==s):[...o.value,s]}function I(){o.value=N.value?[]:[...z.value]}const b=h(!1),d=h(3),f=h(!1),m=h("");function L(){m.value="",b.value=!0}const y=i(()=>o.value.length*(C.value[d.value]||0)),A=i(()=>{const s=U.value||{},t=parseFloat(s.balance||"0")||0,v=parseFloat(s.bonusBalance||"0")||0,k=!s.bonusExpiresAt||new Date(s.bonusExpiresAt)>new Date;return t+(k?v:0)}),T=i(()=>A.value>=y.value);async function J(){if(!f.value){f.value=!0,m.value="";try{const s=await $fetch("/api/footer/yenile",{method:"POST",body:{ids:o.value,ay:d.value}});await j(),await R(),b.value=!1,o.value=[],s.hatali?M.warning(`${s.basarili} baÄlantı uzatıldı, ${s.hatali} baÄlantı uzatılamadı; ücreti iade edildi.`):M.success(`${s.basarili} baÄlantının süresi ${d.value} ay uzatıldı.`)}catch(s){m.value=s?.data?.statusMessage||s?.message||"İÅlem tamamlanamadı",await j()}finally{f.value=!1}}}const V=s=>new Date(s).toLocaleDateString("tr-TR"),Q=s=>({yayinda:"Yayında",bitti:"Sona erdi",bekliyor:"Onay bekliyor",hata:"Yayına alınamadı",iptal:"İptal"})[s]||s,W=s=>({yayinda:"bg-emerald-500/10 text-emerald-600",bitti:"bg-secondary text-muted-foreground",bekliyor:"bg-amber-500/10 text-amber-700",hata:"bg-rose-500/10 text-rose-600",iptal:"bg-secondary text-muted-foreground"})[s]||"",u=s=>
1Number(s||0).toLocaleString("tr-TR",{maximumFractionDigits:0});return(s,t)=>{const v=ne,k=oe;return l(),r("div",re,[e("div",ie,[S(v,{to:"/panel/footer",class:"inline-flex items-center gap-1.5 h-[35px] px-4 rounded-[5.25px] bg-[#e7edfe] text-[#3861fb] text-[12.25px] font-semibold hover:bg-[#dbe4fd] transition-colors"},{default:g(()=>[...t[5]||(t[5]=[e("svg",{class:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2.5"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})],-1),x(" Yeni footer linki al ",-1)])]),_:1}),e("button",{type:"button",class:c(["inline-flex items-center h-[35px] px-4 rounded-[5.25px] text-[12.25px] font-semibold transition-colors",o.value.length?"bg-[#3861fb] text-white hover:bg-[#2c50e0]":"bg-[#e7edfe] text-[#3861fb]/60 cursor-not-allowed"]),disabled:!o.value.length,onClick:t[0]||(t[0]=a=>L())},"Seçilenleri yenile",10,de),o.value.length?(l(),r("span",ue,"â "+n(o.value.length)+" baÄlantı seçili",1)):w("",!0),e("span",ce,n(G.value.length)+" yayında · "+n(q.value.length)+" sona ermiÅ",1)]),$.value.length?(l(),r("div",xe,[e("span",pe,[e("strong",null,n($.value.length)+" baÄlantınız 5 gün içinde sona eriyor.",1),t[6]||(t[6]=x(" Google'da sıralama kaybetmemek için bitmeden yenileyin.",-1))]),e("button",{type:"button",class:"text-[12px] font-semibold text-amber-900 underline underline-offset-2",onClick:t[1]||(t[1]=a=>{o.value=$.value.map(B=>B.id),L()})},"Hepsini yenile")])):w("",!0),e("div",be,[se(O)?(l(),r("div",fe,"Yükleniyorâ¦")):p.value.length?(l(),r("div",ye,[e("table",ve,[e("thead",null,[e("tr",ge,[e("th",he,[e("input",{type:"checkbox",class:"w-4 h-4 rounded border-border",checked:N.value,onChange:I},null,40,_e)]),t[10]||(t[10]=e("th",{class:"text-left px-4 py-3"},"Site",-1)),t[11]||(t[11]=e("th",{class:"text-left px-4 py-3"},"Anahtar kelime â Adres",-1)),t[12]||(t[12]=e("th",{class:"text-left px-3 py-3"},"BaÅlangıç",-1)),t[13]||(t[13]=e("th",{class:"text-left px-3 py-3"},"BitiÅ",-1)),t[14]||(t[14]=e("th",{class:"text-center px-3 py-3"},"Kalan",-1)),t[15]||(t[15]=e("th",{class:"text-center px-3 py-3"},"Durum",-1))])]),e("tbody",null,[(l(!0),r(Y,null,E(p.value,a=>(l(),r("tr",{key:a.id,class:c(["border-b border-border/20 last:border-0",o.value.includes(a.id)?"bg-[#eef2ff]":""])},[e("td",ke,[e("input",{type:"checkbox",class:"w-4 h-4 rounded border-border",checked:o.value.includes(a.id),disabled:!H(a),onChange:B=>P(a.id)},null,40,we)]),e("td",Ce,[e("a",{href:"https://"+a.site,target:"_blank",rel:"noopener",class:"font-semibold text-[#3861fb] hover:underline"},n(a.site),9,$e),e("p",ze,n(a.siteAd),1)]),e("td",Ae,[e("p",Be,n(a.anchor),1),e("a",{href:a.url,target:"_blank",rel:"noopener",class:"text-[11.5px] text-muted-foreground hover:text-foreground truncate block max-w-[280px]"},n(a.url),9,Se)]),e("td",Fe,n(V(a.baslangic)),1),e("td",je,n(V(a.bitis)),1),e("td",De,[a.durum==="yayinda"?(l(),r("span",{key:0,class:c(["inline-flex px-2 py-0.5 rounded-full text-[11px] font-bold tabular-nums",a.kalanGun<=5?"bg-rose-500/10 text-rose-600":a.kalanGun<=30?"bg-amber-500/10 text-amber-700":"bg-emerald-500/10 text-emerald-600"])},n(a.kalanGun)+" gün",3)):(l(),r("span",Ge,"â"))]),e("td",He,[e("span",{class:c(["inline-flex px-2 py-0.5 rounded-full text-[11px] font-semibold",W(a.durum)]),title:a.hata||""},n(Q(a.durum)),11,Ne)])],2))),128))])])])):(l(),r("div",me,[t[8]||(t[8]=e("p",{class:"text-sm font-semibold text-foreground mb-1"},"Henüz footer baÄlantınız yok",-1)),t[9]||(t[9]=e("p",{class:"text-[13px] text-muted-foreground mb-4"},"Haber sitelerimizin altbilgisinde sitewide baÄlantı için Footer Satın Al sayfasından site seçin.",-1)),S(v,{to:"/panel/footer",class:"inline-flex items-center h-10 px-5 rounded-[5.25px] bg-[#3861fb] hover:bg-[#2c50e0] text-white text-[13px] font-semibold"},{default:g(()=>[...t[7]||(t[7]=[x("Footer Satın Al",-1)])]),_:1})]))]),b.value?(l(),r("div",{key:1,class:"fixed inset-0 z-[100] flex items-start sm:items-center justify-center p-3 sm:p-6 bg-black/50",onClick:t[4]||(t[4]=ae(a=>b.value=!1,["self"]))},[e("div",Le,[e("div",Te,[t[16]||(t[16]=e("h2",{class:"text-[17px] font-bold text-foreground"},"BaÄlantıları yenile",-1)),e("p",Ve,n(o.value.length)+" baÄlantı ·
1süre mevcut bitiÅ tarihinin üzerine eklenir",1)]),e("div",Ye,[e("div",Ee,[(l(),r(Y,null,E([3,6,12],a=>e("button",{key:a,type:"button",class:c(["rounded-xl border px-3 py-2.5 text-left transition-colors",d.value===a?"border-[#3861fb] bg-[#eef2ff]":"border-border/60 hover:border-foreground/40"]),onClick:B=>d.value=a},[e("p",Me,n(a)+" Ay",1),e("p",Ue,n(u(C.value[a]||0))+" ⺠/ baÄlantı",1)],10,Ke)),64))]),e("div",Oe,[e("div",Re,[e("span",qe,n(o.value.length)+" à "+n(u(C.value[d.value]||0))+" âº",1),e("b",Pe,n(u(y.value))+" âº",1)]),e("div",Ie,[t[17]||(t[17]=e("span",{class:"text-muted-foreground"},"Kullanılabilir bakiye",-1)),e("b",{class:c(["tabular-nums",T.value?"text-emerald-600":"text-rose-600"])},n(u(A.value))+" âº",3)])]),m.value?(l(),r("p",Je,n(m.value),1)):w("",!0)]),e("div",Qe,[S(k,{variant:"outline",class:"rounded-xl",onClick:t[2]||(t[2]=a=>b.value=!1)},{default:g(()=>[...t[18]||(t[18]=[x("Vazgeç",-1)])]),_:1}),T.value?(l(),K(k,{key:0,class:"rounded-xl bg-[#3861fb] hover:bg-[#2c50e0]",disabled:f.value,onClick:t[3]||(t[3]=a=>J())},{default:g(()=>[x(n(f.value?"Uzatılıyorâ¦":`Bakiyeden yenile · ${u(y.value)} âº`),1)]),_:1},8,["disabled"])):(l(),K(v,{key:1,to:`/panel/bakiye-yukle?amount=${y.value}`,class:"inline-flex items-center h-10 px-5 rounded-xl bg-amber-500 hover:bg-amber-600 text-white text-[13px] font-semibold"},{default:g(()=>[x("Bakiye yükle · eksik "+n(u(y.value-A.value))+" âº",1)]),_:1},8,["to"]))])])])):w("",!0)])}}});export{at as default};
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.