1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8,4793,6762,8017],{4793:(e,t,n)=>{n.d(t,{T:()=>r,h:()=>l});let l=e=>({SharePanelTitle:e?.SharePanelTitle,CopyBtnText:e?.CopyBtnText,ShareBtnIcon:e?.ShareBtnIcon,CopyBtnIcon:e?.CopyBtnIcon,WhatsAppIcon:e?.WhatsAppIcon,LinkedInIcon:e?.LinkedInIcon,InstagramIcon:e?.InstagramIcon,XIcon:e?.XIcon,FacebookIcon:e?.FacebookIcon,EmailIcon:e?.EmailIcon}),r=(e,t)=>{let n=e?.SharePopup?.fields??e?.SharePanel?.fields,l=t=>n?.[t]??e?.[t];return{SharePanelTitle:l("SharePanelTitle")??t?.SharePanelTitle,CopyBtnText:l("CopyBtnText")??t?.CopyBtnText,ShareBtnIcon:l("ShareBtnIcon"),CopyBtnIcon:l("CopyBtnIcon"),WhatsAppIcon:l("WhatsAppIcon"),LinkedInIcon:l("LinkedInIcon"),InstagramIcon:l("InstagramIcon"),XIcon:l("XIcon"),FacebookIcon:l("FacebookIcon"),EmailIcon:l("EmailIcon"),CardShareBtnIcon:l("CardShareBtnIcon")}}},26762:(e,t,n)=>{n.d(t,{A:()=>r});var l=n(14232);let r=function(e,t){(0,l.useEffect)(()=>{let n=n=>{!e.current||e.current.contains(n.target)||t(n)};return document.addEventListener("mouseup",n),document.addEventListener("touchend",n),()=>{document.removeEventListener("mouseup",n),document.removeEventListener("touchend",n)}},[e,t])}},90008:(e,t,n)=>{n.r(t),n.d(t,{default:()=>b});var l=n(37876),r=n(14232),a=n(27888),s=n(87109),i=n(89099),o=n(33379);function c(e){if(!e||e.startsWith("#"))return!1;try{return new URL(e,window.location.origin).hostname!==window.location.hostname}catch{return!1}}var d=n(91372),u=n(4793),h=n(32838),m=n.n(h),p=n(98017);let f=(e,t)=>e?.[t],x=(e,t)=>e?.[t],w=e=>String(e?.value??"").trim(),v=e=>{let t=e?.value?.href;return"string"==typeof t?t.trim():""},g=e=>{let t="string"==typeof e?e.trim():"";return t?t.startsWith("https://")||t.startsWith("http://")||t.startsWith("data:")||t.startsWith("/")?t:`https://infra.gov.sa/s-core${t}`:""},b=e=>{let{fields:t}=e,n=(0,o.Ym)(),h="ar"===n,b=(0,i.useRouter)(),{openExternalLink:y}=(0,d.b)(),[I,j]=(0,r.useState)(null),k=(0,r.useMemo)(()=>(e=>{if(!e)return[];let t=e.TendorsCards??e.InfoCards??[],n=x(e,"BtnIcon"),l=String(n?.value?.src??"").trim(),r=String(n?.value?.alt??"").trim();return t.map(e=>{let t=!!e.fields?.isFile?.value,n=String(e.fields?.File?.value?.src??"").trim(),a=t&&n?g(n):"",s=String(e.fields?.File?.value?.name??e.fields?.File?.value?.displayName??"").trim(),i=v(e.fields?.CTALink)||v(e.fields?.Link),o=c(i),d=e.fields?.ExternalLinkIcon,u=String(d?.value?.src??"").trim(),h=String(d?.value?.alt??"").trim(),m=u||l;return{id:e.id,title:w(e.fields?.Title),linkHref:i,linkText:w(e.fields?.CTALabel),iconSrc:!t&&o&&m?g(m):"",iconAlt:h||r,isFile:t,videoSrc:a,videoName:s}})})(t),[t]),S=(0,r.useMemo)(()=>(0,u.T)(t,{SharePanelTitle:{value:h?"Ù
Ø´Ø§Ø±ÙØ©":"Share"},CopyBtnText:{value:h?"ÙØ³Ø® Ø§ÙØ±Ø§Ø¨Ø·":"Copy link"}}),[t,h]),C=(0,r.useMemo)(()=>({shareLabel:w(f(t,"ShareBtnLabel"))||(h?"Ù
Ø´Ø§Ø±ÙØ©":"Share"),downloadLabel:w(f(t,"DownloadBtnLabel")),closeLabel:w(f(t,"CloseBtnLabel")),shareBtnIconSrc:g(x(t,"ShareBtnIcon")?.value?.src??""),downloadIconSrc:g(x(t,"DownloadIcon")?.value?.src??""),closeIconSrc:g(x(t,"CloseIcon")?.value?.src??"")}),[t,h]);return 0===k.length?null:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"responsive max-md:px-0! py-10",children:(0,l.jsx)("div",{className:"w-full",children:(0,l.jsx)("div",{className:"relative flex w-full min-w-0 flex-col gap-[length:var(--spacing-4xl)] rounded-lg bg-neutral-100 py-10 px-5 md:p-[length:var(--spacing-4xl)] max-md:gap-md",children:(0,l.jsx)("div",{className:"w-full min-w-0 overflow-hidden",children:(0,l.jsxs)(a.RC,{modules:[s.dK,s.FJ],dir:h?"rtl":"ltr",spaceBetween:12,mousewheel:{forceToAxis:!0,releaseOnEdges:!h},watchOverflow:!0,breakpoints:{0:{slidesPerView:1},640:{slidesPerView:2},768:{slidesPerView:3},1024:{slidesPerView:4}},pagination:{el:"#info-cards-pagination-tenders-and-procurement",enabled:!0,clickable:!0,type:"bullets",bulletClass:"swiper-pagination-bullet infra-card-top-image-bullet",bulletActiveClass:"swiper-pagination-bullet-active infra-card-top-image-bullet-active"},className:"infra-card-top-image-swiper infra-card-top-image-swiper--clip-track !w-full",children:[k.map((e,t)=>(0,l.jsx)(a.qr,{className:"!h-auto",children:(0,l.jsxs)("div",{className:"flex h-full min-h-[length:var(--min-height-tenders-info-card)] w-full flex-col items-stretch justify-between gap-4 roun
1ded-lg bg-white p-4",children:[(0,l.jsx)("div",{className:"flex flex-col gap-2 items-start relative w-full min-w-0",children:(0,l.jsx)("p",{className:"font-bold leading-7 text-lg text-neutral-800 w-full",children:e.title})}),e.linkText?(0,l.jsx)("div",{className:"flex w-full items-end justify-start",children:(0,l.jsxs)("button",{type:"button",onClick:()=>(e=>{if(e.isFile&&e.videoSrc)return void j(e);let t=e.linkHref;t&&"#"!==t&&(c(t)?y(t):b.push(t))})(e),className:"bg-primary-600 flex gap-1 h-10 items-center justify-center max-h-10 min-h-10 overflow-hidden px-4 py-0 rounded-sm shrink-0 hover:bg-primary-700 transition-colors cursor-pointer",children:[(0,l.jsx)("span",{className:"font-medium leading-6 text-md text-white whitespace-nowrap",children:e.linkText}),e.iconSrc?(0,l.jsx)("img",{src:e.iconSrc,width:24,height:24,alt:e.iconAlt,className:"w-6 h-6 shrink-0 rtl:-scale-x-100"}):null]})}):null]})},e.id??`tender-info-card-mobile-${t}`)),(0,l.jsx)("div",{id:"info-cards-pagination-tenders-and-procurement",className:"swiper-pagination swiper-pagination-horizontal swiper-pagination-bullets infra-card-top-image-swiper-pagination"})]},`tenders-info-cards-${n}`)})})})}),(0,l.jsx)(p.default,{isOpen:!!I,onClose:()=>j(null),title:I?.title??"",videoSrc:I?.videoSrc??"",videoName:I?.videoName,shareLink:(e=>{let t="string"==typeof e?e.trim():"";if(!t)return"";if(t.startsWith("https://")||t.startsWith("http://")||t.startsWith("data:"))return t;let n=(m()?.publicUrl||"https://infra.gov.sa").replace(/\/+$/,""),l=t.startsWith("/")?t:`/${t}`;return`${n}${l}`})(I?.videoSrc??""),shareProps:S,shareLabel:C.shareLabel,downloadLabel:C.downloadLabel,closeLabel:C.closeLabel,shareBtnIconSrc:C.shareBtnIconSrc,downloadIconSrc:C.downloadIconSrc,closeIconSrc:C.closeIconSrc,isRtl:h})]})}},98017:(e,t,n)=>{n.r(t),n.d(t,{default:()=>m});var l=n(37876),r=n(14232),a=n(98477),s=n(18847),i=n.n(s),o=n(54587),c=n.n(o),d=n(26762);let u=i()(()=>Promise.all([n.e(3939),n.e(9214)]).then(n.bind(n,43939)),{loadableGenerated:{webpack:()=>[43939]},ssr:!1}),h="flex h-8 min-h-8 max-h-8 shrink-0 items-center justify-center gap-xs overflow-hidden rounded-sm px-3 py-0 text-sm leading-5 font-medium transition-colors cursor-pointer",m=r.memo(e=>{let{isOpen:t,onClose:n,title:s,videoSrc:i,videoName:o,shareLink:m,shareProps:p,downloadLabel:f,closeLabel:x,shareLabel:w,shareBtnIconSrc:v,downloadIconSrc:g,closeIconSrc:b,isRtl:y}=e,I=(0,r.useRef)(null),j=(0,r.useRef)(null),[k,S]=(0,r.useState)(!1),[C,N]=(0,r.useState)(!1),L=document.body;(0,r.useEffect)(()=>{N(!1)},[t,i]);let B=(0,r.useCallback)(()=>{N(!0),j.current?.play()},[]),T=(0,r.useCallback)(()=>{k||n()},[n,k]);if((0,d.A)(I,T),(0,r.useEffect)(()=>{if(!t)return;let e=document.body.style.overflow||"";document.body.style.overflow="hidden";let l=e=>{"Escape"===e.key&&n()};return document.addEventListener("keydown",l),()=>{document.body.style.overflow=e,document.removeEventListener("keydown",l)}},[t,n]),!t||!L)return null;let P=(0,l.jsxs)("div",{dir:y?"rtl":"ltr",className:"fixed inset-0 z-[1000] flex min-h-screen items-center justify-center bg-neutral-800/38 px-xl",children:[(0,l.jsxs)("div",{ref:I,className:"animate-appearance-in shadow-modal-3xl flex w-full max-w-[760px] flex-col items-start gap-xl overflow-hidden rounded-md bg-white p-3xl",children:[(0,l.jsx)("div",{className:"flex h-8 w-full items-start justify-end",children:(0,l.jsx)("button",{type:"button",onClick:n,"aria-label":x||"Close",className:"flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-sm transition-colors hover:bg-neutral-100",children:(0,l.jsx)(c(),{src:b||"/icons/close.svg",width:32,height:32,alt:"close icon",className:"size-5 text-primary-1000"})})}),s?(0,l.jsx)("div",{className:"flex w-full items-start",children:(0,l.jsx)("p",{className:"min-w-px flex-1 wrap-break-word text-lg font-semibold leading-7 text-text-dark-primary",children:s})}):null,(0,l.jsx)("div",{className:"relative flex w-full shrink-0 items-center justify-center overflow-hidden bg-white",children:i?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("video",{ref:j,src:i,controls:C,playsInl
1ine:!0,controlsList:"nodownload",onPlay:()=>N(!0),onPause:()=>N(!1),className:"h-auto max-h-[60vh] w-full object-contain",children:(0,l.jsx)("track",{kind:"captions"})},i),C?null:(0,l.jsx)("button",{type:"button",onClick:B,"aria-label":"Play video",className:"absolute inset-0 flex items-center justify-center bg-neutral-950/10 transition-colors hover:bg-neutral-950/20",children:(0,l.jsxs)("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M0 24C0 10.7452 10.7452 0 24 0C37.2548 0 48 10.7452 48 24C48 37.2548 37.2548 48 24 48C10.7452 48 0 37.2548 0 24Z",fill:"#F3FCF6"}),(0,l.jsx)("path",{d:"M16.6236 15.3513C16.8548 15.2171 17.14 15.2162 17.3721 15.3488L31.3721 23.3488C31.6058 23.4824 31.75 23.7309 31.75 24C31.75 24.2691 31.6058 24.5177 31.3721 24.6512L17.3721 32.6512C17.14 32.7838 16.8548 32.7829 16.6236 32.6487C16.3923 32.5145 16.25 32.2674 16.25 32V16C16.25 15.7326 16.3923 15.4855 16.6236 15.3513Z",fill:"#067647"})]})})]}):null}),(0,l.jsxs)("div",{className:"flex w-full shrink-0 items-center justify-end gap-sm",children:[(0,l.jsx)("div",{className:"flex min-w-px flex-1 flex-col items-start justify-center",children:(0,l.jsxs)("button",{type:"button",onClick:()=>S(!0),className:`${h} bg-neutral-950 text-white hover:bg-primary-1000`,children:[v?(0,l.jsx)(c(),{src:v,width:20,height:20,alt:"",className:"size-5 shrink-0"}):null,w?(0,l.jsx)("span",{children:w}):null]})}),(0,l.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-sm",children:[i?(0,l.jsxs)("a",{href:i,download:o||!0,className:`${h} border border-neutral-300 text-primary-1000 hover:bg-neutral-100`,children:[g?(0,l.jsx)(c(),{src:g,width:20,height:20,alt:"",className:"size-5 shrink-0"}):null,f?(0,l.jsx)("span",{children:f}):null]}):null,(0,l.jsx)("button",{type:"button",onClick:n,className:`${h} border border-neutral-300 text-primary-1000 hover:bg-neutral-100`,children:x?(0,l.jsx)("span",{children:x}):null})]})]})]}),k?(0,l.jsx)(u,{setShowShare:S,shareLink:m,shareProps:p}):null]});return(0,a.createPortal)(P,L)})}}]);
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.