PageSourceSearch

https://culturenow.org/_next/static/chunks/pages/collections/in_this_year/preview/[image]-3272b6266ec46114.js

js culturenow.org collected 2026-10-02 07:42:24 UTC 7,340 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4045],{90800:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/collections/in_this_year/preview/[image]",function(){return t(17546)}])},17546:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSP:function(){return Z}});var i=t(34051),r=t.n(i),o=t(85893),l=t(67294),a=t(41248),u=t(11163),d=(t(9669),t(96486)),s=t(5152),c=t(95326),v=t(95068),f=t(73938),m=t(61711),h=t(19882),p=t(79173),y=t(5374),_=t(30381),g=t.n(_),w=t(51610),b=t(92642);function j(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t<n;t++)i[t]=e[t];return i}function x(e,n,t,i,r,o,l){try{var a=e[o](l),u=a.value}catch(d){return void t(d)}a.done?n(u):Promise.resolve(u).then(i,r)}function S(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var i,r,o=[],l=!0,a=!1;try{for(t=t.call(e);!(l=(i=t.next()).done)&&(o.push(i.value),!n||o.length!==n);l=!0);}catch(u){a=!0,r=u}finally{try{l||null==t.return||t.return()}finally{if(a)throw r}}return o}}(e,n)||k(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(e){return function(e){if(Array.isArray(e))return j(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||k(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,n){if(e){if("string"===typeof e)return j(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?j(e,n):void 0}}var E=(0,s.default)((function(){return Promise.all([t.e(8318),t.e(1060)]).then(t.bind(t,71060))}),{loadableGenerated:{webpack:function(){return[71060]}},ssr:!1}),A=(0,s.default)((function(){return t.e(6476).then(t.bind(t,46476))}),{loadableGenerated:{webpack:function(){return[46476]}},ssr:!1}),I=(0,s.default)((function(){return t.e(4177).then(t.bind(t,14177))}),{loadableGenerated:{webpack:function(){return[14177]}},ssr:!1});var Z=!0;n.default=function(e){var n=e.imageId,t=e.date,i=(0,l.useState)(!0),s=i[0],_=i[1],j=(0,l.useState)(!1),k=j[0],Z=j[1],P=(0,l.useState)(!1),C=P[0],F=P[1],Y=(0,a.I0)(),O=(0,u.useRouter)(),z=(0,a.v9)((function(e){return e.image})),T=(0,b.r)();(0,l.useEffect)((function(){var e;(e=r().mark((function e(){var n,i,o;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={query:{bool:{must:[{term:{year:new Date(t).getFullYear()}},{term:{entity_live:!0}},{term:{live:!0}}]}}},e.next=4,(0,c.performElasticSearch)("on_this_day_v2","",1e3,n);case 4:i=e.sent,o=["site","person","tour","map"],i.hits=i.hits.filter((function(e){return o.includes(e.entity)})),F({name:"".concat(g()(t).format("YYYY")," - In this Year"),images:i.hits});case 8:case"end":return e.stop()}}),e)})),function(){var n=this,t=arguments;return new Promise((function(i,r){var o=e.apply(n,t);function l(e){x(o,i,r,l,a,"next",e)}function a(e){x(o,i,r,l,a,"throw",e)}l(void 0)}))})()}),[]),(0,l.useEffect)((function(){if(z){var e=(0,w.Zq)(z);if(!e)return;if(T(z,O.asPath))return;if((0,w.FS)(e,O.asPath))return;O.push({pathname:"/collections/in_this_year/preview/".concat(e,"?date=").concat(t),hash:"#".concat(e)},void 0,{shallow:!0})}}),[z]),(0,l.useEffect)((function(){C&&Y({type:"entity",payload:C});var e=B("slider");if((null===e||void 0===e?void 0:e.length)>0){var t=window.location.hash.slice(1),i=(0,w.tA)(e,n,t),r=e[i=i>=0?i:0];if(!r||(0,w.Qk)(z,r))return;Y({type:"image",payload:r})}}),[C,n,z]);var B=function(e){var n,t,i=[],r=null===C||void 0===C||null===(n=C.images)||void 0===n?void 0:n.filter((function(e){return(null===e||void 0===e?void 0:e.year)&&((null===e||void 0===e?void 0:e.new_image_url)||(null===e||void 0===e?void 0:e.image_url))})).map((function(e){return{id:e.image_id,url:(null===e||void 0===e?void 0:e.new_image_url)||(null===e||void 0===e?void 0:e.image_url),date:(null===e||void 0===e?void 0:e.year)||null,type:e.type||((null===e||void 0===e?void 0:e.new_image_url)||(null===e||void 0===e?void 0:e.image_url)).endsWith(".pdf")?"document":"image"}}));return r=N(r||[]).concat(N((null===C||void 0===C||null===(t=C.images)||void 0===t?void 0:t.filter((function(e){return null===(null===e||void 0===e?void 0:e.year)&&e.image_url})).map((function(e){return{id:e.image_id,url:(null===e||void 0===e?void 0:e.new_image_url)||(null===e||void 0===e?void 0:e.image_url),date:(null===e||void 0===e?void 0:e.year)||null,type:e.type||((null===e||void 0===e?void 0:e.new_image_url)||(null===e||void 0===e?void 0:e.image_url)).endsWith(".pdf")?"document":"image"}}
1)))||[])),Object.entries((0,d.groupBy)(r,"date")).forEach((function(e){var n=S(e,2),t=n[0],r=n[1];i.push({title:t,items:r})})),i=i.filter((function(e){var n;return(null===(n=e.items)||void 0===n?void 0:n.length)>0})),"timeline"===e?i:i.map((function(e){return null===e||void 0===e?void 0:e.items})).flat()};return(0,o.jsx)(o.Fragment,{children:k?(0,o.jsxs)(o.Fragment,{children:["2"===k?(0,o.jsx)(y.Z,{src:"then_now"===(null===z||void 0===z?void 0:z.type)?null===z||void 0===z?void 0:z.url.replace("original","web@4x"):null===z||void 0===z?void 0:z.url}):(0,o.jsxs)(o.Fragment,{children:[("image"===(null===z||void 0===z?void 0:z.type)||"document"==(null===z||void 0===z?void 0:z.type))&&(0,o.jsx)(I,{src:null===z||void 0===z?void 0:z.url}),"dzi"===(null===z||void 0===z?void 0:z.type)&&(0,o.jsx)(E,{image:z,id:"imgId-".concat(null===z||void 0===z?void 0:z.id)}),"then_now"===(null===z||void 0===z?void 0:z.type)&&(0,o.jsx)("div",{className:"then-now-container-center",children:(0,o.jsx)(A,{id:null===z||void 0===z?void 0:z.id})})]}),(0,o.jsxs)("div",{className:"zoomCloseButton",children:["then_now"!==(null===z||void 0===z?void 0:z.type)&&(0,o.jsx)("span",{className:"me-1",children:"2"===k?(0,o.jsx)(v.Z,{size:"sm",icon:"full_screen",classes:"action-button",onClick:function(){Z("1")}}):null}),(0,o.jsx)(v.Z,{size:"sm",icon:"close",classes:"action-button",onClick:function(){Z(!1)}})]})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:"img-preview",children:[(0,o.jsx)("div",{className:"img-preview-title",children:C.name}),(0,o.jsx)("div",{className:"img-preview-timeline print_hidden",children:(0,o.jsx)(f.Z,{data:function(){return B("timeline")}})}),(0,o.jsx)("div",{children:(0,o.jsx)(m.Z,{data:function(){return B("slider")},isLabel:s,handleZoom:function(){"image"===(null===z||void 0===z?void 0:z.type)||"document"==(null===z||void 0===z?void 0:z.type)?Z("2"):Z("1")}})}),(0,o.jsx)("div",{className:"img-preview-actions print_hidden",children:(0,o.jsx)(h.Z,{goBack:function(){return O.push("/collections/in_this_year?date=".concat(t))},data:function(){return B("slider")},isLabel:s,setIsLabel:_})})]}),(0,o.jsx)(p.Z,{useRemark:!0,imageData:C.images,id:C.id,type:"thenNow",data:function(){return B("slider")}})]})})}}},function(e){e.O(0,[6737,8279,2433,7934,717,1964,5368,7009,6576,8413,1193,9774,2888,179],(function(){return n=90800,e(e.s=n);var n}));var n=e.O();_N_E=n}]);

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.