var _i=Object.create;var _e=Object.defineProperty;var Fi=Object.getOwnPropertyDescriptor;var Ni=Object.getOwnPropertyNames;var Ci=Object.getPrototypeOf,Mi=Object.prototype.hasOwnProperty;var Ri=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ki=(e,t)=>{for(var r in t)_e(e,r,{get:t[r],enumerable:!0})},zi=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Ni(t))!Mi.call(e,n)&&n!==r&&_e(e,n,{get:()=>t[n],enumerable:!(i=Fi(t,n))||i.enumerable});return e};var ji=(e,t,r)=>(r=e!=null?_i(Ci(e)):{},zi(t||!e||!e.__esModule?_e(r,"default",{value:e,enumerable:!0}):r,e));var Cr=Ri(()=>{(function(){"use strict";var e=function(h,l){var p=function(_){for(var E=0,P=_.length;Eh.length)&&(l=h.length);for(var p=0,b=new Array(l);p=h.length?{done:!0}:{done:!1,value:h[b++]}},e:function(W){throw W},f:w}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var _=!0,E=!1,P;return{s:function(){p=p.call(h)},n:function(){var W=p.next();return _=W.done,W},e:function(W){E=!0,P=W},f:function(){try{!_&&p.return!=null&&p.return()}finally{if(E)throw P}}}}var n=!0,a=!1,o="querySelectorAll",u=function(l){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document,b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:MutationObserver,w=arguments.length>3&&arguments[3]!==void 0?arguments[3]:["*"],_=function W(st,lt,X,S,k,V){var Q=i(st),St;try{for(Q.s();!(St=Q.n()).done;){var K=St.value;(V||o in K)&&(k?X.has(K)||(X.add(K),S.delete(K),l(K,k)):S.has(K)||(S.add(K),X.delete(K),l(K,k)),V||W(K[o](lt),lt,X,S,k,n))}}catch(Le){Q.e(Le)}finally{Q.f()}},E=new b(function(W){if(w.length){var st=w.join(","),lt=new Set,X=new Set,S=i(W),k;try{for(S.s();!(k=S.n()).done;){var V=k.value,Q=V.addedNodes,St=V.removedNodes;_(St,st,lt,X,a,a),_(Q,st,lt,X,n,a)}}catch(K){S.e(K)}finally{S.f()}}}),P=E.observe;return(E.observe=function(W){return P.call(E,W,{subtree:n,childList:n})})(p),E},f="querySelectorAll",c=self,y=c.document,v=c.Element,g=c.MutationObserver,O=c.Set,B=c.WeakMap,M=function(l){return f in l},C=[].filter,U=function(h){var l=new B,p=function(S){for(var k=0,V=S.length;k1&&arguments[1]!==void 0?arguments[1]:!0,V=0,Q=S.length;V-1&&(te=parseInt(navigator.userAgent.substring(r+7))),t&&te&&te<110)return;let i="instantMousedownShortcut"in document.body.dataset;mr="instantAllowQueryString"in document.body.dataset,vr="instantAllowExternalLinks"in document.body.dataset,gr="instantWhitelist"in document.body.dataset;let n={capture:!0,passive:!0},a=!1,o=!1,u=!1;if("instantIntensity"in document.body.dataset){let f=document.body.dataset.instantIntensity;if(f.startsWith("mousedown"))a=!0,f=="mousedown-only"&&(o=!0);else if(f.startsWith("viewport")){let c=navigator.connection&&navigator.connection.saveData,y=navigator.connection&&navigator.connection.effectiveType&&navigator.connection.effectiveType.includes("2g");!c&&!y&&(f=="viewport"?document.documentElement.clientWidth*document.documentElement.clientHeight<45e4&&(u=!0):f=="viewport-all"&&(u=!0))}else{let c=parseInt(f);isNaN(c)||(yr=c)}}if(o||document.addEventListener("touchstart",Vi,n),a?i||document.addEventListener("mousedown",Bi,n):document.addEventListener("mouseover",Hi,n),i&&document.addEventListener("mousedown",$i,n),u){let f=window.requestIdleCallback;f||(f=c=>{c()}),f(function(){let y=new IntersectionObserver(v=>{v.forEach(g=>{if(g.isIntersecting){let O=g.target;y.unobserve(O),re(O.href)}})});document.querySelectorAll("a").forEach(v=>{ee(v)&&y.observe(v)})},{timeout:1500})}}function Vi(e){Fe=performance.now();let t=e.target.closest("a");ee(t)&&re(t.href,"high")}function Hi(e){if(performance.now()-Fe{re(t.href,"high"),Pt=void 0},yr))}function Bi(e){let t=e.target.closest("a");ee(t)&&re(t.href,"high")}function Ui(e){e.relatedTarget&&e.target.closest("a")==e.relatedTarget.closest("a")||Pt&&(clearTimeout(Pt),Pt=void 0)}function $i(e){if(performance.now()-Fe1||e.metaKey||e.ctrlKey||!t)return;t.addEventListener("click",function(i){i.detail!=1337&&i.preventDefault()},{capture:!0,passive:!1,once:!0});let r=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1,detail:1337});t.dispatchEvent(r)}function ee(e){if(!(!e||!e.href)&&!(gr&&!("instant"in e.dataset))&&!(e.origin!=location.origin&&(!(vr||"instant"in e.dataset)||!te))&&["http:","https:"].includes(e.protocol)&&!(e.protocol=="http:"&&location.protocol=="https:")&&!(!mr&&e.search&&!("instant"in e.dataset))&&!(e.hash&&e.pathname+e.search==location.pathname+location.search)&&!("noInstant"in e.dataset))return!0}function re(e,t="auto"){if(pr.has(e))return;let r=document.createElement("link");r.rel="prefetch",r.href=e,r.fetchPriority=t,r.as="document",document.head.appendChild(r),pr.add(e)}var Ce={};ki(Ce,{createFocusTrap:()=>mn});var Er=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],ie=Er.join(","),xr=typeof Element>"u",gt=xr?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ne=!xr&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},oe=function e(t,r){var i;r===void 0&&(r=!0);var n=t==null||(i=t.getAttribute)===null||i===void 0?void 0:i.call(t,"inert"),a=n===""||n==="true",o=a||r&&t&&e(t.parentNode);return o},Ki=function(t){var r,i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return i===""||i==="true"},Sr=function(t,r,i){if(oe(t))return[];var n=Array.prototype.slice.apply(t.querySelectorAll(ie));return r&>.call(t,ie)&&n.unshift(t),n=n.filter(i),n},Or=function e(t,r,i){for(var n=[],a=Array.from(t);a.length;){var o=a.shift();if(!oe(o,!1))if(o.tagName==="SLOT"){var u=o.assignedElements(),f=u.length?u:o.children,c=e(f,!0,i);i.flatten?n.push.apply(n,c):n.push({scopeParent:o,candidates:c})}else{var y=gt.call(o,ie);y&&i.filter(o)&&(r||!t.includes(o))&&n.push(o);var v=o.shadowRoot||typeof i.getShadowRoot=="function"&&i.getShadowRoot(o),g=!oe(v,!1)&&(!i.shadowRootFilter||i.shadowRootFilter(o));if(v&&g){var O=e(v===!0?o.children:v.children,!0,i);i.flatten?n.push.apply(n,O):n.push({scopeParent:o,candidates:O})}else a.unshift.apply(a,o.children)}}return n},Tr=function(t,r){return t.tabIndex<0&&(r||/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Ki(t))&&isNaN(parseInt(t.getAttribute("tabindex"),10))?0:t.tabIndex},qi=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},Ar=function(t){return t.tagName==="INPUT"},Gi=function(t){return Ar(t)&&t.type==="hidden"},Zi=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return r},Xi=function(t,r){for(var i=0;isummary:first-of-type"),o=a?t.parentElement:t;if(gt.call(o,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="legacy-full"){if(typeof n=="function"){for(var u=t;t;){var f=t.parentElement,c=ne(t);if(f&&!f.shadowRoot&&n(f)===!0)return wr(t);t.assignedSlot?t=t.assignedSlot:!f&&c!==t.ownerDocument?t=c.host:t=f}t=u}if(tn(t))return!t.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return wr(t);return!1},rn=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var i=0;i=0)},on=function e(t){var r=[],i=[];return t.forEach(function(n,a){var o=!!n.scopeParent,u=o?n.scopeParent:n,f=Tr(u,o),c=o?e(n.candidates):u;f===0?o?r.push.apply(r,c):r.push(u):i.push({documentOrder:a,tabIndex:f,item:n,isScope:o,content:c})}),i.sort(qi).reduce(function(n,a){return a.isScope?n.push.apply(n,a.content):n.push(a.content),n},[]).concat(r)},Ir=function(t,r){r=r||{};var i;return r.getShadowRoot?i=Or([t],r.includeContainer,{filter:Ne.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:nn}):i=Sr(t,r.includeContainer,Ne.bind(null,r)),on(i)},Pr=function(t,r){r=r||{};var i;return r.getShadowRoot?i=Or([t],r.includeContainer,{filter:ae.bind(null,r),flatten:!0,getShadowRoot:r.getShadowRoot}):i=Sr(t,r.includeContainer,ae.bind(null,r)),i},Dt=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return gt.call(t,ie)===!1?!1:Ne(r,t)},an=Er.concat("iframe").join(","),se=function(t,r){if(r=r||{},!t)throw new Error("No node provided");return gt.call(t,an)===!1?!1:ae(r,t)};function Dr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function Lr(e){for(var t=1;t0){var i=t[t.length-1];i!==r&&i.pause()}var n=t.indexOf(r);n===-1||t.splice(n,1),t.push(r)},deactivateTrap:function(t,r){var i=t.indexOf(r);i!==-1&&t.splice(i,1),t.length>0&&t[t.length-1].unpause()}},un=function(t){return t.tagName&&t.tagName.toLowerCase()==="input"&&typeof t.select=="function"},fn=function(t){return t.key==="Escape"||t.key==="Esc"||t.keyCode===27},_t=function(t){return t.key==="Tab"||t.keyCode===9},dn=function(t){return _t(t)&&!t.shiftKey},hn=function(t){return _t(t)&&t.shiftKey},Fr=function(t){return setTimeout(t,0)},Nr=function(t,r){var i=-1;return t.every(function(n,a){return r(n)?(i=a,!1):!0}),i},Lt=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n1?m-1:0),L=1;L=0)s=i.activeElement;else{var d=o.tabbableGroups[0],m=d&&d.firstTabbableNode;s=m||y("fallbackFocus")}if(!s)throw new Error("Your focus-trap needs to have at least one focusable element");return s},g=function(){if(o.containerGroups=o.containers.map(function(s){var d=Ir(s,a.tabbableOptions),m=Pr(s,a.tabbableOptions);return{container:s,tabbableNodes:d,focusableNodes:m,firstTabbableNode:d.length>0?d[0]:null,lastTabbableNode:d.length>0?d[d.length-1]:null,nextTabbableNode:function(L){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,j=m.findIndex(function(Z){return Z===L});if(!(j<0))return I?m.slice(j+1).find(function(Z){return Dt(Z,a.tabbableOptions)}):m.slice(0,j).reverse().find(function(Z){return Dt(Z,a.tabbableOptions)})}}}),o.tabbableGroups=o.containerGroups.filter(function(s){return s.tabbableNodes.length>0}),o.tabbableGroups.length<=0&&!y("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},O=function A(s){if(s!==!1&&s!==i.activeElement){if(!s||!s.focus){A(v());return}s.focus({preventScroll:!!a.preventScroll}),o.mostRecentlyFocusedNode=s,un(s)&&s.select()}},B=function(s){var d=y("setReturnFocus",s);return d||(d===!1?!1:s)},M=function(s){var d=le(s);if(!(c(d,s)>=0)){if(Lt(a.clickOutsideDeactivates,s)){u.deactivate({returnFocus:a.returnFocusOnDeactivate});return}Lt(a.allowOutsideClick,s)||s.preventDefault()}},C=function(s){var d=le(s),m=c(d,s)>=0;m||d instanceof Document?m&&(o.mostRecentlyFocusedNode=d):(s.stopImmediatePropagation(),O(o.mostRecentlyFocusedNode||v()))},U=function(s){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,m=le(s);g();var T=null;if(o.tabbableGroups.length>0){var L=c(m,s),I=L>=0?o.containerGroups[L]:void 0;if(L<0)d?T=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode:T=o.tabbableGroups[0].firstTabbableNode;else if(d){var j=Nr(o.tabbableGroups,function(xt){var vt=xt.firstTabbableNode;return m===vt});if(j<0&&(I.container===m||se(m,a.tabbableOptions)&&!Dt(m,a.tabbableOptions)&&!I.nextTabbableNode(m,!1))&&(j=L),j>=0){var Z=j===0?o.tabbableGroups.length-1:j-1,mt=o.tabbableGroups[Z];T=mt.lastTabbableNode}else _t(s)||(T=I.nextTabbableNode(m,!1))}else{var tt=Nr(o.tabbableGroups,function(xt){var vt=xt.lastTabbableNode;return m===vt});if(tt<0&&(I.container===m||se(m,a.tabbableOptions)&&!Dt(m,a.tabbableOptions)&&!I.nextTabbableNode(m))&&(tt=L),tt>=0){var Kt=tt===o.tabbableGroups.length-1?0:tt+1,At=o.tabbableGroups[Kt];T=At.firstTabbableNode}else _t(s)||(T=I.nextTabbableNode(m))}}else T=y("fallbackFocus");T&&(_t(s)&&s.preventDefault(),O(T))},F=function(s){if(fn(s)&&Lt(a.escapeDeactivates,s)!==!1){s.preventDefault(),u.deactivate();return}(a.isKeyForward(s)||a.isKeyBackward(s))&&U(s,a.isKeyBackward(s))},D=function(s){var d=le(s);c(d,s)>=0||Lt(a.clickOutsideDeactivates,s)||Lt(a.allowOutsideClick,s)||(s.preventDefault(),s.stopImmediatePropagation())},N=function(){if(o.active)return _r.activateTrap(n,u),o.delayInitialFocusTimer=a.delayInitialFocus?Fr(function(){O(v())}):O(v()),i.addEventListener("focusin",C,!0),i.addEventListener("mousedown",M,{capture:!0,passive:!1}),i.addEventListener("touchstart",M,{capture:!0,passive:!1}),i.addEventListener("click",D,{capture:!0,passive:!1}),i.addEventListener("keydown",F,{capture:!0,passive:!1}),u},G=function(){if(o.active)return i.removeEventListener("focusin",C,!0),i.removeEventListener("mousedown",M,!0),i.removeEventListener("touchstart",M,!0),i.removeEventListener("click",D,!0),i.removeEventListener("keydown",F,!0),u},R=function(s){var d=s.some(function(m){var T=Array.from(m.removedNodes);return T.some(function(L){return L===o.mostRecentlyFocusedNode})});d&&O(v())},Y=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(R):void 0,x=function(){Y&&(Y.disconnect(),o.active&&!o.paused&&o.containers.map(function(s){Y.observe(s,{subtree:!0,childList:!0})}))};return u={get active(){return o.active},get paused(){return o.paused},activate:function(s){if(o.active)return this;var d=f(s,"onActivate"),m=f(s,"onPostActivate"),T=f(s,"checkCanFocusTrap");T||g(),o.active=!0,o.paused=!1,o.nodeFocusedBeforeActivation=i.activeElement,d?.();var L=function(){T&&g(),N(),x(),m?.()};return T?(T(o.containers.concat()).then(L,L),this):(L(),this)},deactivate:function(s){if(!o.active)return this;var d=Lr({onDeactivate:a.onDeactivate,onPostDeactivate:a.onPostDeactivate,checkCanReturnFocus:a.checkCanReturnFocus},s);clearTimeout(o.delayInitialFocusTimer),o.delayInitialFocusTimer=void 0,G(),o.active=!1,o.paused=!1,x(),_r.deactivateTrap(n,u);var m=f(d,"onDeactivate"),T=f(d,"onPostDeactivate"),L=f(d,"checkCanReturnFocus"),I=f(d,"returnFocus","returnFocusOnDeactivate");m?.();var j=function(){Fr(function(){I&&O(B(o.nodeFocusedBeforeActivation)),T?.()})};return I&&L?(L(B(o.nodeFocusedBeforeActivation)).then(j,j),this):(j(),this)},pause:function(s){if(o.paused||!o.active)return this;var d=f(s,"onPause"),m=f(s,"onPostPause");return o.paused=!0,d?.(),G(),x(),m?.(),this},unpause:function(s){if(!o.paused||!o.active)return this;var d=f(s,"onUnpause"),m=f(s,"onPostUnpause");return o.paused=!1,d?.(),g(),N(),x(),m?.(),this},updateContainerElements:function(s){var d=[].concat(s).filter(Boolean);return o.containers=d.map(function(m){return typeof m=="string"?i.querySelector(m):m}),o.active&&g(),x(),this}},u.updateContainerElements(t),u};var co=ji(Cr());function Me(e,t){e.indexOf(t)===-1&&e.push(t)}function Re(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}var Ft=(e,t,r)=>Math.min(Math.max(r,e),t);var z={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"};var q=e=>typeof e=="number";var it=e=>Array.isArray(e)&&!q(e[0]);var Mr=(e,t,r)=>{let i=t-e;return((r-e)%i+i)%i+e};function Nt(e,t){return it(e)?e[Mr(0,e.length,t)]:e}var yt=(e,t,r)=>-r*e+r*t+e;var Ct=()=>{},$=e=>e;var et=(e,t,r)=>t-e===0?1:(r-e)/(t-e);function Ot(e,t){let r=e[e.length-1];for(let i=1;i<=t;i++){let n=et(0,t,i);e.push(yt(r,1,n))}}function bt(e){let t=[0];return Ot(t,e-1),t}function Mt(e,t=bt(e.length),r=$){let i=e.length,n=i-t.length;return n>0&&Ot(t,n),a=>{let o=0;for(;oArray.isArray(e)&&q(e[0]);var ct=e=>typeof e=="object"&&!!e.createAnimation;var H=e=>typeof e=="function";var nt=e=>typeof e=="string";var ut={ms:e=>e*1e3,s:e=>e/1e3};function ke(e,t){return t?e*(1e3/t):0}var Rr=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,vn=1e-7,gn=12;function yn(e,t,r,i,n){let a,o,u=0;do o=t+(r-t)/2,a=Rr(o,i,n)-e,a>0?r=o:t=o;while(Math.abs(a)>vn&&++uyn(a,0,1,e,r);return a=>a===0||a===1?a:Rr(n(a),t,i)}var ze=(e,t="end")=>r=>{r=t==="end"?Math.min(r,.999):Math.max(r,.001);let i=r*e,n=t==="end"?Math.floor(i):Math.ceil(i);return Ft(0,1,n/e)};var kr={ease:wt(.25,.1,.25,1),"ease-in":wt(.42,0,1,1),"ease-in-out":wt(.42,0,.58,1),"ease-out":wt(0,0,.58,1)},bn=/\((.*?)\)/;function Tt(e){if(H(e))return e;if(Rt(e))return wt(...e);if(kr[e])return kr[e];if(e.startsWith("steps")){let t=bn.exec(e);if(t){let r=t[1].split(",");return ze(parseFloat(r[0]),r[1].trim())}}return $}var ot=class{constructor(t,r=[0,1],{easing:i,duration:n=z.duration,delay:a=z.delay,endDelay:o=z.endDelay,repeat:u=z.repeat,offset:f,direction:c="normal"}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=$,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((v,g)=>{this.resolve=v,this.reject=g}),i=i||z.easing,ct(i)){let v=i.createAnimation(r);i=v.easing,r=v.keyframes||r,n=v.duration||n}this.repeat=u,this.easing=it(i)?$:Tt(i),this.updateDuration(n);let y=Mt(r,f,it(i)?i.map(Tt):$);this.tick=v=>{var g;a=a;let O=0;this.pauseTime!==void 0?O=this.pauseTime:O=(v-this.startTime)*this.rate,this.t=O,O/=1e3,O=Math.max(O-a,0),this.playState==="finished"&&this.pauseTime===void 0&&(O=this.totalDuration);let B=O/this.duration,M=Math.floor(B),C=B%1;!C&&B>=1&&(C=1),C===1&&M--;let U=M%2;(c==="reverse"||c==="alternate"&&U||c==="alternate-reverse"&&!U)&&(C=1-C);let F=O>=this.totalDuration?1:Math.min(C,1),D=y(this.easing(F));t(D),this.pauseTime===void 0&&(this.playState==="finished"||O>=this.totalDuration+o)?(this.playState="finished",(g=this.resolve)===null||g===void 0||g.call(this,D)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},this.play()}play(){let t=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(t=this.reject)===null||t===void 0||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){this.pauseTime!==void 0||this.rate===0?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}};var kt=function(){};var zt=class{setAnimation(t){this.animation=t,t?.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}};var je=new WeakMap;function ce(e){return je.has(e)||je.set(e,{transforms:[],values:new Map}),je.get(e)}function zr(e,t){return e.has(t)||e.set(t,new zt),e.get(t)}var wn=["","X","Y","Z"],En=["translate","scale","rotate","skew"],jt={x:"translateX",y:"translateY",z:"translateZ"},jr={syntax:"",initialValue:"0deg",toDefaultUnit:e=>e+"deg"},xn={translate:{syntax:"",initialValue:"0px",toDefaultUnit:e=>e+"px"},rotate:jr,scale:{syntax:"",initialValue:1,toDefaultUnit:$},skew:jr},ft=new Map,fe=e=>`--motion-${e}`,ue=["x","y","z"];En.forEach(e=>{wn.forEach(t=>{ue.push(e+t),ft.set(fe(e+t),xn[e])})});var Sn=(e,t)=>ue.indexOf(e)-ue.indexOf(t),On=new Set(ue),de=e=>On.has(e),Wr=(e,t)=>{jt[t]&&(t=jt[t]);let{transforms:r}=ce(e);Me(r,t),e.style.transform=Tn(r)},Tn=e=>e.sort(Sn).reduce(An,"").trim(),An=(e,t)=>`${e} ${t}(var(${fe(t)}))`;var Wt=e=>e.startsWith("--"),Vr=new Set;function Hr(e){if(!Vr.has(e)){Vr.add(e);try{let{syntax:t,initialValue:r}=ft.has(e)?ft.get(e):{};CSS.registerProperty({name:e,inherits:!1,syntax:t,initialValue:r})}catch{}}}var We=(e,t)=>document.createElement("div").animate(e,t),Br={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{We({opacity:[1]})}catch{return!1}return!0},finished:()=>!!We({opacity:[0,1]},{duration:.001}).finished,linearEasing:()=>{try{We({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},Ve={},dt={};for(let e in Br)dt[e]=()=>(Ve[e]===void 0&&(Ve[e]=Br[e]()),Ve[e]);var In=.015,Pn=(e,t)=>{let r="",i=Math.round(t/In);for(let n=0;nH(e)?dt.linearEasing()?`linear(${Pn(e,t)})`:z.easing:Rt(e)?Dn(e):e,Dn=([e,t,r,i])=>`cubic-bezier(${e}, ${t}, ${r}, ${i})`;function Ur(e,t){for(let r=0;rArray.isArray(e)?e:[e];function Vt(e){return jt[e]&&(e=jt[e]),de(e)?fe(e):e}var Ht={get:(e,t)=>{t=Vt(t);let r=Wt(t)?e.style.getPropertyValue(t):getComputedStyle(e)[t];if(!r&&r!==0){let i=ft.get(t);i&&(r=i.initialValue)}return r},set:(e,t,r)=>{t=Vt(t),Wt(t)?e.style.setProperty(t,r):e.style[t]=r}};function pe(e,t=!0){if(!(!e||e.playState==="finished"))try{e.stop?e.stop():(t&&e.commitStyles(),e.cancel())}catch{}}function $r(e,t){var r;let i=t?.toDefaultUnit||$,n=e[e.length-1];if(nt(n)){let a=((r=n.match(/(-?[\d.]+)([a-z%]*)/))===null||r===void 0?void 0:r[2])||"";a&&(i=o=>o+a)}return i}function Ln(){return window.__MOTION_DEV_TOOLS_RECORD}function me(e,t,r,i={},n){let a=Ln(),o=i.record!==!1&&a,u,{duration:f=z.duration,delay:c=z.delay,endDelay:y=z.endDelay,repeat:v=z.repeat,easing:g=z.easing,persist:O=!1,direction:B,offset:M,allowWebkitAcceleration:C=!1}=i,U=ce(e),F=de(t),D=dt.waapi();F&&Wr(e,t);let N=Vt(t),G=zr(U.values,N),R=ft.get(N);return pe(G.animation,!(ct(g)&&G.generator)&&i.record!==!1),()=>{let Y=()=>{var s,d;return(d=(s=Ht.get(e,N))!==null&&s!==void 0?s:R?.initialValue)!==null&&d!==void 0?d:0},x=Ur(he(r),Y),A=$r(x,R);if(ct(g)){let s=g.createAnimation(x,t!=="opacity",Y,N,G);g=s.easing,x=s.keyframes||x,f=s.duration||f}if(Wt(N)&&(dt.cssRegisterProperty()?Hr(N):D=!1),F&&!dt.linearEasing()&&(H(g)||it(g)&&g.some(H))&&(D=!1),D){R&&(x=x.map(m=>q(m)?R.toDefaultUnit(m):m)),x.length===1&&(!dt.partialKeyframes()||o)&&x.unshift(Y());let s={delay:ut.ms(c),duration:ut.ms(f),endDelay:ut.ms(y),easing:it(g)?void 0:He(g,f),direction:B,iterations:v+1,fill:"both"};u=e.animate({[N]:x,offset:M,easing:it(g)?g.map(m=>He(m,f)):void 0},s),u.finished||(u.finished=new Promise((m,T)=>{u.onfinish=m,u.oncancel=T}));let d=x[x.length-1];u.finished.then(()=>{O||(Ht.set(e,N,d),u.cancel())}).catch(Ct),C||(u.playbackRate=1.000001)}else if(n&&F)x=x.map(s=>typeof s=="string"?parseFloat(s):s),x.length===1&&x.unshift(parseFloat(Y())),u=new n(s=>{Ht.set(e,N,A?A(s):s)},x,Object.assign(Object.assign({},i),{duration:f,easing:g}));else{let s=x[x.length-1];Ht.set(e,N,R&&q(s)?R.toDefaultUnit(s):s)}return o&&a(e,t,x,{duration:f,delay:c,easing:g,repeat:v,offset:M},"motion-one"),G.setAnimation(u),u}}var ve=(e,t)=>e[t]?Object.assign(Object.assign({},e),e[t]):Object.assign({},e);function ht(e,t){var r;return typeof e=="string"?t?((r=t[e])!==null&&r!==void 0||(t[e]=document.querySelectorAll(e)),e=t[e]):e=document.querySelectorAll(e):e instanceof Element&&(e=[e]),Array.from(e||[])}var _n=e=>e(),Et=(e,t,r=z.duration)=>new Proxy({animations:e.map(_n).filter(Boolean),duration:r,options:t},Nn),Fn=e=>e.animations[0],Nn={get:(e,t)=>{let r=Fn(e);switch(t){case"duration":return e.duration;case"currentTime":return ut.s(r?.[t]||0);case"playbackRate":case"playState":return r?.[t];case"finished":return e.finished||(e.finished=Promise.all(e.animations.map(Cn)).catch(Ct)),e.finished;case"stop":return()=>{e.animations.forEach(i=>pe(i))};case"forEachNative":return i=>{e.animations.forEach(n=>i(n,e))};default:return typeof r?.[t]>"u"?void 0:()=>e.animations.forEach(i=>i[t]())}},set:(e,t,r)=>{switch(t){case"currentTime":r=ut.ms(r);case"currentTime":case"playbackRate":for(let i=0;ie.finished;function Kr(e=.1,{start:t=0,from:r=0,easing:i}={}){return(n,a)=>{let o=q(r)?r:Mn(r,a),u=Math.abs(o-n),f=e*u;if(i){let c=a*e;f=Tt(i)(f/c)*c}return t+f}}function Mn(e,t){if(e==="first")return 0;{let r=t-1;return e==="last"?r:r/2}}function ge(e,t,r){return H(e)?e(t,r):e}function qr(e){return function(r,i,n={}){r=ht(r);let a=r.length;kt(!!a,"No valid element provided."),kt(!!i,"No keyframes defined.");let o=[];for(let u=0;ut&&n.atme(...a,ot)).filter(Boolean);return Et(n,t,(r=i[0])===null||r===void 0?void 0:r[3].duration)}function kn(e,t={}){var{defaultOptions:r={}}=t,i=ye(t,["defaultOptions"]);let n=[],a=new Map,o={},u=new Map,f=0,c=0,y=0;for(let v=0;v1,"spring must be provided 2 keyframes within timeline()");let Z=d.createAnimation(x,R!=="opacity",()=>0,R);d=Z.easing,x=Z.keyframes||x,s=Z.duration||s}let m=ge(M.delay,D,F)||0,T=c+m,L=T+s,{offset:I=bt(x.length)}=A;I.length===1&&I[0]===0&&(I[1]=1);let j=I.length-x.length;j>0&&Ot(I,j),x.length===1&&x.unshift(null),Gr(Y,x,d,I,T,L),C=Math.max(m+s,C),y=Math.max(L,y)}}f=c,c+=C}return a.forEach((v,g)=>{for(let O in v){let B=v[O];B.sort(Zr);let M=[],C=[],U=[];for(let F=0;F"u")return()=>{};let a=ht(e),o=new WeakMap,u=c=>{c.forEach(y=>{let v=o.get(y.target);if(y.isIntersecting!==!!v)if(y.isIntersecting){let g=t(y);H(g)?o.set(y.target,g):f.unobserve(y.target)}else v&&(v(y),o.delete(y.target))})},f=new IntersectionObserver(u,{root:r,rootMargin:i,threshold:typeof n=="number"?n:Wn[n]});return a.forEach(c=>f.observe(c)),()=>f.disconnect()}var be=new WeakMap,pt;function Vn(e,t){if(t){let{inlineSize:r,blockSize:i}=t[0];return{width:r,height:i}}else return e instanceof SVGElement&&"getBBox"in e?e.getBBox():{width:e.offsetWidth,height:e.offsetHeight}}function Hn({target:e,contentRect:t,borderBoxSize:r}){var i;(i=be.get(e))===null||i===void 0||i.forEach(n=>{n({target:e,contentSize:t,get size(){return Vn(e,r)}})})}function Bn(e){e.forEach(Hn)}function Un(){typeof ResizeObserver>"u"||(pt=new ResizeObserver(Bn))}function Qr(e,t){pt||Un();let r=ht(e);return r.forEach(i=>{let n=be.get(i);n||(n=new Set,be.set(i,n)),n.add(t),pt?.observe(i)}),()=>{r.forEach(i=>{let n=be.get(i);n?.delete(t),n?.size||pt?.unobserve(i)})}}var we=new Set,Bt;function $n(){Bt=()=>{let e={width:window.innerWidth,height:window.innerHeight},t={target:window,size:e,contentSize:e};we.forEach(r=>r(t))},window.addEventListener("resize",Bt)}function Jr(e){return we.add(e),Bt||$n(),()=>{we.delete(e),!we.size&&Bt&&(Bt=void 0)}}function ti(e,t){return H(e)?Jr(e):Qr(e,t)}var Kn=50,ei=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),ii=()=>({time:0,x:ei(),y:ei()}),qn={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function ri(e,t,r,i){let n=r[t],{length:a,position:o}=qn[t],u=n.current,f=r.time;n.current=e["scroll"+o],n.scrollLength=e["scroll"+a]-e["client"+a],n.offset.length=0,n.offset[0]=0,n.offset[1]=n.scrollLength,n.progress=et(0,n.scrollLength,n.current);let c=i-f;n.velocity=c>Kn?0:ke(n.current-u,c)}function ni(e,t,r){ri(e,"x",t,r),ri(e,"y",t,r),t.time=r}function oi(e,t){let r={x:0,y:0},i=e;for(;i&&i!==t;)if(i instanceof HTMLElement)r.x+=i.offsetLeft,r.y+=i.offsetTop,i=i.offsetParent;else if(i instanceof SVGGraphicsElement&&"getBBox"in i){let{top:n,left:a}=i.getBBox();for(r.x+=a,r.y+=n;i&&i.tagName!=="svg";)i=i.parentNode}return r}var Ee={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]};var xe={start:0,center:.5,end:1};function $e(e,t,r=0){let i=0;if(xe[e]!==void 0&&(e=xe[e]),nt(e)){let n=parseFloat(e);e.endsWith("px")?i=n:e.endsWith("%")?e=n/100:e.endsWith("vw")?i=n/100*document.documentElement.clientWidth:e.endsWith("vh")?i=n/100*document.documentElement.clientHeight:e=n}return q(e)&&(i=t*e),r+i}var Gn=[0,0];function ai(e,t,r,i){let n=Array.isArray(e)?e:Gn,a=0,o=0;return q(e)?n=[e,e]:nt(e)&&(e=e.trim(),e.includes(" ")?n=e.split(" "):n=[e,xe[e]?e:"0"]),a=$e(n[0],r,i),o=$e(n[1],t),a-o}var Zn={x:0,y:0};function si(e,t,r){let{offset:i=Ee.All}=r,{target:n=e,axis:a="y"}=r,o=a==="y"?"height":"width",u=n!==e?oi(n,e):Zn,f=n===e?{width:e.scrollWidth,height:e.scrollHeight}:{width:n.clientWidth,height:n.clientHeight},c={width:e.clientWidth,height:e.clientHeight};t[a].offset.length=0;let y=!t[a].interpolate,v=i.length;for(let g=0;gXn(e,i.target,r),update:a=>{ni(e,r,a),(i.offset||i.target)&&si(e,r,i)},notify:H(t)?()=>t(r):Yn(t,r[n])}}function Yn(e,t){return e.pause(),e.forEachNative((r,{easing:i})=>{var n,a;if(r.updateDuration)i||(r.easing=$),r.updateDuration(1);else{let o={duration:1e3};i||(o.easing="linear"),(a=(n=r.effect)===null||n===void 0?void 0:n.updateTiming)===null||a===void 0||a.call(n,o)}}),()=>{e.currentTime=t.progress}}var Ut=new WeakMap,ci=new WeakMap,Ke=new WeakMap,ui=e=>e===document.documentElement?window:e;function fi(e,t={}){var{container:r=document.documentElement}=t,i=ye(t,["container"]);let n=Ke.get(r);n||(n=new Set,Ke.set(r,n));let a=ii(),o=li(r,e,a,i);if(n.add(o),!Ut.has(r)){let c=()=>{let v=performance.now();for(let g of n)g.measure();for(let g of n)g.update(v);for(let g of n)g.notify()};Ut.set(r,c);let y=ui(r);window.addEventListener("resize",c,{passive:!0}),r!==document.documentElement&&ci.set(r,ti(r,c)),y.addEventListener("scroll",c,{passive:!0})}let u=Ut.get(r),f=requestAnimationFrame(u);return()=>{var c;typeof e!="function"&&e.stop(),cancelAnimationFrame(f);let y=Ke.get(r);if(!y||(y.delete(o),y.size))return;let v=Ut.get(r);Ut.delete(r),v&&(ui(r).removeEventListener("scroll",v),(c=ci.get(r))===null||c===void 0||c(),window.removeEventListener("resize",v))}}function Qn(e,t={}){return Et([()=>{let r=new ot(e,[0,1],t);return r.finished.catch(()=>{}),r}],t,t.duration)}function di(e,t,r){return(H(e)?Qn:Be)(e,t,r)}function at(e){this.listenerMap=[{},{}],e&&this.root(e),this.handle=at.prototype.handle.bind(this),this._removedListeners=[]}at.prototype.root=function(e){let t=this.listenerMap,r;if(this.rootElement){for(r in t[1])t[1].hasOwnProperty(r)&&this.rootElement.removeEventListener(r,this.handle,!0);for(r in t[0])t[0].hasOwnProperty(r)&&this.rootElement.removeEventListener(r,this.handle,!1)}if(!e||!e.addEventListener)return this.rootElement&&delete this.rootElement,this;this.rootElement=e;for(r in t[1])t[1].hasOwnProperty(r)&&this.rootElement.addEventListener(r,this.handle,!0);for(r in t[0])t[0].hasOwnProperty(r)&&this.rootElement.addEventListener(r,this.handle,!1);return this};at.prototype.captureForType=function(e){return["blur","error","focus","load","resize","scroll"].indexOf(e)!==-1};at.prototype.on=function(e,t,r,i){let n,a,o,u;if(!e)throw new TypeError("Invalid event type: "+e);if(typeof t=="function"&&(i=r,r=t,t=null),i===void 0&&(i=this.captureForType(e)),typeof r!="function")throw new TypeError("Handler must be a type of Function");return n=this.rootElement,a=this.listenerMap[i?1:0],a[e]||(n&&n.addEventListener(e,this.handle,i),a[e]=[]),t?/^[a-z]+$/i.test(t)?(u=t,o=Jn):/^#[a-z0-9\-_]+$/i.test(t)?(u=t.slice(1),o=eo):(u=t,o=Element.prototype.matches):(u=null,o=to.bind(this)),a[e].push({selector:t,handler:r,matcher:o,matcherParam:u}),this};at.prototype.off=function(e,t,r,i){let n,a,o,u,f;if(typeof t=="function"&&(i=r,r=t,t=null),i===void 0)return this.off(e,t,r,!0),this.off(e,t,r,!1),this;if(o=this.listenerMap[i?1:0],!e){for(f in o)o.hasOwnProperty(f)&&this.off(f,t,r);return this}if(u=o[e],!u||!u.length)return this;for(n=u.length-1;n>=0;n--)a=u[n],(!t||t===a.selector)&&(!r||r===a.handler)&&(this._removedListeners.push(a),u.splice(n,1));return u.length||(delete o[e],this.rootElement&&this.rootElement.removeEventListener(e,this.handle,i)),this};at.prototype.handle=function(e){let t,r,i=e.type,n,a,o,u,f=[],c,y="ftLabsDelegateIgnore";if(e[y]===!0)return;switch(c=e.target,c.nodeType===3&&(c=c.parentNode),c.correspondingUseElement&&(c=c.correspondingUseElement),n=this.rootElement,a=e.eventPhase||(e.target!==e.currentTarget?3:2),a){case 1:f=this.listenerMap[1][i];break;case 2:this.listenerMap[0]&&this.listenerMap[0][i]&&(f=f.concat(this.listenerMap[0][i])),this.listenerMap[1]&&this.listenerMap[1][i]&&(f=f.concat(this.listenerMap[1][i]));break;case 3:f=this.listenerMap[0][i];break}let v=[];for(r=f.length;c&&r;){for(t=0;t-1&&c.hasAttribute("disabled")?v=[]:o.matcher.call(c,o.matcherParam,c)&&v.push([e,c,o]);if(c===n||(r=f.length,c=c.parentElement||c.parentNode,c instanceof HTMLDocument))break}let g;for(t=0;t-1)&&(u=this.fire.apply(this,v[t]),u===!1)){v[t][0][y]=!0,v[t][0].preventDefault(),g=!1;break}return g};at.prototype.fire=function(e,t,r){return r.handler.call(t,e,t)};function Jn(e,t){return e.toLowerCase()===t.tagName.toLowerCase()}function to(e,t){return this.rootElement===window?t===document||t===document.documentElement||t===window:this.rootElement===t}function eo(e,t){return e===t.id}at.prototype.destroy=function(){this.off(),this.root()};var ro=at;function $t(e,t,r){let i=document.createElement(t);return e&&(i.className=e),r&&r.appendChild(i),i}function io(e,t,r){let i=`translate3d(${e}px,${t||0}px,0)`;return r!==void 0&&(i+=` scale3d(${r},${r},1)`),i}function qe(e,t,r){e.style.width=typeof t=="number"?`${t}px`:t,e.style.height=typeof r=="number"?`${r}px`:r}var J={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function no(e){return"button"in e&&e.button===1||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey}function Oe(e,t,r=document){let i=[];if(e instanceof Element)i=[e];else if(e instanceof NodeList||Array.isArray(e))i=Array.from(e);else{let n=typeof e=="string"?e:t;n&&(i=Array.from(r.querySelectorAll(n)))}return i}function oo(e){return typeof e=="function"&&e.prototype&&e.prototype.goTo}function hi(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}var Ge=class{constructor(t,r){this.type=t,this.defaultPrevented=!1,r&&Object.assign(this,r)}preventDefault(){this.defaultPrevented=!0}},Ze=class{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,r,i=100){this._filters[t]||(this._filters[t]=[]),this._filters[t]?.push({fn:r,priority:i}),this._filters[t]?.sort((n,a)=>n.priority-a.priority),this.pswp?.addFilter(t,r,i)}removeFilter(t,r){this._filters[t]&&(this._filters[t]=this._filters[t].filter(i=>i.fn!==r)),this.pswp&&this.pswp.removeFilter(t,r)}applyFilters(t,...r){return this._filters[t]?.forEach(i=>{r[0]=i.fn.apply(this,r)}),r[0]}on(t,r){this._listeners[t]||(this._listeners[t]=[]),this._listeners[t]?.push(r),this.pswp?.on(t,r)}off(t,r){this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(i=>r!==i)),this.pswp?.off(t,r)}dispatch(t,r){if(this.pswp)return this.pswp.dispatch(t,r);let i=new Ge(t,r);return this._listeners[t]?.forEach(n=>{n.call(this,i)}),i}},Xe=class{constructor(t,r){if(this.element=$t("pswp__img pswp__img--placeholder",t?"img":"div",r),t){let i=this.element;i.decoding="async",i.alt="",i.src=t,i.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,r){this.element&&(this.element.tagName==="IMG"?(qe(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=io(0,0,t/250)):qe(this.element,t,r))}destroy(){this.element?.parentNode&&this.element.remove(),this.element=null}},Ye=class{constructor(t,r,i){this.instance=r,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=J.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,r){if(this.slide&&this.usePlaceholder())if(this.placeholder){let i=this.placeholder.element;i&&!i.parentElement&&this.slide.container.prepend(i)}else{let i=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new Xe(i,this.slide.container)}this.element&&!r||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=$t("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=$t("pswp__content","div"),this.element.innerHTML=this.data.html||""),r&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;let r=this.element;this.updateSrcsetSizes(),this.data.srcset&&(r.srcset=this.data.srcset),r.src=this.data.src??"",r.alt=this.data.alt??"",this.state=J.LOADING,r.complete?this.onLoaded():(r.onload=()=>{this.onLoaded()},r.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=J.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===J.LOADED||this.state===J.ERROR)&&this.removePlaceholder())}onError(){this.state=J.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===J.LOADING,this)}isError(){return this.state===J.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(t,r){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,r),!this.instance.dispatch("contentResize",{content:this,width:t,height:r}).defaultPrevented&&(qe(this.element,t,r),this.isImageContent()&&!this.isError()))){let i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=r,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:r,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==J.ERROR,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;let t=this.element,r=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||r>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=r+"px",t.dataset.largestUsedSize=String(r))}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){let t=$t("pswp__error-msg","div");t.innerText=this.instance.options?.errorMsg??"",t=this.instance.applyFilters("contentErrorElement",t,this),this.element=$t("pswp__content pswp__error-msg-container","div"),this.element.appendChild(t),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===J.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;let t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||hi())?(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&&!hi()?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===J.LOADED||this.state===J.ERROR)&&this.removePlaceholder()))}};function ao(e,t){if(e.getViewportSizeFn){let r=e.getViewportSizeFn(e,t);if(r)return r}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function Se(e,t,r,i,n){let a=0;if(t.paddingFn)a=t.paddingFn(r,i,n)[e];else if(t.padding)a=t.padding[e];else{let o="padding"+e[0].toUpperCase()+e.slice(1);t[o]&&(a=t[o])}return Number(a)||0}function so(e,t,r,i){return{x:t.x-Se("left",e,t,r,i)-Se("right",e,t,r,i),y:t.y-Se("top",e,t,r,i)-Se("bottom",e,t,r,i)}}var pi=4e3,Qe=class{constructor(t,r,i,n){this.pswp=n,this.options=t,this.itemData=r,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,r,i){let n={x:t,y:r};this.elementSize=n,this.panAreaSize=i;let a=i.x/n.x,o=i.y/n.y;this.fit=Math.min(1,ao?a:o),this.vFill=Math.min(1,o),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){let r=t+"ZoomLevel",i=this.options[r];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>pi&&(t=pi/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}};function mi(e,t,r){let i=t.createContentFromData(e,r),n,{options:a}=t;if(a){n=new Qe(a,e,-1);let o;t.pswp?o=t.pswp.viewportSize:o=ao(a,t);let u=so(a,o,e,r);n.update(i.width,i.height,u)}return i.lazyLoad(),n&&i.setDisplayedSize(Math.ceil(i.width*n.initial),Math.ceil(i.height*n.initial)),i}function lo(e,t){let r=t.getItemData(e);if(!t.dispatch("lazyLoadSlide",{index:e,itemData:r}).defaultPrevented)return mi(r,t,e)}var Je=class extends Ze{getNumItems(){let t=0,r=this.options?.dataSource;r&&"length"in r?t=r.length:r&&"gallery"in r&&(r.items||(r.items=this._getGalleryDOMElements(r.gallery)),r.items&&(t=r.items.length));let i=this.dispatch("numItems",{dataSource:r,numItems:t});return this.applyFilters("numItems",i.numItems,r)}createContentFromData(t,r){return new Ye(t,this,r)}getItemData(t){let r=this.options?.dataSource,i={};Array.isArray(r)?i=r[t]:r&&"gallery"in r&&(r.items||(r.items=this._getGalleryDOMElements(r.gallery)),i=r.items[t]);let n=i;n instanceof Element&&(n=this._domElementToItemData(n));let a=this.dispatch("itemData",{itemData:n||{},index:t});return this.applyFilters("itemData",a.itemData,t)}_getGalleryDOMElements(t){return this.options?.children||this.options?.childSelector?Oe(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){let r={element:t},i=t.tagName==="A"?t:t.querySelector("a");if(i){r.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(r.srcset=i.dataset.pswpSrcset),r.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,r.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,r.w=r.width,r.h=r.height,i.dataset.pswpType&&(r.type=i.dataset.pswpType);let n=t.querySelector("img");n&&(r.msrc=n.currentSrc||n.src,r.alt=n.getAttribute("alt")??""),(i.dataset.pswpCropped||i.dataset.cropped)&&(r.thumbCropped=!0)}return this.applyFilters("domItemData",r,t,i)}lazyLoadData(t,r){return mi(t,this,r)}},tr=class extends Je{constructor(t){super(),this.options=t||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){Oe(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(t){if(no(t)||window.pswp||window.navigator.onLine===!1)return;let r={x:t.clientX,y:t.clientY};!r.x&&!r.y&&(r=null);let i=this.getClickedIndex(t);i=this.applyFilters("clickedIndex",i,t,this);let n={gallery:t.currentTarget};i>=0&&(t.preventDefault(),this.loadAndOpen(i,n,r))}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);let r=t.target,n=Oe(this.options.children,this.options.childSelector,t.currentTarget).findIndex(a=>a===r||a.contains(r));return n!==-1?n:this.options.children||this.options.childSelector?-1:0}loadAndOpen(t,r,i){return window.pswp?!1:(this.options.index=t,this.options.initialPointerPos=i,this.shouldOpen=!0,this.preload(t,r),!0)}preload(t,r){let{options:i}=this;r&&(i.dataSource=r);let n=[],a=typeof i.pswpModule;if(oo(i.pswpModule))n.push(Promise.resolve(i.pswpModule));else{if(a==="string")throw new Error("pswpModule as string is no longer supported");if(a==="function")n.push(i.pswpModule());else throw new Error("pswpModule is not valid")}typeof i.openPromise=="function"&&n.push(i.openPromise()),i.preloadFirstSlide!==!1&&t>=0&&(this._preloadedContent=lo(t,this));let o=++this._uid;Promise.all(n).then(u=>{if(this.shouldOpen){let f=u[0];this._openPhotoswipe(f,o)}})}_openPhotoswipe(t,r){if(r!==this._uid&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;let i=typeof t=="object"?new t.default(this.options):new t(this.options);this.pswp=i,window.pswp=i,Object.keys(this._listeners).forEach(n=>{this._listeners[n]?.forEach(a=>{i.on(n,a)})}),Object.keys(this._filters).forEach(n=>{this._filters[n]?.forEach(a=>{i.addFilter(n,a.fn,a.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(){this.pswp?.destroy(),this.shouldOpen=!1,this._listeners={},Oe(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.removeEventListener("click",this.onThumbnailsClick,!1)})}};(function(){Node.prototype.replaceChildren===void 0&&(Node.prototype.replaceChildren=e=>{for(;this.lastChild;)this.removeChild(this.lastChild);e!==void 0&&this.append(e)})})();(function(){let e=!1;if(document.createElement("i").addEventListener("click",()=>{},{get signal(){e=!0}}),e||!window.AbortController)return;let t=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(r,i,n){if(n&&n.signal){if(n.signal.aborted)return;n.signal.addEventListener("abort",()=>this.removeEventListener(r,i,{...n}))}return t.call(this,r,i,n)}})();export{co as CustomElementsPolyfill,ro as Delegate,Ce as FocusTrap,tr as PhotoSwipeLightbox,Ee as ScrollOffset,di as animate,Yr as inView,fi as scroll,Kr as stagger,Xr as timeline}; /*! Bundled license information: @ungap/custom-elements/index.js: (*! (c) Andrea Giammarchi @webreflection ISC *) (*! (c) Andrea Giammarchi - ISC *) instant.page/instantpage.js: (*! instant.page v5.2.0 - (C) 2019-2023 Alexandre Dieulot - https://instant.page/license *) tabbable/dist/index.esm.js: (*! * tabbable 6.1.2 * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE *) focus-trap/dist/focus-trap.esm.js: (*! * focus-trap 7.4.3 * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE *) photoswipe/dist/photoswipe-lightbox.esm.js: (*! * PhotoSwipe Lightbox 5.3.7 - https://photoswipe.com * (c) 2023 Dmytro Semenov *) */