1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9603],{27646:function(e,t,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/search",function(){return l(17142)}])},17142:function(e,t,l){"use strict";l.r(t);var a=l(85893);l(9008);var n=l(67294),s=l(70594),i=l(11163),o=l(84433),c=l(20840),r=l(33683),d=l(50747),u=l(86986),m=l(72785),h=l(21609),v=l(50381),x=l(55348),p=l(51837),y=l(22125),j=l(56108),g=l(41664),_=l.n(g);let f=e=>{let{articlesInit:t,error:l}=e,g=(0,i.useRouter)(),[f,w]=(0,n.useState)(""),{keyword:b}=g.query,[N,S]=(0,n.useState)(""),[C,$]=(0,n.useState)([]),[P,k]=(0,n.useState)(!1),[I,B]=(0,n.useState)(null),[E,F]=(0,n.useState)(""),[D,T]=(0,n.useState)(""),[Z,q]=(0,n.useState)(""),[L,W]=(0,n.useState)(""),[z,K]=(0,n.useState)(""),[M,O]=(0,n.useState)(null),[X,A]=(0,n.useState)(null),[G,Q]=(0,n.useState)(null),[R,U]=(0,n.useState)(null),[Y,H]=(0,n.useState)(!0),[J,V]=(0,n.useState)(!1),[ee,et]=(0,n.useState)(!1),[el,ea]=(0,n.useState)(!1),[en,es]=(0,n.useState)(!1),[ei,eo]=(0,n.useState)(!1),[ec,er]=(0,n.useState)(!1),[ed,eu]=(0,n.use
1State)(!1),[em,eh]=(0,n.useState)(!1),[ev,ex]=(0,n.useState)((0,j.ob)({title:"ระà¸à¸à¸à¹à¸à¸«à¸²à¸à¹à¸²à¸§à¸ªà¸²à¸£"})),ep=async()=>{let e=[],t=await (0,h.KQ)();for(let l of t)e.push(ey(l));return V(e),e},ey=e=>{let t={};return t.value=e.id,t.label=e.attributes.category_name,t},ej=async()=>{let e=[],t=await (0,v.M8)();for(let l of t)e.push(eg(l));return et(e),e},eg=e=>{let t={};return t.value=e.id,t.label=e.attributes.sub_category_name,t},e_=async()=>{let e=[],t=await (0,x.Cy)();for(let l of t)e.push(ef(l));return ea(e),e},ef=e=>{let t={};return t.value=e.id,t.label=e.attributes.name,t},ew=async()=>{let e=[],t=await (0,p.pc)();for(let l of t)e.push(eb(l));return es(e),e},eb=e=>{let t={};return t.value=e.id,t.label=e.attributes.title,t},eN=async()=>{H(!0),await ep(),await ej(),await e_(),await ew(),H(!1)},eS=async e=>{let t=await (0,h.OT)(null==e?void 0:e.value),l=null;return t&&(l=ey(t)),O(l),l},eC=async e=>{let t=await (0,v.WG)(null==e?void 0:e.value),l=null;return t&&(l=eg(t)),A(l),l},e$=async e=>{let t=await (0,x.s4)(null==e?void 0:e.value),l=null;return t&&(l=ef(t)),Q(l),l},eP=async e=>{if(console.log("categoryId : "+e),!e)return;let t=[],l=await (0,v.ot)(e);if(l){for(let a of l){let n=eg(a);t.push(n)}et(t)}else t=await (0,v.M8)();return t},ek=async e=>{O(e),e||eN();let t=await eP(null==e?void 0:e.value),l=await eB(t);await eT(l)},eI=async e=>{if(A(e),e){eo(!0);let t=await eS(e);await eP(null==t?void 0:t.value);let l=await eE(e.value,null);ea(l),await eT(l)}else{eo(!1);let a=await eP(null==M?void 0:M.value),n=await eB(a);await eT(n),eq();return}},eB=async e=>{let t=[];if(e){for(let l of e){let a=await eE(l.value,null);t=t.concat(a)}return ea(t),t}},eE=async(e,t)=>{if(!e)return;let l=t||[],a=await (0,x.PF)(e);if(a)for(let n of a){let s=ef(n);l.push(s)}else l=await e_();return l},eF=async e=>{if(Q(e),e)eo(!0),er(!0);else{er(!1);let t=await eE(null==X?void 0:X.value,null);ea(t);let l=await eT(t);es(l),er(!1),eq();return}let a=await eD(e.value);es(a);let n=await eC(e);await eS(n)},eD=async e=>{if(!e)return;let t=await (0,p.vL)(e),l=[];if(t)for(let a of t){let n=eb(a);l.push(n)}else l=await ew();return l},eT=async e=>{let t=[];if(e){for(let l of e){let a=await eD(l.value,null);t=t.concat(a)}return es(t),t}},eZ=async e=>{if(U(e),e)eo(!0),er(!0),eu(!0);else{if(null==G?void 0:G.value){let t=await eD(null==G?void 0:G.value);es(t)}eu(!1),eq();return}let l=await e$(e),a=await eC(l);await eS(a),await eS(a)},eq=()=>{(null==M?void 0:M.value)||(null==X?void 0:X.value)||(null==G?void 0:G.value)||(null==R?void 0:R.value)||(eo(!1),er(!1),eu(!1),eu(!1))};(0,n.useEffect)(()=>{w(b),eN(),S("ระà¸à¸à¸à¹à¸à¸«à¸²à¸à¹à¸²à¸§à¸ªà¸²à¸£"),eQ(b)},[b]);let eL=e=>{K(e.target.value)},eW={display:"flex",justifyContent:"center",alignItems:"center"},ez={menuPortal:e=>({...e,zIndex:9999}),menu:e=>({...e,zIndex:9999})},eK={width:"110px",marginBottom:"0px",position:"relative"},eM={marginTop:"0px",fontWeight:"bold"},eO={display:"flex",justifyContent:"center",alignItems:"center",marginBottom:"0px"},eX={paddingLeft:"0px",paddingTop:"0px",marginTop:"6px",marginBottom:"0px"},eA={marginTop:"12px",marginBottom:"0px"},eG=e=>{eY(null)},eQ=e=>{!P&&e&&(F(e=e?e.trim():e),document.getElementById("topicPara").value=e,eY(e))},eR=async e=>{let t=document.getElementsByName("hot_news_selections");for(let l=0;l<t.length;l++)t[l].checked=!1;t[2].checked=!0,K("all_news"),document.getElementById("topicPara").value=null,document.getElementById("contentPara").value=null,document.getElementById("startPublishDatePara").value=null,document.getElementById("endPublishDatePara").value=null,F(""),T(""),q(""),W(""),O(null),A(null),Q(null),U(null),eo(!1),er(!1),eu(!1),eh(!1),eN()},eU=async e=>{let t=o.UW,l=0;if(t+="/api/articles?",E||e){let a=E||e;t+="filters[$or][".concat(l,"][title][$contains]=").concat(a,"&"),l+=1,t+="filters[$or][".concat(l,"][short_content][$contains]=").concat(a,"&"),l=0}if(D&&(t+="filters[$and][".concat(l,"][main_content][$contains]=").concat(D,"&"),l+=1),Z&&(t+="filters[$and][".concat(l,"][published_at][$gte]=").concat(Z,"&"),l+=1),L){let n=Date.parse(L);n=new Date(n+864e5);let s=parseInt(n.getFullYear()),i=String(parseInt(n.getMonth()+1)).padStart(2,"0"),c=String(parseInt(n.getDate())).padStart(2,"0");t+="filters[$and][".concat(l,"][published_at][$lt]=").concat(s+"-"+i+"-"+c,"&"),l+=1}return"only_hot_news"==z?(t+="filters[$and][".concat(l,"][is_hot_topic][$eq]=true&"),l+=1):"no_hot_news"==z&&(t+="filters[$and][".concat(l,"][is_hot_topic][$eq]=false&"),l+=1),(null==R?void 0:R.value)?(t+="filters[$and][".concat(l,"][subsection][id][$eq]=").concat(R.value,"&"),l+=1):(null==G?void 0:G.value)?(t+="filters[$and][".concat(l,"][section][id][$eq]=").concat(G.value,"&"),l+=1):(null==X?void 0:X.value)?(t+="filters[$and][".concat(l,"][sub_category][id][$eq]=").concat(X.value,"&"),l+=1):(null==M?void 0:M.value)&&(t+="filters[$and][".concat(l,"][c
1ategory][id][$eq]=").concat(M.value,"&"),l+=1),t+="pagination[pageSize]=".concat(50,"&sort[0]=publish_date%3Adesc&populate=*")},eY=async e=>{k(!0);let t=await eU(e),l=await s.Z.get(t),a=l.data.data;for(let n=0;n<a.length;n++){let i=a[n];i.article_type_id=i.attributes.article_type.data.id,i.short_content=i.attributes.short_content,a[n]=i}$(a),k(!1)};return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(a.Fragment,{children:[ev,(0,a.jsx)("div",{id:"canvas",children:(0,a.jsxs)("div",{id:"box_wrapper",children:[(0,a.jsx)(c.Z,{}),(0,a.jsx)(r.Z,{pageTitle:N}),(0,a.jsx)("section",{className:"ls section_padding_top_100 section_padding_bottom_30 columns_padding_10",children:(0,a.jsxs)("div",{className:"container",style:{paddingTop:"20px",justifyContent:"center",alignItems:"center"},children:[(0,a.jsx)("div",{className:"col-sm-12 col-lg-6 ",style:eA,children:(0,a.jsxs)("div",{className:"FormComponent",children:[(0,a.jsx)("div",{style:eM,children:"หัวà¸à¹à¸à¸à¹à¸²à¸§"}),(0,a.jsx)("div",{style:eW,children:(0,a.jsx)("input",{id:"topicPara",type:"text",name:"search",value:E,onChange(e){var t;return F(null===(t=e.target.value)||void 0===t?void 0:t.trim())},className:"form-control",placeholder:"à¸à¹à¸à¸à¸§à¸²à¸¡à¸ªà¸³à¸«à¸£à¸±à¸à¸à¹à¸à¸«à¸²...."})})]})}),(0,a.jsx)("div",{className:"col-sm-12 col-lg-6 ",style:eA,children:(0,a.jsxs)("div",{className:"FormComponent",children:[(0,a.jsx)("div",{style:eM,children:"à¹à¸à¸·à¹à¸à¸«à¸²à¸à¹à¸²à¸§"}),(0,a.jsx)("div",{style:eW,children:(0,a.jsx)("input",{id:"contentPara",type:"text",name:"search",value:D,onChange:e=>T(e.target.value),className:"form-control",placeholder:"à¸à¹à¸à¸à¸§à¸²à¸¡à¸ªà¸³à¸«à¸£à¸±à¸à¸à¹à¸à¸«à¸²...."})})]})}),(0,a.jsx)("div",{className:"col-sm-12 col-lg-6 ",style:eA,children:(0,a.jsxs)("div",{className:"FormComponent",children:[(0,a.jsx)("div",{style:eM,children:"วัà¸à¸à¸µà¹à¹à¸à¸¢à¹à¸à¸£à¹"}),(0,a.jsxs)("div",{className:"col-sm-6 col-lg-6 ",style:eX,children:[(0,a.jsx)("div",{children:"à¸à¸±à¹à¸à¹à¸à¹"}),(0,a.jsx)("div",{style:eO,children:(0,a.jsx)("input",{id:"startPublishDatePara",type:"date",value:Z,className:"form-control",onChange:e=>q(e.target.value),placeholder:"à¸à¹à¸à¸à¸§à¸²à¸¡à¸ªà¸³à¸«à¸£à¸±à¸à¸à¹à¸à¸«à¸²....",max:L})})]}),(0,a.jsxs)("div",{className:"col-sm-6 col-lg-6 ",style:eX,children:[(0,a.jsx)("div",{children:"à¸à¸à¸à¸¶à¸"}),(0,a.jsx)("div",{style:eO,children:(0,a.jsx)("input",{id:"endPublishDatePara",type:"date",value:L,onChange:e=>W(e.target.value),min:Z,className:"form-control",placeholder:"à¸à¹à¸à¸à¸§à¸²à¸¡à¸ªà¸³à¸«à¸£à¸±à¸à¸à¹à¸à¸«à¸²...."})})]})]})}),(0,a.jsx)("div",{className:"col-sm-12 col-lg-6 ",style:eA,children:(0,a.jsxs)("div",{className:"FormComponent",children:[(0,a.jsx)("div",{style:eM,children:"à¹à¸à¹à¸à¸à¹à¸²à¸§à¹à¸à¹à¸à¸«à¸£à¸·à¸à¹à¸¡à¹"}),(0,a.jsxs)("div",{style:{position:"relative",fontWeight:"normal"},children:[(0,a.jsx)("input",{type:"radio",id:"only_hot_news_id",name:"hot_news_selections",value:"only_hot_news",onChange:eL}),(0,a.jsx)("label",{htmlFor:"only_hot_news_id",children:" \xa0à¹à¸à¹"}),(0,a.jsx)("br",{}),(0,a.jsx)("input",{type:"radio",id:"no_hot_news_id",name:"hot_news_selections",value:"no_hot_news",onChange:eL}),(0,a.jsx)("label",{htmlFor:"no_hot_news_id",children:" \xa0à¹à¸¡à¹à¹à¸à¹"}),(0,a.jsx)("br",{}),(0,a.jsx)("input",{type:"radio",id:"all_news_id",name:"hot_news_selections",value:"all_news",defaultChecked:!0,onChange:eL}),(0,a.jsx)("label",{htmlFor:"all_news_id",style:{marginBottom:0},children:" \xa0à¸à¹à¸²à¸§à¸à¸±à¹à¸à¸«à¸¡à¸"})]})]})}),(0,a.jsx)("div",{className:"col-sm-12 col-lg-12 ",style:eA,children:(0,a.jsxs)("div",{className:"FormComponent",children:[(0,a.jsx)("div",{style:eM,children:"à¸à¸£à¸°à¹à¸ à¸à¸à¹à¸²à¸§"}),(0,a.jsxs)("div",{className:"col-sm-12 col-md-12 col-lg-6 ",style:eX,children:[(0,a.jsx)("div",{children:"หมวà¸à¸«à¸¡à¸¹à¹"}),(0,a.jsx)("div",{children:(0,a.jsx)(m.ZP,{isClearable:!0,isLoading:Y,styles:ez,options:J,value:M,isDisabled:ei,onChange:e=>ek(e)})})]}),(0,a.jsxs)("div",{className:"col-sm-12 col-md-12 col-lg-6 ",style:eX,children:[(0,a.jsx)("div",{children:"หมวà¸à¸«à¸¡à¸¹à¹à¸¢à¹à¸à¸¢"}),(0,a.jsx)("div",{children:(0,a.jsx)(m.ZP,{isClearable:!0,isLoading:Y,styles:ez,options:ee,value:X,isDisabled:ec,onChange:e=>eI(e)})})]}),(0,a.jsxs)("div",{className:"col-sm-12 col-md-12 col-lg-6 ",style:eX,children:[(0,a.jsx)("div",{children:"สà¹à¸§à¸à¸à¹à¸²à¸§"}),(0,a.jsx)("div",{children:(0,a.jsx)(m.ZP,{isClearable:!0,isLoading:Y,styles:ez,options:el,value:G,isDisabled:ed,onChange:e=>eF(e)})})]}),(0,a.jsxs)("div",{className:"col-sm-12 col-md-12 col-lg-6 ",style:eX,children:[(0,a.jsx)("div",{children:"สà¹à¸§à¸à¸à¹à¸²à¸§à¸¢à¹à¸à¸¢"}),(0,a.jsx)("div",{children:(0,a.jsx)(m.ZP,{isClearable:!0,isLoading:Y,styles:ez,options:en,value:R,isDisabled:em,onChange:e=>eZ(e)})})]})]})}),(0,a.jsx)("div",{className:"col-sm-12 col-lg-12 ",style:eA,children:(0,a.jsxs)("div",{className:"col-sm-12 col-md-12 col-lg-12",style:{display:"flex",justifyContent:"center",alignItems:"center",marginBottom:"0px"},children:[(0,a.jsx)("button",{className:"theme_button color1 inverse",style:eK,onClick:eR,children:"ลà¹à¸²à¸"}),(0,a.jsx)("button",{className:"theme_button color1",style:eK,onClick:eG,children:"à¸à¹à¸à¸«à¸²"})]})}),(0,a.jsxs)("div",{className:"col-sm-12 col-lg-12 ",children:[(0,a.jsx)("div",{className:"row",children:(0,a.jsx)("h3",{children:" à¸à¸¥à¸à¸²à¸£à¸à¹à¸à¸«à¸² "})}),(0,a.jsx)("div",{className:"row",children:(0,a.jsx)("div",{className:"col-sm12 col-md-12 col-lg-12",children:P?(0,a.jsx)("div",{children:"à¸à¸³à¸¥à¸±à¸à¸à¹à¸à¸«à¸²......"}):C&&C.length>0?C.map((e,t)=>(0,a.jsx)("div",{style:{marginBottom:8},children:(0,a.jsxs)("span",{className:"small-text",children:[(0,a.jsx)("i",{className:"rt-icon2-files",style:{fontSize:"20px"}})," ","\xa0",(0,a.jsx)(_(),{href:5===e.article_type_id?(0,u.sT)(e.short_content)?e.short_content:"redirect?id="+e.id:{pathname:4===e.article_type_id?"pdf":"articles",query:{id:e.id,type:"dede-news"}},target:4===e.article_type_id?"_blank":5===e.article_type_id?"_blank":null,children:(0,a.jsxs)("span",{className:"small-text",children:[5===e.article_type_id?e.attributes.title:e.attributes.short_content?e.attributes.short_content:e.attributes.title,(0,y.Z)(e.attributes,I)]})})]})},e.id)):(0,a.jsx)("div",{children:"à¹à¸¡à¹à¸à¸à¸£à¸²à¸¢à¸à¸²à¸£à¸à¸µà¹à¸à¹à¸à¸«à¸²"})})})]})]})}),(0,a.jsx)(d.Z,{})]})})]})})};t.default=f},56108:function(e,t,l){"use strict";l.d(t,{mW:function(){return c},ob:function(){return o},vI:function(){return i}});var a=l(85893),n=l(9008),s=l.n(n);let i=async(e,t,l)=>{let n=e.main_content,i="à¸à¸£à¸¡à¸à¸±à¸à¸à¸²à¸à¸¥à¸±à¸à¸à¸²à¸à¸à¸à¹à¸à¸à¹à¸¥à¸°à¸à¸à¸¸à¸£à¸±à¸à¸©à¹à¸à¸¥à¸±à¸à¸à¸²à¸ (à¸à¸.) à¸à¸£à¸°à¸à¸£à¸§à¸à¸à¸¥à¸±à¸à¸à¸²à¸",o=e.title;if(o&&(i=o+" | "+i),"string"==typeof n||n instanceof String){n=(n=(n=n.replace(/<[^>]+>/g,"")).replace(/\ /g,"")).trim();let c=n.length;n=n.slice(0,150),c>=150&&(n+="...")}else n="à¸à¸£à¸¡à¸à¸±à¸à¸à¸²à¸à¸¥à¸±à¸à¸à¸²à¸à¸à¸à¹à¸à¸à¹à¸¥à¸°à¸à¸à¸¸à¸£à¸±à¸à¸©à¹à¸à¸¥à¸±à¸à¸à¸²à¸ (à¸à¸.) à¸à¸£à¸°à¸à¸£à¸§à¸à¸à¸¥à¸±à¸à¸à¸²à¸";return l||(l="index, follow"),(0,a.jsxs)(s(),{children:[(0,a.jsx)("title",{children:i}),(0,a.jsx)("meta",{name:"description",content:n}),(0,a.jsx)("meta",{name:"keywords",content:t}),(0,a.jsx)("meta",{name:"robots",content:l}),(0,a.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),(0,a.jsx)("link",{rel:"shortcut icon",href:"/uploads/dede_b439269179.ico"})]})},o=e=>{let t="à¸à¸£à¸¡à¸à¸±à¸à¸à¸²à¸à¸¥à¸±à¸à¸à¸²à¸à¸à¸à¹à¸à¸à¹à¸¥à¸°à¸à¸à¸¸à¸£à¸±à¸à¸©à¹à¸à¸¥à¸±à¸à¸à¸²à¸ (à¸à¸.) à¸à¸£à¸°à¸à¸£à¸§à¸à¸à¸¥à¸±à¸à¸à¸²à¸",l=e.title?e.title+" | "+t:t,n=e.description?e.description:"à¸à¸£à¸¡à¸à¸±à¸à¸à¸²à¸à¸¥à¸±à¸à¸à¸²à¸à¸à¸à¹à¸à¸à¹à¸¥à¸°à¸à¸à¸¸à¸£à¸±à¸à¸©à¹à¸à¸¥à¸±à¸à¸à¸²à¸ (à¸à¸.) à¸à¸£à¸°à¸à¸£à¸§à¸à¸à¸¥à¸±à¸à¸à¸²à¸";if("string"==typeof n||n instanceof String){n=(n=(n=n.replace(/<[^>]+>/g,"")).replace(/\ /g,"")).trim();let i=n.length;n=n.slice(0,150),i>=150&&(n+="...")}else n=null;n||(n=l?l+" "+t:t);let o=e.keywords?e.keywords:"",c=e.robotKeywords?e.robotKeywords:"index, follow";return(0,a.jsxs)(s(),{children:[(0,a.jsx)("title",{children:l}),(0,a.jsx)("meta",{name:"description",content:n}),(0,a.jsx)("meta",{name:"keywords",content:o}),(0,a.jsx)("meta",{name:"robots",content:c}),(0,a.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),(0,a.jsx)("link",{rel:"shortcut icon",href:"/uploads/dede_b439269179.ico"})]})},c=()=>(0,a.jsxs)(s(),{children:[(0,a.jsx)("title",{children:"à¸à¸£à¸¡à¸à¸±à¸à¸à¸²à¸à¸¥à¸±à¸à¸à¸²à¸à¸à¸à¹à¸à¸à¹à¸¥à¸°à¸à¸à¸¸à¸£à¸±à¸à¸©à¹à¸à¸¥à¸±à¸à¸à¸²à¸ (à¸à¸.) à¸à¸£à¸°à¸à¸£à¸§à¸à¸à¸¥à¸±à¸à¸à¸²à¸"}),(0,a.jsx)("meta",{name:"description",content:"à¸à¸£à¸¡à¸à¸±à¸à¸à¸²à¸à¸¥à¸±à¸à¸à¸²à¸à¸à¸à¹à¸à¸à¹à¸¥à¸°à¸à¸à¸¸à¸£à¸±à¸à¸©à¹à¸à¸¥à¸±à¸à¸à¸²à¸ (à¸à¸.) à¸à¸£à¸°à¸à¸£à¸§à¸à¸à¸¥à¸±à¸à¸à¸²à¸"}),(0,a.jsx)("meta",{name:"robots",content:"index, follow"}),(0,a.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),(0,a.jsx)("link",{rel:"shortcut icon",href:"/uploads/dede_b439269179.ico"})]})}},function(e){e.O(0,[4885,1876,1664,594,5675,3539,2785,3166,3683,9774,2888,179],function(){return e(e.s=27646)}),_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.