1import{n as e,r as t}from"./rolldown-runtime-B97S5rRB.js";import{c as n,t as r}from"./jsx-runtime-CrmXsIW-.js";import{$ as i,G as a,U as o,W as s,a as c,c as l,i as u,it as d,l as f,n as p,r as m}from"./blogPosts-CNAAtLjR.js";import{a as h,i as g,n as _,r as v,t as y}from"./Form-DeyGDw7M.js";function b({activeCategory:e,onCategoryChange:t,categories:n}){let{t:r}=a(),i=[`all`,...n];return(0,x.jsx)(`div`,{role:`toolbar`,"aria-label":r(`blog.filterLabel`),className:`blog-filter-toolbar flex flex-wrap gap-x-6 gap-y-1 sm:gap-x-8`,children:i.map(n=>{let i=n===e;return(0,x.jsx)(`button`,{type:`button`,onClick:()=>t(n),"aria-pressed":i,className:`blog-filter-button focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-grayscale-accent-blue-500 ${i?`is-active`:``}`,children:r(n===`all`?`blog.allCategories`:`blog.categories.${n}`)},n)})})}var x,S=e((()=>{o(),x=r()}));function C(e){return e.length?e[Math.floor(Math.random()*e.length)]:null}function w(e){let t=[...e];for(let e=t.length-1;e>0;--e){let n=Math.floor(Math.random()*(e+1));[t[e],t[n]]=[t[n],t[e]]}return t}function T(e){let t=e.filter(e=>!j.includes(e.slug));return t.length?t:e}function E(e){return[...e].sort((e,t)=>{let n=j.indexOf(e.slug),r=j.indexOf(t.slug),i=n!==-1,a=r!==-1;return i&&a?n-r:i?-1:+!!a})}function D(){let{language:e,t}=a(),n=d(),[r,i]=(0,O.useState)(`all`),[o]=(0,O.useState)(()=>w(m)),[c,l]=(0,O.useState)(()=>C(T(m))?.slug??null),p=(0,O.useRef)(null);f({enPath:`/projects`,esPath:`/es/proyectos`,seoKey:`blog`}),(0,O.useEffect)(()=>{let n=e===`es`?`/es/proyectos`:`/projects`,r=e===`es`?`/es`:`/`,i=`${M}${n}`,a=m.map((t,n)=>({"@type":`ListItem`,position:n+1,url:`${M}${e===`es`?`/es/proyectos`:`/projects`}/${t.slug}`,name:t[e].title})),o=`blog-feed-structured-data`,s=document.getElementById(o);return s||(s=document.createElement(`script`),s.id=o,s.type=`application/ld+json`,document.head.appendChild(s)),s.textContent=JSON.stringify({"@context":`https://schema.org`,"@graph":[{"@type":`CollectionPage`,"@id":i,url:i,name:t(`seo.blog.title`),description:t(`seo.blog.description`),inLanguage:e===`es`?`es-MX`:`en-US`,isPartOf:{"@id":`${M}/#website`},mainEntity:{"@id":`${i}#projects`}},{"@type":`ItemList`,"@id":`${i}#projects`,name:e===`es`?`Casos de estudio`:`Case studies`,numberOfItems:a.length,itemListElement:a},{"@type":`BreadcrumbList`,"@id":`${i}#breadcrumb`,itemListElement:[{"@type":`ListItem`,position:1,name:`Grayscale Interactive`,item:`${M}${r}`},{"@type":`ListItem`,position:2,name:e===`es`?`Casos de Estudio`:`Case Studies`,item:i}]}]}),()=>s?.remove()},[e,t]);let h=s(n.pathname,`en`);(0,O.useEffect)(()=>{let e=n.hash===`#contact`;e||window.scrollTo({top:0,left:0,behavior:`instant`});let t=window.requestAnimationFrame(()=>{if(e){document.getElementById(`contact`)?.scrollIntoView({behavior:`instant`,block:`start`});return}p.current?.focus({preventScroll:!0})});return()=>window.cancelAnimationFrame(t)},[n.hash,h]);let _=(0,O.useMemo)(()=>{let e=new Set(m.map(e=>e.category));return A.filter(t=>e.has(t))},[]),x=(0,O.useMemo)(()=>r===`all`?o:o.filter(e=>e.category===r),[r,o]),S=x.find(e=>e.slug===c)??x[0]??null,D=E(x.filter(e=>e.slug!==S?.slug));return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`section`,{className:`blog-feed-surface w-full max-w-full overflow-x-clip`,"aria-labelledby":`blog-title`,children:(0,k.jsxs)(`div`,{className:`mx-auto w-full max-w-[1440px] px-6 py-[var(--grayscale-blog-space-page)] md:px-10 lg:px-16 xl:px-20`,children:[(0,k.jsxs)(`header`,{className:`blog-feed-header max-w-[60rem]`,children:[(0,k.jsxs)(`h1`,{id:`blog-title`,ref:p,tabIndex:`-1`,className:`blog-page-title text-balance outline-none`,children:[t(`blog.titleLead`),` `,t(`blog.titleHighlight`)]}),(0,k.jsx)(`p`,{className:`blog-page-lead mt-[var(--grayscale-blog-space-heading)] max-w-[64ch]`,children:t(`blog.subtitle`)})]}),(0,k.jsx)(v,{animation:`fade-up`,viewportMargin:`-8%`,className:`mt-[var(--grayscale-blog-space-filter)]`,children:(0,k.jsx)(b,{activeCategory:r,onCategoryChange:e=>{let t=e===`all`?o:o.filter(t=>t.category===e);i(e),l(C(T(t))?.slug??null)},categories:_})}),(0,k.jsxs)(`div`,{className:`mt-[var(--grayscale-blog-space-featured)]`,children:[S?(0,k.jsx)(v,{animation:`fade-up`,viewportMargin:`-4%`,children:(0,k.jsx)(u,{post:S,variant:`featured`,priority:!0})}):(0,k.jsx)(`p`,{className:`blog-body py-12`,children:t(`blog.noArticles`)}),D.length>0&&(0,k.jsx)(v,{animation:`fade-up`,viewportMargin:`-6%`,staggerChildren:!0,className:`blog-feed-grid mt-[var(--grayscale-blog-space-section)] grid gap-x-10 gap-y-14 md:grid-cols-2 md:gap-y-16`,children:D.map(e=>(0,k.jsx)(g,{children:(0,k.jsx)(u,{post:e})},e.id))})]})]})}),(0,k.jsx)(`div`,{"data-page-theme":`dark`,className:`blog-form-dark-island w-full`,children:(0,k.jsx)(y,{})})]})}var O,k,A,j,M;e((()=>{O=t(n(),1),i(),_(),c(),S(),h(),o(),p(),l(),k=r(),A=[`vr`,`ar`,`3d`,`custom-dev`],j=[`bosch-production-line-vr-training`,`road-2-vr-vehicle-maintenance-onboarding`],M=`https://grayscaleinteractive.com`}))();export{D 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.