1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a6a9b440-86b8-5221-ad75-49de67eb5acc")}catch(e){}}(); 3import{r as e}from"./rolldown-runtime-CMxvf4Kt.js";import{Bt as t,C as n,Dt as r,Gt as i,I as a,O as o,S as s,T as c,W as l,X as u,c as d,ft as f,ot as p,tt as m,v as h,w as g,x as _,y as v}from"./vendor-calendar-6jj55xLf.js";import{h as ee}from"./vendor-vue-CrC29F7W.js";var y={dashboard:`/img/icons/nav-icons/dashboard-4x.png`,settings:`/img/icons/nav-icons/settings-4x.png`,edna:`/img/icons/nav-icons/edna-4x.png`,playbooks:`/img/icons/nav-icons/playbooks-4x.png`,insights:`/img/icons/nav-icons/insights-4x.png`,pathways:`/img/icons/nav-icons/pathways-4x.png`},b=`settings`;y.edna,y.insights,y.settings,y.settings,y.settings;var x={"App\\Notifications\\BlendDataStaleNotification":`settings`,"App\\Notifications\\ConnectionError":`settings`,"App\\Notifications\\FilesUploadedNotification":`settings`,"App\\Notifications\\InvoiceCreated":`settings`,"App\\Notifications\\PaymentReceipt":`settings`,"App\\Notifications\\PaymentFailed":`settings`,"App\\Notifications\\SubscriptionUpdated":`settings`,"App\\Notifications\\PlaybookGoogleDocReady":`playbooks`,"App\\Notifications\\PresentationReady":`insights`,"App\\Notifications\\PropensityModelCompleted":`pathways`,"App\\Notifications\\AgencyRemovedFromClient":`settings`,"App\\Notifications\\DashboardDigest":`dashboard`,"App\\Notifications\\DashboardShared":`dashboard`,"App\\Notifications\\DashboardAnalysisReady":`edna`,"App\\Notifications\\SuggestedAudienceReady":`edna`,"App\\Notifications\\AutomatedAnalysisDashboardReady":`edna`},S={BlendDataStaleNotification:`settings`,ConnectionError:`settings`,FilesUploadedNotification:`settings`,InvoiceCreated:`settings`,PaymentReceipt:`settings`,PaymentFailed:`settings`,SubscriptionUpdated:`settings`,PlaybookGoogleDocReady:`playbooks`,PresentationReady:`insights`,PropensityModelCompleted:`pathways`,DashboardDigest:`dashboard`,DashboardShared:`dashboard`,DashboardAnalysisReady:`edna`,SuggestedAudienceReady:`edna`,AutomatedAnalysisDashboardReady:`edna`},C={"App\\Notifications\\BlendDataStaleNotification":`Data Freshness Alert`,"App\\Notifications\\ConnectionError":`Integration Error`,"App\\Notifications\\FilesUploadedNotification":`New Files Uploaded`,"App\\Notifications\\InvoiceCreated":`Invoice Created`,"App\\Notifications\\PaymentReceipt":`Payment Receipt`,"App\\Notifications\\PaymentFailed":`Payment Failed`,"App\\Notifications\\SubscriptionUpdated":`Subscription Updates`,"App\\Notifications\\PlaybookGoogleDocReady":`Playbook Google Doc Ready`,"App\\Notifications\\PresentationReady":`Your Presentation Creation`,"App\\Notifications\\PropensityModelCompleted":`Propensity Model Ready`,"App\\Notifications\\DashboardDigest":`Dashboard Email Digest`,"App\\Notifications\\DashboardShared":`Dashboard Shared`,"App\\Notifications\\DashboardAnalysisReady":`Dashboard is Ready`,"App\\Notifications\\SuggestedAudienceReady":`Suggested Audience Ready`,"App\\Notifications\\AutomatedAnalysisDashboardReady":`Automated Analysis Ready`},w={BlendDataStaleNotification:`Data Freshness Alert`,ConnectionError:`Integration Error`,FilesUploadedNotification:`New Files Uploaded`,InvoiceCreated:`Invoice Created`,PaymentReceipt:`Payment Receipt`,PaymentFailed:`Payment Failed`,SubscriptionUpdated:`Subscription Updates`,PlaybookGoogleDocReady:`Playbook Google Doc Ready`,PresentationReady:`Your Presentation Creation`,PropensityModelCompleted:`Propensity Model Ready`,DashboardDigest:`Dashboard Email Digest`,DashboardShared:`Dashboard Shared`,DashboardAnalysisReady:`Dashboard is Ready`,SuggestedAudienceReady:`Suggested Audience Ready`,AutomatedAnalysisDashboardReady:`Automated Analysis Ready`};function T(e){return String(e?.type||e?.data?.type||``).replace(/\\\\/g,`\\`)}
3function E(e){return T(e).split(`\\`).pop()}function D(e){let t=String(e||``).toLowerCase();return y[t]?t:b}function O(e){return T(e)||`unknown`}function k(e){let t=T(e),n=E(e);return D(e?.data?.app_area||x[t]||S[n])}function te(e){return y[k(e)]}function A(e,t=`notification`){let n=T(e),r=E(e),i=e?.data?.name||e?.data?.title||C[n]||w[r];return t===`client`?e?.data?.client_name||i||`Notification`:i||`Notification`}function j(e){return e?.data?.cta||``}function M(e){return e?.data?.detail||e?.data?.error_msg||e?.data?.message||``}function N(e){return e?.data?.subtitle||j(e)}function P(e){if(!e)return``;let t=new Date(e),n=new Date,r=Math.max(0,Math.floor((n.getTime()-t.getTime())/1e3)),i=Math.floor(r/60);if(i<1)return`Just now`;if(i<60)return`${i}m ago`;let a=Math.floor(i/60);if(a<24&&t.toDateString()===n.toDateString())return`${a}h ago`;let o=new Date(n);return o.setDate(n.getDate()-1),t.toDateString()===o.toDateString()?`Yesterday, ${t.toLocaleTimeString(`en-US`,{hour:`numeric`,minute:`2-digit`})}`:t.toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`})}var F=e({default:()=>Q});r(),a(),d(),p();var I={class:`d-flex justify-content-end flex-shrink-0 min-w-0`},L={class:`stored-notification-card__time`},R={class:`stored-notification-card__summary d-flex align-items-start min-w-0 gap-3`},z={class:`stored-notification-card__icon-wrap flex-shrink-0`},B=[`src`,`alt`],V={class:`stored-notification-card__content min-w-0 flex-grow-1`},H={class:`stored-notification-card__title mb-0 text-truncate`},U={key:0,class:`stored-notification-card__subtitle stored-notification-card__subtitle--with-cta mb-0`},W={key:0,class:`stored-notification-card__notification-name`},G=[`href`,`target`,`rel`],K={key:2,class:`stored-notification-card__subtitle-cta`},q={key:0,class:`stored-notification-card__details`},J={class:`stored-notification-card__body mb-0 mt-1`},Y={key:1,class:`stored-notification-card__actions-row position-relative d-flex align-items-center justify-content-center flex-shrink-0`},X=[`aria-expanded`,`aria-label`],Z=[`src`],Q={__name:`StoredNotificationCard`,props:{notification:{type:Object,required:!0},tag:{type:String,default:`div`},itemClass:{type:[String,Array,Object],default:``},nameSource:{type:String,default:`notification`,validator:e=>[`notification`,`client`].includes(e)},combineTitleAndCta:{type:Boolean,default:!1},showToggle:{type:Boolean,default:!0},showMarkRead:{type:Boolean,default:!0},suppressOpen:{type:Boolean,default:!1}},emits:[`mark-read`,`open`],setup(e,{emit:r}){function a(e){if(!e)return!1;try{return new URL(e,window.location.origin).origin!==window.location.origin}catch{return!1}}function d(e){let t=new URL(e,window.location.origin);return t.pathname+t.search+t.hash}let p=e,y=r,b=f(!1),x=_(()=>te(p.notification)),S=_(()=>p.combineTitleAndCta?A(p.notification,`client`):A(p.notification,p.nameSource)),C=_(()=>A(p.notification,`notification`)),w=_(()=>N(p.notification)),T=_(()=>M(p.notification)),E=_(()=>P(p.notification.created_at)),D=_(()=>p.notification?.data?.url||null),O=_(()=>p.notification?.data?.cta||null),k=_(()=>D.value?a(D.value)?D.value:d(D.value):null),j=_(()=>a(D.value)?`_blank`:`_self`),F=_(()=>a(D.value)?`noopener noreferrer`:null),Q=_(()=>!!(C.value||O.value)),$=_(()=>!!D.value);function ne(e){!D.value||a(D.value)||(e.preventDefault(),ee.visit(k.value))}function re(){b.value=!b.value}function ie(){p.suppressOpen||!$.value||y(`open`,p.notification)}return(r,a)=>(l(),n(u(e.tag),{class:t([`stored-notification-card d-flex flex-column w-100`,[e.itemClass,{"stored-notification-card--expanded":b.value,"stored-notification-card--clickable":$.value&&!e.suppressOpen,"stored-notification-card--fading":e.notification._fadingOut}]]),onClick:ie},{default:m(()=>[s(`div`,I,[s(`span`,L,i(E.value),1)]),s(`div`,R,[s(`div`,z,[s(`img`,{src:x.value,alt:`${S.value} icon`,class:`stored-notification-card__icon`},null,8,B)]),s(`div`,V,[s(`h4`,H,i(S.value),1),e.combineTitleAndCta&&Q.value?(l(),c(`p`,U,[C.value?(l(),c(`span`,W,[o(i(C.value),1),O.value?(l(),c(v,{key:0},[o(`: `)],64)):g(``,!0)])):g(``,!0),O.value&&D.value?(l(),c(`a`,{key:1,href:k.value,target:j.value,rel:F.value,class:`stored-notification-card__subtitle-cta`,onClick:h(ne,[`stop`])},i(O.value),9,G)):O.value?(l(),c(`span`,K,i(O.value),1)):g(``,!0)])):!e.comb
3ineTitleAndCta&&w.value?(l(),c(`p`,{key:1,class:t([`stored-notification-card__subtitle mb-0 text-truncate`,{"stored-notification-card__subtitle--link":$.value&&O.value}])},i(w.value),3)):g(``,!0)])]),b.value&&T.value?(l(),c(`div`,q,[s(`p`,J,i(T.value),1)])):g(``,!0),e.showToggle||e.showMarkRead?(l(),c(`div`,Y,[e.showToggle?(l(),c(`button`,{key:0,type:`button`,class:`stored-notification-card__toggle border-0 bg-transparent p-0`,"aria-expanded":b.value?`true`:`false`,"aria-label":b.value?`Collapse notification`:`Expand notification`,onClick:h(re,[`stop`])},[s(`img`,{src:b.value?`/img/icons/avid-icons/chevron-up.svg`:`/img/icons/avid-icons/chevron-down.svg`,alt:``,class:`stored-notification-card__toggle-icon`},null,8,Z)],8,X)):g(``,!0),e.showMarkRead?(l(),c(`button`,{key:1,type:`button`,class:`stored-notification-card__status border-0 bg-transparent p-0`,title:`Mark as read`,"aria-label":`Mark as read`,onClick:a[0]||=h(t=>r.$emit(`mark-read`,e.notification),[`stop`])},[...a[1]||=[s(`img`,{src:`/img/icons/avid-icons/mark_as_read.svg`,alt:``,class:`notification-check-icon`},null,-1)]])):g(``,!0)])):g(``,!0)]),_:1},8,[`class`]))}};export{O as i,Q as n,A as r,F as t}; 4//# sourceMappingURL=StoredNotificationCard-LXzzV06o.js.map 5//# debugId=a6a9b440-86b8-5221-ad75-49de67eb5acc
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.