Current Directory: /home/astoriaah/www/old15/media/mod_zentools/js/responsive
Viewing File: /home/astoriaah/www/old15/media/mod_zentools/js/responsive/response.min.js
/*! Response 0.7.3 | @link responsejs.com | @author ryanve | @license MIT */
(function(e,p,k){var j=e.jQuery||e.Zepto||e.ender||e.elo;"undefined"!=typeof module&&module.exports?module.exports=k(j):e[p]=k(j)})(this,"Response",function(e){function p(){return q.clientWidth}function k(){return q.clientHeight}function j(a){throw new TypeError(a?l+"."+a:l);}function z(a){return"string"==typeof a?r(a.split(" ")):L(a)?r(a):[]}function i(a,b,c){if(null==a)return a;for(var d=0,g=a.length;d<g;)b.call(c||a[d],a[d],d++,a);return a}function M(a,b,c){for(var d=[],g=a.length,m=0,f,b=b||"",
c=c||"";m<g;)f=a[m++],null==f||d.push(b+f+c);return d}function r(a,b,c){var d,g=0,m=0,f,e=[],h,i="function"==typeof b;if(!a)return e;c=(h=!0===c)?null:c;for(d=a.length;m<d;m++)f=a[m],h===!(i?b.call(c,f,m,a):b?typeof f===b:f)&&(e[g++]=f);return e}function N(a,b){if(!a||!b)return a;var c,d=b.length;if("function"!=typeof b&&"number"==typeof d&&d===d){for(c=0;c<d;c++)void 0===b[c]||(a[c]=b[c]);a.length>c||(a.length=c)}else for(c in b)qa.call(b,c)&&void 0!==b[c]&&(a[c]=b[c]);return a}function t(a,b,c){if(null==
a)return a;"object"==typeof a&&!a.nodeType&&"number"==typeof a.length&&a.length===a.length?i(a,b,c):b.call(c||a,a);return a}function A(a){return function(b,c){var d,g=a();d=g>=(b||0);return!c?d:d&&g<=c}}function u(a){var b=s.devicePixelRatio;if(null==a)return b||(u(2)?2:u(1.5)?1.5:u(1)?1:0);if(!isFinite(a))return!1;if(b&&0<b)return b>=a;a="only all and (min--moz-device-pixel-ratio:"+a+")";return O(a).matches?!0:!!O(a.replace("-moz-","")).matches}function Y(a){return a.replace(P,"$1").replace(ra,function(a,
c){return c.toUpperCase()})}function B(a){return"data-"+(a?a.replace(P,"$1").replace(sa,"$1-$2").toLowerCase():a)}function Z(a){var b;return!a||"string"!=typeof a?a:"true"===a?!0:"false"===a?!1:"undefined"===a?b:"null"===a?null:(b=parseFloat(a))===+b?b:a}function C(a){return!a?!1:1===a.nodeType?a:a[0]&&1===a[0].nodeType?a[0]:!1}function D(a,b){var c=arguments.length,d=C(this),g={},e=!1,f;if(c){L(a)&&(e=!0,a=a[0]);if("string"===typeof a){a=B(a);if(1===c)return g=d.getAttribute(a),e?Z(g):g;if(this===
d||2>(f=this.length||1))d.setAttribute(a,b);else for(;f--;)f in this&&D.apply(this[f],arguments)}else if(a instanceof Object)for(f in a)a.hasOwnProperty(f)&&D.call(this,f,a[f]);return this}if(d.dataset&&DOMStringMap)return d.dataset;i(d.attributes,function(a){if(a&&(f=String(a.name).match(P)))g[Y(f[1])]=a.value});return g}function $(a){this&&"string"===typeof a&&(a=z(a),t(this,function(b){i(a,function(a){a&&b.removeAttribute(B(a))})}));return this}function E(a,b,c){return D.apply(a,ta.call(arguments,
1))}function aa(a,b){return $.call(a,b)}function ba(a){for(var b,c=[],d=0,g=a.length;d<g;)(b=a[d++])&&c.push("["+B(b.replace(Q,"").replace(".","\\."))+"]");return c.join()}function R(a,b){var c=a.getBoundingClientRect?a.getBoundingClientRect():{},b="number"==typeof b?b||0:0;return{top:(c.top||0)-b,left:(c.left||0)-b,bottom:(c.bottom||0)+b,right:(c.right||0)+b}}function S(a,b){var c=R(C(a),b);return!!c&&0<=c.bottom&&c.top<=k()&&0<=c.right&&c.left<=p()}function ca(a){var b={img:1,input:1,source:3,embed:3,
track:3,iframe:5,audio:5,video:5,script:5}[a.tagName.toLowerCase()]||-1;return 4>b?b:"string"===typeof a.getAttribute("src")?5:-5}function da(a,b,c){var d;(!a||null==b)&&j("store");c="string"==typeof c&&c;t(a,function(a){d=c?a.getAttribute(c):0<ca(a)?a.getAttribute("src"):a.innerHTML;null==d?aa(a,b):E(a,b,d)});return h}function T(a,b){var c=[];a&&b&&i(z(b),function(b){c.push(E(a,b))},a);return c}function U(a){v.on("resize",a);return h}function ea(a){t(a,function(a){"object"==typeof a||j("create @args");
var c=V(fa).configure(a),d,g=c.verge,a=c.breakpoints,e=F("scroll"),f=F("resize");a.length&&(d=a[0]||a[1]||!1,G(function(){function a(){c.reset();i(c.$e,function(a,b){c[b].decideValue().updateDOM()}).trigger(h)}function b(){i(c.$e,function(a,b){S(c[b].$e,g)&&c[b].updateDOM()})}var h=W.allLoaded,j=!!c.lazy;i(c.target().$e,function(a,b){c[b]=V(c).prepareData(a);(!j||S(c[b].$e,g))&&c[b].updateDOM()});c.dynamic&&(c.custom||d<w)&&U(a,f);j&&(v.on(e,b),c.$e.one(h,function(){v.off(e,b)}))}))});return h}function ga(a,
b){if("function"==typeof a&&a.fn){if(b||void 0===a.fn.dataset)a.fn.dataset=D;if(b||void 0===a.fn.deletes)a.fn.deletes=$;var c=a.fn;i(["inX","inY","inViewport"],function(d){(b||!c[d])&&(c[d]=function(b,c){return a(r(this,function(a){return!!a&&!c===h[d](a,b)}))})})}return h}if("function"!=typeof e)throw"Response unable to run due to missing dep.";var H=this,h,l="Response",ua=H[l],ha="init"+l,s=window,ia=document,q=ia.documentElement,G=e.domReady||e,v=e(s),x=s.screen,L=Array.isArray||function(a){return a instanceof
Array},qa={}.hasOwnProperty,ta=[].slice,va=[].concat,ja=[].map,ka=ja?function(a,b,c){return ja.call(a,b,c)}:function(a,b,c){var d,g=a.length,e=[];for(d=0;d<g;d++)d in a&&(e[d]=b.call(c,a[d],d,a));return e},la={width:[0,320,481,641,961,1025,1281],height:[0,481],ratio:[1,1.5,2]},fa,X,y={},n={},ma={},I={all:[]},wa=1,J=x.width,K=x.height,w=J>K?J:K,xa=J+K-w,na=function(){return J},oa=function(){return K},ya=/[^a-z0-9_\-\.]/gi,Q=/^[\W\s]+|[\W\s]+$|/g,sa=/([a-z])([A-Z])/g,ra=/-(.)/g,P=/^data-(.+)$/,O=s.matchMedia||
s.msMatchMedia||Object,V=Object.create||function(a){function b(){}b.prototype=a;return new b},F=function(a,b){b=b||l;return a.replace(Q,"")+"."+b.replace(Q,"")},W={allLoaded:F("allLoaded"),crossover:F("crossover")},x=A(p);X=A(k);y.band=A(na);y.wave=A(oa);var za=function(a){return"string"==typeof a?a.toLowerCase().replace(ya,""):""},pa=W.crossover,Aa=Math.min;fa={$e:0,mode:0,breakpoints:null,prefix:null,prop:"width",keys:[],dynamic:null,custom:0,values:[],fn:0,verge:null,newValue:0,currValue:1,aka:null,
lazy:null,i:0,uid:null,reset:function(){for(var a=this.breakpoints,b=a.length,c=0;!c&&b--;)this.fn(a[b])&&(c=b);c!==this.i&&(v.trigger(pa).trigger(this.prop+pa),this.i=c||0);return this},configure:function(a){N(this,a);var b,c,d=!0;b=this.prop;this.uid=wa++;this.verge=isFinite(this.verge)?this.verge:Aa(w,500);this.fn=n[b]||j("create @fn");"boolean"!=typeof this.dynamic&&(this.dynamic="device"!==b.substring(0,6));this.custom=ma[b];c=this.prefix?r(ka(z(this.prefix),za)):["min-"+b+"-"];a=1<c.length?
c.slice(1):0;this.prefix=c[0];c=this.breakpoints;L(c)?(i(c,function(a){if(!a&&0!==a)throw"invalid breakpoint";d=d&&isFinite(a)}),c=d?c.sort(function(a,b){return a-b}):c,c.length||j("create @breakpoints")):c=la[b]||la[b.split("-").pop()]||j("create @prop");this.breakpoints=d?r(c,function(a){return a<=w}):c;this.keys=M(this.breakpoints,this.prefix);this.aka=null;if(a){c=[];for(b=a.length;b--;)c.push(M(this.breakpoints,a[b]));this.aka=c;this.keys=va.apply(this.keys,c)}I.all=I.all.concat(I[this.uid]=
this.keys);return this},target:function(){this.$e=e(ba(I[this.uid]));da(this.$e,ha);this.keys.push(ha);return this},decideValue:function(){for(var a=null,b=this.breakpoints,c=b.length,d=c;null==a&&d--;)this.fn(b[d])&&(a=this.values[d]);this.newValue="string"===typeof a?a:this.values[c];return this},prepareData:function(a){this.$e=e(a);this.mode=ca(a);this.values=T(this.$e,this.keys);if(this.aka)for(a=this.aka.length;a--;)this.values=N(this.values,T(this.$e,this.aka[a]));return this.decideValue()},
updateDOM:function(){if(this.currValue===this.newValue)return this;this.currValue=this.newValue;0<this.mode?this.$e[0].setAttribute("src",this.newValue):null==this.newValue?this.$e.empty&&this.$e.empty():this.$e.html?this.$e.html(this.newValue):(this.$e.empty&&this.$e.empty(),this.$e[0].innerHTML=this.newValue);return this}};n.width=x;n.height=X;n["device-width"]=y.band;n["device-height"]=y.wave;n["device-pixel-ratio"]=u;h={deviceMin:function(){return xa},deviceMax:function(){return w},noConflict:function(a){H[l]===
h&&(H[l]=ua);"function"==typeof a&&a.call(H,h);return h},chain:function(a,b){a=arguments.length?a:e;return ga(a,b)},bridge:ga,create:ea,addTest:function(a,b){"string"==typeof a&&"function"==typeof b&&(n[a]=b,ma[a]=1);return h},datatize:B,camelize:Y,render:Z,store:da,access:T,target:function(a){return e(ba(z(a)))},object:V,crossover:function(a,b){var c,d=W.crossover;"function"==typeof a&&(c=b,b=a,a=c);v.on(a?""+a+d:d,b);return h},action:function(a){t(a,function(a){G(a);U(a)});return h},resize:U,ready:G,
affix:M,sift:r,dpr:u,deletes:aa,scrollX:function(){return window.pageXOffset||q.scrollLeft},scrollY:function(){return window.pageYOffset||q.scrollTop},deviceW:na,deviceH:oa,device:y,inX:function(a,b){var c=R(C(a),b);return!!c&&0<=c.right&&c.left<=p()},inY:function(a,b){var c=R(C(a),b);return!!c&&0<=c.bottom&&c.top<=k()},route:t,merge:N,media:O,wave:X,band:x,map:ka,each:i,inViewport:S,dataset:E,viewportH:k,viewportW:p};G(function(){var a,b=E(ia.body,"responsejs");b&&((a=!!s.JSON&&JSON.parse)?b=a(b):
e.parseJSON&&(b=e.parseJSON(b)),b&&b.create&&ea(b.create));q.className=q.className.replace(/(^|\s)(no-)?responsejs(\s|$)/,"$1$3")+" responsejs "});return h});