!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,n){return void 0===n&&(n="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(n),n;}:e(jQuery);}(function(e){"use strict";function t(e,n){if(!(this instanceof t)){var r=new t(e,n);return r.open(),r}this.id=t.id++,this.setup(e,n),this.chainCallbacks(t._callbackChain);}function n(e,t){var n={};for(var r in e)r in t&&(n[r]=e[r],delete e[r]);return n;}function r(e,t){var n={},r=new RegExp("^"+t+"([A-Z])(.*)");for(var i in e){var s=i.match(r);if(s){var o=(s[1]+s[2].replace(/([A-Z])/g,"-$1")).toLowerCase();n[o]=e[i]}}return n;}if("undefined"==typeof e)return void ("console"in window&&window.console.info("Too much lightness, Featherlight needs jQuery."));if(e.fn.jquery.match(/-ajax/))return void ("console"in window&&window.console.info("Featherlight needs regular jQuery, not the slim version."));var i=[],s=function(t){return i=e.grep(i,function(e){return e!==t&&e.$instance.closest("body").length>0;});},o={allow:1,allowfullscreen:1,frameborder:1,height:1,longdesc:1,marginheight:1,marginwidth:1,mozallowfullscreen:1,name:1,referrerpolicy:1,sandbox:1,scrolling:1,src:1,srcdoc:1,style:1,webkitallowfullscreen:1,width:1},u={keyup:"onKeyUp",resize:"onResize"},a=function(n){e.each(t.opened().reverse(),function(){return n.isDefaultPrevented()||!1!==this[u[n.type]](n)?void 0:(n.preventDefault(),n.stopPropagation(),!1);});},f=function(n){if(n!==t._globalHandlerInstalled){t._globalHandlerInstalled=n;var r=e.map(u,function(e,n){return n+"."+t.prototype.namespace;}).join(" ");e(window)[n?"on":"off"](r,a)}};t.prototype={constructor:t,namespace:"featherlight",targetAttr:"data-featherlight",variant:null,resetCss:!1,background:null,openTrigger:"click",closeTrigger:"click",filter:null,root:"body",openSpeed:250,closeSpeed:250,closeOnClick:"background",closeOnEsc:!0,closeIcon:"✕",loading:"",persist:!1,otherClose:null,beforeOpen:e.noop,beforeContent:e.noop,beforeClose:e.noop,afterOpen:e.noop,afterContent:e.noop,afterClose:e.noop,onKeyUp:e.noop,onResize:e.noop,type:null,contentFilters:["jquery","image","html","ajax","iframe","text"],setup:function(t,n){"object"!=typeof t||t instanceof e!=!1||n||(n=t,t=void 0);var r=e.extend(this,n,{target:t}),i=r.resetCss?r.namespace+"-reset":r.namespace,s=e(r.background||['
','
','",'
'+r.loading+"
","
","
"].join("")),o="."+r.namespace+"-close"+(r.otherClose?","+r.otherClose:"");return r.$instance=s.clone().addClass(r.variant),r.$instance.on(r.closeTrigger+"."+r.namespace,function(t){if(!t.isDefaultPrevented()){var n=e(t.target);("background"===r.closeOnClick&&n.is("."+r.namespace)||"anywhere"===r.closeOnClick||n.closest(o).length)&&(r.close(t),t.preventDefault())}}),this;},getContent:function(){if(this.persist!==!1&&this.$content)return this.$content;var t=this,n=this.constructor.contentFilters,r=function(e){return t.$currentTarget&&t.$currentTarget.attr(e);},i=r(t.targetAttr),s=t.target||i||"",o=n[t.type];if(!o&&s in n&&(o=n[s],s=t.target&&i),s=s||r("href")||"",!o)for(var u in n)t[u]&&(o=n[u],s=t[u]);if(!o){var a=s;if(s=null,e.each(t.contentFilters,function(){return o=n[this],o.test&&(s=o.test(a)),!s&&o.regex&&a.match&&a.match(o.regex)&&(s=a),!s;}),!s)return"console"in window&&window.console.error("Featherlight: no content filter found "+(a?' for "'+a+'"':" (no target specified)")),!1}return o.process.call(t,s);},setContent:function(t){return this.$instance.removeClass(this.namespace+"-loading"),this.$instance.toggleClass(this.namespace+"-iframe",t.is("iframe")),this.$instance.find("."+this.namespace+"-inner").not(t).slice(1).remove().end().replaceWith(e.contains(this.$instance[0],t[0])?"":t),this.$content=t.addClass(this.namespace+"-inner"),this;},open:function(t){var n=this;if(n.$instance.hide().appendTo(n.root),!(t&&t.isDefaultPrevented()||n.beforeOpen(t)===!1)){t&&t.preventDefault();var r=n.getContent();if(r)return i.push(n),f(!0),n.$instance.fadeIn(n.openSpeed),n.beforeContent(t),e.when(r).always(function(e){e&&(n.setContent(e),n.afterContent(t));}).then(n.$instance.promise()).done(function(){n.afterOpen(t);})}return n.$instance.detach(),e.Deferred().reject().promise();},close:function(t){var n=this,r=e.Deferred();return n.beforeClose(t)===!1?r.reject():(0===s(n).length&&f(!1),n.$instance.fadeOut(n.closeSpeed,function(){n.$instance.detach(),n.afterClose(t),r.resolve();})),r.promise();},resize:function(e,t){if(e&&t){this.$content.css("width","").css("height","");var n=Math.max(e/(this.$content.parent().width()-1),t/(this.$content.parent().height()-1));n>1&&(n=t/Math.floor(t/n),this.$content.css("width",""+e/n+"px").css("height",""+t/n+"px"))}},chainCallbacks:function(t){for(var n in t)this[n]=e.proxy(t[n],this,e.proxy(this[n],this));}},e.extend(t,{id:0,autoBind:"[data-featherlight]",defaults:t.prototype,contentFilters:{jquery:{regex:/^[#.]\w/,test:function(t){return t instanceof e&&t;},process:function(t){return this.persist!==!1?e(t):e(t).clone(!0);}},image:{regex:/\.(png|jpg|jpeg|gif|tiff?|bmp|svg)(\?\S*)?$/i,process:function(t){var n=this,r=e.Deferred(),i=new Image,s=e('');return i.onload=function(){s.naturalWidth=i.width,s.naturalHeight=i.height,r.resolve(s);},i.onerror=function(){r.reject(s);},i.src=t,r.promise();}},html:{regex:/^\s*<[\w!][^<]*>/,process:function(t){return e(t);}},ajax:{regex:/./,process:function(t){var n=e.Deferred(),r=e("
").load(t,function(e,t){"error"!==t&&n.resolve(r.contents()),n.reject();});return n.promise();}},iframe:{process:function(t){var i=new e.Deferred,s=e("