(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[41148],{580760:function(e,t,n){var r=n(989881);e.exports=function(e,t){var n=[];return r(e,function(e,r,o){t(e,r,o)&&n.push(e)}),n}},763105:function(e,t,n){var r=n(234963),o=n(580760),i=n(267206),l=n(701469);e.exports=function(e,t){return(l(e)?r:o)(e,i(t,3))}},435161:function(e,t,n){var r=n(829932),o=n(267206),i=n(269199),l=n(701469);e.exports=function(e,t){return(l(e)?r:i)(e,o(t,3))}},456657:function(){},16141:function(){},259026:function(e,t,n){"use strict";n.d(t,{ri:function(){return m},ck:function(){return O}});var r=n(515826),o=n(667294),i=n(973935),l=n(45697);class u extends Error{constructor(){super(...arguments),this.message=`No valid \`ref\` provided.
You should use \`ref\` from render prop of Item component.
Example:
<Item>{({ ref }) => <div ref={ref}></div>}</Item>
`}}var a=function(e,t){if(!(e instanceof Element)||!(t instanceof Element))throw new u;return e===t?0:2&e.compareDocumentPosition(t)?1:-1},s=function(e){return Object.entries(e).map(([e,t])=>t?`${e}=${t}`:e).join("&")},c=function(e){return e.split("&").reduce((e,t)=>{let[n,r]=t.split("=");return n&&(e[n]=r),e},{})},d=function(e){let t=c(e);return delete t.gid,delete t.pid,s(t)},p=function(){return window.location.hash.substring(1)},f=function(){return`${window.location.pathname}${window.location.search}`},h=e=>{let t=c(e);return!!t.gid&&!!t.pid};let v=o.createContext({remove:()=>{},set:()=>{},handleClick:()=>{},open:()=>{}});class w{constructor(e){this.pswp=e,this.on=e.on.bind(e),this.off=e.off.bind(e),this.dispatch=e.dispatch.bind(e)}}var y=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let b=null,m=({children:e,options:t,plugins:n,uiElements:l,id:u,onBeforeOpen:m,onOpen:g,withCaption:O,withDownloadButton:E})=>{let[x,S]=(0,o.useState)(null),j=(0,o.useRef)(new Map),k=(0,o.useRef)(null),C=(0,o.useCallback)((e,o,c,v)=>{var x;if(b)return;let k=c||null,C=[],$=Array.from(j.current),I=(t,n)=>{let[r,i]=t,{width:l,height:u,original:a,originalSrcset:s,thumbnail:c,cropped:d,content:p,id:f}=i,h=y(i,["width","height","original","originalSrcset","thumbnail","cropped","content","id"]);(e===r||void 0!==f&&String(f)===o)&&(k=n),C.push(Object.assign(Object.assign(Object.assign({w:Number(l),h:Number(u),src:a,srcset:s,msrc:c,element:r.current,thumbCropped:d,content:p},void 0!==p?{type:"html"}:{}),void 0!==f?{pid:f}:{}),h))};j.current.size>1?$.sort(([{current:e}],[{current:t}])=>a(e,t)).forEach(I):$.forEach(I);let P=v&&void 0!==v.clientX&&void 0!==v.clientY?{x:v.clientX,y:v.clientY}:null,A=new r.Z(Object.assign({dataSource:C,index:null!==(x=k)?x:o?parseInt(o,10)-1:0,initialPointerPos:P},t||{}));b=A,A.on("contentActivate",({content:e})=>{e.data.content?S((0,i.createPortal)(e.data.content,e.element)):S(null)}),A.on("close",()=>{S(null)}),E&&A.on("uiRegister",()=>{var e;null===(e=A.ui)||void 0===e||e.registerElement({name:"download-button",ariaLabel:"Download",order:8,isButton:!0,tagName:"a",appendTo:"bar",html:{isCustomSVG:!0,inner:'<path d="M20.5 14.3 17.1 18V10h-2.2v7.9l-3.4-3.6L10 16l6 6.1 6-6.1ZM23 23H9v2h14Z" id="pswp__icn-download"/>',outlineID:"pswp__icn-download"},onInit:(e,t)=>{e.setAttribute("download",""),e.setAttribute("target","_blank"),e.setAttribute("rel","noopener"),A.on("change",()=>{var n;(null===(n=t.currSlide)||void 0===n?void 0:n.data.src)&&(e.href=t.currSlide.data.src)})}})}),O&&A.on("uiRegister",()=>{var e;null===(e=A.ui)||void 0===e||e.registerElement({name:"default-caption",order:9,isButton:!1,appendTo:"root",onInit:(e,t)=>{e.style.position="absolute",e.style.bottom="15px",e.style.left="0",e.style.right="0",e.style.padding="0 20px",e.style.color="var(--pswp-icon-color)",e.style.textAlign="center",e.style.fontSize="14px",e.style.lineHeight="1.5",e.style.textShadow="1px 1px 3px var(--pswp-icon-color-secondary)",A.on("change",()=>{if(!t.currSlide)return;let{caption:n,alt:r}=t.currSlide.data;e.innerHTML=n||r||""})}})}),Array.isArray(l)&&l.forEach(e=>{A.on("uiRegister",()=>{var t;null===(t=A.ui)||void 0===t||t.registerElement(e)})}),"function"==typeof n&&n(new w(A)),"function"==typeof m&&m(A);let T=()=>({gallery:{galleryUID:u}});A.on("beforeOpen",()=>{var e;if(void 0===u)return;if(!h(p())){window.history.pushState(T(),document.title);return}if(null===(e=window.history.state)||void 0===e?void 0:e.gallery)return;let t=f(),n=p(),r=d(n),o=`${t}${r?`#${r}`:""}`,i=`${t}#${n}`;window.history.replaceState(window.history.state,document.title,o),window.history.pushState(T(),document.title,i)}),A.on("change",()=>{var e;if(void 0===u)return;let t=(null===(e=A.currSlide)||void 0===e?void 0:e.data.pid)||A.currIndex+1,n=f(),r=d(p()),o=s({gid:u,pid:t}),i=`${n}#${r}&${o}`;window.history.replaceState(T(),document.title,i)});let _=()=>{void 0!==u&&null!==b&&b.close()};window.addEventListener("popstate",_),A.on("destroy",()=>{void 0!==u&&(window.removeEventListener("popstate",_),h(p())&&window.history.back()),b=null}),A.init(),"function"==typeof g&&g(A)},[t,n,l,u,m,g,O,E]);(0,o.useEffect)(()=>()=>{b&&b.close()},[]);let $=(0,o.useCallback)(()=>{if(void 0===u||null!==b)return;let e=p();if(e.length<5)return;let{pid:t,gid:n}=c(e);if(t&&n){if(0===j.current.size){k.current=t;return}t&&n===String(u)&&C(null,t)}},[C,u]);(0,o.useEffect)(()=>($(),window.addEventListener("popstate",$),()=>{window.removeEventListener("popstate",$)}),[$]);let I=(0,o.useCallback)(e=>{j.current.delete(e)},[]),P=(0,o.useCallback)((e,t)=>{let{id:n}=t;if(j.current.set(e,t),null!==k.current){if(n===k.current){C(e),k.current=null;return}if(!n){let e=parseInt(k.current,10)-1,t=Array.from(j.current.keys())[e];t&&(C(t),k.current=null)}}},[C]),A=(0,o.useCallback)(e=>{C(null,null,e)},[C]),T=(0,o.useMemo)(()=>({remove:I,set:P,handleClick:C,open:A}),[I,P,C,A]);return o.createElement(v.Provider,{value:T},e,x)};m.propTypes={children:l.any,options:l.object,plugins:l.func,uiElements:l.array,id:l.oneOfType([l.string,l.number]),onBeforeOpen:l.func,onOpen:l.func,withCaption:l.bool,withDownloadButton:l.bool};var g=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};let O=e=>{var{children:t}=e,n=g(e,["children"]);let r=(0,o.useRef)(),{remove:i,set:l,handleClick:u}=(0,o.useContext)(v),a=(0,o.useCallback)(e=>u(r,null,null,e),[]);return(0,o.useLayoutEffect)(()=>(l(r,n),()=>i(r)),Object.values(n)),t({ref:r,open:a})};O.propTypes={children:l.func.isRequired,original:l.string,originalSrcset:l.string,thumbnail:l.string,width:l.oneOfType([l.number,l.string]),height:l.oneOfType([l.number,l.string]),alt:l.string,caption:l.string,content:l.element,html:l.string,id:l.oneOfType([l.number,l.string]),cropped:l.bool}}}]);