1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8115],{47630:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/events-guide",function(){return n(52191)}])},49018:function(e,t,n){"use strict";n.d(t,{h:function(){return i}});var s=n(85893),i=(n(67294),function(e){var t=e.struct;return(0,s.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(t)}})})},52191:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return y}});var s=n(10253),i=n(85893),a=n(72102),r=n(70024),c=n(10646),l=n(9008),o=n.n(l),d=n(11163),u=n(67294),v=n(96714),h=n(96144),m=n(70462),f=n(13487),p=n(25303),x=n(57753),j=n(49018),g=n(85784),_=n(94971);var N=function(){var e="https://thespinoff.co.nz/events-guide",t={"@context":"http://schema.org","@type":"WebPage",mainEntityOfPage:{"@type":"WebPage","@id":e},headline:"The Spinoff Events Guide",url:e,publisher:{"@type":"Organization",name:"The Spinoff"}};return(0,i.jsxs)(o(),{children:[(0,i.jsx)("title",{children:"Events Guide | The Spinoff"}),(0,i.jsx)("meta",{property:"fb:pages",content:"585595504882807"}),(0,i.jsx)("meta",{name:"author",content:"The Spinoff"}),(0,i.jsx)("meta",{name:"article name",content:"The Spinoff Events Guide"}),(0,i.jsx)(j.h,{struct:t}),(0,i.jsx)("meta",{property:"og:locale",content:"en_US"}),(0,i.jsx)("meta",{property:"og:site_name",content:"The Spinoff"}),(0,i.jsx)("meta",{property:"og:title",content:"The Spinoff Events Guide"}),(0,i.jsx)("meta",{property:"og:image",content:"https://thespinoff.co.nz/images/events_header.png"}),(0,i.jsx)("meta",{property:"og:url",content:e}),(0,i.jsx)("meta",{property:"og:type",content:"article"}),(0,i.jsx)("meta",{property:"og:description",content:"The Spinoff Events Guide"}),(0,i.jsx)("meta",{property:"article:publisher",content:"https://www.facebook.com/thespinofftv"}),(0,i.jsx)("meta",{name:"twitter:title",content:"The Spinoff Events Guide"}),(0,i.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,i.jsx)("meta",{name:"twitter:site",content:"@TheSpinoffTV"}),(0,i.jsx)("meta",{name:"description",content:"The Spinoff Events Guide"}),(0,i.jsx)("meta",{name:"apple-itunes-app",content:"app-id=1194728952, app-argument=".concat(e)})]})},y=!0;t.default=function(e){var t,n=e.menu,l=e.events,o=e.cities,j=e.initialSelectedCity,y=e.page,w=(0,s.Z)((0,r.KO)(a.Pf),1)[0],b=(0,d.useRouter)(),E=b.asPath,k=b.query,T=(0,u.useState)(j),S=T[0],D=T[1],I=(0,c.Vb)().showEventsGuide,P=(0,s.Z)(u.useState(!1),2),V=P[0],O=P[1];u.useEffect((function(){O(!0)}),[]);var G=(0,v.ZP)((function(e){(0,_.emitAnalyticsPageView)("","",e,"Events",w)}));if((0,u.useEffect)((function(){G("https://thespinoff.co.nz".concat(E))}),[E]),(0,u.useEffect)((function(){var e=k.city&&"string"===typeof k.city?k.city:"all";D(e)}),[k.city]),V&&!1===I)return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p.h,{menu:n}),(0,i.jsx)(h.g,{className:"article misc-page",children:(0,i.jsx)("div",{className:"layout-column-two",children:(0,i.jsx)("div",{className:"spinny-events-wrap wp-based-events",children:(0,i.jsx)("div",{className:"event-page not-found",children:(0,i.jsxs)("div",{className:"article-content",children:[(0,i.jsx)("h1",{children:"Page not found"}),(0,i.jsx)("p",{children:"The page you're looking for doesn't exist or has been removed."})]})})})})}),(0,i.jsx)(f.$,{menu:n})]});var C=function(e){if(S===e&&"all"!==e){D("all"),b.push("/events-guide",void 0,{shallow:!0})}else D(e),"all"===e?b.push("/events-guide",void 0,{shallow:!0}):b.push("/events-guide?city=".concat(e),void 0,{shallow:!0})},A=o.filter((function(e){var t;return null===(t=e.acf)||void 0===t?void 0:t.show_on_gig_guide})).sort((function(e,t){return(e.display_order||0)-(t.display_order||0)})),L=l.filter((function(e){var t;return!0===(null===(t=e.acf)||void 0===t?void 0:t.show_on_gig_guide)})),Z=function(e){if(!e)return!1;try{return new Date(e)<new Date}catch(t){return!1}},z=function(e){if(!e)return"";try{return new Date(e).toLocaleDateString("en-NZ",{weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch(t){return e}},J="all"===S?L:L.filter((function(e){return e.cities.some((function(e){return e.slug===S}
1))})),U=J.filter((function(e){return!Z(e.event_date)})),H=J.filter((function(e){return Z(e.event_date)})),M=U.sort((function(e,t){return e.event_date&&t.event_date?new Date(e.event_date).getTime()-new Date(t.event_date).getTime():0})),R=H.sort((function(e,t){return e.event_date&&t.event_date?new Date(t.event_date).getTime()-new Date(e.event_date).getTime():0}));return(0,i.jsx)(g.ir,{children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(N,{}),(0,i.jsx)(p.h,{menu:n}),(0,i.jsxs)(h.g,{className:"article misc-page",children:[(0,i.jsx)("img",{src:"/images/events-header.png",style:{display:"none"},alt:"The Spinoff Events Guide: Join us in Auckland and Wellington"}),(0,i.jsx)("div",{className:"layout-column-two",children:(0,i.jsxs)("div",{className:"spinny-events-wrap wp-based-events",children:[(0,i.jsxs)("div",{className:"article-content",style:{marginBottom:"20px"},children:[(0,i.jsx)("h1",{children:"Events"}),(0,i.jsx)(m.V,{content:y.content})]}),A.length>0&&(0,i.jsx)("div",{className:"city-filter-tabs",children:(0,i.jsxs)("div",{className:"tab-container",children:[(0,i.jsx)("button",{onClick:function(){return C("all")},className:"tab-button ".concat("all"===S?"active":""),children:"All Cities"}),A.map((function(e){return(0,i.jsx)("button",{onClick:function(){return C(e.slug)},className:"tab-button ".concat(S===e.slug?"active":""),title:"View all events in ".concat(e.name," or visit /events/city/").concat(e.slug),children:e.name},e.id)}))]})}),(M.length>0||R.length>0)&&(0,i.jsxs)("div",{className:"events-list",children:[M.map((function(e){return(0,i.jsxs)("div",{className:"event-item",children:[(0,i.jsxs)("div",{className:"event-grid",children:[(0,i.jsxs)("div",{className:"event-content",children:[(0,i.jsx)("h2",{className:"event-title",children:(0,i.jsx)("a",{href:"/events/".concat(e.slug),children:e.title})}),(0,i.jsxs)("div",{className:"event-meta",children:[e.event_date&&(0,i.jsx)("a",{href:e.event_link,className:"event-date",children:z(e.event_date)}),e.event_location&&(0,i.jsx)("div",{className:"event-location",children:e.event_location_website?(0,i.jsx)("span",{className:"event-website-link",children:(0,i.jsx)("a",{href:e.event_location_website,target:"_blank",rel:"noopener noreferrer",className:"website-link",children:e.event_location})}):(0,i.jsx)("span",{className:"event-location-link",children:e.event_location})})]}),e.excerpt&&(0,i.jsx)("div",{className:"event-excerpt",children:e.excerpt}),e.content&&e.content.length>0&&(0,i.jsx)("div",{className:"event-content-body",children:(0,i.jsx)(m.V,{content:e.content})})]}),e.feature_image&&(0,i.jsxs)("div",{className:"event-image",children:[(0,i.jsx)(x.JM,{src:e.feature_image.source,alt:e.feature_image.alt||e.title,priorityImage:!0}),(0,i.jsx)("span",{className:"event-star"})]})]}),(0,i.jsx)("div",{className:"event-button-row",children:e.sold_out?(0,i.jsx)("div",{className:"sold-out-button",children:"SOLD OUT"}):e.event_link?(0,i.jsx)("a",{href:e.event_link,target:"_blank",rel:"noopener noreferrer",className:"buy-tickets-button",children:"BUY TICKETS"}):null})]},e.id)})),R.map((function(e){return(0,i.jsxs)("div",{className:"event-item event-ended",children:[(0,i.jsxs)("div",{className:"event-grid",children:[(0,i.jsxs)("div",{className:"event-content",children:[(0,i.jsx)("h2",{className:"event-title",children:(0,i.jsx)("a",{href:"/events/".concat(e.slug),children:e.title})}),(0,i.jsxs)("div",{className:"event-meta",children:[e.event_date&&(0,i.jsx)("a",{href:e.event_link,className:"event-date",children:z(e.event_date)}),e.event_location&&(0,i.jsxs)("div",{className:"event-location",children:[e.event_location,e.event_location_address&&e.event_map_link&&(0,i.jsxs)("span",{className:"event-map-link",children:[" \u2022 ",(0,i.jsx)("a",{href:e.event_map_link,target:"_blank",rel:"noopener noreferrer",className:"map-link",children:e.event_location_address})]}),e.event_location_website&&(0,i.jsxs)("span",{className:"event-website-link",children:[" \u2022 ",(0,i.jsx)("a",{href:e.event_location_website,target:"_blank",rel:"noopener noreferrer",className:"website-link",children:"Venue website"})]})]})]}),e.excerpt&&(0,i.jsx)("div",{className:"event-excerpt",children:e.excerpt}),e.content&&e.content.length>0&&(0,i.jsx)("div",{className:"event-content-body",children:(0,i.jsx)(m.V,{content:e.content})})]}),e.feature_image&&(0,i.jsxs)("div",{className:"event-image",children:[(0,i.jsx)(x.JM,{src:e.feature_image.source,alt:e.feature_image.alt||e.title,priorityImage:!0}),(0,i.jsx)("span",{className:"event-star"})]})]}),(0,i.jsx)("div",{className:"event-button-row",children:(0,i.jsx)("div",{className:"event-ended-button",children:"THIS EVENT HAS ENDED"})})]},e.id)}))]}),0===M.length&&0===R.length&&(0,i.jsxs)("div",{className:"no-events",children:[(0,i.jsx)("h3",{children:"No events found"}),(0,i.jsxs)("p",{children:["There are currently no events scheduled for ","all"===S?"any city":null===(t=A.find((function(e){return e.slug===S}
1)))||void 0===t?void 0:t.name,"."]})]})]})})]}),(0,i.jsx)(f.$,{menu:n})]})})}},96714:function(e,t,n){"use strict";var s=n(67294),i="undefined"!==typeof window?null!==s.useInsertionEffect&&void 0!==s.useInsertionEffect?s.useInsertionEffect:s.useLayoutEffect:function(){};function a(e){var t=(0,s.useRef)(r);i((function(){t.current=e}),[e]);var n=(0,s.useRef)(null);return n.current||(n.current=function(){return t.current.apply(this,arguments)}),n.current}function r(){throw new Error("INVALID_USEEVENT_INVOCATION: the callback from useEvent cannot be invoked before the component has mounted.")}t.ZP=a}},function(e){e.O(0,[3662,5443,8045,5675,8100,5781,2454,7745,535,3058,430,8788,9655,9799,3533,8330,9901,4656,3885,2712,462,9774,2888,179],(function(){return t=47630,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
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.