dom-min.js revision aab1eeae8965892252706bf128f878101c5a01b1
YUI.add("dom-base",function(D){(function(J){var T="nodeType",G="ownerDocument",F="documentElement",E="defaultView",L="parentWindow",O="tagName",Q="parentNode",S="firstChild",N="previousSibling",R="nextSibling",M="contains",I="compareDocumentPosition",H="",P=J.config.doc.documentElement,K=/<([a-z]+)/i;J.DOM={byId:function(V,U){return J.DOM.allById(V,U)[0]||null;},children:function(W,U){var V=[];if(W){U=U||"*";V=J.Selector.query("> "+U,W);}return V;},firstByTag:function(U,V){var W;V=V||J.config.doc;if(U&&V.getElementsByTagName){W=V.getElementsByTagName(U)[0];}return W||null;},getText:(P.textContent!==undefined)?function(V){var U="";if(V){U=V.textContent;}return U||"";}:function(V){var U="";if(V){U=V.innerText||V.nodeValue;}return U||"";},setText:(P.textContent!==undefined)?function(U,V){if(U){U.textContent=V;}}:function(U,V){if(U){U.innerText=V;}},previous:function(U,W,V){return J.DOM.elementByAxis(U,N,W,V);},next:function(U,W,V){return J.DOM.elementByAxis(U,R,W,V);},ancestor:function(V,W,X){var U=null;if(X){U=(!W||W(V))?V:null;}return U||J.DOM.elementByAxis(V,Q,W,null);},ancestors:function(W,X,Y){var V=J.DOM.ancestor.apply(J.DOM,arguments),U=(V)?[V]:[];while((V=J.DOM.ancestor(V,X))){if(V){U.unshift(V);}}return U;},elementByAxis:function(U,X,W,V){while(U&&(U=U[X])){if((V||U[O])&&(!W||W(U))){return U;}}return null;},contains:function(V,W){var U=false;if(!W||!V||!W[T]||!V[T]){U=false;}else{if(V[M]){if(J.UA.opera||W[T]===1){U=V[M](W);}else{U=J.DOM._bruteContains(V,W);}}else{if(V[I]){if(V===W||!!(V[I](W)&16)){U=true;}}}}return U;},inDoc:function(W,X){var V=false,U;if(W&&W.nodeType){(X)||(X=W[G]);U=X[F];if(U&&U.contains&&W.tagName){V=U.contains(W);}else{V=J.DOM.contains(U,W);}}return V;},allById:function(Z,U){U=U||J.config.doc;var V=[],W=[],X,Y;if(U.querySelectorAll){W=U.querySelectorAll('[id="'+Z+'"]');}else{if(U.all){V=U.all(Z);if(V&&V.nodeType){V=[V];}if(V&&V.length){for(X=0;Y=V[X++];){if(Y.attributes&&Y.attributes.id&&Y.attributes.id.value===Z){W.push(Y);}}}}else{W=[J.DOM._getDoc(U).getElementById(Z)];}}return W;},create:function(Z,b){if(typeof Z==="string"){Z=J.Lang.trim(Z);}b=b||J.config.doc;var V=K.exec(Z),Y=J.DOM._create,a=J.DOM.creators,X=null,U,W;if(Z!=undefined){if(V&&a[V[1]]){if(typeof a[V[1]]==="function"){Y=a[V[1]];}else{U=a[V[1]];}}W=Y(Z,b,U).childNodes;if(W.length===1){X=W[0].parentNode.removeChild(W[0]);}else{if(W[0]&&W[0].className==="yui3-big-dummy"){if(W.length===2){X=W[0].nextSibling;}else{W[0].parentNode.removeChild(W[0]);X=J.DOM._nl2frag(W,b);}}else{X=J.DOM._nl2frag(W,b);}}}return X;},_nl2frag:function(V,Y){var W=null,X,U;if(V&&(V.push||V.item)&&V[0]){Y=Y||V[0].ownerDocument;W=Y.createDocumentFragment();if(V.item){V=J.Array(V,0,true);}for(X=0,U=V.length;X<U;X++){W.appendChild(V[X]);}}return W;},CUSTOM_ATTRIBUTES:(!P.hasAttribute)?{"for":"htmlFor","class":"className"}:{"htmlFor":"for","className":"class"},setAttribute:function(W,U,X,V){if(W&&U&&W.setAttribute){U=J.DOM.CUSTOM_ATTRIBUTES[U]||U;W.setAttribute(U,X,V);}},getAttribute:function(X,U,W){W=(W!==undefined)?W:2;var V="";if(X&&U&&X.getAttribute){U=J.DOM.CUSTOM_ATTRIBUTES[U]||U;V=X.getAttribute(U,W);if(V===null){V="";}}return V;},isWindow:function(U){return !!(U&&U.alert&&U.document);},_fragClones:{},_create:function(V,W,U){U=U||"div";var X=J.DOM._fragClones[U];if(X){X=X.cloneNode(false);}else{X=J.DOM._fragClones[U]=W.createElement(U);}X.innerHTML=V;return X;},_removeChildNodes:function(U){while(U.firstChild){U.removeChild(U.firstChild);}},addHTML:function(Y,X,V){var U=Y.parentNode,W;if(X!==undefined&&X!==null){if(X.nodeType){W=X;}else{W=J.DOM.create(X);}}if(V){if(V.nodeType){V.parentNode.insertBefore(W,V);}else{switch(V){case"replace":while(Y.firstChild){Y.removeChild(Y.firstChild);}if(W){Y.appendChild(W);}break;case"before":U.insertBefore(W,Y);break;case"after":if(Y.nextSibling){U.insertBefore(W,Y.nextSibling);}else{U.appendChild(W);}break;default:Y.appendChild(W);}}}else{Y.appendChild(W);}return W;},VALUE_SETTERS:{},VALUE_GETTERS:{},getValue:function(W){var V="",U;if(W&&W[O]){U=J.DOM.VALUE_GETTERS[W[O].toLowerCase()];if(U){V=U(W);}else{V=W.value;}}if(V===H){V=H;}return(typeof V==="string")?V:"";},setValue:function(U,V){var W;if(U&&U[O]){W=J.DOM.VALUE_SETTERS[U[O].toLowerCase()];if(W){W(U,V);}else{U.value=V;}}},siblings:function(X,W){var U=[],V=X;while((V=V[N])){if(V[O]&&(!W||W(V))){U.unshift(V);}}V=X;while((V=V[R])){if(V[O]&&(!W||W(V))){U.push(V);}}return U;},_bruteContains:function(U,V){while(V){if(U===V){return true;}V=V.parentNode;}return false;},_getRegExp:function(V,U){U=U||"";J.DOM._regexCache=J.DOM._regexCache||{};if(!J.DOM._regexCache[V+U]){J.DOM._regexCache[V+U]=new RegExp(V,U);}return J.DOM._regexCache[V+U];},_getDoc:function(U){var V=J.config.doc;if(U){V=(U[T]===9)?U:U[G]||U.document||J.config.doc;}return V;},_getWin:function(U){var V=J.DOM._getDoc(U);return V[E]||V[L]||J.config.win;},_batch:function(U,d,a,Z,Y,W){d=(typeof d==="string")?J.DOM[d]:d;var e,c=Array.prototype.slice.call(arguments,2),X=0,V,b;if(d&&U){while((V=U[X++])){e=e=d.call(J.DOM,V,a,Z,Y,W);if(typeof e!=="undefined"){(b)||(b=[]);b.push(e);}}}return(typeof b!=="undefined")?b:U;},creators:{}};(function(Z){var a=Z.DOM.creators,U=Z.DOM.create,X=/(?:\/(?:thead|tfoot|tbody|caption|col|colgroup)>)+\s*<tbody/,W="<table>",V="</table>";if(Z.UA.ie){Z.mix(a,{tbody:function(b,c){var d=U(W+b+V,c),Y=d.children.tags("tbody")[0];if(d.children.length>1&&Y&&!X.test(b)){Y[Q].removeChild(Y);}return d;},script:function(Y,b){var c=b.createElement("div");c.innerHTML="-"+Y;c.removeChild(c[S]);return c;}},true);Z.mix(Z.DOM.VALUE_GETTERS,{button:function(Y){return(Y.attributes&&Y.attributes.value)?Y.attributes.value.value:"";}});Z.mix(Z.DOM.VALUE_SETTERS,{button:function(b,c){var Y=b.attributes.value;if(!Y){Y=b[G].createAttribute("value");b.setAttributeNode(Y);}Y.value=c;},select:function(d,e){for(var b=0,Y=d.getElementsByTagName("option"),c;c=Y[b++];){if(Z.DOM.getValue(c)===e){Z.DOM.setAttribute(c,"selected",true);break;}}}});Z.DOM.creators.col=Z.DOM.creators.link=Z.DOM.creators.style=Z.DOM.creators.script;
}if(Z.UA.gecko||Z.UA.ie){Z.mix(a,{option:function(Y,b){return U('<select><option class="yui3-big-dummy" selected></option>'+Y+"</select>",b);},tr:function(Y,b){return U("<tbody>"+Y+"</tbody>",b);},td:function(Y,b){return U("<tr>"+Y+"</tr>",b);},tbody:function(Y,b){return U(W+Y+V,b);}});Z.mix(a,{legend:"fieldset",th:a.td,thead:a.tbody,tfoot:a.tbody,caption:a.tbody,colgroup:a.tbody,col:a.tbody,optgroup:a.option});}Z.mix(Z.DOM.VALUE_GETTERS,{option:function(b){var Y=b.attributes;return(Y.value&&Y.value.specified)?b.value:b.text;},select:function(b){var c=b.value,Y=b.options;if(Y&&Y.length&&c===""){if(b.multiple){}else{c=Z.DOM.getValue(Y[b.selectedIndex]);}}return c;}});})(J);})(D);var B,A,C;D.mix(D.DOM,{hasClass:function(G,F){var E=D.DOM._getRegExp("(?:^|\\s+)"+F+"(?:\\s+|$)");return E.test(G.className);},addClass:function(F,E){if(!D.DOM.hasClass(F,E)){F.className=D.Lang.trim([F.className,E].join(" "));}},removeClass:function(F,E){if(E&&A(F,E)){F.className=D.Lang.trim(F.className.replace(D.DOM._getRegExp("(?:^|\\s+)"+E+"(?:\\s+|$)")," "));if(A(F,E)){C(F,E);}}},replaceClass:function(F,E,G){C(F,E);B(F,G);},toggleClass:function(F,E,G){var H=(G!==undefined)?G:!(A(F,E));if(H){B(F,E);}else{C(F,E);}}});A=D.DOM.hasClass;C=D.DOM.removeClass;B=D.DOM.addClass;D.mix(D.DOM,{setWidth:function(F,E){D.DOM._setSize(F,"width",E);},setHeight:function(F,E){D.DOM._setSize(F,"height",E);},_setSize:function(F,H,G){G=(G>0)?G:0;var E=0;F.style[H]=G+"px";E=(H==="height")?F.offsetHeight:F.offsetWidth;if(E>G){G=G-(E-G);if(G<0){G=0;}F.style[H]=G+"px";}}});},"@VERSION@",{requires:["oop"]});YUI.add("dom-style",function(A){(function(E){var O="documentElement",B="defaultView",N="ownerDocument",H="style",I="float",Q="cssFloat",R="styleFloat",K="transparent",D="getComputedStyle",C="getBoundingClientRect",G=E.config.doc,S=undefined,P=E.DOM,F="transform",L=["WebkitTransform","MozTransform","OTransform"],M=/color$/i,J=/width|height|top|left|right|bottom|margin|padding/i;E.Array.each(L,function(T){if(T in G[O].style){F=T;}});E.mix(P,{DEFAULT_UNIT:"px",CUSTOM_STYLES:{},setStyle:function(W,T,Y,V){V=V||W.style;var U=P.CUSTOM_STYLES,X;if(V){if(Y===null||Y===""){Y="";}else{if(!isNaN(new Number(Y))&&J.test(T)){Y+=P.DEFAULT_UNIT;}}if(T in U){if(U[T].set){U[T].set(W,Y,V);return;}else{if(typeof U[T]==="string"){T=U[T];}}}V[T]=Y;}},getStyle:function(W,T,V){V=V||W.style;var U=P.CUSTOM_STYLES,X="";if(V){if(T in U){if(U[T].get){return U[T].get(W,T,V);}else{if(typeof U[T]==="string"){T=U[T];}}}X=V[T];if(X===""){X=P[D](W,T);}}return X;},setStyles:function(U,V){var T=U.style;E.each(V,function(W,X){P.setStyle(U,X,W,T);},P);},getComputedStyle:function(U,T){var W="",V=U[N];if(U[H]&&V[B]&&V[B][D]){W=V[B][D](U,null)[T];}return W;}});if(G[O][H][Q]!==S){P.CUSTOM_STYLES[I]=Q;}else{if(G[O][H][R]!==S){P.CUSTOM_STYLES[I]=R;}}if(E.UA.opera){P[D]=function(V,U){var T=V[N][B],W=T[D](V,"")[U];if(M.test(U)){W=E.Color.toRGB(W);}return W;};}if(E.UA.webkit){P[D]=function(V,U){var T=V[N][B],W=T[D](V,"")[U];if(W==="rgba(0, 0, 0, 0)"){W=K;}return W;};}E.DOM._getAttrOffset=function(X,U){var Z=E.DOM[D](X,U),W=X.offsetParent,T,V,Y;if(Z==="auto"){T=E.DOM.getStyle(X,"position");if(T==="static"||T==="relative"){Z=0;}else{if(W&&W[C]){V=W[C]()[U];Y=X[C]()[U];if(U==="left"||U==="top"){Z=Y-V;}else{Z=V-X[C]()[U];}}}}return Z;};E.DOM._getOffset=function(T){var V,U=null;if(T){V=P.getStyle(T,"position");U=[parseInt(P[D](T,"left"),10),parseInt(P[D](T,"top"),10)];if(isNaN(U[0])){U[0]=parseInt(P.getStyle(T,"left"),10);if(isNaN(U[0])){U[0]=(V==="relative")?0:T.offsetLeft||0;}}if(isNaN(U[1])){U[1]=parseInt(P.getStyle(T,"top"),10);if(isNaN(U[1])){U[1]=(V==="relative")?0:T.offsetTop||0;}}}return U;};P.CUSTOM_STYLES.transform={set:function(U,V,T){T[F]=V;},get:function(U,T){return P[D](U,F);}};})(A);(function(D){var B=parseInt,C=RegExp;D.Color={KEYWORDS:{black:"000",silver:"c0c0c0",gray:"808080",white:"fff",maroon:"800000",red:"f00",purple:"800080",fuchsia:"f0f",green:"008000",lime:"0f0",olive:"808000",yellow:"ff0",navy:"000080",blue:"00f",teal:"008080",aqua:"0ff"},re_RGB:/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,re_hex:/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,re_hex3:/([0-9A-F])/gi,toRGB:function(E){if(!D.Color.re_RGB.test(E)){E=D.Color.toHex(E);}if(D.Color.re_hex.exec(E)){E="rgb("+[B(C.$1,16),B(C.$2,16),B(C.$3,16)].join(", ")+")";}return E;},toHex:function(F){F=D.Color.KEYWORDS[F]||F;if(D.Color.re_RGB.exec(F)){F=[Number(C.$1).toString(16),Number(C.$2).toString(16),Number(C.$3).toString(16)];for(var E=0;E<F.length;E++){if(F[E].length<2){F[E]="0"+F[E];}}F=F.join("");}if(F.length<6){F=F.replace(D.Color.re_hex3,"$1$1");}if(F!=="transparent"&&F.indexOf("#")<0){F="#"+F;}return F.toUpperCase();}};})(A);},"@VERSION@",{requires:["dom-base"]});YUI.add("dom-screen",function(A){(function(F){var D="documentElement",Q="compatMode",O="position",C="fixed",M="relative",G="left",H="top",I="BackCompat",P="medium",E="borderLeftWidth",B="borderTopWidth",R="getBoundingClientRect",K="getComputedStyle",L=F.DOM,N=/^t(?:able|d|h)$/i,J;if(F.UA.ie){if(F.config.doc[Q]!=="quirks"){J=D;}else{J="body";}}F.mix(L,{winHeight:function(T){var S=L._getWinSize(T).height;return S;},winWidth:function(T){var S=L._getWinSize(T).width;return S;},docHeight:function(T){var S=L._getDocSize(T).height;return Math.max(S,L._getWinSize(T).height);},docWidth:function(T){var S=L._getDocSize(T).width;return Math.max(S,L._getWinSize(T).width);},docScrollX:function(U,V){V=V||(U)?L._getDoc(U):F.config.doc;var T=V.defaultView,S=(T)?T.pageXOffset:0;return Math.max(V[D].scrollLeft,V.body.scrollLeft,S);},docScrollY:function(U,V){V=V||(U)?L._getDoc(U):F.config.doc;var T=V.defaultView,S=(T)?T.pageYOffset:0;return Math.max(V[D].scrollTop,V.body.scrollTop,S);},getXY:function(){if(F.config.doc[D][R]){return function(X){var e=null,Y,U,Z,c,b,T,W,a,d,S,V;if(X&&X.tagName){d=X.ownerDocument;V=d[D];if(V.contains){S=V.contains(X);}else{S=F.DOM.contains(V,X);}if(S){Y=(J)?d[J].scrollLeft:L.docScrollX(X,d);U=(J)?d[J].scrollTop:L.docScrollY(X,d);Z=X[R]();
e=[Z.left,Z.top];if(F.UA.ie){c=2;b=2;a=d[Q];T=L[K](d[D],E);W=L[K](d[D],B);if(F.UA.ie===6){if(a!==I){c=0;b=0;}}if((a==I)){if(T!==P){c=parseInt(T,10);}if(W!==P){b=parseInt(W,10);}}e[0]-=c;e[1]-=b;}if((U||Y)){if(!F.UA.ios){e[0]+=Y;e[1]+=U;}}}else{e=L._getOffset(X);}}return e;};}else{return function(T){var W=null,V,S,Y,U,X;if(T){if(L.inDoc(T)){W=[T.offsetLeft,T.offsetTop];V=T.ownerDocument;S=T;Y=((F.UA.gecko||F.UA.webkit>519)?true:false);while((S=S.offsetParent)){W[0]+=S.offsetLeft;W[1]+=S.offsetTop;if(Y){W=L._calcBorders(S,W);}}if(L.getStyle(T,O)!=C){S=T;while((S=S.parentNode)){U=S.scrollTop;X=S.scrollLeft;if(F.UA.gecko&&(L.getStyle(S,"overflow")!=="visible")){W=L._calcBorders(S,W);}if(U||X){W[0]-=X;W[1]-=U;}}W[0]+=L.docScrollX(T,V);W[1]+=L.docScrollY(T,V);}else{W[0]+=L.docScrollX(T,V);W[1]+=L.docScrollY(T,V);}}else{W=L._getOffset(T);}}return W;};}}(),getX:function(S){return L.getXY(S)[0];},getY:function(S){return L.getXY(S)[1];},setXY:function(T,W,Z){var U=L.setStyle,Y,X,S,V;if(T&&W){Y=L.getStyle(T,O);X=L._getOffset(T);if(Y=="static"){Y=M;U(T,O,Y);}V=L.getXY(T);if(W[0]!==null){U(T,G,W[0]-V[0]+X[0]+"px");}if(W[1]!==null){U(T,H,W[1]-V[1]+X[1]+"px");}if(!Z){S=L.getXY(T);if(S[0]!==W[0]||S[1]!==W[1]){L.setXY(T,W,true);}}}else{}},setX:function(T,S){return L.setXY(T,[S,null]);},setY:function(S,T){return L.setXY(S,[null,T]);},swapXY:function(T,S){var U=L.getXY(T);L.setXY(T,L.getXY(S));L.setXY(S,U);},_calcBorders:function(U,V){var T=parseInt(L[K](U,B),10)||0,S=parseInt(L[K](U,E),10)||0;if(F.UA.gecko){if(N.test(U.tagName)){T=0;S=0;}}V[0]+=S;V[1]+=T;return V;},_getWinSize:function(V,X){X=X||(V)?L._getDoc(V):F.config.doc;var W=X.defaultView||X.parentWindow,Y=X[Q],U=W.innerHeight,T=W.innerWidth,S=X[D];if(Y&&!F.UA.opera){if(Y!="CSS1Compat"){S=X.body;}U=S.clientHeight;T=S.clientWidth;}return{height:U,width:T};},_getDocSize:function(T){var U=(T)?L._getDoc(T):F.config.doc,S=U[D];if(U[Q]!="CSS1Compat"){S=U.body;}return{height:S.scrollHeight,width:S.scrollWidth};}});})(A);(function(G){var D="top",C="right",H="bottom",B="left",F=function(L,K){var N=Math.max(L[D],K[D]),O=Math.min(L[C],K[C]),I=Math.min(L[H],K[H]),J=Math.max(L[B],K[B]),M={};M[D]=N;M[C]=O;M[H]=I;M[B]=J;return M;},E=G.DOM;G.mix(E,{region:function(J){var K=E.getXY(J),I=false;if(J&&K){I=E._getRegion(K[1],K[0]+J.offsetWidth,K[1]+J.offsetHeight,K[0]);}return I;},intersect:function(K,I,M){var J=M||E.region(K),L={},O=I,N;if(O.tagName){L=E.region(O);}else{if(G.Lang.isObject(I)){L=I;}else{return false;}}N=F(L,J);return{top:N[D],right:N[C],bottom:N[H],left:N[B],area:((N[H]-N[D])*(N[C]-N[B])),yoff:((N[H]-N[D])),xoff:(N[C]-N[B]),inRegion:E.inRegion(K,I,false,M)};},inRegion:function(L,I,J,N){var M={},K=N||E.region(L),P=I,O;if(P.tagName){M=E.region(P);}else{if(G.Lang.isObject(I)){M=I;}else{return false;}}if(J){return(K[B]>=M[B]&&K[C]<=M[C]&&K[D]>=M[D]&&K[H]<=M[H]);}else{O=F(M,K);if(O[H]>=O[D]&&O[C]>=O[B]){return true;}else{return false;}}},inViewportRegion:function(J,I,K){return E.inRegion(J,E.viewportRegion(J),I,K);},_getRegion:function(K,L,I,J){var M={};M[D]=M[1]=K;M[B]=M[0]=J;M[H]=I;M[C]=L;M.width=M[C]-M[B];M.height=M[H]-M[D];return M;},viewportRegion:function(J){J=J||G.config.doc.documentElement;var I=false,L,K;if(J){L=E.docScrollX(J);K=E.docScrollY(J);I=E._getRegion(K,E.winWidth(J)+L,K+E.winHeight(J),L);}return I;}});})(A);},"@VERSION@",{requires:["dom-base","dom-style","event-base"]});YUI.add("selector-native",function(A){(function(E){E.namespace("Selector");var C="compareDocumentPosition",D="ownerDocument";var B={_foundCache:[],useNative:true,_compare:("sourceIndex" in E.config.doc.documentElement)?function(I,H){var G=I.sourceIndex,F=H.sourceIndex;if(G===F){return 0;}else{if(G>F){return 1;}}return -1;}:(E.config.doc.documentElement[C]?function(G,F){if(G[C](F)&4){return -1;}else{return 1;}}:function(J,I){var H,F,G;if(J&&I){H=J[D].createRange();H.setStart(J,0);F=I[D].createRange();F.setStart(I,0);G=H.compareBoundaryPoints(1,F);}return G;}),_sort:function(F){if(F){F=E.Array(F,0,true);if(F.sort){F.sort(B._compare);}}return F;},_deDupe:function(F){var G=[],H,I;for(H=0;(I=F[H++]);){if(!I._found){G[G.length]=I;I._found=true;}}for(H=0;(I=G[H++]);){I._found=null;I.removeAttribute("_found");}return G;},query:function(G,N,O,F){N=N||E.config.doc;var K=[],H=(E.Selector.useNative&&E.config.doc.querySelector&&!F),J=[[G,N]],L,P,I,M=(H)?E.Selector._nativeQuery:E.Selector._bruteQuery;if(G&&M){if(!F&&(!H||N.tagName)){J=B._splitQueries(G,N);}for(I=0;(L=J[I++]);){P=M(L[0],L[1],O);if(!O){P=E.Array(P,0,true);}if(P){K=K.concat(P);}}if(J.length>1){K=B._sort(B._deDupe(K));}}return(O)?(K[0]||null):K;},_splitQueries:function(H,K){var G=H.split(","),I=[],L="",J,F;if(K){if(K.tagName){K.id=K.id||E.guid();L='[id="'+K.id+'"] ';}for(J=0,F=G.length;J<F;++J){H=L+G[J];I.push([H,K]);}}return I;},_nativeQuery:function(F,G,H){if(E.UA.webkit&&F.indexOf(":checked")>-1&&(E.Selector.pseudos&&E.Selector.pseudos.checked)){return E.Selector.query(F,G,H,true);}try{return G["querySelector"+(H?"":"All")](F);}catch(I){return E.Selector.query(F,G,H,true);}},filter:function(G,F){var H=[],I,J;if(G&&F){for(I=0;(J=G[I++]);){if(E.Selector.test(J,F)){H[H.length]=J;}}}else{}return H;},test:function(H,I,N){var L=false,G=I.split(","),F=false,O,R,M,Q,K,J,P;if(H&&H.tagName){if(!N&&!E.DOM.inDoc(H)){O=H.parentNode;if(O){N=O;}else{Q=H[D].createDocumentFragment();Q.appendChild(H);N=Q;F=true;}}N=N||H[D];if(!H.id){H.id=E.guid();}for(K=0;(P=G[K++]);){P+='[id="'+H.id+'"]';M=E.Selector.query(P,N);for(J=0;R=M[J++];){if(R===H){L=true;break;}}if(L){break;}}if(F){Q.removeChild(H);}}return L;},ancestor:function(G,F,H){return E.DOM.ancestor(G,function(I){return E.Selector.test(I,F);},H);}};E.mix(E.Selector,B,true);})(A);},"@VERSION@",{requires:["dom-base"]});YUI.add("selector-css2",function(G){var H="parentNode",D="tagName",E="attributes",A="combinator",F="pseudos",C=G.Selector,B={_reRegExpTokens:/([\^\$\?\[\]\*\+\-\.\(\)\|\\])/,SORT_RESULTS:true,_children:function(M,I){var J=M.children,L,K=[],N,O;if(M.children&&I&&M.children.tags){K=M.children.tags(I);
}else{if((!J&&M[D])||(J&&I)){N=J||M.childNodes;J=[];for(L=0;(O=N[L++]);){if(O.tagName){if(!I||I===O.tagName){J.push(O);}}}}}return J||[];},_re:{attr:/(\[[^\]]*\])/g,pseudos:/:([\-\w]+(?:\(?:['"]?(.+)['"]?\)))*/i},shorthand:{"\\#(-?[_a-z]+[-\\w]*)":"[id=$1]","\\.(-?[_a-z]+[-\\w]*)":"[className~=$1]"},operators:{"":function(J,I){return G.DOM.getAttribute(J,I)!=="";},"~=":"(?:^|\\s+){val}(?:\\s+|$)","|=":"^{val}-?"},pseudos:{"first-child":function(I){return G.Selector._children(I[H])[0]===I;}},_bruteQuery:function(N,R,T){var O=[],I=[],Q=C._tokenize(N),M=Q[Q.length-1],S=G.DOM._getDoc(R),K,J,P,L;if(M){J=M.id;P=M.className;L=M.tagName||"*";if(R.getElementsByTagName){if(J&&(R.all||(R.nodeType===9||G.DOM.inDoc(R)))){I=G.DOM.allById(J,R);}else{if(P){I=R.getElementsByClassName(P);}else{I=R.getElementsByTagName(L);}}}else{K=R.firstChild;while(K){if(K.tagName){I.push(K);}K=K.nextSilbing||K.firstChild;}}if(I.length){O=C._filterNodes(I,Q,T);}}return O;},_filterNodes:function(R,N,P){var W=0,V,X=N.length,Q=X-1,M=[],T=R[0],a=T,Y=G.Selector.getters,L,U,K,O,I,S,J,Z;for(W=0;(a=T=R[W++]);){Q=X-1;O=null;testLoop:while(a&&a.tagName){K=N[Q];J=K.tests;V=J.length;if(V&&!I){while((Z=J[--V])){L=Z[1];if(Y[Z[0]]){S=Y[Z[0]](a,Z[0]);}else{S=a[Z[0]];if(S===undefined&&a.getAttribute){S=a.getAttribute(Z[0]);}}if((L==="="&&S!==Z[2])||(typeof L!=="string"&&L.test&&!L.test(S))||(!L.test&&typeof L==="function"&&!L(a,Z[0]))){if((a=a[O])){while(a&&(!a.tagName||(K.tagName&&K.tagName!==a.tagName))){a=a[O];}}continue testLoop;}}}Q--;if(!I&&(U=K.combinator)){O=U.axis;a=a[O];while(a&&!a.tagName){a=a[O];}if(U.direct){O=null;}}else{M.push(T);if(P){return M;}break;}}}T=a=null;return M;},combinators:{" ":{axis:"parentNode"},">":{axis:"parentNode",direct:true},"+":{axis:"previousSibling",direct:true}},_parsers:[{name:E,re:/^\[(-?[a-z]+[\w\-]*)+([~\|\^\$\*!=]=?)?['"]?([^\]]*?)['"]?\]/i,fn:function(K,L){var J=K[2]||"",I=G.Selector.operators,M;if((K[1]==="id"&&J==="=")||(K[1]==="className"&&G.config.doc.documentElement.getElementsByClassName&&(J==="~="||J==="="))){L.prefilter=K[1];L[K[1]]=K[3];}if(J in I){M=I[J];if(typeof M==="string"){K[3]=K[3].replace(G.Selector._reRegExpTokens,"\\$1");M=G.DOM._getRegExp(M.replace("{val}",K[3]));}K[2]=M;}if(!L.last||L.prefilter!==K[1]){return K.slice(1);}}},{name:D,re:/^((?:-?[_a-z]+[\w-]*)|\*)/i,fn:function(J,K){var I=J[1].toUpperCase();K.tagName=I;if(I!=="*"&&(!K.last||K.prefilter)){return[D,"=",I];}if(!K.prefilter){K.prefilter="tagName";}}},{name:A,re:/^\s*([>+~]|\s)\s*/,fn:function(I,J){}},{name:F,re:/^:([\-\w]+)(?:\(['"]?(.+)['"]?\))*/i,fn:function(I,J){var K=C[F][I[1]];if(K){return[I[2],K];}else{return false;}}}],_getToken:function(I){return{tagName:null,id:null,className:null,attributes:{},combinator:null,tests:[]};},_tokenize:function(K){K=K||"";K=C._replaceShorthand(G.Lang.trim(K));var J=C._getToken(),P=K,O=[],Q=false,M,N,L,I;outer:do{Q=false;for(L=0;(I=C._parsers[L++]);){if((M=I.re.exec(K))){if(I.name!==A){J.selector=K;}K=K.replace(M[0],"");if(!K.length){J.last=true;}if(C._attrFilters[M[1]]){M[1]=C._attrFilters[M[1]];}N=I.fn(M,J);if(N===false){Q=false;break outer;}else{if(N){J.tests.push(N);}}if(!K.length||I.name===A){O.push(J);J=C._getToken(J);if(I.name===A){J.combinator=G.Selector.combinators[M[1]];}}Q=true;}}}while(Q&&K.length);if(!Q||K.length){O=[];}return O;},_replaceShorthand:function(J){var K=C.shorthand,L=J.match(C._re.attr),O=J.match(C._re.pseudos),N,M,I;if(O){J=J.replace(C._re.pseudos,"!!REPLACED_PSEUDO!!");}if(L){J=J.replace(C._re.attr,"!!REPLACED_ATTRIBUTE!!");}for(N in K){if(K.hasOwnProperty(N)){J=J.replace(G.DOM._getRegExp(N,"gi"),K[N]);}}if(L){for(M=0,I=L.length;M<I;++M){J=J.replace("!!REPLACED_ATTRIBUTE!!",L[M]);}}if(O){for(M=0,I=O.length;M<I;++M){J=J.replace("!!REPLACED_PSEUDO!!",O[M]);}}return J;},_attrFilters:{"class":"className","for":"htmlFor"},getters:{href:function(J,I){return G.DOM.getAttribute(J,I);}}};G.mix(G.Selector,B,true);G.Selector.getters.src=G.Selector.getters.rel=G.Selector.getters.href;if(G.Selector.useNative&&G.config.doc.querySelector){G.Selector.shorthand["\\.(-?[_a-z]+[-\\w]*)"]="[class~=$1]";}},"@VERSION@",{requires:["selector-native"]});YUI.add("selector",function(A){},"@VERSION@",{use:["selector-native","selector-css2"]});YUI.add("dom",function(A){},"@VERSION@",{use:["dom-base","dom-style","dom-screen","selector"]});