if(void 0===window.reelfy||null===document.getElementById("reelfy-loaded")){try{window.reelfy=!0,["reelfy-loaded","rf-toast-container"].forEach((t=>{document.body?.appendChild(Object.assign(document.createElement("div"),{id:t,style:"display:none;"}))}));const a=Object.assign(document.createElement("div"),{id:"rf-mobile-product",innerHTML:'
'});document.body?.appendChild(a),a.querySelector(".rf-mext-mask")?.addEventListener("click",(()=>{a.classList.remove("active")})),window.console&&window.console.log&&console.log("%c This store is Powered by Reelfy","background:#000;color: #dcf3fb","Visit https://apps.shopify.com/reelfy/ for more info")}catch(l){console.error(l)}var rfBaseUrl="https://app.reelfy.app/";["lf-discount.myshopify.com","test072025.myshopify.com"].includes(Shopify.shop)&&(rfBaseUrl="https://reelfy--development.gadget.app/");var rfCustom=!1,ipInfo=null,rfUtils={body:document.getElementsByTagName("body")[0],placeholder:"https://cdn.shopify.com/s/files/1/0826/6983/0455/files/placeholder.jpg",placeholderW:612,baseUrl:rfBaseUrl,locale:Shopify.locale||window.rfIsoCode,country:Shopify.country||"",cartAdd:window.routes&&window.routes.cart_add_url?window.routes.cart_add_url:window.rfCartAdd,shopUrl:window.rfShopUrl||Shopify.shop,productClass:"rf-button rf-button-primary rf-button-atc",infoSvg:'',closeSvg:'',loading:'
',errorSvg:'',playIcons:{youtube:'',outline:'',square:'',solid:'',simple:''},productVariants:'
',productForm:'
',productBody:function(){return`\n
\n
\n \n
\n
\n

\n
\n
\n
\n
`},escapeHtmlAttr:t=>String(t).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">"),productDesc:t=>"hidden"!==t?`
`:"",documentEvent:function(t,e={}){document.dispatchEvent(new CustomEvent(t,{detail:e}))},videoPlayer:'\n
\n
\n \n
\n
\n
\n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n ',popup_header:(t,e)=>`
\n
${t}
\n
\n \n \n \n \n \n ${e}\n \n
\n
`,stringToDate:t=>{const e={"15mins":9e5,"30mins":18e5,"1hour":36e5,"2hours":72e5,"6hours":216e5,"1day":864e5,"3days":2592e5};return e[t]?e[t]:0},createDomEl:(t="div",e="",i="",s={},n={})=>{const r=document.createElement(t);e.trim()&&r.classList.add(...e.trim().split(/\s+/)),r.innerHTML=i;for(const[t,e]of Object.entries(s))r.setAttribute(t,e);for(const[t,e]of Object.entries(n))t.startsWith("--")?r.style.setProperty(t,e):r.style[t]=e;return r},mobileCheck:function(){return window.innerWidth<768||screen.width<768},rfDebounce:function(t){var e;return function(i){e&&clearTimeout(e),e=setTimeout(t,100,i)}},getId:function(t){return`#${t.split("#")[1]||""}`},showToast:function(t,e="success"){const i=document.getElementById("rf-toast-container"),s=document.createElement("div");s.className="rf-toast rf-toast"+e,s.textContent=t,i.appendChild(s),i.style.display="block",setTimeout((()=>{s.remove(),i.style.display="none"}),3e3)},add_custom_css:function(t){if(t.length){var e=document.createElement("style");e.innerHTML=t,document.head.appendChild(e)}},add_custom_js:function(t){if(t.length){var e=document.createElement("script");e.type="text/javascript",e.innerHTML=t,document.head.appendChild(e)}},select:function(t){return document.querySelector(t)},selectAll:function(t){return document.querySelectorAll(t)},themeDetector:function(){const t=function(){return window.BOOMR&&window.BOOMR.themeId&&window.BOOMR.themeName&&window.BOOMR.themeVersion},e={themeName:t()?window.BOOMR.themeName:window.Shopify&&window.Shopify.theme&&window.Shopify.theme.id&&window.Shopify.theme.name?window.Shopify.theme.schema_name||window.Shopify.theme.name:"Unknown",themeVersion:t()?window.BOOMR.themeVersion:window.Shopify?.theme?.schema_version||"0.0.0"},i=e.themeName.toLowerCase();return["crave","sense","craft","taste","studio","trade","ride","colorblock","refresh","publisher","spotlight","generated data theme","theme fullstack","madrid"].includes(i)?e.themeName="dawn":["savor","vessel","atelier","heritage"].includes(i)?e.themeName="horizon":["megamog","minimog - os 2.0","minimog - 0s 2.0"].includes(i)?e.themeName="minimog":"palo alto"===i?e.themeName="paloalto":["kalles","unsen","gecko"].includes(i)?e.themeName="the4":e.themeName=i.replace(/\s/g,""),window.lfThemeName?(e.themeName=window.lfThemeName,window.lfThemeName):window.rfThemeName?(e.themeName=window.rfThemeName,window.rfThemeName):e},render_ratio:function(t){switch(t){case"landscape":return"75%";case"portrait":return"125%";default:return"100%"}},isMultiLang:function(){return window.rfLanguages&&window.rfLanguages.length?1!=window.rfLanguages.length:document.querySelector("link[hreflang]")},getClientIP:async()=>{try{const t=await fetch("https://api.country.is/"),e=await t.json(),i=document.body;i.dataset.rfip=e.ip||"",i.dataset.rfcountry=e.country||""}catch(t){console.error("Error fetching IP::",t)}},getClientInfo:()=>{const t=navigator.userAgent,e=window.innerWidth,i=document.body;let s="desktop";return/Mobi|Android/i.test(t)?s="mobile":e<1024&&(s="tablet"),{ip:i.dataset.rfip,country:i.dataset.rfcountry,url:window.location.href,referrer:document.referrer||null,userAgent:t,language:navigator.language,screen:`${window.screen.width}x${window.screen.height}`,deviceType:s,platform:navigator.platform}},getCurrentLange:function(t,e){const i={products_seen:"Products Seen in the video",shop_now:"Shop Now",description:"Description",add_to_cart:"Add to Cart",sold_out:"Sold Out",added_to_cart:"Added to cart successfully!",back:"Back"};var s="";return window.rfShopLang&&(s=window.rfShopLang[t],e||(e=window.rfIsoCode),e&&window.rfShopTrans&&window.rfShopTrans[e]&&window.rfShopTrans[e][t]&&""!=window.rfShopTrans[e][t]&&(s=window.rfShopTrans[e][t])),s||(s=i[t]),s},sendPixel:(t,e)=>{if(window.Shopify.analytics)Shopify.analytics.publish(t,e);else{var i=0;let s=setInterval((function(){window.Shopify.analytics&&(Shopify.analytics.publish(t,e),clearInterval(s)),++i>200&&clearInterval(s)}),100)}},isAdmin:()=>window.Shopify.designMode,rfErrorPlaceholder:(t,e)=>{const i=rfUtils.createDomEl("div","reelfy-gallery-placeholder",``);t.appendChild(i)},isMainLang:function(){return 2===Shopify.routes.root.split("/").length},getLinkLang:function(t,e="products"){if(t=`${e}/${t}`,Shopify.routes&&Shopify.routes.root)t=`${Shopify.routes.root}${t}`;else if(this.isMultiLang()&&rfLanguages){const e=rfLanguages.find((t=>t.shop_locale.locale===this.locale));e&&!e.shop_locale.primary&&(t=`${t}`)}return t},get_carousel:function(t){return t?.autoplay&&(t.autoPlay=t.speed,delete t.autoplay),t},getSizedImageUrl:function(t,e){if(null===e||null===t||""==t||void 0===t)return t;var i=t.match(/\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif|webp)(\?v=\d+)?$/i);if(null!==i){var s=t.split(i[0]),n=i[0];return s[0]+"_"+e+n}return t},is_column:t=>["carousel","stacked","row"].includes(t),is_masonry:t=>["masonry","grid"].includes(t),is_carousel:t=>["carousel","stacked"].includes(t),cart_formData:function(t){var e=null;if("dawn"==t){const t=document.querySelector("cart-notification, cart-drawer");t&&(e=t.getSectionsToRender().map((t=>t.id)))}else if("the4"==t)e="cart_data,mini_cart";else if("minimog"==t)e="cart-drawer";else if("xtra"==t)e="side-cart";else if("impact"==t){const t=document.getElementById("cart-drawer"),i=t?.closest(".shopify-section")?.id?.replace("shopify-section-","");e=i?`variant-added,${i}`:""}else if("woodstock"==t)e=document.querySelector("cart-drawer")?.getSectionsToRender().map((t=>t.id)).join(",");else if("symmetry"==t)e=["page-header","cart-drawer"].map((t=>document.querySelector(t))).filter((t=>t)).map((t=>t.dataset.sectionId)).join(",");else if("hongo"==t&&cart)e=cart.getSectionsToRender().map((t=>t.id)).join(",");else if("focal"==t)e="mini-cart";else if("sahara"==t)e=sectionsToRender.map((t=>t.section));else if("horizon"==t)e=[...document.querySelectorAll("cart-items-component")].map((t=>t.dataset.sectionId)).filter(Boolean).join(",");else if("concept"==t||"sleek"==t)e=document.querySelector("cart-drawer").dataset.sectionId;else if("beyours"==t)e="mini-cart,cart-icon-bubble,mobile-cart-icon-bubble";else if("tinker"==t){const t=document.querySelectorAll("cart-items-component");let i=[];t.forEach((t=>{t instanceof HTMLElement&&t.dataset.sectionId&&i.push(t.dataset.sectionId)})),e=i.join(",")}else window.rfformData&&(e=window.rfformData);return window.rfformDataOverride&&(e=window.rfformDataOverride),e},render_grid:(t,e,i,s,n="row",r="simple")=>{const o={video:t.popup_video_url,poster:t.thumbnail,id:t.id,"pswp-type":"reelfy"},a=Object.entries(o).map((([t,e])=>`data-${t}="${e}"`)).join(" ");let l="";if("image"!=s&&"hover"!=s||(l+=`
${rfUtils.playIcons[r]}
`),("image"==s||t.is_image)&&(l+=``),!t.is_image&&("autoplay"==s||"hover"==s)){l+=``}"simple"==i&&(l+=`
${t.duration}
`),"title"==i&&(l+=`
${t.title}
`);let h="";if(t.products){const e=t.products[0];h=e?`
\n
${e.title}
\n
--
\n
`:""}"overlay_product"==i&&h&&(l+=h);const d="product_card"==i?h:"";return`\n
\n ${t.title}\n
${l}
${d}
\n
\n `},render_story:(t,e,i,s="image")=>{const n={video:t.popup_video_url,poster:t.thumbnail,id:t.id,"pswp-type":"reelfy"},r=Object.entries(n).map((([t,e])=>`data-${t}="${e}"`)).join(" "),o="show"==i.show_title?`

${t.title}

`:"";let a="";if("image"==s)a=`${t.title}`;else if("autoplay"==s||"hover"==s){a=``}return`\n
\n
\n ${a}\n
\n ${o}\n
\n `},render_pop:(t,e)=>{const i={video:t.popup_video_url,section:t.section_video_url,poster:t.thumbnail,id:t.id,"pswp-type":"reelfy"};return`\n
\n `data-${t}="${e}"`)).join(" ")} aria-label="Open lightbox video">\n ${t.title}\n \n
\n `},render_space:function(t){return{collapse:[0,0],xsmall:[2,4],small:[4,8],large:[12,24],xlarge:[20,40],"2xlarge":[30,60]}[t]||[8,16]},render_price:function(t,i="compare"){if(t){var s=t;if(t&&t.variants&&t.variants.length>0){s=t.variants[0];t.variants.map(((t,e)=>{!s&&t.available}))}var n=s.compare_at_price,r=s.price||0,o=s.available||!1,a=e(r),l=["rf-price"];o||l.push("rf-price--sold-out"),("compare_badge"==i||"compare"==i)&&n>r&&l.push("rf-price--on-sale");var h='
';return h+='
'+a+"
",("compare_badge"==i||"compare"==i)&&n>r&&(h+='
',h+=' '+e(n)+" ",h+=' '+a+" ",h+="
"),"compare_badge"==i&&n&&(h+=""+Math.round((n-r)/n*100)+"%"),h+="
"}},toBoolean:t=>("string"==typeof t&&(t=t.toLowerCase()),1===t||"1"===t||"true"===t),stripHtml:function(t){let e=document.createElement("div");return e.innerHTML=t,e.textContent||e.innerText||""},makeRandom:(t,e)=>Math.floor(Math.random()*(e-t+1))+t,makeID:function(t=6){const e="abcdefghijklmnopqrstuvwxyz",i="0123456789";let s="";for(let n=0;n{},i=()=>{},s=()=>{}){fetch(t).then((t=>t.json())).then((t=>{e&&e(t)})).catch((t=>{i&&i(t)})).finally((()=>{s&&s()}))}};class t{constructor(t,e){this.document=t,this.selector=e,this.sliders=[]}init(){return this.sliders=Array.from(this.document.querySelectorAll(this.selector)),this.sliders.length&&this.sliders.forEach((t=>{this.removeAttr(t)})),this}removeAttr(t){t&&[...t.querySelectorAll(".carousel-cell")].forEach((t=>{var e=t.getBoundingClientRect();const i=.1*e.width;var s=Math.max(document.documentElement.clientWidth,window.innerWidth);e.right<0+i||e.left>=s-i?t.getAttribute("aria-hidden")||t.setAttribute("aria-hidden","true"):t.getAttribute("aria-hidden")&&t.removeAttribute("aria-hidden")}))}}!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).RfPhotoSwipe=e()}(this,(function(){"use strict";function t(t,e,i){const s=document.createElement(e);return t&&(s.className=t),i&&i.appendChild(s),s}function e(t,e){return t.x=e.x,t.y=e.y,void 0!==e.id&&(t.id=e.id),t}function i(t){t.x=Math.round(t.x),t.y=Math.round(t.y)}function s(t,e){const i=Math.abs(t.x-e.x),s=Math.abs(t.y-e.y);return Math.sqrt(i*i+s*s)}function n(t,e){return t.x===e.x&&t.y===e.y}function r(t,e,i){return Math.min(Math.max(t,e),i)}function o(t,e,i){let s=`translate3d(${t}px,${e||0}px,0)`;return void 0!==i&&(s+=` scale3d(${i},${i},1)`),s}function a(t,e,i,s){t.style.transform=o(e,i,s)}function l(t,e,i,s){t.style.transition=e?`${e} ${i}ms ${s||"cubic-bezier(.4,0,.22,1)"}`:"none"}function h(t,e,i){t.style.width="number"==typeof e?`${e}px`:e,t.style.height="number"==typeof i?`${i}px`:i}const d="loading",c="loaded",u="error";function p(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}let f=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{f=!0}}))}catch(t){}class m{constructor(){this.t=[]}add(t,e,i,s){this.i(t,e,i,s)}remove(t,e,i,s){this.i(t,e,i,s,!0)}removeAll(){this.t.forEach((t=>{this.i(t.target,t.type,t.listener,t.passive,!0,!0)})),this.t=[]}i(t,e,i,s,n,r){if(!t)return;const o=n?"removeEventListener":"addEventListener";e.split(" ").forEach((e=>{if(e){r||(n?this.t=this.t.filter((s=>s.type!==e||s.listener!==i||s.target!==t)):this.t.push({target:t,type:e,listener:i,passive:s}));const a=!!f&&{passive:s||!1};t[o](e,i,a)}}))}}function g(t,e){if(t.getViewportSizeFn){const i=t.getViewportSizeFn(t,e);if(i)return i}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function v(t,e,i,s,n){let r=0;if(e.paddingFn)r=e.paddingFn(i,s,n)[t];else if(e.padding)r=e.padding[t];else{const i="padding"+t[0].toUpperCase()+t.slice(1);e[i]&&(r=e[i])}return Number(r)||0}function y(t,e,i,s){return{x:e.x-v("left",t,e,i,s)-v("right",t,e,i,s),y:e.y-v("top",t,e,i,s)-v("bottom",t,e,i,s)}}class w{constructor(t){this.slide=t,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(t){this.currZoomLevel=t,this.slide.width?(this.o("x"),this.o("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}o(t){const{pswp:e}=this.slide,i=this.slide["x"===t?"width":"height"]*this.currZoomLevel,s=v("x"===t?"left":"top",e.options,e.viewportSize,this.slide.data,this.slide.index),n=this.slide.panAreaSize[t];this.center[t]=Math.round((n-i)/2)+s,this.max[t]=i>n?Math.round(n-i)+s:this.center[t],this.min[t]=i>n?s:this.center[t]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(t,e){return r(e,this.max[t],this.min[t])}}class S{constructor(t,e,i,s){this.pswp=s,this.options=t,this.itemData=e,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,e,i){const s={x:t,y:e};this.elementSize=s,this.panAreaSize=i;const n=i.x/s.x,r=i.y/s.y;this.fit=Math.min(1,nr?n:r),this.vFill=Math.min(1,r),this.initial=this.l(),this.secondary=this.u(),this.max=Math.max(this.initial,this.secondary,this.p()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}m(t){const e=t+"ZoomLevel",i=this.options[e];if(i)return"function"==typeof i?i(this):"fill"===i?this.fill:"fit"===i?this.fit:Number(i)}u(){let t=this.m("secondary");return t||(t=Math.min(1,3*this.fit),this.elementSize&&t*this.elementSize.x>4e3&&(t=4e3/this.elementSize.x),t)}l(){return this.m("initial")||this.fit}p(){return this.m("max")||Math.max(1,4*this.fit)}}class b{constructor(e,i,s){this.data=e,this.index=i,this.pswp=s,this.isActive=i===s.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!s.opener.isOpen,this.zoomLevels=new S(s.options,e,i,s),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:i}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=t("pswp_rf__zoom-wrap","div"),this.holderElement=null,this.currZoomLevel=1,this.width=this.content.width,this.height=this.content.height,this.heavyAppended=!1,this.bounds=new w(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(t){t&&!this.isActive?this.activate():!t&&this.isActive&&this.deactivate()}append(t){this.holderElement=t,this.container.style.transformOrigin="0 0",this.data&&(this.calculateSize(),this.load(),this.updateContentSize(),this.appendHeavy(),this.holderElement.appendChild(this.container),this.zoomAndPanToInitial(),this.pswp.dispatch("firstZoomPan",{slide:this}),this.applyCurrentZoomPan(),this.pswp.dispatch("afterSetContent",{slide:this}),this.isActive&&this.activate())}load(){this.content.load(!1),this.pswp.dispatch("slideLoad",{slide:this})}appendHeavy(){const{pswp:t}=this;!this.heavyAppended&&t.opener.isOpen&&!t.mainScroll.isShifted()&&(this.isActive,1)&&(this.pswp.dispatch("appendHeavy",{slide:this}).defaultPrevented||(this.heavyAppended=!0,this.content.append(),this.pswp.dispatch("appendHeavyContent",{slide:this})))}activate(){this.isActive=!0,this.appendHeavy(),this.content.activate(),this.pswp.dispatch("slideActivate",{slide:this})}deactivate(){this.isActive=!1,this.content.deactivate(),this.currZoomLevel!==this.zoomLevels.initial&&this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize(),this.pswp.dispatch("slideDeactivate",{slide:this})}destroy(){this.content.hasSlide=!1,this.content.remove(),this.container.remove(),this.pswp.dispatch("slideDestroy",{slide:this})}resize(){this.currZoomLevel!==this.zoomLevels.initial&&this.isActive?(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y)):(this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize())}updateContentSize(t){const e=this.currentResolution||this.zoomLevels.initial;if(!e)return;const i=Math.round(this.width*e)||this.pswp.viewportSize.x,s=Math.round(this.height*e)||this.pswp.viewportSize.y;(this.sizeChanged(i,s)||t)&&this.content.setDisplayedSize(i,s)}sizeChanged(t,e){return(t!==this.prevDisplayedWidth||e!==this.prevDisplayedHeight)&&(this.prevDisplayedWidth=t,this.prevDisplayedHeight=e,!0)}getPlaceholderElement(){var t;return null===(t=this.content.placeholder)||void 0===t?void 0:t.element}zoomTo(t,e,s,n){const{pswp:o}=this;if(!this.isZoomable()||o.mainScroll.isShifted())return;o.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:e,transitionDuration:s}),o.animations.stopAllPan();const a=this.currZoomLevel;n||(t=r(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",e,a),this.pan.y=this.calculateZoomToPanOffset("y",e,a),i(this.pan);const l=()=>{this.v(t),this.applyCurrentZoomPan()};s?o.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:l,duration:s,easing:o.options.easing}):l()}toggleZoom(t){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,t,this.pswp.options.zoomAnimationDuration)}setZoomLevel(t){this.currZoomLevel=t,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(t,e,i){if(0==this.bounds.max[t]-this.bounds.min[t])return this.bounds.center[t];e||(e=this.pswp.getViewportCenterPoint()),i||(i=this.zoomLevels.initial);const s=this.currZoomLevel/i;return this.bounds.correctPan(t,(this.pan[t]-e[t])*s+e[t])}panTo(t,e){this.pan.x=this.bounds.correctPan("x",t),this.pan.y=this.bounds.correctPan("y",e),this.applyCurrentZoomPan()}isPannable(){return Boolean(this.width)&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return Boolean(this.width)&&this.content.isZoomable()}applyCurrentZoomPan(){this.g(this.pan.x,this.pan.y,this.currZoomLevel),this===this.pswp.currSlide&&this.pswp.dispatch("zoomPanUpdate",{slide:this})}zoomAndPanToInitial(){this.currZoomLevel=this.zoomLevels.initial,this.bounds.update(this.currZoomLevel),e(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}g(t,e,i){i/=this.currentResolution||this.zoomLevels.initial,a(this.container,t,e,i)}calculateSize(){const{pswp:t}=this;e(this.panAreaSize,y(t.options,t.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),t.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){const t=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return o(this.pan.x,this.pan.y,t)}v(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}}class x{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&e(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:t,prevP1:e,dragAxis:s}=this.gestures,{currSlide:n}=this.pswp;if("y"===s&&this.pswp.options.closeOnVerticalDrag&&n&&n.currZoomLevel<=n.zoomLevels.fit&&!this.gestures.isMultitouch){const i=n.pan.y+(t.y-e.y);if(!this.pswp.dispatch("verticalDrag",{panY:i}).defaultPrevented){this._("y",i,.6);const t=1-Math.abs(this.S(n.pan.y));this.pswp.applyBgOpacity(t),n.applyCurrentZoomPan()}}else this.M("x")||(this.M("y"),n&&(i(n.pan),n.applyCurrentZoomPan()))}end(){const{velocity:t}=this.gestures,{mainScroll:e,currSlide:i}=this.pswp;let s=0;if(this.pswp.animations.stopAll(),e.isShifted()){const i=(e.x-e.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-.5&&i<0||t.x<.1&&i<-.5?(s=1,t.x=Math.min(t.x,0)):(t.x>.5&&i>0||t.x>-.1&&i>.5)&&(s=-1,t.x=Math.max(t.x,0)),e.moveIndexBy(s,!0,t.x)}i&&i.currZoomLevel>i.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this.P("x"),this.P("y"))}P(t){const{velocity:e}=this.gestures,{currSlide:i}=this.pswp;if(!i)return;const{pan:s,bounds:n}=i,o=s[t],a=this.pswp.bgOpacity<1&&"y"===t,l=o+function(t){return.995*t/(1-.995)}(e[t]);if(a){const t=this.S(o),e=this.S(l);if(t<0&&e<-.4||t>0&&e>.4)return void this.pswp.close()}const h=n.correctPan(t,l);if(o===h)return;const d=h===l?1:.82,c=this.pswp.bgOpacity,u=h-o;this.pswp.animations.startSpring({name:"panGesture"+t,isPan:!0,start:o,end:h,velocity:e[t],dampingRatio:d,onUpdate:e=>{if(a&&this.pswp.bgOpacity<1){const t=1-(h-e)/u;this.pswp.applyBgOpacity(r(c+(1-c)*t,0,1))}s[t]=Math.floor(e),i.applyCurrentZoomPan()}})}M(t){const{p1:e,dragAxis:i,prevP1:s,isMultitouch:n}=this.gestures,{currSlide:r,mainScroll:o}=this.pswp,a=e[t]-s[t],l=o.x+a;if(!a||!r)return!1;if("x"===t&&!r.isPannable()&&!n)return o.moveTo(l,!0),!0;const{bounds:h}=r,d=r.pan[t]+a;if(this.pswp.options.allowPanToNext&&"x"===i&&"x"===t&&!n){const e=o.getCurrSlideX(),i=o.x-e,s=a>0,n=!s;if(d>h.min[t]&&s){if(h.min[t]<=this.startPan[t])return o.moveTo(l,!0),!0;this._(t,d)}else if(d0)return o.moveTo(Math.max(l,e),!0),!0;if(i<0)return o.moveTo(Math.min(l,e),!0),!0}else this._(t,d)}else"y"===t&&(o.isShifted()||h.min.y===h.max.y)||this._(t,d);return!1}S(t){var e,i;return(t-(null!==(e=null===(i=this.pswp.currSlide)||void 0===i?void 0:i.bounds.center.y)&&void 0!==e?e:0))/(this.pswp.viewportSize.y/3)}_(t,e,i){const{currSlide:s}=this.pswp;if(!s)return;const{pan:n,bounds:r}=s;if(r.correctPan(t,e)!==e||i){const s=Math.round(e-n[t]);n[t]+=s*(i||.35)}else n[t]=e}}function _(t,e,i){return t.x=(e.x+i.x)/2,t.y=(e.y+i.y)/2,t}class E{constructor(t){this.gestures=t,this.C={x:0,y:0},this.T={x:0,y:0},this.A={x:0,y:0},this.D=!1,this.I=1}start(){const{currSlide:t}=this.gestures.pswp;t&&(this.I=t.currZoomLevel,e(this.C,t.pan)),this.gestures.pswp.animations.stopAllPan(),this.D=!1}change(){const{p1:t,startP1:e,p2:i,startP2:n,pswp:r}=this.gestures,{currSlide:o}=r;if(!o)return;const a=o.zoomLevels.min,l=o.zoomLevels.max;if(!o.isZoomable()||r.mainScroll.isShifted())return;_(this.T,e,n),_(this.A,t,i);let h=1/s(e,n)*s(t,i)*this.I;if(h>o.zoomLevels.initial+o.zoomLevels.initial/15&&(this.D=!0),hl&&(h=l+.05*(h-l));o.pan.x=this.L("x",h),o.pan.y=this.L("y",h),o.setZoomLevel(h),o.applyCurrentZoomPan()}end(){const{pswp:t}=this.gestures,{currSlide:e}=t;(!e||e.currZoomLevels.zoomLevels.max?a=s.zoomLevels.max:(l=!1,a=o);const h=i.bgOpacity,d=i.bgOpacity<1,c=e({x:0,y:0},s.pan);let u=e({x:0,y:0},c);t&&(this.A.x=0,this.A.y=0,this.T.x=0,this.T.y=0,this.I=o,e(this.C,c)),l&&(u={x:this.L("x",a),y:this.L("y",a)}),s.setZoomLevel(a),u={x:s.bounds.correctPan("x",u.x),y:s.bounds.correctPan("y",u.y)},s.setZoomLevel(o);const p=!n(u,c);if(!p&&!l&&!d)return s.v(a),void s.applyCurrentZoomPan();i.animations.stopAllPan(),i.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:t=>{if(t/=1e3,p||l){if(p&&(s.pan.x=c.x+(u.x-c.x)*t,s.pan.y=c.y+(u.y-c.y)*t),l){const e=o+(a-o)*t;s.setZoomLevel(e)}s.applyCurrentZoomPan()}d&&i.bgOpacity<1&&i.applyBgOpacity(r(h+(1-h)*t,0,1))},onComplete:()=>{s.v(a),s.applyCurrentZoomPan()}})}}function C(t){return!!t.target.closest(".pswp_rf__container")}class L{constructor(t){this.gestures=t}click(t,e){const i=e.target.classList,s=i.contains("pswp_rf__img"),n=i.contains("pswp_rf__item")||i.contains("pswp_rf__zoom-wrap");s?this.k("imageClick",t,e):n&&this.k("bgClick",t,e)}tap(t,e){C(e)&&this.k("tap",t,e)}doubleTap(t,e){C(e)&&this.k("doubleTap",t,e)}k(t,e,i){var s;const{pswp:n}=this.gestures,{currSlide:r}=n,o=t+"Action",a=n.options[o];if(!n.dispatch(o,{point:e,originalEvent:i}).defaultPrevented)if("function"!=typeof a)switch(a){case"close":case"next":n[a]();break;case"zoom":null==r||r.toggleZoom(e);break;case"zoom-or-close":null!=r&&r.isZoomable()&&r.zoomLevels.secondary!==r.zoomLevels.initial?r.toggleZoom(e):n.options.clickToCloseNonZoomable&&n.close();break;case"toggle-controls":null===(s=this.gestures.pswp.element)||void 0===s||s.classList.toggle("pswp_rf--ui-visible")}else a.call(n,e,i)}}class z{constructor(t){this.pswp=t,this.dragAxis=null,this.p1={x:0,y:0},this.p2={x:0,y:0},this.prevP1={x:0,y:0},this.prevP2={x:0,y:0},this.startP1={x:0,y:0},this.startP2={x:0,y:0},this.velocity={x:0,y:0},this.Z={x:0,y:0},this.B={x:0,y:0},this.F=0,this.O=[],this.R="ontouchstart"in window,this.N=!!window.PointerEvent,this.supportsTouch=this.R||this.N&&navigator.maxTouchPoints>1,this.F=0,this.U=0,this.V=!1,this.isMultitouch=!1,this.isDragging=!1,this.isZooming=!1,this.raf=null,this.G=null,this.supportsTouch||(t.options.allowPanToNext=!1),this.drag=new x(this),this.zoomLevels=new E(this),this.tapHandler=new L(this),t.on("bindEvents",(()=>{t.events.add(t.scrollWrap,"click",this.$.bind(this)),this.N?this.q("pointer","down","up","cancel"):this.R?(this.q("touch","start","end","cancel"),t.scrollWrap&&(t.scrollWrap.ontouchmove=()=>{},t.scrollWrap.ontouchend=()=>{})):this.q("mouse","down","up")}))}q(t,e,i,s){const{pswp:n}=this,{events:r}=n,o=s?t+s:"";r.add(n.scrollWrap,t+e,this.onPointerDown.bind(this)),r.add(window,t+"move",this.onPointerMove.bind(this)),r.add(window,t+i,this.onPointerUp.bind(this)),o&&r.add(n.scrollWrap,o,this.onPointerUp.bind(this))}onPointerDown(t){const i="mousedown"===t.type||"mouse"===t.pointerType;if(i&&t.button>0)return;const{pswp:s}=this;s.opener.isOpen?s.dispatch("pointerDown",{originalEvent:t}).defaultPrevented||(i&&(s.mouseDetected(),this.H(t,"down")),s.animations.stopAll(),this.K(t,"down"),1===this.F&&(this.dragAxis=null,e(this.startP1,this.p1)),this.F>1?(this.W(),this.isMultitouch=!0):this.isMultitouch=!1):t.preventDefault()}onPointerMove(t){this.H(t,"move"),this.F&&(this.K(t,"move"),this.pswp.dispatch("pointerMove",{originalEvent:t}).defaultPrevented||(1!==this.F||this.isDragging?this.F>1&&!this.isZooming&&(this.j(),this.isZooming=!0,this.X(),this.zoomLevels.start(),this.Y(),this.J()):(this.dragAxis||this.tt(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this.W(),this.X(),this.U=Date.now(),this.V=!1,e(this.B,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this.Y(),this.J()))))}j(){this.isDragging&&(this.isDragging=!1,this.V||this.it(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(t){this.F&&(this.K(t,"up"),this.pswp.dispatch("pointerUp",{originalEvent:t}).defaultPrevented||(0===this.F&&(this.Y(),this.isDragging?this.j():this.isZooming||this.isMultitouch||this.st(t)),this.F<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),1===this.F&&(this.dragAxis=null,this.X()))))}J(){(this.isDragging||this.isZooming)&&(this.it(),this.isDragging?n(this.p1,this.prevP1)||this.drag.change():n(this.p1,this.prevP1)&&n(this.p2,this.prevP2)||this.zoomLevels.change(),this.ht(),this.raf=requestAnimationFrame(this.J.bind(this)))}it(t){const i=Date.now(),s=i-this.U;s<50&&!t||(this.velocity.x=this.et("x",s),this.velocity.y=this.et("y",s),this.U=i,e(this.B,this.p1),this.V=!0)}st(t){const{mainScroll:i}=this.pswp;if(i.isShifted())return void i.moveIndexBy(0,!0);if(t.type.indexOf("cancel")>0)return;if("mouseup"===t.type||"mouse"===t.pointerType)return void this.tapHandler.click(this.startP1,t);const n=this.pswp.options.doubleTapAction?300:0;this.G?(this.W(),s(this.Z,this.startP1)<25&&this.tapHandler.doubleTap(this.startP1,t)):(e(this.Z,this.startP1),this.G=setTimeout((()=>{this.tapHandler.tap(this.startP1,t),this.W()}),n))}W(){this.G&&(clearTimeout(this.G),this.G=null)}et(t,e){const i=this.p1[t]-this.B[t];return Math.abs(i)>1&&e>5?i/e:0}Y(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}H(t,e){this.pswp.applyFilters("preventPointerEvent",!0,t,e)&&t.preventDefault()}K(t,i){if(this.N){const s=t,n=this.O.findIndex((t=>t.id===s.pointerId));"up"===i&&n>-1?this.O.splice(n,1):"down"===i&&-1===n?this.O.push(this.nt(s,{x:0,y:0})):n>-1&&this.nt(s,this.O[n]),this.F=this.O.length,this.F>0&&e(this.p1,this.O[0]),this.F>1&&e(this.p2,this.O[1])}else{const e=t;this.F=0,e.type.indexOf("touch")>-1?e.touches&&e.touches.length>0&&(this.nt(e.touches[0],this.p1),this.F++,e.touches.length>1&&(this.nt(e.touches[1],this.p2),this.F++)):(this.nt(t,this.p1),"up"===i?this.F=0:this.F++)}}ht(){e(this.prevP1,this.p1),e(this.prevP2,this.p2)}X(){e(this.startP1,this.p1),e(this.startP2,this.p2),this.ht()}tt(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{const t=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(0!==t){const e=t>0?"x":"y";Math.abs(this.p1[e]-this.startP1[e])>=10&&(this.dragAxis=e)}}}nt(t,e){return e.x=t.pageX-this.pswp.offset.x,e.y=t.pageY-this.pswp.offset.y,"pointerId"in t?e.id=t.pointerId:void 0!==t.identifier&&(e.id=t.identifier),e}$(t){this.pswp.mainScroll.isShifted()&&(t.preventDefault(),t.stopPropagation())}}class P{constructor(t){this.pswp=t,this.x=0,this.slideWidth=0,this.ot=0,this.rt=0,this.lt=-1,this.itemHolders=[]}resize(t){const{pswp:e}=this,i=Math.round(e.viewportSize.x+e.viewportSize.x*e.options.spacing),s=i!==this.slideWidth;s&&(this.slideWidth=i,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach(((e,i)=>{s&&a(e.el,(i+this.lt)*this.slideWidth),t&&e.slide&&e.slide.resize()}))}resetPosition(){this.ot=0,this.rt=0,this.slideWidth=0,this.lt=-1}appendHolders(){this.itemHolders=[];for(let e=0;e<3;e++){const i=t("pswp_rf__item","div",this.pswp.container);i.setAttribute("role","group"),i.setAttribute("aria-roledescription","slide"),i.setAttribute("aria-hidden","true"),i.style.display=1===e?"block":"none",this.itemHolders.push({el:i})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(t,e,i){const{pswp:s}=this;let n=s.potentialIndex+t;const r=s.getNumItems();if(s.canLoop()){n=s.getLoopedIndex(n);const e=(t+r)%r;t=e<=r/2?e:e-r}else n<0?n=0:n>=r&&(n=r-1),t=n-s.potentialIndex;s.potentialIndex=n,this.ot-=t,s.animations.stopMainScroll();const o=this.getCurrSlideX();if(e){s.animations.startSpring({isMainScroll:!0,start:this.x,end:o,velocity:i||0,naturalFrequency:30,dampingRatio:1,onUpdate:t=>{this.moveTo(t)},onComplete:()=>{this.updateCurrItem(),s.appendHeavy()}});let t=s.potentialIndex-s.currIndex;if(s.canLoop()){const e=(t+r)%r;t=e<=r/2?e:e-r}Math.abs(t)>1&&this.updateCurrItem()}else this.moveTo(o),this.updateCurrItem();return Boolean(t)}getCurrSlideX(){return this.slideWidth*this.ot}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){var t;const{pswp:e}=this,i=this.rt-this.ot;if(!i)return;this.rt=this.ot,e.currIndex=e.potentialIndex;let s,n=Math.abs(i);n>=3&&(this.lt+=i+(i>0?-3:3),n=3);for(let t=0;t0?(s=this.itemHolders.shift(),s&&(this.itemHolders[2]=s,this.lt++,a(s.el,(this.lt+2)*this.slideWidth),e.setContent(s,e.currIndex-n+t+2))):(s=this.itemHolders.pop(),s&&(this.itemHolders.unshift(s),this.lt--,a(s.el,this.lt*this.slideWidth),e.setContent(s,e.currIndex+n-t-2)));Math.abs(this.lt)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),e.animations.stopAllPan(),this.itemHolders.forEach(((t,e)=>{t.slide&&t.slide.setIsActive(1===e)})),e.currSlide=null===(t=this.itemHolders[1])||void 0===t?void 0:t.slide,e.contentLoader.updateLazy(i),e.currSlide&&e.currSlide.applyCurrentZoomPan(),e.dispatch("change")}moveTo(t,e){if(!this.pswp.canLoop()&&e){let e=(this.slideWidth*this.ot-t)/this.slideWidth;e+=this.pswp.currIndex;const i=Math.round(t-this.x);(e<0&&i>0||e>=this.pswp.getNumItems()-1&&i<0)&&(t=this.x+.35*i)}this.x=t,this.pswp.container&&a(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:null!=e&&e})}}const A={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},I=(t,e)=>e?t:A[t];class D{constructor(t){this.pswp=t,this.ct=!1,t.on("bindEvents",(()=>{t.options.trapFocus&&(t.options.initialPointerPos||this.dt(),t.events.add(document,"focusin",this.ut.bind(this))),t.events.add(document,"keydown",this.vt.bind(this))}));const e=document.activeElement;t.on("destroy",(()=>{t.options.returnFocus&&e&&this.ct&&e.focus()}))}dt(){!this.ct&&this.pswp.element&&(this.pswp.element.focus(),this.ct=!0)}vt(t){const{pswp:e}=this;if(e.dispatch("keydown",{originalEvent:t}).defaultPrevented)return;if(function(t){return"button"in t&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}(t))return;let i,s,n=!1;const r="key"in t;switch(r?t.key:t.keyCode){case I("Escape",r):e.options.escKey&&(i="close");break;case I("z",r):i="toggleZoom";break;case I("ArrowLeft",r):s="x";break;case I("ArrowUp",r):s="y";break;case I("ArrowRight",r):s="x",n=!0;break;case I("ArrowDown",r):n=!0,s="y";break;case I("Tab",r):this.dt()}if(s){t.preventDefault();const{currSlide:r}=e;e.options.arrowKeys&&"x"===s&&e.getNumItems()>1?i=n?"next":"prev":r&&r.currZoomLevel>r.zoomLevels.fit&&(r.pan[s]+=n?-80:80,r.panTo(r.pan.x,r.pan.y))}i&&(t.preventDefault(),e[i]())}ut(t){const{template:e}=this.pswp;e&&document!==t.target&&e!==t.target&&!e.contains(t.target)&&e.focus()}}const k="cubic-bezier(.4,0,.22,1)";class T{constructor(t){var e;this.props=t;const{target:i,onComplete:s,transform:n,onFinish:r=()=>{},duration:o=333,easing:a=k}=t;this.onFinish=r;const h=n?"transform":"opacity",d=null!==(e=t[h])&&void 0!==e?e:"";this.ft=i,this.wt=s,this.gt=!1,this.yt=this.yt.bind(this),this._t=setTimeout((()=>{l(i,h,o,a),this._t=setTimeout((()=>{i.addEventListener("transitionend",this.yt,!1),i.addEventListener("transitioncancel",this.yt,!1),this._t=setTimeout((()=>{this.xt()}),o+500),i.style[h]=d}),30)}),0)}yt(t){t.target===this.ft&&this.xt()}xt(){this.gt||(this.gt=!0,this.onFinish(),this.wt&&this.wt())}destroy(){this._t&&clearTimeout(this._t),l(this.ft),this.ft.removeEventListener("transitionend",this.yt,!1),this.ft.removeEventListener("transitioncancel",this.yt,!1),this.gt||this.xt()}}class M{constructor(t,e,i){this.velocity=1e3*t,this.bt=e||.75,this.St=i||12,this.zt=this.St,this.bt<1&&(this.zt*=Math.sqrt(1-this.bt*this.bt))}easeFrame(t,e){let i,s=0;e/=1e3;const n=Math.E**(-this.bt*this.St*e);if(1===this.bt)i=this.velocity+this.St*t,s=(t+i*e)*n,this.velocity=s*-this.St+i*n;else if(this.bt<1){i=1/this.zt*(this.bt*this.St*t+this.velocity);const r=Math.cos(this.zt*e),o=Math.sin(this.zt*e);s=n*(t*r+i*o),this.velocity=s*-this.St*this.bt+n*(-this.zt*t*o+this.zt*i*r)}return s}}class q{constructor(t){this.props=t,this.Mt=0;const{start:e,end:i,velocity:s,onUpdate:n,onComplete:r,onFinish:o=()=>{},dampingRatio:a,naturalFrequency:l}=t;this.onFinish=o;const h=new M(s,a,l);let d=Date.now(),c=e-i;const u=()=>{this.Mt&&(c=h.easeFrame(c,Date.now()-d),Math.abs(c)<1&&Math.abs(h.velocity)<50?(n(i),r&&r(),this.onFinish()):(d=Date.now(),n(c+i),this.Mt=requestAnimationFrame(u)))};this.Mt=requestAnimationFrame(u)}destroy(){this.Mt>=0&&cancelAnimationFrame(this.Mt),this.Mt=0}}class F{constructor(){this.activeAnimations=[]}startSpring(t){this.Pt(t,!0)}startTransition(t){this.Pt(t)}Pt(t,e){const i=e?new q(t):new T(t);return this.activeAnimations.push(i),i.onFinish=()=>this.stop(i),i}stop(t){t.destroy();const e=this.activeAnimations.indexOf(t);e>-1&&this.activeAnimations.splice(e,1)}stopAll(){this.activeAnimations.forEach((t=>{t.destroy()})),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter((t=>!t.props.isPan||(t.destroy(),!1)))}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter((t=>!t.props.isMainScroll||(t.destroy(),!1)))}isPanRunning(){return this.activeAnimations.some((t=>t.props.isPan))}}class U{constructor(t){this.pswp=t,t.events.add(t.element,"wheel",this.Ct.bind(this))}Ct(t){t.preventDefault();const{currSlide:e}=this.pswp;let{deltaX:i,deltaY:s}=t;if(e&&!this.pswp.dispatch("wheel",{originalEvent:t}).defaultPrevented)if(t.ctrlKey||this.pswp.options.wheelToZoom){if(e.isZoomable()){let i=-s;1===t.deltaMode?i*=.05:i*=t.deltaMode?1:.002,i=2**i;const n=e.currZoomLevel*i;e.zoomTo(n,{x:t.clientX,y:t.clientY})}}else e.isPannable()&&(1===t.deltaMode&&(i*=18,s*=18),e.panTo(e.pan.x-i,e.pan.y-s))}}class O{constructor(e,i){var s;const n=i.name||i.className;let r=i.html;if(!1===e.options[n])return;"string"==typeof e.options[n+"SVG"]&&(r=e.options[n+"SVG"]),e.dispatch("uiElementCreate",{data:i});let o="";i.isButton?(o+="pswp_rf__button ",o+=i.className||`pswp_rf__button--${i.name}`):o+=i.className||`pswp_rf__${i.name}`;let a=i.isButton?i.tagName||"button":i.tagName||"div";a=a.toLowerCase();const l=t(o,a);if(i.isButton){"button"===a&&(l.type="button");let{title:t}=i;const{ariaLabel:s}=i;"string"==typeof e.options[n+"Title"]&&(t=e.options[n+"Title"]),t&&(l.title=t);const r=s||t;r&&l.setAttribute("aria-label",r)}l.innerHTML=function(t){if("string"==typeof t)return t;if(!t||!t.isCustomSVG)return"";const e=t;let i='",i}(r),i.onInit&&i.onInit(l,e),i.onClick&&(l.onclick=t=>{"string"==typeof i.onClick?e[i.onClick]():"function"==typeof i.onClick&&i.onClick(t,l,e)});const h=i.appendTo||"bar";let d=e.element;"bar"===h?(e.topBar||(e.topBar=t("pswp_rf__top-bar pswp_rf__hide-on-close","div",e.scrollWrap)),d=e.topBar):(l.classList.add("pswp_rf__hide-on-close"),"wrapper"===h&&(d=e.scrollWrap)),null===(s=d)||void 0===s||s.appendChild(e.applyFilters("uiElement",l,i))}}function $(t,e,i){t.classList.add("pswp_rf__button--arrow"),t.setAttribute("aria-controls","pswp_rf__items"),e.on("change",(()=>{e.options.loop||(t.disabled=i?!(e.currIndex0))}))}const W={name:"arrowPrev",className:"pswp_rf__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'',outlineID:"pswp_rf__icn-arrow"},onClick:"prev",onInit:$},N={name:"arrowNext",className:"pswp_rf__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'',outlineID:"pswp_rf__icn-arrow"},onClick:"next",onInit:(t,e)=>{$(t,e,!0)}},B={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'',outlineID:"pswp_rf__icn-close"},onClick:"close"},H={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'',outlineID:"pswp_rf__icn-zoom"},onClick:"toggleZoom"},j={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'',outlineID:"pswp_rf__icn-loading"},onInit:(t,e)=>{let i,s=null;const n=e=>{var s;i!==e&&(i=e,s=e,t.classList.toggle("pswp_rf__preloader--active",s))},r=()=>{var t;if(null===(t=e.currSlide)||void 0===t||!t.content.isLoading())return n(!1),void(s&&(clearTimeout(s),s=null));s||(s=setTimeout((()=>{var t;n(Boolean(null===(t=e.currSlide)||void 0===t?void 0:t.content.isLoading())),s=null}),e.options.preloaderDelay))};e.on("change",r),e.on("loadComplete",(t=>{e.currSlide===t.slide&&r()})),e.ui&&(e.ui.updatePreloaderVisibility=r)}},R={name:"counter",order:5,onInit:(t,e)=>{e.on("change",(()=>{t.innerText=e.currIndex+1+e.options.indexIndicatorSep+e.getNumItems()}))}};function G(t,e){t.classList.toggle("pswp_rf--zoomed-in",e)}class Z{constructor(t){this.pswp=t,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this.Tt=void 0}init(){const{pswp:t}=this;this.isRegistered=!1,this.uiElementsData=[B,W,N,H,j,R],t.dispatch("uiRegister"),this.uiElementsData.sort(((t,e)=>(t.order||0)-(e.order||0))),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach((t=>{this.registerElement(t)})),t.on("change",(()=>{var e;null===(e=t.element)||void 0===e||e.classList.toggle("pswp_rf--one-slide",1===t.getNumItems())})),t.on("zoomPanUpdate",(()=>this.At()))}registerElement(t){this.isRegistered?this.items.push(new O(this.pswp,t)):this.uiElementsData.push(t)}At(){const{template:t,currSlide:e,options:i}=this.pswp;if(this.pswp.opener.isClosing||!t||!e)return;let{currZoomLevel:s}=e;if(this.pswp.opener.isOpen||(s=e.zoomLevels.initial),s===this.Tt)return;this.Tt=s;const n=e.zoomLevels.initial-e.zoomLevels.secondary;if(Math.abs(n)<.01||!e.isZoomable())return G(t,!1),void t.classList.remove("pswp_rf--zoom-allowed");t.classList.add("pswp_rf--zoom-allowed"),G(t,(s===e.zoomLevels.initial?e.zoomLevels.secondary:e.zoomLevels.initial)<=s),"zoom"!==i.imageClickAction&&"zoom-or-close"!==i.imageClickAction||t.classList.add("pswp_rf--click-to-zoom")}}class V{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}}class X{constructor(e,i){if(this.element=t("pswp_rf__img pswp_rf__img--placeholder",e?"img":"div",i),e){const t=this.element;t.decoding="async",t.alt="",t.src=e,t.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&("IMG"===this.element.tagName?(h(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=o(0,0,t/250)):h(this.element,t,e))}destroy(){var t;null!==(t=this.element)&&void 0!==t&&t.parentNode&&this.element.remove(),this.element=null}}class Y{constructor(t,e,i){this.instance=e,this.data=t,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state="idle",this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout((()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)}),1e3)}load(e,i){if(this.slide&&this.usePlaceholder())if(this.placeholder){const t=this.placeholder.element;t&&!t.parentElement&&this.slide.container.prepend(t)}else{const t=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new X(t,this.slide.container)}this.element&&!i||this.instance.dispatch("contentLoad",{content:this,isLazy:e}).defaultPrevented||(this.isImageContent()?(this.element=t("pswp_rf__img","img"),this.displayedImageWidth&&this.loadImage(e)):(this.element=t("pswp_rf__content","div"),this.element.innerHTML=this.data.html||""),i&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var e,i;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const s=this.element;this.updateSrcsetSizes(),this.data.srcset&&(s.srcset=this.data.srcset),s.src=null!==(e=this.data.src)&&void 0!==e?e:"",s.alt=null!==(i=this.data.alt)&&void 0!==i?i:"",this.state=d,s.complete?this.onLoaded():(s.onload=()=>{this.onLoaded()},s.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=c,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),this.state!==c&&this.state!==u||this.removePlaceholder())}onError(){this.state=u,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===d,this)}isError(){return this.state===u}isImageContent(){return"image"===this.type}setDisplayedSize(t,e){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(h(this.element,t,e),this.isImageContent()&&!this.isError()))){const i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=e,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:e,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==u,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,e=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||e>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=e+"px",t.dataset.largestUsedSize=String(e))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented||(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var e,i;let s=t("pswp_rf__error-msg","div");s.innerText=null!==(e=null===(i=this.instance.options)||void 0===i?void 0:i.errorMsg)&&void 0!==e?e:"",s=this.instance.applyFilters("contentErrorElement",s,this),this.element=t("pswp_rf__content pswp_rf__error-msg-container","div"),this.element.appendChild(s),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===u)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||p())?(this.isDecoding=!0,this.element.decode().catch((()=>{})).finally((()=>{this.isDecoding=!1,this.appendImage()}))):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){!this.instance.dispatch("contentActivate",{content:this}).defaultPrevented&&this.slide&&(this.isImageContent()&&this.isDecoding&&!p()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,this.instance.dispatch("contentRemove",{content:this}).defaultPrevented||(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),this.state!==c&&this.state!==u||this.removePlaceholder()))}}function J(t,e,i){const s=e.createContentFromData(t,i);let n;const{options:r}=e;if(r){let o;n=new S(r,t,-1),o=e.pswp?e.pswp.viewportSize:g(r,e);const a=y(r,o,t,i);n.update(s.width,s.height,a)}return s.lazyLoad(),n&&s.setDisplayedSize(Math.ceil(s.width*n.initial),Math.ceil(s.height*n.initial)),s}class Q{constructor(t){this.pswp=t,this.limit=Math.max(t.options.preload[0]+t.options.preload[1]+1,5),this.Dt=[]}updateLazy(t){const{pswp:e}=this;if(e.dispatch("lazyLoad").defaultPrevented)return;const{preload:i}=e.options,s=void 0===t||t>=0;let n;for(n=0;n<=i[1];n++)this.loadSlideByIndex(e.currIndex+(s?n:-n));for(n=1;n<=i[0];n++)this.loadSlideByIndex(e.currIndex+(s?-n:n))}loadSlideByIndex(t){const e=this.pswp.getLoopedIndex(t);let i=this.getContentByIndex(e);i||(i=function(t,e){const i=e.getItemData(t);if(!e.dispatch("lazyLoadSlide",{index:t,itemData:i}).defaultPrevented)return J(i,e,t)}(e,this.pswp),i&&this.addToCache(i))}getContentBySlide(t){let e=this.getContentByIndex(t.index);return e||(e=this.pswp.createContentFromData(t.data,t.index),this.addToCache(e)),e.setSlide(t),e}addToCache(t){if(this.removeByIndex(t.index),this.Dt.push(t),this.Dt.length>this.limit){const t=this.Dt.findIndex((t=>!t.isAttached&&!t.hasSlide));-1!==t&&this.Dt.splice(t,1)[0].destroy()}}removeByIndex(t){const e=this.Dt.findIndex((e=>e.index===t));-1!==e&&this.Dt.splice(e,1)}getContentByIndex(t){return this.Dt.find((e=>e.index===t))}destroy(){this.Dt.forEach((t=>t.destroy())),this.Dt=[]}}const K=.003;class tt{constructor(t){this.pswp=t,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this.It=void 0,this.Et=!1,this.Lt=!1,this.kt=!1,this.Zt=!1,this.Bt=void 0,this.Ft=void 0,this.Ot=void 0,this.Rt=void 0,this.Nt=void 0,this.Ut=this.Ut.bind(this),t.on("firstZoomPan",this.Ut)}open(){this.Ut(),this.Pt()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;const t=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this.It=this.pswp.options.hideAnimationDuration,t&&t.currZoomLevel*t.width>=this.pswp.options.maxWidthToAnimate&&(this.It=0),this.Vt(),setTimeout((()=>{this.Pt()}),this.Lt?30:0)}Ut(){if(this.pswp.off("firstZoomPan",this.Ut),!this.isOpening){const t=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this.It=this.pswp.options.showAnimationDuration,t&&t.zoomLevels.initial*t.width>=this.pswp.options.maxWidthToAnimate&&(this.It=0),this.Vt()}}Vt(){const{pswp:t}=this,e=this.pswp.currSlide,{options:i}=t;var s,n;if("fade"===i.showHideAnimationType?(i.showHideOpacity=!0,this.Nt=void 0):"none"===i.showHideAnimationType?(i.showHideOpacity=!1,this.It=0,this.Nt=void 0):this.isOpening&&t.Gt?this.Nt=t.Gt:this.Nt=this.pswp.getThumbBounds(),this.Bt=null==e?void 0:e.getPlaceholderElement(),t.animations.stopAll(),this.Et=Boolean(this.It&&this.It>50),this.$t=Boolean(this.Nt)&&(null==e?void 0:e.content.usePlaceholder())&&(!this.isClosing||!t.mainScroll.isShifted()),this.$t?this.kt=null!==(s=i.showHideOpacity)&&void 0!==s&&s:(this.kt=!0,this.isOpening&&e&&(e.zoomAndPanToInitial(),e.applyCurrentZoomPan())),this.Zt=!this.kt&&this.pswp.options.bgOpacity>K,this.Ft=this.kt?t.element:t.bg,!this.Et)return this.It=0,this.$t=!1,this.Zt=!1,this.kt=!0,void(this.isOpening&&(t.element&&(t.element.style.opacity=String(K)),t.applyBgOpacity(1)));this.$t&&this.Nt&&this.Nt.innerRect?(this.Lt=!0,this.Ot=this.pswp.container,this.Rt=null===(n=this.pswp.currSlide)||void 0===n?void 0:n.holderElement,t.container&&(t.container.style.overflow="hidden",t.container.style.width=t.viewportSize.x+"px")):this.Lt=!1,this.isOpening?(this.kt?(t.element&&(t.element.style.opacity=String(K)),t.applyBgOpacity(1)):(this.Zt&&t.bg&&(t.bg.style.opacity=String(K)),t.element&&(t.element.style.opacity="1")),this.$t&&(this.qt(),this.Bt&&(this.Bt.style.willChange="transform",this.Bt.style.opacity=String(K)))):this.isClosing&&(t.mainScroll.itemHolders[0]&&(t.mainScroll.itemHolders[0].el.style.display="none"),t.mainScroll.itemHolders[2]&&(t.mainScroll.itemHolders[2].el.style.display="none"),this.Lt&&0!==t.mainScroll.x&&(t.mainScroll.resetPosition(),t.mainScroll.resize()))}Pt(){this.isOpening&&this.Et&&this.Bt&&"IMG"===this.Bt.tagName?new Promise((t=>{let e=!1,i=!0;var s;(s=this.Bt,"decode"in s?s.decode().catch((()=>{})):s.complete?Promise.resolve(s):new Promise(((t,e)=>{s.onload=()=>t(s),s.onerror=e}))).finally((()=>{e=!0,i||t(!0)})),setTimeout((()=>{i=!1,e&&t(!0)}),50),setTimeout(t,250)})).finally((()=>this.Ht())):this.Ht()}Ht(){var t,e;null===(t=this.pswp.element)||void 0===t||t.style.setProperty("--pswp-transition-duration",this.It+"ms"),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),null===(e=this.pswp.element)||void 0===e||e.classList.toggle("pswp_rf--ui-visible",this.isOpening),this.isOpening?(this.Bt&&(this.Bt.style.opacity="1"),this.Kt()):this.isClosing&&this.Wt(),this.Et||this.jt()}jt(){const{pswp:t}=this;if(this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,t.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),t.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed)t.destroy();else if(this.isOpen){var e;this.$t&&t.container&&(t.container.style.overflow="visible",t.container.style.width="100%"),null===(e=t.currSlide)||void 0===e||e.applyCurrentZoomPan()}}Kt(){const{pswp:t}=this;this.$t&&(this.Lt&&this.Ot&&this.Rt&&(this.Xt(this.Ot,"transform","translate3d(0,0,0)"),this.Xt(this.Rt,"transform","none")),t.currSlide&&(t.currSlide.zoomAndPanToInitial(),this.Xt(t.currSlide.container,"transform",t.currSlide.getCurrentTransform()))),this.Zt&&t.bg&&this.Xt(t.bg,"opacity",String(t.options.bgOpacity)),this.kt&&t.element&&this.Xt(t.element,"opacity","1")}Wt(){const{pswp:t}=this;this.$t&&this.qt(!0),this.Zt&&t.bgOpacity>.01&&t.bg&&this.Xt(t.bg,"opacity","0"),this.kt&&t.element&&this.Xt(t.element,"opacity","0")}qt(t){if(!this.Nt)return;const{pswp:i}=this,{innerRect:s}=this.Nt,{currSlide:n,viewportSize:r}=i;if(this.Lt&&s&&this.Ot&&this.Rt){const e=-r.x+(this.Nt.x-s.x)+s.w,i=-r.y+(this.Nt.y-s.y)+s.h,n=r.x-s.w,l=r.y-s.h;t?(this.Xt(this.Ot,"transform",o(e,i)),this.Xt(this.Rt,"transform",o(n,l))):(a(this.Ot,e,i),a(this.Rt,n,l))}n&&(e(n.pan,s||this.Nt),n.currZoomLevel=this.Nt.w/n.width,t?this.Xt(n.container,"transform",n.getCurrentTransform()):n.applyCurrentZoomPan())}Xt(t,e,i){if(!this.It)return void(t.style[e]=i);const{animations:s}=this.pswp,n={duration:this.It,easing:this.pswp.options.easing,onComplete:()=>{s.activeAnimations.length||this.jt()},target:t};n[e]=i,s.startTransition(n)}}const et={allowPanToNext:!0,spacing:.1,loop:!0,pinchToClose:!0,closeOnVerticalDrag:!0,hideAnimationDuration:333,showAnimationDuration:333,zoomAnimationDuration:333,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,maxWidthToAnimate:4e3,clickToCloseNonZoomable:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",indexIndicatorSep:" / ",preloaderDelay:2e3,bgOpacity:.8,index:0,errorMsg:"The image cannot be loaded",preload:[1,2],easing:"cubic-bezier(.4,0,.22,1)"};return class extends class extends class{constructor(){this.Yt={},this.Jt={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){var s,n,r;this.Jt[t]||(this.Jt[t]=[]),null===(s=this.Jt[t])||void 0===s||s.push({fn:e,priority:i}),null===(n=this.Jt[t])||void 0===n||n.sort(((t,e)=>t.priority-e.priority)),null===(r=this.pswp)||void 0===r||r.addFilter(t,e,i)}removeFilter(t,e){this.Jt[t]&&(this.Jt[t]=this.Jt[t].filter((t=>t.fn!==e))),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){var i;return null===(i=this.Jt[t])||void 0===i||i.forEach((t=>{e[0]=t.fn.apply(this,e)})),e[0]}on(t,e){var i,s;this.Yt[t]||(this.Yt[t]=[]),null===(i=this.Yt[t])||void 0===i||i.push(e),null===(s=this.pswp)||void 0===s||s.on(t,e)}off(t,e){var i;this.Yt[t]&&(this.Yt[t]=this.Yt[t].filter((t=>e!==t))),null===(i=this.pswp)||void 0===i||i.off(t,e)}dispatch(t,e){var i;if(this.pswp)return this.pswp.dispatch(t,e);const s=new V(t,e);return null===(i=this.Yt[t])||void 0===i||i.forEach((t=>{t.call(this,s)})),s}}{getNumItems(){var t;let e=0;const i=null===(t=this.options)||void 0===t?void 0:t.dataSource;i&&"length"in i?e=i.length:i&&"gallery"in i&&(i.items||(i.items=this.Qt(i.gallery)),i.items&&(e=i.items.length));const s=this.dispatch("numItems",{dataSource:i,numItems:e});return this.applyFilters("numItems",s.numItems,i)}createContentFromData(t,e){return new Y(t,this,e)}getItemData(t){var e;const i=null===(e=this.options)||void 0===e?void 0:e.dataSource;let s={};Array.isArray(i)?s=i[t]:i&&"gallery"in i&&(i.items||(i.items=this.Qt(i.gallery)),s=i.items[t]);let n=s;n instanceof Element&&(n=this.ti(n));const r=this.dispatch("itemData",{itemData:n||{},index:t});return this.applyFilters("itemData",r.itemData,t)}Qt(t){var e,i;return null!==(e=this.options)&&void 0!==e&&e.children||null!==(i=this.options)&&void 0!==i&&i.childSelector?function(t,e,i=document){let s=[];if(t instanceof Element)s=[t];else if(t instanceof NodeList||Array.isArray(t))s=Array.from(t);else{const n="string"==typeof t?t:e;n&&(s=Array.from(i.querySelectorAll(n)))}return s}(this.options.children,this.options.childSelector,t)||[]:[t]}ti(t){const e={element:t},i="A"===t.tagName?t:t.querySelector("a");if(i){e.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(e.srcset=i.dataset.pswpSrcset),e.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,e.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,e.w=e.width,e.h=e.height,i.dataset.pswpType&&(e.type=i.dataset.pswpType);const n=t.querySelector("img");var s;n&&(e.msrc=n.currentSrc||n.src,e.alt=null!==(s=n.getAttribute("alt"))&&void 0!==s?s:""),(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0)}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return J(t,this,e)}}{constructor(t){super(),this.options=this.ii(t||{}),this.offset={x:0,y:0},this.si={x:0,y:0},this.viewportSize={x:0,y:0},this.bgOpacity=1,this.currIndex=0,this.potentialIndex=0,this.isOpen=!1,this.isDestroying=!1,this.hasMouse=!1,this.hi={},this.Gt=void 0,this.topBar=void 0,this.element=void 0,this.template=void 0,this.container=void 0,this.scrollWrap=void 0,this.currSlide=void 0,this.events=new m,this.animations=new F,this.mainScroll=new P(this),this.gestures=new z(this),this.opener=new tt(this),this.keyboard=new D(this),this.contentLoader=new Q(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this.ei();let t="pswp_rf--open";return this.gestures.supportsTouch&&(t+=" pswp_rf--touch"),this.options.mainClass&&(t+=" "+this.options.mainClass),this.element&&(this.element.className+=" "+t),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new U(this),(Number.isNaN(this.currIndex)||this.currIndex<0||this.currIndex>=this.getNumItems())&&(this.currIndex=0),this.gestures.supportsTouch||this.mouseDetected(),this.updateSize(),this.offset.y=window.pageYOffset,this.hi=this.getItemData(this.currIndex),this.dispatch("gettingData",{index:this.currIndex,data:this.hi,slide:void 0}),this.Gt=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",(()=>{const{itemHolders:t}=this.mainScroll;t[0]&&(t[0].el.style.display="block",this.setContent(t[0],this.currIndex-1)),t[2]&&(t[2].el.style.display="block",this.setContent(t[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this.ni.bind(this)),this.events.add(window,"scroll",this.oi.bind(this)),this.dispatch("bindEvents")})),this.mainScroll.itemHolders[1]&&this.setContent(this.mainScroll.itemHolders[1],this.currIndex),this.dispatch("change"),this.opener.open(),this.dispatch("afterInit"),!0}getLoopedIndex(t){const e=this.getNumItems();return this.options.loop&&(t>e-1&&(t-=e),t<0&&(t+=e)),r(t,0,e-1)}appendHeavy(){this.mainScroll.itemHolders.forEach((t=>{var e;null===(e=t.slide)||void 0===e||e.appendHeavy()}))}goTo(t){this.mainScroll.moveIndexBy(this.getLoopedIndex(t)-this.potentialIndex)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...t){var e;null===(e=this.currSlide)||void 0===e||e.zoomTo(...t)}toggleZoom(){var t;null===(t=this.currSlide)||void 0===t||t.toggleZoom()}close(){this.opener.isOpen&&!this.isDestroying&&(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){var t;if(!this.isDestroying)return this.options.showHideAnimationType="none",void this.close();this.dispatch("destroy"),this.Yt={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),null===(t=this.element)||void 0===t||t.remove(),this.mainScroll.itemHolders.forEach((t=>{var e;null===(e=t.slide)||void 0===e||e.destroy()})),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(t){this.contentLoader.removeByIndex(t),this.mainScroll.itemHolders.forEach(((e,i)=>{var s,n;let r=(null!==(s=null===(n=this.currSlide)||void 0===n?void 0:n.index)&&void 0!==s?s:0)-1+i;var o;this.canLoop()&&(r=this.getLoopedIndex(r)),r===t&&(this.setContent(e,t,!0),1===i&&(this.currSlide=e.slide,null===(o=e.slide)||void 0===o||o.setIsActive(!0)))})),this.dispatch("change")}setContent(t,e,i){if(this.canLoop()&&(e=this.getLoopedIndex(e)),t.slide){if(t.slide.index===e&&!i)return;t.slide.destroy(),t.slide=void 0}if(!this.canLoop()&&(e<0||e>=this.getNumItems()))return;const s=this.getItemData(e);t.slide=new b(s,e,this),e===this.currIndex&&(this.currSlide=t.slide),t.slide.append(t.el)}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(t){if(this.isDestroying)return;const i=g(this.options,this);!t&&n(i,this.si)||(e(this.si,i),this.dispatch("beforeResize"),e(this.viewportSize,this.si),this.oi(),this.dispatch("viewportSize"),this.mainScroll.resize(this.opener.isOpen),!this.hasMouse&&window.matchMedia("(any-hover: hover)").matches&&this.mouseDetected(),this.dispatch("resize"))}applyBgOpacity(t){this.bgOpacity=Math.max(t,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){var t;this.hasMouse||(this.hasMouse=!0,null===(t=this.element)||void 0===t||t.classList.add("pswp_rf--has_mouse"))}ni(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout((()=>{this.updateSize()}),500)}oi(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(t,e){this.offset.x=t,this.offset.y=e,this.dispatch("updateScrollOffset")}ei(){this.element=t("pswp_rf","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=t("pswp_rf__bg","div",this.element),this.scrollWrap=t("pswp_rf__scroll-wrap","section",this.element),this.container=t("pswp_rf__container","div",this.scrollWrap),this.scrollWrap.setAttribute("aria-roledescription","carousel"),this.container.setAttribute("aria-live","off"),this.container.setAttribute("id","pswp_rf__items"),this.mainScroll.appendHolders(),this.ui=new Z(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return function(t,e,i){const s=i.dispatch("thumbBounds",{index:t,itemData:e,instance:i});if(s.thumbBounds)return s.thumbBounds;const{element:n}=e;let r,o;if(n&&!1!==i.options.thumbSelector){const t=i.options.thumbSelector||"img";o=n.matches(t)?n:n.querySelector(t)}return o=i.applyFilters("thumbEl",o,e,t),o&&(r=e.thumbCropped?function(t,e,i){const s=t.getBoundingClientRect(),n=s.width/e,r=s.height/i,o=n>r?n:r,a=(s.width-e*o)/2,l=(s.height-i*o)/2,h={x:s.left+a,y:s.top+l,w:e*o};return h.innerRect={w:s.width,h:s.height,x:a,y:l},h}(o,e.width||e.w||0,e.height||e.h||0):function(t){const e=t.getBoundingClientRect();return{x:e.left,y:e.top,w:e.width}}(o)),i.applyFilters("thumbBounds",r,e,t)}(this.currIndex,this.currSlide?this.currSlide.data:this.hi,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}ii(t){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(t.showHideAnimationType="none",t.zoomAnimationDuration=0),{...et,...t}}}})),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).RfPhotoSwipeLightbox=e()}(this,(function(){"use strict";function t(t,e,i){const s=document.createElement(e);return t&&(s.className=t),i&&i.appendChild(s),s}function e(t,e,i){t.style.width="number"==typeof e?`${e}px`:e,t.style.height="number"==typeof i?`${i}px`:i}const i="loading",s="loaded",n="error";function r(t,e,i=document){let s=[];if(t instanceof Element)s=[t];else if(t instanceof NodeList||Array.isArray(t))s=Array.from(t);else{const n="string"==typeof t?t:e;n&&(s=Array.from(i.querySelectorAll(n)))}return s}function o(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}class a{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}}class l{constructor(e,i){if(this.element=t("pswp_rf__img pswp_rf__img--placeholder",e?"img":"div",i),e){const t=this.element;t.decoding="async",t.alt="",t.src=e,t.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,i){this.element&&("IMG"===this.element.tagName?(e(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=function(t,e,i){let s="translate3d(0px,0px,0)";return void 0!==i&&(s+=` scale3d(${i},${i},1)`),s}(0,0,t/250)):e(this.element,t,i))}destroy(){var t;null!==(t=this.element)&&void 0!==t&&t.parentNode&&this.element.remove(),this.element=null}}class h{constructor(t,e,i){this.instance=e,this.data=t,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state="idle",this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout((()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)}),1e3)}load(e,i){if(this.slide&&this.usePlaceholder())if(this.placeholder){const t=this.placeholder.element;t&&!t.parentElement&&this.slide.container.prepend(t)}else{const t=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new l(t,this.slide.container)}this.element&&!i||this.instance.dispatch("contentLoad",{content:this,isLazy:e}).defaultPrevented||(this.isImageContent()?(this.element=t("pswp_rf__img","img"),this.displayedImageWidth&&this.loadImage(e)):(this.element=t("pswp_rf__content","div"),this.element.innerHTML=this.data.html||""),i&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var e,s;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const n=this.element;this.updateSrcsetSizes(),this.data.srcset&&(n.srcset=this.data.srcset),n.src=null!==(e=this.data.src)&&void 0!==e?e:"",n.alt=null!==(s=this.data.alt)&&void 0!==s?s:"",this.state=i,n.complete?this.onLoaded():(n.onload=()=>{this.onLoaded()},n.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=s,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),this.state!==s&&this.state!==n||this.removePlaceholder())}onError(){this.state=n,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===i,this)}isError(){return this.state===n}isImageContent(){return"image"===this.type}setDisplayedSize(t,i){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,i),!this.instance.dispatch("contentResize",{content:this,width:t,height:i}).defaultPrevented&&(e(this.element,t,i),this.isImageContent()&&!this.isError()))){const e=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=i,e?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:i,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==n,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,e=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||e>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=e+"px",t.dataset.largestUsedSize=String(e))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented||(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var e,i;let s=t("pswp_rf__error-msg","div");s.innerText=null!==(e=null===(i=this.instance.options)||void 0===i?void 0:i.errorMsg)&&void 0!==e?e:"",s=this.instance.applyFilters("contentErrorElement",s,this),this.element=t("pswp_rf__content pswp_rf__error-msg-container","div"),this.element.appendChild(s),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===n)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||o())?(this.isDecoding=!0,this.element.decode().catch((()=>{})).finally((()=>{this.isDecoding=!1,this.appendImage()}))):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){!this.instance.dispatch("contentActivate",{content:this}).defaultPrevented&&this.slide&&(this.isImageContent()&&this.isDecoding&&!o()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,this.instance.dispatch("contentRemove",{content:this}).defaultPrevented||(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),this.state!==s&&this.state!==n||this.removePlaceholder()))}}function d(t,e,i,s,n){let r=0;if(e.paddingFn)r=e.paddingFn(i,s,n)[t];else if(e.padding)r=e.padding[t];else{const i="padding"+t[0].toUpperCase()+t.slice(1);e[i]&&(r=e[i])}return Number(r)||0}class c{constructor(t,e,i,s){this.pswp=s,this.options=t,this.itemData=e,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,e,i){const s={x:t,y:e};this.elementSize=s,this.panAreaSize=i;const n=i.x/s.x,r=i.y/s.y;this.fit=Math.min(1,nr?n:r),this.vFill=Math.min(1,r),this.initial=this.t(),this.secondary=this.i(),this.max=Math.max(this.initial,this.secondary,this.o()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}l(t){const e=t+"ZoomLevel",i=this.options[e];if(i)return"function"==typeof i?i(this):"fill"===i?this.fill:"fit"===i?this.fit:Number(i)}i(){let t=this.l("secondary");return t||(t=Math.min(1,3*this.fit),this.elementSize&&t*this.elementSize.x>4e3&&(t=4e3/this.elementSize.x),t)}t(){return this.l("initial")||this.fit}o(){return this.l("max")||Math.max(1,4*this.fit)}}function u(t,e,i){const s=e.createContentFromData(t,i);let n;const{options:r}=e;if(r){let o;n=new c(r,t,-1),o=e.pswp?e.pswp.viewportSize:function(t,e){if(t.getViewportSizeFn){const i=t.getViewportSizeFn(t,e);if(i)return i}return{x:document.documentElement.clientWidth,y:window.innerHeight}}(r,e);const a=function(t,e,i,s){return{x:e.x-d("left",t,e,i,s)-d("right",t,e,i,s),y:e.y-d("top",t,e,i,s)-d("bottom",t,e,i,s)}}(r,o,t,i);n.update(s.width,s.height,a)}return s.lazyLoad(),n&&s.setDisplayedSize(Math.ceil(s.width*n.initial),Math.ceil(s.height*n.initial)),s}return class extends class extends class{constructor(){this.u={},this.p={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){var s,n,r;this.p[t]||(this.p[t]=[]),null===(s=this.p[t])||void 0===s||s.push({fn:e,priority:i}),null===(n=this.p[t])||void 0===n||n.sort(((t,e)=>t.priority-e.priority)),null===(r=this.pswp)||void 0===r||r.addFilter(t,e,i)}removeFilter(t,e){this.p[t]&&(this.p[t]=this.p[t].filter((t=>t.fn!==e))),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){var i;return null===(i=this.p[t])||void 0===i||i.forEach((t=>{e[0]=t.fn.apply(this,e)})),e[0]}on(t,e){var i,s;this.u[t]||(this.u[t]=[]),null===(i=this.u[t])||void 0===i||i.push(e),null===(s=this.pswp)||void 0===s||s.on(t,e)}off(t,e){var i;this.u[t]&&(this.u[t]=this.u[t].filter((t=>e!==t))),null===(i=this.pswp)||void 0===i||i.off(t,e)}dispatch(t,e){var i;if(this.pswp)return this.pswp.dispatch(t,e);const s=new a(t,e);return null===(i=this.u[t])||void 0===i||i.forEach((t=>{t.call(this,s)})),s}}{getNumItems(){var t;let e=0;const i=null===(t=this.options)||void 0===t?void 0:t.dataSource;i&&"length"in i?e=i.length:i&&"gallery"in i&&(i.items||(i.items=this.v(i.gallery)),i.items&&(e=i.items.length));const s=this.dispatch("numItems",{dataSource:i,numItems:e});return this.applyFilters("numItems",s.numItems,i)}createContentFromData(t,e){return new h(t,this,e)}getItemData(t){var e;const i=null===(e=this.options)||void 0===e?void 0:e.dataSource;let s={};Array.isArray(i)?s=i[t]:i&&"gallery"in i&&(i.items||(i.items=this.v(i.gallery)),s=i.items[t]);let n=s;n instanceof Element&&(n=this.m(n));const r=this.dispatch("itemData",{itemData:n||{},index:t});return this.applyFilters("itemData",r.itemData,t)}v(t){var e,i;return null!==(e=this.options)&&void 0!==e&&e.children||null!==(i=this.options)&&void 0!==i&&i.childSelector?r(this.options.children,this.options.childSelector,t)||[]:[t]}m(t){const e={element:t},i="A"===t.tagName?t:t.querySelector("a");if(i){e.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(e.srcset=i.dataset.pswpSrcset),e.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,e.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,e.w=e.width,e.h=e.height,i.dataset.pswpType&&(e.type=i.dataset.pswpType);const n=t.querySelector("img");var s;n&&(e.msrc=n.currentSrc||n.src,e.alt=null!==(s=n.getAttribute("alt"))&&void 0!==s?s:""),(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0)}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return u(t,this,e)}}{constructor(t){super(),this.options=t||{},this.g=0,this.shouldOpen=!1,this._=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){r(this.options.gallery,this.options.gallerySelector).forEach((t=>{t.addEventListener("click",this.onThumbnailsClick,!1)}))}onThumbnailsClick(t){if(function(t){return"button"in t&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}(t)||window.pswp)return;let e={x:t.clientX,y:t.clientY};e.x||e.y||(e=null);let i=this.getClickedIndex(t);i=this.applyFilters("clickedIndex",i,t,this);const s={gallery:t.currentTarget};i>=0&&(t.preventDefault(),this.loadAndOpen(i,s,e))}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);const e=t.target,i=r(this.options.children,this.options.childSelector,t.currentTarget).findIndex((t=>t===e||t.contains(e)));return-1!==i?i:this.options.children||this.options.childSelector?-1:0}loadAndOpen(t,e,i){if(window.pswp||!this.options)return!1;if(!e&&this.options.gallery&&this.options.children){const t=r(this.options.gallery);t[0]&&(e={gallery:t[0]})}return this.options.index=t,this.options.initialPointerPos=i,this.shouldOpen=!0,this.preload(t,e),!0}preload(t,e){const{options:i}=this;e&&(i.dataSource=e);const s=[],n=typeof i.pswpModule;if("function"==typeof(r=i.pswpModule)&&r.prototype&&r.prototype.goTo)s.push(Promise.resolve(i.pswpModule));else{if("string"===n)throw new Error("pswpModule as string is no longer supported");if("function"!==n)throw new Error("pswpModule is not valid");s.push(i.pswpModule())}var r;"function"==typeof i.openPromise&&s.push(i.openPromise()),!1!==i.preloadFirstSlide&&t>=0&&(this._=function(t,e){const i=e.getItemData(t);if(!e.dispatch("lazyLoadSlide",{index:t,itemData:i}).defaultPrevented)return u(i,e,t)}(t,this));const o=++this.g;Promise.all(s).then((t=>{if(this.shouldOpen){const e=t[0];this.I(e,o)}}))}I(t,e){if(e!==this.g&&this.shouldOpen)return;if(this.shouldOpen=!1,window.pswp)return;const i="object"==typeof t?new t.default(this.options):new t(this.options);this.pswp=i,window.pswp=i,Object.keys(this.u).forEach((t=>{var e;null===(e=this.u[t])||void 0===e||e.forEach((e=>{i.on(t,e)}))})),Object.keys(this.p).forEach((t=>{var e;null===(e=this.p[t])||void 0===e||e.forEach((e=>{i.addFilter(t,e.fn,e.priority)}))})),this._&&(i.contentLoader.addToCache(this._),this._=void 0),i.on("destroy",(()=>{this.pswp=void 0,delete window.pswp})),i.init()}destroy(){var t;null===(t=this.pswp)||void 0===t||t.destroy(),this.shouldOpen=!1,this.u={},r(this.options.gallery,this.options.gallerySelector).forEach((t=>{t.removeEventListener("click",this.onThumbnailsClick,!1)}))}}})),!function(t,e){"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,(function(){function t(){}let e=t.prototype;return e.on=function(t,e){if(!t||!e)return this;let i=this._events=this._events||{},s=i[t]=i[t]||[];return s.includes(e)||s.push(e),this},e.once=function(t,e){if(!t||!e)return this;this.on(t,e);let i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this},e.off=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;let s=i.indexOf(e);return-1!=s&&i.splice(s,1),this},e.emitEvent=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;i=i.slice(0),e=e||[];let s=this._onceEvents&&this._onceEvents[t];for(let n of i)s&&s[n]&&(this.off(t,n),delete s[n]),n.apply(this,e);return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t})),function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,(function(t,e){let i=t.jQuery,s=t.console;function n(t,e,r){if(!(this instanceof n))return new n(t,e,r);let o=t;var a;"string"==typeof t&&(o=document.querySelectorAll(t)),o?(this.elements=(a=o,Array.isArray(a)?a:"object"==typeof a&&"number"==typeof a.length?[...a]:[a]),this.options={},"function"==typeof e?r=e:Object.assign(this.options,e),r&&this.on("always",r),this.getImages(),i&&(this.jqDeferred=new i.Deferred),setTimeout(this.check.bind(this))):s.error(`Bad element for imagesLoaded ${o||t}`)}n.prototype=Object.create(e.prototype),n.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};const r=[1,9,11];n.prototype.addElementImages=function(t){"IMG"===t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);let{nodeType:e}=t;if(!e||!r.includes(e))return;let i=t.querySelectorAll("img");for(let t of i)this.addImage(t);if("string"==typeof this.options.background){let e=t.querySelectorAll(this.options.background);for(let t of e)this.addElementBackgroundImages(t)}};const o=/url\((['"])?(.*?)\1\)/gi;function a(t){this.img=t}function l(t,e){this.url=t,this.element=e,this.img=new Image}return n.prototype.addElementBackgroundImages=function(t){let e=getComputedStyle(t);if(!e)return;let i=o.exec(e.backgroundImage);for(;null!==i;){let s=i&&i[2];s&&this.addBackground(s,t),i=o.exec(e.backgroundImage)}},n.prototype.addImage=function(t){let e=new a(t);this.images.push(e)},n.prototype.addBackground=function(t,e){let i=new l(t,e);this.images.push(i)},n.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();let t=(t,e,i)=>{setTimeout((()=>{this.progress(t,e,i)}))};this.images.forEach((function(e){e.once("progress",t),e.check()}))},n.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&s&&s.log(`progress: ${i}`,t,e)},n.prototype.complete=function(){let t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){let t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},a.prototype=Object.create(e.prototype),a.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},a.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},a.prototype.confirm=function(t,e){this.isLoaded=t;let{parentNode:i}=this.img,s="PICTURE"===i.nodeName?i:this.img;this.emitEvent("progress",[this,s,e])},a.prototype.handleEvent=function(t){let e="on"+t.type;this[e]&&this[e](t)},a.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},a.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},a.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},l.prototype=Object.create(a.prototype),l.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},l.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},l.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},n.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&(i=e,i.fn.imagesLoaded=function(t,e){return new n(this,t,e).jqDeferred.promise(i(this))})},n.makeJQueryPlugin(),n})),!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],(function(i){return e(t,i)})):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,(function(t,e){"use strict";function i(i,r,a){(a=a||e||t.jQuery)&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){return"string"==typeof t?function(t,e,s){var n,r="$()."+i+'("'+e+'")';return t.each((function(t,l){var h=a.data(l,i);if(h){var d=h[e];if(d&&"_"!=e.charAt(0)){var c=d.apply(h,s);n=void 0===n?c:n}else o(r+" is not a valid method")}else o(i+" not initialized. Cannot call methods, i.e. "+r)})),void 0!==n?n:t}(this,t,n.call(arguments,1)):(function(t,e){t.each((function(t,s){var n=a.data(s,i);n?(n.option(e),n._init()):(n=new r(s,e),a.data(s,i,n))}))}(this,t),this)},s(a))}function s(t){!t||t&&t.bridget||(t.bridget=i)}var n=Array.prototype.slice,r=t.console,o=void 0===r?function(){}:function(t){r.error(t)};return s(e||t.jQuery),i})),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,(function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},s=i[t]=i[t]||[];return-1==s.indexOf(e)&&s.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var s=i.indexOf(e);return-1!=s&&i.splice(s,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var s=this._onceEvents&&this._onceEvents[t],n=0;n