1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8050],{75413:function(e,t,n){n.d(t,{i:function(){return eV},Z:function(){return eS}});var i=n(85893),a=n(38296),r=n(24013),s=n(22832),l=n(62803),d=n(96988),c=n(97365),o=n(96899),p=n(63121),u=n(76258),T=n(19663);n(65389),n(48187);var h=n(30860),x=n(59548),g=n(39859);n(56819),n(67294);var f=n(45329);n(19872),n(71105),n(36910),n(93692);var v=n(79328);let{SEARCH_KPI:_}=v.T.DASHBOARD.LIFETIME,{ADD_KPI:A}=T.default.DASHBOARD.LIFETIME;var Z=n(25784),I=n(55157);let{Container:m,Item:j}=d.default,S={display:"flex",alignItems:"center",justifyContent:"space-between"},b=e=>{let{breakpoints:t,spacing:n}=e;return{alignItems:"center",display:"flex",flexShrink:0,flexGrow:1,flexDirection:"column",padding:"0 ".concat(n(3)),[t.down("sm")]:{alignItems:"flex-start",padding:0,width:"fit-content"}}},y=(e,t)=>{let n=e.toLowerCase();return t?(0,f.kC)(n):e.toUpperCase()},O=e=>{let{kpi:t,containDivider:n,isMobile:a}=e;return(0,i.jsx)(j,{xs:4,sm:"auto",children:(0,i.jsxs)(c.Z,{sx:S,children:[(0,i.jsx)(c.Z,{sx:b,children:(0,i.jsxs)(c.Z,{children:[(0,i.jsx)(l.ZP,{textvariant:"h6",noMarginBottom:!0,children:t.value}),(0,i.jsx)(l.ZP,{color:"textSecondary",textvariant:"overline",children:y(t.label,a)})]})}),n&&!a&&(0,i.jsx)(I.Z,{orientation:"vertical",variant:"middle",flexItem:!0})]})})},N={paddingTop:e=>e.spacing(2.5)};var C=e=>{let{kpisData:t}=e,{isMobile:n}=(0,Z.Z)();return(null==t?void 0:t.length)?(0,i.jsx)(m,{sx:N,spacing:0,children:t.map((e,a)=>{let{label:r,key:s}=e,l=a!==t.length-1;return(0,i.jsx)(O,{kpi:e,containDivider:l,isMobile:n},s||r)})}):null},E=n(70456),D=n(96173),w=n(50490).Z;let P=e=>{let{palette:t}=e;return{color:t.grey[600],textVariant:"body2",fontSize:"14px",textAlign:"center"}};var R=e=>{let{description:t}=e;return(0,i.jsxs)(l.ZP,{color:"textSecondary",sx:P,children:[t,(0,i.jsx)(D.Z,{}),(0,i.jsx)(w,{}),(0,i.jsx)(D.Z,{}),"team."]})};let{TITLE:k,DESCRIPTIONS:{DEFAULT:F,FINISHED:L,NOT_STARTED_ACTIVE:U,NOT_STARTED_INACTIVE:G,NOT_TRAFFIC:M}}=v.T.CAMPAIGN.CAMPAIGN_CONFIGURATION.STATUS.NO_DATA,{CAMPAIGN:{CONFIGURATION:{STATUS:{NO_DATA_STATES:{DEFAULT:B,FINISHED:H,NOT_STARTED_ACTIVE:V,NOT_STARTED_INACTIVE:X,NOT_TRAFFIC:Y}}}}}=v.C;var q=e=>({[B]:()=>({title:k.DEFAULT,description:e?F:(0,i.jsx)(R,{description:"".concat(F," If you need help, contact with the support team.")})}),[H]:()=>({title:k.FINISHED,description:e?L:(0,i.jsx)(R,{description:"".concat(L," If you want to restore the dashboard, please contact with the")})}),[X]:()=>({title:k.NOT_STARTED_INACTIVE,description:G}),[V]:()=>({title:k.NOT_STARTED_ACTIVE,description:U}),[Y]:()=>({title:k.NOT_TRAFFIC,description:e?M:(0,i.jsx)(R,{description:"".concat(M," If you need help, contact with the")})})}),z=n(15924);let{CAMPAIGN:{STATE:{INACTIVE:K,ACTIVE:W},DASHBOARD:{NO_DATA_STATES:{DEFAULT:$,FINISHED:J,NOT_STARTED_INACTIVE:Q,NOT_STARTED_ACTIVE:ee,NOT_TRAFFIC:et}}}}=v.C,{isBefore:en,isDateToday:ei}=z.default,ea=e=>e.state===K,er=e=>e.state===W,es=e=>en({dateOne:e}),el=e=>en({dateOne:e})&&!ei(e),ed=e=>{let{startedAt:t,finishedAt:n}=e;return es(t)?el(n)?J:$:Q},ec=e=>{let{startedAt:t}=e;return es(t)?et:ee};var eo=e=>{let{schedule:{started_at:t,finished_at:n}}=e;return t&&n?ea(e)?ed({startedAt:t,finishedAt:n}):er(e)?ec({startedAt:t}):$:$};let ep=()=>({container:{display:"grid",placeItems:"center",marginBottom:e=>e.spacing(2)}});var eu=e=>{let{title:t,description:n}=e,{container:a}=ep();return(0,i.jsxs)(c.Z,{sx:a,children:[(0,i.jsx)(l.ZP,{textvariant:"subtitle2",children:t}),"string"==typeof n?(0,i.jsx)(l.ZP,{sx:P,textvariant:"body2",children:n}):n]})};let eT=()=>(0,i.jsx)(c.Z,{display:"flex",gap:2,paddingTop:1,children:[...Array(6)].map(()=>(0,i.jsx)(x.Z,{variant:"rectangular",width:128,height:64},"Today-Skeleton-".concat(g.Z.nanoid())))});var eh=e=>{let{campaign:t,dashboardType:n}=e,{data:a,isLoading:r}=h.default.useTodayKpis(t.id,n),{isWhitelabel:s}=(0,E.y)(),l=(0,h.qM)(null!=a?a:{},t.type);if(r)return(0,i.jsx)(eT,{});if(l.length)return(0,i.jsx)(C,{kpisData:l});let d=eo(t),{title:c,description:o}=(0,q(s)[d])(null==t?void 0:t.id);return(0,i.jsx)(eu,{title:c,description:o})};let{COMMON:{OK:ex},CAMPAIGN:{CAMPAIGN_CONFIGURATION:{STATUS:{TITLE:eg,SUBTITLE:ef}}}}=T.default,{DIALOGS:{CAMPAIGN_STATUS:ev}}=u.default;var e_=n(77757),eA={TEXTS:{TITLE:"Today status",TOOLTIP_TITLES_BY_STATUS:{on_track:"The campaign is winning impressions in real-time.",draft:"The campaign has been created but has not been activated",stopped:"The campaign has been set as inactive but has not reached the end date.",no_creatives:"The campaign is active but creatives are missing",ended:"The campaign is inactive because the end date has been reached or the budget has been fully spent.",paused_strategies:"The campaign is active but all your strategies are paused.",paused_creatives:"The campaign is active but all your creatives are paused.",off_schedule:"The campaign is active but has not started bidding yet because the start date is in the future.",not_bidding:"The campaign is active but is NOT getting bids offers.",not_winning:"The campaign is active and getting bids offers, but is NOT winning impressions.",ramping_up:"The campaign is active and getting impressions, but has not yet reached 1000 impressions.",pending_approval:"The campaign is active but is not running because the creatives are pending approval. When one of the creatives has been approved, the campaign will start running."}},COLOR_BY_STATUS:{draft:"textSecondary",ended:"textSecondary",stopped:"textSecondary",no_creatives:"error",not_bidding:"error",not_winning:"error",paused_strategies:"warning",paused_creatives:"warning",pending_approval:"warning",off_schedule:"warning",ramping_up:"info",on_track:"success"}};let{TITLE:eZ,TOOLTIP_TITLES_BY_STATUS:eI}=eA.TEXTS,{COLOR_BY_STATUS:em}=eA,ej=e=>{let{status:t="stopped"}=e;return(0,i.jsxs)(l.ZP,{display:"flex",textvariant:"subtitle2",color:em[t],children:[(0,i.jsx)(r.Z,{sx:{height:"20px"}}),a.summaryHealthStatus[t],(0,i.jsx)(o.Z,{iconColor:"action",iconType:"outlined",tooltipTitle:eI[t],sx:{marginX:1,height:"20px",width:"20px"}})]})};var eS=e=>{var t,n;let{id:a}=e,{data:r,isLoading:o}=h.default.useTodayKpis(a),{data:u}=h.default.useCampaign({id:a});if(!r||!u)return null;let{health_status:T,daily_spend:x,...g}=r,f=(0,h.qM)(g,null!==(n=u.type)&&void 0!==n?n:null===(t=u.parent)||void 0===t?void 0:t.type);return(0,i.jsxs)(s.Z,{sx:{padding:1.5},children:[(0,i.jsx)(l.ZP,{textvariant:"subtitle1",mb:1.5,children:eZ}),(0,i.jsx)(ej,{status:T}),o?(0,i.jsx)(c.Z,{padding:3,children:(0,i.jsx)(p.Z,{})}):(0,i.jsxs)(c.Z,{children:[(0,i.jsx)(c.Z,{mb:2,children:(0,i.jsxs)(l.ZP,{textvariant:"caption",children:["Daily spend ",(0,i.jsxs)("span",{style:{fontWeight:"bold"},children:[(0,e_.Z)(x||0),"%"]})]})}),f.length?(0,i.jsx)(d.default.Container,{spacing:.25,children:f.map(e=>(0,i.jsxs)(d.default.Item,{md:6,lg:6,children:[(0,i.jsx)(l.ZP,{textvariant:"caption",children:e.label}),(0,i.jsx)(l.ZP,{textvariant:"subtitle2",children:e.value})]}))}):(0,i.jsx)(c.Z,{pt:2,pb:2,textAlign:"center",children:u&&(0,i.jsx)(eh,{campaign:u})})]})]})},eb=n(9053),ey=n(50006),eO=n(81241),eN=n(53990),eC=n(62276),eE=n(73623),eD=n(19092),ew=n(59015),eP=n(44917),eR=n(45939),ek=n(77745),eF=n(54002),eL=n(88365);let{DEFAULT_VALUE:eU}=u.default.DATA_GRID,{COLOR_BY_STATUS:eG,TEXTS:{TOOLTIP_TITLES_BY_STATUS:eM}}=eA,eB={on_track:ek.Z,draft:ey.Z,stopped:eN.Z,no_creatives:eb.Z,ended:eC.Z,paused_strategies:eO.Z,paused_creatives:eO.Z,off_schedule:eP.Z,not_bidding:eE.Z,not_winning:eD.Z,ramping_up:eR.Z,pending_approval:ew.Z},eH={successes:Object.keys((0,eF.Z)(eG,e=>"success"===e)),errors:Object.keys((0,eF.Z)(eG,e=>"error"===e)),warnings:Object.keys((0,eF.Z)(eG,e=>"warning"===e)),infos:Object.keys((0,eF.Z)(eG,e=>"info"===e)),secondaries:Object.keys((0,eF.Z)(eG,e=>
1"textSecondary"===e)),asChip:!0,coloredBackground:!0,valueParser:e=>e?e.replace(/[-_/]/g," "):eU,iconParser:e=>eB[e],tooltipTitleParser:e=>eM[e]};var eV=(0,eL.Z)(eH)},68050:function(e,t,n){n.d(t,{i:function(){return i.i}});var i=n(75413)},50490:function(e,t,n){var i=n(85893),a=n(8480),r=n(76258),s=n(65389),l=n(96173);let d=e=>{let{palette:t}=e;return{fontSize:"inherit",fontFamily:"inherit",lineHeight:"inherit",letterSpacing:"inherit",verticalAlign:"unset",color:t.secondary.main}},{DIALOGS:{CONTACT_SUPPORT:c}}=r.default,{SUPPORT_BUTTON:o}=r.default.CAMPAIGN.CONFIGURATION.STATUS;t.Z=()=>{let{openDialog:e}=s.default;return(0,i.jsxs)(a.Z,{onClick:()=>{e(c)},component:"p",sx:d,children:[(0,i.jsx)(l.Z,{}),o,(0,i.jsx)(l.Z,{})]})}},95130:function(e,t,n){var i=n(85893),a=n(60762),r=n(45329);t.Z=e=>{let{children:t,noMarginBottom:n,noPadding:s,sx:l,...d}=e;return(0,i.jsx)(a.Z,{sx:[e=>{let{spacing:t,palette:i}=e;return{borderRadius:"4px",boxShadow:"0px 2px 10px rgba(0, 0, 0, 0.1)",padding:s?0:t(2.5),marginBottom:n?0:t(2.5),background:i.common.white}},...(0,r.d$)(d),l],children:t})}},22832:function(e,t,n){var i=n(95130);t.Z=i.Z},24489:function(e,t,n){var i=n(85893),a=n(97365),r=n(31231),s=n(45329);let l={height:"100%",alignItems:"center",display:"flex",justifyContent:"center"};t.Z=e=>(0,i.jsx)(a.Z,{sx:[l,...(0,s.d$)(e)],children:(0,i.jsx)(r.Z,{})})},63121:function(e,t,n){var i=n(24489);t.Z=i.Z}}]);
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.