Difference between revisions of "Template:UCAS-China/igemUCAS.js"

m
m
Line 1: Line 1:
 
/*!
 
/*!
  * igemUCAS JavaScript Library v0.18.17
+
  * igemUCAS JavaScript Library v0.18.16
 
  * Copyright UCAS iGEM team
 
  * Copyright UCAS iGEM team
 
  */
 
  */
(function(c,a){var b=c.iU=a(c);b()})(window,function(d){var f=d.document,j=(function(){var n="",o=1,p=function(q,r){n=n.concat(o," ",q,": ",r,"\n");o++},m=function(q){var r={string:function(t){if((!t)||typeof t!="string"){p(q,"parameter should be of .")}return r},number:function(t){if((!t)||typeof t!="number"){p(q,"parameter should be of number type.")}return r},keyUnused:function(t,s){if(t[s]){p(q,"key "+s+" has been used.")}return r},assert:function(t,s){if(!t){p(q,s)}return r}};return r};m.displayErrors=function(){if(n.length==0){alert("No errors, Congrats!")}else{alert(n)}};return m})(),e={SEGW:24,INF:2000000},i={merge:function(n,o){for(var m in o){if(n[m]){if(typeof n[m]=="object"&&typeof o[m]=="object"){n[m]=i.merge(n[m],o[m])}else{n[m]=o[m]}}else{n[m]=o[m]}}return n},getUid:(function(){var m=-1;return function(){m++;return(function(o){return"_"+o+"_"})(m)}})(),realWidth:function(m){return m*d.innerWidth/e.SEGW}};var b={general:{"font-family":"Georgia","font-size":"25px"},span:{},a:{"text-decoration":"none","mouseover":function(){},"mouseleave":function(){}}};function k(n,o,m){this.elem=(typeof n=="string")?f.createElement(n):n;this.elem.id=o||i.getUid();this.elem.style.visibility="hidden";this.span=m;this.styles={};this.iU_base.appendChild(this.elem);this.state="unused"}k.prototype={constructor:k,adaptWidth:function(){var o=i.realWidth(this.span);if(o==this.elem.clientWidth){return this.elem.clientHeight}var n=(this.elem.height||this.elem.clientHeight)/(this.elem.width||this.elem.clientWidth),m=o*n;this.css({width:o+"px",height:m+"px"});return this.elem.clientHeight},updataSchema:function(){this.css(b.general);for(var m in this.elem.childNodes){var o=this.elem.childNodes[m],n=b[(o.tagName||"").toLowerCase()];if(n){k.prototype.css.call(o,n)}}},css:function(p){var o=this.elem||this;if(this.styles){for(var r in this.styles){o.style[r]=this.styles[r]}}for(var r in p){var n="",q=false;for(var m=0;m<r.length;m++){if(r[m]=="-"){q=true}else{n+=q?r[m].toUpperCase():r[m];q=false}}if(typeof p[r]=="function"){o.addEventListener(n,p[r])}else{o.style[n]=p[r]}if(this.styles){this.styles[n]=p[r]}}},render:function(m){this.adaptWidth();this.css({"position":"absolute","left":(m+this.left)+"px","top":this.top+"px","visibility":"visible"})},toString:function(){return"["+this.elem.tagName.toLowerCase()+"] "+this.elem.innerHTML.substr(0,50)+"\n"}};var l={textAdapt:function(){this.css({"width":i.realWidth(this.span)+"px"});return this.elem.clientHeight},upgradeText:function(){for(var n=0,m=this.elem.childNodes.length;n<m;n++){var o=this.elem.childNodes[n];if(!o.attributes){var p=f.createElement("span");p.innerHTML=o.textContent;this.elem.replaceChild(p,o)}}}};function c(m){this.span=m.span;this.padding=m.padding;this.spacing=m.spacing;this.marginCross=m.marginCross;this.marginTop=m.marginTop;this.height=d.innerHeight-m.marginTop-m.marginBottom;this.page=0;this.frontier=0;this.reserve=0;this.usedW=0;this.comps=[];this.buffer=[];this.isVisible=true}c.prototype={constructor:c,operate:function(){var o=false;while(!o&&this.buffer.length>0){switch(this.buffer[0].state){case"wait":o=true;break;case"dispose":this.buffer.shift();break;case"unused":var m=this.buffer.shift(),n=m.adaptWidth();if(this.page==0){this.page=1}else{if(this.usedW==0||this.usedW+m.span>this.span){if(this.frontier+n>this.height){this.page+=1;this.frontier=0}else{this.frontier+=this.spacing}this.reserve=this.frontier;this.usedW=0}}m.left=i.realWidth(this.span*(this.page-1)+this.usedW+this.page*this.padding);m.top=this.reserve+this.marginTop;m.state="used";this.usedW+=m.span;this.frontier=Math.max(this.frontier,this.reserve+n);this.comps.push(m)}}},script:function(o){var n=o["span"]?o["span"].value:this.span;n=(n<0)?(n+this.span):Math.min(n,this.span);var m=new k(o,o["name"],n);l.upgradeText.call(m);m.updataSchema();m.adaptWidth=l.textAdapt;m.adaptWidth();this.buffer.push(m)},hide:function(){if(this.isVisible){for(var n=0,m=this.comps.length;n<m;n++){this.comps[n].elem.style["visibility"]="hidden"}}},getBreadth:function(){return this.page*this.span+(this.page+1)*this.marginCross},render:function(m){this.isVisible=true;for(var o=0,n=this.comps.length;o<n;o++){this.comps[o].render(m)}}};function a(m){this.flows=[]}a.prototype={constructor:a,render:function(r){var v=0,t=[];for(var q=0,u=this.flows.length;q<u;q++){var n=this.flows[q],s=r-v,m=n.getBreadth(),o=d.innerWidth;n.operate();if(s<-m||s>o){n.hide()}else{t.push([n,s])}v+=m}for(var p in t){t[p][0].render(-t[p][1])}return v}};var g={initRoot:function(o){var m=f.getElementById("igemUCAS");if(!m){return null}m.style.visibility="hidden";m.style["z-index"]="-100";if(o){var n=f.getElementsByTagName("html")[0];n.style.overflowX="hidden";n.style.overflowY="hidden";n.style.padding="0px";n.style.margin="0px"}j("fn.initRoot").assert(m,"");return m},initWebGL:function(n){var m=f.createElement("canvas");m.id="bgCanvas";m.width=d.innerWidth;m.height=d.innerHeight;
+
(function(c,a){var b=c.iU=a(c);b()})(window,function(d){var f=d.document,k=(function(){var o="",p=1,q=function(r,s){o=o.concat(p," ",r,": ",s,"\n");p++},n=function(r){var s={string:function(t){if((!t)||typeof t!="string"){q(r,"parameter should be of .")}return s},number:function(t){if((!t)||typeof t!="number"){q(r,"parameter should be of number type.")}return s},keyUnused:function(u,t){if(u[t]){q(r,"key "+t+" has been used.")}return s},assert:function(u,t){if(!u){q(r,t)}return s}};return s};n.displayErrors=function(){if(o.length==0){alert("No errors, Congrats!")}else{alert(o)}};return n})(),e={SIDE:0.1,SEGW:24,INF:2000000},j={merge:function(o,p){for(var n in p){if(o[n]){if(typeof o[n]=="object"&&typeof p[n]=="object"){o[n]=j.merge(o[n],p[n])}else{o[n]=p[n]}}else{o[n]=p[n]}}return o},getUid:(function(){var n=-1;return function(){n++;return(function(o){return"_"+o+"_"})(n)}})(),realWidth:function(n){return n*d.innerWidth/e.SEGW}};var b={general:{"font-family":"Georgia","font-size":"25px","text-align":"justify","color":"white"},span:{},a:{"text-decoration":"none","mouseover":function(){},"mouseleave":function(){}},b:{"color":"yellow"}};function l(o,p,n){this.elem=(typeof o=="string")?f.createElement(o):o;this.elem.id=p||j.getUid();this.elem.style.visibility="hidden";this.span=n;this.styles={};this.iU_base.appendChild(this.elem);this.state="wait"}l.prototype={constructor:l,adaptWidth:function(){var o=j.realWidth(this.span);if(o==this.elem.clientWidth){return this.elem.clientHeight}this.css({"display":"block","width":o+"px"});var n=this.elem.clientHeight;if(n!=0&&this.state=="wait"){this.state="unused"}return n},updataSchema:function(){this.css(b.general);this.css(b[(this.elem.tagName||"").toLowerCase()]);for(var n in this.elem.childNodes){l.prototype.css.call(this.elem.childNodes[n],b[(this.elem.childNodes[n].tagName||"").toLowerCase()])}},css:function(q){if(!q){return}var p=this.elem||this;if(this.styles){for(var s in this.styles){p.style[s]=this.styles[s]}}for(var s in q){var o="",r=false;for(var n=0;n<s.length;n++){if(s[n]=="-"){r=true}else{o+=r?s[n].toUpperCase():s[n];r=false}}if(typeof q[s]=="function"){p.addEventListener(o,q[s])}else{p.style[o]=q[s]}if(this.styles){this.styles[o]=q[s]}}},render:function(n){this.adaptWidth();this.css({"position":"absolute","left":(n+this.left)+"px","top":this.top+"px","visibility":"visible"})},toString:function(){return"["+this.elem.tagName.toLowerCase()+"] "+this.elem.innerHTML.substr(0,50)+"\n"}};var m={upgradeText:function(){for(var o=0,n=this.elem.childNodes.length;o<n;o++){var p=this.elem.childNodes[o];if(!p.attributes){var q=f.createElement("span");q.innerHTML=p.textContent;this.elem.replaceChild(q,p)}}}};function c(n){this.span=n.span;this.padding=n.padding;this.spacing=n.spacing;this.marginCross=n.marginCross;this.marginTop=n.marginTop;this.height=d.innerHeight-n.marginTop-n.marginBottom;this.page=0;this.frontier=0;this.reserve=0;this.usedW=0;this.comps=[];this.buffer=[];this.isVisible=true}c.prototype={constructor:c,operate:function(){var p=false;while(!p&&this.buffer.length>0){switch(this.buffer[0].state){case"dispose":this.buffer.shift();break;case"wait":this.buffer[0].adaptWidth();if(this.buffer[0].state=="wait"){p=true;break}case"unused":var n=this.buffer.shift(),o=n.adaptWidth();if(this.page==0){this.page=1}else{if(this.usedW==0||this.usedW+n.span>this.span){if(this.frontier+o>this.height){this.page+=1;this.frontier=0}else{this.frontier+=this.spacing}this.reserve=this.frontier;this.usedW=0}}n.left=j.realWidth(this.span*(this.page-1)+this.usedW+this.page*this.padding);n.top=this.reserve+this.marginTop;n.state="used";this.usedW+=n.span;this.frontier=Math.max(this.frontier,this.reserve+o);this.comps.push(n)}}},getSpan:function(o){var n=o?o.value:this.span;n=(n<0)?(n+this.span):Math.min(n,this.span);return n},script:function(o){var n=new l(o,o["name"],this.getSpan(o["span"]));m.upgradeText.call(n);n.updataSchema();n.adaptWidth();this.buffer.push(n)},image:function(o){var n=new l(o,o["name"],this.getSpan(o["span"]));n.updataSchema();n.adaptWidth();this.buffer.push(n)},title:function(o){var n=new l(o,o["name"],this.getSpan(o["span"]));n.updataSchema();n.adaptWidth();this.buffer.push(n)},hide:function(){if(this.isVisible){for(var o=0,n=this.comps.length;o<n;o++){this.comps[o].elem.style["visibility"]="hidden"}}},getBreadth:function(){return this.page*this.span+(this.page+1)*this.marginCross},render:function(n){this.isVisible=true;this.operate();for(var p=0,o=this.comps.length;p<o;p++){this.comps[p].render(n)}}};function a(n){this.flows=[]}a.prototype={constructor:a,render:function(s){var w=0,u=[];for(var r=0,v=this.flows.length;r<v;r++){var o=this.flows[r],t=w-s,n=o.getBreadth(),p=d.innerWidth;if(t<-n||t>p){o.hide()}else{u.push([o,t])}w+=n}for(var q in u){u[q][0].render(-u[q][1])}return w}};function i(o){this.boot=o;o.id="UACSboot";o.style["display"]="none";this.logo=o.children[0];this.sponsors=[];
n.parentNode.appendChild(m);var o=m.getContext("webgl")||m.getContext("experimental-webgl");if(o){k.prototype.css.call(m,{"position":"absolute","top":"0","left":"0","z-index":"-90","overflow":"hidden","visibility":"visible"})}return o},initBase:function(m){var n=f.createElement("div");n.id="UCASigem";n.style.position="absolute";m.parentNode.appendChild(n);return n},root_not_found:function(){},gl_not_supported:function(){},defaultConfig:{overflow:true,webgl:true}};function h(){p=i.merge(p,d.schema||{});var s=g.initRoot((d.configs||g.defaultConfig).overflow);if(!s){return g.root_not_found()}var w=g.initBase(s);k.prototype.iU_base=w;var r=(d.configs||g.defaultConfig).webgl||g.initWebGL(s);if(!r){g.gl_not_supported()}var p=i.merge(g.defaultSchema,d.schema||{});c.prototype.schema=p;var v=new a(d.innerHeight);while(s.children.length>0){var t=s.children[0];if((t.tagName||"").toLowerCase()=="div"){var u=t["spacing"]?t["spacing"].value.split(/\t/):"",m=new c({span:t["span"]?t["span"].value:8,padding:t["padding"]?t["padding"].value:1,spacing:parseInt(u[0])||40,marginTop:parseInt(u[1])||100,marginBottom:u[2]?parseInt(u[2]):(parseInt(u[1])||100)});v.flows.push(m);while(t.children.length>0){var o=t.children[0];switch(((o||{}).tagName||"").toLowerCase()){case"p":m.script(o);break;default:t.removeChild(o);break}}}s.removeChild(t)}s.parentNode.removeChild(s);var q=0;var n=function(x){x=x||d.event;q+=x.wheelDelta||x.detail;q=q<0?0:q;v.render(q)};v.render(q);d.onmousewheel=f.onmousewheel=n}h.displayErrors=j.displayErrors;return h});
+
for(var n=1;n<o.children.length;n++){this.sponsors.push(o.children[n])}this.headings=[]}i.prototype={constructor:i,render:function(r){r=Math.max(r,d.innerWidth*e.SIDE);var q=((r/d.innerWidth)-e.SIDE)/(1-e.SIDE);l.prototype.css.call(this.boot,{"display":"block","position":"absolute","width":r+"px","height":d.innerHeight+"px","background-color":"black","visibility":"visible"});if(q>0){l.prototype.css.call(this.logo,{"display":"block","position":"absolute","top":Math.floor(d.innerHeight*0.2)+"px","left":Math.floor(d.innerWidth*0.3)+"px","width":Math.floor(d.innerWidth*0.4)+"px","opacity":q})}else{l.prototype.css.call(this.logo,{"display":"none"})}var n=0;for(var o=0;o<this.headings.length;o++){l.prototype.css.call(this.headings[o],{"position":"inherit","width":Math.floor(d.innerWidth*e.SIDE)+"px","visibility":"visible"});var p=this.headings[o].clientHeight;l.prototype.css.call(this.sponsors[o],{"position":"absolute","top":n+"px","left":"0","visibility":"visible","opacity":1-q});n+=p}n=0;for(var o=0;o<this.sponsors.length;o++){l.prototype.css.call(this.sponsors[o].children[0],{"position":"inherit","width":Math.floor(d.innerWidth*e.SIDE)+"px","visibility":"visible"});n+=this.sponsors[o].children[0].clientHeight;l.prototype.css.call(this.sponsors[o],{"position":"absolute","top":(d.innerHeight-n)+"px","left":"0","visibility":"visible","opacity":1-q})}}};var g={initRoot:function(p){var n=f.getElementById("igemUCAS");if(!n){return null}n.style.visibility="hidden";n.style["z-index"]="-100";if(p){var o=f.getElementsByTagName("body")[0];l.prototype.css.call(o,{"overflow-x":"hidden","overflow-y":"hidden","padding":"0","margin":"0","background-color":"black"})}k("fn.initRoot").assert(n,"");return n},initWebGL:function(o){var n=f.createElement("canvas");n.id="bgCanvas";n.width=d.innerWidth;n.height=d.innerHeight;o.parentNode.appendChild(n);var p=n.getContext("webgl")||n.getContext("experimental-webgl");if(p){l.prototype.css.call(n,{"position":"absolute","top":"0","left":"0","z-index":"-90","overflow":"hidden","visibility":"visible"})}return p},initBase:function(n){var o=f.createElement("div");o.id="UCASigem";o.style.position="absolute";n.parentNode.appendChild(o);return o},root_not_found:function(){},gl_not_supported:function(){},defaultConfig:{overflow:true,webgl:true}};function h(){r=j.merge(r,d.schema||{});var u=g.initRoot((d.configs||g.defaultConfig).overflow);if(!u){return g.root_not_found()}var y=g.initBase(u);l.prototype.iU_base=y;var n=new i(u.children[0]);u.parentNode.appendChild(n.boot);var t=(d.configs||g.defaultConfig).webgl||g.initWebGL(u);if(!t){g.gl_not_supported()}var r=j.merge(g.defaultSchema,d.schema||{});c.prototype.schema=r;var x=new a(d.innerHeight);while(u.children.length>0){var v=u.children[0];if((v.tagName||"").toLowerCase()=="div"){var w=v["spacing"]?v["spacing"].value.split(/\t/):"",o=new c({span:v["span"]?v["span"].value:8,padding:v["padding"]?v["padding"].value:1,spacing:parseInt(w[0])||40,marginTop:parseInt(w[1])||100,marginBottom:w[2]?parseInt(w[2]):(parseInt(w[1])||100)});x.flows.push(o);while(v.children.length>0){var q=v.children[0];switch(((q||{}).tagName||"").toLowerCase()){case"p":o.script(q);break;case"b":o.title(q);break;case"img":o.image(q);break;default:v.removeChild(q);break}}}u.removeChild(v)}u.parentNode.removeChild(u);var s=d.innerWidth;var p=function(z){z=z||d.event;s-=z.wheelDelta||z.detail;s=Math.min(s,d.innerWidth);n.render(s);x.render(s)};d.onmousewheel=f.onmousewheel=p;p({detail:0})}h.displayErrors=k.displayErrors;return h});

Revision as of 12:35, 9 October 2018

/*!

* igemUCAS JavaScript Library v0.18.16
* Copyright UCAS iGEM team
*/

(function(c,a){var b=c.iU=a(c);b()})(window,function(d){var f=d.document,k=(function(){var o="",p=1,q=function(r,s){o=o.concat(p," ",r,": ",s,"\n");p++},n=function(r){var s={string:function(t){if((!t)||typeof t!="string"){q(r,"parameter should be of .")}return s},number:function(t){if((!t)||typeof t!="number"){q(r,"parameter should be of number type.")}return s},keyUnused:function(u,t){if(u[t]){q(r,"key "+t+" has been used.")}return s},assert:function(u,t){if(!u){q(r,t)}return s}};return s};n.displayErrors=function(){if(o.length==0){alert("No errors, Congrats!")}else{alert(o)}};return n})(),e={SIDE:0.1,SEGW:24,INF:2000000},j={merge:function(o,p){for(var n in p){if(o[n]){if(typeof o[n]=="object"&&typeof p[n]=="object"){o[n]=j.merge(o[n],p[n])}else{o[n]=p[n]}}else{o[n]=p[n]}}return o},getUid:(function(){var n=-1;return function(){n++;return(function(o){return"_"+o+"_"})(n)}})(),realWidth:function(n){return n*d.innerWidth/e.SEGW}};var b={general:{"font-family":"Georgia","font-size":"25px","text-align":"justify","color":"white"},span:{},a:{"text-decoration":"none","mouseover":function(){},"mouseleave":function(){}},b:{"color":"yellow"}};function l(o,p,n){this.elem=(typeof o=="string")?f.createElement(o):o;this.elem.id=p||j.getUid();this.elem.style.visibility="hidden";this.span=n;this.styles={};this.iU_base.appendChild(this.elem);this.state="wait"}l.prototype={constructor:l,adaptWidth:function(){var o=j.realWidth(this.span);if(o==this.elem.clientWidth){return this.elem.clientHeight}this.css({"display":"block","width":o+"px"});var n=this.elem.clientHeight;if(n!=0&&this.state=="wait"){this.state="unused"}return n},updataSchema:function(){this.css(b.general);this.css(b[(this.elem.tagName||"").toLowerCase()]);for(var n in this.elem.childNodes){l.prototype.css.call(this.elem.childNodes[n],b[(this.elem.childNodes[n].tagName||"").toLowerCase()])}},css:function(q){if(!q){return}var p=this.elem||this;if(this.styles){for(var s in this.styles){p.style[s]=this.styles[s]}}for(var s in q){var o="",r=false;for(var n=0;n<s.length;n++){if(s[n]=="-"){r=true}else{o+=r?s[n].toUpperCase():s[n];r=false}}if(typeof q[s]=="function"){p.addEventListener(o,q[s])}else{p.style[o]=q[s]}if(this.styles){this.styles[o]=q[s]}}},render:function(n){this.adaptWidth();this.css({"position":"absolute","left":(n+this.left)+"px","top":this.top+"px","visibility":"visible"})},toString:function(){return"["+this.elem.tagName.toLowerCase()+"] "+this.elem.innerHTML.substr(0,50)+"\n"}};var m={upgradeText:function(){for(var o=0,n=this.elem.childNodes.length;o<n;o++){var p=this.elem.childNodes[o];if(!p.attributes){var q=f.createElement("span");q.innerHTML=p.textContent;this.elem.replaceChild(q,p)}}}};function c(n){this.span=n.span;this.padding=n.padding;this.spacing=n.spacing;this.marginCross=n.marginCross;this.marginTop=n.marginTop;this.height=d.innerHeight-n.marginTop-n.marginBottom;this.page=0;this.frontier=0;this.reserve=0;this.usedW=0;this.comps=[];this.buffer=[];this.isVisible=true}c.prototype={constructor:c,operate:function(){var p=false;while(!p&&this.buffer.length>0){switch(this.buffer[0].state){case"dispose":this.buffer.shift();break;case"wait":this.buffer[0].adaptWidth();if(this.buffer[0].state=="wait"){p=true;break}case"unused":var n=this.buffer.shift(),o=n.adaptWidth();if(this.page==0){this.page=1}else{if(this.usedW==0||this.usedW+n.span>this.span){if(this.frontier+o>this.height){this.page+=1;this.frontier=0}else{this.frontier+=this.spacing}this.reserve=this.frontier;this.usedW=0}}n.left=j.realWidth(this.span*(this.page-1)+this.usedW+this.page*this.padding);n.top=this.reserve+this.marginTop;n.state="used";this.usedW+=n.span;this.frontier=Math.max(this.frontier,this.reserve+o);this.comps.push(n)}}},getSpan:function(o){var n=o?o.value:this.span;n=(n<0)?(n+this.span):Math.min(n,this.span);return n},script:function(o){var n=new l(o,o["name"],this.getSpan(o["span"]));m.upgradeText.call(n);n.updataSchema();n.adaptWidth();this.buffer.push(n)},image:function(o){var n=new l(o,o["name"],this.getSpan(o["span"]));n.updataSchema();n.adaptWidth();this.buffer.push(n)},title:function(o){var n=new l(o,o["name"],this.getSpan(o["span"]));n.updataSchema();n.adaptWidth();this.buffer.push(n)},hide:function(){if(this.isVisible){for(var o=0,n=this.comps.length;o<n;o++){this.comps[o].elem.style["visibility"]="hidden"}}},getBreadth:function(){return this.page*this.span+(this.page+1)*this.marginCross},render:function(n){this.isVisible=true;this.operate();for(var p=0,o=this.comps.length;p<o;p++){this.comps[p].render(n)}}};function a(n){this.flows=[]}a.prototype={constructor:a,render:function(s){var w=0,u=[];for(var r=0,v=this.flows.length;r<v;r++){var o=this.flows[r],t=w-s,n=o.getBreadth(),p=d.innerWidth;if(t<-n||t>p){o.hide()}else{u.push([o,t])}w+=n}for(var q in u){u[q][0].render(-u[q][1])}return w}};function i(o){this.boot=o;o.id="UACSboot";o.style["display"]="none";this.logo=o.children[0];this.sponsors=[]; for(var n=1;n<o.children.length;n++){this.sponsors.push(o.children[n])}this.headings=[]}i.prototype={constructor:i,render:function(r){r=Math.max(r,d.innerWidth*e.SIDE);var q=((r/d.innerWidth)-e.SIDE)/(1-e.SIDE);l.prototype.css.call(this.boot,{"display":"block","position":"absolute","width":r+"px","height":d.innerHeight+"px","background-color":"black","visibility":"visible"});if(q>0){l.prototype.css.call(this.logo,{"display":"block","position":"absolute","top":Math.floor(d.innerHeight*0.2)+"px","left":Math.floor(d.innerWidth*0.3)+"px","width":Math.floor(d.innerWidth*0.4)+"px","opacity":q})}else{l.prototype.css.call(this.logo,{"display":"none"})}var n=0;for(var o=0;o<this.headings.length;o++){l.prototype.css.call(this.headings[o],{"position":"inherit","width":Math.floor(d.innerWidth*e.SIDE)+"px","visibility":"visible"});var p=this.headings[o].clientHeight;l.prototype.css.call(this.sponsors[o],{"position":"absolute","top":n+"px","left":"0","visibility":"visible","opacity":1-q});n+=p}n=0;for(var o=0;o<this.sponsors.length;o++){l.prototype.css.call(this.sponsors[o].children[0],{"position":"inherit","width":Math.floor(d.innerWidth*e.SIDE)+"px","visibility":"visible"});n+=this.sponsors[o].children[0].clientHeight;l.prototype.css.call(this.sponsors[o],{"position":"absolute","top":(d.innerHeight-n)+"px","left":"0","visibility":"visible","opacity":1-q})}}};var g={initRoot:function(p){var n=f.getElementById("igemUCAS");if(!n){return null}n.style.visibility="hidden";n.style["z-index"]="-100";if(p){var o=f.getElementsByTagName("body")[0];l.prototype.css.call(o,{"overflow-x":"hidden","overflow-y":"hidden","padding":"0","margin":"0","background-color":"black"})}k("fn.initRoot").assert(n,"");return n},initWebGL:function(o){var n=f.createElement("canvas");n.id="bgCanvas";n.width=d.innerWidth;n.height=d.innerHeight;o.parentNode.appendChild(n);var p=n.getContext("webgl")||n.getContext("experimental-webgl");if(p){l.prototype.css.call(n,{"position":"absolute","top":"0","left":"0","z-index":"-90","overflow":"hidden","visibility":"visible"})}return p},initBase:function(n){var o=f.createElement("div");o.id="UCASigem";o.style.position="absolute";n.parentNode.appendChild(o);return o},root_not_found:function(){},gl_not_supported:function(){},defaultConfig:{overflow:true,webgl:true}};function h(){r=j.merge(r,d.schema||{});var u=g.initRoot((d.configs||g.defaultConfig).overflow);if(!u){return g.root_not_found()}var y=g.initBase(u);l.prototype.iU_base=y;var n=new i(u.children[0]);u.parentNode.appendChild(n.boot);var t=(d.configs||g.defaultConfig).webgl||g.initWebGL(u);if(!t){g.gl_not_supported()}var r=j.merge(g.defaultSchema,d.schema||{});c.prototype.schema=r;var x=new a(d.innerHeight);while(u.children.length>0){var v=u.children[0];if((v.tagName||"").toLowerCase()=="div"){var w=v["spacing"]?v["spacing"].value.split(/\t/):"",o=new c({span:v["span"]?v["span"].value:8,padding:v["padding"]?v["padding"].value:1,spacing:parseInt(w[0])||40,marginTop:parseInt(w[1])||100,marginBottom:w[2]?parseInt(w[2]):(parseInt(w[1])||100)});x.flows.push(o);while(v.children.length>0){var q=v.children[0];switch(((q||{}).tagName||"").toLowerCase()){case"p":o.script(q);break;case"b":o.title(q);break;case"img":o.image(q);break;default:v.removeChild(q);break}}}u.removeChild(v)}u.parentNode.removeChild(u);var s=d.innerWidth;var p=function(z){z=z||d.event;s-=z.wheelDelta||z.detail;s=Math.min(s,d.innerWidth);n.render(s);x.render(s)};d.onmousewheel=f.onmousewheel=p;p({detail:0})}h.displayErrors=k.displayErrors;return h});