1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4531],{62789:function(e,a,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/search/search-engPage",function(){return t(44188)}])},44188:function(e,a,t){"use strict";t.r(a),t.d(a,{__N_SSP:function(){return p}});var n=t(85893),s=t(87066),c=t(9008),r=t.n(c),l=t(67294),i=t(72753),h=t(62687),o=t(1999),d=t.n(o),u=t(2475),x=t(18798),g=t(85604),m=t(96079),f=t(11037),j=t.n(f),_=t(77057),p=!0;a.default=function(e){let{Language:a,LangShort:t,MoreForYouAPI:c}=e,o="article_listing",f="search",[p,S]=(0,l.useState)(""),[y,N]=(0,l.useState)(!1),[v,b]=(0,l.useState)(null),[A,w]=(0,l.useState)("Health"),fetchSearchData=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Health";try{N(!0);let a=(null==e?void 0:e.trim())||"Health",t=await s.Z.get("".concat(i.XL.API_PATH,"api/omh/tags/").concat("en_US","/").concat(a,"/0/10"),i.XL.API_TOKEN);b(t.data||[]),w(a)}catch(e){console.log("Search API Error",e),b([])}finally{N(!1)}};(0,l.useEffect)(()=>{fetchSearchData("Health")},[]);let submitSearchForm=async e=>{e.preventDefault();let a=p.trim().replace(/[^a-zA-Z0-9\s]/g,"");if(!a){fetchSearchData("Health");return}await fetchSearchData(a)};return(0,n.jsxs)(h.Z,{Language:a,AdCat:f,PageType:o,children:[(0,n.jsxs)(r(),{children:[(0,n.jsx)("title",{children:"Search Articles - Onlymyhealth"}),(0,n.jsx)("meta",{name:"description",content:"Search health related articles on Onlymyhealth"})]}),(0,n.jsx)(u.default,{webComponent:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"gutterBanner lhs",children:(0,n.jsx)(g.default,{adUnit:"desktop/".concat((0,m.kq)(a),"_").concat(f,"/").concat(o,"/LHS_160x600"),size:[160,600],targetID:"LHS_160x600"})}),(0,n.jsx)("div",{className:"gutterBanner",children:(0,n.jsx)(g.default,{adUnit:"desktop/".concat((0,m.kq)(a),"_").concat(f,"/").concat(o,"/RHS_160x600"),size:[160,600],targetID:"RHS_160x600"})})]})}),(0,n.jsx)("div",{className:j().searchModel,children:(0,n.jsx)("div",{className:j().search,children:(0,n.jsxs)("form",{onSubmit:submitSearchForm,children:[(0,n.jsx)("input",{type:"text",value:p,placeholder:"Search your keyword",onChange:e=>S(e.target.value)}),(0,n.jsx)("button",{type:"submit",children:y?"Loading...":(0,n.jsx)("b",{children:(0,n.jsx)("svg",{children:(0,n.jsx)("use",{href:"/assets/sprite.svg#search"})})})})]})})}),(0,n.jsxs)("div",{className:"container",children:[A&&(0,n.jsxs)("h2",{style:{marginTop:"20px",marginBottom:"20px"},children:["Related Articles : ",A]}),(0,n.jsxs)("section",{className:d().section,children:[(0,n.jsxs)("div",{className:d().article,children:[v&&(0,n.jsx)(_.Z,{subCategory:v,Language:a,PageType:o,AdCat:f,LangShort:t,tagName:A}),!y&&v&&Array.isArray(v)&&0===v.length&&(0,n.jsx)("p",{children:"No articles found."})]}),(0,n.jsx)(u.default,{webComponent:(0,n.jsx)("div",{className:d().asidebar,children:c&&(0,n.jsx)(x.Z,{heading:"More For You",MoreForYouAPI:c,Language:a})})})]})]})]})}}},function(e){e.O(0,[5675,1595,3717,9755,5035,8446,2687,1265,9774,2888,179],function(){return e(e.s=62789)}),_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.