/* * FooGallery - The Most Intuitive and Extensible Gallery Creation and Management Tool Ever Created for WordPress * @version 2.1.2 * @link * @copyright Steven Usher & Brad Vincent 2015 * @license Released under the GPLv3 license. */ function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(e){(window.FooGallery=window.FooGallery||{}).$=e}(jQuery),function(e){e?function(){try{return window.FooGallery.utils}catch(e){}}()||(window.FooGallery.utils={$:e,version:"1.0.0"}):console.warn("jQuery must be included in the page prior to the FooGallery.utils library.")}(jQuery),function(t,i){"1.0.0"===i.version&&(i.is={},i.is.array=function(e){return"[object Array]"===Object.prototype.toString.call(e)},i.is.boolean=function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},i.is.element=function(e){return"object"===("undefined"==typeof HTMLElement?"undefined":_typeof(HTMLElement))?e instanceof HTMLElement:!!e&&"object"===_typeof(e)&&1===e.nodeType&&"string"==typeof e.nodeName},i.is.empty=function(e){if(i.is.undef(e)||null===e)return!0;if(i.is.number(e)&&0===e)return!0;if(i.is.boolean(e)&&!1===e)return!0;if(i.is.string(e)&&0===e.length)return!0;if(i.is.array(e)&&0===e.length)return!0;if(i.is.jq(e)&&0===e.length)return!0;if(i.is.hash(e)){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}return!1},i.is.error=function(e){return"[object Error]"===Object.prototype.toString.call(e)},i.is.fn=function(e){return e===window.alert||"[object Function]"===Object.prototype.toString.call(e)},i.is.hash=function(e){return i.is.object(e)&&e.constructor===Object&&!e.nodeType&&!e.setInterval},i.is.jq=function(e){return!i.is.undef(t)&&e instanceof t},i.is.number=function(e){return"[object Number]"===Object.prototype.toString.call(e)&&!isNaN(e)},i.is.object=function(e){return"[object Object]"===Object.prototype.toString.call(e)&&!i.is.undef(e)&&null!==e},i.is.promise=function(e){return i.is.object(e)&&i.is.fn(e.then)&&i.is.fn(e.promise)},i.is.size=function(e){return!!(i.is.string(e)&&!i.is.empty(e)||i.is.number(e))&&/^(auto|none|(?:[\d.]*)+?(?:%|px|mm|q|cm|in|pt|pc|em|ex|ch|rem|vh|vw|vmin|vmax)?)$/.test(e)},i.is.string=function(e){return"[object String]"===Object.prototype.toString.call(e)},i.is.undef=function(e){return void 0===e})}(FooGallery.utils.$,FooGallery.utils),function(l,c,u){var a;"1.0.0"===c.version&&(c.fn={},a=Function.prototype.toString,c.fn.CONTAINS_SUPER=/xyz/.test(a.call(function(){xyz}))?/\b_super\b/:/.*/,c.fn.noop=function(){},c.fn.addOrOverride=function(e,t,i){var n,r,s,o;u.object(e)&&u.string(t)&&!u.empty(t)&&u.fn(i)&&(n=e[t],r=u.fn(n)&&c.fn.CONTAINS_SUPER.test(a.call(i)),e[t]=r?(s=n,o=i,function(){var e=this._super,t=(this._super=s,o.apply(this,arguments));return this._super=e,t}):i)},c.fn.expose=function(t,i,e,n){u.object(t)&&u.object(i)&&u.array(e)&&(n=u.undef(n)?t:n,e.forEach(function(e){u.string(e)&&u.fn(t[e])&&(i[e]=t[e].bind(n))}))},c.fn.apply=function(e,t){return t.unshift(e),new(Function.prototype.bind.apply(e,t))},c.fn.arg2arr=function(e){return Array.prototype.slice.call(e)},c.fn.debounce=function(i,n){var r;return function(){var e=this,t=c.fn.arg2arr(arguments);clearTimeout(r),r=setTimeout(function(){i.apply(e,t)},n)}},c.fn.throttle=function(i,n){var r,s;return function(){var e=this,t=c.fn.arg2arr(arguments);r?(clearTimeout(s),s=setTimeout(function(){Date.now()-r>=n&&(i.apply(e,t),r=Date.now())},n-(Date.now()-r))):(i.apply(e,t),r=Date.now())}},c.fn.resolved=l.Deferred().resolve().promise(),c.fn.rejected=l.Deferred().reject().promise(),c.fn.reject=function(e,t){var i=l.Deferred(),n=c.fn.arg2arr(arguments);return i.reject.apply(i,n).promise()},c.fn.resolve=function(e,t){var i=l.Deferred(),n=c.fn.arg2arr(arguments);return i.resolve.apply(i,n).promise()},c.fn.rejectWith=function(e,t,i){var n=l.Deferred(),r=c.fn.arg2arr(arguments);return r.shift(),n.rejectWith(e,r).promise()},c.fn.resolveWith=function(e,t,i){var n=l.Deferred(),r=c.fn.arg2arr(arguments);return r.shift(),n.resolveWith(e,r).promise()},c.fn.all=function(t){var i=l.Deferred(),n=[];if(u.array(t)&&0e.length)&&e.slice(e.length-t.length)===t},a.str.startsWith=function(e,t){return!l.empty(e)&&!l.empty(t)&&e.slice(0,t.length)===t},a.str.escapeRegExp=function(e){return l.string(e)?e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"):e},a.str.fnv1a=function(e){if(!l.string(e)||l.empty(e))return null;for(var t=2166136261,i=0,n=e.length;i>>0},a.str.from=function(e,t){return a.str.contains(e,t)?e.substring(e.indexOf(t)+t.length):null},a.str.join=function(e,t,i){if(!l.string(e)||!l.string(t))return null;var n=c.arg2arr(arguments);e=n.shift();for(var r=n.shift(),s=0,o=n.length;st?e.substr(0,t)+(a.string(i)?i:"…"):e},e.getResizeObserverSize=function(e){var t,e=e.contentBoxSize?(e.contentBoxSize[0]?(t=e.contentBoxSize[0].inlineSize,e.contentBoxSize[0]):(t=e.contentBoxSize.inlineSize,e.contentBoxSize)).blockSize:(t=e.contentRect.width,e.contentRect.height);return{width:t,height:e}},o.supportsWebP=!1;var i=new Image;i.onload=function(){o.supportsWebP=0',"arrow-left":'',"arrow-right":'',maximize:'',expand:'',shrink:'',info:'',comment:'',thumbs:'',cart:'',"circle-close":'',"auto-progress":'',search:'',"exif-aperture":'',"exif-camera":'',"exif-created-timestamp":'',"exif-shutter-speed":'',"exif-focal-length":'',"exif-iso":'',"exif-orientation":''}}},register:function(e,t){return!(a.empty(e)||a.empty(t)||!a.string(e)||!a.hash(t))&&(this.registered[e]=l.extend({},this.registered.default,t),!0)},get:function(e,t){var i=this,n="default",r=l.extend({},i.registered.default),t=(a.string(t)&&"default"!==t?r=l.extend(r,i.registered[n=t]):a.hash(t)&&(n="custom",r=l.extend(r,t)),a.string(e)&&r.hasOwnProperty(e)?r[e].replace(/\[ICON_CLASS]/g,i.className+"-"+e):null),r=[!1,e,n].map(function(e){return!1===e?i.className:i.className+"-"+e}).join(" ");return s(t).addClass(r)},element:function(e,t){const i=this;let n="default",r=l.extend({},i.registered.default);a.string(t)&&"default"!==t?(n=t,r=l.extend(r,i.registered[t])):a.hash(t)&&(n="custom",r=l.extend(r,t));t=a.string(e)&&r.hasOwnProperty(e)?r[e].replace(/\[ICON_CLASS]/g,i.className+"-"+e):null;if(null!==t){const s=document.createRange().createContextualFragment(t),o=s.querySelector("svg");if(o)return["","-"+e,"-"+n].forEach(function(e){o.classList.add(i.className+e)}),o}return null}}),e.icons=new e.Icons}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.obj),function(r,i,n,s,o){var a="__FooGallerySwipe__",e="ontouchstart"in window,l=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled&&!e,c=(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&!e,u=e||c;i.Swipe=n.Class.extend({construct:function(e,t){var i=this,n=".fgswipe";i.$el=r(e),i.opt=o.extend({threshold:20,allowPageScroll:!1,swipe:r.noop,data:{}},t),i.active=!1,i.startPoint=null,i.endPoint=null,i.events={start:(u?c?l?"MSPointerDown":"pointerdown":"touchstart":"mousedown")+n,move:(u?c?l?"MSPointerMove":"pointermove":"touchmove":"mousemove")+n,end:(u?c?l?"MSPointerUp":"pointerup":"touchend":"mouseup")+n,leave:(!u||c?"mouseleave":null)+n}},init:function(){var e=this;e.$el.on(e.events.start,{self:e},e.onStart),e.$el.on(e.events.move,{self:e},e.onMove),e.$el.on(e.events.end,{self:e},e.onEnd),s.string(e.events.leave)&&e.$el.on(e.events.leave,{self:e},e.onEnd),e.$el.data(a,e)},destroy:function(){var e=this;e.$el.off(e.events.start,e.onStart),e.$el.off(e.events.move,e.onMove),e.$el.off(e.events.end,e.onEnd),s.string(e.events.leave)&&e.$el.off(e.events.leave,e.onEnd),e.$el.removeData(a)},getAngle:function(e,t){e=Math.atan2(e.x-t.x,e.y-t.y),t=Math.round(180*e/Math.PI);return 360-(t<0?360-Math.abs(t):t)},getDistance:function(e,t){var i=t.x-e.x,t=t.y-e.y;return i*=i,t*=t,Math.sqrt(i+t)},getDirection:function(e,t){e=this.getAngle(e,t);return 337.5",{id:this.id,class:this.cls.container}).addClass(this.opt.classes)},createChildren:function(){return n()},destroy:function(t){var i=this,e=i._super.bind(i);return i.destroyed?a.resolved:(i.destroying=!0,n.Deferred(function(e){i.initializing&&o.promise(i._initialize)?i._initialize.always(function(){i.destroying=!1,i.doDestroy(t),e.resolve()}):(i.destroying=!1,i.doDestroy(t),e.resolve())}).then(function(){e()}).promise())},doDestroy:function(e){var t=this;t.destroyed||(t.trigger("destroy"),t.robserver.disconnect(),n(window).off(t.namespace),t.state.destroy(e),t.filter&&t.filter.destroy(),t.pages&&t.pages.destroy(),t.items.destroy(),o.empty(t.opt.on)||t.$el.off(t.opt.on),t.trigger("destroyed"),t.$el.removeData(r.DATA_TEMPLATE),o.empty(t._undo.classes)?t.$el.removeAttr("class"):t.$el.attr("class",t._undo.classes),o.empty(t._undo.style)?t.$el.removeAttr("style"):t.$el.attr("style",t._undo.style),t._undo.children&&t.destroyChildren(),t._undo.create&&t.$el.remove(),t.$el=t.state=t.items=t.pages=null,t.destroyed=!0,t.initializing=!1,t.initialized=!1)},destroyChildren:function(){},getAvailable:function(){return(this.pages||this.items).available()},layout:function(e){var t=this;null===t._initialize||0===(e=o.number(e)?e:t.el.getBoundingClientRect().width)||t._checkWidth(e)||(t.lastWidth=e,t.trigger("layout",[e]))},_checkWidth:function(e){var t,i=this;return(t=-1!==i._layoutWidths.indexOf(e))||(i._layoutWidths.unshift(e),i._layoutWidths.splice(2,i._layoutWidths.length-2),null!=i._layoutTimeout&&clearTimeout(i._layoutTimeout),i._layoutTimeout=setTimeout(function(){i._layoutWidths.splice(0,i._layoutWidths.length)},100)),t},getCSSClass:function(e,t){t=o.empty(t)?"":t;var e=e instanceof RegExp?e:o.string(e)&&this.opt.regex.hasOwnProperty(e)?this.opt.regex[e]:null,i=this.$el.prop("className")||"",i=null!=e?i.match(e):null;return null!=i&&2<=i.length?i[1]:t},onWindowPopState:function(e){var t=e.data.self,e=e.originalEvent.state;o.empty(e)||e.id!==t.id||t.state.set(e)}}),r.template.register("core",r.Template,{id:null,type:"core",classes:"",on:{},lazy:!0,items:[],scrollParent:null,delay:0,throttle:50,shortpixel:!1,srcset:"data-srcset-fg",src:"data-src-fg",protected:!1,template:{},regex:{theme:/(?:\s|^)(fg-(?:light|dark|custom))(?:\s|$)/,loadingIcon:/(?:\s|^)(fg-loading-(?:default|bars|dots|partial|pulse|trail))(?:\s|$)/,hoverIcon:/(?:\s|^)(fg-hover-(?:zoom|zoom2|zoom3|plus|circle-plus|eye|external|tint))(?:\s|$)/,videoIcon:/(?:\s|^)(fg-video-(?:default|1|2|3|4))(?:\s|$)/,border:/(?:\s|^)(fg-border-(?:thin|medium|thick))(?:\s|$)/,hoverColor:/(?:\s|^)(fg-hover-(?:colorize|grayscale))(?:\s|$)/,hoverScale:/(?:\s|^)(fg-hover-scale)(?:\s|$)/,stickyVideoIcon:/(?:\s|^)(fg-video-sticky)(?:\s|$)/,insetShadow:/(?:\s|^)(fg-shadow-inset-(?:small|medium|large))(?:\s|$)/,filter:/(?:\s|^)(fg-filter-(?:1977|amaro|brannan|clarendon|earlybird|lofi|poprocket|reyes|toaster|walden|xpro2|xtreme))(?:\s|$)/}},{container:"foogallery"},{},-100)}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.str),function(e,t){e.Component=t.EventClass.extend({construct:function(e){this._super(),this.tmpl=e},destroy:function(){this.tmpl=null,this._super()}}),e.components=new e.Factory}(FooGallery,FooGallery.utils,FooGallery.utils.is),function(t,s,i,o,a,l){s.State=s.Component.extend({construct:function(e){var t=this,e=(t._super(e),t.apiEnabled=!!window.history&&!!history.replaceState,t.opt=t.tmpl.opt.state,t.enabled=t.opt.enabled,t.current={filter:[],page:0,item:null},t.pushOrReplace=t.isPushOrReplace(t.opt.pushOrReplace)?t.opt.pushOrReplace:"replace",t.defaultMask="foogallery-gallery-{id}",a.escapeRegExp(t.tmpl.id)),i=a.escapeRegExp(t.getMasked()),n=a.escapeRegExp(t.opt.values),r=a.escapeRegExp(t.opt.pair);t.regex={exists:new RegExp("^#"+e+"\\"+n+".+?"),masked:new RegExp("^#"+i+"\\"+n+".+?"),values:new RegExp("(\\w+)"+r+"([^"+n+"]+)","g")},t.usePopState=t.opt.usePopState,t.onPopState=t.onPopState.bind(t)},init:function(){var e=this;e.set(e.initial()),e.enabled&&e.apiEnabled&&e.usePopState&&window.addEventListener("popstate",e.onPopState)},destroy:function(e){var t=this;t.enabled&&t.apiEnabled&&t.usePopState&&window.removeEventListener("popstate",t.onPopState),e||t.clear(),t.opt=t.regex={},t._super()},getIdNumber:function(){return this.tmpl.id.match(/\d+/g)[0]},getMasked:function(){var e=a.contains(this.opt.mask,"{id}")?this.opt.mask:this.defaultMask;return a.format(e,{id:this.getIdNumber()})},isPushOrReplace:function(e){return-1!==i.inArray(e,["push","replace"])},exists:function(){return this.regex.values.lastIndex=0,(this.regex.exists.test(location.hash)||this.regex.masked.test(location.hash))&&this.regex.values.test(location.hash)},parse:function(){var e,r=this,s=r.tmpl,o={};return r.exists()&&(r.enabled?(o.id=r.tmpl.id,r.regex.values.lastIndex=0,e=location.hash.match(r.regex.values),t.each(e,function(e,t){var i,n=t.split(r.opt.pair);if(2===n.length)switch(n[0]){case r.opt.itemKey:null!==(i=s.items.fromHash(n[1]))&&(o.item=i);break;case r.opt.pageKey:s.pages&&null!==(i=s.pages.fromHash(n[1]))&&(o.page=i);break;case r.opt.filterKey:s.filter&&null!==(i=s.filter.fromHash(n[1]))&&(o.filter=i)}})):r.apiEnabled?history.replaceState(null,"",location.pathname+location.search):location.hash="#"),o},hashify:function(e){var t,i,n=this,r=n.tmpl;return o.hash(e)?(t=[],null!==(i=r.items.toHash(e.item))&&t.push(n.opt.itemKey+n.opt.pair+i),r.filter&&null!==(i=r.filter.toHash(e.filter))&&t.push(n.opt.filterKey+n.opt.pair+i),r.pages&&null!==(i=r.pages.toHash(e.page))&&t.push(n.opt.pageKey+n.opt.pair+i),0{var i;_.empty(t)||("class"===e?(i=(_.array(t)?t:[t]).flatMap(e=>_.string(e)?e.split(" "):[]).map(e=>e.trim()).filter(Boolean),n.classList.add(...i)):n.setAttribute(e,_.string(t)?t:JSON.stringify(t)))})},doShortPixel:function(){var e,t=this;function i(e,t,i){return"/"===t||"/"===i?"/":t}t.tmpl.opt.shortpixel&&!b.supportsWebP&&(t.href=t.href.replace(e=/([\/,+])to_webp([\/,+])/i,i),t.src=t.src.replace(e,i),t.srcset=t.srcset.replace(e,i))},doCreateItem:function(){var n,e,r=this,t=r.cls,i=r.attr,s=r.hasExif?t.exif:"",o=(r.isLoaded=!r.tmpl.opt.lazy,r.isPicture=0",{class:[i.pages.cls.container,i.pages.theme].join(" ")}),!0},destroy:function(){var e=this;e._containerExisted?e.$container.empty().removeClass().addClass(e._placeholderClasses.join(" ")):e.$container.remove(),e.$container=null},append:function(){var e=this;e._containerExisted||("top"===e.position?e.$container.insertBefore(e.tmpl.$el):e.$container.insertAfter(e.tmpl.$el))},update:function(e){}}),s.paging.register("default",s.Paging,null,{type:"none",theme:"fg-light",size:30,pushOrReplace:"push",position:"none",scrollToTop:!0},{container:"fg-paging-container"},null,-100)}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is),function(l,e,a){e.Dots=e.Paging.extend({}),e.DotsControl=e.PagingControl.extend({construct:function(e,t,i){this._super(e,t,i),this.$list=null,this.$items=null},create:function(){var e=this;if(e._super()){for(var t,i=e.pages.cls,n=e.pages.il8n,r=[],s=l("
    ",{class:i.list}),o=0,a=e.pages.total;o",{class:o.link,href:"#page-"+e}).html(i).on("click.foogallery",{self:this,page:e},this.onLinkClick),e=(a.empty(t)||i.attr("title",t.replace(/\{PAGE}/g,e).replace(/\{LIMIT}/g,s.limit+"")),r=a.string(r)?r:t,a.empty(r)||i.prepend(l("",{class:o.reader,text:r.replace(/\{PAGE}/g,"").replace(/\{LIMIT}/g,s.limit+"")})),l("
  • ",{class:o.item}).append(i));return n=a.string(n)?n:"",a.empty(n)||e.addClass(n),e},onLinkClick:function(e){e.preventDefault();var t=e.data.self,e=e.data.page,i=t.pages.sel;l(this).closest(i.item).is(i.disabled)||t.pages.set(e,!0)}}),e.paging.register("dots",e.Dots,e.DotsControl,{type:"dots",position:"both",pushOrReplace:"push"},{list:"fg-dots",item:"fg-dot-item",link:"fg-dot-link",disabled:"fg-disabled",selected:"fg-selected",visible:"fg-visible",reader:"fg-sr-only"},{current:"Current page",page:"Page {PAGE}"})}(FooGallery.$,FooGallery,(FooGallery.utils,FooGallery.utils.is)),function(s,o,a,l,c,u){var h=0;o.Panel=o.Component.extend({construct:function(e,t,i,n){var r=this,s=(r.instanceId=++h,r._super(e),r.opt=c.extend({},r.tmpl.opt.panel,t),r.cls=c.extend({},r.tmpl.cls.panel,i),r.il8n=c.extend({},r.tmpl.il8n.panel,n),r.cls.states);r.cls.states.all=Object.keys(s).map(function(e){return s[e]}).join(" "),r.cls.states.allLoading=[s.idle,s.loading,s.loaded,s.error].join(" "),r.cls.states.allProgress=[s.idle,s.started,s.stopped,s.paused].join(" "),r.sel=a.selectify(r.cls),r.videoSources=l.undef(o.Panel.Video)?[]:o.Panel.Video.sources.load(r),r.buttons=new o.Panel.Buttons(r),r.content=new o.Panel.Content(r),r.info=new o.Panel.Info(r),r.thumbs=new o.Panel.Thumbs(r),r.areas=[r.content,r.info,r.thumbs],o.Panel.Cart&&(r.cart=new o.Panel.Cart(r),r.areas.push(r.cart)),r.$el=null,r.el=null,r.isCreated=!1,r.isDestroyed=!1,r.isDestroying=!1,r.isAttached=!1,r.isLoading=!1,r.isLoaded=!1,r.isError=!1,r.isInline=!1,r.isMaximized=!1,r.isFullscreen=!1,r.hasTransition=!l.empty(r.cls.transition[r.opt.transition]),r.currentItem=null,r.prevItem=null,r.nextItem=null,r.lastBreakpoint=null,r.isSmallScreen=!1,r.isMediumScreen=!1,r.isLargeScreen=!1,r.breakpointClassNames=r.opt.breakpoints.map(function(e){return"fg-"+e.name+" fg-"+e.name+"-width fg-"+e.name+"-height"}).concat(["fg-landscape","fg-portrait"]).join(" "),r.robserver=new ResizeObserver(u.throttle(function(e){r.destroying||r.destroyed||e.forEach(function(e){e.target===r.el&&(e=a.getResizeObserverSize(e),r.onResize(e.width,e.height))})},50)),r.__media={},r.__loading=null,r.tmpl.destroying||r.tmpl.destroyed||r.tmpl.on({"after-filter-change":r.onItemsChanged},r)},isVisible:function(e){return e instanceof o.Item&&!e.noLightbox&&!e.panelHide},onItemsChanged:function(e){var t=this;t.thumbs.isCreated&&t.tmpl.initialized&&(t.thumbs.doCreateThumbs(t.tmpl.items.available(t.isVisible)),t.isAttached&&t.load(t.tmpl.items.first(t.isVisible)))},create:function(){var e=this;return e.isCreated||(e.trigger("create").isDefaultPrevented()||(e.isCreated=e.doCreate()),e.isCreated&&e.trigger("created")),e.isCreated},doCreate:function(){var t=this;return t.$el=t.createElem(),t.el=t.$el.get(0),t.tmpl.opt.protected&&(t.el.oncontextmenu=function(e){return e.preventDefault(),!1}),t.opt.keyboard&&t.$el.attr("tabindex",-1).on("keydown.foogallery",{self:t},t.onKeyDown),t.areas.forEach(function(e){e.appendTo(t.$el)}),t.buttons.appendTo(t.content.$el),!0},createElem:function(){var e=this,t=e.cls.transition[e.opt.transition]||"",t=(e.hasTransition=!l.empty(t),[e.cls.elem,t,e.cls.buttons.portrait[e.opt.buttonsPortrait]||"",e.cls.buttons.landscape[e.opt.buttonsLandscape]||"",l.string(e.opt.theme)?e.opt.theme:e.tmpl.getCSSClass("theme","fg-dark"),l.string(e.opt.loadingIcon)?e.opt.loadingIcon:e.tmpl.getCSSClass("loadingIcon"),l.string(e.opt.hoverIcon)?e.opt.hoverIcon:e.tmpl.getCSSClass("hoverIcon"),l.string(e.opt.videoIcon)?e.opt.videoIcon:e.tmpl.getCSSClass("videoIcon"),l.boolean(e.opt.stickyVideoIcon)&&e.opt.stickyVideoIcon?e.cls.stickyVideoIcon:e.tmpl.getCSSClass("stickyVideoIcon"),l.string(e.opt.insetShadow)?e.opt.insetShadow:e.tmpl.getCSSClass("insetShadow"),l.string(e.opt.filter)?e.opt.filter:e.tmpl.getCSSClass("filter"),l.string(e.opt.hoverColor)?e.opt.hoverColor:e.tmpl.getCSSClass("hoverColor"),l.boolean(e.opt.hoverScale)&&e.opt.hoverScale?e.cls.hoverScale:e.tmpl.getCSSClass("hoverScale"),l.string(e.opt.button)?e.opt.button:"",l.string(e.opt.highlight)?e.opt.highlight:"",e.opt.stackSideAreas?e.cls.stackSideAreas:"",e.opt.preserveButtonSpace?e.cls.preserveButtonSpace:"",e.opt.fitMedia?e.cls.fitMedia:"",e.opt.noMobile?e.cls.noMobile:"",e.opt.hoverButtons?e.cls.hoverButtons:"",e.opt.classNames]);return s("
    ").addClass(t.join(" "))},destroy:function(){var i=this,e=i._super.bind(i);return i.isDestroyed?u.resolved:(i.isDestroying=!0,s.Deferred(function(t){var e;i.isLoading&&l.promise(i.__loading)?i.__loading.always(function(){var e=i.trigger("destroy");i.isDestroying=!1,e.isDefaultPrevented()||(i.isDestroyed=i.doDestroy()),i.isDestroyed&&i.trigger("destroyed"),t.resolve()}):(e=i.trigger("destroy"),i.isDestroying=!1,e.isDefaultPrevented()||(i.isDestroyed=i.doDestroy()),i.isDestroyed&&i.trigger("destroyed"),t.resolve())}).then(function(){e()}).promise())},doDestroy:function(){var e=this;return e.buttons.destroy(),e.areas.reverse(),e.areas.forEach(function(e){e.destroy()}),e.detach(),e.isCreated&&e.$el.remove(),!0},appendTo:function(e){var t=this;return!t.isCreated&&!t.create()||t.isAttached||(t.trigger("append",[e]).isDefaultPrevented()||(t.isAttached=t.doAppendTo(e)),t.isAttached&&t.trigger("appended",[e])),t.isAttached},doAppendTo:function(e){var t=this,e=s(e),i=t.buttons.get("maximize");return t.isInline=!e.is("body"),t.$el.appendTo(e),i.set(!t.isInline,t.isInline&&i.isEnabled()),t.robserver.observe(t.el),t.areas.forEach(function(e){e.listen()}),null!==t.el.parentNode},detach:function(){var e=this;return e.isCreated&&e.isAttached&&(e.trigger("detach").isDefaultPrevented()||(e.isAttached=!e.doDetach()),e.isAttached||e.trigger("detached")),!e.isAttached},doDetach:function(){return this.robserver.unobserve(this.el),this.areas.forEach(function(e){e.stopListening()}),this.$el.detach(),!0},resize:function(){var e=this;e.$el.removeClass(e.breakpointClassNames).addClass(e.lastBreakpoint),e.isMediumScreen=e.$el.hasClass("fg-medium"),e.isLargeScreen=e.$el.hasClass("fg-large"),e.isXLargeScreen=e.$el.hasClass("fg-x-large"),e.isSmallScreen=!e.isMediumScreen&&!e.isLargeScreen&&!e.isXLargeScreen,e.areas.forEach(function(e){e.resize()}),e.buttons.resize()},onResize:function(e,t){e=this.getBreakpoint(e,t);this.lastBreakpoint!==e&&(this.lastBreakpoint=e,this.resize())},getBreakpoint:function(n,r){var s=[];return this.opt.breakpoints.forEach(function(e){var t=e.width<=n,i=e.height<=r;t&&i&&s.push("fg-"+e.name),t&&s.push("fg-"+e.name+"-width"),i&&s.push("fg-"+e.name+"-height")}),s.push(r").addClass(t.cls.container),t.each(function(e){e.appendTo(t.$el)},!0),!0},appendTo:function(e){var t=this;return t.isCreated||t.create(),t.isCreated&&!t.isAttached&&(t.panel.trigger("buttons-append",[t,e]).isDefaultPrevented()||(t.isAttached=t.doAppendTo(e)),t.isAttached&&t.panel.trigger("buttons-appended",[t,e])),t.isAttached},doAppendTo:function(e){return this.$el.appendTo(e),0",{type:"button","aria-label":t.opt.label,"aria-disabled":t.isDisabled,"aria-hidden":!t.isVisible}).addClass(t.cls.elem).on("click.foogallery",{self:t},t.onButtonClick),r.string(t.opt.icon)?t.$el.append(i.get(t.opt.icon,t.panel.opt.icons)):r.array(t.opt.icon)?t.opt.icon.forEach(function(e){t.$el.append(i.get(e,t.panel.opt.icons))}):r.fn(t.opt.icon)&&t.$el.append(t.opt.icon.call(this)),t.isCreated=!0,e=t.isEnabled(),t.toggle(e),t.disable(!e),t.isToggle&&t.press(t.opt.pressed)),t.isCreated},destroy:function(){return this.isCreated&&(this.$el.off("click.foogallery").remove(),this.isCreated=!1),!this.isCreated},appendTo:function(e){return!this.isCreated&&!this.create()||this.isAttached||this.$el.appendTo(e),this.isAttached},detach:function(){return this.isCreated&&this.isAttached&&this.$el.detach(),!this.isAttached},toggle:function(e){this.isCreated&&(this.isVisible=r.boolean(e)?e:!this.isVisible,this.$el.toggleClass(this.cls.states.hidden,!this.isVisible).attr("aria-hidden",!this.isVisible))},disable:function(e){this.isCreated&&(this.isDisabled=r.boolean(e)?e:!this.isDisabled,this.$el.toggleClass(this.cls.states.disabled,this.isDisabled).attr({"aria-disabled":this.isDisabled,disabled:this.isDisabled}))},press:function(e){this.isCreated&&(this.isPressed=e,this.$el.attr("aria-pressed",this.isPressed))},beforeLoad:function(e){this.opt.beforeLoad.call(this,e)},afterLoad:function(e){this.opt.afterLoad.call(this,e)},close:function(){this.opt.close.call(this)},click:function(){this.opt.click.call(this)},resize:function(){this.opt.resize.call(this)},onButtonClick:function(e){e.preventDefault(),e.data.self.click()}})}(FooGallery.$,FooGallery,FooGallery.icons,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.obj),function(e,n){e.Panel.SideAreaButton=e.Panel.Button.extend({construct:function(e){this._super(e.panel,e.name,{icon:e.opt.icon,label:e.opt.label,autoHideArea:e.opt.autoHide,click:e.toggle.bind(e),toggle:!0,pressed:e.opt.visible,group:e.opt.group}),this.area=e,this.__isVisible=null,this.__autoHide=null},beforeLoad:function(e){var t=this.area.isEnabled(),i=t&&this.area.canLoad(e);i||null!=this.__isVisible?i&&n.boolean(this.__isVisible)&&(this.area.toggle(this.__isVisible),this.__isVisible=null):(this.__isVisible=this.area.isVisible,this.area.toggle(!1)),t?this.disable(!i):this.toggle(i),this.checkAutoHide(t,i),this.opt.beforeLoad.call(this,e)},checkAutoHide:function(e,t){e&&t&&!0===this.opt.autoHideArea&&(null==this.__autoHide&&this.panel.isSmallScreen?(this.__autoHide=this.area.isVisible,this.area.toggle(!1),this.area.button.toggle(!0)):n.boolean(this.__autoHide)&&!this.panel.isSmallScreen&&(this.area.button.toggle(this.area.button.isEnabled()&&this.area.opt.toggle),this.area.toggle(this.__autoHide),this.__autoHide=null))},resize:function(){var e=this.area.isEnabled(),t=e&&this.area.canLoad(this.area.currentMedia);this.checkAutoHide(e,t)}})}((FooGallery.$,FooGallery),FooGallery.utils.is),function(e,i){e.Panel.AutoProgress=e.Panel.Button.extend({construct:function(e){var t=this;t.__stopped=!e.opt.autoProgressStart,t.__timer=new i.Timer,t._super(e,"autoProgress",{icon:"auto-progress",label:e.il8n.buttons.autoProgress}),t.$icon=null,t.$circle=null,t.circumference=0},isEnabled:function(){return this._super()&&0")},click:function(){this.set(!this.panel.isMaximized),this._super()},close:function(){this.exit(),this._super()},set:function(e,t){e?this.enter():this.exit(),t=i.boolean(t)?t:this.isVisible,this.toggle(t)},enter:function(){this.panel.isMaximized||(this.panel.isMaximized=!0,this.$placeholder.insertAfter(this.panel.$el),this.panel.$el.appendTo("body").addClass(this.panel.cls.maximized).attr({role:"dialog","aria-modal":!0}).trigger("focus"),this.panel.buttons.press("maximize",!0),this.panel.trapFocus(),this.panel.opt.noScrollbars&&(this.scrollPosition=[window.scrollX,window.scrollY],t("html").addClass(this.panel.cls.noScrollbars)))},exit:function(){this.panel.isMaximized&&(this.panel.isMaximized=!1,this.panel.$el.removeClass(this.panel.cls.maximized).attr({role:null,"aria-modal":null}).insertBefore(this.$placeholder),this.panel.isInline&&this.panel.$el.trigger("focus"),this.$placeholder.detach(),this.panel.buttons.press("maximize",!1),this.panel.releaseFocus(),this.panel.opt.noScrollbars&&(t("html").removeClass(this.panel.cls.noScrollbars).prop("clientWidth"),i.array(this.scrollPosition)&&2===this.scrollPosition.length&&window.scrollTo(this.scrollPosition[0],this.scrollPosition[1]),this.scrollPosition=[]))}})}(FooGallery.$,FooGallery,FooGallery.utils.is),function(e,o,r,n,s){o.Panel.Area=r.Class.extend({construct:function(e,t,i,n){this.panel=e,this.name=t,this.opt=s.extend({waitForUnload:!0},i),this.cls=s.extend({elem:this.__cls(e.cls.area.elem,t,!0),inner:this.__cls(e.cls.area.inner,t,!0)},n),this.sel=r.selectify(this.cls),this.currentMedia=null,this.$el=null,this.$inner=null,this.isCreated=!1,this.isAttached=!1},__cls:function(e,t,i){t=e.replace(/-area($|-)/,"-"+t+"$1");return i?[e,t].join(" "):t},create:function(){var e=this;return e.isCreated||(e.panel.trigger("area-create",[e]).isDefaultPrevented()||(e.isCreated=e.doCreate()),e.isCreated&&e.panel.trigger("area-created",[e])),e.isCreated},doCreate:function(){return this.$el=e("
    ").addClass(this.cls.elem),this.$inner=e("
    ").addClass(this.cls.inner).appendTo(this.$el),!0},destroy:function(){var e=this;return e.isCreated&&(e.panel.trigger("area-destroy",[e]).isDefaultPrevented()||(e.isCreated=!e.doDestroy()),e.isCreated||e.panel.trigger("area-destroyed",[e])),!e.isCreated},doDestroy:function(){return this.currentMedia instanceof o.Panel.Media&&this.currentMedia.detach(),this.$el.remove(),!0},appendTo:function(e){var t=this;return t.isCreated||t.create(),t.isCreated&&!t.isAttached&&(t.panel.trigger("area-append",[t,e]).isDefaultPrevented()||(t.isAttached=t.doAppendTo(e)),t.isAttached&&t.panel.trigger("area-appended",[t,e])),t.isAttached},doAppendTo:function(e){return this.$el.appendTo(e),0",{type:"button"}).addClass(this.cls.toggle).append(i.get("circle-close",this.panel.opt.icons)).on("click.foogallery",{self:this},this.onToggleClick).appendTo(this.$inner),this.isEnabled()&&(this.panel.$el.toggleClass(this.cls.visible,this.isVisible),this.setPosition(this.opt.position)),!0)},isEnabled:function(){return this.cls.position.hasOwnProperty(this.opt.position)},canLoad:function(e){return e instanceof t.Panel.Media},getPosition:function(){return this.isEnabled()?this.cls.position[this.opt.position]:null},setPosition:function(e){this.opt.position=this.cls.position.hasOwnProperty(e)?e:null,n.jq(this.panel.$el)&&this.panel.$el.removeClass(this.allPositionClasses).addClass(this.getPosition())},toggle:function(e){this.isVisible=n.boolean(e)?e:!this.isVisible,n.jq(this.panel.$el)&&this.panel.$el.toggleClass(this.cls.visible,this.isVisible),this.panel.buttons.press(this.name,this.isVisible)},onToggleClick:function(e){e.preventDefault(),e.data.self.toggle()}})}(FooGallery.$,FooGallery,FooGallery.icons,(FooGallery.utils,FooGallery.utils.is),(FooGallery.utils.fn,FooGallery.utils.obj)),function(e,i,n){e.Panel.Info=e.Panel.SideArea.extend({construct:function(e){this._super(e,"info",{icon:"info",label:e.il8n.buttons.info,position:e.opt.info,overlay:e.opt.infoOverlay,visible:e.opt.infoVisible,autoHide:e.opt.infoAutoHide,align:e.opt.infoAlign,waitForUnload:!1,group:"overlay"},e.cls.info),this.allPositionClasses+=" "+this.cls.overlay},doCreate:function(){var e=this;return!(!e.isEnabled()||!e._super())&&(i.string(e.opt.align)&&e.cls.align.hasOwnProperty(e.opt.align)&&e.panel.$el.addClass(e.cls.align[e.opt.align]),!0)},getPosition:function(){var e=this._super();return null!=e&&this.opt.overlay?e+" "+this.cls.overlay:e},setPosition:function(e,t){i.boolean(t)&&(this.opt.overlay=t),this._super(e)},canLoad:function(e){return this._super(e)&&e.caption.canLoad()},doLoad:function(e,t){return this.canLoad(e)&&(e.caption.appendTo(this.$inner),e.caption.load()),n.resolved},doUnload:function(e,t){return e.caption.unload(),e.caption.detach(),n.resolved}})}((FooGallery.$,FooGallery),FooGallery.utils.is,FooGallery.utils.fn),function(r,s,e,o,i,u,h){s.Panel.Thumbs=s.Panel.SideArea.extend({construct:function(e){this._super(e,"thumbs",{icon:"thumbs",label:e.il8n.buttons.thumbs,position:e.opt.thumbs,captions:e.opt.thumbsCaptions,align:e.opt.thumbsCaptionsAlign,small:e.opt.thumbsSmall,bestFit:e.opt.thumbsBestFit,toggle:!1,waitForUnload:!1},e.cls.thumbs),this.iobserver=null,this.robserver=null,this.$prev=null,this.$next=null,this.$viewport=null,this.$stage=null,this.$dummy=null,this.__items=[],this.__animationFrameId=null,this.info=this.getInfo(),this.selectedIndex=0,this.scrollIndex=0,this.lastIndex=0},isHorizontal:function(){return-1!==["top","bottom"].indexOf(this.opt.position)},doCreate:function(){var n=this;return!(!n.isEnabled()||!n._super())&&(n.opt.captions||n.panel.$el.addClass(n.cls.noCaptions),n.opt.small&&n.panel.$el.addClass(n.cls.small),i.string(n.opt.align)&&n.cls.align.hasOwnProperty(n.opt.align)&&n.panel.$el.addClass(n.cls.align[n.opt.align]),n.$prev=r("