1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[15590],{23818:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/mgmt/[adminPath]/content/updates",function(){return a(57851)}])},36497:function(e,t,a){"use strict";a.d(t,{R:function(){return g}});var l=a(85893),i=a(67294),n=a(96208),s=a(89298),r=a(3559),c=a(30174),o=a(72442),d=a(66322),h=a(66615),m=a(67883),x=a(41664),u=a.n(x),p=a(11163),b=a(39202),f=a(64712);function g(e){let{title:t,subtitle:a,apiPath:x,columns:g,createPath:w,editPath:j,icon:y,itemsKey:v="items",noCreate:N,noEdit:k,noDelete:Z}=e,S=(0,p.useRouter)(),{adminPath:C}=(0,n.A)(),E=C||S.query.adminPath||"",A=(0,b.N)(),[P,_]=(0,i.useState)([]),[T,I]=(0,i.useState)(!0),[M,O]=(0,i.useState)(""),[Y,G]=(0,i.useState)(1),[z,R]=(0,i.useState)(1),[K,L]=(0,i.useState)(0),D=()=>{I(!0),fetch("".concat(x,"?page=").concat(Y,"&limit=20&search=").concat(encodeURIComponent(M))).then(e=>e.json()).then(e=>{_(e[v]||e.items||[]),R(e.totalPages||1),L(e.total||0),I(!1)}).catch(()=>I(!1))};(0,i.useEffect)(()=>{D()},[Y]),(0,i.useEffect)(()=>{G(1),D()},[M]);let q=async e=>{if(await A({title:"Silme Onayı",description:"Bu kaydı silmek istediÄinize emin misiniz? Bu iÅlem geri alınamaz.",confirmText:"Sil",cancelText:"İptal",variant:"danger"}))try{await fetch("".concat(x,"/").concat(e),{method:"DELETE"}),f.Am.success("Kayıt baÅarıyla silindi"),D()}catch(e){f.Am.error("Silme iÅlemi sırasında bir hata oluÅtu")}},B="/mgmt/".concat(E);return(0,l.jsx)(n.l,{title:t,children:(0,l.jsxs)("div",{className:"space-y-5",children:[(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("h1",{className:"text-xl font-semibold text-white/90 tracking-tight flex items-center gap-2",children:[y," ",t]}),a&&(0,l.jsx)("p",{className:"text-sm text-white/30 mt-0.5",children:a}),(0,l.jsxs)("p",{className:"text-xs text-white/20 mt-0.5",children:[K," kayıt"]})]}),!N&&w&&(0,l.jsx)(u(),{href:"".concat(B).concat(w),children:(0,l.jsxs)("button",{className:"flex items-center gap-2 px-4 py-2 rounded-xl text-xs font-medium text-white bg-indigo-500/20 border border-indigo-500/25 hover:bg-indigo-500/30 transition-all",children:[(0,l.jsx)(r.Z,{className:"w-4 h-4"})," Yeni Ekle"]})})]}),(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)(c.Z,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-white/15"}),(0,l.jsx)("input",{value:M,onChange:e=>O(e.target.value),placeholder:"Ara...",className:"w-full sm:w-80 pl-10 pr-4 py-2 rounded-xl bg-white/[0.03] border border-white/[0.06] text-sm text-white/70 placeholder:text-white/15 focus:border-indigo-500/30 focus:outline-none"})]}),(0,l.jsxs)("div",{className:"rounded-xl border border-white/[0.06] bg-white/[0.02] overflow-hidden",children:[(0,l.jsx)("div",{className:"overflow-x-auto",children:(0,l.jsxs)("table",{className:"w-full",children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{className:"border-b border-white/[0.06]",children:[g.map(e=>(0,l.jsx)("th",{className:"text-left px-4 py-3 text-[11px] sm:text-[10px] text-white/25 uppercase tracking-wider font-semibold ".concat(e.hideOnMobile?"hidden md:table-cell":""),children:e.label},e.key)),(!k||!Z)&&(0,l.jsx)("th",{className:"text-right px-4 py-3 text-[11px] sm:text-[10px] text-white/25 uppercase tracking-wider font-semibold",children:"İÅlem"})]})}),(0,l.jsx)("tbody",{children:T?(0,l.jsx)("tr",{children:(0,l.jsx)("td",{colSpan:g.length+1,className:"px-4 py-8 text-center text-xs text-white/20",children:"Y\xfckleniyor..."})}):0===P.length?(0,l.jsx)("tr",{children:(0,l.jsx)("td",{colSpan:g.length+1,className:"px-4 py-8 text-center text-xs text-white/20",children:"Kayıt bulunamadı"})}):P.map((e,t)=>(0,l.jsxs)(s.E.tr,{initial:{opacity:0}
1,animate:{opacity:1},transition:{delay:.02*t},className:"border-b border-white/[0.03] hover:bg-white/[0.02] transition-colors",children:[g.map(t=>{var a,i,n;return(0,l.jsx)("td",{className:"px-4 py-3 text-sm text-white/50 ".concat(t.hideOnMobile?"hidden md:table-cell":""),children:t.render?t.render(e[t.key],e):(0,l.jsx)("span",{className:"truncate block max-w-[200px]",children:null==e[t.key]?"-":"object"==typeof e[t.key]?(null===(a=e[t.key])||void 0===a?void 0:a.tr)||(null===(i=e[t.key])||void 0===i?void 0:i.name_tr)||(null===(n=e[t.key])||void 0===n?void 0:n.title_tr)||JSON.stringify(e[t.key]).substring(0,50):String(e[t.key])})},t.key)}),(!k||!Z)&&(0,l.jsx)("td",{className:"px-4 py-3",children:(0,l.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[!k&&j&&(0,l.jsx)(u(),{href:"".concat(B).concat(j,"/").concat(e.id),target:"_blank",rel:"noopener noreferrer",children:(0,l.jsx)("button",{"aria-label":"D\xfczenle",className:"h-11 w-11 sm:h-8 sm:w-8 flex items-center justify-center rounded-lg text-white/20 hover:text-white/60 hover:bg-white/[0.04] transition-all",children:(0,l.jsx)(o.Z,{className:"w-4 h-4 sm:w-3.5 sm:h-3.5"})})}),!Z&&(0,l.jsx)("button",{onClick:()=>q(e.id),"aria-label":"Sil",className:"h-11 w-11 sm:h-8 sm:w-8 flex items-center justify-center rounded-lg text-white/20 hover:text-red-400 hover:bg-red-500/5 transition-all",children:(0,l.jsx)(d.Z,{className:"w-4 h-4 sm:w-3.5 sm:h-3.5"})})]})})]},e.id))})]})}),z>1&&(0,l.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-t border-white/[0.04]",children:[(0,l.jsxs)("span",{className:"text-[11px] text-white/20",children:[K," kayıt"]}),(0,l.jsxs)("div",{className:"flex gap-1",children:[(0,l.jsx)("button",{onClick:()=>G(Math.max(1,Y-1)),disabled:1===Y,className:"p-1.5 rounded-lg text-white/20 hover:text-white/50 disabled:opacity-30",children:(0,l.jsx)(h.Z,{className:"w-4 h-4"})}),(0,l.jsxs)("span",{className:"px-3 py-1 text-xs text-white/40",children:[Y," / ",z]}),(0,l.jsx)("button",{onClick:()=>G(Math.min(z,Y+1)),disabled:Y===z,className:"p-1.5 rounded-lg text-white/20 hover:text-white/50 disabled:opacity-30",children:(0,l.jsx)(m.Z,{className:"w-4 h-4"})})]})]})]})]})})}},96208:function(e,t,a){"use strict";a.d(t,{l:function(){return X},A:function(){return V}});var l=a(85893),i=a(67294),n=a(11163),s=a(41664),r=a.n(s),c=a(97035),o=a(61388),d=a(31449),h=a(29251),m=a(75305),x=a(69323),u=a(32382),p=a(6984),b=a(1188),f=a(30371),g=a(43419),w=a(76207),j=a(85019),y=a(19953),v=a(62689),N=a(4995),k=a(81911),Z=a(2111),S=a(98602),C=a(57987),E=a(14201),A=a(13915),P=a(53074),_=a(37114),T=a(21734),I=a(90620),M=a(50033),O=a(46799),Y=a(1602),G=a(26371),z=a(66615),R=a(39032);let K="aigency-admin-sidebar-scroll",L=[{title:"Ana Men\xfc",items:[{label:"Kontrol Paneli",icon:c.Z,path:""},{label:"Asistanlar",icon:o.Z,path:"/assistants"},{label:"M\xfcÅteriler",icon:d.Z,path:"/customers"},{label:"Uygulamalar",icon:h.Z,path:"/apps"},{label:"Sohbetler",icon:m.Z,path:"/chats"},{label:"Geri Bildirimler",icon:x.Z,path:"/feedbacks"}]},{title:"SatıÅ",items:[{label:"\xd6demeler",icon:u.Z,path:"/payments"},{label:"iOS \xd6demeler",icon:p.Z,path:"/ios-payments"},{label:"Android \xd6demeler",icon:b.Z,path:"/android-payments"},{label:"Kredi Ge\xe7miÅi",icon:f.Z,path:"/credit-logs"},{label:"Paketler",icon:g.Z,path:"/packages"},{label:"Kuponlar",icon:w.Z,path:"/coupons"}]},{title:"İ\xe7erik",items:[{label:"Blog",icon:j.Z,path:"/blog"},{label:"SSS",icon:y.Z,path:"/content/faq"},{label:"Kampanyalar",icon:v.Z,path:"/content/campaigns"},{label:"Markalar",icon:N.Z,path:"/content/brands"},{label:"S\xfcr\xfcm Notları",icon:k.Z,path:"/content/updates"},{label:"İletiÅim",icon:Z.Z,path:"/content/contact"},{label:"Bekleme Listesi",icon:S.Z,path:"/waitlist"}]},{title:"Pazarlama",items:[{label:"E-Mail Kampanyaları",icon:C.Z,path:"/campaigns"}]},{title:"Ayarlar",items:[{label:"AI Ayarları",icon:o.Z,path:"/settings/ai"},{label:"API Ayarları",icon:E.Z,path:"/settings/api"},{label:"Genel Ayarlar",icon:A.Z,path:"/settings/general"},{label:"Sistem Ayarları",icon:E.Z,path:"/settings/system"},{label:"AlıÅveriÅ",icon:P.Z,path:"/settings/shopping"}]},{title:"AIGENCY CLI",items:[{label:"CLI Dashboard",icon:_.Z,path:"/cli"},{label:"M\xfcÅteri Y\xf6netimi",icon:d.Z,path:"/cli/customers"},{label:"Oturumlar",icon:T.Z,path:"/cli/sessions"},{label:"Kullanım",icon:I.Z,path:"/cli/usage"},{label:"Denetim G\xfcnl\xfcÄ\xfc",icon:f.Z,path:"/cli/audit"}]},{title:"AI \xd6zellikleri (Yeni)",items:[{label:"ZamanlanmıŠG\xf6revler",icon:M.Z,path:"/scheduled-tasks"},{label:"Knowledge Base",icon:O.Z,path:"/knowledge-base"},{label:"AI \xd6zellikleri (DR/Canvas)",icon:Y.Z,path:"/ai-features"}]},{title:"Y\xf6netim",items:[{label:"G\xfcvenlik",icon:T.Z,path:"/security"},{label:"Y\xf6neticiler",icon:T.Z,path:"/admins"},{label:"Agent Cache",icon:I.Z,path:"/cache-stats"},{label:"Vaka Dosyaları",icon:G.Z,path:"/case-file-stats"},{label:"Hesabım",icon:d.Z,path:"/account"}]}];function D(e){let{isOpen:t,onToggle:a,mobileOpen:s,onMobileClose:c}=e,o=(0,n.useRouter)(),{adminPath:d}=V(),h=d||o.query.adminPath||"",m="/mgmt/".concat(h),x=o.asPath.replace(m,""),u=(0,i.useRef)(null),p=(0,i.useRef)(null);(0,i.useEffect)(()=>{let e=window.sessionStorage.getItem(K);if(!e)return;let t=parseInt(e,10);Number.isFinite(t)&&!(t<0)&&requestAnimationFrame(()=>{u.current&&(u.current.scrollTop=t),p.current&&(p.current.scrollTop=t)})},[]),(0,i.useEffect)(()=>{let e=null,t=t=>{let a=t.target;e&&clearTimeout(e),e=setTimeout(()=>{try{window.sessionStorage.setItem(K,String(a.scrollTop))}catch(e){}},100)},a=u.current,l=p.current;return null==a||a.addEventListener("scroll",t,{passive:!0}),null==l||l.addEventListener("scroll",t,{passive:!0}),()=>{e&&clearTimeout(e),null==a||a.removeEventListener("scroll",t),null==l||l.removeEventListener("scroll",t)}},[]);let b=async()=>{await fetch("/api/admin/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"logout"})}),o.push("".concat(m,"/login"))},f=e=>""===e?""===x||"/"===x:x===e,g=(()=>{let e="";for(let t of L)for(let a of t.items)""!==a.path&&(x===a.path||x.startsWith(a.path+"/"))&&a.path.length>e.length&&(e=a.path);return e})(),w=e=>(0,l.jsxs)("div",{className:"flex flex-col h-full",children:[(0,l.jsxs)("div",{className:"h-14 flex items-center justify-between px-4 border-b border-white/[0.04]",children:[t&&(0,l.jsx)("span",{className:"text-sm font-bold text-white/80 tracking-tight",children:"AIGENCY"}),(0,l.jsx)("button",{onClick:a,className:"hidden md:flex p-1.5 rounded-lg text-white/20 hover:text-white/40 hover:bg-white/[0.03] transition-all",children:(0,l.jsx)(z.Z,{className:"w-4 h-4 transition-transform ".concat(t?"":"rotate-180")}
1)})]}),(0,l.jsx)("nav",{ref:e,className:"flex-1 overflow-y-auto py-3 px-2 space-y-4 scrollbar-hide",children:L.map(e=>(0,l.jsxs)("div",{children:[t&&(0,l.jsx)("p",{className:"px-3 mb-1 text-[9px] text-white/15 uppercase tracking-widest font-semibold",children:e.title}),(0,l.jsx)("div",{className:"space-y-0.5",children:e.items.map(e=>{let a="".concat(m).concat(e.path),i=""===e.path?f(""):e.path===g;return(0,l.jsx)(r(),{href:a,onClick:c,children:(0,l.jsxs)("div",{className:"flex items-center gap-3 px-3 py-2 rounded-lg text-xs font-medium transition-all ".concat(i?"text-indigo-300 bg-indigo-500/10 border border-indigo-500/10":"text-white/35 hover:text-white/60 hover:bg-white/[0.03]"),children:[(0,l.jsx)(e.icon,{className:"w-4 h-4 shrink-0"}),t&&(0,l.jsx)("span",{children:e.label})]})},e.path)})})]},e.title))}),(0,l.jsx)("div",{className:"p-2 border-t border-white/[0.04]",children:(0,l.jsxs)("button",{onClick:b,className:"w-full flex items-center gap-3 px-3 py-2 rounded-lg text-xs text-white/25 hover:text-red-400 hover:bg-red-500/5 transition-all",children:[(0,l.jsx)(R.Z,{className:"w-4 h-4"}),t&&(0,l.jsx)("span",{children:"\xc7ıkıÅ"})]})})]});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("aside",{className:"hidden md:block fixed top-0 left-0 h-full z-20 border-r border-white/[0.04] bg-black/90 backdrop-blur-xl transition-all duration-300 ".concat(t?"w-64":"w-16"),children:w(u)}),(0,l.jsx)("aside",{className:"md:hidden fixed top-0 left-0 h-full w-64 z-40 border-r border-white/[0.04] bg-black/95 backdrop-blur-xl transition-transform duration-300 ".concat(s?"translate-x-0":"-translate-x-full"),children:w(p)})]})}var q=a(66942),B=a(3384);function J(e){let{onMenuClick:t}=e,{admin:a,adminPath:s}=V(),r=(0,n.useRouter)(),[c,o]=(0,i.useState)(0);return(0,i.useEffect)(()=>{let e=async()=>{try{let t=await fetch("/api/admin/security",{credentials:"same-origin"});if(t.ok){var e;let a=await t.json();o((null===(e=a.stats)||void 0===e?void 0:e.unresolvedAlerts)||0)}}catch(e){}};e();let t=setInterval(e,6e4);return()=>clearInterval(t)},[]),(0,l.jsxs)("header",{className:"h-14 shrink-0 border-b border-white/[0.04] bg-black/50 backdrop-blur-xl flex items-center justify-between px-4 md:px-6",children:[(0,l.jsx)("button",{onClick:t,className:"md:hidden p-2 rounded-lg text-white/30 hover:text-white/60 hover:bg-white/[0.04] transition-all",children:(0,l.jsx)(q.Z,{className:"w-5 h-5"})}),(0,l.jsx)("div",{className:"flex-1"}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsxs)("button",{onClick:()=>r.push("/mgmt/".concat(s,"/security?tab=alerts")),className:"relative p-2 rounded-lg text-white/30 hover:text-white/60 hover:bg-white/[0.04] transition-all",title:"G\xfcvenlik Uyarıları",children:[(0,l.jsx)(k.Z,{className:"w-4 h-4"}),c>0&&(0,l.jsx)("span",{className:"absolute -top-0.5 -right-0.5 min-w-[16px] h-4 rounded-full bg-red-500 text-[9px] text-white font-bold flex items-center justify-center px-1",children:c>99?"99+":c})]}),(0,l.jsxs)("div",{className:"text-right hidden sm:block",children:[(0,l.jsx)("p",{className:"text-xs text-white/50 font-medium",children:null==a?void 0:a.email}),(0,l.jsx)("p",{className:"text-[10px] text-white/20",children:"Y\xf6netici"})]}),(0,l.jsx)("div",{className:"w-8 h-8 rounded-lg bg-white/[0.04] border border-white/[0.06] flex items-center justify-center",children:(0,l.jsx)(B.Z,{className:"w-4 h-4 text-white/30"})})]})]})}var F=a(9008),U=a.n(F);let H=(0,i.createContext)({admin:null,adminPath:"",loading:!0}),V=()=>(0,i.useContext)(H);function X(e){let{children:t,title:a}=e,s=(0,n.useRouter)(),r=s.query.adminPath||"",[c,o]=(0,i.useState)(null),[d,h]=(0,i.useState)(r),[m,x]=(0,i.useState)(!0),[u,p]=(0,i.useState)(!0),[b,f]=(0,i.useState)(!1);return((0,i.useEffect)(()=>{r&&!d&&h(r)},[r]),(0,i.useEffect)(()=>{fetch("/api/admin/auth",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"me"})}).then(e=>e.ok?e.json():Promise.reject()).then(e=>{o(e.admin),h(e.adminPath||r),x(!1)}).catch(()=>{let e=s.asPath.split("/")[2]||"";s.replace("/mgmt/".concat(e,"/login"))})},[]),m)?(0,l.jsx)("div",{className:"min-h-screen bg-black flex items-center justify-center",children:(0,l.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,l.jsx)("div",{className:"w-8 h-8 rounded-lg bg-indigo-500/20 border border-indigo-500/15 flex items-center justify-center animate-pulse",children:(0,l.jsx)("div",{className:"w-2 h-2 rounded-full bg-indigo-400"})}),(0,l.jsx)("span",{className:"text-xs text-white/20",children:"Y\xfckleniyor..."})]})}):(0,l.jsxs)(H.Provider,{value:{admin:c,adminPath:d,loading:m},children:[(0,l.jsxs)(U(),{children:[(0,l.jsx)("title",{children:a?"".concat(a," â AIGENCY Y\xf6netim"):"AIGENCY Y\xf6netim"}),(0,l.jsx)("meta",{name:"robots",content:"noindex, nofollow"})]}),(0,l.jsxs)("div",{className:"min-h-screen bg-black flex",children:[(0,l.jsx)(D,{isOpen:u,onToggle:()=>p(!u),mobileOpen:b,onMobileClose:()=>f(!1)}),(0,l.jsxs)("div",{className:"flex-1 flex flex-col min-h-screen transition-all duration-300 ".concat(u?"md:ml-64":"md:ml-16"),children:[(0,l.jsx)(J,{onMenuClick:()=>f(!0)}),(0,l.jsx)("main",{className:"flex-1 p-4 md:p-6 lg:p-8",children:t})]}),b&&(0,l.jsx)("div",{className:"fixed inset-0 bg-black/60 z-30 md:hidden",onClick:()=>f(!1)})]})]})}},67883:function(e,t,a){"use strict";a.d(t,{Z:function(){return l}});let l=(0,a(78540).Z)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},3559:function(e,t,a){"use strict";a.d(t,{Z:function(){return l}});let l=(0,a(78540).Z)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},30174:function(e,t,a){"use strict";a.d(t,{Z:function(){return l}});let l=(0,a(78540).Z)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]])},72442:function(e,t,a){"use strict";a.d(t,{Z:function(){return l}});let l=(0,a(78540).Z)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]])},57851:function(e,t,a){"use strict";a.r(t),a.d(t,{__N_SSP:function(){return s},default:function(){return r}});var l=a(85893),i=a(36497),n=a(81911),s=!0;function r(){return(0,l.jsx)(i.R,{title:"G\xfcncellemeler",apiPath:"/api/admin/content/updates",columns:[{key:"version",label:"Versiyon"},{key:"title",label:"BaÅlık",render:e=>{try{let t="object"==typeof e?e:JSON.parse(e);
1return(null==t?void 0:t.tr)||(null==t?void 0:t.title_tr)||String(e||"-")}catch(t){return String(e||"-")}}},{key:"update_date",label:"Tarih",render:e=>(0,l.jsx)("span",{className:"text-xs text-white/60",children:e?new Date(e).toLocaleDateString("tr-TR"):"-"})}],createPath:"/content/updates/create",editPath:"/content/updates",icon:(0,l.jsx)(n.Z,{className:"w-5 h-5 text-indigo-400"})})}}},function(e){e.O(0,[41664,21943,89298,49774,92888,40179],function(){return e(e.s=23818)}),_N_E=e.O()}]);
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.