1/*scrollmagic */ 2!function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.ScrollMagic=t()}(this,function(){"use strict";var e=function(){};e.version="2.0.5",window.addEventListener("mousewheel",function(){});var t="data-scrollmagic-pin-spacer";e.Controller=function(r){var o,s,a="ScrollMagic.Controller",l="FORWARD",c="REVERSE",u="PAUSED",f=n.defaults,d=this,h=i.extend({},f,r),g=[],p=!1,v=0,m=u,w=!0,y=0,S=!0,b=function(){for(var e in h)f.hasOwnProperty(e)||delete h[e];if(h.container=i.get.elements(h.container)[0],!h.container)throw a+" init failed.";w=h.container===window||h.container===document.body||!document.body.contains(h.container),w&&(h.container=window),y=z(),h.container.addEventListener("resize",T),h.container.addEventListener("scroll",T),h.refreshInterval=parseInt(h.refreshInterval)||f.refreshInterval,E()},E=function(){h.refreshInterval>0&&(s=window.setTimeout(A,h.refreshInterval))},x=function(){return h.vertical?i.get.scrollTop(h.container):i.get.scrollLeft(h.container)},z=function(){return h.vertical?i.get.height(h.container):i.get.width(h.container)},C=this._setScrollPos=function(e){h.vertical?w?window.scrollTo(i.get.scrollLeft(),e):h.container.scrollTop=e:w?window.scrollTo(e,i.get.scrollTop()):h.container.scrollLeft=e},F=function(){if(S&&p){var e=i.type.Array(p)?p:g.slice(0);p=!1;var t=v;v=d.scrollPos();var n=v-t;0!==n&&(m=n>0?l:c),m===c&&e.reverse(),e.forEach(function(e){e.update(!0)})}},L=function(){o=i.rAF(F)},T=function(e){"resize"==e.type&&(y=z(),m=u),p!==!0&&(p=!0,L())},A=function(){if(!w&&y!=z()){var e;try{e=new Event("resize",{bubbles:!1,cancelable:!1})}catch(t){e=document.createEvent("Event"),e.initEvent("resize",!1,!1)}h.container.dispatchEvent(e)}g.forEach(function(e){e.refresh()}),E()};this._options=h;var O=function(e){if(e.length<=1)return e;var t=e.slice(0);return t.sort(function(e,t){return e.scrollOffset()>t.scrollOffset()?1:-1}),t};return this.addScene=function(t){if(i.type.Array(t))t.forEach(function(e){d.addScene(e)});else if(t instanceof e.Scene)if(t.controller()!==d)t.addTo(d);else if(g.indexOf(t)<0){g.push(t),g=O(g),t.on("shift.controller_sort",function(){g=O(g)});for(var n in h.globalSceneOptions)t[n]&&t[n].call(t,h.globalSceneOptions[n])}return d},this.removeScene=function(e){if(i.type.Array(e))e.forEach(function(e){d.removeScene(e)});else{var t=g.indexOf(e);t>-1&&(e.off("shift.controller_sort"),g.splice(t,1),e.remove())}return d},this.updateScene=function(t,n){return i.type.Array(t)?t.forEach(function(e){d.updateScene(e,n)}):n?t.update(!0):p!==!0&&t instanceof e.Scene&&(p=p||[],-1==p.indexOf(t)&&p.push(t),p=O(p),L()),d},this.update=function(e){return T({type:"resize"}),e&&F(),d},this.scrollTo=function(n,r){if(i.type.Number(n))C.call(h.container,n,r);else if(n instanceof e.Scene)n.controller()===d&&d.scrollTo(n.scrollOffset(),r);else if(i.type.Function(n))C=n;else{var o=i.get.elements(n)[0];if(o){for(;o.parentNode.hasAttribute(t);)o=o.parentNode;var s=h.vertical?"top":"left",a=i.get.offset(h.container),l=i.get.offset(o);w||(a[s]-=d.scrollPos()),d.scrollTo(l[s]-a[s],r)}}return d},this.scrollPos=function(e){return arguments.length?(i.type.Function(e)&&(x=e),d):x.call(d)},this.info=function(e){var t={size:y,vertical:h.vertical,scrollPos:v,scrollDirection:m,container:h.container,isDocument:w};return arguments.length?void 0!==t[e]?t[e]:void 0:t},this.loglevel=function(){return d},this.enabled=function(e){return arguments.length?(S!=e&&(S=!!e,d.updateScene(g,!0)),d):S},this.destroy=function(e){window.clearTimeout(s);for(var t=g.length;t--;)g[t].destroy(e);return h.container.removeEventListener("resize",T),h.container.removeEventListener("scroll",T),i.cAF(o),null},b(),d};var n={defaults:{container:window,vertical:!0,globalSceneOptions:{},loglevel:2,refreshInterval:100}};e.Controller.addOption=function(e,t){n.defaults[e]=t},e.Controller.extend=function(t){var n=this;e.Controller=function(){return n.apply(this,arguments),this.$super=i.extend({},this),t.apply(this,arguments)||this},i.extend(e.Controller,n),e.Controller.prototype=n.prototype,e.Controller.prototype.constructor=e.Controller},e.Scene=function(n){var o,s,a="BEFORE",l="DURING",c="AFTER",u=r.defaults,f=this,d=i.extend({},u,n),h=a,g=0,p={start:0,end:0},v=0,m=!0,w=function(){for(var e in d)u.hasOwnProperty(e)||delete d[e];for(var t in u)L(t);C()},y={};this.on=function(e,t){return i.type.Function(t)&&(e=e.trim().split(" "),e.forEach(function(e){var n=e.split("."),r=n[0],i=n[1];"*"!=r&&(y[r]||(y[r]=[]),y[r].push({namespace:i||"",callback:t}))})),f},this.off=function(e,t){return e?(e=e.trim().split(" "),e.forEach(function(e){var n=e.split("."),r=n[0],i=n[1]||"",o="*"===r?Object.keys(y):[r];o.forEach(function(e){for(var n=y[e]||[],r=n.length;r--;){var o=n[r];!o||i!==o.namespace&&"*"!==i||t&&t!=o.callback||n.splice(r,1)}n.length||delete y[e]})}),f):f},this.trigger=function(t,n){if(t){var r=t.trim().split("."),i=r[0],o=r[1],s=y[i];
2s&&s.forEach(function(t){o&&o!==t.namespace||t.callback.call(f,new e.Event(i,t.namespace,f,n))})}return f},f.on("change.internal",function(e){"loglevel"!==e.what&&"tweenChanges"!==e.what&&("triggerElement"===e.what?E():"reverse"===e.what&&f.update())}).on("shift.internal",function(){S(),f.update()}),this.addTo=function(t){return t instanceof e.Controller&&s!=t&&(s&&s.removeScene(f),s=t,C(),b(!0),E(!0),S(),s.info("container").addEventListener("resize",x),t.addScene(f),f.trigger("add",{controller:s}),f.update()),f},this.enabled=function(e){return arguments.length?(m!=e&&(m=!!e,f.update(!0)),f):m},this.remove=function(){if(s){s.info("container").removeEventListener("resize",x);var e=s;s=void 0,e.removeScene(f),f.trigger("remove")}return f},this.destroy=function(e){return f.trigger("destroy",{reset:e}),f.remove(),f.off("*.*"),null},this.update=function(e){if(s)if(e)if(s.enabled()&&m){var t,n=s.info("scrollPos");t=d.duration>0?(n-p.start)/(p.end-p.start):n>=p.start?1:0,f.trigger("update",{startPos:p.start,endPos:p.end,scrollPos:n}),f.progress(t)}else T&&h===l&&O(!0);else s.updateScene(f,!1);return f},this.refresh=function(){return b(),E(),f},this.progress=function(e){if(arguments.length){var t=!1,n=h,r=s?s.info("scrollDirection"):"PAUSED",i=d.reverse||e>=g;if(0===d.duration?(t=g!=e,g=1>e&&i?0:1,h=0===g?a:l):0>e&&h!==a&&i?(g=0,h=a,t=!0):e>=0&&1>e&&i?(g=e,h=l,t=!0):e>=1&&h!==c?(g=1,h=c,t=!0):h!==l||i||O(),t){var o={progress:g,state:h,scrollDirection:r},u=h!=n,p=function(e){f.trigger(e,o)};u&&n!==l&&(p("enter"),p(n===a?"start":"end")),p("progress"),u&&h!==l&&(p(h===a?"start":"end"),p("leave"))}return f}return g};var S=function(){p={start:v+d.offset},s&&d.triggerElement&&(p.start-=s.info("size")*d.triggerHook),p.end=p.start+d.duration},b=function(e){if(o){var t="duration";F(t,o.call(f))&&!e&&(f.trigger("change",{what:t,newval:d[t]}),f.trigger("shift",{reason:t}))}},E=function(e){var n=0,r=d.triggerElement;if(s&&r){for(var o=s.info(),a=i.get.offset(o.container),l=o.vertical?"top":"left";r.parentNode.hasAttribute(t);)r=r.parentNode;var c=i.get.offset(r);o.isDocument||(a[l]-=s.scrollPos()),n=c[l]-a[l]}var u=n!=v;v=n,u&&!e&&f.trigger("shift",{reason:"triggerElementPosition"})},x=function(){d.triggerHook>0&&f.trigger("shift",{reason:"containerResize"})},z=i.extend(r.validate,{duration:function(e){if(i.type.String(e)&&e.match(/^(\.|\d)*\d+%$/)){var t=parseFloat(e)/100;e=function(){return s?s.info("size")*t:0}}if(i.type.Function(e)){o=e;try{e=parseFloat(o())}catch(n){e=-1}}if(e=parseFloat(e),!i.type.Number(e)||0>e)throw o?(o=void 0,0):0;return e}}),C=function(e){e=arguments.length?[e]:Object.keys(z),e.forEach(function(e){var t;if(z[e])try{t=z[e](d[e])}catch(n){t=u[e]}finally{d[e]=t}})},F=function(e,t){var n=!1,r=d[e];return d[e]!=t&&(d[e]=t,C(e),n=r!=d[e]),n},L=function(e){f[e]||(f[e]=function(t){return arguments.length?("duration"===e&&(o=void 0),F(e,t)&&(f.trigger("change",{what:e,newval:d[e]}),r.shifts.indexOf(e)>-1&&f.trigger("shift",{reason:e})),f):d[e]})};this.controller=function(){return s},this.state=function(){return h},this.scrollOffset=function(){return p.start},this.triggerPosition=function(){var e=d.offset;return s&&(e+=d.triggerElement?v:s.info("size")*f.triggerHook()),e};var T,A;f.on("shift.internal",function(e){var t="duration"===e.reason;(h===c&&t||h===l&&0===d.duration)&&O(),t&&_()}).on("progress.internal",function(){O()}).on("add.internal",function(){_()}).on("destroy.internal",function(e){f.removePin(e.reset)});var O=function(e){if(T&&s){var t=s.info(),n=A.spacer.firstChild;if(e||h!==l){var r={position:A.inFlow?"relative":"absolute",top:0,left:0},o=i.css(n,"position")!=r.position;A.pushFollowers?d.duration>0&&(h===c&&0===parseFloat(i.css(A.spacer,"padding-top"))?o=!0:h===a&&0===parseFloat(i.css(A.spacer,"padding-bottom"))&&(o=!0)):r[t.vertical?"top":"left"]=d.duration*g,i.css(n,r),o&&_()}else{"fixed"!=i.css(n,"position")&&(i.css(n,{position:"fixed"}),_());var u=i.get.offset(A.spacer,!0),f=d.reverse||0===d.duration?t.scrollPos-p.start:Math.round(g*d.duration*10)/10;u[t.vertical?"top":"left"]+=f,i.css(A.spacer.firstChild,{top:u.top,left
2:u.left})}}},_=function(){if(T&&s&&A.inFlow){var e=h===l,t=s.info("vertical"),n=A.spacer.firstChild,r=i.isMarginCollapseType(i.css(A.spacer,"display")),o={};A.relSize.width||A.relSize.autoFullWidth?e?i.css(T,{width:i.get.width(A.spacer)}):i.css(T,{width:"100%"}):(o["min-width"]=i.get.width(t?T:n,!0,!0),o.width=e?o["min-width"]:"auto"),A.relSize.height?e?i.css(T,{height:i.get.height(A.spacer)-(A.pushFollowers?d.duration:0)}):i.css(T,{height:"100%"}):(o["min-height"]=i.get.height(t?n:T,!0,!r),o.height=e?o["min-height"]:"auto"),A.pushFollowers&&(o["padding"+(t?"Top":"Left")]=d.duration*g,o["padding"+(t?"Bottom":"Right")]=d.duration*(1-g)),i.css(A.spacer,o)}},N=function(){s&&T&&h===l&&!s.info("isDocument")&&O()},P=function(){s&&T&&h===l&&((A.relSize.width||A.relSize.autoFullWidth)&&i.get.width(window)!=i.get.width(A.spacer.parentNode)||A.relSize.height&&i.get.height(window)!=i.get.height(A.spacer.parentNode))&&_()},D=function(e){s&&T&&h===l&&!s.info("isDocument")&&(e.preventDefault(),s._setScrollPos(s.info("scrollPos")-((e.wheelDelta||e[s.info("vertical")?"wheelDeltaY":"wheelDeltaX"])/3||30*-e.detail)))};this.setPin=function(e,n){var r={pushFollowers:!0,spacerClass:"scrollmagic-pin-spacer"};if(n=i.extend({},r,n),e=i.get.elements(e)[0],!e)return f;if("fixed"===i.css(e,"position"))return f;if(T){if(T===e)return f;f.removePin()}T=e;var o=T.parentNode.style.display,s=["top","left","bottom","right","margin","marginLeft","marginRight","marginTop","marginBottom"];T.parentNode.style.display="none";var a="absolute"!=i.css(T,"position"),l=i.css(T,s.concat(["display"])),c=i.css(T,["width","height"]);T.parentNode.style.display=o,!a&&n.pushFollowers&&(n.pushFollowers=!1);var u=T.parentNode.insertBefore(document.createElement("div"),T),d=i.extend(l,{position:a?"relative":"absolute",boxSizing:"content-box",mozBoxSizing:"content-box",webkitBoxSizing:"content-box"});if(a||i.extend(d,i.css(T,["width","height"])),i.css(u,d),u.setAttribute(t,""),i.addClass(u,n.spacerClass),A={spacer:u,relSize:{width:"%"===c.width.slice(-1),height:"%"===c.height.slice(-1),autoFullWidth:"auto"===c.width&&a&&i.isMarginCollapseType(l.display)},pushFollowers:n.pushFollowers,inFlow:a},!T.___origStyle){T.___origStyle={};var h=T.style,g=s.concat(["width","height","position","boxSizing","mozBoxSizing","webkitBoxSizing"]);g.forEach(function(e){T.___origStyle[e]=h[e]||""})}return A.relSize.width&&i.css(u,{width:c.width}),A.relSize.height&&i.css(u,{height:c.height}),u.appendChild(T),i.css(T,{position:a?"relative":"absolute",margin:"auto",top:"auto",left:"auto",bottom:"auto",right:"auto"}),(A.relSize.width||A.relSize.autoFullWidth)&&i.css(T,{boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"}),window.addEventListener("scroll",N),window.addEventListener("resize",N),window.addEventListener("resize",P),T.addEventListener("mousewheel",D),T.addEventListener("DOMMouseScroll",D),O(),f},this.removePin=function(e){if(T){if(h===l&&O(!0),e||!s){var n=A.spacer.firstChild;if(n.hasAttribute(t)){var r=A.spacer.style,o=["margin","marginLeft","marginRight","marginTop","marginBottom"];margins={},o.forEach(function(e){margins[e]=r[e]||""}),i.css(n,margins)}A.spacer.parentNode.insertBefore(n,A.spacer),A.spacer.parentNode.removeChild(A.spacer),T.parentNode.hasAttribute(t)||(i.css(T,T.___origStyle),delete T.___origStyle)}window.removeEventListener("scroll",N),window.removeEventListener("resize",N),window.removeEventListener("resize",P),T.removeEventListener("mousewheel",D),T.removeEventListener("DOMMouseScroll",D),T=void 0}return f};var R,k=[];return f.on("destroy.internal",function(e){f.removeClassToggle(e.reset)}),this.setClassToggle=function(e,t){var n=i.get.elements(e);return 0!==n.length&&i.type.String(t)?(k.length>0&&f.removeClassToggle(),R=t,k=n,f.on("enter.internal_class leave.internal_class",function(e){var t="enter"===e.type?i.addClass:i.removeClass;k.forEach(function(e){t(e,R)})}),f):f},this.removeClassToggle=function(e){return e&&k.forEach(function(e){i.removeClass(e,R)}),f.off("start.internal_class end.internal_class"),R=void 0,k=[],f},w(),f};var r={defaults:{duration:0,offset:0,triggerElement:void 0,triggerHook:.5,reverse:!0,loglevel:2},validate:{offset:function(e){if(e=parseFloat(e),!i.type.Number(e))throw 0;return e},triggerElement:function(e){if(e=e||void 0){var t=i.get.elements(e)[0];if(!t)throw 0;e=t}return e},triggerHook:function(e){var t={onCenter:.5,onEnter:1,onLeave:0};if(i.type.Number(e))e=Math.max(0,Math.min(parseFloat(e),1));else{if(!(e in t))throw 0;e=t[e]}return e},reverse:function(e){return!!e}},shifts:["duration","offset","triggerHook"]};e.Scene.addOption=function(e,t,n,i){e in r.defaults||(r.defaults[e]=t,r.validate[e]=n,i&&r.shifts.push(e))},e.Scene.extend=function(t){var n=this;e.Scene=function(){return n.apply(this,arguments),this.$super=i.extend({},this),t.apply(this,arguments)||this},i.extend(e.Scene,n),e.Scene.prototype=n.prototype,e.Scene.prototype.constructor=e.Scene},e.Event=function(e,t,n,r){r=r||{};for(var i in r)this[i]=r[i];return this.type=e,this.target=this.currentTarget=n,this.namespace=t||"",this.timeStamp=this.timestamp=Date.now(),this};var i=e._util=function(e){var t,n={},r=function(e){return parseFloat(e)||0},i=function(t){return t.currentStyle?t.currentStyle:e.getComputedStyle(t)}
2,o=function(t,n,o,s){if(n=n===document?e:n,n===e)s=!1;else if(!f.DomElement(n))return 0;t=t.charAt(0).toUpperCase()+t.substr(1).toLowerCase();var a=(o?n["offset"+t]||n["outer"+t]:n["client"+t]||n["inner"+t])||0;if(o&&s){var l=i(n);a+="Height"===t?r(l.marginTop)+r(l.marginBottom):r(l.marginLeft)+r(l.marginRight)}return a},s=function(e){return e.replace(/^[^a-z]+([a-z])/g,"$1").replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})};n.extend=function(e){for(e=e||{},t=1;t<arguments.length;t++)if(arguments[t])for(var n in arguments[t])arguments[t].hasOwnProperty(n)&&(e[n]=arguments[t][n]);return e},n.isMarginCollapseType=function(e){return["block","flex","list-item","table","-webkit-box"].indexOf(e)>-1};var a=0,l=["ms","moz","webkit","o"],c=e.requestAnimationFrame,u=e.cancelAnimationFrame;for(t=0;!c&&t<l.length;++t)c=e[l[t]+"RequestAnimationFrame"],u=e[l[t]+"CancelAnimationFrame"]||e[l[t]+"CancelRequestAnimationFrame"];c||(c=function(t){var n=(new Date).getTime(),r=Math.max(0,16-(n-a)),i=e.setTimeout(function(){t(n+r)},r);return a=n+r,i}),u||(u=function(t){e.clearTimeout(t)}),n.rAF=c.bind(e),n.cAF=u.bind(e);var f=n.type=function(e){return Object.prototype.toString.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase()};f.String=function(e){return"string"===f(e)},f.Function=function(e){return"function"===f(e)},f.Array=function(e){return Array.isArray(e)},f.Number=function(e){return!f.Array(e)&&e-parseFloat(e)+1>=0},f.DomElement=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName};var d=n.get={};return d.elements=function(t){var n=[];if(f.String(t))try{t=document.querySelectorAll(t)}catch(r){return n}if("nodelist"===f(t)||f.Array(t))for(var i=0,o=n.length=t.length;o>i;i++){var s=t[i];n[i]=f.DomElement(s)?s:d.elements(s)}else(f.DomElement(t)||t===document||t===e)&&(n=[t]);return n},d.scrollTop=function(t){return t&&"number"==typeof t.scrollTop?t.scrollTop:e.pageYOffset||0},d.scrollLeft=function(t){return t&&"number"==typeof t.scrollLeft?t.scrollLeft:e.pageXOffset||0},d.width=function(e,t,n){return o("width",e,t,n)},d.height=function(e,t,n){return o("height",e,t,n)},d.offset=function(e,t){var n={top:0,left:0};if(e&&e.getBoundingClientRect){var r=e.getBoundingClientRect();n.top=r.top,n.left=r.left,t||(n.top+=d.scrollTop(),n.left+=d.scrollLeft())}return n},n.addClass=function(e,t){t&&(e.classList?e.classList.add(t):e.className+=" "+t)},n.removeClass=function(e,t){t&&(e.classList?e.classList.remove(t):e.className=e.className.replace(RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," "))},n.css=function(e,t){if(f.String(t))return i(e)[s(t)];if(f.Array(t)){var n={},r=i(e);return t.forEach(function(e){n[e]=r[s(e)]}),n}for(var o in t){var a=t[o];a==parseFloat(a)&&(a+="px"),e.style[s(o)]=a}},n}(window||{});return e}); 3 4/*TweenMax*/ 5var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("TweenMax",["core.Animation","core.SimpleTimeline","TweenLite"],function(a,b,c){var d=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},e=function(a,b,c){var d,e,f=a.cycle;for(d in f)e=f[d],a[d]="function"==typeof e?e(c,b[c]):e[c%e.length];delete a.cycle},f=function(a,b,d){c.call(this,a,b,d),this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._dirty=!0,this.render=f.prototype.render},g=1e-10,h=c._internals,i=h.isSelector,j=h.isArray,k=f.prototype=c.to({},.1,{}),l=[];f.version="1.19.1",k.constructor=f,k.kill()._gc=!1,f.killTweensOf=f.killDelayedCallsTo=c.killTweensOf,f.getTweensOf=c.getTweensOf,f.lagSmoothing=c.lagSmoothing,f.ticker=c.ticker,f.render=c.render,k.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),c.prototype.invalidate.call(this)},k.updateTo=function(a,b){var d,e=this.ratio,f=this.vars.immediateRender||a.immediateRender;b&&this._startTime<this._timeline._time&&(this._startTime=this._timeline._time,this._uncache(!1),this._gc?this._enabled(!0,!1):this._timeline.insert(this,this._startTime-this._delay));for(d in a)this.vars[d]=a[d];if(this._initted||f)if(b)this._initted=!1,f&&this.render(0,!0,!0);else if(this._gc&&this._enabled(!0,!1),this._notifyPluginsOfEnabled&&this._firstPT&&c._onPluginEvent("_onDisable",this),this._time/this._duration>.998){var g=this._totalTime;this.render(0,!0,!1),this._initted=!1,this.render(g,!0,!1)}else if(this._initted=!1,this._init(),this._time>0||f)for(var h,i=1/(1-e),j=this._firstPT;j;)h=j.s+j.c,j.c*=i,j.s=h-j.c,j=j._next;return this},k.render=function(a,b,c){this._initted||0===this._duration&&this.vars.repeat&&this.invalidate();var d,e,f,i,j,k,l,m,n=this._dirty?this.totalDuration():this._totalDuration,o=this._time,p=this._totalTime,q=this._cycle,r=this._duration,s=this._rawPrevTime;if(a>=n-1e-7&&a>=0?(this._totalTime=n,this._cycle=this._repeat,this._yoyo&&0!==(1&this._cycle)?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=r,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(d=!0,e="onComplete",c=c||this._timeline.autoRemoveChildren),0===r&&(this._initted||!this.vars.lazy||c)&&(this._startTime===this._timeline._duration&&(a=0),(0>s||0>=a&&a>=-1e-7||s===g&&"isPause"!==this.data)&&s!==a&&(c=!0,s>g&&(e="onReverseComplete")),this._rawPrevTime=m=!b||a||s===a?a:g)):1e-7>a?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==p||0===r&&s>0)&&(e="onReverseComplete",d=this._reversed),0>a&&(this._active=!1,0===r&&(this._initted||!this.vars.lazy||c)&&(s>=0&&(c=!0),this._rawPrevTime=m=!b||a||s===a?a:g)),this._initted||(c=!0)):(this._totalTime=this._time=a,0!==this._repeat&&(i=r+this._repeatDelay,this._cycle=this._totalTime/i>>0,0!==this._cycle&&this._cycle===this._totalTime/i&&a>=p&&this._cycle--,this._time=this._totalTime-this._cycle*i,this._yoyo&&0!==(1&this._cycle)&&(this._time=r-this._time),this._time>r?this._time=r:this._time<0&&(this._time=0)),this._easeType?(j=this._time/r,k=this._easeType,l=this._easePower,(1===k||3===k&&j>=.5)&&(j=1-j),3===k&&(j*=2),1===l?j*=j:2===l?j*=j*j:3===l?j*=j*j*j:4===l&&(j*=j*j*j*j),1===k?this.ratio=1-j:2===k?this.ratio=j:this._time/r<.5?this.ratio=j/2:this.ratio=1-j/2):this.ratio=this._ease.getRatio(this._time/r)),o===this._time&&!c&&q===this._cycle)return void(p!==this._totalTime&&this._onUpdate&&(b||this._callback("onUp
5date")));if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!c&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=o,this._totalTime=p,this._rawPrevTime=s,this._cycle=q,h.lazyTweens.push(this),void(this._lazy=[a,b]);this._time&&!d?this.ratio=this._ease.getRatio(this._time/r):d&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==o&&a>=0&&(this._active=!0),0===p&&(2===this._initted&&a>0&&this._init(),this._startAt&&(a>=0?this._startAt.render(a,b,c):e||(e="_dummyGS")),this.vars.onStart&&(0!==this._totalTime||0===r)&&(b||this._callback("onStart"))),f=this._firstPT;f;)f.f?f.t[f.p](f.c*this.ratio+f.s):f.t[f.p]=f.c*this.ratio+f.s,f=f._next;this._onUpdate&&(0>a&&this._startAt&&this._startTime&&this._startAt.render(a,b,c),b||(this._totalTime!==p||e)&&this._callback("onUpdate")),this._cycle!==q&&(b||this._gc||this.vars.onRepeat&&this._callback("onRepeat")),e&&(!this._gc||c)&&(0>a&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(a,b,c),d&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[e]&&this._callback(e),0===r&&this._rawPrevTime===g&&m!==g&&(this._rawPrevTime=0))},f.to=function(a,b,c){return new f(a,b,c)},f.from=function(a,b,c){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,new f(a,b,c)},f.fromTo=function(a,b,c,d){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,new f(a,b,d)},f.staggerTo=f.allTo=function(a,b,g,h,k,m,n){h=h||0;var o,p,q,r,s=0,t=[],u=function(){g.onComplete&&g.onComplete.apply(g.onCompleteScope||this,arguments),k.apply(n||g.callbackScope||this,m||l)},v=g.cycle,w=g.startAt&&g.startAt.cycle;for(j(a)||("string"==typeof a&&(a=c.selector(a)||a),i(a)&&(a=d(a))),a=a||[],0>h&&(a=d(a),a.reverse(),h*=-1),o=a.length-1,q=0;o>=q;q++){p={};for(r in g)p[r]=g[r];if(v&&(e(p,a,q),null!=p.duration&&(b=p.duration,delete p.duration)),w){w=p.startAt={};for(r in g.startAt)w[r]=g.startAt[r];e(p.startAt,a,q)}p.delay=s+(p.delay||0),q===o&&k&&(p.onComplete=u),t[q]=new f(a[q],b,p),s+=h}return t},f.staggerFrom=f.allFrom=function(a,b,c,d,e,g,h){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,f.staggerTo(a,b,c,d,e,g,h)},f.staggerFromTo=f.allFromTo=function(a,b,c,d,e,g,h,i){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,f.staggerTo(a,b,d,e,g,h,i)},f.delayedCall=function(a,b,c,d,e){return new f(b,0,{delay:a,onComplete:b,onCompleteParams:c,callbackScope:d,onReverseComplete:b,onReverseCompleteParams:c,immediateRender:!1,useFrames:e,overwrite:0})},f.set=function(a,b){return new f(a,0,b)},f.isTweening=function(a){return c.getTweensOf(a,!0).length>0};var m=function(a,b){for(var d=[],e=0,f=a._first;f;)f instanceof c?d[e++]=f:(b&&(d[e++]=f),d=d.concat(m(f,b)),e=d.length),f=f._next;return d},n=f.getAllTweens=function(b){return m(a._rootTimeline,b).concat(m(a._rootFramesTimeline,b))};f.killAll=function(a,c,d,e){null==c&&(c=!0),null==d&&(d=!0);var f,g,h,i=n(0!=e),j=i.length,k=c&&d&&e;for(h=0;j>h;h++)g=i[h],(k||g instanceof b||(f=g.target===g.vars.onComplete)&&d||c&&!f)&&(a?g.totalTime(g._reversed?0:g.totalDuration()):g._enabled(!1,!1))},f.killChildTweensOf=function(a,b){if(null!=a){var e,g,k,l,m,n=h.tweenLookup;if("string"==typeof a&&(a=c.selector(a)||a),i(a)&&(a=d(a)),j(a))for(l=a.length;--l>-1;)f.killChildTweensOf(a[l],b);else{e=[];for(k in n)for(g=n[k].target.parentNode;g;)g===a&&(e=e.concat(n[k].tweens)),g=g.parentNode;for(m=e.length,l=0;m>l;l++)b&&e[l].totalTime(e[l].totalDuration()),e[l]._enabled(!1,!1)}}};var o=function(a,c,d,e){c=c!==!1,d=d!==!1,e=e!==!1;for(var f,g,h=n(e),i=c&&d&&e,j=h.length;--j>-1;)g=h[j],(i||g instanceof b||(f=g.target===g.vars.onComplete)&&d||c&&!f)&&g.paused(a)};return f.pauseAll=function(a,b,c){o(!0,a,b,c)},f.resumeAll=function(a,b,c){o(!1,a,b,c)},f.globalTimeScale=function(b){var d=a._rootTimeline,e=c.ticker.time;return arguments.length?(b=b||g,d._startTime=e-(e-d._startTime)*d._timeScale/b,d=a._rootFramesTimeline,e=c.ticker.frame,d._startTime=e-(e-d._startTime)*d._timeScale/b,d._timeScale=a._rootTimeline._timeScale=b,b):d._timeScale},k.progress=function(a,b){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!==(1&this._cycle)?1-a:a)+this._cycle*(this._duration+this._repeatDelay),b):this._time/this.duration()},k.totalProgress=function(a,b){return arguments.length?this.totalTime(this.totalDuration()*a,b):this._totalTime/this.totalDuration()},k.time=function(a,b){return arguments.length?(this._dirty&&this.totalDuration(),a>this._duration&&(a=this._duration),this._yoyo&&0!==(1&this._cycle)?a=this._duration-a+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(a+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(a,b)):this._time},k.duration=function(b){return arguments.length?a.prototype.duration.call(this,b):this._duration},k.totalDuration=function(a){return arguments.length?-1===this._repeat?this:this.duration((a-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat,this._dirty=!1),this._totalDuration)},k.repeat=function(a){return arguments.length?(this._repeat=a,this._uncache(!0)):this._repeat},k.repeatDelay=function(a){return arguments.length?(this._repeatDelay=a,this._uncache(!0)):this._repeatDelay},k.yoyo=function(a){return arguments.length?(this._yoyo=a,this):this._yoyo},f},!0),_gsScope._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(a,b,c){var d=function(a){b.call(this,a),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUp
vendor: 8,053 bytes, line 5
5date;var c,d,e=this.vars;for(d in e)c=e[d],i(c)&&-1!==c.join("").indexOf("{self}")&&(e[d]=this._swapSelfInParams(c));i(e.tweens)&&this.add(e.tweens,0,e.align,e.stagger)},e=1e-10,f=c._internals,g=d._internals={},h=f.isSelector,i=f.isArray,j=f.lazyTweens,k=f.lazyRender,l=_gsScope._gsDefine.globals,m=function(a){var b,c={};for(b in a)c[b]=a[b];return c},n=function(a,b,c){var d,e,f=a.cycle;for(d in f)e=f[d],a[d]="function"==typeof e?e(c,b[c]):e[c%e.length];delete a.cycle},o=g.pauseCallback=function(){},p=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},q=d.prototype=new b;return d.version="1.19.1",q.constructor=d,q.kill()._gc=q._forcingPlayhead=q._hasPause=!1,q.to=function(a,b,d,e){var f=d.repeat&&l.TweenMax||c;return b?this.add(new f(a,b,d),e):this.set(a,d,e)},q.from=function(a,b,d,e){return this.add((d.repeat&&l.TweenMax||c).from(a,b,d),e)},q.fromTo=function(a,b,d,e,f){var g=e.repeat&&l.TweenMax||c;return b?this.add(g.fromTo(a,b,d,e),f):this.set(a,e,f)},q.staggerTo=function(a,b,e,f,g,i,j,k){var l,o,q=new d({onComplete:i,onCompleteParams:j,callbackScope:k,smoothChildTiming:this.smoothChildTiming}),r=e.cycle;for("string"==typeof a&&(a=c.selector(a)||a),a=a||[],h(a)&&(a=p(a)),f=f||0,0>f&&(a=p(a),a.reverse(),f*=-1),o=0;o<a.length;o++)l=m(e),l.startAt&&(l.startAt=m(l.startAt),l.startAt.cycle&&n(l.startAt,a,o)),r&&(n(l,a,o),null!=l.duration&&(b=l.duration,delete l.duration)),q.to(a[o],b,l,o*f);return this.add(q,g)},q.staggerFrom=function(a,b,c,d,e,f,g,h){return c.immediateRender=0!=c.immediateRender,c.runBackwards=!0,this.staggerTo(a,b,c,d,e,f,g,h)},q.staggerFromTo=function(a,b,c,d,e,f,g,h,i){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,this.staggerTo(a,b,d,e,f,g,h,i)},q.call=function(a,b,d,e){return this.add(c.delayedCall(0,a,b,d),e)},q.set=function(a,b,d){return d=this._parseTimeOrLabel(d,0,!0),null==b.immediateRender&&(b.immediateRender=d===this._time&&!this._paused),this.add(new c(a,0,b),d)},d.exportRoot=function(a,b){a=a||{},null==a.smoothChildTiming&&(a.smoothChildTiming=!0);var e,f,g=new d(a),h=g._timeline;for(null==b&&(b=!0),h._remove(g,!0),g._startTime=0,g._rawPrevTime=g._time=g._totalTime=h._time,e=h._first;e;)f=e._next,b&&e instanceof c&&e.target===e.vars.onComplete||g.add(e,e._startTime-e._delay),e=f;return h.add(g,0),g},q.add=function(e,f,g,h){var j,k,l,m,n,o;if("number"!=typeof f&&(f=this._parseTimeOrLabel(f,0,!0,e)),!(e instanceof a)){if(e instanceof Array||e&&e.push&&i(e)){for(g=g||"normal",h=h||0,j=f,k=e.length,l=0;k>l;l++)i(m=e[l])&&(m=new d({tweens:m})),this.add(m,j),"string"!=typeof m&&"function"!=typeof m&&("sequence"===g?j=m._startTime+m.totalDuration()/m._timeScale:"start"===g&&(m._startTime-=m.delay())),j+=h;return this._uncache(!0)}if("string"==typeof e)return this.addLabel(e,f);if("function"!=typeof e)throw"Cannot add "+e+" into the timeline; it is not a tween, timeline, function, or string.";e=c.delayedCall(0,e)}if(b.prototype.add.call(this,e,f),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(n=this,o=n.rawTime()>e._startTime;n._timeline;)o&&n._timeline.smoothChildTiming?n.totalTime(n._totalTime,!0):n._gc&&n._enabled(!0,!1),n=n._timeline;return this},q.remove=function(b){if(b instanceof a){this._remove(b,!1);var c=b._timeline=b.vars.useFrames?a._rootFramesTimeline:a._rootTimeline;return b._startTime=(b._paused?b._pauseTime:c._time)-(b._reversed?b.totalDuration()-b._totalTime:b._totalTime)/b._timeScale,this}if(b instanceof Array||b&&b.push&&i(b)){for(var d=b.length;--d>-1;)this.remove(b[d]);return this}return"string"==typeof b?this.removeLabel(b):this.kill(null,b)},q._remove=function(a,c){b.prototype._remove.call(this,a,c);var d=this._last;return d?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},q.append=function(a,b){return this.add(a,this._parseTimeOrLabel(null,b,!0,a))},q.insert=q.insertMultiple=function(a,b,c,d){return this.add(a,b||0,c,d)},q.appendMultiple=function(a,b,c,d){return this.add(a,this._parseTimeOrLabel(null,b,!0,a),c,d)},q.addLabel=function(a,b){return this._labels[a]=this._parseTimeOrLabel(b),this},q.addPause=function(a,b,d,e){var f=c.delayedCall(0,o,d,e||this);return f.vars.onComplete=f.vars.onReverseComplete=b,f.data="isPause",this._hasPause=!0,this.add(f,a)},q.removeLabel=function(a){return delete this._labels[a],this},q.getLabelTime=function(a){return null!=this._labels[a]?this._labels[a]:-1},q._parseTimeOrLabel=function(b,c,d,e){var f;if(e instanceof a&&e.timeline===this)this.remove(e);else if(e&&(e instanceof Array||e.push&&i(e)))for(f=e.length;--f>-1;)e[f]instanceof a&&e[f].timeline===this&&this.remove(e[f]);if("string"==typeof c)return this._parseTimeOrLabel(c,d&&"number"==typeof b&&null==this._labels[c]?b-this.duration():0,d);if(c=c||0,"string"!=typeof b||!isNaN(b)&&null==this._labels[b])null==b&&(b=this.duration());else{if(f=b.indexOf("="),-1===f)return null==this._labels[b]?d?this._labels[b]=this.duration()+c:c:this._labels[b]+c;c=parseInt(b.charAt(f-1)+"1",10)*Number(b.substr(f+1)),b=f>1?this._parseTimeOrLabel(b.substr(0,f-1),0,d):this.duration()}return Number(b)+c},q.seek=function(a,b){return this.totalTime("number"==typeof a?a:this._parseTimeOrLabel(a),b!==!1)},q.stop=function(){return this.paused(!0)},q.gotoAndPlay=function(a,b){return this.play(a,b)},q.gotoAndStop=function(a,b){return this.pause(a,b)},q.render=function(a,b,c){this._gc&&this._enabled(!0,!1);var d,f,g,h,i,l,m,n=this._dirty?this.totalDuration():this._totalDuration,o=this._time,p=this._startTime,q=this._timeScale,r=this._paused;if(a>=n-1e-7&&a>=0)this._totalTime=this._time=n,this._reversed||this._hasPausedChild()||(f=!0,h="onComplete",i=!!this._timeline.autoRemoveChildren,0===this._duration&&(0>=a&&a>=-1e-7||this._rawPrevTime<0||this._rawPrevTime===e)&&this._rawPrevTime!==a&&this._first&&(i=!0,this._rawPrevTime>e&&(h="onReverseComplete"))),this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,a=n+1e-4;else if(1e-7>a)if(this._totalTime=this._time=0,(0!==o||0===this._duration&&this._rawPrevTime!==e&&(this._rawPrevTime>0||0>a&&this._rawPrevTime>=0))&&(h="onReverseComplete",f=this._reversed),0>a)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(i=f=!0,h="onReverseComplete"):this._rawPrevTime>=0&&this._first&&(i=!0),this._rawPrevTime=a;else{if(this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,0===a&&f)for(d=this._first;d&&0===d._startTime;)d._duration||(f=!1),d=d._next;a=0,this._initted||(i=!0)}else{if(this._hasPause&&!this._forcingPlayhead&&!b){if(a>=o)for(d=this._first;d&&d._startTime<=a&&!l;)d._duration||"isPause"!==d.data||d.ratio||0===d._startTime&&0===this._rawPrevTime||(l=d),d=d._next;else for(d=this._last;d&&d._startTime>=a&&!l;)d._duration||"isPause"===d.data&&d._rawPrevTime>0&&(l=d),d=d._prev;l&&(this._time=a=l._startTime,this._totalTime=a+this._cycle*(this._totalDuration+this._repeatDelay))}this._totalTime=this._time=this._rawPrevTime=a}if(this._time!==o&&this._first||c||i||l){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==o&&a>0&&(this._active=!0),0===o&&this.vars.onStart&&(0===this._time&&this._duration||b||this._callback("onStart")),m=this._time,m>=o)for(d=this._first;d&&(g=d._next,m===this._time&&(!this._paused||r));)(d._active||d._startTime<=m&&!d._paused&&!d._gc)&&(l===d&&this.pause(),d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)),d=g;else for(d=this._last;d&&(g=d._prev,m===this._time&&(!this._paused||r));){if(d._active||d._startTime<=o&&!d._paused&&!d._gc){if(l===d){for(l=d._prev;l&&l.endTime()>this._time;)l.render(l._reversed?l.totalDuration()-(a-l._startTime)*l._timeScale:(a-l._startTime)*l._timeScale,b,c),l=l._prev;l=null,this.pause()}d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)}d=g}
vendor: 7,870 bytes, line 5
5this._onUpdate&&(b||(j.length&&k(),this._callback("onUpdate"))),h&&(this._gc||(p===this._startTime||q!==this._timeScale)&&(0===this._time||n>=this.totalDuration())&&(f&&(j.length&&k(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[h]&&this._callback(h)))}},q._hasPausedChild=function(){for(var a=this._first;a;){if(a._paused||a instanceof d&&a._hasPausedChild())return!0;a=a._next}return!1},q.getChildren=function(a,b,d,e){e=e||-9999999999;for(var f=[],g=this._first,h=0;g;)g._startTime<e||(g instanceof c?b!==!1&&(f[h++]=g):(d!==!1&&(f[h++]=g),a!==!1&&(f=f.concat(g.getChildren(!0,b,d)),h=f.length))),g=g._next;return f},q.getTweensOf=function(a,b){var d,e,f=this._gc,g=[],h=0;for(f&&this._enabled(!0,!0),d=c.getTweensOf(a),e=d.length;--e>-1;)(d[e].timeline===this||b&&this._contains(d[e]))&&(g[h++]=d[e]);return f&&this._enabled(!1,!0),g},q.recent=function(){return this._recent},q._contains=function(a){for(var b=a.timeline;b;){if(b===this)return!0;b=b.timeline}return!1},q.shiftChildren=function(a,b,c){c=c||0;for(var d,e=this._first,f=this._labels;e;)e._startTime>=c&&(e._startTime+=a),e=e._next;if(b)for(d in f)f[d]>=c&&(f[d]+=a);return this._uncache(!0)},q._kill=function(a,b){if(!a&&!b)return this._enabled(!1,!1);for(var c=b?this.getTweensOf(b):this.getChildren(!0,!0,!1),d=c.length,e=!1;--d>-1;)c[d]._kill(a,b)&&(e=!0);return e},q.clear=function(a){var b=this.getChildren(!1,!0,!0),c=b.length;for(this._time=this._totalTime=0;--c>-1;)b[c]._enabled(!1,!1);return a!==!1&&(this._labels={}),this._uncache(!0)},q.invalidate=function(){for(var b=this._first;b;)b.invalidate(),b=b._next;return a.prototype.invalidate.call(this)},q._enabled=function(a,c){if(a===this._gc)for(var d=this._first;d;)d._enabled(a,!0),d=d._next;return b.prototype._enabled.call(this,a,c)},q.totalTime=function(b,c,d){this._forcingPlayhead=!0;var e=a.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,e},q.duration=function(a){return arguments.length?(0!==this.duration()&&0!==a&&this.timeScale(this._duration/a),this):(this._dirty&&this.totalDuration(),this._duration)},q.totalDuration=function(a){if(!arguments.length){if(this._dirty){for(var b,c,d=0,e=this._last,f=999999999999;e;)b=e._prev,e._dirty&&e.totalDuration(),e._startTime>f&&this._sortChildren&&!e._paused?this.add(e,e._startTime-e._delay):f=e._startTime,e._startTime<0&&!e._paused&&(d-=e._startTime,this._timeline.smoothChildTiming&&(this._startTime+=e._startTime/this._timeScale),this.shiftChildren(-e._startTime,!1,-9999999999),f=0),c=e._startTime+e._totalDuration/e._timeScale,c>d&&(d=c),e=b;this._duration=this._totalDuration=d,this._dirty=!1}return this._totalDuration}return a&&this.totalDuration()?this.timeScale(this._totalDuration/a):this},q.paused=function(b){if(!b)for(var c=this._first,d=this._time;c;)c._startTime===d&&"isPause"===c.data&&(c._rawPrevTime=0),c=c._next;return a.prototype.paused.apply(this,arguments)},q.usesFrames=function(){for(var b=this._timeline;b._timeline;)b=b._timeline;return b===a._rootFramesTimeline},q.rawTime=function(a){return a&&(this._paused||this._repeat&&this.time()>0&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(a)-this._startTime)*this._timeScale},d},!0),_gsScope._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(a,b,c){var d=function(b){a.call(this,b),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._dirty=!0},e=1e-10,f=b._internals,g=f.lazyTweens,h=f.lazyRender,i=_gsScope._gsDefine.globals,j=new c(null,null,1,0),k=d.prototype=new a;return k.constructor=d,k.kill()._gc=!1,d.version="1.19.1",k.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),a.prototype.invalidate.call(this)},k.addCallback=function(a,c,d,e){return this.add(b.delayedCall(0,a,d,e),c)},k.removeCallback=function(a,b){if(a)if(null==b)this._kill(null,a);else for(var c=this.getTweensOf(a,!1),d=c.length,e=this._parseTimeOrLabel(b);--d>-1;)c[d]._startTime===e&&c[d]._enabled(!1,!1);return this},k.removePause=function(b){return this.removeCallback(a._internals.pauseCallback,b)},k.tweenTo=function(a,c){c=c||{};var d,e,f,g={ease:j,useFrames:this.usesFrames(),immediateRender:!1},h=c.repeat&&i.TweenMax||b;for(e in c)g[e]=c[e];return g.time=this._parseTimeOrLabel(a),d=Math.abs(Number(g.time)-this._time)/this._timeScale||.001,f=new h(this,d,g),g.onStart=function(){f.target.paused(!0),f.vars.time!==f.target.time()&&d===f.duration()&&f.duration(Math.abs(f.vars.time-f.target.time())/f.target._timeScale),c.onStart&&c.onStart.apply(c.onStartScope||c.callbackScope||f,c.onStartParams||[])},f},k.tweenFromTo=function(a,b,c){c=c||{},a=this._parseTimeOrLabel(a),c.startAt={onComplete:this.seek,onCompleteParams:[a],callbackScope:this},c.immediateRender=c.immediateRender!==!1;var d=this.tweenTo(b,c);return d.duration(Math.abs(d.vars.time-a)/this._timeScale||.001)},k.render=function(a,b,c){this._gc&&this._enabled(!0,!1);var d,f,i,j,k,l,m,n,o=this._dirty?this.totalDuration():this._totalDuration,p=this._duration,q=this._time,r=this._totalTime,s=this._startTime,t=this._timeScale,u=this._rawPrevTime,v=this._paused,w=this._cycle;if(a>=o-1e-7&&a>=0)this._locked||(this._totalTime=o,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(f=!0,j="onComplete",k=!!this._timeline.autoRemoveChildren,0===this._duration&&(0>=a&&a>=-1e-7||0>u||u===e)&&u!==a&&this._first&&(k=!0,u>e&&(j="onReverseComplete"))),this._rawPrevTime=this._duration||!b||a||this._rawPrevTime===a?a:e,this._yoyo&&0!==(1&this._cycle)?this._time=a=0:(this._time=p,a=p+1e-4);else if(1e-7>a)if(this._locked||(this._totalTime=this._cycle=0),this._time=0,(0!==q||0===p&&u!==e&&(u>0||0>a&&u>=0)&&!this._locked)&&(j="onReverseComplete",f=this._reversed),0>a)this._active=!1,this._timeline.autoRemoveChildren&&this._reversed?(k=f=!0,j="onReverseComplete"):u>=0&&this._first&&(k=!0),this._rawPrevTime=a;else{if(this._rawPrevTime=p||!b||a||this._rawPrevTime===a?a:e,0===a&&f)for(d=this._first;d&&0===d._startTime;)d._duration||(f=!1),d=d._next;a=0,this._initted||(k=!0)}else if(0===p&&0>u&&(k=!0),this._time=this._rawPrevTime=a,this._locked||(this._totalTime=a,0!==this._repeat&&(l=p+this._repeatDelay,this._cycle=this._totalTime/l>>0,0!==this._cycle&&this._cycle===this._totalTime/l&&a>=r&&this._cycle--,this._time=this._totalTime-this._cycle*l,this._yoyo&&0!==(1&this._cycle)&&(this._time=p-this._time),this._time>p?(this._time=p,a=p+1e-4):this._time<0?this._time=a=0:a=this._time)),this._hasPause&&!this._forcingPlayhead&&!b&&p>a){if(a=this._time,a>=q||this._repeat&&w!==this._cycle)for(d=this._first;d&&d._startTime<=a&&!m;)d._duration||"isPause"!==d.data||d.ratio||0===d._startTime&&0===this._rawPrevTime||(m=d),d=d._next;else for(d=this._last;d&&d._startTime>=a&&!m;)d._duration||"isPause"===d.data&&d._rawPrevTime>0&&(m=d),d=d._prev;m&&(this._time=a=m._startTime,this._totalTime=a+this._cycle*(this._totalDuration+this._repeatDelay))}if(this._cycle!==w&&!this._locked){var x=this._yoyo&&0!==(1&w),y=x===(this._yoyo&&0!==(1&this._cycle)),z=this._totalTime,A=this._cycle,B=this._rawPrevTime,C=this._time;if(this._totalTime=w*p,this._cycle<w?x=!x:this._totalTime+=p,this._time=q,this._rawPrevTime=0===p?u-1e-4:u,this._cycle=w,this._locked=!0,q=x?0:p,this.render(q,b,0===p),b||this._gc||this.vars.onRepeat&&(this._cycle=A,this._locked=!1,this._callback("onRepeat")),q!==this._time)return;if(y&&(this._cycle=w,this._locked=!0,q=x?p+1e-4:-1e-4,this.render(q,!0,!1)),this._locked=!1,this._paused&&!v)return;this._time=C,this._totalTime=z,this._cycle=A,this._rawPrevTime=B}if(!(this._time!==q&&this._first||c||k||m))return void(r!==this._totalTime&&this._onUpdate&&(b||this._callback("onUp
5date")));if(this._initted||(this._initted=!0),this._active||!this._paused&&this._totalTime!==r&&a>0&&(this._active=!0),0===r&&this.vars.onStart&&(0===this._totalTime&&this._totalDuration||b||this._callback("onStart")),n=this._time,n>=q)for(d=this._first;d&&(i=d._next,n===this._time&&(!this._paused||v));)(d._active||d._startTime<=this._time&&!d._paused&&!d._gc)&&(m===d&&this.pause(),d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)),d=i;else for(d=this._last;d&&(i=d._prev,n===this._time&&(!this._paused||v));){if(d._active||d._startTime<=q&&!d._paused&&!d._gc){if(m===d){for(m=d._prev;m&&m.endTime()>this._time;)m.render(m._reversed?m.totalDuration()-(a-m._startTime)*m._timeScale:(a-m._startTime)*m._timeScale,b,c),m=m._prev;m=null,this.pause()}d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)}d=i}this._onUpdate&&(b||(g.length&&h(),this._callback("onUpdate"))),j&&(this._locked||this._gc||(s===this._startTime||t!==this._timeScale)&&(0===this._time||o>=this.totalDuration())&&(f&&(g.length&&h(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[j]&&this._callback(j)))},k.getActive=function(a,b,c){null==a&&(a=!0),null==b&&(b=!0),null==c&&(c=!1);var d,e,f=[],g=this.getChildren(a,b,c),h=0,i=g.length;for(d=0;i>d;d++)e=g[d],e.isActive()&&(f[h++]=e);return f},k.getLabelAfter=function(a){a||0!==a&&(a=this._time);var b,c=this.getLabelsArray(),d=c.length;for(b=0;d>b;b++)if(c[b].time>a)return c[b].name;return null},k.getLabelBefore=function(a){null==a&&(a=this._time);for(var b=this.getLabelsArray(),c=b.length;--c>-1;)if(b[c].time<a)return b[c].name;return null},k.getLabelsArray=function(){var a,b=[],c=0;for(a in this._labels)b[c++]={time:this._labels[a],name:a};return b.sort(function(a,b){return a.time-b.time}),b},k.invalidate=function(){return this._locked=!1,a.prototype.invalidate.call(this)},k.progress=function(a,b){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!==(1&this._cycle)?1-a:a)+this._cycle*(this._duration+this._repeatDelay),b):this._time/this.duration()},k.totalProgress=function(a,b){return arguments.length?this.totalTime(this.totalDuration()*a,b):this._totalTime/this.totalDuration()},k.totalDuration=function(b){return arguments.length?-1!==this._repeat&&b?this.timeScale(this.totalDuration()/b):this:(this._dirty&&(a.prototype.totalDuration.call(this),this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},k.time=function(a,b){return arguments.length?(this._dirty&&this.totalDuration(),a>this._duration&&(a=this._duration),this._yoyo&&0!==(1&this._cycle)?a=this._duration-a+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(a+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(a,b)):this._time},k.repeat=function(a){return arguments.length?(this._repeat=a,this._uncache(!0)):this._repeat},k.repeatDelay=function(a){return arguments.length?(this._repeatDelay=a,this._uncache(!0)):this._repeatDelay},k.yoyo=function(a){return arguments.length?(this._yoyo=a,this):this._yoyo},k.currentLabel=function(a){return arguments.length?this.seek(a,!0):this.getLabelBefore(this._time+1e-8)},d},!0),function(){var a=180/Math.PI,b=[],c=[],d=[],e={},f=_gsScope._gsDefine.globals,g=function(a,b,c,d){c===d&&(c=d-(d-b)/1e6),a===b&&(b=a+(c-a)/1e6),this.a=a,this.b=b,this.c=c,this.d=d,this.da=d-a,this.ca=c-a,this.ba=b-a},h=",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",i=function(a,b,c,d){var e={a:a},f={},g={},h={c:d},i=(a+b)/2,j=(b+c)/2,k=(c+d)/2,l=(i+j)/2,m=(j+k)/2,n=(m-l)/8;return e.b=i+(a-i)/4,f.b=l+n,e.c=f.a=(e.b+f.b)/2,f.c=g.a=(l+m)/2,g.b=m-n,h.b=k+(d-k)/4,g.c=h.a=(g.b+h.b)/2,[e,f,g,h]},j=function(a,e,f,g,h){var j,k,l,m,n,o,p,q,r,s,t,u,v,w=a.length-1,x=0,y=a[0].a;for(j=0;w>j;j++)n=a[x],k=n.a,l=n.d,m=a[x+1].d,h?(t=b[j],u=c[j],v=(u+t)*e*.25/(g?.5:d[j]||.5),o=l-(l-k)*(g?.5*e:0!==t?v/t:0),p=l+(m-l)*(g?.5*e:0!==u?v/u
vendor: 53,483 bytes, lines 5-7
5:0),q=l-(o+((p-o)*(3*t/(t+u)+.5)/4||0))):(o=l-(l-k)*e*.5,p=l+(m-l)*e*.5,q=l-(o+p)/2),o+=q,p+=q,n.c=r=o,0!==j?n.b=y:n.b=y=n.a+.6*(n.c-n.a),n.da=l-k,n.ca=r-k,n.ba=y-k,f?(s=i(k,y,r,l),a.splice(x,1,s[0],s[1],s[2],s[3]),x+=4):x++,y=p;n=a[x],n.b=y,n.c=y+.4*(n.d-y),n.da=n.d-n.a,n.ca=n.c-n.a,n.ba=y-n.a,f&&(s=i(n.a,y,n.c,n.d),a.splice(x,1,s[0],s[1],s[2],s[3]))},k=function(a,d,e,f){var h,i,j,k,l,m,n=[];if(f)for(a=[f].concat(a),i=a.length;--i>-1;)"string"==typeof(m=a[i][d])&&"="===m.charAt(1)&&(a[i][d]=f[d]+Number(m.charAt(0)+m.substr(2)));if(h=a.length-2,0>h)return n[0]=new g(a[0][d],0,0,a[-1>h?0:1][d]),n;for(i=0;h>i;i++)j=a[i][d],k=a[i+1][d],n[i]=new g(j,0,0,k),e&&(l=a[i+2][d],b[i]=(b[i]||0)+(k-j)*(k-j),c[i]=(c[i]||0)+(l-k)*(l-k));return n[i]=new g(a[i][d],0,0,a[i+1][d]),n},l=function(a,f,g,i,l,m){var n,o,p,q,r,s,t,u,v={},w=[],x=m||a[0];l="string"==typeof l?","+l+",":h,null==f&&(f=1);for(o in a[0])w.push(o);if(a.length>1){for(u=a[a.length-1],t=!0,n=w.length;--n>-1;)if(o=w[n],Math.abs(x[o]-u[o])>.05){t=!1;break}t&&(a=a.concat(),m&&a.unshift(m),a.push(a[1]),m=a[a.length-3])}for(b.length=c.length=d.length=0,n=w.length;--n>-1;)o=w[n],e[o]=-1!==l.indexOf(","+o+","),v[o]=k(a,o,e[o],m);for(n=b.length;--n>-1;)b[n]=Math.sqrt(b[n]),c[n]=Math.sqrt(c[n]);if(!i){for(n=w.length;--n>-1;)if(e[o])for(p=v[w[n]],s=p.length-1,q=0;s>q;q++)r=p[q+1].da/c[q]+p[q].da/b[q]||0,d[q]=(d[q]||0)+r*r;for(n=d.length;--n>-1;)d[n]=Math.sqrt(d[n])}for(n=w.length,q=g?4:1;--n>-1;)o=w[n],p=v[o],j(p,f,g,i,e[o]),t&&(p.splice(0,q),p.splice(p.length-q,q));return v},m=function(a,b,c){b=b||"soft";var d,e,f,h,i,j,k,l,m,n,o,p={},q="cubic"===b?3:2,r="soft"===b,s=[];if(r&&c&&(a=[c].concat(a)),null==a||a.length<q+1)throw"invalid Bezier data";for(m in a[0])s.push(m);for(j=s.length;--j>-1;){for(m=s[j],p[m]=i=[],n=0,l=a.length,k=0;l>k;k++)d=null==c?a[k][m]:"string"==typeof(o=a[k][m])&&"="===o.charAt(1)?c[m]+Number(o.charAt(0)+o.substr(2)):Number(o),r&&k>1&&l-1>k&&(i[n++]=(d+i[n-2])/2),i[n++]=d;for(l=n-q+1,n=0,k=0;l>k;k+=q)d=i[k],e=i[k+1],f=i[k+2],h=2===q?0:i[k+3],i[n++]=o=3===q?new g(d,e,f,h):new g(d,(2*e+d)/3,(2*e+f)/3,f);i.length=n}return p},n=function(a,b,c){for(var d,e,f,g,h,i,j,k,l,m,n,o=1/c,p=a.length;--p>-1;)for(m=a[p],f=m.a,g=m.d-f, 6h=m.c-f,i=m.b-f,d=e=0,k=1;c>=k;k++)j=o*k,l=1-j,d=e-(e=(j*j*g+3*l*(j*h+l*i))*j),n=p*c+k-1,b[n]=(b[n]||0)+d*d},o=function(a,b){b=b>>0||6;var c,d,e,f,g=[],h=[],i=0,j=0,k=b-1,l=[],m=[];for(c in a)n(a[c],g,b);for(e=g.length,d=0;e>d;d++)i+=Math.sqrt(g[d]),f=d%b,m[f]=i,f===k&&(j+=i,f=d/b>>0,l[f]=m,h[f]=j,i=0,m=[]);return{length:j,lengths:h,segments:l}},p=_gsScope._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.7",API:2,global:!0,init:function(a,b,c){this._target=a,b instanceof Array&&(b={values:b}),this._func={},this._mod={},this._props=[],this._timeRes=null==b.timeResolution?6:parseInt(b.timeResolution,10);var d,e,f,g,h,i=b.values||[],j={},k=i[0],n=b.autoRotate||c.vars.orientToBezier;this._autoRotate=n?n instanceof Array?n:[["x","y","rotation",n===!0?0:Number(n)||0]]:null;for(d in k)this._props.push(d);for(f=this._props.length;--f>-1;)d=this._props[f],this._overwriteProps.push(d),e=this._func[d]="function"==typeof a[d],j[d]=e?a[d.indexOf("set")||"function"!=typeof a["get"+d.substr(3)]?d:"get"+d.substr(3)]():parseFloat(a[d]),h||j[d]!==i[0][d]&&(h=j);if(this._beziers="cubic"!==b.type&&"quadratic"!==b.type&&"soft"!==b.type?l(i,isNaN(b.curviness)?1:b.curviness,!1,"thruBasic"===b.type,b.correlate,h):m(i,b.type,j),this._segCount=this._beziers[d].length,this._timeRes){var p=o(this._beziers,this._timeRes);this._length=p.length,this._lengths=p.lengths,this._segments=p.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length}if(n=this._autoRotate)for(this._initialRotations=[],n[0]instanceof Array||(this._autoRotate=n=[n]),f=n.length;--f>-1;){for(g=0;3>g;g++)d=n[f][g],this._func[d]="function"==typeof a[d]?a[d.indexOf("set")||"function"!=typeof a["get"+d.substr(3)]?d:"get"+d.substr(3)]:!1;d=n[f][2],this._initialRotations[f]=(this._func[d]?this._func[d].call(this._target):this._target[d])||0,this._overwriteProps.push(d)}return this._startRatio=c.vars.runBackwards?1:0,!0},set:function(b){var c,d,e,f,g,h,i,j,k,l,m=this._segCount,n=this._func,o=this._target,p=b!==this._startRatio;if(this._timeRes){if(k=this._lengths,l=this._curSeg,b*=this._length,e=this._li,b>this._l2&&m-1>e){for(j=m-1;j>e&&(this._l2=k[++e])<=b;);this._l1=k[e-1],this._li=e,this._curSeg=l=this._segments[e],this._s2=l[this._s1=this._si=0]}else if(b<this._l1&&e>0){for(;e>0&&(this._l1=k[--e])>=b;);0===e&&b<this._l1?this._l1=0:e++,this._l2=k[e],this._li=e,this._curSeg=l=this._segments[e],this._s1=l[(this._si=l.length-1)-1]||0,this._s2=l[this._si]}if(c=e,b-=this._l1,e=this._si,b>this._s2&&e<l.length-1){for(j=l.length-1;j>e&&(this._s2=l[++e])<=b;);this._s1=l[e-1],this._si=e}else if(b<this._s1&&e>0){for(;e>0&&(this._s1=l[--e])>=b;);0===e&&b<this._s1?this._s1=0:e++,this._s2=l[e],this._si=e}h=(e+(b-this._s1)/(this._s2-this._s1))*this._prec||0}else c=0>b?0:b>=1?m-1:m*b>>0,h=(b-c*(1/m))*m;for(d=1-h,e=this._props.length;--e>-1;)f=this._props[e],g=this._beziers[f][c],i=(h*h*g.da+3*d*(h*g.ca+d*g.ba))*h+g.a,this._mod[f]&&(i=this._mod[f](i,o)),n[f]?o[f](i):o[f]=i;if(this._autoRotate){var q,r,s,t,u,v,w,x=this._autoRotate;for(e=x.length;--e>-1;)f=x[e][2],v=x[e][3]||0,w=x[e][4]===!0?1:a,g=this._beziers[x[e][0]],q=this._beziers[x[e][1]],g&&q&&(g=g[c],q=q[c],r=g.a+(g.b-g.a)*h,t=g.b+(g.c-g.b)*h,r+=(t-r)*h,t+=(g.c+(g.d-g.c)*h-t)*h,s=q.a+(q.b-q.a)*h,u=q.b+(q.c-q.b)*h,s+=(u-s)*h,u+=(q.c+(q.d-q.c)*h-u)*h,i=p?Math.atan2(u-s,t-r)*w+v:this._initialRotations[e],this._mod[f]&&(i=this._mod[f](i,o)),n[f]?o[f](i):o[f]=i)}}}),q=p.prototype;p.bezierThrough=l,p.cubicToQuadratic=i,p._autoCSS=!0,p.quadraticToCubic=function(a,b,c){return new g(a,(2*b+a)/3,(2*b+c)/3,c)},p._cssRegister=function(){var a=f.CSSPlugin;if(a){var b=a._internals,c=b._parseToProxy,d=b._setPluginRatio,e=b.CSSPropTween;b._registerComplexSpecialProp("bezier",{parser:function(a,b,f,g,h,i){b instanceof Array&&(b={values:b}),i=new p;var j,k,l,m=b.values,n=m.length-1,o=[],q={};if(0>n)return h;for(j=0;n>=j;j++)l=c(a,m[j],g,h,i,n!==j),o[j]=l.end;for(k in b)q[k]=b[k];return q.values=o,h=new e(a,"bezier",0,0,l.pt,2),h.data=l,h.plugin=i,h.setRatio=d,0===q.autoRotate&&(q.autoRotate=!0),!q.autoRotate||q.autoRotate instanceof Array||(j=q.autoRotate===!0?0:Number(q.autoRotate),q.autoRotate=null!=l.end.left?[["left","top","rotation",j,!1]]:null!=l.end.x?[["x","y","rotation",j,!1]]:!1),q.autoRotate&&(g._transform||g._enableTransforms(!1),l.autoRotate=g._target._gsTransform,l.proxy.rotation=l.autoRotate.rotation||0,g._overwriteProps.push("rotation")),i._onInitTween(l.proxy,q,g._tween),h}})}},q._mod=function(a){for(var b,c=this._overwriteProps,d=c.length;--d>-1;)b=a[c[d]],b&&"function"==typeof b&&(this._mod[c[d]]=b)},q._kill=function(a){var b,c,d=this._props;for(b in this._beziers)if(b in a)for(delete this._beziers[b],delete this._func[b],c=d.length;--c>-1;)d[c]===b&&d.splice(c,1);if(d=this._autoRotate)for(c=d.length;--c>-1;)a[d[c][2]]&&d.splice(c,1);return this._super._kill.call(this,a)}}(),_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(a,b){var c,d,e,f,g=function(){a.call(this,"css"),this._overwriteProps.length=0,this.setRatio=g.prototype.setRatio},h=_gsScope._gsDefine.globals,i={},j=g.prototype=new a("css");j.constructor=g,g.version="1.19.1",g.API=2,g.defaultTransformPerspective=0,g.defaultSkewType="compensated",g.defaultSmoothOrigin=!0,j="px",g.suffixMap={top:j,right:j,bottom:j,left:j,width:j,height:j,fontSize:j,padding:j,margin:j,perspective:j,lineHeight:""};var k,l,m,n,o,p,q,r,s=/(?:\-|\.|\b)(\d|\.|e\-)+/g,t=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,u=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,v=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,w=/(?:\d|\-|\+|=|#|\.)*/g,x=/opacity *= *([^)]*)/i,y=/opacity:([^;]*)/i,z=/alpha\(opacity *=.+?\)/i,A=/^(rgb|hsl)/,B=/([A-Z])/g,C=/-([a-z])/gi,D=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,E=function(a,b){return b.toUpperCase()},F=/(?:Left|Right|Width)/i,G=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,H=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,I=/,(?=[^\)]*(?:\(|$))/gi,J=/[\s,\(]/i,K=Math.PI/180,L=180/Math.PI,M={},N={style:{}},O=_gsScope.document||{createElement:function(){return N}},P=function(a,b){return O.createElementNS?O.createElementNS(b||"http://www.w3.org/1999/xhtml",a):O.createElement(a)},Q=P("div"),R=P("img"),S=g._internals={_specialProps:i},T=(_gsScope.navigator||{}).userAgent||"",U=function(){var a=T.indexOf("Android"),b=P("a");return m=-1!==T.indexOf("Safari")&&-1===T.indexOf("Chrome")&&(-1===a||parseFloat(T.substr(a+8,2))>3),o=m&&parseFloat(T.substr(T.indexOf("Version/")+8,2))<6,n=-1!==T.indexOf("Firefox"),(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(T)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(T))&&(p=parseFloat(RegExp.$1)),b?(b.style.cssText="top:1px;opacity:.55;",/^0.55/.test(b.style.opacity)):!1}(),V=function(a){return x.test("string"==typeof a?a:(a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100:1},W=function(a){_gsScope.console&&console.log(a)},X="",Y="",Z=function(a,b){b=b||Q;var c,d,e=b.style;if(void 0!==e[a])return a;for(a=a.charAt(0).toUpperCase()+a.substr(1),c=["O","Moz","ms","Ms","Webkit"],d=5;--d>-1&&void 0===e[c[d]+a];);return d>=0?(Y=3===d?"ms":c[d],X="-"+Y.toLowerCase()+"-",Y+a):null},$=O.defaultView?O.defaultView.getComputedStyle:function(){},_=g.getStyle=function(a,b,c,d,e){var f;return U||"opacity"!==b?(!d&&a.style[b]?f=a.style[b]:(c=c||$(a))?f=c[b]||c.getPropertyValue(b)||c.getPropertyValue(b.replace(B,"-$1").toLowerCase()):a.currentStyle&&(f=a.currentStyle[b]),null==e||f&&"none"!==f&&"auto"!==f&&"auto auto"!==f?f:e):V(a)},aa=S.convertToPixels=function(a,c,d,e,f){if("px"===e||!e)return d;if("auto"===e||!d)return 0;var h,i,j,k=F.test(c),l=a,m=Q.style,n=0>d,o=1===d;if(n&&(d=-d),o&&(d*=100),"%"===e&&-1!==c.indexOf("border"))h=d/100*(k?a.clientWidth:a.clientHeight);else{if(m.cssText="border:0 solid red;position:"+_(a,"position")+";line-height:0;","%"!==e&&l.appendChild&&"v"!==e.charAt(0)&&"rem"!==e)m[k?"borderLeftWidth":"borderTopWidth"]=d+e;else{if(l=a.parentNode||O.body,i=l._gsCache,j=b.ticker.frame,i&&k&&i.time===j)return i.width*d/100;m[k?"width":"height"]=d+e}l.appendChild(Q),h=parseFloat(Q[k?"offsetWidth":"offsetHeight"]),l.removeChild(Q),k&&"%"===e&&g.cacheWidths!==!1&&(i=l._gsCache=l._gsCache||{},i.time=j,i.width=h/d*100),0!==h||f||(h=aa(a,c,d,e,!0))}return o&&(h/=100),n?-h:h},ba=S.calculateOffset=function(a,b,c){if("absolute"!==_(a,"position",c))return 0;var d="left"===b?"Left":"Top",e=_(a,"margin"+d,c);return a["offset"+d]-(aa(a,b,parseFloat(e),e.replace(w,""))||0)},ca=function(a,b){var c,d,e,f={};if(b=b||$(a,null))if(c=b.length)for(;--c>-1;)e=b[c],(-1===e.indexOf("-transform")||Da===e)&&(f[e.replace(C,E)]=b.getPropertyValue(e));else for(c in b)(-1===c.indexOf("Transform")||Ca===c)&&(f[c]=b[c]);else if(b=a.currentStyle||a.style)for(c in b)"string"==typeof c&&void 0===f[c]&&(f[c.replace(C,E)]=b[c]);return U||(f.opacity=V(a)),d=Ra(a,b,!1),f.rotation=d.rotation,f.skewX=d.skewX,f.scaleX=d.scaleX,f.scaleY=d.scaleY,f.x=d.x,f.y=d.y,Fa&&(f.z=d.z,f.rotationX=d.rotationX,f.rotationY=d.rotationY,f.scaleZ=d.scaleZ),f.filters&&delete f.filters,f},da=function(a,b,c,d,e){var f,g,h,i={},j=a.style;for(g in c)"cssText"!==g&&"length"!==g&&isNaN(g)&&(b[g]!==(f=c[g])||e&&e[g])&&-1===g.indexOf("Origin")&&("number"==typeof f||"string"==typeof f)&&(i[g]="auto"!==f||"left"!==g&&"top"!==g?""!==f&&"auto"!==f&&"none"!==f||"string"!=typeof b[g]||""===b[g].replace(v,"")?f:0:ba(a,g),void 0!==j[g]&&(h=new sa(j,g,j[g],h)));if(d)for(g in d)"className"!==g&&(i[g]=d[g]);return{difs:i,firstMPT:h}},ea={width:["Left","Right"],height:["Top","Bottom"]},fa=["marginLeft","marginRight","marginTop","marginBottom"],ga=function(a,b,c){if("svg"===(a.nodeName+"").toLowerCase())return(c||$(a))[b]||0;if(a.getCTM&&Oa(a))return a.getBBox()[b]||0;var d=parseFloat("width"===b?a.offsetWidth:a.offsetHeight),e=ea[b],f=e.length;for(c=c||$(a,null);--f>-1;)d-=parseFloat(_(a,"padding"+e[f],c,!0))||0,d-=parseFloat(_(a,"border"+e[f]+"Width",c,!0))||0;return d},ha=function(a,b){if("contain"===a||"auto"===a||"auto auto"===a)return a+" ";(null==a||""===a)&&(a="0 0");var c,d=a.split(" "),e=-1!==a.indexOf("left")?"0%":-1!==a.indexOf("right")?"100%":d[0],f=-1!==a.indexOf("top")?"0%":-1!==a.indexOf("bottom")?"100%":d[1];if(d.length>3&&!b){for(d=a.split(", ").join(",").split(","),a=[],c=0;c<d.length;c++)a.push(ha(d[c]));return a.join(",")}return null==f?f="center"===e?"50%":"0":"center"===f&&(f="50%"),("center"===e||isNaN(parseFloat(e))&&-1===(e+"").indexOf("="))&&(e="50%"),a=e+" "+f+(d.length>2?" "+d[2]:""),b&&(b.oxp=-1!==e.indexOf("%"),b.oyp=-1!==f.indexOf("%"),b.oxr="="===e.charAt(1),b.oyr="="===f.charAt(1),b.ox=parseFloat(e.replace(v,"")),b.oy=parseFloat(f.replace(v,"")),b.v=a),b||a},ia=function(a,b){return"function"==typeof a&&(a=a(r,q)),"string"==typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+"1",10)*parseFloat(a.substr(2)):parseFloat(a)-parseFloat(b)||0},ja=function(a,b){return"function"==typeof a&&(a=a(r,q)),null==a?b:"string"==typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+"1",10)*parseFloat(a.substr(2))+b:parseFloat(a)||0},ka=function(a,b,c,d){var e,f,g,h,i,j=1e-6;return"function"==typeof a&&(a=a(r,q)),null==a?h=b:"number"==typeof a?h=a:(e=360,f=a.split("_"),i="="===a.charAt(1),g=(i?parseInt(a.charAt(0)+"1",10)*parseFloat(f[0].substr(2)):parseFloat(f[0]))*(-1===a.indexOf("rad")?1:L)-(i?0:b),f.length&&(d&&(d[c]=b+g),-1!==a.indexOf("short")&&(g%=e,g!==g%(e/2)&&(g=0>g?g+e:g-e)),-1!==a.indexOf("_cw")&&0>g?g=(g+9999999999*e)%e-(g/e|0)*e:-1!==a.indexOf("ccw")&&g>0&&(g=(g-9999999999*e)%e-(g/e|0)*e)),h=b+g),j>h&&h>-j&&(h=0),h},la={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},ma=function(a,b,c){return a=0>a?a+1:a>1?a-1:a,255*(1>6*a?b+(c-b)*a*6:.5>a?c:2>3*a?b+(c-b)*(2/3-a)*6:b)+.5|0},na=g.parseColor=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;if(a)if("number"==typeof a)c=[a>>16,a>>8&255,255&a];else{if(","===a.charAt(a.length-1)&&(a=a.substr(0,a.length-1)),la[a])c=la[a];else if("#"===a.charAt(0))4===a.length&&(d=a.charAt(1),e=a.charAt(2),f=a.charAt(3),a="#"+d+d+e+e+f+f),a=parseInt(a.substr(1),16),c=[a>>16,a>>8&255,255&a];else if("hsl"===a.substr(0,3))if(c=m=a.match(s),b){if(-1!==a.indexOf("="))return a.match(t)}else g=Number(c[0])%360/360,h=Number(c[1])/100,i=Number(c[2])/100,e=.5>=i?i*(h+1):i+h-i*h,d=2*i-e,c.length>3&&(c[3]=Number(a[3])),c[0]=ma(g+1/3,d,e),c[1]=ma(g,d,e),c[2]=ma(g-1/3,d,e);else c=a.match(s)||la.transparent;c[0]=Number(c[0]),c[1]=Number(c[1]),c[2]=Number(c[2]),c.length>3&&(c[3]=Number(c[3]))}else c=la.black;return b&&!m&&(d=c[0]/255,e=c[1]/255,f=c[2]/255,j=Math.max(d,e,f),k=Math.min(d,e,f),i=(j+k)/2,j===k?g=h=0:(l=j-k,h=i>.5?l/(2-j-k):l/(j+k),g=j===d?(e-f)/l+(f>e?6:0):j===e?(f-d)/l+2:(d-e)/l+4,g*=60),c[0]=g+.5|0,c[1]=100*h+.5|0,c[2]=100*i+.5|0),c},oa=function(a,b){var c,d,e,f=a.match(pa)||[],g=0,h=f.length?"":a;for(c=0;c<f.length;c++)d=f[c],e=a.substr(g,a.indexOf(d,g)-g),g+=e.length+d.length,d=na(d,b),3===d.length&&d.push(1),h+=e+(b?"hsla("+d[0]+","+d[1]+"%,"+d[2]+"%,"+d[3]:"rgba("+d.join(","))+")";return h+a.substr(g)},pa="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";for(j in la)pa+="|"+j+"\\b";pa=new RegExp(pa+")","gi"),g.colorStringFilter=function(a){var b,c=a[0]+a[1];pa.test(c)&&(b=-1!==c.indexOf("hsl(")||-1!==c.indexOf("hsla("),a[0]=oa(a[0],b),a[1]=oa(a[1],b)),pa.lastIndex=0},b.defaultStringFilter||(b.defaultStringFilter=g.colorStringFilter);var qa=function(a,b,c,d){if(null==a)return function(a){return a};var e,f=b?(a.match(pa)||[""])[0]:"",g=a.split(f).join("").match(u)||[],h=a.substr(0,a.indexOf(g[0])),i=")"===a.charAt(a.length-1)?")":"",j=-1!==a.indexOf(" ")?" ":",",k=g.length,l=k>0?g[0].replace(s,""):"";return k?e=b?function(a){var b,m,n,o;if("number"==typeof a)a+=l;else if(d&&I.test(a)){for(o=a.replace(I,"|").split("|"),n=0;n<o.length;n++)o[n]=e(o[n]);return o.join(",")}if(b=(a.match(pa)||[f])[0],m=a.split(b).join("").match(u)||[],n=m.length,k>n--)for(;++n<k;)m[n]=c?m[(n-1)/2|0]:g[n];return h+m.join(j)+j+b+i+(-1!==a.indexOf("inset")?" inset":"")}:function(a){var b,f,m;if("number"==typeof a)a+=l;else if(d&&I.test(a)){for(f=a.replace(I,"|").split("|"),m=0;m<f.length;m++)f[m]=e(f[m]);return f.join(",")}if(b=a.match(u)||[],m=b.length,k>m--)for(;++m<k;)b[m]=c?b[(m-1)/2|0]:g[m];return h+b.join(j)+i}:function(a){return a}},ra=function(a){return a=a.split(","),function(b,c,d,e,f,g,h){var i,j=(c+"").split(" ");for(h={},i=0;4>i;i++)h[a[i]]=j[i]=j[i]||j[(i-1)/2>>0];return e.parse(b,h,f,g)}},sa=(S._setPluginRatio=function(a){this.plugin.setRatio(a);for(var b,c,d,e,f,g=this.data,h=g.proxy,i=g.firstMPT,j=1e-6;i;)b=h[i.v],i.r?b=Math.round(b):j>b&&b>-j&&(b=0),i.t[i.p]=b,i=i._next;if(g.autoRotate&&(g.autoRotate.rotation=g.mod?g.mod(h.rotation,this.t):h.rotation),1===a||0===a)for(i=g.firstMPT,f=1===a?"e":"b";i;){if(c=i.t,c.type){if(1===c.type){for(e=c.xs0+c.s+c.xs1,d=1;d<c.l;d++)e+=c["xn"+d]+c["xs"+(d+1)];c[f]=e}}else c[f]=c.s+c.xs0;i=i._next}},function(a,b,c,d,e){this.t=a,this.p=b,this.v=c,this.r=e,d&&(d._prev=this,this._next=d)}),ta=(S._parseToProxy=function(a,b,c,d,e,f){var g,h,i,j,k,l=d,m={},n={},o=c._transform,p=M;for(c._transform=null,M=b,d=k=c.parse(a,b,d,e),M=p,f&&(c._transform=o,l&&(l._prev=null,l._prev&&(l._prev._next=null)));d&&d!==l;){if(d.type<=1&&(h=d.p,n[h]=d.s+d.c,m[h]=d.s,f||(j=new sa(d,"s",h,j,d.r),d.c=0),1===d.type))for(g=d.l;--g>0;)i="xn"+g,h=d.p+"_"+i,n[h]=d.data[i],m[h]=d[i],f||(j=new sa(d,i,h,j,d.rxp[i]));d=d._next}return{proxy:m,end:n,firstMPT:j,pt:k}},S.CSSPropTween=function(a,b,d,e,g,h,i,j,k,l,m){this.t=a,this.p=b,this.s=d,this.c=e,this.n=i||b,a instanceof ta||f.push(this.n),this.r=j,this.type=h||0,k&&(this.pr=k,c=!0),this.b=void 0===l?d:l,this.e=void 0===m?d+e:m,g&&(this._next=g,g._prev=this)}),ua=function(a,b,c,d,e,f){var g=new ta(a,b,c,d-c,e,-1,f);return g.b=c,g.e=g.xs0=d,g},va=g.parseComplex=function(a,b,c,d,e,f,h,i,j,l){c=c||f||"","function"==typeof d&&(d=d(r,q)),h=new ta(a,b,0,0,h,l?2:1,null,!1,i,c,d),d+="",e&&pa.test(d+c)&&(d=[c,d],g.colorStringFilter(d),c=d[0],d=d[1]);var m,n,o,p,u,v,w,x,y,z,A,B,C,D=c.split(", ").join(",").split(" "),E=d.split(", ").join(",").split(" "),F=D.length,G=k!==!1;for((-1!==d.indexOf(",")||-1!==c.indexOf(","))&&(D=D.join(" ").replace(I,", ").split(" "),E=E.join(" ").replace(I,", ").split(" "),F=D.length),F!==E.length&&(D=(f||"").split(" "),F=D.length),h.plugin=j,h.setRatio=l,pa.lastIndex=0,m=0;F>m;m++)if(p=D[m],u=E[m],x=parseFloat(p),x||0===x)h.appendXtra("",x,ia(u,x),u.replace(t,""),G&&-1!==u.indexOf("px"),!0);else if(e&&pa.test(p))B=u.indexOf(")")+1,B=")"+(B?u.substr(B):""),C=-1!==u.indexOf("hsl")&&U,p=na(p,C),u=na(u,C),y=p.length+u.length>6,y&&!U&&0===u[3]?(h["xs"+h.l]+=h.l?" transparent":"transparent",h.e=h.e.split(E[m]).join("transparent")):(U||(y=!1),C?h.appendXtra(y?"hsla(":"hsl(",p[0],ia(u[0],p[0]),",",!1,!0).appendXtra("",p[1],ia(u[1],p[1]),"%,",!1).appendXtra("",p[2],ia(u[2],p[2]),y?"%,":"%"+B,!1):h.appendXtra(y?"rgba(":"rgb(",p[0],u[0]-p[0],",",!0,!0).appendXtra("",p[1],u[1]-p[1],",",!0).appendXtra("",p[2],u[2]-p[2],y?",":B,!0),y&&(p=p.length<4?1:p[3],h.appendXtra("",p,(u.length<4?1:u[3])-p,B,!1))),pa.lastIndex=0;else if(v=p.match(s)){if(w=u.match(t),!w||w.length!==v.length)return h;for(o=0,n=0;n<v.length;n++)A=v[n],z=p.indexOf(A,o),h.appendXtra(p.substr(o,z-o),Number(A),ia(w[n],A),"",G&&"px"===p.substr(z+A.length,2),0===n),o=z+A.length;h["xs"+h.l]+=p.substr(o)}else h["xs"+h.l]+=h.l||h["xs"+h.l]?" "+u:u;if(-1!==d.indexOf("=")&&h.data){for(B=h.xs0+h.data.s,m=1;m<h.l;m++)B+=h["xs"+m]+h.data["xn"+m];h.e=B+h["xs"+m]}return h.l||(h.type=-1,h.xs0=h.e),h.xfirst||h},wa=9;for(j=ta.prototype,j.l=j.pr=0;--wa>0;)j["xn"+wa]=0,j["xs"+wa]="";j.xs0="",j._next=j._prev=j.xfirst=j.data=j.plugin=j.setRatio=j.rxp=null,j.appendXtra=function(a,b,c,d,e,f){var g=this,h=g.l;return g["xs"+h]+=f&&(h||g["xs"+h])?" "+a:a||"",c||0===h||g.plugin?(g.l++,g.type=g.setRatio?2:1,g["xs"+g.l]=d||"",h>0?(g.data["xn"+h]=b+c,g.rxp["xn"+h]=e,g["xn"+h]=b,g.plugin||(g.xfirst=new ta(g,"xn"+h,b,c,g.xfirst||g,0,g.n,e,g.pr),g.xfirst.xs0=0),g):(g.data={s:b+c},g.rxp={},g.s=b,g.c=c,g.r=e,g)):(g["xs"+h]+=b+(d||""),g)};var xa=function(a,b){b=b||{},this.p=b.prefix?Z(a)||a:a,i[a]=i[this.p]=this,this.format=b.formatter||qa(b.defaultValue,b.color,b.collapsible,b.multi),b.parser&&(this.parse=b.parser),this.clrs=b.color,this.multi=b.multi,this.keyword=b.keyword,this.dflt=b.defaultValue,this.pr=b.priority||0},ya=S._registerComplexSpecialProp=function(a,b,c){"object"!=typeof b&&(b={parser:c});var d,e,f=a.split(","),g=b.defaultValue;for(c=c||[g],d=0;d<f.length;d++)b.prefix=0===d&&b.prefix,b.defaultValue=c[d]||g,e=new xa(f[d],b)},za=S._registerPluginProp=function(a){if(!i[a]){var b=a.charAt(0).toUpperCase()+a.substr(1)+"Plugin";ya(a,{parser:function(a,c,d,e,f,g,j){var k=h.com.greensock.plugins[b];return k?(k._cssRegister(),i[d].parse(a,c,d,e,f,g,j)):(W("Error: "+b+" js file not loaded."),f)}})}};j=xa.prototype,j.parseComplex=function(a,b,c,d,e,f){var g,h,i,j,k,l,m=this.keyword;if(this.multi&&(I.test(c)||I.test(b)?(h=b.replace(I,"|").split("|"),i=c.replace(I,"|").split("|")):m&&(h=[b],i=[c])),i){for(j=i.length>h.length?i.length:h.length,g=0;j>g;g++)b=h[g]=h[g]||this.dflt,c=i[g]=i[g]||this.dflt,m&&(k=b.indexOf(m),l=c.indexOf(m),k!==l&&(-1===l?h[g]=h[g].split(m).join(""):-1===k&&(h[g]+=" "+m)));b=h.join(", "),c=i.join(", ")}return va(a,this.p,b,c,this.clrs,this.dflt,d,this.pr,e,f)},j.parse=function(a,b,c,d,f,g,h){return this.parseComplex(a.style,this.format(_(a,this.p,e,!1,this.dflt)),this.format(b),f,g)},g.registerSpecialProp=function(a,b,c){ya(a,{parser:function(a,d,e,f,g,h,i){var j=new ta(a,e,0,0,g,2,e,!1,c);return j.plugin=h,j.setRatio=b(a,d,f._tween,e),j},priority:c})},g.useSVGTransformAttr=!0;var Aa,Ba="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),Ca=Z("transform"),Da=X+"transform",Ea=Z("transformOrigin"),Fa=null!==Z("perspective"),Ga=S.Transform=function(){this.perspective=parseFloat(g.defaultTransformPerspective)||0,this.force3D=g.defaultForce3D!==!1&&Fa?g.defaultForce3D||"auto":!1},Ha=_gsScope.SVGElement,Ia=function(a,b,c){var d,e=O.createElementNS("http://www.w3.org/2000/svg",a),f=/([a-z])([A-Z])/g;for(d in c)e.setAttributeNS(null,d.replace(f,"$1-$2").toLowerCase(),c[d]);return b.appendChild(e),e},Ja=O.documentElement||{},Ka=function(){var a,b,c,d=p||/Android/i.test(T)&&!_gsScope.chrome;return O.createElementNS&&!d&&(a=Ia("svg",Ja),b=Ia("rect",a,{width:100,height:50,x:100}),c=b.getBoundingClientRect().width,b.style[Ea]="50% 50%",b.style[Ca]="scaleX(0.5)",d=c===b.getBoundingClientRect().width&&!(n&&Fa),Ja.removeChild(a)),d}(),La=function(a,b,c,d,e,f){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=a._gsTransform,w=Qa(a,!0);v&&(t=v.xOrigin,u=v.yOrigin),(!d||(h=d.split(" ")).length<2)&&(n=a.getBBox(),0===n.x&&0===n.y&&n.width+n.height===0&&(n={x:parseFloat(a.hasAttribute("x")?a.getAttribute("x"):a.hasAttribute("cx")?a.getAttribute("cx"):0)||0,y:parseFloat(a.hasAttribute("y")?a.getAttribute("y"):a.hasAttribute("cy")?a.getAttribute("cy"):0)||0,width:0,height:0}),b=ha(b).split(" "),h=[(-1!==b[0].indexOf("%")?parseFloat(b[0])/100*n.width:parseFloat(b[0]))+n.x,(-1!==b[1].indexOf("%")?parseFloat(b[1])/100*n.height:parseFloat(b[1]))+n.y]),c.xOrigin=k=parseFloat(h[0]),c.yOrigin=l=parseFloat(h[1]),d&&w!==Pa&&(m=w[0],n=w[1],o=w[2],p=w[3],q=w[4],r=w[5],s=m*p-n*o,s&&(i=k*(p/s)+l*(-o/s)+(o*r-p*q)/s,j=k*(-n/s)+l*(m/s)-(m*r-n*q)/s,k=c.xOrigin=h[0]=i,l=c.yOrigin=h[1]=j)),v&&(f&&(c.xOffset=v.xOffset,c.yOffset=v.yOffset,v=c),e||e!==!1&&g.defaultSmoothOrigin!==!1?(i=k-t,j=l-u,v.xOffset+=i*w[0]+j*w[2]-i,v.yOffset+=i*w[1]+j*w[3]-j):v.xOffset=v.yOffset=0),f||a.setAttribute("data-svg-origin",h.join(" "))},Ma=function(a){var b,c=P("svg",this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),d=this.parentNode,e=this.nextSibling,f=this.style.cssText;if(Ja.appendChild(c),c.appendChild(this),this.style.display="block",a)try{b=this.getBBox(),this._originalGetBBox=this.getBBox,this.getBBox=Ma}catch(g){}else this._originalGetBBox&&(b=this._originalGetBBox());return e?d.insertBefore(this,e):d.appendChild(this),Ja.removeChild(c),this.style.cssText=f,b},Na=function(a){try{return a.getBBox()}catch(b){return Ma.call(a,!0)}},Oa=function(a){return!(!(Ha&&a.getCTM&&Na(a))||a.parentNode&&!a.ownerSVGElement)},Pa=[1,0,0,1,0,0],Qa=function(a,b){var c,d,e,f,g,h,i=a._gsTransform||new Ga,j=1e5,k=a.style;if(Ca?d=_(a,Da,null,!0):a.currentStyle&&(d=a.currentStyle.filter.match(G),d=d&&4===d.length?[d[0].substr(4),Number(d[2].substr(4)),Number(d[1].substr(4)),d[3].substr(4),i.x||0,i.y||0].join(","):""),c=!d||"none"===d||"matrix(1, 0, 0, 1, 0, 0)"===d,c&&Ca&&((h="none"===$(a).display)||!a.parentNode)&&(h&&(f=k.display,k.display="block"),a.parentNode||(g=1,Ja.appendChild(a)),d=_(a,Da,null,!0),c=!d||"none"===d||"matrix(1, 0, 0, 1, 0, 0)"===d,f?k.display=f:h&&Va(k,"display"),g&&Ja.removeChild(a)),(i.svg||a.getCTM&&Oa(a))&&(c&&-1!==(k[Ca]+"").indexOf("matrix")&&(d=k[Ca],c=0),e=a.getAttribute("transform"),c&&e&&(-1!==e.indexOf("matrix")?(d=e,c=0):-1!==e.indexOf("translate")&&(d="matrix(1,0,0,1,"+e.match(/(?:\-|\b)[\d\-\.e]+\b/gi).join(",")+")",c=0))),c)return Pa;for(e=(d||"").match(s)||[],wa=e.length;--wa>-1;)f=Number(e[wa]),e[wa]=(g=f-(f|=0))?(g*j+(0>g?-.5:.5)|0)/j+f:f;return b&&e.length>6?[e[0],e[1],e[4],e[5],e[12],e[13]]:e},Ra=S.getTransform=function(a,c,d,e){if(a._gsTransform&&d&&!e)return a._gsTransform;var f,h,i,j,k,l,m=d?a._gsTransform||new Ga:new Ga,n=m.scaleX<0,o=2e-5,p=1e5,q=Fa?parseFloat(_(a,Ea,c,!1,"0 0 0").split(" ")[2])||m.zOrigin||0:0,r=parseFloat(g.defaultTransformPerspective)||0;if(m.svg=!(!a.getCTM||!Oa(a)),m.svg&&(La(a,_(a,Ea,c,!1,"50% 50%")+"",m,a.getAttribute("data-svg-origin")),Aa=g.useSVGTransformAttr||Ka),f=Qa(a),f!==Pa){if(16===f.length){var s,t,u,v,w,x=f[0],y=f[1],z=f[2],A=f[3],B=f[4],C=f[5],D=f[6],E=f[7],F=f[8],G=f[9],H=f[10],I=f[12],J=f[13],K=f[14],M=f[11],N=Math.atan2(D,H);m.zOrigin&&(K=-m.zOrigin,I=F*K-f[12],J=G*K-f[13],K=H*K+m.zOrigin-f[14]),m.rotationX=N*L,N&&(v=Math.cos(-N),w=Math.sin(-N),s=B*v+F*w,t=C*v+G*w,u=D*v+H*w,F=B*-w+F*v,G=C*-w+G*v,H=D*-w+H*v,M=E*-w+M*v,B=s,C=t,D=u),N=Math.atan2(-z,H),m.rotationY=N*L,N&&(v=Math.cos(-N),w=Math.sin(-N),s=x*v-F*w,t=y*v-G*w,u=z*v-H*w,G=y*w+G*v,H=z*w+H*v,M=A*w+M*v,x=s,y=t,z=u),N=Math.atan2(y,x),m.rotation=N*L,N&&(v=Math.cos(-N),w=Math.sin(-N),x=x*v+B*w,t=y*v+C*w,C=y*-w+C*v,D=z*-w+D*v,y=t),m.rotationX&&Math.abs(m.rotationX)+Math.abs(m.rotation)>359.9&&(m.rotationX=m.rotation=0,m.rotationY=180-m.rotationY),m.scaleX=(Math.sqrt(x*x+y*y)*p+.5|0)/p,m.scaleY=(Math.sqrt(C*C+G*G)*p+.5|0)/p,m.scaleZ=(Math.sqrt(D*D+H*H)*p+.5|0)/p,m.rotationX||m.rotationY?m.skewX=0:(m.skewX=B||C?Math.atan2(B,C)*L+m.rotation:m.skewX||0,Math.abs(m.skewX)>90&&Math.abs(m.skewX)<270&&(n?(m.scaleX*=-1,m.skewX+=m.rotation<=0?180:-180,m.rotation+=m.rotation<=0?180:-180):(m.scaleY*=-1,m.skewX+=m.skewX<=0?180:-180))),m.perspective=M?1/(0>M?-M:M):0,m.x=I,m.y=J,m.z=K,m.svg&&(m.x-=m.xOrigin-(m.xOrigin*x-m.yOrigin*B),m.y-=m.yOrigin-(m.yOrigin*y-m.xOrigin*C))}else if(!Fa||e||!f.length||m.x!==f[4]||m.y!==f[5]||!m.rotationX&&!m.rotationY){var O=f.length>=6,P=O?f[0]:1,Q=f[1]||0,R=f[2]||0,S=O?f[3]:1;m.x=f[4]||0,m.y=f[5]||0,i=Math.sqrt(P*P+Q*Q),j=Math.sqrt(S*S+R*R),k=P||Q?Math.atan2(Q,P)*L:m.rotation||0,l=R||S?Math.atan2(R,S)*L+k:m.skewX||0,Math.abs(l)>90&&Math.abs(l)<270&&(n?(i*=-1,l+=0>=k?180:-180,k+=0>=k?180:-180):(j*=-1,l+=0>=l?180:-180)),m.scaleX=i,m.scaleY=j,m.rotation=k,m.skewX=l,Fa&&(m.rotationX=m.rotationY=m.z=0,m.perspective=r,m.scaleZ=1),m.svg&&(m.x-=m.xOrigin-(m.xOrigin*P+m.yOrigin*R),m.y-=m.yOrigin-(m.xOrigin*Q+m.yOrigin*S))}m.zOrigin=q;for(h in m)m[h]<o&&m[h]>-o&&(m[h]=0)}return d&&(a._gsTransform=m,m.svg&&(Aa&&a.style[Ca]?b.delayedCall(.001,function(){Va(a.style,Ca)}):!Aa&&a.getAttribute("transform")&&b.delayedCall(.001,function(){a.removeAttribute("transform")}))),m},Sa=function(a){var b,c,d=this.data,e=-d.rotation*K,f=e+d.skewX*K,g=1e5,h=(Math.cos(e)*d.scaleX*g|0)/g,i=(Math.sin(e)*d.scaleX*g|0)/g,j=(Math.sin(f)*-d.scaleY*g|0)/g,k=(Math.cos(f)*d.scaleY*g|0)/g,l=this.t.style,m=this.t.currentStyle;if(m){c=i,i=-j,j=-c,b=m.filter,l.filter="";var n,o,q=this.t.offsetWidth,r=this.t.offsetHeight,s="absolute"!==m.position,t="progid:DXImageTransform.Microsoft.Matrix(M11="+h+", M12="+i+", M21="+j+", M22="+k,u=d.x+q*d.xPercent/100,v=d.y+r*d.yPercent/100;if(null!=d.ox&&(n=(d.oxp?q*d.ox*.01:d.ox)-q/2,o=(d.oyp?r*d.oy*.01:d.oy)-r/2,u+=n-(n*h+o*i),v+=o-(n*j+o*k)),s?(n=q/2,o=r/2,t+=", Dx="+(n-(n*h+o*i)+u)+", Dy="+(o-(n*j+o*k)+v)+")"):t+=", sizingMethod='auto expand')",-1!==b.indexOf("DXImageTransform.Microsoft.Matrix(")?l.filter=b.replace(H,t):l.filter=t+" "+b,(0===a||1===a)&&1===h&&0===i&&0===j&&1===k&&(s&&-1===t.indexOf("Dx=0, Dy=0")||x.test(b)&&100!==parseFloat(RegExp.$1)||-1===b.indexOf(b.indexOf("Alpha"))&&l.removeAttribute("filter")),!s){var y,z,A,B=8>p?1:-1;for(n=d.ieOffsetX||0,o=d.ieOffsetY||0,d.ieOffsetX=Math.round((q-((0>h?-h:h)*q+(0>i?-i:i)*r))/2+u),d.ieOffsetY=Math.round((r-((0>k?-k:k)*r+(0>j?-j:j)*q))/2+v),wa=0;4>wa;wa++)z=fa[wa],y=m[z],c=-1!==y.indexOf("px")?parseFloat(y):aa(this.t,z,parseFloat(y),y.replace(w,""))||0,A=c!==d[z]?2>wa?-d.ieOffsetX:-d.ieOffsetY:2>wa?n-d.ieOffsetX:o-d.ieOffsetY,l[z]=(d[z]=Math.round(c-A*(0===wa||2===wa?1:B)))+"px"}}},Ta=S.set3DTransformRatio=S.setTransformRatio=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,o,p,q,r,s,t,u,v,w,x,y,z=this.data,A=this.t.style,B=z.rotation,C=z.rotationX,D=z.rotationY,E=z.scaleX,F=z.scaleY,G=z.scaleZ,H=z.x,I=z.y,J=z.z,L=z.svg,M=z.perspective,N=z.force3D,O=z.skewY,P=z.skewX;if(O&&(P+=O,B+=O),((1===a||0===a)&&"auto"===N&&(this.tween._totalTime===this.tween._totalDuration||!this.tween._totalTime)||!N)&&!J&&!M&&!D&&!C&&1===G||Aa&&L||!Fa)return void(B||P||L?(B*=K,x=P*K,y=1e5,c=Math.cos(B)*E,f=Math.sin(B)*E,d=Math.sin(B-x)*-F,g=Math.cos(B-x)*F,x&&"simple"===z.skewType&&(b=Math.tan(x-O*K),b=Math.sqrt(1+b*b),d*=b,g*=b,O&&(b=Math.tan(O*K),b=Math.sqrt(1+b*b),c*=b,f*=b)),L&&(H+=z.xOrigin-(z.xOrigin*c+z.yOrigin*d)+z.xOffset,I+=z.yOrigin-(z.xOrigin*f+z.yOrigin*g)+z.yOffset,Aa&&(z.xPercent||z.yPercent)&&(q=this.t.getBBox(),H+=.01*z.xPercent*q.width,I+=.01*z.yPercent*q.height),q=1e-6,q>H&&H>-q&&(H=0),q>I&&I>-q&&(I=0)),u=(c*y|0)/y+","+(f*y|0)/y+","+(d*y|0)/y+","+(g*y|0)/y+","+H+","+I+")",L&&Aa?this.t.setAttribute("transform","matrix("+u):A[Ca]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix(":"matrix(")+u):A[Ca]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix(":"matrix(")+E+",0,0,"+F+","+H+","+I+")");if(n&&(q=1e-4,q>E&&E>-q&&(E=G=2e-5),q>F&&F>-q&&(F=G=2e-5),!M||z.z||z.rotationX||z.rotationY||(M=0)),B||P)B*=K,r=c=Math.cos(B),s=f=Math.sin(B),P&&(B-=P*K,r=Math.cos(B),s=Math.sin(B),"simple"===z.skewType&&(b=Math.tan((P-O)*K),b=Math.sqrt(1+b*b),r*=b,s*=b,z.skewY&&(b=Math.tan(O*K),b=Math.sqrt(1+b*b),c*=b,f*=b))),d=-s,g=r;else{if(!(D||C||1!==G||M||L))return void(A[Ca]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) translate3d(":"translate3d(")+H+"px,"+I+"px,"+J+"px)"+(1!==E||1!==F?" scale("+E+","+F+")":""));c=g=1,d=f=0}k=1,e=h=i=j=l=m=0,o=M?-1/M:0,p=z.zOrigin,q=1e-6,v=",",w="0",B=D*K,B&&(r=Math.cos(B),s=Math.sin(B),i=-s,l=o*-s,e=c*s,h=f*s,k=r,o*=r,c*=r,f*=r),B=C*K,B&&(r=Math.cos(B),s=Math.sin(B),b=d*r+e*s,t=g*r+h*s,j=k*s,m=o*s,e=d*-s+e*r,h=g*-s+h*r,k*=r,o*=r,d=b,g=t),1!==G&&(e*=G,h*=G,k*=G,o*=G),1!==F&&(d*=F,g*=F,j*=F,m*=F),1!==E&&(c*=E,f*=E,i*=E,l*=E),(p||L)&&(p&&(H+=e*-p,I+=h*-p,J+=k*-p+p),L&&(H+=z.xOrigin-(z.xOrigin*c+z.yOrigin*d)+z.xOffset,I+=z.yOrigin-(z.xOrigin*f+z.yOrigin*g)+z.yOffset),q>H&&H>-q&&(H=w),q>I&&I>-q&&(I=w),q>J&&J>-q&&(J=0)),u=z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix3d(":"matrix3d(",u+=(q>c&&c>-q?w:c)+v+(q>f&&f>-q?w:f)+v+(q>i&&i>-q?w:i),u+=v+(q>l&&l>-q?w:l)+v+(q>d&&d>-q?w:d)+v+(q>g&&g>-q?w:g),C||D||1!==G?(u+=v+(q>j&&j>-q?w:j)+v+(q>m&&m>-q?w:m)+v+(q>e&&e>-q?w:e),u+=v+(q>h&&h>-q?w:h)+v+(q>k&&k>-q?w:k)+v+(q>o&&o>-q?w:o)+v):u+=",0,0,0,0,1,0,",u+=H+v+I+v+J+v+(M?1+-J/M:1)+")",A[Ca]=u};j=Ga.prototype,j.x=j.y=j.z=j.skewX=j.skewY=j.rotation=j.rotationX=j.rotationY=j.zOrigin=j.xPercent=j.yPercent=j.xOffset=j.yOffset=0,j.scaleX=j.scaleY=j.scaleZ=1,ya("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(a,b,c,d,f,h,i){if(d._lastParsedTransform===i)return f;d._lastParsedTransform=i;var j,k=i.scale&&"function"==typeof i.scale?i.scale:0;"function"==typeof i[c]&&(j=i[c],i[c]=b),k&&(i.scale=k(r,a));var l,m,n,o,p,s,t,u,v,w=a._gsTransform,x=a.style,y=1e-6,z=Ba.length,A=i,B={},C="transformOrigin",D=Ra(a,e,!0,A.parseTransform),E=A.transform&&("function"==typeof A.transform?A.transform(r,q):A.transform);if(d._transform=D,E&&"string"==typeof E&&Ca)m=Q.style,m[Ca]=E,m.display="block",m.position="absolute",O.body.appendChild(Q),l=Ra(Q,null,!1),D.svg&&(s=D.xOrigin,t=D.yOrigin,l.x-=D.xOffset,l.y-=D.yOffset,(A.transformOrigin||A.svgOrigin)&&(E={},La(a,ha(A.transformOrigin),E,A.svgOrigin,A.smoothOrigin,!0),s=E.xOrigin,t=E.yOrigin,l.x-=E.xOffset-D.xOffset,l.y-=E.yOffset-D.yOffset),(s||t)&&(u=Qa(Q,!0),l.x-=s-(s*u[0]+t*u[2]),l.y-=t-(s*u[1]+t*u[3]))),O.body.removeChild(Q),l.perspective||(l.perspective=D.perspective),null!=A.xPercent&&(l.xPercent=ja(A.xPercent,D.xPercent)),null!=A.yPercent&&(l.yPercent=ja(A.yPercent,D.yPercent));else if("object"==typeof A){if(l={scaleX:ja(null!=A.scaleX?A.scaleX:A.scale,D.scaleX),scaleY:ja(null!=A.scaleY?A.scaleY:A.scale,D.scaleY),scaleZ:ja(A.scaleZ,D.scaleZ),x:ja(A.x,D.x),y:ja(A.y,D.y),z:ja(A.z,D.z),xPercent:ja(A.xPercent,D.xPercent), 7yPercent:ja(A.yPercent,D.yPercent),perspective:ja(A.transformPerspective,D.perspective)},p=A.directionalRotation,null!=p)if("object"==typeof p)for(m in p)A[m]=p[m];else A.rotation=p;"string"==typeof A.x&&-1!==A.x.indexOf("%")&&(l.x=0,l.xPercent=ja(A.x,D.xPercent)),"string"==typeof A.y&&-1!==A.y.indexOf("%")&&(l.y=0,l.yPercent=ja(A.y,D.yPercent)),l.rotation=ka("rotation"in A?A.rotation:"shortRotation"in A?A.shortRotation+"_short":"rotationZ"in A?A.rotationZ:D.rotation,D.rotation,"rotation",B),Fa&&(l.rotationX=ka("rotationX"in A?A.rotationX:"shortRotationX"in A?A.shortRotationX+"_short":D.rotationX||0,D.rotationX,"rotationX",B),l.rotationY=ka("rotationY"in A?A.rotationY:"shortRotationY"in A?A.shortRotationY+"_short":D.rotationY||0,D.rotationY,"rotationY",B)),l.skewX=ka(A.skewX,D.skewX),l.skewY=ka(A.skewY,D.skewY)}for(Fa&&null!=A.force3D&&(D.force3D=A.force3D,o=!0),D.skewType=A.skewType||D.skewType||g.defaultSkewType,n=D.force3D||D.z||D.rotationX||D.rotationY||l.z||l.rotationX||l.rotationY||l.perspective,n||null==A.scale||(l.scaleZ=1);--z>-1;)v=Ba[z],E=l[v]-D[v],(E>y||-y>E||null!=A[v]||null!=M[v])&&(o=!0,f=new ta(D,v,D[v],E,f),v in B&&(f.e=B[v]),f.xs0=0,f.plugin=h,d._overwriteProps.push(f.n));return E=A.transformOrigin,D.svg&&(E||A.svgOrigin)&&(s=D.xOffset,t=D.yOffset,La(a,ha(E),l,A.svgOrigin,A.smoothOrigin),f=ua(D,"xOrigin",(w?D:l).xOrigin,l.xOrigin,f,C),f=ua(D,"yOrigin",(w?D:l).yOrigin,l.yOrigin,f,C),(s!==D.xOffset||t!==D.yOffset)&&(f=ua(D,"xOffset",w?s:D.xOffset,D.xOffset,f,C),f=ua(D,"yOffset",w?t:D.yOffset,D.yOffset,f,C)),E="0px 0px"),(E||Fa&&n&&D.zOrigin)&&(Ca?(o=!0,v=Ea,E=(E||_(a,v,e,!1,"50% 50%"))+"",f=new ta(x,v,0,0,f,-1,C),f.b=x[v],f.plugin=h,Fa?(m=D.zOrigin,E=E.split(" "),D.zOrigin=(E.length>2&&(0===m||"0px"!==E[2])?parseFloat(E[2]):m)||0,f.xs0=f.e=E[0]+" "+(E[1]||"50%")+" 0px",f=new ta(D,"zOrigin",0,0,f,-1,f.n),f.b=m,f.xs0=f.e=D.zOrigin):f.xs0=f.e=E):ha(E+"",D)),o&&(d._transformType=D.svg&&Aa||!n&&3!==this._transformType?2:3),j&&(i[c]=j),k&&(i.scale=k),f},prefix:!0}),ya("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),ya("borderRadius",{defaultValue:"0px",parser:function(a,b,c,f,g,h){b=this.format(b);var i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],z=a.style;for(q=parseFloat(a.offsetWidth),r=parseFloat(a.offsetHeight),i=b.split(" "),j=0;j<y.length;j++)this.p.indexOf("border")&&(y[j]=Z(y[j])),m=l=_(a,y[j],e,!1,"0px"),-1!==m.indexOf(" ")&&(l=m.split(" "),m=l[0],l=l[1]),n=k=i[j],o=parseFloat(m),t=m.substr((o+"").length),u="="===n.charAt(1),u?(p=parseInt(n.charAt(0)+"1",10),n=n.substr(2),p*=parseFloat(n),s=n.substr((p+"").length-(0>p?1:0))||""):(p=parseFloat(n),s=n.substr((p+"").length)),""===s&&(s=d[c]||t),s!==t&&(v=aa(a,"borderLeft",o,t),w=aa(a,"borderTop",o,t),"%"===s?(m=v/q*100+"%",l=w/r*100+"%"):"em"===s?(x=aa(a,"borderLeft",1,"em"),m=v/x+"em",l=w/x+"em"):(m=v+"px",l=w+"px"),u&&(n=parseFloat(m)+p+s,k=parseFloat(l)+p+s)),g=va(z,y[j],m+" "+l,n+" "+k,!1,"0px",g);return g},prefix:!0,formatter:qa("0px 0px 0px 0px",!1,!0)}),ya("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(a,b,c,d,f,g){return va(a.style,c,this.format(_(a,c,e,!1,"0px 0px")),this.format(b),!1,"0px",f)},prefix:!0,formatter:qa("0px 0px",!1,!0)}),ya("backgroundPosition",{defaultValue:"0 0",parser:function(a,b,c,d,f,g){var h,i,j,k,l,m,n="background-position",o=e||$(a,null),q=this.format((o?p?o.getPropertyValue(n+"-x")+" "+o.getPropertyValue(n+"-y"):o.getPropertyValue(n):a.currentStyle.backgroundPositionX+" "+a.currentStyle.backgroundPositionY)||"0 0"),r=this.format(b);if(-1!==q.indexOf("%")!=(-1!==r.indexOf("%"))&&r.split(",").length<2&&(m=_(a,"backgroundImage").replace(D,""),m&&"none"!==m)){for(h=q.split(" "),i=r.split(" "),R.setAttribute("src",m),j=2;--j>-1;)q=h[j],k=-1!==q.indexOf("%"),k!==(-1!==i[j].indexOf("%"))&&(l=0===j?a.offsetWidth-R.width:a.offsetHeight-R.height,h[j]=k?parseFloat(q)/100*l+"px":parseFloat(q)/l*100+"%");q=h.join(" ")}return this.parseComplex(a.style,q,r,f,g)},formatter:ha}),ya("backgroundSize",{defaultValue:"0 0",formatter:function(a){return a+="",ha(-1===a.indexOf(" ")?a+" "+a:a)}}),ya("perspective",{defaultValue:"0px",prefix:!0}),ya("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),ya("transformStyle",{prefix:!0}),ya("backfaceVisibility",{prefix:!0}),ya("userSelect",{prefix:!0}),ya("margin",{parser:ra("marginTop,marginRight,marginBottom,marginLeft")}),ya("padding",{parser:ra("paddingTop,paddingRight,paddingBottom,paddingLeft")}),ya("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(a,b,c,d,f,g){var h,i,j;return 9>p?(i=a.currentStyle,j=8>p?" ":",",h="rect("+i.clipTop+j+i.clipRight+j+i.clipBottom+j+i.clipLeft+")",b=this.format(b).split(",").join(j)):(h=this.format(_(a,this.p,e,!1,this.dflt)),b=this.format(b)),this.parseComplex(a.style,h,b,f,g)}}),ya("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),ya("autoRound,strictUnits",{parser:function(a,b,c,d,e){return e}}),ya("border",{defaultValue:"0px solid #000",parser:function(a,b,c,d,f,g){var h=_(a,"borderTopWidth",e,!1,"0px"),i=this.format(b).split(" "),j=i[0].replace(w,"");return"px"!==j&&(h=parseFloat(h)/aa(a,"borderTopWidth",1,j)+j),this.parseComplex(a.style,this.format(h+" "+_(a,"borderTopStyle",e,!1,"solid")+" "+_(a,"borderTopColor",e,!1,"#000")),i.join(" "),f,g)},color:!0,formatter:function(a){var b=a.split(" ");return b[0]+" "+(b[1]||"solid")+" "+(a.match(pa)||["#000"])[0]}}),ya("borderWidth",{parser:ra("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),ya("float,cssFloat,styleFloat",{parser:function(a,b,c,d,e,f){var g=a.style,h="cssFloat"in g?"cssFloat":"styleFloat";return new ta(g,h,0,0,e,-1,c,!1,0,g[h],b)}});var Ua=function(a){var b,c=this.t,d=c.filter||_(this.data,"filter")||"",e=this.s+this.c*a|0;100===e&&(-1===d.indexOf("atrix(")&&-1===d.indexOf("radient(")&&-1===d.indexOf("oader(")?(c.removeAttribute("filter"),b=!_(this.data,"filter")):(c.filter=d.replace(z,""),b=!0)),b||(this.xn1&&(c.filter=d=d||"alpha(opacity="+e+")"),-1===d.indexOf("pacity")?0===e&&this.xn1||(c.filter=d+" alpha(opacity="+e+")"):c.filter=d.replace(x,"opacity="+e))};ya("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(a,b,c,d,f,g){var h=parseFloat(_(a,"opacity",e,!1,"1")),i=a.style,j="autoAlpha"===c;return"string"==typeof b&&"="===b.charAt(1)&&(b=("-"===b.charAt(0)?-1:1)*parseFloat(b.substr(2))+h),j&&1===h&&"hidden"===_(a,"visibility",e)&&0!==b&&(h=0),U?f=new ta(i,"opacity",h,b-h,f):(f=new ta(i,"opacity",100*h,100*(b-h),f),f.xn1=j?1:0,i.zoom=1,f.type=2,f.b="alpha(opacity="+f.s+")",f.e="alpha(opacity="+(f.s+f.c)+")",f.data=a,f.plugin=g,f.setRatio=Ua),j&&(f=new ta(i,"visibility",0,0,f,-1,null,!1,0,0!==h?"inherit":"hidden",0===b?"hidden":"inherit"),f.xs0="inherit",d._overwriteProps.push(f.n),d._overwriteProps.push(c)),f}});var Va=function(a,b){b&&(a.removeProperty?(("ms"===b.substr(0,2)||"webkit"===b.substr(0,6))&&(b="-"+b),a.removeProperty(b.replace(B,"-$1").toLowerCase())):a.removeAttribute(b))},Wa=function(a){if(this.t._gsClassPT=this,1===a||0===a){this.t.setAttribute("class",0===a?this.b:this.e);for(var b=this.data,c=this.t.style;b;)b.v?c[b.p]=b.v:Va(c,b.p),b=b._next;1===a&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};ya("className",{parser:function(a,b,d,f,g,h,i){var j,k,l,m,n,o=a.getAttribute("class")||"",p=a.style.cssText;if(g=f._classNamePT=new ta(a,d,0,0,g,2),g.setRatio=Wa,g.pr=-11,c=!0,g.b=o,k=ca(a,e),l=a._gsClassPT){for(m={},n=l.data;n;)m[n.p]=1,n=n._next;l.setRatio(1)}return a._gsClassPT=g,g.e="="!==b.charAt(1)?b:o.replace(new RegExp("(?:\\s|^)"+b.substr(2)+"(?![\\w-])"),"")+("+"===b.charAt(0)?" "+b.substr(2):""),a.setAttribute("class",g.e),j=da(a,k,ca(a),i,m),a.setAttribute("class",o),g.data=j.firstMPT,a.style.cssText=p,g=g.xfirst=f.parse(a,j.difs,g,h)}});var Xa=function(a){if((1===a||0===a)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var b,c,d,e,f,g=this.t.style,h=i.transform.parse;if("all"===this.e)g.cssText="",e=!0;else for(b=this.e.split(" ").join("").split(","),d=b.length;--d>-1;)c=b[d],i[c]&&(i[c].parse===h?e=!0:c="transformOrigin"===c?Ea:i[c].p),Va(g,c);e&&(Va(g,Ca),f=this.t._gsTransform,f&&(f.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(ya("clearProps",{parser:function(a,b,d,e,f){return f=new ta(a,d,0,0,f,2),f.setRatio=Xa,f.e=b,f.pr=-10,f.data=e._tween,c=!0,f}}),j="bezier,throwProps,physicsProps,physics2D".split(","),wa=j.length;wa--;)za(j[wa]);j=g.prototype,j._firstPT=j._lastParsedTransform=j._transform=null,j._onInitTween=function(a,b,h,j){if(!a.nodeType)return!1;this._target=q=a,this._tween=h,this._vars=b,r=j,k=b.autoRound,c=!1,d=b.suffixMap||g.suffixMap,e=$(a,""),f=this._overwriteProps;var n,p,s,t,u,v,w,x,z,A=a.style;if(l&&""===A.zIndex&&(n=_(a,"zIndex",e),("auto"===n||""===n)&&this._addLazySet(A,"zIndex",0)),"string"==typeof b&&(t=A.cssText,n=ca(a,e),A.cssText=t+";"+b,n=da(a,n,ca(a)).difs,!U&&y.test(b)&&(n.opacity=parseFloat(RegExp.$1)),b=n,A.cssText=t),b.className?this._firstPT=p=i.className.parse(a,b.className,"className",this,null,null,b):this._firstPT=p=this.parse(a,b,null),this._transformType){for(z=3===this._transformType,Ca?m&&(l=!0,""===A.zIndex&&(w=_(a,"zIndex",e),("auto"===w||""===w)&&this._addLazySet(A,"zIndex",0)),o&&this._addLazySet(A,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(z?"visible":"hidden"))):A.zoom=1,s=p;s&&s._next;)s=s._next;x=new ta(a,"transform",0,0,null,2),this._linkCSSP(x,null,s),x.setRatio=Ca?Ta:Sa,x.data=this._transform||Ra(a,e,!0),x.tween=h,x.pr=-1,f.pop()}if(c){for(;p;){for(v=p._next,s=t;s&&s.pr>p.pr;)s=s._next;(p._prev=s?s._prev:u)?p._prev._next=p:t=p,(p._next=s)?s._prev=p:u=p,p=v}this._firstPT=t}return!0},j.parse=function(a,b,c,f){var g,h,j,l,m,n,o,p,s,t,u=a.style;for(g in b)n=b[g],"function"==typeof n&&(n=n(r,q)),h=i[g],h?c=h.parse(a,n,g,this,c,f,b):(m=_(a,g,e)+"",s="string"==typeof n,"color"===g||"fill"===g||"stroke"===g||-1!==g.indexOf("Color")||s&&A.test(n)?(s||(n=na(n),n=(n.length>3?"rgba(":"rgb(")+n.join(",")+")"),c=va(u,g,m,n,!0,"transparent",c,0,f)):s&&J.test(n)?c=va(u,g,m,n,!0,null,c,0,f):(j=parseFloat(m),o=j||0===j?m.substr((j+"").length):"",(""===m||"auto"===m)&&("width"===g||"height"===g?(j=ga(a,g,e),o="px"):"left"===g||"top"===g?(j=ba(a,g,e),o="px"):(j="opacity"!==g?0:1,o="")),t=s&&"="===n.charAt(1),t?(l=parseInt(n.charAt(0)+"1",10),n=n.substr(2),l*=parseFloat(n),p=n.replace(w,"")):(l=parseFloat(n),p=s?n.replace(w,""):""),""===p&&(p=g in d?d[g]:o),n=l||0===l?(t?l+j:l)+p:b[g],o!==p&&""!==p&&(l||0===l)&&j&&(j=aa(a,g,j,o),"%"===p?(j/=aa(a,g,100,"%")/100,b.strictUnits!==!0&&(m=j+"%")):"em"===p||"rem"===p||"vw"===p||"vh"===p?j/=aa(a,g,1,p):"px"!==p&&(l=aa(a,g,l,p),p="px"),t&&(l||0===l)&&(n=l+j+p)),t&&(l+=j),!j&&0!==j||!l&&0!==l?void 0!==u[g]&&(n||n+""!="NaN"&&null!=n)?(c=new ta(u,g,l||j||0,0,c,-1,g,!1,0,m,n),c.xs0="none"!==n||"display"!==g&&-1===g.indexOf("Style")?n:m):W("invalid "+g+" tween value: "+b[g]):(c=new ta(u,g,j,l-j,c,0,g,k!==!1&&("px"===p||"zIndex"===g),0,m,n),c.xs0=p))),f&&c&&!c.plugin&&(c.plugin=f);return c},j.setRatio=function(a){var b,c,d,e=this._firstPT,f=1e-6;if(1!==a||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(a||this._tween._time!==this._tween._duration&&0!==this._tween._time||this._tween._rawPrevTime===-1e-6)for(;e;){if(b=e.c*a+e.s,e.r?b=Math.round(b):f>b&&b>-f&&(b=0),e.type)if(1===e.type)if(d=e.l,2===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2;else if(3===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3;else if(4===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4;else if(5===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4+e.xn4+e.xs5;else{for(c=e.xs0+b+e.xs1,d=1;d<e.l;d++)c+=e["xn"+d]+e["xs"+(d+1)];e.t[e.p]=c}else-1===e.type?e.t[e.p]=e.xs0:e.setRatio&&e.setRatio(a);else e.t[e.p]=b+e.xs0;e=e._next}else for(;e;)2!==e.type?e.t[e.p]=e.b:e.setRatio(a),e=e._next;else for(;e;){if(2!==e.type)if(e.r&&-1!==e.type)if(b=Math.round(e.s+e.c),e.type){if(1===e.type){for(d=e.l,c=e.xs0+b+e.xs1,d=1;d<e.l;d++)c+=e["xn"+d]+e["xs"+(d+1)];e.t[e.p]=c}}else e.t[e.p]=b+e.xs0;else e.t[e.p]=e.e;else e.setRatio(a);e=e._next}},j._enableTransforms=function(a){this._transform=this._transform||Ra(this._target,e,!0),this._transformType=this._transform.svg&&Aa||!a&&3!==this._transformType?2:3};var Ya=function(a){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};j._addLazySet=function(a,b,c){var d=this._firstPT=new ta(a,b,0,0,this._firstPT,2);d.e=c,d.setRatio=Ya,d.data=this},j._linkCSSP=function(a,b,c,d){return a&&(b&&(b._prev=a),a._next&&(a._next._prev=a._prev),a._prev?a._prev._next=a._next:this._firstPT===a&&(this._firstPT=a._next,d=!0),c?c._next=a:d||null!==this._firstPT||(this._firstPT=a),a._next=b,a._prev=c),a},j._mod=function(a){for(var b=this._firstPT;b;)"function"==typeof a[b.p]&&a[b.p]===Math.round&&(b.r=1),b=b._next},j._kill=function(b){var c,d,e,f=b;if(b.autoAlpha||b.alpha){f={};for(d in b)f[d]=b[d];f.opacity=1,f.autoAlpha&&(f.visibility=1)}for(b.className&&(c=this._classNamePT)&&(e=c.xfirst,e&&e._prev?this._linkCSSP(e._prev,c._next,e._prev._prev):e===this._firstPT&&(this._firstPT=c._next),c._next&&this._linkCSSP(c._next,c._next._next,e._prev),this._classNamePT=null),c=this._firstPT;c;)c.plugin&&c.plugin!==d&&c.plugin._kill&&(c.plugin._kill(b),d=c.plugin),c=c._next;return a.prototype._kill.call(this,f)};var Za=function(a,b,c){var d,e,f,g;if(a.slice)for(e=a.length;--e>-1;)Za(a[e],b,c);else for(d=a.childNodes,e=d.length;--e>-1;)f=d[e],g=f.type,f.style&&(b.push(ca(f)),c&&c.push(f)),1!==g&&9!==g&&11!==g||!f.childNodes.length||Za(f,b,c)};return g.cascadeTo=function(a,c,d){var e,f,g,h,i=b.to(a,c,d),j=[i],k=[],l=[],m=[],n=b._internals.reservedProps;for(a=i._targets||i.target,Za(a,k,m),i.render(c,!0,!0),Za(a,l),i.render(0,!0,!0),i._enabled(!0),e=m.length;--e>-1;)if(f=da(m[e],k[e],l[e]),f.firstMPT){f=f.difs;for(g in d)n[g]&&(f[g]=d[g]);h={};for(g in f)h[g]=k[e][g];j.push(b.fromTo(m[e],c,h,f))}return j},a.activate([g]),g},!0),function(){var a=_gsScope._gsDefine.plugin({propName:"roundProps",version:"1.6.0",priority:-1,API:2,init:function(a,b,c){return this._tween=c,!0}}),b=function(a){for(;a;)a.f||a.blob||(a.m=Math.round),a=a._next},c=a.prototype;c._onInitAllProps=function(){for(var a,c,d,e=this._tween,f=e.vars.roundProps.join?e.vars.roundProps:e.vars.roundProps.split(","),g=f.length,h={},i=e._propLookup.roundProps;--g>-1;)h[f[g]]=Math.round;for(g=f.length;--g>-1;)for(a=f[g],c=e._firstPT;c;)d=c._next,c.pg?c.t._mod(h):c.n===a&&(2===c.f&&c.t?b(c.t._firstPT):(this._add(c.t,a,c.s,c.c),d&&(d._prev=c._prev),c._prev?c._prev._next=d:e._firstPT===c&&(e._firstPT=d),c._next=c._prev=null,e._propLookup[a]=i)),c=d;return!1},c._add=function(a,b,c,d){this._addTween(a,b,c,c+d,b,Math.round),this._overwriteProps.push(b)}}(),function(){_gsScope._gsDefine.plugin({propName:"attr",API:2,version:"0.6.0",init:function(a,b,c,d){var e,f;if("function"!=typeof a.setAttribute)return!1;for(e in b)f=b[e],"function"==typeof f&&(f=f(d,a)),this._addTween(a,"setAttribute",a.getAttribute(e)+"",f+"",e,!1,e),this._overwriteProps.push(e);return!0}})}(),_gsScope._gsDefine.plugin({propName:"directionalRotation",version:"0.3.0",API:2,init:function(a,b,c,d){"object"!=typeof b&&(b={rotation:b}),this.finals={};var e,f,g,h,i,j,k=b.useRadians===!0?2*Math.PI:360,l=1e-6;for(e in b)"useRadians"!==e&&(h=b[e],"function"==typeof h&&(h=h(d,a)),j=(h+"").split("_"),f=j[0],g=parseFloat("function"!=typeof a[e]?a[e]:a[e.indexOf("set")||"function"!=typeof a["get"+e.substr(3)]?e:"get"+e.substr(3)]()),h=this.finals[e]="string"==typeof f&&"="===f.charAt(1)?g+parseInt(f.charAt(0)+"1",10)*Number(f.substr(2)):Number(f)||0,i=h-g,j.length&&(f=j.join("_"),-1!==f.indexOf("short")&&(i%=k,i!==i%(k/2)&&(i=0>i?i+k:i-k)),-1!==f.indexOf("_cw")&&0>i?i=(i+9999999999*k)%k-(i/k|0)*k:-1!==f.indexOf("ccw")&&i>0&&(i=(i-9999999999*k)%k-(i/k|0)*k)),(i>l||-l>i)&&(this._addTween(a,e,g,g+i,e),this._overwriteProps.push(e)));return!0},set:function(a){var b;if(1!==a)this._super.setRatio.call(this,a);else for(b=this._firstPT;b;)b.f?b.t[b.p](this.finals[b.p]):b.t[b.p]=this.finals[b.p],b=b._next}})._autoCSS=!0,_gsScope._gsDefine("easing.Back",["easing.Ease"],function(a){var b,c,d,e=_gsScope.GreenSockGlobals||_gsScope,f=e.com.greensock,g=2*Math.PI,h=Math.PI/2,i=f._class,j=function(b,c){var d=i("easing."+b,function(){},!0),e=d.prototype=new a;return e.constructor=d,e.getRatio=c,d},k=a.register||function(){},l=function(a,b,c,d,e){var f=i("easing."+a,{easeOut:new b,easeIn:new c,easeInOut:new d},!0);return k(f,a),f},m=function(a,b,c){this.t=a,this.v=b,c&&(this.next=c,c.prev=this,this.c=c.v-b,this.gap=c.t-a)},n=function(b,c){var d=i("easing."+b,function(a){this._p1=a||0===a?a:1.70158,this._p2=1.525*this._p1},!0),e=d.prototype=new a;return e.constructor=d,e.getRatio=c,e.config=function(a){return new d(a)},d},o=l("Back",n("BackOut",function(a){return(a-=1)*a*((this._p1+1)*a+this._p1)+1}),n("BackIn",function(a){return a*a*((this._p1+1)*a-this._p1)}),n("BackInOut",function(a){return(a*=2)<1?.5*a*a*((this._p2+1)*a-this._p2):.5*((a-=2)*a*((this._p2+1)*a+this._p2)+2)})),p=i("easing.SlowMo",function(a,b,c){b=b||0===b?b:.7,null==a?a=.7:a>1&&(a=1),this._p=1!==a?b:0,this._p1=(1-a)/2,this._p2=a,this._p3=this._p1+this._p2,this._calcEnd=c===!0},!0),q=p.prototype=new a;return q.constructor=p,q.getRatio=function(a){var b=a+(.5-a)*this._p;return a<this._p1?this._calcEnd?1-(a=1-a/this._p1)*a:b-(a=1-a/this._p1)*a*a*a*b:a>this._p3?this._calcEnd?1-(a=(a-this._p3)/this._p1)*a:b+(a-b)*(a=(a-this._p3)/this._p1)*a*a*a:this._calcEnd?1:b},p.ease=new p(.7,.7),q.config=p.config=function(a,b,c){return new p(a,b,c)},b=i("easing.SteppedEase",function(a){a=a||1,this._p1=1/a,this._p2=a+1},!0),q=b.prototype=new a,q.constructor=b,q.getRatio=function(a){return 0>a?a=0:a>=1&&(a=.999999999),(this._p2*a>>0)*this._p1},q.config=b.config=function(a){return new b(a)},c=i("easing.RoughEase",function(b){b=b||{};for(var c,d,e,f,g,h,i=b.taper||"none",j=[],k=0,l=0|(b.points||20),n=l,o=b.randomize!==!1,p=b.clamp===!0,q=b.template instanceof a?b.template:null,r="number"==typeof b.strength?.4*b.strength:.4;--n>-1;)c=o?Math.random():1/l*n,d=q?q.getRatio(c):c,"none"===i?e=r:"out"===i?(f=1-c,e=f*f*r):"in"===i?e=c*c*r:.5>c?(f=2*c,e=f*f*.5*r):(f=2*(1-c),e=f*f*.5*r),o?d+=Math.random()*e-.5*e:n%2?d+=.5*e:d-=.5*e,p&&(d>1?d=1:0>d&&(d=0)),j[k++]={x:c,y:d};for(j.sort(function(a,b){return a.x-b.x}),h=new m(1,1,null),n=l;--n>-1;)g=j[n],h=new m(g.x,g.y,h);this._prev=new m(0,0,0!==h.t?h:h.next)},!0),q=c.prototype=new a,q.constructor=c,q.getRatio=function(a){var b=this._prev;if(a>b.t){for(;b.next&&a>=b.t;)b=b.next;b=b.prev}else for(;b.prev&&a<=b.t;)b=b.prev;return this._prev=b,b.v+(a-b.t)/b.gap*b.c},q.config=function(a){return new c(a)},c.ease=new c,l("Bounce",j("BounceOut",function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}),j("BounceIn",function(a){return(a=1-a)<1/2.75?1-7.5625*a*a:2/2.75>a?1-(7.5625*(a-=1.5/2.75)*a+.75):2.5/2.75>
vendor: 12,791 bytes, line 7
7a?1-(7.5625*(a-=2.25/2.75)*a+.9375):1-(7.5625*(a-=2.625/2.75)*a+.984375)}),j("BounceInOut",function(a){var b=.5>a;return a=b?1-2*a:2*a-1,a=1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375,b?.5*(1-a):.5*a+.5})),l("Circ",j("CircOut",function(a){return Math.sqrt(1-(a-=1)*a)}),j("CircIn",function(a){return-(Math.sqrt(1-a*a)-1)}),j("CircInOut",function(a){return(a*=2)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)})),d=function(b,c,d){var e=i("easing."+b,function(a,b){this._p1=a>=1?a:1,this._p2=(b||d)/(1>a?a:1),this._p3=this._p2/g*(Math.asin(1/this._p1)||0),this._p2=g/this._p2},!0),f=e.prototype=new a;return f.constructor=e,f.getRatio=c,f.config=function(a,b){return new e(a,b)},e},l("Elastic",d("ElasticOut",function(a){return this._p1*Math.pow(2,-10*a)*Math.sin((a-this._p3)*this._p2)+1},.3),d("ElasticIn",function(a){return-(this._p1*Math.pow(2,10*(a-=1))*Math.sin((a-this._p3)*this._p2))},.3),d("ElasticInOut",function(a){return(a*=2)<1?-.5*(this._p1*Math.pow(2,10*(a-=1))*Math.sin((a-this._p3)*this._p2)):this._p1*Math.pow(2,-10*(a-=1))*Math.sin((a-this._p3)*this._p2)*.5+1},.45)),l("Expo",j("ExpoOut",function(a){return 1-Math.pow(2,-10*a)}),j("ExpoIn",function(a){return Math.pow(2,10*(a-1))-.001}),j("ExpoInOut",function(a){return(a*=2)<1?.5*Math.pow(2,10*(a-1)):.5*(2-Math.pow(2,-10*(a-1)))})),l("Sine",j("SineOut",function(a){return Math.sin(a*h)}),j("SineIn",function(a){return-Math.cos(a*h)+1}),j("SineInOut",function(a){return-.5*(Math.cos(Math.PI*a)-1)})),i("easing.EaseLookup",{find:function(b){return a.map[b]}},!0),k(e.SlowMo,"SlowMo","ease,"),k(c,"RoughEase","ease,"),k(b,"SteppedEase","ease,"),o},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a,b){"use strict";var c={},d=a.document,e=a.GreenSockGlobals=a.GreenSockGlobals||a;if(!e.TweenLite){var f,g,h,i,j,k=function(a){var b,c=a.split("."),d=e;for(b=0;b<c.length;b++)d[c[b]]=d=d[c[b]]||{};return d},l=k("com.greensock"),m=1e-10,n=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},o=function(){},p=function(){var a=Object.prototype.toString,b=a.call([]);return function(c){return null!=c&&(c instanceof Array||"object"==typeof c&&!!c.push&&a.call(c)===b)}}(),q={},r=function(d,f,g,h){this.sc=q[d]?q[d].sc:[],q[d]=this,this.gsClass=null,this.func=g;var i=[];this.check=function(j){for(var l,m,n,o,p,s=f.length,t=s;--s>-1;)(l=q[f[s]]||new r(f[s],[])).gsClass?(i[s]=l.gsClass,t--):j&&l.sc.push(this);if(0===t&&g){if(m=("com.greensock."+d).split("."),n=m.pop(),o=k(m.join("."))[n]=this.gsClass=g.apply(g,i),h)if(e[n]=c[n]=o,p="undefined"!=typeof module&&module.exports,!p&&"function"==typeof define&&define.amd)define((a.GreenSockAMDPath?a.GreenSockAMDPath+"/":"")+d.split(".").pop(),[],function(){return o});else if(p)if(d===b){module.exports=c[b]=o;for(s in c)o[s]=c[s]}else c[b]&&(c[b][n]=o);for(s=0;s<this.sc.length;s++)this.sc[s].check()}},this.check(!0)},s=a._gsDefine=function(a,b,c,d){return new r(a,b,c,d)},t=l._class=function(a,b,c){return b=b||function(){},s(a,[],function(){return b},c),b};s.globals=e;var u=[0,0,1,1],v=t("easing.Ease",function(a,b,c,d){this._func=a,this._type=c||0,this._power=d||0,this._params=b?u.concat(b):u},!0),w=v.map={},x=v.register=function(a,b,c,d){for(var e,f,g,h,i=b.split(","),j=i.length,k=(c||"easeIn,easeOut,easeInOut").split(",");--j>-1;)for(f=i[j],e=d?t("easing."+f,null,!0):l.easing[f]||{},g=k.length;--g>-1;)h=k[g],w[f+"."+h]=w[h+f]=e[h]=a.getRatio?a:a[h]||new a};for(h=v.prototype,h._calcEnd=!1,h.getRatio=function(a){if(this._func)return this._params[0]=a,this._func.apply(null,this._params);var b=this._type,c=this._power,d=1===b?1-a:2===b?a:.5>a?2*a:2*(1-a);return 1===c?d*=d:2===c?d*=d*d:3===c?d*=d*d*d:4===c&&(d*=d*d*d*d),1===b?1-d:2===b?d:.5>a?d/2:1-d/2},f=["Linear","Quad","Cubic","Quart","Quint,Strong"],g=f.length;--g>-1;)h=f[g]+",Power"+g,x(new v(null,null,1,g),h,"easeOut",!0),x(new v(null,null,2,g),h,"easeIn"+(0===g?",easeNone":"")),x(new v(null,null,3,g),h,"easeInOut");w.linear=l.easing.Linear.easeIn,w.swing=l.easing.Quad.easeInOut;var y=t("events.EventDispatcher",function(a){this._listeners={},this._eventTarget=a||this});h=y.prototype,h.addEventListener=function(a,b,c,d,e){e=e||0;var f,g,h=this._listeners[a],k=0;for(this!==i||j||i.wake(),null==h&&(this._listeners[a]=h=[]),g=h.length;--g>-1;)f=h[g],f.c===b&&f.s===c?h.splice(g,1):0===k&&f.pr<e&&(k=g+1);h.splice(k,0,{c:b,s:c,up:d,pr:e})},h.removeEventListener=function(a,b){var c,d=this._listeners[a];if(d)for(c=d.length;--c>-1;)if(d[c].c===b)return void d.splice(c,1)},h.dispatchEvent=function(a){var b,c,d,e=this._listeners[a];if(e)for(b=e.length,b>1&&(e=e.slice(0)),c=this._eventTarget;--b>-1;)d=e[b],d&&(d.up?d.c.call(d.s||c,{type:a,target:c}):d.c.call(d.s||c))};var z=a.requestAnimationFrame,A=a.cancelAnimationFrame,B=Date.now||function(){return(new Date).getTime()},C=B();for(f=["ms","moz","webkit","o"],g=f.length;--g>-1&&!z;)z=a[f[g]+"RequestAnimationFrame"],A=a[f[g]+"CancelAnimationFrame"]||a[f[g]+"CancelRequestAnimationFrame"];t("Ticker",function(a,b){var c,e,f,g,h,k=this,l=B(),n=b!==!1&&z?"auto":!1,p=500,q=33,r="tick",s=function(a){var b,d,i=B()-C;i>p&&(l+=i-q),C+=i,k.time=(C-l)/1e3,b=k.time-h,(!c||b>0||a===!0)&&(k.frame++,h+=b+(b>=g?.004:g-b),d=!0),a!==!0&&(f=e(s)),d&&k.dispatchEvent(r)};y.call(k),k.time=k.frame=0,k.tick=function(){s(!0)},k.lagSmoothing=function(a,b){p=a||1/m,q=Math.min(b,p,0)},k.sleep=function(){null!=f&&(n&&A?A(f):clearTimeout(f),e=o,f=null,k===i&&(j=!1))},k.wake=function(a){null!==f?k.sleep():a?l+=-C+(C=B()):k.frame>10&&(C=B()-p+5),e=0===c?o:n&&z?z:function(a){return setTimeout(a,1e3*(h-k.time)+1|0)},k===i&&(j=!0),s(2)},k.fps=function(a){return arguments.length?(c=a,g=1/(c||60),h=this.time+g,void k.wake()):c},k.useRAF=function(a){return arguments.length?(k.sleep(),n=a,void k.fps(c)):n},k.fps(a),setTimeout(function(){"auto"===n&&k.frame<5&&"hidden"!==d.visibilityState&&k.useRAF(!1)},1500)}),h=l.Ticker.prototype=new l.events.EventDispatcher,h.constructor=l.Ticker;var D=t("core.Animation",function(a,b){if(this.vars=b=b||{},this._duration=this._totalDuration=a||0,this._delay=Number(b.delay)||0,this._timeScale=1,this._active=b.immediateRender===!0,this.data=b.data,this._reversed=b.reversed===!0,W){j||i.wake();var c=this.vars.useFrames?V:W;c.add(this,c._time),this.vars.paused&&this.paused(!0)}});i=D.ticker=new l.Ticker,h=D.prototype,h._dirty=h._gc=h._initted=h._paused=!1,h._totalTime=h._time=0,h._rawPrevTime=-1,h._next=h._last=h._onUpdate=h._timeline=h.timeline=null,h._paused=!1;var E=function(){j&&B()-C>2e3&&i.wake(),setTimeout(E,2e3)};E(),h.play=function(a,b){return null!=a&&this.seek(a,b),this.reversed(!1).paused(!1)},h.pause=function(a,b){return null!=a&&this.seek(a,b),this.paused(!0)},h.resume=function(a,b){return null!=a&&this.seek(a,b),this.paused(!1)},h.seek=function(a,b){return this.totalTime(Number(a),b!==!1)},h.restart=function(a,b){return this.reversed(!1).paused(!1).totalTime(a?-this._delay:0,b!==!1,!0)},h.reverse=function(a,b){return null!=a&&this.seek(a||this.totalDuration(),b),this.reversed(!0).paused(!1)},h.render=function(a,b,c){},h.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},h.isActive=function(){var a,b=this._timeline,c=this._startTime;return!b||!this._gc&&!this._paused&&b.isActive()&&(a=b.rawTime(!0))>=c&&a<c+this.totalDuration()/this._timeScale},h._enabled=function(a,b){return j||i.wake(),this._gc=!a,this._active=this.isActive(),b!==!0&&(a&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!a&&this.timeline&&this._timeline._remove(this,!0)),!1},h._kill=function(a,b){return this._enabled(!1,!1)},h.kill=function(a,b){return this._kill(a,b),this},h._uncache=function(a){for(var b=a?this:this.timeline;b;)b._dirty=!0,b=b.timeline;return this},h._swapSelfInParams=function(a){for(var b=a.length,c=a.concat();--b>-1;)"{self}"===a[b]&&(c[b]=this);return c},h._callback=function(a){var b=this.vars,c=b[a],d=b[a+"Params"],e=b[a+"Scope"]||b.callbackScope||this,f=d?d.length:0;switch(f){case 0:c.call(e);break;case 1:c.call(e,d[0]);break;case 2:c.call(e,d[0],d[1]);break;default:c.apply(e,d)}},h.eventCallback=function(a,b,c,d){if("on"===(a||"").substr(0,2)){var e=this.vars;if(1===arguments.length)return e[a];null==b?delete e[a]:(e[a]=b,e[a+"Params"]=p(c)&&-1!==c.join("").indexOf("{self}")?this._swapSelfInParams(c):c,e[a+"Scope"]=d),"onUpdate"===a&&(this._onUpdate=b)}return this},h.delay=function(a){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+a-this._delay),this._delay=a,this):this._delay},h.duration=function(a){return arguments.length?(this._duration=this._totalDuration=a,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&0!==a&&this.totalTime(this._totalTime*(a/this._duration),!0),this):(this._dirty=!1,this._duration)},h.totalDuration=function(a){return this._dirty=!1,arguments.length?this.duration(a):this._totalDuration},h.time=function(a,b){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(a>this._duration?this._duration:a,b)):this._time},h.totalTime=function(a,b,c){if(j||i.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>a&&!c&&(a+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var d=this._totalDuration,e=this._timeline;if(a>d&&!c&&(a=d),this._startTime=(this._paused?this._pauseTime:e._time)-(this._reversed?d-a:a)/this._timeScale,e._dirty||this._uncache(!1),e._timeline)for(;e._timeline;)e._timeline._time!==(e._startTime+e._totalTime)/e._timeScale&&e.totalTime(e._totalTime,!0),e=e._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==a||0===this._duration)&&(J.length&&Y(),this.render(a,b,!1),J.length&&Y())}return this},h.progress=h.totalProgress=function(a,b){var c=this.duration();return arguments.length?this.totalTime(c*a,b):c?this._time/c:this.ratio},h.startTime=function(a){return arguments.length?(a!==this._startTime&&(this._startTime=a,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,a-this._delay)),this):this._startTime},h.endTime=function(a){return this._startTime+(0!=a?this.totalDuration():this.duration())/this._timeScale},h.timeScale=function(a){if(!arguments.length)return this._timeScale;if(a=a||m,this._timeline&&this._timeline.smoothChildTiming){var b=this._pauseTime,c=b||0===b?b:this._timeline.totalTime();this._startTime=c-(c-this._startTime)*this._timeScale/a}return this._timeScale=a,this._uncache(!1)},h.reversed=function(a){return arguments.length?(a!=this._reversed&&(this._reversed=a,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},h.paused=function(a){if(!arguments.length)return this._paused;var b,c,d=this._timeline;return a!=this._paused&&d&&(j||a||i.wake(),b=d.rawTime(),c=b-this._pauseTime,!a&&d.smoothChildTiming&&(this._startTime+=c,this._uncache(!1)),this._pauseTime=a?b:null,this._paused=a,this._active=this.isActive(),!a&&0!==c&&this._initted&&this.duration()&&(b=d.smoothChildTiming?this._totalTime:(b-this._startTime)/this._timeScale,this.render(b,b===this._totalTime,!0))),this._gc&&!a&&this._enabled(!0,!1),this};var F=t("core.SimpleTimeline",function(a){D.call(this,0,a),this.autoRemoveChildren=this.smoothChildTiming=!0});h=F.prototype=new D,h.constructor=F,h.kill()._gc=!1,h._first=h._last=h._recent=null,h._sortChildren=!1,h.add=h.insert=function(a,b,c,d){var e,f;if(a._startTime=Number(b||0)+a._delay,a._paused&&this!==a._timeline&&(a._pauseTime=a._startTime+(this.rawTime()-a._startTime)/a._timeScale),a.timeline&&a.timeline._remove(a,!0),a.timeline=a._timeline=this,a._gc&&a._enabled(!0,!0),e=this._last,this._sortChildren)for(f=a._startTime;e&&e._startTime>f;)e=e._prev;return e?(a._next=e._next,e._next=a):(a._next=this._first,this._first=a),a._next?a._next._prev=a:this._last=a,a._prev=e,this._recent=a,this._timeline&&this._uncache(!0),this},h._remove=function(a,b){return a.timeline===this&&(b||a._enabled(!1,!0),a._prev?a._prev._next=a._next:this._first===a&&(this._first=a._next),a._next?a._next._prev=a._prev:this._last===a&&(this._last=a._prev),a._next=a._prev=a.timeline=null,a===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},h.render=function(a,b,c){var d,e=this._first;for(this._totalTime=this._time=this._rawPrevTime=a;e;)d=e._next,(e._active||a>=e._startTime&&!e._paused)&&(e._reversed?e.render((e._dirty?e.totalDuration():e._totalDuration)-(a-e._startTime)*e._timeScale,b,c):e.render((a-e._startTime)*e._timeScale,b,c)),e=d},h.rawTime=function(){return j||i.wake(),this._totalTime};var G=t("TweenLite",function(b,c,d){
vendor: 16,251 bytes, line 8
8if(D.call(this,c,d),this.render=G.prototype.render,null==b)throw"Cannot tween a null target.";this.target=b="string"!=typeof b?b:G.selector(b)||b;var e,f,g,h=b.jquery||b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType),i=this.vars.overwrite;if(this._overwrite=i=null==i?U[G.defaultOverwrite]:"number"==typeof i?i>>0:U[i],(h||b instanceof Array||b.push&&p(b))&&"number"!=typeof b[0])for(this._targets=g=n(b),this._propLookup=[],this._siblings=[],e=0;e<g.length;e++)f=g[e],f?"string"!=typeof f?f.length&&f!==a&&f[0]&&(f[0]===a||f[0].nodeType&&f[0].style&&!f.nodeType)?(g.splice(e--,1),this._targets=g=g.concat(n(f))):(this._siblings[e]=Z(f,this,!1),1===i&&this._siblings[e].length>1&&_(f,this,null,1,this._siblings[e])):(f=g[e--]=G.selector(f),"string"==typeof f&&g.splice(e+1,1)):g.splice(e--,1);else this._propLookup={},this._siblings=Z(b,this,!1),1===i&&this._siblings.length>1&&_(b,this,null,1,this._siblings);(this.vars.immediateRender||0===c&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-m,this.render(Math.min(0,-this._delay)))},!0),H=function(b){return b&&b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType)},I=function(a,b){var c,d={};for(c in a)T[c]||c in b&&"transform"!==c&&"x"!==c&&"y"!==c&&"width"!==c&&"height"!==c&&"className"!==c&&"border"!==c||!(!Q[c]||Q[c]&&Q[c]._autoCSS)||(d[c]=a[c],delete a[c]);a.css=d};h=G.prototype=new D,h.constructor=G,h.kill()._gc=!1,h.ratio=0,h._firstPT=h._targets=h._overwrittenProps=h._startAt=null,h._notifyPluginsOfEnabled=h._lazy=!1,G.version="1.19.1",G.defaultEase=h._ease=new v(null,null,1,1),G.defaultOverwrite="auto",G.ticker=i,G.autoSleep=120,G.lagSmoothing=function(a,b){i.lagSmoothing(a,b)},G.selector=a.$||a.jQuery||function(b){var c=a.$||a.jQuery;return c?(G.selector=c,c(b)):"undefined"==typeof d?b:d.querySelectorAll?d.querySelectorAll(b):d.getElementById("#"===b.charAt(0)?b.substr(1):b)};var J=[],K={},L=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,M=function(a){for(var b,c=this._firstPT,d=1e-6;c;)b=c.blob?1===a?this.end:a?this.join(""):this.start:c.c*a+c.s,c.m?b=c.m(b,this._target||c.t):d>b&&b>-d&&!c.blob&&(b=0),c.f?c.fp?c.t[c.p](c.fp,b):c.t[c.p](b):c.t[c.p]=b,c=c._next},N=function(a,b,c,d){var e,f,g,h,i,j,k,l=[],m=0,n="",o=0;for(l.start=a,l.end=b,a=l[0]=a+"",b=l[1]=b+"",c&&(c(l),a=l[0],b=l[1]),l.length=0,e=a.match(L)||[],f=b.match(L)||[],d&&(d._next=null,d.blob=1,l._firstPT=l._applyPT=d),i=f.length,h=0;i>h;h++)k=f[h],j=b.substr(m,b.indexOf(k,m)-m),n+=j||!h?j:",",m+=j.length,o?o=(o+1)%5:"rgba("===j.substr(-5)&&(o=1),k===e[h]||e.length<=h?n+=k:(n&&(l.push(n),n=""),g=parseFloat(e[h]),l.push(g),l._firstPT={_next:l._firstPT,t:l,p:l.length-1,s:g,c:("="===k.charAt(1)?parseInt(k.charAt(0)+"1",10)*parseFloat(k.substr(2)):parseFloat(k)-g)||0,f:0,m:o&&4>o?Math.round:0}),m+=k.length;return n+=b.substr(m),n&&l.push(n),l.setRatio=M,l},O=function(a,b,c,d,e,f,g,h,i){"function"==typeof d&&(d=d(i||0,a));var j,k=typeof a[b],l="function"!==k?"":b.indexOf("set")||"function"!=typeof a["get"+b.substr(3)]?b:"get"+b.substr(3),m="get"!==c?c:l?g?a[l](g):a[l]():a[b],n="string"==typeof d&&"="===d.charAt(1),o={t:a,p:b,s:m,f:"function"===k,pg:0,n:e||b,m:f?"function"==typeof f?f:Math.round:0,pr:0,c:n?parseInt(d.charAt(0)+"1",10)*parseFloat(d.substr(2)):parseFloat(d)-m||0};return("number"!=typeof m||"number"!=typeof d&&!n)&&(g||isNaN(m)||!n&&isNaN(d)||"boolean"==typeof m||"boolean"==typeof d?(o.fp=g,j=N(m,n?o.s+o.c:d,h||G.defaultStringFilter,o),o={t:j,p:"setRatio",s:0,c:1,f:2,pg:0,n:e||b,pr:0,m:0}):(o.s=parseFloat(m),n||(o.c=parseFloat(d)-o.s||0))),o.c?((o._next=this._firstPT)&&(o._next._prev=o),this._firstPT=o,o):void 0},P=G._internals={isArray:p,isSelector:H,lazyTweens:J,blobDif:N},Q=G._plugins={},R=P.tweenLookup={},S=0,T=P.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1},U={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},V=D._rootFramesTimeline=new F,W=D._rootTimeline=new F,X=30,Y=P.lazyRender=function(){var a,b=J.length;for(K={};--b>-1;)a=J[b],a&&a._lazy!==!1&&(a.render(a._lazy[0],a._lazy[1],!0),a._lazy=!1);J.length=0};W._startTime=i.time,V._startTime=i.frame,W._active=V._active=!0,setTimeout(Y,1),D._updateRoot=G.render=function(){var a,b,c;if(J.length&&Y(),W.render((i.time-W._startTime)*W._timeScale,!1,!1),V.render((i.frame-V._startTime)*V._timeScale,!1,!1),J.length&&Y(),i.frame>=X){X=i.frame+(parseInt(G.autoSleep,10)||120);for(c in R){for(b=R[c].tweens,a=b.length;--a>-1;)b[a]._gc&&b.splice(a,1);0===b.length&&delete R[c]}if(c=W._first,(!c||c._paused)&&G.autoSleep&&!V._first&&1===i._listeners.tick.length){for(;c&&c._paused;)c=c._next;c||i.sleep()}}},i.addEventListener("tick",D._updateRoot);var Z=function(a,b,c){var d,e,f=a._gsTweenID;if(R[f||(a._gsTweenID=f="t"+S++)]||(R[f]={target:a,tweens:[]}),b&&(d=R[f].tweens,d[e=d.length]=b,c))for(;--e>-1;)d[e]===b&&d.splice(e,1);return R[f].tweens},$=function(a,b,c,d){var e,f,g=a.vars.onOverwrite;return g&&(e=g(a,b,c,d)),g=G.onOverwrite,g&&(f=g(a,b,c,d)),e!==!1&&f!==!1},_=function(a,b,c,d,e){var f,g,h,i;if(1===d||d>=4){for(i=e.length,f=0;i>f;f++)if((h=e[f])!==b)h._gc||h._kill(null,a,b)&&(g=!0);else if(5===d)break;return g}var j,k=b._startTime+m,l=[],n=0,o=0===b._duration;for(f=e.length;--f>-1;)(h=e[f])===b||h._gc||h._paused||(h._timeline!==b._timeline?(j=j||aa(b,0,o),0===aa(h,j,o)&&(l[n++]=h)):h._startTime<=k&&h._startTime+h.totalDuration()/h._timeScale>k&&((o||!h._initted)&&k-h._startTime<=2e-10||(l[n++]=h)));for(f=n;--f>-1;)if(h=l[f],2===d&&h._kill(c,a,b)&&(g=!0),2!==d||!h._firstPT&&h._initted){if(2!==d&&!$(h,b))continue;h._enabled(!1,!1)&&(g=!0)}return g},aa=function(a,b,c){for(var d=a._timeline,e=d._timeScale,f=a._startTime;d._timeline;){if(f+=d._startTime,e*=d._timeScale,d._paused)return-100;d=d._timeline}return f/=e,f>b?f-b:c&&f===b||!a._initted&&2*m>f-b?m:(f+=a.totalDuration()/a._timeScale/e)>b+m?0:f-b-m};h._init=function(){var a,b,c,d,e,f,g=this.vars,h=this._overwrittenProps,i=this._duration,j=!!g.immediateRender,k=g.ease;if(g.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),e={};for(d in g.startAt)e[d]=g.startAt[d];if(e.overwrite=!1,e.immediateRender=!0,e.lazy=j&&g.lazy!==!1,e.startAt=e.delay=null,this._startAt=G.to(this.target,0,e),j)if(this._time>0)this._startAt=null;else if(0!==i)return}else if(g.runBackwards&&0!==i)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{0!==this._time&&(j=!1),c={};for(d in g)T[d]&&"autoCSS"!==d||(c[d]=g[d]);if(c.overwrite=0,c.data="isFromStart",c.lazy=j&&g.lazy!==!1,c.immediateRender=j,this._startAt=G.to(this.target,0,c),j){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=k=k?k instanceof v?k:"function"==typeof k?new v(k,g.easeParams):w[k]||G.defaultEase:G.defaultEase,g.easeParams instanceof Array&&k.config&&(this._ease=k.config.apply(k,g.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(f=this._targets.length,a=0;f>a;a++)this._initProps(this._targets[a],this._propLookup[a]={},this._siblings[a],h?h[a]:null,a)&&(b=!0);else b=this._initProps(this.target,this._propLookup,this._siblings,h,0);if(b&&G._onPluginEvent("_onInitAllProps",this),h&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),g.runBackwards)for(c=this._firstPT;c;)c.s+=c.c,c.c=-c.c,c=c._next;this._onUpdate=g.onUpdate,this._initted=!0},h._initProps=function(b,c,d,e,f){var g,h,i,j,k,l;if(null==b)return!1;K[b._gsTweenID]&&Y(),this.vars.css||b.style&&b!==a&&b.nodeType&&Q.css&&this.vars.autoCSS!==!1&&I(this.vars,b);for(g in this.vars)if(l=this.vars[g],T[g])l&&(l instanceof Array||l.push&&p(l))&&-1!==l.join("").indexOf("{self}")&&(this.vars[g]=l=this._swapSelfInParams(l,this));else if(Q[g]&&(j=new Q[g])._onInitTween(b,this.vars[g],this,f)){for(this._firstPT=k={_next:this._firstPT,t:j,p:"setRatio",s:0,c:1,f:1,n:g,pg:1,pr:j._priority,m:0},h=j._overwriteProps.length;--h>-1;)c[j._overwriteProps[h]]=this._firstPT;(j._priority||j._onInitAllProps)&&(i=!0),(j._onDisable||j._onEnable)&&(this._notifyPluginsOfEnabled=!0),k._next&&(k._next._prev=k)}else c[g]=O.call(this,b,g,"get",l,g,0,null,this.vars.stringFilter,f);return e&&this._kill(e,b)?this._initProps(b,c,d,e,f):this._overwrite>1&&this._firstPT&&d.length>1&&_(b,this,c,this._overwrite,d)?(this._kill(c,b),this._initProps(b,c,d,e,f)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(K[b._gsTweenID]=!0),i)},h.render=function(a,b,c){var d,e,f,g,h=this._time,i=this._duration,j=this._rawPrevTime;if(a>=i-1e-7&&a>=0)this._totalTime=this._time=i,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(d=!0,e="onComplete",c=c||this._timeline.autoRemoveChildren),0===i&&(this._initted||!this.vars.lazy||c)&&(this._startTime===this._timeline._duration&&(a=0),(0>j||0>=a&&a>=-1e-7||j===m&&"isPause"!==this.data)&&j!==a&&(c=!0,j>m&&(e="onReverseComplete")),this._rawPrevTime=g=!b||a||j===a?a:m);else if(1e-7>a)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==h||0===i&&j>0)&&(e="onReverseComplete",d=this._reversed),0>a&&(this._active=!1,0===i&&(this._initted||!this.vars.lazy||c)&&(j>=0&&(j!==m||"isPause"!==this.data)&&(c=!0),this._rawPrevTime=g=!b||a||j===a?a:m)),this._initted||(c=!0);else if(this._totalTime=this._time=a,this._easeType){var k=a/i,l=this._easeType,n=this._easePower;(1===l||3===l&&k>=.5)&&(k=1-k),3===l&&(k*=2),1===n?k*=k:2===n?k*=k*k:3===n?k*=k*k*k:4===n&&(k*=k*k*k*k),1===l?this.ratio=1-k:2===l?this.ratio=k:.5>a/i?this.ratio=k/2:this.ratio=1-k/2}else this.ratio=this._ease.getRatio(a/i);if(this._time!==h||c){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!c&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=h,this._rawPrevTime=j,J.push(this),void(this._lazy=[a,b]);this._time&&!d?this.ratio=this._ease.getRatio(this._time/i):d&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==h&&a>=0&&(this._active=!0),0===h&&(this._startAt&&(a>=0?this._startAt.render(a,b,c):e||(e="_dummyGS")),this.vars.onStart&&(0!==this._time||0===i)&&(b||this._callback("onStart"))),f=this._firstPT;f;)f.f?f.t[f.p](f.c*this.ratio+f.s):f.t[f.p]=f.c*this.ratio+f.s,f=f._next;this._onUpdate&&(0>a&&this._startAt&&a!==-1e-4&&this._startAt.render(a,b,c),b||(this._time!==h||d||c)&&this._callback("onUpdate")),e&&(!this._gc||c)&&(0>a&&this._startAt&&!this._onUpdate&&a!==-1e-4&&this._startAt.render(a,b,c),d&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!b&&this.vars[e]&&this._callback(e),0===i&&this._rawPrevTime===m&&g!==m&&(this._rawPrevTime=0))}},h._kill=function(a,b,c){if("all"===a&&(a=null),null==a&&(null==b||b===this.target))return this._lazy=!1,this._enabled(!1,!1);b="string"!=typeof b?b||this._targets||this.target:G.selector(b)||b;var d,e,f,g,h,i,j,k,l,m=c&&this._time&&c._startTime===this._startTime&&this._timeline===c._timeline;if((p(b)||H(b))&&"number"!=typeof b[0])for(d=b.length;--d>-1;)this._kill(a,b[d],c)&&(i=!0);else{if(this._targets){for(d=this._targets.length;--d>-1;)if(b===this._targets[d]){h=this._propLookup[d]||{},this._overwrittenProps=this._overwrittenProps||[],e=this._overwrittenProps[d]=a?this._overwrittenProps[d]||{}:"all";break}}else{if(b!==this.target)return!1;h=this._propLookup,e=this._overwrittenProps=a?this._overwrittenProps||{}:"all"}if(h){if(j=a||h,k=a!==e&&"all"!==e&&a!==h&&("object"!=typeof a||!a._tempKill),c&&(G.onOverwrite||this.vars.onOverwrite)){for(f in j)h[f]&&(l||(l=[]),l.push(f));if((l||!a)&&!$(this,c,b,l))return!1}for(f in j)(g=h[f])&&(m&&(g.f?g.t[g.p](g.s):g.t[g.p]=g.s,i=!0),g.pg&&g.t._kill(j)&&(i=!0),g.pg&&0!==g.t._overwriteProps.length||(g._prev?g._prev._next=g._next:g===this._firstPT&&(this._firstPT=g._next),g._next&&(g._next._prev=g._prev),g._next=g._prev=null),delete h[f]),k&&(e[f]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return i},h.invalidate=function(){return this._notifyPluginsOfEnabled&&G._onPluginEvent("_onDisable",this),this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],D.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-m,this.render(Math.min(0,-this._delay))),this},h._enabled=function(a,b){if(j||i.wake(),a&&this._gc){var c,d=this._targets;if(d)for(c=d.length;--c>-1;)this._siblings[c]=Z(d[c],this,!0);else this._siblings=Z(this.target,this,!0)}return D.prototype._enabled.call(this,a,b),this._notifyPluginsOfEnabled&&this._firstPT?G._onPluginEvent(a?"_onEnable":"_onDisable",this):!1},G.to=function(a,b,c){return new G(a,b,c)},G.from=function(a,b,c){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,new G(a,b,c)},G.fromTo=function(a,b,c,d){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,new G(a,b,d)},G.delayedCall=function(a,b,c,d,e){return new G(b,0,{delay:a,onComplete:b,onCompleteParams:c,callbackScope:d,onReverseComplete:b,onReverseCompleteParams:c,immediateRender:!1,lazy:!1,useFrames:e,overwrite:0})},G.set=function(a,b){return new G(a,0,b)},G.getTweensOf=function(a,b){if(null==a)return[];a="string"!=typeof a?a:G.selector(a)||a;var c,d,e,f;if((p(a)||H(a))&&"number"!=typeof a[0]){for(c=a.length,d=[];--c>-1;)d=d.concat(G.getTweensOf(a[c],b));for(c=d.length;--c>-1;)for(f=d[c],e=c;--e>-1;)f===d[e]&&d.splice(c,1)}else for(d=Z(a).concat(),c=d.length;--c>-1;)(d[c]._gc||b&&!d[c].isActive())&&d.splice(c,1);return d},G.killTweensOf=G.killDelayedCallsTo=function(a,b,c){"object"==typeof b&&(c=b,b=!1);for(var d=G.getTweensOf(a,b),e=d.length;--e>-1;)d[e]._kill(c,a)};var ba=t("plugins.TweenPlugin",function(a,b){this._overwriteProps=(a||"").split(","),this._propName=this._overwriteProps[0],this._priority=b||0,this._super=ba.prototype},!0);if(h=ba.prototype,ba.version="1.19.0",ba.API=2,h._firstPT=null,h._addTween=O,h.setRatio=M,h._kill=function(a){var b,c=this._overwriteProps,d=this._firstPT;if(null!=a[this._propName])this._overwriteProps=[];else for(b=c.length;--b>-1;)null!=a[c[b]]&&c.splice(b,1);for(;d;)null!=a[d.n]&&(d._next&&(d._next._prev=d._prev),d._prev?(d._prev._next=d._next,d._prev=null):this._firstPT===d&&(this._firstPT=d._next)),d=d._next;return!1},h._mod=h._roundProps=function(a){for(var b,c=this._firstPT;c;)b=a[this._propName]||null!=c.n&&a[c.n.split(this._propName+"_").join("")],b&&"function"==typeof b&&(2===c.f?c.t._applyPT.m=b:c.m=b),c=c._next},G._onPluginEvent=function(a,b){var c,d,e,f,g,h=b._firstPT;if("_onInitAllProps"===a){for(;h;){for(g=h._next,d=e;d&&d.pr>h.pr;)d=d._next;(h._prev=d?d._prev:f)?h._prev._next=h:e=h,(h._next=d)?d._prev=h:f=h,h=g}h=b._firstPT=e}for(;h;)h.pg&&"function"==typeof h.t[a]&&h.t[a]()&&(c=!0),h=h._next;return c},ba.activate=function(a){for(var b=a.length;--b>-1;)a[b].API===ba.API&&(Q[(new a[b])._propName]=a[b]);return!0},s.plugin=function(a){if(!(a&&a.propName&&a.init&&a.API))throw"illegal plugin definition.";var b,c=a.propName,d=a.priority||0,e=a.overwriteProps,f={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},g=t("plugins."+c.charAt(0).toUpperCase()+c.substr(1)+"Plugin",function(){ba.call(this,c,d),this._overwriteProps=e||[]},a.global===!0),h=g.prototype=new ba(c);h.constructor=g,g.API=a.API;for(b in f)"function"==typeof a[b]&&(h[f[b]]=a[b]);return g.version=a.version,ba.activate([g]),g},f=a._gsQueue){for(g=0;g<f.length;g++)f[g]();for(h in q)q[h].func||a.console.log("GSAP encountered missing dependency: "+h)}j=!1}}("undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window,"Tween
8Max"); 9 10/*waypoint*/ 11!function(){"use strict";function t(o){if(!o)throw new Error("No options passed to Waypoint constructor");if(!o.element)throw new Error("No element option passed to Waypoint constructor");if(!o.handler)throw new Error("No handler option passed to Waypoint constructor");
vendor: 6,526 bytes, line 11
11this.key="waypoint-"+e,this.options=t.Adapter.extend({},t.defaults,o),this.element=this.options.element,this.adapter=new t.Adapter(this.element),this.callback=o.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=t.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=t.Context.findOrCreateByElement(this.options.context),t.offsetAliases[this.options.offset]&&(this.options.offset=t.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),i[this.key]=this,e+=1}var e=0,i={};t.prototype.queueTrigger=function(t){this.group.queueTrigger(this,t)},t.prototype.trigger=function(t){this.enabled&&this.callback&&this.callback.apply(this,t)},t.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete i[this.key]},t.prototype.disable=function(){return this.enabled=!1,this},t.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},t.prototype.next=function(){return this.group.next(this)},t.prototype.previous=function(){return this.group.previous(this)},t.invokeAll=function(t){var e=[];for(var o in i)e.push(i[o]);for(var n=0,r=e.length;r>n;n++)e[n][t]()},t.destroyAll=function(){t.invokeAll("destroy")},t.disableAll=function(){t.invokeAll("disable")},t.enableAll=function(){t.invokeAll("enable")},t.refreshAll=function(){t.Context.refreshAll()},t.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},t.viewportWidth=function(){return document.documentElement.clientWidth},t.adapters=[],t.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},t.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=t}(),function(){"use strict";function t(t){window.setTimeout(t,1e3/60)}function e(t){this.element=t,this.Adapter=n.Adapter,this.adapter=new this.Adapter(t),this.key="waypoint-context-"+i,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},t.waypointContextKey=this.key,o[t.waypointContextKey]=this,i+=1,this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var i=0,o={},n=window.Waypoint,r=window.onload;e.prototype.add=function(t){var e=t.options.horizontal?"horizontal":"vertical";this.waypoints[e][t.key]=t,this.refresh()},e.prototype.checkEmpty=function(){var t=this.Adapter.isEmptyObject(this.waypoints.horizontal),e=this.Adapter.isEmptyObject(this.waypoints.vertical);t&&e&&(this.adapter.off(".waypoints"),delete o[this.key])},e.prototype.createThrottledResizeHandler=function(){function t(){e.handleResize(),e.didResize=!1}var e=this;this.adapter.on("resize.waypoints",function(){e.didResize||(e.didResize=!0,n.requestAnimationFrame(t))})},e.prototype.createThrottledScrollHandler=function(){function t(){e.handleScroll(),e.didScroll=!1}var e=this;this.adapter.on("scroll.waypoints",function(){(!e.didScroll||n.isTouch)&&(e.didScroll=!0,n.requestAnimationFrame(t))})},e.prototype.handleResize=function(){n.Context.refreshAll()},e.prototype.handleScroll=function(){var t={},e={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var i in e){var o=e[i],n=o.newScroll>o.oldScroll,r=n?o.forward:o.backward;for(var s in this.waypoints[i]){var a=this.waypoints[i][s],l=o.oldScroll<a.triggerPoint,h=o.newScroll>=a.triggerPoint,p=l&&h,u=!l&&!h;(p||u)&&(a.queueTrigger(r),t[a.group.id]=a.group)}}for(var c in t)t[c].flushTriggers();this.oldScroll={x:e.horizontal.newScroll,y:e.vertical.newScroll}},e.prototype.innerHeight=function(){return this.element==this.element.window?n.viewportHeight():this.adapter.innerHeight()},e.prototype.remove=function(t){delete this.waypoints[t.axis][t.key],this.checkEmpty()},e.prototype.innerWidth=function(){return this.element==this.element.window?n.viewportWidth():this.adapter.innerWidth()},e.prototype.destroy=function(){var t=[];for(var e in this.waypoints)for(var i in this.waypoints[e])t.push(this.waypoints[e][i]);for(var o=0,n=t.length;n>o;o++)t[o].destroy()},e.prototype.refresh=function(){var t,e=this.element==this.element.window,i=e?void 0:this.adapter.offset(),o={};this.handleScroll(),t={horizontal:{contextOffset:e?0:i.left,contextScroll:e?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:e?0:i.top,contextScroll:e?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};for(var r in t){var s=t[r];for(var a in this.waypoints[r]){var l,h,p,u,c,d=this.waypoints[r][a],f=d.options.offset,w=d.triggerPoint,y=0,g=null==w;d.element!==d.element.window&&(y=d.adapter.offset()[s.offsetProp]),"function"==typeof f?f=f.apply(d):"string"==typeof f&&(f=parseFloat(f),d.options.offset.indexOf("%")>-1&&(f=Math.ceil(s.contextDimension*f/100))),l=s.contextScroll-s.contextOffset,d.triggerPoint=y+l-f,h=w<s.oldScroll,p=d.triggerPoint>=s.oldScroll,u=h&&p,c=!h&&!p,!g&&u?(d.queueTrigger(s.backward),o[d.group.id]=d.group):!g&&c?(d.queueTrigger(s.forward),o[d.group.id]=d.group):g&&s.oldScroll>=d.triggerPoint&&(d.queueTrigger(s.forward),o[d.group.id]=d.group)}}return n.requestAnimationFrame(function(){for(var t in o)o[t].flushTriggers()}),this},e.findOrCreateByElement=function(t){return e.findByElement(t)||new e(t)},e.refreshAll=function(){for(var t in o)o[t].refresh()},e.findByElement=function(t){return o[t.waypointContextKey]},window.onload=function(){r&&r(),e.refreshAll()},n.requestAnimationFrame=function(e){var i=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||t;i.call(window,e)},n.Context=e}(),function(){"use strict";function t(t,e){return t.triggerPoint-e.triggerPoint}function e(t,e){return e.triggerPoint-t.triggerPoint}function i(t){this.name=t.name,this.axis=t.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),o[this.axis][this.name]=this}var o={vertical:{},horizontal:{}},n=window.Waypoint;i.prototype.add=function(t){this.waypoints.push(t)},i.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],r
11ight:[]}},i.prototype.flushTriggers=function(){for(var i in this.triggerQueues){var o=this.triggerQueues[i],n="up"===i||"left"===i;o.sort(n?e:t);for(var r=0,s=o.length;s>r;r+=1){var a=o[r];(a.options.continuous||r===o.length-1)&&a.trigger([i])}}this.clearTriggerQueues()},i.prototype.next=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints),o=i===this.waypoints.length-1;return o?null:this.waypoints[i+1]},i.prototype.previous=function(e){this.waypoints.sort(t);var i=n.Adapter.inArray(e,this.waypoints);return i?this.waypoints[i-1]:null},i.prototype.queueTrigger=function(t,e){this.triggerQueues[e].push(t)},i.prototype.remove=function(t){var e=n.Adapter.inArray(t,this.waypoints);e>-1&&this.waypoints.splice(e,1)},i.prototype.first=function(){return this.waypoints[0]},i.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},i.findOrCreate=function(t){return o[t.axis][t.name]||new i(t)},n.Group=i}(),function(){"use strict";function t(t){this.$element=e(t)}var e=window.jQuery,i=window.Waypoint;e.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(e,i){t.prototype[i]=function(){var t=Array.prototype.slice.call(arguments);return this.$element[i].apply(this.$element,t)}}),e.each(["extend","inArray","isEmptyObject"],function(i,o){t[o]=e[o]}),i.adapters.push({name:"jquery",Adapter:t}),i.Adapter=t}(),function(){"use strict";function t(t){return function(){var i=[],o=arguments[0];return t.isFunction(arguments[0])&&(o=t.extend({},arguments[1]),o.handler=arguments[0]),this.each(function(){var n=t.extend({},o,{element:this});"string"==typeof n.context&&(n.context=t(this).closest(n.context)[0]),i.push(new e(n))}),i}}var e=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=t(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=t(window.Zepto))}(); 12 13/*Underscore.js 1.8.3*/ 14(function(){function n(n){function t(t,r,e,u,i,o){for(;i>=0&&o>i;i+=n){var a=u?u[i]:i;e=r(e,t[a],a,t)}return e}return function(r,e,u,i){e=b(e,i,4);var o=!k(r)&&m.keys(r),a=(o||r).length,c=n>0?0:a-1;return arguments.length<3&&(u=r[o?o[c]:c],c+=n),t(r,e,u,o,c,a)}}function t(n){return function(t,r,e){r=x(r,e);for(var u=O(t),i=n>0?0:u-1;i>=0&&u>i;i+=n)if(r(t[i],i,t))return i;return-1}}function r(n,t,r){return function(e,u,i){var o=0,a=O(e);
14if("number"==typeof i)n>0?o=i>=0?i:Math.max(i+a,o):a=i>=0?Math.min(i+1,a):i+a+1;else if(r&&i&&a)return i=r(e,u),e[i]===u?i:-1;if(u!==u)return i=t(l.call(e,o,a),m.isNaN),i>=0?i+o:-1;for(i=n>0?o:a-1;i>=0&&a>i;i+=n)if(e[i]===u)return i;return-1}}function e(n,t){var r=I.length,e=n.constructor,u=m.isFunction(e)&&e.prototype||a,i="constructor";for(m.has(n,i)&&!m.contains(t,i)&&t.push(i);r--;)i=I[r],i in n&&n[i]!==u[i]&&!m.contains(t,i)&&t.push(i)}var u=this,i=u._,o=Array.prototype,a=Object.prototype,c=Function.prototype,f=o.push,l=o.slice,s=a.toString,p=a.hasOwnProperty,h=Array.isArray,v=Object.keys,g=c.bind,y=Object.create,d=function(){},m=function(n){return n instanceof m?n:this instanceof m?void(this._wrapped=n):new m(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=m),exports._=m):u._=m,m.VERSION="1.8.3";var b=function(n,t,r){if(t===void 0)return n;switch(null==r?3:r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)}}return function(){return n.apply(t,arguments)}},x=function(n,t,r){return null==n?m.identity:m.isFunction(n)?b(n,t,r):m.isObject(n)?m.matcher(n):m.property(n)};m.iteratee=function(n,t){return x(n,t,1/0)};var _=function(n,t){return function(r){var e=arguments.length;if(2>e||null==r)return r;for(var u=1;e>u;u++)for(var i=arguments[u],o=n(i),a=o.length,c=0;a>c;c++){var f=o[c];t&&r[f]!==void 0||(r[f]=i[f])}return r}},j=function(n){if(!m.isObject(n))return{};if(y)return y(n);d.prototype=n;var t=new d;return d.prototype=null,t},w=function(n){return function(t){return null==t?void 0:t[n]}},A=Math.pow(2,53)-1,O=w("length"),k=function(n){var t=O(n);return"number"==typeof t&&t>=0&&A>=t};m.each=m.forEach=function(n,t,r){t=b(t,r);var e,u;if(k(n))for(e=0,u=n.length;u>e;e++)t(n[e],e,n);else{var i=m.keys(n);for(e=0,u=i.length;u>e;e++)t(n[i[e]],i[e],n)}return n},m.map=m.collect=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=Array(u),o=0;u>o;o++){var a=e?e[o]:o;i[o]=t(n[a],a,n)}return i},m.reduce=m.foldl=m.inject=n(1),m.reduceRight=m.foldr=n(-1),m.find=m.detect=function(n,t,r){var e;return e=k(n)?m.findIndex(n,t,r):m.findKey(n,t,r),e!==void 0&&e!==-1?n[e]:void 0},m.filter=m.select=function(n,t,r){var e=[];return t=x(t,r),m.each(n,function(n,r,u){t(n,r,u)&&e.push(n)}),e},m.reject=function(n,t,r){return m.filter(n,m.negate(x(t)),r)},m.every=m.all=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(!t(n[o],o,n))return!1}return!0},m.some=m.any=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(t(n[o],o,n))return!0}return!1},m.contains=m.includes=m.include=function(n,t,r,e){return k(n)||(n=m.values(n)),("number"!=typeof r||e)&&(r=0),m.indexOf(n,t,r)>=0},m.invoke=function(n,t){var r=l.call(arguments,2),e=m.isFunction(t);return m.map(n,function(n){var u=e?t:n[t];return null==u?u:u.apply(n,r)})},m.pluck=function(n,t){return m.map(n,m.property(t))},m.where=function(n,t){return m.filter(n,m.matcher(t))},m.findWhere=function(n,t){return m.find(n,m.matcher(t))},m.max=function(n,t,r){var e,u,i=-1/0,o=-1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],e>i&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(u>o||u===-1/0&&i===-1/0)&&(i=n,o=u)});return i},m.min=function(n,t,r){var e,u,i=1/0,o=1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],i>e&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(o>u||1/0===u&&1/0===i)&&(i=n,o=u)});return i},m.shuffle=function(n){for(var t,r=k(n)?n:m.values(n),e=r.length,u=Array(e),i=0;e>i;i++)t=m.random(0,i),t!==i&&(u[i]=u[t]),u[t]=r[i];return u},m.sample=function(n,t,r){return null==t||r?(k(n)||(n=m.values(n)),n[m.random(n.length-1)]):m.shuffle(n).slice(0,Math.max(0,t))},m.sortBy=function(n,t,r){return t=x(t,r),m.pluck(m.map(n,function(n,r,e){return{value:n,index:r,criteria:t(n,r,e)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var F=function(n){return function(t,r,e){var u={};return r=x(r,e),m.each(t,function(e,i){var o=r(e,i,t);n(u,e,o)}),u}};m.groupBy=F(function(n,t,r){m.has(n,r)?n[r].push(t):n[r]=[t]}),m.indexBy=F(function(n,t,r){n[r]=t}),m.countBy=F(function(n,t,r){m.has(n,r)?n[r]++:n[r]=1}),m.toArray=function(n){return n?m.isArray(n)?l.call(n):k(n)?m.map(n,m.identity):m.values(n):[]},m.size=function(n){return null==n?0:k(n)?n.length:m.keys(n).length},m.partition=function(n,t,r){t=x(t,r);var e=[],u=[];return m.each(n,function(n,r,i){(t(n,r,i)?e:u).push(n)}),[e,u]},m.first=m.head=m.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:m.initial(n,n.length-t)},m.initial=function(n,t,r){return l.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))},m.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:m.rest(n,Math.max(0,n.length-t))},m.rest=m.tail=m.drop=function(n,t,r){return l.call(n,null==t||r?1:t)},m.compact=function(n){return m.filter(n,m.identity)};var S=function(n,t,r,e){for(var u=[],i=0,o=e||0,a=O(n);a>o;o++){var c=n[o];if(k(c)&&(m.isArray(c)||m.isArguments(c))){t||(c=S(c,t,r));var f=0,l=c.length;for(u.length+=l;l>f;
14)u[i++]=c[f++]}else r||(u[i++]=c)}return u};m.flatten=function(n,t){return S(n,t,!1)},m.without=function(n){return m.difference(n,l.call(arguments,1))},m.uniq=m.unique=function(n,t,r,e){m.isBoolean(t)||(e=r,r=t,t=!1),null!=r&&(r=x(r,e));for(var u=[],i=[],o=0,a=O(n);a>o;o++){var c=n[o],f=r?r(c,o,n):c;t?(o&&i===f||u.push(c),i=f):r?m.contains(i,f)||(i.push(f),u.push(c)):m.contains(u,c)||u.push(c)}return u},m.union=function(){return m.uniq(S(arguments,!0,!0))},m.intersection=function(n){for(var t=[],r=arguments.length,e=0,u=O(n);u>e;e++){var i=n[e];if(!m.contains(t,i)){for(var o=1;r>o&&m.contains(arguments[o],i);o++);o===r&&t.push(i)}}return t},m.difference=function(n){var t=S(arguments,!0,!0,1);return m.filter(n,function(n){return!m.contains(t,n)})},m.zip=function(){return m.unzip(arguments)},m.unzip=function(n){for(var t=n&&m.max(n,O).length||0,r=Array(t),e=0;t>e;e++)r[e]=m.pluck(n,e);return r},m.object=function(n,t){for(var r={},e=0,u=O(n);u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},m.findIndex=t(1),m.findLastIndex=t(-1),m.sortedIndex=function(n,t,r,e){r=x(r,e,1);for(var u=r(t),i=0,o=O(n);o>i;){var a=Math.floor((i+o)/2);r(n[a])<u?i=a+1:o=a}return i},m.indexOf=r(1,m.findIndex,m.sortedIndex),m.lastIndexOf=r(-1,m.findLastIndex),m.range=function(n,t,r){null==t&&(t=n||0,n=0),r=r||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=Array(e),i=0;e>i;i++,n+=r)u[i]=n;return u};var E=function(n,t,r,e,u){if(!(e instanceof t))return n.apply(r,u);var i=j(n.prototype),o=n.apply(i,u);return m.isObject(o)?o:i};m.bind=function(n,t){if(g&&n.bind===g)return g.apply(n,l.call(arguments,1));if(!m.isFunction(n))throw new TypeError("Bind must be called on a function");var r=l.call(arguments,2),e=function(){return E(n,e,t,this,r.concat(l.call(arguments)))};return e},m.partial=function(n){var t=l.call(arguments,1),r=function(){for(var e=0,u=t.length,i=Array(u),o=0;u>o;o++)i[o]=t[o]===m?arguments[e++]:t[o];for(;e<arguments.length;)i.push(arguments[e++]);return E(n,r,this,this,i)};return r},m.bindAll=function(n){var t,r,e=arguments.length;if(1>=e)throw new Error("bindAll must be passed function names");for(t=1;e>t;t++)r=arguments[t],n[r]=m.bind(n[r],n);return n},m.memoize=function(n,t){var r=function(e){var u=r.cache,i=""+(t?t.apply(this,arguments):e);return m.has(u,i)||(u[i]=n.apply(this,arguments)),u[i]};return r.cache={},r},m.delay=function(n,t){var r=l.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},m.defer=m.partial(m.delay,m,1),m.throttle=function(n,t,r){var e,u,i,o=null,a=0;r||(r={});var c=function(){a=r.leading===!1?0:m.now(),o=null,i=n.apply(e,u),o||(e=u=null)};return function(){var f=m.now();a||r.leading!==!1||(a=f);var l=t-(f-a);return e=this,u=arguments,0>=l||l>t?(o&&(clearTimeout(o),o=null),a=f,i=n.apply(e,u),o||(e=u=null)):o||r.trailing===!1||(o=setTimeout(c,l)),i}},m.debounce=function(n,t,r){var e,u,i,o,a,c=function(){var f=m.now()-o;t>f&&f>=0?e=setTimeout(c,t-f):(e=null,r||(a=n.apply(i,u),e||(i=u=null)))};return function(){i=this,u=arguments,o=m.now();var f=r&&!e;return e||(e=setTimeout(c,t)),f&&(a=n.apply(i,u),i=u=null),a}},m.wrap=function(n,t){return m.partial(t,n)},m.negate=function(n){return function(){return!n.apply(this,arguments)}},m.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,e=n[t].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},m.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},m.before=function(n,t){var r;return function(){return--n>0&&(r=t.apply(this,arguments)),1>=n&&(t=null),r}},m.once=m.partial(m.before,2);var M=!{toString:null}.propertyIsEnumerable("toString"),I=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];m.keys=function(n){if(!m.isObject(n))return[];if(v)return v(n);var t=[];for(var r in n)m.has(n,r)&&t.push(r);return M&&e(n,t),t},m.allKeys=function(n){if(!m.isObject(n))return[];var t=[];for(var r in n)t.push(r);return M&&e(n,t),t},m.values=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},m.mapObject=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=u.length,o={},a=0;i>a;a++)e=u[a],o[e]=t(n[e],e,n);return o},m.pairs=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},m.invert=function(n){for(var t={},r=m.keys(n),e=0,u=r.length;u>e;
14e++)t[n[r[e]]]=r[e];return t},m.functions=m.methods=function(n){var t=[];for(var r in n)m.isFunction(n[r])&&t.push(r);return t.sort()},m.extend=_(m.allKeys),m.extendOwn=m.assign=_(m.keys),m.findKey=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=0,o=u.length;o>i;i++)if(e=u[i],t(n[e],e,n))return e},m.pick=function(n,t,r){var e,u,i={},o=n;if(null==o)return i;m.isFunction(t)?(u=m.allKeys(o),e=b(t,r)):(u=S(arguments,!1,!1,1),e=function(n,t,r){return t in r},o=Object(o));for(var a=0,c=u.length;c>a;a++){var f=u[a],l=o[f];e(l,f,o)&&(i[f]=l)}return i},m.omit=function(n,t,r){if(m.isFunction(t))t=m.negate(t);else{var e=m.map(S(arguments,!1,!1,1),String);t=function(n,t){return!m.contains(e,t)}}return m.pick(n,t,r)},m.defaults=_(m.allKeys,!0),m.create=function(n,t){var r=j(n);return t&&m.extendOwn(r,t),r},m.clone=function(n){return m.isObject(n)?m.isArray(n)?n.slice():m.extend({},n):n},m.tap=function(n,t){return t(n),n},m.isMatch=function(n,t){var r=m.keys(t),e=r.length;if(null==n)return!e;for(var u=Object(n),i=0;e>i;i++){var o=r[i];if(t[o]!==u[o]||!(o in u))return!1}return!0};var N=function(n,t,r,e){if(n===t)return 0!==n||1/n===1/t;if(null==n||null==t)return n===t;n instanceof m&&(n=n._wrapped),t instanceof m&&(t=t._wrapped);var u=s.call(n);if(u!==s.call(t))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+n==""+t;case"[object Number]":return+n!==+n?+t!==+t:0===+n?1/+n===1/t:+n===+t;case"[object Date]":case"[object Boolean]":return+n===+t}var i="[object Array]"===u;if(!i){if("object"!=typeof n||"object"!=typeof t)return!1;var o=n.constructor,a=t.constructor;if(o!==a&&!(m.isFunction(o)&&o instanceof o&&m.isFunction(a)&&a instanceof a)&&"constructor"in n&&"constructor"in t)return!1}r=r||[],e=e||[];for(var c=r.length;c--;)if(r[c]===n)return e[c]===t;if(r.push(n),e.push(t),i){if(c=n.length,c!==t.length)return!1;for(;c--;)if(!N(n[c],t[c],r,e))return!1}else{var f,l=m.keys(n);if(c=l.length,m.keys(t).length!==c)return!1;for(;c--;)if(f=l[c],!m.has(t,f)||!N(n[f],t[f],r,e))return!1}return r.pop(),e.pop(),!0};m.isEqual=function(n,t){return N(n,t)},m.isEmpty=function(n){return null==n?!0:k(n)&&(m.isArray(n)||m.isString(n)||m.isArguments(n))?0===n.length:0===m.keys(n).length},m.isElement=function(n){return!(!n||1!==n.nodeType)},m.isArray=h||function(n){return"[object Array]"===s.call(n)},m.isObject=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},m.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(n){m["is"+n]=function(t){return s.call(t)==="[object "+n+"]"}}),m.isArguments(arguments)||(m.isArguments=function(n){return m.has(n,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(m.isFunction=function(n){return"function"==typeof n||!1}),m.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},m.isNaN=function(n){return m.isNumber(n)&&n!==+n},m.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"===s.call(n)},m.isNull=function(n){return null===n},m.isUndefined=function(n){return n===void 0},m.has=function(n,t){return null!=n&&p.call(n,t)},m.noConflict=function(){return u._=i,this},m.identity=function(n){return n},m.constant=function(n){return function(){return n}},m.noop=function(){},m.property=w,m.propertyOf=function(n){return null==n?function(){}:function(t){return n[t]}},m.matcher=m.matches=function(n){return n=m.extendOwn({},n),function(t){return m.isMatch(t,n)}},m.times=function(n,t,r){var e=Array(Math.max(0,n));t=b(t,r,1);for(var u=0;n>u;u++)e[u]=t(u);return e},m.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},m.now=Date.now||function(){return(new Date).getTime()};var B={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},T=m.invert(B),R=function(n){var t=function(t){return n[t]},r="(?:"+m.keys(n).join("|")+")",e=RegExp(r),u=RegExp(r,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};m.escape=R(B),m.unescape=R(T),m.result=function(n,t,r){var e=null==n?void 0:n[t];return e===void 0&&(e=r),m.isFunction(e)?e.call(n):e};var q=0;m.uniqueId=function(n){var t=++q+"";return n?n+t:t},m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var K=/(.)^/,z={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},D=/\\|'|\r|\n|\u2028|\u2029/g,L=function(n){return"\\"+z[n]};m.template=function(n,t,r){!t&&r&&(t=r),t=m.defaults({},t,m.templateSettings);var e=RegExp([(t.escape||K).source,(t.interpolate||K).source,(t.evaluate||K).source].join("|")+"|$","g"),u=0,i="__p+='";n.replace(e,function(t,r,e,o,a){return i+=n.slice(u,a).replace(D,L),u=a+t.length,r?i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":o&&(i+="';\n"+o+"\n__p+='"),t}),i+="';\n",t.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var o=new Function(t.variable||"obj","_",i)}catch(a){throw a.source=i,a}var c=function(n){return o.call(this,n,m)},f=t.variable||"obj";return c.source="function("+f+"){\n"+i+"}",c},m.chain=function(n){var t=m(n);return t._chain=!0,t};var P=function(n,t){return n._chain?m(t).chain():t};m.mixin=function(n){m.each(m.functions(n),function(t){var r=m[t]=n[t];m.prototype[t]=function(){var n=[this._wrapped];return f.apply(n,arguments),P(this,r.apply(m,n))}})},m.mixin(m),m.each(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=o[n];m.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!==n&&"splice"!==n||0!==r.length||delete r[0],P(this,r)}}),m.each(["concat","join","slice"],function(n){var t=o[n];m.prototype[n]=function(){return P(this,t.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return""+this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return m})}).call(this); 15 16/*gsap*/ 17!function(e,n){"function"==typeof define&&define.amd?define(["ScrollMagic","TweenMax","TimelineMax"],n):"object"==typeof exports?(require("gsap"),n(require("scrollmagic"),TweenMax,TimelineMax)):n(e.ScrollMagic||e.jQuery&&e.jQuery.ScrollMagic,e.TweenMax||e.TweenLite,e.TimelineMax||e.TimelineLite)}(this,function(e,n,r){"use strict";e.Scene.addOption("tweenChanges",!1,function(e){return!!e}),e.Scene.extend(function(){var e,t=this;t.on("progress.plugin_gsap",function(){i()}),t.on("destroy.plugin_gsap",function(e){t.removeTween(e.reset)});var i=function(){if(e){var n=t.progress(),r=t.state();e.repeat&&-1===e.repeat()?"DURING"===r&&e.paused()?e.play():"DURING"===r||e.paused()||e.pause():n!=e.progress()&&(0===t.duration()?n>0?e.play():e.reverse():t.tweenChanges()&&e.tweenTo?e.tweenTo(n*e.duration()):e.progress(n).pause())}};t.setTween=function(o,a,s){var u;arguments.length>1&&(arguments.length<3&&(s=a,a=1),o=n.to(o,a,s));try{u=r?new r({smoothChildTiming:!0}).add(o):o,u.pause()}catch(p){return t}return e&&t.removeTween(),e=u,o.repeat&&-1===o.repeat()&&(e.repeat(-1),e.yoyo(o.yoyo())),i(),t},t.removeTween=function(n){return e&&(n&&e.progress(0).pause(),e.kill(),e=void 0),t}})}); 18 19/*cssRule*/ 20var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("plugins.CSSRulePlugin",["plugins.TweenPlugin","TweenLite","plugins.CSSPlugin"],function(a,b,c){var d=function(){a.call(this,"cssRule"),this._overwriteProps.length=0},e=_gsScope.document,f=c.prototype.setRatio,g=d.prototype=new c;return g._propName="cssRule",g.constructor=d,d.version="0.6.6",d.API=2,d.getRule=function(a){var b,c,d,f,g=e.all?"rules":"cssRules",h=e.styleSheets,i=h.length,j=":"===a.charAt(0);for(a=(j?"":",")+a.split("::").join(":").toLowerCase()+",",j&&(f=[]);--i>-1;){try{if(c=h[i][g],!c)continue;b=c.length}catch(k){console.log(k);continue}for(;--b>-1;)if(d=c[b],d.selectorText&&-1!==(","+d.selectorText.split("::").join(":").toLowerCase()+",").indexOf(a)){if(!j)return d.style;
20f.push(d.style)}}return f},g._onInitTween=function(a,b,d){if(void 0===a.cssText)return!1;var f=a._gsProxy=a._gsProxy||e.createElement("div");return this._ss=a,this._proxy=f.style,f.style.cssText=a.cssText,c.prototype._onInitTween.call(this,f,b,d),!0},g.setRatio=function(a){f.call(this,a),this._ss.cssText=this._proxy.cssText},a.activate([d]),d},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"undefined"!=typeof module&&module.exports?(require("../TweenLite.min.js"),module.exports=b()):"function"==typeof define&&define.amd&&define(["TweenLite"],b)}("CSSRulePlugin"); 21 22/*! 23 * VERSION: 0.2.2 24 * DATE: 2017-06-19 25 * UPDATES AND DOCS AT: http://greensock.com 26 * 27 * @license Copyright (c) 2008-2017, GreenSock. All rights reserved. 28 * This work is subject to the terms at http://greensock.com/standard-license or for 29 * Club GreenSock members, the software agreement that was issued with your membership. 30 * 31 * @author: Jack Doyle, [email protected] 32 **/ 33var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("easing.CustomEase",["easing.Ease"],function(a){var b=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,c=/[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,d=/[\+\-]?\d*\.?\d+e[\+\-]?\d+/gi,e=/[cLlsS]/g,f="CustomEase only accepts Cubic Bezier data.",g=function(a,b,c,d,e,f,h,i,j,k,l){var m,n=(a+c)/2,o=(b+d)/2,p=(c+e)/2,q=(d+f)/2,r=(e+h)/2,s=(f+i)/2,t=(n+p)/2,u=(o+q)/2,v=(p+r)/2,w=(q+s)/2,x=(t+v)/2,y=(u+w)/2,z=h-a,A=i-b,B=Math.abs((c-h)*A-(d-i)*z),C=Math.abs((e-h)*A-(f-i)*z);return k||(k=[{x:a,y:b},{x:h,y:i}],l=1),k.splice(l||k.length-1,0,{x:x,y:y}),(B+C)*(B+C)>j*(z*z+A*A)&&(m=k.length,g(a,b,n,o,t,u,x,y,j,k,l),g(x,y,v,w,r,s,h,i,j,k,l+1+(k.length-m))),k},h=function(a){var b,e,g,h,i,j,k,l,m,n,o,p=(a+"").replace(d,function(a){var b=+a;return 1e-4>b&&b>-1e-4?0:b}).match(c)||[],q=[],r=0,s=0,t=p.length,u=2;for(b=0;t>b;b++)if(m=h,isNaN(p[b])?(h=p[b].toUpperCase(),i=h!==p[b]):b--,e=+p[b+1],g=+p[b+2],i&&(e+=r,g+=s),b||(k=e,l=g),"M"===h)j&&j.length<8&&(q.length-=1,u=0),r=k=e,s=l=g,j=[e,g],u=2,q.push(j),b+=2,h="L";else if("C"===h)j||(j=[0,0]),j[u++]=e,j[u++]=g,i||(r=s=0),j[u++]=r+1*p[b+3],j[u++]=s+1*p[b+4],j[u++]=r+=1*p[b+5],j[u++]=s+=1*p[b+6],b+=6;else if("S"===h)"C"===m||"S"===m?(n=r-j[u-4],o=s-j[u-3],j[u++]=r+n,j[u++]=s+o):(j[u++]=r,j[u++]=s),j[u++]=e,j[u++]=g,i||(r=s=0),j[u++]=r+=1*p[b+3],j[u++]=s+=1*p[b+4],b+=4;else{if("L"!==h&&"Z"!==h)throw f;"Z"===h&&(e=k,g=l,j.closed=!0),("L"===h||Math.abs(r-e)>.5||Math.abs(s-g)>.5)&&(j[u++]=r+(e-r)/3,j[u++]=s+(g-s)/3,j[u++]=r+2*(e-r)/3,j[u++]=s+2*(g-s)/3,j[u++]=e,j[u++]=g,"L"===h&&(b+=2)),r=e,s=g}return q[0]},i=function(a){var b,c=a.length,d=999999999999;for(b=1;c>b;b+=6)+a[b]<d&&(d=+a[b]);return d},j=function(a,b,c){c||0===c||(c=Math.max(+a[a.length-1],+a[1]));var d,e=-1*+a[0],f=-c,g=a.length,h=1/(+a[g-2]+e),j=-b||(Math.abs(+a[g-1]-+a[1])<.01*(+a[g-2]-+a[0])?i(a)+f:+a[g-1]+f);for(j=j?1/j:-h,d=0;g>d;d+=2)a[d]=(+a[d]+e)*h,a[d+1]=(+a[d+1]+f)*j},k=function(a){var b=this.lookup[a*this.l|0]||this.lookup[this.l-1];return b.nx<a&&(b=b.n),b.y+(a-b.x)/b.cx*b.cy},l=function(b,c,d){this._calcEnd=!0,this.id=b,b&&(a.map[b]=this),this.getRatio=k,this.setData(c,d)},m=l.prototype=new a;return m.constructor=l,m.setData=function(a,c){a=a||"0,0,1,1";var d,i,k,l,m,n,o,p,q,r,s=a.match(b),t=1,u=[];if(c=c||{},r=c.precision||1,this.data=a,this.lookup=[],this.points=u,this.fast=1>=r,(e.test(a)||-1!==a.indexOf("M")&&-1===a.indexOf("C"))&&(s=h(a)),d=s.length,4===d)s.unshift(0,0),s.push(1,1),d=8;else if((d-2)%6)throw f;for((0!==+s[0]||1!==+s[d-2])&&j(s,c.height,c.originY),this.rawBezier=s,l=2;d>l;l+=6)i={x:+s[l-2],y:+s[l-1]},k={x:+s[l+4],y:+s[l+5]},u.push(i,k),g(i.x,i.y,+s[l],+s[l+1],+s[l+2],+s[l+3],k.x,k.y,1/(2e5*r),u,u.length-1);for(d=u.length,l=0;d>l;l++)o=u[l],p=u[l-1]||o,o.x>p.x||p.y!==o.y&&p.x===o.x||o===p?(p.cx=o.x-p.x,p.cy=o.y-p.y,p.n=o,p.nx=o.x,this.fast&&l>1&&Math.abs(p.cy/p.cx-u[l-2].cy/u[l-2].cx)>2&&(this.fast=!1),p.cx<t&&(p.cx?t=p.cx:(p.cx=.001,l===d-1&&(p.x-=.001,t=Math.min(t,.001),this.fast=!1)))):(u.splice(l--,1),d--);if(d=1/t+1|0,this.l=d,m=1/d,n=0,o=u[0],this.fast){for(l=0;d>l;l++)q=l*m,o.nx<q&&(o=u[++n]),i=o.y+(q-o.x)/o.cx*o.cy,this.lookup[l]={x:q,cx:m,y:i,cy:0,nx:9},l&&(this.lookup[l-1].cy=i-this.lookup[l-1].y);this.lookup[d-1].cy=u[u.length-1].y-i}else{for(l=0;d>l;l++)o.nx<l*m&&(o=u[++n]),this.lookup[l]=o;n<u.length-1&&(this.lookup[l-1]=u[u.length-2])}return this._calcEnd=1!==u[u.length-1].y||0!==u[0].y,this},m.getRatio=k,m.getSVGData=function(a){return l.getSVGData(this,a)},l.create=function(a,b,c){return new l(a,b,c)}
33,l.version="0.2.2",l.bezierToPoints=g,l.get=function(b){return a.map[b]},l.getSVGData=function(b,c){c=c||{};var d,e,f,g,h,i,j,k,l,m,n=1e3,o=c.width||100,p=c.height||100,q=c.x||0,r=(c.y||0)+p,s=c.path;if(c.invert&&(p=-p,r=0),b=b.getRatio?b:a.map[b]||console.log("No ease found: ",b),b.rawBezier){for(d=[],j=b.rawBezier.length,f=0;j>f;f+=2)d.push(((q+b.rawBezier[f]*o)*n|0)/n+","+((r+b.rawBezier[f+1]*-p)*n|0)/n);d[0]="M"+d[0],d[1]="C"+d[1]}else for(d=["M"+q+","+r],j=Math.max(5,200*(c.precision||1)),g=1/j,j+=2,k=5/j,l=((q+g*o)*n|0)/n,m=((r+b.getRatio(g)*-p)*n|0)/n,e=(m-r)/(l-q),f=2;j>f;f++)h=((q+f*g*o)*n|0)/n,i=((r+b.getRatio(f*g)*-p)*n|0)/n,(Math.abs((i-m)/(h-l)-e)>k||f===j-1)&&(d.push(l+","+m),e=(i-m)/(h-l)),l=h,m=i;return s&&("string"==typeof s?document.querySelector(s):s).setAttribute("d",d.join(" ")),d.join(" ")},l},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"undefined"!=typeof module&&module.exports?(require("../TweenLite.min.js"),module.exports=b()):"function"==typeof define&&define.amd&&define(["TweenLite"],b)}("CustomEase"); 34 35 36/*! 37 * VERSION: 1.9.0 38 * DATE: 2017-06-19 39 * UPDATES AND DOCS AT: http://greensock.com 40 * 41 * @license Copyright (c) 2008-2017, GreenSock. All rights reserved. 42 * This work is subject to the terms at http://greensock.com/standard-license or for 43 * Club GreenSock members, the software agreement that was issued with your membership. 44 * 45 * @author: Jack Doyle, [email protected] 46 **/ 47var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";var a=(_gsScope.document||{}).documentElement,b=_gsScope,c=function(c,d){var e="x"===d?"Width":"Height",f="scroll"+e,g="client"+e,h=document.body;return c===b||c===a||c===h?Math.max(a[f],h[f])-(b["inner"+e]||a[g]||h[g]):c[f]-c["offset"+e]},d=function(a){return"string"==typeof a&&(a=TweenLite.selector(a)),a.length&&a!==b&&a[0]&&a[0].style&&!
47a.nodeType&&(a=a[0]),a===b||a.nodeType&&a.style?a:null},e=function(c,d){var e="scroll"+("x"===d?"Left":"Top");return c===b&&(null!=c.pageXOffset?e="page"+d.toUpperCase()+"Offset":c=null!=a[e]?a:document.body),function(){return c[e]}},f=function(c,f){var g=d(c).getBoundingClientRect(),h=!f||f===b||f===document.body,i=(h?a:f).getBoundingClientRect(),j={x:g.left-i.left,y:g.top-i.top};return!h&&f&&(j.x+=e(f,"x")(),j.y+=e(f,"y")()),j},g=function(a,b,d){var e=typeof a;return isNaN(a)?"number"===e||"string"===e&&"="===a.charAt(1)?a:"max"===a?c(b,d):Math.min(c(b,d),f(a,b)[d]):parseFloat(a)},h=_gsScope._gsDefine.plugin({propName:"scrollTo",API:2,global:!0,version:"1.9.0",init:function(a,c,d){return this._wdw=a===b,this._target=a,this._tween=d,"object"!=typeof c?(c={y:c},"string"==typeof c.y&&"max"!==c.y&&"="!==c.y.charAt(1)&&(c.x=c.y)):c.nodeType&&(c={y:c,x:c}),this.vars=c,this._autoKill=c.autoKill!==!1,this.getX=e(a,"x"),this.getY=e(a,"y"),this.x=this.xPrev=this.getX(),this.y=this.yPrev=this.getY(),null!=c.x?(this._addTween(this,"x",this.x,g(c.x,a,"x")-(c.offsetX||0),"scrollTo_x",!0),this._overwriteProps.push("scrollTo_x")):this.skipX=!0,null!=c.y?(this._addTween(this,"y",this.y,g(c.y,a,"y")-(c.offsetY||0),"scrollTo_y",!0),this._overwriteProps.push("scrollTo_y")):this.skipY=!0,!0},set:function(a){this._super.setRatio.call(this,a);var d=this._wdw||!this.skipX?this.getX():this.xPrev,e=this._wdw||!this.skipY?this.getY():this.yPrev,f=e-this.yPrev,g=d-this.xPrev,i=h.autoKillThreshold;this.x<0&&(this.x=0),this.y<0&&(this.y=0),this._autoKill&&(!this.skipX&&(g>i||-i>g)&&d<c(this._target,"x")&&(this.skipX=!0),!this.skipY&&(f>i||-i>f)&&e<c(this._target,"y")&&(this.skipY=!0),this.skipX&&this.skipY&&(this._tween.kill(),this.vars.onAutoKill&&this.vars.onAutoKill.apply(this.vars.onAutoKillScope||this._tween,this.vars.onAutoKillParams||[]))),this._wdw?b.scrollTo(this.skipX?d:this.x,this.skipY?e:this.y):(this.skipY||(this._target.scrollTop=this.y),this.skipX||(this._target.scrollLeft=this.x)),this.xPrev=this.x,this.yPrev=this.y}}),i=h.prototype;h.max=c,h.getOffset=f,h.buildGetter=e,h.autoKillThreshold=7,i._kill=function(a){return a.scrollTo_x&&(this.skipX=!0),a.scrollTo_y&&(this.skipY=!0),this._super._kill.call(this,a)}}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]};"undefined"!=typeof module&&module.exports?(require("../TweenLite.min.js"),module.exports=b()):"function"==typeof define&&define.amd&&define(["TweenLite"],b)}("ScrollToPlugin"); 48 49/* swiper slider custom */ 50function UGFunctions() { 51 function e(e, t, i) { 52 t.addEventListener ? t.addEventListener(e, i, !1) : t.attachEvent ? t.attachEvent("on" + e, i) : t[e] = i 53 } 54 var t = null, 55 i = this, 56 n = { 57 starTime: 0, 58 arrThemes: [], 59 isTouchDevice: -1, 60 isRgbaSupported: -1, 61 timeCache: {}, 62 dataCache: {}, 63 lastEventType: "", 64 lastEventTime: 0, 65 lastTouchStartElement: null, 66 touchThreshold: 700, 67 handle: null 68 }; 69 this.debugVar = "", this.z__________FULL_SCREEN___________ = function() {}, this.toFullscreen = function(e, t) { 70 if (e.requestFullscreen) e.requestFullscreen(); 71 else if (e.mozRequestFullScreen) e.mozRequestFullScreen(); 72 else if (e.webkitRequestFullscreen) e.webkitRequestFullscreen(); 73 else { 74 if (!e.msRequestFullscreen) return !1; 75 e.msRequestFullscreen() 76 } 77 return !0 78 }, this.exitFullscreen = function() { 79 if (0 == i.isFullScreen()) return !1; 80 if (document.exitFullscreen) document.exitFullscreen(); 81 else if (document.cancelFullScreen) document.cancelFullScreen(); 82 else if (document.mozCancelFullScreen) document.mozCancelFullScreen(); 83 else if (document.webkitExitFullscreen) document.webkitExitFullscreen(); 84 else { 85 if (!document.msExitFullscreen) return !1; 86 document.msExitFullscreen() 87 } 88 return !0 89 }, this.addFullScreenChangeEvent = function(t) { 90 document.webkitCancelFullScreen ? e("webkitfullscreenchange", document, t) : document.msExitFullscreen ? e("MSFullscreenChange", document, t) : document.mozCancelFullScreen ? e("mozfullscreenchange", document, t) : e("fullscreenchange", document, t) 91 }, this.destroyFullScreenChangeEvent = function() { 92 jQuery(document).unbind("fullscreenChange"), jQuery(document).unbind("mozfullscreenchange"), jQuery(document).unbind("webkitfullscreenchange"), jQuery(document).unbind("MSFullscreenChange") 93 }, this.getFullScreenElement = function() { 94 var e = document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement; 95 return e 96 }, this.isFullScreen = function() { 97 var e = document.fullscreen || document.mozFullScreen || document.webkitIsFullScreen || document.msFullscreenElement; 98 return e = !! e 99 }, this.z__________GET_PROPS___________ = function() {}, this.getBrowserPrefix = function() { 100 if (null !== t) return t; 101 var e = ["webkit", "Moz", "ms", "O"], 102 i = document.createElement("div"); 103 for (var n in e) { 104 var r = e[n]; 105 if (r + "Transform" in i.style) return r = r.toLowerCase(), t = r, r 106 } 107 return t = "", "" 108 }, this.getImageInsideParentDataByImage = function(e, t, n) { 109 var r = e.parent(), 110 a = i.getImageOriginalSize(e), 111 s = i.getImageInsideParentData(r, a.width, a.height, t, n); 112 return s 113 }, this.getImageInsideParentData = function(e, t, i, n, r, a, s) { 114 if (!r) var r = {}; 115 var o = {}; 116 if ("undefined" == typeof a) var a = e.width(); 117 if ("undefined" == typeof s) var s = e.height(); 118 r.padding_left && (a -= r.padding_left), r.padding_right && (a -= r.padding_right), r.padding_top && (s -= r.padding_top), r.padding_bottom && (s -= r.padding_bottom); 119 var l = null, 120 u = "100%", 121 d = null, 122 c = null, 123 g = "display:block;margin:0px auto;"; 124 if (t > 0 && i > 0) { 125 if ("down" == n && a > t && s > i) u = i, l = t, c = (a - l) / 2, d = (s - u) / 2; 126 else if ("fill" == n) { 127 var p = t / i; 128 u = s, l = u * p, a > l ? (l = a, u = l / p, c = 0, d = Math.round((u - s) / 2 * -1)) : (d = 0, c = Math.round((l - a) / 2 * -1)) 129 } else { 130 var p = t / i; 131 u = s, l = u * p, d = 0, c = (a - l) / 2, "fitvert" != n && l > a && (l = a, u = l / p, c = 0, d = (s - u) / 2) 132 } 133 l = Math.floor(l), u = Math.floor(u), d = Math.floor(d), c = Math.floor(c), g = "position:absolute;" 134 } 135 return r.padding_top && (d += r.padding_top), r.padding_left && (c += r.padding_left), o.imageWidth = l, o.imageHeight = u, o.imageTop = d, o.imageLeft = c, o.imageRight = c + l, 0 == d || "100%" == u ? o.imageBottom = null : o.imageBottom = d + u, o.style = g, o 136 }, this.getElementCenterPosition = function(e, t) { 137 var n = e.parent(), 138 r = i.getElementSize(e), 139 a = i.getElementSize(n), 140 s = a.width, 141 o = a.height; 142 t && void 0 !== t.padding_top && (o -= t.padding_top), t && void 0 !== t.padding_bottom && (o -= t.padding_bottom), t && void 0 !== t.padding_left && (s -= t.padding_left), t && void 0 !== t.padding_right && (s -= t.padding_right); 143 var l = {}; 144 return l.left = Math.round((s - r.width) / 2), l.top = Math.round((o - r.height) / 2), t && void 0 !== t.padding_top && (l.top += t.padding_top), t && void 0 !== t.padding_left && (l.left += t.padding_left), l 145 }, this.getElementCenterPoint = function(e, t) { 146 if (!t) var t = !1; 147 var n = i.getElementSize(e), 148 r = {};
149 return r.x = n.width / 2, r.y = n.height / 2, 1 == t && (r.x += n.left, r.y += n.top), r.x = Math.round(r.x), r.y = Math.round(r.y), r 150 }, this.getMousePosition = function(e, t) { 151 var i = { 152 pageX: e.pageX, 153 pageY: e.pageY, 154 clientX: e.clientX, 155 clientY: e.clientY 156 }; 157 if (e.originalEvent && e.originalEvent.touches && e.originalEvent.touches.length > 0 && (i.pageX = e.originalEvent.touches[0].pageX, i.pageY = e.originalEvent.touches[0].pageY, i.clientX = e.originalEvent.touches[0].clientX, i.clientY = e.originalEvent.touches[0].clientY), t) { 158 var n = t.offset(); 159 i.mouseX = i.pageX - n.left, i.mouseY = i.pageY - n.top 160 } 161 return i 162 }, this.getMouseElementPoint = function(e, t) { 163 var n = { 164 x: e.pageX, 165 y: e.pageY 166 }, r = i.getElementLocalPoint(n, t); 167 return r 168 }, this.getElementLocalPoint = function(e, t) { 169 var i = {}, n = t.offset(); 170 return i.x = Math.round(e.x - n.left), i.y = Math.round(e.y - n.top), i 171 }, this.getImageOriginalSize = function(e, t, i) { 172 if ("undefined" != typeof t && "undefined" != typeof i) return { 173 width: t, 174 height: i 175 }; 176 var n = e[0]; 177 if ("undefined" == typeof n) throw new Error("getImageOriginalSize error - Image not found"); 178 var r = {}; 179 if ("undefined" == typeof n.naturalWidth) { 180 if ("number" == typeof e.data("naturalWidth")) { 181 var r = {}; 182 return r.width = e.data("naturalWidth"), r.height = e.data("naturalHeight"), r 183 } 184 var a = new Image; 185 return a.src = n.src, a.complete ? (r.width = a.width, r.height = a.height, e.data("naturalWidth", r.width), e.data("naturalHeight", r.height), r) : { 186 width: 0, 187 height: 0 188 } 189 } 190 return r.width = n.naturalWidth, r.height = n.naturalHeight, r 191 }, this.getimageRatio = function(e) { 192 var t = i.getImageOriginalSize(e), 193 n = i.getElementSize(e), 194 r = n.width / t.width; 195 return r 196 }, this.isImageFitParent = function(e) { 197 var t = e.parent(), 198 n = i.getElementSize(e), 199 r = i.getElementSize(t); 200 return n.width <= r.width && n.height <= r.height 201 }, this.getElementSize = function(e) { 202 if (void 0 === e) throw new Error("Can't get size, empty element"); 203 var t = e.position(); 204 return t.height = e.outerHeight(), t.width = e.outerWidth(), t.left = Math.round(t.left), t.top = Math.round(t.top), t.right = t.left + t.width, t.bottom = t.top + t.height, t 205 }, this.isElementBiggerThenParent = function(e) { 206 var t = e.parent(), 207 n = i.getElementSize(e), 208 r = i.getElementSize(t); 209 return n.width > r.width || n.height > r.height 210 }, this.isPointInsideElement = function(e, t) { 211 var i = e.x >= 0 && e.x < t.width; 212 if (0 == i) return !1; 213 var n = e.y >= 0 && e.y < t.height; 214 return 0 != n 215 }, this.getElementRelativePos = function(e, t, n, r) { 216 if (!r) var r = e.parent(); 217 if ("number" == typeof e) var a = { 218 width: e, 219 height: e 220 }; 221 else var a = i.getElementSize(e); 222 var s = i.getElementSize(r); 223 switch (t) { 224 case "top": 225 case "left": 226 t = 0, n && (t += n); 227 break; 228 case "center": 229 t = Math.round((s.width - a.width) / 2), n && (t += n); 230 break; 231 case "right": 232 t = s.width - a.width, n && (t -= n); 233 break; 234 case "middle": 235 t = Math.round((s.height - a.height) / 2), n && (t += n); 236 break; 237 case "bottom": 238 t = s.height - a.height, n && (t -= n) 239 } 240 return t 241 }, this.z_________SET_ELEMENT_PROPS_______ = function() {}, this.zoomImageInsideParent = function(e, t, n, r, a, s, o) { 242 if (!n) var n = 1.2; 243 if (!a) var a = "fit"; 244 var l, u, d, c, g = n, 245 p = e.parent(), 246 h = i.getElementSize(e), 247 m = i.getImageOriginalSize(e), 248 f = !1, 249 _ = 0, 250 v = 0, 251 b = 0, 252 y = 0; 253 if (r) { 254 var w = i.getMouseElementPoint(r, e); 255 f = i.isPointInsideElement(w, h), b = w.x, y = w.y 256 } else f = !1; 257 if (0 == f) { 258 var T = i.getElementCenterPoint(e); 259 b = T.x, y = T.y 260 } 261 if (1 == t) l = h.height * g, u = h.width * g, 0 != b && (_ = -(b * g - b)), 0 != y && (v = -(y * g - y)); 262 else { 263 l = h.height / g, u = h.width / g; 264 var x = i.getImageInsideParentData(p, m.width, m.height, a, o); 265 if (u < x.imageWidth) return i.scaleImageFitParent(e, m.width, m.height, a, o), !0; 266 1 == f && (0 != b && (_ = -(b / g - b)), 0 != y && (v = -(y / g - y))) 267 } 268 if (s) { 269 var S = 1; 270 if (0 != m.width && (S = u / m.width), S > s) return !1 271 } 272 if (i.setElementSize(e, u, l), 0 == t && 0 == f) { 273 var I = i.getElementCenterPosition(e); 274 d = I.left, c = I.top 275 } else d = h.left + _, c = h.top + v; 276 return i.placeElement(e, d, c), !0 277 }, this.placeElement = function(e, t, n, r, a, s) { 278 if (0 == jQuery.isNumeric(t) || 0 == jQuery.isNumeric(n)) { 279 if (!s) var s = e.parent(); 280 var o = i.getElementSize(e), 281 l = i.getElementSize(s) 282 } 283 if (0 == jQuery.isNumeric(t)) switch (t) {
284 case "left": 285 t = 0, r && (t += r); 286 break; 287 case "center": 288 t = Math.round((l.width - o.width) / 2), r && (t += r); 289 break; 290 case "right": 291 t = l.width - o.width, r && (t -= r) 292 } 293 if (0 == jQuery.isNumeric(n)) switch (n) { 294 case "top": 295 n = 0, a && (n += a); 296 break; 297 case "middle": 298 case "center": 299 n = Math.round((l.height - o.height) / 2), a && (n += a); 300 break; 301 case "bottom": 302 n = l.height - o.height, a && (n -= a) 303 } 304 var u = { 305 position: "absolute", 306 margin: "0px" 307 }; 308 null !== t && (u.left = t), null !== n && (u.top = n), e.css(u) 309 }, this.placeElementInParentCenter = function(e) { 310 i.placeElement(e, "center", "middle") 311 }, this.setElementSizeAndPosition = function(e, t, i, n, r) { 312 var a = { 313 width: n + "px", 314 height: r + "px", 315 left: t + "px", 316 top: i + "px", 317 position: "absolute", 318 margin: "0px" 319 }; 320 e.css(a) 321 }, this.setElementSize = function(e, t, i) { 322 var n = { 323 width: t + "px" 324 }; 325 null !== i && "undefined" != typeof i && (n.height = i + "px"), e.css(n) 326 }, this.cloneElementSizeAndPos = function(e, t, n, r, a) { 327 var s = e.position(); 328 if (void 0 == s) throw new Error("Can't get size, empty element"); 329 n === !0 ? (s.height = e.outerHeight(), s.width = e.outerWidth()) : (s.height = e.height(), s.width = e.width()), s.left = Math.round(s.left), s.top = Math.round(s.top), r && (s.left += r), a && (s.top += a), i.setElementSizeAndPosition(t, s.left, s.top, s.width, s.height) 330 }, this.placeImageInsideParent = function(e, t, n, r, a, s) { 331 var o = i.getImageInsideParentData(t, n, r, a, s), 332 l = "<img"; 333 null !== o.imageWidth && (l += " width = '" + o.imageWidth + "'", o.style += "width:" + o.imageWidth + ";"), null != o.imageHeight && ("100%" == o.imageHeight ? (l += " height = '" + o.imageHeight + "'", o.style += "height:" + o.imageHeight + ";") : (l += " height = '" + o.imageHeight + "'", o.style += "height:" + o.imageHeight + "px;")), null !== o.imageTop && (o.style += "top:" + o.imageTop + "px;"), null !== o.imageLeft && (o.style += "left:" + o.imageLeft + "px;"), e = i.escapeDoubleSlash(e), l += " style='" + o.style + "'", l += ' src="' + e + '"', l += ">", t.html(l); 334 var u = t.children("img"); 335 return u 336 }, this.scaleImageCoverParent = function(e, t, n) { 337 if ("number" == typeof t) var r = t, 338 a = n; 339 else var r = t.outerWidth(), 340 a = t.outerHeight(); 341 var s = i.getImageOriginalSize(e), 342 o = s.width, 343 l = s.height, 344 u = o / l, 345 d = a, 346 c = d * u, 347 g = 0, 348 p = 0; 349 r > c ? (c = r, d = c / u, p = 0, g = Math.round((d - a) / 2 * -1)) : (g = 0, p = Math.round((c - r) / 2 * -1)), c = Math.round(c), d = Math.round(d), e.css({ 350 width: c + "px", 351 height: d + "px", 352 left: p + "px", 353 top: g + "px" 354 }) 355 }, this.scaleImageFitParent = function(e, t, n, r, a) { 356 var s = e.parent(), 357 o = i.getImageInsideParentData(s, t, n, r, a), 358 l = !1, 359 u = {}; 360 return null !== o.imageWidth && (l = !0, e.removeAttr("width"), u.width = o.imageWidth + "px"), null != o.imageHeight && (l = !0, e.removeAttr("height"), u.height = o.imageHeight + "px"), null !== o.imageTop && (l = !0, u.top = o.imageTop + "px"), null !== o.imageLeft && (l = !0, u.left = o.imageLeft + "px"), 1 == l && (u.position = "absolute", u.margin = "0px 0px", e.css(u)), o 361 }, this.scaleImageByHeight = function(e, t, n, r) { 362 var a = i.getImageOriginalSize(e, n, r), 363 s = a.width / a.height, 364 o = Math.round(t * s); 365 t = Math.round(t), i.setElementSize(e, o, t) 366 }, this.scaleImageByWidth = function(e, t, n, r) { 367 var a = i.getImageOriginalSize(e, n, r), 368 s = a.width / a.height, 369 o = Math.round(t / s); 370 t = Math.round(t), i.setElementSize(e, t, o) 371 }, this.scaleImageExactSizeInParent = function(e, t, n, r, a, s) { 372 var o = e.parent(), 373 l = i.getElementSize(o); 374 l.width < r && (r = l.width), l.height < a && (a = l.height); 375 var u = i.getImageInsideParentData(null, t, n, s, null, r, a), 376 d = r, 377 c = a, 378 g = u.imageLeft, 379 p = u.imageLeft, 380 h = u.imageTop, 381 m = u.imageTop, 382 f = Math.round((l.width - r) / 2),
383 _ = Math.round((l.height - a) / 2), 384 v = u.imageWidth + g + p, 385 b = r - v; 386 0 != b && (p += b); 387 var y = u.imageHeight + h + m, 388 b = a - y; 389 0 != b && (m += b), e.removeAttr("width"), e.removeAttr("height"); 390 var w = { 391 position: "absolute", 392 margin: "0px 0px" 393 }; 394 w.width = d + "px", w.height = c + "px", w.left = f + "px", w.top = _ + "px", w["padding-left"] = g + "px", w["padding-top"] = h + "px", w["padding-right"] = p + "px", w["padding-bottom"] = m + "px", e.css(w); 395 var T = {}; 396 return T.imageWidth = d, T.imageHeight = c, T 397 }, this.showElement = function(e, t, i) { 398 e.show().fadeTo(0, 1), t && t.show().fadeTo(0, 1), i && i.show().fadeTo(0, 1) 399 }, this.z_________GALLERY_RELATED_FUNCTIONS_______ = function() {}, this.disableButton = function(e, t) { 400 if (!t) var t = "ug-button-disabled"; 401 0 == i.isButtonDisabled(e, t) && e.addClass(t) 402 }, this.convertCustomPrefixOptions = function(e, t, i) { 403 if (!t) return e; 404 var n = {}; 405 return jQuery.each(e, function(e, r) { 406 if (0 === e.indexOf(t + "_" + i + "_")) { 407 var a = e.replace(t + "_" + i + "_", i + "_"); 408 n[a] = r 409 } else n[e] = r 410 }), n 411 }, this.enableButton = function(e, t) { 412 if (!t) var t = "ug-button-disabled"; 413 1 == i.isButtonDisabled(e, t) && e.removeClass(t) 414 }, this.isButtonDisabled = function(e, t) { 415 if (!t) var t = "ug-button-disabled"; 416 return !!e.hasClass(t) 417 }, this.z_________MATH_FUNCTIONS_______ = function() {}, this.normalizeSetting = function(e, t, i, n, r, a) { 418 if (!a) var a = !1; 419 var s = (r - i) / (n - i); 420 return r = e + (t - e) * s, 1 == a && (e > r && (r = e), r > t && (r = t)), r 421 }, this.getNormalizedValue = function(e, t, i, n, r) { 422 var a = (r - e) / (t - e); 423 return r = e + (n - i) * a 424 }, this.getDistance = function(e, t, i, n) { 425 var r = Math.round(Math.sqrt(Math.abs((i - e) * (i - e) + (n - t) * (n - t)))); 426 return r 427 }, this.getMiddlePoint = function(e, t, i, n) { 428 var r = {}; 429 return r.x = e + Math.round((i - e) / 2), r.y = t + Math.round((n - t) / 2), r 430 }, this.getNumItemsInSpace = function(e, t, i) { 431 var n = Math.floor((e + i) / (t + i)); 432 return n 433 }, this.getNumItemsInSpaceRound = function(e, t, i) { 434 var n = Math.round((e + i) / (t + i)); 435 return n 436 }, this.getSpaceByNumItems = function(e, t, i) { 437 var n = e * t + (e - 1) * i; 438 return n 439 }, this.getItemSizeInSpace = function(e, t, i) { 440 var n = Math.floor((e - (t - 1) * i) / t); 441 return n 442 }, this.getColX = function(e, t, i) { 443 var n = e * (t + i); 444 return n 445 }, this.getColByIndex = function(e, t) { 446 var i = t % e; 447 return i 448 }, this.getColRowByIndex = function(e, t) { 449 var i = Math.floor(e / t), 450 n = Math.floor(e % t); 451 return { 452 col: n, 453 row: i 454 } 455 }, this.getIndexByRowCol = function(e, t, i) { 456 if (0 > e) return -1; 457 if (0 > t) return -1; 458 var n = e * i + t; 459 return n 460 }, this.getPrevRowSameColIndex = function(e, t) { 461 var n = i.getColRowByIndex(e, t), 462 r = i.getIndexByRowCol(n.row - 1, n.col, t); 463 return r 464 }, this.getNextRowSameColIndex = function(e, t) { 465 var n = i.getColRowByIndex(e, t), 466 r = i.getIndexByRowCol(n.row + 1, n.col, t); 467 return r 468 }, this.z_________DATA_FUNCTIONS_______ = function() {}, this.setGlobalData = function(e, t) { 469 jQuery.data(document.body, e, t) 470 }, this.getGlobalData = function(e) { 471 var t = jQuery.data(document.body, e); 472 return t 473 }, this.z_________EVENT_DATA_FUNCTIONS_______ = function() {}, this.handleScrollTop = function(e) { 474 if (0 == i.isTouchDevice()) return null; 475 var t = i.getStoredEventData(e), 476 r = 15, 477 a = 15; 478 if (null === t.scrollDir && (Math.abs(t.diffMouseX) > r ? t.scrollDir = "hor" : Math.abs(t.diffMouseY) > a && Math.abs(t.diffMouseY) > Math.abs(t.diffMouseX) && (t.scrollDir = "vert", t.scrollStartY = t.lastMouseClientY, t.scrollOrigin = jQuery(document).scrollTop(), n.dataCache[e].scrollStartY = t.lastMouseClientY, n.dataCache[e].scrollOrigin = t.scrollOrigin), n.dataCache[e].scrollDir = t.scrollDir), "vert" !== t.scrollDir) return t.scrollDir; 479 var s = (jQuery(document).scrollTop(), t.scrollOrigin - (t.lastMouseClientY - t.scrollStartY)); 480 return s >= 0 && jQuery(document).scrollTop(s), t.scrollDir 481 }, this.wasVerticalScroll = function(e) { 482 var t = i.getStoredEventData(e); 483 return "vert" === t.scrollDir 484 }, this.storeEventData = function(e, t, r) { 485 var a = i.getMousePosition(e), 486 s = jQuery.now(), 487 o = { 488 startTime: s, 489 lastTime: s, 490 startMouseX: a.pageX, 491 startMouseY: a.pageY, 492 lastMouseX: a.pageX, 493 lastMouseY: a.pageY, 494 startMouseClientY: a.clientY, 495 lastMouseClientY: a.clientY, 496 scrollTop: jQuery(document).scrollTop(), 497 scrollDir: null 498 }; 499 r && (o = jQuery.extend(o, r)), n.dataCache[t] = o 500 }, this.updateStoredEventData = function(e, t, r) { 501 if (!n.dataCache[t]) throw new Error("updateEventData error: must have stored cache object"); 502 var a = n.dataCache[t], 503 s = i.getMousePosition(e); 504 a.lastTime = jQuery.now(), void 0 !== s.pageX && (a.lastMouseX = s.pageX, a.lastMouseY = s.pageY, a.lastMouseClientY = s.clientY), r && (a = jQuery.extend(a, r)), n.dataCache[t] = a 505 }
505, this.getStoredEventData = function(e, t) { 506 if (!n.dataCache[e]) throw new Error("updateEventData error: must have stored cache object"); 507 var i = n.dataCache[e]; 508 return i.diffMouseX = i.lastMouseX - i.startMouseX, i.diffMouseY = i.lastMouseY - i.startMouseY, i.diffMouseClientY = i.lastMouseClientY - i.startMouseClientY, i.diffTime = i.lastTime - i.startTime, t === !0 ? (i.startMousePos = i.lastMouseY, i.lastMousePos = i.lastMouseY, i.diffMousePos = i.diffMouseY) : (i.startMousePos = i.lastMouseX, i.lastMousePos = i.lastMouseX, i.diffMousePos = i.diffMouseX), i 509 }, this.isApproveStoredEventClick = function(e, t) { 510 if (!n.dataCache[e]) return !0; 511 var r = i.getStoredEventData(e, t), 512 a = Math.abs(r.diffMousePos); 513 return !(r.diffTime > 400) && !(a > 30) 514 }, this.clearStoredEventData = function(e) { 515 n.dataCache[e] = null 516 }, this.z_________CHECK_SUPPORT_FUNCTIONS_______ = function() {}, this.isCanvasExists = function() { 517 var e = jQuery('<canvas width="500" height="500" > </canvas>')[0]; 518 return "function" == typeof e.getContext 519 }, this.isScrollbarExists = function() { 520 var e = window.innerWidth > document.documentElement.clientWidth; 521 return e 522 }, this.isTouchDevice = function() { 523 if (-1 !== n.isTouchDevice) return n.isTouchDevice; 524 try { 525 document.createEvent("TouchEvent"), n.isTouchDevice = !0 526 } catch (e) { 527 n.isTouchDevice = !1 528 } 529 return n.isTouchDevice 530 }, this.isRgbaSupported = function() { 531 if (-1 !== n.isRgbaSupported) return n.isRgbaSupported; 532 var e = document.getElementsByTagName("script")[0], 533 t = e.style.color; 534 try { 535 e.style.color = "rgba(1,5,13,0.44)" 536 } catch (e) {} 537 var i = e.style.color != t; 538 return e.style.color = t, n.isRgbaSupported = i, i 539 }, this.z_________GENERAL_FUNCTIONS_______ = function() {}, this.checkMinJqueryVersion = function(e) { 540 for (var t = jQuery.fn.jquery.split("."), i = e.split("."), n = 0, r = t.length; r > n; n++) { 541 var a = parseInt(t[n]), 542 s = parseInt(i[n]); 543 if ("undefined" == typeof i[n]) return !0; 544 if (s > a) return !1; 545 if (a > s) return !0 546 } 547 return !0 548 }, this.getCssSizeParam = function(e) { 549 return jQuery.isNumeric(e) ? e + "px" : e 550 }, this.convertHexToRGB = function(e, t) { 551 var i = e.replace("#", ""); 552 return i === e ? e : (r = parseInt(i.substring(0, 2), 16), g = parseInt(i.substring(2, 4), 16), b = parseInt(i.substring(4, 6), 16), result = "rgba(" + r + "," + g + "," + b + "," + t + ")", result) 553 }, this.timestampToString = function(e) { 554 var t = new Date(e), 555 i = t.getDate() + "/" + t.getMonth(); 556 return i += " " + t.getHours() + ":" + t.getMinutes() + ":" + t.getSeconds() + ":" + t.getMilliseconds() 557 }, this.getArrTouches = function(e) { 558 var t = []; 559 return e.originalEvent && e.originalEvent.touches && e.originalEvent.touches.length > 0 && (t = e.originalEvent.touches), t 560 }, this.getArrTouchPositions = function(e) { 561 for (var t = [], i = 0; i < e.length; i++) { 562 var n = { 563 pageX: e[i].pageX, 564 pageY: e[i].pageY 565 }; 566 t.push(n) 567 } 568 return t 569 }, this.startTimeDebug = function() { 570 n.starTime = jQuery.now() 571 }, this.showTimeDebug = function() { 572 var e = jQuery.now(), 573 t = e - n.starTime; 574 debugLine({ 575 "Time Passed": t 576 }, !0) 577 }, this.initProgressIndicator = function(e, t, n) { 578 switch ("bar" != e && 0 == i.isCanvasExists() && (e = "bar"), e) { 579 case "bar": 580 var r = new UGProgressBar; 581 r.putHidden(n, t); 582 break; 583 default: 584 case "pie": 585 var r = new UGProgressPie; 586 r.putHidden(n, t); 587 break; 588 case "pie2": 589 t.type_fill = !0; 590 var r = new UGProgressPie; 591 r.putHidden(n, t) 592 } 593 return r 594 }, this.setButtonMobileReady = function(e) { 595 e.on("touchstart", function(e) { 596 jQuery(this).addClass("ug-nohover") 597 }), e.on("mousedown touchend", function(e) { 598 return e.stopPropagation(), e.stopImmediatePropagation(), !1 599 }) 600 }, this.registerTheme = function(e) { 601 n.arrThemes.push(e) 602 }, this.getArrThemes = function() { 603 return n.arrThemes 604 }, this.isThemeRegistered = function(e) { 605 return -1 !== jQuery.inArray(e, n.arrThemes) 606 }, this.getFirstRegisteredTheme = function() { 607 if (0 == n.arrThemes.length) return ""; 608 var e = n.arrThemes[0]; 609 return e 610 }, this.isTimePassed = function(e, t) { 611 if (!t) var t = 100; 612 var i = jQuery.now(); 613 0 == n.timeCache.hasOwnProperty(e) ? lastTime = 0 : lastTime = n.timeCache[e]; 614 var r = i - lastTime; 615 return n.timeCache[e] = i, !(t >= r) 616 }, this.whenContiniousEventOver = function(e, t, i) { 617 if (!i) var i = 300; 618 1 == n.timeCache.hasOwnProperty(e) && null != n.timeCache[e] && (clearTimeout(n.timeCache[e]), n.timeCache[e] = null), n.timeCache[e] = setTimeout(t, i) 619 }, this.validateClickTouchstartEvent = function(e) { 620 var t = !0, 621 i = jQuery.now() - n.lastEventTime; 622 return "click" == e && "touchstart" == n.lastEventType && 1e3 > i && (t = !1), n.lastEventTime = jQuery.now(), n.lastEventType = e, t 623 }, this.addClassOnHover = function(e, t) { 624 if (!t) var t = "ug-button-hover"; 625 e.hover(function() { 626 jQuery(this).addClass(t) 627 }, function() { 628 jQuery(this).removeClass(t) 629 }) 630 }, this.destroyButton = function(e) { 631 e.off("mouseenter"), e.off("mouseleave"), e.off("click"), e.off("touchstart"), e.off("touchend"), e.off("mousedown"), e.off("tap") 632 }, this.setButtonOnClick = function(e, t) { 633 i.setButtonMobileReady(e), e.on("click touchstart", function(e) { 634 return objThis = jQuery(this), e.stopPropagation(), e.stopImmediatePropagation(), 0 == i.validateClickTouchstartEvent(e.type) || void t(objThis, e) 635 }) 636 }, this.setButtonOnTap = function(e, t) { 637 e.on("tap", t), 0 == i.isTouchDevice() ? e.on("click", function(e) { 638 var t = jQuery(this); 639 return 0 == i.validateClickTouchstartEvent(e.type) || void t.trigger("tap") 640 }) : (e.on("touchstart", function(e) { 641 var t = jQuery(this); 642 t.addClass("ug-nohover"), n.lastTouchStartElement = jQuery(this), n.lastEventTime = jQuery.now() 643 }), e.on("touchend", function(e) { 644 var t = jQuery(this); 645 if (0 == t.is(n.lastTouchStartElement)) return !0; 646 if (!n.lastEventTime) return !0; 647 var i = jQuery.now() - n.lastEventTime; 648 return i > n.touchThreshold || void t.trigger("tap") 649 })) 650 }, this.loadJs = function(e, t) { 651 t === !0 && (e = location.protocol + "//" + e); 652 var i = document.createElement("script"); 653 i.src = e; 654 var n = document.getElementsByTagName("script")[0]; 655 n.parentNode.insertBefore(i, n) 656 }, this.loadCss = function(e, t) { 657 t === !0 && (e = location.protocol + "//" + e); 658 var i = document.createElement("link"); 659 i.setAttribute("rel", "stylesheet"), i.setAttribute("type", "text/css"), i.setAttribute("href", e), document.getElementsByTagName("head")[0].appendChild(i) 660 }, this.addEvent = function(e, t, i) { 661 "undefined" != typeof e.addEventListener ? e.addEventListener(t, i, !1) : e.attachEvent && e.attachEvent("on" + t, i) 662 }, this.checkImagesLoaded = function(e, t, i) { 663 function n(e, n) { 664 r++, "function" == typeof i && setTimeout(function() { 665 i(e, n) 666 }), r == a && "function" == typeof t && setTimeout(function() { 667 t() 668 }) 669 } 670 var r = 0, 671 a = e.length; 672 return 0 == a && t ? (t(), !1) : void setTimeout(function() { 673 for (var t = 0; a > t; t++) { 674 var i = e[t];
675 if (void 0 !== i.naturalWidth && 0 !== i.naturalWidth) n(e[t], !1); 676 else { 677 var r = jQuery("<img/>"); 678 r.data("index", t), r.on("load", function() { 679 var t = jQuery(this).data("index"); 680 n(e[t], !1) 681 }), r.on("error", function() { 682 var t = jQuery(this).data("index"); 683 n(e[t], !0) 684 }), r.attr("src", i.src) 685 } 686 } 687 }) 688 }, this.waitForWidth = function(e, t) { 689 var i = e.width(); 690 return 0 != i ? (t(), !1) : void(n.handle = setInterval(function() { 691 i = e.width(), 0 != i && (clearInterval(n.handle), t()) 692 }, 300)) 693 }, this.arrayShuffle = function(e) { 694 if ("object" != typeof e) return e; 695 for (var t, i, n = e.length; n; t = parseInt(Math.random() * n), i = e[--n], e[n] = e[t], e[t] = i); 696 return e 697 }, this.getObjectLength = function(e) { 698 var t = 0; 699 for (var i in e) t++; 700 return t 701 }, this.normalizePercent = function(e) { 702 return 0 > e && (e = 0), e > 1 && (e = 1), e 703 }, this.stripTags = function(e) { 704 var t = e.replace(/(<([^>]+)>)/gi, ""); 705 return t 706 }, this.escapeDoubleSlash = function(e) { 707 return e.replace('"', '"') 708 }, this.htmlentitles = function(e) { 709 var t = jQuery("<div/>").text(e).html(); 710 return t 711 }, this.z_________END_GENERAL_FUNCTIONS_______ = function() {} 712} 713function UGThumbsGeneral() { 714 function e(e, t) { 715 var i = T[e], 716 n = ""; 717 0 == j.customThumbs && (n = " ug-thumb-generated"); 718 var r = i.index + 1, 719 a = "style='z-index:" + r + ";'", 720 s = "<div class='ug-thumb-wrapper" + n + "' " + a + "></div>"; 721 if (1 == C.thumb_wrapper_as_link) { 722 var o = i.link; 723 "" == i.link && (o = "javascript:void(0)"); 724 var l = ""; 725 1 == C.thumb_link_newpage && i.link && (l = " target='_blank'"); 726 var s = "<a href='" + o + "'" + l + " class='ug-thumb-wrapper" + n + "'></a>" 727 } 728 var u = jQuery(s), 729 d = i.objThumbImage; 730 if (0 == j.customThumbs) { 731 if (1 == C.thumb_show_loader && d) { 732 var c = "ug-thumb-loader-dark"; 733 "bright" == C.thumb_loader_type && (c = "ug-thumb-loader-bright"), u.a
733ppend("<div class='ug-thumb-loader " + c + "'></div>"), u.append("<div class='ug-thumb-error' style='display:none'></div>") 734 } 735 if (d) { 736 if (d.addClass("ug-thumb-image"), 1 == C.thumb_image_overlay_effect) { 737 var g = d.clone().appendTo(u); 738 g.addClass("ug-thumb-image-overlay " + t).removeClass("ug-thumb-image"), g.fadeTo(0, 0), i.objImageOverlay = g 739 } 740 u.append(d) 741 } 742 } 743 return j.isEffectBorder && u.append("<div class='ug-thumb-border-overlay'></div>"), j.isEffectOverlay && u.append("<div class='ug-thumb-overlay'></div>"), x.append(u), j.customThumbs && j.funcSetCustomThumbHtml(u, i), T[e].objThumbWrapper = u, u 744 } 745 function t(e, t, i, n) { 746 var r = { 747 width: e + "px", 748 height: t + "px" 749 }, a = { 750 width: e - j.thumbInnerReduce + "px", 751 height: t - j.thumbInnerReduce + "px" 752 }, s = ".ug-thumb-loader, .ug-thumb-error, .ug-thumb-border-overlay, .ug-thumb-overlay"; 753 i ? (n !== !0 && i.css(r), i.find(s).css(a)) : (x.children(".ug-thumb-wrapper").css(r), x.find(s).css(a)) 754 } 755 function i(e, t, i, n) { 756 if (!n) var n = !1; 757 E.isFakeFullscreen() && (n = !0); 758 var r = e.children(".ug-thumb-border-overlay"), 759 a = {}; 760 a["border-width"] = t + "px", 0 != t && (a["border-color"] = i), n && n === !0 ? (r.css(a), 0 == t ? r.hide() : r.show()) : (0 == t ? r.stop().fadeOut(C.thumb_transition_duration) : r.show().stop().fadeIn(C.thumb_transition_duration), l(r, a)) 761 } 762 function n(e, t, i) { 763 var n = e.children(".ug-thumb-overlay"), 764 r = C.thumb_transition_duration; 765 i && i === !0 && (r = 0), t ? n.stop(!0).fadeTo(r, j.colorOverlayOpacity) : n.stop(!0).fadeTo(r, 0) 766 } 767 function r(e, t, i) { 768 var n = e.children("img.ug-thumb-image"), 769 r = e.children("img.ug-thumb-image-overlay"), 770 a = C.thumb_transition_duration; 771 i && i === !0 && (a = 0), t ? r.stop(!0).fadeTo(a, 1) : (n.fadeTo(0, 1), r.stop(!0).fadeTo(a, 0)) 772 } 773 function a(e, t) { 774 if (j.isEffectBorder && i(e, C.thumb_selected_border_width, C.thumb_selected_border_color, t), j.isEffectOverlay) { 775 var a = 1 == C.thumb_overlay_reverse; 776 n(e, a, t) 777 } 778 j.isEffectImage && r(e, !1, t), I.trigger(S.events.SETSELECTEDSTYLE, e) 779 } 780 function s(e) { 781 var t = S.getItemByThumb(e); 782 return t.isLoaded = !0, t.isThumbImageLoaded = !1, 1 == j.customThumbs ? (I.trigger(S.events.IMAGELOADERROR, e), !0) : (e.children(".ug-thumb-loader").hide(), void e.children(".ug-thumb-error").show()) 783 } 784 function o(e) { 785 if (C.thumb_round_corners_radius <= 0) return !1; 786 var t = { 787 "border-radius": C.thumb_round_corners_radius + "px" 788 }; 789 e ? (e.css(t), e.find(".ug-thumb-border-overlay").css(t)) : x.find(".ug-thumb-wrapper, .ug-thumb-wrapper .ug-thumb-border-overlay").css(t) 790 } 791 function l(e, t) { 792 e.stop(!0).animate(t, { 793 duration: C.thumb_transition_duration, 794 easing: C.thumb_transition_easing, 795 queue: !1 796 }) 797 } 798 function u(e) { 799 1 == p(e) ? a(e, !0, "redraw") : S.setThumbNormalStyle(e, !0, "redraw") 800 } 801 function d(e, i, n) { 802 if (1 == C.thumb_fixed_size) P.scaleImageCoverParent(i, e); 803 else { 804 "height" == C.thumb_resize_by ? P.scaleImageByHeight(i, C.thumb_height) : P.scaleImageByWidth(i, C.thumb_width); 805 var r = P.getElementSize(i); 806 P.placeElement(i, 0, 0), t(r.width, r.height, e) 807 } 808 e.children(".ug-thumb-loader").hide(), i.show(), 0 == C.thumb_image_overlay_effect ? i.fadeTo(0, 1) : (1 == C.thumb_image_overlay_effect && c(i), i.fadeTo(0, 0), u(e)), I.trigger(S.events.AFTERPLACEIMAGE, e) 809 } 810 function c(e) { 811 var t = e.siblings(".ug-thumb-image-overlay"); 812 if (0 == t.length) return !1; 813 var i = P.getElementSize(e), 814 n = { 815 width: i.width + "px", 816 height: i.height + "px", 817 left: i.left + "px", 818 top: i.top + "px" 819 }; 820 t.css(n), 0 == j.customThumbs && t.fadeTo(0, 1) 821 } 822 function g() { 823 var e = "", 824 t = C.thumb_image_overlay_type.split(","); 825 for (var i in t) { 826 var n = t[i]; 827 switch (n) { 828 case "bw": 829 e += " ug-bw-effect"; 830 break; 831 case "blur": 832 e += " ug-blur-effect"; 833 break; 834 case "sepia": 835 e += " ug-sepia-effect" 836 } 837 } 838 return e 839 } 840 function p(e) { 841 return !!e.hasClass("ug-thumb-selected") 842 } 843 function h(e, i) { 844 i = jQuery(i); 845 var n = (S.getItemByThumb(i), P.getElementSize(i)); 846 t(n.width, n.height, i, !0), u(i) 847 } 848 function m(e) { 849 return 1 == j.touchEnabled ? (objThumbs.off("mouseenter").off("mouseleave"), !0) : void(0 == p(e) && S.setThumbOverStyle(e)) 850 } 851 function f(e) { 852 return 1 == j.touchEnabled || void(0 == p(e) && S.setThumbNormalStyle(e, !1)) 853 } 854 function _(e, t) { 855 if (!t) var t = !1; 856 var i = jQuery(e), 857 n = i.parents(".ug-thumb-wrapper"); 858 return 0 != n.parent().length && (objItem = S.getItemByThumb(n), (1 != objItem.isLoaded || t !== !1) && (S.triggerImageLoadedEvent(n, i), void(1 == j.customThumbs ? I.trigger(S.events.PLACEIMAGE, [n, i]) : d(n, i, objItem)))) 859 } 860 function v(e, t, i) { 861 objItem = S.getItemByThumb(t), objItem.isLoaded = !0, objItem.isThumbImageLoaded = !0; 862 var n = P.getImageOriginalSize(i); 863 objItem.thumbWidth = n.width, objItem.thumbHeight = n.height, objItem.thumbRatioByWidth = n.width / n.height, objItem.thumbRatioByHeight = n.height / n.width, t.addClass("ug-thumb-ratio-set") 864 } 865 var b, y, w, T, x, S = this, 866 I = jQuery(S), 867 E = new UniteGalleryMain, 868 P = new UGFunctions; 869 this.type = { 870 GET_THUMBS_ALL: "all", 871 GET_THUMBS_RATIO: "ratio", 872 GET_THUMBS_NO_RATIO: "no_ratio", 873 GET_THUMBS_NEW: "new" 874 }, this.events = { 875 SETOVERSTYLE: "thumbmouseover", 876 SETNORMALSTYLE: "thumbmouseout", 877 SETSELECTEDSTYLE: "thumbsetselected", 878 PLACEIMAGE: "thumbplaceimage", 879 AFTERPLACEIMAGE: "thumb_after_place_image", 880 IMAGELOADERROR: "thumbimageloaderror", 881 THUMB_IMAGE_LOADED: "thumb_image_loaded" 882 }; 883 var C = { 884 thumb_width: 88, 885 thumb_height: 50, 886 thumb_fixed_size: !0, 887 thumb_resize_by: "height", 888 thumb_border_effect: !0, 889 thumb_border_width: 0, 890 thumb_border_color: "#000000", 891 thumb_over_border_width: 0, 892 thumb_over_border_color: "#d9d9d9", 893 thumb_selected_border_width: 1, 894 thumb_selected_border_color: "#d9d9d9",
895 thumb_round_corners_radius: 0, 896 thumb_color_overlay_effect: !0, 897 thumb_overlay_color: "#000000", 898 thumb_overlay_opacity: .4, 899 thumb_overlay_reverse: !1, 900 thumb_image_overlay_effect: !1, 901 thumb_image_overlay_type: "bw", 902 thumb_transition_duration: 200, 903 thumb_transition_easing: "easeOutQuad", 904 thumb_show_loader: !0, 905 thumb_loader_type: "dark", 906 thumb_wrapper_as_link: !1, 907 thumb_link_newpage: !1 908 }, j = { 909 touchEnabled: !1, 910 num_thumbs_checking: 0, 911 customThumbs: !1, 912 funcSetCustomThumbHtml: null, 913 isEffectBorder: !1, 914 isEffectOverlay: !1, 915 isEffectImage: !1, 916 colorOverlayOpacity: 1, 917 thumbInnerReduce: 0, 918 allowOnResize: !0, 919 classNewThumb: "ug-new-thumb" 920 }, A = { 921 timeout_thumb_check: 100, 922 thumb_max_check_times: 600, 923 eventSizeChange: "thumb_size_change" 924 }; 925 this.init = function(e, t) { 926 y = e.getObjects(), E = e, b = jQuery(e), w = y.g_objWrapper, T = y.g_arrItems, C = jQuery.extend(C, t), j.isEffectBorder = C.thumb_border_effect, j.isEffectOverlay = C.thumb_color_overlay_effect, j.isEffectImage = C.thumb_image_overlay_effect 927 }, this._____________EXTERNAL_SETTERS__________ = function() {}, this.setHtmlThumbs = function(t, i) { 928 if (x = t, 1 == j.isEffectImage) var n = g(); 929 if (i !== !0) for (var r = E.getNumItems(), a = 0; r > a; a++) e(a, n); 930 else { 931 var s = S.getThumbs(); 932 s.removeClass(j.classNewThumb); 933 var o = E.getNewAddedItemsIndexes(); 934 jQuery.each(o, function(t, i) { 935 var r = e(i, n); 936 r.addClass(j.classNewThumb) 937 }) 938 } 939 }, this.setThumbNormalStyle = function(e, t, a) { 940 if (1 == j.customThumbs && e.removeClass("ug-thumb-over"), j.isEffectBorder && i(e, C.thumb_border_width, C.thumb_border_color, t), j.isEffectOverlay) { 941 var s = 1 != C.thumb_overlay_reverse; 942 n(e, s, t) 943 } 944 j.isEffectImage && r(e, !0, t), I.trigger(S.events.SETNORMALSTYLE, e) 945 }, this.setThumbOverStyle = function(e) { 946 if (1 == j.customThumbs && e.addClass("ug-thumb-over"), j.isEffectBorder && i(e, C.thumb_over_border_width, C.thumb_over_border_color), j.isEffectOverlay) { 947 var t = 1 == C.thumb_overlay_reverse; 948 n(e, t) 949 } 950 1 == j.isEffectImage && r(e, !1), I.trigger(S.events.SETOVERSTYLE, e) 951 }, this.setHtmlProperties = function(e) { 952 if (!e) var e = S.getThumbs(); 953 if (0 == j.customThumbs && (1 == C.thumb_fixed_size && t(C.thumb_width, C.thumb_height, e), o(e)), e.each(function() { 954 var e = jQuery(this); 955 u(e) 956 }), j.isEffectOverlay && C.thumb_overlay_color) { 957 var i = {}; 958 if (P.isRgbaSupported()) { 959 var n = P.convertHexToRGB(C.thumb_overlay_color, C.thumb_overlay_opacity); 960 i["background-color"] = n 961 } else i["background-color"] = C.thumb_overlay_color, j.colorOverlayOpacity = C.thumb_overlay_opacity; 962 e.find(".ug-thumb-overlay").css(i) 963 } 964 }, this.setThumbSelected = function(e) { 965 return 1 == j.customThumbs && e.removeClass("ug-thumb-over"), 1 == p(e) || (e.addClass("ug-thumb-selected"), void a(e)) 966 }, this.setThumbUnselected = function(e) { 967 e.removeClass("ug-thumb-selected"), S.setThumbNormalStyle(e, !1, "set unselected") 968 }, this.setOptions = function(e) { 969 C = jQuery.extend(C, e) 970 }, this.setThumbInnerReduce = function(e) { 971 j.thumbInnerReduce = e 972 }, this.setCustomThumbs = function(e, t, i) { 973 if (j.customThumbs = !0, "function" != typeof e) throw new Error("The argument should be function"); 974 j.funcSetCustomThumbHtml = e, - 1 == jQuery.inArray("overlay", t) && (j.isEffectOverlay = !1), - 1 == jQuery.inArray("border", t) && (j.isEffectBorder = !1), j.isEffectImage = !1, i && i.allow_onresize === !1 && (j.allowOnResize = !1) 975 }, this._____________EXTERNAL_GETTERS__________ = function() {}, this.getOptions = function() { 976 return C 977 }, this.getNumThumbs = function() { 978 var e = T.length; 979 return e 980 }, this.getThumbImage = function(e) { 981 var t = e.find(".ug-thumb-image"); 982 return t 983 }, this.getThumbByIndex = function(e) { 984 var t = S.getThumbs(); 985 if (e >= t.length || 0 > e) throw new Error("Wrong thumb index"); 986 var i = jQuery(t[e]); 987 return i 988 }, this.getThumbs = function(e) { 989 var t = ".ug-thumb-wrapper", 990 i = ".ug-thumb-ratio-set"; 991 switch (e) { 992 default: 993 case S.type.GET_THUMBS_ALL: 994 var n = x.children(t); 995 break; 996 case S.type.GET_THUMBS_NO_RATIO: 997 var n = x.children(t).not(i); 998 break; 999 case S.type.GET_THUMBS_RATIO: 1000 var n = x.children(t + i); 1001 break; 1002 case S.type.GET_THUMBS_NEW: 1003 var n = x.children("." + j.classNewThumb) 1004 } 1005 return n 1006 }, this.getItemByThumb = function(e) { 1007 var t = e.data("index"); 1008 void 0 === t && (t = e.index()); 1009 var i = T[t]; 1010 return i 1011 }, this.isThumbLoaded = function(e) { 1012 var t = S.getItemByThumb(e); 1013 return t.isLoaded 1014 }, this.getGlobalThumbSize = function() { 1015 var e = { 1016 width: C.thumb_width, 1017 height: C.thumb_height 1018 }; 1019 return e 1020 }, this._____________EXTERNAL_OTHERS__________ = function() {}, 1021 this.initEvents = function() { 1022 var e = ".ug-thumb-wrapper"; 1023 1 == j.allowOnResize && w.on(A.eventSizeChange, h), I.on(S.events.THUMB_IMAGE_LOADED, v), x.on("touchstart", e, function() { 1024 j.touchEnabled = !0, x.off("mouseenter").off("mouseleave") 1025 }), x.on("mouseenter", e, function(e) { 1026 var t = jQuery(this); 1027 m(t) 1028 }), x.on("mouseleave", e, function(e) { 1029 var t = jQuery(this); 1030 f(t) 1031 }) 1032 }, this.destroy = function() { 1033 var e = ".ug-thumb-wrapper"; 1034 x.off("touchstart", e), w.off(A.eventSizeChange), x.off("mouseenter", e), x.off("mouseleave", e), I.off(S.events.THUMB_IMAGE_LOADED) 1035 }, this.loadThumbsImages = function() { 1036 var e = x.find(".ug-thumb-image"); 1037 P.checkImagesLoaded(e, null, function(e, t) { 1038 if (0 == t) _(e, !0); 1039 else { 1040 var i = jQuery(e).parent(); 1041 s(i) 1042 } 1043 }) 1044 }, this.triggerImageLoadedEvent = function(e, t) { 1045 I.trigger(S.events.THUMB_IMAGE_LOADED, [e, t]) 1046 }, this.hideThumbs = function() { 1047 x.find(".ug-thumb-wrapper").hide() 1048 } 1049} 1050function UGThumbsStrip() { 1051 function e(e, i) {
1052 I = e.getObjects(), O = e, O.attachThumbsPanel("strip", z), S = jQuery(e), E = I.g_objWrapper, P = I.g_arrItems, N = jQuery.extend(N, i), L = N.strip_vertical_type, 1 == L && (N = jQuery.extend(N, G), N = jQuery.extend(N, i), i.thumb_resize_by = "width"), H.init(e, i), t() 1053 } 1054 function t() { 1055 var e = H.getOptions(); 1056 D.isNotFixedThumbs = e.thumb_fixed_size === !1, L = N.strip_vertical_type 1057 } 1058 function n() { 1059 H.setHtmlProperties(), a(), l(), o(), 0 == D.isRunOnce && (1 == N.strip_control_touch && (M = new UGTouchThumbsControl, M.init(z)), 1 == N.strip_control_avia && (A = new UGAviaControl, A.init(z)), m(), H.loadThumbsImages(), y()), D.isRunOnce = !0 1060 } 1061 function r(e) { 1062 R.stripSize = e, 0 == L ? R.stripActiveSize = R.stripSize - N.strip_padding_left - N.strip_padding_right : R.stripActiveSize = R.stripSize - N.strip_padding_top - N.strip_padding_bottom, R.stripActiveSize < 0 && (R.stripActiveSize = 0) 1063 } 1064 function a() { 1065 var e = j.children(".ug-thumb-wrapper"), 1066 t = jQuery(e[0]), 1067 i = t.outerWidth(), 1068 n = t.outerHeight(), 1069 a = H.getOptions(); 1070 0 == L ? (R.thumbSize = i, 1 == a.thumb_fixed_size ? R.thumbSecondSize = n : R.thumbSecondSize = a.thumb_height, r(C.width()), R.stripInnerSize = j.width()) : (R.thumbSize = n, 1 == a.thumb_fixed_size ? R.thumbSecondSize = i : R.thumbSecondSize = a.thumb_width, r(C.height()), R.stripInnerSize = j.height()) 1071 } 1072 function s(e) { 1073 0 == L ? j.width(e) : j.height(e), R.stripInnerSize = e, m(), jQuery(z).trigger(z.events.INNER_SIZE_CHANGE) 1074 } 1075 function o() { 1076 var e = j.children(".ug-thumb-wrapper"), 1077 t = 0, 1078 n = 0; 1079 for (0 == L && (n = N.strip_padding_top), i = 0; i < e.length; i++) { 1080 var r = jQuery(e[i]); 1081 if (1 == D.isNotFixedThumbs) { 1082 if (objItem = H.getItemByThumb(r), 0 == objItem.isLoaded) continue; 1083 r.show() 1084 } 1085 k.placeElement(r, t, n), 0 == L ? t += r.outerWidth() + N.strip_space_between_thumbs : n += r.outerHeight() + N.strip_space_between_thumbs 1086 } 1087 if (0 == L) var a = t - N.strip_space_between_thumbs; 1088 else var a = n - N.strip_space_between_thumbs; 1089 s(a) 1090 } 1091 function l() { 1092 if (0 == L) { 1093 var e = R.thumbSecondSize, 1094 t = {}; 1095 t.height = e + "px"; 1096 var i = {}; 1097 i.height = e + "px" 1098 } else { 1099 var n = R.thumbSecondSize, 1100 t = {}; 1101 t.width = n + "px"; 1102 var i = {}; 1103 i.width = n + "px" 1104 } 1105 C.css(t), j.css(i) 1106 } 1107 function u(e) { 1108 var t = z.getInnerStripPos(), 1109 i = t + e; 1110 i = z.fixInnerStripLimits(i), z.positionInnerStrip(i, !0) 1111 } 1112 function d(e) { 1113 var t = x(e), 1114 i = -1 * t.min; 1115 i = z.fixInnerStripLimits(i), z.positionInnerStrip(i, !0) 1116 } 1117 function c(e) { 1118 var t = x(e), 1119 i = -1 * t.max + R.stripSize; 1120 i = z.fixInnerStripLimits(i), z.positionInnerStrip(i, !0) 1121 } 1122 function g(e) { 1123 if (0 == w()) return !1; 1124 var t = T(), 1125 i = x(e); 1126 if (i.min < t.minPosThumbs) { 1127 var n = e.prev(); 1128 d(n.length ? n : e) 1129 } else if (i.max > t.maxPosThumbs) { 1130 var r = e.next(); 1131 c(r.length ? r : e) 1132 } 1133 } 1134 function p() { 1135 var e = O.getSelectedItem(); 1136 if (null == e) return !0; 1137 var t = e.objThumbWrapper; 1138 t && g(t) 1139 } 1140 function h() { 1141 if (0 == w()) return !1; 1142 var e = z.getInnerStripPos(), 1143 t = z.fixInnerStripLimits(e); 1144 e != t && z.positionInnerStrip(t, !0) 1145 } 1146 function m() { 1147 var e = w(); 1148 1 == e ? (A && A.enable(), M && M.enable()) : (A && A.disable(), M && M.disable()) 1149 } 1150 function f() { 1151 return !w() && void(0 == L ? k.placeElement(j, N.strip_thumbs_align, 0) : k.placeElement(j, 0, N.strip_thumbs_align)) 1152 } 1153 function _(e) { 1154 if (z.isTouchMotionActive()) { 1155 var t = M.isSignificantPassed(); 1156 if (1 == t) return !0 1157 } 1158 var i = H.getItemByThumb(e); 1159 O.selectItem(i) 1160 } 1161 function v() { 1162 clearTimeout(D.handle), D.handle = setTimeout(function() { 1163 o() 1164 }, 50) 1165 } 1166 function b() { 1167 var e = O.getSelectedItem(); 1168 H.setThumbSelected(e.objThumbWrapper), g(e.objThumbWrapper) 1169 } 1170 function y() { 1171 H.initEvents(); 1172 var e = C.find(".ug-thumb-wrapper"); 1173 e.on("click touchend", function(e) { 1174 var t = jQuery(this); 1175 _(t) 1176 }), S.on(O.events.ITEM_CHANGE, b), D.isNotFixedThumbs && jQuery(H).on(H.events.AFTERPLACEIMAGE, v) 1177 } 1178 function w() { 1179 return R.stripInnerSize > R.stripActiveSize 1180 } 1181 function T() { 1182 var e = {}, t = z.getInnerStripPos(); 1183 return e.minPosThumbs = -1 * t + 1, e.maxPosThumbs = -1 * t + R.stripSize - 1, e 1184 } 1185 function x(e) { 1186 var t = {}, i = e.position(); 1187 return 0 == L ? (t.min = i.left, t.max = i.left + R.thumbSize) : (t.min = i.top, t.max = i.top + R.thumbSize), t 1188 } 1189 var S, I, E, P, C, j, A, M, z = this, 1190 O = new UniteGalleryMain, 1191 k = new UGFunctions, 1192 L = !1, 1193 H = new UGThumbsGeneral, 1194 k = new UGFunctions, 1195 N = {
1196 strip_vertical_type: !1, 1197 strip_thumbs_align: "left", 1198 strip_space_between_thumbs: 6, 1199 strip_thumb_touch_sensetivity: 15, 1200 strip_scroll_to_thumb_duration: 500, 1201 strip_scroll_to_thumb_easing: "easeOutCubic", 1202 strip_control_avia: !0, 1203 strip_control_touch: !0, 1204 strip_padding_top: 0, 1205 strip_padding_bottom: 0, 1206 strip_padding_left: 0, 1207 strip_padding_right: 0 1208 }, D = { 1209 isRunOnce: !1, 1210 is_placed: !1, 1211 isNotFixedThumbs: !1, 1212 handle: null 1213 }, R = { 1214 stripSize: 0, 1215 stripActiveSize: 0, 1216 stripInnerSize: 0, 1217 thumbSize: 0, 1218 thumbSecondSize: 0 1219 }; 1220 this.events = { 1221 STRIP_MOVE: "stripmove", 1222 INNER_SIZE_CHANGE: "size_change" 1223 }; 1224 var G = { 1225 strip_thumbs_align: "top", 1226 thumb_resize_by: "width" 1227 }; 1228 this.setHtml = function(e) { 1229 if (!e) { 1230 var e = E; 1231 null != N.parent_container && (e = N.parent_container) 1232 } 1233 e.append("<div class='ug-thumbs-strip'><div class='ug-thumbs-strip-inner'></div></div>"), C = e.children(".ug-thumbs-strip"), j = C.children(".ug-thumbs-strip-inner"), H.setHtmlThumbs(j), 1 == D.isNotFixedThumbs && H.hideThumbs() 1234 }, this.destroy = function() { 1235 var e = C.find(".ug-thumb-wrapper"); 1236 e.off("click"), e.off("touchend"), S.off(O.events.ITEM_CHANGE), jQuery(H).off(H.events.AFTERPLACEIMAGE), M && M.destroy(), A && A.destroy(), H.destroy() 1237 }, this.________EXTERNAL_GENERAL___________ = function() {}, this.init = function(t, i) { 1238 e(t, i) 1239 }, this.run = function() { 1240 n() 1241 }, this.positionInnerStrip = function(e, t) { 1242 if (void 0 === t) var t = !1; 1243 if (0 == L) var i = { 1244 left: e + "px" 1245 }; 1246 else var i = { 1247 top: e + "px" 1248 }; 1249 0 == t ? (j.css(i), z.triggerStripMoveEvent()) : (z.triggerStripMoveEvent(), j.stop(!0).animate(i, { 1250 duration: N.strip_scroll_to_thumb_duration, 1251 easing: N.strip_scroll_to_thumb_easing, 1252 queue: !1, 1253 progress: function() { 1254 z.triggerStripMoveEvent() 1255 }, 1256 always: function() { 1257 z.triggerStripMoveEvent() 1258 } 1259 })) 1260 }, this.triggerStripMoveEvent = function() { 1261 jQuery(z).trigger(z.events.STRIP_MOVE) 1262 }, this.isTouchMotionActive = function() { 1263 if (!M) return !1; 1264 var e = M.isTouchActive(); 1265 return e 1266 }, this.isItemThumbVisible = function(e) { 1267 var t = e.objThumbWrapper, 1268 i = t.position(), 1269 n = -1 * z.getInnerStripPos(); 1270 if (0 == L) var r = n + R.stripSize, 1271 a = i.left, 1272 s = i.left + t.width(); 1273 else var r = n + R.stripSize, 1274 a = i.top, 1275 s = i.top + t.height(); 1276 var o = !1; 1277 return s >= n && r >= a && (o = !0), o 1278 }, this.getInnerStripPos = function() { 1279 return 0 == L ? j.position().left : j.position().top 1280 }, this.getInnerStripLimits = function() { 1281 var e = {}; 1282 return 0 == L ? e.maxPos = N.strip_padding_left : e.maxPos = N.strip_padding_top, e.minPos = -(R.stripInnerSize - R.stripActiveSize), e 1283 }, this.fixInnerStripLimits = function(e) { 1284 var t = z.getInnerStripLimits(); 1285 return e > t.maxPos && (e = t.maxPos), e < t.minPos && (e = t.minPos), e 1286 }, this.scrollForeward = function() { 1287 u(-R.stripSize) 1288 }, this.scrollBack = function() { 1289 u(R.stripSize) 1290 }, this.________EXTERNAL_SETTERS___________ = function() {}, this.setOptions = function(e) { 1291 N = jQuery.extend(N, e), H.setOptions(e), t() 1292 }, this.setSizeVertical = function(e) { 1293 if (0 == L) throw new Error("setSizeVertical error, the strip size is not vertical"); 1294 var t = R.thumbSecondSize, 1295 i = {}; 1296 i.width = t + "px", i.height = e + "px", C.css(i), r(e); 1297 var n = {};
1298 n.width = t + "px", n.left = "0px", n.top = "0px", j.css(n), D.is_placed = !0, m() 1299 }, this.setSizeHorizontal = function(e) { 1300 if (1 == L) throw new Error("setSizeHorizontal error, the strip size is not horizontal"); 1301 var t = R.thumbSecondSize + N.strip_padding_top + N.strip_padding_bottom, 1302 i = {}; 1303 i.width = e + "px", i.height = t + "px", C.css(i), r(e); 1304 var n = N.strip_padding_left, 1305 a = {}; 1306 a.height = t + "px", a.left = n + "px", a.top = "0px", j.css(a), D.is_placed = !0, m() 1307 }, this.setPosition = function(e, t, i, n) { 1308 k.placeElement(C, e, t, i, n) 1309 }, this.resize = function(e) { 1310 0 == L ? (C.width(e), R.stripActiveSize = e - N.strip_padding_left - N.strip_padding_right) : (C.height(e), R.stripActiveSize = e - N.strip_padding_top - N.strip_padding_bottom), r(e), m(), h(), f(), p() 1311 }, this.setThumbUnselected = function(e) { 1312 H.setThumbUnselected(e) 1313 }, this.setCustomThumbs = function(e) { 1314 H.setCustomThumbs(e) 1315 }, this.________EXTERNAL_GETTERS___________ = function() {}, this.getObjects = function() { 1316 var e = H.getOptions(), 1317 t = jQuery.extend(N, e), 1318 i = { 1319 g_gallery: O, 1320 g_objGallery: S, 1321 g_objWrapper: E, 1322 g_arrItems: P, 1323 g_objStrip: C, 1324 g_objStripInner: j, 1325 g_aviaControl: A, 1326 g_touchThumbsControl: M, 1327 isVertical: L, 1328 g_options: t, 1329 g_thumbs: H 1330 }; 1331 return i 1332 }, this.getObjThumbs = function() { 1333 return H 1334 }, this.getSelectedThumb = function() { 1335 var e = O.getSelectedItemIndex(); 1336 return -1 == e ? null : H.getThumbByIndex(e) 1337 }, this.getSizeAndPosition = function() { 1338 var e = k.getElementSize(C); 1339 return e 1340 }, this.getHeight = function() { 1341 var e = C.outerHeight(); 1342 return e 1343 }, this.getWidth = function() { 1344 var e = C.outerWidth(); 1345 return e 1346 }, this.getSizes = function() { 1347 return R 1348 }, this.isVertical = function() { 1349 return L 1350 }, this.isPlaced = function() { 1351 return D.is_placed 1352 }, this.isMoveEnabled = function() { 1353 var e = w(); 1354 return e 1355 } 1356} 1357function UGTouchThumbsControl() { 1358 function e() { 1359 var e = jQuery.now(), 1360 t = {}; 1361 return t.passedTime = S.lastTime - S.startTime, t.lastActiveTime = e - S.buttonReleaseTime, t.passedDistance = S.lastPos - S.startPos, t.passedDistanceAbs = Math.abs(t.passedDistance), t 1362 } 1363 function t() { 1364 x.thumb_touch_slowFactor = T.normalizeSetting(5e-5, .01, 1, 100, y.strip_thumb_touch_sensetivity, !0) 1365 } 1366 function i(e) { 1367 return 0 == w ? T.getMousePosition(e).pageX : T.getMousePosition(e).pageY 1368 } 1369 function n(e) { 1370 var t = S.mousePos - e, 1371 i = S.innerPos - t, 1372 n = h.getInnerStripLimits(); 1373 if (i > n.maxPos) { 1374 var r = i - n.maxPos; 1375 i = n.maxPos + r / 3 1376 } 1377 if (i < n.minPos) { 1378 var r = n.minPos - i; 1379 i = n.minPos - r / 3 1380 } 1381 h.positionInnerStrip(i) 1382 } 1383 function r(e) { 1384 var t = h.getInnerStripPos(); 1385 S.mousePos = e, S.innerPos = t, S.lastPortionPos = t, S.lastDeltaTime = 0, S.lastDeltaPos = 0, S.startTime = jQuery.now(), S.startPos = S.innerPos, S.lastTime = S.startTime, S.lastPos = S.startPos, S.speed = 0 1386 } 1387 function a() { 1388 var e = jQuery.now(), 1389 t = e - S.lastTime; 1390 t >= x.touch_portion_time && (S.lastDeltaTime = e - S.lastTime, S.lastDeltaTime > x.touch_portion_time && (S.lastDeltaTime = x.touch_portion_time), S.lastDeltaPos = S.lastPos - S.lastPortionPos, S.lastPortionPos = S.lastPos, S.lastTime = e) 1391 } 1392 function s() { 1393 var e = x.thumb_touch_slowFactor, 1394 t = x.minDeltaTime, 1395 i = x.minPath, 1396 n = h.getInnerStripPos(), 1397 r = jQuery.now(), 1398 a = r - S.lastTime, 1399 s = n - S.lastPortionPos; 1400 t > a && S.lastDeltaTime > 0 && (a = S.lastDeltaTime, s = S.lastDeltaPos + s), t > a && (a = t); 1401 var l = s > 0 ? 1 : -1, 1402 u = 0; 1403 a > 0 && (u = s / a); 1404 var d = u * u / (2 * e) * l; 1405 Math.abs(d) <= i && (d = 0); 1406 var c = h.getInnerStripPos(), 1407 g = c + d, 1408 p = h.fixInnerStripLimits(g), 1409 m = h.getInnerStripLimits(), 1410 f = x.limitsBreakAddition, 1411 _ = !1, 1412 v = p; 1413 if (g > m.maxPos && (_ = !0, p = f, f > g && (p = g)), g < m.minPos) { 1414 _ = !0; 1415 var y = m.minPos - f; 1416 p = y, g > y && (p = g) 1417 } 1418 var T = p - c, 1419 I = Math.abs(Math.round(u / e)); 1420 if (0 != d && (I = I * T / d), c != p) { 1421 var E = { 1422 left: p + "px" 1423 }; 1424 1 == w && (E = { 1425 top: p + "px" 1426 }), b.animate(E, { 1427 duration: I, 1428 easing: x.animationEasing, 1429 queue: !0, 1430 progress: o 1431 }) 1432 } 1433 if (1 == _) { 1434 var P = x.returnAnimateSpeed, 1435 C = { 1436 left: v + "px" 1437 }; 1438 1 == w && (C = { 1439 top: v + "px" 1440 }), b.animate(C, { 1441 duration: P, 1442 easing: x.returnAnimationEasing, 1443 queue: !0, 1444 progress: o 1445 }) 1446 } 1447 } 1448 function o() {
1449 S.lastPos = h.getInnerStripPos(), h.triggerStripMoveEvent() 1450 } 1451 function l() { 1452 return 1 == S.loop_active || (S.loop_active = !0, void(S.handle = setInterval(a, 10))) 1453 } 1454 function u(e) { 1455 if (0 == S.loop_active) return !0; 1456 if (e) { 1457 var t = i(e); 1458 s(t) 1459 } 1460 S.loop_active = !1, S.handle = clearInterval(S.handle) 1461 } 1462 function d(e) { 1463 return 0 == S.isControlEnabled || (S.buttonReleaseTime = jQuery.now(), 0 == S.touch_active ? (u(e), !0) : (e.preventDefault(), S.touch_active = !1, u(e), void v.removeClass("ug-dragging"))) 1464 } 1465 function c(e) { 1466 if (0 == S.isControlEnabled) return !0; 1467 e.preventDefault(), S.touch_active = !0; 1468 var t = i(e); 1469 b.stop(!0), r(t), l(), v.addClass("ug-dragging") 1470 } 1471 function g(e) { 1472 if (0 == S.isControlEnabled) return !0; 1473 if (0 == S.touch_active) return !0; 1474 if (e.preventDefault(), 0 == e.buttons) return S.touch_active = !1, u(e), !0; 1475 var t = i(e);
1476 S.lastPos = h.getInnerStripPos(), n(t), a() 1477 } 1478 function p() { 1479 v.bind("mousedown touchstart", c), jQuery(window).add("body").bind("mouseup touchend", d), jQuery("body").bind("mousemove touchmove", g) 1480 } 1481 var h, m, f, _, v, b, y, w, T = new UGFunctions, 1482 x = { 1483 touch_portion_time: 200, 1484 thumb_touch_slowFactor: 0, 1485 minDeltaTime: 70, 1486 minPath: 10, 1487 limitsBreakAddition: 30, 1488 returnAnimateSpeed: 500, 1489 animationEasing: "easeOutCubic", 1490 returnAnimationEasing: "easeOutCubic" 1491 }, S = { 1492 touch_active: !1, 1493 loop_active: !1, 1494 mousePos: 0, 1495 innerPos: 0, 1496 startPos: 0, 1497 startTime: 0, 1498 lastTime: 0, 1499 buttonReleaseTime: 0, 1500 lastPos: 0, 1501 lastPortionPos: 0, 1502 lastDeltaTime: 0, 1503 lastDeltaPos: 0, 1504 speed: 0, 1505 handle: "", 1506 touchEnabled: !1, 1507 isControlEnabled: !0 1508 }; 1509 this.enable = function() { 1510 S.isControlEnabled = !0 1511 }, this.disable = function() { 1512 S.isControlEnabled = !1 1513 }, this.init = function(e) { 1514 h = e, _ = e.getObjects(), m = _.g_gallery, f = _.g_objGallery, v = _.g_objStrip, b = _.g_objStripInner, y = _.g_options, w = _.isVertical, t(), p() 1515 }, this.isSignificantPassed = function() { 1516 var t = e(); 1517 return t.passedTime > 300 || t.passedDistanceAbs > 30 1518 }, this.isTouchActive = function() { 1519 if (1 == S.touch_active) return !0; 1520 if (1 == b.is(":animated")) return !0; 1521 var t = e(); 1522 return t.lastActiveTime < 50 1523 }, this.destroy = function() { 1524 v.unbind("mousedown"), v.unbind("touchstart"), jQuery(window).add("body").unbind("mouseup").unbind("touchend"), jQuery("body").unbind("mousemove").unbind("touchmove") 1525 } 1526} 1527function UGPanelsBase() { 1528 function e(e, t) { 1529 switch (n.orientation) { 1530 case "right": 1531 case "left": 1532 var i = { 1533 left: e + "px" 1534 }; 1535 break; 1536 case "top": 1537 case "bottom": 1538 var i = { 1539 top: e + "px" 1540 } 1541 } 1542 a.stop(!0).animate(i, { 1543 duration: 300, 1544 easing: "easeInOutQuad", 1545 queue: !1, 1546 complete: function() { 1547 t && t() 1548 } 1549 }) 1550 } 1551 function t(e) { 1552 switch (n.orientation) { 1553 case "right": 1554 case "left": 1555 g.placeElement(a, e, null); 1556 break; 1557 case "top": 1558 case "bottom": 1559 g.placeElement(a, null, e) 1560 } 1561 } 1562 function i() { 1563 o.trigger(r.events.FINISH_MOVE) 1564 } 1565 var n, r, a, s, o, l, u, d = new UniteGalleryMain, 1566 c = this, 1567 g = new UGFunctions; 1568 this.init = function(e, t, i, a, l) { 1569 n = t, r = i, d = e, s = a, o = l, u = jQuery(d) 1570 }, this.setHtml = function(e) { 1571 if (a = e, "strip" == n.panelType) var t = s.strippanel_enable_handle; 1572 else var t = s.gridpanel_enable_handle; 1573 if (1 == t && (l = new UGPanelHandle, l.init(r, a, s, n.panelType, d), l.setHtml()), n.isDisabledAtStart === !0) { 1574 var i = "<div class='ug-overlay-disabled'></div>"; 1575 a.append(i), setTimeout(function() { 1576 a.children(".ug-overlay-disabled").hide() 1577 }, n.disabledAtStartTimeout) 1578 } 1579 }, this.placeElements = function() { 1580 l && l.placeHandle() 1581 }, this.initEvents = function() { 1582 l && (l.initEvents(), u.on(d.events.SLIDER_ACTION_START, function() { 1583 l.hideHandle() 1584 }), u.on(d.events.SLIDER_ACTION_END, function() { 1585 l.showHandle() 1586 })) 1587 }, this.destroy = function() { 1588 l && (l.destroy(), u.off(d.events.SLIDER_ACTION_START), u.off(d.events.SLIDER_ACTION_END)) 1589 }, this.openPanel = function(s) { 1590 if (!s) var s = !1; 1591 return !a.is(":animated") && (0 != n.isClosed && (n.isClosed = !1, o.trigger(r.events.OPEN_PANEL), void(s === !1 ? e(n.originalPos, i) : (t(n.originalPos), i())))) 1592 }, this.closePanel = function(s) { 1593 if (!s) var s = !1; 1594 if (a.is(":animated")) return !1; 1595 if (1 == n.isClosed) return !1; 1596 var l = c.getClosedPanelDest(); 1597 n.isClosed = !0, o.trigger(r.events.CLOSE_PANEL), s === !1 ? e(l, i) : (t(l), i()) 1598 }, this.setClosedState = function(e) { 1599 n.originalPos = e, o.trigger(r.events.CLOSE_PANEL), n.isClosed = !0 1600 }, this.setOpenedState = function(e) { 1601 o.trigger(r.events.OPEN_PANEL), n.isClosed = !1 1602 }, this.getClosedPanelDest = function() { 1603 var e, t = g.getElementSize(a); 1604 switch (n.orientation) {
1605 case "left": 1606 n.originalPos = t.left, e = -n.panelWidth; 1607 break; 1608 case "right": 1609 n.originalPos = t.left; 1610 var i = d.getSize(); 1611 e = i.width; 1612 break; 1613 case "top": 1614 n.originalPos = t.top, e = -n.panelHeight; 1615 break; 1616 case "bottom": 1617 n.originalPos = t.top; 1618 var i = d.getSize(); 1619 e = i.height 1620 } 1621 return e 1622 }, this.isPanelClosed = function() { 1623 return n.isClosed 1624 }, this.setDisabledAtStart = function(e) { 1625 return !(0 >= e) && (n.isDisabledAtStart = !0, void(n.disabledAtStartTimeout = e)) 1626 } 1627} 1628function UGPanelHandle() { 1629 function e() { 1630 o.removeClass("ug-button-hover") 1631 } 1632 function t() { 1633 o.addClass("ug-button-closed") 1634 } 1635 function i() { 1636 o.removeClass("ug-button-closed") 1637 } 1638 function n(e) { 1639 return e.stopPropagation(), e.stopImmediatePropagation(), 0 == l.validateClickTouchstartEvent(e.type) || void(s.isPanelClosed() ? s.openPanel() : s.closePanel()) 1640 } 1641 function r() { 1642 var e = s.getOrientation(); 1643 switch (e) { 1644 case "right": 1645 case "left": 1646 "top" != u.panel_handle_align && "bottom" != u.panel_handle_align && (u.panel_handle_align = "top"); 1647 break; 1648 case "bottom": 1649 "left" != u.panel_handle_align && "right" != u.panel_handle_align && (u.panel_handle_align = "left"); 1650 break; 1651 case "top": 1652 "left" != u.panel_handle_align && "right" != u.panel_handle_align && (u.panel_handle_align = "right") 1653 } 1654 } 1655 var a, s, o, l = new UGFunctions, 1656 u = { 1657 panel_handle_align: "top", 1658 panel_handle_offset: 0, 1659 panel_handle_skin: 0 1660 }; 1661 this.init = function(e, t, i, n, r) { 1662 switch (s = e, a = t, n) { 1663 case "grid": 1664 u.panel_handle_align = i.gridpanel_handle_align, u.panel_handle_offset = i.gridpanel_handle_offset, u.panel_handle_skin = i.gridpanel_handle_skin; 1665 break; 1666 case "strip": 1667 u.panel_handle_align = i.strippanel_handle_align, u.panel_handle_offset = i.strippanel_handle_offset, u.panel_handle_skin = i.strippanel_handle_skin; 1668 break; 1669 default: 1670 throw new Error("Panel handle error: wrong panel type: " + n) 1671 } 1672 var o = r.getOptions(), 1673 l = o.gallery_skin; 1674 "" == u.panel_handle_skin && (u.panel_handle_skin = l) 1675 }, this.setHtml = function() { 1676 var e = s.getOrientation(), 1677 t = "ug-panel-handle-tip"; 1678 switch (e) { 1679 case "right": 1680 t += " ug-handle-tip-left"; 1681 break; 1682 case "left": 1683 t += " ug-handle-tip-right"; 1684 break; 1685 case "bottom": 1686 t += " ug-handle-tip-top"; 1687 break; 1688 case "top": 1689 t += " ug-handle-tip-bottom" 1690 } 1691 a.append("<div class='" + t + " ug-skin-" + u.panel_handle_skin + "'></div>"), o = a.children(".ug-panel-handle-tip") 1692 }, this.initEvents = function() { 1693 l.addClassOnHover(o), o.bind("click touchstart", n), jQuery(s).on(s.events.OPEN_PANEL, function() { 1694 e(), i() 1695 }), jQuery(s).on(s.events.CLOSE_PANEL, function() { 1696 e(), t() 1697 }) 1698 }, this.destroy = function() { 1699 l.destroyButton(o), jQuery(s).off(s.events.OPEN_PANEL), jQuery(s).off(s.events.CLOSE_PANEL) 1700 }, this.placeHandle = function() { 1701 var e = l.getElementSize(o); 1702 r(); 1703 var t = s.getOrientation(); 1704 switch (t) { 1705 case "left": 1706 l.placeElement(o, "right", u.panel_handle_align, - e.width); 1707 break; 1708 case "right": 1709 l.placeElement(o, - e.width, u.panel_handle_align, 0, u.panel_handle_offset); 1710 break; 1711 case "top": 1712 l.placeElement(o, u.panel_handle_align, "bottom", u.panel_handle_offset, - e.height); 1713 break; 1714 case "bottom": 1715 l.placeElement(o, u.panel_handle_align, "top", u.panel_handle_offset, - e.height); 1716 break; 1717 default: 1718 throw new Error("Wrong panel orientation: " + t) 1719 } 1720 }, this.hideHandle = function() { 1721 1 == o.is(":visible") && o.hide() 1722 }, this.showHandle = function() { 1723 0 == o.is(":visible") && o.show() 1724 } 1725} 1726function UGStripPanel() { 1727 function e(e, t) { 1728 S = e, _ = jQuery(S), C = jQuery.extend(C, t); 1729 var i = !1; 1730 1 == C.strippanel_vertical_type && (C = jQuery.extend(C, j), i = !0), 0 == C.strippanel_enable_buttons && (C = jQuery.extend(C, A), i = !0), 1 == i && (C = jQuery.extend(C, t));
1731 var n = S.getOptions(), 1732 r = n.gallery_skin; 1733 "" == C.strippanel_buttons_skin && (C.strippanel_buttons_skin = r), v = S.getElement(), P.init(S, M, T, C, x), E = new UGThumbsStrip, E.init(S, C) 1734 } 1735 function t() { 1736 if (0 == C.strippanel_vertical_type) { 1737 if (0 == M.panelWidth) throw new Error("Strip panel error: The width not set, please set width") 1738 } else if (0 == M.panelHeight) throw new Error("Strip panel error: The height not set, please set height"); 1739 if (null == M.orientation) throw new Error("Wrong orientation, please set panel orientation before run"); 1740 return !0 1741 } 1742 function i() { 1743 return (1 != M.isFirstRun || 0 != t()) && (E.run(), o(), d(), f(), M.isFirstRun = !1, void p()) 1744 } 1745 function n(e) { 1746 if (!e) var e = v; 1747 if (e.append("<div class='ug-strip-panel'></div>"), b = e.children(".ug-strip-panel"), 1 == C.strippanel_enable_buttons) { 1748 var t = "ug-strip-arrow-left", 1749 i = "ug-strip-arrow-right"; 1750 1 == C.strippanel_vertical_type && (t = "ug-strip-arrow-up", i = "ug-strip-arrow-down"), b.append("<div class='ug-strip-arrow " + t + " ug-skin-" + C.strippanel_buttons_skin + "'><div class='ug-strip-arrow-tip'></div></div>"), b.append("<div class='ug-strip-arrow " + i + " ug-skin-" + C.strippanel_buttons_skin + "'><div class='ug-strip-arrow-tip'></div></div>") 1751 } 1752 P.setHtml(b), E.setHtml(b), 1 == C.strippanel_enable_buttons && (w = b.children("." + t), y = b.children("." + i)), r() 1753 } 1754 function r() { 1755 "" != C.strippanel_background_color && b.css("background-color", C.strippanel_background_color) 1756 } 1757 function a() { 1758 var e = E.getHeight(), 1759 t = M.panelWidth; 1760 if (y) { 1761 w.height(e), y.height(e); 1762 var i = w.children(".ug-strip-arrow-tip"); 1763 I.placeElement(i, "center", "middle"); 1764 var n = y.children(".ug-strip-arrow-tip"); 1765 I.placeElement(n, "center", "middle") 1766 } 1767 var r = e + C.strippanel_padding_top + C.strippanel_padding_bottom; 1768 b.width(t), b.height(r), M.panelHeight = r; 1769 var a = t - C.strippanel_padding_left - C.strippanel_padding_right; 1770 if (y) { 1771 var s = y.outerWidth(); 1772 a = a - 2 * s - 2 * C.strippanel_padding_buttons 1773 } 1774 E.resize(a) 1775 } 1776 function s() { 1777 var e = E.getWidth(), 1778 t = M.panelHeight; 1779 if (y) { 1780 w.width(e), y.width(e); 1781 var i = w.children(".ug-strip-arrow-tip"); 1782 I.placeElement(i, "center", "middle"); 1783 var n = y.children(".ug-strip-arrow-tip"); 1784 I.placeElement(n, "center", "middle") 1785 } 1786 var r = e + C.strippanel_padding_left + C.strippanel_padding_right; 1787 b.width(r), b.height(t), M.panelWidth = r; 1788 var a = t - C.strippanel_padding_top - C.strippanel_padding_bottom; 1789 if (y) { 1790 var s = y.outerHeight(); 1791 a = a - 2 * s - 2 * C.strippanel_padding_buttons 1792 } 1793 E.resize(a) 1794 } 1795 function o() { 1796 0 == C.strippanel_vertical_type ? a() : s() 1797 } 1798 function l() { 1799 y && (I.placeElement(w, "left", "top", C.strippanel_padding_left, C.strippanel_padding_top), I.placeElement(y, "right", "top", C.strippanel_padding_right, C.strippanel_padding_top)); 1800 var e = C.strippanel_padding_left; 1801 y && (e += y.outerWidth() + C.strippanel_padding_buttons), E.setPosition(e, C.strippanel_padding_top) 1802 } 1803 function u() { 1804 y && (I.placeElement(w, "left", "top", C.strippanel_padding_left, C.strippanel_padding_top), I.placeElement(y, "left", "bottom", C.strippanel_padding_left, C.strippanel_padding_bottom)); 1805 var e = C.strippanel_padding_top; 1806 y && (e += y.outerHeight() + C.strippanel_padding_buttons), E.setPosition(C.strippanel_padding_left, e) 1807 } 1808 function d() { 1809 0 == C.strippanel_vertical_type ? l() : u(), P.placeElements() 1810 } 1811 function c(e) { 1812 return !!I.isButtonDisabled(e) || void("advance_item" == C.strippanel_buttons_role ? S.nextItem() : E.scrollForeward()) 1813 } 1814 function g(e) { 1815 return !!I.isButtonDisabled(e) || void("advance_item" == C.strippanel_buttons_role ? S.prevItem() : E.scrollBack()) 1816 } 1817 function p() { 1818 if (!y) return !0; 1819 if (0 == E.isMoveEnabled()) return I.disableButton(w), I.disableButton(y), !0; 1820 var e = E.getInnerStripLimits(), 1821 t = E.getInnerStripPos(); 1822 t >= e.maxPos ? I.disableButton(w) : I.enableButton(w), t <= e.minPos ? I.disableButton(y) : I.enableButton(y) 1823 } 1824 function h() { 1825 p() 1826 } 1827 function m() { 1828 S.isLastItem() ? I.disableButton(y) : I.enableButton(y), S.isFirstItem() ? I.disableButton(w) : I.enableButton(w) 1829 } 1830 function f() { 1831 if (1 == M.isEventsInited) return !1; 1832 if (M.isEventsInited = !0, y) if (I.addClassOnHover(y, "ug-button-hover"), I.addClassOnHover(w, "ug-button-hover"), I.setButtonOnClick(w, g), I.setButtonOnClick(y, c), "advance_item" != C.strippanel_buttons_role) jQuery(E).on(E.events.STRIP_MOVE, h), jQuery(E).on(E.events.INNER_SIZE_CHANGE, p), _.on(S.events.SIZE_CHANGE, p); 1833 else { 1834 var e = S.getOptions(); 1835 0 == e.gallery_carousel && jQuery(S).on(S.events.ITEM_CHANGE, m) 1836 } 1837 P.initEvents() 1838 } 1839 var _, v, b, y, w, T = this, 1840 x = jQuery(this), 1841 S = new UniteGalleryMain, 1842 I = new UGFunctions, 1843 E = new UGThumbsStrip, 1844 P = new UGPanelsBase; 1845 this.events = { 1846 FINISH_MOVE: "gridpanel_move_finish", 1847 OPEN_PANEL: "open_panel", 1848 CLOSE_PANEL: "close_panel" 1849 }; 1850 var C = {
1851 strippanel_vertical_type: !1, 1852 strippanel_padding_top: 8, 1853 strippanel_padding_bottom: 8, 1854 strippanel_padding_left: 0, 1855 strippanel_padding_right: 0, 1856 strippanel_enable_buttons: !0, 1857 strippanel_buttons_skin: "", 1858 strippanel_padding_buttons: 2, 1859 strippanel_buttons_role: "scroll_strip", 1860 strippanel_enable_handle: !0, 1861 strippanel_handle_align: "top", 1862 strippanel_handle_offset: 0, 1863 strippanel_handle_skin: "", 1864 strippanel_background_color: "" 1865 }, j = { 1866 strip_vertical_type: !0, 1867 strippanel_padding_left: 8, 1868 strippanel_padding_right: 8, 1869 strippanel_padding_top: 0, 1870 strippanel_padding_bottom: 0 1871 }, A = { 1872 strippanel_padding_left: 8, 1873 strippanel_padding_right: 8, 1874 strippanel_padding_top: 8, 1875 strippanel_padding_bottom: 8 1876 }, M = { 1877 panelType: "strip", 1878 panelWidth: 0, 1879 panelHeight: 0, 1880 isEventsInited: !1, 1881 isClosed: !1, 1882 orientation: null, 1883 originalPos: null, 1884 isFirstRun: !0 1885 }; 1886 this.destroy = function() { 1887 y && (I.destroyButton(y), I.destroyButton(w), jQuery(E).off(E.events.STRIP_MOVE), jQuery(S).off(S.events.ITEM_CHANGE), jQuery(S).off(S.events.SIZE_CHANGE)), P.destroy(), E.destroy() 1888 }, this.getOrientation = function() { 1889 return M.orientation 1890 }, this.setOrientation = function(e) { 1891 M.orientation = e 1892 }, this.init = function(t, i) { 1893 e(t, i) 1894 }, this.run = function() { 1895 i() 1896 }, this.setHtml = function(e) { 1897 n(e) 1898 }, this.getElement = function() { 1899 return b 1900 }, this.getSize = function() { 1901 var e = I.getElementSize(b); 1902 return e 1903 }, this.setWidth = function(e) { 1904 M.panelWidth = e 1905 }, this.setHeight = function(e) { 1906 M.panelHeight = e 1907 }, this.resize = function(e) { 1908 T.setWidth(e), o(), d() 1909 }, this.__________Functions_From_Base_____ = function() {}, this.isPanelClosed = function() { 1910 return P.isPanelClosed() 1911 }, this.getClosedPanelDest = function() { 1912 return P.getClosedPanelDest() 1913 }, this.openPanel = function(e) { 1914 P.openPanel(e) 1915 }, this.closePanel = function(e) { 1916 P.closePanel(e) 1917 }, this.setOpenedState = function(e) { 1918 P.setOpenedState(e) 1919 }, this.setClosedState = function(e) { 1920 P.setClosedState(e) 1921 }, this.setCustomThumbs = function(e) { 1922 E.setCustomThumbs(e) 1923 }, this.setDisabledAtStart = function(e) { 1924 P.setDisabledAtStart(e) 1925 } 1926} 1927function UGGridPanel() { 1928 function e(e, i) { 1929 P = e, t(), i && i.vertical_scroll && (M.gridpanel_vertical_scroll = i.vertical_scroll), M = jQuery.extend(M, i), 1 == k.isHorType ? (M = jQuery.extend(M, O), M = jQuery.extend(M, i)) : 1 == M.gridpanel_vertical_scroll && (M = jQuery.extend(M, z), M = jQuery.extend(M, i), M.grid_panes_direction = "bottom"); 1930 var n = P.getOptions(), 1931 r = n.gallery_skin; 1932 "" == M.gridpanel_arrows_skin && (M.gridpanel_arrows_skin = r); 1933 var a = e.getObjects(); 1934 w = a.g_objWrapper, A.init(P, k, I, M, E), j = new UGThumbsGrid, j.init(P, M) 1935 } 1936 function t() { 1937 if (null == k.orientation) throw new Error("Wrong orientation, please set panel orientation before run") 1938 } 1939 function i() { 1940 t(), a(), j.run(), l(), u(), y(), d() 1941 } 1942 function n() { 1943 w.append("<div class='ug-grid-panel'></div>"), T = w.children(".ug-grid-panel"), k.isHorType ? (T.append("<div class='grid-arrow grid-arrow-left-hortype ug-skin-" + M.gridpanel_arrows_skin + "'></div>"), T.append("<div class='grid-arrow grid-arrow-right-hortype ug-skin-" + M.gridpanel_arrows_skin + "'></div>"), S = T.children(".grid-arrow-left-hortype"), x = T.children(".grid-arrow-right-hortype")) : 0 == M.gridpanel_vertical_scroll ? (T.append("<div class='grid-arrow grid-arrow-left ug-skin-" + M.gridpanel_arrows_skin + "'></div>"), T.append("<div class='grid-arrow grid-arrow-right ug-skin-" + M.gridpanel_arrows_skin + "'></div>"), S = T.children(".grid-arrow-left"), x = T.children(".grid-arrow-right")) : (T.append("<div class='grid-arrow grid-arrow-up ug-skin-" + M.gridpanel_arrows_skin + "'></div>"), T.append("<div class='grid-arrow grid-arrow-down ug-skin-" + M.gridpanel_arrows_skin + "'></div>"), S = T.children(".grid-arrow-up"), x = T.children(".grid-arrow-down")), A.setHtml(T), S.fadeTo(0, 0), x.fadeTo(0, 0), j.setHtml(T), r() 1944 } 1945 function r() { 1946 "" != M.gridpanel_background_color && T.css("background-color", M.gridpanel_background_color) 1947 } 1948 function a() { 1949 "center" == M.gridpanel_grid_align && (M.gridpanel_grid_align = "middle") 1950 } 1951 function s() { 1952 var e = M.gridpanel_padding_border_top + M.gridpanel_padding_border_bottom, 1953 t = k.panelHeight - e; 1954 if (0 == M.gridpanel_arrows_always_on) { 1955 var i = j.getNumPanesEstimationByHeight(t); 1956 if (1 == i) return t 1957 } 1958 var n = C.getElementSize(x), 1959 r = n.height, 1960 e = r + M.gridpanel_arrows_padding_vert; 1961 return 1 == M.gridpanel_vertical_scroll && (e *= 2), e += M.gridpanel_padding_border_top + M.gridpanel_padding_border_bottom, t = k.panelHeight - e 1962 } 1963 function o() { 1964 var e = M.gridpanel_padding_border_left + M.gridpanel_padding_border_right, 1965 t = k.panelWidth - e; 1966 if (0 == M.gridpanel_arrows_always_on) { 1967 var i = j.getNumPanesEstimationByWidth(t); 1968 if (1 == i) return t 1969 } 1970 var n = C.getElementSize(x), 1971 r = n.width; 1972 return e += 2 * (r + M.gridpanel_arrows_padding_hor), t = k.panelWidth - e 1973 } 1974 function l() { 1975 var e = !1; 1976 if (1 == M.gridpanel_arrows_always_on) e = !0; 1977 else { 1978 var t = j.getNumPanes(); 1979 t > 1 && (e = !0) 1980 } 1981 1 == e ? (x.show().fadeTo(0, 1), S.show().fadeTo(0, 1), k.arrowsVisible = !0) : (x.hide(), S.hide(), k.arrowsVisible = !1) 1982 } 1983 function u() { 1984 var e = j.getSize(); 1985 1 == k.isHorType ? k.panelHeight = e.height + M.gridpanel_padding_border_top + M.gridpanel_padding_border_bottom : k.panelWidth = e.width + M.gridpanel_padding_border_left + M.gridpanel_padding_border_right, C.setElementSize(T, k.panelWidth, k.panelHeight) 1986 } 1987 function d() { 1988 return 1 != k.isEventsInited && (k.isEventsInited = !0, S && (C.addClassOnHover(S), j.attachPrevPaneButton(S)), x && (C.addClassOnHover(x), j.attachNextPaneButton(x)), void A.initEvents()) 1989 } 1990 function c() { 1991 var e = M.gridpanel_padding_border_left; 1992 return e 1993 } 1994 function g() { 1995 var e = M.gridpanel_grid_align, 1996 t = 0; 1997 switch (e) { 1998 case "top": 1999 t = M.gridpanel_padding_border_top; 2000 break; 2001 case "bottom": 2002 t = M.gridpanel_padding_border_bottom 2003 } 2004 var i = c(), 2005 n = j.getElement(); 2006 C.placeElement(n, i, e, 0, t) 2007 } 2008 function p() { 2009 var e, t, i, n, r = C.getElementSize(S), 2010 a = j.getSize(); 2011 switch (M.gridpanel_grid_align) { 2012 default: 2013 case "top": 2014 e = M.gridpanel_padding_border_top + r.height + M.gridpanel_arrows_padding_vert; 2015 break; 2016 case "middle": 2017 e = "middle"; 2018 break; 2019 case "bottom": 2020 e = k.panelHeight - a.height - r.height - M.gridpanel_padding_border_bottom - M.gridpanel_arrows_padding_vert 2021 } 2022 var s = c(), 2023 o = j.getElement(); 2024 C.placeElement(o, s, e); 2025 var a = j.getSize(); 2026 switch (M.gridpanel_arrows_align_vert) { 2027 default: 2028 case "center": 2029 case "middle": 2030 t = (a.top - r.height) / 2, 2031 i = a.bottom + (k.panelHeight - a.bottom - r.height) / 2, 2032 n = 0; 2033 break; 2034 case "grid": 2035 t = a.top - r.height - M.gridpanel_arrows_padding_vert_vert, i = a.bottom + M.gridpanel_arrows_padding_vert, n = 0; 2036 break; 2037 case "border": 2038 case "borders": 2039 t = M.gridpanel_padding_border_top, i = "bottom", n = M.gridpanel_padding_border_bottom 2040 } 2041 C.placeElement(S, "center", t), C.placeElement(x, "center", i, 0, n) 2042 } 2043 function h() { 2044 1 == k.arrowsVisible ? p() : g() 2045 } 2046 function m() { 2047 var e, t, i, n, r = C.getElementSize(S), 2048 a = j.getSize(), 2049 s = M.gridpanel_padding_border_top; 2050 switch (M.gridpanel_grid_align) { 2051 case "middle": 2052 switch (M.gridpanel_arrows_align_vert) { 2053 default: var o = a.height + M.gridpanel_arrows_padding_vert + r.height; 2054 s = (k.panelHeight - o) / 2; 2055 break; 2056 case "border": 2057 case "borders": 2058 var l = k.panelHeight - r.height - M.gridpanel_padding_border_bottom; 2059 s = (l - a.height) / 2 2060 } 2061 break; 2062 case "bottom": 2063 var o = a.height + r.height + M.gridpanel_arrows_padding_vert; 2064 s = k.panelHeight - o - M.gridpanel_padding_border_bottom 2065 } 2066 var u = j.getElement(), 2067 d = c(); 2068 C.placeElement(u, d, s); 2069 var a = j.getSize(); 2070 switch (M.gridpanel_arrows_align_vert) { 2071 default: 2072 case "center": 2073 case "middle": 2074 e = a.bottom + (k.panelHeight - a.bottom - r.height) / 2, 2075 i = 0; 2076 break; 2077 case "grid": 2078 e = a.bottom + M.gridpanel_arrows_padding_vert, i = 0; 2079 break; 2080 case "border": 2081 case "borders": 2082 e = "bottom", i = M.gridpanel_padding_border_bottom 2083 } 2084 t = -r.width / 2 - M.gridpanel_space_between_arrows / 2, C.placeElement(S, "center", e, t, i); 2085 var n = Math.abs(t); 2086 C.placeElement(x, "center", e, n, i) 2087 } 2088 function f() { 2089 1 == k.arrowsVisible ? m() : g() 2090 } 2091 function _() { 2092 var e, t, i, n, r = C.getElementSize(S), 2093 a = j.getSize(); 2094 switch (M.gridpanel_grid_align) { 2095 default:
2096 case "left": 2097 e = M.gridpanel_padding_border_left + M.gridpanel_arrows_padding_hor + r.width; 2098 break; 2099 case "middle": 2100 case "center": 2101 e = "center"; 2102 break; 2103 case "right": 2104 e = k.panelWidth - a.width - r.width - M.gridpanel_padding_border_right - M.gridpanel_arrows_padding_hor 2105 } 2106 var s = j.getElement(); 2107 switch (C.placeElement(s, e, M.gridpanel_padding_border_top), a = j.getSize(), M.gridpanel_arrows_align_vert) { 2108 default: 2109 case "center": 2110 case "middle": 2111 n = (a.height - r.height) / 2 + a.top; 2112 break; 2113 case "top": 2114 n = M.gridpanel_padding_border_top + M.gridpanel_arrows_padding_vert; 2115 break; 2116 case "bottom": 2117 n = k.panelHeight - M.gridpanel_padding_border_bottom - M.gridpanel_arrows_padding_vert - r.height 2118 } 2119 switch (M.gridpanel_arrows_align_hor) { 2120 default: 2121 case "borders": 2122 t = M.gridpanel_padding_border_left, 2123 i = k.panelWidth - M.gridpanel_padding_border_right - r.width; 2124 break; 2125 case "grid": 2126 t = a.left - M.gridpanel_arrows_padding_hor - r.width, i = a.right + M.gridpanel_arrows_padding_hor; 2127 break; 2128 case "center": 2129 t = (a.left - r.width) / 2, i = a.right + (k.panelWidth - a.right - r.width) / 2 2130 } 2131 C.placeElement(S, t, n), C.placeElement(x, i, n) 2132 } 2133 function v() { 2134 var e, t = j.getSize(); 2135 switch (M.gridpanel_grid_align) { 2136 default: 2137 case "left": 2138 e = M.gridpanel_padding_border_left; 2139 break; 2140 case "middle": 2141 case "center": 2142 e = "center"; 2143 break; 2144 case "right": 2145 e = k.panelWidth - t.width - M.gridpanel_padding_border_right 2146 } 2147 var i = j.getElement(); 2148 C.placeElement(i, e, M.gridpanel_padding_border_top) 2149 } 2150 function b() { 2151 1 == k.arrowsVisible ? _() : v() 2152 } 2153 function y() { 2154 0 == k.isHorType ? 1 == M.gridpanel_vertical_scroll ? h() : f() : b(), A.placeElements() 2155 } 2156 var w, T, x, S, I = this, 2157 E = jQuery(this), 2158 P = new UniteGalleryMain, 2159 C = new UGFunctions, 2160 j = new UGThumbsGrid, 2161 A = new UGPanelsBase; 2162 this.events = { 2163 FINISH_MOVE: "gridpanel_move_finish", 2164 OPEN_PANEL: "open_panel", 2165 CLOSE_PANEL: "close_panel" 2166 }; 2167 var M = { 2168 gridpanel_vertical_scroll: !0, 2169 gridpanel_grid_align: "middle", 2170 gridpanel_padding_border_top: 10, 2171 gridpanel_padding_border_bottom: 4, 2172 gridpanel_padding_border_left: 10, 2173 gridpanel_padding_border_right: 10, 2174 gridpanel_arrows_skin: "", 2175 gridpanel_arrows_align_vert: "middle", 2176 gridpanel_arrows_padding_vert: 4, 2177 gridpanel_arrows_align_hor: "center", 2178 gridpanel_arrows_padding_hor: 10, 2179 gridpanel_space_between_arrows: 20, 2180 gridpanel_arrows_always_on: !1, 2181 gridpanel_enable_handle: !0, 2182 gridpanel_handle_align: "top", 2183 gridpanel_handle_offset: 0, 2184 gridpanel_handle_skin: "", 2185 gridpanel_background_color: "" 2186 }, z = { 2187 gridpanel_grid_align: "middle", 2188 gridpanel_padding_border_top: 2, 2189 gridpanel_padding_border_bottom: 2 2190 }, O = { 2191 gridpanel_grid_align: "center" 2192 }, k = { 2193 panelType: "grid", 2194 isHorType: !1, 2195 arrowsVisible: !1, 2196 panelHeight: 0, 2197 panelWidth: 0, 2198 originalPosX: null, 2199 isEventsInited: !1, 2200 isClosed: !1, 2201 orientation: null 2202 }; 2203 this.destroy = function() { 2204 S && C.destroyButton(S), x && C.destroyButton(x), A.destroy(), j.destroy() 2205 }, this.getOrientation = function() { 2206 return k.orientation 2207 }, this.setOrientation = function(e) { 2208 switch (k.orientation = e, e) { 2209 case "right":
2210 case "left": 2211 k.isHorType = !1; 2212 break; 2213 case "top": 2214 case "bottom": 2215 k.isHorType = !0; 2216 break; 2217 default: 2218 throw new Error("Wrong grid panel orientation: " + e) 2219 } 2220 }, this.setHeight = function(e) { 2221 if (1 == k.isHorType) throw new Error("setHeight is not appliable to this orientatio (" + k.orientation + "). Please use setWidth"); 2222 k.panelHeight = e; 2223 var t = s(); 2224 j.setMaxHeight(t) 2225 }, this.setWidth = function(e) { 2226 if (0 == k.isHorType) throw new Error("setWidth is not appliable to this orientatio (" + k.orientation + "). Please use setHeight"); 2227 k.panelWidth = e; 2228 var t = o(); 2229 j.setMaxWidth(t) 2230 }, this.init = function(t, i) { 2231 e(t, i) 2232 }, this.setHtml = function() { 2233 n() 2234 }, this.run = function() { 2235 i() 2236 }, this.getElement = function() { 2237 return T 2238 }, this.getSize = function() { 2239 var e = C.getElementSize(T); 2240 return e 2241 }, this.__________Functions_From_Base_____ = function() {}, this.isPanelClosed = function() { 2242 return A.isPanelClosed() 2243 }, this.getClosedPanelDest = function() { 2244 return A.getClosedPanelDest() 2245 }, this.openPanel = function(e) { 2246 A.openPanel(e) 2247 }, this.closePanel = function(e) { 2248 A.closePanel(e) 2249 }, this.setOpenedState = function(e) { 2250 A.setOpenedState(e) 2251 }, this.setClosedState = function(e) { 2252 A.setClosedState(e) 2253 }, this.setDisabledAtStart = function(e) { 2254 A.setDisabledAtStart(e) 2255 } 2256} 2257function UGThumbsGrid() { 2258 function e(e, t, i) { 2259 if (H = e.getObjects(), F = e, F.attachThumbsPanel("grid", B), L = jQuery(e), N = H.g_objWrapper, D = H.g_arrItems, i === !0 && (V.isTilesMode = !0), V.numThumbs = D.length, c(t), 1 == V.isTilesMode) { 2260 X.setFixedMode(), X.setApproveClickFunction(P), X.init(e, U); 2261 var n = X.getOptions(); 2262 V.tileMaxHeight = n.tile_height, V.tileMaxWidth = n.tile_width, Y = X.getObjThumbs() 2263 } else t.thumb_fixed_size = !0, Y.init(e, t) 2264 } 2265 function t(e) { 2266 var t = N; 2267 e && (t = e), t.append("<div class='ug-thumbs-grid'><div class='ug-thumbs-grid-inner'></div></div>"), R = t.children(".ug-thumbs-grid"), G = R.children(".ug-thumbs-grid-inner"), 1 == V.isTilesMode ? X.setHtml(G) : Y.setHtmlThumbs(G) 2268 } 2269 function n() { 2270 if (0 == V.isHorizontal) { 2271 if (0 == V.gridHeight) throw new Error("You must set height before run.") 2272 } else if (0 == V.gridWidth) throw new Error("You must set width before run.") 2273 } 2274 function r() { 2275 var e = F.getSelectedItem(); 2276 if (n(), 1 == V.isFirstTimeRun) k(), 1 == V.isTilesMode ? (s(), u(), X.run()) : (Y.setHtmlProperties(), u(), Y.loadThumbsImages()); 2277 else if (1 == V.isTilesMode) { 2278 var t = s(); 2279 1 == t && (u(), X.run()) 2280 } 2281 if (m(), 1 == V.isFirstTimeRun && V.isTilesMode) { 2282 var i = Y.getThumbs(); 2283 i.each(function(e, t) { 2284 N.trigger(V.eventSizeChange, jQuery(t)) 2285 }), i.fadeTo(0, 1) 2286 } 2287 null != e && d(e.index), W.trigger(B.events.PANE_CHANGE, V.currentPane), V.isFirstTimeRun = !1 2288 } 2289 function a() { 2290 if (1 == V.isTilesMode) var e = X.getGlobalTileSize(); 2291 else var e = Y.getGlobalThumbSize(); 2292 return e 2293 } 2294 function s() { 2295 if (0 == V.isTilesMode) throw new Error("Dynamic size can be set only in tiles mode"); 2296 var e = !1, 2297 t = F.isMobileMode(), 2298 i = V.spaceBetweenCols; 2299 1 == t ? (V.spaceBetweenCols = U.grid_space_between_mobile, V.spaceBetweenRows = U.grid_space_between_mobile) : (V.spaceBetweenCols = U.grid_space_between_cols, V.spaceBetweenRows = U.grid_space_between_rows), V.spaceBetweenCols != i && (e = !0); 2300 var n = a(), 2301 r = n.width, 2302 s = V.tileMaxWidth, 2303 o = Q.getNumItemsInSpace(V.gridWidth, V.tileMaxWidth, V.spaceBetweenCols); 2304 return o < U.grid_min_cols && (s = Q.getItemSizeInSpace(V.gridWidth, U.grid_min_cols, V.spaceBetweenCols)), X.setTileSizeOptions(s), s != r && (e = !0), e 2305 } 2306 function o() { 2307 var e = a(), 2308 t = e.height, 2309 i = V.gridWidth, 2310 n = U.grid_num_rows * t + (U.grid_num_rows - 1) * V.spaceBetweenRows + 2 * U.grid_padding; 2311 V.gridHeight = n, Q.setElementSize(R, i, n), Q.setElementSize(G, i, n), V.innerWidth = i, V.innerHeight = n 2312 } 2313 function l() { 2314 var e = a(), 2315 t = e.width, 2316 i = U.grid_num_cols * t + (U.grid_num_cols - 1) * V.spaceBetweenCols + 2 * U.grid_padding, 2317 n = V.gridHeight; 2318 V.gridWidth = i, Q.setElementSize(R, i, n), Q.setElementSize(G, i, n), V.innerWidth = i, V.innerHeight = n 2319 } 2320 function u() { 2321 0 == V.isHorizontal ? l() : o() 2322 } 2323 function d(e) { 2324 var t = S(e); 2325 return -1 != t && void B.gotoPane(t, "scroll") 2326 } 2327 function c(e) { 2328 U = jQuery.extend(U, e), Y.setOptions(e), V.isNavigationVertical = "top" == U.grid_panes_direction || "bottom" == U.grid_panes_direction, V.spaceBetweenCols = U.grid_space_between_cols, V.spaceBetweenRows =
2328U.grid_space_between_rows 2329 } 2330 function g() { 2331 var e = G.children(".ug-thumb-wrapper"), 2332 t = 0, 2333 n = 0, 2334 r = 0, 2335 a = 0, 2336 s = 0, 2337 o = 0; 2338 V.innerWidth = 0, V.numPanes = 1, V.arrPanes = [], V.numThumbsInPane = 0, V.arrPanes.push(a); 2339 var l = e.length; 2340 for (i = 0; i < l; i++) { 2341 var u = jQuery(e[i]); 2342 Q.placeElement(u, t, n); 2343 var d = u.outerWidth(), 2344 c = u.outerHeight(); 2345 t > s && (s = t); 2346 var g = n + c; 2347 g > o && (o = g); 2348 var p = s + d; 2349 p > V.innerWidth && (V.innerWidth = p), t += d + V.spaceBetweenCols, r++, r >= U.grid_num_cols && (n += c + V.spaceBetweenRows, t = a, r = 0), 1 == V.numPanes && V.numThumbsInPane++, n + c > V.gridHeight && (n = 0, a = V.innerWidth + V.spaceBetweenCols, t = a, r = 0, 1 == V.isMaxHeight && 1 == V.numPanes && (V.gridHeight = o, R.height(V.gridHeight)), i < l - 1 && (V.numPanes++, V.arrPanes.push(a))) 2350 } 2351 G.width(V.innerWidth), 1 == V.isMaxHeight && 1 == V.numPanes && (V.gridHeight = o, R.height(o)) 2352 } 2353 function p() { 2354 var e = G.children(".ug-thumb-wrapper"), 2355 t = 0, 2356 n = 0, 2357 r = 0, 2358 a = 0, 2359 s = 0, 2360 o = 0; 2361 V.innerWidth = 0, V.numPanes = 1, V.arrPanes = [], V.numThumbsInPane = 0, V.arrPanes.push(s); 2362 var l = e.length; 2363 for (i = 0; i < l; i++) { 2364 var u = jQuery(e[i]); 2365 Q.placeElement(u, t, n); 2366 var d = u.outerWidth(), 2367 c = u.outerHeight(); 2368 t += d + V.spaceBetweenCols; 2369 var g = n + c; 2370 g > r && (r = g), a++, a >= U.grid_num_cols && (n += c + V.spaceBetweenRows, t = s, a = 0), 1 == V.numPanes && V.numThumbsInPane++, g = n + c; 2371 var p = o + V.gridHeight; 2372 g > p && (1 == V.isMaxHeight && 1 == V.numPanes && (V.gridHeight = r, R.height(V.gridHeight), p = V.gridHeight), n = p + V.spaceBetweenRows, o = n, s = 0, t = s, a = 0, i < l - 1 && (V.numPanes++, V.arrPanes.push(n))) 2373 } 2374 G.height(r), V.innerHeight = r, 1 == V.isMaxHeight && 1 == V.numPanes && (V.gridHeight = r, R.height(r)) 2375 } 2376 function h() { 2377 var e = G.children(".ug-thumb-wrapper"), 2378 t = U.grid_padding, 2379 n = U.grid_padding, 2380 r = n, 2381 a = t, 2382 s = 0, 2383 o = 0, 2384 l = 0, 2385 u = 0, 2386 d = 0; 2387 V.innerWidth = 0, V.numPanes = 1, V.arrPanes = [], V.numThumbsInPane = 0, V.arrPanes.push(t - U.grid_padding); 2388 var c = e.length; 2389 for (i = 0; i < c; i++) { 2390 var g = jQuery(e[i]), 2391 p = g.outerWidth(), 2392 h = g.outerHeight(); 2393 a - t + p > V.gridWidth && (d++, r = 0, d >= U.grid_num_rows ? (d = 0, t = a, r = n, l = 0, 1 == V.numPanes && (V.gridWidth = s + U.grid_padding, R.width(V.gridWidth), V.gridHeight = u + U.grid_padding, R.height(V.gridHeight)), V.numPanes++, V.arrPanes.push(t - U.grid_padding)) : (a = t, r = l + V.spaceBetweenRows)), Q.placeElement(g, a, r); 2394 var m = a + p; 2395 m > s && (s = m); 2396 var f = r + h; 2397 f > l && (l = f), f > u && (u = f), f > o && (o = f); 2398 var m = s + p; 2399 m > V.innerWidth && (V.innerWidth = m), a += p + V.spaceBetweenCols, 1 == V.numPanes && V.numThumbsInPane++ 2400 } 2401 V.innerWidth = s + U.grid_padding, V.innerHeight = u + U.grid_padding, G.width(V.innerWidth), G.height(V.innerHeight), 1 == V.numPanes && (V.gridWidth = s + U.grid_padding, V.gridHeight = u + U.grid_padding, R.width(V.gridWidth), R.height(V.gridHeight)) 2402 } 2403 function m() { 2404 0 == V.isHorizontal ? V.isNavigationVertical ? p() : g() : h() 2405 } 2406 function f(e) { 2407 if (0 > e || e >= V.numThumbs) throw new Error("Thumb not exists: " + e); 2408 return !0 2409 } 2410 function _(e) { 2411 if (e >= V.numPanes || 0 > e) throw new Error("Pane " + index + " doesn't exists."); 2412 return !0 2413 } 2414 function v(e) {
2415 var t = T(e); 2416 return 0 != t && void G.css(t) 2417 } 2418 function b(e) { 2419 var t = T(e); 2420 return 0 != t && void G.stop(!0).animate(t, { 2421 duration: U.grid_transition_duration, 2422 easing: U.grid_transition_easing, 2423 queue: !1 2424 }) 2425 } 2426 function y() { 2427 var e = -V.arrPanes[V.currentPane]; 2428 b(e) 2429 } 2430 function w() { 2431 return 1 == V.isNavigationVertical ? V.gridHeight : V.gridWidth 2432 } 2433 function T(e) { 2434 var t = {}; 2435 return 1 == V.isNavigationVertical ? t.top = e + "px" : t.left = e + "px", t 2436 } 2437 function x() { 2438 var e = Q.getElementSize(G); 2439 return 1 == V.isNavigationVertical ? e.top : e.left 2440 } 2441 function S(e) { 2442 if (0 == f(e)) return -1; 2443 var t = Math.floor(e / V.numThumbsInPane); 2444 return t 2445 } 2446 function I() { 2447 if (1 == V.numPanes) return !1; 2448 var e = Q.getStoredEventData(V.storedEventID), 2449 t = e.diffTime, 2450 i = x(), 2451 n = Math.abs(i - e.startInnerPos); 2452 return n > 30 || n > 5 && t > 300 2453 } 2454 function E() { 2455 var e = Q.getStoredEventData(V.storedEventID), 2456 t = x(); 2457 diffPos = Math.abs(e.startInnerPos - t); 2458 var i = w(), 2459 n = Math.round(3 * i / 8); 2460 return diffPos >= n || e.diffTime < 300 && diffPos > 25 2461 } 2462 function P() { 2463 if (1 == V.numPanes) return !0; 2464 var e = Q.isApproveStoredEventClick(V.storedEventID, V.isNavigationVertical); 2465 return e 2466 } 2467 function C(e) { 2468 if (1 == I()) return !0; 2469 var t = jQuery(this), 2470 i = Y.getItemByThumb(t); 2471 F.selectItem(i) 2472 } 2473 function j(e) { 2474 if (1 == V.numPanes) return !0; 2475 if (1 == V.touchActive) return !0; 2476 0 == V.isTilesMode && e.preventDefault(), V.touchActive = !0; 2477 var t = { 2478 startInnerPos: x() 2479 }; 2480 Q.storeEventData(e, V.storedEventID, t) 2481 } 2482 function A() { 2483 if (0 == U.grid_vertical_scroll_ondrag) return !1; 2484 if (1 == V.isNavigationVertical) return !1; 2485 var e = Q.handleScrollTop(V.storedEventID); 2486 return "vert" === e 2487 } 2488 function M(e) { 2489 if (0 == V.touchActive) return !0; 2490 e.preventDefault(), Q.updateStoredEventData(e, V.storedEventID); 2491 var t = Q.getStoredEventData(V.storedEventID, V.isNavigationVertical), 2492 i = A(); 2493 if (i) return !0; 2494 var n = t.diffMousePos, 2495 r = t.startInnerPos + n, 2496 a = n > 0 ? "prev" : "next", 2497 s = V.arrPanes[V.numPanes - 1]; 2498 0 == U.grid_carousel && r > 0 && "prev" == a && (r /= 3), 0 == U.grid_carousel && -s > r && "next" == a && (r = t.startInnerPos + n / 3), v(r) 2499 } 2500 function z(e) { 2501 if (0 == V.touchActive) return !0; 2502 Q.updateStoredEventData(e, V.storedEventID); 2503 var t = Q.getStoredEventData(V.storedEventID, V.isNavigationVertical); 2504 if (V.touchActive = !1, 0 == E()) return y(), !0; 2505 var i = x(), 2506 n = i - t.startInnerPos, 2507 r = n > 0 ? "prev" : "next"; 2508 "next" == r ? 0 == U.grid_carousel && B.isLastPane() ? y() : B.nextPane() : 0 == U.grid_carousel && B.isFirstPane() ? y() : B.prevPane() 2509 } 2510 function O() { 2511 var e = F.getSelectedItem(); 2512 Y.setThumbSelected(e.objThumbWrapper), d(e.index) 2513 } 2514 function k() { 2515 if (0 == V.isTilesMode) { 2516 Y.initEvents(); 2517 var e = R.find(".ug-thumb-wrapper"); 2518 e.on("click touchend", C), L.on(F.events.ITEM_CHANGE, O) 2519 } else X.initEvents(); 2520 R.bind("mousedown touchstart", j), jQuery("body").bind("mousemove touchmove", M), jQuery(window).add("body").bind("mouseup touchend", z) 2521 } 2522 var L, H, N, D, R, G, B = this, 2523 W = jQuery(this), 2524 F = new UniteGalleryMain, 2525 Q = new UGFunctions, 2526 Y = new UGThumbsGeneral, 2527 X = new UGTileDesign, 2528 U = { 2529 grid_panes_direction: "left", 2530 grid_num_cols: 2, 2531 grid_min_cols: 2, 2532 grid_num_rows: 2, 2533 grid_space_between_cols: 10, 2534 grid_space_between_rows: 10, 2535 grid_space_between_mobile: 10, 2536 grid_transition_duration: 300, 2537 grid_transition_easing: "easeInOutQuad", 2538 grid_carousel: !1, 2539 grid_padding: 0, 2540 grid_vertical_scroll_ondrag: !1 2541 }; 2542 this.events = { 2543 PANE_CHANGE: "pane_change" 2544 }; 2545 var V = { 2546 eventSizeChange: "thumb_size_change", 2547 isHorizontal: !1, 2548 isMaxHeight: !1, 2549 isMaxWidth: !1, 2550 gridHeight: 0, 2551 gridWidth: 0, 2552 innerWidth: 0, 2553 innerHeight: 0, 2554 numPanes: 0, 2555 arrPanes: 0, 2556 numThumbs: 0, 2557 currentPane: 0, 2558 numThumbsInPane: 0, 2559 isNavigationVertical: !1, 2560 touchActive: !1, 2561 startScrollPos: 0, 2562 isFirstTimeRun: !0, 2563 isTilesMode: !1, 2564 storedEventID: "thumbsgrid", 2565 tileMaxWidth: null, 2566 tileMaxHeight: null, 2567 spaceBetweenCols: null, 2568 spaceBetweenRows: null 2569 }; 2570 this.destroy = function() { 2571 if (0 == V.isTilesMode) { 2572 var e = R.find(".ug-thumb-wrapper"); 2573 e.off("click"), e.off("touchend"), L.on(F.events.ITEM_CHANGE), Y.destroy() 2574 } else X.destroy(); 2575 R.unbind("mousedown"), R.unbind("touchstart"), jQuery("body").unbind("mousemove"), jQuery("body").unbind("touchmove"), jQuery(window).add("body").unbind("touchend"), jQuery(window).add("body").unbind("mouseup"), W.off(B.events.PANE_CHANGE) 2576 }, this.__________EXTERNAL_GENERAL_________ = function() {}, this.setThumbUnselected = function(e) { 2577 Y.setThumbUnselected(e) 2578 }, this.isItemThumbVisible = function(e) { 2579 var t = e.index, 2580 i = S(t); 2581 return i == V.currentPane 2582 }, this.__________EXTERNAL_API_________ = function() {}, this.getNumPanesEstimationByHeight = function(e) { 2583 if (1 == V.isTilesMode) var t = U.tile_height; 2584 else var i = Y.getOptions(), 2585 t = i.thumb_height; 2586 var n = Y.getNumThumbs(),
2587 r = Math.ceil(n / U.grid_num_cols), 2588 a = r * t + (r - 1) * V.spaceBetweenRows, 2589 s = Math.ceil(a / e); 2590 return s 2591 }, this.getNumPanesEstimationByWidth = function(e) { 2592 if (V.isTilesMode) var t = U.tile_width; 2593 else var i = Y.getOptions(), 2594 t = i.thumb_width; 2595 var n = Y.getNumThumbs(), 2596 r = Math.ceil(n / U.grid_num_rows), 2597 a = r * t + (r - 1) * V.spaceBetweenCols, 2598 s = Math.ceil(a / e); 2599 return s 2600 }, this.getHeightEstimationByWidth = function(e) { 2601 if (0 == V.isTilesMode) throw new Error("This function works only with tiles mode"); 2602 var t = Y.getNumThumbs(), 2603 i = Q.getNumItemsInSpace(e, U.tile_width, V.spaceBetweenCols), 2604 n = Math.ceil(t / i); 2605 n > U.grid_num_rows && (n = U.grid_num_rows); 2606 var r = Q.getSpaceByNumItems(n, U.tile_height, V.spaceBetweenRows); 2607 return r += 2 * U.grid_padding 2608 }, this.getElement = function() { 2609 return R 2610 }, this.getSize = function() { 2611 var e = Q.getElementSize(R); 2612 return e 2613 }, this.getNumPanes = function() { 2614 return V.numPanes 2615 }, this.isFirstPane = function() { 2616 return 0 == V.currentPane 2617 }, this.isLastPane = function() { 2618 return V.currentPane == V.numPanes - 1 2619 }, this.getPaneInfo = function() { 2620 var e = { 2621 pane: V.currentPane, 2622 total: V.numPanes 2623 }; 2624 return e 2625 }, this.getPane = function() { 2626 return V.currentPane 2627 }, this.setWidth = function(e) { 2628 V.gridWidth = e, V.isHorizontal = !0 2629 }, this.setMaxWidth = function(e) { 2630 V.gridWidth = e, V.isMaxWidth = !0, V.isHorizontal = !0 2631 }, this.setHeight = function(e) { 2632 V.gridHeight = e, V.isHorizontal = !1 2633 }, this.setMaxHeight = function(e) { 2634 V.gridHeight = e, V.isMaxHeight = !0, V.isHorizontal = !1 2635 }, this.gotoPane = function(e, t) { 2636 if (0 == _(e)) return !1; 2637 if (e == V.currentPane) return !1; 2638 var i = -V.arrPanes[e]; 2639 V.currentPane = e, b(i), W.trigger(B.events.PANE_CHANGE, e) 2640 }, this.nextPane = function() { 2641 var e = V.currentPane + 1; 2642 if (e >= V.numPanes) { 2643 if (0 == U.grid_carousel) return !0; 2644 e = 0 2645 } 2646 B.gotoPane(e, "next") 2647 }, this.prevPane = function() { 2648 var e = V.currentPane - 1; 2649 return !(0 > e && (e = V.numPanes - 1, 0 == U.grid_carousel)) && void B.gotoPane(e, "prev") 2650 }, this.attachNextPaneButton = function(e) { 2651 return Q.setButtonOnClick(e, B.nextPane), 1 == U.grid_carousel || (B.isLastPane() && e.addClass("ug-button-disabled"), void W.on(B.events.PANE_CHANGE, function() { 2652 B.isLastPane() ? e.addClass("ug-button-disabled") : e.removeClass("ug-button-disabled") 2653 })) 2654 }, this.attachPrevPaneButton = function(e) { 2655 return Q.setButtonOnClick(e, B.prevPane), 1 == U.grid_carousel || (B.isFirstPane() && e.addClass("ug-button-disabled"), void W.on(B.events.PANE_CHANGE, function() { 2656 B.isFirstPane() ? e.addClass("ug-button-disabled") : e.removeClass("ug-button-disabled") 2657 })) 2658 }, this.attachBullets = function(e) { 2659 e.setActive(V.currentPane), jQuery(e).on(e.events.BULLET_CLICK, function(t, i) { 2660 B.gotoPane(i, "theme"), e.setActive(i) 2661 }), jQuery(B).on(B.events.PANE_CHANGE, function(t, i) { 2662 e.setActive(i) 2663 }) 2664 }, this.getObjTileDesign = function() { 2665 return X 2666 }, this.init = function(t, i, n) { 2667 e(t, i, n) 2668 }, this.run = function() { 2669 r() 2670 }, this.setHtml = function(e) { 2671 t(e) 2672 } 2673} 2674function UGTiles() { 2675 function e(e, i) { 2676 g_objects = e.getObjects(), ae = e, K = jQuery(e), $ = g_objects.g_objWrapper, ee = g_objects.g_arrItems, de = jQuery.extend(de, i), t(), oe.init(e, de), le = oe.getObjThumbs() 2677 } 2678 function t() { 2679 de.tiles_min_columns < 1 && (de.tiles_min_columns = 1), 0 != de.tiles_max_columns && de.tiles_max_columns < de.tiles_min_columns && (de.tiles_max_columns = de.tiles_min_columns) 2680 } 2681 function i(e) { 2682 if (!e) if (J) e = J; 2683 else var e = $; 2684 J = e; 2685 var t = de.tiles_type; 2686 e.addClass("ug-tiletype-" + t), oe.setHtml(e), e.children(".ug-thumb-wrapper").hide() 2687 } 2688 function n() { 2689 if (J.addClass("ug-tiles-rest-mode"), ce.isTransInited = !0, 1 == de.tiles_enable_transition) { 2690 J.addClass("ug-tiles-transit"); 2691 var e = oe.getOptions(); 2692 1 == e.tile_enable_image_effect && 0 == e.tile_image_effect_reverse && J.addClass("ug-tiles-transit-overlays"), ce.isTransActive = !0 2693 } 2694 } 2695 function r() { 2696 return se.getElementSize(J).width 2697 } 2698 function a() { 2699 return 0 != ce.isTransInited && (J.addClass("ug-tiles-transition-active"), J.removeClass("ug-tiles-rest-mode"), 0 != ce.isTransActive && void oe.disableEvents()) 2700 } 2701 function s() { 2702 return 0 != ce.isTransInited && (J.removeClass("ug-tiles-transition-active"), void J.addClass("ug-tiles-rest-mode")) 2703 } 2704 function o() { 2705 1 == ce.isTransActive ? (setTimeout(function() { 2706 oe.enableEvents(), oe.triggerSizeChangeEventAllTiles(), s() 2707 }, 800), ce.handle && clearTimeout(ce.handle), ce.handle = setTimeout(function() { 2708 s(), oe.triggerSizeChangeEventAllTiles(), ce.handle = null 2709 }, 2e3)) : (oe.triggerSizeChangeEventAllTiles(), s()) 2710 } 2711 function l() { 2712 ue.colWidth = (ue.availWidth - ue.colGap * (ue.numCols - 1)) / ue.numC
2712ols, ue.colWidth = Math.floor(ue.colWidth), ue.totalWidth = se.getSpaceByNumItems(ue.numCols, ue.colWidth, ue.colGap) 2713 } 2714 function u() { 2715 if (ue.colWidth = de.tiles_col_width, ue.minCols = de.tiles_min_columns, ue.maxCols = de.tiles_max_columns, 0 == ae.isMobileMode() ? ue.colGap = de.tiles_space_between_cols : ue.colGap = de.tiles_space_between_cols_mobile, ue.galleryWidth = r(), ue.availWidth = ue.galleryWidth, 1 == de.tiles_include_padding && (ue.availWidth = ue.galleryWidth - 2 * ue.colGap), 1 == de.tiles_exact_width) ue.numCols = se.getNumItemsInSpace(ue.availWidth, ue.colWidth, ue.colGap), ue.maxCols > 0 && ue.numCols > ue.maxCols && (ue.numCols = ue.maxCols), ue.numCols < ue.minCols ? (ue.numCols = ue.minCols, l()) : ue.totalWidth = ue.numCols * (ue.colWidth + ue.colGap) - ue.colGap; 2716 else { 2717 var e = se.getNumItemsInSpaceRound(ue.availWidth, ue.colWidth, ue.colGap); 2718 e < ue.minCols ? e = ue.minCols : 0 != ue.maxCols && e > ue.maxCols && (e = ue.maxCols), ue.numCols = e, l() 2719 } 2720 switch (de.tiles_align) { 2721 case "center": 2722 default: 2723 ue.addX = Math.round((ue.galleryWidth - ue.totalWidth) / 2); 2724 break; 2725 case "left": 2726 ue.addX = 0; 2727 break; 2728 case "right": 2729 ue.addX = ue.galleryWidth - ue.totalWidth 2730 } 2731 for (ue.arrPosx = [], col = 0; col < ue.numCols; col++) { 2732 var t = se.getColX(col, ue.colWidth, ue.colGap); 2733 ue.arrPosx[col] = t + ue.addX 2734 } 2735 } 2736 function d() { 2737 ue.maxColHeight = 0, ue.colHeights = [0] 2738 } 2739 function c() { 2740 var e = 0, 2741 t = 999999999; 2742 for (col = 0; col < ue.numCols; col++) { 2743 if (void 0 == ue.colHeights[col] || 0 == ue.colHeights[col]) return col; 2744 ue.colHeights[col] < t && (e = col, t = ue.colHeights[col]) 2745 } 2746 return e 2747 } 2748 function g(e, t, i, n) { 2749 if (null === n || "undefined" == typeof n) var n = c(); 2750 var r = 0; 2751 void 0 !== ue.colHeights[n] && (r = ue.colHeights[n]); 2752 var a = oe.getTileHeightByWidth(ue.colWidth, e); 2753 if (null === a) { 2754 if (1 == de.tiles_enable_transition) throw new Error("Can't know tile height, please turn off transition"); 2755 var s = se.getElementSize(e); 2756 a = s.height 2757 } 2758 var o = ue.arrPosx[n]; 2759 se.placeElement(e, o, r); 2760 var l = r + a; 2761 ue.colHeights[n] = l + ue.colGap, ue.maxColHeight < l && (ue.maxColHeight = l), 1 == t && e.show().fadeTo(0, 1), 1 == i && J.height(ue.maxColHeight) 2762 } 2763 function p(e) { 2764 e || (e = !1), u(), d(); 2765 var t = le.getThumbs(le.type.GET_THUMBS_RATIO); 2766 a(), oe.resizeAllTiles(ue.colWidth, oe.resizemode.VISIBLE_ELEMENTS, t); 2767 for (var i = 0; i < t.length; i++) { 2768 var n = jQuery(t[i]), 2769 r = void 0; 2770 1 == de.tiles_keep_order && (r = se.getColByIndex(ue.numCols, i)), g(n, e, !1, r) 2771 } 2772 o(); 2773 var s = J.height(); 2774 1 == ce.isTransActive && s > ue.maxColHeight ? setTimeout(function() { 2775 J.height(ue.maxColHeight) 2776 }, 700) : J.height(ue.maxColHeight) 2777 } 2778 function h(e) { 2779 var t = e.index(), 2780 i = ae.getItem(t); 2781 if (i.ordered_placed === !0) return !1; 2782 var n = se.getPrevRowSameColIndex(t, ue.numCols); 2783 if (0 > n) return !0; 2784 var r = ae.getItem(n); 2785 return r.ordered_placed === !0 2786 } 2787 function m(e, t) { 2788 if (t !== !0) { 2789 var i = h(e); 2790 if (0 == i) return !1 2791 } 2792 var n = e.index(), 2793 r = se.getColByIndex(ue.numCols, n), 2794 a = ae.getItem(n); 2795 oe.resizeTile(e, ue.colWidth), g(e, !0, !0, r), a.ordered_placed = !0; 2796 var s = ae.getNumItems(), 2797 o = se.getNextRowSameColIndex(n, ue.numCols); 2798 if (o >= s) return !1; 2799 var l = le.getThumbByIndex(o), 2800 u = ae.getItem(o); 2801 le.isThumbLoaded(l), le.isThumbLoaded(l) && !u.ordered_placed && m(l, !0) 2802 } 2803 function f(e, t) { 2804 if (1 == t) return !1; 2805 e = jQuery(e); 2806 var i = jQuery(e).parent(); 2807 le.triggerImageLoadedEvent(i, e), 1 == de.tiles_keep_order ? m(i) : (oe.resizeTile(i, ue.colWidth), g(i, !0, !0)) 2808 } 2809 function _() { 2810 var e = le.getThumbs(le.type.GET_THUMBS_NO_RATIO); 2811 if (!e || 0 == e.length) return !1;
2812 if (ce.isAllLoaded = !1, 1 == ce.isFirstPlaced) { 2813 u(), d(); 2814 var t = Math.abs(ue.galleryWidth - ue.totalWidth); 2815 if (1 == de.tiles_set_initial_height && 0 == se.isScrollbarExists() && 25 > t) { 2816 var i = (e.length, Math.ceil(e.length / ue.numCols)), 2817 r = i * de.tiles_col_width * .75; 2818 J.height(r), u() 2819 } 2820 } 2821 e.fadeTo(0, 0); 2822 var a = e.find("img.ug-thumb-image"), 2823 s = ue.numCols, 2824 o = ue.galleryWidth; 2825 se.checkImagesLoaded(a, function() { 2826 u(), (s != ue.numCols || o != ue.galleryWidth) && p(!1), n(), re.trigger(ne.events.ALL_TILES_LOADED) 2827 }, function(e, t) { 2828 1 == ce.isFirstPlaced && ae.triggerEvent(ne.events.TILES_FIRST_PLACED), f(e, t) 2829 }) 2830 } 2831 function v() { 2832 var e = r(), 2833 t = le.getThumbs(!0), 2834 i = de.tiles_justified_row_height, 2835 n = [], 2836 a = 0, 2837 s = de.tiles_justified_space_between, 2838 o = t.length; 2839 jQuery.each(t, function(e, t) { 2840 t = jQuery(t); 2841 var r = le.getItemByThumb(t), 2842 s = r.thumbWidth, 2843 o = r.thumbHeight; 2844 o !== i && (s = Math.floor(r.thumbRatioByWidth * i)), n[e] = s, a += s 2845 }); 2846 var l = Math.ceil(a / e); 2847 l > o && (l = o); 2848 var u = a / l, 2849 d = [], 2850 c = 0, 2851 g = [], 2852 p = [], 2853 h = 0, 2854 m = 0; 2855 jQuery.each(t, function(e, t) { 2856 var i = n[e]; 2857 h + i / 2 > (m + 1) * u && (g[d.length] = c, d.push(p), p = [], c = 0, m++), h += i, c += i, p.push(t) 2858 }), g[d.length] = c, d.push(p); 2859 var f = [], 2860 _ = [], 2861 v = 0; 2862 jQuery.each(d, function(t, r) { 2863 var a = (r.length, g[t]), 2864 o = (r.length - 1) * s, 2865 l = (e - o) / a, 2866 u = Math.round(i * l); 2867 v += u, t > 0 && (v += s), _.push(u); 2868 var d = u / i, 2869 c = [], 2870 p = o; 2871 jQuery.each(r, function(e, t) { 2872 var i = jQuery(t), 2873 r = i.index(), 2874 a = n[r], 2875 s = Math.round(a * d); 2876 c[e] = s, p += s 2877 }); 2878 var h = p - e; 2879 jQuery.each(c, function(e, t) { 2880 return 0 != h && (0 > h ? (c[e] = t + 1, h++) : (c[e] = t - 1, h--), void(e == c.length - 1 && 0 != h && (c[e] -= h))) 2881 }), f[t] = c 2882 }); 2883 var b = { 2884 arrRows: d, 2885 arrRowWidths: f, 2886 arrRowHeights: _, 2887 gap: s, 2888 totalHeight: v 2889 }; 2890 return b 2891 } 2892 function b(e) { 2893 if (!e) var e = !1; 2894 var t = r(), 2895 i = v(); 2896 J.height(i.totalHeight); 2897 var n = r(); 2898 n != t && (i = v()), a(); 2899 var s = 0, 2900 l = 0; 2901 jQuery.each(i.arrRows, function(t, n) { 2902 var r = i.arrRowWidths[t], 2903 a = i.arrRowHeights[t], 2904 o = 0; 2905 jQuery.each(n, function(t, n) { 2906 var u = jQuery(n), 2907 d = a, 2908 c = r[t]; 2909 oe.resizeTile(u, c, d, oe.resizemode.VISIBLE_ELEMENTS), se.placeElement(u, o, s), o += c, o > l && (l = o), o += i.gap, 1 == e && jQuery(n).show() 2910 }), s += a + i.gap 2911 }), o() 2912 } 2913 function y() { 2914 var e = jQuery($).find("img.ug-thumb-image"), 2915 t = le.getThumbs(); 2916 ce.isAllLoaded = !1, t.fadeTo(0, 0), se.checkImagesLoaded(e, function() { 2917 setTimeout(function() { 2918 b(!0), t.fadeTo(0, 1), ae.triggerEvent(ne.events.TILES_FIRST_PLACED), n(), re.trigger(ne.events.ALL_TILES_LOADED) 2919 }) 2920 }, function(e, t) { 2921 e = jQuery(e); 2922 var i = jQuery(e).parent(); 2923 le.triggerImageLoadedEvent(i, e) 2924 }) 2925 } 2926 function w() { 2927 var e = jQuery($).find("img.ug-thumb-image"), 2928 t = le.getThumbs();
2929 ce.isAllLoaded = !1, t.fadeTo(0, 0), se.checkImagesLoaded(e, function() { 2930 1 == ae.isMobileMode() ? p(!0) : x(!0), ae.triggerEvent(ne.events.TILES_FIRST_PLACED), n(), re.trigger(ne.events.ALL_TILES_LOADED) 2931 }, function(e, t) { 2932 e = jQuery(e); 2933 var i = jQuery(e).parent(); 2934 le.triggerImageLoadedEvent(i, e) 2935 }) 2936 } 2937 function T() { 2938 var e = r(); 2939 ge.galleryWidth = e, te = {}, ge.colWidth = de.tiles_nested_col_width, ge.optimalTileWidth = de.tiles_nested_optimal_tile_width, ge.currentGap = de.tiles_space_between_cols, 1 == ae.isMobileMode() && (ge.currentGap = de.tiles_space_between_cols_mobile), null == ge.colWidth ? ge.colWidth = Math.floor(ge.optimalTileWidth / ge.nestedOptimalCols) : ge.optimalTileWidth > ge.colWidth ? ge.nestedOptimalCols = Math.ceil(ge.optimalTileWidth / ge.colWidth) : ge.nestedOptimalCols = 1, ge.maxColumns = se.getNumItemsInSpace(e, ge.colWidth, ge.currentGap), ge.colWidth = se.getItemSizeInSpace(e, ge.maxColumns, ge.currentGap), ge.gridY = 0, ie = []; 2940 var t = le.getThumbs(!0); 2941 switch (t.each(function() { 2942 var e = jQuery(this), 2943 t = S(e); 2944 ie.push(t) 2945 }), ge.optimalTileWidth > ge.colWidth ? ge.nestedOptimalCols = Math.ceil(ge.optimalTileWidth / ge.colWidth) : ge.nestedOptimalCols = 1, ge.totalWidth = ge.maxColumns * (ge.colWidth + ge.currentGap) - ge.currentGap, de.tiles_align) { 2946 case "center": 2947 default: 2948 ge.addX = Math.round((ge.galleryWidth - ge.totalWidth) / 2); 2949 break; 2950 case "left": 2951 ge.addX = 0; 2952 break; 2953 case "right": 2954 ge.addX = ge.galleryWidth - ge.totalWidth 2955 } 2956 ge.maxGridY = 0 2957 } 2958 function x(e) { 2959 var t = r(); 2960 T(), P(); 2961 var i = ge.maxGridY * (ge.colWidth + ge.currentGap) - ge.currentGap; 2962 J.height(i); 2963 var n = r(); 2964 n != t && (T(), P()), 0 == de.tiles_nested_debug && X(e) 2965 } 2966 function S(e) { 2967 var t, i, n = {}, r = ge.colWidth, 2968 a = ge.currentGap, 2969 s = oe.getTileImageSize(e), 2970 o = e.index(), 2971 l = Math.ceil(I(o) * (1 * ge.nestedOptimalCols / 3) + 2 * ge.nestedOptimalCols / 3), 2972 u = s.width, 2973 d = s.height, 2974 c = u / d; 2975 return u > d ? (t = l, i = Math.round(t / c), 0 == i && (i = 1)) : (i = l, t = Math.round(i * c), 0 == t && (t = 1)), n.dimWidth = t, n.dimHeight = i, n.width = t * r + a * (t - 1), n.height = i * r + a * (i - 1), n.imgWidth = u, n.imgHeight = d, n.left = 0, n.top = 0, n 2976 } 2977 function I(e) { 2978 return Math.abs(Math.sin(Math.abs(1e3 * Math.sin(e)))) 2979 } 2980 function E(e, t) { 2981 if (0 == t) { 2982 for (var i = ge.currentItem; i < ie.length; i++) C(i, !0); 2983 ge.currentItem = ie.length - 1 2984 } else C(ge.currentItem, !0); 2985 for (var i = 0; i <= ge.currentItem; i++) U(i, !0); 2986 ge.currentItem++ 2987 } 2988 function P(e) { 2989 if (1 == de.tiles_nested_debug) return "undefined" == typeof e && (e = !0), E(!0, e), !1; 2990 for (var t = 0; t < ie.length; t++) C(t, !0) 2991 } 2992 function C(e, t) { 2993 if (!t) var t = !1; 2994 ge.maxColHeight = 0; 2995 for (var i = se.getObjectLength(te), n = ge.gridY; i + 1 >= n; n++) { 2996 for (var r = 0; r < ge.maxColumns; r++) if (0 == B(ge.gridY) || 0 == Q(ge.gridY, r)) { 2997 var a = G(r); 2998 return void j(e, a, r) 2999 } 3000 ge.gridY++ 3001 } 3002 } 3003 function j(e, t, i) { 3004 var n = jQuery.extend(!0, {}, ie[e]), 3005 r = n.dimWidth, 3006 a = t - n.dimWidth, 3007 s = ge.nestedOptimalCols, 3008 o = t <= n.dimWidth || .33 * s >= a || s >= t; 3009 if (o) H(e, t); 3010 else if (s >= a) s >= 4 ? 1 == R(Math.floor(t / 2), i) ? H(e, Math.floor(t / 2) + 1) : H(e, Math.floor(t / 2)) : H(objImage, t); 3011 else if (1 == R(r, i)) switch (r >= s) { 3012 case !0: 3013 H(e, r - 1); 3014 break; 3015 case !1: 3016 H(e, r + 1) 3017 } 3018 n = jQuery.extend(!0, {}, ie[e]);
3019 var l = k(e, n.dimWidth, i); 3020 if (ge.columnsValueToEnableHeightResize <= l[0] && ge.maxColumns >= 2 * ge.nestedOptimalCols) { 3021 var u = L(i, n), 3022 d = N(e, u.newHeight, !0); 3023 ie[e].dimHeight = d.dimHeight; 3024 var c = O(l, d.dimWidth, i), 3025 g = A(c), 3026 p = !1; 3027 g >= 2 && (p = !0), u.newHeight >= n.dimHeight && (n = N(e, u.newHeight, !0)); 3028 var h = M(u.idToResize, u.newHeight, n.dimHeight); 3029 n.top = ge.gridY, n.left = i, h.push({ 3030 tileID: e, 3031 sizes: n 3032 }); 3033 var m = D(h), 3034 f = D(c); 3035 return f > m || 1 == p ? void z(h) : void z(c) 3036 } 3037 n.left = i, n.top = ge.gridY, ie[e] = n, W(e, n, i, ge.gridY), ge.maxGridY = n.top + n.dimHeight 3038 } 3039 function A(e) { 3040 for (var t = 0, i = 0, n = 0; n < e.length - 1; n++) { 3041 var r = e[n].sizes, 3042 a = -1, 3043 s = -1; 3044 B(r.top + r.dimHeight) && ge.maxColumns > r.left + r.dimWidth && (a = te[r.top + r.dimHeight - 1][r.left + r.dimWidth], s = te[r.top + r.dimHeight][r.left + r.dimWidth]), a != s && t++ 3045 } 3046 for (var n = 0; n < e.length - 1; n++) { 3047 var r = e[n].sizes, 3048 a = -1, 3049 s = -1; 3050 B(r.top + r.dimHeight) && r.left - 1 >= 0 && (a = te[r.top + r.dimHeight - 1][r.left - 1], s = te[r.top + r.dimHeight][r.left - 1]), a != s && i++ 3051 } 3052 return Math.max(i, t) 3053 } 3054 function M(e, t, i) { 3055 var n = ie[e], 3056 r = n.dimHeight, 3057 a = (n.dimWidth, n.left), 3058 s = n.top, 3059 o = (parseInt(s / (ge.colWidth + ge.currentGap)), parseInt(a / (ge.colWidth + ge.currentGap)), r - t + i), 3060 l = N(e, o, !0), 3061 u = []; 3062 return u.push({ 3063 tileID: e, 3064 sizes: l 3065 }), u 3066 } 3067 function z(e) { 3068 for (var t = 0; t < e.length; t++) { 3069 var i = e[t].sizes, 3070 n = e[t].tileID; 3071 ie[n] = jQuery.extend(!0, {}, i), W(n, i, i.left, i.top) 3072 } 3073 } 3074 function O(e, t) { 3075 for (var i = 0, n = 0, r = [], a = 0, s = 0, o = 0; o < e[1].length; o++) { 3076 var l = e[1][o], 3077 u = ie[e[1][o]]; 3078 if (n += u.dimHeight, 0 != o) i += u.dimHeight, r.push([l, u.dimHeight]); 3079 else { 3080 var d = H(l, t, !0); 3081 i += d.dimHeight, r.push([e[1][o], d.dimHeight]) 3082 } 3083 } 3084 a = u.left, s = u.top; 3085 for (var c = n, g = [], o = r.length - 1; o >= 0; o--) { 3086 var p, l = r[o][0]; 3087 0 != o ? (p = Math.max(Math.round(1 * n / 3), Math.floor(r[o][1] * (n / i))), c -= p, d = N(l, p, !0), d.left = a, d.top = s, g.push({ 3088 tileID: l, 3089 sizes: d 3090 }), s += d.dimHeight) : (p = c, d = N(l, p, !0), d.left = a, d.top = s, g.push({ 3091 tileID: l, 3092 sizes: d 3093 })) 3094 } 3095 return g 3096 } 3097 function k(e, t, i) { 3098 var n = ge.gridY - 1, 3099 r = 0, 3100 a = 0, 3101 s = 1, 3102 o = [], 3103 l = []; 3104 if (o.push(e), n >= 0) { 3105 for (a = 0; n >= 0;) { 3106 if (r = te[n][i], "undefined" != typeof te[n][i - 1] && te[n][i - 1] == te[n][i] || "undefined" != typeof te[n][i + t] && te[n][i + t - 1] == te[n][i + t] || te[n][i] != te[n][i + t - 1]) return l.push(s), l.push(o), l; 3107 a != r && (s++, o.push(r)), n--, a = r 3108 } 3109 return l.push(s), l.push(o), l 3110 } 3111 return [0, []] 3112 } 3113 function L(e, t) { 3114 var i = 0, 3115 n = 0, 3116 r = t.dimWidth, 3117 a = t.dimHeight, 3118 s = 0, 3119 o = 0, 3120 l = jQuery.map(te, function(e, t) { 3121 return [e] 3122 }); 3123 if ("undefined" == typeof l[ge.gridY] || "undefined" == typeof l[ge.gridY][e - 1]) n = 0; 3124 else for (var u = 0; 3125 "undefined" != typeof te[ge.gridY + u] && -1 != te[ge.gridY + u][e - 1];) s = te[ge.gridY + u][e - 2], u++, n++; 3126 if ("undefined" == typeof l[ge.gridY] || "undefined" == typeof l[ge.gridY][e + r]) i = 0; 3127 else for (u = 0; 3128 "undefined" != typeof te[ge.gridY + u] && -1 != te[ge.gridY + u][e + r];) o = te[ge.gridY + u][e + r + 1], u++, i++; 3129 var d = 0, 3130 c = 0; 3131 Math.abs(a - n) < Math.abs(a - i) && 0 != n ? (d = n, c = s) : 0 != i ? (d = i, c = o) : d = a; 3132 var g = { 3133 newHeight: d, 3134 idToResize: c 3135 }; 3136 return g 3137 } 3138 function H(e, t, i) { 3139 i || (i = !1); 3140 var n = ge.colWidth, 3141 r = ge.currentGap, 3142 a = ie[e], 3143 s = a.imgWidth, 3144 o = a.imgHeight, 3145 l = s / o; 3146 if (dimWidth = t, dimHeight = Math.round(dimWidth / l), 1 == i) { 3147 var u = jQuery.extend(!0, {}, a); 3148 return u.dimWidth = dimWidth, u.dimHeight = dimHeight, u.width = dimWidth * n + r * (dimWidth - 1), u.height = dimHeight * n + r * (dimHeight - 1), u 3149 } 3150 a.dimWidth = dimWidth, a.dimHeight = dimHeight, a.width = dimWidth * n + r * (dimWidth - 1), a.height = dimHeight * n + r * (dimHeight - 1) 3151 } 3152 function N(e, t, i) { 3153 i || (i = !1); 3154 var n = ie[e], 3155 r = n.dimWidth, 3156 a = ge.colWidth, 3157 s = ge.currentGap; 3158 if (1 == i) { 3159 var o = jQuery.extend(!0, {}, n); 3160 return o.dimHeight = t, o.width = r * a + s * (r - 1), o.height = t * a + s * (t - 1), o 3161 } 3162 n.dimHeight = t, n.width = r * a + s * (r - 1), n.height = t * a + s * (t - 1) 3163 } 3164 function D(e) { 3165 for (var t = 0, i = 0, n = 0; n < e.length; n++) { 3166 var r = ie[e[n].tileID]; 3167 if (0 == r.dimHeight || 0 == r.height) return; 3168 resizeVal = r.dimWidth / r.dimHeight / (r.imgWidth / r.imgHeight), resizeVal
3168< 1 && (resizeVal = 1 / resizeVal), t += resizeVal, i++ 3169 } 3170 return t / i 3171 } 3172 function R(e, t) { 3173 var i = ge.gridY - 1; 3174 return !(0 >= i || 0 == B(i)) && te[i][t + e - 1] != te[i][t + e] 3175 } 3176 function G(e) { 3177 var t = e, 3178 i = 0; 3179 if (1 == B(ge.gridY)) for (; 0 == Q(ge.gridY, t);) i++, t++; 3180 else i = ge.maxColumns; 3181 return i 3182 } 3183 function B(e) { 3184 return "undefined" != typeof te[e] 3185 } 3186 function W(e, t, i, n) { 3187 for (var r = 0; r < t.dimHeight; r++) for (var a = 0; a < t.dimWidth; a++) 0 == B(n + r) && F(n + r), Y(n + r, i + a, e) 3188 } 3189 function F(e) { 3190 te[e] = new Object; 3191 for (var t = 0; t < ge.maxColumns; t++) te[e][t] = -1 3192 } 3193 function Q(e, t) { 3194 return -1 != te[e][t] 3195 } 3196 function Y(e, t, i) { 3197 te[e][t] = i 3198 } 3199 function X(e) { 3200 if (!e) var e = !1; 3201 a(); 3202 for (var t = 0; t < ie.length; t++) U(t, e); 3203 J.height(ge.maxColHeight), o() 3204 } 3205 function U(e, t) { 3206 var i = le.getThumbByIndex(e), 3207 n = ie[e], 3208 r = n.top * (ge.colWidth + ge.currentGap), 3209 a = ge.addX + n.left * (ge.colWidth + ge.currentGap); 3210 oe.resizeTile(i, n.width, n.height, oe.resizemode.VISIBLE_ELEMENTS), se.placeElement(i, a, r), r + n.height > ge.maxColHeight && (ge.maxColHeight = r + n.height), 1 == t && i.fadeTo(0, 1) 3211 } 3212 function V() { 3213 if (1 == ce.isFirstTimeRun) return !0; 3214 if (0 == ce.isAllLoaded) return !1; 3215 switch (de.tiles_type) { 3216 case "columns": 3217 p(!1); 3218 break; 3219 case "justified": 3220 b(!1); 3221 break; 3222 case "nested": 3223 var e = ae.isMobileMode(); 3224 1 == e ? p(!1) : x(!1) 3225 } 3226 } 3227 function q() { 3228 re.on(ne.events.ALL_TILES_LOADED, function() { 3229 ce.isAllLoaded = !0 3230 }), K.on(ae.events.SIZE_CHANGE, V), K.on(ne.events.TILES_FIRST_PLACED, function() { 3231 ce.isFirstPlaced = !1 3232 }), oe.initEvents() 3233 } 3234 function Z() { 3235 switch ($.children(".ug-tile").show(), 1 == ce.isFirstTimeRun && q(), oe.run(), de.tiles_type) { 3236 default: 3237 case "columns": 3238 _(); 3239 break; 3240 case "justified": 3241 y(); 3242 break; 3243 case "nested": 3244 w() 3245 } 3246 ce.isFirstTimeRun = !1 3247 } 3248 var K, $, J, ee, te, ie, ne = this, 3249 re = jQuery(this), 3250 ae = new UniteGalleryMain, 3251 se = new UGFunctions, 3252 oe = new UGTileDesign, 3253 le = new UGThumbsGeneral, 3254 ue = {}, de = { 3255 tiles_type: "columns", 3256 tiles_col_width: 250, 3257 tiles_align: "center", 3258 tiles_exact_width: !1, 3259 tiles_space_between_cols: 3, 3260 tiles_space_between_cols_mobile: 3, 3261 tiles_include_padding: !0, 3262 tiles_min_columns: 2, 3263 tiles_max_columns: 0, 3264 tiles_keep_order: !1, 3265 tiles_set_initial_height: !0, 3266 tiles_justified_row_height: 150, 3267 tiles_justified_space_between: 3, 3268 tiles_nested_optimal_tile_width: 250, 3269 tiles_nested_col_width: null, 3270 tiles_nested_debug: !1, 3271 tiles_enable_transition: !0 3272 }; 3273 this.events = { 3274 THUMB_SIZE_CHANGE: "thumb_size_change", 3275 TILES_FIRST_PLACED: "tiles_first_placed", 3276 ALL_TILES_LOADED: "all_tiles_loaded" 3277 }; 3278 var ce = { 3279 isFirstTimeRun: !0, 3280 handle: null, 3281 isTransActive: !1, 3282 isTransInited: !1, 3283 isFirstPlaced: !0, 3284 isAllLoaded: !1 3285 }, ge = { 3286 colWidth: null, 3287 nestedOptimalCols: 5, 3288 gridY: 0, 3289 maxColumns: 0, 3290 columnsValueToEnableHeightResize: 3, 3291 resizeLeftRightToColumn: !0, 3292 currentItem: 0, 3293 currentGap: null, 3294 optimalTileWidth: null, 3295 maxGridY: 0 3296 }; 3297 this.destroy = function() { 3298 K.off(ae.events.SIZE_CHANGE), oe.destroy(), K.off(ne.events.TILES_FIRST_PLACED) 3299 }, this.init = function(t, i) { 3300 e(t, i) 3301 }, this.setHtml = function(e) { 3302 i(e) 3303 }, this.getObjTileDesign = function() { 3304 return oe 3305 }, this.run = function() { 3306 Z() 3307 }, this.runNewItems = function() { 3308 if (!J) throw new Error("Can't run new items - parent not set"); 3309 switch (oe.setHtml(J, !0), oe.run(!0), de.tiles_type) { 3310 case "columns": 3311 _(); 3312 break; 3313 default: 3314 case "justified": 3315 case "nested": 3316 throw new Error("Tiles type: " + de.tiles_type + " not support load more yet") 3317 } 3318 } 3319} 3320function UGTileDesign() { 3321 function e(e, i) { 3322 G = e, k = jQuery(e); 3323 var r = G.getObjects(); 3324 H = r.g_objWrapper, N = G.getArrItems(), F = jQuery.extend(F, Q), F = jQuery.extend(F, i), t(), W.init(e, F); 3325 var a = { 3326 allow_onresize: !1 3327 }, s = ["overlay"]; 3328 Y.funcCustomTileHtml && (s = []), W.setCustomThumbs(n, s, a); 3329 var o = W.getOptions(); 3330 F = jQuery.extend(F, o), Y.ratioByWidth = F.tile_width / F.tile_height, Y.ratioByHeight = F.tile_height / F.tile_width, F.tile_size_by == D.sizeby.GLOBAL_RATIO && Y.isTextpanelOutside && (Y.hasImageContainer = !0) 3331 } 3332 function t() { 3333 if (1 == F.tile_enable_overlay ? (F.thumb_overlay_opacity = F.tile_overlay_opacity, F.thumb_overlay_color = F.tile_overlay_color) : 0 == F.tile_enable_icons ? F.thumb_color_overlay_effect = !1 : F.thumb_overlay_opacity = 0, F.tile_as_link && (F.thumb_wrapper_as_link = !0, F.thumb_link_newpage = F.tile_link_newpage), 1 == F.tile_enable_outline && 0 == F.tile_enable_border && (F.tile_enable_outline = !1), Y.tileInnerReduce = 0, F.tile_enable_border && (Y.tileInnerReduce = 2 * F.tile_border_width, W.setThumbInnerReduce(Y.tileInnerReduce)), Y.isSaparateIcons = !B.isRgbaSupported(), 1 == F.tile_enable_textpanel) { 3334 switch (F.tile_textpanel_position) { 3335 case "top": 3336 F.tile_textpanel_align = "top"; 3337 case "bottom": 3338 Y.isTextpanelOutside = !0, F.tile_textpanel_always_on = !0, F.tile_textpanel_offset = 0; 3339 break; 3340 case "inside_top": 3341 F.tile_textpanel_align = "top"; 3342 break; 3343 case "middle": 3344 F.tile_textpanel_align = "middle", F.tile_textpanel_appear_type = "fade" 3345 } 3346 0 == F.tile_textpanel_always_on && (Y.isSaparateIcons = !0) 3347 } 3348 0 != F.tile_textpanel_offset && (F.tile_textpanel_appear_type = "fade", F.tile_textpanel_margin = F.tile_textpanel_offset), "title_and_desc" == F.tile_textpanel_source && (F.tile_textpanel_enable_description = !0, F.tile_textpanel_desc_style_as_title = !0) 3349 } 3350 function i() { 3351 var e = G.isMobileMode(); 3352 switch (Y.isTextPanelHidden = !1, 1 == e && 0 == F.tile_textpanel_always_on && (Y.isTextPanelHidden = !0), 3353 Y.isVideoplayIconAlwaysOn = F.tile_videoplay_icon_always_on, F.tile_videoplay_icon_always_on) { 3354 case "always": 3355 Y.isVideoplayIconAlwaysOn = !0; 3356 break; 3357 case "never": 3358 Y.isVideoplayIconAlwaysOn = !1; 3359 break; 3360 case "mobile_only": 3361 Y.isVideoplayIconAlwaysOn = 1 == e; 3362 break; 3363 case "desktop_only": 3364 Y.isVideoplayIconAlwaysOn = 0 == e 3365 } 3366 } 3367 function n(e, t) { 3368 if (e.addClass("ug-tile"), Y.funcCustomTileHtml) return Y.funcCustomTileHtml(e, t), !1; 3369 var i = ""; 3370 1 == Y.hasImageContainer && (i += "<div class='ug-image-container ug-trans-enabled'>"); 3371 var n = "ug-thumb-image"; 3372 (0 == F.tile_enable_image_effect || 1 == F.tile_image_effect_reverse) && (n += " ug-trans-enabled"); 3373 var r = B.stripTags(t.title); 3374 r = B.htmlentitles(r), i += '<img src="' + B.escapeDoubleSlash(t.urlThumb) + "\" alt='" + r + "' class='" + n + "'>", 1 == Y.hasImageContainer && (i += "</div>"), e.append(i), F.tile_size_by == D.sizeby.GLOBAL_RATIO && e.fadeTo(0, 0); 3375 var a = {}; 3376 if (1 == F.tile_enable_background && (a["background-color"] = F.tile_background_color), 1 == F.tile_enable_border && (a["border-width"] = F.tile_border_width + "px", a["border-style"] = "solid", a["border-color"] = F.tile_border_color, F.tile_border_radius && (a["border-radius"] = F.tile_border_radius + "px")), 1 == F.tile_enable_outline && (a.outline = "1px solid " + F.tile_outline_color), 1 == F.tile_enable_shadow) { 3377 var s = F.tile_shadow_h + "px "; 3378 s += F.tile_shadow_v + "px ", s += F.tile_shadow_blur + "px ", s += F.tile_shadow_spread + "px ", s += F.tile_shadow_color, a["box-shadow"] = s 3379 } 3380 e.css(a); 3381 var o = ""; 3382 if (F.tile_enable_icons) { 3383 if (0 == F.tile_as_link && 1 == F.tile_enable_action) { 3384 var l = "ug-button-play ug-icon-zoom"; 3385 "image" != t.type && (l = "ug-button-play ug-icon-play"), o += "<div class='ug-tile-icon " + l + "' style='display:none'></div>" 3386 } 3387 if (t.link && 1 == F.tile_show_link_icon || 1 == F.tile_as_link) if (0 == F.tile_as_link) { 3388 var u = ""; 3389 1 == F.tile_link_newpage && (u = " target='_blank'"), o += "<a href='" + t.link + "'" + u + " class='ug-tile-icon ug-icon-link'></a>" 3390 } else o += "<div class='ug-tile-icon ug-icon-link' style='display:none'></div>"; 3391 var c = Y.isSaparateIcons; 3392 if (0 == c && "image" != t.type && 1 == Y.isVideoplayIconAlwaysOn && (c = !0), c) var g = e; 3393 else var g = e.children(".ug-thumb-overlay"); 3394 g.append(o); 3395 var p = g.children("." + l); 3396 0 == p.length ? p = null : p.hide(); 3397 var h = g.children(".ug-icon-link"); 3398 0 == h.length ? h = null : h.hide(), h || 1 != F.tile_enable_action || e.addClass("ug-tile-clickable") 3399 } else 1 == F.tile_enable_action && e.addClass("ug-tile-clickable"); 3400 if (1 == F.tile_enable_image_effect) { 3401 var m = ""; 3402 0 == F.tile_image_effect_reverse && (m = " ug-trans-enabled"); 3403 var f = "<div class='ug-tile-image-overlay" + m + "' >", 3404 _ = " ug-" + F.tile_image_effect_type + "-effect"; 3405 f += '<img src="' + B.escapeDoubleSlash(t.urlThumb) + "\" alt='" + t.title + "' class='" + _ + m + "'>", f += "</div>", e.append(f), 1 == F.tile_image_effect_reverse && e.children(".ug-tile-image-overlay").fadeTo(0, 0) 3406 } 3407 if (1 == F.tile_enable_textpanel) { 3408 var v = new UGTextPanel; 3409 v.init(G, F, "tile"); 3410 var b = ""; 3411 (1 == F.tile_textpanel_always_on || 1 == Y.isTextpanelOutside) && (b = "ug-trans-enabled"), v.appendHTML(e, b); 3412 var y = t.title, 3413 w = ""; 3414 switch (F.tile_textpanel_source) { 3415 case "desc": 3416 case "description": 3417 y = t.description; 3418 break; 3419 case "desc_title": 3420 "" != t.description && (y = t.description); 3421 break; 3422 case "title_and_desc": 3423 y = t.title, w = t.description 3424 } 3425 if (v.setTextPlain(y, w), 0 == F.tile_textpanel_always_on && v.getElement().fadeTo(0, 0), e.data("objTextPanel", v), 1 == F.tile_textpanel_always_on) { 3426 var T = d(e); 3427 T.css("z-index", 2) 3428 } 3429 if (1 == Y.isTextpanelOutside) { 3430 var x = "<div class='ug-tile-cloneswrapper'></div>"; 3431 e.append(x); 3432 var S = e.children(".ug-tile-cloneswrapper"), 3433 I = new UGTextPanel; 3434 I.init(G, F, "tile"), I.appendHTML(S), I.setTextPlain(y, w), e.data("objTextPanelClone", I) 3435 } 3436 } 3437 null !== t.addHtml && e.append(t.addHtml) 3438 } 3439 function r(e) { 3440 var t = e.children(".ug-tile-image-overlay"); 3441 return t 3442 } 3443 function a(e) { 3444 var t = e.children(".ug-thumb-overlay"); 3445 return t 3446 } 3447 function s(e) { 3448 if (0 == Y.hasImageContainer) return null; 3449 var t = e.children(".ug-image-container"); 3450 return t 3451 } 3452 function o(e) { 3453 var t = e.find(".ug-tile-image-overlay img"); 3454 return t 3455 } 3456 function l(e) { 3457 var t = e.data("objTextPanel"); 3458 return t 3459 } 3460 function u(e) { 3461 var t = e.data("objTextPanelClone"); 3462 return t 3463 } 3464 function d(e) { 3465 var t = e.children(".ug-textpanel"); 3466 return t 3467 } 3468 function c(e) { 3469 var t = e.find(".ug-tile-cloneswrapper .ug-textpanel"); 3470 if (0 == t.length) throw new Error("text panel cloned element not found"); 3471 return t 3472 } 3473 function g(e) { 3474 if (1 == Y.isTextpanelOutside) var t = c(e); 3475 else var t = d(e); 3476 if (!t) return 0; 3477 var i = B.getElementSize(t); 3478 return i.height 3479 } 3480 function p(e) { 3481 var t = e.find(".ug-icon-link"); 3482 return 0 == t.length ? null : t 3483 } 3484 function h(e) { 3485 var t = Y.ratioByHeight; 3486 switch (F.tile_size_by) { 3487 default: t = Y.ratioByHeight; 3488 break; 3489 case D.sizeby.IMAGE_RATIO: 3490 if (!e) throw new Error("tile should be given for tile ratio"); 3491 var i = D.getItemByTile(e); 3492 if ("undefined" != typeof i.thumbRatioByHeight) { 3493 if (0 == i.thumbRatioByHeight) throw trace(i), new Error("the item ratio not inited yet"); 3494 t = i.thumbRatioByHeight 3495 } 3496 break; 3497 case D.sizeby.CUSTOM: 3498 return null 3499 } 3500 return t 3501 } 3502 function m(e) { 3503 var t = e.find(".ug-button-play"); 3504 return 0 == t.length ? null : t 3505 } 3506 function f(e) { 3507 return !!e.hasClass("ug-thumb-over") 3508 } 3509 function _(e) { 3510 return e.hasClass("ug-tile-clickable") 3511 } 3512 function v(e) { 3513 return 1 == F.tile_enable_icons && 1 == Y.isVideoplayIconAlwaysOn && "image" != e.type 3514 } 3515 function b(e, t, i, n) { 3516 var a = r(e), 3517 l = D.getTileImage(e), 3518 u = o(e); 3519 t -= Y.tileInnerReduce, i -= Y.tileInnerReduce; 3520 var d = null; 3521 if (1 == Y.isTextpanelOutside) { 3522 var c = g(e); 3523 if (i -= c, "top" == F.tile_textpanel_position && (d = c), 1 == Y.hasImageContainer) { 3524 var p = s(e); 3525 B.setElementSize(p, t, i), null !== d && B.placeElement(p, 0, d) 3526 } 3527 } 3528 if (0 == F.tile_enable_image_effect) B.scaleImageCoverParent(l, t, i), 0 == Y.hasImageContainer && null !== d && B.placeElement(l, 0, d); 3529 else { 3530 var h = "nothing"; 3531 n === !0 && 0 == Y.isTextpanelOutside && (h = 1 == F.tile_image_effect_reverse ? "effect" : "image"), "effect" != h && (B.setElementSize(a, t, i), null !== d && B.placeElement(a, 0, d), B.scaleImageCoverParent(u, t, i)), "image" != h && (1 == Y.hasImageContainer ? B.scaleImageCoverParent(l, t, i) : "effect" == h ? (B.scaleImageCoverParent(l, t, i), null !== d && B.placeElement(l, 0, d)) : B.cloneElementSizeAndPos(u, l, !1, null, d)) 3532 } 3533 } 3534 function y(e, t, i, n) { 3535 var r = null; 3536 if (i && (r = i - Y.tileInnerReduce), n && (n -= Y.tileInnerReduce), "clone" == t) { 3537 var a = u(e); 3538 a.refresh(!0, !0, r); 3539 var s = D.getItemByTile(e); 3540 return s.textPanelCloneSizeSet = !0, !1 3541 } 3542 var o = l(e); 3543 if (!o) return !1; 3544 var d = null; 3545 1 == Y.isTextpanelOutside && (d = g(e)), o.refresh(!1
3545, !0, r, d); 3546 var c = 1 == F.tile_textpanel_always_on || "fade" == F.tile_textpanel_appear_type; 3547 if (c) if (1 == Y.isTextpanelOutside && n && "bottom" == F.tile_textpanel_position) { 3548 var p = n - d; 3549 o.positionPanel(p) 3550 } else o.positionPanel() 3551 } 3552 function w(e) { 3553 var t = (D.getItemByTile(e), m(e)), 3554 i = p(e), 3555 n = B.getElementSize(e); 3556 b(e, n.width, n.height), 1 == F.tile_enable_textpanel && y(e, "regular", n.width, n.height); 3557 var r = n.width - Y.tileInnerReduce, 3558 s = n.height - Y.tileInnerReduce, 3559 o = 0; 3560 if (1 == Y.isTextpanelOutside) { 3561 var l = g(e); 3562 s -= l, "top" == F.tile_textpanel_position && (o = l) 3563 } 3564 var u = a(e); 3565 if (B.setElementSizeAndPosition(u, 0, o, r, s), t || i) { 3566 var c = 0; 3567 if (1 == F.tile_enable_textpanel && 0 == Y.isTextPanelHidden && 0 == Y.isTextpanelOutside) { 3568 var h = d(e), 3569 f = B.getElementSize(h); 3570 f.height > 0 && (c = Math.floor(f.height / 2 * -1)) 3571 } 3572 } 3573 if (t && i) { 3574 var _ = B.getElementSize(t), 3575 v = B.getElementSize(i), 3576 w = F.tile_space_between_icons, 3577 T = _.width + w + v.width, 3578 x = Math.floor((n.width - T) / 2); 3579 w > x && (w = Math.floor((n.width - _.width - v.width) / 3), T = _.width + w + v.width, x = Math.floor((n.width - T) / 2)), B.placeElement(t, x, "middle", 0, c), B.placeElement(i, x + _.width + w, "middle", 0, c) 3580 } else t && B.placeElement(t, "center", "middle", 0, c), i && B.placeElement(i, "center", "middle", 0, c); 3581 t && t.show(), i && i.show() 3582 } 3583 function T(e, t) { 3584 var i = (D.getItemByTile(e), r(e)), 3585 n = F.thumb_transition_duration; 3586 if (0 == F.tile_image_effect_reverse) { 3587 var a = D.getTileImage(e); 3588 t ? (a.fadeTo(0, 1), i.stop(!0).fadeTo(n, 0)) : i.stop(!0).fadeTo(n, 1) 3589 } else t ? i.stop(!0).fadeTo(n, 1) : i.stop(!0).fadeTo(n, 0) 3590 } 3591 function x(e, t) { 3592 var i = F.thumb_transition_duration, 3593 n = d(e); 3594 if (!n) return !0; 3595 if ("slide" == F.tile_textpanel_appear_type) { 3596 var r = B.getElementSize(n); 3597 if (0 == r.width) return !1; 3598 var a = -r.height, 3599 s = 0, 3600 o = {}, l = {}, u = "bottom"; 3601 "inside_top" == F.tile_textpanel_position && (u = "top"), o[u] = a + "px", l[u] = s + "px", 1 == t ? (n.fadeTo(0, 1), 0 == n.is(":animated") && n.css(o), l.opacity = 1, n.stop(!0).animate(l, i)) : n.stop(!0).animate(o, i) 3602 } else 1 == t ? n.stop(!0).fadeTo(i, 1) : n.stop(!0).fadeTo(i, 0) 3603 } 3604 function S(e, t, i) { 3605 var n = F.thumb_transition_duration; 3606 i && i === !0 && (n = 0); 3607 var r = m(e), 3608 a = p(e), 3609 s = t ? 1 : 0; 3610 r && r.stop(!0).fadeTo(n, s), a && a.stop(!0).fadeTo(n, s) 3611 } 3612 function I(e, t) { 3613 if (t = jQuery(t), F.tile_enable_image_effect && T(t, !0), 1 == F.tile_enable_textpanel && 0 == F.tile_textpanel_always_on && 0 == Y.isTextPanelHidden && x(t, !0), Y.isSaparateIcons && 1 == F.tile_enable_icons) { 3614 var i = 1 == F.thumb_overlay_reverse, 3615 n = D.getItemByTile(t); 3616 0 == v(n) && S(t, i, !1) 3617 } 3618 } 3619 function E(e, t) { 3620 if (t = jQuery(t), F.tile_enable_image_effect && T(t, !1), 1 == F.tile_enable_textpanel && 0 == F.tile_textpanel_always_on && x(t, !1), 1 == Y.isSaparateIcons && 1 == F.tile_enable_icons) { 3621 var i = 1 != F.thumb_overlay_reverse, 3622 n = D.getItemByTile(t); 3623 0 == v(n) ? S(t, i, !1) : S(t, !0, !0) 3624 } 3625 } 3626 function P(e) { 3627 var t = W.getThumbs().not(e); 3628 t.each(function(e, t) { 3629 W.setThumbNormalStyle(jQuery(t)) 3630 }) 3631 } 3632 function C(e, t, i) { 3633 return t = jQuery(t), 1 == F.tile_visible_before_image && t.data("image_placed") !== !0 && i !== !0 || (w(t), void W.setThumbNormalStyle(t)) 3634 } 3635 function j(e, t, i) { 3636 w(t), i.fadeTo(0, 1), t.data("image_placed", !0) 3637 } 3638 function A(e) { 3639 return 1 == _(e) ? (R.trigger(D.events.TILE_CLICK, e), !0) : void(0 == f(e) && (P(e), W.setThumbOverStyle(e))) 3640 } 3641 function M(e) { 3642 var t = jQuery(this), 3643 i = t.prop("tagName").toLowerCase(), 3644 n = !0; 3645 if (Y.funcParentApproveClick && 0 == Y.funcParentApproveClick() && (n = !1), "a" == i) 0 == n && e.preventDefault(); 3646 else if (0 == f(t)) 1 == n && A(t); 3647 else { 3648 if (0 == _(t)) return !0; 3649 1 == n && R.trigger(D.events.TILE_CLICK, t) 3650 } 3651 } 3652 function z(e) { 3653 e.stopPropagation(); 3654 var t = jQuery(this).parents(".ug-tile"), 3655 i = !0; 3656 return Y.funcParentApproveClick && 0 == Y.funcParentApproveClick() && (i = !1), 0 == f(t) ? (A(t), !0) : 1 == i ? (R.trigger(D.events.TILE_CLICK, t), !1) : void 0 3657 } 3658 function O(e) { 3659 var t = jQuery(this).parents(".ug-tile"); 3660 Y.funcParentApproveClick && 0 == Y.funcParentApproveClick() && e.preventDefault(), 0 == f(t) && 0 == F.tile_as_link && (e.preventDefault(), A(t)) 3661 } 3662 var k, L, H, N, D = this, 3663 R = jQuery(this), 3664 G = new UniteGalleryMain, 3665 B = new UGFunctions, 3666 W = new UGThumbsGeneral; 3667 this.resizemode = { 3668 FULL: "full", 3669 WRAPPER_ONLY: "wrapper_only", 3670 VISIBLE_ELEMENTS: "visible_elements" 3671 }, this.sizeby = { 3672 GLOBAL_RATIO: "global_ratio", 3673 TILE_RATIO: "tile_ratio", 3674 IMAGE_RATIO: "image_ratio", 3675 CUSTOM: "custom" 3676 }, this.events = { 3677 TILE_CLICK: "tile_click" 3678 }; 3679 var F = { 3680 tile_width: 250, 3681 tile_height: 200, 3682 tile_size_by: D.sizeby.IMAGE_RATIO, 3683 tile_visible_before_image: !1, 3684 tile_enable_background: !0, 3685 tile_background_color: "#F0F0F0", 3686 tile_enable_border: !1, 3687 tile_border_width: 3, 3688 tile_border_color: "#F0F0F0", 3689 tile_border_radius: 0, 3690 tile_enable_outline: !1, 3691 tile_outline_color: "#8B8B8B", 3692 tile_enable_shadow: !1, 3693 tile_shadow_h: 1, 3694 tile_shadow_v: 1, 3695 tile_shadow_blur: 3, 3696 tile_shadow_spread: 2, 3697 tile_shadow_color: "#8B8B8B", 3698 tile_enable_action: !0, 3699 tile_as_link: !1, 3700 tile_link_newpage: !0, 3701 tile_enable_overlay: !0, 3702 tile_overlay_opacity: .4, 3703 tile_overlay_color: "#000000", 3704 tile_enable_icons: !0, 3705 tile_show_link_icon: !1, 3706 tile_videoplay_icon_always_on: "never", 3707 tile_space_between_icons: 26, 3708 tile_enable_image_effect: !1, 3709 tile_image_effect_type: "bw", 3710 tile_image_effect_reverse: !1, 3711 tile_enable_textpanel: !1, 3712 tile_textpanel_source: "title", 3713 tile_textpanel_always_on: !1, 3714 tile_textpanel_appear_type: "slide", 3715 tile_textpanel_position: "inside_bottom", 3716 tile_textpanel_offset: 0 3717 }, Q = { 3718 thumb_color_overlay_effect: !0, 3719 thumb_overlay_reverse: !0, 3720 thumb_image_overlay_effect: !1, 3721 tile_textpanel_enable_description: !1, 3722 tile_textpanel_bg_opacity: .6, 3723 tile_textpanel_padding_top: 8, 3724 tile_textpanel_padding_bottom: 8 3725 }, Y = { 3726 ratioByHeight: 0, 3727 ratioByWidth: 0, 3728 eventSizeChange: "thumb_size_change", 3729 funcCustomTileHtml: null, 3730 funcCustomPositionElements: null, 3731 funcParentApproveClick: null, 3732 isSaparateIcons: !1, 3733 tileInnerReduce: 0, 3734 isTextpanelOutside: !1, 3735 hasImageContainer: !1, 3736 isVideoplayIconAlwaysOn: !1, 3737 isTextPanelHidden: !1 3738 }; 3739 this.loadTileImage = function(e) { 3740 var t = D.getTileImage(e); 3741 B.checkImagesLoaded(t, null, function(t, i) { 3742 j(null, e, jQuery(t)) 3743 }) 3744 }, this.setHtml = function(e, t) { 3745 L = e, t !== !0 && i(), W.setHtmlThumbs(e, t) 3746 }, this.initEvents = function() { 3747 W.initEvents(), jQuery(W).on(W.events.SETOVERSTYLE, I), jQuery(W).on(W.events.SETNORMALSTYLE, E), jQuery(W).on(W.events.PLACEIMAGE, j), H.on(Y.eventSizeChange, C), L.on("click", ".ug-tile", M), L.on("click", ".ug-tile .ug-button-play", z), L.on("click", ".ug-tile .ug-icon-link", O) 3748 }, this.destroy = function() {
3749 if (L.off("click", ".ug-tile"), L.off("click", ".ug-tile .ug-button-play"), L.off("click", ".ug-tile .ug-icon-link"), jQuery(W).off(W.events.SETOVERSTYLE), jQuery(W).off(W.events.SETNORMALSTYLE), jQuery(W).off(W.events.PLACEIMAGE), H.off(Y.eventSizeChange), 1 == F.tile_enable_textpanel) { 3750 var e = W.getThumbs(); 3751 jQuery.each(e, function(e, t) { 3752 var i = l(jQuery(t)); 3753 i && i.destroy() 3754 }) 3755 } 3756 W.destroy() 3757 }, this.init = function(t, i, n) { 3758 e(t, i, n) 3759 }, this.setFixedMode = function() { 3760 F.tile_size_by = D.sizeby.GLOBAL_RATIO, F.tile_visible_before_image = !0 3761 }, this.setApproveClickFunction = function(e) { 3762 Y.funcParentApproveClick = e 3763 }, this.resizeTile = function(e, t, i, n) { 3764 if (1 == Y.isTextpanelOutside && y(e, "clone", t), t) { 3765 if (!i) var i = D.getTileHeightByWidth(t, e) 3766 } else var t = F.tile_width, 3767 i = F.tile_height; 3768 switch (B.setElementSize(e, t, i), n) { 3769 default: 3770 case D.resizemode.FULL: 3771 D.triggerSizeChangeEvent(e, !0); 3772 break; 3773 case D.resizemode.WRAPPER_ONLY: 3774 return !0; 3775 case D.resizemode.VISIBLE_ELEMENTS: 3776 if (Y.funcCustomTileHtml) return D.triggerSizeChangeEvent(e, !0), !0; 3777 b(e, t, i, !0), 1 == F.tile_enable_textpanel && 1 == F.tile_textpanel_always_on && t && y(e, "regular", t, i) 3778 } 3779 }, this.resizeAllTiles = function(e, t, n) { 3780 i(); 3781 var r = null; 3782 if (F.tile_size_by == D.sizeby.GLOBAL_RATIO && (r = D.getTileHeightByWidth(e)), !n) var n = W.getThumbs(); 3783 n.each(function(i, n) { 3784 D.resizeTile(jQuery(n), e, r, t) 3785 }) 3786 }, this.triggerSizeChangeEvent = function(e, t) { 3787 if (!e) return !1; 3788 if (!t) var t = !1; 3789 H.trigger(Y.eventSizeChange, [e, t]) 3790 }, this.triggerSizeChangeEventAllTiles = function(e) { 3791 var t = W.getThumbs(); 3792 t.each(function() { 3793 var t = jQuery(this); 3794 D.triggerSizeChangeEvent(t, e) 3795 }) 3796 }, this.disableEvents = function() { 3797 var e = W.getThumbs(); 3798 e.css("pointer-events", "none") 3799 }, this.enableEvents = function() { 3800 var e = W.getThumbs(); 3801 e.css("pointer-events", "auto") 3802 }, this.setOptions = function(e) { 3803 F = jQuery.extend(F, e), W.setOptions(e) 3804 }, this.setTileSizeOptions = function(e) { 3805 if (F.tile_size_by !== D.sizeby.GLOBAL_RATIO) throw new Error("setNewTileOptions works with global ration only"); 3806 F.tile_width = e, F.tile_height = Math.floor(e * Y.ratioByHeight) 3807 }, this.setCustomFunctions = function(e, t) { 3808 Y.funcCustomTileHtml = e, Y.funcCustomPositionElements = t 3809 }, this.run = function(e) { 3810 var t = W.type.GET_THUMBS_ALL; 3811 e === !0 && (t = W.type.GET_THUMBS_NEW); 3812 var i = W.getThumbs(t); 3813 F.tile_size_by == D.sizeby.GLOBAL_RATIO && D.resizeAllTiles(F.tile_width, D.resizemode.WRAPPER_ONLY, i), 1 == F.tile_enable_image_effect && 0 == F.tile_image_effect_reverse && i.children(".ug-thumb-image").fadeTo(0, 0), W.setHtmlProperties(i), 1 == F.tile_visible_before_image && (i.children(".ug-thumb-image").fadeTo(0, 0), W.loadThumbsImages()) 3814 }, this._____________EXTERNAL_GETTERS____________ = function() {}, this.getObjThumbs = function() { 3815 return W 3816 }, this.getOptions = function() { 3817 return F 3818 }, this.getTileImage = function(e) { 3819 var t = e.find("img.ug-thumb-image"); 3820 return t 3821 }, this.getItemByTile = function(e) { 3822 return W.getItemByThumb(e) 3823 }, this.getTileHeightByWidth = function(e, t) { 3824 var i = h(t); 3825 if (null === i) return null; 3826 var n = Math.floor((e - Y.tileInnerReduce) * i) + Y.tileInnerReduce; 3827 return t && 1 == Y.isTextpanelOutside && F.tile_size_by == D.sizeby.IMAGE_RATIO && (n += g(t)), n 3828 }, this.getTileImageSize = function(e) { 3829 var t = D.getItemByTile(e); 3830 if (!t.thumbWidth || !t.thumbHeight) throw new Error("Can't get image size - image not inited."); 3831 var i = { 3832 width: t.thumbWidth, 3833 height: t.thumbHeight 3834 }; 3835 return i 3836 }, this.getGlobalTileSize = function() { 3837 if (F.tile_size_by != D.sizeby.GLOBAL_RATIO) throw new Error("The size has to be global ratio"); 3838 var e = { 3839 width: F.tile_width, 3840 height: F.tile_height 3841 }; 3842 return e 3843 } 3844} 3845function UGAviaControl() { 3846 function e(e) { 3847 return 0 == m ? e.pageX : e.pageY 3848 } 3849 function t(t) { 3850 jQuery("body").on("touchstart", function(e) { 3851 return 0 == f.isControlEnabled || void(f.touchEnabled = !0) 3852 }), jQuery("body").mousemove(function(t) { 3853 if (0 == f.isControlEnabled) return !0; 3854 if (1 == f.touchEnabled) return jQuery("body").off("mousemove"), !0; 3855 f.isMouseInsideStrip = g.ismouseover(); 3856 var i = u.isTouchMotionActive(); 3857 if (1 == f.isMouseInsideStrip && 0 == i) { 3858 var n = e(t); 3859 l(n) 3860 } else s() 3861 }) 3862 } 3863 function i(e) { 3864 var t = h.strip_padding_top, 3865 i = (h.strip_padding_bottom, g.height()), 3866 n = p.height(); 3867 if (i > n) return null; 3868 var r = g.offset(), 3869 a = r.top, 3870 s = e - a - t; 3871 if (0 > s) return null; 3872 var o = h.thumb_height, 3873 l = i - h.thumb_height, 3874 u = l - o; 3875 o > s && (s = o), s > l && (s = l); 3876 var d = (s - o) / u, 3877 c = (n - i) * d; 3878 return c = -1 * Math.round(c) + t 3879 } 3880 function n(e) { 3881 var t = h.strip_padding_left, 3882 i = h.strip_padding_right, 3883 n = g.width() - t - i, 3884 r = p.width(); 3885 if (n > r) return null; 3886 var a = g.offset(), 3887 s = a.left, 3888 o = e - s - t, 3889 l = h.thumb_width, 3890 u = n - h.thumb_width, 3891 d = u - l; 3892 l > o && (o = l), o > u && (o = u); 3893 var c = (o - l) / d, 3894 m = (r - n) * c; 3895 return m = -1 * Math.round(m) + t 3896 } 3897 function r() { 3898 if (0 == f.is_strip_moving) return !1; 3899 var e = u.getInnerStripPos(); 3900 Math.floor(e) == Math.floor(f.strip_finalPos) && s(); 3901 var t, i = Math.abs(f.strip_finalPos - e); 3902 1 > i ? t = i : (t = i / 4, t > 0 && 1 > t && (t = 1)), f.strip_finalPos < e && (t *= -1); 3903 var n = e + t; 3904 u.positionInnerStrip(n) 3905 } 3906 function a() { 3907 return 1 != f.isStripMoving && (f.isStripMoving = !0, void(f.handle_timeout = setInterval(r, 10))) 3908 } 3909 function s() { 3910 return 0 != f.isStripMoving && (f.isStripMoving = !1, void(f.handle_timeout = clearInterval(f.handle_timeout))) 3911 } 3912 function o(e) { 3913 return 0 == m ? n(e) : i(e) 3914 } 3915 function l(e) { 3916 var t = o(e); 3917 return null !== t && (f.is_strip_moving = !0, f.strip_finalPos = t, void a()) 3918 } 3919 var u, d, c, g, p, h, m, f = { 3920 touchEnabled: !1, 3921 isMouseInsideStrip: !1,
3922 strip_finalPos: 0, 3923 handle_timeout: "", 3924 isStripMoving: !1, 3925 isControlEnabled: !0 3926 }; 3927 this.enable = function() { 3928 f.isControlEnabled = !0 3929 }, this.disable = function() { 3930 f.isControlEnabled = !1 3931 }, this.init = function(e) { 3932 u = e, c = e.getObjects(), d = c.g_gallery, g = c.g_objStrip, p = c.g_objStripInner, h = c.g_options, m = c.isVertical, t() 3933 }, this.destroy = function() { 3934 jQuery("body").off("touchstart"), jQuery("body").off("mousemove") 3935 } 3936} 3937function UGSlider() { 3938 function e(e, t, n) { 3939 _e = e, n && (he = n, t = Te.convertCustomPrefixOptions(t, he, "slider")), te = jQuery(e); 3940 var r = _e.getObjects(); 3941 if (ie = r.g_objWrapper, ne = r.g_objThumbs, t.hasOwnProperty("slider_progress_indicator_type") && (Ie.slider_progress_indicator_type = t.slider_progress_indicator_type), "bar" == Ie.slider_progress_indicator_type && (Ie = jQuery.extend(Ie, Ee)), t && me.setOptions(t), i(), 1 == Ie.slider_enable_bullets) { 3942 ye = new UGBullets; 3943 var a = { 3944 bullets_skin: Ie.slider_bullets_skin, 3945 bullets_space_between: Ie.slider_bullets_space_between 3946 }; 3947 ye.init(_e, a) 3948 } 3949 Ie.slider_enable_text_panel && (Se = new UGTextPanel, Se.init(_e, Ie, "slider")), Ie.slider_enable_zoom_panel && (pe = new UGZoomButtonsPanel, pe.init(me, Ie)); 3950 var s = _e.getGalleryID(); 3951 we.init(Ie, !1, s) 3952 } 3953 function t() { 3954 if (1 == Pe.isRunOnce) return !1; 3955 if (Pe.isRunOnce = !0, Ie.slider_background_color) { 3956 var e = Ie.slider_background_color; 3957 1 != Ie.slider_background_opacity && (e = Te.convertHexToRGB(e, Ie.slider_background_opacity)), re.css("background-color", e) 3958 } else 1 != Ie.slider_background_opacity && (e = Te.convertHexToRGB("#000000", Ie.slider_background_opacity), re.css("background-color", e)); 3959 1 == Ie.slider_control_swipe && (ce = new UGTouchSliderControl, ce.init(me, Ie)), 1 == Ie.slider_control_zoom && (ge = new UGZoomSliderControl, ge.init(me, Ie)), Se && Se.run(), V() 3960 } 3961 function i() { 3962 var e = _e.getOptions(), 3963 t = e.gallery_skin; 3964 "" == Ie.slider_bullets_skin && (Ie.slider_bullets_skin = t), "" == Ie.slider_arrows_skin && (Ie.slider_arrows_skin = t), "" == Ie.slider_zoompanel_skin && (Ie.slider_zoompanel_skin = t), "" == Ie.slider_play_button_skin && (Ie.slider_play_button_skin = t), "" == Ie.slider_fullscreen_button_skin && (Ie.slider_fullscreen_button_skin = t), Ie.video_enable_closebutton = Ie.slider_video_enable_closebutton, "zoom" != e.gallery_mousewheel_role && (Ie.slider_zoom_mousewheel = !1) 3965 } 3966 function n(e, t) { 3967 var i = "ug-type-square"; 3968 "round" == Ie.slider_videoplay_button_type && (i = "ug-type-round"); 3969 var n = ""; 3970 return n += "<div class='ug-slide-wrapper ug-slide" + t + "'>", n += "<div class='ug-item-wrapper'></div>", n += "<div class='ug-slider-preloader " + e + "'></div>", n += "<div class='ug-button-videoplay " + i + "' style='display:none'></div>", n += "</div>" 3971 } 3972 function r(e) { 3973 e && (ie = e); 3974 var t = q(), 3975 i = (_e.getOptions(), "<div class='ug-slider-wrapper'>"); 3976 if (i += "<div class='ug-slider-inner'>", i += n(t, 1), i += n(t, 2), i += n(t, 3), i += "</div>", 1 == Ie.slider_enable_arrows && (i += "<div class='ug-slider-control ug-arrow-left ug-skin-" + Ie.slider_arrows_skin + "'></div>", i += "<div class='ug-slider-control ug-arrow-right ug-skin-" + Ie.slider_arrows_skin + "'></div>"), 1 == Ie.slider_enable_play_button && (i += "<div class='ug-slider-control ug-button-play ug-skin-" + Ie.slider_play_button_skin + "'></div>"), 1 == Ie.slider_enable_fullscreen_button && (i += "<div class='ug-slider-control ug-button-fullscreen ug-skin-" + Ie.slider_fullscreen_button_skin + "'></div>"), i += "</div>", ie.append(i), re = ie.children(".ug-slider-wrapper"), ae = re.children(".ug-slider-inner"), se = ae.children(".ug-slide1"), oe = ae.children(".ug-slide2"), le = ae.children(".ug-slide3"), se.data("slidenum", 1), oe.data("slidenum", 2), le.data("slidenum", 3), ye && ye.appendHTML(re), 1 == Ie.slider_enable_arrows && (ue = re.children(".ug-arrow-left"), de = re.children(".ug-arrow-right")), 1 == Ie.slider_enable_play_button && (ve = re.children(".ug-button-play")), 1 == Ie.slider_enable_fullscreen_button && (be = re.children(".ug-button-fullscreen")), 1 == Ie.slider_enable_progress_indicator) { 3977 xe = Te.initProgressIndicator(Ie.slider_progress_indicator_type, Ie, re); 3978 var r = xe.getType(); 3979 "bar" == r && "pie" == Ie.slider_progress_indicator_type && (Ie.slider_progress_indicator_type = "bar", Ie = jQuery.extend(Ie, Ee)), _e.setProgressIndicator(xe) 3980 } 3981 if (1 == Ie.slider_enable_text_panel && (Se.appendHTML(re), 0 == Ie.slider_textpanel_always_on)) { 3982 var a = Se.getElement(); 3983 a.hide().data("isHidden", !0), Pe.isTextPanelSaparateHover = !0 3984 } 3985 1 == Ie.slider_enable_zoom_panel && pe.appendHTML(re), we.setHtml(ae) 3986 } 3987 function a(e) { 3988 var t = $(e); 3989 Te.placeElementInParentCenter(t); 3990 var i = J(e); 3991 Te.placeElementInParentCenter(i) 3992 } 3993 function s() { 3994 if (ye && (objBullets = ye.getElement(), Te.placeElement(objBullets, Ie.slider_bullets_align_hor, Ie.slider_bullets_align_vert, Ie.slider_bullets_offset_hor, Ie.slider_bullets_offset_vert), Te.placeElement(objBullets, Ie.slider_bullets_align_hor, Ie.slider_bullets_align_vert, Ie.slider_bullets_offset_hor, Ie.slider_bullets_offset_vert)), 1 == Ie.slider_enable_arrows && (Te.placeElement(ue, Ie.slider_arrow_left_align_hor, Ie.slider_arrow_left_align_vert, Ie.slider_arrow_left_offset_hor, Ie.slider_arrow_left_offset_vert), Te.placeElement(de, Ie.slider_arrow_right_align_hor, Ie.slider_arrow_left_align_vert, Ie.slider_arrow_right_offset_hor, Ie.slider_arrow_right_offset_vert)), 0 == Ie.slider_controls_always_on && M(!0), xe) { 3995 var e = xe.getElement(); 3996 if ("bar" == Ie.slider_progress_indicator_type) { 3997 var t = re.width(); 3998 xe.setSize(t), Te.placeElement(e, "left", Ie.slider_progress_indicator_align_vert, 0, Ie.slider_progress_indicator_offset_vert) 3999 } else Te.placeElement(e, Ie.slider_progress_indicator_align_hor, Ie.slider_progress_indicator_align_vert, Ie.slider_progress_indicator_offset_hor, Ie.slider_progress_indicator_offset_vert) 4000 } 4001 Se && Se.positionPanel(), o(), a(se), a(oe), a(le), j() 4002 } 4003 function o() { 4004 if (ve && Te.placeElement(ve, Ie.slider_play_button_align_hor, Ie.slider_play_button_align_vert, Ie.slider_play_button_offset_hor, Ie.slider_play_button_offset_vert), be && Te.placeElement(be, Ie.slider_fullscreen_button_align_hor, Ie.slider_fullscreen_button_align_vert, Ie.slider_fullscreen_button_offset_hor, Ie.slider_fullscreen_button_offset_vert), pe) { 4005 var e = pe.getElement(); 4006 Te.placeElement(e, Ie.slider_zoompanel_align_hor, Ie.slider_zoompanel_align_vert, Ie.slider_zoompanel_offset_hor, Ie.slider_zoompanel_offset_vert) 4007 } 4008 } 4009 function l() { 4010 var e, t, i, n, r = me.getSlidesReference(), 4011 a = 0, 4012 s = 0, 4013 o = 0; 4014 i = me.isSlideHasItem(r.objNextSlide), n = me.isSlideHasItem(r.objPrevSlide), n ? (o = r.objPrevSlide.outerWidth(), r.objPrevSlide.css("z-index", 1)) : r.objPrevSlide.hide(), t = o + r.objCurrentSlide.outerWidth(), e = t, i ? (e = t + r.objNextSlide.outerWidth(), r.objPrevSlide.css("z-index", 2)) : r.objNextSlide.hide(), r.objCurrentSlide.css("z-index", 3), Te.placeElement(r.objCurrentSlide, o, a), ae.css({ 4015 left: -o + "px", 4016 width: e + "px" 4017 }), n && (Te.placeElement(r.objPrevSlide, s, a), Te.showElement(r.objPrevSlide)), i && (Te.showElement(r.objNextSlide), Te.placeElement(r.objNextSlide, t, a)) 4018 } 4019 function u(e) { 4020 var t = e.data("index"); 4021 if (void 0 === t || null == t) return !1; 4022 var i = _e.getItem(t); 4023 return !!i && void f(e, i) 4024 } 4025 function d(e) { 4026 e.stop(!0).show(100) 4027 } 4028 function c(e) { 4029 e.stop(!0).hide(100) 4030 } 4031 function g(e, t) { 4032 var i = Ie.slider_image_border_width; 4033 if (10 >= i) return i; 4034 var n = Te.getElementSize(e), 4035 r = n.width, 4036 a = n.height; 4037 if (t && (t.hasOwnProperty("imageWidth") && (r = t.imageWidth), t.hasOwnProperty("imageHeight") && (a = t.imageHeight)), 0 >= r) return i; 4038 var s = a > r ? r : a, 4039 o = 2 * i, 4040 l = o / s; 4041 if (l < Ie.slider_image_border_maxratio) return i; 4042 var i = s * Ie.slider_image_border_maxratio / 2; 4043 return i = Math.round(i) 4044 } 4045 function p(e, t, i) { 4046 var n = {}; 4047 if (1 == Ie.slider_image_border) { 4048 n["border-style"] = "solid"; 4049 var r = g(e, i); 4050 n["border-width"] = r + "px", n["border-color"] = Ie.slider_image_border_color, n["border-radius"] = Ie.slider_image_border_radius 4051 } 4052 "image" != t && 1 == Ie.slider_video_constantsize && (n["background-color"] = "#000000"), 1 == Ie.slider_image_shadow && (n["box-shadow"] = "3px 3px 10px 0px #353535"), e.css(n) 4053 } 4054 function h(e, t) { 4055 var i = Ie.slider_video_constantsize_width, 4056 n = Ie.slider_video_constantsize_height, 4057 r = Ie.slider_video_constantsize_scalemode, 4058 a = Te.scaleImageExactSizeInParent(e, t.imageWidth, t.imageHeight, i, n, r); 4059 return a 4060 } 4061 function m(e, t, i) { 4062 var n = e.children(".ug-item-wrapper"), 4063 r = $(e); 4064 if ("undefined" == typeof t.urlImage || "" == t.urlImage) throw new Error("The slide don't have big image defined ( data-image='imageurl' ). Please check gallery items.", "showbig"); 4065 var a = t.urlImage, 4066 s = e.data("urlImage"); 4067 e.data("urlImage", a); 4068 var o = me.getScaleMode(e), 4069 l = me.getSlideType(e); 4070 if (objPadding = me.getObjImagePadding(), s == a && i !== !0) { 4071 var u = n.children("img"); 4072 (0 == t.imageWidth || 0 == t.imageHeight) && _e.checkFillImageSize(u, t); 4073 var g = {}; 4074 g = "image" != l && 1 == Ie.slider_video_constantsize ? h(u, t) : Te.scaleImageFitParent(u, t.imageWidth, t.imageHeight, o, objPadding), p(u, l, g), fe.trigger(me.events.AFTER_PUT_IMAGE, e) 4075 } else if (u = Te.placeImageInsideParent(a, n, t.imageWidth, t.imageHeight, o, objPadding), 1 == t.isBigImageLoaded) { 4076 if (u.fadeTo(0, 1), c(r), "image" != l && 1 == Ie.slider_video_constantsize) var g = h(u, t); 4077 else var g = Te.getImageInsideParentData(n, t.imageWidth, t.imageHeight, o, objPadding); 4078 u.css("width", g.imageWidth + "px"), p(u, l, g), fe.trigger(me.events.AFTER_PUT_IMAGE, e) 4079 } else u.fadeTo(0, 0), d(r), e.data("isLoading", !0), me.isSlideCurrent(e) && fe.trigger(me.events.CURRENTSLIDE_LOAD_START), u.data("itemIndex", t.index), u.on("load", function() { 4080 var e = jQuery(this), 4081 t = e.data("itemIndex"); 4082 e.fadeTo(0, 1); 4083 var i = e.parent().parent(), 4084 n = me.getSlideType(i), 4085 r = $(i), 4086 a = me.getObjImagePadding(), 4087 s = me.getScaleMode(i); 4088 c(r), i.data("isLoading", !1), me.isSlideCurrent(i) && fe.trigger(me.events.CURRENTSLIDE_LOAD_END), _e.onItemBigImageLoaded(null, e); 4089 var o = _e.getItem(t), 4090 l = {}; 4091 "image" != n && 1 == Ie.slider_video_constantsize ? h(e, o) : l = Te.scaleImageFitParent(e, o.imageWidth, o.imageHeight, s, a), e.fadeTo(0, 1), p(e, n, l), fe.trigger(me.events.AFTER_PUT_IMAGE, i) 4092 }) 4093 } 4094 function f(e, t) { 4095 try { 4096 var i = e.children(".ug-item-wrapper"); 4097 if (null == t) return i.html(""), e.removeData("index"), e.removeData("type"), e.removeData("urlImage"), !1; 4098 e.data("index"), e.data("index", t.index), e.data("type", t.type), 1 == Ie.slider_enable_links && "image" == t.type && (t.link ? e.addClass("ug-slide-clickable") : e.removeClass("ug-slide-clickable")), m(e, t);
4099 var n = J(e); 4100 switch (t.type) { 4101 case "image": 4102 n.hide(); 4103 break; 4104 default: 4105 n.show() 4106 } 4107 } catch (e) { 4108 throw "undefined" != typeof e.fileName && "showbig" == e.fileName && _e.showErrorMessageReplaceGallery(e.message), i.html(""), new Error(e) 4109 } 4110 } 4111 function _() { 4112 if (!Se) return !1; 4113 if (1 == b()) return !1; 4114 var e = Se.getElement(), 4115 t = 0; 4116 (1 == Pe.isTextPanelSaparateHover || 1 == Ie.slider_textpanel_always_on) && (t = Ie.slider_controls_appear_duration), e.stop().fadeTo(t, 0), e.data("isHidden", !0) 4117 } 4118 function v() { 4119 if (!Se) return !1; 4120 if (0 == b()) return !1; 4121 var e = Se.getElement(), 4122 t = 0; 4123 (1 == Pe.isTextPanelSaparateHover || 1 == Ie.slider_textpanel_always_on) && (e.show(), Se.positionElements(), t = Ie.slider_controls_appear_duration), e.stop().show().fadeTo(t, 1), e.data("isHidden", !1) 4124 } 4125 function b() { 4126 var e = Se.getElement(), 4127 t = e.data("isHidden"); 4128 return t !== !1 4129 } 4130 function y(e, t) { 4131 if (void 0 == t) var t = me.getCurrentSlide(); 4132 var i = me.getSlideType(t); 4133 if (i != e) throw new Error("Wrong slide type: " + i + ", should be: " + e); 4134 return !0 4135 } 4136 function w() { 4137 var e = me.getCurrentSlide(), 4138 t = me.getSlideImage(e), 4139 i = Te.getElementSize(e), 4140 n = i.left, 4141 r = i.top; 4142 if (1 == Ie.slider_video_constantsize) { 4143 var a = Te.getElementSize(t); 4144 n += a.left, r += a.top 4145 } else n += Ie.slider_video_padding_left, r += Ie.slider_video_padding_top; 4146 we.setPosition(n, r) 4147 } 4148 function T() { 4149 var e = Ie.slider_video_constantsize_width, 4150 t = Ie.slider_video_constantsize_height; 4151 we.setSize(e, t); 4152 var i = we.getObject(); 4153 p(i, "video") 4154 } 4155 function x(e, t, i) { 4156 fe.trigger(me.events.TRANSITION_START); 4157 var n = Ie.slider_transition; 4158 switch (i && (n = i), me.stopSlideAction(null, !0), n) { 4159 default: 4160 case "fade": 4161 E(t); 4162 break; 4163 case "slide": 4164 S(e, t); 4165 break; 4166 case "lightbox_open": 4167 E(t, !1, !0) 4168 } 4169 } 4170 function S(e, t) { 4171 var i = me.isAnimating(); 4172 if (1 == i) return Pe.itemWaiting = t, !0; 4173 null != Pe.itemWaiting && (Pe.itemWaiting = null); 4174 var n = me.getSlidesReference(); 4175 switch (e) { 4176 case "right": 4177 f(n.objPrevSlide, t), l(); 4178 var r = Te.getElementSize(n.objPrevSlide), 4179 a = -r.left; 4180 me.switchSlideNums("right"); 4181 break; 4182 case "left": 4183 f(n.objNextSlide, t), l(); 4184 var s = Te.getElementSize(n.objNextSlide), 4185 a = -s.left; 4186 me.switchSlideNums("left"); 4187 break; 4188 default: 4189 throw new Error("wrong direction: " + e) 4190 } 4191 var o = Ie.slider_transition_speed, 4192 u = Ie.slider_transition_easing, 4193 d = { 4194 duration: o, 4195 easing: u, 4196 queue: !1, 4197 always: function() { 4198 if (me.stopSlideAction(), we.hide(), null != Pe.itemWaiting) { 4199 var e = K(Pe.itemWaiting); 4200 S(e, Pe.itemWaiting) 4201 } else me.placeNabourItems(), fe.trigger(me.events.TRANSITION_END) 4202 } 4203 }; 4204 ae.animate({ 4205 left: a + "px" 4206 }, d) 4207 } 4208 function I(e, t, i) { 4209 i ? e.fadeTo(Ie.slider_transition_speed, t, i) : e.fadeTo(Ie.slider_transition_speed, t) 4210 } 4211 function E(e, t, i) { 4212 if (!t) var t = !1; 4213 var n = me.getSlidesReference(); 4214 f(n.objNextSlide, e); 4215 var r = Te.getElementSize(n.objCurrentSlide); 4216 Te.placeElement(n.objNextSlide, r.left, r.top); 4217 var a = Pe.numCurrent;
4218 if (Pe.numCurrent = Pe.numNext, Pe.numNext = a, fe.trigger(me.events.ITEM_CHANGED), n.objNextSlide.stop(!0), n.objCurrentSlide.stop(!0), 1 == t) n.objCurrentSlide.fadeTo(0, 0), n.objNextSlide.fadeTo(0, 1), me.placeNabourItems(), fe.trigger(me.events.TRANSITION_END), i !== !0 && we.hide(); 4219 else { 4220 if (n.objNextSlide.fadeTo(0, 0), I(n.objCurrentSlide, 0, function() { 4221 me.placeNabourItems(), fe.trigger(me.events.TRANSITION_END), i !== !0 && we.hide() 4222 }), 1 == we.isVisible()) { 4223 var s = we.getObject(); 4224 I(s, 0) 4225 } 4226 I(n.objNextSlide, 1) 4227 } 4228 } 4229 function P() { 4230 1 == Ie.slider_fullscreen_button_mobilehide && be && be.hide(), 1 == Ie.slider_play_button_mobilehide && ve && ve.hide(), 1 == Ie.slider_zoompanel_mobilehide && pe && pe.getElement().hide() 4231 } 4232 function C() { 4233 1 == Ie.slider_fullscreen_button_mobilehide && be && be.show(), 1 == Ie.slider_play_button_mobilehide && ve && ve.show(), 1 == Ie.slider_zoompanel_mobilehide && pe && pe.getElement().show() 4234 } 4235 function j() { 4236 var e = _e.isMobileMode(); 4237 e ? P() : C() 4238 } 4239 function A() { 4240 var e = re.children(".ug-slider-control"); 4241 return e 4242 } 4243 function M(e) { 4244 if (0 == Te.isTimePassed("sliderControlsToggle")) return !1; 4245 if (0 == Pe.isControlsVisible) return !1; 4246 if (!e) var e = !1; 4247 var t = A(); 4248 e === !0 ? t.stop().fadeTo(0, 0).hide() : t.stop().fadeTo(Ie.slider_controls_appear_duration, 0, function() { 4249 t.hide() 4250 }), Pe.isControlsVisible = !1 4251 } 4252 function z(e) { 4253 if (0 == Te.isTimePassed("sliderControlsToggle")) return !1; 4254 if (1 == Pe.isControlsVisible) return !0; 4255 if (!e) var e = !1; 4256 var t = A(); 4257 e === !0 ? t.stop().show() : (t.stop().show().fadeTo(0, 0), t.fadeTo(Ie.slider_controls_appear_duration, 1)), Pe.isControlsVisible = !0 4258 } 4259 function O() { 4260 0 == Pe.isControlsVisible ? z() : M() 4261 } 4262 function k(e) { 4263 if (e == Pe.currentControlsMode) return !1; 4264 switch (e) { 4265 case "image": 4266 pe && pe.getElement().show(); 4267 break; 4268 case "video": 4269 pe && pe.getElement().hide(); 4270 break; 4271 default: 4272 throw new Error("wrong controld mode: " + e) 4273 } 4274 Pe.currentControlsMode = e 4275 } 4276 function L(e, t, i) { 4277 var n = _e.getSelectedItem(); 4278 me.setItem(n, !1, i); 4279 var r = n.index; 4280 ye && ye.setActive(r), Se && 0 == Pe.isTextPanelSaparateHover && v(), k("image" == n.type ? "image" : "video") 4281 } 4282 function H(e, t) { 4283 _e.selectItem(t) 4284 } 4285 function N(e) { 4286 return !(!ce || 0 != ce.isTapEventOccured(e)) || void fe.trigger(me.events.CLICK, e) 4287 } 4288 function D() { 4289 var e = me.getCurrentSlide(), 4290 t = e.hasClass("ug-slide-clickable"), 4291 i = me.getCurrentItem(); 4292 return t ? (0 == Ie.slider_links_newpage ? location.href = i.link : window.open(i.link, "_blank"), !0) : void(0 == Ie.slider_controls_always_on && 1 == Ie.slider_controls_appear_ontap && 1 == me.isCurrentSlideType("image") && (O(), Se && 1 == Ie.slider_textpanel_always_on && me.isCurrentSlideType("image") && me.isCurrentSlideImageFit() && v())) 4293 } 4294 function R(e) { 4295 Se && me.isCurrentSlideType("image") && 0 == me.isCurrentSlideImageFit() && _() 4296 } 4297 function G() { 4298 z() 4299 } 4300 function B() { 4301 M() 4302 } 4303 function W(e) { 4304 var t = e.parent(); 4305 me.startSlideAction(t) 4306 } 4307 function F() { 4308 _e.isPlayMode() && _e.pausePlaying(), fe.trigger(me.events.ACTION_START) 4309 } 4310 function Q() { 4311 _e.isPlayMode() && _e.continuePlaying(), fe.trigger(me.events.ACTION_END); 4312 } 4313 function Y(e, t, i) { 4314 se.data("index") == t && (objItem = _e.getItem(t), m(se, objItem, !0)), oe.data("index") == t && (objItem = _e.getItem(t), m(oe, objItem, !0)), le.data("index") == t && (objItem = _e.getItem(t), m(le, objItem, !0)) 4315 } 4316 function X(e, t) { 4317 t = jQuery(t); 4318 var i = me.getSlideImage(t), 4319 n = J(t), 4320 r = Te.getElementSize(i); 4321 Te.placeElement(n, "center", "middle", r.left, r.top, i) 4322 } 4323 function U(e) { 4324 var t = J(e); 4325 Te.addClassOnHover(t), Te.setButtonOnClick(t, W) 4326 } 4327 function V() {
4328 te.on(_e.events.ITEM_IMAGE_UPDATED, Y), te.on(_e.events.ITEM_CHANGE, L), ye && jQuery(ye).on(ye.events.BULLET_CLICK, H), 1 == Ie.slider_enable_arrows && (Te.addClassOnHover(de, "ug-arrow-hover"), Te.addClassOnHover(ue, "ug-arrow-hover"), _e.setNextButton(de), _e.setPrevButton(ue)), 0 == Ie.slider_controls_always_on && re.hover(G, B), re.on("touchend click", N), fe.on(me.events.CLICK, D), Se && 1 == Pe.isTextPanelSaparateHover && re.hover(v, _), ve && (Te.addClassOnHover(ve, "ug-button-hover"), _e.setPlayButton(ve)), be && (Te.addClassOnHover(be, "ug-button-hover"), _e.setFullScreenToggleButton(be)), ge && fe.on(me.events.ZOOM_CHANGE, R), pe && pe.initEvents(), we.initEvents(), jQuery(we).on(we.events.SHOW, F), jQuery(we).on(we.events.HIDE, Q), U(se), U(oe), U(le), fe.on(me.events.AFTER_PUT_IMAGE, X), re.on("mouseenter", ".ug-item-wrapper img", function(e) { 4329 fe.trigger(me.events.IMAGE_MOUSEENTER) 4330 }), re.on("mouseleave", ".ug-item-wrapper img", function(e) { 4331 var t = me.isMouseInsideSlideImage(e); 4332 0 == t && fe.trigger(me.events.IMAGE_MOUSELEAVE) 4333 }) 4334 } 4335 function q() { 4336 var e; 4337 switch (Ie.slider_loader_type) { 4338 default: 4339 case 1: 4340 e = "ug-loader1"; 4341 break; 4342 case 2: 4343 e = "ug-loader2"; 4344 break; 4345 case 3: 4346 e = "ug-loader3"; 4347 break; 4348 case 4: 4349 e = "ug-loader4"; 4350 break; 4351 case 5: 4352 e = "ug-loader5"; 4353 break; 4354 case 6: 4355 e = "ug-loader6"; 4356 break; 4357 case 7: 4358 e = "ug-loader7"; 4359 break; 4360 case 8: 4361 e = "ug-loader8"; 4362 break; 4363 case 9: 4364 e = "ug-loader9" 4365 } 4366 return "black" == Ie.slider_loader_color && (e += " ug-loader-black"), e 4367 } 4368 function Z(e) { 4369 switch (e) { 4370 case 1: 4371 return se; 4372 case 2: 4373 return oe; 4374 case 3: 4375 return le; 4376 default: 4377 throw new Error("wrong num: " + e) 4378 } 4379 } 4380 function K(e) { 4381 var t = me.getSlidesReference(), 4382 i = t.objCurrentSlide.data("index"), 4383 n = e.index, 4384 r = "left"; 4385 return i > n && (r = "right"), r 4386 } 4387 function $(e) { 4388 if (!e) var e = me.getCurrentSlide(); 4389 var t = e.children(".ug-slider-preloader"); 4390 return t 4391 } 4392 function J(e) { 4393 var t = e.children(".ug-button-videoplay"); 4394 return t 4395 } 4396 function ee(e) { 4397 if (!e) var e = me.getCurrentSlide(); 4398 var t = e.data("index"); 4399 if (void 0 == t) return null; 4400 var i = _e.getItem(t); 4401 return i 4402 } 4403 var te, ie, ne, re, ae, se, oe, le, ue, de, ce, ge, pe, he, me = this, 4404 fe = jQuery(me), 4405 _e = new UniteGalleryMain, 4406 ve = null, 4407 be = null, 4408 ye = null, 4409 we = new UGVideoPlayer, 4410 Te = new UGFunctions, 4411 xe = null, 4412 Se = null; 4413 this.events = { 4414 ITEM_CHANGED: "item_changed", 4415 BEFORE_SWITCH_SLIDES: "before_switch", 4416 BEFORE_RETURN: "before_return", 4417 AFTER_RETURN: "after_return", 4418 ZOOM_START: "slider_zoom_start", 4419 ZOOM_END: "slider_zoom_end", 4420 ZOOMING: "slider_zooming", 4421 ZOOM_CHANGE: "slider_zoom_change", 4422 START_DRAG: "start_drag", 4423 AFTER_DRAG_CHANGE: "after_drag_change", 4424 ACTION_START: "action_start", 4425 ACTION_END: "action_end", 4426 CLICK: "slider_click", 4427 TRANSITION_START: "slider_transition_start", 4428 TRANSITION_END: "slider_transition_end", 4429 AFTER_PUT_IMAGE: "after_put_image", 4430 IMAGE_MOUSEENTER: "slider_image_mouseenter", 4431 IMAGE_MOUSELEAVE: "slider_image_mouseleave", 4432 CURRENTSLIDE_LOAD_START: "slider_current_loadstart", 4433 CURRENTSLIDE_LOAD_END: "slider_current_loadend" 4434 }; 4435 var Ie = { 4436 slider_scale_mode: "fill", 4437 slider_scale_mode_media: "fill", 4438 slider_scale_mode_fullscreen: "down", 4439 slider_item_padding_top: 0, 4440 slider_item_padding_bottom: 0, 4441 slider_item_padding_left: 0, 4442 slider_item_padding_right: 0, 4443 slider_background_color: "", 4444 slider_background_opacity: 1, 4445 slider_image_padding_top: 0, 4446 slider_image_padding_bottom: 0, 4447 slider_image_padding_left: 0, 4448 slider_image_padding_right: 0, 4449 slider_image_border: !1, 4450 slider_image_border_width: 10, 4451 slider_image_border_color: "#ffffff", 4452 slider_image_border_radius: 0, 4453 slider_image_border_maxratio: .35, 4454 slider_image_shadow: !1, 4455 slider_video_constantsize: !1, 4456 slider_video_constantsize_scalemode: "fit", 4457 slider_video_constantsize_width: 854, 4458 slider_video_constantsize_height: 480, 4459 slider_video_padding_top: 0, 4460 slider_video_padding_bottom: 0, 4461 slider_video_padding_left: 0, 4462 slider_video_padding_right: 0, 4463 slider_video_enable_closebutton: !0, 4464 slider_transition: "slide", 4465 slider_transition_speed: 300, 4466 slider_transition_easing: "easeInOutQuad", 4467 slider_control_swipe: !0, 4468 slider_control_zoom: !0, 4469 slider_zoom_mousewheel: !0, 4470 slider_vertical_scroll_ondrag: !1, 4471 slider_loader_type: 1, 4472 slider_loader_color: "white", 4473 slider_enable_links: !0, 4474 slider_links_newpage: !1, 4475 slider_enable_bullets: !1, 4476 slider_bullets_skin: "", 4477 slider_bullets_space_between: -1, 4478 slider_bullets_align_hor: "center", 4479 slider_bullets_align_vert: "bottom", 4480 slider_bullets_offset_hor: 0, 4481 slider_bullets_offset_vert: 10, 4482 slider_enable_arrows: !0, 4483 slider_arrows_skin: "", 4484 slider_arrow_left_align_hor: "left", 4485 slider_arrow_left_align_vert: "middle", 4486 slider_arrow_left_offset_hor: 20, 4487 slider_arrow_left_offset_vert: 0, 4488 slider_arrow_right_align_hor: "right", 4489 slider_arrow_right_align_vert: "middle", 4490 slider_arrow_right_offset_hor: 20, 4491 slider_arrow_right_offset_vert: 0, 4492 slider_enable_progress_indicator: !0, 4493 slider_progress_indicator_type: "pie", 4494 slider_progress_indicator_align_hor: "right", 4495 slider_progress_indicator_align_vert: "top", 4496 slider_progress_indicator_offset_hor: 10, 4497 slider_progress_indicator_offset_vert: 10, 4498 slider_enable_play_button: !0, 4499 slider_play_button_skin: "", 4500 slider_play_button_align_hor: "left", 4501 slider_play_button_align_vert: "top", 4502 slider_play_button_offset_hor: 40, 4503 slider_play_button_offset_vert: 8, 4504 slider_play_button_mobilehide: !1, 4505 slider_enable_fullscreen_button: !0, 4506 slider_fullscreen_button_skin: "", 4507 slider_fullscreen_button_align_hor: "left", 4508 slider_fullscreen_button_align_vert: "top", 4509 slider_fullscreen_button_offset_hor: 11, 4510 slider_fullscreen_button_offset_vert: 9, 4511 slider_fullscreen_button_mobilehide: !1, 4512 slider_enable_zoom_panel: !0, 4513 slider_zoompanel_skin: "", 4514 slider_zoompanel_align_hor: "left", 4515 slider_zoompanel_align_vert: "top", 4516 slider_zoompanel_offset_hor: 12, 4517 slider_zoompanel_offset_vert: 92, 4518 slider_zoompanel_mobilehide: !1, 4519 slider_controls_always_on: !1, 4520 slider_controls_appear_ontap: !0, 4521 slider_controls_appear_duration: 300, 4522 slider_enable_text_panel: !0, 4523 slider_textpanel_always_on: !0, 4524 slider_videoplay_button_type: "square" 4525 }, Ee = { 4526 slider_progress_indicator_align_hor: "left", 4527 slider_progress_indicator_align_vert: "bottom", 4528 slider_progress_indicator_offset_hor: 0, 4529 slider_progress_indicator_offset_vert: 0 4530 }, Pe = { 4531 isRunOnce: !1, 4532 isTextPanelSaparateHover: !1, 4533 numPrev: 1, 4534 numCurrent: 2, 4535 numNext: 3, 4536 isControlsVisible: !0, 4537 currentControlsMode: "image" 4538 }; 4539 this.switchSlideNums = function(e) { 4540 switch (fe.trigger(me.events.BEFORE_SWITCH_SLIDES), e) {
4541 case "left": 4542 var t = Pe.numCurrent; 4543 Pe.numCurrent = Pe.numNext, Pe.numNext = Pe.numPrev, Pe.numPrev = t; 4544 break; 4545 case "right": 4546 var t = Pe.numCurrent; 4547 Pe.numCurrent = Pe.numPrev, Pe.numPrev = Pe.numNext, Pe.numNext = t; 4548 break; 4549 default: 4550 throw new Error("wrong direction: " + e) 4551 } 4552 fe.trigger(me.events.ITEM_CHANGED) 4553 }, this.destroy = function() { 4554 fe.off(me.events.AFTER_PUT_IMAGE), te.off(_e.events.ITEM_IMAGE_UPDATED), te.off(_e.events.ITEM_CHANGE), ye && jQuery(ye).on(ye.events.BULLET_CLICK), re.off("mouseenter"), re.off("mouseleave"), re.off("touchend"), re.off("click"), fe.off(me.events.CLICK), ge && fe.off(me.events.ZOOM_CHANGE), fe.off(me.events.BEFORE_SWITCH_SLIDES), jQuery(we).off(we.events.SHOW), jQuery(we).off(we.events.HIDE), we.destroy(), re.off("mouseenter", ".ug-item-wrapper img"), re.off("mouseleave", ".ug-item-wrapper img") 4555 }, this.________EXTERNAL_GENERAL___________ = function() {}, this.init = function(t, i, n) { 4556 e(t, i, n) 4557 }, this.getSlideImage = function(e) { 4558 if (!e) var e = me.getCurrentSlide(); 4559 var t = e.find(".ug-item-wrapper img"); 4560 return t 4561 }, this.setHtml = function(e) { 4562 r(e) 4563 }, this.run = function() { 4564 t() 4565 }, this.isInnerInPlace = function() { 4566 var e = me.getSlidesReference(), 4567 t = Te.getElementSize(e.objCurrentSlide), 4568 i = -t.left, 4569 n = Te.getElementSize(ae); 4570 return i == n.left 4571 }, this.isAnimating = function() { 4572 var e = ae.is(":animated"); 4573 return e 4574 }, this.isSlideCurrent = function(e) { 4575 var t = e.data("slidenum"); 4576 return Pe.numCurrent == t 4577 }, this.isSlideHasItem = function(e) { 4578 var t = e.data("index"); 4579 return void 0 !== t && null !== t 4580 }, this.getObjImagePadding = function() { 4581 var e = { 4582 padding_top: Ie.slider_image_padding_top, 4583 padding_bottom: Ie.slider_image_padding_bottom, 4584 padding_left: Ie.slider_image_padding_left, 4585 padding_right: Ie.slider_image_padding_right 4586 }; 4587 return e 4588 }, this.getSlidesReference = function() { 4589 var e = { 4590 objPrevSlide: Z(Pe.numPrev), 4591 objNextSlide: Z(Pe.numNext), 4592 objCurrentSlide: Z(Pe.numCurrent) 4593 }; 4594 return e 4595 }, this.getCurrentSlide = function() { 4596 var e = me.getSlidesReference(); 4597 return e.objCurrentSlide 4598 }, this.getCurrentItemIndex = function() { 4599 var e = me.getSlidesReference(), 4600 t = e.objCurrentSlide.data("index"); 4601 return (null === t || void 0 === t) && (t = -1), t 4602 }, this.getCurrentItem = function() { 4603 var e = me.getCurrentItemIndex(); 4604 if (-1 == e) return null; 4605 var t = _e.getItem(e); 4606 return t 4607 }, this.getSlideType = function(e) { 4608 void 0 == e && (e = me.getCurrentSlide()); 4609 var t = e.data("type"); 4610 return t 4611 }, this.isMouseInsideSlideImage = function(e) { 4612 var t = me.getSlideImage(), 4613 i = Te.getMousePosition(e); 4614 void 0 === i.pageX && (i = ce.getLastMousePos()); 4615 var n = Te.getMouseElementPoint(i, t), 4616 r = Te.getElementSize(t); 4617 return isMouseInside = Te.isPointInsideElement(n, r), isMouseInside 4618 }, this.isCurrentSlideType = function(e) { 4619 var t = me.getSlideType(); 4620 return t == e 4621 }, this.isCurrentSlideLoadingImage = function() { 4622 var e = me.getCurrentSlide(), 4623 t = e.data("isLoading"); 4624 return t === !0 4625 }, this.setItem = function(e, t, i) { 4626 var n = me.getSlidesReference(), 4627 r = n.objCurrentSlide.data("index"), 4628 a = e.index; 4629 if (a == r) return !0; 4630 var s = void 0 == r; 4631 if (s) f(n.objCurrentSlide, e), me.placeNabourItems(); 4632 else { 4633 var o = "left"; 4634 _e.getNumItems(), "next" == i ? o = "left" : "prev" == i || r > a ? o = "right" : r > a && (o = "right"), x(o, e, t) 4635 } 4636 }, this.placeNabourItems = function() { 4637 var e = me.getSlidesReference(), 4638 t = e.objCurrentSlide.data("index"), 4639 i = _e.getPrevItem(t), 4640 n = _e.getNextItem(t); 4641 f(e.objNextSlide, n), f(e.objPrevSlide, i), l() 4642 }, this.________EXTERNAL_API___________ = function() {}, this.stopSlideAction = function(e, t) { 4643 e || (e = me.getCurrentSlide()), t === !0 ? we.pause() : we.hide() 4644 }, this.startSlideAction = function(e) { 4645 e || (e = me.getCurrentSlide()); 4646 var t = ee(e); 4647 if ("image" == t.type) return !0; 4648 switch (1 == Ie.slider_video_constantsize && T(), w(), we.show(), t.type) { 4649 case "youtube": 4650 we.playYoutube(t.videoid); 4651 break; 4652 case "vimeo": 4653 we.playVimeo(t.videoid); 4654 break; 4655 case "html5video": 4656 we.playHtml5Video(t.videoogv, t.videowebm, t.videomp4, t.urlImage); 4657 break; 4658 case "soundcloud": 4659 we.playSoundCloud(t.trackid); 4660 break; 4661 case "wistia": 4662 we.playWistia(t.videoid) 4663 } 4664 }
4664, this.getScaleMode = function(e) { 4665 if (!e) var e = me.getCurrentSlide(); 4666 var t = me.getSlideType(e); 4667 return "image" != t ? Ie.slider_scale_mode_media : Ie.slider_scale_mode == Ie.slider_scale_mode_fullscreen ? Ie.slider_scale_mode : 1 == _e.isFullScreen() ? Ie.slider_scale_mode_fullscreen : Ie.slider_scale_mode 4668 }, this.getObjects = function() { 4669 var e = { 4670 g_objSlider: re, 4671 g_objInner: ae, 4672 g_options: Ie, 4673 g_objZoomSlider: ge 4674 }; 4675 return e 4676 }, this.getObjZoom = function() { 4677 return ge 4678 }, this.getOptions = function() { 4679 return Ie 4680 }, this.getElement = function() { 4681 return re 4682 }, this.getVideoObject = function() { 4683 return we 4684 }, this.isCurrentSlideImageFit = function() { 4685 var e = me.getCurrentSlide(); 4686 me.getSlideType(e), y("image", e); 4687 var t = me.getSlideImage(e); 4688 if (0 == t.length) return !1; 4689 var i = Te.isImageFitParent(t); 4690 return i 4691 }, this.isCurrentImageInPlace = function() { 4692 var e = me.getSlideImage(); 4693 if (0 == e.length) return !1; 4694 var t = me.getScaleMode(), 4695 i = me.getObjImagePadding(), 4696 n = ee(), 4697 r = e.parent(), 4698 a = Te.getImageInsideParentData(r, n.imageWidth, n.imageHeight, t, i), 4699 s = Te.getElementSize(e), 4700 o = !1; 4701 return a.imageWidth == s.width && (o = !0), o 4702 }, this.isSlideActionActive = function() { 4703 return we.isVisible() 4704 }, this.isSwiping = function() { 4705 if (!ce) return !1; 4706 var e = ce.isTouchActive(); 4707 return e 4708 }, this.isPreloading = function() { 4709 var e = $(); 4710 return !!e.is(":visible") 4711 }, this.setOptions = function(e) { 4712 he && (e = Te.convertCustomPrefixOptions(e, he, "slider")), Ie = jQuery.extend(Ie, e) 4713 }, this.setSize = function(e, t) { 4714 if (0 > e || 0 > t) return !0; 4715 var i = {}; 4716 i.width = e + "px", i.height = t + "px", re.css(i); 4717 var n = {}; 4718 n.height = t + "px", n.top = "0px", n.left = "0px", ae.css(n); 4719 var r = {}; 4720 r.height = t + "px", r.width = e + "px", se.css(r), oe.css(r), le.css(r); 4721 var a = e - Ie.slider_item_padding_left - Ie.slider_item_padding_right, 4722 o = t - Ie.slider_item_padding_top - Ie.slider_item_padding_bottom, 4723 d = {}; 4724 d.width = a + "px", d.height = o + "px", d.top = Ie.slider_item_padding_top + "px", d.left = Ie.slider_item_padding_left + "px", re.find(".ug-item-wrapper").css(d), Se && Se.setSizeByParent(), s(), u(se), u(oe), u(le), l(); 4725 var c = me.getSlideType(); 4726 if ("image" != c && 1 == Ie.slider_video_constantsize) T(); 4727 else { 4728 var g = e - Ie.slider_video_padding_left - Ie.slider_video_padding_right, 4729 p = t - Ie.slider_video_padding_top - Ie.slider_video_padding_bottom; 4730 we.setSize(g, p) 4731 } 4732 w() 4733 }, this.refreshSlideItems = function() { 4734 return 1 == me.isAnimating() || (u(se), u(oe), u(le), void l()) 4735 }, this.isMouseOver = function() { 4736 return re.ismouseover() 4737 }, this.setPosition = function(e, t) { 4738 Te.placeElement(re, e, t) 4739 }, this.zoomIn = function() { 4740 return !ge || void ge.zoomIn() 4741 }, this.zoomOut = function() { 4742 return !ge || void ge.zoomOut() 4743 }, this.zoomBack = function() { 4744 return !ge || void ge.zoomBack() 4745 } 4746} 4747function UGTextPanel() { 4748 function e(e, t) { 4749 if (!t) var t = v.textpanel_padding_top; 4750 var i = t; 4751 if (d) { 4752 var n = i; 4753 f.placeElement(d, 0, n); 4754 var a = d.is(":visible"); 4755 if (1 == a) { 4756 var s = f.getElementSize(d), 4757 i = s.bottom; 4758 i > 0 && (b.lastTitleBottom = i) 4759 } else { 4760 var i = 20; 4761 b.lastTitleBottom > 0 && (i = b.lastTitleBottom) 4762 } 4763 } 4764 var o = ""; 4765 if (c && (o = jQuery.trim(c.text())), "" != o) { 4766 var l = i; 4767 d && (l += v.textpanel_padding_title_description), f.placeElement(c, 0, l); 4768 var u = jQuery(c).is(":visible"); 4769 if (1 == u) { 4770 var g = f.getElementSize(c); 4771 i = g.bottom, g.height > 0 && (b.lastDescHeight = g.height) 4772 } else { 4773 var p = 16; 4774 b.lastDescHeight > 0 && (p = b.lastDescHeight), i = l + p 4775 } 4776 } 4777 if (!v.textpanel_height && 1 == b.setInternalHeight) { 4778 var h = i + v.textpanel_padding_bottom; 4779 r(h, e) 4780 } 4781 } 4782 function t() { 4783 var e = 0; 4784 if (d && (e += d.outerHeight()), c) { 4785 var t = ""; 4786 c && (t = jQuery.trim(c.text())), "" != t && (d && (e += v.textpanel_padding_title_description), e += c.outerHeight()) 4787 } 4788 return e 4789 } 4790 function i() { 4791 var i = t(), 4792 n = (p.height() - i) / 2; 4793 e(!1, n) 4794 } 4795 function n() { 4796 var i = t(), 4797 n = p.height() - i - v.textpanel_padding_bottom; 4798 e(!1, n) 4799 } 4800 function r(e, t) { 4801 if (!t) var t = !1; 4802 if (1 == t) { 4803 if (g) { 4804 var i = g.height(); 4805 e > i && g.height(e) 4806 } 4807 var n = { 4808 height: e + "px" 4809 }; 4810 l.add(p).animate(n, v.textpanel_fade_duration) 4811 } else g && g.height(e), l.add(p).height(e) 4812 } 4813 function a() { 4814 if (1 == v.textpanel_enable_bg) { 4815 g = l.children(".ug-textpanel-bg"), g.fadeTo(0, v.textpanel_bg_opacity); 4816 var e = { 4817 "background-color": v.textpanel_bg_color 4818 }; 4819 e = jQuery.extend(e, v.textpanel_bg_css), g.css(e) 4820 } 4821 if (1 == v.textpanel_enable_title) { 4822 d = p.children(".ug-textpanel-title"); 4823 var t = {}; 4824 null !== v.textpanel_title_color && (t.color = v.textpanel_title_color), null !== v.textpanel_title_font_family && (t["font-family"] = v.textpanel_title_font_family), null !== v.textpanel_title_text_align && (t["text-align"] = v.textpanel_title_text_align), null !== v.textpanel_title_font_size && (t["font-size"] = v.textpanel_title_font_size + "px"), null !== v.textpanel_title_bold && (v.textpanel_title_bold === !0 ? t["font-weight"] = "bold" : t["font-weight"] = "normal"), v.textpanel_css_title && (t = jQuery.extend(t, v.textpanel_css_title)), d.css(t) 4825 } 4826 if (1 == v.textpanel_enable_description) { 4827 c = p.children(".ug-textpanel-description"); 4828 var i = {}; 4829 null !== v.textpanel_desc_color && (i.color = v.textpanel_desc_color), null !== v.textpanel_desc_font_family && (i["font-family"] = v.textpanel_desc_font_family), null !== v.textpanel_desc_text_align && (i["text-align"] = v.textpanel_desc_text_align), null !== v.textpanel_desc_font_size && (i["font-size"] = v.textpanel_desc_font_size + "px"), null !== v.textpanel_desc_bold && (v.textpanel_desc_bold === !0 ? i["font-weight"] = "bold" : i["font-weight"] = "normal"), v.textpanel_css_title && (i = jQuery.extend(i, v.textpanel_css_description)), c.css(i) 4830 } 4831 } 4832 function s() { 4833 var e = h.getSelectedItem(); 4834 m.setText(e.title, e.description) 4835 } 4836 function o() { 4837 jQuery(h).on(h.events.ITEM_CHANGE, s) 4838 } 4839 var l, u, d, c, g, p, h, m = this, 4840 f = new UGFunctions, 4841 _ = "", 4842 v = { 4843 textpanel_align: "bottom", 4844 textpanel_margin: 0, 4845 textpanel_text_valign: "middle", 4846 textpanel_padding_top: 10, 4847 textpanel_padding_bottom: 10, 4848 textpanel_height: null, 4849 textpanel_padding_title_description: 5, 4850 textpanel_padding_right: 11, 4851 textpanel_padding_left: 11, 4852 textpanel_fade_duration: 200, 4853 textpanel_enable_title: !0, 4854 textpanel_enable_description: !0, 4855 textpanel_enable_bg: !0, 4856 textpanel_bg_color: "#000000", 4857 textpanel_bg_opacity: .4, 4858 textpanel_title_color: null, 4859 textpanel_title_font_family: null, 4860 textpanel_title_text_align: null, 4861 textpanel_title_font_size: null, 4862 textpanel_title_bold: null, 4863 textpanel_css_title: {}, 4864 textpanel_desc_color: null, 4865 textpanel_desc_font_family: null, 4866 textpanel_desc_text_align: null, 4867 textpanel_desc_font_size: null, 4868 textpanel_desc_bold: null, 4869 textpanel_css_description: {}, 4870 textpanel_desc_style_as_title: !1, 4871 textpanel_bg_css: {} 4872 }, b = { 4873 isFirstTime: !0, 4874 setInternalHeight: !0, 4875 lastTitleBottom: 0, 4876 lastDescHeight: 0 4877 }; 4878 this.positionElements = function(t) { 4879 if (!v.textpanel_height || "top" == v.textpanel_text_valign) return e(t), !1; 4880 switch (v.textpanel_text_valign) { 4881 default: 4882 case "top": 4883 e(!1); 4884 break; 4885 case "bottom": 4886 n(); 4887 break; 4888 case "center": 4889 case "middle": 4890 i() 4891 } 4892 }, this.init = function(e, t, i) { 4893 if (h = e, i && (_ = i, t = f.convertCustomPrefixOptions(t, _, "textpanel")), t && (v = jQuery.extend(v, t)), 0 == v.textpanel_enable_title && 0 == v.textpanel_enable_description) throw new Error("Textpanel Error: The title or description must be enabled"); 4894 v.textpanel_height && v.textpanel_height < 0 && (v.textpanel_height = null), 1 == v.textpanel_desc_style_as_title && (v.textpanel_desc_color || (v.textpanel_desc_color = v.textpanel_title_color), v.textpanel_desc_bold || (v.textpanel_desc_bold = v.textpanel_title_bold), v.textpanel_desc_font_family || (v.textpanel_desc_font_family = v.textpanel_title_font_family), v.textpanel_desc_font_size || (v.textpanel_desc_font_size = v.textpanel_title_font_size), v.textpanel_desc_text_align || (v.textpanel_desc_text_align = v.textpanel_title_text_align)) 4895 }, this.appendHTML = function(e, t) { 4896 u = e, t = t ? " " + t : ""; 4897 var i = "<div class='ug-textpanel" + t + "'>"; 4898 1 == v.textpanel_enable_bg && (i += "<div class='ug-textpanel-bg" + t + "'></div>"), i += "<div class='ug-textpanel-textwrapper" + t + "'>", 1 == v.textpanel_enable_title && (i += "<div class='ug-textpanel-title" + t + "'></div>"), 1 == v.textpanel_enable_description && (i += "<div class='ug-textpanel-description" + t + "'></div>"), i += "</div></div>", e.append(i), l = e.children(".ug-textpanel"), p = l.children(".ug-textpanel-textwrapper"), a() 4899 }, this.destroy = function() { 4900 jQuery(h).off(h.events.ITEM_CHANGE) 4901 }, this.run = function() { 4902 m.setSizeByParent(), o() 4903 }, this.setPanelSize = function(e, t) { 4904 if (b.setInternalHeight = !0, t) b.setInternalHeight = !1; 4905 else var t = 80; 4906 v.textpanel_height && (t = v.textpanel_height), l.width(e), l.height(t), g && (g.width(e), g.height(t)); 4907 var i = e - v.textpanel_padding_left - v.textpanel_padding_right, 4908 n = v.textpanel_padding_left; 4909 f.setElementSizeAndPosition(p, n, 0, i, t), d && d.width(i), c && c.width(i), 0 == b.isFirstTime && m.positionElements(!1) 4910 }, this.setSizeByParent = function() { 4911 var e = f.getElementSize(u); 4912 m.setPanelSize(e.width) 4913 }, this.setTextPlain = function(e, t) { 4914 d && d.html(e), c && c.html(t) 4915 }, this.setText = function(e, t) { 4916 1 == b.isFirstTime ? (m.setTextPlain(e, t), b.isFirstTime = !1, m.positionElements(!1)) : p.stop().fadeTo(v.textpanel_fade_duration, 0, function() { 4917 m.setTextPlain(e, t), m.positionElements(!0), jQuery(this).fadeTo(v.textpanel_fade_duration, 1) 4918 }) 4919 }, this.positionPanel = function(e, t) { 4920 var i = {}; 4921 if (void 0 !== e && null !== e) i.top = e, i.bottom = "auto"; 4922 else switch (v.textpanel_align) { 4923 case "top": 4924 i.top = v.textpanel_margin + "px"; 4925 break; 4926 case "bottom": 4927 i.top = "auto", i.bottom = v.textpanel_margin + "px"; 4928 break; 4929 case "middle": 4930 i.top = f.getElementRelativePos(l, "middle", v.textpanel_margin) 4931 } 4932 void 0 !== t && null !== t && (i.left = t), l.css(i) 4933 }, this.setOptions = function(e) { 4934 _ && (e = f.convertCustomPrefixOptions(e, _, "textpanel")), v = jQuery.extend(v, e) 4935 }, this.getElement = function() { 4936 return l 4937 }
4937, this.getSize = function() { 4938 var e = f.getElementSize(l); 4939 return e 4940 }, this.refresh = function(e, t, i, n) { 4941 a(), i ? m.setPanelSize(i, n) : m.setSizeByParent(), m.positionElements(!1), t !== !0 && m.positionPanel(), e === !0 && m.show() 4942 }, this.hide = function() { 4943 l.hide() 4944 }, this.show = function() { 4945 l.show() 4946 }, this.getOptions = function() { 4947 return v 4948 }, this.getOption = function(e) { 4949 return 0 == v.hasOwnProperty(e) ? null : v[e] 4950 } 4951} 4952function UGZoomButtonsPanel() { 4953 function e(e) { 4954 return !e || !! e.hasClass("ug-zoompanel-button-disabled") 4955 } 4956 function t(e) { 4957 e && e.addClass("ug-zoompanel-button-disabled") 4958 } 4959 function i(e) { 4960 e && e.removeClass("ug-zoompanel-button-disabled") 4961 } 4962 function n() { 4963 if (0 == d.isCurrentSlideType("image")) return !0; 4964 var n = d.isCurrentSlideImageFit(); 4965 1 == n ? 0 == e(o) && (t(o), t(l)) : 1 == e(o) && (i(o), i(l)) 4966 } 4967 var r, a, s, o, l, u = this, 4968 d = new UGSlider, 4969 c = new UGFunctions, 4970 g = { 4971 slider_zoompanel_skin: "" 4972 }; 4973 this.init = function(e, t) { 4974 d = e, t && (g = jQuery.extend(g, t)) 4975 }, this.appendHTML = function(e) { 4976 a = e; 4977 var t = "<div class='ug-slider-control ug-zoompanel ug-skin-" + g.slider_zoompanel_skin + "'>"; 4978 t += "<div class='ug-zoompanel-button ug-zoompanel-plus'></div>", t += "<div class='ug-zoompanel-button ug-zoompanel-minus ug-zoompanel-button-disabled'></div>", t += "<div class='ug-zoompanel-button ug-zoompanel-return ug-zoompanel-button-disabled'></div>", t += "</div>", e.append(t), r = e.children(".ug-zoompanel"), s = r.children(".ug-zoompanel-plus"), o = r.children(".ug-zoompanel-minus"), l = r.children(".ug-zoompanel-return") 4979 }, this.setObjects = function(e, t, i) { 4980 s = e, o = t, l = i, o && o.addClass("ug-zoompanel-button-disabled"), l && l.addClass("ug-zoompanel-button-disabled") 4981 }, this.getElement = function() { 4982 return r 4983 }, u.initEvents = function() { 4984 c.addClassOnHover(s, "ug-button-hover"), c.addClassOnHover(o, "ug-button-hover"), c.addClassOnHover(l, "ug-button-hover"), c.setButtonOnClick(s, function() { 4985 return 1 == e(s) || void d.zoomIn() 4986 }), c.setButtonOnClick(o, function() { 4987 return 1 == e(o) || void d.zoomOut() 4988 }), c.setButtonOnClick(l, function() { 4989 return 1 == e(l) || void d.zoomBack() 4990 }), jQuery(d).on(d.events.ZOOM_CHANGE, n), jQuery(d).on(d.events.ITEM_CHANGED, n) 4991 } 4992} 4993function UGBullets() { 4994 function e() { 4995 var e = "", 4996 t = ""; - 1 != h.bullets_space_between && (t = " style='margin-left:" + h.bullets_space_between + "px'"); 4997 for (var i = 0; u > i; i++) e += 0 == i ? "<div class='ug-bullet'></div>" : "<div class='ug-bullet'" + t + "></div>"; 4998 if (a.html(e), !o) { 4999 var n = a.find(".ug-bullet:first-child"); 5000 n.length && (o = n.width()) 5001 } 5002 } 5003 function t(e) { 5004 if (1 == l.isActive(e)) return !0; 5005 var t = e.index(); 5006 jQuery(l).trigger(l.events.BULLET_CLICK, t) 5007 } 5008 function i() { 5009 var e = a.children(".ug-bullet"); 5010 g.setButtonOnClick(e, t), e.on("mousedown mouseup", function(e) { 5011 return !1 5012 }) 5013 } 5014 function n(e) { 5015 if (0 > e || e >= u) throw new Error("wrong bullet index: " + e) 5016 } 5017 function r() { 5018 if (1 == p.isInited) return !0; 5019 throw new Error("The bullets are not inited!") 5020 } 5021 var a, s, o, l = this, 5022 u = 0, 5023 d = new UniteGalleryMain, 5024 c = -1, 5025 g = new UGFunctions, 5026 p = { 5027 isInited: !1 5028 }, h = { 5029 bullets_skin: "", 5030 bullets_addclass: "", 5031 bullets_space_between: -1 5032 }; 5033 this.events = { 5034 BULLET_CLICK: "bullet_click" 5035 }, this.init = function(e, t, i) { 5036 d = e, u = i ? i : d.getNumItems(), p.isInited = !0, h = jQuery.extend(h, t), "" == h.bullets_skin && (h.bullets_skin = h.gallery_skin) 5037 }, this.getBulletsWidth = function() { 5038 if (0 == u) return 0; 5039 if (!o) return 0; 5040 var e = u * o + (u - 1) * h.bullets_space_between; 5041 return e 5042 }, this.appendHTML = function(t) { 5043 s = t, r(); 5044 var n = ""; 5045 "" != h.bullets_addclass && (n = " " + h.bullets_addclass); 5046 var o = "<div class='ug-slider-control ug-bullets ug-skin-" + h.bullets_skin + n + "'>"; 5047 o += "</div>", a = jQuery(o), t.append(a), e(), i() 5048 }, this.updateNumBullets = function(t) { 5049 u = t, e(), i() 5050 }, this.getElement = function() { 5051 return a 5052 }, this.setActive = function(e) { 5053 r(), n(e); 5054 var t = a.children(".ug-bullet"); 5055 t.removeClass("ug-bullet-active"); 5056 var i = jQuery(t[e]); 5057 i.addClass("ug-bullet-active"), c = e 5058 }, this.isActive = function(e) { 5059 if (n(e), "number" != typeof e) var t = e; 5060 else var t = a.children(".ug-bullet")[e]; 5061 return !!t.hasClass("ug-bullet-active") 5062 }, this.getNumBullets = function() { 5063 return u 5064 } 5065} 5066function UGProgressBar() { 5067 var e, t, i = this, 5068 n = 0, 5069 r = new UGFunctions, 5070 a = { 5071 slider_progressbar_color: "#ffffff", 5072 slider_progressbar_opacity: .6, 5073 slider_progressbar_line_width: 5 5074 }; 5075 this.put = function(i, n) { 5076 n && (a = jQuery.extend(a, n)), i.append("<div class='ug-progress-bar'><div class='ug-progress-bar-inner'></div></div>"), e = i.children(".ug-progress-bar"), t = e.children(".ug-progress-bar-inner"), t.css("background-color", a.slider_progressbar_color), e.height(a.slider_progressbar_line_width), t.height(a.slider_progressbar_line_width), t.width("0%"); 5077 var r = a.slider_progressbar_opacity, 5078 s = t[0]; 5079 s.style.opacity = r, s.style.filter = "alpha(opacity=" + 100 * r + ")" 5080 }, this.putHidden = function(t, n) { 5081 i.put(t, n), e.hide() 5082 }, this.getElement = function() { 5083 return e 5084 }, this.setSize = function(n) {
5085 e.width(n), t.width(n), i.draw() 5086 }, this.setPosition = function(t, i, n, a) { 5087 r.placeElement(e, t, i, n, a) 5088 }, this.draw = function() { 5089 var e = 100 * n; 5090 t.width(e + "%") 5091 }, this.setProgress = function(e) { 5092 n = r.normalizePercent(e), i.draw() 5093 }, this.getType = function() { 5094 return "bar" 5095 } 5096} 5097function UGProgressPie() { 5098 function e(e) { 5099 if (!e) var e = 0; 5100 var t = Math.min(s.slider_progresspie_width, s.slider_progresspie_height) / 2, 5101 n = i[0].getContext("2d"); 5102 0 == r && (r = !0, n.rotate(1.5 * Math.PI), n.translate(-2 * t, 0)), n.clearRect(0, 0, s.slider_progresspie_width, s.slider_progresspie_height); 5103 var a = s.slider_progresspie_width / 2, 5104 o = s.slider_progresspie_height / 2, 5105 l = 0, 5106 u = e * Math.PI * 2; 5107 if (1 == s.slider_progresspie_type_fill) n.beginPath(), n.moveTo(a, o), n.arc(a, o, t, l, u), n.lineTo(a, o), n.fillStyle = s.slider_progresspie_color1, n.fill(), n.closePath(); 5108 else { 5109 n.globalCompositeOperation = "source-over", n.beginPath(), n.moveTo(a, o), n.arc(a, o, t, l, u), n.lineTo(a, o), n.fillStyle = s.slider_progresspie_color1, n.fill(), n.closePath(), n.globalCompositeOperation = "destination-out"; 5110 var d = t - s.slider_progresspie_stroke_width; 5111 n.beginPath(), n.moveTo(a, o), n.arc(a, o, d, l, u), n.lineTo(a, o), n.fillStyle = s.slider_progresspie_color1, n.fill(), n.closePath() 5112 } 5113 1 == s.slider_progresspie_type_fill && (l = u, u = 2 * Math.PI, n.beginPath(), n.arc(a, o, t, l, u), n.lineTo(a, o), n.fillStyle = s.slider_progresspie_color2, n.fill(), n.closePath()) 5114 } 5115 var t, i, n = this, 5116 r = !1, 5117 a = new UGFunctions, 5118 s = { 5119 slider_progresspie_type_fill: !1, 5120 slider_progresspie_color1: "#B5B5B5", 5121 slider_progresspie_color2: "#E5E5E5", 5122 slider_progresspie_stroke_width: 6, 5123 slider_progresspie_width: 30, 5124 slider_progresspie_height: 30 5125 }; 5126 this.put = function(e, t) { 5127 t && (s = jQuery.extend(s, t)), e.append("<canvas class='ug-canvas-pie' width='" + s.slider_progresspie_width + "' height='" + s.slider_progresspie_height + "'></canvas>"), i = e.children(".ug-canvas-pie") 5128 }, this.putHidden = function(t, r) { 5129 n.put(t, r), e(.1), i.hide() 5130 }, this.getElement = function() { 5131 return i 5132 }, this.setPosition = function(e, t) { 5133 a.placeElement(i, e, t) 5134 }, this.getSize = function() { 5135 var e = { 5136 width: s.slider_progresspie_width, 5137 height: s.slider_progresspie_height 5138 }; 5139 return e 5140 }, this.setProgress = function(i) { 5141 i = a.normalizePercent(i), t = i, e(i) 5142 }, this.getType = function() { 5143 return "pie" 5144 } 5145} 5146function UGTouchSliderControl() { 5147 function e(e) { 5148 if (!e) var e = _.getSlidesReference(); 5149 var t = v.getElementSize(e.objCurrentSlide), 5150 i = -t.left, 5151 n = v.getElementSize(h), 5152 r = i - n.left; 5153 return r 5154 } 5155 function t() { 5156 var t = _.getSlidesReference(), 5157 i = e(t), 5158 n = Math.round(3 * t.objCurrentSlide.width() / 8); 5159 if (Math.abs(i) >= n) return !0; 5160 var r = Math.abs(b.lastMouseX - b.startMouseX); 5161 if (Math.abs(b.lastMouseY - b.startMouseY), 20 > r) return !1; 5162 var a = jQuery.now(), 5163 s = a - b.startTime; 5164 return 500 > s 5165 } 5166 function i(e) { 5167 if (1 == _.isInnerInPlace()) return !1; 5168 if (m.trigger(_.events.BEFORE_RETURN), !e) var e = _.getSlidesReference(); 5169 var t = v.getElementSize(e.objCurrentSlide), 5170 i = -t.left; 5171 h.animate({ 5172 left: i + "px" 5173 }, { 5174 duration: f.slider_transition_return_speed, 5175 easing: f.slider_transition_continuedrag_easing, 5176 queue: !1, 5177 progress: function(e, t, n) { 5178 if (1 == b.isDragVideo) { 5179 var r = v.getElementSize(h), 5180 a = r.left, 5181 s = a - i, 5182 o = b.videoStartX + s; 5183 b.videoObject.css("left", o) 5184 } 5185 }, 5186 complete: function() { 5187 m.trigger(_.events.AFTER_RETURN) 5188 } 5189 }) 5190 } 5191 function n(e) { 5192 _.getVideoObject().hide(), _.switchSlideNums(e), _.placeNabourItems() 5193 } 5194 function r() { 5195 var t = _.getSlidesReference(), 5196 r = e(t); 5197 if (0 == r) return !1; 5198 var a = r > 0 ? "left" : "right", 5199 s = !1; 5200 switch (a) { 5201 case "right": 5202 if (_.isSlideHasItem(t.objPrevSlide)) var o = v.getElementSize(t.objPrevSlide), 5203 l = -o.left; 5204 else s = !0; 5205 break;
5206 case "left": 5207 if (_.isSlideHasItem(t.objNextSlide)) var u = v.getElementSize(t.objNextSlide), 5208 l = -u.left; 5209 else s = !0 5210 } 5211 1 == s ? i(t) : h.stop().animate({ 5212 left: l + "px" 5213 }, { 5214 duration: f.slider_transition_continuedrag_speed, 5215 easing: f.slider_transition_continuedrag_easing, 5216 queue: !1, 5217 progress: function() { 5218 if (1 == b.isDragVideo) { 5219 var e = v.getElementSize(h), 5220 t = e.left, 5221 i = t - b.startPosx, 5222 n = b.videoStartX + i; 5223 b.videoObject.css("left", n) 5224 } 5225 }, 5226 always: function() { 5227 n(a), m.trigger(_.events.AFTER_DRAG_CHANGE) 5228 } 5229 }) 5230 } 5231 function a(e) { 5232 var t = b.lastMouseX - b.startMouseX; 5233 if (0 == t) return !0; 5234 var i = 0 > t ? "left" : "right", 5235 n = _.getObjZoom(); 5236 if (n) { 5237 var r = n.isPanEnabled(e, i); 5238 if (1 == r) return b.isInitDataValid = !1, !0; 5239 if (0 == b.isInitDataValid) return s(e), !0 5240 } 5241 var a = b.startPosx + t; 5242 if (t > 0 && a > 0) a /= 3; 5243 else if (0 > t) { 5244 var o = a + h.width(), 5245 l = p.width(); 5246 l > o && (a = b.startPosx + t / 3) 5247 } 5248 if (0 == b.isDragging && (b.isDragging = !0, m.trigger(_.events.START_DRAG)), h.css("left", a + "px"), 1 == b.isDragVideo) { 5249 var u = a - b.startPosx, 5250 d = b.videoStartX + u; 5251 b.videoObject.css("left", d) 5252 } 5253 } 5254 function s(e) { 5255 var t = v.getMousePosition(e); 5256 b.startMouseX = t.pageX, b.startMouseY = t.pageY, b.lastMouseX = b.startMouseX, b.lastMouseY = b.startMouseY, b.startTime = jQuery.now(); 5257 var i = v.getArrTouches(e); 5258 b.startArrTouches = v.getArrTouchPositions(i); 5259 var n = v.getElementSize(h); 5260 b.startPosx = n.left, b.isInitDataValid = !0, b.isDragVideo = !1, v.storeEventData(e, b.storedEventID) 5261 } 5262 function o(e) { 5263 b.touch_active = !1 5264 } 5265 function l(e, t) { 5266 b.touch_active = !0, s(t) 5267 } 5268 function u(e) { 5269 e.preventDefault(), b.isDragging = !1, 1 == _.isAnimating() && h.stop(!0, !0); 5270 var t = v.getArrTouches(e); 5271 return t.length > 1 ? (1 == b.touch_active && o("1"), !0) : 1 == b.touch_active || void l("1", e) 5272 } 5273 function d(e) { 5274 if (0 == b.touch_active) return !0; 5275 if (0 == e.buttons) return o("2"), r(), !0; 5276 v.updateStoredEventData(e, b.storedEventID), e.preventDefault(); 5277 var t = v.getMousePosition(e); 5278 b.lastMouseX = t.pageX, b.lastMouseY = t.pageY; 5279 var i = null; 5280 1 == f.slider_vertical_scroll_ondrag && (i = v.handleScrollTop(b.storedEventID)), "vert" !== i && a(e) 5281 } 5282 function c(e) { 5283 var n = v.getArrTouches(e), 5284 a = n.length, 5285 s = _.isInnerInPlace(); 5286 if (1 == s && 0 == b.touch_active && 0 == a) return !0; 5287 if (0 == a && 1 == b.touch_active) { 5288 o("3"); 5289 var u = !1, 5290 d = v.wasVerticalScroll(b.storedEventID); 5291 0 == d && (u = t()), 1 == u ? r() : i() 5292 } else 1 == a && 0 == b.touch_active && l("2", e) 5293 } 5294 function g() { 5295 p.bind("mousedown touchstart", u), jQuery("body").bind("mousemove touchmove", d), jQuery(window).add("body").bind("mouseup touchend", c) 5296 } 5297 var p, h, m, f, _ = new UGSlider, 5298 v = new UGFunctions, 5299 f = { 5300 slider_transition_continuedrag_speed: 250, 5301 slider_transition_continuedrag_easing: "linear", 5302 slider_transition_return_speed: 300, 5303 slider_transition_return_easing: "easeInOutQuad" 5304 }, b = { 5305 touch_active: !1, 5306 startMouseX: 0, 5307 startMouseY: 0, 5308 lastMouseX: 0, 5309 lastMouseY: 0, 5310 startPosx: 0, 5311 startTime: 0, 5312 isInitDataValid: !1, 5313 slides: null, 5314 lastNumTouches: 0, 5315 isDragging: !1, 5316 storedEventID: "touchSlider", 5317 videoStartX: 0, 5318 isDragVideo: !1, 5319 videoObject: null 5320 }; 5321 this.isTapEventOccured = function(t) { 5322 var i = v.getArrTouches(t), 5323 n = i.length; 5324 if (0 != n || 0 != b.lastNumTouches) return b.lastNumTouches = n, !1; 5325 b.lastNumTouches = n; 5326 var r = _.getSlidesReference(), 5327 a = (e(r), Math.abs(b.lastMouseX - b.startMouseX)), 5328 s = Math.abs(b.lastMouseY - b.startMouseY), 5329 o = jQuery.now(), 5330 l = o - b.startTime; 5331 return 20 > a && 50 > s && 500 > l 5332 }, this.init = function(e, t) { 5333 _ = e, m = jQuery(_), g_objects = e.getObjects(), p = g_objects.g_objSlider, h = g_objects.g_objInner, f = jQuery.extend(f, t), g() 5334 }, this.getLastMousePos = function() { 5335 var e = { 5336 pageX: b.lastMouseX, 5337 pageY: b.lastMouseY 5338 }; 5339 return e 5340 }, this.isTouchActive = function() { 5341 return b.touch_active 5342 } 5343} 5344function UGZoomSliderControl() { 5345 function e(e, t) { 5346 x = e, T = jQuery(x), g_objects = e.getObjects(), y = g_objects.g_objSlider, w = g_objects.g_objInner, I = jQuery.extend(I, t), b() 5347 } 5348 function t() { 5349 var e = x.getScaleMode(); 5350 return "down" != e && (e = "fit"), e 5351 } 5352 function i() { 5353 var e = jQuery.now(), 5354 i = e - E.storeImageLastTime; 5355 if (20 >
5355 i) return !1; 5356 var n = x.getSlidesReference(); 5357 if (E.objSlide = n.objCurrentSlide, E.objImage = n.objCurrentSlide.find("img"), 0 == E.objImage.length) return !1; 5358 E.objImageSize = S.getElementSize(E.objImage), E.objParent = E.objImage.parent(), E.objParentSize = S.getElementSize(E.objParent); 5359 var r = t(); 5360 objPadding = x.getObjImagePadding(), E.objFitImageSize = S.getImageInsideParentDataByImage(E.objImage, r, objPadding); 5361 var e = jQuery.now(); 5362 return E.storeImageLastTime = e, !0 5363 } 5364 function n(e, i) { 5365 var n = x.getSlidesReference(), 5366 r = n.objCurrentSlide.find("img"), 5367 a = t(); 5368 T.trigger(x.events.ZOOM_START); 5369 var s = !0, 5370 o = x.getObjImagePadding(); 5371 if ("back" == e) { 5372 var l = S.getImageOriginalSize(r); 5373 S.scaleImageFitParent(r, l.width, l.height, a, o) 5374 } else { 5375 var u = "in" == e; 5376 s = S.zoomImageInsideParent(r, u, I.slider_zoom_step, i, a, I.slider_zoom_max_ratio, o) 5377 } 5378 1 == s && (T.trigger(x.events.ZOOMING), T.trigger(x.events.ZOOM_CHANGE), T.trigger(x.events.ZOOM_END)) 5379 } 5380 function r(e, t, i) { 5381 var n = S.getArrTouches(t); 5382 if (i === !0) { 5383 if (1 != n.length) return !1 5384 } else if (n.length > 1) return !1; 5385 return !!S.isElementBiggerThenParent(e) 5386 } 5387 function a(e) { 5388 var t = S.getMousePosition(e); 5389 E.startMouseX = t.pageX, E.startMouseY = t.pageY, E.lastMouseX = E.startMouseX, E.lastMouseY = E.startMouseY, E.startImageX = E.objImageSize.left, E.startImageY = E.objImageSize.top, E.panXActive = E.objImageSize.width > E.objParentSize.width, E.panYActive = E.objImageSize.height > E.objParentSize.height 5390 } 5391 function s(e) { 5392 E.isPanActive = !0, a(e) 5393 } 5394 function o(e) { 5395 if (void 0 == E.objImage || 0 == E.objImage.length) return !0; 5396 var t = S.getMousePosition(e), 5397 i = (t.pageX - E.startMouseX, t.pageY - E.startMouseY, t.pageX - E.lastMouseX), 5398 n = t.pageY - E.lastMouseY, 5399 r = 0 > i ? "left" : "right", 5400 a = 0 > n ? "up" : "down"; 5401 E.lastMouseX = t.pageX, E.lastMouseY = t.pageY; 5402 var s = S.getElementSize(E.objImage); 5403 0 == E.panYActive ? n = 0 : "down" == a && s.top > 0 ? n /= 3 : "up" == a && s.bottom < E.objParentSize.height && (n /= 3), 0 == E.panXActive || 0 == x.isInnerInPlace() ? i = 0 : "right" == r && s.left > 0 ? i /= 3 : "left" == r && s.right < E.objParentSize.width && (i /= 3); 5404 var o = s.left + i, 5405 l = s.top + n; 5406 S.placeElement(E.objImage, o, l) 5407 } 5408 function l() { 5409 var e = !1, 5410 t = !1, 5411 i = 0, 5412 n = 0, 5413 r = S.getElementSize(E.objImage), 5414 a = x.getObjImagePadding(), 5415 s = S.getElementCenterPosition(E.objImage, a); 5416 E.panXActive = E.objImageSize.width > E.objParentSize.width, E.panYActive = E.objImageSize.height > E.objParentSize.height, 1 == E.panYActive ? r.top > 0 ? (n = 0, t = !0) : r.bottom < E.objParentSize.height && (n = E.objParentSize.height - r.height, t = !0) : r.top != s.top && (t = !0, n = s.top), 1 == E.panXActive ? r.left > 0 ? (i = 0, e = !0) : r.right < E.objParentSize.width && (i = E.objParentSize.width - r.width, e = !0) : r.left != s.left && (e = !0, i = s.left); 5417 var o = {}; 5418 1 == t && (o.top = n + "px"), 1 == e && (o.left = i + "px"), (1 == t || 1 == e) && E.objImage.animate(o, { 5419 duration: I.slider_zoom_return_pan_duration, 5420 easing: I.slider_zoom_return_pan_easing, 5421 queue: !1 5422 }) 5423 } 5424 function u() { 5425 return !(!E.objImage || !E.objImage.is(":animated")) 5426 } 5427 function d(e) { 5428 E.isZoomActive = !0, E.startDistance = S.getDistance(e[0].pageX, e[0].pageY, e[1].pageX, e[1].pageY), 0 == E.startDistance && (E.startDistance = 1), E.startMiddlePoint = S.getMiddlePoint(e[0].pageX, e[0].pageY, e[1].pageX, e[1].pageY), E.objImageSize = S.getElementSize(E.objImage), E.startImageX = E.objImageSize.left, E.startImageY = E.objImageSize.top, E.imageOrientPoint = S.getElementLocalPoint(E.startMiddlePoint, E.obj
5428Image); 5429 var t = S.isPointInsideElement(E.imageOrientPoint, E.objImageSize); 5430 0 == t && (E.imageOrientPoint = S.getElementCenterPoint(E.objImage)), T.trigger(x.events.ZOOM_START) 5431 } 5432 function c(e) { 5433 if (0 == E.isZoomActive) return !1; 5434 var t = S.getArrTouches(e); 5435 2 != t.length && (E.isZoomActive = !1, T.trigger(x.events.ZOOM_END)) 5436 } 5437 function g(e) { 5438 if (1 == E.isZoomActive) return !0; 5439 var t = S.getArrTouches(e); 5440 return 2 != t.length || void d(t) 5441 } 5442 function p(e) { 5443 var t = S.getArrTouches(e), 5444 i = S.getDistance(t[0].pageX, t[0].pageY, t[1].pageX, t[1].pageY), 5445 n = i / E.startDistance, 5446 r = S.getMiddlePoint(t[0].pageX, t[0].pageY, t[1].pageX, t[1].pageY), 5447 a = E.objImageSize.width * n, 5448 s = E.objImageSize.height * n, 5449 o = S.getImageOriginalSize(E.objImage), 5450 l = 1; 5451 if (o.width > 0 && (l = a / o.width), l > I.slider_zoom_max_ratio) return !0; 5452 panX = -(E.imageOrientPoint.x * n - E.imageOrientPoint.x), panY = -(E.imageOrientPoint.y * n - E.imageOrientPoint.y); 5453 var u = r.x - E.startMiddlePoint.x, 5454 d = r.y - E.startMiddlePoint.y, 5455 c = E.startImageX + panX + u, 5456 g = E.startImageY + panY + d; 5457 S.setElementSizeAndPosition(E.objImage, c, g, a, s), T.trigger(x.events.ZOOMING), T.trigger(x.events.ZOOM_CHANGE) 5458 } 5459 function h() { 5460 if (void 0 == E.objImage || 0 == E.objImage.length) return !0; 5461 var e = S.getElementSize(E.objImage); 5462 if (e.width < E.objFitImageSize.imageWidth) { 5463 E.objImage.css({ 5464 position: "absolute", 5465 margin: "none" 5466 }); 5467 var t = { 5468 top: E.objFitImageSize.imageTop + "px", 5469 left: E.objFitImageSize.imageLeft + "px", 5470 width: E.objFitImageSize.imageWidth + "px", 5471 height: E.objFitImageSize.imageHeight + "px" 5472 }; 5473 E.objImage.animate(t, { 5474 duration: I.slider_zoom_return_pan_duration, 5475 easing: I.slider_zoom_return_pan_easing, 5476 queue: !1 5477 }) 5478 } else l() 5479 } 5480 function m(e) { 5481 return 0 == x.isCurrentSlideType("image") || (i(), void 0 == E.objImage || 0 == E.objImage.length || (e.preventDefault(), 1 == u() && E.objImage.stop(!0), 1 == E.isZoomActive ? c(e) : g(e), void(1 == E.isZoomActive ? E.isPanActive = !1 : 1 == r(E.objImage, e) && 1 == E.isZoomedOnce && s(e)))) 5482 } 5483 function f(e) { 5484 if (0 == x.isCurrentSlideType("image")) return !0; 5485 var t = jQuery(e.target); 5486 if (1 == t.data("ug-button")) return !1; 5487 if (i(), void 0 == E.objImage || 0 == E.objImage.length) return !0; 5488 var n = E.isPanActive, 5489 a = E.isZoomActive; 5490 if (0 == x.isInnerInPlace()) return E.isZoomActive = !1, E.isPanActive = !1, !0; 5491 if (1 == E.isZoomActive ? c(e) : g(e), 1 == E.isZoomActive) E.isPanActive = !1; 5492 else { 5493 var o = r(E.objImage, e, !0); 5494 1 == E.isPanActive ? E.isPanActive = !1 : 1 == o && s(e) 5495 }(n || a) && 0 == E.isZoomActive && 0 == E.isPanActive && h() 5496 } 5497 function _(e) { 5498 return 0 == x.isCurrentSlideType("image") || void(1 == E.isZoomActive ? p(e) : 1 == E.isPanActive && o(e)) 5499 } 5500 function v(e, t, i, r) { 5501 if (0 == I.slider_zoom_mousewheel) return !0; 5502 if (0 == x.isCurrentSlideType("image")) return !0; 5503 e.preventDefault(); 5504 var a = t > 0, 5505 s = S.getMousePosition(e), 5506 o = 1 == a ? "in" : "out"; 5507 n(o, s) 5508 } 5509 function b() { 5510 y.on("mousewheel", v), y.bind("mousedown touchstart", m), jQuery("body").bind("mousemove touchmove", _), jQuery(window).add("body").bind("mouseup touchend", f), T.bind(x.events.BEFORE_RETURN, function() { 5511 h() 5512 }), T.bind(x.events.ITEM_CHANGED, function() { 5513 E.isZoomedOnce = !1 5514 }), T.bind(x.events.ZOOM_CHANGE, function() {
5515 E.isZoomedOnce = !0 5516 }) 5517 } 5518 var y, w, T, x = new UGSlider, 5519 S = new UGFunctions, 5520 I = { 5521 slider_zoom_step: 1.2, 5522 slider_zoom_max_ratio: 6, 5523 slider_zoom_return_pan_duration: 400, 5524 slider_zoom_return_pan_easing: "easeOutCubic" 5525 }, E = { 5526 isPanActive: !1, 5527 startMouseX: 0, 5528 startMouseY: 0, 5529 lastMouseX: 0, 5530 lastMouseY: 0, 5531 startImageX: 0, 5532 startImageY: 0, 5533 panXActive: !1, 5534 panYActive: !1, 5535 objImage: null, 5536 objImageSize: null, 5537 objParent: null, 5538 objParentSize: null, 5539 objSlide: null, 5540 storeImageLastTime: 0, 5541 isZoomActive: !1, 5542 startDistance: 0, 5543 startMiddlePoint: null, 5544 imageOrientPoint: null, 5545 objFitImageSize: null, 5546 isZoomedOnce: !1 5547 }; 5548 this.________EXTERNAL_____________ = function() {}, this.isPanEnabled = function(e, t) { 5549 if (i(), void 0 == E.objImage || 0 == E.objImage.length) return !1; 5550 if (0 == E.isZoomedOnce) return !1; 5551 if (0 == r(E.objImage, e)) return !1; 5552 if (0 == x.isInnerInPlace()) return !1; 5553 if ("left" == t) { 5554 if (E.objImageSize.right <= E.objParentSize.width) return !1 5555 } else if (E.objImageSize.left >= 0) return !1; 5556 return !0 5557 }, this.init = function(t, i) { 5558 e(t, i) 5559 }, this.zoomIn = function() { 5560 n("in") 5561 }, this.zoomOut = function() { 5562 n("out") 5563 }, this.zoomBack = function() { 5564 n("back") 5565 } 5566} 5567function UGWistiaAPI() { 5568 function e() { 5569 return "undefined" != typeof Wistia 5570 } 5571 function t(e, t, n, a, s) { 5572 r = null, o = !1; 5573 var l = e + "_video", 5574 u = "<div id='" + l + "' class='wistia_embed' style='width:" + n + ";height:" + a + ";' data-video-width='" + n + "' data-video-height='" + a + "'> </div>"; 5575 jQuery("#" + e).html(u), r = Wistia.embed(t, { 5576 version: "v1", 5577 videoWidth: n, 5578 videoHeight: a, 5579 container: l, 5580 autoPlay: s 5581 }), o = !0, i() 5582 } 5583 function i() { 5584 r.bind("play", function() { 5585 s.trigger(a.events.START_PLAYING) 5586 }), r.bind("pause", function() { 5587 s.trigger(a.events.STOP_PLAYING) 5588 }), r.bind("end", function() { 5589 s.trigger(a.events.STOP_PLAYING), s.trigger(a.events.VIDEO_ENDED) 5590 }) 5591 } 5592 this.isAPILoaded = !1; 5593 var n, r, a = this, 5594 s = jQuery(this), 5595 o = !1; 5596 this.events = { 5597 START_PLAYING: "start_playing", 5598 STOP_PLAYING: "stop_playing", 5599 VIDEO_ENDED: "video_ended" 5600 }, this.loadAPI = function() { 5601 return 1 == g_ugWistiaAPI.isAPILoaded || (e() ? (g_ugWistiaAPI.isAPILoaded = !0, !0) : (g_ugFunctions.loadJs("fast.wistia.com/assets/external/E-v1.js", !0), void(g_ugWistiaAPI.isAPILoaded = !0))) 5602 }, this.doCommand = function(e) { 5603 if (null == r) return !1; 5604 if (0 == o) return !1; 5605 switch (e) { 5606 case "play": 5607 r.play(); 5608 break; 5609 case "pause": 5610 r.pause() 5611 } 5612 }, this.pause = function() { 5613 a.doCommand("pause") 5614 }, this.play = function() { 5615 a.doCommand("play") 5616 }, this.putVideo = function(i, r, a, s, o) { 5617 return e() ? (t(i, r, a, s, o), !0) : (this.loadAPI(), void(n = setInterval(function() { 5618 e() && (t(i, r, a, s, o), clearInterval(n)) 5619 }, 500))) 5620 }, this.isPlayerReady = function() { 5621 return !(!o || !r) 5622 } 5623} 5624function UGSoundCloudAPI() { 5625 function e() { 5626 return "undefined" != typeof SC 5627 } 5628 function t(e, t, n, s, o) { 5629 r = null, g_isPlayerReady = !1; 5630 var l = e + "_iframe", 5631 u = location.protocol + "//w.soundcloud.com/player/?url=http://api.soundcloud.com/tracks/" + t; 5632 u += "&buying=false&liking=false&download=false&sharing=false&show_artwork=true&show_comments=false&show_playcount=true&show_user=false&hide_related=true&visual
5632=true&start_track=0&callback=true", u += o === !0 ? "&auto_play=true" : "&auto_play=false"; 5633 var d = "<iframe id='" + l + "' src=" + u + " width='" + n + "' height='" + s + "' frameborder='0' scrolling='no' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>"; 5634 jQuery("#" + e).html(d), r = SC.Widget(l), r.bind(SC.Widget.Events.READY, function() { 5635 r && (g_isPlayerReady = !0, i()) 5636 }), a = e 5637 } 5638 function i() { 5639 r.bind(SC.Widget.Events.PLAY, function() { 5640 o.trigger(s.events.START_PLAYING) 5641 }), r.bind(SC.Widget.Events.PAUSE, function() { 5642 o.trigger(s.events.STOP_PLAYING) 5643 }), r.bind(SC.Widget.Events.FINISH, function() { 5644 o.trigger(s.events.STOP_PLAYING), o.trigger(s.events.VIDEO_ENDED) 5645 }) 5646 } 5647 this.isAPILoaded = !1; 5648 var n, r, a, s = this, 5649 o = jQuery(this); 5650 this.events = { 5651 START_PLAYING: "start_playing", 5652 STOP_PLAYING: "stop_playing", 5653 VIDEO_ENDED: "video_ended" 5654 }, this.loadAPI = function() { 5655 return 1 == g_ugSoundCloudAPI.isAPILoaded || (e() ? (g_ugSoundCloudAPI.isAPILoaded = !0, !0) : (g_ugFunctions.loadJs("w.soundcloud.com/player/api.js", !0), void(g_ugSoundCloudAPI.isAPILoaded = !0))) 5656 }, this.putSound = function(i, r, a, s, o) { 5657 return e() ? (t(i, r, a, s, o), !0) : (this.loadAPI(), void(n = setInterval(function() { 5658 e() && (t(i, r, a, s, o), clearInterval(n)) 5659 }, 500))) 5660 }, this.doCommand = function(e) { 5661 if (null == r) return !1; 5662 if (0 == g_isPlayerReady) return !1; 5663 switch (e) { 5664 case "play": 5665 r.play(); 5666 break; 5667 case "pause": 5668 r.pause() 5669 } 5670 }, this.pause = function() { 5671 s.doCommand("pause") 5672 }, this.play = function() { 5673 s.doCommand("play") 5674 }, this.destroy = function() { 5675 g_isPlayerReady = !1, r = null, a && (jQuery("#" + a).html(""), a = null) 5676 } 5677} 5678function UGHtml5MediaAPI() { 5679 function e() { 5680 return "undefined" != typeof mejs 5681 } 5682 function t(e, t, n, a, s) { 5683 r = null, g_isPlayerReady = !1; 5684 var o = location.protocol + "//cdnjs.cloudflare.com/ajax/libs/mediaelement/2.18.1/flashmediaelement-cdn.swf", 5685 l = location.protocol + "//cdnjs.cloudflare.com/ajax/libs/mediaelement/2.18.1/silverlightmediaelement.xap", 5686 u = e + "_video", 5687 d = ""; 5688 s && s === !0 && (d = "autoplay='autoplay'"); 5689 var c = ""; 5690 t.posterImage && (c = "poster='" + t.posterImage + "'"); 5691 var g = "<video id='" + u + "' width='" + n + "' height='" + a + "' controls='controls' preload='none' " + d + " " + c + ">"; 5692 "" != t.mp4 && (g += "<source type='video/mp4' src='" + t.mp4 + "' />"), "" != t.webm && (g += "<source type='video/webm' src='" + t.webm + "' />"), "" != t.ogv && (g += "<source type='video/ogg' src='" + t.ogv + "' />"), g += "<object width='" + n + "' height='" + a + "' type='application/x-shockwave-flash' data='" + o + "'>", g += "<param name='movie' value='" + o + "' />", g += "<param name='flashvars' value='controls=true&file=" + t.mp4 + "' />", g += "</object>", g += "</video>", jQuery("#" + e).html(g), new MediaElement(u, { 5693 enablePluginDebug: !1, 5694 flashName: o, 5695 silverlightName: l, 5696 success: function(e, t) { 5697 g_isPlayerReady = !0, r = e, 0 == s && r.pause(), i() 5698 }, 5699 error: function(e) { 5700 trace(e) 5701 } 5702 }) 5703 } 5704 function i() { 5705 g_ugFunctions.addEvent(r, "play", function() { 5706 s.trigger(a.events.START_PLAYING) 5707 }), g_ugFunctions.addEvent(r, "pause", function() { 5708 s.trigger(a.events.STOP_PLAYING) 5709 }), g_ugFunctions.addEvent(r, "ended", function() { 5710 s.trigger(a.events.STOP_PLAYING), s.trigger(a.events.VIDEO_ENDED) 5711 }) 5712 } 5713 this.isAPILoaded = !1; 5714 var n, r, a = this, 5715 s = jQuery(this); 5716 this.events = { 5717 START_PLAYING: "start_playing", 5718 STOP_PLAYING: "stop_playing", 5719 VIDEO_ENDED: "video_ended" 5720 }, this.loadAPI = function() { 5721 return 1 == g_ugHtml5MediaAPI.isAPILoaded || (e() ? (g_ugHtml5MediaAPI.isAPILoaded = !0, !0) : (g_ugFunctions.loadJs("cdnjs.cloudflare.com/ajax/libs/mediaelement/2.18.1/mediaelement.min.js", !0), g_ugFunctions.loadCss("cdnjs.cloudflare.com/ajax/libs/mediaelement/2.18.1/mediaelementplayer.min.css", !0), void(g_ugHtml5MediaAPI.isAPILoaded = !0))) 5722 }, this.putVideo = function(i, r, a, s, o) { 5723 return e() ? (t(i, r, a, s, o), !0) : (this.loadAPI(), void(n = setInterval(function() { 5724 e() && (t(i, r, a, s, o), clearInterval(n)) 5725 }, 500))) 5726 }, this.doCommand = function(e) { 5727 if (null == r) return !1; 5728 if (0 == g_isPlayerReady) return !1; 5729 switch (e) { 5730 case "play": 5731 r.play(); 5732 break; 5733 case "pause": 5734 r.pause() 5735 } 5736 }, this.pause = function() { 5737 a.doCommand("pause") 5738 }, this.play = function() { 5739 a.doCommand("play") 5740 } 5741} 5742function UGVimeoAPI() { 5743 function e() { 5744 return "undefined" != typeof Froogaloop 5745 } 5746 function t(e, t, n, a, s) { 5747 o = null, l = !1; 5748 var u = location.protocol + "//player.vimeo.com/video/" + t + "?api=1"; 5749 s === !0 && (u += "&byline=0&autoplay=1&title=0&portrait=0"); 5750 var d = "<iframe src=" + u + " width='" + n + "' height='" + a + "' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>"; 5751 jQuery("#" + e).html(d); 5752 var c = jQuery("#" + e + " iframe")[0]; 5753 o = Froogaloop(c), o.addEvent("ready", function() { 5754 o && (l = !0, i()) 5755 }), r = e 5756 } 5757 function i() { 5758 return !!o && (o.addEvent("cuechange", function() { 5759 1 == u && a.play() 5760 }), o.addEvent("play", function() { 5761 s.trigger(a.events.START_PLAYING) 5762 }), o.addEvent("pause", function() { 5763 s.trigger(a.events.STOP_PLAYING) 5764 }), void o.addEvent("finish", function() { 5765 s.trigger(a.events.STOP_PLAYING), s.trigger(a.events.VIDEO_ENDED) 5766 })) 5767 } 5768 this.isAPILoaded = !1; 5769 var n, r, a = this, 5770 s = jQuery(this), 5771 o = null, 5772 l = !1, 5773 u = !1; 5774 this.events = { 5775 START_PLAYING: "start_playing", 5776 STOP_PLAYING: "stop_playing", 5777 VIDEO_ENDED: "video_ended" 5778 }, this.loadAPI = function() { 5779 return 1 == g_ugVimeoAPI.isAPILoaded || (e() ? (g_ugVimeoAPI.isAPILoaded = !0, !0) : (g_ugFunctions.loadJs("f.vimeocdn.com/js/froogaloop2.min.js", !0), void(g_ugVimeoAPI.isAPILoaded = !0))) 5780 }, this.doCommand = function(e) { 5781 if (null == o) return !1; 5782 if (0 == l) return !1; 5783 switch (e) { 5784 default: o.api(e) 5785 } 5786 }, this.pause = function() { 5787 a.doCommand("pause") 5788 }, this.play = function() { 5789 a.doCommand("play") 5790 }, this.destroy = function() { 5791 o && (o.api("unload"), o = null, l = !1), r && jQuery("#" + r).html("") 5792 }, this.putVideo = function(i, r, a, s, o) { 5793 return e() ? (t(i, r, a, s, o), !0) : (this.loadAPI(), void(n = setInterval(function() { 5794 e() && (t(i, r, a, s, o), clearInterval(n)) 5795 }, 500))) 5796 }, this.isPlayerReady = function() {
5797 return !(!l || !o) 5798 }, this.changeVideo = function(e, t) { 5799 return 0 != a.isPlayerReady() && (u = t, void o.api("loadVideo", e)) 5800 }, this.getVideoImages = function(e, t, i) { 5801 var n = location.protocol + "//vimeo.com/api/v2/video/" + e + ".json"; 5802 jQuery.get(n, {}, function(e) { 5803 var n = {}; 5804 n.preview = e[0].thumbnail_large, n.thumb = e[0].thumbnail_medium, i(t, n) 5805 }) 5806 } 5807} 5808function UGYoutubeAPI() { 5809 function e(e, t, r, s, u) { 5810 o && l && o.destroy(); 5811 var d = { 5812 controls: 2, 5813 showinfo: c.video_youtube_showinfo, 5814 rel: 0 5815 }; 5816 u === !0 && (d.autoplay = 1), l = !1, o = new YT.Player(e, { 5817 height: s, 5818 width: r, 5819 videoId: t, 5820 playerVars: d, 5821 events: { 5822 onReady: i, 5823 onStateChange: n 5824 } 5825 }), a = e 5826 } 5827 function t() { 5828 return "undefined" != typeof YT && "undefined" != typeof YT.Player 5829 } 5830 function i() { 5831 l = !0 5832 } 5833 function n() { 5834 if ("function" != typeof o.getPlayerState) return trace("Youtube API error: can't get player state"), !1; 5835 var e = o.getPlayerState(); 5836 switch (e) { 5837 case YT.PlayerState.PLAYING: 5838 u.trigger(s.events.START_PLAYING); 5839 break; 5840 case YT.PlayerState.ENDED: 5841 u.trigger(s.events.STOP_PLAYING), u.trigger(s.events.VIDEO_ENDED); 5842 break; 5843 default: 5844 d == YT.PlayerState.PLAYING && u.trigger(s.events.STOP_PLAYING) 5845 } 5846 d = e 5847 } 5848 this.isAPILoaded = !1; 5849 var r, a, s = this, 5850 o = null, 5851 l = !1, 5852 u = jQuery(this), 5853 d = -1, 5854 c = { 5855 video_youtube_showinfo: !0 5856 }; 5857 this.events = { 5858 START_PLAYING: "start_playing", 5859 STOP_PLAYING: "stop_playing", 5860 VIDEO_ENDED: "video_ended" 5861 }, this.setOptions = function(e) { 5862 c = jQuery.extend(c, e) 5863 }, this.putVideo = function(i, n, a, s, o) { 5864 return t() ? (e(i, n, a, s, o), !0) : (this.loadAPI(), void(r = setInterval(function() { 5865 t() && (e(i, n, a, s, o), clearInterval(r)) 5866 }, 500))) 5867 }, this.loadAPI = function() { 5868 return 1 == g_ugYoutubeAPI.isAPILoaded || ("undefined" != typeof YT ? (g_ugYoutubeAPI.isAPILoaded = !0, !0) : (g_ugFunctions.loadJs("https://www.youtube.com/player_api", !1), void(g_ugYoutubeAPI.isAPILoaded = !0))) 5869 }, this.doCommand = function(e, t) { 5870 if (!o) return !0; 5871 if (0 == l) return !1; 5872 switch (e) { 5873 case "play": 5874 if ("function" != typeof o.playVideo) return !1; 5875 o.playVideo(); 5876 break; 5877 case "pause": 5878 if ("function" != typeof o.pauseVideo) return !1; 5879 o.pauseVideo(); 5880 break; 5881 case "seek": 5882 if ("function" != typeof o.seekTo) return !1; 5883 o.seekTo(t); 5884 break; 5885 case "stopToBeginning": 5886 var i = o.getPlayerState(); 5887 switch (o.pauseVideo(), i) { 5888 case YT.PlayerState.PLAYING: 5889 case YT.PlayerState.ENDED: 5890 case YT.PlayerState.PAUSED: 5891 o.seekTo(0) 5892 } 5893 } 5894 }, this.play = function() { 5895 s.doCommand("play") 5896 }, this.pause = function() { 5897 s.doCommand("pause") 5898 }, this.destroy = function() { 5899 try { 5900 o && (l = !1, o.clearVideo(), o.destroy()) 5901 } catch (e) { 5902 jQuery("#" + a).html("") 5903 } 5904 }, this.stopToBeginning = function() { 5905 s.doCommand("stopToBeginning") 5906 }, this.changeVideo = function(e, t) { 5907 return 0 != s.isPlayerReady() && void(t && 1 == t ? o.loadVideoById(e, 0, "large") : o.cueVideoById(e, 0, "large")) 5908 }, this.isPlayerReady = function() {
5909 return !(!l || !o) 5910 }, this.getVideoImages = function(e) { 5911 var t = {}; 5912 return t.preview = "https://i.ytimg.com/vi/" + e + "/sddefault.jpg", t.thumb = "https://i.ytimg.com/vi/" + e + "/default.jpg", t 5913 } 5914} 5915function UGVideoPlayer() { 5916 function e() { 5917 h.hide() 5918 } 5919 function t() { 5920 m.trigger(h.events.PLAY_START), c && c.hide() 5921 } 5922 function i() { 5923 m.trigger(h.events.PLAY_STOP), c && c.show() 5924 } 5925 function n() { 5926 m.trigger(h.events.VIDEO_ENDED) 5927 } 5928 function r() { 5929 c && (f.setButtonMobileReady(c), f.setButtonOnClick(c, e)), jQuery(_).on(_.events.START_PLAYING, t), jQuery(_).on(_.events.STOP_PLAYING, i), jQuery(_).on(_.events.VIDEO_ENDED, n), jQuery(v).on(v.events.START_PLAYING, t), jQuery(v).on(v.events.STOP_PLAYING, i), jQuery(v).on(v.events.VIDEO_ENDED, n), jQuery(b).on(b.events.START_PLAYING, t), jQuery(b).on(b.events.STOP_PLAYING, i), jQuery(b).on(b.events.VIDEO_ENDED, n), jQuery(y).on(y.events.START_PLAYING, t), jQuery(y).on(y.events.STOP_PLAYING, i), jQuery(y).on(y.events.VIDEO_ENDED, n), jQuery(w).on(w.events.START_PLAYING, t), jQuery(w).on(w.events.STOP_PLAYING, i), jQuery(w).on(w.events.VIDEO_ENDED, n) 5930 } 5931 function a(e) { 5932 var t = ["youtube", "vimeo", "html5", "soundcloud", "wistia"]; 5933 for (var i in t) { 5934 var n = t[i]; 5935 if (n != e) switch (n) { 5936 case "youtube": 5937 _.pause(), _.destroy(), l.hide(); 5938 break; 5939 case "vimeo": 5940 v.pause(), v.destroy(), u.hide(); 5941 break; 5942 case "html5": 5943 b.pause(), d.hide(); 5944 break; 5945 case "soundcloud": 5946 y.pause(), y.destroy(), g.hide(); 5947 break; 5948 case "wistia": 5949 w.pause(), p.hide() 5950 } 5951 } 5952 } 5953 var s, o, l, u, d, c, g, p, h = this, 5954 m = jQuery(this), 5955 f = new UGFunctions, 5956 _ = new UGYoutubeAPI, 5957 v = new UGVimeoAPI, 5958 b = new UGHtml5MediaAPI, 5959 y = new UGSoundCloudAPI, 5960 w = new UGWistiaAPI, 5961 T = null, 5962 x = { 5963 video_enable_closebutton: !0 5964 }; 5965 this.events = { 5966 SHOW: "video_show", 5967 HIDE: "video_hide", 5968 PLAY_START: "video_play_start", 5969 PLAY_STOP: "video_play_stop", 5970 VIDEO_ENDED: "video_ended" 5971 }; 5972 var S = { 5973 standAloneMode: !1, 5974 youtubeInnerID: "", 5975 vimeoPlayerID: "", 5976 html5PlayerID: "", 5977 wistiaPlayerID: "", 5978 soundCloudPlayerID: "" 5979 }; 5980 this.init = function(e, t, i) { 5981 if (s = i, !s) throw new Error("missing gallery ID for video player, it's a must!"); 5982 x = jQuery.extend(x, e), _.setOptions(x), t && 1 == t && (S.standAloneMode = !0) 5983 }, this.setHtml = function(e) { 5984 S.youtubeInnerID = s + "_youtube_inner", S.vimeoPlayerID = s + "_videoplayer_vimeo", S.html5PlayerID = s + "_videoplayer_html5", S.wistiaPlayerID = s + "_videoplayer_wistia", S.soundCloudPlayerID = s + "_videoplayer_soundcloud"; 5985 var t = "<div class='ug-videoplayer' style='display:none'>"; 5986 t += "<div class='ug-videoplayer-wrapper ug-videoplayer-youtube' style='display:none'><div id='" + S.youtubeInnerID + "'></div></div>", t += "<div id='" + S.vimeoPlayerID + "' class='ug-videoplayer-wrapper ug-videoplayer-vimeo' style='display:none'></div>", t += "<div id='" + S.html5PlayerID + "' class='ug-videoplayer-wrapper ug-videoplayer-html5'></div>", t += "<div id='" + S.soundCloudPlayerID + "' class='ug-videoplayer-wrapper ug-videoplayer-soundcloud'></div>", t += "<div id='" + S.wistiaPlayerID + "' class='ug-videoplayer-wrapper ug-videoplayer-wistia'></div>", 0 == S.standAloneMode && 1 == x.video_enable_closebutton && (t += "<div class='ug-videoplayer-button-close'></div>"), t += "</div>", e.append(t), o = e.children(".ug-videoplayer"), l = o.children(".ug-videoplayer-youtube"), u = o.children(".ug-videoplayer-vimeo"), d = o.children(".ug-videoplayer-html5"), g = o.children(".ug-videoplayer-soundcloud"), p = o.children(".ug-videoplayer-wistia"), 0 == S.standAloneMode && 1 == x.video_enable_closebutton && (c = o.children(".ug-videoplayer-button-close")) 5987 }, this.destroy = function() { 5988 c && (c.off("click"), c.off("touchend")), jQuery(_).off(_.events.START_PLAYING), jQuery(_).off(_.events.STOP_PLAYING), jQuery(v).off(v.events.START_PLAYING), jQuery(v).off(v.events.STOP_PLAYING), jQuery(b).off(b.events.START_PLAYING), jQuery(b).off(b.events.STOP_PLAYING), jQuery(y).off(y.events.START_PLAYING, t), jQuery(y).off(y.events.STOP_PLAYING, i), jQuery(w).off(w.events.START_PLAYING, t), jQuery(w).off(w.events.STOP_PLAYING, i), T = null 5989 }, this.initEvents = function() { 5990 r() 5991 }, this.setSize = function(e, t) { 5992 f.setElementSize(o, e, t), c && f.placeElement(c, "right", "top") 5993 }, this.setPosition = function(e, t) { 5994 f.placeElement(o, e, t) 5995 }, this.getObject = function() { 5996 return o 5997 }, this.show = function() { 5998 return 1 == h.isVisible() || (o.show(), o.fadeTo(0, 1), c && c.show(), void m.trigger(h.events.SHOW)) 5999 }, this.hide = function() { 6000 return 0 == h.isVisible() || (a(), T = null, o.hide(), void m.trigger(h.events.HIDE)) 6001 }, this.getActiveAPI = function() { 6002 switch (T) { 6003 case "youtube": 6004 return _; 6005 case "vimeo": 6006 return v; 6007 case "wistia": 6008 return w; 6009 case "soundcloud": 6010 return y; 6011 case "html5": 6012 return b; 6013 default: 6014 return null 6015 } 6016 }, this.pause = function() { 6017 var e = h.getActiveAPI(); 6018 return null != e && void("function" == typeof e.pause && e.pause()) 6019 }, this.isVisible = function() { 6020 return o.is(":visible") 6021 }, this.playYoutube = function(e, t) { 6022 if ("undefined" == typeof t) var t = !0; 6023 a("youtube"), l.show(); 6024 var i = l.children("#" + S.youtubeInnerID); 6025 0 == i.length && l.append("<div id='" + S.youtubeInnerID + "'></div>"), 1 == _.isPlayerReady() && 1 == S.standAloneMode ? _.changeVideo(e, t) : _.putVideo(S.youtubeInnerID, e, "100%", "100%", t), T = "youtube" 6026 }, this.playVimeo = function(e, t) { 6027 if ("undefined" == typeof t) var t = !0; 6028 a("vimeo"), u.show(), v.putVideo(S.vimeoPlayerID, e, "100%", "100%", t), T = "vimeo" 6029 }, this.playHtml5Video = function(e, t, i, n, r) { 6030 if ("undefined" == typeof r) var r = !0; 6031 a("html5"), d.show(); 6032 var s = { 6033 ogv: e, 6034 webm: t, 6035 mp4: i, 6036 posterImage: n 6037 }; 6038 b.putVideo(S.html5PlayerID, s, "100%", "100%", r), T = "html5" 6039 }, this.playSoundCloud = function(e, t) { 6040 if ("undefined" == typeof t) var t = !0; 6041 a("soundcloud"), g.show(), y.putSound(S.soundCloudPlayerID, e, "100%", "100%", t), T = "soundcloud" 6042 }, this.playWistia = function(e, t) { 6043 if ("undefined" == typeof t) var t = !0; 6044 a("wistia"), p.show(), w.putVideo(S.wistiaPlayerID, e, "100%", "100%", t), T = "wistia" 6045 } 6046} 6047function ugCheckForMinJQueryVersion() { 6048 var e = g_ugFunctions.checkMinJqueryVersion("1.8.0"); 6049 if (0 == e) throw new Error("The gallery can run from jquery 1.8 You have jQuery " + jQuery.fn.jquery + " Please update your jQuery library.") 6050} 6051function ugCheckForErrors(e, t) { 6052 function i() { 6053 if ("undefined" == typeof jQuery) throw new Error("jQuery library n
6053ot included") 6054 } 6055 function n() { 6056 if ("function" == typeof jQuery.fn.unitegallery) return !0; 6057 var e = "You have some jquery.js library include that comes after the gallery files js include."; 6058 throw e += "<br> This include eliminates the gallery libraries, and make it not work.", "cms" == t ? (e += "<br><br> To fix it you can:<br> 1. In the Gallery Settings -> Troubleshooting set option: <strong><b>Put JS Includes To Body</b></strong> option to true.", e += "<br> 2. Find the double jquery.js include and remove it.") : e += "<br><br> Please find and remove this jquery.js include and the gallery will work. <br> * There should be only one jquery.js include before all other js includes in the page.", new Error(e) 6059 } 6060 try { 6061 "jquery" == t ? (i(), ugCheckForMinJQueryVersion()) : (ugCheckForMinJQueryVersion(), n()) 6062 } catch (i) { 6063 var r = i.message; 6064 if (r = "Unite Gallery Error: " + r, r = "<div style='font-size:16px;color:#BC0C06;max-width:900px;border:1px solid red;padding:10px;'>" + r + "</div>", "jquery" == t) { 6065 var a = document.getElementById(e); 6066 a.innerHTML = r, a.style.display = "block" 6067 } else jQuery(e).show().html(r); 6068 return !1 6069 } 6070 return !0 6071} 6072function UniteGalleryMain() { 6073 function __________INIT_GALLERY_______() {} 6074 function getThemeFunction(e) { 6075 var t = e; 6076 return -1 == t.indexOf("UGTheme_") && (t = "UGTheme_" + t), t 6077 } 6078 function initTheme(objCustomOptions) { 6079 if (objCustomOptions.hasOwnProperty("gallery_theme")) g_options.gallery_theme = objCustomOptions.gallery_theme; 6080 else { 6081 var defaultTheme = g_options.gallery_theme; 6082 0 == g_ugFunctions.isThemeRegistered(defaultTheme) && (g_options.gallery_theme = g_ugFunctions.getFirstRegisteredTheme()) 6083 } 6084 var themeFunction = getThemeFunction(g_options.gallery_theme); 6085 try { 6086 g_options.gallery_theme = eval(themeFunction) 6087 } catch (e) {} 6088 g_options.gallery_theme = eval(themeFunction), g_objTheme = new g_options.gallery_theme, g_objTheme.init(t, objCustomOptions) 6089 } 6090 function resetOptions() { 6091 g_options = jQuery.extend({}, g_temp.originalOptions), g_selectedItemIndex = -1, g_selectedItem = null, g_objSlider = void 0, g_objThumbs = void 0, g_objSlider = void 0 6092 } 6093 function checkForStartupErrors() { 6094 try { 6095 ugCheckForMinJQueryVersion() 6096 } catch (e) { 6097 throwErrorShowMessage(e.message) 6098 } 6099 "object" == typeof g_objWrapper.outerWidth() && throwErrorShowMessage("You have some buggy script. most chances jquery-ui.js that destroy jquery outerWidth, outerHeight functions. The gallery can't run. Please update jquery-ui.js to latest version."), setTimeout(function() { 6100 ugCheckForErrors(g_galleryID, "cms") 6101 }, 5e3) 6102 } 6103 function runGallery(e, i, n, r) { 6104 var a = "object" == typeof i; 6105 if (a && (g_temp.objCustomOptions = i), 1 == g_temp.isRunFirstTime) { 6106 if (g_galleryID = e, g_objWrapper = jQuery(g_galleryID), 0 == g_objWrapper.length) return trace("div with id: " + g_galleryID + " not found"), !1; 6107 g_objParent = g_objWrapper.parent(), checkForStartupErrors(), g_temp.originalOptions = jQuery.extend({}, g_options), a && (g_options = jQuery.extend(g_options, i)), 1 == g_options.gallery_enable_cache && g_options.gallery_initial_catid && cacheItems(g_options.gallery_initial_catid), t.setSizeClass(); 6108 var s = g_objWrapper.children(); 6109 fillItemsArray(s), loadAPIs(), g_objWrapper.find("img").fadeTo(0, 0).hide(), g_objWrapper.show(), clearInitData() 6110 } else if (t.destroy(), resetOptions(), g_options = jQuery.extend(g_options, g_temp.objCustomOptions), n) { 6111 if (r && 1 == g_options.gallery_enable_cache && cacheItems(r, n), "noitems" == n) return showErrorMessage("No items in this category", ""), !1; 6112 g_objWrapper.html(n); 6113 var s = g_objWrapper.children();
6114 fillItemsArray(s), loadAPIs(), g_objWrapper.children().fadeTo(0, 0).hide(), g_objWrapper.show(), clearInitData() 6115 } 6116 1 == g_temp.isRunFirstTime && 1 == g_options.gallery_enable_tabs && (g_objTabs = new UGTabs, g_objTabs.init(t, g_options)), 1 == g_temp.isRunFirstTime && 1 == g_options.gallery_enable_loadmore && (g_objLoadMore = new UGLoadMore, g_objLoadMore.init(t, g_options)), a && modifyInitParams(g_temp.objCustomOptions), validateParams(), 1 == g_options.gallery_shuffle && t.shuffleItems(), initTheme(g_temp.objCustomOptions), setGalleryHtml(), setHtmlObjectsProperties(); 6117 var o = g_objWrapper.width(); 6118 0 == o ? g_functions.waitForWidth(g_objWrapper, runGalleryActually) : runGalleryActually() 6119 } 6120 function runGalleryActually() { 6121 t.setSizeClass(), 0 == g_temp.isFreestyleMode && 1 == g_options.gallery_preserve_ratio && setHeightByOriginalRatio(), g_objTheme.run(), g_objTabs && g_temp.isRunFirstTime && g_objTabs.run(), preloadBigImages(), initEvents(), g_numItems > 0 && t.selectItem(0), 1 == g_options.gallery_autoplay && t.startPlayMode(), g_temp.isRunFirstTime = !1 6122 } 6123 function showErrorMessage(e, t) { 6124 if ("undefined" == typeof t) var t = "<b>Unite Gallery Error: </b>"; 6125 else t = "<b>" + t + ": </b>"; 6126 e = t + e; 6127 var i = "<div class='ug-error-message-wrapper'><div class='ug-error-message'>" + e + "</div></div>"; 6128 g_objWrapper.children().remove(), g_objWrapper.html(i), g_objWrapper.show() 6129 } 6130 function throwErrorShowMessage(e) { 6131 throw showErrorMessage(e), new Error(e) 6132 } 6133 function modifyInitParams() { 6134 g_options.gallery_images_preload_type || (g_options.gallery_images_preload_type = "minimal"), (void 0 == g_options.gallery_min_height || g_options.gallery_height < g_options.gallery_min_height) && (g_options.gallery_min_height = 0), (void 0 == g_options.gallery_min_width || g_options.gallery_width < g_options.gallery_min_width) && (g_options.gallery_min_width = 0) 6135 } 6136 function validateParams() { 6137 if (!g_options.gallery_theme) throw new Error("The gallery can't run without theme"); 6138 if (jQuery.isNumeric(g_options.gallery_height) && g_options.gallery_height < g_options.gallery_min_height) throw new Error("The <b>gallery_height</b> option must be bigger then <b>gallery_min_height option</b>"); 6139 if (g_options.gallery_width < g_options.gallery_min_width) throw new Error("The <b>gallery_width</b> option must be bigger then <b>gallery_min_width option</b>") 6140 } 6141 function setGalleryHtml() { 6142 g_objWrapper.addClass("ug-gallery-wrapper"), g_objWrapper.append("<div class='ug-overlay-disabled' style='display:none'></div>"), t.setSizeClass() 6143 } 6144 function clearInitData() { 6145 g_objWrapper.children().remove() 6146 } 6147 function storeLastSize() { 6148 var e = t.getSize(); 6149 g_temp.lastWidth = e.width, g_temp.lastHeight = e.height 6150 } 6151 function setHeightByOriginalRatio() { 6152 var e = t.getSize(), 6153 i = e.width / e.height; 6154 if (i != e.orig_ratio) { 6155 var n = e.width / e.orig_ratio; 6156 n = Math.round(n), n < g_options.gallery_min_height && (n = g_options.gallery_min_height), g_objWrapper.height(n) 6157 } 6158 } 6159 function setHtmlObjectsProperties() { 6160 var e = g_functions.getCssSizeParam(g_options.gallery_width), 6161 t = { 6162 "max-width": e, 6163 "min-width": g_functions.getCssSizeParam(g_options.gallery_min_width) 6164 }; 6165 if (0 == g_temp.isFreestyleMode) { 6166 var i = g_functions.getCssSizeParam(g_options.gallery_height); 6167 t.height = i 6168 } else t.overflow = "visible"; 6169 g_options.gallery_background_color && (t["background-color"] = g_options.gallery_background_color), g_objWrapper.css(t) 6170 } 6171 function fillItemByChild(e) { 6172 var i = t.isMobileMode(), 6173 n = e.prop("tagName").toLowerCase(), 6174 r = ""; 6175 if ("a" == n) { 6176 r = e.attr("href"), e = e.children();
6177 var n = e.prop("tagName").toLowerCase() 6178 } 6179 var a = e.data("type"); 6180 void 0 == a && (a = "image"); 6181 var s = {}; 6182 if (s.type = a, "img" == n) { 6183 var o = e.data("lazyload-src"); 6184 o && "" != o && (e.attr("src", o), jQuery.removeData(e, "lazyload-src")); 6185 var l = e.data("image"), 6186 u = e.data("thumb"); 6187 "undefined" == typeof l && (l = null), "undefined" == typeof u && (u = null); 6188 var d = e.attr("src"); 6189 l || (l = d), u || (u = d), u || (u = l), l || (l = u), s.urlThumb = u, s.urlImage = l, s.title = e.attr("alt"), s.objThumbImage = e, s.objThumbImage.attr("src", s.urlThumb) 6190 } else { 6191 if ("image" == a) throw trace("Problematic gallery item found:"), trace(e), trace("Please look for some third party js script that could add this item to the gallery"), new Error("The item should not be image type"); 6192 s.urlThumb = e.data("thumb"), s.title = e.data("title"), s.objThumbImage = null, s.urlImage = e.data("image") 6193 } 6194 if (1 == i) { 6195 var c = e.data("thumb-mobile"); 6196 "undefined" != typeof c && "" != c && (s.urlThumb = c, "img" == n && e.attr("src", s.urlThumb)); 6197 var g = e.data("image-mobile"); 6198 "undefined" != typeof g && "" != g && (s.urlImage = g) 6199 } 6200 s.link = r, s.description = e.attr("title"), s.description || (s.description = e.data("description")), s.description || (s.description = ""), s.isNewAdded = !1, s.isLoaded = !1, s.isThumbImageLoaded = !1, s.objPreloadImage = null, s.isBigImageLoadStarted = !1, s.isBigImageLoaded = !1, s.isBigImageLoadError = !1, s.imageWidth = 0, s.imageHeight = 0, s.thumbWidth = 0, s.thumbHeight = 0, s.thumbRatioByWidth = 0, s.thumbRatioByHeight = 0; 6201 var p = e.data("width"), 6202 h = e.data("height"); 6203 p && "number" == typeof p && h && "number" == typeof h && (s.thumbWidth = p, s.thumbHeight = h, s.thumbRatioByWidth = p / h, s.thumbRatioByHeight = h / p), s.addHtml = null; 6204 var m = void 0 == s.urlImage || "" == s.urlImage, 6205 f = void 0 == s.urlThumb || "" == s.urlThumb; 6206 switch (s.type) { 6207 case "youtube": 6208 if (s.videoid = e.data("videoid"), m || f) { 6209 var _ = g_ugYoutubeAPI.getVideoImages(s.videoid); 6210 m && (s.urlImage = _.preview), f && (s.urlThumb = _.thumb, "img" == n && e.attr("src", s.urlThumb)) 6211 } 6212 g_temp.isYoutubePresent = !0; 6213 break; 6214 case "vimeo": 6215 s.videoid = e.data("videoid"), g_temp.isVimeoPresent = !0; 6216 break; 6217 case "html5video": 6218 s.videoogv = e.data("videoogv"), s.videowebm = e.data("videowebm"), s.videomp4 = e.data("videomp4"), g_temp.isHtml5VideoPresent = !0; 6219 break; 6220 case "soundcloud": 6221 s.trackid = e.data("trackid"), g_temp.isSoundCloudPresent = !0; 6222 break; 6223 case "wistia": 6224 s.videoid = e.data("videoid"), g_temp.isWistiaPresent = !0; 6225 break; 6226 case "custom": 6227 var v = e.children("img"); 6228 v.length && (v = jQuery(v[0]), s.urlThumb = v.attr("src"), s.title = v.attr("alt"), s.objThumbImage = v); 6229 var b = e.children().not("img:first-child"); 6230 b.length && (s.addHtml = b.clone()) 6231 } 6232 return s.objThumbImage && (s.objThumbImage.removeAttr("data-description", ""), s.objThumbImage.removeAttr("data-image", ""), s.objThumbImage.removeAttr("data-thumb", ""), s.objThumbImage.removeAttr("title", "")), s 6233 } 6234 function fillItemsArray(e, t) { 6235 if (t !== !0) g_arrItems = []; 6236 else for (var i = 0; g_numItems > i; i++) g_arrItems[i].isNewAdded = !1; 6237 for (var i = 0; i < e.length; i++) { 6238 var n = jQuery(e[i]), 6239 r = fillItemByChild(n); 6240 numIndex = g_arrItems.length, r.index = numIndex, t === !0 && (r.isNewAdded = !0), g_arrItems.push(r) 6241 } 6242 g_numItems = g_arrItems.length 6243 } 6244 function loadAPIs() { 6245 g_temp.isYoutubePresent && g_ugYoutubeAPI.loadAPI(), g_temp.isVimeoPresent && g_ugVimeoAPI.loadAPI(), g_temp.isHtml5VideoPresent && g_ugHtml5MediaAPI.loadAPI(), g_temp.isSoundCloudPresent && g_ugSoundCloudAPI.loadAPI(), g_temp.isWistiaPresent && g_ugWistiaAPI.loadAPI() 6246 } 6247 function preloadBigImages() { 6248 if ("visible" != g_options.gallery_images_preload_type || g_objThumbs || (g_options.gallery_images_preload_type = "minimal"), 1 == g_temp.isAllItemsPreloaded) return !0; 6249 switch (g_options.gallery_images_preload_type) { 6250 default:
6251 case "minimal": 6252 break; 6253 case "all": 6254 jQuery(g_arrItems).each(function() { 6255 preloadItemImage(this) 6256 }); 6257 break; 6258 case "visible": 6259 jQuery(g_arrItems).each(function() { 6260 var e = this, 6261 t = g_objThumbs.isItemThumbVisible(e); 6262 1 == t && preloadItemImage(e) 6263 }) 6264 } 6265 } 6266 function checkPreloadItemImage(e) { 6267 if (1 == e.isBigImageLoadStarted || 1 == e.isBigImageLoaded || 1 == e.isBigImageLoadError) return !1; 6268 switch (g_options.gallery_images_preload_type) { 6269 default: 6270 case "minimal": 6271 break; 6272 case "all": 6273 preloadItemImage(e); 6274 break; 6275 case "visible": 6276 var t = g_objThumbs.isItemThumbVisible(e); 6277 1 == t && preloadItemImage(e) 6278 } 6279 } 6280 function preloadItemImage(e) { 6281 if (1 == e.isBigImageLoadStarted || 1 == e.isBigImageLoaded || 1 == e.isBigImageLoadError) return !0; 6282 var i = e.urlImage; 6283 return "" == i || void 0 == i ? (e.isBigImageLoadError = !0, !1) : (e.isBigImageLoadStarted = !0, e.objPreloadImage = jQuery("<img/>").attr("src", i), e.objPreloadImage.data("itemIndex", e.index), e.objPreloadImage.on("load", t.onItemBigImageLoaded), e.objPreloadImage.on("error", function() { 6284 var e = jQuery(this), 6285 i = e.data("itemIndex"), 6286 n = g_arrItems[i]; 6287 n.isBigImageLoadError = !0, n.isBigImageLoaded = !1; 6288 var r = jQuery(this).attr("src"); 6289 console.log("Can't load image: " + r), g_objGallery.trigger(t.events.ITEM_IMAGE_UPDATED, [i, n.urlImage]), n.objThumbImage.attr("src", n.urlThumb) 6290 }), void checkAllItemsStartedPreloading()) 6291 } 6292 function preloadNearBigImages(e) { 6293 if (1 == g_temp.isAllItemsPreloaded) return !1; 6294 if (!e) var e = g_selectedItem; 6295 if (!e) return !0; 6296 var t = e.index, 6297 i = t - 1, 6298 n = t + 1; 6299 i > 0 && preloadItemImage(g_arrItems[i]), g_numItems > n && preloadItemImage(g_arrItems[n]) 6300 } 6301 function checkAllItemsStartedPreloading() { 6302 if (1 == g_temp.isAllItemsPreloaded) return !1; 6303 for (var e in g_arrItems) if (0 == g_arrItems[e].isBigImageLoadStarted) return !1; 6304 g_temp.isAllItemsPreloaded = !0 6305 } 6306 function __________END_INIT_GALLERY_______() {} 6307 function __________EVENTS_____________() {} 6308 function onSliderMouseEnter(e) { 6309 1 == g_options.gallery_pause_on_mouseover && 0 == t.isFullScreen() && 1 == g_temp.isPlayMode && g_objSlider && 0 == g_objSlider.isSlideActionActive() && t.pausePlaying() 6310 } 6311 function onSliderMouseLeave(e) { 6312 if (1 == g_options.gallery_pause_on_mouseover && 1 == g_temp.isPlayMode && g_objSlider && 0 == g_objSlider.isSlideActionActive()) { 6313 var i = g_objSlider.isCurrentSlideLoadingImage(); 6314 0 == i && t.continuePlaying() 6315 } 6316 } 6317 function onKeyPress(e) { 6318 var i = jQuery(e.target); 6319 if (i.is("textarea") || i.is("select") || i.is("input")) return !0; 6320 var n = e.charCode ? e.charCode : e.keyCode ? e.keyCode : e.which ? e.which : 0, 6321 r = !0; 6322 switch (n) { 6323 case 39: 6324 t.nextItem(); 6325 break; 6326 case 37: 6327 t.prevItem(); 6328 break; 6329 default: 6330 r = !1 6331 } 6332 1 == r && (e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation()), g_objGallery.trigger(t.events.GALLERY_KEYPRESS, [n, e]) 6333 } 6334 function onGalleryResized() { 6335 var e = t.getSize(); 6336 if (0 == e.width) return !0; 6337 t.setSizeClass(); 6338 var e = t.getSize(); 6339 if (e.width != g_temp.lastWidth || 0 == g_temp.isFreestyleMode && e.height != g_temp.lastHeight) { 6340 var i = !1; 6341 if (g_temp.funcCustomHeight) { 6342 var n = g_temp.funcCustomHeight(e); 6343 n && (g_objWrapper.height(n), i = !0) 6344 } 6345 0 == i && 1 == g_options.gallery_preserve_ratio && 0 == g_temp.isFreestyleMode && setHeightByOriginalRatio(), storeLastSize(), g_objGallery.trigger(t.events.SIZE_CHANGE) 6346 } 6347 } 6348 function onThumbsChange(e) { 6349 "visible" == g_options.gallery_images_preload_type && 0 == g_temp.isAllItemsPreloaded && preloadBigImages() 6350 } 6351 function onFullScreenChange() { 6352 var e = g_functions.isFullScreen(), 6353 i = e ? t.events.ENTER_FULLSCREEN : t.events.EXIT_FULLSCREEN, 6354 n = g_functions.getGlobalData("fullscreenID"); 6355 return g_galleryID !== n || (e ? g_objWrapper.addClass("ug-fullscreen") : g_objWrapper.removeClass("ug-fullscreen"), g_objGallery.trigger(i), void onGalleryResized()) 6356 } 6357 function onItemImageUpdated(e, i) { 6358 var n = t.getItem(i); 6359 checkPreloadItemImage(n) 6360 } 6361 function onCurrentSlideImageLoadEnd() { 6362 1 == t.isPlayMode() && t.continuePlaying() 6363 } 6364 function initEvents() { 6365 if (g_objWrapper.on("dragstart", function(e) { 6366 e.preventDefault() 6367 }
6367), g_objGallery.on(t.events.ITEM_IMAGE_UPDATED, onItemImageUpdated), g_objThumbs) switch (g_temp.thumbsType) { 6368 case "strip": 6369 jQuery(g_objThumbs).on(g_objThumbs.events.STRIP_MOVE, onThumbsChange); 6370 break; 6371 case "grid": 6372 jQuery(g_objThumbs).on(g_objThumbs.events.PANE_CHANGE, onThumbsChange) 6373 } 6374 if ("advance" == g_options.gallery_mousewheel_role && 0 == g_temp.isFreestyleMode && g_objWrapper.on("mousewheel", t.onGalleryMouseWheel), storeLastSize(), jQuery(window).resize(function() { 6375 g_objWrapper.css("width", "auto"), g_functions.whenContiniousEventOver("gallery_resize", onGalleryResized, g_temp.resizeDelay) 6376 }), setTimeout(function() { 6377 setInterval(onGalleryResized, 2e3) 6378 }, 1e4), g_functions.addFullScreenChangeEvent(onFullScreenChange), g_objSlider) { 6379 if (jQuery(g_objSlider).on(g_objSlider.events.ITEM_CHANGED, function() { 6380 var e = g_objSlider.getCurrentItemIndex(); - 1 != e && t.selectItem(e) 6381 }), 1 == g_options.gallery_pause_on_mouseover) { 6382 var e = g_objSlider.getElement(); 6383 e.hover(onSliderMouseEnter, onSliderMouseLeave), g_objGallery.on(t.events.ENTER_FULLSCREEN, function() { 6384 onSliderMouseLeave() 6385 }) 6386 } 6387 retriggerEvent(g_objSlider, g_objSlider.events.ACTION_START, t.events.SLIDER_ACTION_START), retriggerEvent(g_objSlider, g_objSlider.events.ACTION_END, t.events.SLIDER_ACTION_END), jQuery(g_objSlider).on(g_objSlider.events.CURRENTSLIDE_LOAD_END, onCurrentSlideImageLoadEnd) 6388 } 6389 1 == g_options.gallery_control_keyboard && jQuery(document).keydown(onKeyPress) 6390 } 6391 function __________GENERAL_______() {} 6392 function cacheItems(e, t) { 6393 if (t) { 6394 var i = t; 6395 "noitems" != i && (i = jQuery(t).clone()) 6396 } else var i = g_objWrapper.children().clone(); 6397 g_objCache[e] = i 6398 } 6399 function removeAllSizeClasses(e) { 6400 e || (e = g_objWrapper), e.removeClass("ug-under-480"), e.removeClass("ug-under-780"), e.removeClass("ug-under-960") 6401 } 6402 function retriggerEvent(e, t, i) { 6403 jQuery(e).on(t, function(e) { 6404 g_objGallery.trigger(i, [this]) 6405 }) 6406 } 6407 function advanceNextStep() { 6408 var e = jQuery.now(), 6409 i = e - g_temp.playTimeLastStep; 6410 g_temp.playTimeLastStep = e; 6411 var n = t.isGalleryVisible(); 6412 if (0 == n) return !1; 6413 if (g_temp.playTimePassed += i, g_temp.objProgress) { 6414 var r = g_temp.playTimePassed / g_options.gallery_play_interval; 6415 g_temp.objProgress.setProgress(r) 6416 } 6417 g_temp.playTimePassed >= g_options.gallery_play_interval && (t.nextItem(), g_temp.playTimePassed = 0) 6418 } 6419 function unselectSeletedItem() { 6420 return null == g_selectedItem || (g_objThumbs && g_objThumbs.setThumbUnselected(g_selectedItem.objThumbWrapper), g_selectedItem = null, void(g_selectedItemIndex = -1)) 6421 } 6422 function toFakeFullScreen() { 6423 jQuery("body").addClass("ug-body-fullscreen"), g_objWrapper.addClass("ug-fake-fullscreen"), g_temp.isFakeFullscreen = !0, g_objGallery.trigger(t.events.ENTER_FULLSCREEN), g_objGallery.trigger(t.events.SIZE_CHANGE) 6424 } 6425 function exitFakeFullscreen() { 6426 jQuery("body").removeClass("ug-body-fullscreen"), g_objWrapper.removeClass("ug-fake-fullscreen"), g_temp.isFakeFullscreen = !1, g_objGallery.trigger(t.events.EXIT_FULLSCREEN), g_objGallery.trigger(t.events.SIZE_CHANGE) 6427 } 6428 var t = this, 6429 g_galleryID, g_objGallery = jQuery(t), 6430 g_objWrapper, g_objParent, g_objThumbs, g_objSlider, g_functions = new UGFunctions, 6431 g_objTabs, g_objLoadMore, g_arrItems = [], 6432 g_numItems, g_selectedItem = null, 6433 g_selectedItemIndex = -1, 6434 g_objTheme, g_objCache = {}; 6435 this.events = { 6436 ITEM_CHANGE: "item_change", 6437 SIZE_CHANGE: "size_change", 6438 ENTER_FULLSCREEN: "enter_fullscreen", 6439 EXIT_FULLSCREEN: "exit_fullscreen", 6440 START_PLAY: "start_play", 6441 STOP_PLAY: "stop_play", 6442 PAUSE_PLAYING: "pause_playing", 6443 CONTINUE_PLAYING: "continue_playing", 6444 SLIDER_ACTION_START: "slider_action_start", 6445 SLIDER_ACTION_END: "slider_action_end",
6446 ITEM_IMAGE_UPDATED: "item_image_updated", 6447 GALLERY_KEYPRESS: "gallery_keypress", 6448 GALLERY_BEFORE_REQUEST_ITEMS: "gallery_before_request_items", 6449 OPEN_LIGHTBOX: "open_lightbox", 6450 CLOSE_LIGHTBOX: "close_lightbox" 6451 }; 6452 var g_options = { 6453 gallery_width: 900, 6454 gallery_height: 500, 6455 gallery_min_width: 150, 6456 gallery_min_height: 100, 6457 gallery_theme: "default", 6458 gallery_skin: "default", 6459 gallery_images_preload_type: "minimal", 6460 gallery_autoplay: !1, 6461 gallery_play_interval: 3e3, 6462 gallery_pause_on_mouseover: !0, 6463 gallery_mousewheel_role: "zoom", 6464 gallery_control_keyboard: !0, 6465 gallery_carousel: !0, 6466 gallery_preserve_ratio: !0, 6467 gallery_background_color: "", 6468 gallery_debug_errors: !1, 6469 gallery_shuffle: !1, 6470 gallery_urlajax: null, 6471 gallery_enable_tabs: !1, 6472 gallery_enable_loadmore: !1, 6473 gallery_enable_cache: !0, 6474 gallery_initial_catid: "" 6475 }, g_temp = { 6476 objCustomOptions: {}, 6477 isAllItemsPreloaded: !1, 6478 isFreestyleMode: !1, 6479 lastWidth: 0, 6480 lastHeigh: 0, 6481 handleResize: null, 6482 isInited: !1, 6483 isPlayMode: !1, 6484 isPlayModePaused: !1, 6485 playTimePassed: 0, 6486 playTimeLastStep: 0, 6487 playHandle: "", 6488 playStepInterval: 33, 6489 objProgress: null, 6490 isFakeFullscreen: !1, 6491 thumbsType: null, 6492 isYoutubePresent: !1, 6493 isVimeoPresent: !1, 6494 isHtml5VideoPresent: !1, 6495 isSoundCloudPresent: !1, 6496 isWistiaPresent: !1, 6497 resizeDelay: 100, 6498 isRunFirstTime: !0, 6499 originalOptions: {}, 6500 funcCustomHeight: null 6501 }; 6502 this.onItemBigImageLoaded = function(e, t) { 6503 if (!t) var t = jQuery(this); 6504 var i = t.data("itemIndex"), 6505 n = g_arrItems[i]; 6506 n.isBigImageLoaded = !0; 6507 var r = g_functions.getImageOriginalSize(t); 6508 n.imageWidth = r.width, n.imageHeight = r.height 6509 }, this.checkFillImageSize = function(e, t) { 6510 if (!t) { 6511 var i = e.data("itemIndex"); 6512 if (void 0 === i) throw new Error("Wrong image given to gallery.checkFillImageSize"); 6513 var t = g_arrItems[i] 6514 } 6515 var n = g_functions.getImageOriginalSize(e); 6516 t.imageWidth = n.width, t.imageHeight = n.height 6517 }, this.setFreestyleMode = function() { 6518 g_temp.isFreestyleMode = !0 6519 }, this.attachThumbsPanel = function(e, t) { 6520 g_temp.thumbsType = e, g_objThumbs = t 6521 }, this.initSlider = function(e, i) { 6522 if (!e) var e = {}; 6523 e = jQuery.extend(g_temp.objCustomOptions, e), g_objSlider = new UGSlider, g_objSlider.init(t, e, i) 6524 }, this.onGalleryMouseWheel = function(e, i, n, r) { 6525 e.preventDefault(), i > 0 ? t.prevItem() : t.nextItem() 6526 }, this.destroy = function() { 6527 if (g_objWrapper.off("dragstart"), g_objGallery.off(t.events.ITEM_IMAGE_UPDATED), g_objThumbs) switch (g_temp.thumbsType) { 6528 case "strip": 6529 jQuery(g_objThumbs).off(g_objThumbs.events.STRIP_MOVE); 6530 break; 6531 case "grid": 6532 jQuery(g_objThumbs).off(g_objThumbs.events.PANE_CHANGE) 6533 } 6534 if (g_objWrapper.off("mousewheel"), jQuery(window).off("resize"), g_functions.destroyFullScreenChangeEvent(), g_objSlider) { 6535 jQuery(g_objSlider).off(g_objSlider.events.ITEM_CHANGED); 6536 var e = g_objSlider.getElement(); 6537 e.off("mouseenter"), e.off("mouseleave"), g_objGallery.off(t.events.ENTER_FULLSCREEN), jQuery(g_objSlider).off(g_objSlider.events.ACTION_START), jQuery(g_objSlider).off(g_objSlider.events.ACTION_END), jQuery(g_objSlider).off(g_objSlider.events.CURRENTSLIDE_LOAD_END) 6538 } 6539 1 == g_options.gallery_control_keyboard && jQuery(document).off("keydown"), g_objTheme && "function" == typeof g_objTheme.destroy && g_objTheme.destroy(), g_objWrapper.html("") 6540 }, this.getArrItems = function() { 6541 return g_arrItems 6542 }, this.getObjects = function() { 6543 var e = { 6544 g_galleryID: g_galleryID, 6545 g_objWrapper: g_objWrapper, 6546 g_objThumbs: g_objThumbs, 6547 g_objSlider: g_objSlider, 6548 g_options: g_options, 6549 g_arrItems: g_arrItems, 6550 g_numItems: g_numItems 6551 }; 6552 return e 6553 }, this.getObjSlider = function() { 6554 return g_objSlider 6555 }, this.getItem = function(e) { 6556 if (0 > e) throw new Error("item with index: " + e + " not found"); 6557 if (e >= g_numItems) throw new Error("item with index: " + e + " not found"); 6558 return g_arrItems[e] 6559 }, this.getWidth = function() { 6560 var e = t.getSize(); 6561 return e.width 6562 }, this.getHeight = function() { 6563 var e = t.getSize(); 6564 return e.height 6565 }
6565, this.getSize = function() { 6566 var e = g_functions.getElementSize(g_objWrapper); 6567 return e.orig_width = g_options.gallery_width, e.orig_height = g_options.gallery_height, e.orig_ratio = e.orig_width / e.orig_height, e 6568 }, this.getGalleryID = function() { 6569 var e = g_galleryID.replace("#", ""); 6570 return e 6571 }, this.getNextItem = function(e, t) { 6572 "object" == typeof e && (e = e.index); 6573 var i = e + 1; 6574 if (t !== !0 && 1 == g_numItems) return null; 6575 if (i >= g_numItems) { 6576 if (1 != g_options.gallery_carousel && t !== !0) return null; 6577 i = 0 6578 } 6579 var n = g_arrItems[i]; 6580 return n 6581 }, this.getPrevItem = function(e) { 6582 "object" == typeof e && (e = e.index); 6583 var t = e - 1; 6584 if (0 > t) { 6585 if (1 != g_options.gallery_carousel && forceCarousel !== !0) return null; 6586 t = g_numItems - 1 6587 } 6588 var i = g_arrItems[t]; 6589 return i 6590 }, this.getSelectedItem = function() { 6591 return g_selectedItem 6592 }, this.getSelectedItemIndex = function() { 6593 return g_selectedItemIndex 6594 }, this.getNumItems = function() { 6595 return g_numItems 6596 }, this.isLastItem = function() { 6597 return g_selectedItemIndex == g_numItems - 1 6598 }, this.isFirstItem = function() { 6599 return 0 == g_selectedItemIndex 6600 }, this.getOptions = function() { 6601 return g_options 6602 }, this.getElement = function() { 6603 return g_objWrapper 6604 }, this.___________SET_CONTROLS___________ = function() {}, this.setNextButton = function(e) { 6605 e.data("ug-button", !0), g_functions.setButtonOnClick(e, t.nextItem) 6606 }, this.setPrevButton = function(e) { 6607 e.data("ug-button", !0), g_functions.setButtonOnClick(e, t.prevItem) 6608 }, this.setFullScreenToggleButton = function(e) { 6609 e.data("ug-button", !0), g_functions.setButtonOnTap(e, t.toggleFullscreen), g_objGallery.on(t.events.ENTER_FULLSCREEN, function() { 6610 e.addClass("ug-fullscreenmode") 6611 }), g_objGallery.on(t.events.EXIT_FULLSCREEN, function() { 6612 e.removeClass("ug-fullscreenmode") 6613 }) 6614 }, this.destroyFullscreenButton = function(e) { 6615 g_functions.destroyButton(e), g_objGallery.off(t.events.ENTER_FULLSCREEN), g_objGallery.off(t.events.EXIT_FULLSCREEN) 6616 }, this.setPlayButton = function(e) { 6617 e.data("ug-button", !0), g_functions.setButtonOnClick(e, t.togglePlayMode), g_objGallery.on(t.events.START_PLAY, function() { 6618 e.addClass("ug-stop-mode") 6619 }), g_objGallery.on(t.events.STOP_PLAY, function() { 6620 e.removeClass("ug-stop-mode") 6621 }) 6622 }, this.destroyPlayButton = function(e) { 6623 g_functions.destroyButton(e), g_objGallery.off(t.events.START_PLAY), g_objGallery.off(t.events.STOP_PLAY) 6624 }, this.setProgressIndicator = function(e) { 6625 g_temp.objProgress = e 6626 }, this.setTextContainers = function(e, i) { 6627 g_objGallery.on(t.events.ITEM_CHANGE, function() { 6628 var n = t.getSelectedItem(); 6629 e.html(n.title), i.html(n.description) 6630 }) 6631 }, this.showDisabledOverlay = function() { 6632 g_objWrapper.children(".ug-overlay-disabled").show() 6633 }, this.hideDisabledOverlay = function() { 6634 g_objWrapper.children(".ug-overlay-disabled").hide() 6635 }, this.___________END_SET_CONTROLS___________ = function() {}, this.___________PLAY_MODE___________ = function() {}, this.startPlayMode = function() { 6636 if (g_temp.isPlayMode = !0, g_temp.isPlayModePaused = !1, g_temp.playTimePassed = 0, g_temp.playTimeLastStep = jQuery.now(), g_temp.playHandle = setInterval(advanceNextStep, g_temp.playStepInterval), g_temp.objProgress) { 6637 var e = g_temp.objProgress.getElement(); 6638 g_temp.objProgress.setProgress(0), e.show() 6639 } 6640 g_objGallery.trigger(t.events.START_PLAY), g_objSlider && 1 == g_objSlider.isCurrentSlideLoadingImage() && t.pausePlaying() 6641 }, this.resetPlaying = function() { 6642 return 0 == g_temp.isPlayMode || (g_temp.playTimePassed = 0, void(g_temp.playTimeLastStep = jQuery.now())) 6643 }, this.pausePlaying = function() { 6644 return 1 == g_temp.isPlayModePaused || (g_temp.isPlayModePaused = !0, clearInterval(g_temp.playHandle), void g_objGallery.trigger(t.events.PAUSE_PLAYING)) 6645 }, this.continuePlaying = function() { 6646 return 0 == g_temp.isPlayModePaused || (g_temp.isPlayModePaused = !1, g_temp.playTimeLastStep = jQuery.now(), void(g_temp.playHandle = setInterval(advanceNextStep, g_temp.playStepInterval))) 6647 }, this.stopPlayMode = function() { 6648 if (g_temp.isPlayMode = !1, clearInterval(g_temp.playHandle), g_temp.playTimePassed = 0, g_temp.objProgress) { 6649 var e = g_temp.objProgress.getElement(); 6650 e.hide() 6651 } 6652 g_objGallery.trigger(t.events.STOP_PLAY) 6653 }, this.isPlayMode = function() { 6654 return g_temp.isPlayMode 6655 }, this.togglePlayMode = function() { 6656 0 == t.isPlayMode() ? t.startPlayMode() : t.stopPlayMode() 6657 }, this.___________GENERAL_EXTERNAL___________ = function() {}, this.shuffleItems = function() { 6658 g_arrItems = g_functions.arrayShuffle(g_arrItems); 6659 for (var e in g_arrItems) g_arrItems[e].index = parseInt(e) 6660 }, this.setOptions = function(e) { 6661 g_options = jQuery.extend(g_options, e) 6662 }, this.selectItem = function(e, i) { 6663 "number" == typeof e && (e = t.getItem(e));
6664 var n = e.index; 6665 if (n == g_selectedItemIndex) return !0; 6666 if (unselectSeletedItem(), g_selectedItem = e, g_selectedItemIndex = n, g_objGallery.trigger(t.events.ITEM_CHANGE, [e, i]), 1 == g_temp.isPlayMode) { 6667 t.resetPlaying(); 6668 var r = g_objSlider.isCurrentSlideLoadingImage(); 6669 1 == r && t.pausePlaying() 6670 } 6671 }, this.nextItem = function() { 6672 var e = g_selectedItemIndex + 1; 6673 return 0 == g_numItems || (0 == g_options.gallery_carousel && e >= g_numItems || (e >= g_numItems && (e = 0), void t.selectItem(e, "next"))) 6674 }, this.prevItem = function() { 6675 var e = g_selectedItemIndex - 1; 6676 return -1 == g_selectedItemIndex && (e = 0), 0 == g_numItems || (0 == g_options.gallery_carousel && 0 > e || (0 > e && (e = g_numItems - 1), void t.selectItem(e, "prev"))) 6677 }, this.isFullScreen = function() { 6678 return 1 == g_temp.isFakeFullscreen || 1 == g_functions.isFullScreen() 6679 }, this.isFakeFullscreen = function() { 6680 return g_temp.isFakeFullscreen 6681 }, this.toFullScreen = function() { 6682 g_functions.setGlobalData("fullscreenID", g_galleryID); 6683 var e = g_objWrapper.get(0), 6684 t = g_functions.toFullscreen(e); 6685 0 == t && toFakeFullScreen() 6686 }, this.exitFullScreen = function() { 6687 1 == g_temp.isFakeFullscreen ? exitFakeFullscreen() : g_functions.exitFullscreen() 6688 }, this.toggleFullscreen = function() { 6689 0 == t.isFullScreen() ? t.toFullScreen() : t.exitFullScreen() 6690 }, this.resize = function(e, t, i) { 6691 g_objWrapper.css("width", "auto"), g_objWrapper.css("max-width", e + "px"), t && g_objWrapper.height(t), i || i === !0 || onGalleryResized() 6692 }, this.setSizeClass = function(e, i) { 6693 if (!e) var e = g_objWrapper; 6694 if (!i) var n = t.getSize(), 6695 i = n.width; 6696 if (0 == i) var i = jQuery(window).width(); 6697 var r = ""; 6698 return 480 >= i ? r = "ug-under-480" : 780 >= i ? r = "ug-under-780" : 960 > i && (r = "ug-under-960"), 1 == e.hasClass(r) || (removeAllSizeClasses(e), void("" != r && e.addClass(r))) 6699 }, this.isMobileMode = function() { 6700 return !!g_objWrapper.hasClass("ug-under-480") 6701 }, this.isSmallWindow = function() { 6702 var e = jQuery(window).width(); 6703 return !e || 480 >= e 6704 }, this.isGalleryVisible = function() { 6705 var e = g_objWrapper.is(":visible"); 6706 return e 6707 }, this.changeItems = function(e, t) { 6708 if (!e) var e = "noitems"; 6709 runGallery(g_galleryID, "nochange", e, t) 6710 }, this.addItems = function(e) { 6711 if (!e || 0 == e.length) return !1; 6712 var t = g_objWrapper.children(".ug-newitems-wrapper"); 6713 0 == t.length && g_objWrapper.append("<div class='ug-newitems-wrapper' style='display:none'></div>"), t = g_objWrapper.children(".ug-newitems-wrapper"), t.append(e); 6714 var i = jQuery(t.children()); 6715 if (fillItemsArray(i, !0), loadAPIs(), !g_objTheme || "function" != typeof g_objTheme.addItems) throw new Error("addItems function not found in the theme"); 6716 t.remove(), g_objTheme.addItems() 6717 }, this.getNewAddedItemsIndexes = function() { 6718 var e = []; 6719 return jQuery.each(g_arrItems, function(t, i) { 6720 1 == i.isNewAdded && e.push(t) 6721 }), e 6722 }, this.showErrorMessageReplaceGallery = function(e) { 6723 showErrorMessage(e) 6724 }, this.setFuncCustomHeight = function(e) { 6725 g_temp.funcCustomHeight = e 6726 }, this.__________EXTERNAL_EVENTS_______ = function() {}, this.triggerEvent = function(e, t) { 6727 t ? ("array" != jQuery.type(t) && (t = [t]), g_objGallery.trigger(e, t)) : g_objGallery.trigger(e) 6728 }, this.onEvent = function(e, t) { 6729 g_objGallery.on(e, t) 6730 }, this.destroyEvent = function(e) { 6731 g_objGallery.off(e) 6732 }, this.__________AJAX_REQUEST_______ = function() {}, this.ajaxRequest = function(e, t, i, n) { 6733 if (!i || "function" != typeof i) throw new Error("ajaxRequest error: success function should be passed"); 6734 var r = g_options.gallery_urlajax; 6735 if (!r || "" == r) throw new Error("ajaxRequest error: Ajax url don't passed"); 6736 if ("undefined" == typeof t) var t = {}; 6737 var a = { 6738 action: "unitegallery_ajax_action", 6739 client_action: e, 6740 galleryID: g_galleryID, 6741 data: t 6742 }; 6743 jQuery.ajax({ 6744 type: "post", 6745 url: g_options.gallery_urlajax, 6746 dataType: "json", 6747 data: a, 6748 success: function(e) { 6749 if (!e) throw new Error("Empty ajax response!"); 6750 if (-1 == e || 0 === e) throw new Error("ajax error!!!"); 6751 if ("undefined" == typeof e.success) throw new Error("ajax error!!!"); 6752 return 0 == e.success ? (showErrorMessage(e.message, "ajax error"), !1) : void i(e) 6753 }, 6754 error: function(e, t, i) { 6755 console.log("Ajax Error!!! " + t), responseText = e.responseText, n && "function" == typeof n ? n(responseText) : trace(responseText) 6756 } 6757 }) 6758 }, this.requestNewItems = function(e, i, n) { 6759 var r = g_options.gallery_enable_cache; 6760 if (n || (n = e), 1 == i && (r = !1), 1 == r && g_objCache.hasOwnProperty(n)) { 6761 var a = g_objCache[n]; 6762 t.changeItems(a, n) 6763 } else g_objGallery.trigger(t.events.GALLERY_BEFORE_REQUEST_ITEMS), t.ajaxRequest("front_get_cat_items", { 6764 catid: e 6765 }, function(e) { 6766 var i = e.html; 6767 t.changeItems(i, n) 6768 }) 6769 }, this.run = function(e, t) { 6770 if (g_options.gallery_debug_errors, t && t.hasOwnProperty("gallery_debug_errors") && (g_options.gallery_debug_errors = t.gallery_debug_errors), 1 == g_options.gallery_debug_errors) try { 6771 runGallery(e, t) 6772 } catch (e) { 6773 if ("object" == typeof e) { 6774 var i = e.message, 6775 n = e.lineNumber, 6776 r = e.fileName; 6777 e.stack, i += " <br><br> in file: " + r, i += " <b> line " + n + "</b>", trace(e) 6778 } else var i = e; 6779 i = i.replace("Error:", ""), showErrorMessage(i) 6780 } else runGallery(e, t) 6781 } 6782} 6783function UGLightbox() { 6784 function e(e, i) { 6785 ie = e, X = jQuery(e), se = jQuery.extend(se, le), se = jQuery.extend(se, i), oe.originalOptions = jQuery.extend({}, se), "compact" == se.lightbox_type && (oe.isCompact = !0, se = jQuery.extend(se, ue), se = jQuery.extend(se, i)), t(), 1 == oe.putSlider ? (ie.initSlider(se, "lightbox"), g_objects = e.getObjects(), ne = g_objects.g_objSlider) : ne = null, 1 == se.lightbox_show_textpanel ? ae.init(ie, se, "lightbox") : ae = null 6786 } 6787 function t() { 6788 1 == oe.isCompact && 1 == se.lightbox_show_textpanel && (se.lightbox_slider_image_padding_bottom = oe.initTextPanelHeight), 1 == oe.isCompact && "inside" == se.lightbox_arrows_position && (
6788oe.isArrowsInside = !0), 1 == oe.isArrowsInside && 0 == se.lightbox_arrows_inside_alwayson && (oe.isArrowsOnHoverMode = !0), 0 == se.lightbox_show_textpanel && (oe.isTopPanelEnabled = !1, oe.topPanelHeight = 0, se.lightbox_slider_image_padding_top = 0) 6789 } 6790 function i() { 6791 var e = "", 6792 t = ""; 6793 1 == oe.isCompact && (t = " ug-lightbox-compact"), e += "<div class='ug-gallery-wrapper ug-lightbox" + t + "'>", e += "<div class='ug-lightbox-overlay'></div>", 0 == oe.isCompact && oe.isTopPanelEnabled ? (e += "<div class='ug-lightbox-top-panel'>", e += "<div class='ug-lightbox-top-panel-overlay'></div>", se.lightbox_show_numbers && (e += "<div class='ug-lightbox-numbers'></div>"), e += "</div>") : se.lightbox_show_numbers && (e += "<div class='ug-lightbox-numbers'></div>"), e += "<div class='ug-lightbox-button-close'></div>", e += "<div class='ug-lightbox-arrow-left'></div>", e += "<div class='ug-lightbox-arrow-right'></div>", e += "</div>", U = jQuery(e), jQuery("body").append(U), ne && ne.setHtml(U), V = U.children(".ug-lightbox-overlay"), 0 == oe.isCompact && 1 == oe.isTopPanelEnabled && (J = U.children(".ug-lightbox-top-panel"), 0 == J.length && (J = null)), K = U.find(".ug-lightbox-button-close"), se.lightbox_show_numbers && ($ = U.find(".ug-lightbox-numbers")), q = U.children(".ug-lightbox-arrow-left"), Z = U.children(".ug-lightbox-arrow-right"), ae && (J ? ae.appendHTML(J) : ae.appendHTML(U)) 6794 } 6795 function n() { 6796 if (null !== se.lightbox_overlay_color && V.css("background-color", se.lightbox_overlay_color), null !== se.lightbox_overlay_opacity && V.fadeTo(0, se.lightbox_overlay_opacity), J && null !== se.lightbox_top_panel_opacity && J.children(".ug-lightbox-top-panel-overlay").fadeTo(0, se.lightbox_top_panel_opacity), $) { 6797 var e = {}; 6798 null !== se.lightbox_numbers_size && (e["font-size"] = se.lightbox_numbers_size + "px"), se.lightbox_numbers_color && (e.color = se.lightbox_numbers_color), null !== se.lightbox_numbers_padding_right && (e["padding-right"] = se.lightbox_numbers_padding_right + "px"), null !== se.lightbox_numbers_padding_top && (e["padding-top"] = se.lightbox_numbers_padding_top + "px"), $.css(e) 6799 } 6800 } 6801 function r(e) { 6802 if (!ne) return !0; 6803 var t = { 6804 slider_image_padding_top: e 6805 }; 6806 ne.setOptions(t), ne.refreshSlideItems() 6807 } 6808 function a(e) { 6809 if (!J) return !1; 6810 if (!ae) return !1; 6811 var t = J.height(); 6812 if (0 == t) return !1; 6813 if (0 == J.is(":visible")) return !1; 6814 var i = t, 6815 n = ae.getSize(), 6816 a = n.height; 6817 t != oe.topPanelHeight && (i = oe.topPanelHeight), a > i && (i = a), t != i && (J.height(i), ne && 0 == ne.isAnimating() && r(i)) 6818 } 6819 function s(e) { 6820 var t = {}, i = se.lightbox_textpanel_width, 6821 n = 47, 6822 r = 40, 6823 s = e.width - n - r; 6824 i > s ? (t.textpanel_padding_left = n, t.textpanel_padding_right = r, t.textpanel_title_text_align = "center", t.textpanel_desc_text_align = "center") : (t.textpanel_padding_left = Math.floor((e.width - i) / 2), t.textpanel_padding_right = t.textpanel_padding_left, t.textpanel_title_text_align = "left", t.textpanel_desc_text_align = "left", se.lightbox_textpanel_title_text_align && (t.textpanel_title_text_align = se.lightbox_textpanel_desc_text_align), se.lightbox_textpanel_desc_text_align && (t.textpanel_desc_text_align = se.lightbox_textpanel_desc_text_align)), ae.setOptions(t), ae.refresh(!0, !0), a("positionTextPanelWide"), ae.positionPanel() 6825 } 6826 function o() { 6827 return !!J && void J.hide() 6828 } 6829 function l() { 6830 return !!J && void J.show() 6831 } 6832 function u(e) { 6833 if (0 == oe.isOpened) return !1; 6834 if (!ae) return !1; 6835 if (!ne) return !1; 6836 var t = re.getElementSize(U), 6837 i = ae.getSize(); 6838 if (0 == i.width || i.height > 120) return !1; 6839 if (!e) var n = ne.getSlideImage(), 6840 e = re.getElementSize(n); 6841 if (0 == e.height || 0 == e.width) return !1; 6842 var r = e.bottom + i.height; 6843 if (r < t.height) return !1; 6844 var a = ne.getOptions(), 6845 s = i.height; 6846 if (s != a.slider_image_padding_bottom) { 6847 var o = { 6848 slider_image_padding_bottom: s 6849 }; 6850 if (0 == ne.isAnimating()) return ne.setOptions(o), ne.refreshSlideItems(), !0 6851 } 6852 return !1 6853 } 6854 function d(e, t) { 6855 if (!e) var i = ne.getSlideImage(), 6856 e = re.getElementSize(i); 6857 oe.textPanelTop = e.bottom, t === !0 && ae.positionPanel(oe.textPanelTop, oe.textPanelLeft) 6858 } 6859 function c(e) { 6860 var t = (re.getElementSize(U), ne.getSlideImage()), 6861 i = re.getElementSize(t); 6862 if (0 == i.width) return !1; 6863 oe.textPanelLeft = i.left, oe.textPanelTop = i.bottom; 6864 var n = i.width; 6865 if ($) { 6866 var r = re.getElementSize($); 6867 n -= r.width; 6868 var a = i.right - r.width; 6869 re.placeElement($, a, oe.textPanelTop) 6870 } 6871 ae && (ae.show(), ae.refresh(!0, !0, n), d(i)); 6872 var s = u(i); 6873 0 == s && (oe.positionFrom = "handleCompactTextpanelSizes", ae && (ae.positionPanel(oe.textPanelTop, oe.textPanelLeft), e === !0 && (e(), C()))) 6874 } 6875 function g() { 6876 if (0 == ne.isCurrentSlideType("image")) return !0; 6877 var e = 1 == ne.isCurrentImageInPlace(); 6878 return e 6879 } 6880 function p(e, t) { 6881 if (0 == oe.isArrowsInside) return !1; 6882 if (!q) return !1; 6883 var i = g(); 6884 if (q.show(), Z.show(), oe.positionFrom = "positionArrowsInside", 1 == oe.isArrowsOnHoverMode && 1 == i && 0 == y() && w(!0), 0 == i) var n = re.getElementRelativePos(q, "left", se.lightbox_arrows_offset), 6885 r = re.getElementRelativePos(q, "middle"), 6886 a = re.getElementRelativePos(Z, "right", se.lightbox_arrows_offset), 6887 s = r; 6888 else var o = ne.getSlideImage(), 6889 l = re.getElementSize(o), 6890 n = (re.getElementSize(ne.getElement()), re.getElementRelativePos(q, "left", 0, o) + l.left + se.lightbox_arrows_inside_offset), 6891 r = re.getElementRelativePos(q, "middle", 0, o) + l.top, 6892 a = re.getElementRelativePos(q, "right", 0, o) + l.left - se.lightbox_arrows_inside_offset, 6893 s = r; 6894 if (t === !0) { 6895 var u = { 6896 left: n, 6897 top: r 6898 }, d = { 6899 left: a, 6900 top: s 6901 }; 6902 q.stop().animate(u, { 6903 duration: oe.fadeDuration 6904 }), Z.stop().animate(d, { 6905 duration: oe.fadeDuration 6906 }) 6907 }
6907 else q.stop(), Z.stop(), re.placeElement(q, n, r), re.placeElement(Z, a, s); 6908 1 == e && x(t) 6909 } 6910 function h(e, t) { 6911 oe.positionFrom = null; 6912 var i = g(), 6913 n = 2, 6914 r = re.getElementRelativePos(K, "right", 2, U); 6915 if (0 == i) var a = n, 6916 s = r; 6917 else { 6918 var o = ne.getSlideImage(), 6919 l = re.getElementSize(o), 6920 u = re.getElementSize(ne.getElement()), 6921 d = re.getElementSize(K); 6922 u.top == u.height && (u.top = 0); 6923 var s = u.left + l.right - d.width / 2 + se.lightbox_compact_closebutton_offsetx, 6924 a = u.top + l.top - d.height / 2 - se.lightbox_compact_closebutton_offsety; 6925 n > a && (a = n), s > r && (s = r) 6926 } 6927 if (t === !0) { 6928 var c = { 6929 left: s, 6930 top: a 6931 }; 6932 K.stop().animate(c, { 6933 duration: oe.fadeDuration 6934 }) 6935 } else K.stop(), re.placeElement(K, s, a); 6936 e === !0 && S(t) 6937 } 6938 function m() { 6939 K && K.stop().fadeTo(oe.fadeDuration, 0), v(), b(), oe.positionFrom = "hideCompactElements", 1 == oe.isArrowsInside && w() 6940 } 6941 function f() { 6942 K && K.hide(), q && 1 == oe.isArrowsInside && (q.hide(), Z.hide()), $ && $.hide(), ae && ae.hide() 6943 } 6944 function _() { 6945 var e = re.getElementSize(U); 6946 J && re.setElementSizeAndPosition(J, 0, 0, e.width, oe.topPanelHeight), q && 0 == oe.isArrowsInside && (1 == se.lightbox_hide_arrows_onvideoplay && (q.show(), Z.show()), re.placeElement(q, "left", "middle", se.lightbox_arrows_offset), re.placeElement(Z, "right", "middle", se.lightbox_arrows_offset)), 0 == oe.isCompact && re.placeElement(K, "right", "top", 2, 2), ae && (oe.positionFrom = "positionElements", 0 == oe.isCompact ? s(e) : (P(), C())); 6947 var t = e.width, 6948 i = e.height, 6949 n = 0, 6950 r = 0; 6951 if (ne) { 6952 if (J) { 6953 var a = J.height(), 6954 o = { 6955 slider_image_padding_top: a 6956 }; 6957 ne.setOptions(o) 6958 } 6959 ne.setSize(t, i), ne.setPosition(r, n) 6960 } 6961 } 6962 function v() { 6963 ae && ae.getElement().stop().fadeTo(oe.fadeDuration, 0) 6964 } 6965 function b() { 6966 $ && $.stop().fadeTo(oe.fadeDuration, 0) 6967 } 6968 function y() { 6969 if (!oe.lastMouseX) return !0; 6970 var e = { 6971 pageX: oe.lastMouseX, 6972 pageY: oe.lastMouseY 6973 }, t = ne.isMouseInsideSlideImage(e); 6974 return t 6975 } 6976 function w(e, t) { 6977 return !!q && (1 == oe.isArrowsOnHoverMode && t === !1 ? (1 == y(), !0) : void(e === !0 ? (q.stop().fadeTo(0, 0), Z.stop().fadeTo(0, 0)) : (q.stop().fadeTo(oe.fadeDuration, 0), Z.stop().fadeTo(oe.fadeDuration, 0)))) 6978 } 6979 function T() { 6980 if (!q) return !0; 6981 if (0 == q.is(":visible")) return !0; 6982 var e = q.css("opacity"); 6983 return 1 != e 6984 } 6985 function x(e, t) { 6986 return !!q && (1 == oe.isArrowsOnHoverMode && t !== !0 && 1 == g() || (1 == ne.isSwiping() || (e !== !0 && (q.stop(), Z.stop()), q.fadeTo(oe.fadeDuration, 1), void Z.fadeTo(oe.fadeDuration, 1)))) 6987 } 6988 function S(e) { 6989 e !== !0 && K.stop(), K.fadeTo(oe.fadeDuration, 1) 6990 } 6991 function I(e) { 6992 if (!ae) return !1; 6993 if (!e) var e = ne.getCurrentItem(); 6994 ae.setTextPlain(e.title, e.description) 6995 } 6996 function E(e) { 6997 if (!$) return !1; 6998 if (!e) var e = ne.getCurrentItem(); 6999 var t = ie.getNumItems(), 7000 i = e.index + 1; 7001 $.html(i + " / " + t) 7002 } 7003 function P() { 7004 return !!ae && void ae.getElement().show().stop().fadeTo(oe.fadeDuration, 1) 7005 } 7006 function C() { 7007 $ && $.stop().fadeTo(oe.fadeDuration, 1) 7008 } 7009 function j() { 7010 return 0 == oe.isCompact || void m() 7011 } 7012 function A() { 7013 if (0 == oe.isCompact) return !0; 7014 if (oe.positionFrom = "onZoomChange", h(!1, !0), p(!1, !0), 1 == oe.isCompact) { 7015 var e = ne.isCurrentSlideType("image") && 1 == ne.isCurrentImageInPlace(); 7016 0 == e ? (v(), b()) : (oe.positionFrom = "onZoomChange", P(), C()) 7017 } 7018 } 7019 function M() { 7020 if (0 == oe.isCompact) return !0; 7021 oe.positionFrom = "onSliderAfterReturn", h(!0), p(!0); 7022 var e = u(); 7023 0 == e && c(), P(), C() 7024 } 7025 function z(e, t) { 7026 return t = jQuery(t), 0 == oe.isCompact || (0 == ne.isSlideCurrent(t) || (oe.positionFrom = "onSliderAfterPutImage", h(!0), p(!0), void c())) 7027 } 7028 function O() { 7029 var e = ne.getOptions(), 7030 t = e.slider_image_padding_top; 7031 if (J) { 7032 var i = J.height(); 7033 i != t && r(i) 7034 } 7035 if (1 == oe.isCompact) { 7036 if (I(), E(), oe.positionFrom = "onSliderTransitionEnd", h(!0), p(!0), 0 == ne.isSlideActionActive()) { 7037 var n = u(); 7038 0 == n && c() 7039 } 7040 P(), C() 7041 } 7042 } 7043 function k(e, t) { 7044 0 == oe.isCompact ? ($ && E(t), ae && (I(t), 0 == oe.isRightNowOpened && (ae.positionElements(!1), a("onchange"), ae.positionPanel()))) : 0 == ne.isAnimating() && (ae && I(t), $ && E(t)), 0 == oe.isSliderChangedOnce && (oe.isSliderChangedOnce = !0, te.trigger(ee.events.LIGHTBOX_INIT)) 7045 } 7046 function L(e, t) { 7047 var i = ne.getSlideType(); 7048 if ("image" != i && 0 == oe.isCompact && ne.isSlideActionActive()) return !0; 7049 var n = ne.isPreloading(); 7050 if (1 == n) return ee.close("slider"), !0; 7051 if (1 == se.lightbox_close_on_emptyspace) { 7052 var r = ne.isMouseInsideSlideImage(t); 7053 0 == r && ee.close("slider_inside") 7054 } 7055 } 7056 function H() { 7057 _() 7058 } 7059 function N() { 7060 J ? o() : $ && $.hide(), q && 1 == se.lightbox_hide_arrows_onvideoplay && (q.hide(), Z.hide()) 7061 } 7062 function D() { 7063 J ? (l(), a("onStopVideo")) : $ && $.show(), q && 1 == se.lightbox_hide_arrows_onvideoplay && (q.show(), Z.show()) 7064 } 7065 function R(e, t, i) { 7066 var n = !1; 7067 switch (t) { 7068 case 27: 7069 1 == oe.isOpened && ee.close("keypress"); 7070 break; 7071 case 38: 7072 case 40: 7073 case 33: 7074 case 34: 7075 n = !0 7076 } 7077 1 == oe.isOpened && 1 == n && i.preventDefault() 7078 } 7079 function G() { 7080 1 == oe.isArrowsOnHoverMode && x(!1, !0) 7081 } 7082 function B(e) { 7083 oe.positionFrom = "hideCompactElements", 1 == oe.isArrowsOnHoverMode && 1 == g() && w(!1, !0) 7084 } 7085 function W(e) { 7086 oe.lastMouseX = e.pageX, oe.lastMouseY = e.pageY;
7087 var t = T(); 7088 1 == t && y() && 0 == ne.isAnimating() && (oe.positionFrom = "onMouseMove", q && 0 == q.is(":animated") && x(!1, !0)) 7089 } 7090 function F(e, t, i, n) { 7091 if (0 == oe.isOpened) return !0; 7092 switch (se.gallery_mousewheel_role) { 7093 default: 7094 case "zoom": 7095 var r = ne.getSlideType(); 7096 "image" != r && e.preventDefault(); 7097 break; 7098 case "none": 7099 e.preventDefault(); 7100 break; 7101 case "advance": 7102 ie.onGalleryMouseWheel(e, t, i, n) 7103 } 7104 } 7105 function Q() { 7106 if (V.on("touchstart", function(e) { 7107 e.preventDefault() 7108 }), V.on("touchend", function(e) { 7109 ee.close("overlay") 7110 }), re.addClassOnHover(Z, "ug-arrow-hover"), re.addClassOnHover(q, "ug-arrow-hover"), re.addClassOnHover(K), ie.setNextButton(Z), ie.setPrevButton(q), K.click(function() { 7111 ee.close("button") 7112 }), X.on(ie.events.ITEM_CHANGE, k), ne) { 7113 jQuery(ne).on(ne.events.TRANSITION_END, O), jQuery(ne).on(ne.events.CLICK, L); 7114 var e = ne.getVideoObject(); 7115 jQuery(e).on(e.events.PLAY_START, N), jQuery(e).on(e.events.PLAY_STOP, D), jQuery(ne).on(ne.events.START_DRAG, j), jQuery(ne).on(ne.events.TRANSITION_START, j), jQuery(ne).on(ne.events.AFTER_DRAG_CHANGE, M), jQuery(ne).on(ne.events.AFTER_RETURN, M), jQuery(ne).on(ne.events.AFTER_PUT_IMAGE, z), jQuery(ne).on(ne.events.ZOOM_CHANGE, A), jQuery(ne).on(ne.events.IMAGE_MOUSEENTER, G), jQuery(ne).on(ne.events.IMAGE_MOUSELEAVE, B) 7116 } 7117 jQuery(window).resize(function() { 7118 return 0 == oe.isOpened || void re.whenContiniousEventOver("lightbox_resize", H, 100) 7119 }), X.on(ie.events.GALLERY_KEYPRESS, R), 1 == oe.isArrowsOnHoverMode && jQuery(document).bind("mousemove", W), U.on("mousewheel", F) 7120 } 7121 function Y() { 7122 oe.isCompact = !1, t(), oe.isArrowsInside = !1, oe.isArrowsOnHoverMode = !1, se = jQuery.extend({}, oe.originalOptions), se.lightbox_arrows_position = "sides", ne.setOptions(se) 7123 } 7124 var X, U, V, q, Z, K, $, J, ee = this, 7125 te = jQuery(this), 7126 ie = new UniteGalleryMain, 7127 ne = new UGSlider, 7128 re = new UGFunctions, 7129 ae = new UGTextPanel, 7130 se = { 7131 lightbox_type: "wide", 7132 lightbox_show_textpanel: !0, 7133 lightbox_textpanel_width: 550, 7134 lightbox_hide_arrows_onvideoplay: !0, 7135 lightbox_arrows_position: "sides", 7136 lightbox_arrows_offset: 10, 7137 lightbox_arrows_inside_offset: 10, 7138 lightbox_arrows_inside_alwayson: !1, 7139 lightbox_overlay_color: null, 7140 lightbox_overlay_opacity: 1, 7141 lightbox_top_panel_opacity: null, 7142 lightbox_show_numbers: !0, 7143 lightbox_numbers_size: null, 7144 lightbox_numbers_color: null, 7145 lightbox_numbers_padding_top: null, 7146 lightbox_numbers_padding_right: null, 7147 lightbox_compact_closebutton_offsetx: 1, 7148 lightbox_compact_closebutton_offsety: 1, 7149 lightbox_close_on_emptyspace: !0 7150 }; 7151 this.events = { 7152 LIGHTBOX_INIT: "lightbox_init" 7153 }; 7154 var oe = { 7155 topPanelHeight: 44, 7156 initTextPanelHeight: 26, 7157 isOpened: !1, 7158 isRightNowOpened: !1, 7159 putSlider: !0, 7160 isCompact: !1, 7161 fadeDuration: 300, 7162 positionFrom: null, 7163 textPanelTop: null, 7164 textPanelLeft: null, 7165 isArrowsInside: !1, 7166 isArrowsOnHoverMode: !1, 7167 lastMouseX: null, 7168 lastMouseY: null, 7169 originalOptions: null, 7170 isSliderChangedOnce: !1, 7171 isTopPanelEnabled: !0 7172 }, le = { 7173 lightbox_slider_controls_always_on: !0, 7174 lightbox_slider_enable_bullets: !1, 7175 lightbox_slider_enable_arrows: !1, 7176 lightbox_slider_enable_progress_indicator: !1, 7177 lightbox_slider_enable_play_button: !1, 7178 lightbox_slider_enable_fullscreen_button: !1, 7179 lightbox_slider_enable_zoom_panel: !1, 7180 lightbox_slider_enable_text_panel: !1, 7181 lightbox_slider_scale_mode_media: "down", 7182 lightbox_slider_scale_mode: "down", 7183 lightbox_slider_loader_type: 3, 7184 lightbox_slider_loader_color: "black", 7185 lightbox_slider_transition: "fade", 7186 lightbox_slider_image_padding_top: oe.topPanelHeight, 7187 lightbox_slider_image_padding_bottom: 0, 7188 lightbox_slider_video_padding_top: 0, 7189 lightbox_slider_video_padding_bottom: 0, 7190 lightbox_textpanel_align: "middle", 7191 lightbox_textpanel_padding_top: 5, 7192 lightbox_textpanel_padding_bottom: 5, 7193 slider_video_constantsize: !1, 7194 lightbox_slider_image_border: !1, 7195 lightbox_textpanel_enable_title: !0, 7196 lightbox_textpanel_enable_description: !1, 7197 lightbox_textpanel_desc_style_as_title: !0, 7198 lightbox_textpanel_enable_bg: !1, 7199 video_enable_closebutton: !1, 7200 lightbox_slider_video_enable_closebutton: !1, 7201 video_youtube_showinfo: !1, 7202 lightbox_slider_enable_links: !1 7203 }, ue = { 7204 lightbox_overlay_opacity: .6, 7205 lightbox_slider_image_border: !0, 7206 lightbox_slider_image_shadow: !0, 7207 lightbox_slider_image_padding_top: 30, 7208 lightbox_slider_image_padding_bottom: 30, 7209 slider_video_constantsize: !0, 7210 lightbox_textpanel_align: "bottom", 7211 lightbox_textpanel_title_text_align: "left", 7212 lightbox_textpanel_desc_text_align: "left", 7213 lightbox_textpanel_padding_left: 10, 7214 lightbox_textpanel_padding_right: 10 7215 }; 7216 this.destroy = function() { 7217 if (jQuery(document).unbind("mousemove"), V.off("touchstart"), V.off("touchend"), K.off("click"), X.off(ie.events.ITEM_CHANGE), ne) { 7218 jQuery(ne).off(ne.events.TRANSITION_END), jQuery(ne).off(ne.events.CLICK), jQuery(ne).off(ne.events.START_DRAG), jQuery(ne).off(ne.events.TRANSITION_START), jQuery(ne).off(ne.events.AFTER_DRAG_CHANGE), jQuery(ne).off(ne.events.AFTER_RETURN); 7219 var e = ne.getVideoObject(); 7220 jQuery(e).off(e.events.PLAY_START), jQuery(e).off(e.events.PLAY_STOP), jQuery(ne).on(ne.events.IMAGE_MOUSEENTER, G), jQuery(ne).on(ne.events.IMAGE_MOUSELEAVE, B), ne.destroy() 7221 } 7222 jQuery(window).unbind("resize"), X.off(ie.events.GALLERY_KEYPRESS, R), U.off("mousewheel"), U.remove() 7223 }, this.open = function(e) { 7224 var t = ie.getItem(e); 7225 if (oe.isOpened = !0, oe.isRightNowOpened = !0, setTimeout(function() { 7226 oe.isRightNowOpened = !1 7227 }, 100), ne && ne.setItem(t, "lightbox_open"), ae && ae.setTextPlain(t.title, t.description), V.stop().fadeTo(0, 0), U.show(), U.fadeTo(0, 1), V.stop().fadeTo(oe.fadeDuration, se.lightbox_overlay_opacity), _(), 1 == oe.isCompact) { 7228 var i = ne.isPreloading(); 7229 1 == i ? f() : 1 == oe.isArrowsInside && (q.hide(), Z.hide()) 7230 } 7231 ne && ne.startSlideAction(), X.trigger(ie.events.OPEN_LIGHTBOX, t) 7232 }, this.close = function(e) { 7233 oe.isOpened = !1, 1 == oe.isCompact && m(), ne && ne.stopSlideAction(); 7234 var t = ne.getSlideType(); 7235 "image" != t ? U.hide() : U.fadeTo(oe.fadeDuration, 0, function() { 7236 U.hide() 7237 }), X.trigger(ie.events.CLOSE_LIGHTBOX) 7238 }, this.init = function(t, i) { 7239 e(t, i) 7240 }, this.putHtml = function() { 7241 var e = ie.isSmallWindow(); 7242 e && 1 == oe.isCompact && Y(), i() 7243 }, this.run = function() { 7244 n(), ne && ne.run(), Q() 7245 } 7246} 7247function UGCarousel() { 7248 function e(e, t) { 7249 g_objects = e.getObjects(), W = e, L = jQuery(e), H = g_objects.g_objWrapper, N = g_objects.g_arrItems, X = jQuery.extend(X, t), Q.setFixedMode(), Q.setApproveClickFunction(k), Q.init(e, X), Y = Q.getObjThumbs(), X = Q.getOptions(), U.initTileWidth = X.tile_width, U.initTileHeight = X.tile_height, U.tileWidth = X.tile_width 7250 } 7251 function t(e) { 7252 if (!e) var e = H; 7253 var t = "<div class='ug-carousel-wrapper'><div class='ug-carousel-inner'></div></div>"; 7254 H.append(t), D = H.children(".ug-carousel-wrapper"), R = D.children(".ug-carousel-inner"), Q.setHtml(R), Y.getThumbs().fadeTo(0, 1) 7255 } 7256 function i(e, t) { 7257 if (!t) var t = U.initTileHeight / U.initTileWidth * e; 7258 U.tileWidth = e; 7259 var i = { 7260 tile_width: e, 7261 tile_height: t 7262 }; 7263 Q.setOptions(i), X.tile_width = e, X.tile_height = t, Q.resizeAllTiles(e), _(!0) 7264 } 7265 function n() { 7266 if (null === U.carouselMaxWidth) throw new Error("The carousel width not set"); 7267 if (U.tileWidth < U.initTileWidth) { 7268 var e = U.carouselMaxWidth - 2 * X.carousel_padding; 7269 e > U.initTileWidth && (e = U.initTileWidth), i(e); 7270 var t = F.getNumItemsInSpace(U.carouselMaxWidth, e, X.carousel_space_between_tiles) 7271 } else { 7272 var t = F.getNumItemsInSpace(U.carouselMaxWidth, U.tileWidth, X.carousel_space_between_tiles); 7273 if (0 >= t) { 7274 t = 1; 7275 var e = U.carouselMaxWidth - 2 * X.carousel_padding; 7276 i(e) 7277 } 7278 } 7279 var n = F.getSpaceByNumItems(t, U.tileWidth, X.carousel_space_between_tiles); 7280 n += 2 * X.carousel_padding, D.width(n), 1 == U.isFirstTimeRun ? (O(), Q.run(), jQuery.each(N, function(e, t) { 7281 t.objThumbWrapper.data("index", e), H.trigger(U.eventSizeChange, [t.objThumbWrapper, !0]), t.objTileOriginal = t.objThumbWrapper.clone(!0, !0) 7282 }), _(!0), 1 == X.carousel_autoplay && G.startAutoplay()) : (1 == X.carousel_autoplay && G.pauseAutoplay(), T(0, !1), 1 == X.carousel_autoplay && G.startAutoplay()), E(), U.isFirstTimeRun = !1 7283 } 7284 function r() { 7285 return F.getElementSize(R).left 7286 } 7287 function a(e) { 7288 return F.getMousePosition(e).pageX 7289 } 7290 function s() { 7291 var e = R.children(".ug-thumb-wrapper"); 7292 return e 7293 } 7294 function o(e) { 7295 var t = F.getNumItemsInSpace(e, U.tileWidth, X.carousel_space_between_tiles); 7296 return t 7297 } 7298 function l() { 7299 return s().length 7300 } 7301 function u(e) { 7302 v(e); 7303 var t = s(), 7304 i = jQuery(t[e]); 7305 return i 7306 } 7307 function d() { 7308 return R.children(".ug-thumb-wrapper").first() 7309 } 7310 function c() { 7311 return R.children(".ug-thumb-wrapper").last() 7312 } 7313 function g(e, t, i) { 7314 var n = e.data("index"); 7315 if (void 0 == n) throw new Error("every tile should have index!"); 7316 for (var r = [], a = 0; t > a; a++) { 7317 if ("prev" == i) var s = W.getPrevItem(n, !0); 7318 else var s = W.getNextItem(n, !0); 7319 if (!s) throw new Error("the item to add is empty"); 7320 var o = s.objTileOriginal.clone(!0, !0); 7321 n = s.index, o.addClass("cloned"), r.push(o) 7322 } 7323 return r 7324 } 7325 function p() { 7326 var e = F.getElementSize(D), 7327 t = F.getElementSize(R), 7328 i = t.width - e.width + t.left, 7329 n = U.sideSpace - i; 7330 return n 7331 } 7332 function h() { 7333 var e = -r(), 7334 t = U.sideSpace - e; 7335 return t 7336 } 7337 function m() { 7338 var e = F.getElementSize(D); 7339 return e.width 7340 } 7341 function f() { 7342 var e = m(), 7343 t = o(e); 7344 return t 7345 } 7346 function _(e) { 7347 if (!e) var e = !1; 7348 var t, i = s(), 7349 n = 0, 7350 r = 0; 7351 return jQuery.each(i, function(e, a) { 7352 a = jQuery(a), F.placeElement(a, n, 0); 7353 var s = F.getElementSize(a); 7354 n += s.width + X.carousel_space_between_tiles, r = Math.max(r, s.height), e == i.length - 1 && (t = s.right) 7355 }), R.width(t), r += 2 * X.carousel_padding, e === !0 && (R.height(r), D.height(r)), T(U.numCurrent, !1), t 7356 } 7357 function v(e) { 7358 if (e > s().length - 1) throw new Error("Wrogn tile number: " + e) 7359 } 7360 function b(e, t) { 7361 if ("left" == t) var i = d(); 7362 else var i = c(); 7363 var n = "left" == t ? "prev" : "next", 7364 r = g(i, e, n); 7365 jQuery.each(r, function(e, i) { 7366 "left" == t ? R.prepend(i) : R.append(i), H.trigger(U.eventSizeChange, i), Q.loadTileImage(i) 7367 }) 7368 } 7369 function y(e, t) { 7370 v(n); 7371 for (var i = s(), n = i.length, r = 0; e > r; r++) "left" == t ? jQuery(i[r]).remove() : jQuery(i[n - 1 - r]).remove() 7372 } 7373 function w(e) { 7374 var t = { 7375 left: e + "px" 7376 }; 7377 R.css(t) 7378 } 7379 function T(e, t, i) { 7380 if (void 0 === t) { 7381 var t = !0; 7382 if (R.is(":animated")) return !0 7383 } 7384 var n = u(e), 7385 r = F.getElementSize(n), 7386 a = -r.left + X.carousel_padding, 7387 s = { 7388 left: a + "px" 7389 }; 7390 if (t === !0) { 7391 var o = X.carousel_scroll_duration, 7392 l = X.carousel_scroll_easing; 7393 i === !0 && (o = U.scrollShortDuration, l = U.scrollShortEasing), R.stop(!0).animate(s, { 7394 duration: o, 7395 easing: l, 7396 queue: !1, 7397 complete: function() { 7398 U.numCurrent = e, I(!0) 7399 } 7400 }) 7401 } else U.numCurrent = e, R.css(s) 7402 } 7403 function x() { 7404 var e = -r(), 7405 t = o(e), 7406 i = F.getElementSize(u(t)).left, 7407 n = F.getElementSize(u(t + 1)).left; 7408 return Math.abs(i - e) < Math.abs(n - e) ? t : t + 1 7409 } 7410 function S() { 7411 var e = x(); 7412 T(e, !0, !0) 7413 } 7414 function I() { 7415 var e = h(), 7416 t = p(), 7417 i = 0, 7418 n = 0, 7419 r = 0, 7420 a = 0, 7421 s = l(); 7422 if (e >
7422 U.spaceActionSize) i = o(e), b(i, "left"), U.numCurrent += i; 7423 else if (e < -U.spaceActionSize) { 7424 var r = o(Math.abs(e)); 7425 y(r, "left"), U.numCurrent -= r 7426 } 7427 if (t > U.spaceActionSize ? (n = o(t), b(n, "right")) : t < -U.spaceActionSize && (a = o(Math.abs(t)), y(a, "right")), a > s) throw new Error("Can't remove more then num tiles"); 7428 var u = !1; 7429 return (i || n || r || a) && (_(), u = !0), u 7430 } 7431 function E(e) { 7432 F.placeElement(R, 0, X.carousel_padding), I() 7433 } 7434 function P() { 7435 "left" == X.carousel_autoplay_direction ? G.scrollRight(1) : G.scrollLeft(1) 7436 } 7437 function C(e) { 7438 return 1 == U.touchActive || (U.touchActive = !0, G.pauseAutoplay(), U.startTime = jQuery.now(), U.startMousePos = a(e), U.startInnerPos = r(), U.lastTime = U.startTime, U.lastMousePos = U.startMousePos, void F.storeEventData(e, U.storedEventID)) 7439 } 7440 function j(e) { 7441 if (0 == U.touchActive) return !0; 7442 F.updateStoredEventData(e, U.storedEventID), e.preventDefault(); 7443 var t = null; 7444 if (1 == X.carousel_vertical_scroll_ondrag && (t = F.handleScrollTop(U.storedEventID)), "vert" === t) return !0; 7445 U.lastMousePos = a(e); 7446 var i = U.lastMousePos - U.startMousePos, 7447 n = U.startInnerPos + i, 7448 r = i > 0 ? "prev" : "next", 7449 s = F.getElementSize(R).width; 7450 n > 0 && "prev" == r && (n /= 3), - s > n && "next" == r && (n = U.startInnerPos + i / 3), w(n) 7451 } 7452 function A(e) { 7453 return 0 == U.touchActive || (U.touchActive = !1, S(), void G.unpauseAutoplay()) 7454 } 7455 function M(e) { 7456 return 0 == X.carousel_autoplay_pause_onhover || void(1 == U.isPlayMode && 0 == U.isPaused && G.pauseAutoplay()) 7457 } 7458 function z(e) { 7459 return 0 == X.carousel_autoplay_pause_onhover || void G.unpauseAutoplay() 7460 } 7461 function O() { 7462 Q.initEvents(), D.bind("mousedown touchstart", C), jQuery("body").bind("mousemove touchmove", j), jQuery(window).add("body").bind("mouseup touchend", A), D.hover(M, z) 7463 } 7464 function k() { 7465 var e = U.lastTime - U.startTime, 7466 t = Math.abs(U.lastMousePos - U.startMousePos); 7467 return !(e > 300) && !(t > 30) 7468 } 7469 var L, H, N, D, R, G = this, 7470 B = jQuery(this), 7471 W = new UniteGalleryMain, 7472 F = new UGFunctions, 7473 Q = new UGTileDesign, 7474 Y = new UGThumbsGeneral, 7475 X = { 7476 carousel_padding: 8, 7477 carousel_space_between_tiles: 20, 7478 carousel_navigation_numtiles: 3, 7479 carousel_scroll_duration: 500, 7480 carousel_scroll_easing: "easeOutCubic", 7481 carousel_autoplay: !0, 7482 carousel_autoplay_timeout: 3e3, 7483 carousel_autoplay_direction: "right", 7484 carousel_autoplay_pause_onhover: !0, 7485 carousel_vertical_scroll_ondrag: !1 7486 }; 7487 this.events = { 7488 START_PLAY: "carousel_start_play", 7489 PAUSE_PLAY: "carousel_pause_play", 7490 STOP_PLAY: "carousel_stop_play" 7491 }; 7492 var U = { 7493 eventSizeChange: "thumb_size_change", 7494 isFirstTimeRun: !0, 7495 carouselMaxWidth: null, 7496 tileWidth: 0, 7497 initTileWidth: 0, 7498 initTileHeight: 0,
7499 sideSpace: 1500, 7500 spaceActionSize: 500, 7501 numCurrent: 0, 7502 touchActive: !1, 7503 startInnerPos: 0, 7504 lastTime: 0, 7505 startTime: 0, 7506 startMousePos: 0, 7507 lastMousePos: 0, 7508 scrollShortDuration: 200, 7509 scrollShortEasing: "easeOutQuad", 7510 handle: null, 7511 isPlayMode: !1, 7512 isPaused: !1, 7513 storedEventID: "carousel" 7514 }; 7515 this.startAutoplay = function() { 7516 U.isPlayMode = !0, U.isPaused = !1, B.trigger(G.events.START_PLAY), U.handle && clearInterval(U.handle), U.handle = setInterval(P, X.carousel_autoplay_timeout) 7517 }, this.unpauseAutoplay = function() { 7518 return 0 == U.isPlayMode || (0 == U.isPaused || void G.startAutoplay()) 7519 }, this.pauseAutoplay = function() { 7520 return 0 == U.isPlayMode || (U.isPaused = !0, U.handle && clearInterval(U.handle), void B.trigger(G.events.PAUSE_PLAY)) 7521 }, this.stopAutoplay = function() { 7522 return 0 == U.isPlayMode || (U.isPaused = !1, U.isPlayMode = !1, U.handle && clearInterval(U.handle), void B.trigger(G.events.STOP_PLAY)) 7523 }, this.destroy = function() { 7524 U.handle && clearInterval(U.handle), B.off(G.events.START_PLAY), B.off(G.events.STOP_PLAY), D.unbind("mousedown"), D.unbind("touchstart"), jQuery("body").unbind("mousemove"), jQuery("body").unbind("touchmove"), jQuery(window).add("body").unbind("mouseup").unbind("touchend"), D.off("mouseenter").off("mouseleave"), Q.destroy() 7525 }, this.init = function(t, i, n) { 7526 n && this.setMaxWidth(n), e(t, i) 7527 }, this.setMaxWidth = function(e) { 7528 U.carouselMaxWidth = e 7529 }, this.setHtml = function(e) { 7530 t(e) 7531 }, this.getElement = function() { 7532 return D 7533 }, this.getObjTileDesign = function() { 7534 return Q 7535 }, this.getEstimatedHeight = function() { 7536 var e = X.tile_height + 2 * X.carousel_padding; 7537 return e 7538 }, this.run = function() { 7539 n() 7540 }, this.scrollRight = function(e) { 7541 if (!e || "object" == typeof e) var e = X.carousel_navigation_numtiles; 7542 var t = f(); 7543 e > t && (e = t); 7544 var i = U.numCurrent - e; 7545 0 >= i && (i = 0), T(i) 7546 }, this.scrollLeft = function(e) { 7547 if (!e || "object" == typeof e) var e = X.carousel_navigation_numtiles; 7548 var t = f(); 7549 e > t && (e = t); 7550 var i = l(), 7551 n = U.numCurrent + e; 7552 n >= i && (n = i - 1), T(n) 7553 }, this.setScrollLeftButton = function(e) { 7554 F.setButtonMobileReady(e), F.setButtonOnClick(e, G.scrollLeft) 7555 }, this.setScrollRightButton = function(e) { 7556 F.setButtonMobileReady(e), F.setButtonOnClick(e, G.scrollRight) 7557 }, this.setPlayPauseButton = function(e) { 7558 F.setButtonMobileReady(e), 1 == U.isPlayMode && 0 == U.isPaused && e.addClass("ug-pause-icon"), B.on(G.events.START_PLAY, function() { 7559 e.addClass("ug-pause-icon") 7560 }), B.on(G.events.STOP_PLAY, function() { 7561 e.removeClass("ug-pause-icon") 7562 }), F.setButtonOnClick(e, function() { 7563 0 == U.isPlayMode || 1 == U.isPaused ? G.startAutoplay() : G.stopAutoplay() 7564 }) 7565 } 7566} 7567function UGTabs() { 7568 function e(e, t) { 7569 u = e, s = jQuery(u), d = jQuery.extend(d, t), "select" == d.tabs_type ? l = jQuery(d.tabs_container) : o = jQuery(d.tabs_container + " .ug-tab") 7570 } 7571 function t() { 7572 a() 7573 } 7574 function i(e) { 7575 u.requestNewItems(e) 7576 } 7577 function n() { 7578 var e = d.tabs_class_selected, 7579 t = jQuery(this); 7580 if (t.hasClass(e)) return !0; 7581 o.not(t).removeClass(e), t.addClass(e); 7582 var n = t.data("catid"); 7583 return !n || void i(n) 7584 } 7585 function r() { 7586 var e = jQuery(this), 7587 t = e.val(); 7588 return !t || void i(t) 7589 } 7590 function a() { 7591 "select" == d.tabs_type ? l.change(r) : o.click(n) 7592 } 7593 var s, o, l, u = (jQuery(this), new UniteGalleryMain), 7594 d = (new UGFunctions, { 7595 tabs_type: "tabs", 7596 tabs_container: "#ug_tabs", 7597 tabs_class_selected: "ug-tab-selected" 7598 }); 7599 this.events = {}, this.destroy = function() {
7600 l && l.off("change"), o && o.off("click") 7601 }, this.init = function(t, i) { 7602 e(t, i) 7603 }, this.run = function() { 7604 t() 7605 } 7606} 7607function UG_API(e) { 7608 function t(e) { 7609 var t = { 7610 index: e.index, 7611 title: e.title, 7612 description: e.description, 7613 urlImage: e.urlImage, 7614 urlThumb: e.urlThumb 7615 }, i = e.objThumbImage.data(); 7616 for (var n in i) { 7617 switch (n) { 7618 case "image": 7619 case "description": 7620 continue 7621 } 7622 t[n] = i[n] 7623 } 7624 return t 7625 } 7626 var i, n = this, 7627 r = (jQuery(n), new UniteGalleryMain), 7628 a = []; 7629 r = e, i = jQuery(e), this.events = { 7630 API_INIT_FUNCTIONS: "api_init", 7631 API_ON_EVENT: "api_on_event" 7632 }, this.on = function(e, s, o) { 7633 switch (o !== !0 && a.push({ 7634 event: e, 7635 func: s 7636 }), e) { 7637 case "item_change": 7638 i.on(r.events.ITEM_CHANGE, function() { 7639 var e = r.getSelectedItem(), 7640 i = t(e); 7641 s(i.index, i) 7642 }); 7643 break; 7644 case "resize": 7645 i.on(r.events.SIZE_CHANGE, s); 7646 break; 7647 case "enter_fullscreen": 7648 i.on(r.events.ENTER_FULLSCREEN, s); 7649 break; 7650 case "exit_fullscreen": 7651 i.on(r.events.EXIT_FULLSCREEN, s); 7652 break; 7653 case "play": 7654 i.on(r.events.START_PLAY, s); 7655 break; 7656 case "stop": 7657 i.on(r.events.STOP_PLAY, s); 7658 break; 7659 case "pause": 7660 i.on(r.events.PAUSE_PLAYING, s); 7661 break; 7662 case "continue": 7663 i.on(r.events.CONTINUE_PLAYING, s); 7664 break; 7665 case "open_lightbox": 7666 i.on(r.events.OPEN_LIGHTBOX, s); 7667 break; 7668 case "close_lightbox": 7669 i.on(r.events.CLOSE_LIGHTBOX, s); 7670 break; 7671 default: 7672 console && console.log("wrong api event: " + e) 7673 } 7674 i.trigger(n.events.API_ON_EVENT, [e, s]) 7675 }, this.play = function() { 7676 r.startPlayMode() 7677 }, this.stop = function() { 7678 r.stopPlayMode() 7679 }, this.togglePlay = function() { 7680 r.togglePlayMode() 7681 }, this.enterFullscreen = function() { 7682 r.toFullScreen() 7683 }, this.exitFullscreen = function() { 7684 r.exitFullScreen() 7685 }, this.toggleFullscreen = function() { 7686 r.toggleFullscreen() 7687 }, this.resetZoom = function() { 7688 var e = r.getObjSlider(); 7689 return !!e && void e.zoomBack() 7690 }, this.zoomIn = function() { 7691 var e = r.getObjSlider(); 7692 return !!e && void e.zoomIn() 7693 }, this.zoomOut = function() { 7694 var e = r.getObjSlider(); 7695 return !!e && void e.zoomOut() 7696 }, this.nextItem = function() { 7697 r.nextItem() 7698 }, this.prevItem = function() { 7699 r.prevItem() 7700 }, this.selectItem = function(e) { 7701 r.selectItem(e) 7702 }, this.resize = function(e, t) { 7703 t ? r.resize(e, t) : r.resize(e) 7704 }, this.getItem = function(e) { 7705 var i = r.getItem(e), 7706 n = t(i); 7707 return n 7708 }, this.getNumItems = function() { 7709 var e = r.getNumItems(); 7710 return e 7711 }, this.reloadGallery = function(e) { 7712 if (!e) var e = {}; 7713 r.run(null, e), a.map(function(e) { 7714 n.on(e.event, e.func, !0) 7715 }) 7716 }, this.destroy = function() { 7717 r.destroy() 7718 }, i.trigger(n.events.API_INIT_FUNCTIONS, n) 7719} 7720function UGLoadMore() { 7721 function e() { 7722 return a = jQuery("#" + c.loadmore_container), 0 != a.length && (s = a.find(".ug-loadmore-button"), 0 != s.length && (o = a.find(".ug-loadmore-loader"), 0 != o.length && (l = a.find(".ug-loadmore-error"), 0 != l.length && void(d.isInited = !0)))) 7723 } 7724 function t() { 7725 a.show() 7726 } 7727 function i() { 7728 s.hide(), o.show(); 7729 var e = { 7730 numitems: u.getNumItems() 7731 }; 7732 u.ajaxRequest("front_loadmore", e, function(e) { 7733 o.hide(); 7734 var t = e.html_items, 7735 i = e.show_loadmore; 7736 1 == i ? (s.blur().show(), o.hide()) : a.hide(), u.addItems(t) 7737 }, function(e) { 7738 e = "Ajax Error!" + e, o.hide(), l.show(), l.html(e) 7739 }) 7740 } 7741 function n() { 7742 u.onEvent("tiles_first_placed", t), s.click(i) 7743 } 7744 var r, a, s, o, l, u = (jQuery(this), new UniteGalleryMain), 7745 d = (new UGFunctions, { 7746 isInited: !1 7747 }), 7748 c = { 7749 loadmore_container: "ug_loadmore_wrapper" 7750 }; 7751 this.events = {}, this.destroy = function() { 7752 return 0 != d.isInited && void 0 7753 }, this.init = function(t, i) { 7754 return u = t, r = jQuery(u), c = jQuery.extend(c, i), e(), 0 == d.isInited ? (trace("load more not inited, something is wrong"), !1) : void n() 7755 } 7756} 7757function UGTheme_tiles() { 7758 function e(e, i) { 7759 h = e, b = jQuery.extend(b, y), b = jQuery.extend(b, i), t(), h.setOptions(b), h.setFreestyleMode(), d = e.getObjects(), u = jQuery(e), c = d.g_objWrapper, m.init(e, b), f.init(e, b), v = m.getObjTileDesign() 7760 } 7761 function t() { 7762 switch (1 == b.theme_enable_preloader && (w.showPreloader = !0), b.theme_appearance_order) { 7763 default: 7764 case "normal": 7765 break; 7766 case "shuffle": 7767 h.shuffleItems();
7768 break; 7769 case "keep": 7770 b.tiles_keep_order = !0 7771 } 7772 } 7773 function i() { 7774 c.addClass("ug-theme-tiles"), c.append("<div class='ug-tiles-wrapper' style='position:relative'></div>"), 1 == w.showPreloader && (c.append("<div class='ug-tiles-preloader ug-preloader-trans'></div>"), g = c.children(".ug-tiles-preloader"), g.fadeTo(0, 0)), p = c.children(".ug-tiles-wrapper"), b.theme_gallery_padding && c.css({ 7775 "padding-left": b.theme_gallery_padding + "px", 7776 "padding-right": b.theme_gallery_padding + "px" 7777 }), m.setHtml(p), f.putHtml() 7778 } 7779 function n() { 7780 g && (g.fadeTo(0, 1), c.height(b.theme_preloading_height), _.placeElement(g, "center", b.theme_preloader_vertpos)), l(), m.run(), f.run() 7781 } 7782 function r() { 7783 i(), n() 7784 } 7785 function a(e, t) { 7786 t = jQuery(t); 7787 var i = v.getItemByTile(t), 7788 n = i.index; 7789 f.open(n) 7790 } 7791 function s() { 7792 if (p.hide(), g) { 7793 g.show(); 7794 var e = _.getElementSize(g), 7795 t = e.bottom + 30; 7796 c.height(t) 7797 } 7798 } 7799 function o() { 7800 null !== b.theme_auto_open && (f.open(b.theme_auto_open), b.theme_auto_open = null) 7801 } 7802 function l() { 7803 g && h.onEvent(m.events.TILES_FIRST_PLACED, function() { 7804 c.height("auto"), g.hide() 7805 }), jQuery(v).on(v.events.TILE_CLICK, a), u.on(h.events.GALLERY_BEFORE_REQUEST_ITEMS, s), jQuery(f).on(f.events.LIGHTBOX_INIT, o) 7806 } 7807 var u, d, c, g, p, h = new UniteGalleryMain, 7808 m = new UGTiles, 7809 f = new UGLightbox, 7810 _ = new UGFunctions, 7811 v = new UGTileDesign, 7812 b = { 7813 theme_enable_preloader: !0, 7814 theme_preloading_height: 200, 7815 theme_preloader_vertpos: 100, 7816 theme_gallery_padding: 0, 7817 theme_appearance_order: "normal", 7818 theme_auto_open: null 7819 }, y = { 7820 gallery_width: "100%" 7821 }, w = { 7822 showPreloader: !1 7823 }; 7824 this.destroy = function() { 7825 jQuery(v).off(v.events.TILE_CLICK), h.destroyEvent(m.events.TILES_FIRST_PLACED), u.off(h.events.GALLERY_BEFORE_REQUEST_ITEMS), jQuery(f).off(f.events.LIGHTBOX_INIT), m.destroy(), f.destroy() 7826 }, this.run = function() { 7827 r() 7828 }, this.addItems = function() { 7829 m.runNewItems() 7830 }, this.init = function(t, i) { 7831 e(t, i) 7832 } 7833}! function() { 7834 "use strict"; 7835 var e, t = function(n, r) { 7836 function a(e) { 7837 return Math.floor(e) 7838 } 7839 function s() { 7840 var e = w.params.autoplay, 7841 t = w.slides.eq(w.activeIndex); 7842 t.attr("data-swiper-autoplay") && (e = t.attr("data-swiper-autoplay") || w.params.autoplay), w.autoplayTimeoutId = setTimeout(function() { 7843 w.params.loop ? (w.fixLoop(), w._slideNext(), w.emit("onAutoplay", w)) : w.isEnd ? r.autoplayStopOnLast ? w.stopAutoplay() : (w._slideTo(0), w.emit("onAutoplay", w)) : (w._slideNext(), w.emit("onAutoplay", w)) 7844 }, e) 7845 } 7846 function o(t, i) { 7847 var n = e(t.target); 7848 if (!n.is(i)) if ("string" == typeof i) n = n.parents(i); 7849 else if (i.nodeType) { 7850 var r; 7851 return n.parents().each(function(e, t) { 7852 t === i && (r = i) 7853 }), r ? i : void 0 7854 } 7855 if (0 !== n.length) return n[0] 7856 } 7857 function l(e, t) { 7858 t = t || {}; 7859 var i = window.MutationObserver || window.WebkitMutationObserver, 7860 n = new i(function(e) { 7861 e.forEach(function(e) { 7862 w.onResize(!0), w.emit("onObserverUpdate", w, e) 7863 }) 7864 }); 7865 n.observe(e, { 7866 attributes: void 0 === t.attributes || t.attributes, 7867 childList: void 0 === t.childList || t.childList, 7868 characterData: void 0 === t.characterData || t.characterData 7869 }), w.observers.push(n) 7870 } 7871 function u(e) { 7872 e.originalEvent && (e = e.originalEvent); 7873 var t = e.keyCode || e.charCode; 7874 if (!w.params.allowSwipeToNext && (w.isHorizontal() && 39 === t || !w.isHorizontal() && 40 === t)) return !1; 7875 if (!w.params.allowSwipeToPrev && (w.isHorizontal() && 37 === t || !w.isHorizontal() && 38 === t)) return !1; 7876 if (!(e.shiftKey || e.altKey || e.ctrlKey || e.metaKey || document.activeElement && document.activeElement.nodeName && ("input" === document.activeElement.nodeName.toLowerCase() || "textarea" === document.activeElement.nodeName.toLowerCase()))) { 7877 if (37 === t || 39 === t || 38 === t || 40 === t) { 7878 var i = !1; 7879 if (w.container.parents("." + w.params.slideClass).length > 0 && 0 === w.container.parents("." + w.params.slideActiveClass).length) return; 7880 var n = { 7881 left: window.pageXOffset, 7882 top: window.pageYOffset 7883 }, r = window.innerWidth, 7884 a = window.innerHeight, 7885 s = w.container.offset(); 7886 w.rtl && (s.left = s.left - w.container[0].scrollLeft); 7887 for (var o = [ 7888 [s.left, s.top], 7889 [s.left + w.width, s.top], 7890 [s.left, s.top + w.height], 7891 [s.left + w.width, s.top + w.height] 7892 ], l = 0; l < o.length; l++) { 7893 var u = o[l]; 7894 u[0] >= n.left && u[0] <= n.left + r && u[1] >= n.top && u[1] <= n.top + a && (i = !0) 7895 } 7896 if (!i) return 7897 } 7898 w.isHorizontal() ? (37 !== t && 39 !== t || (e.preventDefault ? e.preventDefault() : e.returnValue = !1), (39 === t && !w.rtl || 37 === t && w.rtl) && w.slideNext(), (37 === t && !w.rtl || 39 === t && w.rtl) && w.slidePrev()) : (38 !== t && 40 !== t || (e.preventDefault ? e.preventDefault() : e.returnValue = !1), 40 === t && w.slideNext(), 38 === t && w.slidePrev()), w.emit("onKeyPress", w, t) 7899 } 7900 } 7901 function d(e) { 7902 var t = 0, 7903 i = 0, 7904 n = 0, 7905 r = 0; 7906 return "detail" in e && (i = e.detail), "wheelDelta" in e && (i = -e.wheelDelta / 120), "wheelDeltaY" in e && (i = -e.wheelDeltaY / 120), "wheelDeltaX" in e && (t = -e.wheelDeltaX / 120), "axis" in e && e.axis === e.HORIZONTAL_AXIS && (t = i, i = 0), n = 10 * t, r = 10 * i, "deltaY" in e && (r = e.deltaY), "deltaX" in e && (n = e.deltaX), (n || r) && e.deltaMode && (1 === e.deltaMode ? (n *= 40, r *= 40) : (n *= 800, r *= 800)), n && !t && (t = n < 1 ? -1 : 1), r && !i && (i = r < 1 ? -1 : 1), { 7907 spinX: t, 7908 spinY: i, 7909 pixelX: n, 7910 pixelY: r 7911 } 7912 } 7913 function c(e) { 7914 e.originalEvent && (e = e.originalEvent); 7915 var t = 0, 7916 i = w.rtl ? -1 : 1, 7917 n = d(e); 7918 if (w.params.mousewheelForceToAxis) if (w.isHorizontal()) { 7919 if (!(Math.abs(n.pixelX) > Math.abs(n.pixelY))) return; 7920 t = n.pixelX * i 7921 } else { 7922 if (!(Math.abs(n.pixelY) > Math.abs(n.pixelX))) return; 7923 t = n.pixelY 7924 } else t = Math.abs(n.pixelX) > Math.abs(n.pixelY) ? -n.pixelX * i : -n.pixelY; 7925 if (0 !== t) { 7926 if (w.params.mousewheelInvert && (t = -t), w.params.freeMode) { 7927 var r = w.getWrapperTranslate() + t * w.params.mousewheelSensitivity, 7928 a = w.isBeginning, 7929 s = w.isEnd; 7930 if (r >= w.minTranslate() && (r = w.minTranslate()), r <= w.maxTranslate() && (r = w.maxTranslate()), w.setWrapperTransition(0), w.setWrapperTranslate(r), w.updateProgress(), w.updateActiveIndex(), (!a && w.isBeginning || !s && w.isEnd) && w.updateClasses(), w.params.freeModeSticky ? (clearTimeout(w.mousewheel.timeout), w.mousewheel.timeout = setTimeout(function() { 7931 w.slideReset() 7932 }, 300)) : w.params.lazyLoading && w.lazy && w.lazy.load(), w.emit("onScroll", w, e), w.params.autoplay && w.params.autoplayDisableOnInteraction && w.stopAutoplay(), 0 === r || r === w.maxTranslate()) return 7933 } else { 7934 if ((new window.Date).getTime() - w.mousewheel.lastScrollTime > 60) if (t < 0) if (w.isEnd && !w.params.loop || w.animating) { 7935 if (w.params.mousewheelReleaseOnEdges) return !0 7936 } else w.slideNext(), w.emit("onScroll", w, e); 7937 else if (w.isBeginning && !w.params.loop || w.animating) { 7938 if (w.params.mousewheelReleaseOnEdges) return !0 7939 } else w.slidePrev(), w.emit("onScroll", w, e); 7940 w.mousewheel.lastScrollTime = (new window.Date).getTime() 7941 } 7942 return e.preventDefault ? e.preventDefault() : e.returnValue = !1, !1 7943 } 7944 } 7945 function g(t, i) { 7946 t = e(t); 7947 var n, r, a, s = w.rtl ? -1 : 1; 7948 n = t.attr("data-swiper-parallax") || "0", r = t.attr("data-swiper-parallax-x"), a = t.attr("data-swiper-parallax-y"), r || a ? (r = r || "0", a = a || "0") : w.isHorizontal() ? (r = n, a = "0") : (a = n, r = "0"), r = r.indexOf("%") >= 0 ? parseInt(r, 10) * i * s + "%" : r * i * s + "px", a = a.indexOf("%") >= 0 ? parseInt(a, 10) * i + "%" : a * i + "px", t.transform("translate3d(" + r + ", " + a + ",0px)") 7949 } 7950 function p(e) { 7951 return 0 !== e.indexOf("on") && (e = e[0] !== e[0].toUpperCase() ? "on" + e[0].toUpperCase() + e.substring(1) : "on" + e), e 7952 } 7953 if (!(this instanceof t)) return new t(n, r); 7954 var h = { 7955 direction: "horizontal", 7956 touchEventsTarget: "container", 7957 initialSlide: 0, 7958 speed: 300, 7959 autoplay: !1, 7960 autoplayDisableOnInteraction: !0, 7961 autoplayStopOnLast: !1, 7962 iOSEdgeSwipeDetection: !1, 7963 iOSEdgeSwipeThreshold: 20, 7964 freeMode: !1, 7965 freeModeMomentum: !0, 7966 freeModeMomentumRatio: 1, 7967 freeModeMomentumBounce: !0, 7968 freeModeMomentumBounceRatio: 1, 7969 freeModeMomentumVelocityRatio: 1, 7970 freeModeSticky: !1, 7971 freeModeMinimumVelocity: .02, 7972 autoHeight: !1, 7973 setWrapperSize: !1, 7974 virtualTranslate: !1, 7975 effect: "slide", 7976 coverflow: { 7977 rotate: 50, 7978 stretch: 0, 7979 depth: 100, 7980 modifier: 1, 7981 slideShadows: !0 7982 }, 7983 flip: { 7984 slideShadows: !0, 7985 limitRotation: !0 7986 }, 7987 cube: { 7988 slideShadows: !0, 7989 shadow: !0, 7990 shadowOffset: 20, 7991 shadowScale: .94 7992 }, 7993 fade: { 7994 crossFade: !1 7995 }, 7996 parallax: !1, 7997 zoom: !1, 7998 zoomMax: 3, 7999 zoomMin: 1, 8000 zoomToggle: !0, 8001 scrollbar: null, 8002 scrollbarHide: !0, 8003 scrollbarDraggable: !1, 8004 scrollbarSnapOnRelease: !1, 8005 keyboardControl: !1, 8006 mousewheelControl: !1, 8007 mousewheelReleaseOnEdges: !1, 8008 mousewheelInvert: !1, 8009 mousewheelForceToAxis: !1, 8010 mousewheelSensitivity: 1, 8011 mousewheelEventsTarged: "container", 8012 hashnav: !1, 8013 hashnavWatchState: !1, 8014 history: !1, 8015 replaceState: !1, 8016 breakpoints: void 0, 8017 spaceBetween: 0, 8018 slidesPerView: 1, 8019 slidesPerColumn: 1, 8020 slidesPerColumnFill: "column", 8021 slidesPerGroup: 1, 8022 centeredSlides: !1, 8023 slidesOffsetBefore: 0, 8024 slidesOffsetAfter: 0, 8025 roundLengths: !1, 8026 touchRatio: 1, 8027 touchAngle: 45, 8028 simulateTouch: !0, 8029 shortSwipes: !0, 8030 longSwipes: !0, 8031 longSwipesRatio: .5, 8032 longSwipesMs: 300, 8033 followFinger: !0, 8034 onlyExternal: !1, 8035 threshold: 0, 8036 touchMoveStopPropagation: !0, 8037 touchReleaseOnEdges: !1, 8038 uniqueNavElements: !0, 8039 pagination: null, 8040 paginationElement: "span", 8041 paginationClickable: !1, 8042 paginationHide: !1, 8043 paginationBulletRender: null, 8044 paginationProgressRender: null, 8045 paginationFractionRender: null, 8046 paginationCustomRender: null, 8047 paginationType: "bullets", 8048 resistance: !0, 8049 resistanceRatio: .85, 8050 nextButton: null, 8051 prevButton: null, 8052 watchSlidesProgress: !1, 8053 watchSlidesVisibility: !1, 8054 grabCursor: !1, 8055 preventClicks: !0, 8056 preventClicksPropagation: !0, 8057 slideToClickedSlide: !1, 8058 lazyLoading: !1, 8059 lazyLoadingInPrevNext: !1, 8060 lazyLoadingInPrevNextAmount: 1, 8061 lazyLoadingOnTransitionStart: !1, 8062 preloadImages: !0, 8063 updateOnImagesReady: !0, 8064 loop: !1, 8065 loopAdditionalSlides: 0, 8066 loopedSlides: null, 8067 control: void 0, 8068 controlInverse: !1,
8069 controlBy: "slide", 8070 normalizeSlideIndex: !0, 8071 allowSwipeToPrev: !0, 8072 allowSwipeToNext: !0, 8073 swipeHandler: null, 8074 noSwiping: !0, 8075 noSwipingClass: "swiper-no-swiping", 8076 passiveListeners: !0, 8077 containerModifierClass: "swiper-container-", 8078 slideClass: "swiper-slide", 8079 slideActiveClass: "swiper-slide-active", 8080 slideDuplicateActiveClass: "swiper-slide-duplicate-active", 8081 slideVisibleClass: "swiper-slide-visible", 8082 slideDuplicateClass: "swiper-slide-duplicate", 8083 slideNextClass: "swiper-slide-next", 8084 slideDuplicateNextClass: "swiper-slide-duplicate-next", 8085 slidePrevClass: "swiper-slide-prev", 8086 slideDuplicatePrevClass: "swiper-slide-duplicate-prev", 8087 wrapperClass: "swiper-wrapper", 8088 bulletClass: "swiper-pagination-bullet", 8089 bulletActiveClass: "swiper-pagination-bullet-active", 8090 buttonDisabledClass: "swiper-button-disabled", 8091 paginationCurrentClass: "swiper-pagination-current", 8092 paginationTotalClass: "swiper-pagination-total", 8093 paginationHiddenClass: "swiper-pagination-hidden", 8094 paginationProgressbarClass: "swiper-pagination-progressbar", 8095 paginationClickableClass: "swiper-pagination-clickable", 8096 paginationModifierClass: "swiper-pagination-", 8097 lazyLoadingClass: "swiper-lazy", 8098 lazyStatusLoadingClass: "swiper-lazy-loading", 8099 lazyStatusLoadedClass: "swiper-lazy-loaded", 8100 lazyPreloaderClass: "swiper-lazy-preloader", 8101 notificationClass: "swiper-notification", 8102 preloaderClass: "preloader", 8103 zoomContainerClass: "swiper-zoom-container", 8104 observer: !1, 8105 observeParents: !1, 8106 a11y: !1, 8107 prevSlideMessage: "Previous slide", 8108 nextSlideMessage: "Next slide", 8109 firstSlideMessage: "This is the first slide", 8110 lastSlideMessage: "This is the last slide", 8111 paginationBulletMessage: "Go to slide {{index}}", 8112 runCallbacksOnInit: !0 8113 }, m = r && r.virtualTranslate; 8114 r = r || {}; 8115 var f = {}; 8116 for (var _ in r) if ("object" != typeof r[_] || null === r[_] || r[_].nodeType || r[_] === window || r[_] === document || void 0 !== i && r[_] instanceof i || "undefined" != typeof jQuery && r[_] instanceof jQuery) f[_] = r[_]; 8117 else { 8118 f[_] = {}; 8119 for (var v in r[_]) f[_][v] = r[_][v] 8120 } 8121 for (var b in h) if (void 0 === r[b]) r[b] = h[b]; 8122 else if ("object" == typeof r[b]) for (var y in h[b]) void 0 === r[b][y] && (r[b][y] = h[b][y]); 8123 var w = this; 8124 if (w.params = r, w.originalParams = f, w.classNames = [], void 0 !== e && void 0 !== i && (e = i), (void 0 !== e || (e = void 0 === i ? window.Dom7 || window.Zepto || window.jQuery : i)) && (w.$ = e, w.currentBreakpoint = void 0, w.getActiveBreakpoint = function() { 8125 if (!w.params.breakpoints) return !1; 8126 var e, t = !1, 8127 i = []; 8128 for (e in w.params.breakpoints) w.params.breakpoints.hasOwnProperty(e) && i.push(e); 8129 i.sort(function(e, t) { 8130 return parseInt(e, 10) > parseInt(t, 10) 8131 }); 8132 for (var n = 0; n < i.length; n++)(e = i[n]) >= window.innerWidth && !t && (t = e); 8133 return t || "max" 8134 }, w.setBreakpoint = function() { 8135 var e = w.getActiveBreakpoint(); 8136 if (e && w.currentBreakpoint !== e) { 8137 var t = e in w.params.breakpoints ? w.params.breakpoints[e] : w.originalParams, 8138 i = w.params.loop && t.slidesPerView !== w.params.slidesPerView; 8139 for (var n in t) w.params[n] = t[n]; 8140 w.currentBreakpoint = e, i && w.destroyLoop && w.reLoop(!0) 8141 } 8142 }, w.params.breakpoints && w.setBreakpoint(), w.container = e(n), 0 !== w.container.length)) { 8143 if (w.container.length > 1) { 8144 var T = []; 8145 return w.container.each(function() { 8146 T.push(new t(this, r)) 8147 }), T 8148 } 8149 w.container[0].swiper = w, w.container.data("swiper", w), w.classNames.push(w.params.containerModifierClass + w.params.direction), w.params.freeMode && w.classNames.push(w.params.containerModifierClass + "free-mode"), w.support.flexbox || (w.classNames.push(w.params.containerModifierClass + "no-flexbox"), w.params.slidesPerColumn = 1), w.params.autoHeight && w.classNames.push(w.params.containerModifierClass + "autoheight"), (w.params.parallax || w.params.watchSlidesVisibility) && (w.params.watchSlidesProgress = !0), w.params.touchReleaseOnEdges && (w.params.resistanceRatio = 0), ["cube", "coverflow", "flip"].indexOf(w.params.effect) >= 0 && (w.support.transforms3d ? (w.params.watchSlidesProgress = !0, w.classNames.push(w.params.containerModifierClass + "3d")) : w.params.effect = "slide"), "slide" !== w.params.effect && w.classNames.push(w.params.containerModifierClass + w.params.effect), "cube" === w.params.effect && (w.params.resistanceRatio = 0, w.params.slidesPerView = 1, w.params.slidesPerColumn = 1, w.params.slidesPerGroup = 1, w.params.centeredSlides = !1, w.params.spaceBetween = 0, w.params.virtualTranslate = !0), "fade" !== w.params.effect && "flip" !== w.params.effect || (w.params.slidesPerView = 1, w.params.slidesPerColumn = 1, w.params.slidesPerGroup = 1, w.params.watchSlidesProgress = !0, w.params.spaceBetween = 0, void 0 === m && (w.params.virtualTranslate = !0)), w.params.grabCursor && w.support.touch && (w.params.grabCursor = !1), w.wrapper = w.container.children("." + w.params.wrapperClass), w.params.pagination && (w.paginationContainer = e(w.params.pagination), w.params.uniqueNavElements && "string" == typeof w.params.pagination && w.paginationContainer.length > 1 && 1 === w.container.find(w.params.pagination).length && (w.paginationContainer = w.container.find(w.params.pagination)), "bullets" === w.params.paginationType && w.params.paginationClickable ? w.paginationContainer.addClass(w.params.paginationModifierClass + "clickable") : w.params.paginationClickable = !1, w.paginationContainer.addClass(w.params.paginationModifierClass + w.params.paginationType)), (w.params.nextButton || w.params.prevButton) && (w.params.nextButton && (w.nextButton = e(w.params.nextButton), w.params.uniqueNavElements && "string" == typeof w.params.nextButton && w.nextButton.length > 1 && 1 === w.container.find(w.params.nextButton).length && (w.nextButton = w.container.find(w.params.nextButton))), w.params.prevButton && (w.prevButton = e(w.params.prevButton), w.params.uniqueNavElements && "string" == typeof w.params.prevButton && w.prevButton.length > 1 && 1 === w.container.find(w.params.prevButton).length && (w.prevButton = w.container.find(w.params.prevButton)))), w.isHorizontal = function() { 8150 return "horizontal" === w.params.direction 8151 }, w.rtl = w.isHorizontal() && ("rtl" === w.container[0].dir.toLowerCase() || "rtl" === w.container.css("direction")), w.rtl && w.classNames.push(w.params.containerModifierClass + "rtl"), w.rtl && (w.wrongRTL = "-webkit-box" === w.wrapper.css("display")), w.params.slidesPerColumn > 1 && w.classNames.push(w.params.containerModifierClass + "multirow"), w.device.android && w.classNames.push(w.params.containerModifierClass + "android"), w.container.addClass(w.classNames.join(" ")), w.translate = 0, w.progress = 0, w.velocity = 0, w.lockSwipeToNext = function() { 8152 w.params.allowSwipeToNext = !1, w.params.allowSwipeToPrev === !1 && w.params.grabCursor && w.unsetGrabCursor(
8152) 8153 }, w.lockSwipeToPrev = function() { 8154 w.params.allowSwipeToPrev = !1, w.params.allowSwipeToNext === !1 && w.params.grabCursor && w.unsetGrabCursor() 8155 }, w.lockSwipes = function() { 8156 w.params.allowSwipeToNext = w.params.allowSwipeToPrev = !1, w.params.grabCursor && w.unsetGrabCursor() 8157 }, w.unlockSwipeToNext = function() { 8158 w.params.allowSwipeToNext = !0, w.params.allowSwipeToPrev === !0 && w.params.grabCursor && w.setGrabCursor() 8159 }, w.unlockSwipeToPrev = function() { 8160 w.params.allowSwipeToPrev = !0, w.params.allowSwipeToNext === !0 && w.params.grabCursor && w.setGrabCursor() 8161 }, w.unlockSwipes = function() { 8162 w.params.allowSwipeToNext = w.params.allowSwipeToPrev = !0, w.params.grabCursor && w.setGrabCursor() 8163 }, w.setGrabCursor = function(e) { 8164 w.container[0].style.cursor = "move", w.container[0].style.cursor = e ? "-webkit-grabbing" : "-webkit-grab", w.container[0].style.cursor = e ? "-moz-grabbin" : "-moz-grab", w.container[0].style.cursor = e ? "grabbing" : "grab" 8165 }, w.unsetGrabCursor = function() { 8166 w.container[0].style.cursor = "" 8167 }, w.params.grabCursor && w.setGrabCursor(), w.imagesToLoad = [], w.imagesLoaded = 0, w.loadImage = function(e, t, i, n, r, a) { 8168 function s() { 8169 a && a() 8170 } 8171 var o; 8172 e.complete && r ? s() : t ? (o = new window.Image, o.onload = s, o.onerror = s, n && (o.sizes = n), i && (o.srcset = i), t && (o.src = t)) : s() 8173 }, w.preloadImages = function() { 8174 function e() { 8175 void 0 !== w && null !== w && w && (void 0 !== w.imagesLoaded && w.imagesLoaded++, w.imagesLoaded === w.imagesToLoad.length && (w.params.updateOnImagesReady && w.update(), w.emit("onImagesReady", w))) 8176 } 8177 w.imagesToLoad = w.container.find("img"); 8178 for (var t = 0; t < w.imagesToLoad.length; t++) w.loadImage(w.imagesToLoad[t], w.imagesToLoad[t].currentSrc || w.imagesToLoad[t].getAttribute("src"), w.imagesToLoad[t].srcset || w.imagesToLoad[t].getAttribute("srcset"), w.imagesToLoad[t].sizes || w.imagesToLoad[t].getAttribute("sizes"), !0, e) 8179 }, w.autoplayTimeoutId = void 0, w.autoplaying = !1, w.autoplayPaused = !1, w.startAutoplay = function() { 8180 return void 0 === w.autoplayTimeoutId && !! w.params.autoplay && !w.autoplaying && (w.autoplaying = !0, 8181 w.emit("onAutoplayStart", w), void s()) 8182 }, w.stopAutoplay = function(e) { 8183 w.autoplayTimeoutId && (w.autoplayTimeoutId && clearTimeout(w.autoplayTimeoutId), w.autoplaying = !1, w.autoplayTimeoutId = void 0, w.emit("onAutoplayStop", w)) 8184 }, w.pauseAutoplay = function(e) { 8185 w.autoplayPaused || (w.autoplayTimeoutId && clearTimeout(w.autoplayTimeoutId), w.autoplayPaused = !0, 0 === e ? (w.autoplayPaused = !1, s()) : w.wrapper.transitionEnd(function() { 8186 w && (w.autoplayPaused = !1, w.autoplaying ? s() : w.stopAutoplay()) 8187 })) 8188 }, w.minTranslate = function() { 8189 return -w.snapGrid[0] 8190 }, w.maxTranslate = function() { 8191 return -w.snapGrid[w.snapGrid.length - 1] 8192 }, w.updateAutoHeight = function() { 8193 var e, t = [], 8194 i = 0; 8195 if ("auto" !== w.params.slidesPerView && w.params.slidesPerView > 1) for (e = 0; e < Math.ceil(w.params.slidesPerView); e++) { 8196 var n = w.activeIndex + e; 8197 if (n > w.slides.length) break; 8198 t.push(w.slides.eq(n)[0]) 8199 } else t.push(w.slides.eq(w.activeIndex)[0]); 8200 for (e = 0; e < t.length; e++) if (void 0 !== t[e]) { 8201 var r = t[e].offsetHeight; 8202 i = r > i ? r : i 8203 } 8204 i && w.wrapper.css("height", i + "px") 8205 }, w.updateContainerSize = function() { 8206 var e, t; 8207 e = void 0 !== w.params.width ? w.params.width : w.container[0].clientWidth, t = void 0 !== w.params.height ? w.params.height : w.container[0].clientHeight, 0 === e && w.isHorizontal() || 0 === t && !w.isHorizontal() || (e = e - parseInt(w.container.css("padding-left"), 10) - parseInt(w.container.css("padding-right"), 10), t = t - parseInt(w.container.css("padding-top"), 10) - parseInt(w.container.css("padding-bottom"), 10), w.width = e, w.height = t, w.size = w.isHorizontal() ? w.width : w.height) 8208 }, w.updateSlidesSize = function() { 8209 w.slides = w.wrapper.children("." + w.params.slideClass), w.snapGrid = [], w.slidesGrid = [], w.slidesSizesGrid = []; 8210 var e, t = w.params.spaceBetween, 8211 i = -w.params.slidesOffsetBefore, 8212 n = 0, 8213 r = 0; 8214 if (void 0 !== w.size) { 8215 "string" == typeof t && t.indexOf("%") >= 0 && (t = parseFloat(t.replace("%", "")) / 100 * w.size), w.virtualSize = -t, w.rtl ? w.slides.css({ 8216 marginLeft: "", 8217 marginTop: "" 8218 }) : w.slides.css({ 8219 marginRight: "", 8220 marginBottom: "" 8221 }); 8222 var s; 8223 w.params.slidesPerColumn > 1 && (s = Math.floor(w.slides.length / w.params.slidesPerColumn) === w.slides.length / w.params.slidesPerColumn ? w.slides.length : Math.ceil(w.slides.length / w.params.slidesPerColumn) * w.params.slidesPerColumn, "auto" !== w.params.slidesPerView && "row" === w.params.slidesPerColumnFill && (s = Math.max(s, w.params.slidesPerView * w.params.slidesPerColumn))); 8224 var o, l = w.params.slidesPerColumn, 8225 u = s / l, 8226 d = u - (w.params.slidesPerColumn * u - w.slides.length); 8227 for (e = 0; e < w.slides.length; e++) { 8228 o = 0; 8229 var c = w.slides.eq(e); 8230 if (w.params.slidesPerColumn > 1) { 8231 var g, p, h; 8232 "column" === w.params.slidesPerColumnFill ? (p = Math.floor(e / l), h = e - p * l, (p > d || p === d && h === l - 1) && ++h >= l && (h = 0, p++), g = p + h * s / l, c.css({ 8233 "-webkit-box-ordinal-group": g, 8234 "-moz-box-ordinal-group": g, 8235 "-ms-flex-order": g, 8236 "-webkit-order": g, 8237 order: g 8238 })) : (h = Math.floor(e / u), p = e - h * u), c.css("margin-" + (w.isHorizontal() ? "top" : "left"), 0 !== h && w.params.spaceBetween && w.params.spaceBetween + "px").attr("data-swiper-column", p).attr("data-swiper-row", h) 8239 } 8240 "none" !== c.css("display") && ("auto" === w.params.slidesPerView ? (o = w.isHorizontal() ? c.outerWidth(!0) : c.outerHeight(!0), w.params.roundLengths && (o = a(o))) : (o = (w.size - (w.params.slidesPerView - 1) * t) / w.params.slidesPerView, w.params.roundLengths && (o = a(o)), w.isHorizontal() ? w.slides[e].style.width = o + "px" : w.slides[e].style.height = o + "px"), w.slides[e].swiperSlideSize = o, w.slidesSizesGrid.push(o), w.params.centeredSlides ? (i = i + o / 2 + n / 2 + t, 0 === n && 0 !== e && (i = i - w.size / 2 - t), 0 === e && (i = i - w.size / 2 - t), Math.abs(i) < .001 && (i = 0), r % w.params.slidesPerGroup == 0 && w.snapGrid.push(i), w.slidesGrid.push(i)) : (r % w.params.slidesPerGroup == 0 && w.snapGrid.push(i), w.slidesGrid.push(i), i = i + o + t), w.virtualSize += o + t, n = o, r++) 8241 } 8242 w.virtualSize = Math.max(w.virtualSize, w.size) + w.params.slidesOffsetAfter; 8243 var m; 8244 if (w.rtl && w.wrongRTL && ("slide" === w.params.effect || "coverflow" === w.params.effect) && w.wrapper.css({ 8245 width: w.virtualSize + w.params.spaceBetween + "px" 8246 }), w.support.flexbox && !w.params.setWrapperSize || (w.isHorizontal() ? w.wrapper.css({ 8247 width: w.virtualSize + w.params.spaceBetween + "px" 8248 }) : w.wrapper.css({ 8249 height: w.virtualSize + w.params.spaceBetween + "px" 8250 })), w.params.slidesPerColumn > 1 && (w.virtualSize = (o + w.params.spaceBetween) * s, w.virtualSize = Math.
8250ceil(w.virtualSize / w.params.slidesPerColumn) - w.params.spaceBetween, w.isHorizontal() ? w.wrapper.css({ 8251 width: w.virtualSize + w.params.spaceBetween + "px" 8252 }) : w.wrapper.css({ 8253 height: w.virtualSize + w.params.spaceBetween + "px" 8254 }), w.params.centeredSlides)) { 8255 for (m = [], e = 0; e < w.snapGrid.length; e++) w.snapGrid[e] < w.virtualSize + w.snapGrid[0] && m.push(w.snapGrid[e]); 8256 w.snapGrid = m 8257 } 8258 if (!w.params.centeredSlides) { 8259 for (m = [], e = 0; e < w.snapGrid.length; e++) w.snapGrid[e] <= w.virtualSize - w.size && m.push(w.snapGrid[e]); 8260 w.snapGrid = m, Math.floor(w.virtualSize - w.size) - Math.floor(w.snapGrid[w.snapGrid.length - 1]) > 1 && w.snapGrid.push(w.virtualSize - w.size) 8261 } 8262 0 === w.snapGrid.length && (w.snapGrid = [0]), 0 !== w.params.spaceBetween && (w.isHorizontal() ? w.rtl ? w.slides.css({ 8263 marginLeft: t + "px" 8264 }) : w.slides.css({ 8265 marginRight: t + "px" 8266 }) : w.slides.css({ 8267 marginBottom: t + "px" 8268 })), w.params.watchSlidesProgress && w.updateSlidesOffset() 8269 } 8270 }, w.updateSlidesOffset = function() { 8271 for (var e = 0; e < w.slides.length; e++) w.slides[e].swiperSlideOffset = w.isHorizontal() ? w.slides[e].offsetLeft : w.slides[e].offsetTop 8272 }, w.currentSlidesPerView = function() { 8273 var e, t, i = 1; 8274 if (w.params.centeredSlides) { 8275 var n, r = w.slides[w.activeIndex].swiperSlideSize; 8276 for (e = w.activeIndex + 1; e < w.slides.length; e++) w.slides[e] && !n && (r += w.slides[e].swiperSlideSize, i++, r > w.size && (n = !0)); 8277 for (t = w.activeIndex - 1; t >= 0; t--) w.slides[t] && !n && (r += w.slides[t].swiperSlideSize, i++, r > w.size && (n = !0)) 8278 } else for (e = w.activeIndex + 1; e < w.slides.length; e++) w.slidesGrid[e] - w.slidesGrid[w.activeIndex] < w.size && i++; 8279 return i 8280 }, w.updateSlidesProgress = function(e) { 8281 if (void 0 === e && (e = w.translate || 0), 0 !== w.slides.length) { 8282 void 0 === w.slides[0].swiperSlideOffset && w.updateSlidesOffset(); 8283 var t = -e; 8284 w.rtl && (t = e), w.slides.removeClass(w.params.slideVisibleClass); 8285 for (var i = 0; i < w.slides.length; i++) { 8286 var n = w.slides[i], 8287 r = (t + (w.params.centeredSlides ? w.minTranslate() : 0) - n.swiperSlideOffset) / (n.swiperSlideSize + w.params.spaceBetween); 8288 if (w.params.watchSlidesVisibility) { 8289 var a = -(t - n.swiperSlideOffset), 8290 s = a + w.slidesSizesGrid[i]; 8291 (a >= 0 && a < w.size || s > 0 && s <= w.size || a <= 0 && s >= w.size) && w.slides.eq(i).addClass(w.params.slideVisibleClass) 8292 } 8293 n.progress = w.rtl ? -r : r 8294 } 8295 } 8296 }, w.updateProgress = function(e) { 8297 void 0 === e && (e = w.translate || 0); 8298 var t = w.maxTranslate() - w.minTranslate(), 8299 i = w.isBeginning, 8300 n = w.isEnd; 8301 0 === t ? (w.progress = 0, w.isBeginning = w.isEnd = !0) : (w.progress = (e - w.minTranslate()) / t, w.isBeginning = w.progress <= 0, w.isEnd = w.progress >= 1), w.isBeginning && !i && w.emit("onReachBeginning", w), w.isEnd && !n && w.emit("onReachEnd", w), w.params.watchSlidesProgress && w.updateSlidesProgress(e), w.emit("onProgress", w, w.progress) 8302 }, w.updateActiveIndex = function() { 8303 var e, t, i, n = w.rtl ? w.translate : -w.translate; 8304 for (t = 0; t < w.slidesGrid.length; t++) void 0 !== w.slidesGrid[t + 1] ? n >= w.slidesGrid[t] && n < w.slidesGrid[t + 1] - (w.slidesGrid[t + 1] - w.slidesGrid[t]) / 2 ? e = t : n >= w.slidesGrid[t] && n < w.slidesGrid[t + 1] && (e = t + 1) : n >= w.slidesGrid[t] && (e = t); 8305 w.params.normalizeSlideIndex && (e < 0 || void 0 === e) && (e = 0), i = Math.floor(e / w.params.slidesPerGroup), i >= w.snapGrid.length && (i = w.snapGrid.length - 1), e !== w.activeIndex && (w.snapIndex = i, w.previousIndex = w.activeIndex, w.activeIndex = e, w.updateClasses(), w.updateRealIndex()) 8306 }, w.updateRealIndex = function() { 8307 w.realIndex = parseInt(w.slides.eq(w.activeIndex).attr("data-swiper-slide-index") || w.activeIndex, 10) 8308 }, w.updateClasses = function() { 8309 w.slides.removeClass(w.params.slideActiveClass + " " + w.params.slideNextClass + " " + w.params.slidePrevClass + " " + w.params.slideDuplicateActiveClass + " " + w.params.slideDuplicateNextClass + " " + w.params.slideDuplicatePrevClass); 8310 var t = w.slides.eq(w.activeIndex); 8311 t.addClass(w.params.slideActiveClass), r.loop && (t.hasClass(w.params.slideDuplicateClass) ? w.wrapper.children("." + w.params.slideClass + ":not(." + w.params.slideDuplicateClass + ')[data-swiper-slide-index="' + w.realIndex + '"]').addClass(w.params.slideDuplicateActiveClass) : w.wrapper.children("." + w.params.slideClass + "." + w.params.slideDuplicateClass + '[data-swiper-slide-index="' + w.realIndex + '"]').addClass(w.params.slideDuplicateActiveClass)); 8312 var i = t.next("." + w.params.slideClass).addClass(w.params.slideNextClass); 8313 w.params.loop && 0 === i.length && (i = w.slides.eq(0), i.addClass(w.params.slideNextClass)); 8314 var n = t.prev("." + w.params.slideClass).addClass(w.params.slidePrevClass); 8315 if (w.params.loop && 0 === n.length && (n = w.slides.eq(-1), n.addClass(w.params.slidePrevClass)), r.loop && (i.hasClass(w.params.slideDuplicateClass) ? w.wrapper.children("." + w.params.slideClass + ":not(." + w.params.slideDuplicateClass + ')[data-swiper-slide-index="' + i.attr("data-swiper-slide-index") + '"]').addClass(w.params.slideDuplicateNextClass) : w.wrapper.children("." + w.params.slideClass + "." + w.params.slideDuplicateClass + '[data-swiper-slide-index="' + i.attr("data-swiper-slide-index") + '"]').addClass(w.params.slideDuplicateNextClass), n.hasClass(w.params.slideDuplicateClass) ? w.wrapper.children("." + w.params.slideClass + ":not(." + w.params.slideDuplicateClass + ')[data-swiper-slide-index="' + n.attr("data-swiper-slide-index") + '"]').addClass(w.params.slideDuplicatePrevClass) : w.wrapper.children("." + w.params.slideClass + "." + w.params.slideDuplicateClass + '[data-swiper-slide-index="' + n.attr("data-swiper-slide-index") + '"]').addClass(w.params.slideDuplicatePrevClass)), w.paginationContainer && w.paginationContainer.length > 0) { 8316 var a, s = w.params.loop ? Math.ceil((w.slides.length - 2 * w.loopedSlides) / w.params.slidesPerGroup) : w.snapGrid.length; 8317 if (w.params.loop ? (a = Math.ceil((w.activeIndex - w.loopedSlides) / w.params.slidesPerGroup), a > w.slides.length - 1 - 2 * w.loopedSlides && (a -= w.slides.length - 2 * w.loopedSlides), a > s - 1 && (a -= s), a < 0 && "bullets" !== w.params.paginationType && (a = s + a)) : a = void 0 !== w.snapIndex ? w.snapIndex : w.activeIndex || 0, "bullets" === w.params.paginationType && w.bullets && w.bullets.length > 0 && (w.bullets.removeClass(w.params.bulletActiveClass), w.paginationContainer.length > 1 ? w.bullets.each(function() { 8318 e(this).index() === a && e(this).addClass(w.params.bulletActiveClass) 8319 }) : w.bullets.eq(a).addClass(w.params.bulletActiveClass)), "fraction" === w.params.paginationType && (w.paginationContainer.find("." + w.params.paginationCurrentClass).text(a + 1), w.paginationContainer.find("." + w.params.paginationTotalClass).text(s)), "progress" === w.params.paginationType) { 8320 var o = (a + 1) / s, 8321 l = o, 8322 u = 1; 8323 w.isHorizontal() || (u = o, l = 1), w.paginationContainer.find("." + w.params.paginationProgressbarClass).transform("translate3d(0,
83230,0) scaleX(" + l + ") scaleY(" + u + ")").transition(w.params.speed) 8324 } 8325 "custom" === w.params.paginationType && w.params.paginationCustomRender && (w.paginationContainer.html(w.params.paginationCustomRender(w, a + 1, s)), w.emit("onPaginationRendered", w, w.paginationContainer[0])) 8326 } 8327 w.params.loop || (w.params.prevButton && w.prevButton && w.prevButton.length > 0 && (w.isBeginning ? (w.prevButton.addClass(w.params.buttonDisabledClass), w.params.a11y && w.a11y && w.a11y.disable(w.prevButton)) : (w.prevButton.removeClass(w.params.buttonDisabledClass), w.params.a11y && w.a11y && w.a11y.enable(w.prevButton))), w.params.nextButton && w.nextButton && w.nextButton.length > 0 && (w.isEnd ? (w.nextButton.addClass(w.params.buttonDisabledClass), w.params.a11y && w.a11y && w.a11y.disable(w.nextButton)) : (w.nextButton.removeClass(w.params.buttonDisabledClass), w.params.a11y && w.a11y && w.a11y.enable(w.nextButton)))) 8328 }, w.updatePagination = function() { 8329 if (w.params.pagination && w.paginationContainer && w.paginationContainer.length > 0) { 8330 var e = ""; 8331 if ("bullets" === w.params.paginationType) { 8332 for (var t = w.params.loop ? Math.ceil((w.slides.length - 2 * w.loopedSlides) / w.params.slidesPerGroup) : w.snapGrid.length, i = 0; i < t; i++) e += w.params.paginationBulletRender ? w.params.paginationBulletRender(w, i, w.params.bulletClass) : "<" + w.params.paginationElement + ' class="' + w.params.bulletClass + '"></' + w.params.paginationElement + ">"; 8333 w.paginationContainer.html(e), w.bullets = w.paginationContainer.find("." + w.params.bulletClass), w.params.paginationClickable && w.params.a11y && w.a11y && w.a11y.initPagination() 8334 } 8335 "fraction" === w.params.paginationType && (e = w.params.paginationFractionRender ? w.params.paginationFractionRender(w, w.params.paginationCurrentClass, w.params.paginationTotalClass) : '<span class="' + w.params.paginationCurrentClass + '"></span> / <span class="' + w.params.paginationTotalClass + '"></span>', w.paginationContainer.html(e)), "progress" === w.params.paginationType && (e = w.params.paginationProgressRender ? w.params.paginationProgressRender(w, w.params.paginationProgressbarClass) : '<span class="' + w.params.paginationProgressbarClass + '"></span>', w.paginationContainer.html(e)), "custom" !== w.params.paginationType && w.emit("onPaginationRendered", w, w.paginationContainer[0]) 8336 } 8337 }, w.update = function(e) { 8338 function t() { 8339 w.rtl, w.translate, i = Math.min(Math.max(w.translate, w.maxTranslate()), w.minTranslate()), w.setWrapperTranslate(i), w.updateActiveIndex(), w.updateClasses() 8340 } 8341 if (w) { 8342 w.updateContainerSize(), w.updateSlidesSize(), w.updateProgress(), w.updatePagination(), w.updateClasses(), w.params.scrollbar && w.scrollbar && w.scrollbar.set(); 8343 var i; 8344 e ? (w.controller && w.controller.spline && (w.controller.spline = void 0), w.params.freeMode ? (t(), w.params.autoHeight && w.updateAutoHeight()) : (("auto" === w.params.slidesPerView || w.params.slidesPerView > 1) && w.isEnd && !w.params.centeredSlides ? w.slideTo(w.slides.length - 1, 0, !1, !0) : w.slideTo(w.activeIndex, 0, !1, !0)) || t()) : w.params.autoHeight && w.updateAutoHeight() 8345 } 8346 }, w.onResize = function(e) { 8347 w.params.onBeforeResize && w.params.onBeforeResize(w), w.params.breakpoints && w.setBreakpoint(); 8348 var t = w.params.allowSwipeToPrev, 8349 i = w.params.allowSwipeToNext; 8350 w.params.allowSwipeToPrev = w.params.allowSwipeToNext = !0, w.updateContainerSize(), w.updateSlidesSize(), ("auto" === w.params.slidesPerView || w.params.freeMode || e) && w.updatePagination(), w.params.scrollbar && w.scrollbar && w.scrollbar.set(), w.controller && w.controller.spline && (w.controller.spline = void 0); 8351 var n = !1; 8352 if (w.params.freeMode) { 8353 var r = Math.min(Math.max(w.translate, w.maxTranslate()), w.minTranslate()); 8354 w.setWrapperTranslate(r), w.updateActiveIndex(), w.updateClasses(), w.params.autoHeight && w.updateAutoHeight() 8355 } else w.updateClasses(), n = ("auto" === w.params.slidesPerView || w.params.slidesPerView > 1) && w.isEnd && !w.params.centeredSlides ? w.slideTo(w.slides.length - 1, 0, !1, !0) : w.slideTo(w.activeIndex, 0, !1, !0); 8356 w.params.lazyLoading && !n && w.lazy && w.lazy.load(), w.params.allowSwipeToPrev = t, w.params.allowSwipeToNext = i, w.params.onAfterResize && w.params.onAfterResize(w) 8357 }, w.touchEventsDesktop = { 8358 start: "mousedown", 8359 move: "mousemove", 8360 end: "mouseup" 8361 }, window.navigator.pointerEnabled ? w.touchEventsDesktop = { 8362 start: "pointerdown", 8363 move: "pointermove", 8364 end: "pointerup" 8365 } : window.navigator.msPointerEnabled && (w.touchEventsDesktop = { 8366 start: "MSPointerDown", 8367 move: "MSPointerMove", 8368 end: "MSPointerUp" 8369 }), w.touchEvents = { 8370 start: w.support.touch || !w.params.simulateTouch ? "touchstart" : w.touchEventsDesktop.start, 8371 move: w.support.touch || !w.params.simulateTouch ? "touchmove" : w.touchEventsDesktop.move, 8372 end: w.support.touch || !w.params.simulateTouch ? "touchend" : w.touchEventsDesktop.end 8373 }, (window.navigator.pointerEnabled || window.navigator.msPointerEnabled) && ("container" === w.params.touchEventsTarget ? w.container : w.wrapper).addClass("swiper-wp8-" + w.params.direction), w.initEvents = function(e) { 8374 var t = e ? "off" : "on", 8375 i = e ? "removeEventListener" : "addEventListener", 8376 n = "container" === w.params.touchEventsTarget ? w.container[0] : w.wrapper[0], 8377 a = w.support.touch ? n : document, 8378 s = !! w.params.nested; 8379 if (w.browser.ie) n[i](w.touchEvents.start, w.onTouchStart, !1), a[i](w.touchEvents.move, w.onTouchMove, s), a[i](w.touchEvents.end, w.onTouchEnd, !1); 8380 else { 8381 if (w.support.touch) { 8382 var o = !("touchstart" !== w.touchEvents.start || !w.support.passiveListener || !w.params.passiveListeners) && { 8383 passive: !0, 8384 capture: !1 8385 }; 8386 n[i](w.touchEvents.start, w.onTouchStart, o), n[i](w.touchEvents.move, w.onTouchMove, s), n[i](w.touchEvents.end, w.onTouchEnd, o) 8387 }(r.simulateTouch && !w.device.ios && !w.device.android || r.simulateTouch && !w.support.touch && w.device.ios) && (n[i]("mousedown", w.onTouchStart, !1), document[i]("mousemove", w.onTouchMove, s), document[i]("mouseup", w.onTouchEnd, !1)) 8388 } 8389 window[i]("resize", w.onResize), w.params.nextButton && w.nextButton && w.nextButton.length > 0 && (w.nextButton[t]("click", w.onClickNext), w.params.a11y && w.a11y && w.nextButton[t]("keydown", w.a11y.onEnterKey)), w.params.prevButton && w.prevButton && w.prevButton.length > 0 && (w.prevButton[t]("click", w.onClickPrev), w.params.a11y && w.a11y && w.prevButton[t]("keydown", w.a11y.onEnterKey)), w.params.pagination && w.params.paginationClickable && (w.paginationContainer[t]("click", "." + w.params.bulletClass, w.onClickIndex), w.params.a11y && w.a11y && w.paginationContainer[t]("keydown", "." + w.params.bulletClass, w.a11y.onEnterKey)), (w.params.preventClicks || w.params.preventClicksPropagation) && n[i]("click", w.preventClicks, !0) 8390 }, w.attachEvents = function() { 8391 w.initEvents() 8392 }, w.detachEvents = function() { 8393 w.initEvents(!0) 8394 }, w.allowClick = !0, w.preventClicks = function(e) { 8395 w.allowClick || (w.params.preventClicks && e.preventDefault(), w.params.preventClicksPropagation && w.animating && (e.stopPropagation(), e.stopImmediatePropagation())) 8396 }, w.onClickNext = function(e) { 8397 e.preventDefault(), w.isEnd && !w.params.loop || w.slideNext() 8398 }, w.onClickPrev = function(e) { 8399 e.preventDefault(), w.isBeginning && !w.params.loop || w.slidePrev() 8400 }, w.onClickIndex = function(t) { 8401 t.preventDefault(); 8402 var i = e(this).index() * w.params.slidesPerGroup; 8403 w.params.loop && (i += w.loopedSlides), w.slideTo(i) 8404 }, w.updateClickedSlide = function(t) { 8405 var i = o(t, "." + w.params.slideClass), 8406 n = !1; 8407 if (i) for (var r = 0; r < w.slides.length; r++) w.slides[r] === i && (n = !0);
8408 if (!i || !n) return w.clickedSlide = void 0, void(w.clickedIndex = void 0); 8409 if (w.clickedSlide = i, w.clickedIndex = e(i).index(), w.params.slideToClickedSlide && void 0 !== w.clickedIndex && w.clickedIndex !== w.activeIndex) { 8410 var a, s = w.clickedIndex, 8411 l = "auto" === w.params.slidesPerView ? w.currentSlidesPerView() : w.params.slidesPerView; 8412 if (w.params.loop) { 8413 if (w.animating) return; 8414 a = parseInt(e(w.clickedSlide).attr("data-swiper-slide-index"), 10), w.params.centeredSlides ? s < w.loopedSlides - l / 2 || s > w.slides.length - w.loopedSlides + l / 2 ? (w.fixLoop(), s = w.wrapper.children("." + w.params.slideClass + '[data-swiper-slide-index="' + a + '"]:not(.' + w.params.slideDuplicateClass + ")").eq(0).index(), setTimeout(function() { 8415 w.slideTo(s) 8416 }, 0)) : w.slideTo(s) : s > w.slides.length - l ? (w.fixLoop(), s = w.wrapper.children("." + w.params.slideClass + '[data-swiper-slide-index="' + a + '"]:not(.' + w.params.slideDuplicateClass + ")").eq(0).index(), setTimeout(function() { 8417 w.slideTo(s) 8418 }, 0)) : w.slideTo(s) 8419 } else w.slideTo(s) 8420 } 8421 }; 8422 var x, S, I, E, P, C, j, A, M, z, O = "input, select, textarea, button, video", 8423 k = Date.now(), 8424 L = []; 8425 w.animating = !1, w.touches = { 8426 startX: 0, 8427 startY: 0, 8428 currentX: 0, 8429 currentY: 0, 8430 diff: 0 8431 }; 8432 var H, N; 8433 w.onTouchStart = function(t) { 8434 if (t.originalEvent && (t = t.originalEvent), (H = "touchstart" === t.type) || !("which" in t) || 3 !== t.which) { 8435 if (w.params.noSwiping && o(t, "." + w.params.noSwipingClass)) return void(w.allowClick = !0); 8436 if (!w.params.swipeHandler || o(t, w.params.swipeHandler)) { 8437 var i = w.touches.currentX = "touchstart" === t.type ? t.targetTouches[0].pageX : t.pageX, 8438 n = w.touches.currentY = "touchstart" === t.type ? t.targetTouches[0].pageY : t.pageY; 8439 if (!(w.device.ios && w.params.iOSEdgeSwipeDetection && i <= w.params.iOSEdgeSwipeThreshold)) { 8440 if (x = !0, S = !1, I = !0, P = void 0, N = void 0, w.touches.startX = i, w.touches.startY = n, E = Date.now(), w.allowClick = !0, w.updateContainerSize(), w.swipeDirection = void 0, w.params.threshold > 0 && (A = !1), "touchstart" !== t.type) { 8441 var r = !0; 8442 e(t.target).is(O) && (r = !1), document.activeElement && e(document.activeElement).is(O) && document.activeElement.blur(), r && t.preventDefault() 8443 } 8444 w.emit("onTouchStart", w, t) 8445 } 8446 } 8447 } 8448 }, w.onTouchMove = function(t) { 8449 if (t.originalEvent && (t = t.originalEvent), !H || "mousemove" !== t.type) { 8450 if (t.preventedByNestedSwiper) return w.touches.startX = "touchmove" === t.type ? t.targetTouches[0].pageX : t.pageX, void(w.touches.startY = "touchmove" === t.type ? t.targetTouches[0].pageY : t.pageY); 8451 if (w.params.onlyExternal) return w.allowClick = !1, void(x && (w.touches.startX = w.touches.currentX = "touchmove" === t.type ? t.targetTouches[0].pageX : t.pageX, w.touches.startY = w.touches.currentY = "touchmove" === t.type ? t.targetTouches[0].pageY : t.pageY, E = Date.now())); 8452 if (H && w.params.touchReleaseOnEdges && !w.params.loop) if (w.isHorizontal()) { 8453 if (w.touches.currentX < w.touches.startX && w.translate <= w.maxTranslate() || w.touches.currentX > w.touches.startX && w.translate >= w.minTranslate()) return 8454 } else if (w.touches.currentY < w.touches.startY && w.translate <= w.maxTranslate() || w.touches.currentY > w.touches.startY && w.translate >= w.minTranslate()) return; 8455 if (H && document.activeElement && t.target === document.activeElement && e(t.target).is(O)) return S = !0, void(w.allowClick = !1); 8456 if (I && w.emit("onTouchMove", w, t), !(t.targetTouches && t.targetTouches.length > 1)) { 8457 if (w.touches.currentX = "touchmove" === t.type ? t.targetTouches[0].pageX : t.pageX, w.touches.currentY = "touchmove" === t.type ? t.targetTouches[0].pageY : t.pageY, void 0 === P) { 8458 var i; 8459 w.isHorizontal() && w.touches.currentY === w.touches.startY || !w.isHorizontal() && w.touches.currentX === w.touches.startX ? P = !1 : (i = 180 * Math.atan2(Math.abs(w.touches.currentY - w.touches.startY), Math.abs(w.touches.currentX - w.touches.startX)) / Math.PI, P = w.isHorizontal() ? i > w.params.touchAngle : 90 - i > w.params.touchAngle) 8460 } 8461 if (P && w.emit("onTouchMoveOpposite", w, t), void 0 === N && (w.touches.currentX === w.touches.startX && w.touches.currentY === w.touches.startY || (N = !0)), x) { 8462 if (P) return void(x = !1); 8463 if (N) { 8464 w.allowClick = !1, w.emit("onSliderMove", w, t), t.preventDefault(), w.params.touchMoveStopPropagation && !w.params.nested && t.stopPropagation(), S || (r.loop && w.fixLoop(), j = w.getWrapperTranslate(), w.setWrapperTransition(0), w.animating && w.wrapper.trigger("webkitTransitionEnd transitionend oTransitionEnd MSTransitionEnd msTransitionEnd"), w.params.autoplay && w.autoplaying && (w.params.autoplayDisableOnInteraction ? w.stopAutoplay() : w.pauseAutoplay()), z = !1, !w.params.grabCursor || w.params.allowSwipeToNext !== !0 && w.params.allowSwipeToPrev !== !0 || w.setGrabCursor(!0)), S = !0; 8465 var n = w.touches.diff = w.isHorizontal() ? w.touches.currentX - w.touches.startX : w.touches.currentY - w.touches.startY; 8466 n *= w.params.touchRatio, w.rtl && (n = -n), w.swipeDirection = n > 0 ? "prev" : "next", C = n + j; 8467 var a = !0; 8468 if (n > 0 && C > w.minTranslate() ? (a = !1, w.params.resistance && (C = w.minTranslate() - 1 + Math.pow(-w.minTranslate() + j + n, w.params.resistanceRatio))) : n < 0 && C < w.maxTranslate() && (a = !1, w.params.resistance && (C = w.maxTranslate() + 1 - Math.pow(w.maxTranslate() - j - n, w.params.resistanceRatio))), a && (t.preventedByNestedSwiper = !0), !w.params.allowSwipeToNext && "next" === w.swipeDirection && C < j && (C = j), !w.params.allowSwipeToPrev && "prev" === w.swipeDirection && C > j && (C = j), w.params.threshold > 0) { 8469 if (!(Math.abs(n) > w.params.threshold || A)) return void(C = j); 8470 if (!A) return A = !0, w.touches.startX = w.touches.currentX, w.touches.startY = w.touches.currentY, C = j, void(w.touches.diff = w.isHorizontal() ? w.touches.currentX - w.touches.startX : w.touches.currentY - w.touches.startY) 8471 } 8472 w.params.followFinger && ((w.params.freeMode || w.params.watchSlidesProgress) && w.updateActiveIndex(), w.params.freeMode && (0 === L.length && L.push({ 8473 position: w.touches[w.isHorizontal() ? "startX" : "startY"], 8474 time: E 8475 }), L.push({ 8476 position: w.touches[w.isHorizontal() ? "currentX" : "currentY"], 8477 time: (new window.Date).getTime() 8478 })), w.updateProgress(C), w.setWrapperTranslate(C)) 8479 } 8480 } 8481 } 8482 } 8483 }, w.onTouchEnd = function(t) { 8484 if (t.originalEvent && (t = t.originalEvent), I && w.emit("onTouchEnd", w, t), I = !1, x) { 8485 w.params.grabCursor && S && x && (w.params.allowSwipeToNext === !0 || w.params.allowSwipeToPrev === !0) && w.setGrabCursor(!1); 8486 var i = Date.now(),
vendor: 11,896 bytes, lines 8487-8589
8487 n = i - E; 8488 if (w.allowClick && (w.updateClickedSlide(t), w.emit("onTap", w, t), n < 300 && i - k > 300 && (M && clearTimeout(M), M = setTimeout(function() { 8489 w && (w.params.paginationHide && w.paginationContainer.length > 0 && !e(t.target).hasClass(w.params.bulletClass) && w.paginationContainer.toggleClass(w.params.paginationHiddenClass), w.emit("onClick", w, t)) 8490 }, 300)), n < 300 && i - k < 300 && (M && clearTimeout(M), w.emit("onDoubleTap", w, t))), k = Date.now(), setTimeout(function() { 8491 w && (w.allowClick = !0) 8492 }, 0), !x || !S || !w.swipeDirection || 0 === w.touches.diff || C === j) return void(x = S = !1); 8493 x = S = !1; 8494 var r; 8495 if (r = w.params.followFinger ? w.rtl ? w.translate : -w.translate : -C, w.params.freeMode) { 8496 if (r < -w.minTranslate()) return void w.slideTo(w.activeIndex); 8497 if (r > -w.maxTranslate()) return void(w.slides.length < w.snapGrid.length ? w.slideTo(w.snapGrid.length - 1) : w.slideTo(w.slides.length - 1)); 8498 if (w.params.freeModeMomentum) { 8499 if (L.length > 1) { 8500 var a = L.pop(), 8501 s = L.pop(), 8502 o = a.position - s.position, 8503 l = a.time - s.time; 8504 w.velocity = o / l, w.velocity = w.velocity / 2, Math.abs(w.velocity) < w.params.freeModeMinimumVelocity && (w.velocity = 0), (l > 150 || (new window.Date).getTime() - a.time > 300) && (w.velocity = 0) 8505 } else w.velocity = 0; 8506 w.velocity = w.velocity * w.params.freeModeMomentumVelocityRatio, L.length = 0; 8507 var u = 1e3 * w.params.freeModeMomentumRatio, 8508 d = w.velocity * u, 8509 c = w.translate + d; 8510 w.rtl && (c = -c); 8511 var g, p = !1, 8512 h = 20 * Math.abs(w.velocity) * w.params.freeModeMomentumBounceRatio; 8513 if (c < w.maxTranslate()) w.params.freeModeMomentumBounce ? (c + w.maxTranslate() < -h && (c = w.maxTranslate() - h), g = w.maxTranslate(), p = !0, z = !0) : c = w.maxTranslate(); 8514 else if (c > w.minTranslate()) w.params.freeModeMomentumBounce ? (c - w.minTranslate() > h && (c = w.minTranslate() + h), g = w.minTranslate(), p = !0, z = !0) : c = w.minTranslate(); 8515 else if (w.params.freeModeSticky) { 8516 var m, f = 0; 8517 for (f = 0; f < w.snapGrid.length; f += 1) if (w.snapGrid[f] > -c) { 8518 m = f; 8519 break 8520 } 8521 c = Math.abs(w.snapGrid[m] - c) < Math.abs(w.snapGrid[m - 1] - c) || "next" === w.swipeDirection ? w.snapGrid[m] : w.snapGrid[m - 1], w.rtl || (c = -c) 8522 } 8523 if (0 !== w.velocity) u = w.rtl ? Math.abs((-c - w.translate) / w.velocity) : Math.abs((c - w.translate) / w.velocity); 8524 else if (w.params.freeModeSticky) return void w.slideReset(); 8525 w.params.freeModeMomentumBounce && p ? (w.updateProgress(g), w.setWrapperTransition(u), w.setWrapperTranslate(c), w.onTransitionStart(), w.animating = !0, w.wrapper.transitionEnd(function() { 8526 w && z && (w.emit("onMomentumBounce", w), w.setWrapperTransition(w.params.speed), w.setWrapperTranslate(g), w.wrapper.transitionEnd(function() { 8527 w && w.onTransitionEnd() 8528 })) 8529 })) : w.velocity ? (w.updateProgress(c), w.setWrapperTransition(u), w.setWrapperTranslate(c), w.onTransitionStart(), w.animating || (w.animating = !0, w.wrapper.transitionEnd(function() { 8530 w && w.onTransitionEnd() 8531 }))) : w.updateProgress(c), w.updateActiveIndex() 8532 } 8533 return void((!w.params.freeModeMomentum || n >= w.params.longSwipesMs) && (w.updateProgress(), w.updateActiveIndex())) 8534 } 8535 var _, v = 0, 8536 b = w.slidesSizesGrid[0]; 8537 for (_ = 0; _ < w.slidesGrid.length; _ += w.params.slidesPerGroup) void 0 !== w.slidesGrid[_ + w.params.slidesPerGroup] ? r >= w.slidesGrid[_] && r < w.slidesGrid[_ + w.params.slidesPerGroup] && (v = _, b = w.slidesGrid[_ + w.params.slidesPerGroup] - w.slidesGrid[_]) : r >= w.slidesGrid[_] && (v = _, b = w.slidesGrid[w.slidesGrid.length - 1] - w.slidesGrid[w.slidesGrid.length - 2]); 8538 var y = (r - w.slidesGrid[v]) / b; 8539 if (n > w.params.longSwipesMs) { 8540 if (!w.params.longSwipes) return void w.slideTo(w.activeIndex); 8541 "next" === w.swipeDirection && (y >= w.params.longSwipesRatio ? w.slideTo(v + w.params.slidesPerGroup) : w.slideTo(v)), "prev" === w.swipeDirection && (y > 1 - w.params.longSwipesRatio ? w.slideTo(v + w.params.slidesPerGroup) : w.slideTo(v)) 8542 } else { 8543 if (!w.params.shortSwipes) return void w.slideTo(w.activeIndex); 8544 "next" === w.swipeDirection && w.slideTo(v + w.params.slidesPerGroup), "prev" === w.swipeDirection && w.slideTo(v) 8545 } 8546 } 8547 }, w._slideTo = function(e, t) { 8548 return w.slideTo(e, t, !0, !0) 8549 }, w.slideTo = function(e, t, i, n) { 8550 void 0 === i && (i = !0), void 0 === e && (e = 0), e < 0 && (e = 0), w.snapIndex = Math.floor(e / w.params.slidesPerGroup), w.snapIndex >= w.snapGrid.length && (w.snapIndex = w.snapGrid.length - 1); 8551 var r = -w.snapGrid[w.snapIndex]; 8552 if (w.params.autoplay && w.autoplaying && (n || !w.params.autoplayDisableOnInteraction ? w.pauseAutoplay(t) : w.stopAutoplay()), w.updateProgress(r), w.params.normalizeSlideIndex) for (var a = 0; a < w.slidesGrid.length; a++) - Math.floor(100 * r) >= Math.floor(100 * w.slidesGrid[a]) && (e = a); 8553 return !(!w.params.allowSwipeToNext && r < w.translate && r < w.minTranslate() || !w.params.allowSwipeToPrev && r > w.translate && r > w.maxTranslate() && (w.activeIndex || 0) !== e || (void 0 === t && (t = w.params.speed), w.previousIndex = w.activeIndex || 0, w.activeIndex = e, w.updateRealIndex(), w.rtl && -r === w.translate || !w.rtl && r === w.translate ? (w.params.autoHeight && w.updateAutoHeight(), w.updateClasses(), "slide" !== w.params.effect && w.setWrapperTranslate(r), 1) : (w.updateClasses(), w.onTransitionStart(i), 0 === t || w.browser.lteIE9 ? (w.setWrapperTranslate(r), w.setWrapperTransition(0), w.onTransitionEnd(i)) : (w.setWrapperTranslate(r), w.setWrapperTransition(t), w.animating || (w.animating = !0, w.wrapper.transitionEnd(function() { 8554 w && w.onTransitionEnd(i) 8555 }))), 0))) 8556 }, w.onTransitionStart = function(e) { 8557 void 0 === e && (e = !0), w.params.autoHeight && w.updateAutoHeight(), w.lazy && w.lazy.onTransitionStart(), e && (w.emit("onTransitionStart", w), w.activeIndex !== w.previousIndex && (w.emit("onSlideChangeStart", w), w.activeIndex > w.previousIndex ? w.emit("onSlideNextStart", w) : w.emit("onSlidePrevStart", w))) 8558 }, w.onTransitionEnd = function(e) { 8559 w.animating = !1, w.setWrapperTransition(0), void 0 === e && (e = !0), w.lazy && w.lazy.onTransitionEnd(), e && (w.emit("onTransitionEnd", w), w.activeIndex !== w.previousIndex && (w.emit("onSlideChangeEnd", w), w.activeIndex > w.previousIndex ? w.emit("onSlideNextEnd", w) : w.emit("onSlidePrevEnd", w))), w.params.history && w.history && w.history.setHistory(w.params.history, w.activeIndex), w.params.hashnav && w.hashnav && w.hashnav.setHash() 8560 }, w.slideNext = function(e, t, i) { 8561 return w.params.loop ? !w.animating && (w.fixLoop(), w.container[0].clientLeft, w.slideTo(w.activeIndex + w.params.slidesPerGroup, t, e, i)) : w.slideTo(w.activeIndex + w.params.slidesPerGroup, t, e, i) 8562 }, w._slideNext = function(e) { 8563 return w.slideNext(!0, e, !0) 8564 }, w.slidePrev = function(e, t, i) { 8565 return w.params.loop ? !w.animating && (w.fixLoop(), w.container[0].clientLeft, w.slideTo(w.activeIndex - 1, t, e, i)) : w.slideTo(w.activeIndex - 1, t, e, i) 8566 }, w._slidePrev = function(e) { 8567 return w.slidePrev(!0, e, !0) 8568 }, w.slideReset = function(e, t, i) { 8569 return w.slideTo(w.activeIndex, t, e) 8570 }, w.disableTouchControl = function() { 8571 return w.params.onlyExternal = !0, !0 8572 }, w.enableTouchControl = function() { 8573 return w.params.onlyExternal = !1, !0 8574 }, w.setWrapperTransition = function(e, t) { 8575 w.wrapper.transition(e), "slide" !== w.params.effect && w.effects[w.params.effect] && w.effects[w.params.effect].setTransition(e), w.params.parallax && w.parallax && w.parallax.setTransition(e), w.params.scrollbar && w.scrollbar && w.scrollbar.setTransition(e), w.params.control && w.controller && w.controller.setTransition(e, t), w.emit("onSetTransition", w, e) 8576 }, w.setWrapperTranslate = function(e, t, i) { 8577 var n = 0, 8578 r = 0; 8579 w.isHorizontal() ? n = w.rtl ? -e : e : r = e, w.params.roundLengths && (n = a(n), r = a(r)), w.params.virtualTranslate || (w.support.transforms3d ? w.wrapper.transform("translate3d(" + n + "px, " + r + "px, 0px)") : w.wrapper.transform("translate(" + n + "px, " + r + "px)")), w.translate = w.isHorizontal() ? n : r; 8580 var s, o = w.maxTranslate() - w.minTranslate(); 8581 s = 0 === o ? 0 : (e - w.minTranslate()) / o, s !== w.progress && w.updateProgress(e), t && w.updateActiveIndex(), "slide" !== w.params.effect && w.effects[w.params.effect] && w.effects[w.params.effect].setTranslate(w.translate), w.params.parallax && w.parallax && w.parallax.setTranslate(w.translate), w.params.scrollbar && w.scrollbar && w.scrollbar.setTranslate(w.translate), w.params.control && w.controller && w.controller.setTranslate(w.translate, i), w.emit("onSetTranslate", w, w.translate) 8582 }, w.getTranslate = function(e, t) { 8583 var i, n, r, a; 8584 return void 0 === t && (t = "x"), w.params.virtualTranslate ? w.rtl ? -w.translate : w.translate : (r = window.getComputedStyle(e, null), window.WebKitCSSMatrix ? (n = r.transform || r.webkitTransform, n.split(",").length > 6 && (n = n.split(", ").map(function(e) { 8585 return e.replace(",", ".") 8586 }).join(", ")), a = new window.WebKitCSSMatrix("none" === n ? "" : n)) : (a = r.MozTransform || r.OTransform || r.MsTransform || r.msTransform || r.transform || r.getPropertyValue("transform").replace("translate(", "matrix(1, 0, 0, 1,"), i = a.toString().split(",")), "x" === t && (n = window.WebKitCSSMatrix ? a.m41 : 16 === i.length ? parseFloat(i[12]) : parseFloat(i[4])), "y" === t && (n = window.WebKitCSSMatrix ? a.m42 : 16 === i.length ? parseFloat(i[13]) : parseFloat(i[5])), w.rtl && n && (n = -n), n || 0) 8587 }, w.getWrapperTranslate = function(e) { 8588 return void 0 === e && (e = w.isHorizontal() ? "x" : "y"), w.getTranslate(w.wrapper[0], e) 8589 }
8589, w.observers = [], w.initObservers = function() { 8590 if (w.params.observeParents) for (var e = w.container.parents(), t = 0; t < e.length; t++) l(e[t]); 8591 l(w.container[0], { 8592 childList: !1 8593 }), l(w.wrapper[0], { 8594 attributes: !1 8595 }) 8596 }, w.disconnectObservers = function() { 8597 for (var e = 0; e < w.observers.length; e++) w.observers[e].disconnect(); 8598 w.observers = [] 8599 }, w.createLoop = function() { 8600 w.wrapper.children("." + w.params.slideClass + "." + w.params.slideDuplicateClass).remove(); 8601 var t = w.wrapper.children("." + w.params.slideClass); 8602 "auto" !== w.params.slidesPerView || w.params.loopedSlides || (w.params.loopedSlides = t.length), w.loopedSlides = parseInt(w.params.loopedSlides || w.params.slidesPerView, 10), w.loopedSlides = w.loopedSlides + w.params.loopAdditionalSlides, w.loopedSlides > t.length && (w.loopedSlides = t.length); 8603 var i, n = [], 8604 r = []; 8605 for (t.each(function(i, a) { 8606 var s = e(this); 8607 i < w.loopedSlides && r.push(a), i < t.length && i >= t.length - w.loopedSlides && n.push(a), s.attr("data-swiper-slide-index", i) 8608 }), i = 0; i < r.length; i++) w.wrapper.append(e(r[i].cloneNode(!0)).addClass(w.params.slideDuplicateClass)); 8609 for (i = n.length - 1; i >= 0; i--) w.wrapper.prepend(e(n[i].cloneNode(!0)).addClass(w.params.slideDuplicateClass)) 8610 }, w.destroyLoop = function() { 8611 w.wrapper.children("." + w.params.slideClass + "." + w.params.slideDuplicateClass).remove(), w.slides.removeAttr("data-swiper-slide-index") 8612 }, w.reLoop = function(e) { 8613 var t = w.activeIndex - w.loopedSlides; 8614 w.destroyLoop(), w.createLoop(), w.updateSlidesSize(), e && w.slideTo(t + w.loopedSlides, 0, !1) 8615 }, w.fixLoop = function() { 8616 var e; 8617 w.activeIndex < w.loopedSlides ? (e = w.slides.length - 3 * w.loopedSlides + w.activeIndex, e += w.loopedSlides, w.slideTo(e, 0, !1, !0)) : ("auto" === w.params.slidesPerView && w.activeIndex >= 2 * w.loopedSlides || w.activeIndex > w.slides.length - 2 * w.params.slidesPerView) && (e = -w.slides.length + w.activeIndex + w.loopedSlides, e += w.loopedSlides, w.slideTo(e, 0, !1, !0)) 8618 }, w.appendSlide = function(e) { 8619 if (w.params.loop && w.destroyLoop(), "object" == typeof e && e.length) for (var t = 0; t < e.length; t++) e[t] && w.wrapper.append(e[t]); 8620 else w.wrapper.append(e); 8621 w.params.loop && w.createLoop(), w.params.observer && w.support.observer || w.update(!0) 8622 }, w.prependSlide = function(e) { 8623 w.params.loop && w.destroyLoop(); 8624 var t = w.activeIndex + 1; 8625 if ("object" == typeof e && e.length) { 8626 for (var i = 0; i < e.length; i++) e[i] && w.wrapper.prepend(e[i]); 8627 t = w.activeIndex + e.length 8628 } else w.wrapper.prepend(e); 8629 w.params.loop && w.createLoop(), w.params.observer && w.support.observer || w.update(!0), w.slideTo(t, 0, !1) 8630 }, w.removeSlide = function(e) { 8631 w.params.loop && (w.destroyLoop(), w.slides = w.wrapper.children("." + w.params.slideClass)); 8632 var t, i = w.activeIndex; 8633 if ("object" == typeof e && e.length) { 8634 for (var n = 0; n < e.length; n++) t = e[n], w.slides[t] && w.slides.eq(t).remove(), t < i && i--; 8635 i = Math.max(i, 0) 8636 } else t = e, w.slides[t] && w.slides.eq(t).remove(), t < i && i--, i = Math.max(i, 0); 8637 w.params.loop && w.createLoop(), w.params.observer && w.support.observer || w.update(!0), w.params.loop ? w.slideTo(i + w.loopedSlides, 0, !1) : w.slideTo(i, 0, !1) 8638 }, w.removeAllSlides = function() { 8639 for (var e = [], t = 0; t < w.slides.length; t++) e.push(t); 8640 w.removeSlide(e) 8641 }, w.effects = { 8642 fade: { 8643 setTranslate: function() { 8644 for (var e = 0; e < w.slides.length; e++) { 8645 var t = w.slides.eq(e), 8646 i = t[0].swiperSlideOffset, 8647 n = -i; 8648 w.params.virtualTranslate || (n -= w.translate); 8649 var r = 0; 8650 w.isHorizontal() || (r = n, n = 0); 8651 var a = w.params.fade.crossFade ? Math.max(1 - Math.abs(t[0].progress), 0) : 1 + Math.min(Math.max(t[0].progress, - 1), 0); 8652 t.css({ 8653 opacity: a 8654 }).transform("translate3d(" + n + "px, " + r + "px, 0px)") 8655 } 8656 }, 8657 setTransition: function(e) { 8658 if (w.slides.transition(e), w.params.virtualTranslate && 0 !== e) { 8659 var t = !1; 8660 w.slides.transitionEnd(function() { 8661 if (!t && w) { 8662 t = !0, w.animating = !1; 8663 for (var e = ["webkitTransitionEnd", "transitionend", "oTransitionEnd", "MSTransitionEnd", "msTransitionEnd"], i = 0; i < e.length; i++) w.wrapper.trigger(e[i]) 8664 } 8665 }) 8666 } 8667 } 8668 }, 8669 flip: { 8670 setTranslate: function() { 8671 for (var t = 0; t < w.slides.length; t++) { 8672 var i = w.slides.eq(t), 8673 n = i[0].progress; 8674 w.params.flip.limitRotation && (n = Math.max(Math.min(i[0].progress, 1), - 1)); 8675 var r = i[0].swiperSlideOffset, 8676 a = -180 * n, 8677 s = a, 8678 o = 0, 8679 l = -r, 8680 u = 0; 8681 if (w.isHorizontal() ? w.rtl && (s = -s) : (u = l, l = 0, o = -s, s = 0), i[0].style.zIndex = -Math.abs(Math.round(n)) + w.slides.length, w.params.flip.slideShadows) { 8682 var d = w.isHorizontal() ? i.find(".swiper-slide-shadow-left") : i.find(".swiper-slide-shadow-top"), 8683 c = w.isHorizontal() ? i.find(".swiper-slide-shadow-right") : i.find(".swiper-slide-shadow-bottom"); 8684 0 === d.length && (d = e('<div class="swiper-slide-shadow-' + (w.isHorizontal() ? "left" : "top") + '"></div>'), i.append(d)), 0 === c.length && (c = e('<div class="swiper-slide-shadow-' + (w.isHorizontal() ? "right" : "bottom") + '"></div>'), i.append(c)), d.length && (d[0].style.opacity = Math.max(-n, 0)), c.length && (c[0].style.opacity = Math.max(n, 0)) 8685 } 8686 i.transform("translate3d(" + l + "px, " + u + "px, 0px) rotateX(" + o + "deg) rotateY(" + s + "deg)") 8687 } 8688 }, 8689 setTransition: function(t) { 8690 if (w.slides.transition(t).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(t), w.params.virtualTranslate && 0 !== t) { 8691 var i = !1; 8692 w.slides.eq(w.activeIndex).transitionEnd(function() { 8693 if (!i && w && e(this).hasClass(w.params.slideActiveClass)) { 8694 i = !0, w.animating = !1; 8695 for (var t = ["webkitTransitionEnd", "transitionend", "oTransitionEnd", "MSTransitionEnd", "msTransitionEnd"], n = 0; n < t.length; n++) w.wrapper.trigger(t[n]) 8696 } 8697 }) 8698 } 8699 } 8700 }, 8701 cube: { 8702 setTranslate: function() { 8703 var t, i = 0; 8704 w.params.cube.shadow && (w.isHorizontal() ? (t = w.wrapper.find(".swiper-cube-shadow"), 0 === t.length && (t = e('<div class="swiper-cube-shadow"></div>'), w.wrapper.append(t)), t.css({ 8705 height: w.width + "px" 8706 })) : (t = w.container.find(".swiper-cube-shadow"), 0 === t.length && (t = e('<div class="swiper-cube-shadow"></div>'), w.container.append(t)))); 8707 for (var n = 0; n < w.slides.length; n++) { 8708 var r = w.slides.eq(n), 8709 a = 90 * n, 8710 s = Math.floor(a / 360); 8711 w.rtl && (a = -a, s = Math.floor(-a / 360)); 8712 var o = Math.max(Math.min(r[0].progress, 1), - 1), 8713 l = 0, 8714 u = 0, 8715 d = 0; 8716 n % 4 == 0 ? (l = 4 * -s * w.size, d = 0) : (n - 1) % 4 == 0 ? (l = 0, d = 4 * -s * w.size) : (n - 2) % 4 == 0 ? (l = w.size + 4 * s * w.size, d = w.size) : (n - 3) % 4 == 0 && (l = -w.size, d = 3 * w.size + 4 * w.size * s), w.rtl && (l = -l), w.isHorizontal() || (u = l, l = 0); 8717 var c = "rotateX(" + (w.isHorizontal() ? 0 : -a) + "deg) rotateY(" + (w.isHorizontal() ? a : 0) + "deg) translate3d(" + l + "px, " + u + "px, " + d + "px)"; 8718 if (o <= 1 && o > -1 && (i = 90 * n + 90 * o, w.rtl && (i = 90 * -n - 90 * o)), r.transform(c), w.params.cube.slideShadows) { 8719 var g = w.isHorizontal() ? r.find(".swiper-slide-shadow-left") : r.find(".swiper-slide-shadow-top"), 8720 p = w.isHorizontal() ? r.find(".swiper-slide-shadow-right") : r.find(".swiper-slide-shadow-bottom"); 8721 0 === g.length && (g = e('<div class="swiper-slide-shadow-' + (w.isHorizontal() ? "left" : "top") + '"></div>'), r.append(g)), 0 === p.length && (p = e('<div class="swiper-slide-shadow-' + (w.isHorizontal() ? "right" : "bottom") + '"></div>'), r.append(p)), g.length && (g[0].style.opacity = Math.max(-o, 0)), p.length && (p[0].style.opacity = Math.max(o, 0)) 8722 } 8723 } 8724 if (w.wrapper.css({ 8725 "-webkit-transform-origin": "50% 50% -" + w.size / 2 + "px", 8726 "-moz-transform-origin": "50% 50% -" + w.size / 2 + "px", 8727 "-ms-transform-origin": "50% 50% -" + w.size / 2 + "px", 8728 "transform-origin": "50% 50% -" + w.size / 2 + "px" 8729 }), w.params.cube.shadow) if (w.isHorizontal()) t.transform("translate3d(0px, " + (w.width / 2 + w.params.cube.shadowOffset) + "px, " + -w.width / 2 + "px) rotateX(90deg) rotateZ(0deg) scale(" + w.params.cube.shadowScale + ")"); 8730 else { 8731 var h = Math.abs(i) - 90 * Math.floor(Math.abs(i) / 90), 8732 m = 1.5 - (Math.sin(2 * h * Math.PI / 360) / 2 + Math.cos(2 * h * Math.PI / 360) / 2), 8733 f = w.params.cube.shadowScale, 8734 _ = w.params.cube.shadowScale / m, 8735 v = w.params.cube.shadowOffset; 8736 t.transform("scale3d(" + f + ", 1, " + _ + ") translate3d(0px, " + (w.height / 2 + v) + "px, " + -w.height / 2 / _ + "px) rotateX(-90deg)") 8737 } 8738 var b = w.isSafari || w.isUiWebView ? -w.size / 2 : 0; 8739 w.wrapper.transform("translate3d(0px,0," + b + "px) rotateX(" + (w.isHorizontal() ? 0 : i) + "deg) rotateY(" + (w.isHorizontal() ? -i : 0) + "deg)") 8740 }, 8741 setTransition: function(e) { 8742 w.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e), w.params.cube.shadow && !w.isHorizontal() && w.container.find(".swiper-cube-shadow").transition(e) 8743 } 8744 }, 8745 coverflow: { 8746 setTranslate: function() { 8747 for (var t = w.translate, i = w.isHorizontal() ? -t + w.width / 2 : -t + w.height / 2, n = w.isHorizontal() ? w.params.coverflow.rotate : -w.params.coverflow.rotate, r = w.params.coverflow.depth, a = 0, s = w.slides.length; a < s; a++) { 8748 var o = w.slides.eq(a), 8749 l = w.slidesSizesGrid[a], 8750 u = o[0].swiperSlideOffset, 8751 d = (i - u - l / 2) / l * w.params.coverflow.modifier, 8752 c = w.isHorizontal() ? n * d : 0, 8753 g = w.isHorizontal() ? 0 : n * d, 8754 p = -r * Math.abs(d), 8755 h = w.isHorizontal() ? 0 : w.params.coverflow.stretch * d, 8756 m = w.isHorizontal() ? w.params.coverflow.stretch * d : 0; 8757 Math.abs(m) < .001 && (m = 0), Math.abs(h) < .001 && (h = 0), Math.abs(p) < .001 && (p = 0), Math.abs(c) < .001 && (c = 0), Math.abs(g) < .001 && (g = 0); 8758 var f = "translate3d(" + m + "px," + h + "px," + p + "px) rotateX(" + g + "deg) rotateY(" + c + "deg)"; 8759 if (o.transform(f), o[0].style.zIndex = 1 - Math.abs(Math.round(d)), w.params.coverflow.slideShadows) { 8760 var _ = w.isHorizontal() ? o.find(".swiper-slide-shadow-left") : o.find(".swiper-slide-shadow-top"), 8761 v = w.isHorizontal() ? o.find(".swiper-slide-shadow-right") : o.find(".swiper-slide-shadow-bottom"); 8762 0 === _.length && (_ = e('<div class="swiper-slide-shadow-' + (w.isHorizontal() ? "left" : "top") + '"></div>'), o.append(_)), 0 === v.length && (v = e('<div class="swiper-slide-shadow-' + (w.isHorizontal() ? "right" : "bottom") + '"></div>'), o.append(v)), _.length && (_[0].style.opacity = d > 0 ? d : 0), v.length && (v[0].style.opacity = -d > 0 ? -d : 0) 8763 } 8764 } 8765 w.browser.ie && (w.wrapper[0].style.perspectiveOrigin = i + "px 50%") 8766 }, 8767 setTransition: function(e) { 8768 w.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e) 8769 } 8770 } 8771 }, w.lazy = { 8772 initialImageLoaded: !1, 8773 loadImageInSlide: function(t, i) { 8774 if (void 0 !== t && (void 0 === i && (i = !0), 0 !== w.slides.length)) { 8775 var n = w.slides.eq(t), 8776 r = n.find("." + w.params.lazyLoadingClass + ":not(." + w.params.lazyStatusLoadedClass + "):not(." + w.params.lazyStatusLoadingClass + ")"); 8777 !n.hasClass(w.params.lazyLoadingClass) || n.hasClass(w.params.lazyStatusLoadedClass) || n.hasClass(w.params.lazyStatusLoadingClass) || (r = r.add(n[0])), 0 !== r.length && r.each(function() { 8778 var t = e(this); 8779 t.addClass(w.params.lazyStatusLoadingClass); 8780 var r = t.attr("data-background"), 8781 a = t.attr("data-src"), 8782 s = t.attr("data-srcset"), 8783 o = t.attr("data-sizes"); 8784 w.loadImage(t[0], a || r, s, o, !1, function() { 8785
8785 if (void 0 !== w && null !== w && w) { 8786 if (r ? (t.css("background-image", 'url("' + r + '")'), t.removeAttr("data-background")) : (s && (t.attr("srcset", s), t.removeAttr("data-srcset")), o && (t.attr("sizes", o), t.removeAttr("data-sizes")), a && (t.attr("src", a), t.removeAttr("data-src"))), t.addClass(w.params.lazyStatusLoadedClass).removeClass(w.params.lazyStatusLoadingClass), n.find("." + w.params.lazyPreloaderClass + ", ." + w.params.preloaderClass).remove(), w.params.loop && i) { 8787 var e = n.attr("data-swiper-slide-index"); 8788 if (n.hasClass(w.params.slideDuplicateClass)) { 8789 var l = w.wrapper.children('[data-swiper-slide-index="' + e + '"]:not(.' + w.params.slideDuplicateClass + ")"); 8790 w.lazy.loadImageInSlide(l.index(), !1) 8791 } else { 8792 var u = w.wrapper.children("." + w.params.slideDuplicateClass + '[data-swiper-slide-index="' + e + '"]'); 8793 w.lazy.loadImageInSlide(u.index(), !1) 8794 } 8795 } 8796 w.emit("onLazyImageReady", w, n[0], t[0]) 8797 } 8798 }), w.emit("onLazyImageLoad", w, n[0], t[0]) 8799 }) 8800 } 8801 }, 8802 load: function() { 8803 var t, i = w.params.slidesPerView; 8804 if ("auto" === i && (i = 0), w.lazy.initialImageLoaded || (w.lazy.initialImageLoaded = !0), w.params.watchSlidesVisibility) w.wrapper.children("." + w.params.slideVisibleClass).each(function() { 8805 w.lazy.loadImageInSlide(e(this).index()) 8806 }); 8807 else if (i > 1) for (t = w.activeIndex; t < w.activeIndex + i; t++) w.slides[t] && w.lazy.loadImageInSlide(t); 8808 else w.lazy.loadImageInSlide(w.activeIndex); 8809 if (w.params.lazyLoadingInPrevNext) if (i > 1 || w.params.lazyLoadingInPrevNextAmount && w.params.lazyLoadingInPrevNextAmount > 1) { 8810 var n = w.params.lazyLoadingInPrevNextAmount, 8811 r = i, 8812 a = Math.min(w.activeIndex + r + Math.max(n, r), w.slides.length), 8813 s = Math.max(w.activeIndex - Math.max(r, n), 0); 8814 for (t = w.activeIndex + i; t < a; t++) w.slides[t] && w.lazy.loadImageInSlide(t); 8815 for (t = s; t < w.activeIndex; t++) w.slides[t] && w.lazy.loadImageInSlide(t) 8816 } else { 8817 var o = w.wrapper.children("." + w.params.slideNextClass); 8818 o.length > 0 && w.lazy.loadImageInSlide(o.index()); 8819 var l = w.wrapper.children("." + w.params.slidePrevClass); 8820 l.length > 0 && w.lazy.loadImageInSlide(l.index()) 8821 } 8822 }, 8823 onTransitionStart: function() { 8824 w.params.lazyLoading && (w.params.lazyLoadingOnTransitionStart || !w.params.lazyLoadingOnTransitionStart && !w.lazy.initialImageLoaded) && w.lazy.load() 8825 }, 8826 onTransitionEnd: function() { 8827 w.params.lazyLoading && !w.params.lazyLoadingOnTransitionStart && w.lazy.load() 8828 } 8829 }, w.scrollbar = { 8830 isTouched: !1, 8831 setDragPosition: function(e) { 8832 var t = w.scrollbar, 8833 i = w.isHorizontal() ? "touchstart" === e.type || "touchmove" === e.type ? e.targetTouches[0].pageX : e.pageX || e.clientX : "touchstart" === e.type || "touchmove" === e.type ? e.targetTouches[0].pageY : e.pageY || e.clientY, 8834 n = i - t.track.offset()[w.isHorizontal() ? "left" : "top"] - t.dragSize / 2, 8835 r = -w.minTranslate() * t.moveDivider, 8836 a = -w.maxTranslate() * t.moveDivider; 8837 n < r ? n = r : n > a && (n = a), n = -n / t.moveDivider, w.updateProgress(n), w.setWrapperTranslate(n, !0) 8838 }, 8839 dragStart: function(e) { 8840 var t = w.scrollbar; 8841 t.isTouched = !0, e.preventDefault(), e.stopPropagation(), t.setDragPosition(e), clearTimeout(t.dragTimeout), t.track.transition(0), w.params.scrollbarHide && t.track.css("opacity", 1), w.wrapper.transition(100), t.drag.transition(100), w.emit("onScrollbarDragStart", w) 8842 }, 8843 dragMove: function(e) { 8844 var t = w.scrollbar; 8845 t.isTouched && (e.preventDefault ? e.preventDefault() : e.returnValue = !1, t.setDragPosition(e), w.wrapper.transition(0), t.track.transition(0), t.drag.transition(0), w.emit("onScrollbarDragMove", w)) 8846 }, 8847 dragEnd: function(e) { 8848 var t = w.scrollbar; 8849 t.isTouched && (t.isTouched = !1, w.params.scrollbarHide && (clearTimeout(t.dragTimeout), t.dragTimeout = setTimeout(function() { 8850 t.track.css("opacity", 0), t.track.transition(400) 8851 }, 1e3)), w.emit("onScrollbarDragEnd", w), w.params.scrollbarSnapOnRelease && w.slideReset()) 8852 }, 8853 draggableEvents: function() { 8854 return w.params.simulateTouch !== !1 || w.support.touch ? w.touchEvents : w.touchEventsDesktop 8855 }(), 8856 enableDraggable: function() { 8857 var t = w.scrollbar, 8858 i = w.support.touch ? t.track : document; 8859 e(t.track).on(t.draggableEvents.start, t.dragStart), e(i).on(t.draggableEvents.move, t.dragMove), e(i).on(t.draggableEvents.end, t.dragEnd) 8860 }, 8861 disableDraggable: function() { 8862 var t = w.scrollbar, 8863 i = w.support.touch ? t.track : document; 8864 e(t.track).off(t.draggableEvents.start, t.dragStart), e(i).off(t.draggableEvents.move, t.dragMove), e(i).off(t.draggableEvents.end, t.dragEnd) 8865 }, 8866 set: function() { 8867 if (w.params.scrollbar) { 8868 var t = w.scrollbar; 8869 t.track = e(w.params.scrollbar), w.params.uniqueNavElements && "string" == typeof w.params.scrollbar && t.track.length > 1 && 1 === w.container.find(w.params.scrollbar).length && (t.track = w.container.find(w.params.scrollbar)), t.drag = t.track.find(".swiper-scrollbar-drag"), 0 === t.drag.length && (t.drag = e('<div class="swiper-scrollbar-drag"></div>'), t.track.append(t.drag)), t.drag[0].style.width = "", t.drag[0].style.height = "", t.trackSize = w.isHorizontal() ? t.track[0].offsetWidth : t.track[0].offsetHeight, t.divider = w.size / w.virtualSize, t.moveDivider = t.divi
8869der * (t.trackSize / w.size), t.dragSize = t.trackSize * t.divider, w.isHorizontal() ? t.drag[0].style.width = t.dragSize + "px" : t.drag[0].style.height = t.dragSize + "px", t.divider >= 1 ? t.track[0].style.display = "none" : t.track[0].style.display = "", w.params.scrollbarHide && (t.track[0].style.opacity = 0) 8870 } 8871 }, 8872 setTranslate: function() { 8873 if (w.params.scrollbar) { 8874 var e, t = w.scrollbar, 8875 i = (w.translate, t.dragSize); 8876 e = (t.trackSize - t.dragSize) * w.progress, w.rtl && w.isHorizontal() ? (e = -e, e > 0 ? (i = t.dragSize - e, e = 0) : -e + t.dragSize > t.trackSize && (i = t.trackSize + e)) : e < 0 ? (i = t.dragSize + e, e = 0) : e + t.dragSize > t.trackSize && (i = t.trackSize - e), w.isHorizontal() ? (w.support.transforms3d ? t.drag.transform("translate3d(" + e + "px, 0, 0)") : t.drag.transform("translateX(" + e + "px)"), t.drag[0].style.width = i + "px") : (w.support.transforms3d ? t.drag.transform("translate3d(0px, " + e + "px, 0)") : t.drag.transform("translateY(" + e + "px)"), t.drag[0].style.height = i + "px"), w.params.scrollbarHide && (clearTimeout(t.timeout), t.track[0].style.opacity = 1, t.timeout = setTimeout(function() { 8877 t.track[0].style.opacity = 0, t.track.transition(400) 8878 }, 1e3)) 8879 } 8880 }, 8881 setTransition: function(e) { 8882 w.params.scrollbar && w.scrollbar.drag.transition(e) 8883 } 8884 }, w.controller = { 8885 LinearSpline: function(e, t) { 8886 var i = function() { 8887 var e, t, i; 8888 return function(n, r) { 8889 for (t = -1, e = n.length; e - t > 1;) n[i = e + t >> 1] <= r ? t = i : e = i; 8890 return e 8891 } 8892 }(); 8893 this.x = e, this.y = t, this.lastIndex = e.length - 1; 8894 var n, r; 8895 this.x.length, this.interpolate = function(e) { 8896 return e ? (r = i(this.x, e), n = r - 1, (e - this.x[n]) * (this.y[r] - this.y[n]) / (this.x[r] - this.x[n]) + this.y[n]) : 0 8897 } 8898 }, 8899 getInterpolateFunction: function(e) { 8900 w.controller.spline || (w.controller.spline = w.params.loop ? new w.controller.LinearSpline(w.slidesGrid, e.slidesGrid) : new w.controller.LinearSpline(w.snapGrid, e.snapGrid)) 8901 }, 8902 setTranslate: function(e, i) { 8903 function n(t) { 8904 e = t.rtl && "horizontal" === t.params.direction ? -w.translate : w.translate, "slide" === w.params.controlBy && (w.controller.getInterpolateFunction(t), a = -w.controller.spline.interpolate(-e)), a && "container" !== w.params.controlBy || (r = (t.maxTranslate() - t.minTranslate()) / (w.maxTranslate() - w.minTranslate()), a = (e - w.minTranslate()) * r + t.minTranslate()), w.params.controlInverse && (a = t.maxTranslate() - a), t.updateProgress(a), t.setWrapperTranslate(a, !1, w), t.updateActiveIndex() 8905 } 8906 var r, a, s = w.params.control; 8907 if (Array.isArray(s)) for (var o = 0; o < s.length; o++) s[o] !== i && s[o] instanceof t && n(s[o]); 8908 else s instanceof t && i !== s && n(s) 8909 }, 8910 setTransition: function(e, i) { 8911 function n(t) { 8912 t.setWrapperTransition(e, w), 0 !== e && (t.onTransitionStart(), t.wrapper.transitionEnd(function() { 8913 a && (t.params.loop && "slide" === w.params.controlBy && t.fixLoop(), t.onTransitionEnd()) 8914 })) 8915 } 8916 var r, a = w.params.control; 8917 if (Array.isArray(a)) for (r = 0; r < a.length; r++) a[r] !== i && a[r] instanceof t && n(a[r]); 8918 else a instanceof t && i !== a && n(a) 8919 } 8920 }, w.hashnav = { 8921 onHashCange: function(e, t) { 8922 var i = document.location.hash.replace("#", ""); 8923 i !== w.slides.eq(w.activeIndex).attr("data-hash") && w.slideTo(w.wrapper.children("." + w.params.slideClass + '[data-hash="' + i + '"]').index()) 8924 }, 8925 attachEvents: function(t) { 8926 var i = t ? "off" : "on"; 8927 e(window)[i]("hashchange", w.hashnav.onHashCange) 8928 }, 8929 setHash: function() { 8930 if (w.hashnav.initialized && w.params.hashnav) if (w.params.replaceState && window.history && window.history.replaceState) window.history.replaceState(null, null, "#" + w.slides.eq(w.activeIndex).attr("data-hash") || ""); 8931 else { 8932 var e = w.slides.eq(w.activeIndex), 8933 t = e.attr("data-hash") || e.attr("data-history"); 8934 document.location.hash = t || "" 8935 } 8936 }, 8937 init: function() { 8938 if (w.params.hashnav && !w.params.history) { 8939 w.hashnav.initialized = !0; 8940 var e = document.location.hash.replace("#", ""); 8941 if (e) for (var t = 0, i = w.slides.length; t < i; t++) { 8942 var n = w.slides.eq(t), 8943 r = n.attr("data-hash") || n.attr("data-history"); 8944 if (r === e && !n.hasClass(w.params.slideDuplicateClass)) { 8945 var a = n.index(); 8946 w.slideTo(a, 0, w.params.runCallbacksOnInit, !0) 8947 } 8948 } 8949 w.params.hashnavWatchState && w.hashnav.attachEvents() 8950 } 8951 }, 8952 destroy: function() { 8953 w.params.hashnavWatchState && w.hashnav.attachEvents(!0) 8954 } 8955 }, w.history = { 8956 init: function() { 8957 if (w.params.history) { 8958 if (!window.history || !window.history.pushState) return w.params.history = !1, void(w.params.hashnav = !0); 8959 w.history.initialized = !0, this.paths = this.getPathValues(), (this.paths.key || this.paths.value) && (this.scrollToSlide(0, this.paths.value, w.params.runCallbacksOnInit), w.params.replaceState || window.addEventListener("popstate", this.setHistoryPopState)) 8960 } 8961 }, 8962 setHistoryPopState: function() { 8963 w.history.paths = w.history.getPathValues(), w.history.scrollToSlide(w.params.speed, w.history.paths.value, !1) 8964 }, 8965 getPathValues: function() { 8966 var e = window.location.pathname.slice(1).split("/"), 8967 t = e.length; 8968 return { 8969 key: e[t - 2], 8970 value: e[t - 1] 8971 } 8972 }, 8973 setHistory: function(e, t) { 8974 if (w.history.initialized && w.params.history) { 8975 var i = w.slides.eq(t), 8976 n = this.slugify(i.attr("data-history")); 8977 window.location.pathname.includes(e) || (n = e + "/" + n), w.params.replaceState ? window.history.replaceState(null, null, n) : window.history.pushState(null, null, n) 8978 } 8979 }, 8980 slugify: function(e) { 8981 return e.toString().toLowerCase().replace(/\s+/g, "-").replace(/[^\w\-]+/g, "").replace(/\-\-+/g, "-").replace(/^-+/, "").replace(/-+$/, "") 8982 }, 8983 scrollToSlide: function(e, t, i) { 8984 if (t) for (var n = 0, r = w.slides.length; n < r; n++) { 8985 var a = w.slides.eq(n), 8986 s = this.slugify(a.attr("data-history")); 8987 if (s === t && !a.hasClass(w.params.slideDuplicateClass)) { 8988 var o = a.index(); 8989 w.slideTo(o, e, i) 8990 } 8991 } else w.slideTo(0, e, i) 8992 } 8993 }, w.disableKeyboardControl = function() { 8994 w.params.keyboardControl = !1, e(document).off("keydown", u) 8995 }, w.enableKeyboardControl = function() { 8996 w.params.keyboardControl = !0, e(document).on("keydown", u) 8997 }, w.mousewheel = { 8998 event: !1, 8999 lastScrollTime: (new window.Date).getTime() 9000 }, w.params.mousewheelControl && (w.mousewheel.event = navigator.userAgent.indexOf("firefox") > -1 ? "DOMMouseScroll" : function() { 9001 var e = "onwheel" in document; 9002 if (!e) { 9003 var t = document.createElement("div"); 9004 t.setAttribute("onwheel", "return;"), e = "function" == typeof t.onwheel 9005 } 9006 return !e && document.implementation && document.implementation.hasFeature && document.implementation.hasFeature("", "") !== !0 && (e = document.implementation.hasFeature("Events.wheel", "3.0")), e 9007 }() ? "wheel" : "mousewheel"), w.disableMousewheelControl = function() { 9008 if (!w.mousewheel.event) return !1; 9009 var t = w.container; 9010 return "container" !== w.params.mousewheelEventsTarged && (t = e(w.params.mousewheelEventsTarged)), t.off(w.mousewheel.event, c), w.params.mousewheelControl = !1, !0 9011 }, w.enableMousewheelControl = function() { 9012 if (!w.mousewheel.event) return !1; 9013 var t = w.container; 9014 return "container" !== w.params.mousewheelEventsTarged && (t = e(w.params.mousewheelEventsTarged)), t.on(w.mousewheel.event, c), w.params.mousewheelControl = !0, !0 9015 }, w.parallax = { 9016 setTranslate: function() { 9017 w.container.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function() { 9018 g(this, w.progress) 9019 }), w.slides.each(function() { 9020 var t = e(this); 9021 t.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function() { 9022 g(this, Math.min(Math.max(t[0].progress, - 1), 1)) 9023 }) 9024 }) 9025 }, 9026 setTransition: function(t) { 9027 void 0 === t && (t = w.params.speed), w.container.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y]").each(function() { 9028 var i = e(this), 9029 n = parseInt(i.attr("data-swiper-parallax-duration"), 10) || t; 9030 0 === t && (n = 0), i.transition(n) 9031 }) 9032 } 9033 }, w.zoom = { 9034 scale: 1, 9035 currentScale: 1, 9036 isScaling: !1, 9037 gesture: { 9038 slide: void 0, 9039 slideWidth: void 0, 9040 slideHeight: void 0, 9041 image: void 0, 9042 imageWrap: void 0, 9043 zoomMax: w.params.zoomMax 9044 }, 9045 image: { 9046 isTouched: void 0, 9047 isMoved: void 0, 9048 currentX: void 0, 9049 currentY: void 0, 9050 minX: void 0, 9051 minY: void 0, 9052 maxX: void 0, 9053 maxY: void 0, 9054 width: void 0, 9055 height: void 0, 9056 startX: void 0, 9057 startY: void 0, 9058 touchesStart: {}, 9059 touchesCurrent: {} 9060 }, 9061 velocity: { 9062 x: void 0, 9063 y: void 0, 9064 prevPositionX: void 0, 9065 prevPositionY: void 0, 9066 prevTime: void 0 9067 }, 9068 getDistanceBetweenTouches: function(e) { 9069 if (e.targetTouches.length < 2) return 1; 9070 var t = e.targetTouches[0].pageX, 9071 i = e.targetTouches[0].pageY, 9072 n = e.targetTouches[1].pageX, 9073 r = e.targetTouches[1].pageY; 9074 return Math.sqrt(Math.pow(n - t, 2) + Math.pow(r - i, 2)) 9075 }, 9076 onGestureStart: function(t) { 9077 var i = w.zoom; 9078 if (!w.support.gestures) { 9079 if ("touchstart" !== t.type || "touchstart" === t.type && t.targetTouches.length < 2) return; 9080 i.gesture.scaleStart = i.getDistanceBetweenTouches(t) 9081 } 9082 return i.gesture.slide && i.gesture.slide.length || (i.gesture.slide = e(this), 0 === i.gesture.slide.length && (i.gesture.slide = w.slides.eq(w.activeIndex)), i.gesture.image = i.gesture.slide.find("img, svg, canvas"), i.gesture.imageWrap = i.gesture.image.parent("." + w.params.zoomContainerClass), i.gesture.zoomMax = i.gesture.imageWrap.attr("data-swiper-zoom") || w.params.zoomMax, 0 !== i.gesture.imageWrap.length) ? (i.gesture.image.transition(0), void(i.isScaling = !0)) : void(i.gesture.image = void 0) 9083 }, 9084 onGestureChange: function(e) { 9085 var t = w.zoom; 9086 if (!w.support.gestures) { 9087 if ("touchmove" !== e.type || "touchmove" === e.type && e.targetTouches.length < 2) return; 9088 t.gesture.scaleMove = t.getDistanceBetweenTouches(e) 9089 } 9090 t.gesture.image && 0 !== t.gesture.image.length && (w.support.gestures ? t.scale = e.scale * t.currentScale : t.scale = t.gesture.scaleMove / t.gesture.scaleStart * t.currentScale, t.scale > t.gesture.zoomMax && (t.scale = t.gesture.zoomMax - 1 + Math.pow(t.scale - t.gesture.zoomMax + 1, .5)), t.scale < w.params.zoomMin && (t.scale = w.params.zoomMin + 1 - Math.pow(w.params.zoomMin - t.scale + 1, .5)), t.gesture.image.transform("translate3d(0,
90900,0) scale(" + t.scale + ")")) 9091 }, 9092 onGestureEnd: function(e) { 9093 var t = w.zoom; 9094 !w.support.gestures && ("touchend" !== e.type || "touchend" === e.type && e.changedTouches.length < 2) || t.gesture.image && 0 !== t.gesture.image.length && (t.scale = Math.max(Math.min(t.scale, t.gesture.zoomMax), w.params.zoomMin), t.gesture.image.transition(w.params.speed).transform("translate3d(0,0,0) scale(" + t.scale + ")"), t.currentScale = t.scale, t.isScaling = !1, 1 === t.scale && (t.gesture.slide = void 0)) 9095 }, 9096 onTouchStart: function(e, t) { 9097 var i = e.zoom; 9098 i.gesture.image && 0 !== i.gesture.image.length && (i.image.isTouched || ("android" === e.device.os && t.preventDefault(), i.image.isTouched = !0, i.image.touchesStart.x = "touchstart" === t.type ? t.targetTouches[0].pageX : t.pageX, i.image.touchesStart.y = "touchstart" === t.type ? t.targetTouches[0].pageY : t.pageY)) 9099 }, 9100 onTouchMove: function(e) { 9101 var t = w.zoom; 9102 if (t.gesture.image && 0 !== t.gesture.image.length && (w.allowClick = !1, t.image.isTouched && t.gesture.slide)) { 9103 t.image.isMoved || (t.image.width = t.gesture.image[0].offsetWidth, t.image.height = t.gesture.image[0].offsetHeight, t.image.startX = w.getTranslate(t.gesture.imageWrap[0], "x") || 0, t.image.startY = w.getTranslate(t.gesture.imageWrap[0], "y") || 0, t.gesture.slideWidth = t.gesture.slide[0].offsetWidth, t.gesture.slideHeight = t.gesture.slide[0].offsetHeight, t.gesture.imageWrap.transition(0), w.rtl && (t.image.startX = -t.image.startX), w.rtl && (t.image.startY = -t.image.startY)); 9104 var i = t.image.width * t.scale, 9105 n = t.image.height * t.scale; 9106 if (!(i < t.gesture.slideWidth && n < t.gesture.slideHeight)) { 9107 if (t.image.minX = Math.min(t.gesture.slideWidth / 2 - i / 2, 0), t.image.maxX = -t.image.minX, t.image.minY = Math.min(t.gesture.slideHeight / 2 - n / 2, 0), t.image.maxY = -t.image.minY, t.image.touchesCurrent.x = "touchmove" === e.type ? e.targetTouches[0].pageX : e.pageX, t.image.touchesCurrent.y = "touchmove" === e.type ? e.targetTouches[0].pageY : e.pageY, !t.image.isMoved && !t.isScaling) { 9108 if (w.isHorizontal() && Math.floor(t.image.minX) === Math.floor(t.image.startX) && t.image.touchesCurrent.x < t.image.touchesStart.x || Math.floor(t.image.maxX) === Math.floor(t.image.startX) && t.image.touchesCurrent.x > t.image.touchesStart.x) return void(t.image.isTouched = !1); 9109 if (!w.isHorizontal() && Math.floor(t.image.minY) === Math.floor(t.image.startY) && t.image.touchesCurrent.y < t.image.touchesStart.y || Math.floor(t.image.maxY) === Math.floor(t.image.startY) && t.image.touchesCurrent.y > t.image.touchesStart.y) return void(t.image.isTouched = !1) 9110 } 9111 e.preventDefault(), e.stopPropagation(), t.image.isMoved = !0, t.image.currentX = t.image.touchesCurrent.x - t.image.touchesStart.x + t.image.startX, t.image.currentY = t.image.touchesCurrent.y - t.image.touchesStart.y + t.image.startY, t.image.currentX < t.image.minX && (t.image.currentX = t.image.minX + 1 - Math.pow(t.image.minX - t.image.currentX + 1, .8)), t.image.currentX > t.image.maxX && (t.image.currentX = t.image.maxX - 1 + Math.pow(t.image.currentX - t.image.maxX + 1, .8)), t.image.currentY < t.image.minY && (t.image.currentY = t.image.minY + 1 - Math.pow(t.image.minY - t.image.currentY + 1, .8)), t.image.currentY > t.image.maxY && (t.image.currentY = t.image.maxY - 1 + Math.pow(t.image.currentY - t.image.maxY + 1, .8)), t.velocity.prevPositionX || (t.velocity.prevPositionX = t.image.touchesCurrent.x), t.velocity.prevPositionY || (t.velocity.prevPositionY = t.image.touchesCurrent.y), t.velocity.prevTime || (t.velocity.prevTime = Date.now()), t.velocity.x = (t.image.touchesCurrent.x - t.velocity.prevPositionX) / (Date.now() - t.velocity.prevTime) / 2, t.velocity.y = (t.image.touchesCurrent.y - t.velocity.prevPositionY) / (Date.now() - t.velocity.prevTime) / 2, Math.abs(t.image.touchesCurrent.x - t.velocity.prevPositionX) < 2 && (t.velocity.x = 0), Math.abs(t.image.touchesCurrent.y - t.velocity.prevPositionY) < 2 && (t.velocity.y = 0), t.velocity.prevPositionX = t.image.touchesCurrent.x, t.velocity.prevPositionY = t.image.touchesCurrent.y, t.velocity.prevTime = Date.now(), t.gesture.imageWrap.transform("translate3d(" + t.image.currentX + "px, " + t.image.currentY + "px,0
9111)") 9112 } 9113 } 9114 }, 9115 onTouchEnd: function(e, t) { 9116 var i = e.zoom; 9117 if (i.gesture.image && 0 !== i.gesture.image.length) { 9118 if (!i.image.isTouched || !i.image.isMoved) return i.image.isTouched = !1, void(i.image.isMoved = !1); 9119 i.image.isTouched = !1, i.image.isMoved = !1; 9120 var n = 300, 9121 r = 300, 9122 a = i.velocity.x * n, 9123 s = i.image.currentX + a, 9124 o = i.velocity.y * r, 9125 l = i.image.currentY + o; 9126 0 !== i.velocity.x && (n = Math.abs((s - i.image.currentX) / i.velocity.x)), 0 !== i.velocity.y && (r = Math.abs((l - i.image.currentY) / i.velocity.y)); 9127 var u = Math.max(n, r); 9128 i.image.currentX = s, i.image.currentY = l; 9129 var d = i.image.width * i.scale, 9130 c = i.image.height * i.scale; 9131 i.image.minX = Math.min(i.gesture.slideWidth / 2 - d / 2, 0), i.image.maxX = -i.image.minX, i.image.minY = Math.min(i.gesture.slideHeight / 2 - c / 2, 0), i.image.maxY = -i.image.minY, i.image.currentX = Math.max(Math.min(i.image.currentX, i.image.maxX), i.image.minX), i.image.currentY = Math.max(Math.min(i.image.currentY, i.image.maxY), i.image.minY), i.gesture.imageWrap.transition(u).transform("translate3d(" + i.image.currentX + "px, " + i.image.currentY + "px,0)") 9132 } 9133 }, 9134 onTransitionEnd: function(e) { 9135 var t = e.zoom; 9136 t.gesture.slide && e.previousIndex !== e.activeIndex && (t.gesture.image.transform("translate3d(0,0,0) scale(1)"), t.gesture.imageWrap.transform("translate3d(0,0,0)"), t.gesture.slide = t.gesture.image = t.gesture.imageWrap = void 0, t.scale = t.currentScale = 1) 9137 }, 9138 toggleZoom: function(t, i) { 9139 var n = t.zoom; 9140 if (n.gesture.slide || (n.gesture.slide = t.clickedSlide ? e(t.clickedSlide) : t.slides.eq(t.activeIndex), n.gesture.image = n.gesture.slide.find("img, svg, canvas"), n.gesture.imageWrap = n.gesture.image.parent("." + t.params.zoomContainerClass)), n.gesture.image && 0 !== n.gesture.image.length) { 9141 var r, a, s, o, l, u, d, c, g, p, h, m, f, _, v, b, y, w; 9142 void 0 === n.image.touchesStart.x && i ? (r = "touchend" === i.type ? i.changedTouches[0].pageX : i.pageX, a = "touchend" === i.type ? i.changedTouches[0].pageY : i.pageY) : (r = n.image.touchesStart.x, a = n.image.touchesStart.y), n.scale && 1 !== n.scale ? (n.scale = n.currentScale = 1, n.gesture.imageWrap.transition(300).transform("translate3d(0,0,0)"), n.gesture.image.transition(300).transform("translate3d(0,0,0) scale(1)"), n.gesture.slide = void 0) : (n.scale = n.currentScale = n.gesture.imageWrap.attr("data-swiper-zoom") || t.params.zoomMax, i ? (y = n.gesture.slide[0].offsetWidth, w = n.gesture.slide[0].offsetHeight, s = n.gesture.slide.offset().left, o = n.gesture.slide.offset().top, l = s + y / 2 - r, u = o + w / 2 - a, g = n.gesture.image[0].offsetWidth, p = n.gesture.image[0].offsetHeight, h = g * n.scale, m = p * n.scale, f = Math.min(y / 2 - h / 2, 0), _ = Math.min(w / 2 - m / 2, 0), v = -f, b = -_, d = l * n.scale, c = u * n.scale, d < f && (d = f), d > v && (d = v), c < _ && (c = _), c > b && (c = b)) : (d = 0, c = 0), n.gesture.imageWrap.transition(300).transform("translate3d(" + d + "px, " + c + "px,0)"), n.gesture.image.transition(300).transform("translate3d(0,0,0) scale(" + n.scale + ")")) 9143 } 9144 }, 9145 attachEvents: function(t) { 9146 var i = t ? "off" : "on"; 9147 if (w.params.zoom) { 9148 var n = (w.slides, !("touchstart" !== w.touchEvents.start || !w.support.passiveListener || !w.params.passiveListeners) && { 9149 passive: !0, 9150 capture: !1 9151 }); 9152 w.support.gestures ? (w.slides[i]("gesturestart", w.zoom.onGestureStart, n), w.slides[i]("gesturechange", w.zoom.onGestureChange, n), w.slides[i]("gestureend", w.zoom.onGestureEnd, n)) : "touchstart" === w.touchEvents.start && (w.slides[i](w.touchEvents.start, w.zoom.onGestureStart, n), w.slides[i](w.touchEvents.move, w.zoom.onGestureChange, n), w.slides[i](w.touchEvents.end, w.zoom.onGestureEnd, n)), w[i]("touchStart", w.zoom.onTouchStart), w.slides.each(function(t, n) { 9153 e(n).find("." + w.params.zoomContainerClass).length > 0 && e(n)[i](w.touchEvents.move, w.zoom.onTouchMove) 9154 }), w[i]("touchEnd", w.zoom.onTouchEnd), w[i]("transitionEnd", w.zoom.onTransitionEnd), w.params.zoomToggle && w.on("doubleTap", w.zoom.toggleZoom) 9155 } 9156 }, 9157 init: function() { 9158 w.zoom.attachEvents() 9159 }, 9160 destroy: function() { 9161 w.zoom.attachEvents(!0) 9162 } 9163 }, w._plugins = []; 9164 for (var D in w.plugins) { 9165 var R = w.plugins[D](w, w.params[D]); 9166 R && w._plugins.push(R) 9167 } 9168 return w.callPlugins = function(e) { 9169 for (var t = 0; t < w._plugins.length;
vendor: 21,318 bytes, lines 9169-9498
9169 t++) e in w._plugins[t] && w._plugins[t][e](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]) 9170 }, w.emitterEventListeners = {}, w.emit = function(e) { 9171 w.params[e] && w.params[e](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); 9172 var t; 9173 if (w.emitterEventListeners[e]) for (t = 0; t < w.emitterEventListeners[e].length; t++) w.emitterEventListeners[e][t](arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]); 9174 w.callPlugins && w.callPlugins(e, arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]) 9175 }, w.on = function(e, t) { 9176 return e = p(e), w.emitterEventListeners[e] || (w.emitterEventListeners[e] = []), w.emitterEventListeners[e].push(t), w 9177 }, w.off = function(e, t) { 9178 var i; 9179 if (e = p(e), void 0 === t) return w.emitterEventListeners[e] = [], w; 9180 if (w.emitterEventListeners[e] && 0 !== w.emitterEventListeners[e].length) { 9181 for (i = 0; i < w.emitterEventListeners[e].length; i++) w.emitterEventListeners[e][i] === t && w.emitterEventListeners[e].splice(i, 1); 9182 return w 9183 } 9184 }, w.once = function(e, t) { 9185 e = p(e); 9186 var i = function() { 9187 t(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4]), w.off(e, i) 9188 }; 9189 return w.on(e, i), w 9190 }, w.a11y = { 9191 makeFocusable: function(e) { 9192 return e.attr("tabIndex", "0"), e 9193 }, 9194 addRole: function(e, t) { 9195 return e.attr("role", t), e 9196 }, 9197 addLabel: function(e, t) { 9198 return e.attr("aria-label", t), e 9199 }, 9200 disable: function(e) { 9201 return e.attr("aria-disabled", !0), e 9202 }, 9203 enable: function(e) { 9204 return e.attr("aria-disabled", !1), e 9205 }, 9206 onEnterKey: function(t) { 9207 13 === t.keyCode && (e(t.target).is(w.params.nextButton) ? (w.onClickNext(t), w.isEnd ? w.a11y.notify(w.params.lastSlideMessage) : w.a11y.notify(w.params.nextSlideMessage)) : e(t.target).is(w.params.prevButton) && (w.onClickPrev(t), w.isBeginning ? w.a11y.notify(w.params.firstSlideMessage) : w.a11y.notify(w.params.prevSlideMessage)), 9208 e(t.target).is("." + w.params.bulletClass) && e(t.target)[0].click()) 9209 }, 9210 liveRegion: e('<span class="' + w.params.notificationClass + '" aria-live="assertive" aria-atomic="true"></span>'), 9211 notify: function(e) { 9212 var t = w.a11y.liveRegion; 9213 0 !== t.length && (t.html(""), t.html(e)) 9214 }, 9215 init: function() { 9216 w.params.nextButton && w.nextButton && w.nextButton.length > 0 && (w.a11y.makeFocusable(w.nextButton), w.a11y.addRole(w.nextButton, "button"), w.a11y.addLabel(w.nextButton, w.params.nextSlideMessage)), w.params.prevButton && w.prevButton && w.prevButton.length > 0 && (w.a11y.makeFocusable(w.prevButton), w.a11y.addRole(w.prevButton, "button"), w.a11y.addLabel(w.prevButton, w.params.prevSlideMessage)), e(w.container).append(w.a11y.liveRegion) 9217 }, 9218 initPagination: function() { 9219 w.params.pagination && w.params.paginationClickable && w.bullets && w.bullets.length && w.bullets.each(function() { 9220 var t = e(this); 9221 w.a11y.makeFocusable(t), w.a11y.addRole(t, "button"), w.a11y.addLabel(t, w.params.paginationBulletMessage.replace(/{{index}}/, t.index() + 1)) 9222 }) 9223 }, 9224 destroy: function() { 9225 w.a11y.liveRegion && w.a11y.liveRegion.length > 0 && w.a11y.liveRegion.remove() 9226 } 9227 }, w.init = function() { 9228 w.params.loop && w.createLoop(), w.updateContainerSize(), w.updateSlidesSize(), w.updatePagination(), w.params.scrollbar && w.scrollbar && (w.scrollbar.set(), w.params.scrollbarDraggable && w.scrollbar.enableDraggable()), "slide" !== w.params.effect && w.effects[w.params.effect] && (w.params.loop || w.updateProgress(), w.effects[w.params.effect].setTranslate()), w.params.loop ? w.slideTo(w.params.initialSlide + w.loopedSlides, 0, w.params.runCallbacksOnInit) : (w.slideTo(w.params.initialSlide, 0, w.params.runCallbacksOnInit), 0 === w.params.initialSlide && (w.parallax && w.params.parallax && w.parallax.setTranslate(), w.lazy && w.params.lazyLoading && (w.lazy.load(), w.lazy.initialImageLoaded = !0))), w.attachEvents(), w.params.observer && w.support.observer && w.initObservers(), w.params.preloadImages && !w.params.lazyLoading && w.preloadImages(), w.params.zoom && w.zoom && w.zoom.init(), w.params.autoplay && w.startAutoplay(), w.params.keyboardControl && w.enableKeyboardControl && w.enableKeyboardControl(), w.params.mousewheelControl && w.enableMousewheelControl && w.enableMousewheelControl(), w.params.hashnavReplaceState && (w.params.replaceState = w.params.hashnavReplaceState), w.params.history && w.history && w.history.init(), w.params.hashnav && w.hashnav && w.hashnav.init(), w.params.a11y && w.a11y && w.a11y.init(), w.emit("onInit", w) 9229 }, w.cleanupStyles = function() { 9230 w.container.removeClass(w.classNames.join(" ")).removeAttr("style"), w.wrapper.removeAttr("style"), w.slides && w.slides.length && w.slides.removeClass([w.params.slideVisibleClass, w.params.slideActiveClass, w.params.slideNextClass, w.params.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-column").removeAttr("data-swiper-row"), w.paginationContainer && w.paginationContainer.length && w.paginationContainer.removeClass(w.params.paginationHiddenClass), w.bullets && w.bullets.length && w.bullets.removeClass(w.params.bulletActiveClass), w.params.prevButton && e(w.params.prevButton).removeClass(w.params.buttonDisabledClass), w.params.nextButton && e(w.params.nextButton).removeClass(w.params.buttonDisabledClass), w.params.scrollbar && w.scrollbar && (w.scrollbar.track && w.scrollbar.track.length && w.scrollbar.track.removeAttr("style"), w.scrollbar.drag && w.scrollbar.drag.length && w.scrollbar.drag.removeAttr("style")) 9231 }, w.destroy = function(e, t) { 9232 w.detachEvents(), w.stopAutoplay(), w.params.scrollbar && w.scrollbar && w.params.scrollbarDraggable && w.scrollbar.disableDraggable(), w.params.loop && w.destroyLoop(), t && w.cleanupStyles(), w.disconnectObservers(), w.params.zoom && w.zoom && w.zoom.destroy(), w.params.keyboardControl && w.disableKeyboardControl && w.disableKeyboardControl(), w.params.mousewheelControl && w.disableMousewheelControl && w.disableMousewheelControl(), w.params.a11y && w.a11y && w.a11y.destroy(), w.params.history && !w.params.replaceState && window.removeEventListener("popstate", w.history.setHistoryPopState), w.params.hashnav && w.hashnav && w.hashnav.destroy(), w.emit("onDestroy"), e !== !1 && (w = null) 9233 }, w.init(), w 9234 } 9235 }; 9236 t.prototype = { 9237 isSafari: function() { 9238 var e = window.navigator.userAgent.toLowerCase(); 9239 return e.indexOf("safari") >= 0 && e.indexOf("chrome") < 0 && e.indexOf("android") < 0 9240 }(), 9241 isUiWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(window.navigator.userAgent), 9242 isArray: function(e) { 9243 return "[object Array]" === Object.prototype.toString.apply(e) 9244 }, 9245 browser: { 9246 ie: window.navigator.pointerEnabled || window.navigator.msPointerEnabled, 9247 ieTouch: window.navigator.msPointerEnabled && window.navigator.msMaxTouchPoints > 1 || window.navigator.pointerEnabled && window.navigator.maxTouchPoints > 1, 9248 lteIE9: function() { 9249 var e = document.createElement("div"); 9250 return e.innerHTML = "<!--[if lte IE 9]><i></i><![endif]-->", 1 === e.getElementsByTagName("i").length 9251 }() 9252 }, 9253 device: function() { 9254 var e = window.navigator.userAgent, 9255 t = e.match(/(Android);?[\s\/]+([\d.]+)?/), 9256 i = e.match(/(iPad).*OS\s([\d_]+)/), 9257 n = e.match(/(iPod)(.*OS\s([\d_]+))?/), 9258 r = !i && e.match(/(iPhone\sOS|iOS)\s([\d_]+)/); 9259 return { 9260 ios: i || r || n, 9261 android: t 9262 } 9263 }(), 9264 support: { 9265 touch: window.Modernizr && Modernizr.touch === !0 || function() { 9266 return !!("ontouchstart" in window || window.DocumentTouch && document instanceof DocumentTouch) 9267 }(), 9268 transforms3d: window.Modernizr && Modernizr.csstransforms3d === !0 || function() { 9269 var e = document.createElement("div").style; 9270 return "webkitPerspective" in e || "MozPerspective" in e || "OPerspective" in e || "MsPerspective" in e || "perspective" in e 9271 }(), 9272 flexbox: function() { 9273 for (var e = document.createElement("div").style, t = "alignItems webkitAlignItems webkitBoxAlign msFlexAlign mozBoxAlign webkitFlexDirection msFlexDirection mozBoxDirection mozBoxOrient webkitBoxDirection webkitBoxOrient".split(" "), i = 0; i < t.length; i++) if (t[i] in e) return !0 9274 }(), 9275 observer: function() { 9276 return "MutationObserver" in window || "WebkitMutationObserver" in window 9277 }(), 9278 passiveListener: function() { 9279 var e = !1; 9280 try { 9281 var t = Object.defineProperty({}, "passive", { 9282 get: function() { 9283 e = !0 9284 } 9285 }); 9286 window.addEventListener("testPassiveListener", null, t) 9287 } catch (e) {} 9288 return e 9289 }(), 9290 gestures: function() { 9291 return "ongesturestart" in window 9292 }() 9293 }, 9294 plugins: {} 9295 }; 9296 for (var i = (function() { 9297 var e = function(e) { 9298 var t = this, 9299 i = 0; 9300 for (i = 0; i < e.length; i++) t[i] = e[i]; 9301 return t.length = e.length, this 9302 }, t = function(t, i) { 9303 var n = [], 9304 r = 0; 9305 if (t && !i && t instanceof e) return t; 9306 if (t) if ("string" == typeof t) { 9307 var a, s, o = t.trim(); 9308 if (o.indexOf("<") >= 0 && o.indexOf(">") >= 0) { 9309 var l = "div"; 9310 for (0 === o.indexOf("<li") && (l = "ul"), 0 === o.indexOf("<tr") && (l = "tbody"), 0 !== o.indexOf("<td") && 0 !== o.indexOf("<th") || (l = "tr"), 0 === o.indexOf("<tbody") && (l = "table"), 0 === o.indexOf("<option") && (l = "select"), s = document.createElement(l), s.innerHTML = t, r = 0; r < s.childNodes.length; r++) n.push(s.childNodes[r]) 9311 } else for (a = i || "#" !== t[0] || t.match(/[ .<>:~]/) ? (i || document).querySelectorAll(t) : [document.getElementById(t.split("#")[1])], r = 0; r < a.length; r++) a[r] && n.push(a[r]) 9312 } else if (t.nodeType || t === window || t === document) n.push(t); 9313 else if (t.length > 0 && t[0].nodeType) for (r = 0; r < t.length; r++) n.push(t[r]); 9314 return new e(n) 9315 }; 9316 return e.prototype = { 9317 addClass: function(e) { 9318 if (void 0 === e) return this; 9319 for (var t = e.split(" "), i = 0; i < t.length; i++) for (var n = 0; n < this.length; n++) this[n].classList.add(t[i]); 9320 return this 9321 }, 9322 removeClass: function(e) { 9323 for (var t = e.split(" "), i = 0; i < t.length; i++) for (var n = 0; n < this.length; n++) this[n].classList.remove(t[i]); 9324 return this 9325 }, 9326 hasClass: function(e) { 9327 return !!this[0] && this[0].classList.contains(e) 9328 }, 9329 toggleClass: function(e) { 9330 for (var t = e.split(" "), i = 0; i < t.length; i++) for (var n = 0; n < this.length; n++) this[n].classList.toggle(t[i]); 9331 return this 9332 }, 9333 attr: function(e, t) { 9334 if (1 === arguments.length && "string" == typeof e) return this[0] ? this[0].getAttribute(e) : void 0; 9335 for (var i = 0; i < this.length; i++) if (2 === arguments.length) this[i].setAttribute(e, t); 9336 else for (var n in e) this[i][n] = e[n], this[i].setAttribute(n, e[n]); 9337 return this 9338 }, 9339 removeAttr: function(e) { 9340 for (var t = 0; t < this.length; t++) this[t].removeAttribute(e); 9341 return this 9342 }, 9343 data: function(e, t) { 9344 if (void 0 !== t) { 9345 for (var i = 0; i < this.length; i++) { 9346 var n = this[i]; 9347 n.dom7ElementDataStorage || (n.dom7ElementDataStorage = {}), n.dom7ElementDataStorage[e] = t 9348 } 9349 return this 9350 } 9351 if (this[0]) { 9352 var r = this[0].getAttribute("data-" + e); 9353 return r ? r : this[0].dom7ElementDataStorage && e in this[0].dom7ElementDataStorage ? this[0].dom7ElementDataStorage[e] : void 0 9354 } 9355 }, 9356 transform: function(e) { 9357 for (var t = 0; t < this.length; t++) { 9358 var i = this[t].style; 9359 i.webkitTransform = i.MsTransform = i.msTransform = i.MozTransform = i.OTransform = i.transform = e 9360 } 9361 return this 9362 }, 9363 transition: function(e) { 9364 "string" != typeof e && (e += "ms"); 9365 for (var t = 0; t < this.length; t++) { 9366 var i = this[t].style; 9367 i.webkitTransitionDuration = i.MsTransitionDuration = i.msTransitionDuration = i.MozTransitionDuration = i.OTransitionDuration = i.transitionDuration = e 9368 } 9369 return this 9370 }, 9371 on: function(e, i, n, r) { 9372 function a(e) { 9373 var r = e.target; 9374 if (t(r).is(i)) n.call(r, e); 9375 else for (var a = t(r).parents(), s = 0; s < a.length; s++) t(a[s]).is(i) && n.call(a[s], e) 9376 } 9377 var s, o, l = e.split(" "); 9378 for (s = 0; s < this.length; s++) if ("function" == typeof i || i === !1) for ("function" == typeof i && (n = arguments[1], r = arguments[2] || !1), o = 0; o < l.length; o++) this[s].addEventListener(l[o], n, r); 9379 else for (o = 0; o < l.length; o++) this[s].dom7LiveListeners || (this[s].dom7LiveListeners = []), this[s].dom7LiveListeners.push({ 9380 listener: n, 9381 liveListener: a 9382 }), this[s].addEventListener(l[o], a, r); 9383 return this 9384 }, 9385 off: function(e, t, i, n) { 9386 for (var r = e.split(" "), a = 0; a < r.length; a++) for (var s = 0; s < this.length; s++) if ("function" == typeof t || t === !1) "function" == typeof t && (i = arguments[1], n = arguments[2] || !1), this[s].removeEventListener(r[a], i, n); 9387 else if (this[s].dom7LiveListeners) for (var o = 0; o < this[s].dom7LiveListeners.length; o++) this[s].dom7LiveListeners[o].listener === i && this[s].removeEventListener(r[a], this[s].dom7LiveListeners[o].liveListener, n); 9388 return this 9389 }, 9390 once: function(e, t, i, n) { 9391 function r(s) { 9392 i(s), a.off(e, t, r, n) 9393 } 9394 var a = this; 9395 "function" == typeof t && (t = !1, i = arguments[1], n = arguments[2]), a.on(e, t, r, n) 9396 }, 9397 trigger: function(e, t) { 9398 for (var i = 0; i < this.length; i++) { 9399 var n; 9400 try { 9401 n = new window.CustomEvent(e, { 9402 detail: t, 9403 bubbles: !0, 9404 cancelable: !0 9405 }) 9406 } catch (i) { 9407 n = document.createEvent("Event"), n.initEvent(e, !0, !0), n.detail = t 9408 } 9409 this[i].dispatchEvent(n) 9410 } 9411 return this 9412 }, 9413 transitionEnd: function(e) { 9414 function t(a) { 9415 if (a.target === this) for (e.call(this, a), i = 0; i < n.length; i++) r.off(n[i], t) 9416 } 9417 var i, n = ["webkitTransitionEnd", "transitionend", "oTransitionEnd", "MSTransitionEnd", "msTransitionEnd"], 9418 r = this; 9419 if (e) for (i = 0; i < n.length; i++) r.on(n[i], t); 9420 return this 9421 }, 9422 width: function() { 9423 return this[0] === window ? window.innerWidth : this.length > 0 ? parseFloat(this.css("width")) : null 9424 }, 9425 outerWidth: function(e) { 9426 return this.length > 0 ? e ? this[0].offsetWidth + parseFloat(this.css("margin-right")) + parseFloat(this.css("margin-left")) : this[0].offsetWidth : null 9427 }, 9428 height: function() { 9429 return this[0] === window ? window.innerHeight : this.length > 0 ? parseFloat(this.css("height")) : null 9430 }, 9431 outerHeight: function(e) { 9432 return this.length > 0 ? e ? this[0].offsetHeight + parseFloat(this.css("margin-top")) + parseFloat(this.css("margin-bottom")) : this[0].offsetHeight : null 9433 }, 9434 offset: function() { 9435 if (this.length > 0) { 9436 var e = this[0], 9437 t = e.getBoundingClientRect(), 9438 i = document.body, 9439 n = e.clientTop || i.clientTop || 0, 9440 r = e.clientLeft || i.clientLeft || 0, 9441 a = window.pageYOffset || e.scrollTop, 9442 s = window.pageXOffset || e.scrollLeft; 9443 return { 9444 top: t.top + a - n, 9445 left: t.left + s - r 9446 } 9447 } 9448 return null 9449 }, 9450 css: function(e, t) { 9451 var i; 9452 if (1 === arguments.length) { 9453 if ("string" != typeof e) { 9454 for (i = 0; i < this.length; i++) for (var n in e) this[i].style[n] = e[n]; 9455 return this 9456 } 9457 if (this[0]) return window.getComputedStyle(this[0], null).getPropertyValue(e) 9458 } 9459 if (2 === arguments.length && "string" == typeof e) { 9460 for (i = 0; i < this.length; i++) this[i].style[e] = t; 9461 return this 9462 } 9463 return this 9464 }, 9465 each: function(e) { 9466 for (var t = 0; t < this.length; t++) e.call(this[t], t, this[t]); 9467 return this 9468 }, 9469 html: function(e) { 9470 if (void 0 === e) return this[0] ? this[0].innerHTML : void 0; 9471 for (var t = 0; t < this.length; t++) this[t].innerHTML = e; 9472 return this 9473 }, 9474 text: function(e) { 9475 if (void 0 === e) return this[0] ? this[0].textContent.trim() : null; 9476 for (var t = 0; t < this.length; t++) this[t].textContent = e; 9477 return this 9478 }, 9479 is: function(i) { 9480 if (!this[0]) return !1; 9481 var n, r; 9482 if ("string" == typeof i) { 9483 var a = this[0]; 9484 if (a === document) return i === document; 9485 if (a === window) return i === window; 9486 if (a.matches) return a.matches(i); 9487 if (a.webkitMatchesSelector) return a.webkitMatchesSelector(i); 9488 if (a.mozMatchesSelector) return a.mozMatchesSelector(i); 9489 if (a.msMatchesSelector) return a.msMatchesSelector(i); 9490 for (n = t(i), r = 0; r < n.length; r++) if (n[r] === this[0]) return !0; 9491 return !1 9492 } 9493 if (i === document) return this[0] === document; 9494 if (i === window) return this[0] === window; 9495 if (i.nodeType || i instanceof e) { 9496 for (n = i.nodeType ? [i] : i, r = 0; r < n.length; r++) if (n[r] === this[0]) return !0; 9497 return !1 9498
9498 } 9499 return !1 9500 }, 9501 index: function() { 9502 if (this[0]) { 9503 for (var e = this[0], t = 0; null !== (e = e.previousSibling);) 1 === e.nodeType && t++; 9504 return t 9505 } 9506 }, 9507 eq: function(t) { 9508 if (void 0 === t) return this; 9509 var i, n = this.length; 9510 return t > n - 1 ? new e([]) : t < 0 ? (i = n + t, new e(i < 0 ? [] : [this[i]])) : new e([this[t]]) 9511 }, 9512 append: function(t) { 9513 var i, n; 9514 for (i = 0; i < this.length; i++) if ("string" == typeof t) { 9515 var r = document.createElement("div"); 9516 for (r.innerHTML = t; r.firstChild;) this[i].appendChild(r.firstChild) 9517 } else if (t instanceof e) for (n = 0; n < t.length; n++) this[i].appendChild(t[n]); 9518 else this[i].appendChild(t); 9519 return this 9520 }, 9521 prepend: function(t) { 9522 var i, n; 9523 for (i = 0; i < this.length; i++) if ("string" == typeof t) { 9524 var r = document.createElement("div"); 9525 for (r.innerHTML = t, n = r.childNodes.length - 1; n >= 0; n--) this[i].insertBefore(r.childNodes[n], this[i].childNodes[0]) 9526 } else if (t instanceof e) for (n = 0; n < t.length; n++) this[i].insertBefore(t[n], this[i].childNodes[0]); 9527 else this[i].insertBefore(t, this[i].childNodes[0]); 9528 return this 9529 }, 9530 insertBefore: function(e) { 9531 for (var i = t(e), n = 0; n < this.length; n++) if (1 === i.length) i[0].parentNode.insertBefore(this[n], i[0]); 9532 else if (i.length > 1) for (var r = 0; r < i.length; r++) i[r].parentNode.insertBefore(this[n].cloneNode(!0), i[r]) 9533 }, 9534 insertAfter: function(e) { 9535 for (var i = t(e), n = 0; n < this.length; n++) if (1 === i.length) i[0].parentNode.insertBefore(this[n], i[0].nextSibling); 9536 else if (i.length > 1) for (var r = 0; r < i.length; r++) i[r].parentNode.insertBefore(this[n].cloneNode(!0), i[r].nextSibling) 9537 }, 9538 next: function(i) { 9539 return new e(this.length > 0 ? i ? this[0].nextElementSibling && t(this[0].nextElementSibling).is(i) ? [this[0].nextElementSibling] : [] : this[0].nextElementSibling ? [this[0].nextElementSibling] : [] : []) 9540 }, 9541 nextAll: function(i) { 9542 var n = [], 9543 r = this[0]; 9544 if (!r) return new e([]); 9545 for (; r.nextElementSibling;) { 9546 var a = r.nextElementSibling; 9547 i ? t(a).is(i) && n.push(a) : n.push(a), r = a 9548 } 9549 return new e(n) 9550 }, 9551 prev: function(i) { 9552 return new e(this.length > 0 ? i ? this[0].previousElementSibling && t(this[0].previousElementSibling).is(i) ? [this[0].previousElementSibling] : [] : this[0].previousElementSibling ? [this[0].previousElementSibling] : [] : []) 9553 }, 9554 prevAll: function(i) { 9555 var n = [], 9556 r = this[0]; 9557 if (!r) return new e([]); 9558 for (; r.previousElementSibling;) { 9559 var a = r.previousElementSibling; 9560 i ? t(a).is(i) && n.push(a) : n.push(a), r = a 9561 } 9562 return new e(n) 9563 }, 9564 parent: function(e) { 9565 for (var i = [], n = 0; n < this.length; n++) e ? t(this[n].parentNode).is(e) && i.push(this[n].parentNode) : i.push(this[n].parentNode); 9566 return t(t.unique(i)) 9567 }, 9568 parents: function(e) { 9569 for (var i = [], n = 0; n < this.length; n++) for (var r = this[n].parentNode; r;) e ? t(r).is(e) && i.push(r) : i.push(r), r = r.parentNode; 9570 return t(t.unique(i)) 9571 }, 9572 find: function(t) { 9573 for (var i = [], n = 0; n < this.length; n++) for (var r = this[n].querySelectorAll(t), a = 0; a < r.length; a++) i.push(r[a]); 9574 return new e(i) 9575 }, 9576 children: function(i) { 9577 for (var n = [], r = 0; r < this.length; r++) for (var a = this[r].childNodes, s = 0; s < a.length; s++) i ? 1 === a[s].nodeType && t(a[s]).is(i) && n.push(a[s]) : 1 === a[s].nodeType && n.push(a[s]); 9578 return new e(t.unique(n)) 9579 }, 9580 remove: function() { 9581 for (var e = 0; e < this.length; e++) this[e].parentNode && this[e].parentNode.removeChild(this[e]); 9582 return this 9583 }, 9584 add: function() { 9585 var e, i, n = this; 9586 for (e = 0; e < arguments.length; e++) { 9587 var r = t(arguments[e]); 9588 for (i = 0; i < r.length; i++) n[n.length] = r[i], n.length++ 9589 } 9590 return n 9591 } 9592 }, t.fn = e.prototype, t.unique = function(e) { 9593 for (var t = [], i = 0; i < e.length; i++) t.indexOf(e[i]) === -1 && t.push(e[i]); 9594 return t 9595 }, t 9596 }()), n = ["jQuery", "Zepto", "Dom7"], r = 0; r < n.length; r++) window[n[r]] && function(e) { 9597 e.fn.swiper = function(i) { 9598 var n; 9599 return e(this).each(function() { 9600 var e = new t(this, i); 9601 n || (n = e) 9602 }), n 9603 } 9604 }(window[n[r]]); 9605 var a; 9606 a = void 0 === i ? window.Dom7 || window.Zepto || window.jQuery : i, a && ("transitionEnd" in a.fn || (a.fn.transitionEnd = function(e) { 9607 function t(a) { 9608 if (a.target === this) for (e.call(this, a), i = 0; i < n.length; i++) r.off(n[i], t) 9609 } 9610 var i, n = ["webkitTransitionEnd", "transitionend", "oTransitionEnd", "MSTransitionEnd", "msTransitionEnd"], 9611 r = this; 9612 if (e) for (i = 0; i < n.length; i++) r.on(n[i], t); 9613 return this 9614 }), "transform" in a.fn || (a.fn.transform = function(e) { 9615 for (var t = 0; t < this.length; t++) { 9616 var i = this[t].style; 9617 i.webkitTransform = i.MsTransform = i.msTransform = i.MozTransform = i.OTransform = i.transform = e 9618 } 9619 return this 9620 }), "transition" in a.fn || (a.fn.transition = function(e) { 9621 "string" != typeof e && (e += "ms"); 9622 for (var t = 0; t < this.length; t++) { 9623 var i = this[t].style; 9624 i.webkitTransitionDuration = i.MsTransitionDuration = i.msTransitionDuration = i.MozTransitionDuration = i.OTransitionDuration = i.transitionDuration = e 9625 } 9626 return this 9627 }), "outerWidth" in a.fn || (a.fn.outerWidth = function(e) { 9628 return this.length > 0 ? e ? this[0].offsetWidth + parseFloat(this.css("margin-right")) + parseFloat(this.css("margin-left")) : this[0].offsetWidth : null 9629 })), window.Swiper = t 9630}(), "undefined" != typeof module ? module.exports = window.Swiper : "function" == typeof define && define.amd && define([], function() { 9631 "use strict"; 9632 return window.Swiper 9633}), ! function(e, t) { 9634 "use strict"; 9635 if (!t) throw new Error("Filterizr requires jQuery to work."); 9636 var i = function(e) { 9637 this.init(e) 9638 }; 9639 i.prototype = { 9640 init: function(e) { 9641 this.root = { 9642 x: 0, 9643 y: 0, 9644 w: e 9645 } 9646 }, 9647 fit: function(e) { 9648 var t, i, n, r = e.length, 9649 a = r > 0 ? e[0].h : 0; 9650 for (this.root.h = a, t = 0; t < r; t++) n = e[t], (i = this.findNode(this.root, n.w, n.h)) ? n.fit = this.splitNode(i, n.w, n.h) : n.fit = this.growDown(n.w, n.h) 9651 }, 9652 findNode: function(e, t, i) { 9653 return e.used ? this.findNode(e.right, t, i) || this.findNode(e.down, t, i) : t <= e.w && i <= e.h ? e : null 9654 }, 9655 splitNode: function(e, t, i) { 9656 return e.used = !0, e.down = { 9657 x: e.x, 9658 y: e.y + i, 9659 w: e.w, 9660 h: e.h - i 9661 }, e.right = { 9662 x: e.x + t, 9663 y: e.y, 9664 w: e.w - t, 9665 h: i 9666 }, e 9667 }, 9668 growDown: function(e, t) { 9669 var i; 9670 return this.root = { 9671 used: !0, 9672 x: 0, 9673 y: 0, 9674 w: this.root.w, 9675 h: this.root.h + t, 9676 down: { 9677 x: 0, 9678 y: this.root.h, 9679 w: this.root.w, 9680 h: t 9681 }, 9682 right: this.root 9683 }, (i = this.findNode(this.root, e, t)) ? this.splitNode(i, e, t) : null 9684 } 9685 }, t.fn.filterizr = function() { 9686 var e = this, 9687 i = arguments; 9688 if (e._fltr || (e._fltr = t.fn.filterizr.prototype.init(e, "object" == typeof i[0] ? i[0] : void 0)), "string" == typeof i[0]) { 9689 if (i[0].lastIndexOf("_") > -1) throw new Error("Filterizr error: You cannot call private methods"); 9690 if ("function" != typeof e._fltr[i[0]]) throw new Error("Filterizr error: There is no such function"); 9691 e._fltr[i[0]](i[1], i[2]) 9692 } 9693 return e 9694 }, t.fn.filterizr.prototype = { 9695 init: function(e, i) { 9696 var n = t(e).extend(t.fn.filterizr.prototype); 9697 return n.options = { 9698 animationDuration: .5, 9699 callbacks: { 9700 onFilteringStart: function() {}, 9701 onFilteringEnd: function() {}, 9702 onShufflingStart: function() {}, 9703 onShufflingEnd: function() {}, 9704 onSortingStart: function() {}, 9705 onSortingEnd: function() {} 9706 }, 9707 delay: 0, 9708 delayMode: "progressive", 9709 easing: "ease-out", 9710 filter: "all", 9711 filterOutCss: { 9712 opacity: 0, 9713 transform: "scale(0.5)" 9714 }, 9715 filterInCss: { 9716 opacity: 1, 9717 transform: "scale(1)" 9718 }, 9719 layout: "sameSize", 9720 setupControls: !0 9721 }, 0 === arguments.length && (i = n.options), 1 === arguments.length && "object" == typeof arguments[0] && (i = arguments[0]), i && n.setOptions(i), n.css({ 9722 padding: 0, 9723 position: "relative" 9724 }), n._lastCategory = 0, n._isAnimating = !1, n._isShuffling = !1, n._isSorting = !1, n._mainArray = n._getFiltrItems(), n._subArrays = n._makeSubarrays(), n._activeArray = n._getCollectionBy
9724Filter(n.options.filter), n._toggledCategories = {}, n._typedText = t("input[data-search]").val() || "", n._uID = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) { 9725 var t = 16 * Math.random() | 0; 9726 return ("x" == e ? t : 3 & t | 8).toString(16) 9727 }), n._setupEvents(), n.options.setupControls && n._setupControls(), n.filter(n.options.filter), n 9728 }, 9729 filter: function(e) { 9730 var t = this, 9731 i = t._getCollectionByFilter(e); 9732 t.options.filter = e, t.trigger("filteringStart"), t._handleFiltering(i), t._isSearchActivated() && t.search(t._typedText) 9733 }, 9734 toggleFilter: function(e) { 9735 var t = this, 9736 i = []; 9737 t.trigger("filteringStart"), e && (t._toggledCategories[e] ? delete t._toggledCategories[e] : t._toggledCategories[e] = !0), t._multifilterModeOn() ? (i = t._makeMultifilterArray(), t._handleFiltering(i), t._isSearchActivated() && t.search(t._typedText)) : (t.filter("all"), t._isSearchActivated() && t.search(t._typedText)) 9738 }, 9739 search: function(e) { 9740 var t = this, 9741 i = t._multifilterModeOn() ? t._makeMultifilterArray() : t._getCollectionByFilter(t.options.filter), 9742 n = [], 9743 r = 0; 9744 if (t._isSearchActivated()) for (r = 0; r < i.length; r++) i[r].text().toLowerCase().indexOf(e.toLowerCase()) > -1 && n.push(i[r]); 9745 if (n.length > 0) t._handleFiltering(n); 9746 else if (t._isSearchActivated()) for (r = 0; r < t._activeArray.length; r++) t._activeArray[r]._filterOut(); 9747 else t._handleFiltering(i) 9748 }, 9749 shuffle: function() { 9750 var e = this; 9751 e._isAnimating = !0, e._isShuffling = !0, e.trigger("shufflingStart"), e._mainArray = e._fisherYatesShuffle(e._mainArray), e._subArrays = e._makeSubarrays(); 9752 var t = e._multifilterModeOn() ? e._makeMultifilterArray() : e._getCollectionByFilter(e.options.filter); 9753 e._isSearchActivated() ? e.search(e._typedText) : e._placeItems(t) 9754 }, 9755 sort: function(e, t) { 9756 var i = this; 9757 if (e = e || "domIndex", t = t || "asc", i._isAnimating = !0, i._isSorting = !0, i.trigger("sortingStart"), "domIndex" !== e && "sortData" !== e && "w" !== e && "h" !== e) for (var n = 0; n < i._mainArray.length; n++) i._mainArray[n][e] = i._mainArray[n].data(e); 9758 i._mainArray.sort(i._comparator(e, t)), i._subArrays = i._makeSubarrays(); 9759 var r = i._multifilterModeOn() ? i._makeMultifilterArray() : i._getCollectionByFilter(i.options.filter); 9760 i._isSearchActivated() ? i.search(i._typedText) : i._placeItems(r) 9761 }, 9762 setOptions: function(e) { 9763 var t = this, 9764 i = 0; 9765 for (var n in e) t.options[n] = e[n]; 9766 if (t._mainArray && (e.animationDuration || e.delay || e.easing || e.delayMode)) for (i = 0; i < t._mainArray.length; i++) t._mainArray[i].css("transition", "all " + t.options.animationDuration + "s " + t.options.easing + " " + t._mainArray[i]._calcDelay() + "ms"); 9767 e.callbacks && (e.callbacks.onFilteringStart || (t.options.callbacks.onFilteringStart = function() {}), e.callbacks.onFilteringEnd || (t.options.callbacks.onFilteringEnd = function() {}), e.callbacks.onShufflingStart || (t.options.callbacks.onShufflingStart = function() {}), e.callbacks.onShufflingEnd || (t.options.callbacks.onShufflingEnd = function() {}), e.callbacks.onSortingStart || (t.options.callbacks.onSortingStart = function() {}), e.callbacks.onSortingEnd || (t.options.callbacks.onSortingEnd = function() {})), t.options.filterInCss.transform || (t.options.filterInCss.transform = "translate3d(0,0,0)"), t.options.filterOutCss.transform || (t.options.filterOutCss.transform = "translate3d(0,0,0)") 9768 }, 9769 _getFiltrItems: function() { 9770 var e = this, 9771 i = t(e.find(".filtr-item")), 9772 r = []; 9773 return t.each(i, function(i, a) { 9774 var s = t(a).extend(n)._init(i, e); 9775 r.push(s) 9776 }), r 9777 }, 9778 _makeSubarrays: function() { 9779 for (var e = this, t = [], i = 0; i < e._lastCategory; i++) t.push([]); 9780 for (i = 0; i < e._mainArray.length; i++) if ("object" == typeof e._mainArray[i]._category) for (var n = e._mainArray[i]._category.length, r = 0; r < n; r++) t[e._mainArray[i]._category[r] - 1].push(e._mainArray[i]); 9781 else t[e._mainArray[i]._category - 1].push(e._mainArray[i]); 9782 return t 9783 }, 9784 _makeMultifilterArray: function() { 9785 for (var e = this, t = [], i = {}, n = 0; n < e._mainArray.length; n++) { 9786 var r = e._mainArray[n], 9787 a = !1, 9788 s = r.domIndex in i == 0;
9789 if (Array.isArray(r._category)) { 9790 for (var o = 0; o < r._category.length; o++) if (r._category[o] in e._toggledCategories) { 9791 a = !0; 9792 break 9793 } 9794 } else r._category in e._toggledCategories && (a = !0); 9795 s && a && (i[r.domIndex] = !0, t.push(r)) 9796 } 9797 return t 9798 }, 9799 _setupControls: function() { 9800 var e = this; 9801 t("*[data-filter]").click(function() { 9802 var i = t(this).data("filter"); 9803 e.options.filter !== i && e.filter(i) 9804 }), t("*[data-multifilter]").click(function() { 9805 var i = t(this).data("multifilter"); 9806 "all" === i ? (e._toggledCategories = {}, e.filter("all")) : e.toggleFilter(i) 9807 }), t("*[data-shuffle]").click(function() { 9808 e.shuffle() 9809 }), t("*[data-sortAsc]").click(function() { 9810 var i = t("*[data-sortOrder]").val(); 9811 e.sort(i, "asc") 9812 }), t("*[data-sortDesc]").click(function() { 9813 var i = t("*[data-sortOrder]").val(); 9814 e.sort(i, "desc") 9815 }), t("input[data-search]").keyup(function() { 9816 e._typedText = t(this).val(), e._delayEvent(function() { 9817 e.search(e._typedText) 9818 }, 250, e._uID) 9819 }) 9820 }, 9821 _setupEvents: function() { 9822 var i = this; 9823 t(e).resize(function() { 9824 i._delayEvent(function() { 9825 i.trigger("resizeFiltrContainer") 9826 }, 250, i._uID) 9827 }), i.on("resizeFiltrContainer", function() { 9828 i._multifilterModeOn() ? i.toggleFilter() : i.filter(i.options.filter) 9829 }).on("filteringStart", function() { 9830 i.options.callbacks.onFilteringStart() 9831 }).on("filteringEnd", function() { 9832 i.options.callbacks.onFilteringEnd() 9833 }).on("shufflingStart", function() { 9834 i._isShuffling = !0, i.options.callbacks.onShufflingStart() 9835 }).on("shufflingEnd", function() { 9836 i.options.callbacks.onShufflingEnd(), i._isShuffling = !1 9837 }).on("sortingStart", function() { 9838 i._isSorting = !0, i.options.callbacks.onSortingStart() 9839 }).on("sortingEnd", function() { 9840 i.options.callbacks.onSortingEnd(), i._isSorting = !1 9841 }) 9842 }, 9843 _calcItemPositions: function() { 9844 var e = this, 9845 n = e._activeArray, 9846 r = 0, 9847 a = Math.round(e.width() / e.find(".filtr-item").outerWidth()), 9848 s = 0, 9849 o = n[0].outerWidth(), 9850 l = 0, 9851 u = 0, 9852 d = 0, 9853 c = 0, 9854 g = 0, 9855 p = []; 9856 if ("packed" === e.options.layout) { 9857 t.each(e._activeArray, function(e, t) { 9858 t._updateDimensions() 9859 }); 9860 var h = new i(e.outerWidth()); 9861 for (h.fit(e._activeArray), c = 0; c < n.length; c++) p.push({ 9862 left: n[c].fit.x, 9863 top: n[c].fit.y 9864 }); 9865 r = h.root.h 9866 } 9867 if ("horizontal" === e.options.layout) for (s = 1, c = 1; c <= n.length; c++) o = n[c - 1].outerWidth(), l = n[c - 1].outerHeight(), p.push({ 9868 left: u, 9869 top: d 9870 }), u += o, r < l && (r = l); 9871 else if ("vertical" === e.options.layout) { 9872 for (c = 1; c <= n.length; c++) l = n[c - 1].outerHeight(), p.push({ 9873 left: u, 9874 top: d 9875 }), d += l; 9876 r = d 9877 } else if ("sameHeight" === e.options.layout) { 9878 s = 1; 9879 var m = e.outerWidth(); 9880 for (c = 1; c <= n.length; c++) { 9881 o = n[c - 1].width(); 9882 var f = n[c - 1].outerWidth(), 9883 _ = 0; 9884 n[c] && (_ = n[c].width()), p.push({ 9885 left: u, 9886 top: d 9887 }), (g = u + o + _) > m ? (g = 0, u = 0, d += n[0].outerHeight(), s++) : u += f 9888 } 9889 r = s * n[0].outerHeight() 9890 } else if ("sameWidth" === e.options.layout) { 9891 for (c = 1; c <= n.length; c++) { 9892 if (p.push({ 9893 left: u, 9894 top: d 9895 }), c % a == 0 && s++, u += o, d = 0, s > 0) for (g = s; g > 0;) d += n[c - a * g].outerHeight(), g--; 9896 c % a == 0 && (u = 0) 9897 } 9898 for (c = 0; c < a; c++) { 9899 for (var v = 0, b = c; n[b];) v += n[b].outerHeight(), b += a; 9900 v > r ? (r = v, v = 0) : v = 0 9901 } 9902 } else if ("sameSize" === e.options.layout) { 9903 for (c = 1; c <= n.length; c++) p.push({ 9904 left: u, 9905 top: d 9906 }), u += o, c % a == 0 && (d += n[0].outerHeight(), u = 0); 9907 r = (s = Math.ceil(n.length / a)) * n[0].outerHeight() 9908 } 9909 return e.css("height", r), p 9910 }, 9911 _handleFiltering: function(e) { 9912 for (var t = this, i = t._getArrayOfUniqueItems(t._activeArray, e), n = 0; n < i.length; n++) i[n]._filterOut(); 9913 t._activeArray = e, t._placeItems(e) 9914 }, 9915 _multifilterModeOn: function() { 9916 var e = this; 9917 return Object.keys(e._toggledCategories).length > 0 9918 }, 9919 _isSearchActivated: function() { 9920 return this._typedText.length > 0 9921 }, 9922 _placeItems: function(e) { 9923 var t = this; 9924 t._isAnimating = !0, t._itemPositions = t._calcItemPositions(); 9925 for (var i = 0; i < e.length; i++) e[i]._filterIn(t._itemPositions[i]) 9926 },
9927 _getCollectionByFilter: function(e) { 9928 var t = this; 9929 return "all" === e ? t._mainArray : t._subArrays[e - 1] 9930 }, 9931 _makeDeepCopy: function(e) { 9932 var t = {}; 9933 for (var i in e) t[i] = e[i]; 9934 return t 9935 }, 9936 _comparator: function(e, t) { 9937 return function(i, n) { 9938 return "asc" === t ? i[e] < n[e] ? -1 : i[e] > n[e] ? 1 : 0 : "desc" === t ? n[e] < i[e] ? -1 : n[e] > i[e] ? 1 : 0 : void 0 9939 } 9940 }, 9941 _getArrayOfUniqueItems: function(e, t) { 9942 var i, n, r = [], 9943 a = {}, s = t.length; 9944 for (i = 0; i < s; i++) a[t[i].domIndex] = !0; 9945 for (s = e.length, i = 0; i < s; i++)(n = e[i]).domIndex in a || r.push(n); 9946 return r 9947 }, 9948 _delayEvent: function() { 9949 var e = {}; 9950 return function(t, i, n) { 9951 if (null === n) throw Error("UniqueID needed"); 9952 e[n] && clearTimeout(e[n]), e[n] = setTimeout(t, i) 9953 } 9954 }(), 9955 _fisherYatesShuffle: function(e) { 9956 for (var t, i, n = e.length; n;) i = Math.floor(Math.random() * n--), t = e[n], e[n] = e[i], e[i] = t; 9957 return e 9958 } 9959 }; 9960 var n = { 9961 _init: function(e, t) { 9962 var i = this; 9963 return i._parent = t, i._category = i._getCategory(), i._lastPos = {}, i.domIndex = e, i.sortData = i.data("sort"), i.w = 0, i.h = 0, i._isFilteredOut = !0, i._filteringOut = !1, i._filteringIn = !1, i.css(t.options.filterOutCss).css({ 9964 "-webkit-backface-visibility": "hidden", 9965 perspective: "1000px", 9966 "-webkit-perspective": "1000px", 9967 "-webkit-transform-style": "preserve-3d", 9968 position: "absolute", 9969 transition: "all " + t.options.animationDuration + "s " + t.options.easing + " " + i._calcDelay() + "ms" 9970 }), i.on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd", function() { 9971 i._onTransitionEnd() 9972 }), i 9973 }, 9974 _updateDimensions: function() { 9975 var e = this; 9976 e.w = e.outerWidth(), e.h = e.outerHeight() 9977 }, 9978 _calcDelay: function() { 9979 var e = this, 9980 t = 0; 9981 return "progressive" === e._parent.options.delayMode ? t = e._parent.options.delay * e.domIndex : e.domIndex % 2 == 0 && (t = e._parent.options.delay), t 9982 }, 9983 _getCategory: function() { 9984 var e = this, 9985 t = e.data("category"); 9986 if ("string" == typeof t) { 9987 t = t.split(", "); 9988 for (var i = 0; i < t.length; i++) { 9989 if (isNaN(parseInt(t[i]))) throw new Error("Filterizr: the value of data-category must be a number, starting from value 1 and increasing."); 9990 parseInt(t[i]) > e._parent._lastCategory && (e._parent._lastCategory = parseInt(t[i])) 9991 } 9992 } else t > e._parent._lastCategory && (e._parent._lastCategory = t); 9993 return t 9994 }, 9995 _onTransitionEnd: function() { 9996 var e = this; 9997 e._filteringOut ? (t(e).addClass("filteredOut"), e._isFilteredOut = !0, e._filteringOut = !1) : e._filteringIn && (e._isFilteredOut = !1, e._filteringIn = !1), e._parent._isAnimating && (e._parent._isShuffling ? e._parent.trigger("shufflingEnd") : e._parent._isSorting ? e._parent.trigger("sortingEnd") : e._parent.trigger("filteringEnd"), e._parent._isAnimating = !1) 9998 }, 9999 _filterOut: function() { 10000 var e = this, 10001 t = e._parent._makeDeepCopy(e._parent.options.filterOutCss); 10002 t.transform += " translate3d(" + e._lastPos.left + "px," + e._lastPos.top + "px, 0)", e.css(t), e.css("pointer-events", "none"), e._filteringOut = !0 10003 }, 10004 _filterIn: function(e) { 10005 var i = this, 10006 n = i._parent._makeDeepCopy(i._parent.options.filterInCss); 10007 t(i).removeClass("filteredOut"), i._filteringIn = !0, i._lastPos
vendor: 19,961 bytes, lines 10007-10518
10007= e, i.css("pointer-events", "auto"), n.transform += " translate3d(" + e.left + "px," + e.top + "px, 0)", i.css(n) 10008 } 10009 } 10010}(this, jQuery); 10011var $jscomp$this = this; 10012! function(e, t) { 10013 "function" == typeof define && define.amd ? define([], t) : "object" == typeof module && module.exports ? module.exports = t() : e.anime = t() 10014}(this, function() { 10015 function e(e) { 10016 if (!L.col(e)) try { 10017 return document.querySelectorAll(e) 10018 } catch (e) {} 10019 } 10020 function t(e) { 10021 return e.reduce(function(e, i) { 10022 return e.concat(L.arr(i) ? t(i) : i) 10023 }, []) 10024 } 10025 function i(t) { 10026 return L.arr(t) ? t : (L.str(t) && (t = e(t) || t), t instanceof NodeList || t instanceof HTMLCollection ? [].slice.call(t) : [t]) 10027 } 10028 function n(e, t) { 10029 return e.some(function(e) { 10030 return e === t 10031 }) 10032 } 10033 function r(e) { 10034 var t, i = {}; 10035 for (t in e) i[t] = e[t]; 10036 return i 10037 } 10038 function a(e, t) { 10039 var i, n = r(e); 10040 for (i in e) n[i] = t.hasOwnProperty(i) ? t[i] : e[i]; 10041 return n 10042 } 10043 function s(e, t) { 10044 var i, n = r(e); 10045 for (i in t) n[i] = L.und(e[i]) ? t[i] : e[i]; 10046 return n 10047 } 10048 function o(e) { 10049 e = e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function(e, t, i, n) { 10050 return t + t + i + i + n + n 10051 }); 10052 var t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e); 10053 e = parseInt(t[1], 16); 10054 var i = parseInt(t[2], 16), 10055 t = parseInt(t[3], 16); 10056 return "rgb(" + e + "," + i + "," + t + ")" 10057 } 10058 function l(e) { 10059 function t(e, t, i) { 10060 return 0 > i && (i += 1), 1 < i && --i, i < 1 / 6 ? e + 6 * (t - e) * i : .5 > i ? t : i < 2 / 3 ? e + (t - e) * (2 / 3 - i) * 6 : e 10061 } 10062 var i = /hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e); 10063 e = parseInt(i[1]) / 360; 10064 var n = parseInt(i[2]) / 100, 10065 i = parseInt(i[3]) / 100; 10066 if (0 == n) n = i = e = i; 10067 else { 10068 var r = .5 > i ? i * (1 + n) : i + n - i * n, 10069 a = 2 * i - r, 10070 n = t(a, r, e + 1 / 3), 10071 i = t(a, r, e); 10072 e = t(a, r, e - 1 / 3) 10073 } 10074 return "rgb(" + 255 * n + "," + 255 * i + "," + 255 * e + ")" 10075 } 10076 function u(e) { 10077 if (e = /([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|pc|vw|vh|deg|rad|turn)?/.exec(e)) return e[2] 10078 } 10079 function d(e) { 10080 return -1 < e.indexOf("translate") ? "px" : -1 < e.indexOf("rotate") || -1 < e.indexOf("skew") ? "deg" : void 0 10081 } 10082 function c(e, t) { 10083 return L.fnc(e) ? e(t.target, t.id, t.total) : e 10084 } 10085 function g(e, t) { 10086 if (t in e.style) return getComputedStyle(e).getPropertyValue(t.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()) || "0" 10087 } 10088 function p(e, t) { 10089 return L.dom(e) && n(k, t) ? "transform" : L.dom(e) && (e.getAttribute(t) || L.svg(e) && e[t]) ? "attribute" : L.dom(e) && "transform" !== t && g(e, t) ? "css" : null != e[t] ? "object" : void 0 10090 } 10091 function h(e, t) { 10092 var i = d(t), 10093 i = -1 < t.indexOf("scale") ? 1 : 0 + i; 10094 if (e = e.style.transform, !e) return i; 10095 for (var n = [], r = [], a = [], s = /(\w+)\((.+?)\)/g; n = s.exec(e);) r.push(n[1]), a.push(n[2]); 10096 return e = a.filter(function(e, i) { 10097 return r[i] === t 10098 }), e.length ? e[0] : i 10099 } 10100 function m(e, t) { 10101 switch (p(e, t)) { 10102 case "transform": 10103 return h(e, t); 10104 case "css": 10105 return g(e, t); 10106 case "attribute": 10107 return e.getAttribute(t) 10108 } 10109 return e[t] || 0 10110 } 10111 function f(e, t) { 10112 var i = /^(\*=|\+=|-=)/.exec(e); 10113 if (!i) return e; 10114 switch (t = parseFloat(t), e = parseFloat(e.replace(i[0], "")), i[0][0]) { 10115 case "+": 10116 return t + e; 10117 case "-": 10118 return t - e; 10119 case "*": 10120 return t * e 10121 } 10122 } 10123 function _(e) { 10124 return L.obj(e) && e.hasOwnProperty("totalLength") 10125 } 10126 function v(e, t) { 10127 function i(i) { 10128 return i = void 0 === i ? 0 : i, e.el.getPointAtLength(1 <= t + i ? t + i : 0) 10129 } 10130 var n = i(), 10131 r = i(-1), 10132 a = i(1); 10133 switch (e.property) { 10134 case "x": 10135 return n.x; 10136 case "y": 10137 return n.y; 10138 case "angle": 10139 return 180 * Math.atan2(a.y - r.y, a.x - r.x) / Math.PI 10140 } 10141 } 10142 function b(e, t) { 10143 var i = /-?\d*\.?\d+/g; 10144 if (e = _(e) ? e.totalLength : e, L.col(e)) t = L.rgb(e) ? e : L.hex(e) ? o(e) : L.hsl(e) ? l(e) : void 0; 10145 else { 10146 var n = u(e); 10147 e = n ? e.substr(0, e.length - n.length) : e, t = t ? e + t : e 10148 } 10149 return t += "", { 10150 original: t, 10151 numbers: t.match(i) ? t.match(i).map(Number) : [0], 10152 strings: t.split(i) 10153 } 10154 } 10155 function y(e, t) { 10156 return t.reduce(function(t, i, n) { 10157 return t + e[n - 1] + i 10158 }) 10159 } 10160 function w(e) { 10161 return (e ? t(L.arr(e) ? e.map(i) : i(e)) : []).filter(function(e, t, i) { 10162 return i.indexOf(e) === t 10163 }) 10164 } 10165 function T(e) { 10166 var t = w(e); 10167 return t.map(function(e, i) { 10168 return { 10169 target: e, 10170 id: i, 10171 total: t.length 10172 } 10173 }) 10174 } 10175 function x(e, t) { 10176 var n = r(t); 10177 if (L.arr(e)) { 10178 var a = e.length; 10179 2 !== a || L.obj(e[0]) ? L.fnc(t.duration) || (n.duration = t.duration / a) : e = { 10180 value: e 10181 } 10182 } 10183 return i(e).map(function(e, i) { 10184 return i = i ? 0 : t.delay, e = L.obj(e) && !_(e) ? e : { 10185 value: e 10186 }, L.und(e.delay) && (e.delay = i), e 10187 }).map(function(e) { 10188 return s(e, n) 10189 }) 10190 } 10191 function S(e, t) { 10192 var i, n = {}; 10193 for (i in e) { 10194 var r = c(e[i], t); 10195 L.arr(r) && (r = r.map(function(e) { 10196 return c(e, t) 10197 }), 1 === r.length && (r = r[0])), n[i] = r 10198 } 10199 return n.duration = parseFloat(n.duration), n.delay = parseFloat(n.delay), n 10200 } 10201 function I(e) { 10202 return L.arr(e) ? H.apply(this, e) : N[e] 10203 } 10204 function E(e, t) { 10205 var i; 10206 return e.tweens.map(function(n) { 10207 n = S(n, t); 10208 var r = n.value, 10209 a = m(t.target, e.name), 10210 s = i ? i.to.original : a, 10211 s = L.arr(r) ? r[0] : s, 10212 o = f(L.arr(r) ? r[1] : r, s), 10213 a = u(o) || u(s) || u(a); 10214 return n.isPath = _(r), n.from = b(s, a), n.to = b(o, a), n.start = i ? i.end : e.offset, n.end = n.start + n.delay + n.duration, n.easing = I(n.easing), n.elasticity = (1e3 - Math.min(Math.max(n.elasticity, 1), 999)) / 1e3, L.col(n.from.original) && (n.round = 1), i = n 10215 }) 10216 } 10217 function P(e, i) { 10218 return t(e.map(function(e) { 10219 return i.map(function(t) { 10220 var i = p(e.target, t.name); 10221 if (i) { 10222 var n = E(t, e); 10223 t = { 10224 type: i, 10225 property: t.name, 10226 animatable: e, 10227 tweens: n, 10228 duration: n[n.length - 1].end, 10229 delay: n[0].delay 10230 } 10231 } else t = void 0; 10232 return t 10233 }) 10234 })).filter(function(e) { 10235 return !L.und(e) 10236 }) 10237 } 10238 function C(e, t, i) { 10239 var n = "delay" === e ? Math.min : Math.max; 10240 return t.length ? n.apply(Math, t.map(function(t) { 10241 return t[e] 10242 })) : i[e] 10243 } 10244 function j(e) { 10245 var t, i = a(z, e), 10246 n = a(O, e), 10247 r = T(e.targets), 10248 o = [], 10249 l = s(i, n); 10250 for (t in e) l.hasOwnProperty(t) || "targets" === t || o.push({ 10251 name: t, 10252 offset: l.offset, 10253 tweens: x(e[t], n) 10254 }); 10255 return e = P(r, o), s(i, { 10256 children: [], 10257 animatables: r, 10258 animations: e, 10259 duration: C("duration", e, n), 10260 delay: C("delay", e, n) 10261 }) 10262 } 10263 function A(e) { 10264 function t() { 10265 return window.Promise && new Promise(function(e) { 10266 return d = e 10267 }) 10268 } 10269 function i(e) { 10270 return p.reversed ? p.duration - e : e 10271 } 10272 function n(e) { 10273 for (var t = 0, i = {}, n = p.animations, r = {}; t < n.length;) { 10274 var a = n[t], 10275 s = a.animatable, 10276 o = a.tweens; 10277 r.tween = o.filter(function(t) { 10278 return e < t.end 10279 })[0] || o[o.length - 1], r.isPath$1 = r.tween.isPath, r.round = r.tween.round, r.eased = r.tween.easing(Math.min(Math.max(e - r.tween.start - r.tween.delay, 0), r.tween.duration) / r.tween.duration, r.tween.elasticity), o = y(r.tween.to.numbers.map(function(e) { 10280 return function(t, i) { 10281 return i = e.isPath$1 ? 0 : e.tween.from.numbers[i], t = i + e.eased * (t - i), e.isPath$1 && (t = v(e.tween.value, t)), e.round && (t = Math.round(t * e.round) / e.round), t 10282 } 10283 }(r)), r.tween.to.strings), D[a.type](s.target, a.property, o, i, s.id), a.currentValue = o, t++, r = { 10284 isPath$1: r.isPath$1, 10285 tween: r.tween, 10286 eased: r.eased, 10287 round: r.round 10288 } 10289 } 10290 if (i) for (var l in i) M || (M = g(document.body, "transform") ? "transform" : "-webkit-transform"), p.animatables[l].target.style[M] = i[l].join(" "); 10291 p.currentTime = e, p.progress = e / p.duration * 100 10292 } 10293 function r(e) { 10294 p[e] && p[e](p) 10295 } 10296 function a() { 10297 p.remaining && !0 !== p.remaining && p.remaining-- 10298 } 10299 function s(e) { 10300 var s = p.duration, 10301 g = p.offset, 10302 h = p.delay, 10303 m = p.currentTime, 10304 f = p.reversed, 10305 _ = i(e), 10306 _ = Math.min(Math.max(_, 0), s); 10307 if (p.children) { 10308 var v = p.children; 10309 if (_ >= p.currentTime) for (var b = 0; b < v.length; b++) v[b].seek(_); 10310 else for (b = v.length; b--;) v[b].seek(_) 10311 } 10312 _ > g && _ < s ? (n(_), !p.began && _ >= h && (p.began = !0, r("begin")), r("run")) : (_ <= g && 0 !== m && (n(0), f && a()), _ >= s && m !== s && (n(s), f || a())), e >= s && (p.remaining ? (l = o, "alternate" === p.direction && (p.reversed = !p.reversed)) : (p.pause(), "Promise" in window && (d(), c = t()), p.completed || (p.completed = !0, r("complete"))), u = 0), r("update") 10313 } 10314 e = void 0 === e ? {} : e; 10315 var o, l, u = 0, 10316 d = null, 10317 c = t(), 10318 p = j(e); 10319 return p.reset = function() { 10320 var e = p.direction, 10321 t = p.loop; 10322 for (p.currentTime = 0, p.progress = 0, p.paused = !0, p.began = !1, p.completed = !1, p.reversed = "reverse" === e, p.remaining = "alternate" === e && 1 === t ? 2 : t, e = p.children.length; e--;) t = p.children[e], t.seek(t.offset), t.reset() 10323 }, p.tick = function(e) { 10324 o = e, l || (l = o), s((u + o - l) * A.speed) 10325 }, p.seek = function(e) { 10326 s(i(e)) 10327 }, p.pause = function() { 10328 var e = R.indexOf(p); - 1 < e && R.splice(e, 1), p.paused = !0 10329 }, p.play = function() { 10330 p.paused && (p.paused = !1, l = 0, u = i(p.currentTime), R.push(p), G || B()) 10331 }, p.reverse = function() { 10332 p.reversed = !p.reversed, l = 0, u = i(p.currentTime) 10333 }, p.restart = function() { 10334 p.pause(), p.reset(), p.play() 10335 }, p.finished = c, p.reset(), p.autoplay && p.play(), p 10336 } 10337 var M, z = { 10338 update: void 0, 10339 begin: void 0, 10340 run: void 0, 10341 complete: void 0, 10342 loop: 1, 10343 direction: "normal", 10344 autoplay: !0, 10345 offset: 0 10346 }, O = { 10347 duration: 1e3, 10348 delay: 0, 10349 easing: "easeOutElastic", 10350 elasticity: 500, 10351 round: 0 10352 }, k = "translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY".split(" "), 10353 L = { 10354 arr: function(e) { 10355 return Array.isArray(e) 10356 }, 10357 obj: function(e) { 10358 return -1 < Object.prototype.toString.call(e).indexOf("Object") 10359 }, 10360 svg: function(e) { 10361 return e instanceof SVGElement 10362 }, 10363 dom: function(e) { 10364 return e.nodeType || L.svg(e) 10365 }, 10366 str: function(e) { 10367 return "string" == typeof e 10368 }, 10369 fnc: function(e) { 10370 return "function" == typeof e 10371 }, 10372 und: function(e) { 10373 return "undefined" == typeof e 10374 }, 10375 hex: function(e) { 10376 return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e) 10377 }, 10378 rgb: function(e) { 10379 return /^rgb/.test(e) 10380 }, 10381 hsl: function(e) { 10382 return /^hsl/.test(e) 10383 }, 10384 col: function(e) { 10385 return L.hex(e) || L.rgb(e) || L.hsl(e) 10386 } 10387 }, H = function() { 10388 function e(e, t, i) { 10389 return (((1 - 3 * i + 3 * t) * e + (3 * i - 6 * t)) * e + 3 * t) * e 10390 } 10391 return function(t, i, n, r) { 10392 if (0 <= t && 1 >= t && 0 <= n && 1 >= n) { 10393 var a = new Float32Array(11); 10394 if (t !== i || n !== r) for (var s = 0; 11 > s; ++s) a[s] = e(.1 * s, t, n); 10395 return function(s) { 10396 if (t === i && n === r) return s; 10397 if (0 === s) return 0; 10398 if (1 === s) return 1; 10399 for (var o = 0, l = 1; 10 !== l && a[l] <= s; ++l) o += .1; 10400 --l; 10401 var l = o + (s - a[l]) / (a[l + 1] - a[l]) * .1, 10402 u = 3 * (1 - 3 * n + 3 * t) * l * l + 2 * (3 * n - 6 * t) * l + 3 * t; 10403 if (.001 <= u) { 10404 for (o = 0; 4 > o && (u = 3 * (1 - 3 * n + 3 * t) * l * l + 2 * (3 * n - 6 * t) * l + 3 * t, 0 !== u); ++o) var d = e(l, t, n) - s, 10405 l = l - d / u; 10406 s = l 10407 } else if (0 === u) s = l; 10408 else { 10409 var l = o, 10410 o = o + .1, 10411 c = 0; 10412 do d = l + (o - l) / 2, u = e(d, t, n) - s, 0 < u ? o = d : l = d; 10413 while (1e-7 < Math.abs(u) && 10 > ++c); 10414 s = d 10415 } 10416 return e(s, i, r) 10417 } 10418 } 10419 } 10420 }(), 10421 N = function() { 10422 function e(e, t) { 10423 return 0 === e || 1 === e ? e : -Math.pow(2, 10 * (e - 1)) * Math.sin(2 * (e - 1 - t / (2 * Math.PI) * Math.asin(1)) * Math.PI / t) 10424 } 10425 var t, i = "Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "), 10426 n = { 10427 In: [ 10428 [.55, .085, .68, .53], 10429 [.55, .055, .675, .19], 10430 [.895, .03, .685, .22], 10431 [.755, .05, .855, .06], 10432 [.47, 0, .745, .715], 10433 [.95, .05, .795, .035], 10434 [.6, .04, .98, .335], 10435 [.6, - .28, .735, .045], e], 10436 Out: [ 10437 [.25, .46, .45, .94], 10438 [.215, .61, .355, 1], 10439 [.165, .84, .44, 1], 10440 [.23, 1, .32, 1], 10441 [.39, .575, .565, 1], 10442 [.19, 1, .22, 1], 10443 [.075, .82, .165, 1], 10444 [.175, .885, .32, 1.275], 10445 function(t, i) { 10446 return 1 - e(1 - t, i) 10447 }], 10448 InOut: [ 10449 [.455, .03, .515, .955], 10450 [.645, .045, .355, 1], 10451 [.77, 0, .175, 1], 10452 [.86, 0, .07, 1], 10453 [.445, .05, .55, .95], 10454 [1, 0, 0, 1], 10455 [.785, .135, .15, .86], 10456 [.68, - .55, .265, 1.55], 10457 function(t, i) { 10458 return .5 > t ? e(2 * t, i) / 2 : 1 - e(-2 * t + 2, i) / 2 10459 }] 10460 }, r = { 10461 linear: H(.25, .25, .75, .75) 10462 }, a = {}; 10463 for (t in n) a.type = t, n[a.type].forEach(function(e) { 10464 return function(t, n) { 10465 r["ease" + e.type + i[n]] = L.fnc(t) ? t : H.apply($jscomp$this, t) 10466 } 10467 }(a)), a = { 10468 type: a.type 10469 }; 10470 return r 10471 }(), 10472 D = { 10473 css: function(e, t, i) { 10474 return e.style[t] = i 10475 }, 10476 attribute: function(e, t, i) { 10477 return e.setAttribute(t, i) 10478 }, 10479 object: function(e, t, i) { 10480 return e[t] = i 10481 }, 10482 transform: function(e, t, i, n, r) { 10483 n[r] || (n[r] = []), n[r].push(t + "(" + i + ")") 10484 } 10485 }, R = [], 10486 G = 0, 10487 B = function() { 10488 function e() { 10489 G = requestAnimationFrame(t) 10490 } 10491 function t(t) { 10492 var i = R.length; 10493 if (i) { 10494 for (var n = 0; n < i;) R[n] && R[n].tick(t), n++; 10495 e() 10496 } else cancelAnimationFrame(G), G = 0 10497 } 10498 return e 10499 }(); 10500 return A.version = "2.0.2", A.speed = 1, A.running = R, A.remove = function(e) { 10501 e = w(e); 10502 for (var t = R.length; t--;) for (var i = R[t], r = i.animations, a = r.length; a--;) n(e, r[a].animatable.target) && (r.splice(a, 1), r.length || i.pause()) 10503 }, A.getValue = m, A.path = function(t, i) { 10504 var n = L.str(t) ? e(t)[0] : t, 10505 r = i || 100; 10506 return function(e) { 10507 return { 10508 el: n, 10509 property: e, 10510 totalLength: n.getTotalLength() * (r / 100) 10511 } 10512 } 10513 }, A.setDashoffset = function(e) { 10514 var t = e.getTotalLength(); 10515 return e.setAttribute("stroke-dasharray", t), t 10516 }, A.bezier = H, A.easings = N, A.timeline = function(e) { 10517 var t = A(e); 10518 return t.pause(), t.duration = 0, t.add = function(e) {
10519 return t.children.forEach(function(e) { 10520 e.began = !0, e.completed = !0 10521 }), i(e).forEach(function(e) { 10522 var i = t.duration, 10523 n = e.offset; 10524 e.autoplay = !1, e.offset = L.und(n) ? i : f(n, i), t.seek(e.offset), e = A(e), e.duration > i && (t.duration = e.duration), e.began = !0, t.children.push(e) 10525 }), t.reset(), t.seek(0), t.autoplay && t.restart(), t 10526 }, t 10527 }, A.random = function(e, t) { 10528 return Math.floor(Math.random() * (t - e + 1)) + e 10529 }, A 10530}); 10531var g_ugFunctions = new UGFunctions; 10532! function(e) { 10533 "function" == typeof define && define.amd ? define(["jquery"], e) : "object" == typeof exports ? module.exports = e : e(jQuery) 10534}(function(e) { 10535 function t(t) { 10536 var s = t || window.event, 10537 o = l.call(arguments, 1), 10538 u = 0, 10539 d = 0, 10540 c = 0, 10541 g = 0; 10542 if (t = e.event.fix(s), t.type = "mousewheel", "detail" in s && (c = -1 * s.detail), "wheelDelta" in s && (c = s.wheelDelta), "wheelDeltaY" in s && (c = s.wheelDeltaY), "wheelDeltaX" in s && (d = -1 * s.wheelDeltaX), "axis" in s && s.axis === s.HORIZONTAL_AXIS && (d = -1 * c, c = 0), u = 0 === c ? d : c, "deltaY" in s && (c = -1 * s.deltaY, u = c), "deltaX" in s && (d = s.deltaX, 0 === c && (u = -1 * d)), 0 !== c || 0 !== d) { 10543 if (1 === s.deltaMode) { 10544 var p = e.data(this, "mousewheel-line-height"); 10545 u *= p, c *= p, d *= p 10546 } else if (2 === s.deltaMode) { 10547 var h = e.data(this, "mousewheel-page-height"); 10548 u *= h, c *= h, d *= h 10549 } 10550 return g = Math.max(Math.abs(c), Math.abs(d)), (!a || a > g) && (a = g, n(s, g) && (a /= 40)), n(s, g) && (u /= 40, d /= 40, c /= 40), u = Math[u >= 1 ? "floor" : "ceil"](u / a), d = Math[d >= 1 ? "floor" : "ceil"](d / a), c = Math[c >= 1 ? "floor" : "ceil"](c / a), t.deltaX = d, t.deltaY = c, t.deltaFactor = a, t.deltaMode = 0, o.unshift(t, u, d, c), r && clearTimeout(r), r = setTimeout(i, 200), (e.event.dispatch || e.event.handle).apply(this, o) 10551 } 10552 } 10553 function i() { 10554 a = null 10555 } 10556 function n(e, t) { 10557 return d.settings.adjustOldDeltas && "mousewheel" === e.type && t % 120 === 0 10558 } 10559 var r, a, s = ["wheel", "mousewheel", "DOMMouseScroll", "MozMousePixelScroll"], 10560 o = "onwheel" in document || document.documentMode >= 9 ? ["wheel"] : ["mousewheel", "DomMouseScroll", "MozMousePixelScroll"], 10561 l = Array.prototype.slice; 10562 if (e.event.fixHooks) for (var u = s.length; u;) e.event.fixHooks[s[--u]] = e.event.mouseHooks; 10563 var d = e.event.special.mousewheel = { 10564 version: "3.1.9", 10565 setup: function() { 10566 if (this.addEventListener) for (var i = o.length; i;) this.addEventListener(o[--i], t, !1); 10567 else this.onmousewheel = t; 10568 e.data(this, "mousewheel-line-height", d.getLineHeight(this)), e.data(this, "mousewheel-page-height", d.getPageHeight(this)) 10569 }, 10570 teardown: function() { 10571 if (this.removeEventListener) for (var e = o.length; e;) this.removeEventListener(o[--e], t, !1); 10572 else this.onmousewheel = null 10573 }, 10574 getLineHeight: function(t) { 10575 return parseInt(e(t)["offsetParent" in e.fn ? "offsetParent" : "parent"]().css("fontSize"), 10) 10576 }, 10577 getPageHeight: function(t) { 10578 return e(t).height() 10579 }, 10580 settings: { 10581 adjustOldDeltas: !0 10582 } 10583 }; 10584 e.fn.extend({ 10585 mousewheel: function(e) { 10586 return e ? this.bind("mousewheel", e) : this.trigger("mousewheel") 10587 }, 10588 unmousewheel: function(e) { 10589 return this.unbind("mousewheel", e) 10590 } 10591 }) 10592}), 10593function(e) { 10594 "function" == typeof define && define.amd ? define(["jquery"], function(t) { 10595 return e(t) 10596 }) : "object" == typeof module && "object" == typeof module.exports ? exports = e(require("jquery")) : e(jQuery) 10597}(function(e) { 10598 function t(e) { 10599 var t = 7.5625, 10600 i = 2.75; 10601 return 1 / i > e ? t * e * e : 2 / i > e ? t * (e -= 1.5 / i) * e + .75 : 2.5 / i > e ? t * (e -= 2.25 / i) * e + .9375 : t * (e -= 2.625 / i) * e + .984375 10602 } 10603 e.easing.jswing = e.easing.swing; 10604 var i = Math.pow, 10605 n = Math.sqrt, 10606 r = Math.sin, 10607 a = Math.cos, 10608 s = Math.PI, 10609 o = 1.70158, 10610 l = 1.525 * o, 10611 u = o + 1, 10612 d = 2 * s / 3, 10613 c = 2 * s / 4.5; 10614 e.extend(e.easing, { 10615 def: "easeOutQuad", 10616 swing: function(t) { 10617 return e.easing[e.easing.def](t) 10618 }, 10619 easeInQuad: function(e) { 10620 return e * e 10621 }, 10622 easeOutQuad: function(e) { 10623 return 1 - (1 - e) * (1 - e) 10624 }, 10625 easeInOutQuad: function(e) { 10626 return .5 > e ? 2 * e * e : 1 - i(-2 * e + 2, 2) / 2 10627 }, 10628 easeInCubic: function(e) { 10629 return e * e * e 10630 }, 10631 easeOutCubic: function(e) { 10632 return 1 - i(1 - e, 3) 10633 }, 10634 easeInOutCubic: function(e) { 10635 return .5 > e ? 4 * e * e * e : 1 - i(-2 * e + 2, 3) / 2 10636 }, 10637 easeInQuart: function(e) { 10638 return e * e * e * e 10639 }, 10640 easeOutQuart: function(e) { 10641 return 1 - i(1 - e, 4) 10642 }, 10643 easeInOutQuart: function(e) { 10644 return .5 > e ? 8 * e * e * e * e : 1 - i(-2 * e + 2, 4) / 2 10645 }, 10646 easeInQuint: function(e) { 10647 return e * e * e * e * e 10648 }, 10649 easeOutQuint: function(e) { 10650 return 1 - i(1 - e, 5) 10651 }, 10652 easeInOutQuint: function(e) { 10653 return .5 > e ? 16 * e * e * e * e * e : 1 - i(-2 * e + 2, 5) / 2 10654 }, 10655 easeInSine: function(e) { 10656 return 1 - a(e * s / 2) 10657 }, 10658 easeOutSine: function(e) { 10659 return r(e * s / 2) 10660 }, 10661 easeInOutSine: function(e) { 10662 return -(a(s * e) - 1) / 2 10663 }, 10664 easeInExpo: function(e) { 10665 return 0 === e ? 0 : i(2, 10 * e - 10) 10666 }, 10667 easeOutExpo: function(e) { 10668 return 1 === e ? 1 : 1 - i(2, - 10 * e) 10669 }, 10670 easeInOutExpo: function(e) { 10671 return 0 === e ? 0 : 1 === e ? 1 : .5 > e ? i(2, 20 * e - 10) / 2 : (2 - i(2, - 20 * e + 10)) / 2 10672 }, 10673 easeInCirc: function(e) { 10674 return 1 - n(1 - i(e, 2)) 10675 }, 10676 easeOutCirc: function(e) { 10677 return n(1 - i(e - 1, 2)) 10678 }, 10679 easeInOutCirc: function(e) { 10680 return .5 > e ? (1 - n(1 - i(2 * e, 2))) / 2 : (n(1 - i(-2 * e + 2, 2)) + 1) / 2 10681 }, 10682 easeInElastic: function(e) { 10683 return 0 === e ? 0 : 1 === e ? 1 : -i(2, 10 * e - 10) * r((10 * e - 10.75) * d) 10684 }, 10685 easeOutElastic: function(e) { 10686 return 0 === e ? 0 : 1 === e ? 1 : i(2, - 10 * e) * r((10 * e - .75) * d) + 1 10687 }, 10688 easeInOutElastic: function(e) { 10689 return 0 === e ? 0 : 1 === e ? 1 : .5 >
10689 e ? -(i(2, 20 * e - 10) * r((20 * e - 11.125) * c)) / 2 : i(2, - 20 * e + 10) * r((20 * e - 11.125) * c) / 2 + 1 10690 }, 10691 easeInBack: function(e) { 10692 return u * e * e * e - o * e * e 10693 }, 10694 easeOutBack: function(e) { 10695 return 1 + u * i(e - 1, 3) + o * i(e - 1, 2) 10696 }, 10697 easeInOutBack: function(e) { 10698 return .5 > e ? i(2 * e, 2) * (2 * (l + 1) * e - l) / 2 : (i(2 * e - 2, 2) * ((l + 1) * (2 * e - 2) + l) + 2) / 2 10699 }, 10700 easeInBounce: function(e) { 10701 return 1 - t(1 - e) 10702 }, 10703 easeOutBounce: t, 10704 easeInOutBounce: function(e) { 10705 return .5 > e ? (1 - t(1 - 2 * e)) / 2 : (1 + t(2 * e - 1)) / 2 10706 } 10707 }) 10708}), ! function(e, t) { 10709 function i(e, t, i) { 10710 var n = c[t.type] || {}; 10711 return null == e ? i || !t.def ? null : t.def : (e = n.floor ? ~~e : parseFloat(e), isNaN(e) ? t.def : n.mod ? (e + n.mod) % n.mod : 0 > e ? 0 : n.max < e ? n.max : e) 10712 } 10713 function n(t) { 10714 var i = u(), 10715 n = i._rgba = []; 10716 return t = t.toLowerCase(), h(l, function(e, r) { 10717 var a, s = r.re.exec(t), 10718 o = s && r.parse(s), 10719 l = r.space || "rgba"; 10720 return o ? (a = i[l](o), i[d[l].cache] = a[d[l].cache], n = i._rgba = a._rgba, !1) : void 0 10721 }), n.length ? ("0,0,0,0" === n.join() && e.extend(n, a.transparent), i) : a[t] 10722 } 10723 function r(e, t, i) { 10724 return i = (i + 1) % 1, 1 > 6 * i ? e + (t - e) * i * 6 : 1 > 2 * i ? t : 2 > 3 * i ? e + (t - e) * (2 / 3 - i) * 6 : e 10725 } 10726 if ("undefined" == typeof e.cssHooks) return !1; 10727 var a, s = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", 10728 o = /^([\-+])=\s*(\d+\.?\d*)/, 10729 l = [{ 10730 re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, 10731 parse: function(e) { 10732 return [e[1], e[2], e[3], e[4]] 10733 } 10734 }, { 10735 re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, 10736 parse: function(e) { 10737 return [2.55 * e[1], 2.55 * e[2], 2.55 * e[3], e[4]] 10738 } 10739 }, { 10740 re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, 10741 parse: function(e) { 10742 return [parseInt(e[1], 16), parseInt(e[2], 16), parseInt(e[3], 16)] 10743 } 10744 }, { 10745 re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, 10746 parse: function(e) { 10747 return [parseInt(e[1] + e[1], 16), parseInt(e[2] + e[2], 16), parseInt(e[3] + e[3], 16)] 10748 } 10749 }, { 10750 re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, 10751 space: "hsla", 10752 parse: function(e) { 10753 return [e[1], e[2] / 100, e[3] / 100, e[4]] 10754 } 10755 }], 10756 u = e.Color = function(t, i, n, r) { 10757 return new e.Color.fn.parse(t, i, n, r) 10758 }, d = { 10759 rgba: { 10760 props: { 10761 red: { 10762 idx: 0, 10763 type: "byte" 10764 }, 10765 green: { 10766 idx: 1, 10767 type: "byte" 10768 }, 10769 blue: { 10770 idx: 2, 10771 type: "byte" 10772 } 10773 } 10774 }, 10775 hsla: { 10776 props: { 10777 hue: { 10778 idx: 0, 10779 type: "degrees" 10780 }, 10781 saturation: { 10782 idx: 1, 10783 type: "percent" 10784 }, 10785 lightness: { 10786 idx: 2, 10787 type: "percent" 10788 } 10789 } 10790 } 10791 }, c = { 10792 byte: { 10793 floor: !0, 10794 max: 255 10795 }, 10796 percent: { 10797 max: 1 10798 }, 10799 degrees: { 10800 mod: 360, 10801 floor: !0 10802 } 10803 }, g = u.support = {}, p = e("<p>")[0], 10804 h = e.each; 10805 p.style.cssText = "background-color:rgba(1,1,1,.5)", g.rgba = p.style.backgroundColor.indexOf("rgba") > -1, h(d, function(e, t) {
vendor: 4,146 bytes, lines 10806-10900
10806 t.cache = "_" + e, t.props.alpha = { 10807 idx: 3, 10808 type: "percent", 10809 def: 1 10810 } 10811 }), u.fn = e.extend(u.prototype, { 10812 parse: function(r, s, o, l) { 10813 if (r === t) return this._rgba = [null, null, null, null], this; 10814 (r.jquery || r.nodeType) && (r = e(r).css(s), s = t); 10815 var c = this, 10816 g = e.type(r), 10817 p = this._rgba = []; 10818 return s !== t && (r = [r, s, o, l], g = "array"), "string" === g ? this.parse(n(r) || a._default) : "array" === g ? (h(d.rgba.props, function(e, t) { 10819 p[t.idx] = i(r[t.idx], t) 10820 }), this) : "object" === g ? (r instanceof u ? h(d, function(e, t) { 10821 r[t.cache] && (c[t.cache] = r[t.cache].slice()) 10822 }) : h(d, function(t, n) { 10823 var a = n.cache; 10824 h(n.props, function(e, t) { 10825 if (!c[a] && n.to) { 10826 if ("alpha" === e || null == r[e]) return; 10827 c[a] = n.to(c._rgba) 10828 } 10829 c[a][t.idx] = i(r[e], t, !0) 10830 }), c[a] && e.inArray(null, c[a].slice(0, 3)) < 0 && (c[a][3] = 1, n.from && (c._rgba = n.from(c[a]))) 10831 }), this) : void 0 10832 }, 10833 is: function(e) { 10834 var t = u(e), 10835 i = !0, 10836 n = this; 10837 return h(d, function(e, r) { 10838 var a, s = t[r.cache]; 10839 return s && (a = n[r.cache] || r.to && r.to(n._rgba) || [], h(r.props, function(e, t) { 10840 return null != s[t.idx] ? i = s[t.idx] === a[t.idx] : void 0 10841 })), i 10842 }), i 10843 }, 10844 _space: function() { 10845 var e = [], 10846 t = this; 10847 return h(d, function(i, n) { 10848 t[n.cache] && e.push(i) 10849 }), e.pop() 10850 }, 10851 transition: function(e, t) { 10852 var n = u(e), 10853 r = n._space(), 10854 a = d[r], 10855 s = 0 === this.alpha() ? u("transparent") : this, 10856 o = s[a.cache] || a.to(s._rgba), 10857 l = o.slice(); 10858 return n = n[a.cache], h(a.props, function(e, r) { 10859 var a = r.idx, 10860 s = o[a], 10861 u = n[a], 10862 d = c[r.type] || {}; 10863 null !== u && (null === s ? l[a] = u : (d.mod && (u - s > d.mod / 2 ? s += d.mod : s - u > d.mod / 2 && (s -= d.mod)), l[a] = i((u - s) * t + s, r))) 10864 }), this[r](l) 10865 }, 10866 blend: function(t) { 10867 if (1 === this._rgba[3]) return this; 10868 var i = this._rgba.slice(), 10869 n = i.pop(), 10870 r = u(t)._rgba; 10871 return u(e.map(i, function(e, t) { 10872 return (1 - n) * r[t] + n * e 10873 })) 10874 }, 10875 toRgbaString: function() { 10876 var t = "rgba(", 10877 i = e.map(this._rgba, function(e, t) { 10878 return null == e ? t > 2 ? 1 : 0 : e 10879 }); 10880 return 1 === i[3] && (i.pop(), t = "rgb("), t + i.join() + ")" 10881 }, 10882 toHslaString: function() { 10883 var t = "hsla(", 10884 i = e.map(this.hsla(), function(e, t) { 10885 return null == e && (e = t > 2 ? 1 : 0), t && 3 > t && (e = Math.round(100 * e) + "%"), e 10886 }); 10887 return 1 === i[3] && (i.pop(), t = "hsl("), t + i.join() + ")" 10888 }, 10889 toHexString: function(t) { 10890 var i = this._rgba.slice(), 10891 n = i.pop(); 10892 return t && i.push(~~ (255 * n)), "#" + e.map(i, function(e) { 10893 return e = (e || 0).toString(16), 1 === e.length ? "0" + e : e 10894 }).join("") 10895 }, 10896 toString: function() { 10897 return 0 === this._rgba[3] ? "transparent" : this.toRgbaString() 10898 } 10899 }), u.fn.parse.prototype = u.fn, d.hsla.to = function(e) { 10900 if (null == e[0] || null == e[1] || null == e[2]) return [null, null, null, e[3]];
10901 var t, i, n = e[0] / 255, 10902 r = e[1] / 255, 10903 a = e[2] / 255, 10904 s = e[3], 10905 o = Math.max(n, r, a), 10906 l = Math.min(n, r, a), 10907 u = o - l, 10908 d = o + l, 10909 c = .5 * d; 10910 return t = l === o ? 0 : n === o ? 60 * (r - a) / u + 360 : r === o ? 60 * (a - n) / u + 120 : 60 * (n - r) / u + 240, i = 0 === u ? 0 : .5 >= c ? u / d : u / (2 - d), [Math.round(t) % 360, i, c, null == s ? 1 : s] 10911 }, d.hsla.from = function(e) { 10912 if (null == e[0] || null == e[1] || null == e[2]) return [null, null, null, e[3]]; 10913 var t = e[0] / 360, 10914 i = e[1], 10915 n = e[2], 10916 a = e[3], 10917 s = .5 >= n ? n * (1 + i) : n + i - n * i, 10918 o = 2 * n - s; 10919 return [Math.round(255 * r(o, s, t + 1 / 3)), Math.round(255 * r(o, s, t)), Math.round(255 * r(o, s, t - 1 / 3)), a] 10920 }, h(d, function(n, r) { 10921 var a = r.props, 10922 s = r.cache, 10923 l = r.to, 10924 d = r.from; 10925 u.fn[n] = function(n) { 10926 if (l && !this[s] && (this[s] = l(this._rgba)), n === t) return this[s].slice(); 10927 var r, o = e.type(n), 10928 c = "array" === o || "object" === o ? n : arguments, 10929 g = this[s].slice(); 10930 return h(a, function(e, t) { 10931 var n = c["object" === o ? e : t.idx]; 10932 null == n && (n = g[t.idx]), g[t.idx] = i(n, t) 10933 }), d ? (r = u(d(g)), r[s] = g, r) : u(g) 10934 }, h(a, function(t, i) { 10935 u.fn[t] || (u.fn[t] = function(r) { 10936 var a, s = e.type(r), 10937 l = "alpha" === t ? this._hsla ? "hsla" : "rgba" : n, 10938 u = this[l](), 10939 d = u[i.idx]; 10940 return "undefined" === s ? d : ("function" === s && (r = r.call(this, d), s = e.type(r)), null == r && i.empty ? this : ("string" === s && (a = o.exec(r), a && (r = d + parseFloat(a[2]) * ("+" === a[1] ? 1 : -1))), u[i.idx] = r, this[l](u))) 10941 }) 10942 }) 10943 }), u.hook = function(t) { 10944 var i = t.split(" "); 10945 h(i, function(t, i) { 10946 e.cssHooks[i] = { 10947 set: function(t, r) { 10948 var a, s, o = ""; 10949 if ("transparent" !== r && ("string" !== e.type(r) || (a = n(r)))) { 10950 if (r = u(a || r), !g.rgba && 1 !== r._rgba[3]) { 10951 for (s = "backgroundColor" === i ? t.parentNode : t; 10952 ("" === o || "transparent" === o) && s && s.style;) try { 10953 o = e.css(s, "backgroundColor"), s = s.parentNode 10954 } catch (e) {} 10955 r = r.blend(o && "transparent" !== o ? o : "_default") 10956 } 10957 r = r.toRgbaString() 10958 } 10959 try { 10960 t.style[i] = r 10961 } catch (e) {} 10962 } 10963 }, e.fx.step[i] = function(t) { 10964 t.colorInit || (t.start = u(t.elem, i), t.end = u(t.end), t.colorInit = !0), e.cssHooks[i].set(t.elem, t.start.transition(t.end, t.pos)) 10965 } 10966 }) 10967 }, u.hook(s), e.cssHooks.borderColor = { 10968 expand: function(e) { 10969 var t = {}; 10970 return h(["Top", "Right", "Bottom", "Left"], function(i, n) { 10971 t["border" + n + "Color"] = e 10972 }), t 10973 } 10974 }, a = e.Color.names = { 10975 aqua: "#00ffff", 10976 black: "#000000", 10977 blue: "#0000ff", 10978 fuchsia: "#ff00ff", 10979 gray: "#808080", 10980 green: "#008000", 10981 lime: "#00ff00", 10982 maroon: "#800000", 10983 navy: "#000080", 10984 olive: "#808000", 10985 purple: "#800080", 10986 red: "#ff0000", 10987 silver: "#c0c0c0", 10988 teal: "#008080", 10989 white: "#ffffff", 10990 yellow: "#ffff00", 10991 transparent: [null, null, null, 0], 10992 _default: "#ffffff" 10993 } 10994}(jQuery), ! function(e) { 10995 function t() { 10996 try { 10997 var i = this === document ? e(this) : e(this).contents() 10998 } catch (e) { 10999 return !1 11000 } 11001 i.mousemove(function(t) { 11002 e.mlp = { 11003 x: t.pageX, 11004 y: t.pageY 11005 } 11006 }), i.find("iframe").on("load", t) 11007 } 11008 e.mlp = { 11009 x: 0, 11010 y: 0 11011 }, e(t), e.fn.ismouseover = function() { 11012 var t = !1; 11013 return this.eq(0).each(function() { 11014 var i = e(this).is("iframe") ? e(this).contents().find("body") : e(this), 11015 n = i.offset(); 11016 t = n.left <= e.mlp.x && n.left + i.outerWidth() > e.mlp.x && n.top <= e.mlp.y && n.top + i.outerHeight() > e.mlp.y 11017 }), t 11018 } 11019}(jQuery); 11020var g_ugYoutubeAPI = new UGYoutubeAPI, 11021 g_ugVimeoAPI = new UGVimeoAPI, 11022 g_ugHtml5MediaAPI = new UGHtml5MediaAPI, 11023 g_ugSoundCloudAPI = new UGSoundCloudAPI, 11024 g_ugWistiaAPI = new UGWistiaAPI; 11025jQuery.fn.unitegallery = function(e) { 11026 var t = jQuery(this), 11027 i = "#" + t.attr("id"); 11028 if (!e) var e = {}; 11029 var n = new UniteGalleryMain; 11030 n.run(i, e); 11031 var r = new UG_API(n); 11032 return r 11033}, "undefined" != typeof g_ugFunctions ? g_ugFunctions.registerTheme("default") : jQuery(document).ready(function() { 11034 g_ugFunctions.registerTheme("default") 11035}), "undefined" != typeof g_ugFunctions ? g_ugFunctions.registerTheme("tiles") : jQuery(document).ready(function() { 11036 g_ugFunctions.registerTheme("tiles") 11037}), ! function(e) { 11038 "function" == typeof define && define.amd ? define(["jquery"], e) : e(jQuery) 11039}(function(e) { 11040 e.extend(e.fn, { 11041 validate: function(t) { 11042 if (!this.length) return void(t && t.debug && window.console && console.warn("Nothing selected, can't validate, returning nothing.")); 11043 var i = e.data(this[0], "validator"); 11044 return i ? i : (this.attr("novalidate", "novalidate"), i = new e.validator(t, this[0]), e.data(this[0], "validator", i), i.settings.onsubmit && (this.on("click.validate", ":submit", function(t) { 11045 i.settings.submitHandler && (i.submitButton = t.target), e(this).hasClass("cancel") && (i.cancelSubmit = !0), void 0 !== e(this).attr("formnovalidate") && (i.cancelSubmit = !0) 11046 }), this.on("submit.validate", function(t) { 11047 function n() { 11048 var n, r; 11049 return !i.settings.submitHandler || (i.submitButton && (n = e("<input type='hidden'/>").attr("name", i.submitButton.name).val(e(i.submitButton).val()).appendTo(i.currentForm)), r = i.settings.submitHandler.call(i, i.currentForm, t), i.submitButton && n.remove(), void 0 !== r && r) 11050 } 11051 return i.settings.debug && t.preventDefault(), i.cancelSubmit ? (i.cancelSubmit = !1, n()) : i.form() ? i.pendingRequest ? (i.formSubmitted = !0, !1) : n() : (i.focusInvalid(), !1) 11052 })), i) 11053 }, 11054 valid: function() { 11055 var t, i, n; 11056 return e(this[0]).is("form") ? t = this.validate().form() : (n = [], t = !0, i = e(this[0].form).validate(), this.each(function() {
11057 t = i.element(this) && t, n = n.concat(i.errorList) 11058 }), i.errorList = n), t 11059 }, 11060 rules: function(t, i) { 11061 var n, r, a, s, o, l, u = this[0]; 11062 if (t) switch (n = e.data(u.form, "validator").settings, r = n.rules, a = e.validator.staticRules(u), t) { 11063 case "add": 11064 e.extend(a, e.validator.normalizeRule(i)), delete a.messages, r[u.name] = a, i.messages && (n.messages[u.name] = e.extend(n.messages[u.name], i.messages)); 11065 break; 11066 case "remove": 11067 return i ? (l = {}, e.each(i.split(/\s/), function(t, i) { 11068 l[i] = a[i], delete a[i], "required" === i && e(u).removeAttr("aria-required") 11069 }), l) : (delete r[u.name], a) 11070 } 11071 return s = e.validator.normalizeRules(e.extend({}, e.validator.classRules(u), e.validator.attributeRules(u), e.validator.dataRules(u), e.validator.staticRules(u)), u), s.required && (o = s.required, delete s.required, s = e.extend({ 11072 required: o 11073 }, s), e(u).attr("aria-required", "true")), s.remote && (o = s.remote, delete s.remote, s = e.extend(s, { 11074 remote: o 11075 })), s 11076 } 11077 }), e.extend(e.expr[":"], { 11078 blank: function(t) { 11079 return !e.trim("" + e(t).val()) 11080 }, 11081 filled: function(t) { 11082 return !!e.trim("" + e(t).val()) 11083 }, 11084 unchecked: function(t) { 11085 return !e(t).prop("checked") 11086 } 11087 }), e.validator = function(t, i) { 11088 this.settings = e.extend(!0, {}, e.validator.defaults, t), this.currentForm = i, this.init() 11089 }, e.validator.format = function(t, i) { 11090 return 1 === arguments.length ? function() { 11091 var i = e.makeArray(arguments); 11092 return i.unshift(t), e.validator.format.apply(this, i) 11093 } : (arguments.length > 2 && i.constructor !== Array && (i = e.makeArray(arguments).slice(1)), i.constructor !== Array && (i = [i]), e.each(i, function(e, i) { 11094 t = t.replace(new RegExp("\\{" + e + "\\}", "g"), function() { 11095 return i 11096 }) 11097 }), t) 11098 }, e.extend(e.validator, { 11099 defaults: { 11100 messages: {}, 11101 groups: {}, 11102 rules: {}, 11103 errorClass: "error", 11104 validClass: "valid", 11105 errorElement: "label", 11106 focusCleanup: !1, 11107 focusInvalid: !0, 11108 errorContainer: e([]), 11109 errorLabelContainer: e([]), 11110 onsubmit: !0, 11111 ignore: ":hidden", 11112 ignoreTitle: !1, 11113 onfocusin: function(e) { 11114 this.lastActive = e, this.settings.focusCleanup && (this.settings.unhighlight && this.settings.unhighlight.call(this, e, this.settings.errorClass, this.settings.validClass), this.hideThese(this.errorsFor(e))) 11115 }, 11116 onfocusout: function(e) { 11117 this.checkable(e) || !(e.name in this.submitted) && this.optional(e) || this.element(e) 11118 }, 11119 onkeyup: function(t, i) { 11120 var n = [16, 17, 18, 20, 35, 36, 37, 38, 39, 40, 45, 144, 225]; 11121 9 === i.which && "" === this.elementValue(t) || -1 !== e.inArray(i.keyCode, n) || (t.name in this.submitted || t === this.lastElement) && this.element(t) 11122 }, 11123 onclick: function(e) { 11124 e.name in this.submitted ? this.element(e) : e.parentNode.name in this.submitted && this.element(e.parentNode) 11125 }, 11126 highlight: function(t, i, n) { 11127 "radio" === t.type ? this.findByName(t.name).addClass(i).removeClass(n) : e(t).addClass(i).removeClass(n) 11128 }, 11129 unhighlight: function(t, i, n) { 11130 "radio" === t.type ? this.findByName(t.name).removeClass(i).addClass(n) : e(t).removeClass(i).addClass(n) 11131 } 11132 }, 11133 setDefaults: function(t) { 11134 e.extend(e.validator.defaults, t) 11135 }, 11136 messages: { 11137 required: "This field is required.", 11138 remote: "Please fix this field.", 11139 email: "Please enter a valid email address.", 11140 url: "Please enter a valid URL.", 11141 date: "Please enter a valid date.", 11142 dateISO: "Please enter a valid date ( ISO ).", 11143 number: "Please enter a valid number.", 11144 digits: "Please enter only digits.", 11145 creditcard: "Please enter a valid credit card number.", 11146 equalTo: "Please enter the same value again.", 11147 maxlength: e.validator.format("Please enter no more than {0} characters."), 11148 minlength: e.validator.format("Please enter at least {0} characters."), 11149 rangelength: e.validator.format("Please enter a value between {0} and {1} characters long."), 11150 range: e.validator.format("Please enter a value between {0} and {1}."), 11151 max: e.validator.format("Please enter a value less than or equal to {0}."), 11152 min: e.validator.format("Please enter a value greater than or equal to {0}.") 11153 }, 11154 autoCreateRanges: !1, 11155 prototype: { 11156 init: function() { 11157 function t(t) { 11158 var i = e.data(this.form, "validator"), 11159 n = "on" + t.type.replace(/^validate/, ""), 11160 r = i.settings; 11161 r[n] && !e(this).is(r.ignore) && r[n].call(i, this, t) 11162 } 11163 this.labelContainer = e(this.settings.errorLabelContainer), this.errorContext = this.labelContainer.length && this.labelContainer || e(this.currentForm), this.containers = e(this.settings.errorContainer).add(this.settings.errorLabelContainer), this.submitted = {}, this.valueCache = {}, this.pendingRequest = 0, this.pending = {}, this.invalid = {}, this.reset(); 11164 var i, n = this.groups = {}; 11165 e.each(this.settings.groups, function(t, i) { 11166 "string" == typeof i && (i = i.split(/\s/)), e.each(i, function(e, i) { 11167 n[i] = t 11168 }) 11169 }), i = this.settings.rules, e.each(i, function(t, n) { 11170 i[t] = e.validator.normalizeRule(n) 11171 }), e(this.currentForm).on("focusin.validate focusout.validate keyup.validate", ":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']", t).on("click.validate", "select, option, [type='radio'], [type='checkbox']", t), this.settings.invalidHandler && e(this.currentForm).on("invalid-form.validate", this.settings.invalidHandler), e(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required", "true") 11172 }, 11173 form: function() { 11174 return this.checkForm(), e.extend(this.submitted, this.errorMap), this.invalid = e.extend({}, this.errorMap), this.valid() || e(this.currentForm).triggerHandler("invalid-form", [this]), this.showErrors(), this.valid() 11175 }, 11176 checkForm: function() { 11177 this.prepareForm(); 11178 for (var e = 0, t = this.currentElements = this.elements(); t[e]; e++) this.check(t[e]); 11179 return this.valid() 11180 }, 11181 element: function(t) { 11182 var i = this.clean(t), 11183 n = this.validationTargetFor(i), 11184 r = !0; 11185 return this.lastElement = n, void 0 === n ? delete this.invalid[i.name] : (this.prepareElement(n), this.currentElements = e(n), r = this.check(n) !== !1, r ? delete this.invalid[n.name] : this.invalid[n.name] = !0), e(t).attr("aria-invalid", !r), this.numberOfInvalids() || (this.toHide = this.toHide.add(this.containers
11185)), this.showErrors(), r 11186 }, 11187 showErrors: function(t) { 11188 if (t) { 11189 e.extend(this.errorMap, t), this.errorList = []; 11190 for (var i in t) this.errorList.push({ 11191 message: t[i], 11192 element: this.findByName(i)[0] 11193 }); 11194 this.successList = e.grep(this.successList, function(e) { 11195 return !(e.name in t) 11196 }) 11197 } 11198 this.settings.showErrors ? this.settings.showErrors.call(this, this.errorMap, this.errorList) : this.defaultShowErrors() 11199 }, 11200 resetForm: function() { 11201 e.fn.resetForm && e(this.currentForm).resetForm(), this.submitted = {}, this.lastElement = null, this.prepareForm(), this.hideErrors(); 11202 var t, i = this.elements().removeData("previousValue").removeAttr("aria-invalid"); 11203 if (this.settings.unhighlight) for (t = 0; i[t]; t++) this.settings.unhighlight.call(this, i[t], this.settings.errorClass, ""); 11204 else i.removeClass(this.settings.errorClass) 11205 }, 11206 numberOfInvalids: function() { 11207 return this.objectLength(this.invalid) 11208 }, 11209 objectLength: function(e) { 11210 var t, i = 0; 11211 for (t in e) i++; 11212 return i 11213 }, 11214 hideErrors: function() { 11215 this.hideThese(this.toHide) 11216 }, 11217 hideThese: function(e) { 11218 e.not(this.containers).text(""), this.addWrapper(e).hide() 11219 }, 11220 valid: function() { 11221 return 0 === this.size() 11222 }, 11223 size: function() { 11224 return this.errorList.length 11225 }, 11226 focusInvalid: function() { 11227 if (this.settings.focusInvalid) try { 11228 e(this.findLastActive() || this.errorList.length && this.errorList[0].element || []).filter(":visible").focus().trigger("focusin") 11229 } catch (e) {} 11230 }, 11231 findLastActive: function() { 11232 var t = this.lastActive; 11233 return t && 1 === e.grep(this.errorList, function(e) { 11234 return e.element.name === t.name 11235 }).length && t 11236 }, 11237 elements: function() { 11238 var t = this, 11239 i = {}; 11240 return e(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function() { 11241 return !this.name && t.settings.debug && window.console && console.error("%o has no name assigned", this), !(this.name in i || !t.objectLength(e(this).rules())) && (i[this.name] = !0, !0) 11242 }) 11243 }, 11244 clean: function(t) { 11245 return e(t)[0] 11246 }, 11247 errors: function() { 11248 var t = this.settings.errorClass.split(" ").join("."); 11249 return e(this.settings.errorElement + "." + t, this.errorContext) 11250 }, 11251 reset: function() { 11252 this.successList = [], this.errorList = [], this.errorMap = {}, this.toShow = e([]), this.toHide = e([]), this.currentElements = e([]) 11253 }, 11254 prepareForm: function() { 11255 this.reset(), this.toHide = this.errors().add(this.containers) 11256 }, 11257 prepareElement: function(e) { 11258 this.reset(), this.toHide = this.errorsFor(e) 11259 }, 11260 elementValue: function(t) { 11261 var i, n = e(t), 11262 r = t.type; 11263 return "radio" === r || "checkbox" === r ? this.findByName(t.name).filter(":checked").val() : "number" === r && "undefined" != typeof t.validity ? !t.validity.badInput && n.val() : (i = n.val(), "string" == typeof i ? i.replace(/\r/g, "") : i) 11264 }, 11265 check: function(t) { 11266 t = this.validationTargetFor(this.clean(t)); 11267 var i, n, r, a = e(t).rules(), 11268 s = e.map(a, function(e, t) { 11269 return t 11270 }).length, 11271 o = !1, 11272 l = this.elementValue(t); 11273 for (n in a) { 11274 r = { 11275 method: n, 11276 parameters: a[n] 11277 }; 11278 try { 11279 if (i = e.validator.methods[n].call(this, l, t, r.parameters), "dependency-mismatch" === i && 1 === s) { 11280 o = !0; 11281 continue 11282 } 11283 if (o = !1, "pending" === i) return void(this.toHide = this.toHide.not(this.errorsFor(t))); 11284 if (!i) return this.formatAndAdd(t, r), !1 11285 } catch (e) { 11286 throw this.settings.debug && window.console && console.log("Exception occurred when checking element " + t.id + ", check the '" + r.method + "' method.", e), e instanceof TypeError && (e.message += ". Exception occurred when checking element " + t.id + ", check the '" + r.method + "' method."), e 11287 } 11288 } 11289 if (!o) return this.objectLength(a) && this.successList.push(t), !0 11290 }, 11291 customDataMessage: function(t, i) { 11292 return e(t).data("msg" + i.charAt(0).toUpperCase() + i.substring(1).toLowerCase()) || e(t).data("msg") 11293 }, 11294 customMessage: function(e, t) { 11295 var i = this.settings.messages[e]; 11296 return i && (i.constructor === String ? i : i[t]) 11297 }, 11298 findDefined: function() { 11299 for (var e = 0; e < arguments.length; e++) if (void 0 !== arguments[e]) return arguments[e] 11300 }, 11301 defaultMessage: function(t, i) { 11302 return this.findDefined(this.customMessage(t.name, i), this.customDataMessage(t, i), !this.settings.ignoreTitle && t.title || void 0, e.validator.messages[i], "<strong>Warning: No message defined for " + t.name + "</strong>") 11303 }, 11304 formatAndAdd: function(t, i) { 11305 var n = this.defaultMessage(t, i.method), 11306 r = /\$?\{(\d+)\}/g; 11307 "function" == typeof n ? n = n.call(this, i.parameters, t) : r.test(n) && (n = e.validator.format(n.replace(r, "{$1}"), i.parameters)), this.errorList.push({ 11308 message: n, 11309 element: t, 11310 method: i.method 11311 }
11311), this.errorMap[t.name] = n, this.submitted[t.name] = n 11312 }, 11313 addWrapper: function(e) { 11314 return this.settings.wrapper && (e = e.add(e.parent(this.settings.wrapper))), e 11315 }, 11316 defaultShowErrors: function() { 11317 var e, t, i; 11318 for (e = 0; this.errorList[e]; e++) i = this.errorList[e], this.settings.highlight && this.settings.highlight.call(this, i.element, this.settings.errorClass, this.settings.validClass), this.showLabel(i.element, i.message); 11319 if (this.errorList.length && (this.toShow = this.toShow.add(this.containers)), this.settings.success) for (e = 0; this.successList[e]; e++) this.showLabel(this.successList[e]); 11320 if (this.settings.unhighlight) for (e = 0, t = this.validElements(); t[e]; e++) this.settings.unhighlight.call(this, t[e], this.settings.errorClass, this.settings.validClass); 11321 this.toHide = this.toHide.not(this.toShow), this.hideErrors(), this.addWrapper(this.toShow).show() 11322 }, 11323 validElements: function() { 11324 return this.currentElements.not(this.invalidElements()) 11325 }, 11326 invalidElements: function() { 11327 return e(this.errorList).map(function() { 11328 return this.element 11329 }) 11330 }, 11331 showLabel: function(t, i) { 11332 var n, r, a, s = this.errorsFor(t), 11333 o = this.idOrName(t), 11334 l = e(t).attr("aria-describedby"); 11335 s.length ? (s.removeClass(this.settings.validClass).addClass(this.settings.errorClass), s.html(i)) : (s = e("<" + this.settings.errorElement + ">").attr("id", o + "-error").addClass(this.settings.errorClass).html(i || ""), n = s, this.settings.wrapper && (n = s.hide().show().wrap("<" + this.settings.wrapper + "/>").parent()), this.labelContainer.length ? this.labelContainer.append(n) : this.settings.errorPlacement ? this.settings.errorPlacement(n, e(t)) : n.insertAfter(t), s.is("label") ? s.attr("for", o) : 0 === s.parents("label[for='" + o + "']").length && (a = s.attr("id").replace(/(:|\.|\[|\]|\$)/g, "\\$1"), l ? l.match(new RegExp("\\b" + a + "\\b")) || (l += " " + a) : l = a, e(t).attr("aria-describedby", l), r = this.groups[t.name], r && e.each(this.groups, function(t, i) { 11336 i === r && e("[name='" + t + "']", this.currentForm).attr("aria-describedby", s.attr("id")) 11337 }))), !i && this.settings.success && (s.text(""), "string" == typeof this.settings.success ? s.addClass(this.settings.success) : this.settings.success(s, t)), this.toShow = this.toShow.add(s) 11338 }, 11339 errorsFor: function(t) { 11340 var i = this.idOrName(t), 11341 n = e(t).attr("aria-describedby"), 11342 r = "label[for='" + i + "'], label[for='" + i + "'] *"; 11343 return n && (r = r + ", #" + n.replace(/\s+/g, ", #")), this.errors().filter(r) 11344 }, 11345 idOrName: function(e) { 11346 return this.groups[e.name] || (this.checkable(e) ? e.name : e.id || e.name) 11347 }, 11348 validationTargetFor: function(t) { 11349 return this.checkable(t) && (t = this.findByName(t.name)), e(t).not(this.settings.ignore)[0] 11350 }, 11351 checkable: function(e) { 11352 return /radio|checkbox/i.test(e.type) 11353 }, 11354 findByName: function(t) { 11355 return e(this.currentForm).find("[name='" + t + "']") 11356 }, 11357 getLength: function(t, i) { 11358 switch (i.nodeName.toLowerCase()) { 11359 case "select": 11360 return e("option:selected", i).length; 11361 case "input": 11362 if (this.checkable(i)) return this.findByName(i.name).filter(":checked").length 11363 } 11364 return t.length 11365 }, 11366 depend: function(e, t) { 11367 return !this.dependTypes[typeof e] || this.dependTypes[typeof e](e, t) 11368 }, 11369 dependTypes: { 11370 boolean: function(e) { 11371 return e 11372 },
11373 string: function(t, i) { 11374 return !!e(t, i.form).length 11375 }, 11376 11377 11378 function: function(e, t) { 11379 return e(t) 11380 } 11381 }, 11382 optional: function(t) { 11383 var i = this.elementValue(t); 11384 return !e.validator.methods.required.call(this, i, t) && "dependency-mismatch" 11385 }, 11386 startRequest: function(e) { 11387 this.pending[e.name] || (this.pendingRequest++, this.pending[e.name] = !0) 11388 }, 11389 stopRequest: function(t, i) { 11390 this.pendingRequest--, this.pendingRequest < 0 && (this.pendingRequest = 0), delete this.pending[t.name], i && 0 === this.pendingRequest && this.formSubmitted && this.form() ? (e(this.currentForm).submit(), this.formSubmitted = !1) : !i && 0 === this.pendingRequest && this.formSubmitted && (e(this.currentForm).triggerHandler("invalid-form", [this]), this.formSubmitted = !1) 11391 }, 11392 previousValue: function(t) { 11393 return e.data(t, "previousValue") || e.data(t, "previousValue", { 11394 old: null, 11395 valid: !0, 11396 message: this.defaultMessage(t, "remote") 11397 }) 11398 }, 11399 destroy: function() { 11400 this.resetForm(), e(this.currentForm).off(".validate").removeData("validator") 11401 } 11402 }, 11403 classRuleSettings: { 11404 required: { 11405 required: !0 11406 }, 11407 email: { 11408 email: !0 11409 }, 11410 url: { 11411 url: !0 11412 }, 11413 date: { 11414 date: !0 11415 }, 11416 dateISO: { 11417 dateISO: !0 11418 }, 11419 number: { 11420 number: !0 11421 }, 11422 digits: { 11423 digits: !0 11424 }, 11425 creditcard: { 11426 creditcard: !0 11427 } 11428 }, 11429 addClassRules: function(t, i) { 11430 t.constructor === String ? this.classRuleSettings[t] = i : e.extend(this.classRuleSettings, t) 11431 }, 11432 classRules: function(t) { 11433 var i = {}, n = e(t).attr("class"); 11434 return n && e.each(n.split(" "), function() { 11435 this in e.validator.classRuleSettings && e.extend(i, e.validator.classRuleSettings[this]) 11436 }), i 11437 }, 11438 normalizeAttributeRule: function(e, t, i, n) { 11439 /min|max/.test(i) && (null === t || /number|range|text/.test(t)) && (n = Number(n), isNaN(n) && (n = void 0)), n || 0 === n ? e[i] = n : t === i && "range" !== t && (e[i] = !0) 11440 }, 11441 attributeRules: function(t) { 11442 var i, n, r = {}, a = e(t), 11443 s = t.getAttribute("type"); 11444 for (i in e.validator.methods) "required" === i ? (n = t.getAttribute(i), "" === n && (n = !0), n = !! n) : n = a.attr(i), this.normalizeAttributeRule(r, s, i, n); 11445 return r.maxlength && /-1|2147483647|524288/.test(r.maxlength) && delete r.maxlength, r 11446 }, 11447 dataRules: function(t) { 11448 var i, n, r = {}, a = e(t), 11449 s = t.getAttribute("type"); 11450 for (i in e.validator.methods) n = a.data("rule" + i.charAt(0).toUpperCase() + i.substring(1).toLowerCase()), this.normalizeAttributeRule(r, s, i, n); 11451 return r 11452 }, 11453 staticRules: function(t) { 11454 var i = {}, n = e.data(t.form, "validator"); 11455 return n.settings.rules && (i = e.validator.normalizeRule(n.settings.rules[t.name]) || {}), i 11456 }, 11457 normalizeRules: function(t, i) { 11458 return e.each(t, function(n, r) { 11459 if (r === !1) return void delete t[n]; 11460 if (r.param || r.depends) { 11461 var a = !0; 11462 switch (typeof r.depends) { 11463 case "string": 11464 a = !! e(r.depends, i.form).length; 11465 break; 11466 case "function":
vendor: 2,175 bytes, lines 11467-11504
11467 a = r.depends.call(i, i) 11468 } 11469 a ? t[n] = void 0 === r.param || r.param : delete t[n] 11470 } 11471 }), e.each(t, function(n, r) { 11472 t[n] = e.isFunction(r) ? r(i) : r 11473 }), e.each(["minlength", "maxlength"], function() { 11474 t[this] && (t[this] = Number(t[this])) 11475 }), e.each(["rangelength", "range"], function() { 11476 var i; 11477 t[this] && (e.isArray(t[this]) ? t[this] = [Number(t[this][0]), Number(t[this][1])] : "string" == typeof t[this] && (i = t[this].replace(/[\[\]]/g, "").split(/[\s,]+/), t[this] = [Number(i[0]), Number(i[1])])) 11478 }), e.validator.autoCreateRanges && (null != t.min && null != t.max && (t.range = [t.min, t.max], delete t.min, delete t.max), null != t.minlength && null != t.maxlength && (t.rangelength = [t.minlength, t.maxlength], delete t.minlength, delete t.maxlength)), t 11479 }, 11480 normalizeRule: function(t) { 11481 if ("string" == typeof t) { 11482 var i = {}; 11483 e.each(t.split(/\s/), function() { 11484 i[this] = !0 11485 }), t = i 11486 } 11487 return t 11488 }, 11489 addMethod: function(t, i, n) { 11490 e.validator.methods[t] = i, e.validator.messages[t] = void 0 !== n ? n : e.validator.messages[t], i.length < 3 && e.validator.addClassRules(t, e.validator.normalizeRule(t)) 11491 }, 11492 methods: { 11493 required: function(t, i, n) { 11494 if (!this.depend(n, i)) return "dependency-mismatch"; 11495 if ("select" === i.nodeName.toLowerCase()) { 11496 var r = e(i).val(); 11497 return r && r.length > 0 11498 } 11499 return this.checkable(i) ? this.getLength(t, i) > 0 : t.length > 0 11500 }, 11501 email: function(e, t) { 11502 return this.optional(t) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e) 11503 }, 11504 url: function(e, t) {
11505 return this.optional(t) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(e) 11506 }, 11507 date: function(e, t) { 11508 return this.optional(t) || !/Invalid|NaN/.test(new Date(e).toString()) 11509 }, 11510 dateISO: function(e, t) { 11511 return this.optional(t) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(e) 11512 }, 11513 number: function(e, t) { 11514 return this.optional(t) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(e) 11515 }, 11516 digits: function(e, t) { 11517 return this.optional(t) || /^\d+$/.test(e) 11518 }, 11519 creditcard: function(e, t) { 11520 if (this.optional(t)) return "dependency-mismatch"; 11521 if (/[^0-9 \-]+/.test(e)) return !1; 11522 var i, n, r = 0, 11523 a = 0, 11524 s = !1; 11525 if (e = e.replace(/\D/g, ""), e.length < 13 || e.length > 19) return !1; 11526 for (i = e.length - 1; i >= 0; i--) n = e.charAt(i), a = parseInt(n, 10), s && (a *= 2) > 9 && (a -= 9), r += a, s = !s; 11527 return r % 10 === 0 11528 }, 11529 minlength: function(t, i, n) { 11530 var r = e.isArray(t) ? t.length : this.getLength(t, i); 11531 return this.optional(i) || r >= n 11532 }, 11533 maxlength: function(t, i, n) { 11534 var r = e.isArray(t) ? t.length : this.getLength(t, i); 11535 return this.optional(i) || n >= r 11536 }, 11537 rangelength: function(t, i, n) { 11538 var r = e.isArray(t) ? t.length : this.getLength(t, i); 11539 return this.optional(i) || r >= n[0] && r <= n[1] 11540 }, 11541 min: function(e, t, i) { 11542 return this.optional(t) || e >= i 11543 }, 11544 max: function(e, t, i) { 11545 return this.optional(t) || i >= e 11546 }, 11547 range: function(e, t, i) { 11548 return this.optional(t) || e >= i[0] && e <= i[1] 11549 }, 11550 equalTo: function(t, i, n) { 11551 var r = e(n); 11552 return this.settings.onfocusout && r.off(".validate-equalTo").on("blur.validate-equalTo", function() { 11553 e(i).valid() 11554 }), t === r.val() 11555 }, 11556 remote: function(t, i, n) { 11557 if (this.optional(i)) return "dependency-mismatch"; 11558 var r, a, s = this.previousValue(i); 11559 return this.settings.messages[i.name] || (this.settings.messages[i.name] = {}), s.originalMessage = this.settings.messages[i.name].remote, this.settings.messages[i.name].remote = s.message, n = "string" == typeof n && { 11560 url: n 11561 } || n, s.old === t ? s.valid : (s.old = t, r = this, this.startRequest(i), a = {}, a[i.name] = t, e.ajax(e.extend(!0, { 11562 mode: "abort", 11563 port: "validate" + i.name, 11564 dataType: "json", 11565 data: a, 11566 context: r.currentForm, 11567 success: function(n) { 11568 var a, o, l, u = n === !0 || "true" === n; 11569 r.settings.messages[i.name].remote = s.originalMessage, u ? (l = r.formSubmitted, r.prepareElement(i), r.formSubmitted = l, r.successList.push(i), delete r.invalid[i.name], r.showErrors()) : (a = {}, o = n || r.defaultMessage(i, "remote"), a[i.name] = s.message = e.isFunction(o) ? o(t) : o, r.invalid[i.name] = !0, r.showErrors(a)), s.valid = u, r.stopRequest(i, u) 11570 } 11571 }, n)), "pending") 11572 } 11573 } 11574 });
11575 var t, i = {}; 11576 e.ajaxPrefilter ? e.ajaxPrefilter(function(e, t, n) { 11577 var r = e.port; 11578 "abort" === e.mode && (i[r] && i[r].abort(), i[r] = n) 11579 }) : (t = e.ajax, e.ajax = function(n) { 11580 var r = ("mode" in n ? n : e.ajaxSettings).mode, 11581 a = ("port" in n ? n : e.ajaxSettings).port; 11582 return "abort" === r ? (i[a] && i[a].abort(), i[a] = t.apply(this, arguments), i[a]) : t.apply(this, arguments) 11583 }) 11584}); 11585 11586/*! 11587 * Masonry PACKAGED v3.2.2 11588 * Cascading grid layout library 11589 * http://masonry.desandro.com 11590 * MIT License 11591 * by David DeSandro 11592 */ 11593 11594!function(a){function b(){}function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})}function e(b,c){a.fn[b]=function(e){if("string"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}return this}return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}}if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c("object"==typeof exports?require("jquery"):a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(this),function(a){function b(a){"function"==typeof a&&(b.isReady?a():g.push(a))}function c(a){var c="readystatechange"===a.type&&"complete"!==f.readyState;b.isReady||c||d()}function d(){b.isReady=!0;for(var a=0,c=g.length;c>a;a++){var d=g[a];d()}}function e(e){return"complete"===f.readyState?d():(e.bind(f,"DOMContentLoaded",c),e.bind(f,"readystatechange",c),e.bind(a,"load",c)),b}var f=a.document,g=[];b.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],e):"object"==typeof exports?module.exports=e(require("eventie")):a.docReady=e(a.eventie)}(window),function(){function a(){}function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}function c(a){return function(){return this[a].apply(this,arguments)}}var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;b<a.length;b+=1)c.push(a[b].listener);return c},d.getListenersAsObject=function(a){var b,c=this.getListeners(a);return c instanceof Array&&(b={},b[a]=c),b||c},d.addListener=function(a,c){var d,e=this.getListenersAsObject(a),f="object"==typeof c;for(d in e)e.hasOwnProperty(d)&&-1===b(e[d],c)&&e[d].push(f?c:{listener:c,once:!1});return this},d.on=c("addListener"),d.addOnceListener=function(a,b){return this.addListener(a,{listener:b,once:!0})},d.once=c("addOnceListener"),d.defineEvent=function(a){return this.getListeners(a),this},d.defineEvents=function(a){for(var b=0;b<a.length;b+=1)this.defineEvent(a[b]);return this},d.removeListener=function(a,c){var d,e,f=this.getListenersAsObject(a);for(e in f)f.hasOwnProperty(e)&&(d=b(f[e],c),-1!==d&&f[e].splice(d,1));return this},d.off=c("removeListener"),d.addListeners=function(a,b){return this.manipulateListeners(!1,a,b)},d.removeListeners=function(a,b){return this.manipulateListeners(!0,a,b)},d.manipulateListeners=function(a,b,c){var d,e,f=a?this.removeListener:this.addListener,g=a?this.removeListeners:this.addListeners;if("object"!=typeof b||b instanceof RegExp)for(d=c.length;d--;)f.call(this,b,c[d]);
11594else for(d in b)b.hasOwnProperty(d)&&(e=b[d])&&("function"==typeof e?f.call(this,d,e):g.call(this,d,e));return this},d.removeEvent=function(a){var b,c=typeof a,d=this._getEvents();if("string"===c)delete d[a];else if(a instanceof RegExp)for(b in d)d.hasOwnProperty(b)&&a.test(b)&&delete d[b];else delete this._events;return this},d.removeAllListeners=c("removeEvent"),d.emitEvent=function(a,b){var c,d,e,f,g=this.getListenersAsObject(a);for(e in g)if(g.hasOwnProperty(e))for(d=g[e].length;d--;)c=g[e][d],c.once===!0&&this.removeListener(a,c.listener),f=c.listener.apply(this,b||[]),f===this._getOnceReturnValue()&&this.removeListener(a,c.listener);return this},d.trigger=c("emitEvent"),d.emit=function(a){var b=Array.prototype.slice.call(arguments,1);return this.emitEvent(a,b)},d.setOnceReturnValue=function(a){return this._onceReturnValue=a,this},d._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},d._getEvents=function(){return this._events||(this._events={})},a.noConflict=function(){return e.EventEmitter=f,a},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return a}):"object"==typeof module&&module.exports?module.exports=a:e.EventEmitter=a}.call(this),function(a){function b(a){if(a){if("string"==typeof d[a])return a;a=a.charAt(0).toUpperCase()+a.slice(1);for(var b,e=0,f=c.length;f>e;e++)if(b=c[e]+a,"string"==typeof d[b])return b}}var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a){function b(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}function c(){}function d(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=g.length;c>b;b++){var d=g[b];a[d]=0}return a}function e(c){function e(){if(!m){m=!0;var d=a.getComputedStyle;if(j=function(){var a=d?function(a){return d(a,null)}:function(a){return a.currentStyle};return function(b){var c=a(b);return c||f("Style returned "+c+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),c}}(),k=c("boxSizing")){var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style[k]="border-box";var g=document.body||document.documentElement;g.appendChild(e);var h=j(e);l=200===b(h.width),g.removeChild(e)}}}function h(a){if(e(),"string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var c=j(a);if("none"===c.display)return d();var f={};f.width=a.offsetWidth,f.height=a.offsetHeight;for(var h=f.isBorderBox=!(!k||!c[k]||"border-box"!==c[k]),m=0,n=g.length;n>m;m++){var o=g[m],p=c[o];p=i(a,p);var q=parseFloat(p);f[o]=isNaN(q)?0:q}var r=f.paddingLeft+f.paddingRight,s=f.paddingTop+f.paddingBottom,t=f.marginLeft+f.marginRight,u=f.marginTop+f.marginBottom,v=f.borderLeftWidth+f.borderRightWidth,w=f.borderTopWidth+f.borderBottomWidth,x=h&&l,y=b(c.width);y!==!1&&(f.width=y+(x?0:r+v));var z=b(c.height);return z!==!1&&(f.height=z+(x?0:s+w)),f.innerWidth=f.width-(r+v),f.innerHeight=f.height-(s+w),f.outerWidth=f.width+t,f.outerHeight=f.height+u,f}}function i(b,c){if(a.getComputedStyle||-1===c.indexOf("%"))return c;var d=b.style,e=d.left,f=b.runtimeStyle,g=f&&f.left;return g&&(f.left=b.currentStyle.left),d.left=c,c=d.pixelLeft,d.left=e,g&&(f.left=g),c}var j,k,l,m=!1;return h}var f="undefined"==typeof console?c:function(a){console.error(a)},g=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],e):"object"==typeof exports?module.exports=e(require("desandro-get-style-property")):a.getSize=e(a.getStyleProperty)}(window),function(a){function b(a,b){return a[g](b)}function c(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}function d(a,b){c(a);for(var d=a.parentNode.querySelectorAll(b),e=0,f=d.length;f>e;e++)if(d[e]===a)return!0;return!1}function e(a,d){return c(a),b(a,d)}var f,g=function(){if(a.matchesSelector)return"matchesSelector";for(var b=["webkit","moz","ms","o"],c=0,d=b.length;d>c;c++){var e=b[c],f=e+"MatchesSelector";if(a[f])return f}}();if(g){var h=document.createElement("div"),i=b(h,"div");f=i?b:e}else f=d;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return f}):"object"==typeof exports?module.exports=f:window.matchesSelector=f}(Element.prototype),function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}function c(a){for(var b in a)return!1;return b=null,!0}function d(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function e(a,e,f){function h(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}var i=f("transition"),j=f("transform"),k=i&&j,l=!!f("perspective"),m={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[i],n=["transform","transition","transitionDuration","transitionProperty"],o=function(){for(var a={},b=0,c=n.length;c>b;b++){var d=n[b],e=f(d);e&&e!==d&&(a[d]=e)}return a}();b(h.prototype,a.prototype),h.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},h.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},h.prototype.getSize=function(){this.size=e(this.element)},h.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=o[c]||c;b[d]=a[c]}},h.prototype.getPosition=function(){var a=g(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=parseInt(a[c?"left":"right"],10),f=parseInt(a[d?"top":"bottom"],10);e=isNaN(e)?0:e,f=isNaN(f)?0:f;var h=this.layout.size;e-=c?h.paddingLeft:h.paddingRight,f-=d?h.paddingTop:h.paddingBottom,this.position.x=e,this.position.y=f},h.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={};b.isOriginLeft?(c.left=this.position.x+a.paddingLeft+"px",c.right=""):(c.right=this.position.x+a.paddingRight+"px",c.left=""),b.isOriginTop?(c.top=this.position.y+a.paddingTop+"px",c.bottom=""):(c.bottom=this.position.y+a.paddingBottom+"px",c.top=""),this.css(c),this.emitEvent("layout",[this])};var p=l?function(a,b){return"translate3d("+a+"px, "+b+"px, 0)"}:function(a,b){return"translate("+a+"px, "+b+"px)"};h.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={},k=this.layout.options;h=k.isOriginLeft?h:-h,i=k.isOriginTop?i:-i,j.transform=p(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},h.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()}
11594,h.prototype.moveTo=k?h.prototype._transitionTo:h.prototype.goTo,h.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},h.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},h.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null}this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var q=j&&d(j)+",opacity";h.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:q,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(m,this,!1))},h.prototype.transition=h.prototype[i?"_transition":"_nonTransition"],h.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},h.prototype.onotransitionend=function(a){this.ontransitionend(a)};var r={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};h.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,d=r[a.propertyName]||a.propertyName;if(delete b.ingProperties[d],c(b.ingProperties)&&this.disableTransition(),d in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[d]),d in b.onEnd){var e=b.onEnd[d];e.call(this),delete b.onEnd[d]}this.emitEvent("transitionEnd",[this])}},h.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(m,this,!1),this.isTransitioning=!1},h.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var s={transitionProperty:"",transitionDuration:""};return h.prototype.removeTransitionStyles=function(){this.css(s)},h.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.emitEvent("remove",[this])},h.prototype.remove=function(){if(!i||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.on("transitionEnd",function(){return a.removeElem(),!0}),this.hide()},h.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options;this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0})},h.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options;this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:{opacity:function(){this.isHidden&&this.css({display:"none"})}}})},h.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},h}var f=a.getComputedStyle,g=f?function(a){return f(a,null)}:function(a){return a.currentStyle};"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property"],e):"object"==typeof exports?module.exports=e(require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property")):(a.Outlayer={},a.Outlayer.Item=e(a.EventEmitter,a.getSize,a.getStyleProperty))}(window),function(a){function b(a,b){for(var c in b)a[c]=b[c];return a}function c(a){return"[object Array]"===l.call(a)}function d(a){var b=[];if(c(a))b=a;else if(a&&"number"==typeof a.length)for(var d=0,e=a.length;e>d;d++)b.push(a[d]);else b.push(a);return b}function e(a,b){var c=n(b,a);-1!==c&&b.splice(c,1)}function f(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()}function g(c,g,l,n,o,p){function q(a,c){if("string"==typeof a&&(a=h.querySelector(a)),!a||!m(a))return void(i&&i.error("Bad "+this.constructor.namespace+" element: "+a));this.element=a,this.options=b({},this.constructor.defaults),this.option(c);var d=++r;this.element.outlayerGUID=d,s[d]=this,this._create(),this.options.isInitLayout&&this.layout()}var r=0,s={};return q.namespace="outlayer",q.Item=p,q.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},b(q.prototype,l.prototype),q.prototype.option=function(a){b(this.options,a)},q.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),b(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},q.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},q.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)}return d},q.prototype._filterFindItemElements=function(a){a=d(a);for(var b=this.options.itemSelector,c=[],e=0,f=a.length;f>e;e++){var g=a[e];if(m(g))if(b){o(g,b)&&c.push(g);for(var h=g.querySelectorAll(b),i=0,j=h.length;j>i;i++)c.push(h[i])}else c.push(g)}return c},q.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},q.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},q.prototype._init=q.prototype.layout,q.prototype._resetLayout=function(){this.get
11594Size()},q.prototype.getSize=function(){this.size=n(this.element)},q.prototype._getMeasurement=function(a,b){var c,d=this.options[a];d?("string"==typeof d?c=this.element.querySelector(d):m(d)&&(c=d),this[a]=c?n(c)[b]:d):this[a]=0},q.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},q.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)}return b},q.prototype._layoutItems=function(a,b){function c(){d.emitEvent("layoutComplete",[d,a])}var d=this;if(!a||!a.length)return void c();this._itemsOn(a,"layout",c);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f],i=this._getItemLayoutPosition(h);i.item=h,i.isInstant=b||h.isLayoutInstant,e.push(i)}this._processLayoutQueue(e)},q.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},q.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},q.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},q.prototype._postLayout=function(){this.resizeContainer()},q.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},q.prototype._getContainerSize=k,q.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},q.prototype._itemsOn=function(a,b,c){function d(){return e++,e===f&&c.call(g),!0}for(var e=0,f=a.length,g=this,h=0,i=a.length;i>h;h++){var j=a[h];j.on(b,d)}},q.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},q.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},q.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},q.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e(d,this.stamps),this.unignore(d)}},q.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=d(a)):void 0},q.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},q.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},q.prototype._manageStamp=k,q.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,d=n(a),e={left:b.left-c.left-d.marginLeft,top:b.top-c.top-d.marginTop,right:c.right-b.right-d.marginRight,bottom:c.bottom-b.bottom-d.marginBottom};return e},q.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},q.prototype.bindResize=function(){this.isResizeBound||(c.bind(a,"resize",this),this.isResizeBound=!0)},q.prototype.unbindResize=function(){this.isResizeBound&&c.unbind(a,"resize",this),this.isResizeBound=!1},q.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},q.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},q.prototype.needsResizeLayout=function(){var a=n(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},q.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},q.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},q.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},q.prototype.reveal=function(a){var b=a&&a.length;if(b)for(var c=0;b>c;c++){var d=a[c];d.reveal()}},q.prototype.hide=function(a){var b=a&&a.length;if(b)for(var c=0;b>c;c++){var d=a[c];d.hide()}},q.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}}
11594,q.prototype.getItems=function(a){if(a&&a.length){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c],f=this.getItem(e);f&&b.push(f)}return b}},q.prototype.remove=function(a){a=d(a);var b=this.getItems(a);if(b&&b.length){this._itemsOn(b,"remove",function(){this.emitEvent("removeComplete",[this,b])});for(var c=0,f=b.length;f>c;c++){var g=b[c];g.remove(),e(g,this.items)}}},q.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()}this.unbindResize();var e=this.element.outlayerGUID;delete s[e],delete this.element.outlayerGUID,j&&j.removeData(this.element,this.constructor.namespace)},q.data=function(a){var b=a&&a.outlayerGUID;return b&&s[b]},q.create=function(a,c){function d(){q.apply(this,arguments)}return Object.create?d.prototype=Object.create(q.prototype):b(d.prototype,q.prototype),d.prototype.constructor=d,d.defaults=b({},q.defaults),b(d.defaults,c),d.prototype.settings={},d.namespace=a,d.data=q.data,d.Item=function(){p.apply(this,arguments)},d.Item.prototype=new p,g(function(){for(var b=f(a),c=h.querySelectorAll(".js-"+b),e="data-"+b+"-options",g=0,k=c.length;k>g;g++){var l,m=c[g],n=m.getAttribute(e);try{l=n&&JSON.parse(n)}catch(o){i&&i.error("Error parsing "+e+" on "+m.nodeName.toLowerCase()+(m.id?"#"+m.id:"")+": "+o);continue}var p=new d(m,l);j&&j.data(m,a,p)}}),j&&j.bridget&&j.bridget(a,d),d},q.Item=p,q}var h=a.document,i=a.console,j=a.jQuery,k=function(){},l=Object.prototype.toString,m="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1===a.nodeType&&"string"==typeof a.nodeName},n=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1};"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","doc-ready/doc-ready","eventEmitter/EventEmitter","get-size/get-size","matches-selector/matches-selector","./item"],g):"object"==typeof exports?module.exports=g(require("eventie"),require("doc-ready"),require("wolfy87-eventemitter"),require("get-size"),require("desandro-matches-selector"),require("./item")):a.Outlayer=g(a.eventie,a.docReady,a.EventEmitter,a.getSize,a.matchesSelector,a.Outlayer.Item)}(window),function(a){function b(a,b){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth}this.columnWidth+=this.gutter,this.cols=Math.floor((this.containerWidth+this.gutter)/this.columnWidth),this.cols=Math.max(this.cols,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)}return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);
11594var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d}var c=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++){var e=a[c];if(e===b)return c}return-1};"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size"],b):"object"==typeof exports?module.exports=b(require("outlayer"),require("get-size")):a.Masonry=b(a.Outlayer,a.getSize)}(window); 11595 11596/* equal height */ 11597 11598(function(a) { 11599 a.fn.equalizeHeight = function() { 11600 var b = this.length; 11601 var g = true; 11602 var j = 0; 11603 var i = 0; 11604 var h = 0; 11605 var f = this; 11606 var c = 1; 11607 var e = 0; 11608 this.each(function() { 11609 var k = a(this); 11610 k.height("auto"); 11611 if (g) { 11612 g = false; 11613 i = k.offset().top 11614 } 11615 e++; 11616 j = k.offset().top; 11617 if (i == j) { 11618 if (k.height() > h) { 11619 h = k.height() 11620 } 11621 } else { 11622 d(c, e - 1, h, k); 11623 h = 0; 11624 if (k.height() > h) { 11625 h = k.height() 11626 } 11627 } 11628 if (e == b) { 11629 d(c, e, h, k) 11630 } 11631 }); 11632 function d(k, l, n, o) { 11633 for (var m = k; m <= l; m++) { 11634 f.eq(m - 1).height(n) 11635 } 11636 i = o.offset().top; 11637 h = 0; 11638 c = l + 1 11639 } 11640 return f 11641 } 11642})(jQuery); 11643 11644$(window).load(function() { 11645 if ($(".equal-height").length) { 11646 $(".equal-height").find(".equal-item").equalizeHeight(); 11647 $(window).resize(function() { 11648 $(".equal-height").find(".equal-item").equalizeHeight() 11649 }) 11650 } 11651}); 11652 11653CustomEase.create("custom1", ".01, .52, .16, .98"); 11654CustomEase.create("custom2", "0.36, 0.01, 0.29, 0.99"); 11655CustomEase.create("custom3", "0, 0.5, 0.5, 1"); 11656CustomEase.create("custom4", ".645,.045,.355,1"); 11657 11658$(window).load(function() { 11659 "use strict"; 11660 setTimeout(initializeMasonry, 1000); 11661 11662 function initializeMasonry(){ 11663 $('.masonry').each(function(){ 11664 var container = $(this).get(0); 11665 var msnry = new Masonry(container, { 11666 itemSelector: '.masonry-item' 11667 }); 11668 11669 msnry.on('layoutComplete', function() { 11670 11671 11672 // Fix floating project filters to bottom of projects container 11673 11674 if ($('.filters.floating').length) { 11675 setupFloatingProjectFilters(); 11676 updateFloatingFilters(); 11677 window.addEventListener("scroll", updateFloatingFilters, false); 11678 } 11679 11680 $('.masonry-loader').addClass('fadeOut'); 11681 masonryEffect(); 11682 }); 11683 11684 msnry.layout(); 11685 }); 11686 } 11687 11688 function masonryEffect() { 11689 var $items = $('.masonry-effect .masonry-item'); 11690 var time = 0; 11691 11692 $items.each(function() { 11693 var item = $(this); 11694 setTimeout(function() { 11695 item.children('div').addClass('inView'); 11696 }, time); 11697 time += 200; 11698 }); 11699 } 11700 11701 var controller = new ScrollMagic.Controller(); 11702 var animateBox = $(".animate-box, .transeffect, .ldt"); 11703 animateBox.each(function() { 11704 new ScrollMagic.Scene({ 11705 triggerElement: this, 11706 reverse: !1, 11707 triggerHook: 1, 11708 offset: 95 11709 }).setClassToggle(this, 'inView').addTo(controller); 11710 }); 11711 11712 11713 11714 /*var target = $(".main_about figure"); 11715 TweenMax.set($(".main_about figure img"),{visibility:"hidden"}); 11716 target.each(function() { 11717 var tl = new TimelineLite(); 11718 var $this = $(this) 11719 var e = tl.to($(this).find('.mask'), .6, {css:{width:"100%"},ease: "custom2",delay:0,onComplete:function(){ 11720 $this.addClass('inView'); 11721 console.log($(this)); 11722 $this.find('img').css("visibility", "visible"); 11723 }}).to($(this).find('.mask'), .8, { 11724 css: { 11725 x: "101%" 11726 }, 11727 ease: "custom2", 11728 delay: 0 11729 }, "-=0"); 11730 new ScrollMagic.Scene({ 11731 triggerElement: this, 11732 reverse: !1, 11733 triggerHook: 1, 11734 offset: 100 11735 }).setTween(e).addTo(controller) 11736 }); */ 11737 11738 11739 if($(".animate-delay").length){ 11740 var e = 0, 11741 ele = $(".animate-delay"); 11742 ele.waypoint(function(aniDelay) { 11743 "down" !== aniDelay || $(this.element).hasClass("inView") || (e++, 11744 $(this.element).addClass("item-animate"), 11745 setTimeout(function() { 11746 $(".animate-delay.item-animate").each(function(e) { 11747 var $this; 11748 $this = $(this), 11749 setTimeout(function() { 11750 var e; 11751 e = $this.data("animate-effect"), 11752 "fadeIn" === e ? $this.addClass("inView") : $this.addClass("inView"), 11753 $this.removeClass("item-animate") 11754 }, 200 * e, "easeInOutExpo") 11755 }) 11756 }
11756, 30)) 11757 }, { 11758 offset: "98%" 11759 }); 11760 } 11761 11762 var repStr = $('.rep_str'); 11763 11764 repStr.each(function (i, e) { 11765 var $e = $(e); 11766 var surroundClass = 'char'; 11767 var text = $e.text().trim(); 11768 var inner = ''; 11769 for (var i = 0, len = text.length; i < len; i++) { 11770 inner += '<span class="' + surroundClass + '">' + text[i] + '</span>'; 11771 } 11772 $e.empty().wrapInner(inner); 11773 }); 11774 var bgLayer = $(".bg_layer"); 11775 TweenMax.set(bgLayer,{width:0}); 11776 bgLayer.each(function() { 11777 var e = TweenMax.to($(this), 1.5, { 11778 css: { 11779 width: "100%", 11780 }, 11781 ease: "Expo.easeInOut", 11782 delay: 0 11783 }); 11784 new ScrollMagic.Scene({ 11785 triggerElement: this, 11786 reverse: !1, 11787 triggerHook: 1, 11788 offset: 100 11789 }).setTween(e).addTo(controller) 11790 }); 11791 var el = $(".suffle_fade"); 11792 el.each(function() { 11793 var e = TweenMax.staggerFrom(_.shuffle($(this).find("span")), 1.5, { 11794 css: { 11795 x: 0, 11796 y:"60%", 11797 autoAlpha: 0 11798 }, 11799 ease: "easeOutCubic", 11800 delay: 0 11801 }, .06); 11802 new ScrollMagic.Scene({ 11803 triggerElement: this, 11804 reverse: !1, 11805 triggerHook: 1, 11806 offset: 80 11807 }).setTween(e).addTo(controller) 11808 }); 11809 11810 /*var t = this; 11811 o.fromTo(this.target, 1.2, { 11812 y: -100, 11813 autoAlpha: 0 11814 }, { 11815 y: 0, 11816 autoAlpha: 1, 11817 ease: Power3.easeOut, 11818 delay: .1 * this.delay 11819 }), 11820 o.fromTo(this.$mask, .6, { 11821 height: "0%" 11822 }, { 11823 height: "100%", 11824 ease: Power3.easeOut, 11825 delay: .1 * this.delay, 11826 onComplete: function() { 11827 s(t.target).addClass("is-showed"), 11828 t.showBody() 11829 } 11830 })*/ 11831 11832});
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.