1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BTb2yOTy.js","./w7OgtN2g.js","./IZR80Hiv.js","./entry.CasQH4DA.css","./jJhz4nX8.js","./D3LLoGlr.js","./ByosNHuF.js","./gwoCKMlo.js","./DS2JYWGW.js","./CWRGpvha.js","./BgWaggPd.js","./BfUo1w8T.js","./CMoM7sv-.js","./C6VAe2EL.js","./Notification.DhaYYPJk.css"])))=>i.map(i=>d[i]); 2import{aJ as U,cO as q,cx as H,bP as b,br as K,cH as A,ba as Y,aD as G,cY as Q,cV as X,cS as Z,d8 as ee,cc as te,d5 as M,cE as oe,cm as p,da as ne,bI as w,au as I,aA as P,at as x,ar as se,i as ae,bW as ie,as as re,bu as V,aq as _,aC as le,a1 as ce}from"./IZR80Hiv.js";import ue from"./CWRGpvha.js";import de from"./BgWaggPd.js";import{v as fe}from"./BfUo1w8T.js";import{callOnce as ve}from"./CMoM7sv-.js";import{p as me}from"./C6VAe2EL.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"93.1-production"};var r=new s.Error().stack;r&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[r]="c511c2f7-96ab-4822-b29b-bc8eefcb64b3",s._sentryDebugIdIdentifier="sentry-dbid-c511c2f7-96ab-4822-b29b-bc8eefcb64b3")}catch{}})();const pe=U("woom-store-notification",()=>{const s="closedNotificationIds",r=b(new Set),g=u=>{r.value.add(u),sessionStorage.setItem(s,JSON.stringify([...r.value]))};(async()=>{await K();const u=sessionStorage.getItem(s)??"[]";JSON.parse(u).forEach(i=>g(i))})();const d=b([]),{queryParams:y}=q(),h=H();return{closedNotificationIds:r,notifications:d,addClosedNotificationId:g,fetchNotifications:async()=>{const{locale:u}=A();try{const f=await $fetch(`/api/notifications/${u.value}`,{params:{...y.value},...h});d.value=(f?.data?.getNotifications??[]).map(i=>{const o=i.data;if(o)return{id:i.id,lang:i.lang,project:i.project,refs:i.refs,data:{...o,close_button:"close_button"in o&&o.close_button==="enabled",path_excludes:"path_excludes"in o&&typeof o.path_excludes=="string"&&o.path_excludes.split(",")||[],countdown_timer:"countdown_timer"in o&&typeof o.countdown_timer=="string"?o.countdown_timer:void 0,countdown_timer_bg_color:"countdown_timer_bg_color"in o&&typeof o.countdown_timer_bg_color=="string"?o.countdown_timer_bg_color:void 0}}}).filter(Y)}catch(f){throw console.log("notifications error",f),f}}}}),_e=le(()=>ce(()=>import("./BTb2yOTy.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url).then(s=>s.default||s)),be=5500,ge=G({__name:"Notifications",async setup(s){let r,g;const a=b(0),d=b(!1),y=b(!1),h=b(!1),c=Q("notificationsRef"),{isScrolling:u,directions:f}=X(c),i=pe(),{isUS:o}=A(),N=Z();[r,g]=ee(()=>ve("notifications",()=>i.fetchNotifications(),"$VEkwi2Ag3k")),await r,g();let{closedNotificationIds:j,notifications:z}=te(i);const S=b(!1),B=_(()=>z.value.map(t=>{const e=_(()=>!(t.lang!=="en_US"&&o.value||t.data.path_excludes.some(l=>l===N.path||l.endsWith("*")&&N.path.startsWith(l.slice(0,-1)))||j.value.has(t.id)));return{...t,isVisible:e}})),v=_(()=>B.value.filter(t=>t.isVisible.value).slice(0,3)),m=_(()=>v.value.length),k=_(()=>c.value?.clientWidth??0),F=_(()=>v.value[a.value]),O=t=>{if(!t)return;const e=t.data.styles?.background_color_id;return t.refs.references.find(l=>l.woom?.contentId===e)?.elements?.color??""},C=t=>{!c.value||!k.value||c.value.scrollTo({left:t*k.value,behavior:"smooth"})},$=()=>{m.value&&(a.value=a.value===m.value-1?0:a.value+1,C(a.value))},L=()=>{m.value&&(a.value=a.value===0?m.value-1:a.value-1,C(a.value))};M(u,t=>{if(!d||!c.value||!k.value||!m.value)return;const e=c.value.scrollLeft/k.value,l=t?f.right?Math.ceil(e):Math.floor(e):Math.round(e);a.value=Math.min(m.value-1,Math.max(0,l))});const{pause:T,resume:R}=oe($,be,{immediate:!0}),D=_(()=>S.value&&m.value>1&&!y.value&&!h.value&&!u.value&&!me.value);M(D,t=>{t?R():T()},{immediate:!0});const E=t=>{t==="next"?$():L(),D.value&&(T(),R())};return(t,e)=>{const l=ue,W=_e,J=de;return p(v).length?ne((w(),I("div",{key:0,class:"org-notifications section-background-color section-text-color relative z-md",style:V({"--notifications-background-color":O(p(F)),"--section-background-color":"var(--notifications-background-color, var(--color-woom-black))"}),onFocusin:e[5]||(e[5]=n=>h.value=!0),onFocusout:e[6]||(e[6]=n=>
2h.value=!1),onMouseenter:e[7]||(e[7]=n=>y.value=!0),onMouseleave:e[8]||(e[8]=n=>y.value=!1)},[p(v).length>1?(w(),I("button",{key:0,class:"group absolute top-1/2 z-10 flex h-12 w-12 shrink-0 -translate-y-1/2 items-center justify-center rounded-lg",tabindex:"-1",onClick:e[0]||(e[0]=n=>E("prev"))},[P(l,{class:"h-6 w-6 fill-current group-hover:animate-pop"})])):x("",!0),se("ul",{class:"-my-1 no-scrollbar flex snap-x snap-mandatory overflow-x-scroll scroll-smooth py-1",ref_key:"notificationsRef",ref:c,onPointerdown:e[1]||(e[1]=n=>d.value=!0),onPointerup:e[2]||(e[2]=n=>d.value=!1),onPointercancel:e[3]||(e[3]=n=>d.value=!1)},[(w(!0),I(ae,null,ie(p(v),n=>(w(),re(W,{key:n.id,class:"w-full min-w-full shrink-0 snap-start",isOnlyNotification:p(v).length===1,notification:n,style:V({"--notification-background-color":O(n),backgroundColor:"var(--notification-background-color, var(--color-woom-black))"})},null,8,["isOnlyNotification","notification","style"]))),128))],544),p(v).length>1?(w(),I("button",{key:1,class:"group absolute top-1/2 right-0 z-10 flex h-12 w-12 shrink-0 -translate-y-1/2 items-center justify-center rounded-lg",tabindex:"-1",onClick:e[4]||(e[4]=n=>E("next"))},[P(J,{class:"h-6 w-6 fill-current group-hover:animate-pop"})])):x("",!0)],36)),[[p(fe),([n])=>S.value=!!n?.isIntersecting]]):x("",!0)}}}),ye=Object.assign(ge,{__name:"OrgNotifications"}),Se=Object.freeze(Object.defineProperty({__proto__:null,default:ye},Symbol.toStringTag,{value:"Module"}));export{Se as N,pe as u}; 3//# sourceMappingURL=CV7NbHSI.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.