PageSourceSearch

https://www.discoveryprimea.com/_next/static/chunks/2324.8311a36996f24ba2.js

js discoveryprimea.com collected 2026-10-05 09:52:36 UTC 140,441 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2324],{68252:function(r,m,v){"use strict";var b,y,w,x,C,O,M,T,A,L,z,k;let R;v.d(m,{KR:function(){return Oe}});let t=(r,m=1e4)=>Math.round(((r=parseFloat(r+"")||0)+Number.EPSILON)*m)/m,e=function(r){if(!(r&&r instanceof Element&&r.offsetParent))return!1;let m=r.scrollHeight>r.clientHeight,v=window.getComputedStyle(r).overflowY,b=-1!==v.indexOf("hidden"),y=-1!==v.indexOf("visible");return m&&!b&&!y},i=function(r,m){return!(!r||r===document.body||m&&r===m)&&(e(r)?r:i(r.parentElement,m))},n=function(r){var m=(new DOMParser).parseFromString(r,"text/html").body;if(m.childElementCount>1){for(var v=document.createElement("div");m.firstChild;)v.appendChild(m.firstChild);return v}return m.firstChild},s=r=>`${r||""}`.split(" ").filter(r=>!!r),o=(r,m,v)=>{r&&s(m).forEach(m=>{r.classList.toggle(m,v||!1)})};let a=class a{constructor(r){Object.defineProperty(this,"pageX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"pageY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientX",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"clientY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"time",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"nativePointer",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.nativePointer=r,this.pageX=r.pageX,this.pageY=r.pageY,this.clientX=r.clientX,this.clientY=r.clientY,this.id=self.Touch&&r instanceof Touch?r.identifier:-1,this.time=Date.now()}};let j={passive:!1};let l=class l{constructor(r,{start:m=()=>!0,move:v=()=>{},end:b=()=>{}}){for(let y of(Object.defineProperty(this,"element",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"startCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"moveCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"endCallback",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"currentPointers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"startPointers",{enumerable:!0,configurable:!0,writable:!0,value:[]}),this.element=r,this.startCallback=m,this.moveCallback=v,this.endCallback=b,["onPointerStart","onTouchStart","onMove","onTouchEnd","onPointerEnd","onWindowBlur"]))this[y]=this[y].bind(this);this.element.addEventListener("mousedown",this.onPointerStart,j),this.element.addEventListener("touchstart",this.onTouchStart,j),this.element.addEventListener("touchmove",this.onMove,j),this.element.addEventListener("touchend",this.onTouchEnd),this.element.addEventListener("touchcancel",this.onTouchEnd)}onPointerStart(r){if(!r.buttons||0!==r.button)return;let m=new a(r);this.currentPointers.some(r=>r.id===m.id)||this.triggerPointerStart(m,r)&&(window.addEventListener("mousemove",this.onMove),window.addEventListener("mouseup",this.onPointerEnd),window.addEventListener("blur",this.onWindowBlur))}onTouchStart(r){for(let m of Array.from(r.changedTouches||[]))this.triggerPointerStart(new a(m),r);window.addEventListener("blur",this.onWindowBlur)}onMove(r){let m=this.currentPointers.slice(),v="changedTouches"in r?Array.from(r.changedTouches||[]).map(r=>new a(r)):[new a(r)],b=[];for(let r of v){let m=this.currentPointers.findIndex(m=>m.id===r.id);m<0||(b.push(r),this.currentPointers[m]=r)}b.length&&this.moveCallback(r,this.currentPointers.slice(),m)}onPointerEnd(r){r.buttons>0&&0!==r.button||(this.triggerPointerEnd(r,new a(r)),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseup",this.onPointerEnd),window.removeEventListener("blur",this.onWindowBlur))}onTouchEnd(r){for(let m of Array.from(r.changedTouches||[]))this.triggerPointerEnd(r,new a(m))}triggerPointerStart(r,m){return!!this.startCallback(m,r,this.currentPointers.slice())&&(this.currentPointers.push(r),this.startPointers.push(r),!0)}triggerPointerEnd(r,m){let v=this.currentPointers.findIndex(r=>
1r.id===m.id);v<0||(this.currentPointers.splice(v,1),this.startPointers.splice(v,1),this.endCallback(r,m,this.currentPointers.slice()))}onWindowBlur(){this.clear()}clear(){for(;this.currentPointers.length;){let r=this.currentPointers[this.currentPointers.length-1];this.currentPointers.splice(this.currentPointers.length-1,1),this.startPointers.splice(this.currentPointers.length-1,1),this.endCallback(new Event("touchend",{bubbles:!0,cancelable:!0,clientX:r.clientX,clientY:r.clientY}),r,this.currentPointers.slice())}}stop(){this.element.removeEventListener("mousedown",this.onPointerStart,j),this.element.removeEventListener("touchstart",this.onTouchStart,j),this.element.removeEventListener("touchmove",this.onMove,j),this.element.removeEventListener("touchend",this.onTouchEnd),this.element.removeEventListener("touchcancel",this.onTouchEnd),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseup",this.onPointerEnd),window.removeEventListener("blur",this.onWindowBlur)}};function c(r,m){return m?Math.sqrt(Math.pow(m.clientX-r.clientX,2)+Math.pow(m.clientY-r.clientY,2)):0}function h(r,m){return m?{clientX:(r.clientX+m.clientX)/2,clientY:(r.clientY+m.clientY)/2}:r}let d=r=>"object"==typeof r&&null!==r&&r.constructor===Object&&"[object Object]"===Object.prototype.toString.call(r),u=(r,...m)=>{let v=m.length;for(let b=0;b<v;b++){let v=m[b]||{};Object.entries(v).forEach(([m,v])=>{let b=Array.isArray(v)?[]:{};r[m]||Object.assign(r,{[m]:b}),d(v)?Object.assign(r[m],u(b,v)):Array.isArray(v)?Object.assign(r,{[m]:[...v]}):Object.assign(r,{[m]:v})})}return r},p=function(r,m){return r.split(".").reduce((r,m)=>"object"==typeof r?r[m]:void 0,m)};let f=class f{constructor(r={}){for(let m of(Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:r}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),this.setOptions(r),Object.getOwnPropertyNames(Object.getPrototypeOf(this))))m.startsWith("on")&&"function"==typeof this[m]&&(this[m]=this[m].bind(this))}setOptions(r){for(let[m,v]of(this.options=r?u({},this.constructor.defaults,r):{},Object.entries(this.option("on")||{})))this.on(m,v)}option(r,...m){let v=p(r,this.options);return v&&"function"==typeof v&&(v=v.call(this,this,...m)),v}optionFor(r,m,v,...b){var y;let w=p(m,r);"string"!=typeof(y=w)||isNaN(y)||isNaN(parseFloat(y))||(w=parseFloat(w)),"true"===w&&(w=!0),"false"===w&&(w=!1),w&&"function"==typeof w&&(w=w.call(this,this,r,...b));let x=p(m,this.options);return x&&"function"==typeof x?w=x.call(this,this,r,...b,w):void 0===w&&(w=x),void 0===w?v:w}cn(r){let m=this.options.classes;return m&&m[r]||""}localize(r,m=[]){r=String(r).replace(/\{\{(\w+).?(\w+)?\}\}/g,(r,m,v)=>{let b="";return v?b=this.option(`${m[0]+m.toLowerCase().substring(1)}.l10n.${v}`):m&&(b=this.option(`l10n.${m}`)),b||(b=r),b});for(let v=0;v<m.length;v++)r=r.split(m[v][0]).join(m[v][1]);return r=r.replace(/\{\{(.*?)\}\}/g,(r,m)=>m)}on(r,m){let v=[];"string"==typeof r?v=r.split(" "):Array.isArray(r)&&(v=r),this.events||(this.events=new Map),v.forEach(r=>{let v=this.events.get(r);v||(this.events.set(r,[]),v=[]),v.includes(m)||v.push(m),this.events.set(r,v)})}off(r,m){let v=[];"string"==typeof r?v=r.split(" "):Array.isArray(r)&&(v=r),v.forEach(r=>{let v=this.events.get(r);if(Array.isArray(v)){let r=v.indexOf(m);r>-1&&v.splice(r,1)}})}emit(r,...m){[...this.events.get(r)||[]].forEach(r=>r(this,...m)),"*"!==r&&this.emit("*",r,...m)}};Object.defineProperty(f,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.36"}),Object.defineProperty(f,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});let g=class g extends f{constructor(r={}){super(r),Object.defineProperty(this,"plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}})}attachPlugins(r={}){let m=new Map;for(let[v,b]of Object.entries(r)){let r=this.option(v),y=this.plugins[v];y||!1===r?y&&!1===r&&(y.detach(),delete this.plugins[v]):m.set(v,new b(this,r||{}))}for(let[r,v]of m)this.plugins[r]=v,v.attach()}detachPlugins(r){for(let m of r=r||Object.keys(this.plugins)){let r=this.plugins[m];r&&r.detach(),delete this.plugins[m]}
1return this.emit("detachPlugins"),this}};(M=b||(b={}))[M.Init=0]="Init",M[M.Error=1]="Error",M[M.Ready=2]="Ready",M[M.Panning=3]="Panning",M[M.Mousemove=4]="Mousemove",M[M.Destroy=5]="Destroy";let B=["a","b","c","d","e","f"],$={PANUP:"Move up",PANDOWN:"Move down",PANLEFT:"Move left",PANRIGHT:"Move right",ZOOMIN:"Zoom in",ZOOMOUT:"Zoom out",TOGGLEZOOM:"Toggle zoom level",TOGGLE1TO1:"Toggle zoom level",ITERATEZOOM:"Toggle zoom level",ROTATECCW:"Rotate counterclockwise",ROTATECW:"Rotate clockwise",FLIPX:"Flip horizontally",FLIPY:"Flip vertically",FITX:"Fit horizontally",FITY:"Fit vertically",RESET:"Reset",TOGGLEFS:"Toggle fullscreen"},X='<circle cx="25" cy="25" r="20"></circle>',Y='<div class="f-spinner"><svg viewBox="0 0 50 50">'+X+X+"</svg></div>",E=r=>r&&null!==r&&r instanceof Element&&"nodeType"in r,S=(r,m)=>{r&&s(m).forEach(m=>{r.classList.remove(m)})},P=(r,m)=>{r&&s(m).forEach(m=>{r.classList.add(m)})},q={a:1,b:0,c:0,d:1,e:0,f:0},U="mousemove",G="drag",K="content",J="auto",ee=null,et=null;let I=class I extends g{get fits(){return this.contentRect.width-this.contentRect.fitWidth<1&&this.contentRect.height-this.contentRect.fitHeight<1}get isTouchDevice(){return null===et&&(et=window.matchMedia("(hover: none)").matches),et}get isMobile(){return null===ee&&(ee=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)),ee}get panMode(){return this.options.panMode!==U||this.isTouchDevice?G:U}get panOnlyZoomed(){let r=this.options.panOnlyZoomed;return r===J?this.isTouchDevice:r}get isInfinite(){return this.option("infinite")}get angle(){return 180*Math.atan2(this.current.b,this.current.a)/Math.PI||0}get targetAngle(){return 180*Math.atan2(this.target.b,this.target.a)/Math.PI||0}get scale(){let{a:r,b:m}=this.current;return Math.sqrt(r*r+m*m)||1}get targetScale(){let{a:r,b:m}=this.target;return Math.sqrt(r*r+m*m)||1}get minScale(){return this.option("minScale")||1}get fullScale(){let{contentRect:r}=this;return r.fullWidth/r.fitWidth||1}get maxScale(){return this.fullScale*(this.option("maxScale")||1)||1}get coverScale(){let{containerRect:r,contentRect:m}=this,v=Math.max(r.height/m.fitHeight,r.width/m.fitWidth)||1;return Math.min(this.fullScale,v)}get isScaling(){return Math.abs(this.targetScale-this.scale)>1e-5&&!this.isResting}get isContentLoading(){let r=this.content;return!!(r&&r instanceof HTMLImageElement)&&!r.complete}get isResting(){if(this.isBouncingX||this.isBouncingY)return!1;for(let r of B){let m="e"==r||"f"===r?1e-4:1e-5;if(Math.abs(this.target[r]-this.current[r])>m)return!1}return!(!this.ignoreBounds&&!this.checkBounds().inBounds)}constructor(r,m={},v={}){var y;if(super(m),Object.defineProperty(this,"pointerTracker",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"resizeObserver",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"updateTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"rAF",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"isTicking",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"ignoreBounds",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"isBouncingX",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"isBouncingY",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"clicks",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"trackingPoints",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"cwd",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"pmme",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"friction",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:b.Init}),Object.defineProperty(this,"isDragging",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"content",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"spinner",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"containerRect",{enumerable:!0,configurable:!0,writable:!0,value:{width:0,height:0,innerWidth:0,innerHeight:0}}),Object.defineProperty(this,"contentRect",{enumerable:!0,configurable:!0,writable:!0,value:{top:0,right:0,bottom:0,left:0,fullWidth:0,fullHeight:0,fitWidth:0,fitHeight:0,width:0,height:0}}),Object.defineProperty(this,"dragStart",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0,top:0,left:0,time:0}}),Object.defineProperty(this,"dragOffset",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0,time:0}}),Object.defineProperty(this,"current",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},q)}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},q)}),Object.defineProperty(this,"velocity",{enumerable:!0,configurable:!0,writable:!0,value:{a:0,b:0,c:0,d:0,e:0,f:0}}),Object.defineProperty(this,"lockedAxis",{enumerable:!0,configurable:!0,writable:!0,value:!1}),!r)throw Error("Container Element Not Found");this.container=r,this.initContent(),this.attachPlugins(Object.assign(Object.assign({}
1,I.Plugins),v)),this.emit("attachPlugins"),this.emit("init");let w=this.content;if(w.addEventListener("load",this.onLoad),w.addEventListener("error",this.onError),this.isContentLoading){if(this.option("spinner")){r.classList.add(this.cn("isLoading"));let m=n(Y);!r.contains(w)||w.parentElement instanceof HTMLPictureElement?this.spinner=r.appendChild(m):this.spinner=(null===(y=w.parentElement)||void 0===y?void 0:y.insertBefore(m,w))||null}this.emit("beforeLoad")}else queueMicrotask(()=>{this.enable()})}initContent(){let{container:r}=this,m=this.cn(K),v=this.option(K)||r.querySelector(`.${m}`);if(v||(v=r.querySelector("img,picture")||r.firstElementChild)&&P(v,m),v instanceof HTMLPictureElement&&(v=v.querySelector("img")),!v)throw Error("No content found");this.content=v}onLoad(){let{spinner:r,container:m,state:v}=this;r&&(r.remove(),this.spinner=null),this.option("spinner")&&m.classList.remove(this.cn("isLoading")),this.emit("afterLoad"),v===b.Init?this.enable():this.updateMetrics()}onError(){this.state!==b.Destroy&&(this.spinner&&(this.spinner.remove(),this.spinner=null),this.stop(),this.detachEvents(),this.state=b.Error,this.emit("error"))}getNextScale(r){let{fullScale:m,targetScale:v,coverScale:b,maxScale:y,minScale:w}=this,x=w;switch(r){case"toggleMax":x=v-w<.5*(y-w)?y:w;break;case"toggleCover":x=v-w<.5*(b-w)?b:w;break;case"toggleZoom":x=v-w<.5*(m-w)?m:w;break;case"iterateZoom":let C=[1,m,y].sort((r,m)=>r-m),O=C.findIndex(r=>r>v+1e-5);x=C[O]||1}return x}attachObserver(){var r;let e=()=>{let{container:r,containerRect:m}=this;return Math.abs(m.width-r.getBoundingClientRect().width)>.1||Math.abs(m.height-r.getBoundingClientRect().height)>.1};this.resizeObserver||void 0===window.ResizeObserver||(this.resizeObserver=new ResizeObserver(()=>{this.updateTimer||(e()?(this.onResize(),this.isMobile&&(this.updateTimer=setTimeout(()=>{e()&&this.onResize(),this.updateTimer=null},500))):this.updateTimer&&(clearTimeout(this.updateTimer),this.updateTimer=null))})),null===(r=this.resizeObserver)||void 0===r||r.observe(this.container)}detachObserver(){var r;null===(r=this.resizeObserver)||void 0===r||r.disconnect()}attachEvents(){let{container:r}=this;r.addEventListener("click",this.onClick,{passive:!1,capture:!1}),r.addEventListener("wheel",this.onWheel,{passive:!1}),this.pointerTracker=new l(r,{start:this.onPointerDown,move:this.onPointerMove,end:this.onPointerUp}),document.addEventListener(U,this.onMouseMove)}detachEvents(){var r;let{container:m}=this;m.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),m.removeEventListener("wheel",this.onWheel,{passive:!1}),null===(r=this.pointerTracker)||void 0===r||r.stop(),this.pointerTracker=null,document.removeEventListener(U,this.onMouseMove),document.removeEventListener("keydown",this.onKeydown,!0),this.clickTimer&&(clearTimeout(this.clickTimer),this.clickTimer=null),this.updateTimer&&(clearTimeout(this.updateTimer),this.updateTimer=null)}animate(){this.setTargetForce();let r=this.friction,m=this.option("maxVelocity");for(let v of B)r?(this.velocity[v]*=1-r,m&&!this.isScaling&&(this.velocity[v]=Math.max(Math.min(this.velocity[v],m),-1*m)),this.current[v]+=this.velocity[v]):this.current[v]=this.target[v];this.setTransform(),this.setEdgeForce(),!this.isResting||this.isDragging?this.rAF=requestAnimationFrame(()=>this.animate()):this.stop("current")}setTargetForce(){for(let r of B)"e"===r&&this.isBouncingX||"f"===r&&this.isBouncingY||(this.velocity[r]=(1/(1-this.friction)-1)*(this.target[r]-this.current[r]))}checkBounds(r=0,m=0){let{current:v}=this,b=v.e+r,y=v.f+m,w=this.getBounds(),{x:x,y:C}=w,O=x.min,M=x.max,T=C.min,A=C.max,L=0,z=0;return O!==1/0&&b<O?L=O-b:M!==1/0&&b>M&&(L=M-b),T!==1/0&&y<T?z=T-y:A!==1/0&&y>A&&(z=A-y),1e-4>Math.abs(L)&&(L=0),1e-4>Math.abs(z)&&(z=0),Object.assign(Object.assign({},w),{xDiff:L,yDiff:z,inBounds:!L&&!z})}clampTargetBounds(){let{target:r}=this,{x:m,y:v}=this.getBounds();m.min!==1/0&&(r.e=Math.max(r.e,m.min)),m.max!==1/0&&(r.e=Math.min(r.e,m.max)),v.min!==1/0&&(r.f=Math.max(r.f,v.min)),v.max!==1/0&&(r.f=Math.min(r.f,v.max))}calculateContentDim(r=this.current){let{content:m,contentRect:v}=this,{fitWidth:b,fitHeight:y,fullWidth:w,fullHeight:x}=v,C=w,O=x;
1if(this.option("zoom")||0!==this.angle){let v=!(m instanceof HTMLImageElement)&&("none"===window.getComputedStyle(m).maxWidth||"none"===window.getComputedStyle(m).maxHeight),M=v?w:b,T=v?x:y,A=this.getMatrix(r),L=new DOMPoint(0,0).matrixTransform(A),z=new DOMPoint(0+M,0).matrixTransform(A),k=new DOMPoint(0+M,0+T).matrixTransform(A),R=new DOMPoint(0,0+T).matrixTransform(A),j=Math.abs(k.x-L.x),B=Math.abs(k.y-L.y),$=Math.abs(R.x-z.x),X=Math.abs(R.y-z.y);C=Math.max(j,$),O=Math.max(B,X)}return{contentWidth:C,contentHeight:O}}setEdgeForce(){if(this.ignoreBounds||this.isDragging||this.panMode===U||this.targetScale<this.scale)return this.isBouncingX=!1,void(this.isBouncingY=!1);let{target:r}=this,{x:m,y:v,xDiff:b,yDiff:y}=this.checkBounds(),w=this.option("maxVelocity"),x=this.velocity.e,C=this.velocity.f;0!==b?(this.isBouncingX=!0,b*x<=0?x+=.14*b:(x=.14*b,m.min!==1/0&&(this.target.e=Math.max(r.e,m.min)),m.max!==1/0&&(this.target.e=Math.min(r.e,m.max))),w&&(x=Math.max(Math.min(x,w),-1*w))):this.isBouncingX=!1,0!==y?(this.isBouncingY=!0,y*C<=0?C+=.14*y:(C=.14*y,v.min!==1/0&&(this.target.f=Math.max(r.f,v.min)),v.max!==1/0&&(this.target.f=Math.min(r.f,v.max))),w&&(C=Math.max(Math.min(C,w),-1*w))):this.isBouncingY=!1,this.isBouncingX&&(this.velocity.e=x),this.isBouncingY&&(this.velocity.f=C)}enable(){let{content:r}=this,m=new DOMMatrixReadOnly(window.getComputedStyle(r).transform);for(let r of B)this.current[r]=this.target[r]=m[r];this.updateMetrics(),this.attachObserver(),this.attachEvents(),this.state=b.Ready,this.emit("ready")}onClick(r){var m;"click"===r.type&&0===r.detail&&(this.dragOffset.x=0,this.dragOffset.y=0),this.isDragging&&(null===(m=this.pointerTracker)||void 0===m||m.clear(),this.trackingPoints=[],this.startDecelAnim());let v=r.target;if(!v||r.defaultPrevented)return;if(v.hasAttribute("disabled"))return r.preventDefault(),void r.stopPropagation();if((()=>{let r=window.getSelection();return r&&"Range"===r.type})()&&!v.closest("button"))return;let b=v.closest("[data-panzoom-action]"),y=v.closest("[data-panzoom-change]"),w=b||y,x=w&&E(w)?w.dataset:null;if(x){let m=x.panzoomChange,v=x.panzoomAction;if((m||v)&&r.preventDefault(),m){let r={};try{r=JSON.parse(m)}catch(r){console&&console.warn("The given data was not valid JSON")}return void this.applyChange(r)}if(v)return void(this[v]&&this[v]())}if(Math.abs(this.dragOffset.x)>3||Math.abs(this.dragOffset.y)>3)return r.preventDefault(),void r.stopPropagation();if(v.closest("[data-fancybox]"))return;let C=this.content.getBoundingClientRect(),O=this.dragStart;if(O.time&&!this.canZoomOut()&&(Math.abs(C.x-O.x)>2||Math.abs(C.y-O.y)>2))return;this.dragStart.time=0;let c=m=>{this.option("zoom",r)&&m&&"string"==typeof m&&/(iterateZoom)|(toggle(Zoom|Full|Cover|Max)|(zoomTo(Fit|Cover|Max)))/.test(m)&&"function"==typeof this[m]&&(r.preventDefault(),this[m]({event:r}))},M=this.option("click",r),T=this.option("dblClick",r);T?(this.clicks++,1==this.clicks&&(this.clickTimer=setTimeout(()=>{1===this.clicks?(this.emit("click",r),!r.defaultPrevented&&M&&c(M)):(this.emit("dblClick",r),r.defaultPrevented||c(T)),this.clicks=0,this.clickTimer=null},350))):(this.emit("click",r),!r.defaultPrevented&&M&&c(M))}addTrackingPoint(r){let m=this.trackingPoints.filter(r=>r.time>Date.now()-100);m.push(r),this.trackingPoints=m}onPointerDown(r,m,v){var b;if(!1===this.option("touch",r))return!1;this.pwt=0,this.dragOffset={x:0,y:0,time:0},this.trackingPoints=[];let y=this.content.getBoundingClientRect();
1if(this.dragStart={x:y.x,y:y.y,top:y.top,left:y.left,time:Date.now()},this.clickTimer)return!1;if(this.panMode===U&&this.targetScale>1)return r.preventDefault(),r.stopPropagation(),!1;let w=r.composedPath()[0];if(!v.length){if(["TEXTAREA","OPTION","INPUT","SELECT","VIDEO","IFRAME"].includes(w.nodeName)||w.closest("[contenteditable],[data-selectable],[data-draggable],[data-clickable],[data-panzoom-change],[data-panzoom-action]"))return!1;null===(b=window.getSelection())||void 0===b||b.removeAllRanges()}if("mousedown"===r.type)["A","BUTTON"].includes(w.nodeName)||r.preventDefault();else if(Math.abs(this.velocity.a)>.3)return!1;return this.target.e=this.current.e,this.target.f=this.current.f,this.stop(),this.isDragging||(this.isDragging=!0,this.addTrackingPoint(m),this.emit("touchStart",r)),!0}onPointerMove(r,m,v){if(!1===this.option("touch",r)||!this.isDragging||m.length<2&&this.panOnlyZoomed&&t(this.targetScale)<=t(this.minScale)||(this.emit("touchMove",r),r.defaultPrevented))return;this.addTrackingPoint(m[0]);let{content:b}=this,y=h(v[0],v[1]),w=h(m[0],m[1]),x=0,C=0;if(m.length>1){let r=b.getBoundingClientRect();x=y.clientX-r.left-.5*r.width,C=y.clientY-r.top-.5*r.height}let O=c(v[0],v[1]),M=c(m[0],m[1]),T=O?M/O:1,A=w.clientX-y.clientX,L=w.clientY-y.clientY;this.dragOffset.x+=A,this.dragOffset.y+=L,this.dragOffset.time=Date.now()-this.dragStart.time;let z=t(this.targetScale)===t(this.minScale)&&this.option("lockAxis");if(z&&!this.lockedAxis){if("xy"===z||"y"===z||"touchmove"===r.type){if(6>Math.abs(this.dragOffset.x)&&6>Math.abs(this.dragOffset.y))return void r.preventDefault();let m=Math.abs(180*Math.atan2(this.dragOffset.y,this.dragOffset.x)/Math.PI);this.lockedAxis=m>45&&m<135?"y":"x",this.dragOffset.x=0,this.dragOffset.y=0,A=0,L=0}else this.lockedAxis=z}if(i(r.target,this.content)&&(z="x",this.dragOffset.y=0),z&&"xy"!==z&&this.lockedAxis!==z&&t(this.targetScale)===t(this.minScale))return;r.cancelable&&r.preventDefault(),this.container.classList.add(this.cn("isDragging"));let k=this.checkBounds(A,L);this.option("rubberband")?("x"!==this.isInfinite&&(k.xDiff>0&&A<0||k.xDiff<0&&A>0)&&(A*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitWidth*k.xDiff))),"y"!==this.isInfinite&&(k.yDiff>0&&L<0||k.yDiff<0&&L>0)&&(L*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitHeight*k.yDiff)))):(k.xDiff&&(A=0),k.yDiff&&(L=0));let R=this.targetScale,j=this.minScale,B=this.maxScale;R<.5*j&&(T=Math.max(T,j)),R>1.5*B&&(T=Math.min(T,B)),"y"===this.lockedAxis&&t(R)===t(j)&&(A=0),"x"===this.lockedAxis&&t(R)===t(j)&&(L=0),this.applyChange({originX:x,originY:C,panX:A,panY:L,scale:T,friction:this.option("dragFriction"),ignoreBounds:!0})}onPointerUp(r,m,v){if(v.length)return this.dragOffset.x=0,this.dragOffset.y=0,void(this.trackingPoints=[]);this.container.classList.remove(this.cn("isDragging")),this.isDragging&&(this.addTrackingPoint(m),this.panOnlyZoomed&&this.contentRect.width-this.contentRect.fitWidth<1&&this.contentRect.height-this.contentRect.fitHeight<1&&(this.trackingPoints=[]),i(r.target,this.content)&&"y"===this.lockedAxis&&(this.trackingPoints=[]),this.emit("touchEnd",r),this.isDragging=!1,this.lockedAxis=!1,this.state!==b.Destroy&&(r.defaultPrevented||this.startDecelAnim()))}startDecelAnim(){var r;let m=this.isScaling;for(let r of(this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1,B))this.velocity[r]=0;this.target.e=this.current.e,this.target.f=this.current.f,S(this.container,"is-scaling"),S(this.container,"is-animating"),this.isTicking=!1;let{trackingPoints:v}=this,b=v[0],y=v[v.length-1],w=0,x=0,C=0;y&&b&&(w=y.clientX-b.clientX,x=y.clientY-b.clientY,C=y.time-b.time);let O=(null===(r=window.visualViewport)||void 0===r?void 0:r.scale)||1;1!==O&&(w*=O,x*=O);let M=0,T=0,A=0,L=0,z=this.option("decelFriction"),k=this.targetScale;if(C>0){A=Math.abs(w)>3?w/(C/30):0,L=Math.abs(x)>3?x/(C/30):0;let r=this.option("maxVelocity");r&&(A=Math.max(Math.min(A,r),-1*r),L=Math.max(Math.min(L,r),-1*r))}A&&(M=A/(1/(1-z)-1)),L&&(T=L/(1/(1-z)-1)),("y"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"y"===this.lockedAxis&&t(k)===this.minScale)&&(M=A=0),("x"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"x"===this.lockedAxis&&t(k)===this.minScale)&&(T=L=0);let R=this.dragOffset.x,j=this.dragOffset.y,$=this.option("dragMinThreshold")||0;Math.abs(R)<$&&Math.abs(j)<$&&(M=T=0,A=L=0),(this.option("zoom")&&(k<this.minScale-1e-5||k>this.maxScale+1e-5)||m&&!M&&!T)&&(z=.35),this.applyChange({panX:M,panY:T,friction:z}
1),this.emit("decel",A,L,R,j)}onWheel(r){var m=[-r.deltaX||0,-r.deltaY||0,-r.detail||0].reduce(function(r,m){return Math.abs(m)>Math.abs(r)?m:r});let v=Math.max(-1,Math.min(1,m));if(this.emit("wheel",r,v),this.panMode===U||r.defaultPrevented)return;let b=this.option("wheel");"pan"===b?(r.preventDefault(),this.panOnlyZoomed&&!this.canZoomOut()||this.applyChange({panX:-(2*r.deltaX),panY:-(2*r.deltaY),bounce:!1})):"zoom"===b&&!1!==this.option("zoom")&&this.zoomWithWheel(r)}onMouseMove(r){this.panWithMouse(r)}onKeydown(r){"Escape"===r.key&&this.toggleFS()}onResize(){this.updateMetrics(),this.checkBounds().inBounds||this.requestTick()}setTransform(){this.emit("beforeTransform");let{current:r,target:m,content:v,contentRect:b}=this,y=Object.assign({},q);for(let v of B){let b="e"==v||"f"===v?1e4:1e5;y[v]=t(r[v],b),Math.abs(m[v]-r[v])<("e"==v||"f"===v?.51:.001)&&(r[v]=m[v])}let{a:w,b:x,c:C,d:O,e:M,f:T}=y,A=`matrix(${w}, ${x}, ${C}, ${O}, ${M}, ${T})`,L=v.parentElement instanceof HTMLPictureElement?v.parentElement:v;if(this.option("transformParent")&&(L=L.parentElement||L),L.style.transform===A)return;L.style.transform=A;let{contentWidth:z,contentHeight:k}=this.calculateContentDim();b.width=z,b.height=k,this.emit("afterTransform")}updateMetrics(r=!1){var m;if(!this||this.state===b.Destroy||this.isContentLoading)return;let v=Math.max(1,(null===(m=window.visualViewport)||void 0===m?void 0:m.scale)||1),{container:y,content:w}=this,x=w instanceof HTMLImageElement,C=y.getBoundingClientRect(),O=getComputedStyle(this.container),M=C.width*v,T=C.height*v,A=parseFloat(O.paddingTop)+parseFloat(O.paddingBottom),L=M-(parseFloat(O.paddingLeft)+parseFloat(O.paddingRight));this.containerRect={width:M,height:T,innerWidth:L,innerHeight:T-A};let z=parseFloat(w.dataset.width||"")||(w instanceof HTMLImageElement?w.naturalWidth:w instanceof SVGElement?w.width.baseVal.value:Math.max(w.offsetWidth,w.scrollWidth))||0,k=parseFloat(w.dataset.height||"")||(w instanceof HTMLImageElement?w.naturalHeight:w instanceof SVGElement?w.height.baseVal.value:Math.max(w.offsetHeight,w.scrollHeight))||0,R=this.option("width",z)||J,j=this.option("height",k)||J,B=R===J,$=j===J;"number"!=typeof R&&(R=z),"number"!=typeof j&&(j=k),B&&(R=z*(j/k)),$&&(j=k/(z/R));let X=w.parentElement instanceof HTMLPictureElement?w.parentElement:w;this.option("transformParent")&&(X=X.parentElement||X);let Y=X.getAttribute("style")||"";X.style.setProperty("transform","none","important"),x&&(X.style.width="",X.style.height=""),X.offsetHeight;let q=w.getBoundingClientRect(),U=q.width*v,G=q.height*v,K=U,ee=G;U=Math.min(U,R),G=Math.min(G,j),x?{width:U,height:G}=((r,m,v,b)=>{let y=v/r,w=b/m,x=Math.min(y,w);return{width:r*=x,height:m*=x}})(R,j,U,G):(U=Math.min(U,R),G=Math.min(G,j));let et=.5*(ee-G),ei=.5*(K-U);this.contentRect=Object.assign(Object.assign({},this.contentRect),{top:q.top-C.top+et,bottom:C.bottom-q.bottom+et,left:q.left-C.left+ei,right:C.right-q.right+ei,fitWidth:U,fitHeight:G,width:U,height:G,fullWidth:R,fullHeight:j}),X.style.cssText=Y,x&&(X.style.width=`${U}px`,X.style.height=`${G}px`),this.setTransform(),!0!==r&&this.emit("refresh"),this.ignoreBounds||(t(this.targetScale)<t(this.minScale)?this.zoomTo(this.minScale,{friction:0}):this.targetScale>this.maxScale?this.zoomTo(this.maxScale,{friction:0}):this.state===b.Init||this.checkBounds().inBounds||this.requestTick()),this.updateControls()}calculateBounds(){let{contentWidth:r,contentHeight:m}=this.calculateContentDim(this.target),{targetScale:v,lockedAxis:b}=this,{fitWidth:y,fitHeight:w}=this.contentRect,x=0,C=0,O=0,M=0,T=this.option("infinite");if(!0===T||b&&T===b)x=-1/0,O=1/0,C=-1/0,M=1/0;else{let{containerRect:b,contentRect:T}=this,A=t(y*v,1e4),L=t(w*v,1e4),{innerWidth:z,innerHeight:k}=b;if(b.width===A&&(z=b.width),b.width===L&&(k=b.height),r>z){x=-1*(O=.5*(r-z));let m=.5*(T.right-T.left);x+=m,O+=m}if(y>z&&r<z&&(x-=.5*(y-z),O-=.5*(y-z)),m>k){C=-1*(M=.5*(m-k));let r=.5*(T.bottom-T.top);C+=r,M+=r}w>k&&m<k&&(x-=.5*(w-k),O-=.5*(w-k))}return{x:{min:x,max:O},y:{min:C,max:M}}}getBounds(){let r=this.option("bounds");return r!==J?r:this.calculateBounds()}updateControls(){let r=this.container,{panMode:m,contentRect:v,targetScale:b,minScale:y}=this,w=y,x=this.option("click")||!1;x&&(w=this.getNextScale(x));let C=this.canZoomIn(),O=this.canZoomOut(),M=m===G&&!!this.option("touch"),T=O&&M;if(M&&(t(b)<t(y)&&!this.panOnlyZoomed&&(T=!0),(t(v.width,1)>t(v.fitWidth,1)||t(v.height,1)>t(v.fitHeight,1))&&(T=!0)),t(v.width*b,1)<t(v.fitWidth,1)&&(T=!1),m===U&&(T=!1),o(r,this.cn("isDraggable"),T),!this.option("zoom"))return;let A=C&&t(w)>t(b),L=!A&&!T&&O&&t(w)<t(b);for(let m of(o(r,this.cn("canZoomIn"),A),o(r,this.cn("canZoomOut"),L),r.querySelectorAll("[data-panzoom-action]"))){let r=!1,v=!1;switch(m.dataset.panzoomAction){case"zoomIn":C?r=!0:v=!0;break;case"zoomOut":O?r=!0:v=!0;break;case"toggleZoom":case"iterateZoom":C||O?r=!0:v=!0;let b=m.querySelector("g");b&&(b.style.display=C?"":"none")}r?(m.removeAttribute("disabled"),m.removeAttribute("tabindex")):v&&(m.setAttribute("disabled",""),m.setAttribute("tabindex","-1"))}}panTo({x:r=this.target.e,y:m=this.target.f,scale:v=this.targetScale,friction:y=this.option("friction"),angle:w=0,originX:x=0,originY:C=0,flipX:O=!1,flipY:M=!1,ignoreBounds:T=!1}){this.state!==b.Destroy&&this.applyChange({panX:r-this.target.e,panY:m-this.target.f,scale:v/this.targetScale,angle:w,originX:x,originY:C,friction:y,flipX:O,flipY:M,ignoreBounds:T})}applyChange({panX:r=0,panY:m=0,scale:v=1,angle:y=0,originX:w=-this.current.e,originY:x=-this.current.f,friction:C=this.option("friction"),flipX:O=!1,flipY:M=!1,ignoreBounds:T=!1,bounce:A=this.option("bounce")}){let L=this.state;if(L===b.Destroy)return;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.friction=C||0,this.ignoreBounds=T;let{current:z}=this,k=z.e,R=z.f,j=this.getMatrix(this.target),$=(new DOMMatrix).translate(k,R).translate(w,x).translate(r,m);
1if(this.option("zoom")){if(!T){let r=this.targetScale,m=this.minScale,b=this.maxScale;r*v<m&&(v=m/r),r*v>b&&(v=b/r)}$=$.scale(v)}for(let r of($=$.translate(-w,-x).translate(-k,-R).multiply(j),y&&($=$.rotate(y)),O&&($=$.scale(-1,1)),M&&($=$.scale(1,-1)),B))"e"!==r&&"f"!==r&&($[r]>this.minScale+1e-5||$[r]<this.minScale-1e-5)?this.target[r]=$[r]:this.target[r]=t($[r],1e4);(this.targetScale<this.scale||Math.abs(v-1)>.1||this.panMode===U||!1===A)&&!T&&this.clampTargetBounds(),L===b.Init?this.animate():this.isResting||(this.state=b.Panning,this.requestTick())}stop(r=!1){if(this.state===b.Init||this.state===b.Destroy)return;let m=this.isTicking;for(let m of(this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1,B))this.velocity[m]=0,"current"===r?this.current[m]=this.target[m]:"target"===r&&(this.target[m]=this.current[m]);this.setTransform(),S(this.container,"is-scaling"),S(this.container,"is-animating"),this.isTicking=!1,this.state=b.Ready,m&&(this.emit("endAnimation"),this.updateControls())}
1requestTick(){this.isTicking||(this.emit("startAnimation"),this.updateControls(),P(this.container,"is-animating"),this.isScaling&&P(this.container,"is-scaling")),this.isTicking=!0,this.rAF||(this.rAF=requestAnimationFrame(()=>this.animate()))}panWithMouse(r,m=this.option("mouseMoveFriction")){if(this.pmme=r,this.panMode!==U||!r||t(this.targetScale)<=t(this.minScale))return;this.emit("mouseMove",r);let{container:v,containerRect:b,contentRect:y}=this,w=b.width,x=b.height,C=v.getBoundingClientRect(),O=(r.clientX||0)-C.left,M=(r.clientY||0)-C.top,{contentWidth:T,contentHeight:A}=this.calculateContentDim(this.target),L=this.option("mouseMoveFactor");L>1&&(T!==w&&(T*=L),A!==x&&(A*=L));let z=.5*(T-w)-O/w*100/100*(T-w);z+=.5*(y.right-y.left);let k=.5*(A-x)-M/x*100/100*(A-x);k+=.5*(y.bottom-y.top),this.applyChange({panX:z-this.target.e,panY:k-this.target.f,friction:m})}zoomWithWheel(r){if(this.state===b.Destroy||this.state===b.Init)return;let m=Date.now();if(m-this.pwt<45)return void r.preventDefault();this.pwt=m;var v=[-r.deltaX||0,-r.deltaY||0,-r.detail||0].reduce(function(r,m){return Math.abs(m)>Math.abs(r)?m:r});let y=Math.max(-1,Math.min(1,v)),{targetScale:w,maxScale:x,minScale:C}=this,O=w*(100+45*y)/100;t(O)<t(C)&&t(w)<=t(C)?(this.cwd+=Math.abs(y),O=C):t(O)>t(x)&&t(w)>=t(x)?(this.cwd+=Math.abs(y),O=x):(this.cwd=0,O=Math.max(Math.min(O,x),C)),this.cwd>this.option("wheelLimit")||(r.preventDefault(),t(O)!==t(w)&&this.zoomTo(O,{event:r}))}canZoomIn(){return this.option("zoom")&&(t(this.contentRect.width,1)<t(this.contentRect.fitWidth,1)||t(this.targetScale)<t(this.maxScale))}canZoomOut(){return this.option("zoom")&&t(this.targetScale)>t(this.minScale)}zoomIn(r=1.25,m){this.zoomTo(this.targetScale*r,m)}zoomOut(r=.8,m){this.zoomTo(this.targetScale*r,m)}zoomToFit(r){this.zoomTo("fit",r)}zoomToCover(r){this.zoomTo("cover",r)}zoomToFull(r){this.zoomTo("full",r)}zoomToMax(r){this.zoomTo("max",r)}toggleZoom(r){this.zoomTo(this.getNextScale("toggleZoom"),r)}toggleMax(r){this.zoomTo(this.getNextScale("toggleMax"),r)}toggleCover(r){this.zoomTo(this.getNextScale("toggleCover"),r)}iterateZoom(r){this.zoomTo("next",r)}zoomTo(r=1,{friction:m=J,originX:v=J,originY:y=J,event:w}={}){if(this.isContentLoading||this.state===b.Destroy)return;let{targetScale:x,fullScale:C,maxScale:O,coverScale:M}=this;if(this.stop(),this.panMode===U&&(w=this.pmme||w),w||v===J||y===J){let r=this.content.getBoundingClientRect(),m=this.container.getBoundingClientRect(),b=w?w.clientX:m.left+.5*m.width,x=w?w.clientY:m.top+.5*m.height;v=b-r.left-.5*r.width,y=x-r.top-.5*r.height}let T=1;"number"==typeof r?T=r:"full"===r?T=C:"cover"===r?T=M:"max"===r?T=O:"fit"===r?T=1:"next"===r&&(T=this.getNextScale("iterateZoom")),T=T/x||1,m=m===J?T>1?.15:.25:m,this.applyChange({scale:T,originX:v,originY:y,friction:m}),w&&this.panMode===U&&this.panWithMouse(w,m)}rotateCCW(){this.applyChange({angle:-90})}rotateCW(){this.applyChange({angle:90})}flipX(){this.applyChange({flipX:!0})}flipY(){this.applyChange({flipY:!0})}fitX(){this.stop("target");let{containerRect:r,contentRect:m,target:v}=this;this.applyChange({panX:.5*r.width-(m.left+.5*m.fitWidth)-v.e,panY:.5*r.height-(m.top+.5*m.fitHeight)-v.f,scale:r.width/m.fitWidth/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}fitY(){this.stop("target");let{containerRect:r,contentRect:m,target:v}=this;this.applyChange({panX:.5*r.width-(m.left+.5*m.fitWidth)-v.e,panY:.5*r.innerHeight-(m.top+.5*m.fitHeight)-v.f,scale:r.height/m.fitHeight/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}toggleFS(){let{container:r}=this,m=this.cn("inFullscreen"),v=this.cn("htmlHasFullscreen");r.classList.toggle(m);let b=r.classList.contains(m);b?(document.documentElement.classList.add(v),document.addEventListener("keydown",this.onKeydown,!0)):(document.documentElement.classList.remove(v),document.removeEventListener("keydown",this.onKeydown,!0)),this.updateMetrics(),this.emit(b?"enterFS":"exitFS")}getMatrix(r=this.current){let{a:m,b:v,c:b,d:y,e:w,f:x}=r;return new DOMMatrix([m,v,b,y,w,x])}reset(r){if(this.state!==b.Init&&this.state!==b.Destroy){for(let r of(this.stop("current"),B))this.target[r]=q[r];this.target.a=this.minScale,this.target.d=this.minScale,this.clampTargetBounds(),this.isResting||(this.friction=void 0===r?this.option("friction"):r,this.state=b.Panning,this.requestTick())}}destroy(){this.stop(),this.state=b.Destroy,this.detachEvents(),this.detachObserver();let{container:r,content:m}=this,v=this.option("classes")||{};for(let m of Object.values(v))r.classList.remove(m+"");m&&(m.removeEventListener("load",this.onLoad),m.removeEventListener("error",this.onError)),this.detachPlugins()}};Object.defineProperty(I,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{content:null,width:"auto",height:"auto",panMode:"drag",touch:!0,dragMinThreshold:3,lockAxis:!1,mouseMoveFactor:1,mouseMoveFriction:.12,zoom:!0,pinchToZoom:!0,panOnlyZoomed:"auto",minScale:1,maxScale:2,friction:.25,dragFriction:.35,decelFriction:.05,click:"toggleZoom",dblClick:!1,wheel:"zoom",wheelLimit:7,spinner:!0,bounds:"auto",infinite:!1,rubberband:!0,bounce:!0,maxVelocity:75,transformParent:!1,classes:{content:"f-panzoom__content",isLoading:"is-loading",canZoomIn:"can-zoom_in",canZoomOut:"can-zoom_out",isDraggable:"is-draggable",isDragging:"is-dragging",inFullscreen:"in-fullscreen",htmlHasFullscreen:"with-panzoom-in-fullscreen"},l10n:$}}),Object.defineProperty(I,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}});let D=function(r,m){let v=!0;return(...b)=>{v&&(v=!1,r(...b),setTimeout(()=>{v=!0},m))}},F=(r,m)=>{let v=[];
1return r.childNodes.forEach(r=>{r.nodeType!==Node.ELEMENT_NODE||m&&!r.matches(m)||v.push(r)}),v};(T=y||(y={}))[T.Init=0]="Init",T[T.Ready=1]="Ready",T[T.Destroy=2]="Destroy";let H=r=>{if("string"==typeof r||r instanceof HTMLElement)r={html:r};else{let m=r.thumb;void 0!==m&&("string"==typeof m&&(r.thumbSrc=m),m instanceof HTMLImageElement&&(r.thumbEl=m,r.thumbElSrc=m.src,r.thumbSrc=m.src),delete r.thumb)}return Object.assign({html:"",el:null,isDom:!1,class:"",customClass:"",index:-1,dim:0,gap:0,pos:0,transition:!1},r)},N=(r={})=>Object.assign({index:-1,slides:[],dim:0,pos:-1},r);let _=class _ extends f{constructor(r,m){super(m),Object.defineProperty(this,"instance",{enumerable:!0,configurable:!0,writable:!0,value:r})}attach(){}detach(){}};let W=class W extends _{constructor(){super(...arguments),Object.defineProperty(this,"isDynamic",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"list",{enumerable:!0,configurable:!0,writable:!0,value:null})}onRefresh(){this.refresh()}build(){let r=this.list;if(!r){P(r=document.createElement("ul"),this.cn("list")),r.setAttribute("role","tablist");let m=this.instance.container;m.appendChild(r),P(m,this.cn("hasDots")),this.list=r}return r}refresh(){var r;let m=this.instance.pages.length,v=Math.min(2,this.option("minCount")),b=Math.max(2e3,this.option("maxCount")),y=this.option("dynamicFrom");if(m<v||m>b)return void this.cleanup();let w="number"==typeof y&&m>5&&m>=y,x=!this.list||this.isDynamic!==w||this.list.children.length!==m;x&&this.cleanup();let C=this.build();if(o(C,this.cn("isDynamic"),!!w),x)for(let r=0;r<m;r++)C.append(this.createItem(r));let O,M=0;for(let m of[...C.children]){let v=M===this.instance.page;for(let b of(v&&(O=m),o(m,this.cn("isCurrent"),v),null===(r=m.children[0])||void 0===r||r.setAttribute("aria-selected",v?"true":"false"),["isBeforePrev","isPrev","isNext","isAfterNext"]))S(m,this.cn(b));M++}if(O=O||C.firstChild,w&&O){let r=O.previousElementSibling,m=r&&r.previousElementSibling;P(r,this.cn("isPrev")),P(m,this.cn("isBeforePrev"));let v=O.nextElementSibling,b=v&&v.nextElementSibling;P(v,this.cn("isNext")),P(b,this.cn("isAfterNext"))}this.isDynamic=w}createItem(r=0){var m;let v=document.createElement("li");v.setAttribute("role","presentation");let b=n(this.instance.localize(this.option("dotTpl"),[["%d",r+1]]).replace(/\%i/g,r+""));return v.appendChild(b),null===(m=v.children[0])||void 0===m||m.setAttribute("role","tab"),v}cleanup(){this.list&&(this.list.remove(),this.list=null),this.isDynamic=!1,S(this.instance.container,this.cn("hasDots"))}attach(){this.instance.on(["refresh","change"],this.onRefresh)}detach(){this.instance.off(["refresh","change"],this.onRefresh),this.cleanup()}};Object.defineProperty(W,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{classes:{list:"f-carousel__dots",isDynamic:"is-dynamic",hasDots:"has-dots",dot:"f-carousel__dot",isBeforePrev:"is-before-prev",isPrev:"is-prev",isCurrent:"is-current",isNext:"is-next",isAfterNext:"is-after-next"},dotTpl:'<button type="button" data-carousel-page="%i" aria-label="{{GOTO}}"><span class="f-carousel__dot" aria-hidden="true"></span></button>',dynamicFrom:11,maxCount:1/0,minCount:2}});let ei="disabled",en="next",es="prev";let V=class V extends _{constructor(){super(...arguments),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"prev",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"next",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"isDom",{enumerable:!0,configurable:!0,writable:!0,value:!1})}onRefresh(){let r=this.instance,m=r.pages.length,v=r.page;if(m<2)return void this.cleanup();this.build();let b=this.prev,y=this.next;b&&y&&(b.removeAttribute(ei),y.removeAttribute(ei),r.isInfinite||(v<=0&&b.setAttribute(ei,""),v>=m-1&&y.setAttribute(ei,"")))}addBtn(r){var m;let v=this.instance,b=document.createElement("button");b.setAttribute("tabindex","0"),b.setAttribute("title",v.localize(`{{${r.toUpperCase()}}}`)),P(b,this.cn("button")+" "+this.cn(r===en?"isNext":"isPrev"));let y=v.isRTL?r===en?es:en:r;return b.innerHTML=v.localize(this.option(`${y}Tpl`)),b.dataset[`carousel${r?r.match("^[a-z]")?r.charAt(0).toUpperCase()+r.substring(1):r:""}`]="true",null===(m=this.container)||void 0===m||m.appendChild(b),b}build(){let r=this.instance.container,m=this.cn("container"),{container:v,prev:b,next:y}=this;v||(v=r.querySelector("."+m),this.isDom=!!v),v||(P(v=document.createElement("div"),m),r.appendChild(v)),this.container=v,y||(y=v.querySelector("[data-carousel-next]")),y||(y=this.addBtn(en)),this.next=y,b||(b=v.querySelector("[data-carousel-prev]")),b||(b=this.addBtn(es)),this.prev=b}cleanup(){this.isDom||(this.prev&&this.prev.remove(),this.next&&this.next.remove(),this.container&&this.container.remove()),this.prev=null,this.next=null,this.container=null,this.isDom=!1}attach(){this.instance.on(["refresh","change"],this.onRefresh)}detach(){this.instance.off(["refresh","change"],this.onRefresh),this.cleanup()}};Object.defineProperty(V,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{classes:{container:"f-carousel__nav",button:"f-button",isNext:"is-next",isPrev:"is-prev"},nextTpl:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M9 3l9 9-9 9"/></svg>
1',prevTpl:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M15 3l-9 9 9 9"/></svg>'}});let Z=class Z extends _{constructor(){super(...arguments),Object.defineProperty(this,"selectedIndex",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"nav",{enumerable:!0,configurable:!0,writable:!0,value:null})}addAsTargetFor(r){this.target=this.instance,this.nav=r,this.attachEvents()}addAsNavFor(r){this.nav=this.instance,this.target=r,this.attachEvents()}attachEvents(){let{nav:r,target:m}=this;r&&m&&(r.options.initialSlide=m.options.initialPage,r.state===y.Ready?this.onNavReady(r):r.on("ready",this.onNavReady),m.state===y.Ready?this.onTargetReady(m):m.on("ready",this.onTargetReady))}onNavReady(r){r.on("createSlide",this.onNavCreateSlide),r.on("Panzoom.click",this.onNavClick),r.on("Panzoom.touchEnd",this.onNavTouch),this.onTargetChange()}onTargetReady(r){r.on("change",this.onTargetChange),r.on("Panzoom.refresh",this.onTargetChange),this.onTargetChange()}onNavClick(r,m,v){this.onNavTouch(r,r.panzoom,v)}onNavTouch(r,m,v){var b,y;if(Math.abs(m.dragOffset.x)>3||Math.abs(m.dragOffset.y)>3)return;let w=v.target,{nav:x,target:C}=this;if(!x||!C||!w)return;let O=w.closest("[data-index]");if(v.stopPropagation(),v.preventDefault(),!O)return;let M=parseInt(O.dataset.index||"",10)||0,T=C.getPageForSlide(M),A=x.getPageForSlide(M);x.slideTo(A),C.slideTo(T,{friction:(null===(y=null===(b=this.nav)||void 0===b?void 0:b.plugins)||void 0===y?void 0:y.Sync.option("friction"))||0}),this.markSelectedSlide(M)}onNavCreateSlide(r,m){m.index===this.selectedIndex&&this.markSelectedSlide(m.index)}onTargetChange(){var r,m;let{target:v,nav:b}=this;if(!v||!b||b.state!==y.Ready||v.state!==y.Ready)return;let w=null===(m=null===(r=v.pages[v.page])||void 0===r?void 0:r.slides[0])||void 0===m?void 0:m.index,x=b.getPageForSlide(w);this.markSelectedSlide(w),b.slideTo(x,null===b.prevPage&&null===v.prevPage?{friction:0}:void 0)}markSelectedSlide(r){let m=this.nav;m&&m.state===y.Ready&&(this.selectedIndex=r,[...m.slides].map(m=>{m.el&&m.el.classList[m.index===r?"add":"remove"]("is-nav-selected")}))}attach(){let r=this.options.target,m=this.options.nav;r?this.addAsNavFor(r):m&&this.addAsTargetFor(m)}detach(){let r=this.nav,m=this.target;r&&(r.off("ready",this.onNavReady),r.off("createSlide",this.onNavCreateSlide),r.off("Panzoom.click",this.onNavClick),r.off("Panzoom.touchEnd",this.onNavTouch)),this.nav=null,m&&(m.off("ready",this.onTargetReady),m.off("refresh",this.onTargetChange),m.off("change",this.onTargetChange)),this.target=null}};Object.defineProperty(Z,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{friction:.35}});let eo="animationend",ea="isSelected",er="slide";let Q=class Q extends g{get axis(){return this.isHorizontal?"e":"f"}get isEnabled(){return this.state===y.Ready}get isInfinite(){let r=!1,{contentDim:m,viewportDim:v,pages:b,slides:y}=this,w=y[0];return b.length>=2&&w&&m+w.dim>=v&&(r=this.option("infinite")),r}get isRTL(){return"rtl"===this.option("direction")}get isHorizontal(){return"x"===this.option("axis")}constructor(r,m={},v={}){if(super(),Object.defineProperty(this,"bp",{enumerable:!0,configurable:!0,writable:!0,value:""}),Object.defineProperty(this,"lp",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"userOptions",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:y.Init}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"prevPage",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"viewport",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"slides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"pages",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"panzoom",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"inTransition",{enumerable:!0,configurable:!0,writable:!0,value:new Set}),Object.defineProperty(this,"contentDim",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"viewportDim",{enumerable:!0,configurable:!0,writable:!0,value:0}),"string"==typeof r&&(r=document.querySelector(r)),!r||!E(r))throw Error("No Element found");this.container=r,this.slideNext=D(this.slideNext.bind(this),150),this.slidePrev=D(this.slidePrev.bind(this),150),this.userOptions=m,this.userPlugins=v,queueMicrotask(()=>{this.processOptions()})}processOptions(){var r,m;let v=u({},Q.defaults,this.userOptions),b="",w=v.breakpoints;if(w&&d(w))for(let[r,m]of Object.entries(w))window.matchMedia(r).matches&&d(m)&&(b+=r,u(v,m));b===this.bp&&this.state!==y.Init||(this.bp=b,this.state===y.Ready&&(v.initialSlide=(null===(m=null===(r=this.pages[this.page])||void 0===r?void 0:r.slides[0])||void 0===m?void 0:m.index)||0),this.state!==y.Init&&this.destroy(),super.setOptions(v),!1===this.option("enabled")?this.attachEvents():setTimeout(()=>{this.init()},0))}
1init(){this.state=y.Init,this.emit("init"),this.attachPlugins(Object.assign(Object.assign({},Q.Plugins),this.userPlugins)),this.emit("attachPlugins"),this.initLayout(),this.initSlides(),this.updateMetrics(),this.setInitialPosition(),this.initPanzoom(),this.attachEvents(),this.state=y.Ready,this.emit("ready")}initLayout(){let{container:r}=this,m=this.option("classes");P(r,this.cn("container")),o(r,m.isLTR,!this.isRTL),o(r,m.isRTL,this.isRTL),o(r,m.isVertical,!this.isHorizontal),o(r,m.isHorizontal,this.isHorizontal);let v=this.option("viewport")||r.querySelector(`.${m.viewport}`);v||(P(v=document.createElement("div"),m.viewport),v.append(...F(r,`.${m.slide}`)),r.prepend(v)),v.addEventListener("scroll",this.onScroll);let b=this.option("track")||r.querySelector(`.${m.track}`);b||(P(b=document.createElement("div"),m.track),b.append(...Array.from(v.childNodes))),b.setAttribute("aria-live","polite"),v.contains(b)||v.prepend(b),this.viewport=v,this.track=b,this.emit("initLayout")}initSlides(){let{track:r}=this;if(!r)return;let m=[...this.slides],v=[];for(let b of([...F(r,`.${this.cn(er)}`)].forEach(r=>{if(E(r)){let m=H({el:r,isDom:!0,index:this.slides.length});v.push(m)}}),[...this.option("slides",[])||[],...m]))v.push(H(b));this.slides=v;for(let r=0;r<this.slides.length;r++)this.slides[r].index=r;for(let r of v)this.emit("beforeInitSlide",r,r.index),this.emit("initSlide",r,r.index);this.emit("initSlides")}setInitialPage(){let r=this.option("initialSlide");this.page="number"==typeof r?this.getPageForSlide(r):parseInt(this.option("initialPage",0)+"",10)||0}setInitialPosition(){let{track:r,pages:m,isHorizontal:v}=this;if(!r||!m.length)return;let b=this.page;m[b]||(this.page=b=0);let y=(m[b].pos||0)*(this.isRTL&&v?1:-1),w=v?`${y}px`:"0",x=v?"0":`${y}px`;r.style.transform=`translate3d(${w}, ${x}, 0) scale(1)`,this.option("adaptiveHeight")&&this.setViewportHeight()}initPanzoom(){this.panzoom&&(this.panzoom.destroy(),this.panzoom=null);let r=this.option("Panzoom")||{};this.panzoom=new I(this.viewport,u({},{content:this.track,zoom:!1,panOnlyZoomed:!1,lockAxis:this.isHorizontal?"x":"y",infinite:this.isInfinite,click:!1,dblClick:!1,touch:r=>!(this.pages.length<2&&!r.options.infinite),bounds:()=>this.getBounds(),maxVelocity:r=>Math.abs(r.target[this.axis]-r.current[this.axis])<2*this.viewportDim?100:0},r)),this.panzoom.on("*",(r,m,...v)=>{this.emit(`Panzoom.${m}`,r,...v)}),this.panzoom.on("decel",this.onDecel),this.panzoom.on("refresh",this.onRefresh),this.panzoom.on("beforeTransform",this.onBeforeTransform),this.panzoom.on("endAnimation",this.onEndAnimation)}attachEvents(){let r=this.container;r&&(r.addEventListener("click",this.onClick,{passive:!1,capture:!1}),r.addEventListener("slideTo",this.onSlideTo)),window.addEventListener("resize",this.onResize)}createPages(){let r=[],{contentDim:m,viewportDim:v}=this,b=this.option("slidesPerPage");b=("auto"===b||m<=v)&&!1!==this.option("fill")?1/0:parseFloat(b+"");let y=0,w=0,x=0;for(let m of this.slides)(!r.length||w+m.dim-v>.05||x>=b)&&(r.push(N()),y=r.length-1,w=0,x=0),r[y].slides.push(m),w+=m.dim+m.gap,x++;return r}processPages(){let r;let m=this.pages,{contentDim:v,viewportDim:b,isInfinite:y}=this,w=this.option("center"),x=this.option("fill"),C=x&&w&&v>b&&!y;if(m.forEach((r,m)=>{var y;for(let[v,b]of(r.index=m,r.pos=(null===(y=r.slides[0])||void 0===y?void 0:y.pos)||0,r.dim=0,r.slides.entries()))r.dim+=b.dim,v<r.slides.length-1&&(r.dim+=b.gap);C&&r.pos+.5*r.dim<.5*b?r.pos=0:C&&r.pos+.5*r.dim>=v-.5*b?r.pos=v-b:w&&(r.pos+=-.5*(b-r.dim))}),m.forEach(r=>{x&&!y&&v>b&&(r.pos=Math.max(r.pos,0),r.pos=Math.min(r.pos,v-b)),r.pos=t(r.pos,1e3),r.dim=t(r.dim,1e3),.1>=Math.abs(r.pos)&&(r.pos=0)}),y)return m;let O=[];return m.forEach(m=>{let v=Object.assign({},m);r&&v.pos===r.pos?(r.dim+=v.dim,r.slides=[...r.slides,...v.slides]):(v.index=O.length,r=v,O.push(v))}),O}getPageFromIndex(r=0){let m=this.pages.length;return r=parseInt((r||0).toString())||0,this.isInfinite?(r%m+m)%m:Math.max(Math.min(r,m-1),0)}getSlideMetrics(r){var m,v;let b=this.isHorizontal?"width":"height",y=0,w=0,x=r.el,C=!(!x||x.parentNode);
1if(x?y=parseFloat(x.dataset[b]||"")||0:((x=document.createElement("div")).style.visibility="hidden",(this.track||document.body).prepend(x)),P(x,this.cn(er)+" "+r.class+" "+r.customClass),y)x.style[b]=`${y}px`,x.style["width"===b?"height":"width"]="";else{C&&(this.track||document.body).prepend(x),y=x.getBoundingClientRect()[b]*Math.max(1,(null===(m=window.visualViewport)||void 0===m?void 0:m.scale)||1);let r=x[this.isHorizontal?"offsetWidth":"offsetHeight"];r-1>y&&(y=r)}let O=getComputedStyle(x);return"content-box"===O.boxSizing&&(this.isHorizontal?y+=(parseFloat(O.paddingLeft)||0)+(parseFloat(O.paddingRight)||0):y+=(parseFloat(O.paddingTop)||0)+(parseFloat(O.paddingBottom)||0)),w=parseFloat(O[this.isHorizontal?"marginRight":"marginBottom"])||0,C?null===(v=x.parentElement)||void 0===v||v.removeChild(x):r.el||x.remove(),{dim:t(y,1e3),gap:t(w,1e3)}}getBounds(){let{isInfinite:r,isRTL:m,isHorizontal:v,pages:b}=this,y={min:0,max:0};if(r)y={min:-1/0,max:1/0};else if(b.length){let r=b[0].pos,w=b[b.length-1].pos;y=m&&v?{min:r,max:w}:{min:-1*w,max:-1*r}}return{x:v?y:{min:0,max:0},y:v?{min:0,max:0}:y}}repositionSlides(){let r,{isHorizontal:m,isRTL:v,isInfinite:b,viewport:y,viewportDim:w,contentDim:x,page:C,pages:O,slides:M,panzoom:T}=this,A=0,L=0,z=0,k=0;for(let b of(T?k=-1*T.current[this.axis]:O[C]&&(k=O[C].pos||0),r=m?v?"right":"left":"top",v&&m&&(k*=-1),M)){let m=b.el;m?("top"===r?(m.style.right="",m.style.left=""):m.style.top="",b.index!==A?m.style[r]=0===L?"":`${t(L,1e3)}px`:m.style[r]="",z+=b.dim+b.gap,A++):L+=b.dim+b.gap}if(b&&z&&y){let v=getComputedStyle(y),b="padding",C=parseFloat(v[b+(m?"Left":"Top")]);for(let y of(k-=C,w+=C+parseFloat(v[b+(m?"Right":"Bottom")]),M))y.el&&(t(y.pos)<t(w)&&t(y.pos+y.dim+y.gap)<t(k)&&t(k)>t(x-w)&&(y.el.style[r]=`${t(L+z,1e3)}px`),t(y.pos+y.gap)>=t(x-w)&&t(y.pos)>t(k+w)&&t(k)<t(w)&&(y.el.style[r]=`-${t(z,1e3)}px`))}let R,j,B=[...this.inTransition];if(B.length>1&&(R=O[B[0]],j=O[B[1]]),R&&j){let m=0;for(let v of M)v.el?this.inTransition.has(v.index)&&0>R.slides.indexOf(v)&&(v.el.style[r]=`${t(m+(R.pos-j.pos),1e3)}px`):m+=v.dim+v.gap}}createSlideEl(r){let{track:m,slides:v}=this;if(!m||!r||r.el&&r.el.parentNode)return;let b=r.el||document.createElement("div");P(b,this.cn(er)),P(b,r.class),P(b,r.customClass);let y=r.html;y&&(y instanceof HTMLElement?b.appendChild(y):b.innerHTML=r.html+"");let w=[];v.forEach((r,m)=>{r.el&&w.push(m)});let x=r.index,C=null;w.length&&(C=v[w.reduce((r,m)=>Math.abs(m-x)<Math.abs(r-x)?m:r)]);let O=C&&C.el&&C.el.parentNode?C.index<r.index?C.el.nextSibling:C.el:null;m.insertBefore(b,m.contains(O)?O:null),r.el=b,this.emit("createSlide",r)}removeSlideEl(r,m=!1){let v=null==r?void 0:r.el;if(!v||!v.parentNode)return;let b=this.cn(ea);if(v.classList.contains(b)&&(S(v,b),this.emit("unselectSlide",r)),r.isDom&&!m)return v.removeAttribute("aria-hidden"),v.removeAttribute("data-index"),void(v.style.left="");this.emit("removeSlide",r);let y=new CustomEvent(eo);v.dispatchEvent(y),r.el&&(r.el.remove(),r.el=null)}transitionTo(r=0,m=this.option("transition")){var v,b,y,w;if(!m)return!1;let x=this.page,{pages:C,panzoom:O}=this;r=parseInt((r||0).toString())||0;let M=this.getPageFromIndex(r);if(!O||!C[M]||C.length<2||Math.abs(((null===(b=null===(v=C[x])||void 0===v?void 0:v.slides[0])||void 0===b?void 0:b.dim)||0)-this.viewportDim)>1)return!1;let T=r>x?1:-1;this.isInfinite&&(0===x&&r===C.length-1&&(T=-1),x===C.length-1&&0===r&&(T=1));let A=C[M].pos*(this.isRTL?1:-1);if(x===M&&1>Math.abs(A-O.target[this.axis]))return!1;this.clearTransitions();let L=O.isResting;P(this.container,this.cn("inTransition"));let z=(null===(y=C[x])||void 0===y?void 0:y.slides[0])||null,k=(null===(w=C[M])||void 0===w?void 0:w.slides[0])||null;this.inTransition.add(k.index),this.createSlideEl(k);let R=z.el,j=k.el;L||m===er||(m="fadeFast",R=null);let B=this.isRTL?"next":"prev",$=this.isRTL?"prev":"next";return R&&(this.inTransition.add(z.index),z.transition=m,R.addEventListener(eo,this.onAnimationEnd),R.classList.add(`f-${m}Out`,`to-${T>0?$:B}`)),j&&(k.transition=m,j.addEventListener(eo,this.onAnimationEnd),j.classList.add(`f-${m}In`,`from-${T>0?B:$}`)),O.current[this.axis]=A,O.target[this.axis]=A,O.requestTick(),this.onChange(M),!0}manageSlideVisiblity(){let r=new Set,m=new Set,v=this.getVisibleSlides(parseFloat(this.option("preload",0)+"")||0);for(let b of this.slides)v.has(b)?r.add(b):m.add(b);for(let m of this.inTransition)r.add(this.slides[m]);for(let m of r)this.createSlideEl(m),this.lazyLoadSlide(m);for(let v of m)r.has(v)||this.removeSlideEl(v);this.markSelectedSlides(),this.repositionSlides()}markSelectedSlides(){if(!this.pages[this.page]||!this.pages[this.page].slides)return;let r="aria-hidden",m=this.cn(ea);if(m)for(let v of this.slides){let b=v.el;b&&(b.dataset.index=`${v.index}`,b.classList.contains("f-thumbs__slide")?this.getVisibleSlides(0).has(v)?b.removeAttribute(r):b.setAttribute(r,"true"):this.pages[this.page].slides.includes(v)?(b.classList.contains(m)||(P(b,m),this.emit
1("selectSlide",v)),b.removeAttribute(r)):(b.classList.contains(m)&&(S(b,m),this.emit("unselectSlide",v)),b.setAttribute(r,"true")))}}flipInfiniteTrack(){let{axis:r,isHorizontal:m,isInfinite:v,isRTL:b,viewportDim:y,contentDim:w}=this,x=this.panzoom;if(!x||!v)return;let C=x.current[r],O=x.target[r]-C,M=0,T=.5*y;b&&m?(C<-T&&(M=-1,C+=w),C>w-T&&(M=1,C-=w)):(C>T&&(M=1,C-=w),C<-w+T&&(M=-1,C+=w)),M&&(x.current[r]=C,x.target[r]=C+O)}lazyLoadImg(r,m){let v=this,b="f-fadeIn",y="is-preloading",w=!1,x=null,l=()=>{w||(w=!0,x&&(x.remove(),x=null),S(m,y),m.complete&&(P(m,b),setTimeout(()=>{S(m,b)},350)),this.option("adaptiveHeight")&&r.el&&this.pages[this.page].slides.indexOf(r)>-1&&(v.updateMetrics(),v.setViewportHeight()),this.emit("load",r))};P(m,y),m.src=m.dataset.lazySrcset||m.dataset.lazySrc||"",delete m.dataset.lazySrc,delete m.dataset.lazySrcset,m.addEventListener("error",()=>{l()}),m.addEventListener("load",()=>{l()}),setTimeout(()=>{let v=m.parentNode;v&&r.el&&(m.complete?l():w||(x=n(Y),v.insertBefore(x,m)))},300)}lazyLoadSlide(r){let m=r&&r.el;if(!m)return;let v=new Set,b=Array.from(m.querySelectorAll("[data-lazy-src],[data-lazy-srcset]"));for(let y of(m.dataset.lazySrc&&b.push(m),b.map(r=>{r instanceof HTMLImageElement?v.add(r):r instanceof HTMLElement&&r.dataset.lazySrc&&(r.style.backgroundImage=`url('${r.dataset.lazySrc}')`,delete r.dataset.lazySrc)}),v))this.lazyLoadImg(r,y)}onAnimationEnd(r){var m;let v=r.target,b=v?parseInt(v.dataset.index||"",10)||0:-1,y=this.slides[b],w=r.animationName;if(!v||!y||!w)return;let x=!!this.inTransition.has(b)&&y.transition;x&&w.substring(0,x.length+2)===`f-${x}`&&this.inTransition.delete(b),this.inTransition.size||this.clearTransitions(),b===this.page&&(null===(m=this.panzoom)||void 0===m?void 0:m.isResting)&&this.emit("settle")}onDecel(r,m=0,v=0,b=0,y=0){if(this.option("dragFree"))return void this.setPageFromPosition();let{isRTL:w,isHorizontal:x,axis:C,pages:O}=this,M=O.length,T=Math.abs(Math.atan2(v,m)/(Math.PI/180)),A=0;if(A=T>45&&T<135?x?0:v:x?m:0,!M)return;let L=this.page,z=w&&x?1:-1,k=r.current[C]*z,{pageIndex:R}=this.getPageFromPosition(k);Math.abs(A)>5?(O[L].dim<document.documentElement["client"+(this.isHorizontal?"Width":"Height")]-1&&(L=R),L=w&&x?A<0?L-1:L+1:A<0?L+1:L-1):L=0===b&&0===y?L:R,this.slideTo(L,{transition:!1,friction:r.option("decelFriction")})}onClick(r){let m,v;let b=r.target,y=b&&E(b)?b.dataset:null;y&&(void 0!==y.carouselPage?(v="slideTo",m=y.carouselPage):void 0!==y.carouselNext?v="slideNext":void 0!==y.carouselPrev&&(v="slidePrev")),v?(r.preventDefault(),r.stopPropagation(),b&&!b.hasAttribute("disabled")&&this[v](m)):this.emit("click",r)}onSlideTo(r){let m=r.detail||0;this.slideTo(this.getPageForSlide(m),{friction:0})}onChange(r,m=0){let v=this.page;this.prevPage=v,this.page=r,this.option("adaptiveHeight")&&this.setViewportHeight(),r!==v&&(this.markSelectedSlides(),this.emit("change",r,v,m))}onRefresh(){let r=this.contentDim,m=this.viewportDim;this.updateMetrics(),this.contentDim===r&&this.viewportDim===m||this.slideTo(this.page,{friction:0,transition:!1})}onScroll(){var r;null===(r=this.viewport)||void 0===r||r.scroll(0,0)}onResize(){this.option("breakpoints")&&this.processOptions()}onBeforeTransform(r){this.lp!==r.current[this.axis]&&(this.flipInfiniteTrack(),this.manageSlideVisiblity()),this.lp=r.current.e}onEndAnimation(){this.inTransition.size||this.emit("settle")}reInit(r=null,m=null){this.destroy(),this.state=y.Init,this.prevPage=null,this.userOptions=r||this.userOptions,this.userPlugins=m||this.userPlugins,this.processOptions()}slideTo(r=0,{friction:m=this.option("friction"),transition:v=this.option("transition")}={}){if(this.state===y.Destroy)return;r=parseInt((r||0).toString())||0;let b=this.getPageFromIndex(r),{axis:w,isHorizontal:x,isRTL:C,pages:O,panzoom:M}=this,T=O.length,A=C&&x?1:-1;if(!M||!T)return;if(this.page!==b){let m=new Event("beforeChange",{bubbles:!0,cancelable:!0});if(this.emit("beforeChange",m,r),m.defaultPrevented)return}if(this.transitionTo(r,v))return;let L=O[b].pos;if(this.isInfinite){let m=this.contentDim,v=M.target[w]*A;2===T?L+=m*Math.floor(parseFloat(r+"")/2):L=[L,L-m,L+m].reduce(function(r,m){return Math.abs(m-v)<Math.abs(r-v)?m:r})}L*=A,1>Math.abs(M.target[w]-L)||(M.panTo({x:x?L:0,y:x?0:L,friction:m}),this.onChange(b))}
1slideToClosest(r){if(this.panzoom){let{pageIndex:m}=this.getPageFromPosition();this.slideTo(m,r)}}slideNext(){this.slideTo(this.page+1)}slidePrev(){this.slideTo(this.page-1)}clearTransitions(){this.inTransition.clear(),S(this.container,this.cn("inTransition"));let r=["to-prev","to-next","from-prev","from-next"];for(let m of this.slides){let v=m.el;if(v){v.removeEventListener(eo,this.onAnimationEnd),v.classList.remove(...r);let b=m.transition;b&&v.classList.remove(`f-${b}Out`,`f-${b}In`)}}this.manageSlideVisiblity()}addSlide(r,m){var v,b,y,w;let x=this.panzoom,C=(null===(v=this.pages[this.page])||void 0===v?void 0:v.pos)||0,O=(null===(b=this.pages[this.page])||void 0===b?void 0:b.dim)||0,M=this.contentDim<this.viewportDim,T=Array.isArray(m)?m:[m],A=[];for(let r of T)A.push(H(r));this.slides.splice(r,0,...A);for(let r=0;r<this.slides.length;r++)this.slides[r].index=r;for(let r of A)this.emit("beforeInitSlide",r,r.index);if(this.page>=r&&(this.page+=A.length),this.updateMetrics(),x){let m=(null===(y=this.pages[this.page])||void 0===y?void 0:y.pos)||0,v=(null===(w=this.pages[this.page])||void 0===w?void 0:w.dim)||0,b=this.pages.length||1,T=this.isRTL?O-v:v-O,A=this.isRTL?C-m:m-C;M&&1===b?(r<=this.page&&(x.current[this.axis]-=T,x.target[this.axis]-=T),x.panTo({[this.isHorizontal?"x":"y"]:-1*m})):A&&r<=this.page&&(x.target[this.axis]-=A,x.current[this.axis]-=A,x.requestTick())}for(let r of A)this.emit("initSlide",r,r.index)}prependSlide(r){this.addSlide(0,r)}appendSlide(r){this.addSlide(this.slides.length,r)}removeSlide(r){let m=this.slides.length;r=(r%m+m)%m;let v=this.slides[r];if(v){this.removeSlideEl(v,!0),this.slides.splice(r,1);for(let r=0;r<this.slides.length;r++)this.slides[r].index=r;this.updateMetrics(),this.slideTo(this.page,{friction:0,transition:!1}),this.emit("destroySlide",v)}}updateMetrics(){let{panzoom:r,viewport:m,track:v,slides:b,isHorizontal:w,isInfinite:x}=this;if(!v)return;let C=w?"width":"height";if(m){let r=Math.max(m[w?"offsetWidth":"offsetHeight"],t(m.getBoundingClientRect()[C],1e3)),v=getComputedStyle(m),b="padding";r-=parseFloat(v[b+(w?"Left":"Top")])+parseFloat(v[b+(w?"Right":"Bottom")]),this.viewportDim=r}let O,M=0;for(let[r,m]of b.entries()){let v=0,y=0;!m.el&&O?(v=O.dim,y=O.gap):({dim:v,gap:y}=this.getSlideMetrics(m),O=m),v=t(v,1e3),y=t(y,1e3),m.dim=v,m.gap=y,m.pos=M,M+=v,(x||r<b.length-1)&&(M+=y)}M=t(M,1e3),this.contentDim=M,r&&(r.contentRect[C]=M,r.contentRect[w?"fullWidth":"fullHeight"]=M),this.pages=this.createPages(),this.pages=this.processPages(),this.state===y.Init&&this.setInitialPage(),this.page=Math.max(0,Math.min(this.page,this.pages.length-1)),this.manageSlideVisiblity(),this.emit("refresh")}getProgress(r,m=!1,v=!1){void 0===r&&(r=this.page);let b=this.panzoom,y=this.contentDim,w=this.pages[r]||0;if(!w||!b)return r>this.page?-1:1;let x=-1*b.current.e,C=t((x-w.pos)/(1*w.dim),1e3),O=C,M=C;this.isInfinite&&!0!==v&&(O=t((x-w.pos+y)/(1*w.dim),1e3),M=t((x-w.pos-y)/(1*w.dim),1e3));let T=[C,O,M].reduce(function(r,m){return Math.abs(m)<Math.abs(r)?m:r});return m?T:T>1?1:T<-1?-1:T}setViewportHeight(){let{page:r,pages:m,viewport:v,isHorizontal:b}=this;if(!v||!m[r])return;let y=0;b&&this.track&&(this.track.style.height="auto",m[r].slides.forEach(r=>{r.el&&(y=Math.max(y,r.el.offsetHeight))})),v.style.height=y?`${y}px`:""}getPageForSlide(r){for(let m of this.pages)for(let v of m.slides)if(v.index===r)return m.index;return -1}getVisibleSlides(r=0){var m;let v=new Set,{panzoom:y,contentDim:w,viewportDim:x,pages:C,page:O}=this;if(x){w=w+(null===(m=this.slides[this.slides.length-1])||void 0===m?void 0:m.gap)||0;let M=0;M=y&&y.state!==b.Init&&y.state!==b.Destroy?-1*y.current[this.axis]:C[O]&&C[O].pos||0,this.isInfinite&&(M-=Math.floor(M/w)*w),this.isRTL&&this.isHorizontal&&(M*=-1);let T=M-x*r,A=M+x*(r+1),L=this.isInfinite?[-1,0,1]:[0];for(let r of this.slides)for(let m of L){let b=r.pos+m*w,y=b+r.dim+r.gap;b<A&&y>T&&v.add(r)}}return v}getPageFromPosition(r){let{viewportDim:m,contentDim:v,slides:b,pages:y,panzoom:w}=this,x=y.length,C=b.length,O=b[0],M=b[C-1],T=this.option("center"),A=0,L=0,z=void 0===r?-1*((null==w?void 0:w.target[this.axis])||0):r;T&&(z+=.5*m),this.isInfinite?(z<O.pos-.5*M.gap&&(z-=v,L=-1),z>M.pos+M.dim+.5*M.gap&&(z-=v,L=1)):z=Math.max(O.pos||0,Math.min(z,M.pos));let k=M,R=b.find(r=>{let m=r.pos-.5*k.gap,v=r.pos+r.dim+.5*r.gap;return k=r,z>=m&&z<v});return R||(R=M),{page:(A=this.getPageForSlide(R.index))+L*x,pageIndex:A}}setPageFromPosition(){let{pageIndex:r}=this.getPageFromPosition();this.onChange(r)}destroy(){if([y.Destroy].includes(this.state))return;this.state=y.Destroy;let{container:r,viewport:m,track:v,slides:b,panzoom:w}=this,x=this.option("classes");for(let[y,C]of(r.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),r.removeEventListener("slideTo",this.onSlideTo),window.removeEventListener("resize",this.onResize),w&&(w.destroy(),this.panzoom=null),b&&b.forEach(r=>{this.removeSlideEl(r)}),this.detachPlugins(),m&&(m.removeEventListener("scroll",this.onScroll),m.offsetParent&&v&&v.offsetParent&&m.replaceWith(...v.childNodes)),Object.entries(x)))"container"!==y&&C&&r.classList.remove(C);this.track=null,this.viewport=null,this.page=0,this.slides=[];let C=this.events.get("ready");this.events=new Map,C&&this.events.set("ready",C)}};Object.defineProperty(Q,"Panzoom",{enumerable:!0,configurable:!0,writable:!0,value:
1I}),Object.defineProperty(Q,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{viewport:null,track:null,enabled:!0,slides:[],axis:"x",transition:"fade",preload:1,slidesPerPage:"auto",initialPage:0,friction:.12,Panzoom:{decelFriction:.12},center:!0,infinite:!0,fill:!0,dragFree:!1,adaptiveHeight:!1,direction:"ltr",classes:{container:"f-carousel",viewport:"f-carousel__viewport",track:"f-carousel__track",slide:"f-carousel__slide",isLTR:"is-ltr",isRTL:"is-rtl",isHorizontal:"is-horizontal",isVertical:"is-vertical",inTransition:"in-transition",isSelected:"is-selected"},l10n:{NEXT:"Next slide",PREV:"Previous slide",GOTO:"Go to slide #%d"}}}),Object.defineProperty(Q,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:{Navigation:V,Dots:W,Sync:Z}});let tt=function(r){if(!E(r))return 0;let m=window.scrollY,v=window.innerHeight,b=m+v,y=r.getBoundingClientRect(),w=y.y+m,x=y.height,C=w+x;if(m>C||b<w)return 0;if(m<w&&b>C||w<m&&C>b)return 100;let O=x;w<m&&(O-=m-w),C>b&&(O-=C-b);let M=O/v*100;return Math.round(M)},el=!("undefined"==typeof window||!window.document||!window.document.createElement),eh='a[href],area[href],input:not([disabled]):not([type="hidden"]):not([aria-hidden]),select:not([disabled]):not([aria-hidden]),textarea:not([disabled]):not([aria-hidden]),button:not([disabled]):not([aria-hidden]):not(.fancybox-focus-guard),iframe,object,embed,video,audio,[contenteditable],[tabindex]:not([tabindex^="-"]):not([disabled]):not([aria-hidden])',st=r=>{if(r&&el){void 0===R&&document.createElement("div").focus({get preventScroll(){return R=!0,!1}});try{if(R)r.focus({preventScroll:!0});else{let m=window.scrollY||document.body.scrollTop,v=window.scrollX||document.body.scrollLeft;r.focus(),document.body.scrollTo({top:m,left:v,behavior:"auto"})}}catch(r){}}},ot=()=>{let r=document,m,v="",b="",y="";return r.fullscreenEnabled?(v="requestFullscreen",b="exitFullscreen",y="fullscreenElement"):r.webkitFullscreenEnabled&&(v="webkitRequestFullscreen",b="webkitExitFullscreen",y="webkitFullscreenElement"),v&&(m={request:function(m=r.documentElement){return"webkitRequestFullscreen"===v?m[v](Element.ALLOW_KEYBOARD_INPUT):m[v]()},exit:function(){return r[y]&&r[b]()},isFullscreen:function(){return r[y]}}),m},ec={animated:!0,autoFocus:!0,backdropClick:"close",Carousel:{classes:{container:"fancybox__carousel",viewport:"fancybox__viewport",track:"fancybox__track",slide:"fancybox__slide"}},closeButton:"auto",closeExisting:!1,commonCaption:!1,compact:()=>window.matchMedia("(max-width: 578px), (max-height: 578px)").matches,contentClick:"toggleZoom",contentDblClick:!1,defaultType:"image",defaultDisplay:"flex",dragToClose:!0,Fullscreen:{autoStart:!1},groupAll:!1,groupAttr:"data-fancybox",hideClass:"f-fadeOut",hideScrollbar:!0,idle:3500,keyboard:{Escape:"close",Delete:"close",Backspace:"close",PageUp:"next",PageDown:"prev",ArrowUp:"prev",ArrowDown:"next",ArrowRight:"next",ArrowLeft:"prev"},l10n:Object.assign(Object.assign({},$),{CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ERROR:"Something Went Wrong, Please Try Again Later",IMAGE_ERROR:"Image Not Found",ELEMENT_NOT_FOUND:"HTML Element Not Found",AJAX_NOT_FOUND:"Error Loading AJAX : Not Found",AJAX_FORBIDDEN:"Error Loading AJAX : Forbidden",IFRAME_ERROR:"Error Loading Page",TOGGLE_ZOOM:"Toggle zoom level",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_SLIDESHOW:"Toggle slideshow",TOGGLE_FULLSCREEN:"Toggle full-screen mode",DOWNLOAD:"Download"}),parentEl:null,placeFocusBack:!0,showClass:"f-zoomInUp",startIndex:0,tpl:{closeButton:'<button data-fancybox-close class="f-button is-close-btn" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" tabindex="-1"><path d="M20 20L4 4m16 0L4 20"/></svg></button>',main:'<div class="fancybox__container" role="dialog" aria-modal="true" aria-label="{{MODAL}}" tabindex="-1">\n    <div class="fancybox__backdrop"></div>\n    <div class="fancybox__carousel"></div>\n    <div class="fancybox__footer"></div>\n  </div>'},trapFocus:!0,wheel:"zoom"};(A=w||(w={}))[A.Init=0]="Init",A[A.Ready=1]="Ready",A[A.Closing=2]="Closing",A[A.CustomClosing=3]="CustomClosing",A[A.Destroy=4]="Destroy",(L=x||(x={}))[L.Loading=0]="Loading",L[L.Opening=1]="Opening",L[L.Ready=2]="Ready",
1L[L.Closing=3]="Closing";let ed="",eu=!1,ep=!1,ef=null,pt=()=>{let r="",m="",v=Oe.getInstance();if(v){let b=v.carousel,y=v.getSlide();if(b&&y){let w=y.slug||void 0,x=y.triggerEl||void 0;(m=w||v.option("slug")||"")||!x||!x.dataset||(m=x.dataset.fancybox||""),m&&"true"!==m&&(r="#"+m+(!w&&b.slides.length>1?"-"+(y.index+1):""))}}return{hash:r,slug:m,index:1}},ft=()=>{let r=new URL(document.URL).hash,m=r.slice(1).split("-"),v=m[m.length-1],b=v&&/^\+?\d+$/.test(v)&&parseInt(m.pop()||"1",10)||1;return{hash:r,slug:m.join("-"),index:b}},gt=()=>{let{slug:r,index:m}=ft();if(!r)return;let v=document.querySelector(`[data-slug="${r}"]`);if(v&&v.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})),Oe.getInstance())return;let b=document.querySelectorAll(`[data-fancybox="${r}"]`);b.length&&(v=b[m-1])&&v.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0}))},mt=()=>{if(!1===Oe.defaults.Hash)return;let r=Oe.getInstance();if(!1===(null==r?void 0:r.options.Hash))return;let{slug:m,index:v}=ft(),{slug:b}=pt();r&&(m===b?r.jumpTo(v-1):(eu=!0,r.close())),gt()},vt=()=>{ef&&clearTimeout(ef),queueMicrotask(()=>{mt()})},bt=()=>{window.addEventListener("hashchange",vt,!1),setTimeout(()=>{mt()},500)};el&&(/complete|interactive|loaded/.test(document.readyState)?bt():document.addEventListener("DOMContentLoaded",bt));let eg="is-zooming-in";let wt=class wt extends _{onCreateSlide(r,m,v){let b=this.instance.optionFor(v,"src")||"";v.el&&"image"===v.type&&"string"==typeof b&&this.setImage(v,b)}onRemoveSlide(r,m,v){v.panzoom&&v.panzoom.destroy(),v.panzoom=void 0,v.imageEl=void 0}onChange(r,m,v,b){for(let r of(S(this.instance.container,eg),m.slides)){let m=r.panzoom;m&&r.index!==v&&m.reset(.35)}}onClose(){var r;let m=this.instance,v=m.container,y=m.getSlide();if(!v||!v.parentElement||!y)return;let{el:x,contentEl:C,panzoom:O,thumbElSrc:M}=y;if(!x||!M||!C||!O||O.isContentLoading||O.state===b.Init||O.state===b.Destroy)return;O.updateMetrics();let T=this.getZoomInfo(y);if(!T)return;this.instance.state=w.CustomClosing,v.classList.remove(eg),v.classList.add("is-zooming-out"),C.style.backgroundImage=`url('${M}')`;let A=v.getBoundingClientRect();1===((null===(r=window.visualViewport)||void 0===r?void 0:r.scale)||1)&&Object.assign(v.style,{position:"absolute",top:`${v.offsetTop+window.scrollY}px`,left:`${v.offsetLeft+window.scrollX}px`,bottom:"auto",right:"auto",width:`${A.width}px`,height:`${A.height}px`,overflow:"hidden"});let{x:L,y:z,scale:k,opacity:R}=T;if(R){let r=((r,m,v,b)=>{let y=m-r,w=0-v;return m=>v+((m-r)/y*w||0)})(O.scale,k,1,0);O.on("afterTransform",()=>{C.style.opacity=r(O.scale)+""})}O.on("endAnimation",()=>{m.destroy()}),O.target.a=k,O.target.b=0,O.target.c=0,O.target.d=k,O.panTo({x:L,y:z,scale:k,friction:R?.2:.33,ignoreBounds:!0}),O.isResting&&m.destroy()}setImage(r,m){let v=this.instance;r.src=m,this.process(r,m).then(m=>{let{contentEl:b,imageEl:y,thumbElSrc:w,el:C}=r;if(v.isClosing()||!b||!y)return;b.offsetHeight;let O=!!v.isOpeningSlide(r)&&this.getZoomInfo(r);if(this.option("protected")&&C){C.addEventListener("contextmenu",r=>{r.preventDefault()});let r=document.createElement("div");P(r,"fancybox-protected"),b.appendChild(r)}if(w&&O){let y=m.contentRect,C=Math.max(y.fullWidth,y.fullHeight),M=null;!O.opacity&&C>1200&&(P(M=document.createElement("img"),"fancybox-ghost"),M.src=w,b.appendChild(M));let h=()=>{M&&(P(M,"f-fadeFastOut"),setTimeout(()=>{M&&(M.remove(),M=null)},200))};new Promise((r,m)=>{let v=new Image;v.onload=r,v.onerror=m,v.src=w}).then(()=>
1{v.hideLoading(r),r.state=x.Opening,this.instance.emit("reveal",r),this.zoomIn(r).then(()=>{h(),this.instance.done(r)},()=>{}),M&&setTimeout(()=>{h()},C>2500?800:200)},()=>{v.hideLoading(r),v.revealContent(r)})}else{let b=this.optionFor(r,"initialSize"),y=this.optionFor(r,"zoom"),w={event:v.prevMouseMoveEvent||v.options.event,friction:y?.12:0},x=v.optionFor(r,"showClass")||void 0,C=!0;v.isOpeningSlide(r)&&("full"===b?m.zoomToFull(w):"cover"===b?m.zoomToCover(w):"max"===b?m.zoomToMax(w):C=!1,m.stop("current")),C&&x&&(x=m.isDragging?"f-fadeIn":""),v.hideLoading(r),v.revealContent(r,x)}},()=>{v.setError(r,"{{IMAGE_ERROR}}")})}process(r,m){return new Promise((v,b)=>{var y;let w=this.instance,x=r.el;w.clearContent(r),w.showLoading(r);let C=this.optionFor(r,"content");if("string"==typeof C&&(C=n(C)),!C||!E(C)){if((C=document.createElement("img"))instanceof HTMLImageElement){let v="",b=r.caption;v="string"==typeof b&&b?b.replace(/<[^>]+>/gi,"").substring(0,1e3):`Image ${r.index+1} of ${(null===(y=w.carousel)||void 0===y?void 0:y.pages.length)||1}`,C.src=m||"",C.alt=v,C.draggable=!1,r.srcset&&C.setAttribute("srcset",r.srcset),this.instance.isOpeningSlide(r)&&(C.fetchPriority="high")}r.sizes&&C.setAttribute("sizes",r.sizes)}P(C,"fancybox-image"),r.imageEl=C,w.setContent(r,C,!1),r.panzoom=new I(x,u({transformParent:!0},this.option("Panzoom")||{},{content:C,width:(m,v)=>w.optionFor(r,"width","auto",v)||"auto",height:(m,v)=>w.optionFor(r,"height","auto",v)||"auto",wheel:()=>{let r=w.option("wheel");return("zoom"===r||"pan"==r)&&r},click:(m,v)=>{var b,y;if(w.isCompact||w.isClosing()||r.index!==(null===(b=w.getSlide())||void 0===b?void 0:b.index))return!1;if(v){let r=v.composedPath()[0];if(["A","BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].includes(r.nodeName))return!1}let x=!v||v.target&&(null===(y=r.contentEl)||void 0===y?void 0:y.contains(v.target));return w.option(x?"contentClick":"backdropClick")||!1},dblClick:()=>w.isCompact?"toggleZoom":w.option("contentDblClick")||!1,spinner:!1,panOnlyZoomed:!0,wheelLimit:1/0,on:{ready:r=>{v(r)},error:()=>{b()},destroy:()=>{b()}}}))})}zoomIn(r){return new Promise((m,v)=>{let b=this.instance,y=b.container,{panzoom:w,contentEl:C,el:O}=r;w&&w.updateMetrics();let M=this.getZoomInfo(r);if(!(M&&O&&C&&w&&y))return void v();let{x:T,y:A,scale:L,opacity:z}=M,p=()=>{r.state!==x.Closing&&(z&&(C.style.opacity=Math.max(Math.min(1,1-(1-w.scale)/(1-L)),0)+""),w.scale>=1&&w.scale>w.targetScale-.1&&m(w))},f=r=>{(r.scale<.99||r.scale>1.01)&&!r.isDragging||(S(y,eg),C.style.opacity="",r.off("endAnimation",f),r.off("touchStart",f),r.off("afterTransform",p),m(r))};w.on("endAnimation",f),w.on("touchStart",f),w.on("afterTransform",p),w.on(["error","destroy"],()=>{v()}),w.panTo({x:T,y:A,scale:L,friction:0,ignoreBounds:!0}),w.stop("current");let k={event:"mousemove"===w.panMode?b.prevMouseMoveEvent||b.options.event:void 0},R=this.optionFor(r,"initialSize");P(y,eg),b.hideLoading(r),"full"===R?w.zoomToFull(k):"cover"===R?w.zoomToCover(k):"max"===R?w.zoomToMax(k):w.reset(.172)})}getZoomInfo(r){let{el:m,imageEl:v,thumbEl:b,panzoom:y}=r,x=this.instance,C=x.container;if(!m||!v||!b||!y||3>tt(b)||!this.optionFor(r,"zoom")||!C||x.state===w.Destroy||"0"===getComputedStyle(C).getPropertyValue("--f-images-zoom"))return!1;let O=window.visualViewport||null;if(1!==(O?O.scale:1))return!1;let{top:M,left:T,width:A,height:L}=b.getBoundingClientRect(),{top:z,left:k,fitWidth:R,fitHeight:j}=y.contentRect;if(!(A&&L&&R&&j))return!1;let B=y.container.getBoundingClientRect();k+=B.left,z+=B.top;let $=-1*(k+.5*R-(T+.5*A)),X=-1*(z+.5*j-(M+.5*L)),Y=this.option("zoomOpacity")||!1;return"auto"===Y&&(Y=Math.abs(A/L-R/j)>.1),{x:$,y:X,scale:A/R,opacity:Y}}attach(){let r=this.instance;r.on("Carousel.change",this.onChange),r.on("Carousel.createSlide",this.onCreateSlide),r.on("Carousel.removeSlide",this.onRemoveSlide),r.on("close",this.onClose)}detach(){let r=this.instance;r.off("Carousel.change",this.onChange),r.off("Carousel.createSlide",this.onCreateSlide),r.off("Carousel.removeSlide",this.onRemoveSlide),r.off("close",this.onClose)}};Object.defineProperty(wt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{initialSize:"fit",Panzoom:{maxScale:1},protected:!1,zoom:!0,zoomOpacity:"auto"}}),"function"==typeof SuppressedError&&SuppressedError;let em="html",ev="image",eb="youtube",ey="vimeo",ew="html5video",Mt=(r,m={})=>{let v=new URL(r),b=new URLSearchParams(v.search),y=new URLSearchParams;for(let[r,v]of[...b,...Object.entries(m)]){let m=v+"";if("t"===r){let r=m.match(/((\d*)m)?(\d*)s?/);r&&y.set("start",60*parseInt(r[2]||"0")+parseInt(r[3]||"0")+"")}else y.set(r,m)}
1let w=y+"",x=r.match(/#t=((.*)?\d+s)/);return x&&(w+=`#t=${x[1]}`),w},ex=["image","html","ajax","inline","clone","iframe","map","pdf","html5video","youtube","vimeo"];let Lt=class Lt extends _{onBeforeInitSlide(r,m,v){this.processType(v)}onCreateSlide(r,m,v){this.setContent(v)}onClearContent(r,m){m.xhr&&(m.xhr.abort(),m.xhr=null);let v=m.iframeEl;v&&(v.onload=v.onerror=null,v.src="//about:blank",m.iframeEl=null);let b=m.contentEl,y=m.placeholderEl;if("inline"===m.type&&b&&y)b.classList.remove("fancybox__content"),"none"!==getComputedStyle(b).getPropertyValue("display")&&(b.style.display="none"),setTimeout(()=>{y&&(b&&y.parentNode&&y.parentNode.insertBefore(b,y),y.remove())},0),m.contentEl=void 0,m.placeholderEl=void 0;else for(;m.el&&m.el.firstChild;)m.el.removeChild(m.el.firstChild)}onSelectSlide(r,m,v){v.state===x.Ready&&this.playVideo()}onUnselectSlide(r,m,v){var b,y;let w;if(v.type===ew){try{null===(y=null===(b=v.el)||void 0===b?void 0:b.querySelector("video"))||void 0===y||y.pause()}catch(r){}return}v.type===ey?w={method:"pause",value:"true"}:v.type===eb&&(w={event:"command",func:"pauseVideo"}),w&&v.iframeEl&&v.iframeEl.contentWindow&&v.iframeEl.contentWindow.postMessage(JSON.stringify(w),"*"),v.poller&&clearTimeout(v.poller)}onDone(r,m){r.isCurrentSlide(m)&&!r.isClosing()&&this.playVideo()}onRefresh(r,m){m.slides.forEach(r=>{r.el&&(this.resizeIframe(r),this.setAspectRatio(r))})}onMessage(r){try{let m=JSON.parse(r.data);if("https://player.vimeo.com"===r.origin){if("ready"===m.event)for(let m of Array.from(document.getElementsByClassName("fancybox__iframe")))m instanceof HTMLIFrameElement&&m.contentWindow===r.source&&(m.dataset.ready="true")}else if(r.origin.match(/^https:\/\/(www.)?youtube(-nocookie)?.com$/)&&"onReady"===m.event){let r=document.getElementById(m.id);r&&(r.dataset.ready="true")}}catch(r){}}loadAjaxContent(r){let m=this.instance.optionFor(r,"src")||"";this.instance.showLoading(r);let v=this.instance,b=new XMLHttpRequest;v.showLoading(r),b.onreadystatechange=function(){b.readyState===XMLHttpRequest.DONE&&v.state===w.Ready&&(v.hideLoading(r),200===b.status?v.setContent(r,b.responseText):v.setError(r,404===b.status?"{{AJAX_NOT_FOUND}}":"{{AJAX_FORBIDDEN}}"))};let y=r.ajax||null;b.open(y?"POST":"GET",m+""),b.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),b.setRequestHeader("X-Requested-With","XMLHttpRequest"),b.send(y),r.xhr=b}setInlineContent(r){let m=null;if(E(r.src))m=r.src;else if("string"==typeof r.src){let v=r.src.split("#",2).pop();m=v?document.getElementById(v):null}if(m){if("clone"===r.type||m.closest(".fancybox__slide")){m=m.cloneNode(!0);let v=m.dataset.animationName;v&&(m.classList.remove(v),delete m.dataset.animationName);let b=m.getAttribute("id");b=b?`${b}--clone`:`clone-${this.instance.id}-${r.index}`,m.setAttribute("id",b)}else if(m.parentNode){let v=document.createElement("div");v.classList.add("fancybox-placeholder"),m.parentNode.insertBefore(v,m),r.placeholderEl=v}this.instance.setContent(r,m)}else this.instance.setError(r,"{{ELEMENT_NOT_FOUND}}")}setIframeContent(r){let{src:m,el:v}=r;if(!m||"string"!=typeof m||!v)return;v.classList.add("is-loading");let b=this.instance,y=document.createElement("iframe");for(let[m,v]of(y.className="fancybox__iframe",y.setAttribute("id",`fancybox__iframe_${b.id}_${r.index}`),Object.entries(this.optionFor(r,"iframeAttr")||{})))y.setAttribute(m,v);y.onerror=()=>{b.setError(r,"{{IFRAME_ERROR}}")},r.iframeEl=y;let w=this.optionFor(r,"preload");if("iframe"!==r.type||!1===w)return y.setAttribute("src",r.src+""),b.setContent(r,y,!1),this.resizeIframe(r),void b.revealContent(r);b.showLoading(r),y.onload=()=>{if(!y.src.length)return;let m="true"!==y.dataset.ready;y.dataset.ready="true",this.resizeIframe(r),m?b.revealContent(r):b.hideLoading(r)},y.setAttribute("src",m),b.setContent(r,y,!1)}resizeIframe(r){let{type:m,iframeEl:v}=r;if(m===eb||m===ey)return;let b=null==v?void 0:v.parentElement;if(!v||!b)return;let y=r.autoSize;void 0===y&&(y=this.optionFor(r,"autoSize"));let w=r.width||0,x=r.height||0;w&&x&&(y=!1);let C=b&&b.style;if(!1!==r.preload&&!1!==y&&C)try{let r=window.getComputedStyle(b),m=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),y=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),O=v.contentWindow;if(O){let r=O.document,v=r.getElementsByTagName(em)[0],b=r.body;
1C.width="",b.style.overflow="hidden",w=w||v.scrollWidth+m,C.width=`${w}px`,b.style.overflow="",C.flex="0 0 auto",C.height=`${b.scrollHeight}px`,x=v.scrollHeight+y}}catch(r){}if(w||x){let r={flex:"0 1 auto",width:"",height:""};w&&"auto"!==w&&(r.width=`${w}px`),x&&"auto"!==x&&(r.height=`${x}px`),Object.assign(C,r)}}playVideo(){let r=this.instance.getSlide();if(!r)return;let{el:m}=r;if(!m||!m.offsetParent||!this.optionFor(r,"videoAutoplay"))return;if(r.type===ew)try{let r=m.querySelector("video");if(r){let m=r.play();void 0!==m&&m.then(()=>{}).catch(m=>{r.muted=!0,r.play()})}}catch(r){}if(r.type!==eb&&r.type!==ey)return;let i=()=>{if(r.iframeEl&&r.iframeEl.contentWindow){let m;if("true"===r.iframeEl.dataset.ready)return(m=r.type===eb?{event:"command",func:"playVideo"}:{method:"play",value:"true"})&&r.iframeEl.contentWindow.postMessage(JSON.stringify(m),"*"),void(r.poller=void 0);r.type===eb&&(m={event:"listening",id:r.iframeEl.getAttribute("id")},r.iframeEl.contentWindow.postMessage(JSON.stringify(m),"*"))}r.poller=setTimeout(i,250)};i()}processType(r){if(r.html)return r.type=em,r.src=r.html,void(r.html="");let m=this.instance.optionFor(r,"src","");if(!m||"string"!=typeof m)return;let v=r.type,b=null;if(b=m.match(/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|shorts\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i)){let y=this.optionFor(r,eb),{nocookie:w}=y,x=function(r,m){var v={};for(var b in r)Object.prototype.hasOwnProperty.call(r,b)&&0>m.indexOf(b)&&(v[b]=r[b]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var y=0;for(b=Object.getOwnPropertySymbols(r);y<b.length;y++)0>m.indexOf(b[y])&&Object.prototype.propertyIsEnumerable.call(r,b[y])&&(v[b[y]]=r[b[y]])}return v}(y,["nocookie"]),C=`www.youtube${w?"-nocookie":""}.com`,O=Mt(m,x),M=encodeURIComponent(b[2]);r.videoId=M,r.src=`https://${C}/embed/${M}?${O}`,r.thumbSrc=r.thumbSrc||`https://i.ytimg.com/vi/${M}/mqdefault.jpg`,v=eb}else if(b=m.match(/^.+vimeo.com\/(?:\/)?([\d]+)((\/|\?h=)([a-z0-9]+))?(.*)?/)){let y=Mt(m,this.optionFor(r,ey)),w=encodeURIComponent(b[1]),x=b[4]||"";r.videoId=w,r.src=`https://player.vimeo.com/video/${w}?${x?`h=${x}${y?"&":""}`:""}${y}`,v=ey}if(!v&&r.triggerEl){let m=r.triggerEl.dataset.type;ex.includes(m)&&(v=m)}v||"string"==typeof m&&("#"===m.charAt(0)?v="inline":(b=m.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(v=ew,r.videoFormat=r.videoFormat||"video/"+("ogv"===b[1]?"ogg":b[1])):m.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?v=ev:m.match(/\.(pdf)((\?|#).*)?$/i)&&(v="pdf")),(b=m.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+.?\d+?)z))|(?:\?ll=))(.*)?/i))?(r.src=`https://maps.google.${b[1]}/?ll=${(b[2]?b[2]+"&z="+Math.floor(parseFloat(b[3]))+(b[4]?b[4].replace(/^\//,"&"):""):b[4]+"").replace(/\?/,"&")}&output=${b[4]&&b[4].indexOf("layer=c")>0?"svembed":"embed"}`,v="map"):(b=m.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i))&&(r.src=`https://maps.google.${b[1]}/maps?q=${b[2].replace("query=","q=").replace("api=1","")}&output=embed`,v="map"),v=v||this.instance.option("defaultType"),r.type=v,v===ev&&(r.thumbSrc=r.thumbSrc||r.src)}setContent(r){let m=this.instance.optionFor(r,"src")||"";if(r&&r.type&&m){switch(r.type){case em:this.instance.setContent(r,m);break;case ew:let v=this.option("videoTpl");v&&this.instance.setContent(r,v.replace(/\{\{src\}\}/gi,m+"").replace(/\{\{format\}\}/gi,this.optionFor(r,"videoFormat")||"").replace(/\{\{poster\}\}/gi,r.poster||r.thumbSrc||""));break;case"inline":case"clone":this.setInlineContent(r);break;case"ajax":this.loadAjaxContent(r);break;case"pdf":case"map":case eb:case ey:r.preload=!1;case"iframe":this.setIframeContent(r)}this.setAspectRatio(r)}}setAspectRatio(r){let m=r.contentEl;if(!(r.el&&m&&r.type&&[eb,ey,ew].includes(r.type)))return;let v,b=r.width||"auto",y=r.height||"auto";if("auto"===b||"auto"===y){v=this.optionFor(r,"videoRatio");let m=(v+"").match(/(\d+)\s*\/\s?(\d+)/);v=m&&m.length>2?parseFloat(m[1])/parseFloat(m[2]):parseFloat(v+"")}else b&&y&&(v=b/y);if(!v)return;
1m.style.aspectRatio="",m.style.width="",m.style.height="",m.offsetHeight;let w=m.getBoundingClientRect(),x=w.width||1,C=w.height||1;m.style.aspectRatio=v+"",v<x/C?(y="auto"===y?C:Math.min(C,y),m.style.width="auto",m.style.height=`${y}px`):(b="auto"===b?x:Math.min(x,b),m.style.width=`${b}px`,m.style.height="auto")}attach(){let r=this.instance;r.on("Carousel.beforeInitSlide",this.onBeforeInitSlide),r.on("Carousel.createSlide",this.onCreateSlide),r.on("Carousel.selectSlide",this.onSelectSlide),r.on("Carousel.unselectSlide",this.onUnselectSlide),r.on("Carousel.Panzoom.refresh",this.onRefresh),r.on("done",this.onDone),r.on("clearContent",this.onClearContent),window.addEventListener("message",this.onMessage)}detach(){let r=this.instance;r.off("Carousel.beforeInitSlide",this.onBeforeInitSlide),r.off("Carousel.createSlide",this.onCreateSlide),r.off("Carousel.selectSlide",this.onSelectSlide),r.off("Carousel.unselectSlide",this.onUnselectSlide),r.off("Carousel.Panzoom.refresh",this.onRefresh),r.off("done",this.onDone),r.off("clearContent",this.onClearContent),window.removeEventListener("message",this.onMessage)}};Object.defineProperty(Lt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{ajax:null,autoSize:!0,iframeAttr:{allow:"autoplay; fullscreen",scrolling:"auto"},preload:!0,videoAutoplay:!0,videoRatio:16/9,videoTpl:'<video class="fancybox__html5video" playsinline controls controlsList="nodownload" poster="{{poster}}">\n  <source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos.</video>',videoFormat:"",vimeo:{byline:1,color:"00adef",controls:1,dnt:1,muted:0},youtube:{controls:1,enablejsapi:1,nocookie:1,rel:0,fs:1}}});let eP="play",eS="pause",eE="ready";let It=class It extends _{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:eE}),Object.defineProperty(this,"inHover",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"timer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"progressBar",{enumerable:!0,configurable:!0,writable:!0,value:null})}get isActive(){return this.state!==eE}onReady(r){this.option("autoStart")&&(r.isInfinite||r.page<r.pages.length-1)&&this.start()}onChange(){this.removeProgressBar(),this.pause()}onSettle(){this.resume()}onVisibilityChange(){"visible"===document.visibilityState?this.resume():this.pause()}onMouseEnter(){this.inHover=!0,this.pause()}onMouseLeave(){var r;this.inHover=!1,(null===(r=this.instance.panzoom)||void 0===r?void 0:r.isResting)&&this.resume()}onTimerEnd(){let r=this.instance;"play"===this.state&&(r.isInfinite||r.page!==r.pages.length-1?r.slideNext():r.slideTo(0))}removeProgressBar(){this.progressBar&&(this.progressBar.remove(),this.progressBar=null)}createProgressBar(){var r;if(!this.option("showProgress"))return null;this.removeProgressBar();let m=this.instance,v=(null===(r=m.pages[m.page])||void 0===r?void 0:r.slides)||[],b=this.option("progressParentEl");if(b||(b=(1===v.length?v[0].el:null)||m.viewport),!b)return null;let y=document.createElement("div");return P(y,"f-progress"),b.prepend(y),this.progressBar=y,y.offsetHeight,y}set(){let r=this,m=r.instance;if(m.pages.length<2||r.timer)return;let v=r.option("timeout");r.state=eP,P(m.container,"has-autoplay");let b=r.createProgressBar();b&&(b.style.transitionDuration=`${v}ms`,b.style.transform="scaleX(1)"),r.timer=setTimeout(()=>{r.timer=null,r.inHover||r.onTimerEnd()},v),r.emit("set")}clear(){this.timer&&(clearTimeout(this.timer),this.timer=null),this.removeProgressBar()}start(){if(this.set(),this.state!==eE){if(this.option("pauseOnHover")){let r=this.instance.container;r.addEventListener("mouseenter",this.onMouseEnter,!1),r.addEventListener("mouseleave",this.onMouseLeave,!1)}document.addEventListener("visibilitychange",this.onVisibilityChange,!1),this.emit("start")}}stop(){let r=this.state,m=this.instance.container;this.clear(),this.state=eE,m.removeEventListener("mouseenter",this.onMouseEnter,!1),m.removeEventListener("mouseleave",this.onMouseLeave,!1),document.removeEventListener("visibilitychange",this.onVisibilityChange,!1),S(m,"has-autoplay"),r!==eE&&this.emit
1("stop")}pause(){this.state===eP&&(this.state=eS,this.clear(),this.emit(eS))}resume(){let r=this.instance;if(r.isInfinite||r.page!==r.pages.length-1){if(this.state!==eP){if(this.state===eS&&!this.inHover){let r=new Event("resume",{bubbles:!0,cancelable:!0});this.emit("resume",r),r.defaultPrevented||this.set()}}else this.set()}else this.stop()}toggle(){this.state===eP||this.state===eS?this.stop():this.start()}attach(){let r=this.instance;r.on("ready",this.onReady),r.on("Panzoom.startAnimation",this.onChange),r.on("Panzoom.endAnimation",this.onSettle),r.on("Panzoom.touchMove",this.onChange)}detach(){let r=this.instance;r.off("ready",this.onReady),r.off("Panzoom.startAnimation",this.onChange),r.off("Panzoom.endAnimation",this.onSettle),r.off("Panzoom.touchMove",this.onChange),this.stop()}};Object.defineProperty(It,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{autoStart:!0,pauseOnHover:!0,progressParentEl:null,showProgress:!0,timeout:3e3}});let Dt=class Dt extends _{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null})}onPrepare(r){let m=r.carousel;if(!m)return;let v=r.container;v&&(m.options.Autoplay=u({autoStart:!1},this.option("Autoplay")||{},{pauseOnHover:!1,timeout:this.option("timeout"),progressParentEl:()=>this.option("progressParentEl")||null,on:{start:()=>{r.emit("startSlideshow")},set:m=>{var b;v.classList.add("has-slideshow"),(null===(b=r.getSlide())||void 0===b?void 0:b.state)!==x.Ready&&m.pause()},stop:()=>{v.classList.remove("has-slideshow"),r.isCompact||r.endIdle(),r.emit("endSlideshow")},resume:(m,v)=>{var b,y,w;!v||!v.cancelable||(null===(b=r.getSlide())||void 0===b?void 0:b.state)===x.Ready&&(null===(w=null===(y=r.carousel)||void 0===y?void 0:y.panzoom)||void 0===w?void 0:w.isResting)||v.preventDefault()}}}),m.attachPlugins({Autoplay:It}),this.ref=m.plugins.Autoplay)}onReady(r){let m=r.carousel,v=this.ref;v&&m&&this.option("playOnStart")&&(m.isInfinite||m.page<m.pages.length-1)&&v.start()}onDone(r,m){let v=this.ref,b=r.carousel;if(!v||!b)return;let y=m.panzoom;y&&y.on("startAnimation",()=>{r.isCurrentSlide(m)&&v.stop()}),r.isCurrentSlide(m)&&v.resume()}onKeydown(r,m){var v;let b=this.ref;b&&m===this.option("key")&&"BUTTON"!==(null===(v=document.activeElement)||void 0===v?void 0:v.nodeName)&&b.toggle()}attach(){let r=this.instance;r.on("Carousel.init",this.onPrepare),r.on("Carousel.ready",this.onReady),r.on("done",this.onDone),r.on("keydown",this.onKeydown)}detach(){let r=this.instance;r.off("Carousel.init",this.onPrepare),r.off("Carousel.ready",this.onReady),r.off("done",this.onDone),r.off("keydown",this.onKeydown)}};Object.defineProperty(Dt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{key:" ",playOnStart:!1,progressParentEl:r=>{var m;return(null===(m=r.instance.container)||void 0===m?void 0:m.querySelector(".fancybox__toolbar [data-fancybox-toggle-slideshow]"))||r.instance.container},timeout:3e3}});let eC={classes:{container:"f-thumbs f-carousel__thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide",isResting:"is-resting",isSelected:"is-selected",isLoading:"is-loading",hasThumbs:"has-thumbs"},minCount:2,parentEl:null,thumbTpl:'<button class="f-thumbs__slide__button" tabindex="0" type="button" aria-label="{{GOTO}}" data-carousel-index="%i"><img class="f-thumbs__slide__img" data-lazy-src="{{%s}}" alt="" /></button>',type:"modern"};(z=C||(C={}))[z.Init=0]="Init",z[z.Ready=1]="Ready",z[z.Hidden=2]="Hidden";let eO="isResting",eM="thumbWidth",eT="thumbHeight",eA="thumbClipWidth",eL=class extends _{constructor(){super(...arguments),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:"modern"}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"track",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"thumbWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbClipWidth",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbHeight",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"thumbExtraGap",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:C.Init})}get isModern(){return"modern"===this.type}onInitSlide(r,m){let v=m.el?m.el.dataset:void 0;v&&(m.thumbSrc=v.thumbSrc||m.thumbSrc||"",m[eA]=parseFloat(v[eA]||"")||m[eA]||0,m[eT]=parseFloat(v.thumbHeight||"")||m[eT]||0),this.addSlide(m)}onInitSlides(){this.build()}onChange(){var r;if(!this.isModern)return;let m=this.container,v=this.instance,b=v.panzoom,y=this.carousel,w=y?y.panzoom:null,x=v.page;
1if(b&&y&&w){if(b.isDragging){S(m,this.cn(eO));let b=(null===(r=y.pages[x])||void 0===r?void 0:r.pos)||0;b+=v.getProgress(x)*(this[eA]+this.thumbGap);let C=w.getBounds();-1*b>C.x.min&&-1*b<C.x.max&&w.panTo({x:-1*b,friction:.12})}else o(m,this.cn(eO),b.isResting);this.shiftModern()}}onRefresh(){for(let r of(this.updateProps(),this.instance.slides||[]))this.resizeModernSlide(r);this.shiftModern()}isDisabled(){let r=this.option("minCount")||0;if(r){let m=this.instance,v=0;for(let r of m.slides||[])r.thumbSrc&&v++;if(v<r)return!0}let m=this.option("type");return 0>["modern","classic"].indexOf(m)}getThumb(r){let m=this.option("thumbTpl")||"";return{html:this.instance.localize(m,[["%i",r.index],["%d",r.index+1],["%s",r.thumbSrc||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"]])}}addSlide(r){let m=this.carousel;m&&m.addSlide(r.index,this.getThumb(r))}getSlides(){let r=[];for(let m of this.instance.slides||[])r.push(this.getThumb(m));return r}resizeModernSlide(r){this.isModern&&(r[eM]=r[eA]&&r[eT]?Math.round(this[eT]*(r[eA]/r[eT])):this[eM])}updateProps(){let r=this.container;if(!r)return;let e=m=>parseFloat(getComputedStyle(r).getPropertyValue("--f-thumb-"+m))||0;this.thumbGap=e("gap"),this.thumbExtraGap=e("extra-gap"),this[eM]=e("width")||40,this[eA]=e("clip-width")||40,this[eT]=e("height")||40}build(){let r=this;if(r.state!==C.Init)return;if(r.isDisabled())return void r.emit("disabled");let m=r.instance,v=m.container,b=r.getSlides(),y=r.option("type");r.type=y;let w=r.option("parentEl"),x=r.cn("container"),O=r.cn("track"),M=null==w?void 0:w.querySelector("."+x);M||(P(M=document.createElement("div"),x),w?w.appendChild(M):v.after(M)),P(M,`is-${y}`),P(v,r.cn("hasThumbs")),r.container=M,r.updateProps();let T=M.querySelector("."+O);T||(P(T=document.createElement("div"),r.cn("track")),M.appendChild(T)),r.track=T;let A=u({},{track:T,infinite:!1,center:!0,fill:"classic"===y,dragFree:!0,slidesPerPage:1,transition:!1,preload:.25,friction:.12,Panzoom:{maxVelocity:0},Dots:!1,Navigation:!1,classes:{container:"f-thumbs",viewport:"f-thumbs__viewport",track:"f-thumbs__track",slide:"f-thumbs__slide"}},r.option("Carousel")||{},{Sync:{target:m},slides:b}),L=new m.constructor(M,A);L.on("createSlide",(m,v)=>{r.setProps(v.index),r.emit("createSlide",v,v.el)}),L.on("ready",()=>{r.shiftModern(),r.emit("ready")}),L.on("refresh",()=>{r.shiftModern()}),L.on("Panzoom.click",(m,v,b)=>{r.onClick(b)}),r.carousel=L,r.state=C.Ready}onClick(r){r.preventDefault(),r.stopPropagation();let m=this.instance,{pages:v,page:b}=m,s=r=>{if(r){let m=r.closest("[data-carousel-index]");if(m)return[parseInt(m.dataset.carouselIndex||"",10)||0,m]}return[-1,void 0]},o=(r,m)=>{let v=document.elementFromPoint(r,m);return v?s(v):[-1,void 0]},[y,w]=s(r.target);if(y>-1)return;let x=this[eA],C=r.clientX,O=r.clientY,[M,T]=o(C-x,O),[A,L]=o(C+x,O);T&&L?(y=Math.abs(C-T.getBoundingClientRect().right)<Math.abs(C-L.getBoundingClientRect().left)?M:A)===b&&(y=y===M?A:M):T?y=M:L&&(y=A),y>-1&&v[y]&&m.slideTo(y)}getShift(r){var m;let{instance:v}=this,b=this.carousel;if(!v||!b)return 0;let y=this[eM],w=this[eA],x=this.thumbGap,C=this.thumbExtraGap;if(!(null===(m=b.slides[r])||void 0===m?void 0:m.el))return 0;let O=v.pages.length-1,M=v.getProgress(0),T=v.getProgress(O),A=v.getProgress(r,!1,!0),L=0,z=.5*(y-w)+C+x,k=M<0&&M>-1,R=T>0&&T<1;return 0===r?(L=z*Math.abs(M),R&&1===M&&(L-=z*Math.abs(T))):r===O?(L=-(z*Math.abs(T)*1),k&&-1===T&&(L+=z*Math.abs(M))):L=k||R?-1*z+z*Math.abs(M)+z*(1-Math.abs(T)):z*A,L}setProps(r){var m;if(!this.isModern)return;let{instance:v}=this,b=this.carousel;if(v&&b){let y=null===(m=b.slides[r])||void 0===m?void 0:m.el;if(y&&y.childNodes.length){let m=t(1-Math.abs(v.getProgress(r))),b=t(this.getShift(r));y.style.setProperty("--progress",m?m+"":""),y.style.setProperty("--shift",b+"")}}}shiftModern(){if(!this.isModern)return;let{instance:r,track:m}=this,v=r.panzoom,y=this.carousel;if(!(r&&m&&v&&y)||v.state===b.Init||v.state===b.Destroy)return;for(let m of r.slides)this.setProps(m.index);let w=(this[eA]+this.thumbGap)*(y.slides.length||0);m.style.setProperty("--width",w+"")}cleanup(){this.carousel&&this.carousel.destroy(),this.carousel=null,this.container&&this.container.remove(),this.container=null,this.track&&this.track.remove(),this.track=null,this.state=C.Init,S(this.instance.container,this.cn("hasThumbs"))}attach(){let r=this.instance;r.on("initSlide",this.onInitSlide),r.state===y.Init?r.on("initSlides",this.onInitSlides):this.onInitSlides(),r.on(["change","Panzoom.afterTransform"],this.onChange),r.on("Panzoom.refresh",this.onRefresh)}detach(){let r=this.instance;r.off("initSlide",this.onInitSlide),r.off("initSlides",this.onInitSlides),r.off(["change","Panzoom.afterTransform"],this.onChange),r.off("Panzoom.refresh",this.onRefresh),this.cleanup()}};Object.defineProperty(eL,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:eC});let ez=Object.assign(Object.assign({},eC),{key:"t",showOnStart:!0,parentEl:null}),ek="is-masked",eR="aria-hidden";let Yt=class Yt extends _{constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"hidden",{enumerable:!0,configurable:!0,writable:!0,value:!1})}get isEnabled(){let r=this.ref;return r&&!r.isDisabled()}get isHidden(){return this.hidden}onClick(r,m){m.stopPropagation()}onCreateSlide(r,m){var v,b,y;let w=(null===(y=null===(b=null===(v=this.instance)||void 0===v?void 0:v.carousel)||void 0===b?void 0:b.slides[m.index])||void 0===y?void 0:y.type)||"",x=m.el;if(x&&w){let r=`for-${w}`;["video","youtube","vimeo","html5video"].includes(w)&&(r+=" for-video"),P(x,r)}}onInit(){var r;let m=this,v=m.instance,b=v.carousel;if(m.ref||!b)return;let y=m.option("parentEl")||v.footer||v.container;if(!y)return;let w=u({},m.options,{parentEl:y,classes:{container:"f-thumbs fancybox__thumbs"},Carousel:{Sync:{friction:v.option("Carousel.friction")||0}},on:{ready:r=>{let v=r.container;v&&this.hidden&&(m.refresh(),v.style.transition="none",m.hide(),v.offsetHeight,queueMicrotask(()=>{v.style.transition="",m.show()}))}}});w.Carousel=w.Carousel||{},w.Carousel.on=u((null===(r=m.options.Carousel)||void 0===r?void 0:r.on)||{},{click:this.onClick,createSlide:this.onCreateSlide}),b.options.Thumbs=w,b.attachPlugins({Thumbs:eL}),m.ref=b.plugins.Thumbs,m.option("showOnStart")||(m.ref.state=C.Hidden,m.hidden=!0)}onResize(){var r;let m=null===(r=this.ref)||void 0===r?void 0:r.container;m&&(m.style.maxHeight="")}onKeydown(r,m){let v=this.option("key");v&&v===m&&this.toggle()}toggle(){let r=this.ref;if(r&&!r.isDisabled())return r.state===C.Hidden?(r.state=C.Init,void r.build()):void(this.hidden?this.show():this.hide())}show(){let r=this.ref;if(!r||r.isDisabled())return;let m=r.container;m&&(this.refresh(),m.offsetHeight,m.removeAttribute(eR),m.classList.remove(ek),this.hidden=!1)}hide(){let r=this.ref,m=r&&r.container;m&&(this.refresh(),m.offsetHeight,m.classList.add(ek),m.setAttribute(eR,"true")),this.hidden=!0}refresh(){let r=this.ref;if(!r||!r.state)return;let m=r.container,v=(null==m?void 0:m.firstChild)||null;m&&v&&v.childNodes.length&&(m.style.maxHeight=`${v.getBoundingClientRect().height}px`)}
1attach(){let r=this.instance;r.state===w.Init?r.on("Carousel.init",this.onInit):this.onInit(),r.on("resize",this.onResize),r.on("keydown",this.onKeydown)}detach(){var r;let m=this.instance;m.off("Carousel.init",this.onInit),m.off("resize",this.onResize),m.off("keydown",this.onKeydown),null===(r=m.carousel)||void 0===r||r.detachPlugins(["Thumbs"]),this.ref=null}};Object.defineProperty(Yt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:ez});let eI={panLeft:{icon:'<svg><path d="M5 12h14M5 12l6 6M5 12l6-6"/></svg>',change:{panX:-100}},panRight:{icon:'<svg><path d="M5 12h14M13 18l6-6M13 6l6 6"/></svg>',change:{panX:100}},panUp:{icon:'<svg><path d="M12 5v14M18 11l-6-6M6 11l6-6"/></svg>',change:{panY:-100}},panDown:{icon:'<svg><path d="M12 5v14M18 13l-6 6M6 13l6 6"/></svg>',change:{panY:100}},zoomIn:{icon:'<svg><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M11 8v6M8 11h6"/></svg>',action:"zoomIn"},zoomOut:{icon:'<svg><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"zoomOut"},toggle1to1:{icon:'<svg><path d="M3.51 3.07c5.74.02 11.48-.02 17.22.02 1.37.1 2.34 1.64 2.18 3.13 0 4.08.02 8.16 0 12.23-.1 1.54-1.47 2.64-2.79 2.46-5.61-.01-11.24.02-16.86-.01-1.36-.12-2.33-1.65-2.17-3.14 0-4.07-.02-8.16 0-12.23.1-1.36 1.22-2.48 2.42-2.46Z"/><path d="M5.65 8.54h1.49v6.92m8.94-6.92h1.49v6.92M11.5 9.4v.02m0 5.18v0"/></svg>',action:"toggleZoom"},toggleZoom:{icon:'<svg><g><line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"toggleZoom"},iterateZoom:{icon:'<svg><g><line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/></svg>',action:"iterateZoom"},rotateCCW:{icon:'<svg><path d="M15 4.55a8 8 0 0 0-6 14.9M9 15v5H4M18.37 7.16v.01M13 19.94v.01M16.84 18.37v.01M19.37 15.1v.01M19.94 11v.01"/></svg>',action:"rotateCCW"},rotateCW:{icon:'<svg><path d="M9 4.55a8 8 0 0 1 6 14.9M15 15v5h5M5.63 7.16v.01M4.06 11v.01M4.63 15.1v.01M7.16 18.37v.01M11 19.94v.01"/></svg>',action:"rotateCW"},flipX:{icon:'<svg style="stroke-width: 1.3"><path d="M12 3v18M16 7v10h5L16 7M8 7v10H3L8 7"/></svg>',action:"flipX"},flipY:{icon:'<svg style="stroke-width: 1.3"><path d="M3 12h18M7 16h10L7 21v-5M7 8h10L7 3v5"/></svg>',action:"flipY"},fitX:{icon:'<svg><path d="M4 12V6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v6M10 18H3M21 18h-7M6 15l-3 3 3 3M18 15l3 3-3 3"/></svg>',action:"fitX"},fitY:{icon:'<svg><path d="M12 20H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h6M18 14v7M18 3v7M15 18l3 3 3-3M15 6l3-3 3 3"/></svg>',action:"fitY"},reset:{icon:'<svg><path d="M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/></svg>',action:"reset"},toggleFS:{icon:'<svg><g><path d="M14.5 9.5 21 3m0 0h-6m6 0v6M3 21l6.5-6.5M3 21v-6m0 6h6"/></g><g><path d="m14 10 7-7m-7 7h6m-6 0V4M3 21l7-7m0 0v6m0-6H4"/></g></svg>',action:"toggleFS"}};(k=O||(O={}))[k.Init=0]="Init",k[k.Ready=1]="Ready",k[k.Disabled=2]="Disabled";let eD={tabindex:"-1",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},eF="has-toolbar",ej="fancybox__toolbar";let Qt=class Qt extends _{constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:O.Init}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null})}onReady(r){var m;if(!r.carousel)return;let v=this.option("display"),b=this.option("absolute"),y=this.option("enabled");if("auto"===y){let r=this.instance.carousel,m=0;if(r)for(let v of r.slides)(v.panzoom||"image"===v.type)&&m++;m||(y=!1)}y||(v=void 0);let w=0,x={left:[],middle:[],right:[]};if(v)for(let r of["left","middle","right"])for(let b of v[r]){let v=this.createEl(b);v&&(null===(m=x[r])||void 0===m||m.push(v),w++)}let C=null;if(w&&(C=this.createContainer()),C){for(let[r,m]of Object.entries(x)){let v=document.createElement("div");for(let b of(P(v,ej+"__column is-"+r),m))v.appendChild(b);"auto"!==b||"middle"!==r||m.length||(b=!0),C.appendChild(v)}!0===b&&P(C,"is-absolute"),this.state=O.Ready,this.onRefresh()}else this.state=O.Disabled}onClick(r){var m,v;let b=this.instance,y=b.getSlide(),w=null==y?void 0:y.panzoom,x=r.target,C=x&&E(x)?x.dataset:null;if(!C)return;if(void 0!==C.fancyboxToggleThumbs)return r.preventDefault(),r.stopPropagation(),void(null===(m=b.plugins.Thumbs
1)||void 0===m||m.toggle());if(void 0!==C.fancyboxToggleFullscreen)return r.preventDefault(),r.stopPropagation(),void this.instance.toggleFullscreen();if(void 0!==C.fancyboxToggleSlideshow){r.preventDefault(),r.stopPropagation();let m=null===(v=b.carousel)||void 0===v?void 0:v.plugins.Autoplay,y=m.isActive;return w&&"mousemove"===w.panMode&&!y&&w.reset(),void(y?m.stop():m.start())}let O=C.panzoomAction,M=C.panzoomChange;if((M||O)&&(r.preventDefault(),r.stopPropagation()),M){let r={};try{r=JSON.parse(M)}catch(r){}w&&w.applyChange(r)}else O&&w&&w[O]&&w[O]()}onChange(){this.onRefresh()}onRefresh(){if(this.instance.isClosing())return;let r=this.container;if(!r)return;let m=this.instance.getSlide();if(!m||m.state!==x.Ready)return;let v=m&&!m.error&&m.panzoom;for(let m of r.querySelectorAll("[data-panzoom-action]"))v?(m.removeAttribute("disabled"),m.removeAttribute("tabindex")):(m.setAttribute("disabled",""),m.setAttribute("tabindex","-1"));let b=v&&v.canZoomIn(),y=v&&v.canZoomOut();for(let m of r.querySelectorAll('[data-panzoom-action="zoomIn"]'))b?(m.removeAttribute("disabled"),m.removeAttribute("tabindex")):(m.setAttribute("disabled",""),m.setAttribute("tabindex","-1"));for(let m of r.querySelectorAll('[data-panzoom-action="zoomOut"]'))y?(m.removeAttribute("disabled"),m.removeAttribute("tabindex")):(m.setAttribute("disabled",""),m.setAttribute("tabindex","-1"));for(let m of r.querySelectorAll('[data-panzoom-action="toggleZoom"],[data-panzoom-action="iterateZoom"]')){y||b?(m.removeAttribute("disabled"),m.removeAttribute("tabindex")):(m.setAttribute("disabled",""),m.setAttribute("tabindex","-1"));let r=m.querySelector("g");r&&(r.style.display=b?"":"none")}}onDone(r,m){var v;null===(v=m.panzoom)||void 0===v||v.on("afterTransform",()=>{this.instance.isCurrentSlide(m)&&this.onRefresh()}),this.instance.isCurrentSlide(m)&&this.onRefresh()}createContainer(){let r=this.instance.container;if(!r)return null;let m=this.option("parentEl")||r,v=m.querySelector("."+ej);return v||(P(v=document.createElement("div"),ej),m.prepend(v)),v.addEventListener("click",this.onClick,{passive:!1,capture:!0}),r&&P(r,eF),this.container=v,v}createEl(r){let m=this.instance,v=m.carousel;if(!v||"toggleFS"===r||"fullscreen"===r&&!ot())return null;let b=null,y=v.slides.length||0,w=0,x=0;for(let r of v.slides)(r.panzoom||"image"===r.type)&&w++,("image"===r.type||r.downloadSrc)&&x++;if(y<2&&["infobar","prev","next"].includes(r))return b;if(void 0!==eI[r]&&!w||"download"===r&&!x)return null;if("thumbs"===r){let r=m.plugins.Thumbs;if(!r||!r.isEnabled)return null}if("slideshow"===r&&(!v.plugins.Autoplay||y<2))return null;if(void 0!==eI[r]){let m=eI[r];(b=document.createElement("button")).setAttribute("title",this.instance.localize(`{{${r.toUpperCase()}}}`)),P(b,"f-button"),m.action&&(b.dataset.panzoomAction=m.action),m.change&&(b.dataset.panzoomChange=JSON.stringify(m.change)),b.appendChild(n(this.instance.localize(m.icon)))}else{let m=(this.option("items")||[])[r];m&&(b=n(this.instance.localize(m.tpl)),"function"==typeof m.click&&b.addEventListener("click",r=>{r.preventDefault(),r.stopPropagation(),"function"==typeof m.click&&m.click.call(this,this,r)}))}let C=null==b?void 0:b.querySelector("svg");if(C)for(let[r,m]of Object.entries(eD))C.getAttribute(r)||C.setAttribute(r,String(m));return b}removeContainer(){let r=this.container;r&&r.remove(),this.container=null,this.state=O.Disabled;let m=this.instance.container;m&&S(m,eF)}attach(){let r=this.instance;r.on("Carousel.initSlides",this.onReady),r.on("done",this.onDone),r.on(["reveal","Carousel.change"],this.onChange),this.onReady(this.instance)}detach(){let r=this.instance;r.off("Carousel.initSlides",this.onReady),r.off("done",this.onDone),r.off(["reveal","Carousel.change"],this.onChange),this.removeContainer()}};Object.defineProperty(Qt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{absolute:"auto",display:{left:["infobar"],middle:[],right:["iterateZoom","slideshow","fullscreen","thumbs","close"]},enabled:"auto",items:{infobar:{tpl:'<div class="fancybox__infobar" tabindex="-1"><span data-fancybox-current-index></span>/<span data-fancybox-count></span></div>'},download:{tpl:'<a class="f-button" title="{{DOWNLOAD}}" data-fancybox-download href="javasript:;"><svg><path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5 5-5M12 4v12"/></svg></a>'},prev:{tpl:'<button class="f-button" title="{{PREV}}" data-fancybox-prev><svg><path d="m15 6-6 6 6 6"/></svg></button>'},next:{tpl:'<button class="f-button" title="{{NEXT}}" data-fancybox-next><svg><path d="m9 6 6 6-6 6"/></svg></button>'},slideshow:{tpl:'<button class="f-button" title="{{TOGGLE_SLIDESHOW}}" data-fancybox-toggle-slideshow><svg><g><path d="M8 4v16l13 -8z"></path></g><g>
1<path d="M8 4v15M17 4v15"/></g></svg></button>'},fullscreen:{tpl:'<button class="f-button" title="{{TOGGLE_FULLSCREEN}}" data-fancybox-toggle-fullscreen><svg><g><path d="M4 8V6a2 2 0 0 1 2-2h2M4 16v2a2 2 0 0 0 2 2h2M16 4h2a2 2 0 0 1 2 2v2M16 20h2a2 2 0 0 0 2-2v-2"/></g><g><path d="M15 19v-2a2 2 0 0 1 2-2h2M15 5v2a2 2 0 0 0 2 2h2M5 15h2a2 2 0 0 1 2 2v2M5 9h2a2 2 0 0 0 2-2V5"/></g></svg></button>'},thumbs:{tpl:'<button class="f-button" title="{{TOGGLE_THUMBS}}" data-fancybox-toggle-thumbs><svg><circle cx="5.5" cy="5.5" r="1"/><circle cx="12" cy="5.5" r="1"/><circle cx="18.5" cy="5.5" r="1"/><circle cx="5.5" cy="12" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="18.5" cy="12" r="1"/><circle cx="5.5" cy="18.5" r="1"/><circle cx="12" cy="18.5" r="1"/><circle cx="18.5" cy="18.5" r="1"/></svg></button>'},close:{tpl:'<button class="f-button" title="{{CLOSE}}" data-fancybox-close><svg><path d="m19.5 4.5-15 15M4.5 4.5l15 15"/></svg></button>'}},parentEl:null}});let eH="with-fancybox",eB="hide-scrollbar",eN="--fancybox-scrollbar-compensate",e_="--fancybox-body-margin",e$="aria-hidden",eW="is-using-tab",eX="is-animated",eY="is-compact",eq="is-loading",eV="is-opening",eZ="has-caption",eU="disabled",eG="tabindex",eK="download",eJ="href",ve=r=>"string"==typeof r,be=function(){var r=window.getSelection();return!!r&&"Range"===r.type},eQ,e0=null,e1=null,e2=0,e5=0,e3=0,e4=0,e6=new Map,e8=0;let Oe=class Oe extends g{get isIdle(){return this.idle}get isCompact(){return this.option("compact")}constructor(r=[],m={},v={}){super(m),Object.defineProperty(this,"userSlides",{enumerable:!0,configurable:!0,writable:!0,value:[]}),Object.defineProperty(this,"userPlugins",{enumerable:!0,configurable:!0,writable:!0,value:{}}),Object.defineProperty(this,"idle",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"idleTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"clickTimer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"pwt",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"ignoreFocusChange",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"startedFs",{enumerable:!0,configurable:!0,writable:!0,value:!1}),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:w.Init}),Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:0}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"footer",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"carousel",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"lastFocus",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(this,"prevMouseMoveEvent",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),eQ||(eQ=ot()),this.id=m.id||++e8,e6.set(this.id,this),this.userSlides=r,this.userPlugins=v,queueMicrotask(()=>{this.init()})}init(){if(this.state===w.Destroy)return;this.state=w.Init,this.attachPlugins(Object.assign(Object.assign({},Oe.Plugins),this.userPlugins)),this.emit("init"),this.emit("attachPlugins"),!0===this.option("hideScrollbar")&&(()=>{if(!el)return;let r=document,m=r.body,v=r.documentElement;if(m.classList.contains(eB))return;let b=window.innerWidth-v.getBoundingClientRect().width,y=parseFloat(window.getComputedStyle(m).marginRight);b<0&&(b=0),v.style.setProperty(eN,`${b}px`),y&&m.style.setProperty(e_,`${y}px`),m.classList.add(eB)})(),this.initLayout(),this.scale();let t=()=>{this.initCarousel(this.userSlides),this.state=w.Ready,this.attachEvents(),this.emit("ready"),setTimeout(()=>{this.container&&this.container.setAttribute(e$,"false")},16)};this.option("Fullscreen.autoStart")&&eQ&&!eQ.isFullscreen()?eQ.request().then(()=>{this.startedFs=!0,t()}).catch(()=>t()):t()}initLayout(){var r,m;let v=this.option("parentEl")||document.body,b=n(this.localize(this.option("tpl.main")||""));if(b){if(b.setAttribute("id",`fancybox-${this.id}`),b.setAttribute("aria-label",this.localize("{{MODAL}}")),b.classList.toggle(eY,this.isCompact),P(b,this.option("mainClass")||""),P(b,eV),this.container=b,this.footer=b.querySelector(".fancybox__footer"),v.appendChild(b),P(document.documentElement,eH),e0&&e1||(P(e0=document.createElement("span"),"fancybox-focus-guard"),e0.setAttribute(eG,"0"),e0.setAttribute(e$,"true"),e0.setAttribute("aria-label","Focus guard"),e1=e0.cloneNode(),null===(r=b.parentElement)||void 0===r||r.insertBefore(e0,b),null===(m=b.parentElement)||void 0===m||m.append(e1)),b.addEventListener("mousedown",r=>{e2=r.pageX,e5=r.pageY,S(b,eW)}),this.option("closeExisting"))for(let r of e6.values())r.id!==this.id&&r.close();else this.option("animated")&&(P(b,eX),setTimeout(()=>{this.isClosing()||S(b,eX)},350));
1this.emit("initLayout")}}initCarousel(r){let m=this.container;if(!m)return;let v=m.querySelector(".fancybox__carousel");if(!v)return;let b=this.carousel=new Q(v,u({},{slides:r,transition:"fade",Panzoom:{lockAxis:this.option("dragToClose")?"xy":"x",infinite:!!this.option("dragToClose")&&"y"},Dots:!1,Navigation:{classes:{container:"fancybox__nav",button:"f-button",isNext:"is-next",isPrev:"is-prev"}},initialPage:this.option("startIndex"),l10n:this.option("l10n")},this.option("Carousel")||{}));b.on("*",(r,m,...v)=>{this.emit(`Carousel.${m}`,r,...v)}),b.on(["ready","change"],()=>{this.manageCaption()}),this.on("Carousel.removeSlide",(r,m,v)=>{this.clearContent(v),v.state=void 0}),b.on("Panzoom.touchStart",()=>{var r,m;this.isCompact||this.endIdle(),(null===(r=document.activeElement)||void 0===r?void 0:r.closest(".f-thumbs"))&&(null===(m=this.container)||void 0===m||m.focus())}),b.on("settle",()=>{this.idleTimer||this.isCompact||!this.option("idle")||this.setIdle(),this.option("autoFocus")&&!this.isClosing&&this.checkFocus()}),this.option("dragToClose")&&(b.on("Panzoom.afterTransform",(r,m)=>{let v=this.getSlide();if(v&&e(v.el))return;let b=this.container;if(b){let r=Math.abs(m.current.f),v=r<1?"":Math.max(.5,Math.min(1,1-r/m.contentRect.fitHeight*1.5));b.style.setProperty("--fancybox-ts",v?"0s":""),b.style.setProperty("--fancybox-opacity",v+"")}}),b.on("Panzoom.touchEnd",(r,m,v)=>{var b;let y=this.getSlide();if(y&&e(y.el)||m.isMobile&&document.activeElement&&-1!==["TEXTAREA","INPUT"].indexOf(null===(b=document.activeElement)||void 0===b?void 0:b.nodeName))return;let w=Math.abs(m.dragOffset.y);"y"===m.lockedAxis&&(w>=200||w>=50&&m.dragOffset.time<300)&&(v&&v.cancelable&&v.preventDefault(),this.close(v,"f-throwOut"+(m.current.f<0?"Up":"Down")))})),b.on("change",r=>{var m;let v=null===(m=this.getSlide())||void 0===m?void 0:m.triggerEl;if(v){let m=new CustomEvent("slideTo",{bubbles:!0,cancelable:!0,detail:r.page});v.dispatchEvent(m)}}),b.on(["refresh","change"],r=>{let m=this.container;if(!m)return;for(let v of m.querySelectorAll("[data-fancybox-current-index]"))v.innerHTML=r.page+1;for(let v of m.querySelectorAll("[data-fancybox-count]"))v.innerHTML=r.pages.length;if(!r.isInfinite){for(let v of m.querySelectorAll("[data-fancybox-next]"))r.page<r.pages.length-1?(v.removeAttribute(eU),v.removeAttribute(eG)):(v.setAttribute(eU,""),v.setAttribute(eG,"-1"));for(let v of m.querySelectorAll("[data-fancybox-prev]"))r.page>0?(v.removeAttribute(eU),v.removeAttribute(eG)):(v.setAttribute(eU,""),v.setAttribute(eG,"-1"))}let v=this.getSlide();if(!v)return;let b=v.downloadSrc||"";for(let r of(b||"image"!==v.type||v.error||!ve(v.src)||(b=v.src),m.querySelectorAll("[data-fancybox-download]"))){let m=v.downloadFilename;b?(r.removeAttribute(eU),r.removeAttribute(eG),r.setAttribute(eJ,b),r.setAttribute(eK,m||b),r.setAttribute("target","_blank")):(r.setAttribute(eU,""),r.setAttribute(eG,"-1"),r.removeAttribute(eJ),r.removeAttribute(eK))}}),this.emit("initCarousel")}attachEvents(){let r=this.container;if(!r)return;r.addEventListener("click",this.onClick,{passive:!1,capture:!1}),r.addEventListener("wheel",this.onWheel,{passive:!1,capture:!1}),document.addEventListener("keydown",this.onKeydown,{passive:!1,capture:!0}),document.addEventListener("visibilitychange",this.onVisibilityChange,!1),document.addEventListener("mousemove",this.onMousemove),this.option("trapFocus")&&document.addEventListener("focus",this.onFocus,!0),window.addEventListener("resize",this.onResize);let m=window.visualViewport;m&&(m.addEventListener("scroll",this.onResize),m.addEventListener("resize",this.onResize))}detachEvents(){let r=this.container;if(!r)return;document.removeEventListener("keydown",this.onKeydown,{passive:!1,capture:!0}),r.removeEventListener("wheel",this.onWheel,{passive:!1,capture:!1}),r.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),document.removeEventListener("mousemove",this.onMousemove),window.removeEventListener("resize",this.onResize);let m=window.visualViewport;m&&(m.removeEventListener("resize",this.onResize),m.removeEventListener("scroll",this.onResize)),document.removeEventListener("visibilitychange",this.onVisibilityChange,!1),document.removeEventListener("focus",this.onFocus,!0)}scale(){let r=this.container;if(!r)return;
1let m=window.visualViewport,v=Math.max(1,(null==m?void 0:m.scale)||1),b="",y="",w="";if(m&&v>1){let r=`${m.offsetLeft}px`,x=`${m.offsetTop}px`;b=m.width*v+"px",y=m.height*v+"px",w=`translate3d(${r}, ${x}, 0) scale(${1/v})`}r.style.transform=w,r.style.width=b,r.style.height=y}onClick(r){var m;let{container:v,isCompact:b}=this;if(!v||this.isClosing())return;!b&&this.option("idle")&&this.resetIdle();let y=r.composedPath()[0];if(y.closest(".fancybox-spinner")||y.closest("[data-fancybox-close]"))return r.preventDefault(),void this.close(r);if(y.closest("[data-fancybox-prev]"))return r.preventDefault(),void this.prev();if(y.closest("[data-fancybox-next]"))return r.preventDefault(),void this.next();if("click"===r.type&&0===r.detail||Math.abs(r.pageX-e2)>30||Math.abs(r.pageY-e5)>30)return;let w=document.activeElement;if(be()&&w&&v.contains(w))return;if(b&&"image"===(null===(m=this.getSlide())||void 0===m?void 0:m.type))return void(this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null):this.clickTimer=setTimeout(()=>{this.toggleIdle(),this.clickTimer=null},350));if(this.emit("click",r),r.defaultPrevented)return;let x=!1;if(y.closest(".fancybox__content")){if(w){if(w.closest("[contenteditable]"))return;y.matches(eh)||w.blur()}if(be())return;x=this.option("contentClick")}else y.closest(".fancybox__carousel")&&!y.matches(eh)&&(x=this.option("backdropClick"));"close"===x?(r.preventDefault(),this.close(r)):"next"===x?(r.preventDefault(),this.next()):"prev"===x&&(r.preventDefault(),this.prev())}onWheel(r){let m=r.target,v=this.option("wheel",r);m.closest(".fancybox__thumbs")&&(v="slide");let b="slide"===v,y=[-r.deltaX||0,-r.deltaY||0,-r.detail||0].reduce(function(r,m){return Math.abs(m)>Math.abs(r)?m:r}),w=Math.max(-1,Math.min(1,y)),x=Date.now();this.pwt&&x-this.pwt<300?b&&r.preventDefault():(this.pwt=x,this.emit("wheel",r,w),r.defaultPrevented||("close"===v?(r.preventDefault(),this.close(r)):"slide"===v&&(i(m)||(r.preventDefault(),this[w>0?"prev":"next"]()))))}onScroll(){window.scrollTo(e3,e4)}onKeydown(r){if(!this.isTopmost())return;this.isCompact||!this.option("idle")||this.isClosing()||this.resetIdle();let m=r.key,v=this.option("keyboard");if(!v)return;let b=r.composedPath()[0],y=document.activeElement&&document.activeElement.classList,w=y&&y.contains("f-button")||b.dataset.carouselPage||b.dataset.carouselIndex;if("Escape"!==m&&!w&&E(b)&&(b.isContentEditable||-1!==["TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(b.nodeName))||("Tab"===r.key?P(this.container,eW):S(this.container,eW),r.ctrlKey||r.altKey||r.shiftKey))return;this.emit("keydown",m,r);let x=v[m];x&&"function"==typeof this[x]&&(r.preventDefault(),this[x]())}onResize(){let r=this.container;if(!r)return;let m=this.isCompact;r.classList.toggle(eY,m),this.manageCaption(this.getSlide()),this.isCompact?this.clearIdle():this.endIdle(),this.scale(),this.emit("resize")}onFocus(r){this.isTopmost()&&this.checkFocus(r)}onMousemove(r){this.prevMouseMoveEvent=r,!this.isCompact&&this.option("idle")&&this.resetIdle()}onVisibilityChange(){"visible"===document.visibilityState?this.checkFocus():this.endIdle()}manageCloseBtn(r){let m=this.optionFor(r,"closeButton")||!1;if("auto"===m){let r=this.plugins.Toolbar;if(r&&r.state===O.Ready)return}if(!m||!r.contentEl||r.closeBtnEl)return;let v=this.option("tpl.closeButton");if(v){let m=n(this.localize(v));r.closeBtnEl=r.contentEl.appendChild(m),r.el&&P(r.el,"has-close-btn")}}manageCaption(r){var m,v;let b="fancybox__caption",y=this.container;if(!y)return;S(y,eZ);let w=this.isCompact||this.option("commonCaption"),x=!w;if(this.caption&&this.stop(this.caption),x&&this.caption&&(this.caption.remove(),this.caption=null),w&&!this.caption)for(let r of(null===(m=this.carousel)||void 0===m?void 0:m.slides)||[])r.captionEl&&(r.captionEl.remove(),r.captionEl=void 0,S(r.el,eZ),null===(v=r.el)||void 0===v||v.removeAttribute("aria-labelledby"));if(r||(r=this.getSlide()),!r||w&&!this.isCurrentSlide(r))return;let C=r.el,O=this.optionFor(r,"caption","");if(!O)return void(w&&this.caption&&this.animate(this.caption,"f-fadeOut",()=>{this.caption&&(this.caption.innerHTML="")}));let M=null;if(x){if(M=r.captionEl||null,C&&!M){let m=b+`_${this.id}_${r.index}`;P(M=document.createElement("div"),b),M.setAttribute("id",m),r.captionEl=C.appendChild(M),P(C,eZ),C.setAttribute("aria-labelledby",m)}}else(M=this.caption)||(M=y.querySelector("."+b)),M||((M=document.createElement("div")).dataset.fancyboxCaption="",P(M,b),(this.footer||y).prepend(M)),P(y,eZ),this.caption=M;M&&(M.innerHTML="",ve(O)||"number"==typeof O?M.innerHTML=O+"":O instanceof HTMLElement&&M.appendChild(O))}checkFocus(r){this.focus(r)}focus(r){var m;if(this.ignoreFocusChange)return;
1let v=document.activeElement||null,b=(null==r?void 0:r.target)||null,y=this.container,w=null===(m=this.carousel)||void 0===m?void 0:m.viewport;if(!y||!w||!r&&v&&y.contains(v))return;let C=this.getSlide(),O=C&&C.state===x.Ready?C.el:null;if(!O||O.contains(v)||y===v)return;r&&r.cancelable&&r.preventDefault(),this.ignoreFocusChange=!0;let M=Array.from(y.querySelectorAll(eh)),T=[],A=null;for(let r of M){let m=!r.offsetParent||!!r.closest('[aria-hidden="true"]'),v=O&&O.contains(r),b=!w.contains(r);if(r===y||(v||b)&&!m){T.push(r);let m=r.dataset.origTabindex;void 0!==m&&m&&(r.tabIndex=parseFloat(m)),r.removeAttribute("data-orig-tabindex"),!r.hasAttribute("autoFocus")&&A||(A=r)}else{let m=void 0===r.dataset.origTabindex?r.getAttribute("tabindex")||"":r.dataset.origTabindex;m&&(r.dataset.origTabindex=m),r.tabIndex=-1}}let L=null;r?(!b||0>T.indexOf(b))&&(L=A||y,T.length&&(v===e1?L=T[0]:this.lastFocus!==y&&v!==e0||(L=T[T.length-1]))):L=C&&"image"===C.type?y:A||y,L&&st(L),this.lastFocus=document.activeElement,this.ignoreFocusChange=!1}next(){let r=this.carousel;r&&r.pages.length>1&&r.slideNext()}prev(){let r=this.carousel;r&&r.pages.length>1&&r.slidePrev()}jumpTo(...r){this.carousel&&this.carousel.slideTo(...r)}isTopmost(){var r;return(null===(r=Oe.getInstance())||void 0===r?void 0:r.id)==this.id}animate(r=null,m="",v){if(!r||!m)return void(v&&v());this.stop(r);let n=b=>{b.target===r&&r.dataset.animationName&&(r.removeEventListener("animationend",n),delete r.dataset.animationName,v&&v(),S(r,m))};r.dataset.animationName=m,r.addEventListener("animationend",n),P(r,m)}stop(r){r&&r.dispatchEvent(new CustomEvent("animationend",{bubbles:!1,cancelable:!0,currentTarget:r}))}setContent(r,m="",v=!0){if(this.isClosing())return;let b=r.el;if(!b)return;let y=null;if(E(m)?y=m:E(y=n(m+""))||((y=document.createElement("div")).innerHTML=m+""),["img","picture","iframe","video","audio"].includes(y.nodeName.toLowerCase())){let r=document.createElement("div");r.appendChild(y),y=r}E(y)&&r.filter&&!r.error&&(y=y.querySelector(r.filter)),y&&E(y)?(P(y,"fancybox__content"),r.id&&y.setAttribute("id",r.id),b.classList.add(`has-${r.error?"error":r.type||"unknown"}`),b.prepend(y),"none"===y.style.display&&(y.style.display=""),"none"===getComputedStyle(y).getPropertyValue("display")&&(y.style.display=r.display||this.option("defaultDisplay")||"flex"),r.contentEl=y,v&&this.revealContent(r),this.manageCloseBtn(r),this.manageCaption(r)):this.setError(r,"{{ELEMENT_NOT_FOUND}}")}revealContent(r,m){let v=r.el,b=r.contentEl;
vendor: 1,204 bytes, line 1
1v&&b&&(this.emit("reveal",r),this.hideLoading(r),r.state=x.Opening,(m=this.isOpeningSlide(r)?void 0===m?this.optionFor(r,"showClass"):m:"f-fadeIn")?this.animate(b,m,()=>{this.done(r)}):this.done(r))}done(r){this.isClosing()||(r.state=x.Ready,this.emit("done",r),P(r.el,"is-done"),this.isCurrentSlide(r)&&this.option("autoFocus")&&queueMicrotask(()=>{var m;null===(m=r.panzoom)||void 0===m||m.updateControls(),this.option("autoFocus")&&this.focus()}),this.isOpeningSlide(r)&&(S(this.container,eV),!this.isCompact&&this.option("idle")&&this.setIdle()))}isCurrentSlide(r){let m=this.getSlide();return!(!r||!m)&&m.index===r.index}isOpeningSlide(r){var m,v;return null===(null===(m=this.carousel)||void 0===m?void 0:m.prevPage)&&r&&r.index===(null===(v=this.getSlide())||void 0===v?void 0:v.index)}showLoading(r){r.state=x.Loading;let m=r.el;m&&(P(m,eq),this.emit("loading",r),r.spinnerEl||setTimeout(()=>{if(!this.isClosing()&&!r.spinnerEl&&r.state===x.Loading){let v=n(Y);P(v,"fancybox-spinner"),r.spinnerEl=v,m.prepend(v),this.animate(v,"f-fadeIn")}},250))}hideLoading(r){let m=r.el;if(!m)return;let v=r.spinnerEl;this.isClosing()?null==v||v.remove():(S(m,eq),v&&this.animate(v,"f-fadeOut",()=>{v.remove()}
1),r.state===x.Loading&&(this.emit("loaded",r),r.state=x.Ready))}setError(r,m){if(this.isClosing())return;let v=new Event("error",{bubbles:!0,cancelable:!0});if(this.emit("error",v,r),v.defaultPrevented)return;r.error=m,this.hideLoading(r),this.clearContent(r);let b=document.createElement("div");b.classList.add("fancybox-error"),b.innerHTML=this.localize(m||"<p>{{ERROR}}</p>"),this.setContent(r,b)}clearContent(r){if(void 0===r.state)return;this.emit("clearContent",r),r.contentEl&&(r.contentEl.remove(),r.contentEl=void 0);let m=r.el;m&&(S(m,"has-error"),S(m,"has-unknown"),S(m,`has-${r.type||"unknown"}`)),r.closeBtnEl&&r.closeBtnEl.remove(),r.closeBtnEl=void 0,r.captionEl&&r.captionEl.remove(),r.captionEl=void 0,r.spinnerEl&&r.spinnerEl.remove(),r.spinnerEl=void 0}getSlide(){var r;let m=this.carousel;return(null===(r=null==m?void 0:m.pages[null==m?void 0:m.page])||void 0===r?void 0:r.slides[0])||void 0}close(r,m){if(this.isClosing())return;let v=new Event("shouldClose",{bubbles:!0,cancelable:!0});if(this.emit("shouldClose",v,r),v.defaultPrevented)return;r&&r.cancelable&&(r.preventDefault(),r.stopPropagation());let n=()=>{this.proceedClose(r,m)};this.startedFs&&eQ&&eQ.isFullscreen()?Promise.resolve(eQ.exit()).then(()=>n()):n()}clearIdle(){this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=null}setIdle(r=!1){let e=()=>{this.clearIdle(),this.idle=!0,P(this.container,"is-idle"),this.emit("setIdle")};if(this.clearIdle(),!this.isClosing()){if(r)e();else{let r=this.option("idle");r&&(this.idleTimer=setTimeout(e,r))}}}endIdle(){this.clearIdle(),this.idle&&!this.isClosing()&&(this.idle=!1,S(this.container,"is-idle"),this.emit("endIdle"))}resetIdle(){this.endIdle(),this.setIdle()}toggleIdle(){this.idle?this.endIdle():this.setIdle(!0)}toggleFullscreen(){eQ&&(eQ.isFullscreen()?eQ.exit():eQ.request().then(()=>{this.startedFs=!0}))}isClosing(){return[w.Closing,w.CustomClosing,w.Destroy].includes(this.state)}proceedClose(r,m){var v,b;this.state=w.Closing,this.clearIdle(),this.detachEvents();let y=this.container,C=this.carousel,O=this.getSlide(),M=O&&this.option("placeFocusBack")?O.triggerEl||this.option("triggerEl"):null;if(M&&(tt(M)?st(M):M.focus()),y&&(S(y,eV),P(y,"is-closing"),y.setAttribute(e$,"true"),this.option("animated")&&P(y,eX),y.style.pointerEvents="none"),C)for(let r of(C.clearTransitions(),null===(v=C.panzoom)||void 0===v||v.destroy(),null===(b=C.plugins.Navigation)||void 0===b||b.detach(),C.slides)){r.state=x.Closing,this.hideLoading(r);let m=r.contentEl;m&&this.stop(m);let v=null==r?void 0:r.panzoom;v&&(v.stop(),v.detachEvents(),v.detachObserver()),this.isCurrentSlide(r)||C.emit("removeSlide",r)}e3=window.scrollX,e4=window.scrollY,window.addEventListener("scroll",this.onScroll),this.emit("close",r),this.state!==w.CustomClosing?(void 0===m&&O&&(m=this.optionFor(O,"hideClass")),m&&O?(this.animate(O.contentEl,m,()=>{C&&C.emit("removeSlide",O)}),setTimeout(()=>{this.destroy()},500)):this.destroy()):setTimeout(()=>{this.destroy()},500)}destroy(){var r;if(this.state===w.Destroy)return;window.removeEventListener("scroll",this.onScroll),this.state=w.Destroy,null===(r=this.carousel)||void 0===r||r.destroy();let m=this.container;m&&m.remove(),e6.delete(this.id);let v=Oe.getInstance();v?v.focus():(e0&&(e0.remove(),e0=null),e1&&(e1.remove(),e1=null),S(document.documentElement,eH),(()=>{if(!el)return;let r=document,m=r.body;m.classList.remove(eB),m.style.setProperty(e_,""),r.documentElement.style.setProperty(eN,"")})(),this.emit("destroy"))}static bind(r,m,v){if(!el)return;let b,y="",w={};if(void 0===r?b=document.body:ve(r)?(b=document.body,y=r,"object"==typeof m&&(w=m||{})):(b=r,ve(m)&&(y=m),"object"==typeof v&&(w=v||{})),!b||!E(b))return;y=y||"[data-fancybox]";let x=Oe.openers.get(b)||new Map;x.set(y,w),Oe.openers.set(b,x),1===x.size&&b.addEventListener("click",Oe.fromEvent)}static unbind(r,m){let v,b="";if(ve(r)?(v=document.body,b=r):(v=r,ve(m)&&(b=m)),!v)return;let y=Oe.openers.get(v);y&&b&&y.delete(b),b&&y||(Oe.openers.delete(v),v.removeEventListener("click",Oe.fromEvent))}static destroy(){let r;for(;r=Oe.getInstance();)r.destroy();for(let r of Oe.openers.keys())r.removeEventListener("click",Oe.fromEvent);Oe.openers=new Map}static fromEvent(r){let m,v,b,y;if(r.defaultPrevented||r.button&&0!==r.button||r.ctrlKey||r.metaKey||r.shiftKey)return;let w=r.composedPath()[0],x=w.closest("[data-fancybox-trigger]");if(x){let r=x.dataset.fancyboxTrigger||"",m=document.querySelectorAll(`[data-fancybox="${r}"]`),v=parseInt(x.dataset.fancyboxIndex||"",10)||0;w=m[v]||w}if(!(w&&w instanceof Element)||([...Oe.openers].reverse().find(([r,x])=>!(!r.contains(w)||![...x].reverse().find(([x,C])=>{let O=w.closest(x);return!!O&&(m=r,v=x,b=O,y=C,!0)}))),!m||!v||!b))return;y=y||{},r.preventDefault(),w=b;let C=[],O=u({},ec,y);O.event=r,O.triggerEl=w,O.delegate=x;let M=O.groupAll,T=O.groupAttr,A=T&&w?w.getAttribute(`${T}`):"";if((!w||A||M)&&(C=[].slice.call(m.querySelectorAll(v))),w&&!M&&(C=A?C.filter(r=>r.getAttribute(`${T}`)===A):[w]),!C.length)return;let L=Oe.getInstance();return L&&L.options.triggerEl&&C.indexOf(L.options.triggerEl)>-1?void 0:(w&&(O.startIndex=C.indexOf(w)),Oe.fromNodes(C,O))}static fromSelector(r,m,v){let b=null,y="",w={};if(ve(r)?(b=document.body,y=r,"object"==typeof m&&(w=m||{})):r instanceof HTMLElement&&ve(m)&&(b=r,y=m,"object"==typeof v&&(w=v||{})),!b||!y)return!1;let x=Oe.openers.get(b);return!!x&&!!(w=u({},x.get(y)||{},w))&&Oe.fromNodes(Array.from(b.querySelectorAll(y)),w)}static fromNodes(r,m){m=u({},ec,m||{});let v=[];for(let b of r){let r,y;let w=b.dataset||{},x=w.src||b.getAttribute(eJ)||b.getAttribute("currentSrc")||b.getAttribute("src")||void 0,C=m.delegate;C&&v.length===m.startIndex&&(r=C instanceof HTMLImageElement?C:C.querySelector("img:not([aria-hidden])")),r||(r=b instanceof HTMLImageElement?b:b.querySelector("img:not([aria-hidden])")),!r||(y=r.currentSrc||r.src||void 0)||!r.dataset||(y=r.dataset.lazySrc||r.dataset.src||void 0);let O={src:x,triggerEl:b,thumbEl:r,thumbElSrc:y,thumbSrc:y};for(let r in w){let m=w[r]+"";m="false"!==m&&("true"===m||m),O[r]=m}v.push(O)}return new Oe(v,m)}static getInstance(r){return r?e6.get(r):Array.from(e6.values()).reverse().find(r=>!r.isClosing()&&r)||null}static getSlide(){var r;return(null===(r=Oe.getInstance())||void 0===r?void 0:r.getSlide())||null}static show(r=[],m={}){return new Oe(r,m)}static next(){let r=Oe.getInstance();r&&r.next()}static prev(){let r=Oe.getInstance();r&&r.prev()}static close(r=!0,...m){if(r)for(let r of e6.values())r.close(...m);else{let r=Oe.getInstance();r&&r.close(...m)}}};Object.defineProperty(Oe,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.36"}
1),Object.defineProperty(Oe,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:ec}),Object.defineProperty(Oe,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:{Hash:class extends _{onReady(){eu=!1}onChange(r){ef&&clearTimeout(ef);let{hash:m}=pt(),{hash:v}=ft(),b=r.isOpeningSlide(r.getSlide());b&&(ed=v===m?"":v),m&&m!==v&&(ef=setTimeout(()=>{try{if(r.state===w.Ready){let r="replaceState";b&&!ep&&(r="pushState",ep=!0),window.history[r]({},document.title,window.location.pathname+window.location.search+m)}}catch(r){}},300))}onClose(r){if(ef&&clearTimeout(ef),!eu&&ep)return ep=!1,eu=!1,void window.history.back();if(!eu)try{window.history.replaceState({},document.title,window.location.pathname+window.location.search+(ed||""))}catch(r){}}attach(){let r=this.instance;r.on("ready",this.onReady),r.on(["Carousel.ready","Carousel.change"],this.onChange),r.on("close",this.onClose)}detach(){let r=this.instance;r.off("ready",this.onReady),r.off(["Carousel.ready","Carousel.change"],this.onChange),r.off("close",this.onClose)}static parseURL(){return ft()}static startFromUrl(){gt()}static destroy(){window.removeEventListener("hashchange",vt,!1)}},Html:Lt,Images:wt,Slideshow:Dt,Thumbs:Yt,Toolbar:Qt}}),Object.defineProperty(Oe,"openers",{enumerable:!0,configurable:!0,writable:!0,value:new Map})},27699:function(){}}]);

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.