PageSourceSearch

https://www.hardisty.ca/public/js/min/scripts-min.js?v=687270

js hardisty.ca collected 2026-09-25 07:35:37 UTC 204,698 bytes, 7 lines download raw bytes

1function escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function isEmpty(e){return null==e||e.hasOwnProperty("length")&&0===e.length||e.constructor===Object&&0===Object.keys(e).length}function setCookie(e,t,i,s,o){Number.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},Number.isInteger(i)||(i=0),Number.isInteger(s)||(s=0),Number.isInteger(o)||(o=0);var n="";if(i||s||o){var a=new Date;a.setTime(a.getTime()+24*i*60*60*1e3+60*s*60*1e3+60*o*1e3),n="expires="+a.toUTCString()}document.cookie=e+"="+t+"; "+n}function getCookie(e){for(var t=e+"=",i=document.cookie.split(";"),s=0;s<i.length;s++){for(var o=i[s];" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return!1}function checkCookie(e,t){var i=getCookie(e);return!1!==i&&void 0!==typeof t?i===t:!1!==i}!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).window=e.window||{})}(this,(function(e){"use strict";const t=(e,t=1e4)=>(e=parseFloat(e+"")||0,Math.round((e+Number.EPSILON)*t)/t),i=function(e){if(!(e&&e instanceof Element&&e.offsetParent))return!1;const t=e.scrollHeight>e.clientHeight,i=window.getComputedStyle(e).overflowY,s=-1!==i.indexOf("hidden"),o=-1!==i.indexOf("visible");return t&&!s&&!o},s=function(e,t=void 0){return!(!e||e===document.body||t&&e===t)&&(i(e)?e:s(e.parentElement,t))},o=function(e){var t=(new DOMParser).parseFromString(e,"text/html").body;if(t.childElementCount>1){for(var i=document.createElement("div");t.firstChild;)i.appendChild(t.firstChild);return i}return t.firstChild},n=e=>`${e||""}`.split(" ").filter((e=>!!e)),a=(e,t,i)=>{e&&n(t).forEach((t=>{e.classList.toggle(t,i||!1)}))};class r{constructor(e){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=e,this.pageX=e.pageX,this.pageY=e.pageY,this.clientX=e.clientX,this.clientY=e.clientY,this.id=self.Touch&&e instanceof Touch?e.identifier:-1,this.time=Date.now()}}const l={passive:!1};class c{constructor(e,{start:t=()=>!0,move:i=()=>{},end:s=()=>{}}){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=e,this.startCallback=t,this.moveCallback=i,this.endCallback=s;for(const e of["onPointerStart","onTouchStart","onMove","onTouchEnd","onPointerEnd","onWindowBlur"])this[e]=this[e].bind(this);this.element.addEventListener("mousedown",this.onPointerStart,l),this.element.addEventListener("touchstart",this.onTouchStart,l),this.element.addEventListener("touchmove",this.onMove,l),this.element.addEventListener("touchend",this.onTouchEnd),this.element.addEventListener("touchcancel",this.onTouchEnd)}onPointerStart(e){if(!e.buttons||0!==e.button)return;const t=new r(e);this.currentPointers.some((e=>e.id===t.id))||this.triggerPointerStart(t,e)&&(window.addEventListener("mousemove",this.onMove),window.addEventListener("mouseup",this.onPointerEnd),window.addEventListener("blur",this.onWindowBlur))}onTouchStart(e){for(const t of Array.from(e.changedTouches||[]))this.triggerPointerStart(new r(t),e);window.addEventListener("blur",this.onWindowBlur)}onMove(e){const t=this.currentPointers.slice(),i="changedTouches"in e?Array.from(e.changedTouches||[]).map((e=>new r(e))):[new r(e)],s=[];for(const e of i){const t=this.currentPointers.findIndex((t=>t.id===e.id));t<0||(s.push(e),this.currentPointers[t]=e)}s.length&&this.moveCallback(e,this.currentPointers.slice(),t)}onPointerEnd(e){e.buttons>0&&0!==e.button||(this.triggerPointerEnd(e,new r(e)),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseup",this.onPointerEnd),window.removeEventListener("blur",this.onWindowBlur))}onTouchEnd(e){for(const t of Array.from(e.changedTouches||[]))this.triggerPointerEnd(e,new r(t))}triggerPointerStart(e,t){return!!this.startCallback(t,e,this.currentPointers.slice())&&(this.currentPointers.push(e),this.startPointers.push(e),!0)}triggerPointerEnd(e,t){const i=this.currentPointers.findIndex((e=>e.id===t.id));i<0||(this.currentPointers.splice(i,1),this.startPointers.splice(i,1),this.endCallback(e,t,this.currentPointers.slice()))}onWindowBlur(){this.clear()}clear(){for(;this.currentPointers.length;){const e=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:e.clientX,clientY:e.clientY}),e,this.currentPointers.slice())}}stop(){this.element.removeEventListener("mousedown",this.onPointerStart,l),this.element.removeEventListener("touchstart",this.onTouchStart,l),this.element.removeEventListener("touchmove",this.onMove,l),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 d(e,t){return t?Math.sqrt(Math.pow(t.clientX-e.clientX,2)+Math.pow(t.clientY-e.clientY,2)):0}function h(e,t){return t?{clientX:(e.clientX+t.clientX)/2,clientY:(e.clientY+t.clientY)/2}:e}const u=e=>"object"==typeof e&&null!==e&&e.constructor===Object&&"[object Object]"===Object.prototype.toString.call(e),p=(e,...t)=>{const i=t.length;for(let s=0;s<i;s++){const i=t[s]||{};
1Object.entries(i).forEach((([t,i])=>{const s=Array.isArray(i)?[]:{};e[t]||Object.assign(e,{[t]:s}),u(i)?Object.assign(e[t],p(s,i)):Array.isArray(i)?Object.assign(e,{[t]:[...i]}):Object.assign(e,{[t]:i})}))}return e},f=function(e,t){return e.split(".").reduce(((e,t)=>"object"==typeof e?e[t]:void 0),t)};class g{constructor(e={}){Object.defineProperty(this,"options",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"events",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),this.setOptions(e);for(const e of Object.getOwnPropertyNames(Object.getPrototypeOf(this)))e.startsWith("on")&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}setOptions(e){this.options=e?p({},this.constructor.defaults,e):{};for(const[e,t]of Object.entries(this.option("on")||{}))this.on(e,t)}option(e,...t){let i=f(e,this.options);return i&&"function"==typeof i&&(i=i.call(this,this,...t)),i}optionFor(e,t,i,...s){let o=f(t,e);var n;"string"!=typeof(n=o)||isNaN(n)||isNaN(parseFloat(n))||(o=parseFloat(o)),"true"===o&&(o=!0),"false"===o&&(o=!1),o&&"function"==typeof o&&(o=o.call(this,this,e,...s));let a=f(t,this.options);return a&&"function"==typeof a?o=a.call(this,this,e,...s,o):void 0===o&&(o=a),void 0===o?i:o}cn(e){const t=this.options.classes;return t&&t[e]||""}localize(e,t=[]){e=String(e).replace(/\{\{(\w+).?(\w+)?\}\}/g,((e,t,i)=>{let s="";return i?s=this.option(`${t[0]+t.toLowerCase().substring(1)}.l10n.${i}`):t&&(s=this.option(`l10n.${t}`)),s||(s=e),s}));for(let i=0;i<t.length;i++)e=e.split(t[i][0]).join(t[i][1]);return e.replace(/\{\{(.*?)\}\}/g,((e,t)=>t))}on(e,t){let i=[];"string"==typeof e?i=e.split(" "):Array.isArray(e)&&(i=e),this.events||(this.events=new Map),i.forEac
1h((e=>{let i=this.events.get(e);i||(this.events.set(e,[]),i=[]),i.includes(t)||i.push(t),this.events.set(e,i)}))}off(e,t){let i=[];"string"==typeof e?i=e.split(" "):Array.isArray(e)&&(i=e),i.forEach((e=>{const i=this.events.get(e);if(Array.isArray(i)){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}))}emit(e,...t){[...this.events.get(e)||[]].forEach((e=>e(this,...t))),"*"!==e&&this.emit("*",e,...t)}}Object.defineProperty(g,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.36"}),Object.defineProperty(g,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{}});class m extends g{constructor(e={}){super(e),Object.defineProperty(this,"plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}})}attachPlugins(e={}){const t=new Map;for(const[i,s]of Object.entries(e)){const e=this.option(i),o=this.plugins[i];o||!1===e?o&&!1===e&&(o.detach(),delete this.plugins[i]):t.set(i,new s(this,e||{}))}for(const[e,i]of t)this.plugins[e]=i,i.attach()}detachPlugins(e){e=e||Object.keys(this.plugins);for(const t of e){const e=this.plugins[t];e&&e.detach(),delete this.plugins[t]}return this.emit("detachPlugins"),this}}var v;!function(e){e[e.Init=0]="Init",e[e.Error=1]="Error",e[e.Ready=2]="Ready",e[e.Panning=3]="Panning",e[e.Mousemove=4]="Mousemove",e[e.Destroy=5]="Destroy"}(v||(v={}));const b=["a","b","c","d","e","f"],y={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"},w={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:y},S='<circle cx="25" cy="25" r="20"></circle>',C='<div class="f-spinner"><svg viewBox="0 0 50 50">'+S+S+"</svg></div>",k=e=>e&&null!==e&&e instanceof Element&&"nodeType"in e,x=(e,t)=>{e&&n(t).forEach((t=>{e.classList.remove(t)}))},T=(e,t)=>{e&&n(t).forEach((t=>{e.classList.add(t)}))},E={a:1,b:0,c:0,d:1,e:0,f:0},P=1e4,O="mousemove",M="drag",A="content",L="auto";let z=null,j=null;class I extends m{get fits(){return this.contentRect.width-this.contentRect.fitWidth<1&&this.contentRect.height-this.contentRect.fitHeight<1}get isTouchDevice(){return null===j&&(j=window.matchMedia("(hover: none)").matches),j}get isMobile(){return null===z&&(z=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)),z}get panMode(){return this.options.panMode!==O||this.isTouchDevice?M:O}get panOnlyZoomed(){const e=this.options.panOnlyZoomed;return e===L?this.isTouchDevice:e}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(){const{a:e,b:t}=this.current;return Math.sqrt(e*e+t*t)||1}get targetScale(){const{a:e,b:t}=this.target;return Math.sqrt(e*e+t*t)||1}get minScale(){return this.option("minScale")||1}get fullScale(){const{contentRect:e}=this;return e.fullWidth/e.fitWidth||1}get maxScale(){return this.fullScale*(this.option("maxScale")||1)||1}get coverScale(){const{containerRect:e,contentRect:t}=this,i=Math.max(e.height/t.fitHeight,e.width/t.fitWidth)||1;return Math.min(this.fullScale,i)}get isScaling(){return Math.abs(this.targetScale-this.scale)>1e-5&&!this.isResting}get isContentLoading(){const e=this.content;return!!(e&&e instanceof HTMLImageElement)&&!e.complete}get isResting(){if(this.isBouncingX||this.isBouncingY)return!1;for(const e of b){const t="e"==e||"f"===e?1e-4:1e-5;
1if(Math.abs(this.target[e]-this.current[e])>t)return!1}return!(!this.ignoreBounds&&!this.checkBounds().inBounds)}constructor(e,t={},i={}){var s;if(super(t),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:v.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({},E)}),Object.defineProperty(this,"target",{enumerable:!0,configurable:!0,writable:!0,value:Object.assign({},E)}),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}),!e)throw new Error("Container Element Not Found");this.container=e,this.initContent(),this.attachPlugins(Object.assign(Object.assign({},I.Plugins),i)),this.emit("attachPlugins"),this.emit("init");const n=this.content;if(n.addEventListener("load",this.onLoad),n.addEventListener("error",this.onError),this.isContentLoading){if(this.option("spinner")){e.classList.add(this.cn("isLoading"));const t=o(C);!e.contains(n)||n.parentElement instanceof HTMLPictureElement?this.spinner=e.appendChild(t):this.spinner=(null===(s=n.parentElement)||void 0===s?void 0:s.insertBefore(t,n))||null}this.emit("beforeLoad")}else queueMicrotask((()=>{this.enable()}))}initContent(){const{container:e}=this,t=this.cn(A);let i=this.option(A)||e.querySelector(`.${t}`);if(i||(i=e.querySelector("img,picture")||e.firstElementChild,i&&T(i,t)),i instanceof HTMLPictureElement&&(i=i.querySelector("img")),!i)throw new Error("No content found");this.content=i}onLoad(){const{spinner:e,container:t,state:i}=this;e&&(e.remove(),this.spinner=null),this.option("spinner")&&t.classList.remove(this.cn("isLoading")),this.emit
1("afterLoad"),i===v.Init?this.enable():this.updateMetrics()}onError(){this.state!==v.Destroy&&(this.spinner&&(this.spinner.remove(),this.spinner=null),this.stop(),this.detachEvents(),this.state=v.Error,this.emit("error"))}getNextScale(e){const{fullScale:t,targetScale:i,coverScale:s,maxScale:o,minScale:n}=this;let a=n;switch(e){case"toggleMax":a=i-n<.5*(o-n)?o:n;break;case"toggleCover":a=i-n<.5*(s-n)?s:n;break;case"toggleZoom":a=i-n<.5*(t-n)?t:n;break;case"iterateZoom":let e=[1,t,o].sort(((e,t)=>e-t)),r=e.findIndex((e=>e>i+1e-5));a=e[r]||1}return a}attachObserver(){var e;const t=()=>{const{container:e,containerRect:t}=this;return Math.abs(t.width-e.getBoundingClientRect().width)>.1||Math.abs(t.height-e.getBoundingClientRect().height)>.1};this.resizeObserver||void 0===window.ResizeObserver||(this.resizeObserver=new ResizeObserver((()=>{this.updateTimer||(t()?(this.onResize(),this.isMobile&&(this.updateTimer=setTimeout((()=>{t()&&this.onResize(),this.updateTimer=null}),500))):this.updateTimer&&(clearTimeout(this.updateTimer),this.updateTimer=null))}))),null===(e=this.resizeObserver)||void 0===e||e.observe(this.container)}detachObserver(){var e;null===(e=this.resizeObserver)||void 0===e||e.disconnect()}attachEvents(){const{container:e}=this;e.addEventListener("click",this.onClick,{passive:!1,capture:!1}),e.addEventListener("wheel",this.onWheel,{passive:!1}),this.pointerTracker=new c(e,{start:this.onPointerDown,move:this.onPointerMove,end:this.onPointerUp}),document.addEventListener(O,this.onMouseMove)}detachEvents(){var e;const{container:t}=this;t.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),t.removeEventListener("wheel",this.onWheel,{passive:!1}),null===(e=this.pointerTracker)||void 0===e||e.stop(),this.pointerTracker=null,document.removeEventListener(O,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();const e=this.friction,t=this.option("maxVelocity");for(const i of b)e?(this.velocity[i]*=1-e,t&&!this.isScaling&&(this.velocity[i]=Math.max(Math.min(this.velocity[i],t),-1*t)),this.current[i]+=this.velocity[i]):this.current[i]=this.target[i];this.setTransform(),this.setEdgeForce(),!this.isResting||this.isDragging?this.rAF=requestAnimationFrame((()=>this.animate())):this.stop("current")}setTargetForce(){for(const e of b)"e"===e&&this.isBouncingX||"f"===e&&this.isBouncingY||(this.velocity[e]=(1/(1-this.friction)-1)*(this.target[e]-this.current[e]))}checkBounds(e=0,t=0){const{current:i}=this,s=i.e+e,o=i.f+t,n=this.getBounds(),{x:a,y:r}=n,l=a.min,c=a.max,d=r.min,h=r.max;let u=0,p=0;return l!==1/0&&s<l?u=l-s:c!==1/0&&s>c&&(u=c-s),d!==1/0&&o<d?p=d-o:h!==1/0&&o>h&&(p=h-o),Math.abs(u)<1e-4&&(u=0),Math.abs(p)<1e-4&&(p=0),Object.assign(Object.assign({},n),{xDiff:u,yDiff:p,inBounds:!u&&!p})}clampTargetBounds(){const{target:e}=this,{x:t,y:i}=this.getBounds();t.min!==1/0&&(e.e=Math.max(e.e,t.min)),t.max!==1/0&&(e.e=Math.min(e.e,t.max)),i.min!==1/0&&(e.f=Math.max(e.f,i.min)),i.max!==1/0&&(e.f=Math.min(e.f,i.max))}calculateContentDim(e=this.current){const{content:t,contentRect:i}=this,{fitWidth:s,fitHeight:o,fullWidth:n,fullHeight:a}=i;let r=n,l=a;if(this.option("zoom")||0!==this.angle){const i=!(t instanceof HTMLImageElement||"none"!==window.getComputedStyle(t).maxWidth&&"none"!==window.getComputedStyle(t).maxHeight),c=i?n:s,d=i?a:o,h=this.getMatrix(e),u=new DOMPoint(0,0).matrixTransform(h),p=new DOMPoint(0+c,0).matrixTransform(h),f=new DOMPoint(0+c,0+d).matrixTransform(h),g=new DOMPoint(0,0+d).matrixTransform(h),m=Math.abs(f.x-u.x),v=Math.abs(f.y-u.y),b=Math.abs(g.x-p.x),y=Math.abs(g.y-p.y);r=Math.max(m,b),l=Math.max(v,y)}return{contentWidth:r,contentHeight:l}}setEdgeForce(){if(this.ignoreBounds||this.isDragging||this.panMode===O||this.targetScale<this.scale)return this.isBouncingX=!1,void(this.isBouncingY=!1);const{target:e}=this,{x:t,y:i,xDiff:s,yDiff:o}=this.checkBounds(),n=this.option("maxVelocity");let a=this.velocity.e,r=this.velocity.f;0!==s?(this.isBouncingX=!0,s*a<=0?a+=.14*s:(a=.14*s,t.min!==1/0&&(this.target.e=Math.max(e.e,t.min)),t.max!==1/0&&(this.target.e=Math.min(e.e,t.max))),n&&(a=Math.max(Math.min(a,n),-1*n))):this.isBouncingX=!1,0!==o?(this.isBouncingY=!0,o*r<=0?r+=.14*o:(r=.14*o,i.min!==1/0&&(this.target.f=Math.max(e.f,i.min)),i.max!==1/0&&(this.target.f=Math.min(e.f,i.max))),n&&(r=Math.max(Math.min(r,n),-1*n))):this.isBouncingY=!1,this.isBouncingX&&(this.velocity.e=a
1),this.isBouncingY&&(this.velocity.f=r)}enable(){const{content:e}=this,t=new DOMMatrixReadOnly(window.getComputedStyle(e).transform);for(const e of b)this.current[e]=this.target[e]=t[e];this.updateMetrics(),this.attachObserver(),this.attachEvents(),this.state=v.Ready,this.emit("ready")}onClick(e){var t;"click"===e.type&&0===e.detail&&(this.dragOffset.x=0,this.dragOffset.y=0),this.isDragging&&(null===(t=this.pointerTracker)||void 0===t||t.clear(),this.trackingPoints=[],this.startDecelAnim());const i=e.target;if(!i||e.defaultPrevented)return;if(i.hasAttribute("disabled"))return e.preventDefault(),void e.stopPropagation();if((()=>{const e=window.getSelection();return e&&"Range"===e.type})()&&!i.closest("button"))return;const s=i.closest("[data-panzoom-action]"),o=i.closest("[data-panzoom-change]"),n=s||o,a=n&&k(n)?n.dataset:null;if(a){const t=a.panzoomChange,i=a.panzoomAction;if((t||i)&&e.preventDefault(),t){let i={};try{i=JSON.parse(t)}catch(e){console&&console.warn("The given data was not valid JSON")}return void this.applyChange(i)}if(i)return void(this[i]&&this[i]())}if(Math.abs(this.dragOffset.x)>3||Math.abs(this.dragOffset.y)>3)return e.preventDefault(),void e.stopPropagation();if(i.closest("[data-fancybox]"))return;const r=this.content.getBoundingClientRect(),l=this.dragStart;if(l.time&&!this.canZoomOut()&&(Math.abs(r.x-l.x)>2||Math.abs(r.y-l.y)>2))return;this.dragStart.time=0;const c=t=>{this.option("zoom",e)&&t&&"string"==typeof t&&/(iterateZoom)|(toggle(Zoom|Full|Cover|Max)|(zoomTo(Fit|Cover|Max)))/.test(t)&&"function"==typeof this[t]&&(e.preventDefault(),this[t]({event:e}))},d=this.option("click",e),h=this.option("dblClick",e);h?(this.clicks++,1==this.clicks&&(this.clickTimer=setTimeout((()=>{1===this.clicks?(this.emit("click",e),!e.defaultPrevented&&d&&c(d)):(this.emit("dblClick",e),e.defaultPrevented||c(h)),this.clicks=0,this.clickTimer=null}),350))):(this.emit("click",e),!e.defaultPrevented&&d&&c(d))}addTrackingPoint(e){const t=this.trackingPoints.filter((e=>e.time>Date.now()-100));t.push(e),this.trackingPoints=t}onPointerDown(e,t,i){var s;if(!1===this.option("touch",e))return!1;this.pwt=0,this.dragOffset={x:0,y:0,time:0},this.trackingPoints=[];const o=this.content.getBoundingClientRect();if(this.dragStart={x:o.x,y:o.y,top:o.top,left:o.left,time:Date.now()},this.clickTimer)return!1;if(this.panMode===O&&this.targetScale>1)return e.preventDefault(),e.stopPropagation(),!1;const n=e.composedPath()[0];if(!i.length){if(["TEXTAREA","OPTION","INPUT","SELECT","VIDEO","IFRAME"].includes(n.nodeName)||n.closest("[contenteditable],[data-selectable],[data-draggable],[data-clickable],[data-panzoom-change],[data-panzoom-action]"))return!1;null===(s=window.getSelection())||void 0===s||s.removeAllRanges()}if("mousedown"===e.type)["A","BUTTON"].includes(n.nodeName)||e.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(t),this.emit("touchStart",e)),!0}onPointerMove(e,i,o){if(!1===this.option("touch",e))return;if(!this.isDragging)return;if(i.length<2&&this.panOnlyZoomed&&t(this.targetScale)<=t(this.minScale))return;if(this.emit("touchMove",e),e.defaultPrevented)return;this.addTrackingPoint(i[0]);const{content:n}=this,a=h(o[0],o[1]),r=h(i[0],i[1]);let l=0,c=0;if(i.length>1){const e=n.getBoundingClientRect();l=a.clientX-e.left-.5*e.width,c=a.clientY-e.top-.5*e.height}const u=d(o[0],o[1]),p=d(i[0],i[1]);let f=u?p/u:1,g=r.clientX-a.clientX,m=r.clientY-a.clientY;this.dragOffset.x+=g,this.dragOffset.y+=m,this.dragOffset.time=Date.now()-this.dragStart.time;let v=t(this.targetScale)===t(this.minScale)&&this.option("lockAxis");if(v&&!this.lockedAxis)if("xy"===v||"y"===v||"touchmove"===e.type){if(Math.abs(this.dragOffset.x)<6&&Math.abs(this.dragOffset.y)<6)return void e.preventDefault();const t=Math.abs(180*Math.atan2(this.dragOffset.y,this.dragOffset.x)/Math.PI);this.lockedAxis=t>45&&t<135?"y":"x",this.dragOffset.x=0,this.dragOffset.y=0,g=0,m=0}else this.lockedAxis=v;if(s(e.target,this.content)&&(v="x",this.dragOffset.y=0),v&&"xy"!==v&&this.lockedAxis!==v&&t(this.targetScale)===t(this.minScale))return;e.cancelable&&e.preventDefault(),this.container.classList.add(this.cn("isDragging"));const b=this.checkBounds(g,m);this.option("rubberband")?("x"!==this.isInfinite&&(b.xDiff>0&&g<0||b.xDiff<0&&g>0)&&(g*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitWidth*b.xDiff))),"y"!==this.isInfinite&&(b.yDiff>0&&m<0||b.yDiff<0&&m>0)&&(m*=Math.max(0,.5-Math.abs(.75/this.contentRect.fitHeight*b.yDiff)))):(b.xDiff&&(g=0),b.yDiff&&(m=0));const y=this.targetScale,w=this.minScale,S=this.maxScale;y<.5*w&&(f=Math.max(f,w)),y>1.5*S&&(f=Math.min(f,S)),"y"===this.lockedAxis&&t(y)===t(w)&&(g=0),"x"===this.lockedAxis&&t(y)===t(w)&&(m=0),this.applyChange({originX:l,originY:c,panX:g,panY:m,scale:f,friction:this.option("dragFriction"),ignoreBounds:!0})}onPointerUp(e,t,i){if(i.length)return this.dragOffset.x=0,this.dragOffset.y=0,void(this.trackingPoints=[]);this.container.classList.remove(this.cn("isDragging")),this.isDragging&&(this.addTrackingPoint(t),this.panOnlyZoomed&&this.contentRect.width-this.contentRect.fitWidth<1&&this.contentRect.height-this.contentRect.fitHeight<1&&(this.trackingPoints=[]),s(e.target,this.content)&&"y"===this.lockedAxis&&(this.trackingPoints=[]),this.emit
1("touchEnd",e),this.isDragging=!1,this.lockedAxis=!1,this.state!==v.Destroy&&(e.defaultPrevented||this.startDecelAnim()))}startDecelAnim(){var e;const i=this.isScaling;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1;for(const e of b)this.velocity[e]=0;this.target.e=this.current.e,this.target.f=this.current.f,x(this.container,"is-scaling"),x(this.container,"is-animating"),this.isTicking=!1;const{trackingPoints:s}=this,o=s[0],n=s[s.length-1];let a=0,r=0,l=0;n&&o&&(a=n.clientX-o.clientX,r=n.clientY-o.clientY,l=n.time-o.time);const c=(null===(e=window.visualViewport)||void 0===e?void 0:e.scale)||1;1!==c&&(a*=c,r*=c);let d=0,h=0,u=0,p=0,f=this.option("decelFriction");const g=this.targetScale;if(l>0){u=Math.abs(a)>3?a/(l/30):0,p=Math.abs(r)>3?r/(l/30):0;const e=this.option("maxVelocity");e&&(u=Math.max(Math.min(u,e),-1*e),p=Math.max(Math.min(p,e),-1*e))}u&&(d=u/(1/(1-f)-1)),p&&(h=p/(1/(1-f)-1)),("y"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"y"===this.lockedAxis&&t(g)===this.minScale)&&(d=u=0),("x"===this.option("lockAxis")||"xy"===this.option("lockAxis")&&"x"===this.lockedAxis&&t(g)===this.minScale)&&(h=p=0);const m=this.dragOffset.x,v=this.dragOffset.y,y=this.option("dragMinThreshold")||0;Math.abs(m)<y&&Math.abs(v)<y&&(d=h=0,u=p=0),(this.option("zoom")&&(g<this.minScale-1e-5||g>this.maxScale+1e-5)||i&&!d&&!h)&&(f=.35),this.applyChange({panX:d,panY:h,friction:f}),this.emit("decel",u,p,m,v)}onWheel(e){var t=[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce((function(e,t){return Math.abs(t)>Math.abs(e)?t:e}));const i=Math.max(-1,Math.min(1,t));if(this.emit("wheel",e,i),this.panMode===O)return;if(e.defaultPrevented)return;const s=this.option("wheel");"pan"===s?(e.preventDefault(),this.panOnlyZoomed&&!this.canZoomOut()||this.applyChange({panX:2*-e.deltaX,panY:2*-e.deltaY,bounce:!1})):"zoom"===s&&!1!==this.option("zoom")&&this.zoomWithWheel(e)}onMouseMove(e){this.panWithMouse(e)}onKeydown(e){"Escape"===e.key&&this.toggleFS()}onResize(){this.updateMetrics(),this.checkBounds().inBounds||this.requestTick()}setTransform(){this.emit("beforeTransform");const{current:e,target:i,content:s,contentRect:o}=this,n=Object.assign({},E);for(const s of b){const o="e"==s||"f"===s?P:1e5;n[s]=t(e[s],o),Math.abs(i[s]-e[s])<("e"==s||"f"===s?.51:.001)&&(e[s]=i[s])}let{a:a,b:r,c:l,d:c,e:d,f:h}=n,u=`matrix(${a}, ${r}, ${l}, ${c}, ${d}, ${h})`,p=s.parentElement instanceof HTMLPictureElement?s.parentElement:s;if(this.option("transformParent")&&(p=p.parentElement||p),p.style.transform===u)return;p.style.transform=u;const{contentWidth:f,contentHeight:g}=this.calculateContentDim();o.width=f,o.height=g,this.emit("afterTransform")}updateMetrics(e=!1){var i;if(!this||this.state===v.Destroy)return;if(this.isContentLoading)return;const s=Math.max(1,(null===(i=window.visualViewport)||void 0===i?void 0:i.scale)||1),{container:o,content:n}=this,a=n instanceof HTMLImageElement,r=o.getBoundingClientRect(),l=getComputedStyle(this.container);let c=r.width*s,d=r.height*s;const h=parseFloat(l.paddingTop)+parseFloat(l.paddingBottom),u=c-(parseFloat(l.paddingLeft)+parseFloat(l.paddingRight)),p=d-h;this.containerRect={width:c,height:d,innerWidth:u,innerHeight:p};const f=parseFloat(n.dataset.width||"")||(e=>{let t=0;return t=e instanceof HTMLImageElement?e.naturalWidth:e instanceof SVGElement?e.width.baseVal.value:Math.max(e.offsetWidth,e.scrollWidth),t||0})(n),g=parseFloat(n.dataset.height||"")||(e=>{let t=0;return t=e instanceof HTMLImageElement?e.naturalHeight:e instanceof SVGElement?e.height.baseVal.value:Math.max(e.offsetHeight,e.scrollHeight),t||0})(n);let m=this.option("width",f)||L,b=this.option("height",g)||L;const y=m===L,w=b===L;"number"!=typeof m&&(m=f),"number"!=typeof b&&(b=g),y&&(m=f*(b/g)),w&&(b=g/(f/m));let S=n.parentElement instanceof HTMLPictureElement?n.parentElement:n;this.option("transformParent")&&(S=S.parentElement||S);const C=S.getAttribute("style")||"";S.style.setProperty("transform","none","important"),a&&(S.style.width="",S.style.height=""),S.offsetHeight;const k=n.getBoundingClientRect();let x=k.width*s,T=k.height*s,E=x,P=T;x=Math.min(x,m),T=Math.min(T,b),a?({width:x,height:T}=((e,t,i,s)=>{const o=i/e,n=s/t,a=Math.min(o,n);return{width:e*=a,height:t*=a}})(m,b,x,T)):(x=Math.min(x,m),T=Math.min(T,b));let O=.5*(P-T),M=.5*(E-x);this.contentRect=Object.assign(Object.assign({},this.contentRect),{top:k.top-r.top+O,bottom:r.bottom-k.bottom+O,left:k.left-r.left+M,right:r.right-k.right+M,fitWidth:x,fitHeight:T,width:x,height:T,fullWidth:m,fullHeight:b}),S.style.cssText=C,a&&(S.style.width=`${x}px`,S.style.height=`${T}
1px`),this.setTransform(),!0!==e&&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===v.Init||this.checkBounds().inBounds||this.requestTick()),this.updateControls()}calculateBounds(){const{contentWidth:e,contentHeight:i}=this.calculateContentDim(this.target),{targetScale:s,lockedAxis:o}=this,{fitWidth:n,fitHeight:a}=this.contentRect;let r=0,l=0,c=0,d=0;const h=this.option("infinite");if(!0===h||o&&h===o)r=-1/0,c=1/0,l=-1/0,d=1/0;else{let{containerRect:o,contentRect:h}=this,u=t(n*s,P),p=t(a*s,P),{innerWidth:f,innerHeight:g}=o;if(o.width===u&&(f=o.width),o.width===p&&(g=o.height),e>f){c=.5*(e-f),r=-1*c
2;let t=.5*(h.right-h.left);r+=t,c+=t}if(n>f&&e<f&&(r-=.5*(n-f),c-=.5*(n-f)),i>g){d=.5*(i-g),l=-1*d;let e=.5*(h.bottom-h.top);l+=e,d+=e}a>g&&i<g&&(r-=.5*(a-g),c-=.5*(a-g))}return{x:{min:r,max:c},y:{min:l,max:d}}}getBounds(){const e=this.option("bounds");return e!==L?e:this.calculateBounds()}updateControls(){const e=this,i=e.container,{panMode:s,contentRect:o,targetScale:n,minScale:r}=e;let l=r,c=e.option("click")||!1;c&&(l=e.getNextScale(c));let d=e.canZoomIn(),h=e.canZoomOut(),u=s===M&&!!this.option("touch"),p=h&&u;if(u&&(t(n)<t(r)&&!this.panOnlyZoomed&&(p=!0),(t(o.width,1)>t(o.fitWidth,1)||t(o.height,1)>t(o.fitHeight,1))&&(p=!0)),t(o.width*n,1)<t(o.fitWidth,1)&&(p=!1),s===O&&(p=!1),a(i,this.cn("isDraggable"),p),!this.option("zoom"))return;let f=d&&t(l)>t(n),g=!f&&!p&&h&&t(l)<t(n);a(i,this.cn("canZoomIn"),f),a(i,this.cn("canZoomOut"),g);for(const e of i.querySelectorAll("[data-panzoom-action]")){let t=!1,i=!1;switch(e.dataset.panzoomAction){case"zoomIn":d?t=!0:i=!0;break;case"zoomOut":h?t=!0:i=!0;break;case"toggleZoom":case"iterateZoom":d||h?t=!0:i=!0;const s=e.querySelector("g");s&&(s.style.display=d?"":"none")}t?(e.removeAttribute("disabled"),e.removeAttribute("tabindex")):i&&(e.setAttribute("disabled",""),e.setAttribute("tabindex","-1"))}}panTo({x:e=this.target.e,y:t=this.target.f,scale:i=this.targetScale,friction:s=this.option("friction"),angle:o=0,originX:n=0,originY:a=0,flipX:r=!1,flipY:l=!1,ignoreBounds:c=!1}){this.state!==v.Destroy&&this.applyChange({panX:e-this.target.e,panY:t-this.target.f,scale:i/this.targetScale,angle:o,originX:n,originY:a,friction:s,flipX:r,flipY:l,ignoreBounds:c})}applyChange({panX:e=0,panY:i=0,scale:s=1,angle:o=0,originX:n=-this.current.e,originY:a=-this.current.f,friction:r=this.option("friction"),flipX:l=!1,flipY:c=!1,ignoreBounds:d=!1,bounce:h=this.option("bounce")}){const u=this.state;if(u===v.Destroy)return;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.friction=r||0,this.ignoreBounds=d;const{current:p}=this,f=p.e,g=p.f,m=this.getMatrix(this.target);let y=(new DOMMatrix).translate(f,g).translate(n,a).translate(e,i);if(this.option("zoom")){if(!d){const e=this.targetScale,t=this.minScale,i=this.maxScale;e*s<t&&(s=t/e),e*s>i&&(s=i/e)}y=y.scale(s)}y=y.translate(-n,-a).translate(-f,-g).multiply(m),o&&(y=y.rotate(o)),l&&(y=y.scale(-1,1)),c&&(y=y.scale(1,-1));for(const e of b)"e"!==e&&"f"!==e&&(y[e]>this.minScale+1e-5||y[e]<this.minScale-1e-5)?this.target[e]=y[e]:this.target[e]=t(y[e],P);(this.targetScale<this.scale||Math.abs(s-1)>.1||this.panMode===O||!1===h)&&!d&&this.clampTargetBounds(),u===v.Init?this.animate():this.isResting||(this.state=v.Panning,this.requestTick())}stop(e=!1){if(this.state===v.Init||this.state===v.Destroy)return;const t=this.isTicking;this.rAF&&(cancelAnimationFrame(this.rAF),this.rAF=null),this.isBouncingX=!1,this.isBouncingY=!1;for(const t of b)this.velocity[t]=0,"current"===e?this.current[t]=this.target[t]:"target"===e&&(this.target[t]=this.current[t]);this.setTransform(),x(this.container,"is-scaling"),x(this.container,"is-animating"),this.isTicking=!1,this.state=v.Ready,t&&(this.emit
2("endAnimation"),this.updateControls())}requestTick(){this.isTicking||(this.emit("startAnimation"),this.updateControls(),T(this.container,"is-animating"),this.isScaling&&T(this.container,"is-scaling")),this.isTicking=!0,this.rAF||(this.rAF=requestAnimationFrame((()=>this.animate())))}panWithMouse(e,i=this.option("mouseMoveFriction")){if(this.pmme=e,this.panMode!==O||!e)return;if(t(this.targetScale)<=t(this.minScale))return;this.emit("mouseMove",e);const{container:s,containerRect:o,contentRect:n}=this,a=o.width,r=o.height,l=s.getBoundingClientRect(),c=(e.clientX||0)-l.left,d=(e.clientY||0)-l.top;let{contentWidth:h,contentHeight:u}=this.calculateContentDim(this.target);const p=this.option("mouseMoveFactor");p>1&&(h!==a&&(h*=p),u!==r&&(u*=p));let f=.5*(h-a)-c/a*100/100*(h-a);f+=.5*(n.right-n.left);let g=.5*(u-r)-d/r*100/100*(u-r);g+=.5*(n.bottom-n.top),this.applyChange({panX:f-this.target.e,panY:g-this.target.f,friction:i})}zoomWithWheel(e){if(this.state===v.Destroy||this.state===v.Init)return;const i=Date.now();if(i-this.pwt<45)return void e.preventDefault();this.pwt=i;var s=[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce((function(e,t){return Math.abs(t)>Math.abs(e)?t:e}));const o=Math.max(-1,Math.min(1,s)),{targetScale:n,maxScale:a,minScale:r}=this;let l=n*(100+45*o)/100;t(l)<t(r)&&t(n)<=t(r)?(this.cwd+=Math.abs(o),l=r):t(l)>t(a)&&t(n)>=t(a)?(this.cwd+=Math.abs(o),l=a):(this.cwd=0,l=Math.max(Math.min(l,a),r)),this.cwd>this.option("wheelLimit")||(e.preventDefault(),t(l)!==t(n)&&this.zoomTo(l,{event:e}))}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(e=1.25,t){this.zoomTo(this.targetScale*e,t)}zoomOut(e=.8,t){this.zoomTo(this.targetScale*e,t)}zoomToFit(e){this.zoomTo("fit",e)}zoomToCover(e){this.zoomTo("cover",e)}zoomToFull(e){this.zoomTo("full",e)}zoomToMax(e){this.zoomTo("max",e)}toggleZoom(e){this.zoomTo(this.getNextScale("toggleZoom"),e)}toggleMax(e){this.zoomTo(this.getNextScale("toggleMax"),e)}toggleCover(e){this.zoomTo(this.getNextScale("toggleCover"),e)}iterateZoom(e){this.zoomTo("next",e)}zoomTo(e=1,{friction:t=L,originX:i=L,originY:s=L,event:o}={}){if(this.isContentLoading||this.state===v.Destroy)return;const{targetScale:n,fullScale:a,maxScale:r,coverScale:l}=this;if(this.stop(),this.panMode===O&&(o=this.pmme||o),o||i===L||s===L){const e=this.content.getBoundingClientRect(),t=this.container.getBoundingClientRect(),n=o?o.clientX:t.left+.5*t.width,a=o?o.clientY:t.top+.5*t.height;i=n-e.left-.5*e.width,s=a-e.top-.5*e.height}let c=1;"number"==typeof e?c=e:"full"===e?c=a:"cover"===e?c=l:"max"===e?c=r:"fit"===e?c=1:"next"===e&&(c=this.getNextScale("iterateZoom")),c=c/n||1,t=t===L?c>1?.15:.25:t,this.applyChange({scale:c,originX:i,originY:s,friction:t}),o&&this.panMode===O&&this.panWithMouse(o,t)}rotateCCW(){this.applyChange({angle:-90})}rotateCW(){this.applyChange({angle:90})}flipX(){this.applyChange({flipX:!0})}flipY(){this.applyChange({flipY:!0})}fitX(){this.stop("target");const{containerRect:e,contentRect:t,target:i}=this;this.applyChange({panX:.5*e.width-(t.left+.5*t.fitWidth)-i.e,panY:.5*e.height-(t.top+.5*t.fitHeight)-i.f,scale:e.width/t.fitWidth/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}fitY(){this.stop("target");const{containerRect:e,contentRect:t,target:i}=this;this.applyChange({panX:.5*e.width-(t.left+.5*t.fitWidth)-i.e,panY:.5*e.innerHeight-(t.top+.5*t.fitHeight)-i.f,scale:e.height/t.fitHeight/this.targetScale,originX:0,originY:0,ignoreBounds:!0})}toggleFS(){const{container:e}=this,t=this.cn("inFullscreen"),i=this.cn("htmlHasFullscreen");e.classList.toggle(t);const s=e.classList.contains(t);s?(document.documentElement.classList.add(i),document.addEventListener("keydown",this.onKeydown,!0)):(document.documentElement.classList.remove(i),document.removeEventListener("keydown",this.onKeydown,!0)),this.updateMetrics(),this.emit(s?"enterFS":"exitFS")}getMatrix(e=this.current){const{a:t,b:i,c:s,d:o,e:n,f:a}=e;return new DOMMatrix([t,i,s,o,n,a])}reset(e){if(this.state!==v.Init&&this.state!==v.Destroy){this.stop("current");for(const e of b)this.target[e]=E[e];this.target.a=this.minScale,this.target.d=this.minScale,this.clampTargetBounds(),this.isResting||(this.friction=void 0===e?this.option("friction"):e,this.state=v.Panning,this.requestTick())}}
2destroy(){this.stop(),this.state=v.Destroy,this.detachEvents(),this.detachObserver();const{container:e,content:t}=this,i=this.option("classes")||{};for(const t of Object.values(i))e.classList.remove(t+"");t&&(t.removeEventListener("load",this.onLoad),t.removeEventListener("error",this.onError)),this.detachPlugins()}}Object.defineProperty(I,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:w}),Object.defineProperty(I,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:{}});const R=function(e,t){let i=!0;return(...s)=>{i&&(i=!1,e(...s),setTimeout((()=>{i=!0}),t))}},D=(e,t)=>{let i=[];return e.childNodes.forEach((e=>{e.nodeType!==Node.ELEMENT_NODE||t&&!e.matches(t)||i.push(e)})),i};var F;!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Destroy=2]="Destroy"}(F||(F={}));const _=e=>{if("string"==typeof e||e instanceof HTMLElement)e={html:e};else{const t=e.thumb;void 0!==t&&("string"==typeof t&&(e.thumbSrc=t),t instanceof HTMLImageElement&&(e.thumbEl=t,e.thumbElSrc=t.src,e.thumbSrc=t.src),delete e.thumb)}return Object.assign({html:"",el:null,isDom:!1,class:"",customClass:"",index:-1,dim:0,gap:0,pos:0,transition:!1},e)},H=(e={})=>Object.assign({index:-1,slides:[],dim:0,pos:-1},e);class $ extends g{constructor(e,t){super(t),Object.defineProperty(this,"instance",{enumerable:!0,configurable:!0,writable:!0,value:e})}attach(){}detach(){}}class N 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 e=this.list;if(!e){e=document.createElement("ul"),T(e,this.cn("list")),e.setAttribute("role","tablist");const t=this.instance.container;t.appendChild(e),T(t,this.cn("hasDots")),this.list=e}return e}refresh(){var e;const t=this.instance.pages.length,i=Math.min(2,this.option("minCount")),s=Math.max(2e3,this.option("maxCount")),o=this.option("dynamicFrom");if(t<i||t>s)return void this.cleanup();const n="number"==typeof o&&t>5&&t>=o,r=!this.list||this.isDynamic!==n||this.list.children.length!==t;r&&this.cleanup();const l=this.build();if(a(l,this.cn("isDynamic"),!!n),r)for(let e=0;e<t;e++)l.append(this.createItem(e));let c,d=0;for(const t of[...l.children]){const i=d===this.instance.page;i&&(c=t),a(t,this.cn("isCurrent"),i),null===(e=t.children[0])||void 0===e||e.setAttribute("aria-selected",i?"true":"false");for(const e of["isBeforePrev","isPrev","isNext","isAfterNext"])x(t,this.cn(e));d++}if(c=c||l.firstChild,n&&c){const e=c.previousElementSibling,t=e&&e.previousElementSibling;T(e,this.cn("isPrev")),T(t,this.cn("isBeforePrev"));const i=c.nextElementSibling,s=i&&i.nextElementSibling;T(i,this.cn("isNext")),T(s,this.cn("isAfterNext"))}this.isDynamic=n}createItem(e=0){var t;const i=document.createElement("li");i.setAttribute("role","presentation");const s=o(this.instance.localize(this.option("dotTpl"),[["%d",e+1]]).replace(/\%i/g,e+""));return i.appendChild(s),null===(t=i.children[0])||void 0===t||t.setAttribute("role","tab"),i}cleanup(){this.list&&(this.list.remove(),this.list=null),this.isDynamic=!1,x(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(N,"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}});const q="disabled",B="next",W="prev";class X 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(){const e=this.instance,t=e.pages.length,i=e.page;if(t<2)return void this.cleanup();this.build();let s=this.prev,o=this.next;s&&o&&(s.removeAttribute(q),o.removeAttribute(q),e.isInfinite||(i<=0&&s.setAttribute(q,""),i>=t-1&&o.setAttribute(q,"")))}addBtn(e){var t;const i=this.instance,s=document.createElement("button");s.setAttribute("tabindex","0"),s.setAttribute("title",i.localize(`{{${e.toUpperCase()}}}`)),T(s,this.cn("button")+" "+this.cn(e===B?"isNext":"isPrev"));const o=i.isRTL?e===B?W:B:e;var n;return s.innerHTML=i.localize(this.option(`${o}Tpl`)),s.dataset[`carousel${n=e,n?n.match("^[a-z]")?n.charAt(0).toUpperCase()+n.substring(1):n:""}`]="true",null===(t=this.container)||void 0===t||t.appendChild(s),s}build(){const e=this.instance.container,t=this.cn("container");let{container:i,prev:s,next:o}=this;i||(i=e.querySelector("."+t),this.isDom=!!i),i||(i=document.createElement("div"),T(i,t),e.appendChild(i)),this.container=i,o||(o=i.querySelector("[data-carousel-next]")),o||(o=this.addBtn(B)),this.next=o,s||(s=i.querySelector("[data-carousel-prev]")),s||(s=this.addBtn(W)),this.prev=s}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(X,"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>
2',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>'}});class Y 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(e){this.target=this.instance,this.nav=e,this.attachEvents()}addAsNavFor(e){this.nav=this.instance,this.target=e,this.attachEvents()}attachEvents(){const{nav:e,target:t}=this;e&&t&&(e.options.initialSlide=t.options.initialPage,e.state===F.Ready?this.onNavReady(e):e.on("ready",this.onNavReady),t.state===F.Ready?this.onTargetReady(t):t.on("ready",this.onTargetReady))}onNavReady(e){e.on("createSlide",this.onNavCreateSlide),e.on("Panzoom.click",this.onNavClick),e.on("Panzoom.touchEnd",this.onNavTouch),this.onTargetChange()}onTargetReady(e){e.on("change",this.onTargetChange),e.on("Panzoom.refresh",this.onTargetChange),this.onTargetChange()}onNavClick(e,t,i){this.onNavTouch(e,e.panzoom,i)}onNavTouch(e,t,i){var s,o;if(Math.abs(t.dragOffset.x)>3||Math.abs(t.dragOffset.y)>3)return;const n=i.target,{nav:a,target:r}=this;if(!a||!r||!n)return;const l=n.closest("[data-index]");if(i.stopPropagation(),i.preventDefault(),!l)return;const c=parseInt(l.dataset.index||"",10)||0,d=r.getPageForSlide(c),h=a.getPageForSlide(c);a.slideTo(h),r.slideTo(d,{friction:(null===(o=null===(s=this.nav)||void 0===s?void 0:s.plugins)||void 0===o?void 0:o.Sync.option("friction"))||0}),this.markSelectedSlide(c)}onNavCreateSlide(e,t){t.index===this.selectedIndex&&this.markSelectedSlide(t.index)}onTargetChange(){var e,t;const{target:i,nav:s}=this;if(!i||!s)return;if(s.state!==F.Ready||i.state!==F.Ready)return;const o=null===(t=null===(e=i.pages[i.page])||void 0===e?void 0:e.slides[0])||void 0===t?void 0:t.index,n=s.getPageForSlide(o);this.markSelectedSlide(o),s.slideTo(n,null===s.prevPage&&null===i.prevPage?{friction:0}:void 0)}markSelectedSlide(e){const t=this.nav;t&&t.state===F.Ready&&(this.selectedIndex=e,[...t.slides].map((t=>{t.el&&t.el.classList[t.index===e?"add":"remove"]("is-nav-selected")})))}attach(){const e=this;let t=e.options.target,i=e.options.nav;t?e.addAsNavFor(t):i&&e.addAsTargetFor(i)}detach(){const e=this,t=e.nav,i=e.target;t&&(t.off("ready",e.onNavReady),t.off("createSlide",e.onNavCreateSlide),t.off("Panzoom.click",e.onNavClick),t.off("Panzoom.touchEnd",e.onNavTouch)),e.nav=null,i&&(i.off("ready",e.onTargetReady),i.off("refresh",e.onTargetChange),i.off("change",e.onTargetChange)),e.target=null}}Object.defineProperty(Y,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{friction:.35}});const U={Navigation:X,Dots:N,Sync:Y},V="animationend",Z="isSelected",G="slide";class K extends m{get axis(){return this.isHorizontal?"e":"f"}get isEnabled(){return this.state===F.Ready}get isInfinite(){let e=!1;const{contentDim:t,viewportDim:i,pages:s,slides:o}=this,n=o[0];return s.length>=2&&n&&t+n.dim>=i&&(e=this.option("infinite")),e}get isRTL(){return"rtl"===this.option("direction")}get isHorizontal(){return"x"===this.option("axis")}constructor(e,t={},i={}){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:F.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 e&&(e=document.querySelector(e)),!e||!k(e))throw new Error("No Element found");this.container=e,this.slideNext=R(this.slideNext.bind(this),150),this.slidePrev=R(this.slidePrev.bind(this),150),this.userOptions=t,this.userPlugins=i,queueMicrotask((()=>{this.processOptions()}))}processOptions(){var e,t;const i=p({},K.defaults,this.userOptions);let s="";const o=i.breakpoints;if(o&&u(o))for(const[e,t]of Object.entries(o))window.matchMedia(e).matches&&u(t)&&(s+=e,p(i,t));s===this.bp&&this.state!==F.Init||(this.bp=s,this.state===F.Ready&&(i.initialSlide=(null===(t=null===(e=this.pages[this.page])||void 0===e?void 0:e.slides[0])||void 0===t?void 0:t.index)||0),this.state!==F.Init&&this.destroy(),super.setOptions(i),!1===this.option("enabled")?this.attachEvents():setTimeout((()=>{this.init()}),0))}
2init(){this.state=F.Init,this.emit("init"),this.attachPlugins(Object.assign(Object.assign({},K.Plugins),this.userPlugins)),this.emit("attachPlugins"),this.initLayout(),this.initSlides(),this.updateMetrics(),this.setInitialPosition(),this.initPanzoom(),this.attachEvents(),this.state=F.Ready,this.emit("ready")}initLayout(){const{container:e}=this,t=this.option("classes");T(e,this.cn("container")),a(e,t.isLTR,!this.isRTL),a(e,t.isRTL,this.isRTL),a(e,t.isVertical,!this.isHorizontal),a(e,t.isHorizontal,this.isHorizontal);let i=this.option("viewport")||e.querySelector(`.${t.viewport}`);i||(i=document.createElement("div"),T(i,t.viewport),i.append(...D(e,`.${t.slide}`)),e.prepend(i)),i.addEventListener("scroll",this.onScroll);let s=this.option("track")||e.querySelector(`.${t.track}`);s||(s=document.createElement("div"),T(s,t.track),s.append(...Array.from(i.childNodes))),s.setAttribute("aria-live","polite"),i.contains(s)||i.prepend(s),this.viewport=i,this.track=s,this.emit("initLayout")}initSlides(){const{track:e}=this;if(!e)return;const t=[...this.slides],i=[];[...D(e,`.${this.cn(G)}`)].forEach((e=>{if(k(e)){const t=_({el:e,isDom:!0,index:this.slides.length});i.push(t)}}));for(let e of[...this.option("slides",[])||[],...t])i.push(_(e));this.slides=i;for(let e=0;e<this.slides.length;e++)this.slides[e].index=e;
2for(const e of i)this.emit("beforeInitSlide",e,e.index),this.emit("initSlide",e,e.index);this.emit("initSlides")}setInitialPage(){const e=this.option("initialSlide");this.page="number"==typeof e?this.getPageForSlide(e):parseInt(this.option("initialPage",0)+"",10)||0}setInitialPosition(){const{track:e,pages:t,isHorizontal:i}=this;if(!e||!t.length)return;let s=this.page;t[s]||(this.page=s=0);const o=(t[s].pos||0)*(this.isRTL&&i?1:-1),n=i?`${o}px`:"0",a=i?"0":`${o}px`;e.style.transform=`translate3d(${n}, ${a}, 0) scale(1)`,this.option("adaptiveHeight")&&this.setViewportHeight()}initPanzoom(){this.panzoom&&(this.panzoom.destroy(),this.panzoom=null);const e=this.option("Panzoom")||{};this.panzoom=new I(this.viewport,p({},{content:this.track,zoom:!1,panOnlyZoomed:!1,lockAxis:this.isHorizontal?"x":"y",infinite:this.isInfinite,click:!1,dblClick:!1,touch:e=>!(this.pages.length<2&&!e.options.infinite),bounds:()=>this.getBounds(),maxVelocity:e=>Math.abs(e.target[this.axis]-e.current[this.axis])<2*this.viewportDim?100:0},e)),this.panzoom.on("*",((e,t,...i)=>{this.emit(`Panzoom.${t}`,e,...i)})),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(){const e=this.container;e&&(e.addEventListener("click",this.onClick,{passive:!1,capture:!1}),e.addEventListener("slideTo",this.onSlideTo)),window.addEventListener("resize",this.onResize)}createPages(){let e=[];const{contentDim:t,viewportDim:i}=this;let s=this.option("slidesPerPage");s=("auto"===s||t<=i)&&!1!==this.option("fill")?1/0:parseFloat(s+"");let o=0,n=0,a=0;for(const t of this.slides)(!e.length||n+t.dim-i>.05||a>=s)&&(e.push(H()),o=e.length-1,n=0,a=0),e[o].slides.push(t),n+=t.dim+t.gap,a++;return e}processPages(){const e=this.pages,{contentDim:i,viewportDim:s,isInfinite:o}=this,n=this.option("center"),a=this.option("fill"),r=a&&n&&i>s&&!o;if(e.forEach(((e,t)=>{var o;e.index=t,e.pos=(null===(o=e.slides[0])||void 0===o?void 0:o.pos)||0,e.dim=0;for(const[t,i]of e.slides.entries())e.dim+=i.dim,t<e.slides.length-1&&(e.dim+=i.gap);r&&e.pos+.5*e.dim<.5*s?e.pos=0:r&&e.pos+.5*e.dim>=i-.5*s?e.pos=i-s:n&&(e.pos+=-.5*(s-e.dim))})),e.forEach((e=>{a&&!o&&i>s&&(e.pos=Math.max(e.pos,0),e.pos=Math.min(e.pos,i-s)),e.pos=t(e.pos,1e3),e.dim=t(e.dim,1e3),Math.abs(e.pos)<=.1&&(e.pos=0)})),o)return e;const l=[];let c;return e.forEach((e=>{const t=Object.assign({},e);c&&t.pos===c.pos?(c.dim+=t.dim,c.slides=[...c.slides,...t.slides]):(t.index=l.length,c=t,l.push(t))})),l}getPageFromIndex(e=0){const t=this.pages.length;let i;return e=parseInt((e||0).toString())||0,i=this.isInfinite?(e%t+t)%t:Math.max(Math.min(e,t-1),0),i}getSlideMetrics(e){var i,s;const o=this.isHorizontal?"width":"height";let n=0,a=0,r=e.el;const l=!(!r||r.parentNode);if(r?n=parseFloat(r.dataset[o]||"")||0:(r=document.createElement("div"),r.style.visibility="hidden",(this.track||document.body).prepend(r)),T(r,this.cn(G)+" "+e.class+" "+e.customClass),n)r.style[o]=`${n}px`,r.style["width"===o?"height":"width"]="";else{l&&(this.track||document.body).prepend(r),n=r.getBoundingClientRect()[o]*Math.max(1,(null===(i=window.visualViewport)||void 0===i?void 0:i.scale)||1);let e=r[this.isHorizontal?"offsetWidth":"offsetHeight"];e-1>n&&(n=e)}const c=getComputedStyle(r);return"content-box"===c.boxSizing&&(this.isHorizontal?(n+=parseFloat(c.paddingLeft)||0,n+=parseFloat(c.paddingRight)||0):(n+=parseFloat(c.paddingTop)||0,n+=parseFloat(c.paddingBottom)||0)),a=parseFloat(c[this.isHorizontal?"marginRight":"marginBottom"])||0,l?null===(s=r.parentElement)||void 0===s||s.removeChild(r):e.el||r.remove(),{dim:t(n,1e3),gap:t(a,1e3)}}getBounds(){const{isInfinite:e,isRTL:t,isHorizontal:i,pages:s}=this;let o={min:0,max:0};if(e)o={min:-1/0,max:1/0};else if(s.length){const e=s[0].pos,n=s[s.length-1].pos;o=t&&i?{min:e,max:n}:{min:-1*n,max:-1*e}}return{x:i?o:{min:0,max:0},y:i?{min:0,max:0}:o}}repositionSlides(){let e,{isHorizontal:i,isRTL:s,isInfinite:o,viewport:n,viewportDim:a,contentDim:r,page:l,pages:c,slides:d,panzoom:h}=this,u=0,p=0,f=0,g=0;h?g=-1*h.current[this.axis]:c[l]&&(g=c[l].pos||0),e=i?s?"right":"left":"top",s&&i&&(g*=-1);for(const i of d){const s=i.el;s?("top"===e?(s.style.right="",s.style.left=""):s.style.top="",i.index!==u?s.style[e]=0===p?"":`${t(p,1e3)}px`:s.style[e]="",f+=i.dim+i.gap,u++):p+=i.dim+i.gap}if(o&&f&&n){let s=getComputedStyle(n),o="padding",l=i?"Right":"Bottom",c=parseFloat(s[o+(i?"Left":"Top")]);g-=c,a+=c,a+=parseFloat(s[o+l]);for(const i of d)i.el&&(t(i.pos)<t(a)&&t(i.pos+i.dim+i.gap)<t(g)&&t(g)>t(r-a)&&(i.el.style[e]=`${t(p+f,1e3)}px`),t(i.pos+i.gap)>=t(r-a)&&t(i.pos)>t(g+a)&&t(g)<t(a)&&(i.el.style[e]=`-${t(f,1e3)}px`))}let m,v,b=[...this.inTransition];if(b.length>1&&(m=c[b[0]],v=c[b[1]]),m&&v){let i=0;for(const s of d)s.el?this.inTransition.has(s.index)&&m.slides.indexOf(s)<0&&(s.el.style[e]=`${t(i+(m.pos-v.pos),1e3)}px`):i+=s.dim+s.gap}}createSlideEl(e){const{track:t,slides:i}=this;if(!t||!e)return;if(e.el&&e.el.parentNode)return;const s=e.el||document.createElement("div");T(s,this.cn(G)),T(s,e.class),T(s,e.customClass);const o=e.html;o&&(o instanceof HTMLElement?s.appendChild(o):s.innerHTML=e.html+"");const n=[];
2i.forEach(((e,t)=>{e.el&&n.push(t)}));const a=e.index;let r=null;n.length&&(r=i[n.reduce(((e,t)=>Math.abs(t-a)<Math.abs(e-a)?t:e))]);const l=r&&r.el&&r.el.parentNode?r.index<e.index?r.el.nextSibling:r.el:null;t.insertBefore(s,t.contains(l)?l:null),e.el=s,this.emit("createSlide",e)}removeSlideEl(e,t=!1){const i=null==e?void 0:e.el;if(!i||!i.parentNode)return;const s=this.cn(Z);if(i.classList.contains(s)&&(x(i,s),this.emit("unselectSlide",e)),e.isDom&&!t)return i.removeAttribute("aria-hidden"),i.removeAttribute("data-index"),void(i.style.left="");this.emit("removeSlide",e);const o=new CustomEvent(V);i.dispatchEvent(o),e.el&&(e.el.remove(),e.el=null)}transitionTo(e=0,t=this.option("transition")){var i,s,o,n;if(!t)return!1;const a=this.page,{pages:r,panzoom:l}=this;e=parseInt((e||0).toString())||0;const c=this.getPageFromIndex(e);if(!l||!r[c]||r.length<2||Math.abs(((null===(s=null===(i=r[a])||void 0===i?void 0:i.slides[0])||void 0===s?void 0:s.dim)||0)-this.viewportDim)>1)return!1;let d=e>a?1:-1;this.isInfinite&&(0===a&&e===r.length-1&&(d=-1),a===r.length-1&&0===e&&(d=1));const h=r[c].pos*(this.isRTL?1:-1);if(a===c&&Math.abs(h-l.target[this.axis])<1)return!1;this.clearTransitions();const u=l.isResting;T(this.container,this.cn("inTransition"));const p=(null===(o=r[a])||void 0===o?void 0:o.slides[0])||null,f=(null===(n=r[c])||void 0===n?void 0:n.slides[0])||null;this.inTransition.add(f.index),this.createSlideEl(f);let g=p.el,m=f.el;u||t===G||(t="fadeFast",g=null);const v=this.isRTL?"next":"prev",b=this.isRTL?"prev":"next";return g&&(this.inTransition.add(p.index),p.transition=t,g.addEventListener(V,this.onAnimationEnd),g.classList.add(`f-${t}Out`,`to-${d>0?b:v}`)),m&&(f.transition=t,m.addEventListener(V,this.onAnimationEnd),m.classList.add(`f-${t}In`,`from-${d>0?v:b}`)),l.current[this.axis]=h,l.target[this.axis]=h,l.requestTick(),this.onChange(c),!0}manageSlideVisiblity(){const e=new Set,t=new Set,i=this.getVisibleSlides(parseFloat(this.option("preload",0)+"")||0);for(const s of this.slides)i.has(s)?e.add(s):t.add(s);for(const t of this.inTransition)e.add(this.slides[t]);for(const t of e)this.createSlideEl(t),this.lazyLoadSlide(t);for(const i of t)e.has(i)||this.removeSlideEl(i);this.markSelectedSlides(),this.repositionSlides()}markSelectedSlides(){if(!this.pages[this.page]||!this.pages[this.page].slides)return;const e="aria-hidden";let t=this.cn(Z);if(t)for(const i of this.slides){const s=i.el;s&&(s.dataset.index=`${i.index}`,s.classList.contains("f-thumbs__slide")?this.getVisibleSlides(0).has(i)?s.removeAttribute(e):s.setAttribute(e,"true"):this.pages[this.page].slides.includes(i)?(s.classList.contains(t)||(T(s,t),this.emit("selectSlide",i)),s.removeAttribute(e)):(s.classList.contains(t)&&(x(s,t),this.emit("unselectSlide",i)),s.setAttribute(e,"true")))}}flipInfiniteTrack(){const{axis:e,isHorizontal:t,isInfinite:i,isRTL:s,viewportDim:o,contentDim:n}=this,a=this.panzoom;if(!a||!i)return;let r=a.current[e],l=a.target[e]-r,c=0,d=.5*o;s&&t?(r<-d&&(c=-1,r+=n),r>n-d&&(c=1,r-=n)):(r>d&&(c=1,r-=n),r<-n+d&&(c=-1,r+=n)),c&&(a.current[e]=r,a.target[e]=r+l)}lazyLoadImg(e,t){const i=this,s="f-fadeIn",n="is-preloading";let a=!1,r=null;const l=()=>{a||(a=!0,r&&(r.remove(),r=null),x(t,n),t.complete&&(T(t,s),setTimeout((()=>{x(t,s)}),350)),this.option("adaptiveHeight")&&e.el&&this.pages[this.page].slides.indexOf(e)>-1&&(i.updateMetrics(),i.setViewportHeight()),this.emit("load",e))};T(t,n),t.src=t.dataset.lazySrcset||t.dataset.lazySrc||"",delete t.dataset.lazySrc,delete t.dataset.lazySrcset,t.addEventListener("error",(()=>{l()})),t.addEventListener("load",(()=>{l()})),setTimeout((()=>{const i=t.parentNode;i&&e.el&&(t.complete?l():a||(r=o(C),i.insertBefore(r,t)))}),300)}lazyLoadSlide(e){const t=e&&e.el;if(!t)return;const i=new Set;let s=Array.from(t.querySelectorAll("[data-lazy-src],[data-lazy-srcset]"));t.dataset.lazySrc&&s.push(t),s.map((e=>{e instanceof HTMLImageElement?i.add(e):e instanceof HTMLElement&&e.dataset.lazySrc&&(e.style.backgroundImage=`url('${e.dataset.lazySrc}')`,delete e.dataset.lazySrc)}));for(const t of i)this.lazyLoadImg(e,t)}onAnimationEnd(e){var t;const i=e.target,s=i?parseInt(i.dataset.index||"",10)||0:-1,o=this.slides[s],n=e.animationName;if(!i||!o||!n)return;const a=!!this.inTransition.has(s)&&o.transition;a&&n.substring(0,a.length+2)===`f-${a}`&&this.inTransition.delete(s),this.inTransition.size||this.clearTransitions(),s===this.page&&(null===(t=this.panzoom)||void 0===t?void 0:t.isResting)&&this.emit
2("settle")}onDecel(e,t=0,i=0,s=0,o=0){if(this.option("dragFree"))return void this.setPageFromPosition();const{isRTL:n,isHorizontal:a,axis:r,pages:l}=this,c=l.length,d=Math.abs(Math.atan2(i,t)/(Math.PI/180));let h=0;if(h=d>45&&d<135?a?0:i:a?t:0,!c)return;let u=this.page,p=n&&a?1:-1;const f=e.current[r]*p;let{pageIndex:g}=this.getPageFromPosition(f);Math.abs(h)>5?(l[u].dim<document.documentElement["client"+(this.isHorizontal?"Width":"Height")]-1&&(u=g),u=n&&a?h<0?u-1:u+1:h<0?u+1:u-1):u=0===s&&0===o?u:g,this.slideTo(u,{transition:!1,friction:e.option("decelFriction")})}onClick(e){const t=e.target,i=t&&k(t)?t.dataset:null;let s,o;i&&(void 0!==i.carouselPage?(o="slideTo",s=i.carouselPage):void 0!==i.carouselNext?o="slideNext":void 0!==i.carouselPrev&&(o="slidePrev")),o?(e.preventDefault(),e.stopPropagation(),t&&!t.hasAttribute("disabled")&&this[o](s)):this.emit("click",e)}onSlideTo(e){const t=e.detail||0;this.slideTo(this.getPageForSlide(t),{friction:0})}onChange(e,t=0){const i=this.page;this.prevPage=i,this.page=e,this.option("adaptiveHeight")&&this.setViewportHeight(),e!==i&&(this.markSelectedSlides(),this.emit("change",e,i,t))}onRefresh(){let e=this.contentDim,t=this.viewportDim;this.updateMetrics(),this.contentDim===e&&this.viewportDim===t||this.slideTo(this.page,{friction:0,transition:!1})}onScroll(){var e;null===(e=this.viewport)||void 0===e||e.scroll(0,0)}onResize(){this.option("breakpoints")&&this.processOptions()}onBeforeTransform(e){this.lp!==e.current[this.axis]&&(this.flipInfiniteTrack(),this.manageSlideVisiblity()),this.lp=e.current.e}onEndAnimation(){this.inTransition.size||this.emit("settle")}reInit(e=null,t=null){this.destroy(),this.state=F.Init,this.prevPage=null,this.userOptions=e||this.userOptions,this.userPlugins=t||this.userPlugins,this.processOptions()}
3slideTo(e=0,{friction:t=this.option("friction"),transition:i=this.option("transition")}={}){if(this.state===F.Destroy)return;e=parseInt((e||0).toString())||0;const s=this.getPageFromIndex(e),{axis:o,isHorizontal:n,isRTL:a,pages:r,panzoom:l}=this,c=r.length,d=a&&n?1:-1;if(!l||!c)return;if(this.page!==s){const t=new Event("beforeChange",{bubbles:!0,cancelable:!0});if(this.emit("beforeChange",t,e),t.defaultPrevented)return}if(this.transitionTo(e,i))return;let h=r[s].pos;if(this.isInfinite){const t=this.contentDim,i=l.target[o]*d;2===c?h+=t*Math.floor(parseFloat(e+"")/2):h=[h,h-t,h+t].reduce((function(e,t){return Math.abs(t-i)<Math.abs(e-i)?t:e}))}h*=d,Math.abs(l.target[o]-h)<1||(l.panTo({x:n?h:0,y:n?0:h,friction:t}),this.onChange(s))}slideToClosest(e){if(this.panzoom){const{pageIndex:t}=this.getPageFromPosition();this.slideTo(t,e)}}slideNext(){this.slideTo(this.page+1)}slidePrev(){this.slideTo(this.page-1)}clearTransitions(){this.inTransition.clear(),x(this.container,this.cn("inTransition"));const e=["to-prev","to-next","from-prev","from-next"];for(const t of this.slides){const i=t.el;if(i){i.removeEventListener(V,this.onAnimationEnd),i.classList.remove(...e);const s=t.transition;s&&i.classList.remove(`f-${s}Out`,`f-${s}In`)}}this.manageSlideVisiblity()}addSlide(e,t){var i,s,o,n;const a=this.panzoom,r=(null===(i=this.pages[this.page])||void 0===i?void 0:i.pos)||0,l=(null===(s=this.pages[this.page])||void 0===s?void 0:s.dim)||0,c=this.contentDim<this.viewportDim;let d=Array.isArray(t)?t:[t];const h=[];for(const e of d)h.push(_(e));this.slides.splice(e,0,...h);for(let e=0;e<this.slides.length;e++)this.slides[e].index=e;for(const e of h)this.emit("beforeInitSlide",e,e.index);if(this.page>=e&&(this.page+=h.length),this.updateMetrics(),a){const t=(null===(o=this.pages[this.page])||void 0===o?void 0:o.pos)||0,i=(null===(n=this.pages[this.page])||void 0===n?void 0:n.dim)||0,s=this.pages.length||1,d=this.isRTL?l-i:i-l,h=this.isRTL?r-t:t-r;c&&1===s?(e<=this.page&&(a.current[this.axis]-=d,a.target[this.axis]-=d),a.panTo({[this.isHorizontal?"x":"y"]:-1*t})):h&&e<=this.page&&(a.target[this.axis]-=h,a.current[this.axis]-=h,a.requestTick())}for(const e of h)this.emit("initSlide",e,e.index)}prependSlide(e){this.addSlide(0,e)}appendSlide(e){this.addSlide(this.slides.length,e)}removeSlide(e){const t=this.slides.length;e=(e%t+t)%t;const i=this.slides[e];if(i){this.removeSlideEl(i,!0),this.slides.splice(e,1);for(let e=0;e<this.slides.length;e++)this.slides[e].index=e;this.updateMetrics(),this.slideTo(this.page,{friction:0,transition:!1}
3),this.emit("destroySlide",i)}}updateMetrics(){const{panzoom:e,viewport:i,track:s,slides:o,isHorizontal:n,isInfinite:a}=this;if(!s)return;const r=n?"width":"height",l=n?"offsetWidth":"offsetHeight";if(i){let e=Math.max(i[l],t(i.getBoundingClientRect()[r],1e3)),s=getComputedStyle(i),o="padding",a=n?"Right":"Bottom";e-=parseFloat(s[o+(n?"Left":"Top")])+parseFloat(s[o+a]),this.viewportDim=e}let c,d=0;for(const[e,i]of o.entries()){let s=0,n=0;!i.el&&c?(s=c.dim,n=c.gap):(({dim:s,gap:n}=this.getSlideMetrics(i)),c=i),s=t(s,1e3),n=t(n,1e3),i.dim=s,i.gap=n,i.pos=d,d+=s,(a||e<o.length-1)&&(d+=n)}d=t(d,1e3),this.contentDim=d,e&&(e.contentRect[r]=d,e.contentRect[n?"fullWidth":"fullHeight"]=d),this.pages=this.createPages(),this.pages=this.processPages(),this.state===F.Init&&this.setInitialPage(),this.page=Math.max(0,Math.min(this.page,this.pages.length-1)),this.manageSlideVisiblity(),this.emit("refresh")}getProgress(e,i=!1,s=!1){void 0===e&&(e=this.page);const o=this,n=o.panzoom,a=o.contentDim,r=o.pages[e]||0;if(!r||!n)return e>this.page?-1:1;let l=-1*n.current.e,c=t((l-r.pos)/(1*r.dim),1e3),d=c,h=c;this.isInfinite&&!0!==s&&(d=t((l-r.pos+a)/(1*r.dim),1e3),h=t((l-r.pos-a)/(1*r.dim),1e3));let u=[c,d,h].reduce((function(e,t){return Math.abs(t)<Math.abs(e)?t:e}));return i?u:u>1?1:u<-1?-1:u}setViewportHeight(){const{page:e,pages:t,viewport:i,isHorizontal:s}=this;if(!i||!t[e])return;let o=0;s&&this.track&&(this.track.style.height="auto",t[e].slides.forEach((e=>{e.el&&(o=Math.max(o,e.el.offsetHeight))}))),i.style.height=o?`${o}px`:""}getPageForSlide(e){for(const t of this.pages)for(const i of t.slides)if(i.index===e)return t.index;return-1}getVisibleSlides(e=0){var t;const i=new Set;let{panzoom:s,contentDim:o,viewportDim:n,pages:a,page:r}=this;if(n){o=o+(null===(t=this.slides[this.slides.length-1])||void 0===t?void 0:t.gap)||0;let l=0;l=s&&s.state!==v.Init&&s.state!==v.Destroy?-1*s.current[this.axis]:a[r]&&a[r].pos||0,this.isInfinite&&(l-=Math.floor(l/o)*o),this.isRTL&&this.isHorizontal&&(l*=-1);const c=l-n*e,d=l+n*(e+1),h=this.isInfinite?[-1,0,1]:[0];for(const e of this.slides)for(const t of h){const s=e.pos+t*o,n=s+e.dim+e.gap;s<d&&n>c&&i.add(e)}}return i}getPageFromPosition(e){const{viewportDim:t,contentDim:i,slides:s,pages:o,panzoom:n}=this,a=o.length,r=s.length,l=s[0],c=s[r-1],d=this.option("center");let h=0,u=0,p=0,f=void 0===e?-1*((null==n?void 0:n.target[this.axis])||0):e;d&&(f+=.5*t),this.isInfinite?(f<l.pos-.5*c.gap&&(f-=i,p=-1),f>c.pos+c.dim+.5*c.gap&&(f-=i,p=1)):f=Math.max(l.pos||0,Math.min(f,c.pos));let g=c,m=s.find((e=>{const t=e.pos-.5*g.gap,i=e.pos+e.dim+.5*e.gap;return g=e,f>=t&&f<i}));return m||(m=c),u=this.getPageForSlide(m.index),h=u+p*a,{page:h,pageIndex:u}}setPageFromPosition(){const{pageIndex:e}=this.getPageFromPosition();this.onChange(e)}destroy(){if([F.Destroy].includes(this.state))return;this.state=F.Destroy;const{container:e,viewport:t,track:i,slides:s,panzoom:o}=this,n=this.option("classes");e.removeEventListener("click",this.onClick,{passive:!1,capture:!1}),e.removeEventListener("slideTo",this.onSlideTo),window.removeEventListener("resize",this.onResize),o&&(o.destroy(),this.panzoom=null),s&&s.forEach((e=>{this.removeSlideEl(e)})),this.detachPlugins(),t&&(t.removeEventListener("scroll",this.onScroll),t.offsetParent&&i&&i.offsetParent&&t.replaceWith(...i.childNodes));for(const[t,i]of Object.entries(n))"container"!==t&&i&&e.classList.remove(i);this.track=null,this.viewport=null,this.page=0,this.slides=[];const a=this.events.get("ready");this.events=new Map,a&&this.events.set("ready",a)}}Object.defineProperty(K,"Panzoom",{enumerable:!0,configurable:!0,writable:!0,value:I}),Object.defineProperty(K,"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(K,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:U});const J=function(e){if(!k(e))return 0;const t=window.scrollY,i=window.innerHeight,s=t+i,o=e.getBoundingClientRect(),n=o.y+t,a=o.height,r=n+a;if(t>r||s<n)return 0;if(t<n&&s>r)return 100;if(n<t&&r>s)return 100;let l=a;n<t&&(l-=t-n),r>s&&(l-=r-s);const c=l/i*100;return Math.round(c)},Q=!("undefined"==typeof window||!window.document||!window.document.createElement);let ee;const te=["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
3([tabindex^="-"]):not([disabled]):not([aria-hidden])'].join(","),ie=e=>{if(e&&Q){void 0===ee&&document.createElement("div").focus({get preventScroll(){return ee=!0,!1}});try{if(ee)e.focus({preventScroll:!0});else{const t=window.scrollY||document.body.scrollTop,i=window.scrollX||document.body.scrollLeft;e.focus(),document.body.scrollTo({top:t,left:i,behavior:"auto"})}}catch(e){}}},se=()=>{const e=document;let t,i="",s="",o="";return e.fullscreenEnabled?(i="requestFullscreen",s="exitFullscreen",o="fullscreenElement"):e.webkitFullscreenEnabled&&(i="webkitRequestFullscreen",s="webkitExitFullscreen",o="webkitFullscreenElement"),i&&(t={request:function(t=e.documentElement){return"webkitRequestFullscreen"===i?t[i](Element.ALLOW_KEYBOARD_INPUT):t[i]()},exit:function(){return e[o]&&e[s]()},isFullscreen:function(){return e[o]}}),t},oe={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({},y),{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"};var ne,ae;!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Closing=2]="Closing",e[e.CustomClosing=3]="CustomClosing",e[e.Destroy=4]="Destroy"}(ne||(ne={})),function(e){e[e.Loading=0]="Loading",e[e.Opening=1]="Opening",e[e.Ready=2]="Ready",e[e.Closing=3]="Closing"}(ae||(ae={}));let re="",le=!1,ce=!1,de=null;const he=()=>{let e="",t="";const i=xt.getInstance();if(i){const s=i.carousel,o=i.getSlide();if(s&&o){let n=o.slug||void 0,a=o.triggerEl||void 0;t=n||i.option("slug")||"",!t&&a&&a.dataset&&(t=a.dataset.fancybox||""),t&&"true"!==t&&(e="#"+t+(!n&&s.slides.length>1?"-"+(o.index+1):""))}}return{hash:e,slug:t,index:1}},ue=()=>{const e=new URL(document.URL).hash,t=e.slice(1).split("-"),i=t[t.length-1],s=i&&/^\+?\d+$/.test(i)&&parseInt(t.pop()||"1",10)||1;return{hash:e,slug:t.join("-"),index:s}},pe=()=>{const{slug:e,index:t}=ue();if(!e)return;let i=document.querySelector(`[data-slug="${e}"]`);if(i&&i.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})),xt.getInstance())return;const s=document.querySelectorAll(`[data-fancybox="${e}"]`);s.length&&(i=s[t-1],i&&i.dispatchEvent(new CustomEvent("click",{bubbles:!0,cancelable:!0})))},fe=()=>{if(!1===xt.defaults.Hash)return;const e=xt.getInstance();if(!1===(null==e?void 0:e.options.Hash))return;const{slug:t,index:i}=ue(),{slug:s}=he();e&&(t===s?e.jumpTo(i-1):(le=!0,e.close())),pe()},ge=()=>{de&&clearTimeout(de),queueMicrotask((()=>{fe()}))},me=()=>{window.addEventListener("hashchange",ge,!1),setTimeout((()=>{fe()}),500)};Q&&(/complete|interactive|loaded/.test(document.readyState)?me():document.addEventListener("DOMContentLoaded",me));const ve="is-zooming-in";class be extends ${onCreateSlide(e,t,i){const s=this.instance.optionFor(i,"src")||"";i.el&&"image"===i.type&&"string"==typeof s&&this.setImage(i,s)}onRemoveSlide(e,t,i){i.panzoom&&i.panzoom.destroy(),i.panzoom=void 0,i.imageEl=void 0}onChange(e,t,i,s){x(this.instance.container,ve);for(const e of t.slides){const t=e.panzoom;t&&e.index!==i&&t.reset(.35)}}onClose(){var e;const t=this.instance,i=t.container,s=t.getSlide();if(!i||!i.parentElement||!s)return;const{el:o,contentEl:n,panzoom:a,thumbElSrc:r}=s;if(!o||!r||!n||!a||a.isContentLoading||a.state===v.Init||a.state===v.Destroy)return;a.updateMetrics();let l=this.getZoomInfo(s);if(!l)return;this.instance.state=ne.CustomClosing,i.classList.remove(ve),i.classList.add("is-zooming-out"),n.style.backgroundImage=`url('${r}')`;const c=i.getBoundingClientRect();
31===((null===(e=window.visualViewport)||void 0===e?void 0:e.scale)||1)&&Object.assign(i.style,{position:"absolute",top:`${i.offsetTop+window.scrollY}px`,left:`${i.offsetLeft+window.scrollX}px`,bottom:"auto",right:"auto",width:`${c.width}px`,height:`${c.height}px`,overflow:"hidden"});const{x:d,y:h,scale:u,opacity:p}=l;if(p){const e=((e,t)=>{const i=t-e;return t=>1+((t-e)/i*-1||0)})(a.scale,u);a.on("afterTransform",(()=>{n.style.opacity=e(a.scale)+""}))}a.on("endAnimation",(()=>{t.destroy()})),a.target.a=u,a.target.b=0,a.target.c=0,a.target.d=u,a.panTo({x:d,y:h,scale:u,friction:p?.2:.33,ignoreBounds:!0}),a.isResting&&t.destroy()}setImage(e,t){const i=this.instance;e.src=t,this.process(e,t).then((t=>{const{contentEl:s,imageEl:o,thumbElSrc:n,el:a}=e;if(i.isClosing()||!s||!o)return;s.offsetHeight;const r=!!i.isOpeningSlide(e)&&this.getZoomInfo(e);if(this.option("protected")&&a){a.addEventListener("contextmenu",(e=>{e.preventDefault()}));const e=document.createElement("div");T(e,"fancybox-protected"),s.appendChild(e)}if(n&&r){const o=t.contentRect,a=Math.max(o.fullWidth,o.fullHeight);let c=null;!r.opacity&&a>1200&&(c=document.createElement("img"),T(c,"fancybox-ghost"),c.src=n,s.appendChild(c));const d=()=>{c&&(T(c,"f-fadeFastOut"),setTimeout((()=>{c&&(c.remove(),c=null)}),200))};(l=n,new Promise(((e,t)=>{const i=new Image;i.onload=e,i.onerror=t,i.src=l}))).then((()=>{i.hideLoading(e),e.state=ae.Opening,this.instance.emit("reveal",e),this.zoomIn(e).then((()=>{d(),this.instance.done(e)}),(()=>{})),c&&setTimeout((()=>{d()}),a>2500?800:200)}),(()=>{i.hideLoading(e),i.revealContent(e)}))}else{const s=this.optionFor(e,"initialSize"),o=this.optionFor(e,"zoom"),n={event:i.prevMouseMoveEvent||i.options.event,friction:o?.12:0};let a=i.optionFor(e,"showClass")||void 0,r=!0;i.isOpeningSlide(e)&&("full"===s?t.zoomToFull(n):"cover"===s?t.zoomToCover(n):"max"===s?t.zoomToMax(n):r=!1,t.stop("current")),r&&a&&(a=t.isDragging?"f-fadeIn":""),i.hideLoading(e),i.revealContent(e,a)}var l}),(()=>{i.setError(e,"{{IMAGE_ERROR}}")}))}process(e,t){return new Promise(((i,s)=>{var n;const a=this.instance,r=e.el;a.clearContent(e),a.showLoading(e);let l=this.optionFor(e,"content");if("string"==typeof l&&(l=o(l)),!l||!k(l)){if(l=document.createElement("img"),l instanceof HTMLImageElement){let i="",s=e.caption;i="string"==typeof s&&s?s.replace(/<[^>]+>/gi,"").substring(0,1e3):`Image ${e.index+1} of ${(null===(n=a.carousel)||void 0===n?void 0:n.pages.length)||1}`,l.src=t||"",l.alt=i,l.draggable=!1,e.srcset&&l.setAttribute("srcset",e.srcset),this.instance.isOpeningSlide(e)&&(l.fetchPriority="high")}e.sizes&&l.setAttribute("sizes",e.sizes)}T(l,"fancybox-image"),e.imageEl=l,a.setContent(e,l,!1),e.panzoom=new I(r,p({transformParent:!0},this.option("Panzoom")||{},{content:l,width:(t,i)=>a.optionFor(e,"width","auto",i)||"auto",height:(t,i)=>a.optionFor(e,"height","auto",i)||"auto",wheel:()=>{const e=a.option("wheel");return("zoom"===e||"pan"==e)&&e},click:(t,i)=>{var s,o;if(a.isCompact||a.isClosing())return!1;if(e.index!==(null===(s=a.getSlide())||void 0===s?void 0:s.index))return!1;if(i){const e=i.composedPath()[0];if(["A","BUTTON","TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].includes(e.nodeName))return!1}let n=!i||i.target&&(null===(o=e.contentEl)||void 0===o?void 0:o.contains(i.target));return a.option(n?"contentClick":"backdropClick")||!1},dblClick:()=>a.isCompact?"toggleZoom":a.option("contentDblClick")||!1,spinner:!1,panOnlyZoomed:!0,wheelLimit:1/0,on:{ready:e=>{i(e)},error:()=>{s()},destroy:()=>{s()}}}))}))}zoomIn(e){return new Promise(((t,i)=>{const s=this.instance,o=s.container,{panzoom:n,contentEl:a,el:r}=e;n&&n.updateMetrics();const l=this.getZoomInfo(e);if(!(l&&r&&a&&n&&o))return void i();const{x:c,y:d,scale:h,opacity:u}=l,p=()=>{e.state!==ae.Closing&&(u&&(a.style.opacity=Math.max(Math.min(1,1-(1-n.scale)/(1-h)),0)+""),n.scale>=1&&n.scale>n.targetScale-.1&&t(n))},f=e=>{(e.scale<.99||e.scale>1.01)&&!e.isDragging||(x(o,ve),a.style.opacity="",e.off("endAnimation",f),e.off("touchStart",f),e.off("afterTransform",p),t(e))};n.on("endAnimation",f),n.on("touchStart",f),n.on("afterTransform",p),n.on(["error","destroy"],(()=>{i()})),n.panTo({x:c,y:d,scale:h,friction:0,ignoreBounds:!0}),n.stop("current");
3const g={event:"mousemove"===n.panMode?s.prevMouseMoveEvent||s.options.event:void 0},m=this.optionFor(e,"initialSize");T(o,ve),s.hideLoading(e),"full"===m?n.zoomToFull(g):"cover"===m?n.zoomToCover(g):"max"===m?n.zoomToMax(g):n.reset(.172)}))}getZoomInfo(e){const{el:t,imageEl:i,thumbEl:s,panzoom:o}=e,n=this.instance,a=n.container;if(!t||!i||!s||!o||J(s)<3||!this.optionFor(e,"zoom")||!a||n.state===ne.Destroy)return!1;if("0"===getComputedStyle(a).getPropertyValue("--f-images-zoom"))return!1;const r=window.visualViewport||null;if(1!==(r?r.scale:1))return!1;let{top:l,left:c,width:d,height:h}=s.getBoundingClientRect(),{top:u,left:p,fitWidth:f,fitHeight:g}=o.contentRect;if(!(d&&h&&f&&g))return!1;const m=o.container.getBoundingClientRect();p+=m.left,u+=m.top;const v=-1*(p+.5*f-(c+.5*d)),b=-1*(u+.5*g-(l+.5*h)),y=d/f;let w=this.option("zoomOpacity")||!1;return"auto"===w&&(w=Math.abs(d/h-f/g)>.1),{x:v,y:b,scale:y,opacity:w}}attach(){const e=this,t=e.instance;t.on("Carousel.change",e.onChange),t.on("Carousel.createSlide",e.onCreateSlide),t.on("Carousel.removeSlide",e.onRemoveSlide),t.on("close",e.onClose)}detach(){const e=this,t=e.instance;t.off("Carousel.change",e.onChange),t.off("Carousel.createSlide",e.onCreateSlide),t.off("Carousel.removeSlide",e.onRemoveSlide),t.off("close",e.onClose)}}Object.defineProperty(be,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{initialSize:"fit",Panzoom:{maxScale:1},protected:!1,zoom:!0,zoomOpacity:"auto"}}),"function"==typeof SuppressedError&&SuppressedError;const ye="html",we="image",Se="map",Ce="youtube",ke="vimeo",xe="html5video",Te=(e,t={})=>{const i=new URL(e),s=new URLSearchParams(i.search),o=new URLSearchParams;for(const[e,i]of[...s,...Object.entries(t)]){let t=i+"";if("t"===e){let e=t.match(/((\d*)m)?(\d*)s?/);e&&o.set("start",60*parseInt(e[2]||"0")+parseInt(e[3]||"0")+"")}else o.set(e,t)}let n=o+"",a=e.match(/#t=((.*)?\d+s)/);return a&&(n+=`#t=${a[1]}`),n},$e=["image","html","ajax","inline","clone","iframe","map","pdf","html5video","youtube","vimeo"];class Ee extends ${onBeforeInitSlide(e,t,i){this.processType(i)}onCreateSlide(e,t,i){this.setContent(i)}onClearContent(e,t){t.xhr&&(t.xhr.abort(),t.xhr=null);const i=t.iframeEl;i&&(i.onload=i.onerror=null,i.src="//about:blank",t.iframeEl=null);const s=t.contentEl,o=t.placeholderEl;if("inline"===t.type&&s&&o)s.classList.remove("fancybox__content"),"none"!==getComputedStyle(s).getPropertyValue("display")&&(s.style.display="none"),setTimeout((()=>{o&&(s&&o.parentNode&&o.parentNode.insertBefore(s,o),o.remove())}),0),t.contentEl=void 0,t.placeholderEl=void 0;else for(;t.el&&t.el.firstChild;)t.el.removeChild(t.el.firstChild)}onSelectSlide(e,t,i){i.state===ae.Ready&&this.playVideo()}onUnselectSlide(e,t,i){var s,o;if(i.type===xe){try{null===(o=null===(s=i.el)||void 0===s?void 0:s.querySelector("video"))||void 0===o||o.pause()}catch(e){}return}let n;i.type===ke?n={method:"pause",value:"true"}:i.type===Ce&&(n={event:"command",func:"pauseVideo"}),n&&i.iframeEl&&i.iframeEl.contentWindow&&i.iframeEl.contentWindow.postMessage(JSON.stringify(n),"*"),i.poller&&clearTimeout(i.poller)}onDone(e,t){e.isCurrentSlide(t)&&!e.isClosing()&&this.playVideo()}onRefresh(e,t){t.slides.forEach((e=>{e.el&&(this.resizeIframe(e),this.setAspectRatio(e))}))}onMessage(e){try{let t=JSON.parse(e.data);if("https://player.vimeo.com"===e.origin){if("ready"===t.event)for(let t of Array.from(document.getElementsByClassName("fancybox__iframe")))t instanceof HTMLIFrameElement&&t.contentWindow===e.source&&(t.dataset.ready="true")}else if(e.origin.match(/^https:\/\/(www.)?youtube(-nocookie)?.com$/)&&"onReady"===t.event){const e=document.getElementById(t.id);e&&(e.dataset.ready="true")}}catch(e){}}loadAjaxContent(e){const t=this.instance.optionFor(e,"src")||"";this.instance.showLoading(e);const i=this.instance,s=new XMLHttpRequest;i.showLoading(e),s.onreadystatechange=function(){s.readyState===XMLHttpRequest.DONE&&i.state===ne.Ready&&(i.hideLoading(e),200===s.status?i.setContent(e,s.responseText):i.setError(e,404===s.status?"{{AJAX_NOT_FOUND}}":"{{AJAX_FORBIDDEN}}"))};const o=e.ajax||null;s.open(o?"POST":"GET",t+""),s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.send(o),e.xhr=s}setInlineContent(e){let t=null;if(k(e.src))t=e.src;else if("string"==typeof e.src){const i=e.src.split("#",2).pop();t=i?document.getElementById(i):null}if(t){if("clone"===e.type||t.closest(".fancybox__slide")){t=t.cloneNode(!0);const i=t.dataset.animationName;i&&(t.classList.remove(i),delete t.dataset.animationName);let s=t.getAttribute("id");s=s?`${s}--clone`:`clone-${this.instance.id}-${e.index}`,t.setAttribute("id",s)}else if(t.parentNode){const i=document.createElement("div");i.classList.add("fancybox-placeholder"),t.parentNode.insertBefore(i,t),e.placeholderEl=i}this.instance.setContent(e,t)}else this.instance.setError(e,"{{ELEMENT_NOT_FOUND}}")}setIframeContent(e){const{src:t,el:i}=e;if(!t||"string"!=typeof t||!i)return;i.classList.add("is-loading");const s=this.instance,o=document.createElement("iframe");o.className="fancybox__iframe",o.setAttribute("id",`fancybox__iframe_${s.id}_${e.index}`);for(const[t,i]of Object.entries(this.optionFor(e,"iframeAttr")||{}))o.setAttribute(t,i);o.onerror=()=>{s.setError(e,"{{IFRAME_ERROR}}")},e.iframeEl=o;const n=this.optionFor(e,"preload");if("iframe"!==e.type||!1===n)return o.setAttribute("src",e.src+""),s.setContent(e,o,!1),this.resizeIframe(e),void s.revealContent(e);s.showLoading(e),o.onload=()=>
3{if(!o.src.length)return;const t="true"!==o.dataset.ready;o.dataset.ready="true",this.resizeIframe(e),t?s.revealContent(e):s.hideLoading(e)},o.setAttribute("src",t),s.setContent(e,o,!1)}resizeIframe(e){const{type:t,iframeEl:i}=e;if(t===Ce||t===ke)return;const s=null==i?void 0:i.parentElement;if(!i||!s)return;let o=e.autoSize;void 0===o&&(o=this.optionFor(e,"autoSize"));let n=e.width||0,a=e.height||0;n&&a&&(o=!1);const r=s&&s.style;if(!1!==e.preload&&!1!==o&&r)try{const e=window.getComputedStyle(s),t=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),o=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),l=i.contentWindow;if(l){const e=l.document,i=e.getElementsByTagName(ye)[0],s=e.body;r.width="",s.style.overflow="hidden",n=n||i.scrollWidth+t,r.width=`${n}px`,s.style.overflow="",r.flex="0 0 auto",r.height=`${s.scrollHeight}px`,a=i.scrollHeight+o}}catch(e){}if(n||a){const e={flex:"0 1 auto",width:"",height:""};n&&"auto"!==n&&(e.width=`${n}px`),a&&"auto"!==a&&(e.height=`${a}px`),Object.assign(r,e)}}playVideo(){const e=this.instance.getSlide();if(!e)return;const{el:t}=e;if(!t||!t.offsetParent)return;if(!this.optionFor(e,"videoAutoplay"))return;if(e.type===xe)try{const e=t.querySelector("video");if(e){const t=e.play();void 0!==t&&t.then((()=>{})).catch((t=>{e.muted=!0,e.play()}))}}catch(e){}if(e.type!==Ce&&e.type!==ke)return;const i=()=>{if(e.iframeEl&&e.iframeEl.contentWindow){let t;if("true"===e.iframeEl.dataset.ready)return t=e.type===Ce?{event:"command",func:"playVideo"}:{method:"play",value:"true"},t&&e.iframeEl.contentWindow.postMessage(JSON.stringify(t),"*"),void(e.poller=void 0);e.type===Ce&&(t={event:"listening",id:e.iframeEl.getAttribute("id")},e.iframeEl.contentWindow.postMessage(JSON.stringify(t),"*"))}e.poller=setTimeout(i,250)};i()}processType(e){if(e.html)return e.type=ye,e.src=e.html,void(e.html="");const t=this.instance.optionFor(e,"src","");if(!t||"string"!=typeof t)return;let i=e.type,s=null;if(s=t.match(/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(?:watch\?(?:.*&)?v=|v\/|u\/|shorts\/|embed\/?)?(videoseries\?list=(?:.*)|[\w-]{11}|\?listType=(?:.*)&list=(?:.*))(?:.*)/i)){const o=this.optionFor(e,Ce),{nocookie:n}=o,a=function(e,t){var i={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(i[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(s=Object.getOwnPropertySymbols(e);o<s.length;o++)t.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(e,s[o])&&(i[s[o]]=e[s[o]])}return i}(o,["nocookie"]),r=`www.youtube${n?"-nocookie":""}.com`,l=Te(t,a),c=encodeURIComponent(s[2]);e.videoId=c,e.src=`https://${r}/embed/${c}?${l}`,e.thumbSrc=e.thumbSrc||`https://i.ytimg.com/vi/${c}/mqdefault.jpg`,i=Ce}else if(s=t.match(/^.+vimeo.com\/(?:\/)?([\d]+)((\/|\?h=)([a-z0-9]+))?(.*)?/)){const o=Te(t,this.optionFor(e,ke)),n=encodeURIComponent(s[1]),a=s[4]||"";e.videoId=n,e.src=`https://player.vimeo.com/video/${n}?${a?`h=${a}${o?"&":""}`:""}${o}`,i=ke}if(!i&&e.triggerEl){const t=e.triggerEl.dataset.type;$e.includes(t)&&(i=t)}i||"string"==typeof t&&("#"===t.charAt(0)?i="inline":(s=t.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(i=xe,e.videoFormat=e.videoFormat||"video/"+("ogv"===s[1]?"ogg":s[1])):t.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?i=we:t.match(/\.(pdf)((\?|#).*)?$/i)&&(i="pdf")),(s=t.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+.?\d+?)z))|(?:\?ll=))(.*)?/i))?(e.src=`https://maps.google.${s[1]}/?ll=${(s[2]?s[2]+"&z="+Math.floor(parseFloat(s[3]))+(s[4]?s[4].replace(/^\//,"&"):""):s[4]+"").replace(/\?/,"&")}&output=${s[4]&&s[4].indexOf("layer=c")>0?"svembed":"embed"}`,i=Se):(s=t.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i))&&(e.src=`https://maps.google.${s[1]}/maps?q=${s[2].replace("query=","q=").replace("api=1","")}&output=embed`,i=Se),i=i||this.instance.option("defaultType"),e.type=i,i===we&&(e.thumbSrc=e.thumbSrc||e.src)}setContent(e){const t=this.instance.optionFor(e,"src")||"";if(e&&e.type&&t){switch(e.type){case ye:this.instance.setContent(e,t);break;case xe:const i=this.option("videoTpl");i&&this.instance.setContent(e,i.replace(/\{\{src\}\}/gi,t+"").replace(/\{\{format\}\}/gi,this.optionFor(e,"videoFormat")||"").replace(/\{\{poster\}\}/gi,e.poster||e.thumbSrc||""));break;case"inline":case"clone":this.setInlineContent(e);break;case"ajax":this.loadAjaxContent(e);break;case"pdf":case Se:case Ce:case ke:e.preload=!1;case"iframe":this.setIframeContent(e)}this.setAspectRatio(e)}}setAspectRatio(e){const t=e.contentEl;if(!(e.el&&t&&e.type&&[Ce,ke,xe].includes(e.type)))return;let i,s=e.width||"auto",o=e.height||"auto";if("auto"===s||"auto"===o){i=this.optionFor(e,"videoRatio");const t=(i+"").match(/(\d+)\s*\/\s?(\d+)/);i=t&&t.length>2?parseFloat(t[1])/parseFloat(t[2]):parseFloat(i+"")}else s&&o&&(i=s/o);if(!i)return;t.style.aspectRatio="",t.style.width="",t.style.height="",t.offsetHeight;const n=t.getBoundingClientRect(),a=n.width||1,r=n.height||1;t.style.aspectRatio=i+"",i<a/r?(o="auto"===o?r:Math.min(r,o),t.style.width="auto",t.style.height=`${o}px`):(s="auto"===s?a:Math.min(a,s),t.style.width=`${s}px`,t.style.height="auto")}attach(){const e=this,t=e.instance;t.on("Carousel.beforeInitSlide",e.onBeforeInitSlide),t.on("Carousel.createSlide",e.onCreateSlide),t.on("Carousel.selectSlide",e.onSelectSlide),t.on("Carousel.unselectSlide",e.onUnselectSlide),t.on("Carousel.Panzoom.refresh",e.onRefresh),t.on("done",e.onDone),t.on("clearContent",e.onClearContent),window.addEventListener("message",e.onMessage)}detach(){const e=this,t=e.instance;t.off("Carousel.beforeInitSlide",e.onBeforeInitSlide),t.off("Carousel.createSlide",e.onCreateSlide),t.off("Carousel.selectSlide",e.onSelectSlide),t.off("Carousel.unselectSlide",e.onUnselectSlide),t.off("Carousel.Panzoom.refresh",e.onRefresh),t.off("done",e.onDone),t.off("clearContent",e.onClearContent),window.removeEventListener("message",e.onMessage)}}Object.defineProperty(Ee,"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}}});const Pe="play",Oe="pause",Me="ready";class Ae extends ${constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:Me}),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!==Me}onReady(e){this.option("autoStart")&&(e.isInfinite||e.page<e.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 e;this.inHover=!1,(null===(e=this.instance.panzoom)||void 0===e?void 0:e.isResting)&&this.resume()}onTimerEnd(){const e=this.instance;"play"===this.state&&(e.isInfinite||e.page!==e.pages.length-1?e.
3slideNext():e.slideTo(0))}removeProgressBar(){this.progressBar&&(this.progressBar.remove(),this.progressBar=null)}createProgressBar(){var e;if(!this.option("showProgress"))return null;this.removeProgressBar();const t=this.instance,i=(null===(e=t.pages[t.page])||void 0===e?void 0:e.slides)||[];let s=this.option("progressParentEl");if(s||(s=(1===i.length?i[0].el:null)||t.viewport),!s)return null;const o=document.createElement("div");return T(o,"f-progress"),s.prepend(o),this.progressBar=o,o.offsetHeight,o}set(){const e=this,t=e.instance;if(t.pages.length<2)return;if(e.timer)return;const i=e.option("timeout");e.state=Pe,T(t.container,"has-autoplay");let s=e.createProgressBar();s&&(s.style.transitionDuration=`${i}ms`,s.style.transform="scaleX(1)"),e.timer=setTimeout((()=>{e.timer=null,e.inHover||e.onTimerEnd()}),i),e.emit("set")}clear(){const e=this;e.timer&&(clearTimeout(e.timer),e.timer=null),e.removeProgressBar()}start(){const e=this;if(e.set(),e.state!==Me){if(e.option("pauseOnHover")){const t=e.instance.container;t.addEventListener("mouseenter",e.onMouseEnter,!1),t.addEventListener("mouseleave",e.onMouseLeave,!1)}document.addEventListener("visibilitychange",e.onVisibilityChange,!1),e.emit("start")}}stop(){const e=this,t=e.state,i=e.instance.container;e.clear(),e.state=Me,i.removeEventListener("mouseenter",e.onMouseEnter,!1),i.removeEventListener("mouseleave",e.onMouseLeave,!1),document.removeEventListener("visibilitychange",e.onVisibilityChange,!1),x(i,"has-autoplay"),t!==Me&&e.emit("stop")}pause(){const e=this;e.state===Pe&&(e.state=Oe,e.clear(),e.emit(Oe))}resume(){const e=this,t=e.instance;if(t.isInfinite||t.page!==t.pages.length-1)if(e.state!==Pe){if(e.state===Oe&&!e.inHover){const t=new Event("resume",{bubbles:!0,cancelable:!0});e.emit("resume",t),t.defaultPrevented||e.set()}}else e.set();else e.stop()}toggle(){
4this.state===Pe||this.state===Oe?this.stop():this.start()}attach(){const e=this,t=e.instance;t.on("ready",e.onReady),t.on("Panzoom.startAnimation",e.onChange),t.on("Panzoom.endAnimation",e.onSettle),t.on("Panzoom.touchMove",e.onChange)}detach(){const e=this,t=e.instance;t.off("ready",e.onReady),t.off("Panzoom.startAnimation",e.onChange),t.off("Panzoom.endAnimation",e.onSettle),t.off("Panzoom.touchMove",e.onChange),e.stop()}}Object.defineProperty(Ae,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{autoStart:!0,pauseOnHover:!0,progressParentEl:null,showProgress:!0,timeout:3e3}});class Le extends ${constructor(){super(...arguments),Object.defineProperty(this,"ref",{enumerable:!0,configurable:!0,writable:!0,value:null})}onPrepare(e){const t=e.carousel;if(!t)return;const i=e.container;i&&(t.options.Autoplay=p({autoStart:!1},this.option("Autoplay")||{},{pauseOnHover:!1,timeout:this.option("timeout"),progressParentEl:()=>this.option("progressParentEl")||null,on:{start:()=>{e.emit("startSlideshow")},set:t=>{var s;i.classList.add("has-slideshow"),(null===(s=e.getSlide())||void 0===s?void 0:s.state)!==ae.Ready&&t.pause()},stop:()=>{i.classList.remove("has-slideshow"),e.isCompact||e.endIdle(),e.emit("endSlideshow")},resume:(t,i)=>{var s,o,n;!i||!i.cancelable||(null===(s=e.getSlide())||void 0===s?void 0:s.state)===ae.Ready&&(null===(n=null===(o=e.carousel)||void 0===o?void 0:o.panzoom)||void 0===n?void 0:n.isResting)||i.preventDefault()}}}),t.attachPlugins({Autoplay:Ae}),this.ref=t.plugins.Autoplay)}onReady(e){const t=e.carousel,i=this.ref;i&&t&&this.option("playOnStart")&&(t.isInfinite||t.page<t.pages.length-1)&&i.start()}onDone(e,t){const i=this.ref,s=e.carousel;if(!i||!s)return;const o=t.panzoom;o&&o.on("startAnimation",(()=>{e.isCurrentSlide(t)&&i.stop()})),e.isCurrentSlide(t)&&i.resume()}onKeydown(e,t){var i;const s=this.ref;s&&t===this.option("key")&&"BUTTON"!==(null===(i=document.activeElement)||void 0===i?void 0:i.nodeName)&&s.toggle()}attach(){const e=this,t=e.instance;t.on("Carousel.init",e.onPrepare),t.on("Carousel.ready",e.onReady),t.on("done",e.onDone),t.on("keydown",e.onKeydown)}detach(){const e=this,t=e.instance;t.off("Carousel.init",e.onPrepare),t.off("Carousel.ready",e.onReady),t.off("done",e.onDone),t.off("keydown",e.onKeydown)}}Object.defineProperty(Le,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:{key:" ",playOnStart:!1,progressParentEl:e=>{var t;return(null===(t=e.instance.container)||void 0===t?void 0:t.querySelector(".fancybox__toolbar [data-fancybox-toggle-slideshow]"))||e.instance.container},timeout:3e3}});const ze={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"};var je;!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Hidden=2]="Hidden"}(je||(je={}));
4const Ie="isResting",Re="thumbWidth",De="thumbHeight",Fe="thumbClipWidth";let _e=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:je.Init})}get isModern(){return"modern"===this.type}onInitSlide(e,t){const i=t.el?t.el.dataset:void 0;i&&(t.thumbSrc=i.thumbSrc||t.thumbSrc||"",t[Fe]=parseFloat(i[Fe]||"")||t[Fe]||0,t[De]=parseFloat(i.thumbHeight||"")||t[De]||0),this.addSlide(t)}onInitSlides(){this.build()}onChange(){var e;if(!this.isModern)return;const t=this.container,i=this.instance,s=i.panzoom,o=this.carousel,n=o?o.panzoom:null,r=i.page;if(s&&o&&n){if(s.isDragging){x(t,this.cn(Ie));let s=(null===(e=o.pages[r])||void 0===e?void 0:e.pos)||0;s+=i.getProgress(r)*(this[Fe]+this.thumbGap);let a=n.getBounds();-1*s>a.x.min&&-1*s<a.x.max&&n.panTo({x:-1*s,friction:.12})}else a(t,this.cn(Ie),s.isResting);this.shiftModern()}}onRefresh(){this.updateProps();for(const e of this.instance.slides||[])this.resizeModernSlide(e);this.shiftModern()}isDisabled(){const e=this.option("minCount")||0;if(e){const t=this.instance;let i=0;for(const e of t.slides||[])e.thumbSrc&&i++;if(i<e)return!0}const t=this.option("type");return["modern","classic"].indexOf(t)<0}getThumb(e){const t=this.option("thumbTpl")||"";return{html:this.instance.localize(t,[["%i",e.index],["%d",e.index+1],["%s",e.thumbSrc||"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"]])}}addSlide(e){const t=this.carousel;t&&t.addSlide(e.index,this.getThumb(e))}getSlides(){const e=[];
4for(const t of this.instance.slides||[])e.push(this.getThumb(t));return e}resizeModernSlide(e){this.isModern&&(e[Re]=e[Fe]&&e[De]?Math.round(this[De]*(e[Fe]/e[De])):this[Re])}updateProps(){const e=this.container;if(!e)return;const t=t=>parseFloat(getComputedStyle(e).getPropertyValue("--f-thumb-"+t))||0;this.thumbGap=t("gap"),this.thumbExtraGap=t("extra-gap"),this[Re]=t("width")||40,this[Fe]=t("clip-width")||40,this[De]=t("height")||40}build(){const e=this;if(e.state!==je.Init)return;if(e.isDisabled())return void e.emit("disabled");const t=e.instance,i=t.container,s=e.getSlides(),o=e.option("type");e.type=o;const n=e.option("parentEl"),a=e.cn("container"),r=e.cn("track");let l=null==n?void 0:n.querySelector("."+a);l||(l=document.createElement("div"),T(l,a),n?n.appendChild(l):i.after(l)),T(l,`is-${o}`),T(i,e.cn("hasThumbs")),e.container=l,e.updateProps();let c=l.querySelector("."+r);c||(c=document.createElement("div"),T(c,e.cn("track")),l.appendChild(c)),e.track=c;const d=p({},{track:c,infinite:!1,center:!0,fill:"classic"===o,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"}},e.option("Carousel")||{},{Sync:{target:t},slides:s}),h=new t.constructor(l,d);h.on("createSlide",((t,i)=>{e.setProps(i.index),e.emit("createSlide",i,i.el)})),h.on("ready",(()=>{e.shiftModern(),e.emit("ready")})),h.on("refresh",(()=>{e.shiftModern()})),h.on("Panzoom.click",((t,i,s)=>{e.onClick(s)})),e.carousel=h,e.state=je.Ready}onClick(e){e.preventDefault(),e.stopPropagation();const t=this.instance,{pages:i,page:s}=t,o=e=>{if(e){const t=e.closest("[data-carousel-index]");if(t)return[parseInt(t.dataset.carouselIndex||"",10)||0,t]}return[-1,void 0]},n=(e,t)=>{const i=document.elementFromPoint(e,t);return i?o(i):[-1,void 0]};let[a,r]=o(e.target);if(a>-1)return;const l=this[Fe],c=e.clientX,d=e.clientY;let[h,u]=n(c-l,d),[p,f]=n(c+l,d);u&&f?(a=Math.abs(c-u.getBoundingClientRect().right)<Math.abs(c-f.getBoundingClientRect().left)?h:p,a===s&&(a=a===h?p:h)):u?a=h:f&&(a=p),a>-1&&i[a]&&t.slideTo(a)}getShift(e){var t;const i=this,{instance:s}=i,o=i.carousel;if(!s||!o)return 0;const n=i[Re],a=i[Fe],r=i.thumbGap,l=i.thumbExtraGap;if(!(null===(t=o.slides[e])||void 0===t?void 0:t.el))return 0;const c=.5*(n-a),d=s.pages.length-1;let h=s.getProgress(0),u=s.getProgress(d),p=s.getProgress(e,!1,!0),f=0,g=c+l+r;const m=h<0&&h>-1,v=u>0&&u<1;return 0===e?(f=g*Math.abs(h),v&&1===h&&(f-=g*Math.abs(u))):e===d?(f=g*Math.abs(u)*-1,m&&-1===u&&(f+=g*Math.abs(h))):m||v?(f=-1*g,f+=g*Math.abs(h),f+=g*(1-Math.abs(u))):f=g*p,f}setProps(e){var i;const s=this;if(!s.isModern)return;const{instance:o}=s,n=s.carousel;if(o&&n){const a=null===(i=n.slides[e])||void 0===i?void 0:i.el;if(a&&a.childNodes.length){let i=t(1-Math.abs(o.getProgress(e))),n=t(s.getShift(e));a.style.setProperty("--progress",i?i+"":""),a.style.setProperty("--shift",n+"")}}}shiftModern(){const e=this;if(!e.isModern)return;const{instance:t,track:i}=e,s=t.panzoom,o=e.carousel;if(!(t&&i&&s&&o))return;if(s.state===v.Init||s.state===v.Destroy)return;for(const i of t.slides)e.setProps(i.index);let n=(e[Fe]+e.thumbGap)*(o.slides.length||0);i.style.setProperty("--width",n+"")}cleanup(){const e=this;e.carousel&&e.carousel.destroy(),e.carousel=null,e.container&&e.container.remove(),e.container=null,e.track&&e.track.remove(),e.track=null,e.state=je.Init,x(e.instance.container,e.cn("hasThumbs"))}attach(){const e=this,t=e.instance;t.on("initSlide",e.onInitSlide),t.state===F.Init?t.on("initSlides",e.onInitSlides):e.onInitSlides(),t.on(["change","Panzoom.afterTransform"],e.onChange),t.on("Panzoom.refresh",e.onRefresh)}detach(){const e=this,t=e.instance;t.off("initSlide",e.onInitSlide),t.off("initSlides",e.onInitSlides),t.off(["change","Panzoom.afterTransform"],e.onChange),t.off("Panzoom.refresh",e.onRefresh),e.cleanup()}};Object.defineProperty(_e,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:ze});const He=Object.assign(Object.assign({},ze),{key:"t",showOnStart:!0,parentEl:null}),Ne="is-masked",qe="aria-hidden";class Be 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(){const e=this.ref;return e&&!e.isDisabled()}get isHidden(){return this.hidden}onClick(e,t){t.stopPropagation()}onCreateSlide(e,t){var i,s,o;const n=(null===(o=null===(s=null===(i=this.instance)||void 0===i?void 0:i.carousel)||void 0===s?void 0:s.slides[t.index])||void 0===o?void 0:o.type)||"",a=t.el;if(a&&n){let e=`for-${n}`;["video","youtube","vimeo","html5video"].includes(n)&&(e+=" for-video"),T(a,e)}}onInit(){var e;const t=this,i=t.instance,s=i.carousel;if(t.ref||!s)return;const o=t.option("parentEl")||i.footer||i.container;if(!o)return;const n=p({},t.options,{parentEl:o,classes:{container:"f-thumbs fancybox__thumbs"},Carousel:{Sync:{friction:i.option("Carousel.friction")||0}},on:{ready:e=>{const i=e.container;i&&this.hidden&&(t.refresh(),i.style.transition="none",t.hide(),i.offsetHeight,queueMicrotask((()=>{i.style.transition="",t.show()})))}}});n.Carousel=n.Carousel||{},n.Carousel.on=p((null===(e=t.options.Carousel)||void 0===e?void 0:e.on)||{},{click:this.onClick,createSlide:this.onCreateSlide}),s.options.Thumbs=n,s.attachPlugins({Thumbs:_e}),t.ref=s.plugins.Thumbs,t.option("showOnStart")||(t.ref.state=je.Hidden,t.hidden=!0)}onResize(){var e;const t=null===(e=this.ref)||void 0===e?void 0:e.container;t&&(t.style.maxHeight="")}onKeydown(e,t){const i=this.option("key");i&&i===t&&this.toggle()}toggle(){const e=this.ref;if(e&&!e.isDisabled())return e.state===je.Hidden?(e.state=je.Init,void e.build()):void(this.hidden?this.show():this.hide())}show(){const e=this.ref;if(!e||e.isDisabled())return;const t=e.container;t&&(this.refresh(),t.offsetHeight,t.removeAttribute(qe),t.classList.remove(Ne),this.hidden=!1)}
4hide(){const e=this.ref,t=e&&e.container;t&&(this.refresh(),t.offsetHeight,t.classList.add(Ne),t.setAttribute(qe,"true")),this.hidden=!0}refresh(){const e=this.ref;if(!e||!e.state)return;const t=e.container,i=(null==t?void 0:t.firstChild)||null;t&&i&&i.childNodes.length&&(t.style.maxHeight=`${i.getBoundingClientRect().height}px`)}attach(){const e=this,t=e.instance;t.state===ne.Init?t.on("Carousel.init",e.onInit):e.onInit(),t.on("resize",e.onResize),t.on("keydown",e.onKeydown)}detach(){var e;const t=this,i=t.instance;i.off("Carousel.init",t.onInit),i.off("resize",t.onResize),i.off("keydown",t.onKeydown),null===(e=i.carousel)||void 0===e||e.detachPlugins(["Thumbs"]),t.ref=null}}Object.defineProperty(Be,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:He});const We={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"}};var Xe;!function(e){e[e.Init=0]="Init",e[e.Ready=1]="Ready",e[e.Disabled=2]="Disabled"}(Xe||(Xe={}));const Ye={tabindex:"-1",width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Ue="has-toolbar",Ve="fancybox__toolbar";class Ze extends ${constructor(){super(...arguments),Object.defineProperty(this,"state",{enumerable:!0,configurable:!0,writable:!0,value:Xe.Init}),Object.defineProperty(this,"container",{enumerable:!0,configurable:!0,writable:!0,value:null})}onReady(e){var t;if(!e.carousel)return;let i=this.option("display"),s=this.option("absolute"),o=this.option("enabled");if("auto"===o){const e=this.instance.carousel;let t=0;if(e)for(const i of e.slides)(i.panzoom||"image"===i.type)&&t++;t||(o=!1)}o||(i=void 0);let n=0;const a={left:[],middle:[],right:[]};if(i)for(const e of["left","middle","right"])for(const s of i[e]){const i=this.createEl(s);i&&(null===(t=a[e])||void 0===t||t.push(i),n++)}let r=null;if(n&&(r=this.createContainer()),r){for(const[e,t]of Object.entries(a)){const i=document.createElement("div");T(i,Ve+"__column is-"+e);for(const e of t)i.appendChild(e);"auto"!==s||"middle"!==e||t.length||(s=!0),r.appendChild(i)}!0===s&&T(r,"is-absolute"),this.state=Xe.Ready,this.onRefresh()}else this.state=Xe.Disabled}onClick(e){var t,i;const s=this.instance,o=s.getSlide(),n=null==o?void 0:o.panzoom,a=e.target,r=a&&k(a)?a.dataset:null;if(!r)return;if(void 0!==r.fancyboxToggleThumbs)return e.preventDefault(),e.stopPropagation(),void(null===(t=s.plugins.Thumbs
4)||void 0===t||t.toggle());if(void 0!==r.fancyboxToggleFullscreen)return e.preventDefault(),e.stopPropagation(),void this.instance.toggleFullscreen();if(void 0!==r.fancyboxToggleSlideshow){e.preventDefault(),e.stopPropagation();const t=null===(i=s.carousel)||void 0===i?void 0:i.plugins.Autoplay;let o=t.isActive;return n&&"mousemove"===n.panMode&&!o&&n.reset(),void(o?t.stop():t.start())}const l=r.panzoomAction,c=r.panzoomChange;if((c||l)&&(e.preventDefault(),e.stopPropagation()),c){let t={};try{t=JSON.parse(c)}catch(e){}n&&n.applyChange(t)}else l&&n&&n[l]&&n[l]()}onChange(){this.onRefresh()}onRefresh(){if(this.instance.isClosing())return;const e=this.container;if(!e)return;const t=this.instance.getSlide();if(!t||t.state!==ae.Ready)return;const i=t&&!t.error&&t.panzoom;for(const t of e.querySelectorAll("[data-panzoom-action]"))i?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));let s=i&&i.canZoomIn(),o=i&&i.canZoomOut();for(const t of e.querySelectorAll('[data-panzoom-action="zoomIn"]'))s?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));for(const t of e.querySelectorAll('[data-panzoom-action="zoomOut"]'))o?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));for(const t of e.querySelectorAll('[data-panzoom-action="toggleZoom"],[data-panzoom-action="iterateZoom"]')){o||s?(t.removeAttribute("disabled"),t.removeAttribute("tabindex")):(t.setAttribute("disabled",""),t.setAttribute("tabindex","-1"));const e=t.querySelector("g");e&&(e.style.display=s?"":"none")}}onDone(e,t){var i;null===(i=t.panzoom)||void 0===i||i.on("afterTransform",(()=>{this.instance.isCurrentSlide(t)&&this.onRefresh()})),this.instance.isCurrentSlide(t)&&this.onRefresh()}createContainer(){const e=this.instance.container;if(!e)return null;const t=this.option("parentEl")||e;let i=t.querySelector("."+Ve);return i||(i=document.createElement("div"),T(i,Ve),t.prepend(i)),i.addEventListener("click",this.onClick,{passive:!1,capture:!0}),e&&T(e,Ue),this.container=i,i}createEl(e){const t=this.instance,i=t.carousel;if(!i)return null;if("toggleFS"===e)return null;if("fullscreen"===e&&!se())return null;let s=null;const n=i.slides.length||0;let a=0,r=0;for(const e of i.slides)(e.panzoom||"image"===e.type)&&a++,("image"===e.type||e.downloadSrc)&&r++;if(n<2&&["infobar","prev","next"].includes(e))return s;if(void 0!==We[e]&&!a)return null;if("download"===e&&!r)return null;if("thumbs"===e){const e=t.plugins.Thumbs;if(!e||!e.isEnabled)return null}if("slideshow"===e&&(!i.plugins.Autoplay||n<2))return null;if(void 0!==We[e]){const t=We[e];s=document.createElement("button"),s.setAttribute("title",this.instance.localize(`{{${e.toUpperCase()}}}`)),T(s,"f-button"),t.action&&(s.dataset.panzoomAction=t.action),t.change&&(s.dataset.panzoomChange=JSON.stringify(t.change)),s.appendChild(o(this.instance.localize(t.icon)))}else{const t=(this.option("items")||[])[e];t&&(s=o(this.instance.localize(t.tpl)),"function"==typeof t.click&&s.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),"function"==typeof t.click&&t.click.call(this,this,e)})))}const l=null==s?void 0:s.querySelector("svg");if(l)for(const[e,t]of Object.entries(Ye))l.getAttribute(e)||l.setAttribute(e,String(t));return s}removeContainer(){const e=this.container;e&&e.remove(),this.container=null,this.state=Xe.Disabled;const t=this.instance.container;t&&x(t,Ue)}attach(){const e=this,t=e.instance;t.on("Carousel.initSlides",e.onReady),t.on("done",e.onDone),t.on(["reveal","Carousel.change"],e.onChange),e.onReady(e.instance)}detach(){const e=this,t=e.instance;t.off("Carousel.initSlides",e.onReady),t.off("done",e.onDone),t.off(["reveal","Carousel.change"],e.onChange),e.removeContainer()}}Object.defineProperty(Ze,"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>
4<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}});const Ge={Hash:class extends ${onReady(){le=!1}onChange(e){de&&clearTimeout(de);const{hash:t}=he(),{hash:i}=ue(),s=e.isOpeningSlide(e.getSlide());s&&(re=i===t?"":i),t&&t!==i&&(de=setTimeout((()=>{try{if(e.state===ne.Ready){let e="replaceState";s&&!ce&&(e="pushState",ce=!0),window.history[e]({},document.title,window.location.pathname+window.location.search+t)}}catch(e){}}),300))}onClose(e){if(de&&clearTimeout(de),!le&&ce)return ce=!1,le=!1,void window.history.back();if(!le)try{window.history.replaceState({},document.title,window.location.pathname+window.location.search+(re||""))}catch(e){}}attach(){const e=this.instance;e.on("ready",this.onReady),e.on(["Carousel.ready","Carousel.change"],this.onChange),e.on("close",this.onClose)}detach(){const e=this.instance;e.off("ready",this.onReady),e.off(["Carousel.ready","Carousel.change"],this.onChange),e.off("close",this.onClose)}static parseURL(){return ue()}static startFromUrl(){pe()}static destroy(){window.removeEventListener("hashchange",ge,!1)}},Html:Ee,Images:be,Slideshow:Le,Thumbs:Be,Toolbar:Ze},Ke="with-fancybox",Je="hide-scrollbar",Qe="--fancybox-scrollbar-compensate",et="--fancybox-body-margin",tt="aria-hidden",it="is-using-tab",st="is-animated",ot="is-compact",nt="is-loading",at="is-opening",rt="has-caption",lt="disabled",ct="tabindex",dt="download",ht="href",ut="src",pt=e=>"string"==typeof e,ft=function(){var e=window.getSelection();return!!e&&"Range"===e.type};let gt,mt=null,vt=null,bt=0,yt=0,wt=0,St=0;const Ct=new Map;let kt=0;class xt extends m{get isIdle(){return this.idle}get isCompact(){return this.option("compact")}constructor(e=[],t={},i={}){super(t),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:ne.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}),gt||(gt=se()),this.id=t.id||++kt,Ct.set(this.id,this),this.userSlides=e,this.userPlugins=i,queueMicrotask((()=>{this.init()}))}init(){if(this.state===ne.Destroy)return;this.state=ne.Init,this.attachPlugins(Object.assign(Object.assign({}
4,xt.Plugins),this.userPlugins)),this.emit("init"),this.emit("attachPlugins"),!0===this.option("hideScrollbar")&&(()=>{if(!Q)return;const e=document,t=e.body,i=e.documentElement;if(t.classList.contains(Je))return;let s=window.innerWidth-i.getBoundingClientRect().width;const o=parseFloat(window.getComputedStyle(t).marginRight);s<0&&(s=0),i.style.setProperty(Qe,`${s}px`),o&&t.style.setProperty(et,`${o}px`),t.classList.add(Je)})(),this.initLayout(),this.scale();const e=()=>{this.initCarousel(this.userSlides),this.state=ne.Ready,this.attachEvents(),this.emit("ready"),setTimeout((()=>{this.container&&this.container.setAttribute(tt,"false")}),16)};this.option("Fullscreen.autoStart")&&gt&&!gt.isFullscreen()?gt.request().then((()=>{this.startedFs=!0,e()})).catch((()=>e())):e()}initLayout(){var e,t;const i=this.option("parentEl")||document.body,s=o(this.localize(this.option("tpl.main")||""));if(s){if(s.setAttribute("id",`fancybox-${this.id}`),s.setAttribute("aria-label",this.localize("{{MODAL}}")),s.classList.toggle(ot,this.isCompact),T(s,this.option("mainClass")||""),T(s,at),this.container=s,this.footer=s.querySelector(".fancybox__footer"),i.appendChild(s),T(document.documentElement,Ke),mt&&vt||(mt=document.createElement("span"),T(mt,"fancybox-focus-guard"),mt.setAttribute(ct,"0"),mt.setAttribute(tt,"true"),mt.setAttribute("aria-label","Focus guard"),vt=mt.cloneNode(),null===(e=s.parentElement)||void 0===e||e.insertBefore(mt,s),null===(t=s.parentElement)||void 0===t||t.append(vt)),s.addEventListener("mousedown",(e=>{bt=e.pageX,yt=e.pageY,x(s,it)})),this.option("closeExisting"))for(const e of Ct.values())e.id!==this.id&&e.close();else this.option("animated")&&(T(s,st),setTimeout((()=>{this.isClosing()||x(s,st)}),350));this.emit("initLayout")}}initCarousel(e){const t=this.container;if(!t)return;const s=t.querySelector(".fancybox__carousel");if(!s)return;const o=this.carousel=new K(s,p({},{slides:e,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")||{}));o.on("*",((e,t,...i)=>{this.emit(`Carousel.${t}`,e,...i)})),o.on(["ready","change"],(()=>{this.manageCaption()})),this.on("Carousel.removeSlide",((e,t,i)=>{this.clearContent(i),i.state=void 0})),o.on("Panzoom.touchStart",(()=>{var e,t;this.isCompact||this.endIdle(),(null===(e=document.activeElement)||void 0===e?void 0:e.closest(".f-thumbs"))&&(null===(t=this.container)||void 0===t||t.focus())})),o.on("settle",(()=>{this.idleTimer||this.isCompact||!this.option("idle")||this.setIdle(),this.option("autoFocus")&&!this.isClosing&&this.checkFocus()})),this.option("dragToClose")&&(o.on("Panzoom.afterTransform",((e,t)=>{const s=this.getSlide();if(s&&i(s.el))return;const o=this.container;if(o){const e=Math.abs(t.current.f),i=e<1?"":Math.max(.5,Math.min(1,1-e/t.contentRect.fitHeight*1.5));o.style.setProperty("--fancybox-ts",i?"0s":""),o.style.setProperty("--fancybox-opacity",i+"")}})),o.on("Panzoom.touchEnd",((e,t,s)=>{var o;const n=this.getSlide();if(n&&i(n.el))return;if(t.isMobile&&document.activeElement&&-1!==["TEXTAREA","INPUT"].indexOf(null===(o=document.activeElement)||void 0===o?void 0:o.nodeName))return;const a=Math.abs(t.dragOffset.y);"y"===t.lockedAxis&&(a>=200||a>=50&&t.dragOffset.time<300)&&(s&&s.cancelable&&s.preventDefault(),this.close(s,"f-throwOut"+(t.current.f<0?"Up":"Down")))}))),o.on("change",(e=>{var t;let i=null===(t=this.getSlide())||void 0===t?void 0:t.triggerEl;if(i){const t=new CustomEvent("slideTo",{bubbles:!0,cancelable:!0,detail:e.page});i.dispatchEvent(t)}})),o.on(["refresh","change"],(e=>{const t=this.container;if(!t)return;for(const i of t.querySelectorAll("[data-fancybox-current-index]"))i.innerHTML=e.page+1;for(const i of t.querySelectorAll("[data-fancybox-count]"))i.innerHTML=e.pages.length;if(!e.isInfinite){for(const i of t.querySelectorAll("[data-fancybox-next]"))e.page<e.pages.length-1?(i.removeAttribute(lt),i.removeAttribute(ct)):(i.setAttribute(lt,""),i.setAttribute(ct,"-1"));for(const i of t.querySelectorAll("[data-fancybox-prev]"))e.page>0?(i.removeAttribute(lt),i.removeAttribute(ct)):(i.setAttribute(lt,""),i.setAttribute(ct,"-1"))}const i=this.getSlide();if(!i)return;let s=i.downloadSrc||"";s||"image"!==i.type||i.error||!pt(i[ut])||(s=i[ut]);for(const e of t.querySelectorAll("[data-fancybox-download]")){const t=i.downloadFilename;s?(e.removeAttribute(lt),e.removeAttribute(ct),e.setAttribute(ht,s),e.setAttribute(dt,t||s),e.setAttribute("target","_blank")):(e.setAttribute(lt,""),e.setAttribute(ct,"-1"),e.removeAttribute(ht),e.removeAttribute(dt))}}
4)),this.emit("initCarousel")}attachEvents(){const e=this,t=e.container;if(!t)return;t.addEventListener("click",e.onClick,{passive:!1,capture:!1}),t.addEventListener("wheel",e.onWheel,{passive:!1,capture:!1}),document.addEventListener("keydown",e.onKeydown,{passive:!1,capture:!0}),document.addEventListener("visibilitychange",e.onVisibilityChange,!1),document.addEventListener("mousemove",e.onMousemove),e.option("trapFocus")&&document.addEventListener("focus",e.onFocus,!0),window.addEventListener("resize",e.onResize);const i=window.visualViewport;i&&(i.addEventListener("scroll",e.onResize),i.addEventListener("resize",e.onResize))}detachEvents(){const e=this,t=e.container;if(!t)return;document.removeEventListener("keydown",e.onKeydown,{passive:!1,capture:!0}),t.removeEventListener("wheel",e.onWheel,{passive:!1,capture:!1}),t.removeEventListener("click",e.onClick,{passive:!1,capture:!1}),document.removeEventListener("mousemove",e.onMousemove),window.removeEventListener("resize",e.onResize);const i=window.visualViewport;i&&(i.removeEventListener("resize",e.onResize),i.removeEventListener("scroll",e.onResize)),document.removeEventListener("visibilitychange",e.onVisibilityChange,!1),document.removeEventListener("focus",e.onFocus,!0)}scale(){const e=this.container;if(!e)return;const t=window.visualViewport,i=Math.max(1,(null==t?void 0:t.scale)||1);let s="",o="",n="";if(t&&i>1){let e=`${t.offsetLeft}px`,a=`${t.offsetTop}px`;s=t.width*i+"px",o=t.height*i+"px",n=`translate3d(${e}, ${a}, 0) scale(${1/i})`}e.style.transform=n,e.style.width=s,e.style.height=o}onClick(e){var t;const{container:i,isCompact:s}=this;if(!i||this.isClosing())return;!s&&this.option("idle")&&this.resetIdle();const o=e.composedPath()[0]
5;if(o.closest(".fancybox-spinner")||o.closest("[data-fancybox-close]"))return e.preventDefault(),void this.close(e);if(o.closest("[data-fancybox-prev]"))return e.preventDefault(),void this.prev();if(o.closest("[data-fancybox-next]"))return e.preventDefault(),void this.next();if("click"===e.type&&0===e.detail)return;if(Math.abs(e.pageX-bt)>30||Math.abs(e.pageY-yt)>30)return;const n=document.activeElement;if(ft()&&n&&i.contains(n))return;if(s&&"image"===(null===(t=this.getSlide())||void 0===t?void 0:t.type))return void(this.clickTimer?(clearTimeout(this.clickTimer),this.clickTimer=null):this.clickTimer=setTimeout((()=>{this.toggleIdle(),this.clickTimer=null}),350));if(this.emit("click",e),e.defaultPrevented)return;let a=!1;if(o.closest(".fancybox__content")){if(n){if(n.closest("[contenteditable]"))return;o.matches(te)||n.blur()}if(ft())return;a=this.option("contentClick")}else o.closest(".fancybox__carousel")&&!o.matches(te)&&(a=this.option("backdropClick"));"close"===a?(e.preventDefault(),this.close(e)):"next"===a?(e.preventDefault(),this.next()):"prev"===a&&(e.preventDefault(),this.prev())}onWheel(e){const t=e.target;let i=this.option("wheel",e);t.closest(".fancybox__thumbs")&&(i="slide");const o="slide"===i,n=[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce((function(e,t){return Math.abs(t)>Math.abs(e)?t:e})),a=Math.max(-1,Math.min(1,n)),r=Date.now();this.pwt&&r-this.pwt<300?o&&e.preventDefault():(this.pwt=r,this.emit("wheel",e,a),e.defaultPrevented||("close"===i?(e.preventDefault(),this.close(e)):"slide"===i&&(s(t)||(e.preventDefault(),this[a>0?"prev":"next"]()))))}onScroll(){window.scrollTo(wt,St)}onKeydown(e){if(!this.isTopmost())return;this.isCompact||!this.option("idle")||this.isClosing()||this.resetIdle();const t=e.key,i=this.option("keyboard");if(!i)return;const s=e.composedPath()[0],o=document.activeElement&&document.activeElement.classList,n=o&&o.contains("f-button")||s.dataset.carouselPage||s.dataset.carouselIndex;if("Escape"!==t&&!n&&k(s)&&(s.isContentEditable||-1!==["TEXTAREA","OPTION","INPUT","SELECT","VIDEO"].indexOf(s.nodeName)))return;if("Tab"===e.key?T(this.container,it):x(this.container,it),e.ctrlKey||e.altKey||e.shiftKey)return;this.emit("keydown",t,e);const a=i[t];a&&"function"==typeof this[a]&&(e.preventDefault(),this[a]())}onResize(){const e=this.container;if(!e)return;const t=this.isCompact;e.classList.toggle(ot,t),this.manageCaption(this.getSlide()),this.isCompact?this.clearIdle():this.endIdle(),this.scale(),this.emit
5("resize")}onFocus(e){this.isTopmost()&&this.checkFocus(e)}onMousemove(e){this.prevMouseMoveEvent=e,!this.isCompact&&this.option("idle")&&this.resetIdle()}onVisibilityChange(){"visible"===document.visibilityState?this.checkFocus():this.endIdle()}manageCloseBtn(e){const t=this.optionFor(e,"closeButton")||!1;if("auto"===t){const e=this.plugins.Toolbar;if(e&&e.state===Xe.Ready)return}if(!t)return;if(!e.contentEl||e.closeBtnEl)return;const i=this.option("tpl.closeButton");if(i){const t=o(this.localize(i));e.closeBtnEl=e.contentEl.appendChild(t),e.el&&T(e.el,"has-close-btn")}}manageCaption(e=void 0){var t,i;const s="fancybox__caption",o=this.container;if(!o)return;x(o,rt);const n=this.isCompact||this.option("commonCaption"),a=!n;if(this.caption&&this.stop(this.caption),a&&this.caption&&(this.caption.remove(),this.caption=null),n&&!this.caption)for(const e of(null===(t=this.carousel)||void 0===t?void 0:t.slides)||[])e.captionEl&&(e.captionEl.remove(),e.captionEl=void 0,x(e.el,rt),null===(i=e.el)||void 0===i||i.removeAttribute("aria-labelledby"));if(e||(e=this.getSlide()),!e||n&&!this.isCurrentSlide(e))return;const r=e.el;let l=this.optionFor(e,"caption","");if(!l)return void(n&&this.caption&&this.animate(this.caption,"f-fadeOut",(()=>{this.caption&&(this.caption.innerHTML="")})));let c=null;if(a){if(c=e.captionEl||null,r&&!c){const t=s+`_${this.id}_${e.index}`;c=document.createElement("div"),T(c,s),c.setAttribute("id",t),e.captionEl=r.appendChild(c),T(r,rt),r.setAttribute("aria-labelledby",t)}}else c=this.caption,c||(c=o.querySelector("."+s)),c||(c=document.createElement("div"),c.dataset.fancyboxCaption="",T(c,s),(this.footer||o).prepend(c)),T(o,rt),this.caption=c;c&&(c.innerHTML="",pt(l)||"number"==typeof l?c.innerHTML=l+"":l instanceof HTMLElement&&c.appendChild(l))}checkFocus(e){this.focus(e)}focus(e){var t;if(this.ignoreFocusChange)return;const i=document.activeElement||null,s=(null==e?void 0:e.target)||null,o=this.container,n=null===(t=this.carousel)||void 0===t?void 0:t.viewport;if(!o||!n)return;if(!e&&i&&o.contains(i))return;const a=this.getSlide(),r=a&&a.state===ae.Ready?a.el:null;if(!r||r.contains(i)||o===i)return;e&&e.cancelable&&e.preventDefault(),this.ignoreFocusChange=!0;const l=Array.from(o.querySelectorAll(te));let c=[],d=null;for(let e of l){const t=!e.offsetParent||!!e.closest('[aria-hidden="true"]'),i=r&&r.contains(e),s=!n.contains(e);if(e===o||(i||s)&&!t){c.push(e);const t=e.dataset.origTabindex;void 0!==t&&t&&(e.tabIndex=parseFloat(t)),e.removeAttribute("data-orig-tabindex"),!e.hasAttribute("autoFocus")&&d||(d=e)}else{const t=void 0===e.dataset.origTabindex?e.getAttribute("tabindex")||"":e.dataset.origTabindex;t&&(e.dataset.origTabindex=t),e.tabIndex=-1}}let h=null;e?(!s||c.indexOf(s)<0)&&(h=d||o,c.length&&(i===vt?h=c[0]:this.lastFocus!==o&&i!==mt||(h=c[c.length-1]))):h=a&&"image"===a.type?o:d||o,h&&ie(h),this.lastFocus=document.activeElement,this.ignoreFocusChange=!1}next(){const e=this.carousel;e&&e.pages.length>1&&e.slideNext()}prev(){const e=this.carousel;e&&e.pages.length>1&&e.slidePrev()}jumpTo(...e){this.carousel&&this.carousel.slideTo(...e)}isTopmost(){var e;return(null===(e=xt.getInstance())||void 0===e?void 0:e.id)==this.id}animate(e=null,t="",i){if(!e||!t)return void(i&&i());this.stop(e);const s=o=>{o.target===e&&e.dataset.animationName&&(e.removeEventListener("animationend",s),delete e.dataset.animationName,i&&i(),x(e,t))};e.dataset.animationName=t,e.addEventListener("animationend",s),T(e,t)}stop(e){e&&e.dispatchEvent(new CustomEvent("animationend",{bubbles:!1,cancelable:!0,currentTarget:e}))}setContent(e,t="",i=!0){if(this.isClosing())return;const s=e.el;if(!s)return;let n=null;if(k(t)?n=t:(n=o(t+""),k(n)||(n=document.createElement("div"),n.innerHTML=t+"")),["img","picture","iframe","video","audio"].includes(n.nodeName.toLowerCase())){const e=document.createElement("div");e.appendChild(n),n=e}k(n)&&e.filter&&!e.error&&(n=n.querySelector(e.filter)),n&&k(n)?(T(n,"fancybox__content"),e.id&&n.setAttribute("id",e.id),s.classList.add(`has-${e.error?"error":e.type||"unknown"}`),s.prepend(n),"none"===n.style.display&&(n.style.display=""),"none"===getComputedStyle(n).getPropertyValue("display")&&(n.style.display=e.display||this.option("defaultDisplay")||"flex"),e.contentEl=n,i&&this.revealContent(e),this.manageCloseBtn(e),this.manageCaption(e)):this.setError(e,"{{ELEMENT_NOT_FOUND}}")}revealContent(e,t){const i=e.el,s=e.contentEl;
5i&&s&&(this.emit("reveal",e),this.hideLoading(e),e.state=ae.Opening,(t=this.isOpeningSlide(e)?void 0===t?this.optionFor(e,"showClass"):t:"f-fadeIn")?this.animate(s,t,(()=>{this.done(e)})):this.done(e))}done(e){this.isClosing()||(e.state=ae.Ready,this.emit("done",e),T(e.el,"is-done"),this.isCurrentSlide(e)&&this.option("autoFocus")&&queueMicrotask((()=>{var t;null===(t=e.panzoom)||void 0===t||t.updateControls(),this.option("autoFocus")&&this.focus()})),this.isOpeningSlide(e)&&(x(this.container,at),!this.isCompact&&this.option("idle")&&this.setIdle()))}isCurrentSlide(e){const t=this.getSlide();return!(!e||!t)&&t.index===e.index}isOpeningSlide(e){var t,i;return null===(null===(t=this.carousel)||void 0===t?void 0:t.prevPage)&&e&&e.index===(null===(i=this.getSlide())||void 0===i?void 0:i.index)}showLoading(e){e.state=ae.Loading;const t=e.el;t&&(T(t,nt),this.emit("loading",e),e.spinnerEl||setTimeout((()=>{if(!this.isClosing()&&!e.spinnerEl&&e.state===ae.Loading){let i=o(C);T(i,"fancybox-spinner"),e.spinnerEl=i,t.prepend(i),this.animate(i,"f-fadeIn")}}),250))}hideLoading(e){const t=e.el;if(!t)return;const i=e.spinnerEl;this.isClosing()?null==i||i.remove():(x(t,nt),i&&this.animate(i,"f-fadeOut",(()=>{i.remove()}
5)),e.state===ae.Loading&&(this.emit("loaded",e),e.state=ae.Ready))}setError(e,t){if(this.isClosing())return;const i=new Event("error",{bubbles:!0,cancelable:!0});if(this.emit("error",i,e),i.defaultPrevented)return;e.error=t,this.hideLoading(e),this.clearContent(e);const s=document.createElement("div");s.classList.add("fancybox-error"),s.innerHTML=this.localize(t||"<p>{{ERROR}}</p>"),this.setContent(e,s)}clearContent(e){if(void 0===e.state)return;this.emit("clearContent",e),e.contentEl&&(e.contentEl.remove(),e.contentEl=void 0);const t=e.el;t&&(x(t,"has-error"),x(t,"has-unknown"),x(t,`has-${e.type||"unknown"}`)),e.closeBtnEl&&e.closeBtnEl.remove(),e.closeBtnEl=void 0,e.captionEl&&e.captionEl.remove(),e.captionEl=void 0,e.spinnerEl&&e.spinnerEl.remove(),e.spinnerEl=void 0}getSlide(){var e;const t=this.carousel;return(null===(e=null==t?void 0:t.pages[null==t?void 0:t.page])||void 0===e?void 0:e.slides[0])||void 0}close(e,t){if(this.isClosing())return;const i=new Event("shouldClose",{bubbles:!0,cancelable:!0});if(this.emit("shouldClose",i,e),i.defaultPrevented)return;e&&e.cancelable&&(e.preventDefault(),e.stopPropagation());const s=()=>{this.proceedClose(e,t)};this.startedFs&&gt&&gt.isFullscreen()?Promise.resolve(gt.exit()).then((()=>s())):s()}clearIdle(){this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=null}setIdle(e=!1){const t=()=>{this.clearIdle(),this.idle=!0,T(this.container,"is-idle"),this.emit("setIdle")};if(this.clearIdle(),!this.isClosing())if(e)t();else{const e=this.option("idle");e&&(this.idleTimer=setTimeout(t,e))}}endIdle(){this.clearIdle(),this.idle&&!this.isClosing()&&(this.idle=!1,x(this.container,"is-idle"),this.emit("endIdle"))}resetIdle(){this.endIdle(),this.setIdle()}toggleIdle(){this.idle?this.endIdle():this.setIdle(!0)}toggleFullscreen(){gt&&(gt.isFullscreen()?gt.exit():gt.request().then((()=>{this.startedFs=!0})))}isClosing(){return[ne.Closing,ne.CustomClosing,ne.Destroy].includes(this.state)}proceedClose(e,t){var i,s;this.state=ne.Closing,this.clearIdle(),this.detachEvents();const o=this.container,n=this.carousel,a=this.getSlide(),r=a&&this.option("placeFocusBack")?a.triggerEl||this.option("triggerEl"):null;if(r&&(J(r)?ie(r):r.focus()),o&&(x(o,at),T(o,"is-closing"),o.setAttribute(tt,"true"),this.option("animated")&&T(o,st),o.style.pointerEvents="none"),n){n.clearTransitions(),null===(i=n.panzoom)||void 0===i||i.destroy(),null===(s=n.plugins.Navigation)||void 0===s||s.detach();for(const e of n.slides){e.state=ae.Closing,this.hideLoading(e);const t=e.contentEl;t&&this.stop(t);const i=null==e?void 0:e.panzoom;i&&(i.stop(),i.detachEvents(),i.detachObserver()),this.isCurrentSlide(e)||n.emit("removeSlide",e)}}wt=window.scrollX,St=window.scrollY,window.addEventListener("scroll",this.onScroll),this.emit("close",e),this.state!==ne.CustomClosing?(void 0===t&&a&&(t=this.optionFor(a,"hideClass")),t&&a?(this.animate(a.contentEl,t,(()=>{n&&n.emit("removeSlide",a)})),setTimeout((()=>{this.destroy()}),500)):this.destroy()):setTimeout((()=>{this.destroy()}),500)}destroy(){var e;if(this.state===ne.Destroy)return;window.removeEventListener("scroll",this.onScroll),this.state=ne.Destroy,null===(e=this.carousel)||void 0===e||e.destroy();const t=this.container;t&&t.remove(),Ct.delete(this.id);const i=xt.getInstance();i?i.focus():(mt&&(mt.remove(),mt=null),vt&&(vt.remove(),vt=null),x(document.documentElement,Ke),(()=>{if(!Q)return;const e=document,t=e.body;t.classList.remove(Je),t.style.setProperty(et,""),e.documentElement.style.setProperty(Qe,"")})(),this.emit("destroy"))}static bind(e,t,i){if(!Q)return;let s,o="",n={};if(void 0===e?s=document.body:pt(e)?(s=document.body,o=e,"object"==typeof t&&(n=t||{})):(s=e,pt(t)&&(o=t),"object"==typeof i&&(n=i||{})),!s||!k(s))return;o=o||"[data-fancybox]";const a=xt.openers.get(s)||new Map;a.set(o,n),xt.openers.set(s,a),1===a.size&&s.addEventListener("click",xt.fromEvent)}static unbind(e,t){let i,s="";if(pt(e)?(i=document.body,s=e):(i=e,pt(t)&&(s=t)),!i)return;const o=xt.openers.get(i);o&&s&&o.delete(s),s&&o||(xt.openers.delete(i),i.removeEventListener("click",xt.fromEvent))}static destroy(){let e;for(;e=xt.getInstance();)e.destroy();for(const e of xt.openers.keys())e.removeEventListener("click",xt.from
5Event);xt.openers=new Map}static fromEvent(e){if(e.defaultPrevented)return;if(e.button&&0!==e.button)return;if(e.ctrlKey||e.metaKey||e.shiftKey)return;let t=e.composedPath()[0];const i=t.closest("[data-fancybox-trigger]");if(i){const e=i.dataset.fancyboxTrigger||"",s=document.querySelectorAll(`[data-fancybox="${e}"]`),o=parseInt(i.dataset.fancyboxIndex||"",10)||0;t=s[o]||t}if(!(t&&t instanceof Element))return;let s,o,n,a;if([...xt.openers].reverse().find((([e,i])=>!(!e.contains(t)||![...i].reverse().find((([i,r])=>{let l=t.closest(i);return!!l&&(s=e,o=i,n=l,a=r,!0)}))))),!s||!o||!n)return;a=a||{},e.preventDefault(),t=n;let r=[],l=p({},oe,a);l.event=e,l.triggerEl=t,l.delegate=i;const c=l.groupAll,d=l.groupAttr,h=d&&t?t.getAttribute(`${d}`):"";if((!t||h||c)&&(r=[].slice.call(s.querySelectorAll(o))),t&&!c&&(r=h?r.filter((e=>e.getAttribute(`${d}`)===h)):[t]),!r.length)return;const u=xt.getInstance();return u&&u.options.triggerEl&&r.indexOf(u.options.triggerEl)>-1?void 0:(t&&(l.startIndex=r.indexOf(t)),xt.fromNodes(r,l))}static fromSelector(e,t,i){let s=null,o="",n={};if(pt(e)?(s=document.body,o=e,"object"==typeof t&&(n=t||{})):e instanceof HTMLElement&&pt(t)&&(s=e,o=t,"object"==typeof i&&(n=i||{})),!s||!o)return!1;const a=xt.openers.get(s);return!!a&&(n=p({},a.get(o)||{},n),!!n&&xt.fromNodes(Array.from(s.querySelectorAll(o)),n))}static fromNodes(e,t){t=p({},oe,t||{});const i=[];for(const s of e){const e=s.dataset||{},o=e[ut]||s.getAttribute(ht)||s.getAttribute("currentSrc")||s.getAttribute(ut)||void 0;let n;const a=t.delegate;let r;a&&i.length===t.startIndex&&(n=a instanceof HTMLImageElement?a:a.querySelector("img:not([aria-hidden])")),n||(n=s instanceof HTMLImageElement?s:s.querySelector("img:not([aria-hidden])")),n&&(r=n.currentSrc||n[ut]||void 0,!r&&n.dataset&&(r=n.dataset.lazySrc||n.dataset[ut]||void 0));const l={src:o,triggerEl:s,thumbEl:n,thumbElSrc:r,thumbSrc:r};for(const t in e){let i=e[t]+"";i="false"!==i&&("true"===i||i),l[t]=i}i.push(l)}return new xt(i,t)}static getInstance(e){return e?Ct.get(e):Array.from(Ct.values()).reverse().find((e=>!e.isClosing()&&e))||null}static getSlide(){var e;return(null===(e=xt.getInstance())||void 0===e?void 0:e.getSlide())||null}static show(e=[],t={}){return new xt(e,t)}static next(){const e=xt.getInstance();e&&e.next()}static prev(){const e=xt.getInstance();e&&e.prev()}static close(e=!0,...t){if(e)for(const e of Ct.values())e.close(...t);else{const e=xt.getInstance();e&&e.close(...t)}}}Object.defineProperty(xt,"version",{enumerable:!0,configurable:!0,writable:!0,value:"5.0.36"}),Object.defineProperty(xt,"defaults",{enumerable:!0,configurable:!0,writable:!0,value:oe}),Object.defineProperty(xt,"Plugins",{enumerable:!0,configurable:!0,writable:!0,value:Ge}),Object.defineProperty(xt,"openers",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),e.Carousel=K,e.Fancybox=xt,e.Panzoom=I})),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,i){return void 0===i&&(i=typeof window<"u"?require("jquery"):require("jquery")(t)),e(i),i}:e(jQuery)}((function(e){"use strict";var t,i=window.Slick||{};t=0,(i=function(i,s){var o,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:e(i),appendDots:e(i),arrows:!0,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(t,i){return e('<button type="button"></button>').text(i+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},n.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,
5sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},e.extend(n,n.initials),n.activeBreakpoint=null,n.animType=null,n.animProp=null,n.breakpoints=[],n.breakpointSettings=[],n.cssTransitions=!1,n.focussed=!1,n.interrupted=!1,n.hidden="hidden",n.paused=!0,n.positionProp=null,n.respondTo=null,n.rowCount=1,n.shouldClick=!0,n.$slider=e(i),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,o=e(i).data("slick")||{},n.options=e.extend({},n.defaults,s,o),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,n.autoPlay=e.proxy(n.autoPlay,n),n.autoPlayClear=e.proxy(n.autoPlayClear,n),n.autoPlayIterator=e.proxy(n.autoPlayIterator,n),n.changeSlide=e.proxy(n.changeSlide,n),n.clickHandler=e.proxy(n.clickHandler,n),n.selectHandler=e.proxy(n.selectHandler,n),n.setPosition=e.proxy(n.setPosition,n),n.swipeHandler=e.proxy(n.swipeHandler,n),n.dragHandler=e.proxy(n.dragHandler,n),n.keyHandler=e.proxy(n.keyHandler,n),n.instanceUid=t++,n.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0)}).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false",tabindex:"0"}).find("a, input, button, select").attr({tabindex:"0"})},i.prototype.addSlide=i.prototype.slickAdd=function(t,i,s){var o=this;if("boolean"==typeof i)s=i,i=null;else if(i<0||i>=o.slideCount)return!1;o.unload(),"number"==typeof i?0===i&&0===o.$slides.length?e(t).appendTo(o.$slideTrack):s?e(t).insertBefore(o.$slides.eq(i)):e(t).insertAfter(o.$slides.eq(i)):!0===s?e(t).prependTo(o.$slideTrack):e(t).appendTo(o.$slideTrack),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slides.each((function(t,i){e(i).attr("data-slick-index",t)})),o.$slidesCache=o.$slides,o.reinit()},i.prototype.animateHeight=function(){var e=this;if(1===e.options.slidesToShow&&!0===e.options.adaptiveHeight&&!1===e.options.vertical){var t=e.$slides.eq(e.currentSlide).outerHeight(!0);e.$list.animate({height:t},e.options.speed)}},i.prototype.animateSlide=function(t,i){var s={},o=this;o.animateHeight(),!0===o.options.rtl&&!1===o.options.vertical&&(t=-t),!1===o.transformsEnabled?!1===o.options.vertical?o.$slideTrack.animate({left:t},o.options.speed,o.options.easing,i):o.$slideTrack.animate({top:t},o.options.speed,o.options.easing,i):!1===o.cssTransitions?(!0===o.options.rtl&&(o.currentLeft=-o.currentLeft),e({animStart:o.currentLeft}).animate({animStart:t},{duration:o.options.speed,easing:o.options.easing,step:function(e){e=Math.ceil(e),!1===o.options.vertical?(s[o.animType]="translate("+e+"px, 0)",o.$slideTrack.css(s)):(s[o.animType]="translate(0, "+e+"px)",o.$slideTrack.css(s))},complete:function(){i&&i.call()}})):(o.applyTransition(),t=Math.ceil(t),!1===o.options.vertical?s[o.animType]="translate3d("+t+"px, 0, 0)":s[o.animType]="translate3d(0, "+t+"px, 0)",o.$slideTrack.css(s),i&&setTimeout((function(){o.disableTransition(),i.call()}),o.options.speed))},i.prototype.getNavTarget=function(){var t=this.options.asNavFor;return t&&null!==t&&(t=e(t).not(this.$slider)),t},i.prototype.asNavFor=function(t){var i=this.getNavTarget();null!==i&&"object"==typeof i&&i.each((function(){var i=e(this).slick("getSlick");i.unslicked||i.slideHandler(t,!0)}))},i.prototype.applyTransition=function(e){var t=this,i={};!1===t.options.fade?i[t.transitionType]=t.transformType+" "+t.options.speed+"ms "+t.options.cssEase:i[t.transitionType]="opacity "+t.options.speed+"ms "+t.options.cssEase,!1===t.options.fade?t.$slideTrack.css(i):t.$slides.eq(e).css(i)},i.prototype.autoPlay=function(){var e=this;e.autoPlayClear(),e.slideCount>e.options.slidesToShow&&(e.autoPlayTimer=setInterval(e.autoPlayIterator,e.options.autoplaySpeed))},i.prototype.autoPlayClear=function(){this.autoPlayTimer&&clearInterval(this.autoPlayTimer)},i.prototype.autoPlayIterator=function(){var e=this,t=e.currentSlide+e.options.slidesToScroll;!e.paused&&!e.interrupted&&!e.focussed&&(!1===e.options.infinite&&(1===e.direction&&e.currentSlide+1===e.slideCount-1?e.direction=0:0===e.direction&&(t=e.currentSlide-e.options.slidesToScroll,e.currentSlide-1==0&&(e.direction=1))),e.slideHandler(t))},i.prototype.buildArrows=function(){var t=this;!0===t.options.arrows&&(t.$prevArrow=e(t.options.prevArrow).addClass("slick-arrow"),t.$nextArrow=e(t.options.nextArrow).addClass("slick-arrow"),t.slideCount>t.options.slidesToShow?(t.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),t.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.prependTo(t.options.appendArrows),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.appendTo(t.options.appendArrows),!0!==t.options.infinite&&t.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):t.$prevArrow.add(t.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},i.prototype.buildDots=function(){var t,i,s=this;if(!0===s.options.dots&&s.slideCount>s.options.slidesToShow){for(s.$slider.addClass("slick-dotted"),i=e("<ul></ul>").addClass(s.options.dotsClass),t=0;t<=s.getDotCount();t+=1)i.append(e("<li></li>").append(s.options.customPaging.call(this,s,t)));s.$dots=i.appendTo(s.options.appendDots),s.$dots.find("li").first().addClass("slick-active")}},i.prototype.buildOut=function(){var t=this;t.$slides=t.$slider.children(t.options.slide+":not(.slick-cloned)").addClass("slick-slide"),t.slideCount=t.$slides.length,t.$slides.each((function(t,i){e(i).attr("data-slick-index",t).data("originalStyling",e(i).attr("style")||"")})),t.$slider.addClass("slick-slider"),t.$slideTrack=0===t.slideCount?e('<div class="slick-track"></div>').appendTo(t.$slider):t.$slides.wrapAll('<div class="slick-track"></div>').parent(),t.$list=t.$slideTrack.wrap('<div class="slick-list"></div>').parent(),t.$slideTrack.css("opacity",0),(!0===t.options.centerMode||!0===t.options.swipeToSlide)&&(t.options.slidesToScroll=1),e("img[data-lazy]",t.$slider).not("[src]").addClass("slick-loading"),t.setupInfinite(),t.buildArrows(),t.buildDots(),t.updateDots(),t.setSlideClasses("number"==typeof t.currentSlide?t.currentSlide:0),!0===t.options.draggable&&t.$list.addClass("draggable")},i.prototype.buildRows=function(){var e,t,i,s,o,n,a,r=this;if(s=document.createDocumentFragment(),n=r.$slider.children(),r.options.rows>0){for(a=r.options.slidesPerRow*r.options.rows,o=Math.ceil(n.length/a),e=0;e<o;e++){var l=document.createElement("div");for(t=0;t<r.options.rows;t++){var c=document.createElement("div");for(i=0;i<r.options.slidesPerRow;i++){var d=e*a+(t*r.options.slidesPerRow+i);n.get(d)&&c.appendChild(n.get(d))}l.appendChild(c)}s.appendChild(l)}r.$slider.empty().append(s),r.$slider.children().children().children().css({width:100/r.o
5ptions.slidesPerRow+"%",display:"inline-block"})}},i.prototype.checkResponsive=function(t,i){var s,o,n,a=this,r=!1,l=a.$slider.width(),c=window.innerWidth||e(window).width();if("window"===a.respondTo?n=c:"slider"===a.respondTo?n=l:"min"===a.respondTo&&(n=Math.min(c,l)),a.options.responsive&&a.options.responsive.length&&null!==a.options.responsive){for(s in o=null,a.breakpoints)a.breakpoints.hasOwnProperty(s)&&(!1===a.originalSettings.mobileFirst?n<a.breakpoints[s]&&(o=a.breakpoints[s]):n>a.breakpoints[s]&&(o=a.breakpoints[s]));null!==o?null!==a.activeBreakpoint?(o!==a.activeBreakpoint||i)&&(a.activeBreakpoint=o,"unslick"===a.breakpointSettings[o]?a.unslick(o):(a.options=e.extend({},a.originalSettings,a.breakpointSettings[o]),!0===t&&(a.currentSlide=a.options.initialSlide),a.refresh(t)),r=o):(a.activeBreakpoint=o,"unslick"===a.breakpointSettings[o]?a.unslick(o):(a.options=e.extend({},a.originalSettings,a.breakpointSettings[o]),!0===t&&(a.currentSlide=a.options.initialSlide),a.refresh(t)),r=o):null!==a.activeBreakpoint&&(a.activeBreakpoint=null,a.options=a.originalSettings,!0===t&&(a.currentSlide=a.options.initialSlide),a.refresh(t),r=o),!t&&!1!==r&&a.$slider.trigger("breakpoint",[a,r])}},i.prototype.changeSlide=function(t,i){var s,o,n=this,a=e(t.currentTarget);switch(a.is("a")&&t.preventDefault(),a.is("li")||(a=a.closest("li")),s=n.slideCount%n.options.slidesToScroll!==0?0:(n.slideCount-n.currentSlide)%n.options.slidesToScroll,t.data.message){case"previous":o=0===s?n.options.slidesToScroll:n.options.slidesToShow-s,n.slideCount>n.options.slidesToShow&&n.slideHandler(n.currentSlide-o,!1,i);break;case"next":o=0===s?n.options.slidesToScroll:s,n.slideCount>n.options.slidesToShow&&n.slideHandler(n.currentSlide+o,!1,i);break;case"index":var r=0===t.data.index?0:t.data.index||a.index()*n.options.slidesToScroll;n.slideHandler(n.checkNavigable(r),!1,i),a.children().trigger("focus");break;default:return}},i.prototype.checkNavigable=function(e){var t,i;if(i=0,e>(t=this.getNavigableIndexes())[t.length-1])e=t[t.length-1];else for(var s in t){if(e<t[s]){e=i;break}i=t[s]}return e},i.prototype.cleanUpEvents=function(){var t=this;t.options.dots&&null!==t.$dots&&(e("li",t.$dots).off("click.slick",t.changeSlide).off("mouseenter.slick",e.proxy(t.interrupt,t,!0)).off("mouseleave.slick",e.proxy(t.interrupt,t,!1)),!0===t.options.accessibility&&t.$dots.off("keydown.slick",t.keyHandler)),t.$slider.off("focus.slick blur.slick"),!0===t.options.arrows&&t.slideCount>t.options.slidesToShow&&(t.$prevArrow&&t.$prevArrow.off("click.slick",t.changeSlide),t.$nextArrow&&t.$nextArrow.off("click.slick",t.changeSlide),!0===t.options.accessibility&&(t.$prevArrow&&t.$prevArrow.off("keydown.slick",t.keyHandler),t.$nextArrow&&t.$nextArrow.off("keydown.slick",t.keyHandler))),t.$list.off("touchstart.slick mousedown.slick",t.swipeHandler),t.$list.off("touchmove.slick mousemove.slick",t.swipeHandler),t.$list.off("touchend.slick mouseup.slick",t.swipeHandler),t.$list.off("touchcancel.slick mouseleave.
5slick",t.swipeHandler),t.$list.off("click.slick",t.clickHandler),e(document).off(t.visibilityChange,t.visibility),t.cleanUpSlideEvents(),!0===t.options.accessibility&&t.$list.off("keydown.slick",t.keyHandler),!0===t.options.focusOnSelect&&e(t.$slideTrack).children().off("click.slick",t.selectHandler),e(window).off("orientationchange.slick.slick-"+t.instanceUid,t.orientationChange),e(window).off("resize.slick.slick-"+t.instanceUid,t.resize),e("[draggable!=true]",t.$slideTrack).off("dragstart",t.preventDefault),e(window).off("load.slick.slick-"+t.instanceUid,t.setPosition)},i.prototype.cleanUpSlideEvents=function(){var t=this;t.$list.off("mouseenter.slick",e.proxy(t.interrupt,t,!0)),t.$list.off("mouseleave.slick",e.proxy(t.interrupt,t,!1))},i.prototype.cleanUpRows=function(){var e,t=this;t.options.rows>0&&((e=t.$slides.children().children()).removeAttr("style"),t.$slider.empty().append(e))},i.prototype.clickHandler=function(e){!1===this.shouldClick&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault())},i.prototype.destroy=function(t){var i=this;i.autoPlayClear(),i.touchObject={},i.cleanUpEvents(),e(".slick-cloned",i.$slider).detach(),i.$dots&&i.$dots.remove(),i.$prevArrow&&i.$prevArrow.length&&(i.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),i.htmlExpr.test(i.options.prevArrow)&&i.$prevArrow.remove()),i.$nextArrow&&i.$nextArrow.length&&(i.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),i.htmlExpr.test(i.options.nextArrow)&&i.$nextArrow.remove()),i.$slides&&(i.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each((function(){e(this).attr("style",e(this).data("originalStyling"))})),i.$slideTrack.children(this.options.slide).detach(),i.$slideTrack.detach(),i.$list.detach(),i.$slider.append(i.$slides)),i.cleanUpRows(),i.$slider.removeClass("slick-slider"),i.$slider.removeClass("slick-initialized"),i.$slider.removeClass("slick-dotted"),i.unslicked=!0,t||i.$slider.trigger("destroy",[i])},i.prototype.disableTransition=function(e){var t=this,i={};i[t.transitionType]="",!1===t.options.fade?t.$slideTrack.css(i):t.$slides.eq(e).css(i)},i.prototype.fadeSlide=function(e,t){var i=this;!1===i.cssTransitions?(i.$slides.eq(e).css({zIndex:i.options.zIndex}),i.$slides.eq(e).animate({opacity:1},i.options.speed,i.options.easing,t)):(i.applyTransition(e),i.$slides.eq(e).css({opacity:1,zIndex:i.options.zIndex}),t&&setTimeout((function(){i.disableTransition(e),t.call()}),i.options.speed))},i.prototype.fadeSlideOut=function(e){var t=this;!1===t.cssTransitions?t.$slides.eq(e).animate({opacity:0,zIndex:t.options.zIndex-2},t.options.speed,t.options.easing):(t.applyTransition(e),t.$slides.eq(e).css({opacity:0,zIndex:t.options.zIndex-2}))},i.prototype.filterSlides=i.prototype.slickFilter=function(e){var t=this;null!==e&&(t.$slidesCache=t.$slides,t.unload(),t.$slideTrack.children(this.options.slide).detach(),t.$slidesCache.filter(e).appendTo(t.$slideTrack),t.reinit())},i.prototype.focusHandler=function(){var t=this;t.$slider.off("focus.slick blur.slick").on("focus.slick","*",(function(i){var s=e(this);setTimeout((function(){t.options.pauseOnFocus&&s.is(":focus")&&(t.focussed=!0,t.autoPlay())}),0)})).on("blur.slick","*",(function(i){e(this);t.options.pauseOnFocus&&(t.focussed=!1,t.autoPlay())}))},i.prototype.getCurrent=i.prototype.slickCurrentSlide=function(){return this.currentSlide},i.prototype.getDotCount=function(){var e=this,t=0,i=0,s=0;if(!0===e.options.infinite)if(e.slideCount<=e.options.slidesToShow)++s;else for(;t<e.slideCount;)++s,t=i+e.options.slidesToScroll,i+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;else if(!0===e.options.centerMode)s=e.slideCount;else if(e.options.asNavFor)for(;t<e.slideCount;)++s,t=i+e.options.slidesToScroll,i+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;else s=1+Math.ceil((e.slideCount-e.options.slidesToShow)/e.options.slidesToScroll);return s-1},i.prototype.getLeft=function(e){var t,i,s,o,n=this,a=0;return n.slideOffset=0,i=n.$slides.first().outerHeight(!0),!0===n.options.infinite?(n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,o=-1,!0===n.options.vertical&&!0===n.options.centerMode&&(2===n.options.slidesToShow?o=-1.5:1===n.options.slidesToShow&&(o=-2)),a=i*n.options.slidesToShow*o),n.slideCount%n.options.slidesToScroll!==0&&e+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(e>n.slideCount?(n.slideOffset=(n.options.slidesToShow-(e-n.slideCount))*n.slideWidth*-1,a=(n.options.slidesToShow-(e-n.slideCount))*i*-1):(n.slideOffset=n.slideCount%n.options.slidesToScroll*n.slideWidth*-1,a=n.slideCount%n.options.slidesToScroll*i*-1))):e+n.options.slidesToShow>n.slideCount&&(n.slideOffset=(e+n.options.slidesToShow-n.slideCount)*n.slideWidth,a=(e+n.options.slidesToShow-n.slideCount)*i),n.slideCount<=n.options.slidesToShow&&(n.slideOffset=0,a=0),
6!0===n.options.centerMode&&n.slideCount<=n.options.slidesToShow?n.slideOffset=n.slideWidth*Math.floor(n.options.slidesToShow)/2-n.slideWidth*n.slideCount/2:!0===n.options.centerMode&&!0===n.options.infinite?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:!0===n.options.centerMode&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),t=!1===n.options.vertical?e*n.slideWidth*-1+n.slideOffset:e*i*-1+a,!0===n.options.variableWidth&&(s=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(e):n.$slideTrack.children(".slick-slide").eq(e+n.options.slidesToShow),t=!0===n.options.rtl?s[0]?-1*(n.$slideTrack.width()-s[0].offsetLeft-s.width()):0:s[0]?-1*s[0].offsetLeft:0,!0===n.options.centerMode&&(s=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(e):n.$slideTrack.children(".slick-slide").eq(e+n.options.slidesToShow+1),t=!0===n.options.rtl?s[0]?-1*(n.$slideTrack.width()-s[0].offsetLeft-s.width()):0:s[0]?-1*s[0].offsetLeft:0,t+=(n.$list.width()-s.outerWidth())/2)),t},i.prototype.getOption=i.prototype.slickGetOption=function(e){return this.options[e]},i.prototype.getNavigableIndexes=function(){var e,t=this,i=0,s=0,o=[];for(!1===t.options.infinite?e=t.slideCount:(i=-1*t.options.slidesToScroll,s=-1*t.options.slidesToScroll,e=2*t.slideCount);i<e;)o.push(i),i=s+t.options.slidesToScroll,s+=t.options.slidesToScroll<=t.options.slidesToShow?t.options.slidesToScroll:t.options.slidesToShow;return o},i.prototype.getSlick=function(){return this},i.prototype.getSlideCount=function(){var t,i,s,o=this;return s=!0===o.options.centerMode?Math.floor(o.$list.width()/2):0,i=-1*o.swipeLeft+s,!0===o.options.swipeToSlide?(o.$slideTrack.find(".slick-slide").each((function(s,n){var a,r;if(a=e(n).outerWidth(),r=n.offsetLeft,!0!==o.options.centerMode&&(r+=a/2),i<r+a)return t=n,!1})),Math.abs(e(t).attr("data-slick-index")-o.currentSlide)||1):o.options.slidesToScroll},i.prototype.goTo=i.prototype.slickGoTo=function(e,t){this.changeSlide({data:{message:"index",index:
6parseInt(e)}},t)},i.prototype.init=function(t){var i=this;e(i.$slider).hasClass("slick-initialized")||(e(i.$slider).addClass("slick-initialized"),i.buildRows(),i.buildOut(),i.setProps(),i.startLoad(),i.loadSlider(),i.initializeEvents(),i.updateArrows(),i.updateDots(),i.checkResponsive(!0),i.focusHandler()),t&&i.$slider.trigger("init",[i]),!0===i.options.accessibility&&i.initADA(),i.options.autoplay&&(i.paused=!1,i.autoPlay())},i.prototype.initADA=function(){var t=this,i=Math.ceil(t.slideCount/t.options.slidesToScroll),s=t.getNavigableIndexes().filter((function(e){return e>=0&&e<t.slideCount}));t.$slides.add(t.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==t.$dots&&(t.$slides.not(t.$slideTrack.find(".slick-cloned")).each((function(i){var o=s.indexOf(i);if(e(this).attr({role:"tabpanel",id:"slick-slide"+t.instanceUid+i,tabindex:-1}),-1!==o){var n="slick-slide-control"+t.instanceUid+o;e("#"+n).length&&e(this).attr({"aria-describedby":n})}})),t.$dots.attr("role","tablist").find("li").each((function(o){var n=s[o];e(this).attr({role:"presentation"}),e(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+t.instanceUid+o,"aria-controls":"slick-slide"+t.instanceUid+n,"aria-label":o+1+" / "+i,"aria-selected":null,tabindex:"-1"})})).eq(t.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var o=t.currentSlide,n=o+t.options.slidesToShow;o<n;o++)t.options.focusOnChange?t.$slides.eq(o).attr({tabindex:"0"}):t.$slides.eq(o).removeAttr("tabindex");t.activateADA()},i.prototype.initArrowEvents=function(){var e=this;!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},e.changeSlide),e.$nextArrow.off("click.slick").on("click.slick",{message:"next"},e.changeSlide),!0===e.options.accessibility&&(e.$prevArrow.on("keydown.slick",e.keyHandler),e.$nextArrow.on("keydown.slick",e.keyHandler)))},i.prototype.initDotEvents=function(){var t=this;!0===t.options.dots&&t.slideCount>t.options.slidesToShow&&(e("li",t.$dots).on("click.slick",{message:"index"},t.changeSlide),!0===t.options.accessibility&&t.$dots.on("keydown.slick",t.keyHandler)),!0===t.options.dots&&!0===t.options.pauseOnDotsHover&&t.slideCount>t.options.slidesToShow&&e("li",t.$dots).on("mouseenter.slick",e.proxy(t.interrupt,t,!0)).on("mouseleave.slick",e.proxy(t.interrupt,t,!1))},i.prototype.initSlideEvents=function(){var t=this;t.options.pauseOnHover&&(t.$list.on("mouseenter.slick",e.proxy(t.interrupt,t,!0)),t.$list.on("mouseleave.slick",e.proxy(t.interrupt,t,!1)))},i.prototype.initializeEvents=function(){var t=this;t.initArrowEvents(),t.initDotEvents(),t.initSlideEvents(),t.$list.on("touchstart.slick mousedown.slick",{action:"start"},t.swipeHandler),t.$list.on("touchmove.slick mousemove.slick",{action:"move"},t.swipeHandler),t.$list.on("touchend.slick mouseup.slick",{action:"end"}
6,t.swipeHandler),t.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},t.swipeHandler),t.$list.on("click.slick",t.clickHandler),e(document).on(t.visibilityChange,e.proxy(t.visibility,t)),!0===t.options.accessibility&&t.$list.on("keydown.slick",t.keyHandler),!0===t.options.focusOnSelect&&e(t.$slideTrack).children().on("click.slick",t.selectHandler),e(window).on("orientationchange.slick.slick-"+t.instanceUid,e.proxy(t.orientationChange,t)),e(window).on("resize.slick.slick-"+t.instanceUid,e.proxy(t.resize,t)),e("[draggable!=true]",t.$slideTrack).on("dragstart",t.preventDefault),e(window).on("load.slick.slick-"+t.instanceUid,t.setPosition),e(t.setPosition)},i.prototype.initUI=function(){var e=this;!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow.show(),e.$nextArrow.show()),!0===e.options.dots&&e.slideCount>e.options.slidesToShow&&e.$dots.show()},i.prototype.keyHandler=function(e){var t=this;e.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===e.keyCode&&!0===t.options.accessibility?t.changeSlide({data:{message:!0===t.options.rtl?"next":"previous"}}):39===e.keyCode&&!0===t.options.accessibility&&t.changeSlide({data:{message:!0===t.options.rtl?"previous":"next"}}))},i.prototype.lazyLoad=function(){var t,i,s,o=this;function n(t){e("img[data-lazy]",t).each((function(){var t=e(this),i=e(this).attr("data-lazy"),s=e(this).attr("data-srcset"),n=e(this).attr("data-sizes")||o.$slider.attr("data-sizes"),a=document.createElement("img");a.onload=function(){t.animate({opacity:0}
6,100,(function(){s&&(t.attr("srcset",s),n&&t.attr("sizes",n)),t.attr("src",i).animate({opacity:1},200,(function(){t.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")})),o.$slider.trigger("lazyLoaded",[o,t,i])}))},a.onerror=function(){t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),o.$slider.trigger("lazyLoadError",[o,t,i])},a.src=i}))}if(!0===o.options.centerMode?!0===o.options.infinite?s=(i=o.currentSlide+(o.options.slidesToShow/2+1))+o.options.slidesToShow+2:(i=Math.max(0,o.currentSlide-(o.options.slidesToShow/2+1)),s=o.options.slidesToShow/2+1+2+o.currentSlide):(i=o.options.infinite?o.options.slidesToShow+o.currentSlide:o.currentSlide,s=Math.ceil(i+o.options.slidesToShow),!0===o.options.fade&&(i>0&&i--,s<=o.slideCount&&s++)),t=o.$slider.find(".slick-slide").slice(i,s),"anticipated"===o.options.lazyLoad)for(var a=i-1,r=s,l=o.$slider.find(".slick-slide"),c=0;c<o.options.slidesToScroll;c++)a<0&&(a=o.slideCount-1),t=(t=t.add(l.eq(a))).add(l.eq(r)),a--,r++;n(t),o.slideCount<=o.options.slidesToShow?n(o.$slider.find(".slick-slide")):o.currentSlide>=o.slideCount-o.options.slidesToShow?n(o.$slider.find(".slick-cloned").slice(0,o.options.slidesToShow)):0===o.currentSlide&&n(o.$slider.find(".slick-cloned").slice(-1*o.options.slidesToShow))},i.prototype.loadSlider=function(){var e=this;e.setPosition(),e.$slideTrack.css({opacity:"1"}),e.$slider.removeClass("slick-loading"),e.initUI(),"progressive"===e.options.lazyLoad&&e.progressiveLazyLoad()},i.prototype.next=i.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},i.prototype.orientationChange=function(){this.checkResponsive(),this.setPosition()},i.prototype.pause=i.prototype.slickPause=function(){this.autoPlayClear(),this.paused=!0},i.prototype.play=i.prototype.slickPlay=function(){var e=this;e.autoPlay(),e.options.autoplay=!0,e.paused=!1,e.focussed=!1,e.interrupted=!1},i.prototype.postSlide=function(t){var i=this;!i.unslicked&&(i.$slider.trigger("afterChange",[i,t]),i.animating=!1,i.slideCount>i.options.slidesToShow&&i.setPosition(),i.swipeLeft=null,i.options.autoplay&&i.autoPlay(),!0===i.options.accessibility&&(i.initADA(),i.options.focusOnChange))&&e(i.$slides.get(i.currentSlide)).attr("tabindex",0).trigger("focus")},i.prototype.prev=i.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},i.prototype.preventDefault=function(e){e.preventDefault()},i.prototype.progressiveLazyLoad=function(t){t=t||1;var i,s,o,n,a,r=this,l=e("img[data-lazy]",r.$slider);l.length?(i=l.first(),s=i.attr("data-lazy"),o=i.attr("data-srcset"),n=i.attr("data-sizes")||r.$slider.attr("data-sizes"),(a=document.createElement("img")).onload=function(){o&&(i.attr("srcset",o),n&&i.attr("sizes",n)),i.attr("src",s).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===r.options.adaptiveHeight&&r.setPosition(),r.$slider.trigger("lazyLoaded",[r,i,s]),r.progressiveLazyLoad()},a.onerror=function(){t<3?setTimeout((function(){r.progressiveLazyLoad(t+1)}),500):(i.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),r.$slider.trigger("lazyLoadError",[r,i,s]),r.progressiveLazyLoad())},a.src=s):r.$slider.trigger("allImagesLoaded",[r])},i.prototype.refresh=function(t){var i,s,o=this;s=o.slideCount-o.options.slidesToShow,!o.options.infinite&&o.currentSlide>s&&(o.currentSlide=s),o.slideCount<=o.options.slidesToShow&&(o.currentSlide=0),i=o.currentSlide,o.destroy(!0),e.extend(o,o.initials,{currentSlide:i}),o.init(),t||o.changeSlide({data:{message:"index",index:i}},!1)},i.prototype.registerBreakpoints=function(){var e,t,i,s=this,o=s.options.responsive||null;if(Array.isArray(o)&&o.length){for(e in s.respondTo=s.options.respondTo||"window",o)if(i=s.breakpoints.length-1,o.hasOwnProperty(e)){for(t=o[e].breakpoint;i>=0;)s.breakpoints[i]&&s.breakpoints[i]===t&&s.breakpoints.splice(i,1),i--;s.breakpoints.push(t),s.breakpointSettings[t]=o[e].settings}s.breakpoints.sort((function(e,t){return s.options.mobileFirst?e-t:t-e}))}},i.prototype.reinit=function(){var t=this;t.$slides=t.$slideTrack.children(t.options.slide).addClass("slick-slide"),t.slideCount=t.$slides.length,t.currentSlide>=t.slideCount&&0!==t.currentSlide&&(t.currentSlide=t.currentSlide-t.options.slidesToScroll),t.slideCount<=t.options.slidesToShow&&(t.currentSlide=0),t.registerBreakpoints(),t.setProps(),t.setupInfinite(),t.buildArrows(),t.updateArrows(),t.initArrowEvents(),t.buildDots(),t.updateDots(),t.initDotEvents(),t.cleanUpSlideEvents(),t.initSlideEvents(),t.checkResponsive(!1,!0),!0===t.options.focusOnSelect&&e(t.$slideTrack).children().on("click.slick",t.selectHandler),t.setSlideClasses("number"==typeof t.currentSlide?t.currentSlide:0),t.setPosition(),t.focusHandler(),t.paused=!t.o
6ptions.autoplay,t.autoPlay(),t.$slider.trigger("reInit",[t])},i.prototype.resize=function(){var t=this;e(window).width()!==t.windowWidth&&(clearTimeout(t.windowDelay),t.windowDelay=window.setTimeout((function(){t.windowWidth=e(window).width(),t.checkResponsive(),t.unslicked||t.setPosition()}),50))},i.prototype.removeSlide=i.prototype.slickRemove=function(e,t,i){var s=this;if("boolean"==typeof e?e=!0===(t=e)?0:s.slideCount-1:e=!0===t?--e:e,s.slideCount<1||e<0||e>s.slideCount-1)return!1;s.unload(),!0===i?s.$slideTrack.children().remove():s.$slideTrack.children(this.options.slide).eq(e).remove(),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slidesCache=s.$slides,s.reinit()},i.prototype.setCSS=function(e){var t,i,s=this,o={};!0===s.options.rtl&&(e=-e),t="left"==s.positionProp?Math.ceil(e)+"px":"0",i="top"==s.positionProp?Math.ceil(e)+"px":"0",o[s.positionProp]=e,!1===s.transformsEnabled?s.$slideTrack.css(o):(o={},!1===s.cssTransitions?(o[s.animType]="translate("+t+", "+i+")",s.$slideTrack.css(o)):(o[s.animType]="translate3d("+t+", "+i+", 0)",s.$slideTrack.css(o)))},i.prototype.setDimensions=function(){var e=this;!1===e.options.vertical?!0===e.options.centerMode&&e.$list.css({padding:"0px "+e.options.centerPadding}):(e.$list.height(e.$slides.first().outerHeight(!0)*e.options.slidesToShow),!0===e.options.centerMode&&e.$list.css({padding:e.options.centerPadding+" 0px"})),e.listWidth=e.$list.width(),e.listHeight=e.$list.height(),!1===e.options.vertical&&!1===e.options.variableWidth?(e.slideWidth=Math.ceil(e.listWidth/e.options.slidesToShow),e.$slideTrack.width(Math.ceil(e.slideWidth*e.$slideTrack.children(".slick-slide").length))):!0===e.options.variableWidth?e.$slideTrack.width(5e3*e.slideCount):(e.slideWidth=Math.ceil(e.listWidth),e.$slideTrack.height(Math.ceil(e.$slides.first().outerHeight(!0)*e.$slideTrack.children(".slick-slide").length)));var t=e.$slides.first().outerWidth(!0)-e.$slides.first().width();!1===e.options.variableWidth&&e.$slideTrack.children(".slick-slide").width(e.slideWidth-t)},i.prototype.setFade=function(){var t,i=this;i.$slides.each((function(s,o){t=i.slideWidth*s*-1,!0===i.options.rtl?e(o).css({position:"relative",right:t,top:"0",zIndex:i.options.zIndex-2,opacity:"0"}):e(o).css({position:"relative",left:t,top:"0",zIndex:i.options.zIndex-2,opacity:"0"})})),i.$slides.eq(i.currentSlide).css({zIndex:i.options.zIndex-1,opacity:"1"})},i.prototype.setHeight=function(){var e=this;if(1===e.options.slidesToShow&&!0===e.options.adaptiveHeight&&!1===e.options.vertical){var t=e.$slides.eq(e.currentSlide).outerHeight(!0);e.$list.css("height",t+"px")}},i.prototype.setOption=i.prototype.slickSetOption=function(){var t,i,s,o,n,a=this,r=!1;if(e.isPlainObject(arguments[0])?(s=arguments[0],r=arguments[1],n="multiple"):"string"==typeof arguments[0]&&(s=arguments[0],o=arguments[1],r=arguments[2],"responsive"===arguments[0]&&Array.isArray(arguments[1])?n="responsive":typeof arguments[1]<"u"&&(n="single")),"single"===n)a.options[s]=o;else if("multiple"===n)e.each(s,(function(e,t){a.options[e]=t}));else if("responsive"===n)for(i in o)if(Array.isArray(a.options.responsive)){for(t=a.options.responsive.length-1;t>=0;)a.options.responsive[t].breakpoint===o[i].breakpoint&&a.options.responsive.splice(t,1),t--;a.options.responsive.push(o[i])}else a.options.responsive=[o[i]];r&&(a.unload(),a.reinit())},i.prototype.setPosition=function(){var e=this;e.setDimensions(),e.setHeight(),!1===e.options.fade?e.setCSS(e.getLeft(e.currentSlide)):e.setFade(),e.$slider.trigger("setPosition",[e])},i.prototype.setProps=function(){var e=this,t=document.body.style;e.positionProp=!0===e.options.vertical?"top":"left","top"===e.positionProp?e.$slider.addClass("slick-vertical"):e.$slider.removeClass("slick-vertical"),(void 0!==t.WebkitTransition||void 0!==t.MozTransition||void 0!==t.msTransition)&&!0===e.options.useCSS&&(e.cssTransitions=!0),e.options.fade&&("number"==typeof e.options.zIndex?e.options.zIndex<3&&(e.options.zIndex=3):e.options.zIndex=e.defaults.zIndex),void 0!==t.OTransform&&(e.animType="OTransform",e.transformType="-o-transform",e.transitionType="OTransition",void 0===t.perspectiveProperty&&void 0===t.webkitPerspective&&(e.animType=!1)),void 0!==t.MozTransform&&(e.animType="MozTransform",e.transformType="-moz-transform",e.transitionType="MozTransition",void 0===t.perspectiveProperty&&void 0===t.MozPerspective&&(e.animType=!1)),void 0!==t.webkitTransform&&(e.animType="webkitTransform",e.transformType="-webkit-transform",e.transitionType="webkitTransition",void 0===t.perspectiveProperty&&void 0===t.webkitPerspective&&(e.animType=!1)),void 0!==t.msTransform&&(e.animType="msTransform",e.transformType="-ms-transform",e.transitionType="msTransition",void 0===t.msTransform&&(e.animType=!1)),void 0!==t.transform&&!1!==e.animType&&(e.animType="transform",e.transformType="transform",e.transitionType="transition"),e.transformsEnabled=e.options.useTransform&&null!==e.animType&&!1!==e.animType},i.prototype.setSlideClasses=function(e){var t,i,s,o,n,a=this;(i=a.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),a.$slides.eq(e).addClass("slick-current"),!0===a.options.centerMode)?(a.options.slidesToShow>=a.$slides.length?(n=-1,t=a.options.slidesToShow=a.$slides.length):(n=a.options.slidesToShow%2==0?1:0,t=Math.floor(a.options.slidesToShow/2)),!0===a.options.infinite&&(e>=t&&e<=a.slideCount-1-t?a.$slides.slice(e-t+n,e+t+1).addClass("slick-active").attr("aria-hidden","false"):(s=a.options.slidesToShow+e,i.slice(s-t+1+n,s+t+2).addClass("slick-active").attr("aria-hidden","false")),0===e?i.eq(a.options.slidesToShow+a.slideCount+1).addClass("slick-center"):e===a.slideCount-1&&i.eq(a.options.slidesToShow).addClass("slick-center")),a.$slides.eq(e).addClass("slick-center")):e>=0&&e<=a.slideCount-a.options.slidesToShow?a.$slides.slice(e,e+a.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):i.length<=a.options.slidesToShow?i.addClass("slick-active").attr("aria-hidden","false"):(o=a.slideCount%a.options.slidesToShow,s=!0===a.options.infinite?a.options.slidesToShow+e:e,a.options.slidesToShow==a.options.slidesToScroll&&a.slideCount-e<a.options.slidesToShow?i.slice(s-(a.options.slidesToShow-o),s+o).addClass("slick-active").attr("aria-hidden","false"):i.slice(s,s+a.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));("ondemand"===a.options.lazyLoad||"anticipated"===a.options.lazyLoad)&&a.lazyLoad()},i.prototype.setupInfinite=function(){var t,i,s,o=this;if(!0===o.options.fade&&(o.options.centerMode=!1),!0===o.options.infinite&&!1===o.options.fade&&(i=null,o.slideCount>o.options.slidesToShow)){for(s=!0===o.options.centerMode?o.options.slidesToShow+1:o.options.slidesToShow,t=o.slideCount;t>o.slideCount-s;t-=1)i=t-1,e(o.$slides[i]).clone(!0).removeAttr("id").attr("data-slick-index",i-o.slideCount).prependTo(o.$slideTrack).addClass("slick-cloned");for(t=0;t<s+o.slideCount;t+=1)i=t,e(o.$slides[i]).clone(!0).removeAttr("id").attr("data-slick-index",i+o.slideCount).appendTo(o.$slideTrack).addClass("slick-cloned");o.$slideTrack.find(".slick-cloned").find("[id]").each((function(){e(this).removeAttr("id")}))}},i.prototype.interrupt=function(e){e||this.autoPlay(),this.interrupted=e},i.prototype.selectHandler=function(t){var i=this,s=e(t.target).is(".slick-slide")?e(t.target):e(t.target).parents(".slick-slide"),o=parseInt(s.attr("data-slick-index"));o||(o=0),i.slideCount<=i.options.slidesToShow?i.slideHandler(o,!1,!0):i.slideHandler(o)},i.prototype.slideHandler=function(e,t,i){var s,o,n,a,r,l=null,c=this;if(t=t||!1,!(!0===c.animating&&!0===c.options.waitForAnimate||!0===c.options.fade&&c.currentSlide===e)){if(!1===t&&c.asNavFor(e),s=e,l=c.getLeft(s),a=c.getLeft(c.
6currentSlide),c.currentLeft=null===c.swipeLeft?a:c.swipeLeft,!1===c.options.infinite&&!1===c.options.centerMode&&(e<0||e>c.getDotCount()*c.options.slidesToScroll))return void(!1===c.options.fade&&(s=c.currentSlide,!0!==i&&c.slideCount>c.options.slidesToShow?c.animateSlide(a,(function(){c.postSlide(s)})):c.postSlide(s)));if(!1===c.options.infinite&&!0===c.options.centerMode&&(e<0||e>c.slideCount-c.options.slidesToScroll))return void(!1===c.options.fade&&(s=c.currentSlide,!0!==i&&c.slideCount>c.options.slidesToShow?c.animateSlide(a,(function(){c.postSlide(s)})):c.postSlide(s)));if(c.options.autoplay&&clearInterval(c.autoPlayTimer),o=s<0?c.slideCount%c.options.slidesToScroll!==0?c.slideCount-c.slideCount%c.options.slidesToScroll:c.slideCount+s:s>=c.slideCount?c.slideCount%c.options.slidesToScroll!==0?0:s-c.slideCount:s,c.animating=!0,c.$slider.trigger("beforeChange",[c,c.currentSlide,o]),n=c.currentSlide,c.currentSlide=o,c.setSlideClasses(c.currentSlide),c.options.asNavFor&&((r=(r=c.getNavTarget()).slick("getSlick")).slideCount<=r.options.slidesToShow&&r.setSlideClasses(c.currentSlide)),c.updateDots(),c.updateArrows(),!0===c.options.fade)return!0!==i?(c.fadeSlideOut(n),c.fadeSlide(o,(function(){c.postSlide(o)}))):c.postSlide(o),void c.animateHeight();!0!==i&&c.slideCount>c.options.slidesToShow?c.animateSlide(l,(function(){c.postSlide(o)})):c.postSlide(o)}},i.prototype.startLoad=function(){var e=this;!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow.hide(),e.$nextArrow.hide()),!0===e.options.dots&&e.slideCount>e.options.slidesToShow&&e.$dots.hide(),e.$slider.addClass("slick-loading")},i.prototype.swipeDirection=function(){var e,t,i,s,o=this;return e=o.touchObject.startX-o.touchObject.curX,t=o.touchObject.startY-o.touchObject.curY,i=Math.atan2(t,e),(s=Math.round(180*i/Math.PI))<0&&(s=360-Math.abs(s)),s<=45&&s>=0||s<=360&&s>=315?!1===o.options.rtl?"left":"right":s>=135&&s<=225?!1===o.options.rtl?"right":"left":!0===o.options.verticalSwiping?s>=35&&s<=135?"down":"up":"vertical"},i.prototype.swipeEnd=function(e){var t,i,s=this;if(s.dragging=!1,s.swiping=!1,s.scrolling)return s.scrolling=!1,!1;if(s.interrupted=!1,s.shouldClick=!(s.touchObject.swipeLength>10),void 0===s.touchObject.curX)return!1;if(!0===s.touchObject.edgeHit&&s.$slider.trigger("edge",[s,s.swipeDirection()]),s.touchObject.swipeLength>=s.touchObject.minSwipe){switch(i=s.swipeDirection()){case"left":case"down":t=s.options.swipeToSlide?s.checkNavigable(s.currentSlide+s.getSlideCount()):s.currentSlide+s.getSlideCount(),s.currentDirection=0;break;case"right":case"up":t=s.options.swipeToSlide?s.checkNavigable(s.currentSlide-s.getSlideCount()):s.currentSlide-s.getSlideCount(),s.currentDirection=1}"vertical"!=i&&(s.slideHandler(t),s.touchObject={},s.$slider.trigger("swipe",[s,i]))}else s.touchObject.startX!==s.touchObject.curX&&(s.slideHandler(s.currentSlide),s.touchObject={})},i.prototype.swipeHandler=function(e){var t=this;if(!(!1===t.options.swipe||"ontouchend"in document&&!1===t.options.swipe||!1===t.options.draggable&&-1!==e.type.indexOf("mouse")))switch(t.touchObject.fingerCount=e.originalEvent&&void 0!==e.originalEvent.touches?e.originalEvent.touches.length:1,t.touchObject.minSwipe=t.listWidth/t.options.touchThreshold,!0===t.options.verticalSwiping&&(t.touchObject.minSwipe=t.listHeight/t.options.touchThreshold),e.data.action){case"start":t.swipeStart(e);break;case"move":t.swipeMove(e);break;case"end":t.swipeEnd(e)}},i.prototype.swipeMove=function(e){var t,i,s,o,n,a,r=this;return n=void 0!==e.originalEvent?e.originalEvent.touches:null,!(!r.dragging||r.scrolling||n&&1!==n.length)&&(t=r.getLeft(r.currentSlide),r.touchObject.curX=void 0!==n?n[0].pageX:e.clientX,r.touchObject.curY=void 0!==n?n[0].pageY:e.clientY,r.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(r.touchObject.curX-r.touchObject.startX,2))),a=Math.round(Math.sqrt(Math.pow(r.touchObject.curY-r.touchObject.startY,2))),!r.options.verticalSwiping&&!r.swiping&&a>4?(r.scrolling=!0,!1):(!0===r.options.verticalSwiping&&(r.touchObject.swipeLength=a),i=r.swipeDirection(),void 0!==e.originalEvent&&r.touchObject.swipeLength>4&&(r.swiping=!0,e.preventDefault()),o=(!1===r.options.rtl?1:-1)*(r.touchObject.curX>r.touchObject.startX?1:-1),!0===r.options.verticalSwiping&&(o=r.touchObject.curY>r.touchObject.startY?1:-1),s=r.touchObject.swipeLength,r.touchObject.edgeHit=!1,!1===r.options.infinite&&(0===r.currentSlide&&"right"===i||r.currentSlide>=r.getDotCount()&&"left"===i)&&(s=r.touchObject.swipeLength*r.options.edgeFriction,r.touchObject.edgeHit=!0),!1===r.options.vertical?r.swipeLeft=t+s*o:r.swipeLeft=t+s*(r.$list.height()/r.listWidth)*o,!0===r.options.verticalSwiping&&(r.swipeLeft=t+s*o),!0!==r.options.fade&&!1!==r.options.touchMove&&(!0===r.animating?(r.swipeLeft=null,!1):void r.setCSS(r.swipeLeft))))},i.prototype.swipeStart=function(e){var t,i=this;if(i.interrupted=!0,1!==i.touchObject.fingerCount||i.slideCount<=i.options.slidesToShow)return i.touchObject={},!1;void 0!==e.originalEvent&&void 0!==e.originalEvent.touches&&(t=e.originalEvent.touches[0]),i.touchObject.startX=i.touchObject.curX=void 0!==t?t.pageX:e.clientX,i.touchObject.startY=i.touchObject.curY=void 0!==t?t.pageY:e.clientY,i.dragging=!0},i.prototype.unfilterSlides=i.prototype.slickUnfilter=function(){var e=this;null!==e.$slidesCache&&(e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.appendTo(e.$slideTrack),e.reinit())},i.prototype.unload=function(){var t=this;e(".slick-cloned",t.$slider).remove(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove(),t.$nextArrow&&t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove(),t.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")}
6,i.prototype.unslick=function(e){var t=this;t.$slider.trigger("unslick",[t,e]),t.destroy()},i.prototype.updateArrows=function(){var e=this;Math.floor(e.options.slidesToShow/2),!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&!e.options.infinite&&(e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),e.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===e.currentSlide?(e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),e.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):(e.currentSlide>=e.slideCount-e.options.slidesToShow&&!1===e.options.centerMode||e.currentSlide>=e.slideCount-1&&!0===e.options.centerMode)&&(e.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),e.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},i.prototype.updateDots=function(){var e=this;null!==e.$dots&&(e.$dots.find("li").removeClass("slick-active").end(),e.$dots.find("li").eq(Math.floor(e.currentSlide/e.options.slidesToScroll)).addClass("slick-active"))},i.prototype.visibility=function(){var e=this;e.options.autoplay&&(document[e.hidden]?e.interrupted=!0:e.interrupted=!1)},e.fn.slick=function(){var e,t,s=this,o=arguments[0],n=Array.prototype.slice.call(arguments,1),a=s.length;for(e=0;e<a;e++)if("object"==typeof o||typeof o>"u"?s[e].slick=new i(s[e],o):t=s[e].slick[o].apply(s[e].slick,n),typeof t<"u")return t;return s}})),Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)});var delaySubmit=function(){var e=0;return function(t,i){clearTimeout(e),e=setTimeout(t,i)}}();const observer=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&(e.target.classList.add("animate"),observer.unobserve(e.target))}))}),{rootMargin:"0px 0px -1% 0px"});document.querySelectorAll(".animate-in").forEach((e=>observer.observe(e))),$(document).ready((function(){function e(){var e=$("#header").outerHeight(!0);if(window.matchMedia("(min-width: 1300px)").matches)$(".not-collapsed .secondary-navigation__container").css("top",e);else if($(".quicklinks-toggle.mobile").length)e=$("#header").outerHeight(!0)+$(".quicklinks-toggle.mobile").outerHeight(!0);if($(".site-overlay").css("top",e),$("#site-search").css("top",e),$("#main-menu").css("top",e),$("#site-quicklinks-mobile").css("top",e),window.matchMedia("(max-width: 1300px)").matches){var t="calc( 100% - "+(e+60)+"px )";$(".secondary-navigation__container .container").css("max-height",t)}}Fancybox.bind("[data-fancybox]",{}),setTimeout((function(){e()}),100),$(window).resize((function(){e()}));var t=$("li.children"),i=$("#main-menu").find(t);$.each(i,(function(){$(this).append('<button class="toggle" aria-label="toggle menu"><span></span></button>')})),$.each(i,(function(){$(this).append('<button class="mobile-toggle" aria-label="toggle menu"><span></span></button>')})),$("#menu-toggle").on("click",(function(){$("#site-search-toggle").removeClass("open"),$("#site-search").removeClass("open").slideUp(),$(".site-overlay").removeClass("open"),$("body").removeClass("no-scroll"),$(".quicklinks-toggle").removeClass("open"),$(".quicklinks-overlay").removeClass("open"),$("#site-quicklinks").removeClass("open"),$("#site-quicklinks-mobile").removeClass("open"),$(".quicklinks-category-toggle").removeClass("open"),$("body").removeClass("no-scroll"),$(this).hasClass("menu-open")?($(this).removeClass("menu-open"),$("#main-menu").removeClass("menu-open"),$("body").removeClass("no-scroll"),$(".site-overlay").removeClass("open")):($(this).addClass("menu-open"),$("#main-menu").addClass("menu-open"),$("body").addClass("no-scroll"),$(".site-overlay").addClass("open"))})),$("#main-menu > ul > li > button.toggle").on("click",(function(){$("#site-search-toggle").removeClass("open"),$("#site-search").removeClass("open").slideUp(),$(".site-overlay").removeClass("open"),$("body").removeClass("no-scroll"),$(".quicklinks-toggle").removeClass("open"),$(".quicklinks-overlay").removeClass("open"),$("#site-quicklinks").removeClass("open"),$("#site-quicklinks-mobile").removeClass("open"),$(".quicklinks-category-toggle").removeClass("open"),$("body").removeClass("no-scroll"),$(this).hasClass("open")?($(this).removeClass("open"),$(this).siblings(".secondary-navigation__container").slideUp()):($("#main-menu > ul > li > button.toggle").removeClass("open"),$(".secondary-navigation__container").slideUp(),$(this).addClass("open"),$(this).siblings(".secondary-navigation__container").slideDown())})),$("#main-menu .secondary-navigation button.toggle").on("click",(function(){$(this).toggleClass("open"),$(this).parent("li").toggleClass("open"),$(this).siblings("ul").slideToggle()})),$("#main-menu button.mobile-toggle").on("click",(function(){$(this).siblings(".secondary-navigation__container").addClass("open")})),$("#main-menu button.nav--go-back").on("click",(function(){$(this).parent().parent(".secondary-navigation__container").removeClass("open")})),$("#site-search-toggle").on("click",(function(){$("#main-menu > ul > li > button.toggle").removeClass("open"),$(".secondary-navigation__container").slideUp(),$("#menu-toggle").removeClass("menu-open"),$("#main-menu").removeClass("menu-open"),$("body").removeClass("no-scroll"),$(".site-overlay").removeClass("open"),$(".quicklinks-toggle").removeClass("open"),$(".quicklinks-overlay").removeClass("open"),$("#site-quicklinks").removeClass("open"),$("#site-quicklinks-mobile").removeClass("open"),$(".quicklinks-category-toggle").removeClass("open"),$("body").removeClass("no-scroll"),$("#site-search").hasClass("open")?($("#site-search-toggle").removeClass("open"),$("#site-search").removeClass("open").slide
6Up(),$(".site-overlay").removeClass("open"),$("body").removeClass("no-scroll")):($("#site-search-toggle").addClass("open"),$("#site-search").addClass("open").slideDown(),$(".site-overlay").addClass("open"),$("body").addClass("no-scroll"),setTimeout((function(){$("#site-search .site-search-input").focus()}),400))})),$(".quicklinks-toggle.desktop").on("click",(function(){$("#main-menu > ul > li > button.toggle").removeClass("open"),$(".secondary-navigation__container").slideUp(),$("#menu-toggle").removeClass("menu-open"),$("#main-menu").removeClass("menu-open"),$("body").removeClass("no-scroll"),$(".site-overlay").removeClass("open"),$("#site-search-toggle").removeClass("open"),$("#site-search").removeClass("open").slideUp(),$(".site-overlay").removeClass("open"),$("body").removeClass("no-scroll"),$(this).addClass("open"),$(".quicklinks-overlay").addClass("open"),$("body").addClass("no-scroll"),$("#site-quicklinks").addClass("open")})),$(".quicklinks-toggle.mobile").on("click",(function(){$("#menu-toggle").removeClass("menu-open"),$("#main-menu").removeClass("menu-open"),$("#main-menu > ul > li > button.toggle").removeClass("open"),$(".secondary-navigation__container").removeClass("open"),
7$("#site-search-toggle").removeClass("open"),$("#site-search").removeClass("open").slideUp(),$(".site-overlay").removeClass("open"),$("body").removeClass("no-scroll"),$("#site-quicklinks-mobile").hasClass("open")?($(this).removeClass("open"),$("body").removeClass("no-scroll"),$("#site-quicklinks-mobile").removeClass("open")):($(this).addClass("open"),$("body").addClass("no-scroll"),$("#site-quicklinks-mobile").addClass("open"))})),$(".quicklinks-category-toggle").on("click",(function(){$(this).toggleClass("open"),$(this).siblings("ul").slideToggle()})),$(".close-quicklinks").on("click",(function(){$(".quicklinks-toggle").removeClass("open"),$(".quicklinks-overlay").removeClass("open"),$("#site-quicklinks").removeClass("open"),$("#site-quicklinks-mobile").removeClass("open"),$(".quicklinks-category-toggle").removeClass("open"),$("body").removeClass("no-scroll")})),$(".quicklinks-overlay").on("click",(function(){$(this).removeClass("open"),$(".quicklinks-toggle").removeClass("open"),$("#site-quicklinks").removeClass("open"),$("#site-quicklinks-mobile").removeClass("open"),$(".quicklinks-category-toggle").removeClass("open"),$("body").removeClass("no-scroll")})),$(".site-overlay").on("click",(function(){$(".site-overlay").removeClass("open"),$("body").removeClass("no-scroll"),$("#main-menu > ul > li > button.toggle").removeClass("open"),$(".secondary-navigation__container").slideUp(),$("#menu-toggle").removeClass("menu-open"),$("#main-menu").removeClass("menu-open"),$("#site-search-toggle").removeClass("open"),$("#site-search").removeClass("open").slideUp()}));var s=$(".site-notice__modal"),o=$(".site-notice__close"),n=$(".site-notice__trigger"),a="hide_popup_"+$(s).attr("data-notice-id");0==checkCookie(a,"true")?$(s).addClass("open"):$(n).addClass("visible"),$(o).click((function(){$(s).removeClass("open"),$(n).addClass("visible"),setCookie(a,"true",14)})),$("site-notice__modal .modal__body a").click((function(){setCookie(a,"true",14)})),$(n).click((function(){$(this).removeClass("visible"),$(s).addClass("open")})),$("#page-banner").addClass("animate"),$(".accordion__toggle").on("click",(function(){$(this).toggleClass("open"),$(this).parents(".accordion__header").siblings(".accordion__content").slideToggle()})),$(".carousel-gallery .gallery__images").slick({infinite:!1,slidesToShow:1,slidesToScroll:1,adaptiveHeight:!1,arrows:!1,asNavFor:".carousel-gallery .gallery__thumbs"}),$(".gallery-slick__prev").on("click",(function(){$(".carousel-gallery .gallery__images").slick("slickPrev")})),$(".gallery-slick__next").on("click",(function(){$(".carousel-gallery .gallery__images").slick("slickNext")})),$(".carousel-gallery .gallery__thumbs").slick({infinite:!1,slidesToShow:6,variableWidth:!0,slidesToScroll:1,centerMode:!0,asNavFor:".carousel-gallery .gallery__images",focusOnSelect:!0,arrows:!1});t=$("li.children");var r,l,c=$("#in-page-menu").find(t);function d(e,t){var i={},s=$('.js-search-form[data-search-request="'+e+'"]');
7return searchFilterFormFields=!0===t?s.find('input:not([type="hidden"], [type="submit"]), select'):s.find("input, select"),searchFilterFormFields.each((function(){var e=$(this).prop("name");switch($(this).prop("type")){case"checkbox":void 0!==i[e]&&"string"!=typeof i[e]||(i[e]=[]),$(this).is(":checked")&&i[e].push($(this).val());break;case"radio":$(this).is(":checked")&&(i[e]=$(this).val());break;default:i[e]=$(this).val()}})),i}function h(e,t){void 0===t&&(t={}),r&&r.abort();var i=$('.js-search-form[data-search-request="'+e+'"]'),s=$('.js-search-view[data-search-request="'+e+'"]'),o=(i.data(),s.data(),p(!0)),n=$.extend({},o);$.extend(n,d(e)),$.extend(n,t);var a=i.prop("action");void 0!==n.page&&(a+="?page="+n.page),r=$.ajax({type:"POST",dataType:"json",url:a,data:{filters:n,request_type:e},beforeSend:function(){s.addClass("loading")},success:function(e){"object"!=typeof e&&(e=[{html:e}]),e.forEach((function(e){if(void 0!==e.view)var t=$('.js-search-view[data-view="'+e.view+'"]');else t=s;void 0!==e.html&&t.html(e.html)}))},error:function(e){console.error(e)},complete:function(e,t){s.removeClass("loading")}});var l=$.extend({},o);return $.extend(l,d(e,!0)),$.extend(l,t),u(l,e),r}function u(e,t){void 0===e&&(e={});var i=window.location.hash;Object.keys(e).forEach((function(t){isEmpty(e[t])&&delete e[t]})),void 0!==t&&(isEmpty(e)||(e=$.extend({search_request:t},e)));var s=window.location.protocol+"//"+window.location.host+window.location.pathname,o=$.param(e);""!==o&&(s=s+"?"+o),window.history.pushState({path:s},"",s),"#"!==i&&(window.location.hash=i)}function p(e){var t={};window.location.search&&(window.location.search.substring(1).split("&").forEach((function(e){if(void 0!==(e=e.split("="))[1]){var i=decodeURIComponent(e[0]).replace("[]",""),s=(s=decodeURIComponent(e[1]))?s.replace(/\++/g," ").trim():"";if(0===i.length)return;void 0===t[i]?t[i]=s:("function"!=typeof t[i].push&&(t[i]=[t[i]]),t[i].push(s))}})),void 0!==e&&!0===e&&delete t.search_request);return t}function f(e){h("calendar_item",e).then((function(){$(".event__modal").show()}))}if($.each(c,(function(){$(this).append('<button class="toggle" aria-label="toggle menu"><span></span></button>')})),$("#in-page-menu button.toggle").on("click",(function(){$(this).toggleClass("open"),$(this).siblings("ul").slideToggle()})),$("#in-page-menu > ul > li.children.active > button.toggle").addClass("open"),$("#in-page-menu > ul > li.children.active > ul").show(),$(".subnav-toggle").click((function(){$(this).toggleClass("open"),$(this).siblings("ul").slideToggle()})),$(".form-builder-form article").addClass("article"),$(".featured-post__trigger").on("mouseenter",(function(){$(".featured-post__trigger").addClass("featured-post-hover")})),$(".featured-post__trigger").on("mouseleave",(function(){$(".featured-post__trigger").removeClass("featured-post-hover")})),$("button#comment-form-toggle").on("click",(function(){$(".comments-form").slideToggle()})),$("button.expand-business-details").on("click",(function(){$(this).toggleClass("open"),$(this).parent().parent().parent().siblings(".business__item-details").slideToggle()})),$(".js-search-form").on("change",'input[type="radio"], input[type="checkbox"], select',(function(){var e=$
7($(this).prop("form"));e.find(".js-clear").show(),!0!==e.data("manual-submit")&&h(e.data("search-request"),{page:"1"})})),$(".js-search-form").on("keyup keypress",'input[type="text"]',(function(e){13!=e.keyCode&&13!=e.which||e.preventDefault(),delaySubmit(function(){var e=$($(this).prop("form"));e.find(".js-clear").show(),!0!==e.data("manual-submit")&&h(e.data("search-request"),{page:"1"})}.bind($(this)),500)})),$(".js-search-form").on("click",'button[type="submit"], input[type="submit"]',(function(e){e.preventDefault(),h($($(this).prop("form")).data("search-request"),{page:"1"})})),$(".js-search-form").on("click",".js-clear",(function(){$(this).hide();var e=$($(this).prop("form"));!function(e){$('.js-search-form[data-search-request="'+e+'"]').trigger("reset"),$('.js-sort[data-search-request="'+e+'"]').removeClass("active"),$('.js-sort[data-search-request="'+e+'"]').data("sort-dir","asc"),u()}(e.data("search-request")),h(e.data("search-request"))})),$(document).on("click",".js-sort",(function(){var e=$(this).data("search-request"),t=$(this).data("sort-by"),i=$(this).data("sort-dir");$('.js-sort[data-search-request="'+e+'"]').removeClass("active"),$('.js-search-form[data-search-request="'+e+'"]').find(".js-clear").show(),$(this).addClass("active"),"asc"===i?$(this).data("sort-dir","desc"):"desc"===i&&$(this).data("sort-dir","asc"),h(e,{sort_by:t,sort_dir:i=$(this).data("sort-dir")})})),$(document).on("click",".js-view-toggle button",(function(){var e=$
7(this).data("view-type");$('.js-view-toggle button[data-view-type="'+e+'"]').addClass("active"),$('.js-view-toggle button[data-view-type]:not([data-view-type="'+e+'"])').removeClass("active"),$('[data-view="'+e+'"]').show(),$('[data-view]:not([data-view="'+e+'"])').hide(),window.location.hash=e})),$("#grid-calendar").on("click",".calendar_nav a",(function(e){e.preventDefault();var t=$(this).attr("href").replace("#","").split("/"),i=t[0];h("events",{month:t[1],year:i})})),$("#grid-calendar").on("click","a.item_link",(function(e){e.preventDefault(),f({event_id:$(this).attr("id"),year:$(this).attr("data-year"),month:$(this).attr("data-month"),day:$(this).attr("data-day")})})),$(document).on("click",".event__modal .modal_close",(function(){$(".event__modal").hide(),u(d("events",!0),"events")})),$(document).on("click",".pagination a",(function(){let e=$(this).attr("href"),t=new URLSearchParams(e).get("page");return h($(this).data("type"),{page:t}),!1})),l=p(),searchRequest=l.search_request,Object.keys(l).length&&(Object.keys(l).forEach((function(e){var t=$('[name="'+e+'"]');"checkbox"===t.prop("type")?Array.isArray(l[e])?t.each((function(){-1!==l[e].indexOf($(this).val())&&$(this).prop("checked",!0)})):$('[name="'+e+'"][value="'+l[e]+'"]').prop("checked",!0):t.val(l[e])})),"calendar_item"==searchRequest?f(l):h(searchRequest)),window.location.hash){var g=window.location.hash.replace("#","");$('.js-view-toggle button[data-view-type="'+g+'"]').click()}else $(".js-view-toggle button.active").click()})),$(document).ready((function(){function e(e,t){var i=$('.js-poll[data-poll-id="'+e+'"]'),s=i.find(".js-poll-results").attr("data-total-votes");!0===t&&(i.find("input:radio, .js-vote-submit, .js-view-results").remove(),i.find(".successful-vote").show(),i.addClass("voted")),i.find(".js-poll-result-count").show(),i.find(".js-poll-result-bar").each((function(){var e=$
7(this).parent(".js-poll-result").attr("data-vote-count")/s*100;$(this).width("0px"),$(this).delay(300).animate({width:e+"%"},500,(function(){}))}))}$(".js-vote-submit").click((function(){$(this).attr("disabled",!0);var t=$(this).closest(".js-poll"),i=($(this).parent(".js-search-form").attr("action"),t.find("input:radio:checked").val());!function(t,i){$.ajax({type:"POST",dataType:"json",data:{option_id:i,request_type:"polls",poll_id:t,method:"ajax"},beforeSend:function(){$("#polls-container .ajax-reload").addClass("loading")},success:function(i){$("#polls-container .ajax-reload").removeClass("loading"),$("#polls-container .ajax-reload").fadeOut("normal",(function(){$(this).html(i),$(".poll-form").length>0&&(e(t,!0),setCookie("webguide_poll["+t+"]","voted")),$(this).fadeIn("normal")}))}})}(t.data("poll-id"),i)})),$(".js-view-results").click((function(){e($(this).closest(".js-poll").data("poll-id"))})),$(".js-poll input[type=radio]").change((function(){$(this).removeClass("poll-selected"),$(this).addClass("poll-selected")})),$(".js-poll").each((function(){var t=$(this).data("poll-id");checkCookie("webguide_poll["+t+"]","voted")&&e(t,!0)}))})),$(document).ready((function(){$(".js-meeting-category-toggler").click((function(){$(this).toggleClass("open"),$(this).siblings(".js-meeting-category-togglee").slideToggle()})),$(".js-meeting-toggle").click((function(){$(this).toggleClass("open"),$(this).parents(".meeting__header").siblings(".js-meeting-togglee").slideToggle(),$(this).parents(".js-meeting").toggleClass("open")})),$(".js-meeting-toggle").mouseenter((function(){$(this).parents(".js-meeting").addClass("hover")})),$(".js-meeting-toggle").mouseleave((function(){$(this).parents(".js-meeting").removeClass("hover")})),$(".js-meetings-openall").click((function(){$(this).parents(".category__actions").siblings(".js-meeting").find(".js-meeting-togglee").slideDown(),$(this).parents(".category__actions").siblings(".js-meeting").find(".js-meeting-toggle").addClass("open"),$(this).parents(".category__actions").siblings(".js-meeting").addClass("open")})),$(".js-meetings-closeall").click((function(){$(this).parents(".category__actions").siblings(".js-meeting").find(".js-meeting-togglee").slideUp(),$(this).parents(".category__actions").siblings(".js-meeting").find(".js-meeting-toggle").removeClass("open"),$(this).parents(".category__actions").siblings(".js-meeting").removeClass("open")}))})),$(".jobs-list .js-toggler").click((function(){$(this).parents(".actions").siblings(".job-details").slideToggle()})),$(document).ready((function(){$(document).on("click",".js-tender-category-toggler",(function(){$(this).toggleClass("open"),$(this).siblings(".js-tender-category-togglee").slideToggle(),$(this).parent(".tender__category").toggleClass("open")})),$(document).on("click",".js-tender-toggler",(function(){$(this).toggleClass("open"),$(this).siblings(".js-tender-togglee").slideToggle()})),$(document).on("click",".js-tenders-openall",(function(){$(this).parents(".js-tender-category-togglee").find(".js-tender-toggler").addClass("open"),$(this).parents(".js-tender-category-togglee").find(".js-tender-togglee").slideDown()})),$(document).on("click",".js-tenders-closeall",(function(){$(this).parents(".js-tender-category-togglee").find(".js-tender-toggler").removeClass("open"),$(this).parents(".js-tender-category-togglee").find(".js-tender-togglee").slideUp()}))}));

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.