1"use strict";(self.webpackChunkgatsby_starter_default=self.webpackChunkgatsby_starter_default||[]).push([[2379],{3647:function(t,e,l){l.r(e);var a=l(2531),n=l(6835),s=l(6540),r=l(347),o=l(6451),u=l(2452),i=l(2078),c=l(3187),g=l(2711),d=l(7923),h=l(2411),v=l(6231),y=l(5268),p=l(6894),f=l.n(p),k=l(7021);const m=t=>{let{setGallery:e,gallery:l,chunked:n,currentPage:r,totalPages:o}=t;const u=(0,v.Ub)({query:"(max-width: 1024px)"}),i=(0,v.Ub)({query:"(min-width: 1025px)"});if(!l)return null;const c={chunked:n,currentPage:r,totalPages:o};return(0,a.Y)(s.Fragment,null,(0,a.Y)(d.hJ,{onClick:()=>(0,y.navigate)("/gallery",{state:c})}),(0,a.Y)(d.bm,{onClick:()=>(0,y.navigate)("/gallery",{state:c})}),(0,a.Y)(d.Ay,{sx:{width:"100%"},scrollToTop:!0,bleed:!0},u&&(0,a.Y)(h.A,{items:l.items,aspectRatio:1}),i&&(0,a.Y)(h.A,{items:l.items,aspectRatio:16/9})))};e.default=t=>{var e,l,d,h;const v=null===(e=t.location)||void 0===e?void 0:e.state,{0:p,1:Y}=(0,s.useState)(),{0:P,1:b}=(0,s.useState)(!0),{0:C,1:x}=(0,s.useState)(v&&v.chunked?v.chunked:[]),{0:A,1:w}=(0,s.useState)(v&&v.currentPage?v.currentPage:0),{0:G,1:S}=(0,s.useState)(v&&v.totalPages?v.totalPages:0),_=null===(l=t.data)||void 0===l||null===(d=l.allDatoCmsGalleryModel)||void 0===d?void 0:d.edges;(0,s.useEffect)((()=>{if(v.chunked&&P)return;const t=(0,g.iv)(_,16);S(t.length),t.length&&x((e=>f()(e,{$push:t[A]})))}),[A,_]),(0,s.useEffect)((()=>{var e;if(null===(e=t.pageContext)||void 0===e||!e.slug)return;const l=null==_?void 0:_.filter((e=>e.node.slug===t.pageContext.slug));if(!l||!l.length)return;const a=l[0].node;Y(a)}),[null===(h=t.pageContext)||void 0===h?void 0:h.slug]);const T={chunked:C,currentPage:A,totalPages:G};return(0,a.Y)(r.A,Object.assign({title:"Gallery"},t),(0,a.Y)(k.A,{title:"Gallery"}),(0,a.Y)(i.Td,{title:"Photo Galleries",variant:"center"}),(0,a.Y)(o.A,null,(0,a.Y)(u.A,null,(0,a.Y)(n.xA,{pt:4,pb:4,columns:(0,g.no)(1,4)},null==C?void 0:C.map(((t,e)=>{var l;const n=t.node,s=n.items[0];return(0,a.Y)(c.S_,{key:n.slug,thumbnail:{url:null===(l=s.image)||void 0===l?void 0:l.url},aspectRatio:1,showOverlay:!0,title:n.title,showOverlay:!0,category:{name:s.tagline,flourish:!0},short:!0,onClick:()=>(0,y.navigate)(n.slug,{state:T})})}))),A<G-1&&(0,a.Y)(n.so,{sx:{justifyContent:"center",paddingTop:6,paddingBottom:6}},(0,a.Y)(n.$n,{variant:"tertiary",onClick:()=>{w(A+1),b(!1)}},"Load More")))),(0,a.Y)(m,{setGallery:Y,gallery:p,chunked:C,currentPage:A,totalPages:G}))}}}]); 2//# sourceMappingURL=component---src-templates-gallery-archive-js-39e6b22b0743f6d3bbd3.js.map
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.