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