PageSourceSearch

https://upgpt.ai/_next/static/chunks/54257.33a88a8b62c6f3de.js

js upgpt.ai collected 2026-10-05 13:11:51 UTC 4,565 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[54257],{94766:function(e,t,a){a.d(t,{Z:function(){return s}});let s=(0,a(79205).Z)("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]])},69292:function(e,t,a){a.d(t,{Z:function(){return s}});let s=(0,a(79205).Z)("CheckCheck",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]])},54257:function(e,t,a){a.r(t),a.d(t,{default:function(){return h}});var s=a(57437),r=a(2265),n=a(33245),l=a(49322),c=a(41671),i=a(94766),o=a(69292),d=a(82431),x=a(93448);let u={info:(0,s.jsx)(n.Z,{className:"h-3.5 w-3.5 text-blue-500"}),warning:(0,s.jsx)(l.Z,{className:"h-3.5 w-3.5 text-amber-500"}),success:(0,s.jsx)(c.Z,{className:"h-3.5 w-3.5 text-green-500"}),error:(0,s.jsx)(l.Z,{className:"h-3.5 w-3.5 text-red-500"})};function m(){return(0,s.jsx)("div",{className:"p-4 animate-pulse space-y-2",children:[1,2,3,4].map(e=>(0,s.jsx)("div",{className:"h-16 rounded-xl bg-gray-100"},e))})}function h(e){let{panelProps:t}=e,[a,n]=(0,r.useState)([]),[l,c]=(0,r.useState)(!0),[h,f]=(0,r.useState)(null),p=(0,r.useCallback)(async()=>{c(!0),f(null);try{var e,t;let a=await fetch("/api/team/notifications",{credentials:"include"});if(!a.ok)throw Error("HTTP ".concat(a.status));let s=await a.json();n(null!==(t=null!==(e=s.notifications)&&void 0!==e?e:s.data)&&void 0!==t?t:[])}catch(e){f(e.message),n([{id:"1",title:"UpLift audit complete",body:"Your campaign health report is ready to review",type:"success",read:!1,created_at:new Date(Date.now()-18e5).toISOString(),source:"uplift"},{id:"2",title:"AI provider key expiring soon",body:"Your Anthropic API key expires in 7 days",type:"warning",read:!1,created_at:new Date(Date.now()-72e5).toISOString(),source:"platform"},{id:"3",title:"New team member joined",body:"Sarah joined your workspace as a member",type:"info",read:!0,created_at:new Date(Date.now()-864e5).toISOString(),source:"team"}])}finally{c(!1)}},[]);if((0,r.useEffect)(()=>{p()},[p]),l)return(0,s.jsx)(m,{});let y=a.filter(e=>!e.read).length;return(0,s.jsx)("div",{className:"flex flex-col h-full",children:(0,s.jsxs)("div",{className:"flex-1 overflow-y-auto p-4 space-y-3",children:[h&&(0,s.jsxs)("div",{className:"rounded-lg bg-amber-50 border border-amber-200 px-3 py-2 text-xs text-amber-700",children:["Using mock data — ",h]}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)(i.Z,{className:"h-3.5 w-3.5 text-gray-500"}),(0,s.jsx)("p",{className:"text-xs font-semibold text-gray-700",children:y>0?"".concat(y," unread"):"All caught up"})]}),y>0&&(0,s.jsxs)("button",{type:"button",className:"flex items-center gap-1 text-xs text-blue-600 hover:underline",children:[(0,s.jsx)(o.Z,{className:"h-3 w-3"}),"Mark all read"]})]}),0===a.length?(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-10 gap-3 text-center",children:[(0,s.jsx)(o.Z,{className:"h-8 w-8 text-gray-300"}),(0,s.jsx)("p",{className:"text-sm text-gray-500",children:"No notifications"})]}):(0,s.jsx)("div",{className:"space-y-1.5",children:a.map(e=>{var t,a;return(0,s.jsxs)("div",{className:(0,x.cn)("rounded-xl border p-3 space-y-1",e.read?"border-gray-100 bg-white":"border-blue-100 bg-blue-50"),children:[(0,s.jsxs)("div",{className:"flex items-start gap-2",children:[(0,s.jsx)("div",{className:"flex-shrink-0 mt-0.5",children:null!==(a=u[null!==(t=e.type)&&void 0!==t?t:"info"])&&void 0!==a?a:u.info}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("p",{className:(0,x.cn)("text-xs font-medium",e.read?"text-gray-700":"text-gray-900"),children:e.title}),e.body&&(0,s.jsx)("p",{className:"text-[10px] text-gray-500 mt-0.5",children:e.body})]})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between pl-5",children:[e.source&&(0,s.jsx)("span",{className:"text-[10px] text-gray-400 uppercase tracking-wide",children:e.source}),(0,s.jsx)("span",{className:"text-[10px] text-gray-400",children:function(e){let t=Date.now()-new Date(e).getTime(),a=Math.floor(t/36e5),s=Math.floor(t/6e4);return a>=24?"".concat(Math.floor(a/24),"d ago"):a>=1?"".concat(a,"h ago"):s>=1?"".concat(s,"m ago"):"just now"}(e.created_at)})]})]},e.id)})}),(0,s.jsxs)("button",{type:"button",onClick:p,className:"flex items-center justify-center gap-1 w-full text-[10px] text-gray-400 hover:text-gray-600",children:[(0,s.jsx)(d.Z,{className:"h-3 w-3"}),"Refresh"]})]})})}}}]);

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.