1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[797],{2797:(e,r,t)=>{t.d(r,{G:()=>T});var n=t(7876),s=t(4232);class i extends s.Component{static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?(0,n.jsx)("div",{className:"my-2 text-gray-400",children:"Something went wrong while rendering this smart component."}):this.props.children}constructor(...e){super(...e),this.state={hasError:!1}}}let l=e=>{let{children:r}=e;return(0,n.jsx)(i,{children:(0,n.jsx)(s.Suspense,{fallback:(0,n.jsx)("div",{children:"Loading..."}),children:r})})},a=e=>r=>(0,n.jsx)(l,{children:(0,n.jsx)(e,{...r})});var o=t(8318),c=t(5105),d=t.n(c),m=t(6768);let u=["Youtube","Vimeo","Twitter","X","Instagram","DailyMotion","Loom","Any URL (generic iframe)"];function p(e){let r=new URL(e).pathname.split("/");return r[r.length-1]}function x(e){let{url:r}=e,t="https://player.vimeo.com/video/".concat(p(r));return(0,n.jsx)("div",{className:"responsive-iframe-container",children:(0,n.jsx)("iframe",{src:t,className:"rounded-2xl responsive-iframe"})})}function h(e){let{url:r}=e,t="https://www.dailymotion.com/embed/video/".concat(p(r));return(0,n.jsx)("div",{className:"responsive-iframe-container",children:(0,n.jsx)("iframe",{src:t,className:"rounded-2xl responsive-iframe"})})}let f=e=>fetch(e).then(e=>e.json());function j(e){let{url:r}=e,{data:t,error:s,isLoading:i}=(0,m.Ay)("/api/utils/oembed?url=".concat(encodeURIComponent(r),"&type=youtube"),f);if(s)return(0,n.jsx)("div",{children:"Error loading Youtube preview"});if(i)return(0,n.jsx)("div",{children:"Loading..."});if(!t)return(0,n.jsx)("div",{children:"Unable to parse iframe"});let l=t.html.replace(/width="(\d+)"/,'"').replace(/height="(\d+)"/,'"').replace(/<iframe/,'<iframe class="responsive-iframe"');return(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:l},className:"responsive-iframe-container [&>iframe]:rounded-2xl"})}function g(e){let{url:r}=e,t=r.replace("x.com","twitter.com"),{data:s,error:i,isLoading:l}=(0,m.Ay)("/api/utils/oembed?url=".concat(encodeURIComponent(t),"&type=twitter"),f);return i?(0,n.jsx)("div",{children:"Error loading Twitter preview"}):s?l?(0,n.jsx)("div",{children:"Loading..."}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{style:{maxWidth:s.width},dangerouslySetInnerHTML:{__html:s.html}}),(0,n.jsx)(d(),{src:"https://platform.twitter.com/widgets.js"})]}):(0,n.jsx)("div",{children:"Unable to parse iframe"})}function v(e){let{url:r}=e;return(0,n.jsx)("div",{className:"responsive-iframe-container",children:(0,n.jsx)("iframe",{src:"https://www.loom.com/embed/".concat(p(r)),allowFullScreen:!0,className:"rounded-2xl responsive-iframe"})})}function w(e){let{url:r}=e;return(0,n.jsx)("div",{className:"responsive-iframe-container",children:(0,n.jsx)("iframe",{src:r,allowFullScreen:!0,className:"rounded-2xl responsive-iframe"})})}function y(e){let{url:r}=e,{data:t,error:s,isLoading:i}=(0,m.Ay)("/api/utils/oembed?url=".concat(encodeURIComponent(r),"&type=instagram"),f);return s?(0,n.jsx)("div",{children:"Error loading Instagram preview"}):t?i?(0,n.jsx)("div",{children:"Loading..."}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{style:{maxWidth:t.width},dangerouslySetInnerHTML:{__html:t.html},className:"responsive-iframe-container [&>iframe]:rounded-2xl"}),(0,n.jsx)(d(),{src:"https://www.instagram.com/embed.js"})]}):(0,n.jsx)("div",{children:"Unable to parse iframe"})}let b=async(e,r)=>{let t=new URLSearchParams;t.append("documentIds",r.join(","));let n="".concat(e,"?").concat(t.toString()),s=await fetch(n,{method:"GET"});if(!s.ok)throw Error("Failed to fetch article data");return s.json()};var N=t(8230),E=t.n(N),I=t(3044);let _=function(e){let{imageSrc:r,imageAltText:t}=e;return null!=r?(0,n.jsx)("img",{src:r,alt:t,className:"h-full w-full object-cover"}):(0,n.jsx)("div",{className:"h-full w-full bg-gradient-to-t from-neutral-800 to-neutral-100"})},L=function(e){let{article:r,isWide:t=!0}=e;return(0,n.jsxs)("div",{className:(0,I.cn)("group flex h-full flex-col overflow-clip rounded-xl shadow-lg ring-1 ring-gray-300/50",t?"sm:flex-row":""),children:[(0,n.jsx)("div",{className:(0,I.cn)("aspect-video w-full flex-shrink-0 overflow-hidden",t?"sm:h-full sm:w-[200px] sm:max-w-[200px]":""),children:(0,n.jsx)(_,{imageSrc:r.image,imageAltText:"Cover image for ".concat(r.title)})}),(0,n.jsxs)("div",{className:(0,I.cn)("flex flex-grow flex-col justify-between p-6",t&&"sm:p-6"),children:[(0,n.jsx)("div",{children:(0,n.jsx)("h1",{className:"mb-3 text-xl font-semibold leading-7",children:r.title})}),(0,n.jsx)(E(),{href:r.url,className:"mt-4 font-medium text-black hover:text-gray-600",children:"Read more â"})]})]})},A={LEAD_CAPTURE:{title:"Lead Capture Form",iconUrl:null,fields:{heading:{displayName:"Heading",required:!0,type:"string"},description:{displayName:"Description",required:!0,type:"string"},inputLabel:{displayName:"Input Label",required:!0,type:"string"},submitButtonText:{displayName:"Submit Button Text",required:!1,type:"string"}}},MEDIA_PREVIEW:{title:"Media Preview",iconUrl:null,exampleImageUrl:"https://storage.googleapis.com/pcc-prod-user-uploads/preview-media-preview.png",fields:{url:{displayName:"URL",required:!0,type:"string"}}},TILE_NAVIGATION:{title:"Tile Navigation",iconUrl:null,fields:{documentIds:{displayName:"Document Links or IDs",required:!0,type:"string",multiple:!0}}}},T={MEDIA_PREVIEW:{...A.MEDIA_PREVIEW,reactComponent:a(e=>{let{url:r}=e,t=function(e){if(!e)return null;try{let r=e;-1===e.indexOf("http://")&&-1===e.indexOf("https://")?r="https://".concat(e):0===e.indexOf("http://")&&(e=e.replace("http://","https://"));let t=new URL(r).hostname.split(".");switch(t[t.length-2].toLowerCase()){case"youtube":case"youtu":case"yt":return(0,n.jsx)(j,{url:r});case"twitter":case"x":return(0,n.jsx)(g,{url:r});case"vimeo":return(0,n.jsx)(x,{url:r});case"instagram":return(0,n.jsx)(y,{url:r});case"dailymotion":return(0,n.jsx)(h,{url:r});case"loom":return(0,n.jsx)(v,{url:r});default:return(0,n.jsx)(w,{url:r})}}catch(r){return console.error("Media smart component render failed",r,{url:e}),null}}(r);return t?(0,n.jsx)("div",{className:"w-full",children:t}):(0,n.jsxs)("div",{className:"max-w-[400px] w-full outline outline-black/10 p-4 rounded-md",children:[(0,n.jsxs)("p",{className:"my-2 text-lg font-medium",children:['Unsupported Media Preview URL "',r,'"']}),(0,n.jsxs)("p",{className:"text-sm",children:["Supported Platforms: ",u.join(", ")
1]})]})})},LEAD_CAPTURE:{...A.LEAD_CAPTURE,reactComponent:a(e=>{let{heading:r,description:t,inputLabel:i,submitButtonText:l,onSubmit:a}=e,[c,d]=(0,s.useState)(!1),m=async e=>{e.preventDefault(),a?await a(e):alert("Form submitted successfully"),d(!0)};return(0,n.jsx)("div",{className:"not-prose w-full rounded-md p-8 shadow-[0px_3px_8px_0px_rgba(0,0,0,0.15),0px_1px_2px_0px_rgba(0,0,0,0.2)]",children:c?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h1",{className:"mb-3 text-2xl font-bold",children:"Thank you."}),(0,n.jsx)("p",{children:"The form was submitted successfully."})]}):(0,n.jsxs)("form",{onSubmit:m,children:[(0,n.jsx)("h1",{className:"mb-3 text-2xl font-bold",children:r}),(0,n.jsx)("p",{className:"mb-4",children:t}),(0,n.jsxs)("label",{className:"mb-8 block",children:[(0,n.jsx)("p",{className:"mb-1 font-bold",children:i}),(0,n.jsx)("input",{className:"w-full rounded-md border border-neutral-400 p-2",required:!0})]}),(0,n.jsx)(o.$,{children:null!=l?l:"Submit"})]})})})},TILE_NAVIGATION:{...A.TILE_NAVIGATION,reactComponent:a(e=>{let{documentIds:r}=e,t=(function(e){let r=[];try{if(Array.isArray(e))r=e.map(e=>"string"==typeof e?e:e&&"object"==typeof e&&"item"in e?String(e.item):"").filter(Boolean);else if(e&&"object"==typeof e)if("item"in e){let t=e.item;t&&(r=[String(t)])}else try{r=Object.values(e).map(e=>"string"==typeof e?e:e&&"object"==typeof e&&"item"in e?String(e.item):"").filter(Boolean)}catch(e){return console.error("Error parsing documentIds object values:",e),[]}else"string"==typeof e&&(r=[e]);return r.map(e=>{try{let r=e.match(/https:\/\/docs\.google\.com\/document\/d\/([^/]+)/);return r?r[1]:e}catch(r){return console.error("Error parsing document link:",e,r),""}}).filter(Boolean)}catch(e){return console.error("Unexpected error in getDocIDsFromProps:",e),[]}})(r).slice(0,10),{data:s,error:i,isLoading:l}=(0,m.Ay)(t.length>0?["/api/articles/tilenavigation",t]:null,e=>{let[r,t]=e;return b(r,t)},{revalidateOnFocus:!1,dedupingInterval:6e4});return t.length<1?(0,n.jsx)("div",{}):l?(0,n.jsx)("div",{className:"flex h-40 w-full items-center justify-center",children:(0,n.jsx)("div",{className:"h-12 w-12 animate-spin rounded-full border-4 border-gray-300 border-t-blue-600"})}):!i&&(null==s?void 0:s.data)&&0!==s.data.length?1===s.data.length?(0,n.jsx)("div",{className:"w-4/5 mx-auto",children:(0,n.jsx)(L,{article:s.data[0],isWide:!0})}):(0,n.jsx)("div",{className:"container mx-auto",children:(0,n.jsx)("div",{className:"grid w-4/5 grid-cols-1 gap-8 mx-auto md:grid-cols-2",children:s.data.map((e,r)=>(0,n.jsx)(L,{article:e,isWide:!1},"article-".concat(e.id,"-").concat(r)))})}):(0,n.jsx)("div",{})})}}}}]);
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.