1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[721],{3296:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/timetable",function(){return r(3774)}])},653:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(6540);function i(e,t,r){void 0===t&&(t=0),void 0===r&&(r=[]);var i,l,s,a,c,d,o,u=(void 0===(i=t)&&(i=0),l=(0,n.useRef)(!1),s=(0,n.useRef)(),a=(0,n.useRef)(e),c=(0,n.useCallback)(function(){return l.current},[]),d=(0,n.useCallback)(function(){l.current=!1,s.current&&clearTimeout(s.current),s.current=setTimeout(function(){l.current=!0,a.current()},i)},[i]),o=(0,n.useCallback)(function(){l.current=null,s.current&&clearTimeout(s.current)},[]),(0,n.useEffect)(function(){a.current=e},[e]),(0,n.useEffect)(function(){return d(),o},[i]),[c,o,d]),f=u[0],x=u[1],v=u[2];return(0,n.useEffect)(v,r),[f,x]}},2655:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(6540);let i=function(e){(0,n.useEffect)(e,[])},l=function(e){var t=(0,n.useRef)(e);t.current=e,i(function(){return function(){return t.current()}})},s=function(e){var t=(0,n.useRef)(0),r=(0,n.useState)(e),i=r[0],s=r[1],a=(0,n.useCallback)(function(e){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){s(e)})},[]);return l(function(){cancelAnimationFrame(t.current)}),[i,a]},a=function(){var e=s(function(){return{x:window.pageXOffset,y:window.pageYOffset}}),t=e[0],r=e[1];return(0,n.useEffect)(function(){var e=function(){r(function(e){var t=window.pageXOffset,r=window.pageYOffset;return e.x!==t||e.y!==r?{x:t,y:r}:e})};return e(),function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];e&&e.addEventListener&&e.addEventListener.apply(e,t)}(window,"scroll",e,{capture:!1,passive:!0}),function(){!function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}(window,"scroll",e)}},[]),t}},6037:(e,t,r)=>{"use strict";r.d(t,{_:()=>o,b:()=>d});var n=r(4848),i=r(5647),l=r(4164),s=r(2831),a=r(1724);let c=e=>fetch(e).then(e=>e.json()),d=()=>{let e=(0,i.FT)(window.location.hostname),{data:t,isLoading:r}=(0,s.Ay)("".concat("https://api.instazione.shop/frontend","/stations/").concat(e,"/timetable"),c,{refreshInterval:1e4});return r?null:(0,n.jsxs)("div",{className:"bg-primary text-white flex flex-col gap-3 pt-4",children:[(0,n.jsxs)("div",{className:"flex flex-col xl:flex-row justify-between gap-4 lg:gap-8 container pb-4",children:[(0,n.jsx)(o,{title:"Partenze",data:null==t?void 0:t.timetable.departures.slice(0,3),hideHeader:!0,inHome:!0,className:"border-separate"}),(0,n.jsx)(o,{title:"Arrivi",data:null==t?void 0:t.timetable.arrivals.slice(0,3),hideHeader:!0,inHome:!0,className:"border-separate"})]}),(0,n.jsx)(a.J,{href:"/timetable",children:"Vedi tutti i treni"})]})},o=e=>{let{title:t,data:r,hideHeader:i=!1,className:s,inHome:a=!1}=e,c={train:"w-[80px] lg:w-[140px] overflow-hidden text-ellipsis",stop:"flex-grow flex-basis-0 w-0",departure:"w-[60px] lg:w-[100px]",delay:"w-[60px] lg:w-[100px]",binary:"w-[50px] lg:w-[100px]"},d="py-2 overflow-hidden text-ellipsis px-1",o=a?"border-b-white/10":"border-b-gray-200";return(0,n.jsxs)("div",{className:"flex flex-col items-center w-full",children:[t&&(0,n.jsx)("div",{className:"text-xl font-semibold text-center py-2 border-b-4 border-white w-full",children:t}),(0,n.jsxs)("div",{className:(0,l.A)("text-sm sm:text-base mb lg:text-lg py-4 w-full",s),children:[(0,n.jsxs)("div",{className:(0,l.A)(o,i&&"hidden","text-gray-500 flex font-bold mb-2 pb-2 border-b-[1px]"),children:[(0,n.jsx)("div",{className:(0,l.A)(c.train),children:"Treno"}),(0,n.jsx)("div",{className:(0,l.A)(c.stop),children:"Destinazione"}),(0,n.jsx)("div",{className:(0,l.A)(c.departure,"text-center"),children:"Orari"}),(0,n.jsx)("div",{className:(0,l.A)(c.delay,"text-center"),children:"Ritardo"}),(0,n.jsx)("div",{className:(0,l.A)(c.binary,"text-center"),children:"Binario"})]}),(0,n.jsx)("div",{children:null==r?void 0:r.map((e,t)=>(0,n.jsxs)("div",{className:(0,l.A)(o,"border-b-[1px] flex"),children:[(0,n.jsx)("div",{className:(0,l.A)(d,c.train),children:e.train_code}),(0,n.jsx)("div",{className:(0,l.A)(d,c.stop,"font-bold"),children:e.city}),(0,n.jsx)("div",{className:(0,l.A)(d,c.departure,"text-center font-bold"),children:e.time}),(0,n.jsx)("div",{className:(0,l.A)(d,c.delay,"text-center italic"),children:e.delay?"('".concat(e.delay,")"):""}),(0,n.jsx)("div",{className:(0,l.A)(d,c.binary,"text-center font-bold"),children:e.platform})]},t))})]})]})}},1724:(e,t,r)=>{"use strict";r.d(t,{J:()=>u});var n=r(4848),i=r(7307);let l=e=>(0,n.jsxs)("svg",{fill:"none",height:"32",viewBox:"0 0 90 32",width:"90",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,n.jsxs)("linearGradient",{id:"a",gradientUnits:"userSpaceOnUse",x1:"1",x2:"1",y1:"14.4727",y2:"14.4922",children:[(0,n.jsx)("stop",{offset:"0",stopColor:"transparent"}),(0,n.jsx)("stop",{offset:"1",stopColor:"#fff"})]}),(0,n.jsx)("path",{d:"m45 30.9562c-6.4432 0-10.9018-1.0527-14.3486-2.6118-3.4515-1.5612-5.9195-3.6426-8.3877-5.7672-.0776-.0668-.1553-.1337-.233-.2006-2.3854-2.0546-4.8062-4.1397-8.1042-5.7153-3.3216-1.5869-7.50588-2.6464-13.4265-2.7027v-12.50255h89v12.50235c-5.9206.0564-10.1049 1.1159-13.4265 2.7028-3.298 1.5756-5.7188 3.6607-8.1042 5.7153-.0777.0669-.1553.1338-.233.2007-2.4682 2.1246-4.9362 4.2059-8.3877 5.7672-3.4468 1.5591-7.9054 2.6118-14.3486 2.6118z",fill:"
1currentColor",stroke:"url(#a)"})]});var s=r(4164),a=r(1106),c=r.n(a);let d={blue:"bg-primary text-white",white:"bg-white"},o={blue:"text-primary",white:"text-white"},u=e=>{let{className:t,version:r="blue",...a}=e,u=d[r],f=o[r];return(0,n.jsxs)("div",{className:(0,s.A)("self-center flex flex-col items-center w-full px-4 relative border-b border-white",u,t),children:[(0,n.jsxs)(c(),{className:"flex flex-col items-center justify-center font-medium gap-1",href:a.href,children:[a.children,(0,n.jsx)(i.v,{width:20,height:20,className:"z-10"})]}),(0,n.jsx)(l,{className:(0,s.A)("absolute -bottom-[18px] left-1/2 -translate-x-1/2",f)})]})}},3774:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>x});var n=r(4848),i=r(6037),l=r(4634),s=r(6810),a=r(911),c=r(5647),d=r(4164),o=r(6540),u=r(2831);let f=e=>fetch(e).then(e=>e.json());function x(){var e,t,r,d;let x=(0,c.FT)(window.location.hostname),{data:m,isLoading:h}=(0,u.Ay)("".concat("https://api.instazione.shop/frontend","/stations/").concat(x,"/timetable"),f,{refreshInterval:1e4}),p=null!==(r=null==m?void 0:null===(e=m.timetable)||void 0===e?void 0:e.arrivals)&&void 0!==r?r:[],w=null!==(d=null==m?void 0:null===(t=m.timetable)||void 0===t?void 0:t.departures)&&void 0!==d?d:[],[b,j]=(0,o.useState)("departures");return!x||h?null:(0,n.jsxs)(a.YS,{data:m,children:[(0,n.jsx)(s.G$,{station:null==m?void 0:m.station,data:{meta_title:"Orari partenze e arrivi"}}),(0,n.jsx)(l.F,{station:null==m?void 0:m.station,version:"detail"}),(0,n.jsx)("div",{className:"flex justify-center my-auto",children:(0,n.jsxs)("div",{className:"w-full md:w-4/5 px-6 md:px-0 h-full mb-20",children:[(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)(v,{active:"departures"===b,onClick:()=>j("departures"),children:"Partenze"}),(0,n.jsx)(v,{active:"arrivals"===b,onClick:()=>j("arrivals"),children:"Arrivi"})]}),(0,n.jsx)("div",{className:"w-full pt-8",children:(0,n.jsx)(i._,{data:"arrivals"===b?p:w,className:"w-full"})})]})})]})}let v=e=>{let{active:t,onClick:r,...i}=e;return(0,n.jsx)("div",{className:(0,d.A)("w-full md:py-4 px-6 text-xl md:text-3xl font-medium text-center",t?"border-b-4 border-primary":"border-b text-gray-500"),onClick:r,children:i.children})}},5647:(e,t,r)=>{"use strict";r.d(t,{FT:()=>n});let n=e=>{if(e)return e.includes(".staging.gsr.dieffetech.it")?e.replace(".staging.gsr.dieffetech.it",""):e}}},e=>{var t=t=>e(e.s=t);e.O(0,[219,149,831,742,634,636,593,792],()=>t(3296)),_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.