1/* begin fancybox */
vendor: 68,253 bytes, lines 2-14
2// ================================================== 3// fancyBox v3.5.7 4// 5// Licensed GPLv3 for open source use 6// or fancyBox Commercial License for commercial use 7// 8// http://fancyapps.com/fancybox/ 9// Copyright 2019 fancyApps 10// 11// ================================================== 12!function(t,e,n,o){"use strict";function i(t,e){var o,i,a,s=[],r=0;t&&t.isDefaultPrevented()||(t.preventDefault(),e=e||{},t&&t.data&&(e=h(t.data.options,e)),o=e.$target||n(t.currentTarget).trigger("blur"),(a=n.fancybox.getInstance())&&a.$trigger&&a.$trigger.is(o)||(e.selector?s=n(e.selector):(i=o.attr("data-fancybox")||"",i?(s=t.data?t.data.items:[],s=s.length?s.filter('[data-fancybox="'+i+'"]'):n('[data-fancybox="'+i+'"]')):s=[o]),r=n(s).index(o),r<0&&(r=0),a=n.fancybox.open(s,e,r),a.$trigger=o))}if(t.console=t.console||{info:function(t){}},n){if(n.fn.fancybox)return void console.info("fancyBox already initialized");var a={closeExisting:!1,loop:!1,gutter:50,keyboard:!0,preventCaptionOverlap:!0,arrows:!0,infobar:!0,smallBtn:"auto",toolbar:"auto",buttons:["zoom","slideShow","thumbs","close"],idleTime:3,protect:!1,modal:!1,image:{preload:!1},ajax:{settings:{data:{fancybox:!0}}},iframe:{tpl:'<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" allowfullscreen="allowfullscreen" allow="autoplay; fullscreen" src=""></iframe>',preload:!0,css:{},attr:{scrolling:"auto"}},video:{tpl:'<video class="fancybox-video" controls controlsList="nodownload" poster="{{poster}}"><source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos, <a href="{{src}}">download</a> and watch with your favorite video player!</video>',format:"",autoStart:!0},defaultType:"image",animationEffect:"zoom",animationDuration:366,zoomOpacity:"auto",transitionEffect:"fade",transitionDuration:366,slideClass:"",baseClass:"",baseTpl:'<div class="fancybox-container" role="dialog" tabindex="-1"><div class="fancybox-bg"></div><div class="fancybox-inner"><div class="fancybox-infobar"><span data-fancybox-index></span> / <span data-fancybox-count></span></div><div class="fancybox-toolbar">{{buttons}}</div><div class="fancybox-navigation">{{arrows}}</div><div class="fancybox-stage"></div><div class="fancybox-caption"><div class="fancybox-caption__body"></div></div></div></div>',spinnerTpl:'<div class="fancybox-loading"></div>',errorTpl:'<div class="fancybox-error"><p>{{ERROR}}</p></div>',btnTpl:{download:'<a download data-fancybox-download class="fancybox-button fancybox-button--download" title="{{DOWNLOAD}}" href="javascript:;"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.62 17.09V19H5.38v-1.91zm-2.97-6.96L17 11.45l-5 4.87-5-4.87 1.36-1.32 2.68 2.64V5h1.92v7.77z"/></svg></a>',zoom:'<button data-fancybox-zoom class="fancybox-button fancybox-button--zoom" title="{{ZOOM}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.7 17.3l-3-3a5.9 5.9 0 0 0-.6-7.6 5.9 5.9 0 0 0-8.4 0 5.9 5.9 0 0 0 0 8.4 5.9 5.9 0 0 0 7.7.7l3 3a1 1 0 0 0 1.3 0c.4-.5.4-1 0-1.5zM8.1 13.8a4 4 0 0 1 0-5.7 4 4 0 0 1 5.7 0 4 4 0 0 1 0 5.7 4 4 0 0 1-5.7 0z"/></svg></button>',close:'<button data-fancybox-close class="fancybox-button fancybox-button--close" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 10.6L6.6 5.2 5.2 6.6l5.4 5.4-5.4 5.4 1.4 1.4 5.4-5.4 5.4 5.4 1.4-1.4-5.4-5.4 5.4-5.4-1.4-1.4-5.4 5.4z"/></svg></button>',arrowLeft:'<button data-fancybox-prev class="fancybox-button fancybox-button--arrow_left" title="{{PREV}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.28 15.7l-1.34 1.37L5 12l4.94-5.07 1.34 1.38-2.68 2.72H19v1.94H8.6z"/></svg></div></button>',arrowRight:'<button data-fancybox-next class="fancybox-button fancybox-button--arrow_right" title="{{NEXT}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.4 12.97l-2.68 2.72 1.34 1.38L19 12l-4.94-5.07-1.34 1.38 2.68 2.72H5v1.94z"/></svg></div></button>',smallBtn:'<button type="button" data-fancybox-close class="fancybox-button fancybox-close-small" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" version="1" viewBox="0 0 24 24"><path d="M13 12l5-5-1-1-5 5-5-5-1 1 5 5-5 5 1 1 5-5 5 5 1-1z"/></svg></button>'},parentEl:"body",hideScrollbar:!0,autoFocus:!0,backFocus:!0,trapFocus:!0,fullScreen:{autoStart:!1},touch:{vertical:!0,momentum:!0},hash:null,media:{},slideShow:{autoStart:!1,speed:3e3},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"},wheel:"auto",onInit:n.noop,beforeLoad:n.noop,afterLoad:n.noop,beforeShow:n.noop,afterShow:n.noop,beforeClose:n.noop,afterClose:n.noop,onActivate:n.noop,onDeactivate:n.noop,clickContent:function(t,e){return"image"===t.type&&"zoom"},clickSlide:"close",clickOutside:"close",dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1,mobile:{preventCaptionOverlap:!1,idleTime:!1,clickContent:function(t,e){return"image"===t.type&&"toggleControls"},clickSlide:function(t,e){return"image"===t.type?"toggleControls":"close"},dblclickContent:function(t,e){return"image"===t.type&&"zoom"},dblclickSlide:function(t,e){return"image"===t.type&&"zoom"}},lang:"en",i18n:{en:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",ERROR:"The requested content cannot be loaded. <br/> Please try again later.",PLAY_START:"Start slideshow",PLAY_STOP:"Pause slideshow",FULL_SCREEN:"Full screen",THUMBS:"Thumbnails",DOWNLOAD:"Download",SHARE:"Share",ZOOM:"Zoom"},de:{CLOSE:"Schließen",NEXT:"Weiter",PREV:"Zurück",ERROR:"Die angeforderten Daten konnten nicht geladen werden. <br/> Bitte versuchen Sie es später nochmal.",PLAY_START:"Diaschau starten",PLAY_STOP:"Diaschau beenden",FULL_SCREEN:"Vollbild",THUMBS:"Vorschaubilder",DOWNLOAD:"Herunterladen",SHARE:"Teilen",ZOOM:"Vergrößern"}}},s=n(t),r=n(e),c=0,l=function(t){return t&&t.hasOwnProperty&&t instanceof n},d=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),u=function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)}}(),f=function(){var t,n=e.createElement("fakeelement"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in o)if(void 0!==n.style[t])return o[t];return"transitionend"}(),p=function(t){return t&&t.length&&t[0].offsetHeight},h=function(t,e){var o=n.extend(!0,{},t,e);return n.each(e,function(t,e){n.isArray(e)&&(o[t]=e)}),o},g=function(t){var o,i;return!(!t||t.ownerDocument!==e)&&(n(".fancybox-container").css("pointer-events","none"),o={x:t.getBoundingClientRect().left+t.offsetWidth/2,y:t.getBoundingClientRect().top+t.offsetHeight/2},i=e.elementFromPoint(o.x,o.y)===t,n(".fancybox-container").css("pointer-events",""),i)},b=function(t,e,o){var i=this;i.opts=h({index:o},n.fancybox.defaults),n.isPlainObject(e)&&(i.opts=h(i.opts,e)),n.fancybox.isMobile&&(i.opts=h(i.opts,i.opts.mobile)),i.id=i.opts.id||++c,i.currIndex=parseInt(i.opts.index,10)||0,i.prevIndex=null,i.prevPos=null,i.currPos=0,i.firstRun=!0,i.group=[],i.slides={},i.addContent(t),i.group.length&&i.init()};n.extend(b.prototype,{init:function(){var o,i,a=this,s=a.group[a.currIndex],r=s.opts;r.closeExisting&&n.fancybox.close(!0),n("body").addClass("fancybox-active"),!n.fancybox.getInstance()&&!1!==r.hideScrollbar&&!n.fancybox.isMobile&&e.body.scrollHeight>t.innerHeight&&(n("head").append('<style id="fancybox-style-noscroll" type="text/css">.compensate-for-scrollbar{margin-right:'+(t.innerWidth-e.documentElement.clientWidth)+"px;}</style>"),n("body").addClass("compensate-for-scrollbar")),i="",n.each(r.buttons,function(t,e){i+=r.btnTpl[e]||""}),o=n(a.translate(a,r.baseTpl.replace("{{buttons}}",i).replace("{{arrows}}",r.btnTpl.arrowLeft+r.btnTpl.arrowRight))).attr("id","fancybox-container-"+a.id).addClass(r.baseClass).data("FancyBox",a).appendTo(r.parentEl),a.$refs={container:o},["bg","inner","infobar","toolbar","stage","caption","navigation"].forEach(function(t){a.$refs[t]=o.find(".fancybox-"+t)}),a.trigger("onInit"),a.activate(),a.jumpTo(a.currIndex)},translate:function(t,e){var n=t.opts.i18n[t.opts.lang]||t.opts.i18n.en;return e.replace(/\{\{(\w+)\}\}/g,function(t,e){return void 0===n[e]?t:n[e]})},addContent:function(t){var e,o=this,i=n.makeArray(t);n.each(i,function(t,e){var i,a,s,r,c,l={},d={};n.isPlainObject(e)?(l=e,d=e.opts||e):"object"===n.type(e)&&n(e).length?(i=n(e),d=i.data()||{},d=n.extend(!0,{},d,d.options),d.$orig=i,l.src=o.opts.src||d.src||i.attr("href"),l.type||l.src||(l.type="inline",l.src=e)):l={type:"html",src:e+""},l.opts=n.extend(!0,{},o.opts,d),n.isArray(d.buttons)&&(l.opts.buttons=d.buttons),n.fancybox.isMobile&&l.opts.mobile&&(l.opts=h(l.opts,l.opts.mobile)),a=l.type||l.opts.type,r=l.src||"",!a&&r&&((s=r.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(a="video",l.opts.video.format||(l.opts.video.format="video/"+("ogv"===s[1]?"ogg":s[1]))):r.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?a="image":r.match(/\.(pdf)((\?|#).*)?$/i)?(a="iframe",l=n.extend(!0,l,{contentType:"pdf",opts:{iframe:{preload:!1}}})):"#"===r.charAt(0)&&(a="inline")),a?l.type=a:o.trigger("objectNeedsType",l),l.contentType||(l.contentType=n.inArray(l.type,["html","inline","ajax"])>-1?"html":l.type),l.index=o.group.length,"auto"==l.opts.smallBtn&&(l.opts.smallBtn=n.inArray(l.type,["html","inline","ajax"])>-1),"auto"===l.opts.toolbar&&(l.opts.toolbar=!l.opts.smallBtn),l.$thumb=l.opts.$thumb||null,l.opts.$trigger&&l.index===o.opts.index&&(l.$thumb=l.opts.$trigger.find("img:first"),l.$thumb.length&&(l.opts.$orig=l.opts.$trigger)),l.$thumb&&l.$thumb.length||!l.opts.$orig||(l.$thumb=l.opts.$orig.find("img:first")),l.$thumb&&!l.$thumb.length&&(l.$thumb=null),l.thumb=l.opts.thumb||(l.$thumb?l.$thumb[0].src:null),"function"===n.type(l.opts.caption)&&(l.opts.caption=l.opts.caption.apply(e,[o,l])),"function"===n.type(o.opts.caption)&&(l.opts.caption=o.opts.caption.apply(e,[o,l])),l.opts.caption instanceof n||(l.opts.caption=void 0===l.opts.caption?"":l.opts.caption+""),"ajax"===l.type&&(c=r.split(/\s+/,2),c.length>1&&(l.src=c.shift(),l.opts.filter=c.shift())),l.opts.modal&&(l.opts=n.extend(!0,l.opts,{trapFocus:!0,infobar:0,toolbar:0,smallBtn:0,keyboard:0,slideShow:0,fullScreen:0,thumbs:0,touch:0,clickContent:!1,clickSlide:!1,clickOutside:!1,dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1})),o.group.push(l)}),Object.keys(o.slides).length&&(o.updateControls(),(e=o.Thumbs)&&e.isActive&&(e.create(),e.focus()))},addEvents:function(){var e=this;e.removeEvents(),e.$refs.container.on("click.fb-close","[data-fancybox-close]",function(t){t.stopPropagation(),t.preventDefault(),e.close(t)}).on("touchstart.fb-prev click.fb-prev","[data-fancybox-prev]",function(t){t.stopPropagation(),t.preventDefault(),e.previous()}).on("touchstart.fb-next click.fb-next","[data-fancybox-next]",function(t){t.stopPropagation(),t.preventDefault(),e.next()}).on("click.fb","[data-fancybox-zoom]",function(t){e[e.isScaledDown()?"scaleToActual":"scaleToFit"]()}),s.on("orientationchange.fb resize.fb",function(t){t&&t.originalEvent&&"resize"===t.originalEvent.type?(e.requestId&&u(e.requestId),e.requestId=d(function(){e.update(t)})):(e.current&&"iframe"===e.current.type&&e.$refs.stage.hide(),setTimeout(function(){e.$refs.stage.show(),e.update(t)},n.fancybox.isMobile?600:250))}),r.on("keydown.fb",function(t){var o=n.fancybox?n.fancybox.getInstance():null,i=o.current,a=t.keyCode||t.which;if(9==a)return void(i.opts.trapFocus&&e.focus(t));if(!(!i.opts.keyboard||t.ctrlKey||t.altKey||t.shiftKey||n(t.target).is("input,textarea,video,audio,select")))return 8===a||27===a?(t.preventDefault(),void e.close(t)):37===a||38===a?(t.preventDefault(),void e.previous()):39===a||40===a?(t.preventDefault(),void e.next()):void e.trigger("afterKeydown",t,a)}),e.group[e.currIndex].opts.idleTime&&(e.idleSecondsCounter=0,r.on("mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle",function(t){e.idleSecondsCounter=0,e.isIdle&&e.showControls(),e.isIdle=!1}),e.idleInterval=t.setInterval(function(){++e.idleSecondsCounter>=e.group[e.currIndex].opts.idleTime&&!e.isDragging&&(e.isIdle=!0,e.idleSecondsCounter=0,e.hideControls())},1e3))},removeEvents:function(){var e=this;s.off("orientationchange.fb resize.fb"),r.off("keydown.fb .fb-idle"),this.$refs.container.off(".fb-close .fb-prev .fb-next"),e.idleInterval&&(t.clearInterval(e.idleInterval),e.idleInterval=null)},previous:function(t){return this.jumpTo(this.currPos-1,t)},next:function(t){return this.jumpTo(this.currPos+1,t)},jumpTo:function(t,e){var o,i,a,s,r,c,l,d,u,f=this,h=f.group.length;if(!(f.isDragging||f.isClosing||f.isAnimating&&f.firstRun)){if(t=parseInt(t,10),!(a=f.current?f.current.opts.loop:f.opts.loop)&&(t<0||t>=h))return!1;if(o=f.firstRun=!Object.keys(f.slides).length,r=f.current,f.prevIndex=f.currIndex,f.prevPos=f.currPos,s=f.createSlide(t),h>1&&((a||s.index<h-1)&&f.createSlide(t+1),(a||s.index>0)&&f.createSlide(t-1)),f.current=s,f.currIndex=s.index,f.currPos=s.pos,f.trigger("beforeShow",o),f.updateControls(),s.forcedDuration=void 0,n.isNumeric(e)?s.forcedDuration=e:e=s.opts[o?"animationDuration":"transitionDuration"],e=parseInt(e,10),i=f.isMoved(s),s.$slide.addClass("fancybox-slide--current"),o)return s.opts.animationEffect&&e&&f.$refs.container.css("transition-duration",e+"ms"),f.$refs.container.addClass("fancybox-is-open").trigger("focus"),f.loadSlide(s),void f.preload("image");c=n.fancybox.getTranslate(r.$slide),l=n.fancybox.getTranslate(f.$refs.stage),n.each(f.slides,function(t,e){n.fancybox.stop(e.$slide,!0)}),r.pos!==s.pos&&(r.isComplete=!1),r.$slide.removeClass("fancybox-slide--complete fancybox-slide--current"),i?(u=c.left-(r.pos*c.width+r.pos*r.opts.gutter),n.each(f.slides,function(t,o){o.$slide.removeClass("fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)fancybox-fx-\S+/g)||[]).join(" ")});var i=o.pos*c.width+o.pos*o.opts.gutter;n.fancybox.setTranslate(o.$slide,{top:0,left:i-l.left+u}),o.pos!==s.pos&&o.$slide.addClass("fancybox-slide--"+(o.pos>s.pos?"next":"previous")),p(o.$slide),n.fancybox.animate(o.$slide,{top:0,left:(o.pos-s.pos)*c.width+(o.pos-s.pos)*o.opts.gutter},e,function(){o.$slide.css({transform:"",opacity:""}).removeClass("fancybox-slide--next fancybox-slide--previous"),o.pos===f.currPos&&f.complete()})})):e&&s.opts.transitionEffect&&(d="fancybox-animated fancybox-fx-"+s.opts.transitionEffect,r.$slide.addClass("fancybox-slide--"+(r.pos>s.pos?"next":"previous")),n.fancybox.animate(r.$slide,d,e,function(){r.$slide.removeClass(d).removeClass("fancybox-slide--next fancybox-slide--previous")},!1)),s.isLoaded?f.revealContent(s):f.loadSlide(s),f.preload("image")}},createSlide:function(t){var e,o,i=this;return o=t%i.group.length,o=o<0?i.group.length+o:o,!i.slides[t]&&i.group[o]&&(e=n('<div class="fancybox-slide"></div>').appendTo(i.$refs.stage),i.slides[t]=n.extend(!0,{},i.group[o],{pos:t,$slide:e,isLoaded:!1}),i.updateSlide(i.slides[t])),i.slides[t]},scaleToActual:function(t,e,o){var i,a,s,r,c,l=this,d=l.current,u=d.$content,f=n.fancybox.getTranslate(d.$slide).width,p=n.fancybox.getTranslate(d.$slide).height,h=d.width,g=d.height;l.isAnimating||l.isMoved()||!u||"image"!=d.type||!d.isLoaded||d.hasError||(l.isAnimating=!0,n.fancybox.stop(u),t=void 0===t?.5*f:t,e=void 0===e?.5*p:e,i=n.fancybox.getTranslate(u),i.top-=n.fancybox.getTranslate(d.$slide).top,i.left-=n.fancybox.getTranslate(d.$slide).left,r=h/i.width,c=g/i.height,a=.5*f-.5*h,s=.5*p-.5*g,h>f&&(a=i.left*r-(t*r-t),a>0&&(a=0),a<f-h&&(a=f-h)),g>p&&(s=i.top*c-(e*c-e),s>0&&(s=0),s<p-g&&(s=p-g)),l.updateCursor(h,g),n.fancybox.animate(u,{top:s,left:a,scaleX:r,scaleY:c},o||366,function(){l.isAnimating=!1}),l.SlideShow&&l.SlideShow.isActive&&l.SlideShow.stop())},scaleToFit:function(t){var e,o=this,i=o.current,a=i.$content;o.isAnimating||o.isMoved()||!a||"image"!=i.type||!i.isLoaded||i.hasError||(o.isAnimating=!0,n.fancybox.stop(a),e=o.getFitPos(i),o.updateCursor(e.width,e.height),n.fancybox.animate(a,{top:e.top,left:e.left,scaleX:e.width/a.width(),scaleY:e.height/a.height()},t||366,function(){o.isAnimating=!1}))},getFitPos:function(t){var e,o,i,a,s=this,r=t.$content,c=t.$slide,l=t.width||t.opts.width,d=t.height||t.opts.height,u={};return!!(t.isLoaded&&r&&r.length)&&(e=n.fancybox.getTranslate(s.$refs.stage).width,o=n.fancybox.getTranslate(s.$refs.stage).height,e-=parseFloat(c.css("paddingLeft"))+parseFloat(c.css("paddingRight"))+parseFloat(r.css("marginLeft"))+parseFloat(r.css("marginRight")),o-=parseFloat(c.css("paddingTop"))+parseFloat(c.css("paddingBottom"))+parseFloat(r.css("marginTop"))+parseFloat(r.css("marginBottom")),l&&d||(l=e,d=o),i=Math.min(1,e/l,o/d),l*=i,d*=i,l>e-.5&&(l=e),d>o-.5&&(d=o),"image"===t.type?(u.top=Math.floor(.5*(o-d))+parseFloat(c.css("paddingTop")),u.left=Math.floor(.5*(e-l))+parseFloat(c.css("paddingLeft"))):"video"===t.contentType&&(a=t.opts.width&&t.opts.height?l/d:t.opts.ratio||16/9,d>l/a?d=l/a:l>d*a&&(l=d*a)),u.width=l,u.height=d,u)},update:function(t){var e=this;n.each(e.slides,function(n,o){e.updateSlide(o,t)})},updateSlide:function(t,e){var o=this,i=t&&t.$content,a=t.width||t.opts.width,s=t.height||t.opts.height,r=t.$slide;o.adjustCaption(t),i&&(a||s||"video"===t.contentType)&&!t.hasError&&(n.fancybox.stop(i),n.fancybox.setTranslate(i,o.getFitPos(t)),t.pos===o.currPos&&(o.isAnimating=!1,o.updateCursor())),o.adjustLayout(t),r.length&&(r.trigger("refresh"),t.pos===o.currPos&&o.$refs.toolbar.add(o.$refs.navigation.find(".fancybox-button--arrow_right")).toggleClass("compensate-for-scrollbar",r.get(0).scrollHeight>r.get(0).clientHeight)),o.trigger("onUpdate",t,e)},centerSlide:function(t){var e=this,o=e.current,i=o.$slide;!e.isClosing&&o&&(i.siblings().css({transform:"",opacity:""}),i.parent().children().removeClass("fancybox-slide--previous fancybox-slide--next"),n.fancybox.animate(i,{top:0,left:0,opacity:1},void 0===t?0:t,function(){i.css({transform:"",opacity:""}),o.isComplete||e.complete()},!1))},isMoved:function(t){var e,o,i=t||this.current;return!!i&&(o=n.fancybox.getTranslate(this.$refs.stage),e=n.fancybox.getTranslate(i.$slide),!i.$slide.hasClass("fancybox-animated")&&(Math.abs(e.top-o.top)>.5||Math.abs(e.left-o.left)>.5))},updateCursor:function(t,e){var o,i,a=this,s=a.current,r=a.$refs.container;s&&!a.isClosing&&a.Guestures&&(r.removeClass("fancybox-is-zoomable fancybox-can-zoomIn fancybox-can-zoomOut fancybox-can-swipe fancybox-can-pan"),o=a.canPan(t,e),i=!!o||a.isZoomable(),r.toggleClass("fancybox-is-zoomable",i),n("[data-fancybox-zoom]").prop("disabled",!i),o?r.addClass("fancybox-can-pan"):i&&("zoom"===s.opts.clickContent||n.isFunction(s.opts.clickContent)&&"zoom"==s.opts.clickContent(s))?r.addClass("fancybox-can-zoomIn"):s.opts.touch&&(s.opts.touch.vertical||a.group.length>1)&&"video"!==s.contentType&&r.addClass("fancybox-can-swipe"))},isZoomable:function(){var t,e=this,n=e.current;if(n&&!e.isClosing&&"image"===n.type&&!n.hasError){if(!n.isLoaded)return!0;if((t=e.getFitPos(n))&&(n.width>t.width||n.height>t.height))return!0}return!1},isScaledDown:function(t,e){var o=this,i=!1,a=o.current,s=a.$content;return void 0!==t&&void 0!==e?i=t<a.width&&e<a.height:s&&(i=n.fancybox.getTranslate(s),i=i.width<a.width&&i.height<a.height),i},canPan:function(t,e){var o=this,i=o.current,a=null,s=!1;return"image"===i.type&&(i.isComplete||t&&e)&&!i.hasError&&(s=o.getFitPos(i),void 0!==t&&void 0!==e?a={width:t,height:e}:i.isComplete&&(a=n.fancybox.getTranslate(i.$content)),a&&s&&(s=Math.abs(a.width-s.width)>1.5||Math.abs(a.height-s.height)>1.5)),s},loadSlide:function(t){var e,o,i,a=this;if(!t.isLoading&&!t.isLoaded){if(t.isLoading=!0,!1===a.trigger("beforeLoad",t))return t.isLoading=!1,!1;switch(e=t.type,o=t.$slide,o.off("refresh").trigger("onReset").addClass(t.opts.slideClass),e){case"image":a.setImage(t);break;case"iframe":a.setIframe(t);break;case"html":a.setContent(t,t.src||t.content);break;case"video":a.setContent(t,t.opts.video.tpl.replace(/\{\{src\}\}/gi,t.src).replace("{{format}}",t.opts.videoFormat||t.opts.video.format||"").replace("{{poster}}",t.thumb||""));break;case"inline":n(t.src).length?a.setContent(t,n(t.src)):a.setError(t);break;case"ajax":a.showLoading(t),i=n.ajax(n.extend({},t.opts.ajax.settings,{url:t.src,success:function(e,n){"success"===n&&a.setContent(t,e)},error:function(e,n){e&&"abort"!==n&&a.setError(t)}})),o.one("onReset",function(){i.abort()});break;default:a.setError(t)}return!0}},setImage:function(t){var o,i=this;setTimeout(function(){var e=t.$image;i.isClosing||!t.isLoading||e&&e.length&&e[0].complete||t.hasError||i.showLoading(t)},50),i.checkSrcset(t),t.$content=n('<div class="fancybox-content"></div>').addClass("fancybox-is-hidden").appendTo(t.$slide.addClass("fancybox-slide--image")),!1!==t.opts.preload&&t.opts.width&&t.opts.height&&t.thumb&&(t.width=t.opts.width,t.height=t.opts.height,o=e.createElement("img"),o.onerror=function(){n(this).remove(),t.$ghost=null},o.onload=function(){i.afterLoad(t)},t.$ghost=n(o).addClass("fancybox-image").appendTo(t.$content).attr("src",t.thumb)),i.setBigImage(t)},checkSrcset:function(e){var n,o,i,a,s=e.opts.srcset||e.opts.image.srcset;if(s){i=t.devicePixelRatio||1,a=t.innerWidth*i,o=s.split(",").map(function(t){var e={};return t.trim().split(/\s+/).forEach(function(t,n){var o=parseInt(t.substring(0,t.length-1),10);if(0===n)return e.url=t;o&&(e.value=o,e.postfix=t[t.length-1])}),e}),o.sort(function(t,e){return t.value-e.value});for(var r=0;r<o.length;r++){var c=o[r];if("w"===c.postfix&&c.value>=a||"x"===c.postfix&&c.value>=i){n=c;break}}!n&&o.length&&(n=o[o.length-1]),n&&(e.src=n.url,e.width&&e.height&&"w"==n.postfix&&(e.height=e.width/e.height*n.value,e.width=n.value),e.opts.srcset=s)}},setBigImage:function(t){var o=this,i=e.createElement("img"),a=n(i);t.$image=a.one("error",function(){o.setError(t)}).one("load",function(){var e;t.$ghost||(o.resolveImageSlideSize(t,this.naturalWidth,this.naturalHeight),o.afterLoad(t)),o.isClosing||(t.opts.srcset&&(e=t.opts.sizes,e&&"auto"!==e||(e=(t.width/t.height>1&&s.width()/s.height()>1?"100":Math.round(t.width/t.height*100))+"vw"),a.attr("sizes",e).attr("srcset",t.opts.srcset)),t.$ghost&&setTimeout(function(){t.$ghost&&!o.isClosing&&t.$ghost.hide()},Math.min(300,Math.max(1e3,t.height/1600))),o.hideLoading(t))}).addClass("fancybox-image").attr("src",t.src).appendTo(t.$content),(i.complete||"complete"==i.readyState)&&a.naturalWidth&&a.naturalHeight?a.trigger("load"):i.error&&a.trigger("error")},resolveImageSlideSize:function(t,e,n){var o=parseInt(t.opts.width,10),i=parseInt(t.opts.height,10);t.width=e,t.height=n,o>0&&(t.width=o,t.height=Math.floor(o*n/e)),i>0&&(t.width=Math.floor(i*e/n),t.height=i)},setIframe:function(t){var e,o=this,i=t.opts.iframe,a=t.$slide;t.$content=n('<div class="fancybox-content'+(i.preload?" fancybox-is-hidden":"")+'"></div>').css(i.css).appendTo(a),a.addClass("fancybox-slide--"+t.contentType),t.$iframe=e=n(i.tpl.replace(/\{rnd\}/g,(new Date).getTime())).attr(i.attr).appendTo(t.$content),i.preload?(o.showLoading(t),e.on("load.fb error.fb",function(e){this.isReady=1,t.$slide.trigger("refresh"),o.afterLoad(t)}),a.on("refresh.fb",function(){var n,o,s=t.$content,r=i.css.width,c=i.css.height;if(1===e[0].isReady){try{n=e.contents(),o=n.find("body")}catch(t){}o&&o.length&&o.children().length&&(a.css("overflow","visible"),s.css({width:"100%","max-width":"100%",height:"9999px"}),void 0===r&&(r=Math.ceil(Math.max(o[0].clientWidth,o.outerWidth(!0)))),s.css("width",r||"").css("max-width",""),void 0===c&&(c=Math.ceil(Math.max(o[0].clientHeight,o.outerHeight(!0)))),s.css("height",c||""),a.css("overflow","auto")),s.removeClass("fancybox-is-hidden")}})):o.afterLoad(t),e.attr("src",t.src),a.one("onReset",function(){try{n(this).find("iframe").hide().unbind().attr("src","//about:blank")}catch(t){}n(this).off("refresh.fb").empty(),t.isLoaded=!1,t.isRevealed=!1})},setContent:function(t,e){var o=this;o.isClosing||(o.hideLoading(t),t.$content&&n.fancybox.stop(t.$content),t.$slide.empty(),l(e)&&e.parent().length?((e.hasClass("fancybox-content")||e.parent().hasClass("fancybox-content"))&&e.parents(".fancybox-slide").trigger("onReset"),t.$placeholder=n("<div>").hide().insertAfter(e),e.css("display","inline-block")):t.hasError||("string"===n.type(e)&&(e=n("<div>").append(n.trim(e)).contents()),t.opts.filter&&(e=n("<div>").html(e).find(t.opts.filter))),t.$slide.one("onReset",function(){n(this).find("video,audio").trigger("pause"),t.$placeholder&&(t.$placeholder.after(e.removeClass("fancybox-content").hide()).remove(),t.$placeholder=null),t.$smallBtn&&(t.$smallBtn.remove(),t.$smallBtn=null),t.hasError||(n(this).empty(),t.isLoaded=!1,t.isRevealed=!1)}),n(e).appendTo(t.$slide),n(e).is("video,audio")&&(n(e).addClass("fancybox-video"),n(e).wrap("<div></div>"),t.contentType="video",t.opts.width=t.opts.width||n(e).attr("width"),t.opts.height=t.opts.height||n(e).attr("height")),t.$content=t.$slide.children().filter("div,form,main,video,audio,article,.fancybox-content").first(),t.$content.siblings().hide(),t.$content.length||(t.$content=t.$slide.wrapInner("<div></div>").children().first()),t.$content.addClass("fancybox-content"),t.$slide.addClass("fancybox-slide--"+t.contentType),o.afterLoad(t))},setError:function(t){t.hasError=!0,t.$slide.trigger("onReset").removeClass("fancybox-slide--"+t.contentType).addClass("fancybox-slide--error"),t.contentType="html",this.setContent(t,this.translate(t,t.opts.errorTpl)),t.pos===this.currPos&&(this.isAnimating=!1)},showLoading:function(t){var e=this;(t=t||e.current)&&!t.$spinner&&(t.$spinner=n(e.translate(e,e.opts.spinnerTpl)).appendTo(t.$slide).hide().fadeIn("fast"))},hideLoading:function(t){var e=this;(t=t||e.current)&&t.$spinner&&(t.$spinner.stop().remove(),delete t.$spinner)},afterLoad:function(t){var e=this;e.isClosing||(t.isLoading=!1,t.isLoaded=!0,e.trigger("afterLoad",t),e.hideLoading(t),!t.opts.smallBtn||t.$smallBtn&&t.$smallBtn.length||(t.$smallBtn=n(e.translate(t,t.opts.btnTpl.smallBtn)).appendTo(t.$content)),t.opts.protect&&t.$content&&!t.hasError&&(t.$content.on("contextmenu.fb",function(t){return 2==t.button&&t.preventDefault(),!0}),"image"===t.type&&n('<div class="fancybox-spaceball"></div>').appendTo(t.$content)),e.adjustCaption(t),e.adjustLayout(t),t.pos===e.currPos&&e.updateCursor(),e.revealContent(t))},adjustCaption:function(t){var e,n=this,o=t||n.current,i=o.opts.caption,a=o.opts.preventCaptionOverlap,s=n.$refs.caption,r=!1;s.toggleClass("fancybox-caption--separate",a),a&&i&&i.length&&(o.pos!==n.currPos?(e=s.clone().appendTo(s.parent()),e.children().eq(0).empty().html(i),r=e.outerHeight(!0),e.empty().remove()):n.$caption&&(r=n.$caption.outerHeight(!0)),o.$slide.css("padding-bottom",r||""))},adjustLayout:function(t){var e,n,o,i,a=this,s=t||a.current;s.isLoaded&&!0!==s.opts.disableLayoutFix&&(s.$content.css("margin-bottom",""),s.$content.outerHeight()>s.$slide.height()+.5&&(o=s.$slide[0].style["padding-bottom"],i=s.$slide.css("padding-bottom"),parseFloat(i)>0&&(e=s.$slide[0].scrollHeight,s.$slide.css("padding-bottom",0),Math.abs(e-s.$slide[0].scrollHeight)<1&&(n=i),s.$slide.css("padding-bottom",o))),s.$content.css("margin-bottom",n))},revealContent:function(t){var e,o,i,a,s=this,r=t.$slide,c=!1,l=!1,d=s.isMoved(t),u=t.isRevealed;return t.isRevealed=!0,e=t.opts[s.firstRun?"animationEffect":"transitionEffect"],i=t.opts[s.firstRun?"animationDuration":"transitionDuration"],i=parseInt(void 0===t.forcedDuration?i:t.forcedDuration,10),!d&&t.pos===s.currPos&&i||(e=!1),"zoom"===e&&(t.pos===s.currPos&&i&&"image"===t.type&&!t.hasError&&(l=s.getThumbPos(t))?c=s.getFitPos(t):e="fade"),"zoom"===e?(s.isAnimating=!0,c.scaleX=c.width/l.width,c.scaleY=c.height/l.height,a=t.opts.zoomOpacity,"auto"==a&&(a=Math.abs(t.width/t.height-l.width/l.height)>.1),a&&(l.opacity=.1,c.opacity=1),n.fancybox.setTranslate(t.$content.removeClass("fancybox-is-hidden"),l),p(t.$content),void n.fancybox.animate(t.$content,c,i,function(){s.isAnimating=!1,s.complete()})):(s.updateSlide(t),e?(n.fancybox.stop(r),o="fancybox-slide--"+(t.pos>=s.prevPos?"next":"previous")+" fancybox-animated fancybox-fx-"+e,r.addClass(o).removeClass("fancybox-slide--current"),t.$content.removeClass("fancybox-is-hidden"),p(r),"image"!==t.type&&t.$content.hide().show(0),void n.fancybox.animate(r,"fancybox-slide--current",i,function(){r.removeClass(o).css({transform:"",opacity:""}),t.pos===s.currPos&&s.complete()},!0)):(t.$content.removeClass("fancybox-is-hidden"),u||!d||"image"!==t.type||t.hasError||t.$content.hide().fadeIn("fast"),void(t.pos===s.currPos&&s.complete())))},getThumbPos:function(t){var e,o,i,a,s,r=!1,c=t.$thumb;return!(!c||!g(c[0]))&&(e=n.fancybox.getTranslate(c),o=parseFloat(c.css("border-top-width")||0),i=parseFloat(c.css("border-right-width")||0),a=parseFloat(c.css("border-bottom-width")||0),s=parseFloat(c.css("border-left-width")||0),r={top:e.top+o,left:e.left+s,width:e.width-i-s,height:e.height-o-a,scaleX:1,scaleY:1},e.width>0&&e.height>0&&r)},complete:function(){var t,e=this,o=e.current,i={};!e.isMoved()&&o.isLoaded&&(o.isComplete||(o.isComplete=!0,o.$slide.siblings().trigger("onReset"),e.preload("inline"),p(o.$slide),o.$slide.addClass("fancybox-slide--complete"),n.each(e.slides,function(t,o){o.pos>=e.currPos-1&&o.pos<=e.currPos+1?i[o.pos]=o:o&&(n.fancybox.stop(o.$slide),o.$slide.off().remove())}),e.slides=i),e.isAnimating=!1,e.updateCursor(),e.trigger("afterShow"),o.opts.video.autoStart&&o.$slide.find("video,audio").filter(":visible:first").trigger("play").one("ended",function(){Document.exitFullscreen?Document.exitFullscreen():this.webkitExitFullscreen&&this.webkitExitFullscreen(),e.next()}),o.opts.autoFocus&&"html"===o.contentType&&(t=o.$content.find("input[autofocus]:enabled:visible:first"),t.length?t.trigger("focus"):e.focus(null,!0)),o.$slide.scrollTop(0).scrollLeft(0))},preload:function(t){var e,n,o=this;o.group.length<2||(n=o.slides[o.currPos+1],e=o.slides[o.currPos-1],e&&e.type===t&&o.loadSlide(e),n&&n.type===t&&o.loadSlide(n))},focus:function(t,o){var i,a,s=this,r=["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])","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not([tabindex^="-"])'].join(",");s.isClosing||(i=!t&&s.current&&s.current.isComplete?s.current.$slide.find("*:visible"+(o?":not(.fancybox-close-small)":"")):s.$refs.container.find("*:visible"),i=i.filter(r).filter(function(){return"hidden"!==n(this).css("visibility")&&!n(this).hasClass("disabled")}),i.length?(a=i.index(e.activeElement),t&&t.shiftKey?(a<0||0==a)&&(t.preventDefault(),i.eq(i.length-1).trigger("focus")):(a<0||a==i.length-1)&&(t&&t.preventDefault(),i.eq(0).trigger("focus"))):s.$refs.container.trigger("focus"))},activate:function(){var t=this;n(".fancybox-container").each(function(){var e=n(this).data("FancyBox");e&&e.id!==t.id&&!e.isClosing&&(e.trigger("onDeactivate"),e.removeEvents(),e.isVisible=!1)}),t.isVisible=!0,(t.current||t.isIdle)&&(t.update(),t.updateControls()),t.trigger("onActivate"),t.addEvents()},close:function(t,e){var o,i,a,s,r,c,l,u=this,f=u.current,h=function(){u.cleanUp(t)};return!u.isClosing&&(u.isClosing=!0,!1===u.trigger("beforeClose",t)?(u.isClosing=!1,d(function(){u.update()}),!1):(u.removeEvents(),a=f.$content,o=f.opts.animationEffect,i=n.isNumeric(e)?e:o?f.opts.animationDuration:0,f.$slide.removeClass("fancybox-slide--complete fancybox-slide--next fancybox-slide--previous fancybox-animated"),!0!==t?n.fancybox.stop(f.$slide):o=!1,f.$slide.siblings().trigger("onReset").remove(),i&&u.$refs.container.removeClass("fancybox-is-open").addClass("fancybox-is-closing").css("transition-duration",i+"ms"),u.hideLoading(f),u.hideControls(!0),u.updateCursor(),"zoom"!==o||a&&i&&"image"===f.type&&!u.isMoved()&&!f.hasError&&(l=u.getThumbPos(f))||(o="fade"),"zoom"===o?(n.fancybox.stop(a),s=n.fancybox.getTranslate(a),c={top:s.top,left:s.left,scaleX:s.width/l.width,scaleY:s.height/l.height,width:l.width,height:l.height},r=f.opts.zoomOpacity, 13"auto"==r&&(r=Math.abs(f.width/f.height-l.width/l.height)>.1),r&&(l.opacity=0),n.fancybox.setTranslate(a,c),p(a),n.fancybox.animate(a,l,i,h),!0):(o&&i?n.fancybox.animate(f.$slide.addClass("fancybox-slide--previous").removeClass("fancybox-slide--current"),"fancybox-animated fancybox-fx-"+o,i,h):!0===t?setTimeout(h,i):h(),!0)))},cleanUp:function(e){var o,i,a,s=this,r=s.current.opts.$orig;s.current.$slide.trigger("onReset"),s.$refs.container.empty().remove(),s.trigger("afterClose",e),s.current.opts.backFocus&&(r&&r.length&&r.is(":visible")||(r=s.$trigger),r&&r.length&&(i=t.scrollX,a=t.scrollY,r.trigger("focus"),n("html, body").scrollTop(a).scrollLeft(i))),s.current=null,o=n.fancybox.getInstance(),o?o.activate():(n("body").removeClass("fancybox-active compensate-for-scrollbar"),n("#fancybox-style-noscroll").remove())},trigger:function(t,e){var o,i=Array.prototype.slice.call(arguments,1),a=this,s=e&&e.opts?e:a.current;if(s?i.unshift(s):s=a,i.unshift(a),n.isFunction(s.opts[t])&&(o=s.opts[t].apply(s,i)),!1===o)return o;"afterClose"!==t&&a.$refs?a.$refs.container.trigger(t+".fb",i):r.trigger(t+".fb",i)},updateControls:function(){var t=this,o=t.current,i=o.index,a=t.$refs.container,s=t.$refs.caption,r=o.opts.caption;o.$slide.trigger("refresh"),r&&r.length?(t.$caption=s,s.children().eq(0).html(r)):t.$caption=null,t.hasHiddenControls||t.isIdle||t.showControls(),a.find("[data-fancybox-count]").html(t.group.length),a.find("[data-fancybox-index]").html(i+1),a.find("[data-fancybox-prev]").prop("disabled",!o.opts.loop&&i<=0),a.find("[data-fancybox-next]").prop("disabled",!o.opts.loop&&i>=t.group.length-1),"image"===o.type?a.find("[data-fancybox-zoom]").show().end().find("[data-fancybox-download]").attr("href",o.opts.image.src||o.src).show():o.opts.toolbar&&a.find("[data-fancybox-download],[data-fancybox-zoom]").hide(),n(e.activeElement).is(":hidden,[disabled]")&&t.$refs.container.trigger("focus")},hideControls:function(t){var e=this,n=["infobar","toolbar","nav"];!t&&e.current.opts.preventCaptionOverlap||n.push("caption"),this.$refs.container.removeClass(n.map(function(t){return"fancybox-show-"+t}).join(" ")),this.hasHiddenControls=!0},showControls:function(){var t=this,e=t.current?t.current.opts:t.opts,n=t.$refs.container;t.hasHiddenControls=!1,t.idleSecondsCounter=0,n.toggleClass("fancybox-show-toolbar",!(!e.toolbar||!e.buttons)).toggleClass("fancybox-show-infobar",!!(e.infobar&&t.group.length>1)).toggleClass("fancybox-show-caption",!!t.$caption).toggleClass("fancybox-show-nav",!!(e.arrows&&t.group.length>1)).toggleClass("fancybox-is-modal",!!e.modal)},toggleControls:function(){this.hasHiddenControls?this.showControls():this.hideControls()}}),n.fancybox={version:"3.5.7",defaults:a,getInstance:function(t){var e=n('.fancybox-container:not(".fancybox-is-closing"):last').data("FancyBox"),o=Array.prototype.slice.call(arguments,1);return e instanceof b&&("string"===n.type(t)?e[t].apply(e,o):"function"===n.type(t)&&t.apply(e,o),e)},open:function(t,e,n){return new b(t,e,n)},close:function(t){var e=this.getInstance();e&&(e.close(),!0===t&&this.close(t))},destroy:function(){this.close(!0),r.add("body").off("click.fb-start","**")},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:function(){var n=e.createElement("div");return t.getComputedStyle&&t.getComputedStyle(n)&&t.getComputedStyle(n).getPropertyValue("transform")&&!(e.documentMode&&e.documentMode<11)}(),getTranslate:function(t){var e;return!(!t||!t.length)&&(e=t[0].getBoundingClientRect(),{top:e.top||0,left:e.left||0,width:e.width,height:e.height,opacity:parseFloat(t.css("opacity"))})},setTranslate:function(t,e){var n="",o={};if(t&&e)return void 0===e.left&&void 0===e.top||(n=(void 0===e.left?t.position().left:e.left)+"px, "+(void 0===e.top?t.position().top:e.top)+"px",n=this.use3d?"translate3d("+n+", 0px)":"translate("+n+")"),void 0!==e.scaleX&&void 0!==e.scaleY?n+=" scale("+e.scaleX+", "+e.scaleY+")":void 0!==e.scaleX&&(n+=" scaleX("+e.scaleX+")"),n.length&&(o.transform=n),void 0!==e.opacity&&(o.opacity=e.opacity),void 0!==e.width&&(o.width=e.width),void 0!==e.height&&(o.height=e.height),t.css(o)},animate:function(t,e,o,i,a){var s,r=this;n.isFunction(o)&&(i=o,o=null),r.stop(t),s=r.getTranslate(t),t.on(f,function(c){(!c||!c.originalEvent||t.is(c.originalEvent.target)&&"z-index"!=c.originalEvent.propertyName)&&(r.stop(t),n.isNumeric(o)&&t.css("transition-duration",""),n.isPlainObject(e)?void 0!==e.scaleX&&void 0!==e.scaleY&&r.setTranslate(t,{top:e.top,left:e.left,width:s.width*e.scaleX,height:s.height*e.scaleY,scaleX:1,scaleY:1}):!0!==a&&t.removeClass(e),n.isFunction(i)&&i(c))}),n.isNumeric(o)&&t.css("transition-duration",o+"ms"),n.isPlainObject(e)?(void 0!==e.scaleX&&void 0!==e.scaleY&&(delete e.width,delete e.height,t.parent().hasClass("fancybox-slide--image")&&t.parent().addClass("fancybox-is-scaling")),n.fancybox.setTranslate(t,e)):t.addClass(e),t.data("timer",setTimeout(function(){t.trigger(f)},o+33))},stop:function(t,e){t&&t.length&&(clearTimeout(t.data("timer")),e&&t.trigger(f),t.off(f).css("transition-duration",""),t.parent().removeClass("fancybox-is-scaling"))}},n.fn.fancybox=function(t){var e;return t=t||{},e=t.selector||!1,e?n("body").off("click.fb-start",e).on("click.fb-start",e,{options:t},i):this.off("click.fb-start").on("click.fb-start",{items:this,options:t},i),this},r.on("click.fb-start","[data-fancybox]",i),r.on("click.fb-start","[data-fancybox-trigger]",function(t){n('[data-fancybox="'+n(this).attr("data-fancybox-trigger")+'"]').eq(n(this).attr("data-fancybox-index")||0).trigger("click.fb-start",{$trigger:n(this)})}),function(){var t=null;r.on("mousedown mouseup focus blur",".fancybox-button",function(e){switch(e.type){case"mousedown":t=n(this);break;case"mouseup":t=null;break;case"focusin":n(".fancybox-button").removeClass("fancybox-focus"),n(this).is(t)||n(this).is("[disabled]")||n(this).addClass("fancybox-focus");break;case"focusout":n(".fancybox-button").removeClass("fancybox-focus")}})}()}}(window,document,jQuery),function(t){"use strict";var e={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramPlace:8,type:"iframe",url:"https://www.youtube-nocookie.com/embed/$4",thumb:"https://img.youtube.com/vi/$4/hqdefault.jpg"},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/?ll="+(t[9]?t[9]+"&z="+Math.floor(t[10])+(t[12]?t[12].replace(/^\//,"&"):""):t[12]+"").replace(/\?/,"&")+"&output="+(t[12]&&t[12].indexOf("layer=c")>0?"svembed":"embed")}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/maps?q="+t[5].replace("query=","q=").replace("api=1","")+"&output=embed"}}},n=function(e,n,o){if(e)return o=o||"","object"===t.type(o)&&(o=t.param(o,!0)),t.each(n,function(t,n){e=e.replace("$"+t,n||"")}),o.length&&(e+=(e.indexOf("?")>0?"&":"?")+o),e};t(document).on("objectNeedsType.fb",function(o,i,a){var s,r,c,l,d,u,f,p=a.src||"",h=!1;s=t.extend(!0,{},e,a.opts.media),t.each(s,function(e,o){if(c=p.match(o.matcher)){if(h=o.type,f=e,u={},o.paramPlace&&c[o.paramPlace]){d=c[o.paramPlace],"?"==d[0]&&(d=d.substring(1)),d=d.split("&");for(var i=0;i<d.length;++i){var s=d[i].split("=",2);2==s.length&&(u[s[0]]=decodeURIComponent(s[1].replace(/\+/g," ")))}}return l=t.extend(!0,{},o.params,a.opts[e],u),p="function"===t.type(o.url)?o.url.call(this,c,l,a):n(o.url,c,l),r="function"===t.type(o.thumb)?o.thumb.call(this,c,l,a):n(o.thumb,c),"youtube"===e?p=p.replace(/&t=((\d+)m)?(\d+)s/,function(t,e,n,o){return"&start="+((n?60*parseInt(n,10):0)+parseInt(o,10))}):"vimeo"===e&&(p=p.replace("&%23","#")),!1}}),h?(a.opts.thumb||a.opts.$thumb&&a.opts.$thumb.length||(a.opts.thumb=r),"iframe"===h&&(a.opts=t.extend(!0,a.opts,{iframe:{preload:!1,attr:{scrolling:"no"}}})),t.extend(a,{type:h,src:p,origSrc:a.src,contentSource:f,contentType:"image"===h?"image":"gmap_place"==f||"gmap_search"==f?"map":"video"})):p&&(a.type=a.opts.defaultType)});var o={youtube:{src:"https://www.youtube.com/iframe_api",class:"YT",loading:!1,loaded:!1},vimeo:{src:"https://player.vimeo.com/api/player.js",class:"Vimeo",loading:!1,loaded:!1},load:function(t){var e,n=this;if(this[t].loaded)return void setTimeout(function(){n.done(t)});this[t].loading||(this[t].loading=!0,e=document.createElement("script"),e.type="text/javascript",e.src=this[t].src,"youtube"===t?window.onYouTubeIframeAPIReady=function(){n[t].loaded=!0,n.done(t)}:e.onload=function(){n[t].loaded=!0,n.done(t)},document.body.appendChild(e))},done:function(e){var n,o,i;"youtube"===e&&delete window.onYouTubeIframeAPIReady,(n=t.fancybox.getInstance())&&(o=n.current.$content.find("iframe"),"youtube"===e&&void 0!==YT&&YT?i=new YT.Player(o.attr("id"),{events:{onStateChange:function(t){0==t.data&&n.next()}}}):"vimeo"===e&&void 0!==Vimeo&&Vimeo&&(i=new Vimeo.Player(o),i.on("ended",function(){n.next()})))}};t(document).on({"afterShow.fb":function(t,e,n){e.group.length>1&&("youtube"===n.contentSource||"vimeo"===n.contentSource)&&o.load(n.contentSource)}})}(jQuery),function(t,e,n){"use strict";var o=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||function(e){return t.setTimeout(e,1e3/60)}}(),i=function(){return t.cancelAnimationFrame||t.webkitCancelAnimationFrame||t.mozCancelAnimationFrame||t.oCancelAnimationFrame||function(e){t.clearTimeout(e)}}(),a=function(e){var n=[];e=e.originalEvent||e||t.e,e=e.touches&&e.touches.length?e.touches:e.changedTouches&&e.changedTouches.length?e.changedTouches:[e];for(var o in e)e[o].pageX?n.push({x:e[o].pageX,y:e[o].pageY}):e[o].clientX&&n.push({x:e[o].clientX,y:e[o].clientY});return n},s=function(t,e,n){return e&&t?"x"===n?t.x-e.x:"y"===n?t.y-e.y:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0},r=function(t){if(t.is('a,area,button,[role="button"],input,label,select,summary,textarea,video,audio,iframe')||n.isFunction(t.get(0).onclick)||t.data("selectable"))return!0;for(var e=0,o=t[0].attributes,i=o.length;e<i;e++)if("data-fancybox-"===o[e].nodeName.substr(0,14))return!0;return!1},c=function(e){var n=t.getComputedStyle(e)["overflow-y"],o=t.getComputedStyle(e)["overflow-x"],i=("scroll"===n||"auto"===n)&&e.scrollHeight>e.clientHeight,a=("scroll"===o||"auto"===o)&&e.scrollWidth>e.clientWidth;return i||a},l=function(t){for(var e=!1;;){if(e=c(t.get(0)))break;if(t=t.parent(),!t.length||t.hasClass("fancybox-stage")||t.is("body"))break}return e},d=function(t){var e=this;e.instance=t,e.$bg=t.$refs.bg,e.$stage=t.$refs.stage,e.$container=t.$refs.container,e.destroy(),e.$container.on("touchstart.fb.touch mousedown.fb.touch",n.proxy(e,"ontouchstart"))};d.prototype.destroy=function(){var t=this;t.$container.off(".fb.touch"),n(e).off(".fb.touch"),t.requestId&&(i(t.requestId),t.requestId=null),t.tapped&&(clearTimeout(t.tapped),t.tapped=null)},d.prototype.ontouchstart=function(o){var i=this,c=n(o.target),d=i.instance,u=d.current,f=u.$slide,p=u.$content,h="touchstart"==o.type;if(h&&i.$container.off("mousedown.fb.touch"),(!o.originalEvent||2!=o.originalEvent.button)&&f.length&&c.length&&!r(c)&&!r(c.parent())&&(c.is("img")||!(o.originalEvent.clientX>c[0].clientWidth+c.offset().left))){if(!u||d.isAnimating||u.$slide.hasClass("fancybox-animated"))return o.stopPropagation(),void o.preventDefault();i.realPoints=i.startPoints=a(o),i.startPoints.length&&(u.touch&&o.stopPropagation(),i.startEvent=o,i.canTap=!0,i.$target=c,i.$content=p,i.opts=u.opts.touch,i.isPanning=!1,i.isSwiping=!1,i.isZooming=!1,i.isScrolling=!1,i.canPan=d.canPan(),i.startTime=(new Date).getTime(),i.distanceX=i.distanceY=i.distance=0,i.canvasWidth=Math.round(f[0].clientWidth),i.canvasHeight=Math.round(f[0].clientHeight),i.contentLastPos=null,i.contentStartPos=n.fancybox.getTranslate(i.$content)||{top:0,left:0},i.sliderStartPos=n.fancybox.getTranslate(f),i.stagePos=n.fancybox.getTranslate(d.$refs.stage),i.sliderStartPos.top-=i.stagePos.top,i.sliderStartPos.left-=i.stagePos.left,i.contentStartPos.top-=i.stagePos.top,i.contentStartPos.left-=i.stagePos.left,n(e).off(".fb.touch").on(h?"touchend.fb.touch touchcancel.fb.touch":"mouseup.fb.touch mouseleave.fb.touch",n.proxy(i,"ontouchend")).on(h?"touchmove.fb.touch":"mousemove.fb.touch",n.proxy(i,"ontouchmove")),n.fancybox.isMobile&&e.addEventListener("scroll",i.onscroll,!0),((i.opts||i.canPan)&&(c.is(i.$stage)||i.$stage.find(c).length)||(c.is(".fancybox-image")&&o.preventDefault(),n.fancybox.isMobile&&c.parents(".fancybox-caption").length))&&(i.isScrollable=l(c)||l(c.parent()),n.fancybox.isMobile&&i.isScrollable||o.preventDefault(),(1===i.startPoints.length||u.hasError)&&(i.canPan?(n.fancybox.stop(i.$content),i.isPanning=!0):i.isSwiping=!0,i.$container.addClass("fancybox-is-grabbing")),2===i.startPoints.length&&"image"===u.type&&(u.isLoaded||u.$ghost)&&(i.canTap=!1,i.isSwiping=!1,i.isPanning=!1,i.isZooming=!0,n.fancybox.stop(i.$content),i.centerPointStartX=.5*(i.startPoints[0].x+i.startPoints[1].x)-n(t).scrollLeft(),i.centerPointStartY=.5*(i.startPoints[0].y+i.startPoints[1].y)-n(t).scrollTop(),i.percentageOfImageAtPinchPointX=(i.centerPointStartX-i.contentStartPos.left)/i.contentStartPos.width,i.percentageOfImageAtPinchPointY=(i.centerPointStartY-i.contentStartPos.top)/i.contentStartPos.height,i.startDistanceBetweenFingers=s(i.startPoints[0],i.startPoints[1]))))}},d.prototype.onscroll=function(t){var n=this;n.isScrolling=!0,e.removeEventListener("scroll",n.onscroll,!0)},d.prototype.ontouchmove=function(t){var e=this;return void 0!==t.originalEvent.buttons&&0===t.originalEvent.buttons?void e.ontouchend(t):e.isScrolling?void(e.canTap=!1):(e.newPoints=a(t),void((e.opts||e.canPan)&&e.newPoints.length&&e.newPoints.length&&(e.isSwiping&&!0===e.isSwiping||t.preventDefault(),e.distanceX=s(e.newPoints[0],e.startPoints[0],"x"),e.distanceY=s(e.newPoints[0],e.startPoints[0],"y"),e.distance=s(e.newPoints[0],e.startPoints[0]),e.distance>0&&(e.isSwiping?e.onSwipe(t):e.isPanning?e.onPan():e.isZooming&&e.onZoom()))))},d.prototype.onSwipe=function(e){var a,s=this,r=s.instance,c=s.isSwiping,l=s.sliderStartPos.left||0;if(!0!==c)"x"==c&&(s.distanceX>0&&(s.instance.group.length<2||0===s.instance.current.index&&!s.instance.current.opts.loop)?l+=Math.pow(s.distanceX,.8):s.distanceX<0&&(s.instance.group.length<2||s.instance.current.index===s.instance.group.length-1&&!s.instance.current.opts.loop)?l-=Math.pow(-s.distanceX,.8):l+=s.distanceX),s.sliderLastPos={top:"x"==c?0:s.sliderStartPos.top+s.distanceY,left:l},s.requestId&&(i(s.requestId),s.requestId=null),s.requestId=o(function(){s.sliderLastPos&&(n.each(s.instance.slides,function(t,e){var o=e.pos-s.instance.currPos;n.fancybox.setTranslate(e.$slide,{top:s.sliderLastPos.top,left:s.sliderLastPos.left+o*s.canvasWidth+o*e.opts.gutter})}),s.$container.addClass("fancybox-is-sliding"))});else if(Math.abs(s.distance)>10){if(s.canTap=!1,r.group.length<2&&s.opts.vertical?s.isSwiping="y":r.isDragging||!1===s.opts.vertical||"auto"===s.opts.vertical&&n(t).width()>800?s.isSwiping="x":(a=Math.abs(180*Math.atan2(s.distanceY,s.distanceX)/Math.PI),s.isSwiping=a>45&&a<135?"y":"x"),"y"===s.isSwiping&&n.fancybox.isMobile&&s.isScrollable)return void(s.isScrolling=!0);r.isDragging=s.isSwiping,s.startPoints=s.newPoints,n.each(r.slides,function(t,e){var o,i;n.fancybox.stop(e.$slide),o=n.fancybox.getTranslate(e.$slide),i=n.fancybox.getTranslate(r.$refs.stage),e.$slide.css({transform:"",opacity:"","transition-duration":""}).removeClass("fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)fancybox-fx-\S+/g)||[]).join(" ")}),e.pos===r.current.pos&&(s.sliderStartPos.top=o.top-i.top,s.sliderStartPos.left=o.left-i.left),n.fancybox.setTranslate(e.$slide,{top:o.top-i.top,left:o.left-i.left})}),r.SlideShow&&r.SlideShow.isActive&&r.SlideShow.stop()}},d.prototype.onPan=function(){var t=this;if(s(t.newPoints[0],t.realPoints[0])<(n.fancybox.isMobile?10:5))return void(t.startPoints=t.newPoints);t.canTap=!1,t.contentLastPos=t.limitMovement(),t.requestId&&i(t.requestId),t.requestId=o(function(){n.fancybox.setTranslate(t.$content,t.contentLastPos)})},d.prototype.limitMovement=function(){var t,e,n,o,i,a,s=this,r=s.canvasWidth,c=s.canvasHeight,l=s.distanceX,d=s.distanceY,u=s.contentStartPos,f=u.left,p=u.top,h=u.width,g=u.height;return i=h>r?f+l:f,a=p+d,t=Math.max(0,.5*r-.5*h),e=Math.max(0,.5*c-.5*g),n=Math.min(r-h,.5*r-.5*h),o=Math.min(c-g,.5*c-.5*g),l>0&&i>t&&(i=t-1+Math.pow(-t+f+l,.8)||0),l<0&&i<n&&(i=n+1-Math.pow(n-f-l,.8)||0),d>0&&a>e&&(a=e-1+Math.pow(-e+p+d,.8)||0),d<0&&a<o&&(a=o+1-Math.pow(o-p-d,.8)||0),{top:a,left:i}},d.prototype.limitPosition=function(t,e,n,o){var i=this,a=i.canvasWidth,s=i.canvasHeight;return n>a?(t=t>0?0:t,t=t<a-n?a-n:t):t=Math.max(0,a/2-n/2),o>s?(e=e>0?0:e,e=e<s-o?s-o:e):e=Math.max(0,s/2-o/2),{top:e,left:t}},d.prototype.onZoom=function(){var e=this,a=e.contentStartPos,r=a.width,c=a.height,l=a.left,d=a.top,u=s(e.newPoints[0],e.newPoints[1]),f=u/e.startDistanceBetweenFingers,p=Math.floor(r*f),h=Math.floor(c*f),g=(r-p)*e.percentageOfImageAtPinchPointX,b=(c-h)*e.percentageOfImageAtPinchPointY,m=(e.newPoints[0].x+e.newPoints[1].x)/2-n(t).scrollLeft(),v=(e.newPoints[0].y+e.newPoints[1].y)/2-n(t).scrollTop(),y=m-e.centerPointStartX,x=v-e.centerPointStartY,w=l+(g+y),$=d+(b+x),S={top:$,left:w,scaleX:f,scaleY:f};e.canTap=!1,e.newWidth=p,e.newHeight=h,e.contentLastPos=S,e.requestId&&i(e.requestId),e.requestId=o(function(){n.fancybox.setTranslate(e.$content,e.contentLastPos)})},d.prototype.ontouchend=function(t){var o=this,s=o.isSwiping,r=o.isPanning,c=o.isZooming,l=o.isScrolling;if(o.endPoints=a(t),o.dMs=Math.max((new Date).getTime()-o.startTime,1),o.$container.removeClass("fancybox-is-grabbing"),n(e).off(".fb.touch"),e.removeEventListener("scroll",o.onscroll,!0),o.requestId&&(i(o.requestId),o.requestId=null),o.isSwiping=!1,o.isPanning=!1,o.isZooming=!1,o.isScrolling=!1,o.instance.isDragging=!1,o.canTap)return o.onTap(t);o.speed=100,o.velocityX=o.distanceX/o.dMs*.5,o.velocityY=o.distanceY/o.dMs*.5,r?o.endPanning():c?o.endZooming():o.endSwiping(s,l)},d.prototype.endSwiping=function(t,e){var o=this,i=!1,a=o.instance.group.length,s=Math.abs(o.distanceX),r="x"==t&&a>1&&(o.dMs>130&&s>10||s>50);o.sliderLastPos=null,"y"==t&&!e&&Math.abs(o.distanceY)>50?(n.fancybox.animate(o.instance.current.$slide,{top:o.sliderStartPos.top+o.distanceY+150*o.velocityY,opacity:0},200),i=o.instance.close(!0,250)):r&&o.distanceX>0?i=o.instance.previous(300):r&&o.distanceX<0&&(i=o.instance.next(300)),!1!==i||"x"!=t&&"y"!=t||o.instance.centerSlide(200),o.$container.removeClass("fancybox-is-sliding")},d.prototype.endPanning=function(){var t,e,o,i=this;i.contentLastPos&&(!1===i.opts.momentum||i.dMs>350?(t=i.contentLastPos.left,e=i.contentLastPos.top):(t=i.contentLastPos.left+500*i.velocityX,e=i.contentLastPos.top+500*i.velocityY),o=i.limitPosition(t,e,i.contentStartPos.width,i.contentStartPos.height),o.width=i.contentStartPos.width,o.height=i.contentStartPos.height,n.fancybox.animate(i.$content,o,366))},d.prototype.endZooming=function(){var t,e,o,i,a=this,s=a.instance.current,r=a.newWidth,c=a.newHeight;a.contentLastPos&&(t=a.contentLastPos.left,e=a.contentLastPos.top,i={top:e,left:t,width:r,height:c,scaleX:1,scaleY:1},n.fancybox.setTranslate(a.$content,i),r<a.canvasWidth&&c<a.canvasHeight?a.instance.scaleToFit(150):r>s.width||c>s.height?a.instance.scaleToActual(a.centerPointStartX,a.centerPointStartY,150):(o=a.limitPosition(t,e,r,c),n.fancybox.animate(a.$content,o,150)))},d.prototype.onTap=function(e){var o,i=this,s=n(e.target),r=i.instance,c=r.current,l=e&&a(e)||i.startPoints,d=l[0]?l[0].x-n(t).scrollLeft()-i.stagePos.left:0,u=l[0]?l[0].y-n(t).scrollTop()-i.stagePos.top:0,f=function(t){var o=c.opts[t];if(n.isFunction(o)&&(o=o.apply(r,[c,e])),o)switch(o){case"close":r.close(i.startEvent);break;case"toggleControls":r.toggleControls();break;case"next":r.next();break;case"nextOrClose":r.group.length>1?r.next():r.close(i.startEvent);break;case"zoom":"image"==c.type&&(c.isLoaded||c.$ghost)&&(r.canPan()?r.scaleToFit():r.isScaledDown()?r.scaleToActual(d,u):r.group.length<2&&r.close(i.startEvent))}};if((!e.originalEvent||2!=e.originalEvent.button)&&(s.is("img")||!(d>s[0].clientWidth+s.offset().left))){if(s.is(".fancybox-bg,.fancybox-inner,.fancybox-outer,.fancybox-container"))o="Outside";else if(s.is(".fancybox-slide"))o="Slide";else{if(!r.current.$content||!r.current.$content.find(s).addBack().filter(s).length)return;o="Content"}if(i.tapped){if(clearTimeout(i.tapped),i.tapped=null,Math.abs(d-i.tapX)>50||Math.abs(u-i.tapY)>50)return this;f("dblclick"+o)}else i.tapX=d,i.tapY=u,c.opts["dblclick"+o]&&c.opts["dblclick"+o]!==c.opts["click"+o]?i.tapped=setTimeout(function(){i.tapped=null,r.isAnimating||f("click"+o)},500):f("click"+o);return this}},n(e).on("onActivate.fb",function(t,e){e&&!e.Guestures&&(e.Guestures=new d(e))}).on("beforeClose.fb",function(t,e){e&&e.Guestures&&e.Guestures.destroy()})}(window,document,jQuery),function(t,e){"use strict";e.extend(!0,e.fancybox.defaults,{btnTpl:{slideShow:'<button data-fancybox-play class="fancybox-button fancybox-button--play" title="{{PLAY_START}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.5 5.4v13.2l11-6.6z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.33 5.75h2.2v12.5h-2.2V5.75zm5.15 0h2.2v12.5h-2.2V5.75z"/></svg></button>'},slideShow:{autoStart:!1,speed:3e3,progress:!0}});var n=function(t){this.instance=t,this.init()};e.extend(n.prototype,{timer:null,isActive:!1,$button:null,init:function(){var t=this,n=t.instance,o=n.group[n.currIndex].opts.slideShow;t.$button=n.$refs.toolbar.find("[data-fancybox-play]").on("click",function(){t.toggle()}),n.group.length<2||!o?t.$button.hide():o.progress&&(t.$progress=e('<div class="fancybox-progress"></div>').appendTo(n.$refs.inner))},set:function(t){var n=this,o=n.instance,i=o.current;i&&(!0===t||i.opts.loop||o.currIndex<o.group.length-1)?n.isActive&&"video"!==i.contentType&&(n.$progress&&e.fancybox.animate(n.$progress.show(),{scaleX:1},i.opts.slideShow.speed),n.timer=setTimeout(function(){o.current.opts.loop||o.current.index!=o.group.length-1?o.next():o.jumpTo(0)},i.opts.slideShow.speed)):(n.stop(),o.idleSecondsCounter=0,o.showControls())},clear:function(){var t=this;clearTimeout(t.timer),t.timer=null,t.$progress&&t.$progress.removeAttr("style").hide()},start:function(){var t=this,e=t.instance.current;e&&(t.$button.attr("title",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_STOP).removeClass("fancybox-button--play").addClass("fancybox-button--pause"),t.isActive=!0,e.isComplete&&t.set(!0),t.instance.trigger("onSlideShowChange",!0))},stop:function(){var t=this,e=t.instance.current;t.clear(),t.$button.attr("title",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_START).removeClass("fancybox-button--pause").addClass("fancybox-button--play"),t.isActive=!1,t.instance.trigger("onSlideShowChange",!1),t.$progress&&t.$progress.removeAttr("style").hide()},toggle:function(){var t=this;t.isActive?t.stop():t.start()}}),e(t).on({"onInit.fb":function(t,e){e&&!e.SlideShow&&(e.SlideShow=new n(e))},"beforeShow.fb":function(t,e,n,o){var i=e&&e.SlideShow;o?i&&n.opts.slideShow.autoStart&&i.start():i&&i.isActive&&i.clear()},"afterShow.fb":function(t,e,n){var o=e&&e.SlideShow;o&&o.isActive&&o.set()},"afterKeydown.fb":function(n,o,i,a,s){var r=o&&o.SlideShow;!r||!i.opts.slideShow||80!==s&&32!==s||e(t.activeElement).is("button,a,input")||(a.preventDefault(),r.toggle())},"beforeClose.fb onDeactivate.fb":function(t,e){var n=e&&e.SlideShow;n&&n.stop()}}),e(t).on("visibilitychange",function(){var n=e.fancybox.getInstance(),o=n&&n.SlideShow;o&&o.isActive&&(t.hidden?o.clear():o.set())})}(document,jQuery),function(t,e){"use strict";var n=function(){for(var e=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],n={},o=0;o<e.length;o++){var i=e[o];if(i&&i[1]in t){for(var a=0;a<i.length;a++)n[e[0][a]]=i[a];return n}}return!1}();if(n){var o={request:function(e){e=e||t.documentElement,e[n.requestFullscreen](e.ALLOW_KEYBOARD_INPUT)},exit:function(){t[n.exitFullscreen]()},toggle:function(e){e=e||t.documentElement,this.isFullscreen()?this.exit():this.request(e)},isFullscreen:function(){return Boolean(t[n.fullscreenElement])},enabled:function(){return Boolean(t[n.fullscreenEnabled])}};e.extend(!0,e.fancybox.defaults,{btnTpl:{fullScreen:'<button data-fancybox-fullscreen class="fancybox-button fancybox-button--fsenter" title="{{FULL_SCREEN}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"/></svg></button>'},fullScreen:{autoStart:!1}}),e(t).on(n.fullscreenchange,function(){var t=o.isFullscreen(),n=e.fancybox.getInstance();n&&(n.current&&"image"===n.current.type&&n.isAnimating&&(n.isAnimating=!1,n.update(!0,!0,0),n.isComplete||n.complete()),n.trigger("onFullscreenChange",t),n.$refs.container.toggleClass("fancybox-is-fullscreen",t),n.$refs.toolbar.find("[data-fancybox-fullscreen]").toggleClass("fancybox-button--fsenter",!t).toggleClass("fancybox-button--fsexit",t))})}e(t).on({"onInit.fb":function(t,e){var i;if(!n)return void e.$refs.toolbar.find("[data-fancybox-fullscreen]").remove();e&&e.group[e.currIndex].opts.fullScreen?(i=e.$refs.container,i.on("click.fb-fullscreen","[data-fancybox-fullscreen]",function(t){t.stopPropagation(),t.preventDefault(),o.toggle()}),e.opts.fullScreen&&!0===e.opts.fullScreen.autoStart&&o.request(),e.FullScreen=o):e&&e.$refs.toolbar.find("[data-fancybox-fullscreen]").hide()},"afterKeydown.fb":function(t,e,n,o,i){e&&e.FullScreen&&70===i&&(o.preventDefault(),e.FullScreen.toggle())},"beforeClose.fb":function(t,e){e&&e.FullScreen&&e.$refs.container.hasClass("fancybox-is-fullscreen")&&o.exit()}})}(document,jQuery),function(t,e){"use strict";var n="fancybox-thumbs";e.fancybox.defaults=e.extend(!0,{btnTpl:{thumbs:'<button data-fancybox-thumbs class="fancybox-button fancybox-button--thumbs" title="{{THUMBS}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14.59 14.59h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76H5.65V5.65z"/></svg></button>'},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".fancybox-container",axis:"y"}},e.fancybox.defaults);var o=function(t){this.init(t)};e.extend(o.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,isActive:!1,init:function(t){var e=this,n=t.group,o=0;e.instance=t,e.opts=n[t.currIndex].opts.thumbs,t.Thumbs=e,e.$button=t.$refs.toolbar.find("[data-fancybox-thumbs]");for(var i=0,a=n.length;i<a&&(n[i].thumb&&o++,!(o>1));i++);o>1&&e.opts?(e.$button.removeAttr("style").on("click",function(){e.toggle()}),e.isActive=!0):e.$button.hide()},create:function(){var t,o=this,i=o.instance,a=o.opts.parentEl,s=[];o.$grid||(o.$grid=e('<div class="'+n+" "+n+"-"+o.opts.axis+'"></div>').appendTo(i.$refs.container.find(a).addBack().filter(a)),o.$grid.on("click","a",function(){i.jumpTo(e(this).attr("data-index"))})),o.$list||(o.$list=e('<div class="'+n+'__list">').appendTo(o.$grid)),e.each(i.group,function(e,n){t=n.thumb,t||"image"!==n.type||(t=n.src),s.push('<a href="javascript:;" tabindex="0" data-index="'+e+'"'+(t&&t.length?' style="background-image:url('+t+')"':'class="fancybox-thumbs-missing"')+"></a>")}),o.$list[0].innerHTML=s.join(""),"x"===o.opts.axis&&o.$list.width(parseInt(o.$grid.css("padding-right"),10)+i.group.length*o.$list.children().eq(0).outerWidth(!0))},focus:function(t){var e,n,o=this,i=o.$list,a=o.$grid;o.instance.current&&(e=i.children().removeClass("fancybox-thumbs-active").filter('[data-index="'+o.instance.current.index+'"]').addClass("fancybox-thumbs-active"),n=e.position(),"y"===o.opts.axis&&(n.top<0||n.top>i.height()-e.outerHeight())?i.stop().animate({scrollTop:i.scrollTop()+n.top},t):"x"===o.opts.axis&&(n.left<a.scrollLeft()||n.left>a.scrollLeft()+(a.width()-e.outerWidth()))&&i.parent().stop().animate({scrollLeft:n.left},t))},update:function(){var t=this;t.instance.$refs.container.toggleClass("fancybox-show-thumbs",this.isVisible),t.isVisible?(t.$grid||t.create(),t.instance.trigger("onThumbsShow"),t.focus(0)):t.$grid&&t.instance.trigger("onThumbsHide"),t.instance.update()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible=!this.isVisible,this.update()}}),e(t).on({"onInit.fb":function(t,e){var n;e&&!e.Thumbs&&(n=new o(e),n.isActive&&!0===n.opts.autoStart&&n.show())},"beforeShow.fb":function(t,e,n,o){var i=e&&e.Thumbs;i&&i.isVisible&&i.focus(o?0:250)},"afterKeydown.fb":function(t,e,n,o,i){var a=e&&e.Thumbs;a&&a.isActive&&71===i&&(o.preventDefault(),a.toggle())},"beforeClose.fb":function(t,e){var n=e&&e.Thumbs;n&&n.isVisible&&!1!==n.opts.hideOnClose&&n.$grid.hide()}})}(document,jQuery),function(t,e){"use strict";function n(t){var e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(t).replace(/[&<>"'`=\/]/g,function(t){return e[t]})}e.extend(!0,e.fancybox.defaults,{btnTpl:{share:'<button data-fancybox-share class="fancybox-button fancybox-button--share" title="{{SHARE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.55 19c1.4-8.4 9.1-9.8 11.9-9.8V5l7 7-7 6.3v-3.5c-2.8 0-10.5 2.1-11.9 4.2z"/></svg></button>'},share:{url:function(t,e){return!t.currentHash&&"inline"!==e.type&&"html"!==e.type&&(e.origSrc||e.src)||window.location}, 14tpl:'<div class="fancybox-share"><h1>{{SHARE}}</h1><p><a class="fancybox-share__button fancybox-share__button--fb" href="https://www.facebook.com/sharer/sharer.php?u={{url}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m287 456v-299c0-21 6-35 35-35h38v-63c-7-1-29-3-55-3-54 0-91 33-91 94v306m143-254h-205v72h196" /></svg><span>Facebook</span></a><a class="fancybox-share__button fancybox-share__button--tw" href="https://twitter.com/intent/tweet?url={{url}}&text={{descr}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m456 133c-14 7-31 11-47 13 17-10 30-27 37-46-15 10-34 16-52 20-61-62-157-7-141 75-68-3-129-35-169-85-22 37-11 86 26 109-13 0-26-4-37-9 0 39 28 72 65 80-12 3-25 4-37 2 10 33 41 57 77 57-42 30-77 38-122 34 170 111 378-32 359-208 16-11 30-25 41-42z" /></svg><span>Twitter</span></a><a class="fancybox-share__button fancybox-share__button--pt" href="https://www.pinterest.com/pin/create/button/?url={{url}}&description={{descr}}&media={{media}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m265 56c-109 0-164 78-164 144 0 39 15 74 47 87 5 2 10 0 12-5l4-19c2-6 1-8-3-13-9-11-15-25-15-45 0-58 43-110 113-110 62 0 96 38 96 88 0 67-30 122-73 122-24 0-42-19-36-44 6-29 20-60 20-81 0-19-10-35-31-35-25 0-44 26-44 60 0 21 7 36 7 36l-30 125c-8 37-1 83 0 87 0 3 4 4 5 2 2-3 32-39 42-75l16-64c8 16 31 29 56 29 74 0 124-67 124-157 0-69-58-132-146-132z" fill="#fff"/></svg><span>Pinterest</span></a></p><p><input class="fancybox-share__input" type="text" value="{{url_raw}}" onclick="select()" /></p></div>'}}),e(t).on("click","[data-fancybox-share]",function(){var t,o,i=e.fancybox.getInstance(),a=i.current||null;a&&("function"===e.type(a.opts.share.url)&&(t=a.opts.share.url.apply(a,[i,a])),o=a.opts.share.tpl.replace(/\{\{media\}\}/g,"image"===a.type?encodeURIComponent(a.src):"").replace(/\{\{url\}\}/g,encodeURIComponent(t)).replace(/\{\{url_raw\}\}/g,n(t)).replace(/\{\{descr\}\}/g,i.$caption?encodeURIComponent(i.$caption.text()):""),e.fancybox.open({src:i.translate(i,o),type:"html",opts:{touch:!1,animationEffect:!1,afterLoad:function(t,e){i.$refs.container.one("beforeClose.fb",function(){t.close(null,0)}),e.$content.find(".fancybox-share__button").click(function(){return window.open(this.href,"Share","width=550, height=450"),!1})},mobile:{autoFocus:!1}}}))})}(document,jQuery),function(t,e,n){"use strict";function o(){var e=t.location.hash.substr(1),n=e.split("-"),o=n.length>1&&/^\+?\d+$/.test(n[n.length-1])?parseInt(n.pop(-1),10)||1:1,i=n.join("-");return{hash:e,index:o<1?1:o,gallery:i}}function i(t){""!==t.gallery&&n("[data-fancybox='"+n.escapeSelector(t.gallery)+"']").eq(t.index-1).focus().trigger("click.fb-start")}function a(t){var e,n;return!!t&&(e=t.current?t.current.opts:t.opts,""!==(n=e.hash||(e.$orig?e.$orig.data("fancybox")||e.$orig.data("fancybox-trigger"):""))&&n)}n.escapeSelector||(n.escapeSelector=function(t){return(t+"").replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t})}),n(function(){!1!==n.fancybox.defaults.hash&&(n(e).on({"onInit.fb":function(t,e){var n,i;!1!==e.group[e.currIndex].opts.hash&&(n=o(),(i=a(e))&&n.gallery&&i==n.gallery&&(e.currIndex=n.index-1))},"beforeShow.fb":function(n,o,i,s){var r;i&&!1!==i.opts.hash&&(r=a(o))&&(o.currentHash=r+(o.group.length>1?"-"+(i.index+1):""),t.location.hash!=="#"+o.currentHash&&(s&&!o.origHash&&(o.origHash=t.location.hash),o.hashTimer&&clearTimeout(o.hashTimer),o.hashTimer=setTimeout(function(){"replaceState"in t.history?(t.history[s?"pushState":"replaceState"]({},e.title,t.location.pathname+t.location.search+"#"+o.currentHash),s&&(o.hasCreatedHistory=!0)):t.location.hash=o.currentHash,o.hashTimer=null},300)))},"beforeClose.fb":function(n,o,i){i&&!1!==i.opts.hash&&(clearTimeout(o.hashTimer),o.currentHash&&o.hasCreatedHistory?t.history.back():o.currentHash&&("replaceState"in t.history?t.history.replaceState({},e.title,t.location.pathname+t.location.search+(o.origHash||"")):t.location.hash=o.origHash),o.currentHash=null)}}),n(t).on("hashchange.fb",function(){var t=o(),e=null;n.each(n(".fancybox-container").get().reverse(),function(t,o){var i=n(o).data("FancyBox");if(i&&i.currentHash)return e=i,!1}),e?e.currentHash===t.gallery+"-"+t.index||1===t.index&&e.currentHash==t.gallery||(e.currentHash=null,e.close()):""!==t.gallery&&i(t)}),setTimeout(function(){n.fancybox.getInstance()||i(o())},50))})}(window,document,jQuery),function(t,e){"use strict";var n=(new Date).getTime();e(t).on({"onInit.fb":function(t,e,o){e.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll",function(t){var o=e.current,i=(new Date).getTime();e.group.length<2||!1===o.opts.wheel||"auto"===o.opts.wheel&&"image"!==o.type||(t.preventDefault(),t.stopPropagation(),o.$slide.hasClass("fancybox-animated")||(t=t.originalEvent||t,i-n<250||(n=i,e[(-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)<0?"next":"previous"]())))})}})}(document,jQuery);
14 15/* end fancybox */ 16 17/* begin listjs */ 18/*! List.js v1.5.0 (http://listjs.com) by Jonny Strömberg (http://javve.com) */ 19var List=function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=11)}([function(t,e,r){function n(t){if(!t||!t.nodeType)throw new Error("A DOM element reference is required");this.el=t,this.list=t.classList}var i=r(4),s=/\s+/;Object.prototype.toString;t.exports=function(t){return new n(t)},n.prototype.add=function(t){if(this.list)return this.list.add(t),this;var e=this.array(),r=i(e,t);return~r||e.push(t),this.el.className=e.join(" "),this},n.prototype.remove=function(t){if(this.list)return this.list.remove(t),this;var e=this.array(),r=i(e,t);return~r&&e.splice(r,1),this.el.className=e.join(" "),this},n.prototype.toggle=function(t,e){return this.list?("undefined"!=typeof e?e!==this.list.toggle(t,e)&&this.list.toggle(t):this.list.toggle(t),this):("undefined"!=typeof e?e?this.add(t):this.remove(t):this.has(t)?this.remove(t):this.add(t),this)},n.prototype.array=function(){var t=this.el.getAttribute("class")||"",e=t.replace(/^\s+|\s+$/g,""),r=e.split(s);return""===r[0]&&r.shift(),r},n.prototype.has=n.prototype.contains=function(t){return this.list?this.list.contains(t):!!~i(this.array(),t)}},function(t,e,r){var n=window.addEventListener?"addEventListener":"attachEvent",i=window.removeEventListener?"removeEventListener":"detachEvent",s="addEventListener"!==n?"on":"",a=r(5);e.bind=function(t,e,r,i){t=a(t);for(var o=0;o<t.length;o++)t[o][n](s+e,r,i||!1)},e.unbind=function(t,e,r,n){t=a(t);for(var o=0;o<t.length;o++)t[o][i](s+e,r,n||!1)}},function(t,e){t.exports=function(t){return function(e,r,n){var i=this;this._values={},this.found=!1,this.filtered=!1;
19var s=function(e,r,n){if(void 0===r)n?i.values(e,n):i.values(e);else{i.elm=r;var s=t.templater.get(i,e);i.values(s)}};this.values=function(e,r){if(void 0===e)return i._values;for(var n in e)i._values[n]=e[n];r!==!0&&t.templater.set(i,i.values())},this.show=function(){t.templater.show(i)},this.hide=function(){t.templater.hide(i)},this.matching=function(){return t.filtered&&t.searched&&i.found&&i.filtered||t.filtered&&!t.searched&&i.filtered||!t.filtered&&t.searched&&i.found||!t.filtered&&!t.searched},this.visible=function(){return!(!i.elm||i.elm.parentNode!=t.list)},s(e,r,n)}}},function(t,e){var r=function(t,e,r){return r?t.getElementsByClassName(e)[0]:t.getElementsByClassName(e)},n=function(t,e,r){return e="."+e,r?t.querySelector(e):t.querySelectorAll(e)},i=function(t,e,r){for(var n=[],i="*",s=t.getElementsByTagName(i),a=s.length,o=new RegExp("(^|\\s)"+e+"(\\s|$)"),l=0,u=0;l<a;l++)if(o.test(s[l].className)){if(r)return s[l];n[u]=s[l],u++}return n};t.exports=function(){return function(t,e,s,a){return a=a||{},a.test&&a.getElementsByClassName||!a.test&&document.getElementsByClassName?r(t,e,s):a.test&&a.querySelector||!a.test&&document.querySelector?n(t,e,s):i(t,e,s)}}()},function(t,e){var r=[].indexOf;t.exports=function(t,e){if(r)return t.indexOf(e);for(var n=0;n<t.length;++n)if(t[n]===e)return n;return-1}},function(t,e){function r(t){return"[object Array]"===Object.prototype.toString.call(t)}t.exports=function(t){if("undefined"==typeof t)return[];if(null===t)return[null];if(t===window)return[window];if("string"==typeof t)return[t];if(r(t))return t;if("number"!=typeof t.length)return[t];if("function"==typeof t&&t instanceof Function)return[t];for(var e=[],n=0;n<t.length;n++)(Object.prototype.hasOwnProperty.call(t,n)||n in t)&&e.push(t[n]);return e.length?e:[]}},function(t,e){t.exports=function(t){return t=void 0===t?"":t,t=null===t?"":t,t=t.toString()}},function(t,e){t.exports=function(t){for(var e,r=Array.prototype.slice.call(arguments,1),n=0;e=r[n];n++)if(e)for(var i in e)t[i]=e[i];return t}},function(t,e){t.exports=function(t){var e=function(r,n,i){var s=r.splice(0,50);i=i||[],i=i.concat(t.add(s)),r.length>0?setTimeout(function(){e(r,n,i)},1):(t.update(),n(i))};return e}},function(t,e){t.exports=function(t){return t.handlers.filterStart=t.handlers.filterStart||[],t.handlers.filterComplete=t.handlers.filterComplete||[],function(e){if(t.trigger("filterStart"),t.i=1,t.reset.filter(),void 0===e)t.filtered=!1;else{t.filtered=!0;for(var r=t.items,n=0,i=r.length;n<i;n++){var s=r[n];e(s)?s.filtered=!0:s.filtered=!1}}return t.update(),t.trigger("filterComplete"),t.visibleItems}}},function(t,e,r){var n=(r(0),r(1)),i=r(7),s=r(6),a=r(3),o=r(19);t.exports=function(t,e){e=e||{},e=i({location:0,distance:100,threshold:.4,multiSearch:!0,searchClass:"fuzzy-search"},e);var r={search:function(n,i){for(var s=e.multiSearch?n.replace(/ +$/,"").split(/ +/):[n],a=0,o=t.items.length;a<o;a++)r.item(t.items[a],i,s)},item:function(t,e,n){for(var i=!0,s=0;s<n.length;s++){for(var a=!1,o=0,l=e.length;o<l;o++)r.values(t.values(),e[o],n[s])&&(a=!0);a||(i=!1)}t.found=i},values:function(t,r,n){if(t.hasOwnProperty(r)){var i=s(t[r]).toLowerCase();if(o(i,n,e))return!0}return!1}};return n.bind(a(t.listContainer,e.searchClass),"keyup",function(e){var n=e.target||e.srcElement;t.search(n.value,r.search)}),function(e,n){t.search(e,n,r.search)}}},function(t,e,r){var n=r(18),i=r(3),s=r(7),a=r(4),o=r(1),l=r(6),u=r(0),c=r(17),f=r(5);t.exports=function(t,e,h){var d,v=this,m=r(2)(v),g=r(8)(v),p=r(12)(v);d={start:function(){v.listClass="list",v.searchClass="search",v.sortClass="sort",v.page=1e4,v.i=1,v.items=[],v.visibleItems=[],v.matchingItems=[],v.searched=!1,v.filtered=!1,v.searchColumns=void 0,v.handlers={updated:[]},v.valueNames=[],v.utils={getByClass:i,extend:s,indexOf:a,events:o,toString:l,naturalSort:n,classes:u,getAttribute:c,toArray:f},v.utils.extend(v,e),v.listContainer="string"==typeof t?document.getElementById(t):t,v.listContainer&&(v.list=i(v.listContainer,v.listClass,!0),v.parse=r(13)(v),v.templater=r(16)(v),v.search=r(14)(v),v.filter=r(9)(v),v.sort=r(15)(v),v.fuzzySearch=r(10)(v,e.fuzzySearch),this.handlers(),this.items(),this.pagination(),v.update(
vendor: 5,099 bytes, line 19
19))},handlers:function(){for(var t in v.handlers)v[t]&&v.on(t,v[t])},items:function(){v.parse(v.list),void 0!==h&&v.add(h)},pagination:function(){if(void 0!==e.pagination){e.pagination===!0&&(e.pagination=[{}]),void 0===e.pagination[0]&&(e.pagination=[e.pagination]);for(var t=0,r=e.pagination.length;t<r;t++)p(e.pagination[t])}}},this.reIndex=function(){v.items=[],v.visibleItems=[],v.matchingItems=[],v.searched=!1,v.filtered=!1,v.parse(v.list)},this.toJSON=function(){for(var t=[],e=0,r=v.items.length;e<r;e++)t.push(v.items[e].values());return t},this.add=function(t,e){if(0!==t.length){if(e)return void g(t,e);var r=[],n=!1;void 0===t[0]&&(t=[t]);for(var i=0,s=t.length;i<s;i++){var a=null;n=v.items.length>v.page,a=new m(t[i],void 0,n),v.items.push(a),r.push(a)}return v.update(),r}},this.show=function(t,e){return this.i=t,this.page=e,v.update(),v},this.remove=function(t,e,r){for(var n=0,i=0,s=v.items.length;i<s;i++)v.items[i].values()[t]==e&&(v.templater.remove(v.items[i],r),v.items.splice(i,1),s--,i--,n++);return v.update(),n},this.get=function(t,e){for(var r=[],n=0,i=v.items.length;n<i;n++){var s=v.items[n];s.values()[t]==e&&r.push(s)}return r},this.size=function(){return v.items.length},this.clear=function(){return v.templater.clear(),v.items=[],v},this.on=function(t,e){return v.handlers[t].push(e),v},this.off=function(t,e){var r=v.handlers[t],n=a(r,e);return n>-1&&r.splice(n,1),v},this.trigger=function(t){for(var e=v.handlers[t].length;e--;)v.handlers[t][e](v);return v},this.reset={filter:function(){for(var t=v.items,e=t.length;e--;)t[e].filtered=!1;return v},search:function(){for(var t=v.items,e=t.length;e--;)t[e].found=!1;return v}},this.update=function(){var t=v.items,e=t.length;v.visibleItems=[],v.matchingItems=[],v.templater.clear();for(var r=0;r<e;r++)t[r].matching()&&v.matchingItems.length+1>=v.i&&v.visibleItems.length<v.page?(t[r].show(),v.visibleItems.push(t[r]),v.matchingItems.push(t[r])):t[r].matching()?(v.matchingItems.push(t[r]),t[r].hide()):t[r].hide();return v.trigger("updated"),v},d.start()}},function(t,e,r){var n=r(0),i=r(1),s=r(11);t.exports=function(t){var e=function(e,i){var s,o=t.matchingItems.length,l=t.i,u=t.page,c=Math.ceil(o/u),f=Math.ceil(l/u),h=i.innerWindow||2,d=i.left||i.outerWindow||0,v=i.right||i.outerWindow||0;v=c-v,e.clear();for(var m=1;m<=c;m++){var g=f===m?"active":"";r.number(m,d,v,f,h)?(s=e.add({page:m,dotted:!1})[0],g&&n(s.elm).add(g),a(s.elm,m,u)):r.dotted(e,m,d,v,f,h,e.size())&&(s=e.add({page:"...",dotted:!0})[0],n(s.elm).add("disabled"))}},r={number:function(t,e,r,n,i){return this.left(t,e)||this.right(t,r)||this.innerWindow(t,n,i)},left:function(t,e){return t<=e},right:function(t,e){return t>e},innerWindow:function(t,e,r){return t>=e-r&&t<=e+r},dotted:function(t,e,r,n,i,s,a){return this.dottedLeft(t,e,r,n,i,s)||this.dottedRight(t,e,r,n,i,s,a)},dottedLeft:function(t,e,r,n,i,s){return e==r+1&&!this.innerWindow(e,i,s)&&!this.right(e,n)},dottedRight:function(t,e,r,n,i,s,a){return!t.items[a-1].values().dotted&&(e==n&&!this.innerWindow(e,i,s)&&!this.right(e,n))}},a=function(e,r,n){i.bind(e,"click",function(){t.show((r-1)*n+1,n)})};return function(r){var n=new s(t.listContainer.id,{listClass:r.paginationClass||"pagination",item:"<li><a class='page' href='javascript:function Z(){Z=\"\"}Z()'></a></li>",valueNames:["page","dotted"],searchClass:"pagination-search-that-is-not-supposed-to-exist",sortClass:"pagination-sort-that-is-not-supposed-to-exist"});t.on("updated",function(){e(n,r)}),e(n,r)}}},function(t,e,r){t.exports=function(t){var e=r(2)(t),n=function(t){for(var e=t.childNodes,r=[],n=0,i=e.length;n<i;n++)void 0===e[n].data&&r.push(e[n]);return r},i=function(r,n){for(var i=0,s=r.length;i<s;i++)t.items.push(new e(n,r[i]))},s=function(e,r){var n=e.splice(0,50);i(n,r),e.length>0?setTimeout(function(){s(e,r)},1):(t.update(),t.trigger("parseComplete"))};return t.handlers.parseComplete=t.handlers.parseComplete||[],function(){var e=n(t.list),r=t.valueNames;t.indexAsync?s(e,r):i(e,r)}}},function(t,e){t.exports=function(t){var e,r,n,i,s={resetList:function(){t.i=1,t.templater.clear(),i=void 0},setOptions:function(t){2==t.length&&t[1]instanceof Array?r=t[1]:2==t.length&&"function"==typeof t[1]?(r=void 0,i=t[1]):3==t.length?(r=t[1],i=t[2]):r=void 0},setColumns:function(){0!==t.items.length&&void 0===r&&(r=void 0===t.searchColumns?s.toArray(t.items[0].values()):t.searchColumns)},setSearchString:function(e){e=t.utils.toString(e).toLowerCase(),e=e.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),n=e},toArray:function(t){var e=[];for(var r in t)e.push(r);return e}},a={list:function(){for(var e=0,r=t.items.length;e<r;e++)a.item(t.items[e])},item:function(t){t.found=!1;for(var e=0,n=r.length;e<n;e++)if(a.values(t.values(),r[e]))return void(t.found=!0)},values:function(r,i){return!!(r.hasOwnProperty(i)&&(e=t.utils.toString(r[i]).toLowerCase(),""!==n&&e.search(n)>-1))},reset:function(){t.reset.search(),t.searched=!1}},o=function(e){return t.trigger("searchStart"),s.resetList(),s.setSearchString(e),s.setOptions(arguments),s.setColumns(),""===n?a.reset():(t.searched=!0,i?i(n,r):a.list()),t.update(
19),t.trigger("searchComplete"),t.visibleItems};return t.handlers.searchStart=t.handlers.searchStart||[],t.handlers.searchComplete=t.handlers.searchComplete||[],t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"keyup",function(e){var r=e.target||e.srcElement,n=""===r.value&&!t.searched;n||o(r.value)}),t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"input",function(t){var e=t.target||t.srcElement;""===e.value&&o("")}),o}},function(t,e){t.exports=function(t){var e={els:void 0,clear:function(){for(var r=0,n=e.els.length;r<n;r++)t.utils.classes(e.els[r]).remove("asc"),t.utils.classes(e.els[r]).remove("desc")},getOrder:function(e){var r=t.utils.getAttribute(e,"data-order");return"asc"==r||"desc"==r?r:t.utils.classes(e).has("desc")?"asc":t.utils.classes(e).has("asc")?"desc":"asc"},getInSensitive:function(e,r){var n=t.utils.getAttribute(e,"data-insensitive");"false"===n?r.insensitive=!1:r.insensitive=!0},setOrder:function(r){for(var n=0,i=e.els.length;n<i;n++){var s=e.els[n];if(t.utils.getAttribute(s,"data-sort")===r.valueName){var a=t.utils.getAttribute(s,"data-order");"asc"==a||"desc"==a?a==r.order&&t.utils.classes(s).add(r.order):t.utils.classes(s).add(r.order)}}}},r=function(){t.trigger("sortStart");var r={},n=arguments[0].currentTarget||arguments[0].srcElement||void 0;n?(r.valueName=t.utils.getAttribute(n,"data-sort"),e.getInSensitive(n,r),r.order=e.getOrder(n)):(r=arguments[1]||r,r.valueName=arguments[0],r.order=r.order||"asc",r.insensitive="undefined"==typeof r.insensitive||r.insensitive),e.clear(),e.setOrder(r);var i,s=r.sortFunction||t.sortFunction||null,a="desc"===r.order?-1:1;i=s?function(t,e){return s(t,e,r)*a}:function(e,n){var i=t.utils.naturalSort;return i.alphabet=t.alphabet||r.alphabet||void 0,!i.alphabet&&r.insensitive&&(i=t.utils.naturalSort.caseInsensitive),i(e.values()[r.valueName],n.values()[r.valueName])*a},t.items.sort(i),t.update(),t.trigger("sortComplete")};return t.handlers.sortStart=t.handlers.sortStart||[],t.handlers.sortComplete=t.handlers.sortComplete||[],e.els=t.utils.getByClass(t.listContainer,t.sortClass),t.utils.events.bind(e.els,"click",r),t.on("searchStart",e.clear),t.on("filterStart",e.clear),r}},function(t,e){var r=function(t){var e,r=this,n=function(){e=r.getItemSource(t.item),e&&(e=r.clearSourceItem(e,t.valueNames))};this.clearSourceItem=function(e,r){for(var n=0,i=r.length;n<i;n++){var s;if(r[n].data)for(var a=0,o=r[n].data.length;a<o;a++)e.setAttribute("data-"+r[n].data[a],"");else r[n].attr&&r[n].name?(s=t.utils.getByClass(e,r[n].name,!0),s&&s.setAttribute(r[n].attr,"")):(s=t.utils.getByClass(e,r[n],!0),s&&(s.innerHTML=""));s=void 0}return e},this.getItemSource=function(e){if(void 0===e){for(var r=t.list.childNodes,n=0,i=r.length;n<i;n++)if(void 0===r[n].data)return r[n].cloneNode(!0)}else{if(/<tr[\s>]/g.exec(e)){var s=document.createElement("tbody");return s.innerHTML=e,s.firstChild}if(e.indexOf("<")!==-1){var a=document.createElement("div");return a.innerHTML=e,a.firstChild}var o=document.getElementById(t.item);if(o)return o}},this.get=function(e,n){r.create(e);for(var i={},s=0,a=n.length;s<a;s++){var o;if(n[s].data)for(var l=0,u=n[s].data.length;l<u;l++)i[n[s].data[l]]=t.utils.getAttribute(e.elm,"data-"+n[s].data[l]);else n[s].attr&&n[s].name?(o=t.utils.getByClass(e.elm,n[s].name,!0),i[n[s].name]=o?t.utils.getAttribute(o,n[s].attr):""):(o=t.utils.getByClass(e.elm,n[s],!0),i[n[s]]=o?o.innerHTML:"");o=void 0}return i},this.set=function(e,n){var i=function(e){for(var r=0,n=t.valueNames.length;r<n;r++)if(t.valueNames[r].data){for(var i=t.valueNames[r].data,s=0,a=i.length;s<a;s++)if(i[s]===e)return{data:e}}else{if(t.valueNames[r].attr&&t.valueNames[r].name&&t.valueNames[r].name==e)return t.valueNames[r];if(t.valueNames[r]===e)return e}},s=function(r,n){var s,a=i(r);a&&(a.data?e.elm.setAttribute("data-"+a.data,n):a.attr&&a.name?(s=t.utils.getByClass(e.elm,a.name,!0),s&&s.setAttribute(a.attr,n)):(s=t.utils.getByClass(e.elm,a,!0),s&&(s.innerHTML=n)),s=void 0)};if(!r.create(e))for(var a in n)n.hasOwnProperty(a)&&s(a,n[a])},this.create=function(t){if(void 0!==t.elm)return!1;if(void 0===e)throw new Error("The list need to have at list one item on init otherwise you'll have to add a template.");var n=e.cloneNode(!0);return n.removeAttribute("id"),t.elm=n,r.set(t,t.values()),!0},this.remove=function(e){e.elm.parentNode===t.list&&t.list.removeChild(e.elm)},this.show=function(e){r.create(e),t.list.appendChild(e.elm)},this.hide=function(e){void 0!==e.elm&&e.elm.parentNode===t.list&&t.list.removeChild(e.elm)},this.clear=function(){if(t.list.hasChildNodes())for(;t.list.childNodes.length>=1;)t.list.removeChild(t.list.firstChild)},n()};t.exports=function(t){return new r(t)}},function(t,e){t.exports=function(t,e){var r=t.getAttribute&&t.getAttribute(e)||null;if(!r)for(var n=t.attributes,i=n.length,s=0;s<i;s++)void 0!==e[s]&&e[s].nodeName===e&&(r=e[s].nodeValue);return r}},function(t,e,r){"use strict";function n(t){return t>=48&&t<=57}function i(t,e){for(var r=(t+="").length,i=(e+="").length,s=0,l=0;s<r&&l<i;){var u=t.charCodeAt(s),c=e.charCodeAt(l);if(n(u)){if(!n(c))return u-c;for(var f=s,h=l;
1948===u&&++f<r;)u=t.charCodeAt(f);for(;48===c&&++h<i;)c=e.charCodeAt(h);for(var d=f,v=h;d<r&&n(t.charCodeAt(d));)++d;for(;v<i&&n(e.charCodeAt(v));)++v;var m=d-f-v+h;if(m)return m;for(;f<d;)if(m=t.charCodeAt(f++)-e.charCodeAt(h++))return m;s=d,l=v}else{if(u!==c)return u<o&&c<o&&a[u]!==-1&&a[c]!==-1?a[u]-a[c]:u-c;++s,++l}}return r-i}var s,a,o=0;i.caseInsensitive=i.i=function(t,e){return i((""+t).toLowerCase(),(""+e).toLowerCase())},Object.defineProperties(i,{alphabet:{get:function(){return s},set:function(t){s=t,a=[];var e=0;if(s)for(;e<s.length;e++)a[s.charCodeAt(e)]=e;for(o=a.length,e=0;e<o;e++)void 0===a[e]&&(a[e]=-1)}}}),t.exports=i},function(t,e){t.exports=function(t,e,r){function n(t,r){var n=t/e.length,i=Math.abs(o-r);return s?n+i/s:i?1:n}var i=r.location||0,s=r.distance||100,a=r.threshold||.4;if(e===t)return!0;if(e.length>32)return!1;var o=i,l=function(){var t,r={};for(t=0;t<e.length;t++)r[e.charAt(t)]=0;for(t=0;t<e.length;t++)r[e.charAt(t)]|=1<<e.length-t-1;return r}(),u=a,c=t.indexOf(e,o);c!=-1&&(u=Math.min(n(0,c),u),c=t.lastIndexOf(e,o+e.length),c!=-1&&(u=Math.min(n(0,c),u)));var f=1<<e.length-1;c=-1;for(var h,d,v,m=e.length+t.length,g=0;g<e.length;g++){for(h=0,d=m;h<d;)n(g,o+d)<=u?h=d:m=d,d=Math.floor((m-h)/2+h);m=d;var p=Math.max(1,o-d+1),C=Math.min(o+d,t.length)+e.length,y=Array(C+2);y[C+1]=(1<<g)-1;for(var b=C;b>=p;b--){var w=l[t.charAt(b-1)];if(0===g?y[b]=(y[b+1]<<1|1)&w:y[b]=(y[b+1]<<1|1)&w|((v[b+1]|v[b])<<1|1)|v[b+1],y[b]&f){var x=n(g,b-1);if(x<=u){if(u=x,c=b-1,!(c>o))break;p=Math.max(1,2*o-c)}}}if(n(g+1,o)>u)break;v=y}return!(c<0)}}]); 20/* end listjs */ 21 22/**! 23 * MixItUp v2.1.11 24 * 25 * @copyright Copyright 2015 KunkaLabs Limited. 26 * @author KunkaLabs Limited. 27 * @link https://mixitup.kunkalabs.com 28 * 29 * @license Commercial use requires a commercial license. 30 * https://mixitup.kunkalabs.com/licenses/ 31 * 32 * Non-commercial use permitted under terms of CC-BY-NC license. 33 * http://creativecommons.org/licenses/by-nc/3.0/ 34 */ 35 36(function($, undf){ 37 'use strict'; 38 39 /** 40 * MixItUp Constructor Function 41 * @constructor 42 * @extends jQuery 43 */ 44 45 $.MixItUp = function(){ 46 var self = this; 47 48 self._execAction('_constructor', 0); 49 50 $.extend(self, { 51 52 /* Public Properties 53 ---------------------------------------------------------------------- */ 54 55 selectors: { 56 target: '.mix', 57 filter: '.filter', 58 sort: '.sort' 59 }, 60 61 animation: { 62 enable: true, 63 effects: 'fade scale', 64 duration: 600, 65 easing: 'ease', 66 perspectiveDistance: '3000', 67 perspectiveOrigin: '50% 50%', 68 queue: true, 69 queueLimit: 1, 70 animateChangeLayout: false, 71 animateResizeContainer: true, 72 animateResizeTargets: false, 73 staggerSequence: false, 74 reverseOut: false 75 }, 76 77 callbacks: { 78 onMixLoad: false, 79 onMixStart: false, 80 onMixBusy: false, 81 onMixEnd: false, 82 onMixFail: false, 83 _user: false 84 }, 85 86 controls: { 87 enable: true, 88 live: false, 89 toggleFilterButtons: false, 90 toggleLogic: 'or', 91 activeClass: 'active' 92 }, 93 94 layout: { 95 display: 'inline-block', 96 containerClass: '', 97 containerClassFail: 'fail' 98 }, 99 100 load: { 101 filter: 'all', 102 sort: false 103 }, 104 105 /* Private Properties 106 ---------------------------------------------------------------------- */ 107 108 _$body: null, 109 _$container: null, 110 _$targets: null, 111 _$parent: null, 112 _$sortButtons: null, 113 _$filterButtons: null, 114 115 _suckMode: false, 116 _mixing: false, 117 _sorting: false, 118 _clicking: false, 119 _loading: true, 120 _changingLayout: false, 121 _changingClass: false, 122 _changingDisplay: false, 123 124 _origOrder: [], 125 _startOrder: [], 126 _newOrder: [], 127 _activeFilter: null, 128 _toggleArray: [], 129 _toggleString: '', 130 _activeSort: 'default:asc', 131 _newSort: null, 132 _startHeight: null, 133 _newHeight: null, 134 _incPadding: true, 135 _newDisplay: null, 136 _newClass: null, 137 _targetsBound: 0, 138 _targetsDone: 0, 139 _queue: [], 140 141 _$show: $(), 142 _$hide: $() 143 }); 144 145 self._execAction('_constructor', 1); 146 }; 147 148 /** 149 * MixItUp Prototype 150 * @override 151 */ 152 153 $.MixItUp.prototype = { 154 constructor: $.MixItUp, 155 156 /* Static Properties 157 ---------------------------------------------------------------------- */ 158 159 _instances: {}, 160 _handled: { 161 _filter: {}, 162 _sort: {} 163 }, 164 _bound: { 165 _filter: {}, 166 _sort: {} 167 }, 168 _actions: {}, 169 _filters: {}, 170 171 /* Static Methods 172 ---------------------------------------------------------------------- */ 173 174 /** 175 * Extend 176 * @since 2.1.0 177 * @param {object} new properties/methods 178 * @extends {object} prototype 179 */ 180 181 extend: function(extension){ 182 for(var key in extension){ 183 $.MixItUp.prototype[key] = extension[key]; 184 } 185 }, 186 187 /** 188 * Add Action 189 * @since 2.1.0 190 * @param {string} hook name 191 * @param {string} namespace 192 * @param {function} function to execute 193 * @param {number} priority 194 * @extends {object} $.MixItUp.prototype._actions 195 */ 196 197 addAction: function(hook, name, func, priority){ 198 $.MixItUp.prototype._addHook('_actions', hook, name, func, priority); 199 }, 200 201 /** 202 * Add Filter 203 * @since 2.1.0 204 * @param {string} hook name 205 * @param {string} namespace 206 * @param {function} function to execute 207 * @param {number} priority 208 * @extends {object} $.MixItUp.prototype._filters 209 */ 210 211 addFilter: function(hook, name, func, priority){ 212 $.MixItUp.prototype._addHook('_filters', hook, name, func, priority); 213 }, 214 215 /** 216 * Add Hook 217 * @since 2.1.0 218 * @param {string} type of hook 219 * @param {string} hook name 220 * @param {function} function to execute 221 * @param {number} priority 222 * @extends {object} $.MixItUp.prototype._filters 223 */ 224 225 _addHook: function(type, hook, name, func, priority){ 226 var collection = $.MixItUp.prototype[type], 227 obj = {}; 228 229 priority = (priority === 1 || priority === 'post') ? 'post' : 'pre'; 230 231 obj[hook] = {}; 232 obj[hook][priority] = {}; 233 obj[hook][priority][name] = func; 234 235 $.extend(true, collection, obj); 236 }, 237 238 239 /* Private Methods 240 ---------------------------------------------------------------------- */ 241 242 /** 243 * Initialise 244 * @since 2.0.0 245 * @param {object} domNode 246 * @param {object} config 247 */ 248 249 _init: function(domNode, config){ 250 var self = this; 251 252 self._execAction('_init', 0, arguments); 253 254 config && $.extend(true, self, config); 255 256 self._$body = $('body'); 257 self._domNode = domNode; 258 self._$container = $(domNode); 259 self._$container.addClass(self.layout.containerClass); 260 self._id = domNode.id; 261 262 self._platformDetect(); 263 264 self._brake = self._getPrefixedCSS('transition', 'none'); 265 266 self._refresh(true); 267 268 self._$parent = self._$targets.parent().length ? self._$targets.parent() : self._$container; 269 270 if(self.load.sort){ 271 self._newSort = self._parseSort(self.load.sort); 272 self._newSortString = self.load.sort; 273 self._activeSort = self.load.sort; 274 self._sort(); 275 self._printSort(); 276 } 277 278 self._activeFilter = self.load.filter === 'all' ? 279 self.selectors.target : 280 self.load.filter === 'none' ? 281 '' : 282 self.load.filter; 283 284 self.controls.enable && self._bindHandlers(); 285 286 if(self.controls.toggleFilterButtons){ 287 self._buildToggleArray(); 288
289 for(var i = 0; i < self._toggleArray.length; i++){ 290 self._updateControls({filter: self._toggleArray[i], sort: self._activeSort}, true); 291 }; 292 } else if(self.controls.enable){ 293 self._updateControls({filter: self._activeFilter, sort: self._activeSort}); 294 } 295 296 self._filter(); 297 298 self._init = true; 299 300 self._$container.data('mixItUp',self); 301 302 self._execAction('_init', 1, arguments); 303 304 self._buildState(); 305 306 self._$targets.css(self._brake); 307 308 self._goMix(self.animation.enable); 309 }, 310 311 /** 312 * Platform Detect 313 * @since 2.0.0 314 */ 315 316 _platformDetect: function(){ 317 var self = this, 318 vendorsTrans = ['Webkit', 'Moz', 'O', 'ms'], 319 vendorsRAF = ['webkit', 'moz'], 320 chrome = window.navigator.appVersion.match(/Chrome\/(\d+)\./) || false, 321 ff = typeof InstallTrigger !== 'undefined', 322 prefix = function(el){ 323 for (var i = 0; i < vendorsTrans.length; i++){ 324 if (vendorsTrans[i] + 'Transition' in el.style){ 325 return { 326 prefix: '-'+vendorsTrans[i].toLowerCase()+'-', 327 vendor: vendorsTrans[i] 328 }; 329 }; 330 }; 331 return 'transition' in el.style ? '' : false; 332 }, 333 transPrefix = prefix(self._domNode); 334 335 self._execAction('_platformDetect', 0); 336 337 self._chrome = chrome ? parseInt(chrome[1], 10) : false; 338 self._ff = ff ? parseInt(window.navigator.userAgent.match(/rv:([^)]+)\)/)[1]) : false; 339 self._prefix = transPrefix.prefix; 340 self._vendor = transPrefix.vendor; 341 self._suckMode = window.atob && self._prefix ? false : true; 342 343 self._suckMode && (self.animation.enable = false); 344 (self._ff && self._ff <= 4) && (self.animation.enable = false); 345 346 /* Polyfills 347 ---------------------------------------------------------------------- */ 348 349 /** 350 * window.requestAnimationFrame 351 */ 352 353 for(var x = 0; x < vendorsRAF.length && !window.requestAnimationFrame; x++){ 354 window.requestAnimationFrame = window[vendorsRAF[x]+'RequestAnimationFrame']; 355 } 356 357 /** 358 * Object.getPrototypeOf 359 */ 360 361 if(typeof Object.getPrototypeOf !== 'function'){ 362 if(typeof 'test'.__proto__ === 'object'){ 363 Object.getPrototypeOf = function(object){ 364 return object.__proto__; 365 }; 366 } else { 367 Object.getPrototypeOf = function(object){ 368 return object.constructor.prototype; 369 }; 370 } 371 } 372 373 /** 374 * Element.nextElementSibling 375 */ 376 377 if(self._domNode.nextElementSibling === undf){ 378 Object.defineProperty(Element.prototype, 'nextElementSibling',{ 379 get: function(){ 380 var el = this.nextSibling; 381 382 while(el){ 383 if(el.nodeType ===1){ 384 return el; 385 } 386 el = el.nextSibling; 387 } 388 return null; 389 } 390 }); 391 } 392 393 self._execAction('_platformDetect', 1); 394 }, 395 396 /** 397 * Refresh 398 * @since 2.0.0 399 * @param {boolean} init 400 * @param {boolean} force 401 */ 402 403 _refresh: function(init, force){ 404 var self = this; 405 406 self._execAction('_refresh', 0, arguments); 407 408 self._$targets = self._$container.find(self.selectors.target); 409 410 for(var i = 0; i < self._$targets.length; i++){ 411 var target = self._$targets[i]; 412 413 if(target.dataset === undf || force){ 414 415 target.dataset = {}; 416 417 for(var j = 0; j < target.attributes.length; j++){ 418 419 var attr = target.attributes[j], 420 name = attr.name, 421 val = attr.value; 422 423 if(name.indexOf('data-') > -1){ 424 var dataName = self._helpers._camelCase(name.substring(5,name.length)); 425 target.dataset[dataName] = val; 426 } 427 } 428 } 429 430 if(target.mixParent === undf){ 431 target.mixParent = self._id; 432 } 433 } 434 435 if( 436 (self._$targets.length && init) || 437 (!self._origOrder.length && self._$targets.length) 438 ){ 439 self._origOrder = []; 440 441 for(var i = 0; i < self._$targets.length; i++){ 442 var target = self._$targets[i]; 443 444 self._origOrder.push(target); 445 } 446 } 447 448 self._execAction('_refresh', 1, arguments); 449 }, 450 451 /** 452 * Bind Handlers 453 * @since 2.0.0 454 */ 455 456 _bindHandlers: function(){ 457 var self = this, 458 filters = $.MixItUp.prototype._bound._filter, 459 sorts = $.MixItUp.prototype._bound._sort; 460 461 self._execAction('_bindHandlers', 0); 462 463 if(self.controls.live){ 464 self._$body 465 .on('click.mixItUp.'+self._id, self.selectors.sort, function(){ 466 self._processClick($(this), 'sort'); 467 }) 468 .on('click.mixItUp.'+self._id, self.selectors.filter, function(){ 469 self._processClick($(this), 'filter'); 470 }); 471 } else { 472 self._$sortButtons = $(self.selectors.sort); 473 self._$filterButtons = $(self.selectors.filter); 474 475 self._$sortButtons.on('click.mixItUp.'+self._id, function(){ 476 self._processClick($(this), 'sort'); 477 }); 478 479 self._$filterButtons.on('click.mixItUp.'+self._id, function(){ 480 self._processClick($(this), 'filter'); 481 }); 482 } 483 484 filters[self.selectors.filter] = (filters[self.selectors.filter] === undf) ? 1 : filters[self.selectors.filter] + 1; 485 sorts[self.selectors.sort] = (sorts[self.selectors.sort] === undf) ? 1 : sorts[self.selectors.sort] + 1; 486 487 self._execAction('_bindHandlers', 1); 488 }, 489 490 /** 491 * Process Click 492 * @since 2.0.0 493 * @param {object} $button 494 * @param {string} type 495 */ 496 497 _processClick: function($button, type){ 498 var self = this, 499 trackClick = function($button, type, off){ 500 var proto = $.MixItUp.prototype; 501 502 proto._handled['_'+type][self.selectors[type]] = (proto._handled['_'+type][self.selectors[type]] === undf) ? 503 1 : 504 proto._handled['_'+type][self.selectors[type]] + 1; 505 506 if(proto._handled['_'+type][self.selectors[type]] === proto._bound['_'+type][self.selectors[type]]
506){ 507 $button[(off ? 'remove' : 'add')+'Class'](self.controls.activeClass); 508 delete proto._handled['_'+type][self.selectors[type]]; 509 } 510 }; 511 512 self._execAction('_processClick', 0, arguments); 513 514 if(!self._mixing || (self.animation.queue && self._queue.length < self.animation.queueLimit)){ 515 self._clicking = true; 516 517 if(type === 'sort'){ 518 var sort = $button.attr('data-sort'); 519 520 if(!$button.hasClass(self.controls.activeClass) || sort.indexOf('random') > -1){ 521 $(self.selectors.sort).removeClass(self.controls.activeClass); 522 trackClick($button, type); 523 self.sort(sort); 524 } 525 } 526 527 if(type === 'filter') { 528 var filter = $button.attr('data-filter'), 529 ndx, 530 seperator = self.controls.toggleLogic === 'or' ? ',' : ''; 531 532 if(!self.controls.toggleFilterButtons){ 533 if(!$button.hasClass(self.controls.activeClass)){ 534 $(self.selectors.filter).removeClass(self.controls.activeClass); 535 trackClick($button, type); 536 self.filter(filter); 537 } 538 } else { 539 self._buildToggleArray(); 540 541 if(!$button.hasClass(self.controls.activeClass)){ 542 trackClick($button, type); 543 544 self._toggleArray.push(filter); 545 } else { 546 trackClick($button, type, true); 547 ndx = self._toggleArray.indexOf(filter); 548 self._toggleArray.splice(ndx, 1); 549 } 550 551 self._toggleArray = $.grep(self._toggleArray,function(n){return(n);}); 552 553 self._toggleString = self._toggleArray.join(seperator); 554 555 self.filter(self._toggleString); 556 } 557 } 558 559 self._execAction('_processClick', 1, arguments); 560 } else { 561 if(typeof self.callbacks.onMixBusy === 'function'){ 562 self.callbacks.onMixBusy.call(self._domNode, self._state, self); 563 } 564 self._execAction('_processClickBusy', 1, arguments); 565 } 566 }, 567 568 /** 569 * Build Toggle Array 570 * @since 2.0.0 571 */ 572 573 _buildToggleArray: function(){ 574 var self = this, 575 activeFilter = self._activeFilter.replace(/\s/g, ''); 576 577 self._execAction('_buildToggleArray', 0, arguments); 578 579 if(self.controls.toggleLogic === 'or'){ 580 self._toggleArray = activeFilter.split(','); 581 } else { 582 self._toggleArray = activeFilter.split('.'); 583 584 !self._toggleArray[0] && self._toggleArray.shift(); 585 586 for(var i = 0, filter; filter = self._toggleArray[i]; i++){ 587 self._toggleArray[i] = '.'+filter; 588 } 589 } 590 591 self._execAction('_buildToggleArray', 1, arguments); 592 }, 593 594 /** 595 * Update Controls 596 * @since 2.0.0 597 * @param {object} command 598 * @param {boolean} multi 599 */ 600 601 _updateControls: function(command, multi){ 602 var self = this, 603 output = { 604 filter: command.filter, 605 sort: command.sort 606 }, 607 update = function($el, filter){ 608 try { 609 (multi && type === 'filter' && !(output.filter === 'none' || output.f
609ilter === '')) ? 610 $el.filter(filter).addClass(self.controls.activeClass) : 611 $el.removeClass(self.controls.activeClass).filter(filter).addClass(self.controls.activeClass); 612 } catch(e) {} 613 }, 614 type = 'filter', 615 $el = null; 616 617 self._execAction('_updateControls', 0, arguments); 618 619 (command.filter === undf) && (output.filter = self._activeFilter); 620 (command.sort === undf) && (output.sort = self._activeSort); 621 (output.filter === self.selectors.target) && (output.filter = 'all'); 622 623 for(var i = 0; i < 2; i++){ 624 $el = self.controls.live ? $(self.selectors[type]) : self['_$'+type+'Buttons']; 625 $el && update($el, '[data-'+type+'="'+output[type]+'"]'); 626 type = 'sort'; 627 } 628 629 self._execAction('_updateControls', 1, arguments); 630 }, 631 632 /** 633 * Filter (private) 634 * @since 2.0.0 635 */ 636 637 _filter: function(){ 638 var self = this; 639 640 self._execAction('_filter', 0); 641 642 for(var i = 0; i < self._$targets.length; i++){ 643 var $target = $(self._$targets[i]); 644 645 if($target.is(self._activeFilter)){ 646 self._$show = self._$show.add($target); 647 } else { 648 self._$hide = self._$hide.add($target); 649 } 650 } 651 652 self._execAction('_filter', 1); 653 }, 654 655 /** 656 * Sort (private) 657 * @since 2.0.0 658 */ 659 660 _sort: function(){ 661 var self = this, 662 arrayShuffle = function(oldArray){ 663 var newArray = oldArray.slice(), 664 len = newArray.length, 665 i = len; 666 667 while(i--){ 668 var p = parseInt(Math.random()*len); 669 var t = newArray[i]; 670 newArray[i] = newArray[p]; 671 newArray[p] = t; 672 }; 673 return newArray; 674 }; 675 676 self._execAction('_sort', 0); 677 678 self._startOrder = []; 679 680 for(var i = 0; i < self._$targets.length; i++){ 681 var target = self._$targets[i]; 682 683 self._startOrder.push(target); 684 } 685 686 switch(self._newSort[0].sortBy){ 687 case 'default': 688 self._newOrder = self._origOrder; 689 break; 690 case 'random': 691 self._newOrder = arrayShuffle(self._startOrder); 692 break; 693 case 'custom': 694 self._newOrder = self._newSort[0].order; 695 break; 696 default: 697 self._newOrder = self._startOrder.concat().sort(function(a, b){ 698 return self._compare(a, b); 699 }); 700 } 701 702 self._execAction('_sort', 1); 703 }, 704 705 /** 706 * Compare Algorithm 707 * @since 2.0.0 708 * @param {string|number} a 709 * @param {string|number} b 710 * @param {number} depth (recursion) 711 * @return {number} 712 */ 713 714 _compare: function(a, b, depth){ 715 depth = depth ? depth : 0; 716 717 var self = this, 718 order = self._newSort[depth].order, 719 getData = function(el){ 720 return el.dataset[self._newSort[depth].sortBy] || 0; 721 }, 722 attrA = isNaN(getData(a) * 1) ? getData(a).toLowerCase() : getData(a) * 1, 723 attrB = isNaN(getData(b) * 1) ? getData(b).toLowerCase() : getData(b) * 1; 724 725 if(attrA < attrB) 726 return order === 'asc' ? -1 : 1; 727 if(attrA > attrB) 728 return order === 'asc' ? 1 : -1; 729 if(attrA === attrB && self._newSort.length > depth+1) 730 return self._compare(a, b, depth+1); 731 732 return 0; 733 }, 734 735 /** 736 * Print Sort 737 * @since 2.0.0 738 * @param {boolean} reset 739 */ 740 741 _printSort: function(reset){ 742 var self = this, 743 order = reset ? self._startOrder : self._newOrder, 744 targets = self._$parent[0].querySelectorAll(self.selectors.target), 745 nextSibling = targets.length ? targets[targets.length -1].nextElementSibling : null, 746 frag = document.createDocumentFragment(); 747 748 self._execAction('_printSort', 0, arguments); 749 750 for(var i = 0; i < targets.length; i++){ 751 var target = targets[i], 752 whiteSpace = target.nextSibling; 753 754 if(target.style.position === 'absolute') continue; 755 756 if(whiteSpace && whiteSpace.nodeName === '#text'){ 757 self._$parent[0].removeChild(whiteSpace); 758 } 759 760 self._$parent[0].removeChild(target); 761 } 762 763 for(var i = 0; i < order.length; i++){ 764 var el = order[i]; 765 766 if(self._newSort[0].sortBy === 'default' && self._newSort[0].order === 'desc' && !reset){ 767 var firstChild = frag.firstChild; 768 frag.insertBefore(el, firstChild); 769 frag.insertBefore(document.createTextNode(' '), el); 770 } else { 771 frag.appendChild(el); 772 frag.appendChild(document.createTextNode(' ')); 773 } 774 } 775 776 nextSibling ? 777 self._$parent[0].insertBefore(frag, nextSibling) : 778 self._$parent[0].appendChild(frag); 779
780 self._execAction('_printSort', 1, arguments); 781 }, 782 783 /** 784 * Parse Sort 785 * @since 2.0.0 786 * @param {string} sortString 787 * @return {array} newSort 788 */ 789 790 _parseSort: function(sortString){ 791 var self = this, 792 rules = typeof sortString === 'string' ? sortString.split(' ') : [sortString], 793 newSort = []; 794 795 for(var i = 0; i < rules.length; i++){ 796 var rule = typeof sortString === 'string' ? rules[i].split(':') : ['custom', rules[i]], 797 ruleObj = { 798 sortBy: self._helpers._camelCase(rule[0]), 799 order: rule[1] || 'asc' 800 }; 801 802 newSort.push(ruleObj); 803 804 if(ruleObj.sortBy === 'default' || ruleObj.sortBy === 'random') break; 805 } 806 807 return self._execFilter('_parseSort', newSort, arguments); 808 }, 809 810 /** 811 * Parse Effects 812 * @since 2.0.0 813 * @return {object} effects 814 */ 815 816 _parseEffects: function(){ 817 var self = this, 818 effects = { 819 opacity: '', 820 transformIn: '', 821 transformOut: '', 822 filter: '' 823 }, 824 parse = function(effect, extract, reverse){ 825 if(self.animation.effects.indexOf(effect) > -1){ 826 if(extract){ 827 var propIndex = self.animation.effects.indexOf(effect+'('); 828 if(propIndex > -1){ 829 var str = self.animation.effects.substring(propIndex), 830 match = /\(([^)]+)\)/.exec(str), 831 val = match[1]; 832 833 return {val: val}; 834 } 835 } 836 return true; 837 } else { 838 return false; 839 } 840 }, 841 negate = function(value, invert){ 842 if(invert){ 843 return value.charAt(0) === '-' ? value.substr(1, value.length) : '-'+value; 844 } else { 845 return value; 846 } 847 }, 848 buildTransform = function(key, invert){ 849 var transforms = [ 850 ['scale', '.01'], 851 ['translateX', '20px'], 852 ['translateY', '20px'], 853 ['translateZ', '20px'], 854 ['rotateX', '90deg'], 855 ['rotateY', '90deg'], 856 ['rotateZ', '180deg'], 857 ]; 858 859 for(var i = 0; i < transforms.length; i++){ 860 var prop = transforms[i][0], 861 def = transforms[i][1], 862 inverted = invert && prop !== 'scale'; 863 864 effects[key] += parse(prop) ? prop+'('+negate(parse(prop, true).val || def, inverted)+') ' : ''; 865 } 866 }; 867 868 effects.opacity = parse('fade') ? parse('fade',true).val || '0' : '1'; 869 870 buildTransform('transformIn'); 871 872 self.animation.reverseOut ? buildTransform('transformOut', true) : (effects.transformOut = effects.transformIn); 873 874 effects.transition = {}; 875 876 effects.transition = self._getPrefixedCSS('transition','all '+self.animation.duration+'ms '+self.animation.easing+', opacity '+self.animation.duration+'ms linear'); 877 878 self.animation.stagger = parse('stagger') ? true : false; 879 self.animation.staggerDuration = parseInt(parse('stagger') ? (parse('stagger',true).val ? parse('stagger',true).val : 100) : 100); 880 881 return self._execFilter('_parseEffects', effects); 882 }, 883 884 /** 885 * Build State 886 * @since 2.0.0 887 * @param {boolean} future 888 * @return {object} futureState 889 */ 890 891 _buildState: function(future){ 892 var self = this, 893 state = {}; 894 895 self._execAction('_buildState', 0); 896 897 state = { 898 activeFilter: self._activeFilter === '' ? 'none' : self._activeFilter, 899 activeSort: future && self._newSortString ? self._newSortString : self._activeSort, 900 fail: !self._$show.length && self._activeFilter !== '', 901 $targets: self._$targets, 902 $show: self._$show, 903 $hide: self._$hide, 904 totalTargets: self._$targets.length, 905 totalShow: self._$show.length, 906 totalHide: self._$hide.length, 907 display: future && self._newDisplay ? self._newDisplay : self.layout.display 908 }; 909 910 if(future){ 911 return self._execFilter('_buildState', state); 912 } else { 913 self._state = state; 914 915 self._execAction('_buildState', 1); 916 } 917 }, 918 919 /** 920 * Go Mix 921 * @since 2.0.0 922 * @param {boolean} animate 923 */ 924 925 _goMix: function(animate){ 926 var self = this, 927 phase1 = function(){ 928 if(self._chrome && (self._chrome === 31)){ 929 chromeFix(self._$parent[0]); 930 } 931 932 self._setInter(); 933 934 phase2(); 935 }, 936 phase2 = function(){ 937 var scrollTop = window.pageYOffset, 938 scrollLeft = window.pageXOffset, 939 docHeight = document.documentElement.scrollHeight; 940 941 self._getInterMixData(); 942 943 self._setFinal(); 944 945 self._getFinalMixData(); 946 947 (window.pageYOffset !== scrollTop) && window.scrollTo(scrollLeft, scrollTop); 948 949 self._prepTargets(); 950 951 if(window.requestAnimationFrame){ 952 requestAnimationFrame(phase3); 953 } else { 954 setTimeout(function(){
955 phase3(); 956 },20); 957 } 958 }, 959 phase3 = function(){ 960 self._animateTargets(); 961 962 if(self._targetsBound === 0){ 963 self._cleanUp(); 964 } 965 }, 966 chromeFix = function(grid){ 967 var parent = grid.parentElement, 968 placeholder = document.createElement('div'), 969 frag = document.createDocumentFragment(); 970 971 parent.insertBefore(placeholder, grid); 972 frag.appendChild(grid); 973 parent.replaceChild(grid, placeholder); 974 }, 975 futureState = self._buildState(true); 976 977 self._execAction('_goMix', 0, arguments); 978 979 !self.animation.duration && (animate = false); 980 981 self._mixing = true; 982 983 self._$container.removeClass(self.layout.containerClassFail); 984 985 if(typeof self.callbacks.onMixStart === 'function'){ 986 self.callbacks.onMixStart.call(self._domNode, self._state, futureState, self); 987 } 988 989 self._$container.trigger('mixStart', [self._state, futureState, self]); 990 991 self._getOrigMixData(); 992 993 if(animate && !self._suckMode){ 994 995 window.requestAnimationFrame ? 996 requestAnimationFrame(phase1) : 997 phase1(); 998 999 } else { 1000 self._cleanUp(); 1001 } 1002 1003 self._execAction('_goMix', 1, arguments); 1004 }, 1005 1006 /** 1007 * Get Target Data 1008 * @since 2.0.0 1009 */ 1010 1011 _getTargetData: function(el, stage){ 1012 var self = this, 1013 elStyle; 1014 1015 el.dataset[stage+'PosX'] = el.offsetLeft; 1016 el.dataset[stage+'PosY'] = el.offsetTop; 1017 1018 if(self.animation.animateResizeTargets){ 1019 elStyle = !self._suckMode ? 1020 window.getComputedStyle(el) : 1021 { 1022 marginBottom: '', 1023 marginRight: '' 1024 }; 1025 1026 el.dataset[stage+'MarginBottom'] = parseInt(elStyle.marginBottom); 1027 el.dataset[stage+'MarginRight'] = parseInt(elStyle.marginRight); 1028 el.dataset[stage+'Width'] = el.offsetWidth; 1029 el.dataset[stage+'Height'] = el.offsetHeight; 1030 } 1031 }, 1032 1033 /** 1034 * Get Original Mix Data 1035 * @since 2.0.0 1036 */ 1037 1038 _getOrigMixData: function(){ 1039 var self = this, 1040 parentStyle = !self._suckMode ? window.getComputedStyle(self._$parent[0]) : {boxSizing: ''}, 1041 parentBS = parentStyle.boxSizing || parentStyle[self._vendor+'BoxSizing']; 1042 1043 self._incPadding = (parentBS === 'border-box'); 1044 1045 self._execAction('_getOrigMixData', 0); 1046 1047 !self._suckMode && (self.effects = self._parseEffects()); 1048 1049 self._$toHide = self._$hide.filter(':visible'); 1050 self._$toShow = self._$show.filter(':hidden'); 1051 self._$pre = self._$targets.filter(':visible'); 1052 1053 self._startHeight = self._incPadding ? 1054 self._$parent.outerHeight() : 1055 self._$parent.height(); 1056 1057 for(var i = 0; i < self._$pre.length; i++){ 1058 var el = self._$pre[i]; 1059 1060 self._getTargetData(el, 'orig'); 1061 } 1062 1063 self._execAction('_getOrigMixData', 1); 1064 }, 1065 1066 /** 1067 * Set Intermediate Positions 1068 * @since 2.0.0 1069 */ 1070 1071 _setInter: function(){ 1072 var self = this; 1073 1074 self._execAction('_setInter', 0); 1075 1076 if(self._changingLayout && self.animation.animateChangeLayout){
1077 self._$toShow.css('display',self._newDisplay); 1078 1079 if(self._changingClass){ 1080 self._$container 1081 .removeClass(self.layout.containerClass) 1082 .addClass(self._newClass); 1083 } 1084 } else { 1085 self._$toShow.css('display', self.layout.display); 1086 } 1087 1088 self._execAction('_setInter', 1); 1089 }, 1090 1091 /** 1092 * Get Intermediate Mix Data 1093 * @since 2.0.0 1094 */ 1095 1096 _getInterMixData: function(){ 1097 var self = this; 1098 1099 self._execAction('_getInterMixData', 0); 1100 1101 for(var i = 0; i < self._$toShow.length; i++){ 1102 var el = self._$toShow[i]; 1103 1104 self._getTargetData(el, 'inter'); 1105 } 1106 1107 for(var i = 0; i < self._$pre.length; i++){ 1108 var el = self._$pre[i]; 1109 1110 self._getTargetData(el, 'inter'); 1111 } 1112 1113 self._execAction('_getInterMixData', 1); 1114 }, 1115 1116 /** 1117 * Set Final Positions 1118 * @since 2.0.0 1119 */ 1120 1121 _setFinal: function(){ 1122 var self = this; 1123 1124 self._execAction('_setFinal', 0); 1125 1126 self._sorting && self._printSort(); 1127 1128 self._$toHide.removeStyle('display'); 1129 1130 if(self._changingLayout && self.animation.animateChangeLayout){
1131 self._$pre.css('display',self._newDisplay); 1132 } 1133 1134 self._execAction('_setFinal', 1); 1135 }, 1136 1137 /** 1138 * Get Final Mix Data 1139 * @since 2.0.0 1140 */ 1141 1142 _getFinalMixData: function(){ 1143 var self = this; 1144 1145 self._execAction('_getFinalMixData', 0); 1146 1147 for(var i = 0; i < self._$toShow.length; i++){ 1148 var el = self._$toShow[i]; 1149 1150 self._getTargetData(el, 'final'); 1151 } 1152 1153 for(var i = 0; i < self._$pre.length; i++){ 1154 var el = self._$pre[i]; 1155 1156 self._getTargetData(el, 'final'); 1157 } 1158 1159 self._newHeight = self._incPadding ? 1160 self._$parent.outerHeight() : 1161 self._$parent.height(); 1162 1163 self._sorting && self._printSort(true); 1164 1165 self._$toShow.removeStyle('display'); 1166 1167 self._$pre.css('display',self.layout.display); 1168 1169 if(self._changingClass && self.animation.animateChangeLayout){ 1170 self._$container 1171 .removeClass(self._newClass) 1172 .addClass(self.layout.containerClass); 1173 } 1174 1175 self._execAction('_getFinalMixData', 1); 1176 }, 1177 1178 /** 1179 * Prepare Targets 1180 * @since 2.0.0 1181 */ 1182 1183 _prepTargets: function(){ 1184 var self = this, 1185 transformCSS = { 1186 _in: self._getPrefixedCSS('transform', self.effects.transformIn), 1187 _out: self._getPrefixedCSS('transform', self.effects.transformOut) 1188 }; 1189 1190 self._execAction('_prepTargets', 0); 1191 1192 if(self.animation.animateResizeContainer){ 1193 self._$parent.css('height',self._startHeight+'px'); 1194 } 1195 1196 for(var i = 0; i < self._$toShow.length; i++){ 1197 var el = self._$toShow[i], 1198 $el = $(el); 1199 1200 el.style.opacity = self.effects.opacity; 1201 el.style.display = (self._changingLayout && self.animation.animateChangeLayout) ? 1202 self._newDisplay : 1203 self.layout.display; 1204 1205 $el.css(transformCSS._in); 1206 1207 if(self.animation.animateResizeTargets){ 1208 el.style.width = el.dataset.finalWidth+'px'; 1209 el.style.height = el.dataset.finalHeight+'px'; 1210 el.style.marginRight = -(el.dataset.finalWidth - el.dataset.interWidth) + (el.dataset.finalMarginRight * 1)+'px'; 1211 el.style.marginBottom = -(el.dataset.finalHeight - el.dataset.interHeight) + (el.dataset.finalMarginBottom * 1)+'px'; 1212 } 1213 } 1214 1215 for(var i = 0; i < self._$pre.length; i++){ 1216 var el = self._$pre[i], 1217 $el = $(el), 1218 translate = { 1219 x: el.dataset.origPosX - el.dataset.interPosX, 1220 y: el.dataset.origPosY - el.dataset.interPosY 1221 }, 1222 transformCSS = self._getPrefixedCSS('transform','translate('+translate.x+'px,'+translate.y+'px)'); 1223 1224 $el.css(transformCSS); 1225 1226 if(self.animation.animateResizeTargets){ 1227 el.style.width = el.dataset.origWidth+'px'; 1228 el.style.height = el.dataset.origHeight+'px'; 1229 1230 if(el.dataset.origWidth - el.dataset.finalWidth){ 1231 el.style.marginRight = -(el.dataset.origWidth - el.dataset.interWidth) + (el.dataset.origMarginRight * 1)+'px'; 1232 } 1233 1234 if(el.dataset.origHeight - el.dataset.finalHeight){ 1235 el.style.marginBottom = -(el.dataset.origHeight - el.dataset.interHeight) + (el.dataset.origMarginBottom * 1) +'px'; 1236 } 1237 } 1238 } 1239 1240 self._execAction('_prepTargets', 1); 1241 }, 1242 1243 /** 1244 * Animate Targets 1245 * @since 2.0.0 1246 */ 1247 1248 _animateTargets: function(){ 1249 var self = this; 1250 1251 self._execAction('_animateTargets', 0); 1252 1253 self._targetsDone = 0; 1254 self._targetsBound = 0; 1255 1256 self._$parent 1257 .css(self._getPrefixedCSS('perspective', self.animation.perspectiveDistance+'px')) 1258 .css(self._getPrefixedCSS('perspective-origin', self.animation.perspectiveOrigin)); 1259 1260 if(self.animation.animateResizeContainer){ 1261 self._$parent 1262 .css(self._getPrefixedCSS('transition','height '+self.animation.duration+'ms ease')) 1263 .css('height',self._newHeight+'px'); 1264 } 1265 1266 for(var i = 0; i < self._$toShow.length; i++){ 1267 var el = self._$toShow[i], 1268 $el = $(el), 1269 translate = { 1270 x: el.dataset.finalPosX - el.dataset.interPosX, 1271 y: el.dataset.finalPosY - el.dataset.interPosY 1272 },
1273 delay = self._getDelay(i), 1274 toShowCSS = {}; 1275 1276 el.style.opacity = ''; 1277 1278 for(var j = 0; j < 2; j++){ 1279 var a = j === 0 ? a = self._prefix : ''; 1280 1281 if(self._ff && self._ff <= 20){ 1282 toShowCSS[a+'transition-property'] = 'all'; 1283 toShowCSS[a+'transition-timing-function'] = self.animation.easing+'ms'; 1284 toShowCSS[a+'transition-duration'] = self.animation.duration+'ms'; 1285 } 1286 1287 toShowCSS[a+'transition-delay'] = delay+'ms'; 1288 toShowCSS[a+'transform'] = 'translate('+translate.x+'px,'+translate.y+'px)'; 1289 } 1290 1291 if(self.effects.transform || self.effects.opacity){ 1292 self._bindTargetDone($el); 1293 } 1294 1295 (self._ff && self._ff <= 20) ? 1296 $el.css(toShowCSS) : 1297 $el.css(self.effects.transition).css(toShowCSS); 1298 } 1299 1300 for(var i = 0; i < self._$pre.length; i++){ 1301 var el = self._$pre[i], 1302 $el = $(el), 1303 translate = { 1304 x: el.dataset.finalPosX - el.dataset.interPosX, 1305 y: el.dataset.finalPosY - el.dataset.interPosY 1306 }, 1307 delay = self._getDelay(i); 1308 1309 if(!( 1310 el.dataset.finalPosX === el.dataset.origPosX && 1311 el.dataset.finalPosY === el.dataset.origPosY 1312 )){ 1313 self._bindTargetDone($el); 1314 } 1315 1316 $el.css(self._getPrefixedCSS('transition', 'all '+self.animation.duration+'ms '+self.animation.easing+' '+delay+'ms')); 1317 $el.css(self._getPrefixedCSS('transform', 'translate('+translate.x+'px,'+translate.y+'px)')); 1318 1319 if(self.animation.animateResizeTargets){ 1320 if(el.dataset.origWidth - el.dataset.finalWidth && el.dataset.finalWidth * 1){ 1321 el.style.width = el.dataset.finalWidth+'px'; 1322 el.style.marginRight = -(el.dataset.finalWidth - el.dataset.interWidth)+(el.dataset.finalMarginRight * 1)+'px'; 1323 } 1324 1325 if(el.dataset.origHeight - el.dataset.finalHeight && el.dataset.finalHeight * 1){ 1326 el.style.height = el.dataset.finalHeight+'px'; 1327 el.style.marginBottom = -(el.dataset.finalHeight - el.dataset.interHeight)+(el.dataset.finalMarginBottom * 1) +'px'; 1328 } 1329 } 1330 } 1331 1332 if(self._changingClass){ 1333 self._$container 1334 .removeClass(self.layout.containerClass) 1335 .addClass(self._newClass); 1336 } 1337 1338 for(var i = 0; i < self._$toHide.length; i++){ 1339 var el = self._$toHide[i], 1340 $el = $(el),
1341 delay = self._getDelay(i), 1342 toHideCSS = {}; 1343 1344 for(var j = 0; j<2; j++){ 1345 var a = j === 0 ? a = self._prefix : ''; 1346 1347 toHideCSS[a+'transition-delay'] = delay+'ms'; 1348 toHideCSS[a+'transform'] = self.effects.transformOut; 1349 toHideCSS.opacity = self.effects.opacity; 1350 } 1351 1352 $el.css(self.effects.transition).css(toHideCSS); 1353 1354 if(self.effects.transform || self.effects.opacity){ 1355 self._bindTargetDone($el); 1356 }; 1357 } 1358 1359 self._execAction('_animateTargets', 1); 1360 1361 }, 1362 1363 /** 1364 * Bind Targets TransitionEnd 1365 * @since 2.0.0 1366 * @param {object} $el 1367 */ 1368 1369 _bindTargetDone: function($el){ 1370 var self = this, 1371 el = $el[0]; 1372 1373 self._execAction('_bindTargetDone', 0, arguments); 1374 1375 if(!el.dataset.bound){ 1376 1377 el.dataset.bound = true; 1378 self._targetsBound++; 1379 1380 $el.on('webkitTransitionEnd.mixItUp transitionend.mixItUp',function(e){ 1381 if( 1382 (e.originalEvent.propertyName.indexOf('transform') > -1 || 1383 e.originalEvent.propertyName.indexOf('opacity') > -1) && 1384 $(e.originalEvent.target).is(self.selectors.target) 1385 ){ 1386 $el.off('.mixItUp'); 1387 el.dataset.bound = ''; 1388 self._targetDone(); 1389 } 1390 }); 1391 } 1392 1393 self._execAction('_bindTargetDone', 1, arguments); 1394 }, 1395 1396 /** 1397 * Target Done 1398 * @since 2.0.0 1399 */ 1400 1401 _targetDone: function(){ 1402 var self = this; 1403 1404 self._execAction('_targetDone', 0); 1405 1406 self._targetsDone++; 1407 1408 (self._targetsDone === self._targetsBound) && self._cleanUp(); 1409 1410 self._execAction('_targetDone', 1); 1411 }, 1412 1413 /** 1414 * Clean Up 1415 * @since 2.0.0 1416 */ 1417 1418 _cleanUp: function(){ 1419 var self = this, 1420 targetStyles = self.animation.animateResizeTargets ? 1421 'transform opacity width height margin-bottom margin-right' : 1422 'transform opacity', 1423 unBrake = function(){ 1424 self._$targets.removeStyle('transition', self._prefix); 1425 }; 1426 1427 self._execAction('_cleanUp', 0); 1428 1429 !self._changingLayout ?
1430 self._$show.css('display',self.layout.display) : 1431 self._$show.css('display',self._newDisplay); 1432 1433 self._$targets.css(self._brake); 1434 1435 self._$targets 1436 .removeStyle(targetStyles, self._prefix) 1437 .removeAttr('data-inter-pos-x data-inter-pos-y data-final-pos-x data-final-pos-y data-orig-pos-x data-orig-pos-y data-orig-height data-orig-width data-final-height data-final-width data-inter-width data-inter-height data-orig-margin-right data-orig-margin-bottom data-inter-margin-right data-inter-margin-bottom data-final-margin-right data-final-margin-bottom'); 1438 1439 self._$hide.removeStyle('display'); 1440 1441 self._$parent.removeStyle('height transition perspective-distance perspective perspective-origin-x perspective-origin-y perspective-origin perspectiveOrigin', self._prefix); 1442 1443 if(self._sorting){ 1444 self._printSort(); 1445 self._activeSort = self._newSortString; 1446 self._sorting = false; 1447 } 1448 1449 if(self._changingLayout){ 1450 if(self._changingDisplay){ 1451 self.layout.display = self._newDisplay; 1452 self._changingDisplay = false; 1453 } 1454 1455 if(self._changingClass){ 1456 self._$parent.removeClass(self.layout.containerClass).addClass(self._newClass); 1457 self.layout.containerClass = self._newClass; 1458 self._changingClass = false; 1459 } 1460 1461 self._changingLayout = false; 1462 } 1463 1464 self._refresh(); 1465 1466 self._buildState(); 1467 1468 if(self._state.fail){ 1469 self._$container.addClass(self.layout.containerClassFail); 1470 } 1471 1472 self._$show = $(); 1473 self._$hide = $(); 1474 1475 if(window.requestAnimationFrame){ 1476 requestAnimationFrame(unBrake); 1477 } 1478 1479 self._mixing = false; 1480 1481 if(typeof self.callbacks._user === 'function'){ 1482 self.callbacks._user.call(self._domNode, self._state, self); 1483 } 1484 1485 if(typeof self.callbacks.onMixEnd === 'function'){ 1486 self.callbacks.onMixEnd.call(self._domNode, self._state, self); 1487 } 1488 1489 self._$container.trigger('mixEnd', [self._state, self]); 1490 1491 if(self._state.fail){ 1492 (typeof self.callbacks.onMixFail === 'function') && self.callbacks.onMixFail.call(self._domNode, self._state, self); 1493 self._$container.trigger('mixFail', [self._state, self]); 1494 } 1495 1496 if(self._loading){ 1497 (typeof self.callbacks.onMixLoad === 'function') && self.callbacks.onMixLoad.call(self._domNode, self._state, self); 1498 self._$container.trigger('mixLoad', [self._state, self]); 1499 } 1500 1501 if(self._queue.length){ 1502 self._execAction('_queue', 0); 1503 1504 self.multiMix(self._queue[0][0],self._queue[0][1],self._queue[0][2]); 1505 self._queue.splice(0, 1); 1506 } 1507 1508 self._execAction('_cleanUp', 1); 1509 1510 self._loading = false; 1511 }, 1512 1513 /** 1514 * Get Prefixed CSS 1515 * @since 2.0.0 1516 * @param {string} property 1517 * @param {string} value 1518 * @param {boolean} prefixValue 1519 * @return {object} styles 1520 */ 1521 1522 _getPrefixedCSS: function(property, value, prefixValue){ 1523 var self = this, 1524 styles = {}, 1525 prefix = '', 1526 i = -1; 1527 1528 for(i = 0; i < 2; i++){ 1529 prefix = i === 0 ? self._prefix : ''; 1530 prefixValue ? styles[prefix+property] = prefix+value : styles[prefix+property] = value; 1531 } 1532 1533 return self._execFilter('_getPrefixedCSS', styles, arguments); 1534 }, 1535 1536 /** 1537 * Get Delay 1538 * @since 2.0.0 1539 * @param {number} i 1540 * @return {number} delay 1541 */ 1542 1543 _getDelay: function(i){ 1544 var self = this, 1545 n = typeof self.animation.staggerSequence === 'function' ? self.animation.staggerSequence.call(self._domNode, i, self._state) : i, 1546 delay = self.animation.stagger ? n * self.animation.staggerDuration : 0; 1547 1548 return self._execFilter('_getDelay', delay, arguments); 1549 }, 1550 1551 /** 1552 * Parse MultiMix Arguments 1553 * @since 2.0.0 1554 * @param {array} args 1555 * @return {object} output 1556 */ 1557 1558 _parseMultiMixArgs: function(args){ 1559 var self = this, 1560 output = { 1561 command: null, 1562 animate: self.animation.enable, 1563 callback: null 1564 }; 1565 1566 for(var i = 0; i < args.length; i++){ 1567 var arg = args[i]; 1568 1569 if(arg !== null){ 1570 if(typeof arg === 'object' || typeof arg === 'string'){ 1571 output.command = arg; 1572 } else if(typeof arg === 'boolean'){ 1573 output.animate = arg; 1574 } else if(typeof arg === 'function'){ 1575 output.callback = arg; 1576 } 1577 } 1578 } 1579 1580 return self._execFilter('_parseMultiMixArgs', output, arguments); 1581 }, 1582 1583 /** 1584 * Parse Insert Arguments 1585 * @since 2.0.0 1586 * @param {array} args 1587 * @return {object} output 1588 */ 1589 1590 _parseInsertArgs: function(args){ 1591 var self = this, 1592 output = { 1593 index: 0, 1594 $object: $(), 1595 multiMix: {filter: self._state.activeFilter}, 1596 callback: null 1597 }; 1598 1599 for(var i = 0; i < args.length; i++){ 1600 var arg = args[i]; 1601 1602 if(typeof arg === 'number'){ 1603 output.index = arg; 1604 } else if(typeof arg === 'object' && arg instanceof $){ 1605 output.$object = arg; 1606 } else if(typeof arg === 'object' && self._helpers._isElement(arg)){ 1607 output.$object = $(arg); 1608 } else if(typeof arg === 'object' && arg !== null){ 1609 output.multiMix = arg;
1610 } else if(typeof arg === 'boolean' && !arg){ 1611 output.multiMix = false; 1612 } else if(typeof arg === 'function'){ 1613 output.callback = arg; 1614 } 1615 } 1616 1617 return self._execFilter('_parseInsertArgs', output, arguments); 1618 }, 1619 1620 /** 1621 * Execute Action 1622 * @since 2.0.0 1623 * @param {string} methodName 1624 * @param {boolean} isPost 1625 * @param {array} args 1626 */ 1627 1628 _execAction: function(methodName, isPost, args){ 1629 var self = this, 1630 context = isPost ? 'post' : 'pre'; 1631 1632 if(!self._actions.isEmptyObject && self._actions.hasOwnProperty(methodName)){ 1633 for(var key in self._actions[methodName][context]){ 1634 self._actions[methodName][context][key].call(self, args); 1635 } 1636 } 1637 }, 1638 1639 /** 1640 * Execute Filter 1641 * @since 2.0.0 1642 * @param {string} methodName 1643 * @param {mixed} value 1644 * @return {mixed} value 1645 */ 1646 1647 _execFilter: function(methodName, value, args){ 1648 var self = this; 1649 1650 if(!self._filters.isEmptyObject && self._filters.hasOwnProperty(methodName)){ 1651 for(var key in self._filters[methodName]){ 1652 return self._filters[methodName][key].call(self, args); 1653 } 1654 } else { 1655 return value; 1656 } 1657 }, 1658 1659 /* Helpers 1660 ---------------------------------------------------------------------- */ 1661 1662 _helpers: { 1663 1664 /** 1665 * CamelCase 1666 * @since 2.0.0 1667 * @param {string} 1668 * @return {string} 1669 */ 1670 1671 _camelCase: function(string){ 1672 return string.replace(/-([a-z])/g, function(g){ 1673 return g[1].toUpperCase(); 1674 }); 1675 }, 1676 1677 /** 1678 * Is Element 1679 * @since 2.1.3 1680 * @param {object} element to test 1681 * @return {boolean} 1682 */ 1683 1684 _isElement: function(el){ 1685 if(window.HTMLElement){ 1686 return el instanceof HTMLElement; 1687 } else { 1688 return ( 1689 el !== null && 1690 el.nodeType === 1 && 1691 el.nodeName === 'string' 1692 ); 1693 } 1694 } 1695 }, 1696 1697 /* Public Methods 1698 ---------------------------------------------------------------------- */ 1699 1700 /** 1701 * Is Mixing 1702 * @since 2.0.0 1703 * @return {boolean} 1704 */ 1705 1706 isMixing: function(){ 1707 var self = this; 1708 1709 return self._execFilter('isMixing', self._mixing); 1710 }, 1711 1712 /** 1713 * Filter (public) 1714 * @since 2.0.0 1715 * @param {array} arguments 1716 */ 1717 1718 filter: function(){ 1719 var self = this, 1720 args = self._parseMultiMixArgs(arguments); 1721 1722 self._clicking && (self._toggleString = ''); 1723 1724 self.multiMix({filter: args.command}, args.animate, args.callback); 1725 }, 1726 1727 /** 1728 * Sort (public) 1729 * @since 2.0.0 1730 * @param {array} arguments 1731 */ 1732 1733 sort: function(){ 1734 var self = this, 1735 args = self._parseMultiMixArgs(arguments); 1736 1737 self.multiMix({sort: args.command}, args.animate, args.callback); 1738 }, 1739 1740 /** 1741 * Change Layout (public) 1742 * @since 2.0.0 1743 * @param {array} arguments 1744 */ 1745 1746 changeLayout: function(){ 1747 var self = this, 1748 args = self._parseMultiMixArgs(arguments); 1749 1750 self.multiMix({changeLayout: args.command}, args.animate, args.callback); 1751 }, 1752 1753 /** 1754 * MultiMix 1755 * @since 2.0.0 1756 * @param {array} arguments 1757 */ 1758 1759 multiMix: function(){ 1760 var self = this, 1761 args = self._parseMultiMixArgs(arguments); 1762 1763 self._execAction('multiMix', 0, arguments); 1764 1765 if(!self._mixing){ 1766 if(self.controls.enable && !self._clicking){ 1767 self.controls.toggleFilterButtons && self._buildToggleArray(); 1768 self._updateControls(args.command, self.controls.toggleFilterButtons); 1769 } 1770 1771 (self._queue.length < 2) && (self._clicking = false); 1772 1773 delete self.callbacks._user; 1774 if(args.callback) self.callbacks._user = args.callback; 1775 1776 var sort = args.command.sort, 1777 filter = args.command.filter, 1778 changeLayout = args.command.changeLayout; 1779 1780 self._refresh(); 1781 1782 if(sort){ 1783 self._newSort = self._parseSort(sort); 1784 self._newSortString = sort; 1785 1786 self._sorting = true; 1787 self._sort(); 1788 } 1789 1790 if(filter !== undf){ 1791 filter = (filter === 'all') ? self.selectors.target : filter; 1792 1793 self._activeFilter = filter; 1794 } 1795 1796 self._filter(); 1797 1798 if(changeLayout){ 1799 self._newDisplay = (typeof changeLayout === 'string') ? changeLayout : changeLayout.display || self.layout.display; 1800 self._newClass = changeLayout.containerClass || ''; 1801 1802 if( 1803 self._newDisplay !== self.layout.display || 1804 self._newClass !== self.layout.containerClass 1805 ){ 1806 self._changingLayout = true; 1807 1808 self._changingClass = (self._newClass !== self.layout.containerClass); 1809 self._changingDisplay = (self._newDisplay !== self.layout.display); 1810 } 1811 } 1812 1813 self._$targets.css(self._brake); 1814 1815 self._goMix(args.animate ^ self.animation.enable ? args.animate : self.animation.enable); 1816 1817 self._execAction('multiMix', 1, arguments); 1818 1819 } else { 1820 if(self.animation.queue && self._queue.length < self.animation.queueLimit){ 1821 self._queue.push(arguments); 1822 1823 (self.controls.enable && !self._clicking) && self._updateControls(args.command); 1824 1825 self._execAction('multiMixQueue', 1, arguments); 1826 1827 } else { 1828 if(typeof self.callbacks.onMixBusy === 'function'){ 1829 self.callbacks.onMixBusy.call(self._domNode, self._state, self); 1830 } 1831 self._$container.trigger('mixBusy', [self._state, self]); 1832 1833 self._execAction('multiMixBusy', 1, arguments); 1834 } 1835 } 1836 }, 1837 1838 /** 1839 * Insert 1840 * @since 2.0.0 1841 * @param {array} arguments 1842 */ 1843 1844 insert: function(){ 1845 var self = this, 1846 args = self._parseInsertArgs(arguments), 1847 callback = (typeof args.callback === 'function') ? args.callback : null, 1848 frag = document.createDocumentFragment(), 1849 target = (function(){ 1850 self._refresh(); 1851 1852 if(self._$targets.length){ 1853 return (args.index < self._$targets.length || !self._$targets.length) ? 1854 self._$targets[args.index] : 1855 self._$targets[self._$targets.length-1].nextElementSibling; 1856 } else { 1857 return self._$parent[0].children[0]; 1858 } 1859 })(); 1860 1861 self._execAction('insert', 0, arguments); 1862 1863 if(args.$object){ 1864 for(var i = 0; i < args.$object.length; i++){ 1865 var el = args.$object[i]; 1866 1867 frag.appendChild(el); 1868 frag.appendChild(document.createTextNode(' ')); 1869 } 1870 1871 self._$parent[0].insertBefore(frag, target); 1872 } 1873 1874 self._execAction('insert', 1, arguments); 1875 1876 if(typeof args.multiMix === 'object'){
1877 self.multiMix(args.multiMix, callback); 1878 } 1879 }, 1880 1881 /** 1882 * Prepend 1883 * @since 2.0.0 1884 * @param {array} arguments 1885 */ 1886 1887 prepend: function(){ 1888 var self = this, 1889 args = self._parseInsertArgs(arguments); 1890 1891 self.insert(0, args.$object, args.multiMix, args.callback); 1892 }, 1893 1894 /** 1895 * Append 1896 * @since 2.0.0 1897 * @param {array} arguments 1898 */ 1899 1900 append: function(){ 1901 var self = this, 1902 args = self._parseInsertArgs(arguments); 1903 1904 self.insert(self._state.totalTargets, args.$object, args.multiMix, args.callback); 1905 }, 1906 1907 /** 1908 * Get Option 1909 * @since 2.0.0 1910 * @param {string} string 1911 * @return {mixed} value 1912 */ 1913 1914 getOption: function(string){ 1915 var self = this, 1916 getProperty = function(obj, prop){ 1917 var parts = prop.split('.'), 1918 last = parts.pop(), 1919 l = parts.length, 1920 i = 1, 1921 current = parts[0] || prop; 1922 1923 while((obj = obj[current]) && i < l){ 1924 current = parts[i]; 1925 i++; 1926 } 1927 1928 if(obj !== undf){ 1929 return obj[last] !== undf ? obj[last] : obj; 1930 } 1931 }; 1932 1933 return string ? self._execFilter('getOption', getProperty(self, string), arguments) : self; 1934 }, 1935 1936 /** 1937 * Set Options 1938 * @since 2.0.0 1939 * @param {object} config 1940 */ 1941 1942 setOptions: function(config){ 1943 var self = this; 1944 1945 self._execAction('setOptions', 0, arguments); 1946 1947 typeof config === 'object' && $.extend(true, self, config); 1948 1949 self._execAction('setOptions', 1, arguments); 1950 }, 1951 1952 /** 1953 * Get State 1954 * @since 2.0.0 1955 * @return {object} state 1956 */ 1957 1958 getState: function(){ 1959 var self = this; 1960 1961 return self._execFilter('getState', self._state, self); 1962 }, 1963 1964 /** 1965 * Force Refresh 1966 * @since 2.1.2 1967 */ 1968 1969 forceRefresh: function(){ 1970 var self = this; 1971 1972 self._refresh(false, true); 1973 }, 1974 1975 /** 1976 * Destroy 1977 * @since 2.0.0 1978 * @param {boolean} hideAll 1979 */ 1980 1981 destroy: function(hideAll){ 1982 var self = this, 1983 filters = $.MixItUp.prototype._bound._filter, 1984 sorts = $.MixItUp.prototype._bound._sort; 1985 1986 self._execAction('destroy', 0, arguments); 1987 1988 self._$body 1989 .add($(self.selectors.sort)) 1990 .add($(self.selectors.filter)) 1991 .off('.mixItUp'); 1992 1993 for(var i = 0; i < self._$targets.length; i++){ 1994 var target = self._$targets[i]; 1995 1996 hideAll && (target.style.display = ''); 1997 1998 delete target.mixParent; 1999 } 2000 2001 self._execAction('destroy', 1, arguments); 2002 2003 if(filters[self.selectors.filter] && filters[self.selectors.filter] > 1) { 2004 filters[self.selectors.filter]--; 2005 } else if(filters[self.selectors.filter] === 1) { 2006 delete filters[self.selectors.filter]; 2007 } 2008 2009 if(sorts[self.selectors.sort] && sorts[self.selectors.sort] > 1) { 2010 sorts[self.selectors.sort]--; 2011 } else if(sorts[self.selectors.sort] === 1) { 2012 delete sorts[self.selectors.sort]; 2013 } 2014 2015 delete $.MixItUp.prototype._instances[self._id]; 2016 } 2017 2018 }; 2019 2020 /* jQuery Methods 2021 ---------------------------------------------------------------------- */ 2022 2023 /** 2024 * jQuery .mixItUp() method 2025 * @since 2.0.0 2026 * @extends $.fn 2027 */ 2028 2029 $.fn.mixItUp = function(){ 2030 var args = arguments, 2031 dataReturn = [], 2032 eachReturn, 2033 _instantiate = function(domNode, settings){ 2034 var instance = new $.MixItUp(), 2035 rand = function(){ 2036 return ('00000'+(Math.random()*16777216<<0).toString(16)).substr(-6).toUpperCase(); 2037 }; 2038 2039 instance._execAction('_instantiate', 0, arguments); 2040 2041 domNode.id = !domNode.id ? 'MixItUp'+rand() : domNode.id; 2042 2043 if(!instance._instances[domNode.id]){ 2044 instance._instances[domNode.id] = instance; 2045 instance._init(domNode, settings); 2046 } 2047 2048 instance._execAction('_instantiate', 1, arguments); 2049 }; 2050 2051 eachReturn = this.each(function(){ 2052 if(args && typeof args[0] === 'string'){ 2053 var instance = $.MixItUp.prototype._instances[this.id]; 2054 if(args[0] === 'isLoaded'){ 2055 dataReturn.push(instance ? true : false); 2056 } else { 2057 var data = instance[args[0]](args[1], args[2], args[3]); 2058 if(data !== undf)dataReturn.push(data); 2059 } 2060 } else { 2061 _instantiate(this, args[0]); 2062 } 2063 }); 2064 2065 if(dataReturn.length){ 2066 return dataReturn.length > 1 ? dataReturn : dataReturn[0]; 2067 } else { 2068 return eachReturn; 2069 } 2070 }; 2071 2072 /** 2073 * jQuery .removeStyle() method 2074 * @since 2.0.0 2075 * @extends $.fn 2076 */ 2077 2078 $.fn.removeStyle = function(style, prefix){ 2079 prefix = prefix ? prefix : ''; 2080 2081 return this.each(function(){ 2082 var el = this, 2083 styles = style.split(' '); 2084 2085 for(var i = 0; i < styles.length; i++){ 2086 for(var j = 0; j < 4; j++){ 2087 switch (j) { 2088 case 0: 2089 var prop = styles[i]; 2090 break; 2091 case 1: 2092 var prop = $.MixItUp.prototype._helpers._camelCase(prop); 2093 break; 2094 case 2: 2095 var prop = prefix+styles[i]; 2096 break; 2097 case 3: 2098 var prop = $.MixItUp.prototype._helpers._camelCase(prefix+styles[i]); 2099 } 2100 2101 if( 2102 el.style[prop] !== undf && 2103 typeof el.style[prop] !== 'unknown' && 2104 el.style[prop].length > 0 2105 ){ 2106 el.style[prop] = ''; 2107 } 2108 2109 if(!prefix && j === 1)break; 2110 } 2111 } 2112 2113 if(el.attributes && el.attributes.style && el.attributes.style !== undf && el.attributes.style.value === ''){ 2114 el.attributes.removeNamedItem('style'); 2115 } 2116 }); 2117 }; 2118 2119})(jQuery); 2120/* END MIXITUP */
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.