loader-min.js revision 1e8ab6896be404f4986bc2f085d42250352ec278
1984N/AYUI.add("loader",function(A){(function(){YUI.Env._loaderQueue=YUI.Env._loaderQueue||new A.Queue();var w={},t=YUI.Env,AC,n="base",X="css",AB="js",K="cssreset",U="cssfonts",AD="cssgrids",C="cssbase",I=[K,U,AD,"cssreset-context","cssfonts-context","cssgrids-context"],a=["reset","fonts","grids",n],b=A.version,u=b+"/build/",e="-context",k="anim-base",y="attribute",S=y+"-base",B="base-base",x="dd-drag",h="dom",E="dataschema-base",q="datasource-local",l="dom-base",N="dom-style",M="dom-screen",G="dump",Z="get",Y="event-base",o="event-custom",W="event-custom-base",r="io-base",AA="node",V="node-base",J="node-style",O="node-screen",T="oop",j="pluginhost",F="selector-css2",m="substitute",R="widget",H="widget-position",s="yui-base",g="plugin",f={version:b,root:u,base:"http://yui.yahooapis.com/"+u,comboBase:"http://yui.yahooapis.com/combo?",skin:{defaultSkin:"sam",base:"assets/skins/",path:"skin.css",after:I},modules:{dom:{requires:[T],submodules:{"dom-base":{requires:[T]},"dom-style":{requires:[l]},"dom-screen":{requires:[l,N]},"selector-native":{requires:[l]},"selector-css2":{requires:["selector-native"]},"selector":{requires:[l]}},plugins:{"selector-css3":{requires:[F]}}},node:{requires:[h,Y],submodules:{"node-base":{requires:[l,F,Y]},"node-style":{requires:[N,V]},"node-screen":{requires:[M,V]},"node-pluginhost":{requires:[V,j]},"node-event-delegate":{requires:[V,"event-delegate"]}},plugins:{"node-event-simulate":{requires:[V,"event-simulate"]}}},anim:{submodules:{"anim-base":{requires:[B,J]},"anim-color":{requires:[k]},"anim-easing":{requires:[k]},"anim-scroll":{requires:[k]},"anim-xy":{requires:[k,O]},"anim-curve":{requires:["anim-xy"]},"anim-node-plugin":{requires:["node-pluginhost",k]}}},attribute:{submodules:{"attribute-base":{requires:[o]},"attribute-complex":{requires:[S]}}},base:{submodules:{"base-base":{requires:[S]},"base-build":{requires:[B]},"base-pluginhost":{requires:[B,j]}}},cache:{requires:[g]},compat:{requires:[AA,G,m]},classnamemanager:{requires:[s]},collection:{requires:[T]},console:{requires:["yui-log",R,m],skinnable:true,plugins:{"console-filters":{requires:[g],skinnable:true}}},cookie:{requires:[s]},dataschema:{submodules:{"dataschema-base":{requires:[n]},"dataschema-array":{requires:[E]},"dataschema-json":{requires:[E,"json"]},"dataschema-text":{requires:[E]},"dataschema-xml":{requires:[E]}}},datasource:{submodules:{"datasource-local":{requires:[n]},"datasource-arrayschema":{requires:[q,g,"dataschema-array"]},"datasource-cache":{requires:[q,"cache"]},"datasource-function":{requires:[q]},"datasource-jsonschema":{requires:[q,g,"dataschema-json"]},"datasource-polling":{requires:[q]},"datasource-get":{requires:[q,Z]},"datasource-textschema":{requires:[q,g,"dataschema-text"]},"datasource-io":{requires:[q,r]},"datasource-xmlschema":{requires:[q,g,"dataschema-xml"]}}},datatype:{submodules:{"datatype-date":{requires:[s]},"datatype-number":{requires:[s]},"datatype-xml":{requires:[s]}}},dd:{submodules:{"dd-ddm-base":{requires:[AA,n]},"dd-ddm":{requires:["dd-ddm-base","event-resize"]},"dd-ddm-drop":{requires:["dd-ddm"]},"dd-drag":{requires:["dd-ddm-base"]},"dd-drop":{requires:["dd-ddm-drop"]},"dd-proxy":{requires:[x]},"dd-constrain":{requires:[x]},"dd-scroll":{requires:[x]},"dd-plugin":{requires:[x],optional:["dd-constrain","dd-proxy"]},"dd-drop-plugin":{requires:["dd-drop"]}}},dump:{requires:[s]},event:{expound:V,submodules:{"event-base":{expound:V,requires:[W]},"event-delegate":{requires:[V]},"event-focus":{requires:[V]},"event-key":{requires:[V]},"event-mouseenter":{requires:[V]},"event-mousewheel":{requires:[V]},"event-resize":{requires:[V]}}},"event-custom":{submodules:{"event-custom-base":{requires:[T,"yui-later"]},"event-custom-complex":{requires:[W]}}},"event-simulate":{requires:[Y]},"node-focusmanager":{requires:[y,AA,g,"node-event-simulate","event-key","event-focus"]},history:{requires:[AA]},imageloader:{requires:[B,J,O]},io:{submodules:{"io-base":{requires:[W]},"io-xdr":{requires:[r,"datatype-xml"]},"io-form":{requires:[r,V,J]},"io-upload-iframe":{requires:[r,V]},"io-queue":{requires:[r,"queue-promote"]}}},json:{submodules:{"json-parse":{requires:[s]},"json-stringify":{requires:[s]}}},loader:{requires:[Z]},"node-menunav":{requires:[AA,"classnamemanager",g,"node-focusmanager"],skinnable:true},oop:{requires:[s]},overlay:{requires:[R,H,"widget-position-ext","widget-stack","widget-stdmod"],skinnable:true},plugin:{requires:[B]},pluginhost:{requires:[s]},profiler:{requires:[s]},"queue-promote":{requires:[s]},"queue-run":{requires:[o]},slider:{requires:[R,"dd-constrain"],skinnable:true},stylesheet:{requires:[s]},substitute:{optional:[G]},widget:{requires:[y,"event-focus",n,AA,"classnamemanager"],plugins:{"widget-position":{},"widget-position-ext":{requires:[H]},"widget-stack":{skinnable:true},"widget-stdmod":{}},skinnable:true},yui:{submodules:{"yui-base":{},get:{},"yui-log":{},"yui-later":{}}},test:{requires:[m,AA,"json","event-simulate"]}}},p=A.cached(function(L,i,AE){return L+"/"+i+"-min."+(AE||X);}),Q=YUI.Env._loaderQueue,D=f.modules,v,d,c,z,P=A.Lang;for(v=0;v<a.length;v=v+1){d=a[v];c=X+d;D[c]={type:X,path:p(c,d)};z=c+e;d=d+e;D[z]={type:X,path:p(c,d)};if(c==AD){D[c].requires=[U];D[c].optional=[K];D[z].requires=[U+e];D[z].optional=[K+e];}else{if(c==C){D[c].after=I;D[z].after=I;}}}A.Env.meta=f;AC=t._loaded;A.Loader=function(AG){this.context=A;this.base=A.Env.meta.base;this.comboBase=A.Env.meta.comboBase;this.combine=(!(n in AG));this.root=A.Env.meta.root;this.timeout=0;this.forceMap={};this.filters={};this.required={};this.moduleInfo={};this.skin=A.merge(A.Env.meta.skin);var AF=A.Env.meta.modules,L,AE=YUI.Env.mods;this._internal=true;for(L in AF){if(AF.hasOwnProperty(L)){this.addModule(AF[L],L);}}for(L in AE){if(AE.hasOwnProperty(L)&&!this.moduleInfo[L]&&AE[L].details){this.addModule(AE[L].details,L);}}this._internal=false;this.sorted=[];this.loaded=AC[b];this.dirty=true;this.inserted={};this.skipped={};this._config(AG);};A.Loader.prototype={FILTER_DEFS:{RAW:{"searchExp":"-min\\.js","replaceStr":".js"},DEBUG:{"searchExp":"-min\\.js","replaceStr":"-debug.js"}},SKIN_PREFIX:"skin-",_config:function(AH){var AE,L,AG,AF;
1984N/Aif(AH){for(AE in AH){if(AH.hasOwnProperty(AE)){AG=AH[AE];if(AE=="require"){this.require(AG);}else{if(AE=="modules"){for(L in AG){if(AG.hasOwnProperty(L)){this.addModule(AG[L],L);}}}else{this[AE]=AG;}}}}}AF=this.filter;if(P.isString(AF)){AF=AF.toUpperCase();this.filterName=AF;this.filter=this.FILTER_DEFS[AF];if(AF=="DEBUG"){this.require("yui-log","dump");}}},formatSkin:function(AE,L){var i=this.SKIN_PREFIX+AE;if(L){i=i+"-"+L;}return i;},_addSkin:function(AK,AI,AJ){var L=this.formatSkin(AK),AF=this.moduleInfo,i=this.skin,AE=AF[AI]&&AF[AI].ext,AH,AG;if(AI){L=this.formatSkin(AK,AI);if(!AF[L]){AH=AF[AI];AG=AH.pkg||AI;this.addModule({"name":L,"type":"css","after":i.after,"path":(AJ||AG)+"/"+i.base+AK+"/"+AI+".css","ext":AE});}}return L;},addModule:function(AF,AE){AE=AE||AF.name;AF.name=AE;if(!AF||!AF.name){return false;}if(!AF.type){AF.type=AB;}if(!AF.path&&!AF.fullpath){AF.path=p(AE,AE,AF.type);}AF.ext=("ext" in AF)?AF.ext:(this._internal)?false:true;AF.requires=AF.requires||[];this.moduleInfo[AE]=AF;var AI=AF.submodules,AJ,AG,AK,AM,AL,AH,L;if(AI){AK=[];AG=0;for(AJ in AI){if(AI.hasOwnProperty(AJ)){AM=AI[AJ];AM.path=p(AE,AJ,AF.type);this.addModule(AM,AJ);AK.push(AJ);if(AF.skinnable){AL=this._addSkin(this.skin.defaultSkin,AJ,AE);AK.push(AL.name);}AG++;}}AF.supersedes=AK;AF.rollup=(AG<4)?AG:Math.min(AG-1,4);}AH=AF.plugins;if(AH){for(AJ in AH){if(AH.hasOwnProperty(AJ)){L=AH[AJ];L.path=p(AE,AJ,AF.type);L.requires=L.requires||[];this.addModule(L,AJ);if(AF.skinnable){this._addSkin(this.skin.defaultSkin,AJ,AE);}}}}this.dirty=true;return AF;},require:function(i){var L=(typeof i==="string")?arguments:i;this.dirty=true;A.mix(this.required,A.Array.hash(L));},getRequires:function(AK){if(!AK){return[];}if(!this.dirty&&AK.expanded){return AK.expanded;}var AI,AJ=[],L=AK.requires,AE=AK.optional,AF=this.moduleInfo,AG,AH,AL;for(AI=0;AI<L.length;AI=AI+1){AJ.push(L[AI]);AG=this.getModule(L[AI]);AL=this.getRequires(AG);for(AH=0;AH<AL.length;AH=AH+1){AJ.push(AL[AH]);}}L=AK.supersedes;if(L){for(AI=0;AI<L.length;AI=AI+1){AJ.push(L[AI]);AG=this.getModule(L[AI]);AL=this.getRequires(AG);for(AH=0;AH<AL.length;AH=AH+1){AJ.push(AL[AH]);}}}if(AE&&this.loadOptional){for(AI=0;AI<AE.length;AI=AI+1){AJ.push(AE[AI]);AL=this.getRequires(AF[AE[AI]]);for(AH=0;AH<AL.length;AH=AH+1){AJ.push(AL[AH]);}}}AK.expanded=A.Object.keys(A.Array.hash(AJ));return AK.expanded;},getProvides:function(i){var L=this.getModule(i),AF,AE;if(!L){return w;}if(L&&!L.provides){AF={};AE=L.supersedes;if(AE){A.Array.each(AE,function(AG){A.mix(AF,this.getProvides(AG));},this);}AF[i]=true;L.provides=AF;}return L.provides;},calculate:function(i,L){this.loadType=L;if(i||L||this.dirty){this._config(i);this._setup();this._explode();if(this.allowRollup&&!this.combine){this._rollup();}this._reduce();this._sort();this.dirty=false;}},_setup:function(){var AJ=this.moduleInfo,AH,AI,AG,AE,AK,AF,L;for(AH in AJ){if(AJ.hasOwnProperty(AH)){AE=AJ[AH];if(AE&&AE.skinnable){AK=this.skin.overrides;if(AK&&AK[AH]){for(AI=0;AI<AK[AH].length;AI=AI+1){L=this._addSkin(AK[AH][AI],AH);}}else{L=this._addSkin(this.skin.defaultSkin,AH);}AE.requires.push(L);}}}AF=A.merge(this.inserted);if(!this.ignoreRegistered){A.mix(AF,t.mods);}if(this.ignore){A.mix(AF,A.Array.hash(this.ignore));}for(AG in AF){if(AF.hasOwnProperty(AG)){A.mix(AF,this.getProvides(AG));}}if(this.force){for(AI=0;AI<this.force.length;AI=AI+1){if(this.force[AI] in AF){delete AF[this.force[AI]];}}}A.mix(this.loaded,AF);},_explode:function(){var AE=this.required,L,i;A.Object.each(AE,function(AF,AG){L=this.getModule(AG);var AH=L&&L.expound;if(L){if(AH){AE[AH]=this.getModule(AH);i=this.getRequires(AE[AH]);A.mix(AE,A.Array.hash(i));}i=this.getRequires(L);A.mix(AE,A.Array.hash(i));}},this);},getModule:function(i){var L=this.moduleInfo[i];return L;},_rollup:function(){var AJ,AI,AH,AM,AL={},L=this.required,AF,AG=this.moduleInfo,AE,AK;if(this.dirty||!this.rollups){for(AJ in AG){if(AG.hasOwnProperty(AJ)){AH=this.getModule(AJ);if(AH&&AH.rollup){AL[AJ]=AH;}}}this.rollups=AL;this.forceMap=(this.force)?A.Array.hash(this.force):{};}for(;;){AE=false;for(AJ in AL){if(AL.hasOwnProperty(AJ)){if(!L[AJ]&&((!this.loaded[AJ])||this.forceMap[AJ])){AH=this.getModule(AJ);AM=AH.supersedes||[];AF=false;if(!AH.rollup){continue;}AK=0;for(AI=0;AI<AM.length;AI=AI+1){if(this.loaded[AM[AI]]&&!this.forceMap[AM[AI]]){AF=false;break;}else{if(L[AM[AI]]){AK++;AF=(AK>=AH.rollup);if(AF){break;}}}}if(AF){L[AJ]=true;AE=true;this.getRequires(AH);}}}}if(!AE){break;}}},_reduce:function(){var AF,AE,AH,L,AI=this.required,AG=this.loadType;for(AF in AI){if(AI.hasOwnProperty(AF)){L=this.getModule(AF);if((this.loaded[AF]&&(!this.forceMap[AF])&&!this.ignoreRegistered)||(AG&&L&&L.type!=AG)){delete AI[AF];}else{AH=L&&L.supersedes;if(AH){for(AE=0;AE<AH.length;AE=AE+1){if(AH[AE] in AI){delete AI[AH[AE]];}}}}}}},_attach:function(){if(this.attaching){A._attach(this.attaching);}else{A._attach(this.sorted);}},_finish:function(){Q.running=false;this._continue();},_onSuccess:function(){this._attach();var L=this.skipped,AE,AF;for(AE in L){if(L.hasOwnProperty(AE)){delete this.inserted[AE];}}this.skipped={};AF=this.onSuccess;if(AF){AF.call(this.context,{msg:"success",data:this.data,success:true});}this._finish();},_onFailure:function(i){this._attach();var L=this.onFailure;if(L){L.call(this.context,{msg:"failure: "+i.msg,data:this.data,success:false});}this._finish();},_onTimeout:function(){this._attach();var L=this.onTimeout;if(L){L.call(this.context,{msg:"timeout",data:this.data,success:false});}this._finish();},_sort:function(){var AO=A.Object.keys(this.required),AE=this.moduleInfo,AJ=this.loaded,AI={},L=0,AF,AM,AL,AH,AG,AK,i,AN=A.cached(function(AV,AT){var AQ=AE[AV],AR,AU,AW,AP=AE[AT],AS;if(AJ[AT]||!AQ||!AP){return false;}AU=AQ.expanded;AW=AQ.after;if(AU&&A.Array.indexOf(AU,AT)>-1){return true;}if(AW&&A.Array.indexOf(AW,AT)>-1){return true;}AS=AE[AT]&&AE[AT].supersedes;if(AS){for(AR=0;AR<AS.length;AR=AR+1){if(AN(AV,AS[AR])){return true;}}}if(AQ.ext&&AQ.type==X&&!AP.ext&&AP.type==X){return true;
1984N/A}return false;});for(;;){AF=AO.length;AK=false;for(AH=L;AH<AF;AH=AH+1){AM=AO[AH];for(AG=AH+1;AG<AF;AG=AG+1){i=AM+AO[AG];if(!AI[i]&&AN(AM,AO[AG])){AL=AO.splice(AG,1);AO.splice(AH,0,AL[0]);AI[i]=true;AK=true;break;}}if(AK){break;}else{L=L+1;}}if(!AK){break;}}this.sorted=AO;},_insert:function(AE,AF,i){if(AE){this._config(AE);}this.calculate(AF);if(!i){var L=this;this._internalCallback=function(){var AG=L.onCSS;if(AG){AG.call(L.context,A);}L._internalCallback=null;L._insert(null,null,AB);};this._insert(null,null,X);return;}this._loading=true;this._combineComplete={};this.loadNext();},_continue:function(){if(!(Q.running)&&Q.size()>0){Q.running=true;Q.next()();}},insert:function(AE,i){var L=this,AF=A.merge(this,true);delete AF.require;delete AF.dirty;Q.add(function(){L._insert(AF,AE,i);});this._continue();},loadNext:function(AJ){if(!this._loading){return;}var AP,AH,AG,AF,L,AO=this,AK=this.loadType,AL,AE,AI,AM=function(AS){this._combineComplete[AK]=true;var AT=this._combining,AQ=AT.length,AR;for(AR=0;AR<AQ;AR=AR+1){this.inserted[AT[AR]]=true;}this.loadNext(AS.data);},AN=function(i){AO.loadNext(i.data);};if(this.combine&&(!this._combineComplete[AK])){this._combining=[];AP=this.sorted;AH=AP.length;L=this.comboBase;for(AG=0;AG<AH;AG=AG+1){AF=this.getModule(AP[AG]);if(AF&&AF.type===AK&&!AF.ext){L+=this.root+AF.path;if(AG<AH-1){L+="&";}this._combining.push(AP[AG]);}}if(this._combining.length){if(AK===X){AL=A.Get.css;AI=this.cssAttributes;}else{AL=A.Get.script;AI=this.jsAttributes;}AL(this._filter(L),{data:this._loading,onSuccess:AM,onFailure:this._onFailure,onTimeout:this._onTimeout,insertBefore:this.insertBefore,charset:this.charset,attributes:AI,timeout:this.timeout,autopurge:false,context:AO});return;}else{this._combineComplete[AK]=true;}}if(AJ){if(AJ!==this._loading){return;}this.inserted[AJ]=true;this.loaded[AJ]=true;if(this.onProgress){this.onProgress.call(this.context,{name:AJ,data:this.data});}}AP=this.sorted;AH=AP.length;for(AG=0;AG<AH;AG=AG+1){if(AP[AG] in this.inserted){continue;}if(AP[AG]===this._loading){return;}AF=this.getModule(AP[AG]);if(!AF){AE="Undefined module "+AP[AG]+" skipped";this.inserted[AP[AG]]=true;this.skipped[AP[AG]]=true;continue;}if(!AK||AK===AF.type){this._loading=AP[AG];if(AF.type===X){AL=A.Get.css;AI=this.cssAttributes;}else{AL=A.Get.script;AI=this.jsAttributes;}L=(AF.fullpath)?this._filter(AF.fullpath,AP[AG]):this._url(AF.path,AP[AG]);AL(L,{data:AP[AG],onSuccess:AN,insertBefore:this.insertBefore,charset:this.charset,attributes:AI,onFailure:this._onFailure,onTimeout:this._onTimeout,timeout:this.timeout,autopurge:false,context:AO});return;}}this._loading=null;AL=this._internalCallback;if(AL){this._internalCallback=null;AL.call(this);}else{this._onSuccess();}},_filter:function(AE,i){var AG=this.filter,L=i&&(i in this.filters),AF=L&&this.filters[i];if(AE){if(L){AG=(P.isString(AF))?this.FILTER_DEFS[AF.toUpperCase()]||null:AF;}if(AG){AE=AE.replace(new RegExp(AG.searchExp,"g"),AG.replaceStr);}}return AE;},_url:function(i,L){return this._filter((this.base||"")+i,L);}};})();},"@VERSION@");