1import{k as d,d as e,l as p,m as f,b8 as v,y as M,C as N,o as c,p as V,aB as z,aS as L,aC as F,bF as R,B as g,z as n,f as E,T as I,n as y,aa as j,aF as O,w as U}from"#entry";import{_ as G}from"./DJlHjjBA.js";import{u as J}from"./CXBr_KyA.js";import"./Dak32NSd.js";import"./CzYRrvcX.js";import"./ht4zhLgF.js";const K=["aria-label"],P=d({__name:"UiMarquee",props:{loop:{default:-1},duration:{default:30},direction:{default:"left"},behavior:{default:"normal"},ariaLabel:{default:"Scrolling content"}},setup(l){const a=l,r=e(()=>Math.sign(a.loop)===-1?"infinite":a.loop),i=e(()=>`marquee-${a.direction}`);return(u,h)=>(c(),p("div",{class:"relative w-full overflow-hidden whitespace-nowrap",role:"region","aria-label":l.ariaLabel},[f("span",{class:M(["animate-marquee inline-block translate-x-0 whitespace-nowrap focus-within:[animation-play-state:paused] hover:[animation-play-state:paused] motion-reduce:animate-none",l.direction==="left"?"pl-[100%]":"pr-[100%]"]),style:v({animationName:i.value,animationDuration:a.duration+"s",animationTimingFunction:"linear",animationIterationCount:r.value,animationDirection:a.behavior==="alternate"?"alternate":"normal"})},[N(u.$slots,"default")],6)],8,K))}}),Q={class:"flex items-center gap-2 p-4"},W={class:"w-full text-center text-[11px] md:text-[13px]"},X=d({__name:"TopBanner",async setup(l){let a,r;const{locale:i}=V(),{renderHTML:u}=J(),h=z(),{data:B}=([a,r]=L(()=>F("top-banner",{locale:i.value},()=>$fetch(`/api/${i.value}/content/top-banner`,{headers:h}))),a=await a,r(),a),s=e(()=>B.value?.content??null),k=o=>{let t=0;for(let m=0;m<o.length;m++){const D=o.charCodeAt(m);t=(t<<5)-t+D,t=t&t}return t.toString(36)},_=R("top-banner-dismissed",{sameSite:"lax",path:"/",maxAge:3600*24*30,default:()=>null}),C=e(()=>{const o=s.value?.textContent?.html??"";return k(o)}),H=e(()=>_.value===C.value),b=e(()=>s.value?.textContent?.html?.trim()??""),S=e(()=>s.value?.backgroundColor?.hex||"#026833"),x=e(()=>s.value?.fontColor?.hex||"#ffffff"),$=e(()=>!!s.value?.isMarquee),w=e(()=>!!s.value?.isCloseable),T=e(()=>!s.value||!b.value?!1:!H.value),q=()=>{w.value&&(_.value=C.value)},A=d({setup(){const o=O(null);return U(async()=>{const t=b.value;o.value=await u(t)}),()=>o.value?.()??null}});return(o,t)=>n(T)?(c(),p("div",{key:0,class:"-mx-4",style:v({backgroundColor:n(S),color:n(x)})},[f("div",Q,[f("div",W,[(c(),E(j(n($)?n(P):"div"),null,{default:I(()=>[y(n(A),{class:"top-banner__content"})]),_:1}))]),n(w)?(c(),p("button",{key:0,class:"inline-flex items-center p-0 leading-none",style:v({color:n(x)}),onClick:q},[y(n(G),{name:"x",size:18})],4)):g("",!0)])],4)):g("",!0)}}),oe=Object.assign(X,{__name:"LayoutTopBanner"});export{oe as default};
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.