PageSourceSearch

https://abm.recotap.com/5070.855ee9f19c631442.js

js recotap.com collected 2026-09-24 15:22:51 UTC 60,865 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkclient_panel=self.webpackChunkclient_panel||[]).push([[5070],{95070:(ue,T,c)=>{c.r(T),c.d(T,{AbmActivityModule:()=>pe});var g=c(60177),x=c(12791),$=c(71985),F=c(84412),D=c(5964),O=c(96697),E=c(62087),G=c(97586),R=c.n(G),L=c(6204),t=c(54438),C=c(77207),b=c(4528),f=c(89417),y=c(59624),M=c(71289),Y=c(18683),X=c(44289),_=c(77391),S=c(14160);const J=["chart"];function B(a,o){if(1&a&&(t.j41(0,"div"),t.nrm(1,"apx-chart",8,9),t.k0s()),2&a){const e=t.XpG(2);t.R7$(),t.Y8G("series",e.chartOptions.series)("chart",e.chartOptions.chart)("xaxis",e.chartOptions.xaxis)("yaxis",e.chartOptions.yaxis)("colors",e.chartOptions.colors)("tooltip",e.chartOptions.tooltip)("legend",e.chartOptions.legend)("markers",e.chartOptions.markers)("grid",e.chartOptions.grid)("dataLabels",e.chartOptions.dataLabels)("plotOptions",e.chartOptions.plotOptions)}}function z(a,o){if(1&a&&(t.j41(0,"div",6),t.DNE(1,B,3,11,"div",7),t.nI1(2,"async"),t.k0s()),2&a){const e=t.XpG();t.R7$(),t.Y8G("ngIf",!t.bMT(2,1,e.isLoading$))}}function N(a,o){1&a&&(t.j41(0,"div",6)(1,"div",10)(2,"h5",11),t.EFF(3,"Loading..."),t.k0s()()())}function U(a,o){1&a&&(t.j41(0,"div",6)(1,"div",12),t.nrm(2,"img",13),t.j41(3,"p",14),t.EFF(4,"Top Performing Campaigns would appear once you have launched campaigns"),t.k0s()()())}let V=(()=>{class a{dashboardService;dateRangePickerService;cdr;contentfulService;chart;isLoading$;chartOptions;firstTimeLoad=!0;showIllustration=!1;dateRangeSelected$;subscriptions=[];blurbText="";constructor(e,i,n,s){this.dashboardService=e,this.dateRangePickerService=i,this.cdr=n,this.contentfulService=s,this.isLoading$=this.dashboardService.isLoading$,this.dateRangeSelected$=this.dateRangePickerService.dateRangeSelected$,this.initializeChartOptions(),this.loadCampaignData()}initializeChartOptions(){this.chartOptions={series:[{name:"Impressions",data:[]},{name:"Clicks",data:[]}],chart:{type:"bar",height:472,stacked:!1,toolbar:{show:!1}},plotOptions:{},xaxis:{categories:[],axisTicks:{show:!1},axisBorder:{show:!1,color:"#2F6EED"},position:"bottom",labels:{show:!0,rotate:0,trim:!0,rotateAlways:!1,hideOverlappingLabels:!1,showDuplicates:!1,style:{colors:"#8C8C8C",fontSize:"11px",fontFamily:"Inter",fontWeight:400}}},tooltip:{shared:!0,intersect:!1,enabled:!0,y:{formatter:function(e){return e.toString()},title:{formatter:e=>e}},x:{show:!1},style:{fontSize:"12px",fontFamily:void 0},theme:"dark",fillSeriesColor:!1},markers:{size:0},grid:{borderColor:"#e0e0e0",strokeDashArray:4,padding:{left:10,right:10,top:10,bottom:10}},yaxis:[{min:0,max:50,tickAmount:5,title:{text:"Impressions"}},{opposite:!0,min:0,max:50,tickAmount:5,title:{text:"Clicks"}}],colors:["#9451C2","#C8A4DF"],dataLabels:{enabled:!1},legend:{horizontalAlign:"center",position:"top",offsetX:40,markers:{width:8,height:8,radius:8},itemMargin:{horizontal:10,vertical:5}}}}ngAfterViewInit(){this.cdr.detectChanges(),setTimeout(()=>{const e=this.dateRangeSelected$.subscribe(i=>{i?.dateRange&&(this.firstTimeLoad=!0,this.loadCampaignData())});this.subscriptions.push(e)},0)}ngOnInit(){this.fetchTooltipContent()}fetchTooltipContent(){this.contentfulService.getBlurbText().then(e=>{const i=e.items.find(n=>"RECOTAP-TPC"===n.fields.blurb_id);this.blurbText=i?.fields?.content||"",this.cdr.detectChanges()})}loadCampaignData(){this.dashboardService.getOverallCampaignPerformance().subscribe({next:e=>{if(this.firstTimeLoad=!1,e&&e.data){const i=e.data.data;if(this.showIllustration=0===i.length,!this.showIllustration){const n=i.map(d=>d.impressions),s=i.map(d=>d.clicks),r=Math.max(...n),l=Math.max(...s),h=i.map(d=>{const v=d.campaignName?.split(" ");return v.length>1?[v.slice(0,-1).join(" "),v[v.length-1]]:[d.campaignName]}),u=10*Math.ceil(r/10),p=10*Math.ceil(l/10);let m;m=i.length<=1?"15%":i.length<=2?"30%":i.length<=3?"50%":i.length<=5?"60%":i.length<=10?"70%":"80%",this.chartOptions={...this.chartOptions,series:[{name:"Impressions",data:n},{name:"Clicks",data:s}],xaxis:{...this.chartOptions.xaxis,categories:h},yaxis:[{show:!0,opposite:!1,min:0,max:u,tickAmount:5,labels:{formatter:function(d){return d.toString()}}},{opposite:!0,show:!0,min:0,max:p,tickAmount:5,labels:{formatter:function(d){return d.toString()}}}],plotOptions:{...this.chartOptions.plotOptions,bar:{borderRadius:8,borderRadiusApplication:"end",horizontal:!1,...this.chartOptions.plotOptions.bar,columnWidth:m}}},this.chart&&this.chart.updateOptions(this.chartOptions)}this.cdr.detectChanges()}},error:e=>{console.error("Error loading campaign data:",e),this.firstTimeLoad=!1,this.showIllustration=!0,this.cdr.detectChanges()}})}static \u0275fac=function(i){return new(i||a)(t.rXU(b.I),t.rXU(C.R),t.rXU(t.gRc),t.rXU(y.w))};static \u0275cmp=t.VBU({type:a,selectors:[["app-top-performing-campigns"]],viewQuery:function(i,n){if(1&i&&t.GBs(J,5),2&i){let s;t.mGM(s=t.lsd())&&(n.chart=s.first)}},decls:9,vars:6,consts:[[1,"card","shadow-none","rounded-6","p-3","p-md-5","p-xl-6","mb-5","mb-xl-8","h-585px"],[1,"d-flex","align-items-center"],[1,"card-title","m-0","fw-bold","fs-2"],["placement","right",1,"text-gray-900","fw-semibold",3,"contentfulDoc","interactive","maxWidth"],["src","./assets/media/recotap-assets/icons/blurb_text.svg","alt","info-icon",1,"ms-3"],["class","card-body p-0 pt-6",4,"ngIf"],[1,"card-body","p-0","pt-6"],[4,"ngIf"],[3,"series","chart","xaxis","yaxis","colors","tooltip","legend","markers","grid","dataLabels","plotOptions"],["chart",""],[1,"d-flex","flex-column","align-items-center","justify-content-center","py-20","h-45vh"],[1,"text-gray-700"],[1,"d-flex","flex-column","align-items-center","justify-content-center","py-20","h-50vh"],["src","./assets/media/recotap-assets/illustrations/empty-state-160.svg","alt","empty state"],[1,"text-muted","fs-6","mt-8","text-center"]],template:function(i,n){1&i&&(t.j41(0,"div",0)(1,"div",1)(2,"h3",2),t.EFF(3," Top Performing Campaigns "),t.k0s(),t.j41(4,"app-recotap-custom-tooltip",3),t.nrm(5,"img",4),t.k0s()(),t.DNE(6,z,3,3,"div",5)(7,N,4,0,"div",5)(8,U,5,0,"div",5),t.k0s()),2&i&&(t.R7$(4),t.Y8G("contentfulDoc",n.blurbText)("interactive",!0)("maxWidth",350),t.R7$(2),t.Y8G("ngIf",!n.firstTimeLoad&&!n.showIllustration),t.R7$(),t.Y8G("ngIf",n.firstTimeLoad),t.R7$(),t.Y8G("ngIf",n.showIllustration))},dependencies:[g.bT,_._,S.Q,g.Jj],styles:[".h-45vh[_ngcontent-%COMP%]{\n  height: 45vh !important;\n}\n.h-70vh[_ngcontent-%COMP%]{\n  height: 70vh !important;\n}\n.h-65vh[_ngcontent-%COMP%]{\n  height: 65vh !important;\n}"]})}return a})();var A=c(10467),W=c(96354),Q=c(34560),H=c(28491),K=c(10426);const Z=["allAdPreviewComponent"],q=["allAdPreviewModal"];function tt(a,o){if(1&a){const e=t.RV6();t.qex(0),t.j41(1,"img",37),t.bIt("click",function(){t.eBV(e);const n=t.XpG().$implicit,s=t.XpG(3);return t.Njj(s.openAdPreviewModal(n))}),t.k0s(),t.bVm()}if(2&a){const e=t.XpG().$implicit;t.R7$(),t.FS9("alt",e.name)}}function et(a,o){if(1&a){const e=t.RV6();t.qex(0),t.j41(1,"img",40),t.bIt("error",function(n){t.eBV(e);
1const s=t.XpG(3).$implicit,r=t.XpG(3);return t.Njj(r.onImageError(n,s))})("click",function(){t.eBV(e);const n=t.XpG(3).$implicit,s=t.XpG(3);return t.Njj(s.openAdPreviewModal(n))}),t.k0s(),t.bVm()}if(2&a){const e=t.XpG(3).$implicit;t.R7$(),t.FS9("alt",e.name),t.Y8G("src",e.logo,t.B4B)}}function it(a,o){if(1&a&&(t.j41(0,"div",41)(1,"span",42),t.EFF(2),t.k0s()()),2&a){const e=t.XpG(3).$implicit,i=t.XpG(3);t.xc7("background-color",i.stringToHslColor(e.name)),t.R7$(2),t.SpI(" ",e.name.charAt(0)," ")}}function nt(a,o){if(1&a&&(t.qex(0),t.DNE(1,et,2,2,"ng-container",24)(2,it,3,3,"ng-template",null,39,t.C5r),t.bVm()),2&a){const e=t.sdS(3),i=t.XpG(2).$implicit;t.R7$(),t.Y8G("ngIf",(null==i?null:i.logo)&&!i.logoError)("ngIfElse",e)}}function at(a,o){if(1&a){const e=t.RV6();t.j41(0,"div",43),t.bIt("click",function(){t.eBV(e);const n=t.XpG(2).$implicit,s=t.XpG(3);return t.Njj(s.openAdPreviewModal(n))}),t.nrm(1,"img",44),t.k0s()}}function st(a,o){if(1&a&&t.DNE(0,nt,4,2,"ng-container",24)(1,at,2,0,"ng-template",null,38,t.C5r),2&a){const e=t.sdS(2),i=t.XpG().$implicit;t.Y8G("ngIf","display"===i.adFormat||"carousel"===i.adFormat)("ngIfElse",e)}}function ot(a,o){1&a&&t.nrm(0,"img",45)}function rt(a,o){1&a&&t.nrm(0,"img",46)}function ct(a,o){1&a&&t.nrm(0,"img",47)}function lt(a,o){1&a&&t.nrm(0,"img",48)}function dt(a,o){if(1&a&&(t.j41(0,"tr")(1,"td",21)(2,"div",22)(3,"div",23),t.DNE(4,tt,2,1,"ng-container",24)(5,st,3,2,"ng-template",null,25,t.C5r),t.k0s(),t.j41(7,"div",26)(8,"div",27)(9,"a",28),t.EFF(10),t.k0s()(),t.j41(11,"div",29),t.DNE(12,ot,1,0,"img",30)(13,rt,1,0,"img",31)(14,ct,1,0,"img",32)(15,lt,1,0,"img",33),t.j41(16,"span",34),t.EFF(17),t.k0s()()()()(),t.j41(18,"td",35),t.EFF(19),t.k0s(),t.j41(20,"td",36),t.EFF(21),t.k0s()()),2&a){const e=o.$implicit,i=t.sdS(6);t.R7$(4),t.Y8G("ngIf","document"===e.adFormat)("ngIfElse",i),t.R7$(5),t.FS9("title",e.name),t.R7$(),t.SpI(" ",e.name," "),t.R7$(2),t.Y8G("ngIf","display"===(null==e?null:e.adFormat)),t.R7$(),t.Y8G("ngIf","video"===(null==e?null:e.adFormat)),t.R7$(),t.Y8G("ngIf","carousel"===(null==e?null:e.adFormat)),t.R7$(),t.Y8G("ngIf","document"===(null==e?null:e.adFormat)),t.R7$(2),t.JRh(e.adFormat),t.R7$(2),t.SpI(" ",e.impressions," "),t.R7$(2),t.SpI(" ",e.clicks," ")}}function pt(a,o){if(1&a&&(t.j41(0,"tbody"),t.DNE(1,dt,22,11,"tr",20),t.k0s()),2&a){const e=o.ngIf;t.R7$(),t.Y8G("ngForOf",e)}}function gt(a,o){if(1&a&&(t.j41(0,"div",11)(1,"div",12)(2,"table",13)(3,"thead",14)(4,"tr",15)(5,"th",16),t.EFF(6,"Name"),t.k0s(),t.j41(7,"th",17),t.EFF(8,"Impressions"),t.k0s(),t.j41(9,"th",18),t.EFF(10,"Clicks"),t.k0s()()(),t.DNE(11,pt,2,1,"tbody",19),t.nI1(12,"async"),t.nI1(13,"async"),t.k0s()()()),2&a){const e=t.XpG();t.R7$(11),t.Y8G("ngIf",!t.bMT(12,1,e.isLoading$)&&t.bMT(13,3,e.overallAdsPerformance$))}}function ut(a,o){1&a&&(t.j41(0,"div",49)(1,"div",50)(2,"h5",51),t.EFF(3,"Loading..."),t.k0s()()())}function mt(a,o){1&a&&(t.j41(0,"div",49)(1,"div",52),t.nrm(2,"img",53),t.j41(3,"p",54),t.EFF(4,"Top Performing Ads would appear once you have launched campaigns."),t.k0s()()())}let ht=(()=>{class a{dashboardService;listService;dateRangePickerService;cdr;contentfulService;isLoading$;overallAdsPerformance$;subscriptions=[];firstTimeLoad=!0;showIllustration=!1;dateRangeSelected$;adsTemplateData$;adId;adFormat="";blurbText="";adPreviewModalConfig={modalTitle:"Ad Preview",modalTitleClasses:"fs-3",centered:!0,size:"md"};allAdPreviewComponent;allAdPreviewModal;constructor(e,i,n,s,r){this.dashboardService=e,this.listService=i,this.dateRangePickerService=n,this.cdr=s,this.contentfulService=r,this.isLoading$=this.dashboardService.isLoading$,this.dateRangeSelected$=this.dateRangePickerService.dateRangeSelected$,this.adsTemplateData$=this.listService.adsTemplateData$}ngOnInit(){this.overallAdsPerformance$=this.dashboardService.overallAdsPerformance$.pipe((0,W.T)(e=>(console.log("Raw response:",e),e||[]))),this.fetchOverallAdsPerformance(),this.fetchTooltipContent()}ngAfterViewInit(){this.cdr.detectChanges(),setTimeout(()=>{const e=this.dateRangeSelected$.subscribe(i=>{i?.dateRange&&(this.firstTimeLoad=!0,this.fetchOverallAdsPerformance())});this.subscriptions.push(e)},0)}fetchTooltipContent(){this.contentfulService.getBlurbText().then(e=>{const i=e.items.find(n=>"RECOTAP-TPA"===n.fields.blurb_id);this.blurbText=i?.fields?.content||"",this.cdr.detectChanges()})}stringToHslColor(e){if(!e)return"hsl(0, 70%, 50%)";let i=0;for(let s=0;s<e.length;s++)i=e.charCodeAt(s)+((i<<5)-i);return`hsl(${i%360}, 70%, 50%)`}
1getBackgroundColor(){return"#45b8ac"}getInitials(e){return e.split(" ").map(n=>n[0]).join("").slice(0,2).toUpperCase()}onImageError(e,i){i.logo&&(i.logoError=!0,this.cdr.detectChanges())}fetchOverallAdsPerformance(){var e=this;return(0,A.A)(function*(){const i=e.dashboardService.getOverallAdsPerformance().subscribe({next:n=>{e.firstTimeLoad=!1,console.log("API Response:",n),n?.data?.data&&(e.showIllustration=0===n.data.data.length,n.data.data.forEach(s=>{s.primaryAdAsset&&s.primaryAdAsset.url&&(s.logo=s.primaryAdAsset.url)}),e.cdr.detectChanges())},error:n=>{console.error("Error fetching ads performance:",n),e.firstTimeLoad=!1,e.showIllustration=!0,e.cdr.detectChanges()}});return e.subscriptions.push(i),Promise.resolve()})()}openAdPreviewModal(e){var i=this;return(0,A.A)(function*(){i.allAdPreviewComponent.reset(),i.adId=e._id?.adId??e.adId??e._id,i.adFormat=e.adFormat||"",i.allAdPreviewComponent.adId=i.adId,i.allAdPreviewComponent.adFormat=i.adFormat,i.allAdPreviewModal.open()})()}dismissAdPreviewModal(){this.allAdPreviewModal.dismiss()}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe())}static \u0275fac=function(i){return new(i||a)(t.rXU(b.I),t.rXU(Q.a),t.rXU(C.R),t.rXU(t.gRc),t.rXU(y.w))};static \u0275cmp=t.VBU({type:a,selectors:[["app-top-performing-ads"]],viewQuery:function(i,n){if(1&i&&(t.GBs(Z,5),t.GBs(q,5)),2&i){let s;t.mGM(s=t.lsd())&&(n.allAdPreviewComponent=s.first),t.mGM(s=t.lsd())&&(n.allAdPreviewModal=s.first)}},decls:13,vars:9,consts:[[1,"card","shadow-none","rounded-6","p-3","p-md-5","p-xl-6","mb-5","mb-xl-8"],[1,"d-flex","align-items-center"],[1,"card-title","m-0","fw-bold","fs-2"],["placement","right",1,"text-gray-900","fw-semibold",3,"contentfulDoc","interactive","maxWidth"],["src","./assets/media/recotap-assets/icons/blurb_text.svg","alt","info-icon",1,"ms-3"],["class","card-body pt-6 p-0 h-510px scroll-y",4,"ngIf"],["class","card-body p-0 pt-6",4,"ngIf"],[3,"modalConfig"],["allAdPreviewModal",""],[3,"adId","adFormat"],["allAdPreviewComponent",""],[1,"card-body","pt-6","p-0","h-510px","scroll-y"],[1,"table-responsive"],[1,"table","table-row-dashed","fs-6","gy-3","dataTable","no-footer"],[1,"rounded-4","overflow-hidden"],[1,"text-start","text-gray-900","fw-bold","fs-6","text-capitalize","bg-gray-50","no-dashed","border-0","p-4"],[1,"min-w-215px","mw-215px","py-3","text-gray-400","ps-4","pe-2"],[1,"min-w-85px","mw-85px","py-3","text-gray-400","text-center","ps-0","pe-2"],[1,"text-nowrap","min-w-85px","mw-85px","py-3","text-center","text-gray-400","px-0"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"py-3","ps-0","pe-2"],[1,"d-flex","align-items-center","mw-225px","min-w-225px","p-0"],[1,"symbol","symbol-40px","me-3","cursor-pointer"],[4,"ngIf","ngIfElse"],["nonDocumentBlock",""],[1,"d-flex","flex-column"],[1,"d-flex","gap-2","align-items-baseline","mb-1"],[1,"fw-bold","text-hover-primary","text-truncate","mw-200px","min-w-150px","text-capitalize","text-gray-700",3,"title"],[1,"fs-lg","d-flex","align-items-center"],["src","./assets/media/recotap-assets/icons/television-duotone.svg","alt","display","class","w-16px h-16px",4,"ngIf"],["src","./assets/media/recotap-assets/icons/video-duotone.svg","alt","video","class","w-16px h-16px",4,"ngIf"],["src","./assets/media/recotap-assets/icons/carousel-ad.svg","alt","carousel","class","w-16px h-16px",4,"ngIf"],["src","./assets/media/recotap-assets/icons/ad-document.svg","alt","document","class","w-16px h-16px",4,"ngIf"],[1,"text-muted","text-capitalize","ms-1"],[1,"py-3","ps-0","pe-2","align-content-center","mw-85px","min-w-85px","text-center","fs-6","fw-bold","text-gray-700"],[1,"py-3","px-0","align-content-center","mw-85px","min-w-85px","text-center","fs-6","fw-bold","text-gray-700"],["src","./assets/media/recotap-assets/icons/ad-document.svg",1,"object-fit-contain","object-position-center",2,"height","40px","width","40px",3,"alt","click"],["videoBlock",""],["dummyDiv",""],[1,"object-fit-contain","object-position-center",2,"height","40px","width","40px",3,"src","alt","error","click"],[1,"dummy-container"],[1,"dummy-text"],[2,"position","relative","height","40px","width","40px","cursor","pointer",3,"click"],["src","./assets/media/recotap-assets/icons/video-duotone.svg","alt","Play",2,"width","40px","height","40px"],["src","./assets/media/recotap-assets/icons/television-duotone.svg","alt","display",1,"w-16px","h-16px"],["src","./assets/media/recotap-assets/icons/video-duotone.svg","alt","video",1,"w-16px","h-16px"],["src","./assets/media/recotap-assets/icons/carou
1sel-ad.svg","alt","carousel",1,"w-16px","h-16px"],["src","./assets/media/recotap-assets/icons/ad-document.svg","alt","document",1,"w-16px","h-16px"],[1,"card-body","p-0","pt-6"],[1,"d-flex","flex-column","align-items-center","justify-content-center","py-20","h-45vh"],[1,"text-gray-700"],[1,"d-flex","flex-column","align-items-center","justify-content-center","py-20","h-50vh"],["src","./assets/media/recotap-assets/illustrations/empty-state-160.svg","alt","empty state"],[1,"text-muted","fs-6","mt-8","text-center"]],template:function(i,n){1&i&&(t.j41(0,"div",0)(1,"div",1)(2,"h3",2),t.EFF(3," Top Performing ads "),t.k0s(),t.j41(4,"app-recotap-custom-tooltip",3),t.nrm(5,"img",4),t.k0s()(),t.DNE(6,gt,14,5,"div",5)(7,ut,4,0,"div",6)(8,mt,5,0,"div",6),t.k0s(),t.j41(9,"app-modal",7,8),t.nrm(11,"app-all-ad-preview",9,10),t.k0s()),2&i&&(t.R7$(4),t.Y8G("contentfulDoc",n.blurbText)("interactive",!0)("maxWidth",350),t.R7$(2),t.Y8G("ngIf",!n.firstTimeLoad&&!n.showIllustration),t.R7$(),t.Y8G("ngIf",n.firstTimeLoad),t.R7$(),t.Y8G("ngIf",n.showIllustration),t.R7$(),t.Y8G("modalConfig",n.adPreviewModalConfig),t.R7$(2),t.Y8G("adId",n.adId)("adFormat",n.adFormat))},dependencies:[g.Sq,g.bT,H.g,_._,K.z,g.Jj],styles:[".dummy-container[_ngcontent-%COMP%] {\n    height: 40px;\n    width: 40px;\n    display: flex;\n    justify-content: center;
1\n    align-items: center;\n    color: white;\n    border-radius: 10px;\n    }\n  \n    .dummy-text[_ngcontent-%COMP%] {\n    font-size: 20px;\n    font-weight: bold;\n    }\n    .h-70vh[_ngcontent-%COMP%]{\n        height: 70vh !important;\n    }\n    .h-45vh[_ngcontent-%COMP%]{\n        height: 45vh !important;\n    }\n    .h-65vh[_ngcontent-%COMP%]{\n        height: 65vh !important;\n    }"]})}return a})();var w=c(65170),j=c(65136),ft=c(45020),I=c(72510);function vt(a,o){if(1&a&&(t.j41(0,"ng-option",13)(1,"span",14),t.EFF(2),t.k0s()()),2&a){const e=o.$implicit;t.Y8G("value",e._id),t.R7$(),t.FS9("title",e.name),t.R7$(),t.JRh(e.name)}}function bt(a,o){1&a&&(t.j41(0,"ng-option",15)(1,"span"),t.EFF(2,"No items found"),t.k0s()())}function yt(a,o){if(1&a&&(t.j41(0,"ng-option",13)(1,"span",14),t.EFF(2),t.k0s()()),2&a){const e=o.$implicit;t.Y8G("value",e._id),t.R7$(),t.FS9("title",e.name),t.R7$(),t.JRh(e.name)}}function _t(a,o){1&a&&(t.j41(0,"ng-option",15)(1,"span"),t.EFF(2,"No items found"),t.k0s()())}function xt(a,o){if(1&a&&(t.j41(0,"div",3)(1,"div",4)(2,"label",5),t.EFF(3,"Segments"),t.k0s(),t.j41(4,"ng-select",16),t.DNE(5,yt,3,3,"ng-option",7)(6,_t,3,0,"ng-option",8),t.k0s()()()),2&a){const e=t.XpG();t.R7$(4),t.Y8G("multiple",!1)("clearable",!0)("hideSelected",!0)("virtualScroll",!0)("closeOnSelect",!0),t.R7$(),t.Y8G("ngForOf",e.segmentOptions),t.R7$(),t.Y8G("ngIf",!(null!=e.segmentOptions&&e.segmentOptions.length))}}let Ct=(()=>{class a{formBuilder;accountsListService;domainConfigService;filterApplied=new t.bkB;filterReset=new t.bkB;journeyStageFilterForm;icpFitOptions=[];segmentOptions=[];isRecotap=!1;subscriptions=[];constructor(e,i,n){this.formBuilder=e,this.accountsListService=i,this.domainConfigService=n,this.isRecotap="recotap"===this.domainConfigService.getProductId()}ngOnInit(){this.initFilterForm(),this.fetchFilterOptions()}initFilterForm(){const e=localStorage.getItem("icpClusterId"),i=localStorage.getItem("audienceSegmentId");this.journeyStageFilterForm=this.formBuilder.group({icpClusterId:[e||null],audienceSegmentId:[i||null]})}fetchFilterOptions(){const e=this.accountsListService.getFilterValues().subscribe({next:i=>{i?.data?.[0]&&(this.icpFitOptions=i.data[0].icpClusters||[],this.segmentOptions=i.data[0].audienceSegments||[])},error:i=>console.error("Error fetching journey stage filter values:",i)});this.subscriptions.push(e)}getFilterData(){return{...this.journeyStageFilterForm.value,appliedFiltersCount:this.getAppliedFiltersCount()}}applyFilter(){const e=this.getFilterData(),i=e.icpClusterId,n=e.audienceSegmentId;i&&""!==i.trim()?localStorage.setItem("icpClusterId",i):localStorage.removeItem("icpClusterId"),n&&""!==n.trim()?localStorage.setItem("audienceSegmentId",n):localStorage.removeItem("audienceSegmentId"),this.filterApplied.emit(e)}resetForm(){this.journeyStageFilterForm.reset({icpClusterId:null,audienceSegmentId:null}),localStorage.removeItem("icpClusterId"),localStorage.removeItem("audienceSegmentId"),this.filterReset.emit()}patchFilterValues(e){this.journeyStageFilterForm&&this.journeyStageFilterForm.patchValue({icpClusterId:e.icpClusterId??null,audienceSegmentId:e.audienceSegmentId??null})}getAppliedFiltersCount(){return Object.values(this.journeyStageFilterForm.controls).filter(e=>{const i=e.value;return null!=i&&""!==i}).length}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe())}static \u0275fac=function(i){return new(i||a)(t.rXU(f.ok),t.rXU(w.K),t.rXU(ft.K))};static \u0275cmp=t.VBU({type:a,selectors:[["app-journey-stage-filter"]],outputs:{filterApplied:"filterApplied",filterReset:"filterReset"},decls:16,vars:9,consts:[[1,"py-6","px-0","border-0","border-bottom-1","border-dashed","border-gray-300"],[3,"formGroup"],[1,"row","g-8","mb-8"],[1,"col-12","col-sm-6"],[1,"fv-row"],[1,"form-label","text-gray-900","fw-bold","fs-lg"],["formControlName","icpClusterId","placeholder","Select ICP","bindLabel","name","bindValue","_id",1,"ng-select__customStyles",3,"multiple","clearable","hideSelected","virtualScroll","closeOnSelect"],[3,"value",4,"ngFor","ngForOf"],["disabled","",4,"ngIf"],["class","col-12 col-sm-6",4,"ngIf"],[1,"mt-6","d-flex","align-items-center","gap-3"],["type","button","data-bs-toggle","collapse","data-bs-target","#kt-accordion-journey-stage-filter",1,"btn","btn-lg","btn-active-primary","border","border-gray-900","px-4","py-3","fs-lg","lh-sm",3,"click"],["type","button",1,"btn","btn-lg","border","border-gray-900","bg-hover-gray-50","px-4","py-3","fs-lg","lh-sm",3,"click"],[3,"value"],[3,"title"],["disabled",""],["formControlName","audienceSegmentId","placeholder","Select Segment","bindLabel","name","bindValue","_id",1,"ng-select__customStyles",3,"multiple","clearable","hideSelected","virtualScroll","closeOnSelect"]],template:function(i,n){1&i&&(t.j41(0,"div",0)(1,"form",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"label",5),t.EFF(6,"ICP Fit"),t.k0s(),t.j41(7,"ng-select",6),t.DNE(8,vt,3,3,"ng-option",7)(9,bt,3,0,"ng-option",8),t.k0s()()(),t.DNE(10,xt,7,7,"div",9),t.k0s(),t.j41(11,"div",10)(12,"button",11),t.bIt("click",function(){return n.applyFilter()}),t.EFF(13," Apply Filter "),t.k0s(),t.j41(14,"button",12),t.bIt("click",function(){return n.resetForm()}),t.EFF(15," Reset "),t.k0s()()()()),2&i&&(t.R7$(),t.Y8G("formGroup",n.journeyStageFilterForm),t.R7$(6),t.Y8G("multiple",!1)("clearable",!0)("hideSelected",!0)("virtualScroll",!0)("closeOnSelect",!0),t.R7$(),t.Y8G("ngForOf",n.icpFitOptions),t.R7$(),t.Y8G("ngIf",!(null!=n.icpFitOptions&&n.icpFitOptions.length)),t.R7$(),t.Y8G("ngIf",n.isRecotap))},dependencies:[g.Sq,g.bT,I.vr,I.xt,f.qT,f.BC,f.cb,f.j4,f.JD],encapsulation:2})}return a})();var k=c(33923);const St=["filterRef"],It=["chart"],Tt=["journeyContainer"],Ft=["chartContainer"],Rt=["trigger"];
1function At(a,o){1&a&&(t.j41(0,"i",15),t.nrm(1,"span",16)(2,"span",17),t.k0s())}function wt(a,o){if(1&a&&(t.j41(0,"span",18),t.EFF(1),t.k0s()),2&a){const e=t.XpG();t.R7$(),t.JRh(e.filterData.appliedFiltersCount)}}function jt(a,o){1&a&&t.nrm(0,"img",19)}function kt(a,o){1&a&&(t.j41(0,"div",20)(1,"div",21)(2,"h5",22),t.EFF(3,"Loading..."),t.k0s()()())}const Pt=(a,o)=>({width:a,"min-width":"0","border-right":o,padding:"0 10px"});function $t(a,o){if(1&a){const e=t.RV6();t.j41(0,"div",30)(1,"div",31)(2,"div",32)(3,"a",33),t.bIt("click",function(){const s=t.eBV(e).$implicit,r=t.XpG(2);return t.Njj(r.onJourneyStageChange(s.id))}),t.EFF(4),t.k0s()(),t.j41(5,"div",34)(6,"div",35),t.bIt("click",function(){const s=t.eBV(e).$implicit,r=t.XpG(2);return t.Njj(r.onJourneyStageChange(s.id))}),t.EFF(7),t.nI1(8,"numberSuffix"),t.k0s(),t.j41(9,"div",36),t.bIt("click",function(){const s=t.eBV(e).$implicit,r=t.XpG(2);return t.Njj(r.onJourneyStageChange(s.id))}),t.j41(10,"span"),t.EFF(11),t.nI1(12,"number"),t.k0s()()()()()}if(2&a){const e=o.$implicit,i=o.index,n=t.XpG(2);t.Y8G("ngStyle",t.l_i(12,Pt,n.getColumnWidth(i),i<n.journeyValues.length-1?"1px solid #EFEFEF":"none")),t.R7$(2),t.FS9("title",e.stage),t.R7$(2),t.SpI(" ",e.stage," "),t.R7$(2),t.FS9("title",e.value),t.R7$(),t.SpI(" ",t.i5U(8,6,e.value,2)," "),t.R7$(4),t.SpI("(",t.i5U(12,9,e.percentage,"1.1-1"),"%)")}}function Dt(a,o){if(1&a&&(t.j41(0,"div",20)(1,"div",23)(2,"div",24,25),t.DNE(4,$t,13,15,"div",26),t.k0s(),t.j41(5,"div",null,27),t.nrm(7,"apx-chart",28,29),t.k0s()()()),2&a){const e=t.XpG();t.R7$(2),t.Y8G("ngStyle",e.chartContainerStyle),t.R7$(2),t.Y8G("ngForOf",e.journeyValues),t.R7$(3),t.Y8G("series",e.chartOptions.series)("chart",e.chartOptions.chart)("xaxis",e.chartOptions.xaxis)("yaxis",e.chartOptions.yaxis)("colors",e.chartOptions.colors)("stroke",e.chartOptions.stroke)("fill",e.chartOptions.fill)("tooltip",e.chartOptions.tooltip)("legend",e.chartOptions.legend)("markers",e.chartOptions.markers)("grid",e.chartOptions.grid)("annotations",e.chartOptions.annotations)("dataLabels",e.chartOptions.dataLabels)}}function Ot(a,o){1&a&&(t.j41(0,"div",20)(1,"div",37),t.nrm(2,"img",38),t.j41(3,"p",39),t.EFF(4,"Journey stage data will appear once you have active accounts in your system."),t.k0s()()())}function Et(a,o){if(1&a&&(t.j41(0,"div",40),t.nrm(1,"ngx-contentful-rich-text",41),t.k0s()),2&a){const e=t.XpG();t.R7$(),t.Y8G("document",e.blurbText)}}const Gt=(a,o)=>({"btn-solid-secondary pe-4 pt-3 pb-3 ps-3":a,"btn-solid-primary ps-4 p-3":o}),Lt=a=>({show:a});let Mt=(()=>{class a{dashboardService;cdr;router;route;contentfulService;accountsListService;show=!1;isLoading$;isLoadingIcpCluster$;firstTimeLoad=!0;showIllustration=!1;totalCount=0;filterActivated=!1;filterData={icpClusterId:null,audienceSegmentId:null,appliedFiltersCount:0};accountData;selectedJourneyStageId=null;filterRef;chart;chartOptions;journeyValues=[];blurbText="";learnmoreText="";journeyContainer;chartContainer;trigger;chartContainerStyle={"min-height":"80px",width:"1786px","padding-left":"59px","padding-right":"28px"};constructor(e,i,n,s,r,l){this.dashboardService=e,this.cdr=i,this.router=n,this.route=s,this.contentfulService=r,this.accountsListService=l,this.initializeChart(),this.isLoading$=this.dashboardService.isLoading$,this.isLoadingIcpCluster$=this.dashboardService.isLoadingIcpCluster$,console.log("Constructor accountData:",this.accountData)}ngOnInit(){this.initFilterState(),this.fetchJourneyData(),console.log("accountData:",this.accountData.data.accountsCount?.count),this.contentfulService.getBlurbText().then(e=>{const i=e.items.find(n=>"RECOTAP-JS"===n.fields.blurb_id);this.blurbText=i?.fields?.content,this.learnmoreText=i?.fields?.learnmore,this.cdr.detectChanges()})}initializeChart(){this.chartOptions={series:[],chart:{type:"area",height:350,stacked:!1,toolbar:{show:!1}},stroke:{curve:"smooth",width:[8],colors:["#00944040"]},xaxis:{categories:[],axisTicks:{show:!1},axisBorder:{show:!1,color:"#009440"},labels:{show:!0,style:{colors:"#ffffff",fontSize:"12px",fontFamily:"Inter",fontWeight:400}},tooltip:{enabled:!1},crosshairs:{show:!0,width:1,stroke:{color:"#009440",dashArray:2}}},fill:{type:"gradient",gradient:{shadeIntensity:1,type:"horizontal",gradientToColors:["#009440"],inverseColors:!1,stops:[0,100]}},tooltip:{shared:!1,intersect:!1,enabled:!0,x:{show:!0},y:{formatter:e=>
1`${e.toLocaleString()}`},theme:"dark"},legend:{show:!0,position:"top"},markers:{size:0},grid:{show:!0,borderColor:"#EFEFEF",strokeDashArray:0,position:"back",xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}},padding:{top:0,right:0,bottom:0,left:10}},yaxis:[{min:0,tickAmount:6,labels:{formatter:e=>`${e}`}}],colors:["#009440"],dataLabels:{enabled:!1},plotOptions:{area:{fillTo:"end"}},annotations:{xaxis:[]}}}initFilterState(){const e=this.route.snapshot.queryParams,i=this.dashboardService.reportsPayloadValue,n=localStorage.getItem("icpClusterId"),s=localStorage.getItem("audienceSegmentId"),r=e.icpClusterId||n||i?.icpClusterId||null,l=e.audienceSegmentId||s||i?.audienceSegmentId||null;this.filterData={icpClusterId:r||null,audienceSegmentId:l||null,appliedFiltersCount:this.getAppliedFiltersCount(r||null,l||null)}}getAppliedFiltersCount(e,i){let n=0;return e&&n++,i&&n++,n}applyFilter(e){this.filterData=e,this.filterActivated=!1,this.fetchJourneyData(),this.router.navigate([],{relativeTo:this.route,queryParams:{icpClusterId:e.icpClusterId||"",audienceSegmentId:e.audienceSegmentId||""},queryParamsHandling:"merge"})}handleResetFilter(){this.filterData={icpClusterId:null,audienceSegmentId:null,appliedFiltersCount:0},this.fetchJourneyData(),this.router.navigate([],{relativeTo:this.route,queryParams:{icpClusterId:"",audienceSegmentId:""},queryParamsHandling:"merge"})}onJourneyStageChange(e){this.selectedJourneyStageId=e||null;const i={journeyStages:this.selectedJourneyStageId?[this.selectedJourneyStageId]:[]};this.filterData.icpClusterId&&(i.icpClusters=[this.filterData.icpClusterId]),this.filterData.audienceSegmentId&&(i.audienceSegments=[this.filterData.audienceSegmentId]),this.accountsListService.updateAccountsListPayload(i,"active");const n={journeyStageId:this.selectedJourneyStageId||"",icpClusterId:this.filterData.icpClusterId||""};this.filterData.audienceSegmentId&&(n.audienceSegmentId=this.filterData.audienceSegmentId),this.router.navigate(["/targets/accounts/list/active"],{queryParams:n})}fetchJourneyData(){this.dashboardService.getJourneyStageOverview({icpClusterId:this.filterData.icpClusterId||void 0,audienceSegmentId:this.filterData.audienceSegmentId||void 0}).subscribe(e=>{if(!e)return;const i=Array.isArray(e?.data)?[...e.data]:[];if(this.firstTimeLoad=!1,this.showIllustration=0===i.length,this.showIllustration)return void this.cdr.detectChanges();const n=[...i],s=n.length>0?n[n.length-1]:null,r={name:"",count:s?s.count:0,percentage:0},l=[...n,r];this.totalCount=i.reduce((d,v)=>d+v.count,0);const h=this.accountData?.data?.accountsCount?.count||0;this.journeyValues=n.map(d=>({id:d._id,stage:d.name,value:d.count,percentage:h>0?d.count/h*100:0}));const u=l.map(d=>d.name);this.chartOptions.xaxis.categories=u;const p=l.map(d=>d.count);if(this.chartOptions.series=[{name:"Count",data:p}],console.log(`Journey data length: ${i.length}, Chart data length: ${p.length}`),console.log(`Last real data point count: ${s?.count}, Empty stage count: ${r.count}`),p.length>0){const d=Math.max(...p),v=this.calculateYAxisMax(d);this.chartOptions.yaxis=[{min:0,max:v,tickAmount:5,forceNiceScale:!0,axisTicks:{show:!0},axisBorder:{show:!1},labels:{formatter:function(ge){return Math.round(ge).toString()}}}]}this.chartOptions.grid={show:!0,borderColor:"#EFEFEF",strokeDashArray:0,position:"back",xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}},padding:{top:0,right:0,bottom:0,left:10},column:{colors:void 0,opacity:.5},row:{colors:void 0,opacity:.5}};const m=u.map(d=>({x:d,strokeDashArray:0,borderColor:"#EFEFEF",borderWidth:1,label:{borderColor:"#EFEFEF",borderWidth:0,borderRadius:0,text:"",textAnchor:"middle",position:"top",orientation:"vertical",style:{background:"transparent"}}}));this.chartOptions.annotations={xaxis:m},this.chartOptions.xaxis.crosshairs={show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#009440",width:1,dashArray:0},fill:{type:"solid",color:"rgba(177, 185, 196, 0.1)"},dropShadow:{enabled:!1}},this.chartOptions.tooltip={...this.chartOptions.tooltip,x:{show:!0,formatter:(d,v)=>u[v.dataPointIndex]||""},y:{formatter:d=>
1`${d.toLocaleString()}`},theme:"dark"},this.cdr.detectChanges(),setTimeout(()=>{this.alignJourneyStagesWithChart()},500)})}calculateYAxisMax(e){return e<=0?10:e<50?10*Math.ceil(e/10):e<200?50*Math.ceil(e/50):e<500?100*Math.ceil(e/100):e<1e3?200*Math.ceil(e/200):e<1e4?1e3*Math.ceil(e/1e3):e<1e5?5e3*Math.ceil(e/5e3):1e4*Math.ceil(e/1e4)}getTestData(){return[{name:"Research",count:25,percentage:12,priority:1},{name:"Discovery",count:18,percentage:8,priority:2},{name:"Purchase",count:17600,percentage:6,priority:3}]}getPositionForIndex(e,i){if(0===e)return"1%";if(e===i-1)return"100%";let s,n=0;s=37;let r=3;if(this.journeyContainer){const p=this.journeyContainer.nativeElement,m=window.getComputedStyle(p);n=p.clientWidth,s=parseFloat(m.paddingLeft),r=parseFloat(m.paddingRight)}return((s+(n-s-r)*e/(i-1))/n*100).toFixed(2)+"%"}refreshPositions(){this.cdr.detectChanges()}ngAfterViewInit(){this.filterRef&&(this.filterData.icpClusterId||this.filterData.audienceSegmentId)&&this.filterRef.patchFilterValues(this.filterData),setTimeout(()=>{this.alignJourneyStagesWithChart()},500)}generateTickValues(e,i){const s=i-e;let r;r=s<=50?10:s<=100?20:s<=200?50:s<=500?100:s<=1e3?200:s<=1e4?2e3:5e3;const l=[];for(let h=0;h<=i;h+=r)l.push(h);return l[l.length-1]<i&&l.push(i),l}getFormattedPercentage(e){return e.toFixed(1)+"%"}getFormattedTotalCount(){return this.totalCount.toLocaleString()}shouldShowPercentages(){return(this.accountData?.data?.accountsCount?.count||0)>0&&this.journeyValues.length>0}getPercentageForStage(e){const i=this.journeyValues.find(n=>n.stage===e);return i?i.percentage:0}alignJourneyStagesWithChart(){if(!this.chartContainer||!this.journeyContainer)return;const e=this.chartContainer.nativeElement,i=e.offsetWidth;let s,n=0;if(this.chartOptions&&this.chartOptions.yaxis&&this.chartOptions.yaxis.length>0){const l=this.chartOptions.yaxis[0].max;n="function"==typeof l?l(0):"number"==typeof l?l:0}const r=n.toString().length;s=r<=2?n.toString().includes("8")?38.5:n.toString().includes("3")?38.7:n.toString().includes("2")?39:37:3===r?n.toString().includes("8")?46.2:n.toString().includes("3")?46:n.toString().includes("4")?44:n.toString().includes("5")?43.5:n.toString().includes("6")?46.5:n.toString().includes("9")?47.5:43.7:4===r?n.toString().includes("8")||n.toString().includes("3")||n.toString().includes("4")||n.toString().includes("5")?52.5:n.toString().includes("2")?53:51:5===r?n.toString().includes("8")||n.toString().includes("3")||n.toString().includes("4")||n.toString().includes("5")?57.5:n.toString().includes("6")||n.toString().includes("9")?60.5:60.1:53,this.chartContainerStyle={"min-height":"30px",width:`${i}px`,"padding-left":`${s}px`,"padding-right":"3px","margin-bottom":"-30px"},this.journeyContainer&&(this.journeyContainer.nativeElement.style.paddingLeft=`${s}px`,this.journeyContainer.nativeElement.style.width=`${i}px`,this.journeyContainer.nativeElement.style.boxSizing="border-box"),this.cdr.detectChanges(),setTimeout(()=>{const l=this.journeyContainer.nativeElement.querySelector(".journey-stage-column"),h=e.querySelector(".apexcharts-plot-area");if(l&&h){const u=l.getBoundingClientRect(),p=h.getBoundingClientRect();console.log("Journey first column left:",u.left),console.log("Plot area left:",p.left),console.log("Difference:",u.left-p.left)}},100)}getColumnWidth(e){return this.journeyValues&&0!==this.journeyValues.length?100/this.journeyValues.length+"%":"0%"}onResize(){setTimeout(()=>{this.alignJourneyStagesWithChart()},100)}ngAfterViewChecked(){this.alignGridLines()}alignGridLines(){if(!this.chart||!this.journeyContainer)return;const i=this.chartContainer.nativeElement.querySelectorAll(".apexcharts-grid-column line"),n=this.journeyContainer.nativeElement.querySelectorAll(".journey-stage-column");if(i.length>0&&n.length>0){const s="column-adjusted";if(!this.journeyContainer.nativeElement.classList.contains(s)){const r=document.createElement("style");r.innerHTML="\n          .journey-stage-column {\n            position: relative;\n            /* Small adjustment to align with grid lines */\n            transform: translateX(-1px);\n          }\n          \n          /* Ensure journey container starts from y-axis */\n          .journey-container {\n            box-sizing: border-box;\n            width: 100%;\n            margin-left: 0;\n          }\n        ",document.head.appendChild(r),this.journeyContainer.nativeElement.classList.add(s),this.journeyContainer.nativeElement.classList.contains("journey-container")||this.journeyContainer.nativeElement.classList.add("journey-container")}}}static \u0275fac=function(i){return new(i||a)(t.rXU(b.I),t.rXU(t.gRc),t.rXU(x.Ix),t.rXU(x.nX),t.rXU(y.w),t.rXU(w.K))};static \u0275cmp=t.VBU({type:a,selectors:[["app-journey-stage"]],viewQuery:function(i,n){if(1&i&&(t.GBs(St,5),t.GBs(It,5),t.GBs(Tt,5),t.GBs(Ft,5),t.GBs(Rt,7)),2&i){let s;t.mGM(s=t.lsd())&&(n.filterRef=s.first),t.mGM(s=t.lsd())&&(n.chart=s.first),t.mGM(s=t.lsd())&&(n.journeyContainer=s.first),t.mGM(s=t.lsd())&&(n.chartContainer=s.first),t.mGM(s=t.lsd())&&(n.trigger=s.first)}},hostBindings:function(i,n){1&i&&t.bIt("resize",function(){return n.onResize()},!1,t.tSv)},inputs:{accountData:"accountData"},decls:23,vars:22,consts:[[1,"card","shadow-none","rounded-6","p-3","p-md-5","p-xl-6","mb-5","mb-xl-8"],[1,"d-flex","px-0","pt-0","pb-3","align-items-center","justify-content-between","border-bottom","border-gray-100"],[1,"d-flex","align-items-center"],[1,"card-title","m-0","fw-bold","fs-2"],["placement","right",1,"text-gray-900","fw-semibold",3,"contentfulDoc","learnmoreText","interactive"],["src","./assets/media/recotap-assets/icons/blurb_text.svg","alt","info-icon",1,"ms-3"],["type","button","data-bs-toggle","collapse","data-bs-target","#kt-accordion-journey-stage-filter","aria-expanded","true","aria-controls","kt-accordion-journey-stage-filter",1,"h-44px","d-flex","align-items-center","fs-lg","fw-semibold","lh-sm",3,"ngClass","click"],["class","ki-duotone ki-filter fs-2",4,"ngIf"],["class","me-2",4,"ngIf"],["src","./assets/media/recotap-assets/icons/cross-circle-solid.svg","alt","","class","ms-2 w-16px h-16px",4,"ngIf"],["id","kt-accordion-journey-stage-filter",1,"accordion-collapse","collapse","w-100","mb-6",3,"ngClass","shown.bs.collapse","hidden.bs.collapse"],[3,"filterApplied","filterReset"],["filterRef",""],["class","card-body p-0 pt-6",4,"ngIf"],["scoreTooltip",""],[1,"ki-duotone","ki-filter","fs-2"],[1,"path1"],[1,"path2"],[1,"me-2"],["src","./assets/media/recotap-assets/icons/cross-circle-solid.svg","alt","",1,"ms-2","w-16px","h-16px"],[1,"card-body","p-0","pt-6"],[1,"d-flex","flex-column","align-items-center","justify-content-center","py-20","h-45vh"],[1,"text-gray-700"],[1,"position-relative"],[1,"journey-stages-container","d-flex","position-relative","align-items-center","justify-content-start",3,"ngStyle"],["journeyContainer",""],["class","journey-stage-column position-relative",3,"ngStyle",4,"ngFor","ngForOf"],["chartContainer",""],[3,"series","chart","xaxis","yaxis","colors","stroke","fill","tooltip","legend","markers","grid","annotations","dataLabels"],["chart",""],[1,"journey-stage-column","position-relative",3,"ngStyle"],[1,"text-center"],[1,"mb-2","text-gray-500","fs-6","text-center","text-truncate","w-100","text-capitalize","d-flex","align-items-center","justify-content-start",3,"title"],[1,"text-gray-500","text-hover-primary","cursor-pointer",3,"click"],[1,"d-flex","gap-2","justify-content-start","flex-wrap","align-items-center"],[1,"fw-semibold","fs-4","text-gray-900","text-truncate","d-flex","align-items-center","justify-content-start","cursor-pointer","text-hover-primary",3,"title","click"],[1,"fw-semibold","fs-4","text-gray-900","cursor-pointer","text-hover-primary",3,"click"],[1,"d-flex","flex-column","align-items-center","justify-content-center","py-20","h-50vh"],["src","./assets/media/recotap-assets/illustrations/empty-state-160.svg","alt","empty state"],[1,"text-muted","fs-6","mt-8","text-center"],[1,"d-flex","flex-column","text-start"],[3,"document"]],template:function(i,n){1&i&&(t.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3",3),t.EFF(4," Journey Stage "),t.k0s(),t.j41(5,"app-recotap-custom-tooltip",4),t.nrm(6,"img",5),t.k0s()(),t.j41(7,"button",6),t.bIt("click",function(){return n.filterActivated=!n.filterActivated}),t.DNE(8,At,3,0,"i",7)(9,wt,2,1,"span",8),t.EFF(10," Filter "),t.DNE(11,jt,1,0,"img",9),t.k0s()(),t.j41(12,"div",10),t.bIt("shown.bs.collapse",function(){return n.filterActivated=!0})("hidden.bs.collapse",function(){return n.filterActivated=!1}),t.j41(13,"app-journey-stage-filter",11,12),t.bIt("filterApplied",function(r){return n.applyFilter(r)})("filterReset",function(){return n.handleResetFilter()}),t.k0s()(),t.DNE(15,kt,4,0,"div",13),t.nI1(16,"async"),t.DNE(17,Dt,9,15,"div",13),t.nI1(18,"async"),t.DNE(19,Ot,5,0,"div",13),t.nI1(20,"async"),t.k0s(),t.DNE(21,Et,2,1,"ng-template",null,14,t.C5r)),2&i&&(t.R7$(5),t.Y8G("contentfulDoc",n.blurbText)("learnmoreText",n.learnmoreText)("interactive",!0),t.R7$(2),t.Y8G("ngClass",t.l_i(17,Gt,!n.filterActivated&&0===n.filterData.appliedFiltersCount,n.filterActivated||n.filterData.appliedFiltersCount>0)),t.R7$(),t.Y8G("ngIf",!n.filterActivated),t.R7$(),t.Y8G("ngIf",n.filterData.appliedFiltersCount>0),t.R7$(2),t.Y8G("ngIf",n.filterActivated),t.R7$(),t.Y8G("ngClass",t.eq3(20,Lt,n.filterActivated)),t.R7$(3),t.Y8G("ngIf",(n.firstTimeLoad||t.bMT(16,11,n.isLoading$))&&!n.showIllustration),t.R7$(2),t.Y8G("ngIf",!n.firstTimeLoad&&!n.showIllustration&&!t.bMT(18,13,n.isLoading$)),t.R7$(2),t.Y8G("ngIf",n.showIllustration&&!n.firstTimeLoad&&!t.bMT(20,15,n.isLoading$)))},dependencies:[g.YU,g.Sq,g.bT,g.B3,_._,S.Q,j.Mq,Ct,g.Jj,g.QX,k.V]})}return a})();const Yt=["chart"];function Xt(a,o){if(1&a&&(t.j41(0,"div",null,8),t.nrm(2,"apx-chart",9),t.k0s()),2&a){const e=t.XpG(2);t.R7$(2),t.Y8G("series",e.chartOptions.series)("chart",e.chartOptions.chart)("xaxis",e.chartOptions.xaxis)("yaxis",e.chartOptions.yaxis)("colors",e.chartOptions.colors)("tooltip",e.chartOptions.tooltip)("legend",e.chartOptions.legend)("markers",e.chartOptions.markers)("grid",e.chartOptions.grid)("dataLabels",e.chartOptions.dataLabels)("plotOptions",e.chartOptions.plotOptions)}}function Jt(a,o){if(1&a&&(t.j41(0,"div",6),t.DNE(1,Xt,3,11,"div",7),t.nI1(2,"async"),t.k0s()),2&a){const e=t.XpG();t.R7$(),t.Y8G("ngIf",!t.bMT(2,1,e.isLoading$))}}function Bt(a,o){1&a&&(t.j41(0,"div",6)(1,"div",10)(2,"h5",11),t.EFF(3,"Loading..."),t.k0s()()())}function zt(a,o){1&a&&(t.j41(0,"div",6)(1,"div",12),t.nrm(2,"img",13),t.j41(3,"p",14),t.EFF(4,"Top Performing Smart Pages would appear once you have launched Smart Pages."),t.k0s()()())}let Nt=(()=>{class a{dashboardService;dateRangePickerService;cdr;contentfulService;randomId;chart;isLoading$;chartOptions;firstTimeLoad=!0;showIllustration=!1;dateRangeSelected$;subscriptions=[];blurbText="";constructor(e,i,n,s){this.dashboardService=e,this.dateRangePickerService=i,this.cdr=n,this.contentfulService=s,this.randomId=this.random(),this.isLoading$=this.dashboardService.isLoading$,this.dateRangeSelected$=this.dateRangePickerService.dateRangeSelected$,this.initializeChartOptions(),this.loadSmartPagesData()}random(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}
1ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe())}ngOnInit(){this.randomId=this.random(),this.fetchTooltipContent()}ngAfterViewInit(){this.cdr.detectChanges(),setTimeout(()=>{const e=this.dateRangeSelected$.subscribe(i=>{i?.dateRange&&(this.firstTimeLoad=!0,this.loadSmartPagesData())});this.subscriptions.push(e)},0)}fetchTooltipContent(){this.contentfulService.getBlurbText().then(e=>{const i=e.items.find(n=>"RECOTAP-TPSP"===n.fields.blurb_id);this.blurbText=i?.fields?.content||"",this.cdr.detectChanges()})}initializeChartOptions(){this.chartOptions={series:[{name:"Visits",data:[]},{name:"Accounts",data:[]}],chart:{type:"bar",height:472,stacked:!1,toolbar:{show:!1}},plotOptions:{},xaxis:{type:"category",categories:[],axisTicks:{show:!1},axisBorder:{show:!1,color:"#2F6EED"},position:"bottom",labels:{show:!0,rotate:-45,trim:!0,rotateAlways:!1,hideOverlappingLabels:!0,showDuplicates:!1,style:{colors:"#8C8C8C",fontSize:"11px",fontFamily:"Inter",fontWeight:400}}},tooltip:{shared:!0,intersect:!1,enabled:!0,y:{formatter:function(e){return e.toString()},title:{formatter:e=>e}},x:{show:!1},style:{fontSize:"12px",fontFamily:void 0},theme:"dark",fillSeriesColor:!1},markers:{size:0},grid:{borderColor:"#e0e0e0",strokeDashArray:4,padding:{left:10,right:10,top:10,bottom:10}},yaxis:[{min:0,max:50,tickAmount:5,labels:{formatter:function(e){return e+"K"}}}],colors:["#5452C5","#B3B3E6"],dataLabels:{enabled:!1},legend:{horizontalAlign:"center",position:"top",offsetX:40,markers:{width:8,height:8,radius:8},itemMargin:{horizontal:10,vertical:5}}}}loadSmartPagesData(){this.dashboardService.getSmartPagesOverview().subscribe({next:e=>{if(this.firstTimeLoad=!1,e&&e.data){const i=e.data;if(console.log(i,"smartPagesData"),this.showIllustration=0===i.length,!this.showIllustration){const n=i.map(p=>p.views),s=i.map(p=>p.uniqueAccounts),r=Math.max(...n,...s),l=i.map(p=>{const m=p.smartPageName.split(" ");return m.length>1?[m.slice(0,-1).join(" "),m[m.length-1]]:(console.log(p.smartPageName,"item.smartPageName"),[p.smartPageName])}),h=10*Math.ceil(r/10);let u;u=i.length<=1?"5%":i.length<=2?"10%":i.length<=3?"15%":i.length<=5?"30%":i.length<=10?"50%":"60%",this.chartOptions={...this.chartOptions,yaxis:[{min:0,max:h,tickAmount:5,labels:{formatter:function(p){return p.toString()}}}],xaxis:{...this.chartOptions.xaxis,type:"category",categories:l},series:[{name:"Visits",data:n},{name:"Accounts",data:s}],plotOptions:{...this.chartOptions.plotOptions,bar:{borderRadius:8,borderRadiusApplication:"end",horizontal:!1,...this.chartOptions.plotOptions.bar,columnWidth:u}}},this.chart&&this.chart.updateOptions(this.chartOptions)}this.cdr.detectChanges()}},error:e=>{console.error("Error loading smart pages data:",e),this.firstTimeLoad=!1,this.showIllustration=!0,this.cdr.detectChanges()}})}static \u0275fac=function(i){return new(i||a)(t.rXU(b.I),t.rXU(C.R),t.rXU(t.gRc),t.rXU(y.w))};static \u0275cmp=t.VBU({type:a,selectors:[["app-top-performing-smart-pages"]],viewQuery:function(i,n){if(1&i&&t.GBs(Yt,5),2&i){let s;t.mGM(s=t.lsd())&&(n.chart=s.first)}},decls:9,vars:6,consts:[[1,"card","shadow-none","rounded-6","p-3","p-md-5","p-xl-6","mb-5","mb-xl-8"],[1,"d-flex","align-items-center"],[1,"card-title","m-0","fw-bold","fs-2"],["placement","right",1,"text-gray-900","fw-semibold",3,"contentfulDoc","interactive","maxWidth"],["src","./assets/media/recotap-assets/icons/blurb_text.svg","alt","info-icon",1,"ms-3"],["class","card-body p-0 pt-6",4,"ngIf"],[1,"card-body","p-0","pt-6"],[4,"ngIf"],["chart",""],[3,"series","chart","xaxis","yaxis","colors","tooltip","legend","markers","grid","dataLabels","plotOptions"],[1,"d-flex","flex-column","align-items-center","justify-content-center","py-20","h-45vh"],[1,"text-gray-700"],[1,"d-flex","flex-column","align-items-center","justify-content-center","py-20","h-50vh"],["src","./assets/media/recotap-assets/illustrations/empty-state-160.svg","alt","empty state"],[1,"text-muted","fs-6","mt-8","text-center"]],template:function(i,n){1&i&&(t.j41(0,"div",0)(1,"div",1)(2,"h3",2),t.EFF(3," Top Performing Smart Pages "),t.k0s(),t.j41(4,"app-recotap-custom-tooltip",3),t.nrm(5,"img",4),t.k0s()(),t.DNE(6,Jt,3,3,"div",5)(7,Bt,4,0,"div",5)(8,zt,5,0,"div",5),t.k0s()),2&i&&(t.R7$(4),t.Y8G("contentfulDoc",n.blurbText)("interactive",!0)("maxWidth",350),t.R7$(2),t.Y8G("ngIf",!n.firstTimeLoad&&!n.showIllustration),t.R7$(),t.Y8G("ngIf",n.firstTimeLoad),t.R7$(),t.Y8G("ngIf",n.showIllustration))},dependencies:[g.bT,_._,S.Q,g.Jj]})}return a})();const Ut=["dateRangePickerInput"],Vt=["TopPerformingSmartPagesComponent"];function Wt(a,o){1&a&&(t.j41(0,"div")(1,"div",10),t.EFF(2," Loading... "),t.k0s()())}function Qt(a,o){if(1&a&&(t.j41(0,"app-recotap-custom-tooltip",30),t.nrm(1,"img",31),t.k0s()),2&a){const e=t.XpG().$implicit,i=t.XpG(2);t.Y8G("contentfulDoc",i.getTooltipContent(e.subText))("interactive",!0)("maxWidth",350)}}function Ht(a,o){1&a&&t.nrm(0,"app-triple-dot-loader")}function Kt(a,o){1&a&&t.nrm(0,"img",38)}function Zt(a,o){1&a&&t.nrm(0,"img",39)}const qt=(a,o)=>({"text-semantic-red":a,"text-semantic-green":o});function te(a,o){if(1&a&&(t.j41(0,"span",40),t.EFF(1),t.nI1(2,"number"),t.k0s()),2&a){const e=t.XpG(3).$implicit,i=t.XpG(2);t.Y8G("ngClass",t.l_i(5,qt,e.change<0,e.change>0)),t.R7$(),t.SpI(" ",null!==e.change?t.i5U(2,2,i.getAbsoluteChange(e.change),"1.2-2")+"%":"-"," ")}}function ee(a,o){if(1&a&&(t.qex(0),t.j41(1,"span",34),t.DNE(2,Kt,1,0,"img",35)(3,Zt,1,0,"img",36)(4,te,3,8,"span",37),t.k0s(),t.bVm()),2&a){const e=t.XpG(2).$implicit;t.R7$(2),t.Y8G("ngIf",e.change>0),t.R7$(),t.Y8G("ngIf",e.change<0),t.R7$(),t.Y8G("ngIf",0!==e.change)}}function ie(a,o){if(1&a&&(t.j41(0,"div",32)(1,"span",33),t.nI1(2,"number"),t.nI1(3,"number"),t.EFF(4),t.nI1(5,"numberSuffix"),t.nI1(6,"numberSuffix"),t.k0s(),t.DNE(7,ee,5,3,"ng-container",9),t.k0s()),2&a){const e=t.XpG().$implicit;t.R7$(),t.FS9("title","Reached"===e.alt||"Targeted"===e.alt||"Engaged"===e.alt?t.i5U(2,3,e.mainText,"1.0-0"):t.i5U(3,6,e.mainText,"1.2-2")),t.R7$(3),t.SpI(" ","Reached"===e.alt||"Targeted"===e.alt||"Engaged"===e.alt?t.i5U(5,9,e.mainText,0):t.i5U(6,12,e.mainText,2)," "),t.R7$(3),t.Y8G("ngIf",0!==e.change)}}function ne(a,o){if(1&a&&(t.j41(0,"div",21)(1,"div",22)(2,"div",23),t.nrm(3,"img",24),t.k0s()(),t.j41(4,"div")(5,"div",25)(6,"span",26),t.EFF(7),t.k0s(),t.DNE(8,Qt,2,3,"app-recotap-custom-tooltip",27),t.k0s(),t.j41(9,"div",28),t.DNE(10,Ht,1,0,"app-triple-dot-loader",9),t.nI1(11,"async"),t.DNE(12,ie,8,15,"div",29),t.nI1(13,"async"),t.k0s()()()),2&a){const e=o.$implicit,i=t.XpG(2);t.R7$(2),t.Y8G("ngClass",e.bgClass),t.R7$(),t.Y8G("src",e.icon,t.B4B)("alt",e.alt),t.R7$(3),t.Y8G("title",e.subText),t.R7$(),t.SpI(" ",e.subText,""),t.R7$(),t.Y8G("ngIf",i.getTooltipContent(e.subText)),t.R7$(2),t.Y8G("ngIf",t.bMT(11,8,i.isAccountsInsightsLoading)),t.R7$(2),t.Y8G("ngIf",!1===t.bMT(13,10,i.isAccountsInsightsLoading))}}function ae(a,o){if(1&a&&(t.j41(0,"div")(1,"div",11)(2,"div",12)(3,"div",13),t.DNE(4,ne,14,12,"div",14),t.k0s()()(),t.j41(5,"div",15)(6,"div",16),t.nrm(7,"app-journey-stage",17),t.k0s()(),t.j41(8,"div",18)(9,"div",19),t.nrm(10,"app-top-performing-campigns"),t.k0s(),t.j41(11,"div",20),t.nrm(12,"app-top-performing-ads"),t.k0s()(),t.j41(13,"div",18)(14,"div",16),t.nrm(15,"app-top-performing-smart-pages"),t.k0s()()()),2&a){const e=t.XpG();t.R7$(4),t.Y8G("ngForOf",e.accountsInsights),t.R7$(3),t.Y8G("accountData",e.accountActivityData)}}const se=[{path:"",component:(()=>{class a{dateRangePickerService;cdr;dashboardService;fb;contentfulService;authService;teamsService;randomId;accountsInsights=[];isLoadingParent$=new $.c;dateRangePickerInput;topPerformingSmartPagesComponent;dateRangeSelected$;subscriptions=[];isAccountsInsightsLoading;isAccountsInsightsLoadingSubject;isLoading;isLoadingSubject;accountActivityData={};overviewFilterForm;filterData={dateRange:""};activeAccountsTooltip="";accountsReachedTooltip="";accountsEngagedTooltip="";mediaCostTooltip="";
1accountsData={count:{value:"0",change:0},reached:{value:"0",change:0},engaged:{value:"0",change:0},mediaCost:{value:"0",change:0}};currencySymbol="$";constructor(e,i,n,s,r,l,h){this.dateRangePickerService=e,this.cdr=i,this.dashboardService=n,this.fb=s,this.contentfulService=r,this.authService=l,this.teamsService=h,this.isLoadingParent$=this.dashboardService.isLoadingParent$,this.isAccountsInsightsLoadingSubject=new F.t(!0),this.isAccountsInsightsLoading=this.isAccountsInsightsLoadingSubject.asObservable(),this.dateRangeSelected$=this.dateRangePickerService.dateRangeSelected$,this.isLoadingSubject=new F.t(!0),this.isLoading=this.isLoadingSubject.asObservable(),this.isLoadingSubject.next(!0);const u=this.dashboardService.getAccountActivity().subscribe({next:p=>{this.updateInsightsData(p),this.isLoadingSubject.next(!1),this.accountActivityData=p},error:p=>{console.error("Error fetching account activity:",p),this.isLoadingSubject.next(!1)}});this.subscriptions.push(u)}ngOnInit(){this.randomId=this.random(),this.initForm(),this.fetchTooltipContent(),this.initializeCurrencySymbol()}initForm(){this.overviewFilterForm=this.fb.group({dateRange:[this.dashboardService.reportsPayloadValue.dateRange||""]})}random(){return Math.random().toString(36).substring(2,15)}fetchTooltipContent(){this.contentfulService.getBlurbText().then(e=>{const i=e.items.find(l=>"RECOTAP-AA"===l.fields.blurb_id),n=e.items.find(l=>"RECOTAP-AR"===l.fields.blurb_id),s=e.items.find(l=>"RECOTAP-AE"===l.fields.blurb_id),r=e.items.find(l=>"RECOTAP-MCOST-001"===l.fields.blurb_id);this.activeAccountsTooltip=i?.fields?.content||"",this.accountsReachedTooltip=n?.fields?.content||"",this.accountsEngagedTooltip=s?.fields?.content||"",this.mediaCostTooltip=r?.fields?.content||"",this.cdr.detectChanges()})}initializeCurrencySymbol(){(0,L.Y7)(this.authService).subscribe(e=>{this.currencySymbol=e,this.initializeFirmographics(),this.cdr.detectChanges()})}getTooltipContent(e){switch(e){case"Active Accounts":return this.activeAccountsTooltip;case"Accounts Reached":return this.accountsReachedTooltip;case"Accounts Engaged":return this.accountsEngagedTooltip;case`Media Costs (${this.currencySymbol})`:return this.mediaCostTooltip;default:return""}}ngAfterViewInit(){this.cdr.detectChanges(),this.waitForTeamDataAndInitialize()}waitForTeamDataAndInitialize(){if(localStorage.getItem("teamCreatedAt"))this.initializeDateRangePickerWithSubscription();else{const i=this.teamsService.teamData$.pipe((0,D.p)(n=>null!=n),(0,O.s)(1),(0,E.w)(1e4)).subscribe({next:n=>{setTimeout(()=>{this.initializeDateRangePickerWithSubscription()},100)},error:n=>{console.warn("Timeout or error waiting for team data, initializing with default date:",n),this.initializeDateRangePickerWithSubscription()}});this.subscriptions.push(i),this.teamsService.getTeam().subscribe({next:()=>{},error:n=>{console.error("Error fetching team data:",n)}})}}initializeDateRangePickerWithSubscription(){setTimeout(()=>{this.dateRangePickerService.refreshDateRange(),this.initializeDateRangePicker();const e=this.dateRangeSelected$.subscribe(i=>{if(i?.elementId===`createdDateRangePicker-${this.randomId}`){i?.dateRange?(this.overviewFilterForm.get("dateRange")?.setValue(i?.dateRange),this.isAccountsInsightsLoadingSubject.next(!0),this.dateRangePickerService.checkDateRangeMatch(i?.dateRange)?this.dashboardService.updateReportsPayload({dateRange:""}):this.dashboardService.updateReportsPayload({dateRange:this.formatSelectedDateRange(i?.dateRange)})):this.dashboardService.updateReportsPayload({dateRange:""});const n=this.dashboardService.getAccountActivity().subscribe(s=>{this.updateInsightsData(s)});this.subscriptions.push(n)}});this.subscriptions.push(e)},0)}updateInsightsData(e){this.accountsData={count:{value:e.data.accountsCount.count.toString(),change:e.data.accountsCount.change},reached:{value:e.data.accountsReached.count.toString(),change:e.data.accountsReached.change},engaged:{value:e.data.accountsEngaged.count.toString(),change:e.data.accountsEngaged.change},mediaCost:{value:`${e.data.mediaCost.count}`,change:e.data.mediaCost.change}},this.initializeFirmographics(),this.cdr.detectChanges(),this.isAccountsInsightsLoadingSubject.next(!1)}formatSelectedDateRange(e){const[i,n]=e.split(" - ");return`${R()(i,"DD/MM/YYYY").startOf("day").toISOString()}--${R()(n,"DD/MM/YYYY").endOf("day").toISOString()}`}initializeDateRangePicker(){if(this.dateRangePickerService.initializeDateRangePicker){const e=this.dashboardService.reportsPayloadValue.dateRange;let i,n;e&&e.includes("--")&&([i,n]=e.split("--")),console.log(i,n,"startDate, endDate"),this.dateRangePickerService.initializeDateRangePicker(`createdDateRangePicker-${this.randomId}`,i,n)}else console.error("Datepicker component not found.")}initializeFirmographics(){this.accountsInsights=[{icon:"./assets/media/recotap-assets/icons/target-acc-2-solid-1.svg",alt:"Targeted",bgClass:"bg-light-semantic-blue",mainText:this.accountsData.count.value,subText:"Active Accounts",icon2:"./assets/media/recotap-assets/icons/arrow-down-solid.svg",color:this.getChangeColor(this.accountsData.count.change),change:this.accountsData.count.change},{icon:"./assets/media/recotap-assets/icons/accounts-reached.svg",alt:"Reached",bgClass:"bg-light-semantic-orange",mainText:this.accountsData.reached.value,subText:"Accounts Reached",icon2:"./assets/media/recotap-assets/icons/arrow-down-solid.svg",color:this.getChangeColor(this.accountsData.reached.
1change),change:this.accountsData.reached.change},{icon:"./assets/media/recotap-assets/icons/accounts-engaged.svg",alt:"Engaged",bgClass:"bg-light-semantic-green",mainText:this.accountsData.engaged.value,subText:"Accounts Engaged",icon2:"./assets/media/recotap-assets/icons/arrow-down-solid.svg",color:this.getChangeColor(this.accountsData.engaged.change),change:this.accountsData.engaged.change},{icon:"./assets/media/recotap-assets/icons/cash-red.svg",alt:"Costs",bgClass:"bg-light-semantic-red",mainText:this.accountsData.mediaCost.value,subText:`Media Costs (${this.currencySymbol})`,icon2:"./assets/media/recotap-assets/icons/arrow-down-solid.svg",color:this.getChangeColor(this.accountsData.mediaCost.change),change:this.accountsData.mediaCost.change}]}getChangeColor(e){return e>0?"text-semantic-green":e<0?"text-semantic-red":"text-gray-500"}getAbsoluteChange(e){return e?Math.abs(e):0}ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe())}static \u0275fac=function(i){return new(i||a)(t.rXU(C.R),t.rXU(t.gRc),t.rXU(b.I),t.rXU(f.ok),t.rXU(y.w),t.rXU(M.uR),t.rXU(Y.O))};static \u0275cmp=t.VBU({type:a,selectors:[["app-abm-activity"]],viewQuery:function(i,n){if(1&i&&(t.GBs(Ut,5),t.GBs(Vt,5)),2&i){let s;t.mGM(s=t.lsd())&&(n.dateRangePickerInput=s.first),t.mGM(s=t.lsd())&&(n.topPerformingSmartPagesComponent=s.first)}},decls:14,vars:7,consts:[[1,"d-flex","flex-column","flex-column-fluid","py-10"],["id","kt_app_toolbar",1,"app-toolbar","d-flex","flex-stack","flex-row-fluid","pb-6","pb-sm-8","pt-0"],[1,"d-flex","flex-stack","flex-row-fluid","h-48px"],[1,"page-title","d-flex","flex-column","me-3"],[1,"d-flex","text-gray-900","fw-bold","fs-1","flex-column","justify-content-center","my-0"],[1,"position-relative"],["readonly","","placeholder","Pick date range","formControlName","dateRange",1,"form-control","form-control-solid","rounded-pill","fs-lg","mh-38px","border-0","px-4","py-2",3,"id"],["dateRangePickerInput",""],["src","./assets/media/recotap-assets/icons/calendar-duotone.svg","alt","calendar-icon",1,"position-absolute","end-0","top-0","bottom-0","m-auto","me-4"],[4,"ngIf"],[1,"d-flex","justify-content-center","align-items-center","h-100vh","text-center"],[1,"d-flex","flex-wrap","flex-stack"],[1,"d-flex","flex-column","flex-grow-1"],[1,"d-flex","flex-wrap","gap-3","gap-md-4","gap-xl-5","justify-content-between"],["class","border border-gray-100 rounded p-3 d-flex align-items-center flex-grow-1",4,"ngFor","ngForOf"],[1,"row","g-5","g-md-8","pt-8"],[1,"col-12"],[3,"accountData"],[1,"row","g-5","g-md-8"],[1,"col-12","col-lg-7"],[1,"col-12","col-lg-5"],[1,"border","border-gray-100","rounded","p-3","d-flex","align-items-center","flex-grow-1"],[1,"symbol","symbol-40px","me-3"],[1,"symbol-label",3,"ngClass"],[1,"w-32px","h-32px",3,"src","alt"],[1,"pb-2","d-flex","align-items-center"],[1,"text-gray-500","fs-7",3,"title"],["placement","auto","class","text-gray-900 fw-semibold",3,"contentfulDoc","interactive","maxWidth",4,"ngIf"],[1,"text-gray-700","fw-bold","lh-1","d-flex","align-items-center"],["class","fs-5 text-gray-700 fw-bold lh-1",4,"ngIf"],["placement","auto",1,"text-gray-900","fw-semibold",3,"contentfulDoc","interactive","maxWidth"],["src","./assets/media/recotap-assets/icons/blurb_text.svg","alt","info-icon",1,"ms-3"],[1,"fs-5","text-gray-700","fw-bold","lh-1"],[1,"fs-1",3,"title"],[1,"ms-1"],["src","./assets/media/recotap-assets/icons/arrow-up-outline-1.svg","alt","",4,"ngIf"],["src","./assets/media/recotap-assets/icons/arrow-down-solid.svg","alt","",4,"ngIf"],[3,"ngClass",4,"ngIf"],["src","./assets/media/recotap-assets/icons/arrow-up-outline-1.svg","alt",""],["src","./assets/media/recotap-assets/icons/arrow-down-solid.svg","alt",""],[3,"ngClass"]],template:function(i,n){1&i&&(t.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"h1",4),t.EFF(5," ABM Activity Dashboard "),t.k0s()(),t.j41(6,"div",5),t.nrm(7,"input",6,7)(9,"img",8),t.k0s()()(),t.DNE(10,Wt,3,0,"div",9),t.nI1(11,"async"),t.DNE(12,ae,16,2,"div",9),t.nI1(13,"async"),t.k0s()),2&i&&(t.R7$(7),t.Mz_("id","createdDateRangePicker-",n.randomId,""),t.R7$(3),t.Y8G("ngIf",!0===t.bMT(11,3,n.isLoading)),t.R7$(2),t.Y8G("ngIf",!1===t.bMT(13,5,n.isLoading)))},dependencies:[g.YU,g.Sq,g.bT,f.me,f.BC,f.JD,X.M,_._,V,ht,Mt,Nt,g.Jj,g.QX,k.V]})}return a})()}];let oe=(()=>{class a{static \u0275fac=function(i){return new(i||a)};static \u0275mod=t.$C({type:a});static \u0275inj=t.G2t({imports:[x.iI.forChild(se),x.iI]})}return a})();var re=c(62796),ce=c(71224),P=c(29599),le=c(72242),de=c(84362);let pe=(()=>{class a{static \u0275fac=function(i){return new(i||a)};static \u0275mod=t.$C({type:a});static \u0275inj=t.G2t({imports:[g.MD,oe,re.ed,ce.G,P.n8,I.MQ,f.X1,f.YN,le.r,de.Dk,P.zH,S.J,j.Zj]})}return a})()}}]);

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.