Advertisement
gjmdcgkm

sf

Feb 25th, 2015
3,060
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MagikSF 14.35 KB | None | 0 0
  1. ",Ba(d||a.b.document.title),b));e.close()}else if(b=a.Y+"#"+b,a=a.$.contentWindow)c?a.location.replace(b):a.location.href=b},af=function(a){if(D)return a=fc(a.$),a.body?ta(a.body.innerHTML):null;var b=a.$.contentWindow;if(b){var c;try{c=ta(Ze(b))}catch(d){return a.n||(1!=a.n&&se(a.c,1E4),a.n=!0),null}a.n&&(0!=a.n&&se(a.c,150),a.n=!1);return c||null}return null};X.prototype.Ra=function(a){if(this.f){var b=Ze(this.b);b!=this.h&&$e(this,b,a)}if(!this.f||Se)if(b=af(this)||"",null==this.k||b==this.k)this.k=null,b!=this.h&&$e(this,b,a)};var $e=function(a,b,c){a.h=a.S.value=b;a.f?(Se&&Ve(a,b),Te(a,b)):Ve(a,b);a.dispatchEvent(new Qe(Ue(a),c))};X.prototype.gc=function(){qe(this.c);re(this.c)};var Ye=["mousedown","keydown","mousemove"],Re=0;var cf=function(a){a=String(a);if(/^\s*$/.test(a)?0:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);};var df=function(a){if("function"==typeof a.ra)return a.ra();if(q(a))return a.split("");if(fa(a)){for(var b=[],c=a.length,d=0;d=of(this).value)for(ha(b)&&(b=b()),a=new gf(0,String(b)),c&&(a.a=c),c="log:"+a.b,l.console&&(l.console.timeStamp?l.console.timeStamp(c):l.console.markTimeline&&l.console.markTimeline(c)),l.msWriteProfilerMark&&l.msWriteProfilerMark(c),c=this;c;)c=c.getParent()};var pf={},qf=null,rf=function(a){qf||(qf=new hf,pf[""]=qf,qf.a=mf);var b;if(!(b=pf[a])){b=new hf;var c=a.lastIndexOf("."),d=a.substr(c+1),c=rf(a.substr(0,c));c.P||(c.P={});c.P[d]=b;b.D=c;pf[a]=b}return b};var sf=function(a,b){a&&a.log(kf,b,void 0)},tf=function(a,b){a&&a.log(lf,b,void 0)},uf=function(a,b){a&&a.log(nf,b,void 0)};var vf=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,xf=function(a){if(wf){wf=!1;var b=l.location;if(b){var c=b.href;if(c&&(c=(c=xf(c)[3]||null)?decodeURI(c):c)&&c!=b.hostname)throw wf=!0,Error();}}return a.match(vf)},wf=F,yf=function(a,b){for(var c=a.split("&"),d=0;da?a=0:a>=this.r.question.length&&(a=this.r.question.length-1),this.sa!=a&&(this.sa=a,bg(this)))};var $f=function(a,b){var c=new Uf;c.set("xt",a.r.page_setup.xsrf_token);c.set("surt",a.ea.survey_type);c.set("as",a.ea.survey_name);c.set("sl",a.ea.source_language);c.set("tl",a.ea.target_language);c.set("qid",a.ea.question_id);""!=a.r.page_setup.vd&&c.set("pen",a.r.page_setup.vd);""!=a.r.page_setup.ud&&c.set("peg",a.r.page_setup.ud);c.set("client","t");b?c.set("answer",a.dc.value):c.set("sk",!0);Jf("/community/submit_answer",a.Tc,"POST",c)};Zf.prototype.Tc=function(a){3==Tf(a.target).error.error_type&&window.location.assign("/community/expired")};var ag=function(a){a.sa=a.sa+1;if(a.sa==a.r.question.length){a.aa.disabled=!0;a.bc.disabled=!0;var b=new Uf;b.set("surt",a.ea.survey_type);b.set("sl",a.ea.source_language);b.set("tl",a.ea.target_language);b.set("client","t");var c=[],d=[],e=a.r.question.length-10;for(0>e&&(e=0);e, as required by soy internals. Consider using goog.soy.renderElement instead.\nTemplate output: %s",b&&b[0],a);b=c.a;c=b.createElement("div");D?(c.innerHTML="
  2. "+a,c.removeChild(c.firstChild)):c.innerHTML=a;if(1==c.childNodes.length)c=c.removeChild(c.firstChild);else{for(a=b.createDocumentFragment();c.firstChild;)a.appendChild(c.firstChild);c=a}return c},wg=function(a){if(!ia(a))return String(a);if(a instanceof ug){if(a.Hb===sg)return Ja(a.eb());if(a.Hb===tg)return Ba(a.eb())}Ia("Soy template output is unsafe for use as HTML: "+a);return"zSoyz"},yg=/^<(body|caption|col|colgroup|head|html|tr|td|tbody|thead|tfoot)>/i,xg={};var Ag=function(){},Bg;ca(Ag);var Cg={button:"pressed",checkbox:"checked",menuitem:"selected",menuitemcheckbox:"checked",menuitemradio:"checked",radio:"checked",tab:"selected",treeitem:"selected"};Ag.prototype.b=function(){};Ag.prototype.m=function(a){return a.l().m("div",Dg(this,a).join(" "),a.eb())};Ag.prototype.Fa=function(a){return a};var Fg=function(a,b,c){if(a=a.d?a.d():a){var d=[b];D&&!G("7")&&(d=Eg(Md(a),b),d.push(b));(c?Pd:Rd)(a,d)}};Ag.prototype.Za=function(){return!0};Ag.prototype.s=function(a,b){b.id&&Jd(a,b.id);var c=this.Fa(b);c&&c.firstChild?Gg(a,c.firstChild.nextSibling?Ua(c.childNodes):c.firstChild):a.o=null;var d=0,e=this.G(),f=this.G(),h=!1,k=!1,p=!1,r=Ua(Md(b));z(r,function(a){h||a!=e?k||a!=f?d|=Hg(this,a):k=!0:(h=!0,f==e&&(k=!0));1==Hg(this,a)&&(La(c),kc(c)&&lc(c)&&jc(c,!1))},this);a.M=d;h||(r.push(e),f==e&&(k=!0));k||r.push(f);var da=a.Kb;da&&r.push.apply(r,da);if(D&&!G("7")){var L=Eg(r);0.");if("div"in vb)throw Error("Tag name
  3. is not allowed for SafeHtml.");var c=null,d="]/.test(k),"Forbidden characters in style string: "+k),f=jb(k)):f=kb}f=ib(f)}else{if(/^on/i.test(h))throw Error('Attribute "'+h+'" requires goog.string.Const value, "'+f+'" given.');if(h.toLowerCase()in ub)if(f instanceof pb)f instanceof pb&&f.constructor===pb&&f.a===ob?f="":(Ia("expected object of type TrustedResourceUrl, got '"+f+"'"),f="type_error:TrustedResourceUrl");else if(f instanceof nb)f instanceof nb&&f.constructor===nb&&f.a===mb?f="":(Ia("expected object of type SafeUrl, got '"+ f+"'"),f="type_error:SafeUrl");else throw Error('Attribute "'+h+'" on tag "div" requires goog.html.SafeUrl or goog.string.Const value, "'+f+'" given.');}f.Qa&&(f=f.Na());x(q(f)||ga(f),"String or number value expected, got "+typeof f+" with value: "+f);h=h+'="'+Ba(String(f))+'"';d=d+(" "+h)}}e=void 0;m(e)?n(e)||(e=[e]):e=[];!0===cb.div?(x(!e.length,"Void tag
  4. does not allow content."),d+=">"):(c=xb(e),d+=">"+sb(c)+"
  5. ",c=c.Ma());(b=b&&b.dir)&&(/^(ltr|rtl|auto)$/i.test(b)?c=0:c=null);b=wb(d,c);a.innerHTML=sb(b);a=a.firstChild;x(a.nodeType==Node.ELEMENT_NODE);b=a.style[Ea("transition")];return""!=("undefined"!==typeof b?b:a.style[rd(a,"transition")]||"")});var hh=function(a,b,c,d,e){eh.call(this);this.e=a;this.h=b;this.k=c;this.c=d;this.A=n(e)?e:[e]};w(hh,eh);var ze=function(a){1!=a.a&&(a.dispatchEvent("begin"),a.dispatchEvent("play"),u(),a.a=1,gh()?(sd(a.e,a.k),a.f=te(a.n,void 0,a)):a.b(!1))};hh.prototype.n=function(){Ad(this.e);fh(this.e,this.A);sd(this.e,this.c);this.f=te(t(this.b,this,!1),1E3*this.h)};var xe=function(a){1==a.a&&a.b(!0)};hh.prototype.b=function(a){sd(this.e,"transition","");l.clearTimeout(this.f);sd(this.e,this.c);u();this.a=0;a?this.dispatchEvent("stop"):this.dispatchEvent("finish");this.dispatchEvent("end")};hh.prototype.j=function(){xe(this);hh.g.j.call(this)};var ih=function(a,b,c,d){return new hh(a,.13,{opacity:c},{opacity:d},{tc:"opacity",duration:.13,timing:b,jc:0})};var lh=function(a){var b=na(jh,a,"ul");a.C?b():D?Sc(a,"show",b):Sc(a,"beforeshow",b);var c=null;N(a,"show",function(){a.Jb&&(c=new kh(a))});N(a,"hide",function(){xc(c)})},jh=function(a,b){Ce(a,.75);var c=a.v;c&&b&&(c=He(c,b))&&Od(c,"goog-buttonset-action");var c=ih(a.d(),"ease-out",0,1),d=ih(a.d(),"ease-in",1,0),e=ih(a.La(),"ease-out",0,.75),f=ih(a.La(),"ease-in",.75,0);a.xd(c,d,e,f)},kh=function(a){be.call(this,a.d());this.b=a;N(this,"start",this.na,!1,this)};w(kh,be);kh.prototype.na=function(a){a=a.a;if(this.b.Jb&&Nd(a.target,this.b.G())){var b=Ad(this.b.d()),b=new pd(0,b.width,b.height,0),c;c=this.b.d();if(D){var d=Ed(c,"paddingLeft"),e=Ed(c,"paddingRight"),f=Ed(c,"paddingTop");c=Ed(c,"paddingBottom");c=new pd(f,e,c,d)}else d=ud(c,"paddingLeft"),e=ud(c,"paddingRight"),f=ud(c,"paddingTop"),c=ud(c,"paddingBottom"),c=new pd(parseFloat(f),parseFloat(e),parseFloat(c),parseFloat(d));d=-1*c.top;e=-1*c.right;f=-1*c.bottom;c=-1*c.left;ia(d)?(b.top-=d.top,b.right+=d.right,b.bottom+=d.bottom,b.left-=d.left):(b.top-=d,b.right+=e,b.bottom+=f,b.left-=c);if(!b.contains(new zb(a.h,a.k)))return this.$b(),!0}return!1};kh.prototype.$b=function(){var a=oc(this.b.l()),b=Wb(Xb(a)||window),c=Ad(this.b.d()),d;"fixed"==vd(this.b.d(),"position")?(d=b.width-c.width,c=b.height-c.height):(d=Math.max(a.body.scrollWidth,b.width),b=Math.max(a.body.scrollHeight,b.height),d-=c.width,c=b-c.height);de(this,new qd(0,0,Math.max(0,d),Math.max(0,c)))};D&&G(8);var mh=function(a){if(null!=a)switch(a.Gb){case 1:return 1;case -1:return-1;case 0:return 0}return null},nh=function(){ug.call(this)};w(nh,ug);nh.prototype.Hb=sg;var ph=function(a){return null!=a&&a.Hb===sg?(x(a.constructor===nh),a):a instanceof rb?oh(sb(a),a.Ma()):oh(Ba(String(String(a))),mh(a))},oh=function(a){function b(a){this.a=a}b.prototype=a.prototype;return function(a,d){var e=new b(String(a));void 0!==d&&(e.Gb=d);return e}}(nh);(function(a){function b(a){this.a=a}b.prototype=a.prototype;return function(a,d){var e=String(a);if(!e)return"";e=new b(e);void 0!==d&&(e.Gb=d);return e}})(nh);var vg=function(a){a=a||{};var b="
  6. ";a=a.nd;for(var c=a.length,d=0;d",f=e.length,h=0;h"+(k.separator?'
  7. ':"
  8. "+(k.user_selected?'':'')+""+ph(k.name)+(k.experimental?"*":"")+"
  9. ")+"
  10. ");b+="
  11. "}return b+""};vg.a="translate.pqe.soy.languageSelectorContent";var qh=function(a,b){W.call(this);this.Tb=b.language;this.qc={};z(this.Tb,function(a){this.qc[a.code]=a},this);this.Ya=new qg(l);N(this.Ya,"resize",this.Pb,!1,this);this.Ic=I(a);N(this.Ic,"click",this.pd,!1,this);N(this,"dialogselect",this.ed);var c=I("langbar");Q(c,!0);this.Vb=new Sd(c);this.Vb.ua(I("pqe-notification"));this.Ga=0;this.zd=I("under2");this.td=I("over5");this.cb=!1;this.Mc=I("no_en")};w(qh,W);qh.prototype.t=function(){qh.g.t.call(this);var a=new V;a.s(Tb("buttons",this.d()));Ge(this,a);lh(this);He(a,"ul").value="true";this.o=Tb("modal-dialog-content",this.d());this.Va=rh(this);this.hc=rg(this.Ya);this.d().style.width=wd(this.Va.width,!0);sh(this,this.Va.ib)};var th={width:220,ib:2},uh={width:220,ib:2},vh={width:410,ib:3},wh={width:700,ib:5},sh=function(a,b){for(var c=a.Tb.length,d=Math.ceil(c/b),e=[],f=0;f=c||h.push(a.Tb[p])}}cc(a.o);c=zg({nd:e});a.o.appendChild(c);c=Sb("input","jfk-checkbox",c);z(c,function(a){a.checked&&this.Ga++;a.checked&&"en"==a.value&&(this.cb=!0);N(a,"change",this.Nb,!1,this)},a);xh(a)};qh.prototype.Nb=function(a){var b=this.qc[a.target.value];b.user_selected&&!a.target.checked&&(this.Ga--,"en"==a.target.value&&(this.cb=!1));!b.user_selected&&a.target.checked&&(this.Ga++,"en"==a.target.value&&(this.cb=!0));b.user_selected=a.target.checked;xh(this)};var xh=function(a){He(a.v,"ul").disabled=2>a.Ga||5a.Ga);Q(a.td,5=d.length&&(a.psdJson=d)}d=c||l;d.GOOGLE_FEEDBACK_START_ARGUMENTS=arguments;var e=a.serverUri||"//www.google.com/tools/feedback",f=d.GOOGLE_FEEDBACK_START;if(f)f.apply(d,arguments);else{var e=e+"/load.js?",h;for(h in a)f=a[h],null!=f&&!ia(f)&&(e+=encodeURIComponent(h)+"="+encodeURIComponent(f)+"&");h=d.document;d=h.createElement("script");d.src=e;h.body.appendChild(d)}};v("triggerFeedback",function(){try{Ah({productId:"275",productVersion:"0.1"})}catch(a){}});var Bh=function(a){R.call(this);this.aa=I(a);this.aa.disabled=!0;this.Aa=this.Ha=null};w(Bh,R);g=Bh.prototype;g.s=function(a){a=I(a);this.Ha=Sb("input","perfect",a);z(this.Ha,function(a){this.J().i(a,"change",this.cd,!1,this)},this);this.Aa=Sb("input","imperfect",a);z(this.Aa,function(a){this.J().i(a,"change",this.Xc,!1,this)},this);this.wa=I("all_incorrect");null!=this.wa&&this.J().i(this.wa,"click",this.Sc,!1,this);this.va=I("all_correct");null!=this.va&&this.J().i(this.va,"click",this.Rc,!1,this)};g.cd=function(a){a.target.checked?(this.Aa[Number(a.target.id.slice(-1))-1].checked=!1,null!=this.wa&&ae(this.wa,"checked")):a.target.checked=!0;this.Ia()};g.Xc=function(a){a.target.checked?(this.Ha[Number(a.target.id.slice(-1))-1].checked=!1,null!=this.va&&ae(this.va,"checked")):a.target.checked=!0;this.Ia()};g.Ia=function(){for(var a=!0,b=0;bthis.c)Hh(this.a,this.b);else{var a=this.c-u();0>=a||Hh(this.a,Math.min(this.b,a))}};var Jh=function(a){P.call(this);this.e=a;this.b=this.e.value;this.a=new cd(this);this.f=u();F||D||E&&G("1.9")?this.a.i(a,"paste",this.Ka):this.a.i(a,["keydown","blur","focus","mouseover","input"],this.Wc);this.c=new Ih(t(this.ic,this))};w(Jh,P);g=Jh.prototype;g.ia="init";g.R=rf("goog.events.PasteHandler");g.j=function(){Jh.g.j.call(this);this.a.Q();this.a=null;this.c.Q();this.c=null};g.ic=function(){if(this.b==this.e.value)return!1;tf(this.R,"detected textchange after paste");this.dispatchEvent("after_paste");return!0};g.Ka=function(a){a=new M(a.a);a.type="paste";this.dispatchEvent(a);te(function(){if(!this.ic()){var a=this.c;Gh(a.a);a.b=Math.max(50,0);a.c=u()+200;Hh(a.a,Math.min(a.b,200))}},0,this)};g.Wc=function(a){switch(this.ia){case "init":switch(a.type){case "blur":this.ia="init";break;case "focus":this.ia="focused";break;case "mouseover":this.ia="init";this.e.value!=this.b&&(tf(this.R,"paste by dragdrop while on init!"),this.Ka(a));break;default:sf(this.R,"unexpected event "+a.type+"during init")}break;case "focused":switch(a.type){case "input":var b=this.f+400;if(u()>b||"focus"==this.h)tf(this.R,"paste by textchange while focused!"),this.Ka(a);break;case "blur":this.ia="init";break;case "keydown":tf(this.R,"key down ... looking for ctrl+v");if(Hb&&C&&0==a.keyCode||Hb&&C&&17==a.keyCode)break;this.ia="typing";break;case "mouseover":this.e.value!=this.b&&(tf(this.R,"paste by dragdrop while focused!"),this.Ka(a));break;default:sf(this.R,"unexpected event "+a.type+" during focused")}break;case "typing":switch(a.type){case "input":this.ia="focused";break;case "blur":this.ia="init";break;case "keydown":if(a.ctrlKey&&86==a.keyCode||a.shiftKey&&45==a.keyCode||a.metaKey&&86==a.keyCode)tf(this.R,"paste by ctrl+v while keypressed!"),this.Ka(a);break;case "mouseover":this.e.value!=this.b&&(tf(this.R,"paste by dragdrop while keypressed!"),this.Ka(a));break;default:sf(this.R,"unexpected event "+a.type+" during keypressed")}break;default:sf(this.R,"invalid "+this.ia+" state")}this.f=u();this.b=this.e.value;tf(this.R,a.type+" -> "+this.ia);this.h=a.type};var Kh=function(a){R.call(this);this.Wa=null;this.aa=I(a)};w(Kh,R);Kh.prototype.s=function(a){this.Wa=I(a);a=new Qg(this.Wa);N(a,"key",this.Ob,!1,this);a=new Jh(this.Wa);N(a,"paste",this.Ob,!1,this);N(this.Wa,"keyup",this.Ob,!1,this)};Kh.prototype.Ob=function(){this.Ia()};Kh.prototype.Ia=function(){this.aa.disabled=0==this.Wa.value.length||""==this.Wa.value.trim()};var Lh=null;v("setup_answer_controller",function(a,b){Lh=new Kh(b);Lh.s(I(a));Lh.Ia()});
  12. Translate › Community
  13.  
  14.    Home
  15.    My Answers
  16.    FAQ
  17.  
  18. Improve Google Translate Help us improve translation quality by contributing to projects below. Your ratings and translations help the Translate algorithm learn your language a little better. To get started, select at least two languages. Make sure you've selected English as most evaluations focus on quality to or from English.
  19. About Google Translate Privacy & Terms Send feedback
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement