1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[46645],{46645:(e,s,l)=>{"use strict";l.r(s),l.d(s,{default:()=>d});var r=l(37876),t=l(84586),a=l(97469),c=l.n(a),n=l(30045),o=l(26272),h=l(14232),i=l(35561),u=l(42310);let d=e=>{var s,l,a,d,_,m;let{isTopNavigation:j=!0,instanceId:x="default",changeStyle:g="",inLineStyle:p={},suggestions:S=[],setSuggestions:v,onClose:N,setSearchValue:w,searchValue:y,placeholder:f=null===n.cg||void 0===n.cg?void 0:n.cg.SEARCH_ARTICLE}=e,[I,b]=(0,h.useState)(""),C=(0,h.useRef)(null),k="searchInput_".concat(x),A="searchBtn_".concat(x),E="closeBtn_".concat(x),B="resultsContainer_".concat(x),F=(0,h.useCallback)(async e=>{if(null==e?void 0:e.trim()){let s=await (0,o.tH)(e);v(null==s?void 0:s.response)}else v([])},[]);(0,h.useEffect)(()=>{let e=setTimeout(()=>{(null==y?void 0:y.trim().length)>=3?F(y):v([])},300);return()=>{clearTimeout(e),b("")}},[y,F]),(0,h.useEffect)(()=>{let e=e=>{C.current&&!C.current.contains(e.target)&&(v([]),N&&N())};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[v,N]);let L=()=>{""==y?b("Please enter a search term"):window.location.href="/search-result/".concat(y)};return(0,r.jsxs)("div",{ref:C,className:g&&c()[g],"data-instance":x,style:{...p},children:[(0,r.jsxs)("div",{className:c().searchBox,children:[(0,r.jsx)("input",{id:k,type:"text",placeholder:f,autoComplete:"off",value:y,"aria-label":"Search",onChange:e=>{let s=e.target.value;b(""),w(s)},onKeyDown:e=>{"Enter"===e.key&&L()},className:j?c().topNavInput:c().hamburgerInput}),(0,r.jsx)("button",{onClick:L,id:A,type:"button",children:(0,r.jsx)(t.h,{IconName:"searchNewIconDesktop",width:14,height:14})}),""!==y&&(0,r.jsx)("button",{onClick:()=>w(""),id:E,type:"button",style:{display:"none"},children:(0,r.jsx)(t.h,{IconName:"CloseIconBig",width:14,height:14})})]}),I&&(0,r.jsx)("div",{className:c().error,children:I}),(0,r.jsxs)("div",{id:B,className:"".concat(c().resultsContainer," ").concat(j?c().topNavResults:c().hamburgerResults),"data-open":(null==S||null==(s=S.all)?void 0:s.length)?"true":"false","data-instance":x,"aria-hidden":"true",children:[0==S.totalrecord&&(0,r.jsx)("div",{className:c()["results-section"],children:(0,r.jsx)("h3",{children:"No result Found"})}),(null==S||null==(l=S.stocks)?void 0:l.length)>0&&(0,r.jsxs)("div",{className:c()["results-section"],children:[(0,r.jsx)("strong",{children:"Stocks/IPOs"}),(0,r.jsx)("ul",{children:S.stocks.map((e,s)=>(0,r.jsxs)("li",{className:c()["result-item"],children:[(0,r.jsx)(i.A,{link:"".concat((0,u.FB)(),"/").concat(e.seopath),children:e.compname}),(0,r.jsx)(t.h,{IconName:"rightArrowIconGrey",width:6,height:15})]},s))})]}),(null==S||null==(a=S.mutualfunds)?void 0:a.length)>0&&(0,r.jsxs)("div",{className:c()["results-section"],children:[(0,r.jsx)("strong",{children:"Mutual Funds"}),(0,r.jsx)("ul",{children:S.mutualfunds.map((e,s)=>(0,r.jsxs)("li",{className:c()["result-item"],children:[(0,r.jsx)(i.A,{link:"".concat((0,u.FB)(),"/").concat(e.seopath),children:null==e?void 0:e.S_NAME}),(0,r.jsx)(t.h,{IconName:"rightArrowIconGrey",width:6,height:15})]},s))})]}),(null==S||null==(d=S.crypto)?void 0:d.length)>0&&(0,r.jsxs)("div",{className:c()["results-section"],children:[(0,r.jsx)("strong",{children:"Crypto"}),(0,r.jsx)("ul",{children:S.crypto.map((e,s)=>(0,r.jsxs)("li",{className:c()["result-item"],children:[(0,r.jsx)(i.A,{link:"".concat((0,u.FB)(),"/").concat(null==e?void 0:e.seopath),children:null==e?void 0:e.name}),(0,r.jsx)(t.h,{IconName:"rightArrowIconGrey",width:6,height:15})]},s))})]}),(null==S||null==(_=S.all)?void 0:_.length)>0&&(0,r.jsxs)("div",{className:c()["results-section"],children:[(0,r.jsx)("strong",{children:"Articles"}),(0,r.jsx)("ul",{children:S.all.map((e,s)=>(0,r.jsxs)("li",{className:c()["result-item"],children:[(0,r.jsx)(i.A,{link:"".concat((0,u.ID)(e)),children:null==e?void 0:e.title}),(0,r.jsx)(t.h,{IconName:"rightArrowIconGrey",width:6,height:15})]},s))})]}),(null==S||null==(m=S.all)?void 0:m.length)>0&&(0,r.jsx)(i.A,{className:c()["show-all"],link:"".concat((0,u.FB)(),"/search-result/").concat(y),children:"Show All"})]})]})}},97469:e=>{e.exports={searchBox:"Search_searchBox__ypXoi",error:"Search_error__YnfTF","mobile-search":"Search_mobile-search__lVZh_",mobileSearch:"Search_mobile-search__lVZh_","hamburger-search":"Search_hamburger-search__fsjyr",hamburgerSearch:"Search_hamburger-search__fsjyr","results-container":"Search_results-container__FdE67",resultsContainer:"Search_results-container__FdE67","show-all":"Search_show-all__gLsVJ",showAll:"Search_show-all__gLsVJ","results-section":"Search_results-section__1IPyf",resultsSection:"Search_results-section__1IPyf","result-item":"Search_result-item__Ad_8j",resultItem:"Search_result-item__Ad_8j","mega-search":"Search_mega-search__Lu5__",megaSearch:"Search_mega-search__Lu5__",SearchTop:"Search_SearchTop__Lj_d_",searchTop:"Search_SearchTop__Lj_d_",SearchCrypto:"Search_SearchCrypto__X88PW",searchCrypto:"Search_SearchCrypto__X88PW"}}}]);
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.