blob: 005b567c281c1807af9c9ca50f98ce214f622503 [file] [log] [blame]
(function(){var f=this;
function k(a){var c=typeof a;if("object"==c)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return c;var b=Object.prototype.toString.call(a);if("[object Window]"==b)return"object";if("[object Array]"==b||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==b||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==
c&&"undefined"==typeof a.call)return"object";return c}function l(a,c,b){return a.call.apply(a.bind,arguments)}function m(a,c,b){if(!a)throw Error();if(2<arguments.length){var e=Array.prototype.slice.call(arguments,2);return function(){var b=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(b,e);return a.apply(c,b)}}return function(){return a.apply(c,arguments)}}
function q(a,c,b){q=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?l:m;return q.apply(null,arguments)};var r=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")};function t(a,c){return a<c?-1:a>c?1:0}function u(a){var c=Number(a);return 0==c&&/^[\s\xa0]*$/.test(a)?NaN:c};var v;a:{var w=f.navigator;if(w){var x=w.userAgent;if(x){v=x;break a}}v=""};var y=-1!=v.indexOf("Opera")||-1!=v.indexOf("OPR"),z=-1!=v.indexOf("Trident")||-1!=v.indexOf("MSIE"),A=-1!=v.indexOf("Gecko")&&-1==v.toLowerCase().indexOf("webkit")&&!(-1!=v.indexOf("Trident")||-1!=v.indexOf("MSIE")),B=-1!=v.toLowerCase().indexOf("webkit"),C=B&&-1!=v.indexOf("Mobile");function D(){var a=f.document;return a?a.documentMode:void 0}
var E=function(){var a="",c;if(y&&f.opera)return a=f.opera.version,"function"==k(a)?a():a;A?c=/rv\:([^\);]+)(\)|;)/:z?c=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:B&&(c=/WebKit\/(\S+)/);c&&(a=(a=c.exec(v))?a[1]:"");return z&&(c=D(),c>parseFloat(a))?String(c):a}(),F={};
function G(a){if(!F[a]){for(var c=0,b=r(String(E)).split("."),e=r(String(a)).split("."),d=Math.max(b.length,e.length),g=0;0==c&&g<d;g++){var h=b[g]||"",Q=e[g]||"",R=RegExp("(\\d*)(\\D*)","g"),S=RegExp("(\\d*)(\\D*)","g");do{var n=R.exec(h)||["","",""],p=S.exec(Q)||["","",""];if(0==n[0].length&&0==p[0].length)break;c=t(0==n[1].length?0:parseInt(n[1],10),0==p[1].length?0:parseInt(p[1],10))||t(0==n[2].length,0==p[2].length)||t(n[2],p[2])}while(0==c)}F[a]=0<=c}}
var H=f.document,I=H&&z?D()||("CSS1Compat"==H.compatMode?parseInt(E,10):5):void 0;var J;if(!(J=!A&&!z)){var K;if(K=z)K=z&&9<=I;J=K}J||A&&G("1.9.1");z&&G("9");function L(a){return window.matchMedia("(-webkit-min-device-pixel-ratio: "+a+"),(min--moz-device-pixel-ratio: "+a+"),(min-resolution: "+a+"dppx)").matches?a:0};function M(a,c){this.a=a;this.b=c}function N(a){this.c=a;this.b=0;this.a=[]}function O(){this.a=[]}function P(a,c){var b=new Image;b.onload=function(){a.src=c};b.src=c}
O.prototype.b=function(){var a;a=document.documentElement.clientWidth/window.innerWidth;var c=window,b=A&&C;a=(void 0===c.devicePixelRatio||b?c.matchMedia?L(.75)||L(1.5)||L(2)||L(3)||1:1:c.devicePixelRatio)*a;c=this.a.length;for(b=0;b<c;++b){var e=this.a[b],d=a;if(d>e.b)for(var g=e.a.length,h=0;h<g;++h)if(d<=e.a[h].a){e.b=e.a[h].a;P(e.c,e.a[h].b);break}}};function T(a,c){var b=a.search(c);return-1==b?a.length:b}var U=/[ \t\n\f\r]/,V=/[^ \t\n\f\r]/,W=/[ \t\n\f\r,]/,X=/[^ \t\n\f\r,]/;
function Y(a,c,b){a=new N(a);var e=!1,d=T(b,X);for(b=b.slice(d);0<b.length;){var d=T(b,U),g=b.slice(0,d);b=b.slice(d);if(","==g[g.length-1])return null;d=T(b,V);b=b.slice(d);var d=T(b,W),h=b.slice(0,d);b=b.slice(d);if(1<h.length&&"x"==h[h.length-1]){d=u(h.slice(0,-1));if(isNaN(d))return null;a.a.push(new M(d,g));1==d&&(e=!0)}else return null;d=T(b,V);b=b.slice(d);if(0<b.length&&","!=b[0])return null;b=b.slice(1);d=T(b,X);b=b.slice(d)}!e&&c&&a.a.push(new M(1,c));a.a.sort(function(a,b){return a.a-b.a});
return a}(function(){for(var a=new O,c=document.getElementsByTagName("IMG"),b=0,e;e=c[b];++b){var d=e.getAttribute("src"),g=e.getAttribute("srcset");g&&(e=Y(e,d,g),null!=e&&a.a.push(e))}window.addEventListener("resize",q(a.b,a));window.addEventListener("touchmove",q(function(a){1<a.touches.length&&this.b()},a));a.b()})();})();