PageSourceSearch

https://www.emirates247.com/assets/UaeGuideWidget-_KhwfMY6.js

js emirates247.com collected 2026-10-01 10:46:22 UTC 3,074 bytes, 1 lines download raw bytes

1import{a,j as e}from"./vendor-react-CDFIE44H.js";import{u as p}from"./vendor-query-BKeeEAAr.js";import{Q as g,f as j}from"./index-B7SSE3m4.js";import{L as v}from"./vendor-router-nJKcHAGV.js";import{H as N,f as y,e as w}from"./vendor-icons-BsQZz6Pl.js";import"./vendor-radix-Cxb7F2zo.js";import"./vendor-utils-DSOPSYhy.js";const c="/res/img/eb247/logo-1024x576.png";function W({articles:o}={}){const{data:u}=p({...g(),enabled:o===void 0}),l=a.useRef(null),[m,h]=a.useState(!1),[f,x]=a.useState(!0),i=o??u?.uaeGuide??[];if(i.length===0)return null;const n=()=>{const t=l.current;t&&(h(t.scrollLeft>10),x(t.scrollLeft<t.scrollWidth-t.clientWidth-10))},d=t=>{const s=l.current;if(!s)return;const r=280,b=t==="left"?-r*2:r*2;s.scrollBy({left:b,behavior:"smooth"}),setTimeout(n,350)};return e.jsxs("section",{className:"mb-12","data-testid":"uae-guide-widget",children:[e.jsxs("div",{className:"flex items-center justify-between border-b-2 border-primary pb-2 mb-5",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(N,{className:"w-5 h-5 text-primary"}),e.jsx("h2",{className:"text-xl font-bold uppercase tracking-wide","data-testid":"text-uae-guide-title",children:e.jsx(v,{href:"/uae-guide",className:"text-primary hover:underline",children:"UAE Guide"})})]}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx("button",{onClick:()=>d("left"),disabled:!m,className:"w-8 h-8 rounded-full border border-slate-300 dark:border-slate-600 flex items-center justify-center hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors disabled:opacity-30 disabled:cursor-not-allowed","aria-label":"Scroll left","data-testid":"button-uae-guide-prev",children:e.jsx(y,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>d("right"),disabled:!f,className:"w-8 h-8 rounded-full border border-slate-300 dark:border-slate-600 flex items-center justify-center hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors disabled:opacity-30 disabled:cursor-not-allowed","aria-label":"Scroll right","data-testid":"button-uae-guide-next",children:e.jsx(w,{className:"w-4 h-4"})})]})]}),e.jsx("div",{className:"relative",children:e.jsx("div",{ref:l,onScroll:n,className:"flex gap-4 overflow-x-auto scroll-smooth scrollbar-hide pb-2",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:i.map((t,s)=>e.jsxs("a",{href:j(t),className:"group flex-shrink-0 w-[260px] cursor-pointer","data-testid":`link-uae-guide-${s}`,children:[e.jsxs("div",{className:"relative overflow-hidden rounded-sm aspect-[16/9] mb-2",children:[e.jsx("img",{src:t.image||c,alt:t.title,style:{objectFit:"contain",width:"100%",height:"100%"},loading:"lazy",onError:r=>{r.currentTarget.src=c}}),t.sectionName&&e.jsx("span",{className:"absolute top-2 left-2 bg-primary text-white text-[10px] font-bold uppercase px-2 py-0.5",children:t.sectionName})]}),e.jsx("h3",{className:"font-serif font-bold text-sm leading-snug group-hover:text-primary transition-colors line-clamp-3 min-h-[3.75rem]","data-testid":`text-uae-guide-title-${s}`,children:t.title})]},t.id||s))})})]})}export{W 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.