1import {c as c$2}from'./chunk-D0_kS1VL.js';import {z}from'./chunk-DhRDT027.js';import {e as e$1}from'./chunk-DvkF93St.js';import {d}from'./chunk-Ba3jrEKD.js';import {Y as Ye,Z as Ze}from'./chunk-ChN3xRDD.js';import {O as Ot}from'./chunk-_ZjpHx1z.js';import {r as re}from'./chunk-CnPUpWZx.js';import {N as Ne}from'./chunk-C3TE9h6M.js';import'./chunk-BnkBHa4M.js';import'./chunk-f9g8SnuN.js';import {G as Gt$1}from'./chunk-BlGaepCA.js';import'./chunk-D7ryVLc_.js';import'./chunk-BGZO9Idq.js';import'./chunk-CaDlhFYG.js';import'./chunk-ltx5WUES.js';import'./chunk-DF8mYXhN.js';import {p as pe}from'./chunk--i86oVqv.js';import'./chunk-DKmYIY3x.js';import'./chunk-B2bPG-0R.js';import'./chunk-ANKQfZIP.js';import {_ as _e$1}from'./chunk-BNzBAvVW.js';import'./chunk-tQE0U33-.js';import {C}from'./chunk-D0MqLFiB.js';import'./chunk-DatMjTnd.js';import {K as Kn}from'./chunk-D0iw8Wug.js';import'./chunk-DX-trZXX.js';import'./chunk-C9wDTFly.js';import'./chunk-DGHu2T0U.js';import'./chunk-wSX1hPKw.js';import {Z as Ze$1}from'./chunk-BoUFhu-1.js';import'./chunk-C50Dlzi7.js';import {J as Jr$1,P as F,s as sw,A as An,o as b,e as hn,u as uT,b as bb,p as Rl,x as dT,_ as _b,c_ as yb,a7 as rr$1,W,T as Tn,iM as P,H as qm,b9 as Mu,bZ as Ru,iN as t,iO as o,cl as t$1,b7 as Hp,bf as me,bg as G,Z as Zi$1,cw as zg,ad as _g,k as kl,cy as Gg,I as Ig,a as AE,E as Eg,z as NT,b4 as tt,D,bw as E,bx as D$1,aP as L,a5 as ve,ay as Gr$1,f as fe,bb as A,aR as oa$1,h as he,Q as u,i as ib,S as hT,X as pT,U as Ug,Y as gT,bd as be,R,gd as ot,aQ as un,dX as _,d8 as s,hg as Ls,b8 as Tu,bH as c,fQ as E$1,g as ge$1,en as T,eo as N,dL as ce,bz as wu,cn as u$1,j as kt,fJ as F$1,eh as In,ei as wn,ej as An$1,ek as en$1,ac as fe$1,aT as AT,em as o$1,az as dw,M as Mb,a2 as Ib,a$ as m$2,iP as e,fM as c$1,aH as VV,by as jV,af as DT,w as jl,a8 as fi,bY as bu,N as Nu,dA as n,dr as s$1,cs as We,ct as bn,el as Jt$1,cD as P$1,cx as vD,cz as ED,aL as Su,bm as qd,bj as Ol,bn as Dg,bk as Ll,dC as Wd,ag as Rd,ah as kd,aV as RT,cC as Mg,db as Ni,dc as Si$1,O as OI,ae as qg,c6 as d$1,c8 as Ms,bB as m$3,cJ as F$2,a4 as h,eb as p,dk as f$1,K as W$1,iQ as R$1,cI as lb,aX as Pg,$ as vb,ai as qp}from'./main-HXZZBYKT.js';import {Z}from'./chunk-0SAkSben.js';import {I}from'./chunk-Mg3ZlSQ3.js';import'./chunk-B5-b4aOw.js';import'./chunk-B9onvD1d.js';import'./chunk-Ch9ga4Vw.js';import'./chunk-BGv_96Xd.js';import'./chunk-VsTSG8xv.js';import'./chunk-bX0ztLpE.js';import {m,a}from'./chunk-Dx-ancoO.js';import {Q as Qt$1}from'./chunk-BBUdhzW0.js';import'./chunk-7xyQfN4e.js';import {m as m$1}from'./chunk-BU4fVVJU.js';import'./chunk-v1MYk-1f.js';import'./chunk-Bo9Qt-pS.js';import'./chunk-C0CNrJIi.js';import {t as tt$1}from'./chunk-BIWikXco.js';import'./chunk-DK7xVMU2.js';import {f}from'./chunk-BVdXlYtM.js';import {o as o$2}from'./chunk-B89k0elS.js';import'./chunk-BYkKgZ9t.js';import'./chunk-JWuhnsTD.js';import'./chunk-5zC2RRDu.js';import {c as cn,k as ke$1,d as dn}from'./chunk-Bjbfsr7K.js';import'./chunk-eheVzRgY.js';import {m as me$1}from'./chunk-C3OJCMDa.js';import'./chunk-BQCRYElg.js';import'./chunk-BPyzRVeC.js';import'./chunk-BzO0Nryu.js';import {w as we$1,_ as _e$2}from'./chunk-D1CIlaK7.js';import {j}from'./chunk-B5Qbt9LA.js';import {l as le}from'./chunk-Bb1yGhPS.js';import'./chunk-DbVnFMAK.js';import'./chunk-BTO02E8R.js';import'./chunk-2Rp26KKY.js';import'./chunk-BxIsaYkZ.js';import'./chunk-CnI3MAjo.js';import {AppInfoDataPipe as r}from'./chunk-Bt5MT4Lt.js';import'./chunk-BqXMp6BU.js';import'./chunk-Bc6H0f0W.js';import'./chunk-CPjsVDVW.js';import'./chunk-D1q7uyD9.js';import'./chunk-D8hYgi6d.js';import'./chunk-BTN7XUlA.js';import'./chunk-D3xDW3Lo.js';import'./chunk-DHgtWP2F.js';import'./chunk-DmeTlgKd.js';var Te=(i=>(i.less="<",i.more=">",i.spikeUp="spike_up",i))(Te||{});var ct=(a=>(a.day="day",a.week="week",a.month="month",a.lifetime="lifetime",a))(ct||{});var _e=class n{static getDefaultAlertParams(t,e="metrics"){return {app_ids:t,metric:"revenue",countries:["WW"],stores:[5],condition:">",aggregation:"day",type:e,value:0,spike_value:"high"}}static prepareAlertParams(t){return t.type==="updates"&&(t=Ls(t,n.getDefaultAlertParams(t.app_ids))),t}static prepareAlertParamsBeforeSave(t){t.type==="updates"&&(delete t.condition,delete t.countries,delete t.metric,delete t.stores,delete t.aggregation,delete t.value,delete t.spike_value);let e=i=>
1{Object.keys(i).forEach(a=>{(i[a]===null||i[a]===void 0||i[a]==="")&&delete i[a];});};return t.type==="metrics"&&(e(t),t=Ls(t,n.getDefaultAlertParams(t.app_ids)),t.condition==="spike_up"?delete t.value:(t.value=+t.value,delete t.spike_value)),Hp(t)}};var Lt=class n{constructor(t,e,i,a){this.applicationsRequestService=t;this.resource=e;this.publisherRequestService=i;this.tagService=a;this.hasAllCountries=D(ve).getAccessSignal(E$1.mobile_all_countries);}static{this.metricOrder={revenue:0,downloads:1,featuring:2,top_free:3,top_grossing:4};}static withCountriesLockedToWorldwide(t){return t.map(e=>{let i=JSON.parse(e.params);return !i.country&&!i.countries?e:(i.country&&(i.country="WW"),i.countries&&(i.countries=["WW"]),E(D$1({},e),{params:JSON.stringify(i)}))})}static getNewAppsByPubAlerts(t){let e=t.filter(i=>i.type==="new_apps_by_pub").map(i=>({alert:i,params:JSON.parse(i.params),name:new rr$1(i.title),publishers:new rr$1([]),tempPublishers:new rr$1([]),loading:new rr$1(false),editMode:new rr$1(false)}));return n.sortAlertsByMetric(e)}static getMetricOrder(t){let e="metric"in t?t.metric:void 0;return n.metricOrder[e]}static sortAlertsByMetric(t){return t.sort((e,i)=>{let a=n.getMetricOrder(e.params)-n.getMetricOrder(i.params);return a!==0?a:e.alert.id-i.alert.id}),t}static getNewAppsByTypeAlerts(t){return t.filter(i=>i.type==="new_apps_by_type").map(i=>{let a=JSON.parse(i.params);return a.value||(a.value=0),a.tags||(a.tags=[]),{alert:i,params:a,name:new rr$1(i.title),loading:new rr$1(false),editMode:new rr$1(false),tagIds:new rr$1(a.tags),tags:[]}}).sort((i,a)=>kt.isAfter(kt.getDate(i.alert.created_at),kt.getDate(a.alert.created_at),"s")?1:-1)}static getAppMetricsUpdatesAlerts(t){return t.filter(e=>e.type==="app_metric_updates").map(e=>{let i=JSON.parse(e.params);i.country&&(i.countries=[i.country],delete i.country),i.platform&&(i.stores=[+i.platform],delete i.platform),e.params=JSON.stringify(i);let a=JSON.parse(e.params),p=_e.prepareAlertParams(a);return e.params=JSON.stringify(_e.prepareAlertParams(JSON.parse(e.params))),a.type==="metrics"&&u$1.isTopType(a.metric)&&["<",">"].includes(a.condition)&&(a.condition=a.condition==="<"?">":"<",e.params=JSON.stringify(a)),{alert:e,name:new rr$1(e.title),params:p,loading:new rr$1(false),editMode:new rr$1(false),apps:new rr$1([]),tempApps:new rr$1([])}}).sort((e,i)=>e.alert.id-i.alert.id)}static getTopAppsSpikesUpdatesAlerts(t){return t.filter(e=>e.type==="top_apps_spikes_updates").map(e=>{let i=JSON.parse(e.params);i.country&&(i.countries=[i.country],delete i.country),i.platform&&(i.stores=[+i.platform],delete i.platform),e.params=JSON.stringify(i);let a=JSON.parse(e.params);return {alert:e,params:a,name:new rr$1(e.title),loading:new rr$1(false),editMode:new rr$1(false),tags:[],tempTags:[],tagIds:new rr$1(a.tags),tempTagIds:new rr$1(a.tags)}}).sort((e,i)=>e.alert.id-i.alert.id)}static getAppsByAppIds(t,e){let i=[];return t.forEach(a=>a.applications.forEach(p=>{e.some(A=>A.store===p.store[0]&&A.store_application_id===p.store_application_id)&&!i.find(A=>A.id===a.id)&&i.push(a);})),i}static setAppsInAppMetricsUpdatesAlerts(t,e){return t.map(i=>(i.apps.next(n.getAppsByAppIds(e,i.params.app_ids)),i.tempApps.next(i.apps.getValue()),i)).filter(i=>i.apps.getValue().length>0)}static setTagsInTopAppSpikesUpdates(t,e){return t.forEach(i=>{let a=i.tagIds.getValue().map(p=>be.getTag(p,e)).filter(p=>!!p);i.tags=a||[],i.tempTags=i.tags;}),t}static setTagsInTNewAppByType(t,e){return t.forEach(i=>{let a=i.tagIds.getValue().map(p=>be.getTag(p,e)).filter(p=>!!p);i.tags=a||[];}),t}setPublishersInNewAppsByPubAlerts(t,e){return t.forEach(i=>{let a=[];e.forEach(p=>{!a.some(v=>v.id===p.id)&&i.params.publisher_ids.some(v=>p.publisherIds.some(A=>A.store_publisher_id===v.store_publisher_id&&A.store===v.store))&&a.push(p);}),a.forEach(p=>{p.publisherPageLink=d$1.getPublisherPageLink(p.publisherIds[0],p.name);}),i.publishers=new rr$1(a),i.tempPublishers=new rr$1(a);}),t}getPublishers(t){let e={};t.forEach(a=>{a.params.publisher_ids.forEach(p=>{let v=`${p.store}_${p.store_publisher_id}`;e[v]||(e[v]=p);});});let i=Object.values(e);return i.length===0?Ms([]):this.publisherRequestService.searchByIds(i)}getApps(t){let e={};t.forEach(a=>{a.params.app_ids.forEach(p=>{let v=`${p.store}_${p.store_application_id}`;e[v]||(e[v]=p);});});let i=Object.values(e);return i.length===0?Ms([]):this.applicationsRequestService.searchByIds({ids:i})}getTags(){return this.tagService.getTagData()}getAlerts(){let t={newAppsByTypeAlerts:[],newAppsByPubAlerts:[],appMetricsUpdatesAlerts:[],topAppsSpikesUpdatesAlerts:[],total:0};return this.resource.getAlerts().pipe(Ru(e=>{let i=this.hasAllCountries()?e:n.withCountriesLockedToWorldwide(e);return t.appMetricsUpdatesAlerts=n.getAppMetricsUpdatesAlerts(i),t.newAppsByTypeAlerts=n.getNewAppsByTypeAlerts(i),t.newAppsByPubAlerts=n.getNewAppsByPubAlerts(i),t.topAppsSpikesUpdatesAlerts=n.getTopAppsSpikesUpdatesAlerts(i),t.total=i.length,qm([this.getApps(t.appMetricsUpdatesAlerts),this.getPublishers(t.newAppsByPubAlerts),this.getTags()])}),ge$1(([e,i])=>{let a=this.tagService.tags.getValue();return t.appMetricsUpdatesAlerts=n.setAppsInAppMetricsUpdatesAlerts(t.appMetricsUpdatesAlerts,e),t.newAppsByPubAlerts=this.setPublishersInNewAppsByPubAlerts(t.newAppsByPubAlerts,i),t.topAppsSpikesUpdatesAlerts=n.setTagsInTopAppSpikesUpdates(t.topAppsSpikesUpdatesAlerts,a),t.newAppsByTypeAlerts=n.setTagsInTNewAppByType(t.newAppsByTypeAlerts,a),t}))}getAppById(t){return t?this.applicationsRequestService.searchByIds({ids:m$3.getAppIdsFromStoreIds([t])}).pipe(ge$1(e=>e[0])):Ms(null)}getPubById(t){return t?this.publisherRequestService.searchByIds(F$2.getPublisherId(t)).pipe(ge$1(e=>{let i=e[0];return i.publisherPageLink=d$1.getPublisherPageLink(i.publisherIds[0],i.name),i})):Ms(null)}static{this.\u0275fac=function(e){return new(e||n)(me(h),me(a),me(we$1),me(R))};}static{this.\u0275prov=G({token:n,factory:n.\u0275fac,providedIn:"root"});}};var ze=class n{constructor(t,e,i,a,p,v){this.requestService=t;this.appTrackerResource=e;this.metaService=i;this.learningService=a;this.route=p;this.router=v;this.openAlertById=new rr$1(null);this.appMetricsUpdatesAlerts=new rr$1([]);this.topAppsSpikesUpdatesAlerts=new rr$1([]);this.newAppsByTypeAlerts=new rr$1([]);this.newAppsByPubAlerts=new rr$1([]);this.filter=new rr$1("app_metric_updates");this.loading=new rr$1(false);this.maxAlerts=new rr$1(false);this.allTags=new rr$1([]);this.appFromParam=new rr$1(null);this.pubFromParam=new rr$1(null);this.typeFromParam=new rr$1("metrics");this.subscriptions=new W;this.titleMap={app_metric_updates:"appTracker.app_metrics_updates_title",top_apps_spikes_updates:"appTracker.top_apps_spikes_updates_title",new_apps_by_type:"appTracker.new_apps_by_type_title",new_apps_by_pub:"appTracker.new_apps_by_pub_title"};let A=true;this.loading.next(true),this.subscriptions.add(v.events.pipe(Tn(S=>S instanceof P)).subscribe(()=>{this.learningService.showTip(21);})),this.subscriptions.add(qm([this.requestService.getAlerts(),this.route.queryParams.pipe(Mu(),Ru(S=>this.requestService.getAppById(S.appId))),this.route.queryParams.pipe(Mu(),Ru(S=>this.requestService.getPubById(S.pubId)))]).subscribe(([S,z,We])=>{this.appMetricsUpdatesAlerts.next(S.appMetricsUpdatesAlerts);
1let pe=this.route.snapshot.queryParamMap.get("type");pe&&pe in m&&this.typeFromParam.next(pe),this.appFromParam.next(A?z:null),this.newAppsByPubAlerts.next(S.newAppsByPubAlerts),this.pubFromParam.next(A?We:null),this.topAppsSpikesUpdatesAlerts.next(S.topAppsSpikesUpdatesAlerts),this.newAppsByTypeAlerts.next(S.newAppsByTypeAlerts),this.total=S.total,this.updateMaxAlert(),this.loading.next(false);let ye=this.router.url;if(A){A=false;let fe=this.route.snapshot.paramMap.get("id"),Ke=this.route.snapshot.paramMap.get("filter"),Qe=n.urlAlertTypes[this.getAlertTypeByIdUpdateEditMode(+fe)]||Ke,se=[n.UrlNotifications];Qe&&se.push(Qe),this.router.navigate(se);return}this.updateByUrlParams(ye);}));let T=true;this.subscriptions.add(this.route.paramMap.subscribe(S=>{if(this.router.url===`/${n.UrlNotifications}`){this.router.navigate([n.UrlNotifications,n.urlAlertTypes.app_metric_updates]);return}this.updateByUrlParams(this.router.url,!T),T=false;}));}static{this.UrlNotifications=t;}static{this.urlAlertTypes=o;}static getAlertIdAndTypeFormUrl(t){let e=t.split("?")[0].split("/");return {id:e.length===4?+e[3]:null,type:e[2]}}ngOnDestroy(){this.subscriptions.unsubscribe();}updateByUrlParams(t,e=true){let i=n.getAlertIdAndTypeFormUrl(t),a=t$1(n.urlAlertTypes).find(T=>n.urlAlertTypes[T]===i.type),p=this.getAlertTypeByIdUpdateEditMode(i.id),v=p||a;(this.filter.getValue()!==a||p!==a)&&v!==this.filter.getValue()&&this.filter.next(v||"app_metric_updates");let A=v?this.titleMap[v]:"appTracker.meta_title_app_tracker";this.metaService.update({title:A}),e&&this.openAlertById.getValue()!==i.id&&this.openAlert(i.id);}getAlertTypeByIdUpdateEditMode(t){let e=this.appMetricsUpdatesAlerts.getValue().find(v=>v.alert.id===t);if(e)return e.editMode.next(true),"app_metric_updates";let i=this.topAppsSpikesUpdatesAlerts.getValue().find(v=>v.alert.id===t);if(i)return i.editMode.next(true),"top_apps_spikes_updates";let a=this.newAppsByPubAlerts.getValue().find(v=>v.alert.id===t);if(a)return a.editMode.next(true),"new_apps_by_pub";let p=this.newAppsByTypeAlerts.getValue().find(v=>v.alert.id===t);return p?(p.editMode.next(true),"new_apps_by_type"):null}setUrlAlertId(t,e){let i=n.urlAlertTypes[e],a=this.getAlertTypeByIdUpdateEditMode(t),p=["notifications"];i&&(p.push(i),a&&p.push(`${t}`)),this.router.navigate(p);}resetUrlAlertId(){let t=n.urlAlertTypes[this.filter.getValue()];this.openAlertById.next(null);let e=["notifications"];t&&e.push(t),this.router.navigate(e);}openAlert(t){if(!this.getAlertTypeByIdUpdateEditMode(t)){this.resetUrlAlertId();return}this.openAlertById.next(t);}deleteAlertById(t){t&&this.appTrackerResource.deleteAlert(t).pipe(Mu()).subscribe(),this.total-=1,this.updateMaxAlert();}updateAlert(t){let e=Hp(t.alert);"condition"in t.params&&t.params.condition,t.loading.next(true),this.appTrackerResource.updateAlert(t.alert.id,e).pipe(Mu()).subscribe(()=>{t.loading.next(false);},()=>{t.loading.next(false);});}createAlert(t){this.appTrackerResource.createAlert(t.alert).pipe(Mu()).subscribe(e=>{t.alert=e,t.loading.next(false);},()=>{t.loading.next(false),this.total-=1,this.updateMaxAlert();}),this.total+=1,this.updateMaxAlert();}updateMaxAlert(){this.maxAlerts.next(this.total>=200);}static{this.\u0275fac=function(e){return new(e||n)(me(Lt),me(a),me(p),me(f$1),me(W$1),me(F))};}static{this.\u0275prov=G({token:n,factory:n.\u0275fac});}};var mt=n=>({analyticEvents:{onOpen:t=>{n("app_tracker_country_selector_open",t);},closeApply:t=>{n("app_tracker_country_selector_change",t);},onSearch:t=>{n("app_tracker_country_selector_on_search",t);},closeBackdrop:t=>{n("app_tracker_country_selector_close_backdrop",t);},closeEsc:t=>{n("app_tracker_country_selector_close_esc",t);},closeCancel:t=>{n("app_tracker_country_selector_close_cancel",t);}},customSettings:{}});var dt=n=>({values:[{name:"appTracker.day",value:"day"},{name:"appTracker.week",value:"week"},{name:"appTracker.month",value:"month"}],valuesForLifetime:[{name:"appTracker.day",value:"day"},{name:"appTracker.week",value:"week"},{name:"appTracker.month",value:"month"},{name:"screen.lifetime",value:"lifetime"}],analyticEvents:{onOpen:t=>{n("app_tracker_aggregation_select_open",t);},closeEsc:t=>{n("app_tracker_aggregation_select_close_esc",t);},closeBackdrop:t=>{n("app_tracker_aggregation_select_close_backdrop",t);},closeApply:t=>{n("app_tracker_aggregation_select_change",t);},closeCancel:t=>{n("app_tracker_aggregation_select_close_cancel",t);}},customSettings:{}});var ui=n=>({values:[{value:"5",name:"appTracker.top_5"},{value:"10",name:"appTracker.top_10"},{value:"20",name:"appTracker.top_20"},{value:"50",name:"appTracker.top_50"},{value:"100",name:"appTracker.top_100"},{value:"1000",name:"appTracker.top_1000"}],analyticEvents:{onOpen:t=>{n("app_tracker_top_apps_count_select_open",t);},closeEsc:t=>{n("app_tracker_top_apps_count_select_close_esc",t);},closeBackdrop:t=>{n("app_tracker_top_apps_count_select_close_backdrop",t);},closeApply:t=>{n("app_tracker_top_apps_count_select_change",t);},closeCancel:t=>{n("app_tracker_top_apps_count_select_close_cancel",t);}},customSettings:{panelTitle:"appTracker.select_top_apps_count"}}
1);var Rt=n=>({values:[{name:"appTracker.spike_up_high",value:"high"},{name:"appTracker.spike_up_medium",value:"medium"},{name:"appTracker.spike_up_low",value:"low"}],analyticEvents:{onOpen:t=>{n("app_tracker_spike_up_select_open",t);},closeEsc:t=>{n("app_tracker_spike_up_select_close_esc",t);},closeBackdrop:t=>{n("app_tracker_spike_up_select_close_backdrop",t);},closeApply:t=>{n("app_tracker_spike_up_select_change",t);},closeCancel:t=>{n("app_tracker_spike_up_select_close_cancel",t);}},customSettings:{panelTitle:"appTracker.value"}});var gt=n=>({values:[{name:"appList.revenue",value:"revenue"},{name:"appList.downloads",value:"downloads"},{name:"appList.featuring",value:"featuring"},{name:"appTracker.top_free",value:"top_free"},{name:"appTracker.top_grossing",value:"top_grossing"}],no_top_values:[{name:"appList.revenue",value:"revenue"},{name:"appList.downloads",value:"downloads"},{name:"appList.featuring",value:"featuring"}],analyticEvents:{onOpen:t=>{n("app_tracker_metric_select_open",t);},closeEsc:t=>{n("app_tracker_metric_select_close_esc",t);},closeBackdrop:t=>{n("app_tracker_metric_select_close_backdrop",t);},closeApply:t=>{n("app_tracker_metric_select_change",t);},closeCancel:t=>{n("app_tracker_metric_select_close_cancel",t);}},customSettings:{panelTitle:"selectors.type_select_panel_title"}});var _t=n=>({values:e$1.getValues(),multiAnalyticEvents:{onOpen:t=>{n("app_tracker_platform_select_open",t);},onChange:t=>{n("app_tracker_platform_select_change",t);},closeBackdrop:t=>{n("app_tracker_platform_select_close_backdrop",t);},closeEsc:t=>{n("app_tracker_platform_select_close_esc",t);},closeApply:t=>{n("app_tracker_platform_select_apply",t);},closeCancel:t=>{n("app_tracker_platform_select_close_cancel",t);},tooltipText:"stores_selector_multiple_show_help_tooltip"},customSettings:{selectName:"selectors.store_select_name",panelTitle:"selectors.store_select_panel_title",panelTooltipText:"selectors.store_select_tooltip_text"}});var ut=(e=>(e.updates="updates",e.spikeUp="spike_up",e))(ut||{});var Si=n=>({"test-disabled":n}),Oi=n=>({disabled:n});function Ti(n,t){if(n&1){let e=DT();Zi$1(0,"am-checkbox",5),bb(1,"async"),_g("onChange",function(){Rd(e);let a=NT();return kd(a.clickSlack())}),kl(),Zi$1(2,"span",14),ib(3),bb(4,"translate"),kl();}if(n&2){let e=NT();Ig("size",24)("value",_b(1,3,e.slackActive)),AE(3),Ug(_b(4,5,"appTracker.slack"));}}function Ei(n,t){n&1&&Eg(0,"spinner",3),n&2&&Ig("diameter",21);}function Bi(n,t){n&1&&(Zi$1(0,"div",8),ib(1),bb(2,"translate"),kl()),n&2&&(AE(),Ug(_b(2,1,"account.email_invalid")));}function Di(n,t){n&1&&Eg(0,"spinner",3),n&2&&Ig("diameter",14);}function Vi(n,t){n&1&&(Zi$1(0,"span"),ib(1),bb(2,"translate"),kl()),n&2&&(AE(),Ug(_b(2,1,"appTracker.how_does_it_look")));}function Ui(n,t){if(n&1&&(Zi$1(0,"span"),ib(1),bb(2,"async"),bb(3,"translate"),kl()),n&2){let e=NT(2);AE(),Ug(_b(3,3,_b(2,1,e.label)));}}function Ii(n,t){if(n&1){let e=DT();Eg(0,"i",15),uT(1,Vi,3,3,"span"),bb(2,"async"),uT(3,Ui,4,5,"span"),bb(4,"async"),Zi$1(5,"span",16),_g("click",function(){Rd(e);let a=NT();return kd(a.sendTest.emit())}),ib(6),bb(7,"async"),bb(8,"translate"),kl();}if(n&2){let e=NT();AE(),dT(_b(2,3,e.label)?-1:1),AE(2),dT(_b(4,5,e.label)?3:-1),AE(3),jl(" ",_b(8,9,_b(7,7,e.label)?"appTracker.try_again":"appTracker.send_demo_notification")," ");}}var we=class n$1{constructor(){this.loading=new rr$1(false);this.slackActive=new rr$1(false);this.slackUrlLoading=new rr$1(false);this.emailActive=new rr$1(false);this.email=new rr$1("");this.slackUrl=new rr$1("");this.label=new rr$1("");this.needSave=new rr$1(false);this.saveLabel="appTracker.save_alert_settings";this.addLabel="appTracker.add_set";this.apply=new tt;this.cancel=new tt;this.delete=new tt;this.updateSlackStatus=new tt;this.updateEmailStatus=new tt;
1this.sendTest=new tt;this.subscription=new W;this.emailPattern=n.getEmail();}static emailValidator(t){return t.parent&&t.parent.value.toggleEmail?t.value?ce.pattern(n.getEmail())(t):ce.required(t):null}ngOnInit(){this.initForm();}ngOnDestroy(){this.subscription.unsubscribe();}initForm(){this.form=new T({email:new N(this.email.getValue(),{nonNullable:true,validators:[n$1.emailValidator,ce.pattern(this.emailPattern)]})}),this.subscription.add(this.form.controls.email.valueChanges.subscribe(t=>{this.email.next(t);})),this.form.controls.email.updateValueAndValidity();}clickSlack(){this.updateSlackStatus.emit(),this.form.controls.email.updateValueAndValidity();}clickEmail(){this.updateEmailStatus.emit(),this.form.controls.email.updateValueAndValidity();}update(){this.form.valid&&this.needSave&&this.apply.emit();}static{this.\u0275fac=function(e){return new(e||n$1)};}static{this.\u0275cmp=sw({type:n$1,selectors:[["alert-footer"]],inputs:{loading:"loading",slackActive:"slackActive",slackUrlLoading:"slackUrlLoading",emailActive:"emailActive",email:"email",slackUrl:"slackUrl",label:"label",isNewAlert:"isNewAlert",needSave:"needSave",saveLabel:"saveLabel",addLabel:"addLabel"},outputs:{apply:"apply",cancel:"cancel",delete:"delete",updateSlackStatus:"updateSlackStatus",updateEmailStatus:"updateEmailStatus",sendTest:"sendTest"},decls:35,vars:44,consts:[[3,"formGroup"],[1,"checkboxes-container"],[1,"slack-checkbox"],[3,"diameter"],[1,"email-checkbox"],[1,"checkbox",3,"onChange","size","value"],[1,"email-input"],["type","text","autocomplete","off","formControlName","email",1,"g-search-input",3,"inputAnalyticEvent","placeholder"],[1,"g-search-input-error"],[1,"test-notifications",3,"ngClass"],[1,"buttons-container"],[1,"g-btn-cancel","btn-cancel",3,"click"],[1,"g-btn-select","btn-select",3,"click","hotkey-click","ngClass"],[1,"delete",3,"click"],[1,"checkbox-text"],[1,"icon-visibility"],[1,"test-send-btn",3,"click"]],template:function(e,i){e&1&&(Zi$1(0,"header"),ib(1),bb(2,"translate"),kl(),Zi$1(3,"form",0)(4,"div",1)(5,"div",2),uT(6,Ti,5,7),bb(7,"async"),uT(8,Ei,1,1,"spinner",3),bb(9,"async"),kl(),Zi$1(10,"div",4)(11,"am-checkbox",5),bb(12,"async"),_g("onChange",function(){return i.clickEmail()}),kl(),Zi$1(13,"div",6),Eg(14,"input",7),bb(15,"translate"),vD(),uT(16,Bi,3,3,"div",8),kl()()()(),Zi$1(17,"footer")(18,"div",9),bb(19,"async"),bb(20,"async"),uT(21,Di,1,1,"spinner",3),bb(22,"async"),uT(23,Ii,9,11),bb(24,"async"),kl(),Zi$1(25,"div",10)(26,"div",11),_g("click",function(){return i.cancel.emit()}),ib(27),bb(28,"translate"),kl(),Zi$1(29,"div",12),bb(30,"async"),_g("click",function(){return i.update()}),Zi$1(31,"span"),ib(32),bb(33,"translate"),kl()(),Zi$1(34,"div",13),_g("click",function(){return i.delete.emit()}),kl()()()),e&2&&(AE(),Ug(_b(2,16,"appTracker.send_alert_via")),AE(2),Ig("formGroup",i.form),AE(3),dT(_b(7,18,i.slackUrlLoading)?-1:6),AE(2),dT(_b(9,20,i.slackUrlLoading)?8:-1),AE(3),Ig("size",24)("value",_b(12,22,i.emailActive)),AE(3),Ig("inputAnalyticEvent","app_tracker_alert_email_enter")("placeholder",_b(15,24,"account.email")),ED(),AE(2),dT(i.form.controls.email?.errors?.pattern?16:-1),AE(2),Ig("ngClass",Ib(40,Si,!(i.form?.valid&&(_b(19,26,i.slackActive)||_b(20,28,i.emailActive))))),AE(3),dT(_b(22,30,i.loading)?21:-1),AE(2),dT(_b(24,32,i.loading)?-1:23),AE(4),Ug(_b(28,34,"buttons.cancel")),AE(2),Ig("hotkey-click",13)("ngClass",Ib(42,Oi,!_b(30,36,i.needSave)||!i.form.valid)),AE(3),Ug(_b(33,38,i.isNewAlert?i.addLabel:i.saveLabel)));},dependencies:[An,un,fe,s$1,Qt$1,In,wn,We,bn,An$1,en$1,Jt$1,P$1,o$1,b,hn,he],styles:["[_ngcontent-%COMP%]:root{--white: #fff;--black: #000;--static-white: #fff;--static-black: #000;--grey-20: #F9F9FA;--grey-30: #E9EDEF;--grey-40: #DADFE1;--static-grey-40: #DADFE1;--grey-50: #A7B2B9;--static-grey-50: #A7B2B9;--grey-70: #506775;--grey-80: #475156;--static-grey-80: #475156;--grey-90: #3F3F46;--grey-100: #273238;--red-30: #FDEAEA;--red-40: #FF7485;--red-50: #FA354D;--yellow-30: #FFF8CF;--yellow-40: #FCE778;--yellow-50: #FEDA0F;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #E6FEE6;--green-40: #D4FABE;--green-50: #99F199;--green-70: #34C834;--green-90: #26A542;--blue-30: #EAF2FD;--blue-35: #4CE5FF;--blue-40: #D8E8FF;--blue-50: #B5D4FF;--blue-60: #6BB6FC;--blue-70: #2B98FC;--blue-70-rgb: 38, 104, 232;--blue-80: #2668E8;--blue-90: #1A54C3;--violete-20: #FAEDFF;--violete-30: #F5D9FF;--violete-60: #B259D2;--violete-80: #7B0EA2;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .15);--chart-grid-weekend-color: #F2f5f7;--cell-heat-blue-rgb: 189, 212, 255;--cell-heat-orange-rgb: 254, 217, 161;--cell-heat-green-primary-rgb: 184, 229, 125;--cell-heat-green-secondary-rgb: 139, 238, 179;--cell-heat-violet-rgb: 212, 186, 255;--cell-heat-red-rgb: 255, 135, 153}[_ngcontent-%COMP%]:root[theme=dark]{--white: #0E1113;--black: #C5C7CC;--static-white: #F2F3F5;--grey-20: #12171A;--grey-30: #1A2024;--grey-40: #1c2228;--grey-50: #2a333b;--grey-70: #5f6a72;--grey-80: #8a949b;--grey-90: #b0b6bb;--grey-100: #1b1f23;--red-30: #3A151A;--red-40: #FF6B7C;--red-50: #FF3B52;--yellow-30: #3A320F;--yellow-40: #EAD25F;--yellow-50: #FFD400;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #133A1E;--green-40: #1E5A2E;--green-50: #2E6E2E;--green-70: #34C834;--green-90: #26A542;--blue-30: #0F1C2E;--blue-35: #4CE5FF;--blue-40: #162A44;--blue-50: #1F3B66;--blue-60: #3D7DDC;--blue-70: #4B9BFF;--blue-70-rgb: 75, 155, 255;--blue-80: #5C8DFF;--blue-90: #8CB2FF;--violete-20: #2A1633;--violete-30: #3A1E4A;--violete-60: #B259D2;--violete-80: #D38CFF;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .25);--chart-grid-weekend-color: #191F23;
1--cell-heat-blue-rgb: 31, 59, 102;--cell-heat-orange-rgb: 92, 58, 18;--cell-heat-green-primary-rgb: 30, 90, 46;--cell-heat-green-secondary-rgb: 22, 84, 58;--cell-heat-violet-rgb: 58, 30, 74;--cell-heat-red-rgb: 90, 28, 37}.no-value[_ngcontent-%COMP%]{color:var(--text-muted)}.chart-hidden[_ngcontent-%COMP%]{margin-bottom:16px}[_nghost-%COMP%]{display:block}[_nghost-%COMP%] .email-input[_ngcontent-%COMP%]{position:relative;width:100%}[_nghost-%COMP%] .checkbox-text[_ngcontent-%COMP%]{font-size:16px;line-height:18px}[_nghost-%COMP%] header[_ngcontent-%COMP%]{font-size:16px;line-height:18px;font-weight:500;margin:0 0 12px}[_nghost-%COMP%] .btn-cancel[_ngcontent-%COMP%]{padding:8px 16px!important;background-color:var(--white)!important}[_nghost-%COMP%] .btn-select[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[_nghost-%COMP%] form[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-end;flex-shrink:0;flex-grow:1;padding-bottom:24px;border-bottom:1px solid var(--grey-40);margin-bottom:16px}[_nghost-%COMP%] form[_ngcontent-%COMP%] .checkboxes-container[_ngcontent-%COMP%]{width:100%}[_nghost-%COMP%] form[_ngcontent-%COMP%] .slack-checkbox[_ngcontent-%COMP%]{display:flex;align-items:center}[_nghost-%COMP%] form[_ngcontent-%COMP%] .email-checkbox[_ngcontent-%COMP%]{display:flex;align-items:center;margin-top:12px}[_nghost-%COMP%] form[_ngcontent-%COMP%] .email-checkbox[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:auto}@media(max-width:576px){[_nghost-%COMP%] form[_ngcontent-%COMP%] .email-checkbox[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%}}[_nghost-%COMP%] footer[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:100%}@media(max-width:767px){[_nghost-%COMP%] footer[_ngcontent-%COMP%]{flex-direction:column}}[_nghost-%COMP%] footer[_ngcontent-%COMP%] .buttons-container[_ngcontent-%COMP%]{display:flex;align-items:center;max-width:100%}@media(max-width:767px){[_nghost-%COMP%] footer[_ngcontent-%COMP%] .buttons-container[_ngcontent-%COMP%]{margin-left:auto;margin-top:16px}}[_nghost-%COMP%] footer[_ngcontent-%COMP%] .buttons-container[_ngcontent-%COMP%] .add-btn[_ngcontent-%COMP%]{margin-left:10px}@media(max-width:576px){[_nghost-%COMP%] footer[_ngcontent-%COMP%] .buttons-container[_ngcontent-%COMP%] .add-btn[_ngcontent-%COMP%]{margin-left:0}}[_nghost-%COMP%] footer[_ngcontent-%COMP%] .test-notifications[_ngcontent-%COMP%]{line-height:17px;display:flex;flex-shrink:0;align-items:center}[_nghost-%COMP%] footer[_ngcontent-%COMP%] .test-notifications.test-disabled[_ngcontent-%COMP%]{opacity:.4;cursor:default;pointer-events:none}[_nghost-%COMP%] footer[_ngcontent-%COMP%] .test-notifications[_ngcontent-%COMP%] .icon-visibility[_ngcontent-%COMP%]{background:url(/assets/angular2/img/icons/eye-grey-70.svg) no-repeat 0;background-size:contain;width:24px;height:24px;margin-right:8px}[_nghost-%COMP%] footer[_ngcontent-%COMP%] .test-notifications[_ngcontent-%COMP%] spinner[_ngcontent-%COMP%]{height:17px;display:inline-block;margin-right:10px}[_nghost-%COMP%] footer[_ngcontent-%COMP%] .test-notifications[_ngcontent-%COMP%] .test-send-btn[_ngcontent-%COMP%]{margin-left:5px;font-weight:500;cursor:pointer;z-index:1;color:var(--blue-80)}@media(hover:hover)and (pointer:fine){[_nghost-%COMP%] footer[_ngcontent-%COMP%] .test-notifications[_ngcontent-%COMP%] .test-send-btn[_ngcontent-%COMP%]:hover{color:var(--blue-90)}}[_nghost-%COMP%] footer[_ngcontent-%COMP%] .test-notifications[_ngcontent-%COMP%] .test-send-btn.disabled[_ngcontent-%COMP%]{color:var(--grey-50);pointer-events:none}[_nghost-%COMP%] .delete[_ngcontent-%COMP%]{background:url(/assets/angular2/img/icons/trash-grey-70.svg) no-repeat 0;width:24px;height:24px;cursor:pointer;background-size:contain;margin-left:16px}"]});}};var K=class n{constructor(t,e,i){this.appTrackerResource=t;this.authService=e;this.analyticsService=i;this.slackUrlLoading=new rr$1(false);this.loading=new rr$1(false);this.label=new rr$1("");this.isFooterChanged=new rr$1(false);this.subscription=new W;}static fixAlertCondition(t){let e=JSON.parse(t.params);if(["<",">"].includes(e.condition)){let i=e.condition==="<"?">":"<";e.condition=u$1.isTopType(e.metric)?i:e.condition,t.params=JSON.stringify(e);}return t}init(t){this.subscription=new W,this.slackUrl=new rr$1(t.slack_url),this.slackActive=new rr$1(t.slack_active),this.emailActive=new rr$1(t.email_active),this.email=new rr$1(t.email),this.subscription.add(this.slackActive.pipe(Nu(1),Tn(e=>!!e)).subscribe(()=>{this.slackUrl.next(""),this.slackUrlLoading.next(true),this.authService.login("slack").pipe(Mu(),bu(()=>this.slackUrlLoading.next(false))).subscribe(e=>this.slackUrl.next(e.incoming_webhook.url),()=>this.slackActive.next(false));})),this.subscription.add(qm([this.emailActive,this.email,this.slackActive,this.slackUrlLoading]).subscribe(()=>{let e=t.email!==this.email.getValue(),i=t.email_active!==this.emailActive.getValue(),a=t.slack_active!==this.slackActive.getValue(),p=this.isSlackOrEmailUsed(),v=e||i||a;this.isFooterChanged.next(v&&!this.slackUrlLoading.getValue()&&p);}));}isSlackOrEmailUsed(){return !!(this.emailActive.getValue()&&this.email.getValue()||this.slackActive.getValue())}sendNotify(t,e){this.loading.next(true);let i=this.prepareAlert(Hp(t),e);this.appTrackerResource.testAlert(i.alert).subscribe(()=>{this.label.next("appTracker.demo_notification_sent"),this.loading.next(false);},()=>{this.label.next("appTracker.send_test_reject"),this.loading.next(false);}),this.analyticsService.send("app_tracker_alert_send_notify");}destroy(){this.label.next(""),this.subscription.unsubscribe();}toggleSlack(){let t=this.slackActive.getValue();this.slackActive.next(!t),this.analyticsService.send("app_tracker_alert_toggle_notification",["slack",`${!t}`]);}toggleEmail(){let t=this.emailActive.getValue();this.emailActive.next(!t),this.analyticsService.send("app_tracker_alert_toggle_notification",["email",`${!t}`]);}prepareAlert(t,e){return "condition"in e&&e.condition&&n.fixAlertCondition(t.alert),t.params=e,t.alert.params=JSON.stringify(e),t.alert.email=this.email.getValue(),t.alert.slack_active=this.slackActive.getValue(),t.alert.slack_url=this.slackUrl.getValue(),t.alert.email_active=this.emailActive.getValue(),t}static{this.\u0275fac=function(e){return new(e||n)(me(a),me(R$1),me(L))};}static{this.\u0275prov=G({token:n,factory:n.\u0275fac});}};var Ct=class n{static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275cmp=sw({type:n,selectors:[["notifications-multi-countries-note"]],decls:9,vars:6,consts:[["width","24","height","24","viewBox","0 0 24 24","fill","none","xmlns","http://www.w3.org/2000/svg"],["d","M13 16.5H12V11.5H11M12 8H12.01M21 12C2
11 13.1819 20.7672 14.3522 20.3149 15.4442C19.8626 16.5361 19.1997 17.5282 18.364 18.364C17.5282 19.1997 16.5361 19.8626 15.4442 20.3149C14.3522 20.7672 13.1819 21 12 21C10.8181 21 9.64778 20.7672 8.55585 20.3149C7.46392 19.8626 6.47177 19.1997 5.63604 18.364C4.80031 17.5282 4.13738 16.5361 3.68508 15.4442C3.23279 14.3522 3 13.1819 3 12C3 9.61305 3.94821 7.32387 5.63604 5.63604C7.32387 3.94821 9.61305 3 12 3C14.3869 3 16.6761 3.94821 18.364 5.63604C20.0518 7.32387 21 9.61305 21 12Z","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"hover-stroke"],[1,"note"]],template:function(e,i){e&1&&(qd(),Ol(0,"svg",0),Dg(1,"path",1),Ll(),Wd(),Ol(2,"div",2)(3,"span"),ib(4),bb(5,"translate"),Ll(),Ol(6,"span"),ib(7),bb(8,"translate"),Ll()()),e&2&&(AE(4),Ug(_b(5,2,"appTracker.multi_countries_note_1")),AE(3),Ug(_b(8,4,"appTracker.multi_countries_note_2")));},dependencies:[fe,he],styles:["[_ngcontent-%COMP%]:root{--white: #fff;--black: #000;--static-white: #fff;--static-black: #000;--grey-20: #F9F9FA;--grey-30: #E9EDEF;--grey-40: #DADFE1;--static-grey-40: #DADFE1;--grey-50: #A7B2B9;--static-grey-50: #A7B2B9;--grey-70: #506775;--grey-80: #475156;--static-grey-80: #475156;--grey-90: #3F3F46;--grey-100: #273238;--red-30: #FDEAEA;--red-40: #FF7485;--red-50: #FA354D;--yellow-30: #FFF8CF;--yellow-40: #FCE778;--yellow-50: #FEDA0F;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #E6FEE6;--green-40: #D4FABE;--green-50: #99F199;--green-70: #34C834;--green-90: #26A542;--blue-30: #EAF2FD;--blue-35: #4CE5FF;--blue-40: #D8E8FF;--blue-50: #B5D4FF;--blue-60: #6BB6FC;--blue-70: #2B98FC;--blue-70-rgb: 38, 104, 232;--blue-80: #2668E8;--blue-90: #1A54C3;--violete-20: #FAEDFF;--violete-30: #F5D9FF;--violete-60: #B259D2;--violete-80: #7B0EA2;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .15);--chart-grid-weekend-color: #F2f5f7;--cell-heat-blue-rgb: 189, 212, 255;--cell-heat-orange-rgb: 254, 217, 161;--cell-heat-green-primary-rgb: 184, 229, 125;--cell-heat-green-secondary-rgb: 139, 238, 179;--cell-heat-violet-rgb: 212, 186, 255;--cell-heat-red-rgb: 255, 135, 153}[_ngcontent-%COMP%]:root[theme=dark]{--white: #0E1113;--black: #C5C7CC;--static-white: #F2F3F5;--grey-20: #12171A;--grey-30: #1A2024;--grey-40: #1c2228;--grey-50: #2a333b;--grey-70: #5f6a72;--grey-80: #8a949b;--grey-90: #b0b6bb;--grey-100: #1b1f23;--red-30: #3A151A;--red-40: #FF6B7C;--red-50: #FF3B52;--yellow-30: #3A320F;--yellow-40: #EAD25F;--yellow-50: #FFD400;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #133A1E;--green-40: #1E5A2E;--green-50: #2E6E2E;--green-70: #34C834;--green-90: #26A542;--blue-30: #0F1C2E;--blue-35: #4CE5FF;--blue-40: #162A44;--blue-50: #1F3B66;--blue-60: #3D7DDC;--blue-70: #4B9BFF;--blue-70-rgb: 75, 155, 255;--blue-80: #5C8DFF;--blue-90: #8CB2FF;--violete-20: #2A1633;--violete-30: #3A1E4A;--violete-60: #B259D2;--violete-80: #D38CFF;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .25);--chart-grid-weekend-color: #191F23;
1--cell-heat-blue-rgb: 31, 59, 102;--cell-heat-orange-rgb: 92, 58, 18;--cell-heat-green-primary-rgb: 30, 90, 46;--cell-heat-green-secondary-rgb: 22, 84, 58;--cell-heat-violet-rgb: 58, 30, 74;--cell-heat-red-rgb: 90, 28, 37}.no-value[_ngcontent-%COMP%]{color:var(--text-muted)}.chart-hidden[_ngcontent-%COMP%]{margin-bottom:16px}[_nghost-%COMP%]{display:flex;border-radius:8px;padding:8px;border:1px solid var(--grey-40);width:fit-content}[_nghost-%COMP%] .hover-stroke[_ngcontent-%COMP%]{stroke:#506775}[_nghost-%COMP%] svg[_ngcontent-%COMP%]{margin-right:12px;min-width:24px}[_nghost-%COMP%] .note[_ngcontent-%COMP%]{color:var(--grey-70);font-size:14px;font-weight:400;line-height:20px;margin-bottom:4px}[_nghost-%COMP%] .note[_ngcontent-%COMP%]:last-child{margin-bottom:0}"]});}};var $=class{static{this.maxAlertsCount=200;}static getTierGroupForAlert(t,e){return t.map(i=>i===[...e.W1??[]].sort().join("-")?"W1":i===[...e.E1??[]].sort().join("-")?"E1":i)}static getTierGroupForSelector(t,e){return t.map(i=>i==="W1"?[...e.W1??[]].sort().join("-"):i==="E1"?[...e.E1??[]].sort().join("-"):i)}static getAppIdsByUnitedApps(t,e=[]){let i=t.filter(a=>a.store_application_ids.some(p=>e.some(v=>v.store_application_id===p)));return e.length>0&&Tu(i.map(a=>a.id),t.map(a=>a.id))?e:t.map(a=>({store:a.applications[0].store[0],store_application_id:a.applications[0].store_application_id})).sort((a,p)=>a.store_application_id>p.store_application_id?1:a.store_application_id<p.store_application_id?-1:0)}static getPubIdsByUnitedPubs(t){return t.map(e=>({store:e.publisherIds[0].store,store_publisher_id:e.publisherIds[0].store_publisher_id})).sort((e,i)=>e.store_publisher_id>i.store_publisher_id?1:e.store_publisher_id<i.store_publisher_id?-1:0)}static getDefaultAlert(t,e,i,a){let p=t?t.email:i;return {alert:{type:a,params:JSON.stringify(e),email:p,active:true,id:0,slack_active:t?t.slack_active:false,slack_url:t?t.slack_url:"",email_active:t?t.email_active:!!p},loading:new rr$1(false),editMode:new rr$1(true),name:new rr$1(""),params:e}}};var Me=()=>[5],bt=()=>["5"];function Li(n,t){n&1&&(Zi$1(0,"span",4),ib(1),bb(2,"translate"),kl()),n&2&&(AE(),Ug(_b(2,1,"appTracker.notify_me_when")));}function Ri(n,t){if(n&1){let e=DT();Zi$1(0,"header")(1,"div",1)(2,"span",2),ib(3),bb(4,"translate"),kl()(),Zi$1(5,"am-btn-group",3),bb(6,"async"),_g("changeValue",function(a){Rd(e);let p=NT();return kd(p.changeAlertType(a))}),kl(),uT(7,Li,3,3,"span",4),bb(8,"async"),kl();}if(n&2){let e=NT();AE(3),Ug(_b(4,4,"appTracker.for_the_chosen_tags")),AE(2),Ig("value",_b(6,6,e.tempParams).type)("values",e.typeButtons),AE(2),dT(_b(8,8,e.tempParams).type===e.alertTypeEnum.spikeUp?7:-1);}}function ji(n,t){n&1&&(Zi$1(0,"span",12),ib(1),bb(2,"translate"),kl()),n&2&&(AE(),Ug(_b(2,1,"appTracker.position")));}function zi(n,t){if(n&1){let e=DT();Zi$1(0,"div",8)(1,"div",9),ib(2),bb(3,"translate"),Zi$1(4,"simple-select",10),bb(5,"async"),_g("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeTopAppsCount(a))}),kl()(),Zi$1(6,"div",11),ib(7),bb(8,"translate"),Zi$1(9,"simple-select",10),bb(10,"async"),_g("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeMetric(a))}),kl(),uT(11,ji,3,3,"span",12),bb(12,"async"),kl()(),Zi$1(13,"div",13),Ni("g-anim-leave-auto-height-fade"),Si$1("g-anim-enter-auto-height-fade"),Zi$1(14,"div",14)(15,"div",9),ib(16),bb(17,"translate"),Zi$1(18,"country-group-select",15),bb(19,"async"),bb(20,"async"),bb(21,"async"),_g("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeCountry(a))}),kl()(),Zi$1(22,"div",11),ib(23),bb(24,"translate"),Zi$1(25,"simple-select-multiple",16),bb(26,"async"),bb(27,"async"),bb(28,"async"),_g("apply",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeStore(a))}),kl()()()();}if(n&2){let e=NT(2);AE(2),jl(" ",_b(3,38,"appTracker.for")," "),AE(2),Ig("values",e.topAppsCountSelectConfig.values)("itemsLowercase",true)("showPanelTitleDesk",false)("settings",e.topAppsCountSelectConfig.customSettings)("analyticEvents",e.topAppsCountSelectConfig.analyticEvents)("value",_b(5,40,e.tempParams).count.toString()),AE(3),jl(" ",_b(8,42,"appTracker.by")," "),AE(2),Ig("values",e.metricSelectConfig.values)("itemsLowercase",true)("showPanelTitleDesk",false)("settings",e.metricSelectConfig.customSettings)("analyticEvents",e.metricSelectConfig.analyticEvents)("value",_b(10,44,e.tempParams).metric),AE(2),dT(e.isTopMetric(_b(12,46,e.tempParams).metric)?11:-1),AE(5),jl(" ",_b(17,48,"appTracker.for")," "),AE(2),Pg("text-lowercase",_b(19,50,e.tempParams)?.countries[0]==="WW")("text-capitalize",_b(20,52,e.tempParams).countries[0]!=="WW"),Ig("value",e.getTierGroupForSelector(_b(21,54,e.tempParams).countries))("allowCreateNewGroup",false)("allowEditGroups",false)("title","")("lock",!e.hasAllCountries()),AE(5),jl(" ",_b(24,56,"appTracker.and")," "),AE(2),Pg("text-lowercase",_b(26,58,e.tempParams).stores===vb(64,Me))("text-none-transform",_b(27,60,e.tempParams).stores!==vb(65,Me)),Ig("value",_b(28,62,e.storesString))("settings",e.storeSelectConfig.customSettings)("values",e.storeSelectConfig.values)("deselectDefaultOnFirstSelect",true)("defaultValue",vb(66,bt))("showTitle",false)("filterService",e.filterService)("analyticEvents",e.storeSelectConfig.multiAnalyticEvents);}}function $i(n,t){if(n&1&&(Zi$1(0,"div",20),Eg(1,"i",26),kl()),n&2){let e=NT(3);
1Ig("placement","right")("analyticsEvent",e.tooltipAnalytic)("textTooltip","appTracker.aggregation_tooltip_text");}}function Wi(n,t){n&1&&(Zi$1(0,"span",12),ib(1),bb(2,"translate"),kl()),n&2&&(AE(),Ug(_b(2,1,"appTracker.position")));}function Gi(n,t){if(n&1){let e=DT();Zi$1(0,"div",8)(1,"div",17)(2,"div",18)(3,"simple-select",19),bb(4,"async"),_g("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeAggregation(a))}),kl(),uT(5,$i,2,3,"div",20),bb(6,"async"),kl(),Zi$1(7,"simple-select",21),bb(8,"async"),_g("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeMetric(a))}),kl(),uT(9,Wi,3,3,"span",12),bb(10,"async"),kl(),Zi$1(11,"div",22)(12,"div",23)(13,"span",24),ib(14),bb(15,"async"),bb(16,"translate"),kl(),Zi$1(17,"div",25),Eg(18,"i",26),kl(),Zi$1(19,"div",27)(20,"simple-select",28),bb(21,"async"),_g("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleSpikeUpChange(a))}),kl()()(),Zi$1(22,"div",9),ib(23),bb(24,"translate"),Zi$1(25,"simple-select",10),bb(26,"async"),_g("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeTopAppsCount(a))}),kl()()()(),Zi$1(27,"div",13),Ni("g-anim-leave-auto-height-fade"),Si$1("g-anim-enter-auto-height-fade"),Zi$1(28,"div",14)(29,"div",7)(30,"div",29)(31,"div",30)(32,"span",31),ib(33),bb(34,"async"),bb(35,"translate"),kl(),Zi$1(36,"div",32)(37,"div",33),Eg(38,"i",26),kl(),Zi$1(39,"simple-select",28),bb(40,"async"),_g("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleSpikeUpChange(a))}),kl()()(),Zi$1(41,"div",34),ib(42),bb(43,"translate"),Zi$1(44,"country-group-select",35),bb(45,"async"),bb(46,"async"),bb(47,"async"),_g("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeCountry(a))}),kl()(),Zi$1(48,"div",36),ib(49),bb(50,"translate"),Zi$1(51,"simple-select-multiple",16),bb(52,"async"),bb(53,"async"),bb(54,"async"),_g("apply",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeStore(a))}),kl()()(),Eg(55,"notifications-multi-countries-note"),kl()()(),Zi$1(56,"div",13),Ni("g-anim-leave-auto-height-fade"),Si$1("g-anim-enter-auto-height-fade"),Zi$1(57,"div",37)(58,"div",38),ib(59),bb(60,"translate"),Zi$1(61,"country-group-select",35),bb(62,"async"),bb(63,"async"),bb(64,"async"),_g("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeCountry(a))}),kl()(),Zi$1(65,"div",39),ib(66),bb(67,"translate"),Zi$1(68,"simple-select-multiple",16),bb(69,"async"),bb(70,"async"),bb(71,"async"),_g("apply",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeStore(a))}),kl()(),Eg(72,"notifications-multi-countries-note"),kl()();}if(n&2){let e=NT(2);AE(3),Ig("values",e.aggregationSelectConfig.values)("itemsLowercase",true)("showPanelTitleDesk",false)("settings",e.aggregationSelectConfig.customSettings)("analyticEvents",e.aggregationSelectConfig.analyticEvents)("value",_b(4,89,e.tempParams).aggregation),AE(2),dT(_b(6,91,e.tempParams).aggregation!==e.aggregationEnum.day?5:-1),AE(2),Ig("values",e.metricSelectConfig.values)("itemsLowercase",true)("showPanelTitleDesk",false)("settings",e.metricSelectConfig.customSettings)("analyticEvents",e.metricSelectConfig.analyticEvents)("value",_b(8,93,e.tempParams).metric),AE(2),dT(e.isTopMetric(_b(10,95,e.tempParams).metric)?9:-1),AE(5),Ug(_b(16,99,_b(15,97,e.tempParams).metric==="downloads"?"appTracker.spike_up":"appTracker.spikes_up")),AE(3),Ig("placement","right")("analyticsEvent",e.tooltipSpikeUpAnalytic)("textTooltip","appTracker.spike_up_tooltip_text"),AE(3),Ig("values",e.spikeUpSelectConfig.values)("itemsLowercase",true)("showPanelTitleDesk",false)("settings",e.spikeUpSelectConfig.customSettings)("analyticEvents",e.spikeUpSelectConfig.analyticEvents)("value",_b(21,101,e.tempParams).spike_value),AE(3),jl(" ",_b(24,103,"appTracker.for")," "),AE(2),Ig("values",e.topAppsCountSelectConfig.values)("itemsLowercase",true)("showPanelTitleDesk",false)("settings",e.topAppsCountSelectConfig.customSettings)("analyticEvents",e.topAppsCountSelectConfig.analyticEvents)("value",_b(26,105,e.tempParams).count.toString()),AE(8),Ug(_b(35,109,_b(34,107,e.tempParams).metric==="downloads"?"appTracker.spike_up":"appTracker.spikes_up")),AE(4),Ig("placement","right")("analyticsEvent",e.tooltipSpikeUpAnalytic)("textTooltip","appTracker.spike_up_tooltip_text"),AE(2),Ig("values",e.spikeUpSelectConfig.values)("itemsLowercase",true)("showPanelTitleDesk",false)("settings",e.spikeUpSelectConfig.customSettings)("analyticEvents",e.spikeUpSelectConfig.analyticEvents)("value",_b(40,111,e.tempParams).spike_value),AE(3),jl(" ",_b(43,113,"appTracker.for")," "),AE(2),Pg("text-lowercase",_b(45,115,e.tempParams)?.countries[0]==="WW")("text-capitalize",_b(46,117,e.tempParams).countries[0]!=="WW"),Ig("value",e.getTierGroupForSelector(_b(47,119,e.tempParams).countries))("allowCreateNewGroup",false)("allowEditGroups",false)("title","")("lock",!e.hasAllCountries())("filterService",e.filterService),AE(5),jl(" ",_b(50,121,"appTracker.and")," "),AE(2),Pg("text-lowercase",_b(52,123,e.tempParams).stores===vb(145,Me))("text-none-transform",_b(53,125,e.tempParams).stores!==vb(146,Me)),Ig("value",_b(54,127,e.storesString))("settings",e.storeSelectConfig.customSettings)("values",e.storeSelectConfig.values)("deselectDefaultOnFirstSelect",true)("defaultValue",vb(147,bt))("showTitle",false)("filterService",e.filterService)("analyticEvents",e.storeSelectConfig.multiAnalyticEvents),AE(8),jl(" ",_b(60,129,"appTracker.for")," "),AE(2),Pg("text-lowercase",_b(62,131,e.tempParams)?.countries[0]==="WW")("text-capitalize",_b(63,133,e.tempParams).countries[0]!=="WW"),Ig("value",e.getTierGroupForSelector(_b(64,135,e.tempParams).countries))("allowCreateNewGroup",false)("allowEditGroups",false)("title","")("lock",!e.hasAllCountries())("filterService",e.filterService),AE(5),jl(" ",_b(67,137,"appTracker.and")," "),AE(2),Pg("text-lowercase",_b(69,139,e.tempParams).stores===vb(148,Me))("text-none-transform",_b(70,141,e.tempParams).stores!==vb(149,Me)),Ig("value",_b(71,143,e.storesString))("settings",e.storeSelectConfig.customSettings)("values",e.storeSelectConfig.values)("deselectDefaultOnFirstSelect",true)("defaultValue",vb(150,bt))("showTitle",false)("filterService",e.filterService)("analyticEvents",e.storeSelectConfig.multiAnalyticEvents);}}function Hi(n,t){n&1&&(Zi$1(0,"span",42),ib(1),bb(2,"translate"),kl()),n&2&&(AE(),Ug(_b(2,1,"appTracker.position")));}function qi(n,t){if(n&1){let e=DT();Zi$1(0,"div",7)(1,"div",40)(2,"span"),ib(3),bb(4,"translate"),kl(),Zi$1(5,"span"),ib(6),bb(7,"translate"),kl(),Zi$1(8,"span"),ib(9),bb(10,"translate"),kl(),Zi$1(11,"span"),ib(12),bb(13,"translate"),kl()(),Zi$1(14,"div",41)(15,"simple-select",19),bb(16,"async"),_g("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeTopAppsCount(a))}),kl(),Zi$1(17,"div",9)(18,"simple-select",19),bb(19,"async"),_g("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeMetric(a))}),kl(),uT(20,Hi,3,3,"span",42),bb(21,"async"),kl(),Zi$1(22,"country-group-select",43),bb(23,"async"),bb(24,"async"),bb(25,"async"),_g("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeCountry(a))}),kl(),Zi$1(26,"simple-select-multiple",44),bb(27,"async"),bb(28,"async"),bb(29,"async"),_g("apply",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeStore(a))}),kl()()();}if(n&2){let e=NT(2);AE(3),Ug(_b(4,39,"appTracker.for")),AE(3),Ug(_b(7,41,"appTracker.by")),AE(3),Ug(_b(10,43,"appTracker.for")),AE(3),Ug(_b(13,45,"appTracker.and")),AE(3),Ig("values",e.topAppsCountSelectConfig.values)("itemsLowercase",true)("showPanelTitleDesk",false)("settings",e.topAppsCountSelectConfig.customSettings)("analyticEvents",e.topAppsCountSelectConfig.analyticEvents)("value",_b(16,47,e.tempParams).count.toString()),AE(3),Ig("values",e.metricSelectConfig.values)("itemsLowercase",true)("showPanelTitleDesk",false)("settings",e.metricSelectConfig.customSettings)("analyticEvents",e.metricSelectConfig.analyticEvents)("value",_b(19,49,e.tempParams).metric),AE(2),dT(e.isTopMetric(_b(21,51,e.tempParams).metric)?20:-1),AE(2),Pg("text-lowercase",_b(23,53,e.tempParams)?.countries[0]==="WW")("text-capitalize",_b(24,55,e.tempParams).countries[0]!=="WW"),Ig("value",e.getTierGroupForSelector(_b(25,57,e.tempParams).countries))("allowCreateNewGroup",false)("allowEditGroups",false)("title","")("lock",!e.hasAllCountries())("filterService",e.filterService),AE(4),Pg("text-lowercase",_b(27,59,e.tempParams).stores===vb(65,Me))("text-none-transform",_b(28,61,e.tempParams).stores!==vb(66,Me)),Ig("value",_b(29,63,e.storesString))("settings",e.storeSelectConfig.customSettings)("values",e.storeSelectConfig.values)("deselectDefaultOnFirstSelect",true)("defaultValue",vb(67,bt))("showTitle",false)("filterService",e.filterService)("analyticEvents",e.storeSelectConfig.multiAnalyticEvents);}}function Ji(n,t){if(n&1&&(Zi$1(0,"div",45),Eg(1,"i",26),kl()),n&2){let e=NT(3);
1Ig("placement","right")("analyticsEvent",e.tooltipAnalytic)("textTooltip","appTracker.aggregation_tooltip_text");}}function Ki(n,t){n&1&&(Zi$1(0,"span",46),ib(1),bb(2,"translate"),kl()),n&2&&(AE(),Ug(_b(2,1,"appTracker.position")));}function Qi(n,t){if(n&1){let e=DT();Zi$1(0,"div",9)(1,"simple-select",19),bb(2,"async"),_g("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeAggregation(a))}),kl(),uT(3,Ji,2,3,"div",45),bb(4,"async"),kl(),Zi$1(5,"div",7)(6,"simple-select",19),bb(7,"async"),_g("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeMetric(a))}),kl(),uT(8,Ki,3,3,"span",46),bb(9,"async"),kl(),Zi$1(10,"div",7)(11,"div",40)(12,"span",47),ib(13),bb(14,"async"),bb(15,"translate"),Zi$1(16,"div",48),Eg(17,"i",26),kl()(),Zi$1(18,"span"),ib(19),bb(20,"translate"),kl(),Zi$1(21,"span"),ib(22),bb(23,"translate"),kl(),Zi$1(24,"span"),ib(25),bb(26,"translate"),kl()(),Zi$1(27,"div",41)(28,"div",49)(29,"simple-select",50),bb(30,"async"),_g("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleSpikeUpChange(a))}),kl()(),Zi$1(31,"simple-select",19),bb(32,"async"),_g("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeTopAppsCount(a))}),kl(),Zi$1(33,"country-group-select",51),bb(34,"async"),bb(35,"async"),bb(36,"async"),_g("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeCountry(a))}),kl(),Zi$1(37,"simple-select-multiple",44),bb(38,"async"),bb(39,"async"),bb(40,"async"),_g("apply",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeStore(a))}),kl()()();}if(n&2){let e=NT(2);AE(),Ig("values",e.aggregationSelectConfig.values)("itemsLowercase",true)("showPanelTitleDesk",false)("settings",e.aggregationSelectConfig.customSettings)("analyticEvents",e.aggregationSelectConfig.analyticEvents)("value",_b(2,54,e.tempParams).aggregation),AE(2),dT(_b(4,56,e.tempParams).aggregation!==e.aggregationEnum.day?3:-1),AE(3),Ig("values",e.metricSelectConfig.values)("itemsLowercase",true)("showPanelTitleDesk",false)("settings",e.metricSelectConfig.customSettings)("analyticEvents",e.metricSelectConfig.analyticEvents)("value",_b(7,58,e.tempParams).metric),AE(2),dT(e.isTopMetric(_b(9,60,e.tempParams).metric)?8:-1),AE(5),jl(" ",_b(15,64,_b(14,62,e.tempParams).metric==="downloads"?"appTracker.spike_up":"appTracker.spikes_up")," "),AE(3),Ig("placement","right")("analyticsEvent",e.tooltipSpikeUpAnalytic)("textTooltip","appTracker.spike_up_tooltip_text"),AE(3),Ug(_b(20,66,"appTracker.for")),AE(3),Ug(_b(23,68,"appTracker.for")),AE(3),Ug(_b(26,70,"appTracker.and")),AE(4),Ig("values",e.spikeUpSelectConfig.values)("itemsLowercase",true)("showPanelTitleDesk",false)("settings",e.spikeUpSelectConfig.customSettings)("analyticEvents",e.spikeUpSelectConfig.analyticEvents)("value",_b(30,72,e.tempParams).spike_value),AE(2),Ig("values",e.topAppsCountSelectConfig.values)("itemsLowercase",true)("showPanelTitleDesk",false)("settings",e.topAppsCountSelectConfig.customSettings)("analyticEvents",e.topAppsCountSelectConfig.analyticEvents)("value",_b(32,74,e.tempParams).count.toString()),AE(2),Pg("text-lowercase",_b(34,76,e.tempParams)?.countries[0]==="WW")("text-capitalize",_b(35,78,e.tempParams).countries[0]!=="WW"),Ig("value",e.getTierGroupForSelector(_b(36,80,e.tempParams).countries))("allowCreateNewGroup",false)("allowEditGroups",false)("title","")("lock",!e.hasAllCountries()),AE(4),Pg("text-lowercase",_b(38,82,e.tempParams).stores===vb(88,Me))("text-none-transform",_b(39,84,e.tempParams).stores!==vb(89,Me)),Ig("value",_b(40,86,e.storesString))("settings",e.storeSelectConfig.customSettings)("values",e.storeSelectConfig.values)("deselectDefaultOnFirstSelect",true)("defaultValue",vb(90,bt))("showTitle",false)("filterService",e.filterService)("analyticEvents",e.storeSelectConfig.multiAnalyticEvents);}}function Yi(n,t){if(n&1&&(Zi$1(0,"main")(1,"section")(2,"div",5),uT(3,zi,29,67),bb(4,"async"),uT(5,Gi,73,151),bb(6,"async"),kl(),Zi$1(7,"div",6),uT(8,qi,30,68,"div",7),bb(9,"async"),uT(10,Qi,41,91),bb(11,"async"),Eg(12,"notifications-multi-countries-note"),kl()()()),n&2){let e=NT();AE(3),dT(_b(4,4,e.tempParams).type===e.alertTypeEnum.updates?3:-1),AE(2),dT(_b(6,6,e.tempParams).type===e.alertTypeEnum.spikeUp?5:-1),AE(3),dT(_b(9,8,e.tempParams).type===e.alertTypeEnum.updates?8:-1),AE(2),dT(_b(11,10,e.tempParams).type===e.alertTypeEnum.spikeUp?10:-1);}}function Xi(n,t){if(n&1){let e=DT();Zi$1(0,"alert-footer",52),_g("delete",function(){Rd(e);let a=NT();return kd(a.delete.emit(a.alert))})("updateSlackStatus",function(){Rd(e);let a=NT();return kd(a.footerService.toggleSlack())})("updateEmailStatus",function(){Rd(e);let a=NT();return kd(a.footerService.toggleEmail())})("sendTest",function(){Rd(e);let a=NT();return kd(a.footerService.sendNotify(a.alert,a.tempParams.getValue()))})("cancel",function(){Rd(e);let a=NT();return kd(a.cancel.emit())})("apply",function(){Rd(e);let a=NT();return kd(a.update())}),kl();}if(n&2){let e=NT();Ig("slackActive",e.footerService.slackActive)("slackUrl",e.footerService.slackUrl)("slackUrlLoading",e.footerService.slackUrlLoading)("email",e.footerService.email)("emailActive",e.footerService.emailActive)("label",e.footerService.label)("loading",e.footerService.loading)("needSave",e.isAlertNeedSave);}}var jt=class n{constructor(t,e,i){this.analyticsService=t;this.footerService=e;this.filterService=i;
1this.cancel=new tt;this.apply=new tt;this.delete=new tt;this.tempParams=new rr$1(null);this.storesString=new rr$1(["5"]);this.subscription=new W;this.isAlertNeedSave=new rr$1(false);this.tooltipAnalytic="app_tracker_aggregation_tooltip";this.tooltipSpikeUpAnalytic="app_tracker_spike_up_tooltip";this.alertTypeEnum=ut;this.aggregationEnum=m$2;this.isTopMetric=u$1.isTopType;this.countriesService=D(c);this.hasAllCountries=D(ve).getAccessSignal(E$1.mobile_all_countries);this.getTierGroupForSelector=t=>$.getTierGroupForSelector(t,this.countriesService.multiCountries);this.typeButtons=[];this.initSelectorConfig();}static prepareAlertParams(t){return t.type==="updates"?delete t.spike_value:t.spike_value=t.spike_value?t.spike_value:"high",t}ngOnInit(){this.footerService.init(this.alert.alert),this.tempParams.next(Hp(this.alert.params)),this.subscription.add(this.alert.tempTagIds.subscribe(t=>{let e=this.tempParams.getValue();e.tags=t,this.tempParams.next(e);})),this.subscription.add(qm([this.tempParams,this.footerService.isFooterChanged,this.alert.name]).subscribe(([t,e,i])=>{let a=!Tu(t,this.alert.params);this.storesString.next(this.tempParams.getValue().stores.map(T=>T.toString()));let p=this.alert.alert.id===0,v=this.alert.alert.title!==i,A=p||a||e||v;this.isAlertNeedSave.next(A&&this.footerService.isSlackOrEmailUsed());}));}ngOnDestroy(){this.footerService.destroy(),this.subscription.unsubscribe();}initSelectorConfig(){this.metricSelectConfig=gt((t,e)=>this.analyticsService.send(t,e)),this.metricSelectConfig.values=this.metricSelectConfig.values.filter(t=>!u$1.isTopType(t.value)),this.aggregationSelectConfig=dt((t,e)=>this.analyticsService.send(t,e)),this.countrySimpleSelectConfig=mt((t,e)=>this.analyticsService.send(t,e)),this.spikeUpSelectConfig=Rt((t,e)=>this.analyticsService.send(t,e)),this.storeSelectConfig=_t((t,e)=>this.analyticsService.send(t,e)),this.topAppsCountSelectConfig=ui((t,e)=>this.analyticsService.send(t,e)),this.typeButtons=[{name:"appTracker.metrics_type",value:"spike_up"},{name:"appTracker.updates_type",value:"updates"}];}update(){let t=this.tempParams.getValue();t.tags=this.alert.tempTagIds.getValue(),this.alert.alert.title=this.alert.name.getValue(),this.footerService.prepareAlert(this.alert,n.prepareAlertParams(t)),this.apply.emit(this.alert);}changeAlertType(t){let e=Hp(this.tempParams.getValue());e.type!==t&&(this.analyticsService.send("app_tracker_change_type",[t]),e.type=t,e=n.prepareAlertParams(e),this.tempParams.next(e));}handleChangeAggregation(t){let e=Hp(this.tempParams.getValue());e.aggregation!==t&&(e.aggregation=t,this.tempParams.next(e));}handleChangeTopAppsCount(t){let e=Hp(this.tempParams.getValue());e.count!==+t&&(e.count=+t,this.tempParams.next(e));}handleChangeMetric(t){let e=Hp(this.tempParams.getValue());e.metric!==t&&(e.metric=t,this.tempParams.next(e));}handleSpikeUpChange(t){let e=Hp(this.tempParams.getValue());e.spike_value!==t&&(e.spike_value=t,this.tempParams.next(e));}handleChangeCountry(t){let e=Hp(this.tempParams.getValue());t.closePanel();let i=$.getTierGroupForAlert(t.value,this.countriesService.multiCountries);Tu(e.countries,i)||(e.countries=i,this.tempParams.next(e));}handleChangeStore(t){t.closePanel();let e=Hp(this.tempParams.getValue()),i=t.value.map(a=>+a);Tu(e.stores,i)||(e.stores=i,this.tempParams.next(e));}static{this.\u0275fac=function(e){return new(e||n)(Jr$1(L),Jr$1(K),Jr$1(Ze$1))};}static{this.\u0275cmp=sw({type:n,selectors:[["top-apps-spikes-updates-alert"]],inputs:{alert:"alert"},outputs:{cancel:"cancel",apply:"apply",delete:"delete"},features:[yb([K])],decls:6,vars:9,consts:[[3,"slackActive","slackUrl","slackUrlLoading","email","emailActive","label","loading","needSave"],[1,"d-flex","flex-a-c","label-bell"],[1,"text-label"],[1,"btn-group-text-cut",3,"changeValue","value","values"],[1,"text-label","label-notify"],[1,"not-mob","d-flex","flex-col"],[1,"mob-flex-only","d-flex","flex-col"],[1,"d-flex"],[1,"d-flex","flex-a-c","row","padding-bottom"],[1,"selector-wrap"],[1,"tracker-selector","text-lowercase",2,"margin-left","12px",3,"valChange","values","itemsLowercase","showPanelTitleDesk","settings","analyticEvents","value"],[1,"selector-wrap",2,"margin-left","12px"],[1,"m-l-sm"],[1,"g-anim-auto-height"],[1,"d-flex","flex-a-c","padding-bottom","row","text-capitalize"],["lockTooltip","screen.country_restriction_tooltip_text",1,"tracker-selector",2,"margin-left","12px",3,"valChange","value","allowCreateNewGroup","allowEditGroups","title","lock"],[1,"tracker-selector",2,"margin-left","12px",3,"apply","value","settings","values","de
1selectDefaultOnFirstSelect","defaultValue","showTitle","filterService","analyticEvents"],[1,"d-flex","flex","width-100"],[1,"selector-wrap","d-inline-flex",2,"margin-right","12px"],[1,"tracker-selector","text-lowercase",3,"valChange","values","itemsLowercase","showPanelTitleDesk","settings","analyticEvents","value"],[1,"flex-center","d-inline-flex","pos-relative","m-r-sm",3,"placement","analyticsEvent","textTooltip"],[1,"tracker-selector","text-lowercase","metric-selector-desk",3,"valChange","values","itemsLowercase","showPanelTitleDesk","settings","analyticEvents","value"],[1,"d-flex","flex","width-100",2,"margin-left","12px"],[1,"d-flex","flex-a-c","spike-up-content-desk","width-100"],[1,"nowrap",2,"margin-right","8px"],[1,"flex-center","d-inline-flex","pos-relative",3,"placement","analyticsEvent","textTooltip"],[1,"g-icon-help","text-gold","help-icon"],[1,"d-inline-flex","selector-wrap","spike-up-selector",2,"margin-right","12px"],[1,"tracker-selector",2,"margin-left","12px",3,"valChange","values","itemsLowercase","showPanelTitleDesk","settings","analyticEvents","value"],[1,"d-flex","flex-a-c","flex-col","text-capitalize","row","width-100"],[1,"selector-wrap","spike-up-content-mob-ls","padding-bottom"],[1,"nowrap"],[1,"d-inline-flex","selector-wrap","spike-up-selector"],[1,"flex-center","d-inline-flex","pos-relative",2,"margin-left","8px",3,"placement","analyticsEvent","textTooltip"],[1,"selector-wrap","special-width","padding-bottom"],["lockTooltip","screen.country_restriction_tooltip_text",1,"tracker-selector",2,"margin-left","12px",3,"valChange","value","allowCreateNewGroup","allowEditGroups","title","lock","filterService"],[1,"selector-wrap","special-width"],[1,"d-flex","flex-a-c","text-capitalize","row","p-b","selector-mob-only"],[1,"selector-wrap","country-content-mob"],[1,"selector-wrap","stores-content-mob",2,"margin-left","12px"],[1,"mob-spans"],[1,"mob-selectors"],[1,"position-text","m-r-sm"],["lockTooltip","screen.country_restriction_tooltip_text",1,"tracker-selector",3,"valChange","value","allowCreateNewGroup","allowEditGroups","title","lock","filterService"],[1,"tracker-selector",3,"apply","value","settings","values","deselectDefaultOnFirstSelect","defaultValue","showTitle","filterService","analyticEvents"],[1,"aggregation-tooltip","flex-center","d-inline-flex","pos-relative","m-r-sm",3,"placement","analyticsEvent","textTooltip"],[1,"m-r-sm"],[1,"nowrap","d-flex"],[1,"flex-center","d-inline-flex","pos-relative","m-l-sm",3,"placement","analyticsEvent","textTooltip"],[1,"d-inline-flex","selector-wrap","nowrap",2,"margin-bottom","16px!important"],[1,"tracker-selector",2,"margin-bottom","0!important",3,"valChange","values","itemsLowercase","showPanelTitleDesk","settings","analyticEvents","value"],["lockTooltip","screen.country_restriction_tooltip_text",1,"tracker-selector",3,"valChange","value","allowCreateNewGroup","allowEditGroups","title","lock"],[3,"delete","updateSlackStatus","updateEmailStatus","sendTest","cancel","apply","slackActive","slackUrl","slackUrlLoading","email","emailActive","label","loading","needSave"]],template:function(e,i){e&1&&(uT(0,Ri,9,10,"header"),bb(1,"async"),uT(2,Yi,13,12,"main"),bb(3,"async"),uT(4,Xi,1,8,"alert-footer",0),bb(5,"async")),e&2&&(dT(_b(1,3,i.tempParams)?0:-1),AE(2),dT(_b(3,5,i.tempParams)?2:-1),AE(2),dT(_b(5,7,i.tempParams)?4:-1));},dependencies:[An,oa$1,fe,Gt$1,le,we,j,fe$1,Ct,re,hn,he],styles:["[_ngcontent-%COMP%]:root{--white: #fff;--black: #000;--static-white: #fff;--static-black: #000;--grey-20: #F9F9FA;--grey-30: #E9EDEF;--grey-40: #DADFE1;--static-grey-40: #DADFE1;--grey-50: #A7B2B9;--static-grey-50: #A7B2B9;--grey-70: #506775;--grey-80: #475156;--static-grey-80: #475156;--grey-90: #3F3F46;--grey-100: #273238;--red-30: #FDEAEA;--red-40: #FF7485;--red-50: #FA354D;--yellow-30: #FFF8CF;--yellow-40: #FCE778;--yellow-50: #FEDA0F;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #E6FEE6;--green-40: #D4FABE;--green-50: #99F199;--green-70: #34C834;--green-90: #26A542;--blue-30: #EAF2FD;--blue-35: #4CE5FF;--blue-40: #D8E8FF;--blue-50: #B5D4FF;--blue-60: #6BB6FC;--blue-70: #2B98FC;--blue-70-rgb: 38, 104, 232;--blue-80: #2668E8;--blue-90: #1A54C3;--violete-20: #FAEDFF;--violete-30: #F5D9FF;--violete-60: #B259D2;--violete-80: #7B0EA2;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .15);--chart-grid-weekend-color: #F2f5f7;--cell-heat-blue-rgb: 189, 212, 255;--cell-heat-orange-rgb: 254, 217, 161;--cell-heat-green-primary-rgb: 184, 229, 125;--cell-heat-green-secondary-rgb: 139, 238, 179;--cell-heat-violet-rgb: 212, 186, 255;--cell-heat-red-rgb: 255, 135, 153}[_ngcontent-%COMP%]:root[theme=dark]{--white: #0E1113;--black: #C5C7CC;--static-white: #F2F3F5;--grey-20: #12171A;--grey-30: #1A2024;--grey-40: #1c2228;--grey-50: #2a333b;--grey-70: #5f6a72;--grey-80: #8a949b;--grey-90: #b0b6bb;--grey-100: #1b1f23;--red-30: #3A151A;--red-40: #FF6B7C;--red-50: #FF3B52;--yellow-30: #3A320F;--yellow-40: #EAD25F;--yellow-50: #FFD400;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #133A1E;--green-40: #1E5A2E;--green-50: #2E6E2E;--green-70: #34C834;--green-90: #26A542;--blue-30: #0F1C2E;--blue-35: #4CE5FF;--blue-40: #162A44;--blue-50: #1F3B66;--blue-60: #3D7DDC;--blue-70: #4B9BFF;--blue-70-rgb: 75, 155, 255;--blue-80: #5C8DFF;--blue-90: #8CB2FF;--violete-20: #2A1633;--violete-30: #3A1E4A;--violete-60: #B259D2;--violete-80: #D38CFF;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .25);--chart-grid-weekend-color: #191F23;
1--cell-heat-blue-rgb: 31, 59, 102;--cell-heat-orange-rgb: 92, 58, 18;--cell-heat-green-primary-rgb: 30, 90, 46;--cell-heat-green-secondary-rgb: 22, 84, 58;--cell-heat-violet-rgb: 58, 30, 74;--cell-heat-red-rgb: 90, 28, 37}.no-value[_ngcontent-%COMP%]{color:var(--text-muted)}.chart-hidden[_ngcontent-%COMP%]{margin-bottom:16px}[_nghost-%COMP%]{display:flex;flex-direction:column;padding-top:16px;padding-bottom:16px}[_nghost-%COMP%] .text-none-transform[_ngcontent-%COMP%]{text-transform:none!important}[_nghost-%COMP%] header[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-bottom:20px;font-size:14px;line-height:16px}[_nghost-%COMP%] header[_ngcontent-%COMP%] .text-label[_ngcontent-%COMP%]{font-weight:500}[_nghost-%COMP%] header[_ngcontent-%COMP%] .label-bell[_ngcontent-%COMP%]{margin-bottom:12px}[_nghost-%COMP%] header[_ngcontent-%COMP%] .label-notify[_ngcontent-%COMP%]{margin-top:8px}[_nghost-%COMP%] main[_ngcontent-%COMP%] .position-text[_ngcontent-%COMP%]{line-height:32px;margin-bottom:12px;margin-left:8px}[_nghost-%COMP%] main[_ngcontent-%COMP%] .aggregation-tooltip[_ngcontent-%COMP%]{margin-left:8px;margin-bottom:14px}[_nghost-%COMP%] main[_ngcontent-%COMP%] .mob-selectors[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column}[_nghost-%COMP%] main[_ngcontent-%COMP%] .mob-selectors[_ngcontent-%COMP%] .value-input-container[_ngcontent-%COMP%]{width:100%;margin-bottom:16px}[_nghost-%COMP%] main[_ngcontent-%COMP%] .mob-spans[_ngcontent-%COMP%]{display:flex;flex-direction:column}[_nghost-%COMP%] main[_ngcontent-%COMP%] .mob-spans[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{height:32px;margin-bottom:16px;padding:8px 8px 8px 0;line-height:16px;text-transform:lowercase}[_nghost-%COMP%] main[_ngcontent-%COMP%] .selector-wrap[_ngcontent-%COMP%]{max-width:284px;width:100%;display:flex;align-items:center}@media(max-width:767px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .selector-wrap[_ngcontent-%COMP%]{max-width:100%}}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:12px;max-width:284px;width:100%}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%]:last-child{margin-right:0}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector.last-child[_ngcontent-%COMP%]{margin-right:0}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector.mob-ls[_ngcontent-%COMP%]{display:none}@media(max-width:767px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector.mob-ls[_ngcontent-%COMP%]{display:flex}}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector.not-mob-ls[_ngcontent-%COMP%]{display:flex}@media(max-width:767px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector.not-mob-ls[_ngcontent-%COMP%]{display:none}}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%] > i[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{pointer-events:none}@media(max-width:767px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%]{max-width:100%}}@media(max-width:576px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%]{margin-right:0!important;width:100%;max-width:100%;margin-bottom:16px}}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-weight:400;width:100%}[_nghost-%COMP%] main[_ngcontent-%COMP%] .help-icon[_ngcontent-%COMP%]{font-size:17px;outline:none;cursor:default}[_nghost-%COMP%] main[_ngcontent-%COMP%] .padding-bottom[_ngcontent-%COMP%]{padding-bottom:24px}@media(max-width:576px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .padding-bottom[_ngcontent-%COMP%]{padding-bottom:0}}[_nghost-%COMP%] main[_ngcontent-%COMP%] .value-input-container[_ngcontent-%COMP%]{position:relative;width:100%;max-width:280px;min-width:180px;display:inline-block}@media(max-width:767px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .value-input-container[_ngcontent-%COMP%]{min-width:100px}}@media(max-width:576px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .value-input-container[_ngcontent-%COMP%]{max-width:100%}}[_nghost-%COMP%] main[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{font-size:14px;line-height:16px;text-transform:lowercase;max-width:100%}[_nghost-%COMP%] alert-footer[_ngcontent-%COMP%]{margin-top:4px}[_nghost-%COMP%]{--g-anim-duration: .3s}[_nghost-%COMP%] .selector-mob-only[_ngcontent-%COMP%]{display:none!important}@media(max-width:576px){[_nghost-%COMP%] .selector-mob-only[_ngcontent-%COMP%]{display:inherit!important}}[_nghost-%COMP%] notifications-multi-countries-note[_ngcontent-%COMP%]{margin-left:12px}@media(max-width:576px){[_nghost-%COMP%] notifications-multi-countries-note[_ngcontent-%COMP%]{margin-left:0;margin-bottom:24px}}[_nghost-%COMP%] .special-width[_ngcontent-%COMP%]{width:100%;max-width:440px!important}@media(max-width:767px){[_nghost-%COMP%] .special-width[_ngcontent-%COMP%]{max-width:100%!important}}[_nghost-%COMP%] .special-width[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%]{max-width:420px!important}[_nghost-%COMP%] header[_ngcontent-%COMP%]{margin-bottom:12px}[_nghost-%COMP%] .btn-group-text-cut[_ngcontent-%COMP%]{display:block}[_nghost-%COMP%] .spike-up-content-desk[_ngcontent-%COMP%], [_nghost-%COMP%] .country-content-desk[_ngcontent-%COMP%], [_nghost-%COMP%] .stores-content-desk[_ngcontent-%COMP%]{display:flex}@media(max-width:767px){[_nghost-%COMP%] .spike-up-content-desk[_ngcontent-%COMP%], [_nghost-%COMP%] .country-content-desk[_ngcontent-%COMP%], [_nghost-%COMP%] .stores-content-desk[_ngcontent-%COMP%]{display:none!important}}@media(max-width:767px){[_nghost-%COMP%] .metric-selector-desk[_ngcontent-%COMP%]{margin-right:0!important}}
1[_nghost-%COMP%] .top-count-content[_ngcontent-%COMP%]{margin-left:0;margin-right:12px}@media(max-width:767px){[_nghost-%COMP%] .top-count-content[_ngcontent-%COMP%]{margin-left:12px;margin-right:0}}[_nghost-%COMP%] .spike-up-content-mob-ls[_ngcontent-%COMP%], [_nghost-%COMP%] .country-content-mob[_ngcontent-%COMP%], [_nghost-%COMP%] .stores-content-mob[_ngcontent-%COMP%]{display:none!important}@media(max-width:767px){[_nghost-%COMP%] .spike-up-content-mob-ls[_ngcontent-%COMP%], [_nghost-%COMP%] .country-content-mob[_ngcontent-%COMP%], [_nghost-%COMP%] .stores-content-mob[_ngcontent-%COMP%]{display:flex!important}}[_nghost-%COMP%] notifications-multi-countries-note[_ngcontent-%COMP%]{text-transform:none!important}"]});}};var ke=class n{constructor(){this.active=VV.required();this.toggleStatus=jV();}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275cmp=sw({type:n,selectors:[["notifications-bell"]],inputs:{active:[1,"active"]},outputs:{toggleStatus:"toggleStatus"},decls:3,vars:6,consts:[[1,"bell-container",3,"closeOnClick","textTooltip"],[1,"bell",3,"click","src","alt"]],template:function(e,i){e&1&&(Zi$1(0,"div",0),bb(1,"translate"),Zi$1(2,"img",1),_g("click",function(){return i.toggleStatus.emit()}),kl()()),e&2&&(Ig("closeOnClick",true)("textTooltip",_b(1,4,i.active()?"appTracker.bell_tooltip_turn_off":"appTracker.bell_tooltip_turn_on")),AE(2),Ig("src",i.active()?"/assets/angular2/img/icons/bell-green-90.svg":"/assets/angular2/img/icons/bell-disabled-grey-70.svg",qp)("alt",i.active()?"bell-active":"bell-inactive"));},dependencies:[fe,fe$1,he],styles:["[_ngcontent-%COMP%]:root{--white: #fff;--black: #000;--static-white: #fff;--static-black: #000;--grey-20: #F9F9FA;--grey-30: #E9EDEF;--grey-40: #DADFE1;--static-grey-40: #DADFE1;--grey-50: #A7B2B9;--static-grey-50: #A7B2B9;--grey-70: #506775;--grey-80: #475156;--static-grey-80: #475156;--grey-90: #3F3F46;--grey-100: #273238;--red-30: #FDEAEA;--red-40: #FF7485;--red-50: #FA354D;--yellow-30: #FFF8CF;--yellow-40: #FCE778;--yellow-50: #FEDA0F;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #E6FEE6;--green-40: #D4FABE;--green-50: #99F199;--green-70: #34C834;--green-90: #26A542;--blue-30: #EAF2FD;--blue-35: #4CE5FF;--blue-40: #D8E8FF;--blue-50: #B5D4FF;--blue-60: #6BB6FC;--blue-70: #2B98FC;--blue-70-rgb: 38, 104, 232;--blue-80: #2668E8;--blue-90: #1A54C3;--violete-20: #FAEDFF;--violete-30: #F5D9FF;--violete-60: #B259D2;--violete-80: #7B0EA2;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .15);--chart-grid-weekend-color: #F2f5f7;--cell-heat-blue-rgb: 189, 212, 255;--cell-heat-orange-rgb: 254, 217, 161;--cell-heat-green-primary-rgb: 184, 229, 125;--cell-heat-green-secondary-rgb: 139, 238, 179;--cell-heat-violet-rgb: 212, 186, 255;--cell-heat-red-rgb: 255, 135, 153}[_ngcontent-%COMP%]:root[theme=dark]{--white: #0E1113;--black: #C5C7CC;--static-white: #F2F3F5;--grey-20: #12171A;--grey-30: #1A2024;--grey-40: #1c2228;--grey-50: #2a333b;--grey-70: #5f6a72;--grey-80: #8a949b;--grey-90: #b0b6bb;--grey-100: #1b1f23;--red-30: #3A151A;--red-40: #FF6B7C;--red-50: #FF3B52;--yellow-30: #3A320F;--yellow-40: #EAD25F;--yellow-50: #FFD400;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #133A1E;--green-40: #1E5A2E;--green-50: #2E6E2E;--green-70: #34C834;--green-90: #26A542;--blue-30: #0F1C2E;--blue-35: #4CE5FF;--blue-40: #162A44;--blue-50: #1F3B66;--blue-60: #3D7DDC;--blue-70: #4B9BFF;--blue-70-rgb: 75, 155, 255;--blue-80: #5C8DFF;--blue-90: #8CB2FF;--violete-20: #2A1633;--violete-30: #3A1E4A;--violete-60: #B259D2;--violete-80: #D38CFF;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .25);--chart-grid-weekend-color: #191F23;
1--cell-heat-blue-rgb: 31, 59, 102;--cell-heat-orange-rgb: 92, 58, 18;--cell-heat-green-primary-rgb: 30, 90, 46;--cell-heat-green-secondary-rgb: 22, 84, 58;--cell-heat-violet-rgb: 58, 30, 74;--cell-heat-red-rgb: 90, 28, 37}.no-value[_ngcontent-%COMP%]{color:var(--text-muted)}.chart-hidden[_ngcontent-%COMP%]{margin-bottom:16px}[_nghost-%COMP%]{display:flex}[_nghost-%COMP%] .bell-container[_ngcontent-%COMP%]{width:24px;height:24px;justify-content:center;align-items:center;display:flex;flex-shrink:0;cursor:default}[_nghost-%COMP%] .bell-container[_ngcontent-%COMP%] [_ngcontent-%COMP%]:not(spinner){cursor:pointer}@media(max-width:767px){[_nghost-%COMP%] .bell-container[_ngcontent-%COMP%]{margin:4px 0}}"]});}};function Zi(n,t){if(n&1&&(Zi$1(0,"div",2)(1,"span",10),ib(2),bb(3,"translate"),kl(),Zi$1(4,"strong",11),ib(5),bb(6,"translate"),kl(),ib(7),bb(8,"translate"),Eg(9,"span",12),bb(10,"translate"),ib(11),bb(12,"translate"),Zi$1(13,"span",13),ib(14),bb(15,"translate"),kl()()),n&2){let e=NT(2);AE(2),Ug(_b(3,6,"appTracker."+e.alert.params.aggregation)),AE(3),Ug(_b(6,8,"appList."+e.alert.params.metric)),AE(2),jl(" ",_b(8,10,"appTracker.spike_up")," "),AE(2),Ig("innerHtml",_b(10,12,"appTracker.spike_up_"+e.alert.params.spike_value),OI),AE(2),jl(" ",_b(12,14,"appTracker.for")," "),AE(3),Ug(_b(15,16,"appTracker.top_"+e.alert.params.count));}}function ea(n,t){if(n&1&&(Zi$1(0,"div",2),ib(1),bb(2,"translate"),bb(3,"translate"),Zi$1(4,"span",13),ib(5),bb(6,"translate"),kl()()),n&2){let e=NT(2);AE(),qg(" ",_b(2,3,"appTracker.updates_type")," ",_b(3,5,"appTracker.for")," "),AE(4),Ug(_b(6,7,"appTracker.top_"+e.alert.params.count));}}function ta(n,t){if(n&1&&(Zi$1(0,"span"),ib(1),bb(2,"translate"),kl()),n&2){let e=NT(2);AE(),qg(" ",e.alert.params.countries.length," ",_b(2,2,"app.countries")," ");}}function na(n,t){if(n&1&&(Zi$1(0,"span"),ib(1),bb(2,"translate"),kl()),n&2){let e=NT(2);AE(),jl(" ",_b(2,1,"countries."+e.alert.params.countries[0])," ");}}function ia(n,t){if(n&1&&(Zi$1(0,"span",5),ib(1),bb(2,"translate"),kl()),n&2){let e=NT(2);AE(),qg(" ",e.alert.params.stores.length," ",_b(2,2,"selectors.store_select_name")," ");}}function aa(n,t){if(n&1&&(Zi$1(0,"span"),ib(1),bb(2,"translate"),kl()),n&2){let e=NT(2);AE(),jl(" ",_b(2,1,"stores."+e.alert.params.stores[0])," ");}}function ra(n,t){if(n&1){let e=DT();Zi$1(0,"div",0)(1,"div",1),uT(2,Zi,16,18,"div",2),uT(3,ea,7,9,"div",2),Zi$1(4,"div",3),uT(5,ta,3,4,"span"),uT(6,na,3,3,"span"),Zi$1(7,"span",4),ib(8),kl(),uT(9,ia,3,4,"span",5),uT(10,aa,3,3,"span"),kl(),Zi$1(11,"div",6)(12,"notifications-bell",7),_g("toggleStatus",function(){Rd(e);let a=NT();return kd(a.toggleStatus.emit(a.alert))}),kl(),Zi$1(13,"div",8),_g("click",function(){Rd(e);let a=NT();return kd(a.edit.emit())}),ib(14),bb(15,"translate"),kl(),Zi$1(16,"div",9),_g("click",function(){Rd(e);let a=NT();return kd(a.delete.emit())}),kl()()()();}if(n&2){let e=NT();AE(2),dT(e.alert.params.type===e.alertTypeEnum.spikeUp?2:-1),AE(),dT(e.alert.params.type===e.alertTypeEnum.updates?3:-1),AE(2),dT(e.alert.params.countries.length>1?5:-1),AE(),dT(e.alert.params.countries.length===1?6:-1),AE(2),Ug(","),AE(),dT(e.alert.params.stores.length>1?9:-1),AE(),dT(e.alert.params.stores.length===1?10:-1),AE(2),Ig("active",e.alert.alert.active),AE(2),jl(" ",_b(15,9,"appTracker.edit_alert")," ");}}var zt=class n{constructor(){this.maxAlerts=new rr$1(false);this.edit=new tt;this.delete=new tt;this.toggleStatus=new tt;this.alertTypeEnum=ut;}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275cmp=sw({type:n,selectors:[["top-apps-spikes-updates-row"]],inputs:{alert:"alert",maxAlerts:"maxAlerts"},outputs:{edit:"edit",delete:"delete",toggleStatus:"toggleStatus"},decls:1,vars:1,consts:[[1,"alert"],[1,"col-container"],[1,"col-1"],[1,"col-2"],[2,"margin-right","4px"],[1,"text-lowercase"],[1,"col-3"],[3,"toggleStatus","active"],[1,"edit","selector-label",3,"click"],[1,"delete",3,"click"],[1,"text-capitalize"],[1,"text-lowercase","m-l-sm"],[1,"value",3,"innerHtml"],[1,"text","text-lowercase"]],template:function(e,i){e&1&&uT(0,ra,17,11,"div",0),e&2&&dT(i.alert?0:-1);},dependencies:[fe,ke,he],styles:["[_ngcontent-%COMP%]:root{--white: #fff;--black: #000;--static-white: #fff;--static-black: #000;--grey-20: #F9F9FA;--grey-30: #E9EDEF;--grey-40: #DADFE1;--static-grey-40: #DADFE1;--grey-50: #A7B2B9;--static-grey-50: #A7B2B9;--grey-70: #506775;--grey-80: #475156;--static-grey-80: #475156;--grey-90: #3F3F46;--grey-100: #273238;--red-30: #FDEAEA;--red-40: #FF7485;--red-50: #FA354D;--yellow-30: #FFF8CF;--yellow-40: #FCE778;--yellow-50: #FEDA0F;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #E6FEE6;--green-40: #D4FABE;--green-50: #99F199;--green-70: #34C834;--green-90: #26A542;--blue-30: #EAF2FD;--blue-35: #4CE5FF;--blue-40: #D8E8FF;--blue-50: #B5D4FF;--blue-60: #6BB6FC;--blue-70: #2B98FC;--blue-70-rgb: 38, 104, 232;--blue-80: #2668E8;--blue-90: #1A54C3;--violete-20: #FAEDFF;--violete-30: #F5D9FF;--violete-60: #B259D2;--violete-80: #7B0EA2;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .15);--chart-grid-weekend-color: #F2f5f7;--cell-heat-blue-rgb: 189, 212, 255;--cell-heat-orange-rgb: 254, 217, 161;--cell-heat-green-primary-rgb: 184, 229, 125;--cell-heat-green-secondary-rgb: 139, 238, 179;--cell-heat-violet-rgb: 212, 186, 255;--cell-heat-red-rgb: 255, 135, 153}[_ngcontent-%COMP%]:root[theme=dark]{--white: #0E1113;--black: #C5C7CC;--static-white: #F2F3F5;--grey-20: #12171A;--grey-30: #1A2024;--grey-40: #1c2228;--grey-50: #2a333b;--grey-70: #5f6a72;--grey-80: #8a949b;--grey-90: #b0b6bb;--grey-100: #1b1f23;--red-30: #3A151A;--red-40: #FF6B7C;--red-50: #FF3B52;--yellow-30: #3A320F;--yellow-40: #EAD25F;--yellow-50: #FFD400;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #133A1E;--green-40: #1E5A2E;--green-50: #2E6E2E;--green-70: #34C834;--green-90: #26A542;--blue-30: #0F1C2E;--blue-35: #4CE5FF;--blue-40: #162A44;--blue-50: #1F3B66;--blue-60: #3D7DDC;--blue-70: #4B9BFF;--blue-70-rgb: 75, 155, 255;--blue-80: #5C8DFF;--blue-90: #8CB2FF;--violete-20: #2A1633;--violete-30: #3A1E4A;--violete-60: #B259D2;--violete-80: #D38CFF;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .25);--chart-grid-weekend-color: #191F23;
1--cell-heat-blue-rgb: 31, 59, 102;--cell-heat-orange-rgb: 92, 58, 18;--cell-heat-green-primary-rgb: 30, 90, 46;--cell-heat-green-secondary-rgb: 22, 84, 58;--cell-heat-violet-rgb: 58, 30, 74;--cell-heat-red-rgb: 90, 28, 37}.no-value[_ngcontent-%COMP%]{color:var(--text-muted)}.chart-hidden[_ngcontent-%COMP%]{margin-bottom:16px}[_nghost-%COMP%]{min-height:60px;display:flex;flex-direction:row;overflow:hidden}[_nghost-%COMP%] .selector-label[_ngcontent-%COMP%]{cursor:pointer;border-radius:8px;background-color:var(--grey-40);padding:8px 16px;font-weight:500;font-size:14px;line-height:16px;text-transform:uppercase;max-height:32px;display:flex;align-items:center;justify-content:center;white-space:nowrap;border:1px solid transparent}@media(hover:hover)and (pointer:fine){[_nghost-%COMP%] .selector-label[_ngcontent-%COMP%]:hover:not(.disabled,.lock){border-color:var(--grey-50)}}[_nghost-%COMP%] .col-container[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:row;flex-grow:2;padding:12px 0}@media(max-width:767px){[_nghost-%COMP%] .col-container[_ngcontent-%COMP%]{padding:10px 0 12px;flex-direction:column}}[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-1[_ngcontent-%COMP%]{font-size:16px;line-height:18px;width:60%;margin-right:4px}@media(max-width:767px){[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-1[_ngcontent-%COMP%]{margin-right:0;justify-content:start;margin-bottom:16px;width:100%}}[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-2[_ngcontent-%COMP%]{font-size:14px;line-height:16px;display:flex;align-items:center;width:40%}@media(max-width:767px){[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-2[_ngcontent-%COMP%]{justify-content:start;width:100%;font-size:14px;line-height:16px}}[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-3[_ngcontent-%COMP%]{display:flex;align-items:center}@media(max-width:767px){[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-3[_ngcontent-%COMP%]{justify-content:flex-end;width:100%}}[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-3[_ngcontent-%COMP%] .delete[_ngcontent-%COMP%]{background:url(/assets/angular2/img/icons/trash-grey-70.svg) no-repeat 0;width:24px;height:24px;cursor:pointer;background-size:contain}[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-3[_ngcontent-%COMP%] .edit[_ngcontent-%COMP%]{white-space:nowrap;width:fit-content;margin-left:16px;margin-right:16px}[_nghost-%COMP%] notifications-bell[_ngcontent-%COMP%]{margin-left:12px}[_nghost-%COMP%] .alert[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%}@media(max-width:767px){[_nghost-%COMP%] .alert[_ngcontent-%COMP%]{align-items:normal;padding-top:10px}}@media(max-width:767px){[_nghost-%COMP%] .col-2[_ngcontent-%COMP%]{margin-bottom:16px}}"]});}};var oa=["*"],la=n=>({limit:n});function pa(n,t){n&1&&(Ol(0,"span",0),RT(1),Ll());}function sa(n,t){if(n&1){let e=DT();Ol(0,"span",2),Mg("click",function(a){return Rd(e),a.preventDefault(),kd(a.stopImmediatePropagation())}),ib(1),bb(2,"translateChoice"),Ll();}if(n&2){let e=NT();AE(),jl(" ",Mb(2,1,"appTracker.maximum_alert_count",Ib(4,la,e.maxAlertsCount))," ");}}var Fe=class n{constructor(){this.maxAlertsCount=200;}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275cmp=sw({type:n,selectors:[["add-track-btn"]],inputs:{limit:"limit"},ngContentSelectors:oa,decls:2,vars:2,consts:[[1,"selector-label"],[1,"notification"],[1,"notification",3,"click"]],template:function(e,i){e&1&&(AT(),uT(0,pa,2,0,"span",0),uT(1,sa,3,6,"span",1)),e&2&&(dT(i.limit?-1:0),AE(),dT(i.limit?1:-1));},dependencies:[u],styles:["[_ngcontent-%COMP%]:root{--white: #fff;--black: #000;--static-white: #fff;--static-black: #000;--grey-20: #F9F9FA;--grey-30: #E9EDEF;--grey-40: #DADFE1;--static-grey-40: #DADFE1;--grey-50: #A7B2B9;--static-grey-50: #A7B2B9;--grey-70: #506775;--grey-80: #475156;--static-grey-80: #475156;--grey-90: #3F3F46;--grey-100: #273238;--red-30: #FDEAEA;--red-40: #FF7485;--red-50: #FA354D;--yellow-30: #FFF8CF;--yellow-40: #FCE778;--yellow-50: #FEDA0F;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #E6FEE6;--green-40: #D4FABE;--green-50: #99F199;--green-70: #34C834;--green-90: #26A542;--blue-30: #EAF2FD;--blue-35: #4CE5FF;--blue-40: #D8E8FF;--blue-50: #B5D4FF;--blue-60: #6BB6FC;--blue-70: #2B98FC;--blue-70-rgb: 38, 104, 232;--blue-80: #2668E8;--blue-90: #1A54C3;--violete-20: #FAEDFF;--violete-30: #F5D9FF;--violete-60: #B259D2;--violete-80: #7B0EA2;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .15);--chart-grid-weekend-color: #F2f5f7;--cell-heat-blue-rgb: 189, 212, 255;--cell-heat-orange-rgb: 254, 217, 161;--cell-heat-green-primary-rgb: 184, 229, 125;--cell-heat-green-secondary-rgb: 139, 238, 179;--cell-heat-violet-rgb: 212, 186, 255;--cell-heat-red-rgb: 255, 135, 153}[_ngcontent-%COMP%]:root[theme=dark]{--white: #0E1113;--black: #C5C7CC;--static-white: #F2F3F5;--grey-20: #12171A;--grey-30: #1A2024;--grey-40: #1c2228;--grey-50: #2a333b;--grey-70: #5f6a72;--grey-80: #8a949b;--grey-90: #b0b6bb;--grey-100: #1b1f23;--red-30: #3A151A;--red-40: #FF6B7C;--red-50: #FF3B52;--yellow-30: #3A320F;--yellow-40: #EAD25F;--yellow-50: #FFD400;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #133A1E;--green-40: #1E5A2E;--green-50: #2E6E2E;--green-70: #34C834;--green-90: #26A542;--blue-30: #0F1C2E;--blue-35: #4CE5FF;--blue-40: #162A44;--blue-50: #1F3B66;--blue-60: #3D7DDC;--blue-70: #4B9BFF;--blue-70-rgb: 75, 155, 255;--blue-80: #5C8DFF;--blue-90: #8CB2FF;--violete-20: #2A1633;--violete-30: #3A1E4A;--violete-60: #B259D2;--violete-80: #D38CFF;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .25);--chart-grid-weekend-color: #191F23;
1--cell-heat-blue-rgb: 31, 59, 102;--cell-heat-orange-rgb: 92, 58, 18;--cell-heat-green-primary-rgb: 30, 90, 46;--cell-heat-green-secondary-rgb: 22, 84, 58;--cell-heat-violet-rgb: 58, 30, 74;--cell-heat-red-rgb: 90, 28, 37}.no-value[_ngcontent-%COMP%]{color:var(--text-muted)}.chart-hidden[_ngcontent-%COMP%]{margin-bottom:16px}[_nghost-%COMP%] .selector-label[_ngcontent-%COMP%]{cursor:pointer;border-radius:8px;background-color:var(--grey-40);padding:8px 16px;font-weight:500;font-size:14px;line-height:16px;text-transform:uppercase;max-height:32px;display:flex;align-items:center;justify-content:center;white-space:nowrap;border:1px solid transparent}@media(hover:hover)and (pointer:fine){[_nghost-%COMP%] .selector-label[_ngcontent-%COMP%]:hover:not(.disabled,.lock){border-color:var(--grey-50)}}[_nghost-%COMP%] .notification[_ngcontent-%COMP%]{font-weight:400;font-size:14px;line-height:20px;cursor:default}"]});}};function ca(n,t){if(n&1&&(Zi$1(0,"span",0),ib(1),bb(2,"async"),kl()),n&2){let e=NT();AE(),Ug(_b(2,1,e.name));}}function ma(n,t){if(n&1){let e=DT();Zi$1(0,"div",4),_g("click",function(){Rd(e);let a=NT(2);return kd(a.name.next(""))}),kl();}}function da(n,t){if(n&1){let e=DT();Zi$1(0,"div",1)(1,"input",2),bb(2,"translate"),bb(3,"async"),_g("input",function(a){Rd(e);let p=NT();return kd(p.handleInputChange(a))}),kl(),uT(4,ma,1,0,"div",3),bb(5,"async"),kl();}if(n&2){let e=NT();AE(),Ig("inputAnalyticEvent","app_tracker_alert_name_enter")("placeholder",_b(2,4,"appTracker.alert_name_placeholder"))("value",_b(3,6,e.name)),AE(3),dT(_b(5,8,e.name)?4:-1);}}var Se=class n{constructor(){this.name=new rr$1("");this.editMode=new rr$1(false);}handleInputChange(t){this.name.next(t.target.value.trim());}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275cmp=sw({type:n,selectors:[["notifications-alert-name"]],inputs:{name:"name",editMode:"editMode"},decls:3,vars:3,consts:[[1,"alert-name","text-overflow"],[1,"g-search-input-container","input-container"],["type","text","autocomplete","off","maxlength","255",1,"g-search-input","g-search-input-with-clear",3,"input","inputAnalyticEvent","placeholder","value"],[1,"g-clear-search-icon"],[1,"g-clear-search-icon",3,"click"]],template:function(e,i){e&1&&(uT(0,ca,3,3,"span",0),bb(1,"async"),Rl(2,da,6,10,"div",1)),e&2&&dT(_b(1,1,i.editMode)?2:0);},dependencies:[An,fe,o$1,hn,he],styles:["[_ngcontent-%COMP%]:root{--white: #fff;--black: #000;--static-white: #fff;--static-black: #000;--grey-20: #F9F9FA;--grey-30: #E9EDEF;--grey-40: #DADFE1;--static-grey-40: #DADFE1;--grey-50: #A7B2B9;--static-grey-50: #A7B2B9;--grey-70: #506775;--grey-80: #475156;--static-grey-80: #475156;--grey-90: #3F3F46;--grey-100: #273238;--red-30: #FDEAEA;--red-40: #FF7485;--red-50: #FA354D;--yellow-30: #FFF8CF;--yellow-40: #FCE778;--yellow-50: #FEDA0F;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #E6FEE6;--green-40: #D4FABE;--green-50: #99F199;--green-70: #34C834;--green-90: #26A542;--blue-30: #EAF2FD;--blue-35: #4CE5FF;--blue-40: #D8E8FF;--blue-50: #B5D4FF;--blue-60: #6BB6FC;--blue-70: #2B98FC;--blue-70-rgb: 38, 104, 232;--blue-80: #2668E8;--blue-90: #1A54C3;--violete-20: #FAEDFF;--violete-30: #F5D9FF;--violete-60: #B259D2;--violete-80: #7B0EA2;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .15);--chart-grid-weekend-color: #F2f5f7;--cell-heat-blue-rgb: 189, 212, 255;--cell-heat-orange-rgb: 254, 217, 161;--cell-heat-green-primary-rgb: 184, 229, 125;--cell-heat-green-secondary-rgb: 139, 238, 179;--cell-heat-violet-rgb: 212, 186, 255;--cell-heat-red-rgb: 255, 135, 153}[_ngcontent-%COMP%]:root[theme=dark]{--white: #0E1113;--black: #C5C7CC;--static-white: #F2F3F5;--grey-20: #12171A;--grey-30: #1A2024;--grey-40: #1c2228;--grey-50: #2a333b;--grey-70: #5f6a72;--grey-80: #8a949b;--grey-90: #b0b6bb;--grey-100: #1b1f23;--red-30: #3A151A;--red-40: #FF6B7C;--red-50: #FF3B52;--yellow-30: #3A320F;--yellow-40: #EAD25F;--yellow-50: #FFD400;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #133A1E;--green-40: #1E5A2E;--green-50: #2E6E2E;--green-70: #34C834;--green-90: #26A542;--blue-30: #0F1C2E;--blue-35: #4CE5FF;--blue-40: #162A44;--blue-50: #1F3B66;--blue-60: #3D7DDC;--blue-70: #4B9BFF;--blue-70-rgb: 75, 155, 255;--blue-80: #5C8DFF;--blue-90: #8CB2FF;--violete-20: #2A1633;--violete-30: #3A1E4A;--violete-60: #B259D2;--violete-80: #D38CFF;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .25);--chart-grid-weekend-color: #191F23;
1--cell-heat-blue-rgb: 31, 59, 102;--cell-heat-orange-rgb: 92, 58, 18;--cell-heat-green-primary-rgb: 30, 90, 46;--cell-heat-green-secondary-rgb: 22, 84, 58;--cell-heat-violet-rgb: 58, 30, 74;--cell-heat-red-rgb: 90, 28, 37}.no-value[_ngcontent-%COMP%]{color:var(--text-muted)}.chart-hidden[_ngcontent-%COMP%]{margin-bottom:16px}[_nghost-%COMP%]{display:flex}[_nghost-%COMP%] .alert-name[_ngcontent-%COMP%]{font-size:24px;line-height:28px}[_nghost-%COMP%] .input-container[_ngcontent-%COMP%]{max-width:50%;width:100%}@media(max-width:767px){[_nghost-%COMP%] .input-container[_ngcontent-%COMP%]{max-width:100%}}"]});}};var $e=class n{constructor(t){this.elementRef=t;}ngAfterViewInit(){let t=this.elementRef.nativeElement,i=t.firstElementChild??t,a=()=>Math.ceil(i.getBoundingClientRect().width||i.scrollWidth||0),p=()=>{let A=a();t.style.setProperty("--g-anim-size",`${A}px`),t.style.width=`${A}px`;},v=a();t.style.setProperty("--g-anim-size",`${v}px`),t.style.width="0px",t.style.opacity="0",this.enterFrameId=requestAnimationFrame(()=>{p(),t.style.opacity="1";}),this.resizeObserver=new ResizeObserver(()=>{t.style.width!=="0px"?p():t.style.setProperty("--g-anim-size",`${a()}px`);}),this.resizeObserver.observe(i);}ngOnDestroy(){this.enterFrameId&&cancelAnimationFrame(this.enterFrameId),this.resizeObserver?.disconnect();}static{this.\u0275fac=function(e){return new(e||n)(Jr$1(Gr$1))};}static{this.\u0275dir=dw({type:n,selectors:[["","animateAutoWidth",""]],hostAttrs:[1,"g-anim-inline-size-measured"]});}};var ga=n=>({count:n}),_a=n=>[n];function ua(n,t){if(n&1&&Eg(0,"notifications-alert-name",5),n&2){let e=NT(2).$implicit;Ig("name",e.name)("editMode",e.editMode);}}function Ca(n,t){if(n&1){let e=DT();Zi$1(0,"div",7),Ni("g-anim-leave-inline-size-fade"),Zi$1(1,"tag-select-multiple",9),bb(2,"async"),bb(3,"async"),bb(4,"async"),_g("changeTags",function(a){Rd(e);let p=NT(2).$implicit,v=NT();return kd(v.applyTagsValueForAlert(a,p))}),Zi$1(5,"span",10),ib(6),bb(7,"translate"),kl()()();}if(n&2){let e=NT(2).$implicit,i=NT();AE(),Ig("analyticEventsOpen","tag_selector_open")("tags",_b(2,7,i.tagService.tags))("selected",_b(3,9,e.tempTagIds))("loading",_b(4,11,i.tagService.loading))("isCustomButton",true)("applyNoItems",false),AE(5),Ug(_b(7,13,"appTracker.edit_tags"));}}function ha(n,t){if(n&1&&(Zi$1(0,"div",11),ib(1),bb(2,"translate"),kl()),n&2){let e=NT().$implicit;Ig("ngClass",e.type)("tagTooltip",e.name)("minHoverDuration",0)("tag",e)("analyticsEventPage","app-tracker")("tagIds",Ib(9,_a,e.id)),AE(),jl(" ",_b(2,7,"tags."+e.name)," ");}}function ya(n,t){if(n&1&&uT(0,ha,3,11,"div",11),n&2){let e=t.$implicit;dT(e?0:-1);}}function fa(n,t){if(n&1&&(Zi$1(0,"div",2),uT(1,ua,1,2,"notifications-alert-name",5),bb(2,"async"),bb(3,"async"),Zi$1(4,"div",6),uT(5,Ca,8,15,"div",7),bb(6,"async"),hT(7,ya,1,1,null,null,pT),Eg(9,"span",8),bb(10,"translateChoice"),kl()()),n&2){let e=NT().$implicit;AE(),dT(_b(2,3,e.name)||_b(3,5,e.editMode)?1:-1),AE(4),dT(_b(6,7,e.editMode)?5:-1),AE(2),gT(e.tempTags),AE(2),Ig("innerHTML",Mb(10,9,"appTracker.tags_count",Ib(12,ga,e.tempTags.length)),OI);}}function va(n,t){if(n&1){let e=DT();Zi$1(0,"top-apps-spikes-updates-row",12),_g("edit",function(){Rd(e);let a=NT().$implicit,p=NT();return kd(p.clickEdit(a))})("toggleStatus",function(){Rd(e);let a=NT().$implicit,p=NT();return kd(p.toggleStatus(a))})("delete",function(){Rd(e);let a=NT().$implicit,p=NT();return kd(p.deleteThresholdClick(a.alert.id))}),kl();}if(n&2){let e=NT().$implicit,i=NT();Ig("alert",e)("maxAlerts",i.maxAlerts);}}function xa(n,t){if(n&1){let e=DT();Zi$1(0,"top-apps-spikes-updates-alert",13),Ni("g-anim-leave-auto-height-fade"),Si$1("g-anim-enter-auto-height-fade"),_g("cancel",function(){Rd(e);let a=NT(),p=a.$implicit,v=a.$index,A=NT();return kd(A.clickCancelEdit(p,v))})("apply",function(a){Rd(e);let p=NT(2);return kd(p.updateAlert(a))})("delete",function(){Rd(e);let a=NT().$implicit,p=NT();return kd(p.deleteThresholdClick(a.alert.id))}),kl();}if(n&2){let e=NT().$implicit;Ig("alert",e);}}function ba(n,t){if(n&1&&(Zi$1(0,"section",1),uT(1,fa,11,14,"div",2),uT(2,va,1,2,"top-apps-spikes-updates-row",3),bb(3,"async"),uT(4,xa,1,1,"top-apps-spikes-updates-alert",4),bb(5,"async"),kl()),n&2){let e=t.$implicit;Ig("id",e.alert.id),AE(),dT(e?1:-1),AE(),dT(e&&!_b(3,4,e.editMode)?2:-1),AE(2),dT(_b(5,6,e.editMode)?4:-1);}}function Aa(n,t){if(n&1){let e=DT();Zi$1(0,"footer")(1,"tag-select-multiple",14),bb(2,"async"),bb(3,"async"),_g("
1changeTags",function(a){Rd(e);let p=NT();return kd(p.applyTagValue(a))}),Zi$1(4,"add-track-btn",15),bb(5,"async"),ib(6),bb(7,"translate"),kl()()();}if(n&2){let e=NT();AE(),Ig("analyticEventsOpen","tag_selector_open")("tags",_b(2,7,e.tagService.tags))("loading",_b(3,9,e.tagService.loading))("isCustomButton",true)("applyNoItems",false),AE(3),Ig("limit",_b(5,11,e.maxAlerts)),AE(2),Ug(_b(7,13,"tagSelect.add_tag_set"));}}function Pa(n,t){n&1&&Eg(0,"spinner",16),n&2&&Ig("diameter",28);}function wa(n,t){if(n&1&&(uT(0,Pa,1,1,"spinner",16),bb(1,"async")),n&2){let e=NT();dT(_b(1,1,e.loading)?0:-1);}}var $t=class n{constructor(t,e,i,a,p){this.deleteDialogService=t;this.analyticsService=e;this.userService=i;this.tagService=a;this.snackbarService=p;this.items=new rr$1([]);this.maxAlerts=new rr$1(false);this.loading=new rr$1(false);this.create=new tt;this.update=new tt;this.delete=new tt;this.cancel=new tt;this.subscription=new W;this.limit=200;}ngOnInit(){this.tagService.loadTags();}ngOnDestroy(){this.subscription.unsubscribe();}clickEdit(t){t.editMode.next(true),this.analyticsService.send("app_tracker_edit_click",[`${t.alert.id}`]);}updateAlert(t){if(!t)return;this.analyticsService.send("app_tracker_threshold_popup_save",t.alert.id?[`${t.alert.id}`]:[]),t.editMode.next(false),t.tagIds.next(t.tempTagIds.getValue()),t.tags=t.tempTags;let e=this.items.getValue(),i=this.items.getValue().findIndex(a=>a.alert.id===t.alert.id);if(e[i]=t,this.updateItems(e),t.alert.id===0){this.create.emit(t);return}this.update.emit(t);}clickCancelEdit(t,e){this.analyticsService.send("app_tracker_edit_cancel",[`${t.alert.id}`]),t.editMode.next(false),t.tempTagIds.next(t.tagIds.getValue()),t.tempTags=t.tags;let i=this.items.getValue();if(t.alert.id===0){setTimeout(()=>{i.splice(e,1),this.updateItems(i);},300);return}}toggleStatus(t){if(t.alert.active=!t.alert.active,!t.alert.id){let i=[`${t.alert.active}`];this.analyticsService.send("app_tracker_update_status",i);return}let e=[`${t.alert.id}`,`${t.alert.active}`];this.analyticsService.send("app_tracker_update_status",e),this.update.emit(t);}deleteThresholdClick(t){this.deleteDialogService.open(t.toString(),"appTracker.delete_alert","app_tracker_delete_click").pipe(Mu(),Tn(e=>!!e)).subscribe(()=>{let e=this.items.getValue();this.updateItems(e.filter(i=>i.alert.id!==t)),this.delete.emit(t);});}updateItems(t){this.items.next(t);}applyTagValue(t){let e=this.items.getValue(),i=this.getDefaultAlert(this.items.getValue(),t);e.push(i),this.updateItems(e);}applyTagsValueForAlert(t,e){if(!t.length){this.snackbarService.show("errors.no_items_selected",true);return}e.tempTags=t.map(i=>be.getTag(i,this.tagService.tags.getValue())),e.tempTagIds.next(t.sort());}getDefaultAlert(t,e){let i=[...t].sort((S,z)=>z.alert.id-S.alert.id),a=i.length?i[t.length-1].alert:null,p={metric:"revenue",countries:["WW"],stores:[5],aggregation:"day",type:"spike_up",spike_value:"high",count:5,tags:e},v=e.map(S=>be.getTag(S,this.tagService.tags.getValue())),A=$.getDefaultAlert(a,p,this.userService.user.getValue().email,"top_apps_spikes_updates");return E(D$1({},A),{params:p,tags:v,tempTags:v,tagIds:new rr$1(e),tempTagIds:new rr$1(e)})}static{this.\u0275fac=function(e){return new(e||n)(Jr$1(z),Jr$1(L),Jr$1(ve),Jr$1(R),Jr$1(ot))};}static{this.\u0275cmp=sw({type:n,selectors:[["top-apps-spikes-updates"]],inputs:{items:"items",maxAlerts:"maxAlerts",loading:"loading"},outputs:{create:"create",update:"update",delete:"delete",cancel:"cancel"},decls:13,vars:11,consts:[[1,"description"],[3,"id"],[1,"track-items-content"],[3,"alert","maxAlerts"],[1,"g-anim-auto-height",3,"alert"],[3,"name","editMode"],[1,"d-flex","flex-a-c","flex-wrap"],["animateAutoWidth",""],[1,"count-label",3,"innerHTML"],[3,"changeTags","analyticEventsOpen","tags","selected","loading","isCustomButton","applyNoItems"],[1,"selector-label"],[1,"tag",3,"ngClass","tagTooltip","minHoverDuration","tag","analyticsEventPage","tagIds"],[3,"edit","toggleStatus","delete","alert","maxAlerts"],[1,"g-anim-auto-height",3,"cancel","apply","delete","alert"],[1,"width-100",3,"changeTags","analyticEventsOpen","tags","loading","isCustomButton","applyNoItems"],[3,"limit"],[3,"diameter"]],template:function(e,i){e&1&&(Zi$1(0,"header"),ib(1),bb(2,"translate"),kl(),Zi$1(3,"div",0),ib(4),bb(5,"translate"),kl(),Zi$1(6,"main"),hT(7,ba,6,8,"section",1,pT),bb(9,"async"),kl(),uT(10,Aa,8,15,"footer"),bb(11,"async"),Rl(12,wa,2,3)),e&2&&(AE(),Ug(_b(2,3,"appTracker.top_apps_spikes_updates_title")),AE(3),Ug(_b(5,5,"appTracker.top_apps_spikes_updates_description")),AE(3),gT(_b(9,7,i.items)),AE(3),dT(_b(11,9,i.loading)?12:10));},dependencies:[An,un,fe,jt,zt,_e$1,tt$1,Fe,b,Se,$e,hn,he,u],styles:["[_ngcontent-%COMP%]:root{--white: #fff;--black: #000;--static-white: #fff;--static-black: #000;--grey-20: #F9F9FA;--grey-30: #E9EDEF;--grey-40: #DADFE1;--static-grey-40: #DADFE1;--grey-50: #A7B2B9;--static-grey-50: #A7B2B9;--grey-70: #506775;--grey-80: #475156;--static-grey-80: #475156;--grey-90: #3F3F46;--grey-100: #273238;--red-30: #FDEAEA;--red-40: #FF7485;--red-50: #FA354D;--yellow-30: #FFF8CF;--yellow-40: #FCE778;--yellow-50: #FEDA0F;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #E6FEE6;--green-40: #D4FABE;--green-50: #99F199;--green-70: #34C834;--green-90: #26A542;--blue-30: #EAF2FD;--blue-35: #4CE5FF;--blue-40: #D8E8FF;--blue-50: #B5D4FF;--blue-60: #6BB6FC;--blue-70: #2B98FC;--blue-70-rgb: 38, 104, 232;--blue-80: #2668E8;--blue-90: #1A54C3;--violete-20: #FAEDFF;--violete-30: #F5D9FF;--violete-60: #B259D2;--violete-80: #7B0EA2;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .15);--chart-grid-weekend-color: #F2f5f7;--cell-heat-blue-rgb: 189, 212, 255;--cell-heat-orange-rgb: 254, 217, 161;--cell-heat-green-primary-rgb: 184, 229, 125;--cell-heat-green-secondary-rgb: 139, 238, 179;--cell-heat-violet-rgb: 212, 186, 255;--cell-heat-red-rgb: 255, 135, 153}[_ngcontent-%COMP%]:root[theme=dark]{--white: #0E1113;--black: #C5C7CC;--static-white: #F2F3F5;--grey-20: #12171A;--grey-30: #1A2024;--grey-40: #1c2228;--grey-50: #2a333b;--grey-70: #5f6a72;--grey-80: #8a949b;--grey-90: #b0b6bb;--grey-100: #1b1f23;--red-30: #3A151A;--red-40: #FF6B7C;--red-50: #FF3B52;--yellow-30: #3A320F;--yellow-40: #EAD25F;--yellow-50: #FFD400;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #133A1E;--green-40: #1E5A2E;--green-50: #2E6E2E;--green-70: #34C834;--green-90: #26A542;--blue-30: #0F1C2E;--blue-35: #4CE5FF;--blue-40: #162A44;--blue-50: #1F3B66;--blue-60: #3D7DDC;--blue-70: #4B9BFF;--blue-70-rgb: 75, 155, 255;--blue-80: #5C8DFF;--blue-90: #8CB2FF;--violete-20: #2A1633;--violete-30: #3A1E4A;--violete-60: #B259D2;--violete-80: #D38CFF;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .25);--chart-grid-weekend-color: #191F23;
1--cell-heat-blue-rgb: 31, 59, 102;--cell-heat-orange-rgb: 92, 58, 18;--cell-heat-green-primary-rgb: 30, 90, 46;--cell-heat-green-secondary-rgb: 22, 84, 58;--cell-heat-violet-rgb: 58, 30, 74;--cell-heat-red-rgb: 90, 28, 37}.no-value[_ngcontent-%COMP%]{color:var(--text-muted)}.chart-hidden[_ngcontent-%COMP%]{margin-bottom:16px}[_nghost-%COMP%]{max-width:900px;width:100%}[_nghost-%COMP%] header[_ngcontent-%COMP%]{font-weight:400;font-size:34px;line-height:34px;margin-bottom:8px;margin-top:32px}[_nghost-%COMP%] .description[_ngcontent-%COMP%]{font-weight:400;font-size:16px;line-height:24px;margin-bottom:24px}[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{background:var(--grey-20);padding:12px 12px 0;border-radius:8px;margin-bottom:24px}[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding-bottom:12px;border-bottom:1px solid var(--grey-40)}[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-app-select[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-pub-select[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] tag-select-multiple[_ngcontent-%COMP%]{width:auto}[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-app-select[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-pub-select[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] tag-select-multiple[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]{cursor:pointer;border-radius:8px;background-color:var(--grey-40);padding:8px 16px;font-weight:500;font-size:14px;line-height:16px;text-transform:uppercase;max-height:32px;display:flex;align-items:center;justify-content:center;white-space:nowrap;border:1px solid transparent}@media(hover:hover)and (pointer:fine){[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-app-select[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]:hover:not(.disabled,.lock), [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-pub-select[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]:hover:not(.disabled,.lock), [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] tag-select-multiple[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]:hover:not(.disabled,.lock){border-color:var(--grey-50)}}[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-app-select[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-pub-select[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] tag-select-multiple[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]{margin-bottom:12px;margin-right:12px}[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] .count-label[_ngcontent-%COMP%]{font-size:14px;line-height:20px}[_nghost-%COMP%] main[_ngcontent-%COMP%] notifications-alert-name[_ngcontent-%COMP%]{margin-bottom:12px;max-width:100%}[_nghost-%COMP%] footer[_ngcontent-%COMP%]{display:flex;max-height:52px;align-items:center;background:var(--grey-20);border-radius:8px;width:100%;padding:12px}[_nghost-%COMP%] footer[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]{cursor:pointer;border-radius:8px;background-color:var(--grey-40);padding:8px 16px;font-weight:500;font-size:14px;line-height:16px;text-transform:uppercase;max-height:32px;display:flex;align-items:center;justify-content:center;white-space:nowrap;border:1px solid transparent}@media(hover:hover)and (pointer:fine){[_nghost-%COMP%] footer[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]:hover:not(.disabled,.lock){border-color:var(--grey-50)}}[_nghost-%COMP%] footer[_ngcontent-%COMP%] multi-app-select[_ngcontent-%COMP%], [_nghost-%COMP%] footer[_ngcontent-%COMP%] publisher-select[_ngcontent-%COMP%], [_nghost-%COMP%] footer[_ngcontent-%COMP%] tag-select-multiple[_ngcontent-%COMP%]{width:fit-content}[_nghost-%COMP%]{--g-anim-duration: .3s}[_nghost-%COMP%] .track-items-content[_ngcontent-%COMP%]{padding-bottom:0!important}[_nghost-%COMP%] .count-label[_ngcontent-%COMP%]{margin-bottom:12px}[_nghost-%COMP%] .tag[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;display:inline-block;box-sizing:border-box;outline:none;background-color:var(--blue-30);padding:0 10px;border-radius:4px;color:var(--black);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[_nghost-%COMP%] .tag.disabled[_ngcontent-%COMP%]{pointer-events:none;background:var(--grey-30);color:var(--grey-50)}[_nghost-%COMP%] .tag.not-hover[_ngcontent-%COMP%]{cursor:default}[_nghost-%COMP%] .tag.artstyles[_ngcontent-%COMP%]{background-color:var(--green-30)}[_nghost-%COMP%] .tag.settings[_ngcontent-%COMP%]{background-color:var(--red-30)}[_nghost-%COMP%] .tag[_ngcontent-%COMP%]:not(.not-hover):hover{background-color:var(--yellow-40);color:var(--on-accent)}[_nghost-%COMP%] .tag[_ngcontent-%COMP%] .tag-icon[_ngcontent-%COMP%]{margin-left:7px;position:inherit;width:16px;height:16px}[_nghost-%COMP%] .tag[_ngcontent-%COMP%]{margin:4px 8px;font-size:16px;line-height:30px;padding:0 10px;border-radius:4px}[_nghost-%COMP%] .tag[_ngcontent-%COMP%]{height:32px;border-radius:8px;font-size:14px;margin:0 12px 12px 0}"]});}};function Ma(n,t){n&1&&(Zi$1(0,"header")(1,"div",1)(2,"span",2),ib(3),bb(4,"translate"),kl()()()),n&2&&(AE(3),Ug(_b(4,1,"appTracker.new_apps_by_pub_row_text")));}function ka(n,t){if(n&1){let e=DT();Zi$1(0,"alert-footer",3),_g("delete",function(){Rd(e);let a=NT();return kd(a.delete.emit(a.alert))})("updateSlackStatus",function(){Rd(e);let a=NT();return kd(a.footerService.toggleSlack())})("updateEmailStatus",function(){Rd(e);let a=NT();return kd(a.footerService.toggleEmail())})("sendTest",function(){Rd(e);let a=NT();return kd(a.footerService.sendNotify(a.alert,a.tempParams.getValue()))})("cancel",function(){Rd(e);let a=NT();return kd(a.cancel.emit())})("apply",function(){Rd(e);let a=NT();return kd(a.update())}),kl();}if(n&2){let e=NT();Ig("slackActive",e.footerService.slackActive)("slackUrl",e.footerService.slackUrl)("slackUrlLoading",e.footerService.slackUrlLoading)("email",e.footerService.email)("emailActive",e.footerService.emailActive)("label",e.footerService.label)("loading",e.footerService.loading)("needSave",e.isAlertNeedSave);}}var Wt=class n{constructor(t){this.footerService=t;
1this.cancel=new tt;this.apply=new tt;this.delete=new tt;this.tempParams=new rr$1(null);this.subscription=new W;this.isAlertNeedSave=new rr$1(false);}ngOnInit(){this.footerService.init(this.alert.alert),this.tempParams.next(Hp(this.alert.params)),this.subscription.add(qm([this.tempParams,this.footerService.isFooterChanged,this.alert.name]).subscribe(([t,e,i])=>{let a=!Tu(t,this.alert.params),p=this.alert.alert.id===0,v=this.alert.alert.title!==i,A=p||a||e||v;this.isAlertNeedSave.next(A&&this.footerService.isSlackOrEmailUsed());})),this.subscription.add(this.alert.tempPublishers.subscribe(t=>{let e=this.tempParams.getValue();e.publisher_ids=$.getPubIdsByUnitedPubs(t),this.tempParams.next(e);}));}ngOnDestroy(){this.subscription.unsubscribe(),this.footerService.destroy();}update(){let t=this.tempParams.getValue();this.alert.alert.title=this.alert.name.getValue(),t.publisher_ids=$.getPubIdsByUnitedPubs(this.alert.tempPublishers.getValue()),this.footerService.prepareAlert(this.alert,t),this.apply.emit(this.alert);}static{this.\u0275fac=function(e){return new(e||n)(Jr$1(K))};}static{this.\u0275cmp=sw({type:n,selectors:[["new-apps-by-pub-alert"]],inputs:{alert:"alert"},outputs:{cancel:"cancel",apply:"apply",delete:"delete"},features:[yb([K])],decls:4,vars:6,consts:[[3,"slackActive","slackUrl","slackUrlLoading","email","emailActive","label","loading","needSave"],[1,"d-flex","flex-a-c"],[1,"text-label"],[3,"delete","updateSlackStatus","updateEmailStatus","sendTest","cancel","apply","slackActive","slackUrl","slackUrlLoading","email","emailActive","label","loading","needSave"]],template:function(e,i){e&1&&(uT(0,Ma,5,3,"header"),bb(1,"async"),uT(2,ka,1,8,"alert-footer",0),bb(3,"async")),e&2&&(dT(_b(1,2,i.tempParams)?0:-1),AE(2),dT(_b(3,4,i.tempParams)?2:-1));},dependencies:[An,oa$1,fe,we,hn,he],styles:["[_ngcontent-%COMP%]:root{--white: #fff;--black: #000;--static-white: #fff;--static-black: #000;--grey-20: #F9F9FA;--grey-30: #E9EDEF;--grey-40: #DADFE1;--static-grey-40: #DADFE1;--grey-50: #A7B2B9;--static-grey-50: #A7B2B9;--grey-70: #506775;--grey-80: #475156;--static-grey-80: #475156;--grey-90: #3F3F46;--grey-100: #273238;--red-30: #FDEAEA;--red-40: #FF7485;--red-50: #FA354D;--yellow-30: #FFF8CF;--yellow-40: #FCE778;--yellow-50: #FEDA0F;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #E6FEE6;--green-40: #D4FABE;--green-50: #99F199;--green-70: #34C834;--green-90: #26A542;--blue-30: #EAF2FD;--blue-35: #4CE5FF;--blue-40: #D8E8FF;--blue-50: #B5D4FF;--blue-60: #6BB6FC;--blue-70: #2B98FC;--blue-70-rgb: 38, 104, 232;--blue-80: #2668E8;--blue-90: #1A54C3;--violete-20: #FAEDFF;--violete-30: #F5D9FF;--violete-60: #B259D2;--violete-80: #7B0EA2;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .15);--chart-grid-weekend-color: #F2f5f7;--cell-heat-blue-rgb: 189, 212, 255;--cell-heat-orange-rgb: 254, 217, 161;--cell-heat-green-primary-rgb: 184, 229, 125;--cell-heat-green-secondary-rgb: 139, 238, 179;--cell-heat-violet-rgb: 212, 186, 255;--cell-heat-red-rgb: 255, 135, 153}[_ngcontent-%COMP%]:root[theme=dark]{--white: #0E1113;--black: #C5C7CC;--static-white: #F2F3F5;--grey-20: #12171A;--grey-30: #1A2024;--grey-40: #1c2228;--grey-50: #2a333b;--grey-70: #5f6a72;--grey-80: #8a949b;--grey-90: #b0b6bb;--grey-100: #1b1f23;--red-30: #3A151A;--red-40: #FF6B7C;--red-50: #FF3B52;--yellow-30: #3A320F;--yellow-40: #EAD25F;--yellow-50: #FFD400;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #133A1E;--green-40: #1E5A2E;--green-50: #2E6E2E;--green-70: #34C834;--green-90: #26A542;--blue-30: #0F1C2E;--blue-35: #4CE5FF;--blue-40: #162A44;--blue-50: #1F3B66;--blue-60: #3D7DDC;--blue-70: #4B9BFF;--blue-70-rgb: 75, 155, 255;--blue-80: #5C8DFF;--blue-90: #8CB2FF;--violete-20: #2A1633;--violete-30: #3A1E4A;--violete-60: #B259D2;--violete-80: #D38CFF;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .25);--chart-grid-weekend-color: #191F23;
1--cell-heat-blue-rgb: 31, 59, 102;--cell-heat-orange-rgb: 92, 58, 18;--cell-heat-green-primary-rgb: 30, 90, 46;--cell-heat-green-secondary-rgb: 22, 84, 58;--cell-heat-violet-rgb: 58, 30, 74;--cell-heat-red-rgb: 90, 28, 37}.no-value[_ngcontent-%COMP%]{color:var(--text-muted)}.chart-hidden[_ngcontent-%COMP%]{margin-bottom:16px}[_nghost-%COMP%]{display:flex;flex-direction:column;padding-top:16px;padding-bottom:16px}[_nghost-%COMP%] .text-none-transform[_ngcontent-%COMP%]{text-transform:none!important}[_nghost-%COMP%] header[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-bottom:20px;font-size:14px;line-height:16px}[_nghost-%COMP%] header[_ngcontent-%COMP%] .text-label[_ngcontent-%COMP%]{font-weight:500}[_nghost-%COMP%] header[_ngcontent-%COMP%] .label-bell[_ngcontent-%COMP%]{margin-bottom:12px}[_nghost-%COMP%] header[_ngcontent-%COMP%] .label-notify[_ngcontent-%COMP%]{margin-top:8px}[_nghost-%COMP%] main[_ngcontent-%COMP%] .position-text[_ngcontent-%COMP%]{line-height:32px;margin-bottom:12px;margin-left:8px}[_nghost-%COMP%] main[_ngcontent-%COMP%] .aggregation-tooltip[_ngcontent-%COMP%]{margin-left:8px;margin-bottom:14px}[_nghost-%COMP%] main[_ngcontent-%COMP%] .mob-selectors[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column}[_nghost-%COMP%] main[_ngcontent-%COMP%] .mob-selectors[_ngcontent-%COMP%] .value-input-container[_ngcontent-%COMP%]{width:100%;margin-bottom:16px}[_nghost-%COMP%] main[_ngcontent-%COMP%] .mob-spans[_ngcontent-%COMP%]{display:flex;flex-direction:column}[_nghost-%COMP%] main[_ngcontent-%COMP%] .mob-spans[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{height:32px;margin-bottom:16px;padding:8px 8px 8px 0;line-height:16px;text-transform:lowercase}[_nghost-%COMP%] main[_ngcontent-%COMP%] .selector-wrap[_ngcontent-%COMP%]{max-width:284px;width:100%;display:flex;align-items:center}@media(max-width:767px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .selector-wrap[_ngcontent-%COMP%]{max-width:100%}}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:12px;max-width:284px;width:100%}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%]:last-child{margin-right:0}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector.last-child[_ngcontent-%COMP%]{margin-right:0}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector.mob-ls[_ngcontent-%COMP%]{display:none}@media(max-width:767px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector.mob-ls[_ngcontent-%COMP%]{display:flex}}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector.not-mob-ls[_ngcontent-%COMP%]{display:flex}@media(max-width:767px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector.not-mob-ls[_ngcontent-%COMP%]{display:none}}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%] > i[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{pointer-events:none}@media(max-width:767px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%]{max-width:100%}}@media(max-width:576px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%]{margin-right:0!important;width:100%;max-width:100%;margin-bottom:16px}}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-weight:400;width:100%}[_nghost-%COMP%] main[_ngcontent-%COMP%] .help-icon[_ngcontent-%COMP%]{font-size:17px;outline:none;cursor:default}[_nghost-%COMP%] main[_ngcontent-%COMP%] .padding-bottom[_ngcontent-%COMP%]{padding-bottom:24px}@media(max-width:576px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .padding-bottom[_ngcontent-%COMP%]{padding-bottom:0}}[_nghost-%COMP%] main[_ngcontent-%COMP%] .value-input-container[_ngcontent-%COMP%]{position:relative;width:100%;max-width:280px;min-width:180px;display:inline-block}@media(max-width:767px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .value-input-container[_ngcontent-%COMP%]{min-width:100px}}@media(max-width:576px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .value-input-container[_ngcontent-%COMP%]{max-width:100%}}[_nghost-%COMP%] main[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{font-size:14px;line-height:16px;text-transform:lowercase;max-width:100%}[_nghost-%COMP%] alert-footer[_ngcontent-%COMP%]{margin-top:4px}[_nghost-%COMP%] header[_ngcontent-%COMP%]{font-size:16px;line-height:18px}"]});}};function Fa(n,t){if(n&1){let e=DT();Zi$1(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),ib(4),bb(5,"translate"),kl()(),Eg(6,"div",4),Zi$1(7,"div",5)(8,"notifications-bell",6),_g("toggleStatus",function(){Rd(e);let a=NT();return kd(a.toggleStatus.emit(a.alert))}),kl(),Zi$1(9,"div",7),_g("click",function(){Rd(e);let a=NT();return kd(a.edit.emit())}),ib(10),bb(11,"translate"),kl(),Zi$1(12,"div",8),_g("click",function(){Rd(e);let a=NT();return kd(a.delete.emit())}),kl()()()();}if(n&2){let e=NT();AE(4),Ug(_b(5,3,"appTracker.new_apps_by_pub_row_text")),AE(4),Ig("active",e.alert.alert.active),AE(2),jl(" ",_b(11,5,"appTracker.edit_alert")," ");}}var Gt=class n{constructor(){this.maxAlerts=new rr$1(false);this.edit=new tt;this.delete=new tt;this.toggleStatus=new tt;}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275cmp=sw({type:n,selectors:[["new-apps-by-pub-row"]],inputs:{alert:"alert",maxAlerts:"maxAlerts"},outputs:{edit:"edit",delete:"delete",toggleStatus:"toggleStatus"},decls:1,vars:1,consts:[[1,"alert"],[1,"col-container"],[1,"col-1"],[1,""],[1,"col-2"],[1,"col-3"],[3,"toggleStatus","active"],[1,"edit","selector-label",3,"click"],[1,"delete",3,"click"]],template:function(e,i){e&1&&uT(0,Fa,13,7,"div",0),e&2&&dT(i.alert?0:-1);},dependencies:[fe,ke,he],styles:["[_ngcontent-%COMP%]:root{--white: #fff;--black: #000;--static-white: #fff;--static-black: #000;--grey-20: #F9F9FA;--grey-30: #E9EDEF;--grey-40: #DADFE1;--static-grey-40: #DADFE1;--grey-50: #A7B2B9;--static-grey-50: #A7B2B9;--grey-70: #506775;--grey-80: #475156;--static-grey-80: #475156;--grey-90: #3F3F46;--grey-100: #273238;--red-30: #FDEAEA;--red-40: #FF7485;--red-50: #FA354D;--yellow-30: #FFF8CF;--yellow-40: #FCE778;--yellow-50: #FEDA0F;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #E6FEE6;--green-40: #D4FABE;--green-50: #99F199;--green-70: #34C834;--green-90: #26A542;--blue-30: #EAF2FD;--blue-35: #4CE5FF;--blue-40: #D8E8FF;--blue-50: #B5D4FF;--blue-60: #6BB6FC;--blue-70: #2B98FC;--blue-70-rgb: 38, 104, 232;--blue-80: #2668E8;--blue-90: #1A54C3;--violete-20: #FAEDFF;--violete-30: #F5D9FF;--violete-60: #B259D2;--violete-80: #7B0EA2;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .15);--chart-grid-weekend-color: #F2f5f7;--cell-heat-blue-rgb: 189, 212, 255;--cell-heat-orange-rgb: 254, 217, 161;--cell-heat-green-primary-rgb: 184, 229, 125;--cell-heat-green-secondary-rgb: 139, 238, 179;--cell-heat-violet-rgb: 212, 186, 255;--cell-heat-red-rgb: 255, 135, 153}[_ngcontent-%COMP%]:root[theme=dark]{--white: #0E1113;--black: #C5C7CC;--static-white: #F2F3F5;--grey-20: #12171A;--grey-30: #1A2024;--grey-40: #1c2228;--grey-50: #2a333b;--grey-70: #5f6a72;--grey-80: #8a949b;--grey-90: #b0b6bb;--grey-100: #1b1f23;--red-30: #3A151A;--red-40: #FF6B7C;--red-50: #FF3B52;--yellow-30: #3A320F;--yellow-40: #EAD25F;--yellow-50: #FFD400;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #133A1E;--green-40: #1E5A2E;--green-50: #2E6E2E;--green-70: #34C834;--green-90: #26A542;--blue-30: #0F1C2E;--blue-35: #4CE5FF;--blue-40: #162A44;--blue-50: #1F3B66;--blue-60: #3D7DDC;--blue-70: #4B9BFF;--blue-70-rgb: 75, 155, 255;--blue-80: #5C8DFF;--blue-90: #8CB2FF;--violete-20: #2A1633;--violete-30: #3A1E4A;--violete-60: #B259D2;--violete-80: #D38CFF;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .25);--chart-grid-weekend-color: #191F23;
1--cell-heat-blue-rgb: 31, 59, 102;--cell-heat-orange-rgb: 92, 58, 18;--cell-heat-green-primary-rgb: 30, 90, 46;--cell-heat-green-secondary-rgb: 22, 84, 58;--cell-heat-violet-rgb: 58, 30, 74;--cell-heat-red-rgb: 90, 28, 37}.no-value[_ngcontent-%COMP%]{color:var(--text-muted)}.chart-hidden[_ngcontent-%COMP%]{margin-bottom:16px}[_nghost-%COMP%]{min-height:60px;display:flex;flex-direction:row;overflow:hidden}[_nghost-%COMP%] .selector-label[_ngcontent-%COMP%]{cursor:pointer;border-radius:8px;background-color:var(--grey-40);padding:8px 16px;font-weight:500;font-size:14px;line-height:16px;text-transform:uppercase;max-height:32px;display:flex;align-items:center;justify-content:center;white-space:nowrap;border:1px solid transparent}@media(hover:hover)and (pointer:fine){[_nghost-%COMP%] .selector-label[_ngcontent-%COMP%]:hover:not(.disabled,.lock){border-color:var(--grey-50)}}[_nghost-%COMP%] .col-container[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:row;flex-grow:2;padding:12px 0}@media(max-width:767px){[_nghost-%COMP%] .col-container[_ngcontent-%COMP%]{padding:10px 0 12px;flex-direction:column}}[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-1[_ngcontent-%COMP%]{font-size:16px;line-height:18px;width:60%;margin-right:4px}@media(max-width:767px){[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-1[_ngcontent-%COMP%]{margin-right:0;justify-content:start;margin-bottom:16px;width:100%}}[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-2[_ngcontent-%COMP%]{font-size:14px;line-height:16px;display:flex;align-items:center;width:40%}@media(max-width:767px){[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-2[_ngcontent-%COMP%]{justify-content:start;width:100%;font-size:14px;line-height:16px}}[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-3[_ngcontent-%COMP%]{display:flex;align-items:center}@media(max-width:767px){[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-3[_ngcontent-%COMP%]{justify-content:flex-end;width:100%}}[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-3[_ngcontent-%COMP%] .delete[_ngcontent-%COMP%]{background:url(/assets/angular2/img/icons/trash-grey-70.svg) no-repeat 0;width:24px;height:24px;cursor:pointer;background-size:contain}[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-3[_ngcontent-%COMP%] .edit[_ngcontent-%COMP%]{white-space:nowrap;width:fit-content;margin-left:16px;margin-right:16px}[_nghost-%COMP%] notifications-bell[_ngcontent-%COMP%]{margin-left:12px}[_nghost-%COMP%] .alert[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%}@media(max-width:767px){[_nghost-%COMP%] .alert[_ngcontent-%COMP%]{align-items:normal;padding-top:10px}}"]});}};var Sa=n=>({count:n});function Oa(n,t){if(n&1&&Eg(0,"notifications-alert-name",3),n&2){let e=NT().$implicit;Ig("name",e.name)("editMode",e.editMode);}}function Ta(n,t){if(n&1){let e=DT();Zi$1(0,"div",5),Ni("g-anim-leave-inline-size-fade"),Zi$1(1,"multi-pub-select",10),bb(2,"async"),_g("apply",function(a){Rd(e);let p=NT().$implicit,v=NT();return kd(v.applyPublishersValueForAlert(a,p))}),Zi$1(3,"span",11),ib(4),bb(5,"translate"),kl()()();}if(n&2){let e=NT().$implicit;AE(),Ig("value",_b(2,5,e.tempPublishers))("isCustomButton",true)("showAllBtn",false)("applyNoItems",false),AE(3),Ug(_b(5,7,"appTracker.edit_pub_set"));}}function Ea(n,t){if(n&1&&Eg(0,"flag",12),n&2){let e=NT().$implicit;Ig("flag",e.headquarter);}}function Ba(n,t){if(n&1&&(Zi$1(0,"a",6),uT(1,Ea,1,1,"flag",12),Eg(2,"div",13),kl()),n&2){let e=t.$implicit;Ig("href",e.publisherPageLink,qp),AE(),dT(e.headquarter?1:-1),AE(),Ig("title",e.name)("innerHTML",e.name,OI);}}function Da(n,t){if(n&1){let e=DT();Zi$1(0,"new-apps-by-pub-row",14),_g("edit",function(){Rd(e);let a=NT().$implicit,p=NT();return kd(p.clickEdit(a))})("toggleStatus",function(){Rd(e);let a=NT().$implicit,p=NT();return kd(p.toggleStatus(a))})("delete",function(){Rd(e);let a=NT().$implicit,p=NT();return kd(p.deleteThresholdClick(a.alert.id))}),kl();}if(n&2){let e=NT().$implicit,i=NT();Ig("alert",e)("maxAlerts",i.maxAlerts);}}function Va(n,t){if(n&1){let e=DT();Zi$1(0,"new-apps-by-pub-alert",15),Ni("g-anim-leave-auto-height-fade"),Si$1("g-anim-enter-auto-height-fade"),_g("cancel",function(){Rd(e);let a=NT(),p=a.$implicit,v=a.$index,A=NT();return kd(A.clickCancelEdit(p,v))})("apply",function(a){Rd(e);let p=NT(2);return kd(p.updateAlert(a))})("delete",function(){Rd(e);let a=NT().$implicit,p=NT();return kd(p.deleteThresholdClick(a.alert.id))}),kl();}if(n&2){let e=NT().$implicit;Ig("alert",e);}}function Ua(n,t){if(n&1&&(Zi$1(0,"section",1)(1,"div",2),uT(2,Oa,1,2,"notifications-alert-name",3),bb(3,"async"),bb(4,"async"),Zi$1(5,"div",4),uT(6,Ta,6,9,"div",5),bb(7,"async"),hT(8,Ba,3,4,"a",6,pT),bb(10,"async"),Eg(11,"span",7),bb(12,"async"),bb(13,"translateChoice"),kl()(),uT(14,Da,1,2,"new-apps-by-pub-row",8),bb(15,"async"),uT(16,Va,1,1,"new-apps-by-pub-alert",9),bb(17,"async"),kl()),n&2){let e,i=t.$implicit;Ig("id",i.alert.id),AE(2),dT(_b(3,6,i.name)||_b(4,8,i.editMode)?2:-1),AE(4),dT(_b(7,10,i.editMode)?6:-1),AE(2),gT(_b(10,12,i.tempPublishers)),AE(3),Ig("innerHTML",Mb(13,16,"appTracker.publishers_count",Ib(23,Sa,(e=_b(12,14,i.tempPublishers))==null?null:e.length)),OI),AE(3),dT(_b(15,19,i.editMode)?-1:14),AE(2),dT(_b(17,21,i.editMode)?16:-1);}}function Ia(n,t){if(n&1){let e=DT();Zi$1(0,"footer")(1,"multi-pub-select",16),_g("apply",function(a){Rd(e);let p=NT();return kd(p.applyPublisherValue(a))}),Zi$1(2,"add-track-btn",17),bb(3,"async"),ib(4),bb(5,"translate"),kl()()();}if(n&2){let e=NT();AE(),Ig("isCustomButton",true)("showAllBtn",false),AE(),Ig("limit",_b(3,4,e.maxAlerts)),AE(2),Ug(_b(5,6,"appTracker.add_pub_set"));}}function Na(n,t){n&1&&Eg(0,"spinner",18),n&2&&Ig("diameter",28);}function La(n,t){if(n&1&&(uT(0,Na,1,1,"spinner",18),bb(1,"async")),n&2){let e=NT();dT(_b(1,1,e.loading)?0:-1);}}var Ht=class n{constructor(){this.items=new rr$1([]);this.maxAlerts=new rr$1(false);this.loading=new rr$1(false);this.pubFromParam=new rr$1(null);this.create=new tt;this.update=new tt;this.delete=new tt;
1this.cancel=new tt;this.subscription=new W;this.analyticsService=D(L);this.userService=D(ve);this.elementRef=D(Gr$1);this.deleteDialogService=D(z);}ngOnInit(){this.subscription.add(this.pubFromParam.pipe(Tn(t=>!!t)).subscribe(t=>{this.addAlert([t]),setTimeout(()=>this.scrollToNewAlert(),800);}));}ngOnDestroy(){this.subscription.unsubscribe();}scrollToNewAlert(){let t=this.elementRef.nativeElement.getElementsByTagName("new-apps-by-pub-alert");t&&t.length>0&&t[t.length-1].scrollIntoView({behavior:"smooth",block:"start"});}clickEdit(t){t.editMode.next(true),this.analyticsService.send("app_tracker_edit_click",[`${t.alert.id}`]);}updateAlert(t){if(!t)return;t.editMode.next(false),t.publishers.next(t.tempPublishers.getValue());let e=this.items.getValue(),i=this.items.getValue().findIndex(a=>a.alert.id===t.alert.id);if(e[i]=t,this.updateItems(e),t.alert.id===0){this.create.emit(t);return}this.update.emit(t);}clickCancelEdit(t,e){this.analyticsService.send("app_tracker_edit_cancel",[`${t.alert.id}`]),t.editMode.next(false),t.tempPublishers.next(t.publishers.getValue());let i=this.items.getValue();if(t.alert.id===0){setTimeout(()=>{i.splice(e,1),this.updateItems(i);},300);return}}toggleStatus(t){if(t.alert.active=!t.alert.active,!t.alert.id){let i=[`${t.alert.active}`];this.analyticsService.send("app_tracker_update_status",i);return}let e=[`${t.alert.id}`,`${t.alert.active}`];this.analyticsService.send("app_tracker_update_status",e),this.update.emit(t);}deleteThresholdClick(t){this.deleteDialogService.open(t.toString(),"appTracker.delete_alert","app_tracker_delete_click").pipe(Mu(),Tn(e=>!!e)).subscribe(()=>{let e=this.items.getValue();this.updateItems(e.filter(i=>i.alert.id!==t)),this.delete.emit(t);});}updateItems(t){this.items.next(t);}applyPublisherValue(t){t.closePanel(),this.addAlert(t.value);}addAlert(t){let e=this.items.getValue(),i=this.getDefaultAlert(this.items.getValue(),t);e.push(i),this.updateItems(e);}applyPublishersValueForAlert(t,e){t.closePanel(),e.tempPublishers.next(t.value);}getDefaultAlert(t,e){let i=[...t].sort((T,S)=>S.alert.id-T.alert.id),a=i.length?i[t.length-1].alert:null,p={publisher_ids:e.map(T=>T.publisherIds[0])},v=$.getDefaultAlert(a,p,this.userService.user.getValue().email,"new_apps_by_pub");return E(D$1({},v),{params:p,publishers:new rr$1(e),tempPublishers:new rr$1(e)})}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275cmp=sw({type:n,selectors:[["new-apps-by-pub"]],inputs:{items:"items",maxAlerts:"maxAlerts",loading:"loading",pubFromParam:"pubFromParam"},outputs:{create:"create",update:"update",delete:"delete",cancel:"cancel"},decls:13,vars:11,consts:[[1,"description"],[3,"id"],[1,"track-items-content"],[3,"name","editMode"],[1,"d-flex","flex-a-c","flex-wrap"],["animateAutoWidth",""],["target","_blank",1,"publisher",3,"href"],[1,"count-label",3,"innerHTML"],[3,"alert","maxAlerts"],[1,"g-anim-auto-height",3,"alert"],[3,"apply","value","isCustomButton","showAllBtn","applyNoItems"],[1,"selector-label"],[1,"g-flag-small-margin",3,"flag"],["stopImmediate","",1,"text-overflow",3,"title","innerHTML"],[3,"edit","toggleStatus","delete","alert","maxAlerts"],[1,"g-anim-auto-height",3,"cancel","apply","delete","alert"],[3,"apply","isCustomButton","showAllBtn"],[3,"limit"],[3,"diameter"]],template:function(e,i){e&1&&(Zi$1(0,"header"),ib(1),bb(2,"translate"),kl(),Zi$1(3,"div",0),ib(4),bb(5,"translate"),kl(),Zi$1(6,"main"),hT(7,Ua,18,25,"section",1,pT),bb(9,"async"),kl(),uT(10,Ia,6,8,"footer"),bb(11,"async"),Rl(12,La,2,3)),e&2&&(AE(),Ug(_b(2,3,"appTracker.new_apps_by_pub_title")),AE(3),Ug(_b(5,5,"appTracker.new_apps_by_pub_description")),AE(3),gT(_b(9,7,i.items)),AE(3),dT(_b(11,9,i.loading)?12:10));},dependencies:[An,fe,Wt,Gt,Fe,Ze,_,s,b,Se,$e,hn,he,u],styles:["[_ngcontent-%COMP%]:root{--white: #fff;--black: #000;--static-white: #fff;--static-black: #000;--grey-20: #F9F9FA;--grey-30: #E9EDEF;--grey-40: #DADFE1;--static-grey-40: #DADFE1;--grey-50: #A7B2B9;--static-grey-50: #A7B2B9;--grey-70: #506775;--grey-80: #475156;--static-grey-80: #475156;--grey-90: #3F3F46;--grey-100: #273238;--red-30: #FDEAEA;--red-40: #FF7485;--red-50: #FA354D;--yellow-30: #FFF8CF;--yellow-40: #FCE778;--yellow-50: #FEDA0F;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #E6FEE6;--green-40: #D4FABE;--green-50: #99F199;--green-70: #34C834;--green-90: #26A542;--blue-30: #EAF2FD;--blue-35: #4CE5FF;--blue-40: #D8E8FF;--blue-50: #B5D4FF;--blue-60: #6BB6FC;--blue-70: #2B98FC;--blue-70-rgb: 38, 104, 232;--blue-80: #2668E8;--blue-90: #1A54C3;--violete-20: #FAEDFF;--violete-30: #F5D9FF;--violete-60: #B259D2;--violete-80: #7B0EA2;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .15);--chart-grid-weekend-color: #F2f5f7;--cell-heat-blue-rgb: 189, 212, 255;--cell-heat-orange-rgb: 254, 217, 161;--cell-heat-green-primary-rgb: 184, 229, 125;--cell-heat-green-secondary-rgb: 139, 238, 179;--cell-heat-violet-rgb: 212, 186, 255;--cell-heat-red-rgb: 255, 135, 153}[_ngcontent-%COMP%]:root[theme=dark]{--white: #0E1113;--black: #C5C7CC;--static-white: #F2F3F5;--grey-20: #12171A;--grey-30: #1A2024;--grey-40: #1c2228;--grey-50: #2a333b;--grey-70: #5f6a72;--grey-80: #8a949b;--grey-90: #b0b6bb;--grey-100: #1b1f23;--red-30: #3A151A;--red-40: #FF6B7C;--red-50: #FF3B52;--yellow-30: #3A320F;--yellow-40: #EAD25F;--yellow-50: #FFD400;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #133A1E;--green-40: #1E5A2E;--green-50: #2E6E2E;--green-70: #34C834;--green-90: #26A542;--blue-30: #0F1C2E;--blue-35: #4CE5FF;--blue-40: #162A44;--blue-50: #1F3B66;--blue-60: #3D7DDC;--blue-70: #4B9BFF;--blue-70-rgb: 75, 155, 255;--blue-80: #5C8DFF;--blue-90: #8CB2FF;--violete-20: #2A1633;--violete-30: #3A1E4A;--violete-60: #B259D2;--violete-80: #D38CFF;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .25);--chart-grid-weekend-color: #191F23;
1--cell-heat-blue-rgb: 31, 59, 102;--cell-heat-orange-rgb: 92, 58, 18;--cell-heat-green-primary-rgb: 30, 90, 46;--cell-heat-green-secondary-rgb: 22, 84, 58;--cell-heat-violet-rgb: 58, 30, 74;--cell-heat-red-rgb: 90, 28, 37}.no-value[_ngcontent-%COMP%]{color:var(--text-muted)}.chart-hidden[_ngcontent-%COMP%]{margin-bottom:16px}[_nghost-%COMP%]{max-width:900px;width:100%}[_nghost-%COMP%] header[_ngcontent-%COMP%]{font-weight:400;font-size:34px;line-height:34px;margin-bottom:8px;margin-top:32px}[_nghost-%COMP%] .description[_ngcontent-%COMP%]{font-weight:400;font-size:16px;line-height:24px;margin-bottom:24px}[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{background:var(--grey-20);padding:12px 12px 0;border-radius:8px;margin-bottom:24px}[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding-bottom:12px;border-bottom:1px solid var(--grey-40)}[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-app-select[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-pub-select[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] tag-select-multiple[_ngcontent-%COMP%]{width:auto}[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-app-select[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-pub-select[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] tag-select-multiple[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]{cursor:pointer;border-radius:8px;background-color:var(--grey-40);padding:8px 16px;font-weight:500;font-size:14px;line-height:16px;text-transform:uppercase;max-height:32px;display:flex;align-items:center;justify-content:center;white-space:nowrap;border:1px solid transparent}@media(hover:hover)and (pointer:fine){[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-app-select[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]:hover:not(.disabled,.lock), [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-pub-select[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]:hover:not(.disabled,.lock), [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] tag-select-multiple[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]:hover:not(.disabled,.lock){border-color:var(--grey-50)}}[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-app-select[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-pub-select[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] tag-select-multiple[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]{margin-bottom:12px;margin-right:12px}[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] .count-label[_ngcontent-%COMP%]{font-size:14px;line-height:20px}[_nghost-%COMP%] main[_ngcontent-%COMP%] notifications-alert-name[_ngcontent-%COMP%]{margin-bottom:12px;max-width:100%}[_nghost-%COMP%] footer[_ngcontent-%COMP%]{display:flex;max-height:52px;align-items:center;background:var(--grey-20);border-radius:8px;width:100%;padding:12px}[_nghost-%COMP%] footer[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]{cursor:pointer;border-radius:8px;background-color:var(--grey-40);padding:8px 16px;font-weight:500;font-size:14px;line-height:16px;text-transform:uppercase;max-height:32px;display:flex;align-items:center;justify-content:center;white-space:nowrap;border:1px solid transparent}@media(hover:hover)and (pointer:fine){[_nghost-%COMP%] footer[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]:hover:not(.disabled,.lock){border-color:var(--grey-50)}}[_nghost-%COMP%] footer[_ngcontent-%COMP%] multi-app-select[_ngcontent-%COMP%], [_nghost-%COMP%] footer[_ngcontent-%COMP%] publisher-select[_ngcontent-%COMP%], [_nghost-%COMP%] footer[_ngcontent-%COMP%] tag-select-multiple[_ngcontent-%COMP%]{width:fit-content}[_nghost-%COMP%]{--g-anim-duration: .3s}[_nghost-%COMP%] main[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%]{padding-bottom:0!important}[_nghost-%COMP%] main[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] .count-label[_ngcontent-%COMP%]{margin-bottom:12px}[_nghost-%COMP%] main[_ngcontent-%COMP%] .publisher[_ngcontent-%COMP%]{border:1px solid var(--grey-30);background-color:var(--grey-30);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-height:32px;display:flex;color:var(--black);align-items:center;padding:10px 12px;margin-right:12px;border-radius:8px;max-width:250px;font-size:14px;line-height:16px;margin-bottom:12px}@media(hover:hover)and (pointer:fine){[_nghost-%COMP%] main[_ngcontent-%COMP%] .publisher[_ngcontent-%COMP%]:hover:not(.disabled){border-color:var(--grey-50)}}@media(max-width:576px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .publisher[_ngcontent-%COMP%]{max-width:200
1px}}"]});}};var At=n=>[n],yi=n=>({count:n});function Ra(n,t){n&1&&(Zi$1(0,"header")(1,"div",1)(2,"span",2),ib(3),bb(4,"translate"),kl()()()),n&2&&(AE(3),Ug(_b(4,1,"appTracker.notify_me_of_any_app")));}function ja(n,t){if(n&1&&(Zi$1(0,"div",6),Eg(1,"i",46),kl()),n&2){let e=NT(2);Ig("placement","right")("analyticsEvent",e.tooltipAnalytic)("textTooltip","appTracker.aggregation_tooltip_text");}}function za(n,t){n&1&&(Zi$1(0,"span",9),ib(1),bb(2,"translate"),kl()),n&2&&(AE(),Ug(_b(2,1,"appTracker.position")));}function $a(n,t){if(n&1){let e=DT();Zi$1(0,"mask-input",47),bb(1,"async"),_g("clear",function(){Rd(e);let a=NT(2);return kd(a.handleChangeValue(0))})("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeValue(a))}),kl();}if(n&2){let e=NT(2);Ig("value",e.alertForm.getRawValue().value)("prefix",_b(1,2,e.tempParams).metric==="revenue"?e.InputPrefix.Dollar:e.InputPrefix.NoPrefix);}}function Wa(n,t){if(n&1){let e=DT();Zi$1(0,"mask-input",47),bb(1,"async"),_g("clear",function(){Rd(e);let a=NT(2);return kd(a.handleChangeValue(0))})("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeValue(a))}),kl();}if(n&2){let e=NT(2);Ig("value",e.alertForm.getRawValue().value)("prefix",_b(1,2,e.tempParams).metric==="revenue"?e.InputPrefix.Dollar:e.InputPrefix.NoPrefix);}}function Ga(n,t){if(n&1){let e=DT();Zi$1(0,"mask-input",47),bb(1,"async"),_g("clear",function(){Rd(e);let a=NT(2);return kd(a.handleChangeValue(0))})("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeValue(a))}),kl();}if(n&2){let e=NT(2);Ig("value",e.alertForm.getRawValue().value)("prefix",_b(1,2,e.tempParams).metric==="revenue"?e.InputPrefix.Dollar:e.InputPrefix.NoPrefix);}}function Ha(n,t){if(n&1){let e=DT();Zi$1(0,"mask-input",47),bb(1,"async"),_g("clear",function(){Rd(e);let a=NT(2);return kd(a.handleChangeValue(0))})("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeValue(a))}),kl();}if(n&2){let e=NT(2);Ig("value",e.alertForm.getRawValue().value)("prefix",_b(1,2,e.tempParams).metric==="revenue"?e.InputPrefix.Dollar:e.InputPrefix.NoPrefix);}}function qa(n,t){n&1&&(Zi$1(0,"span",27),ib(1),bb(2,"translate"),kl()),n&2&&(AE(),Ug(_b(2,1,"appTracker.with")));}function Ja(n,t){if(n&1&&(Zi$1(0,"span",27),ib(1),bb(2,"translateChoice"),kl()),n&2){let e=NT(2);AE(),Ug(Mb(2,1,"appTracker.with_tags",Ib(4,yi,e.alert.tags.length)));}}function Ka(n,t){if(n&1&&(Zi$1(0,"div",48),ib(1),bb(2,"translate"),kl()),n&2){let e=NT().$implicit;Ig("ngClass",e.type)("tagTooltip",e.name)("minHoverDuration",0)("tag",e)("analyticsEventPage","app-tracker")("tagIds",Ib(9,At,e.id)),AE(),jl(" ",_b(2,7,"tags."+e.name)," ");}}function Qa(n,t){if(n&1&&uT(0,Ka,3,11,"div",48),n&2){let e=t.$implicit;dT(e?0:-1);}}function Ya(n,t){if(n&1){let e=DT();Zi$1(0,"tag-select-multiple",49),bb(1,"async"),bb(2,"async"),bb(3,"async"),_g("changeTags",function(a){Rd(e);let p=NT(2);return kd(p.applyTagsValueForAlert(a,p.alert))}),Zi$1(4,"span",50),ib(5),bb(6,"async"),bb(7,"translate"),kl()();}if(n&2){let e=NT(2);Ig("analyticEventsOpen","tag_selector_open")("tags",_b(1,6,e.tagService.tags))("selected",_b(2,8,e.alert.tagIds))("loading",_b(3,10,e.tagService.loading))("isCustomButton",true),AE(5),Ug(_b(7,14,_b(6,12,e.tempParams).tags.length>0?"appTracker.edit_tags":"appTracker.any_tags"));}}function Xa(n,t){if(n&1&&(Zi$1(0,"div",31),Eg(1,"i",46),kl()),n&2){let e=NT(2);Ig("placement","right")("analyticsEvent",e.tooltipAnalytic)("textTooltip","appTracker.aggregation_tooltip_text");}}function Za(n,t){n&1&&(Zi$1(0,"span",33),ib(1),bb(2,"translate"),kl()),n&2&&(AE(),Ug(_b(2,1,"appTracker.position")));}function er(n,t){n&1&&(Zi$1(0,"span",37),ib(1),bb(2,"translate"),kl()),n&2&&(AE(),Ug(_b(2,1,"appTracker.with")));}function tr(n,t){if(n&1&&(Zi$1(0,"span",37),ib(1),bb(2,"translateChoice"),kl()),n&2){let e=NT(2);AE(),Ug(Mb(2,1,"appTracker.with_tags",Ib(4,yi,e.alert.tags.length)));}}function nr(n,t){if(n&1){let e=DT();Zi$1(0,"mask-input",47),bb(1,"async"),_g("clear",function(){Rd(e);let a=NT(2);return kd(a.handleChangeValue(0))})("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeValue(a))}),kl();}if(n&2){let e=NT(2);Ig("value",e.alertForm.getRawValue().value)("prefix",_b(1,2,e.tempParams).metric==="revenue"?e.InputPrefix.Dollar:e.InputPrefix.NoPrefix);}}function ir(n,t){if(n&1){let e=DT();
1Zi$1(0,"mask-input",47),bb(1,"async"),_g("clear",function(){Rd(e);let a=NT(2);return kd(a.handleChangeValue(0))})("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeValue(a))}),kl();}if(n&2){let e=NT(2);Ig("value",e.alertForm.getRawValue().value)("prefix",_b(1,2,e.tempParams).metric==="revenue"?e.InputPrefix.Dollar:e.InputPrefix.NoPrefix);}}function ar(n,t){if(n&1&&(Zi$1(0,"div",44),ib(1),bb(2,"translate"),kl()),n&2){let e=t.$implicit;Ig("ngClass",e.type)("tagTooltip",e.name)("tagIds",Ib(9,At,e.id))("tag",e)("minHoverDuration",0)("analyticsEventPage","app-tracker"),AE(),jl(" ",_b(2,7,"tags."+e.name)," ");}}function rr(n,t){if(n&1){let e=DT();Zi$1(0,"tag-select-multiple",51),bb(1,"async"),bb(2,"async"),bb(3,"async"),_g("changeTags",function(a){Rd(e);let p=NT(2);return kd(p.applyTagsValueForAlert(a,p.alert))}),Zi$1(4,"span",50),ib(5),bb(6,"async"),bb(7,"translate"),kl()();}if(n&2){let e=NT(2);Ig("analyticEventsOpen","tag_selector_open")("tags",_b(1,6,e.tagService.tags))("selected",_b(2,8,e.alert.tagIds))("loading",_b(3,10,e.tagService.loading))("isCustomButton",true),AE(5),Ug(_b(7,14,_b(6,12,e.tempParams).tags.length>0?"appTracker.edit_tags":"appTracker.any_tags"));}}function or(n,t){if(n&1){let e=DT();Zi$1(0,"main")(1,"section")(2,"div",3)(3,"div",4)(4,"simple-select",5),bb(5,"async"),_g("valChange",function(a){Rd(e);let p=NT();return kd(p.handleChangeAggregation(a))}),kl(),uT(6,ja,2,3,"div",6),bb(7,"async"),Zi$1(8,"div",7)(9,"simple-select",8),bb(10,"async"),_g("valChange",function(a){Rd(e);let p=NT();return kd(p.handleChangeMetric(a))}),kl(),uT(11,za,3,3,"span",9),bb(12,"async"),kl(),Zi$1(13,"div",10)(14,"span",11),ib(15),bb(16,"translate"),kl(),Zi$1(17,"form",12),uT(18,$a,2,4,"mask-input",13),bb(19,"async"),uT(20,Wa,2,4,"mask-input",13),bb(21,"async"),kl()()(),Zi$1(22,"div",14)(23,"div",15)(24,"span",11),ib(25),bb(26,"translate"),kl(),Zi$1(27,"form",12),uT(28,Ga,2,4,"mask-input",13),bb(29,"async"),uT(30,Ha,2,4,"mask-input",13),bb(31,"async"),kl()(),Zi$1(32,"div",16),ib(33),bb(34,"translate"),Zi$1(35,"country-single-select",17),bb(36,"async"),bb(37,"async"),bb(38,"async"),_g("valChange",function(a){Rd(e);let p=NT();return kd(p.handleChangeCountry(a))}),kl()(),Zi$1(39,"div",18),ib(40),bb(41,"translate"),Zi$1(42,"simple-select",19),bb(43,"async"),bb(44,"async"),bb(45,"async"),_g("valChange",function(a){Rd(e);let p=NT();return kd(p.handleChangeStore(a))}),kl()(),Zi$1(46,"div",20)(47,"span",21),ib(48),bb(49,"translate"),kl(),Zi$1(50,"category-single-select",22),bb(51,"async"),_g("valChange",function(a){Rd(e);let p=NT();return kd(p.handleChangeCategory(a))}),kl()()(),Zi$1(52,"div",23)(53,"div",24),ib(54),bb(55,"translate"),Zi$1(56,"simple-select",19),bb(57,"async"),bb(58,"async"),bb(59,"async"),_g("valChange",function(a){Rd(e);let p=NT();return kd(p.handleChangeStore(a))}),kl()(),Zi$1(60,"div",25)(61,"span",21),ib(62),bb(63,"translate"),kl(),Zi$1(64,"category-single-select",22),bb(65,"async"),_g("valChange",function(a){Rd(e);let p=NT();return kd(p.handleChangeCategory(a))}),kl()()(),Zi$1(66,"div",26),uT(67,qa,3,3,"span",27),uT(68,Ja,3,6,"span",27),hT(69,Qa,1,1,null,null,pT),uT(71,Ya,8,16,"tag-select-multiple",28),bb(72,"async"),kl()(),Zi$1(73,"div",29)(74,"div",30)(75,"simple-select",5),bb(76,"async"),_g("valChange",function(a){Rd(e);let p=NT();return kd(p.handleChangeAggregation(a))}),kl(),uT(77,Xa,2,3,"div",31),bb(78,"async"),kl(),Zi$1(79,"div",32)(80,"div",30)(81,"simple-select",5),bb(82,"async"),_g("valChange",function(a){Rd(e);let p=NT();return kd(p.handleChangeMetric(a))}),kl(),uT(83,Za,3,3,"span",33),bb(84,"async"),kl()(),Zi$1(85,"div",32)(86,"div",34)(87,"span",35)(88,"div",32),ib(89),bb(90,"translate"),kl()(),Zi$1(91,"span"),ib(92),bb(93,"translate"),kl(),Zi$1(94,"span",36),ib(95),bb(96,"translate"),kl(),Zi$1(97,"span"),ib(98),bb(99,"translate"),kl(),uT(100,er,3,3,"span",37),uT(101,tr,3,6,"span",37),kl(),Zi$1(102,"div",38)(103,"form",39),uT(104,nr,2,4,"mask-input",13),bb(105,"async"),uT(106,ir,2,4,"mask-input",13),bb(107,"async"),kl(),Zi$1(108,"country-single-select",40),bb(109,"async"),bb(110,"async"),bb(111,"async"),_g("valChange",function(a){Rd(e);let p=NT();return kd(p.handleChangeCountry(a))}),kl(),Zi$1(112,"simple-select",41),bb(113,"async"),bb(114,"async"),bb(115,"async"),_g("valChange",function(a){Rd(e);let p=NT();return kd(p.handleChangeStore(a))}),kl(),Zi$1(116,"category-single-select",42),bb(117,"async"),_g("valChange",function(a){Rd(e);let p=NT();
1return kd(p.handleChangeCategory(a))}),kl(),Zi$1(118,"div",43),hT(119,ar,3,11,"div",44,pT),uT(121,rr,8,16,"tag-select-multiple",45),bb(122,"async"),kl()()()()()();}if(n&2){let e=NT();AE(4),Ig("values",e.aggregationSelectConfig.values)("itemsLowercase",true)("showPanelTitleDesk",false)("settings",e.aggregationSelectConfig.customSettings)("analyticEvents",e.aggregationSelectConfig.analyticEvents)("value",_b(5,114,e.tempParams).aggregation),AE(2),dT(_b(7,116,e.tempParams).aggregation!=="day"?6:-1),AE(3),Ig("values",e.metricSelectConfig.values)("itemsLowercase",true)("showPanelTitleDesk",false)("settings",e.metricSelectConfig.customSettings)("analyticEvents",e.metricSelectConfig.analyticEvents)("value",_b(10,118,e.tempParams).metric),AE(2),dT(_b(12,120,e.tempParams).metric.includes("top")?11:-1),AE(4),jl(" ",_b(16,122,"appTracker.no_less_than")," "),AE(2),Ig("formGroup",e.alertForm),AE(),dT(_b(19,124,e.tempParams).metric==="revenue"?18:-1),AE(2),dT(_b(21,126,e.tempParams).metric!=="revenue"?20:-1),AE(5),jl(" ",_b(26,128,"appTracker.no_less_than")," "),AE(2),Ig("formGroup",e.alertForm),AE(),dT(_b(29,130,e.tempParams).metric==="revenue"?28:-1),AE(2),dT(_b(31,132,e.tempParams).metric!=="revenue"?30:-1),AE(3),jl(" ",_b(34,134,"appTracker.for")," "),AE(2),Pg("text-lowercase",_b(36,136,e.tempParams).country==="WW")("text-capitalize",_b(37,138,e.tempParams).country!=="WW"),Ig("value",_b(38,140,e.tempParams).country)("noTitle",true)("lock",!e.hasAllCountries())("config",e.countrySimpleSelectConfig.customSettings.dropdownConfig)("analyticEvents",e.countrySimpleSelectConfig.analyticEvents),AE(5),jl(" ",_b(41,142,"appTracker.and")," "),AE(2),Pg("text-lowercase",_b(43,144,e.tempParams).platform==="5")("text-none-transform",_b(44,146,e.tempParams).platform!=="5"),Ig("values",e.storeSelectConfig.values)("showPanelTitleDesk",false)("showTitle",false)("settings",e.storeSelectConfig.customSettings)("analyticEvents",e.storeSelectConfig.multiAnalyticEvents)("value",_b(45,148,e.tempParams).platform),AE(6),Ug(_b(49,150,"appTracker.for")),AE(2),Ig("value",_b(51,152,e.tempParams).category)("title","")("defaultText","appTracker.any_category")("stores",Ib(204,At,+e.tempParams.getValue().platform)),AE(4),jl(" ",_b(55,154,"appTracker.and")," "),AE(2),Pg("text-lowercase",_b(57,156,e.tempParams).platform==="5")("text-none-transform",_b(58,158,e.tempParams).platform!=="5"),Ig("values",e.storeSelectConfig.values)("showPanelTitleDesk",false)("showTitle",false)("settings",e.storeSelectConfig.customSettings)("analyticEvents",e.storeSelectConfig.multiAnalyticEvents)("value",_b(59,160,e.tempParams).platform),AE(6),Ug(_b(63,162,"appTracker.for")),AE(2),Ig("value",_b(65,164,e.tempParams).category)("title","")("defaultText","appTracker.any_category")("stores",Ib(206,At,+e.tempParams.getValue().platform)),AE(3),dT(e.alert.tags.length===0?67:-1),AE(),dT(e.alert.tags.length>0?68:-1),AE(),gT(e.alert.tags),AE(2),dT(_b(72,166,e.alert.editMode)?71:-1),AE(4),Ig("values",e.aggregationSelectConfig.values)("itemsLowercase",true)("showPanelTitleDesk",false)("settings",e.aggregationSelectConfig.customSettings)("analyticEvents",e.aggregationSelectConfig.analyticEvents)("value",_b(76,168,e.tempParams).aggregation),AE(2),dT(_b(78,170,e.tempParams).aggregation!=="day"?77:-1),AE(4),Ig("values",e.metricSelectConfig.values)("itemsLowercase",true)("showPanelTitleDesk",false)("settings",e.metricSelectConfig.customSettings)("analyticEvents",e.metricSelectConfig.analyticEvents)("value",_b(82,172,e.tempParams).metric),AE(2),dT(_b(84,174,e.tempParams).metric.includes("top")?83:-1),AE(6),Ug(_b(90,176,"appTracker.no_less_than")),AE(3),Ug(_b(93,178,"appTracker.for")),AE(3),Ug(_b(96,180,"appTracker.and")),AE(3),Ug(_b(99,182,"appTracker.for")),AE(2),dT(e.alert.tags.length===0?100:-1),AE(),dT(e.alert.tags.length>0?101:-1),AE(2),Ig("formGroup",e.alertForm),AE(),dT(_b(105,184,e.tempParams).metric==="revenue"?104:-1),AE(2),dT(_b(107,186,e.tempParams).metric!=="revenue"?106:-1),AE(2),Pg("text-lowercase",_b(109,188,e.tempParams).country==="WW")("text-capitalize",_b(110,190,e.tempParams).country!=="WW"),Ig("value",_b(111,192,e.tempParams).country)("noTitle",true)("lock",!e.hasAllCountries())("config",e.countrySimpleSelectConfig.customSettings.dropdownConfig)("analyticEvents",e.countrySimpleSelectConfig.analyticEvents),AE(4),Pg("text-lowercase",_b(113,194,e.tempParams).platform==="5")("text-none-transform",_b(114,196,e.tempParams).platform!=="5"),Ig("values",e.storeSelectConfig.values)("showPanelTitleDesk",false)("showTitle",false)("settings",e.storeSelectConfig.customSettings)("analyticEvents",e.storeSelectConfig.multiAnalyticEvents)("value",_b(115,198,e.tempParams).platform),AE(4),Ig("value",_b(117,200,e.tempParams).category)("title","")("defaultText","appTracker.any_category")("stores",Ib(208,At,+e.tempParams.getValue().platform)),AE(3),gT(e.alert.tags),AE(2),dT(_b(122,202,e.alert.editMode)?121:-1);}}function lr(n,t){if(n&1){let e=DT();Zi$1(0,"alert-footer",52),_g("delete",function(){Rd(e);let a=NT();return kd(a.delete.emit(a.alert))})("updateSlackStatus",function(){Rd(e);let a=NT();return kd(a.footerService.toggleSlack())})("updateEmailStatus",function(){Rd(e);let a=NT();return kd(a.footerService.toggleEmail())})("sendTest",function(){Rd(e);let a=NT();return kd(a.footerService.sendNotify(a.alert,a.tempParams.getValue()))})("cancel",function(){Rd(e);let a=NT();return kd(a.cancel.emit())})("apply",function(){Rd(e);let a=NT();return kd(a.update())}),kl();}if(n&2){let e=NT();Ig("slackActive",e.footerService.slackActive)("slackUrl",e.footerService.slackUrl)("slackUrlLoading",e.footerService.slackUrlLoading)("email",e.footerService.email)("emailActive",e.footerService.emailActive)("label",e.footerService.label)("loading",e.footerService.loading)("needSave",e.isAlertNeedSave);}}
1var qt=class n{constructor(){this.cancel=new tt;this.apply=new tt;this.delete=new tt;this.analyticsService=D(L);this.footerService=D(K);this.tagService=D(R);this.hasAllCountries=D(ve).getAccessSignal(E$1.mobile_all_countries);this.tempParams=new rr$1(null);this.subscription=new W;this.isAlertNeedSave=new rr$1(false);this.tooltipAnalytic="app_tracker_aggregation_tooltip";this.InputPrefix=e;this.metricSelectConfig=gt((t,e)=>this.analyticsService.send(t,e));this.storeSelectConfig=_t((t,e)=>this.analyticsService.send(t,e));this.aggregationSelectConfig=dt((t,e)=>this.analyticsService.send(t,e));this.countrySimpleSelectConfig=mt((t,e)=>this.analyticsService.send(t,e));}ngOnInit(){this.tempParams.next(Hp(this.alert.params)),this.footerService.init(this.alert.alert),this.subscription.add(this.alert.tagIds.subscribe(t=>{let e=this.tempParams.getValue();e.tags=t,this.tempParams.next(e);})),this.subscription.add(qm([this.tempParams,this.footerService.isFooterChanged,this.alert.name]).subscribe(([t,e,i])=>{let a=!Tu(t,this.alert.params),p=this.alert.alert.id===0,v=this.alert.alert.title!==i,A=p||a||e||v||this.alertForm?.valid;this.isAlertNeedSave.next(A&&this.footerService.isSlackOrEmailUsed());})),this.initForm();}ngOnDestroy(){this.subscription.unsubscribe(),this.footerService.destroy();}applyTagsValueForAlert(t,e){e.tags=t.map(i=>be.getTag(i,this.tagService.tags.getValue())),e.tagIds.next(t.sort());}initForm(){this.alertForm=new T({value:new N(this.tempParams.getValue().value,[ce.required,ce.maxLength(15)])}),this.subscription.add(this.alertForm.get("value").valueChanges.subscribe(t=>{let e=Hp(this.tempParams.getValue());this.alertForm.get("value").setValue(t,{emitEvent:false}),e.value=t,this.tempParams.next(e);}));}handleChangeValue(t){this.alertForm.get("value").setValue(t),this.analyticsService.send("app_tracker_alert_value_enter",[`${t}`]);}update(){let t=this.tempParams.getValue();t.tags=this.alert.tagIds.getValue(),this.alert.alert.title=this.alert.name.getValue(),this.footerService.prepareAlert(this.alert,t),this.apply.emit(this.alert);}handleChangeMetric(t){let e=Hp(this.tempParams.getValue());e.metric!==t&&(e.metric=t,this.tempParams.next(e));}handleChangeCategory(t){let e=Hp(this.tempParams.getValue());t.includes(",")&&(t=t.split(",")[0]),e.category!==t&&(e.category=t,this.tempParams.next(e));}handleChangeAggregation(t){let e=Hp(this.tempParams.getValue());e.aggregation!==t&&(e.aggregation=t,this.tempParams.next(e));}handleChangeCountry(t){let e=Hp(this.tempParams.getValue());e.country!==t&&(e.country=t,this.tempParams.next(e));}handleChangeStore(t){let e=Hp(this.tempParams.getValue());e.platform!==t&&(e.platform=t,t==="5"&&(e.category=""),this.tempParams.next(e));}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275cmp=sw({type:n,selectors:[["new-apps-by-type-alert"]],inputs:{alert:"alert"},outputs:{cancel:"cancel",apply:"apply",delete:"delete"},features:[yb([K])],decls:6,vars:9,consts:[[3,"slackActive","slackUrl","slackUrlLoading","email","emailActive","label","loading","needSave"],[1,"d-flex","flex-a-c"],[1,"text-label"],[1,"not-mob","d-flex","flex-col"],[1,"d-flex","flex-a-c","row","padding-bottom"],[1,"tracker-selector","text-lowercase",3,"valChange","values","itemsLowercase","showPanelTitleDesk","settings","analyticEvents","value"],[1,"flex-center","d-inline-flex","pos-relative","m-r-sm",3,"placement","analyticsEvent","textTooltip"],[1,"selector-wrap","d-flex","flex-a-c"],[1,"tracker-selector","text-lowercase","last-child",3,"valChange","values","itemsLowercase","showPanelTitleDesk","settings","analyticEvents","value"],[1,"m-x-sm"],[1,"selector-wrap","value-content-desk",2,"margin-left","12px"],[1,"nowrap"],[1,"value-input-container",2,"margin-left","12px",3,"formGroup"],[1,"agree-form-input",3,"value","prefix"],[1,"d-flex","flex-a-c","padding-bottom","row","text-capitalize"],[1,"selector-wrap","value-content-mob"],[1,"selector-wrap","aggregation-content"],["lockTooltip","screen.country_restriction_tooltip_text",1,"tracker-selector",2,"margin-left","12px",3,"valChange","value","noTitle","lock","config","analyticEvents"],[1,"selector-wrap","stores-content-desk"],[1,"tracker-selector",2,"margin-left","12px",3,"valChange","values","showPanelTitleDesk","showTitle","settings","analyticEvents","value"],[1,"selector-wrap","text-capitalize","categories-content-desk",2,"margin-left","12px"],[1,"text-lowercase"],[1,"tracker-selector","last-child",2,"margin-left","12px",3,"valChange","value","title","defaultText","stores"],[1,"d-flex","flex-a-c","text-capitalize","row","mob-transform","mob-ls-flex"],[1,"selector-wrap","stores-content-mob"],[1,"selector-wrap","text-capitalize","categories-content-mob",2,"margin-left","12px"],[1,"tag-row","text-capitalize","row","mob-transform"],[1,"width-tags-label"],[3,"analyticEventsOpen","tags","selected","loading","isCustomButton"],[1,"mob-flex-only","d-flex","flex-col"],[1,"selector-wrap"],[1,"aggregation-tooltip","flex-center","d-inline-flex","pos-relative","m-r-sm",3,"placement","analyticsEvent","textTooltip"],[1,"d-flex"],[1,"position-text","m-r-sm"],[1,"mob-spans"],[1,"n
1owrap","d-flex"],[1,"stores-content-mob"],[1,""],[1,"mob-selectors"],[1,"value-input-container",3,"formGroup"],["lockTooltip","screen.country_restriction_tooltip_text",1,"tracker-selector",3,"valChange","value","noTitle","lock","config","analyticEvents"],[1,"tracker-selector","stores-content-mob","text-none-transform",3,"valChange","values","showPanelTitleDesk","showTitle","settings","analyticEvents","value"],[1,"tracker-selector","text-lowercase",3,"valChange","value","title","defaultText","stores"],[1,"d-flex","flex-wrap"],[1,"tag",3,"ngClass","tagTooltip","tagIds","tag","minHoverDuration","analyticsEventPage"],[1,"text-overflow","last-child",3,"analyticEventsOpen","tags","selected","loading","isCustomButton"],[1,"g-icon-help","text-gold","help-icon"],[1,"agree-form-input",3,"clear","valChange","value","prefix"],[1,"tag",3,"ngClass","tagTooltip","minHoverDuration","tag","analyticsEventPage","tagIds"],[3,"changeTags","analyticEventsOpen","tags","selected","loading","isCustomButton"],[1,"selector-label"],[1,"text-overflow","last-child",3,"changeTags","analyticEventsOpen","tags","selected","loading","isCustomButton"],[3,"delete","updateSlackStatus","updateEmailStatus","sendTest","cancel","apply","slackActive","slackUrl","slackUrlLoading","email","emailActive","label","loading","needSave"]],template:function(e,i){e&1&&(uT(0,Ra,5,3,"header"),bb(1,"async"),uT(2,or,123,210,"main"),bb(3,"async"),uT(4,lr,1,8,"alert-footer",0),bb(5,"async")),e&2&&(dT(_b(1,3,i.tempParams)?0:-1),AE(2),dT(_b(3,5,i.tempParams)?2:-1),AE(2),dT(_b(5,7,i.tempParams)?4:-1));},dependencies:[An,un,fe,oa$1,Qt$1,In,wn,An$1,en$1,we,_e$1,tt$1,le,me$1,pe,Ot,fe$1,hn,he,u],styles:["[_ngcontent-%COMP%]:root{--white: #fff;--black: #000;--static-white: #fff;--static-black: #000;--grey-20: #F9F9FA;--grey-30: #E9EDEF;--grey-40: #DADFE1;--static-grey-40: #DADFE1;--grey-50: #A7B2B9;--static-grey-50: #A7B2B9;--grey-70: #506775;--grey-80: #475156;--static-grey-80: #475156;--grey-90: #3F3F46;--grey-100: #273238;--red-30: #FDEAEA;--red-40: #FF7485;--red-50: #FA354D;--yellow-30: #FFF8CF;--yellow-40: #FCE778;--yellow-50: #FEDA0F;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #E6FEE6;--green-40: #D4FABE;--green-50: #99F199;--green-70: #34C834;--green-90: #26A542;--blue-30: #EAF2FD;--blue-35: #4CE5FF;--blue-40: #D8E8FF;--blue-50: #B5D4FF;--blue-60: #6BB6FC;--blue-70: #2B98FC;--blue-70-rgb: 38, 104, 232;--blue-80: #2668E8;--blue-90: #1A54C3;--violete-20: #FAEDFF;--violete-30: #F5D9FF;--violete-60: #B259D2;--violete-80: #7B0EA2;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .15);--chart-grid-weekend-color: #F2f5f7;--cell-heat-blue-rgb: 189, 212, 255;--cell-heat-orange-rgb: 254, 217, 161;--cell-heat-green-primary-rgb: 184, 229, 125;--cell-heat-green-secondary-rgb: 139, 238, 179;--cell-heat-violet-rgb: 212, 186, 255;--cell-heat-red-rgb: 255, 135, 153}[_ngcontent-%COMP%]:root[theme=dark]{--white: #0E1113;--black: #C5C7CC;--static-white: #F2F3F5;--grey-20: #12171A;--grey-30: #1A2024;--grey-40: #1c2228;--grey-50: #2a333b;--grey-70: #5f6a72;--grey-80: #8a949b;--grey-90: #b0b6bb;--grey-100: #1b1f23;--red-30: #3A151A;--red-40: #FF6B7C;--red-50: #FF3B52;--yellow-30: #3A320F;--yellow-40: #EAD25F;--yellow-50: #FFD400;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #133A1E;--green-40: #1E5A2E;--green-50: #2E6E2E;--green-70: #34C834;--green-90: #26A542;--blue-30: #0F1C2E;--blue-35: #4CE5FF;--blue-40: #162A44;--blue-50: #1F3B66;--blue-60: #3D7DDC;--blue-70: #4B9BFF;--blue-70-rgb: 75, 155, 255;--blue-80: #5C8DFF;--blue-90: #8CB2FF;--violete-20: #2A1633;--violete-30: #3A1E4A;--violete-60: #B259D2;--violete-80: #D38CFF;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .25);--chart-grid-weekend-color: #191F23;
1--cell-heat-blue-rgb: 31, 59, 102;--cell-heat-orange-rgb: 92, 58, 18;--cell-heat-green-primary-rgb: 30, 90, 46;--cell-heat-green-secondary-rgb: 22, 84, 58;--cell-heat-violet-rgb: 58, 30, 74;--cell-heat-red-rgb: 90, 28, 37}.no-value[_ngcontent-%COMP%]{color:var(--text-muted)}.chart-hidden[_ngcontent-%COMP%]{margin-bottom:16px}[_nghost-%COMP%]{display:flex;flex-direction:column;padding-top:16px;padding-bottom:16px}[_nghost-%COMP%] .text-none-transform[_ngcontent-%COMP%]{text-transform:none!important}[_nghost-%COMP%] header[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-bottom:20px;font-size:14px;line-height:16px}[_nghost-%COMP%] header[_ngcontent-%COMP%] .text-label[_ngcontent-%COMP%]{font-weight:500}[_nghost-%COMP%] header[_ngcontent-%COMP%] .label-bell[_ngcontent-%COMP%]{margin-bottom:12px}[_nghost-%COMP%] header[_ngcontent-%COMP%] .label-notify[_ngcontent-%COMP%]{margin-top:8px}[_nghost-%COMP%] main[_ngcontent-%COMP%] .position-text[_ngcontent-%COMP%]{line-height:32px;margin-bottom:12px;margin-left:8px}[_nghost-%COMP%] main[_ngcontent-%COMP%] .aggregation-tooltip[_ngcontent-%COMP%]{margin-left:8px;margin-bottom:14px}[_nghost-%COMP%] main[_ngcontent-%COMP%] .mob-selectors[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column}[_nghost-%COMP%] main[_ngcontent-%COMP%] .mob-selectors[_ngcontent-%COMP%] .value-input-container[_ngcontent-%COMP%]{width:100%;margin-bottom:16px}[_nghost-%COMP%] main[_ngcontent-%COMP%] .mob-spans[_ngcontent-%COMP%]{display:flex;flex-direction:column}[_nghost-%COMP%] main[_ngcontent-%COMP%] .mob-spans[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{height:32px;margin-bottom:16px;padding:8px 8px 8px 0;line-height:16px;text-transform:lowercase}[_nghost-%COMP%] main[_ngcontent-%COMP%] .selector-wrap[_ngcontent-%COMP%]{max-width:284px;width:100%;display:flex;align-items:center}@media(max-width:767px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .selector-wrap[_ngcontent-%COMP%]{max-width:100%}}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:12px;max-width:284px;width:100%}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%]:last-child{margin-right:0}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector.last-child[_ngcontent-%COMP%]{margin-right:0}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector.mob-ls[_ngcontent-%COMP%]{display:none}@media(max-width:767px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector.mob-ls[_ngcontent-%COMP%]{display:flex}}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector.not-mob-ls[_ngcontent-%COMP%]{display:flex}@media(max-width:767px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector.not-mob-ls[_ngcontent-%COMP%]{display:none}}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%] > i[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{pointer-events:none}@media(max-width:767px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%]{max-width:100%}}@media(max-width:576px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%]{margin-right:0!important;width:100%;max-width:100%;margin-bottom:16px}}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-weight:400;width:100%}[_nghost-%COMP%] main[_ngcontent-%COMP%] .help-icon[_ngcontent-%COMP%]{font-size:17px;outline:none;cursor:default}[_nghost-%COMP%] main[_ngcontent-%COMP%] .padding-bottom[_ngcontent-%COMP%]{padding-bottom:24px}@media(max-width:576px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .padding-bottom[_ngcontent-%COMP%]{padding-bottom:0}}[_nghost-%COMP%] main[_ngcontent-%COMP%] .value-input-container[_ngcontent-%COMP%]{position:relative;width:100%;max-width:280px;min-width:180px;display:inline-block}@media(max-width:767px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .value-input-container[_ngcontent-%COMP%]{min-width:100px}}@media(max-width:576px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .value-input-container[_ngcontent-%COMP%]{max-width:100%}}[_nghost-%COMP%] main[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{font-size:14px;line-height:16px;text-transform:lowercase;max-width:100%}[_nghost-%COMP%] alert-footer[_ngcontent-%COMP%]{margin-top:4px}[_nghost-%COMP%] .selector-label[_ngcontent-%COMP%]{cursor:pointer;border-radius:8px;background-color:var(--grey-40);padding:8px 16px;font-weight:500;font-size:14px;line-height:16px;text-transform:uppercase;max-height:32px;display:flex;align-items:center;justify-content:center;white-space:nowrap;border:1px solid transparent}@media(hover:hover)and (pointer:fine){[_nghost-%COMP%] .selector-label[_ngcontent-%COMP%]:hover:not(.disabled,.lock){border-color:var(--grey-50)}}[_nghost-%COMP%]{--g-anim-duration: .3s}[_nghost-%COMP%] .row.mob-transform[_ngcontent-%COMP%]{margin-bottom:24px}[_nghost-%COMP%] .row.mob-transform[_ngcontent-%COMP%]:last-child{margin-bottom:12px}[_nghost-%COMP%] tag-select-multiple[_ngcontent-%COMP%]{width:fit-content!important}[_nghost-%COMP%] .tag[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;display:inline-block;box-sizing:border-box;outline:none;background-color:var(--blue-30);padding:0 10px;border-radius:4px;color:var(--black);max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[_nghost-%COMP%] .tag.disabled[_ngcontent-%COMP%]{pointer-events:none;background:var(--grey-30);color:var(--grey-50)}[_nghost-%COMP%] .tag.not-hover[_ngcontent-%COMP%]{cursor:default}[_nghost-%COMP%] .tag.artstyles[_ngcontent-%COMP%]{background-color:var(--green-30)}[_nghost-%COMP%] .tag.settings[_ngcontent-%COMP%]{background-color:var(--red-30)}[_nghost-%COMP%] .tag[_ngcontent-%COMP%]:not(.not-hover):hover{background-color:var(--yellow-40);color:var(--on-accent)}[_nghost-%COMP%] .tag[_ngcontent-%COMP%] .tag-icon[_ngcontent-%COMP%]{margin-left:7px;position:inherit;width:16px;height:16px}[_nghost-%COMP%] .tag[_ngcontent-%COMP%]{margin:4px 8px;font-size:16px;line-height:30px;padding:0 10px;border-radius:4px}[_nghost-%COMP%] .tag[_ngcontent-%COMP%]{text-transform:capitalize;height:32px;border-radius:8px;
1cursor:default}@media(max-width:767px){[_nghost-%COMP%] .tag[_ngcontent-%COMP%]{width:fit-content}}[_nghost-%COMP%] .tag-row[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap}[_nghost-%COMP%] .width-tags-label[_ngcontent-%COMP%], [_nghost-%COMP%] .tag[_ngcontent-%COMP%], [_nghost-%COMP%] .selector-label[_ngcontent-%COMP%]{margin:0 12px 12px 0}[_nghost-%COMP%] .arrow-category[_ngcontent-%COMP%]{width:15px;margin-right:8px;margin-left:12px}@media(max-width:767px){[_nghost-%COMP%] .arrow-category[_ngcontent-%COMP%]{transform:rotate(90deg);margin-left:12px}}@media(max-width:767px){[_nghost-%COMP%] .categories-arrow-content[_ngcontent-%COMP%]{margin-bottom:16px!important}}[_nghost-%COMP%] .value-content-desk[_ngcontent-%COMP%], [_nghost-%COMP%] .categories-content-desk[_ngcontent-%COMP%], [_nghost-%COMP%] .stores-content-desk[_ngcontent-%COMP%]{display:flex}@media(max-width:767px){[_nghost-%COMP%] .value-content-desk[_ngcontent-%COMP%], [_nghost-%COMP%] .categories-content-desk[_ngcontent-%COMP%], [_nghost-%COMP%] .stores-content-desk[_ngcontent-%COMP%]{display:none!important}}@media(min-width:768px){[_nghost-%COMP%] .stores-content-desk[_ngcontent-%COMP%]{margin-left:12px}}@media(max-width:767px){[_nghost-%COMP%] .aggregation-content[_ngcontent-%COMP%]{margin-left:12px}}[_nghost-%COMP%] .categories-content-mob[_ngcontent-%COMP%]{margin-bottom:16px;height:32px}@media(max-width:767px){[_nghost-%COMP%] .categories-content-mob[_ngcontent-%COMP%]{margin-bottom:0}}[_nghost-%COMP%] .value-content-mob[_ngcontent-%COMP%], [_nghost-%COMP%] .categories-content-mob[_ngcontent-%COMP%], [_nghost-%COMP%] .stores-content-mob[_ngcontent-%COMP%]{display:none!important}@media(max-width:767px){[_nghost-%COMP%] .value-content-mob[_ngcontent-%COMP%], [_nghost-%COMP%] .categories-content-mob[_ngcontent-%COMP%], [_nghost-%COMP%] .stores-content-mob[_ngcontent-%COMP%]{display:flex!important}}"]});}};var pr=n=>[n],sr=n=>({count:n});function cr(n,t){if(n&1&&(Zi$1(0,"span",7),ib(1),bb(2,"translate"),kl()),n&2){let e=NT(2);AE(),jl(" ",_b(2,1,"categories."+e.getCategory(e.alert.params.category)),", ");}}function mr(n,t){if(n&1&&(Zi$1(0,"div",12),ib(1),bb(2,"translate"),kl()),n&2){let e=NT(3);Ig("ngClass",e.alert.tags[0].type)("tagTooltip",e.alert.tags[0].name)("minHoverDuration",0)("tag",e.alert.tags[0])("analyticsEventPage","app-tracker")("tagIds",Ib(9,pr,e.alert.tags[0].id)),AE(),jl(" ",_b(2,7,"tags."+e.alert.tags[0].name)," ");}}function dr(n,t){if(n&1&&uT(0,mr,3,11,"div",12),n&2){let e=NT(2);dT(e.alert.tags[0]?0:-1);}}function gr(n,t){if(n&1&&(ib(0),bb(1,"translateChoice")),n&2){let e=NT(2);qg(" ",e.alert.params.tags.length," ",Mb(1,2,"tagSelect.tags",Ib(5,sr,e.alert.params.tags.length))," ");}}function _r(n,t){n&1&&(ib(0),bb(1,"translate")),n&2&&jl(" ",_b(1,1,"appTracker.any_tags")," ");}function ur(n,t){if(n&1){let e=DT();Zi$1(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),ib(4),bb(5,"translate"),kl(),Zi$1(6,"strong",4),ib(7),bb(8,"translate"),kl(),ib(9),bb(10,"translate"),bb(11,"translate"),Eg(12,"span",5),bb(13,"renderValue"),kl(),Zi$1(14,"div",6)(15,"span",7),ib(16),bb(17,"translate"),bb(18,"translate"),kl(),uT(19,cr,3,3,"span",7),Zi$1(20,"span"),uT(21,dr,1,1),uT(22,gr,2,7),uT(23,_r,2,3),kl()(),Zi$1(24,"div",8)(25,"notifications-bell",9),_g("toggleStatus",function(){Rd(e);let a=NT();return kd(a.toggleStatus.emit(a.alert))}),kl(),Zi$1(26,"div",10),_g("click",function(){Rd(e);let a=NT();return kd(a.edit.emit())}),ib(27),bb(28,"translate"),kl(),Zi$1(29,"div",11),_g("click",function(){Rd(e);let a=NT();return kd(a.delete.emit())}),kl()()()();}if(n&2){let e=NT();AE(4),Ug(_b(5,13,"appTracker."+e.alert.params.aggregation)),AE(3),Ug(_b(8,15,"appList."+e.alert.params.metric)),AE(2),qg(" ",_b(10,17,e.alert.params.metric==="downloads"?"appTracker.are":"appTracker.is")," ",_b(11,19,"appTracker.no_less_than")," "),AE(3),Ig("innerHtml",Mb(13,21,e.alert.params.value,e.alert.params.metric),OI),AE(4),qg("",_b(17,24,"countries."+e.alert.params.country),", ",_b(18,26,"stores."+e.alert.params.platform),", "),AE(3),dT(e.alert.params.category?19:-1),AE(2),dT(e.alert.params.tags.length===1?21:-1),AE(),dT(e.alert.params.tags.length>1?22:-1),AE(),dT(e.alert.params.tags.length===0?23:-1),AE(2),Ig("active",e.alert.alert.active),AE(2),jl(" ",_b(28,28,"appTracker.edit_alert")," ");}}var Jt=class n{constructor(t){this.categoryService=t;this.maxAlerts=new rr$1(false);this.edit=new tt;this.delete=new tt;this.toggleStatus=new tt;}getCategory(t){let e=this.categoryService.categories.find(i=>i.id===+t);return e?e.name:""}static{this.\u0275fac=function(e){return new(e||n)(Jr$1(c$1))};}static{this.\u0275cmp=sw({type:n,selectors:[["new-apps-by-type-row"]],inputs:{alert:"alert",maxAlerts:"maxAlerts"},outputs:{edit:"edit",delete:"delete",toggleStatus:"toggleStatus"},decls:1,vars:1,consts:[[1,"alert"],[1,"col-container"],[1,"col-1"],[1,"text-capitalize"],[1,"text-lowercase","m-l-sm"],[1,"value",3,"innerHtml"],[1,"col-2"],[1,"margin-param"],[1,"col-3"],[3,"toggleStatus","active"],[1,"edit","selector-label",3,"click"],[1,"delete",3,"click"],[1,"tag",3,"ngClass","tagTooltip","minHoverDuration","tag","analyticsEventPage","tagIds"]],template:function(e,i){e&1&&uT(0,ur,30,30,"div",0),e&2&&dT(i.alert?0:-1);},dependencies:[An,un,fe,tt$1,ke,he,m$1,u],styles:["[_ngcontent-%COMP%]:root{--white: #fff;--black: #000;--static-white: #fff;--static-black: #000;--grey-20: #F9F9FA;--grey-30: #E9EDEF;--grey-40: #DADFE1;--static-grey-40: #DADFE1;--grey-50: #A7B2B9;--static-grey-50: #A7B2B9;--grey-70: #506775;--grey-80: #475156;--static-grey-80: #475156;--grey-90: #3F3F46;--grey-100: #273238;--red-30: #FDEAEA;--red-40: #FF7485;--red-50: #FA354D;--yellow-30: #FFF8CF;--yellow-40: #FCE778;--yellow-50: #FEDA0F;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #E6FEE6;--green-40: #D4FABE;--green-50: #99F199;--green-70: #34C834;--green-90: #26A542;--blue-30: #EAF2FD;--blue-35: #4CE5FF;--blue-40: #D8E8FF;--blue-50: #B5D4FF;--blue-60: #6BB6FC;--blue-70: #2B98FC;--blue-70-rgb: 38, 104, 232;--blue-80: #2668E8;--blue-90: #1A54C3;--violete-20: #FAEDFF;--violete-30: #F5D9FF;--violete-60: #B259D2;--violete-80: #7B0EA2;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .15);--chart-grid-weekend-color: #F2f5f7;--cell-heat-blue-rgb: 189, 212, 255;--cell-heat-orange-rgb: 254, 217, 161;--cell-heat-green-primary-rgb: 184, 229, 125;--cell-heat-green-secondary-rgb: 139, 238, 179;--cell-heat-violet-rgb: 212, 186, 255;--cell-heat-red-rgb: 255, 135, 153}[_ngcontent-%COMP%]:root[theme=dark]{--white: #0E1113;--black: #C5C7CC;--static-white: #F2F3F5;--grey-20: #12171A;--grey-30: #1A2024;--grey-40: #1c2228;--grey-50: #2a333b;--grey-70: #5f6a72;--grey-80: #8a949b;--grey-90: #b0b6bb;--grey-100: #1b1f23;--red-30: #3A151A;--red-40: #FF6B7C;--red-50: #FF3B52;--yellow-30: #3A320F;--yellow-40: #EAD25F;--yellow-50: #FFD400;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #133A1E;--green-40: #1E5A2E;--green-50: #2E6E2E;--green-70: #34C834;--green-90: #26A542;--blue-30: #0F1C2E;--blue-35: #4CE5FF;--blue-40: #162A44;--blue-50: #1F3B66;--blue-60: #3D7DDC;--blue-70: #4B9BFF;--blue-70-rgb: 75, 155, 255;--blue-80: #5C8DFF;--blue-90: #8CB2FF;--violete-20: #2A1633;--violete-30: #3A1E4A;--violete-60: #B259D2;--violete-80: #D38CFF;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .25);--chart-grid-weekend-color: #191F23;
1--cell-heat-blue-rgb: 31, 59, 102;--cell-heat-orange-rgb: 92, 58, 18;--cell-heat-green-primary-rgb: 30, 90, 46;--cell-heat-green-secondary-rgb: 22, 84, 58;--cell-heat-violet-rgb: 58, 30, 74;--cell-heat-red-rgb: 90, 28, 37}.no-value[_ngcontent-%COMP%]{color:var(--text-muted)}.chart-hidden[_ngcontent-%COMP%]{margin-bottom:16px}[_nghost-%COMP%]{min-height:60px;display:flex;flex-direction:row;overflow:hidden}[_nghost-%COMP%] .selector-label[_ngcontent-%COMP%]{cursor:pointer;border-radius:8px;background-color:var(--grey-40);padding:8px 16px;font-weight:500;font-size:14px;line-height:16px;text-transform:uppercase;max-height:32px;display:flex;align-items:center;justify-content:center;white-space:nowrap;border:1px solid transparent}@media(hover:hover)and (pointer:fine){[_nghost-%COMP%] .selector-label[_ngcontent-%COMP%]:hover:not(.disabled,.lock){border-color:var(--grey-50)}}[_nghost-%COMP%] .col-container[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:row;flex-grow:2;padding:12px 0}@media(max-width:767px){[_nghost-%COMP%] .col-container[_ngcontent-%COMP%]{padding:10px 0 12px;flex-direction:column}}[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-1[_ngcontent-%COMP%]{font-size:16px;line-height:18px;width:60%;margin-right:4px}@media(max-width:767px){[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-1[_ngcontent-%COMP%]{margin-right:0;justify-content:start;margin-bottom:16px;width:100%}}[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-2[_ngcontent-%COMP%]{font-size:14px;line-height:16px;display:flex;align-items:center;width:40%}@media(max-width:767px){[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-2[_ngcontent-%COMP%]{justify-content:start;width:100%;font-size:14px;line-height:16px}}[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-3[_ngcontent-%COMP%]{display:flex;align-items:center}@media(max-width:767px){[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-3[_ngcontent-%COMP%]{justify-content:flex-end;width:100%}}[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-3[_ngcontent-%COMP%] .delete[_ngcontent-%COMP%]{background:url(/assets/angular2/img/icons/trash-grey-70.svg) no-repeat 0;width:24px;height:24px;cursor:pointer;background-size:contain}[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-3[_ngcontent-%COMP%] .edit[_ngcontent-%COMP%]{white-space:nowrap;width:fit-content;margin-left:16px;margin-right:16px}[_nghost-%COMP%] notifications-bell[_ngcontent-%COMP%]{margin-left:12px}[_nghost-%COMP%] .alert[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%}@media(max-width:767px){[_nghost-%COMP%] .alert[_ngcontent-%COMP%]{align-items:normal;padding-top:10px}}[_nghost-%COMP%] .col-1[_ngcontent-%COMP%]{width:40%!important}@media(max-width:767px){[_nghost-%COMP%] .col-1[_ngcontent-%COMP%]{width:100%!important}}[_nghost-%COMP%] .col-2[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:wrap;align-items:flex-start}@media(max-width:767px){[_nghost-%COMP%] .col-2[_ngcontent-%COMP%]{margin-bottom:16px}}[_nghost-%COMP%] .margin-param[_ngcontent-%COMP%]{margin-right:4px}"]});}};function Cr(n,t){if(n&1&&Eg(0,"notifications-alert-name",2),n&2){let e=NT().$implicit;Ig("name",e.name)("editMode",e.editMode);}}function hr(n,t){if(n&1){let e=DT();Zi$1(0,"new-apps-by-type-row",5),_g("edit",function(){Rd(e);let a=NT().$implicit,p=NT();return kd(p.clickEdit(a))})("toggleStatus",function(){Rd(e);let a=NT().$implicit,p=NT();return kd(p.toggleStatus(a))})("delete",function(){Rd(e);let a=NT().$implicit,p=NT();return kd(p.deleteThresholdClick(a.alert.id))}),kl();}if(n&2){let e=NT().$implicit,i=NT();Ig("alert",e)("maxAlerts",i.maxAlerts);}}function yr(n,t){if(n&1){let e=DT();Zi$1(0,"new-apps-by-type-alert",6),Ni("g-anim-leave-auto-height-fade"),Si$1("g-anim-enter-auto-height-fade"),_g("cancel",function(){Rd(e);let a=NT(),p=a.$implicit,v=a.$index,A=NT();return kd(A.clickCancelEdit(p,v))})("apply",function(a){Rd(e);let p=NT(2);return kd(p.updateAlert(a))})("delete",function(){Rd(e);let a=NT().$implicit,p=NT();return kd(p.deleteThresholdClick(a.alert.id))}),kl();}if(n&2){let e=NT().$implicit;Ig("alert",e);}}function fr(n,t){if(n&1&&(Zi$1(0,"section",1),uT(1,Cr,1,2,"notifications-alert-name",2),bb(2,"async"),bb(3,"async"),uT(4,hr,1,2,"new-apps-by-type-row",3),bb(5,"async"),uT(6,yr,1,1,"new-apps-by-type-alert",4),bb(7,"async"),kl()),n&2){let e=t.$implicit;Ig("id",e.alert.id),AE(),dT(_b(2,4,e.name)||_b(3,6,e.editMode)?1:-1),AE(3),dT(_b(5,8,e.editMode)?-1:4),AE(2),dT(_b(7,10,e.editMode)?6:-1);}}function vr(n,t){if(n&1){let e=DT();
1Zi$1(0,"footer")(1,"add-track-btn",7),bb(2,"async"),_g("click",function(){Rd(e);let a=NT();return kd(a.handleCreateAlert())}),ib(3),bb(4,"translate"),kl()();}if(n&2){let e=NT();AE(),Ig("limit",_b(2,2,e.maxAlerts)),AE(2),Ug(_b(4,4,"appTracker.add_tracker"));}}function xr(n,t){n&1&&Eg(0,"spinner",8),n&2&&Ig("diameter",28);}function br(n,t){if(n&1&&(uT(0,xr,1,1,"spinner",8),bb(1,"async")),n&2){let e=NT();dT(_b(1,1,e.loading)?0:-1);}}var Kt=class n{constructor(t,e,i,a){this.analyticsService=t;this.deleteDialogService=e;this.userService=i;this.tagService=a;this.items=new rr$1([]);this.maxAlerts=new rr$1(false);this.loading=new rr$1(false);this.create=new tt;this.update=new tt;this.delete=new tt;this.cancel=new tt;this.subscription=new W;this.limit=200;}ngOnInit(){this.tagService.loadTags();}ngOnDestroy(){this.subscription.unsubscribe();}clickEdit(t){t.editMode.next(true),this.analyticsService.send("app_tracker_edit_click",[`${t.alert.id}`]);}updateAlert(t){if(!t)return;this.analyticsService.send("app_tracker_threshold_popup_save",t.alert.id?[`${t.alert.id}`]:[]),t.editMode.next(false);let e=this.items.getValue(),i=this.items.getValue().findIndex(a=>a.alert.id===t.alert.id);if(e[i]=t,this.updateItems(e),t.alert.id===0){this.create.emit(t);return}this.update.emit(t);}clickCancelEdit(t,e){this.analyticsService.send("app_tracker_edit_cancel",[`${t.alert.id}`]),t.editMode.next(false);let i=this.items.getValue();if(t.alert.id===0){setTimeout(()=>{i.splice(e,1),this.updateItems(i);},300);return}}toggleStatus(t){if(t.alert.active=!t.alert.active,!t.alert.id){let i=[`${t.alert.active}`];this.analyticsService.send("app_tracker_update_status",i);return}let e=[`${t.alert.id}`,`${t.alert.active}`];this.analyticsService.send("app_tracker_update_status",e),this.update.emit(t);}deleteThresholdClick(t){this.deleteDialogService.open(t.toString(),"appTracker.delete_alert","app_tracker_delete_click").pipe(Mu(),Tn(e=>!!e)).subscribe(()=>{let e=this.items.getValue();this.updateItems(e.filter(i=>i.alert.id!==t)),this.delete.emit(t);});}updateItems(t){this.items.next(t);}handleCreateAlert(){let t=this.items.getValue(),e=this.getDefaultAlert(this.items.getValue(),[]);t.push(e),this.updateItems(t);}getDefaultAlert(t,e){let i=[...t].sort((S,z)=>z.alert.id-S.alert.id),a=i.length?i[t.length-1].alert:null,p={platform:"5",country:"WW",category:"",metric:"revenue",aggregation:"day",value:0,tags:e},v=e.map(S=>be.getTag(S,this.tagService.tags.getValue())),A=$.getDefaultAlert(a,p,this.userService.user.getValue().email,"new_apps_by_type");return E(D$1({},A),{params:p,tags:v,tagIds:new rr$1(e)})}static{this.\u0275fac=function(e){return new(e||n)(Jr$1(L),Jr$1(z),Jr$1(ve),Jr$1(R))};}static{this.\u0275cmp=sw({type:n,selectors:[["new-apps-by-type"]],inputs:{items:"items",maxAlerts:"maxAlerts",loading:"loading"},outputs:{create:"create",update:"update",delete:"delete",cancel:"cancel"},decls:13,vars:11,consts:[[1,"description"],[3,"id"],[3,"name","editMode"],[3,"alert","maxAlerts"],[1,"g-anim-auto-height",3,"alert"],[3,"edit","toggleStatus","delete","alert","maxAlerts"],[1,"g-anim-auto-height",3,"cancel","apply","delete","alert"],[3,"click","limit"],[3,"diameter"]],template:function(e,i){e&1&&(Zi$1(0,"header"),ib(1),bb(2,"translate"),kl(),Zi$1(3,"div",0),ib(4),bb(5,"translate"),kl(),Zi$1(6,"main"),hT(7,fr,8,12,"section",1,pT),bb(9,"async"),kl(),uT(10,vr,5,6,"footer"),bb(11,"async"),Rl(12,br,2,3)),e&2&&(AE(),Ug(_b(2,3,"appTracker.new_apps_by_type_title")),AE(3),Ug(_b(5,5,"appTracker.new_apps_by_type_description")),AE(3),gT(_b(9,7,i.items)),AE(3),dT(_b(11,9,i.loading)?12:10));},dependencies:[An,fe,qt,Jt,Fe,b,Se,hn,he],styles:["[_ngcontent-%COMP%]:root{--white: #fff;--black: #000;--static-white: #fff;--static-black: #000;--grey-20: #F9F9FA;--grey-30: #E9EDEF;--grey-40: #DADFE1;--static-grey-40: #DADFE1;--grey-50: #A7B2B9;--static-grey-50: #A7B2B9;--grey-70: #506775;--grey-80: #475156;--static-grey-80: #475156;--grey-90: #3F3F46;--grey-100: #273238;--red-30: #FDEAEA;--red-40: #FF7485;--red-50: #FA354D;--yellow-30: #FFF8CF;--yellow-40: #FCE778;--yellow-50: #FEDA0F;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #E6FEE6;--green-40: #D4FABE;--green-50: #99F199;--green-70: #34C834;--green-90: #26A542;--blue-30: #EAF2FD;--blue-35: #4CE5FF;--blue-40: #D8E8FF;--blue-50: #B5D4FF;--blue-60: #6BB6FC;--blue-70: #2B98FC;--blue-70-rgb: 38, 104, 232;--blue-80: #2668E8;--blue-90: #1A54C3;--violete-20: #FAEDFF;--violete-30: #F5D9FF;--violete-60: #B259D2;--violete-80: #7B0EA2;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .15);--chart-grid-weekend-color: #F2f5f7;--cell-heat-blue-rgb: 189, 212, 255;--cell-heat-orange-rgb: 254, 217, 161;--cell-heat-green-primary-rgb: 184, 229, 125;--cell-heat-green-secondary-rgb: 139, 238, 179;--cell-heat-violet-rgb: 212, 186, 255;--cell-heat-red-rgb: 255, 135, 153}[_ngcontent-%COMP%]:root[theme=dark]{--white: #0E1113;--black: #C5C7CC;--static-white: #F2F3F5;--grey-20: #12171A;--grey-30: #1A2024;--grey-40: #1c2228;--grey-50: #2a333b;--grey-70: #5f6a72;--grey-80: #8a949b;--grey-90: #b0b6bb;--grey-100: #1b1f23;--red-30: #3A151A;--red-40: #FF6B7C;--red-50: #FF3B52;--yellow-30: #3A320F;--yellow-40: #EAD25F;--yellow-50: #FFD400;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #133A1E;--green-40: #1E5A2E;--green-50: #2E6E2E;--green-70: #34C834;--green-90: #26A542;--blue-30: #0F1C2E;--blue-35: #4CE5FF;--blue-40: #162A44;--blue-50: #1F3B66;--blue-60: #3D7DDC;--blue-70: #4B9BFF;--blue-70-rgb: 75, 155, 255;--blue-80: #5C8DFF;--blue-90: #8CB2FF;--violete-20: #2A1633;--violete-30: #3A1E4A;--violete-60: #B259D2;--violete-80: #D38CFF;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .25);--chart-grid-weekend-color: #191F23;
1--cell-heat-blue-rgb: 31, 59, 102;--cell-heat-orange-rgb: 92, 58, 18;--cell-heat-green-primary-rgb: 30, 90, 46;--cell-heat-green-secondary-rgb: 22, 84, 58;--cell-heat-violet-rgb: 58, 30, 74;--cell-heat-red-rgb: 90, 28, 37}.no-value[_ngcontent-%COMP%]{color:var(--text-muted)}.chart-hidden[_ngcontent-%COMP%]{margin-bottom:16px}[_nghost-%COMP%]{max-width:900px;width:100%}[_nghost-%COMP%] header[_ngcontent-%COMP%]{font-weight:400;font-size:34px;line-height:34px;margin-bottom:8px;margin-top:32px}[_nghost-%COMP%] .description[_ngcontent-%COMP%]{font-weight:400;font-size:16px;line-height:24px;margin-bottom:24px}[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{background:var(--grey-20);padding:12px 12px 0;border-radius:8px;margin-bottom:24px}[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding-bottom:12px;border-bottom:1px solid var(--grey-40)}[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-app-select[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-pub-select[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] tag-select-multiple[_ngcontent-%COMP%]{width:auto}[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-app-select[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-pub-select[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] tag-select-multiple[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]{cursor:pointer;border-radius:8px;background-color:var(--grey-40);padding:8px 16px;font-weight:500;font-size:14px;line-height:16px;text-transform:uppercase;max-height:32px;display:flex;align-items:center;justify-content:center;white-space:nowrap;border:1px solid transparent}@media(hover:hover)and (pointer:fine){[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-app-select[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]:hover:not(.disabled,.lock), [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-pub-select[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]:hover:not(.disabled,.lock), [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] tag-select-multiple[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]:hover:not(.disabled,.lock){border-color:var(--grey-50)}}[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-app-select[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-pub-select[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] tag-select-multiple[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]{margin-bottom:12px;margin-right:12px}[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] .count-label[_ngcontent-%COMP%]{font-size:14px;line-height:20px}[_nghost-%COMP%] main[_ngcontent-%COMP%] notifications-alert-name[_ngcontent-%COMP%]{margin-bottom:12px;max-width:100%}[_nghost-%COMP%] footer[_ngcontent-%COMP%]{display:flex;max-height:52px;align-items:center;background:var(--grey-20);border-radius:8px;width:100%;padding:12px}[_nghost-%COMP%] footer[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]{cursor:pointer;border-radius:8px;background-color:var(--grey-40);padding:8px 16px;font-weight:500;font-size:14px;line-height:16px;text-transform:uppercase;max-height:32px;display:flex;align-items:center;justify-content:center;white-space:nowrap;border:1px solid transparent}@media(hover:hover)and (pointer:fine){[_nghost-%COMP%] footer[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]:hover:not(.disabled,.lock){border-color:var(--grey-50)}}[_nghost-%COMP%] footer[_ngcontent-%COMP%] multi-app-select[_ngcontent-%COMP%], [_nghost-%COMP%] footer[_ngcontent-%COMP%] publisher-select[_ngcontent-%COMP%], [_nghost-%COMP%] footer[_ngcontent-%COMP%] tag-select-multiple[_ngcontent-%COMP%]{width:fit-content}[_nghost-%COMP%]{--g-anim-duration: .3s}"]});}};var Be=class n{constructor(t,e,i){this.lastDateService=t;this.chartRequestService=e;this.countriesService=i;this.lastResponse=new rr$1(null);this.chartLoading=fi(false);this.chartConfig=new rr$1({});this.chartLines=new rr$1([]);this.appListColors=new Z;this.lastValueX=0;this.dataRequest=new W;}static{this.CountLinePoints=7;}static{this.CountEmptyLinePoints=1;}static{this.LineThresholdId="lineThreshold";}static getQueryKey(t){return `${t.id}|${t.aggregation}|${t.store}|${t.country}`}static getCountryParams(t,e,i,a,p,v){let A=C.getCountriesByApps(i,a);return C.getElementCountryParams(t,e,A,p,v)}updateData(t){Tu(t,this.lastQuery)||(this.lastQuery=JSON.stringify(t),this.chartLines.next([]),this.dataRequest.unsubscribe(),this.chartLoading.set(true),this.dataRequest=c$2.getDataRequest(t,this.chartRequestService).pipe(bu(()=>{this.chartLoading.set(false);})).subscribe(e=>{if(!e||e.length===0)return;let i={};t.forEach((a,p)=>{let v=n.getQueryKey(a);i[v]=e[p];}),this.lastResponse.next(i);}));}getLines(t,e,i){let a=[],p=kt.getTimeUnitByAggregation(t.aggregation),v=this.lastDateService.lastDate.getValue(),A=kt.subtract(kt.getDate(v),n.CountLinePoints,p),T=t.metric,S=t.aggregation,z=kt.unix(A),We=kt.unix(kt.getDate(v));return e.forEach(pe=>
1{t.countries.forEach(ye=>{t.stores.forEach(fe=>{let Ke=`${pe.id}|${t.aggregation}|${fe}|${ye}`;if(!i[Ke])return;let De=i[Ke];if(!(T in De))return;let Qe=f.filterPointsByRange(De[T].points,z,We,S);if(De[T].points=f.preparePointsByAggregation(Qe,S),!De[T].points.length)return;let se=De[T].points.map(_n=>({x:_n[0],y:_n[1],marker:{enabled:false}})),dn=this.appListColors.getColors().main;se[se.length-1].marker={enabled:true,radius:5,fillColor:dn,states:{hover:{animation:false,lineWidthPlus:0,radius:5,radiusPlus:0}}};let gn=t.condition==="spike_up"?"#FFFFFF":"#ccc",Pi=this.countriesService.getMultiCountries().WW,wi=n.getCountryParams(ye,[],pe.applications,[+fe],Pi,this.countriesService.multiCountries),Mi={data:se,pointStart:se[0].x,id:`${pe.id}|${T}|${fe}|${ye}`,name:{type:t.metric,typeName:"appList."+t.metric,name:pe.name,icon:pe.icon_url,description:["stores."+fe,wi.name]},visible:true,zIndex:5,gapSize:o$2.gapSizes[t.aggregation],yAxis:I.getYAxisSettings(t.metric).id,color:dn,events:{mouseOver(){this.chart.xAxis[0].crosshair={color:gn,zIndex:0};},mouseOut(){this.chart.xAxis[0].crosshair={color:gn,zIndex:0};}}};a.push(Mi);});});}),a}generateConfigAndLines(t,e){this.appListColors.resetColors();let p=Hp(this.lastResponse.getValue()),v=[];p&&(v=this.getLines(t,e,p)),v.forEach(A=>{Math.max.apply(null,A.data.map(z=>z.x));Math.min.apply(null,A.data.map(z=>z.y));}),this.updateLines([...v],t.aggregation,t.condition,t.value,t.metric);}updateLines(t,e,i,a,p){let v=t.filter(se=>se.id!==n.LineThresholdId);if(!v.length)return;let A=this.getFullValuesX(v),T=A[A.length-1],S=kt.getTimeUnitByAggregation(e),z=kt.unixToDate(T),We=kt.add(kt.startOf(z,S),n.CountEmptyLinePoints,S),pe=kt.unix(We),ye=i==="spike_up"?0:a,fe=A.map(se=>({x:se,y:ye,marker:{enabled:false}})).concat([{x:pe,y:ye,marker:{enabled:false}}]),Ke=i===">"?"<":">",De=u$1.isTopType(p)?Ke:i,Qe=this.getLineThreshold(fe,De,e,p);v.forEach(se=>se.yAxis=I.getYAxisSettings(p).id),this.chartLines.next([Qe,...v]),this.updatePlotLine(T);}getLineThreshold(t,e,i,a){return {data:t,id:n.LineThresholdId,type:"area",threshold:e===">"?1/0:-1/0,connectNulls:true,states:{inactive:{enabled:false},hover:{animation:false,lineWidthPlus:2}},lineWidth:1,visible:true,color:e==="spike_up"?"#FFFFFF":"#FEDA0F",fillOpacity:.2,yAxis:I.getYAxisSettings(a).id,enableMouseTracking:false,gapSize:o$2.gapSizes[i]}}getFullValuesX(t){let e=[];return t.forEach(i=>{i.data.forEach(a=>{e.includes(a.x)||e.push(a.x);});}),e.sort((i,a)=>i-a)}updatePlotLine(t){if(this.lastValueX===t)return null;this.lastValueX=t;let e={xAxis:{plotLines:[{color:"rgba(0, 0, 0, 0.2)",width:1,value:t,zIndex:1}]}};this.chartConfig.next(e);}updateConfig(){let t={chart:{borderRadius:8,marginBottom:30,height:210},plotOptions:{area:{stacking:void 0}},navigator:{enabled:false}};this.chartConfig.next(t);}static{this.\u0275fac=function(e){return new(e||n)(me(F$1),me(_e$2),me(c))};}static{this.\u0275prov=G({token:n,factory:n.\u0275fac});}};function Ar(n,t){n&1&&(Zi$1(0,"div",1),Eg(1,"spinner",2),kl()),n&2&&(AE(),Ig("diameter",28));}var Qt=class n{constructor(t,e){this.chartService=t;this.lastDateService=e;this.params=new rr$1(null);this.apps=new rr$1([]);this.chartAggregation=new rr$1("day");this.chartMetrics=new rr$1([]);this.range=new rr$1(null);this.datepicker=new rr$1(null);this.type=new rr$1("AppTracker");this.subscription=new W;}ngOnInit(){this.updateDates(),this.subscription.add(qm([this.params,this.apps]).pipe(Su(),wu(0)).subscribe(([[t,e],[i,a]])=>{let p=i.type==="metrics",v=i.aggregation==="lifetime";if(!p||v)return;let A=i.aggregation!==t.aggregation,T=!Tu(i.stores,t.stores),S=!Tu(i.countries,t.countries),z=!Tu(e,a);if(A||T||S||z){let fe=this.getQuery(i,a);this.chartService.updateData(fe),this.chartAggregation.next(i.aggregation),this.chartMetrics.next([i.metric]);return}let We=t.condition!==i.condition,pe=i.value!==t.value,ye=i.metric!==t.metric;(We||pe||ye)&&this.chartService.generateConfigAndLines(i,a);}));}ngOnDestroy(){this.subscription.unsubscribe();}getQuery(t,e){if(t.aggregation==="lifetime")return [];let i=kt.getTimeUnitByAggregation(t.aggregation),a=this.lastDateService.lastDate.getValue(),p=kt.subtract(kt.getDate(a),8,i),v=kt.format(p),A=[];return e.forEach(T=>
1{t.countries.forEach(S=>{t.stores.forEach(z=>{A.push({aggregation:t.aggregation,dateStart:v,dateEnd:a,store:+z,country:S,id:T.id});});});}),A}updateDates(){this.params.getValue().aggregation!=="lifetime"&&(this.range.next({min:void 0,max:void 0}),this.datepicker.next({start:0,end:0,period:"selectAllTime"}));}static{this.\u0275fac=function(e){return new(e||n)(Jr$1(Be),Jr$1(F$1))};}static{this.\u0275cmp=sw({type:n,selectors:[["app-metrics-updates-chart"]],inputs:{params:"params",apps:"apps",chartAggregation:"chartAggregation",chartMetrics:"chartMetrics"},decls:3,vars:12,consts:[[3,"type","showChartTools","isMixedChartType","types","customChartConfig","range","datepicker","chartLines","aggregation"],[1,"spinner-container"],[3,"diameter"]],template:function(e,i){e&1&&(Eg(0,"chart",0),bb(1,"async"),uT(2,Ar,2,1,"div",1)),e&2&&(Ig("type",i.type)("showChartTools",false)("isMixedChartType",true)("types",i.chartMetrics)("customChartConfig",i.chartService.chartConfig)("range",_b(1,10,i.range))("datepicker",i.datepicker)("chartLines",i.chartService.chartLines)("aggregation",i.chartAggregation),AE(2),dT(i.chartService.chartLoading()?2:-1));},dependencies:[Kn,b,hn],styles:["[_ngcontent-%COMP%]:root{--white: #fff;--black: #000;--static-white: #fff;--static-black: #000;--grey-20: #F9F9FA;--grey-30: #E9EDEF;--grey-40: #DADFE1;--static-grey-40: #DADFE1;--grey-50: #A7B2B9;--static-grey-50: #A7B2B9;--grey-70: #506775;--grey-80: #475156;--static-grey-80: #475156;--grey-90: #3F3F46;--grey-100: #273238;--red-30: #FDEAEA;--red-40: #FF7485;--red-50: #FA354D;--yellow-30: #FFF8CF;--yellow-40: #FCE778;--yellow-50: #FEDA0F;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #E6FEE6;--green-40: #D4FABE;--green-50: #99F199;--green-70: #34C834;--green-90: #26A542;--blue-30: #EAF2FD;--blue-35: #4CE5FF;--blue-40: #D8E8FF;--blue-50: #B5D4FF;--blue-60: #6BB6FC;--blue-70: #2B98FC;--blue-70-rgb: 38, 104, 232;--blue-80: #2668E8;--blue-90: #1A54C3;--violete-20: #FAEDFF;--violete-30: #F5D9FF;--violete-60: #B259D2;--violete-80: #7B0EA2;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .15);--chart-grid-weekend-color: #F2f5f7;--cell-heat-blue-rgb: 189, 212, 255;--cell-heat-orange-rgb: 254, 217, 161;--cell-heat-green-primary-rgb: 184, 229, 125;--cell-heat-green-secondary-rgb: 139, 238, 179;--cell-heat-violet-rgb: 212, 186, 255;--cell-heat-red-rgb: 255, 135, 153}[_ngcontent-%COMP%]:root[theme=dark]{--white: #0E1113;--black: #C5C7CC;--static-white: #F2F3F5;--grey-20: #12171A;--grey-30: #1A2024;--grey-40: #1c2228;--grey-50: #2a333b;--grey-70: #5f6a72;--grey-80: #8a949b;--grey-90: #b0b6bb;--grey-100: #1b1f23;--red-30: #3A151A;--red-40: #FF6B7C;--red-50: #FF3B52;--yellow-30: #3A320F;--yellow-40: #EAD25F;--yellow-50: #FFD400;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #133A1E;--green-40: #1E5A2E;--green-50: #2E6E2E;--green-70: #34C834;--green-90: #26A542;--blue-30: #0F1C2E;--blue-35: #4CE5FF;--blue-40: #162A44;--blue-50: #1F3B66;--blue-60: #3D7DDC;--blue-70: #4B9BFF;--blue-70-rgb: 75, 155, 255;--blue-80: #5C8DFF;--blue-90: #8CB2FF;--violete-20: #2A1633;--violete-30: #3A1E4A;--violete-60: #B259D2;--violete-80: #D38CFF;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .25);--chart-grid-weekend-color: #191F23;
1--cell-heat-blue-rgb: 31, 59, 102;--cell-heat-orange-rgb: 92, 58, 18;--cell-heat-green-primary-rgb: 30, 90, 46;--cell-heat-green-secondary-rgb: 22, 84, 58;--cell-heat-violet-rgb: 58, 30, 74;--cell-heat-red-rgb: 90, 28, 37}.no-value[_ngcontent-%COMP%]{color:var(--text-muted)}.chart-hidden[_ngcontent-%COMP%]{margin-bottom:16px}[_nghost-%COMP%]{position:relative;max-height:210px;border-radius:8px;overflow:hidden}[_nghost-%COMP%] chart[_ngcontent-%COMP%]{width:100%;max-height:210px;border-radius:8px}[_nghost-%COMP%] .spinner-container[_ngcontent-%COMP%]{border-radius:8px;background:var(--white);max-height:210px;position:absolute;inset:0;display:flex;align-items:center;justify-content:center}"]});}};var vi=n=>({values:[{name:"appTracker.rank_higher",value:">"},{name:"appTracker.rank_lower",value:"<"},{name:"appTracker.spike_up",value:"spike_up"}],valuesForLifetime:[{name:"appTracker.ranks_higher",value:">"}],analyticEvents:{onOpen:t=>{n("app_tracker_condition_select_open",t);},closeEsc:t=>{n("app_tracker_condition_select_close_esc",t);},closeBackdrop:t=>{n("app_tracker_condition_select_close_backdrop",t);},closeApply:t=>{n("app_tracker_condition_select_change",t);},closeCancel:t=>{n("app_tracker_condition_select_close_cancel",t);}},customSettings:{}});var xi=()=>({values:[{name:"appTracker.metrics_type",value:"metrics"},{name:"appTracker.updates_type",value:"updates"}]});var Yt=()=>[5],bi=()=>["5"];function wr(n,t){n&1&&(Zi$1(0,"span",4),ib(1),bb(2,"translate"),kl()),n&2&&(AE(),jl(" ",_b(2,1,"appTracker.notify_me_when")," "));}function Mr(n,t){if(n&1){let e=DT();Zi$1(0,"header")(1,"div",1)(2,"span",2),ib(3),bb(4,"translate"),kl()(),Zi$1(5,"am-btn-group",3),bb(6,"async"),_g("changeValue",function(a){Rd(e);let p=NT();return kd(p.changeAlertType(a))}),kl(),uT(7,wr,3,3,"span",4),bb(8,"async"),kl();}if(n&2){let e=NT();AE(3),Ug(_b(4,4,"appTracker.for_the_chosen_apps")),AE(2),Ig("value",_b(6,6,e.tempParams).type)("values",e.typeButtons),AE(2),dT(_b(8,8,e.tempParams).type===e.alertTypeEnum.metrics?7:-1);}}function kr(n,t){if(n&1&&(Zi$1(0,"div",9),Eg(1,"i",40),kl()),n&2){let e=NT(3);Ig("placement","right")("analyticsEvent",e.tooltipAnalytic)("textTooltip","appTracker.aggregation_tooltip_text");}}function Fr(n,t){n&1&&(Zi$1(0,"span",11),ib(1),bb(2,"translate"),kl()),n&2&&(AE(),Ug(_b(2,1,"appTracker.position")));}function Sr(n,t){if(n&1){let e=DT();Zi$1(0,"simple-select",41),bb(1,"async"),bb(2,"async"),_g("valChange",function(a){Rd(e);let p=NT(3);return kd(p.handleChangeCondition(a))}),kl();}if(n&2){let e=NT(3);Ig("values",_b(1,6,e.conditionSelectValues))("itemsLowercase",true)("showPanelTitleDesk",false)("settings",e.conditionSelectConfig.customSettings)("analyticEvents",e.conditionSelectConfig.analyticEvents)("value",_b(2,8,e.tempParams).condition);}}function Or(n,t){n&1&&(Zi$1(0,"span",14),ib(1),bb(2,"translate"),kl()),n&2&&(AE(),Ug(_b(2,1,"appTracker.ranks_higher")));}function Tr(n,t){if(n&1){let e=DT();Zi$1(0,"div",15)(1,"simple-select",42),bb(2,"async"),_g("valChange",function(a){Rd(e);let p=NT(3);return kd(p.handleSpikeUpChange(a))}),kl(),Zi$1(3,"div",43),Eg(4,"i",40),kl()();}if(n&2){let e=NT(3);AE(),Ig("values",e.spikeUpSelectConfig.values)("itemsLowercase",true)("showPanelTitleDesk",false)("settings",e.spikeUpSelectConfig.customSettings)("analyticEvents",e.spikeUpSelectConfig.analyticEvents)("value",_b(2,9,e.tempParams).spike_value),AE(2),Ig("placement","right")("analyticsEvent",e.tooltipSpikeUpAnalytic)("textTooltip","appTracker.spike_up_tooltip_text");}}function Er(n,t){if(n&1){let e=DT();Zi$1(0,"mask-input",46),bb(1,"async"),_g("clear",function(){Rd(e);let a=NT(4);return kd(a.handleChangeValue(0))})("valChange",function(a){Rd(e);let p=NT(4);return kd(p.handleChangeValue(a))}),kl();}if(n&2){let e=NT(4);Ig("value",e.alertForm.getRawValue().value)("hasError",e.hasErrorValue)("prefix",_b(1,3,e.prefixByMetric));}}function Br(n,t){if(n&1){let e=DT();Zi$1(0,"mask-input",46),bb(1,"async"),_g("clear",function(){Rd(e);let a=NT(4);return kd(a.handleChangeValue(0))})("valChange",function(a){Rd(e);let p=NT(4);return kd(p.handleChangeValue(a))}),kl();}if(n&2){let e=NT(4);Ig("value",e.alertForm.getRawValue().value)("hasError",e.hasErrorValue)("prefix",_b(1,3,e.prefixByMetric));}}function Dr(n,t){if(n&1&&(Zi$1(0,"div",16),ib(1),bb(2,"translate"),Zi$1(3,"form",44),uT(4,Er,2,5,"mask-input",45),bb(5,"async"),uT(6,Br,2,5,"mask-input",45),bb(7,"async"),kl()()),n&2){let e=NT(3);AE(),jl(" ",_b(2,4,"appTracker.than")," "),AE(2),Ig("formGroup",e.alertForm),AE(),dT(_b(5,6,e.tempParams).metric==="revenue"?4:-1),AE(2),dT(_b(7,8,e.tempParams).metric!=="revenue"?6:-1);}}function Vr(n,t){if(n&1){let e=DT();Zi$1(0,"simple-select",8),bb(1,"async"),bb(2,"async"),_g("valChange",function(a){Rd(e);let p=NT(3);return kd(p.handleChangeCondition(a))}),kl();}if(n&2){let e=NT(3);Ig("values",_b(1,6,e.conditionSelectValues))("itemsLowercase",true)("showPanelTitleDesk",false)("settings",e.conditionSelectConfig.customSettings)("analyticEvents",e.conditionSelectConfig.analyticEvents)("value",_b(2,8,e.tempParams).condition);}}function Ur(n,t){n&1&&(Zi$1(0,"span",14),ib(1),bb(2,"translate"),kl()),n&2&&(AE(),Ug(_b(2,1,"appTracker.ranks_higher")));}function Ir(n,t){if(n&1){let e=DT();Zi$1(0,"div",19)(1,"simple-select",47),bb(2,"async"),_g("valChange",function(a){Rd(e);let p=NT(3);return kd(p.handleSpikeUpChange(a))}),kl(),Zi$1(3,"div",48),Eg(4,"i",40),kl()();}if(n&2){let e=NT(3);AE(),Ig("values",e.spikeUpSelectConfig.values)("itemsLowercase",true)("showPanelTitleDesk",false)("settings",e.spikeUpSelectConfig.customSettings)("analyticEvents",e.spikeUpSelectConfig.analyticEvents)("value",_b(2,9,e.tempParams).spike_value),AE(2),Ig("placement","right")("analyticsEvent",e.tooltipSpikeUpAnalytic)("textTooltip","appTracker.spike_up_tooltip_text");}}function Nr(n,t){if(n&1){let e=DT();
1Zi$1(0,"mask-input",46),bb(1,"async"),_g("clear",function(){Rd(e);let a=NT(4);return kd(a.handleChangeValue(null))})("valChange",function(a){Rd(e);let p=NT(4);return kd(p.handleChangeValue(a))}),kl();}if(n&2){let e=NT(4);Ig("value",e.alertForm.getRawValue().value)("hasError",e.hasErrorValue)("prefix",_b(1,3,e.prefixByMetric));}}function Lr(n,t){if(n&1){let e=DT();Zi$1(0,"mask-input",46),bb(1,"async"),_g("clear",function(){Rd(e);let a=NT(4);return kd(a.handleChangeValue(null))})("valChange",function(a){Rd(e);let p=NT(4);return kd(p.handleChangeValue(a))}),kl();}if(n&2){let e=NT(4);Ig("value",e.alertForm.getRawValue().value)("hasError",e.hasErrorValue)("prefix",_b(1,3,e.prefixByMetric));}}function Rr(n,t){if(n&1&&(Zi$1(0,"div",16),ib(1),bb(2,"translate"),Zi$1(3,"form",44),uT(4,Nr,2,5,"mask-input",45),bb(5,"async"),uT(6,Lr,2,5,"mask-input",45),bb(7,"async"),kl()()),n&2){let e=NT(3);AE(),jl(" ",_b(2,4,"appTracker.than")," "),AE(2),Ig("formGroup",e.alertForm),AE(),dT(_b(5,6,e.tempParams).metric==="revenue"?4:-1),AE(2),dT(_b(7,8,e.tempParams).metric!=="revenue"?6:-1);}}function jr(n,t){if(n&1&&(Zi$1(0,"div",29),Eg(1,"i",40),kl()),n&2){let e=NT(3);Ig("placement","right")("analyticsEvent",e.tooltipAnalytic)("textTooltip","appTracker.aggregation_tooltip_text");}}function zr(n,t){n&1&&(Zi$1(0,"span",31),ib(1),bb(2,"translate"),kl()),n&2&&(AE(),Ug(_b(2,1,"appTracker.position")));}function $r(n,t){if(n&1){let e=DT();Zi$1(0,"simple-select",49),bb(1,"async"),bb(2,"async"),_g("valChange",function(a){Rd(e);let p=NT(3);return kd(p.handleChangeCondition(a))}),kl();}if(n&2){let e=NT(3);Ig("values",_b(1,5,e.conditionSelectValues))("itemsLowercase",true)("settings",e.conditionSelectConfig.customSettings)("analyticEvents",e.conditionSelectConfig.analyticEvents)("value",_b(2,7,e.tempParams).condition);}}function Wr(n,t){if(n&1){let e=DT();Zi$1(0,"div",19)(1,"simple-select",49),bb(2,"async"),_g("valChange",function(a){Rd(e);let p=NT(3);return kd(p.handleSpikeUpChange(a))}),kl(),Zi$1(3,"div",29),Eg(4,"i",40),kl()();}if(n&2){let e=NT(3);AE(),Ig("values",e.spikeUpSelectConfig.values)("itemsLowercase",true)("settings",e.spikeUpSelectConfig.customSettings)("analyticEvents",e.spikeUpSelectConfig.analyticEvents)("value",_b(2,8,e.tempParams).spike_value),AE(2),Ig("placement","right")("analyticsEvent",e.tooltipSpikeUpAnalytic)("textTooltip","appTracker.spike_up_tooltip_text");}}function Gr(n,t){n&1&&(ib(0),bb(1,"translate")),n&2&&jl(" ",_b(1,1,"appTracker.ranks_higher")," ");}function Hr(n,t){if(n&1&&(Zi$1(0,"span",34),uT(1,Gr,2,3),bb(2,"async"),ib(3),bb(4,"translate"),kl()),n&2){let e=NT(3);AE(),dT(_b(2,2,e.tempParams).aggregation===e.AlertAggregationEnum.lifetime?1:-1),AE(2),jl(" ",_b(4,4,"appTracker.than")," ");}}function qr(n,t){if(n&1){let e=DT();Zi$1(0,"mask-input",46),bb(1,"async"),_g("clear",function(){Rd(e);let a=NT(4);return kd(a.handleChangeValue(0))})("valChange",function(a){Rd(e);let p=NT(4);return kd(p.handleChangeValue(a))}),kl();}if(n&2){let e=NT(4);Ig("value",e.alertForm.getRawValue().value)("hasError",e.hasErrorValue)("prefix",_b(1,3,e.prefixByMetric));}}function Jr(n,t){if(n&1){let e=DT();Zi$1(0,"mask-input",46),bb(1,"async"),_g("clear",function(){Rd(e);let a=NT(4);return kd(a.handleChangeValue(0))})("valChange",function(a){Rd(e);let p=NT(4);return kd(p.handleChangeValue(a))}),kl();}if(n&2){let e=NT(4);Ig("value",e.alertForm.getRawValue().value)("hasError",e.hasErrorValue)("prefix",_b(1,3,e.prefixByMetric));}}function Kr(n,t){if(n&1&&(Zi$1(0,"form",36),uT(1,qr,2,5,"mask-input",45),bb(2,"async"),uT(3,Jr,2,5,"mask-input",45),bb(4,"async"),kl()),n&2){let e=NT(3);Ig("formGroup",e.alertForm),AE(),dT(_b(2,3,e.tempParams).metric==="revenue"?1:-1),AE(2),dT(_b(4,5,e.tempParams).metric!=="revenue"?3:-1);}}function Qr(n,t){if(n&1){let e=DT();Zi$1(0,"div",5)(1,"div",6)(2,"div",7)(3,"simple-select",8),bb(4,"async"),bb(5,"async"),bb(6,"async"),_g("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeAggregation(a))}),kl(),uT(7,kr,2,3,"div",9),bb(8,"async"),bb(9,"async"),kl(),Zi$1(10,"simple-select",10),bb(11,"async"),bb(12,"async"),_g("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeMetric(a))}),kl(),uT(13,Fr,3,3,"span",11),bb(14,"async"),Zi$1(15,"div",12),uT(16,Sr,3,10,"simple-select",13),bb(17,"async"),uT(18,Or,3,3,"span",14),bb(19,"async"),uT(20,Tr,5,11,"div",15),bb(21,"async"),uT(22,Dr,8,10,"div",16),bb(23,"async"),kl()(),Zi$1(24,"div",17),uT(25,Vr,3,10,"simple-select",18),bb(26,"async"),uT(27,Ur,3,3,"span",14),bb(28,"async"),uT(29,Ir,5,11,"div",19),bb(30,"async"),uT(31,Rr,8,10,"div",16),bb(32,"async"),kl(),Zi$1(33,"div",20)(34,"div",21)(35,"div",22),ib(36),bb(37,"translate"),Zi$1(38,"country-group-select",23),bb(39,"async"),bb(40,"async"),bb(41,"async"),_g("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeCountry(a))}),kl()(),Zi$1(42,"div",24),ib(43),bb(44,"translate"),Zi$1(45,"simple-select-multiple",25),bb(46,"async"),bb(47,"async"),bb(48,"async"),_g("apply",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeStore(a))}),kl()()(),Eg(49,"notifications-multi-countries-note"),kl(),Eg(50,"app-metrics-updates-chart",26),bb(51,"async"),kl(),Zi$1(52,"div",27)(53,"div",16)(54,"simple-select",28),bb(55,"async"),_g("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeAggregation(a))}),kl(),uT(56,jr,2,3,"div",29),bb(57,"async"),bb(58,"async"),kl(),Zi$1(59,"div",20)(60,"div",16)(61,"simple-select",30),bb(62,"async"),bb(63,"async"),_g("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeMetric(a))}),kl(),uT(64,zr,3,3,"span",31),bb(65,"async"),kl()(),uT(66,$r,3,9,"simple-select",32),bb(67,"async"),uT(68,Wr,5,10,"div",19),bb(69,"async"),Zi$1(70,"div",20)(71,"div",33),uT(72,Hr,5,6,"span",34),bb(73,"async"),Zi$1(74,"span"),ib(75),bb(76,"translate"),kl(),Zi$1(77,"span"),ib(78),bb(79,"translate"),kl()(),Zi$1(80,"div",35),uT(81,Kr,5,7,"form",36),bb(82,"async"),Zi$1(83,"country-group-select",37),bb(84,"async"),bb(85,"async"),bb(86,"async"),_g("valChange",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeCountry(a))}),kl(),Zi$1(87,"simple-select-multiple",38),bb(88,"async"),bb(89,"async"),bb(90,"async"),_g("apply",function(a){Rd(e);let p=NT(2);return kd(p.handleChangeStore(a))}),kl()()(),Eg(91,"notifications-multi-countries-note")(92,"app-metrics-updates-chart",39),bb(93,"async"),kl();}if(n&2){let e=NT(2);AE(3),Pg("last-child",_b(4,95,e.tempParams).aggregation!==e.AlertAggregationEnum.day&&_b(5,97,e.tempParams).aggregation!==e.AlertAggregationEnum.lifetime),Ig("values",e.aggregationSelectConfig.valuesForLifetime)("itemsLowercase",true)("showPanelTitleDesk",false)("settings",e.aggregationSelectConfig.customSettings)("analyticEvents",e.aggregationSelectConfig.analyticEvents)("value",_b(6,99,e.tempParams).aggregation),AE(4),dT(_b(8,101,e.tempParams).aggregation!==e.AlertAggregationEnum.day&&_b(9,103,e.tempParams).aggregation!==e.AlertAggregationEnum.lifetime?7:-1),AE(3),Ig("values",_b(11,105,e.metricSelectValues))("itemsLowercase",true)("showPanelTitleDesk",false)("settings",e.metricSelectConfig.customSettings)("analyticEvents",e.metricSelectConfig.analyticEvents)("value",_b(12,107,e.tempParams).metric),AE(3),dT(_b(14,109,e.tempParams).metric.includes("top")?13:-1),AE(3),dT(_b(17,111,e.tempParams).aggregation!==e.AlertAggregationEnum.lifetime?16:-1),AE(2),dT(_b(19,113,e.tempParams).aggregation===e.AlertAggregationEnum.lifetime?18:-1),AE(2),dT(_b(21,115,e.tempParams).condition===e.conditionEnum.spikeUp?20:-1),AE(2),dT(_b(23,117,e.tempParams).condition!==e.conditionEnum.spikeUp?22:-1),AE(3),dT(_b(26,119,e.tempParams).aggregation!==e.AlertAggregationEnum.lifetime?25:-1),AE(2),dT(_b(28,121,e.tempParams).aggregation===e.AlertAggregationEnum.lifetime?27:-1),AE(2),dT(_b(30,123,e.tempParams).condition===e.conditionEnum.spikeUp?29:-1),AE(2),dT(_b(32,125,e.tempParams).condition!==e.conditionEnum.spikeUp?31:-1),AE(5),jl(" ",_b(37,127,"appTracker.for")," "),AE(2),Pg("text-lowercase",_b(39,129,e.tempParams)?.countries[0]==="WW")("text-capitalize",_b(40,131,e.tempParams).countries[0]!=="WW"),Ig("value",e.getTierGroupForSelector(_b(41,133,e.tempParams).countries))("allowCreateNewGroup",false)("allowEditGroups",false)("title","")("lock",!e.hasAllCountries())("filterService",e.filterService),AE(5),jl(" ",_b(44,135,"appTracker.and")," "),AE(2),Pg("text-lowercase",_b(46,137,e.tempParams).stores===vb(183,Yt))("text-none-transform",_b(47,139,e.tempParams).stores!==vb(184,Yt)),Ig("value",_b(48,141,e.storesString))("settings",e.storeSelectConfig.customSettings)("values",e.storeSelectConfig.values)("deselectDefaultOnFirstSelect",true)("defaultValue",vb(185,bi))("showTitle",false)("filterService",e.filterService)("analyticEvents",e.storeSelectConfig.multiAnalyticEvents),AE(5),Ig("params",e.tempParams)("hidden",_b(51,143,e.tempParams).aggregation===e.AlertAggregationEnum.lifetime)("chartAggregation",e.chartAggregation)("chartMetrics",e.chartMetrics)("apps",e.alert.tempApps),AE(4),Ig("values",e.aggregationSelectConfig.valuesForLifetime)("itemsLowercase",true)("settings",e.aggregationSelectConfig.customSettings)("analyticEvents",e.aggregationSelectConfig.analyticEvents)("value",_b(55,145,e.tempParams).aggregation),AE(2),dT(_b(57,147,e.tempParams).aggregation!==e.AlertAggregationEnum.day&&_b(58,149,e.tempParams).aggregation!==e.AlertAggregationEnum.lifetime?56:-1),AE(5),Ig("values",_b(62,151,e.metricSelectValues))("itemsLowercase",true)("settings",e.metricSelectConfig.customSettings)("analyticEvents",e.metricSelectConfig.analyticEvents)("value",_b(63,153,e.tempParams).metric),AE(3),dT(_b(65,155,e.tempParams).metric.includes("top")?64:-1),AE(2),dT(_b(67,157,e.tempParams).aggregation!==e.AlertAggregationEnum.lifetime?66:-1),AE(2),dT(_b(69,159,e.tempParams).condition===e.conditionEnum.spikeUp?68:-1),AE(4),dT(_b(73,161,e.tempParams).condition!==e.conditionEnum.spikeUp?72:-1),AE(3),Ug(_b(76,163,"appTracker.for")),AE(3),Ug(_b(79,165,"appTracker.and")),AE(3),dT(_b(82,167,e.tempParams).condition!==e.conditionEnum.spikeUp?81:-1),AE(2),Pg("text-lowercase",_b(84,169,e.tempParams)?.countries[0]==="WW")("text-capitalize",_b(85,171,e.tempParams).countries[0]!=="WW"),Ig("value",e.getTierGroupForSelector(_b(86,173,e.tempParams).countries))("allowCreateNewGroup",false)("allowEditGroups",false)("title","")("lock",!e.hasAllCountries()),AE(4),Pg("text-lowercase",_b(88,175,e.tempParams).stores===vb(186,Yt))("text-none-transform",_b(89,177,e.tempParams).stores!==vb(187,Yt)),Ig("value",_b(90,179,e.storesString))("settings",e.storeSelectConfig.customSettings)("values",e.storeSelectConfig.values)("deselectDefaultOnFirstSelect",true)("defaultValue",vb(188,bi))("showTitle",false)("filterService",e.filterService)("analyticEvents",e.storeSelectConfig.multiAnalyticEvents),AE(5),Ig("params",e.tempParams)("hidden",_b(93,181,e.tempParams).aggregation===e.AlertAggregationEnum.lifetime)("apps",e.alert.tempApps);}}function Yr(n,t){if(n&1&&(Zi$1(0,"main")(1,"section"),uT(2,Qr,94,189),bb(3,"async"),kl()()),n&2){let e=NT();AE(2),dT(_b(3,1,e.tempParams).type===e.alertTypeEnum.metrics?2:-1);}}function Xr(n,t){if(n&1){let e=DT();Zi$1(0,"alert-footer",50),_g("delete",function(){Rd(e);let a=NT();return kd(a.delete.emit(a.alert))})("updateSlackStatus",function(){Rd(e);let a=NT();return kd(a.footerService.toggleSlack())})("updateEmailStatus",function(){Rd(e);let a=NT();return kd(a.footerService.toggleEmail())})("sendTest",function(){Rd(e);let a=NT();return kd(a.handleSendTestAlert())})("cancel",function(){Rd(e);let a=NT();return kd(a.cancel.emit())})("apply",function(){Rd(e);let a=NT();return kd(a.update())}),kl();}if(n&2){let e=NT();Ig("slackActive",e.footerService.slackActive)("slackUrl",e.footerService.slackUrl)("slackUrlLoading",e.footerService.slackUrlLoading)("email",e.footerService.email)("emailActive",e.footerService.emailActive)("label",e.footerService.label)("loading",e.footerService.loading)("needSave",e.isAlertNeedSave);}}var Xt=class n{constructor(t,e,i,a,p,v){this.chartService=t;this.analyticsService=e;this.lastDateService=i;this.footerService=a;this.filterService=p;this.limitWarningDialogService=v;
1this.cancel=new tt;this.delete=new tt;this.apply=new tt;this.tempParams=new rr$1(null);this.hasErrorValue=false;this.typeButtons=[];this.isAlertNeedSave=new rr$1(false);this.conditionValue=new rr$1("");this.tooltipAnalytic="app_tracker_aggregation_tooltip";this.conditionEnum=Te;this.alertTypeEnum=m;this.AlertAggregationEnum=ct;this.countriesService=D(c);this.hasAllCountries=D(ve).getAccessSignal(E$1.mobile_all_countries);this.storesString=new rr$1(["5"]);this.subscription=new W;this.tooltipSpikeUpAnalytic="app_tracker_spike_up_tooltip";this.chartAggregation=new rr$1(null);this.chartMetrics=new rr$1([]);this.getTierGroupForSelector=t=>t.map(e=>e==="W1"?this.countriesService.getTierOneWestCountries().sort().join("-"):e==="E1"?this.countriesService.getTierOneEastCountries().sort().join("-"):e);this.initSelectorConfig();}getTierGroupForAlert(t){return t.map(e=>e===this.countriesService.getTierOneWestCountries().sort().join("-")?"W1":e===this.countriesService.getTierOneEastCountries().sort().join("-")?"E1":e)}static getValueY(t,e,i){let a=[];return t.forEach(p=>{let v=p[e].points;v.length>0&&a.push(v[v.length-1][1]);}),a=a.sort((p,v)=>p-v),a.length>0&&i==="<"?a[0]:a.length>0&&i===">"?a[a.length-1]:0}handleSendTestAlert(){this.footerService.sendNotify(this.alert,_e.prepareAlertParamsBeforeSave(this.tempParams.getValue()));}initSelectorConfig(){this.metricSelectConfig=gt((t,e)=>this.analyticsService.send(t,e)),this.conditionSelectConfig=vi((t,e)=>this.analyticsService.send(t,e)),this.aggregationSelectConfig=dt((t,e)=>this.analyticsService.send(t,e)),this.countrySimpleSelectConfig=mt((t,e)=>this.analyticsService.send(t,e)),this.spikeUpSelectConfig=Rt((t,e)=>this.analyticsService.send(t,e)),this.storeSelectConfig=_t((t,e)=>this.analyticsService.send(t,e)),this.typeButtons=xi().values.map(t=>({name:t.name,value:t.value}));}ngOnInit(){this.footerService.init(this.alert.alert),this.tempParams.next(Hp(this.alert.params)),this.prefixByMetric=this.tempParams.pipe(ge$1(t=>t.metric==="revenue"?"$":"")),this.conditionSelectValues=this.tempParams.pipe(ge$1(t=>{let e=t.metric==="downloads"&&t.aggregation!=="lifetime";return this.conditionSelectConfig.values=[{name:e?"appTracker.rank_higher":"appTracker.ranks_higher",value:">"},{name:e?"appTracker.rank_lower":"appTracker.ranks_lower",value:"<"},{name:"appTracker.spike_up",value:"spike_up"}],t.aggregation==="lifetime"?this.conditionSelectConfig.valuesForLifetime:this.conditionSelectConfig.values})),this.metricSelectValues=this.tempParams.pipe(ge$1(t=>t.aggregation!=="lifetime"&&t.condition!==this.conditionEnum.spikeUp?this.metricSelectConfig.values:this.metricSelectConfig.no_top_values)),this.subscription.add(this.alert.tempApps.pipe(ge$1((t,e)=>({apps:t,index:e}))).subscribe(({apps:t,index:e})=>{let i=this.tempParams.getValue();i.app_ids=$.getAppIdsByUnitedApps(t,i.app_ids),this.tempParams.next(i),e!==0&&this.updateChart();})),this.subscription.add(qm([this.tempParams,this.footerService.isFooterChanged,this.alert.name]).subscribe(([t,e,i])=>{this.chartAggregation.next(t.aggregation),this.chartMetrics.next([t.metric]);let a=!Tu(t,this.alert.params),p=this.alert.alert.id===0,v=this.alert.alert.title!==i,A=t.type==="updates";A||this.storesString.next(this.tempParams.getValue().stores.map(T=>T.toString())),this.isAlertNeedSave.next((p||a||e||v)&&(A||this.alertForm?.valid)&&!this.hasErrorValue&&this.footerService.isSlackOrEmailUsed());})),this.subscription.add(this.chartService.lastResponse.subscribe(t=>{if(!t||!this.alertForm)return;let e=this.alertForm.get("value").touched,i=this.tempParams.getValue().type==="metrics",a=this.alert.alert.id===0;if(!e&&i&&a){let p=this.tempParams.getValue().metric,v=this.tempParams.getValue().condition,A=Object.values(t),T=n.getValueY(A,p,v);this.alertForm.get("value").setValue(T||"0");}this.tempParams.getValue().type==="metrics"&&this.chartService.generateConfigAndLines(this.tempParams.getValue(),this.alert.tempApps.getValue());})),this.initForm(),this.tempParams.getValue().type==="metrics"&&this.updateChart();}ngOnDestroy(){this.subscription.unsubscribe(),this.footerService.destroy();}updateChart(){if(this.chartService.updateConfig(),this.tempParams.getValue().type==="metrics"){let e=this.getQuery();this.chartService.updateData(e);}}handleChangeValue(t){this.alertForm.get("value").setValue(t),this.analyticsService.send("app_tracker_alert_value_enter",[`${t}`]),this.alertForm.get("value").markAsTouched();}initForm(){this.alertForm=new T({value:new N(this.tempParams.getValue().value,[ce.required,
1ce.maxLength(15)])}),this.subscription.add(this.alertForm.get("value").valueChanges.pipe(wu(10)).subscribe(t=>{let e=Hp(this.tempParams.getValue());e.condition!=="spike_up"&&(this.alertForm.get("value").setValue(t,{emitEvent:false}),e.value=t,this.tempParams.next(e));})),this.subscription.add(qm([this.alertForm.get("value").valueChanges,this.tempParams]).subscribe(([t,e])=>{this.hasErrorValue=t<=0&&e.condition==="<";})),this.updateConditionSelectorValues();}update(){let t=this.tempParams.getValue();t.app_ids=$.getAppIdsByUnitedApps(this.alert.tempApps.getValue()),this.alert.alert.title=this.alert.name.getValue(),this.footerService.prepareAlert(this.alert,_e.prepareAlertParamsBeforeSave(t)),this.apply.emit(this.alert);}changeAlertType(t){let e=Hp(this.tempParams.getValue());if(e.type!==t&&(this.analyticsService.send("app_tracker_change_type",this.alert.alert.id?[`${this.alert.alert.id}`,t]:[t]),e.type=t,this.tempParams.next(e),t==="metrics")){let i=this.alert.alert.id===0;!this.alertForm.get("value").touched&&i&&this.updateValue(e),this.updateChart(),this.updateConditionSelectorValues();}}handleChangeMetric(t){let e=Hp(this.tempParams.getValue());e.metric!==t&&(e.metric=t,this.updateValue(e),this.chartService.lastResponse&&this.updateConditionSelectorValues());}handleSpikeUpChange(t){let e=Hp(this.tempParams.getValue());e.spike_value!==t&&(e.spike_value=t,this.tempParams.next(e));}handleChangeCountry(t){let e=Hp(this.tempParams.getValue());if(e.app_ids.length*e.stores.length*t.value.length>200)this.limitWarningDialogService.open(200);else {let a=this.getTierGroupForAlert(t.value);t.closePanel(),setTimeout(()=>{Tu(e.countries,a)||(e.countries=a,this.tempParams.next(e));});}}handleChangeStore(t){let e=Hp(this.tempParams.getValue());e.app_ids.length*e.countries.length*t.value.length>200?this.limitWarningDialogService.open(200):(t.closePanel(),setTimeout(()=>{let a=t.value.map(p=>+p);Tu(e.countries,a)||(e.stores=a,this.tempParams.next(e));}));}handleChangeCondition(t){let e=Hp(this.tempParams.getValue());e.condition!==t&&(e.condition=t,t==="spike_up"?(e.spike_value="high",e.metric=u$1.isTopType(e.metric)?"revenue":e.metric,this.tempParams.next(e)):this.updateValue(e),this.updateConditionSelectorValues());}handleChangeAggregation(t){let e=Hp(this.tempParams.getValue());e.aggregation!==t&&(t==="lifetime"&&(e.condition=">"),e.metric.includes("top")&&(e.metric="revenue"),e.aggregation=t,this.tempParams.next(e));}getQuery(){let t=this.tempParams.getValue();if(t.aggregation==="lifetime")return [];let e=this.alert.tempApps.getValue(),i=kt.getTimeUnitByAggregation(t.aggregation),a=this.lastDateService.lastDate.getValue(),p=kt.subtract(kt.getDate(a),Be.CountLinePoints,i),v=kt.format(p),A=[];return e.forEach(T=>{t.countries.forEach(S=>{t.stores.forEach(z=>{A.push({aggregation:t.aggregation,dateStart:v,dateEnd:a,store:+z,country:S,id:T.id});});});}),A}updateConditionSelectorValues(){let t=this.conditionSelectConfig.values.find(e=>e.value===this.tempParams.getValue().condition);this.conditionValue.next(t?t.name:void 0);}updateValue(t){let e=this.chartService.lastResponse.getValue(),i=t.metric,a=t.condition,p=e?n.getValueY(Object.values(e),i,a):0;t.value=p,this.tempParams.next(t),this.alertForm.get("value").setValue(p);}static{this.\u0275fac=function(e){return new(e||n)(Jr$1(Be),Jr$1(L),Jr$1(F$1),Jr$1(K),Jr$1(Ze$1),Jr$1(Ye))};}static{this.\u0275cmp=sw({type:n,selectors:[["app-metrics-updates-alert"]],inputs:{alert:"alert"},outputs:{cancel:"cancel",delete:"delete",apply:"apply"},features:[yb([Be,K])],decls:6,vars:9,consts:[[3,"slackActive","slackUrl","slackUrlLoading","email","emailActive","label","loading","needSave"],[1,"d-flex","flex-a-c","label-bell"],[1,"text-label"],[1,"btn-group-text-cut",3,"changeValue","value","values"],[1,"text-label","label-notify"],[1,"not-mob","d-flex","flex-col"],[1,"d-flex","flex-a-c","row","padding-bottom"],[1,"selector-wrap","desk-selector-width",2,"margin-right","12px"],[1,"tracker-selector","text-lowercase",3,"valChange","values","itemsLowercase","showPanelTitleDesk","settings","analyticEvents","value"],[1,"flex-center","d-inline-flex","pos-relative",2,"margin-left","4px",3,"placement","analyticsEvent","textTooltip"],[1,"tracker-selector","text-lowercase","last-child","desk-selector-width",3,"valChange","values","itemsLowercase","showPanelTitleDesk","settings","analyticEvents","value"],[2,"margin-left","12px"],[1,"row-1-add-selectors","width-100",2,"margin-left","12px"],[1,"tracker-selector","text-lowercase","desk-selector-width",3,"values","itemsLowercase","showPanelTitleDesk","settings","analyticEvents","value"],[1,"lifetime-condition-label"],[1,"d-inline-flex","flex-a-c","width-100"],[1,"selector-wrap"],[1,"d-flex","flex-a-c","padding-bottom","text-capitalize","row","row-2-content"],[1,"tracker-selector","text-lowercase",3,"values","itemsLowercase","showPanelTitleDesk","settings","analyticEvents","value"],[1,"d-inline-flex","flex-a-c"],[1,"d-flex"],[1,"d-flex","flex-a-c","flex-col","text-capitalize","row","width-100"],[1,"selector-wrap","special-width","padding-bottom"],["lockTooltip","screen.country_restriction_tooltip_text",1,"tracker-selector",2,"margin-left","12px",3,"valChange","value","allowCreateNewGroup","allowEditGroups","title","lock","filterService"],[1,"selector-wrap","special-width"],[1,"tracker-selector",2,"margin-left","12px",3,"apply","value","settings","values","de
1selectDefaultOnFirstSelect","defaultValue","showTitle","filterService","analyticEvents"],[1,"width-100","d-flex",3,"params","hidden","chartAggregation","chartMetrics","apps"],[1,"mob-flex-only","d-flex","flex-col"],[1,"tracker-selector","text-lowercase",3,"valChange","values","itemsLowercase","settings","analyticEvents","value"],[1,"aggregation-tooltip","flex-center","d-inline-flex","pos-relative","m-r-sm",3,"placement","analyticsEvent","textTooltip"],[1,"tracker-selector","text-lowercase","last-child",3,"valChange","values","itemsLowercase","settings","analyticEvents","value"],[1,"position-text","m-r-sm"],[1,"tracker-selector",3,"values","itemsLowercase","settings","analyticEvents","value"],[1,"mob-spans"],[1,"nowrap"],[1,"mob-selectors"],[1,"value-input-container","pos-relative",3,"formGroup"],["lockTooltip","screen.country_restriction_tooltip_text",1,"tracker-selector",3,"valChange","value","allowCreateNewGroup","allowEditGroups","title","lock"],[1,"tracker-selector","last-child",3,"apply","value","settings","values","deselectDefaultOnFirstSelect","defaultValue","showTitle","filterService","analyticEvents"],[1,"width-100","d-flex",3,"params","hidden","apps"],[1,"g-icon-help","text-gold","help-icon"],[1,"tracker-selector","text-lowercase","desk-selector-width",3,"valChange","values","itemsLowercase","showPanelTitleDesk","settings","analyticEvents","value"],[1,"tracker-selector",2,"margin-right","0!important",3,"valChange","values","itemsLowercase","showPanelTitleDesk","settings","analyticEvents","value"],[1,"aggregation-tooltip","flex-center","d-inline-flex","pos-relative","m-r-sm",2,"margin-bottom","0!important",3,"placement","analyticsEvent","textTooltip"],[1,"value-input-container","pos-relative",2,"margin-left","12px",3,"formGroup"],["errorText","appTracker.error_value_lower",1,"agree-form-input",3,"value","hasError","prefix"],["errorText","appTracker.error_value_lower",1,"agree-form-input",3,"clear","valChange","value","hasError","prefix"],[1,"tracker-selector",3,"valChange","values","itemsLowercase","showPanelTitleDesk","settings","analyticEvents","value"],[1,"flex-center","d-inline-flex","pos-relative","m-r-sm",3,"placement","analyticsEvent","textTooltip"],[1,"tracker-selector",3,"valChange","values","itemsLowercase","settings","analyticEvents","value"],[3,"delete","updateSlackStatus","updateEmailStatus","sendTest","cancel","apply","slackActive","slackUrl","slackUrlLoading","email","emailActive","label","loading","needSave"]],template:function(e,i){e&1&&(uT(0,Mr,9,10,"header"),bb(1,"async"),uT(2,Yr,4,3,"main"),bb(3,"async"),uT(4,Xr,1,8,"alert-footer",0),bb(5,"async")),e&2&&(dT(_b(1,3,i.tempParams)?0:-1),AE(2),dT(_b(3,5,i.tempParams)?2:-1),AE(2),dT(_b(5,7,i.tempParams)?4:-1));},dependencies:[An,oa$1,Qt$1,In,wn,An$1,en$1,fe,we,Qt,le,j,Ot,fe$1,Gt$1,Ct,re,hn,he],styles:["[_ngcontent-%COMP%]:root{--white: #fff;--black: #000;--static-white: #fff;--static-black: #000;--grey-20: #F9F9FA;--grey-30: #E9EDEF;--grey-40: #DADFE1;--static-grey-40: #DADFE1;--grey-50: #A7B2B9;--static-grey-50: #A7B2B9;--grey-70: #506775;--grey-80: #475156;--static-grey-80: #475156;--grey-90: #3F3F46;--grey-100: #273238;--red-30: #FDEAEA;--red-40: #FF7485;--red-50: #FA354D;--yellow-30: #FFF8CF;--yellow-40: #FCE778;--yellow-50: #FEDA0F;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #E6FEE6;--green-40: #D4FABE;--green-50: #99F199;--green-70: #34C834;--green-90: #26A542;--blue-30: #EAF2FD;--blue-35: #4CE5FF;--blue-40: #D8E8FF;--blue-50: #B5D4FF;--blue-60: #6BB6FC;--blue-70: #2B98FC;--blue-70-rgb: 38, 104, 232;--blue-80: #2668E8;--blue-90: #1A54C3;--violete-20: #FAEDFF;--violete-30: #F5D9FF;--violete-60: #B259D2;--violete-80: #7B0EA2;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .15);--chart-grid-weekend-color: #F2f5f7;--cell-heat-blue-rgb: 189, 212, 255;--cell-heat-orange-rgb: 254, 217, 161;--cell-heat-green-primary-rgb: 184, 229, 125;--cell-heat-green-secondary-rgb: 139, 238, 179;--cell-heat-violet-rgb: 212, 186, 255;--cell-heat-red-rgb: 255, 135, 153}[_ngcontent-%COMP%]:root[theme=dark]{--white: #0E1113;--black: #C5C7CC;--static-white: #F2F3F5;--grey-20: #12171A;--grey-30: #1A2024;--grey-40: #1c2228;--grey-50: #2a333b;--grey-70: #5f6a72;--grey-80: #8a949b;--grey-90: #b0b6bb;--grey-100: #1b1f23;--red-30: #3A151A;--red-40: #FF6B7C;--red-50: #FF3B52;--yellow-30: #3A320F;--yellow-40: #EAD25F;--yellow-50: #FFD400;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #133A1E;--green-40: #1E5A2E;--green-50: #2E6E2E;--green-70: #34C834;--green-90: #26A542;--blue-30: #0F1C2E;--blue-35: #4CE5FF;--blue-40: #162A44;--blue-50: #1F3B66;--blue-60: #3D7DDC;--blue-70: #4B9BFF;--blue-70-rgb: 75, 155, 255;--blue-80: #5C8DFF;--blue-90: #8CB2FF;--violete-20: #2A1633;--violete-30: #3A1E4A;--violete-60: #B259D2;--violete-80: #D38CFF;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .25);--chart-grid-weekend-color: #191F23;
1--cell-heat-blue-rgb: 31, 59, 102;--cell-heat-orange-rgb: 92, 58, 18;--cell-heat-green-primary-rgb: 30, 90, 46;--cell-heat-green-secondary-rgb: 22, 84, 58;--cell-heat-violet-rgb: 58, 30, 74;--cell-heat-red-rgb: 90, 28, 37}.no-value[_ngcontent-%COMP%]{color:var(--text-muted)}.chart-hidden[_ngcontent-%COMP%]{margin-bottom:16px}[_nghost-%COMP%]{display:flex;flex-direction:column;padding-top:16px;padding-bottom:16px}[_nghost-%COMP%] .text-none-transform[_ngcontent-%COMP%]{text-transform:none!important}[_nghost-%COMP%] header[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-bottom:20px;font-size:14px;line-height:16px}[_nghost-%COMP%] header[_ngcontent-%COMP%] .text-label[_ngcontent-%COMP%]{font-weight:500}[_nghost-%COMP%] header[_ngcontent-%COMP%] .label-bell[_ngcontent-%COMP%]{margin-bottom:12px}[_nghost-%COMP%] header[_ngcontent-%COMP%] .label-notify[_ngcontent-%COMP%]{margin-top:8px}[_nghost-%COMP%] main[_ngcontent-%COMP%] .position-text[_ngcontent-%COMP%]{line-height:32px;margin-bottom:12px;margin-left:8px}[_nghost-%COMP%] main[_ngcontent-%COMP%] .aggregation-tooltip[_ngcontent-%COMP%]{margin-left:8px;margin-bottom:14px}[_nghost-%COMP%] main[_ngcontent-%COMP%] .mob-selectors[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column}[_nghost-%COMP%] main[_ngcontent-%COMP%] .mob-selectors[_ngcontent-%COMP%] .value-input-container[_ngcontent-%COMP%]{width:100%;margin-bottom:16px}[_nghost-%COMP%] main[_ngcontent-%COMP%] .mob-spans[_ngcontent-%COMP%]{display:flex;flex-direction:column}[_nghost-%COMP%] main[_ngcontent-%COMP%] .mob-spans[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{height:32px;margin-bottom:16px;padding:8px 8px 8px 0;line-height:16px;text-transform:lowercase}[_nghost-%COMP%] main[_ngcontent-%COMP%] .selector-wrap[_ngcontent-%COMP%]{max-width:284px;width:100%;display:flex;align-items:center}@media(max-width:767px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .selector-wrap[_ngcontent-%COMP%]{max-width:100%}}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:12px;max-width:284px;width:100%}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%]:last-child{margin-right:0}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector.last-child[_ngcontent-%COMP%]{margin-right:0}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector.mob-ls[_ngcontent-%COMP%]{display:none}@media(max-width:767px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector.mob-ls[_ngcontent-%COMP%]{display:flex}}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector.not-mob-ls[_ngcontent-%COMP%]{display:flex}@media(max-width:767px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector.not-mob-ls[_ngcontent-%COMP%]{display:none}}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%] > i[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{pointer-events:none}@media(max-width:767px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%]{max-width:100%}}@media(max-width:576px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%]{margin-right:0!important;width:100%;max-width:100%;margin-bottom:16px}}[_nghost-%COMP%] main[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{font-weight:400;width:100%}[_nghost-%COMP%] main[_ngcontent-%COMP%] .help-icon[_ngcontent-%COMP%]{font-size:17px;outline:none;cursor:default}[_nghost-%COMP%] main[_ngcontent-%COMP%] .padding-bottom[_ngcontent-%COMP%]{padding-bottom:24px}@media(max-width:576px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .padding-bottom[_ngcontent-%COMP%]{padding-bottom:0}}[_nghost-%COMP%] main[_ngcontent-%COMP%] .value-input-container[_ngcontent-%COMP%]{position:relative;width:100%;max-width:280px;min-width:180px;display:inline-block}@media(max-width:767px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .value-input-container[_ngcontent-%COMP%]{min-width:100px}}@media(max-width:576px){[_nghost-%COMP%] main[_ngcontent-%COMP%] .value-input-container[_ngcontent-%COMP%]{max-width:100%}}[_nghost-%COMP%] main[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{font-size:14px;line-height:16px;text-transform:lowercase;max-width:100%}[_nghost-%COMP%] alert-footer[_ngcontent-%COMP%]{margin-top:4px}[_nghost-%COMP%]{--g-anim-duration: .3s}[_nghost-%COMP%] main[_ngcontent-%COMP%]{margin-bottom:12px}[_nghost-%COMP%] notifications-multi-countries-note[_ngcontent-%COMP%]{margin-left:12px}@media(max-width:576px){[_nghost-%COMP%] notifications-multi-countries-note[_ngcontent-%COMP%]{margin-left:0}}[_nghost-%COMP%] .lifetime-condition-label[_ngcontent-%COMP%]{display:flex;align-items:center;margin-right:4px;white-space:nowrap}[_nghost-%COMP%] header[_ngcontent-%COMP%]{margin-bottom:12px}[_nghost-%COMP%] .btn-group-text-cut[_ngcontent-%COMP%]{display:block}[_nghost-%COMP%] .special-width[_ngcontent-%COMP%]{width:100%;max-width:440px!important}@media(max-width:767px){[_nghost-%COMP%] .special-width[_ngcontent-%COMP%]{max-width:100%!important}}[_nghost-%COMP%] .special-width[_ngcontent-%COMP%] .tracker-selector[_ngcontent-%COMP%]{max-width:420px!important}[_nghost-%COMP%] .desk-selector-width[_ngcontent-%COMP%]{width:100%;max-width:210px!important}@media(max-width:767px){[_nghost-%COMP%] .desk-selector-width[_ngcontent-%COMP%]{max-width:100%!important}}@media(max-width:767px){[_nghost-%COMP%] .value-input-container[_ngcontent-%COMP%]{max-width:100%!important}}[_nghost-%COMP%] app-metrics-updates-chart[_ngcontent-%COMP%]{margin-top:12px;flex-shrink:0;flex-grow:1}[_nghost-%COMP%] app-metrics-updates-chart[hidden][_ngcontent-%COMP%]{margin-top:0;height:0}[_nghost-%COMP%] .row-1-add-selectors[_ngcontent-%COMP%]{display:flex}@media(max-width:767px){[_nghost-%COMP%] .row-1-add-selectors[_ngcontent-%COMP%]{display:none!important}}[_nghost-%COMP%] .row-2-content[_ngcontent-%COMP%]{display:none!important}@media(max-width:767px){[_nghost-%COMP%] .row-2-content[_ngcontent-%COMP%]{display:flex!important}}"]});}};function Zr(n,t){if(n&1&&(ib(0),bb(1,"translate"),Eg(2,"span",10),bb(3,"translate")),n&2){let e=NT(3);jl(" ",_b(1,2,"appTracker."+e.alert.params.condition)," "),AE(2),Ig("innerHtml",_b(3,4,"appTracker.spike_up_"+e.alert.params.spike_value),OI);}}function eo(n,t){if(n&1&&(ib(0),bb(1,"translate"),Zi$1(2,"span"),ib(3),bb(4,"translate"),kl(),ib(5),bb(6,"translate"),Eg(7,"span",10),bb(8,"renderValue")),n&2){let e=NT(3);jl(" ",_b(1,4,e.alert.params.metric==="downloads"?"appTracker.are":"appTracker.is")," "),AE(3),Ug(_b(4,6,"appTracker."+e.alert.params.condition)),AE(2),jl(" ",_b(6,8,"appTracker.than")," "),AE(2),Ig("innerHtml",Mb(8,10,e.alert.params.value,e.alert.params.metric),OI);}}function to(n,t){if(n&1&&(Zi$1(0,"div",2)(1,"span",8),ib(2),bb(3,"translate"),kl(),Zi$1(4,"strong",9),ib(5),bb(6,"translate"),kl(),uT(7,Zr,4,6),uT(8,eo,9,13),kl()),n&2){let e=NT(2);AE(2),Ug(_b(3,4,"appTracker."+e.alert.params.aggregation)),AE(3),Ug(_b(6,6,"appList."+e.alert.params.metric)),AE(2),dT(e.alert.params.condition===e.conditionEnum.spikeUp?7:-1),AE(),dT(e.alert.params.condition!==e.conditionEnum.spikeUp?8:-1);}}function no(n,t){n&1&&(Zi$1(0,"div",2),ib(1),bb(2,"translate"),kl()),n&2&&(AE(),jl(" ",_b(2,1,"appTracker.updates_type")," "));}function io(n,t){if(n&1){let e=DT();Zi$1(0,"div",0)(1,"div",1),uT(2,to,9,8,"div",2),uT(3,no,3,3,"div",2),Eg(4,"div",3),Zi$1(5,"div",4)(6,"notifications-bell",5),_g("toggleStatus",function(){Rd(e);let a=NT();return kd(a.toggleStatus.emit(a.alert))}),kl(),Zi$1(7,"div",6),_g("click",function(){Rd(e);let a=NT();return kd(a.edit.emit())}),ib(8),bb(9,"translate"),kl(),Zi$1(10,"div",7),_g("click",function(){Rd(e);let a=NT();return kd(a.delete.emit())}),kl()()()();}if(n&2){let e=NT();AE(2),dT(e.alert.params.type===e.typeTracker.metrics?2:-1),AE(),dT(e.alert.params.type===e.typeTracker.updates?3:-1),AE(3),Ig("active",e.alert.alert.active),AE(2),jl(" ",_b(9,4,"appTracker.edit_alert")," ");}}var Zt=class n{constructor(){this.maxAlerts=new rr$1(false);this.edit=new tt;this.delete=new tt;this.toggleStatus=new tt;this.conditionEnum=Te;this.typeTracker=m;}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275cmp=sw({type:n,selectors:[["app-metrics-updates-row"]],inputs:{alert:"alert",maxAlerts:"maxAlerts"},outputs:{edit:"edit",delete:"delete",toggleStatus:"toggleStatus"},decls:1,vars:1,consts:[[1,"alert"],[1,"col-container"],[1,"col-1"],[1,"col-2"],[1,"col-3"],[3,"toggleStatus","active"],[1,"edit","selector-label",3,"click"],[1,"delete",3,"click"],[1,"text-capitalize"],[1,"text-lowercase","m-l-sm"],[1,"value",3,"innerHtml"]],template:function(e,i){e&1&&uT(0,io,11,6,"div",0),e&2&&dT(i.alert?0:-1);},dependencies:[fe,ke,m$1,he],styles:["[_ngcontent-%COMP%]:root{--white: #fff;--black: #000;--static-white: #fff;--static-black: #000;--grey-20: #F9F9FA;--grey-30: #E9EDEF;--grey-40: #DADFE1;--static-grey-40: #DADFE1;--grey-50: #A7B2B9;--static-grey-50: #A7B2B9;--grey-70: #506775;--grey-80: #475156;--static-grey-80: #475156;--grey-90: #3F3F46;--grey-100: #273238;--red-30: #FDEAEA;--red-40: #FF7485;--red-50: #FA354D;--yellow-30: #FFF8CF;--yellow-40: #FCE778;--yellow-50: #FEDA0F;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #E6FEE6;--green-40: #D4FABE;--green-50: #99F199;--green-70: #34C834;--green-90: #26A542;--blue-30: #EAF2FD;--blue-35: #4CE5FF;--blue-40: #D8E8FF;--blue-50: #B5D4FF;--blue-60: #6BB6FC;--blue-70: #2B98FC;--blue-70-rgb: 38, 104, 232;--blue-80: #2668E8;--blue-90: #1A54C3;--violete-20: #FAEDFF;--violete-30: #F5D9FF;--violete-60: #B259D2;--violete-80: #7B0EA2;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .15);--chart-grid-weekend-color: #F2f5f7;--cell-heat-blue-rgb: 189, 212, 255;--cell-heat-orange-rgb: 254, 217, 161;--cell-heat-green-primary-rgb: 184, 229, 125;--cell-heat-green-secondary-rgb: 139, 238, 179;--cell-heat-violet-rgb: 212, 186, 255;--cell-heat-red-rgb: 255, 135, 153}[_ngcontent-%COMP%]:root[theme=dark]{--white: #0E1113;--black: #C5C7CC;--static-white: #F2F3F5;--grey-20: #12171A;--grey-30: #1A2024;--grey-40: #1c2228;--grey-50: #2a333b;--grey-70: #5f6a72;--grey-80: #8a949b;--grey-90: #b0b6bb;--grey-100: #1b1f23;--red-30: #3A151A;--red-40: #FF6B7C;--red-50: #FF3B52;--yellow-30: #3A320F;--yellow-40: #EAD25F;--yellow-50: #FFD400;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #133A1E;--green-40: #1E5A2E;--green-50: #2E6E2E;--green-70: #34C834;--green-90: #26A542;--blue-30: #0F1C2E;--blue-35: #4CE5FF;--blue-40: #162A44;--blue-50: #1F3B66;--blue-60: #3D7DDC;--blue-70: #4B9BFF;--blue-70-rgb: 75, 155, 255;--blue-80: #5C8DFF;--blue-90: #8CB2FF;--violete-20: #2A1633;--violete-30: #3A1E4A;--violete-60: #B259D2;--violete-80: #D38CFF;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .25);--chart-grid-weekend-color: #191F23;
1--cell-heat-blue-rgb: 31, 59, 102;--cell-heat-orange-rgb: 92, 58, 18;--cell-heat-green-primary-rgb: 30, 90, 46;--cell-heat-green-secondary-rgb: 22, 84, 58;--cell-heat-violet-rgb: 58, 30, 74;--cell-heat-red-rgb: 90, 28, 37}.no-value[_ngcontent-%COMP%]{color:var(--text-muted)}.chart-hidden[_ngcontent-%COMP%]{margin-bottom:16px}[_nghost-%COMP%]{min-height:60px;display:flex;flex-direction:row;overflow:hidden}[_nghost-%COMP%] .selector-label[_ngcontent-%COMP%]{cursor:pointer;border-radius:8px;background-color:var(--grey-40);padding:8px 16px;font-weight:500;font-size:14px;line-height:16px;text-transform:uppercase;max-height:32px;display:flex;align-items:center;justify-content:center;white-space:nowrap;border:1px solid transparent}@media(hover:hover)and (pointer:fine){[_nghost-%COMP%] .selector-label[_ngcontent-%COMP%]:hover:not(.disabled,.lock){border-color:var(--grey-50)}}[_nghost-%COMP%] .col-container[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:row;flex-grow:2;padding:12px 0}@media(max-width:767px){[_nghost-%COMP%] .col-container[_ngcontent-%COMP%]{padding:10px 0 12px;flex-direction:column}}[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-1[_ngcontent-%COMP%]{font-size:16px;line-height:18px;width:60%;margin-right:4px}@media(max-width:767px){[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-1[_ngcontent-%COMP%]{margin-right:0;justify-content:start;margin-bottom:16px;width:100%}}[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-2[_ngcontent-%COMP%]{font-size:14px;line-height:16px;display:flex;align-items:center;width:40%}@media(max-width:767px){[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-2[_ngcontent-%COMP%]{justify-content:start;width:100%;font-size:14px;line-height:16px}}[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-3[_ngcontent-%COMP%]{display:flex;align-items:center}@media(max-width:767px){[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-3[_ngcontent-%COMP%]{justify-content:flex-end;width:100%}}[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-3[_ngcontent-%COMP%] .delete[_ngcontent-%COMP%]{background:url(/assets/angular2/img/icons/trash-grey-70.svg) no-repeat 0;width:24px;height:24px;cursor:pointer;background-size:contain}[_nghost-%COMP%] .col-container[_ngcontent-%COMP%] .col-3[_ngcontent-%COMP%] .edit[_ngcontent-%COMP%]{white-space:nowrap;width:fit-content;margin-left:16px;margin-right:16px}[_nghost-%COMP%] notifications-bell[_ngcontent-%COMP%]{margin-left:12px}[_nghost-%COMP%] .alert[_ngcontent-%COMP%]{display:flex;align-items:center;width:100%}@media(max-width:767px){[_nghost-%COMP%] .alert[_ngcontent-%COMP%]{align-items:normal;padding-top:10px}}"]});}};var ao=n=>({count:n}),ro=()=>[];function oo(n,t){if(n&1&&Eg(0,"notifications-alert-name",3),n&2){let e=NT().$implicit;Ig("name",e.name)("editMode",e.editMode);}}function lo(n,t){if(n&1){let e=DT();Zi$1(0,"div",5),Ni("g-anim-leave-inline-size-fade"),Zi$1(1,"multi-app-select",10),bb(2,"async"),_g("apply",function(a){Rd(e);let p=NT().$implicit,v=NT();return kd(v.applyAppsValueForAlert(a,p))}),Zi$1(3,"span",11),ib(4),bb(5,"translate"),kl()()();}if(n&2){let e=NT().$implicit,i=NT();AE(),Ig("service",i.multiAppSelectService)("isCustomButton",true)("applyNoItems",false)("selected",_b(2,5,e.tempApps)),AE(3),jl(" ",_b(5,7,"appTracker.edit_app_set")," ");}}function po(n,t){if(n&1&&(Eg(0,"app-info-lazy",6),bb(1,"appInfoData")),n&2){let e=t.$implicit;Ig("src",e.icon_url)("appData",_b(1,4,e))("size",32)("openEvent","app_tracker_app_info_open");}}function so(n,t){if(n&1){let e=DT();Zi$1(0,"app-metrics-updates-row",12),_g("edit",function(){Rd(e);let a=NT().$implicit,p=NT();return kd(p.clickEdit(a))})("toggleStatus",function(){Rd(e);let a=NT().$implicit,p=NT();return kd(p.toggleStatus(a))})("delete",function(){Rd(e);let a=NT().$implicit,p=NT();return kd(p.deleteThresholdClick(a.alert.id))}),kl();}if(n&2){let e=NT().$implicit,i=NT();Ig("alert",e)("maxAlerts",i.maxAlerts);}}function co(n,t){if(n&1){let e=DT();Zi$1(0,"app-metrics-updates-alert",13),Ni("g-anim-leave-auto-height-fade"),Si$1("g-anim-enter-auto-height-fade"),_g("cancel",function(){Rd(e);let a=NT(),p=a.$implicit,v=a.$index,A=NT();return kd(A.clickCancelEdit(p,v))})("apply",function(a){Rd(e);let p=NT(2);return kd(p.updateAlert(a))})("delete",function(){Rd(e);let a=NT().$implicit,p=NT();return kd(p.deleteThresholdClick(a.alert.id))}),kl();}if(n&2){let e=NT().$implicit;Ig("alert",e);}}function mo(n,t){if(n&1&&(Zi$1(0,"section",1)(1,"div",2),uT(2,oo,1,2,"notifications-alert-name",3),bb(3,"async"),bb(4,"async"),Zi$1(5,"div",4),uT(6,lo,6,9,"div",5),bb(7,"async"),hT(8,po,2,6,"app-info-lazy",6,pT),bb(10,"async"),Eg(11,"span",7),bb(12,"async"),bb(13,"translateChoice"),kl()(),uT(14,so,1,2,"app-metrics-updates-row",8),bb(15,"async"),uT(16,co,1,1,"app-metrics-updates-alert",9),bb(17,"async"),kl()),n&2){let e,i=t.$implicit;Ig("id",i.alert.id),AE(2),dT(_b(3,6,i.name)||_b(4,8,i.editMode)?2:-1),AE(4),dT(_b(7,10,i.editMode)?6:-1),AE(2),gT(_b(10,12,i.tempApps)),AE(3),Ig("innerHTML",Mb(13,16,"appTracker.apps_count",Ib(23,ao,(e=_b(12,14,i.tempApps))==null?null:e.length)),OI),AE(3),dT(_b(15,19,i.editMode)?-1:14),AE(2),dT(_b(17,21,i.editMode)?16:-1);}}function go(n,t){if(n&1){let e=DT();Zi$1(0,"footer")(1,"multi-app-select",14),_g("apply",function(a){Rd(e);let p=NT();return kd(p.applyAppsValue(a))}),Zi$1(2,"add-track-btn",15),bb(3,"async"),ib(4),bb(5,"translate"),kl()()();}if(n&2){let e=NT();AE(),Ig("service",e.multiAppSelectService)("isCustomButton",true)("selected",vb(9,ro)),AE(),Ig("limit",_b(3,5,e.maxAlerts)),AE(2),Ug(_b(5,7,"appTracker.add_app_set"));}}function _o(n,t){n&1&&Eg(0,"spinner",16),n&2&&Ig("diameter",28);}function uo(n,t){if(n&1&&(uT(0,_o,1,1,"spinner",16),bb(1,"async")),n&2){let e=NT();dT(_b(1,1,e.loading)?0:-1);}}var en=class n{constructor(t,e,i,a,p){this.analyticsService=t;this.userService=e;this.elementRef=i;this.deleteDialogService=a;this.limitWarningDialogService=p;this.items=new rr$1([]);this.maxAlerts=new rr$1(false);this.loading=new rr$1(false);this.appFromParam=new rr$1(null);this.typeFromParam=new rr$1("metrics");this.create=new tt;this.update=new tt;this.delete=new tt;
1this.cancel=new tt;this.multiAppSelectService=D(d);this.subscription=new W;this.limit=200;}ngOnInit(){this.multiAppSelectService.loading.next(true),this.multiAppSelectService.loadData(),this.subscription.add(this.appFromParam.pipe(Tn(t=>!!t)).subscribe(t=>{this.addAlert([t],this.typeFromParam.getValue()),setTimeout(()=>this.scrollToNewAlert(),800);}));}ngOnDestroy(){this.subscription.unsubscribe();}scrollToNewAlert(){let t=this.elementRef.nativeElement.getElementsByTagName("app-metrics-updates-alert");t&&t.length>0&&t[t.length-1].scrollIntoView({behavior:"smooth",block:"start"});}clickEdit(t){t.editMode.next(true),this.analyticsService.send("app_tracker_edit_click",[`${t.alert.id}`]);}updateAlert(t){if(!t)return;this.analyticsService.send("app_tracker_threshold_popup_save",t.alert.id?[`${t.alert.id}`]:[]),t.editMode.next(false),t.apps.next(t.tempApps.getValue());let e=this.items.getValue(),i=this.items.getValue().findIndex(a=>a.alert.id===t.alert.id);if(e[i]=t,this.updateItems(e),t.alert.id===0){this.create.emit(t);return}this.update.emit(t);}clickCancelEdit(t,e){this.analyticsService.send("app_tracker_edit_cancel",[`${t.alert.id}`]),t.editMode.next(false),t.tempApps.next(t.apps.getValue());let i=this.items.getValue();if(t.alert.id===0){setTimeout(()=>{i.splice(e,1),this.updateItems(i);},300);return}}toggleStatus(t){if(t.alert.active=!t.alert.active,!t.alert.id){let i=[`${t.alert.active}`];this.analyticsService.send("app_tracker_update_status",i);return}let e=[`${t.alert.id}`,`${t.alert.active}`];this.analyticsService.send("app_tracker_update_status",e),this.update.emit(t);}deleteAppClick(t){let e=[];t.thresholds.forEach(a=>{e.push(a.alert.id),this.delete.emit(a.alert.id);});let i=this.items.getValue();this.updateItems(i.filter(a=>!e.includes(a.alert.id))),this.analyticsService.send("app_tracker_delete_click",[e.join(",")]);}deleteThresholdClick(t){this.deleteDialogService.open(t.toString(),"appTracker.delete_alert","app_tracker_delete_click").pipe(Mu(),Tn(e=>!!e)).subscribe(()=>{let e=this.items.getValue();this.updateItems(e.filter(i=>i.alert.id!==t)),this.delete.emit(t);});}updateItems(t){t.forEach(e=>{e.params=_e.prepareAlertParams(e.params);}),this.items.next(t);}applyAppsValue(t){t.value.length>200?this.limitWarningDialogService.open(200):(t.closePanel(),setTimeout(()=>{this.addAlert(t.value);}));}addAlert(t,e="metrics"){let i=this.items.getValue(),a=this.getDefaultAlert(this.items.getValue(),t,e);i.push(a),this.updateItems(i);}applyAppsValueForAlert(t,e){let i=Hp(e.params);t.value.length*i.countries.length*t.value.length>200?this.limitWarningDialogService.open(200):(t.closePanel(),setTimeout(()=>{e.tempApps.next(t.value);}));}getDefaultAlert(t,e,i="metrics"){let a=[...t].sort((S,z)=>z.alert.id-S.alert.id),p=a.length?a[t.length-1].alert:null,v=$.getAppIdsByUnitedApps(e),A=_e.getDefaultAlertParams(v,i);return E(D$1({},$.getDefaultAlert(p,A,this.userService.user.getValue().email,"app_metric_updates")),{params:A,apps:new rr$1(e),tempApps:new rr$1(e)})}static{this.\u0275fac=function(e){return new(e||n)(Jr$1(L),Jr$1(ve),Jr$1(Gr$1),Jr$1(z),Jr$1(Ye))};}static{this.\u0275cmp=sw({type:n,selectors:[["app-metrics-updates"]],inputs:{items:"items",maxAlerts:"maxAlerts",loading:"loading",appFromParam:"appFromParam",typeFromParam:"typeFromParam"},outputs:{create:"create",update:"update",delete:"delete",cancel:"cancel"},features:[yb([d])],decls:13,vars:11,consts:[[1,"description"],[3,"id"],[1,"track-items-content"],[3,"name","editMode"],[1,"d-flex","flex-a-c","flex-wrap"],["animateAutoWidth",""],[3,"src","appData","size","openEvent"],[1,"count-label",3,"innerHTML"],[3,"alert","maxAlerts"],[1,"g-anim-auto-height",3,"alert"],[3,"apply","service","isCustomButton","applyNoItems","selected"],[1,"selector-label"],[3,"edit","toggleStatus","delete","alert","maxAlerts"],[1,"g-anim-auto-height",3,"cancel","apply","delete","alert"],[1,"width-100",3,"apply","service","isCustomButton","selected"],[3,"limit"],[3,"diameter"]],template:function(e,i){e&1&&(Zi$1(0,"header"),ib(1),bb(2,"translate"),kl(),Zi$1(3,"div",0),ib(4),bb(5,"translate"),kl(),Zi$1(6,"main"),hT(7,mo,18,25,"section",1,pT),bb(9,"async"),kl(),uT(10,go,6,10,"footer"),bb(11,"async"),Rl(12,uo,2,3)),e&2&&(AE(),Ug(_b(2,3,"appTracker.app_metrics_updates_title")),AE(3),Ug(_b(5,5,"appTracker.app_metrics_updates_description")),AE(3),gT(_b(9,7,i.items)),AE(3),dT(_b(11,9,i.loading)?12:10));},dependencies:[fe,An,A,oa$1,Ne,Zt,Xt,Fe,b,Se,$e,he,hn,u,r],styles:["[_ngcontent-%COMP%]:root{--white: #fff;--black: #000;--static-white: #fff;--static-black: #000;--grey-20: #F9F9FA;--grey-30: #E9EDEF;--grey-40: #DADFE1;--static-grey-40: #DADFE1;--grey-50: #A7B2B9;--static-grey-50: #A7B2B9;--grey-70: #506775;--grey-80: #475156;--static-grey-80: #475156;--grey-90: #3F3F46;--grey-100: #273238;--red-30: #FDEAEA;--red-40: #FF7485;--red-50: #FA354D;--yellow-30: #FFF8CF;--yellow-40: #FCE778;--yellow-50: #FEDA0F;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #E6FEE6;--green-40: #D4FABE;--green-50: #99F199;--green-70: #34C834;--green-90: #26A542;--blue-30: #EAF2FD;--blue-35: #4CE5FF;--blue-40: #D8E8FF;--blue-50: #B5D4FF;--blue-60: #6BB6FC;--blue-70: #2B98FC;--blue-70-rgb: 38, 104, 232;--blue-80: #2668E8;--blue-90: #1A54C3;--violete-20: #FAEDFF;--violete-30: #F5D9FF;--violete-60: #B259D2;--violete-80: #7B0EA2;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .15);--chart-grid-weekend-color: #F2f5f7;--cell-heat-blue-rgb: 189, 212, 255;--cell-heat-orange-rgb: 254, 217, 161;--cell-heat-green-primary-rgb: 184, 229, 125;--cell-heat-green-secondary-rgb: 139, 238, 179;--cell-heat-violet-rgb: 212, 186, 255;--cell-heat-red-rgb: 255, 135, 153}[_ngcontent-%COMP%]:root[theme=dark]{--white: #0E1113;--black: #C5C7CC;--static-white: #F2F3F5;--grey-20: #12171A;--grey-30: #1A2024;--grey-40: #1c2228;--grey-50: #2a333b;--grey-70: #5f6a72;--grey-80: #8a949b;--grey-90: #b0b6bb;--grey-100: #1b1f23;--red-30: #3A151A;--red-40: #FF6B7C;--red-50: #FF3B52;--yellow-30: #3A320F;--yellow-40: #EAD25F;--yellow-50: #FFD400;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #133A1E;--green-40: #1E5A2E;--green-50: #2E6E2E;--green-70: #34C834;--green-90: #26A542;--blue-30: #0F1C2E;--blue-35: #4CE5FF;--blue-40: #162A44;--blue-50: #1F3B66;--blue-60: #3D7DDC;--blue-70: #4B9BFF;--blue-70-rgb: 75, 155, 255;--blue-80: #5C8DFF;--blue-90: #8CB2FF;--violete-20: #2A1633;--violete-30: #3A1E4A;--violete-60: #B259D2;--violete-80: #D38CFF;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .25);--chart-grid-weekend-color: #191F23;
1--cell-heat-blue-rgb: 31, 59, 102;--cell-heat-orange-rgb: 92, 58, 18;--cell-heat-green-primary-rgb: 30, 90, 46;--cell-heat-green-secondary-rgb: 22, 84, 58;--cell-heat-violet-rgb: 58, 30, 74;--cell-heat-red-rgb: 90, 28, 37}.no-value[_ngcontent-%COMP%]{color:var(--text-muted)}.chart-hidden[_ngcontent-%COMP%]{margin-bottom:16px}[_nghost-%COMP%]{max-width:900px;width:100%}[_nghost-%COMP%] header[_ngcontent-%COMP%]{font-weight:400;font-size:34px;line-height:34px;margin-bottom:8px;margin-top:32px}[_nghost-%COMP%] .description[_ngcontent-%COMP%]{font-weight:400;font-size:16px;line-height:24px;margin-bottom:24px}[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{background:var(--grey-20);padding:12px 12px 0;border-radius:8px;margin-bottom:24px}[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding-bottom:12px;border-bottom:1px solid var(--grey-40)}[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-app-select[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-pub-select[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] tag-select-multiple[_ngcontent-%COMP%]{width:auto}[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-app-select[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-pub-select[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] tag-select-multiple[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]{cursor:pointer;border-radius:8px;background-color:var(--grey-40);padding:8px 16px;font-weight:500;font-size:14px;line-height:16px;text-transform:uppercase;max-height:32px;display:flex;align-items:center;justify-content:center;white-space:nowrap;border:1px solid transparent}@media(hover:hover)and (pointer:fine){[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-app-select[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]:hover:not(.disabled,.lock), [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-pub-select[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]:hover:not(.disabled,.lock), [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] tag-select-multiple[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]:hover:not(.disabled,.lock){border-color:var(--grey-50)}}[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-app-select[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] multi-pub-select[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%], [_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] tag-select-multiple[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]{margin-bottom:12px;margin-right:12px}[_nghost-%COMP%] main[_ngcontent-%COMP%] section[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%] .count-label[_ngcontent-%COMP%]{font-size:14px;line-height:20px}[_nghost-%COMP%] main[_ngcontent-%COMP%] notifications-alert-name[_ngcontent-%COMP%]{margin-bottom:12px;max-width:100%}[_nghost-%COMP%] footer[_ngcontent-%COMP%]{display:flex;max-height:52px;align-items:center;background:var(--grey-20);border-radius:8px;width:100%;padding:12px}[_nghost-%COMP%] footer[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]{cursor:pointer;border-radius:8px;background-color:var(--grey-40);padding:8px 16px;font-weight:500;font-size:14px;line-height:16px;text-transform:uppercase;max-height:32px;display:flex;align-items:center;justify-content:center;white-space:nowrap;border:1px solid transparent}@media(hover:hover)and (pointer:fine){[_nghost-%COMP%] footer[_ngcontent-%COMP%] .selector-label[_ngcontent-%COMP%]:hover:not(.disabled,.lock){border-color:var(--grey-50)}}[_nghost-%COMP%] footer[_ngcontent-%COMP%] multi-app-select[_ngcontent-%COMP%], [_nghost-%COMP%] footer[_ngcontent-%COMP%] publisher-select[_ngcontent-%COMP%], [_nghost-%COMP%] footer[_ngcontent-%COMP%] tag-select-multiple[_ngcontent-%COMP%]{width:fit-content}[_nghost-%COMP%]{--g-anim-duration: .3s}[_nghost-%COMP%] main[_ngcontent-%COMP%] .track-items-content[_ngcontent-%COMP%]{padding-bottom:0!important}[_nghost-%COMP%] main[_ngcontent-%COMP%] .count-label[_ngcontent-%COMP%]{margin-bottom:12px}[_nghost-%COMP%] main[_ngcontent-%COMP%] app-info-lazy[_ngcontent-%COMP%]{margin-right:12px;margin-bottom:12px;width:32px}"]});}};var tn=class n{constructor(t){this.appTrackerService=t;this.tabGroupTabIndex=0;}static{this.\u0275fac=function(e){return new(e||n)(Jr$1(ze))};}static{this.\u0275cmp=sw({type:n,selectors:[["app-tracker-content"]],inputs:{tabGroupTabIndex:"tabGroupTabIndex"},decls:13,vars:17,consts:[[1,"mat-tab-fade-animation","width-100",3,"selectedIndexChange","selectedIndex","dynamicHeight"],[1,"d-flex","flex-j-c","width-100"],[1,"tab-content",3,"create","delete","update","items","maxAlerts","loading","appFromParam","typeFromParam"],[1,"tab-content",3,"create","delete","update","items","maxAlerts","loading"],[1,"tab-content",3,"create","delete","update","items","maxAlerts","pubFromParam","loading"]],template:function(e,i){e&1&&(Zi$1(0,"mat-tab-group",0),zg("selectedIndexChange",function(p){return lb(i.tabGroupTabIndex,p)||(i.tabGroupTabIndex=p),p}),Zi$1(1,"mat-tab")(2,"div",1)(3,"app-metrics-updates",2),_g("create",function(p){return i.appTrackerService.createAlert(p)})("delete",function(p){return i.appTrackerService.deleteAlertById(p)})("update",function(p){return i.appTrackerService.updateAlert(p)}),kl()()(),Zi$1(4,"mat-tab")(5,"div",1)(6,"top-apps-spikes-updates",3),_g("create",function(p){return i.appTrackerService.createAlert(p)})("delete",function(p){return i.appTrackerService.deleteAlertById(p)})("update",function(p){return i.appTrackerService.updateAlert(p)}),kl()()(),Zi$1(7,"mat-tab")(8,"div",1)(9,"new-apps-by-type",3),_g("create",function(p){return i.appTrackerService.createAlert(p)})("delete",function(p){return i.appTrackerService.deleteAlertById(p)})("update",function(p){return i.appTrackerService.updateAlert(p)}),kl()()(),Zi$1(10,"mat-tab")(11,"div",1)(12,"new-apps-by-pub",4),_g("create",function(p){return i.appTrackerService.createAlert(p)})("delete",function(p){return i.appTrackerService.deleteAlertById(p)})("update",function(p){return i.appTrackerService.updateAlert(p)}),kl()()()()),e&2&&(Gg("selectedIndex",i.tabGroupTabIndex),Ig("dynamicHeight",true),AE(3),Ig("items",i.appTrackerService.appMetricsUpdatesAlerts)("maxAlerts",
1i.appTrackerService.maxAlerts)("loading",i.appTrackerService.loading)("appFromParam",i.appTrackerService.appFromParam)("typeFromParam",i.appTrackerService.typeFromParam),AE(3),Ig("items",i.appTrackerService.topAppsSpikesUpdatesAlerts)("maxAlerts",i.appTrackerService.maxAlerts)("loading",i.appTrackerService.loading),AE(3),Ig("items",i.appTrackerService.newAppsByTypeAlerts)("maxAlerts",i.appTrackerService.maxAlerts)("loading",i.appTrackerService.loading),AE(3),Ig("items",i.appTrackerService.newAppsByPubAlerts)("maxAlerts",i.appTrackerService.maxAlerts)("pubFromParam",i.appTrackerService.pubFromParam)("loading",i.appTrackerService.loading));},dependencies:[cn,ke$1,dn,en,$t,Ht,Kt],styles:["[_ngcontent-%COMP%]:root{--white: #fff;--black: #000;--static-white: #fff;--static-black: #000;--grey-20: #F9F9FA;--grey-30: #E9EDEF;--grey-40: #DADFE1;--static-grey-40: #DADFE1;--grey-50: #A7B2B9;--static-grey-50: #A7B2B9;--grey-70: #506775;--grey-80: #475156;--static-grey-80: #475156;--grey-90: #3F3F46;--grey-100: #273238;--red-30: #FDEAEA;--red-40: #FF7485;--red-50: #FA354D;--yellow-30: #FFF8CF;--yellow-40: #FCE778;--yellow-50: #FEDA0F;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #E6FEE6;--green-40: #D4FABE;--green-50: #99F199;--green-70: #34C834;--green-90: #26A542;--blue-30: #EAF2FD;--blue-35: #4CE5FF;--blue-40: #D8E8FF;--blue-50: #B5D4FF;--blue-60: #6BB6FC;--blue-70: #2B98FC;--blue-70-rgb: 38, 104, 232;--blue-80: #2668E8;--blue-90: #1A54C3;--violete-20: #FAEDFF;--violete-30: #F5D9FF;--violete-60: #B259D2;--violete-80: #7B0EA2;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .15);--chart-grid-weekend-color: #F2f5f7;--cell-heat-blue-rgb: 189, 212, 255;--cell-heat-orange-rgb: 254, 217, 161;--cell-heat-green-primary-rgb: 184, 229, 125;--cell-heat-green-secondary-rgb: 139, 238, 179;--cell-heat-violet-rgb: 212, 186, 255;--cell-heat-red-rgb: 255, 135, 153}[_ngcontent-%COMP%]:root[theme=dark]{--white: #0E1113;--black: #C5C7CC;--static-white: #F2F3F5;--grey-20: #12171A;--grey-30: #1A2024;--grey-40: #1c2228;--grey-50: #2a333b;--grey-70: #5f6a72;--grey-80: #8a949b;--grey-90: #b0b6bb;--grey-100: #1b1f23;--red-30: #3A151A;--red-40: #FF6B7C;--red-50: #FF3B52;--yellow-30: #3A320F;--yellow-40: #EAD25F;--yellow-50: #FFD400;--yellow-60: #FAC81B;--yellow-70: #E4B101;--green-30: #133A1E;--green-40: #1E5A2E;--green-50: #2E6E2E;--green-70: #34C834;--green-90: #26A542;--blue-30: #0F1C2E;--blue-35: #4CE5FF;--blue-40: #162A44;--blue-50: #1F3B66;--blue-60: #3D7DDC;--blue-70: #4B9BFF;--blue-70-rgb: 75, 155, 255;--blue-80: #5C8DFF;--blue-90: #8CB2FF;--violete-20: #2A1633;--violete-30: #3A1E4A;--violete-60: #B259D2;--violete-80: #D38CFF;--orange: #FA7C1B;--graph-1-violet: #C642F4;--graph-1-violet-15: rgba(198, 66, 244, .25);--chart-grid-weekend-color: #191F23;
1--cell-heat-blue-rgb: 31, 59, 102;--cell-heat-orange-rgb: 92, 58, 18;--cell-heat-green-primary-rgb: 30, 90, 46;--cell-heat-green-secondary-rgb: 22, 84, 58;--cell-heat-violet-rgb: 58, 30, 74;--cell-heat-red-rgb: 90, 28, 37}.no-value[_ngcontent-%COMP%]{color:var(--text-muted)}.chart-hidden[_ngcontent-%COMP%]{margin-bottom:16px}[_nghost-%COMP%]{width:100%;margin-left:auto;margin-right:auto;margin-bottom:40px;display:flex;justify-content:center}[_nghost-%COMP%] .tab-content[_ngcontent-%COMP%]{width:100%;max-width:932px;display:block;padding:0 16px}"]});}};function Co(n,t){if(n&1&&(Eg(0,"app-tracker-content",0),bb(1,"async")),n&2){let e=NT();Ig("tabGroupTabIndex",e.selectedTabMap[_b(1,1,e.appTrackerService.filter)]);}}function ho(n,t){n&1&&Eg(0,"spinner",1),n&2&&Ig("diameter",42);}var Ai=class n{constructor(t,e){this.appTrackerService=t;this.router=e;this.selectedTabMap={app_metric_updates:0,top_apps_spikes_updates:1,new_apps_by_type:2,new_apps_by_pub:3};this.isOldUrlFormat=false;let i=new RegExp("\\/app-tracker\\/[0-9]{0,6}","i");this.isOldUrlFormat=i.test(this.router.url);}static{this.\u0275fac=function(e){return new(e||n)(Jr$1(ze),Jr$1(F))};}static{this.\u0275cmp=sw({type:n,selectors:[["app-tracker"]],features:[yb([ze])],decls:3,vars:3,consts:[[3,"tabGroupTabIndex"],[1,"spinner",3,"diameter"]],template:function(e,i){e&1&&(uT(0,Co,2,3,"app-tracker-content",0),bb(1,"async"),Rl(2,ho,1,1,"spinner",1)),e&2&&dT(!_b(1,1,i.appTrackerService.loading)||!i.isOldUrlFormat?0:2);},dependencies:[An,b,tn,hn],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;min-height:var(--height)}[_nghost-%COMP%] .spinner[_ngcontent-%COMP%]{width:100%;height:30px;align-items:center;display:flex;justify-content:center;margin-top:30vh}"]});}}; 2export{Ai as AppTrackerComponent};
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.