Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated to latest Loader

  • Loading branch information...
commit 137b25028831670c4e6e615decfd28123e577d41 1 parent 0356f8e
@davglass authored
View
2  build/loader-min.js
@@ -1 +1 @@
-(function(){var b;var a={};if(typeof b!="undefined"){b._YUI=b}var b=function(){var f=0,j=this,e=arguments,d=e.length,h=function(k,i){return(k&&k.hasOwnProperty&&(k instanceof i))},g=(typeof YUI_config!=="undefined")&&YUI_config;if(!(h(j,b))){j=new b()}else{j._init();if(b.GlobalConfig){j.applyConfig(b.GlobalConfig)}if(g){j.applyConfig(g)}if(!d){j._setup()}}if(d){for(;f<d;f++){j.applyConfig(e[f])}j._setup()}j.instanceOf=h;return j};(function(){var t,e,u="3.5.0pr2",l=".",r="http://yui.yahooapis.com/",x="yui3-js-enabled",g="yui3-css-stamp",p=function(){},k=Array.prototype.slice,v={"io.xdrReady":1,"io.xdrResponse":1,"SWF.eventHandler":1},j=(typeof window!="undefined"),i=(j)?window:null,z=(j)?i.document:null,h=z&&z.documentElement,d=h&&h.className,f={},m=new Date().getTime(),q=function(D,C,B,A){if(D&&D.addEventListener){D.addEventListener(C,B,A)}else{if(D&&D.attachEvent){D.attachEvent("on"+C,B)}}},y=function(E,D,C,A){if(E&&E.removeEventListener){try{E.removeEventListener(D,C,A)}catch(B){}}else{if(E&&E.detachEvent){E.detachEvent("on"+D,C)}}},w=function(){b.Env.windowLoaded=true;b.Env.DOMReady=true;if(j){y(window,"load",w)}},n=function(C,B){var A=C.Env._loader;if(A){A.ignoreRegistered=false;A.onEnd=null;A.data=null;A.required=[];A.loadType=null}else{A=new C.Loader(C.config);C.Env._loader=A}b.Env.core=C.Array.dedupe([].concat(b.Env.core,["loader-base","loader-rollup","loader-yui3"]));return A},s=function(C,B){for(var A in B){if(B.hasOwnProperty(A)){C[A]=B[A]}}},o={success:true};if(h&&d.indexOf(x)==-1){if(d){d+=" "}d+=x;h.className=d}if(u.indexOf("@")>-1){u="3.3.0"}t={applyConfig:function(G){G=G||p;var C,E,D=this.config,F=D.modules,B=D.groups,A=this.Env._loader;for(E in G){if(G.hasOwnProperty(E)){C=G[E];if(F&&E=="modules"){s(F,C)}else{if(B&&E=="groups"){s(B,C)}else{if(E=="win"){D[E]=(C&&C.contentWindow)||C;D.doc=D[E]?D[E].document:null}else{if(E=="_yuid"){}else{D[E]=C}}}}}}if(A){A._config(G)}},_config:function(A){this.applyConfig(A)},_init:function(){var D,C,E=this,A=b.Env,B=E.Env,F;E.version=u;if(!B){E.Env={core:["get","intl-base"],mods:{},versions:{},base:r,cdn:r+u+"/build/",_idx:0,_used:{},_attached:{},_missed:[],_yidx:0,_uidx:0,_guidp:"y",_loaded:{},_BASE_RE:/(?:\?(?:[^&]*&)*([^&]*))?\b(simpleyui|yui(?:-\w+)?)\/\2(?:-(min|debug))?\.js/,parseBasePath:function(K,I){var G=K.match(I),J,H;if(G){J=RegExp.leftContext||K.slice(0,K.indexOf(G[0]));H=G[3];if(G[1]){J+="?"+G[1]}J={filter:H,path:J}}return J},getBase:A&&A.getBase||function(K){var I=(z&&z.getElementsByTagName("script"))||[],L=B.cdn,H,J,G,M;for(J=0,G=I.length;J<G;++J){M=I[J].src;if(M){H=E.Env.parseBasePath(M,K);if(H){D=H.filter;L=H.path;break}}}return L}};B=E.Env;B._loaded[u]={};if(A&&E!==b){B._yidx=++A._yidx;B._guidp=("yui_"+u+"_"+B._yidx+"_"+m).replace(/\./g,"_")}else{if(b._YUI){A=b._YUI.Env;B._yidx+=A._yidx;B._uidx+=A._uidx;for(F in A){if(!(F in B)){B[F]=A[F]}}delete b._YUI}}E.id=E.stamp(E);f[E.id]=E}E.constructor=b;E.config=E.config||{bootstrap:true,cacheUse:true,debug:true,doc:z,fetchCSS:true,throwFail:true,useBrowserConsole:true,useNativeES5:true,win:i};if(z&&!z.getElementById(g)){C=z.createElement("div");C.innerHTML='<div id="'+g+'" style="position: absolute !important; visibility: hidden !important"></div>';b.Env.cssStampEl=C.firstChild;h.insertBefore(b.Env.cssStampEl,h.firstChild)}E.config.lang=E.config.lang||"en-US";E.config.base=b.config.base||E.Env.getBase(E.Env._BASE_RE);if(!D||(!("mindebug").indexOf(D))){D="min"}D=(D)?"-"+D:D;E.config.loaderPath=b.config.loaderPath||"loader/loader"+D+".js"},_setup:function(F){var B,E=this,A=[],D=b.Env.mods,C=E.config.core||[].concat(b.Env.core);for(B=0;B<C.length;B++){if(D[C[B]]){A.push(C[B])}}E._attach(["yui-base"]);E._attach(A);if(E.Loader){n(E)}},applyTo:function(G,F,C){if(!(F in v)){this.log(F+": applyTo not allowed","warn","yui");return null}var B=f[G],E,A,D;if(B){E=F.split(".");A=B;for(D=0;D<E.length;D=D+1){A=A[E[D]];if(!A){this.log("applyTo not found: "+F,"warn","yui")}}return A&&A.apply(B,C)}return null},add:function(B,G,F,A){A=A||{};var E=b.Env,H={name:B,fn:G,version:F,details:A},I,D,C=E.versions;E.mods[B]=H;C[F]=C[F]||{};C[F][B]=H;for(D in f){if(f.hasOwnProperty(D)){I=f[D].Env._loader;if(I){if(!I.moduleInfo[B]){I.addModule(A,B)}}}}return this},_attach:function(F,Q){var J,R,P,M,A,H,C,D=b.Env.mods,K=b.Env.aliases,B=this,I,E=B.Env._loader,G=B.Env._attached,L=F.length,E,O=[];for(J=0;J<L;J++){R=F[J];P=D[R];O.push(R);if(E&&E.conditions[R]){B.Object.each(E.conditions[R],function(T){var S=T&&((T.ua&&B.UA[T.ua])||(T.test&&T.test(B)));if(S){O.push(T.name)}})}}F=O;L=F.length;for(J=0;J<L;J++){if(!G[F[J]]){R=F[J];P=D[R];if(K&&K[R]){B._attach(K[R]);continue}if(!P){if(E&&E.moduleInfo[R]){P=E.moduleInfo[R];Q=true}if(!Q&&R){if((R.indexOf("skin-")===-1)&&(R.indexOf("css")===-1)){B.Env._missed.push(R);B.Env._missed=B.Array.dedupe(B.Env._missed);B.message("NOT loaded: "+R,"warn","yui")}}}else{G[R]=true;for(I=0;I<B.Env._missed.length;I++){if(B.Env._missed[I]===R){B.message("Found: "+R+" (was reported as missing earlier)","warn","yui");B.Env._missed.splice(I,1)}}M=P.details;A=M.requires;H=M.use;C=M.after;if(A){for(I=0;I<A.length;I++){if(!G[A[I]]){if(!B._attach(A)){return false}break}}}if(C){for(I=0;I<C.length;I++){if(!G[C[I]]){if(!B._attach(C,true)){return false}break}}}if(P.fn){try{P.fn(B,R)}catch(N){B.error("Attach error: "+R,N,R);return false}}if(H){for(I=0;I<H.length;I++){if(!G[H[I]]){if(!B._attach(H)){return false}break}}}}}}return true},use:function(){var D=k.call(arguments,0),H=D[D.length-1],G=this,F=0,B=[],C,A=G.Env,E=true;if(G.Lang.isFunction(H)){D.pop()}else{H=null}if(G.Lang.isArray(D[0])){D=D[0]}if(G.config.cacheUse){while((C=D[F++])){if(!A._attached[C]){E=false;break}}if(E){if(D.length){}G._notify(H,o,D);return G}}if(G._loading){G._useQueue=G._useQueue||new G.Queue();G._useQueue.add([D,H])}else{G._use(D,function(J,I){J._notify(H,I,D)})}return G},_notify:function(D,A,B){if(!A.success&&this.config.loadErrorFn){this.config.loadErrorFn.call(this,this,D,A,B)}else{if(D){try{D(this,A)}catch(C){this.error("use callback error",C,B)}}}},_use:function(C,E){if(!this.Array){this._attach(["yui-base"])}var R,J,S,O,B=this,T=b.Env,D=T.mods,A=B.Env,G=A._used,Q=T.aliases,N=T._loaderQueue,W=C[0],I=B.Array,U=B.config,H=U.bootstrap,P=[],L=[],V=true,F=U.fetchCSS,M=function(aa,Z){var Y=0,X=[];if(!aa.length){return}if(Q){for(Y=0;Y<aa.length;Y++){if(Q[aa[Y]]){X=[].concat(X,Q[aa[Y]])}else{X.push(aa[Y])}}aa=X}I.each(aa,function(ad){if(!Z){L.push(ad)}if(G[ad]){return}var ab=D[ad],ae,ac;if(ab){G[ad]=true;ae=ab.details.requires;ac=ab.details.use}else{if(!T._loaded[u][ad]){P.push(ad)}else{G[ad]=true}}if(ae&&ae.length){M(ae)}if(ac&&ac.length){M(ac,1)}})},K=function(ab){var Z=ab||{success:true,msg:"not dynamic"},Y,X,aa=true,ac=Z.data;B._loading=false;if(ac){X=P;P=[];L=[];M(ac);Y=P.length;if(Y){if(P.sort().join()==X.sort().join()){Y=false}}}if(Y&&ac){B._loading=false;B._use(C,function(){if(B._attach(ac)){B._notify(E,Z,ac)}})}else{if(ac){aa=B._attach(ac)}if(aa){B._notify(E,Z,C)}}if(B._useQueue&&B._useQueue.size()&&!B._loading){B._use.apply(B,B._useQueue.next())}};if(W==="*"){V=B._attach(B.Object.keys(D));if(V){K()}return B}if(D.loader&&!B.Loader){B._attach(["loader"])}if(H&&B.Loader&&C.length){J=n(B);J.require(C);J.ignoreRegistered=true;J._boot=true;J.calculate(null,(F)?null:"js");C=J.sorted;J._boot=false}M(C);R=P.length;if(R){P=B.Object.keys(I.hash(P));R=P.length}if(H&&R&&B.Loader){B._loading=true;J=n(B);J.onEnd=K;J.context=B;J.data=C;J.ignoreRegistered=false;J.require(C);J.insert(null,(F)?null:"js")}else{if(H&&R&&B.Get&&!A.bootstrapped){B._loading=true;S=function(){B._loading=false;N.running=false;A.bootstrapped=true;T._bootstrapping=false;if(B._attach(["loader"])){B._use(C,E)}};if(T._bootstrapping){N.add(S)}else{T._bootstrapping=true;B.Get.script(U.base+U.loaderPath,{onEnd:S})}}else{V=B._attach(C);if(V){K()}}}return B},namespace:function(){var B=arguments,F,D=0,C,E,A;for(;D<B.length;D++){F=this;A=B[D];if(A.indexOf(l)>-1){E=A.split(l);for(C=(E[0]=="YAHOO")?1:0;C<E.length;C++){F[E[C]]=F[E[C]]||{};F=F[E[C]]}}else{F[A]=F[A]||{};F=F[A]}}return F},log:p,message:p,dump:function(A){return""+A},error:function(E,B,D){var C=this,A;if(C.config.errorFn){A=C.config.errorFn.apply(C,arguments)}if(C.config.throwFail&&!A){throw (B||new Error(E))}else{C.message(E,"error",""+D)}return C},guid:function(A){var B=this.Env._guidp+"_"+(++this.Env._uidx);return(A)?(A+B):B},stamp:function(C,D){var A;if(!C){return C}if(C.uniqueID&&C.nodeType&&C.nodeType!==9){A=C.uniqueID}else{A=(typeof C==="string")?C:C._yuid}if(!A){A=this.guid();if(!D){try{C._yuid=A}catch(B){A=null}}}return A},destroy:function(){var A=this;if(A.Event){A.Event._unload()}delete f[A.id];delete A.Env;delete A.config}};b.prototype=t;for(e in t){if(t.hasOwnProperty(e)){b[e]=t[e]}}b.applyConfig=function(A){if(!A){return}if(b.GlobalConfig){this.prototype.applyConfig.call(this,b.GlobalConfig)}this.prototype.applyConfig.call(this,A);b.GlobalConfig=this.config};b._init();if(j){q(window,"load",w)}else{w()}b.Env.add=q;b.Env.remove=y;if(typeof a=="object"){a.YUI=b}}());b.add("yui-base",function(e){var m=e.Lang||(e.Lang={}),r=String.prototype,o=Object.prototype.toString,d={"undefined":"undefined",number:"number","boolean":"boolean",string:"string","[object Function]":"function","[object RegExp]":"regexp","[object Array]":"array","[object Date]":"date","[object Error]":"error"},f=/\{\s*([^|}]+?)\s*(?:\|([^}]*))?\s*\}/g,v=/^\s+|\s+$/g,h=/\{\s*\[(?:native code|function)\]\s*\}/i;m._isNative=function(z){return !!(e.config.useNativeES5&&z&&h.test(z))};m.isArray=m._isNative(Array.isArray)?Array.isArray:function(z){return m.type(z)==="array"};m.isBoolean=function(z){return typeof z==="boolean"};m.isDate=function(z){return m.type(z)==="date"&&z.toString()!=="Invalid Date"&&!isNaN(z)};m.isFunction=function(z){return m.type(z)==="function"};m.isNull=function(z){return z===null};m.isNumber=function(z){return typeof z==="number"&&isFinite(z)};m.isObject=function(B,A){var z=typeof B;return(B&&(z==="object"||(!A&&(z==="function"||m.isFunction(B)))))||false};m.isString=function(z){return typeof z==="string"};m.isUndefined=function(z){return typeof z==="undefined"};m.isValue=function(A){var z=m.type(A);switch(z){case"number":return isFinite(A);case"null":case"undefined":return false;default:return !!z}};m.now=Date.now||function(){return new Date().getTime()};m.sub=function(z,A){return z.replace?z.replace(f,function(B,C){return m.isUndefined(A[C])?B:A[C]}):z};m.trim=r.trim?function(z){return z&&z.trim?z.trim():z}:function(z){try{return z.replace(v,"")}catch(A){return z}};m.trimLeft=r.trimLeft?function(z){return z.trimLeft()}:function(z){return z.replace(/^\s+/,"")};m.trimRight=r.trimRight?function(z){return z.trimRight()}:function(z){return z.replace(/\s+$/,"")};m.type=function(z){return d[typeof z]||d[o.call(z)]||(z?"object":"null")};var j=e.Lang,u=Array.prototype,s=Object.prototype.hasOwnProperty;function n(B,E,D){var A,z;E||(E=0);if(D||n.test(B)){try{return u.slice.call(B,E)}catch(C){z=[];for(A=B.length;E<A;++E){z.push(B[E])}return z}}return[B]}e.Array=n;n.dedupe=function(E){var D={},B=[],A,C,z;for(A=0,z=E.length;A<z;++A){C=E[A];if(!s.call(D,C)){D[C]=1;B.push(C)}}return B};n.each=n.forEach=j._isNative(u.forEach)?function(B,z,A){u.forEach.call(B||[],z,A||e);return e}:function(D,B,C){for(var A=0,z=(D&&D.length)||0;A<z;++A){if(A in D){B.call(C||e,D[A],A,D)}}return e};n.hash=function(C,A){var D={},E=(A&&A.length)||0,B,z;for(B=0,z=C.length;B<z;++B){if(B in C){D[C[B]]=E>B&&B in A?A[B]:true}}return D};n.indexOf=j._isNative(u.indexOf)?function(B,z,A){return u.indexOf.call(B,z,A)}:function(C,A,B){var z=C.length;B=+B||0;B=(B>0||-1)*Math.floor(Math.abs(B));if(B<0){B+=z;if(B<0){B=0}}for(;B<z;++B){if(B in C&&C[B]===A){return B}}return -1};n.numericSort=function(A,z){return A-z};n.some=j._isNative(u.some)?function(B,z,A){return u.some.call(B,z,A)}:function(D,B,C){for(var A=0,z=D.length;A<z;++A){if(A in D&&B.call(C,D[A],A,D)){return true}}return false};n.test=function(B){var z=0;if(j.isArray(B)){z=1}else{if(j.isObject(B)){try{if("length" in B&&!B.tagName&&!B.alert&&!B.apply){z=2}}catch(A){}}}return z};function x(){this._init();this.add.apply(this,arguments)}x.prototype={_init:function(){this._q=[]},next:function(){return this._q.shift()},last:function(){return this._q.pop()},add:function(){this._q.push.apply(this._q,arguments);return this},size:function(){return this._q.length}};e.Queue=x;b.Env._loaderQueue=b.Env._loaderQueue||new x();var q="__",s=Object.prototype.hasOwnProperty,p=e.Lang.isObject,i=e.config.win;e.cached=function(B,z,A){z||(z={});return function(C){var D=arguments.length>1?Array.prototype.join.call(arguments,q):String(C);if(!(D in z)||(A&&z[D]==A)){z[D]=B.apply(B,arguments)}return z[D]}};e.getLocation=function(){return i&&i.location};e.merge=function(){var B=arguments,C=0,A=B.length,z={};for(;C<A;++C){e.mix(z,B[C],true)}return z};e.mix=function(z,A,G,B,D,H){var E,K,J,C,L,F,I;if(!z||!A){return z||e}if(D){if(D===2){e.mix(z.prototype,A.prototype,G,B,0,H)}J=D===1||D===3?A.prototype:A;I=D===1||D===4?z.prototype:z;if(!J||!I){return z}}else{J=A;I=z}E=G&&!H;if(B){for(C=0,F=B.length;C<F;++C){L=B[C];if(!s.call(J,L)){continue}K=E?false:L in I;if(H&&K&&p(I[L],true)&&p(J[L],true)){e.mix(I[L],J[L],G,null,0,H)}else{if(G||!K){I[L]=J[L]}}}}else{for(L in J){if(!s.call(J,L)){continue}K=E?false:L in I;if(H&&K&&p(I[L],true)&&p(J[L],true)){e.mix(I[L],J[L],G,null,0,H)}else{if(G||!K){I[L]=J[L]}}}if(e.Object._hasEnumBug){e.mix(I,J,G,e.Object._forceEnum,D,H)}}return z};var j=e.Lang,s=Object.prototype.hasOwnProperty,y,k=e.Object=j._isNative(Object.create)?function(z){return Object.create(z)}:(function(){function z(){}return function(A){z.prototype=A;return new z()}}()),g=k._forceEnum=["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toString","toLocaleString","valueOf"],w=k._hasEnumBug=!{valueOf:0}.propertyIsEnumerable("valueOf"),t=k._hasProtoEnumBug=(function(){}).propertyIsEnumerable("prototype"),l=k.owns=function(A,z){return !!A&&s.call(A,z)};k.hasKey=l;k.keys=j._isNative(Object.keys)?Object.keys:function(D){if(!j.isObject(D)){throw new TypeError("Object.keys called on a non-object")}var C=[],B,A,z;if(t&&typeof D==="function"){for(A in D){if(l(D,A)&&A!=="prototype"){C.push(A)}}}else{for(A in D){if(l(D,A)){C.push(A)}}}if(w){for(B=0,z=g.length;B<z;++B){A=g[B];if(l(D,A)){C.push(A)}}}return C};k.values=function(D){var C=k.keys(D),B=0,z=C.length,A=[];for(;B<z;++B){A.push(D[C[B]])}return A};k.size=function(A){try{return k.keys(A).length}catch(z){return 0}};k.hasValue=function(A,z){return e.Array.indexOf(k.values(A),z)>-1};k.each=function(C,A,D,B){var z;for(z in C){if(B||l(C,z)){A.call(D||e,C[z],z,C)}}return e};k.some=function(C,A,D,B){var z;for(z in C){if(B||l(C,z)){if(A.call(D||e,C[z],z,C)){return true}}}return false};k.getValue=function(D,C){if(!j.isObject(D)){return y}var A,B=e.Array(C),z=B.length;for(A=0;D!==y&&A<z;A++){D=D[B[A]]}return D};k.setValue=function(F,D,E){var z,C=e.Array(D),B=C.length-1,A=F;if(B>=0){for(z=0;A!==y&&z<B;z++){A=A[C[z]]}if(A!==y){A[C[z]]=E}else{return y}}return F};k.isEmpty=function(z){return !k.keys(Object(z)).length};b.Env.parseUA=function(F){var E=function(I){var J=0;return parseFloat(I.replace(/\./g,function(){return(J++==1)?"":"."}))},H=e.config.win,z=H&&H.navigator,C={ie:0,opera:0,gecko:0,webkit:0,safari:0,chrome:0,mobile:null,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,silk:0,accel:false,webos:0,caja:z&&z.cajaVersion,secure:false,os:null,nodejs:0},A=F||z&&z.userAgent,G=H&&H.location,B=G&&G.href,D;C.userAgent=A;C.secure=B&&(B.toLowerCase().indexOf("https")===0);if(A){if((/windows|win32/i).test(A)){C.os="windows"}else{if((/macintosh|mac_powerpc/i).test(A)){C.os="macintosh"}else{if((/android/i).test(A)){C.os="android"}else{if((/symbos/i).test(A)){C.os="symbos"}else{if((/linux/i).test(A)){C.os="linux"}else{if((/rhino/i).test(A)){C.os="rhino"}}}}}}if((/KHTML/).test(A)){C.webkit=1}if((/IEMobile|XBLWP7/).test(A)){C.mobile="windows"}if((/Fennec/).test(A)){C.mobile="gecko"}D=A.match(/AppleWebKit\/([^\s]*)/);if(D&&D[1]){C.webkit=E(D[1]);C.safari=C.webkit;if(/ Mobile\//.test(A)||(/iPad|iPod|iPhone/).test(A)){C.mobile="Apple";D=A.match(/OS ([^\s]*)/);if(D&&D[1]){D=E(D[1].replace("_","."))}C.ios=D;C.os="ios";C.ipad=C.ipod=C.iphone=0;D=A.match(/iPad|iPod|iPhone/);if(D&&D[0]){C[D[0].toLowerCase()]=C.ios}}else{D=A.match(/NokiaN[^\/]*|webOS\/\d\.\d/);if(D){C.mobile=D[0]}if(/webOS/.test(A)){C.mobile="WebOS";D=A.match(/webOS\/([^\s]*);/);if(D&&D[1]){C.webos=E(D[1])}}if(/ Android/.test(A)){if(/Mobile/.test(A)){C.mobile="Android"}D=A.match(/Android ([^\s]*);/);if(D&&D[1]){C.android=E(D[1])}}if(/Silk/.test(A)){D=A.match(/Silk\/([^\s]*)\)/);if(D&&D[1]){C.silk=E(D[1])}if(!C.android){C.android=2.34;C.os="Android"}if(/Accelerated=true/.test(A)){C.accel=true}}}D=A.match(/Chrome\/([^\s]*)/);if(D&&D[1]){C.chrome=E(D[1]);C.safari=0}else{D=A.match(/AdobeAIR\/([^\s]*)/);if(D){C.air=D[0]}}}if(!C.webkit){if(/Opera/.test(A)){D=A.match(/Opera[\s\/]([^\s]*)/);if(D&&D[1]){C.opera=E(D[1])}D=A.match(/Version\/([^\s]*)/);if(D&&D[1]){C.opera=E(D[1])}if(/Opera Mobi/.test(A)){C.mobile="opera";D=A.replace("Opera Mobi","").match(/Opera ([^\s]*)/);if(D&&D[1]){C.opera=E(D[1])}}D=A.match(/Opera Mini[^;]*/);if(D){C.mobile=D[0]}}else{D=A.match(/MSIE\s([^;]*)/);if(D&&D[1]){C.ie=E(D[1])}else{D=A.match(/Gecko\/([^\s]*)/);if(D){C.gecko=1;D=A.match(/rv:([^\s\)]*)/);if(D&&D[1]){C.gecko=E(D[1])}}}}}}if(!F){if(typeof process=="object"){if(process.versions&&process.versions.node){C.os=process.platform;C.nodejs=process.versions.node}}b.Env.UA=C}return C};e.UA=b.Env.UA||b.Env.parseUA();b.Env.aliases={anim:["anim-base","anim-color","anim-curve","anim-easing","anim-node-plugin","anim-scroll","anim-xy"],app:["app-base","model","model-list","router","view"],attribute:["attribute-base","attribute-complex"],autocomplete:["autocomplete-base","autocomplete-sources","autocomplete-list","autocomplete-plugin"],base:["base-base","base-pluginhost","base-build"],button:["button-base","button-group","cssbutton"],cache:["cache-base","cache-offline","cache-plugin"],collection:["array-extras","arraylist","arraylist-add","arraylist-filter","array-invoke"],controller:["router"],dataschema:["dataschema-base","dataschema-json","dataschema-xml","dataschema-array","dataschema-text"],datasource:["datasource-local","datasource-io","datasource-get","datasource-function","datasource-cache","datasource-jsonschema","datasource-xmlschema","datasource-arrayschema","datasource-textschema","datasource-polling"],datatable:["datatable-core","datatable-head","datatable-body","datatable-base","datatable-column-widths","datatable-message","datatable-mutable","datatable-scroll","datatable-datasource","datatable-sort"],datatype:["datatype-number","datatype-date","datatype-xml"],"datatype-date":["datatype-date-parse","datatype-date-format"],"datatype-number":["datatype-number-parse","datatype-number-format"],"datatype-xml":["datatype-xml-parse","datatype-xml-format"],dd:["dd-ddm-base","dd-ddm","dd-ddm-drop","dd-drag","dd-proxy","dd-constrain","dd-drop","dd-scroll","dd-delegate"],dom:["dom-base","dom-screen","dom-style","selector-native","selector"],editor:["frame","editor-selection","exec-command","editor-base","editor-para","editor-br","editor-bidi","editor-tab","createlink-base"],event:["event-base","event-delegate","event-synthetic","event-mousewheel","event-mouseenter","event-key","event-focus","event-resize","event-hover","event-outside","event-touch","event-move","event-flick","event-valuechange"],"event-custom":["event-custom-base","event-custom-complex"],"event-gestures":["event-flick","event-move"],handlebars:["handlebars-compiler"],highlight:["highlight-base","highlight-accentfold"],history:["history-base","history-hash","history-hash-ie","history-html5"],io:["io-base","io-xdr","io-form","io-upload-iframe","io-queue"],json:["json-parse","json-stringify"],loader:["loader-base","loader-rollup","loader-yui3"],node:["node-base","node-event-delegate","node-pluginhost","node-screen","node-style"],pluginhost:["pluginhost-base","pluginhost-config"],querystring:["querystring-parse","querystring-stringify"],recordset:["recordset-base","recordset-sort","recordset-filter","recordset-indexer"],resize:["resize-base","resize-proxy","resize-constrain"],slider:["slider-base","slider-value-range","clickable-rail","range-slider"],text:["text-accentfold","text-wordbreak"],widget:["widget-base","widget-htmlparser","widget-uievents","widget-skin"]}},"3.5.0pr2");b.add("get",function(f){var e=f.Lang,g,d;f.Get=g={cssOptions:{attributes:{rel:"stylesheet"},doc:f.config.linkDoc||f.config.doc,pollInterval:50},jsOptions:{autopurge:true,doc:f.config.scriptDoc||f.config.doc},options:{attributes:{charset:"utf-8"},purgethreshold:20},REGEX_CSS:/\.css(?:[?;].*)?$/i,REGEX_JS:/\.js(?:[?;].*)?$/i,_insertCache:{},_pending:null,_purgeNodes:[],_queue:[],abort:function(m){var j,n,k,h,l;if(!m.abort){n=m;l=this._pending;m=null;if(l&&l.transaction.id===n){m=l.transaction;this._pending=null}else{for(j=0,h=this._queue.length;j<h;++j){k=this._queue[j].transaction;if(k.id===n){m=k;this._queue.splice(j,1);break}}}}m&&m.abort()},css:function(i,h,j){return this._load("css",i,h,j)},js:function(i,h,j){return this._load("js",i,h,j)},load:function(i,h,j){return this._load(null,i,h,j)},_autoPurge:function(h){if(h&&this._purgeNodes.length>=h){this._purge(this._purgeNodes)}},_getEnv:function(){var i=f.config.doc,h=f.UA;return(this._env={async:i&&i.createElement("script").async===true,cssLoad:!!(h.gecko?h.gecko>=9:!h.webkit),preservesScriptOrder:!!(h.gecko||h.opera)})},_getTransaction:function(n,k){var o=[],l,h,m,j;if(!e.isArray(n)){n=[n]}k=f.merge(this.options,k);k.attributes=f.merge(this.options.attributes,k.attributes);for(l=0,h=n.length;l<h;++l){j=n[l];m={attributes:{}};if(typeof j==="string"){m.url=j}else{if(j.url){f.mix(m,j,false,null,0,true);j=j.url}else{continue}}f.mix(m,k,false,null,0,true);if(!m.type){if(this.REGEX_CSS.test(j)){m.type="css"}else{if(!this.REGEX_JS.test(j)){}m.type="js"}}f.mix(m,m.type==="js"?this.jsOptions:this.cssOptions,false,null,0,true);m.attributes.id||(m.attributes.id=f.guid());if(m.win){m.doc=m.win.document}else{m.win=m.doc.defaultView||m.doc.parentWindow}if(m.charset){m.attributes.charset=m.charset}o.push(m)}return new d(o,k)},_load:function(i,j,h,l){var k;if(typeof h==="function"){l=h;h={}}h||(h={});h.type=i;if(!this._env){this._getEnv()}k=this._getTransaction(j,h);this._queue.push({callback:l,transaction:k});this._next();return k},_next:function(){var h;if(this._pending){return}h=this._queue.shift();if(h){this._pending=h;h.transaction.execute(function(){h.callback&&h.callback.apply(this,arguments);g._pending=null;g._next()})}},_purge:function(h){var j=this._purgeNodes,l=h!==j,i,k;while(k=h.pop()){if(!k._yuiget_finished){continue}k.parentNode&&k.parentNode.removeChild(k);if(l){i=f.Array.indexOf(j,k);if(i>-1){j.splice(i,1)}}}}};g.script=g.js;g.Transaction=d=function(j,i){var h=this;h.id=d._lastId+=1;h.data=i.data;h.errors=[];h.nodes=[];h.options=i;h.requests=j;h._callbacks=[];h._queue=[];h._waiting=0;h.tId=h.id;h.win=i.win||f.config.win};d._lastId=0;d.prototype={_state:"new",abort:function(h){this._pending=null;this._pendingCSS=null;this._pollTimer=clearTimeout(this._pollTimer);this._queue=[];this._waiting=0;this.errors.push({error:h||"Aborted"});this._finish()},execute:function(p){var k=this,o=k.requests,n=k._state,l,j,h,m;if(n==="done"){p&&p(k.errors.length?k.errors:null,k);return}else{p&&k._callbacks.push(p);if(n==="executing"){return}}k._state="executing";k._queue=h=[];if(k.options.timeout){k._timeout=setTimeout(function(){k.abort("Timeout")},k.options.timeout)}for(l=0,j=o.length;l<j;++l){m=k.requests[l];if(m.async||m.type==="css"){k._insert(m)}else{h.push(m)}}k._next()},purge:function(){g._purge(this.nodes)},_createNode:function(j,i,l){var k=l.createElement(j),h;for(h in i){if(i.hasOwnProperty(h)){k.setAttribute(h,i[h])}}return k},_finish:function(){var n=this.errors.length?this.errors:null,j=this.options,m=j.context||this,l,k,h;if(this._state==="done"){return}this._state="done";for(k=0,h=this._callbacks.length;k<h;++k){this._callbacks[k].call(m,n,this)}l=this._getEventData();if(n){if(j.onTimeout&&n[n.length-1].error==="Timeout"){j.onTimeout.call(m,l)}if(j.onFailure){j.onFailure.call(m,l)}}else{if(j.onSuccess){j.onSuccess.call(m,l)}}if(j.onEnd){j.onEnd.call(m,l)}},_getEventData:function(h){if(h){return f.merge(this,{abort:this.abort,purge:this.purge,request:h,url:h.url,win:h.win})}else{return this}},_getInsertBefore:function(l){var m=l.doc,j=l.insertBefore,i,k,h;if(j){return typeof j==="string"?m.getElementById(j):j}i=g._insertCache;h=f.stamp(m);if((j=i[h])){return j}if((j=m.getElementsByTagName("base")[0])){return(i[h]=j)}j=m.head||m.getElementsByTagName("head")[0];if(j){j.appendChild(m.createTextNode(""));return(i[h]=j.lastChild)}return(i[h]=m.getElementsByTagName("script")[0])},_insert:function(p){var m=g._env,n=this._getInsertBefore(p),j=p.type==="js",i=p.node,q=this,h=f.UA,k;if(!i){if(j){k="script"}else{if(!m.cssLoad&&h.gecko){k="style"}else{k="link"}}i=p.node=this._createNode(k,p.attributes,p.doc)}function l(){q._progress("Failed to load "+p.url,p)}function o(){q._progress(null,p)}if(j){i.setAttribute("src",p.url);if(p.async){i.async=true}else{if(m.async){i.async=false}if(!m.preservesScriptOrder){this._pending=p}}}else{if(!m.cssLoad&&h.gecko){i.innerHTML=(p.attributes.charset?'@charset "'+p.attributes.charset+'";':"")+'@import "'+p.url+'";'}else{i.setAttribute("href",p.url)}}if(j&&h.ie&&h.ie<9){i.onreadystatechange=function(){if(/loaded|complete/.test(i.readyState)){i.onreadystatechange=null;o()}}}else{if(!j&&!m.cssLoad){this._poll(p)}else{i.onerror=l;i.onload=o}}this._waiting+=1;this.nodes.push(i);n.parentNode.insertBefore(i,n)},_next:function(){if(this._pending){return}if(this._queue.length){this._insert(this._queue.shift())}else{if(!this._waiting){this._finish()}}},_poll:function(p){var s=this,t=s._pendingCSS,n=f.UA.webkit,l,h,k,r,q,m;if(p){t||(t=s._pendingCSS=[]);t.push(p);if(s._pollTimer){return}}s._pollTimer=null;for(l=0;l<t.length;++l){q=t[l];if(n){m=q.doc.styleSheets;k=m.length;r=q.node.href;while(--k>=0){if(m[k].href===r){t.splice(l,1);l-=1;s._progress(null,q);break}}}else{try{h=!!q.node.sheet.cssRules;t.splice(l,1);l-=1;s._progress(null,q)}catch(o){}}}if(t.length){s._pollTimer=setTimeout(function(){s._poll.call(s)},s.options.pollInterval)}},_progress:function(j,i){var h=this.options;if(j){i.error=j;this.errors.push({error:j,request:i})}i.node._yuiget_finished=i.finished=true;if(h.onProgress){h.onProgress.call(h.context||this,this._getEventData(i))}if(i.autopurge){g._autoPurge(this.options.purgethreshold);g._purgeNodes.push(i.node)}if(this._pending===i){this._pending=null}this._waiting-=1;this._next()}}},"3.5.0pr2",{requires:["yui-base"]});b.add("loader-base",function(g){if(!b.Env[g.version]){(function(){var L=g.version,H="/build/",I=L+H,G=g.Env.base,D="gallery-2012.02.01-21-35",F="2in3",E="4",C="2.9.0",J=G+"combo?",K={version:L,root:I,base:g.Env.base,comboBase:J,skin:{defaultSkin:"sam",base:"assets/skins/",path:"skin.css",after:["cssreset","cssfonts","cssgrids","cssbase","cssreset-context","cssfonts-context"]},groups:{},patterns:{}},B=K.groups,A=function(N,O){var M=F+"."+(N||E)+"/"+(O||C)+H;B.yui2.base=G+M;B.yui2.root=M},z=function(M){var N=(M||D)+H;B.gallery.base=G+N;B.gallery.root=N};B[L]={};B.gallery={ext:false,combine:true,comboBase:J,update:z,patterns:{"gallery-":{},"lang/gallery-":{},"gallerycss-":{type:"css"}}};B.yui2={combine:true,ext:false,comboBase:J,update:A,patterns:{"yui2-":{configFn:function(M){if(/-skin|reset|fonts|grids|base/.test(M.name)){M.type="css";M.path=M.path.replace(/\.js/,".css");M.path=M.path.replace(/\/yui2-skin/,"/assets/skins/sam/yui2-skin")}}}}};z();A();b.Env[L]=K}())}var i={},f=[],p=1024,d=b.Env,s=d._loaded,t="css",n="js",y="intl",v=g.version,x="",h=g.Object,u=h.each,m=g.Array,k=d._loaderQueue,w=d[v],e="skin-",l=g.Lang,q=d.mods,o,r,j=function(A,B,C,z){var D=A+"/"+B;if(!z){D+="-min"}D+="."+(C||t);return D};g.Env.meta=w;g.Loader=function(D){var C=w.modules,A=this;D=D||{};o=w.md5;A.context=g;A.base=g.Env.meta.base+g.Env.meta.root;A.comboBase=g.Env.meta.comboBase;A.combine=D.base&&(D.base.indexOf(A.comboBase.substr(0,20))>-1);A.comboSep="&";A.maxURLLength=p;A.root=g.Env.meta.root;A.timeout=0;A.forceMap={};A.allowRollup=false;A.filters={};A.required={};A.patterns={};A.moduleInfo={};A.groups=g.merge(g.Env.meta.groups);A.skin=g.merge(g.Env.meta.skin);A.conditions={};A.config=D;A._internal=true;r=d._renderedMods;if(r){u(r,function B(F,E){A.moduleInfo[E]=g.merge(F)});r=d._conditions;u(r,function z(F,E){A.conditions[E]=g.merge(F)})}else{u(C,A.addModule,A)}A.loaded=s[v];A._inspectPage();A._internal=false;A._config(D);A.forceMap=(A.force)?g.Array.hash(A.force):{};A.testresults=null;if(g.config.tests){A.testresults=g.config.tests}A.sorted=[];A.dirty=true;A.inserted={};A.skipped={};A.tested={}};g.Loader.prototype={REGEX_CSS:/\.css(?:[?;].*)?$/i,FILTER_DEFS:{RAW:{searchExp:"-min\\.js",replaceStr:".js"},DEBUG:{searchExp:"-min\\.js",replaceStr:"-debug.js"}},_inspectPage:function(){u(this.moduleInfo,function(A,z){if(A.type&&A.type===t){if(this.isCSSLoaded(A.name)){this.loaded[z]=true}}},this);u(q,function(B,A){if(B.details){var z=this.moduleInfo[A],D=B.details.requires,C=z&&z.requires;if(z){if(!z._inspected&&D&&C.length!=D.length){delete z.expanded}}else{z=this.addModule(B.details,A)}z._inspected=true}},this)},_requires:function(F,E){var B,D,G,H,z=this.moduleInfo,A=z[F],C=z[E];if(!A||!C){return false}D=A.expanded_map;G=A.after_map;if(G&&(E in G)){return true}G=C.after_map;if(G&&(F in G)){return false}H=z[E]&&z[E].supersedes;if(H){for(B=0;B<H.length;B++){if(this._requires(F,H[B])){return true}}}H=z[F]&&z[F].supersedes;if(H){for(B=0;B<H.length;B++){if(this._requires(E,H[B])){return false}}}if(D&&(E in D)){return true}if(A.ext&&A.type==t&&!C.ext&&C.type==t){return true}return false},_config:function(F){var B,A,E,C,D,G,z=this;if(F){for(B in F){if(F.hasOwnProperty(B)){E=F[B];if(B=="require"){z.require(E)}else{if(B=="skin"){if(typeof E==="string"){z.skin.defaultSkin=F.skin;E={defaultSkin:E}}g.mix(z.skin,E,true)}else{if(B=="groups"){for(A in E){if(E.hasOwnProperty(A)){G=A;D=E[A];z.addGroup(D,G)}}}else{if(B=="modules"){u(E,z.addModule,z)}else{if(B=="gallery"){this.groups.gallery.update(E)}else{if(B=="yui2"||B=="2in3"){this.groups.yui2.update(F["2in3"],F.yui2)}else{z[B]=E}}}}}}}}}C=z.filter;if(l.isString(C)){C=C.toUpperCase();z.filterName=C;z.filter=z.FILTER_DEFS[C];if(C=="DEBUG"){z.require("yui-log","dump")}}if(z.lang){z.require("intl-base","intl")}},formatSkin:function(B,z){var A=e+B;if(z){A=A+"-"+z}return A},_addSkin:function(I,G,H){var F,E,A,z,D=this.moduleInfo,B=this.skin,C=D[G]&&D[G].ext;if(G){A=this.formatSkin(I,G);if(!D[A]){F=D[G];E=F.pkg||G;z={name:A,group:F.group,type:"css",after:B.after,path:(H||E)+"/"+B.base+I+"/"+G+".css",ext:C};if(F.base){z.base=F.base}if(F.configFn){z.configFn=F.configFn}this.addModule(z,A)}}return A},addGroup:function(C,A){var B=C.modules,z=this;A=A||C.name;C.name=A;z.groups[A]=C;if(C.patterns){u(C.patterns,function(E,D){E.group=A;z.patterns[D]=E})}if(B){u(B,function(E,D){if(typeof E==="string"){E={name:D,fullpath:E}}E.group=A;z.addModule(E,D)},z)}},addModule:function(Q,X){X=X||Q.name;if(typeof Q==="string"){Q={name:X,fullpath:Q}}if(this.moduleInfo[X]&&this.moduleInfo[X].temp){Q=g.merge(this.moduleInfo[X],Q)}Q.name=X;if(!Q||!Q.name){return null}if(!Q.type){Q.type=n;var O=Q.path||Q.fullpath;if(O&&this.REGEX_CSS.test(O)){Q.type=t}}if(!Q.path&&!Q.fullpath){Q.path=j(X,X,Q.type)}Q.supersedes=Q.supersedes||Q.use;Q.ext=("ext" in Q)?Q.ext:(this._internal)?false:true;Q.requires=this.filterRequires(Q.requires)||[];var U=Q.submodules,T,R,K,z,L,B,P,A,S,M,I,F,D,C,W,V,J,E,G,H=this.conditions,N;this.moduleInfo[X]=Q;if(!Q.langPack&&Q.lang){M=m(Q.lang);for(S=0;S<M.length;S++){W=M[S];I=this.getLangPackName(W,X);B=this.moduleInfo[I];if(!B){B=this._addLangPack(W,Q,I)}}}if(U){z=Q.supersedes||[];R=0;for(T in U){if(U.hasOwnProperty(T)){L=U[T];L.path=L.path||j(X,T,Q.type);L.pkg=X;L.group=Q.group;if(L.supersedes){z=z.concat(L.supersedes)}B=this.addModule(L,T);z.push(T);if(B.skinnable){Q.skinnable=true;J=this.skin.overrides;if(J&&J[T]){for(S=0;S<J[T].length;S++){E=this._addSkin(J[T][S],T,X);z.push(E)}}E=this._addSkin(this.skin.defaultSkin,T,X);z.push(E)}if(L.lang&&L.lang.length){M=m(L.lang);for(S=0;S<M.length;S++){W=M[S];I=this.getLangPackName(W,X);F=this.getLangPackName(W,T);B=this.moduleInfo[I];if(!B){B=this._addLangPack(W,Q,I)}D=D||m.hash(B.supersedes);if(!(F in D)){B.supersedes.push(F)}Q.lang=Q.lang||[];C=C||m.hash(Q.lang);if(!(W in C)){Q.lang.push(W)}I=this.getLangPackName(x,X);F=this.getLangPackName(x,T);B=this.moduleInfo[I];if(!B){B=this._addLangPack(W,Q,I)}if(!(F in D)){B.supersedes.push(F)}}}R++}}Q.supersedes=m.dedupe(z);if(this.allowRollup){Q.rollup=(R<4)?R:Math.min(R-1,4)}}P=Q.plugins;if(P){for(T in P){if(P.hasOwnProperty(T)){A=P[T];A.pkg=X;A.path=A.path||j(X,T,Q.type);A.requires=A.requires||[];A.group=Q.group;this.addModule(A,T);if(Q.skinnable){this._addSkin(this.skin.defaultSkin,T,X)}}}}if(Q.condition){K=Q.condition.trigger;if(b.Env.aliases[K]){K=b.Env.aliases[K]}if(!g.Lang.isArray(K)){K=[K]}for(T=0;T<K.length;T++){N=K[T];G=Q.condition.when;H[N]=H[N]||{};H[N][X]=Q.condition;if(G&&G!="after"){if(G=="instead"){Q.supersedes=Q.supersedes||[];Q.supersedes.push(N)}else{}}else{Q.after=Q.after||[];Q.after.push(N)}}}if(Q.supersedes){Q.supersedes=this.filterRequires(Q.supersedes)}if(Q.after){Q.after=this.filterRequires(Q.after);Q.after_map=m.hash(Q.after)}if(Q.configFn){V=Q.configFn(Q);if(V===false){delete this.moduleInfo[X];delete d._renderedMods[X];Q=null}}if(Q){if(!d._renderedMods){d._renderedMods={}}d._renderedMods[X]=g.merge(Q);d._conditions=H}return Q},require:function(A){var z=(typeof A==="string")?m(arguments):A;this.dirty=true;this.required=g.merge(this.required,m.hash(this.filterRequires(z)));this._explodeRollups()},_explodeRollups:function(){var A=this,z,B=A.required;if(!A.allowRollup){u(B,function(C,D){z=A.getModule(D);if(z&&z.use){m.each(z.use,function(E){z=A.getModule(E);if(z&&z.use){m.each(z.use,function(F){B[F]=true})}else{B[E]=true}})}});A.required=B}},filterRequires:function(C){if(C){if(!g.Lang.isArray(C)){C=[C]}C=g.Array(C);var E=[],B,A,D,z;for(B=0;B<C.length;B++){A=this.getModule(C[B]);if(A&&A.use){for(D=0;D<A.use.length;D++){z=this.getModule(A.use[D]);if(z&&z.use){E=g.Array.dedupe([].concat(E,this.filterRequires(z.use)))}else{E.push(A.use[D])}}}else{E.push(C[B])}}C=E}return C},getRequires:function(U){if(!U){return f}if(U._parsed){return U.expanded||f}var O,K,N,G,F,W,D=this.testresults,X=U.name,E,V=q[X]&&q[X].details,Q,L,z,H,R,I,C,S,T,B,J=U.lang||U.intl,P=this.moduleInfo,M=g.Features&&g.Features.tests.load,A;if(U.temp&&V){R=U;U=this.addModule(V,X);U.group=R.group;U.pkg=R.pkg;delete U.expanded}if(U.expanded&&(!this.lang||U.langCache===this.lang)){return U.expanded}Q=[];A={};H=this.filterRequires(U.requires);if(U.lang){Q.unshift("intl");H.unshift("intl");J=true}I=this.filterRequires(U.optional);U._parsed=true;U.langCache=this.lang;for(O=0;O<H.length;O++){if(!A[H[O]]){Q.push(H[O]);A[H[O]]=true;K=this.getModule(H[O]);if(K){G=this.getRequires(K);J=J||(K.expanded_map&&(y in K.expanded_map));for(N=0;N<G.length;N++){Q.push(G[N])}}}}H=this.filterRequires(U.supersedes);if(H){for(O=0;O<H.length;O++){if(!A[H[O]]){if(U.submodules){Q.push(H[O])}A[H[O]]=true;K=this.getModule(H[O]);if(K){G=this.getRequires(K);J=J||(K.expanded_map&&(y in K.expanded_map));for(N=0;N<G.length;N++){Q.push(G[N])}}}}}if(I&&this.loadOptional){for(O=0;O<I.length;O++){if(!A[I[O]]){Q.push(I[O]);A[I[O]]=true;K=P[I[O]];if(K){G=this.getRequires(K);J=J||(K.expanded_map&&(y in K.expanded_map));for(N=0;N<G.length;N++){Q.push(G[N])}}}}}E=this.conditions[X];if(E){U._parsed=false;if(D&&M){u(D,function(Y,aa){var Z=M[aa].name;if(!A[Z]&&M[aa].trigger==X){if(Y&&M[aa]){A[Z]=true;Q.push(Z)}}})}else{u(E,function(aa,Z){if(!A[Z]){var Y=aa&&((!aa.ua&&!aa.test)||(aa.ua&&g.UA[aa.ua])||(aa.test&&aa.test(g,H)));if(Y){A[Z]=true;Q.push(Z);K=this.getModule(Z);if(K){G=this.getRequires(K);for(N=0;N<G.length;N++){Q.push(G[N])}}}}},this)}}if(U.skinnable){S=this.skin.overrides;u(b.Env.aliases,function(Y,Z){if(g.Array.indexOf(Y,X)>-1){T=Z}});if(S&&(S[X]||(T&&S[T]))){B=X;if(S[T]){B=T}for(O=0;O<S[B].length;O++){C=this._addSkin(S[B][O],X);if(!this.isCSSLoaded(C,this._boot)){Q.push(C)}}}else{C=this._addSkin(this.skin.defaultSkin,X);if(!this.isCSSLoaded(C,this._boot)){Q.push(C)}}}U._parsed=false;if(J){if(U.lang&&!U.langPack&&g.Intl){W=g.Intl.lookupBestLang(this.lang||x,U.lang);F=this.getLangPackName(W,X);if(F){Q.unshift(F)}}Q.unshift(y)}U.expanded_map=m.hash(Q);U.expanded=h.keys(U.expanded_map);return U.expanded},isCSSLoaded:function(A,D){if(!A||!b.Env.cssStampEl||(!D&&this.ignoreRegistered)){return false}var C=b.Env.cssStampEl,z=false,B=C.currentStyle;C.className=A;if(!B){B=g.config.doc.defaultView.getComputedStyle(C,null)}if(B.display==="none"){z=true}C.className="";return z},getProvides:function(A){var z=this.getModule(A),C,B;if(!z){return i}if(z&&!z.provides){C={};B=z.supersedes;if(B){m.each(B,function(D){g.mix(C,this.getProvides(D))},this)}C[A]=true;z.provides=C}return z.provides},calculate:function(A,z){if(A||z||this.dirty){if(A){this._config(A)}if(!this._init){this._setup()}this._explode();if(this.allowRollup){this._rollup()}else{this._explodeRollups()}this._reduce();this._sort()}},_addLangPack:function(F,z,E){var C=z.name,A,B,D=this.moduleInfo[E];if(!D){A=j((z.pkg||C),E,n,true);B={path:A,intl:true,langPack:true,ext:z.ext,group:z.group,supersedes:[]};if(z.configFn){B.configFn=z.configFn}this.addModule(B,E);if(F){g.Env.lang=g.Env.lang||{};g.Env.lang[F]=g.Env.lang[F]||{};g.Env.lang[F][C]=true}}return this.moduleInfo[E]},_setup:function(){var F=this.moduleInfo,C,D,B,z,A,E;for(C in F){if(F.hasOwnProperty(C)){z=F[C];if(z){z.requires=m.dedupe(z.requires);if(z.lang&&z.lang.length){E=this.getLangPackName(x,C);this._addLangPack(null,z,E)}}}}A={};if(!this.ignoreRegistered){g.mix(A,d.mods)}if(this.ignore){g.mix(A,m.hash(this.ignore))}for(B in A){if(A.hasOwnProperty(B)){g.mix(A,this.getProvides(B))}}if(this.force){for(D=0;D<this.force.length;D++){if(this.force[D] in A){delete A[this.force[D]]}}}g.mix(this.loaded,A);this._init=true},getLangPackName:function(A,z){return("lang/"+z+((A)?"_"+A:""))},_explode:function(){var D=this.required,z,C,A={},B=this;B.dirty=false;B._explodeRollups();D=B.required;u(D,function(E,F){if(!A[F]){A[F]=true;z=B.getModule(F);if(z){var G=z.expound;if(G){D[G]=B.getModule(G);C=B.getRequires(D[G]);g.mix(D,m.hash(C))}C=B.getRequires(z);g.mix(D,m.hash(C))}}})},getModule:function(E){if(!E){return null}var D,C,A,z=this.moduleInfo[E],B=this.patterns;if(!z){for(A in B){if(B.hasOwnProperty(A)){D=B[A];if(!D.test){D.test=function(G,F){return(G.indexOf(F)>-1)}}if(D.test(E,A)){C=D;break}}}if(C){if(D.action){D.action.call(this,E,A)}else{z=this.addModule(g.merge(C),E);z.temp=true}}}return z},_rollup:function(){},_reduce:function(E){E=E||this.required;var B,A,D,z,C=this.loadType,F=this.ignore?m.hash(this.ignore):false;for(B in E){if(E.hasOwnProperty(B)){z=this.getModule(B);if(((this.loaded[B]||q[B])&&!this.forceMap[B]&&!this.ignoreRegistered)||(C&&z&&z.type!=C)){delete E[B]}if(F&&F[B]){delete E[B]}D=z&&z.supersedes;if(D){for(A=0;A<D.length;A++){if(D[A] in E){delete E[D[A]]}}}}}return E},_finish:function(B,A){k.running=false;var z=this.onEnd;if(z){z.call(this.context,{msg:B,data:this.data,success:A})}this._continue()},_onSuccess:function(){var B=this,A=g.merge(B.skipped),D,z=[],C=B.requireRegistration,F,E;u(A,function(G){delete B.inserted[G]});B.skipped={};u(B.inserted,function(H,G){var I=B.getModule(G);if(I&&C&&I.type==n&&!(G in b.Env.mods)){z.push(G)}else{g.mix(B.loaded,B.getProvides(G))}});D=B.onSuccess;E=(z.length)?"notregistered":"success";F=!(z.length);if(D){D.call(B.context,{msg:E,data:B.data,success:F,failed:z,skipped:A})}B._finish(E,F)},_onProgress:function(A){var z=this;if(z.onProgress){z.onProgress.call(z.context,{name:A.url,data:A.data})}},_onFailure:function(D){var B=this.onFailure,C=[],A=0,z=D.errors.length;for(A;A<z;A++){C.push(D.errors[A].error)}C=C.join(",");if(B){B.call(this.context,{msg:C,data:this.data,success:false})}this._finish(C,false)},_onTimeout:function(){var z=this.onTimeout;if(z){z.call(this.context,{msg:"timeout",data:this.data,success:false})}},_sort:function(){var I=h.keys(this.required),E={},z=0,B,H,G,D,C,F,A;for(;;){B=I.length;F=false;for(D=z;D<B;D++){H=I[D];for(C=D+1;C<B;C++){A=H+I[C];if(!E[A]&&this._requires(H,I[C])){G=I.splice(C,1);I.splice(D,0,G[0]);E[A]=true;F=true;break}}if(F){break}else{z++}}if(!F){break}}this.sorted=I},_insert:function(z,C,G,B){if(z){this._config(z)}if(!B){this.calculate(C)}var D=this.resolve(),H=this,F=0,E=0;if(G){D[((G===n)?t:n)]=[]}if(D.js.length){F++}if(D.css.length){F++}var A=function(M){E++;var I={},K=0,J="",L;if(M&&M.errors){for(K=0;K<M.errors.length;K++){if(M.errors[K].request){J=M.errors[K].request.url}else{J=M.errors[K]}I[J]=J}}if(M&&M.data&&M.data.length&&(M.type==="success")){for(K=0;K<M.data.length;K++){H.inserted[M.data[K].name]=true}}if(E===F){H._loading=null;if(M&&M.fn){L=M.fn;delete M.fn;L.call(H,M)}}};this._loading=true;if(!D.js.length&&!D.css.length){E=-1;A({fn:H._onSuccess});return}if(D.css.length){g.Get.css(D.css,{data:D.cssMods,attributes:H.cssAttributes,insertBefore:H.insertBefore,charset:H.charset,timeout:H.timeout,context:H,onProgress:function(I){H._onProgress.call(H,I)},onTimeout:function(I){H._onTimeout.call(H,I)},onSuccess:function(I){I.type="success";I.fn=H._onSuccess;A.call(H,I)},onFailure:function(I){I.type="failure";I.fn=H._onFailure;A.call(H,I)}})}if(D.js.length){g.Get.js(D.js,{data:D.jsMods,insertBefore:H.insertBefore,attributes:H.jsAttributes,charset:H.charset,timeout:H.timeout,autopurge:false,context:H,async:true,onProgress:function(I){H._onProgress.call(H,I)},onTimeout:function(I){H._onTimeout.call(H,I)},onSuccess:function(I){I.type="success";I.fn=H._onSuccess;A.call(H,I)},onFailure:function(I){I.type="failure";I.fn=H._onFailure;A.call(H,I)}})}},_continue:function(){if(!(k.running)&&k.size()>0){k.running=true;k.next()()}},insert:function(C,A,B){var z=this,D=g.merge(this);delete D.require;delete D.dirty;k.add(function(){z._insert(D,C,A,B)});this._continue()},loadNext:function(z){return},_filter:function(B,A,E){var D=this.filter,z=A&&(A in this.filters),C=z&&this.filters[A],F=E||(this.moduleInfo[A]?this.moduleInfo[A].group:null);if(F&&this.groups[F]&&this.groups[F].filter){C=this.groups[F].filter;z=true}if(B){if(z){D=(l.isString(C))?this.FILTER_DEFS[C.toUpperCase()]||null:C}if(D){B=B.replace(new RegExp(D.searchExp,"g"),D.replaceStr)}}return B},_url:function(B,z,A){return this._filter((A||this.base||"")+B,z)},resolve:function(A,R){var aa,Z,X,H,M,J,W,L,Q,Y,B,K,U,G,ad,I,ab,P=[],N,T,D={},S=this,z,C,ac=[],E=(S.ignoreRegistered)?{}:S.inserted,V={js:[],jsMods:[],css:[],cssMods:[]},F=S.loadType||"js";if(A){S.calculate()}R=R||S.sorted;var O=function(ae){if(ae){L=(ae.group&&S.groups[ae.group])||i;H=(ae.fullpath)?S._filter(ae.fullpath,R[Z]):S._url(ae.path,R[Z],L.base||ae.base);if(ae.attributes){H={url:H,attributes:ae.attributes}}V[ae.type].push(H);V[ae.type+"Mods"].push(ae)}else{}};aa=R.length;ad=S.comboBase;H=ad;U={};for(Z=0;Z<aa;Z++){K=ad;X=S.getModule(R[Z]);Q=X&&X.group;L=S.groups[Q];if(Q&&L){if(!L.combine||X.fullpath){O(X);continue}X.combine=true;if(L.comboBase){K=L.comboBase}if("root" in L&&l.isValue(L.root)){X.root=L.root}X.comboSep=L.comboSep||S.comboSep;X.maxURLLength=L.maxURLLength||S.maxURLLength}else{if(!S.combine){O(X);continue}}U[K]=U[K]||[];U[K].push(X)}for(Y in U){if(U.hasOwnProperty(Y)){D[Y]=D[Y]||{js:[],jsMods:[],css:[],cssMods:[]};H=Y;G=U[Y];aa=G.length;if(aa){for(Z=0;Z<aa;Z++){if(E[G[Z]]){continue}X=G[Z];if(X&&(X.combine||!X.ext)){D[Y].comboSep=X.comboSep;D[Y].group=X.group;D[Y].maxURLLength=X.maxURLLength;B=((l.isValue(X.root))?X.root:S.root)+(X.path||X.fullpath);B=S._filter(B,X.name);D[Y][X.type].push(B);D[Y][X.type+"Mods"].push(X)}else{if(G[Z]){O(G[Z])}}}}}}for(Y in D){I=Y;z=D[I].comboSep||S.comboSep;C=D[I].maxURLLength||S.maxURLLength;for(F in D[I]){if(F===n||F===t){ab=D[I][F];G=D[I][F+"Mods"];aa=ab.length;N=I+ab.join(z);T=N.length;if(C<=I.length){C=p}if(aa){if(T>C){P=[];for(R=0;R<aa;R++){P.push(ab[R]);N=I+P.join(z);if(N.length>C){X=P.pop();N=I+P.join(z);V[F].push(S._filter(N,null,D[I].group));P=[];if(X){P.push(X)}}}if(P.length){N=I+P.join(z);V[F].push(S._filter(N,null,D[I].group))}}else{V[F].push(S._filter(N,null,D[I].group))}}V[F+"Mods"]=V[F+"Mods"].concat(G)}}}D=null;return V},load:function(z){if(!z){return}var A=this,B=A.resolve(true);A.data=B;A.onEnd=function(){z.apply(A.context||A,arguments)};A.insert()}}},"3.5.0pr2",{requires:["get","features"]});b.Env.core.push("loader-base");b.Env.core.push("yui-log");b.GlobalConfig={modules:{"loader-yui3":{combine:true,requires:["loader-base"]},features:{combine:true,requires:["loader-base"]},"intl-base":{combine:true,requires:["loader-base"]}}};var c=b();window.YUILoader=c.Loader;c.Loader.expose=c.Loader.prototype.expose=function(d){b.Env.core=[].concat(b.Env.core,["loader-yui3","features","intl-base"]);if(!window.YUI){window.YUI=b}c.use("loader-yui3","features","intl-base",function(){delete b.Env._loader;delete b.Env._renderedMods;d(window.YUI)})}}());
+(function(){var b;var a={};if(typeof b!="undefined"){b._YUI=b}var b=function(){var f=0,j=this,e=arguments,d=e.length,h=function(k,i){return(k&&k.hasOwnProperty&&(k instanceof i))},g=(typeof YUI_config!=="undefined")&&YUI_config;if(!(h(j,b))){j=new b()}else{j._init();if(b.GlobalConfig){j.applyConfig(b.GlobalConfig)}if(g){j.applyConfig(g)}if(!d){j._setup()}}if(d){for(;f<d;f++){j.applyConfig(e[f])}j._setup()}j.instanceOf=h;return j};(function(){var t,e,u="3.5.0pr2",l=".",r="http://yui.yahooapis.com/",x="yui3-js-enabled",g="yui3-css-stamp",p=function(){},k=Array.prototype.slice,v={"io.xdrReady":1,"io.xdrResponse":1,"SWF.eventHandler":1},j=(typeof window!="undefined"),i=(j)?window:null,z=(j)?i.document:null,h=z&&z.documentElement,d=h&&h.className,f={},m=new Date().getTime(),q=function(D,C,B,A){if(D&&D.addEventListener){D.addEventListener(C,B,A)}else{if(D&&D.attachEvent){D.attachEvent("on"+C,B)}}},y=function(E,D,C,A){if(E&&E.removeEventListener){try{E.removeEventListener(D,C,A)}catch(B){}}else{if(E&&E.detachEvent){E.detachEvent("on"+D,C)}}},w=function(){b.Env.windowLoaded=true;b.Env.DOMReady=true;if(j){y(window,"load",w)}},n=function(C,B){var A=C.Env._loader;if(A){A.ignoreRegistered=false;A.onEnd=null;A.data=null;A.required=[];A.loadType=null}else{A=new C.Loader(C.config);C.Env._loader=A}b.Env.core=C.Array.dedupe([].concat(b.Env.core,["loader-base","loader-rollup","loader-yui3"]));return A},s=function(C,B){for(var A in B){if(B.hasOwnProperty(A)){C[A]=B[A]}}},o={success:true};if(h&&d.indexOf(x)==-1){if(d){d+=" "}d+=x;h.className=d}if(u.indexOf("@")>-1){u="3.5.0"}t={applyConfig:function(H){H=H||p;var C,F,E=this.config,G=E.modules,B=E.groups,D=E.aliases,A=this.Env._loader;for(F in H){if(H.hasOwnProperty(F)){C=H[F];if(G&&F=="modules"){s(G,C)}else{if(D&&F=="aliases"){s(D,C)}else{if(B&&F=="groups"){s(B,C)}else{if(F=="win"){E[F]=(C&&C.contentWindow)||C;E.doc=E[F]?E[F].document:null}else{if(F=="_yuid"){}else{E[F]=C}}}}}}}if(A){A._config(H)}},_config:function(A){this.applyConfig(A)},_init:function(){var D,C,E=this,A=b.Env,B=E.Env,F;E.version=u;if(!B){E.Env={core:["get","intl-base"],mods:{},versions:{},base:r,cdn:r+u+"/build/",_idx:0,_used:{},_attached:{},_missed:[],_yidx:0,_uidx:0,_guidp:"y",_loaded:{},_BASE_RE:/(?:\?(?:[^&]*&)*([^&]*))?\b(simpleyui|yui(?:-\w+)?)\/\2(?:-(min|debug))?\.js/,parseBasePath:function(K,I){var G=K.match(I),J,H;if(G){J=RegExp.leftContext||K.slice(0,K.indexOf(G[0]));H=G[3];if(G[1]){J+="?"+G[1]}J={filter:H,path:J}}return J},getBase:A&&A.getBase||function(K){var I=(z&&z.getElementsByTagName("script"))||[],L=B.cdn,H,J,G,M;for(J=0,G=I.length;J<G;++J){M=I[J].src;if(M){H=E.Env.parseBasePath(M,K);if(H){D=H.filter;L=H.path;break}}}return L}};B=E.Env;B._loaded[u]={};if(A&&E!==b){B._yidx=++A._yidx;B._guidp=("yui_"+u+"_"+B._yidx+"_"+m).replace(/\./g,"_")}else{if(b._YUI){A=b._YUI.Env;B._yidx+=A._yidx;B._uidx+=A._uidx;for(F in A){if(!(F in B)){B[F]=A[F]}}delete b._YUI}}E.id=E.stamp(E);f[E.id]=E}E.constructor=b;E.config=E.config||{bootstrap:true,cacheUse:true,debug:true,doc:z,fetchCSS:true,throwFail:true,useBrowserConsole:true,useNativeES5:true,win:i};if(z&&!z.getElementById(g)){C=z.createElement("div");C.innerHTML='<div id="'+g+'" style="position: absolute !important; visibility: hidden !important"></div>';b.Env.cssStampEl=C.firstChild;h.insertBefore(b.Env.cssStampEl,h.firstChild)}E.config.lang=E.config.lang||"en-US";E.config.base=b.config.base||E.Env.getBase(E.Env._BASE_RE);if(!D||(!("mindebug").indexOf(D))){D="min"}D=(D)?"-"+D:D;E.config.loaderPath=b.config.loaderPath||"loader/loader"+D+".js"},_setup:function(F){var B,E=this,A=[],D=b.Env.mods,C=E.config.core||[].concat(b.Env.core);for(B=0;B<C.length;B++){if(D[C[B]]){A.push(C[B])}}E._attach(["yui-base"]);E._attach(A);if(E.Loader){n(E)}},applyTo:function(G,F,C){if(!(F in v)){this.log(F+": applyTo not allowed","warn","yui");return null}var B=f[G],E,A,D;if(B){E=F.split(".");A=B;for(D=0;D<E.length;D=D+1){A=A[E[D]];if(!A){this.log("applyTo not found: "+F,"warn","yui")}}return A&&A.apply(B,C)}return null},add:function(B,G,F,A){A=A||{};var E=b.Env,H={name:B,fn:G,version:F,details:A},I,D,C=E.versions;E.mods[B]=H;C[F]=C[F]||{};C[F][B]=H;for(D in f){if(f.hasOwnProperty(D)){I=f[D].Env._loader;if(I){if(!I.moduleInfo[B]||I.moduleInfo[B].temp){I.addModule(A,B)}}}}return this},_attach:function(F,Q){var J,R,P,M,A,H,C,D=b.Env.mods,K=b.Env.aliases,B=this,I,E=B.Env._loader,G=B.Env._attached,L=F.length,E,O=[];for(J=0;J<L;J++){R=F[J];P=D[R];O.push(R);if(E&&E.conditions[R]){B.Object.each(E.conditions[R],function(T){var S=T&&((T.ua&&B.UA[T.ua])||(T.test&&T.test(B)));if(S){O.push(T.name)}})}}F=O;L=F.length;for(J=0;J<L;J++){if(!G[F[J]]){R=F[J];P=D[R];if(K&&K[R]){B._attach(K[R]);continue}if(!P){if(E&&E.moduleInfo[R]){P=E.moduleInfo[R];Q=true}if(!Q&&R){if((R.indexOf("skin-")===-1)&&(R.indexOf("css")===-1)){B.Env._missed.push(R);B.Env._missed=B.Array.dedupe(B.Env._missed);B.message("NOT loaded: "+R,"warn","yui")}}}else{G[R]=true;for(I=0;I<B.Env._missed.length;I++){if(B.Env._missed[I]===R){B.message("Found: "+R+" (was reported as missing earlier)","warn","yui");B.Env._missed.splice(I,1)}}M=P.details;A=M.requires;H=M.use;C=M.after;if(A){for(I=0;I<A.length;I++){if(!G[A[I]]){if(!B._attach(A)){return false}break}}}if(C){for(I=0;I<C.length;I++){if(!G[C[I]]){if(!B._attach(C,true)){return false}break}}}if(P.fn){if(B.config.throwFail){P.fn(B,R)}else{try{P.fn(B,R)}catch(N){B.error("Attach error: "+R,N,R);return false}}}if(H){for(I=0;I<H.length;I++){if(!G[H[I]]){if(!B._attach(H)){return false}break}}}}}}return true},use:function(){var D=k.call(arguments,0),H=D[D.length-1],G=this,F=0,B=[],C,A=G.Env,E=true;if(G.Lang.isFunction(H)){D.pop()}else{H=null}if(G.Lang.isArray(D[0])){D=D[0]}if(G.config.cacheUse){while((C=D[F++])){if(!A._attached[C]){E=false;break}}if(E){if(D.length){}G._notify(H,o,D);return G}}if(G._loading){G._useQueue=G._useQueue||new G.Queue();G._useQueue.add([D,H])}else{G._use(D,function(J,I){J._notify(H,I,D)})}return G},_notify:function(D,A,B){if(!A.success&&this.config.loadErrorFn){this.config.loadErrorFn.call(this,this,D,A,B)}else{if(D){if(this.config.throwFail){D(this,A)}else{try{D(this,A)}catch(C){this.error("use callback error",C,B)}}}}},_use:function(C,E){if(!this.Array){this._attach(["yui-base"])}var R,J,S,O,B=this,T=b.Env,D=T.mods,A=B.Env,G=A._used,Q=T.aliases,N=T._loaderQueue,W=C[0],I=B.Array,U=B.config,H=U.bootstrap,P=[],L=[],V=true,F=U.fetchCSS,M=function(aa,Z){var Y=0,X=[];if(!aa.length){return}if(Q){for(Y=0;Y<aa.length;Y++){if(Q[aa[Y]]){X=[].concat(X,Q[aa[Y]])}else{X.push(aa[Y])}}aa=X}I.each(aa,function(ad){if(!Z){L.push(ad)}if(G[ad]){return}var ab=D[ad],ae,ac;if(ab){G[ad]=true;ae=ab.details.requires;ac=ab.details.use}else{if(!T._loaded[u][ad]){P.push(ad)}else{G[ad]=true}}if(ae&&ae.length){M(ae)}if(ac&&ac.length){M(ac,1)}})},K=function(ab){var Z=ab||{success:true,msg:"not dynamic"},Y,X,aa=true,ac=Z.data;B._loading=false;if(ac){X=P;P=[];L=[];M(ac);Y=P.length;if(Y){if(P.sort().join()==X.sort().join()){Y=false}}}if(Y&&ac){B._loading=true;B._use(P,function(){if(B._attach(ac)){B._notify(E,Z,ac)}})}else{if(ac){aa=B._attach(ac)}if(aa){B._notify(E,Z,C)}}if(B._useQueue&&B._useQueue.size()&&!B._loading){B._use.apply(B,B._useQueue.next())}};if(W==="*"){V=B._attach(B.Object.keys(D));if(V){K()}return B}if(D.loader&&!B.Loader){B._attach(["loader"])}if(H&&B.Loader&&C.length){J=n(B);J.require(C);J.ignoreRegistered=true;J._boot=true;J.calculate(null,(F)?null:"js");C=J.sorted;J._boot=false}M(C);R=P.length;if(R){P=B.Object.keys(I.hash(P));R=P.length}if(H&&R&&B.Loader){B._loading=true;J=n(B);J.onEnd=K;J.context=B;J.data=C;J.ignoreRegistered=false;J.require(C);J.insert(null,(F)?null:"js")}else{if(H&&R&&B.Get&&!A.bootstrapped){B._loading=true;S=function(){B._loading=false;N.running=false;A.bootstrapped=true;T._bootstrapping=false;if(B._attach(["loader"])){B._use(C,E)}};if(T._bootstrapping){N.add(S)}else{T._bootstrapping=true;B.Get.script(U.base+U.loaderPath,{onEnd:S})}}else{V=B._attach(C);if(V){K()}}}return B},namespace:function(){var B=arguments,F,D=0,C,E,A;for(;D<B.length;D++){F=this;A=B[D];if(A.indexOf(l)>-1){E=A.split(l);for(C=(E[0]=="YAHOO")?1:0;C<E.length;C++){F[E[C]]=F[E[C]]||{};F=F[E[C]]}}else{F[A]=F[A]||{};F=F[A]}}return F},log:p,message:p,dump:function(A){return""+A},error:function(E,B,D){var C=this,A;if(C.config.errorFn){A=C.config.errorFn.apply(C,arguments)}if(!A){throw (B||new Error(E))}else{C.message(E,"error",""+D)}return C},guid:function(A){var B=this.Env._guidp+"_"+(++this.Env._uidx);return(A)?(A+B):B},stamp:function(C,D){var A;if(!C){return C}if(C.uniqueID&&C.nodeType&&C.nodeType!==9){A=C.uniqueID}else{A=(typeof C==="string")?C:C._yuid}if(!A){A=this.guid();if(!D){try{C._yuid=A}catch(B){A=null}}}return A},destroy:function(){var A=this;if(A.Event){A.Event._unload()}delete f[A.id];delete A.Env;delete A.config}};b.prototype=t;for(e in t){if(t.hasOwnProperty(e)){b[e]=t[e]}}b.applyConfig=function(A){if(!A){return}if(b.GlobalConfig){this.prototype.applyConfig.call(this,b.GlobalConfig)}this.prototype.applyConfig.call(this,A);b.GlobalConfig=this.config};b._init();if(j){q(window,"load",w)}else{w()}b.Env.add=q;b.Env.remove=y;if(typeof a=="object"){a.YUI=b}}());b.add("yui-base",function(e){var l=e.Lang||(e.Lang={}),q=String.prototype,n=Object.prototype.toString,d={"undefined":"undefined",number:"number","boolean":"boolean",string:"string","[object Function]":"function","[object RegExp]":"regexp","[object Array]":"array","[object Date]":"date","[object Error]":"error"},f=/\{\s*([^|}]+?)\s*(?:\|([^}]*))?\s*\}/g,u=/^\s+|\s+$/g,h=/\{\s*\[(?:native code|function)\]\s*\}/i;l._isNative=function(y){return !!(e.config.useNativeES5&&y&&h.test(y))};l.isArray=l._isNative(Array.isArray)?Array.isArray:function(y){return l.type(y)==="array"};l.isBoolean=function(y){return typeof y==="boolean"};l.isDate=function(y){return l.type(y)==="date"&&y.toString()!=="Invalid Date"&&!isNaN(y)};l.isFunction=function(y){return l.type(y)==="function"};l.isNull=function(y){return y===null};l.isNumber=function(y){return typeof y==="number"&&isFinite(y)};l.isObject=function(A,z){var y=typeof A;return(A&&(y==="object"||(!z&&(y==="function"||l.isFunction(A)))))||false};l.isString=function(y){return typeof y==="string"};l.isUndefined=function(y){return typeof y==="undefined"};l.isValue=function(z){var y=l.type(z);switch(y){case"number":return isFinite(z);case"null":case"undefined":return false;default:return !!y}};l.now=Date.now||function(){return new Date().getTime()};l.sub=function(y,z){return y.replace?y.replace(f,function(A,B){return l.isUndefined(z[B])?A:z[B]}):y};l.trim=q.trim?function(y){return y&&y.trim?y.trim():y}:function(y){try{return y.replace(u,"")}catch(z){return y}};l.trimLeft=q.trimLeft?function(y){return y.trimLeft()}:function(y){return y.replace(/^\s+/,"")};l.trimRight=q.trimRight?function(y){return y.trimRight()}:function(y){return y.replace(/\s+$/,"")};l.type=function(y){return d[typeof y]||d[n.call(y)]||(y?"object":"null")};var i=e.Lang,t=Array.prototype,r=Object.prototype.hasOwnProperty;function m(A,D,C){var z,y;D||(D=0);if(C||m.test(A)){try{return t.slice.call(A,D)}catch(B){y=[];for(z=A.length;D<z;++D){y.push(A[D])}return y}}return[A]}e.Array=m;m.dedupe=function(D){var C={},A=[],z,B,y;for(z=0,y=D.length;z<y;++z){B=D[z];if(!r.call(C,B)){C[B]=1;A.push(B)}}return A};m.each=m.forEach=i._isNative(t.forEach)?function(A,y,z){t.forEach.call(A||[],y,z||e);return e}:function(C,A,B){for(var z=0,y=(C&&C.length)||0;z<y;++z){if(z in C){A.call(B||e,C[z],z,C)}}return e};m.hash=function(B,z){var C={},D=(z&&z.length)||0,A,y;for(A=0,y=B.length;A<y;++A){if(A in B){C[B[A]]=D>A&&A in z?z[A]:true}}return C};m.indexOf=i._isNative(t.indexOf)?function(A,y,z){return t.indexOf.call(A,y,z)}:function(B,z,A){var y=B.length;A=+A||0;A=(A>0||-1)*Math.floor(Math.abs(A));if(A<0){A+=y;if(A<0){A=0}}for(;A<y;++A){if(A in B&&B[A]===z){return A}}return -1};m.numericSort=function(z,y){return z-y};m.some=i._isNative(t.some)?function(A,y,z){return t.some.call(A,y,z)}:function(C,A,B){for(var z=0,y=C.length;z<y;++z){if(z in C&&A.call(B,C[z],z,C)){return true}}return false};m.test=function(A){var y=0;if(i.isArray(A)){y=1}else{if(i.isObject(A)){try{if("length" in A&&!A.tagName&&!A.alert&&!A.apply){y=2}}catch(z){}}}return y};function w(){this._init();this.add.apply(this,arguments)}w.prototype={_init:function(){this._q=[]},next:function(){return this._q.shift()},last:function(){return this._q.pop()},add:function(){this._q.push.apply(this._q,arguments);return this},size:function(){return this._q.length}};e.Queue=w;b.Env._loaderQueue=b.Env._loaderQueue||new w();var p="__",r=Object.prototype.hasOwnProperty,o=e.Lang.isObject;e.cached=function(A,y,z){y||(y={});return function(B){var C=arguments.length>1?Array.prototype.join.call(arguments,p):String(B);if(!(C in y)||(z&&y[C]==z)){y[C]=A.apply(A,arguments)}return y[C]}};e.getLocation=function(){var y=e.config.win;return y&&y.location};e.merge=function(){var A=arguments,B=0,z=A.length,y={};for(;B<z;++B){e.mix(y,A[B],true)}return y};e.mix=function(y,z,F,A,C,G){var D,J,I,B,K,E,H;if(!y||!z){return y||e}if(C){if(C===2){e.mix(y.prototype,z.prototype,F,A,0,G)}I=C===1||C===3?z.prototype:z;H=C===1||C===4?y.prototype:y;if(!I||!H){return y}}else{I=z;H=y}D=F&&!G;if(A){for(B=0,E=A.length;B<E;++B){K=A[B];if(!r.call(I,K)){continue}J=D?false:K in H;if(G&&J&&o(H[K],true)&&o(I[K],true)){e.mix(H[K],I[K],F,null,0,G)}else{if(F||!J){H[K]=I[K]}}}}else{for(K in I){if(!r.call(I,K)){continue}J=D?false:K in H;if(G&&J&&o(H[K],true)&&o(I[K],true)){e.mix(H[K],I[K],F,null,0,G)}else{if(F||!J){H[K]=I[K]}}}if(e.Object._hasEnumBug){e.mix(H,I,F,e.Object._forceEnum,C,G)}}return y};var i=e.Lang,r=Object.prototype.hasOwnProperty,x,j=e.Object=i._isNative(Object.create)?function(y){return Object.create(y)}:(function(){function y(){}return function(z){y.prototype=z;return new y()}}()),g=j._forceEnum=["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toString","toLocaleString","valueOf"],v=j._hasEnumBug=!{valueOf:0}.propertyIsEnumerable("valueOf"),s=j._hasProtoEnumBug=(function(){}).propertyIsEnumerable("prototype"),k=j.owns=function(z,y){return !!z&&r.call(z,y)};j.hasKey=k;j.keys=i._isNative(Object.keys)?Object.keys:function(C){if(!i.isObject(C)){throw new TypeError("Object.keys called on a non-object")}var B=[],A,z,y;if(s&&typeof C==="function"){for(z in C){if(k(C,z)&&z!=="prototype"){B.push(z)}}}else{for(z in C){if(k(C,z)){B.push(z)}}}if(v){for(A=0,y=g.length;A<y;++A){z=g[A];if(k(C,z)){B.push(z)}}}return B};j.values=function(C){var B=j.keys(C),A=0,y=B.length,z=[];for(;A<y;++A){z.push(C[B[A]])}return z};j.size=function(z){try{return j.keys(z).length}catch(y){return 0}};j.hasValue=function(z,y){return e.Array.indexOf(j.values(z),y)>-1};j.each=function(B,z,C,A){var y;for(y in B){if(A||k(B,y)){z.call(C||e,B[y],y,B)}}return e};j.some=function(B,z,C,A){var y;for(y in B){if(A||k(B,y)){if(z.call(C||e,B[y],y,B)){return true}}}return false};j.getValue=function(C,B){if(!i.isObject(C)){return x}var z,A=e.Array(B),y=A.length;for(z=0;C!==x&&z<y;z++){C=C[A[z]]}return C};j.setValue=function(E,C,D){var y,B=e.Array(C),A=B.length-1,z=E;if(A>=0){for(y=0;z!==x&&y<A;y++){z=z[B[y]]}if(z!==x){z[B[y]]=D}else{return x}}return E};j.isEmpty=function(y){return !j.keys(Object(y)).length};b.Env.parseUA=function(E){var D=function(H){var I=0;return parseFloat(H.replace(/\./g,function(){return(I++==1)?"":"."}))},G=e.config.win,y=G&&G.navigator,B={ie:0,opera:0,gecko:0,webkit:0,safari:0,chrome:0,mobile:null,air:0,phantomjs:0,air:0,ipad:0,iphone:0,ipod:0,ios:null,android:0,silk:0,accel:false,webos:0,caja:y&&y.cajaVersion,secure:false,os:null,nodejs:0},z=E||y&&y.userAgent,F=G&&G.location,A=F&&F.href,C;B.userAgent=z;B.secure=A&&(A.toLowerCase().indexOf("https")===0);if(z){if((/windows|win32/i).test(z)){B.os="windows"}else{if((/macintosh|mac_powerpc/i).test(z)){B.os="macintosh"}else{if((/android/i).test(z)){B.os="android"}else{if((/symbos/i).test(z)){B.os="symbos"}else{if((/linux/i).test(z)){B.os="linux"}else{if((/rhino/i).test(z)){B.os="rhino"}}}}}}if((/KHTML/).test(z)){B.webkit=1}if((/IEMobile|XBLWP7/).test(z)){B.mobile="windows"}if((/Fennec/).test(z)){B.mobile="gecko"}C=z.match(/AppleWebKit\/([^\s]*)/);if(C&&C[1]){B.webkit=D(C[1]);B.safari=B.webkit;if(/PhantomJS/.test(z)){C=z.match(/PhantomJS\/([^\s]*)/);if(C&&C[1]){B.phantomjs=D(C[1])}}if(/ Mobile\//.test(z)||(/iPad|iPod|iPhone/).test(z)){B.mobile="Apple";C=z.match(/OS ([^\s]*)/);if(C&&C[1]){C=D(C[1].replace("_","."))}B.ios=C;B.os="ios";B.ipad=B.ipod=B.iphone=0;C=z.match(/iPad|iPod|iPhone/);if(C&&C[0]){B[C[0].toLowerCase()]=B.ios}}else{C=z.match(/NokiaN[^\/]*|webOS\/\d\.\d/);if(C){B.mobile=C[0]}if(/webOS/.test(z)){B.mobile="WebOS";C=z.match(/webOS\/([^\s]*);/);if(C&&C[1]){B.webos=D(C[1])}}if(/ Android/.test(z)){if(/Mobile/.test(z)){B.mobile="Android"}C=z.match(/Android ([^\s]*);/);if(C&&C[1]){B.android=D(C[1])}}if(/Silk/.test(z)){C=z.match(/Silk\/([^\s]*)\)/);if(C&&C[1]){B.silk=D(C[1])}if(!B.android){B.android=2.34;B.os="Android"}if(/Accelerated=true/.test(z)){B.accel=true}}}C=z.match(/(Chrome|CrMo)\/([^\s]*)/);if(C&&C[1]&&C[2]){B.chrome=D(C[2]);B.safari=0;if(C[1]==="CrMo"){B.mobile="chrome"}}else{C=z.match(/AdobeAIR\/([^\s]*)/);if(C){B.air=C[0]}}}if(!B.webkit){if(/Opera/.test(z)){C=z.match(/Opera[\s\/]([^\s]*)/);if(C&&C[1]){B.opera=D(C[1])}C=z.match(/Version\/([^\s]*)/);if(C&&C[1]){B.opera=D(C[1])}if(/Opera Mobi/.test(z)){B.mobile="opera";C=z.replace("Opera Mobi","").match(/Opera ([^\s]*)/);if(C&&C[1]){B.opera=D(C[1])}}C=z.match(/Opera Mini[^;]*/);if(C){B.mobile=C[0]}}else{C=z.match(/MSIE\s([^;]*)/);if(C&&C[1]){B.ie=D(C[1])}else{C=z.match(/Gecko\/([^\s]*)/);if(C){B.gecko=1;C=z.match(/rv:([^\s\)]*)/);if(C&&C[1]){B.gecko=D(C[1])}}}}}}if(!E){if(typeof process=="object"){if(process.versions&&process.versions.node){B.os=process.platform;B.nodejs=D(process.versions.node)}}b.Env.UA=B}return B};e.UA=b.Env.UA||b.Env.parseUA();e.UA.compareVersions=function(A,z){var F,E,C,D,B,y;if(A===z){return 0}E=(A+"").split(".");D=(z+"").split(".");for(B=0,y=Math.max(E.length,D.length);B<y;++B){F=parseInt(E[B],10);C=parseInt(D[B],10);isNaN(F)&&(F=0);isNaN(C)&&(C=0);if(F<C){return -1}if(F>C){return 1}}return 0};b.Env.aliases={anim:["anim-base","anim-color","anim-curve","anim-easing","anim-node-plugin","anim-scroll","anim-xy"],app:["app-base","app-transitions","model","model-list","router","view"],attribute:["attribute-base","attribute-complex"],autocomplete:["autocomplete-base","autocomplete-sources","autocomplete-list","autocomplete-plugin"],base:["base-base","base-pluginhost","base-build"],cache:["cache-base","cache-offline","cache-plugin"],collection:["array-extras","arraylist","arraylist-add","arraylist-filter","array-invoke"],controller:["router"],dataschema:["dataschema-base","dataschema-json","dataschema-xml","dataschema-array","dataschema-text"],datasource:["datasource-local","datasource-io","datasource-get","datasource-function","datasource-cache","datasource-jsonschema","datasource-xmlschema","datasource-arrayschema","datasource-textschema","datasource-polling"],datatable:["datatable-core","datatable-head","datatable-body","datatable-base","datatable-column-widths","datatable-message","datatable-mutable","datatable-sort","datatable-datasource"],"datatable-deprecated":["datatable-base-deprecated","datatable-datasource-deprecated","datatable-sort-deprecated","datatable-scroll-deprecated"],datatype:["datatype-number","datatype-date","datatype-xml"],"datatype-date":["datatype-date-parse","datatype-date-format"],"datatype-number":["datatype-number-parse","datatype-number-format"],"datatype-xml":["datatype-xml-parse","datatype-xml-format"],dd:["dd-ddm-base","dd-ddm","dd-ddm-drop","dd-drag","dd-proxy","dd-constrain","dd-drop","dd-scroll","dd-delegate"],dom:["dom-base","dom-screen","dom-style","selector-native","selector"],editor:["frame","editor-selection","exec-command","editor-base","editor-para","editor-br","editor-bidi","editor-tab","createlink-base"],event:["event-base","event-delegate","event-synthetic","event-mousewheel","event-mouseenter","event-key","event-focus","event-resize","event-hover","event-outside","event-touch","event-move","event-flick","event-valuechange"],"event-custom":["event-custom-base","event-custom-complex"],"event-gestures":["event-flick","event-move"],handlebars:["handlebars-compiler"],highlight:["highlight-base","highlight-accentfold"],history:["history-base","history-hash","history-hash-ie","history-html5"],io:["io-base","io-xdr","io-form","io-upload-iframe","io-queue"],json:["json-parse","json-stringify"],loader:["loader-base","loader-rollup","loader-yui3"],node:["node-base","node-event-delegate","node-pluginhost","node-screen","node-style"],pluginhost:["pluginhost-base","pluginhost-config"],querystring:["querystring-parse","querystring-stringify"],recordset:["recordset-base","recordset-sort","recordset-filter","recordset-indexer"],resize:["resize-base","resize-proxy","resize-constrain"],slider:["slider-base","slider-value-range","clickable-rail","range-slider"],text:["text-accentfold","text-wordbreak"],widget:["widget-base","widget-htmlparser","widget-skin","widget-uievents"]}},"3.5.0pr2");b.add("get",function(g){var f=g.Lang,e,h,d;g.Get=h={cssOptions:{attributes:{rel:"stylesheet"},doc:g.config.linkDoc||g.config.doc,pollInterval:50},jsOptions:{autopurge:true,doc:g.config.scriptDoc||g.config.doc},options:{attributes:{charset:"utf-8"},purgethreshold:20},REGEX_CSS:/\.css(?:[?;].*)?$/i,REGEX_JS:/\.js(?:[?;].*)?$/i,_insertCache:{},_pending:null,_purgeNodes:[],_queue:[],abort:function(n){var k,o,l,j,m;if(!n.abort){o=n;m=this._pending;n=null;if(m&&m.transaction.id===o){n=m.transaction;this._pending=null}else{for(k=0,j=this._queue.length;k<j;++k){l=this._queue[k].transaction;if(l.id===o){n=l;this._queue.splice(k,1);break}}}}n&&n.abort()},css:function(j,i,k){return this._load("css",j,i,k)},js:function(j,i,k){return this._load("js",j,i,k)},load:function(j,i,k){return this._load(null,j,i,k)},_autoPurge:function(i){if(i&&this._purgeNodes.length>=i){this._purge(this._purgeNodes)}},_getEnv:function(){var j=g.config.doc,i=g.UA;return(this._env={async:j&&j.createElement("script").async===true,cssFail:i.gecko>=9||i.compareVersions(i.webkit,535.24)>=0,cssLoad:((!i.gecko&&!i.webkit)||i.gecko>=9||i.compareVersions(i.webkit,535.24)>=0)&&!(i.chrome&&i.chrome<=18),preservesScriptOrder:!!(i.gecko||i.opera)})},_getTransaction:function(o,l){var p=[],m,j,n,k;if(!f.isArray(o)){o=[o]}l=g.merge(this.options,l);l.attributes=g.merge(this.options.attributes,l.attributes);for(m=0,j=o.length;m<j;++m){k=o[m];n={attributes:{}};if(typeof k==="string"){n.url=k}else{if(k.url){g.mix(n,k,false,null,0,true);k=k.url}else{continue}}g.mix(n,l,false,null,0,true);if(!n.type){if(this.REGEX_CSS.test(k)){n.type="css"}else{if(!this.REGEX_JS.test(k)){}n.type="js"}}g.mix(n,n.type==="js"?this.jsOptions:this.cssOptions,false,null,0,true);n.attributes.id||(n.attributes.id=g.guid());if(n.win){n.doc=n.win.document}else{n.win=n.doc.defaultView||n.doc.parentWindow}if(n.charset){n.attributes.charset=n.charset}p.push(n)}return new d(p,l)},_load:function(j,k,i,m){var l;if(typeof i==="function"){m=i;i={}}i||(i={});i.type=j;if(!this._env){this._getEnv()}l=this._getTransaction(k,i);this._queue.push({callback:m,transaction:l});this._next();return l},_next:function(){var i;if(this._pending){return}i=this._queue.shift();if(i){this._pending=i;i.transaction.execute(function(){i.callback&&i.callback.apply(this,arguments);h._pending=null;h._next()})}},_purge:function(i){var k=this._purgeNodes,m=i!==k,j,l;while(l=i.pop()){if(!l._yuiget_finished){continue}l.parentNode&&l.parentNode.removeChild(l);if(m){j=g.Array.indexOf(k,l);if(j>-1){k.splice(j,1)}}}}};h.script=h.js;h.Transaction=d=function(k,j){var i=this;i.id=d._lastId+=1;i.data=j.data;i.errors=[];i.nodes=[];i.options=j;i.requests=k;i._callbacks=[];i._queue=[];i._waiting=0;i.tId=i.id;i.win=j.win||g.config.win};d._lastId=0;d.prototype={_state:"new",abort:function(i){this._pending=null;this._pendingCSS=null;this._pollTimer=clearTimeout(this._pollTimer);this._queue=[];this._waiting=0;this.errors.push({error:i||"Aborted"});this._finish()},execute:function(q){var l=this,p=l.requests,o=l._state,m,k,j,n;if(o==="done"){q&&q(l.errors.length?l.errors:null,l);return}else{q&&l._callbacks.push(q);if(o==="executing"){return}}l._state="executing";l._queue=j=[];if(l.options.timeout){l._timeout=setTimeout(function(){l.abort("Timeout")},l.options.timeout)}for(m=0,k=p.length;m<k;++m){n=l.requests[m];if(n.async||n.type==="css"){l._insert(n)}else{j.push(n)}}l._next()},purge:function(){h._purge(this.nodes)},_createNode:function(k,j,m){var l=m.createElement(k),i,n;if(!e){n=m.createElement("div");n.setAttribute("class","a");e=n.className==="a"?{}:{"for":"htmlFor","class":"className"}}for(i in j){if(j.hasOwnProperty(i)){l.setAttribute(e[i]||i,j[i])}}return l},_finish:function(){var o=this.errors.length?this.errors:null,k=this.options,n=k.context||this,m,l,j;if(this._state==="done"){return}this._state="done";for(l=0,j=this._callbacks.length;l<j;++l){this._callbacks[l].call(n,o,this)}m=this._getEventData();if(o){if(k.onTimeout&&o[o.length-1].error==="Timeout"){k.onTimeout.call(n,m)}if(k.onFailure){k.onFailure.call(n,m)}}else{if(k.onSuccess){k.onSuccess.call(n,m)}}if(k.onEnd){k.onEnd.call(n,m)}},_getEventData:function(i){if(i){return g.merge(this,{abort:this.abort,purge:this.purge,request:i,url:i.url,win:i.win})}else{return this}},_getInsertBefore:function(m){var n=m.doc,k=m.insertBefore,j,l,i;if(k){return typeof k==="string"?n.getElementById(k):k}j=h._insertCache;i=g.stamp(n);if((k=j[i])){return k}if((k=n.getElementsByTagName("base")[0])){return(j[i]=k)}k=n.head||n.getElementsByTagName("head")[0];if(k){k.appendChild(n.createTextNode(""));return(j[i]=k.lastChild)}return(j[i]=n.getElementsByTagName("script")[0])},_insert:function(r){var o=h._env,p=this._getInsertBefore(r),l=r.type==="js",k=r.node,s=this,j=g.UA,i,m;if(!k){if(l){m="script"}else{if(!o.cssLoad&&j.gecko){m="style"}else{m="link"}}k=r.node=this._createNode(m,r.attributes,r.doc)}function n(){s._progress("Failed to load "+r.url,r)}function q(){if(i){clearTimeout(i)}s._progress(null,r)}if(l){k.setAttribute("src",r.url);if(r.async){k.async=true}else{if(o.async){k.async=false}if(!o.preservesScriptOrder){this._pending=r}}}else{if(!o.cssLoad&&j.gecko){k.innerHTML=(r.attributes.charset?'@charset "'+r.attributes.charset+'";':"")+'@import "'+r.url+'";'}else{k.setAttribute("href",r.url)}}if(l&&j.ie&&j.ie<9){k.onreadystatechange=function(){if(/loaded|complete/.test(k.readyState)){k.onreadystatechange=null;q()}}}else{if(!l&&!o.cssLoad){this._poll(r)}else{k.onerror=n;k.onload=q;if(!o.cssFail&&!l){i=setTimeout(n,r.timeout||3000)}}}this._waiting+=1;this.nodes.push(k);p.parentNode.insertBefore(k,p)},_next:function(){if(this._pending){return}if(this._queue.length){this._insert(this._queue.shift())}else{if(!this._waiting){this._finish()}}},_poll:function(q){var t=this,u=t._pendingCSS,o=g.UA.webkit,m,k,l,s,r,n;if(q){u||(u=t._pendingCSS=[]);u.push(q);if(t._pollTimer){return}}t._pollTimer=null;for(m=0;m<u.length;++m){r=u[m];if(o){n=r.doc.styleSheets;l=n.length;s=r.node.href;while(--l>=0){if(n[l].href===s){u.splice(m,1);m-=1;t._progress(null,r);break}}}else{try{k=!!r.node.sheet.cssRules;u.splice(m,1);m-=1;t._progress(null,r)}catch(p){}}}if(u.length){t._pollTimer=setTimeout(function(){t._poll.call(t)},t.options.pollInterval)}},_progress:function(k,j){var i=this.options;if(k){j.error=k;this.errors.push({error:k,request:j})}j.node._yuiget_finished=j.finished=true;if(i.onProgress){i.onProgress.call(i.context||this,this._getEventData(j))}if(j.autopurge){h._autoPurge(this.options.purgethreshold);h._purgeNodes.push(j.node)}if(this._pending===j){this._pending=null}this._waiting-=1;this._next()}}},"3.5.0pr2",{requires:["yui-base"]});b.add("loader-base",function(g){if(!b.Env[g.version]){(function(){var M=g.version,I="/build/",J=M+I,H=g.Env.base,E="gallery-2012.05.02-20-10",G="2in3",F="4",D="2.9.0",K=H+"combo?",L={version:M,root:J,base:g.Env.base,comboBase:K,skin:{defaultSkin:"sam",base:"assets/skins/",path:"skin.css",after:["cssreset","cssfonts","cssgrids","cssbase","cssreset-context","cssfonts-context"]},groups:{},patterns:{}},C=L.groups,B=function(O,S,P){var N=G+"."+(O||F)+"/"+(S||D)+I,Q=(P&&P.base)?P.base:H,R=(P&&P.comboBase)?P.comboBase:K;C.yui2.base=Q+N;C.yui2.root=N;C.yui2.comboBase=R},A=function(N,P){var O=(N||E)+I,Q=(P&&P.base)?P.base:H,R=(P&&P.comboBase)?P.comboBase:K;C.gallery.base=Q+O;C.gallery.root=O;C.gallery.comboBase=R};C[M]={};C.gallery={ext:false,combine:true,comboBase:K,update:A,patterns:{"gallery-":{},"lang/gallery-":{},"gallerycss-":{type:"css"}}};C.yui2={combine:true,ext:false,comboBase:K,update:B,patterns:{"yui2-":{configFn:function(N){if(/-skin|reset|fonts|grids|base/.test(N.name)){N.type="css";N.path=N.path.replace(/\.js/,".css");N.path=N.path.replace(/\/yui2-skin/,"/assets/skins/sam/yui2-skin")}}}}};A();B();b.Env[M]=L}())}var i={},f=[],q=1024,d=b.Env,t=d._loaded,u="css",o="js",z="intl",l="sam",w=g.version,y="",h=g.Object,v=h.each,n=g.Array,k=d._loaderQueue,x=d[w],e="skin-",m=g.Lang,r=d.mods,p,s,j=function(B,C,D,A){var E=B+"/"+C;if(!A){E+="-min"}E+="."+(D||u);return E};g.Env.meta=x;g.Loader=function(E){var D=x.modules,B=this;E=E||{};p=x.md5;B.context=g;B.base=g.Env.meta.base+g.Env.meta.root;B.comboBase=g.Env.meta.comboBase;B.combine=E.base&&(E.base.indexOf(B.comboBase.substr(0,20))>-1);B.comboSep="&";B.maxURLLength=q;B.root=g.Env.meta.root;B.timeout=0;B.forceMap={};B.allowRollup=false;B.filters={};B.required={};B.patterns={};B.moduleInfo={};B.groups=g.merge(g.Env.meta.groups);B.skin=g.merge(g.Env.meta.skin);B.conditions={};B.config=E;B._internal=true;s=d._renderedMods;if(s){v(s,function C(G,F){B.moduleInfo[F]=g.merge(G)});s=d._conditions;v(s,function A(G,F){B.conditions[F]=g.merge(G)})}else{v(D,B.addModule,B)}B.loaded=t[w];B.async=true;B._inspectPage();B._internal=false;B._config(E);B.forceMap=(B.force)?g.Array.hash(B.force):{};B.testresults=null;if(g.config.tests){B.testresults=g.config.tests}B.sorted=[];B.dirty=true;B.inserted={};B.skipped={};B.tested={};if(B.ignoreRegistered){B.resetModules()}};g.Loader.prototype={resetModules:function(){var A=this;v(A.moduleInfo,function(D){var B=D.name,C=(b.Env.mods[B]?b.Env.mods[B].details:null);if(C){A.moduleInfo[B]._reset=true;A.moduleInfo[B].requires=C.requires||[];A.moduleInfo[B].optional=C.optional||[];A.moduleInfo[B].supersedes=C.supercedes||[]}if(D.defaults){v(D.defaults,function(F,E){if(D[E]){D[E]=D.defaults[E]}})}if(D.skinnable){A._addSkin(A.skin.defaultSkin,D.name)}})},REGEX_CSS:/\.css(?:[?;].*)?$/i,FILTER_DEFS:{RAW:{searchExp:"-min\\.js",replaceStr:".js"},DEBUG:{searchExp:"-min\\.js",replaceStr:"-debug.js"}},_inspectPage:function(){v(this.moduleInfo,function(B,A){if(B.type&&B.type===u){if(this.isCSSLoaded(B.name)){this.loaded[A]=true}}},this);v(r,function(C,B){if(C.details){var A=this.moduleInfo[B],E=C.details.requires,D=A&&A.requires;if(A){if(!A._inspected&&E&&D.length!=E.length){delete A.expanded}}else{A=this.addModule(C.details,B)}A._inspected=true}},this)},_requires:function(G,F){var C,E,H,I,A=this.moduleInfo,B=A[G],D=A[F];if(!B||!D){return false}E=B.expanded_map;H=B.after_map;if(H&&(F in H)){return true}H=D.after_map;if(H&&(G in H)){return false}I=A[F]&&A[F].supersedes;if(I){for(C=0;C<I.length;C++){if(this._requires(G,I[C])){return true}}}I=A[G]&&A[G].supersedes;if(I){for(C=0;C<I.length;C++){if(this._requires(F,I[C])){return false}}}if(E&&(F in E)){return true}if(B.ext&&B.type==u&&!D.ext&&D.type==u){return true}return false},_config:function(G){var C,B,F,D,E,H,A=this;if(G){for(C in G){if(G.hasOwnProperty(C)){F=G[C];if(C=="require"){A.require(F)}else{if(C=="skin"){if(typeof F==="string"){A.skin.defaultSkin=G.skin;F={defaultSkin:F}}g.mix(A.skin,F,true)}else{if(C=="groups"){for(B in F){if(F.hasOwnProperty(B)){H=B;E=F[B];A.addGroup(E,H);if(E.aliases){v(E.aliases,A.addAlias,A)}}}}else{if(C=="modules"){v(F,A.addModule,A)}else{if(C==="aliases"){v(F,A.addAlias,A)}else{if(C=="gallery"){this.groups.gallery.update(F,G)}else{if(C=="yui2"||C=="2in3"){this.groups.yui2.update(G["2in3"],G.yui2,G)}else{A[C]=F}}}}}}}}}}D=A.filter;if(m.isString(D)){D=D.toUpperCase();A.filterName=D;A.filter=A.FILTER_DEFS[D];if(D=="DEBUG"){A.require("yui-log","dump")}}if(A.lang){}},formatSkin:function(C,A){var B=e+C;if(A){B=B+"-"+A}return B},_addSkin:function(J,H,I){var G,F,B,A,E=this.moduleInfo,C=this.skin,D=E[H]&&E[H].ext;if(H){B=this.formatSkin(J,H);if(!E[B]){G=E[H];F=G.pkg||H;A={skin:true,name:B,group:G.group,type:"css",after:C.after,path:(I||F)+"/"+C.base+J+"/"+H+".css",ext:D};if(G.base){A.base=G.base}if(G.configFn){A.configFn=G.configFn}this.addModule(A,B)}}return B},addAlias:function(A,B){b.Env.aliases[B]=A;this.addModule({name:B,use:A})},addGroup:function(D,B){var C=D.modules,A=this;B=B||D.name;D.name=B;A.groups[B]=D;if(D.patterns){v(D.patterns,function(F,E){F.group=B;A.patterns[E]=F})}if(C){v(C,function(F,E){if(typeof F==="string"){F={name:E,fullpath:F}}F.group=B;A.addModule(F,E)},A)}},addModule:function(R,Z){Z=Z||R.name;if(typeof R==="string"){R={name:Z,fullpath:R}}if(this.moduleInfo[Z]&&this.moduleInfo[Z].temp){R=g.merge(this.moduleInfo[Z],R)}R.name=Z;if(!R||!R.name){return null}if(!R.type){R.type=o;var P=R.path||R.fullpath;if(P&&this.REGEX_CSS.test(P)){R.type=u}}if(!R.path&&!R.fullpath){R.path=j(Z,Z,R.type)}R.supersedes=R.supersedes||R.use;R.ext=("ext" in R)?R.ext:(this._internal)?false:true;var V=R.submodules,U,S,L,A,M,C,Q,B,T,N,J,G,E,D,Y,X,K,F,H,W,I=this.conditions,O;this.moduleInfo[Z]=R;R.requires=R.requires||[];if(this.requires){for(U=0;U<this.requires.length;U++){R.requires.push(this.requires[U])}}if(R.group&&this.groups&&this.groups[R.group]){W=this.groups[R.group];if(W.requires){for(U=0;U<W.requires.length;U++){R.requires.push(W.requires[U])}}}if(!R.defaults){R.defaults={requires:R.requires?[].concat(R.requires):null,supersedes:R.supersedes?[].concat(R.supersedes):null,optional:R.optional?[].concat(R.optional):null}}if(R.skinnable&&R.ext){F=this._addSkin(this.skin.defaultSkin,Z);R.requires.unshift(F)}R.requires=this.filterRequires(R.requires)||[];if(!R.langPack&&R.lang){N=n(R.lang);for(T=0;T<N.length;T++){Y=N[T];J=this.getLangPackName(Y,Z);C=this.moduleInfo[J];if(!C){C=this._addLangPack(Y,R,J)}}}if(V){A=R.supersedes||[];S=0;for(U in V){if(V.hasOwnProperty(U)){M=V[U];M.path=M.path||j(Z,U,R.type);M.pkg=Z;M.group=R.group;if(M.supersedes){A=A.concat(M.supersedes)}C=this.addModule(M,U);A.push(U);if(C.skinnable){R.skinnable=true;K=this.skin.overrides;if(K&&K[U]){for(T=0;T<K[U].length;T++){F=this._addSkin(K[U][T],U,Z);A.push(F)}}F=this._addSkin(this.skin.defaultSkin,U,Z);A.push(F)}if(M.lang&&M.lang.length){N=n(M.lang);for(T=0;T<N.length;T++){Y=N[T];J=this.getLangPackName(Y,Z);G=this.getLangPackName(Y,U);C=this.moduleInfo[J];if(!C){C=this._addLangPack(Y,R,J)}E=E||n.hash(C.supersedes);if(!(G in E)){C.supersedes.push(G)}R.lang=R.lang||[];D=D||n.hash(R.lang);if(!(Y in D)){R.lang.push(Y)}J=this.getLangPackName(y,Z);G=this.getLangPackName(y,U);C=this.moduleInfo[J];if(!C){C=this._addLangPack(Y,R,J)}if(!(G in E)){C.supersedes.push(G)}}}S++}}R.supersedes=n.dedupe(A);if(this.allowRollup){R.rollup=(S<4)?S:Math.min(S-1,4)}}Q=R.plugins;if(Q){for(U in Q){if(Q.hasOwnProperty(U)){B=Q[U];B.pkg=Z;B.path=B.path||j(Z,U,R.type);B.requires=B.requires||[];B.group=R.group;this.addModule(B,U);if(R.skinnable){this._addSkin(this.skin.defaultSkin,U,Z)}}}}if(R.condition){L=R.condition.trigger;if(b.Env.aliases[L]){L=b.Env.aliases[L]}if(!g.Lang.isArray(L)){L=[L]}for(U=0;U<L.length;U++){O=L[U];H=R.condition.when;I[O]=I[O]||{};I[O][Z]=R.condition;if(H&&H!="after"){if(H=="instead"){R.supersedes=R.supersedes||[];R.supersedes.push(O)}else{}}else{R.after=R.after||[];R.after.push(O)}}}if(R.supersedes){R.supersedes=this.filterRequires(R.supersedes)}if(R.after){R.after=this.filterRequires(R.after);R.after_map=n.hash(R.after)}if(R.configFn){X=R.configFn(R);if(X===false){delete this.moduleInfo[Z];delete d._renderedMods[Z];R=null}}if(R){if(!d._renderedMods){d._renderedMods={}}d._renderedMods[Z]=g.merge(R);d._conditions=I}return R},require:function(B){var A=(typeof B==="string")?n(arguments):B;this.dirty=true;this.required=g.merge(this.required,n.hash(this.filterRequires(A)));this._explodeRollups()},_explodeRollups:function(){var B=this,A,C=B.required;if(!B.allowRollup){v(C,function(D,E){A=B.getModule(E);if(A&&A.use){n.each(A.use,function(F){A=B.getModule(F);if(A&&A.use){n.each(A.use,function(G){C[G]=true})}else{C[F]=true}})}});B.required=C}},filterRequires:function(D){if(D){if(!g.Lang.isArray(D)){D=[D]}D=g.Array(D);var F=[],C,B,E,A;for(C=0;C<D.length;C++){B=this.getModule(D[C]);if(B&&B.use){for(E=0;E<B.use.length;E++){A=this.getModule(B.use[E]);if(A&&A.use){F=g.Array.dedupe([].concat(F,this.filterRequires(A.use)))}else{F.push(B.use[E])}}}else{F.push(D[C])}}D=F}return D},getRequires:function(W){if(!W){return f}if(W._parsed){return W.expanded||f}var Q,M,P,I,H,Y,F=this.testresults,Z=W.name,G,X=r[Z]&&r[Z].details,S,N,A,J,T,K,E,U,V,D,L=W.lang||W.intl,R=this.moduleInfo,O=g.Features&&g.Features.tests.load,B,C;if(W.temp&&X){T=W;W=this.addModule(X,Z);W.group=T.group;W.pkg=T.pkg;delete W.expanded}C=!((!this.lang||W.langCache===this.lang)&&(W.skinCache===this.skin.defaultSkin));if(W.expanded&&!C){return W.expanded}S=[];B={};J=this.filterRequires(W.requires);if(W.lang){S.unshift("intl");J.unshift("intl");L=true}K=this.filterRequires(W.optional);W._parsed=true;W.langCache=this.lang;W.skinCache=this.skin.defaultSkin;for(Q=0;Q<J.length;Q++){if(!B[J[Q]]){S.push(J[Q]);B[J[Q]]=true;M=this.getModule(J[Q]);if(M){I=this.getRequires(M);L=L||(M.expanded_map&&(z in M.expanded_map));for(P=0;P<I.length;P++){S.push(I[P])}}}}J=this.filterRequires(W.supersedes);if(J){for(Q=0;Q<J.length;Q++){if(!B[J[Q]]){if(W.submodules){S.push(J[Q])}B[J[Q]]=true;M=this.getModule(J[Q]);if(M){I=this.getRequires(M);L=L||(M.expanded_map&&(z in M.expanded_map));for(P=0;P<I.length;P++){S.push(I[P])}}}}}if(K&&this.loadOptional){for(Q=0;Q<K.length;Q++){if(!B[K[Q]]){S.push(K[Q]);B[K[Q]]=true;M=R[K[Q]];if(M){I=this.getRequires(M);L=L||(M.expanded_map&&(z in M.expanded_map));for(P=0;P<I.length;P++){S.push(I[P])}}}}}G=this.conditions[Z];if(G){W._parsed=false;if(F&&O){v(F,function(aa,ac){var ab=O[ac].name;if(!B[ab]&&O[ac].trigger==Z){if(aa&&O[ac]){B[ab]=true;S.push(ab)}}})}else{v(G,function(ac,ab){if(!B[ab]){var aa=ac&&((!ac.ua&&!ac.test)||(ac.ua&&g.UA[ac.ua])||(ac.test&&ac.test(g,J)));if(aa){B[ab]=true;S.push(ab);M=this.getModule(ab);if(M){I=this.getRequires(M);for(P=0;P<I.length;P++){S.push(I[P])}}}}},this)}}if(W.skinnable){U=this.skin.overrides;v(b.Env.aliases,function(aa,ab){if(g.Array.indexOf(aa,Z)>-1){V=ab}});if(U&&(U[Z]||(V&&U[V]))){D=Z;if(U[V]){D=V}for(Q=0;Q<U[D].length;Q++){E=this._addSkin(U[D][Q],Z);if(!this.isCSSLoaded(E,this._boot)){S.push(E)}}}else{E=this._addSkin(this.skin.defaultSkin,Z);if(!this.isCSSLoaded(E,this._boot)){S.push(E)}}}W._parsed=false;if(L){if(W.lang&&!W.langPack&&g.Intl){Y=g.Intl.lookupBestLang(this.lang||y,W.lang);H=this.getLangPackName(Y,Z);if(H){S.unshift(H)}}S.unshift(z)}W.expanded_map=n.hash(S);W.expanded=h.keys(W.expanded_map);return W.expanded},isCSSLoaded:function(B,E){if(!B||!b.Env.cssStampEl||(!E&&this.ignoreRegistered)){return false}var D=b.Env.cssStampEl,A=false,C=D.currentStyle;D.className=B;if(!C){C=g.config.doc.defaultView.getComputedStyle(D,null)}if(C&&C.display==="none"){A=true}D.className="";return A},getProvides:function(B){var A=this.getModule(B),D,C;if(!A){return i}if(A&&!A.provides){D={};C=A.supersedes;if(C){n.each(C,function(E){g.mix(D,this.getProvides(E))},this)}D[B]=true;A.provides=D}return A.provides},calculate:function(B,A){if(B||A||this.dirty){if(B){this._config(B)}if(!this._init){this._setup()}this._explode();if(this.allowRollup){this._rollup()}else{this._explodeRollups()}this._reduce();this._sort()}},_addLangPack:function(G,A,F){var D=A.name,B,C,E=this.moduleInfo[F];if(!E){B=j((A.pkg||D),F,o,true);C={path:B,intl:true,langPack:true,ext:A.ext,group:A.group,supersedes:[]};if(A.configFn){C.configFn=A.configFn}this.addModule(C,F);if(G){g.Env.lang=g.Env.lang||{};g.Env.lang[G]=g.Env.lang[G]||{};g.Env.lang[G][D]=true}}return this.moduleInfo[F]},_setup:function(){var G=this.moduleInfo,D,E,C,A,B,F;for(D in G){if(G.hasOwnProperty(D)){A=G[D];if(A){A.requires=n.dedupe(A.requires);if(A.lang&&A.lang.length){F=this.getLangPackName(y,D);this._addLangPack(null,A,F)}}}}B={};if(!this.ignoreRegistered){g.mix(B,d.mods)}if(this.ignore){g.mix(B,n.hash(this.ignore))}for(C in B){if(B.hasOwnProperty(C)){g.mix(B,this.getProvides(C))}}if(this.force){for(E=0;E<this.force.length;E++){if(this.force[E] in B){delete B[this.force[E]]}}}g.mix(this.loaded,B);this._init=true},getLangPackName:function(B,A){return("lang/"+A+((B)?"_"+B:""))},_explode:function(){var E=this.required,A,D,B={},C=this;C.dirty=false;C._explodeRollups();E=C.required;v(E,function(F,G){if(!B[G]){B[G]=true;A=C.getModule(G);if(A){var H=A.expound;if(H){E[H]=C.getModule(H);D=C.getRequires(E[H]);g.mix(E,n.hash(D))}D=C.getRequires(A);g.mix(E,n.hash(D))}}})},_patternTest:function(B,A){return(B.indexOf(A)>-1)},getModule:function(F){if(!F){return null}var E,D,B,A=this.moduleInfo[F],C=this.patterns;if(!A){for(B in C){if(C.hasOwnProperty(B)){E=C[B];if(!E.test){E.test=this._patternTest}if(E.test(F,B)){D=E;break}}}if(D){if(E.action){E.action.call(this,F,B)}else{A=this.addModule(g.merge(D),F);A.temp=true}}}return A},_rollup:function(){},_reduce:function(F){F=F||this.required;var C,B,E,A,D=this.loadType,G=this.ignore?n.hash(this.ignore):false;for(C in F){if(F.hasOwnProperty(C)){A=this.getModule(C);if(((this.loaded[C]||r[C])&&!this.forceMap[C]&&!this.ignoreRegistered)||(D&&A&&A.type!=D)){delete F[C]}if(G&&G[C]){delete F[C]}E=A&&A.supersedes;if(E){for(B=0;B<E.length;B++){if(E[B] in F){delete F[E[B]]}}}}}return F},_finish:function(C,B){k.running=false;var A=this.onEnd;if(A){A.call(this.context,{msg:C,data:this.data,success:B})}this._continue()},_onSuccess:function(){var C=this,B=g.merge(C.skipped),E,A=[],D=C.requireRegistration,G,F;v(B,function(H){delete C.inserted[H]});C.skipped={};v(C.inserted,function(I,H){var J=C.getModule(H);if(J&&D&&J.type==o&&!(H in b.Env.mods)){A.push(H)}else{g.mix(C.loaded,C.getProvides(H))}});E=C.onSuccess;F=(A.length)?"notregistered":"success";G=!(A.length);if(E){E.call(C.context,{msg:F,data:C.data,success:G,failed:A,skipped:B})}C._finish(F,G)},_onProgress:function(B){var A=this;if(A.onProgress){A.onProgress.call(A.context,{name:B.url,data:B.data})}},_onFailure:function(E){var C=this.onFailure,D=[],B=0,A=E.errors.length;for(B;B<A;B++){D.push(E.errors[B].error)}D=D.join(",");if(C){C.call(this.context,{msg:D,data:this.data,success:false})}this._finish(D,false)},_onTimeout:function(){var A=this.onTimeout;if(A){A.call(this.context,{msg:"timeout",data:this.data,success:false})}},_sort:function(){var J=h.keys(this.required),F={},A=0,C,I,H,E,D,G,B;for(;;){C=J.length;G=false;for(E=A;E<C;E++){I=J[E];for(D=E+1;D<C;D++){B=I+J[D];if(!F[B]&&this._requires(I,J[D])){H=J.splice(D,1);J.splice(E,0,H[0]);F[B]=true;G=true;break}}if(G){break}else{A++}}if(!G){break}}this.sorted=J},_insert:function(A,D,H,C){if(A){this._config(A)}if(!C){}var E=this.resolve(!C),I=this,G=0,F=0;if(H){E[((H===o)?u:o)]=[]}if(E.js.length){G++}if(E.css.length){G++}var B=function(N){F++;var J={},L=0,K="",M;if(N&&N.errors){for(L=0;L<N.errors.length;L++){if(N.errors[L].request){K=N.errors[L].request.url}else{K=N.errors[L]}J[K]=K}}if(N&&N.data&&N.data.length&&(N.type==="success")){for(L=0;L<N.data.length;L++){I.inserted[N.data[L].name]=true}}if(F===G){I._loading=null;if(N&&N.fn){M=N.fn;delete N.fn;M.call(I,N)}}};this._loading=true;if(!E.js.length&&!E.css.length){F=-1;B({fn:I._onSuccess});return}if(E.css.length){g.Get.css(E.css,{data:E.cssMods,attributes:I.cssAttributes,insertBefore:I.insertBefore,charset:I.charset,timeout:I.timeout,context:I,onProgress:function(J){I._onProgress.call(I,J)},onTimeout:function(J){I._onTimeout.call(I,J)},onSuccess:function(J){J.type="success";J.fn=I._onSuccess;B.call(I,J)},onFailure:function(J){J.type="failure";J.fn=I._onFailure;B.call(I,J)}})}if(E.js.length){g.Get.js(E.js,{data:E.jsMods,insertBefore:I.insertBefore,attributes:I.jsAttributes,charset:I.charset,timeout:I.timeout,autopurge:false,context:I,async:I.async,onProgress:function(J){I._onProgress.call(I,J)},onTimeout:function(J){I._onTimeout.call(I,J)},onSuccess:function(J){J.type="success";J.fn=I._onSuccess;B.call(I,J)},onFailure:function(J){J.type="failure";J.fn=I._onFailure;B.call(I,J)}})}},_continue:function(){if(!(k.running)&&k.size()>0){k.running=true;k.next()()}},insert:function(D,B,C){var A=this,E=g.merge(this);delete E.require;delete E.dirty;k.add(function(){A._insert(E,D,B,C)});this._continue()},loadNext:function(A){return},_filter:function(C,B,F){var E=this.filter,A=B&&(B in this.filters),D=A&&this.filters[B],G=F||(this.moduleInfo[B]?this.moduleInfo[B].group:null);if(G&&this.groups[G]&&this.groups[G].filter){D=this.groups[G].filter;A=true}if(C){if(A){E=(m.isString(D))?this.FILTER_DEFS[D.toUpperCase()]||null:D}if(E){C=C.replace(new RegExp(E.searchExp,"g"),E.replaceStr)}}return C},_url:function(C,A,B){return this._filter((B||this.base||"")+C,A)},resolve:function(B,S){var ab,aa,Y,I,N,K,X,M,R,Z,C,L,V,H,ae,J,ac,Q=[],O,U,E={},T=this,A,D,ad=[],F=(T.ignoreRegistered)?{}:T.inserted,W={js:[],jsMods:[],css:[],cssMods:[]},G=T.loadType||"js";if(T.skin.overrides||T.skin.defaultSkin!==l||T.ignoreRegistered){T.resetModules()}if(B){T.calculate()}S=S||T.sorted;var P=function(af){if(af){M=(af.group&&T.groups[af.group])||i;if(M.async===false){af.async=M.async}I=(af.fullpath)?T._filter(af.fullpath,S[aa]):T._url(af.path,S[aa],M.base||af.base);if(af.attributes||af.async===false){I={url:I,async:af.async};if(af.attributes){I.attributes=af.attributes}}W[af.type].push(I);W[af.type+"Mods"].push(af)}else{}};ab=S.length;ae=T.comboBase;I=ae;V={};for(aa=0;aa<ab;aa++){L=ae;Y=T.getModule(S[aa]);R=Y&&Y.group;M=T.groups[R];if(R&&M){if(!M.combine||Y.fullpath){P(Y);continue}Y.combine=true;if(M.comboBase){L=M.comboBase}if("root" in M&&m.isValue(M.root)){Y.root=M.root}Y.comboSep=M.comboSep||T.comboSep;Y.maxURLLength=M.maxURLLength||T.maxURLLength}else{if(!T.combine){P(Y);continue}}V[L]=V[L]||[];V[L].push(Y)}for(Z in V){if(V.hasOwnProperty(Z)){E[Z]=E[Z]||{js:[],jsMods:[],css:[],cssMods:[]};I=Z;H=V[Z];ab=H.length;if(ab){for(aa=0;aa<ab;aa++){if(F[H[aa]]){continue}Y=H[aa];if(Y&&(Y.combine||!Y.ext)){E[Z].comboSep=Y.comboSep;E[Z].group=Y.group;E[Z].maxURLLength=Y.maxURLLength;C=((m.isValue(Y.root))?Y.root:T.root)+(Y.path||Y.fullpath);C=T._filter(C,Y.name);E[Z][Y.type].push(C);E[Z][Y.type+"Mods"].push(Y)}else{if(H[aa]){P(H[aa])}}}}}}for(Z in E){J=Z;A=E[J].comboSep||T.comboSep;D=E[J].maxURLLength||T.maxURLLength;for(G in E[J]){if(G===o||G===u){ac=E[J][G];H=E[J][G+"Mods"];ab=ac.length;O=J+ac.join(A);U=O.length;if(D<=J.length){D=q}if(ab){if(U>D){Q=[];for(S=0;S<ab;S++){Q.push(ac[S]);O=J+Q.join(A);if(O.length>D){Y=Q.pop();O=J+Q.join(A);W[G].push(T._filter(O,null,E[J].group));Q=[];if(Y){Q.push(Y)}}}if(Q.length){O=J+Q.join(A);W[G].push(T._filter(O,null,E[J].group))}}else{W[G].push(T._filter(O,null,E[J].group))}}W[G+"Mods"]=W[G+"Mods"].concat(H)}}}E=null;return W},load:function(A){if(!A){return}var B=this,C=B.resolve(true);B.data=C;B.onEnd=function(){A.apply(B.context||B,arguments)};B.insert()}}},"3.5.0pr2",{requires:["get","features"]});b.Env.core.push("loader-base");b.Env.core.push("yui-log");b.GlobalConfig={modules:{"loader-yui3":{combine:true,requires:["loader-base"]},features:{combine:true,requires:["loader-base"]},"intl-base":{combine:true,requires:["loader-base"]}}};var c=b();window.YUILoader=c.Loader;c.Loader.expose=c.Loader.prototype.expose=function(d){b.Env.core=[].concat(b.Env.core,["loader-yui3","features","intl-base"]);if(!window.YUI){window.YUI=b}c.use("loader-yui3","features","intl-base",function(){delete b.Env._loader;delete b.Env._renderedMods;d(window.YUI)})}}());
View
BIN  build/loader-zip.js.gz
Binary file not shown
View
811 build/loader.js
@@ -7,6 +7,7 @@
* file. This includes the script loading mechanism, a simple queue, and
* the core utilities for the library.
* @module yui
+ * @main yui
* @submodule yui-base
*/
@@ -236,7 +237,7 @@ if (docEl && docClass.indexOf(DOC_LABEL) == -1) {
}
if (VERSION.indexOf('@') > -1) {
- VERSION = '3.3.0'; // dev time hack for cdn test
+ VERSION = '3.5.0'; // dev time hack for cdn test
}
proto = {
@@ -259,6 +260,7 @@ proto = {
config = this.config,
mods = config.modules,
groups = config.groups,
+ aliases = config.aliases,
loader = this.Env._loader;
for (name in o) {
@@ -266,6 +268,8 @@ proto = {
attr = o[name];
if (mods && name == 'modules') {
clobber(mods, attr);
+ } else if (aliases && name == 'aliases') {
+ clobber(aliases, attr);
} else if (groups && name == 'groups') {
clobber(groups, attr);
} else if (name == 'win') {
@@ -583,7 +587,7 @@ with any configuration info required for the module.
if (instances.hasOwnProperty(i)) {
loader = instances[i].Env._loader;
if (loader) {
- if (!loader.moduleInfo[name]) {
+ if (!loader.moduleInfo[name] || loader.moduleInfo[name].temp) {
loader.addModule(details, name);
}
}
@@ -692,11 +696,15 @@ with any configuration info required for the module.
}
if (mod.fn) {
- try {
- mod.fn(Y, name);
- } catch (e) {
- Y.error('Attach error: ' + name, e, name);
- return false;
+ if (Y.config.throwFail) {
+ mod.fn(Y, name);
+ } else {
+ try {
+ mod.fn(Y, name);
+ } catch (e) {
+ Y.error('Attach error: ' + name, e, name);
+ return false;
+ }
}
}
@@ -827,10 +835,14 @@ with any configuration info required for the module.
if (!response.success && this.config.loadErrorFn) {
this.config.loadErrorFn.call(this, this, callback, response, args);
} else if (callback) {
- try {
+ if (this.config.throwFail) {
callback(this, response);
- } catch (e) {
- this.error('use callback error', e, args);
+ } else {
+ try {
+ callback(this, response);
+ } catch (e) {
+ this.error('use callback error', e, args);
+ }
}
}
},
@@ -935,7 +947,6 @@ with any configuration info required for the module.
ret = true,
data = response.data;
-
Y._loading = false;
if (data) {
@@ -953,8 +964,8 @@ with any configuration info required for the module.
}
if (redo && data) {
- Y._loading = false;
- Y._use(args, function() {
+ Y._loading = true;
+ Y._use(missing, function() {
if (Y._attach(data)) {
Y._notify(callback, response, data);
}
@@ -1139,7 +1150,7 @@ with any configuration info required for the module.
ret = Y.config.errorFn.apply(Y, arguments);
}
- if (Y.config.throwFail && !ret) {
+ if (!ret) {
throw (e || new Error(msg));
} else {
Y.message(msg, 'error', ''+src); // don't scrub this one
@@ -1622,19 +1633,39 @@ overwriting other scripts configs.
* modules: {
* mymod1: {
* requires: ['node'],
- * fullpath: 'http://myserver.mydomain.com/mymod1/mymod1.js'
+ * fullpath: '/mymod1/mymod1.js'
* },
* mymod2: {
* requires: ['mymod1'],
- * fullpath: 'http://myserver.mydomain.com/mymod2/mymod2.js'
- * }
+ * fullpath: '/mymod2/mymod2.js'
+ * },
+ * mymod3: '/js/mymod3.js',
+ * mycssmod: '/css/mycssmod.css'
* }
*
+ *
* @property modules
* @type object
*/
/**
+ * Aliases are dynamic groups of modules that can be used as
+ * shortcuts.
+ *
+ * YUI({
+ * aliases: {
+ * davglass: [ 'node', 'yql', 'dd' ],
+ * mine: [ 'davglass', 'autocomplete']
+ * }
+ * }).use('mine', function(Y) {
+ * //Node, YQL, DD &amp; AutoComplete available here..
+ * });
+ *
+ * @property aliases
+ * @type object
+ */
+
+/**
* A hash of module group definitions. It for each group you
* can specify a list of modules and the base path and
* combo spec to use when dynamically loading the modules.
@@ -1792,7 +1823,7 @@ overwriting other scripts configs.
* always use its own fallback implementations instead of relying on ES5
* functionality, even when it's available.
*
- * @method useNativeES5
+ * @property useNativeES5
* @type Boolean
* @default true
* @since 3.5.0
@@ -2099,27 +2130,32 @@ L.trimRight = STRING_PROTO.trimRight ? function (s) {
};
/**
- * <p>
- * Returns a string representing the type of the item passed in.
- * </p>
- *
- * <p>
- * Known issues:
- * </p>
- *
- * <ul>
- * <li>
- * <code>typeof HTMLElementCollection</code> returns function in Safari, but
- * <code>Y.type()</code> reports object, which could be a good thing --
- * but it actually caused the logic in <code>Y.Lang.isObject</code> to fail.
- * </li>
- * </ul>
- *
- * @method type
- * @param o the item to test.
- * @return {string} the detected type.
- * @static
- */
+Returns one of the following strings, representing the type of the item passed
+in:
+
+ * "array"
+ * "boolean"
+ * "date"
+ * "error"
+ * "function"
+ * "null"
+ * "number"
+ * "object"
+ * "regexp"
+ * "string"
+ * "undefined"
+
+Known issues:
+
+ * `typeof HTMLElementCollection` returns function in Safari, but
+ `Y.Lang.type()` reports "object", which could be a good thing --
+ but it actually caused the logic in <code>Y.Lang.isObject</code> to fail.
+
+@method type
+@param o the item to test.
+@return {string} the detected type.
+@static
+**/
L.type = function(o) {
return TYPES[typeof o] || TYPES[TOSTRING.call(o)] || (o ? 'object' : 'null');
};
@@ -2509,9 +2545,7 @@ utilities for the library.
var CACHED_DELIMITER = '__',
hasOwn = Object.prototype.hasOwnProperty,
- isObject = Y.Lang.isObject,
-
- win = Y.config.win;
+ isObject = Y.Lang.isObject;
/**
Returns a wrapper for a function which caches the return value of that function,
@@ -2570,11 +2604,15 @@ in both Safari and MobileSafari browsers:
@since 3.5.0
**/
Y.getLocation = function () {
- // The reference to the `window` object created outside this function's
- // scope is safe to hold on to, but it is not safe to do so with the
- // `location` object. The WebKit engine used in Safari and MobileSafari will
- // "disconnect" the `location` object from the `window` when a page is
- // restored from back/forward history cache.
+ // It is safer to look this up every time because yui-base is attached to a
+ // YUI instance before a user's config is applied; i.e. `Y.config.win` does
+ // not point the correct window object when this file is loaded.
+ var win = Y.config.win;
+
+ // It is not safe to hold a reference to the `location` object outside the
+ // scope in which it is being used. The WebKit engine used in Safari and
+ // MobileSafari will "disconnect" the `location` object from the `window`
+ // when a page is restored from back/forward history cache.
return win && win.location;
};
@@ -3270,6 +3308,20 @@ YUI.Env.parseUA = function(subUA) {
*/
air: 0,
/**
+ * PhantomJS version number or 0. Only populated if webkit is detected.
+ * Example: 1.0
+ * @property phantomjs
+ * @type float
+ */
+ phantomjs: 0,
+ /**
+ * Adobe AIR version number or 0. Only populated if webkit is detected.
+ * Example: 1.0
+ * @property air
+ * @type float
+ */
+ air: 0,
+ /**
* Detects Apple iPad's OS version
* @property ipad
* @type float
@@ -3411,6 +3463,13 @@ YUI.Env.parseUA = function(subUA) {
if (m && m[1]) {
o.webkit = numberify(m[1]);
o.safari = o.webkit;
+
+ if (/PhantomJS/.test(ua)) {
+ m = ua.match(/PhantomJS\/([^\s]*)/);
+ if (m && m[1]) {
+ o.phantomjs = numberify(m[1]);
+ }
+ }
// Mobile browser check
if (/ Mobile\//.test(ua) || (/iPad|iPod|iPhone/).test(ua)) {
@@ -3466,10 +3525,13 @@ YUI.Env.parseUA = function(subUA) {
}
}
- m = ua.match(/Chrome\/([^\s]*)/);
- if (m && m[1]) {
- o.chrome = numberify(m[1]); // Chrome
+ m = ua.match(/(Chrome|CrMo)\/([^\s]*)/);
+ if (m && m[1] && m[2]) {
+ o.chrome = numberify(m[2]); // Chrome
o.safari = 0; //Reset safari back to 0
+ if (m[1] === 'CrMo') {
+ o.mobile = 'chrome';
+ }
} else {
m = ua.match(/AdobeAIR\/([^\s]*)/);
if (m) {
@@ -3528,7 +3590,7 @@ YUI.Env.parseUA = function(subUA) {
if (process.versions && process.versions.node) {
//NodeJS
o.os = process.platform;
- o.nodejs = process.versions.node;
+ o.nodejs = numberify(process.versions.node);
}
}
@@ -3541,19 +3603,68 @@ YUI.Env.parseUA = function(subUA) {
Y.UA = YUI.Env.UA || YUI.Env.parseUA();
+
+/**
+Performs a simple comparison between two version numbers, accounting for
+standard versioning logic such as the fact that "535.8" is a lower version than
+"535.24", even though a simple numerical comparison would indicate that it's
+greater. Also accounts for cases such as "1.1" vs. "1.1.0", which are
+considered equivalent.
+
+Returns -1 if version _a_ is lower than version _b_, 0 if they're equivalent,
+1 if _a_ is higher than _b_.
+
+Versions may be numbers or strings containing numbers and dots. For example,
+both `535` and `"535.8.10"` are acceptable. A version string containing
+non-numeric characters, like `"535.8.beta"`, may produce unexpected results.
+
+@method compareVersions
+@param {Number|String} a First version number to compare.
+@param {Number|String} b Second version number to compare.
+@return -1 if _a_ is lower than _b_, 0 if they're equivalent, 1 if _a_ is
+ higher than _b_.
+**/
+Y.UA.compareVersions = function (a, b) {
+ var aPart, aParts, bPart, bParts, i, len;
+
+ if (a === b) {
+ return 0;
+ }
+
+ aParts = (a + '').split('.');
+ bParts = (b + '').split('.');
+
+ for (i = 0, len = Math.max(aParts.length, bParts.length); i < len; ++i) {
+ aPart = parseInt(aParts[i], 10);
+ bPart = parseInt(bParts[i], 10);
+
+ isNaN(aPart) && (aPart = 0);
+ isNaN(bPart) && (bPart = 0);
+
+ if (aPart < bPart) {
+ return -1;
+ }
+
+ if (aPart > bPart) {
+ return 1;
+ }
+ }
+
+ return 0;
+};
YUI.Env.aliases = {
"anim": ["anim-base","anim-color","anim-curve","anim-easing","anim-node-plugin","anim-scroll","anim-xy"],
- "app": ["app-base","model","model-list","router","view"],
+ "app": ["app-base","app-transitions","model","model-list","router","view"],
"attribute": ["attribute-base","attribute-complex"],
"autocomplete": ["autocomplete-base","autocomplete-sources","autocomplete-list","autocomplete-plugin"],
"base": ["base-base","base-pluginhost","base-build"],
- "button": ["button-base","button-group","cssbutton"],
"cache": ["cache-base","cache-offline","cache-plugin"],
"collection": ["array-extras","arraylist","arraylist-add","arraylist-filter","array-invoke"],
"controller": ["router"],
"dataschema": ["dataschema-base","dataschema-json","dataschema-xml","dataschema-array","dataschema-text"],
"datasource": ["datasource-local","datasource-io","datasource-get","datasource-function","datasource-cache","datasource-jsonschema","datasource-xmlschema","datasource-arrayschema","datasource-textschema","datasource-polling"],
- "datatable": ["datatable-core","datatable-head","datatable-body","datatable-base","datatable-column-widths","datatable-message","datatable-mutable","datatable-scroll","datatable-datasource","datatable-sort"],
+ "datatable": ["datatable-core","datatable-head","datatable-body","datatable-base","datatable-column-widths","datatable-message","datatable-mutable","datatable-sort","datatable-datasource"],
+ "datatable-deprecated": ["datatable-base-deprecated","datatable-datasource-deprecated","datatable-sort-deprecated","datatable-scroll-deprecated"],
"datatype": ["datatype-number","datatype-date","datatype-xml"],
"datatype-date": ["datatype-date-parse","datatype-date-format"],
"datatype-number": ["datatype-number-parse","datatype-number-format"],
@@ -3577,7 +3688,7 @@ YUI.Env.aliases = {
"resize": ["resize-base","resize-proxy","resize-constrain"],
"slider": ["slider-base","slider-value-range","clickable-rail","range-slider"],
"text": ["text-accentfold","text-wordbreak"],
- "widget": ["widget-base","widget-htmlparser","widget-uievents","widget-skin"]
+ "widget": ["widget-base","widget-htmlparser","widget-skin","widget-uievents"]
};
@@ -3595,6 +3706,9 @@ Provides dynamic loading of remote JavaScript and CSS resources.
**/
var Lang = Y.Lang,
+
+ CUSTOM_ATTRS, // defined lazily in Y.Get.Transaction._createNode()
+
Get, Transaction;
Y.Get = Get = {
@@ -4098,10 +4212,20 @@ Y.Get = Get = {
async: doc && doc.createElement('script').async === true,
// True if this browser fires an event when a dynamically injected
+ // link node fails to load. This is currently true for Firefox 9+
+ // and WebKit 535.24+.
+ cssFail: ua.gecko >= 9 || ua.compareVersions(ua.webkit, 535.24) >= 0,
+
+ // True if this browser fires an event when a dynamically injected
// link node finishes loading. This is currently true for IE, Opera,
- // and Firefox 9+. Note that IE versions <9 fire the DOM 0 "onload"
- // event, but not "load". All versions of IE fire "onload".
- cssLoad: !!(ua.gecko ? ua.gecko >= 9 : !ua.webkit),
+ // Firefox 9+, and WebKit 535.24+. Note that IE versions <9 fire the
+ // DOM 0 "onload" event, but not "load". All versions of IE fire
+ // "onload".
+ // davglass: Seems that Chrome on Android needs this to be false.
+ cssLoad: (
+ (!ua.gecko && !ua.webkit) || ua.gecko >= 9 ||
+ ua.compareVersions(ua.webkit, 535.24) >= 0
+ ) && !(ua.chrome && ua.chrome <= 18),
// True if this browser preserves script execution order while
// loading scripts in parallel as long as the script node's `async`
@@ -4298,8 +4422,8 @@ Get.Transaction = Transaction = function (requests, options) {
self._waiting = 0;
// Deprecated pre-3.5.0 properties.
- self.tId = self.id; // Use `id` instead.
- self.win = options.win || Y.config.win;
+ self.tId = self.id; // Use `id` instead.
+ self.win = options.win || Y.config.win;
};
/**
@@ -4473,11 +4597,25 @@ Transaction.prototype = {
// -- Protected Methods ----------------------------------------------------
_createNode: function (name, attrs, doc) {
var node = doc.createElement(name),
- attr;
+ attr, testEl;
+
+ if (!CUSTOM_ATTRS) {
+ // IE6 and IE7 expect property names rather than attribute names for
+ // certain attributes. Rather than sniffing, we do a quick feature
+ // test the first time _createNode() runs to determine whether we
+ // need to provide a workaround.
+ testEl = doc.createElement('div');
+ testEl.setAttribute('class', 'a');
+
+ CUSTOM_ATTRS = testEl.className === 'a' ? {} : {
+ 'for' : 'htmlFor',
+ 'class': 'className'
+ };
+ }
for (attr in attrs) {
if (attrs.hasOwnProperty(attr)) {
- node.setAttribute(attr, attrs[attr]);
+ node.setAttribute(CUSTOM_ATTRS[attr] || attr, attrs[attr]);
}
}
@@ -4580,7 +4718,7 @@ Transaction.prototype = {
node = req.node,
self = this,
ua = Y.UA,
- nodeType;
+ cssTimeout, nodeType;
if (!node) {
if (isScript) {
@@ -4600,9 +4738,14 @@ Transaction.prototype = {
}
function onLoad() {
+ if (cssTimeout) {
+ clearTimeout(cssTimeout);
+ }
+
self._progress(null, req);
}
+
// Deal with script asynchronicity.
if (isScript) {
node.setAttribute('src', req.url);
@@ -4662,6 +4805,12 @@ Transaction.prototype = {
// evens the playing field with older IEs.
node.onerror = onError;
node.onload = onLoad;
+
+ // If this browser doesn't fire an event when CSS fails to load,
+ // fail after a timeout to avoid blocking the transaction queue.
+ if (!env.cssFail && !isScript) {
+ cssTimeout = setTimeout(onError, req.timeout || 3000);
+ }
}
this._waiting += 1;
@@ -4810,7 +4959,7 @@ if (!YUI.Env[Y.version]) {
BUILD = '/build/',
ROOT = VERSION + BUILD,
CDN_BASE = Y.Env.base,
- GALLERY_VERSION = 'gallery-2012.02.01-21-35',
+ GALLERY_VERSION = 'gallery-2012.05.02-20-10',
TNT = '2in3',
TNT_VERSION = '4',
YUI2_VERSION = '2.9.0',
@@ -4831,18 +4980,28 @@ if (!YUI.Env[Y.version]) {
groups: {},
patterns: {} },
groups = META.groups,
- yui2Update = function(tnt, yui2) {
- var root = TNT + '.' +
- (tnt || TNT_VERSION) + '/' +
- (yui2 || YUI2_VERSION) + BUILD;
- groups.yui2.base = CDN_BASE + root;
- groups.yui2.root = root;
- },
- galleryUpdate = function(tag) {
- var root = (tag || GALLERY_VERSION) + BUILD;
- groups.gallery.base = CDN_BASE + root;
- groups.gallery.root = root;
- };
+ yui2Update = function(tnt, yui2, config) {
+
+ var root = TNT + '.' +
+ (tnt || TNT_VERSION) + '/' +
+ (yui2 || YUI2_VERSION) + BUILD,
+ base = (config && config.base) ? config.base : CDN_BASE,
+ combo = (config && config.comboBase) ? config.comboBase : COMBO_BASE;
+
+ groups.yui2.base = base + root;
+ groups.yui2.root = root;
+ groups.yui2.comboBase = combo;
+ },
+ galleryUpdate = function(tag, config) {
+ var root = (tag || GALLERY_VERSION) + BUILD,
+ base = (config && config.base) ? config.base : CDN_BASE,
+ combo = (config && config.comboBase) ? config.comboBase : COMBO_BASE;
+
+ groups.gallery.base = base + root;
+ groups.gallery.root = root;
+ groups.gallery.comboBase = combo;
+ };
+
groups[VERSION] = {};
@@ -4885,6 +5044,8 @@ if (!YUI.Env[Y.version]) {
}
+/*jslint forin: true */
+
/**
* Loader dynamically loads script and css files. It includes the dependency
* information for the version of the library in use, and will automatically pull in
@@ -4906,6 +5067,7 @@ var NOT_FOUND = {},
CSS = 'css',
JS = 'js',
INTL = 'intl',
+ DEFAULT_SKIN = 'sam',
VERSION = Y.version,
ROOT_LANG = '',
YObject = Y.Object,
@@ -4919,14 +5081,14 @@ var NOT_FOUND = {},
modulekey,
cache,
_path = function(dir, file, type, nomin) {
- var path = dir + '/' + file;
- if (!nomin) {
- path += '-min';
- }
- path += '.' + (type || CSS);
+ var path = dir + '/' + file;
+ if (!nomin) {
+ path += '-min';
+ }
+ path += '.' + (type || CSS);
- return path;
- };
+ return path;
+ };
/**
* The component metadata is stored in Y.Env.meta.
@@ -4939,106 +5101,48 @@ Y.Env.meta = META;
/**
* Loader dynamically loads script and css files. It includes the dependency
* info for the version of the library in use, and will automatically pull in
- * dependencies for the modules requested. It supports rollup files and will
- * automatically use these when appropriate in order to minimize the number of
- * http connections required to load all of the dependencies. It can load the
+ * dependencies for the modules requested. It can load the
* files from the Yahoo! CDN, and it can utilize the combo service provided on
* this network to reduce the number of http connections required to download
- * YUI files.
- *
- * While the loader can be instantiated by the end user, it normally is not.
- * @see YUI.use for the normal use case. The use function automatically will
- * pull in missing dependencies.
- *
+ * YUI files. You can also specify an external, custom combo service to host
+ * your modules as well.
+
+ var Y = YUI();
+ var loader = new Y.Loader({
+ filter: 'debug',
+ base: '../../',
+ root: 'build/',
+ combine: true,
+ require: ['node', 'dd', 'console']
+ });
+ var out = loader.resolve(true);
+
* @constructor
* @class Loader
- * @param {object} o an optional set of configuration options. Valid options:
- * <ul>
- * <li>base:
- * The base dir</li>
- * <li>comboBase:
- * The YUI combo service base dir. Ex: http://yui.yahooapis.com/combo?</li>
- * <li>root:
- * The root path to prepend to module names for the combo service.
- * Ex: 2.5.2/build/</li>
- * <li>filter:.
- *
- * A filter to apply to result urls. This filter will modify the default
- * path for all modules. The default path for the YUI library is the
- * minified version of the files (e.g., event-min.js). The filter property
- * can be a predefined filter or a custom filter. The valid predefined
- * filters are:
- * <dl>
- * <dt>DEBUG</dt>
- * <dd>Selects the debug versions of the library (e.g., event-debug.js).
- * This option will automatically include the Logger widget</dd>
- * <dt>RAW</dt>
- * <dd>Selects the non-minified version of the library (e.g., event.js).
- * </dd>
- * </dl>
- * You can also define a custom filter, which must be an object literal
- * containing a search expression and a replace string:
- * <pre>
- * myFilter: &#123;
- * 'searchExp': "-min\\.js",
- * 'replaceStr': "-debug.js"
- * &#125;
- * </pre>
- *
- * </li>
- * <li>filters: per-component filter specification. If specified
- * for a given component, this overrides the filter config. _Note:_ This does not work on combo urls, use the filter property instead.</li>
- * <li>combine:
- * Use the YUI combo service to reduce the number of http connections
- * required to load your dependencies</li>
- * <li>ignore:
- * A list of modules that should never be dynamically loaded</li>
- * <li>force:
- * A list of modules that should always be loaded when required, even if
- * already present on the page</li>
- * <li>insertBefore:
- * Node or id for a node that should be used as the insertion point for
- * new nodes</li>
- * <li>charset:
- * charset for dynamic nodes (deprecated, use jsAttributes or cssAttributes)
- * </li>
- * <li>jsAttributes: object literal containing attributes to add to script
- * nodes</li>
- * <li>cssAttributes: object literal containing attributes to add to link
- * nodes</li>
- * <li>timeout:
- * The number of milliseconds before a timeout occurs when dynamically
- * loading nodes. If not set, there is no timeout</li>
- * <li>context:
- * execution context for all callbacks</li>
- * <li>onSuccess:
- * callback for the 'success' event</li>
- * <li>onFailure: callback for the 'failure' event</li>
- * <li>onCSS: callback for the 'CSSComplete' event. When loading YUI
- * components with CSS the CSS is loaded first, then the script. This
- * provides a moment you can tie into to improve
- * the presentation of the page while the script is loading.</li>
- * <li>onTimeout:
- * callback for the 'timeout' event</li>
- * <li>onProgress:
- * callback executed each time a script or css file is loaded</li>
- * <li>modules:
- * A list of module definitions. See Loader.addModule for the supported
- * module metadata</li>
- * <li>groups:
- * A list of group definitions. Each group can contain specific definitions
- * for base, comboBase, combine, and accepts a list of modules. See above
- * for the description of these properties.</li>
- * <li>2in3: the version of the YUI 2 in 3 wrapper to use. The intrinsic
- * support for YUI 2 modules in YUI 3 relies on versions of the YUI 2
- * components inside YUI 3 module wrappers. These wrappers
- * change over time to accomodate the issues that arise from running YUI 2
- * in a YUI 3 sandbox.</li>
- * <li>yui2: when using the 2in3 project, you can select the version of
- * YUI 2 to use. Valid values * are 2.2.2, 2.3.1, 2.4.1, 2.5.2, 2.6.0,
- * 2.7.0, 2.8.0, and 2.8.1 [default] -- plus all versions of YUI 2
- * going forward.</li>
- * </ul>
+ * @param {Object} config an optional set of configuration options.
+ * @param {String} config.base The base dir which to fetch this module from
+ * @param {String} config.comboBase The Combo service base path. Ex: `http://yui.yahooapis.com/combo?`
+ * @param {String} config.root The root path to prepend to module names for the combo service. Ex: `2.5.2/build/`
+ * @param {String|Object} config.filter A filter to apply to result urls. <a href="#property_filter">See filter property</a>
+ * @param {Object} config.filters Per-component filter specification. If specified for a given component, this overrides the filter config.
+ * @param {Boolean} config.combine Use a combo service to reduce the number of http connections required to load your dependencies
+ * @param {Boolean} [config.async=true] Fetch files in async
+ * @param {Array} config.ignore: A list of modules that should never be dynamically loaded
+ * @param {Array} config.force A list of modules that should always be loaded when required, even if already present on the page
+ * @param {HTMLElement|String} config.insertBefore Node or id for a node that should be used as the insertion point for new nodes
+ * @param {Object} config.jsAttributes Object literal containing attributes to add to script nodes
+ * @param {Object} config.cssAttributes Object literal containing attributes to add to link nodes
+ * @param {Number} config.timeout The number of milliseconds before a timeout occurs when dynamically loading nodes. If not set, there is no timeout
+ * @param {Object} config.context Execution context for all callbacks
+ * @param {Function} config.onSuccess Callback for the 'success' event
+ * @param {Function} config.onFailure Callback for the 'failure' event
+ * @param {Function} config.onCSS Callback for the 'CSSComplete' event. When loading YUI components with CSS the CSS is loaded first, then the script. This provides a moment you can tie into to improve the presentation of the page while the script is loading.
+ * @param {Function} config.onTimeout Callback for the 'timeout' event
+ * @param {Function} config.onProgress Callback executed each time a script or css file is loaded
+ * @param {Object} config.modules A list of module definitions. See <a href="#method_addModule">Loader.addModule</a> for the supported module metadata
+ * @param {Object} config.groups A list of group definitions. Each group can contain specific definitions for `base`, `comboBase`, `combine`, and accepts a list of `modules`.
+ * @param {String} config.2in3 The version of the YUI 2 in 3 wrapper to use. The intrinsic support for YUI 2 modules in YUI 3 relies on versions of the YUI 2 components inside YUI 3 module wrappers. These wrappers change over time to accomodate the issues that arise from running YUI 2 in a YUI 3 sandbox.
+ * @param {String} config.yui2 When using the 2in3 project, you can select the version of YUI 2 to use. Valid values are `2.2.2`, `2.3.1`, `2.4.1`, `2.5.2`, `2.6.0`, `2.7.0`, `2.8.0`, `2.8.1` and `2.9.0` [default] -- plus all versions of YUI 2 going forward.
*/
Y.Loader = function(o) {
@@ -5179,7 +5283,7 @@ Y.Loader = function(o) {
*/
self.comboSep = '&';
/**
- * Max url length for combo urls. The default is 2048. This is the URL
+ * Max url length for combo urls. The default is 1024. This is the URL
* limit for the Yahoo! hosted combo servers. If consuming
* a different combo service that has a different URL limit
* it is possible to override this default by supplying
@@ -5258,12 +5362,12 @@ Y.Loader = function(o) {
* </dl>
* You can also define a custom filter, which must be an object literal
* containing a search expression and a replace string:
- * <pre>
- * myFilter: &#123;
- * 'searchExp': "-min\\.js",
- * 'replaceStr': "-debug.js"
- * &#125;
- * </pre>
+ *
+ * myFilter: {
+ * 'searchExp': "-min\\.js",
+ * 'replaceStr': "-debug.js"
+ * }
+ *
* @property filter
* @type string| {searchExp: string, replaceStr: string}
*/
@@ -5312,29 +5416,27 @@ Y.Loader = function(o) {
* being loaded for calendar (if calendar was requested), and
* 'sam' for all other skinnable components:
*
- * <code>
- * skin: {
- *
- * // The default skin, which is automatically applied if not
- * // overriden by a component-specific skin definition.
- * // Change this in to apply a different skin globally
- * defaultSkin: 'sam',
- *
- * // This is combined with the loader base property to get
- * // the default root directory for a skin. ex:
- * // http://yui.yahooapis.com/2.3.0/build/assets/skins/sam/
- * base: 'assets/skins/',
+ * skin: {
+ * // The default skin, which is automatically applied if not
+ * // overriden by a component-specific skin definition.
+ * // Change this in to apply a different skin globally
+ * defaultSkin: 'sam',
*
- * // Any component-specific overrides can be specified here,
- * // making it possible to load different skins for different
- * // components. It is possible to load more than one skin
- * // for a given component as well.
- * overrides: {
- * calendar: ['skin1', 'skin2']
+ * // This is combined with the loader base property to get
+ * // the default root directory for a skin. ex:
+ * // http://yui.yahooapis.com/2.3.0/build/assets/skins/sam/
+ * base: 'assets/skins/',
+ *
+ * // Any component-specific overrides can be specified here,
+ * // making it possible to load different skins for different
+ * // components. It is possible to load more than one skin
+ * // for a given component as well.
+ * overrides: {
+ * calendar: ['skin1', 'skin2']
+ * }
* }
- * }
- * </code>
- * @property skin
+ * @property skin
+ * @type {Object}
*/
self.skin = Y.merge(Y.Env.meta.skin);
@@ -5379,6 +5481,13 @@ Y.Loader = function(o) {
*/
self.loaded = GLOBAL_LOADED[VERSION];
+
+ /**
+ * Should Loader fetch scripts in `async`, defaults to `true`
+ * @property async
+ */
+
+ self.async = true;
self._inspectPage();
@@ -5393,6 +5502,12 @@ Y.Loader = function(o) {
if (Y.config.tests) {
self.testresults = Y.config.tests;
}
+
+ /*
+ if (self.ignoreRegistered) {
+ self.loaded = {};
+ }
+ */
/**
* List of rollup files found in the library metadata
@@ -5459,9 +5574,39 @@ Y.Loader = function(o) {
*/
//self.results = {};
+ if (self.ignoreRegistered) {
+ //Clear inpage already processed modules.
+ self.resetModules();
+ }
+
};
Y.Loader.prototype = {
+ resetModules: function() {
+ var self = this;
+ oeach(self.moduleInfo, function(mod) {
+ var name = mod.name,
+ details = (YUI.Env.mods[name] ? YUI.Env.mods[name].details : null);
+
+ if (details) {
+ self.moduleInfo[name]._reset = true;
+ self.moduleInfo[name].requires = details.requires || [];
+ self.moduleInfo[name].optional = details.optional || [];
+ self.moduleInfo[name].supersedes = details.supercedes || [];
+ }
+
+ if (mod.defaults) {
+ oeach(mod.defaults, function(val, key) {
+ if (mod[key]) {
+ mod[key] = mod.defaults[key];
+ }
+ });
+ }
+ if (mod.skinnable) {
+ self._addSkin(self.skin.defaultSkin, mod.name);
+ }
+ });
+ },
/**
Regex that matches a CSS URL. Used to guess the file type when it's not
specified.
@@ -5593,6 +5738,7 @@ Y.Loader.prototype = {
/**
* Apply a new config to the Loader instance
* @method _config
+ * @private
* @param {Object} o The new configuration
*/
_config: function(o) {
@@ -5620,16 +5766,21 @@ Y.Loader.prototype = {
groupName = j;
group = val[j];
self.addGroup(group, groupName);
+ if (group.aliases) {
+ oeach(group.aliases, self.addAlias, self);
+ }
}
}
} else if (i == 'modules') {
// add a hash of module definitions
oeach(val, self.addModule, self);
+ } else if (i === 'aliases') {
+ oeach(val, self.addAlias, self);
} else if (i == 'gallery') {
- this.groups.gallery.update(val);
+ this.groups.gallery.update(val, o);
} else if (i == 'yui2' || i == '2in3') {
- this.groups.yui2.update(o['2in3'], o.yui2);
+ this.groups.yui2.update(o['2in3'], o.yui2, o);
} else {
self[i] = val;
}
@@ -5648,9 +5799,12 @@ Y.Loader.prototype = {
self.require('yui-log', 'dump');
}
}
+
if (self.lang) {
- self.require('intl-base', 'intl');
+ //Removed this so that when Loader is invoked
+ //it doesn't request what it doesn't need.
+ //self.require('intl-base', 'intl');
}
},
@@ -5696,6 +5850,7 @@ Y.Loader.prototype = {
mdef = info[mod];
pkg = mdef.pkg || mod;
nmod = {
+ skin: true,
name: name,
group: mdef.group,
type: 'css',
@@ -5717,21 +5872,48 @@ Y.Loader.prototype = {
return name;
},
-
+ /**
+ * Adds an alias module to the system
+ * @method addAlias
+ * @param {Array} use An array of modules that makes up this alias
+ * @param {String} name The name of the alias
+ * @example
+ * var loader = new Y.Loader({});
+ * loader.addAlias([ 'node', 'yql' ], 'davglass');
+ * loader.require(['davglass']);
+ * var out = loader.resolve(true);
+ *
+ * //out.js will contain Node and YQL modules
+ */
+ addAlias: function(use, name) {
+ YUI.Env.aliases[name] = use;
+ this.addModule({
+ name: name,
+ use: use
+ });
+ },
/**
* Add a new module group
- * <dl>
- * <dt>name:</dt> <dd>required, the group name</dd>
- * <dt>base:</dt> <dd>The base dir for this module group</dd>
- * <dt>root:</dt> <dd>The root path to add to each combo
- * resource path</dd>
- * <dt>combine:</dt> <dd>combo handle</dd>
- * <dt>comboBase:</dt> <dd>combo service base path</dd>
- * <dt>modules:</dt> <dd>the group of modules</dd>
- * </dl>
* @method addGroup
- * @param {object} o An object containing the module data.
- * @param {string} name the group name.
+ * @param {Object} config An object containing the group configuration data
+ * @param {String} config.name required, the group name
+ * @param {String} config.base The base directory for this module group
+ * @param {String} config.root The root path to add to each combo resource path
+ * @param {Boolean} config.combine Should the request be combined
+ * @param {String} config.comboBase Combo service base path
+ * @param {Object} config.modules The group of modules
+ * @param {String} name the group name.
+ * @example
+ * var loader = new Y.Loader({});
+ * loader.addGroup({
+ * name: 'davglass',
+ * combine: true,
+ * comboBase: '/combo?',
+ * root: '',
+ * modules: {
+ * //Module List here
+ * }
+ * }, 'davglass');
*/
addGroup: function(o, name) {
var mods = o.modules,
@@ -5760,59 +5942,37 @@ Y.Loader.prototype = {
/**
* Add a new module to the component metadata.
- * <dl>
- * <dt>name:</dt> <dd>required, the component name</dd>
- * <dt>type:</dt> <dd>required, the component type (js or css)
- * </dd>
- * <dt>path:</dt> <dd>required, the path to the script from
- * "base"</dd>
- * <dt>requires:</dt> <dd>array of modules required by this
- * component</dd>
- * <dt>optional:</dt> <dd>array of optional modules for this
- * component</dd>
- * <dt>supersedes:</dt> <dd>array of the modules this component
- * replaces</dd>
- * <dt>after:</dt> <dd>array of modules the components which, if
- * present, should be sorted above this one</dd>
- * <dt>after_map:</dt> <dd>faster alternative to 'after' -- supply
- * a hash instead of an array</dd>
- * <dt>rollup:</dt> <dd>the number of superseded modules required
- * for automatic rollup</dd>
- * <dt>fullpath:</dt> <dd>If fullpath is specified, this is used
- * instead of the configured base + path</dd>
- * <dt>skinnable:</dt> <dd>flag to determine if skin assets should
- * automatically be pulled in</dd>
- * <dt>submodules:</dt> <dd>a hash of submodules</dd>
- * <dt>group:</dt> <dd>The group the module belongs to -- this
- * is set automatically when it is added as part of a group
- * configuration.</dd>
- * <dt>lang:</dt>
- * <dd>array of BCP 47 language tags of languages for which this
- * module has localized resource bundles,
- * e.g., ["en-GB","zh-Hans-CN"]</dd>
- * <dt>condition:</dt>
- * <dd>Specifies that the module should be loaded automatically if
- * a condition is met. This is an object with up to three fields:
- * [trigger] - the name of a module that can trigger the auto-load
- * [test] - a function that returns true when the module is to be
- * loaded.
- * [when] - specifies the load order of the conditional module
- * with regard to the position of the trigger module.
- * This should be one of three values: 'before', 'after', or
- * 'instead'. The default is 'after'.
- * </dd>
- * <dt>testresults:</dt><dd>a hash of test results from Y.Features.all()</dd>
- * </dl>
* @method addModule
- * @param {object} o An object containing the module data.
- * @param {string} name the module name (optional), required if not
- * in the module data.
- * @return {object} the module definition or null if
- * the object passed in did not provide all required attributes.
+ * @param {Object} config An object containing the module data.
+ * @param {String} config.name Required, the component name
+ * @param {String} config.type Required, the component type (js or css)
+ * @param {String} config.path Required, the path to the script from `base`
+ * @param {Array} config.requires Array of modules required by this component
+ * @param {Array} [config.optional] Array of optional modules for this component
+ * @param {Array} [config.supersedes] Array of the modules this component replaces
+ * @param {Array} [config.after] Array of modules the components which, if present, should be sorted above this one
+ * @param {Object} [config.after_map] Faster alternative to 'after' -- supply a hash instead of an array
+ * @param {Number} [config.rollup] The number of superseded modules required for automatic rollup
+ * @param {String} [config.fullpath] If `fullpath` is specified, this is used instead of the configured `base + path`
+ * @param {Boolean} [config.skinnable] Flag to determine if skin assets should automatically be pulled in
+ * @param {Object} [config.submodules] Hash of submodules
+ * @param {String} [config.group] The group the module belongs to -- this is set automatically when it is added as part of a group configuration.
+ * @param {Array} [config.lang] Array of BCP 47 language tags of languages for which this module has localized resource bundles, e.g., `["en-GB", "zh-Hans-CN"]`
+ * @param {Object} [config.condition] Specifies that the module should be loaded automatically if a condition is met. This is an object with up to three fields:
+ * @param {String} [config.condition.trigger] The name of a module that can trigger the auto-load
+ * @param {Function} [config.condition.test] A function that returns true when the module is to be loaded.
+ * @param {String} [config.condition.when] Specifies the load order of the conditional module
+ * with regard to the position of the trigger module.
+ * This should be one of three values: `before`, `after`, or `instead`. The default is `after`.
+ * @param {Object} [config.testresults] A hash of test results from `Y.Features.all()`
+ * @param {Function} [config.configFn] A function to exectute when configuring this module
+ * @param {Object} config.configFn.mod The module config, modifying this object will modify it's config. Returning false will delete the module's config.
+ * @param {String} [name] The module name, required if not in the module data.
+ * @return {Object} the module definition or null if the object passed in did not provide all required attributes.
*/
addModule: function(o, name) {
name = name || o.name;
-
+
if (typeof o === 'string') {
o = { name: name, fullpath: o };
}
@@ -5851,17 +6011,53 @@ Y.Loader.prototype = {
o.supersedes = o.supersedes || o.use;
o.ext = ('ext' in o) ? o.ext : (this._internal) ? false : true;
- o.requires = this.filterRequires(o.requires) || [];
// Handle submodule logic
var subs = o.submodules, i, l, t, sup, s, smod, plugins, plug,
j, langs, packName, supName, flatSup, flatLang, lang, ret,
- overrides, skinname, when,
+ overrides, skinname, when, g,
conditions = this.conditions, trigger;
// , existing = this.moduleInfo[name], newr;
-
+
this.moduleInfo[name] = o;
+ o.requires = o.requires || [];
+
+ /*
+ Only allowing the cascade of requires information, since
+ optional and supersedes are far more fine grained than
+ a blanket requires is.
+ */
+ if (this.requires) {
+ for (i = 0; i < this.requires.length; i++) {
+ o.requires.push(this.requires[i]);
+ }
+ }
+ if (o.group && this.groups && this.groups[o.group]) {
+ g = this.groups[o.group];
+ if (g.requires) {
+ for (i = 0; i < g.requires.length; i++) {
+ o.requires.push(g.requires[i]);
+ }
+ }
+ }
+
+
+ if (!o.defaults) {
+ o.defaults = {
+ requires: o.requires ? [].concat(o.requires) : null,
+ supersedes: o.supersedes ? [].concat(o.supersedes) : null,
+ optional: o.optional ? [].concat(o.optional) : null
+ };
+ }
+
+ if (o.skinnable && o.ext) {
+ skinname = this._addSkin(this.skin.defaultSkin, name);
+ o.requires.unshift(skinname);
+ }
+
+ o.requires = this.filterRequires(o.requires) || [];
+
if (!o.langPack && o.lang) {
langs = YArray(o.lang);
for (j = 0; j < langs.length; j++) {
@@ -5874,6 +6070,7 @@ Y.Loader.prototype = {
}
}
+
if (subs) {
sup = o.supersedes || [];
l = 0;
@@ -6160,7 +6357,7 @@ Y.Loader.prototype = {
intl = mod.lang || mod.intl,
info = this.moduleInfo,
ftests = Y.Features && Y.Features.tests.load,
- hash;
+ hash, reparse;
// console.log(name);
@@ -6174,9 +6371,11 @@ Y.Loader.prototype = {
}
// console.log('cache: ' + mod.langCache + ' == ' + this.lang);
+
+ //If a skin or a lang is different, reparse..
+ reparse = !((!this.lang || mod.langCache === this.lang) && (mod.skinCache === this.skin.defaultSkin));
- // if (mod.expanded && (!mod.langCache || mod.langCache == this.lang)) {
- if (mod.expanded && (!this.lang || mod.langCache === this.lang)) {
+ if (mod.expanded && !reparse) {
return mod.expanded;
}
@@ -6195,6 +6394,7 @@ Y.Loader.prototype = {
mod._parsed = true;
mod.langCache = this.lang;
+ mod.skinCache = this.skin.defaultSkin;
for (i = 0; i < r.length; i++) {
if (!hash[r[i]]) {
@@ -6369,7 +6569,7 @@ Y.Loader.prototype = {
style = Y.config.doc.defaultView.getComputedStyle(el, null);
}
- if (style['display'] === 'none') {
+ if (style && style.display === 'none') {
ret = true;
}
@@ -6442,6 +6642,7 @@ Y.Loader.prototype = {
/**
* Creates a "psuedo" package for languages provided in the lang array
* @method _addLangPack
+ * @private
* @param {String} lang The language to create
* @param {Object} m The module definition to create the language pack around
* @param {String} packName The name of the package (e.g: lang/datatype-date-en-US)
@@ -6597,6 +6798,16 @@ Y.Loader.prototype = {
},
/**
+ * The default method used to test a module against a pattern
+ * @method _patternTest
+ * @private
+ * @param {String} mname The module being tested
+ * @param {String} pname The pattern to match
+ */
+ _patternTest: function(mname, pname) {
+ return (mname.indexOf(pname) > -1);
+ },
+ /**
* Get's the loader meta data for the requested module
* @method getModule
* @param {String} mname The module name to get
@@ -6622,9 +6833,7 @@ Y.Loader.prototype = {
//There is no test method, create a default one that tests
// the pattern against the mod name
if (!p.test) {
- p.test = function(mname, pname) {
- return (mname.indexOf(pname) > -1);
- };
+ p.test = this._patternTest;
}
if (p.test(mname, pname)) {
@@ -6885,6 +7094,7 @@ Y.Loader.prototype = {
/**
* Handles the actual insertion of script/link tags
* @method _insert
+ * @private
* @param {Object} source The YUI instance the request came from
* @param {Object} o The metadata to include
* @param {String} type JS or CSS
@@ -6902,10 +7112,10 @@ Y.Loader.prototype = {
// don't include type so we can process CSS and script in
// one pass when the type is not specified.
if (!skipcalc) {
- this.calculate(o);
+ //this.calculate(o);
}
- var modules = this.resolve(),
+ var modules = this.resolve(!skipcalc),
self = this, comp = 0, actions = 0;
if (type) {
@@ -6999,7 +7209,7 @@ Y.Loader.prototype = {
timeout: self.timeout,
autopurge: false,
context: self,
- async: true,
+ async: self.async,
onProgress: function(e) {
self._onProgress.call(self, e);
},
@@ -7077,24 +7287,21 @@ Y.Loader.prototype = {
var f = this.filter,
hasFilter = name && (name in this.filters),
modFilter = hasFilter && this.filters[name],
- groupName = group || (this.moduleInfo[name] ? this.moduleInfo[name].group : null);
+ groupName = group || (this.moduleInfo[name] ? this.moduleInfo[name].group : null);
- if (groupName && this.groups[groupName] && this.groups[groupName].filter) {
- modFilter = this.groups[groupName].filter;
- hasFilter = true;
- };
+ if (groupName && this.groups[groupName] && this.groups[groupName].filter) {
+ modFilter = this.groups[groupName].filter;
+ hasFilter = true;
+ }
if (u) {
if (hasFilter) {
- f = (L.isString(modFilter)) ?
- this.FILTER_DEFS[modFilter.toUpperCase()] || null :
- modFilter;
+ f = (L.isString(modFilter)) ? this.FILTER_DEFS[modFilter.toUpperCase()] || null : modFilter;
}
if (f) {
u = u.replace(new RegExp(f.searchExp, 'g'), f.replaceStr);
}
}
-
return u;
},
@@ -7139,6 +7346,10 @@ Y.Loader.prototype = {
resolved = { js: [], jsMods: [], css: [], cssMods: [] },
type = self.loadType || 'js';
+ if (self.skin.overrides || self.skin.defaultSkin !== DEFAULT_SKIN || self.ignoreRegistered) {
+ self.resetModules();
+ }
+
if (calc) {
self.calculate();
}
@@ -7148,15 +7359,23 @@ Y.Loader.prototype = {
if (m) {
group = (m.group && self.groups[m.group]) || NOT_FOUND;
+
+ //Always assume it's async
+ if (group.async === false) {
+ m.async = group.async;
+ }
url = (m.fullpath) ? self._filter(m.fullpath, s[i]) :
self._url(m.path, s[i], group.base || m.base);
- if (m.attributes) {
+ if (m.attributes || m.async === false) {
url = {
url: url,
- attributes: m.attributes
+ async: m.async
};
+ if (m.attributes) {
+ url.attributes = m.attributes;
+ }
}
resolved[m.type].push(url);
resolved[m.type + 'Mods'].push(m);
@@ -7271,7 +7490,7 @@ Y.Loader.prototype = {
if (tmpBase.length > maxURLLength) {
m = u.pop();
- tmpBase = base + u.join(comboSep)
+ tmpBase = base + u.join(comboSep);
resolved[type].push(self._filter(tmpBase, null, resCombos[base].group));
u = [];
if (m) {
View
54 js/get.js
@@ -11,6 +11,9 @@ Provides dynamic loading of remote JavaScript and CSS resources.
**/
var Lang = Y.Lang,
+
+ CUSTOM_ATTRS, // defined lazily in Y.Get.Transaction._createNode()
+
Get, Transaction;
Y.Get = Get = {
@@ -514,10 +517,20 @@ Y.Get = Get = {
async: doc && doc.createElement('script').async === true,
// True if this browser fires an event when a dynamically injected
+ // link node fails to load. This is currently true for Firefox 9+
+ // and WebKit 535.24+.
+ cssFail: ua.gecko >= 9 || ua.compareVersions(ua.webkit, 535.24) >= 0,
+
+ // True if this browser fires an event when a dynamically injected
// link node finishes loading. This is currently true for IE, Opera,
- // and Firefox 9+. Note that IE versions <9 fire the DOM 0 "onload"
- // event, but not "load". All versions of IE fire "onload".
- cssLoad: !!(ua.gecko ? ua.gecko >= 9 : !ua.webkit),
+ // Firefox 9+, and WebKit 535.24+. Note that IE versions <9 fire the
+ // DOM 0 "onload" event, but not "load". All versions of IE fire
+ // "onload".
+ // davglass: Seems that Chrome on Android needs this to be false.
+ cssLoad: (
+ (!ua.gecko && !ua.webkit) || ua.gecko >= 9 ||
+ ua.compareVersions(ua.webkit, 535.24) >= 0
+ ) && !(ua.chrome && ua.chrome <= 18),
// True if this browser preserves script execution order while
// loading scripts in parallel as long as the script node's `async`
@@ -714,8 +727,8 @@ Get.Transaction = Transaction = function (requests, options) {
self._waiting = 0;
// Deprecated pre-3.5.0 properties.
- self.tId = self.id; // Use `id` instead.
- self.win = options.win || Y.config.win;
+ self.tId = self.id; // Use `id` instead.
+ self.win = options.win || Y.config.win;
};
/**
@@ -889,11 +902,25 @@ Transaction.prototype = {
// -- Protected Methods ----------------------------------------------------
_createNode: function (name, attrs, doc) {
var node = doc.createElement(name),
- attr;
+ attr, testEl;
+
+ if (!CUSTOM_ATTRS) {
+ // IE6 and IE7 expect property names rather than attribute names for
+ // certain attributes. Rather than sniffing, we do a quick feature
+ // test the first time _createNode() runs to determine whether we
+ // need to provide a workaround.
+ testEl = doc.createElement('div');
+ testEl.setAttribute('class', 'a');
+
+ CUSTOM_ATTRS = testEl.className === 'a' ? {} : {
+ 'for' : 'htmlFor',
+ 'class': 'className'
+ };
+ }
for (attr in attrs) {
if (attrs.hasOwnProperty(attr)) {
- node.setAttribute(attr, attrs[attr]);
+ node.setAttribute(CUSTOM_ATTRS[attr] || attr, attrs[attr]);
}
}
@@ -996,7 +1023,7 @@ Transaction.prototype = {
node = req.node,
self = this,
ua = Y.UA,
- nodeType;
+ cssTimeout, nodeType;
if (!node) {
if (isScript) {
@@ -1016,9 +1043,14 @@ Transaction.prototype = {
}
function onLoad() {
+ if (cssTimeout) {
+ clearTimeout(cssTimeout);
+ }
+
self._progress(null, req);
}
+
// Deal with script asynchronicity.
if (isScript) {
node.setAttribute('src', req.url);
@@ -1078,6 +1110,12 @@ Transaction.prototype = {
// evens the playing field with older IEs.
node.onerror = onError;
node.onload = onLoad;
+
+ // If this browser doesn't fire an event when CSS fails to load,
+ // fail after a timeout to avoid blocking the transaction queue.
+ if (!env.cssFail && !isScript) {
+ cssTimeout = setTimeout(onError, req.timeout || 3000);
+ }
}
this._waiting += 1;
View
536 js/loader-base.js
@@ -13,7 +13,7 @@ if (!YUI.Env[Y.version]) {
BUILD = '/build/',
ROOT = VERSION + BUILD,
CDN_BASE = Y.Env.base,
- GALLERY_VERSION = 'gallery-2012.02.01-21-35',
+ GALLERY_VERSION = 'gallery-2012.05.02-20-10',
TNT = '2in3',
TNT_VERSION = '4',
YUI2_VERSION = '2.9.0',
@@ -34,18 +34,28 @@ if (!YUI.Env[Y.version]) {
groups: {},
patterns: {} },
groups = META.groups,
- yui2Update = function(tnt, yui2) {
- var root = TNT + '.' +
- (tnt || TNT_VERSION) + '/' +
- (yui2 || YUI2_VERSION) + BUILD;
- groups.yui2.base = CDN_BASE + root;
- groups.yui2.root = root;
- },
- galleryUpdate = function(tag) {
- var root = (tag || GALLERY_VERSION) + BUILD;
- groups.gallery.base = CDN_BASE + root;
- groups.gallery.root = root;
- };
+ yui2Update = function(tnt, yui2, config) {
+
+ var root = TNT + '.' +
+ (tnt || TNT_VERSION) + '/' +
+ (yui2 || YUI2_VERSION) + BUILD,
+ base = (config && config.base) ? config.base : CDN_BASE,
+ combo = (config && config.comboBase) ? config.comboBase : COMBO_BASE;
+
+ groups.yui2.base = base + root;
+ groups.yui2.root = root;
+ groups.yui2.comboBase = combo;
+ },
+ galleryUpdate = function(tag, config) {
+ var root = (tag || GALLERY_VERSION) + BUILD,
+ base = (config && config.base) ? config.base : CDN_BASE,
+ combo = (config && config.comboBase) ? config.comboBase : COMBO_BASE;
+
+ groups.gallery.base = base + root;
+ groups.gallery.root = root;
+ groups.gallery.comboBase = combo;
+ };
+
groups[VERSION] = {};
@@ -88,6 +98,8 @@ if (!YUI.Env[Y.version]) {
}
+/*jslint forin: true */
+
/**
* Loader dynamically loads script and css files. It includes the dependency
* information for the version of the library in use, and will automatically pull in
@@ -109,6 +121,7 @@ var NOT_FOUND = {},
CSS = 'css',
JS = 'js',
INTL = 'intl',
+ DEFAULT_SKIN = 'sam',
VERSION = Y.version,
ROOT_LANG = '',
YObject = Y.Object,
@@ -122,14 +135,14 @@ var NOT_FOUND = {},
modulekey,
cache,
_path = function(dir, file, type, nomin) {
- var path = dir + '/' + file;
- if (!nomin) {
- path += '-min';
- }
- path += '.' + (type || CSS);
+ var path = dir + '/' + file;
+ if (!nomin) {
+ path += '-min';
+ }
+ path += '.' + (type || CSS);
- return path;
- };
+ return path;
+ };
/**
* The component metadata is stored in Y.Env.meta.
@@ -142,106 +155,48 @@ Y.Env.meta = META;
/**
* Loader dynamically loads script and css files. It includes the dependency
* info for the version of the library in use, and will automatically pull in
- * dependencies for the modules requested. It supports rollup files and will
- * automatically use these when appropriate in order to minimize the number of
- * http connections required to load all of the dependencies. It can load the
+ * dependencies for the modules requested. It can load the
* files from the Yahoo! CDN, and it can utilize the combo service provided on
* this network to reduce the number of http connections required to download
- * YUI files.
- *
- * While the loader can be instantiated by the end user, it normally is not.
- * @see YUI.use for the normal use case. The use function automatically will
- * pull in missing dependencies.
- *
+ * YUI files. You can also specify an external, custom combo service to host
+ * your modules as well.
+
+ var Y = YUI();
+ var loader = new Y.Loader({
+ filter: 'debug',
+ base: '../../',
+ root: 'build/',
+ combine: true,
+ require: ['node', 'dd', 'console']
+ });
+ var out = loader.resolve(true);
+
* @constructor
* @class Loader
- * @param {object} o an optional set of configuration options. Valid options:
- * <ul>
- * <li>base:
- * The base dir</li>
- * <li>comboBase:
- * The YUI combo service base dir. Ex: http://yui.yahooapis.com/combo?</li>
- * <li>root:
- * The root path to prepend to module names for the combo service.
- * Ex: 2.5.2/build/</li>
- * <li>filter:.
- *
- * A filter to apply to result urls. This filter will modify the default
- * path for all modules. The default path for the YUI library is the
- * minified version of the files (e.g., event-min.js). The filter property
- * can be a predefined filter or a custom filter. The valid predefined
- * filters are:
- * <dl>
- * <dt>DEBUG</dt>
- * <dd>Selects the debug versions of the library (e.g., event-debug.js).
- * This option will automatically include the Logger widget</dd>
- * <dt>RAW</dt>
- * <dd>Selects the non-minified version of the library (e.g., event.js).
- * </dd>
- * </dl>
- * You can also define a custom filter, which must be an object literal
- * containing a search expression and a replace string:
- * <pre>
- * myFilter: &#123;
- * 'searchExp': "-min\\.js",
- * 'replaceStr': "-debug.js"
- * &#125;
- * </pre>
- *
- * </li>
- * <li>filters: per-component filter specification. If specified
- * for a given component, this overrides the filter config. _Note:_ This does not work on combo urls, use the filter property instead.</li>
- * <li>combine:
- * Use the YUI combo service to reduce the number of http connections
- * required to load your dependencies</li>
- * <li>ignore:
- * A list of modules that should never be dynamically loaded</li>
- * <li>force:
- * A list of modules that should always be loaded when required, even if
- * already present on the page</li>
- * <li>insertBefore:
- * Node or id for a node that should be used as the insertion point for
- * new nodes</li>
- * <li>charset:
- * charset for dynamic nodes (deprecated, use jsAttributes or cssAttributes)
- * </li>
- * <li>jsAttributes: object literal containing attributes to add to script
- * nodes</li>
- * <li>cssAttributes: object literal containing attributes to add to link
- * nodes</li>
- * <li>timeout:
- * The number of milliseconds before a timeout occurs when dynamically
- * loading nodes. If not set, there is no timeout</li>
- * <li>context:
- * execution context for all callbacks</li>
- * <li>onSuccess:
- * callback for the 'success' event</li>
- * <li>onFailure: callback for the 'failure' event</li>
- * <li>onCSS: callback for the 'CSSComplete' event. When loading YUI
- * components with CSS the CSS is loaded first, then the script. This
- * provides a moment you can tie into to improve
- * the presentation of the page while the script is loading.</li>
- * <li>onTimeout:
- * callback for the 'timeout' event</li>
- * <li>onProgress:
- * callback executed each time a script or css file is loaded</li>
- * <li>modules:
- * A list of module definitions. See Loader.addModule for the supported
- * module metadata</li>
- * <li>groups:
- * A list of group definitions. Each group can contain specific definitions
- * for base, comboBase, combine, and accepts a list of modules. See above
- * for the description of these properties.</li>
- * <li>2in3: the version of the YUI 2 in 3 wrapper to use. The intrinsic
- * support for YUI 2 modules in YUI 3 relies on versions of the YUI 2
- * components inside YUI 3 module wrappers. These wrappers
- * change over time to accomodate the issues that arise from running YUI 2
- * in a YUI 3 sandbox.</li>
- * <li>yui2: when using the 2in3 project, you can select the version of
- * YUI 2 to use. Valid values * are 2.2.2, 2.3.1, 2.4.1, 2.5.2, 2.6.0,
- * 2.7.0, 2.8.0, and 2.8.1 [default] -- plus all versions of YUI 2
- * going forward.</li>
- * </ul>
+ * @param {Object} config an optional set of configuration options.
+ * @param {String} config.base The base dir which to fetch this module from
+ * @param {String} config.comboBase The Combo service base path. Ex: `http://yui.yahooapis.com/combo?`
+ * @param {String} config.root The root path to prepend to module names for the combo service. Ex: `2.5.2/build/`
+ * @param {String|Object} config.filter A filter to apply to result urls. <a href="#property_filter">See filter property</a>
+ * @param {Object} config.filters Per-component filter specification. If specified for a given component, this overrides the filter config.
+ * @param {Boolean} config.combine Use a combo service to reduce the number of http connections required to load your dependencies
+ * @param {Boolean} [config.async=true] Fetch files in async
+ * @param {Array} config.ignore: A list of modules that should never be dynamically loaded
+ * @param {Array} config.force A list of modules that should always be loaded when required, even if already present on the page
+ * @param {HTMLElement|String} config.insertBefore Node or id for a node that should be used as the insertion point for new nodes
+ * @param {Object} config.jsAttributes Object literal containing attributes to add to script nodes
+ * @param {Object} config.cssAttributes Object literal containing attributes to add to link nodes
+ * @param {Number} config.timeout The number of milliseconds before a timeout occurs when dynamically loading nodes. If not set, there is no timeout
+ * @param {Object} config.context Execution context for all callbacks
+ * @param {Function} config.onSuccess Callback for the 'success' event
+ * @param {Function} config.onFailure Callback for the 'failure' event
+ * @param {Function} config.onCSS Callback for the 'CSSComplete' event. When loading YUI components with CSS the CSS is loaded first, then the script. This provides a moment you can tie into to improve the presentation of the page while the script is loading.
+ * @param {Function} config.onTimeout Callback for the 'timeout' event
+ * @param {Function} config.onProgress Callback executed each time a script or css file is loaded
+ * @param {Object} config.modules A list of module definitions. See <a href="#method_addModule">Loader.addModule</a> for the supported module metadata
+ * @param {Object} config.groups A list of group definitions. Each group can contain specific definitions for `base`, `comboBase`, `combine`, and accepts a list of `modules`.
+ * @param {String} config.2in3 The version of the YUI 2 in 3 wrapper to use. The intrinsic support for YUI 2 modules in YUI 3 relies on versions of the YUI 2 components inside YUI 3 module wrappers. These wrappers change over time to accomodate the issues that arise from running YUI 2 in a YUI 3 sandbox.
+ * @param {String} config.yui2 When using the 2in3 project, you can select the version of YUI 2 to use. Valid values are `2.2.2`, `2.3.1`, `2.4.1`, `2.5.2`, `2.6.0`, `2.7.0`, `2.8.0`, `2.8.1` and `2.9.0` [default] -- plus all versions of YUI 2 going forward.
*/
Y.Loader = function(o) {
@@ -382,7 +337,7 @@ Y.Loader = function(o) {
*/
self.comboSep = '&';
/**
- * Max url length for combo urls. The default is 2048. This is the URL
+ * Max url length for combo urls. The default is 1024. This is the URL
* limit for the Yahoo! hosted combo servers. If consuming
* a different combo service that has a different URL limit
* it is possible to override this default by supplying
@@ -461,12 +416,12 @@ Y.Loader = function(o) {
* </dl>
* You can also define a custom filter, which must be an object literal
* containing a search expression and a replace string:
- * <pre>
- * myFilter: &#123;
- * 'searchExp': "-min\\.js",
- * 'replaceStr': "-debug.js"
- * &#125;
- * </pre>
+ *
+ * myFilter: {
+ * 'searchExp': "-min\\.js",
+ * 'replaceStr': "-debug.js"
+ * }
+ *
* @property filter
* @type string| {searchExp: string, replaceStr: string}
*/
@@ -515,29 +470,27 @@ Y.Loader = function(o) {
* being loaded for calendar (if calendar was requested), and
* 'sam' for all other skinnable components:
*
- * <code>
- * skin: {
- *
- * // The default skin, which is automatically applied if not
- * // overriden by a component-specific skin definition.
- * // Change this in to apply a different skin globally
- * defaultSkin: 'sam',
+ * skin: {
+ * // The default skin, which is automatically applied if not
+ * // overriden by a component-specific skin definition.
+ * // Change this in to apply a different skin globally
+ * defaultSkin: 'sam',
*
- * // This is combined with the loader base property to get
- * // the default root directory for a skin. ex:
- * // http://yui.yahooapis.com/2.3.0/build/assets/skins/sam/
- * base: 'assets/skins/',
- *
- * // Any component-specific overrides can be specified here,
- * // making it possible to load different skins for different
- * // components. It is possible to load more than one skin
- * // for a given component as well.
- * overrides: {
- * calendar: ['skin1', 'skin2']
+ * // This is combined with the loader base property to get
+ * // the default root directory for a skin. ex:
+ * // http://yui.yahooapis.com/2.3.0/build/assets/skins/sam/
+ * base: 'assets/skins/',
+ *
+ * // Any component-specific overrides can be specified here,
+ * // making it possible to load different skins for different
+ * // components. It is possible to load more than one skin
+ * // for a given component as well.
+ * overrides: {
+ * calendar: ['skin1', 'skin2']
+ * }
* }
- * }
- * </code>
- * @property skin
+ * @property skin
+ * @type {Object}
*/
self.skin = Y.merge(Y.Env.meta.skin);
@@ -582,6 +535,13 @@ Y.Loader = function(o) {
*/
self.loaded = GLOBAL_LOADED[VERSION];
+
+ /**
+ * Should Loader fetch scripts in `async`, defaults to `true`
+ * @property async
+ */
+
+ self.async = true;
self._inspectPage();
@@ -596,6 +556,12 @@ Y.Loader = function(o) {
if (Y.config.tests) {
self.testresults = Y.config.tests;
}
+
+ /*
+ if (self.ignoreRegistered) {
+ self.loaded = {};
+ }
+ */
/**
* List of rollup files found in the library metadata
@@ -662,9 +628,39 @@ Y.Loader = function(o) {
*/
//self.results = {};
+ if (self.ignoreRegistered) {
+ //Clear inpage already processed modules.
+ self.resetModules();
+ }
+
};
Y.Loader.prototype = {
+ resetModules: function() {
+ var self = this;
+ oeach(self.moduleInfo, function(mod) {
+ var name = mod.name,
+ details = (YUI.Env.mods[name] ? YUI.Env.mods[name].details : null);
+
+ if (details) {
+ self.moduleInfo[name]._reset = true;
+ self.moduleInfo[name].requires = details.requires || [];
+ self.moduleInfo[name].optional = details.optional || [];
+ self.moduleInfo[name].supersedes = details.supercedes || [];
+ }
+
+ if (mod.defaults) {
+ oeach(mod.defaults, function(val, key) {
+ if (mod[key]) {
+ mod[key] = mod.defaults[key];
+ }
+ });
+ }
+ if (mod.skinnable) {
+ self._addSkin(self.skin.defaultSkin, mod.name);
+ }
+ });
+ },
/**
Regex that matches a CSS URL. Used to guess the file type when it's not
specified.
@@ -796,6 +792,7 @@ Y.Loader.prototype = {
/**
* Apply a new config to the Loader instance
* @method _config
+ * @private
* @param {Object} o The new configuration
*/
_config: function(o) {
@@ -823,16 +820,21 @@ Y.Loader.prototype = {
groupName = j;
group = val[j];
self.addGroup(group, groupName);
+ if (group.aliases) {
+ oeach(group.aliases, self.addAlias, self);
+ }
}
}
} else if (i == 'modules') {
// add a hash of module definitions
oeach(val, self.addModule, self);
+ } else if (i === 'aliases') {
+ oeach(val, self.addAlias, self);
} else if (i == 'gallery') {
- this.groups.gallery.update(val);
+ this.groups.gallery.update(val, o);
} else if (i == 'yui2' || i == '2in3') {
- this.groups.yui2.update(o['2in3'], o.yui2);
+ this.groups.yui2.update(o['2in3'], o.yui2, o);
} else {
self[i] = val;
}
@@ -851,9 +853,12 @@ Y.Loader.prototype = {
self.require('yui-log', 'dump');
}
}
+
if (self.lang) {
- self.require('intl-base', 'intl');
+ //Removed this so that when Loader is invoked
+ //it doesn't request what it doesn't need.
+ //self.require('intl-base', 'intl');
}
},
@@ -899,6 +904,7 @@ Y.Loader.prototype = {
mdef = info[mod];
pkg = mdef.pkg || mod;
nmod = {
+ skin: true,
name: name,
group: mdef.group,
type: 'css',
@@ -920,21 +926,48 @@ Y.Loader.prototype = {
return name;
},
-
+ /**
+ * Adds an alias module to the system
+ * @method addAlias
+ * @param {Array} use An array of modules that makes up this alias
+ * @param {String} name The name of the alias
+ * @example
+ * var loader = new Y.Loader({});
+ * loader.addAlias([ 'node', 'yql' ], 'davglass');
+ * loader.require(['davglass']);
+ * var out = loader.resolve(true);
+ *
+ * //out.js will contain Node and YQL modules
+ */
+ addAlias: function(use, name) {
+ YUI.Env.aliases[name] = use;
+ this.addModule({
+ name: name,
+ use: use
+ });
+ },
/**
* Add a new module group
- * <dl>
- * <dt>name:</dt> <dd>required, the group name</dd>
- * <dt>base:</dt> <dd>The base dir for this module group</dd>
- * <dt>root:</dt> <dd>The root path to add to each combo
- * resource path</dd>
- * <dt>combine:</dt> <dd>combo handle</dd>
- * <dt>comboBase:</dt> <dd>combo service base path</dd>
- * <dt>modules:</dt> <dd>the group of modules</dd>
- * </dl>
* @method addGroup
- * @param {object} o An object containing the module data.
- * @param {string} name the group name.
+ * @param {Object} config An object containing the group configuration data
+ * @param {String} config.name required, the group name
+ * @param {String} config.base The base directory for this module group
+ * @param {String} config.root The root path to add to each combo resource path
+ * @param {Boolean} config.combine Should the request be combined
+ * @param {String} config.comboBase Combo service base path
+ * @param {Object} config.modules The group of modules
+ * @param {String} name the group name.
+ * @example
+ * var loader = new Y.Loader({});
+ * loader.addGroup({
+ * name: 'davglass',
+ * combine: true,
+ * comboBase: '/combo?',
+ * root: '',
+ * modules: {
+ * //Module List here
+ * }
+ * }, 'davglass');
*/
addGroup: function(o, name) {
var mods = o.modules,
@@ -963,59 +996,37 @@ Y.Loader.prototype = {
/**
* Add a new module to the component metadata.
- * <dl>
- * <dt>name:</dt> <dd>required, the component name</dd>
- * <dt>type:</dt> <dd>required, the component type (js or css)
- * &