1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8861],{38790:(e,l,a)=>{"use strict";a.d(l,{A:()=>r});var t=a(37876);function r(){return(0,t.jsx)("div",{className:"h-12 lg:h-32 bg-primary"})}a(14232)},50508:(e,l,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/resources/pitch-book",function(){return a(83422)}])},65801:(e,l,a)=>{"use strict";a.d(l,{A:()=>s});var t=a(52500),r=a(76779),i=a(14232);let s=e=>{let[l,a]=(0,i.useState)(null),[s,o]=(0,i.useState)(!0),[n,c]=(0,i.useState)(null);return(0,i.useEffect)(()=>{e&&(async()=>{try{o(!0);let i=await (0,r.Ck)({page:1,limit:100,search:{category:e}},t.xM);if((null==i?void 0:i.status)===200){var l;null==i||null==(l=i.doc.docs)||l.map((e,l)=>Object.assign(e,{url:e.downloadLink})),a(null==i?void 0:i.doc.docs.reverse())}else c("Failed to fetch data")}catch(e){c(e.message||"An error occurred")}finally{o(!1)}})()},[e]),{data:l,loading:s,error:n}}},83422:(e,l,a)=>{"use strict";a.r(l),a.d(l,{default:()=>d});var t=a(37876),r=a(93509),i=a(38790);a(14232);var s=a(11289),o=a(57299),n=a(67249),c=a(65801);let d=function(){let{data:e,loading:l,error:a}=(0,c.A)("Pitch Book");return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{children:(0,t.jsx)(n.A,{})}),(0,t.jsx)("div",{className:(0,s.A)("bg-primary ",o.F$),children:(0,t.jsx)("div",{className:"grid mobile:grid-cols-2 laptop:grid-cols-4 laptop-large:grid-cols-5 gap-4 laptop:gap-4 laptop-large:gap-10",children:null==e?void 0:e.map((e,l)=>(0,t.jsx)("div",{className:"w-full flex flex-col bg-white ",children:(0,t.jsx)(r.A,{ele:e,className:"h-[75%]",btnText:"preview"})},l))})}),(0,t.jsx)("div",{children:(0,t.jsx)(i.A,{})})]})}},93509:(e,l,a)=>{"use strict";a.d(l,{A:()=>d});var t=a(37876);a(14232);var r=a(4168),i=a(18658),s=a(11289);let o=(0,a(17963).A)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);var n=a(46143);let c=async(e,l)=>{try{let a=await fetch(e);if(!a.ok)throw Error("Failed to fetch PDF: ".concat(a.statusText));let t=await a.blob(),r=window.URL.createObjectURL(t),i=document.createElement("a");i.href=r,i.download=l,document.body.appendChild(i),i.click(),document.body.removeChild(i),window.URL.revokeObjectURL(r)}catch(e){throw console.error("Error downloading PDF:",e),Error("Unable to download the PDF. Please try again.")}};function d(e){let{ele:l,className:a,btnText:d}=e,{getTranslated:u}=(0,i.A)(["resources","right-to-information"]);return(0,t.jsxs)("div",{className:"h-[400px] flex flex-col gap-4",children:[(0,t.jsx)("div",{className:(0,s.A)("h-[270px] relative flex-shrink-0 overflow-hidden",null==l?void 0:l.className,a),children:(null==l?void 0:l.thumbnail)?(0,t.jsx)("img",{src:l.thumbnail,alt:(null==l?void 0:l.title)||"PDF Thumbnail",className:(0,s.A)("w-full h-full object-cover object-top",null==l?void 0:l.imgClassName)}):(0,t.jsx)("div",{className:"w-full h-full flex items-center justify-center bg-gray-100",children:(0,t.jsx)("p",{className:"text-gray-500",children:"No Thumbnail"})})}),(0,t.jsx)("div",{className:"px-4 text-left text-sm",children:(0,t.jsx)(r.A,{text:(null==l?void 0:l.title)||(null==l?void 0:l.languageKey)||"Untitled"})}),(0,t.jsx)("div",{className:"px-4 pb-3 mt-auto",children:(0,t.jsxs)(n.$n,{className:"bg-orange text-white w-full capitalize font-bold tracking-wider space-x-2",size:"md",onClick:()=>(e=>{if(!e)return void console.error("Invalid URL:",e);try{let l=e.split("/").pop()||"download.pdf";c(e,l).catch(e=>{console.error("Download failed:",e)})}catch(e){console.error("Error extracting filename:",e)}})(null==l?void 0:l.url),disabled:!(null==l?void 0:l.url),children:[(0,t.jsx)(o,{className:"h-5 w-5"}),(0,t.jsx)("span",{children:u(d||"Preview")})]})})]})}}},e=>{e.O(0,[401,5250,3716,6770,6387,7249,6779,636,6593,8792],()=>e(e.s=50508)),_N_E=e.O()}]);
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.