/* * Copyright 2013 Small Batch, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ ;(function(window,document,undefined){ var i=void 0,k=!0,m=null,n=!1;function p(a){return function(){return this[a]}}var q;function r(a,c,b){var d=2w';a.W=/top/.test(d.getElementsByTagName("a")[0].getAttribute("style"))}a.W?c.setAttribute("style",b):c.style.cssText=b}function A(a){var c=a.z.location.protocol;"about:"==c&&(c=a.G.location.protocol);return"https:"==c?"https:":"http:"};function B(a,c,b,d,e,f,g,j){this.Ca=a;this.Ia=c;this.qa=b;this.pa=d;this.Fa=e;this.Ea=f;this.oa=g;this.Ja=j}q=B.prototype;q.getName=p("Ca");q.ya=p("Ia");q.Z=p("qa");q.va=p("pa");q.wa=p("Fa");q.xa=p("Ea");q.ua=p("oa");q.w=p("Ja");function C(a,c){this.a=a;this.o=c}var ea=new B("Unknown","Unknown","Unknown","Unknown","Unknown","Unknown",i,n); C.prototype.parse=function(){var a;if(-1!=this.a.indexOf("MSIE")){a=D(this);var c=E(this),b=F(this.a,/(MSIE [\d\w\.]+)/,1);if(""!=b){var d=b.split(" "),b=d[0],d=d[1],e=G(d),f=G(c);a=new B(b,d,b,d,a,c,H(this.o),"Windows"==a&&6<=e||"Windows Phone"==a&&8<=f)}else a=new B("MSIE","Unknown","MSIE","Unknown",a,c,H(this.o),n)}else if(-1!=this.a.indexOf("Opera"))a:if(c=a="Unknown",b=F(this.a,/(Presto\/[\d\w\.]+)/,1),""!=b?(c=b.split("/"),a=c[0],c=c[1]):(-1!=this.a.indexOf("Gecko")&&(a="Gecko"),b=F(this.a, /rv:([^\)]+)/,1),""!=b&&(c=b)),-1!=this.a.indexOf("Opera Mini/"))b=F(this.a,/Opera Mini\/([\d\.]+)/,1),""==b&&(b="Unknown"),a=new B("OperaMini",b,a,c,D(this),E(this),H(this.o),n);else{if(-1!=this.a.indexOf("Version/")&&(b=F(this.a,/Version\/([\d\.]+)/,1),""!=b)){a=new B("Opera",b,a,c,D(this),E(this),H(this.o),10<=G(b));break a}b=F(this.a,/Opera[\/ ]([\d\.]+)/,1);a=""!=b?new B("Opera",b,a,c,D(this),E(this),H(this.o),10<=G(b)):new B("Opera","Unknown",a,c,D(this),E(this),H(this.o),n)}else/AppleWeb(K|k)it/.test(this.a)? (a=D(this),c=E(this),b=F(this.a,/AppleWeb(?:K|k)it\/([\d\.\+]+)/,1),""==b&&(b="Unknown"),d="Unknown",-1!=this.a.indexOf("Chrome")||-1!=this.a.indexOf("CrMo")||-1!=this.a.indexOf("CriOS")?d="Chrome":"BlackBerry"==a||"Android"==a?d="BuiltinBrowser":-1!=this.a.indexOf("Safari")?d="Safari":-1!=this.a.indexOf("AdobeAIR")&&(d="AdobeAIR"),e="Unknown","BuiltinBrowser"==d?e="Unknown":-1!=this.a.indexOf("Version/")?e=F(this.a,/Version\/([\d\.\w]+)/,1):"Chrome"==d?e=F(this.a,/(Chrome|CrMo|CriOS)\/([\d\.]+)/, 2):"AdobeAIR"==d&&(e=F(this.a,/AdobeAIR\/([\d\.]+)/,1)),f=n,"AdobeAIR"==d?(f=F(e,/\d+\.(\d+)/,1),f=2