diff --git a/README.md b/README.md index 58b47eb..5f861fd 100644 --- a/README.md +++ b/README.md @@ -97,3 +97,10 @@ - Ayush Poddar - **[Portfolio](https://mr-magnificent.github.io/)** + +### fall 2018 + - Ankit Ojha + - **[Portfolio](https://festive-cori-c666b3.netlify.com)** + - **[WeatherApp](https://focused-curie-63467c.netlify.com)** + - **[TodoApp](https://mighty-journey-16668.herokuapp.com/)** + - **[Saarthi(final project)](https://safe-spire-45434.herokuapp.com/)** diff --git a/fall2018/Ankit Ojha/Portfolio/css/18209126_780552445452349_381752522969896482_o.jpg b/fall2018/Ankit Ojha/Portfolio/css/18209126_780552445452349_381752522969896482_o.jpg new file mode 100644 index 0000000..61612e0 Binary files /dev/null and b/fall2018/Ankit Ojha/Portfolio/css/18209126_780552445452349_381752522969896482_o.jpg differ diff --git a/fall2018/Ankit Ojha/Portfolio/css/New Tab.html b/fall2018/Ankit Ojha/Portfolio/css/New Tab.html new file mode 100644 index 0000000..e9f4498 --- /dev/null +++ b/fall2018/Ankit Ojha/Portfolio/css/New Tab.html @@ -0,0 +1,467 @@ + + +
Search Google or type a URL
Customise this page
Chrome backgrounds
Upload an image
Restore default background

Select a collection
Connection error
Connection error.
More info
Backgrounds are unavailable. Try again later.
Back
selected
Add shortcut
Edit shortcut
Name
URL
Remove
Cancel
Done
Type a valid URL
Shortcut removed
Shortcut edited
Shortcut added
Can’t create shortcut
Can’t edit shortcut
Can’t remove shortcut
\ No newline at end of file diff --git a/fall2018/Ankit Ojha/Portfolio/css/New Tab_files/api.js b/fall2018/Ankit Ojha/Portfolio/css/New Tab_files/api.js new file mode 100644 index 0000000..38cc7ce --- /dev/null +++ b/fall2018/Ankit Ojha/Portfolio/css/New Tab_files/api.js @@ -0,0 +1,12 @@ +var gapi=window.gapi=window.gapi||{};gapi._bs=new Date().getTime();(function(){/* + gapi.loader.OBJECT_CREATE_TEST_OVERRIDE &&*/ +var g=window,h=document,m=g.location,n=function(){},q=/\[native code\]/,u=function(a,b,c){return a[b]=a[b]||c},aa=function(a){a=a.sort();for(var b=[],c=void 0,d=0;df}f&&c.push(e)}return c},U=function(){var a=A.nonce;return void 0!==a?a&&a===String(a)&&a.match(S)?a:A.nonce=null:h.querySelector?(a=h.querySelector("script[nonce]"))?(a=a.nonce||a.getAttribute("nonce")||"",a&&a===String(a)&&a.match(S)?A.nonce=a:A.nonce=null):null:null},pa=function(a){if("loading"!=h.readyState)V(a); +else{var b=U(),c="";null!==b&&(c=' nonce="'+b+'"');h.write("<"+R+' src="'+encodeURI(a)+'"'+c+">")}},V=function(a){var b=h.createElement(R);b.setAttribute("src",a);a=U();null!==a&&b.setAttribute("nonce",a);b.async="true";(a=h.getElementsByTagName(R)[0])?a.parentNode.insertBefore(b,a):(h.head||h.body||h.documentElement).appendChild(b)},qa=function(a,b){var c=b&&b._c;if(c)for(var d=0;d>>0);_.Oa=Date.now||function(){return+new Date};_.u=function(a,b){a=a.split(".");var c=_.m;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&_.Ka(b)?c[d]=b:c=c[d]&&c[d]!==Object.prototype[d]?c[d]:c[d]={}}; +_.x=function(a,b){function c(){}c.prototype=b.prototype;a.H=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.xp=function(a,c,f){for(var d=Array(arguments.length-2),e=2;ec&&(c=Math.max(0,a.length+c));if(_.r(a))return _.r(b)&&1==b.length?a.lastIndexOf(b,c):-1;for(;0<=c;c--)if(c in a&&a[c]===b)return c;return-1}; +_.jb=Array.prototype.forEach?function(a,b,c){Array.prototype.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=_.r(a)?a.split(""):a,f=0;fb?1:0};_.wb=2147483648*Math.random()|0; +a:{var yb=_.m.navigator;if(yb){var Ab=yb.userAgent;if(Ab){_.xb=Ab;break a}}_.xb=""}_.Bb=function(a){return-1!=_.xb.indexOf(a)};var Fb;_.Eb=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)};Fb="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");_.Gb=function(a,b){for(var c,d,e=1;e(0,window.parseFloat)(fc)){ec=String(hc);break a}}ec=fc}_.ic=ec;Ob={}; _.jc=function(a){return Pb(a,function(){return 0<=_.vb(_.ic,a)})};_.lc=function(a){return Number(_.kc)>=a};var nc=_.m.document;mc=nc&&_.B?dc()||("CSS1Compat"==nc.compatMode?(0,window.parseInt)(_.ic,10):5):void 0;_.kc=mc; + +var qc,uc,vc,wc,xc,yc,zc,Ac;_.oc=function(a,b){return _.ba[a]=b};_.rc=function(a){return Array.prototype.concat.apply([],arguments)};_.sc=function(a){var b=a.length;if(0/g;xc=/"/g;yc=/'/g;zc=/\x00/g;Ac=/[\x00&<>"']/; +_.Bc=function(a){if(!Ac.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(uc,"&"));-1!=a.indexOf("<")&&(a=a.replace(vc,"<"));-1!=a.indexOf(">")&&(a=a.replace(wc,">"));-1!=a.indexOf('"')&&(a=a.replace(xc,"""));-1!=a.indexOf("'")&&(a=a.replace(yc,"'"));-1!=a.indexOf("\x00")&&(a=a.replace(zc,"�"));return a};_.Cc=function(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};_.Dc=function(a,b){for(var c in a)if(a[c]==b)return!0;return!1}; +var Fc,Gc;Fc=!_.B||_.lc(9);Gc=!_.Tb&&!_.B||_.B&&_.lc(9)||_.Tb&&_.jc("1.9.1");_.Hc=_.B&&!_.jc("9");_.Ic=_.B||_.Qb||_.Ub;_.Jc=_.B&&!_.lc(9);_.Mc=function(a){var b=!1,c;return function(){b||(c=a(),b=!0);return c}};var Oc,Nc;_.Pc=function(a,b){this.YD=a===Nc&&b||"";this.nQ=Oc};_.Pc.prototype.Ih=!0;_.Pc.prototype.lg=function(){return this.YD};_.Pc.prototype.toString=function(){return"Const{"+this.YD+"}"};_.Qc=function(a){return a instanceof _.Pc&&a.constructor===_.Pc&&a.nQ===Oc?a.YD:"type_error:Const"};_.Rc=function(a){return new _.Pc(Nc,a)};Oc={};Nc={}; +var Sc;_.Tc=function(){this.zC="";this.wQ=Sc};_.Tc.prototype.Ih=!0;_.Tc.prototype.lg=function(){return this.zC};_.Tc.prototype.fB=!0;_.Tc.prototype.yl=function(){return 1};_.Uc=function(a){if(a instanceof _.Tc&&a.constructor===_.Tc&&a.wQ===Sc)return a.zC;_.La(a);return"type_error:TrustedResourceUrl"};_.Xc=function(a){return _.Wc(_.Qc(a))};Sc={};_.Wc=function(a){var b=new _.Tc;b.zC=a;return b}; +var ad,Yc,bd;_.Zc=function(){this.lm="";this.XP=Yc};_.Zc.prototype.Ih=!0;_.Zc.prototype.lg=function(){return this.lm};_.Zc.prototype.fB=!0;_.Zc.prototype.yl=function(){return 1};_.$c=function(a){if(a instanceof _.Zc&&a.constructor===_.Zc&&a.XP===Yc)return a.lm;_.La(a);return"type_error:SafeUrl"};ad=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;_.cd=function(a){if(a instanceof _.Zc)return a;a="object"==typeof a&&a.Ih?a.lg():String(a);ad.test(a)||(a="about:invalid#zClosurez");return bd(a)}; _.dd=function(a){if(a instanceof _.Zc)return a;a="object"==typeof a&&a.Ih?a.lg():String(a);ad.test(a)||(a="about:invalid#zClosurez");return bd(a)};Yc={};bd=function(a){var b=new _.Zc;b.lm=a;return b};bd("about:blank"); +_.hd=function(){this.yC="";this.WP=_.ed};_.hd.prototype.Ih=!0;_.ed={};_.hd.prototype.lg=function(){return this.yC};_.hd.prototype.Li=function(a){this.yC=a;return this};_.id=(new _.hd).Li("");_.kd=function(){this.xC="";this.VP=_.jd};_.kd.prototype.Ih=!0;_.jd={};_.md=function(a){a=_.Qc(a);return 0===a.length?ld:(new _.kd).Li(a)};_.kd.prototype.lg=function(){return this.xC};_.kd.prototype.Li=function(a){this.xC=a;return this};var ld=(new _.kd).Li(""); +var nd;_.od=function(){this.lm="";this.UP=nd;this.iH=null};_.od.prototype.fB=!0;_.od.prototype.yl=function(){return this.iH};_.od.prototype.Ih=!0;_.od.prototype.lg=function(){return this.lm};_.pd=function(a){if(a instanceof _.od&&a.constructor===_.od&&a.UP===nd)return a.lm;_.La(a);return"type_error:SafeHtml"};nd={};_.qd=function(a,b){return(new _.od).Li(a,b)};_.od.prototype.Li=function(a,b){this.lm=a;this.iH=b;return this};_.qd("",0);_.td=_.qd("",0);_.ud=_.qd("
",0); +_.vd=_.Mc(function(){var a=window.document.createElement("div");a.innerHTML="
";var b=a.firstChild.firstChild;a.innerHTML="";return!b.parentElement});_.wd=function(a,b){b=b instanceof _.Zc?b:_.dd(b);a.href=_.$c(b)};var Cd,Fd,Hd;_.zd=function(a){return a?new _.xd(_.yd(a)):qc||(qc=new _.xd)};_.Ad=function(a,b){return _.r(b)?a.getElementById(b):b}; +_.Bd=function(a,b,c,d){a=d||a;b=b&&"*"!=b?String(b).toUpperCase():"";if(a.querySelectorAll&&a.querySelector&&(b||c))return a.querySelectorAll(b+(c?"."+c:""));if(c&&a.getElementsByClassName){a=a.getElementsByClassName(c);if(b){d={};for(var e=0,f=0,h;h=a[f];f++)b==h.nodeName&&(d[e++]=h);d.length=e;return d}return a}a=a.getElementsByTagName(b||"*");if(c){d={};for(f=e=0;h=a[f];f++)b=h.className,"function"==typeof b.split&&_.qb(b.split(/\s+/),c)&&(d[e++]=h);d.length=e;return d}return a}; +_.Dd=function(a,b){_.Eb(b,function(b,d){b&&"object"==typeof b&&b.Ih&&(b=b.lg());"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:Cd.hasOwnProperty(d)?a.setAttribute(Cd[d],b):_.tc(d,"aria-")||_.tc(d,"data-")?a.setAttribute(d,b):a[d]=b})};Cd={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"}; +_.Ed=function(a){return a?a.parentWindow||a.defaultView:window};_.Gd=function(a,b){var c=String(b[0]),d=b[1];if(!Fc&&d&&(d.name||d.type)){c=["<",c];d.name&&c.push(' name="',_.Bc(d.name),'"');if(d.type){c.push(' type="',_.Bc(d.type),'"');var e={};_.Gb(e,d);delete e.type;d=e}c.push(">");c=c.join("")}c=a.createElement(c);d&&(_.r(d)?c.className=d:_.Ma(d)?c.className=d.join(" "):_.Dd(c,d));21/a&&(a="-0"),b[b.length]=String(a);else if(e===Ke)b[b.length]=String(!!Number(a));else{if(e===Je)return Oe(a.toISOString.call(a),c);if(e===Ne&&He(a.length)===Ie){b[b.length]="[";var f=0;for(d=Number(a.length)>>0;f>0;f=e?"\\u"+(e+65536).toString(16).substr(1):32<=e&&65535>=e?d:"\ufffd";b[b.length]='"'}else if("object"===d){b[b.length]="{";d=0;for(f in a)Object.prototype.hasOwnProperty.call(a,f)&&(e=Oe(a[f],c),void 0!==e&&(d++&&(b[b.length]=","),b[b.length]=Oe(f),b[b.length]=":",b[b.length]=e));b[b.length]="}"}else return}return b.join("")}};Pe=/[\0-\x07\x0b\x0e-\x1f]/; +Qe=/^([^"]*"([^\\"]|\\.)*")*[^"]*"([^"\\]|\\.)*[\0-\x1f]/;Re=/^([^"]*"([^\\"]|\\.)*")*[^"]*"([^"\\]|\\.)*\\[^\\\/"bfnrtu]/;Se=/^([^"]*"([^\\"]|\\.)*")*[^"]*"([^"\\]|\\.)*\\u([0-9a-fA-F]{0,3}[^0-9a-fA-F])/;Te=/"([^\0-\x1f\\"]|\\[\\\/"bfnrt]|\\u[0-9a-fA-F]{4})*"/g;Ue=/-?(0|[1-9][0-9]*)(\.[0-9]+)?([eE][-+]?[0-9]+)?/g;Ve=/[ \t\n\r]+/g;We=/[^"]:/;Xe=/""/g;Ye=/true|false|null/g;Ze=/00/;$e=/[\{]([^0\}]|0[^:])/;af=/(^|\[)[,:]|[,:](\]|\}|[,:]|$)/;bf=/[^\[,:][\[\{]/;cf=/^(\{|\}|\[|\]|,|:|0)+/;df=/\u2028/g; +ef=/\u2029/g; +ff=function(a){a=String(a);if(Pe.test(a)||Qe.test(a)||Re.test(a)||Se.test(a))return!1;var b=a.replace(Te,'""');b=b.replace(Ue,"0");b=b.replace(Ve,"");if(We.test(b))return!1;b=b.replace(Xe,"0");b=b.replace(Ye,"0");if(Ze.test(b)||$e.test(b)||af.test(b)||bf.test(b)||!b||(b=b.replace(cf,"")))return!1;a=a.replace(df,"\\u2028").replace(ef,"\\u2029");b=void 0;try{b=Fe?[Ge(a)]:eval("(function (var_args) {\n return Array.prototype.slice.call(arguments, 0);\n})(\n"+a+"\n)")}catch(c){return!1}return b&&1=== +b.length?b[0]:!1};gf=function(){var a=((_.m.document||{}).scripts||[]).length;if((void 0===De||void 0===Fe||Ee!==a)&&-1!==Ee){De=Fe=!1;Ee=-1;try{try{Fe=!!_.m.JSON&&'{"a":[3,true,"1970-01-01T00:00:00.000Z"]}'===_.m.JSON.stringify.call(_.m.JSON,{a:[3,!0,new Date(0)],c:function(){}})&&!0===Ge("true")&&3===Ge('[{"a":3}]')[0].a}catch(b){}De=Fe&&!Ge("[00]")&&!Ge('"\u0007"')&&!Ge('"\\0"')&&!Ge('"\\v"')}finally{Ee=a}}};_.hf=function(a){if(-1===Ee)return!1;gf();return(De?Ge:ff)(a)}; +_.jf=function(a){if(-1!==Ee)return gf(),Fe?_.m.JSON.stringify.call(_.m.JSON,a):Oe(a)};kf=!Date.prototype.toISOString||"function"!==typeof Date.prototype.toISOString||"1970-01-01T00:00:00.000Z"!==(new Date(0)).toISOString(); +lf=function(){var a=Date.prototype.getUTCFullYear.call(this);return[0>a?"-"+String(1E6-a).substr(1):9999>=a?String(1E4+a).substr(1):"+"+String(1E6+a).substr(1),"-",String(101+Date.prototype.getUTCMonth.call(this)).substr(1),"-",String(100+Date.prototype.getUTCDate.call(this)).substr(1),"T",String(100+Date.prototype.getUTCHours.call(this)).substr(1),":",String(100+Date.prototype.getUTCMinutes.call(this)).substr(1),":",String(100+Date.prototype.getUTCSeconds.call(this)).substr(1),".",String(1E3+Date.prototype.getUTCMilliseconds.call(this)).substr(1), "Z"].join("")};Date.prototype.toISOString=kf?lf:Date.prototype.toISOString; + +var ih;ih=/^https?:\/\/(?:\w|[\-\.])+\.google\.(?:\w|[\-:\.])+(?:\/[^\?#]*)?\/u\/(\d)\//; +_.jh=function(a){var b=_.C("googleapis.config/sessionIndex");"string"===typeof b&&254e;e++)d[e]=b.charCodeAt(c)<<24|b.charCodeAt(c+1)<<16|b.charCodeAt(c+2)<<8|b.charCodeAt(c+3),c+=4;else for(e=0;16>e;e++)d[e]=b[c]<<24|b[c+1]<<16|b[c+2]<<8|b[c+3],c+=4;for(e=16;80>e;e++){var f=d[e-3]^d[e-8]^d[e-14]^d[e-16];d[e]=(f<<1|f>>>31)&4294967295}b=a.Gc[0];c=a.Gc[1];var h=a.Gc[2],k=a.Gc[3],l=a.Gc[4];for(e=0;80>e;e++){if(40>e)if(20>e){f=k^c&(h^k);var n=1518500249}else f=c^h^k,n=1859775393;else 60>e?(f=c&h|k&(c|h),n=2400959708): +(f=c^h^k,n=3395469782);f=(b<<5|b>>>27)+f+l+n+d[e]&4294967295;l=k;k=h;h=(c<<30|c>>>2)&4294967295;c=b;b=f}a.Gc[0]=a.Gc[0]+b&4294967295;a.Gc[1]=a.Gc[1]+c&4294967295;a.Gc[2]=a.Gc[2]+h&4294967295;a.Gc[3]=a.Gc[3]+k&4294967295;a.Gc[4]=a.Gc[4]+l&4294967295}; +_.nh.prototype.update=function(a,b){if(null!=a){_.Ka(b)||(b=a.length);for(var c=b-this.Jj,d=0,e=this.ty,f=this.In;dthis.In?this.update(this.$v,56-this.In):this.update(this.$v,this.Jj-(this.In-56));for(var c=this.Jj-1;56<=c;c--)this.ty[c]=b&255,b/=256;oh(this,this.ty);for(c=b=0;5>c;c++)for(var d=24;0<=d;d-=8)a[b]=this.Gc[c]>>d&255,++b;return a}; + +_.ph=function(){this.MD=new _.nh};_.g=_.ph.prototype;_.g.reset=function(){this.MD.reset()};_.g.oN=function(a){this.MD.update(a)};_.g.hH=function(){return this.MD.digest()};_.g.oE=function(a){a=(0,window.unescape)((0,window.encodeURIComponent)(a));for(var b=[],c=0,d=a.length;c/g;hk=/"/g;ik=/'/g;jk=function(a){return String(a).replace(ek,"&").replace(fk,"<").replace(gk,">").replace(hk,""").replace(ik,"'")};kk=/[\ud800-\udbff][\udc00-\udfff]|[^!-~]/g; +lk=/%([a-f]|[0-9a-fA-F][a-f])/g;mk=/^(https?|ftp|file|chrome-extension):$/i; +nk=function(a){a=String(a);a=a.replace(kk,function(a){try{return(0,window.encodeURIComponent)(a)}catch(f){return(0,window.encodeURIComponent)(a.replace(/^[^%]+$/g,"\ufffd"))}}).replace(_.fe,function(a){return a.replace(/%/g,"%25")}).replace(lk,function(a){return a.toUpperCase()});a=a.match(_.ee)||[];var b=_.$d(),c=function(a){return a.replace(/\\/g,"%5C").replace(/\^/g,"%5E").replace(/`/g,"%60").replace(/\{/g,"%7B").replace(/\|/g,"%7C").replace(/\}/g,"%7D")},d=!!(a[1]||"").match(mk);b.xp=c((a[1]|| +"")+(a[2]||"")+(a[3]||(a[2]&&d?"/":"")));d=function(a){return c(a.replace(/\?/g,"%3F").replace(/#/g,"%23"))};b.query=a[5]?[d(a[5])]:[];b.xh=a[7]?[d(a[7])]:[];return b};ok=function(a){return a.xp+(0++c);_.dk(5>c,"Error creating iframe id");return d};_.Gk=function(a,b){return a?b+"/"+a:""}; +_.Hk=function(a,b,c,d){var e={},f={};a.documentMode&&9>a.documentMode&&(e.hostiemode=a.documentMode);_.be(d.queryParams||{},e);_.be(d.fragmentParams||{},f);var h=d.pfname;var k=_.$d();_.C("iframes/dropLegacyIdParam")||(k.id=c);k._gfid=c;k.parent=a.location.protocol+"//"+a.location.host;c=_.de(a.location.href,"parent");h=h||"";!h&&c&&(h=_.de(a.location.href,"_gfid","")||_.de(a.location.href,"id",""),h=_.Gk(h,_.de(a.location.href,"pfname","")));h||(c=_.hf(_.de(a.location.href,"jcp","")))&&"object"== +typeof c&&(h=_.Gk(c.id,c.pfname));k.pfname=h;d.connectWithJsonParam&&(h={},h.jcp=_.jf(k),k=h);h=_.de(b,"rpctoken")||e.rpctoken||f.rpctoken;h||(h=d.rpctoken||String(Math.round(1E8*_.Vj())),k.rpctoken=h);d.rpctoken=h;_.be(k,d.connectWithQueryParams?e:f);k=a.location.href;a=_.$d();(h=_.de(k,"_bsh",_.ke.bsh))&&(a._bsh=h);(k=_.ke.dpo?_.ke.h:_.de(k,"jsh",_.ke.h))&&(a.jsh=k);d.hintInFragment?_.be(a,f):_.be(a,e);return _.qk(b,e,f,d.paramsSerializer)}; +Ik=function(a){_.dk(!a||_.sk.test(a),"Illegal url for new iframe - "+a)}; +_.Jk=function(a,b,c,d,e){Ik(c.src);var f,h=yk(d,c),k=h?zk(d):"";try{window.document.all&&(f=a.createElement('',null)):(a=_.gb(e),a=_.vd('',null));_.Fb&&!_.Jb?_.Ad(d.documentElement,a):d.write(_.ud(a));_.N(d.getElementById(e),"load",this.ed,!1,this);var f=_.Gd("TEXTAREA",this.oa);a=0;for(c=f.length;a=a.C);return c},Bz=function(a,c,d){if(!(null!=d&&Math.random()>d)){d=new _.Eg;switch(c){case "i":c=36;break;case "x":c=37;_.F(d,28,1);break;case "n":c=37;_.F(d,28,2);break;case "a":c=38;_.F(d,29,1);break;default:return}a.log(c,d)}},Cz=function(a,c,d,e,f,g,h,l){this.data={};_.tb(this.data,{ogsr:Math.round(1/a),ei:c,ct:e,cad:f,id:d,loc:window.google?window.google.sn:"",prid:g,ogd:h,ogprm:"up"}); +if(l)for(a=l.split("&"),c=0;c=f)g=f;else{this.b.log(Error("ga`"+c+"`"+d+"`"+f));return}if(Math.random()<=g){var h=new Cz(g,this.w,a,c,d,this.B,this.D,e);this.o?h.b():_.Jg(h)}}catch(l){this.b.log(Error("ga`"+c+"`"+d+"`"+f))}};var Ez=function(a){_.C(this,a,0,-1,null,null)};_.y(Ez,_.B); +var Fz=function(a,c,d,e,f){_.co.call(this,c,d,f);this.B=a;this.A=e};_.y(Fz,_.co);Fz.prototype.$b=function(){this.B.w(this.A,this.o,"1",this.b)};Fz.prototype.Ac=function(a){a=this.Qb()+(a||1);this.B.w(this.A,this.w,a.toString(),this.b)};Fz.prototype.Td=function(){return!!this.B.b(this.A,this.o,this.b)};Fz.prototype.Qb=function(){var a=this.B.b(this.A,this.w,this.b);return(0,window.parseInt)(a||0,10)}; +var Gz=function(a,c,d,e,f,g,h,l,q,r,x){if(r||x)try{var J=new _.io(a,f,g,h,l,d,r,x)}catch(ab){J=null}else J=null;switch(e){case 2:case 6:return J;case 1:return new Fz(c,f,g,q,void 0);default:return new _.ho(a,f,g,l)}};var Hz=function(a){_.L.call(this);this.o=a;_.w("gbar.up.spd",(0,_.u)(this.w,this));_.w("gbar.up.gpd",(0,_.u)(this.b,this));_.w("gbar.up.dpc",(0,_.u)(this.C,this));_.w("gbar.up.iic",(0,_.u)(this.B,this));_.w("gbar.up.gcc",(0,_.u)(this.A,this))};_.y(Hz,_.L);var Iz=function(){try{return!!_.m.localStorage&&"object"==typeof _.m.localStorage}catch(a){return!1}},Jz=function(a){return a&&a.style&&a.style.behavior&&"undefined"!=typeof a.load}; +Hz.prototype.w=function(a,c,d,e){try{window.navigator.cookieEnabled&&(e||(c="og-up-"+c),Iz()?_.m.localStorage.setItem(c,d):Jz(a)&&(a.setAttribute(c,d),a.save(a.id)))}catch(f){f.code!=window.DOMException.QUOTA_EXCEEDED_ERR&&this.o.log(f)}};var Kz=function(a,c,d){try{window.navigator.cookieEnabled&&(d="og-up-"+d,Iz()?_.m.localStorage.removeItem(d):Jz(c)&&(c.removeAttribute(d),c.save(c.id)))}catch(e){e.code!=window.DOMException.QUOTA_EXCEEDED_ERR&&a.o.log(e)}}; +Hz.prototype.b=function(a,c,d){try{if(!window.navigator.cookieEnabled)return"";d||(c="og-up-"+c);if(Iz())return _.m.localStorage.getItem(c);if(Jz(a))return a.load(a.id),a.getAttribute(c)}catch(e){e.code!=window.DOMException.QUOTA_EXCEEDED_ERR&&this.o.log(e)}return""};Hz.prototype.C=function(a,c){(new _.ho(this.o,a,1,c)).ua()};Hz.prototype.B=function(a,c){_.go(new _.ho(this.o,a,1,c))};Hz.prototype.A=function(a,c){return(new _.ho(this.o,a,1)).Qb(c)}; +var Mz=function(a,c,d,e,f,g){_.pj.call(this,a,e);this.b=a;this.C=_.I(_.D(c,1));this.W=_.I(_.D(c,2));this.fa=_.I(_.D(c,3));_.E(c,4,25);this.Na=_.K(_.D(c,5));this.Sb=_.K(_.E(c,6,-1));this.ma=_.H(_.D(c,9));this.H=this.Db();this.D=Lz;this.ub=!1;this.N=f;this.V=g;this.M=_.S(this.D.Of,this.b);this.kc=_.S(this.D.Xf,this.b);this.ca=_.S(this.D.Sf,this.b);this.Cb="";this.vb=!1;var h,l;c.F&&(h=_.I(c.F()));c.D&&(l=_.I(c.D()));if(l||h)this.Cb=l||h||"",this.vb=!!l;this.B=Gz(e,this.V,d,this.Na,this.W,_.K(_.E(c, +4,25)),this.C,this.Sb,this.b,h,l)};_.y(Mz,_.pj);Mz.prototype.R=function(){Mz.J.R.call(this);this.ca=this.kc=this.M=null};var Lz={Of:"gb_yd",Xf:"gb_Ud",Sf:"gb_wd",mc:"gb_g"};Mz.prototype.open=function(){_.cj(this.b,this.D.mc)||(_.T(this.b,this.D.mc),this.b.removeAttribute("aria-hidden"))};Mz.prototype.Db=function(){return{Fh:"i",accept:"a",ua:"d",kc:"x"}};Mz.prototype.close=function(){_.cj(this.b,this.D.mc)&&(_.U(this.b,this.D.mc),this.b.setAttribute("aria-hidden","true"))}; +var Nz=function(a,c){if(!a.H.accept)throw Error("Ja`accept");a.H.accept=c},Oz=function(a,c,d){c&&_.uj(a,c,_.lj,d,!1,a)};Mz.prototype.Hc=function(){Oz(this,this.M,this.lb);Oz(this,this.kc,this.Vb);Oz(this,this.ca,this.Ub)};Mz.prototype.T=function(){return!this.ma&&!Az(this.B)};Mz.prototype.F=function(){return""};var Pz=function(a){var c="";a&&(a=a.getAttributeNode("data-ved"))&&a.value&&(c=["&ved=",a.value].join(""));return c},Qz=function(a){var c=a.F();a.ma&&(c+="&vis=0");a.N.log(a.C,a.fa,"i",c,1)}; +Mz.prototype.K=function(){this.T()?(this.Hc(),this.open(),_.go(this.B),Qz(this)):this.ma&&!Az(this.B)&&Qz(this)};var Rz=function(a,c,d,e,f,g){var h=c==a.H.accept;a.ub||(h&&!g||a.N.log(a.C,a.fa,c,a.F()+Pz(d),1),f||0==a.Na?2==a.Na&&(c=a.N,d=a.vb,e=_.ao(c.b,a.W,a.C,"l",3,e,a.Cb),_.bo(e,c.A,d)):(h?a.B.accept(e):a.B.ua(e),a.ub=!0));a.close()};Mz.prototype.lb=function(a,c,d){Rz(this,this.H.accept,a.target,"2",c,d)};Mz.prototype.Vb=function(a,c){Rz(this,this.H.kc,a.target,"1",c);a.preventDefault();a.stopPropagation()}; Mz.prototype.Ub=function(a,c){Rz(this,this.H.ua,a.target,"3",c)}; +var Sz=function(a,c){this.o=c;this.b={};this.b.mouseout=_.I(_.D(a,1));this.b.mouseover=_.I(_.D(a,2));this.b.mousedown=_.I(_.D(a,3))},Tz=function(a,c){if(c)for(var d in a.b){var e=a.b[d];e&&_.qi(a.o,c,d,(0,_.u)(function(a){c.style.color=a},a,e))}},Uz=function(a,c){for(var d=0;dwindow.document.body.clientWidth?this.close():!Az(this.Z)&&!this.D&&this.open()}}catch(d){this.w.log(d)}};_.k.di=function(){this.K?(this.D=!0,this.close()):$z(this,"a")};_.k.yh=function(a){$z(this,"x");Bz(this.X,"x");a.preventDefault();a.stopPropagation()};_.k.Sg=function(){$z(this,"n");Bz(this.X,"n")}; +_.k.Jg=function(a){Bz(this.X,"a");this.C&&11!=aA(this.C.value).length?(this.C.pattern&&(this.C.pattern="^\\+?1?[-()\\s]*([0,2-9][-()\\s]*)([\\d][-()\\s]*){9}$",this.C.dispatchEvent(new window.Event("input"))),a.preventDefault(),a.stopPropagation()):($z(this,"a"),this.K&&(a.preventDefault(),a.stopPropagation(),bA(this)))}; +var bA=function(a){if(a.C&&11!=aA(a.C.value).length)a.na();else{cA(a,a.ma);var c=(0,_.u)(a.qd,a),d=(0,_.u)(a.na,a);_.le=new _.Mn;_.ag("//www.google.com/_/og/promos/g?authuser="+a.Yb,function(){this.Cc()?c(this.Sc()):d()},"POST",dA(a),null,void 0,!0)}},dA=function(a){var c="d2m=igs&g="+a.vb+"&p="+a.P+"&t="+a.td;a.C&&(c+="&pn="+aA(a.C.value));a.Ma&&(c+="&s="+a.Ma);return c},cA=function(a,c,d){_.U(c,"gb_ab");d&&0window.document.body.clientWidth?(this.close(),this.na=!0):this.Wa&&this.na&&!Az(this.B)&&(this.open(),this.na=!1)}}catch(d){this.w.log(d)}};_.k.$h=function(a){this.P?(this.Wa=!1,this.close()):Rz(this,"a",a.target,"2")}; +_.k.lb=function(a,c){Bz(this.rb,"a");this.Wb&&null!=window.launchConsentDialog?(a.preventDefault(),a.stopPropagation(),this.close(),window.launchConsentDialog()):this.o&&11!=iA(this.o.value).length?(this.o.pattern&&(this.o.pattern="^\\+?1?[-()\\s]*([0,2-9][-()\\s]*)([\\d][-()\\s]*){9}$",this.o.dispatchEvent(new window.Event("input"))),a.preventDefault(),a.stopPropagation()):(Rz(this,"a",a.target,"2",c),this.P&&(a.preventDefault(),a.stopPropagation(),this.N.log(this.C,this.fa,"a",this.F(),1),jA(this)))}; +var jA=function(a){if(a.o&&11!=iA(a.o.value).length)a.La();else{kA(a,a.Ja);var c=(0,_.u)(a.Tf,a),d=(0,_.u)(a.La,a);_.le=new _.Mn;_.ag("//www.google.com/_/og/promos/g?authuser="+a.qd,function(){this.Cc()?c(this.Sc()):d()},"POST",lA(a),null,void 0,!0)}},lA=function(a){var c=a.Tb;a.o&&(c+="&pn="+iA(a.o.value));a.ja&&(c+="&s="+a.ja);return c},kA=function(a,c,d){_.U(c,"gb_ab");d&&0d;this.o++;var f=40=Math.floor(window.google.time()/864E5)-7)return!0;Kz(a.o,c,"web-pr-hpvisit");return!1},BA=function(a,c,d){try{return c.isHomePage(d)}catch(e){return a.b.log(e),!0}},CA=function(a,c){var d=!1;try{try{d= _.m.external.isGoogleHomePage()}catch(h){if(AA(a,c))return!0;var e=zA.slice(0),f=a.o.b(c,"mgmhp_hp_url");f&&e.push(f);for(f=0;fc||11(0,window.parseInt)(_.Zb,10)?d=!1:(d=new _.fk(window.document.baseURI),d=!(new RegExp(c)).test(d.kb)||"/search"!=d.Ka()||"utf-8"!=d.Ua.get("ie")||window.document.referrer&&0=c);e++);ec?a:1)};Y(X.O(),new Z(1,CC));var DC=function(){var a=_.t("window.devicePixelRatio")||1,c=_.t("screen.width")||0;return c*((_.t("window.top.outerWidth")||0)*a>c?a:1)};Y(X.O(),new Z(2,DC));Y(X.O(),new Z(26,function(){return _.t("screen.height")||0}));Y(X.O(),new Z(27,function(){return _.t("screen.width")||0})); +Y(X.O(),new Z(3,function(){var a=EC(),c=CC();return 1==a?0:c/a*25.4}));Y(X.O(),new Z(4,function(){var a=EC(),c=DC();return 1==a?0:c/a*25.4}));Y(X.O(),new Z(28,function(){return _.t("window.devicePixelRatio")||1}));var EC=function(){a:{var a=1;var c=1E3;do{var d=Math.floor((c-a)/2+a),e=window.matchMedia("(max-resolution:"+d.toString()+"dpi)").matches,f=window.matchMedia("(min-resolution:"+d.toString()+"dpi)").matches;if(f&&e){a=d;break a}f?a=d+1:c=d-1}while(c>=a);a=null}return a||1}; +Y(X.O(),new Z(29,EC));Y(X.O(),new Z(5,function(){return _.t("window.top.outerHeight")||0}));Y(X.O(),new Z(6,function(){return _.t("window.top.outerWidth")||0}));Y(X.O(),new Z(7,function(){return Math.pow(2,_.t("screen.colorDepth")||0)}));Y(X.O(),new Z(24,function(){return"ontouchstart"in window||"onmsgesturechange"in window})); +var GC=function(a,c,d){this.hasOwnProperty("logger");this.D=c;try{this.w=d||_.Pd("video")}catch(e){}Z.call(this,a,FC)};_.y(GC,Z);var FC=function(){return""!=(this.w&&this.w.canPlayType||function(){return""}).call(this.w,this.D).replace(/^no$/,"")};Y(X.O(),new GC(8,'video/mp4; codecs="avc1.42E01E, mp4a.40.2"'));Y(X.O(),new GC(9,'video/ogg; codecs="theora"'));Y(X.O(),new GC(10,'video/webm; codecs="vp8, vorbis"')); +_.w("drasil.iframe.run",function(){wC()});_.R(function(){var a=_.P.O().ea;_.G(a,pC,23)&&wC()}); +}catch(e){_._DumpException(e)} +try{ +var pr=function(a,c){_.pj.call(this,a,c);this.o=_.S("gb_5f",this.b);this.B=_.Ic("el")};_.y(pr,_.pj);pr.prototype.D=function(){_.Ad(this.o,_.wd);this.B.gb()};pr.prototype.C=function(a){this.o.appendChild(a);this.B.gb()};_.R(function(){var a=_.S("gb_yg");if(a){var c=_.Q();a=new pr(a,c);_.w("gbar.sncw",(0,_.u)(a.D,a));_.w("gbar.snaw",(0,_.u)(a.C,a))}}); +}catch(e){_._DumpException(e)} +try{ +var lt=function(a){if(a instanceof _.de)return a;if("function"==typeof a.nc)return a.nc(!1);if(_.Ba(a)){var c=0,d=new _.de;d.next=function(){for(;;){if(c>=a.length)throw _.ce;if(c in a)return a[c++];c++}};return d}throw Error("r");},mt=function(a,c){if(_.Ba(a))try{(0,_.La)(a,c,void 0)}catch(d){if(d!==_.ce)throw d;}else{a=lt(a);try{for(;;)c.call(void 0,a.next(),void 0,a)}catch(d){if(d!==_.ce)throw d;}}},nt=function(a){if(_.Ba(a))return _.Ta(a);a=lt(a);var c=[];mt(a,function(a){c.push(a)});return c}, ot=function(){}; +var pt=function(){this.b={}};_.y(pt,ot);pt.prototype.get=function(a){return _.n(this.b[a])?this.b[a]:null};pt.prototype.remove=function(a){delete this.b[a]};pt.prototype.set=function(a,c){this.b[a]=c};_.qt=function(a,c,d,e,f){if(1440=d.length)throw _.ce;var e=d.key(c++);if(a)return e;e=d.getItem(e);if(!_.p(e))throw"Storage mechanism: Invalid value was encountered";return e};return e};_.k.clear=function(){this.b.clear()};_.k.key=function(a){return this.b.key(a)}; +var tt=function(){var a=null;try{a=window.localStorage||null}catch(c){}this.b=a};_.y(tt,st);var ut=function(a){this.b=a};ut.prototype.set=function(a,c){_.n(c)?this.b.set(a,(new _.ci).o(c)):this.b.remove(a)};ut.prototype.get=function(a){try{var c=this.b.get(a)}catch(d){return}if(null!==c)try{return JSON.parse(c)}catch(d){throw"Storage: Invalid value was encountered";}};ut.prototype.remove=function(a){this.b.remove(a)}; +_.xt=function(a,c){_.O.call(this);this.B=a;this.H=c;this.F=new _.fi(this);_.Tc(this,this.F);a=new tt;if(a.b)try{a.b.setItem("__sak","1");a.b.removeItem("__sak");var d=!0}catch(e){d=!1}else d=!1;if(d&&(!_.A||_.A&&_.$b("9")))this.F.L(window,"storage",this.K),d=new ut(a);else if(this.B.o)d=new ut(new pt);else throw Error("va");this.G=d;this.D="tr-"+this.B.A;d=vt(this);this.A=wt(d,"nrt");this.w=wt(d,"nrt-e");this.b=wt(d,"nrt-r");this.o=wt(d,"rc",0);this.C=!0};_.y(_.xt,_.O); +var wt=function(a,c,d){d=_.n(d)?d:-1;if(null==a[c])return d;a=_.ai(a[c]);return(0,window.isNaN)(a)?d:a},vt=function(a){try{return a.G.get(a.D)||{}}catch(c){return{}}};_.xt.prototype.K=function(a){if(a.Pa.key===this.D){try{var c=JSON.parse(a.Pa.newValue);var d=wt(c,"nrt");var e=wt(c,"nrt-e");var f=wt(c,"nrt-r");var g=wt(c,"rc",0)}catch(h){f=e=d=-1,g=0}a=this.A!=d;this.A=d;this.w=e;this.b=f;this.o=g;a&&this.dispatchEvent(new yt)}}; var zt=function(a,c,d,e,f){var g=vt(a);g.nrt=c;_.n(d)&&(g["nrt-e"]=d);_.n(e)&&(g["nrt-r"]=e);_.n(f)&&(g.rc=f);a.G.set(a.D,g);a.A=wt(g,"nrt");a.w=wt(g,"nrt-e");a.b=wt(g,"nrt-r");a.o=wt(g,"rc",0)},yt=function(){_.df.call(this,"update")};_.y(yt,_.df); +_.At=function(a,c){_.L.call(this);this.F=a;this.A=new _.fi(this);_.Tc(this,this.A);this.o=new _.Xf;_.Tc(this,this.o);this.A.L(this.o,"success",this.Ah).L(this.o,"error",this.zh).L(this.o,"timeout",this.Bh);this.B=new _.Ff;_.Tc(this,this.B);this.A.L(this.B,"tick",this.G);this.b=c;_.Tc(this,this.b);this.A.L(this.b,"update",this.ph)};_.y(_.At,_.L);_.k=_.At.prototype;_.k.ph=function(){this.B.stop();this.o.b&&this.o.abort();Bt(this)};_.k.zh=function(){Ct(this)}; +_.k.Ah=function(){try{var a=this.o.Sc();if(null!=a.nrt){var c=_.ai(a.nrt);if((0,window.isNaN)(c)||cf+864E5?f+864E5:g;a:{e=a.b;if(e.C){if(f=e.A,-1==f||f<(0,_.v)()){e=Math.floor(Math.random()*e.B.w);break a}}else if(0~\.\[:]+)/g,1);b=ntp_7a(b,c,/(\.[^\s\+>~\.\[:]+)/g,2);b=ntp_7a(b,c,/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,3); +b=ntp_7a(b,c,/(:[\w-]+\([^\)]*\))/gi,2);b=ntp_7a(b,c,/(:[^\s\+>~\.\[:]+)/g,2);b=b.replace(/[\*\s\+>~]/g," ");b=b.replace(/[#\.]/g," ");ntp_7a(b,c,/([^\s\+>~\.\[:]+)/g,3);b=c;return ntp_5a[a]=b},ntp_7a=function(a,b,c,d){return a.replace(c,function(e){b[d]+=1;return Array(e.length+1).join(" ")})},ntp_6a=function(a,b){return a.replace(b,function(c){return Array(c.length+1).join("A")})},ntp_kl=function(a){return ntp_jl[a]},ntp_9a=function(a,b){a=ntp_a[a];return a&&a.prototype?(b=Object.getOwnPropertyDescriptor(a.prototype, +b))&&b.get||null:null},ntp_$a=function(a,b){return(a=ntp_a[a])&&a.prototype&&a.prototype[b]||null},ntp_ab=function(a,b,c,d){if(a)return a.apply(b);a=b[c];if(!d(a))throw Error("Q");return a},ntp_bb=function(a,b,c,d){if(a)return a.apply(b,d);if(ntp_h.product.La&&10>document.documentMode){if(!b[c].call)throw Error("R");}else if("function"!=typeof b[c])throw Error("Q");return b[c].apply(b,d)},ntp_db=function(a){return ntp_ab(ntp_cb,a,"attributes",function(b){return b instanceof NamedNodeMap})},ntp_fb= +function(a,b,c){try{ntp_bb(ntp_eb,a,"setAttribute",[b,c])}catch(d){if(-1==d.message.indexOf("A security problem occurred"))throw d;}},ntp_hb=function(a){return ntp_ab(ntp_gb,a,"style",function(b){return b instanceof CSSStyleDeclaration})},ntp_jb=function(a){return ntp_ab(ntp_ib,a,"sheet",function(b){return b instanceof CSSStyleSheet})},ntp_lb=function(a){return ntp_ab(ntp_kb,a,"nodeName",function(b){return"string"==typeof b})},ntp_nb=function(a){return ntp_ab(ntp_mb,a,"nodeType",function(b){return"number"== +typeof b})},ntp_pb=function(a){return ntp_ab(ntp_ob,a,"parentNode",function(b){return!(b&&"string"==typeof b.name&&b.name&&"parentnode"==b.name.toLowerCase())})},ntp_rb=function(a,b){return ntp_bb(ntp_qb,a,a.getPropertyValue?"getPropertyValue":"getAttribute",[b])||""},ntp_tb=function(a,b,c){ntp_bb(ntp_sb,a,a.setProperty?"setProperty":"setAttribute",[b,c])},ntp_Bn=function(a,b){var c=new Set,d=new Set([].concat(ntp_Ib(a.keys()),ntp_Ib(b.keys())));d=ntp_c(d);for(var e=d.next();!e.done;e=d.next())e= +e.value,ntp_9b(a.getAll(e),b.getAll(e))||c.add(e);return c},ntp_En=function(){var a=ntp_Cn();return(a=ntp_m(a)&&ntp_g(a.url)&&ntp_m(a.metadata)&&ntp_j(a.metadata.nk)&&ntp_j(a.metadata.ud)&&ntp_j(a.metadata.Qc)&&ntp_j(a.metadata.Fc)?a:null)&&ntp_m(a.Od)?a:{state:null,url:ntp_Dn(),Od:{}}},ntp_Fn=function(a){var b=a.metadata;a={state:a.state,url:a.url};b&&(a.metadata=b);return Object.freeze?Object.freeze(a):a},ntp_Jn=function(a){0==ntp_Gn++&&ntp_Hn.url==ntp_Fn(ntp_En()).url&&null!==a&&null===a.rb.state|| +ntp_In()},ntp_Kn=function(){ntp_In()},ntp_In=function(a){a=void 0===a?!1:a;var b=ntp_En(),c=ntp_Fn(b),d=ntp_Ln,e=ntp_Fn(ntp_Hn),f=ntp_n(ntp_Mn,null,c,e);a||ntp_Nn(b.Od);ntp_Hn=b;d?0!=d.status?ntp_Vf(d.finished,function(){return f(new Set)}):(ntp_Vf(d.finished,function(){f(d.yc)}),d.resolve(b),d.status=1):f(new Set)},ntp_Mn=function(a,b,c){for(var d=b.url&&a.url&&b.url==a.url,e=ntp_c(ntp_On),f=e.next();!f.done;f=e.next())if(f=f.value,!c.has(f)){var g=ntp_Pn.get(f);(!d||g&&g.Dm)&&f(a,b)}!d&&0=e}});ntp_Bb("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=ntp_Jb(this,b,"startsWith"),e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g=f}}); +ntp_Bb("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(h){return h};var e=[],f="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof f){b=f.call(b);for(var g=0;!(f=b.next()).done;)e.push(c.call(d,f.value,g++))}else for(f=b.length,g=0;gc&&(c=Math.max(c+e,0));c>>0),ntp_Sb=0,ntp_Ub=function(a,b,c){return a.call.apply(a.bind,arguments)},ntp_Vb=function(a,b,c){if(!a)throw Error();if(2b?null:ntp_g(a)?a.charAt(b):a[b]},ntp_Zb=function(a,b,c){for(var d= +a.length,e=ntp_g(a)?a.split(""):a,f=0;f=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)},ntp_7b=function(a,b){b=b||a;for(var c={},d=0,e=0;eb?1:a")&&(a=a.replace(ntp_gc,">"));-1!=a.indexOf('"')&&(a=a.replace(ntp_hc,"""));-1!=a.indexOf("'")&&(a=a.replace(ntp_ic, +"'"));-1!=a.indexOf("\x00")&&(a=a.replace(ntp_jc,"�"));return a},ntp_ec=/&/g,ntp_fc=//g,ntp_hc=/"/g,ntp_ic=/'/g,ntp_jc=/\x00/g,ntp_dc=/[\x00&<>"']/,ntp_sc=String.prototype.repeat?function(a,b){return a.repeat(b)}:function(a,b){return Array(b+1).join(a)},ntp_mc=function(a,b){var c=0;a=ntp_w(String(a)).split(".");b=ntp_w(String(b)).split(".");for(var d=Math.max(a.length,b.length),e=0;0==c&&eb?1:0},ntp_nc=function(a){return String(a).replace(/\-([a-z])/g,function(b,c){return c.toUpperCase()})},ntp_oc=function(a){return String(a).replace(/([A-Z])/g,"-$1").toLowerCase()},ntp_pc=function(a){var b=ntp_g(void 0)?"undefined".replace(/([-()\[\]{}+?*.$\^|,:#parseFloat(a))?String(b):a};ntp_h.Tk=function(){var a=ntp_h.dh();if(ntp_h.Bd)return/rv:([^\);]+)(\)|;)/.exec(a);if(ntp_h.Uc)return/Edge\/([\d\.]+)/.exec(a);if(ntp_h.La)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(ntp_h.uc)return/WebKit\/(\S+)/.exec(a);if(ntp_h.kc)return/(?:Version)[ \/]?(\S+)/.exec(a)};ntp_h.Vg=function(){var a=ntp_a.document;return a?a.documentMode:void 0}; +ntp_h.VERSION=ntp_h.Ze();ntp_h.compare=function(a,b){return ntp_mc(a,b)};ntp_h.Zl={};ntp_h.Kb=function(a){return ntp_h.Pi||ntp_Qc(a,function(){return 0<=ntp_mc(ntp_h.VERSION,a)})};ntp_h.rh=ntp_h.Kb;ntp_h.md=function(a){return Number(ntp_h.Vi)>=a};ntp_h.Ip=ntp_h.md;var ntp_bg;var ntp_vh=ntp_a.document;ntp_bg=ntp_vh&&ntp_h.La?ntp_h.Vg()||("CSS1Compat"==ntp_vh.compatMode?parseInt(ntp_h.VERSION,10):5):void 0;ntp_h.Vi=ntp_bg; +ntp_h.product={};ntp_h.product.mg=!1;ntp_h.product.Tc=!1;ntp_h.product.Sc=!1;ntp_h.product.zd=!1;ntp_h.product.lg=!1;ntp_h.product.tg=!1;ntp_h.product.Wc=ntp_h.Ie||ntp_h.He||ntp_h.Le||ntp_h.product.mg||ntp_h.product.Tc||ntp_h.product.Sc||ntp_h.product.zd||ntp_h.product.lg||ntp_h.product.tg;ntp_h.product.kc=ntp_h.kc;ntp_h.product.La=ntp_h.La;ntp_h.product.Uc=ntp_h.Uc;ntp_h.product.xg=ntp_h.product.Wc?ntp_h.product.mg:ntp_ue();ntp_h.product.Ul=function(){return ntp_Kc()||ntp_x("iPod")}; +ntp_h.product.Oe=ntp_h.product.Wc?ntp_h.product.Tc:ntp_h.product.Ul();ntp_h.product.Ne=ntp_h.product.Wc?ntp_h.product.Sc:ntp_x("iPad");ntp_h.product.ANDROID=ntp_h.product.Wc?ntp_h.product.zd:ntp_Ic();ntp_h.product.CHROME=ntp_h.product.Wc?ntp_h.product.lg:ntp_Gc();ntp_h.product.Xl=function(){return ntp_Hc()&&!ntp_Lc()};ntp_h.product.Qe=ntp_h.product.Wc?ntp_h.product.tg:ntp_h.product.Xl(); +var ntp_Uc=null,ntp_Vc=null,ntp_Wc=function(a,b){if(!ntp_Uc){ntp_Uc={};ntp_Vc={};for(var c=0;65>c;c++)ntp_Uc[c]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(c),ntp_Vc[c]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(c)}b=b?ntp_Vc:ntp_Uc;c=[];for(var d=0;d>2;e=(e&3)<<4|g>>4;g=(g&15)<<2|k>>6;k&=63;h||(k=64,f||(g=64));c.push(b[l],b[e],b[g],b[k])}return c.join("")}; +var ntp_Yh=function(a){this.o=0;this.w=a};ntp_Yh.prototype.next=function(){return this.o+~[\]()=^$|]+$/.test(c))throw Error("m`"+a);a:{for(var d={"(":")","[":"]"},e=[],f=0;f",0);var ntp_Dd=ntp_Cd("",0),ntp_ml=ntp_Cd("
",0); +var ntp_Ed=ntp_5c(function(){var a=document.createElement("div");a.innerHTML="
";var b=a.firstChild.firstChild;a.innerHTML="";return!b.parentElement}),ntp_Fd=function(a,b){b=ntp_Bd(b);if(ntp_Ed())for(;a.lastChild;)a.removeChild(a.lastChild);a.innerHTML=b},ntp_$j=function(a,b){b=b instanceof ntp_cd?b:ntp_Fo(b);a.href=ntp_dd(b)}; +var ntp_im=function(a,b){return ntp_Cd(a,b||null)};var ntp_Gd=function(a,b){return a+Math.random()*(b-a)};var ntp_Hd=function(a,b){this.x=ntp_d(a)?a:0;this.y=ntp_d(b)?b:0};ntp_=ntp_Hd.prototype;ntp_.equals=function(a){return a instanceof ntp_Hd&&(this==a?!0:this&&a?this.x==a.x&&this.y==a.y:!1)};ntp_.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};ntp_.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};ntp_.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this}; ntp_.scale=function(a,b){b=ntp_j(b)?b:a;this.x*=a;this.y*=b;return this}; +var ntp_up=function(a,b){this.width=a;this.height=b};ntp_=ntp_up.prototype;ntp_.aspectRatio=function(){return this.width/this.height};ntp_.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};ntp_.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};ntp_.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this}; ntp_.scale=function(a,b){b=ntp_j(b)?b:a;this.width*=a;this.height*=b;return this}; +var ntp_Kd=function(a){return a?new ntp_Id(ntp_Jd(a)):ntp_Wb||(ntp_Wb=new ntp_Id)},ntp_f=function(a){var b=document;return ntp_g(a)?b.getElementById(a):a},ntp_Md=function(a,b){var c=b||document;return c.querySelectorAll&&c.querySelector?c.querySelectorAll("."+a):ntp_Ld(document,a,b)},ntp_Ho=function(a){var b=document;b.getElementsByClassName?a=b.getElementsByClassName(a)[0]:(b=document,a=b.querySelectorAll&&b.querySelector&&a?b.querySelector(a?"."+a:""):ntp_Ld(b,a,void 0)[0]||null);return a||null}, +ntp_Ld=function(a,b,c){var d;a=c||a;if(a.querySelectorAll&&a.querySelector&&b)return a.querySelectorAll(b?"."+b:"");if(b&&a.getElementsByClassName){var e=a.getElementsByClassName(b);return e}e=a.getElementsByTagName("*");if(b){var f={};for(c=d=0;a=e[c];c++){var g=a.className;"function"==typeof g.split&&ntp_u(g.split(/\s+/),b)&&(f[d++]=a)}f.length=d;return f}return e},ntp_Od=function(a,b){ntp_y(b,function(c,d){c&&"object"==typeof c&&c.Zb&&(c=c.Ob());"style"==d?a.style.cssText=c:"class"==d?a.className= +c:"for"==d?a.htmlFor=c:ntp_Nd.hasOwnProperty(d)?a.setAttribute(ntp_Nd[d],c):ntp_bc(d,"aria-")||ntp_bc(d,"data-")?a.setAttribute(d,c):a[d]=c})},ntp_Nd={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"},ntp_vp=function(a){a=a.document.documentElement;return new ntp_up(a.clientWidth,a.clientHeight)},ntp_Pd=function(a){var b= +a.scrollingElement?a.scrollingElement:ntp_h.uc?a.body||a.documentElement:a.documentElement;a=a.parentWindow||a.defaultView;return ntp_h.La&&ntp_h.Kb("10")&&a.pageYOffset!=b.scrollTop?new ntp_Hd(b.scrollLeft,b.scrollTop):new ntp_Hd(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)},ntp_A=function(a){return a?a.parentWindow||a.defaultView:window},ntp_B=function(a,b,c){var d=arguments,e=document,f=String(d[0]),g=d[1];if(!ntp_Xc&&g&&(g.name||g.type)){f=["<",f];g.name&&f.push(' name="',ntp_kc(g.name), +'"');if(g.type){f.push(' type="',ntp_kc(g.type),'"');var h={};ntp_Cc(h,g);delete h.type;g=h}f.push(">");f=f.join("")}f=e.createElement(f);g&&(ntp_g(g)?f.className=g:ntp_k(g)?f.className=g.join(" "):ntp_Od(f,g));2=a.keyCode)a.keyCode=-1}catch(b){}}; +var ntp_8d="closure_listenable_"+(1E6*Math.random()|0),ntp_9d=function(a){return!(!a||!a[ntp_8d])},ntp_$d=0;var ntp_ae=function(a,b,c,d,e){this.listener=a;this.proxy=null;this.src=b;this.type=c;this.capture=!!d;this.Bc=e;this.key=++ntp_$d;this.removed=this.Zd=!1},ntp_be=function(a){a.removed=!0;a.listener=null;a.proxy=null;a.src=null;a.Bc=null};var ntp_ce=function(a){this.src=a;this.o={};this.w=0};ntp_ce.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.o[f];a||(a=this.o[f]=[],this.w++);var g=ntp_de(a,b,d,e);-1c.keyCode||void 0!=c.returnValue)){a:{var e=!1;if(0==c.keyCode)try{c.keyCode=-1;break a}catch(g){e=!0}if(e||void 0==c.returnValue)c.returnValue=!0}c=[];for(e=b.o;e;e=e.parentNode)c.push(e);a=a.type;for(e=c.length-1;!b.w&&0<=e;e--){b.o=c[e];var f=ntp_se(c[e],a,!0,b);d=d&&f}for(e=0;!b.w&&e>>0),ntp_je=function(a){if(ntp_l(a))return a;a[ntp_te]||(a[ntp_te]=function(b){return a.handleEvent(b)});return a[ntp_te]}; +var ntp_fa=null,ntp_ea=null,ntp_9f=function(a){google.log("backbutton","&tt="+a+"&ei="+google.kEI)};ntp_aa()&&ntp_9f("navigation");ntp_D(ntp_A(),"pageshow",function(a){a.rb.persisted&&(ntp_Hc()&&ntp_ga(),ntp_9f("pageshow"))},!1);ntp_D(ntp_A(),"popstate",function(){ntp_Hc()&&ntp_fa&&ntp_ea==ntp_Rc().href?(clearTimeout(ntp_fa),ntp_ea=ntp_fa=null):ntp_9f("popstate")},!1);ntp_Hc()&&ntp_ga(); +var ntp_Te=function(){this.o=[]},ntp_ua=function(a){return a.o.map(function(b){return ntp_Ue(b)})},ntp_Ue=function(a){var b=void 0;b=void 0===b?function(c){return new c}:b;return a.Ya?b(a.Ya):a.Nl},ntp_Ve=function(){this.o=[]};ntp_i(ntp_Ve,ntp_Te);var ntp_We=function(a,b){a.o.push({Nl:b})}; +var ntp_ta=function(a,b){return 0=this.left&&a.w<=this.w&&a.top>=this.top&&a.o<=this.o:a.x>=this.left&&a.x<=this.w&&a.y>=this.top&&a.y<=this.o:!1};ntp_.ceil=function(){this.top=Math.ceil(this.top);this.w=Math.ceil(this.w);this.o=Math.ceil(this.o);this.left=Math.ceil(this.left);return this}; +ntp_.floor=function(){this.top=Math.floor(this.top);this.w=Math.floor(this.w);this.o=Math.floor(this.o);this.left=Math.floor(this.left);return this};ntp_.round=function(){this.top=Math.round(this.top);this.w=Math.round(this.w);this.o=Math.round(this.o);this.left=Math.round(this.left);return this};ntp_.scale=function(a,b){b=ntp_j(b)?b:a;this.left*=a;this.w*=a;this.top*=b;this.o*=b;return this}; +var ntp_Ke=function(a,b,c){if(ntp_g(b))(b=ntp_Je(a,b))&&(a.style[b]=c);else for(var d in b){c=a;var e=b[d],f=ntp_Je(c,d);f&&(c.style[f]=e)}},ntp_Le={},ntp_Je=function(a,b){var c=ntp_Le[b];if(!c){var d=ntp_nc(b);c=d;void 0===a.style[d]&&(d=ntp_ze()+ntp_pc(d),void 0!==a.style[d]&&(c=d));ntp_Le[b]=c}return c},ntp_Me=function(a,b){var c=a.style[ntp_nc(b)];return"undefined"!==typeof c?c:a.style[ntp_Je(a,b)]||""},ntp_2a=function(a,b){var c=ntp_Jd(a);return c.defaultView&&c.defaultView.getComputedStyle&& +(a=c.defaultView.getComputedStyle(a,null))?a[b]||a.getPropertyValue(b)||"":""},ntp_Ne=function(a,b){a.style.display=b?"":"none"},ntp_Oe=function(a,b){var c=a.currentStyle?a.currentStyle[b]:null;if(c)if(/^\d+px?$/.test(c))a=parseInt(c,10);else{b=a.style.left;var d=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=b;a.runtimeStyle.left=d;a=+c}else a=0;return a},ntp_3a=function(a,b){if(ntp_h.La){var c=ntp_Oe(a,b+"Left"),d=ntp_Oe(a,b+"Right"), e=ntp_Oe(a,b+"Top");a=ntp_Oe(a,b+"Bottom");return new ntp_Ie(e,d,a,c)}c=ntp_2a(a,b+"Left");d=ntp_2a(a,b+"Right");e=ntp_2a(a,b+"Top");a=ntp_2a(a,b+"Bottom");return new ntp_Ie(parseFloat(e),parseFloat(d),parseFloat(a),parseFloat(c))}; +var ntp_Pe=ntp_z(new ntp_Ee);var ntp_Qe,ntp_Re=function(a,b){try{if((new RegExp("^("+(ntp_Rc().protocol+"//"+ntp_Rc().host)+")?/(url|aclk)\\?.*&rct=j(&|$)")).test(a)){if(!ntp_Qe){ntp_Qe=document.createElement("iframe");ntp_Qe.style.display="none";var c=ntp_Qe;(ntp_f("xjsc")||document.body).appendChild(c)}google.r=1;ntp_Qe.src=a}else b?ntp_a.location.replace(a):ntp_a.location.href=a}catch(d){b?ntp_a.location.replace(a):ntp_a.location.href=a}},ntp_Se=function(){var a=ntp_Rc(),b=a.hash?a.href:"";if(b){var c=b.indexOf("#");b=b.substr(c+ 1)}var d=a.search?a.href.substr(a.href.indexOf("?")+1).replace(/#.*/,""):"";c=b&&b.match(/(^|&)q=/);b=(c?b:d).replace(/(^|&)(fp|tch)=[^&]*/g,"").replace(/^&/,"");return(c?"/search":a.pathname)+(b?"?"+b:"")}; +var ntp_1k=function(a,b,c,d,e,f,g){var h="";a&&(h+=a+":");c&&(h+="//",b&&(h+=b+"@"),h+=c,d&&(h+=":"+d));e&&(h+=e);f&&(h+="?"+f);g&&(h+="#"+g);return h},ntp_Ye=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/,ntp_Sk=function(a){return a?decodeURI(a):a},ntp_Ze=function(a){a=a.match(ntp_Ye)[1]||null;!a&&ntp_a.self&&ntp_a.self.location&&(a=ntp_a.self.location.protocol,a=a.substr(0,a.length-1));return a?a.toLowerCase():""},ntp_8n=function(a){var b= +a.indexOf("#");return 0>b?null:a.substr(b+1)},ntp__e=function(a,b){if(a){a=a.split("&");for(var c=0;cc&&(c=a.length);var d=a.indexOf("?");if(0>d||d>c){d=c;var e=""}else e=a.substring(d+1,c);a=[a.substr(0,d),e,a.substr(c)];c=a[1];a[1]=b?c?c+"&"+b:b:c;return a[0]+(a[1]?"?"+a[1]: +"")+a[2]},ntp_1e=function(a,b,c){if(ntp_k(b))for(var d=0;dd)return null;var e=a.indexOf("&",d);if(0>e||e>c)e=c;d+=b.length+1;return decodeURIComponent(a.substr(d,e-d).replace(/\+/g," "))},ntp_8e=/[?&]($|#)/; +var ntp_9e=encodeURIComponent,ntp_$e=ntp_ja("$,/:;?@[]^`{|}");ntp_ja("=&$,/:;@[]^`{|}");var ntp_af={Ha:function(a){return ntp_9e(a).replace(ntp_$e,decodeURIComponent)},Fb:function(a){return decodeURIComponent(a.replace(/\+/g,"%20"))}};ntp_wb();ntp_zb();var ntp_bf=function(){var a=void 0===a?[]:a;this.o=new Map;this.w=[];a=ntp_c(a);for(var b=a.next();!b.done;b=a.next()){var c=ntp_c(b.value);b=c.next().value;c=c.next().value;this.append(b,c)}};ntp_=ntp_bf.prototype;ntp_.get=function(a){return this.getAll(a)[0]};ntp_.getAll=function(a){return this.o.get(a)||[]};ntp_.set=function(a,b){if(this.has(a)){this.o.set(a,[b]);var c=!0;this.w=ntp_Yb(this.w,function(d){if(d==a)if(c)c=!1;else return!1;return!0})}else this.append(a,b)}; +ntp_.append=function(a,b){this.w.push(a);var c=this.getAll(a);c.push(b);this.o.set(a,c)};ntp_.has=function(a){return this.o.has(a)};ntp_["delete"]=function(a){this.o["delete"](a);this.w=ntp_Yb(this.w,function(b){return b!=a})};ntp_.size=function(){return this.w.length};ntp_.keys=function(){return this.w}; ntp_bf.prototype[Symbol.iterator]=function(){for(var a=[],b=new Map,c=ntp_c(this.keys()),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.getAll(d),f=b.get(d)||0;b.set(d,f+1);a.push([d,e[f]])}ntp_wb();ntp_zb();return a[Symbol.iterator]()}; +var ntp_cf=function(){};ntp_cf.prototype.Ha=function(a){return a.join("&")};ntp_cf.prototype.Fb=function(a){return a?a.split("&"):[]};var ntp_df=function(){};ntp_df.prototype.Ha=function(a){return a.key+"="+a.value};ntp_df.prototype.Fb=function(a){a=a.split("=");return{key:a.shift(),value:a.join("=")}};var ntp_ef=function(){var a=void 0===a?new ntp_df:a;var b=void 0===b?new ntp_cf:b;this.w=a;this.o=b};ntp_ef.prototype.Ha=function(a){var b=[];a=ntp_c(a);for(var c=a.next();!c.done;c=a.next()){var d=ntp_c(c.value);c=d.next().value;d=d.next().value;b.push(this.w.Ha({key:c,value:d}))}return this.o.Ha(b)};ntp_ef.prototype.Fb=function(a){var b=new ntp_bf;a=ntp_c(this.o.Fb(a));for(var c=a.next();!c.done;c=a.next())c=this.w.Fb(c.value),b.append(c.key,c.value);return b}; +ntp_wb();ntp_zb();var ntp_F=function(a,b){this.Uh=new ntp_ef;this.hg=b;this.setValue(a)};ntp_=ntp_F.prototype;ntp_.setValue=function(a){this.Ea=a;this.lc=this.Uh.Fb(a);this.Gc=new Map};ntp_.get=function(a){return this.getAll(a)[0]};ntp_.getAll=function(a){var b=this;if(!this.Gc.has(a)&&this.lc.has(a)){var c=ntp_ba(this.lc.getAll(a),function(d){return b.hg.Fb(d,a)});this.Gc.set(a,c)}else c=this.Gc.get(a);return c||[]}; +ntp_.set=function(a,b){this.Ea=null;this.Gc.set(a,[b]);this.lc.set(a,this.hg.Ha(b,a))};ntp_.append=function(a,b){this.Ea=null;var c=this.Gc.get(a)||[];c.push(b);this.Gc.set(a,c);this.lc.append(a,this.hg.Ha(b,a))};ntp_.has=function(a){return this.Gc.has(a)||this.lc.has(a)};ntp_["delete"]=function(a){this.Ea=null;this.Gc["delete"](a);this.lc["delete"](a)};ntp_.size=function(){return this.lc.size()};ntp_.keys=function(){return this.lc.keys()};ntp_.toString=function(){return null!=this.Ea?this.Ea:this.Uh.Ha(this.lc)}; ntp_F.prototype[Symbol.iterator]=function(){for(var a=[],b=new Map,c=ntp_c(this.keys()),d=c.next();!d.done;d=c.next()){d=d.value;var e=this.getAll(d),f=b.get(d)||0;b.set(d,f+1);a.push([d,e[f]])}ntp_wb();ntp_zb();return a[Symbol.iterator]()}; +var ntp_if=function(a,b){var c=this;b=void 0===b?{}:b;var d=void 0===b.Qf?ntp_af:b.Qf;a=a.match(ntp_Ye);b=a[1]||"";this.protocol=b+(b?":":"");b=(a[2]||"").split(":");this.W=b.shift()||"";this.V=b.join(":");this.R=a[3]||"";this.port=a[4]||"";this.H=a[5]||"";var e=a[6]||"";this.search=(e?"?":"")+e;a=a[7]||"";this.hash=(a?"#":"")+a;this.T=!ntp_l(Object.defineProperties);this.o=new ntp_F(e,d);this.origin=ntp_2j(this);this.T?this.o=ntp_ta(ntp_ua(ntp_ff),function(f){return f.Rk(c,e,d)})||this.o:Object.defineProperties(this, +{search:{get:function(){return ntp_gf(c)},set:function(f){return ntp_hf(c,f)}}})},ntp_2j=function(a){if(!a.protocol||!a.R)return"";var b=a.protocol+"//"+a.R;a.port&&(b+=":"+a.port);return b},ntp_gf=function(a){a=a.o.toString();return(a?"?":"")+a},ntp_hf=function(a,b){b.length&&"?"==b.charAt(0)&&(b=b.substr(1));a.o.setValue(b)}; +ntp_if.prototype.toString=function(a){a=void 0===a?!1:a;return ntp_1k(a?"":this.protocol.substr(0,this.protocol.length-1),a?"":this.W+(this.V?":":"")+this.V,a?"":this.R,a?"":this.port,this.H,this.search.substr(1),this.hash.substr(1))};var ntp_ff=new ntp_Ve; +var ntp_kf=function(a,b){b=void 0===b?new Map:b;var c=void 0===c?!0:c;var d=void 0===d?google.time():d;var e=void 0===e?!0:e;c&&b.set("zx",String(d));google.cshid&&b.set("cshid",google.cshid);a=ntp_jf(a,b);e&&google.im&&(a+=google.im);return a},ntp_jf=function(a,b){a=new ntp_if(a);b=ntp_c(b);for(var c=b.next();!c.done;c=b.next()){var d=ntp_c(c.value);c=d.next().value;d=d.next().value;a.o.set(c,d)}return a=a.toString()}; +var ntp_lf=function(){};ntp_lf.prototype.log=function(a,b){a=ntp_kf(a,b);google.log("","",a)};var ntp_mf=function(){return new ntp_lf};var ntp_nf=function(){var a=ntp_mf(),b={},c=void 0===b.path?"/gen_204":b.path;b=void 0===b.tn?!0:b.tn;this.H=a;this.w=c;this.R=b};ntp_nf.prototype.o=function(a){this.R?this.H.log(ntp_jf(this.w,a)):this.H.log(this.w,a)};var ntp_of=!ntp_h.product.La&&!ntp_Hc(),ntp_pf=function(a,b){if(/-[a-z]/.test(b))return null;if(ntp_of&&a.dataset){if(ntp_Ic()&&!(b in a.dataset))return null;a=a.dataset[b];return void 0===a?null:a}return a.getAttribute("data-"+ntp_oc(b))},ntp_km=function(a,b){!/-[a-z]/.test(b)&&(ntp_of&&a.dataset?ntp_zn(a,b)&&delete a.dataset[b]:a.removeAttribute("data-"+ntp_oc(b)))},ntp_zn=function(a,b){return/-[a-z]/.test(b)?!1:ntp_of&&a.dataset?b in a.dataset:a.hasAttribute?a.hasAttribute("data-"+ntp_oc(b)):!!a.getAttribute("data-"+ ntp_oc(b))},ntp_qf=function(a){if(ntp_of&&a.dataset)return a.dataset;var b={};a=a.attributes;for(var c=0;cthis.w&&(this.w++,a.next=this.o,this.o=a)}; +var ntp_zf=function(){this.w=this.o=null},ntp_Bf=new ntp_yf(function(){return new ntp_Af},function(a){a.reset()});ntp_zf.prototype.add=function(a,b){var c=ntp_Bf.get();c.set(a,b);this.w?this.w.next=c:this.o=c;this.w=c};ntp_zf.prototype.remove=function(){var a=null;this.o&&(a=this.o,this.o=this.o.next,this.o||(this.w=null),a.next=null);return a};var ntp_Af=function(){this.next=this.o=this.Za=null};ntp_Af.prototype.set=function(a,b){this.Za=a;this.o=b;this.next=null}; ntp_Af.prototype.reset=function(){this.next=this.o=this.Za=null}; +var ntp_Gf=function(a,b){ntp_Cf||ntp_Df();ntp_Ef||(ntp_Cf(),ntp_Ef=!0);ntp_Ff.add(a,b)},ntp_Cf,ntp_Df=function(){if(ntp_a.Promise&&ntp_a.Promise.resolve){var a=ntp_a.Promise.resolve(void 0);ntp_Cf=function(){a.then(ntp_Hf)}}else ntp_Cf=function(){ntp_xf(ntp_Hf)}},ntp_Ef=!1,ntp_Ff=new ntp_zf,ntp_Hf=function(){for(var a;a=ntp_Ff.remove();){try{a.Za.call(a.o)}catch(b){ntp_tf(b)}ntp_Bf.put(a)}ntp_Ef=!1}; +var ntp_Jf=function(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}};var ntp_G=function(a){this.o=0;this.$=void 0;this.R=this.w=this.H=null;this.V=this.W=!1;if(a!=ntp_e)try{var b=this;a.call(void 0,function(c){ntp_Kf(b,2,c)},function(c){ntp_Kf(b,3,c)})}catch(c){ntp_Kf(this,3,c)}},ntp_Lf=function(){this.next=this.context=this.w=this.R=this.o=null;this.H=!1};ntp_Lf.prototype.reset=function(){this.context=this.w=this.R=this.o=null;this.H=!1}; +var ntp_Mf=new ntp_yf(function(){return new ntp_Lf},function(a){a.reset()}),ntp_Nf=function(a,b,c){var d=ntp_Mf.get();d.R=a;d.w=b;d.context=c;return d},ntp_H=function(a){if(a instanceof ntp_G)return a;var b=new ntp_G(ntp_e);ntp_Kf(b,2,a);return b},ntp_Of=function(a){return new ntp_G(function(b,c){c(a)})},ntp_Qf=function(a,b,c){ntp_Pf(a,b,c,null)||ntp_Gf(ntp_o(b,a))},ntp_Rf=function(a){return new ntp_G(function(b,c){var d=a.length,e=[];if(d)for(var f=function(l,m){d--;e[l]=m;0==d&&b(e)},g=function(l){c(l)}, +h=0,k;hMath.random()&&google.log("nullpcfg","&m="+a+"&e=init");c&&(d|| ntp_cg(a))&&c(d)}}catch(e){ntp_ia(e,{ie:{cause:"minit",mid:a}})}},ntp_cg=function(a){a=ntp_4f[a];return!(!a||!a._e)};ntp_q("google.raas",ntp_ag); +var ntp_dg=new ntp_Ve;var ntp_eg=function(){return ntp_ta(ntp_ua(ntp_dg),function(a){return a.$b()})||!1},ntp_fg=function(){return ntp_ta(ntp_ua(ntp_dg),function(a){return a.ff()})||""};var ntp_gg="StopIteration"in ntp_a?ntp_a.StopIteration:{message:"StopIteration",stack:""},ntp_hg=function(){};ntp_hg.prototype.next=function(){throw ntp_gg;};ntp_hg.prototype.kb=function(){return this}; +var ntp_ig=function(a){if(a instanceof ntp_hg)return a;if("function"==typeof a.kb)return a.kb(!1);if(ntp_Qb(a)){var b=0,c=new ntp_hg;c.next=function(){for(;;){if(b>=a.length)throw ntp_gg;if(b in a)return a[b++];b++}};return c}throw Error("t");},ntp_jg=function(a,b){if(ntp_Qb(a))try{ntp_t(a,b,void 0)}catch(c){if(c!==ntp_gg)throw c;}else{a=ntp_ig(a);try{for(;;)b.call(void 0,a.next(),void 0,a)}catch(c){if(c!==ntp_gg)throw c;}}},ntp_kg=function(a,b){var c=ntp_ig(a);a=new ntp_hg;a.next=function(){for(;;){var d= +c.next();if(b.call(void 0,d,void 0,c))return d}};return a},ntp_lg=function(a,b){var c=ntp_ig(a);a=new ntp_hg;a.next=function(){var d=c.next();return b.call(void 0,d,void 0,c)};return a},ntp_ng=function(a){return ntp_mg(arguments)},ntp_mg=function(a){var b=ntp_ig(a);a=new ntp_hg;var c=null;a.next=function(){for(;;){if(null==c){var d=b.next();c=ntp_ig(d)}try{return c.next()}catch(e){if(e!==ntp_gg)throw e;c=null}}};return a},ntp_og=function(a){if(ntp_Qb(a))return ntp_3b(a);a=ntp_ig(a);var b=[];ntp_jg(a, function(c){b.push(c)});return b}; +var ntp_pg=function(){this.o={};this.w=""},ntp_qg={Go:"k",eo:"ck",Bo:"m",oo:"exm",ko:"excm",Yn:"am",Fo:"rt",qo:"d",no:"ed",Jo:"sv",ho:"deob",ao:"cb",Io:"rs",fo:"dk",Ho:"sdch",to:"im",io:"dg",METADATA:"md"}; +ntp_pg.prototype.toString=function(){if("1"==ntp_rg(this,"md"))return ntp_sg(this);var a=[],b=ntp_n(function(c){ntp_d(this.o[c])&&a.push(c+"="+this.o[c])},this);b("sdch");b("k");b("ck");b("am");b("rt");"d"in this.o||ntp_tg(this,"d","0");b("d");b("dk");b("exm");b("excm");(this.o.excm||this.o.exm)&&a.push("ed=1");b("dg");b("im");b("rs");b("m");b("cb");return this.w+a.join("/")}; +var ntp_sg=function(a){var b=[],c=ntp_n(function(d){ntp_d(this.o[d])&&b.push(d+"="+this.o[d])},a);c("md");c("k");c("ck");c("am");c("rs");return a.w+b.join("/")},ntp_rg=function(a,b){return a.o[b]?a.o[b]:null},ntp_tg=function(a,b,c){c?a.o[b]=c:delete a.o[b]},ntp_vg=function(a){return(a=ntp_rg(a,"m"))?a.split(","):[]};ntp_pg.prototype.getMetadata=function(){return"1"==ntp_rg(this,"md")}; var ntp_wg=function(a){var b=new ntp_pg,c=a.match(ntp_Ye)[5];ntp_y(ntp_qg,function(e){var f=c.match("/"+e+"=([^/]+)");f&&ntp_tg(b,e,f[1])});var d=-1!=a.indexOf("_/ss/")?"_/ss/":"_/js/";b.w=a.substr(0,a.indexOf(d)+d.length);return b}; +var ntp_xg=function(){ntp_C.call(this)};ntp_r(ntp_xg,ntp_C);ntp_xg.prototype.initialize=function(){};var ntp_yg=function(a,b){this.o=a;this.w=b};ntp_yg.prototype.execute=function(a){this.o&&(this.o.call(this.w||null,a),this.o=this.w=null)};ntp_yg.prototype.abort=function(){this.w=this.o=null};var ntp_zg=function(a,b){ntp_C.call(this);this.T=a;this.$=b;this.R=[];this.H=[];this.w=[]};ntp_r(ntp_zg,ntp_C);ntp_=ntp_zg.prototype;ntp_.Ff=ntp_xg;ntp_.Cc=null;ntp_.tf=function(){return this.T};ntp_.getId=function(){return this.$};ntp_.Be=function(a){if(this.Ff===ntp_xg)this.Ff=a;else throw Error("u");};ntp_.Pd=function(a,b){this.R.push(new ntp_yg(a,b))};var ntp_Ag=function(a,b){a.H.push(new ntp_yg(b,void 0))};ntp_zg.prototype.o=function(){this.Cc=new ntp_xg}; +var ntp_Cg=function(a,b){var c=new a.Ff;c.initialize(b());a.Cc=c;c=(c=!!ntp_Bg(a.w,b()))||!!ntp_Bg(a.R,b());c||(a.H.length=0);return c},ntp_Dg=function(a,b){(b=ntp_Bg(a.H,b))&&window.setTimeout(ntp_3c("Module errback failures: "+b),0);a.w.length=0;a.R.length=0},ntp_Bg=function(a,b){for(var c=[],d=0;dMath.random()},ntp_Eg=function(a,b){b=ntp_Yb(b,function(e){return!/^(?:sy|em)[0-9a-z]{0,4}$/.test(e)});var c=[];if(1>=a.o){c.push("lids="+ntp_vg(a.w).join(","));var d=ntp_fg();d&&c.push(d)}ntp_4b(c,["ids="+b.join(","),"am="+ntp_rg(a.w,"am"),"k="+ntp_rg(a.w,"k"),"s="+a.o]);google.log&&google.log("ppm","&"+c.join("&"))}; +ntp_wa.prototype.T=function(a){this.o++;this.V?ntp_Eg(this,a):ntp_eg()&&ntp_Eg(this,[]);a=ntp_Yb(a,function(b){return!/^(?:sy|em)[0-9a-z]{0,4}$/.test(b)});ntp_ug(this,a)}; +var ntp_ug=function(a,b){b=ntp_Yb(b,function(d){return!a.H.has(d)});ntp_Fg(a,b,a.H);b=ntp_c(b);for(var c=b.next();!c.done;c=b.next())a.H.add(c.value)},ntp_Fg=function(a,b,c){if(!google.snet&&google.em&&0!=google.em.length){var d=google.em;delete google.em;ntp_Gg(a,d,c,!1);a.o++;d=ntp_c(d);for(var e=d.next();!e.done;e=d.next())e=e.value,ntp_v(b,e),c.add(e);ntp_Gg(a,b,c,!1)}else delete google.em,ntp_Gg(a,b,c)},ntp_Gg=function(a,b,c,d){d=void 0===d?!0:d;var e=ntp_Hg(a,b,c);2083>=e.length?ntp_Ig(e,d): +(d=b.length/2,ntp_Ig(ntp_Hg(a,b.slice(0,d),c),!1),ntp_Ig(ntp_Hg(a,b.slice(d),c),!1))},ntp_Ig=function(a,b){b=void 0===b?!0:b;new Promise(function(c){var d=document.createElement("script");d.src=a;d.async=b;d.onload=c;(ntp_f("xjsc")||document.body).appendChild(d)})},ntp_Hg=function(a,b,c){var d=void 0===d?a.w:d;d=ntp_wg(d.toString());ntp_tg(d,"m",b.join(","));b=Array.from(c);ntp_tg(d,"exm",b.join(","));ntp_tg(d,"d","1");ntp_tg(d,"ed","1");b=d.toString();c={};a.R&&(c.ver=a.R);a.o&&(c.xjs="s"+(1==a.o? 1:2));ntp_uc(c)&&(b+="?"+ntp_gm(c));return b}; +var ntp_Jg=function(){this.Ba=this.ra=null};ntp_=ntp_Jg.prototype;ntp_.xi=function(){};ntp_.Uf=function(){};ntp_.Yg=function(){return this.ra};ntp_.Vf=function(a){this.ra=a};ntp_.$b=function(){return!1};ntp_.qh=function(){return!1};ntp_.$h=function(){};ntp_.Be=function(){};ntp_.Pd=function(){}; +var ntp_pa=null,ntp_qa=null;var ntp_Kg=function(a,b){this.o={};this.w=[];this.R=this.H=0;var c=arguments.length;if(12*this.H&&ntp_Lg(this),!0):!1};var ntp_Lg=function(a){if(a.H!=a.w.length){for(var b=0,c=0;b=d.w.length)throw ntp_gg;var f=d.w[b++];return a?f:d.o[f]};return e};var ntp_Mg=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)}; +/* + Portions of this code are from MochiKit, received by + The Closure Authors under the MIT license. All other code is Copyright + 2005-2009 The Closure Authors. All Rights Reserved. +*/ +var ntp_K=function(a,b){this.W=[];this.Ba=a;this.ta=b||null;this.T=this.w=!1;this.R=void 0;this.ma=this.Da=this.ha=!1;this.$=0;this.H=null;this.V=0};ntp_K.prototype.cancel=function(a){if(this.w)this.R instanceof ntp_K&&this.R.cancel();else{if(this.H){var b=this.H;delete this.H;a?b.cancel(a):(b.V--,0>=b.V&&b.cancel())}this.Ba?this.Ba.call(this.ta,this):this.ma=!0;this.w||this.o(new ntp_Og(this))}};ntp_K.prototype.ra=function(a,b){this.ha=!1;ntp_Pg(this,a,b)}; +var ntp_Pg=function(a,b,c){a.w=!0;a.R=c;a.T=!b;ntp_Qg(a)},ntp_Sg=function(a){if(a.w){if(!a.ma)throw new ntp_Rg(a);a.ma=!1}};ntp_K.prototype.callback=function(a){ntp_Sg(this);ntp_Pg(this,!0,a)};ntp_K.prototype.o=function(a){ntp_Sg(this);ntp_Pg(this,!1,a)};ntp_K.prototype.addCallback=function(a,b){return ntp_Tg(this,a,null,b)};var ntp_Ug=function(a,b,c){return ntp_Tg(a,null,b,c)},ntp_Tg=function(a,b,c,d){a.W.push([b,c,d]);a.w&&ntp_Qg(a);return a}; +ntp_K.prototype.then=function(a,b,c){var d,e,f=new ntp_G(function(g,h){d=g;e=h});ntp_Tg(this,d,function(g){g instanceof ntp_Og?f.cancel():e(g)});return f.then(a,b,c)};ntp_K.prototype.$goog_Thenable=!0;ntp_K.prototype.Vb=function(a){var b=new ntp_K;ntp_Tg(this,b.callback,b.o,b);a&&(b.H=this,this.V++);return b}; +var ntp_Vg=function(a){return ntp_Ea(a.W,function(b){return ntp_l(b[1])})},ntp_Qg=function(a){if(a.$&&a.w&&ntp_Vg(a)){var b=a.$,c=ntp_Wg[b];c&&(ntp_a.clearTimeout(c.o),delete ntp_Wg[b]);a.$=0}a.H&&(a.H.V--,delete a.H);b=a.R;for(var d=c=!1;a.W.length&&!a.ha;){var e=a.W.shift(),f=e[0],g=e[1];e=e[2];if(f=a.T?g:f)try{var h=f.call(e||a.ta,b);ntp_d(h)&&(a.T=a.T&&(h==b||h instanceof Error),a.R=b=h);if(ntp_Jf(b)||"function"===typeof ntp_a.Promise&&b instanceof ntp_a.Promise)d=!0,a.ha=!0}catch(k){b=k,a.T= +!0,ntp_Vg(a)||(c=!0)}}a.R=b;d&&(h=ntp_n(a.ra,a,!0),d=ntp_n(a.ra,a,!1),b instanceof ntp_K?(ntp_Tg(b,h,d),b.Da=!0):b.then(h,d));c&&(b=new ntp_Xg(b),ntp_Wg[b.o]=b,a.$=b.o)},ntp_Lo=function(a){var b=new ntp_K;b.callback(a);return b},ntp_Vm=function(a){var b=new ntp_K;a.then(function(c){b.callback(c)},function(c){b.o(c)});return b},ntp_Ko=function(a){var b=new ntp_K;b.o(a);return b},ntp_Rg=function(a){ntp_s.call(this);this.Wb=a};ntp_r(ntp_Rg,ntp_s);ntp_Rg.prototype.message="Deferred has already fired"; +ntp_Rg.prototype.name="AlreadyCalledError";var ntp_Og=function(a){ntp_s.call(this);this.Wb=a};ntp_r(ntp_Og,ntp_s);ntp_Og.prototype.message="Deferred was canceled";ntp_Og.prototype.name="CanceledError";var ntp_Xg=function(a){this.o=ntp_a.setTimeout(ntp_n(this.H,this),0);this.w=a};ntp_Xg.prototype.H=function(){delete ntp_Wg[this.o];throw this.w;};var ntp_Wg={}; +var ntp__=function(a,b,c){this.Bq=a;this.Gf=b||null;this.Dq=c||[]};ntp__.prototype.toString=function(){return this.Bq};ntp__.prototype.tf=function(){return this.Dq};ntp__.prototype.Qa=function(a){this.Dq=a};var ntp_To=function(a){this.Eq=a};ntp_To.prototype.toString=function(){return this.Eq};var ntp_Wm=function(a){var b={},c={},d=[],e=[],f=function(l){if(!c[l]){var m=l instanceof ntp__?l.tf():[];c[l]=ntp_3b(m);ntp_t(m,function(n){b[n]=b[n]||[];b[n].push(l)});m.length||d.push(l);ntp_t(m,f)}};for(ntp_t(a,f);d.length;){var g=d.shift();e.push(g);b[g]&&ntp_t(b[g],function(l){ntp_v(c[l],g);c[l].length||d.push(l)})}var h={},k=[];ntp_t(e,function(l){l instanceof ntp__&&(l=l.Gf,null==l||h[l]||(h[l]=!0,k.push(l)))});return{services:e,zm:k}}; +var ntp_0=function(a,b){return ntp_Pm(a,new ntp__(a,a,b))},ntp_Cp=function(a,b){ntp_Rm(b).push(a)},ntp_Rm=function(a){a=a.toString();return ntp_Qm[a]=ntp_Qm[a]||[]},ntp_Qm={},ntp_Sm={},ntp_5o=function(a){var b=ntp_Sm[a];b||(b=new ntp__(a,a,[]),ntp_Pm(a,b));return b},ntp_Pm=function(a,b){return b=ntp_Sm[a]=ntp_Sm[a]||b}; +var ntp_sp=function(a,b){this.Bq=a;this.o=b||null;this.w=ntp_Rm(a)};var ntp_pl=function(){this.o={}};ntp_Ob(ntp_pl);ntp_pl.prototype.register=function(a,b){this.o[a]=b};var ntp_Yl=function(a,b){if(b.Hc){a=b.Hc.o;if(!a)throw Error("V`"+b);return a}if(b instanceof ntp__)return a.o[b]?(a=a.o[b].o)?a:b:b;throw Error("U`"+b);},ntp_Zl=function(a,b){return b instanceof ntp__?!!a.o[b]:b&&!!b.Hc},ntp_fm=function(a,b){var c=null;b.Hc?c=b.Hc:b instanceof ntp__&&(c=a.o[b]);if(!c)throw Error("Va`"+b);return c}; +var ntp_Yg=function(){ntp_Jg.call(this);this.H={};this.T=[];this.V=[];this.ta=[];this.w=[];this.W=[];this.ha={};this.R=this.$=new ntp_zg([],"");this.wa=null;this.ma=new ntp_K;this.va=!1;this.ka=0;this.Da=this.Ia=this.Fa=!1};ntp_r(ntp_Yg,ntp_Jg);ntp_=ntp_Yg.prototype;ntp_.xi=function(a){this.va=a}; +ntp_.Uf=function(a,b){if(!(this instanceof ntp_Yg))this.Uf(a,b);else if(ntp_g(a)){a=a.split("/");for(var c=[],d=0;dMath.random(),ntp_hn=new ntp_9m(new ntp_$m("fva"),1);var ntp_No={};var ntp_2=function(a){this.rd=a.Wb.key;this.ta=a.Wb&&a.Wb.Ua;this.ha=[]};ntp_r(ntp_2,ntp_C);ntp_2.prototype.Nk=function(){return this.rd};ntp_2.prototype.toString=function(){return this.rd+"["+ntp_Tb(this)+"]"};ntp_2.Aa=function(a){return{Wb:{key:function(){return ntp_Lo(a)},Ua:function(){return ntp_Lo(this.tb())}}}}; +var ntp_Ro=function(a,b,c){c=ntp_Qo(b,c,a).addCallback(function(d){return new b(d)});c.addCallback(function(d){if(d.ha.length)return(new ntp__m(d.ha,void 0,!0)).addCallback(function(){return d})});c.addCallback(function(){});a instanceof ntp__&&c.addCallback(function(d){var e=ntp_No[a];if(e)for(var f=0;f=b)return a}return null},ntp_6o=function(a){return a?a.__owner?a.__owner:a.parentNode&&11===a.parentNode.nodeType?a.parentNode.host:ntp_3o(a):null},ntp_8o=function(a,b,c,d){for(c||(a=ntp_7o(a,d));a;){if(b(a))return a;a=ntp_7o(a,d)}return null}; +var ntp_9o=function(a,b){return ntp_8o(a,function(c){return ntp_Wd(c)&&c.hasAttribute("jscontroller")},b,!0)};var ntp_4o={};var ntp_$o={},ntp_cp=function(a,b,c,d,e){var f=ntp_bp(ntp_Jd(a));a={type:b,target:a,bubbles:void 0!=d?d:!0};ntp_d(c)&&(a.data=c);e&&ntp_Cc(a,e);f.trigger(a)},ntp_dp=function(a,b){var c=a.__jsaction;return c?!!c[b]:ntp_ap(a.getAttribute("jsaction"),b)},ntp_ap=function(a,b){if(!a)return!1;var c=ntp_4o[a];if(c)return!!c[b];c=ntp_$o[b];c||(c=new RegExp("(^\\s*"+b+"\\s*:|[\\s;]"+b+"\\s*:)"),ntp_$o[b]=c);return c.test(a)},ntp_bp=function(a){return a.__wizdispatcher}; +var ntp_Uo=new ntp_To("JIbuQc"),ntp_Vo=new ntp_To("GvneHb"),ntp_Wo=new ntp_To("rcuQ6b"),ntp_Xo=new ntp_To("dyRcpb"),ntp_nn=new ntp_To("u0pjoe");var ntp_V=function(a){ntp_C.call(this);this.H=a;this.o={}};ntp_r(ntp_V,ntp_C);var ntp_4i=[];ntp_V.prototype.listen=function(a,b,c,d){ntp_k(b)||(b&&(ntp_4i[0]=b.toString()),b=ntp_4i);for(var e=0;ea?this.Ma.length+a:a])};ntp_.mf=function(){return 0==this.Ma.length?null:new ntp_mp(this.Ma[0])};ntp_.ve=function(){return 0==this.Ma.length?null:new ntp_mp(this.Ma[this.Ma.length-1])};ntp_.find=function(a){var b=[];this.Ab(function(c){c=c.querySelectorAll(String(a));for(var d=0;dc.metadata.priority&&(c.metadata.Lb=this.w(),ntp_O.prototype.set.call(this,a,c));return c};ntp_Ih.prototype.set=function(a,b){"x">b.metadata.priority&&(b.metadata.Lb=this.w());ntp_O.prototype.set.call(this,a,b)}; +var ntp_Jh=Error("G"),ntp_Kh=Error("H");var ntp_Lh=function(){};var ntp_Mh=function(){};ntp_r(ntp_Mh,ntp_Lh);ntp_Mh.prototype.Gb=function(){var a=0;ntp_jg(this.kb(!0),function(){a++});return a};ntp_Mh.prototype.clear=function(){var a=ntp_og(this.kb(!0)),b=this;ntp_t(a,function(c){b.remove(c)})};var ntp_Nh=2/3,ntp_Wa=function(a,b){this.R=a;this.V=b;this.H=0;this.o={};this.T=!1};ntp_i(ntp_Wa,ntp_Fh);ntp_=ntp_Wa.prototype; +ntp_.get=function(a){var b=this.R.get(a);if(null===b)return null;var c=b.indexOf("_");c=0>c?null:{sm:b.substr(0,c),Pn:b.substr(c+1)};if(null===c)c=null;else{var d=ntp_Eh.exec(c.sm);if(null===d)var e=null;else e=d[1],d=parseInt(d[2],10),e=Number.isNaN(d)?null:{priority:e,Lb:d};c=null===e?null:new ntp_Oa(e,void 0,c.Pn)}if(null===c)return null;ntp_d(this.o[a])||(b=a.length+b.length,this.o[a]={priority:c.metadata.priority,Lb:c.metadata.Lb,weight:b},this.H+=b,ntp_d(this.w)&&(this.w+=b));return c}; +ntp_.has=function(a){return null!==this.R.get(a)};ntp_.remove=function(a){var b=this.R.get(a);null!==b&&(a in this.o&&(delete this.o[a],this.H-=a.length+b.length),this.R.remove(a))};ntp_.reset=function(){this.w=void 0;this.H=0;for(var a=ntp_c(Object.keys(this.o)),b=a.next();!b.done;b=a.next())delete this.o[b.value]};ntp_.set=function(a,b){a in this.o&&this.remove(a);ntp_Oh(this,a,b.metadata.priority,b.metadata.Lb,b.Ha())}; +var ntp_Oh=function(a,b,c,d,e,f,g){g=void 0===g?0:g;f=f||b.length+e.length;if(ntp_d(a.w)&&0==g&&f>=a.w)throw ntp_Jh;try{a.R.set(b,e)}catch(l){if("Storage mechanism: Quota exceeded"==l&&4>g){ntp_Ph(a);a.w=a.H+Math.ceil(ntp_Nh*f);var h=b.split(";;")[0];if(!(a.w>a.H+f)){var k=ntp_Qh(a,c);k.length&&ntp_Rh&&ntp_Rh(a.V,f,c,h);h=ntp_c(k);for(k=h.next();!k.done&&!(a.remove(k.value),a.w>a.H+f);k=h.next());}ntp_Oh(a,b,c,d,e,f,g+1);return}throw l;}a.H+=f;ntp_d(a.w)&&(a.w=Math.max(a.w,a.H));a.o[b]={priority:c, +Lb:d,weight:f}},ntp_Qh=function(a,b){var c=Array.from(Object.keys(a.o));c=c.filter(function(d){return a.o[d].priority>=b});if(0==c.length)throw ntp_Kh;c.sort(function(d,e){d=a.o[d];e=a.o[e];return d.priority==e.priority?d.Lb-e.Lb:d.priorityb.metadata.priority&&this.o&&this.o.set(a,b)};ntp_.remove=function(a){var b=this.w[a];this.o&&(b&&"x">b.metadata.priority||!b)&&this.o.remove(a);delete this.w[a]}; ntp_.clear=function(){this.o&&this.o.clear();this.w={}};ntp_.kb=function(){var a=this,b=Object.keys(this.w);b=ntp_ig(b);if(!this.o)return b;var c=ntp_kg(this.o,function(d){return!(d in a.w)});return ntp_ng(b,c)}; +var ntp_Za=function(a,b){this.o=b;this.w=a+";;"};ntp_i(ntp_Za,ntp_O);ntp_=ntp_Za.prototype;ntp_.get=function(a,b){return ntp_O.prototype.get.call(this,this.w+a,void 0===b?!1:b)};ntp_.has=function(a){return ntp_O.prototype.has.call(this,this.w+a)};ntp_.set=function(a,b){ntp_O.prototype.set.call(this,this.w+a,b)};ntp_.remove=function(a){ntp_O.prototype.remove.call(this,this.w+a)}; ntp_.kb=function(){var a=this,b=this.w.length,c=ntp_lg(this.o,function(d){if(d.substr(0,b)==a.w)return d.substr(b)});return ntp_kg(c,ntp_2c)};ntp_.clear=function(){ntp_Gh(this)};ntp_.reset=function(){}; +var ntp_Sh=function(a){this.o=a};ntp_r(ntp_Sh,ntp_Mh);ntp_=ntp_Sh.prototype;ntp_.isAvailable=function(){if(!this.o)return!1;try{return this.o.setItem("__sak","1"),this.o.removeItem("__sak"),!0}catch(a){return!1}};ntp_.set=function(a,b){try{this.o.setItem(a,b)}catch(c){if(0==this.o.length)throw"Storage mechanism: Storage disabled";throw"Storage mechanism: Quota exceeded";}};ntp_.get=function(a){a=this.o.getItem(a);if(!ntp_g(a)&&null!==a)throw"Storage mechanism: Invalid value was encountered";return a}; +ntp_.remove=function(a){this.o.removeItem(a)};ntp_.Gb=function(){return this.o.length};ntp_.kb=function(a){var b=0,c=this.o,d=new ntp_hg;d.next=function(){if(b>=c.length)throw ntp_gg;var e=c.key(b++);if(a)return e;e=c.getItem(e);if(!ntp_g(e))throw"Storage mechanism: Invalid value was encountered";return e};return d};ntp_.clear=function(){this.o.clear()};ntp_.key=function(a){return this.o.key(a)}; +var ntp_Th=function(){var a=null;try{a=window.localStorage||null}catch(b){}this.o=a};ntp_r(ntp_Th,ntp_Sh);var ntp_Uh=function(){var a=null;try{a=window.sessionStorage||null}catch(b){}this.o=a};ntp_r(ntp_Uh,ntp_Sh);var ntp_sh=function(a){this.o=a||{cookie:""}};ntp_=ntp_sh.prototype;ntp_.set=function(a,b,c,d,e,f){if(/[;=\s]/.test(a))throw Error("B`"+a);if(/[;\r\n]/.test(b))throw Error("C`"+b);ntp_d(c)||(c=-1);e=e?";domain="+e:"";d=d?";path="+d:"";f=f?";secure":"";c=0>c?"":0==c?";expires="+(new Date(1970,1,1)).toUTCString():";expires="+(new Date(ntp_p()+1E3*c)).toUTCString();this.o.cookie=a+"="+b+e+d+c+f}; +ntp_.get=function(a,b){for(var c=a+"=",d=(this.o.cookie||"").split(";"),e=0,f;ea.Tb()?"https://www.google.com/log?format=json&hasfast=true":"https://play.google.com/log?format=json&hasfast=true");return a.ma};ntp_Ji.prototype.log=function(a){a=ntp_$h(a);var b=this.Ib++;ntp_R(a,21,b);if(!ntp_Q(a,1)){b=a;var c=ntp_p().toString();ntp_R(b,1,c)}for(;1E3<=this.o.length;)this.o.shift(),++this.wa;this.o.push(a);this.dispatchEvent(new ntp_Li(a));this.va||this.w.w||this.w.start()}; +ntp_Ji.prototype.flush=function(a,b){if(0==this.o.length)a&&a();else{var c=ntp_p();if(this.Ia>c&&this.Bal?1:l),ntp_vl(this.w,this.R.o)))}a&&a()},this);g=ntp_n(function(h){var k=ntp_nl(d,ntp_Ai,3),l=this.R;l.w=Math.min(3E5, +2*l.w);l.o=Math.min(3E5,l.w+Math.round(.2*(Math.random()-.5)*l.w));ntp_vl(this.w,this.R.o);401==h&&e&&(this.Fa=e);if(500<=h&&600>h||401==h||0==h)this.o=k.concat(this.o),this.va||this.w.w||this.w.start();b&&b("net-send-failed",h)},this);this.vb(c,f,g)}}}};ntp_Ji.prototype.ha=function(){this.ta||(this.Sa&&ntp_Mi(this),this.Na&&ntp_Ni(this),this.flush())}; +var ntp_Mi=function(a){ntp_Oi(a,32,10,function(b,c){b=ntp_4e(b,"format","json");return ntp_A().navigator.sendBeacon(b,c.Ha())})},ntp_Ni=function(a){ntp_Oi(a,6,5,ntp_n(function(b,c){c=c.Ha();for(var d=[],e=0,f=0;f>=8);d[e++]=g}c=ntp_Wc(d,!0);b=ntp_3e(b,"format","base64json","p",c);(new Image).src=b;return!0},a))},ntp_Oi=function(a,b,c,d){if(0!=a.o.length){var e=ntp_Ki(a);for(var f=e.search(ntp_6e),g=0,h,k=[];0<=(h=ntp_5e(e,g,"format",f));)k.push(e.substring(g, +h)),g=Math.min(e.indexOf("&",h)+1||f,f);k.push(e.substr(g));e=k.join("").replace(ntp_8e,"$1");e=ntp_3e(e,"auth",a.Da(),"authuser",a.$||"0");for(f=0;fb)throw Error("N`"+b);a.$=b}else a.$=null},ntp_Oj=function(a,b,c){b instanceof ntp_Rj?(a.o=b,ntp_Xj(a.o,a.V)):(c||(b=ntp_Sj(b,ntp_Yj)),a.o=new ntp_Rj(b,a.V))},ntp_Qj=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},ntp_Sj=function(a,b,c){return ntp_g(a)?(a=encodeURI(a).replace(b,ntp_Zj),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g, +"%$1")),a):null},ntp_Zj=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},ntp_Tj=/[#\/\?@]/g,ntp_Vj=/[#\?:]/g,ntp_Uj=/[#\?]/g,ntp_Yj=/[#\?@]/g,ntp_Wj=/#/g,ntp_Rj=function(a,b){this.w=this.o=null;this.H=a||null;this.R=!!b},ntp__j=function(a){a.o||(a.o=new ntp_Kg,a.w=0,a.H&&ntp__e(a.H,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))};ntp_Rj.prototype.Gb=function(){ntp__j(this);return this.w}; +ntp_Rj.prototype.add=function(a,b){ntp__j(this);this.H=null;a=ntp_0j(this,a);var c=this.o.get(a);c||this.o.set(a,c=[]);c.push(b);this.w+=1;return this};ntp_Rj.prototype.remove=function(a){ntp__j(this);a=ntp_0j(this,a);return ntp_Mg(this.o.o,a)?(this.H=null,this.w-=this.o.get(a).length,this.o.remove(a)):!1};ntp_Rj.prototype.clear=function(){this.o=this.H=null;this.w=0};var ntp_1j=function(a,b){ntp__j(a);b=ntp_0j(a,b);return ntp_Mg(a.o.o,b)};ntp_=ntp_Rj.prototype; +ntp_.Hd=function(a){var b=this.ub();return ntp_u(b,a)};ntp_.forEach=function(a,b){ntp__j(this);this.o.forEach(function(c,d){ntp_t(c,function(e){a.call(b,e,d,this)},this)},this)};ntp_.Yb=function(){ntp__j(this);for(var a=this.o.ub(),b=this.o.Yb(),c=[],d=0;dthis.Ia&&(this.Ia=c);for(var d=c-this.va,e=this.ka.length;0d;)e--;ntp_6b(this.ka,e,0,[a,d,b.Tj]);this.Ba[a]=c}; +ntp_.done=function(a,b,c){if(this.R||!this.o[a])ntp_jm(this,"done",a,b);else{b&&this.tick(b,c);this.o[a]--;0==this.o[a]&&delete this.o[a];if(a=ntp_zc(this.o))if(ntp_gj){b=a="";for(d in this.ma)this.ma.hasOwnProperty(d)&&(b=b+a+d,a="|");b&&(this.ta.dup=b);var d=new ntp_fj("beforedone",this);this.dispatchEvent(d)&&ntp_gj.dispatchEvent(d)?((a=ntp_ij(this.ta))&&(this.T.cad=a),d.type="done",a=ntp_gj.dispatchEvent(d)):a=!1}else a=!0;a&&(this.R=!0,ntp_v(ntp_dj,this),this.w=this.wa=null,this.dispose())}}; +ntp_.Vb=function(a,b,c){this.R&&ntp_jm(this,"branch",a,b);b&&this.tick(b,c);this.o[a]?this.o[a]++:this.o[a]=1};ntp_.timers=function(){return this.ka};var ntp_jm=function(a,b,c,d){if(ntp_gj){var e=new ntp_fj("error",a);e.error=b;e.Vb=c;e.tick=d;e.finished=a.R;ntp_gj.dispatchEvent(e)}},ntp_ij=function(a){var b=[];ntp_y(a,function(c,d){d=encodeURIComponent(d);c=encodeURIComponent(c).replace(/%7C/g,"|");b.push(d+":"+c)});return b.join(",")}; +ntp_hj.prototype.action=function(a){this.R&&ntp_jm(this,"action");var b=[],c=null,d=null,e=null,f=null;ntp_jj(a,function(g){var h;!g.__oi&&g.getAttribute&&(g.__oi=g.getAttribute("oi"));if(h=g.__oi)b.unshift(h),c||(c=g.getAttribute("jsinstance"));e||d&&"1"!=d||(e=g.getAttribute("ved"));f||(f=g.getAttribute("vet"));d||(d=g.getAttribute("jstrack"))});f&&(this.T.vet=f);d&&(this.T.ct=this.Da,0=this.o&&e.push("t."+a.toString()),c&&e.push("et."+c),(a=ntp_la(d))&&e.push("ve."+a),null!=b&&e.push("n."+b),e.push("cn."+this.o),0<=this.R&&e.push("dt."+ this.R),ntp_rj(this.W||new ntp_qj("jsa"),"jsi",e.join()).log())}};var ntp_uj=new ntp_tj; +var ntp_yj=new ntp_wj,ntp_Aj={},ntp_Bj={},ntp_Cj=function(a,b,c){ntp_Bj[a+"."+b]=c;var d={};d[b]=function(e){var f=e.node(),g=ntp_qf(f),h=e.event();c(f,g,h,e)||ntp_6i(h)};ntp_zj(a,d)},ntp_Dj=function(a,b){for(var c in b)ntp_Cj(a,c,b[c]);ntp_Aj[a]=ntp_Aj[a]||[];for(c in b)ntp_u(ntp_Aj[a],c)||ntp_0b(ntp_Aj[a],c)}; +var ntp_mk={"* ARIA-CHECKED":!0,"* ARIA-COLCOUNT":!0,"* ARIA-COLINDEX":!0,"* ARIA-DESCRIBEDBY":!0,"* ARIA-DISABLED":!0,"* ARIA-LABEL":!0,"* ARIA-LABELLEDBY":!0,"* ARIA-READONLY":!0,"* ARIA-REQUIRED":!0,"* ARIA-ROWCOUNT":!0,"* ARIA-ROWINDEX":!0,"* ARIA-SELECTED":!0,"* ABBR":!0,"* ACCEPT":!0,"* ACCESSKEY":!0,"* ALIGN":!0,"* ALT":!0,"* AUTOCOMPLETE":!0,"* AXIS":!0,"* BGCOLOR":!0,"* BORDER":!0,"* CELLPADDING":!0,"* CELLSPACING":!0,"* CHAROFF":!0,"* CHAR":!0,"* CHECKED":!0,"* CLEAR":!0,"* COLOR":!0,"* COLSPAN":!0, +"* COLS":!0,"* COMPACT":!0,"* COORDS":!0,"* DATETIME":!0,"* DIR":!0,"* DISABLED":!0,"* ENCTYPE":!0,"* FACE":!0,"* FRAME":!0,"* HEIGHT":!0,"* HREFLANG":!0,"* HSPACE":!0,"* ISMAP":!0,"* LABEL":!0,"* LANG":!0,"* MAXLENGTH":!0,"* METHOD":!0,"* MULTIPLE":!0,"* NOHREF":!0,"* NOSHADE":!0,"* NOWRAP":!0,"* OPEN":!0,"* READONLY":!0,"* REQUIRED":!0,"* REL":!0,"* REV":!0,"* ROLE":!0,"* ROWSPAN":!0,"* ROWS":!0,"* RULES":!0,"* SCOPE":!0,"* SELECTED":!0,"* SHAPE":!0,"* SIZE":!0,"* SPAN":!0,"* START":!0,"* SUMMARY":!0, +"* TABINDEX":!0,"* TITLE":!0,"* TYPE":!0,"* VALIGN":!0,"* VALUE":!0,"* VSPACE":!0,"* WIDTH":!0},ntp_nk={"* USEMAP":!0,"* ACTION":!0,"* CITE":!0,"* HREF":!0,"* LONGDESC":!0,"* SRC":!0,"LINK HREF":!0,"* FOR":!0,"* HEADERS":!0,"* NAME":!0,"A TARGET":!0,"* CLASS":!0,"* ID":!0,"* STYLE":!0}; +var ntp_5a={};var ntp_xl={rgb:!0,rgba:!0,alpha:!0,rect:!0,image:!0,"linear-gradient":!0,"radial-gradient":!0,"repeating-linear-gradient":!0,"repeating-radial-gradient":!0,"cubic-bezier":!0,matrix:!0,perspective:!0,rotate:!0,rotate3d:!0,rotatex:!0,rotatey:!0,steps:!0,rotatez:!0,scale:!0,scale3d:!0,scalex:!0,scaley:!0,scalez:!0,skew:!0,skewx:!0,skewy:!0,translate:!0,translate3d:!0,translatex:!0,translatey:!0,translatez:!0},ntp_yl=/[\n\f\r"'()*<>]/g,ntp_jl={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28", +")":"%29","*":"%2a","<":"%3c",">":"%3e"},ntp_zl=function(a,b,c){b=ntp_w(b);if(""==b)return null;var d=String(b.substr(0,4)).toLowerCase();if(0==("url("d;d++){var e="\"'".charAt(d);if(b.charAt(0)==e&&b.charAt(b.length-1)==e){b=b.substring(1,b.length-1);break a}}a=c?(a=c(b,a))&&"about:invalid#zClosurez"!=ntp_dd(a)?'url("'+ntp_dd(a).replace(ntp_yl, ntp_kl)+'")':null:null}return a}if(0document.documentMode?null:/\s*([^\s'",]+[^'",]*(('([^'\r\n\f\\]|\\[^])*')|("([^"\r\n\f\\]|\\[^])*")|[^'",])*)/g,ntp_Em={"-webkit-border-horizontal-spacing":!0,"-webkit-border-vertical-spacing":!0},ntp_Ak=function(a,b,c){var d=[];a=ntp_yk(ntp_3b(a.cssRules));ntp_t(a,function(e){if(b&&!/[a-zA-Z][\w-:\.]*/.test(b))throw Error("S");if(!(b&&ntp_h.product.La&&10==document.documentMode&&/\\['"]/.test(e.selectorText))){var f=b?e.selectorText.replace(ntp_vk,"#"+b+" $1"):e.selectorText; +d.push(ntp_vd(f,ntp_zk(e.style,c)))}});return ntp_xd(d)},ntp_yk=function(a){return ntp_Yb(a,function(b){return b instanceof CSSStyleRule||b.type==CSSRule.STYLE_RULE})},ntp_Ck=function(a,b,c){a=ntp_Bk("");return null==a?ntp_yd:ntp_Ak(a.sheet,void 0!=b?b:null,c)},ntp_Bk=function(a){return ntp_h.La&&!ntp_h.Kb(10)||"function"!=typeof ntp_a.DOMParser?null:(new DOMParser).parseFromString(""+a+"","text/html").body.children[0]},ntp_zk=function(a, +b){if(!a)return ntp_kd;var c=document.createElement("div").style,d=ntp_Dk(a);ntp_t(d,function(e){var f=ntp_h.uc&&e in ntp_Em?e:e.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/i,"");ntp_bc(f,"--")||ntp_bc(f,"var")||(e=ntp_rb(a,e),e=ntp_zl(f,e,b),null!=e&&ntp_tb(c,f,e))});return ntp_jd(c.cssText||"")},ntp_Fk=function(a){var b=Array.from(ntp_bb(ntp_rk,a,"getElementsByTagName",["STYLE"])),c=ntp_ac(b,function(e){return ntp_3b(ntp_jb(e).cssRules)});c=ntp_yk(c);c.sort(function(e, +f){e=ntp_8a(e.selectorText);a:{f=ntp_8a(f.selectorText);for(var g=Math.min(e.length,f.length),h=0;h"+c+""),ntp_Fk(c),c=c.innerHTML);var d=document.createElement("template");if("content"in d)d.innerHTML=c,d=d.content;else{var e=document.implementation.createHTMLDocument("x"); +d=e.body;e.body.innerHTML=c}c=document.createTreeWalker(d,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,null,!1);for(d=ntp_Gk?new WeakMap:new ntp_Ik;e=c.nextNode();){c:{var f=b;var g=e;switch(ntp_nb(g)){case 3:f=ntp_0k(f,g);break c;case 1:if("TEMPLATE"==ntp_lb(g).toUpperCase())f=null;else{var h=ntp_lb(g).toUpperCase();if(h in f.R)var k=null;else f.T[h]?k=document.createElement(h):(k=ntp_Sd("SPAN"),f.$&&ntp_fb(k,"data-sanitizer-original-tag",h.toLowerCase()));if(k){var l=k,m=ntp_db(g);if(null!=m)for(var n= +0;h=m[n];n++)if(h.specified){var p=f;var r=g,u=h,t=u.name;if(ntp_bc(t,"data-sanitizer-"))p=null;else{var q=ntp_lb(r);u=u.value;var v={tagName:ntp_w(q).toLowerCase(),attributeName:ntp_w(t).toLowerCase()},y={Hj:void 0};"style"==v.attributeName&&(y.Hj=ntp_hb(r));r=ntp__k(q,t);r in p.o?(p=p.o[r],p=p(u,v,y)):(t=ntp__k(null,t),t in p.o?(p=p.o[t],p=p(u,v,y)):p=null)}null===p||ntp_fb(l,h.name,p)}f=k}else f=null}break c;default:f=null}}if(f){if(1==ntp_nb(f)&&d.set(e,f),e=ntp_pb(e),g=!1,e)h=ntp_nb(e),k=ntp_lb(e).toLowerCase(), +l=ntp_pb(e),11!=h||l?"body"==k&&l&&(h=ntp_pb(l))&&!ntp_pb(h)&&(g=!0):g=!0,h=null,g||!e?h=a:1==ntp_nb(e)&&(h=d.get(e)),h.content&&(h=h.content),h.appendChild(f)}else ntp_Td(e)}d.clear&&d.clear();b=a}else b=ntp_Sd("SPAN");0b.size&&(b=ntp_c([b,a]),a=b.next().value,b=b.next().value);a=ntp_c(a);for(var c=a.next();!c.done;c=a.next())if(b.has(c.value))return!0;return!1};var ntp_Zn=Error("aa"),ntp_Wn=Error("ba"),ntp_Yn=Error("ca"),ntp_Un=Error("da"),ntp_6n,ntp_1=ntp_A(),ntp_Ca={go:function(a){ntp_1.history.go(a)}},ntp_Pn=new Map,ntp_On=new Set,ntp_Qn=new Map,ntp_Tn=new Map,ntp_1n=[],ntp_Ln=null,ntp_Hn,ntp_Gn=0,ntp_3n=!1,ntp_5n=ntp_Nb("performance.timing.navigationStart",ntp_1)||ntp_p(),ntp_Dn=function(){return ntp_1.location.pathname+ntp_1.location.search+ntp_1.location.hash},ntp_4n=function(a,b){b=void 0===b?{}:b;return ntp_2n(function(c){return ntp_9n(a,c)},function(c, +d,e){return d.url==e.url},{Dc:b.Dc,yc:b.yc})},ntp_fo=function(a,b){b=void 0===b?{}:b;return ntp_2n(function(c){var d;ntp_j(a)?d=a:d=a(c);return null===d?null:ntp_$n(d)},ntp_ao,{Dc:b.Dc,yc:b.yc})};ntp_n(ntp_fo,null,-1);ntp_n(ntp_fo,null,1);var ntp_Cn=function(){return ntp_1.history.state},ntp_7n=function(){},ntp_go=function(a){return!!a&&-1=a.height||0>=a.width?0:0>c+a.height||c>(window.innerHeight||document.documentElement.clientHeight)?1:0>b+a.width||b>(window.innerWidth|| document.documentElement.clientWidth)?2:3}; +var ntp_Z=function(a,b,c){c=void 0===c?google.time():c;a.t&&(a.t[b.clearcut]={key:b,ts:c})},ntp_dk=function(a,b){return b&&(b=b.clearcut,a.t&&a.t[b])?a.t[b].ts||null:null},ntp_ek=function(){return""},ntp_fk=function(){return""},ntp_gk=function(){},ntp_hk=function(){return""},ntp_ik=function(){return""},ntp_wl=function(){return""},ntp_kk=ntp_ck(function(a,b,c){var d=ntp_jk;b=void 0===b?google.sn:b;c=new ntp_qj(b,"csi",c);ntp_rj(c,"t","all");var e=a.e;for(f in e)ntp_rj(c,f,e[f]);window.parent!=window&& +ntp_rj(c,"wif","1");var f=ntp_A();e=f.navigator&&f.navigator.connection;if(e){var g=e.type,h;for(h in e)if("type"!=h&&e[h]==g){var k=h;break}ntp_d(k)||(k=g);ntp_d(e.downlinkMax)&&ntp_rj(c,"dlm",String(e.downlinkMax))}f.agsa_ext&&(f.agsa_ext.getNetworkConnectionType&&(k=f.agsa_ext.getNetworkConnectionType()),f.agsa_ext.getDetailedNetworkConnectionType&&ntp_rj(c,"ntyp",String(f.agsa_ext.getDetailedNetworkConnectionType())));ntp_d(k)&&ntp_rj(c,"conn",String(k));k=b;if(google.timers&&google.timers.aft){b= +google.timers.aft.t;for(var l=g=e=h=f=0,m=ntp_c(document.getElementsByTagName("img")),n=m.next();!n.done;n=m.next()){n=n.value;var p=google.ldi&&n.id&&google.ldi[n.id];p=n.hasAttribute("data-deferred")&&!p;var r=n.getAttribute("data-atf")||ntp_Km(n);3==r?n.hasAttribute("data-noaft")||(++f,p||++e,p=n.id||n.src||n.name,r=b&&b[p],p&&r&&r>h&&(h=r)):p&&(2==r?++l:++g);n.removeAttribute("data-deferred")}ntp_rj(c,"ima",String(f));ntp_rj(c,"ime",String(e));ntp_rj(c,"imeb",String(g));ntp_rj(c,"imeo",String(l)); +if(f=ntp_f("fld"))ntp_rj(c,"wh",String(ntp_vp(window).height)),b=ntp_Pd(document),ntp_rj(c,"scp",String(b.y)),f=f.getBoundingClientRect(),ntp_rj(c,"fld",String(f.top+b.y));"web"!=k&&(k=h||ntp_dk(a,ntp_Wi))&&ntp_Z(a,ntp_Qi,k)}k=a.t;h=k.start;b=a.t;for(var u in b)if("start"!=u){f=b[u].key;a:{if(a.t&&(e=ntp_dk(a,f),g=a.t.start,null!=e&&null!=g)){e=e>g?e-g:g-e;break a}e=null}f&&null!=e?c.o[f.gen204]=e:f||ntp_ia(Error("P"),{ie:{k:u}})}b=a.wsrt;if(a=window.performance&&window.performance.timing)for(u=0, +e=(f=ntp_1a("s",ntp_wh))&&f.get("nvstrt"),"number"!=typeof e||isNaN(e)||(u=(a.navigationStart||a.fetchStart)-e),f&&f.remove("nvstrt"),b?c.o[ntp_2i.gen204]=b+u:(b=a.navigationStart||a.fetchStart)&&h&&(c.o[ntp_2i.gen204]=h-b+u),u&&(c.o[ntp_Vi.gen204]=u),u=[["connectEnd","connectStart",ntp_Ri],["domainLookupEnd","domainLookupStart",ntp_Ui],["redirectEnd","redirectStart",ntp_Xi],["responseEnd","requestStart",ntp_Yi],["responseEnd","responseStart",ntp__i],["connectEnd","secureConnectionStart",ntp_0i], +["requestStart","navigationStart",ntp_Zi],["fetchStart","navigationStart",ntp_1i],["connectStart","navigationStart",ntp_Si],["domInteractive","navigationStart",ntp_Ti]],h=0;hMath.random()&&ntp_lz&&ntp_lz.estimate){google.c.b("sto");var ntp_qE=ntp_p();ntp_lz.estimate().then(function(a){var b=a.quota;ntp_Nq=Math.floor(a.usage/1E6);ntp_0r=Math.floor(b/1E6)},function(){ntp_1r=!0})["finally"](function(){ntp_aE=ntp_p()-ntp_qE;google.c.u("sto")})}ntp_wl=function(){var a={};-1!=ntp_Nq&&(a.u=ntp_Nq);-1!=ntp_0r&&(a.q=ntp_0r);ntp_1r&&(a.err=1);ntp_aE&&(a.bt=ntp_aE);return ntp_pj(a)}; + +ntp_ik=function(){var a=Number(window.navigator&&window.navigator.hardwareConcurrency);return a?ntp_pj({hc:a}):""}; +var ntp__l=function(a){var b=ntp_Nb("window.location.href");null==a&&(a='Unknown Error of type "null/undefined"');if(ntp_g(a))return{message:a,name:"Unknown error",lineNumber:"Not available",fileName:b,stack:"Not available"};var c=!1;try{var d=a.lineNumber||a.line||"Not available"}catch(f){d="Not available",c=!0}try{var e=a.fileName||a.filename||a.sourceURL||ntp_a.$googDebugFname||b}catch(f){e="Not available",c=!0}return!c&&a.lineNumber&&a.fileName&&a.stack&&a.message&&a.name?a:(b=a.message,null== +b&&(b=a.constructor&&a.constructor instanceof Function?'Unknown Error of type "'+(a.constructor.name?a.constructor.name:ntp__p(a.constructor))+'"':"Unknown Error of unknown type"),{message:b,name:a.name||"UnknownError",lineNumber:d,fileName:e,stack:a.stack||"Not available"})},ntp_Do=new Set(["Error loading script",Error("va").message,Error("ua").message,Error("W").message,Error("Ua").message]); + +var ntp_6l=function(){var a=void 0===a?new ntp_df:a;var b=void 0===b?new ntp_cf:b;this.w=a;this.o=b;this.H=function(){return new Map}};ntp_6l.prototype.Ha=function(a){var b=[];a=ntp_c(a);for(var c=a.next();!c.done;c=a.next()){var d=ntp_c(c.value);c=d.next().value;d=d.next().value;b.push(this.w.Ha({key:c,value:d}))}return this.o.Ha(b)}; +ntp_6l.prototype.Fb=function(a){var b=this.H();a=ntp_c(this.o.Fb(a));for(var c=a.next();!c.done;c=a.next()){var d=this.w.Fb(c.value);c=d.key;d=d.value;b.has(c)||b.set(c,d)}return b};var ntp_7l=function(){};ntp_7l.prototype.log=function(a,b){a=ntp_kf(a);ntp_l(window.navigator.sendBeacon)&&window.navigator.sendBeacon(a,b?(new ntp_6l).Ha(b):void 0)}; + +var ntp_8l=function(a){if(ntp_a.JSON)try{return ntp_a.JSON.stringify(a)}catch(b){}return(new ntp_zh).Ha(a)};var ntp_9l=/(https?:\/\/.*?\/.*?):/,ntp_$l=/\?.*?:/;var ntp_am=function(){};ntp_am.prototype.log=function(a,b){ntp_oi(ntp_kf(a),void 0,"POST",b?(new ntp_6l).Ha(b):void 0)};var ntp_bm=function(){this.w=ntp_l(window.navigator.sendBeacon)?new ntp_7l:new ntp_am}; +ntp_bm.prototype.o=function(a){var b=new Map,c=ntp_cm(a,"trace"),d=ntp_cm(a,"jexpid");if(c){var e=Error("q");e.stack=c;var f=void 0===f?!1:f;if(e.stack){c=f;c=void 0===c?!1:c;if(e.stack){for(var g=e.stack.split("\n"),h={},k=0,l,m=0;l=g[m];++m){c||(l=l.replace(ntp_$l,":"));var n=l.match(ntp_9l);if(n){n=n[1];if(h[n])var p=h[n];else p="{{"+k++ +"}}",h[n]=p;g[m]=l.replace(n,p)}}e.stack=g.join("\n");c=h}else c={};g=e.stack;f=void 0===f?!1:f;h=(encodeURIComponent("")+"&trace=&tum="+encodeURIComponent(ntp_8l(c))).length; +f=(f?4096:10240)-h;if(0f&&2=a?b.push("[...reached max depth limit...]"):b.push("[end]");return b.join("")}, +ntp_1p=function(a){return a&&"function"==typeof a.isDisposed?a.isDisposed():!1},ntp_rH=function(a,b){b=ntp_gm(b);return ntp_0e(a,b)},ntp_hq=function(a,b,c,d){this.type=a.type;this.event=a;this.targetElement=b;this.data=a.data;this.source=d};ntp_hq.prototype.cast=function(){return this};var ntp_iq=function(a){ntp_s.call(this);this.id=a;this.message='Service for "'+a+'" is not registered'};ntp_r(ntp_iq,ntp_s);var ntp_jq=function(){ntp_0p()},ntp_kq=function(a){ntp_4d.call(this,a)};ntp_r(ntp_kq,ntp_4d); +var ntp_lq=function(a,b,c){ntp_s.call(this);this.message='Configuration error when loading the module "'+b+'" for the service "'+a+'": '+c};ntp_r(ntp_lq,ntp_s);var ntp_mq=function(a,b,c){ntp_s.call(this);this.message='Module "'+b+'" failed to load when requesting the service "'+a+'" [cause: '+c+"]";this.stack=c.stack+"\nWRAPPED BY:\n"+this.stack};ntp_r(ntp_mq,ntp_s); +var ntp_oq=function(a,b){if(a.Ua!=b.Ua){if(ntp_nq(a.Ua,b.Ua))return 1;if(ntp_nq(b.Ua,a.Ua))return-1}return a.indexc)return!1;!(b instanceof ntp_Zq)&&5=b+31536E6?a/1E3:a>=b-31536E6&&a=ntp_cq);a&&(ntp_uj.V=!1);ntp_yj.w=ntp_dq;ntp_xj(ntp_yj);ntp_yj.V=ntp_fq;a:{if(window.gws_wizbind){if(window.document.__wizdispatcher){a=!0;break a}ntp_ia(Error("M"))}a=!1}a||google.jsad&&google.jsad(ntp_n(ntp_yj.H,ntp_yj));ntp_Dj("jsa",ntp_$p);(a=ntp_aq)&&(ntp_yj.R.fire={accept:ntp_0c,handle:a})},ntp_JG));ntp_q("google.jsa.ia",ntp_gq); +var ntp_ZG=ntp_0("xhN3hd");ntp_Cp(ntp_ZG,"FkhPof");var ntp_6G=ntp_0("Zfn8If");ntp_Cp(ntp_6G,"FkhPof");var ntp_9G=ntp_0("aVzHWd");ntp_Cp(ntp_9G,"FkhPof");var ntp_BH=ntp_0("DmQlNb",[ntp_VE]);var ntp_Yr=ntp_0("ws9Tlc");ntp_Cp(ntp_Yr,"wI7Sfc");var ntp_Zr=ntp_0("wI7Sfc",[ntp_Yr]);var ntp__r=ntp_0("L1AAkb",[ntp_Zr]);var ntp_pt=ntp_0("mdR7q",[ntp_cn,ntp_lr]);var ntp_Mu=ntp_0("kjKdXe",[ntp_en,ntp_cn,ntp_pt,ntp_lr]);var ntp_zC=ntp_0("MI6k7c",[ntp_pt]);var ntp_EC=ntp_0("EAoStd",[ntp_cn]);var ntp_HD=ntp_0("y8zIvc",[ntp__r,ntp_Yr]);var ntp_Mr=ntp_0("V7BVlc",[ntp_Jr]);ntp_Cp(ntp_Mr,"UgAtXe");var ntp_5q=ntp_0("E5jc1c");ntp_Cp(ntp_5q,"WSmMic");var ntp_ZC=ntp_0("WSmMic",[ntp_5q]);var ntp_rE=ntp_0("U0BP7e",[ntp_5q]);ntp_Cp(ntp_rE,"WSmMic");var ntp_jH=ntp_0("Pwm01c");ntp_Cp(ntp_jH,"E7zqub");var ntp_qH=ntp_0("cQQy4e");ntp_Cp(ntp_qH,"E7zqub");var ntp_YG=ntp_0("MIf1Ee");ntp_Cp(ntp_YG,"bDYKhe");var ntp_XH=ntp_0("Jh4BBd",[ntp_YG]);ntp_Cp(ntp_XH,"bDYKhe");var ntp_YH=ntp_0("j9xXy",[ntp_YG]);ntp_Cp(ntp_YH,"bDYKhe");var ntp_ZH=ntp_0("U5bg6c",[ntp_YG]);ntp_Cp(ntp_ZH,"bDYKhe");var ntp_vE=ntp_0("ObPM4d");ntp_Cp(ntp_vE,"dJU6Ve");var ntp_CG=ntp_0("qh4mBc",[ntp_vE]);var ntp_EG=ntp_0("jm8Cdf",[ntp_vE]);var ntp_xm=ntp_0("TFoe8");ntp_Cp(ntp_xm,"ptS8Ie");var ntp_jo=ntp_0("bKLuvc",[ntp_xm]);ntp_Cp(ntp_jo,"ptS8Ie");var ntp_uE=ntp_0("HAwxm",[ntp_xm]);ntp_Cp(ntp_uE,"ptS8Ie");var ntp_qF=ntp_0("Vsbnzf",[ntp_xm]);ntp_Cp(ntp_qF,"ptS8Ie");var ntp_mz=ntp_0("wqoyyb");ntp_Cp(ntp_mz,"T7XTS");var ntp_hG=ntp_0("vwmvWd",[ntp_mz]);var ntp_HG=ntp_0("yHxep",[ntp_mz]);var ntp_VH=ntp_0("bDYKhe",[ntp_YG]);var ntp_iH=ntp_0("dJU6Ve",[ntp_vE]);var ntp_pF=ntp_0("ptS8Ie",[ntp_xm]);var ntp_UD=ntp_0("T7XTS",[ntp_mz]);var ntp_2r={},ntp_3r=new ntp_Zh(260,null,1);ntp_2r[260]=ntp_3r;var ntp_4r=1;var ntp_5r=new Map([["visible",1],["hidden",2],["repressed",3]]),ntp_6r=new Map([[1,0],[2,1],[3,2]]),ntp_7r=function(){this.R=ntp_4r++;this.w=[];this.o=[];this.H=null};var ntp_9r=function(a){ntp_S(this,a,-1,ntp_8r,null)};ntp_r(ntp_9r,ntp_P);var ntp_8r=[1],ntp_$r=new ntp_Zh(399,ntp_9r,0);ntp_2r[399]=ntp_$r;var ntp_as=function(){this.o=new ntp_7r};ntp_Ob(ntp_as);var ntp_bs=function(a){function b(c){this.content=c}b.prototype=a.prototype;return function(c,d){c=new b(String(c));void 0!==d&&(c.o=d);return c}}(ntp_Tq);var ntp_cs=ntp_5c(function(){return ntp_Tp(ntp_Hp("Yllh3e"),ntp_5p)});var ntp_tE=function(){};ntp_mn(ntp_tE,ntp_ZC,ntp_5q); +ntp_Sp(ntp_OG(ntp_VE),ntp_9G); +ntp_ra().o(); +}catch(e){_DumpException(e)} +try{ +var ntp_ot=function(a){var b=new Map;b.set("ei",google.kEI);google.cshid&&b.set("cshid",google.cshid);ntp_Kj(b);b.set("yv","3");a.forEach(function(c,d){b.set(d,c)});ntp_nt(b);return b},ntp_GJ=function(){var a=ntp_f("user-dtw"),b=ntp_f("lga");a&&b&&(a.style.display="none",b.style.display="block",ntp_FJ&&ntp_FJ.stop())},ntp_NJ=function(a){if(a){var b=ntp_f("user-weather");b&&(b.style.display="inline-block");(b=ntp_f("weather-attribution"))&&ntp_HJ(b,a.attribution);if(b=ntp_f("weather-icon"))b.src=a.icon_url, +b.alt=a.weather_condition,b.title=a.weather_condition;b=ntp_IJ(new ntp_8c(ntp_6c,"℉"));a=ntp_bh(a.current_temp_f);var c=ntp_f("weather-temp");c&&(ntp_Fd(c,a),ntp_Xm(c,b))}},ntp_VG=function(a,b){var c=new Date;ntp_Fd(a,ntp_bh(ntp_aH(new ntp_bH(7),c).replace(/\D*([:\d]*)\D*/,"$1")));ntp_Fd(b,ntp_bh(ntp_aH(new ntp_bH(ntp_cH.nm),c)))},ntp_Dt={gen204:"fr",clearcut:35},ntp_Et={gen204:"st",clearcut:36},ntp_Ft={gen204:"ft",clearcut:37},ntp_Gt={gen204:"bs",clearcut:38},ntp_0t=function(a,b,c){c=void 0=== +c?{}:c;a=Error.call(this,a);this.message=a.message;"stack"in a&&(this.stack=a.stack);this.details=c;this.details.t=b};ntp_i(ntp_0t,Error); +var ntp_ko=function(a,b){var c=a.H;c=Math.round(c.w+(c.o?ntp_oj()-c.o:0));a.o[b.gen204]=c},ntp_1t=null,ntp_2t=function(a){var b=a.method,c=a.url,d=a.$p,e=a.tj,f=a.am,g=ntp_I(),h=ntp_1t?ntp_1t():new ntp_U;h.listen("complete",function(k){k=k.target;if(k.isSuccess()){ntp_ko(f,ntp_Et);var l=ntp_xi(k);f.o[ntp_Gt.gen204]=l.length;if(!l){var m={};g.reject(new ntp_0t("ta",e,(m.s=k.getStatus(),m.r=l,m)))}g.resolve(l)}else ntp_ko(f,ntp_Ft),f.log(),(l=k.getStatus())?(m={},l=(m.s=l,m),7==k.$&&(l.ab=1),g.reject(new ntp_0t("ua", +e,l))):g.reject(new ntp_0t("va",e))});a=ntp_J(g.o,function(k){if(k instanceof ntp_Wf)h.abort();else throw k;});ntp_ko(f,ntp_Dt);h.ka=!1;h.send(c,b,d);return a},ntp_4t=function(a){return!a||a instanceof Map?new Map(a):new Map(Object.entries(a))},ntp_3t=function(a,b){var c="";c=void 0===c?"":c;b=ntp_ot(b);if(""==c)var d="/async/newtab";else"feed_api"==c?d="/feed-api/async/newtab":(d="/"+c,b.set("asearch","newtab"),"s"==c&&b.set("sns","1"));c=new ntp_rh(d);b=ntp_c(b);for(d=b.next();!d.done;d=b.next()){var e= +ntp_c(d.value);d=e.next().value;e=e.next().value;c.o.set(""+d,""+e)}c=c.toString();b=[];a=ntp_c(a);for(d=a.next();!d.done;d=a.next())e=ntp_c(d.value),d=e.next().value,e=e.next().value,b.push(encodeURIComponent(String(d))+":"+encodeURIComponent(String(e)));(a=b.join(","))&&(c=c+"&async="+a);return c},ntp_5t=function(a,b,c,d){a.set("_fmt","json");a=ntp_3t(a,b,d);return ntp_2t({method:"GET",url:a,am:c,tj:"newtab"}).then(function(e){ntp_bc(e,")]}'\n")&&(e=e.substr(5));try{var f=JSON.parse(e)}catch(g){return ntp_Of(g)}return ntp_m(f)&& +(f=ntp_vc(f),e=f.__err__,ntp_d(e))?ntp_Of(e):ntp_H(f)})},ntp_6t=function(a){var b=void 0===b?{}:b;var c=void 0===c?"insert":c;var d=new ntp_qj("async");ntp_rj(d,"astyp","newtab");d.start();a=ntp_4t(a);b=ntp_4t(b);return ntp_5t(a,b,d,c)},ntp_qt=null,ntp_rt=/^[\w+/_-]+[=]{0,2}$/,ntp_st=function(a){null!==a&&"removeAttribute"in a&&a.removeAttribute(ntp_Rb);try{delete a[ntp_Rb]}catch(b){}},ntp_tt=function(a,b){b=ntp_Zb(a,b,void 0);0<=b&&ntp_1b(a,b)},ntp_sG=function(a){return ntp_ba(a,function(b){b=b.toString(16); +return 1=Math.abs(a-f)){d=f;break}}null===d&&(d=b);return d/c}return ntp_A().document.documentElement.offsetWidth}return ntp_A().document.documentElement.clientWidth}; +var ntp__t=function(a,b){this.W=this.R=null;this.o=a;this.ka=b;this.ha=ntp_0c;this.$=!1;null==a.getAttribute("aria-label")&&a.setAttribute("aria-label",b);this.H=ntp_n(this.lj,this);this.w=ntp_n(this.Kj,this);ntp_D(this.o,"mouseover",this.H);ntp_D(this.o,"mouseout",this.w);ntp_D(this.o,"focus",this.H);ntp_D(this.o,"focusin",this.H);ntp_D(this.o,"blur",this.w);ntp_D(this.o,"focusout",this.w);ntp_D(this.o,"mousedown",this.w);ntp_D(this.o,"click",this.w);ntp_D(this.o,"keydown",this.w);ntp_D(this.o,"contextmenu", +this.w)};ntp_=ntp__t.prototype;ntp_.destroy=function(){this.$||(this.$=!0,window.clearTimeout(this.V),window.clearTimeout(this.T),this.Hh(),ntp_pe(this.o,"mouseover",this.H),ntp_pe(this.o,"mouseout",this.w),ntp_pe(this.o,"focus",this.H),ntp_pe(this.o,"focusin",this.H),ntp_pe(this.o,"blur",this.w),ntp_pe(this.o,"focusout",this.w),ntp_pe(this.o,"mousedown",this.w),ntp_pe(this.o,"click",this.w),ntp_pe(this.o,"keydown",this.w),ntp_pe(this.o,"contextmenu",this.w),this.ha=this.w=this.H=this.o=null)}; +ntp_.lj=function(){this.ha()&&null==this.V&&(window.clearTimeout(this.T),this.T=null,this.V=window.setTimeout(ntp_n(this.km,this),130))};ntp_.Kj=function(){null==this.T&&(window.clearTimeout(this.V),this.V=null,this.T=window.setTimeout(ntp_n(this.Hh,this),130))}; +ntp_.km=function(){if(!ntp_Xd(document,this.o))this.destroy();else if(!this.R){var a=ntp_B("DIV",void 0,this.ka),b="background:#2d2d2d;border:1px solid;border-color:#fff;box-shadow:1px 2px 4px rgba(0,0,0,0.2);box-sizing:border-box;color:#fff;display:block;font-size:11px;font-weight:bold;height:29px;left:0;line-height:29px;padding:0 10px;position:absolute;text-align:center;top:0;transition:opacity 0.13s;white-space:nowrap;visibility:hidden;z-index:2000;";ntp_Nc()?b+="-webkit-box-shadow:0px 1px 4px rgba(0,0,0,0.2);-webkit-box-sizing:border-box;-webkit-transition:opacity 0.13s;": +ntp_Oc()?b+="-moz-box-shadow:0px 1px 4px rgba(0,0,0,0.2);-moz-box-sizing:border-box;-moz-transition:opacity 0.13s;":ntp_x("Presto")&&(b+="-o-transition:opacity 0.13s;");a.style.cssText=b;this.R=a;b=document.createElement("div");b.style.cssText="border:6px solid;border-color:#fff transparent;border-top-width:0;content:'';display:block;font-size:0px;height:0;line-height:0;position:absolute;top:-6px;width:0;";var c=document.createElement("div");c.style.cssText=b.style.cssText;c.style.top="1px";c.style.left= +"-6px";c.style.borderColor="#2d2d2d transparent";b.appendChild(c);(this.W=b)&&a.appendChild(b);document.body.appendChild(a);b=this.o;var d=ntp_Jd(b);c=new ntp_Hd(0,0);var e=d?ntp_Jd(d):document;var f;(f=!ntp_h.La||ntp_h.md(9))||(ntp_Kd(e),f=!0);if(b!=(f?e.documentElement:e.body)){b:{try{var g=b.getBoundingClientRect()}catch(k){g={left:0,top:0,right:0,bottom:0};break b}ntp_h.La&&b.ownerDocument.body&&(e=b.ownerDocument,g.left-=e.documentElement.clientLeft+e.body.clientLeft,g.top-=e.documentElement.clientTop+ +e.body.clientTop)}d=ntp_Pd(ntp_Kd(d).o);c.x=g.left+d.x;c.y=g.top+d.y}e=b.offsetWidth;f=c.x;var h=this.R.offsetWidth;d=c.x;g=e/2-h/2+f;g+h>ntp_Zt()?g=f+e-h+1:0>g&&(g=f-1);c=c.y+b.offsetHeight+5;e=this.R;e.style.left=g+"px";e.style.top=c+"px";this.W.style.left=d+b.offsetWidth/2-e.offsetLeft-1-6+"px";a.style.visibility="visible";this.V=null}};ntp_.getMessage=function(){return this.ka};ntp_.Hh=function(){this.R&&(ntp_Ud(this.R),this.T=this.W=this.R=null,ntp_Xd(document,this.o)||this.destroy())}; +var ntp_Dp={},ntp_7t,ntp_8t,ntp_4,ntp_9t=function(a){var b=ntp_4.checkIsUserSignedIntoChromeAs;return b?(b(a),!0):!1},ntp_$t=function(){var a=ntp_4.checkIsUserSyncingHistory;return a?(a(),!0):!1},ntp_au=function(){var a=ntp_4.themeBackgroundInfo;return a?{nj:a.alternateLogo,uj:a.attributionUrl,attributionActionUrl:a.attributionActionUrl,Xc:a.attribution1,Ed:a.attribution2,Yc:a.backgroundColorRgba,de:a.colorRgba,Xe:a.customBackgroundConfigured,uf:a.headerColorRgba,imageUrl:a.imageUrl||"",imageHeight:a.imageHeight|| +0,ih:a.imageHorizontalAlignment||"",Hl:a.imageVerticalAlignment||"",Gl:a.imageTiling||"",Op:a.linkColorRgba,Tf:a.sectionBorderColorRgba,nc:a.textColorRgba,$f:a.textColorLightRgba,Xd:a.usingDefaultTheme}:null},ntp_bu=function(){return!!ntp_8t.isKeyCaptureEnabled},ntp_cu=function(a){var b=ntp_4.logEvent;b&&b(a)},ntp_du=function(a){var b=ntp_8t.paste;b&&b(a)},ntp_NA=function(){var a=ntp_4.setBackgroundURL;a&&a("")},ntp_eu=function(a,b,c,d){var e=ntp_4.setBackgroundURLWithAttributions;e&&e(a,b,c,d)}, +ntp_2p=function(){var a=ntp_8t.startCapturingKeyStrokes;a&&a()},ntp_fu=function(){var a=ntp_4.resetCustomLinks;a&&a()};(function(){function a(b,c){for(var d=b,e=1;d&&e=k)ntp_Ku(this,g);else if(2==k){g=h.dataset.url;k=h.dataset.Xc; +var l=h.dataset.Ed;h=h.dataset.attributionActionUrl;ntp_f("bg-sel-menu").close();ntp_Gu(this);ntp_eu(g,k,l,h)}ntp_cu(48)},a);e.onclick=f;e.onkeyup=ntp_n(function(g){g.preventDefault();g.stopPropagation();if(13==g.keyCode){var h=ntp_f("bg-sel-footer-done");ntp_X(h,"done-available");h.tabIndex=0;ntp_Ku(this,g)}else{h=null;var k=g.target;37==g.keyCode?h=ntp_Ju(-1,0,k.dataset.qc):38==g.keyCode?h=ntp_Ju(0,-1,k.dataset.qc):39==g.keyCode?h=ntp_Ju(1,0,k.dataset.qc):40==g.keyCode&&(h=ntp_Ju(0,1,k.dataset.qc)); +h&&h.focus()}},a);d.appendChild(e)}d.focus()},ntp_Ku=function(a,b){var c=b.target;ntp_W(c,"bg-sel-tile")||(c=c.parentNode);b=ntp_f("bg-sel-footer-done");if(a.w){var d=ntp_f(a.$);ntp_Y(d,"bg-selected");d.removeChild(d.firstChild);d.setAttribute("aria-label",d.dataset.Qh);if(d==c){a.w=!1;ntp_Y(b,"done-available");return}}a.$=c.id;a.w=!0;a=c;ntp_X(a,"bg-selected");c=document.createElement("div");d=document.createElement("div");var e=document.createElement("div");ntp_X(c,"selected-border");ntp_X(d,"selected-circle"); +ntp_X(e,"selected-check");c.appendChild(d);c.appendChild(e);a.appendChild(c);a.dataset.Qh=a.getAttribute("aria-label");a.setAttribute("aria-label",a.dataset.Qh+" "+ntp_f("selected-label").textContent);ntp_X(b,"done-available")},ntp_Cu=function(){var a=ntp_f("ntp-collection-loader");a&&a.parentNode.removeChild(a);a=document.createElement("script");a.id="ntp-collection-loader";a.src="chrome-search://local-ntp/ntp-background-collections.js?collection_type=background";document.body.appendChild(a)},ntp_Hu= +function(a){var b=document.createElement("div");b.style.backgroundImage="url("+a.previewImageUrl+")";b.dataset.id=a.collectionId;b.dataset.name=a.collectionName;return b};ntp_=ntp_yu.prototype;ntp_.Ag=function(){ntp_Gu(this);ntp_Du(this)};ntp_.vj=function(a){13!=a.keyCode&&32!=a.keyCode||this.Ag()};ntp_.Bg=function(){ntp_f("bg-sel-menu").close();ntp_Gu(this);ntp_cu(49)};ntp_.Cj=function(a){13!=a.keyCode&&32!=a.keyCode||this.Bg()}; +ntp_.Jg=function(){var a=ntp_f("bg-sel-footer-done");if(ntp_W(a,"done-available")){var b=ntp_f(this.$);a=b.dataset.url;var c=b.dataset.Xc,d=b.dataset.Ed;b=b.dataset.attributionActionUrl;ntp_f("bg-sel-menu").close();ntp_Gu(this);ntp_eu(a,c,d,b)}};ntp_.Uj=function(a){13!=a.keyCode&&32!=a.keyCode||this.Jg()}; +var ntp_Gu=function(a){for(var b=ntp_f("bg-sel-footer-done"),c=ntp_f("bg-sel-tiles");c.firstChild;)c.removeChild(c.firstChild);a.w=!1;b.tabIndex="-1";ntp_Y(b,"done-available")},ntp_Lu=function(a,b,c){var d=ntp_f("custom-bg-attr"),e=document.createElement("div"),f=document.createElement("div");""!=a&&(e.textContent=a,ntp_X(e,"attr1"),d.appendChild(e));""!=b&&(f.textContent=b,ntp_X(f,"attr2"),d.appendChild(f));""!=c&&(a=""!=b?f:e,ntp_X(a,"attr-link"),b=document.createElement("div"),b.id="ntp-link-icon", +a.insertBefore(b,a.firstChild),d.classList.add("attr-link"),d.onclick=function(){ntp_Bt(c);ntp_cu(43)},d.style.cursor="pointer")},ntp_Au=function(){for(var a=ntp_f("custom-bg-attr");a.firstChild;)a.removeChild(a.firstChild);ntp_Y(a,"attr-link");a.removeAttribute("onclick");a.style.cursor=""},ntp_Eu=function(a,b){var c=ntp_f("unavailable-message").textContent;"undefined"!=b?b.net_error?0!=b.net_error_no?ntp_$v(a.H,ntp_f("connection-error-period").textContent,ntp_f("more-info").textContent,function(){ntp_Bt("https://chrome://network-error/"+ +b.net_error_no)}):ntp_$v(a.H,ntp_f("connection-error").textContent):b.service_error&&ntp_$v(a.H,c):ntp_$v(a.H,c)},ntp_Bu=function(a,b){var c=[];c.push(ntp_f("edit-bg-default-wallpapers"));c.push(ntp_f("edit-bg-upload-image"));c.push(ntp_f("custom-links-restore-default"));c.push(ntp_f("edit-bg-restore-default"));var d=a;do d+=b,-1===d&&(d=c.length-1),d===c.length&&(d=0);while(d!==a&&(c[d].hidden||"none"==c[d].style.display||ntp_W(c[d],"bg-option-disabled")));return c[d]},ntp_Ju=function(a,b,c){var d= ntp_f("bg-sel-menu"),e=3;517>d.offsetWidth&&(e=2);352>d.offsetWidth&&(e=1);a=parseInt(c,10)+a+b*e;return ntp_W(d,"is-img-sel")?ntp_f("img_tile_"+a):ntp_W(d,"is-col-sel")?ntp_f("coll_tile_"+a):null}; +var ntp_fH={xj:["BC","AD"],ej:["Before Christ","Anno Domini"],Ej:"JFMAMJJASOND".split(""),Ik:"JFMAMJJASOND".split(""),Dj:"January February March April May June July August September October November December".split(" "),Hk:"January February March April May June July August September October November December".split(" "),Gj:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),Lk:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),cm:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), +bm:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),Ek:"Sun Mon Tue Wed Thu Fri Sat".split(" "),Pk:"Sun Mon Tue Wed Thu Fri Sat".split(" "),Wo:"SMTWTFS".split(""),Kk:"SMTWTFS".split(""),zk:["Q1","Q2","Q3","Q4"],Fj:["1st quarter","2nd quarter","3rd quarter","4th quarter"],Ni:["AM","PM"],Rh:["EEEE, MMMM d, y","MMMM d, y","MMM d, y","M/d/yy"],Mi:["h:mm:ss a zzzz","h:mm:ss a z","h:mm:ss a","h:mm a"],Ri:["{1} 'at' {0}","{1} 'at' {0}","{1}, {0}","{1}, {0}"],Xh:6,Cq:[5,6],ii:5},ntp_gH= ntp_fH;ntp_gH=ntp_fH; +var ntp_hH=function(a,b,c,d,e){a=new Date(a,b,c);e=e||0;return a.valueOf()+864E5*(((ntp_d(d)?d:3)-e+7)%7-((a.getDay()+6)%7-e+7)%7)};var ntp_sH=function(){},ntp_uH=function(a){if("number"==typeof a){var b=new ntp_sH;b.H=a;var c=a;if(0==c)c="Etc/GMT";else{var d=["Etc/GMT",0>c?"-":"+"];c=Math.abs(c);d.push(Math.floor(c/60)%100);c%=60;0!=c&&d.push(":",ntp_dH(c,2));c=d.join("")}b.R=c;c=a;0==c?c="UTC":(d=["UTC",0>c?"+":"-"],c=Math.abs(c),d.push(Math.floor(c/60)%100),c%=60,0!=c&&d.push(":",c),c=d.join(""));a=ntp_tH(a);b.T=[c,c];b.o={Tp:a,Ci:a};b.w=[];return b}b=new ntp_sH;b.R=a.id;b.H=-a.std_offset;b.T=a.names;b.o=a.names_ext;b.w=a.transitions; +return b},ntp_tH=function(a){var b=["GMT"];b.push(0>=a?"+":"-");a=Math.abs(a);b.push(ntp_dH(Math.floor(a/60)%100,2),":",ntp_dH(a%60,2));return b.join("")},ntp_vH=function(a,b){b=Date.UTC(b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate(),b.getUTCHours(),b.getUTCMinutes())/36E5;for(var c=0;c=a.w[c];)c+=2;return 0==c?0:a.w[c-1]}; +var ntp_bH=function(a){this.w=[];this.o=ntp_gH;"number"==typeof a?ntp_wH(this,a):ntp_xH(this,a)},ntp_yH=[/^'(?:[^']|'')*('|$)/,/^(?:G+|y+|Y+|M+|k+|S+|E+|a+|h+|K+|H+|c+|L+|Q+|d+|m+|s+|v+|V+|w+|z+|Z+)/,/^[^'GyYMkSEahKHcLQdmsvVwzZ]+/],ntp_zH=function(a){return a.getHours?a.getHours():0},ntp_xH=function(a,b){for(ntp_AH&&(b=b.replace(/\u200f/g,""));b;){for(var c=b,d=0;db)var c=a.o.Rh[b];else if(8>b)c=a.o.Mi[b-4];else if(12>b)c=a.o.Ri[b-8],c=c.replace("{1}",a.o.Rh[b-8]),c=c.replace("{0}",a.o.Mi[b-8]);else{ntp_wH(a,10);return}ntp_xH(a,c)},ntp_OH=function(a,b){b=String(b); +a=a.o||ntp_gH;if(void 0!==a.om){for(var c=[],d=0;d=e?String.fromCharCode(a.om+e-48):b.charAt(d))}b=c.join("")}return b},ntp_AH=!1,ntp_PH=function(a){if(!(a.getHours&&a.getSeconds&&a.getMinutes))throw Error("Xa");},ntp_NH=function(a,b,c,d,e){var f=b.length;switch(b.charAt(0)){case "G":return c=0c&&(c=-c),2==f&&(c%=100),ntp_OH(a,ntp_dH(c,f));case "Y":return c=(new Date(ntp_hH(d.getFullYear(), +d.getMonth(),d.getDate(),a.o.ii,a.o.Xh))).getFullYear(),0>c&&(c=-c),2==f&&(c%=100),ntp_OH(a,ntp_dH(c,f));case "M":a:switch(c=d.getMonth(),f){case 5:f=a.o.Ej[c];break a;case 4:f=a.o.Dj[c];break a;case 3:f=a.o.Gj[c];break a;default:f=ntp_OH(a,ntp_dH(c+1,f))}return f;case "k":return ntp_PH(e),ntp_OH(a,ntp_dH(ntp_zH(e)||24,f));case "S":return ntp_OH(a,(e.getMilliseconds()/1E3).toFixed(Math.min(3,f)).substr(2)+(3f?1:0];case "h":return ntp_PH(e),ntp_OH(a,ntp_dH(ntp_zH(e)%12||12,f));case "K":return ntp_PH(e),ntp_OH(a,ntp_dH(ntp_zH(e)%12,f));case "H":return ntp_PH(e),ntp_OH(a,ntp_dH(ntp_zH(e),f));case "c":a:switch(c=d.getDay(),f){case 5:f=a.o.Kk[c];break a;case 4:f=a.o.bm[c];break a;case 3:f=a.o.Pk[c];break a;default:f=ntp_OH(a,ntp_dH(c,1))}return f;case "L":a:switch(c=d.getMonth(),f){case 5:f=a.o.Ik[c];break a;case 4:f=a.o.Hk[c];break a;case 3:f=a.o.Lk[c];break a;default:f=ntp_OH(a, +ntp_dH(c+1,f))}return f;case "Q":return c=Math.floor(d.getMonth()/3),4>f?a.o.zk[c]:a.o.Fj[c];case "d":return ntp_OH(a,ntp_dH(d.getDate(),f));case "m":return ntp_PH(e),ntp_OH(a,ntp_dH(e.getMinutes(),f));case "s":return ntp_PH(e),ntp_OH(a,ntp_dH(e.getSeconds(),f));case "v":return f=ntp_uH(c.getTimezoneOffset()),f.R;case "V":return a=ntp_uH(c.getTimezoneOffset()),2>=f?a.R:0f?a.T[0f?(f=-(b.H-ntp_vH(b,c)),a=[0>f?"-":"+"],f=Math.abs(f),a.push(ntp_dH(Math.floor(f/60)%100,2),ntp_dH(f%60,2)),f=a.join("")):f=ntp_OH(a,ntp_tH(b.H-ntp_vH(b,c))),f;default:return""}}; +var ntp_QH={Fq:"y",Gq:"y G",Hq:"MMM y",Iq:"MMMM y",zn:"MMM d",Jn:"MMMM dd",Vn:"M/d",Kn:"MMMM d",Wn:"MMM d, y",nm:"EEE, MMM d",eq:"EEE, MMM d, y",jn:"d"},ntp_cH=ntp_QH;ntp_cH=ntp_QH;var ntp_FJ=null;var ntp_Nu=function(a){this.o=a},ntp_Ou=function(a){return new ntp_G(function(b,c){if(a.ri){var d=a.page;if(d.thumbnail){var e=ntp_B("IMG",{src:d.thumbnail});a.Mf.appendChild(e);e.onload=function(){b(null)};e.onerror=function(){ntp_Ud(e);c(null)}}else c(null)}else c(null)})},ntp_Pu=function(a){return new ntp_G(function(b,c){if(a.ri){var d=a.page,e=a.Lj;d.url?(c=(new ntp_Lj(d.url)).w,c=ntp_B("DIV","mv-domain",c),ntp_Ke(c,"color","#"+e.o.substr(0,6)),ntp_Ke(c,"font-family",e.R),ntp_Ke(c,"font-size", +e.T+"px"),a.Mf.appendChild(c),b(null)):c(null)}else c(null)})},ntp_Qu=function(a){return new ntp_G(function(b){var c=ntp_B("DIV","mv-dot-bg"),d=ntp_B("DIV","mv-dot");c.appendChild(d);a.Mf.appendChild(c);b(null)})};ntp_Nu.prototype.execute=function(a,b,c,d){var e={page:a,Mf:b,Lj:c,ri:d},f=ntp_Of();ntp_t(this.o,function(g){f=ntp_J(f,function(){return g(e)})});ntp_J(f,ntp_e)}; +var ntp_Ru=parseInt(window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1],10),ntp_Su=function(){google.doodle&&google.doodle.cpDestroy&&google.doodle.cpDestroy()},ntp_Tu=function(){google.doodle&&google.doodle.cpInit&&google.doodle.cpInit()},ntp_Vu=function(a,b){var c=[],d=[];b=ntp_Uu("noscript",b);b=ntp_Uu("script",b,c);b=ntp_Uu("style",b,d);a.innerHTML=b;for(var e=0;e'+this.o.complex_logo+"":""),ntp_Tu()); +if(b=ntp_f("dood"))b.style.opacity=1}else b.innerHTML=1==a?this.T:this.R,c&&ntp_$u(this)}}; +var ntp_$u=function(a){var b=ntp_f("hplogo"),c=ntp_f("lga");if(!ntp_f("ctDoodleNotifier")&&b&&c){var d=b.cloneNode(!0),e=ntp_B("A",{id:"ctDoodleNotifier",style:"cursor:pointer",title:a.ma}),f=a.ra?ntp_B("doodle-notifier"):ntp_B("IMG",{src:"/images/srpr/doodle_notifier_01.gif"});e.appendChild(f);"DOODLE-NOTIFIER"==f.tagName&&f.toggle&&setTimeout(function(){f.toggle(!1)},119680);e.onclick=ntp_n(function(){this.ka&&this.ka()},a);a=ntp_B("SPAN",{style:"position:relative"},d,e);ntp_Su();c.replaceChild(a, b)}}; +var ntp_av=function(a,b){a=ntp_3e("/chromesuggestions/blacklist","url",a);ntp_oi(a,b)};var ntp_bv=function(){};var ntp_cv=function(a,b,c){this.V=a;this.o=b;this.$=c;this.T=this.H=1;this.w=new ntp_bi(3E5);ntp_D(this.w,"tick",ntp_n(this.Zm,this));this.w.start();this.W=!0;ntp_D(ntp_Pe(),"visibilitychange",ntp_n(this.ha,this))};ntp_r(ntp_cv,ntp_bv);ntp_cv.prototype.ha=function(){ntp_Fe(ntp_Pe())?this.w.stop():this.W&&this.w.start()};ntp_cv.prototype.R=function(){this.W=!0;ntp_Fe(ntp_Pe())||this.w.start()}; +var ntp_dv=function(a){a.W=!1;a.w.stop()},ntp_fv=function(a,b){var c=a.o.indexOf(b);-1=this.T&&(0=ntp_Ru;this.o=!0;this.R=a;this.T=b;this.w=new ntp_cv(b,c,ntp_n(this.rf,this));this.$=[new ntp_gv(this.w)];this.H=new ntp_bi(3E5);ntp_D(this.H,"tick",ntp_n(this.Zh,this));ntp_D(ntp_Pe(),"visibilitychange",ntp_n(this.al,this));this.H.start()};ntp_r(ntp_nv,ntp_kv);ntp_=ntp_nv.prototype;ntp_.Wf=function(a){this.V=a};ntp_.yi=function(a){this.ha=a}; +ntp_.Kf=function(a){var b=a.url;b&&(ntp_fv(this.w,b),a=ntp_n(this.Fi,this),b=ntp_3e("/chromesuggestions/blacklist/undo","url",b),ntp_oi(b,a))};ntp_.Jf=function(){var a=this.w;a.o=[];a.yd();ntp_oi("/chromesuggestions/blacklist/clear",ntp_n(this.Fi,this))};ntp_.Ve=function(){return this.o};ntp_.kf=function(a,b,c,d){b=["pos="+encodeURIComponent(c.toString()),"url="+encodeURIComponent(b.url),"pr="+ntp_jv(b)].concat(a.qf(b,!0,d)).concat(ntp_ov(this,b));return a.Me+"?"+b.join("&")}; +var ntp_ov=function(a,b){var c=[];"title"in b&&c.push("ti="+encodeURIComponent(b.title));a.W&&(a=new ntp_Lj(b.url),c.push("dom="+encodeURIComponent(a.w)),"thumbnail"in b&&c.push("tu2="+encodeURIComponent(b.thumbnail)));return c};ntp_=ntp_nv.prototype;ntp_.Ug=function(a,b){if(this.W)return null;var c=ntp_B("DIV","mv-locfallback");b.V.execute(a,c,b,!0);return c};ntp_.le=function(){var a=this.R;if(a){for(var b=0;b=c&&0<=e&&255>=e&&0<=d&&255>=d){c=[c,e,d];break a}}c=[]}if(c.length)return b.Mc=ntp_uv(c[0],c[1],c[2]),b.type="rgb",b;if(ntp_qv&&(c=ntp_qv[a.toLowerCase()]))return b.Mc=c,b.type= +"named",b;throw Error("wa`"+a);},ntp_sv=/#(.)(.)(.)/,ntp_uv=function(a,b,c){a=Number(a);b=Number(b);c=Number(c);if(a!=(a&255)||b!=(b&255)||c!=(c&255))throw Error("ya`"+a+"`"+b+"`"+c);b=a<<16|b<<8|c;return 16>a?"#"+(16777216|b).toString(16).substr(1):"#"+b.toString(16)},ntp_xv=function(a,b,c){0>c?c+=1:16*c?a+6*(b-a)*c:1>2*c?b:2>3*c?a+(b-a)*(2/3-c)*6:a},ntp_rv=/^#(?:[0-9a-f]{3}){1,2}$/i,ntp_tv=/^(?:rgb)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})\)$/i,ntp_wv=function(a){return 1== a.length?"0"+a:a}; +var ntp_Cv=function(a){var b={};a=String(a);var c="#"==a.charAt(0)?a:"#"+a;if(ntp_yv.test(c))return b.Mc=ntp_zv(c),b.type="hex",b;a:{var d=a.match(ntp_Av);if(d){c=Number(d[1]);var e=Number(d[2]);var f=Number(d[3]);d=Number(d[4]);if(0<=c&&255>=c&&0<=e&&255>=e&&0<=f&&255>=f&&0<=d&&1>=d){f=[c,e,f,d];break a}}f=[]}if(f.length){a=f[0];c=f[1];e=f[2];f=f[3];d=Math.floor(255*f);if(isNaN(d)||0>d||255=c&&0<=e&&100>=e&&0<=f&&100>=f&&0<=d&&1>=d){d=[c,e,f,d];break a}d=[]}if(d.length){c=d[0];f=d[1];e=d[2];a=d[3];d=Math.floor(255*a);if(isNaN(d)||0>d||255e?e*(1+f):e+f-f*e;var g=2*e-d;e=255*ntp_xv(g,d,c+1/3);f=255*ntp_xv(g,d,c);c=255*ntp_xv(g,d,c-1/3)}c=[Math.round(e),Math.round(f),Math.round(c)]; +c=ntp_uv(c[0],c[1],c[2]);b.Mc=c+a;b.type="hsla";return b}throw Error("wa`"+a);},ntp_Dv=/#(.)(.)(.)(.)/,ntp_zv=function(a){if(!ntp_yv.test(a))throw Error("za`"+a);5==a.length&&(a=a.replace(ntp_Dv,"#$1$1$2$2$3$3$4$4"));return a.toLowerCase()},ntp_Ev=function(a){a=ntp_zv(a);return[parseInt(a.substr(1,2),16),parseInt(a.substr(3,2),16),parseInt(a.substr(5,2),16),parseInt(a.substr(7,2),16)/255]},ntp_yv=/^#(?:[0-9a-f]{4}){1,2}$/i,ntp_Av=/^(?:rgba)?\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2}),\s?(0|1|0\.\d{0,10})\)$/i, ntp_Bv=/^(?:hsla)\((0|[1-9]\d{0,2}),\s?(0|[1-9]\d{0,2})%,\s?(0|[1-9]\d{0,2})%,\s?(0|1|0\.\d{0,10})\)$/i; +var ntp_Hv=function(a,b){var c=ntp_gu,d=ntp_Fv,e=ntp_xu;this.T="theme-attr-img";this.va=d;this.H=ntp_f("custom-bg-attr");this.o=ntp_f("theme-attr");this.ma=ntp_f("theme-attr-msg");this.ha=null;this.ka=new ntp_Uh;this.R=null;this.V=e;this.W=a;this.$=b;this.w=c;a=ntp_n(this.ta,this);this.w.ka=a;a=ntp_n(this.ra,this);this.w.W=a;ntp_Gv(this)},ntp_Iv,ntp_Jv=["rgba(255,255,255,1)","rgba(0,0,0,0)"],ntp_Gv=function(a){if(ntp_Kv(a))ntp_Lv(a),a.w.render(0);else{a.R=null;var b=ntp_au();if(b){var c=window.JSON.stringify(b); +if(c!=a.ha&&null!=document.body&&ntp__H()){ntp_f("edit-bg-restore-default")&&ntp_f("edit-bg-restore-default").classList.toggle("bg-option-disabled",!b.Xe);if((a.W||a.$)&&a.V){var d=a.V,e=!b.Xd;if(!d.T&&!d.R||!d.T&&e)ntp_f("edit-bg-gear").hidden=!0;else{ntp_f("edit-bg-gear").hidden=!1;ntp_f("edit-bg-default-wallpapers").hidden=!1;ntp_f("edit-bg-upload-image").hidden=!1;ntp_f("edit-bg-restore-default").hidden=!1;ntp_f("edit-bg-divider").hidden=!1;ntp_f("custom-links-restore-default").hidden=!1;if(!d.R|| +e)ntp_f("edit-bg-default-wallpapers").hidden=!0,ntp_f("edit-bg-upload-image").hidden=!0,ntp_f("edit-bg-restore-default").hidden=!0,ntp_f("edit-bg-divider").hidden=!0;d.T||(ntp_f("custom-links-restore-default").hidden=!0)}ntp_zu()}e=ntp_Mv(b);d=!!e&&-1==ntp_Jv.indexOf(e);a.$&&(ntp_f("edit-bg").classList.add("custom-links-enabled"),document.body.classList.toggle("non-white-bg",-1==ntp_Jv.indexOf(e)));void 0===b.Xd&&(b.Xd=!d);document.body.style.background=e;b.nc&&(e=b.nc,e=ntp_wv(e[0].toString(16))+ +ntp_wv(e[1].toString(16))+ntp_wv(e[2].toString(16))+ntp_wv(e[3].toString(16)),a.R=e);ntp_Nv(a,b);e=b.uj;var f=b.ih;if(a.o&&a.ma)if(e){var g=ntp_f(a.T);g||(g=new Image,g.id=a.T,a.o.appendChild(g));ntp_Ke(g,"content",e);a.o.classList.toggle("left-align-attr","right"===f);a.o&&ntp_Ne(a.o,!0)}else a.o&&ntp_Ne(a.o,!1);if(e=!1!==b.nj&&d)b.imageUrl?e=!1:(e=ntp_Ov(b),e=9>Math.max(e[0],e[1],e[2])-Math.min(e[0],e[1],e[2])),e=!e;e?a.w.render(1):a.w.render(0);ntp_Pv(a,b,d);a.ha=c;a.W&&(ntp_Au(),b.Xc&&(ntp_Lu(b.Xc, +b.Ed,b.attributionActionUrl),a.H&&ntp_Ne(a.H,!0)))}}}},ntp_Mv=function(a){return[a.Yc?ntp_Qv(a.Yc):a.de,a.imageUrl,a.Gl,a.ih,a.Hl].join(" ").trim()},ntp_Pv=function(a,b,c){var d=!1;if(a=!ntp_Kv(a)&&c)a=(a=b.Yc)&&4==a.length?128>.3*a[0]+.59*a[1]+.11*a[2]:!!b.imageUrl;if(a||b.Xe)d=!0;ntp_Rv(d)},ntp_Lv=function(a){document.body.style.background="#fff";ntp_Rv(!1);ntp_Nv(a);a.o&&ntp_Ne(a.o,!1);a.H&&ntp_Ne(a.H,!1)},ntp_Qv=function(a){return"rgba("+a[0]+","+a[1]+","+a[2]+","+a[3]/255+")"},ntp_Nv=function(a, +b){var c=ntp_f("ctStyle");c&&ntp_Ud(c);b&&(c=ntp_B("STYLE",{id:"ctStyle",type:"text/css"},ntp_Sv(a,b)));if(b&&!b.Xd)document.body.classList.remove("default-theme"),document.body.appendChild(c);else if(document.body.classList.add("default-theme"),b&&b.Xe){c||(c=ntp_B("STYLE",{id:"ctStyle",type:"text/css"},a.w.V));document.body.appendChild(c);a=["linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.3))","url("+b.imageUrl+")"].join().trim();var d=ntp_f("custom-bg");d.style.backgroundImage=a;a=new Image; +a.onload=function(){d.style.opacity="1"};a.src=b.imageUrl;document.body.classList.toggle("non-white-bg",!0)}else if(document.body.classList.toggle("non-white-bg",!1),d=ntp_f("custom-bg"))d.style.opacity="0",window.setTimeout(function(){d.style.backgroundImage=""},1E3);document.body.classList.toggle("light-text",b?ntp_Tv(b):!1)},ntp_Rv=function(a){window.gbar&&window.gbar.tst&&window.gbar.tst(a?"dark":"default")},ntp_Sv=function(a,b){var c="color:#fff !important;text-shadow:black 0 1px 3px !important", +d="color:#fff !important;text-shadow:#1155cc 0 1px 3px !important",e="color:#fff;text-shadow:black 0 1px 3px";b.nc&&(c="color:"+ntp_Qv(b.nc)+" !important");b.$f&&(d="color:"+ntp_Qv(b.$f)+" !important",e="color:"+ntp_Qv(b.$f)+";");c=["#body a,#footer a,#footer>span,","#prm,","#als,","#gbi4t,",".sblc a,",".mv-title,","#mv-noti-msg,","#mv-noti-error-msg{",c,"}","#prm a,","#alp-link,","#mv-noti-lks span,","#mv-noti-error-lks span{",d,"}","#theme-attr-msg{",e,"}","#sbl,#fctr,.fade{background:transparent}", +".gbh{border:none}","body{background-attachment:fixed!important}"];b.nc&&c.push("#mv-noti-x{-webkit-filter:drop-shadow(0 0 0 "+ntp_Qv(b.nc)+")}");b.Tf&&b.uf&&c.push(".des-cla .mv-tile .mv-mask,",".des-mat .mv-tile .mv-mask{","border:1px solid ",ntp_Qv(b.Tf),"}",".des-cla .mv-page:hover .mv-mask,",".des-mat .mv-page:hover .mv-mask,",".des-cla .mv-page .mv-focused ~ .mv-page .mv-mask,",".des-mat .mv-page .mv-focused ~ .mv-page .mv-mask,",".des-cla .mv-page:focus .mv-mask,",".des-mat .mv-page:focus .mv-mask{", +"border:1px solid ",ntp_Qv(b.uf),"}");return c.join("")+a.w.V},ntp_Kv=function(a){try{var b=a.ka.get("esp-st");return!!b&&!isNaN(b)&&!!parseInt(b,10)}catch(c){}return!1};ntp_Hv.prototype.ta=function(){try{this.ka.set("esp-st","1")}catch(a){}ntp_Lv(this);this.w.render(0);this.va()};ntp_Hv.prototype.ra=function(){var a=ntp_au();if(!a||ntp_Kv(this))return!0;a=ntp_Mv(a);return!(a&&-1==ntp_Jv.indexOf(a))}; +var ntp_Ov=function(a){if(a.Yc&&4==a.Yc.length)return a.Yc;if(a.de)try{var b=ntp_Cv(a.de);var c=ntp_Ev(b.Mc);c[3]*=255;return c}catch(d){try{return b=ntp_vv(a.de),c=ntp_Ev(b.Mc+"ff"),c[3]*=255,c}catch(e){}}return[255,255,255,255]},ntp_Tv=function(a){var b=a.nc;return a.nc?128<=.3*b[0]+.59*b[1]+.11*b[2]:!1}; +var ntp_Xv=function(a,b,c,d,e){0===c?this.w=new ntp_Yu:1===c?this.w=new ntp_Zu:2===c&&(this.w=new ntp__u);this.ha=null;this.wa=37>=ntp_Ru;this.Hb=b;this.o=e;this.$=ntp_f("mv-tiles");this.Fa=ntp_f("mv-noti");this.Da=ntp_f("mv-noti-error");this.Va=ntp_f("mv-undo");this.ka=ntp_f("mv-restore");this.Ba=ntp_f("mv-noti-x");this.R=null;this.T=[];this.ta=null;this.Ia=!1;this.Tb=d;this.H=new ntp_V(this);ntp_1d(this,this.H);this.Na=0;this.ma=ntp_Uv(this);this.va=[];this.ya=[];this.Sa="";this.H.listen(window, +"resize",this.sc,!1);ntp_Td(this.Ba);ntp_Vv(this.Ba,"DIV","mv-x-inner");this.H.listen(this.Va,"click",this.vb,!1);ntp_Wv(this,this.Va,[13],ntp_n(this.vb,this));this.H.listen(this.ka,"click",this.hb,!1);ntp_Wv(this,this.ka,[13],ntp_n(this.hb,this));this.H.listen(this.Ba,"click",this.ra,!1);this.o.Wf(ntp_n(this.render,this));this.o.yi(ntp_n(this.Ib,this));window.addEventListener("message",ntp_n(this.Cd,this),!1);ntp_Td(this.$)};ntp_r(ntp_Xv,ntp_C); +var ntp_Yv=function(a,b,c,d,e){this.o=a;this.T=b;this.H=c;this.w=d;this.page=e||null;this.R=!1},ntp_Zv=function(a,b){var c=[];if(a.T){var d=ntp_I();a.T.onload=function(){d.resolve(null)};c.push(d.o)}if(a.H){var e=ntp_I();a.H.onload=ntp_n(function(){ntp_X(this.o,"mv-page");e.resolve(null)},a);c.push(e.o)}if(a.w&&!a.R){var f=ntp_I(),g=ntp_n(function(){this.R=!0;f.resolve(null)},a);a.w.onload=g;a.w.onerror=g;c.push(f.o)}a.page&&a.H&&(a=ntp_I(),b.push(a),c.push(a.o));return c}; +ntp_Xv.prototype.render=function(a){this.Ia?(a=this.ta.o,ntp_D(a,"webkitTransitionEnd",ntp_n(this.wb,this)),ntp_X(a,"mv-bl")):ntp__v(this,a)}; +ntp_Xv.prototype.wb=function(a){if("opacity"===a.rb.propertyName){this.Ia=!1;ntp_X(this.Da,"noti-hide");ntp_Y(this.Fa,"noti-hide");ntp_Y(this.$,"mv-x-hide");this.o.Ve()?ntp_Y(this.ka,"mv-link-hide"):ntp_X(this.ka,"mv-link-hide");ntp_0v(this);ntp_Y(this.$,"mv-x-hide");if(a=this.ta.o)if(ntp_9d(a))a.removeAllListeners("webkitTransitionEnd");else if(a=ntp_le(a)){var b=0,c="webkitTransitionEnd".toString(),d;for(d in a.o)if(!c||d==c)for(var e=a.o[d].concat(),f=0;fb;b++)a.T.push(ntp_1v(a,c[b],b));ntp_2v(a)}},ntp_2v=function(a){ntp_Td(a.$);a.va=[];var b=[];ntp_3v(a,!1);a.Na=a.ma;for(var c=Math.min(a.T.length,2*a.Na),d=0;dntp_Ru){var h=[],k=ntp_Xu(f,!1);null!=k&&h.push(k);h.push(f.thumbnail);g.thumbnailUrls=h}else h="",k=ntp_Xu(f,!0),null!=k&&(h=k),g.thumbnailUrl=h;g.faviconUrl=this.H.hf(f);g.providers=ntp_jv(f)}b.push(g)}b.push({cmd:"show",maxVisible:c});this.R.contentWindow.postMessage(b,"*")}; +ntp_7v.prototype.Ib=function(a){var b=this;if("chrome-search://most-visited"==a.rb.origin&&(a.rb.source==this.R.contentWindow||a.rb.source==this.$.contentWindow)){var c=a.rb.data.cmd;a=a.rb.data;if("tileBlacklisted"==c){c=this.H.le();this.Fa=null;for(var d=Math.min(this.o?10:8,c.length),e=0;e/gi;var ntp_Lw=function(a){this.o=a},ntp_Mw=new ntp_Lw({});ntp_Lw.prototype.contains=function(a){return a in this.o};var ntp_RH=function(a,b){return a.o[b]||null};var ntp_Nw=function(a,b,c,d,e,f){var g;a instanceof ntp_Ad?g=a:g=ntp_Cd(a,null);this.T=g;this.o=b;this.W=c;this.V=d;this.H=e;this.w=f||ntp_Mw;this.R=!1;switch(this.V){case 0:case 32:case 38:case 400:case 407:case 35:case 33:case 41:case 34:case 44:case 45:case 40:case 46:case 56:case 30:case 94:case 92:case 93:case 411:case 410:case 71:this.R=!0}};ntp_Nw.prototype.Mb=function(){return this.W};ntp_Nw.prototype.getType=function(){return this.V}; +var ntp_Ow=/^\s/,ntp_Pw=/\s+/,ntp_Qw=/\s+/g,ntp_Rw=/^\s+|\s+$/g,ntp_Sw=/^\s+$/,ntp_Tw=/<[^>]*>/g,ntp_Uw=/ /g,ntp_Vw=/ /g,ntp_Ww=[/&/g,/&/g,//g,/>/g,/"/g,/"/g,/'/g,/'/g,/{/g,/{/g],ntp_Xw=document.getElementsByTagName("head")[0],ntp_Yw=0,ntp_Zw=1,ntp__w=function(a,b){void 0===b&&(b=a);var c=function(){return b};return{getPosition:c,$g:function(){return a},Sk:c,Cp:function(){return aa?1:0>b?-1:a-b}; +var ntp_7=function(a){this.w=a};ntp_=ntp_7.prototype;ntp_.jc=function(){};ntp_.Qa=function(){};ntp_.Bb=function(){};ntp_.Gd=function(){};ntp_.Ta=function(){};ntp_.getType=function(){return this.w};var ntp_lx=function(a){this.ma=a};ntp_lx.prototype.getType=function(){return this.ma};ntp_lx.prototype.Sf=function(){return!0};var ntp_mx=function(a){this.w=152;this.T=a};ntp_r(ntp_mx,ntp_7);ntp_mx.prototype.sf=ntp_6w;var ntp_nx=ntp_Fc(),ntp_ox=ntp_nx&&0<=ntp_mc(ntp_xt(),10),ntp_px=ntp_Oc();ntp_px&&ntp_xt();var ntp_qx=ntp_Ec(),ntp_rx=ntp_Nc(),ntp_sx=ntp_Hc(),ntp_tx=ntp_Gc(),ntp_ux=ntp_3j()&&ntp_Hc(),ntp_vx=ntp_Jc(),ntp_wx=ntp_x("Macintosh"),ntp_xx=ntp_3j();var ntp_yx={rtl:"right",ltr:"left"},ntp_zx=function(a,b){try{if(a.setSelectionRange)a.setSelectionRange(b,b);else if(a.createTextRange){var c=a.createTextRange();c.collapse(!0);c.moveStart("character",b);c.select()}}catch(d){}},ntp_Bx=function(a){try{return ntp_Ax(a).activeElement==a}catch(b){}return!1},ntp_Cx=function(a,b){a=document.createElement(a);b&&(a.className=b);return a},ntp_8=function(a){return ntp_Cx("div",a)},ntp_Dx=function(a,b){a.dir!=b&&(a.dir=b,a.style.textAlign=ntp_yx[b])},ntp_Ex= +function(a,b,c){var d;a:{if(d=a.getElementsByTagName("input"))for(var e=0,f;f=d[e++];)if(f.name==b&&"submit"!=f.type.toLowerCase()){d=f;break a}d=null}if(d)return null;d=ntp_Cx("input");d.type="hidden";d.name=b;c&&(d.value=c);a.appendChild(d);return d},ntp_Fx=function(a){if(a=a||window.event)a.stopPropagation&&a.stopPropagation(),a.cancelBubble=a.cancel=!0;a&&(a.preventDefault&&a.preventDefault(),a.returnValue=!1);return!1},ntp_Gx=function(a){var b=ntp_Cx("a");b.href="#ifl";b.className="sbsb_i sbqs_b"; +a.appendChild(b);return b},ntp_Hx=function(a){var b=a||window;a=b.document;var c=b.innerWidth;b=b.innerHeight;if(!c){var d=a.documentElement;d&&(c=d.clientWidth,b=d.clientHeight);c||(c=a.body.clientWidth,b=a.body.clientHeight)}return{Ki:c,fh:b}},ntp_Ax=function(a){return a?a.ownerDocument||a.document:window.document},ntp_Ix=function(a){return a?(a=ntp_Ax(a),a.defaultView||a.parentWindow):window}; +var ntp_Jx=function(){this.w=116};ntp_i(ntp_Jx,ntp_7);ntp_=ntp_Jx.prototype;ntp_.jc=function(a,b){this.Da=a.jf();b.addRule(".sbdd_a[dir=ltr] .fl, .sbdd_a[dir=rtl] .fr","float:left");b.addRule(".sbdd_a[dir=ltr] .fr, .sbdd_a[dir=rtl] .fl","float:right")};ntp_.Qa=function(a){this.ma=a.get(130);a.get(115);this.ta=a.get(118);this.ra=a.get(117);this.va=a.w.getId()};ntp_.Bb=function(a){this.R=a}; +ntp_.Gd=function(a){this.o=ntp_8();this.o.className="gstl_"+this.va+" sbdd_a";ntp_Kx(this.o,!1);this.Ba=this.o;this.ka=ntp_8("fl");this.o.appendChild(this.ka);this.ha=ntp_8();this.o.appendChild(this.ha);this.V=ntp_8("sbdd_b");this.ha.appendChild(this.V);this.wa=ntp_8();this.ha.appendChild(this.wa);this.R.rl&&(this.T=ntp_Cx("iframe","gstl_"+this.va+" sbdd_c"),ntp_Kx(this.T,!1),(this.R.Cb||document.body).appendChild(this.T));if(this.H=this.R.Wj){if(ntp_j(this.H)){var b=this.H+=this.R.Vj[2];a:{if(this.ma&& +this.ma.H()){var c=this.ta.T.ha.offsetWidth;if(ntp_j(c))break a}c=0}this.H=b-c}b=this.o;c=this.H;ntp_j(c)?0=a.o.Rn)ntp_7x(b),delete d[b],ntp_8x("vasco.csk",d);else{var f= +[];c.forEach(function(g){-1===a.H.indexOf(g)&&(d[b][g]=d[b][g]?d[b][g]+1:1,a.H.push(g));d[b][g]>=a.o.Qn&&(f.push(g),delete d[b][g])});ntp_8x("vasco.csk",d);0a.o.Dg?(b={},b=(b.ver=1,b.imp=1,b.tm=ntp_p(),b)):a.T||(b.imp+=1),a.T=!0,b.imp>a.o.Il&&(ntp_J(a.o.jh.put(a.o.ki,b.tm+a.o.Dg),ntp_e),b={},a.R.clear()),ntp_8x("vasco.csk",b))}},ntp_2x=function(a,b){if("localStorage"in +window){var c=ntp_5x("vasco.bsk");c&&(c[a]||(c[a]=[]),!0!==c[a]&&(Array.prototype.push.apply(c[a],b),ntp_8x("vasco.bsk",c)))}},ntp_7x=function(a){if("localStorage"in window){var b=ntp_5x("vasco.bsk");b&&(b[a]=!0,ntp_8x("vasco.bsk",b))}},ntp_3x=function(a,b){if("localStorage"in window){var c=ntp_5x("vasco.csk");c&&c[a]&&(b.forEach(function(d){delete c[a][d]}),ntp_8x("vasco.csk",c))}},ntp_4x=function(a){a.R.clear();var b=ntp_9x(a.$,"",void 0,!0);ntp_$x(a.V,b);ntp_ay(a.V)},ntp_5x=function(a){try{var b= window.localStorage.getItem(a)}catch(d){return null}try{var c=JSON.parse(b)}catch(d){}return c||{}},ntp_8x=function(a,b){try{window.localStorage.setItem(a,JSON.stringify(b))}catch(c){}}; +var ntp_by=function(a){this.w=596;this.H=a};ntp_i(ntp_by,ntp_7); +ntp_by.prototype.jc=function(a,b){a=this.H.yb?"22px":"32px";b.addRule(".sbmi_a","border:none;height:"+a+";width:"+(this.H.yb&&!this.H.Xb?"20px;":"16px;")+(this.H.yb?"margin-right:6px;":"margin-left:6px;")+"cursor:pointer;opacity:1;outline:none;");b.addRule(".sbmi_a::after","--height:"+a+";--width:"+(this.H.yb&&!this.H.Xb?"20px;":"16px;")+'height:var(--height);width:var(--width);-webkit-mask-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAASRJREFUaAXtmEEOgjAQRakr9i49hFeAS/QoHELvwYJL6BU8hHHlmu5wJmkIGaAG+Gz0k5DQqXTmv7Hj2CzjRQIkQAIk8M8E3B7im6Y5hRAusnbZyeWcu+d5Xnnvn2h/cAEx+IfEfRwGKyLeIuKMFnEYOkE8t217tcHrumqLWUG46deACxDSRb/6+KEcm7ZZ4AJS4UgWutT8mrk9BNzmAtHNPDe31g4XoNVGN6wNKG7iytq3juECtMpotZGAa7lf8a73qEBbxfN9EvgFAvBWQqGwF1rw1YCXUfZCC+jrR+EZSPlnLzRBB54B9kITlGkiARKYJ8BeyLLhuZAl8mUM/yGT/8BFwifPhSwceAbEAc+FLOXUGJ4BngulcHOOBEiABEgATeADvpSjscfztpoAAAAASUVORK5CYII=");-webkit-mask-position:0 calc((var(--height) - var(--width)) / 2);-webkit-mask-repeat:no-repeat;-webkit-mask-size:var(--width);user-select:none;background-color:'+(this.H.Ee? +"white;":"rgba(90,90,90,0.7);")+'content:"";display:block;');this.H.Ee||b.addRule(".sbmi_a:hover::after,.sbmi_a:focus::after","background-color:rgb(90,90,90);");b.addRule(".sbmi_c","position:absolute;text-align:left;background:#fff;padding:8px 0;margin-top:7px;width:233px;overflow:auto;border-radius:"+(this.H.Xb?"8px;":"0;")+"box-shadow:"+(this.H.Xb?"0 1px 2px 0 rgba(60,64,67,0.30), 0 1px 3px 1px rgba(60,64,67,0.15);":"0 2px 2px 0 rgba(0,0,0,0.16),0 0 0 1px rgba(0,0,0,0.08);")+"cursor:pointer;z-index:100;user-select:none;font-size:13px;color:rgba(1,1,1,0.87);line-height:48px;"); +b.addRule(".sbmi_d","padding-left:16px;");b.addRule(".sbmi_e","font-size:11px;font-style:italic;color:rgba(0, 0, 0, 0.54);outline:none;cursor:default;");b.addRule(".sbmi_d:not(.sbmi_e):hover","background:rgb(238, 238, 238);")};ntp_by.prototype.Qa=function(a){"chrome-ntp-vasco"==this.H.Ja&&(this.ha=a.get(126),this.$=a.get(134))};ntp_by.prototype.Bb=function(a){this.T=a};ntp_by.prototype.Gd=function(){this.V=ntp_Cx("div");this.R=ntp_8();this.o=ntp_8();this.V.appendChild(this.R);this.V.appendChild(this.o)}; +var ntp_cy=function(a){a.o.style.right=240>window.innerWidth-a.V.getBoundingClientRect().x?"-12px":""},ntp_dy=function(a){a.R.className="sbmi_a";a.R.setAttribute("role","button");a.R.setAttribute("aria-label","settings menu");a.R.setAttribute("aria-haspopup",!0);a.R.tabIndex="0";a.R.onclick=function(){ntp_Ne(a.o,"none"==a.o.style.display)};window.addEventListener("click",function(b){b.target.matches(".sbmi_a")||ntp_Ne(a.o,!1)});a.R.onkeydown=function(b){switch(b.which||b.keyCode){case 32:case 13:ntp_Ne(a.o, +!0);a.o.firstChild.focus();break;case 27:ntp_Ne(a.o,!1);a.R.focus();break;case 9:ntp_Ne(a.o,!1)}}},ntp_fy=function(a){a.o.className="sbmi_c";ntp_Ne(a.o,!1);a.o.setAttribute("role","menu");a.o.tabIndex="-1";if("chrome-ntp-vasco"==a.T.Ja){var b=ntp_ey(a,"Don't show this topic");b.onclick=function(){a.T.Cb.style.display="none";var d=a.$,e=a.W;ntp_7x(e);if("localStorage"in window){var f=ntp_5x("vasco.csk");f&&(delete f[e],ntp_8x("vasco.csk",f))}ntp_4x(d);d="task_id:"+a.W;a.H.Jc&&(d+="."+a.H.Jc);google.log(a.T.Ja, +d)};a.o.appendChild(b)}b="chrome-ntp-trending"==a.T.Ja?ntp_ey(a,"Never show trending searches"):ntp_ey(a,"Never show suggestions");b.onclick=function(){a.T.Cb.style.display="none";if("chrome-ntp-vasco"==a.H.Ja){var d=a.$;d.R&&d.R.clear();try{window.localStorage.removeItem("vasco.csk"),window.localStorage.removeItem("vasco.bsk")}catch(e){}}a.H.Pj();d="dismiss";"chrome-ntp-vasco"==a.T.Ja&&(d+=",task_id:"+a.W);a.H.Jc&&(d+="."+a.H.Jc);google.log(a.T.Ja,d)};var c="chrome-ntp-trending"==a.T.Ja?ntp_ey(a, +"These searches are trending in your area",!1):ntp_ey(a,"Suggestions based on your search history",!1);a.o.appendChild(b);a.o.appendChild(c)},ntp_ey=function(a,b,c){c=void 0===c?!0:c;var d=ntp_Cx("div");ntp_Fd(d,ntp_2k(b));d.tabIndex="-1";d.className="sbmi_d";c?(d.setAttribute("role","menuitem"),d.setAttribute("aria-label",b),d.onkeydown=function(e){switch(e.which||e.keyCode){case 27:ntp_Ne(a.o,!1);a.R.focus();break;case 9:e.shiftKey?d.previousElementSibling?d.previousElementSibling.focus():a.o.lastElementChild.previousElementSibling.focus(): "menuitem"==d.nextElementSibling.getAttribute("role")?d.nextElementSibling.focus():a.o.firstElementChild.focus();break;case 13:case 32:d.onclick(e)}ntp_6i(e);ntp_7i(e)}):ntp_X(d,"sbmi_e");return d}; +var ntp_gy=function(a,b,c,d,e,f,g,h,k,l){this.ma=35;this.o=a;this.Ba=b;this.wa=c;this.va=d;this.ra=e;this.ha=f;this.Da=g;this.ta=k;this.ya=l;this.$=!0;this.W=!1;ntp_yn(this)};ntp_i(ntp_gy,ntp_lx);ntp_=ntp_gy.prototype;ntp_.Ka=function(){return this.R};ntp_.Sf=function(){return this.$}; +ntp_.render=function(a,b,c,d){this.W=!1;this.$=!0;this.Fa=b;this.V=c;this.T=d;a:{if(this.o.yb&&this.o.Ca&&0e;++e)d[e]=b.charCodeAt(c++)|b.charCodeAt(c++)<<8|b.charCodeAt(c++)<<16|b.charCodeAt(c++)<<24;else for(e=0;16>e;++e)d[e]=b[c++]|b[c++]<<8|b[c++]<<16|b[c++]<<24;b=a.o[0];c=a.o[1];e=a.o[2];var f=a.o[3];var g=b+(f^c&(e^f))+d[0]+3614090360&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[1]+3905402710&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[2]+606105819&4294967295;e=f+(g<<17&4294967295|g>>>15);g= +c+(b^e&(f^b))+d[3]+3250441966&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[4]+4118548399&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[5]+1200080426&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[6]+2821735955&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[7]+4249261313&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[8]+1770035416&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[9]+2336552879&4294967295;f=b+(g<<12&4294967295|g>>> +20);g=e+(c^f&(b^c))+d[10]+4294925233&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[11]+2304563134&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[12]+1804603682&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[13]+4254626195&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[14]+2792965006&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[15]+1236535329&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(e^f&(c^e))+d[1]+4129170786&4294967295;b=c+(g<<5&4294967295| +g>>>27);g=f+(c^e&(b^c))+d[6]+3225465664&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[11]+643717713&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[0]+3921069994&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[5]+3593408605&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[10]+38016083&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[15]+3634488961&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[4]+3889429448&4294967295;c=e+(g<<20&4294967295| +g>>>12);g=b+(e^f&(c^e))+d[9]+568446438&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[14]+3275163606&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[3]+4107603335&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[8]+1163531501&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[13]+2850285829&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[2]+4243563512&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[7]+1735328473&4294967295;e=f+(g<<14&4294967295| +g>>>18);g=c+(f^b&(e^f))+d[12]+2368359562&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(c^e^f)+d[5]+4294588738&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[8]+2272392833&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[11]+1839030562&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[14]+4259657740&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[1]+2763975236&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[4]+1272893353&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^ +b^c)+d[7]+4139469664&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[10]+3200236656&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[13]+681279174&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[0]+3936430074&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[3]+3572445317&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[6]+76029189&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[9]+3654602809&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[12]+3873151461&4294967295; +f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[15]+530742520&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[2]+3299628645&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(e^(c|~f))+d[0]+4096336452&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[7]+1126891415&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[14]+2878612391&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[5]+4237533241&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[12]+1700485571&4294967295;b=c+ +(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[3]+2399980690&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[10]+4293915773&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[1]+2240044497&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[8]+1873313359&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[15]+4264355552&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[6]+2734768916&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[13]+1309151649&4294967295; +c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[4]+4149444226&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[11]+3174756917&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[2]+718787259&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[9]+3951481745&4294967295;a.o[0]=a.o[0]+b&4294967295;a.o[1]=a.o[1]+(e+(g<<21&4294967295|g>>>11))&4294967295;a.o[2]=a.o[2]+e&4294967295;a.o[3]=a.o[3]+f&4294967295}; +ntp_uG.prototype.update=function(a,b){ntp_d(b)||(b=a.length);for(var c=b-this.w,d=this.T,e=this.H,f=0;fthis.H?this.w:2*this.w)-this.H);a[0]=128;for(var b=1;bb;++b)for(var d=0;32>d;d+=8)a[c++]=this.o[b]>>>d&255;return a}; +var ntp_ry=function(a){this.w=129;this.o=a;this.V=a.fm;this.Hb={};this.Ia=[];this.wb=[];this.$=[];this.ha=this.Da=0;this.ka=new ntp_uG};ntp_i(ntp_ry,ntp_7);ntp_=ntp_ry.prototype; +ntp_.jc=function(a,b){this.Sa=a;this.Va=a.jf();a=this.o.yb?"22px":"32px";b.addRule(".sbdd_b","text-align:center;");b.addRule(".sbsb_a","margin:0 auto;"+(this.o.yb?"":"max-width:820px;"));b.addRule(".sbsb_b","list-style-type:none;padding:8px 0 0 0;margin:0 auto;height:40px;overflow:hidden;vertical-align:bottom;");this.o.yb?(b.addRule(".sbsb_c","line-height:16px;overflow:hidden;margin:0 4px 10px 4px;background:#fff;border:"+(this.o.Xb?"none;":"1px solid #DADCE0;")+"border-radius:8px;box-sizing:border-box;color: #DADCE0;display:inline-block;cursor:pointer;transition:all 200ms cubic-bezier(0.4, 0.0, 0.2, 1);transition-property:transform, border, box-shadow, margin, opacity, width;position:relative;"), +b.addRule(".sbsb_d","box-shadow:0 1px 2px 0 rgba(0,0,0,0.1), 0 4px 8px 0 rgba(0, 0, 0, 0.2);")):(b.addRule(".sbsb_c","line-height:16px;overflow:hidden;margin:0 8px 10px 8px;background:#fff;border-radius:2px;box-shadow:0 2px 2px 0 rgba(0, 0, 0, 0.16),0 0 0 1px rgba(0, 0, 0, 0.08);display:inline-block;cursor:pointer;transition:all 200ms cubic-bezier(0.4, 0.0, 0.2, 1);transition-property:transform, border, box-shadow, margin, opacity, width;position:relative;"),b.addRule(".sbsb_d","box-shadow:0 3px 8px 0 rgba(0,0,0,0.2),0 0 0 1px rgba(0, 0, 0, 0.08);")); +b.addRule(".sbsb_o","display:inline-block;line-height:"+a+";outline:none;");if(this.o.yb){var c="#3C4043";this.o.Ee?c="#F8F9FA":this.o.Xb&&(c="#5F6368");b.addRule(".sbsb_o","font-size:12px;color:"+c+";padding: 32px 0 8px 0;")}else b.addRule(".sbsb_o","font-size:13px;color:"+(this.o.Ee?"#F8F9FA;":"rgba(0,0,0,0.54);")+"padding-top:32px;");b.addRule(".sbsb_x","outline:none;");b.addRule(".sbsb_r","width:"+(this.o.yb?"20px;":"22px;")+"height:"+a+";");b.addRule(".sbsb_s","position:relative;display:inline-block;")}; +ntp_.Qa=function(a){this.W=a.get(128);this.ya=a.get(118);this.Ba=a.get(121);var b=ntp_jx(a,152),c={};if(b)for(var d=0,e;e=b[d++];)c[e.T]=e;this.hb=c;this.ma=a.get(126);this.ta=a.get(596)};ntp_.Bb=function(a){this.H=a};ntp_.Gd=function(){this.R=ntp_8();this.T=ntp_Cx("ul","sbsb_b");this.T.setAttribute("role","listbox");this.R.appendChild(this.T)};ntp_.Ta=function(a){this.H=a;var b=a.Ym;b&&this.Sa.Fk(b);this.R.className=a.Hn||"sbsb_a";this.wa=a.En||"sbsb_d"}; +ntp_.render=function(a,b){if(!this.R)return!1;this.Na=b;b=!1;for(var c=0,d;d=a[c++];)ntp_sy(this,d)&&(b=!0);if(b){this.V||(this.H.Cb.style.marginTop="5px");this.H.Cb.style.marginBottom=this.o.yb?"-31px":"-19px";this.H.Cb.style.height=this.V?"0px":this.o.yb?"110px":"104px";this.o.yb&&(this.H.Cb.style.fontFamily="Roboto, arial, sans-serif");if("chrome-ntp-trending"==this.H.Ja)this.va=ntp_ty(this,"Trending searches");else if("chrome-ntp-vasco"==this.H.Ja){ntp_W(document.body,"init")||this.o.Yh||(this.H.Cb.style.transition= +"height 200ms cubic-bezier(0.4, 0.0, 0.2, 1)");try{var e=ntp_RH(this.ma.o.o,"aj"),f=e.a.trim();var g="Explore "+f;var h=e.b;this.o.Ca&&0b&&(c.style.display="none",a.ha++)});a.R.style.maxWidth=ntp_f("fkbx").offsetWidth+50+"px"}a.Fa&&(a.Fa.style.width=ntp_f("fkbx").offsetWidth-22+"px");a.ra&&a.ta&&ntp_cy(a.ta)};ntp_ry.prototype.Ka=function(){return this.R}; +var ntp_sy=function(a,b){var c=b.getType(),d=a.hb[c];if(!d)return!1;if(a.V)return!0;c=(c=a.Hb[c])&&c.pop();if(!c){c=d.Gg(a.Ba);var e=c.Ka();e.setAttribute("role","option");e.id="sbse"+a.Da;a.Da++}d.render(b,c);a.Ia.push(c);e=c.Ka();e.setAttribute("title",b.o);var f=ntp_wy(a);f.appendChild(e);if(void 0!==b.Mb){a.$.push(c);var g=a.Na;var h=b.Mb();a.H.Dl&&(e.onmouseover=function(){ntp_xy(a.W,h)},e.onmouseout=function(){ntp_jy(a.W)});var k=c.Ka();k.tabIndex="0";k.onclick=function(l){ntp_my(a.ya);b.R&& +ntp_ny(a.ya,b.o);ntp_jy(a.W);var m=a.W;m.H=m.o=h;l=l||ntp_Ix(k).event;d.sf(l,b,a.Ba)};k.onkeydown=function(l){var m=l.keyCode;if(13==m||32==m)k.onclick(l)}}else g=a.Va;ntp_Dx(f,g);return!0},ntp_ty=function(a,b){if(a.V)return null;var c=ntp_Cx("div"),d=ntp_Cx("span"),e=ntp_Cx("span");d.appendChild(e);c.appendChild(d);c.className="sbsb_o";d.tabIndex="0";e.innerHTML=b.trim().charAt(0).toUpperCase()+b.trim().slice(1);e.className="sbsb_x";e.tabIndex="-1";a.Fa=c;b=a.ta;"chrome-ntp-vasco"==b.H.Ja&&(b.W= +ntp_RH(b.ha.o.o,"aj").b);ntp_dy(b);ntp_fy(b);a.ra=b.V;a.ra.className="sbsb_s fr";b=ntp_Cx("div");c.appendChild(a.ra);c.appendChild(b);b.className="sbsb_r fl";a.R.insertBefore(c,a.R.firstChild);return c},ntp_wy=function(a){var b=a.wb.pop();if(b)return a.T.appendChild(b),b;b=ntp_Cx("li");b.setAttribute("role","presentation");b.className="sbsb_c "+a.H.Dn;b.onmousedown=ntp_n(a.vb,a);a.T.appendChild(b);return b}; ntp_ry.prototype.vb=function(a){a=a||ntp_Ix(this.R).event;a.stopPropagation&&a.stopPropagation();return!1}; +var ntp_yy=/j0/g,ntp_zy=/j+$/,ntp_Ay=function(a){this.w=311;this.H=a};ntp_i(ntp_Ay,ntp_7);ntp_Ay.prototype.Qa=function(a){this.o=a.get(126)};ntp_Ay.prototype.Mb=function(){return 23};var ntp_By=function(a){var b=a.o.o.o,c=[ntp_RH(b,"aj")&&ntp_RH(b,"aj").b?ntp_RH(b,"aj").b:"",ntp_RH(b,"aj")&&ntp_RH(b,"aj").c?ntp_RH(b,"aj").c:"",a.H.Ac];a.o.o.w.forEach(function(d){c.push(d.w.o.zx||"")});return c.join("j").replace(ntp_yy,"j").replace(ntp_zy,"")};ntp_Ay.prototype.reset=function(){}; +var ntp_Cy=function(a){this.w=151;this.o=a};ntp_i(ntp_Cy,ntp_7);ntp_Cy.prototype.Qa=function(a){a.get(150);this.H=a.get(551)};ntp_Cy.prototype.update=function(a){a&&ntp_Zx(this.H,a)}; +ntp_Cy.prototype.get=function(a){if(!a)return null;var b=a.o,c=ntp_1w(b),d=ntp__x(this.H),e=d.s;if(c||0==e.length)return this.o.zi(),null;c=[];for(var f=0;fMath.random()?48+Math.floor(10*Math.random()):(.5c&&(c=2)}b.$=c;null!=a.o.Ig&&ntp_dx(b,"ds",a.o.Ig,!0);null!=a.o.vi&&ntp_dx(b,"swl",a.o.vi,!0);ntp_dx(b,"pq",a.R,!0);d&&!b.H&&(b.ha=!0);if(!b.H){b.T=ntp_p();"cp"in b.W||(a=b.ta.getPosition(),ntp_dx(b,"cp",a,!0));ntp_dx(b,"gs_id",b.V);a=b.W;d=[];for(h in a)ntp_0w(h, a[h],d,void 0);var h=d.join("&");b.w=h+":"+b.ka;b.H=!0}return b},ntp_tz=function(){return 0}; +var ntp_uz=function(){this.w=123;this.ta=!1;this.ka=-1};ntp_r(ntp_uz,ntp_7);var ntp_vz=[0,1,2,3,4,5,5,6,6,6,7,7,7,7,7,8,8,8,8,8],ntp_oz=ntp_vz[ntp_vz.length-1]+1,ntp_wz=100*ntp_vz.length-1;ntp_uz.prototype.Qa=function(a){this.H=a.get(133);this.wb=a.get(130);this.Tb=a.get(118);this.bj=a.get(120);this.Ib=a.get(494);this.Pe=a.get(124);this.hb=a.get(125);this.vb=a.get(230);this.dj=a.get(127)}; +ntp_uz.prototype.Ta=function(a){this.W=this.dj.o;this.Hb=a;this.ta=!0;this.T={};this.ha=0;this.Vc=a.Ak;this.Cd=a.Fl;this.Ia=-1;this.o=this.Hb.fk&&!!this.H}; +var ntp_$x=function(a,b){if(!(!a.ta||a.Cd||a.wb&&a.wb.w())){var c=!0,d=ntp_cx(b);d>a.ka&&(a.ka=d);++a.Va;a.Ib.o[b.getId()]=!0;ntp_1w(a.Tb.o)||ntp_1w(b.o)||(d=a.Ib,d.H=Math.max(d.H,0));d=ntp_p();for(var e in a.T)2500ntp_wz?ntp_oz:ntp_vz[Math.floor(d/100)]]):this.wa=d));c&&(b=c.o.o.q||"")&&this.bj.setToken(b)}}}; +var ntp_Az=function(){this.w=124;this.o={}};ntp_r(ntp_Az,ntp_7);ntp_Az.prototype.Qa=function(a){a.get(150);if(a=ntp_jx(a,158))for(var b=0,c;c=a[b++];)this.o[c.pp()]=c};ntp_Az.prototype.Ta=function(a){this.H=a.tl};var ntp_zz=function(a){return(a=a[3])?new ntp_Lw(a):ntp_Mw}; +var ntp_Bz=function(){this.w=125};ntp_r(ntp_Bz,ntp_7);ntp_Bz.prototype.Qa=function(a){this.T=a.get(117);this.W=a.get(118);this.V=a.get(494);this.o=ntp_jx(a,122);this.H=a.get(126);this.R=a.get(128);this.o.sort(ntp_Cz)}; +ntp_Bz.prototype.td=function(a){var b=a,c=this.W.o.toLowerCase(),d=this.H.o;c=ntp_4w(c);var e=b.H;b=e?e.ma:ntp_4w(b.H.o.toLowerCase());var f=(d=d?d.H:null)?d.ma:"";e=1==(0==c.indexOf(b)?0==c.indexOf(f)?d&&d.getId()==e.getId()?0:b.length>=f.length?1:-1:1:-1);c=-1!=e;if(e){if(this.o)for(e=0;b=this.o[e++];)a=new ntp_ex(a.H,a.w.slice(0,b.o),a.o,a.T,a.R,!0);b=this.H.o=a;a=b.H.o;e=b.w;if(this.R.Sa){var g=0==b.getType();d=this.R;f=d.ra&&d.ra.H(e);d.clear();d.R=e;var h=ntp_Ny(d)?e[0].o:d.V.R;a:{var k=h;if(d.Fa.o){for(var l= +!1,m=!1,n=0,p;ne?b[c++]=e:(2048>e?b[c++]=e>>6|192:(b[c++]=e>>12|224,b[c++]=e>>6&63|128),b[c++]=e&63|128)}return b},ntp_Kz=function(a){a.nb[0]=1732584193;a.nb[1]=4023233417;a.nb[2]=2562383102;a.nb[3]=271733878;a.Yd=a.total=0},ntp_Lz=function(a,b){for(var c=a.Xn,d=0;64>d;d+=4)c[d/4]=b[d]|b[d+1]<<8|b[d+2]<< +16|b[d+3]<<24;var e=a.nb[0];b=a.nb[1];d=a.nb[2];for(var f=a.nb[3],g,h,k,l=0;64>l;++l)16>l?(g=f^b&(d^f),h=l):32>l?(g=d^f&(b^d),h=5*l+1&15):48>l?(g=b^d^f,h=3*l+5&15):(g=d^(b|~f),h=7*l&15),k=f,f=d,d=b,e=e+g+ntp_Iz[l]+c[h]&4294967295,g=ntp_Hz[l],b=b+((e<>>32-g)&4294967295)&4294967295,e=k;a.nb[0]=a.nb[0]+e&4294967295;a.nb[1]=a.nb[1]+b&4294967295;a.nb[2]=a.nb[2]+d&4294967295;a.nb[3]=a.nb[3]+f&4294967295},ntp_Mz=function(a,b,c){c||(c=b.length);a.total+=c;for(var d=0;dd?56-d:64-(d-56));for(var e=56;64>e;++e)a.buffer[e]=c&255,c>>>=8;ntp_Lz(a,a.buffer);for(e=d=0;4>e;++e)for(c=0;32>c;c+=8)b[d++]=a.nb[e]>>c&255;return b}; +var ntp_Oz=function(){this.w=150};ntp_r(ntp_Oz,ntp_7); +var ntp_Dy=function(a,b){b=ntp_2w(b.replace(ntp_Kw,""));a=ntp_2w(ntp_4w(a,!0));if(ntp_5w(b,a))return a+""+b.substr(a.length)+"";for(var c="",d=[],e=b.length-1,f=0,g=-1,h;h=b.charAt(f);++f)" "==h||"\t"==h?c.length&&(d.push({t:c,s:g,e:f+1}),c="",g=-1):(c+=h,-1==g?g=f:f==e&&d.push({t:c,s:g,e:f+1}));a=a.split(/\s+/);f={};for(c=0;e=a[c++];)f[e]=1;g=-1;a=[];h=d.length-1;for(c=0;e=d[c];++c)f[e.t]?(e=-1==g,c==h?a.push({s:e?c:g,e:c}):e&&(g=c)):-1"+ b+"";c="";for(f=e=0;g=a[f];++f)(h=d[g.s].s)&&(c+=""+b.substring(e,h-1)+" "),e=d[g.e].e,c+=b.substring(h,e);e"+b.substring(e)+" ");return c}; +var ntp_Pz=function(){this.w=146};ntp_r(ntp_Pz,ntp_7); +var ntp_Qz=function(a){return JSON.parse('"\\u30'+a.split(",").join("\\u30")+'"').toString()},ntp_Rz=ntp_Qz("02,0C,0D,01,FB,F2,A1,A3,A5,A7,A9,E3,E5,E7,C3,FC,A2,A4,A6,A8,AA,AB,AD,AF,B1,B3,B5,B7,B9,BB,BD,BF,C1,C4,C6,C8,CA,CB,CC,CD,CE,CF,D2,D5,D8,DB,DE,DF,E0,E1,E2,E4,E6,E8,E9,EA,EB,EC,ED,EF,F3,9B,9C"),ntp_Sz=ntp_Qz("F4__,AC,AE,B0,B2,B4,B6,B8,BA,BC,BE,C0,C2,C5,C7,C9_____,D0,D3,D6,D9,DC"),ntp_Tz=ntp_Qz("D1,D4,D7,DA,DD"),ntp_Uz=ntp_Qz("F4____,AC_,AE_,B0_,B2_,B4_,B6_,B8_,BA_,BC_,BE_,C0_,C2__,C5_,C7_,C9______,D0__,D3__,D6__,D9__,DC"),ntp_Vz= +ntp_Qz("D1__,D4__,D7__,DA__,DD"),ntp_Qx=/[\uFF01-\uFF5E]/g,ntp_Sx=/([\uff73\uff76-\uff84\uff8a-\uff8e]\uff9e)|([\uff8a-\uff8e]\uff9f)|([\uff61-\uff9f])/g,ntp_Wz="(["+ntp_Qz("A6,AB,AD,AF,B1,B3,B5,B7,B9,BB,BD,BF,C1,C4,C6,C8,CF,D2,D5,D8,DB")+"]\u309b)|(["+ntp_Qz("CF,D2,D5,D8,DB")+"]\u309c)",ntp_Ux=new RegExp(ntp_Wz,"g"),ntp_Px=function(a,b,c){for(var d,e="",f=0;null!=(d=b.exec(a));)fthis.w&&(this.w=ntp_aA(a));var b=ntp_Ax(this.H),c=ntp_bA(this),d=!!b.getElementById("gs_id"+this.w),e=this,f=["gssb_c","gssb_k","sbdd_a","sbdd_c","sbib_a"];a.Di&&f.push(a.Di);f=ntp_8z(a.Ai,a.zl,a.ik,this.w,f);this.$=a.Dd;this.o=new ntp_ix(this.ra,this.ta,{sj:function(){return d},get:function(g){return b.getElementById(g+e.w)},Fk:function(g){return b.getElementById(g)},Wg:function(){return e.va},jf:function(){return c},getId:function(g){return g+ +e.w},Jk:function(){return e.H}},f,this,a);this.o.get(347);this.V=this.o.get(130);this.o.get(115);this.W=this.o.get(117);this.o.get(123);this.wa=this.o.get(118);this.ka=this.o.get(119);this.o.get(374);this.ya=this.o.get(120);this.o.get(189);this.o.get(553);this.o.get(419);this.o.get(126);this.o.get(128);this.o.get(139);this.Ba=this.o.get(121);a=ntp_Ix(this.H);this.R=ntp_Hx(a);this.ha=ntp_n(this.ma,this);this.W.listen(a,"resize",this.ha);this.T=!0}};ntp_9z.prototype.$b=function(){return!!this.o&&this.o.$b()}; +ntp_9z.prototype.focus=function(){this.ka.focus()};ntp_9z.prototype.getId=function(){return this.w}; +var ntp_cA=function(a,b){a=a.ya;var c=a.T.R;var d=[];d[27]=64;d[0]=ntp_pz(a.R.Ja);d[28]=ntp_pz(a.R.Pf);d[1]=void 0==b?"":b+"";b=a.ha;var e=[];for(f in b.o)e.push(parseInt(f,10));d[26]=e.join("j");var f="";null!=a.V.H?f=a.V.H+"":(b=a.ka.H,(10<=b.R||3<=b.W.wi())&&(f="o"));d[2]=f;f="";if(b=a.V.R){for(var g=e=0,h;h=b[g++];){h=ntp_ax(h.getType(),h.H||[]);if(h!=k){1g||127>b-8&255),b-=8)}l=k}f=l;l={};l.nb=Array(4);l.buffer=Array(4);l.Xn=Array(4);l.padding=Array(64);l.padding[0]=128;for(k=1;64>k;++k)l.padding[k]=0;ntp_Kz(l);k=Array(64);64b;++b)k[b]=92;ntp_Kz(l);for(b=0;64>b;++b)l.buffer[b]=k[b]^106;ntp_Lz(l,l.buffer);l.total=64;ntp_Mz(l,ntp_Jz(m));m=ntp_Nz(l);ntp_Kz(l);ntp_Lz(l,k);l.total=64;ntp_Mz(l,m);m=ntp_Nz(l);m=m.slice(0,8);ntp_g(m)&& +(m=ntp_Jz(m));l="";if(m){k=m.length;for(e=b=f=0;k--;)for(b<<=8,b|=m[e++],f+=8;6<=f;)l+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(b>>f-6&63),f-=6;f&&(l+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(b<<8>>f+8-6&63))}m=l}else m="";c={oq:c,gs_l:d+"."+m};a.R.Tl&&(c.q=a.T.o);return c};ntp_9z.prototype.search=function(a,b){this.Ba.search(a,b)};ntp_9z.prototype.Dd=function(){return this.$||!!this.V&&this.V.Dd()}; +var ntp_aA=function(a){a=ntp_Ix(a.Ai||ntp_Xw);void 0==a.nextSearchboxId&&(a.nextSearchboxId=50);return a.nextSearchboxId++},ntp_bA=function(a){if(a.H)for(a=a.H;a=a.parentNode;){var b=a.dir;if(b)return b}return"ltr"},ntp_$z=function(a){a=ntp_$w(a);var b=a.Sh;b?a.Sh=b.toLowerCase():a.xl=!1;a.ef&&!a.wk&&(a.ef=!1);ntp_tx||(a.Yl=!1);return a};ntp_9z.prototype.ma=function(){var a=ntp_Hx(ntp_Ix(this.H));if(a.Ki!=this.R.Ki||a.fh!=this.R.fh)this.R=a,ntp_Mx(this.W,8)}; +var ntp_dA=function(){this.o={}};ntp_i(ntp_dA,ntp_fx); +ntp_dA.prototype.install=function(a,b,c){var d=ntp_7z().Wa();d.Ja=c.cn;d.Pf=d.Ja;d.Cb=c.dpn;d.Kg="static";d.Qg=c.esc;d.authuser=google.authuser;c.xssp?d.We=1:(d.fg=c.tok||"",d.Of=window.location.host);c.cs&&(d.hh=!1);c=new ntp_6z({Ue:c.cs,Dg:c.cet||864E5,yb:c.cau||!1,So:c.v61,Ja:d.Ja,Pj:c.dcb,dk:c.vft||216E5,jk:c.eic||!1,Pg:c.xssp||!1,Jc:c.qid,Il:c.ic||10,jh:c.idb,fm:c.lo,Yh:c.qms,an:c.rt,ki:c.rtm||"vasco",Te:c.si||!1,zi:c.scb,Ca:c.ttl,Hg:c.tv,Xb:c.tt||!1,Ee:c.wh||!1,Ji:c.vt||"",Qn:c.vsc||50,Rn:c.vtc|| +100,Ac:""});this.w=new ntp_9z(b,a,this,c);this.w.install(d);this.H=a;ntp_eA(this)};ntp_dA.prototype.search=function(a,b){var c=ntp_cA(this.w,b),d=this;b=function(e){d.o[e]&&(d.o[e].value=c[e])};b("oq");b("gs_l");ntp_Uy(this.w.wa,a||"");this.H.submit()};var ntp_eA=function(a){["oq","gs_l"].forEach(function(b){a.o[b]=ntp_Ex(a.H,b)})}; +var ntp_fA=ntp_Dc("data_push_epoch deb e expflags fesp gl hl host ogdeb uideb".split(" ")),ntp_gA=window.applicationCache,ntp_hA=!1,ntp_iA=function(a){void 0===ntp_wu&&(ntp_wu=40>ntp_Ru?0:44>ntp_Ru||!a?1:2)},ntp_oA=function(){ntp_ju=null;ntp_5=new ntp_Fw;var a=ntp_5.initialize();a.then(function(){return ntp_TJ()},ntp_e);a.then(function(){ntp_Z(ntp_su,ntp_Kt);ntp_hA||ntp_jA()},ntp_e);ntp_gu?a.then(function(){var d=ntp_5.get("doodle");d.then(ntp_kA,ntp_o(ntp_lA,{}));window.setTimeout(ntp_n(d.cancel, +d,"Doodle timeout"),500)},ntp_e):a.then(function(){ntp_lA({})},ntp_e);ntp_J(a,function(){ntp_Z(ntp_su,ntp_Lt);ntp_hA||ntp_mA(!1);ntp_lA({})});if(ntp_6&&ntp_6.qse){ntp_6.dpn=ntp_f("suggestion-chips");var b={},c={};ntp_vu=(c.t=(b.start=ntp_p(),b),c.e={action:"dismiss"},c);ntp_6.qid&&(ntp_vu.e.action+="."+ntp_6.qid);b={};c={};ntp_uu=(c.t=(b.start=ntp_p(),b),c.e={},c);google.timers&&google.timers.load&&google.timers.load.t&&(ntp_uu.t.start=google.timers.load.t.start);"chrome-ntp-trending"==ntp_6.cn?(ntp_uu.e.action= +"trend",ntp_Vf(a,function(){ntp_nA("trending")})):"chrome-ntp-vasco"==ntp_6.cn?(ntp_uu.e.action="vasco",ntp_6.qid&&(ntp_uu.e.action+="."+ntp_6.qid),ntp_Vf(a,function(){ntp_nA("vasco")})):"chrome-ntp-psuggest"==ntp_6.cn&&(ntp_uu.e.action="psug",ntp_Vf(a,function(){ntp_nA("psuggest")}))}window.setTimeout(ntp_n(a.cancel,a,"Initialize timeout"),500)},ntp_qA=function(){ntp_W(document.body,"init")||ntp_W(ntp_f("most-visited"),"suggestion-init")||ntp_pA(ntp_uu)},ntp_nA=function(a){var b=function(){ntp_Y(ntp_f("most-visited"), +"suggestion-init")};if(navigator.onLine){var c=ntp_5.get(a);c.then(function(d){if(1==d)return ntp_Of("Da");ntp_X(ntp_6.dpn,"query-suggestion-container");ntp_6.dcb=ntp_n(ntp_rA,null,a);ntp_6.scb=function(){b();ntp_Z(ntp_uu,ntp_Vt);ntp_qA()};if("chrome-ntp-vasco"==ntp_6.cn&&void 0!=d&&Date.now()<=d)return ntp_Of("Ea")}).then(function(){ntp_6&&(ntp_6.wh=ntp_gu?1==ntp_gu.H:!1,ntp_6.idb=ntp_5,ntp_6.rt=ntp_lu,"chrome-ntp-vasco"==ntp_6.cn&&(ntp_6.rtm="vasco"));(new ntp_dA).install(ntp_f("f2"),ntp_f("q2"), +ntp_6);ntp_Z(ntp_uu,ntp_Wt)},function(){b()});window.setTimeout(ntp_n(c.cancel,c,"suggestions promise timeout"),500)}else b()},ntp_rA=function(a){ntp_J(ntp_5.put(a,!0),ntp_e);ntp_Z(ntp_vu,ntp_Xt);ntp_pA(ntp_vu)},ntp_lA=function(a){a=a||{};ntp_nu&&(a.xid=ntp_nu);ntp_eH&&1==ntp_gu.H&&(!ntp_PJ||ntp_PJ.update_date<=ntp_p())&&(a.rw="1");var b=ntp_6t(a),c=ntp_tA();ntp_J(c,ntp_e);b.then(function(d){c.then(function(){ntp_uA(d,!0)},function(){40>=ntp_Ru?(ntp_Z(ntp_tu,ntp_St),ntp_uA(d,!0)):ntp_uA(d,!1)})}, +function(){ntp_Z(ntp_tu,ntp_Rt);ntp_pA(ntp_tu);ntp_gu&&ntp_vA(10);ntp_J(c,function(){40>=ntp_Ru?ntp_Z(ntp_tu,ntp_St):ntp_wA()})});window.setTimeout(function(){b.cancel("Fetch timeout");c.cancel("Sync check timeout")},1E4);ntp_tu={t:{start:ntp_p()},e:{action:"update"}}},ntp_tA=function(){var a=ntp_I();ntp_4.onhistorysynccheckdone=function(b){b?a.resolve(!0):a.reject("User not syncing history.")};ntp_$t()||a.resolve(!0);return a.o},ntp_jA=function(){var a=ntp_ev(ntp_5,"ml",!0),b=ntp_ev(ntp_5,"mlmeta", +!0),c=ntp_xA(b),d=ntp_ev(ntp_5,"mlbl",!0),e=ntp_ev(ntp_5,"mlicon",!0);ntp_J(d,ntp_e);a=ntp_Rf([a,b,c,e]);a.then(function(f){ntp_Z(ntp_su,ntp_Mt);var g=ntp_o(ntp_yA,f[0],f[1],f[3]);d.then(g,function(){g([])})},function(){ntp_Z(ntp_su,ntp_Nt);e.then(function(f){ntp_mA(f)},function(){ntp_mA(!1)})});window.setTimeout(ntp_n(a.cancel,a,"Data timeout"),500)},ntp_xA=function(a){var b=ntp_I();a.then(function(c){var d=c.exp;c=c.email;if(!c||d&&Date.now()>=d)b.reject("Invalid metadata or data expired.");else{var e= +[c,c.toLowerCase()];if(d=c.match(/(.*)(@.*)/))d=d[1].replace(/\./g,"")+d[2],d!=c&&(e=e.concat([d,d.toLowerCase()]));var f=0;ntp_4.onsignedincheckdone=function(g,h){h?(ntp_Z(ntp_su,{gen204:"ic"+f,clearcut:91}),b.resolve(!0)):(f++,f>=e.length?(ntp_Z(ntp_su,ntp_Ot),b.reject("Identity does not match.")):ntp_9t(e[f]))};ntp_9t(e[f])||b.reject("Email check not supported in Chrome.")}},function(){b.reject("Get metadata failed.")});return b.o},ntp_mA=function(a){var b=ntp_f("most-visited");ntp_iA(a);ntp_ku&& +ntp_ku.dispose();ntp_zA();44<=ntp_Ru?(ntp_ku=new ntp_7v(b,ntp_lu,ntp_qu,ntp_ru,ntp_AA,new ntp_aw,ntp_iu),ntp_ku.render()):(ntp_ku=new ntp_Xv(b,ntp_lu,ntp_wu,ntp_AA,new ntp_aw),ntp_ku.render())},ntp_yA=function(a,b,c,d){b=ntp_f("most-visited");ntp_iA(c);ntp_ku&&ntp_ku.dispose();ntp_zA();44<=ntp_Ru?(ntp_ku=new ntp_7v(b,ntp_lu,ntp_qu,ntp_ru,ntp_BA,new ntp_nv(a,ntp_5,d),ntp_iu),ntp_ku.render()):(ntp_ku=new ntp_Xv(b,ntp_lu,ntp_wu,ntp_BA,new ntp_nv(a,ntp_5,d)),ntp_ku.render())},ntp_zA=function(){var a= +ntp_wu;ntp_5j(document.body,"des-cla",0===a);ntp_5j(document.body,"des-mat",1===a);ntp_5j(document.body,"des-ico",2===a);ntp_mu&&ntp_Y(ntp_mu.R,"init")},ntp_kA=function(a){if(ntp_gu){var b=!1,c={};if(a)if(ntp_p()<=a.expiration_date){if(ntp_ju=a,b=!0,a.fingerprint&&(a.data_uri||a.cta_data_uri)){var d=a.fingerprint;try{encodeURIComponent(d);var e=d}catch(h){e=""}c.es_dfp=e}}else ntp_5.remove("doodle");e=1;d=window.navigator.onLine;if(a&&b){b=!!a.data_uri;var f=!!a.cta_url,g=!!a.cta_data_uri;a.complex_logo? +d?(window.H&&window.clearTimeout(window.H),e=4):b&&(e=3):f&&(d||g)?e=5:f||!d&&!b||(e=2)}ntp_vA(e,a);ntp_lA(c)}},ntp_vA=function(a,b){ntp_gu&&ntp_gu.w.handleEvent(a,b)},ntp_wA=function(){ntp_J(ntp_5.remove("ml"),ntp_e);ntp_J(ntp_5.remove("mlmeta"),ntp_e)},ntp_uA=function(a,b){b?ntp_Z(ntp_tu,ntp_Pt):ntp_Z(ntp_tu,ntp_Qt);ntp_pA(ntp_tu);var c;if(c=a)c=a.lang,c=!ntp_hu||!c||ntp_hu==c;if(c){if(c=a.og){var d=ntp_f("gb");if(d){var e=c.html;e?d.innerHTML=e:d.innerHTML=(c.up||"")+(c.dbg||"");(d=ntp_f("mngb"))&& +ntp_Y(d,"h")}if(e=c.css)d=document.createElement("style"),d.appendChild(document.createTextNode(String(e))),e=document.head,e.insertBefore(d,e.childNodes[0]||null);if(d=c.js||"")if(e=document.createElement("script"),e.appendChild(document.createTextNode(String(d))),document.head.appendChild(e),d=window.gbar)if((d=d.ldb)&&d(),ntp_Iv&&(d=ntp_Iv,e=ntp_au())){var f=ntp_Mv(e);ntp_Pv(d,e,!!f&&-1==ntp_Jv.indexOf(f))}}d=a.csug;b&&d&&d.suggestions&&c&&c.email?(ntp_J(ntp_5.put("ml",d.suggestions),ntp_e),b= +{},b.email=c.email,b.exp=Date.now()+13824E5,ntp_J(ntp_5.put("mlmeta",b),ntp_e)):ntp_wA();b=a.doodle;ntp_gu&&(c=!1,b&&(d=Math.min(b.time_to_live,1296E5),0b.expiration_date&&(b=null,ntp_5.remove("weather"));ntp_PJ=b;var c=ntp_f("user-dtw"),d=ntp_f("user-time"),e=ntp_f("user-date"),f=ntp_f("lga");if(c&&d&&e&&f){var g=ntp_x("Windows")?"win":ntp_x("Macintosh")?"macos":ntp_x("CrOS")?"cros":"";""!=g&&(c.classList.add(g),d.classList.add(g));c.style.display="block";f.style.display="none";ntp_VG(d,e);ntp_FJ=new ntp_bi(1E3);ntp_FJ.start();ntp_D(ntp_FJ,"tick",ntp_o(ntp_VG,d,e));ntp_NJ(b)}},ntp_e);window.setTimeout(ntp_n(a.cancel, +a,"Reading weather from storage timeout"),500)}else ntp_GJ()},ntp_HA=function(a){ntp_X(document.body,"hide");ntp_Su();ntp_f("q").value=a;var b=ntp_f("hf");ntp_Td(b);ntp__e(ntp_Rc().href.match(ntp_Ye)[6]||"",function(c,d){ntp_fA[c]&&d&&ntp_GA(b,c,d)});ntp_GA(b,"gs_ivs",1);ntp_f("f").submit()},ntp_GA=function(a,b,c){var d=document.createElement("input");d.type="hidden";d.name=b;d.value=c;a.appendChild(d)},ntp_IA=function(){ntp_8t.isFocused&&ntp_ye(141)},ntp_AA=function(){ntp_Z(ntp_su,ntp_Tt);ntp_JA()}, +ntp_BA=function(){ntp_Z(ntp_su,ntp_Ut);ntp_JA()},ntp_JA=function(){ntp_pA(ntp_su);ntp_Y(document.body,"hide");ntp_Y(document.body,"init");ntp_6&&ntp_6.qse&&(ntp_Z(ntp_uu,ntp_Tt),ntp_Y(ntp_f("suggestion-chips"),"suggestion-init"),ntp_qA())},ntp_bE=function(){this.H=!1;this.R=ntp_f("prm");this.w=new ntp_V;ntp_1d(this,this.w);ntp_KA(this)};ntp_r(ntp_bE,ntp_C); +var ntp_MA=function(){var a=ntp_iu,b=ntp_f("fkbx-spch");a.w.listen(b,"mousedown",function(){b.classList.add("mouse-navigation");var c=function(){b.classList.remove("mouse-navigation");b.removeEventListener("blur",c)};a.w.Md(b,"blur",c,!1)},!1)},ntp_$v=function(a,b,c,d){var e=ntp_f("error-notice");e&&(ntp_f("error-notice-msg").textContent=b,c&&d?(b=ntp_f("error-notice-link"),b.textContent=c,b.onclick=d,ntp_X(e,"has-link")):ntp_Y(e,"has-link"),c=ntp_f("error-notice-container"),ntp_sA(a,e,c))},ntp_sA= +function(a,b,c){b&&c&&(a.o&&(a.o.trigger(),a.o=null),ntp_Y(b,"noti-hide"),a.H&&ntp_X(a.R,"float-down"),window.setTimeout(function(){ntp_X(c,"float-up")},20),a.o=ntp_nE(function(){ntp_LA(a,b,c)}))},ntp_LA=function(a,b,c){if(b&&c&&c.classList.contains("float-up")){a.o&&(a.o.clear(),a.o=null);ntp_Y(c,"float-up");a.H&&ntp_Y(a.R,"float-down");var d=function(){ntp_f("mv-restore").blur();ntp_f("mv-undo").blur();ntp_W(b,"has-link")&&(ntp_Y(b,"has-link"),ntp_f("error-notice-link").blur());ntp_X(b,"noti-hide"); +a.w.Wd(c,ntp_jn,d)};a.w.listen(c,ntp_jn,d,!1)}},ntp_nE=function(a){var b=window.setTimeout(a,1E4);return{clear:function(){window.clearTimeout(b)},trigger:function(){window.clearTimeout(b);return a()}}},ntp_KA=function(a){for(var b=function(e){var f=e.target,g=f.getBoundingClientRect(),h=Math.round(e.clientX-g.left),k=Math.round(e.clientY-g.top);e=[{x:0,y:0},{x:g.width,y:0},{x:0,y:g.height},{x:g.width,y:g.height}].map(function(p){var r=h-p.x;p=k-p.y;return Math.round(Math.sqrt(r*r+p*p))});e=Math.min(300, +Math.max.apply(Math,e));var l=ntp_Sd("div"),m=document.createElement("div"),n=ntp_Sd("div");ntp_X(l,"ripple-effect");ntp_X(m,"ripple-effect-mask");ntp_X(n,"ripple-container");m.appendChild(l);n.appendChild(m);f.appendChild(n);l.style.marginLeft=h+"px";l.style.marginTop=k+"px";m.style.width=f.offsetWidth+"px";m.style.height=f.offsetHeight+"px";m.style.borderRadius=window.getComputedStyle(f).borderRadius;l.style.width=2*e+"px";l.style.height=2*e+"px";l.style.marginLeft=h-e+"px";l.style.marginTop=k- +e+"px";l.style.backgroundColor="rgba(0, 0, 0, 0)";window.setTimeout(function(){l.remove();m.remove();n.remove()},800)},c=ntp_Md("ripple"),d=0;d + + + + + + + \ No newline at end of file diff --git a/fall2018/Ankit Ojha/Portfolio/css/New Tab_files/single.html b/fall2018/Ankit Ojha/Portfolio/css/New Tab_files/single.html new file mode 100644 index 0000000..fc16c94 --- /dev/null +++ b/fall2018/Ankit Ojha/Portfolio/css/New Tab_files/single.html @@ -0,0 +1,15 @@ + + + + + + + +Most visited + + + + + \ No newline at end of file diff --git a/fall2018/Ankit Ojha/Portfolio/css/New Tab_files/widget.html b/fall2018/Ankit Ojha/Portfolio/css/New Tab_files/widget.html new file mode 100644 index 0000000..2749a7a --- /dev/null +++ b/fall2018/Ankit Ojha/Portfolio/css/New Tab_files/widget.html @@ -0,0 +1,372 @@ + + +
\ No newline at end of file diff --git a/fall2018/Ankit Ojha/Portfolio/css/dp.jpg b/fall2018/Ankit Ojha/Portfolio/css/dp.jpg new file mode 100644 index 0000000..526565f Binary files /dev/null and b/fall2018/Ankit Ojha/Portfolio/css/dp.jpg differ diff --git a/fall2018/Ankit Ojha/Portfolio/css/dp2.jpg b/fall2018/Ankit Ojha/Portfolio/css/dp2.jpg new file mode 100644 index 0000000..35bf387 Binary files /dev/null and b/fall2018/Ankit Ojha/Portfolio/css/dp2.jpg differ diff --git a/fall2018/Ankit Ojha/Portfolio/css/email.png b/fall2018/Ankit Ojha/Portfolio/css/email.png new file mode 100644 index 0000000..cf12105 Binary files /dev/null and b/fall2018/Ankit Ojha/Portfolio/css/email.png differ diff --git a/fall2018/Ankit Ojha/Portfolio/css/fb.png b/fall2018/Ankit Ojha/Portfolio/css/fb.png new file mode 100644 index 0000000..d486730 Binary files /dev/null and b/fall2018/Ankit Ojha/Portfolio/css/fb.png differ diff --git a/fall2018/Ankit Ojha/Portfolio/css/github.svg b/fall2018/Ankit Ojha/Portfolio/css/github.svg new file mode 100644 index 0000000..977cf9d --- /dev/null +++ b/fall2018/Ankit Ojha/Portfolio/css/github.svg @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fall2018/Ankit Ojha/Portfolio/css/hackerrank.png b/fall2018/Ankit Ojha/Portfolio/css/hackerrank.png new file mode 100644 index 0000000..9a8996d Binary files /dev/null and b/fall2018/Ankit Ojha/Portfolio/css/hackerrank.png differ diff --git a/fall2018/Ankit Ojha/Portfolio/css/insta.png b/fall2018/Ankit Ojha/Portfolio/css/insta.png new file mode 100644 index 0000000..3694b57 Binary files /dev/null and b/fall2018/Ankit Ojha/Portfolio/css/insta.png differ diff --git a/fall2018/Ankit Ojha/Portfolio/css/linkedin.png b/fall2018/Ankit Ojha/Portfolio/css/linkedin.png new file mode 100644 index 0000000..07f85eb Binary files /dev/null and b/fall2018/Ankit Ojha/Portfolio/css/linkedin.png differ diff --git a/fall2018/Ankit Ojha/Portfolio/css/linkedin.svg b/fall2018/Ankit Ojha/Portfolio/css/linkedin.svg new file mode 100644 index 0000000..eacd55b --- /dev/null +++ b/fall2018/Ankit Ojha/Portfolio/css/linkedin.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fall2018/Ankit Ojha/Portfolio/css/main.css b/fall2018/Ankit Ojha/Portfolio/css/main.css new file mode 100644 index 0000000..c82e17f --- /dev/null +++ b/fall2018/Ankit Ojha/Portfolio/css/main.css @@ -0,0 +1,384 @@ +* { + box-sizing: border-box; + margin: 0px atuo; +} + +body { + background: repeating-linear-gradient(to right, + #f6ba52, + #f6ba52 10px, + #ffd180 10px, + #ffd180 20px); +} + + +ul { + list-style-type: none; +} + +.dash { + border: 1px solid #E6E8CD; + width: 90%; + height: 0px; +} + +#page { + background: #306A5E; + max-width: 90%; + margin: 5%; + /* height: 1000px; */ + padding: 2%; + display:flex; + flex-wrap: wrap; + justify-content: center; +} + +header{ + width: 100%; +} + +.bannerwrapper, +.navmainwrapper, +.contentwrapper { + display: flex; + flex-wrap: wrap; + justify-content: center; +} + + +.bannerwrap { + margin-bottom: 2%; +} + +.banner { + display: flex; + flex-wrap: wrap; + justify-content: center; + width: 90%; + background: #6FA59E; + height: 250px; +} + +.banner>pre { + text-align: center; + font-size: 6em; + padding-top: 1%; + color: #000000; +} + +.navmainwrapper { + margin-top: 2%; +} + +.navmain { + width: 90%; + background: #6FA59E; + height: 70px; +} + +.navmain>ul { + display: flex; + flex-wrap: wrap; + justify-content: center; + padding-right: 5%; +} + +.navmain>ul>li { + display: inline-flex; + justify-items: center; + padding-right: 20px; + font-size: 2em; +} + +.navmain>ul>li>a { + text-decoration: none; + color: #000000; + cursor: pointer; +} + +.contentwrapper { + margin-top: 2%; +} + +#content { + /* width: 70%; */ + background: #6fa59e; + padding: 2%; + margin-right: 2%; + order: 0; +} + +.sections>h1 { + font-size: 2.5em; + text-decoration: underline; +} + +.sections>h2{ + font-size: 1.90em; +} + +#projects>p { + font-size: 1.60em; + word-spacing: 0.2em; + /* line-height: 1em; */ +} + +#education>ul { + list-style-type: none; +} + +#education>ul>li>p { + font-size: 1.60em; +} + +#skills>ul>li { + font-size: 1.60em; +} + +#achievement>article p { + font-size: 1.60em; +} + +#asidenav { + background: #C8B180; + width: 19%; + order: 1; +} + + +#upperaside{ + display: flex; + flex-wrap: wrap; + justify-content: center; +} + + +.dp { + width: 100%; + height: 260px; +} + +.dp>figure { + margin: 0%; + width: inherit; + height: 260px; +} + +.dp>figure>img { + width: inherit; + height: inherit; +} + +.dp>figure>p { + margin: 0px; + font-size: 2.5em; + text-align: center; +} + +#loweraside{ + margin-top: 150px; + margin: 0px auto; +} + +#loweraside a{ + text-decoration: none; + color: #000000; +} + +.contactinfo { + margin-top: 25%; +} + +.contactinfo ul{ + padding-left: 5%; + display: flex; + flex-wrap: wrap; + flex-direction: column; +} + +.contactinfo img{ + margin-right: 4%; +} + +.contactlist, +.socialmedia { + list-style-type: none; + font-size: 0.9em; +} + +.contactlist>li { + font-size: 1.7em; + color: #000000; +} + +.contactlist > li:nth-child(2){ + font-size: 1.3em; +} +.socialmedia li { + font-size: 1.5em; +} + +.hobbies ul{ + padding-left: 2%; +} + +.hobbies>ul p { + font-size: 1.5em; +} + +li>a { + text-decoration: none; + color: #000000 +} + +.contactimages { + width: 40px; + height: 30px; +} + +#loweraside p{ + margin: 0%; +} +#loweraside li{ + margin-top: 5%; +} + +@media screen and (min-width:977px){ + #content{ + width: 70%; + } + #asidenav{ + width: 22%; + } +} + + +@media screen and (min-width:580px) and (max-width:977px){ + #content{ + width: 90%; + margin-left: 15px; + margin-top:5px; + order: 1; + } + #asidenav{ + width: 90%; + order: 0; + } + .navmain{ + height: 100px; + } + .banner > pre{ + padding-top:40px; + font-size: 4em; + } + .dp{ + width: 80%; + margin-left: 30%; + } + .dp>figure>p { + font-size: 2.4em; + text-align: left; + padding-left: 10%; + } + #loweraside{ + margin-top: -50px; + } + #loweraside li{ + margin-top: 1%; + } +} + + +@media screen and (min-width:320px) and (max-width:580px){ + #content{ + width: 90%; + margin-left: 5px; + margin-top:5px; + order: 1; + } + #asidenav{ + width: 90%; + order: 0; + } + + .banner{ + height: 120px; + } + .banner > pre{ + padding-top:4%; + font-size: 2.5em; + } + + .dp{ + width: 100%; + margin-left: 2%; + margin-right: 2% + } + .dp>figure>p { + font-size: 2.5em; + text-align: center; + padding-left: 0%; + } + #loweraside{ + margin-top: 90px; + } + + .navmain{ + height: 70px; + } + .navmain>ul{ + padding-right: 0%; + margin-left: 0%; + margin-right: 3%; + } + .navmain ul li a{ + font-size: 0.7em; + } +} + + +@media screen and (max-width:320px){ + #content{ + width: 90%; + margin-left: 5px; + margin-top:5px; + order: 1; + } + #asidenav{ + width: 90%; + order: 0; + } + + .banner{ + height: 80px; + } + .banner > pre{ + padding-top:7%; + font-size: 1.5em; + } + + .dp{ + width: 100%; + margin-left: 0%; + } + .dp>figure>p { + font-size: 1.3em; + text-align: left; + padding-left: 0%; + } + #loweraside{ + margin-top: 90px; + } + + .navmain{ + height: 50px; + } + .navmain>ul{ + padding-right: 0%; + margin-left: 0%; + margin-right: 3%; + } + .navmain ul li a{ + font-size: 0.4em; + } +} \ No newline at end of file diff --git a/fall2018/Ankit Ojha/Portfolio/css/phone.png b/fall2018/Ankit Ojha/Portfolio/css/phone.png new file mode 100644 index 0000000..5896486 Binary files /dev/null and b/fall2018/Ankit Ojha/Portfolio/css/phone.png differ diff --git a/fall2018/Ankit Ojha/Portfolio/css/twitter.png b/fall2018/Ankit Ojha/Portfolio/css/twitter.png new file mode 100644 index 0000000..52c691b Binary files /dev/null and b/fall2018/Ankit Ojha/Portfolio/css/twitter.png differ diff --git a/fall2018/Ankit Ojha/Portfolio/index.html b/fall2018/Ankit Ojha/Portfolio/index.html new file mode 100644 index 0000000..b67aac5 --- /dev/null +++ b/fall2018/Ankit Ojha/Portfolio/index.html @@ -0,0 +1,210 @@ + + + + + + + + + Ankit Ojha + + + + +
+ +
+
+ +
+ + +
+ + +
+ +
+ +
+ +
+

Projects

+
+ +

Rookie Drivers

+

+ A Rookie Guide To Pass Learner License Test. + Rookie Drivers is a website to help the candidate in passing the learner licence + driving test. + The website covers all the following test sections that appear during the learner + licence driving test and helps the candidate in passing the test. +
+ Contributers: Ankit Ojha and Udit Makkar +

+ +
+ + + +
+

Education

+
+
    +
  • +

    Masters of Computer Applications
    IPU, New Delhi
    + 2017-Present +

    +
  • +
  • +

    Bachelor of Computer Applications
    IPU, New Delhi
    2014-17 +
    Percentage: 85%

    +
  • +
  • +

    XII
    Army Public School, Delhi Cantt, New Delhi
    2013-14 +
    Percentage: 79%

    +
  • +
  • +

    X
    Army Public School, Delhi Cantt, New Delhi
    2011-12 +
    CGPA: 9.2

    +
  • +
+
+ + + + + + + +
+

Skills

+
+

Languages

+
    +
  • C
  • +
  • C++
  • +
  • Java
  • +
  • Python
  • +
  • JavaScript
  • +
+ +

Tools

+
    +
  • Linux
  • +
  • Excel
  • +
+
+ + + +
+

Accomplishments

+
+ +

Certifications

+
+

+ Basics of Python Programming +

Jan – Jan

+

+

+ Ethical Hacking +

Feb

+

+
+ +

Honors and Rewards

+
+

+ Run for education 2018 +

Oct

+

Successfully completed 6.5km Marathon( Position: 21st)

+

+

+ Run for education 2017 +

Oct

+

Successfully completed 6.5km Marathon( Position: 15th)

+

+

+ Poster Making Competition +

Nov

+

Secured 1st Position in the College.

+

+
+ +
+ +
+ + + + + +
+ +
+ + + + + +
+ + + + \ No newline at end of file diff --git a/fall2018/Ankit Ojha/chat App/app.js b/fall2018/Ankit Ojha/chat App/app.js new file mode 100644 index 0000000..96078fe --- /dev/null +++ b/fall2018/Ankit Ojha/chat App/app.js @@ -0,0 +1,40 @@ +const express = require('express'); +const app = express(); +const server = require('http').Server(app); +const io = require('socket.io')(server); +const path = require('path'); + +const port = process.env.Port || 4500; + +server.listen(port, () => { + console.log(`listening to server on port ${port}`); +}); + +//set public folder +app.use('/', express.static(path.join(__dirname, '/public'))); + +let userinfo = []; + +//on connecting a user +io.on('connection', function (socket) { + //event username + socket.on('username', (username) => { + let info = { + 'name': username, + 'id': socket.id + }; + userinfo.push(info); + console.log(userinfo); + socket.broadcast.emit('user connected', userinfo[userinfo.length-1]); + }); + + //event chat message + socket.on('chat message', function (info) { + io.emit('chat message', info.username, info.msg); + }); + + //event disconnect + socket.on('disconnect', () => { + socket.broadcast.emit('user disconnected', userinfo[userinfo.length-1]); + }); +}); \ No newline at end of file diff --git a/fall2018/Ankit Ojha/chat App/package-lock.json b/fall2018/Ankit Ojha/chat App/package-lock.json new file mode 100644 index 0000000..ba022db --- /dev/null +++ b/fall2018/Ankit Ojha/chat App/package-lock.json @@ -0,0 +1,635 @@ +{ + "name": "soketio", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "accepts": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", + "requires": { + "mime-types": "~2.1.18", + "negotiator": "0.6.1" + } + }, + "after": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", + "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=" + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "arraybuffer.slice": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", + "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==" + }, + "async-limiter": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", + "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==" + }, + "backo2": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", + "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=" + }, + "base64-arraybuffer": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", + "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=" + }, + "base64id": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz", + "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY=" + }, + "better-assert": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz", + "integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=", + "requires": { + "callsite": "1.0.0" + } + }, + "blob": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz", + "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig==" + }, + "body-parser": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", + "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", + "requires": { + "bytes": "3.0.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "~1.6.3", + "iconv-lite": "0.4.23", + "on-finished": "~2.3.0", + "qs": "6.5.2", + "raw-body": "2.3.3", + "type-is": "~1.6.16" + } + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + }, + "callsite": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", + "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=" + }, + "component-bind": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", + "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=" + }, + "component-emitter": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", + "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" + }, + "component-inherit": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz", + "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=" + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "engine.io": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.3.2.tgz", + "integrity": "sha512-AsaA9KG7cWPXWHp5FvHdDWY3AMWeZ8x+2pUVLcn71qE5AtAzgGbxuclOytygskw8XGmiQafTmnI9Bix3uihu2w==", + "requires": { + "accepts": "~1.3.4", + "base64id": "1.0.0", + "cookie": "0.3.1", + "debug": "~3.1.0", + "engine.io-parser": "~2.1.0", + "ws": "~6.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "engine.io-client": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.3.2.tgz", + "integrity": "sha512-y0CPINnhMvPuwtqXfsGuWE8BB66+B6wTtCofQDRecMQPYX3MYUZXFNKDhdrSe3EVjgOu4V3rxdeqN/Tr91IgbQ==", + "requires": { + "component-emitter": "1.2.1", + "component-inherit": "0.0.3", + "debug": "~3.1.0", + "engine.io-parser": "~2.1.1", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "parseqs": "0.0.5", + "parseuri": "0.0.5", + "ws": "~6.1.0", + "xmlhttprequest-ssl": "~1.5.4", + "yeast": "0.1.2" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "engine.io-parser": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.3.tgz", + "integrity": "sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA==", + "requires": { + "after": "0.8.2", + "arraybuffer.slice": "~0.0.7", + "base64-arraybuffer": "0.1.5", + "blob": "0.0.5", + "has-binary2": "~1.0.2" + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "express": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", + "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", + "requires": { + "accepts": "~1.3.5", + "array-flatten": "1.1.1", + "body-parser": "1.18.3", + "content-disposition": "0.5.2", + "content-type": "~1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.1.1", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.4", + "qs": "6.5.2", + "range-parser": "~1.2.0", + "safe-buffer": "5.1.2", + "send": "0.16.2", + "serve-static": "1.13.2", + "setprototypeof": "1.1.0", + "statuses": "~1.4.0", + "type-is": "~1.6.16", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + } + }, + "finalhandler": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", + "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.4.0", + "unpipe": "~1.0.0" + } + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "has-binary2": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz", + "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==", + "requires": { + "isarray": "2.0.1" + } + }, + "has-cors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz", + "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=" + }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, + "iconv-lite": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "indexof": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=" + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ipaddr.js": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", + "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=" + }, + "isarray": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=" + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" + }, + "mime-db": { + "version": "1.38.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", + "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==" + }, + "mime-types": { + "version": "2.1.22", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz", + "integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==", + "requires": { + "mime-db": "~1.38.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" + }, + "object-component": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz", + "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=" + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "parseqs": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", + "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", + "requires": { + "better-assert": "~1.0.0" + } + }, + "parseuri": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz", + "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", + "requires": { + "better-assert": "~1.0.0" + } + }, + "parseurl": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "proxy-addr": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", + "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.8.0" + } + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" + }, + "raw-body": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", + "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.3", + "iconv-lite": "0.4.23", + "unpipe": "1.0.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "send": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" + } + }, + "serve-static": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", + "send": "0.16.2" + } + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + }, + "socket.io": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.2.0.tgz", + "integrity": "sha512-wxXrIuZ8AILcn+f1B4ez4hJTPG24iNgxBBDaJfT6MsyOhVYiTXWexGoPkd87ktJG8kQEcL/NBvRi64+9k4Kc0w==", + "requires": { + "debug": "~4.1.0", + "engine.io": "~3.3.1", + "has-binary2": "~1.0.2", + "socket.io-adapter": "~1.1.0", + "socket.io-client": "2.2.0", + "socket.io-parser": "~3.3.0" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + } + } + }, + "socket.io-adapter": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz", + "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs=" + }, + "socket.io-client": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.2.0.tgz", + "integrity": "sha512-56ZrkTDbdTLmBIyfFYesgOxsjcLnwAKoN4CiPyTVkMQj3zTUh0QAx3GbvIvLpFEOvQWu92yyWICxB0u7wkVbYA==", + "requires": { + "backo2": "1.0.2", + "base64-arraybuffer": "0.1.5", + "component-bind": "1.0.0", + "component-emitter": "1.2.1", + "debug": "~3.1.0", + "engine.io-client": "~3.3.1", + "has-binary2": "~1.0.2", + "has-cors": "1.1.0", + "indexof": "0.0.1", + "object-component": "0.0.3", + "parseqs": "0.0.5", + "parseuri": "0.0.5", + "socket.io-parser": "~3.3.0", + "to-array": "0.1.4" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "socket.io-parser": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.0.tgz", + "integrity": "sha512-hczmV6bDgdaEbVqhAeVMM/jfUfzuEZHsQg6eOmLgJht6G3mPKMxYm75w2+qhAQZ+4X+1+ATZ+QFKeOZD5riHng==", + "requires": { + "component-emitter": "1.2.1", + "debug": "~3.1.0", + "isarray": "2.0.1" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + }, + "to-array": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz", + "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=" + }, + "type-is": { + "version": "1.6.16", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", + "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.18" + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "ws": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.4.tgz", + "integrity": "sha512-eqZfL+NE/YQc1/ZynhojeV8q+H050oR8AZ2uIev7RU10svA9ZnJUddHcOUZTJLinZ9yEfdA2kSATS2qZK5fhJA==", + "requires": { + "async-limiter": "~1.0.0" + } + }, + "xmlhttprequest-ssl": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz", + "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4=" + }, + "yeast": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz", + "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=" + } + } +} diff --git a/fall2018/Ankit Ojha/chat App/package.json b/fall2018/Ankit Ojha/chat App/package.json new file mode 100644 index 0000000..9b2025f --- /dev/null +++ b/fall2018/Ankit Ojha/chat App/package.json @@ -0,0 +1,19 @@ +{ + "name": "soketio", + "version": "1.0.0", + "description": "learn socketio", + "main": "app.js", + "scripts": { + "start": "app.js" + }, + "author": "ankit", + "license": "ISC", + "dependencies": { + "express": "^4.16.4", + "socket.io": "^2.2.0", + "socket.io-client": "^2.2.0" + }, + "engines": { + "node": "10.x" + } +} diff --git a/fall2018/Ankit Ojha/chat App/public/index.html b/fall2018/Ankit Ojha/chat App/public/index.html new file mode 100644 index 0000000..a7c6fb1 --- /dev/null +++ b/fall2018/Ankit Ojha/chat App/public/index.html @@ -0,0 +1,16 @@ + + + + chat + + + +
    +
    + +
    + + + + + \ No newline at end of file diff --git a/fall2018/Ankit Ojha/chat App/public/main.css b/fall2018/Ankit Ojha/chat App/public/main.css new file mode 100644 index 0000000..d96de8f --- /dev/null +++ b/fall2018/Ankit Ojha/chat App/public/main.css @@ -0,0 +1,70 @@ +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + font: 13px Helvetica, Arial; + color: #ffffff; +} + +form { + background: #000; + padding: 3px; + position: fixed; + bottom: 0; + width: 100%; +} + +form input { + border: 0; + padding: 10px; + width: 90%; + margin-right: .5%; +} + +form button { + width: 9%; + background: #004c8c; + border: none; + padding: 10px; + color: #ffffff; +} + +#messages { + list-style-type: none; + margin: 0; + padding: 0; +} + +#messages li { + padding: 5px 10px; +} + +/* #messages li:nth-child(odd) { + background: #0277bd; +} +#messages li:nth-child(even) { + background: #6cc1f1; +} */ + +#messages > .info{ + text-align: center; +} + +#left{ + text-align: left; + font-size: 2em; + background: #6cc1f1; +} + +#right{ + text-align: right; + font-size: 2em; + background: #0277bd; +} + +.info{ + background: #087f23; +} \ No newline at end of file diff --git a/fall2018/Ankit Ojha/chat App/public/main.js b/fall2018/Ankit Ojha/chat App/public/main.js new file mode 100644 index 0000000..8776910 --- /dev/null +++ b/fall2018/Ankit Ojha/chat App/public/main.js @@ -0,0 +1,32 @@ +$(()=> { + const socket = io(); + let usernameg; + usernameg = prompt('Please enter your name '); + socket.emit('username',usernameg); + $('form').submit(function(e){ + e.preventDefault(); // prevents page reloading + socket.emit('chat message',{'username':usernameg, 'msg': $('#m').val()}); + $('#m').val(''); + return false; + }); + + socket.on('chat message', (username,msg)=>{ + if(username == usernameg){ + $('#messages').append($('
  • ').text(`${username} : ${msg}`)); + // $('#left').css({'text-align':'left'}); + } + + }); + + socket.on('user connected', (username)=>{ + $('#messages').append($('
  • ').text(`user connected : ${username.name}`)); + }); + + socket.on('user disconnected', (username)=>{ + $('#messages').append($('
  • ').text(`user disconnected : ${username.name}`)); + }); + }); + diff --git a/fall2018/Ankit Ojha/saarthi/.gitignore b/fall2018/Ankit Ojha/saarthi/.gitignore new file mode 100644 index 0000000..4d64059 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/.gitignore @@ -0,0 +1,2 @@ +/node_modules + diff --git a/fall2018/Ankit Ojha/saarthi/app.js b/fall2018/Ankit Ojha/saarthi/app.js new file mode 100644 index 0000000..f30c4f6 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/app.js @@ -0,0 +1,97 @@ +const express = require('express'); +const app = express(); +const multer = require('multer'); +const bodyParser = require('body-parser'); +const path = require('path'); +const mongoose = require('mongoose'); +const config = require('./config/keys'); +const flash = require('connect-flash'); +const session = require('express-session'); +const passport = require('passport'); +const expressLayouts = require('express-ejs-layouts'); + + +//models +const article = require('./models/articles'); + +//Passport Config +require('./config/passport')(passport); + +//DB config +const db = require('./config/keys').MongoURI; + + +//Set public folder for static files +app.use('/public', express.static(path.join(__dirname, '/public'))); + + +//PORT variable +const PORT = process.env.PORT || 5000; + +//EJS +app.use(expressLayouts); +app.set('view engine', 'ejs'); + +//Parse application +app.use(bodyParser.urlencoded({ + extended: false +})); +//app.use(bodyParser.json()); + +//Express session middle ware +app.use(session({ + secret: 'keyboard cat', + resave: true, + saveUninitialized: true, +})); + +//Passport middleware +app.use(passport.initialize()); +app.use(passport.session()); + + +//Express messages middleware +app.use(flash()); + +//Global Vars +app.use((req, res, next) => { + res.locals.success_msg = req.flash('success_msg'); + res.locals.error_msg = req.flash('error_msg'); + res.locals.error = req.flash('error'); + next(); +}); + +app.get('*', (req, res, next) => { + res.locals.user = req.user || null; + next(); +}); + +//Routes +app.use('/', require('./routes/index')); + +app.get('/explore',(req,res)=>{ + article.find({},(err,articles)=>{ + if(err){ + console.log(err); + }else{ + res.render('explore',{ + articles : articles + }) + } + }) +}); + +app.use('/users', require('./routes/users')); +app.use('/technicalUsers', require('./routes/technicalUsers')); + +//Listen to port 5000 +app.listen(PORT, () => { + console.log(`Server started on port ${PORT}`) + //Connect to Mongo + mongoose.connect(db, { + useNewUrlParser: true + }) + .then(() => console.log('MongoDB Connected....')) + .catch(err => console.log(err)); + +}); \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/config/auth.js b/fall2018/Ankit Ojha/saarthi/config/auth.js new file mode 100644 index 0000000..d3d0b63 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/config/auth.js @@ -0,0 +1,9 @@ +module.exports = { + ensureAuthenticated: function(req, res, next) { + if (req.isAuthenticated()) { + return next(); + } + req.flash('error_msg', 'Please log in to view that resource'); + res.redirect('/users/login'); + } +}; \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/config/keys.js b/fall2018/Ankit Ojha/saarthi/config/keys.js new file mode 100644 index 0000000..559767b --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/config/keys.js @@ -0,0 +1,7 @@ +//Mongo Atlas username and password +//Password:Saarthi@123 +//Username kartikdutta29@gmail.com + +module.exports ={ + MongoURI:'mongodb+srv://MazeRunner1996:Saarthi@test-cluster1-5wvqp.mongodb.net/test?retryWrites=true' +} \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/config/passport.js b/fall2018/Ankit Ojha/saarthi/config/passport.js new file mode 100644 index 0000000..9fc25f9 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/config/passport.js @@ -0,0 +1,89 @@ +const LocalStrategy = require('passport-local').Strategy; +const mongoose = require('mongoose'); +const bcrypt = require('bcryptjs'); + +// Load User model +const User = require('../models/User'); +const TechnicalUser=require('../models/TechnicalUser'); + +function SessionConstructor(userId, userGroup, details) { + this.userId = userId; + this.userGroup = userGroup; + this.details = details; +} + +module.exports = function(passport) { + passport.use('user-local', + new LocalStrategy({ usernameField: 'email' }, (email, password, done) => { + // Match user + User.findOne({ + email: email + }).then(user => { + if (!user) { + return done(null, false, { message: 'That email is not registered' }); + } + + // Match password + bcrypt.compare(password, user.password, (err, isMatch) => { + if (err) throw err; + if (isMatch) { + return done(null, user); + } else { + return done(null, false, { message: 'Password incorrect' }); + } + }); + }); + }) + + ); + passport.use('technical-local',new LocalStrategy({usernameField:'email'},(email,password,done)=>{ + // console.log(email); + TechnicalUser.findOne({ + email: email + }).then(tuser=>{ + if(!tuser){ + + return done(null,false,{message:'That email is not registered sorry'}); + }else if(tuser){ + return done(null,tuser); + } + }); + }) + ); + passport.serializeUser(function(user, done) { + let userGroup = User; + let userPrototype = Object.getPrototypeOf(user); + + if(userPrototype === User.prototype){ + userGroup = "User"; + }else if(userPrototype === TechnicalUser.prototype){ + userGroup = "TechnicalUser"; + } + + let sessionConstructor = new SessionConstructor(user.id, userGroup, ''); + done(null,sessionConstructor); + }); + + passport.deserializeUser(function(sessionConstructor, done) { + // User.findById(id, function(err, user) { + // done(err, user); + // }); + // TechnicalUser.findById(id,function(err,tuser){ + // done(err,tuser); + // }); + + if(sessionConstructor.userGroup == "User"){ + User.findOne({ + _id: sessionConstructor.userId + },function (err, user) { + done(err, user); + }); + }else if(sessionConstructor.userGroup == 'TechnicalUser'){ + TechnicalUser.findOne({ + _id: sessionConstructor.userId + },function (err, user) { + done(err, user); + }); + } + }); +}; diff --git a/fall2018/Ankit Ojha/saarthi/models/Request.js b/fall2018/Ankit Ojha/saarthi/models/Request.js new file mode 100644 index 0000000..3d27a05 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/models/Request.js @@ -0,0 +1,20 @@ +const mongoose =require('mongoose'); + +//User SCHEMA +const RequestSchema = mongoose.Schema({ + title:{ + type: String, + required : true + }, + email:{ + type: String, + required: true + }, + date:{ + type: Date, + default :Date.now + } +}); + +//the model User is based on UserSchema +const Request = module.exports = mongoose.model('Request',RequestSchema); diff --git a/fall2018/Ankit Ojha/saarthi/models/TechnicalUser.js b/fall2018/Ankit Ojha/saarthi/models/TechnicalUser.js new file mode 100644 index 0000000..5b7ff01 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/models/TechnicalUser.js @@ -0,0 +1,28 @@ +const mongoose =require('mongoose'); + +//User SCHEMA +const technicalUserSchema = mongoose.Schema({ + name:{ + type: String, + required : true + }, + email:{ + type: String, + required: true + }, + password:{ + type: String, + required: true + }, + articles_written:[{ + type: mongoose.Schema.Types.ObjectId, + // ref: 'articles' + }], + date:{ + type: Date, + default :Date.now + } +}); + +//the model User is based on UserSchema +const User = module.exports = mongoose.model('TechnicalUser',technicalUserSchema); diff --git a/fall2018/Ankit Ojha/saarthi/models/User.js b/fall2018/Ankit Ojha/saarthi/models/User.js new file mode 100644 index 0000000..f0fc2a0 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/models/User.js @@ -0,0 +1,24 @@ +const mongoose =require('mongoose'); + +//User SCHEMA +const UserSchema = mongoose.Schema({ + name:{ + type: String, + required : true + }, + email:{ + type: String, + required: true + }, + password:{ + type: String, + required: true + }, + date:{ + type: Date, + default :Date.now + } +}); + +//the model User is based on UserSchema +const User = module.exports = mongoose.model('User',UserSchema); diff --git a/fall2018/Ankit Ojha/saarthi/models/articles.js b/fall2018/Ankit Ojha/saarthi/models/articles.js new file mode 100644 index 0000000..64fb8cd --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/models/articles.js @@ -0,0 +1,43 @@ +const mongoose =require('mongoose'); + + +//User SCHEMA +const ArticleSchema = mongoose.Schema({ + title:{ + type: String, + required : true + }, + Category:{ + type: String, + required: true, + default: 'miscellaneous' + }, + Author:{ + type: String, + // ref: 'TechnicalUser', + required: true + }, + Body:{ + type: [String], + required: true + }, + steptitiles:{ + type: [String], + required: true + }, + Created:{ + type: Date, + default: Date.now + }, + Updated:{ + type: Date, + default: Date.now + }, + Likes:{ + type: Number, + default: 0 + } +}); + +//the model User is based on UserSchema +const User = module.exports = mongoose.model('articles',ArticleSchema); diff --git a/fall2018/Ankit Ojha/saarthi/package-lock.json b/fall2018/Ankit Ojha/saarthi/package-lock.json new file mode 100644 index 0000000..858d025 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/package-lock.json @@ -0,0 +1,1662 @@ +{ + "name": "saarthi", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "accepts": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", + "requires": { + "mime-types": "~2.1.18", + "negotiator": "0.6.1" + } + }, + "acorn": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.0.tgz", + "integrity": "sha512-MW/FjM+IvU9CgBzjO3UIPCE2pyEwUsoFl+VGdczOPEdxfGFjuKny/gN54mOuX7Qxmb9Rg9MCn2oKiSUeW+pjrw==" + }, + "acorn-dynamic-import": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz", + "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==" + }, + "acorn-node": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.6.2.tgz", + "integrity": "sha512-rIhNEZuNI8ibQcL7ANm/mGyPukIaZsRNX9psFNQURyJW0nu6k8wjSDld20z6v2mDBWqX13pIEnk9gGZJHIlEXg==", + "requires": { + "acorn": "^6.0.2", + "acorn-dynamic-import": "^4.0.0", + "acorn-walk": "^6.1.0", + "xtend": "^4.0.1" + } + }, + "acorn-walk": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.1.1.tgz", + "integrity": "sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw==" + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "ansicolors": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.2.1.tgz", + "integrity": "sha1-vgiVmQl7dKXJxKhKDNvNtivYeu8=" + }, + "append-field": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz", + "integrity": "sha1-HjRA6RXwsSA9I3SOeO3XubW0PlY=" + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" + }, + "async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "requires": { + "lodash": "^4.17.10" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "bcryptjs": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz", + "integrity": "sha1-mrVie5PmBiH/fNrF2pczAn3x0Ms=" + }, + "bindings": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.4.0.tgz", + "integrity": "sha512-7znEVX22Djn+nYjxCWKDne0RRloa9XfYa84yk3s+HkE3LpDYZmhArYr9O9huBoHY3/oXispx5LorIX7Sl2CgSQ==", + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "bluebird": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", + "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" + }, + "body-parser": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", + "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", + "requires": { + "bytes": "3.0.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "~1.6.3", + "iconv-lite": "0.4.23", + "on-finished": "~2.3.0", + "qs": "6.5.2", + "raw-body": "2.3.3", + "type-is": "~1.6.16" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "bson": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.0.tgz", + "integrity": "sha512-9Aeai9TacfNtWXOYarkFJRW2CWo+dRon+fuLZYJmvLV3+MiUp0bEI6IAZfXEIg7/Pl/7IWlLaDnhzTsD81etQA==" + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + }, + "busboy": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/busboy/-/busboy-0.2.14.tgz", + "integrity": "sha1-bCpiLvz0fFe7vh4qnDetNseSVFM=", + "requires": { + "dicer": "0.2.5", + "readable-stream": "1.1.x" + } + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + }, + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" + }, + "cardinal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-1.0.0.tgz", + "integrity": "sha1-UOIcGwqjdyn5N33vGWtanOyTLuk=", + "requires": { + "ansicolors": "~0.2.1", + "redeyed": "~1.0.0" + } + }, + "charenc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", + "integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=" + }, + "cli-color": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/cli-color/-/cli-color-1.4.0.tgz", + "integrity": "sha512-xu6RvQqqrWEo6MPR1eixqGPywhYBHRs653F9jfXB2Hx4jdM/3WxiNE1vppRmxtMIfl16SFYTpYlrnqH/HsK/2w==", + "requires": { + "ansi-regex": "^2.1.1", + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "memoizee": "^0.4.14", + "timers-ext": "^0.1.5" + } + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "colors": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz", + "integrity": "sha1-JCP+ZnisDF2uiFLl0OW+CMmXq8w=" + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } + } + }, + "connect-flash": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/connect-flash/-/connect-flash-0.1.1.tgz", + "integrity": "sha1-2GMPJtlaf4UfmVax6MxnMvO2qjA=" + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "crc": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/crc/-/crc-3.4.4.tgz", + "integrity": "sha1-naHpgOO9RPxck79as9ozeNheRms=" + }, + "crypt": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", + "integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=" + }, + "crypto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/crypto/-/crypto-1.0.1.tgz", + "integrity": "sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig==" + }, + "cycle": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", + "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=" + }, + "d": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", + "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "requires": { + "es5-ext": "^0.10.9" + } + }, + "deasync": { + "version": "0.1.14", + "resolved": "https://registry.npmjs.org/deasync/-/deasync-0.1.14.tgz", + "integrity": "sha512-wN8sIuEqIwyQh72AG7oY6YQODCxIp1eXzEZlZznBuwDF8Q03Tdy9QNp1BNZXeadXoklNrw+Ip1fch+KXo/+ASw==", + "requires": { + "bindings": "~1.2.1", + "node-addon-api": "^1.6.0" + }, + "dependencies": { + "bindings": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz", + "integrity": "sha1-FK1hE4EtLTfXLme0ystLtyZQXxE=" + } + } + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "deep-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", + "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=" + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "dicer": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/dicer/-/dicer-0.2.5.tgz", + "integrity": "sha1-WZbAhrszIYyBLAkL3cCc0S+stw8=", + "requires": { + "readable-stream": "1.1.x", + "streamsearch": "0.1.2" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "ejs": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.6.1.tgz", + "integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==" + }, + "ejs-include-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ejs-include-regex/-/ejs-include-regex-1.0.0.tgz", + "integrity": "sha1-4vcVdcv9VRrIALJHTB9io45wCTo=" + }, + "ejs-lint": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/ejs-lint/-/ejs-lint-0.3.0.tgz", + "integrity": "sha1-eovV9BX4gi2SGbBAQ7Xvx7WT1ZU=", + "requires": { + "ejs": "2.5.6", + "ejs-include-regex": "^1.0.0", + "globby": "^6.1.0", + "read-input": "^0.3.1", + "rewire": "^2.5.1", + "syntax-error": "^1.1.6", + "yargs": "^7.0.1" + }, + "dependencies": { + "ejs": { + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.5.6.tgz", + "integrity": "sha1-R5Y2v6P+Ox3r1SCH8KyyBLTxnIg=" + } + } + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es5-ext": { + "version": "0.10.47", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.47.tgz", + "integrity": "sha512-/1TItLfj+TTfWoeRcDn/0FbGV6SNo4R+On2GGVucPU/j3BWnXE2Co8h8CTo4Tu34gFJtnmwS9xiScKs4EjZhdw==", + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.1", + "next-tick": "1" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-map": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", + "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", + "requires": { + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", + "es6-set": "~0.1.5", + "es6-symbol": "~3.1.1", + "event-emitter": "~0.3.5" + } + }, + "es6-set": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", + "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", + "requires": { + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", + "es6-symbol": "3.1.1", + "event-emitter": "~0.3.5" + } + }, + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "es6-weak-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", + "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", + "requires": { + "d": "1", + "es5-ext": "^0.10.14", + "es6-iterator": "^2.0.1", + "es6-symbol": "^3.1.1" + } + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "escope": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", + "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", + "requires": { + "es6-map": "^0.1.3", + "es6-weak-map": "^2.0.1", + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "esprima": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "express": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", + "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", + "requires": { + "accepts": "~1.3.5", + "array-flatten": "1.1.1", + "body-parser": "1.18.3", + "content-disposition": "0.5.2", + "content-type": "~1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.1.1", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.4", + "qs": "6.5.2", + "range-parser": "~1.2.0", + "safe-buffer": "5.1.2", + "send": "0.16.2", + "serve-static": "1.13.2", + "setprototypeof": "1.1.0", + "statuses": "~1.4.0", + "type-is": "~1.6.16", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + } + }, + "express-ejs-layouts": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/express-ejs-layouts/-/express-ejs-layouts-2.5.0.tgz", + "integrity": "sha512-27Kza3FR8UqvQsq1ewaxC2IwpgrQttYDEFN5s8D74Fv1VPdzsXFWsiKhPMlNauG+DrgMAmh7FhQl5hKHffd+wQ==" + }, + "express-session": { + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.15.6.tgz", + "integrity": "sha512-r0nrHTCYtAMrFwZ0kBzZEXa1vtPVrw0dKvGSrKP4dahwBQ1BJpF2/y1Pp4sCD/0kvxV4zZeclyvfmw0B4RMJQA==", + "requires": { + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "crc": "3.4.4", + "debug": "2.6.9", + "depd": "~1.1.1", + "on-headers": "~1.0.1", + "parseurl": "~1.3.2", + "uid-safe": "~2.1.5", + "utils-merge": "1.0.1" + } + }, + "eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=" + }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" + }, + "finalhandler": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", + "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.4.0", + "unpipe": "~1.0.0" + } + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "requires": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==" + }, + "hosted-git-info": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==" + }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, + "i": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/i/-/i-0.3.6.tgz", + "integrity": "sha1-2WyScyB28HJxG2sQ/X1PZa2O4j0=" + }, + "iconv-lite": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "ipaddr.js": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", + "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=" + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "kareem": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.0.tgz", + "integrity": "sha512-6hHxsp9e6zQU8nXsP+02HGWXwTkOEw6IROhF2ZA28cYbUk4eJ6QbtZvdqZOdD9YPKghG3apk5eOCvs+tLl3lRg==" + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "^1.0.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "locus": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/locus/-/locus-2.0.1.tgz", + "integrity": "sha1-V4WjrAEXoJYWY/ZaljVu3GkAC1A=", + "requires": { + "bindings": "^1.2.1", + "cardinal": "^1.0.0", + "cli-color": "^1.0.0", + "deasync": "^0.1.0", + "escope": "^3.6.0", + "esprima": "^3.1.3", + "estraverse": "^4.2.0", + "lodash": "^4.17.3", + "md5": "^2.2.1", + "parse-stack": "^0.1.4", + "prompt": "^0.2.14", + "readline-history": "^1.2.0" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" + }, + "lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM=", + "requires": { + "es5-ext": "~0.10.2" + } + }, + "md5": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/md5/-/md5-2.2.1.tgz", + "integrity": "sha1-U6s41f48iJG6RlMp6iP6wFQBJvk=", + "requires": { + "charenc": "~0.0.1", + "crypt": "~0.0.1", + "is-buffer": "~1.1.1" + } + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "memoizee": { + "version": "0.4.14", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.14.tgz", + "integrity": "sha512-/SWFvWegAIYAO4NQMpcX+gcra0yEZu4OntmUdrBaWrJncxOqAziGFlHxc7yjKVK2uu3lpPW27P27wkR82wA8mg==", + "requires": { + "d": "1", + "es5-ext": "^0.10.45", + "es6-weak-map": "^2.0.2", + "event-emitter": "^0.3.5", + "is-promise": "^2.1", + "lru-queue": "0.1", + "next-tick": "1", + "timers-ext": "^0.1.5" + } + }, + "memory-pager": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", + "optional": true + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" + }, + "mime-db": { + "version": "1.37.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.37.0.tgz", + "integrity": "sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg==" + }, + "mime-types": { + "version": "2.1.21", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.21.tgz", + "integrity": "sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg==", + "requires": { + "mime-db": "~1.37.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "requires": { + "minimist": "0.0.8" + } + }, + "mongodb": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.1.10.tgz", + "integrity": "sha512-Uml42GeFxhTGQVml1XQ4cD0o/rp7J2ROy0fdYUcVitoE7vFqEhKH4TYVqRDpQr/bXtCJVxJdNQC1ntRxNREkPQ==", + "requires": { + "mongodb-core": "3.1.9", + "safe-buffer": "^5.1.2" + } + }, + "mongodb-core": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-3.1.9.tgz", + "integrity": "sha512-MJpciDABXMchrZphh3vMcqu8hkNf/Mi+Gk6btOimVg1XMxLXh87j6FAvRm+KmwD1A9fpu3qRQYcbQe4egj23og==", + "requires": { + "bson": "^1.1.0", + "require_optional": "^1.0.1", + "safe-buffer": "^5.1.2", + "saslprep": "^1.0.0" + } + }, + "mongoose": { + "version": "5.4.8", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.4.8.tgz", + "integrity": "sha512-2wgBi1LBxL/pcG0nNP8zXBLRmWZFzg8pb2MH4JkMPIxP/HGtQQEP0DbG1Yzy+Igsp3M1+V/59uXW37O2Fg5mBQ==", + "requires": { + "async": "2.6.1", + "bson": "~1.1.0", + "kareem": "2.3.0", + "mongodb": "3.1.10", + "mongodb-core": "3.1.9", + "mongoose-legacy-pluralize": "1.0.2", + "mpath": "0.5.1", + "mquery": "3.2.0", + "ms": "2.0.0", + "regexp-clone": "0.0.1", + "safe-buffer": "5.1.2", + "sliced": "1.0.1" + } + }, + "mongoose-legacy-pluralize": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz", + "integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==" + }, + "mpath": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.5.1.tgz", + "integrity": "sha512-H8OVQ+QEz82sch4wbODFOz+3YQ61FYz/z3eJ5pIdbMEaUzDqA268Wd+Vt4Paw9TJfvDgVKaayC0gBzMIw2jhsg==" + }, + "mquery": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.0.tgz", + "integrity": "sha512-qPJcdK/yqcbQiKoemAt62Y0BAc0fTEKo1IThodBD+O5meQRJT/2HSe5QpBNwaa4CjskoGrYWsEyjkqgiE0qjhg==", + "requires": { + "bluebird": "3.5.1", + "debug": "3.1.0", + "regexp-clone": "0.0.1", + "safe-buffer": "5.1.2", + "sliced": "1.0.1" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "multer": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/multer/-/multer-1.4.1.tgz", + "integrity": "sha512-zzOLNRxzszwd+61JFuAo0fxdQfvku12aNJgnla0AQ+hHxFmfc/B7jBVuPr5Rmvu46Jze/iJrFpSOsD7afO8SDw==", + "requires": { + "append-field": "^1.0.0", + "busboy": "^0.2.11", + "concat-stream": "^1.5.2", + "mkdirp": "^0.5.1", + "object-assign": "^4.1.1", + "on-finished": "^2.3.0", + "type-is": "^1.6.4", + "xtend": "^4.0.0" + } + }, + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" + }, + "ncp": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/ncp/-/ncp-0.4.2.tgz", + "integrity": "sha1-q8xsvT7C7Spyn/bnwfqPAXhKhXQ=" + }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" + }, + "node-addon-api": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.6.2.tgz", + "integrity": "sha512-479Bjw9nTE5DdBSZZWprFryHGjUaQC31y1wHo19We/k0BZlrmhqQitWoUL0cD8+scljCbIUL+E58oRDEakdGGA==" + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz", + "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "requires": { + "lcid": "^1.0.0" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "requires": { + "error-ex": "^1.2.0" + } + }, + "parse-stack": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/parse-stack/-/parse-stack-0.1.4.tgz", + "integrity": "sha1-UpXe24Mg0NnEoEtG1bjQ+X1Knj4=" + }, + "parseurl": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" + }, + "passport": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/passport/-/passport-0.4.0.tgz", + "integrity": "sha1-xQlWkTR71a07XhgCOMORTRbwWBE=", + "requires": { + "passport-strategy": "1.x.x", + "pause": "0.0.1" + } + }, + "passport-local": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/passport-local/-/passport-local-1.0.0.tgz", + "integrity": "sha1-H+YyaMkudWBmJkN+O5BmYsFbpu4=", + "requires": { + "passport-strategy": "1.x.x" + } + }, + "passport-strategy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/passport-strategy/-/passport-strategy-1.0.0.tgz", + "integrity": "sha1-tVOaqPwiWj0a0XlHbd8ja0QPUuQ=" + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "pause": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz", + "integrity": "sha1-HUCLP9t2kjuVQ9lvtMnf1TXZy10=" + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "requires": { + "pinkie": "^2.0.0" + } + }, + "pkginfo": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.4.1.tgz", + "integrity": "sha1-tUGO8EOd5UJfxJlQQtztFPsqhP8=" + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" + }, + "prompt": { + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/prompt/-/prompt-0.2.14.tgz", + "integrity": "sha1-V3VPZPVD/XsIRXB8gY7OYY8F/9w=", + "requires": { + "pkginfo": "0.x.x", + "read": "1.0.x", + "revalidator": "0.1.x", + "utile": "0.2.x", + "winston": "0.8.x" + } + }, + "proxy-addr": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", + "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.8.0" + } + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "random-bytes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz", + "integrity": "sha1-T2ih3Arli9P7lYSMMDJNt11kNgs=" + }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" + }, + "raw-body": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", + "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.3", + "iconv-lite": "0.4.23", + "unpipe": "1.0.0" + } + }, + "read": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", + "integrity": "sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ=", + "requires": { + "mute-stream": "~0.0.4" + } + }, + "read-input": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/read-input/-/read-input-0.3.1.tgz", + "integrity": "sha1-WzFpMIATRk/9puyS5Y0tPOqUjfE=" + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "readline-history": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/readline-history/-/readline-history-1.2.0.tgz", + "integrity": "sha1-9nBUOyzpASFH/pkD+D0cGJwX0zM=" + }, + "redeyed": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-1.0.1.tgz", + "integrity": "sha1-6WwZO0DAgWsArshCaY5hGF5VSYo=", + "requires": { + "esprima": "~3.0.0" + }, + "dependencies": { + "esprima": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.0.0.tgz", + "integrity": "sha1-U88kes2ncxPlUcOqLnM0LT+099k=" + } + } + }, + "regexp-clone": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-0.0.1.tgz", + "integrity": "sha1-p8LgmJH9vzj7sQ03b7cwA+aKxYk=" + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" + }, + "require_optional": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", + "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==", + "requires": { + "resolve-from": "^2.0.0", + "semver": "^5.1.0" + } + }, + "resolve": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", + "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", + "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" + }, + "revalidator": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/revalidator/-/revalidator-0.1.8.tgz", + "integrity": "sha1-/s5hv6DBtSoga9axgZgYS91SOjs=" + }, + "rewire": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/rewire/-/rewire-2.5.2.tgz", + "integrity": "sha1-ZCfee3/u+n02QBUH62SlOFvFjcc=" + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "saslprep": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.2.tgz", + "integrity": "sha512-4cDsYuAjXssUSjxHKRe4DTZC0agDwsCqcMqtJAQPzC74nJ7LfAJflAtC1Zed5hMzEQKj82d3tuzqdGNRsLJ4Gw==", + "optional": true, + "requires": { + "sparse-bitfield": "^3.0.3" + } + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" + }, + "send": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" + } + }, + "serve-static": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", + "send": "0.16.2" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + }, + "sliced": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", + "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" + }, + "sparse-bitfield": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", + "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", + "optional": true, + "requires": { + "memory-pager": "^1.0.2" + } + }, + "spdx-correct": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==" + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz", + "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==" + }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" + }, + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + }, + "streamsearch": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz", + "integrity": "sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo=" + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "requires": { + "is-utf8": "^0.2.0" + } + }, + "syntax-error": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", + "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", + "requires": { + "acorn-node": "^1.2.0" + } + }, + "timers-ext": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", + "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", + "requires": { + "es5-ext": "~0.10.46", + "next-tick": "1" + } + }, + "type-is": { + "version": "1.6.16", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", + "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.18" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" + }, + "uid-safe": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", + "integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==", + "requires": { + "random-bytes": "~1.0.0" + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "utile": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/utile/-/utile-0.2.1.tgz", + "integrity": "sha1-kwyI6ZCY1iIINMNWy9mncFItkNc=", + "requires": { + "async": "~0.2.9", + "deep-equal": "*", + "i": "0.3.x", + "mkdirp": "0.x.x", + "ncp": "0.4.x", + "rimraf": "2.x.x" + }, + "dependencies": { + "async": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=" + } + } + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=" + }, + "winston": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/winston/-/winston-0.8.3.tgz", + "integrity": "sha1-ZLar9M0Brcrv1QCTk7HY6L7BnbA=", + "requires": { + "async": "0.2.x", + "colors": "0.6.x", + "cycle": "1.0.x", + "eyes": "0.1.x", + "isstream": "0.1.x", + "pkginfo": "0.3.x", + "stack-trace": "0.0.x" + }, + "dependencies": { + "async": { + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", + "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=" + }, + "pkginfo": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz", + "integrity": "sha1-Wyn2qB9wcXFC4J52W76rl7T4HiE=" + } + } + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + }, + "yargs": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz", + "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=", + "requires": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^5.0.0" + } + }, + "yargs-parser": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz", + "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=", + "requires": { + "camelcase": "^3.0.0" + } + } + } +} diff --git a/fall2018/Ankit Ojha/saarthi/package.json b/fall2018/Ankit Ojha/saarthi/package.json new file mode 100644 index 0000000..db4124e --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/package.json @@ -0,0 +1,31 @@ +{ + "name": "saarthi", + "version": "1.0.0", + "description": "Indian WikiHow", + "main": "app.js", + "scripts": { + "start": "node app.js", + "dev": "nodemon app.js" + }, + "author": "Kartike Dutta Udit Makkar Ankit Ojha", + "license": "MIT", + "dependencies": { + "bcryptjs": "^2.4.3", + "body-parser": "^1.18.3", + "connect-flash": "^0.1.1", + "crypto": "^1.0.1", + "ejs": "^2.6.1", + "ejs-lint": "^0.3.0", + "express": "^4.16.4", + "express-ejs-layouts": "^2.5.0", + "express-session": "^1.15.6", + "locus": "^2.0.1", + "mongoose": "^5.4.8", + "multer": "^1.4.1", + "passport": "^0.4.0", + "passport-local": "^1.0.0" + }, + "engines": { + "node": "10.x" + } +} diff --git a/fall2018/Ankit Ojha/saarthi/public/css/banner-slider.css b/fall2018/Ankit Ojha/saarthi/public/css/banner-slider.css new file mode 100644 index 0000000..a2f27b1 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/css/banner-slider.css @@ -0,0 +1,94 @@ +.main-slider{ + box-sizing: border-box; + font-family: Verdana, sans-serif; + margin:0px; +} +.main-slider .slideshow-container .mySlides {display: none} +.main-slider img {vertical-align: middle;} + +/* Slideshow container */ +.main-slider .slideshow-container{ + max-width: 100%; + position: relative; + margin-top:20px !important; + margin: auto; +} + +/* Next & previous buttons */ +.main-slider .slideshow-container .prev, .main-slider .slideshow-container .next { + cursor: pointer; + position: absolute; + top: 50%; + width: auto; + padding: 16px; + margin-top: -22px; + color:#000; + font-weight: bold; + font-size: 18px; + transition: 0.6s ease; + border-radius: 0 3px 3px 0; + user-select: none; +} + +/* Position the "next button" to the right */ + .main-slider .slideshow-container .next { + right: 0; + border-radius: 3px 0 0 3px; +} + +/* On hover, add a black background color with a little bit see-through */ +.main-slider .slideshow-container .prev:hover, .main-slider .slideshow-container .next:hover { + background-color: rgba(0,0,0,0.8); +} + +/* Caption text */ +.main-slider .slideshow-container div.text { + color: #f2f2f2; + font-size: 15px; + padding: 8px 12px; + position: absolute; + bottom: 8px; + width: 100%; + text-align: center; +} + + + +/* The dots/bullets/indicators */ +.main-slider .dot { + cursor: pointer; + height: 15px; + width: 15px; + margin: 0 2px; + background-color: #bbb; + border-radius: 50%; + display: inline-block; + transition: background-color 0.6s ease; +} + +.main-slider .dot:hover,.main-slider .active { + background-color: #717171; +} + +/* Fading animation */ +.main-slider .slideshow-container .fade { + -webkit-animation-name: fade; + -webkit-animation-duration: 1.5s; + animation-name: fade; + animation-duration: 1.5s; +} + +@-webkit-keyframes fade { + from {opacity: .3} + to {opacity: 1} +} + +@keyframes fade { + from {opacity: .3} + to {opacity: 1} +} + +/* On smaller screens, decrease text size */ +@media only screen and (max-width: 300px) { + .main-slider .slideshow-container .prev, .main-slider .slideshow-container .next,.main-slider .slideshow-container div.text {font-size: 11px} +} \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/public/css/check-radio.css b/fall2018/Ankit Ojha/saarthi/public/css/check-radio.css new file mode 100644 index 0000000..65fb77c --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/css/check-radio.css @@ -0,0 +1,164 @@ +/****************/ + +/*******************styling of check boxes**************/ +/*check-box container*/ +.check-container { + display: block; + position: relative; + padding-left: 35px; + margin-bottom: 12px; + cursor: pointer; + font-size: 22px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +/* Hide the browser's default checkbox */ +.check-container input { + position: absolute; + opacity: 0; + cursor: pointer; + height: 0; + width: 0; +} + +/* Create a custom checkbox */ +.check-container .checkmark { + position: absolute; + top: 0; + left: 0; + height: 25px; + width: 25px; + background-color: #eee; +} + +/* On mouse-over, add a grey background color */ +.check-container:hover input~.checkmark { + background-color: #ccc; +} + +/* When the checkbox is checked, add a blue background */ +.check-container input:checked~.checkmark { + background-color: #046880; +} + +/* Create the checkmark/indicator (hidden when not checked) */ +.check-container .checkmark:after { + content: ""; + position: absolute; + display: none; +} + +.check-container input:checked~.checkmark:after { + display: block; +} + +/* Style the checkmark/indicator */ +.check-container .checkmark:after { + left: 9px; + top: 5px; + width: 5px; + height: 10px; + border: solid white; + border-width: 0 3px 3px 0; + -webkit-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} +/**********************************/ + +/****styling of radio button*********/ + +/* The container */ +.radio-container { + display: block; + position: relative; + padding-left: 35px; + margin-bottom: 12px; + cursor: pointer; + font-size: 22px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +/* Hide the browser's default radio button */ +.radio-container input { + position: absolute; + opacity: 0; + cursor: pointer; +} + +/* Create a custom radio button */ +.radio-container .checkmark { + position: absolute; + top: 0; + left: 0; + height: 25px; + width: 25px; + background-color: #eee; + border-radius: 50%; +} + +/* On mouse-over, add a grey background color */ +.radio-container:hover input ~ .checkmark { + background-color: #ccc; +} + +/* When the radio button is checked, add a blue background */ +.radio-container input:checked ~ .checkmark { + background-color: #2196F3; +} + +/* Create the indicator (the dot/circle - hidden when not checked) */ +.radio-container .checkmark:after { + content: ""; + position: absolute; + display: none; +} + +/* Show the indicator (dot/circle) when checked */ +.radio-container input:checked ~ .checkmark:after { + display: block; +} + +/* Style the indicator (dot/circle) */ +.radio-container .checkmark:after { + top: 9px; + left: 9px; + width: 8px; + height: 8px; + border-radius: 50%; + background: white; +} +/************************/ + +/*.sarthi-form button style*/ +.primary-btn { + width: 100%; + margin-bottom: 1.3rem; + border-radius: 2px; +} + +.primary-btn { + padding: 0.7rem 1rem; + height: 2.7rem; + display: block; + border: 0; + font-weight: 500; + background: #046880; + color: #fff; + text-decoration: none; + cursor: pointer; + text-align: center; + transition: all 0.5s; +} + +.primary-btn:hover { + background: #ffffff; + border: 1px solid #046880; + color: #046880; +} \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/public/css/flickity.css b/fall2018/Ankit Ojha/saarthi/public/css/flickity.css new file mode 100644 index 0000000..7f8acc8 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/css/flickity.css @@ -0,0 +1,138 @@ +/*! Flickity v2.2.0 +https://flickity.metafizzy.co +---------------------------------------------- */ + +.flickity-enabled { + position: relative; +} + +.flickity-enabled:focus { outline: none; } + +.flickity-viewport { + overflow: hidden; + position: relative; + height: 100%; +} + +.flickity-slider { + position: absolute; + width: 100%; + height: 100%; +} + +/* draggable */ + +.flickity-enabled.is-draggable { + -webkit-tap-highlight-color: transparent; + tap-highlight-color: transparent; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.flickity-enabled.is-draggable .flickity-viewport { + cursor: move; + cursor: -webkit-grab; + cursor: grab; +} + +.flickity-enabled.is-draggable .flickity-viewport.is-pointer-down { + cursor: -webkit-grabbing; + cursor: grabbing; +} + +/* ---- flickity-button ---- */ + +.flickity-button { + position: absolute; + background: hsla(0, 0%, 100%, 0.75); + border: none; + color: #333; +} + +.flickity-button:hover { + background: white; + cursor: pointer; +} + +.flickity-button:focus { + outline: none; + box-shadow: 0 0 0 5px #19F; +} + +.flickity-button:active { + opacity: 0.6; +} + +.flickity-button:disabled { + opacity: 0.3; + cursor: auto; + /* prevent disabled button from capturing pointer up event. #716 */ + pointer-events: none; +} + +.flickity-button-icon { + fill: currentColor; +} + +/* ---- previous/next buttons ---- */ + +.flickity-prev-next-button { + top: 50%; + width: 44px; + height: 44px; + border-radius: 50%; + /* vertically center */ + transform: translateY(-50%); +} + +.flickity-prev-next-button.previous { left: 10px; } +.flickity-prev-next-button.next { right: 10px; } +/* right to left */ +.flickity-rtl .flickity-prev-next-button.previous { + left: auto; + right: 10px; +} +.flickity-rtl .flickity-prev-next-button.next { + right: auto; + left: 10px; +} + +.flickity-prev-next-button .flickity-button-icon { + position: absolute; + left: 20%; + top: 20%; + width: 60%; + height: 60%; +} + +/* ---- page dots ---- */ + +.flickity-page-dots { + position: absolute; + width: 100%; + bottom: -25px; + padding: 0; + margin: 0; + list-style: none; + text-align: center; + line-height: 1; +} + +.flickity-rtl .flickity-page-dots { direction: rtl; } + +.flickity-page-dots .dot { + display: inline-block; + width: 10px; + height: 10px; + margin: 0 8px; + background: #333; + border-radius: 50%; + opacity: 0.25; + cursor: pointer; +} + +.flickity-page-dots .dot.is-selected { + opacity: 1; +} diff --git a/fall2018/Ankit Ojha/saarthi/public/css/footer.css b/fall2018/Ankit Ojha/saarthi/public/css/footer.css new file mode 100644 index 0000000..6d396c2 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/css/footer.css @@ -0,0 +1,30 @@ +#footer{ + max-width: 100%; + background-color: #046880; + padding: 0px 20px; +} + +#footer .footer-container{ + background-color: black; + color: white; + text-align: center; + margin: auto; + padding:20px; +} + +#footer .footer-container .social-footer{ + margin: auto; + display: inline-block; +} + +#footer .footer-container .social-footer .social-icon{ + float: left; + margin: 10px; +} + +#footer .footer-container .social-footer .social-icon a{ + color: white; +} +#footer .footer-container .social-footer .social-icon a:hover{ + color:#00B4CC; +} \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/public/css/fresh-slider.css b/fall2018/Ankit Ojha/saarthi/public/css/fresh-slider.css new file mode 100644 index 0000000..1168494 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/css/fresh-slider.css @@ -0,0 +1,132 @@ +.fresh-slider{ + font-family: Verdana, sans-serif; + margin-top: 10px; + box-sizing: border-box +} + +.fresh-slider .fresh-slides { + display: none; +} + +.fresh-slider img { + vertical-align: middle; +} + +/* Slideshow container */ +.fresh-slider .slideshow-container { + max-width: 100%; + position: relative; + margin: auto; +} + +/* Next & previous buttons */ +.fresh-slider .slideshow-container .prev, +.fresh-slider .slideshow-container .next { + cursor: pointer; + position: absolute; + bottom: 2%; + right: 5%; + width: auto; + padding: 16px; + margin-top: -22px; + color: #000; + font-weight: bold; + font-size: 20px; + transition: 0.6s ease; + border-radius: 0 3px 3px 0; + user-select: none; +} + +/* Position the "next button" to the right */ +.fresh-slider .slideshow-container .next { + right: 0; + border-radius: 3px 0 0 3px; +} + +/* On hover, add a black background color with a little bit see-through */ +.fresh-slider .slideshow-container .prev:hover, +.fresh-slider .slideshow-container .next:hover { + /*background-color: rgba(0, 0, 0, 0.8);*/ + color:#fff; +} + +/*article bammer*/ +.article-banner { + display: grid; + grid-template-columns: 1fr 2fr; + background-color: #046880; +} + +/*article content*/ +.article-banner-content h3{ + font-size: 2.1em !important; + border-bottom: 2px solid #fff; + line-height: 1.15385; + margin-top: 0; + margin-bottom: .5rem; + font-family: 'Noto Serif SC', serif; + font-weight:bold; + font-style: normal; + text-transform: uppercase; + color: white; + text-rendering: optimizeLegibility; +} +.article-banner-content p{ + padding: 5px; + color: ghostwhite; + font-family:europa; + font-weight: normal; + font-style: normal; + font-size: 1.4em; + letter-spacing: 0em; + line-height: 1.15385em; + text-decoration: none; + text-transform: none; + text-rendering: optimizeLegibility; +} + +/*article image*/ +.article-banner-img > img{ + display:block; + max-width: 100%; + height: auto; +} + + +/* On smaller screens, decrease text size */ + +@media only screen and (max-width: 500px) { + + .fresh-slider .slideshow-container .prev, + .fresh-slider .slideshow-container .next, + .fresh-slider .slideshow-container .text { + font-size: 11px + } + + .article-banner-content h3{ + font-size: 1.1em !important; + border-bottom: 1px solid #fff; + line-height: 1.15385; + margin-top: 0; + margin-bottom: .5rem; + font-family: 'Noto Serif SC', serif; + font-weight: normal; + font-style: normal; + text-transform: uppercase; + color: white; + text-rendering: optimizeLegibility; + } + .article-banner-content p{ + padding: 2px; + color: ghostwhite; + font-family:europa; + font-weight: normal; + font-style: normal; + font-size: 1em; + letter-spacing: 0em; + line-height: 1.15385em; + text-decoration: none; + text-transform: none; + text-rendering: optimizeLegibility; + } +} \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/public/css/grid-list.css b/fall2018/Ankit Ojha/saarthi/public/css/grid-list.css new file mode 100644 index 0000000..f62f394 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/css/grid-list.css @@ -0,0 +1,132 @@ +.grid-list { + display: grid; + grid-template-columns: repeat(3, 1fr); + grid-gap: .5em; + padding: 10px; +} + +.grid-list .grid-item { + margin: 0; + padding: 0; + position: relative; + justify-self: center; + border: 1px solid #000; + box-shadow: 2px 3px #000; +} + +.grid-list .grid-item img { + display: block; + max-width: 100%; + height: auto; +} + +.grid-list .grid-item .img-caption { + position: absolute; + top: .1em; + bottom: .1em; + right: .1em; + left: .1em; + margin: 2px; + background: rgba(0, 0, 0, 0.7); + color: #0b2027; + display: flex; + align-items: center; + justify-content: center; + opacity: 0; + transition: opacity ease-in-out 300ms; +} + +.grid-list .grid-item:hover .img-caption { + opacity: 1; +} + +.grid-list .grid-item .img-caption a { + padding: 5px; + border-radius: 30px; + cursor: pointer; + border: 1px #d60638 solid; + font-weight: 600; + text-align: center; + background-color: #d60638; + color: #fff; +} + +/**************************8*/ + +@media(min-width: 900px) { + + /*grid layout when screen size is above 900px*/ + .grid-list { + grid-template-columns: repeat(auto-fit, minmax(15em, 1fr)); + } +} + +.grid-list { + display: grid; + grid-template-columns: repeat(3, 1fr); + grid-gap: .5em; + padding: 10px; +} + +.grid-list .grid-item { + margin: 0; + padding: 0; + position: relative; + justify-self: center; + border: 1px solid #000; + box-shadow: 2px 3px #000; +} + +.grid-list .grid-item img { + display: block; + max-width: 100%; + height: auto; +} + +.grid-list .grid-item .img-caption { + position: absolute; + top: .1em; + bottom: .1em; + right: .1em; + left: .1em; + margin: 2px; + background: rgba(0, 0, 0, 0.7); + color: #0b2027; + display: flex; + align-items: center; + justify-content: center; + opacity: 0; + transition: opacity ease-in-out 300ms; +} + +.grid-list .grid-item:hover .img-caption { + opacity: 1; +} + +.grid-list .grid-item .img-caption a { + padding: 5px; + border-radius: 30px; + cursor: pointer; + border: 1px #d60638 solid; + font-weight: 600; + text-align: center; + background-color: #d60638; + color: #fff; +} + +/**************************8*/ + +@media(min-width: 900px) { + + /*grid layout when screen size is above 900px*/ + .grid-list { + grid-template-columns: repeat(auto-fit, minmax(15em, 1fr)); + } +} + +@media screen and (max-width:900px){ + .grid-list .grid-item .img-caption a { + padding: 1px; + font-size: 10px; + } +} \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/public/css/language-selector.css b/fall2018/Ankit Ojha/saarthi/public/css/language-selector.css new file mode 100644 index 0000000..fae503c --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/css/language-selector.css @@ -0,0 +1,96 @@ +.wrapper-dropdown-1 { + /* Size and position */ + position: relative; /* Enable absolute positionning for children and pseudo elements */ + width: 200px; + padding: 10px; + margin: 10px auto; + + /* Styles */ + background: #d60638; + color: #fff; + outline: none; + cursor: pointer; + + /* Font settings */ + font-weight: bold; +} + +.wrapper-dropdown-1:after { + content: ""; + width: 0; + height: 0; + position: absolute; + right: 16px; + top: 50%; + margin-top: -6px; + border-width: 6px 0 6px 6px; + border-style: solid; + border-color: transparent #fff; +} + +.wrapper-dropdown-1 .dropdown { + /* Size & position */ + position: absolute; + top: 100%; + left: 0; + right: 0; + + /* Styles */ + background: #fff; + list-style: none; + font-weight: normal; /* Cancels previous font-weight: bold; */ + + /* Hiding */ + opacity: 0; + pointer-events: none; +} + +.wrapper-dropdown-1 .dropdown li a { + display: block; + text-decoration: none; + color: #000; + padding: 10px 20px; +} + +/* Hover state */ +.wrapper-dropdown-1 .dropdown li:hover a { + background:#d60638 ; + color:#ffffff; +} + +/* Active state */ +.wrapper-dropdown-1.active .dropdown { + opacity: 1; + pointer-events: auto; +} + +.wrapper-dropdown-1.active:after { + border-color:#fff transparent; + border-width: 6px 6px 0 6px ; + margin-top: -3px; +} + +.wrapper-dropdown-1.active { + background: #d60638; + background: -moz-linear-gradient(left, #d60638 0%, #d60638 78%, #d60638 78%, #d60638 100%); + background: -webkit-gradient(linear, left top, right top, color-stop(0%,#9bc7de), color-stop(78%,#d60638), color-stop(78%#d60638), color-stop(100%,#d60638)); + background: -webkit-linear-gradient(left, #d60638 0%,#d60638 78%,#d60638 78%,#d60638 100%); + background: -o-linear-gradient(left, #d60638 0%,#d60638 78%,#d60638 78%,#d60638 100%); + background: -ms-linear-gradient(left, #d60638 0%,#d60638 78%,#d60638 78%,#d60638 100%); + background: linear-gradient(to right, #d60638 0%,#d60638 78%,#d60638 78%,#d60638 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#9bc7de', endColorstr='#ffffff',GradientType=1 ); +} + +/* No CSS3 support */ + +.no-opacity .wrapper-dropdown-1 .dropdown, +.no-pointerevents .wrapper-dropdown-1 .dropdown { + display: none; + opacity: 1; /* If opacity support but no pointer-events support */ + pointer-events: auto; /* If pointer-events support but no pointer-events support */ +} + +.no-opacity .wrapper-dropdown-1.active .dropdown, +.no-pointerevents .wrapper-dropdown-1.active .dropdown { + display: block; +} \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/public/css/log-in.css b/fall2018/Ankit Ojha/saarthi/public/css/log-in.css new file mode 100644 index 0000000..b374f1d --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/css/log-in.css @@ -0,0 +1,243 @@ +@import url('https://fonts.googleapis.com/css?family=Roboto:300|Anton'); + +* { + box-sizing: border-box; +} + +body { + font-family: 'Roboto', sans-serif; + font-weight: 300; + background: #ffffff; + color: #000; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + font-weight: 300; +} +#header{ + display: flex; + flex-direction:row; +} + +#left-header{ + display: flex; + flex-direction: column; + flex: 1; + align-items: flex-end; + justify-content: flex-start; + height: auto; +} +#left-header h1{ + font-family: 'Anton'; + color: #16406d; +} +#right-header h1{ + font-family: 'Anton'; + color: #16406d; +} +#right-header{ + flex: 1; +} + +#wrapper { + display: flex; + flex-direction:row; +} + +#left { + display: flex; + flex-direction: column; + flex: 1; + align-items: center; + justify-content: flex-start; + height: auto; +} + +#right { + flex: 1; +} + +/* Sign In */ +#signin { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + width: 80%; + padding-bottom: 1rem; +} + +#signin form { + width: 60%; + padding-bottom: 3rem; +} + +#signin .logo { + margin-bottom: 0vh; +} + +#signin .logo img { + width: 160px; +} + +#signin label { + font-size: 0.9rem; + line-height: 2rem; + font-weight: 500; +} + +#signin .text-input { + margin-bottom: 1.3rem; + width: 100%; + border-radius: 2px; + border-radius: 2px; + background: #ffffff; + border: 1px solid #000; + color: #000; + padding: 0.5rem 1rem; + line-height: 1.3rem; +} + +#signin .primary-btn { + width: 100%; + margin-bottom: 1.3rem; +} + +#signin .secondary-btn, +.or, +.links { + width: 100%; +} + +#signin .links a { + display: block; + color: #fff; + text-decoration: none; + margin-bottom: 1rem; + text-align: center; + font-size: 0.9rem; +} + +#signin .or { + display: flex; + flex-direction: row; + margin-bottom: 1.2rem; + align-items: center; +} + +#signin .or .bar { + flex: auto; + border: none; + height: 1px; + background: #aaa; +} + +#signin .or span { + color: #ccc; + padding: 0 0.8rem; +} + +/* Showcase */ +#showcase { + display: flex; + justify-content: center; + align-items: center; + background: url('../images/Sarthi-signin-side.jpg') no-repeat center center / cover; + height: 100vh; + text-align: center; +} + +#showcase .secondary-btn { + width: 100%; + margin-top: 16rem; + margin-left: 1rem; +} +#showcase .secondary-btn:hover { + border-color: #fff; + background-color: #ffffff; + color: #000000; +} +/* Footer */ + + +/* Button */ +.primary-btn { + padding: 0.7rem 1rem; + height: 2.7rem; + display: block; + border: 0; + border-radius: 2px; + font-weight: 500; + background: #d05c69; + color: #fff; + text-decoration: none; + cursor: pointer; + text-align: center; + transition: all 0.5s; +} + +.primary-btn:hover { + background: #ffffff; + border: 1px solid #d05c69; + color:#d05c69; +} + +.secondary-btn { + padding: 0.7rem 0.5rem; + height: 2.7rem; + display: block; + border: 1px solid #000; + border-radius: 2px; + font-weight: 500; + background: none; + color: #000; + text-decoration: none; + cursor: pointer; + text-align: center; + transition: all 0.5s; +} + +.secondary-btn:hover { + border-color: #d05c69; + color: #d05c69; +} + +/* Media Queries */ +@media (min-width: 1200px) { + #left { + flex: 6; + } + + #right { + flex: 4; + } +} + +@media (max-width: 800px) { + body { + overflow: auto; + } + + #right { + display: none; + } + + #left { + justify-content: start; + margin-top: 4vh; + } + + #signin .logo { + margin-bottom: 2vh; + } + + #signin .text-input { + margin-bottom: 0.7rem; + } + +} \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/public/css/main.css b/fall2018/Ankit Ojha/saarthi/public/css/main.css new file mode 100644 index 0000000..d4581a3 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/css/main.css @@ -0,0 +1,12 @@ +.block { + display: block; +} +input { + width: 50%; + display: inline-block; +} +span { + display: inline-block; + cursor: pointer; + text-decoration: underline; +} \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/public/css/nav-bar.css b/fall2018/Ankit Ojha/saarthi/public/css/nav-bar.css new file mode 100644 index 0000000..ffb79ea --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/css/nav-bar.css @@ -0,0 +1,140 @@ +* { + box-sizing: border-box; +} + +body { + margin: 0px; + font-family: 'segoe ui'; + font-family: 'Open Sans', sans-serif; +} + +.nav { + height: 52px; + width: 100%; + background-color: #046880; + position: relative; +} + +.nav > .nav-header { + display: inline-block; +} + + +.nav .nav-header .nav-title a>.nav-logo{ + display: inline-block; + width:180px; + height:50px; + cursor: pointer; + margin-left:10px ; +} + + +.nav > .nav-btn { + display: none; +} + +.nav > .nav-links { + display: inline; + float: right; + background-color: #046880; + font-size: 20px; +} + +.nav > .nav-links > a { + display: inline-block; + padding: 13px 10px 13px 10px; + text-decoration: none; + color: #efefef; +} + +.nav > .nav-links > a:hover { + background-color: rgba(0, 0, 0, 0.3); + border-radius: 30px; +} + +.nav > #nav-check { + display: none; +} + +.nav .nav-links form{ +display: inline; +} +.nav > .nav-links .search { + display:inline-block; + margin-top:5px; + margin-left:5px; +} + +.nav > .nav-links .search .searchTerm { + float:left; + border:3px solid #00B4CC; + width: 250px; + padding:10px; + border-radius:30px; + outline:none; + color:#000; +} + +.nav > .nav-links .search .searchTerm:focus{ + color: #00B4CC; +} + +.nav > .nav-links .search .searchButton { + width:40px; + height:40px; + border:1px solid #00B4CC; + background-color:#00b4CC; + text-align:center; + color:#fff; + border-radius:20px; + cursor:pointer; + font-size:20px; +} + + +@media (max-width:900px) { + .nav > .nav-btn { + display: inline-block; + position: absolute; + right: 0px; + top: 0px; + } + .nav > .nav-btn > label { + display: inline-block; + width: 50px; + height: 50px; + padding: 13px; + } + .nav > .nav-btn > label:hover { + background-color: rgba(0, 0, 0, 0.2); + } + .nav > .nav-btn > label > span { + display: block; + width: 25px; + height: 10px; + border-top: 2px solid #eee; + } + .nav > .nav-links { + position: absolute; + display: block; + width: 100%; + background-color:#046880; + height: 0px; + transition: all 0.3s ease-in; + overflow-y: hidden; + top: 50px; + left: 0px; + z-index: 2 !important; + } + .nav > .nav-links > a { + display: block; + width: 100%; + } + .nav > #nav-check:not(:checked) + .nav-links { + height: 0px; + } + .nav > #nav-check:checked + .nav-links { + height: calc(80vh - 50px); + overflow-y: auto; + } +} \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/public/css/profile.css b/fall2018/Ankit Ojha/saarthi/public/css/profile.css new file mode 100644 index 0000000..1d5fa0a --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/css/profile.css @@ -0,0 +1,337 @@ +@import url("https://fonts.googleapis.com/css?family=Raleway:300,400i,900|Roboto"); + +* { + margin: 0px; + padding: 0px; + box-sizing: border-box; +} + +body { + font-family: 'Raleway', sans-serif; + background-color: #ecebe8; + color: black; +} + +.page-heading { + font-size: 1.5rem !important; + line-height: 2.25rem !important; + letter-spacing: .6em; + font-weight: 600; + font-family: "Raleway", sans-serif; + border-bottom: 4px solid #fff; + color: #000; + text-align: center; + text-transform: uppercase; + margin-bottom: 10px; +} + + + +.article-card { + display: inline-block; + width: 40%; + background-color: rgb(233, 236, 236); + margin: 10px auto; + padding: 10px; + box-shadow: 0 4px 8px 0 rgb(0, 204, 255); +} + +.article-card a{ + text-decoration: none; + color: black; +} + +.secondary-btn { + margin: 10px; + border-radius: 10px; + padding: 0.5rem 0.5rem; + display: inline-block; + border: 0; + font-weight: 500; + background: #d05c69; + color: #fff; + text-decoration: none; + cursor: pointer; + text-align: center; + transition: all 0.5s; +} + +.article-card::after { + content: ''; + clear: both; +} + + +.profile-container { + display: grid; + grid-template-columns: 1fr 3fr; + grid-gap: 1em; + max-width: 100%; + width: 95%; + margin: auto; +} + +.profile-card { + background-color: white; + box-shadow: 0 5px 9px 0 rgba(0, 0, 0, 0.2); +} + +.desc-card { + background-color: white; + box-shadow: 0 5px 9px 0 rgba(0, 0, 0, 0.2); +} + +/******profile card css*********/ +.card { + max-width: 100%; + margin: auto; + text-align: center; + font-family: arial; +} + +.card .resp-img { + max-width: 100%; + height: auto; + display: block; + margin: auto; +} + +.card .user-name { + font-size: 25px; + +} + +.card .user-type { + color: rgb(0, 0, 0); + font-size: 18px; +} + +/*profile links also in media querry*/ +.card .profile-links { + display: block; + list-style: none; +} + +.card .profile-links>li { + display: block; +} + +.card .profile-links .link { + display: inline-block; + border: none; + outline: 0; + padding: 10px; + margin: 10px 0px; + border-left: 3px solid #046880; + color: #046880; + background-color: white; + text-align: center; + text-decoration: none; + cursor: pointer; + width: 100%; + font-size: 20px; +} + +.card .profile-links .link:hover { + border-left: 3px solid white; + color: white; + background-color: #046880; + transition-timing-function: ease-in; + transition: 0.6s; +} + + + +@media screen and (max-width:900px) { + + .profile-card { + grid-row: 1; + grid-column: 1/3; + border: 1px solid #000; + background-color: white; + } + + .desc-card { + grid-row: 2; + grid-column: 1/3; + border: 1px solid #000; + background-color: white; + } + + .card .profile-links>li { + display: inline; + } + + .card .profile-links .link { + display: inline-block; + width: 20%; + padding: 10px; + margin: 10px 5px; + } + +} + +/*******end of css profile card******/ + + +/**description card css*/ + +/*my profile css*/ +#my-profile { + display: block; + box-shadow: 0 4px 8px 0 rgb(4, 104, 128); + width: 80%; + margin: 20px auto; + transition-timing-function: ease-in-out; + transition: 1s; +} + +#my-profile .label { + display: inline-block; + padding: 10px; + padding-right: 0px; + margin: 10px; + margin-right: 0px; + font-family: Arial, Helvetica, sans-serif; + font-size: 20px; + font-weight: 400; +} + +#my-profile .l-text { + display: inline-block; + padding: 10px; + padding-left: 0px; + margin: 10px; + margin-left: 0px; + margin-left: 0px; + font-size: 18px; + font-weight: bold; +} + +/*end of my profile css*/ + +/*edit my profile css*/ +#edit-profile { + display: none; + box-shadow: 0 4px 8px 0 rgb(4, 104, 128); + width: 80%; + margin: 20px auto; + transition-timing-function: ease-in-out; + transition: 1s; +} + +/*end of edit my profile css*/ + + +/*edit my articles css*/ +#my-articles { + display: none; + box-shadow: 0 4px 8px 0 rgb(4, 104, 128); + width: 90%; + margin: 20px auto; + transition-timing-function: ease-in-out; + transition: 1s; +} + +/*end of my articles css*/ + +/*edit-section css*/ +#edit-section { + display: block; + box-shadow: 0 4px 8px 0 rgb(4, 104, 128); + width: 90%; + margin: 20px auto; + transition-timing-function: ease-in-out; + transition: 1s; +} + +/*end edit-section css*/ + + +/*edit my articles css*/ +#add-articles { + display: none; + box-shadow: 0 4px 8px 0 rgb(4, 104, 128); + width: 80%; + margin: 20px auto; + transition-timing-function: ease-in-out; + transition: 1s; +} + +/*end of my articles css*/ + +/*request article css*/ +#request-articles { + display: none; + box-shadow: 0 4px 8px 0 rgb(4, 104, 128); + width: 80%; + margin: 20px auto; + transition-timing-function: ease-in-out; + transition: 1s; +} + +/*end of request articles css*/ + +/*request article css*/ +#donate-section { + display: none; + box-shadow: 0 4px 8px 0 rgb(4, 104, 128); + width: 80%; + margin: 20px auto; + transition-timing-function: ease-in-out; + transition: 1s; +} + +/******************/ +.donate-container { + width: 210px; + max-width: 100%; + display: block; + margin: auto; + +} + +.donate-container .donate-logo { + padding: 20px 25px; + display: inline; + background-color: rgb(8, 8, 8); + color: rgb(255, 255, 255); + cursor: pointer; +} + +.donate-container .donate-button { + display: inline-block; + border-top-right-radius: 25px; + border-bottom-right-radius: 25px; + margin: auto; + margin-bottom: 10px; + border: none; + background-color: #046880; + padding: 20px 25px; + color: #fff; + cursor: pointer; + font-size: 20px; + font-weight: 500; + text-transform: uppercase; + -webkit-transition: all .2s ease-in-out; + transition: all .2s ease-in-out; + -webkit-perspective: 100px; + perspective: 100px; + overflow: hidden; + z-index: 2; +} + +.donate-container .donate-button:hover { + background-color: #fff; + border: 2px solid #046880; + color: #046880; +} + +.donate-container .donate-button:focus { + border: none; +} + +/*end of request articles css*/ + + +/*end of decription card css*/ \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/public/css/rating.css b/fall2018/Ankit Ojha/saarthi/public/css/rating.css new file mode 100644 index 0000000..7763935 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/css/rating.css @@ -0,0 +1,41 @@ +@import url(//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css); + +fieldset, label { margin: 0; padding: 0; } + +/****** Style Star Rating Widget *****/ + +.rating { + border: none; + float: left; + margin: 0px 30px; +} + +.rating > input { display: none; } +.rating > label:before { + margin: 5px; + font-size: 2em; + font-family: FontAwesome; + display: inline-block; + content: "\f005"; +} + +.rating > .half:before { + content: "\f089"; + position: absolute; +} + +.rating > label { + color: #ddd; + float: right; +} + +/***** CSS Magic to Highlight Stars on Hover *****/ + +.rating > input:checked ~ label, /* show gold star when clicked */ +.rating:not(:checked) > label:hover, /* hover current star */ +.rating:not(:checked) > label:hover ~ label { color: #FFD700; } /* hover previous stars in list */ + +.rating > input:checked + label:hover, /* hover current star when changing rating */ +.rating > input:checked ~ label:hover, +.rating > label:hover ~ input:checked ~ label, /* lighten current selection */ +.rating > input:checked ~ label:hover ~ label { color: #FFED85; } \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/public/css/sarthi-article.css b/fall2018/Ankit Ojha/saarthi/public/css/sarthi-article.css new file mode 100644 index 0000000..4558edb --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/css/sarthi-article.css @@ -0,0 +1,213 @@ +@import url("https://fonts.googleapis.com/css?family=Raleway:300,400i,900|Roboto"); + +*, +*::before, +*::after { + box-sizing: border-box; + margin: 0px; + padding: 0px; + +} +body{ + background-color: #ecebe8; + color: #545454; + font-family: "Roboto",sans-serif; + +} + +p{ + font-family: Arial, Helvetica, sans-serif; + font-weight: 600; +} + +.clearfix { + content: " "; + clear: both; +} + +#container{ + max-width: 95%; + padding:15px; + margin: auto; + background-color:#fff; +} + + + + +#article-section{ + width:70%; + float: left; +} + +#side-section{ + width:30%; + float: right; +} + +.page-heading{ + font-size: 1.5rem !important; + line-height: 2.25rem !important; + letter-spacing: .6em; + font-weight: 600; + font-family: "Raleway", sans-serif; + border-bottom: 4px solid #fff; + color:#000; + text-align: center; + text-transform: uppercase; + margin-bottom: 10px; +} + +/*article section*/ +.article-title{ + font-size: 2.1em !important; + line-height: 1.15385; + margin-top: 0; + margin-bottom: .5rem; + font-weight: bold; + font-style: normal; + text-align: center; + text-transform: uppercase; + color:black; + text-rendering: optimizeLegibility; + font-family: "Roboto",sans-serif; +} + +.sub-title{ + font-size: 1.8em !important; + line-height: 1.15385; + margin-top: 0; + margin-bottom: .5rem; + font-weight: bold; + font-style: normal; + text-align: center; + text-transform: uppercase; + color:black; + text-rendering: optimizeLegibility; + font-family: "Roboto",sans-serif; +} + +.article-author{ + display: inline-block; + margin: .7em 0; + font-size: .85em; + line-height: 1em; + text-transform:uppercase; + background-color: inherit; + padding: 5px; +} + +.article-category{ + display: inline-block; + margin: .7em 0; + font-size: .85em; + line-height: 1em; + text-transform:uppercase; + background-color: inherit; + padding: 5px; +} + +.step{ + margin: 20px 10px; + box-shadow: 3px 4px; + border: 2px solid #046880; +} + +.step .step-title{ + width: 100%; + position: sticky; + top: 0; + z-index: 1; + font-weight:bold; + background-color:#046880; + color: #fff; +} + +.step .step-title .step-no{ + display: inline-block; + width: 60px; + margin: 0px 10px 10px 10px; + line-height:19px; + text-align: center; + color: #000; + background-color: #fff; +} + +.step .step-title .step-title-text{ + text-align: center; +} + +.step .step-img{ + width: 500PX; + height:auto; + margin: auto; +} + +.step .step-img .aimg-resp{ + max-width: 100%; + height: auto; +} + +.step .step-description{ + margin: 10px; + padding: 10px; + line-height:25px; +} + +.step .step-description .bold-text{ + margin-left:10px; + font-size: 20px; + line-height: 25px !important; + color: #545454; + text-transform: capitalize; + font-weight: 700; +} +/*******end of article section********/ + +/*side-section*/ +#rating-container{ + margin: 2rem 0rem; +} +#rating-container .current-rating{ + margin: 0px 10px; + padding: 10px; + text-align: center; + text-rendering: optimizeLegibility; +} + +#rating-container .current-rating .cr-box{ + display: inline-block; + width: 60px; + padding: 5px; + text-align: center; + background-color:#046880; + color: #fff; +} + +#language-container{ + margin: 2rem 0rem; +} + +#request-container{ + margin: 2rem 0rem; +} +/***end of side-section**/ + + +@media screen and (max-width:900px){ + #article-section{ + width:100%; + float: none; + } + + #side-section{ + width:100%; + float: none; + } + + .step .step-img{ + width: 100%; + height:auto; + margin: auto; + } +} \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/public/css/sarthi-explorer.css b/fall2018/Ankit Ojha/saarthi/public/css/sarthi-explorer.css new file mode 100644 index 0000000..511834a --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/css/sarthi-explorer.css @@ -0,0 +1,160 @@ +@import url("https://fonts.googleapis.com/css?family=Raleway:300,400i,900|Roboto"); + +*, +*::before, +*::after { + box-sizing: border-box; + margin: 0px; + padding: 0px; + +} + +body { + background-color:#fff; +} + +.clearfix { + content: " "; + clear: both; +} + +#explorer-layout { + font-family: "Roboto", sans-serif; + font-weight: 300; + line-height: 1.6; + max-width: 98%; + margin: auto; + margin: 20px; +} + +#category-section { + background-color:#cbdfe2; + margin: 10px 0px; +} + +#trending-section { + background-color:#cbdfe2; + margin: 10px 0px; +} + +#fresh-section { + background-color:#cbdfe2; + margin: 10px 0px; +} + +#request-section { + width: 45%; + background-color:#cbdfe2; + margin: 10px 0px; + float: left; + overflow: auto; +} + +#donate-section { + width: 45%; + background-color:#cbdfe2; + margin: 10px 0px; + float: right; + overflow: auto; +} + +/*for setting the width of slider in explorer page*/ +.slider-wrapper { + max-width: 80%; + margin: auto; +} + +/******/ + + +/*for heading of each sectiom*/ +.section-heading1 { + font-size: 1.5rem !important; + line-height: 2.25rem !important; + letter-spacing: .6em; + font-weight: 600; + font-family: "Raleway", sans-serif; + border-bottom: 4px solid #fff; + color:#000; + text-align: center; + text-transform: uppercase; + margin-bottom: 10px; +} + +.section-subheading +{ + font-family: "Roboto", sans-serif; + font-size: 1rem !important; + font-weight: 100; + line-height: .9em; + display: block; + letter-spacing: normal; + margin-top: 5px; +} +/******************/ +.donate-container{ + width: 210px; + max-width: 100%; + display: block; + margin: auto; + +} +.donate-container .donate-logo{ + padding: 20px 25px; + display: inline; + background-color: rgb(8, 8, 8); + color: rgb(255, 255, 255); + cursor: pointer; +} +.donate-container .donate-button{ + display: inline-block; + border-top-right-radius: 25px; + border-bottom-right-radius: 25px; + margin: auto; + margin-bottom: 10px; + border: none; + background-color:#046880; + padding: 20px 25px; + color: #fff; + cursor: pointer; + font-size: 20px; + font-weight: 500; + text-transform: uppercase; + -webkit-transition: all .2s ease-in-out; + transition: all .2s ease-in-out; + -webkit-perspective: 100px; + perspective: 100px; + overflow: hidden; + z-index: 2; +} + +.donate-container .donate-button:hover{ + background-color: #fff; + border: 2px solid #046880; + color:#046880; +} + +.donate-container .donate-button:focus{ + border:none; +} + + +/***below css form grid layout present in category section trending section freh section***/ +/*moved to grid list .css*/ +/********/ + +@media screen and (max-width:900px) { + #request-section{ + width:100%; + float: none; + } + #donate-section{ + width:100%; + float: none; + } + + .slider-wrapper { + max-width: 100%; + margin: 5px; + } +} \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/public/css/sarthi-form.css b/fall2018/Ankit Ojha/saarthi/public/css/sarthi-form.css new file mode 100644 index 0000000..325f1df --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/css/sarthi-form.css @@ -0,0 +1,263 @@ +@import url("https://fonts.googleapis.com/css?family=Raleway:300,400i,900|Roboto"); + +/*NEW FORM CSS*/ +/*form div*/ +.sarthi-form { + font-family: 'Roboto', sans-serif; + font-weight: 300; + background: #ffffff; + color: #000; + padding: 20px; + margin: auto; + box-sizing: border-box; +} + +/******/ + +/*heading tag font weight*/ +h1, +h2, +h3, +h4, +h5, +h6 { + font-weight: 300; +} + +/******/ + +/*form layout*/ +.sarthi-form form { + margin: auto; + padding-bottom: 3rem; +} + +/*******/ + +/*.srathi-form label style*/ +.sarthi-form label { + font-size: 0.9rem; + line-height: 2rem; + font-weight: 500; +} + +/******/ + +/*.sarthi-form all input type stle input type="text,email,password,text-area */ +.sarthi-form .input-item { + margin-bottom: 1.3rem; + width: 100%; + border-radius: 10px; + background: #ffffff; + border: 1px solid #000; + color: #000; + padding: 0.5rem 0rem; + line-height: 1.3rem; + outline: 0; +} + + +.sarthi-form .number-item { + margin-bottom: 1.3rem; + border-radius: 10px; + background: #ffffff; + border: 1px solid #000; + color: #000; + padding: 0.5rem 0rem; + line-height: 1.3rem; + outline: 0; +} + + +/*********/ + + +/*.sarthi-form button style*/ +.sarthi-form .primary-btn { + width: 100%; + margin-bottom: 1.3rem; + border-radius: 2px; +} + +.sarthi-form .primary-btn { + padding: 0.7rem 1rem; + height: 2.7rem; + display: inline-block; + border: 0; + font-weight: 500; + background: #046880; + color: #fff; + text-decoration: none; + cursor: pointer; + text-align: center; + transition: all 0.5s; +} + +.primary-btn:hover { + background: #ffffff; + border: 1px solid #046880; + color: #046880; +} + +/****************/ + + +.sarthi-form .secondary-btn { + margin: 10px; + border-radius: 10px; + padding: 0.5rem 0.5rem; + display: inline-block; + border: 0; + font-weight: 500; + background: #d05c69; + color: #fff; + text-decoration: none; + cursor: pointer; + text-align: center; + transition: all 0.5s; +} + +.secondary-btn:hover { + background: #ffffff; + border: 1px solid #d05c69; + color:#d05c69; +} +/*styling of check boxes*/ +/*check-box container*/ +.check-container { + display: block; + position: relative; + padding-left: 35px; + margin-bottom: 12px; + cursor: pointer; + font-size: 22px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +/* Hide the browser's default checkbox */ +.check-container input { + position: absolute; + opacity: 0; + cursor: pointer; + height: 0; + width: 0; +} + +/* Create a custom checkbox */ +.checkmark { + position: absolute; + top: 0; + left: 0; + height: 25px; + width: 25px; + background-color: #eee; +} + +/* On mouse-over, add a grey background color */ +.check-container:hover input~.checkmark { + background-color: #ccc; +} + +/* When the checkbox is checked, add a blue background */ +.check-container input:checked~.checkmark { + background-color: #046880; +} + +/* Create the checkmark/indicator (hidden when not checked) */ +.checkmark:after { + content: ""; + position: absolute; + display: none; +} + +.check-container input:checked~.checkmark:after { + display: block; +} + +/* Style the checkmark/indicator */ +.check-container .checkmark:after { + left: 9px; + top: 5px; + width: 5px; + height: 10px; + border: solid white; + border-width: 0 3px 3px 0; + -webkit-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} + +/*end of styling of check boxes*/ + + + +/****styling of radio button*********/ + +/* The container */ +.radio-container { + display: block; + position: relative; + padding-left: 35px; + margin-bottom: 12px; + cursor: pointer; + font-size: 22px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +/* Hide the browser's default radio button */ +.radio-container input { + position: absolute; + opacity: 0; + cursor: pointer; +} + +/* Create a custom radio button */ +.radio-container .checkmark { + position: absolute; + top: 0; + left: 0; + height: 25px; + width: 25px; + background-color: #eee; + border-radius: 50%; +} + +/* On mouse-over, add a grey background color */ +.radio-container:hover input~.checkmark { + background-color: #ccc; +} + +/* When the radio button is checked, add a blue background */ +.radio-container input:checked~.checkmark { + background-color: #2196F3; +} + +/* Create the indicator (the dot/circle - hidden when not checked) */ +.radio-container .checkmark:after { + content: ""; + position: absolute; + display: none; +} + +/* Show the indicator (dot/circle) when checked */ +.radio-container input:checked~.checkmark:after { + display: block; +} + +/* Style the indicator (dot/circle) */ +.radio-container .checkmark:after { + top: 9px; + left: 9px; + width: 8px; + height: 8px; + border-radius: 50%; + background: white; +} + +/************************/ \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/public/css/sarthi-home.css b/fall2018/Ankit Ojha/saarthi/public/css/sarthi-home.css new file mode 100644 index 0000000..0c22e9b --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/css/sarthi-home.css @@ -0,0 +1,142 @@ +* { + padding: 0px; + margin: 0px; +} + +#home-layout { + display: flex; + flex-direction: row; + box-sizing: border-box; + margin: 10px; + padding: 10px 0px; +} + +#main-section { + flex: 2; + display: grid; + grid-template-rows: 1fr 1fr; + grid-gap: 1em; +} + +#main-section .trending-section{ + padding: 10px; +} + +#main-section .recent-section{ + padding: 10px; +} + +#main-section .section-heading { + font-size: 1.5rem !important; + line-height: 2.25rem !important; + text-align: center; + letter-spacing: .6em; + font-weight: 600; + font-family:roboto; + border-bottom: 4px solid #d60638; +} + +#side-section { + flex: 1; + display: grid; + grid-template-rows:2fr; +} + +#side-section .section-heading { + font-size: 1.5rem !important; + line-height: 2.25rem !important; + text-align: center; + letter-spacing: .6em; + font-weight: 600; + font-family:roboto; + border-bottom: 4px solid #d60638; + text-transform: uppercase; +} + +#category-section { + padding: 10px; +} + +#category-list { + margin: 10px; + display: grid; + grid-template-columns:repeat(2,1fr); + grid-gap: .5em; +} + +#category-list .category{ + margin: 0; + padding: 0; + position: relative; +} + +#category-list .category>img{ + display: block; + max-width: 100%; + height: auto; +} + +#category-list .category .img-caption{ + position: absolute; + top: .5em; + bottom: .5em; + right: .5em; + left: .5em; + background: rgba(255, 255, 255, 0.7); + color: #0b2027; + display: flex; + align-items: center; + justify-content: center; + opacity: 0; + transition:opacity ease-in-out 300ms; +} + +#category-list .category:hover .img-caption{ + opacity: 1; +} + +#category-list .category .img-caption a{ + padding: 5px 5px; + border-radius: 30px; + cursor: pointer; + border-color:1px solid #d60638; + background-color: #d60638; + color:#fff; +} + + +#language-section { + padding: 10px; +} + + +/*Media Queries*/ +@media screen and (max-width:900px) { + #home-layout { + display: flex !important; + flex-direction: column !important; + } + + #main-section { + flex: 2 !important; + } + + #side-section { + flex: 1 !important; + } + + #category-list { + grid-template-columns:repeat(3,1fr); + grid-gap:.5em; + } + + #category-list .category>img{ + max-width: 100%; + height: auto; + } + + #category-list .category .img-caption a{ + padding: 1px; + font-size:10px; + } +} diff --git a/fall2018/Ankit Ojha/saarthi/public/css/sign-up.css b/fall2018/Ankit Ojha/saarthi/public/css/sign-up.css new file mode 100644 index 0000000..51a49c4 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/css/sign-up.css @@ -0,0 +1,245 @@ +@import url('https://fonts.googleapis.com/css?family=Roboto:300|Anton'); + +* { + box-sizing: border-box; +} + +body { + font-family: 'Roboto', sans-serif; + font-weight: 300; + background: #ffffff; + color: #000; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + font-weight: 300; +} +#header{ + display: flex; + flex-direction:row; +} + +#left-header{ + display: flex; + flex-direction: column; + flex: 1; + align-items: flex-end; + justify-content: flex-start; + height: auto; +} +#left-header h1{ + font-family: 'Anton'; + color: #16406d; +} +#right-header h1{ + font-family: 'Anton'; + color: #16406d; +} +#right-header{ + flex: 1; +} + +#wrapper { + display: flex; + flex-direction:row; +} + +#left { + display: flex; + flex-direction: column; + flex: 1; + order:2; + align-items: center; + justify-content: flex-start; + height: auto; +} + +#right { + flex: 1; + background-color:#94c4f4; +} + +/* Sign In */ +#signup { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + width: 80%; + padding-bottom: 1rem; +} + +#signup form { + width: 60%; + padding-bottom: 3rem; +} + +#signup .logo { + margin-bottom: 0vh; +} + +#signup .logo img { + width: 160px; +} + +#signup label { + font-size: 0.9rem; + line-height: 2rem; + font-weight: 500; +} + +#signup .text-input { + margin-bottom: 1.3rem; + width: 100%; + border-radius: 2px; + border-radius: 2px; + background: #ffffff; + border: 1px solid #000; + color: #000; + padding: 0.5rem 1rem; + line-height: 1.3rem; +} + +#signup .primary-btn { + width: 100%; + margin-bottom: 1.3rem; +} + +#signup .secondary-btn, +.or, +.links { + width: 100%; +} + +#signup .links a { + display: block; + color: #fff; + text-decoration: none; + margin-bottom: 1rem; + text-align: center; + font-size: 0.9rem; +} + +#signup .or { + display: flex; + flex-direction: row; + margin-bottom: 1.2rem; + align-items: center; +} + +#signup .or .bar { + flex: auto; + border: none; + height: 1px; + background: #aaa; +} + +#signup .or span { + color: #ccc; + padding: 0 0.8rem; +} + +/* Showcase */ +#showcase { + display: flex; + justify-content: center; + align-items: center; + background: url('../images/Sarthi-signin-side.jpg') no-repeat center center / contain; + height: 100vh; + text-align: center; +} + +#showcase .secondary-btn { + width: 100%; + margin-top: 16rem; + margin-left: 1rem; +} +#showcase .secondary-btn:hover { + border-color: #fff; + background-color: #ffffff; + color: #000000; +} +/* Footer */ + + +/* Button */ +.primary-btn { + padding: 0.7rem 0.5rem; + height: 2.7rem; + display: block; + border: 0; + border-radius: 2px; + font-weight: 500; + background: #d05c69; + color: #fff; + text-decoration: none; + cursor: pointer; + text-align: center; + transition: all 0.5s; +} + +.primary-btn:hover { + background: #ffffff; + border: 1px solid #d05c69; + color:#d05c69; +} + +.secondary-btn { + padding: 0rem 0rem; + height: 2.7rem; + display: block; + border: 1px solid #000; + border-radius: 2px; + font-weight: 500; + background: none; + color: #000; + text-decoration: none; + cursor: pointer; + text-align: center; + transition: all 0.5s; +} + +.secondary-btn:hover { + border-color: #d05c69; + color: #d05c69; +} + +/* Media Queries */ +@media (min-width: 1200px) { + #left { + flex: 6; + } + + #right { + flex: 4; + } +} + +@media (max-width: 768px) { + body { + overflow: auto; + } + + #right { + display: none; + } + + #left { + justify-content: start; + margin-top: 4vh; + } + + #signup .logo { + margin-bottom: 2vh; + } + + #signup .text-input { + margin-bottom: 0.7rem; + } + +} \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/public/css/trending-slider.css b/fall2018/Ankit Ojha/saarthi/public/css/trending-slider.css new file mode 100644 index 0000000..d0506db --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/css/trending-slider.css @@ -0,0 +1,138 @@ +@import url('https://fonts.googleapis.com/css?family=Noto+Serif+SC:500'); +.trending-slider { + font-family: Verdana, sans-serif; + margin-top: 10px; + box-sizing: border-box +} + +.trending-slider .trending-slides { + display: none; +} + +.trending-slider img { + vertical-align: middle; +} + +/* Slideshow container */ +.trending-slider .slideshow-container { + max-width: 100%; + position: relative; + margin: auto; +} + +/* Next & previous buttons */ +.trending-slider .slideshow-container .prev, +.trending-slider .slideshow-container .next { + cursor: pointer; + position: absolute; + bottom: 2%; + right: 5%; + width: auto; + padding: 16px; + margin-top: -22px; + color: #000; + font-weight: bold; + font-size: 20px; + transition: 0.6s ease; + border-radius: 0 3px 3px 0; + user-select: none; +} + +/* Position the "next button" to the right */ +.trending-slider .slideshow-container .next { + right: 0; + border-radius: 3px 0 0 3px; +} + +/* On hover, add a black background color with a little bit see-through */ +.trending-slider .slideshow-container .prev:hover, +.trending-slider .slideshow-container .next:hover { + /*background-color: rgba(0, 0, 0, 0.8);*/ + color:#fff; +} + +/*article bammer*/ +.article-banner { + display: grid; + grid-template-columns: 1fr 2fr; + background-color: #046880; + margin-bottom: 10px; +} + +.article-banner a{ + color: white; +} + +/*article content*/ +.article-banner-content h3{ + font-size: 2.1em !important; + border-bottom: 2px solid #fff; + line-height: 1.15385; + margin-top: 0; + margin-bottom: .5rem; + font-family: 'Noto Serif SC', serif; + font-weight:bold; + font-style: normal; + text-transform: uppercase; + color: white; + text-rendering: optimizeLegibility; +} +.article-banner-content p{ + padding: 5px; + color: ghostwhite; + font-family:europa; + font-weight: normal; + font-style: normal; + font-size: 1.4em; + letter-spacing: 0em; + line-height: 1.15385em; + text-decoration: none; + text-transform: none; + text-rendering: optimizeLegibility; +} + +/*article image*/ +.article-banner-img > img{ + display: block; + max-width: 100%; + height: auto; +} + + +/* On smaller screens, decrease text size */ + +@media only screen and (max-width: 500px) { + + .trending-slider .slideshow-container .prev, + .trending-slider .slideshow-container .next, + .trending-slider .slideshow-container .text { + font-size: 18px + } + + .article-banner-content h3{ + font-size: 1.1em !important; + border-bottom: 1px solid #fff; + line-height: 1.15385; + margin-top: 0; + margin-bottom: .5rem; + font-family: 'Noto Serif SC', serif; + font-weight: normal; + font-style: normal; + text-transform: uppercase; + color: white; + text-rendering: optimizeLegibility; + } + .article-banner-content p{ + padding: 2px; + color: ghostwhite; + font-family:europa; + font-weight: normal; + font-style: normal; + font-size: 1em; + letter-spacing: 0em; + line-height: 1.15385em; + text-decoration: none; + text-transform: none; + text-rendering: optimizeLegibility; + } +} \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/public/images/5c62fd4bf87f8905a804da761.jpg b/fall2018/Ankit Ojha/saarthi/public/images/5c62fd4bf87f8905a804da761.jpg new file mode 100644 index 0000000..d8b970d Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/5c62fd4bf87f8905a804da761.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/5c62fd4bf87f8905a804da762.jpg b/fall2018/Ankit Ojha/saarthi/public/images/5c62fd4bf87f8905a804da762.jpg new file mode 100644 index 0000000..04cc5d7 Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/5c62fd4bf87f8905a804da762.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/5c62fd4bf87f8905a804da763.jpg b/fall2018/Ankit Ojha/saarthi/public/images/5c62fd4bf87f8905a804da763.jpg new file mode 100644 index 0000000..d73253d Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/5c62fd4bf87f8905a804da763.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/5c62fd4bf87f8905a804da764.jpg b/fall2018/Ankit Ojha/saarthi/public/images/5c62fd4bf87f8905a804da764.jpg new file mode 100644 index 0000000..e7e14f6 Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/5c62fd4bf87f8905a804da764.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/5c63048c92d4682b4c88b50c1.jpg b/fall2018/Ankit Ojha/saarthi/public/images/5c63048c92d4682b4c88b50c1.jpg new file mode 100644 index 0000000..d8100aa Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/5c63048c92d4682b4c88b50c1.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/5c63048c92d4682b4c88b50c2.jpg b/fall2018/Ankit Ojha/saarthi/public/images/5c63048c92d4682b4c88b50c2.jpg new file mode 100644 index 0000000..debf52b Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/5c63048c92d4682b4c88b50c2.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/5c63048c92d4682b4c88b50c3.jpg b/fall2018/Ankit Ojha/saarthi/public/images/5c63048c92d4682b4c88b50c3.jpg new file mode 100644 index 0000000..faacf00 Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/5c63048c92d4682b4c88b50c3.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/5c63048c92d4682b4c88b50c4.jpg b/fall2018/Ankit Ojha/saarthi/public/images/5c63048c92d4682b4c88b50c4.jpg new file mode 100644 index 0000000..19c92fa Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/5c63048c92d4682b4c88b50c4.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/5c63048c92d4682b4c88b50c5.jpg b/fall2018/Ankit Ojha/saarthi/public/images/5c63048c92d4682b4c88b50c5.jpg new file mode 100644 index 0000000..5117123 Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/5c63048c92d4682b4c88b50c5.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/5c63048c92d4682b4c88b50c6.jpg b/fall2018/Ankit Ojha/saarthi/public/images/5c63048c92d4682b4c88b50c6.jpg new file mode 100644 index 0000000..3baaee4 Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/5c63048c92d4682b4c88b50c6.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/Sarthi-signin-side.jpg b/fall2018/Ankit Ojha/saarthi/public/images/Sarthi-signin-side.jpg new file mode 100644 index 0000000..f96997e Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/Sarthi-signin-side.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/banner-image.jpg b/fall2018/Ankit Ojha/saarthi/public/images/banner-image.jpg new file mode 100644 index 0000000..3b5e324 Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/banner-image.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/category-educational.jpg b/fall2018/Ankit Ojha/saarthi/public/images/category-educational.jpg new file mode 100644 index 0000000..f77f340 Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/category-educational.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/category-jugaad.jpg b/fall2018/Ankit Ojha/saarthi/public/images/category-jugaad.jpg new file mode 100644 index 0000000..3c03f3d Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/category-jugaad.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/category-lifestyle.jpg b/fall2018/Ankit Ojha/saarthi/public/images/category-lifestyle.jpg new file mode 100644 index 0000000..a27f0c1 Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/category-lifestyle.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/category-online.jpg b/fall2018/Ankit Ojha/saarthi/public/images/category-online.jpg new file mode 100644 index 0000000..3e25fee Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/category-online.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/category-tech.jpg b/fall2018/Ankit Ojha/saarthi/public/images/category-tech.jpg new file mode 100644 index 0000000..457341b Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/category-tech.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/category-travel.jpg b/fall2018/Ankit Ojha/saarthi/public/images/category-travel.jpg new file mode 100644 index 0000000..3dc694d Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/category-travel.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/demo-article-img.jpg b/fall2018/Ankit Ojha/saarthi/public/images/demo-article-img.jpg new file mode 100644 index 0000000..1dfddc7 Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/demo-article-img.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/fresh-demat.jpg b/fall2018/Ankit Ojha/saarthi/public/images/fresh-demat.jpg new file mode 100644 index 0000000..24a89e3 Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/fresh-demat.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/fresh-pan.jpg b/fall2018/Ankit Ojha/saarthi/public/images/fresh-pan.jpg new file mode 100644 index 0000000..ce9eff0 Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/fresh-pan.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/fresh-paymeny.jpg b/fall2018/Ankit Ojha/saarthi/public/images/fresh-paymeny.jpg new file mode 100644 index 0000000..5783949 Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/fresh-paymeny.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/homepage-banner-1.jpg b/fall2018/Ankit Ojha/saarthi/public/images/homepage-banner-1.jpg new file mode 100644 index 0000000..7e460d5 Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/homepage-banner-1.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/homepage-banner-2.jpg b/fall2018/Ankit Ojha/saarthi/public/images/homepage-banner-2.jpg new file mode 100644 index 0000000..84ee665 Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/homepage-banner-2.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/homepage-banner-3.jpg b/fall2018/Ankit Ojha/saarthi/public/images/homepage-banner-3.jpg new file mode 100644 index 0000000..74d068f Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/homepage-banner-3.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/homepage-banner-4.jpg b/fall2018/Ankit Ojha/saarthi/public/images/homepage-banner-4.jpg new file mode 100644 index 0000000..ad4c6fc Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/homepage-banner-4.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/homepage-banner-5.jpg b/fall2018/Ankit Ojha/saarthi/public/images/homepage-banner-5.jpg new file mode 100644 index 0000000..6a2c42c Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/homepage-banner-5.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/homepage-banner-6.jpg b/fall2018/Ankit Ojha/saarthi/public/images/homepage-banner-6.jpg new file mode 100644 index 0000000..dd092b2 Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/homepage-banner-6.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/jhon_doe.jpg b/fall2018/Ankit Ojha/saarthi/public/images/jhon_doe.jpg new file mode 100644 index 0000000..9a346a7 Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/jhon_doe.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/jhon_doe_female.jpg b/fall2018/Ankit Ojha/saarthi/public/images/jhon_doe_female.jpg new file mode 100644 index 0000000..9b5eb31 Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/jhon_doe_female.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/sarthi-logo.png b/fall2018/Ankit Ojha/saarthi/public/images/sarthi-logo.png new file mode 100644 index 0000000..0a614da Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/sarthi-logo.png differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/sarthi-nav-logo.png b/fall2018/Ankit Ojha/saarthi/public/images/sarthi-nav-logo.png new file mode 100644 index 0000000..aafaf04 Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/sarthi-nav-logo.png differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/trending-fir.jpg b/fall2018/Ankit Ojha/saarthi/public/images/trending-fir.jpg new file mode 100644 index 0000000..11eff57 Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/trending-fir.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/trending-metro.jpg b/fall2018/Ankit Ojha/saarthi/public/images/trending-metro.jpg new file mode 100644 index 0000000..bcd3456 Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/trending-metro.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/images/trending-tax.jpg b/fall2018/Ankit Ojha/saarthi/public/images/trending-tax.jpg new file mode 100644 index 0000000..4898ef3 Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/images/trending-tax.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/js/add_article/add_article.js b/fall2018/Ankit Ojha/saarthi/public/js/add_article/add_article.js new file mode 100644 index 0000000..1880c4b --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/js/add_article/add_article.js @@ -0,0 +1,39 @@ +$(document).ready(() => { + + // $('#btn').on('click', () => { + // let steps = $('#steps > textarea').val(); + // // console.log(steps); + // }); + + $('.add').click(function() { + $('.block:last').before(`
    + + + + + Remove Step +
    `); + }); + $('.optionBox').on('click','.remove',function() { + $(this).parent().remove(); + }); + + $('#delete-article').on('click', function(e){ + $target = $(e.target); + const id = $target.attr('data-id'); + $.ajax({ + type:'DELETE', + url: `/technicalUsers/technicalindex/${id}`, + success: function(response){ + alert('Deleting Article'); + window.location.href='/technicalUsers/technicalindex'; + }, + error: function(err){ + console.log(err); + } + }); + }); + + + +}); \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/public/js/add_article/edit_article.js b/fall2018/Ankit Ojha/saarthi/public/js/add_article/edit_article.js new file mode 100644 index 0000000..da114dd --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/js/add_article/edit_article.js @@ -0,0 +1,16 @@ +$(document).ready(() => { + + + $('.add').click(function() { + $('.block:last').before(`
    + + + + + Remove Step +
    `); + }); + $('.optionBox').on('click','.remove',function() { + $(this).parent().remove(); + }); +}); \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/public/js/banner-slider.js b/fall2018/Ankit Ojha/saarthi/public/js/banner-slider.js new file mode 100644 index 0000000..60b7e17 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/js/banner-slider.js @@ -0,0 +1,31 @@ +var slideIndex = 1; +show_M_Slides(slideIndex); + +function plus_M_Slides(n) { + show_M_Slides(slideIndex += n); +} + +function currentMSlide(n) { + show_M_Slides(slideIndex = n); +} + +function show_M_Slides(n) { + var i; + var slides = document.getElementsByClassName("mySlides"); + var dots = document.getElementsByClassName("dot"); + if (n > slides.length) { + slideIndex = 1 + } + if (n < 1) { + slideIndex = slides.length + } + for (i = 0; i < slides.length; i++) { + slides[i].style.display = "none"; + } + for (i = 0; i < dots.length; i++) { + dots[i].className = dots[i].className.replace(" active", ""); + } + slides[slideIndex - 1].style.display = "block"; + dots[slideIndex - 1].className += " active"; +} +setInterval(function(){show_M_Slides(slideIndex += 1);}, 4000); \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/public/js/flickity.pkgd.js b/fall2018/Ankit Ojha/saarthi/public/js/flickity.pkgd.js new file mode 100644 index 0000000..dfe794d --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/js/flickity.pkgd.js @@ -0,0 +1,4584 @@ +/*! + * Flickity PACKAGED v2.2.0 + * Touch, responsive, flickable carousels + * + * Licensed GPLv3 for open source use + * or Flickity Commercial License for commercial use + * + * https://flickity.metafizzy.co + * Copyright 2015-2018 Metafizzy + */ + +/** + * Bridget makes jQuery widgets + * v2.0.1 + * MIT license + */ + +/* jshint browser: true, strict: true, undef: true, unused: true */ + +( function( window, factory ) { + // universal module definition + /*jshint strict: false */ /* globals define, module, require */ + if ( typeof define == 'function' && define.amd ) { + // AMD + define( 'jquery-bridget/jquery-bridget',[ 'jquery' ], function( jQuery ) { + return factory( window, jQuery ); + }); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory( + window, + require('jquery') + ); + } else { + // browser global + window.jQueryBridget = factory( + window, + window.jQuery + ); + } + +}( window, function factory( window, jQuery ) { +'use strict'; + +// ----- utils ----- // + +var arraySlice = Array.prototype.slice; + +// helper function for logging errors +// $.error breaks jQuery chaining +var console = window.console; +var logError = typeof console == 'undefined' ? function() {} : + function( message ) { + console.error( message ); + }; + +// ----- jQueryBridget ----- // + +function jQueryBridget( namespace, PluginClass, $ ) { + $ = $ || jQuery || window.jQuery; + if ( !$ ) { + return; + } + + // add option method -> $().plugin('option', {...}) + if ( !PluginClass.prototype.option ) { + // option setter + PluginClass.prototype.option = function( opts ) { + // bail out if not an object + if ( !$.isPlainObject( opts ) ){ + return; + } + this.options = $.extend( true, this.options, opts ); + }; + } + + // make jQuery plugin + $.fn[ namespace ] = function( arg0 /*, arg1 */ ) { + if ( typeof arg0 == 'string' ) { + // method call $().plugin( 'methodName', { options } ) + // shift arguments by 1 + var args = arraySlice.call( arguments, 1 ); + return methodCall( this, arg0, args ); + } + // just $().plugin({ options }) + plainCall( this, arg0 ); + return this; + }; + + // $().plugin('methodName') + function methodCall( $elems, methodName, args ) { + var returnValue; + var pluginMethodStr = '$().' + namespace + '("' + methodName + '")'; + + $elems.each( function( i, elem ) { + // get instance + var instance = $.data( elem, namespace ); + if ( !instance ) { + logError( namespace + ' not initialized. Cannot call methods, i.e. ' + + pluginMethodStr ); + return; + } + + var method = instance[ methodName ]; + if ( !method || methodName.charAt(0) == '_' ) { + logError( pluginMethodStr + ' is not a valid method' ); + return; + } + + // apply method, get return value + var value = method.apply( instance, args ); + // set return value if value is returned, use only first value + returnValue = returnValue === undefined ? value : returnValue; + }); + + return returnValue !== undefined ? returnValue : $elems; + } + + function plainCall( $elems, options ) { + $elems.each( function( i, elem ) { + var instance = $.data( elem, namespace ); + if ( instance ) { + // set options & init + instance.option( options ); + instance._init(); + } else { + // initialize new instance + instance = new PluginClass( elem, options ); + $.data( elem, namespace, instance ); + } + }); + } + + updateJQuery( $ ); + +} + +// ----- updateJQuery ----- // + +// set $.bridget for v1 backwards compatibility +function updateJQuery( $ ) { + if ( !$ || ( $ && $.bridget ) ) { + return; + } + $.bridget = jQueryBridget; +} + +updateJQuery( jQuery || window.jQuery ); + +// ----- ----- // + +return jQueryBridget; + +})); + +/** + * EvEmitter v1.1.0 + * Lil' event emitter + * MIT License + */ + +/* jshint unused: true, undef: true, strict: true */ + +( function( global, factory ) { + // universal module definition + /* jshint strict: false */ /* globals define, module, window */ + if ( typeof define == 'function' && define.amd ) { + // AMD - RequireJS + define( 'ev-emitter/ev-emitter',factory ); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS - Browserify, Webpack + module.exports = factory(); + } else { + // Browser globals + global.EvEmitter = factory(); + } + +}( typeof window != 'undefined' ? window : this, function() { + + + +function EvEmitter() {} + +var proto = EvEmitter.prototype; + +proto.on = function( eventName, listener ) { + if ( !eventName || !listener ) { + return; + } + // set events hash + var events = this._events = this._events || {}; + // set listeners array + var listeners = events[ eventName ] = events[ eventName ] || []; + // only add once + if ( listeners.indexOf( listener ) == -1 ) { + listeners.push( listener ); + } + + return this; +}; + +proto.once = function( eventName, listener ) { + if ( !eventName || !listener ) { + return; + } + // add event + this.on( eventName, listener ); + // set once flag + // set onceEvents hash + var onceEvents = this._onceEvents = this._onceEvents || {}; + // set onceListeners object + var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {}; + // set flag + onceListeners[ listener ] = true; + + return this; +}; + +proto.off = function( eventName, listener ) { + var listeners = this._events && this._events[ eventName ]; + if ( !listeners || !listeners.length ) { + return; + } + var index = listeners.indexOf( listener ); + if ( index != -1 ) { + listeners.splice( index, 1 ); + } + + return this; +}; + +proto.emitEvent = function( eventName, args ) { + var listeners = this._events && this._events[ eventName ]; + if ( !listeners || !listeners.length ) { + return; + } + // copy over to avoid interference if .off() in listener + listeners = listeners.slice(0); + args = args || []; + // once stuff + var onceListeners = this._onceEvents && this._onceEvents[ eventName ]; + + for ( var i=0; i < listeners.length; i++ ) { + var listener = listeners[i] + var isOnce = onceListeners && onceListeners[ listener ]; + if ( isOnce ) { + // remove listener + // remove before trigger to prevent recursion + this.off( eventName, listener ); + // unset once flag + delete onceListeners[ listener ]; + } + // trigger listener + listener.apply( this, args ); + } + + return this; +}; + +proto.allOff = function() { + delete this._events; + delete this._onceEvents; +}; + +return EvEmitter; + +})); + +/*! + * getSize v2.0.3 + * measure size of elements + * MIT license + */ + +/* jshint browser: true, strict: true, undef: true, unused: true */ +/* globals console: false */ + +( function( window, factory ) { + /* jshint strict: false */ /* globals define, module */ + if ( typeof define == 'function' && define.amd ) { + // AMD + define( 'get-size/get-size',factory ); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory(); + } else { + // browser global + window.getSize = factory(); + } + +})( window, function factory() { +'use strict'; + +// -------------------------- helpers -------------------------- // + +// get a number from a string, not a percentage +function getStyleSize( value ) { + var num = parseFloat( value ); + // not a percent like '100%', and a number + var isValid = value.indexOf('%') == -1 && !isNaN( num ); + return isValid && num; +} + +function noop() {} + +var logError = typeof console == 'undefined' ? noop : + function( message ) { + console.error( message ); + }; + +// -------------------------- measurements -------------------------- // + +var measurements = [ + 'paddingLeft', + 'paddingRight', + 'paddingTop', + 'paddingBottom', + 'marginLeft', + 'marginRight', + 'marginTop', + 'marginBottom', + 'borderLeftWidth', + 'borderRightWidth', + 'borderTopWidth', + 'borderBottomWidth' +]; + +var measurementsLength = measurements.length; + +function getZeroSize() { + var size = { + width: 0, + height: 0, + innerWidth: 0, + innerHeight: 0, + outerWidth: 0, + outerHeight: 0 + }; + for ( var i=0; i < measurementsLength; i++ ) { + var measurement = measurements[i]; + size[ measurement ] = 0; + } + return size; +} + +// -------------------------- getStyle -------------------------- // + +/** + * getStyle, get style of element, check for Firefox bug + * https://bugzilla.mozilla.org/show_bug.cgi?id=548397 + */ +function getStyle( elem ) { + var style = getComputedStyle( elem ); + if ( !style ) { + logError( 'Style returned ' + style + + '. Are you running this code in a hidden iframe on Firefox? ' + + 'See https://bit.ly/getsizebug1' ); + } + return style; +} + +// -------------------------- setup -------------------------- // + +var isSetup = false; + +var isBoxSizeOuter; + +/** + * setup + * check isBoxSizerOuter + * do on first getSize() rather than on page load for Firefox bug + */ +function setup() { + // setup once + if ( isSetup ) { + return; + } + isSetup = true; + + // -------------------------- box sizing -------------------------- // + + /** + * Chrome & Safari measure the outer-width on style.width on border-box elems + * IE11 & Firefox<29 measures the inner-width + */ + var div = document.createElement('div'); + div.style.width = '200px'; + div.style.padding = '1px 2px 3px 4px'; + div.style.borderStyle = 'solid'; + div.style.borderWidth = '1px 2px 3px 4px'; + div.style.boxSizing = 'border-box'; + + var body = document.body || document.documentElement; + body.appendChild( div ); + var style = getStyle( div ); + // round value for browser zoom. desandro/masonry#928 + isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200; + getSize.isBoxSizeOuter = isBoxSizeOuter; + + body.removeChild( div ); +} + +// -------------------------- getSize -------------------------- // + +function getSize( elem ) { + setup(); + + // use querySeletor if elem is string + if ( typeof elem == 'string' ) { + elem = document.querySelector( elem ); + } + + // do not proceed on non-objects + if ( !elem || typeof elem != 'object' || !elem.nodeType ) { + return; + } + + var style = getStyle( elem ); + + // if hidden, everything is 0 + if ( style.display == 'none' ) { + return getZeroSize(); + } + + var size = {}; + size.width = elem.offsetWidth; + size.height = elem.offsetHeight; + + var isBorderBox = size.isBorderBox = style.boxSizing == 'border-box'; + + // get all measurements + for ( var i=0; i < measurementsLength; i++ ) { + var measurement = measurements[i]; + var value = style[ measurement ]; + var num = parseFloat( value ); + // any 'auto', 'medium' value will be 0 + size[ measurement ] = !isNaN( num ) ? num : 0; + } + + var paddingWidth = size.paddingLeft + size.paddingRight; + var paddingHeight = size.paddingTop + size.paddingBottom; + var marginWidth = size.marginLeft + size.marginRight; + var marginHeight = size.marginTop + size.marginBottom; + var borderWidth = size.borderLeftWidth + size.borderRightWidth; + var borderHeight = size.borderTopWidth + size.borderBottomWidth; + + var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter; + + // overwrite width and height if we can get it from style + var styleWidth = getStyleSize( style.width ); + if ( styleWidth !== false ) { + size.width = styleWidth + + // add padding and border unless it's already including it + ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth ); + } + + var styleHeight = getStyleSize( style.height ); + if ( styleHeight !== false ) { + size.height = styleHeight + + // add padding and border unless it's already including it + ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight ); + } + + size.innerWidth = size.width - ( paddingWidth + borderWidth ); + size.innerHeight = size.height - ( paddingHeight + borderHeight ); + + size.outerWidth = size.width + marginWidth; + size.outerHeight = size.height + marginHeight; + + return size; +} + +return getSize; + +}); + +/** + * matchesSelector v2.0.2 + * matchesSelector( element, '.selector' ) + * MIT license + */ + +/*jshint browser: true, strict: true, undef: true, unused: true */ + +( function( window, factory ) { + /*global define: false, module: false */ + 'use strict'; + // universal module definition + if ( typeof define == 'function' && define.amd ) { + // AMD + define( 'desandro-matches-selector/matches-selector',factory ); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory(); + } else { + // browser global + window.matchesSelector = factory(); + } + +}( window, function factory() { + 'use strict'; + + var matchesMethod = ( function() { + var ElemProto = window.Element.prototype; + // check for the standard method name first + if ( ElemProto.matches ) { + return 'matches'; + } + // check un-prefixed + if ( ElemProto.matchesSelector ) { + return 'matchesSelector'; + } + // check vendor prefixes + var prefixes = [ 'webkit', 'moz', 'ms', 'o' ]; + + for ( var i=0; i < prefixes.length; i++ ) { + var prefix = prefixes[i]; + var method = prefix + 'MatchesSelector'; + if ( ElemProto[ method ] ) { + return method; + } + } + })(); + + return function matchesSelector( elem, selector ) { + return elem[ matchesMethod ]( selector ); + }; + +})); + +/** + * Fizzy UI utils v2.0.7 + * MIT license + */ + +/*jshint browser: true, undef: true, unused: true, strict: true */ + +( function( window, factory ) { + // universal module definition + /*jshint strict: false */ /*globals define, module, require */ + + if ( typeof define == 'function' && define.amd ) { + // AMD + define( 'fizzy-ui-utils/utils',[ + 'desandro-matches-selector/matches-selector' + ], function( matchesSelector ) { + return factory( window, matchesSelector ); + }); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory( + window, + require('desandro-matches-selector') + ); + } else { + // browser global + window.fizzyUIUtils = factory( + window, + window.matchesSelector + ); + } + +}( window, function factory( window, matchesSelector ) { + + + +var utils = {}; + +// ----- extend ----- // + +// extends objects +utils.extend = function( a, b ) { + for ( var prop in b ) { + a[ prop ] = b[ prop ]; + } + return a; +}; + +// ----- modulo ----- // + +utils.modulo = function( num, div ) { + return ( ( num % div ) + div ) % div; +}; + +// ----- makeArray ----- // + +var arraySlice = Array.prototype.slice; + +// turn element or nodeList into an array +utils.makeArray = function( obj ) { + if ( Array.isArray( obj ) ) { + // use object if already an array + return obj; + } + // return empty array if undefined or null. #6 + if ( obj === null || obj === undefined ) { + return []; + } + + var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number'; + if ( isArrayLike ) { + // convert nodeList to array + return arraySlice.call( obj ); + } + + // array of single index + return [ obj ]; +}; + +// ----- removeFrom ----- // + +utils.removeFrom = function( ary, obj ) { + var index = ary.indexOf( obj ); + if ( index != -1 ) { + ary.splice( index, 1 ); + } +}; + +// ----- getParent ----- // + +utils.getParent = function( elem, selector ) { + while ( elem.parentNode && elem != document.body ) { + elem = elem.parentNode; + if ( matchesSelector( elem, selector ) ) { + return elem; + } + } +}; + +// ----- getQueryElement ----- // + +// use element as selector string +utils.getQueryElement = function( elem ) { + if ( typeof elem == 'string' ) { + return document.querySelector( elem ); + } + return elem; +}; + +// ----- handleEvent ----- // + +// enable .ontype to trigger from .addEventListener( elem, 'type' ) +utils.handleEvent = function( event ) { + var method = 'on' + event.type; + if ( this[ method ] ) { + this[ method ]( event ); + } +}; + +// ----- filterFindElements ----- // + +utils.filterFindElements = function( elems, selector ) { + // make array of elems + elems = utils.makeArray( elems ); + var ffElems = []; + + elems.forEach( function( elem ) { + // check that elem is an actual element + if ( !( elem instanceof HTMLElement ) ) { + return; + } + // add elem if no selector + if ( !selector ) { + ffElems.push( elem ); + return; + } + // filter & find items if we have a selector + // filter + if ( matchesSelector( elem, selector ) ) { + ffElems.push( elem ); + } + // find children + var childElems = elem.querySelectorAll( selector ); + // concat childElems to filterFound array + for ( var i=0; i < childElems.length; i++ ) { + ffElems.push( childElems[i] ); + } + }); + + return ffElems; +}; + +// ----- debounceMethod ----- // + +utils.debounceMethod = function( _class, methodName, threshold ) { + threshold = threshold || 100; + // original method + var method = _class.prototype[ methodName ]; + var timeoutName = methodName + 'Timeout'; + + _class.prototype[ methodName ] = function() { + var timeout = this[ timeoutName ]; + clearTimeout( timeout ); + + var args = arguments; + var _this = this; + this[ timeoutName ] = setTimeout( function() { + method.apply( _this, args ); + delete _this[ timeoutName ]; + }, threshold ); + }; +}; + +// ----- docReady ----- // + +utils.docReady = function( callback ) { + var readyState = document.readyState; + if ( readyState == 'complete' || readyState == 'interactive' ) { + // do async to allow for other scripts to run. metafizzy/flickity#441 + setTimeout( callback ); + } else { + document.addEventListener( 'DOMContentLoaded', callback ); + } +}; + +// ----- htmlInit ----- // + +// http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/ +utils.toDashed = function( str ) { + return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) { + return $1 + '-' + $2; + }).toLowerCase(); +}; + +var console = window.console; +/** + * allow user to initialize classes via [data-namespace] or .js-namespace class + * htmlInit( Widget, 'widgetName' ) + * options are parsed from data-namespace-options + */ +utils.htmlInit = function( WidgetClass, namespace ) { + utils.docReady( function() { + var dashedNamespace = utils.toDashed( namespace ); + var dataAttr = 'data-' + dashedNamespace; + var dataAttrElems = document.querySelectorAll( '[' + dataAttr + ']' ); + var jsDashElems = document.querySelectorAll( '.js-' + dashedNamespace ); + var elems = utils.makeArray( dataAttrElems ) + .concat( utils.makeArray( jsDashElems ) ); + var dataOptionsAttr = dataAttr + '-options'; + var jQuery = window.jQuery; + + elems.forEach( function( elem ) { + var attr = elem.getAttribute( dataAttr ) || + elem.getAttribute( dataOptionsAttr ); + var options; + try { + options = attr && JSON.parse( attr ); + } catch ( error ) { + // log error, do not initialize + if ( console ) { + console.error( 'Error parsing ' + dataAttr + ' on ' + elem.className + + ': ' + error ); + } + return; + } + // initialize + var instance = new WidgetClass( elem, options ); + // make available via $().data('namespace') + if ( jQuery ) { + jQuery.data( elem, namespace, instance ); + } + }); + + }); +}; + +// ----- ----- // + +return utils; + +})); + +// Flickity.Cell +( function( window, factory ) { + // universal module definition + /* jshint strict: false */ + if ( typeof define == 'function' && define.amd ) { + // AMD + define( 'flickity/js/cell',[ + 'get-size/get-size' + ], function( getSize ) { + return factory( window, getSize ); + }); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory( + window, + require('get-size') + ); + } else { + // browser global + window.Flickity = window.Flickity || {}; + window.Flickity.Cell = factory( + window, + window.getSize + ); + } + +}( window, function factory( window, getSize ) { + + + +function Cell( elem, parent ) { + this.element = elem; + this.parent = parent; + + this.create(); +} + +var proto = Cell.prototype; + +proto.create = function() { + this.element.style.position = 'absolute'; + this.element.setAttribute( 'aria-hidden', 'true' ); + this.x = 0; + this.shift = 0; +}; + +proto.destroy = function() { + // reset style + this.unselect(); + this.element.style.position = ''; + var side = this.parent.originSide; + this.element.style[ side ] = ''; +}; + +proto.getSize = function() { + this.size = getSize( this.element ); +}; + +proto.setPosition = function( x ) { + this.x = x; + this.updateTarget(); + this.renderPosition( x ); +}; + +// setDefaultTarget v1 method, backwards compatibility, remove in v3 +proto.updateTarget = proto.setDefaultTarget = function() { + var marginProperty = this.parent.originSide == 'left' ? 'marginLeft' : 'marginRight'; + this.target = this.x + this.size[ marginProperty ] + + this.size.width * this.parent.cellAlign; +}; + +proto.renderPosition = function( x ) { + // render position of cell with in slider + var side = this.parent.originSide; + this.element.style[ side ] = this.parent.getPositionValue( x ); +}; + +proto.select = function() { + this.element.classList.add('is-selected'); + this.element.removeAttribute('aria-hidden'); +}; + +proto.unselect = function() { + this.element.classList.remove('is-selected'); + this.element.setAttribute( 'aria-hidden', 'true' ); +}; + +/** + * @param {Integer} factor - 0, 1, or -1 +**/ +proto.wrapShift = function( shift ) { + this.shift = shift; + this.renderPosition( this.x + this.parent.slideableWidth * shift ); +}; + +proto.remove = function() { + this.element.parentNode.removeChild( this.element ); +}; + +return Cell; + +})); + +// slide +( function( window, factory ) { + // universal module definition + /* jshint strict: false */ + if ( typeof define == 'function' && define.amd ) { + // AMD + define( 'flickity/js/slide',factory ); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory(); + } else { + // browser global + window.Flickity = window.Flickity || {}; + window.Flickity.Slide = factory(); + } + +}( window, function factory() { +'use strict'; + +function Slide( parent ) { + this.parent = parent; + this.isOriginLeft = parent.originSide == 'left'; + this.cells = []; + this.outerWidth = 0; + this.height = 0; +} + +var proto = Slide.prototype; + +proto.addCell = function( cell ) { + this.cells.push( cell ); + this.outerWidth += cell.size.outerWidth; + this.height = Math.max( cell.size.outerHeight, this.height ); + // first cell stuff + if ( this.cells.length == 1 ) { + this.x = cell.x; // x comes from first cell + var beginMargin = this.isOriginLeft ? 'marginLeft' : 'marginRight'; + this.firstMargin = cell.size[ beginMargin ]; + } +}; + +proto.updateTarget = function() { + var endMargin = this.isOriginLeft ? 'marginRight' : 'marginLeft'; + var lastCell = this.getLastCell(); + var lastMargin = lastCell ? lastCell.size[ endMargin ] : 0; + var slideWidth = this.outerWidth - ( this.firstMargin + lastMargin ); + this.target = this.x + this.firstMargin + slideWidth * this.parent.cellAlign; +}; + +proto.getLastCell = function() { + return this.cells[ this.cells.length - 1 ]; +}; + +proto.select = function() { + this.cells.forEach( function( cell ) { + cell.select(); + }); +}; + +proto.unselect = function() { + this.cells.forEach( function( cell ) { + cell.unselect(); + }); +}; + +proto.getCellElements = function() { + return this.cells.map( function( cell ) { + return cell.element; + }); +}; + +return Slide; + +})); + +// animate +( function( window, factory ) { + // universal module definition + /* jshint strict: false */ + if ( typeof define == 'function' && define.amd ) { + // AMD + define( 'flickity/js/animate',[ + 'fizzy-ui-utils/utils' + ], function( utils ) { + return factory( window, utils ); + }); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory( + window, + require('fizzy-ui-utils') + ); + } else { + // browser global + window.Flickity = window.Flickity || {}; + window.Flickity.animatePrototype = factory( + window, + window.fizzyUIUtils + ); + } + +}( window, function factory( window, utils ) { + + + +// -------------------------- animate -------------------------- // + +var proto = {}; + +proto.startAnimation = function() { + if ( this.isAnimating ) { + return; + } + + this.isAnimating = true; + this.restingFrames = 0; + this.animate(); +}; + +proto.animate = function() { + this.applyDragForce(); + this.applySelectedAttraction(); + + var previousX = this.x; + + this.integratePhysics(); + this.positionSlider(); + this.settle( previousX ); + // animate next frame + if ( this.isAnimating ) { + var _this = this; + requestAnimationFrame( function animateFrame() { + _this.animate(); + }); + } +}; + +proto.positionSlider = function() { + var x = this.x; + // wrap position around + if ( this.options.wrapAround && this.cells.length > 1 ) { + x = utils.modulo( x, this.slideableWidth ); + x = x - this.slideableWidth; + this.shiftWrapCells( x ); + } + + this.setTranslateX( x, this.isAnimating ); + this.dispatchScrollEvent(); +}; + +proto.setTranslateX = function( x, is3d ) { + x += this.cursorPosition; + // reverse if right-to-left and using transform + x = this.options.rightToLeft ? -x : x; + var translateX = this.getPositionValue( x ); + // use 3D tranforms for hardware acceleration on iOS + // but use 2D when settled, for better font-rendering + this.slider.style.transform = is3d ? + 'translate3d(' + translateX + ',0,0)' : 'translateX(' + translateX + ')'; +}; + +proto.dispatchScrollEvent = function() { + var firstSlide = this.slides[0]; + if ( !firstSlide ) { + return; + } + var positionX = -this.x - firstSlide.target; + var progress = positionX / this.slidesWidth; + this.dispatchEvent( 'scroll', null, [ progress, positionX ] ); +}; + +proto.positionSliderAtSelected = function() { + if ( !this.cells.length ) { + return; + } + this.x = -this.selectedSlide.target; + this.velocity = 0; // stop wobble + this.positionSlider(); +}; + +proto.getPositionValue = function( position ) { + if ( this.options.percentPosition ) { + // percent position, round to 2 digits, like 12.34% + return ( Math.round( ( position / this.size.innerWidth ) * 10000 ) * 0.01 )+ '%'; + } else { + // pixel positioning + return Math.round( position ) + 'px'; + } +}; + +proto.settle = function( previousX ) { + // keep track of frames where x hasn't moved + if ( !this.isPointerDown && Math.round( this.x * 100 ) == Math.round( previousX * 100 ) ) { + this.restingFrames++; + } + // stop animating if resting for 3 or more frames + if ( this.restingFrames > 2 ) { + this.isAnimating = false; + delete this.isFreeScrolling; + // render position with translateX when settled + this.positionSlider(); + this.dispatchEvent( 'settle', null, [ this.selectedIndex ] ); + } +}; + +proto.shiftWrapCells = function( x ) { + // shift before cells + var beforeGap = this.cursorPosition + x; + this._shiftCells( this.beforeShiftCells, beforeGap, -1 ); + // shift after cells + var afterGap = this.size.innerWidth - ( x + this.slideableWidth + this.cursorPosition ); + this._shiftCells( this.afterShiftCells, afterGap, 1 ); +}; + +proto._shiftCells = function( cells, gap, shift ) { + for ( var i=0; i < cells.length; i++ ) { + var cell = cells[i]; + var cellShift = gap > 0 ? shift : 0; + cell.wrapShift( cellShift ); + gap -= cell.size.outerWidth; + } +}; + +proto._unshiftCells = function( cells ) { + if ( !cells || !cells.length ) { + return; + } + for ( var i=0; i < cells.length; i++ ) { + cells[i].wrapShift( 0 ); + } +}; + +// -------------------------- physics -------------------------- // + +proto.integratePhysics = function() { + this.x += this.velocity; + this.velocity *= this.getFrictionFactor(); +}; + +proto.applyForce = function( force ) { + this.velocity += force; +}; + +proto.getFrictionFactor = function() { + return 1 - this.options[ this.isFreeScrolling ? 'freeScrollFriction' : 'friction' ]; +}; + +proto.getRestingPosition = function() { + // my thanks to Steven Wittens, who simplified this math greatly + return this.x + this.velocity / ( 1 - this.getFrictionFactor() ); +}; + +proto.applyDragForce = function() { + if ( !this.isDraggable || !this.isPointerDown ) { + return; + } + // change the position to drag position by applying force + var dragVelocity = this.dragX - this.x; + var dragForce = dragVelocity - this.velocity; + this.applyForce( dragForce ); +}; + +proto.applySelectedAttraction = function() { + // do not attract if pointer down or no slides + var dragDown = this.isDraggable && this.isPointerDown; + if ( dragDown || this.isFreeScrolling || !this.slides.length ) { + return; + } + var distance = this.selectedSlide.target * -1 - this.x; + var force = distance * this.options.selectedAttraction; + this.applyForce( force ); +}; + +return proto; + +})); + +// Flickity main +( function( window, factory ) { + // universal module definition + /* jshint strict: false */ + if ( typeof define == 'function' && define.amd ) { + // AMD + define( 'flickity/js/flickity',[ + 'ev-emitter/ev-emitter', + 'get-size/get-size', + 'fizzy-ui-utils/utils', + './cell', + './slide', + './animate' + ], function( EvEmitter, getSize, utils, Cell, Slide, animatePrototype ) { + return factory( window, EvEmitter, getSize, utils, Cell, Slide, animatePrototype ); + }); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory( + window, + require('ev-emitter'), + require('get-size'), + require('fizzy-ui-utils'), + require('./cell'), + require('./slide'), + require('./animate') + ); + } else { + // browser global + var _Flickity = window.Flickity; + + window.Flickity = factory( + window, + window.EvEmitter, + window.getSize, + window.fizzyUIUtils, + _Flickity.Cell, + _Flickity.Slide, + _Flickity.animatePrototype + ); + } + +}( window, function factory( window, EvEmitter, getSize, + utils, Cell, Slide, animatePrototype ) { + + + +// vars +var jQuery = window.jQuery; +var getComputedStyle = window.getComputedStyle; +var console = window.console; + +function moveElements( elems, toElem ) { + elems = utils.makeArray( elems ); + while ( elems.length ) { + toElem.appendChild( elems.shift() ); + } +} + +// -------------------------- Flickity -------------------------- // + +// globally unique identifiers +var GUID = 0; +// internal store of all Flickity intances +var instances = {}; + +function Flickity( element, options ) { + var queryElement = utils.getQueryElement( element ); + if ( !queryElement ) { + if ( console ) { + console.error( 'Bad element for Flickity: ' + ( queryElement || element ) ); + } + return; + } + this.element = queryElement; + // do not initialize twice on same element + if ( this.element.flickityGUID ) { + var instance = instances[ this.element.flickityGUID ]; + instance.option( options ); + return instance; + } + + // add jQuery + if ( jQuery ) { + this.$element = jQuery( this.element ); + } + // options + this.options = utils.extend( {}, this.constructor.defaults ); + this.option( options ); + + // kick things off + this._create(); +} + +Flickity.defaults = { + accessibility: true, + // adaptiveHeight: false, + cellAlign: 'center', + // cellSelector: undefined, + // contain: false, + freeScrollFriction: 0.075, // friction when free-scrolling + friction: 0.28, // friction when selecting + namespaceJQueryEvents: true, + // initialIndex: 0, + percentPosition: true, + resize: true, + selectedAttraction: 0.025, + setGallerySize: true + // watchCSS: false, + // wrapAround: false +}; + +// hash of methods triggered on _create() +Flickity.createMethods = []; + +var proto = Flickity.prototype; +// inherit EventEmitter +utils.extend( proto, EvEmitter.prototype ); + +proto._create = function() { + // add id for Flickity.data + var id = this.guid = ++GUID; + this.element.flickityGUID = id; // expando + instances[ id ] = this; // associate via id + // initial properties + this.selectedIndex = 0; + // how many frames slider has been in same position + this.restingFrames = 0; + // initial physics properties + this.x = 0; + this.velocity = 0; + this.originSide = this.options.rightToLeft ? 'right' : 'left'; + // create viewport & slider + this.viewport = document.createElement('div'); + this.viewport.className = 'flickity-viewport'; + this._createSlider(); + + if ( this.options.resize || this.options.watchCSS ) { + window.addEventListener( 'resize', this ); + } + + // add listeners from on option + for ( var eventName in this.options.on ) { + var listener = this.options.on[ eventName ]; + this.on( eventName, listener ); + } + + Flickity.createMethods.forEach( function( method ) { + this[ method ](); + }, this ); + + if ( this.options.watchCSS ) { + this.watchCSS(); + } else { + this.activate(); + } + +}; + +/** + * set options + * @param {Object} opts + */ +proto.option = function( opts ) { + utils.extend( this.options, opts ); +}; + +proto.activate = function() { + if ( this.isActive ) { + return; + } + this.isActive = true; + this.element.classList.add('flickity-enabled'); + if ( this.options.rightToLeft ) { + this.element.classList.add('flickity-rtl'); + } + + this.getSize(); + // move initial cell elements so they can be loaded as cells + var cellElems = this._filterFindCellElements( this.element.children ); + moveElements( cellElems, this.slider ); + this.viewport.appendChild( this.slider ); + this.element.appendChild( this.viewport ); + // get cells from children + this.reloadCells(); + + if ( this.options.accessibility ) { + // allow element to focusable + this.element.tabIndex = 0; + // listen for key presses + this.element.addEventListener( 'keydown', this ); + } + + this.emitEvent('activate'); + this.selectInitialIndex(); + // flag for initial activation, for using initialIndex + this.isInitActivated = true; + // ready event. #493 + this.dispatchEvent('ready'); +}; + +// slider positions the cells +proto._createSlider = function() { + // slider element does all the positioning + var slider = document.createElement('div'); + slider.className = 'flickity-slider'; + slider.style[ this.originSide ] = 0; + this.slider = slider; +}; + +proto._filterFindCellElements = function( elems ) { + return utils.filterFindElements( elems, this.options.cellSelector ); +}; + +// goes through all children +proto.reloadCells = function() { + // collection of item elements + this.cells = this._makeCells( this.slider.children ); + this.positionCells(); + this._getWrapShiftCells(); + this.setGallerySize(); +}; + +/** + * turn elements into Flickity.Cells + * @param {Array or NodeList or HTMLElement} elems + * @returns {Array} items - collection of new Flickity Cells + */ +proto._makeCells = function( elems ) { + var cellElems = this._filterFindCellElements( elems ); + + // create new Flickity for collection + var cells = cellElems.map( function( cellElem ) { + return new Cell( cellElem, this ); + }, this ); + + return cells; +}; + +proto.getLastCell = function() { + return this.cells[ this.cells.length - 1 ]; +}; + +proto.getLastSlide = function() { + return this.slides[ this.slides.length - 1 ]; +}; + +// positions all cells +proto.positionCells = function() { + // size all cells + this._sizeCells( this.cells ); + // position all cells + this._positionCells( 0 ); +}; + +/** + * position certain cells + * @param {Integer} index - which cell to start with + */ +proto._positionCells = function( index ) { + index = index || 0; + // also measure maxCellHeight + // start 0 if positioning all cells + this.maxCellHeight = index ? this.maxCellHeight || 0 : 0; + var cellX = 0; + // get cellX + if ( index > 0 ) { + var startCell = this.cells[ index - 1 ]; + cellX = startCell.x + startCell.size.outerWidth; + } + var len = this.cells.length; + for ( var i=index; i < len; i++ ) { + var cell = this.cells[i]; + cell.setPosition( cellX ); + cellX += cell.size.outerWidth; + this.maxCellHeight = Math.max( cell.size.outerHeight, this.maxCellHeight ); + } + // keep track of cellX for wrap-around + this.slideableWidth = cellX; + // slides + this.updateSlides(); + // contain slides target + this._containSlides(); + // update slidesWidth + this.slidesWidth = len ? this.getLastSlide().target - this.slides[0].target : 0; +}; + +/** + * cell.getSize() on multiple cells + * @param {Array} cells + */ +proto._sizeCells = function( cells ) { + cells.forEach( function( cell ) { + cell.getSize(); + }); +}; + +// -------------------------- -------------------------- // + +proto.updateSlides = function() { + this.slides = []; + if ( !this.cells.length ) { + return; + } + + var slide = new Slide( this ); + this.slides.push( slide ); + var isOriginLeft = this.originSide == 'left'; + var nextMargin = isOriginLeft ? 'marginRight' : 'marginLeft'; + + var canCellFit = this._getCanCellFit(); + + this.cells.forEach( function( cell, i ) { + // just add cell if first cell in slide + if ( !slide.cells.length ) { + slide.addCell( cell ); + return; + } + + var slideWidth = ( slide.outerWidth - slide.firstMargin ) + + ( cell.size.outerWidth - cell.size[ nextMargin ] ); + + if ( canCellFit.call( this, i, slideWidth ) ) { + slide.addCell( cell ); + } else { + // doesn't fit, new slide + slide.updateTarget(); + + slide = new Slide( this ); + this.slides.push( slide ); + slide.addCell( cell ); + } + }, this ); + // last slide + slide.updateTarget(); + // update .selectedSlide + this.updateSelectedSlide(); +}; + +proto._getCanCellFit = function() { + var groupCells = this.options.groupCells; + if ( !groupCells ) { + return function() { + return false; + }; + } else if ( typeof groupCells == 'number' ) { + // group by number. 3 -> [0,1,2], [3,4,5], ... + var number = parseInt( groupCells, 10 ); + return function( i ) { + return ( i % number ) !== 0; + }; + } + // default, group by width of slide + // parse '75% + var percentMatch = typeof groupCells == 'string' && + groupCells.match(/^(\d+)%$/); + var percent = percentMatch ? parseInt( percentMatch[1], 10 ) / 100 : 1; + return function( i, slideWidth ) { + return slideWidth <= ( this.size.innerWidth + 1 ) * percent; + }; +}; + +// alias _init for jQuery plugin .flickity() +proto._init = +proto.reposition = function() { + this.positionCells(); + this.positionSliderAtSelected(); +}; + +proto.getSize = function() { + this.size = getSize( this.element ); + this.setCellAlign(); + this.cursorPosition = this.size.innerWidth * this.cellAlign; +}; + +var cellAlignShorthands = { + // cell align, then based on origin side + center: { + left: 0.5, + right: 0.5 + }, + left: { + left: 0, + right: 1 + }, + right: { + right: 0, + left: 1 + } +}; + +proto.setCellAlign = function() { + var shorthand = cellAlignShorthands[ this.options.cellAlign ]; + this.cellAlign = shorthand ? shorthand[ this.originSide ] : this.options.cellAlign; +}; + +proto.setGallerySize = function() { + if ( this.options.setGallerySize ) { + var height = this.options.adaptiveHeight && this.selectedSlide ? + this.selectedSlide.height : this.maxCellHeight; + this.viewport.style.height = height + 'px'; + } +}; + +proto._getWrapShiftCells = function() { + // only for wrap-around + if ( !this.options.wrapAround ) { + return; + } + // unshift previous cells + this._unshiftCells( this.beforeShiftCells ); + this._unshiftCells( this.afterShiftCells ); + // get before cells + // initial gap + var gapX = this.cursorPosition; + var cellIndex = this.cells.length - 1; + this.beforeShiftCells = this._getGapCells( gapX, cellIndex, -1 ); + // get after cells + // ending gap between last cell and end of gallery viewport + gapX = this.size.innerWidth - this.cursorPosition; + // start cloning at first cell, working forwards + this.afterShiftCells = this._getGapCells( gapX, 0, 1 ); +}; + +proto._getGapCells = function( gapX, cellIndex, increment ) { + // keep adding cells until the cover the initial gap + var cells = []; + while ( gapX > 0 ) { + var cell = this.cells[ cellIndex ]; + if ( !cell ) { + break; + } + cells.push( cell ); + cellIndex += increment; + gapX -= cell.size.outerWidth; + } + return cells; +}; + +// ----- contain ----- // + +// contain cell targets so no excess sliding +proto._containSlides = function() { + if ( !this.options.contain || this.options.wrapAround || !this.cells.length ) { + return; + } + var isRightToLeft = this.options.rightToLeft; + var beginMargin = isRightToLeft ? 'marginRight' : 'marginLeft'; + var endMargin = isRightToLeft ? 'marginLeft' : 'marginRight'; + var contentWidth = this.slideableWidth - this.getLastCell().size[ endMargin ]; + // content is less than gallery size + var isContentSmaller = contentWidth < this.size.innerWidth; + // bounds + var beginBound = this.cursorPosition + this.cells[0].size[ beginMargin ]; + var endBound = contentWidth - this.size.innerWidth * ( 1 - this.cellAlign ); + // contain each cell target + this.slides.forEach( function( slide ) { + if ( isContentSmaller ) { + // all cells fit inside gallery + slide.target = contentWidth * this.cellAlign; + } else { + // contain to bounds + slide.target = Math.max( slide.target, beginBound ); + slide.target = Math.min( slide.target, endBound ); + } + }, this ); +}; + +// ----- ----- // + +/** + * emits events via eventEmitter and jQuery events + * @param {String} type - name of event + * @param {Event} event - original event + * @param {Array} args - extra arguments + */ +proto.dispatchEvent = function( type, event, args ) { + var emitArgs = event ? [ event ].concat( args ) : args; + this.emitEvent( type, emitArgs ); + + if ( jQuery && this.$element ) { + // default trigger with type if no event + type += this.options.namespaceJQueryEvents ? '.flickity' : ''; + var $event = type; + if ( event ) { + // create jQuery event + var jQEvent = jQuery.Event( event ); + jQEvent.type = type; + $event = jQEvent; + } + this.$element.trigger( $event, args ); + } +}; + +// -------------------------- select -------------------------- // + +/** + * @param {Integer} index - index of the slide + * @param {Boolean} isWrap - will wrap-around to last/first if at the end + * @param {Boolean} isInstant - will immediately set position at selected cell + */ +proto.select = function( index, isWrap, isInstant ) { + if ( !this.isActive ) { + return; + } + index = parseInt( index, 10 ); + this._wrapSelect( index ); + + if ( this.options.wrapAround || isWrap ) { + index = utils.modulo( index, this.slides.length ); + } + // bail if invalid index + if ( !this.slides[ index ] ) { + return; + } + var prevIndex = this.selectedIndex; + this.selectedIndex = index; + this.updateSelectedSlide(); + if ( isInstant ) { + this.positionSliderAtSelected(); + } else { + this.startAnimation(); + } + if ( this.options.adaptiveHeight ) { + this.setGallerySize(); + } + // events + this.dispatchEvent( 'select', null, [ index ] ); + // change event if new index + if ( index != prevIndex ) { + this.dispatchEvent( 'change', null, [ index ] ); + } + // old v1 event name, remove in v3 + this.dispatchEvent('cellSelect'); +}; + +// wraps position for wrapAround, to move to closest slide. #113 +proto._wrapSelect = function( index ) { + var len = this.slides.length; + var isWrapping = this.options.wrapAround && len > 1; + if ( !isWrapping ) { + return index; + } + var wrapIndex = utils.modulo( index, len ); + // go to shortest + var delta = Math.abs( wrapIndex - this.selectedIndex ); + var backWrapDelta = Math.abs( ( wrapIndex + len ) - this.selectedIndex ); + var forewardWrapDelta = Math.abs( ( wrapIndex - len ) - this.selectedIndex ); + if ( !this.isDragSelect && backWrapDelta < delta ) { + index += len; + } else if ( !this.isDragSelect && forewardWrapDelta < delta ) { + index -= len; + } + // wrap position so slider is within normal area + if ( index < 0 ) { + this.x -= this.slideableWidth; + } else if ( index >= len ) { + this.x += this.slideableWidth; + } +}; + +proto.previous = function( isWrap, isInstant ) { + this.select( this.selectedIndex - 1, isWrap, isInstant ); +}; + +proto.next = function( isWrap, isInstant ) { + this.select( this.selectedIndex + 1, isWrap, isInstant ); +}; + +proto.updateSelectedSlide = function() { + var slide = this.slides[ this.selectedIndex ]; + // selectedIndex could be outside of slides, if triggered before resize() + if ( !slide ) { + return; + } + // unselect previous selected slide + this.unselectSelectedSlide(); + // update new selected slide + this.selectedSlide = slide; + slide.select(); + this.selectedCells = slide.cells; + this.selectedElements = slide.getCellElements(); + // HACK: selectedCell & selectedElement is first cell in slide, backwards compatibility + // Remove in v3? + this.selectedCell = slide.cells[0]; + this.selectedElement = this.selectedElements[0]; +}; + +proto.unselectSelectedSlide = function() { + if ( this.selectedSlide ) { + this.selectedSlide.unselect(); + } +}; + +proto.selectInitialIndex = function() { + var initialIndex = this.options.initialIndex; + // already activated, select previous selectedIndex + if ( this.isInitActivated ) { + this.select( this.selectedIndex, false, true ); + return; + } + // select with selector string + if ( initialIndex && typeof initialIndex == 'string' ) { + var cell = this.queryCell( initialIndex ); + if ( cell ) { + this.selectCell( initialIndex, false, true ); + return; + } + } + + var index = 0; + // select with number + if ( initialIndex && this.slides[ initialIndex ] ) { + index = initialIndex; + } + // select instantly + this.select( index, false, true ); +}; + +/** + * select slide from number or cell element + * @param {Element or Number} elem + */ +proto.selectCell = function( value, isWrap, isInstant ) { + // get cell + var cell = this.queryCell( value ); + if ( !cell ) { + return; + } + + var index = this.getCellSlideIndex( cell ); + this.select( index, isWrap, isInstant ); +}; + +proto.getCellSlideIndex = function( cell ) { + // get index of slides that has cell + for ( var i=0; i < this.slides.length; i++ ) { + var slide = this.slides[i]; + var index = slide.cells.indexOf( cell ); + if ( index != -1 ) { + return i; + } + } +}; + +// -------------------------- get cells -------------------------- // + +/** + * get Flickity.Cell, given an Element + * @param {Element} elem + * @returns {Flickity.Cell} item + */ +proto.getCell = function( elem ) { + // loop through cells to get the one that matches + for ( var i=0; i < this.cells.length; i++ ) { + var cell = this.cells[i]; + if ( cell.element == elem ) { + return cell; + } + } +}; + +/** + * get collection of Flickity.Cells, given Elements + * @param {Element, Array, NodeList} elems + * @returns {Array} cells - Flickity.Cells + */ +proto.getCells = function( elems ) { + elems = utils.makeArray( elems ); + var cells = []; + elems.forEach( function( elem ) { + var cell = this.getCell( elem ); + if ( cell ) { + cells.push( cell ); + } + }, this ); + return cells; +}; + +/** + * get cell elements + * @returns {Array} cellElems + */ +proto.getCellElements = function() { + return this.cells.map( function( cell ) { + return cell.element; + }); +}; + +/** + * get parent cell from an element + * @param {Element} elem + * @returns {Flickit.Cell} cell + */ +proto.getParentCell = function( elem ) { + // first check if elem is cell + var cell = this.getCell( elem ); + if ( cell ) { + return cell; + } + // try to get parent cell elem + elem = utils.getParent( elem, '.flickity-slider > *' ); + return this.getCell( elem ); +}; + +/** + * get cells adjacent to a slide + * @param {Integer} adjCount - number of adjacent slides + * @param {Integer} index - index of slide to start + * @returns {Array} cells - array of Flickity.Cells + */ +proto.getAdjacentCellElements = function( adjCount, index ) { + if ( !adjCount ) { + return this.selectedSlide.getCellElements(); + } + index = index === undefined ? this.selectedIndex : index; + + var len = this.slides.length; + if ( 1 + ( adjCount * 2 ) >= len ) { + return this.getCellElements(); + } + + var cellElems = []; + for ( var i = index - adjCount; i <= index + adjCount ; i++ ) { + var slideIndex = this.options.wrapAround ? utils.modulo( i, len ) : i; + var slide = this.slides[ slideIndex ]; + if ( slide ) { + cellElems = cellElems.concat( slide.getCellElements() ); + } + } + return cellElems; +}; + +/** + * select slide from number or cell element + * @param {Element, Selector String, or Number} selector + */ +proto.queryCell = function( selector ) { + if ( typeof selector == 'number' ) { + // use number as index + return this.cells[ selector ]; + } + if ( typeof selector == 'string' ) { + // do not select invalid selectors from hash: #123, #/. #791 + if ( selector.match(/^[#\.]?[\d\/]/) ) { + return; + } + // use string as selector, get element + selector = this.element.querySelector( selector ); + } + // get cell from element + return this.getCell( selector ); +}; + +// -------------------------- events -------------------------- // + +proto.uiChange = function() { + this.emitEvent('uiChange'); +}; + +// keep focus on element when child UI elements are clicked +proto.childUIPointerDown = function( event ) { + // HACK iOS does not allow touch events to bubble up?! + if ( event.type != 'touchstart' ) { + event.preventDefault(); + } + this.focus(); +}; + +// ----- resize ----- // + +proto.onresize = function() { + this.watchCSS(); + this.resize(); +}; + +utils.debounceMethod( Flickity, 'onresize', 150 ); + +proto.resize = function() { + if ( !this.isActive ) { + return; + } + this.getSize(); + // wrap values + if ( this.options.wrapAround ) { + this.x = utils.modulo( this.x, this.slideableWidth ); + } + this.positionCells(); + this._getWrapShiftCells(); + this.setGallerySize(); + this.emitEvent('resize'); + // update selected index for group slides, instant + // TODO: position can be lost between groups of various numbers + var selectedElement = this.selectedElements && this.selectedElements[0]; + this.selectCell( selectedElement, false, true ); +}; + +// watches the :after property, activates/deactivates +proto.watchCSS = function() { + var watchOption = this.options.watchCSS; + if ( !watchOption ) { + return; + } + + var afterContent = getComputedStyle( this.element, ':after' ).content; + // activate if :after { content: 'flickity' } + if ( afterContent.indexOf('flickity') != -1 ) { + this.activate(); + } else { + this.deactivate(); + } +}; + +// ----- keydown ----- // + +// go previous/next if left/right keys pressed +proto.onkeydown = function( event ) { + // only work if element is in focus + var isNotFocused = document.activeElement && document.activeElement != this.element; + if ( !this.options.accessibility ||isNotFocused ) { + return; + } + + var handler = Flickity.keyboardHandlers[ event.keyCode ]; + if ( handler ) { + handler.call( this ); + } +}; + +Flickity.keyboardHandlers = { + // left arrow + 37: function() { + var leftMethod = this.options.rightToLeft ? 'next' : 'previous'; + this.uiChange(); + this[ leftMethod ](); + }, + // right arrow + 39: function() { + var rightMethod = this.options.rightToLeft ? 'previous' : 'next'; + this.uiChange(); + this[ rightMethod ](); + }, +}; + +// ----- focus ----- // + +proto.focus = function() { + // TODO remove scrollTo once focus options gets more support + // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#Browser_compatibility + var prevScrollY = window.pageYOffset; + this.element.focus({ preventScroll: true }); + // hack to fix scroll jump after focus, #76 + if ( window.pageYOffset != prevScrollY ) { + window.scrollTo( window.pageXOffset, prevScrollY ); + } +}; + +// -------------------------- destroy -------------------------- // + +// deactivate all Flickity functionality, but keep stuff available +proto.deactivate = function() { + if ( !this.isActive ) { + return; + } + this.element.classList.remove('flickity-enabled'); + this.element.classList.remove('flickity-rtl'); + this.unselectSelectedSlide(); + // destroy cells + this.cells.forEach( function( cell ) { + cell.destroy(); + }); + this.element.removeChild( this.viewport ); + // move child elements back into element + moveElements( this.slider.children, this.element ); + if ( this.options.accessibility ) { + this.element.removeAttribute('tabIndex'); + this.element.removeEventListener( 'keydown', this ); + } + // set flags + this.isActive = false; + this.emitEvent('deactivate'); +}; + +proto.destroy = function() { + this.deactivate(); + window.removeEventListener( 'resize', this ); + this.allOff(); + this.emitEvent('destroy'); + if ( jQuery && this.$element ) { + jQuery.removeData( this.element, 'flickity' ); + } + delete this.element.flickityGUID; + delete instances[ this.guid ]; +}; + +// -------------------------- prototype -------------------------- // + +utils.extend( proto, animatePrototype ); + +// -------------------------- extras -------------------------- // + +/** + * get Flickity instance from element + * @param {Element} elem + * @returns {Flickity} + */ +Flickity.data = function( elem ) { + elem = utils.getQueryElement( elem ); + var id = elem && elem.flickityGUID; + return id && instances[ id ]; +}; + +utils.htmlInit( Flickity, 'flickity' ); + +if ( jQuery && jQuery.bridget ) { + jQuery.bridget( 'flickity', Flickity ); +} + +// set internal jQuery, for Webpack + jQuery v3, #478 +Flickity.setJQuery = function( jq ) { + jQuery = jq; +}; + +Flickity.Cell = Cell; +Flickity.Slide = Slide; + +return Flickity; + +})); + +/*! + * Unipointer v2.3.0 + * base class for doing one thing with pointer event + * MIT license + */ + +/*jshint browser: true, undef: true, unused: true, strict: true */ + +( function( window, factory ) { + // universal module definition + /* jshint strict: false */ /*global define, module, require */ + if ( typeof define == 'function' && define.amd ) { + // AMD + define( 'unipointer/unipointer',[ + 'ev-emitter/ev-emitter' + ], function( EvEmitter ) { + return factory( window, EvEmitter ); + }); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory( + window, + require('ev-emitter') + ); + } else { + // browser global + window.Unipointer = factory( + window, + window.EvEmitter + ); + } + +}( window, function factory( window, EvEmitter ) { + + + +function noop() {} + +function Unipointer() {} + +// inherit EvEmitter +var proto = Unipointer.prototype = Object.create( EvEmitter.prototype ); + +proto.bindStartEvent = function( elem ) { + this._bindStartEvent( elem, true ); +}; + +proto.unbindStartEvent = function( elem ) { + this._bindStartEvent( elem, false ); +}; + +/** + * Add or remove start event + * @param {Boolean} isAdd - remove if falsey + */ +proto._bindStartEvent = function( elem, isAdd ) { + // munge isAdd, default to true + isAdd = isAdd === undefined ? true : isAdd; + var bindMethod = isAdd ? 'addEventListener' : 'removeEventListener'; + + // default to mouse events + var startEvent = 'mousedown'; + if ( window.PointerEvent ) { + // Pointer Events + startEvent = 'pointerdown'; + } else if ( 'ontouchstart' in window ) { + // Touch Events. iOS Safari + startEvent = 'touchstart'; + } + elem[ bindMethod ]( startEvent, this ); +}; + +// trigger handler methods for events +proto.handleEvent = function( event ) { + var method = 'on' + event.type; + if ( this[ method ] ) { + this[ method ]( event ); + } +}; + +// returns the touch that we're keeping track of +proto.getTouch = function( touches ) { + for ( var i=0; i < touches.length; i++ ) { + var touch = touches[i]; + if ( touch.identifier == this.pointerIdentifier ) { + return touch; + } + } +}; + +// ----- start event ----- // + +proto.onmousedown = function( event ) { + // dismiss clicks from right or middle buttons + var button = event.button; + if ( button && ( button !== 0 && button !== 1 ) ) { + return; + } + this._pointerDown( event, event ); +}; + +proto.ontouchstart = function( event ) { + this._pointerDown( event, event.changedTouches[0] ); +}; + +proto.onpointerdown = function( event ) { + this._pointerDown( event, event ); +}; + +/** + * pointer start + * @param {Event} event + * @param {Event or Touch} pointer + */ +proto._pointerDown = function( event, pointer ) { + // dismiss right click and other pointers + // button = 0 is okay, 1-4 not + if ( event.button || this.isPointerDown ) { + return; + } + + this.isPointerDown = true; + // save pointer identifier to match up touch events + this.pointerIdentifier = pointer.pointerId !== undefined ? + // pointerId for pointer events, touch.indentifier for touch events + pointer.pointerId : pointer.identifier; + + this.pointerDown( event, pointer ); +}; + +proto.pointerDown = function( event, pointer ) { + this._bindPostStartEvents( event ); + this.emitEvent( 'pointerDown', [ event, pointer ] ); +}; + +// hash of events to be bound after start event +var postStartEvents = { + mousedown: [ 'mousemove', 'mouseup' ], + touchstart: [ 'touchmove', 'touchend', 'touchcancel' ], + pointerdown: [ 'pointermove', 'pointerup', 'pointercancel' ], +}; + +proto._bindPostStartEvents = function( event ) { + if ( !event ) { + return; + } + // get proper events to match start event + var events = postStartEvents[ event.type ]; + // bind events to node + events.forEach( function( eventName ) { + window.addEventListener( eventName, this ); + }, this ); + // save these arguments + this._boundPointerEvents = events; +}; + +proto._unbindPostStartEvents = function() { + // check for _boundEvents, in case dragEnd triggered twice (old IE8 bug) + if ( !this._boundPointerEvents ) { + return; + } + this._boundPointerEvents.forEach( function( eventName ) { + window.removeEventListener( eventName, this ); + }, this ); + + delete this._boundPointerEvents; +}; + +// ----- move event ----- // + +proto.onmousemove = function( event ) { + this._pointerMove( event, event ); +}; + +proto.onpointermove = function( event ) { + if ( event.pointerId == this.pointerIdentifier ) { + this._pointerMove( event, event ); + } +}; + +proto.ontouchmove = function( event ) { + var touch = this.getTouch( event.changedTouches ); + if ( touch ) { + this._pointerMove( event, touch ); + } +}; + +/** + * pointer move + * @param {Event} event + * @param {Event or Touch} pointer + * @private + */ +proto._pointerMove = function( event, pointer ) { + this.pointerMove( event, pointer ); +}; + +// public +proto.pointerMove = function( event, pointer ) { + this.emitEvent( 'pointerMove', [ event, pointer ] ); +}; + +// ----- end event ----- // + + +proto.onmouseup = function( event ) { + this._pointerUp( event, event ); +}; + +proto.onpointerup = function( event ) { + if ( event.pointerId == this.pointerIdentifier ) { + this._pointerUp( event, event ); + } +}; + +proto.ontouchend = function( event ) { + var touch = this.getTouch( event.changedTouches ); + if ( touch ) { + this._pointerUp( event, touch ); + } +}; + +/** + * pointer up + * @param {Event} event + * @param {Event or Touch} pointer + * @private + */ +proto._pointerUp = function( event, pointer ) { + this._pointerDone(); + this.pointerUp( event, pointer ); +}; + +// public +proto.pointerUp = function( event, pointer ) { + this.emitEvent( 'pointerUp', [ event, pointer ] ); +}; + +// ----- pointer done ----- // + +// triggered on pointer up & pointer cancel +proto._pointerDone = function() { + this._pointerReset(); + this._unbindPostStartEvents(); + this.pointerDone(); +}; + +proto._pointerReset = function() { + // reset properties + this.isPointerDown = false; + delete this.pointerIdentifier; +}; + +proto.pointerDone = noop; + +// ----- pointer cancel ----- // + +proto.onpointercancel = function( event ) { + if ( event.pointerId == this.pointerIdentifier ) { + this._pointerCancel( event, event ); + } +}; + +proto.ontouchcancel = function( event ) { + var touch = this.getTouch( event.changedTouches ); + if ( touch ) { + this._pointerCancel( event, touch ); + } +}; + +/** + * pointer cancel + * @param {Event} event + * @param {Event or Touch} pointer + * @private + */ +proto._pointerCancel = function( event, pointer ) { + this._pointerDone(); + this.pointerCancel( event, pointer ); +}; + +// public +proto.pointerCancel = function( event, pointer ) { + this.emitEvent( 'pointerCancel', [ event, pointer ] ); +}; + +// ----- ----- // + +// utility function for getting x/y coords from event +Unipointer.getPointerPoint = function( pointer ) { + return { + x: pointer.pageX, + y: pointer.pageY + }; +}; + +// ----- ----- // + +return Unipointer; + +})); + +/*! + * Unidragger v2.3.0 + * Draggable base class + * MIT license + */ + +/*jshint browser: true, unused: true, undef: true, strict: true */ + +( function( window, factory ) { + // universal module definition + /*jshint strict: false */ /*globals define, module, require */ + + if ( typeof define == 'function' && define.amd ) { + // AMD + define( 'unidragger/unidragger',[ + 'unipointer/unipointer' + ], function( Unipointer ) { + return factory( window, Unipointer ); + }); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory( + window, + require('unipointer') + ); + } else { + // browser global + window.Unidragger = factory( + window, + window.Unipointer + ); + } + +}( window, function factory( window, Unipointer ) { + + + +// -------------------------- Unidragger -------------------------- // + +function Unidragger() {} + +// inherit Unipointer & EvEmitter +var proto = Unidragger.prototype = Object.create( Unipointer.prototype ); + +// ----- bind start ----- // + +proto.bindHandles = function() { + this._bindHandles( true ); +}; + +proto.unbindHandles = function() { + this._bindHandles( false ); +}; + +/** + * Add or remove start event + * @param {Boolean} isAdd + */ +proto._bindHandles = function( isAdd ) { + // munge isAdd, default to true + isAdd = isAdd === undefined ? true : isAdd; + // bind each handle + var bindMethod = isAdd ? 'addEventListener' : 'removeEventListener'; + var touchAction = isAdd ? this._touchActionValue : ''; + for ( var i=0; i < this.handles.length; i++ ) { + var handle = this.handles[i]; + this._bindStartEvent( handle, isAdd ); + handle[ bindMethod ]( 'click', this ); + // touch-action: none to override browser touch gestures. metafizzy/flickity#540 + if ( window.PointerEvent ) { + handle.style.touchAction = touchAction; + } + } +}; + +// prototype so it can be overwriteable by Flickity +proto._touchActionValue = 'none'; + +// ----- start event ----- // + +/** + * pointer start + * @param {Event} event + * @param {Event or Touch} pointer + */ +proto.pointerDown = function( event, pointer ) { + var isOkay = this.okayPointerDown( event ); + if ( !isOkay ) { + return; + } + // track start event position + this.pointerDownPointer = pointer; + + event.preventDefault(); + this.pointerDownBlur(); + // bind move and end events + this._bindPostStartEvents( event ); + this.emitEvent( 'pointerDown', [ event, pointer ] ); +}; + +// nodes that have text fields +var cursorNodes = { + TEXTAREA: true, + INPUT: true, + SELECT: true, + OPTION: true, +}; + +// input types that do not have text fields +var clickTypes = { + radio: true, + checkbox: true, + button: true, + submit: true, + image: true, + file: true, +}; + +// dismiss inputs with text fields. flickity#403, flickity#404 +proto.okayPointerDown = function( event ) { + var isCursorNode = cursorNodes[ event.target.nodeName ]; + var isClickType = clickTypes[ event.target.type ]; + var isOkay = !isCursorNode || isClickType; + if ( !isOkay ) { + this._pointerReset(); + } + return isOkay; +}; + +// kludge to blur previously focused input +proto.pointerDownBlur = function() { + var focused = document.activeElement; + // do not blur body for IE10, metafizzy/flickity#117 + var canBlur = focused && focused.blur && focused != document.body; + if ( canBlur ) { + focused.blur(); + } +}; + +// ----- move event ----- // + +/** + * drag move + * @param {Event} event + * @param {Event or Touch} pointer + */ +proto.pointerMove = function( event, pointer ) { + var moveVector = this._dragPointerMove( event, pointer ); + this.emitEvent( 'pointerMove', [ event, pointer, moveVector ] ); + this._dragMove( event, pointer, moveVector ); +}; + +// base pointer move logic +proto._dragPointerMove = function( event, pointer ) { + var moveVector = { + x: pointer.pageX - this.pointerDownPointer.pageX, + y: pointer.pageY - this.pointerDownPointer.pageY + }; + // start drag if pointer has moved far enough to start drag + if ( !this.isDragging && this.hasDragStarted( moveVector ) ) { + this._dragStart( event, pointer ); + } + return moveVector; +}; + +// condition if pointer has moved far enough to start drag +proto.hasDragStarted = function( moveVector ) { + return Math.abs( moveVector.x ) > 3 || Math.abs( moveVector.y ) > 3; +}; + +// ----- end event ----- // + +/** + * pointer up + * @param {Event} event + * @param {Event or Touch} pointer + */ +proto.pointerUp = function( event, pointer ) { + this.emitEvent( 'pointerUp', [ event, pointer ] ); + this._dragPointerUp( event, pointer ); +}; + +proto._dragPointerUp = function( event, pointer ) { + if ( this.isDragging ) { + this._dragEnd( event, pointer ); + } else { + // pointer didn't move enough for drag to start + this._staticClick( event, pointer ); + } +}; + +// -------------------------- drag -------------------------- // + +// dragStart +proto._dragStart = function( event, pointer ) { + this.isDragging = true; + // prevent clicks + this.isPreventingClicks = true; + this.dragStart( event, pointer ); +}; + +proto.dragStart = function( event, pointer ) { + this.emitEvent( 'dragStart', [ event, pointer ] ); +}; + +// dragMove +proto._dragMove = function( event, pointer, moveVector ) { + // do not drag if not dragging yet + if ( !this.isDragging ) { + return; + } + + this.dragMove( event, pointer, moveVector ); +}; + +proto.dragMove = function( event, pointer, moveVector ) { + event.preventDefault(); + this.emitEvent( 'dragMove', [ event, pointer, moveVector ] ); +}; + +// dragEnd +proto._dragEnd = function( event, pointer ) { + // set flags + this.isDragging = false; + // re-enable clicking async + setTimeout( function() { + delete this.isPreventingClicks; + }.bind( this ) ); + + this.dragEnd( event, pointer ); +}; + +proto.dragEnd = function( event, pointer ) { + this.emitEvent( 'dragEnd', [ event, pointer ] ); +}; + +// ----- onclick ----- // + +// handle all clicks and prevent clicks when dragging +proto.onclick = function( event ) { + if ( this.isPreventingClicks ) { + event.preventDefault(); + } +}; + +// ----- staticClick ----- // + +// triggered after pointer down & up with no/tiny movement +proto._staticClick = function( event, pointer ) { + // ignore emulated mouse up clicks + if ( this.isIgnoringMouseUp && event.type == 'mouseup' ) { + return; + } + + this.staticClick( event, pointer ); + + // set flag for emulated clicks 300ms after touchend + if ( event.type != 'mouseup' ) { + this.isIgnoringMouseUp = true; + // reset flag after 300ms + setTimeout( function() { + delete this.isIgnoringMouseUp; + }.bind( this ), 400 ); + } +}; + +proto.staticClick = function( event, pointer ) { + this.emitEvent( 'staticClick', [ event, pointer ] ); +}; + +// ----- utils ----- // + +Unidragger.getPointerPoint = Unipointer.getPointerPoint; + +// ----- ----- // + +return Unidragger; + +})); + +// drag +( function( window, factory ) { + // universal module definition + /* jshint strict: false */ + if ( typeof define == 'function' && define.amd ) { + // AMD + define( 'flickity/js/drag',[ + './flickity', + 'unidragger/unidragger', + 'fizzy-ui-utils/utils' + ], function( Flickity, Unidragger, utils ) { + return factory( window, Flickity, Unidragger, utils ); + }); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory( + window, + require('./flickity'), + require('unidragger'), + require('fizzy-ui-utils') + ); + } else { + // browser global + window.Flickity = factory( + window, + window.Flickity, + window.Unidragger, + window.fizzyUIUtils + ); + } + +}( window, function factory( window, Flickity, Unidragger, utils ) { + + + +// ----- defaults ----- // + +utils.extend( Flickity.defaults, { + draggable: '>1', + dragThreshold: 3, +}); + +// ----- create ----- // + +Flickity.createMethods.push('_createDrag'); + +// -------------------------- drag prototype -------------------------- // + +var proto = Flickity.prototype; +utils.extend( proto, Unidragger.prototype ); +proto._touchActionValue = 'pan-y'; + +// -------------------------- -------------------------- // + +var isTouch = 'createTouch' in document; +var isTouchmoveScrollCanceled = false; + +proto._createDrag = function() { + this.on( 'activate', this.onActivateDrag ); + this.on( 'uiChange', this._uiChangeDrag ); + this.on( 'deactivate', this.onDeactivateDrag ); + this.on( 'cellChange', this.updateDraggable ); + // TODO updateDraggable on resize? if groupCells & slides change + // HACK - add seemingly innocuous handler to fix iOS 10 scroll behavior + // #457, RubaXa/Sortable#973 + if ( isTouch && !isTouchmoveScrollCanceled ) { + window.addEventListener( 'touchmove', function() {}); + isTouchmoveScrollCanceled = true; + } +}; + +proto.onActivateDrag = function() { + this.handles = [ this.viewport ]; + this.bindHandles(); + this.updateDraggable(); +}; + +proto.onDeactivateDrag = function() { + this.unbindHandles(); + this.element.classList.remove('is-draggable'); +}; + +proto.updateDraggable = function() { + // disable dragging if less than 2 slides. #278 + if ( this.options.draggable == '>1' ) { + this.isDraggable = this.slides.length > 1; + } else { + this.isDraggable = this.options.draggable; + } + if ( this.isDraggable ) { + this.element.classList.add('is-draggable'); + } else { + this.element.classList.remove('is-draggable'); + } +}; + +// backwards compatibility +proto.bindDrag = function() { + this.options.draggable = true; + this.updateDraggable(); +}; + +proto.unbindDrag = function() { + this.options.draggable = false; + this.updateDraggable(); +}; + +proto._uiChangeDrag = function() { + delete this.isFreeScrolling; +}; + +// -------------------------- pointer events -------------------------- // + +proto.pointerDown = function( event, pointer ) { + if ( !this.isDraggable ) { + this._pointerDownDefault( event, pointer ); + return; + } + var isOkay = this.okayPointerDown( event ); + if ( !isOkay ) { + return; + } + + this._pointerDownPreventDefault( event ); + this.pointerDownFocus( event ); + // blur + if ( document.activeElement != this.element ) { + // do not blur if already focused + this.pointerDownBlur(); + } + + // stop if it was moving + this.dragX = this.x; + this.viewport.classList.add('is-pointer-down'); + // track scrolling + this.pointerDownScroll = getScrollPosition(); + window.addEventListener( 'scroll', this ); + + this._pointerDownDefault( event, pointer ); +}; + +// default pointerDown logic, used for staticClick +proto._pointerDownDefault = function( event, pointer ) { + // track start event position + // Safari 9 overrides pageX and pageY. These values needs to be copied. #779 + this.pointerDownPointer = { + pageX: pointer.pageX, + pageY: pointer.pageY, + }; + // bind move and end events + this._bindPostStartEvents( event ); + this.dispatchEvent( 'pointerDown', event, [ pointer ] ); +}; + +var focusNodes = { + INPUT: true, + TEXTAREA: true, + SELECT: true, +}; + +proto.pointerDownFocus = function( event ) { + var isFocusNode = focusNodes[ event.target.nodeName ]; + if ( !isFocusNode ) { + this.focus(); + } +}; + +proto._pointerDownPreventDefault = function( event ) { + var isTouchStart = event.type == 'touchstart'; + var isTouchPointer = event.pointerType == 'touch'; + var isFocusNode = focusNodes[ event.target.nodeName ]; + if ( !isTouchStart && !isTouchPointer && !isFocusNode ) { + event.preventDefault(); + } +}; + +// ----- move ----- // + +proto.hasDragStarted = function( moveVector ) { + return Math.abs( moveVector.x ) > this.options.dragThreshold; +}; + +// ----- up ----- // + +proto.pointerUp = function( event, pointer ) { + delete this.isTouchScrolling; + this.viewport.classList.remove('is-pointer-down'); + this.dispatchEvent( 'pointerUp', event, [ pointer ] ); + this._dragPointerUp( event, pointer ); +}; + +proto.pointerDone = function() { + window.removeEventListener( 'scroll', this ); + delete this.pointerDownScroll; +}; + +// -------------------------- dragging -------------------------- // + +proto.dragStart = function( event, pointer ) { + if ( !this.isDraggable ) { + return; + } + this.dragStartPosition = this.x; + this.startAnimation(); + window.removeEventListener( 'scroll', this ); + this.dispatchEvent( 'dragStart', event, [ pointer ] ); +}; + +proto.pointerMove = function( event, pointer ) { + var moveVector = this._dragPointerMove( event, pointer ); + this.dispatchEvent( 'pointerMove', event, [ pointer, moveVector ] ); + this._dragMove( event, pointer, moveVector ); +}; + +proto.dragMove = function( event, pointer, moveVector ) { + if ( !this.isDraggable ) { + return; + } + event.preventDefault(); + + this.previousDragX = this.dragX; + // reverse if right-to-left + var direction = this.options.rightToLeft ? -1 : 1; + if ( this.options.wrapAround ) { + // wrap around move. #589 + moveVector.x = moveVector.x % this.slideableWidth; + } + var dragX = this.dragStartPosition + moveVector.x * direction; + + if ( !this.options.wrapAround && this.slides.length ) { + // slow drag + var originBound = Math.max( -this.slides[0].target, this.dragStartPosition ); + dragX = dragX > originBound ? ( dragX + originBound ) * 0.5 : dragX; + var endBound = Math.min( -this.getLastSlide().target, this.dragStartPosition ); + dragX = dragX < endBound ? ( dragX + endBound ) * 0.5 : dragX; + } + + this.dragX = dragX; + + this.dragMoveTime = new Date(); + this.dispatchEvent( 'dragMove', event, [ pointer, moveVector ] ); +}; + +proto.dragEnd = function( event, pointer ) { + if ( !this.isDraggable ) { + return; + } + if ( this.options.freeScroll ) { + this.isFreeScrolling = true; + } + // set selectedIndex based on where flick will end up + var index = this.dragEndRestingSelect(); + + if ( this.options.freeScroll && !this.options.wrapAround ) { + // if free-scroll & not wrap around + // do not free-scroll if going outside of bounding slides + // so bounding slides can attract slider, and keep it in bounds + var restingX = this.getRestingPosition(); + this.isFreeScrolling = -restingX > this.slides[0].target && + -restingX < this.getLastSlide().target; + } else if ( !this.options.freeScroll && index == this.selectedIndex ) { + // boost selection if selected index has not changed + index += this.dragEndBoostSelect(); + } + delete this.previousDragX; + // apply selection + // TODO refactor this, selecting here feels weird + // HACK, set flag so dragging stays in correct direction + this.isDragSelect = this.options.wrapAround; + this.select( index ); + delete this.isDragSelect; + this.dispatchEvent( 'dragEnd', event, [ pointer ] ); +}; + +proto.dragEndRestingSelect = function() { + var restingX = this.getRestingPosition(); + // how far away from selected slide + var distance = Math.abs( this.getSlideDistance( -restingX, this.selectedIndex ) ); + // get closet resting going up and going down + var positiveResting = this._getClosestResting( restingX, distance, 1 ); + var negativeResting = this._getClosestResting( restingX, distance, -1 ); + // use closer resting for wrap-around + var index = positiveResting.distance < negativeResting.distance ? + positiveResting.index : negativeResting.index; + return index; +}; + +/** + * given resting X and distance to selected cell + * get the distance and index of the closest cell + * @param {Number} restingX - estimated post-flick resting position + * @param {Number} distance - distance to selected cell + * @param {Integer} increment - +1 or -1, going up or down + * @returns {Object} - { distance: {Number}, index: {Integer} } + */ +proto._getClosestResting = function( restingX, distance, increment ) { + var index = this.selectedIndex; + var minDistance = Infinity; + var condition = this.options.contain && !this.options.wrapAround ? + // if contain, keep going if distance is equal to minDistance + function( d, md ) { return d <= md; } : function( d, md ) { return d < md; }; + while ( condition( distance, minDistance ) ) { + // measure distance to next cell + index += increment; + minDistance = distance; + distance = this.getSlideDistance( -restingX, index ); + if ( distance === null ) { + break; + } + distance = Math.abs( distance ); + } + return { + distance: minDistance, + // selected was previous index + index: index - increment + }; +}; + +/** + * measure distance between x and a slide target + * @param {Number} x + * @param {Integer} index - slide index + */ +proto.getSlideDistance = function( x, index ) { + var len = this.slides.length; + // wrap around if at least 2 slides + var isWrapAround = this.options.wrapAround && len > 1; + var slideIndex = isWrapAround ? utils.modulo( index, len ) : index; + var slide = this.slides[ slideIndex ]; + if ( !slide ) { + return null; + } + // add distance for wrap-around slides + var wrap = isWrapAround ? this.slideableWidth * Math.floor( index / len ) : 0; + return x - ( slide.target + wrap ); +}; + +proto.dragEndBoostSelect = function() { + // do not boost if no previousDragX or dragMoveTime + if ( this.previousDragX === undefined || !this.dragMoveTime || + // or if drag was held for 100 ms + new Date() - this.dragMoveTime > 100 ) { + return 0; + } + + var distance = this.getSlideDistance( -this.dragX, this.selectedIndex ); + var delta = this.previousDragX - this.dragX; + if ( distance > 0 && delta > 0 ) { + // boost to next if moving towards the right, and positive velocity + return 1; + } else if ( distance < 0 && delta < 0 ) { + // boost to previous if moving towards the left, and negative velocity + return -1; + } + return 0; +}; + +// ----- staticClick ----- // + +proto.staticClick = function( event, pointer ) { + // get clickedCell, if cell was clicked + var clickedCell = this.getParentCell( event.target ); + var cellElem = clickedCell && clickedCell.element; + var cellIndex = clickedCell && this.cells.indexOf( clickedCell ); + this.dispatchEvent( 'staticClick', event, [ pointer, cellElem, cellIndex ] ); +}; + +// ----- scroll ----- // + +proto.onscroll = function() { + var scroll = getScrollPosition(); + var scrollMoveX = this.pointerDownScroll.x - scroll.x; + var scrollMoveY = this.pointerDownScroll.y - scroll.y; + // cancel click/tap if scroll is too much + if ( Math.abs( scrollMoveX ) > 3 || Math.abs( scrollMoveY ) > 3 ) { + this._pointerDone(); + } +}; + +// ----- utils ----- // + +function getScrollPosition() { + return { + x: window.pageXOffset, + y: window.pageYOffset + }; +} + +// ----- ----- // + +return Flickity; + +})); + +// prev/next buttons +( function( window, factory ) { + // universal module definition + /* jshint strict: false */ + if ( typeof define == 'function' && define.amd ) { + // AMD + define( 'flickity/js/prev-next-button',[ + './flickity', + 'unipointer/unipointer', + 'fizzy-ui-utils/utils' + ], function( Flickity, Unipointer, utils ) { + return factory( window, Flickity, Unipointer, utils ); + }); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory( + window, + require('./flickity'), + require('unipointer'), + require('fizzy-ui-utils') + ); + } else { + // browser global + factory( + window, + window.Flickity, + window.Unipointer, + window.fizzyUIUtils + ); + } + +}( window, function factory( window, Flickity, Unipointer, utils ) { +'use strict'; + +var svgURI = 'http://www.w3.org/2000/svg'; + +// -------------------------- PrevNextButton -------------------------- // + +function PrevNextButton( direction, parent ) { + this.direction = direction; + this.parent = parent; + this._create(); +} + +PrevNextButton.prototype = Object.create( Unipointer.prototype ); + +PrevNextButton.prototype._create = function() { + // properties + this.isEnabled = true; + this.isPrevious = this.direction == -1; + var leftDirection = this.parent.options.rightToLeft ? 1 : -1; + this.isLeft = this.direction == leftDirection; + + var element = this.element = document.createElement('button'); + element.className = 'flickity-button flickity-prev-next-button'; + element.className += this.isPrevious ? ' previous' : ' next'; + // prevent button from submitting form http://stackoverflow.com/a/10836076/182183 + element.setAttribute( 'type', 'button' ); + // init as disabled + this.disable(); + + element.setAttribute( 'aria-label', this.isPrevious ? 'Previous' : 'Next' ); + + // create arrow + var svg = this.createSVG(); + element.appendChild( svg ); + // events + this.parent.on( 'select', this.update.bind( this ) ); + this.on( 'pointerDown', this.parent.childUIPointerDown.bind( this.parent ) ); +}; + +PrevNextButton.prototype.activate = function() { + this.bindStartEvent( this.element ); + this.element.addEventListener( 'click', this ); + // add to DOM + this.parent.element.appendChild( this.element ); +}; + +PrevNextButton.prototype.deactivate = function() { + // remove from DOM + this.parent.element.removeChild( this.element ); + // click events + this.unbindStartEvent( this.element ); + this.element.removeEventListener( 'click', this ); +}; + +PrevNextButton.prototype.createSVG = function() { + var svg = document.createElementNS( svgURI, 'svg'); + svg.setAttribute( 'class', 'flickity-button-icon' ); + svg.setAttribute( 'viewBox', '0 0 100 100' ); + var path = document.createElementNS( svgURI, 'path'); + var pathMovements = getArrowMovements( this.parent.options.arrowShape ); + path.setAttribute( 'd', pathMovements ); + path.setAttribute( 'class', 'arrow' ); + // rotate arrow + if ( !this.isLeft ) { + path.setAttribute( 'transform', 'translate(100, 100) rotate(180) ' ); + } + svg.appendChild( path ); + return svg; +}; + +// get SVG path movmement +function getArrowMovements( shape ) { + // use shape as movement if string + if ( typeof shape == 'string' ) { + return shape; + } + // create movement string + return 'M ' + shape.x0 + ',50' + + ' L ' + shape.x1 + ',' + ( shape.y1 + 50 ) + + ' L ' + shape.x2 + ',' + ( shape.y2 + 50 ) + + ' L ' + shape.x3 + ',50 ' + + ' L ' + shape.x2 + ',' + ( 50 - shape.y2 ) + + ' L ' + shape.x1 + ',' + ( 50 - shape.y1 ) + + ' Z'; +} + +PrevNextButton.prototype.handleEvent = utils.handleEvent; + +PrevNextButton.prototype.onclick = function() { + if ( !this.isEnabled ) { + return; + } + this.parent.uiChange(); + var method = this.isPrevious ? 'previous' : 'next'; + this.parent[ method ](); +}; + +// ----- ----- // + +PrevNextButton.prototype.enable = function() { + if ( this.isEnabled ) { + return; + } + this.element.disabled = false; + this.isEnabled = true; +}; + +PrevNextButton.prototype.disable = function() { + if ( !this.isEnabled ) { + return; + } + this.element.disabled = true; + this.isEnabled = false; +}; + +PrevNextButton.prototype.update = function() { + // index of first or last slide, if previous or next + var slides = this.parent.slides; + // enable is wrapAround and at least 2 slides + if ( this.parent.options.wrapAround && slides.length > 1 ) { + this.enable(); + return; + } + var lastIndex = slides.length ? slides.length - 1 : 0; + var boundIndex = this.isPrevious ? 0 : lastIndex; + var method = this.parent.selectedIndex == boundIndex ? 'disable' : 'enable'; + this[ method ](); +}; + +PrevNextButton.prototype.destroy = function() { + this.deactivate(); + this.allOff(); +}; + +// -------------------------- Flickity prototype -------------------------- // + +utils.extend( Flickity.defaults, { + prevNextButtons: true, + arrowShape: { + x0: 10, + x1: 60, y1: 50, + x2: 70, y2: 40, + x3: 30 + } +}); + +Flickity.createMethods.push('_createPrevNextButtons'); +var proto = Flickity.prototype; + +proto._createPrevNextButtons = function() { + if ( !this.options.prevNextButtons ) { + return; + } + + this.prevButton = new PrevNextButton( -1, this ); + this.nextButton = new PrevNextButton( 1, this ); + + this.on( 'activate', this.activatePrevNextButtons ); +}; + +proto.activatePrevNextButtons = function() { + this.prevButton.activate(); + this.nextButton.activate(); + this.on( 'deactivate', this.deactivatePrevNextButtons ); +}; + +proto.deactivatePrevNextButtons = function() { + this.prevButton.deactivate(); + this.nextButton.deactivate(); + this.off( 'deactivate', this.deactivatePrevNextButtons ); +}; + +// -------------------------- -------------------------- // + +Flickity.PrevNextButton = PrevNextButton; + +return Flickity; + +})); + +// page dots +( function( window, factory ) { + // universal module definition + /* jshint strict: false */ + if ( typeof define == 'function' && define.amd ) { + // AMD + define( 'flickity/js/page-dots',[ + './flickity', + 'unipointer/unipointer', + 'fizzy-ui-utils/utils' + ], function( Flickity, Unipointer, utils ) { + return factory( window, Flickity, Unipointer, utils ); + }); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory( + window, + require('./flickity'), + require('unipointer'), + require('fizzy-ui-utils') + ); + } else { + // browser global + factory( + window, + window.Flickity, + window.Unipointer, + window.fizzyUIUtils + ); + } + +}( window, function factory( window, Flickity, Unipointer, utils ) { + +// -------------------------- PageDots -------------------------- // + + + +function PageDots( parent ) { + this.parent = parent; + this._create(); +} + +PageDots.prototype = Object.create( Unipointer.prototype ); + +PageDots.prototype._create = function() { + // create holder element + this.holder = document.createElement('ol'); + this.holder.className = 'flickity-page-dots'; + // create dots, array of elements + this.dots = []; + // events + this.handleClick = this.onClick.bind( this ); + this.on( 'pointerDown', this.parent.childUIPointerDown.bind( this.parent ) ); +}; + +PageDots.prototype.activate = function() { + this.setDots(); + this.holder.addEventListener( 'click', this.handleClick ); + this.bindStartEvent( this.holder ); + // add to DOM + this.parent.element.appendChild( this.holder ); +}; + +PageDots.prototype.deactivate = function() { + this.holder.removeEventListener( 'click', this.handleClick ); + this.unbindStartEvent( this.holder ); + // remove from DOM + this.parent.element.removeChild( this.holder ); +}; + +PageDots.prototype.setDots = function() { + // get difference between number of slides and number of dots + var delta = this.parent.slides.length - this.dots.length; + if ( delta > 0 ) { + this.addDots( delta ); + } else if ( delta < 0 ) { + this.removeDots( -delta ); + } +}; + +PageDots.prototype.addDots = function( count ) { + var fragment = document.createDocumentFragment(); + var newDots = []; + var length = this.dots.length; + var max = length + count; + + for ( var i = length; i < max; i++ ) { + var dot = document.createElement('li'); + dot.className = 'dot'; + dot.setAttribute( 'aria-label', 'Page dot ' + ( i + 1 ) ); + fragment.appendChild( dot ); + newDots.push( dot ); + } + + this.holder.appendChild( fragment ); + this.dots = this.dots.concat( newDots ); +}; + +PageDots.prototype.removeDots = function( count ) { + // remove from this.dots collection + var removeDots = this.dots.splice( this.dots.length - count, count ); + // remove from DOM + removeDots.forEach( function( dot ) { + this.holder.removeChild( dot ); + }, this ); +}; + +PageDots.prototype.updateSelected = function() { + // remove selected class on previous + if ( this.selectedDot ) { + this.selectedDot.className = 'dot'; + this.selectedDot.removeAttribute('aria-current'); + } + // don't proceed if no dots + if ( !this.dots.length ) { + return; + } + this.selectedDot = this.dots[ this.parent.selectedIndex ]; + this.selectedDot.className = 'dot is-selected'; + this.selectedDot.setAttribute( 'aria-current', 'step' ); +}; + +PageDots.prototype.onTap = // old method name, backwards-compatible +PageDots.prototype.onClick = function( event ) { + var target = event.target; + // only care about dot clicks + if ( target.nodeName != 'LI' ) { + return; + } + + this.parent.uiChange(); + var index = this.dots.indexOf( target ); + this.parent.select( index ); +}; + +PageDots.prototype.destroy = function() { + this.deactivate(); + this.allOff(); +}; + +Flickity.PageDots = PageDots; + +// -------------------------- Flickity -------------------------- // + +utils.extend( Flickity.defaults, { + pageDots: true +}); + +Flickity.createMethods.push('_createPageDots'); + +var proto = Flickity.prototype; + +proto._createPageDots = function() { + if ( !this.options.pageDots ) { + return; + } + this.pageDots = new PageDots( this ); + // events + this.on( 'activate', this.activatePageDots ); + this.on( 'select', this.updateSelectedPageDots ); + this.on( 'cellChange', this.updatePageDots ); + this.on( 'resize', this.updatePageDots ); + this.on( 'deactivate', this.deactivatePageDots ); +}; + +proto.activatePageDots = function() { + this.pageDots.activate(); +}; + +proto.updateSelectedPageDots = function() { + this.pageDots.updateSelected(); +}; + +proto.updatePageDots = function() { + this.pageDots.setDots(); +}; + +proto.deactivatePageDots = function() { + this.pageDots.deactivate(); +}; + +// ----- ----- // + +Flickity.PageDots = PageDots; + +return Flickity; + +})); + +// player & autoPlay +( function( window, factory ) { + // universal module definition + /* jshint strict: false */ + if ( typeof define == 'function' && define.amd ) { + // AMD + define( 'flickity/js/player',[ + 'ev-emitter/ev-emitter', + 'fizzy-ui-utils/utils', + './flickity' + ], function( EvEmitter, utils, Flickity ) { + return factory( EvEmitter, utils, Flickity ); + }); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory( + require('ev-emitter'), + require('fizzy-ui-utils'), + require('./flickity') + ); + } else { + // browser global + factory( + window.EvEmitter, + window.fizzyUIUtils, + window.Flickity + ); + } + +}( window, function factory( EvEmitter, utils, Flickity ) { + + + +// -------------------------- Player -------------------------- // + +function Player( parent ) { + this.parent = parent; + this.state = 'stopped'; + // visibility change event handler + this.onVisibilityChange = this.visibilityChange.bind( this ); + this.onVisibilityPlay = this.visibilityPlay.bind( this ); +} + +Player.prototype = Object.create( EvEmitter.prototype ); + +// start play +Player.prototype.play = function() { + if ( this.state == 'playing' ) { + return; + } + // do not play if page is hidden, start playing when page is visible + var isPageHidden = document.hidden; + if ( isPageHidden ) { + document.addEventListener( 'visibilitychange', this.onVisibilityPlay ); + return; + } + + this.state = 'playing'; + // listen to visibility change + document.addEventListener( 'visibilitychange', this.onVisibilityChange ); + // start ticking + this.tick(); +}; + +Player.prototype.tick = function() { + // do not tick if not playing + if ( this.state != 'playing' ) { + return; + } + + var time = this.parent.options.autoPlay; + // default to 3 seconds + time = typeof time == 'number' ? time : 3000; + var _this = this; + // HACK: reset ticks if stopped and started within interval + this.clear(); + this.timeout = setTimeout( function() { + _this.parent.next( true ); + _this.tick(); + }, time ); +}; + +Player.prototype.stop = function() { + this.state = 'stopped'; + this.clear(); + // remove visibility change event + document.removeEventListener( 'visibilitychange', this.onVisibilityChange ); +}; + +Player.prototype.clear = function() { + clearTimeout( this.timeout ); +}; + +Player.prototype.pause = function() { + if ( this.state == 'playing' ) { + this.state = 'paused'; + this.clear(); + } +}; + +Player.prototype.unpause = function() { + // re-start play if paused + if ( this.state == 'paused' ) { + this.play(); + } +}; + +// pause if page visibility is hidden, unpause if visible +Player.prototype.visibilityChange = function() { + var isPageHidden = document.hidden; + this[ isPageHidden ? 'pause' : 'unpause' ](); +}; + +Player.prototype.visibilityPlay = function() { + this.play(); + document.removeEventListener( 'visibilitychange', this.onVisibilityPlay ); +}; + +// -------------------------- Flickity -------------------------- // + +utils.extend( Flickity.defaults, { + pauseAutoPlayOnHover: true +}); + +Flickity.createMethods.push('_createPlayer'); +var proto = Flickity.prototype; + +proto._createPlayer = function() { + this.player = new Player( this ); + + this.on( 'activate', this.activatePlayer ); + this.on( 'uiChange', this.stopPlayer ); + this.on( 'pointerDown', this.stopPlayer ); + this.on( 'deactivate', this.deactivatePlayer ); +}; + +proto.activatePlayer = function() { + if ( !this.options.autoPlay ) { + return; + } + this.player.play(); + this.element.addEventListener( 'mouseenter', this ); +}; + +// Player API, don't hate the ... thanks I know where the door is + +proto.playPlayer = function() { + this.player.play(); +}; + +proto.stopPlayer = function() { + this.player.stop(); +}; + +proto.pausePlayer = function() { + this.player.pause(); +}; + +proto.unpausePlayer = function() { + this.player.unpause(); +}; + +proto.deactivatePlayer = function() { + this.player.stop(); + this.element.removeEventListener( 'mouseenter', this ); +}; + +// ----- mouseenter/leave ----- // + +// pause auto-play on hover +proto.onmouseenter = function() { + if ( !this.options.pauseAutoPlayOnHover ) { + return; + } + this.player.pause(); + this.element.addEventListener( 'mouseleave', this ); +}; + +// resume auto-play on hover off +proto.onmouseleave = function() { + this.player.unpause(); + this.element.removeEventListener( 'mouseleave', this ); +}; + +// ----- ----- // + +Flickity.Player = Player; + +return Flickity; + +})); + +// add, remove cell +( function( window, factory ) { + // universal module definition + /* jshint strict: false */ + if ( typeof define == 'function' && define.amd ) { + // AMD + define( 'flickity/js/add-remove-cell',[ + './flickity', + 'fizzy-ui-utils/utils' + ], function( Flickity, utils ) { + return factory( window, Flickity, utils ); + }); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory( + window, + require('./flickity'), + require('fizzy-ui-utils') + ); + } else { + // browser global + factory( + window, + window.Flickity, + window.fizzyUIUtils + ); + } + +}( window, function factory( window, Flickity, utils ) { + + + +// append cells to a document fragment +function getCellsFragment( cells ) { + var fragment = document.createDocumentFragment(); + cells.forEach( function( cell ) { + fragment.appendChild( cell.element ); + }); + return fragment; +} + +// -------------------------- add/remove cell prototype -------------------------- // + +var proto = Flickity.prototype; + +/** + * Insert, prepend, or append cells + * @param {Element, Array, NodeList} elems + * @param {Integer} index + */ +proto.insert = function( elems, index ) { + var cells = this._makeCells( elems ); + if ( !cells || !cells.length ) { + return; + } + var len = this.cells.length; + // default to append + index = index === undefined ? len : index; + // add cells with document fragment + var fragment = getCellsFragment( cells ); + // append to slider + var isAppend = index == len; + if ( isAppend ) { + this.slider.appendChild( fragment ); + } else { + var insertCellElement = this.cells[ index ].element; + this.slider.insertBefore( fragment, insertCellElement ); + } + // add to this.cells + if ( index === 0 ) { + // prepend, add to start + this.cells = cells.concat( this.cells ); + } else if ( isAppend ) { + // append, add to end + this.cells = this.cells.concat( cells ); + } else { + // insert in this.cells + var endCells = this.cells.splice( index, len - index ); + this.cells = this.cells.concat( cells ).concat( endCells ); + } + + this._sizeCells( cells ); + this.cellChange( index, true ); +}; + +proto.append = function( elems ) { + this.insert( elems, this.cells.length ); +}; + +proto.prepend = function( elems ) { + this.insert( elems, 0 ); +}; + +/** + * Remove cells + * @param {Element, Array, NodeList} elems + */ +proto.remove = function( elems ) { + var cells = this.getCells( elems ); + if ( !cells || !cells.length ) { + return; + } + + var minCellIndex = this.cells.length - 1; + // remove cells from collection & DOM + cells.forEach( function( cell ) { + cell.remove(); + var index = this.cells.indexOf( cell ); + minCellIndex = Math.min( index, minCellIndex ); + utils.removeFrom( this.cells, cell ); + }, this ); + + this.cellChange( minCellIndex, true ); +}; + +/** + * logic to be run after a cell's size changes + * @param {Element} elem - cell's element + */ +proto.cellSizeChange = function( elem ) { + var cell = this.getCell( elem ); + if ( !cell ) { + return; + } + cell.getSize(); + + var index = this.cells.indexOf( cell ); + this.cellChange( index ); +}; + +/** + * logic any time a cell is changed: added, removed, or size changed + * @param {Integer} changedCellIndex - index of the changed cell, optional + */ +proto.cellChange = function( changedCellIndex, isPositioningSlider ) { + var prevSelectedElem = this.selectedElement; + this._positionCells( changedCellIndex ); + this._getWrapShiftCells(); + this.setGallerySize(); + // update selectedIndex + // try to maintain position & select previous selected element + var cell = this.getCell( prevSelectedElem ); + if ( cell ) { + this.selectedIndex = this.getCellSlideIndex( cell ); + } + this.selectedIndex = Math.min( this.slides.length - 1, this.selectedIndex ); + + this.emitEvent( 'cellChange', [ changedCellIndex ] ); + // position slider + this.select( this.selectedIndex ); + // do not position slider after lazy load + if ( isPositioningSlider ) { + this.positionSliderAtSelected(); + } +}; + +// ----- ----- // + +return Flickity; + +})); + +// lazyload +( function( window, factory ) { + // universal module definition + /* jshint strict: false */ + if ( typeof define == 'function' && define.amd ) { + // AMD + define( 'flickity/js/lazyload',[ + './flickity', + 'fizzy-ui-utils/utils' + ], function( Flickity, utils ) { + return factory( window, Flickity, utils ); + }); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory( + window, + require('./flickity'), + require('fizzy-ui-utils') + ); + } else { + // browser global + factory( + window, + window.Flickity, + window.fizzyUIUtils + ); + } + +}( window, function factory( window, Flickity, utils ) { +'use strict'; + +Flickity.createMethods.push('_createLazyload'); +var proto = Flickity.prototype; + +proto._createLazyload = function() { + this.on( 'select', this.lazyLoad ); +}; + +proto.lazyLoad = function() { + var lazyLoad = this.options.lazyLoad; + if ( !lazyLoad ) { + return; + } + // get adjacent cells, use lazyLoad option for adjacent count + var adjCount = typeof lazyLoad == 'number' ? lazyLoad : 0; + var cellElems = this.getAdjacentCellElements( adjCount ); + // get lazy images in those cells + var lazyImages = []; + cellElems.forEach( function( cellElem ) { + var lazyCellImages = getCellLazyImages( cellElem ); + lazyImages = lazyImages.concat( lazyCellImages ); + }); + // load lazy images + lazyImages.forEach( function( img ) { + new LazyLoader( img, this ); + }, this ); +}; + +function getCellLazyImages( cellElem ) { + // check if cell element is lazy image + if ( cellElem.nodeName == 'IMG' ) { + var lazyloadAttr = cellElem.getAttribute('data-flickity-lazyload'); + var srcAttr = cellElem.getAttribute('data-flickity-lazyload-src'); + var srcsetAttr = cellElem.getAttribute('data-flickity-lazyload-srcset'); + if ( lazyloadAttr || srcAttr || srcsetAttr ) { + return [ cellElem ]; + } + } + // select lazy images in cell + var lazySelector = 'img[data-flickity-lazyload], ' + + 'img[data-flickity-lazyload-src], img[data-flickity-lazyload-srcset]'; + var imgs = cellElem.querySelectorAll( lazySelector ); + return utils.makeArray( imgs ); +} + +// -------------------------- LazyLoader -------------------------- // + +/** + * class to handle loading images + */ +function LazyLoader( img, flickity ) { + this.img = img; + this.flickity = flickity; + this.load(); +} + +LazyLoader.prototype.handleEvent = utils.handleEvent; + +LazyLoader.prototype.load = function() { + this.img.addEventListener( 'load', this ); + this.img.addEventListener( 'error', this ); + // get src & srcset + var src = this.img.getAttribute('data-flickity-lazyload') || + this.img.getAttribute('data-flickity-lazyload-src'); + var srcset = this.img.getAttribute('data-flickity-lazyload-srcset'); + // set src & serset + this.img.src = src; + if ( srcset ) { + this.img.setAttribute( 'srcset', srcset ); + } + // remove attr + this.img.removeAttribute('data-flickity-lazyload'); + this.img.removeAttribute('data-flickity-lazyload-src'); + this.img.removeAttribute('data-flickity-lazyload-srcset'); +}; + +LazyLoader.prototype.onload = function( event ) { + this.complete( event, 'flickity-lazyloaded' ); +}; + +LazyLoader.prototype.onerror = function( event ) { + this.complete( event, 'flickity-lazyerror' ); +}; + +LazyLoader.prototype.complete = function( event, className ) { + // unbind events + this.img.removeEventListener( 'load', this ); + this.img.removeEventListener( 'error', this ); + + var cell = this.flickity.getParentCell( this.img ); + var cellElem = cell && cell.element; + this.flickity.cellSizeChange( cellElem ); + + this.img.classList.add( className ); + this.flickity.dispatchEvent( 'lazyLoad', event, cellElem ); +}; + +// ----- ----- // + +Flickity.LazyLoader = LazyLoader; + +return Flickity; + +})); + +/*! + * Flickity v2.2.0 + * Touch, responsive, flickable carousels + * + * Licensed GPLv3 for open source use + * or Flickity Commercial License for commercial use + * + * https://flickity.metafizzy.co + * Copyright 2015-2018 Metafizzy + */ + +( function( window, factory ) { + // universal module definition + /* jshint strict: false */ + if ( typeof define == 'function' && define.amd ) { + // AMD + define( 'flickity/js/index',[ + './flickity', + './drag', + './prev-next-button', + './page-dots', + './player', + './add-remove-cell', + './lazyload' + ], factory ); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory( + require('./flickity'), + require('./drag'), + require('./prev-next-button'), + require('./page-dots'), + require('./player'), + require('./add-remove-cell'), + require('./lazyload') + ); + } + +})( window, function factory( Flickity ) { + /*jshint strict: false*/ + return Flickity; +}); + +/*! + * Flickity asNavFor v2.0.1 + * enable asNavFor for Flickity + */ + +/*jshint browser: true, undef: true, unused: true, strict: true*/ + +( function( window, factory ) { + // universal module definition + /*jshint strict: false */ /*globals define, module, require */ + if ( typeof define == 'function' && define.amd ) { + // AMD + define( 'flickity-as-nav-for/as-nav-for',[ + 'flickity/js/index', + 'fizzy-ui-utils/utils' + ], factory ); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory( + require('flickity'), + require('fizzy-ui-utils') + ); + } else { + // browser global + window.Flickity = factory( + window.Flickity, + window.fizzyUIUtils + ); + } + +}( window, function factory( Flickity, utils ) { + + + +// -------------------------- asNavFor prototype -------------------------- // + +// Flickity.defaults.asNavFor = null; + +Flickity.createMethods.push('_createAsNavFor'); + +var proto = Flickity.prototype; + +proto._createAsNavFor = function() { + this.on( 'activate', this.activateAsNavFor ); + this.on( 'deactivate', this.deactivateAsNavFor ); + this.on( 'destroy', this.destroyAsNavFor ); + + var asNavForOption = this.options.asNavFor; + if ( !asNavForOption ) { + return; + } + // HACK do async, give time for other flickity to be initalized + var _this = this; + setTimeout( function initNavCompanion() { + _this.setNavCompanion( asNavForOption ); + }); +}; + +proto.setNavCompanion = function( elem ) { + elem = utils.getQueryElement( elem ); + var companion = Flickity.data( elem ); + // stop if no companion or companion is self + if ( !companion || companion == this ) { + return; + } + + this.navCompanion = companion; + // companion select + var _this = this; + this.onNavCompanionSelect = function() { + _this.navCompanionSelect(); + }; + companion.on( 'select', this.onNavCompanionSelect ); + // click + this.on( 'staticClick', this.onNavStaticClick ); + + this.navCompanionSelect( true ); +}; + +proto.navCompanionSelect = function( isInstant ) { + if ( !this.navCompanion ) { + return; + } + // select slide that matches first cell of slide + var selectedCell = this.navCompanion.selectedCells[0]; + var firstIndex = this.navCompanion.cells.indexOf( selectedCell ); + var lastIndex = firstIndex + this.navCompanion.selectedCells.length - 1; + var selectIndex = Math.floor( lerp( firstIndex, lastIndex, + this.navCompanion.cellAlign ) ); + this.selectCell( selectIndex, false, isInstant ); + // set nav selected class + this.removeNavSelectedElements(); + // stop if companion has more cells than this one + if ( selectIndex >= this.cells.length ) { + return; + } + + var selectedCells = this.cells.slice( firstIndex, lastIndex + 1 ); + this.navSelectedElements = selectedCells.map( function( cell ) { + return cell.element; + }); + this.changeNavSelectedClass('add'); +}; + +function lerp( a, b, t ) { + return ( b - a ) * t + a; +} + +proto.changeNavSelectedClass = function( method ) { + this.navSelectedElements.forEach( function( navElem ) { + navElem.classList[ method ]('is-nav-selected'); + }); +}; + +proto.activateAsNavFor = function() { + this.navCompanionSelect( true ); +}; + +proto.removeNavSelectedElements = function() { + if ( !this.navSelectedElements ) { + return; + } + this.changeNavSelectedClass('remove'); + delete this.navSelectedElements; +}; + +proto.onNavStaticClick = function( event, pointer, cellElement, cellIndex ) { + if ( typeof cellIndex == 'number' ) { + this.navCompanion.selectCell( cellIndex ); + } +}; + +proto.deactivateAsNavFor = function() { + this.removeNavSelectedElements(); +}; + +proto.destroyAsNavFor = function() { + if ( !this.navCompanion ) { + return; + } + this.navCompanion.off( 'select', this.onNavCompanionSelect ); + this.off( 'staticClick', this.onNavStaticClick ); + delete this.navCompanion; +}; + +// ----- ----- // + +return Flickity; + +})); + +/*! + * imagesLoaded v4.1.4 + * JavaScript is all like "You images are done yet or what?" + * MIT License + */ + +( function( window, factory ) { 'use strict'; + // universal module definition + + /*global define: false, module: false, require: false */ + + if ( typeof define == 'function' && define.amd ) { + // AMD + define( 'imagesloaded/imagesloaded',[ + 'ev-emitter/ev-emitter' + ], function( EvEmitter ) { + return factory( window, EvEmitter ); + }); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory( + window, + require('ev-emitter') + ); + } else { + // browser global + window.imagesLoaded = factory( + window, + window.EvEmitter + ); + } + +})( typeof window !== 'undefined' ? window : this, + +// -------------------------- factory -------------------------- // + +function factory( window, EvEmitter ) { + + + +var $ = window.jQuery; +var console = window.console; + +// -------------------------- helpers -------------------------- // + +// extend objects +function extend( a, b ) { + for ( var prop in b ) { + a[ prop ] = b[ prop ]; + } + return a; +} + +var arraySlice = Array.prototype.slice; + +// turn element or nodeList into an array +function makeArray( obj ) { + if ( Array.isArray( obj ) ) { + // use object if already an array + return obj; + } + + var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number'; + if ( isArrayLike ) { + // convert nodeList to array + return arraySlice.call( obj ); + } + + // array of single index + return [ obj ]; +} + +// -------------------------- imagesLoaded -------------------------- // + +/** + * @param {Array, Element, NodeList, String} elem + * @param {Object or Function} options - if function, use as callback + * @param {Function} onAlways - callback function + */ +function ImagesLoaded( elem, options, onAlways ) { + // coerce ImagesLoaded() without new, to be new ImagesLoaded() + if ( !( this instanceof ImagesLoaded ) ) { + return new ImagesLoaded( elem, options, onAlways ); + } + // use elem as selector string + var queryElem = elem; + if ( typeof elem == 'string' ) { + queryElem = document.querySelectorAll( elem ); + } + // bail if bad element + if ( !queryElem ) { + console.error( 'Bad element for imagesLoaded ' + ( queryElem || elem ) ); + return; + } + + this.elements = makeArray( queryElem ); + this.options = extend( {}, this.options ); + // shift arguments if no options set + if ( typeof options == 'function' ) { + onAlways = options; + } else { + extend( this.options, options ); + } + + if ( onAlways ) { + this.on( 'always', onAlways ); + } + + this.getImages(); + + if ( $ ) { + // add jQuery Deferred object + this.jqDeferred = new $.Deferred(); + } + + // HACK check async to allow time to bind listeners + setTimeout( this.check.bind( this ) ); +} + +ImagesLoaded.prototype = Object.create( EvEmitter.prototype ); + +ImagesLoaded.prototype.options = {}; + +ImagesLoaded.prototype.getImages = function() { + this.images = []; + + // filter & find items if we have an item selector + this.elements.forEach( this.addElementImages, this ); +}; + +/** + * @param {Node} element + */ +ImagesLoaded.prototype.addElementImages = function( elem ) { + // filter siblings + if ( elem.nodeName == 'IMG' ) { + this.addImage( elem ); + } + // get background image on element + if ( this.options.background === true ) { + this.addElementBackgroundImages( elem ); + } + + // find children + // no non-element nodes, #143 + var nodeType = elem.nodeType; + if ( !nodeType || !elementNodeTypes[ nodeType ] ) { + return; + } + var childImgs = elem.querySelectorAll('img'); + // concat childElems to filterFound array + for ( var i=0; i < childImgs.length; i++ ) { + var img = childImgs[i]; + this.addImage( img ); + } + + // get child background images + if ( typeof this.options.background == 'string' ) { + var children = elem.querySelectorAll( this.options.background ); + for ( i=0; i < children.length; i++ ) { + var child = children[i]; + this.addElementBackgroundImages( child ); + } + } +}; + +var elementNodeTypes = { + 1: true, + 9: true, + 11: true +}; + +ImagesLoaded.prototype.addElementBackgroundImages = function( elem ) { + var style = getComputedStyle( elem ); + if ( !style ) { + // Firefox returns null if in a hidden iframe https://bugzil.la/548397 + return; + } + // get url inside url("...") + var reURL = /url\((['"])?(.*?)\1\)/gi; + var matches = reURL.exec( style.backgroundImage ); + while ( matches !== null ) { + var url = matches && matches[2]; + if ( url ) { + this.addBackground( url, elem ); + } + matches = reURL.exec( style.backgroundImage ); + } +}; + +/** + * @param {Image} img + */ +ImagesLoaded.prototype.addImage = function( img ) { + var loadingImage = new LoadingImage( img ); + this.images.push( loadingImage ); +}; + +ImagesLoaded.prototype.addBackground = function( url, elem ) { + var background = new Background( url, elem ); + this.images.push( background ); +}; + +ImagesLoaded.prototype.check = function() { + var _this = this; + this.progressedCount = 0; + this.hasAnyBroken = false; + // complete if no images + if ( !this.images.length ) { + this.complete(); + return; + } + + function onProgress( image, elem, message ) { + // HACK - Chrome triggers event before object properties have changed. #83 + setTimeout( function() { + _this.progress( image, elem, message ); + }); + } + + this.images.forEach( function( loadingImage ) { + loadingImage.once( 'progress', onProgress ); + loadingImage.check(); + }); +}; + +ImagesLoaded.prototype.progress = function( image, elem, message ) { + this.progressedCount++; + this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded; + // progress event + this.emitEvent( 'progress', [ this, image, elem ] ); + if ( this.jqDeferred && this.jqDeferred.notify ) { + this.jqDeferred.notify( this, image ); + } + // check if completed + if ( this.progressedCount == this.images.length ) { + this.complete(); + } + + if ( this.options.debug && console ) { + console.log( 'progress: ' + message, image, elem ); + } +}; + +ImagesLoaded.prototype.complete = function() { + var eventName = this.hasAnyBroken ? 'fail' : 'done'; + this.isComplete = true; + this.emitEvent( eventName, [ this ] ); + this.emitEvent( 'always', [ this ] ); + if ( this.jqDeferred ) { + var jqMethod = this.hasAnyBroken ? 'reject' : 'resolve'; + this.jqDeferred[ jqMethod ]( this ); + } +}; + +// -------------------------- -------------------------- // + +function LoadingImage( img ) { + this.img = img; +} + +LoadingImage.prototype = Object.create( EvEmitter.prototype ); + +LoadingImage.prototype.check = function() { + // If complete is true and browser supports natural sizes, + // try to check for image status manually. + var isComplete = this.getIsImageComplete(); + if ( isComplete ) { + // report based on naturalWidth + this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' ); + return; + } + + // If none of the checks above matched, simulate loading on detached element. + this.proxyImage = new Image(); + this.proxyImage.addEventListener( 'load', this ); + this.proxyImage.addEventListener( 'error', this ); + // bind to image as well for Firefox. #191 + this.img.addEventListener( 'load', this ); + this.img.addEventListener( 'error', this ); + this.proxyImage.src = this.img.src; +}; + +LoadingImage.prototype.getIsImageComplete = function() { + // check for non-zero, non-undefined naturalWidth + // fixes Safari+InfiniteScroll+Masonry bug infinite-scroll#671 + return this.img.complete && this.img.naturalWidth; +}; + +LoadingImage.prototype.confirm = function( isLoaded, message ) { + this.isLoaded = isLoaded; + this.emitEvent( 'progress', [ this, this.img, message ] ); +}; + +// ----- events ----- // + +// trigger specified handler for event type +LoadingImage.prototype.handleEvent = function( event ) { + var method = 'on' + event.type; + if ( this[ method ] ) { + this[ method ]( event ); + } +}; + +LoadingImage.prototype.onload = function() { + this.confirm( true, 'onload' ); + this.unbindEvents(); +}; + +LoadingImage.prototype.onerror = function() { + this.confirm( false, 'onerror' ); + this.unbindEvents(); +}; + +LoadingImage.prototype.unbindEvents = function() { + this.proxyImage.removeEventListener( 'load', this ); + this.proxyImage.removeEventListener( 'error', this ); + this.img.removeEventListener( 'load', this ); + this.img.removeEventListener( 'error', this ); +}; + +// -------------------------- Background -------------------------- // + +function Background( url, element ) { + this.url = url; + this.element = element; + this.img = new Image(); +} + +// inherit LoadingImage prototype +Background.prototype = Object.create( LoadingImage.prototype ); + +Background.prototype.check = function() { + this.img.addEventListener( 'load', this ); + this.img.addEventListener( 'error', this ); + this.img.src = this.url; + // check if image is already complete + var isComplete = this.getIsImageComplete(); + if ( isComplete ) { + this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' ); + this.unbindEvents(); + } +}; + +Background.prototype.unbindEvents = function() { + this.img.removeEventListener( 'load', this ); + this.img.removeEventListener( 'error', this ); +}; + +Background.prototype.confirm = function( isLoaded, message ) { + this.isLoaded = isLoaded; + this.emitEvent( 'progress', [ this, this.element, message ] ); +}; + +// -------------------------- jQuery -------------------------- // + +ImagesLoaded.makeJQueryPlugin = function( jQuery ) { + jQuery = jQuery || window.jQuery; + if ( !jQuery ) { + return; + } + // set local variable + $ = jQuery; + // $().imagesLoaded() + $.fn.imagesLoaded = function( options, callback ) { + var instance = new ImagesLoaded( this, options, callback ); + return instance.jqDeferred.promise( $(this) ); + }; +}; +// try making plugin +ImagesLoaded.makeJQueryPlugin(); + +// -------------------------- -------------------------- // + +return ImagesLoaded; + +}); + +/*! + * Flickity imagesLoaded v2.0.0 + * enables imagesLoaded option for Flickity + */ + +/*jshint browser: true, strict: true, undef: true, unused: true */ + +( function( window, factory ) { + // universal module definition + /*jshint strict: false */ /*globals define, module, require */ + if ( typeof define == 'function' && define.amd ) { + // AMD + define( [ + 'flickity/js/index', + 'imagesloaded/imagesloaded' + ], function( Flickity, imagesLoaded ) { + return factory( window, Flickity, imagesLoaded ); + }); + } else if ( typeof module == 'object' && module.exports ) { + // CommonJS + module.exports = factory( + window, + require('flickity'), + require('imagesloaded') + ); + } else { + // browser global + window.Flickity = factory( + window, + window.Flickity, + window.imagesLoaded + ); + } + +}( window, function factory( window, Flickity, imagesLoaded ) { +'use strict'; + +Flickity.createMethods.push('_createImagesLoaded'); + +var proto = Flickity.prototype; + +proto._createImagesLoaded = function() { + this.on( 'activate', this.imagesLoaded ); +}; + +proto.imagesLoaded = function() { + if ( !this.options.imagesLoaded ) { + return; + } + var _this = this; + function onImagesLoadedProgress( instance, image ) { + var cell = _this.getParentCell( image.img ); + _this.cellSizeChange( cell && cell.element ); + if ( !_this.options.freeScroll ) { + _this.positionSliderAtSelected(); + } + } + imagesLoaded( this.slider ).on( 'progress', onImagesLoadedProgress ); +}; + +return Flickity; + +})); + diff --git a/fall2018/Ankit Ojha/saarthi/public/js/fresh-slider.js b/fall2018/Ankit Ojha/saarthi/public/js/fresh-slider.js new file mode 100644 index 0000000..50184a8 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/js/fresh-slider.js @@ -0,0 +1,22 @@ +var slide_F_Index = 1; +show_F_Slides(slide_F_Index); + +function plus_F_Slides(n) { + show_F_Slides(slide_F_Index += n); +} + +function show_F_Slides(n) { + var i; + var slides = document.getElementsByClassName("fresh-slides"); + if (n > slides.length) { + slide_F_Index = 1 + } + if (n < 1) { + slide_F_Index = slides.length + } + for (i = 0; i < slides.length; i++) { + slides[i].style.display = "none"; + } + slides[slide_F_Index - 1].style.display = "block"; +} +setInterval(function(){show_F_Slides(slide_F_Index += 1);}, 8000); \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/public/js/language-selector.js b/fall2018/Ankit Ojha/saarthi/public/js/language-selector.js new file mode 100644 index 0000000..29be669 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/js/language-selector.js @@ -0,0 +1,32 @@ +function DropDown(el) { + this.dd = el; + this.placeholder = this.dd.children('span'); + this.opts = this.dd.find('ul.dropdown > li'); + this.val = ''; + this.index = -1; + this.initEvents(); +} +DropDown.prototype = { + initEvents: function () { + var obj = this; + + obj.dd.on('click', function (event) { + $(this).toggleClass('active'); + return false; + }); + + obj.opts.on('click', function () { + var opt = $(this); + obj.val = opt.text(); + obj.index = opt.index(); + obj.placeholder.text('Language: ' + obj.val); + }); + }, + getValue: function () { + return this.val; + }, + getIndex: function () { + return this.index; + } +} + diff --git a/fall2018/Ankit Ojha/saarthi/public/js/main.js b/fall2018/Ankit Ojha/saarthi/public/js/main.js new file mode 100644 index 0000000..409b406 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/js/main.js @@ -0,0 +1,17 @@ +$(document).ready(() => { + + $('#btn').on('click', () => { + let steps = $('#steps > textarea').val(); + console.log(steps); + }); + + $('.add').click(function() { + $('.block:last').before(`
    + Delete Step +
    `); + }); + $('.optionBox').on('click','.remove',function() { + $(this).parent().remove(); + }); + +}); \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/public/js/my_profile.js b/fall2018/Ankit Ojha/saarthi/public/js/my_profile.js new file mode 100644 index 0000000..a398cbe --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/js/my_profile.js @@ -0,0 +1,42 @@ +function on_myprofile() { + document.getElementById("my-profile").style.display = "block"; + document.getElementById("edit-profile").style.display = "none"; + document.getElementById("my-articles").style.display = "none"; + document.getElementById("add-articles").style.display = "none"; + } + + function on_editprofile() { + document.getElementById("my-profile").style.display = "none"; + document.getElementById("edit-profile").style.display = "block"; + document.getElementById("my-articles").style.display = "none"; + document.getElementById("add-articles").style.display = "none"; + } + + function on_myarticles(){ + document.getElementById("my-profile").style.display = "none"; + document.getElementById("edit-profile").style.display = "none"; + document.getElementById("my-articles").style.display = "block"; + document.getElementById("add-articles").style.display = "none"; + } + + function on_addarticle(){ + document.getElementById("my-profile").style.display = "none"; + document.getElementById("edit-profile").style.display = "none"; + document.getElementById("my-articles").style.display = "none"; + document.getElementById("add-articles").style.display = "block"; + } + + function on_requestarticles(){ + document.getElementById("my-profile").style.display = "none"; + document.getElementById("edit-profile").style.display = "none"; + document.getElementById("request-articles").style.display = "block"; + document.getElementById("donate-section").style.display = "none"; + } + + function on_donate(){ + document.getElementById("my-profile").style.display = "none"; + document.getElementById("edit-profile").style.display = "none"; + document.getElementById("request-articles").style.display = "none"; + document.getElementById("donate-section").style.display = "block"; + + } \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/public/js/trending-slider.js b/fall2018/Ankit Ojha/saarthi/public/js/trending-slider.js new file mode 100644 index 0000000..97845ad --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/public/js/trending-slider.js @@ -0,0 +1,23 @@ +var slide_T_Index = 1; +show_T_Slides(slide_T_Index); + +function plus_T_Slides(n) { + show_T_Slides(slide_T_Index += n); +} + +function show_T_Slides(n) { + var i; + var slides = document.getElementsByClassName("trending-slides"); + if (n > slides.length) { + slide_T_Index = 1 + } + if (n < 1) { + slide_T_Index = slides.length + } + for (i = 0; i < slides.length; i++) { + slides[i].style.display = "none"; + } + slides[slide_T_Index - 1].style.display = "block"; +} +setInterval(function(){show_T_Slides(slide_T_Index += 1);}, 6000); + diff --git a/fall2018/Ankit Ojha/saarthi/public/uploads/5c62fd4bf87f8905a804da761.jpg b/fall2018/Ankit Ojha/saarthi/public/uploads/5c62fd4bf87f8905a804da761.jpg new file mode 100644 index 0000000..d8b970d Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/uploads/5c62fd4bf87f8905a804da761.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/uploads/5c62fd4bf87f8905a804da762.jpg b/fall2018/Ankit Ojha/saarthi/public/uploads/5c62fd4bf87f8905a804da762.jpg new file mode 100644 index 0000000..04cc5d7 Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/uploads/5c62fd4bf87f8905a804da762.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/uploads/5c62fd4bf87f8905a804da763.jpg b/fall2018/Ankit Ojha/saarthi/public/uploads/5c62fd4bf87f8905a804da763.jpg new file mode 100644 index 0000000..d73253d Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/uploads/5c62fd4bf87f8905a804da763.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/uploads/5c62fd4bf87f8905a804da764.jpg b/fall2018/Ankit Ojha/saarthi/public/uploads/5c62fd4bf87f8905a804da764.jpg new file mode 100644 index 0000000..e7e14f6 Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/uploads/5c62fd4bf87f8905a804da764.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/uploads/5c63048c92d4682b4c88b50c1.jpg b/fall2018/Ankit Ojha/saarthi/public/uploads/5c63048c92d4682b4c88b50c1.jpg new file mode 100644 index 0000000..d8100aa Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/uploads/5c63048c92d4682b4c88b50c1.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/uploads/5c63048c92d4682b4c88b50c2.jpg b/fall2018/Ankit Ojha/saarthi/public/uploads/5c63048c92d4682b4c88b50c2.jpg new file mode 100644 index 0000000..debf52b Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/uploads/5c63048c92d4682b4c88b50c2.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/uploads/5c63048c92d4682b4c88b50c3.jpg b/fall2018/Ankit Ojha/saarthi/public/uploads/5c63048c92d4682b4c88b50c3.jpg new file mode 100644 index 0000000..faacf00 Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/uploads/5c63048c92d4682b4c88b50c3.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/uploads/5c63048c92d4682b4c88b50c4.jpg b/fall2018/Ankit Ojha/saarthi/public/uploads/5c63048c92d4682b4c88b50c4.jpg new file mode 100644 index 0000000..19c92fa Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/uploads/5c63048c92d4682b4c88b50c4.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/uploads/5c63048c92d4682b4c88b50c5.jpg b/fall2018/Ankit Ojha/saarthi/public/uploads/5c63048c92d4682b4c88b50c5.jpg new file mode 100644 index 0000000..5117123 Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/uploads/5c63048c92d4682b4c88b50c5.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/uploads/5c63048c92d4682b4c88b50c6.jpg b/fall2018/Ankit Ojha/saarthi/public/uploads/5c63048c92d4682b4c88b50c6.jpg new file mode 100644 index 0000000..3baaee4 Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/uploads/5c63048c92d4682b4c88b50c6.jpg differ diff --git a/fall2018/Ankit Ojha/saarthi/public/uploads/Capture.PNG b/fall2018/Ankit Ojha/saarthi/public/uploads/Capture.PNG new file mode 100644 index 0000000..58e916a Binary files /dev/null and b/fall2018/Ankit Ojha/saarthi/public/uploads/Capture.PNG differ diff --git a/fall2018/Ankit Ojha/saarthi/routes/index.js b/fall2018/Ankit Ojha/saarthi/routes/index.js new file mode 100644 index 0000000..8cbdee2 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/routes/index.js @@ -0,0 +1,80 @@ +const express = require('express'); +const router = express.Router(); +const {ensureAuthenticated}=require('../config/auth'); +const article = require('../models/articles'); +const Request = require('../models/Request'); +router.get('/',(req,res)=>res.render('welcome')); + + + +router.get('/dashboard',ensureAuthenticated,(req,res)=> + res.render('dashboard',{ + name:req.user.name + })); + +router.get('/search_articles',(req,res)=>{ + let noMatch = null; + console.log(req.query.search); + if(req.query.search) { + const regex = new RegExp(escapeRegex(req.query.search), 'gi'); + // Get all articles from DB + // console.log(regex); + article.find({title: regex}, (err, allarticles)=>{ + if(err){ + console.log(err); + } else { + // console.log(allarticles); + if(allarticles.length < 1) { + noMatch = "No articles match that query, please try again."; + } + res.render("searchedarticles",{allarticles:allarticles, noMatch: noMatch}); + } + }); + } else { + // Get all campgrounds from DB + article.find({}, function(err, allarticles){ + if(err){ + console.log(err); + } else { + res.render("searchedarticles",{allarticles:allarticles, noMatch: noMatch}); + } + }); + } +}); + + +router.post('/explore',(req,res)=>{ + const newRequest=new Request(); + newRequest.title=req.body.RequestTitle; + newRequest.email=req.body.RequestEmail; + newRequest.save(function(err){ + if(err){ + console.log(err); + } + else{ + res.redirect('/explore'); + } + }); + + }); + +//user single article +router.get('/explore/:id', (req, res) => { + article.findById(req.params.id, (err, article) => { + if (err) { + console.log(err); + return; + } else { + res.render('user_article', { + article: article + }) + } + }); +}); + + +function escapeRegex(text) { + return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); +}; + +module.exports = router; \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/routes/technicalUsers.js b/fall2018/Ankit Ojha/saarthi/routes/technicalUsers.js new file mode 100644 index 0000000..a4b76d1 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/routes/technicalUsers.js @@ -0,0 +1,278 @@ +const express = require('express'); +const router = express.Router(); +const bcrypt = require('bcryptjs'); +const {ensureAuthenticated}=require('../config/auth') +const passport = require('passport'); +const multer = require('multer'); +const path = require('path'); + + + +//artcle model +let Article = require('../models/articles'); +let TechnicalUser = require('../models/TechnicalUser'); + +router.get('/login',(req,res)=>res.render('technicalLogin')); + +//technical usrs's homepage +router.get('/technicalindex',ensureAuthenticated,(req,res)=>{ + Article.find({},(err,articles)=>{ + if(err){ + console.log(err); + return; + }else{ + res.render('technicalindex',{ + title: 'Articles', + articles: articles, + TechnicalUser: TechnicalUser + }); + } + }); +}); + +//edit article +router.get('/technicalindex/edit/:id',ensureAuthenticated, (req, res) => { + Article.findById(req.params.id, (err, article) => { + if (err) { + console.log(err); + return; + } else { + res.render('edit_article', { + title: 'Edit article', + article: article + }) + } + }); +}); + + +//update article post route +router.post('/technicalindex/edit/:id',ensureAuthenticated, (req, res) => { + let article = {}; + article.title = req.body.title; + article.Category = req.body.category; + article.Author = req.body.author; + article.Body = req.body.body; + + let query = { + _id: req.params.id + }; + Article.updateOne(query, article, (err) => { + if (err) { + console.log(err); + return; + } else { + req.flash('success', 'article updated'); + res.redirect('/technicalUsers/technicalindex'); + } + }) +}); + + +//delete an article +router.get('/technicalindex/delete/:id',ensureAuthenticated, (req, res) => { + let query = { + _id: req.params.id + } + + Article.remove(query, (err) => { + if (err) { + console.log(err); + + }else{ + req.flash('success', 'article deleted'); + res.redirect('/technicalUsers/technicalindex'); + // res.send('success'); + } + + }) +}); + + + +// router.get('/technicalindex/add_articles',ensureAuthenticated,(req,res)=>{ +// res.render('add_articles', { +// title: 'Add Article' +// }); +// }); + + + +let authorname; +// add article post route +router.post('/technicalindex/add_articles', (req, res) => { + // res.send('OK'); + // console.log('inside post route'); + let article = new Article(); + article.title = req.body.title; + article.steptitiles = req.body.steptitle; + article.Category = req.body.category; + article.Body = req.body.step; + + //get author id + let authorid = req.body.author; + + // get author name + TechnicalUser.findById({_id:authorid},(err,author)=>{ + if(err){ + console.log(err); + }else{ + authorname = author.name; + console.log('aurthorname: '+authorname); + article.Author = authorname; + article.save((err) => { + if (err) { + console.log(err); + return; + } else { + res.redirect('/technicalUsers/technicalindex'); + } + }); + } + }); + + // authorname = authorname.toString(); + + // console.log('name: '+article.Author); + // article.Author = authorname.toString(); + // eval(require('locus')); + +}); + +//update profile post route +router.post('/technicalindex/updateprofile',ensureAuthenticated,(req,res)=>{ + let name = req.body.name; + let email = req.body.email; + if(name == "" && email == ""){ + req.flash('error_msg','please fill the values to update your profile'); + }else if(name != "" && email == ""){ + TechnicalUser.findOneAndUpdate({_id:req.body.author},{$set: {name: name}},{upsert: true},(err,author)=>{ + if(err){ + console.log(err); + }else{ + req.flash('success_msg','profile updated') ; + } + }); + }else if(name == "" && email != ""){ + TechnicalUser.findOneAndUpdate({_id:req.body.author},{$set: {email: email}},{upsert: true},(err,author)=>{ + if(err){ + console.log(err); + }else{ + req.flash('success_msg','profile updated') ; + } + }); + }else if(name != "" && email != ""){ + TechnicalUser.findOneAndUpdate({_id:req.body.author},{$set: {name: name,email: email}},{upsert: true},(err,author)=>{ + if(err){ + console.log(err); + }else{ + req.flash('success_msg','profile updated') ; + } + }); + } + res.redirect('/technicalUsers/technicalindex'); +}); + + +router.post('/login',(req,res,next)=>{ + passport.authenticate('technical-local',{ + successRedirect:'/technicalUsers/technicalindex', + failureRedirect:'/technicalUsers/login', + failureFlash:true + })(req,res,next); +}); +// Logout +router.get('/logout', (req, res) => { + req.logout(); + req.flash('success_msg', 'You are logged out'); + res.redirect('/technicalUsers/login'); +}); + + +router.get('/technicalindex/add_pictures',ensureAuthenticated,(req,res)=>{ + res.render('upload_pictures'); +}); + +//get single article +router.get('/technicalindex/:id', (req, res) => { + Article.findById(req.params.id, (err, article) => { + if (err) { + console.log(err); + return; + } else { + res.render('article', { + title: 'articles', + article: article + }) + } + }); +}); + + +//Multer stuff +const storage = multer.diskStorage({ + destination: './public/uploads/', + filename: function(req, file, cb){ + cb(null,file.originalname); + } +}); +const upload = multer({ + storage: storage, + limits:{fileSize: 5000000}, + fileFilter: function(req, file, cb){ + checkFileType(file, cb); + } +}).single('myImage'); + +// Check File Type +function checkFileType(file, cb){ + // Allowed ext + const filetypes = /jpeg|jpg|png|gif/; + // Check ext + const extname = filetypes.test(path.extname(file.originalname).toLowerCase()); + // Check mime + const mimetype = filetypes.test(file.mimetype); + + if(mimetype && extname){ + return cb(null,true); + } else { + cb('Error: Images Only!'); + } +} +router.post('/technicalindex/add_pictures', (req, res) => { + upload(req, res, (err) => { + if(err){ + res.render('upload_pictures', { + msg: err + }); + } else { + if(req.file == undefined){ + res.render('upload_pictures', { + msg: 'Error: No File Selected!' + }); + } else { + res.render('upload_pictures', { + msg: 'File Uploaded!', + file: `uploads/${req.file.filename}` + }); + } + } + }); +}); + +//get single article +router.get('/technicalindex/:id', (req, res) => { + Article.findById(req.params.id, (err, article) => { + if (err) { + console.log(err); + return; + } else { + res.render('article', { + title: 'articles', + article: article + }) + } + }); +}); + +module.exports = router; \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/routes/users.js b/fall2018/Ankit Ojha/saarthi/routes/users.js new file mode 100644 index 0000000..fe9daab --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/routes/users.js @@ -0,0 +1,146 @@ +const express = require('express'); +const router = express.Router(); +const bcrypt = require('bcryptjs'); +const passport = require('passport'); +const article = require('../models/articles'); +const Request = require('../models/Request'); +const User = require('../models/User'); +const TechnicalUser = require('../models/TechnicalUser'); + +router.get('/welcome/explore',(req,res)=>{ + article.find({},(err,articles)=>{ + if(err){ + console.log(err); + }else{ + res.render('explore',{ + articles : articles + }) + } + }) +}); + +//Login Page +router.get('/login',(req,res)=>res.render('login')); + +//Register Page +router.get('/register',(req,res)=>res.render('register')); + +//Welcome Page +router.get('/welcome',(req,res)=>res.render('welcome')); + + + +router.get('/user_profile',(req,res)=>{ + res.render('user_profile'); +}); + +//user single article +// router.get('/explore/:id', (req, res) => { +// Article.findById(req.params.id, (err, article) => { + +// if (err) { +// console.log(err); +// return; +// } else { +// res.render('user_article', { +// article: article +// }) +// } +// }); +// }); +router.get('/explore/:id', (req, res) => { + Article.findById(req.params.id, (err, article) => { + TechnicalUser.findById(req.params.id,(err,tuser)=>{ + if(err){ + console.log(err); + return; + }else{ + res.render('user_article', { + article: article, + tuser:tuser + }); + } + }); + }); +}); + +// Register Hand + +router.post('/register', (req, res) => { + const { name, email, password, password2 } = req.body; + let errors = []; + + if (!name || !email || !password || !password2) { + errors.push({ msg: 'Please enter all fields' }); + } + + if (password != password2) { + errors.push({ msg: 'Passwords do not match' }); + } + + if (password.length < 6) { + errors.push({ msg: 'Password must be at least 6 characters' }); + } + + if (errors.length > 0) { + res.render('register', { + errors, + name, + email, + password, + password2 + }); + } else { + // Validation passed + User.findOne({email:email}) + .then(user => { + if(user){ + errors.push({msg:"Email is alerady registered"}); + res.render('register',{ + errors, + name, + email, + password, + password2 + }); + }else{ + const newUser = new User({ + name, + email, + password + }); + //Hash password + bcrypt.genSalt(10,(err,salt)=> + bcrypt.hash(newUser.password,salt,(err,hash)=>{ + if(err) throw err; + //Set password to hash + newUser.password =hash; + //Save the User + newUser.save() + .then(user=>{ + req.flash('success_msg','You are now registered'); + res.redirect('/users/login'); + }) + .catch(err => console.log(err)); + })) + } + + }); + + } +}); +//Login Handle +router.post('/login', (req, res, next) => { + passport.authenticate('user-local', { + successRedirect: '/users/welcome', + failureRedirect: '/users/login', + failureFlash: true + })(req, res, next); +}); +// Logout +router.get('/logout', (req, res) => { + req.logout(); + req.flash('success_msg', 'You are logged out'); + res.redirect('/users/welcome'); +}); +module.exports = router; \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/seed.js b/fall2018/Ankit Ojha/saarthi/seed.js new file mode 100644 index 0000000..22375e1 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/seed.js @@ -0,0 +1,25 @@ +// const mongoose = require('mongoose'); +// const config = require('./config/keys'); +// const bcrypt = require('bcryptjs'); +// const db = require('./config/keys').MongoURI; +// mongoose.connect(db,{useNewUrlParser:true}) +// .then(()=>console.log('MongoDB Connected....')) +// .catch(err=>console.log(err)); +// let TechnicalUser=require('./models/TechnicalUser'); +// TechnicalUser.remove({}) +// .then(()=>{ +// let technicalUser=[]; +// technicalUser.push({ +// name:"Kartike Dutta", +// email:"kartikdutta29@gmail.com", +// password:"Saarthi@123" +// }); +// return TechnicalUser.create(technicalUser); +// }) +// .then(()=>{ +// process.exit(); +// }) +// .catch((e)=>{ +// console.log(e); +// process.exit(1); +// }); \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/views/add_articles.ejs b/fall2018/Ankit Ojha/saarthi/views/add_articles.ejs new file mode 100644 index 0000000..3ff4602 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/views/add_articles.ejs @@ -0,0 +1,30 @@ +<%= title %> + +
    +
    + + +
    +
    + + +
    +
    +
    + +
    + + + Delete Step +
    +
    + Add Step +
    +
    +
    + + +
    + + \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/views/article.ejs b/fall2018/Ankit Ojha/saarthi/views/article.ejs new file mode 100644 index 0000000..8afb301 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/views/article.ejs @@ -0,0 +1,16 @@ +

    + <%= article.title %> +

    +
      +
    • Written By: <%= article.Author%>
    • +
    • Category of Article: <%= article.Category%>
    • +
    • Content: <%= article.Body%>
    • +
    +
    +Edit +Delete + + \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/views/dashboard.ejs b/fall2018/Ankit Ojha/saarthi/views/dashboard.ejs new file mode 100644 index 0000000..b1b290b --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/views/dashboard.ejs @@ -0,0 +1,330 @@ + + + + + + + SARTHI + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    Welcome <%= name %>

    +
    +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + + + + +
    +
    +
    + + + + + + +
    +
    + + + +
    + + + +
    + + + + + + + +
    +

    FRESH ARTICLES

    + + +
    +
    +
    +
    +
    + +
    +
    +

    NEW ARTICLE-1

    +
    +
    +
    + +
    +
    +
    + +
    +
    +

    NEW ARTICLE-2

    +
    +
    +
    +
    +
    +
    + +
    +
    +

    NEW ARTICLE-3

    +
    +
    +
    + + + +
    +
    + + + +
    + + +
    + + + +
    + + +
    +

    Category

    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    + + + +
    +

    Switch Language

    +
    + Language + +
    +
    + + +
    + +
    + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/views/edit_article.ejs b/fall2018/Ankit Ojha/saarthi/views/edit_article.ejs new file mode 100644 index 0000000..13f5024 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/views/edit_article.ejs @@ -0,0 +1,131 @@ +<% include ./partials/messages %> + + + + + + + Sarthi || Writer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    <%= title%>

    + +
    +
    +
    + + + + + + +

    Article Steps

    +
    +
    +
    + + + + Remove Step +
    + +
    + Add Step +
    +
    +
    +
    + + +
    + + + + + + + + + + diff --git a/fall2018/Ankit Ojha/saarthi/views/explore.ejs b/fall2018/Ankit Ojha/saarthi/views/explore.ejs new file mode 100644 index 0000000..302254e --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/views/explore.ejs @@ -0,0 +1,300 @@ + + + + + + + Sarthi | Explorer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + +
    +

    Category

    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    + + + + + + + +
    +

    FRESH ARTICLES

    +
    + +
    +
    +
    +
    +
    + +
    +
    +

    HOW TO APPLY FOR PAN CARD ONLINE

    +

    Illustrative step-by-step procedure To Apply For PAN CARD

    +
    +
    +
    +
    +
    +
    + +
    +
    +

    HOW TO OPERATE PAYMENT GATEWAY

    +

    Illustrative step-by-step procedure To Operate Payment GATEWAY FIRST TIME

    +
    +
    +
    +
    +
    +
    + +
    +
    +

    HOW TO OPEN YOUR DEMAT ACCOUNT ONLINE

    +

    Illustrative step-by-step procedure To Open YOUR DEMAT ACCOUNT ONLINE

    +
    +
    +
    + + + +
    +
    + +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + +
    + + + +
    +

    Can't Find The Article + Request An Article +

    +
    +
    + + + + + +
    +
    +
    + + + + + +
    + +
    + + + + + + + + + + + \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/views/layout.ejs b/fall2018/Ankit Ojha/saarthi/views/layout.ejs new file mode 100644 index 0000000..bcc51fa --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/views/layout.ejs @@ -0,0 +1,22 @@ + + + + + + + Saarthi + + +
    + <%- body %> +
    + + + + + + + + + + \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/views/login.ejs b/fall2018/Ankit Ojha/saarthi/views/login.ejs new file mode 100644 index 0000000..d7927d4 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/views/login.ejs @@ -0,0 +1,65 @@ +<% include ./partials/messages %> + + + + + + + SARTHI || Log-In + + + + + + + +
    +
    +
    + +
    +
    + + +
    +
    + + +
    + + Login as Techical Writer
    + Create an account +
    +
    +
    + +
    + + + \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/views/partials/footer.ejs b/fall2018/Ankit Ojha/saarthi/views/partials/footer.ejs new file mode 100644 index 0000000..4fd6057 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/views/partials/footer.ejs @@ -0,0 +1,37 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/views/partials/header.ejs b/fall2018/Ankit Ojha/saarthi/views/partials/header.ejs new file mode 100644 index 0000000..592a2ac --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/views/partials/header.ejs @@ -0,0 +1,83 @@ + + + + + + + SARTHI + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fall2018/Ankit Ojha/saarthi/views/partials/messages.ejs b/fall2018/Ankit Ojha/saarthi/views/partials/messages.ejs new file mode 100644 index 0000000..14d68b4 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/views/partials/messages.ejs @@ -0,0 +1,16 @@ +<% if(typeof errors != 'undefined') { %> + <% errors.forEach(function(error){ %> + <%= error.msg %> + <% }); %> +<% } %> +<% if(success_msg != ''){ %> + <%= success_msg %> +<% } %> + +<% if(error_msg != ''){ %> + <%= error_msg %> +<% } %> + +<% if(error != ''){ %> + <%= error %> +<% } %> \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/views/register.ejs b/fall2018/Ankit Ojha/saarthi/views/register.ejs new file mode 100644 index 0000000..d54f396 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/views/register.ejs @@ -0,0 +1,90 @@ +<% include ./partials/messages %> + + + + + + + SARTHI || Sign-Up + + + + + + + +
    +
    +
    + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    + + + Already have an account +
    +
    +
    + +
    + + + \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/views/searchedarticles.ejs b/fall2018/Ankit Ojha/saarthi/views/searchedarticles.ejs new file mode 100644 index 0000000..6ba59e6 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/views/searchedarticles.ejs @@ -0,0 +1,75 @@ + + + + + + + Sarthi | Explorer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + <% if(noMatch !== null) { %> +

    <%= noMatch %>

    +

    +

    + +
    +

    + <% } %> +
    + <% allarticles.forEach((article)=>{ %> +
    +
    + +
    +
    +

    <%= article.title %>

    +
    +
    + <% }); %> +
    + + + + + + + \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/views/technicalLogin.ejs b/fall2018/Ankit Ojha/saarthi/views/technicalLogin.ejs new file mode 100644 index 0000000..5ebdba4 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/views/technicalLogin.ejs @@ -0,0 +1,64 @@ +<% include ./partials/messages %> + + + + + + + SARTHI || Log-In + + + + + + + +
    +
    +
    + +
    +
    + + +
    +
    + + +
    + + Create an account +
    +
    +
    + +
    + + + \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/views/technicalindex.ejs b/fall2018/Ankit Ojha/saarthi/views/technicalindex.ejs new file mode 100644 index 0000000..f50e3d1 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/views/technicalindex.ejs @@ -0,0 +1,230 @@ +<% include ./partials/messages %> + + + + + + + Sarthi || Writer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    MY PROFILE

    + +
    + +
    + + +
    + John +

    <%= user.name %>

    +

    Sarthi Writer

    + + + + + +
    + + +
    + + + +
    + + +
    +
    +

    Name:

    +

    <%= user.name %>

    +
    +
    +

    Email Id:

    +

    <%= user.email %>

    +
    +
    + + + +
    +
    +
    + + + + + + +
    +
    +
    + + + +
    + <% articles.forEach((article,index)=>{ %> + <% if(article.Author == user.name){ console.log('insidemyarticles'+ user.name) %> +
    +

    <%let j = index+1 %>Article No -<%= j %> <%= article.title %>

    + + +
    + <% }%> + <% }); %> +
    + + + + + + + +
    +
    +
    + + + + + + + +

    Article Steps

    +
    +
    +
    + + + + + Remove Step +
    + +
    + Add Step +
    +
    +
    + + + <% console.log(user.id)%> + +
    + +
    + + + +
    + +
    + + + + + + + + + + + + \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/views/upload_pictures.ejs b/fall2018/Ankit Ojha/saarthi/views/upload_pictures.ejs new file mode 100644 index 0000000..5f18cb7 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/views/upload_pictures.ejs @@ -0,0 +1,32 @@ + + + + + + Upload Pictures + + +
    +

    File Upload

    + <%= typeof msg != 'undefined' ? msg : '' %> +
    +
    +
    + File + +
    +
    + +
    +
    + +
    +
    + Go To Technical Home Page +
    + + + \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/views/user_article.ejs b/fall2018/Ankit Ojha/saarthi/views/user_article.ejs new file mode 100644 index 0000000..907e6b2 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/views/user_article.ejs @@ -0,0 +1,163 @@ + + + + + + + + SARTHI | ARTICLES + + + + + + + + + + + + + + + + + + + + + + + + +

    THE ARCTICLE

    +
    + +
    +

    <%= article.title%>

    + + + + + + <% for(let i = 0 ; i < article.Body.length ; i++){ %> +
    +
    +

    +
    + + <% let j = i+1 %><%= j %> +
    + <%= article.steptitiles[i] %> +

    +
    +
    + +
    +
    + <%= article.Body[i] %> +
    +
    + <% } %> + + + + +
    + + + +
    + + +
    +

    rate this article

    +
    + + + + + + + + + + +
    +
    +
    +

    Article Rating 4.6

    +
    +
    + + + + + + + +
    + +
    +
    + + + + + + + + \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/views/user_profile.ejs b/fall2018/Ankit Ojha/saarthi/views/user_profile.ejs new file mode 100644 index 0000000..69098b7 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/views/user_profile.ejs @@ -0,0 +1,200 @@ + + + + + + + Sarthi || Reader + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    MY PROFILE

    + +
    + +
    + + +
    + John +

    MI BRUHA

    +

    Reader

    + + + + + +
    + + +
    + + + +
    + + +
    +
    +

    Name:

    +

    <%= user.name%>

    +
    +
    +

    Email Id:

    +

    <%= user.email%>

    +
    +
    +

    User Type:

    +

    Reader

    +
    +
    + + + +
    +
    + + + + + +
    +
    + + + +
    +
    +
    + + + + + +
    +
    +
    + + + + + + + + + +
    + +
    + + + + + + + + + + + \ No newline at end of file diff --git a/fall2018/Ankit Ojha/saarthi/views/welcome.ejs b/fall2018/Ankit Ojha/saarthi/views/welcome.ejs new file mode 100644 index 0000000..0915f18 --- /dev/null +++ b/fall2018/Ankit Ojha/saarthi/views/welcome.ejs @@ -0,0 +1,219 @@ +<% include ./partials/header %> + + +
    +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + + + + +
    +
    +
    + + + + + + +
    +
    + + + +
    + + + +
    + + + + + + + +
    +

    FRESH ARTICLES

    + + +
    +
    +
    +
    +
    + +
    +
    +

    NEW ARTICLE-1

    +
    +
    +
    + +
    +
    +
    + +
    +
    +

    NEW ARTICLE-2

    +
    +
    +
    +
    +
    +
    + +
    +
    +

    NEW ARTICLE-3

    +
    +
    +
    + + + +
    +
    + + + +
    + + +
    + + + +
    + + +
    +

    Category

    +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    +
    + + + +
    +

    Switch Language

    +
    + Language + +
    +
    + + +
    + +
    + + + <% include ./partials/footer %> \ No newline at end of file diff --git a/fall2018/Ankit Ojha/todoapp/.gitignore b/fall2018/Ankit Ojha/todoapp/.gitignore new file mode 100644 index 0000000..e05de24 --- /dev/null +++ b/fall2018/Ankit Ojha/todoapp/.gitignore @@ -0,0 +1,4 @@ +/node_modules +npm-debug.log +.DS_Store +/*.env \ No newline at end of file diff --git a/fall2018/Ankit Ojha/todoapp/Procfile b/fall2018/Ankit Ojha/todoapp/Procfile new file mode 100644 index 0000000..207d22f --- /dev/null +++ b/fall2018/Ankit Ojha/todoapp/Procfile @@ -0,0 +1 @@ +web: node app.js \ No newline at end of file diff --git a/fall2018/Ankit Ojha/todoapp/app.js b/fall2018/Ankit Ojha/todoapp/app.js new file mode 100644 index 0000000..b0bff64 --- /dev/null +++ b/fall2018/Ankit Ojha/todoapp/app.js @@ -0,0 +1,34 @@ +const express = require('express'); +const path = require('path'); +const app = express(); +const ejs = require('ejs'); +const bodyParser = require('body-parser'); + +const port = process.env.PORT || 5000; +//require db file +const db = require('./config/db'); +//body parser middleware +app.use(bodyParser.text()); +app.use(bodyParser.urlencoded({ + extended: false +})); +app.use(bodyParser.json()); + +//set the view engine +app.set('view engine', 'ejs'); +app.set('views', path.join(__dirname, '/views')); + + +//set up the public folder +app.use('/public', express.static(path.join(__dirname, '/public'))); + + +app.listen(port, () => { + console.log(`listening to server on ${port}`); + db.connect(() => { + console.log('connected to mongodb'); + + //set the route + app.use('/', require('./routes/todo')); + }); +}); \ No newline at end of file diff --git a/fall2018/Ankit Ojha/todoapp/config/db.js b/fall2018/Ankit Ojha/todoapp/config/db.js new file mode 100644 index 0000000..98d1620 --- /dev/null +++ b/fall2018/Ankit Ojha/todoapp/config/db.js @@ -0,0 +1,69 @@ +const mongodb = require('mongodb').MongoClient; +let dbuser = 'ankit'; +let passwd = 'qwerty123'; +let dbname = 'test' +let collection = 'todo'; + +let url = `mongodb+srv://${dbuser}:${passwd}@cluster0-ozcdd.mongodb.net/test?retryWrites=true`; + + +let connect = (cb) => { + mongodb.connect(url, { + useNewUrlParser: true + }, (err, client) => { + if (err) throw err; + let db = client.db(dbname); + collection = db.collection(`${collection}`); + cb(); + }); +} + +let findList = (cb) => { + collection.find({}).toArray((err,docs)=>{ + if(err) throw err + else{ + // console.log('from db '+docs[0].work) + cb(docs); + } + }); +} + +let addTask = (work, doneval, cb) =>{ + var document = {work:work, done:doneval, created_on:Date.now()}; + collection.insertOne(document,(err,records)=>{ + if(err) throw err + else{ + console.log(`records inserted`); + cb(); + } + }); +} + +let removeTask = (item,cb)=>{ + // console.log(`items's value ${item}`) + collection.deleteOne({'work':item}, (err,result)=>{ + if(err) throw err + else{ + // console.log(result); + cb(); + } + }); +} + +let updateTask = (item,doneval,cb)=>{ + collection.findOneAndUpdate({'work':item},{$set:{'done':doneval}},(err,result)=>{ + if(err) throw err + else{ + // console.log(result); + cb(); + } + }); +} + +module.exports = { + connect, + findList, + addTask, + removeTask, + updateTask +} \ No newline at end of file diff --git a/fall2018/Ankit Ojha/todoapp/package-lock.json b/fall2018/Ankit Ojha/todoapp/package-lock.json new file mode 100644 index 0000000..6d1d08b --- /dev/null +++ b/fall2018/Ankit Ojha/todoapp/package-lock.json @@ -0,0 +1,452 @@ +{ + "name": "todoapp", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "accepts": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", + "requires": { + "mime-types": "~2.1.18", + "negotiator": "0.6.1" + } + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "body-parser": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", + "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", + "requires": { + "bytes": "3.0.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "~1.6.3", + "iconv-lite": "0.4.23", + "on-finished": "~2.3.0", + "qs": "6.5.2", + "raw-body": "2.3.3", + "type-is": "~1.6.16" + } + }, + "bson": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.0.tgz", + "integrity": "sha512-9Aeai9TacfNtWXOYarkFJRW2CWo+dRon+fuLZYJmvLV3+MiUp0bEI6IAZfXEIg7/Pl/7IWlLaDnhzTsD81etQA==" + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "ejs": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.6.1.tgz", + "integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==" + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "express": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", + "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", + "requires": { + "accepts": "~1.3.5", + "array-flatten": "1.1.1", + "body-parser": "1.18.3", + "content-disposition": "0.5.2", + "content-type": "~1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.1.1", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.4", + "qs": "6.5.2", + "range-parser": "~1.2.0", + "safe-buffer": "5.1.2", + "send": "0.16.2", + "serve-static": "1.13.2", + "setprototypeof": "1.1.0", + "statuses": "~1.4.0", + "type-is": "~1.6.16", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + } + } + }, + "finalhandler": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", + "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.4.0", + "unpipe": "~1.0.0" + }, + "dependencies": { + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + } + } + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, + "iconv-lite": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ipaddr.js": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", + "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=" + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "memory-pager": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", + "optional": true + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" + }, + "mime-db": { + "version": "1.38.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", + "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==" + }, + "mime-types": { + "version": "2.1.22", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz", + "integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==", + "requires": { + "mime-db": "~1.38.0" + } + }, + "mongodb": { + "version": "3.1.13", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.1.13.tgz", + "integrity": "sha512-sz2dhvBZQWf3LRNDhbd30KHVzdjZx9IKC0L+kSZ/gzYquCF5zPOgGqRz6sSCqYZtKP2ekB4nfLxhGtzGHnIKxA==", + "requires": { + "mongodb-core": "3.1.11", + "safe-buffer": "^5.1.2" + } + }, + "mongodb-core": { + "version": "3.1.11", + "resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-3.1.11.tgz", + "integrity": "sha512-rD2US2s5qk/ckbiiGFHeu+yKYDXdJ1G87F6CG3YdaZpzdOm5zpoAZd/EKbPmFO6cQZ+XVXBXBJ660sSI0gc6qg==", + "requires": { + "bson": "^1.1.0", + "require_optional": "^1.0.1", + "safe-buffer": "^5.1.2", + "saslprep": "^1.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "parseurl": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "proxy-addr": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", + "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.8.0" + } + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" + }, + "raw-body": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", + "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.3", + "iconv-lite": "0.4.23", + "unpipe": "1.0.0" + } + }, + "require_optional": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", + "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==", + "requires": { + "resolve-from": "^2.0.0", + "semver": "^5.1.0" + } + }, + "resolve-from": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", + "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "saslprep": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.2.tgz", + "integrity": "sha512-4cDsYuAjXssUSjxHKRe4DTZC0agDwsCqcMqtJAQPzC74nJ7LfAJflAtC1Zed5hMzEQKj82d3tuzqdGNRsLJ4Gw==", + "optional": true, + "requires": { + "sparse-bitfield": "^3.0.3" + } + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" + }, + "send": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" + }, + "dependencies": { + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + } + } + }, + "serve-static": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", + "send": "0.16.2" + } + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + }, + "sparse-bitfield": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", + "integrity": "sha1-/0rm5oZWBWuks+eSqzM004JzyhE=", + "optional": true, + "requires": { + "memory-pager": "^1.0.2" + } + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + }, + "type-is": { + "version": "1.6.16", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", + "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.18" + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + } + } +} diff --git a/fall2018/Ankit Ojha/todoapp/package.json b/fall2018/Ankit Ojha/todoapp/package.json new file mode 100644 index 0000000..6c295de --- /dev/null +++ b/fall2018/Ankit Ojha/todoapp/package.json @@ -0,0 +1,20 @@ +{ + "name": "todoapp", + "version": "1.0.0", + "description": "todo app", + "main": "app.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "ankit", + "license": "ISC", + "dependencies": { + "body-parser": "^1.18.3", + "ejs": "^2.6.1", + "express": "^4.16.4", + "mongodb": "^3.1.13" + }, + "engines": { + "node": "10.x" + } +} diff --git a/fall2018/Ankit Ojha/todoapp/public/css/main.css b/fall2018/Ankit Ojha/todoapp/public/css/main.css new file mode 100644 index 0000000..b91d5be --- /dev/null +++ b/fall2018/Ankit Ojha/todoapp/public/css/main.css @@ -0,0 +1,158 @@ +/* Include the padding and border in an element's total width and height */ +* { + box-sizing: border-box; + /* margin: 0px auto; */ +} + + +body { + max-width: 60%; + margin: 20px auto; + background: #36D1DC; + /* fallback for old browsers */ + background: -webkit-linear-gradient(to right, #5B86E5, #36D1DC); + /* Chrome 10-25, Safari 5.1-6 */ + background: linear-gradient(to right, #5B86E5, #36D1DC); + /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ +} + +#myDIV h2 { + font-size: 4em; +} + +#myDIV input { + font-size: 2.5em; +} + +#myDIV span { + font-size: 3em; +} + +/* Remove margins and padding from the list */ +ul { + margin: 0; + padding: 0; +} + +/* Style the list items */ +ul li { + cursor: pointer; + position: relative; + padding: 12px 8px 12px 40px; + background: #eee; + font-size: 3em; + transition: 0.2s; + list-style-type: none; + + /* make the list items unselectable */ + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +/* Set all odd list items to a different color (zebra-stripes) */ +ul li:nth-child(odd) { + background: #f9f9f9; +} + +/* Darker background-color on hover */ +ul li:hover { + background: #ddd; +} + +/* When clicked on, add a background color and strike out text */ +ul li.checked { + background: #888; + color: #fff; + text-decoration: line-through; +} + +/* Add a "checked" mark when clicked on */ +ul li.checked::before { + content: ''; + position: absolute; + border-color: #fff; + border-style: solid; + border-width: 0 2px 2px 0; + top: 10px; + left: 16px; + transform: rotate(45deg); + height: 15px; + width: 7px; +} + +/* Style the close button */ +.close { + position: absolute; + right: 0; + top: 0; + padding: 12px 16px 12px 16px; +} + +.close:hover { + background-color: #f44336; + color: white; +} + +/* Style the header */ +.header { + background-color: #0064A2; + color: white; + text-transform: uppercase; + padding: 30px 40px; + text-align: center; +} + +/* Clear floats after the header */ +.header:after { + content: ""; + display: table; + clear: both; +} + +/* Style the input */ +input { + border: none; + width: 75%; + padding: 10px; + float: left; + font-size: 16px; +} + +/* Style the "Add" button */ +.addBtn { + padding: 10px; + width: 25%; + background: #d9d9d9; + color: #555; + float: left; + text-align: center; + font-size: 16px; + cursor: pointer; + transition: 0.3s; +} + +.addBtn:hover { + background-color: #bbb; +} + +@media (min-width: 300px) and (max-width: 600px) { + + #myDIV h2 { + font-size: 4em; + } + + #myDIV input { + font-size: 3em; + } + + #myDIV span { + font-size: 3em; + } + + ul li{ + font-size: 3em; + } + +} \ No newline at end of file diff --git a/fall2018/Ankit Ojha/todoapp/public/js/main.js b/fall2018/Ankit Ojha/todoapp/public/js/main.js new file mode 100644 index 0000000..5fdef61 --- /dev/null +++ b/fall2018/Ankit Ojha/todoapp/public/js/main.js @@ -0,0 +1,111 @@ +// Create a "close" button and append it to each list item +let myNodelist = document.getElementsByTagName("LI"); +for (let i = 0; i < myNodelist.length; i++) { + let span = document.createElement("SPAN"); + let txt = document.createTextNode("\u00D7"); + span.className = "close"; + span.appendChild(txt); + myNodelist[i].appendChild(span); +} + +// Click on a close button to hide the current list item +let close = document.getElementsByClassName("close"); +for (let i = 0; i < close.length; i++) { + close[i].onclick = function () { + let div = this.parentElement; + let divvalue = div.textContent.slice(0, -1); + // delete the element from the database + fetch('/deleteTask/' + divvalue, { + method: 'delete' + }) + .then((data) => data.text()) + .then(data => { + console.log('deleted data' + data); + if (data == 'ok') { + div.remove(); + location.reload(); + } + }); + + } +} + +// Add a "checked" symbol when clicking on a list item +let list = document.querySelector('ul'); +list.addEventListener('click', function (ev) { + if (ev.target.tagName === 'LI') { + let doneval; + ev.target.classList.toggle('checked'); + if (ev.target.classList.value === 'checked') { + doneval = true; + } else if (ev.target.classList.value === '') { + doneval = false; + } + let doneelement = ev.target.textContent.slice(0, -1); + + // update the done value in database + fetch('updateTask/' + doneelement, { + method: 'post', + headers: { + 'Accept': 'application/json, text/plain, */*', + 'content-type': 'application/json' + }, + body: JSON.stringify({ + doneval: doneval + }) + }) + .then((data) => data.text()) + .then(data => { + console.log(data); + }); + } +}, false); + +// Create a new list item when clicking on the "Add" button +function newElement() { + let li = document.createElement("li"); + let inputValue = document.getElementById("myInput").value; + if (inputValue === '') { + alert("You must write something!"); + } else { + document.getElementById("myUL").appendChild(li); + } + //send data to the server to insert data in the database + fetch('/addTask', { + method: 'post', + headers: { + 'Accept': 'application/json, text/plain, */*', + 'content-type': 'application/json' + }, + body: JSON.stringify({ + todo: { + work: inputValue, + done: false + } + }) + }) + .then((data) => data.text()) + .then(data => { + console.log(data) + if (data === 'ok') { + let t = document.createTextNode(inputValue); + li.appendChild(t); + + document.getElementById("myInput").value = ""; + + let span = document.createElement("SPAN"); + let txt = document.createTextNode("\u00D7"); + span.className = "close"; + span.appendChild(txt); + li.appendChild(span); + + } + }); + + for (i = 0; i < close.length; i++) { + close[i].onclick = function () { + let div = this.parentElement; + div.style.display = "none"; + } + } +} \ No newline at end of file diff --git a/fall2018/Ankit Ojha/todoapp/routes/todo.js b/fall2018/Ankit Ojha/todoapp/routes/todo.js new file mode 100644 index 0000000..926f42b --- /dev/null +++ b/fall2018/Ankit Ojha/todoapp/routes/todo.js @@ -0,0 +1,43 @@ +const router = require('express').Router(); +const db = require('../config/db'); + + +router.get('/',(req,res)=>{ + db.findList((docs)=>{ + // console.log('docs '+docs[0]); + res.render('index',{ + pagetitle: 'TODO-APP', + todo: docs + }); + }) +}); + +//post route to store a task in database +router.post('/addTask',(req,res)=>{ + let work = req.body.todo.work; + let doneval = req.body.todo.done; + db.addTask(work,doneval,()=>{ + console.log('Task added - server'); + res.send('ok'); + }); +}); + +//delete route to delete a task from database +router.delete('/deleteTask/:item',(req,res)=>{ + // console.log('params '+req.params.item); + db.removeTask(req.params.item,()=>{ + console.log('item removed - server'); + res.send('ok'); + }) +}); + +//edit route to edit a task +router.post('/updateTask/:item',(req,res)=>{ + // console.log(req.body.doneval); + db.updateTask(req.params.item,req.body.doneval,()=>{ + console.log('item updated -server'); + res.send('ok'); + }); +}); + +module.exports = router; \ No newline at end of file diff --git a/fall2018/Ankit Ojha/todoapp/views/index.ejs b/fall2018/Ankit Ojha/todoapp/views/index.ejs new file mode 100644 index 0000000..bd6e2c2 --- /dev/null +++ b/fall2018/Ankit Ojha/todoapp/views/index.ejs @@ -0,0 +1,29 @@ + + + + + <%= pagetitle%> + + + + +
    +

    To-Do List

    + + Add +
    + +
      + <% for(let i=0;i + <% if(todo[i].done) { %> +
    • <%= todo[i].work %>
    • + <% } else { %> +
    • <%= todo[i].work %>
    • + <% } %> + <% } %> +
    + + + + + \ No newline at end of file diff --git a/fall2018/Ankit Ojha/weatherapp/css/main.css b/fall2018/Ankit Ojha/weatherapp/css/main.css new file mode 100644 index 0000000..a0a742a --- /dev/null +++ b/fall2018/Ankit Ojha/weatherapp/css/main.css @@ -0,0 +1,229 @@ +* { + box-sizing: border-box; + margin: 0 auto; +} + +body { + display: grid; + grid-template-columns: 1fr; + justify-items: center; + align-content: center; + padding: 0.3em; +} + +.wrapper { + display: grid; + grid-template-rows: 1fr 0.3fr 0.8fr; + grid-template-columns: minmax(300px,650px); + grid-row-gap: 1em; + align-items: center; + justify-items: center; + background: rgba(33, 131, 138, 1); + margin-top: 2%; + border-radius: 2em; + /* padding: 0.5em; */ +} + +.banner { + align-self: center; + display: flex; + flex-direction: column; + flex-wrap: nowrap; +} + +#bannerimg{ + width: 100%; + height: 85%; + overflow: hidden; +} + +#bannerimg img{ + padding-top:25px; + max-width: 100%; + max-height: inherit; +} + +.banner p{ + padding-top: 5px; + font-family: 'Lobster', cursive; + text-align: center; + font-size: 4em; + color: #e7eff6; +} + +.search { + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-items: center; + font-family: 'Lobster', cursive; + font-size: 1.8em; + color: #e7eff6; + +} + +#searchfield{ + justify-self: center; +} + +#searchbutton{ + padding-top: 5px; + justify-self: center; +} + +@media screen and (min-width:200px) and (max-width: 450px){ + #searchfield { + display: flex; + flex-direction: column; + justify-items: center; + } +} + +#city { + border-radius: 1em; + height: 1.5em; + font-size: 0.7em; + border: 2px solid #0099CC; + color: #0099CC; + outline: none; + font-weight: 3em; +} + +#btn { + font-family: 'Lobster', cursive; + font-size: 1em; + color: #e7eff6; + border-radius: 1em; + background: transparent; + border: 2px solid #0099CC; + outline: none; +} + +#btn:hover { + background: #0099CC; + color: white; + cursor: pointer; +} + + + +/* css for loader*/ +.lds-ripple { + display: inline-block; + position: relative; + width: 80px; + height: 80px; +} + +.lds-ripple div { + position: absolute; + border: 4px solid #e7eff6; + opacity: 1; + border-radius: 50%; + animation: lds-ripple 1s cubic-bezier(0, 0.2, 0.8, 1) infinite; +} + +.lds-ripple div:nth-child(2) { + animation-delay: -0.5s; +} + +@keyframes lds-ripple { + 0% { + top: 28px; + left: 28px; + width: 0; + height: 0; + opacity: 1; + } + + 100% { + top: -1px; + left: -1px; + width: 58px; + height: 58px; + opacity: 0; + } +} + +#cssloader { + justify-self: center; + font-size: 1.9em; + color: #e7eff6; + font-family: 'Lobster', cursive; +} + +.content { + display: grid; + grid-template-rows: 0.2fr 1fr 1fr; + grid-template-columns: 1fr 1fr; + + grid-gap: 0.5em; + align-self: self-start; + padding: 0.3em; + + align-items: center; + justify-items: center; + justify-content: stretch; + align-content: stretch; +} + +.content div:not(:first-child) { + margin: 0em; + text-align: center; + /* vertical-align: middle; */ + line-height: 50px; + font-family: 'Baloo Thambi', cursive; + font-size: 1.5em; + background: #4fb3be; + color: #e7eff6; + border-radius: 1em; + align-items: stretch; + justify-items: stretch; + overflow: hidden; + height: 100px; +} + +@media screen and (min-width:200px) and (max-width:500px){ + .content div:not(:first-child) { + height: 150px; + } +} + +#icondiv { + grid-column: 1/3; + grid-row: 1/2; + /* height: auto; */ + width: inherit; + /* background: rgba(146, 148, 145, 0.836); */ +} + +#coods { + grid-column: 1/2; + grid-row: 2/3; + /* height: auto; */ + width: 100%; +} + +#humidity { + grid-column: 2/3; + grid-row: 2/3; + /* height: auto; */ + width: 100%; + /* background: rgba(245, 72, 19, 0.836); */ +} + +#mintemp { + grid-column: 1/2; + grid-row: 3/4; + /* height: auto; */ + width: 100%; + /* background: rgba(155, 19, 245, 0.836); */ +} + +#maxtemp { + grid-column: 2/3; + grid-row: 3/4; + /* height: auto; */ + width: 100%; + /* background: rgba(245, 19, 113, 0.836); */ +} \ No newline at end of file diff --git a/fall2018/Ankit Ojha/weatherapp/index.html b/fall2018/Ankit Ojha/weatherapp/index.html new file mode 100644 index 0000000..fd58ea7 --- /dev/null +++ b/fall2018/Ankit Ojha/weatherapp/index.html @@ -0,0 +1,61 @@ + + + + + + + + Weather App + + + +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + weathericon +

    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + + + + + + + + \ No newline at end of file diff --git a/fall2018/Ankit Ojha/weatherapp/js/app.js b/fall2018/Ankit Ojha/weatherapp/js/app.js new file mode 100644 index 0000000..9187786 --- /dev/null +++ b/fall2018/Ankit Ojha/weatherapp/js/app.js @@ -0,0 +1,113 @@ +$(document).ready(() => { + + let currentDirectory = window.location.pathname.split('/').slice(0, -1).join('/'); + let loader = $('#cssloader'); + let content = $('.content'); + let btn = $('#btn'); + let searchInput = $('#city'); + //weather icon + let icon = $('#icon'); + //result divs + let coord = $('#coods'); + let humidity = $('#humidity'); + let mintemp = $('#mintemp'); + let maxtemp = $('#maxtemp'); + //api key + let appid = "appid=31a08a7db70a2dc1039e7e16aab9f825"; + //variable for changing banner + let bannerimg = $('.banner img') + let bg = ["bg1.jpg", "bg2.jpg", "bg3.jpg", "bg4.jpg"]; + let bgcounter = 0; + + let weathericondesc = $('weathericondesc'); + // icon.attr('display','none'); + //hit the api and parse the recrived data + let cssloader = $('#cssloader'); + + function displaycontent() { + loader.hide(); + content.show(); + } + + function hidecontent() { + loader.show(); + content.hide(); + } + + hidecontent(); + + + + let findWeatherDetails = ()=>{ + let cityinput = $('#city'); + + let city = cityinput.val().trim; + console.log(city); + // console.log(city); + if (city.length === 0) { + cssloader.text(`Please enter a city name first`); + hidecontent(); + } else { + $.ajax({ + url: `https://api.openweathermap.org/data/2.5/weather?q=${city}&${appid}&units=metric`, + method: 'GET', + success: (data) => { + + // let weatherdata = JSON.parse(data); + let weatherdata = JSON.parse(JSON.stringify(data)); + icon.attr('src', "http://openweathermap.org/img/w/" + weatherdata.weather[0].icon + ".png"); + icon.attr('width', '80px'); + icon.attr('height', '80px'); + weathericondesc.text(`${weatherdata.weather.description}`); + console.log(weathericondesc); + coord.text(` + longitute: ${weatherdata.coord.lon}\n + latitude: ${weatherdata.coord.lat}`); + + mintemp.text(`minimum temperature: ${weatherdata.main.temp_min}`); + mintemp.append(''); + maxtemp.text(`maximum temperature: ${weatherdata.main.temp_max}`); + maxtemp.append(''); + humidity.text(`humidity: ${weatherdata.main.humidity}%`); + icon.attr('display', 'block'); + displaycontent(); + + }, + error: function (jqXHR, textStatus, errorThrown) { + //if body is empty we end up here + cssloader.text(`Sorry that city dosen't exist`); + hidecontent(); + console.log('error'); + } + }) + } + } + + + btn.bind("click", findWeatherDetails); + searchInput.bind("keyup", enterPressed); + + function enterPressed(event) { + if (event.key === "Enter") { + findWeatherDetails(); + } + } + + // btn.click(() => { + + + + // }) + + // console.log(currentDirectory); + //change banner at an interval + setInterval(function () { + + bannerimg.attr('src', `${currentDirectory}/static/${bg[bgcounter]}`); + bgcounter++; + if (bgcounter == 4) { + bgcounter = 0; + } + }, 2000); + +}) \ No newline at end of file diff --git a/fall2018/Ankit Ojha/weatherapp/static/banner.png b/fall2018/Ankit Ojha/weatherapp/static/banner.png new file mode 100644 index 0000000..37b7573 Binary files /dev/null and b/fall2018/Ankit Ojha/weatherapp/static/banner.png differ diff --git a/fall2018/Ankit Ojha/weatherapp/static/bg1.jpg b/fall2018/Ankit Ojha/weatherapp/static/bg1.jpg new file mode 100644 index 0000000..c366b16 Binary files /dev/null and b/fall2018/Ankit Ojha/weatherapp/static/bg1.jpg differ diff --git a/fall2018/Ankit Ojha/weatherapp/static/bg2.jpg b/fall2018/Ankit Ojha/weatherapp/static/bg2.jpg new file mode 100644 index 0000000..ef003d5 Binary files /dev/null and b/fall2018/Ankit Ojha/weatherapp/static/bg2.jpg differ diff --git a/fall2018/Ankit Ojha/weatherapp/static/bg3.jpg b/fall2018/Ankit Ojha/weatherapp/static/bg3.jpg new file mode 100644 index 0000000..050ecdf Binary files /dev/null and b/fall2018/Ankit Ojha/weatherapp/static/bg3.jpg differ diff --git a/fall2018/Ankit Ojha/weatherapp/static/bg4.jpg b/fall2018/Ankit Ojha/weatherapp/static/bg4.jpg new file mode 100644 index 0000000..d9b4b71 Binary files /dev/null and b/fall2018/Ankit Ojha/weatherapp/static/bg4.jpg differ