1import{a as V,c as X,d as W,e as G,f as K}from"./chunk-K5ED5C5Y.js";import{a as j}from"./chunk-5EEOQKNF.js";import{a as Z}from"./chunk-IAGSYSQ2.js";import"./chunk-3TWW43VM.js";import{Ea as $,u as A}from"./chunk-C6MMI4UH.js";import"./chunk-AHPCJ4WC.js";import"./chunk-MVIE6R26.js";import"./chunk-TLTR6JIE.js";import"./chunk-CWKS2JZF.js";import"./chunk-XTWGI42R.js";import{kb as B,lb as H}from"./chunk-2CB67CRE.js";import{J as N,K as U,W as z,Z as Q,aa as D}from"./chunk-AH2GBE4P.js";import{Aa as F,Ac as m,Jc as L,Lb as R,Oc as b,Qc as l,Yd as I,dd as d,e as y,ed as O,fd as T,ga as M,gd as x,qc as g,qd as w,rd as k,sc as u,ta as c,uc as C,vc as P,wb as o,wc as v,xc as S,yc as s,yd as p,za as E,zc as a,zd as h}from"./chunk-BKBETLCE.js";import"./chunk-3SYEH6ZZ.js";var te=e=>["/faq/questions/",e],ne=e=>({_single:e}),ie=()=>[1,2,3,4,5];function ae(e,i){e&1&&(s(0,"div",8),m(1,"div",9),a())}function oe(e,i){if(e&1&&P(0,ae,2,0,"div",8,C),e&2){let t=l(2);v(t.questions)}}function se(e,i){if(e&1&&(s(0,"div",10)(1,"div"),d(2),a(),s(3,"div",11),m(4,"img",12),a()()),e&2){let t=i.$implicit,n=l(3);S("dataTestId","faq-search-result-main-"+(t==null?null:t.slug)+"-link")("routerLink",k(4,te,t==null?null:t.slug))("queryParams",k(6,ne,n.singlePage)),o(2),O(t.name)}}function re(e,i){if(e&1&&P(0,se,5,8,"div",10,C),e&2){let t=l(2);v(t.questions)}}function ce(e,i){if(e&1){let t=L();s(0,"div",13),b("click",function(){E(t);let r=l(2);return F(r.loadMore())}),d(1),p(2,"translate"),a()}e&2&&(o(),T(" ",h(2,1,"LOAD_MORE")," "))}function de(e,i){if(e&1&&(s(0,"div",4)(1,"div",5),d(2),p(3,"translate"),a(),s(4,"div",6),d(5),p(6,"translate"),a(),g(7,oe,2,0)(8,re,2,0),g(9,ce,3,3,"div",7),a()),e&2){let t=l();o(2),x("",h(3,6,"SEARCH_RESULT_FOR"),' "',t.searchText,'"'),o(3),x("",t.elementSize," ",h(6,8,"NUM_RESULTS_FOUND")),o(2),u(t.isLoading?7:8),o(2),u(t.last?-1:9)}}function le(e,i){e&1&&(s(0,"div",8),m(1,"div",9),a())}function pe(e,i){if(e&1&&(s(0,"div",4)(1,"div",14),d(2),p(3,"translate"),a(),s(4,"div",15),d(5),p(6,"translate"),a(),P(7,le,2,0,"div",8,C),a()),e&2){let t=l(2);o(2),x("",h(3,4,"SEARCH_RESULT_FOR"),' "',t.searchText,'"'),o(3),x("",t.elementSize," ",h(6,6,"NUM_RESULTS_FOUND")),o(2),v(w(8,ie))}}function he(e,i){e&1&&(s(0,"div")(1,"div",16)(2,"h1"),d(3),p(4,"translate"),a(),s(5,"p"),d(6),p(7,"translate"),a()()()),e&2&&(o(3),O(h(4,2,"SEARCH_NOT_FOUND")),o(3),T(" ",h(7,4,"NOT_FOUND_WORDS")," "))}function _e(e,i){if(e&1&&g(0,pe,9,9,"div",4)(1,he,8,6,"div"),e&2){let t=l();u(t.isLoading?0:1)}}var Y="Hasil Pencarian Pertanyaan ",q=" - Halodoc",J="Hasil Pencarian Pertanyaan ",ge="layanan halodoc, tanya dokter, dokter online, apotik antar, apotik online, cek lab online",ue=10,Ie=(()=>{let i=class i{constructor(){this.metaService=c(N),this.titleService=c(U),this.metaUpdateService=c($),this.activatedRoute=c(z),this.breadcrumbService=c(j),this.faqService=c(V),this.dataService=c(A),this._cdrZoneless=c(I),this.$destroy=new y,this.searchText="",this.language="id",this.questions=[],this.elementSize=0,this.isLoading=!0,this.pageNo=1,this.shimmering=!0,this.singlePage=!1}ngOnInit(){this.canonLink=this.metaUpdateService.createCanonicalURL("/faq/search"),this.productCode=this.activatedRoute.snapshot.queryParams.productCode,this.singlePage=this.activatedRoute.snapshot.queryParams._single,this.language=this.dataService.currentUserLang,this.productCode=this.productCode?this.productCode:X.H4C,this.activatedRoute.params.pipe(M(this.$destroy)).subscribe(n=>{this.searchText=n.searchText||"",this.questions=[],this.fetchQuestion(),this.setMetaTag(),this._cdrZoneless.markForCheck()}),this.setSearchLabel()}ngOnDestroy(){this.$destroy.next(),this.$destroy.complete(),this.metaUpdateService.defaultMeta(),this.canonLink&&this.metaUpdateService.removeCanonLink(this.canonLink)}setSearchLabel(){this.language==="id"?this.breadcrumbService.updateBreadcrumbLabels({searchResultLabel:"Hasil Pencarian"}):this.breadcrumbService.updateBreadcrumbLabels({searchResultLabel:"Search Results"})}setMetaTag(){this.titleService.setTitle(Y+this.searchText+q),this.metaService.updateTag({content:Y+this.searchText+q},"property='og:title'"),this.metaService.updateTag({content:J+this.searchText+q},"property='og:description'"),this.metaService.updateTag({content:J+this.searchText+q},"name='description'"),this.metaService.updateTag({content:ge},"name='keywords'")}setQuestionParam(){this.searchQuestionParam=new G,this.searchQuestionParam.language=this.language,this.searchQuestionParam.searchTerms=this.searchText,this.searchQuestionParam.productC
1ode=this.productCode,this.searchQuestionParam.pageNo=this.nextPageNo?this.nextPageNo:this.pageNo,this.searchQuestionParam.per_page=ue}checkToResetPagination(){this.currentSearchText&&this.currentSearchText!==this.searchText&&(this.nextPageNo=0,this.searchQuestionParam.pageNo=this.pageNo)}fetchQuestion(){this.isLoading=!0,this.elementSize=0,this.searchText&&(this.setQuestionParam(),this.checkToResetPagination(),this.faqService.searchQuestion(this.searchQuestionParam).pipe(M(this.$destroy)).subscribe(n=>{let r=[];if(n&&n.result&&n.result.length>0){let _=n.result;for(let f of _)r.push({name:f.question,category:f.category,slug:f.slug});this.questions=this.questions.concat(r),this.elementSize=this.questions&&this.questions.length||0,this.isLast(n)}this.setSearchLabel(),this.isLoading=!1,this.currentSearchText=this.searchText,this._cdrZoneless.markForCheck()},()=>{this.setSearchLabel(),this.isLoading=!1,this._cdrZoneless.markForCheck()}))}isLast(n){typeof n.next_page<"u"&&n.next_page!=null?this.last=!n.next_page:this.last=!n.nextPage}loadMore(){let n=this.nextPageNo?this.nextPageNo:this.pageNo;this.last||(this.nextPageNo=n+1),this.fetchQuestion()}languageEventHander(n){this.questions=[],this.resetFilters(),this.language=n,this.dataService.currentUserLang=this.language,this.setSearchLabel(),this.fetchQuestion()}resetFilters(){this.pageNo=1,this.nextPageNo=0}};i.\u0275fac=function(r){return new(r||i)},i.\u0275cmp=R({type:i,selectors:[["magneto-faq-search-result-main"]],decls:6,vars:3,consts:[[1,"container"],[3,"languageEvent"],[1,"container__content"],[3,"language","searchText"],[1,"questions-container","flex","flex-col"],["data-testid","faq-search-result-headline",1,"questions-container__headline"],["data-testid","faq-search-result-note",1,"questions-container__note"],["dataTestId","faq-search-result-main-load-more-btn",1,"questions-container__load-more","self-center"],[1,"questions-container__question"],[1,"ghost__question"],[1,"questions-container__question","flex",3,"dataTestId","routerLink","queryParams"],[1,"ml-auto"],["src","assets/img/right-chevron.svg"],["dataTestId","faq-search-result-main-load-more-btn",1,"questions-container__load-more","self-center",3,"click"],["data-testid","faq-search-result-loading-headline",1,"questions-container__headline"],["data-testid","faq-search-result-loading-note",1,"questions-container__note"],[1,"container__content-message"]],template:function(r,_){r&1&&(s(0,"div",0)(1,"magneto-faq-header",1),b("languageEvent",function(ee){return _.languageEventHander(ee)}),a(),s(2,"div",2),m(3,"magneto-faq-search-bar",3),g(4,de,10,10,"div",4)(5,_e,2,1),a()()),r&2&&(o(3),S("language",_.language)("searchText",_.searchText),o(),u(_.questions&&_.questions.length>0?4:5))},dependencies:[H,W,K,D,Q,Z,B],styles:["@keyframes _ngcontent-%COMP%_ghost-lines{0%{background-position:-100px}40%{background-position:40vw}to{background-position:60vw}}@keyframes _ngcontent-%COMP%_ghost-avatar{0%{background-position:-32px}40%,to{background-position:208px}}.container[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-weight:400;width:1140px}.container__content[_ngcontent-%COMP%]{margin-bottom:50px;display:block;width:100%;padding:49px 49px 30px;border-radius:15px;box-shadow:0 2px 20px #15182429;background-color:#fff}.container__content-breadcrumb[_ngcontent-%COMP%]{margin-top:30px;height:52px;padding:15px;width:100%;color:#53565a;background-color:#f9f9f9}.container__content-message[_ngcontent-%COMP%]{padding:50px 0 77px;text-align:center;color:#53565a}.container__content-message[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:24px}.container__content-message[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:auto;font-size:14px;width:500px}.container[_ngcontent-%COMP%] .questions-container[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-weight:400;margin-top:30px;color:#53565a}.container[_ngcontent-%COMP%] .questions-container__headline[_ngcontent-%COMP%]{margin:0 0 5px 6px;font-size:24px;font-weight:700}.container[_ngcontent-%COMP%] .questions-container__note[_ngcontent-%COMP%]{font-size:14px;margin:0 0 10px 6px}.container[_ngcontent-%COMP%] .questions-container__question[_ngcontent-%COMP%]{font-size:16px;border-bottom:1px solid #e4e4e4;padding-top:15px;padding-bottom:14px;cursor:pointer}.container[_ngcontent-%COMP%] .questions-container__question[_ngcontent-%COMP%]:last-child{border-bottom:none}.container[_ngcontent-%COMP%] .questions-container__load-more[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;margin-top:35px;width:147px;height:48px;border-radius:24px;color:#e0004d;border:solid 1px #e0004d;cursor:pointer}.ghost__question[_ngcontent-%COMP%]{width:600px;height:30px;margin-block-end:0px;background:#e4e4e5;display:block!important;border-radius:4px;text-indent:-9999px;white-space:nowrap;overflow:hidden;background-image:linear-gradient(90deg,#dddddda4,#ecebebf1,#dddddda4 80px);background-size:80vw;animation:_ngcontent-%COMP%_ghost-lines 1s infinite linear}.ghost__question[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{display:none!important}@media(max-width:399px){.container[_ngcontent-%COMP%]{width:100%}.container__content[_ngcontent-%COMP%]{box-shadow:none;padding:0;border-radius:0}.container__content-breadcrumb[_ngcontent-%COMP%]{display:none}.container__content-message[_ngcontent-%COMP%]{padding:30px 0 0;text-align:center;color:#53565a}.container__content-message[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:20px}.container__content-message[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:auto;font-size:14px;width:296px;text-align:center}.container[_ngcontent-%COMP%] .questions-container[_ngcontent-%COMP%]{margin-top:20px}.container[_ngcontent-%COMP%] .questions-container__headline[_ngcontent-%COMP%]{font-size:20px}.container[_ngcontent-%COMP%] .questions-container__note[_ngcontent-%COMP%]{font-size:12px;margin:0 0 2px 6px}.container[_ngcontent-%COMP%] .questions-container__question[_ngcontent-%COMP%]{font-size:14px;height:51px}.container[_ngcontent-%COMP%] .questions-container__question[_ngcontent-%COMP%]:last-child{border-bottom:1px solid #e4e4e4}.container[_ngcontent-%COMP%] .questions-container__load-more[_ngcontent-%COMP%]{font-size:14px}.ghost__question[_ngcontent-%COMP%]{width:100%;height:27px;margin-block-end:0px;background:#e4e4e5;display:block!important;border-radius:4px;text-indent:-9999px;white-space:nowrap;overflow:hidden;background-image:linear-gradient(90deg,#dddddda4,#ecebebf1,#dddddda4 80px);background-size:80vw;animation:_ngcontent-%COMP%_ghost-lines 1s infinite linear}.ghost__question[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{display:none!important}}"]});let e=i;return e})();export{Ie as FaqSearchResultMainComponent};
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.