PageSourceSearch

https://sinkacementhai.com/_nuxt/BjTOu6Qu.js

js sinkacementhai.com collected 2026-10-07 14:02:51 UTC 7,978 bytes, 1 lines download raw bytes

1import{g as U}from"./C9VRpM3s.js";import{u as G}from"./C-El9R_f.js";import{C as K,D as W,a as X,u as tt,s as B,r as u,H as k,o as $,w as et,N as st,d as n,e as o,I as ot,t as d,n as w,g as a,F as A,m as j,J as g,k as lt,O as nt,P as at,c as r}from"./B2zKXTBA.js";import{u as rt}from"./DN_qoCjR.js";import"./CYpY1rdy.js";const it={class:""},ct={class:"!text-[14px] xl:!text-[18px] mt-0 md:mt-4 mb-6 xl:mb-8 font-bold text-end"},dt={key:0},ut={class:"grid grid-cols-1 md:grid-cols-3 gap-6 justify-items-center"},pt=["onClick"],xt={key:0},mt=["src","alt"],vt={key:1,class:"xl:w-[351px] xl:h-[196px] md:w-[236px] md:h-[133px] lg:w-[236px] lg:h-[133px] w-[327px] h-[184px] object-contain rounded-md"},ht=["src"],_t={key:2,class:"bg-gray-200 w-full h-48 object-contain"},wt={class:"!text-[16px] md:!text-[18px] font-bold text-[#343434] mb-4 line-clamp-1 break-all"},gt={class:"!text-[14px] text-[#A4A4A4] mb-3"},ft={class:"!text-[14px] text-[#343434] mb-3 break-word line-clamp-2"},bt=["innerHTML"],yt={key:1},kt={class:"w-full flex justify-center"},Ct={class:"text-center max-w-md w-full"},Tt={class:"!text-[14px] text-gray-800"},Lt={key:2,class:"flex flex-col md:flex-row justify-between space-x-2 mt-8 py-4"},At={class:"flex items-center mb-2 text-xs md:text-sm"},Mt={class:"flex items-center space-x-1"},St=["disabled"],Bt=["onClick"],$t=["disabled"],jt="rounded-full  p-2 text-center text-sm text-gray-600 disabled:pointer-events-none disabled:opacity-50",Dt="rounded-full  p-2 text-center text-sm text-gray-600 disabled:pointer-events-none disabled:opacity-50",Pt="w-12 h-12 rounded-full  p-2 text-center text-lg text-slate-600",qt={__name:"main-article-list",setup(Et){const{fetchAllContentList:M,fetchCategoryNewsList:D,fetchCategoryArticleList:P}=G(),E=K(),I=nt();W(),X();const m=tt(),c=rt(),{color:It,hover_color:Nt,bg_cate_color:Rt}=B(m),{current_page_article:i,search_text:f,all_content_cate:zt,news_contents:Ht,article_contents:C,temp_cate_article_list:N,qty_news_list:Vt,qty_article_list:p}=B(c);u(!1),u(null),u(!1);const R=u({id:null,store_id:I.public.SHOP_ID,content_type:"",category_name:"ทั้งหมด",count_no:0,sort_no:0,created_at:null,created_by:null,updated_at:null,updated_by:null,status:!0});let z=u([]);const v=u(9),b=u(9),H=u(8),S=k(()=>{let s=Math.ceil(p.value/v.value);return s<1&&(s=1),s}),y=k(()=>C==null?void 0:C.value),V=k(()=>(p==null?void 0:p.value)??0),Y=k(()=>{const e=Math.ceil(p.value/v.value),t=i.value,l=[];if(e<=3)for(let h=1;h<=e;h++)l.push(h);else{l.push(1),t>3&&l.push("...");const h=Math.max(2,t-1),J=Math.min(e-1,t+1);for(let _=h;_<=J;_++)_!==1&&_!==e&&l.push(_);t<e-2&&l.push("..."),l.push(e)}return l.length<=1?[1]:l});$(async()=>{try{let s=await D();await c.updateTempCateNewsList(s==null?void 0:s.data);let e=await P();await c.updateTempCateArticleList(e==null?void 0:e.data),z.value=[R.value,...N.value],c.changeCurrentPageArticle(1);let t={search:f.value?f.value:"",page:i.value,limit:v.value,content_type:"article"},l=await M(t);await c.updateQTYArticleList(l.data.count),await c.updateArticleContents(l.data.contents)}catch(s){console.log("in catch ERROR"),console.log("err >>> ",s)}}),et([()=>i.value],async([s])=>{if(s){let e={search:f.value?f.value:"",page:i.value?i.value:"",limit:v.value,content_type:"article",category_id:""},t=await M(e);await c.updateQTYArticleList(t.data.count),await c.updateArticleContents(t.data.contents)}});const T=async s=>{if(s>=1&&s<=S.value){c.changeCurrentPageArticle(s);const t=(i.value-1)*v.value+v.value;b.value=t}await at(),setTimeout(()=>{document.body.scrollTo({top:0,behavior:"smooth"}),document.documentElement.scrollTo({top:0,behavior:"smooth"})},50)};function F(s){const e=U(s.title),t=e?`${e}-${s.id}`:`${s.id}`;E.push({path:`/news/${t}`}).then(()=>{location.reload()})}const O=s=>["w-[32px] h-[32px] rounded-full text-center text-sm text-slate-600 disabled:pointer-events-none disabled:opacity-50",i.value===s?"text-white":""],Q=s=>i.value===s?{backgroundColor:m.color}:{},x=u("md"),L=()=>{window.matchMedia("(max-width: 639px)").matches?x.value="sm":window.matchMedia("(min-width: 1280px)").matches?x.value="xl":window.matchMedia("(min-width: 1024px)").matches?x.value="lg":x.value="md"},Z=s=>{let e=30;return x.value==="sm"&&(e=20),x.value==="lg"&&(e=20),x.value==="md"&&(e=20),x.value==="xl"&&(e=20),s.length>e?s.slice(0,e)+"...":s}
1;return $(()=>{L(),window.addEventListener("resize",L)}),st(()=>{window.removeEventListener("resize",L)}),(s,e)=>(r(),n("div",{class:g(["font-sans bg-white mt-0",y.value.length===0?"block md:min-h-[60vw] xl:min-h-0":"min-h-[80vw] xl:min-h-0"])},[o("div",it,[o("div",ct,[o("p",null,[ot(d(s.$t("total2"))+" ",1),o("span",{style:w({color:a(m).color})},d(V.value)+" "+d(s.$t("show_2")),5)])]),y.value.length>0?(r(),n("div",dt,[o("div",ut,[(r(!0),n(A,null,j(y.value,(t,l)=>(r(),n("div",{key:l,class:"cursor-pointer bg-white rounded-lg overflow-hidden transition-transform duration-200 ease-in-out hover:-translate-y-1 xl:w-[351px] md:w-[236px] lg:w-[236px] w-[327px]",onClick:q=>F(t)},[o("div",{class:"rounded-md",style:w({background:a(m).bg_card_color})},[t!=null&&t.img_title?(r(),n("div",xt,[o("img",{src:t.img_title,alt:t.img_title||"Content image",class:"xl:w-[351px] xl:h-[196px] md:w-[236px] md:h-[133px] lg:w-[236px] lg:h-[133px] w-[327px] h-[184px] object-contain rounded-md"},null,8,mt)])):t!=null&&t.video_title?(r(),n("div",vt,[o("video",{src:t.video_title,controls:"",preload:"metadata",class:"w-full h-48 object-contain","aria-label":"Content video"}," Your browser does not support the video tag. ",8,ht)])):(r(),n("div",_t,e[2]||(e[2]=[o("div",{class:"flex flex-col items-center"},[o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"h-24 w-24 mb-2"},[o("path",{"fill-rule":"evenodd",d:"M1.5 6a2.25 2.25 0 0 1 2.25-2.25h16.5A2.25 2.25 0 0 1 22.5 6v12a2.25 2.25 0 0 1-2.25 2.25H3.75A2.25 2.25 0 0 1 1.5 18V6ZM3 16.06V18a.75.75 0 0 0 .75.75h16.5a.75.75 0 0 0 .75-.75v-1.94l-2.69-2.69a1.5 1.5 0 0 0-2.12 0L9.47 16.06a1.5 1.5 0 0 1-2.12 0L3 11.39v4.67ZM10.375 7.5a.875.875 0 1 0 0 1.75.875.875 0 0 0 0-1.75Z","clip-rule":"evenodd"})]),o("p",{class:"text-sm"},"No media available")],-1)])))],4),o("div",null,[o("span",{class:"inline-block !text-[14px] md:!text-[16px] px-2 py-1 mb-3 mt-4 rounded-full truncate w-fit max-w-full",style:w({color:"white",background:a(m).bg_cate_color})},d(Z(t==null?void 0:t.category_name)),5),o("h3",wt,d(t.title),1),o("p",gt," Date Time: "+d(a(c).formatThaiDate2Lang(t.updated_at)),1),o("div",ft,[o("div",{innerHTML:a(c).cleanContentDescriptForListPage(t.content)},null,8,bt)])])],8,pt))),128))])])):(r(),n("div",yt,[o("div",kt,[o("div",{class:"font-sans min-h-4 flex items-center justify-center min-w-[327px] md:min-w-[756px] xl:w-[1120px] h-[140px] mx-2 xl:mx-0",style:w({backgroundColor:a(m).bg_card_color})},[o("div",Ct,[o("p",Tt,d(s.$t("no_articles")),1)])],4)])])),y.value.length>0?(r(),n("div",Lt,[o("div",At,d(s.$t("showing_results",{start:b.value-H.value,end:b.value>a(p)?a(p):b.value,total:a(p)})),1),o("div",Mt,[o("button",{onClick:e[0]||(e[0]=t=>T(a(i)-1)),disabled:a(i)===1,class:g(jt)},e[3]||(e[3]=[o("svg",{xmlns:"http://www.w3.org/2000/svg",class:"w-5 h-10 cursor-pointer",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[o("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)]),8,St),(r(!0),n(A,null,j(Y.value,t=>(r(),n(A,{key:t},[t==="..."?(r(),n("span",{key:0,class:g(Pt)},d(t),1)):(r(),n("button",{key:1,onClick:l=>T(t),class:g(["cursor-pointer",O(t)]),style:w(Q(t))},d(t),15,Bt))],64))),128)),o("button",{onClick:e[1]||(e[1]=t=>T(a(i)+1)),disabled:a(i)===S.value,class:g(Dt)},e[4]||(e[4]=[o("svg",{xmlns:"http://www.w3.org/2000/svg",class:"w-5 h-10 cursor-pointer",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[o("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)]),8,$t)])])):lt("",!0)])],2))}};export{qt 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.