1function Fe(o,t){var e,i,s=document.querySelectorAll(o),n=t||"js-reframe";"length"in s||(s=[s]);for(var r=0;r<s.length;r+=1){var a=s[r],l=a.className.split(" ").indexOf(n)!==-1;if(l||a.style.width.indexOf("%")>-1)return;var h=a.getAttribute("height")||a.offsetHeight,d=a.getAttribute("width")||a.offsetWidth,p=typeof h=="string"?parseInt(h):h,v=typeof d=="string"?parseInt(d):d,y=p/v*100,c=document.createElement("div");c.className=n;var f=c.style;f.position="relative",f.width="100%",f.paddingTop="".concat(y,"%");var g=a.style;g.position="absolute",g.width="100%",g.height="100%",g.left="0",g.top="0",(e=a.parentNode)===null||e===void 0||e.insertBefore(c,a),(i=a.parentNode)===null||i===void 0||i.removeChild(a),c.appendChild(a)}}const jt="https://cdn.jsdelivr.net/npm/[email protected]/icons/";class Ne extends HTMLElement{constructor(){super(),this._iconClass=this.getAttribute("class")||""}connectedCallback(){const t=this.getAttribute("icon");t&&(this.innerHTML=` 2 <svg 3 class="${this._iconClass}" 4 width="1em" 5 height="1em" 6 style="background: currentColor; -webkit-mask-image:url(${jt}${t}.svg);-webkit-mask-repeat:no-repeat;-webkit-mask-position:center;mask-image:url(${jt}${t}.svg);mask-repeat:no-repeat;mask-position:center;mask-size:100%"> 7 </svg> 8 `)}}customElements.get("svg-icon")||customElements.define("svg-icon",Ne);function Ze(o,t=window){const e=o.split(".");let i=t;for(let s=0;s<e.length;s++){if(i==null||!i.hasOwnProperty(e[s]))return;i=i[e[s]]}return i}function qe(o){if(!o||o.startsWith("#")||o.startsWith("javascript:"))return!1;try{return new URL(o,window.location.origin).hostname!==window.location.hostname}catch{return!1}}function We(o){const t=document.createElement("textarea");return t.innerHTML=o,t.value}function Ue(o){const t=o.label?We(o.label):"",i=t?.match(/\[icon=([^\]]+)\]/)?.[1]?.replace(/^['"\s]+|['"\s]+$/g,""),s=t?.replace(/\[icon=[^\]]+\]/,"").trim(),n=o.url||"",r=window.location.pathname,a=n?r===n:!1;return{icon:i,label:s||"",url:n,isExternal:qe(n),isCurrent:a}}function Ge(o){if(!o||!Array.isArray(o)||o.length===0)return[];const t=[];let e=null;for(const i of o){const s=Ue(i);if(s.url==="#")e={title:s.label,items:[]},t.push(e);else if(s.label.startsWith("-"))if(e){const n=s.label.replace(/^-\s*/,"").trim();e.items.push({icon:s.icon,label:n,url:s.url,isExternal:s.isExternal,isCurrent:s.isCurrent})}else{const n=s.label.replace(/^-\s*/,"").trim();t.push({icon:s.icon,label:n,url:s.url,isExternal:s.isExternal,isCurrent:s.isCurrent})}else t.push({icon:s.icon,label:s.label,url:s.url,isExternal:s.isExternal,isCurrent:s.isCurrent}),e=null}return t}function Ve(o){if(o<=0)return"grid-cols-1";const t=["grid-cols-2 sm:grid-cols-1","grid-cols-2 sm:grid-cols-2","grid-cols-2 sm:grid-cols-3","grid-cols-2 sm:grid-cols-4"],e=Math.min(o-1,3);return t[e]}class Ke extends HTMLElement{constructor(){super(),this._items=[],this._orientation="vertical",this.render=()=>{const e=`${this._orientation==="horizontal"?`grid gap-8 ${Ve(this._items.length)}`:"flex flex-col"} ${this._navClass}`,i=this._ariaLabel?`aria-label="${this._ariaLabel}"`:"";this.innerHTML=` 9 <nav role="navigation" class="${e}" ${i}> 10 ${this._items.map(s=>this.renderItem(s)).join("")} 11 </nav> 12 `},this.renderItem=t=>"items"in t?this.renderGroup(t):this.renderNavigationItem(t),this.renderGroup=t=>` 13 <div class="${this._groupClass}"> 14 ${t.title?`<div class="${this._groupHeaderClass}">${t.title}</div>`:""} 15 ${t.items.map(e=>this.renderGroupItem(e)).join("")} 16 </div> 17 `,this.renderNavigationItem=t=>{const e=t.isExternal?'target="_blank" rel="noopener noreferrer"':"",i=t.isCurrent?'aria-current="page"':"";return` 18 <a href="${t.url}" class="flex items-center ${this._itemClass}" ${e} ${i}> 19 ${t.icon?`<svg-icon icon="${t.icon}" class="mr-1 ${this._iconClass}"></svg-icon>`:""} 20 ${t.label} 21 </a> 22 `},this.renderGroupItem=t=>{const e=t.isExternal?'target="_blank" rel="noopener noreferrer"':"",i=t.isCurrent?'aria-current="page"':"";return` 23 <a href="${t.url}" class="flex items-center ${this._groupItemClass}" ${e} ${i}> 24 ${t.icon?`<svg-icon icon="${t.icon}" class="mr-1 ${this._iconClass}"></svg-icon>`:""} 25 ${t.label} 26 </a> 27 `},this._items=Ge(Ze(this.getAttribute("values-path")||"",window)),this._navClass=this.getAttribute("nav
27-class")||"",this._itemClass=this.getAttribute("item-class")||"text-base font-medium",this._groupClass=this.getAttribute("group-class")||"flex flex-col gap-y-1",this._groupHeaderClass=this.getAttribute("group-header-class")||"text-lg font-bold",this._groupItemClass=this.getAttribute("group-item-class")||"text-base font-medium",this._orientation=this.getAttribute("orientation")||"vertical",this._iconClass=this.getAttribute("icon-class")||"size-[1em]",this._showExternalIcon=this.getAttribute("show-external-icon")==="true",this._ariaLabel=this.getAttribute("aria-label")||""}connectedCallback(){this.render()}}customElements.get("menu-nav")||customElements.define("menu-nav",Ke);const N=window.themeConfig,Yt={container:"social-icons",icon:"social-icon"};class je extends HTMLElement{constructor(){super(),this._socialLinks=[],this.render=()=>{if(Object.keys(this._socialLinks).length===0){this.style.display="none";return}this.innerHTML=` 28 <div class="${Yt.container} ${this._cssClass}" role="navigation" aria-label="${this._ariaLabel}"> 29 ${this._socialLinks.map(this.renderSocialIcon).join("")} 30 </div> 31 `},this.renderSocialIcon=({name:t,url:e})=>{if(!e)return"";const s=(n=>({facebook:"scale-95",linkedin:"scale-115",instagram:"scale-125",tiktok:"scale-125",youtube:"scale-125",threads:"scale-90",bluesky:"scale-80",mastodon:"scale-120",globe:"scale-95",pinterest:"scale-105",reddit:"scale-110",telegram:"scale-115"})[n]||"")(t);return` 32 <a 33 href="${e}" 34 class="${Yt.icon} ${s}" 35 data-icon="${t}" 36 target="_blank" 37 rel="noopener" 38 aria-label="${t}" 39 ></a> 40 `},this._socialLinks=this.getSocialLinks(),this._cssClass=this.getAttribute("class")||"",this._ariaLabel=this.getAttribute("aria-label")||"Social Media Links"}getSocialLinks(){const t=[];return N?.site?.facebook&&t.push({name:"facebook",url:`https://facebook.com/${N.site.facebook}`}),N?.site?.twitter&&t.push({name:"x",url:`https://x.com/${N.site.twitter}`}),window.social&&Object.entries(window.social).forEach(([e,i])=>{t.push({name:e.toLowerCase(),url:i})}),t}connectedCallback(){this.render()}}customElements.get("social-icons")||customElements.define("social-icons",je);const Ye={container:"scroll-indicator"};class Xe extends HTMLElement{constructor(){super(),this._circle=null,this.CIRCLE_RADIUS=47,this.CIRCLE_LENGTH=2*Math.PI*this.CIRCLE_RADIUS,this.FADE_THRESHOLD=100,this.handleScroll=()=>{this.updateCircleProgress(),this.updateOpacity()},this.handleResize=()=>{this.checkVisibilityAndUpdate()},this.scrollToTop=()=>{window.scrollTo({top:0,behavior:"smooth"})},this._cssClass=this.getAttribute("class")||"",this._icon=this.getAttribute("icon")||"arrow_up"}connectedCallback(){this.render(),this._circle=this.querySelector("circle"),this.initializeEventListeners(),this.checkVisibilityAndUpdate(),this.updateCircleProgress()}disconnectedCallback(){window.removeEventListener("scroll",this.handleScroll),window.removeEventListener("resize",this.handleResize),this.removeEventListener("click",this.scrollToTop)}render(){this.innerHTML=` 41 <div class="${Ye.container} ${this._cssClass}" data-icon="${this._icon}"> 42 <svg viewBox="0 0 100 100" overflow="visible"> 43 <circle cx="50" cy="50" r="${this.CIRCLE_RADIUS}" /> 44 </svg> 45 </div> 46 `}initializeEventListeners(){window.addEventListener("scroll",this.handleScroll),window.addEventListener("resize",this.handleResize),this.addEventListener("click",this.scrollToTop)}checkVisibilityAndUpdate(){const t=document.documentElement.scrollHeight,e=window.innerHeight;t>e*2?(this.style.display="flex",this.updateOpacity()):this.style.display="none"}updateCircleProgress(){if(!this._circle)return;const t=document.documentElement.scrollHeight-window.innerHeight,e=window.scrollY,i=Math.min(e/t,1),s=this.CIRCLE_LENGTH*(1-i);this._circle.style.strokeDasharray=`${this.CIRCLE_LENGTH}`,this._circle.style.strokeDashoffset=`${s}`}updateOpacity(){const t=window.scrollY;
46if(t<this.FADE_THRESHOLD){const e=t/this.FADE_THRESHOLD;this.style.opacity=e.toString()}else this.style.opacity="1"}}customElements.get("scroll-indicator")||customElements.define("scroll-indicator",Xe);const Qe=(o,t)=>{let e=!0;const i={x:0,y:0},s={x:0,y:0},n={x:0,y:0},r=new Proxy({x:0,y:0},{set(u,m,w){return u[m]===w||(u[m]=w,(u.x>=10||u.y>=10)&&R(!0)),!0}}),a=new Proxy({x:!1,y:!1},{set(u,m,w){return u[m]===w||(u[m]=w,u.x||u.y?(o.setAttribute("has-overflow","true"),o.addEventListener("pointerdown",$t),o.addEventListener("wheel",Ft,{passive:!1})):(o.removeAttribute("has-overflow"),o.removeEventListener("pointerdown",$t),o.removeEventListener("wheel",Ft))),!0}});let l=300,h=null,d=!1,p=300,v=300,y=300,c=300;const f={start:0,end:0};let g=[],_=null,b=null,E=null,T=!1,at,k=1,z={target:null,x:0};function Le(){o?.setAttribute("blossom-carousel","true"),_=o?.querySelectorAll("a[href]")||null,_?.forEach(w=>{w.addEventListener("click",Dt)}),window.addEventListener("keydown",Nt),o.addEventListener("scroll",Mt),b=new ResizeObserver(Rt),b.observe(o),E=new MutationObserver(Ce),E.observe(o,{attributes:!1,childList:!0,subtree:!1});const u=window.matchMedia("(hover: hover) and (pointer: fine)").matches;k=o.closest('[dir="rtl"]')?-1:1;const{scrollSnapType:m}=window.getComputedStyle(o);T=m!=="none",o.style.setProperty("--snap-type",m),u&&(o.style["scroll-snap-type"]="none"),o.setAttribute("has-repeat","false"),at=Re(w=>{(w===o||o.contains(w))&&R(!1)})}function Pe(){o.removeAttribute("blossom-carousel"),b?.disconnect(),E?.disconnect(),h&&cancelAnimationFrame(h),window.removeEventListener("keydown",Nt),o.removeEventListener("scroll",Mt),_?.forEach(u=>{u.removeEventListener("click",Dt)}),at?.()}function Dt(u){r.x>10&&u.preventDefault()}function Rt(){if(!o)return;const u="ontouchmove"in window;p=o.scrollWidth,v=o.clientWidth,y=o.scrollHeight,c=o.clientHeight;const m=window.getComputedStyle(o);a.x=!u&&p>v&&["auto","scroll"].includes(m.getPropertyValue("overflow-x")),a.y=!u&&y>c&&["auto","scroll"].includes(m.getPropertyValue("overflow-y")),parseInt(m.paddingInlineEnd),parseInt(m.paddingInlineStart),f.start=parseInt(m.scrollPaddingInlineStart)||0,f.end=parseInt(m.scrollPaddingInlineEnd)||0,k=o.closest('[dir="rtl"]')?-1:1,l=(p-v-4)*k,g=T?Ae(o):[]}function Ce(){Rt()}function Ae(u){let m=[],w=0;const C=x=>{if(w++,w>100)return;const M=window.getComputedStyle(x).scrollSnapAlign;if(M!=="none"){m.push({align:M,el:x});return}const pt=x.children;if(pt.length!==0)for(let ft of pt)C(ft)};C(u);const Be=u.getBoundingClientRect();return m.map(({el:x,align:M},pt)=>{const ft=x.getBoundingClientRect(),Kt=x.clientWidth,mt=ft.left-Be.left+u.scrollLeft;switch(M){case"start":return{target:x,x:mt-f.start};case"end":return{target:x,x:mt+Kt-v+f.end};case"center":return{target:x,x:mt+Kt*.5-v/2};default:return null}}).filter(x=>x!==null).reduce((x,M)=>((x.length===0||x[x.length-1].x!==M.x)&&x.push(M),x),[])}function Mt(){if(d||!o)return;const u=o.scrollLeft;if(u<0){const m=u*-1;dt(m)}else if(u>p-v){const m=u*-1+p-v;dt(m)}}const L={x:0,y:0};function $t(u){o&&(a.x&&(L.x=o.scrollLeft,i.x=u.clientX,n.x=0),a.y&&(L.y=o.scrollTop,i.y=u.clientY,n.y=0),r.x=0,d=!0,window.addEventListener("pointermove",Ht),window.addEventListener("pointerup",Bt))}function Ht(u){if(u.preventDefault(),a.x){const m=i.x-u.clientX;s.x+=m,n.x+=m,i.x=u.clientX,r.x+=Math.abs(m)}if(a.y){const m=i.y-u.clientY;s.y+=m,n.y+=m,i.y=u.clientY,r.y+=Math.abs(m)}}function Bt(){window.removeEventListener("pointermove",Ht),window.removeEventListener("pointerup",Bt),d=!1,!(r.x<=10)&&(a.x&&(n.x*=2),a.y&&(n.y*=2),Ie(),$e())}function Ft(u){if(Math.abs(u.deltaX)>Math.abs(u.deltaY)){if(R(!1),d||!o)return;a.x&&(L.x=o.scrollLeft),a.y&&(L.y=o.scrollTop)}}function Nt(u){["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(u.key)&&R(!1)}function Ie(){const u=Gt({axis:"x"});u.x!==z.x&&Ut(u),z=u;const m=(Vt(u.x,Math.min((p-v)*k,0),Math.max((p-v)*k,0))-s.x)*(1-D)*(1/D);n.x=m}function Zt(u){ht&&u.stopPropagation()}const D=.72,lt=.12;let ht=!1;function R(u){o&&(u&&!ht?(ct=performance.now(),a.x&&(s.x=o.scrollLeft),a.y&&(s.y=o.scrollTop),o.addEventListener("scrollend",Zt,{capture:!0,passive:!1}),h||(h=requestAnimationFrame(qt))):u||(h&&cancelAnimationFrame(h),h=null,o.removeEventListener("scrollend",Zt)),ht=u,e=!u,o.setAttribute("has-snap",e?"true":"false"))}let B=0,ct=0;function qt(u){if(h=requestAnimationFrame(qt),B=u-ct,!!o){if(a.x&&(n.x*=D,d?L.x=U(L.x,s.x,D,B):(s.x+=n.x,L.x=U(L.x,s.x,lt,B))),a.y&&(n.y*=D,d?L.y=U(L.y,s.y,D,B):(s.y+=n.y,L.y=U(L.y,s.y,lt,B))),W=!0,o.scrollTo({left:L.x,top:L.y,behavior:"instant"}),d&&T){const m=Gt({axis:"x"});m.x!==z.x&&(z=m,Ut(m))}!d&&ut(n.x,8)===0&&(R(!1),Oe(),T&&ke()),Te(ut(L.x,2)),ct=u}}let F=0;function Te(u){if(!o)return;const m=l;let w=0;if(u*k<=0?w=d?u*-.2:0:u*k>m*k&&(w=d?(u-m)*-.2:0),F=U(F,w,d?.8:lt,B),Math.abs(F)>.01){if(dt(F).defaultPrevented)return;o.style.transform=`translateX(${ut(F,3)}px)`;return}o.style.transform="",F=0}function dt(u){const m=new CustomEvent("overscroll",{bubbles:!0,cancelable:!0,detail:{left:u}});return o?.dispatchEvent(m),m}const Wt=new Event("scrollend",{bubbles:!0,cancelable:!0});function Oe(){return o?.dispatchEvent(Wt),Wt}function ke(){const u=new CustomEvent("scrollsnapchange",{bubbles:!0,cancelable:!0,detail:{snapTargetInline:z.target,snapTargetBlock:z.target}});return o?.dispatchEvent(u),u}function Ut(u){const m=new CustomEvent("scrollsnapchanging",{bubbles:!0,cancelable:!0,detail:{snapTargetInline:(u||z).target,snapTargetBlock:(u||z).target}});return o?.dispatchEvent(m),m}let W=!1;const ze=o.scrollTo.bind(o);o.scrollTo=function(u){W===!0||R(!1),W=!1,ze(u)};const De=o.scrollBy.bind(o);o.scrollBy=function(u){W===!0||R(!1),W=!1,De(u)};function Re(u){const m=[],w=Element.prototype.scrollIntoView;return w&&(Element.prototype.scrollIntoView=function(C){return u(this,"scrollIntoView",[C]),w.call(this,C)},m.push(()=>{Element.prototype.scrollIntoView=w}
46)),()=>m.forEach(C=>C())}function Me({axis:u="x"}){return s[u]+n[u]/(1-D)}function Gt({axis:u="x"}){const m=Me({axis:u});return g.length?g.reduce((w,C)=>Math.abs(C.x-m)<Math.abs(w.x-m)?C:w):{target:null,x:Vt(m,Math.min(l,0),Math.max(l,0))}}function $e(){const u=m=>{m.preventDefault(),m.stopPropagation(),window.removeEventListener("click",u,!0)};window.addEventListener("click",u,!0)}function He(u,m,w){return(1-w)*u+w*m}function U(u,m,w,C){return He(u,m,1-Math.exp(Math.log(1-w)*(C/16.666666666666668)))}function Vt(u,m,w){return u<m?m:u>w?w:u}function ut(u,m=0){const w=Math.pow(10,m);return Math.round(u*w)/w}return{snap:e,hasOverflow:a,init:Le,destroy:Pe}};class Je extends HTMLElement{constructor(){super(),this.blossom=null,this.contentElement=null,this.prevButton=null,this.nextButton=null,this.handlePrevClick=()=>{this.isElementDisabled(this.prevButton)||(this.blossom&&this.blossom.prev?this.blossom.prev():this.handlePrevClickFallback(),setTimeout(()=>this.updateNavigationState(),50))},this.handleNextClick=()=>{this.isElementDisabled(this.nextButton)||(this.blossom&&this.blossom.next?this.blossom.next():this.handleNextClickFallback(),setTimeout(()=>this.updateNavigationState(),50))},this.handlePrevClickFallback=()=>{if(!this.contentElement)return;const t=this.contentElement.clientWidth*.8,e=this.isRTL?t:-t;this.contentElement.scrollBy({left:e,behavior:"smooth"})},this.handleNextClickFallback=()=>{if(!this.contentElement)return;const t=this.contentElement.clientWidth*.8,e=this.isRTL?-t:t;this.contentElement.scrollBy({left:e,behavior:"smooth"})},this.isLazy=this.getAttribute("lazy")!=="false",this.isRTL=document.documentElement.getAttribute("dir")==="rtl"}connectedCallback(){this.render(),this.setInitialState(),this.init()}disconnectedCallback(){this.destroy()}render(){const t=this.querySelector('[slot="prev"]'),e=this.querySelector('[slot="content"]'),i=this.querySelector('[slot="next"]');this.innerHTML=` 47 ${t?t.outerHTML:""} 48 ${e?e.outerHTML:""} 49 ${i?i.outerHTML:""} 50 `,this.contentElement=this.querySelector('[slot="content"]'),this.prevButton=this.querySelector('[slot="prev"]'),this.nextButton=this.querySelector('[slot="next"]')}setInitialState(){this.prevButton&&(this.prevButton.setAttribute("disabled",""),this.prevButton.setAttribute("data-disabled","true"),this.prevButton.classList.add("disabled")),this.nextButton&&(this.nextButton.removeAttribute("disabled"),this.nextButton.removeAttribute("data-disabled"),this.nextButton.classList.remove("disabled"))}
50async init(){if(this.contentElement){if(this.isLazy&&!window.matchMedia("(hover: hover) and (pointer: fine)").matches){this.setupFallbackNavigation();return}try{this.blossom=Qe(this.contentElement),this.isRTL&&this.contentElement&&this.contentElement.setAttribute("dir","rtl"),await this.blossom.init(),this.setupNavigation(),this.setupScrollTracking(),this.updateNavigationState()}catch(t){console.warn("Carousel initialization failed, falling back to native scroll:",t),this.setupFallbackNavigation(),this.setupScrollTracking(),this.updateNavigationState()}}}setupNavigation(){this.prevButton&&this.prevButton.addEventListener("click",this.handlePrevClick),this.nextButton&&this.nextButton.addEventListener("click",this.handleNextClick)}setupFallbackNavigation(){this.contentElement&&(this.prevButton&&this.prevButton.addEventListener("click",this.handlePrevClickFallback),this.nextButton&&this.nextButton.addEventListener("click",this.handleNextClickFallback))}setupScrollTracking(){if(!this.contentElement)return;let t;const e=()=>{clearTimeout(t),t=window.setTimeout(()=>{this.updateNavigationState()},100)};this.contentElement.addEventListener("scroll",e,{passive:!0}),window.addEventListener("resize",()=>this.updateNavigationState())}updateNavigationState(){if(!this.contentElement||!this.prevButton||!this.nextButton)return;const{scrollLeft:t,scrollWidth:e,clientWidth:i}=this.contentElement,s=this.isRTL?t>=0:t<=0,n=this.isRTL?Math.abs(t)>=e-i-1:t>=e-i-1;s?(this.prevButton.setAttribute("disabled",""),this.prevButton.setAttribute("data-disabled","true"),this.prevButton.classList.add("disabled")):(this.prevButton.removeAttribute("disabled"),this.prevButton.removeAttribute("data-disabled"),this.prevButton.classList.remove("disabled")),n?(this.nextButton.setAttribute("disabled",""),this.nextButton.setAttribute("data-disabled","true"),this.nextButton.classList.add("disabled")):(this.nextButton.removeAttribute("disabled"),this.nextButton.removeAttribute("data-disabled"),this.nextButton.classList.remove("disabled"))}isElementDisabled(t){return t?t.hasAttribute("disabled")||t.hasAttribute("data-disabled")||t.classList.contains("disabled"):!0}destroy(){this.blossom&&this.blossom.destroy&&(this.blossom.destroy(),this.blossom=null),this.prevButton&&(this.prevButton.removeEventListener("click",this.handlePrevClick),this.prevButton.removeEventListener("click",this.handlePrevClickFallback)),this.nextButton&&(this.nextButton.removeEventListener("click",this.handleNextClick),this.nextButton.removeEventListener("click",this.handleNextClickFallback))}getCarouselInstance(){return this.blossom}}customElements.get("carousel-component")||customElements.define("carousel-component",Je);class ti extends HTMLElement{constructor(){super(),this.contentSlot=null,this.targetSlot=null,this.contentWrapper=null,this.isOpen=!1,this.attachShadow({mode:"open"})}static get observedAttributes(){return["open"]}connectedCallback(){this.render(),this.setupEventListeners(),this.hasAttribute("open")&&(this.isOpen=!0,this.updateOpenState()),this.updateAriaAttributes()}attributeChangedCallback(t,e,i){t==="open"&&e!==i&&(this.isOpen=this.hasAttribute("open"),this.contentWrapper&&this.targetSlot&&this.updateOpenState())}render(){this.shadowRoot&&(this.shadowRoot.innerHTML=` 51 <style> 52 :host { 53 display: block; 54 width: 100%; 55 } 56 57 .accordion-target { 58 cursor: pointer; 59 user-select: none; 60 } 61 62 .accordion-content-wrapper { 63 overflow: hidden; 64 transition: height 0.3s ease-out; 65 height: 0; 66 } 67 </style> 68 69 <div class="accordion-target" part="target"> 70 <slot name="target"></slot> 71 </div> 72 73 <div class="accordion-content-wrapper" part="content-wrapper"> 74 <div class="accordion-content" part="content"> 75 <slot name="content"></slot> 76 </div> 77 </div> 78 `,this.targetSlot=this.shadowRoot.querySelector(".accordion-target"),this.contentWrapper=this.shadowRoot.querySelector(".accordion-content-wrapper"))}setupEventListeners(){this.targetSlot&&(this.targetSlot.addEventListener("click",()=>this.toggle()),this.targetSlot.addEventListener("keydown",t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this.toggle())}))}updateOpenState(){if(!(!this.contentWrapper||!this.targetSlot)){if(this.isOpen){const t=this.contentWrapper.scrollHeight;this.contentWrapper.style.height=`${t}px`,this.setAttribute("open","")}else this.contentWrapper.style.height="0",this.removeAttribute("open");this.updateAriaAttributes()}}toggle(){this.isOpen=!this.isOpen,this.updateOpenState(),this.dispatchEvent(new CustomEvent("accordion-toggle",{detail:{isOpen:this.isOpen}}))}updateAriaAttributes(){if(!this.targetSlot||!this.contentWrapper)return;const t=`accordion-content-${this._generateId()}`;this.contentWrapper.id=t,this.targetSlot.setAttribute("role","button"),this.targetSlot.setAttribute("aria-expanded",this.isOpen.toString()),this.targetSlot.setAttribute("aria-controls",t),this.targetSlot.setAttribute("tabindex","0"),this.contentWrapper.setAttribute("role","regi
78on"),this.contentWrapper.setAttribute("aria-labelledby",`accordion-target-${this._generateId()}`),this.contentWrapper.setAttribute("aria-hidden",(!this.isOpen).toString())}_generateId(){return Math.random().toString(36).substring(2,9)}}customElements.get("accordion-component")||customElements.define("accordion-component",ti);function ei(o,t){let e;return function(...i){const s=this;e||(o.apply(s,i),e=!0,setTimeout(()=>e=!1,t))}}class ii extends HTMLElement{constructor(){super(),this.triggerSlot=null,this.tooltipContent=null,this.triggerElement=null,this.contentId=`tooltip-content-${crypto.randomUUID()}`,this.isOpen=!1,this.mouseIsDown=!1,this.handleMouseDown=()=>{this.mouseIsDown=!0},this.handleMouseUp=()=>{this.mouseIsDown=!1},this.handleFocus=()=>{this.mouseIsDown||this.show()},this.handleFocusOut=t=>{this.contains(t.relatedTarget)||this.hide()},this.handleKeyDown=t=>{this.isOpen&&t.key==="Escape"&&(this.isFocusInsideContent()&&this.triggerElement?.focus(),this.hide())},this.handleClickOutside=t=>{this.isOpen&&!this.contains(t.target)&&this.hide()},this.show=()=>{this.isOpen||!this.tooltipContent||!this.triggerElement||(this.isOpen=!0,this.tooltipContent.setAttribute("aria-hidden","false"),this.triggerElement.setAttribute("aria-expanded","true"),requestAnimationFrame(()=>{this.positionTooltip()}),document.addEventListener("click",this.handleClickOutside,!0))},this.hide=()=>{!this.isOpen||!this.tooltipContent||(this.isOpen=!1,this.tooltipContent.setAttribute("aria-hidden","true"),this.triggerElement?.setAttribute("aria-expanded","false"),document.removeEventListener("click",this.handleClickOutside,!0))},this.toggle=t=>{t.stopPropagation(),this.isOpen?this.hide():this.show()},this.attachShadow({mode:"open"}),this.throttledPositionRecalculator=ei(()=>{this.isOpen&&this.positionTooltip()},100)}static get observedAttributes(){return["direction","align","trigger","offset","arrow"]}connectedCallback(){this.render(),this.setupInitialState(),this.setupEventListeners(),window.addEventListener("resize",this.throttledPositionRecalculator),this.setAttribute("data-ready","true")}disconnectedCallback(){this.removeEventListeners(),window.removeEventListener("resize",this.throttledPositionRecalculator),this.removeAttribute("data-ready")}render(){this.shadowRoot&&(this.shadowRoot.innerHTML=` 79 <style> 80 :host { 81 display: inline-block; 82 position: relative; 83 box-sizing: border-box; 84 } 85 86 .tooltip-content { 87 position: absolute; 88 z-index: 1000; 89 visibility: hidden; 90 opacity: 0; 91 transition: opacity 0.1s ease-out, visibility 0s linear 0.1s; 92 box-sizing: border-box; 93 } 94 95 .tooltip-content::before { 96 content: ''; 97 position: absolute; 98 inset: -${parseInt(this.getAttribute("offset")||"8",10)+2}px; 99 pointer-events: all !important; 100 z-index: -1; 101 } 102 103 .tooltip-content[aria-hidden="false"] { 104 visibility: visible; 105 opacity: 1; 106 pointer-events: auto; 107 transition: opacity 0.1s ease-out, visibility 0s linear 0s; 108 } 109 </style> 110 111 <slot name="trigger"></slot> 112 <div 113 class="tooltip-content" 114 part="content" 115 id="${this.contentId}" 116 role="tooltip" 117 aria-hidden="true" 118 > 119 <slot name="content"></slot> 120 </div> 121 `,this.triggerSlot=this.shadowRoot.querySelector('slot[name="trigger"]'),this.tooltipContent=this.shadowRoot.querySelector(".tooltip-content"))}setupInitialState(){if(!this.triggerSlot)return;const t=this.triggerSlot.assignedElements({flatten:!0});this.triggerElement=t.length>0?t[0]:this,this.triggerElement.setAttribute("aria-describedby",this.contentId),this.triggerElement.setAttribute("aria-expanded","false")}setupEventListeners(){if(!this.triggerElement)return;(this.getAttribute("trigger")||"hover")==="click"?(this.triggerElement.addEventListener("mousedown",this.handleMouseDown),this.triggerElement.addEventListener("mouseup",this.handleMouseUp),this.triggerElement.addEventListener("focus",this.handleFocus),this.triggerElement.addEventListener("click",this.toggle)):(this.triggerElement.addEventListener("focus",this.show),this.triggerElement.addEventListener("mouseenter",this.show),this.addEventListener("mouseleave",this.hide),this.addEventListener("focusout",this.handleFocusOut)),document.addEventListener("keydown",this.handleKeyDown)}removeEventListeners(){this.triggerElement&&(this.triggerElement.removeEventListener("click",this.toggle),this.triggerElement.removeEventListener("mouseenter",this.show),this.removeEventListener("mouseleave",this.hide),this.triggerElement.removeEventListener("focus",this.show),this.triggerElement.removeEventListener("focus",this.handleFocus),this.removeEventListener("focusout",this.handleFocusOut),this.triggerElement.removeEventListener("mousedown",this.handleMouseDown),this.triggerElement.removeEventListener("mouseup",this.handleMouseUp),this.triggerElement.removeAttribute("aria-describedby"),this.triggerElement.removeAttribute("aria-expanded"),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("click",this.handleClickOutside))}isFocusInsideContent(){const t=this.shadowRoot?.querySelector('slot[name="content"]');if(!t)return!1;const e=t.assignedElements({flatten:!0}),i=document.activeElement;if(!i)return!1;for(const s of e)if(s===i||s.contains(i))return!0;return!1}positionTooltip(){if(!this.triggerElement||!this.tooltipContent||!this.isOpen)return;const t=this.triggerElement.getBoundingClientRect(),e=this.getBoundingClientRect(),i=this.tooltipContent.getBoundingClientRect(),s=parseInt(this.getAttribute("offset")||"8",10);let n=this.getAttribute("direction")||"top";const r=this.getAttribute("align")||"center",a=(c,f)=>{let g=0,_=0;const b=()=>{switch(f){case"start":return t.top;case"end":return t.bottom-i.height;default:return t.top+(t.height-i.height)/2}},E=()=>{switch(f){case"start":return t.left;case"end":return t.right-i.width;default:return t.left+(t.width-i.width)/2}};switch(c){case"top":g=t.top-i.height-s,_=E();break;case"bottom":g=t.bottom+s,_=E();break;case"left":g=b(),_=t.left-i.width-s;break;case"right":g=b(),_=t.right+s;break}return{top:g,left:_}},l={start:["start","center","end"],center:["center","start","end"],end:["end","center","start"]},h=l[r]||l.center;let d=h[h.length-1];for(const c of h){const f=a(n,c),g=n==="top"||n==="bottom",_=f.left<0,b=f.left+i.width>window.innerWidth,E=f.top<0,T=f.top+i.height>window.innerHeight;if(g){if(!_&&!b){d=c;break}}else if(!E&&!T){d=c;break}}let p=a(n,d);n==="top"&&p.top<0?n="bottom":n==="bottom"&&p.top+i.height>window.innerHeight?n="top":n==="left"&&p.left<0?n="right":n==="right"&&p.left+i.width>window.innerWidth&&(n="left"),p=a(n,d),p.left<0&&(p.left=0),p.left+i.width>window.innerWidth&&(p.left=window.innerWidth-i.width),p.top<0&&(p.top=0),p.top+i.height>window.innerHeight&&(p.top=window.innerHeight-i.height);const v=p.top-e.top,y=p.left-e.left;this.tooltipContent.style.top=`${v}px`,this.tooltipContent.style.left=`${y}px`,this.getAttribute("arrow")==="true"?(this.dataset.arrowDirection=n,this.positionArrow(n)):(delete this.dataset.arrowDirection,this.style.setProperty("--arrow-top","initial"),this.style.setProperty("--arrow-left","initial"))}positionArrow(t){if(!this.triggerElement||!this.tooltipContent)return;const e=this.triggerElement.getBoundingClientRect(),i=this.tooltipContent.getBoundingClientRect();let s=0,n=0;switch(t){case"top":s=i.height,n=e.left+e.width/2-i.left;break;case"bottom":s=0,n=e.left+e.width/2-i.left;break;case"left":s=e.top+e.height/2-i.top,n=i.width;break;case"right":s=e.top+e.height/2-i.top,n=0;break}this.style.setProperty("--arrow-top",`${s}px`),this.style.setProperty("--arrow-left",`${n}px`)}}customElements.get("tooltip-component")||customElements.define("tooltip-component",ii);class si extends HTMLElement{constructor(){super(),this.button=null,this.iconEl=null,this.textEl=null,this.tooltipContentEl=null,this.handleKeyDown=t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this.handleCopy())},this.handleCopy=async()=>{const t=this.getAttribute("value");if(!t){console.error('CopyButton: "value" attribute is missing.');return}try{await navigator.clipboard.writeText(t),this.showSuccessState()}catch(e){console.error("Failed to copy text: ",e)}}}connectedCallback(){this.render(),this.button=this.querySelector('[role="button"]'),this.iconEl=this.querySelector(".icon"),this.textEl=this.querySelector(".inline-text"),this.tooltipContentEl=this.querySelector(".tooltip-content"),this.updateState(this.getAttribute("label"),this.getAttribute("icon"),this.getAttribute("inline-text")),this.setupEventListeners()}disconnectedCallback(){this.removeEventListeners(),clearTimeout(this.successTimer)}render(){this.style.display="inline-flex",this.style.cursor="pointer";const t=this.getAttribute("button-class")||"",e=this.getAttribute("icon-class")||"",i=this.getAttribute("icon-wrapper-class")||"",s=this.getAttribute("text-class")||"",n=this.getAttribute("tooltip-content-class")||"",r=this.hasAttribute("inline-text"),l=this.hasAttribute("icon-wrapper-class")?`<div class="${i}"><div class="icon ${e}" part="icon" aria-hidden="true"></div></div>`:`<div class="icon ${e}" part="icon" aria-hidden="true"></div>`;this.innerHTML=` 122 <tooltip-component part="tooltip" direction="top" align="center" arrow="true" class="w-full"> 123 <div slot="trigger" part="button" role="button" tabindex="0" class="${t}"> 124 ${l} 125 ${r?`<span class="inline-text ${s}" part="text"></span>`:""} 126 </div>
127 <div slot="content" class="tooltip-content ${n}" part="tooltip-content"></div> 128 </tooltip-component> 129 `}setupEventListeners(){this.button?.addEventListener("click",this.handleCopy),this.button?.addEventListener("keydown",this.handleKeyDown)}removeEventListeners(){this.button?.removeEventListener("click",this.handleCopy),this.button?.removeEventListener("keydown",this.handleKeyDown)}showSuccessState(){const t=this.getAttribute("label-copied"),e=this.getAttribute("icon-copied"),i=this.getAttribute("inline-text-copied"),s=this.getAttribute("label"),n=this.getAttribute("icon"),r=this.getAttribute("inline-text"),a=parseInt(this.getAttribute("success-duration")||"1500",10);this.button?.setAttribute("data-copied","true"),this.updateState(t,e,i),clearTimeout(this.successTimer),this.successTimer=window.setTimeout(()=>{this.button?.removeAttribute("data-copied"),this.updateState(s,n,r)},a)}updateState(t,e,i=null){this.tooltipContentEl&&(this.tooltipContentEl.textContent=t||""),this.iconEl&&(e?(this.iconEl.setAttribute("data-icon",e),this.iconEl.style.display=""):this.iconEl.style.display="none"),this.textEl&&(this.textEl.textContent=i||"")}}customElements.get("copy-button")||customElements.define("copy-button",si);class ni extends HTMLElement{constructor(){super(),this.contentElement=null,this.tocItems=[],this.observer=null,this.activeId="",this.handleLinkClick=t=>{t.preventDefault();const i=t.currentTarget.getAttribute("data-id");if(i){const s=document.getElementById(i);s&&(s.scrollIntoView({behavior:"smooth",block:"start"}),history.pushState(null,"",`#${i}`),this.setActiveLink(i))}}}connectedCallback(){this.findContentElement(),this.contentElement?(this.extractHeadings(),this.tocItems.length>0?(this.render(),this.setupIntersectionObserver()):this.style.display="none"):this.style.display="none"}disconnectedCallback(){this.observer&&this.observer.disconnect()}findContentElement(){const t=this.getAttribute("content-selector")||"[data-content]";this.contentElement=document.querySelector(t)}extractHeadings(){if(!this.contentElement)return;this.contentElement.querySelectorAll("h2, h3").forEach((e,i)=>{const s=e;let n=s.id;n||(n=`heading-${i}-${s.textContent?.trim().toLowerCase().replace(/\s+/g,"-").replace(/[^\w-]/g,"")}`,s.id=n);const r=parseInt(s.tagName.substring(1));this.tocItems.push({id:n,text:s.textContent?.trim()||"",level:r,element:s})})}render(){const t=document.createElement("nav");t.setAttribute("aria-label","Table of contents"),t.innerHTML=this.renderList(),this.appendChild(t),this.querySelectorAll("a[data-id]").forEach(e=>{e.addEventListener("click",this.handleLinkClick)})}renderList(){if(this.tocItems.length===0)return"";const t=this.getAttribute("list-class")||"",e=this.getAttribute("h2-class")||"",i=this.getAttribute("h3-class")||"";return` 130 <ul class="${t}"> 131 ${this.tocItems.map(s=>{const n=s.level===2?e:i;return` 132 <li> 133 <a href="#${s.id}" class="${n}" data-id="${s.id}"> 134 ${s.text} 135 </a> 136 </li> 137 `}).join("")} 138 </ul> 139 `}setupIntersectionObserver(){const t={rootMargin:"-80px 0px -80% 0px",threshold:0};this.observer=new IntersectionObserver(e=>{e.forEach(i=>{i.isIntersecting&&this.setActiveLink(i.target.id)})},t),this.tocItems.forEach(e=>{this.observer?.observe(e.element)})}setActiveLink(t){if(this.activeId===t)return;this.activeId=t,this.querySelectorAll("a[data-id]").forEach(i=>{i.removeAttribute("data-active")});const e=this.querySelector(`a[data-id="${t}"]`);e&&e.setAttribute("data-active","true")}}customElements.get("table-of-contents")||customElements.define("table-of-contents",ni);const Xt={navToggle:"[data-nav-toggle]",navClose:"[data-nav-close]"};class oi{constructor(){this.toggleNav=()=>{document.body.dataset.navOpen=document.body.dataset.navOpen==="true"?"false":"true"},this.closeNav=()=>{document.body.dataset.navOpen="false"},this.handleKeydown=t=>{t.key==="Escape"&&document.body.dataset.navOpen==="true"&&this.closeNav()},this.navToggle=document.querySelectorAll(Xt.navToggle),this.navToggle.forEach(t=>t.addEventListener("click",this.toggleNav)),this.navClose=document.querySelectorAll(Xt.navClose),this.navClose.forEach(t=>t.addEventListener("click",this.closeNav)),document.addEventListener("keydown",this.handleKeydown),window.addEventListener("hashchange",this.closeNav)}}const kt=class kt{constructor(t){this.form=t,this.init()}init(){this.form.addEventListener("submit",t=>this.handleSubmit(t))}async handleSubmit(t){t.preventDefault();try{this.form.classList.add("loading"),this.form.classList.remove("success","error");const e=new FormData(this.form),i=await fetch(this.form.action,{method:this.form.method,body:e});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);console.log(await i.text()),this.form.classList.remove("loading"),this.form.classList.add("success"),this.form.reset()}catch(e){console.error("Form submission error:",e),this.form.classList.remove("loading"),this.form.classList.add("error")}}};kt.SELECTOR="[data-form]";let st=kt;function ri(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var gt={exports:{}},vt={exports:{}},et={exports:{}},ai=et.exports,Qt;function li(){return Qt||(Qt=1,(function(o){(function(t,e){o.exports?o.exports=e():t.EvEmitter=e()})(typeof window<"u"?window:ai,function(){function t(){}let e=t.prototype;return e.on=function(i,s){if(!i||!s)return this;let n=this._events=this._events||{},r=n[i]=n[i]||[];return r.includes(s)||r.push(s),this},e.once=function(i,s){if(!i||!s)return this;this.on(i,s);let n=this._onceEvents=this._onceEvents||{},r=n[i]=n[i]||{};return r[s]=!0,this},e.off=function(i,s){let n=this._events&&this._events[i];if(!n||!n.length)return this;let r=n.indexOf(s);return r!=-1&&n.splice(r,1),this},e.emitEvent=function(i,s){let n=this._events&&this._events[i];if(!n||!n.length)return this;n=n.slice(0),s=s||[];let r=this._onceEvents&&this._onceEvents[i];for(let a of n)r&&r[a]&&(this.off(i,a),delete r[a]),a.apply(this,s);return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t})})(et)),et.exports}var it={exports:{}},hi=it.exports,Jt;function Q(){return Jt||(Jt=1,(function(o){(function(t,e){o.exports?o.exports=e(t):t.fizzyUIUtils=e(t)})(hi,function(e){let i={};i.extend=function(n,r){return Object.assign(n,r)},i.modulo=function(n,r){return(n%r+r)%r},i.makeArray=function(n){return Array.isArray(n)?n:n==null?[]:typeof n=="object"&&typeof n.length=="number"?[...n]:[n]},i.removeFrom=function(n,r){let a=n.indexOf(r);a!=-1&&n.splice(a,1)},i.getParent=function(n,r){for(;n.parentNode&&n!=document.body;)if(n=n.parentNode,n.matches(r))return n},i.getQueryElement=function(n){return typeof n=="string"?document.querySelector(n):n},i.handleEvent=function(n){let r="on"+n.type;this[r]&&this[r](n)},i.filterFindElements=function(n,r){return n=i.makeArray(n),n.filter(a=>a instanceof HTMLElement).reduce((a,l)=>{if(!r)return a.push(l),a;l.matches(r)&&a.push(l);let h=l.querySelectorAll(r);return a=a.concat(...h),a},[])},i.debounceMethod=function(n,r,a){a=a||100;let l=n.prototype[r],h=r+"Timeout";n.prototype[r]=function(){clearTimeout(this[h]);let d=arguments;this[h]=setTimeout(()=>{l.apply(this,d),delete this[h]},a)}},i.docReady=function(n){let r=document.readyState;r=="complete"||r=="interactive"?setTimeout(n):document.addEventListener("DOMContentLoaded",n)},i.toDashed=function(n){return n.replace(/(.)([A-Z])/g,function(r,a,l){return a+"-"+l}).toLowerCase()};let s=e.console;return i.htmlInit=function(n,r){i.docReady(function(){let l="data-"+i.toDashed(r),h=document.querySelectorAll(`[${l}]`),d=e.jQuery;
139[...h].forEach(p=>{let v=p.getAttribute(l),y;try{y=v&&JSON.parse(v)}catch(f){s&&s.error(`Error parsing ${l} on ${p.className}: ${f}`);return}let c=new n(p,y);d&&d.data(p,r,c)})})},i})})(it)),it.exports}var te;function q(){return te||(te=1,(function(o){(function(t,e){o.exports?o.exports=e(t,li(),Q()):t.InfiniteScroll=e(t,t.EvEmitter,t.fizzyUIUtils)})(window,function(e,i,s){let n=e.jQuery,r={};function a(c,f){let g=s.getQueryElement(c);if(!g){console.error("Bad element for InfiniteScroll: "+(g||c));return}if(c=g,c.infiniteScrollGUID){let _=r[c.infiniteScrollGUID];return _.option(f),_}this.element=c,this.options={...a.defaults},this.option(f),n&&(this.$element=n(this.element)),this.create()}a.defaults={},a.create={},a.destroy={};let l=a.prototype;Object.assign(l,i.prototype);let h=0;l.create=function(){let c=this.guid=++h;if(this.element.infiniteScrollGUID=c,r[c]=this,this.pageIndex=1,this.loadCount=0,this.updateGetPath(),!(this.getPath&&this.getPath())){console.error("Disabling InfiniteScroll");return}this.updateGetAbsolutePath(),this.log("initialized",[this.element.className]),this.callOnInit();for(let g in a.create)a.create[g].call(this)},l.option=function(c){Object.assign(this.options,c)},l.callOnInit=function(){let c=this.options.onInit;c&&c.call(this,this)},l.dispatchEvent=function(c,f,g){this.log(c,g);let _=f?[f].concat(g):g;if(this.emitEvent(c,_),!n||!this.$element)return;c+=".infiniteScroll";let b=c;if(f){let E=n.Event(f);E.type=c,b=E}this.$element.trigger(b,g)};let d={initialized:c=>`on ${c}`,request:c=>`URL: ${c}`,load:(c,f)=>`${c.title||""}. URL: ${f}`,error:(c,f)=>`${c}. URL: ${f}`,append:(c,f,g)=>`${g.length} items. URL: ${f}`,last:(c,f)=>`URL: ${f}`,history:(c,f)=>`URL: ${f}`,pageIndex:function(c,f){return`current page determined to be: ${c} from ${f}`}};l.log=function(c,f){if(!this.options.debug)return;let g=`[InfiniteScroll] ${c}`,_=d[c];_&&(g+=". "+_.apply(this,f)),console.log(g)},l.updateMeasurements=function(){this.windowHeight=e.innerHeight;let c=this.element.getBoundingClientRect();this.top=c.top+e.scrollY},l.updateScroller=function(){let c=this.options.elementScroll;if(!c){this.scroller=e;return}if(this.scroller=c===!0?this.element:s.getQueryElement(c),!this.scroller)throw new Error(`Unable to find elementScroll: ${c}`)},l.updateGetPath=function(){let c=this.options.path;if(!c){console.error(`InfiniteScroll path option required. Set as: ${c}`);return}let f=typeof c;if(f=="function"){this.getPath=c;return}if(f=="string"&&c.match("{{#}}")){this.updateGetPathTemplate(c);return}this.updateGetPathSelector(c)},l.updateGetPathTemplate=function(c){this.getPath=()=>{let b=this.pageIndex+1;return c.replace("{{#}}",b)};let f=c.replace(/(\\\?|\?)/,"\\?").replace("{{#}}","(\\d\\d?\\d?)"),g=new RegExp(f),_=location.href.match(g);_&&(this.pageIndex=parseInt(_[1],10),this.log("pageIndex",[this.pageIndex,"template string"]))};let p=[/^(.*?\/?page\/?)(\d\d?\d?)(.*?$)/,/^(.*?\/?\?page=)(\d\d?\d?)(.*?$)/,/(.*?)(\d\d?\d?)(?!.*\d)(.*?$)/],v=a.getPathParts=function(c){if(c)for(let f of p){let g=c.match(f);if(g){let[,_,b,E]=g;return{begin:_,index:b,end:E}}}};l.updateGetPathSelector=function(c){let f=document.querySelector(c);if(!f){console.error(`Bad InfiniteScroll path option. Next link not found: ${c}`);return}let g=f.getAttribute("href"),_=v(g);if(!_){console.error(`InfiniteScroll unable to parse next link href: ${g}`);return}let{begin:b,index:E,end:T}=_;this.isPathSelector=!0,this.getPath=()=>b+(this.pageIndex+1)+T,this.pageIndex=parseInt(E,10)-1,this.log("pageIndex",[this.pageIndex,"next link"])},l.updateGetAbsolutePath=function(){let c=this.getPath();if(c.match(/^http/)||c.match(/^\//)){this.getAbsolutePath=this.getPath;return}let{pathname:g}=location,_=c.match(/^\?/),b=g.substring(0,g.lastIndexOf("/")),E=_?g:b+"/";this.getAbsolutePath=()=>E+this.getPath()},a.create.hideNav=function(){let c=s.getQueryElement(this.options.hideNav);c&&(c.style.display="none",this.nav=c)},a.destroy.hideNav=function(){this.nav&&(this.nav.style.display="")},l.destroy=function(){this.allOff();for(let c in a.destroy)a.destroy[c].call(this);delete this.element.infiniteScrollGUID,delete r[this.guid],n&&this.$element&&n.removeData(this.element,"infiniteScroll")},a.throttle=function(c,f){f=f||200;let g,_;return function(){let b=+new Date,E=arguments,T=()=>{g=b,c.apply(this,E)};g&&b<g+f?(clearTimeout(_),_=setTimeout(T,f)):T()}},a.data=function(c){c=s.getQueryElement(c);let f=c&&c.infiniteScrollGUID;return f&&r[f]},a.setJQuery=function(c){n=c},s.htmlInit(a,"infinite-scroll"),l._init=function(){};let{jQueryBridget:y}=e;return n&&y&&y("infiniteScroll",a,n),a})})(vt)),vt.exports}var yt={exports:{}},ee;function ci(){return ee||(ee=1,(function(o){(function(t,e){o.exports?o.exports=e(t,q()):e(t,t.InfiniteScroll)})(window,function(e,i){let s=i.prototype;
139Object.assign(i.defaults,{loadOnScroll:!0,checkLastPage:!0,responseBody:"text",domParseResponse:!0}),i.create.pageLoad=function(){this.canLoad=!0,this.on("scrollThreshold",this.onScrollThresholdLoad),this.on("load",this.checkLastPage),this.options.outlayer&&this.on("append",this.onAppendOutlayer)},s.onScrollThresholdLoad=function(){this.options.loadOnScroll&&this.loadNextPage()};let n=new DOMParser;s.loadNextPage=function(){if(this.isLoading||!this.canLoad)return;let{responseBody:l,domParseResponse:h,fetchOptions:d}=this.options,p=this.getAbsolutePath();this.isLoading=!0,typeof d=="function"&&(d=d());let v=fetch(p,d).then(y=>{if(!y.ok){let c=new Error(y.statusText);return this.onPageError(c,p,y),{response:y}}return y[l]().then(c=>(l=="text"&&h&&(c=n.parseFromString(c,"text/html")),y.status==204?(this.lastPageReached(c,p),{body:c,response:y}):this.onPageLoad(c,p,y)))}).catch(y=>{this.onPageError(y,p)});return this.dispatchEvent("request",null,[p,v]),v},s.onPageLoad=function(l,h,d){return this.options.append||(this.isLoading=!1),this.pageIndex++,this.loadCount++,this.dispatchEvent("load",null,[l,h,d]),this.appendNextPage(l,h,d)},s.appendNextPage=function(l,h,d){let{append:p,responseBody:v,domParseResponse:y}=this.options;if(!(v=="text"&&y)||!p)return{body:l,response:d};let f=l.querySelectorAll(p),g={body:l,response:d,items:f};if(!f||!f.length)return this.lastPageReached(l,h),g;let _=r(f),b=()=>(this.appendItems(f,_),this.isLoading=!1,this.dispatchEvent("append",null,[l,h,f,d]),g);return this.options.outlayer?this.appendOutlayerItems(_,b):b()},s.appendItems=function(l,h){!l||!l.length||(h=h||r(l),a(h),this.element.appendChild(h))};function r(l){let h=document.createDocumentFragment();return l&&h.append(...l),h}function a(l){let h=l.querySelectorAll("script");for(let d of h){let p=document.createElement("script"),v=d.attributes;for(let y of v)p.setAttribute(y.name,y.value);p.innerHTML=d.innerHTML,d.parentNode.replaceChild(p,d)}}return s.appendOutlayerItems=function(l,h){let d=i.imagesLoaded||e.imagesLoaded;if(!d){console.error("[InfiniteScroll] imagesLoaded required for outlayer option"),this.isLoading=!1;return}return new Promise(function(p){d(l,function(){let v=h();p(v)})})},s.onAppendOutlayer=function(l,h,d){this.options.outlayer.appended(d)},s.checkLastPage=function(l,h){let{checkLastPage:d,path:p}=this.options;if(!d)return;if(typeof p=="function"&&!this.getPath()){this.lastPageReached(l,h);return}let v;if(typeof d=="string"?v=d:this.isPathSelector&&(v=p),!v||!l.querySelector)return;l.querySelector(v)||this.lastPageReached(l,h)},s.lastPageReached=function(l,h){this.canLoad=!1,this.dispatchEvent("last",null,[l,h])},s.onPageError=function(l,h,d){return this.isLoading=!1,this.canLoad=!1,this.dispatchEvent("error",null,[l,h,d]),l},i.create.prefill=function(){if(!this.options.prefill)return;let l=this.options.append;if(!l){console.error(`append option required for prefill. Set as :${l}`);return}this.updateMeasurements(),this.updateScroller(),this.isPrefilling=!0,this.on("append",this.prefill),this.once("error",this.stopPrefill),this.once("last",this.stopPrefill),this.prefill()},s.prefill=function(){let l=this.getPrefillDistance();this.isPrefilling=l>=0,this.isPrefilling?(this.log("prefill"),this.loadNextPage()):this.stopPrefill()},s.getPrefillDistance=function(){return this.options.elementScroll?this.scroller.clientHeight-this.scroller.scrollHeight:this.windowHeight-this.element.clientHeight},s.stopPrefill=function(){this.log("stopPrefill"),this.off("append",this.prefill)},i})})(yt)),yt.exports}var _t={exports:{}},ie;function di(){return ie||(ie=1,(function(o){(function(t,e){o.exports?o.exports=e(t,q(),Q()):e(t,t.InfiniteScroll,t.fizzyUIUtils)})(window,function(e,i,s){let n=i.prototype;return Object.assign(i.defaults,{scrollThreshold:400}),i.create.scrollWatch=function(){this.pageScrollHandler=this.onPageScroll.bind(this),this.resizeHandler=this.onResize.bind(this);let r=this.options.scrollThreshold;(r||r===0)&&this.enableScrollWatch()},i.destroy.scrollWatch=function(){this.disableScrollWatch()},n.enableScrollWatch=function(){this.isScrollWatching||(this.isScrollWatching=!0,this.updateMeasurements(),this.updateScroller(),this.on("last",this.disableScrollWatch),this.bindScrollWatchEvents(!0))},n.disableScrollWatch=function(){this.isScrollWatching&&(this.bindScrollWatchEvents(!1),delete this.isScrollWatching)},n.bindScrollWatchEvents=function(r){let a=r?"addEventListener":"removeEventListener";this.scroller[a]("scroll",this.pageScrollHandler),e[a]("resize",this.resizeHandler)},n.onPageScroll=i.throttle(function(){this.getBottomDistance()<=this.options.scrollThreshold&&this.dispatchEvent("scrollThreshold")}),n.getBottomDistance=function(){let r,a;return this.options.elementScroll?(r=this.scroller.scrollHeight,a=this.scroller.scrollTop+this.scroller.clientHeight):(r=this.top+this.element.clientHeight,a=e.scrollY+this.windowHeight),r-a},n.onResize=function(){this.updateMeasurements()},s.debounceMethod(i,"onResize",150),i})})(_t)),_t.exports}var wt={exports:{}},se;function ui(){return se||(se=1,(function(o){(function(t,e){o.exports?o.exports=e(t,q(),Q()):e(t,t.InfiniteScroll,t.fizzyUIUtils)})(window,function(e,i,s){let n=i.prototype;Object.assign(i.defaults,{history:"replace"});let r=document.createElement("a");return i.create.history=function(){if(!this.options.history)return;if(r.href=this.getAbsolutePath(),!((r.origin||r.protocol+"//"+r.host)==location.origin)){console.error(`[InfiniteScroll] cannot set history with different origin: ${r.origin} on ${location.origin} . History behavior disabled.`);return}this.options.append?this.createHistoryAppend():this.createHistoryPageLoad()},n.createHistoryAppend=function(){this.updateMeasurements(),this.updateScroller(),this.scrollPages=[{top:0,path:location.href,title:document.title}],this.scrollPage=this.scrollPages[0],this.scrollHistoryHandler=this.onScrollHistory.bind(this),this.unloadHandler=this.onUnload.bind(this),this.scroller.addEventListener("scroll",this.scrollHistoryHandler),this.on("append",this.onAppendHistory),this.bindHistoryAppendEvents(!0)},n.bindHistoryAppendEvents=function(a){let l=a?"addEventListener":"removeEventListener";this.scroller[l]("scroll",this.scrollHistoryHandler),e[l]("unload",this.unloadHandler)},n.createHistoryPageLoad=function(){this.on("load",this.onPageLoadHistory)},i.destroy.history=n.destroyHistory=function(){this.options.history&&this.options.append&&this.bindHistoryAppendEvents(!1)},n.onAppendHistory=function(a,l,h){if(!h||!h.length)return;let d=h[0],p=this.getElementScrollY(d);r.href=l,this.scrollPages.push({top:p,path:r.href,title:a.title})},n.getElementScrollY=function(a){return this.options.elementScroll?a.offsetTop-this.top:a.getBoundingClientRect().top+e.scrollY},n.onScrollHistory=function(){let a=this.getClosestScrollPage();a!=this.scrollPage&&(this.scrollPage=a,this.setHistory(a.title,a.path))},s.debounceMethod(i,"onScrollHistory",150),n.getClosestScrollPage=function(){let a;this.options.elementScroll?a=this.scroller.scrollTop+this.scroller.clientHeight/2:a=e.scrollY+this.windowHeight/2;let l;for(let h of this.scrollPages){if(h.top>=a)break;l=h}return l},n.setHistory=function(a,l){let h=this.options.history;h&&history[h+"State"]&&(history[h+"State"](null,a,l),this.options.historyTitle&&(document.title=a),this.dispatchEvent("history",null,[a,l]))},n.onUnload=function(){if(this.scrollPage.top===0)return;let a=e.scrollY-this.scrollPage.top+this.top;this.destroyHistory(),scrollTo(0,a)},n.onPageLoadHistory=function(a,l){this.setHistory(a.title,l)},i})})(wt)),wt.exports}var bt={exports:{}},ne;function pi(){return ne||(ne=1,(function(o){(function(t,e){o.exports?o.exports=e(t,q(),Q()):e(t,t.InfiniteScroll,t.fizzyUIUtils)})(window,function(e,i,s){class n{constructor(a,l){this.element=a,this.infScroll=l,this.clickHandler=this.onClick.bind(this),this.element.addEventListener("click",this.clickHandler),l.on("request",this.disable.bind(this)),l.on("load",this.enable.bind(this)),l.on("error",this.hide.bind(this)),l.on("last",this.hide.bind(this))}onClick(a){a.preventDefault(),this.infScroll.loadNextPage()}enable(){this.element.removeAttribute("disabled")}disable(){this.element.disabled="disabled"}hide(){this.element.style.display="none"}destroy(){this.element.removeEventListener("click",this.clickHandler)}}return i.create.button=function(){let r=s.getQueryElement(this.options.button);r&&(this.button=new n(r,this))},i.destroy.button=function(){this.button&&this.button.destroy()},i.Button=n,i})})(bt)),bt.exports}var Et={exports:{}},oe;function fi(){return oe||(oe=1,(function(o){(function(t,e){o.exports?o.exports=e(t,q(),Q()):e(t,t.InfiniteScroll,t.fizzyUIUtils)})(window,function(e,i,s){let n=i.prototype;i.create.status=function(){let h=s.getQueryElement(this.options.status);h&&(this.statusElement=h,this.statusEventElements={request:h.querySelector(".infinite-scroll-request"),error:h.querySelector(".infinite-scroll-error"),last:h.querySelector(".infinite-scroll-last")},this.on("request",this.showRequestStatus),this.on("error",this.showErrorStatus),this.on("last",this.showLastStatus),this.bindHideStatus("on"))},n.bindHideStatus=function(h){let d=this.options.append?"append":"load";this[h](d,this.hideAllStatus)},n.showRequestStatus=function(){this.showStatus("request")},n.showErrorStatus=function(){this.showStatus("error")},n.showLastStatus=function(){this.showStatus("last"),this.bindHideStatus("off")},n.showStatus=function(h){a(this.statusElement),this.hideStatusEventElements();let d=this.statusEventElements[h];a(d)},n.hideAllStatus=function(){r(this.statusElement),this.hideStatusEventElements()},n.hideStatusEventElements=function(){for(let h in this.statusEventElements){let d=this.statusEventElements[h];r(d)}};function r(h){l(h,"none")}function a(h){l(h,"block")}function l(h,d){h&&(h.style.display=d)}return i})})(Et)),Et.exports}var re;function mi(){return re||(re=1,(function(o){(function(t,e){o.exports&&(o.exports=e(q(),ci(),di(),ui(),pi(),fi()))})(window,function(e){return e})})(gt)),gt.exports}var gi=mi();const vi=ri(gi),O=class O{constructor(){this.initialize()}initialize(){const t=document.querySelector(O.SELECTORS.FEED),e=document.querySelector(O.SELECTORS.NEXT_PAGE);if(!t||!e)return!1;const i=!document.querySelector(O.SELECTORS.LOAD_MORE);
139return this.infiniteScroll=new vi(t,{path:O.SELECTORS.NEXT_PAGE,append:O.SELECTORS.POST,scrollThreshold:i?400:!1,hideNav:O.SELECTORS.PAGINATION_NAV,button:i?void 0:O.SELECTORS.LOAD_MORE,status:O.SELECTORS.STATUS,history:!1,historyTitle:!1,loadOnScroll:i}),!0}};O.SELECTORS={FEED:"[data-posts]",NEXT_PAGE:"[data-pagination-next]",LOAD_MORE:"[data-pagination-load-more]",STATUS:"[data-pagination-status]",POST:".post-card",PAGINATION_NAV:".pagination nav"};let xt=O;function V(o,t,e){const i=document.createElement(t);return o&&(i.className=o),e&&e.appendChild(i),i}function yi(o,t,e){let i=`translate3d(${o}px,0px,0)`;return e!==void 0&&(i+=` scale3d(${e},${e},1)`),i}function Lt(o,t,e){o.style.width=typeof t=="number"?`${t}px`:t,o.style.height=typeof e=="number"?`${e}px`:e}const A={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function _i(o){return"button"in o&&o.button===1||o.ctrlKey||o.metaKey||o.altKey||o.shiftKey}function K(o,t,e=document){let i=[];if(o instanceof Element)i=[o];else if(o instanceof NodeList||Array.isArray(o))i=Array.from(o);else{const s=typeof o=="string"?o:t;s&&(i=Array.from(e.querySelectorAll(s)))}return i}function wi(o){return typeof o=="function"&&o.prototype&&o.prototype.goTo}function ae(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}let bi=class{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}},Ei=class{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){var s,n,r;this._filters[t]||(this._filters[t]=[]),(s=this._filters[t])===null||s===void 0||s.push({fn:e,priority:i}),(n=this._filters[t])===null||n===void 0||n.sort((a,l)=>a.priority-l.priority),(r=this.pswp)===null||r===void 0||r.addFilter(t,e,i)}removeFilter(t,e){this._filters[t]&&(this._filters[t]=this._filters[t].filter(i=>i.fn!==e)),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){var i;return(i=this._filters[t])===null||i===void 0||i.forEach(s=>{e[0]=s.fn.apply(this,e)}),e[0]}on(t,e){var i,s;this._listeners[t]||(this._listeners[t]=[]),(i=this._listeners[t])===null||i===void 0||i.push(e),(s=this.pswp)===null||s===void 0||s.on(t,e)}off(t,e){var i;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(s=>e!==s)),(i=this.pswp)===null||i===void 0||i.off(t,e)}dispatch(t,e){var i;if(this.pswp)return this.pswp.dispatch(t,e);const s=new bi(t,e);return(i=this._listeners[t])===null||i===void 0||i.forEach(n=>{n.call(this,s)}),s}},Si=class{constructor(t,e){if(this.element=V("pswp__img pswp__img--placeholder",t?"img":"div",e),t){const i=this.element;i.decoding="async",i.alt="",i.src=t,i.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&(this.element.tagName==="IMG"?(Lt(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=yi(0,0,t/250)):Lt(this.element,t,e))}destroy(){var t;(t=this.element)!==null&&t!==void 0&&t.parentNode&&this.element.remove(),this.element=null}},xi=class{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=A.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(t,e){if(this.slide&&this.usePlaceholder())if(this.placeholder){const i=this.placeholder.element;i&&!i.parentElement&&this.slide.container.prepend(i)}else{const i=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new Si(i,this.slide.container)}this.element&&!e||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=V("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=V("pswp__content","div"),this.element.innerHTML=this.data.html||""),e&&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=(e=this.data.src)!==null&&e!==void 0?e:"",s.alt=(i=this.data.alt)!==null&&i!==void 0?i:"",this.state=A.LOADING,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=A.LOADED,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===A.LOADED||this.state===A.ERROR)&&this.removePlaceholder())}onError(){this.state=A.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,
vendor: 5,830 bytes, line 139
139content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===A.LOADING,this)}isError(){return this.state===A.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(t,e){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(Lt(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!==A.ERROR,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 t,e;let i=V("pswp__error-msg","div");i.innerText=(t=(e=this.instance.options)===null||e===void 0?void 0:e.errorMsg)!==null&&t!==void 0?t:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=V("pswp__content pswp__error-msg-container","div"),this.element.appendChild(i),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===A.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||ae())?(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&&!ae()?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===A.LOADED||this.state===A.ERROR)&&this.removePlaceholder()))}};function Li(o,t){if(o.getViewportSizeFn){const e=o.getViewportSizeFn(o,t);if(e)return e}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function tt(o,t,e,i,s){let n=0;if(t.paddingFn)n=t.paddingFn(e,i,s)[o];else if(t.padding)n=t.padding[o];else{const r="padding"+o[0].toUpperCase()+o.slice(1);t[r]&&(n=t[r])}return Number(n)||0}function Pi(o,t,e,i){return{x:t.x-tt("left",o,t,e,i)-tt("right",o,t,e,i),y:t.y-tt("top",o,t,e,i)-tt("bottom",o,t,e,i)}}const le=4e3;let Ci=class{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,n<r?n:r),this.fill=Math.min(1,n>r?n:r),this.vFill=Math.min(1,r),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const e=t+"ZoomLevel",i=this.options[e];if(i)return typeof i=="function"?i(this):i==="fill"?this.fill:i==="fit"?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,this.fit*3),this.elementSize&&t*this.elementSize.x>le&&(t=le/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}};function ge(o,t,e){const i=t.createContentFromData(o,e);let s;const{options:n}=t;if(n){s=new Ci(n,o,-1);let r;t.pswp?r=t.pswp.viewportSize:r=Li(n,t);const a=Pi(n,r,o,e);s.update(i.width,i.height,a)}return i.lazyLoad(),s&&i.setDisplayedSize(Math.ceil(i.width*s.initial),Math.ceil(i.height*s.initial)),i}function Ai(o,t){const e=t.getItemData(o);if(!t.dispatch("lazyLoadSlide",{index:o,itemData:e}).defaultPrevented)return ge(e,t,o)}
139let Ii=class extends Ei{getNumItems(){var t;let e=0;const i=(t=this.options)===null||t===void 0?void 0:t.dataSource;i&&"length"in i?e=i.length:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(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 xi(t,this,e)}getItemData(t){var e;const i=(e=this.options)===null||e===void 0?void 0:e.dataSource;let s={};Array.isArray(i)?s=i[t]:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),s=i.items[t]);let n=s;n instanceof Element&&(n=this._domElementToItemData(n));const r=this.dispatch("itemData",{itemData:n||{},index:t});return this.applyFilters("itemData",r.itemData,t)}_getGalleryDOMElements(t){var e,i;return(e=this.options)!==null&&e!==void 0&&e.children||(i=this.options)!==null&&i!==void 0&&i.childSelector?K(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){const e={element:t},i=t.tagName==="A"?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");if(n){var s;e.msrc=n.currentSrc||n.src,e.alt=(s=n.getAttribute("alt"))!==null&&s!==void 0?s:""}(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0)}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return ge(t,this,e)}};class Ti extends Ii{constructor(t){super(),this.options=t||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){K(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(t){if(_i(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,s=K(this.options.children,this.options.childSelector,t.currentTarget).findIndex(n=>n===e||n.contains(e));return s!==-1?s: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 s=K(this.options.gallery);s[0]&&(e={gallery:s[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(wi(i.pswpModule))s.push(Promise.resolve(i.pswpModule));else{if(n==="string")throw new Error("pswpModule as string is no longer supported");if(n==="function")s.push(i.pswpModule());else throw new Error("pswpModule is not valid")}typeof i.openPromise=="function"&&s.push(i.openPromise()),i.preloadFirstSlide!==!1&&t>=0&&(this._preloadedContent=Ai(t,this));const r=++this._uid;Promise.all(s).then(a=>{if(this.shouldOpen){const l=a[0];this._openPhotoswipe(l,r)}})}_openPhotoswipe(t,e){if(e!==this._uid&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;const i=typeof t=="object"?new t.default(this.options):new t(this.options);this.pswp=i,window.pswp=i,Object.keys(this._listeners).forEach(s=>{var n;(n=this._listeners[s])===null||n===void 0||n.forEach(r=>{i.on(s,r)})}),Object.keys(this._filters).forEach(s=>{var n;(n=this._filters[s])===null||n===void 0||n.forEach(r=>{i.addFilter(s,r.fn,r.priority)})}),this._preloadedContent&&(i.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),i.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),i.init()}destroy(){var t;(t=this.pswp)===null||t===void 0||t.destroy(),this.shouldOpen=!1,this._listeners={}
139,K(this.options.gallery,this.options.gallerySelector).forEach(e=>{e.removeEventListener("click",this.onThumbnailsClick,!1)})}}function P(o,t,e){const i=document.createElement(t);return o&&(i.className=o),e&&e.appendChild(i),i}function S(o,t){return o.x=t.x,o.y=t.y,t.id!==void 0&&(o.id=t.id),o}function ve(o){o.x=Math.round(o.x),o.y=Math.round(o.y)}function Pt(o,t){const e=Math.abs(o.x-t.x),i=Math.abs(o.y-t.y);return Math.sqrt(e*e+i*i)}function Y(o,t){return o.x===t.x&&o.y===t.y}function J(o,t,e){return Math.min(Math.max(o,t),e)}function X(o,t,e){let i=`translate3d(${o}px,${t||0}px,0)`;return e!==void 0&&(i+=` scale3d(${e},${e},1)`),i}function H(o,t,e,i){o.style.transform=X(t,e,i)}const Oi="cubic-bezier(.4,0,.22,1)";function ye(o,t,e,i){o.style.transition=t?`${t} ${e}ms ${i||Oi}`:"none"}function Ct(o,t,e){o.style.width=typeof t=="number"?`${t}px`:t,o.style.height=typeof e=="number"?`${e}px`:e}function ki(o){ye(o)}function zi(o){return"decode"in o?o.decode().catch(()=>{}):o.complete?Promise.resolve(o):new Promise((t,e)=>{o.onload=()=>t(o),o.onerror=e})}const I={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function Di(o){return"button"in o&&o.button===1||o.ctrlKey||o.metaKey||o.altKey||o.shiftKey}function Ri(o,t,e=document){let i=[];if(o instanceof Element)i=[o];else if(o instanceof NodeList||Array.isArray(o))i=Array.from(o);else{const s=typeof o=="string"?o:t;s&&(i=Array.from(e.querySelectorAll(s)))}return i}function he(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}let _e=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{_e=!0}}))}catch{}class Mi{constructor(){this._pool=[]}add(t,e,i,s){this._toggleListener(t,e,i,s)}remove(t,e,i,s){this._toggleListener(t,e,i,s,!0)}removeAll(){this._pool.forEach(t=>{this._toggleListener(t.target,t.type,t.listener,t.passive,!0,!0)}),this._pool=[]}_toggleListener(t,e,i,s,n,r){if(!t)return;const a=n?"removeEventListener":"addEventListener";e.split(" ").forEach(h=>{if(h){r||(n?this._pool=this._pool.filter(p=>p.type!==h||p.listener!==i||p.target!==t):this._pool.push({target:t,type:h,listener:i,passive:s}));const d=_e?{passive:s||!1}:!1;t[a](h,i,d)}})}}function we(o,t){if(o.getViewportSizeFn){const e=o.getViewportSizeFn(o,t);if(e)return e}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function j(o,t,e,i,s){let n=0;if(t.paddingFn)n=t.paddingFn(e,i,s)[o];else if(t.padding)n=t.padding[o];else{const r="padding"+o[0].toUpperCase()+o.slice(1);t[r]&&(n=t[r])}return Number(n)||0}function be(o,t,e,i){return{x:t.x-j("left",o,t,e,i)-j("right",o,t,e,i),y:t.y-j("top",o,t,e,i)-j("bottom",o,t,e,i)}}class $i{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._updateAxis("x"),this._updateAxis("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}_updateAxis(t){const{pswp:e}=this.slide,i=this.slide[t==="x"?"width":"height"]*this.currZoomLevel,n=j(t==="x"?"left":"top",e.options,e.viewportSize,this.slide.data,this.slide.index),r=this.slide.panAreaSize[t];this.center[t]=Math.round((r-i)/2)+n,this.max[t]=i>r?Math.round(r-i)+n:this.center[t],this.min[t]=i>r?n: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 J(e,this.max[t],this.min[t])}}const ce=4e3;class Ee{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,n<r?n:r),this.fill=Math.min(1,n>r?n:r),this.vFill=Math.min(1,r),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const e=t+"ZoomLevel",i=this.options[e];if(i)return typeof i=="function"?i(this):i==="fill"?this.fill:i==="fit"?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,this.fit*3),this.elementSize&&t*this.elementSize.x>ce&&(t=ce/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}}class Hi{constructor(t,e,i){this.data=t,this.index=e,this.pswp=i,this.isActive=e===i.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!i.opener.isOpen,this.zoomLevels=new Ee(i.options,t,e,i),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:e}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=P("pswp__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 $i(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.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize()):(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y))}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):!1}getPlaceholderElement(){var t;return(t=this.content.placeholder)===null||t===void 0?void 0:t.element}
139zoomTo(t,e,i,s){const{pswp:n}=this;if(!this.isZoomable()||n.mainScroll.isShifted())return;n.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:e,transitionDuration:i}),n.animations.stopAllPan();const r=this.currZoomLevel;s||(t=J(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",e,r),this.pan.y=this.calculateZoomToPanOffset("y",e,r),ve(this.pan);const a=()=>{this._setResolution(t),this.applyCurrentZoomPan()};i?n.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:a,duration:i,easing:n.options.easing}):a()}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(this.bounds.max[t]-this.bounds.min[t]===0)return this.bounds.center[t];e||(e=this.pswp.getViewportCenterPoint()),i||(i=this.zoomLevels.initial);const n=this.currZoomLevel/i;return this.bounds.correctPan(t,(this.pan[t]-e[t])*n+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!!this.width&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return!!this.width&&this.content.isZoomable()}applyCurrentZoomPan(){this._applyZoomTransform(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),S(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(t,e,i){i/=this.currentResolution||this.zoomLevels.initial,H(this.container,t,e,i)}calculateSize(){const{pswp:t}=this;S(this.panAreaSize,be(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 X(this.pan.x,this.pan.y,t)}_setResolution(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}}const Bi=.35,Fi=.6,de=.4,ue=.5;function Ni(o,t){return o*t/(1-t)}class Zi{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&S(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:t,prevP1:e,dragAxis:i}=this.gestures,{currSlide:s}=this.pswp;if(i==="y"&&this.pswp.options.closeOnVerticalDrag&&s&&s.currZoomLevel<=s.zoomLevels.fit&&!this.gestures.isMultitouch){const n=s.pan.y+(t.y-e.y);if(!this.pswp.dispatch("verticalDrag",{panY:n}).defaultPrevented){this._setPanWithFriction("y",n,Fi);const r=1-Math.abs(this._getVerticalDragRatio(s.pan.y));this.pswp.applyBgOpacity(r),s.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),s&&(ve(s.pan),s.applyCurrentZoomPan()))}end(){const{velocity:t}=this.gestures,{mainScroll:e,currSlide:i}=this.pswp;let s=0;if(this.pswp.animations.stopAll(),e.isShifted()){const r=(e.x-e.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-ue&&r<0||t.x<.1&&r<-.5?(s=1,t.x=Math.min(t.x,0)):(t.x>ue&&r>0||t.x>-.1&&r>.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._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(t){const{velocity:e}=this.gestures,{currSlide:i}=this.pswp;if(!i)return;const{pan:s,bounds:n}=i,r=s[t],a=this.pswp.bgOpacity<1&&t==="y",h=r+Ni(e[t],.995);if(a){const c=this._getVerticalDragRatio(r),f=this._getVerticalDragRatio(h);if(c<0&&f<-de||c>0&&f>de){this.pswp.close();return}}const d=n.correctPan(t,h);if(r===d)return;const p=d===h?1:.82,v=this.pswp.bgOpacity,y=d-r;this.pswp.animations.startSpring({name:"panGesture"+t,isPan:!0,start:r,end:d,velocity:e[t],dampingRatio:p,onUp
139date:c=>{if(a&&this.pswp.bgOpacity<1){const f=1-(d-c)/y;this.pswp.applyBgOpacity(J(v+(1-v)*f,0,1))}s[t]=Math.floor(c),i.applyCurrentZoomPan()}})}_panOrMoveMainScroll(t){const{p1:e,dragAxis:i,prevP1:s,isMultitouch:n}=this.gestures,{currSlide:r,mainScroll:a}=this.pswp,l=e[t]-s[t],h=a.x+l;if(!l||!r)return!1;if(t==="x"&&!r.isPannable()&&!n)return a.moveTo(h,!0),!0;const{bounds:d}=r,p=r.pan[t]+l;if(this.pswp.options.allowPanToNext&&i==="x"&&t==="x"&&!n){const v=a.getCurrSlideX(),y=a.x-v,c=l>0,f=!c;if(p>d.min[t]&&c){if(d.min[t]<=this.startPan[t])return a.moveTo(h,!0),!0;this._setPanWithFriction(t,p)}else if(p<d.max[t]&&f){if(this.startPan[t]<=d.max[t])return a.moveTo(h,!0),!0;this._setPanWithFriction(t,p)}else if(y!==0){if(y>0)return a.moveTo(Math.max(h,v),!0),!0;if(y<0)return a.moveTo(Math.min(h,v),!0),!0}else this._setPanWithFriction(t,p)}else t==="y"?!a.isShifted()&&d.min.y!==d.max.y&&this._setPanWithFriction(t,p):this._setPanWithFriction(t,p);return!1}_getVerticalDragRatio(t){var e,i;return(t-((e=(i=this.pswp.currSlide)===null||i===void 0?void 0:i.bounds.center.y)!==null&&e!==void 0?e:0))/(this.pswp.viewportSize.y/3)}_setPanWithFriction(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 l=Math.round(e-n[t]);n[t]+=l*(i||Bi)}else n[t]=e}}const qi=.05,Wi=.15;function pe(o,t,e){return o.x=(t.x+e.x)/2,o.y=(t.y+e.y)/2,o}class Ui{constructor(t){this.gestures=t,this._startPan={x:0,y:0},this._startZoomPoint={x:0,y:0},this._zoomPoint={x:0,y:0},this._wasOverFitZoomLevel=!1,this._startZoomLevel=1}start(){const{currSlide:t}=this.gestures.pswp;t&&(this._startZoomLevel=t.currZoomLevel,S(this._startPan,t.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:t,startP1:e,p2:i,startP2:s,pswp:n}=this.gestures,{currSlide:r}=n;if(!r)return;const a=r.zoomLevels.min,l=r.zoomLevels.max;if(!r.isZoomable()||n.mainScroll.isShifted())return;pe(this._startZoomPoint,e,s),pe(this._zoomPoint,t,i);let h=1/Pt(e,s)*Pt(t,i)*this._startZoomLevel;if(h>r.zoomLevels.initial+r.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),h<a)if(n.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=r.zoomLevels.initial){const d=1-(a-h)/(a/1.2);n.dispatch("pinchClose",{bgOpacity:d}).defaultPrevented||n.applyBgOpacity(d)}else h=a-(a-h)*Wi;else h>l&&(h=l+(h-l)*qi);r.pan.x=this._calculatePanForZoomLevel("x",h),r.pan.y=this._calculatePanForZoomLevel("y",h),r.setZoomLevel(h),r.applyCurrentZoomPan()}end(){const{pswp:t}=this.gestures,{currSlide:e}=t;(!e||e.currZoomLevel<e.zoomLevels.initial)&&!this._wasOverFitZoomLevel&&t.options.pinchToClose?t.close():this.correctZoomPan()}_calculatePanForZoomLevel(t,e){const i=e/this._startZoomLevel;return this._zoomPoint[t]-(this._startZoomPoint[t]-this._startPan[t])*i}correctZoomPan(t){const{pswp:e}=this.gestures,{currSlide:i}=e;if(!(i!=null&&i.isZoomable()))return;this._zoomPoint.x===0&&(t=!0);const s=i.currZoomLevel;let n,r=!0;s<i.zoomLevels.initial?n=i.zoomLevels.initial:s>i.zoomLevels.max?n=i.zoomLevels.max:(r=!1,n=s);const a=e.bgOpacity,l=e.bgOpacity<1,h=S({x:0,y:0},i.pan);let d=S({x:0,y:0},h);t&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=s,S(this._startPan,h)),r&&(d={x:this._calculatePanForZoomLevel("x",n),y:this._calculatePanForZoomLevel("y",n)}),i.setZoomLevel(n),d={x:i.bounds.correctPan("x",d.x),y:i.bounds.correctPan("y",d.y)},i.setZoomLevel(s);const p=!Y(d,h);if(!p&&!r&&!l){i._setResolution(n),i.applyCurrentZoomPan();return}e.animations.stopAllPan(),e.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:v=>{if(v/=1e3,p||r){if(p&&(i.pan.x=h.x+(d.x-h.x)*v,i.pan.y=h.y+(d.y-h.y)*v),r){const y=s+(n-s)*v;i.setZoomLevel(y)}i.applyCurrentZoomPan()}l&&e.bgOpacity<1&&e.applyBgOpacity(J(a+(1-a)*v,0,1))},onComplete:()=>{i._setResolution(n),i.applyCurrentZoomPan()}})}}function fe(o){return!!o.target.closest(".pswp__container")}class Gi{constructor(t){this.gestures=t}click(t,e){const i=e.target.classList,s=i.contains("pswp__img"),n=i.contains("pswp__item")||i.contains("pswp__zoom-wrap");s?this._doClickOrTapAction("imageClick",t,e):n&&this._doClickOrTapAction("bgClick",t,e)}tap(t,e){fe(e)&&this._doClickOrTapAction("tap",t,e)}doubleTap(t,e){fe(e)&&this._doClickOrTapAction("doubleTap",t,e)}
vendor: 7,209 bytes, line 139
139_doClickOrTapAction(t,e,i){var s;const{pswp:n}=this.gestures,{currSlide:r}=n,a=t+"Action",l=n.options[a];if(!n.dispatch(a,{point:e,originalEvent:i}).defaultPrevented){if(typeof l=="function"){l.call(n,e,i);return}switch(l){case"close":case"next":n[l]();break;case"zoom":r?.toggleZoom(e);break;case"zoom-or-close":r!=null&&r.isZoomable()&&r.zoomLevels.secondary!==r.zoomLevels.initial?r.toggleZoom(e):n.options.clickToCloseNonZoomable&&n.close();break;case"toggle-controls":(s=this.gestures.pswp.element)===null||s===void 0||s.classList.toggle("pswp--ui-visible");break}}}}const Vi=10,Ki=300,ji=25;class Yi{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._lastStartP1={x:0,y:0},this._intervalP1={x:0,y:0},this._numActivePoints=0,this._ongoingPointers=[],this._touchEventEnabled="ontouchstart"in window,this._pointerEventEnabled=!!window.PointerEvent,this.supportsTouch=this._touchEventEnabled||this._pointerEventEnabled&&navigator.maxTouchPoints>1,this._numActivePoints=0,this._intervalTime=0,this._velocityCalculated=!1,this.isMultitouch=!1,this.isDragging=!1,this.isZooming=!1,this.raf=null,this._tapTimer=null,this.supportsTouch||(t.options.allowPanToNext=!1),this.drag=new Zi(this),this.zoomLevels=new Ui(this),this.tapHandler=new Gi(this),t.on("bindEvents",()=>{t.events.add(t.scrollWrap,"click",this._onClick.bind(this)),this._pointerEventEnabled?this._bindEvents("pointer","down","up","cancel"):this._touchEventEnabled?(this._bindEvents("touch","start","end","cancel"),t.scrollWrap&&(t.scrollWrap.ontouchmove=()=>{},t.scrollWrap.ontouchend=()=>{})):this._bindEvents("mouse","down","up")})}_bindEvents(t,e,i,s){const{pswp:n}=this,{events:r}=n,a=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)),a&&r.add(n.scrollWrap,a,this.onPointerUp.bind(this))}onPointerDown(t){const e=t.type==="mousedown"||t.pointerType==="mouse";if(e&&t.button>0)return;const{pswp:i}=this;if(!i.opener.isOpen){t.preventDefault();return}i.dispatch("pointerDown",{originalEvent:t}).defaultPrevented||(e&&(i.mouseDetected(),this._preventPointerEventBehaviour(t,"down")),i.animations.stopAll(),this._updatePoints(t,"down"),this._numActivePoints===1&&(this.dragAxis=null,S(this.startP1,this.p1)),this._numActivePoints>1?(this._clearTapTimer(),this.isMultitouch=!0):this.isMultitouch=!1)}onPointerMove(t){this._preventPointerEventBehaviour(t,"move"),this._numActivePoints&&(this._updatePoints(t,"move"),!this.pswp.dispatch("pointerMove",{originalEvent:t}).defaultPrevented&&(this._numActivePoints===1&&!this.isDragging?(this.dragAxis||this._calculateDragDirection(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this._clearTapTimer(),this._updateStartPoints(),this._intervalTime=Date.now(),this._velocityCalculated=!1,S(this._intervalP1,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this._rafStopLoop(),this._rafRenderLoop())):this._numActivePoints>1&&!this.isZooming&&(this._finishDrag(),this.isZooming=!0,this._updateStartPoints(),this.zoomLevels.start(),this._rafStopLoop(),this._rafRenderLoop())))}_finishDrag(){this.isDragging&&(this.isDragging=!1,this._velocityCalculated||this._updateVelocity(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(t){this._numActivePoints&&(this._updatePoints(t,"up"),!this.pswp.dispatch("pointerUp",{originalEvent:t}).defaultPrevented&&(this._numActivePoints===0&&(this._rafStopLoop(),this.isDragging?this._finishDrag():!this.isZooming&&!this.isMultitouch&&this._finishTap(t)),this._numActivePoints<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),this._numActivePoints===1&&(this.dragAxis=null,this._updateStartPoints()))))}_rafRenderLoop(){(this.isDragging||this.isZooming)&&(this._updateVelocity(),this.isDragging?Y(this.p1,this.prevP1)||this.drag.change():(!Y(this.p1,this.prevP1)||!Y(this.p2,this.prevP2))&&this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(t){const e=Date.now(),i=e-this._intervalTime;i<50&&!t||(this.velocity.x=this._getVelocity("x",i),this.velocity.y=this._getVelocity("y",i),this._intervalTime=e,S(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(t){const{mainScroll:e}=this.pswp;if(e.isShifted()){e.moveIndexBy(0,!0);return}if(t.type.indexOf("cancel")>0)return;if(t.type==="mouseup"||t.pointerType==="mouse"){this.tapHandler.click(this.startP1,t);return}const i=this.pswp.options.doubleTapAction?Ki:0;this._tapTimer?(this._clearTapTimer(),Pt(this._lastStartP1,this.startP1)<ji&&this.tapHandler.doubleTap(this.startP1,t)):(S(this._lastStartP1,this.startP1),this._tapTimer=setTimeout(()=>{this.tapHandler.tap(this.startP1,t),this._clearTapTimer()},i))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(t,e){const i=this.p1[t]-this._intervalP1[t];return Math.abs(i)>1&&e>5?i/e:0}_rafStopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}_preventPointerEventBehaviour(t,e){this.pswp.applyFilters("preventPointerEvent",!0,t,e)&&t.preventDefault()}_updatePoints(t,e){if(this._pointerEventEnabled){const i=t,s=this._ongoingPointers.findIndex(n=>n.id===i.pointerId);e==="up"&&s>-1?this._ongoingPointers.splice(s,1):e==="down"&&s===-1?this._ongoingPointers.push(this._convertEventPosToPoint(i,{x:0,y:0})):s>-1&&this._convertEventPosToPoint(i,this._ongoingPointers[s]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&S(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&S(this.p2,this._ongoingPointers[1])}else{const i=t;this._numActivePoints=0,i.type.indexOf("touch")>-1?i.touches&&i.touches.length>0&&(this._convertEventPosToPoint(i.touches[0],this.p1),this._numActivePoints++,i.touches.length>1&&(this._convertEventPosToPoint(i.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(t,this.p1),e==="up"?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){S(this.prevP1,this.p1),S(this.prevP2,this.p2)}_updateStartPoints(){S(this.startP1,this.p1),S(this.startP2,this.p2),this._updatePrevPoints()}_calculateDragDirection(){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(t!==0){const e=t>0?"x":"y";Math.abs(this.p1[e]-this.startP1[e])>=Vi&&(this.dragAxis=e)}}}_convertEventPosToPoint(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:t.identifier!==void 0&&(e.id=t.identifier),e}_onClick(t){this.pswp.mainScroll.isShifted()&&(t.preventDefault(),t.stopPropagation())}}const Xi=.35;class Qi{constructor(t){this.pswp=t,this.x=0,this.slideWidth=0,this._currPositionIndex=0,this._prevPositionIndex=0,this._containerShiftIndex=-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.forEac
139h((n,r)=>{s&&H(n.el,(r+this._containerShiftIndex)*this.slideWidth),t&&n.slide&&n.slide.resize()})}resetPosition(){this._currPositionIndex=0,this._prevPositionIndex=0,this.slideWidth=0,this._containerShiftIndex=-1}appendHolders(){this.itemHolders=[];for(let t=0;t<3;t++){const e=P("pswp__item","div",this.pswp.container);e.setAttribute("role","group"),e.setAttribute("aria-roledescription","slide"),e.setAttribute("aria-hidden","true"),e.style.display=t===1?"block":"none",this.itemHolders.push({el:e})}}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 l=(t+r)%r;l<=r/2?t=l:t=l-r}else n<0?n=0:n>=r&&(n=r-1),t=n-s.potentialIndex;s.potentialIndex=n,this._currPositionIndex-=t,s.animations.stopMainScroll();const a=this.getCurrSlideX();if(!e)this.moveTo(a),this.updateCurrItem();else{s.animations.startSpring({isMainScroll:!0,start:this.x,end:a,velocity:i||0,naturalFrequency:30,dampingRatio:1,onUpdate:h=>{this.moveTo(h)},onComplete:()=>{this.updateCurrItem(),s.appendHeavy()}});let l=s.potentialIndex-s.currIndex;if(s.canLoop()){const h=(l+r)%r;h<=r/2?l=h:l=h-r}Math.abs(l)>1&&this.updateCurrItem()}return!!t}getCurrSlideX(){return this.slideWidth*this._currPositionIndex}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){var t;const{pswp:e}=this,i=this._prevPositionIndex-this._currPositionIndex;if(!i)return;this._prevPositionIndex=this._currPositionIndex,e.currIndex=e.potentialIndex;let s=Math.abs(i),n;s>=3&&(this._containerShiftIndex+=i+(i>0?-3:3),s=3,this.itemHolders.forEach(r=>{var a;(a=r.slide)===null||a===void 0||a.destroy(),r.slide=void 0}));for(let r=0;r<s;r++)i>0?(n=this.itemHolders.shift(),n&&(this.itemHolders[2]=n,this._containerShiftIndex++,H(n.el,(this._containerShiftIndex+2)*this.slideWidth),e.setContent(n,e.currIndex-s+r+2))):(n=this.itemHolders.pop(),n&&(this.itemHolders.unshift(n),this._containerShiftIndex--,H(n.el,this._containerShiftIndex*this.slideWidth),e.setContent(n,e.currIndex+s-r-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),e.animations.stopAllPan(),this.itemHolders.forEach((r,a)=>{r.slide&&r.slide.setIsActive(a===1)}),e.currSlide=(t=this.itemHolders[1])===null||t===void 0?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 i=(this.slideWidth*this._currPositionIndex-t)/this.slideWidth;i+=this.pswp.currIndex;const s=Math.round(t-this.x);(i<0&&s>0||i>=this.pswp.getNumItems()-1&&s<0)&&(t=this.x+s*Xi)}this.x=t,this.pswp.container&&H(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:e??!1})}}const Ji={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},$=(o,t)=>t?o:Ji[o];class ts{constructor(t){this.pswp=t,this._wasFocused=!1,t.on("bindEvents",()=>{t.options.trapFocus&&(t.options.initialPointerPos||this._focusRoot(),t.events.add(document,"focusin",this._onFocusIn.bind(this))),t.events.add(document,"keydown",this._onKeyDown.bind(this))});const e=document.activeElement;t.on("destroy",()=>{t.options.returnFocus&&e&&this._wasFocused&&e.focus()})}_focusRoot(){!this._wasFocused&&this.pswp.element&&(this.pswp.element.focus(),this._wasFocused=!0)}_onKeyDown(t){const{pswp:e}=this;if(e.dispatch("keydown",{originalEvent:t}).defaultPrevented||Di(t))return;let i,s,n=!1;const r="key"in t;switch(r?t.key:t.keyCode){case $("Escape",r):e.options.escKey&&(i="close");break;case $("z",r):i="toggleZoom";break;case $("ArrowLeft",r):s="x";break;case $("ArrowUp",r):s="y";break;case $("ArrowRight",r):s="x",n=!0;break;case $("ArrowDown",r):n=!0,s="y";break;case $("Tab",r):this._focusRoot();break}if(s){t.preventDefault();const{currSlide:a}=e;e.options.arrowKeys&&s==="x"&&e.getNumItems()>1?i=n?"next":"prev":a&&a.currZoomLevel>a.zoomLevels.fit&&(a.pan[s]+=n?-80:80,a.panTo(a.pan.x,a.pan.y))}i&&(t.preventDefault(),e[i]())}_onFocusIn(t){const{template:e}=this.pswp;e&&document!==t.target&&e!==t.target&&!e.contains(t.target)&&e.focus()}}const es="cubic-bezier(.4,0,.22,1)";class is{constructor(t){var e;this.props=t;const{target:i,onComplete:s,transform:n,onFinish:r=()=>{},duration:a=333,easing:l=es}=t;this.onFinish=r;const h=n?"transform":"opacity",d=(e=t[h])!==null&&e!==void 0?e:"";this._target=i,this._onComplete=s,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{ye(i,h,a,l),this._helperTimeout=setTimeout(()=>{i.addEventListener("transitionend",this._onTransitionEnd,!1),i.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},a+500),i.style[h]=d},30)},0)}_onTransitionEnd(t){t.target===this._target&&this._finalizeAnimation()}_finalizeAnimation(){this._finished||(this._finished=!0,this.onFinish(),this._onComplete&&this._onComplete())}destroy(){this._helperTimeout&&clearTimeout(this._helperTimeout),ki(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}}const ss=12,ns=.75;class os{constructor(t,e,i){this.velocity=t*1e3,this._dampingRatio=e||ns,this._naturalFrequency=i||ss,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}
139easeFrame(t,e){let i=0,s;e/=1e3;const n=Math.E**(-this._dampingRatio*this._naturalFrequency*e);if(this._dampingRatio===1)s=this.velocity+this._naturalFrequency*t,i=(t+s*e)*n,this.velocity=i*-this._naturalFrequency+s*n;else if(this._dampingRatio<1){s=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*t+this.velocity);const r=Math.cos(this._dampedFrequency*e),a=Math.sin(this._dampedFrequency*e);i=n*(t*r+s*a),this.velocity=i*-this._naturalFrequency*this._dampingRatio+n*(-this._dampedFrequency*t*a+this._dampedFrequency*s*r)}return i}}class rs{constructor(t){this.props=t,this._raf=0;const{start:e,end:i,velocity:s,onUpdate:n,onComplete:r,onFinish:a=()=>{},dampingRatio:l,naturalFrequency:h}=t;this.onFinish=a;const d=new os(s,l,h);let p=Date.now(),v=e-i;const y=()=>{this._raf&&(v=d.easeFrame(v,Date.now()-p),Math.abs(v)<1&&Math.abs(d.velocity)<50?(n(i),r&&r(),this.onFinish()):(p=Date.now(),n(v+i),this._raf=requestAnimationFrame(y)))};this._raf=requestAnimationFrame(y)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}}class as{constructor(){this.activeAnimations=[]}startSpring(t){this._start(t,!0)}startTransition(t){this._start(t)}_start(t,e){const i=e?new rs(t):new is(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):!0)}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter(t=>t.props.isMainScroll?(t.destroy(),!1):!0)}isPanRunning(){return this.activeAnimations.some(t=>t.props.isPan)}}class ls{constructor(t){this.pswp=t,t.events.add(t.element,"wheel",this._onWheel.bind(this))}_onWheel(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 n=-s;t.deltaMode===1?n*=.05:n*=t.deltaMode?1:.002,n=2**n;const r=e.currZoomLevel*n;e.zoomTo(r,{x:t.clientX,y:t.clientY})}}else e.isPannable()&&(t.deltaMode===1&&(i*=18,s*=18),e.panTo(e.pan.x-i,e.pan.y-s))}}function hs(o){if(typeof o=="string")return o;if(!o||!o.isCustomSVG)return"";const t=o;
139let e='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return e=e.split("%d").join(t.size||32),t.outlineID&&(e+='<use class="pswp__icn-shadow" xlink:href="#'+t.outlineID+'"/>'),e+=t.inner,e+="</svg>",e}class cs{constructor(t,e){var i;const s=e.name||e.className;let n=e.html;if(t.options[s]===!1)return;typeof t.options[s+"SVG"]=="string"&&(n=t.options[s+"SVG"]),t.dispatch("uiElementCreate",{data:e});let r="";e.isButton?(r+="pswp__button ",r+=e.className||`pswp__button--${e.name}`):r+=e.className||`pswp__${e.name}`;let a=e.isButton?e.tagName||"button":e.tagName||"div";a=a.toLowerCase();const l=P(r,a);if(e.isButton){a==="button"&&(l.type="button");let{title:p}=e;const{ariaLabel:v}=e;typeof t.options[s+"Title"]=="string"&&(p=t.options[s+"Title"]),p&&(l.title=p);const y=v||p;y&&l.setAttribute("aria-label",y)}l.innerHTML=hs(n),e.onInit&&e.onInit(l,t),e.onClick&&(l.onclick=p=>{typeof e.onClick=="string"?t[e.onClick]():typeof e.onClick=="function"&&e.onClick(p,l,t)});const h=e.appendTo||"bar";let d=t.element;h==="bar"?(t.topBar||(t.topBar=P("pswp__top-bar pswp__hide-on-close","div",t.scrollWrap)),d=t.topBar):(l.classList.add("pswp__hide-on-close"),h==="wrapper"&&(d=t.scrollWrap)),(i=d)===null||i===void 0||i.appendChild(t.applyFilters("uiElement",l,e))}}function Se(o,t,e){o.classList.add("pswp__button--arrow"),o.setAttribute("aria-controls","pswp__items"),t.on("change",()=>{t.options.loop||(e?o.disabled=!(t.currIndex<t.getNumItems()-1):o.disabled=!(t.currIndex>0))})}const ds={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<path d="M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z" id="pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:Se},us={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<use xlink:href="#pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(o,t)=>{Se(o,t,!0)}},ps={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M24 10l-2-2-6 6-6-6-2 2 6 6-6 6 2 2 6-6 6 6 2-2-6-6z" id="pswp__icn-close"/>',outlineID:"pswp__icn-close"},onClick:"close"},fs={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M17.426 19.926a6 6 0 1 1 1.5-1.5L23 22.5 21.5 24l-4.074-4.074z" id="pswp__icn-zoom"/><path fill="currentColor" class="pswp__zoom-icn-bar-h" d="M11 16v-2h6v2z"/><path fill="currentColor" class="pswp__zoom-icn-bar-v" d="M13 12h2v6h-2z"/>',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},ms={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 16a5.2 5.2 0 1 1-5.2-5.2V8a8 8 0 1 0 8 8h-2.8Z" id="pswp__icn-loading"/>',outlineID:"pswp__icn-loading"},onInit:(o,t)=>{let e,i=null;const s=(a,l)=>{o.classList.toggle("pswp__preloader--"+a,l)},n=a=>{e!==a&&(e=a,s("active",a))},r=()=>{var a;if(!((a=t.currSlide)!==null&&a!==void 0&&a.content.isLoading())){n(!1),i&&(clearTimeout(i),i=null);return}i||(i=setTimeout(()=>{var l;n(!!(!((l=t.currSlide)===null||l===void 0)&&l.content.isLoading())),i=null},t.options.preloaderDelay))};t.on("change",r),t.on("loadComplete",a=>{t.currSlide===a.slide&&r()}),t.ui&&(t.ui.updatePreloaderVisibility=r)}},gs={name:"counter",order:5,onInit:(o,t)=>{t.on("change",()=>{o.innerText=t.currIndex+1+t.options.indexIndicatorSep+t.getNumItems()})}};function me(o,t){o.classList.toggle("pswp--zoomed-in",t)}class vs{constructor(t){this.pswp=t,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this._lastUpdatedZoomLevel=void 0}init(){const{pswp:t}=this;this.isRegistered=!1,this.uiElementsData=[ps,ds,us,fs,ms,gs],t.dispatch("uiRegister"),this.uiElementsData.sort((e,i)=>(e.order||0)-(i.order||0)),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach(e=>{this.registerElement(e)}),t.on("change",()=>{var e;(e=t.element)===null||e===void 0||e.classList.toggle("pswp--one-slide",t.getNumItems()===1)}),t.on("zoomPanUpdate",()=>this._onZoomPanUpdate())}registerElement(t){this.isRegistered?this.items.push(new cs(this.pswp,t)):this.uiElementsData.push(t)}_onZoomPanUpdate(){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._lastUpdatedZoomLevel)return;this._lastUpdatedZoomLevel=s;const n=e.zoomLevels.initial-e.zoomLevels.secondary;if(Math.abs(n)<.01||!e.isZoomable()){me(t,!1),t.classList.remove("pswp--zoom-allowed");return}t.classList.add("pswp--zoom-allowed");const r=s===e.zoomLevels.initial?e.zoomLevels.secondary:e.zoomLevels.initial;me(t,r<=s),(i.imageClickAction==="zoom"||i.imageClickAction==="zoom-or-close")&&t.classList.add("pswp--cl
139ick-to-zoom")}}function ys(o){const t=o.getBoundingClientRect();return{x:t.left,y:t.top,w:t.width}}function _s(o,t,e){const i=o.getBoundingClientRect(),s=i.width/t,n=i.height/e,r=s>n?s:n,a=(i.width-t*r)/2,l=(i.height-e*r)/2,h={x:i.left+a,y:i.top+l,w:t*r};return h.innerRect={w:i.width,h:i.height,x:a,y:l},h}function ws(o,t,e){const i=e.dispatch("thumbBounds",{index:o,itemData:t,instance:e});if(i.thumbBounds)return i.thumbBounds;const{element:s}=t;let n,r;if(s&&e.options.thumbSelector!==!1){const a=e.options.thumbSelector||"img";r=s.matches(a)?s:s.querySelector(a)}return r=e.applyFilters("thumbEl",r,t,o),r&&(t.thumbCropped?n=_s(r,t.width||t.w||0,t.height||t.h||0):n=ys(r)),e.applyFilters("thumbBounds",n,t,o)}class bs{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}}class Es{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){var s,n,r;this._filters[t]||(this._filters[t]=[]),(s=this._filters[t])===null||s===void 0||s.push({fn:e,priority:i}),(n=this._filters[t])===null||n===void 0||n.sort((a,l)=>a.priority-l.priority),(r=this.pswp)===null||r===void 0||r.addFilter(t,e,i)}removeFilter(t,e){this._filters[t]&&(this._filters[t]=this._filters[t].filter(i=>i.fn!==e)),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){var i;return(i=this._filters[t])===null||i===void 0||i.forEach(s=>{e[0]=s.fn.apply(this,e)}),e[0]}on(t,e){var i,s;this._listeners[t]||(this._listeners[t]=[]),(i=this._listeners[t])===null||i===void 0||i.push(e),(s=this.pswp)===null||s===void 0||s.on(t,e)}off(t,e){var i;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(s=>e!==s)),(i=this.pswp)===null||i===void 0||i.off(t,e)}dispatch(t,e){var i;if(this.pswp)return this.pswp.dispatch(t,e);const s=new bs(t,e);return(i=this._listeners[t])===null||i===void 0||i.forEach(n=>{n.call(this,s)}),s}}class Ss{constructor(t,e){if(this.element=P("pswp__img pswp__img--placeholder",t?"img":"div",e),t){const i=this.element;i.decoding="async",i.alt="",i.src=t,i.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&(this.element.tagName==="IMG"?(Ct(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=X(0,0,t/250)):Ct(this.element,t,e))}destroy(){var t;(t=this.element)!==null&&t!==void 0&&t.parentNode&&this.element.remove(),this.element=null}}class xs{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=I.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(t,e){if(this.slide&&this.usePlaceholder())if(this.placeholder){const i=this.placeholder.element;i&&!i.parentElement&&this.slide.container.prepend(i)}else{const i=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new Ss(i,this.slide.container)}this.element&&!e||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=P("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=P("pswp__content","div"),this.element.innerHTML=this.data.html||""),e&&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=(e=this.data.src)!==null&&e!==void 0?e:"",s.alt=(i=this.data.alt)!==null&&i!==void 0?i:"",this.state=I.LOADING,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=I.LOADED,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===I.LOADED||this.state===I.ERROR)&&this.removePlaceholder())}onError(){this.state=I.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,
vendor: 5,287 bytes, line 139
139content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===I.LOADING,this)}isError(){return this.state===I.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(t,e){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(Ct(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!==I.ERROR,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 t,e;let i=P("pswp__error-msg","div");i.innerText=(t=(e=this.instance.options)===null||e===void 0?void 0:e.errorMsg)!==null&&t!==void 0?t:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=P("pswp__content pswp__error-msg-container","div"),this.element.appendChild(i),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===I.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||he())?(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&&!he()?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===I.LOADED||this.state===I.ERROR)&&this.removePlaceholder()))}}const Ls=5;function xe(o,t,e){const i=t.createContentFromData(o,e);let s;const{options:n}=t;if(n){s=new Ee(n,o,-1);let r;t.pswp?r=t.pswp.viewportSize:r=we(n,t);const a=be(n,r,o,e);s.update(i.width,i.height,a)}return i.lazyLoad(),s&&i.setDisplayedSize(Math.ceil(i.width*s.initial),Math.ceil(i.height*s.initial)),i}function Ps(o,t){const e=t.getItemData(o);if(!t.dispatch("lazyLoadSlide",{index:o,itemData:e}).defaultPrevented)return xe(e,t,o)}class Cs{constructor(t){this.pswp=t,this.limit=Math.max(t.options.preload[0]+t.options.preload[1]+1,Ls),this._cachedItems=[]}updateLazy(t){const{pswp:e}=this;if(e.dispatch("lazyLoad").defaultPrevented)return;const{preload:i}=e.options,s=t===void 0?!0: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=Ps(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._cachedItems.push(t),this._cachedItems.length>this.limit){const e=this._cachedItems.findIndex(i=>!i.isAttached&&!i.hasSlide);e!==-1&&this._cachedItems.splice(e,1)[0].destroy()}}removeByIndex(t){const e=this._cachedItems.findIndex(i=>i.index===t);e!==-1&&this._cachedItems.splice(e,1)}getContentByIndex(t){return this._cachedItems.find(e=>e.index===t)}
139destroy(){this._cachedItems.forEach(t=>t.destroy()),this._cachedItems=[]}}class As extends Es{getNumItems(){var t;let e=0;const i=(t=this.options)===null||t===void 0?void 0:t.dataSource;i&&"length"in i?e=i.length:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(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 xs(t,this,e)}getItemData(t){var e;const i=(e=this.options)===null||e===void 0?void 0:e.dataSource;let s={};Array.isArray(i)?s=i[t]:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),s=i.items[t]);let n=s;n instanceof Element&&(n=this._domElementToItemData(n));const r=this.dispatch("itemData",{itemData:n||{},index:t});return this.applyFilters("itemData",r.itemData,t)}_getGalleryDOMElements(t){var e,i;return(e=this.options)!==null&&e!==void 0&&e.children||(i=this.options)!==null&&i!==void 0&&i.childSelector?Ri(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){const e={element:t},i=t.tagName==="A"?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");if(n){var s;e.msrc=n.currentSrc||n.src,e.alt=(s=n.getAttribute("alt"))!==null&&s!==void 0?s:""}(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0)}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return xe(t,this,e)}}const G=.003;class Is{constructor(t){this.pswp=t,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this._duration=void 0,this._useAnimation=!1,this._croppedZoom=!1,this._animateRootOpacity=!1,this._animateBgOpacity=!1,this._placeholder=void 0,this._opacityElement=void 0,this._cropContainer1=void 0,this._cropContainer2=void 0,this._thumbBounds=void 0,this._prepareOpen=this._prepareOpen.bind(this),t.on("firstZoomPan",this._prepareOpen)}open(){this._prepareOpen(),this._start()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;const t=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this._duration=this.pswp.options.hideAnimationDuration,t&&t.currZoomLevel*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps(),setTimeout(()=>{this._start()},this._croppedZoom?30:0)}_prepareOpen(){if(this.pswp.off("firstZoomPan",this._prepareOpen),!this.isOpening){const t=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this._duration=this.pswp.options.showAnimationDuration,t&&t.zoomLevels.initial*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps()}}_applyStartProps(){const{pswp:t}=this,e=this.pswp.currSlide,{options:i}=t;if(i.showHideAnimationType==="fade"?(i.showHideOpacity=!0,this._thumbBounds=void 0):i.showHideAnimationType==="none"?(i.showHideOpacity=!1,this._duration=0,this._thumbBounds=void 0):this.isOpening&&t._initialThumbBounds?this._thumbBounds=t._initialThumbBounds:this._thumbBounds=this.pswp.getThumbBounds(),this._placeholder=e?.getPlaceholderElement(),t.animations.stopAll(),this._useAnimation=!!(this._duration&&this._duration>50),this._animateZoom=!!this._thumbBounds&&e?.content.usePlaceholder()&&(!this.isClosing||!t.mainScroll.isShifted()),!this._animateZoom)this._animateRootOpacity=!0,this.isOpening&&e&&(e.zoomAndPanToInitial(),e.applyCurrentZoomPan());else{var s;this._animateRootOpacity=(s=i.showHideOpacity)!==null&&s!==void 0?s:!1}if(this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>G,this._opacityElement=this._animateRootOpacity?t.element:t.bg,!this._useAnimation){this._duration=0,this._animateZoom=!1,this._animateBgOpacity=!1,this._animateRootOpacity=!0,this.isOpening&&(t.element&&(t.element.style.opacity=String(G)),t.applyBgOpacity(1));return}if(this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect){var n;this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=(n=this.pswp.currSlide)===null||n===void 0?void 0:n.holderElement,t.container&&(t.container.style.overflow="hidden",t.container.style.width=t.viewportSize.x+"px")}else this._croppedZoom=!1;this.isOpening?(this._animateRootOpacity?(t.element&&(t.element.style.opacity=String(G)),t.applyBgOpacity(1)):(this._animateBgOpacity&&t.bg&&(t.bg.style.opacity=String(G)),t.element&&(t.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(G)))):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._croppedZoom&&t.mainScroll.x!==0&&(t.mainScroll.resetPosition(),t.mainScroll.resize()))}_start(){this.isOpening&&this._useAnimation&&this._placeholder&&this._placeholder.tagName==="IMG"?new Promise(t=>{let e=!1,i=!0;zi(this._placeholder).finally(()=>{e=!0,i||t(!0)}),setTimeout(()=>{i=!1,e&&t(!0)},50),setTimeout(t,250)}).finally(()=>this._initiate()):this._initiate()}_initiate(){var t,e;(t=this.pswp.element)===null||t===void 0||t.style.setProperty("--pswp-transition-duration",this._duration+"ms"),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),(e=this.pswp.element)===null||e===void 0||e.classList.toggle("pswp--ui-visible",this.isOpening),this.isOpening?(this._placeholder&&(this._placeholder.style.opacity="1"),this._animateToOpenState()):this.isClosing&&this._animateToClosedState(),this._useAnimation||this._onAnimationComplete()}_onAnimationComplete(){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._animateZoom&&t.container&&(t.container.style.overflow="visible",t.container.style.width="100%"),(e=t.currSlide)===null||e===void 0||e.applyCurrentZoomPan()}}_animateToOpenState(){const{pswp:t}=this;this._animateZoom&&(this._croppedZoom&&this._cropContainer1&&this._cropContainer2&&(this._animateTo(this._cropContainer1,"transform","translate3d(0,
1390,0)"),this._animateTo(this._cropContainer2,"transform","none")),t.currSlide&&(t.currSlide.zoomAndPanToInitial(),this._animateTo(t.currSlide.container,"transform",t.currSlide.getCurrentTransform()))),this._animateBgOpacity&&t.bg&&this._animateTo(t.bg,"opacity",String(t.options.bgOpacity)),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","1")}_animateToClosedState(){const{pswp:t}=this;this._animateZoom&&this._setClosedStateZoomPan(!0),this._animateBgOpacity&&t.bgOpacity>.01&&t.bg&&this._animateTo(t.bg,"opacity","0"),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","0")}_setClosedStateZoomPan(t){if(!this._thumbBounds)return;const{pswp:e}=this,{innerRect:i}=this._thumbBounds,{currSlide:s,viewportSize:n}=e;if(this._croppedZoom&&i&&this._cropContainer1&&this._cropContainer2){const r=-n.x+(this._thumbBounds.x-i.x)+i.w,a=-n.y+(this._thumbBounds.y-i.y)+i.h,l=n.x-i.w,h=n.y-i.h;t?(this._animateTo(this._cropContainer1,"transform",X(r,a)),this._animateTo(this._cropContainer2,"transform",X(l,h))):(H(this._cropContainer1,r,a),H(this._cropContainer2,l,h))}s&&(S(s.pan,i||this._thumbBounds),s.currZoomLevel=this._thumbBounds.w/s.width,t?this._animateTo(s.container,"transform",s.getCurrentTransform()):s.applyCurrentZoomPan())}_animateTo(t,e,i){if(!this._duration){t.style[e]=i;return}const{animations:s}=this.pswp,n={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{s.activeAnimations.length||this._onAnimationComplete()},target:t};n[e]=i,s.startTransition(n)}}const Ts={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)"};class Os extends As{constructor(t){super(),this.options=this._prepareOptions(t||{}),this.offset={x:0,y:0},this._prevViewportSize={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._initialItemData={},this._initialThumbBounds=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 Mi,this.animations=new as,this.mainScroll=new Qi(this),this.gestures=new Yi(this),this.opener=new Is(this),this.keyboard=new ts(this),this.contentLoader=new Cs(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this._createMainStructure();let t="pswp--open";return this.gestures.supportsTouch&&(t+=" pswp--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 ls(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._initialItemData=this.getItemData(this.currIndex),this.dispatch("gettingData",{index:this.currIndex,data:this._initialItemData,slide:void 0}),this._initialThumbBounds=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",()=>{const{itemHolders:e}=this.mainScroll;e[0]&&(e[0].el.style.display="block",this.setContent(e[0],this.currIndex-1)),e[2]&&(e[2].el.style.display="block",this.setContent(e[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this._handlePageResize.bind(this)),this.events.add(window,"scroll",this._updatePageScrollOffset.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)),J(t,0,e-1)}
139appendHeavy(){this.mainScroll.itemHolders.forEach(t=>{var e;(e=t.slide)===null||e===void 0||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;(e=this.currSlide)===null||e===void 0||e.zoomTo(...t)}toggleZoom(){var t;(t=this.currSlide)===null||t===void 0||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){this.options.showHideAnimationType="none",this.close();return}this.dispatch("destroy"),this._listeners={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),(t=this.element)===null||t===void 0||t.remove(),this.mainScroll.itemHolders.forEach(e=>{var i;(i=e.slide)===null||i===void 0||i.destroy()}),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(t){this.contentLoader.removeByIndex(t),this.mainScroll.itemHolders.forEach((e,i)=>{var s,n;let r=((s=(n=this.currSlide)===null||n===void 0?void 0:n.index)!==null&&s!==void 0?s:0)-1+i;if(this.canLoop()&&(r=this.getLoopedIndex(r)),r===t&&(this.setContent(e,t,!0),i===1)){var a;this.currSlide=e.slide,(a=e.slide)===null||a===void 0||a.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 Hi(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 e=we(this.options,this);!t&&Y(e,this._prevViewportSize)||(S(this._prevViewportSize,e),this.dispatch("beforeResize"),S(this.viewportSize,this._prevViewportSize),this._updatePageScrollOffset(),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(){if(!this.hasMouse){var t;this.hasMouse=!0,(t=this.element)===null||t===void 0||t.classList.add("pswp--has_mouse")}}_handlePageResize(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout(()=>{this.updateSize()},500)}_updatePageScrollOffset(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(t,e){this.offset.x=t,this.offset.y=e,this.dispatch("updateScrollOffset")}_createMainStructure(){this.element=P("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=P("pswp__bg","div",this.element),this.scrollWrap=P("pswp__scroll-wrap","section",this.element),this.container=P("pswp__container","div",this.scrollWrap),this.scrollWrap.setAttribute("aria-roledescription","carousel"),this.container.setAttribute("aria-live","off"),this.container.setAttribute("id","pswp__items"),this.mainScroll.appendHolders(),this.ui=new vs(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return ws(this.currIndex,this.currSlide?this.currSlide.data:this._initialItemData,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}_prepareOptions(t){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(t.showHideAnimationType="none",t.zoomAnimationDuration=0),{...Ts,...t}}}const zt=class zt{constructor(t){this.element=t,this.setupLightbox(t)}setupLightbox(t){this.element=t,Array.from(t.querySelectorAll("img")),this.lightbox=new Ti({gallery:t,children:"img:not(a img)",thumbSelector:"img:not(a img)",padding:{top:32,bottom:32,left:32,right:32},pswpModule:Os}),this.lightbox.addFilter("domItemData",(e,i)=>{if(i){const{src:s,width:n,height:r}=this.getOptimalImageSource(i);e.src=s,e.w=n,e.h=r,e.msrc=i.src,e.thumbCropped=!0}return e}),this.lightbox.init()}getOptimalImageSource(t){const e=window.innerWidth,i=t.srcset;if(!i){const{src:h,width:d,height:p}=t;return{src:h,width:d,height:p}}const s=i.split(",").map(h=>{const[d,p]=h.trim().split(" ");return{url:d,width:parseInt(p.slice(0,-1))}});s.sort((h,d)=>d.width-h.width);const{url:n,width:r}=s.find(h=>h.width<=e)||s[s.length-1],a=t.width/t.height,l=Math.round(r/a);return{src:n,width:r,height:l}}};zt.SELECTOR=".kg-image-card, .kg-gallery-card";let nt=zt;const ks="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css",zs="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js",ot=class ot{
139constructor(){this.codeBlocks=document.querySelectorAll(ot.SELECTOR),this.codeBlocks.length>0&&this.init()}init(){document.addEventListener("DOMContentLoaded",()=>{this.loadStyles(),this.loadScript()})}loadStyles(){const t=document.createElement("link");t.rel="stylesheet",t.href=ks,document.head.appendChild(t)}loadScript(){const t=document.createElement("script");t.src=zs,document.body.appendChild(t),t.onload=()=>{this.highlightCodeBlocks()}}highlightCodeBlocks(){this.codeBlocks.forEach(t=>{window.hljs?.highlightBlock(t)})}};ot.SELECTOR="pre code";let At=ot;const rt=class rt{constructor(t){this.config=t,this.init()}init(){const t=this.generateManifest();this.attachManifest(t)}get pageColor(){return getComputedStyle(document.documentElement).getPropertyValue("--color-page").trim()}generateManifest(){const t=this.pageColor;return JSON.stringify({id:"/",name:this.config.title,short_name:this.config.title,start_url:this.config.url,background_color:t,theme_color:t,description:this.config.description,display:"standalone",display_override:["standalone","fullscreen","minimal-ui","browser"],icons:[{src:this.config.icon,sizes:"512x512",type:"image/png"}]})}attachManifest(t){const e=new Blob([t],{type:"application/json"}),i=URL.createObjectURL(e);document.querySelector(rt.MANIFEST_SELECTOR)?.setAttribute("href",i)}};rt.MANIFEST_SELECTOR="[data-manifest]";let It=rt;var Tt=(o=>(o.Light="light",o.Dark="dark",o.System="system",o))(Tt||{});class Ds{constructor(){this.STORAGE_KEY="color-scheme",this.TOGGLE_SELECTOR="[data-color-scheme-toggle]",this.handleToggleClick=s=>{s.target.closest(this.TOGGLE_SELECTOR)&&(s.preventDefault(),this.toggleColorScheme())};const e=new URLSearchParams(window.location.search).get("color-scheme"),i=sessionStorage.getItem(this.STORAGE_KEY);e&&Object.values(Tt).includes(e)?this.setColorScheme(e):i&&Object.values(Tt).includes(i)?this.setColorScheme(i):document.documentElement.dataset.colorScheme==="system"&&this.initialize(),this.initToggleListeners()}setColorScheme(t){document.documentElement.dataset.colorScheme=t,sessionStorage.setItem(this.STORAGE_KEY,t),t==="system"&&this.initialize()}initialize(){this.updateTheme(window.matchMedia("(prefers-color-scheme: dark)").matches),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>{this.updateTheme(t.matches)})}updateTheme(t){document.documentElement.dataset.colorScheme=t?"dark":"light"}initToggleListeners(){document.addEventListener("click",this.handleToggleClick)}toggleColorScheme(){const e=this.isDarkMode()?"light":"dark";this.setColorScheme(e)}isDarkMode(){const t=document.documentElement.dataset.colorScheme;return t==="dark"?!0:t==="light"?!1:t==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches:!1}}const St={search:"[data-ghost-search]",searchInput:"[data-ghost-search] input",searchHint:"[data-search-hint]"};class Rs{constructor(){this.handleKeydown=t=>{(t.key==="k"||t.key==="K")&&(this.isMac?t.metaKey:t.ctrlKey)&&this.searchInput&&(t.preventDefault(),this.activateSearch()),t.key==="Escape"&&document.activeElement===this.searchInput&&this.searchInput?.blur()},this.searchElement=document.querySelector(St.search),this.searchInput=document.querySelector(St.searchInput),this.searchHint=document.querySelector(St.searchHint),this.isMac=navigator.platform.toUpperCase().indexOf("MAC")>=0,this.init()}init(){this.updateSearchHint(),document.addEventListener("keydown",this.handleKeydown)}updateSearchHint(){this.searchHint&&(this.searchHint.textContent=this.isMac?"âK":"Ctrl+K")}activateSearch(){if(this.searchInput&&(this.searchInput?.focus(),this.searchInput?.select(),this.searchElement)){const t=new CustomEvent("keyboard-search-activate",{bubbles:!0,detail:{source:"keyboard-shortcut"}});this.searchElement?.dispatchEvent(t)}}getSearchShortcut(){return this.isMac?"âK":"Ctrl+K"}}const Z=class Z{constructor(){this.init()}init(){const t=document.querySelectorAll(Z.CONTAINER_SELECTOR),e=new Set;t.forEach(i=>this.removeDuplicates(i,e))}removeDuplicates(t,e){t.querySelectorAll(Z.POST_CARD_SELECTOR).forEach(s=>{const n=s.getAttribute("data-post-id");n&&(e.has(n)?s.remove():e.add(n))})}};Z.CONTAINER_SELECTOR="[data-posts]",Z.POST_CARD_SELECTOR="[data-post-id]";let Ot=Z;class Ms{constructor(){this.init()}init(){document.addEventListener("click",t=>{const i=t.target.closest('a[href^="#"]');if(i&&i.hash){const s=i.hash.substring(1),n=document.getElementById(`${s}-dialog`);n&&n.tagName==="DIALOG"&&(t.preventDefault(),n.showModal())}}),document.addEventListener("click",t=>{const e=t.target.closest("dialog");e&&t.target===e&&e.close()}),document.addEventListener("click",t=>{const i=t.target.closest("[data-dialog-close]");
139if(i){const s=i.closest("dialog");s&&(t.preventDefault(),s.close())}}),document.querySelectorAll("dialog").forEach(t=>{t.addEventListener("close",()=>{window.location.hash&&history.replaceState(null,null," ")})})}}new Ds;new oi;new Rs;new xt;new At;new Ot;new Ms;N?.site&&new It(N.site);document.querySelectorAll(st.SELECTOR).forEach(o=>new st(o));document.querySelectorAll(nt.SELECTOR).forEach(o=>new nt(o));Fe('iframe[src*="youtube.com"]',{class:"reframe-iframe"});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.