PageSourceSearch

https://app.boostt.ai/v2/_next/static/chunks/34474.308568b21fd2e918.js

js boostt.ai collected 2026-10-05 11:52:31 UTC 4,423 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[34474],{34474:function(e,n,a){a.r(n),a.d(n,{default:function(){return p}});var l=a(57437),i=a(2265),t=a(17200),o=a(99299),d=a(90594),r=a(42268),u=a(16592),s=a(67361),c=a(69404);let v={processing:"ok",active:"ok",completed:"ok",sent:"ok",ready:"watch",proof_approved:"watch",pending:"watch",draft:"watch",paused:"watch",cancelled:"risk",terminated:"risk",failed:"risk"};function p(e){var n;let{titleExtra:a}=e,p=(0,i.useContext)(u.Vo),m=null!==(n=null==p?void 0:p.userId)&&void 0!==n?n:null,[g,h]=(0,i.useState)(void 0);(0,i.useEffect)(()=>{if(!m)return;let e=!1;return(0,r.fetchChannelAnalytics)("direct_mail",{userId:m,dateRange:"30d"}).then(n=>{var a,l,i,t,o,d,r,u,s,c,v,p,m,g;if(e)return;let f=Number(null!==(v=null===(l=n.kpis)||void 0===l?void 0:null===(a=l.mailed)||void 0===a?void 0:a.value)&&void 0!==v?v:0),x=Number(null!==(p=null===(t=n.kpis)||void 0===t?void 0:null===(i=t.delivered)||void 0===i?void 0:i.value)&&void 0!==p?p:f),b=Number(null!==(m=null===(d=n.kpis)||void 0===d?void 0:null===(o=d.responseRate)||void 0===o?void 0:o.value)&&void 0!==m?m:0),k=Number(null!==(g=null===(u=n.kpis)||void 0===u?void 0:null===(r=u.costPerPiece)||void 0===r?void 0:r.value)&&void 0!==g?g:0),y=null===(c=n.tableData)||void 0===c?void 0:null===(s=c[0])||void 0===s?void 0:s.id;if(!f&&!x&&!b&&!y)return;let C=b>0?Math.round(f*b/100):0,w=b>0?k/(b/100):0;h(e=>{var n;return{...e,kpis:{...x?{"Pieces delivered \xb7 30d":{value:x.toLocaleString("en-US"),detail:"Live \xb7 last 30 days"}}:{},...b?{"Response rate":{value:"".concat(b.toFixed(1),"%")}}:{},...w?{"Cost per response":{value:"$".concat(w.toFixed(2))}}:{}},funnelRows:{...f?{Mailed:{value:f.toLocaleString("en-US")}}:{},...x?{Delivered:{value:x.toLocaleString("en-US"),detail:f>0?"".concat((x/f*100).toFixed(1),"% of mailed"):void 0,pct:f>0?x/f*100:void 0}}:{},...C?{Responded:{value:C.toLocaleString("en-US"),detail:"".concat(b.toFixed(1),"% of mailed"),pct:b}}:{}},campaignId:null!==(n=null==e?void 0:e.campaignId)&&void 0!==n?n:y}})}).catch(e=>{}),()=>{e=!0}},[m]);let f=(0,i.useContext)(s.mu),x=(0,i.useContext)(s.Ly),b=(0,i.useMemo)(()=>m?"campaigns/list?userID=".concat(m,"&limit=10&offset=0"):null,[m]),{data:k}=(0,t.ZP)(b&&f?[b,x]:null,async e=>{let[n]=e;return f?(await f.post(n,{})).data:null},{revalidateOnFocus:!1}),y=(0,i.useMemo)(()=>{var e,n;let a=Array.isArray(null==k?void 0:k.campaigns)?k.campaigns:Array.isArray(null==k?void 0:k.data)?k.data:[];if(0===a.length)return;let l=null!==(n=null!==(e=null==k?void 0:k.total)&&void 0!==e?e:null==k?void 0:k.count)&&void 0!==n?n:a.length,i=a.map(e=>{var n,a,l;let i=String(null!==(n=e.status)&&void 0!==n?n:"");return{cells:[e.campaign_name||e.campaignName||"Unnamed",Number(null!==(a=e.audience)&&void 0!==a?a:0).toLocaleString("en-US")],statusLabel:(0,c.rp)(i)||i,statusTone:null!==(l=v[i])&&void 0!==l?l:"watch"}});return{type:"table",title:"Campaigns",sub:"Live campaigns from your Direct Mail account",chip:"".concat(l," campaign").concat(1===l?"":"s"),columns:["Campaign","Mailed"],rows:i}},[k]),C=(0,i.useMemo)(()=>{let e=(Array.isArray(null==k?void 0:k.campaigns)?k.campaigns:Array.isArray(null==k?void 0:k.data)?k.data:[])[0];return e?e.campaign_id||e.campaignID||e._id:void 0},[k]),w=(0,i.useMemo)(()=>{if(g||y)return{...g,campaignId:null!=C?C:null==g?void 0:g.campaignId,tabsContent:y?{Campaigns:y}:null==g?void 0:g.tabsContent}},[g,y,C]);return(0,l.jsx)(d.c,{title:"Direct Mail",children:(0,l.jsx)(o.ChannelDashboardView,{slug:"direct-mail",titleExtra:a,liveOverrides:w})})}},90594:function(e,n,a){a.d(n,{c:function(){return p}});var l=a(57437),i=a(2265),t=a(21170),o=a(41756),d=a(98688),r=a(97766),u=a(19831),s=a(75933),c=a(99802);function v(e){let{title:n,children:a}=e,{portfolioMode:d,scopeReady:v}=(0,o.kz)(),p="brand"!==d||v,[m,g]=(0,i.useState)(!1),h=(0,i.useCallback)(()=>{p&&g(!0)},[p]),f=(0,i.useCallback)(()=>g(!1),[]);return(0,l.jsx)(r.Vm,{onOpen:h,children:(0,l.jsxs)(u.Y,{children:[(0,l.jsx)(c.W,{title:n,onOpenBlyn:h,blynAvailable:p,showNotifications:!1,showThemeToggle:!1,showSettings:!1}),(0,l.jsx)(t.Z,{sx:{"& > *":{maxWidth:"none !important"},p:"24px"},children:a}),(0,l.jsx)(s.a,{open:m,onClose:f})]})})}function p(e){let{title:n,children:a}=e;return(0,l.jsx)(o.PB,{embedded:!0,children:(0,l.jsx)(d.V,{children:(0,l.jsx)(v,{title:n,children:a})})})}}}]);
2//# sourceMappingURL=34474.308568b21fd2e918.js.map

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.