loader-min.js revision 87b084086b5937585acc7e091b2f1951e94d9145
YUI.add("loader",function(A){(function(){var Q="base",P="css",M="js",E="cssreset",R="cssfonts",O="cssgrids",C="cssbase",D=[E,R,O,"cssreset-context","cssfonts-context","cssgrids-context"],J=["reset","fonts","grids","base"],V="@VERSION@",B=V+"/build/",T="-context",W={version:V,root:B,base:"http://yui.yahooapis.com/"+B,comboBase:"http://yui.yahooapis.com/combo?",skin:{defaultSkin:"sam",base:"assets/skins/",path:"skin.css",after:["reset","fonts","grids","base"]},modules:{dom:{requires:["event"],submodules:{"dom-base":{requires:["event"]},"dom-style":{requires:["dom-base"]},"dom-screen":{requires:["dom-base","dom-style"]},selector:{requires:["dom-base"]}}},node:{requires:["dom"],submodules:{"node-base":{requires:["dom-base","selector"]},"node-style":{requires:["dom-style","node-base"]},"node-screen":{requires:["dom-screen","node-base"]}},plugins:{"node-event-simulate":{requires:["node-base","event-simulate"]}}},anim:{requires:[Q,"node"],submodules:{"anim-base":{requires:["base","node-style"]},"anim-color":{requires:["anim-base"]},"anim-curve":{requires:["anim-xy"]},"anim-easing":{},"anim-scroll":{requires:["anim-base"]},"anim-xy":{requires:["anim-base","node-screen"]},"anim-node-plugin":{requires:["node","anim-base"]}}},attribute:{requires:["event-custom"]},base:{requires:["attribute"]},compat:{requires:["node","dump","substitute"]},classnamemanager:{},collection:{},console:{requires:["widget","substitute"],skinnable:true},cookie:{},dd:{submodules:{"dd-ddm-base":{requires:["node",Q]},"dd-ddm":{requires:["dd-ddm-base"]},"dd-ddm-drop":{requires:["dd-ddm"]},"dd-drag":{requires:["dd-ddm-base"]},"dd-drop":{requires:["dd-ddm-drop"]},"dd-proxy":{requires:["dd-drag"]},"dd-constrain":{requires:["dd-drag","dd-proxy"]},"dd-plugin":{requires:["dd-drag"],optional:["dd-constrain","dd-proxy"]},"dd-drop-plugin":{requires:["dd-drop"]}}},dump:{},event:{requires:["event-custom"]},"event-custom":{requires:["oop"]},"event-simulate":{requires:["event"]},get:{requires:["yui-base"]},history:{requires:["node"]},io:{submodules:{"io-base":{requires:["node"]},"io-xdr":{requires:["io-base"]},"io-form":{requires:["io-base"]},"io-upload-iframe":{requires:["io-base"]},"io-queue":{requires:["io-base"]}}},json:{submodules:{"json-parse":{},"json-stringify":{}}},loader:{requires:["get"]},"node-menunav":{requires:["node","classnamemanager"],skinnable:true},oop:{requires:["yui-base"]},overlay:{requires:["widget","widget-position","widget-position-ext","widget-stack","widget-stdmod"],skinnable:true},plugin:{requires:["base"]},profiler:{},queue:{requires:["node"]},slider:{requires:["widget","dd-constrain"],skinnable:true},stylesheet:{},substitute:{optional:["dump"]},widget:{requires:["base","node","classnamemanager"],plugins:{"widget-position":{},"widget-position-ext":{requires:["widget-position"]},"widget-stack":{skinnable:true},"widget-stdmod":{}},skinnable:true},yui:{supersedes:["yui-base","get","loader"]},"yui-base":{},test:{requires:["collection","substitute","node","json"]}}},G=function(L,Y,Z){return L+"/"+Y+"-min."+(Z||P);},F=W.modules,U,N,H,S,K=A.Lang,I="_provides",X="_supersedes";for(U=0;U<J.length;U=U+1){N=J[U];H=P+N;F[H]={type:P,path:G(H,N)};S=H+T;N=N+T;F[S]={type:P,path:G(H,N)};if(H==O){F[H].requires=[R];F[H].optional=[E];F[S].requires=[R+T];F[S].optional=[E+T];}else{if(H==C){F[H].after=D;F[S].after=D;}}}A.Env.meta=W;A.Loader=function(Z){this._internalCallback=null;this._useYahooListener=false;this.onSuccess=null;this.onFailure=null;this.onProgress=null;this.onTimeout=null;this.context=A;this.data=null;this.insertBefore=null;this.charset=null;this.base=A.Env.meta.base;this.comboBase=A.Env.meta.comboBase;this.combine=(!(Q in Z));this.ignoreRegistered=false;this.root=A.Env.meta.root;this.timeout=0;this.ignore=null;this.force=null;this.allowRollup=true;this.filter=null;this.required={};this.moduleInfo={};this.skin=A.merge(A.Env.meta.skin);var Y=A.Env.meta.modules,L;for(L in Y){if(Y.hasOwnProperty(L)){this._internal=true;this.addModule(Y[L],L);this._internal=false;}}this.rollups=null;this.loadOptional=false;this.sorted=[];this.loaded={};this.attaching=null;this.dirty=true;this.inserted={};this.skipped={};this._config(Z);};A.Loader.prototype={FILTERS:{RAW:{"searchExp":"-min\\.js","replaceStr":".js"},DEBUG:{"searchExp":"-min\\.js","replaceStr":"-debug.js"}},SKIN_PREFIX:"skin-",_config:function(b){var Y,L,a,Z;if(b){for(Y in b){if(b.hasOwnProperty(Y)){a=b[Y];if(Y=="require"){this.require(a);}else{if(Y=="modules"){for(L in a){if(a.hasOwnProperty(L)){this.addModule(a[L],L);}}}else{this[Y]=a;}}}}}Z=this.filter;if(K.isString(Z)){Z=Z.toUpperCase();this.filterName=Z;this.filter=this.FILTERS[Z];}},formatSkin:function(Z,L){var Y=this.SKIN_PREFIX+Z;if(L){Y=Y+"-"+L;}return Y;},parseSkin:function(Y){if(Y.indexOf(this.SKIN_PREFIX)===0){var L=Y.split("-");return{skin:L[1],module:L[2]};}return null;},_addSkin:function(f,d,e){var L=this.formatSkin(f),a=this.moduleInfo,Y=this.skin,Z=a[d]&&a[d].ext,c,b;if(d){L=this.formatSkin(f,d);if(!a[L]){c=a[d];b=c.pkg||d;this.addModule({"name":L,"type":"css","after":Y.after,"path":(e||b)+"/"+Y.base+f+"/"+d+".css","ext":Z});}}return L;},addModule:function(Z,Y){Y=Y||Z.name;Z.name=Y;if(!Z||!Z.name){return false;}if(!Z.type){Z.type=M;}if(!Z.path&&!Z.fullpath){Z.path=G(Y,Y,Z.type);}Z.ext=("ext" in Z)?Z.ext:(this._internal)?false:true;Z.requires=Z.requires||[];this.moduleInfo[Y]=Z;var c=Z.submodules,d,a,e,g,f,b,L;if(c){e=[];a=0;for(d in c){if(c.hasOwnProperty(d)){g=c[d];g.path=G(Y,d,Z.type);this.addModule(g,d);e.push(d);if(Z.skinnable){f=this._addSkin(this.skin.defaultSkin,d,Y);e.push(f.name);}a++;}}Z.supersedes=e;Z.rollup=Math.min(a-1,4);}b=Z.plugins;if(b){for(d in b){if(b.hasOwnProperty(d)){L=b[d];L.path=G(Y,d,Z.type);L.requires=L.requires||[];L.requires.push(Y);this.addModule(L,d);if(Z.skinnable){this._addSkin(this.skin.defaultSkin,d,Y);}}}}this.dirty=true;return Z;},require:function(Y){var L=(typeof Y==="string")?arguments:Y;this.dirty=true;A.mix(this.required,A.Array.hash(L));},getRequires:function(f){if(!f){return[];
}if(!this.dirty&&f.expanded){return f.expanded;}var c,e=[],L=f.requires,Y=f.optional,Z=this.moduleInfo,a,b,g;for(c=0;c<L.length;c=c+1){e.push(L[c]);a=this.getModule(L[c]);g=this.getRequires(a);for(b=0;b<g.length;b=b+1){e.push(g[b]);}}L=f.supersedes;if(L){for(c=0;c<L.length;c=c+1){e.push(L[c]);a=this.getModule(L[c]);g=this.getRequires(a);for(b=0;b<g.length;b=b+1){e.push(g[b]);}}}if(Y&&this.loadOptional){for(c=0;c<Y.length;c=c+1){e.push(Y[c]);g=this.getRequires(Z[Y[c]]);for(b=0;b<g.length;b=b+1){e.push(g[b]);}}}f.expanded=A.Object.keys(A.Array.hash(e));return f.expanded;},getProvides:function(Z,e){var Y=!(e),L=(Y)?I:X,b=this.getModule(Z),a={},h,c,f,d,g=function(i){if(!c[i]){c[i]=true;A.mix(a,f.getProvides(i));}};if(!b){return a;}if(b[L]){return b[L];}h=b.supersedes;c={};f=this;if(h){for(d=0;d<h.length;d=d+1){g(h[d]);}}b[X]=a;b[I]=A.merge(a);b[I][Z]=true;return b[L];},calculate:function(L){if(L||this.dirty){this._config(L);this._setup();this._explode();if(this.allowRollup){this._rollup();}this._reduce();this._sort();this.dirty=false;}},_setup:function(){var d=this.moduleInfo,b,c,a,Y,e,Z,L;for(b in d){if(d.hasOwnProperty(b)){Y=d[b];if(Y&&Y.skinnable){e=this.skin.overrides;if(e&&e[b]){for(c=0;c<e[b].length;c=c+1){L=this._addSkin(e[b][c],b);}}else{L=this._addSkin(this.skin.defaultSkin,b);}Y.requires.push(L);}}}Z=A.merge(this.inserted);if(!this.ignoreRegistered){A.mix(Z,YUI.Env.mods);}if(this.ignore){A.mix(Z,A.Array.hash(this.ignore));}for(a in Z){if(Z.hasOwnProperty(a)){A.mix(Z,this.getProvides(a));}}if(this.force){for(c=0;c<this.force.length;c=c+1){if(this.force[c] in Z){delete Z[this.force[c]];}}}this.loaded=Z;},_explode:function(){var a=this.required,Y,L,Z;for(Y in a){if(a.hasOwnProperty(Y)){L=this.getModule(Y);Z=this.getRequires(L);if(Z){A.mix(a,A.Array.hash(Z));}}}},getModule:function(Y){var L=this.moduleInfo[Y];return L;},_rollup:function(){var e,d,b,h,g={},L=this.required,Z,a=this.moduleInfo,Y,f;if(this.dirty||!this.rollups){for(e in a){if(a.hasOwnProperty(e)){b=this.getModule(e);if(b&&b.rollup){g[e]=b;}}}this.rollups=g;}for(;;){Y=false;for(e in g){if(g.hasOwnProperty(e)){if(!L[e]&&!this.loaded[e]){b=this.getModule(e);h=b.supersedes||[];Z=false;if(!b.rollup){continue;}f=0;for(d=0;d<h.length;d=d+1){if(this.loaded[h[d]]){Z=false;break;}else{if(L[h[d]]){f++;Z=(f>=b.rollup);if(Z){break;}}}}if(Z){L[e]=true;Y=true;this.getRequires(b);}}}}if(!Y){break;}}},_reduce:function(){var Z,Y,a,L,b=this.required;for(Z in b){if(b.hasOwnProperty(Z)){if(Z in this.loaded){delete b[Z];}else{L=this.getModule(Z);a=L&&L.supersedes;if(a){for(Y=0;Y<a.length;Y=Y+1){if(a[Y] in b){delete b[a[Y]];}}}}}}},_attach:function(){if(this.attaching){A._attach(this.attaching);}else{A._attach(this.sorted);}this._pushEvents();},_onSuccess:function(){this._attach();var L=this.skipped,Y,Z;for(Y in L){if(L.hasOwnProperty(Y)){delete this.inserted[Y];}}this.skipped={};Z=this.onSuccess;if(Z){Z.call(this.context,{msg:"success",data:this.data,success:true});}},_onFailure:function(Y){this._attach();var L=this.onFailure;if(L){L.call(this.context,{msg:"failure: "+Y,data:this.data,success:false});}},_onTimeout:function(){this._attach();var L=this.onTimeout;if(L){L.call(this.context,{msg:"timeout",data:this.data,success:false});}},_sort:function(){var m=A.Object.keys(this.required),Y=this.moduleInfo,e=this.loaded,L,Z,h,g,d,c,f,i=function(l,p){var o=Y[l],k,b,n,a,j;if(e[p]||!o){return false;}b=o.expanded;n=o.after;a=Y[p];if(b&&A.Array.indexOf(b,p)>-1){return true;}if(n&&A.Array.indexOf(n,p)>-1){return true;}j=Y[p]&&Y[p].supersedes;if(j){for(k=0;k<j.length;k=k+1){if(i(l,j[k])){return true;}}}if(o.ext&&o.type==P&&!a.ext&&a.type==P){return true;}return false;};L=0;for(;;){Z=m.length;f=false;for(d=L;d<Z;d=d+1){h=m[d];for(c=d+1;c<Z;c=c+1){if(i(h,m[c])){g=m.splice(c,1);m.splice(d,0,g[0]);f=true;break;}}if(f){break;}else{L=L+1;}}if(!f){break;}}this.sorted=m;},insert:function(Z,Y){this.calculate(Z);if(!Y){var L=this;this._internalCallback=function(){L._internalCallback=null;L.insert(null,M);};this.insert(null,P);return;}this._loading=true;this._combineComplete={};this.loadType=Y;this.loadNext();},loadNext:function(c){if(!this._loading){return;}var j,b,a,Z,L,h=this,d=this.loadType,e,Y,f=function(m){this._combineComplete[d]=true;var n=this._combining,k=n.length,l;for(l=0;l<k;l=l+1){this.inserted[n[l]]=true;}this.loadNext(m.data);},g=function(i){h.loadNext(i.data);};if(this.combine&&(!this._combineComplete[d])){this._combining=[];j=this.sorted;b=j.length;L=this.comboBase;for(a=0;a<b;a=a+1){Z=this.getModule(j[a]);if(Z&&Z.type===this.loadType&&!Z.ext){L+=this.root+Z.path;if(a<b-1){L+="&";}this._combining.push(j[a]);}}if(this._combining.length){e=(d===P)?A.Get.css:A.Get.script;e(this._filter(L),{data:this._loading,onSuccess:f,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,timeout:this.timeout,context:h});return;}else{this._combineComplete[d]=true;}}if(c){if(c!==this._loading){return;}this.inserted[c]=true;if(this.onProgress){this.onProgress.call(this.context,{name:c,data:this.data});}}j=this.sorted;b=j.length;for(a=0;a<b;a=a+1){if(j[a] in this.inserted){continue;}if(j[a]===this._loading){return;}Z=this.getModule(j[a]);if(!Z){Y="Undefined module "+j[a]+" skipped";this.inserted[j[a]]=true;this.skipped[j[a]]=true;continue;}if(!d||d===Z.type){this._loading=j[a];e=(Z.type===P)?A.Get.css:A.Get.script;L=(Z.fullpath)?this._filter(Z.fullpath):this._url(Z.path,j[a]);e(L,{data:j[a],onSuccess:g,insertBefore:this.insertBefore,charset:this.charset,onFailure:this._onFailure,onTimeout:this._onTimeout,timeout:this.timeout,context:h});return;}}this._loading=null;e=this._internalCallback;if(e){this._internalCallback=null;e.call(this);}else{this._onSuccess();}},_pushEvents:function(){if(A.Event){A.Event._load();}},_filter:function(Z){var a=this.filter,Y,L,b;if(Z&&a){Y=true;if(this.filterName=="DEBUG"){L=this.logExclude;b=this.logInclude;if(b&&!(name in b)){Y=false;}else{if(L&&(name in L)){Y=false;}}}if(Y){Z=Z.replace(new RegExp(a.searchExp,"g"),a.replaceStr);
}}return Z;},_url:function(Y,L){return this._filter((this.base||"")+Y);}};})();},"@VERSION@");