PageSourceSearch

https://lechatbot.com/assets/blog-b61UW50k.js

js lechatbot.com collected 2026-10-02 16:02:35 UTC 3,513 bytes, 2 lines download raw bytes

1import{a as e,l as t,g as n,c as o,d as i}from"./firebase-BmbSka2m.js";import"./main-CLju4K6_.js";const a=document.getElementById("posts-list"),c=document.getElementById("filter-input"),s=document.getElementById("blog-content"),l=document.getElementById("content-placeholder"),r=document.getElementById("content-viewer"),d=document.getElementById("content-title"),u=document.getElementById("content-meta"),g=document.getElementById("content-body"),m=document.getElementById("content-image"),p=document.getElementById("menu-toggle"),y=document.querySelector(".blog-sidebar");let w=[];function f(e){if(!e)return"";const t={"ç":"c","ğ":"g","ı":"i","ö":"o","ş":"s","ü":"u","Ç":"c","Ğ":"g","İ":"i","Ö":"o","Ş":"s","Ü":"u"};let n=e.toString().toLowerCase().trim();for(let o in t)n=n.replace(new RegExp(o,"g"),t[o]);return n.replace(/\s+/g,"-").replace(/[^\w\-]+/g,"").replace(/\-\-+/g,"-")}function h(e){a&&(a.innerHTML="",0!==e.length?e.forEach(e=>{const t=document.createElement("div");t.className="post-card",t.dataset.id=e.id,t.innerHTML=`\n            <div class="post-card-category">${e.category||"Genel"}</div>\n            <div class="post-card-title">${e.title}</div>\n            <div class="post-card-date">${e.date||""}</div>\n        `,t.onclick=()=>L(e),a.appendChild(t)}):a.innerHTML='<p style="padding: 1rem; color: #888;">Yazı bulunamadı.</p>')}function L(n){if(l&&(l.style.display="none"),r&&(r.style.display="block"),d&&(d.innerText=n.title),u&&(u.innerText=`${n.category||""} • ${n.author||"Le Chatbot"} • ${n.date||""}`),g&&(g.innerHTML=n.content||"<p>İçerik bulunamadı.</p>"),m&&(n.image?(m.style.backgroundImage=`url('${n.image}')`,m.style.display="block"):m.style.display="none"),document.querySelectorAll(".post-card").forEach(e=>{e.classList.toggle("active",e.dataset.id===n.id)}),y&&y.classList.contains("active")){y.classList.remove("active");const e=p.querySelector("i");e&&window.lucide&&(e.setAttribute("data-lucide","menu"),lucide.createIcons())}s&&s.scrollTo(0,0);const o=f(n.title);history.pushState({postId:n.id},n.title,`?post=${o}`),document.title=`${n.title} - Le Chatbot Blog`,e&&t(e,"page_view",{page_title:n.title,page_location:window.location.href,page_path:window.location.pathname+window.location.search})}p&&y&&p.addEventListener("click",()=>{y.classList.toggle("active");const e=p.querySelector("i");if(e&&window.lucide){const t=y.classList.contains("active");e.setAttribute("data-lucide",t?"x":"menu"),lucide.createIcons()}}),c&&(c.oninput=e=>{const t=e.target.value.toLowerCase();h(w.filter(e=>e.title.toLowerCase().includes(t)||e.category&&e.category.toLowerCase().includes(t)||e.excerpt&&e.excerpt.toLowerCase().includes(t)))}),window.onpopstate=e=>{if(e.state&&e.state.postId){const t=w.find(t=>t.id===e.state.postId);t&&L(t)}else location.reload()},async function(){try{let e=(await n(o(i,"posts"))).docs.map(e=>({id:e.id,...e.data()}));e.sort((e,t)=>{const n=e=>{if(!e)return 0;const t=new Date(e);if(!isNaN(t.getTime()))return t.getTime();const n=e.split("/");return 3===n.length?new Date(`${n[2]}-${n[1]}-${n[0]}`).getTime():0};return n(t.date)-n(e.date)}),w=e,h(w),function(){const e=new URLSearchParams(window.location.search).get("post");if(e&&w.length>0){const t=w.find(t=>f(t.title)===e);if(t)return void L(t)}w.length>0&&L(w[0])}()}catch(e){console.error("Error fetching posts:",e),a&&(a.innerHTML='<p style="text-align:center; padding: 1rem;">Yazılar yüklenirken bir hata oluştu.</p>')}}();
2//# sourceMappingURL=blog-b61UW50k.js.map

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.