rls-min.js revision 7380653a55868892cb97060c61641fc73ba22cbe
YUI.add("rls",function(a){a.rls_locals=function(c,i,b){if(c.config.modules){var g=[],j=a.Array.hash(i),d="fullpath",h,e=c.config.modules;for(h in e){if(e[h][d]){if(j[h]){g.push(e[h][d]);if(e[h].requires){a.Array.each(e[h].requires,function(k){if(!YUI.Env.mods[k]){if(e[k]){if(e[k][d]){g.push(e[k][d]);i.push(k);}}}});}}}}if(g.length){a.Get.script(g,{onEnd:function(f){b(c,i);},data:i});}else{b(c,i);}}else{b(c,i);}};a.rls_needs=function(e,b){var c=b||this,d=c.config;if(!YUI.Env.mods[e]&&!(d.modules&&d.modules[e])){return true;}return false;};a._rls=function(t){t.push("intl");var v=a.config,f=v.modules,h=a.Array,c=a.Object,g=v.rls||{m:1,v:a.version,gv:v.gallery,env:1,lang:v.lang,"2in3v":v["2in3"],"2v":v.yui2,filt:v.filter,filts:v.filters,tests:1},l=v.rls_base||"http://l.yimg.com/py/load?httpcache=rls-seed&gzip=1&",n=v.rls_tmpl||function(){var d=[],i;for(i in g){if(i in g&&g[i]){d.push(i+"={"+i+"}");}}return d.join("&");}(),q=[],j={},p,u,x,k=[],b=[],r,s=t.length,e;for(r=0;r<s;r++){j[t[r]]=1;if(a.rls_needs(t[r])){q.push(t[r]);}else{}}if(f){for(r in f){if(j[r]&&f[r].requires){s=f[r].requires.length;for(p=0;p<s;p++){x=f[r].requires[p];if(a.rls_needs(x)){q.push(x);}else{u=YUI.Env.mods[x]||f[x];if(u){u=u.details||u;if(u.requires){h.each(u.requires,function(d){if(a.rls_needs(d)){q.push(d);}});}}}}}}}c.each(YUI.Env.mods,function(d){if(j[d.name]){if(d.details&&d.details.requires){h.each(d.details.requires,function(i){if(a.rls_needs(i)){q.push(i);}});}}});q=h.dedupe(q);h.each(q,function(d){if(d.indexOf("gallery-")===0||d.indexOf("yui2-")===0){b.push(d);if(!a.Loader){k.push("loader-base");t.push("loader-base");}}else{k.push(d);}});q=k;if(g.filt==="debug"){q.unshift("dump","yui-log");}q=h.dedupe(q);b=h.dedupe(b);t=h.dedupe(t);if(!q.length){return false;}g.m=q.sort();g.env=[].concat(c.keys(YUI.Env.mods),h.dedupe(YUI._rls_skins)).sort();g.tests=a.Features.all("load",[a]);e=a.Lang.sub(l+n,g);v.rls=g;v.rls_tmpl=n;YUI._rls_active={asked:t,attach:q,gallery:b,inst:a,url:e};return e;};a.rls_oncomplete=function(b){YUI._rls_active.cb=b;};a.rls_done=function(b){YUI._rls_active.cb(b);};if(!YUI._rls_active){YUI._rls_active={};}if(!YUI._rls_skins){YUI._rls_skins=[];}if(!YUI.$rls){YUI.$rls=function(d){var f=YUI._rls_active,e=f.inst;if(e){if(d.css){e.Get.css(f.url+"&css=1");}if(f.gallery.length){d.modules=d.modules||[];d.modules=[].concat(d.modules,f.gallery);}if(d.modules&&!d.css){if(d.modules.length){var c=e.Array.some(d.modules,function(g){return(g.indexOf("lang")===0);});if(c){d.modules.unshift("intl");}}e.Env.bootstrapped=true;e.Array.each(d.modules,function(g){if(g.indexOf("skin-")>-1){YUI._rls_skins.push(g);}});e._attach([].concat(d.modules,f.attach));if(f.gallery.length&&e.Loader){var b=new e.Loader(f.inst.config);b.onEnd=e.rls_done;b.context=e;b.data=f.gallery;b.ignoreRegistered=false;b.require(f.gallery);b.insert(null,(e.config.fetchCSS)?null:"js");}else{e.rls_done({data:f.asked});}}}};}},"@VERSION@",{requires:["get","features"]});