/* JS */ gapi.loaded_1(function(_){var window=this; _.Pj=window.oauth2||{};_.Qj=window.auth_firstparty||{}; _.Vj=function(a,c){this.B=a;var f=c||{};this.M=f.Fr;this.G=f.domain;this.ha=f.path;this.qa=f.wD};_.dk=function(a){this.B=a};_.fk=function(a){this.B=a;this.G=window.sessionStorage};var LC=/^[-+/_=.:|%&a-zA-Z0-9@]*$/,MC=/^[A-Z_][A-Z0-9_]{0,63}$/;_.Vj.prototype.Hd=function(){for(var a=this.B+"=",c=window.document.cookie.split(/;\s*/),f=0;ful;++ul); var Iv;_.Fn=function(){return Math.floor((new Date).getTime()/1E3)};_.xl=function(a){a=a.toUpperCase();for(var c=0,f=Iv.length;cf.expires_at&&(a.Kc.clear(),f=null);f&&f.error&&!c&&(f=null);return f}; _.Zj=function(a,c){var f="";if(!a)return f;var g=c||"&",h;for(h in a)if({}.hasOwnProperty.call(a,h)){var l;l=a[h];if(null!=l){var b=[(0,window.encodeURIComponent)(h),"="];if(l instanceof Array){for(var q=[],t=0;t");var b=_.R.createElement(g.join(""));b&&(!f||b.tagName==f.tagName&&b.namespaceURI==f.namespaceURI)&&(f=b)}catch(q){}g=f;a=a||{};for(var t in a)a.hasOwnProperty(t)&&(g[t]=a[t]);return f};_.R.Jk=function(){if(window.document.body)return window.document.body;try{var a=window.document.getElementsByTagNameNS("http://www.w3.org/1999/xhtml", "body");if(a&&1==a.length)return a[0]}catch(f){}return window.document.documentElement||window.document};_.R.Qt=function(c){return a(c)}})(); _.R=_.R||{};(function(){function a(a){c=a["core.util"]||{}}var c={},f={};_.Pb&&_.Pb.Q("core.util",null,a);_.R.Nt=function(a){return"undefined"===typeof c[a]?null:c[a]};_.R.hasFeature=function(a){return"undefined"!==typeof c[a]};_.R.Rt=function(){return f}})(); var xn;var yn;var wn;var Ze;var Ye;var Xe;var We;var Ve;var Ie;var Je;var Ke;var Le;var Me;_.zm=function(a,c){return-1!=a.indexOf(c)};_.He=function(a,c){if(c)return a.replace(Ie,"&").replace(Je,"<").replace(Ke,">").replace(Le,""");if(!Me.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(Ie,"&"));-1!=a.indexOf("<")&&(a=a.replace(Je,"<"));-1!=a.indexOf(">")&&(a=a.replace(Ke,">"));-1!=a.indexOf('"')&&(a=a.replace(Le,"""));return a}; _.Tm=function(a,c){return 0==a.lastIndexOf(c,0)};_.Ne=function(){return _.D.navigator?_.D.navigator.userAgent:null};var Oe=function(){return _.D.navigator};var Pe=function(){var a=_.D.document;return a?a.documentMode:void 0}; _.Um=function(a){var c;if(!(c=Zk[a])){c=0;for(var f=(0,_.Ge)(String(Se)).split("."),g=(0,_.Ge)(String(a)).split("."),h=Math.max(f.length,g.length),l=0;0==c&&l(0==A[1].length? 0:(0,window.parseInt)(A[1],10))?1:0)||((0==w[2].length)<(0==A[2].length)?-1:(0==w[2].length)>(0==A[2].length)?1:0)||(w[2]A[2]?1:0)}while(0==c)}c=Zk[a]=0<=c}return c};_.Te=function(a){return _.W&&Ue>=a};Me=/[&<>\"]/;Le=/\"/g;Ke=/>/g;Je=/(0,window.parseFloat)(An)){xn=String(Un);break t}}xn=An}var Se=xn,Zk={},co=_.D.document,Ue=co&&_.W?Pe()||("CSS1Compat"==co.compatMode?(0,window.parseInt)(Se,10):5):void 0; var pe;_.oe=function(a){return a[_.oa]||(a[_.oa]=++pe)};_.Vg=function(a){var c=typeof a;return"object"==c&&null!=a||"function"==c};_.jo=function(a){return"function"==(0,_.da)(a)};_.qe=function(a){return"number"==typeof a};_.gh=function(){};_.ue=function(a,c,f){t:{for(var g=a.length,h=(0,_.fa)(a)?a.split(""):a,l=0;lc?null:(0,_.fa)(a)?a.charAt(c):a[c]};_.ve=function(a,c){return 0<=(0,_.we)(a,c)}; _.xe=function(a,c){var f=(0,_.we)(a,c),g;(g=0<=f)&&_.ye.splice.call(a,f,1);return g};_.ze=function(a){var c=a.length;if(0=arguments.length?_.ye.slice.call(a,c):_.ye.slice.call(a,c,f)};pe=0;_.ye=Array.prototype; _.we=_.ye.indexOf?function(a,c,f){return _.ye.indexOf.call(a,c,f)}:function(a,c,f){f=null==f?0:0>f?Math.max(0,a.length+f):f;if((0,_.fa)(a))return(0,_.fa)(c)&&1==c.length?a.indexOf(c,f):-1;for(;fc?f+="000":256>c?f+="00":4096>c&&(f+="0");return Dp[a]=f+c.toString(16)}),'"')}; var Dp={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Sn=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g; _.ow=function(){_.mw="oauth2relay"+String(2147483647*(0,_.Vb)()|0);_.uk.proxy=_.mw};var yk;yk={};_.uk={};(0,_.ow)();var ep=(0,_.P)("oauth-flow/client_id");_.uk.client_id=ep;var hp=_.uk,up;var Ap=(0,_.P)("oauth-flow/redirectUri");if(Ap)up=Ap.replace(/[#][\s\S]*/,"");else{var Pp=_.Rb.Pq(window.location.href);up=[(0,_.P)("oauth-flow/callbackUrl"),"?x_origin=",(0,window.encodeURIComponent)(Pp)].join("")}hp.redirect_uri=up;_.uk.origin=_.Rb.Pq(window.location.href);_.uk.response_type="token"; var __OAUTH2_URI=yk.kt,__OAUTH2_RELAY_URI=yk.jt,__OAUTH2_CALLBACK_URI=yk.LD,__OAUTH2_REDIRECT_URI=yk.ND,__OAUTH2_PROXY_URI=yk.MD; var nw;var hk;var xk;var kk;var tv;var sv;var rv;var jk;var qk;var Mq;var Wp=function(a){if(!a)return[];a=a.split("=");return a[1]?a[1].split("|"):[]};var tq=function(a){a=a.split(":");return{OD:a[0].split("=")[1],RK:Wp(a[1]),aO:Wp(a[2]),DN:Wp(a[3])}}; var uq=function(a){var c,f=null;_.Lv.iterate(function(a,g){if(0===a.indexOf("G_AUTHUSER_")){var h=(0,_.yl)(a.substring(11));if(!c||h.Gb&&!c.Gb||h.Gb==c.Gb&&h.Ke>c.Ke)c=h,f=g}});var g=a&&(0,_.xl)(a);if(null!==f){var h;_.Lv.iterate(function(a,f){var l=(0,_.Al)(a);l&&l.uf&&(g&&l.ep!=g||l.Gb==c.Gb&&l.Ke==c.Ke&&(h=f))});if(h){var l=tq(h);a=l&&l.RK[Number(f)];l=l&&l.OD;if(a)return{rz:f,tO:a,OD:l}}}return null};var wq=function(a){return"true"===String(a.immediate)}; var pw=function(a,c){var f=null;a&&c&&(f=c.client_id=c.client_id||a.client_id,c.scope=c.scope||a.scope,c.g_user_cookie_policy=a.cookie_policy,c.cookie_policy=c.cookie_policy||a.cookie_policy,c.response_type=c.response_type||a.response_type);if(c){c.issued_at||(c.issued_at=String((0,_.Fn)()));var g=(0,window.parseInt)(c.expires_in,10)||86400;c.error&&(g=(0,_.P)("oauth-flow/errorMaxAge")||86400);c.expires_in=String(g);c.expires_at||(c.expires_at=String((0,_.Fn)()+g));a&&wq(a)||(c["g-oauth-window"]= (qk||{}).popup);c._aa||c.error||null!=uq(f)||!wq(a)||(c._aa="1")}return c}; var yq=function(a){if((0,_.P)("oauth-flow/toastCfg")&&!(0,_.P)("isSignedOut")&&0<=(" "+(a.scope||"")+" ").indexOf(" https://www.googleapis.com/auth/plus.login ")){var c=(0,_.P)("oauth-flow/toast/position");if("1"===a._aa&&(a._aa="0",!Mq)){Mq=!0;var f=window.document.createElement("div");"top"!==c&&(c="bottom");f.style.cssText="position:fixed;"+c+":20px;width:100%;z-index:1000;display:none;";var g=window.document.createElement("div");g.style.cssText="float:left;position:relative;left:50%;";f.appendChild(g); c=window.document.createElement("div");c.style.cssText="float:left;position:relative;left:-50%";g.appendChild(c);g=window;try{for(;g.parent!=g&&g.parent.document;)g=g.parent}catch(h){}g=g.document.body;try{g.insertBefore(f,g.firstChild)}catch(l){}_.Sm.cj({url:":socialhost:/:session_prefix:_/widget/oauthflow/toast",queryParams:{clientId:a.client_id,idToken:a.id_token},where:c,onRestyle:function(){f.style.display=""}}).pC(function(){f.parentNode.removeChild(f)},_.Vz)}}}; var ck=function(a,c){var f,g;"string"==typeof a?(f=c,g=a):(f=a,g="token");if(f){var h=(0,_.Ev)(f,!0);if(h){var l;if((l=f)&&l.session_state){var b=[],q=[],t=[],v=(0,window.parseInt)(l.authuser,10)||0;b[v]=l.session_state;q[v]=l.issued_at;t[v]=l.expires_at;l=["C="+l.client_id,"S="+b.join("|"),"I="+q.join("|"),"X="+t.join("|")].join(":")}else l=null;l&&h.Kc.write(l);"token"==g&&(h=(0,_.st)(f.g_user_cookie_policy),!h||h.Gb&&!_.Gt?h=null:(l="G_AUTHUSER_"+(_.Gt&&h.Gb?"S":"H")+h.Ke,b=_.Mv[l],b||(b=new _.Lv(l, (0,_.vv)(h)),_.Mv[l]=b),h=b),h&&f.session_state&&!f.error&&h.write(f.authuser||"0"))}}if(g="token"!==g?(0,_.Cv)(g):(0,_.Ev)(f))if(f){if(g.Kc.write(f),!_.Jv||g.Fj&&"token"!==_.Jv)_.Jv=g.key}else g.Kc.clear(),_.Jv=null;(0,_.Hx)(void 0,void 0)}; var lk=function(a,c){var f=c&&c.key||"token";a=pw(c&&c.params,a);yq(a);ck(f,a);a=(0,_.Hx)(f,void 0);if(c){(f=c.iframe)&&f.parentNode.removeChild(f);var f=c.popup,g=c.after_redirect;if(f&&"keep_open"!=g)try{f.close()}catch(h){}c.timeout&&(window.clearTimeout(c.timeout),c.timeout=null);c.callback&&(c.callback(a),c.callback=null)}};var er=function(a){if((0,_.P)("oauth-flow/eso")&&(a=(0,_.st)(a))){a=["G_USERSTATE_",a.Gb?"E":"U",a.Ke].join("");var c=_.Bl[a];c||(c=new _.Vj(a,63072E3),_.Bl[a]=c);return c}return new _.dk(_.Ak.KL)}; var lr=function(a){var c=er(a).Hd();a=(0,_.O)();if(c)for(var c=c.split(":"),f;f=c.shift();)f=f.split("="),a[f[0]]=f[1];return a}; _.mr=function(a){a=a&&a.id_token;if(!a||!a.split(".")[1])return null;a=(a.split(".")[1]+"...").replace(/^((....)+).?.?.?$/,"$1");var c=_.Qn;if(!tv){tv={};sv={};rv={};for(var f=0;65>f;f++)tv[f]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(f),sv[f]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(f),rv[sv[f]]=f}for(var f=rv,g=[],h=0;h>4);64!=q&&(g.push(b<<4&240|q>>2),64!=t&&g.push(q<<6&192|t))}return c(String.fromCharCode.apply(null,g)).sub};var ik=function(){var a=hk;if(null!==a){hk=null;for(var c=0,f=a.length;cf-nw)return;c.parentNode.removeChild(c);if(/Firefox/.test(window.navigator.userAgent))try{window.frames[a]=void 0}catch(g){}(0,_.ow)();a=_.mw}nw=f;var h=String(2147483647*(0,_.Vb)()|0);_.T.Q("oauth2relayReady:"+h,ek(function(){_.T.Jd("oauth2relayReady:"+h);ik()}));_.T.Q("oauth2relayReady",ek(function(){ik()}));c=ek(function(a){var c=_.R.ld;a=c(a);var f=c= a.state,f=f.replace(/\|.*$/,"");a.state={}.hasOwnProperty.call(jk,f)?jk[f]:null;null!=a.state&&(f=kk[c],delete kk[c],lk(a,f))});_.T.Q("oauth2callback:"+h,c);_.T.Q("oauth2callback",c);var c=[(0,_.P)("oauth-flow/proxyUrl")||(0,_.P)("oauth-flow/relayUrl"),"?parent=",(0,window.encodeURIComponent)(_.Rb.Pq(window.location.href)),"#rpctoken=",h,"&forcesecure=1"].join(""),f=_.R.Jk(),l=_.R.Fh({name:a,id:a});l.src=c;l.style.width="1px";l.style.height="1px";l.style.position="absolute";l.style.top="-100px";f.appendChild(l); _.T.tf(a)}};_.et=function(a,c,f,g){var h=lr(f),l=h[a];c?h[a]="X":delete h[a];var b=[];(0,_.DC)(h,function(a,c){b.push(c+"="+a)});c=b.join(":");f=er(f);c?f.write(b.join(":")):f.clear();h[a]!==l&&g&&g()};var Ix=function(a,c){for(var f=a.split(" "),g=c.split(" "),h=(0,_.O)(),l=0,b=g.length;lc.Ke)&&(c=l,f=a)});return f};var Vx=function(a){var c=_.R.Jk(),f=_.R.Fh();f.src=a.uri;f.style.width="1px";f.style.height="1px";f.style.position="absolute";f.style.top="-100px";a.timeout=window.setTimeout(function(){f.parentNode&&f.parentNode.removeChild(f)},3E5);c.appendChild(f)}; var mk=function(a,c){if(qk){var f=qk.popup,g=qk.after_redirect;if(f&&"keep_open"!=g)try{f.close()}catch(h){}}f=qk={};"key"in a&&(f.key=a.key,delete a.key);qk.params=a;qk.callback=function(f){nr(f)&&(wq(a)?f=(0,_.as)(f):f.error||(0,_.et)((0,_.mr)(f),!1,f.cookie_policy));(c||(0,_.x)())(pw(a,f))};f.uri=rk(a,f);return f};var rA=function(a,c){gk(function(){_.T.call(_.mw,"check_session_state",function(a){c.call(null,a)},a.session_state,a.client_id)})}; var fz=function(a){a=_.R.ld("#"+(0,_.Zj)(a));if(!wq(a))return null;var c=a.key||Jx(a.client_id);return(c=(0,_.Hx)(c,!0,!0))&&c.client_id===a.client_id&&Ix(a.scope,c.scope)&&Ix(a.response_type,c.response_type)?c:null}; var qA=function(a,c){var f=_.R.ld();a.Vt=f.lang||f.hl;var g=mk(a,c);a.after_redirect&&(g.after_redirect=a.after_redirect);if(null!=a.scope){var h=function(){gk(function(){if(g.popup)g.popup.focus();else if(wq(a))Vx(g);else{var c=Math.min((0,_.P)("oauth-flow/authWindowWidth",650),window.screen.width-20),f=Math.min((0,_.P)("oauth-flow/authWindowHeight",600),window.screen.height-30);qk.popup=window.open(g.uri,"_blank",["toolbar=no","location="+(window.opera?"no":"yes"),"directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no", "width="+c,"height="+f,"top="+(window.screen.height-f)/2,"left="+(window.screen.width-c)/2].join())}})},l=fz(a);!(0,_.P)("oauth-flow/disableOpt")&&l?rA(l,function(a){a?lk(l,qk):h()}):h()}else lk(null,qk)}; _.sk=function(a,c){var f=a||{},g=c||(0,_.x)();if((0,_.P)("oauth-flow/disableOpt")||(0,_.P)("isLoggedIn")||!wq(f))qA(f,g);else{var h=(0,_.O)();h.client_id=f.client_id;h.session_state=null;rA(h,function(a){a?(a=(0,_.O)(),a.error="immediate_failed_user_logged_out",g(pw(f,a))):((0,_.Fa)("isLoggedIn",!0),qA(f,g))})}};Mq=!1;jk={};rv=null;sv=null;tv=null;kk={};xk={};hk=[];nw=0; _.Ek={Ff:_.sk,FH:rA,Qe:_.Qj.Qe,$f:function(a,c){return(0,_.Hx)(a,c)},Wk:function(a,c){gk(function(){var f=_.mw,g=_.Qj.Qe()||"",h=null,l=null;g&&(l=g.split(" "),2==l.length&&(h=l[1]));h?_.T.call(f,"get_versioninfo",function(c){a(c)},h,c):a()})},gb:gk,Ym:ck}; (0,_.d)("gapi.auth.authorize",_.Ek.Ff);(0,_.d)("gapi.auth.checkSessionState",_.Ek.FH);(0,_.d)("gapi.auth.getAuthHeaderValueForFirstParty",_.Ek.Qe);(0,_.d)("gapi.auth.getToken",_.Ek.$f);(0,_.d)("gapi.auth.getVersionInfo",_.Ek.Wk);(0,_.d)("gapi.auth.init",_.Ek.gb);(0,_.d)("gapi.auth.setToken",_.Ek.Ym); }); // Copyright 2002-2013 Google Inc.