// ../yui/yui/yui-base-min.js
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 3.0.0
build: 1549
*/
(function(){var I={},B=new Date().getTime(),A,E,H=function(){if(window.addEventListener){return function(M,L,K,J){M.addEventListener(L,K,(!!J));};}else{if(window.attachEvent){return function(L,K,J){L.attachEvent("on"+K,J);};}else{return function(){};}}}(),F=function(){if(window.removeEventListener){return function(M,L,K,J){M.removeEventListener(L,K,!!J);};}else{if(window.detachEvent){return function(L,K,J){L.detachEvent("on"+K,J);};}else{return function(){};}}}(),D=function(){YUI.Env.windowLoaded=true;YUI.Env.DOMReady=true;F(window,"load",D);},C={"io.xdrReady":1,"io.xdrResponse":1},G=Array.prototype.slice;if(typeof YUI==="undefined"||!YUI){YUI=function(O,N,M,L,J){var K=this,R=arguments,Q,P=R.length;if(!(K instanceof YUI)){return new YUI(O,N,M,L,J);}else{K._init();for(Q=0;Q
-1){J="test";}K.version=J;K.Env={mods:{},cdn:"http://yui.yahooapis.com/"+J+"/build/",bootstrapped:false,_idx:0,_used:{},_attached:{},_yidx:0,_uidx:0,_loaded:{}};K.Env._loaded[J]={};if(YUI.Env){K.Env._yidx=(++YUI.Env._yidx);K.Env._guidp=("yui_"+J+"-"+K.Env._yidx+"-"+B).replace(/\./g,"_");K.id=K.stamp(K);I[K.id]=K;}K.constructor=YUI;K.config={win:window||{},doc:document,debug:true,useBrowserConsole:true,throwFail:true,bootstrap:true,fetchCSS:true,base:function(){var L,M,O,N;M=document.getElementsByTagName("script");for(O=0;O1)){F=2;}}catch(G){}}}return F;};E.each=(D.forEach)?function(F,G,H){D.forEach.call(F||[],G,H||B);return B;}:function(G,I,J){var F=(G&&G.length)||0,H;for(H=0;HI)?G[I]:true;}return K;};E.indexOf=(D.indexOf)?function(F,G){return D.indexOf.call(F,G);}:function(F,H){for(var G=0;G-1);};E.owns=function(G,F){return(G.hasOwnProperty(F));};E.each=function(J,I,K,H){var G=K||B,F;for(F in J){if(H||J.hasOwnProperty(F)){I.call(G,J[F],F,J);}}return B;};E.getValue=function(J,I){var H=B.Array(I),F=H.length,G;for(G=0;J!==D&&G=0){for(F=0;G!==D&&F2?F.Array(arguments,2,true):null;return function(){var J=E.isString(A)?H[A]:A,I=(G)?G.concat(F.Array(arguments,0,true)):arguments;return J.apply(H||J,I);};};F.rbind=function(A,H){var G=arguments.length>2?F.Array(arguments,2,true):null;return function(){var J=E.isString(A)?H[A]:A,I=(G)?F.Array(arguments,0,true).concat(G):arguments;return J.apply(H||J,I);};};},"3.0.0");
// ../yui/event/event-min.js
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 3.0.0
build: 1549
*/
(function(){var GLOBAL_ENV=YUI.Env,C=YUI.config,D=C.doc,POLL_INTERVAL=C.pollInterval||40,_ready=function(e){GLOBAL_ENV._ready();};if(!GLOBAL_ENV._ready){GLOBAL_ENV._ready=function(){if(!GLOBAL_ENV.DOMReady){GLOBAL_ENV.DOMReady=true;if(D.removeEventListener){D.removeEventListener("DOMContentLoaded",_ready,false);}}};
/* DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */
if(navigator.userAgent.match(/MSIE/)){if(self!==self.top){document.onreadystatechange=function(){if(document.readyState=="complete"){document.onreadystatechange=null;_ready();}};}else{GLOBAL_ENV._dri=setInterval(function(){try{document.documentElement.doScroll("left");clearInterval(GLOBAL_ENV._dri);GLOBAL_ENV._dri=null;_ready();}catch(ex){}},POLL_INTERVAL);}}else{D.addEventListener("DOMContentLoaded",_ready,false);}}})();YUI.add("event-base",function(A){(function(){var C=YUI.Env,B=function(){A.fire("domready");};A.publish("domready",{fireOnce:true});if(C.DOMReady){B();}else{A.before(B,C,"_ready");}})();(function(){var C=A.UA,B={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9,63272:46,63273:36,63275:35},D=function(F){try{if(F&&3==F.nodeType){F=F.parentNode;}}catch(E){return null;}return A.one(F);};A.DOMEventFacade=function(L,F,E){E=E||{};var H=L,G=F,I=A.config.doc,M=I.body,N=H.pageX,K=H.pageY,J,O;this.altKey=H.altKey;this.ctrlKey=H.ctrlKey;this.metaKey=H.metaKey;this.shiftKey=H.shiftKey;this.type=H.type;this.clientX=H.clientX;this.clientY=H.clientY;if(!N&&0!==N){N=H.clientX||0;K=H.clientY||0;if(C.ie){N+=Math.max(I.documentElement.scrollLeft,M.scrollLeft);K+=Math.max(I.documentElement.scrollTop,M.scrollTop);}}this._yuifacade=true;this._event=H;this.pageX=N;this.pageY=K;J=H.keyCode||H.charCode||0;if(C.webkit&&(J in B)){J=B[J];}this.keyCode=J;this.charCode=J;this.button=H.which||H.button;this.which=this.button;this.target=D(H.target||H.srcElement);this.currentTarget=D(G);O=H.relatedTarget;if(!O){if(H.type=="mouseout"){O=H.toElement;}else{if(H.type=="mouseover"){O=H.fromElement;}}}this.relatedTarget=D(O);if(H.type=="mousewheel"||H.type=="DOMMouseScroll"){this.wheelDelta=(H.detail)?(H.detail*-1):Math.round(H.wheelDelta/80)||((H.wheelDelta<0)?-1:1);}this.stopPropagation=function(){if(H.stopPropagation){H.stopPropagation();}else{H.cancelBubble=true;}E.stopped=1;};this.stopImmediatePropagation=function(){if(H.stopImmediatePropagation){H.stopImmediatePropagation();}else{this.stopPropagation();}E.stopped=2;};this.preventDefault=function(P){if(H.preventDefault){H.preventDefault();}H.returnValue=P||false;E.prevented=1;};this.halt=function(P){if(P){this.stopImmediatePropagation();}else{this.stopPropagation();}this.preventDefault();};};})();(function(){A.Env.evt.dom_wrappers={};A.Env.evt.dom_map={};var H=A.Env.evt,J=YUI.Env.add,D=YUI.Env.remove,G=function(){YUI.Env.windowLoaded=true;A.Event._load();D(window,"load",G);},B=function(){A.Event._unload();D(window,"unload",B);},C="domready",E="~yui|2|compat~",F=function(L){try{return(L&&typeof L!=="string"&&A.Lang.isNumber(L.length)&&!L.tagName&&!L.alert);}catch(K){return false;}},I=function(){var M=false,N=0,L=[],O=H.dom_wrappers,K=null,P=H.dom_map;return{POLL_RETRYS:1000,POLL_INTERVAL:40,lastError:null,_interval:null,_dri:null,DOMReady:false,startInterval:function(){var Q=A.Event;if(!Q._interval){Q._interval=setInterval(A.bind(Q._poll,Q),Q.POLL_INTERVAL);}},onAvailable:function(Q,U,Y,R,V,X){var W=A.Array(Q),S,T;for(S=0;S4)?W.slice(4):null);if(T){Z.fire();}return V;},detach:function(X,Z,S,U){var W=A.Array(arguments,0,true),a,V,T,Y,Q,R;if(W[W.length-1]===E){a=true;}if(X&&X.detach){return X.detach();}if(typeof S=="string"){if(a){S=A.DOM.byId(S);}else{S=A.Selector.query(S);T=S.length;if(T<1){S=null;}else{if(T==1){S=S[0];}}}}if(!S){return false;}if(F(S)){Y=true;for(V=0,T=S.length;V0);}U=[];W=function(Z,a){var Y,X=a.override;if(a.compat){if(a.override){if(X===true){Y=a.obj;}else{Y=X;}}else{Y=Z;}a.fn.call(Y,a.obj);}else{Y=a.obj||A.one(Z);a.fn.apply(Y,(A.Lang.isArray(X))?X:[]);}};for(R=0,Q=L.length;R4?A.Array(arguments,4,true):[];return A.Event.onAvailable.call(A.Event,F,C,E,B);}};A.Env.evt.plugins.contentready={on:function(D,C,F,E){var B=arguments.length>4?A.Array(arguments,4,true):[];return A.Event.onContentReady.call(A.Event,F,C,E,B);}};},"3.0.0",{requires:["event-custom-base"]});YUI.add("event-delegate",function(B){var I=B.Event,F=B.Lang,E={},A={mouseenter:"mouseover",mouseleave:"mouseout"},H=function(K){try{if(K&&3==K.nodeType){return K.parentNode;}}catch(J){}return K;},D=function(K,P,M){var Q=H((P.target||P.srcElement)),N=E[K],T,O,L,S,R;var J=function(X,U,V){var W;if(!X||X===V){W=false;}else{W=B.Selector.test(X,U)?X:J(X.parentNode,U,V);}return W;};for(T in N){if(N.hasOwnProperty(T)){O=N[T];S=N.fn;L=null;if(B.Selector.test(Q,T,M)){L=Q;}else{if(B.Selector.test(Q,((T.replace(/,/gi," *,"))+" *"),M)){L=J(Q,T,M);}}if(L){if(!R){R=new B.DOMEventFacade(P,M);R.container=R.currentTarget;}R.currentTarget=B.Node.get(L);B.publish(O,{contextFn:function(){return R.currentTarget;}});if(S){S(R,O);}else{B.fire(O,R);}}}}},G=function(M,L,K){var O={focus:I._attachFocus,blur:I._attachBlur},N=O[M],J=[M,function(P){D(L,(P||window.event),K);},K];if(N){return N(J,{capture:true,facade:false});}else{return I._attach(J,{facade:false});}},C=B.cached(function(J){return J.replace(/[|,:]/g,"~");});B.Env.evt.plugins.delegate={on:function(O,N,M,J,K){var L=B.Array(arguments,0,true);L.splice(3,1);L[0]=J;return B.delegate.apply(B,L);}};I.delegate=function(R,U,K,W){if(!W){return false;}var O=B.Array(arguments,0,true),M=K,N;if(F.isString(K)){M=B.Selector.query(K,null,true);if(!M){N=I.onAvailable(K,function(){N.handle=I.delegate.apply(I,O);},I,true,false);return N;}}M=B.Node.getDOMNode(M);var S=B.stamp(M),L="delegate:"+S+R+C(W),J=R+S,Q=E[J],T,V,P;if(!Q){Q={};if(A[R]){if(!I._fireMouseEnter){return false;}R=A[R];Q.fn=I._fireMouseEnter;}T=G(R,J,M);B.after(function(X){if(T.sub==X){delete E[J];B.detachAll(L);}},T.evt,"_delete");Q.handle=T;E[J]=Q;}P=Q.listeners;Q.listeners=P?(P+1):1;Q[W]=L;O[0]=L;O.splice(2,2);V=B.on.apply(B,O);B.after(function(){Q.listeners=(Q.listeners-1);if(Q.listeners===0){Q.handle.detach();}},V,"detach");return V;};B.delegate=I.delegate;},"3.0.0",{requires:["node-base"]});YUI.add("event-mousewheel",function(C){var B="DOMMouseScroll",A=function(E){var D=C.Array(E,0,true),F;if(C.UA.gecko){D[0]=B;F=C.config.win;}else{F=C.config.doc;}if(D.length<3){D[2]=F;}else{D.splice(2,0,F);}return D;};C.Env.evt.plugins.mousewheel={on:function(){return C.Event._attach(A(arguments));},detach:function(){return C.Event.detach.apply(C.Event,A(arguments));}};},"3.0.0",{requires:["node-base"]});YUI.add("event-mouseenter",function(F){var C=F.Event,E=F.Lang,B=F.Env.evt.plugins,D={},A={on:function(M,O,H){var L=F.Array(arguments,0,true),J=H,K;if(E.isString(H)){J=F.all(H);if(J.size()===0){K=C.onAvailable(H,function(){K.handle=F.on.apply(F,L);},C,true,false);return K;}}var R=(M==="mouseenter")?"mouseover":"mouseout",Q=M+":"+F.stamp(J)+R,I=D[Q],N,P,G;if(!I){N=F.on(R,F.rbind(C._fireMouseEnter,F,Q),J);F.after(function(S){if(N.sub==S){delete D[Q];F.detachAll(Q);}},N.evt,"_delete");I={};I.handle=N;D[Q]=I;}G=I.count;I.count=G?(G+1):1;L[0]=Q;L.splice(2,1);P=F.on.apply(F,L);F.after(function(){I.count=(I.count-1);if(I.count===0){I.handle.detach();}},P,"detach");return P;}};C._fireMouseEnter=function(J,H){var G=J.relatedTarget,I=J.currentTarget;if(I!==G&&!I.contains(G)){F.publish(H,{contextFn:function(){return I;}});F.fire(H,J);}};B.mouseenter=A;B.mouseleave=A;},"3.0.0",{requires:["node-base"]});YUI.add("event-key",function(A){A.Env.evt.plugins.key={on:function(E,G,B,K,C){var I=A.Array(arguments,0,true),F,J,H,D;F=K&&K.split(":");if(!K||K.indexOf(":")==-1||!F[1]){I[0]="key"+((F&&F[0])||"press");return A.on.apply(A,I);}J=F[0];H=(F[1])?F[1].split(/,|\+/):null;D=(A.Lang.isString(B)?B:A.stamp(B))+K;D=D.replace(/,/g,"_");if(!A.getEvent(D)){A.on(E+J,function(P){var Q=false,M=false,N,L,O;for(N=0;N2)?E.Array(arguments,2,true):null;return this._on(H,G,F,true);},on:function(H,G){var F=(arguments.length>2)?E.Array(arguments,2,true):null;return this._on(H,G,F,true);},after:function(H,G){var F=(arguments.length>2)?E.Array(arguments,2,true):null;return this._on(H,G,F,D);},detach:function(J,H){if(J&&J.detach){return J.detach();}var K=0,G=this.subscribers,F,I;for(F in G){if(G.hasOwnProperty(F)){I=G[F];if(I&&(!J||J===I.fn)){this._delete(I);K++;}}}return K;},unsubscribe:function(){return this.detach.apply(this,arguments);},_notify:function(I,H,F){this.log(this.type+"->"+"sub: "+I.id);var G;G=I.notify(H,this);if(false===G||this.stopped>1){this.log(this.type+" cancelled by subscriber");return false;}return true;},log:function(G,F){if(!this.silent){}},fire:function(){if(this.fireOnce&&this.fired){this.log("fireOnce event: "+this.type+" already fired");return true;}else{var F=E.Array(arguments,0,true);this.fired=true;this.firedWith=F;if(this.emitFacade){return this.fireComplex(F);}else{return this.fireSimple(F);}}},fireSimple:function(F){if(this.hasSubscribers||this.hasAfters){this._procSubs(E.merge(this.subscribers,this.afters),F);}this._broadcast(F);return this.stopped?false:true;},fireComplex:function(F){F[0]=F[0]||{};return this.fireSimple(F);},_procSubs:function(I,G,F){var J,H;for(H in I){if(I.hasOwnProperty(H)){J=I[H];if(J&&J.fn){if(false===this._notify(J,G,F)){this.stopped=2;}if(this.stopped==2){return false;}}}}return true;},_broadcast:function(G){if(!this.stopped&&this.broadcast){var F=E.Array(G);F.unshift(this.type);if(this.host!==E){E.fire.apply(E,F);}if(this.broadcast==2){E.Global.fire.apply(E.Global,F);}}},unsubscribeAll:function(){return this.detachAll.apply(this,arguments);},detachAll:function(){return this.detach();},_delete:function(F){if(F){delete F.fn;delete F.context;delete this.subscribers[F.id];delete this.afters[F.id];}}};E.Subscriber=function(H,G,F){this.fn=H;this.context=G;this.id=E.stamp(this);this.args=F;this.events=null;};E.Subscriber.prototype={_notify:function(J,H,I){var F=this.args,G;switch(I.signature){case 0:G=this.fn.call(J,I.type,H,J);break;case 1:G=this.fn.call(J,H[0]||null,J);break;default:if(F||H){H=H||[];F=(F)?H.concat(F):H;G=this.fn.apply(J,F);}else{G=this.fn.call(J);}}return G;},notify:function(G,I){var J=this.context,F=true;if(!J){J=(I.contextFn)?I.contextFn():I.context;}if(E.config.throwFail){F=this._notify(J,G,I);}else{try{F=this._notify(J,G,I);}catch(H){E.error(this+" failed: "+H.message,H);}}return F;},contains:function(G,F){if(F){return((this.fn==G)&&this.context==F);}else{return(this.fn==G);}}};(function(){var F=E.Lang,H=":",I="|",J="~AFTER~",K=E.cached(function(L,N){if(!N||!F.isString(L)||L.indexOf(H)>-1){return L;}return N+H+L;}),G=E.cached(function(O,Q){var N=O,P,R,L;if(!F.isString(N)){return N;}L=N.indexOf(J);if(L>-1){R=true;N=N.substr(J.length);}L=N.indexOf(I);if(L>-1){P=N.substr(0,(L));N=N.substr(L+1);if(N=="*"){N=null;}}return[P,(Q)?K(N,Q):N,R,N];}),M=function(L){var N=(F.isObject(L))?L:{};this._yuievt=this._yuievt||{id:E.guid(),events:{},targets:{},config:N,chain:("chain" in N)?N.chain:E.config.chain,defaults:{context:N.context||this,host:this,emitFacade:N.emitFacade,fireOnce:N.fireOnce,queuable:N.queuable,broadcast:N.broadcast,bubbles:("bubbles" in N)?N.bubbles:true}};
};M.prototype={on:function(Q,U,O,V){var Z=G(Q,this._yuievt.config.prefix),a,b,N,g,X,W,d,R=E.Env.evt.handles,P,L,S,e=E.Node,Y,T;if(F.isObject(Q)){if(F.isFunction(Q)){return E.Do.before.apply(E.Do,arguments);}a=U;b=O;N=E.Array(arguments,0,true);g={};P=Q._after;delete Q._after;E.each(Q,function(f,c){if(f){a=f.fn||((E.Lang.isFunction(f))?f:a);b=f.context||b;}N[0]=(P)?J+c:c;N[1]=a;N[2]=b;g[c]=this.on.apply(this,N);},this);return(this._yuievt.chain)?this:new E.EventHandle(g);}W=Z[0];P=Z[2];S=Z[3];if(e&&(this instanceof e)&&(S in e.DOM_EVENTS)){N=E.Array(arguments,0,true);N.splice(2,0,e.getDOMNode(this));return E.on.apply(E,N);}Q=Z[1];if(this instanceof YUI){L=E.Env.evt.plugins[Q];N=E.Array(arguments,0,true);N[0]=S;if(e){Y=N[2];if(Y instanceof E.NodeList){Y=E.NodeList.getDOMNodes(Y);}else{if(Y instanceof e){Y=e.getDOMNode(Y);}}T=(S in e.DOM_EVENTS);if(T){N[2]=Y;}}if(L){d=L.on.apply(E,N);}else{if((!Q)||T){d=E.Event._attach(N);}}}if(!d){X=this._yuievt.events[Q]||this.publish(Q);d=X._on(U,O,(arguments.length>3)?E.Array(arguments,3,true):null,(P)?"after":true);}if(W){R[W]=R[W]||{};R[W][Q]=R[W][Q]||[];R[W][Q].push(d);}return(this._yuievt.chain)?this:d;},subscribe:function(){return this.on.apply(this,arguments);},detach:function(P,U,O){var T=this._yuievt.events,Z,d,c=E.Node,Y=(this instanceof c);if(!P&&(this!==E)){for(Z in T){if(T.hasOwnProperty(Z)){d=T[Z].detach(U,O);}}if(Y){E.Event.purgeElement(c.getDOMNode(this));}return d;}var X=G(P,this._yuievt.config.prefix),V=F.isArray(X)?X[0]:null,R=(X)?X[3]:null,b,L,Q=E.Env.evt.handles,S,N,W,a=function(g,f){var e=g[f];if(e){while(e.length){b=e.pop();b.detach();}}};if(V){S=Q[V];P=X[1];if(S){if(P){a(S,P);}else{for(Z in S){if(S.hasOwnProperty(Z)){a(S,Z);}}}return(this._yuievt.chain)?this:true;}}else{if(F.isObject(P)&&P.detach){d=P.detach();return(this._yuievt.chain)?this:d;}else{if(Y&&((!R)||(R in c.DOM_EVENTS))){N=E.Array(arguments,0,true);N[2]=c.getDOMNode(this);return E.detach.apply(E,N);}}}L=E.Env.evt.plugins[R];if(this instanceof YUI){N=E.Array(arguments,0,true);if(L&&L.detach){return L.detach.apply(E,N);}else{if(!P||(!L&&c&&(P in c.DOM_EVENTS))){N[0]=P;return E.Event.detach.apply(E.Event,N);}}}W=T[P];if(W){d=W.detach(U,O);}return(this._yuievt.chain)?this:d;},unsubscribe:function(){return this.detach.apply(this,arguments);},detachAll:function(L){return this.detach(L);},unsubscribeAll:function(){return this.detachAll.apply(this,arguments);},publish:function(O,P){var N,R,L,Q=this._yuievt.config.prefix;O=(Q)?K(O,Q):O;if(F.isObject(O)){L={};E.each(O,function(T,S){L[S]=this.publish(S,T||P);},this);return L;}N=this._yuievt.events;R=N[O];if(R){if(P){R.applyConfig(P,true);}}else{R=new E.CustomEvent(O,(P)?E.mix(P,this._yuievt.defaults):this._yuievt.defaults);N[O]=R;}return N[O];},addTarget:function(L){this._yuievt.targets[E.stamp(L)]=L;this._yuievt.hasTargets=true;},removeTarget:function(L){delete this._yuievt.targets[E.stamp(L)];},fire:function(P){var S=F.isString(P),O=(S)?P:(P&&P.type),R,L,N,Q=this._yuievt.config.prefix;O=(Q)?K(O,Q):O;R=this.getEvent(O,true);if(!R){if(this._yuievt.hasTargets){L=(S)?arguments:E.Array(arguments,0,true).unshift(O);return this.bubble(null,L,this);}N=true;}else{L=E.Array(arguments,(S)?1:0,true);N=R.fire.apply(R,L);R.target=null;}return(this._yuievt.chain)?this:N;},getEvent:function(N,L){var P,O;if(!L){P=this._yuievt.config.prefix;N=(P)?K(N,P):N;}O=this._yuievt.events;return(O&&N in O)?O[N]:null;},after:function(O,N){var L=E.Array(arguments,0,true);switch(F.type(O)){case"function":return E.Do.after.apply(E.Do,arguments);case"object":L[0]._after=true;break;default:L[0]=J+O;}return this.on.apply(this,L);},before:function(){return this.on.apply(this,arguments);}};E.EventTarget=M;E.mix(E,M.prototype,false,false,{bubbles:false});M.call(E);YUI.Env.globalEvents=YUI.Env.globalEvents||new M();E.Global=YUI.Env.globalEvents;})();},"3.0.0",{requires:["oop"]});YUI.add("event-custom-complex",function(A){(function(){var C,D,B=A.CustomEvent.prototype;A.EventFacade=function(F,E){F=F||{};this.details=F.details;this.type=F.type;this.target=F.target;this.currentTarget=E;this.relatedTarget=F.relatedTarget;this.stopPropagation=function(){F.stopPropagation();};this.stopImmediatePropagation=function(){F.stopImmediatePropagation();};this.preventDefault=function(){F.preventDefault();};this.halt=function(G){F.halt(G);};};B.fireComplex=function(H){var L=A.Env._eventstack,F,J,E,K,G,I;if(L){if(this.queuable&&this.type!=L.next.type){this.log("queue "+this.type);L.queue.push([this,H]);return true;}}else{A.Env._eventstack={id:this.id,next:this,silent:this.silent,stopped:0,prevented:0,queue:[]};L=A.Env._eventstack;}this.stopped=0;this.prevented=0;this.target=this.target||this.host;I=new A.EventTarget({fireOnce:true,context:this.host});this.events=I;if(this.preventedFn){I.on("prevented",this.preventedFn);}if(this.stoppedFn){I.on("stopped",this.stoppedFn);}this.currentTarget=this.host||this.currentTarget;this.details=H.slice();this.log("Firing "+this.type);this._facade=null;F=this._getFacade(H);if(A.Lang.isObject(H[0])){H[0]=F;}else{H.unshift(F);}if(this.hasSubscribers){this._procSubs(A.merge(this.subscribers),H,F);}if(this.bubbles&&this.host&&this.host.bubble&&!this.stopped){L.stopped=0;L.prevented=0;G=this.host.bubble(this);this.stopped=Math.max(this.stopped,L.stopped);this.prevented=Math.max(this.prevented,L.prevented);}if(this.defaultFn&&!this.prevented){this.defaultFn.apply(this.host||this,H);}this._broadcast(H);if(this.hasAfters&&!this.prevented&&this.stopped<2){this._procSubs(A.merge(this.afters),H,F);}if(L.id===this.id){E=L.queue;while(E.length){J=E.pop();K=J[0];L.stopped=0;L.prevented=0;L.next=K;K.fire.apply(K,J[1]);}A.Env._eventstack=null;}return this.stopped?false:true;};B._getFacade=function(){var E=this._facade,H,G,F=this.details;if(!E){E=new A.EventFacade(this,this.currentTarget);}H=F&&F[0];if(A.Lang.isObject(H,true)){G={};A.mix(G,E,true,D);A.mix(E,H,true);A.mix(E,G,true,D);}E.details=this.details;E.target=this.target;E.currentTarget=this.currentTarget;E.stopped=0;
E.prevented=0;this._facade=E;return this._facade;};B.stopPropagation=function(){this.stopped=1;A.Env._eventstack.stopped=1;this.events.fire("stopped",this);};B.stopImmediatePropagation=function(){this.stopped=2;A.Env._eventstack.stopped=2;this.events.fire("stopped",this);};B.preventDefault=function(){if(this.preventable){this.prevented=1;A.Env._eventstack.prevented=1;this.events.fire("prevented",this);}};B.halt=function(E){if(E){this.stopImmediatePropagation();}else{this.stopPropagation();}this.preventDefault();};A.EventTarget.prototype.bubble=function(M,K,I){var G=this._yuievt.targets,J=true,N,L,E,F,H;if(!M||((!M.stopped)&&G)){for(F in G){if(G.hasOwnProperty(F)){N=G[F];L=M&&M.type;E=N.getEvent(L,true);if(!E){if(N._yuievt.hasTargets){N.bubble.call(N,M,K,I);}}else{E.target=I||(M&&M.target)||this;E.currentTarget=N;H=E.broadcast;E.broadcast=false;J=J&&E.fire.apply(E,K||M.details);E.broadcast=H;if(E.stopped){break;}}}}}return J;};C=new A.EventFacade();D=A.Object.keys(C);})();},"3.0.0",{requires:["event-custom-base"]});YUI.add("event-custom",function(A){},"3.0.0",{use:["event-custom-base","event-custom-complex"]});
// ../yui/event-simulate/event-simulate-min.js
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 3.0.0
build: 1549
*/
YUI.add("event-simulate",function(A){(function(){var H=A.Lang,G=A.Array,D=H.isFunction,C=H.isString,E=H.isBoolean,M=H.isObject,K=H.isNumber,J=A.config.doc,N={click:1,dblclick:1,mouseover:1,mouseout:1,mousedown:1,mouseup:1,mousemove:1},I={keydown:1,keyup:1,keypress:1};function F(S,W,R,P,Y,O,L,X,U,a,Z){if(!S){A.error("simulateKeyEvent(): Invalid target.");}if(C(W)){W=W.toLowerCase();switch(W){case"textevent":W="keypress";break;case"keyup":case"keydown":case"keypress":break;default:A.error("simulateKeyEvent(): Event type '"+W+"' not supported.");}}else{A.error("simulateKeyEvent(): Event type must be a string.");}if(!E(R)){R=true;}if(!E(P)){P=true;}if(!M(Y)){Y=window;}if(!E(O)){O=false;}if(!E(L)){L=false;}if(!E(X)){X=false;}if(!E(U)){U=false;}if(!K(a)){a=0;}if(!K(Z)){Z=0;}var V=null;if(D(J.createEvent)){try{V=J.createEvent("KeyEvents");V.initKeyEvent(W,R,P,Y,O,L,X,U,a,Z);}catch(T){try{V=J.createEvent("Events");}catch(Q){V=J.createEvent("UIEvents");}finally{V.initEvent(W,R,P);V.view=Y;V.altKey=L;V.ctrlKey=O;V.shiftKey=X;V.metaKey=U;V.keyCode=a;V.charCode=Z;}}S.dispatchEvent(V);}else{if(M(J.createEventObject)){V=J.createEventObject();V.bubbles=R;V.cancelable=P;V.view=Y;V.ctrlKey=O;V.altKey=L;V.shiftKey=X;V.metaKey=U;V.keyCode=(Z>0)?Z:a;S.fireEvent("on"+W,V);}else{A.error("simulateKeyEvent(): No event simulation framework present.");}}}function B(X,c,U,R,d,W,T,S,Q,O,P,L,b,Z,V,Y){if(!X){A.error("simulateMouseEvent(): Invalid target.");}if(C(c)){c=c.toLowerCase();if(!N[c]){A.error("simulateMouseEvent(): Event type '"+c+"' not supported.");}}else{A.error("simulateMouseEvent(): Event type must be a string.");}if(!E(U)){U=true;}if(!E(R)){R=(c!="mousemove");}if(!M(d)){d=window;}if(!K(W)){W=1;}if(!K(T)){T=0;}if(!K(S)){S=0;}if(!K(Q)){Q=0;}if(!K(O)){O=0;}if(!E(P)){P=false;}if(!E(L)){L=false;}if(!E(b)){b=false;}if(!E(Z)){Z=false;}if(!K(V)){V=0;}var a=null;if(D(J.createEvent)){a=J.createEvent("MouseEvents");if(a.initMouseEvent){a.initMouseEvent(c,U,R,d,W,T,S,Q,O,P,L,b,Z,V,Y);}else{a=J.createEvent("UIEvents");a.initEvent(c,U,R);a.view=d;a.detail=W;a.screenX=T;a.screenY=S;a.clientX=Q;a.clientY=O;a.ctrlKey=P;a.altKey=L;a.metaKey=Z;a.shiftKey=b;a.button=V;a.relatedTarget=Y;}if(Y&&!a.relatedTarget){if(c=="mouseout"){a.toElement=Y;}else{if(c=="mouseover"){a.fromElement=Y;}}}X.dispatchEvent(a);}else{if(M(J.createEventObject)){a=J.createEventObject();a.bubbles=U;a.cancelable=R;a.view=d;a.detail=W;a.screenX=T;a.screenY=S;a.clientX=Q;a.clientY=O;a.ctrlKey=P;a.altKey=L;a.metaKey=Z;a.shiftKey=b;switch(V){case 0:a.button=1;break;case 1:a.button=4;break;case 2:break;default:a.button=0;}a.relatedTarget=Y;X.fireEvent("on"+c,a);}else{A.error("simulateMouseEvent(): No event simulation framework present.");}}}A.Event.simulate=function(P,O,L){L=L||{};if(N[O]){B(P,O,L.bubbles,L.cancelable,L.view,L.detail,L.screenX,L.screenY,L.clientX,L.clientY,L.ctrlKey,L.altKey,L.shiftKey,L.metaKey,L.button,L.relatedTarget);}else{if(I[O]){F(P,O,L.bubbles,L.cancelable,L.view,L.ctrlKey,L.altKey,L.shiftKey,L.metaKey,L.keyCode,L.charCode);}else{A.error("simulate(): Event '"+O+"' can't be simulated.");}}};})();},"3.0.0",{requires:["event"]});
// ../yui/dom/dom-min.js
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 3.0.0
build: 1549
*/
YUI.add("dom-base",function(D){(function(H){var R="nodeType",F="ownerDocument",E="defaultView",J="parentWindow",M="tagName",O="parentNode",Q="firstChild",L="previousSibling",P="nextSibling",K="contains",G="compareDocumentPosition",N=document.documentElement,I=/<([a-z]+)/i;H.DOM={byId:function(T,S){S=S||H.config.doc;return S.getElementById(T);},children:function(U,S){var T=[];if(U){S=S||"*";T=H.Selector.query("> "+S,U);}return T;},firstByTag:function(S,T){var U;T=T||H.config.doc;if(S&&T.getElementsByTagName){U=T.getElementsByTagName(S)[0];}return U||null;},getText:(N.textContent!==undefined)?function(T){var S="";if(T){S=T.textContent;}return S||"";}:function(T){var S="";if(T){S=T.innerText;}return S||"";},setText:(N.textContent!==undefined)?function(S,T){if(S){S.textContent=T;}}:function(S,T){if(S){S.innerText=T;}},previous:function(S,U,T){return H.DOM.elementByAxis(S,L,U,T);},next:function(S,U,T){return H.DOM.elementByAxis(S,P,U,T);},ancestor:function(S,U,T){return H.DOM.elementByAxis(S,O,U,T);},elementByAxis:function(S,V,U,T){while(S&&(S=S[V])){if((T||S[M])&&(!U||U(S))){return S;}}return null;},contains:function(T,U){var S=false;if(!U||!T||!U[R]||!T[R]){S=false;}else{if(T[K]){if(H.UA.opera||U[R]===1){S=T[K](U);}else{S=H.DOM._bruteContains(T,U);}}else{if(T[G]){if(T===U||!!(T[G](U)&16)){S=true;}}}}return S;},inDoc:function(S,T){T=T||S[F];var U=S.id;if(!U){U=S.id=H.guid();}return !!(T.getElementById(U));},create:function(X,Z){if(typeof X==="string"){X=H.Lang.trim(X);}if(!Z&&H.DOM._cloneCache[X]){return H.DOM._cloneCache[X].cloneNode(true);}Z=Z||H.config.doc;var T=I.exec(X),W=H.DOM._create,Y=H.DOM.creators,V=null,S,U;if(T&&Y[T[1]]){if(typeof Y[T[1]]==="function"){W=Y[T[1]];}else{S=Y[T[1]];}}U=W(X,Z,S).childNodes;if(U.length===1){V=U[0].parentNode.removeChild(U[0]);}else{V=H.DOM._nl2frag(U,Z);}if(V){H.DOM._cloneCache[X]=V.cloneNode(true);}return V;},_nl2frag:function(T,W){var U=null,V,S;if(T&&(T.push||T.item)&&T[0]){W=W||T[0].ownerDocument;U=W.createDocumentFragment();if(T.item){T=H.Array(T,0,true);}for(V=0,S=T.length;V)+\s*",T="";if(W.UA.ie){W.mix(X,{tbody:function(Z,a){var b=S(U+Z+T,a),Y=b.children.tags("tbody")[0];if(b.children.length>1&&Y&&!V.test(Z)){Y[O].removeChild(Y);}return b;},script:function(Y,Z){var a=Z.createElement("div");a.innerHTML="-"+Y;a.removeChild(a[Q]);return a;}},true);W.mix(W.DOM.VALUE_GETTERS,{button:function(Y){return(Y.attributes&&Y.attributes.value)?Y.attributes.value.value:"";}});W.mix(W.DOM.VALUE_SETTERS,{button:function(Z,a){var Y=Z.attributes.value;if(!Y){Y=Z[F].createAttribute("value");Z.setAttributeNode(Y);}Y.value=a;}});}if(W.UA.gecko||W.UA.ie){W.mix(X,{option:function(Y,Z){return S(""+Y+" ",Z);},tr:function(Y,Z){return S(" "+Y+" ",Z);},td:function(Y,Z){return S(""+Y+" ",Z);},tbody:function(Y,Z){return S(U+Y+T,Z);}});W.mix(X,{legend:"fieldset",th:X.td,thead:X.tbody,tfoot:X.tbody,caption:X.tbody,colgroup:X.tbody,col:X.tbody,optgroup:X.option});}W.mix(W.DOM.VALUE_GETTERS,{option:function(Z){var Y=Z.attributes;return(Y.value&&Y.value.specified)?Z.value:Z.text;},select:function(Z){var a=Z.value,Y=Z.options;if(Y&&a===""){if(Z.multiple){}else{a=W.DOM.getValue(Y[Z.selectedIndex],"value");}}return a;}});})(H);})(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){B(F,G);C(F,E);},toggleClass:function(F,E){if(A(F,E)){C(F,E);}else{B(F,E);}}});A=D.DOM.hasClass;C=D.DOM.removeClass;B=D.DOM.addClass;},"3.0.0",{requires:["oop"]});YUI.add("dom-style",function(A){(function(E){var C="documentElement",B="defaultView",D="ownerDocument",L="style",N="float",F="cssFloat",G="styleFloat",J="transparent",H="getComputedStyle",M=E.config.doc,I=undefined,K=/color$/i;E.mix(E.DOM,{CUSTOM_STYLES:{},setStyle:function(R,O,S,Q){Q=Q||R.style;var P=E.DOM.CUSTOM_STYLES;if(Q){if(S===null){S="";}if(O in P){if(P[O].set){P[O].set(R,S,Q);return;}else{if(typeof P[O]==="string"){O=P[O];}}}Q[O]=S;}},getStyle:function(R,O){var Q=R[L],P=E.DOM.CUSTOM_STYLES,S="";if(Q){if(O in P){if(P[O].get){return P[O].get(R,O,Q);}else{if(typeof P[O]==="string"){O=P[O];}}}S=Q[O];if(S===""){S=E.DOM[H](R,O);}}return S;},setStyles:function(P,Q){var O=P.style;E.each(Q,function(R,S){E.DOM.setStyle(P,S,R,O);},E.DOM);},getComputedStyle:function(P,O){var R="",Q=P[D];if(P[L]){R=Q[B][H](P,null)[O];}return R;}});if(M[C][L][F]!==I){E.DOM.CUSTOM_STYLES[N]=F;}else{if(M[C][L][G]!==I){E.DOM.CUSTOM_STYLES[N]=G;}}if(E.UA.opera){E.DOM[H]=function(Q,P){var O=Q[D][B],R=O[H](Q,"")[P];if(K.test(P)){R=E.Color.toRGB(R);}return R;};}if(E.UA.webkit){E.DOM[H]=function(Q,P){var O=Q[D][B],R=O[H](Q,"")[P];if(R==="rgba(0, 0, 0, 0)"){R=J;}return R;};}})(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-1)){a=c;}else{if(D.DOM.IE.COMPUTED[b]){a=D.DOM.IE.COMPUTED[b](Y,b);}else{if(P.test(c)){a=N.getPixel(Y,b)+K;}else{a=c;}}}}}return a;},sizeOffsets:{width:["Left","Right"],height:["Top","Bottom"],top:["Top"],bottom:["Bottom"]},getOffset:function(b,g){var d=E(b)[g],Y=g.charAt(0).toUpperCase()+g.substr(1),f="offset"+Y,a="pixel"+Y,e=N.sizeOffsets[g],c="";if(d===M||d.indexOf("%")>-1){c=b["offset"+Y];if(e[0]){c-=N.getPixel(b,"padding"+e[0]);c-=N.getBorderWidth(b,"border"+e[0]+"Width",1);}if(e[1]){c-=N.getPixel(b,"padding"+e[1]);c-=N.getBorderWidth(b,"border"+e[1]+"Width",1);}}else{if(!b.style[a]&&!b.style[g]){b.style[g]=d;}c=b.style[a];}return c+K;},borderMap:{thin:"2px",medium:"4px",thick:"6px"},getBorderWidth:function(a,c,Y){var b=Y?"":K,d=a.currentStyle[c];if(d.indexOf(K)<0){if(N.borderMap[d]){d=N.borderMap[d];}else{}}return(Y)?parseFloat(d):d;},getPixel:function(b,Y){var d=null,a=E(b),e=a.right,c=a[Y];b.style.right=c;d=b.style.pixelRight;b.style.right=e;return d;},getMargin:function(b,Y){var c,a=E(b);if(a[Y]==M){c=0;}else{c=N.getPixel(b,Y);}return c+K;},getVisibility:function(a,Y){var b;while((b=a.currentStyle)&&b[Y]=="inherit"){a=a.parentNode;}return(b)?b[Y]:S;},getColor:function(a,Y){var b=E(a)[Y];if(!b||b===R){D.DOM.elementByAxis(a,"parentNode",null,function(c){b=E(c)[Y];if(b&&b!==R){a=c;return true;}});}return D.Color.toRGB(b);},getBorderColor:function(a,Y){var b=E(a),c=b[Y]||b.color;return D.Color.toRGB(D.Color.toHex(c));}},F={};try{if(X.style[T]===Z&&X[B]){D.DOM.CUSTOM_STYLES[T]={get:function(a){var c=100;try{c=a[B]["DXImageTransform.Microsoft.Alpha"][T];}catch(b){try{c=a[B]("alpha")[T];}catch(Y){}}return c/100;},set:function(a,d,Y){var c,b;if(d===""){b=E(a);c=(T in b)?b[T]:1;d=c;}if(typeof Y[L]=="string"){Y[L]="alpha("+T+"="+d*100+")";if(!a.currentStyle||!a.currentStyle[W]){Y.zoom=1;}}}};}}catch(U){}try{document.createElement("div").style.height="-1px";}catch(U){D.DOM.CUSTOM_STYLES.height={set:function(b,c,a){var Y=parseFloat(c);if(isNaN(Y)||Y>=0){a.height=c;}else{}}};D.DOM.CUSTOM_STYLES.width={set:function(b,c,a){var Y=parseFloat(c);if(isNaN(Y)||Y>=0){a.width=c;}else{}}};}F[I]=F[O]=N.getOffset;F.color=F.backgroundColor=N.getColor;F[G]=F[J]=F[Q]=F[V]=F[H]=N.getBorderWidth;F.marginTop=F.marginRight=F.marginBottom=F.marginLeft=N.getMargin;F.visibility=N.getVisibility;F.borderColor=F.borderTopColor=F.borderRightColor=F.borderBottomColor=F.borderLeftColor=N.getBorderColor;if(!D.config.win[C]){D.DOM[C]=N.get;}D.namespace("DOM.IE");D.DOM.IE.COMPUTED=F;D.DOM.IE.ComputedStyle=N;})(A);},"3.0.0",{requires:["dom-base"]});YUI.add("dom-screen",function(A){(function(F){var D="documentElement",O="compatMode",M="position",C="fixed",K="relative",G="left",H="top",I="BackCompat",N="medium",E="borderLeftWidth",B="borderTopWidth",P="getBoundingClientRect",J="getComputedStyle",L=/^t(?:able|d|h)$/i;F.mix(F.DOM,{winHeight:function(R){var Q=F.DOM._getWinSize(R).height;return Q;},winWidth:function(R){var Q=F.DOM._getWinSize(R).width;
return Q;},docHeight:function(R){var Q=F.DOM._getDocSize(R).height;return Math.max(Q,F.DOM._getWinSize(R).height);},docWidth:function(R){var Q=F.DOM._getDocSize(R).width;return Math.max(Q,F.DOM._getWinSize(R).width);},docScrollX:function(Q){var R=F.DOM._getDoc(Q);return Math.max(R[D].scrollLeft,R.body.scrollLeft);},docScrollY:function(Q){var R=F.DOM._getDoc(Q);return Math.max(R[D].scrollTop,R.body.scrollTop);},getXY:function(){if(document[D][P]){return function(T){var a=null,U,R,V,Y,X,Q,S,W,Z;if(T){if(F.DOM.inDoc(T)){U=F.DOM.docScrollX(T);R=F.DOM.docScrollY(T);V=T[P]();Z=F.DOM._getDoc(T);a=[V.left,V.top];if(F.UA.ie){Y=2;X=2;W=Z[O];Q=F.DOM[J](Z[D],E);S=F.DOM[J](Z[D],B);if(F.UA.ie===6){if(W!==I){Y=0;X=0;}}if((W==I)){if(Q!==N){Y=parseInt(Q,10);}if(S!==N){X=parseInt(S,10);}}a[0]-=Y;a[1]-=X;}if((R||U)){a[0]+=U;a[1]+=R;}}else{a=F.DOM._getOffset(T);}}return a;};}else{return function(R){var T=null,Q,V,S,U;if(R){if(F.DOM.inDoc(R)){T=[R.offsetLeft,R.offsetTop];Q=R;V=((F.UA.gecko||F.UA.webkit>519)?true:false);while((Q=Q.offsetParent)){T[0]+=Q.offsetLeft;T[1]+=Q.offsetTop;if(V){T=F.DOM._calcBorders(Q,T);}}if(F.DOM.getStyle(R,M)!=C){Q=R;while((Q=Q.parentNode)){S=Q.scrollTop;U=Q.scrollLeft;if(F.UA.gecko&&(F.DOM.getStyle(Q,"overflow")!=="visible")){T=F.DOM._calcBorders(Q,T);}if(S||U){T[0]-=U;T[1]-=S;}}T[0]+=F.DOM.docScrollX(R);T[1]+=F.DOM.docScrollY(R);}else{T[0]+=F.DOM.docScrollX(R);T[1]+=F.DOM.docScrollY(R);}}else{T=F.DOM._getOffset(R);}}return T;};}}(),_getOffset:function(Q){var S,R=null;if(Q){S=F.DOM.getStyle(Q,M);R=[parseInt(F.DOM[J](Q,G),10),parseInt(F.DOM[J](Q,H),10)];if(isNaN(R[0])){R[0]=parseInt(F.DOM.getStyle(Q,G),10);if(isNaN(R[0])){R[0]=(S===K)?0:Q.offsetLeft||0;}}if(isNaN(R[1])){R[1]=parseInt(F.DOM.getStyle(Q,H),10);if(isNaN(R[1])){R[1]=(S===K)?0:Q.offsetTop||0;}}}return R;},getX:function(Q){return F.DOM.getXY(Q)[0];},getY:function(Q){return F.DOM.getXY(Q)[1];},setXY:function(R,U,X){var S=F.DOM.setStyle,W,V,Q,T;if(R&&U){W=F.DOM.getStyle(R,M);V=F.DOM._getOffset(R);if(W=="static"){W=K;S(R,M,W);}T=F.DOM.getXY(R);if(U[0]!==null){S(R,G,U[0]-T[0]+V[0]+"px");}if(U[1]!==null){S(R,H,U[1]-T[1]+V[1]+"px");}if(!X){Q=F.DOM.getXY(R);if(Q[0]!==U[0]||Q[1]!==U[1]){F.DOM.setXY(R,U,true);}}}else{}},setX:function(R,Q){return F.DOM.setXY(R,[Q,null]);},setY:function(Q,R){return F.DOM.setXY(Q,[null,R]);},_calcBorders:function(S,T){var R=parseInt(F.DOM[J](S,B),10)||0,Q=parseInt(F.DOM[J](S,E),10)||0;if(F.UA.gecko){if(L.test(S.tagName)){R=0;Q=0;}}T[0]+=Q;T[1]+=R;return T;},_getWinSize:function(T){var V=F.DOM._getDoc(),U=V.defaultView||V.parentWindow,W=V[O],S=U.innerHeight,R=U.innerWidth,Q=V[D];if(W&&!F.UA.opera){if(W!="CSS1Compat"){Q=V.body;}S=Q.clientHeight;R=Q.clientWidth;}return{height:S,width:R};},_getDocSize:function(R){var S=F.DOM._getDoc(),Q=S[D];if(S[O]!="CSS1Compat"){Q=S.body;}return{height:Q.scrollHeight,width:Q.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);},"3.0.0",{requires:["dom-base","dom-style"]});YUI.add("selector-native",function(A){(function(G){G.namespace("Selector");var E="compareDocumentPosition",F="ownerDocument",D="yui-tmp-",C=0;var B={_foundCache:[],useNative:true,_compare:("sourceIndex" in document.documentElement)?function(K,J){var I=K.sourceIndex,H=J.sourceIndex;if(I===H){return 0;}else{if(I>H){return 1;}}return -1;}:(document.documentElement[E]?function(I,H){if(I[E](H)&4){return -1;}else{return 1;}}:function(L,K){var J,H,I;if(L&&K){J=L[F].createRange();J.setStart(L,0);H=K[F].createRange();H.setStart(K,0);I=J.compareBoundaryPoints(1,H);}return I;}),_sort:function(H){if(H){H=G.Array(H,0,true);if(H.sort){H.sort(B._compare);}}return H;},_deDupe:function(H){var I=[],J,K;for(J=0;(K=H[J++]);){if(!K._found){I[I.length]=K;K._found=true;}}for(J=0;(K=I[J++]);){K._found=null;K.removeAttribute("_found");}return I;},query:function(I,P,Q,H){P=P||G.config.doc;var M=[],J=(G.Selector.useNative&&document.querySelector&&!H),L=[[I,P]],N,R,K,O=(J)?G.Selector._nativeQuery:G.Selector._bruteQuery;if(I&&O){if(!H&&(!J||P.tagName)){L=B._splitQueries(I,P);}for(K=0;(N=L[K++]);){R=O(N[0],N[1],Q);if(!Q){R=G.Array(R,0,true);}if(R){M=M.concat(R);}}if(L.length>1){M=B._sort(B._deDupe(M));}}return(Q)?(M[0]||null):M;},_splitQueries:function(J,M){var I=J.split(","),K=[],N="",L,H;if(M){if(M.tagName){M.id=M.id||G.guid();N="#"+M.id+" ";}for(L=0,H=I.length;L":{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"&&document.getElementsByClassName&&(J==="~="||J==="="))){L.prefilter=K[1];L[K[1]]=K[3];}if(J in I){M=I[J];if(typeof M==="string"){M=G.Selector._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!==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(C._getRegExp(N,"gi"),K[N]);}}if(L){for(M=0,I=L.length;M-1){N=K;K=K.split(G);C.Object.setValue(L,K,M);}else{if(L[K]!==undefined){L[K]=M;}}return M;};F.DEFAULT_GETTER=function(K){var L=this._stateProxy,M;if(K.indexOf&&K.indexOf(G)>-1){M=C.Object.getValue(L,K.split(G));}else{if(L[K]!==undefined){M=L[K];}}return M;};C.augment(F,C.Event.Target);C.mix(F.prototype,{toString:function(){var M="",L=this[D]+": not bound to a node",K=this._node;if(K){M+=K[E];if(K.id){M+="#"+K.id;}if(K.className){M+="."+K.className.replace(" ",".");}M+=" "+this[D];}return M||L;},get:function(K){var L;if(this._getAttr){L=this._getAttr(K);}else{L=this._get(K);}if(L){L=C.Node.scrubVal(L,this);}return L;},_get:function(K){var L=F.ATTRS[K],M;if(L&&L.getter){M=L.getter.call(this);}else{if(F.re_aria.test(K)){M=this._node.getAttribute(K,2);}else{M=F.DEFAULT_GETTER.apply(this,arguments);}}return M;},set:function(K,M){var L=F.ATTRS[K];if(this._setAttr){this._setAttr.apply(this,arguments);}else{if(L&&L.setter){L.setter.call(this,M);}else{if(F.re_aria.test(K)){this._node.setAttribute(K,M);}else{F.DEFAULT_SETTER.apply(this,arguments);}}}return this;},setAttrs:function(K){if(this._setAttrs){this._setAttrs(K);}else{C.Object.each(K,function(L,M){this.set(M,L);},this);}return this;},getAttrs:function(L){var K={};if(this._getAttrs){this._getAttrs(L);}else{C.Array.each(L,function(M,N){K[M]=this.get(M);},this);}return K;},create:F.create,compareTo:function(K){var L=this._node;if(K instanceof C.Node){K=K._node;}return L===K;},inDoc:function(L){var K=this._node;L=(L)?L._node||L:K[B];if(L.documentElement){return C.DOM.contains(L.documentElement,K);}},getById:function(M){var L=this._node,K=C.DOM.byId(M,L[B]);if(K&&C.DOM.contains(L,K)){K=C.one(K);}else{K=null;}return K;},ancestor:function(K){return F.get(C.DOM.elementByAxis(this._node,"parentNode",J(K)));},previous:function(L,K){return F.get(C.DOM.elementByAxis(this._node,"previousSibling",J(L),K));},next:function(M,L,K){return F.get(C.DOM.elementByAxis(this._node,"nextSibling",J(L),K));},one:function(K){return C.one(C.Selector.query(K,this._node,true));},query:function(K){return this.one(K);},all:function(K){var L=C.all(C.Selector.query(K,this._node));L._query=K;return L;},queryAll:function(K){return this.all(K);},test:function(K){return C.Selector.test(this._node,K);},remove:function(K){var L=this._node;L.parentNode.removeChild(L);if(K){this.destroy(true);}return this;},replace:function(K){var L=this._node;L.parentNode.replaceChild(K,L);return this;},purge:function(L,K){C.Event.purgeElement(this._node,L,K);},destroy:function(K){delete F._instances[this[D]];if(K){this.purge(true);}if(this.unplug){this.unplug();}this._node._yuid=null;this._node=null;this._stateProxy=null;},invoke:function(R,L,K,Q,P,O){var N=this._node,M;if(L&&L instanceof C.Node){L=L._node;}if(K&&K instanceof C.Node){K=K._node;}M=N[R](L,K,Q,P,O);return C.Node.scrubVal(M,this);},each:function(L,K){K=K||this;return L.call(K,this);},item:function(K){return this;},size:function(){return this._node?1:0;},insert:function(M,K){var L=this._node;
if(M){if(typeof K==="number"){K=this._node.childNodes[K];}if(typeof M!=="string"){if(M._node){M=M._node;}else{if(M._nodes||(!M.nodeType&&M.length)){C.each(M._nodes,function(N){C.DOM.addHTML(L,N,K);});return this;}}}C.DOM.addHTML(L,M,K);}return this;},prepend:function(K){return this.insert(K,0);},append:function(K){return this.insert(K,null);},setContent:function(K){C.DOM.addHTML(this._node,K,"replace");return this;},hasMethod:function(L){var K=this._node;return(K&&(typeof K==="function"));}},true);C.Node=F;C.get=C.Node.get;C.one=C.Node.one;var A=function(K){if(typeof K==="string"){this._query=K;K=C.Selector.query(K);}else{K=C.Array(K,0,true);}A._instances[C.stamp(this)]=this;this._nodes=K;};A.NAME="NodeList";A.getDOMNodes=function(K){return K._nodes;};A._instances=[];A.each=function(K,N,M){var L=K._nodes;if(L&&L.length){C.Array.each(L,N,M||K);}else{}};A.addMethod=function(K,M,L){if(K&&M){A.prototype[K]=function(){var O=[],N=arguments;C.Array.each(this._nodes,function(T){var S="_yuid",Q=C.Node._instances[T[S]],R,P;if(!Q){Q=A._getTempNode(T);}R=L||Q;P=M.apply(R,N);if(P!==undefined&&P!==Q){O[O.length]=P;}});return O.length?O:this;};}else{}};A.importMethod=function(M,K,L){if(typeof K==="string"){L=L||K;A.addMethod(K,M[K]);}else{C.each(K,function(N){A.importMethod(M,N);});}};A._getTempNode=function(L){var K=A._tempNode;if(!K){K=C.Node.create("
");A._tempNode=K;}K._node=L;K._stateProxy=L;return K;};C.mix(A.prototype,{item:function(K){return C.one((this._nodes||[])[K]);},each:function(M,L){var K=this;C.Array.each(this._nodes,function(O,N){O=C.one(O);return M.call(L||O,O,N,K);});return K;},batch:function(L,K){var M=this;C.Array.each(this._nodes,function(P,O){var N=C.Node._instances[P[D]];if(!N){N=A._getTempNode(P);}return L.call(K||N,N,O,M);});return M;},some:function(M,L){var K=this;return C.Array.some(this._nodes,function(O,N){O=C.one(O);L=L||O;return M.call(L,O,N,K);});},toFrag:function(){return C.one(C.DOM._nl2frag(this._nodes));},indexOf:function(K){return C.Array.indexOf(this._nodes,C.Node.getDOMNode(K));},filter:function(K){return C.all(C.Selector.filter(this._nodes,K));},modulus:function(M,L){L=L||0;var K=[];A.each(this,function(O,N){if(N%M===L){K.push(O);}});return C.all(K);},odd:function(){return this.modulus(2,1);},even:function(){return this.modulus(2);},destructor:function(){delete A._instances[this[D]];},refresh:function(){var L,K=this._nodes;if(this._query){if(K&&K[0]&&K[0].ownerDocument){L=K[0].ownerDocument;}this._nodes=C.Selector.query(this._query,L||C.config.doc);}return this;},on:function(N,M,L){var K=C.Array(arguments,0,true);K.splice(2,0,this._nodes);K[3]=L||this;return C.on.apply(C,K);},after:function(N,M,L){var K=C.Array(arguments,0,true);K.splice(2,0,this._nodes);K[3]=L||this;return C.after.apply(C,K);},size:function(){return this._nodes.length;},toString:function(){var N="",M=this[D]+": not bound to any nodes",K=this._nodes,L;if(K&&K[0]){L=K[0];N+=L[E];if(L.id){N+="#"+L.id;}if(L.className){N+="."+L.className.replace(" ",".");}if(K.length>1){N+="...["+K.length+" items]";}}return N||M;}},true);A.importMethod(C.Node.prototype,["append","detach","detachAll","insert","prepend","remove","set","setContent"]);A.prototype.get=function(L){var O=[],N=this._nodes,M=false,P=A._getTempNode,K,Q;if(N[0]){K=C.Node._instances[N[0]._yuid]||P(N[0]);Q=K._get(L);if(Q&&Q.nodeType){M=true;}}C.Array.each(N,function(R){K=C.Node._instances[R._yuid];if(!K){K=P(R);}Q=K._get(L);if(!M){Q=C.Node.scrubVal(Q,K);}O.push(Q);});return(M)?C.all(O):O;};C.NodeList=A;C.all=function(K){return new A(K);};C.Node.all=C.all;C.Array.each(["replaceChild","appendChild","insertBefore","removeChild","hasChildNodes","cloneNode","hasAttribute","removeAttribute","scrollIntoView","getElementsByTagName","focus","blur","submit","reset","select"],function(K){C.Node.prototype[K]=function(O,M,L){var N=this.invoke(K,O,M,L);return N;};});F.importMethod(C.DOM,["contains","setAttribute","getAttribute"]);C.NodeList.importMethod(C.Node.prototype,["getAttribute","setAttribute"]);(function(L){var K=["hasClass","addClass","removeClass","replaceClass","toggleClass"];L.Node.importMethod(L.DOM,K);L.NodeList.importMethod(L.Node.prototype,K);})(C);if(!document.documentElement.hasAttribute){C.Node.prototype.hasAttribute=function(K){return C.DOM.getAttribute(this._node,K)!=="";};}C.Node.ATTRS.type={setter:function(L){if(L==="hidden"){try{this._node.type="hidden";}catch(K){this.setStyle("display","none");this._inputType="hidden";}}else{try{this._node.type=L;}catch(K){}}return L;},getter:function(){return this._inputType||this._node.type;},_bypassProxy:true};},"3.0.0",{requires:["dom-base","selector-css2","event-base"]});YUI.add("node-style",function(A){(function(C){var B=["getStyle","getComputedStyle","setStyle","setStyles"];C.Node.importMethod(C.DOM,B);C.NodeList.importMethod(C.Node.prototype,B);})(A);},"3.0.0",{requires:["dom-style","node-base"]});YUI.add("node-screen",function(A){A.each(["winWidth","winHeight","docWidth","docHeight","docScrollX","docScrollY"],function(B){A.Node.ATTRS[B]={getter:function(){var C=Array.prototype.slice.call(arguments);C.unshift(A.Node.getDOMNode(this));return A.DOM[B].apply(this,C);}};});A.Node.ATTRS.scrollLeft={getter:function(){var B=A.Node.getDOMNode(this);return("scrollLeft" in B)?B.scrollLeft:A.DOM.docScrollX(B);},setter:function(C){var B=A.Node.getDOMNode(this);if(B){if("scrollLeft" in B){B.scrollLeft=C;}else{if(B.document||B.nodeType===9){A.DOM._getWin(B).scrollTo(C,A.DOM.docScrollY(B));}}}else{}}};A.Node.ATTRS.scrollTop={getter:function(){var B=A.Node.getDOMNode(this);return("scrollTop" in B)?B.scrollTop:A.DOM.docScrollY(B);},setter:function(C){var B=A.Node.getDOMNode(this);if(B){if("scrollTop" in B){B.scrollTop=C;}else{if(B.document||B.nodeType===9){A.DOM._getWin(B).scrollTo(A.DOM.docScrollX(B),C);}}}else{}}};A.Node.importMethod(A.DOM,["getXY","setXY","getX","setX","getY","setY"]);A.Node.ATTRS.region={getter:function(){var B=A.Node.getDOMNode(this);if(B&&!B.tagName){if(B.nodeType===9){B=B.documentElement;
}else{if(B.alert){B=B.document.documentElement;}}}return A.DOM.region(B);}};A.Node.ATTRS.viewportRegion={getter:function(){return A.DOM.viewportRegion(A.Node.getDOMNode(this));}};A.Node.importMethod(A.DOM,"inViewportRegion");A.Node.prototype.intersect=function(B,D){var C=A.Node.getDOMNode(this);if(B instanceof A.Node){B=A.Node.getDOMNode(B);}return A.DOM.intersect(C,B,D);};A.Node.prototype.inRegion=function(B,D,E){var C=A.Node.getDOMNode(this);if(B instanceof A.Node){B=A.Node.getDOMNode(B);}return A.DOM.inRegion(C,B,D,E);};},"3.0.0",{requires:["dom-screen"]});YUI.add("node-pluginhost",function(A){A.Node.plug=function(){var B=A.Array(arguments);B.unshift(A.Node);A.Plugin.Host.plug.apply(A.Base,B);return A.Node;};A.Node.unplug=function(){var B=A.Array(arguments);B.unshift(A.Node);A.Plugin.Host.unplug.apply(A.Base,B);return A.Node;};A.mix(A.Node,A.Plugin.Host,false,null,1);A.NodeList.prototype.plug=function(){var B=arguments;A.NodeList.each(this,function(C){A.Node.prototype.plug.apply(A.one(C),B);});};A.NodeList.prototype.unplug=function(){var B=arguments;A.NodeList.each(this,function(C){A.Node.prototype.unplug.apply(A.one(C),B);});};},"3.0.0",{requires:["node-base","pluginhost"]});YUI.add("node-event-delegate",function(A){A.Node.prototype.delegate=function(F,E,B){var D=Array.prototype.slice.call(arguments,3),C=[F,E,A.Node.getDOMNode(this),B];C=C.concat(D);return A.delegate.apply(A,C);};},"3.0.0",{requires:["node-base","event-delegate","pluginhost"]});YUI.add("node",function(A){},"3.0.0",{skinnable:false,use:["node-base","node-style","node-screen","node-pluginhost","node-event-delegate"],requires:["dom","event-base","event-delegate","pluginhost"]});
// ../yui/node-focusmanager/node-focusmanager-min.js
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 3.0.0
build: 1549
*/
YUI.add("node-focusmanager",function(B){var J="activeDescendant",L="id",I="disabled",N="tabIndex",E="focused",A="focusClass",Q="circular",C="UI",F="key",G=J+"Change",O="host",P={37:true,38:true,39:true,40:true},M={"a":true,"button":true,"input":true,"object":true},H=B.Lang,K=B.UA,D=function(){D.superclass.constructor.apply(this,arguments);};D.ATTRS={focused:{value:false,readOnly:true},descendants:{getter:function(R){return this.get(O).all(R);}},activeDescendant:{setter:function(V){var T=H.isNumber,S=B.Attribute.INVALID_VALUE,R=this._descendantsMap,Y=this._descendants,X,U,W;if(T(V)){X=V;U=X;}else{if((V instanceof B.Node)&&R){X=R[V.get(L)];if(T(X)){U=X;}else{U=S;}}else{U=S;}}if(Y){W=Y.item(X);if(W&&W.get("disabled")){U=S;}}return U;}},keys:{value:{next:null,previous:null}},focusClass:{},circular:{value:true}};B.extend(D,B.Plugin.Base,{_stopped:true,_descendants:null,_descendantsMap:null,_focusedNode:null,_lastNodeIndex:0,_eventHandlers:null,_initDescendants:function(){var Y=this.get("descendants"),R={},W=-1,V,U=this.get(J),X,S,T=0;if(H.isUndefined(U)){U=-1;}if(Y){V=Y.size();if(V>1){for(T=0;T1){R=this._eventHandlers||[];S=this.get(O).get("ownerDocument");if(R.length===0){R.push(S.on("focus",this._onDocFocus,this));R.push(S.on("mousedown",this._onDocMouseDown,this));R.push(this.after("keysChange",this._attachKeyHandler));R.push(this.after("descendantsChange",this._initDescendants));R.push(this.after(G,this._afterActiveDescendantChange));T=this.after("focusedChange",B.bind(function(V){if(V.newVal){this._attachKeyHandler();T.detach();}},this));R.push(T);}this._eventHandlers=R;}},_onDocMouseDown:function(U){var W=this.get(O),R=U.target,V=W.contains(R),T,S=function(Y){var X=false;if(!Y.compareTo(W)){X=this._isDescendant(Y)?Y:S.call(this,Y.get("parentNode"));}return X;};if(V){T=S.call(this,R);if(T){R=T;}else{if(!T&&this.get(E)){this._set(E,false);this._onDocFocus(U);}}}if(V&&this._isDescendant(R)){this.focus(R);}else{if(K.webkit&&this.get(E)&&(!V||(V&&!this._isDescendant(R)))){this._set(E,false);this._onDocFocus(U);}}},_onDocFocus:function(W){var U=this._focusTarget||W.target,S=this.get(E),V=this.get(A),T=this._focusedNode,R;if(this._focusTarget){this._focusTarget=null;}if(this.get(O).contains(U)){R=this._isDescendant(U);if(!S&&R){S=true;}else{if(S&&!R){S=false;}}}else{S=false;}if(V){if(T&&(!T.compareTo(U)||!S)){this._removeFocusClass();}if(R&&S){if(V.fn){U=V.fn(U);U.addClass(V.className);}else{U.addClass(V);}this._focusedNode=U;}}this._set(E,S);},_focusNext:function(S,T){var R=T||this.get(J),U;if(this._isDescendant(S.target)&&(R<=this._lastNodeIndex)){R=R+1;if(R===(this._lastNodeIndex+1)&&this.get(Q)){R=0;}U=this._descendants.item(R);if(U.get(I)){this._focusNext(S,R);}else{this.focus(R);}}this._preventScroll(S);},_focusPrevious:function(S,T){var R=T||this.get(J),U;if(this._isDescendant(S.target)&&R>=0){R=R-1;if(R===-1&&this.get(Q)){R=this._lastNodeIndex;}U=this._descendants.item(R);if(U.get(I)){this._focusPrevious(S,R);}else{this.focus(R);}}this._preventScroll(S);},_afterActiveDescendantChange:function(R){var S=this._descendants.item(R.prevVal);if(S){S.set(N,-1);}S=this._descendants.item(R.newVal);if(S){S.set(N,0);}},initializer:function(R){this.start();},destructor:function(){this.stop();this.get(O).focusManager=null;},focus:function(R){if(H.isUndefined(R)){R=this.get(J);}this.set(J,R,{src:C});var S=this._descendants.item(this.get(J));if(S){S.focus();if(K.opera&&S.get("nodeName").toLowerCase()==="button"){this._focusTarget=S;}}},blur:function(){var R;if(this.get(E)){R=this._descendants.item(this.get(J));if(R){R.blur();this._removeFocusClass();}this._set(E,false,{src:C});}},start:function(){if(this._stopped){this._initDescendants();this._attachEventHandlers();this._stopped=false;}},stop:function(){if(!this._stopped){this._detachEventHandlers();this._descendants=null;this._focusedNode=null;this._lastNodeIndex=0;this._stopped=true;}},refresh:function(){this._initDescendants();}});D.NAME="nodeFocusManager";D.NS="focusManager";B.namespace("Plugin");B.Plugin.NodeFocusManager=D;},"3.0.0",{requires:["attribute","node","plugin","node-event-simulate","event-key","event-focus"]});
// ../yui/node/node-event-simulate-min.js
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 3.0.0
build: 1549
*/
YUI.add("node-event-simulate",function(A){A.Node.prototype.simulate=function(C,B){A.Event.simulate(A.Node.getDOMNode(this),C,B);};},"3.0.0",{requires:["node-base","event-simulate"]});
// ../yui/dump/dump-min.js
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 3.0.0
build: 1549
*/
YUI.add("dump",function(G){var B=G.Lang,C="{...}",F="f(){...}",A=", ",D=" => ",E=function(N,M){var I,H,K=[],J=B.type(N);if(!B.isObject(N)){return N+"";}else{if(J=="date"){return N;}else{if(N.nodeType&&N.tagName){return N.tagName+"#"+N.id;}else{if(N.document&&N.navigator){return"window";}else{if(N.location&&N.body){return"document";}else{if(J=="function"){return F;}}}}}}M=(B.isNumber(M))?M:3;if(J=="array"){K.push("[");for(I=0,H=N.length;I0)?B.dump(N[I],M-1):C);}else{K.push(N[I]);}K.push(A);}if(K.length>1){K.pop();}K.push("]");}else{if(J=="regexp"){K.push(N.toString());}else{K.push("{");for(I in N){if(N.hasOwnProperty(I)){try{K.push(I+D);if(B.isObject(N[I])){K.push((M>0)?B.dump(N[I],M-1):C);}else{K.push(N[I]);}K.push(A);}catch(L){K.push("Error: "+L.message);}}}if(K.length>1){K.pop();}K.push("}");}}return K.join("");};G.dump=E;B.dump=E;},"3.0.0");
// ../yui/io/io-min.js
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 3.0.0
build: 1549
*/
YUI.add("io-base",function(D){var d="io:start",P="io:complete",B="io:success",F="io:failure",e="io:end",X=0,O={"X-Requested-With":"XMLHttpRequest"},Z={},K=D.config.win;function b(h,p,g){var j,l,Y;p=p||{};l=W(p.xdr||p.form,g);Y=p.method?p.method.toUpperCase():"GET";if(p.form){if(p.form.upload){return D.io._upload(l,h,p);}else{j=D.io._serialize(p.form,p.data);if(Y==="POST"){p.data=j;V("Content-Type","application/x-www-form-urlencoded");}else{if(Y==="GET"){h=Q(h,j);}}}}else{if(p.data&&Y==="GET"){h=Q(h,p.data);}}if(p.xdr){if(p.xdr.use==="native"&&window.XDomainRequest||p.xdr.use==="flash"){return D.io.xdr(h,l,p);}if(p.xdr.credentials){l.c.withCredentials=true;}}l.c.onreadystatechange=function(){c(l,p);};try{l.c.open(Y,h,true);}catch(n){if(p.xdr){return A(l,h,p);}}if(p.data&&Y==="POST"){V("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");}C(l.c,p.headers||{});try{l.c.send(p.data||"");}catch(k){if(p.xdr){return A(l,h,p);}}S(l.id,p);if(p.timeout){R(l,p.timeout);}return{id:l.id,abort:function(){return l.c?N(l,"abort"):false;},isInProgress:function(){return l.c?l.c.readyState!==4&&l.c.readyState!==0:false;}};}function U(f,g){var Y=new D.EventTarget().publish("transaction:"+f);Y.subscribe(g.on[f],(g.context||D),g.arguments);return Y;}function S(g,f){var Y;f.on=f.on||{};D.fire(d,g);if(f.on.start){Y=U("start",f);Y.fire(g);}}function G(g,h){var Y,f=g.status?{status:0,statusText:g.status}:g.c;h.on=h.on||{};D.fire(P,g.id,f);if(h.on.complete){Y=U("complete",h);Y.fire(g.id,f);}}function T(f,g){var Y;g.on=g.on||{};D.fire(B,f.id,f.c);if(g.on.success){Y=U("success",g);Y.fire(f.id,f.c);}J(f,g);}function I(g,h){var Y,f=g.status?{status:0,statusText:g.status}:g.c;h.on=h.on||{};D.fire(F,g.id,f);if(h.on.failure){Y=U("failure",h);Y.fire(g.id,f);}J(g,h);}function J(f,g){var Y;g.on=g.on||{};D.fire(e,f.id);if(g.on.end){Y=U("end",g);Y.fire(f.id);}H(f,g.xdr?true:false);}function N(f,Y){if(f&&f.c){f.status=Y;f.c.abort();}}function A(f,Y,h){var g=parseInt(f.id);H(f);h.xdr.use="flash";return D.io(Y,h,g);}function E(){var Y=X;X++;return Y;}function W(g,Y){var f={};f.id=D.Lang.isNumber(Y)?Y:E();g=g||{};if(!g.use&&!g.upload){f.c=L();}else{if(g.use){if(g.use==="flash"){f.c=D.io._transport[g.use];}else{if(g.use==="native"&&window.XDomainRequest){f.c=new XDomainRequest();}else{f.c=L();}}}else{f.c={};}}return f;}function L(){return K.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP");}function Q(Y,f){Y+=((Y.indexOf("?")==-1)?"?":"&")+f;return Y;}function V(Y,f){if(f){O[Y]=f;}else{delete O[Y];}}function C(g,Y){var f;for(f in O){if(O.hasOwnProperty(f)){if(Y[f]){break;}else{Y[f]=O[f];}}}for(f in Y){if(Y.hasOwnProperty(f)){g.setRequestHeader(f,Y[f]);}}}function R(f,Y){Z[f.id]=K.setTimeout(function(){N(f,"timeout");},Y);}function M(Y){K.clearTimeout(Z[Y]);delete Z[Y];}function c(Y,f){if(Y.c.readyState===4){if(f.timeout){M(Y.id);}K.setTimeout(function(){G(Y,f);a(Y,f);},0);}}function a(g,h){var Y;try{if(g.c.status&&g.c.status!==0){Y=g.c.status;}else{Y=0;}}catch(f){Y=0;}if(Y>=200&&Y<300||Y===1223){T(g,h);}else{I(g,h);}}function H(Y,f){if(K.XMLHttpRequest&&!f){if(Y.c){Y.c.onreadystatechange=null;}}Y.c=null;Y=null;}b.start=S;b.complete=G;b.success=T;b.failure=I;b.end=J;b._id=E;b._timeout=Z;b.header=V;D.io=b;D.io.http=b;},"3.0.0",{requires:["event-custom-base"]});YUI.add("io-form",function(A){A.mix(A.io,{_serialize:function(M,R){var I=encodeURIComponent,H=[],N=M.useDisabled||false,Q=0,B=(typeof M.id==="string")?M.id:M.id.getAttribute("id"),K,J,D,P,L,G,O,E,F,C;if(!B){B=A.guid("io:");M.id.setAttribute("id",B);}J=A.config.doc.getElementById(B);for(G=0,O=J.elements.length;G-1){C=K.options[K.selectedIndex];H[Q++]=D+I((C.attributes.value&&C.attributes.value.specified)?C.value:C.text);}break;case"select-multiple":if(K.selectedIndex>-1){for(E=K.selectedIndex,F=K.options.length;E'+' '+' '+' '+"",L=document.createElement("div");document.body.appendChild(L);L.innerHTML=K;}function G(J,K){J.c.onprogress=function(){E[J.id]=3;};J.c.onload=function(){E[J.id]=4;A.io.xdrResponse(J,K,"success");};J.c.onerror=function(){E[J.id]=4;A.io.xdrResponse(J,K,"failure");};if(K.timeout){J.c.ontimeout=function(){E[J.id]=4;A.io.xdrResponse(J,K,"timeout");};J.c.timeout=K.timeout;}}function B(M,K,N){var L,J;if(!M.status){L=K?decodeURI(M.c.responseText):M.c.responseText;J=N?A.DataType.XML.parse(L):null;return{id:M.id,c:{responseText:L,responseXML:J}};}else{return{id:M.id,status:M.status};}}function H(J,K){return K.xdr.use==="flash"?J.c.abort(J.id,K):J.c.abort();}function C(K,J){return(J==="flash"&&K.c)?K.c.isInProgress(K.id):E[K.id]!==4;}A.mix(A.io,{_transport:{},xdr:function(J,K,L){if(L.on&&L.xdr.use==="flash"){D[K.id]={on:L.on,context:L.context,arguments:L.arguments};L.context=null;L.form=null;K.c.send(J,L,K.id);}else{if(window.XDomainRequest){G(K,L);K.c.open(L.method||"GET",J);K.c.send(L.data);}}return{id:K.id,abort:function(){return K.c?H(K,L):false;},isInProgress:function(){return K.c?C(K,L.xdr.use):false;}};},xdrResponse:function(N,P,M){var J,L,K=P.xdr.use==="flash"?true:false,O=P.xdr.dataType==="xml"?true:false;P.on=P.on||{};if(K){J=D||{};L=J[N.id]?J[N.id]:null;if(L){P.on=L.on;
P.context=L.context;P.arguments=L.arguments;}}if(M===("abort"||"timeout")){N.status=M;}switch(M){case"start":A.io.start(N.id,P);break;case"success":A.io.success(B(N,K,O),P);K?delete J[N.id]:delete E[N.id];break;case"timeout":case"abort":case"failure":A.io.failure(B(N,K,O),P);K?delete J[N.id]:delete E[N.id];break;}},xdrReady:function(J){A.fire(I,J);},transport:function(J){var K=J.yid?J.yid:A.id;F(J.src,K);this._transport.flash=A.config.doc.getElementById("yuiIoSwf");}});},"3.0.0",{requires:["io-base","datatype-xml"]});YUI.add("io-upload-iframe",function(B){var I=B.config.win;function D(P,O){var Q=[],L=O.split("="),N,M;for(N=0,M=L.length-1;N ');L._node.style.position="absolute";L._node.style.top="-1000px";L._node.style.left="-1000px";B.one("body").appendChild(L);B.on("load",function(){A(M,N);},"#ioupload"+M.id);}function A(P,Q){var O=B.one("#ioupload"+P.id).get("contentWindow.document"),L=O.one("body"),M=(O._node.nodeType===9),N;if(Q.timeout){H(P.id);}if(L){N=L.query("pre:first-child");P.c.responseText=N?N.get("innerHTML"):L.get("innerHTML");}else{if(M){P.c.responseXML=O._node;}}B.io.complete(P,Q);B.io.end(P,Q);I.setTimeout(function(){G(P.id);},0);}function C(L,M){B.io._timeout[L.id]=I.setTimeout(function(){var N={id:L.id,status:"timeout"};B.io.complete(N,M);B.io.end(N,M);},M.timeout);}function H(L){I.clearTimeout(B.io._timeout[L]);delete B.io._timeout[L];}function G(L){B.Event.purgeElement("#ioupload"+L,false);B.one("body").removeChild(B.one("#ioupload"+L));}B.mix(B.io,{_upload:function(P,N,Q){var O=(typeof Q.form.id==="string")?B.config.doc.getElementById(Q.form.id):Q.form.id,M,L={action:O.getAttribute("action"),target:O.getAttribute("target")};J(P,Q);E(O,P.id,N);if(Q.data){M=D(O,Q.data);}if(Q.timeout){C(P,Q);}O.submit();B.io.start(P.id,Q);if(Q.data){F(O,M);}K(O,L);return{id:P.id,abort:function(){var R={id:P.id,status:"abort"};if(B.one("#ioupload"+P.id)){G(P.id);B.io.complete(R,Q);B.io.end(R,Q);}else{return false;}},isInProgress:function(){return B.one("#ioupload"+P.id)?true:false;}};}});},"3.0.0",{requires:["io-base","node-base","event-base"]});YUI.add("io-queue",function(B){var A=new B.Queue(),I,G,M=1;function J(N,P){var O={uri:N,id:B.io._id(),cfg:P};A.add(O);if(M===1){F();}return O;}function F(){var N=A.next();G=N.id;M=0;B.io(N.uri,N.cfg,N.id);}function D(N){A.promote(N);}function C(N){M=1;if(G===N&&A.size()>0){F();}}function L(N){A.remove(N);}function E(){M=1;if(A.size()>0){F();}}function H(){M=0;}function K(){return A.size();}I=B.on("io:complete",function(N){C(N);},B.io);J.size=K;J.start=E;J.stop=H;J.promote=D;J.remove=L;B.mix(B.io,{queue:J},true);},"3.0.0",{requires:["io-base","queue-promote"]});YUI.add("io",function(A){},"3.0.0",{use:["io-base","io-form","io-xdr","io-upload-iframe","io-queue"]});
// ../yui/json/json-min.js
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 3.0.0
build: 1549
*/
YUI.add("json-parse",function(Y){var _JSON=Y.config.win.JSON,Native=(Object.prototype.toString.call(_JSON)==="[object JSON]"&&_JSON),_UNICODE_EXCEPTIONS=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,_ESCAPES=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,_VALUES=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,_BRACKETS=/(?:^|:|,)(?:\s*\[)+/g,_UNSAFE=/[^\],:{}\s]/,_escapeException=function(c){return"\\u"+("0000"+(+(c.charCodeAt(0))).toString(16)).slice(-4);},_revive=function(data,reviver){var walk=function(o,key){var k,v,value=o[key];if(value&&typeof value==="object"){for(k in value){if(value.hasOwnProperty(k)){v=walk(value,k);if(v===undefined){delete value[k];}else{value[k]=v;}}}}return reviver.call(o,key,value);};return typeof reviver==="function"?walk({"":data},""):data;},_parse=function(s,reviver){if(typeof s==="string"){s=s.replace(_UNICODE_EXCEPTIONS,_escapeException);if(!_UNSAFE.test(s.replace(_ESCAPES,"@").replace(_VALUES,"]").replace(_BRACKETS,""))){return _revive(eval("("+s+")"),reviver);}}throw new SyntaxError("JSON.parse");};Y.namespace("JSON").parse=function(s,reviver){return Native&&Y.JSON.useNativeParse?Native.parse(s,reviver):_parse(s,reviver);};Y.JSON.useNativeParse=!!Native;},"3.0.0");YUI.add("json-stringify",function(C){var b=C.config.win.JSON,E=C.Lang,A=E.isFunction,L=E.isObject,N=E.isArray,X=Object.prototype.toString,W=(X.call(b)==="[object JSON]"&&b),h="undefined",O="object",e="null",R="string",U="number",Q="boolean",D="date",H={"undefined":h,"string":R,"[object String]":R,"number":U,"[object Number]":U,"boolean":Q,"[object Boolean]":Q,"[object Date]":D,"[object RegExp]":O},i="",g="{",G="}",F="[",V="]",T=",",K=",\n",B="\n",I=":",f=": ",M='"',Z=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,a={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function c(j){var Y=typeof j;return H[Y]||H[X.call(j)]||(Y===O?(j?O:e):h);}function P(Y){if(!a[Y]){a[Y]="\\u"+("0000"+(+(Y.charCodeAt(0))).toString(16)).slice(-4);}return a[Y];}function J(Y){return M+Y.replace(Z,P)+M;}function d(Y,j){return Y.replace(/^/gm,j);}function S(j,s,Y){if(j===undefined){return undefined;}var l=A(s)?s:null,r=X.call(Y).match(/String|Number/)||[],t=C.JSON.dateToString,q=[],n,m,p;if(l||!N(s)){s=undefined;}if(s){n={};for(m=0,p=s.length;m=0;--u){if(q[u]===AA){throw new Error("JSON.stringify. Cyclical reference");}}x=N(AA);q.push(AA);if(x){for(u=AA.length-1;u>=0;--u){z[u]=k(AA,u)||e;}}else{AD=s||AA;u=0;for(o in AD){if(AD.hasOwnProperty(o)){AB=k(AA,o);if(AB){z[u++]=J(o)+y+AB;}}}}q.pop();if(Y&&z.length){return x?F+B+d(z.join(K),Y)+B+V:g+B+d(z.join(K),Y)+B+G;}else{return x?F+z.join(T)+V:g+z.join(T)+G;}}return k({"":j},"");}C.mix(C.namespace("JSON"),{useNativeStringify:!!W,dateToString:function(j){function Y(k){return k<10?"0"+k:k;}return j.getUTCFullYear()+"-"+Y(j.getUTCMonth()+1)+"-"+Y(j.getUTCDate())+"T"+Y(j.getUTCHours())+I+Y(j.getUTCMinutes())+I+Y(j.getUTCSeconds())+"Z";},stringify:function(k,Y,j){return W&&C.JSON.useNativeStringify?W.stringify(k,Y,j):S(k,Y,j);}});},"3.0.0");YUI.add("json",function(A){},"3.0.0",{use:["json-parse","json-stringify"]});
// ../yui/attribute/attribute-min.js
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 3.0.0
build: 1549
*/
YUI.add("attribute-base",function(C){C.State=function(){this.data={};};C.State.prototype={add:function(O,Y,e){var c=this.data;c[Y]=c[Y]||{};c[Y][O]=e;},addAll:function(O,c){var Y;for(Y in c){if(c.hasOwnProperty(Y)){this.add(O,Y,c[Y]);}}},remove:function(O,Y){var c=this.data;if(c[Y]&&(O in c[Y])){delete c[Y][O];}},removeAll:function(O,c){var Y=this.data;C.each(c||Y,function(e,d){if(C.Lang.isString(d)){this.remove(O,d);}else{this.remove(O,e);}},this);},get:function(O,Y){var c=this.data;return(c[Y]&&O in c[Y])?c[Y][O]:undefined;},getAll:function(O){var c=this.data,Y;C.each(c,function(e,d){if(O in c[d]){Y=Y||{};Y[d]=e[O];}},this);return Y;}};var K=C.Object,F=C.Lang,L=C.EventTarget,W=".",U="Change",N="getter",M="setter",P="readOnly",X="writeOnce",b="validator",H="value",Q="valueFn",E="broadcast",S="lazyAdd",J="_bypassProxy",a="added",B="initializing",I="initValue",V="published",T="defaultValue",A="lazy",R="isLazyAdd",G,Z={};Z[P]=1;Z[X]=1;Z[N]=1;Z[E]=1;function D(){var c=this,O=this.constructor.ATTRS,Y=C.Base;c._ATTR_E_FACADE={};L.call(c,{emitFacade:true});c._conf=c._state=new C.State();c._stateProxy=c._stateProxy||null;c._requireAddAttr=c._requireAddAttr||false;if(O&&!(Y&&c instanceof Y)){c.addAttrs(this._protectAttrs(O));}}D.INVALID_VALUE={};G=D.INVALID_VALUE;D._ATTR_CFG=[M,N,b,H,Q,X,P,S,E,J];D.prototype={addAttr:function(Y,O,d){var e=this,g=e._state,f,c;d=(S in O)?O[S]:d;if(d&&!e.attrAdded(Y)){g.add(Y,A,O||{});g.add(Y,a,true);}else{if(!e.attrAdded(Y)||g.get(Y,R)){O=O||{};c=(H in O);if(c){f=O.value;delete O.value;}O.added=true;O.initializing=true;g.addAll(Y,O);if(c){e.set(Y,f);}g.remove(Y,B);}}return e;},attrAdded:function(O){return !!this._state.get(O,a);},modifyAttr:function(Y,O){var c=this,e,d;if(c.attrAdded(Y)){if(c._isLazyAttr(Y)){c._addLazyAttr(Y);}d=c._state;for(e in O){if(Z[e]&&O.hasOwnProperty(e)){d.add(Y,e,O[e]);if(e===E){d.remove(Y,V);}}}}},removeAttr:function(O){this._state.removeAll(O);},get:function(O){return this._getAttr(O);},_isLazyAttr:function(O){return this._state.get(O,A);},_addLazyAttr:function(Y){var c=this._state,O=c.get(Y,A);c.add(Y,R,true);c.remove(Y,A);this.addAttr(Y,O);},set:function(O,c,Y){return this._setAttr(O,c,Y);},reset:function(O){var c=this,Y;if(O){if(c._isLazyAttr(O)){c._addLazyAttr(O);}c.set(O,c._state.get(O,I));}else{Y=c._state.data.added;C.each(Y,function(d,e){c.reset(e);},c);}return c;},_set:function(O,c,Y){return this._setAttr(O,c,Y,true);},_getAttr:function(c){var d=this,h=c,e=d._state,f,O,g,Y;if(c.indexOf(W)!==-1){f=c.split(W);c=f.shift();}if(d._tCfgs&&d._tCfgs[c]){Y={};Y[c]=d._tCfgs[c];delete d._tCfgs[c];d._addAttrs(Y,d._tVals);}if(d._isLazyAttr(c)){d._addLazyAttr(c);}g=d._getStateVal(c);O=e.get(c,N);g=(O)?O.call(d,g,h):g;g=(f)?K.getValue(g,f):g;return g;},_setAttr:function(c,f,O,d){var i=true,Y=this._state,g=this._stateProxy,j=Y.data,h,k,l,e;if(c.indexOf(W)!==-1){k=c;l=c.split(W);c=l.shift();}if(this._isLazyAttr(c)){this._addLazyAttr(c);}h=(!j.value||!(c in j.value));if(g&&c in g&&!this._state.get(c,J)){h=false;}if(this._requireAddAttr&&!this.attrAdded(c)){}else{if(!h&&!d){if(Y.get(c,X)){i=false;}if(Y.get(c,P)){i=false;}}if(i){if(!h){e=this.get(c);}if(l){f=K.setValue(C.clone(e),l,f);if(f===undefined){i=false;}}if(i){if(Y.get(c,B)){this._setAttrVal(c,k,e,f);}else{this._fireAttrChange(c,k,e,f,O);}}}}return this;},_fireAttrChange:function(g,f,d,c,O){var i=this,e=g+U,Y=i._state,h;if(!Y.get(g,V)){i.publish(e,{queuable:false,defaultFn:i._defAttrChangeFn,silent:true,broadcast:Y.get(g,E)});Y.add(g,V,true);}h=(O)?C.merge(O):i._ATTR_E_FACADE;h.type=e;h.attrName=g;h.subAttrName=f;h.prevVal=d;h.newVal=c;i.fire(h);},_defAttrChangeFn:function(O){if(!this._setAttrVal(O.attrName,O.subAttrName,O.prevVal,O.newVal)){O.stopImmediatePropagation();}else{O.newVal=this._getStateVal(O.attrName);}},_getStateVal:function(O){var Y=this._stateProxy;return Y&&(O in Y)&&!this._state.get(O,J)?Y[O]:this._state.get(O,H);},_setStateVal:function(O,c){var Y=this._stateProxy;if(Y&&(O in Y)&&!this._state.get(O,J)){Y[O]=c;}else{this._state.add(O,H,c);}},_setAttrVal:function(l,k,h,f){var n=this,i=true,c=n._state,d=c.get(l,b),g=c.get(l,M),j=c.get(l,B),m=this._getStateVal(l),Y=k||l,e,O;if(d){O=d.call(n,f,Y);if(!O&&j){f=c.get(l,T);O=true;}}if(!d||O){if(g){e=g.call(n,f,Y);if(e===G){i=false;}else{if(e!==undefined){f=e;}}}if(i){if(!k&&(f===m)&&!F.isObject(f)){i=false;}else{if(c.get(l,I)===undefined){c.add(l,I,f);}n._setStateVal(l,f);}}}else{i=false;}return i;},setAttrs:function(O,Y){return this._setAttrs(O,Y);},_setAttrs:function(Y,c){for(var O in Y){if(Y.hasOwnProperty(O)){this.set(O,Y[O]);}}return this;},getAttrs:function(O){return this._getAttrs(O);},_getAttrs:function(d){var f=this,h={},e,Y,O,g,c=(d===true);d=(d&&!c)?d:K.keys(f._state.data.added);for(e=0,Y=d.length;e=0;--O){X=W[O];for(T in X){if(X.hasOwnProperty(T)){S=B.mix({},X[T],true,R);L=S.value;V=S.cloneDefaultValue;if(L){if((V===undefined&&(C===L.constructor||J.isArray(L)))||V===K||V===true){S.value=B.clone(L);}else{if(V===Q){S.value=B.merge(L);}}}Y=null;if(T.indexOf(I)!==-1){Y=T.split(I);T=Y.shift();}if(Y&&U[T]&&U[T].value){H.setValue(U[T].value,Y,L);}else{if(!Y){if(!U[T]){U[T]=S;}else{B.mix(U[T],S,true,R);}}}}}}}return U;},_initHierarchy:function(U){var R=this._lazyAddAttrs,V,W,X,S,O,T=this._getClasses(),L=this._getAttrCfgs();for(X=T.length-1;X>=0;X--){V=T[X];W=V.prototype;if(V._yuibuild&&V._yuibuild.exts&&!V._yuibuild.dynamic){for(S=0,O=V._yuibuild.exts.length;S=M){break;}J=U.substring(N+1,M);S=J;T=null;L=S.indexOf(F);if(L>-1){T=S.substring(L+1);S=S.substring(0,L);}R=I[S];if(P){R=P(S,R,T);}if(B.isObject(R)){if(!G.dump){R=R.toString();}else{if(B.isArray(R)){R=G.dump(R,parseInt(T,10));}else{T=T||"";O=T.indexOf(D);if(O>-1){T=T.substring(4);}if(R.toString===Object.prototype.toString||O>-1){R=G.dump(R,parseInt(T,10));}else{R=R.toString();}}}}else{if(!B.isString(R)&&!B.isNumber(R)){R="~-"+Q.length+"-~";Q[Q.length]=J;}}U=U.substring(0,N)+R+U.substring(M+1);}for(N=Q.length-1;N>=0;N=N-1){U=U.replace(new RegExp("~-"+N+"-~"),K+Q[N]+H,"g");}return U;};G.substitute=A;B.substitute=A;},"3.0.0",{optional:["dump"]});
// ../yui/anim/anim-min.js
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 3.0.0
build: 1549
*/
YUI.add("anim-base",function(B){var C="running",N="startTime",L="elapsedTime",J="start",I="tween",M="end",D="node",K="paused",P="reverse",H="iterationCount",A=Number;var F={},O={},E;B.Anim=function(){B.Anim.superclass.constructor.apply(this,arguments);O[B.stamp(this)]=this;};B.Anim.NAME="anim";B.Anim.RE_DEFAULT_UNIT=/^width|height|top|right|bottom|left|margin.*|padding.*|border.*$/i;B.Anim.DEFAULT_UNIT="px";B.Anim.DEFAULT_EASING=function(R,Q,T,S){return T*R/S+Q;};B.Anim.behaviors={left:{get:function(R,Q){return R._getOffset(Q);}}};B.Anim.behaviors.top=B.Anim.behaviors.left;B.Anim.DEFAULT_SETTER=function(U,R,X,W,Q,V,S,T){T=T||"";U._node.setStyle(R,S(Q,A(X),A(W)-A(X),V)+T);};B.Anim.DEFAULT_GETTER=function(Q,R){return Q._node.getComputedStyle(R);};B.Anim.ATTRS={node:{setter:function(Q){Q=B.get(Q);this._node=Q;if(!Q){}return Q;}},duration:{value:1},easing:{value:B.Anim.DEFAULT_EASING,setter:function(Q){if(typeof Q==="string"&&B.Easing){return B.Easing[Q];}}},from:{},to:{},startTime:{value:0,readOnly:true},elapsedTime:{value:0,readOnly:true},running:{getter:function(){return !!F[B.stamp(this)];},value:false,readOnly:true},iterations:{value:1},iterationCount:{value:0,readOnly:true},direction:{value:"normal"},paused:{readOnly:true,value:false},reverse:{value:false}};B.Anim.run=function(){for(var Q in O){if(O[Q].run){O[Q].run();}}};B.Anim.pause=function(){for(var Q in F){if(F[Q].pause){F[Q].pause();}}B.Anim._stopTimer();};B.Anim.stop=function(){for(var Q in F){if(F[Q].stop){F[Q].stop();}}B.Anim._stopTimer();};B.Anim._startTimer=function(){if(!E){E=setInterval(B.Anim._runFrame,1);}};B.Anim._stopTimer=function(){clearInterval(E);E=0;};B.Anim._runFrame=function(){var Q=true;for(var R in F){if(F[R]._runFrame){Q=false;F[R]._runFrame();}}if(Q){B.Anim._stopTimer();}};B.Anim.RE_UNITS=/^(-?\d*\.?\d*){1}(em|ex|px|in|cm|mm|pt|pc|%)*$/;var G={run:function(){if(!this.get(C)){this._start();}else{if(this.get(K)){this._resume();}}return this;},pause:function(){if(this.get(C)){this._pause();}return this;},stop:function(Q){if(this.get(C)||this.get(K)){this._end(Q);}return this;},_added:false,_start:function(){this._set(N,new Date()-this.get(L));this._actualFrames=0;if(!this.get(K)){this._initAnimAttr();}F[B.stamp(this)]=this;B.Anim._startTimer();this.fire(J);},_pause:function(){this._set(N,null);this._set(K,true);delete F[B.stamp(this)];this.fire("pause");},_resume:function(){this._set(K,false);F[B.stamp(this)]=this;this.fire("resume");},_end:function(Q){this._set(N,null);this._set(L,0);this._set(K,false);delete F[B.stamp(this)];this.fire(M,{elapsed:this.get(L)});},_runFrame:function(){var X=this._runtimeAttr,S=B.Anim.behaviors,Y=X.easing,Z=X.duration,a=new Date()-this.get(N),W=this.get(P),U=(a>=Z),Q=Z,R,T;if(W){a=Z-a;U=(a<=0);Q=0;}for(var V in X){if(X[V].to){R=X[V];T=(V in S&&"set" in S[V])?S[V].set:B.Anim.DEFAULT_SETTER;if(!U){T(this,V,R.from,R.to,a,Z,Y,R.unit);}else{T(this,V,R.from,R.to,Q,Z,Y,R.unit);}}}this._actualFrames+=1;this._set(L,a);this.fire(I);if(U){this._lastFrame();}},_lastFrame:function(){var Q=this.get("iterations"),R=this.get(H);R+=1;if(Q==="infinite"||R=0;I--){F=G[I];L=F._UNPLUG;if(L){C.mix(H,L,true);}K=F._PLUG;if(K){C.mix(D,K,true);}}for(J in D){if(D.hasOwnProperty(J)){if(!H[J]){this.plug(D[J]);}}}if(E&&E.plugins){this.plug(E.plugins);}},_destroyPlugins:function(){this._unplug();},_plug:function(F,D){if(F&&F.NS){var E=F.NS;D=D||{};D.host=this;if(this.hasPlugin(E)){this[E].setAttrs(D);}else{this[E]=new F(D);this._plugins[E]=F;}}},_unplug:function(F){var E=F,D=this._plugins;if(A.isFunction(F)){E=F.NS;if(E&&(!D[E]||D[E]!==F)){E=null;}}if(E){if(this[E]){this[E].destroy();delete this[E];}if(D[E]){delete D[E];}}}};B.plug=function(E,I,G){var J,H,D,F;if(E!==C.Base){E._PLUG=E._PLUG||{};if(!A.isArray(I)){if(G){I={fn:I,cfg:G};}I=[I];}for(H=0,D=I.length;H=0;j--){O=k[j].NAME;if(O){Y.addClass(M.getClassName(O.toLowerCase()));}}L.addClass(this.getClassName(J));},_bindUI:function(){this.after("visibleChange",this._afterVisibleChange);this.after("disabledChange",this._afterDisabledChange);this.after("heightChange",this._afterHeightChange);this.after("widthChange",this._afterWidthChange);this.after("focusedChange",this._afterFocusedChange);this._bindDOMListeners();},_bindDOMListeners:function(){var L=this.get(h).get("ownerDocument");L.on("focus",this._onFocus,this);if(D.UA.webkit){L.on("mousedown",this._onDocMouseDown,this);}},_syncUI:function(){this._uiSetVisible(this.get(c));this._uiSetDisabled(this.get(f));this._uiSetHeight(this.get(X));this._uiSetWidth(this.get(G));this._uiSetFocused(this.get(T));this._uiSetTabIndex(this.get(C));},_uiSetHeight:function(L){if(Q.isNumber(L)){L=L+this.DEF_UNIT;}this.get(h).setStyle(X,L);},_uiSetWidth:function(L){if(Q.isNumber(L)){L=L+this.DEF_UNIT;}this.get(h).setStyle(G,L);},_uiSetVisible:function(Y){var O=this.get(h),L=this.getClassName(e);if(Y===true){O.removeClass(L);}else{O.addClass(L);}},_uiSetDisabled:function(Y){var O=this.get(h),L=this.getClassName(f);if(Y===true){O.addClass(L);}else{O.removeClass(L);}},_uiSetTabIndex:function(O){var L=this.get(h);if(Q.isNumber(O)){L.set(C,O);}else{L.removeAttribute(C);}},_uiSetFocused:function(j,Y){var O=this.get(h),L=this.getClassName(T);if(j===true){O.addClass(L);if(Y!==N){O.focus();}}else{O.removeClass(L);if(Y!==N){O.blur();}}},_afterVisibleChange:function(L){this._uiSetVisible(L.newVal);},_afterDisabledChange:function(L){this._uiSetDisabled(L.newVal);},_afterHeightChange:function(L){this._uiSetHeight(L.newVal);},_afterWidthChange:function(L){this._uiSetWidth(L.newVal);
},_afterFocusedChange:function(L){this._uiSetFocused(L.newVal,L.src);},_onDocMouseDown:function(L){if(this._hasDOMFocus){this._onFocus(L);}},_onFocus:function(O){var j=O.target,Y=this.get(h),L=(Y.compareTo(j)||Y.contains(j));this._hasDOMFocus=L;this._set(T,L,{src:N});},toString:function(){return this.constructor.NAME+"["+this._yuid+"]";},DEF_UNIT:"px",CONTENT_TEMPLATE:"
",BOUNDING_TEMPLATE:"
",WRAP_STYLES:{height:"100%",width:"100%",zIndex:false,position:"static",top:"0",left:"0",bottom:"",right:"",padding:"",margin:""},_setStrings:function(O,L){var Y=this._strings;L=L.toLowerCase();if(!Y[L]){Y[L]={};}D.aggregate(Y[L],O,true);return Y[L];},_getStrings:function(L){return this._strings[L.toLowerCase()];},getStrings:function(p){p=(p||this.get(F)).toLowerCase();var n=this.getDefaultLocale().toLowerCase(),O=this._getStrings(n),o=(O)?D.merge(O):{},m=p.split(Z);if(p!==n||m.length>1){var L="";for(var j=0,Y=m.length;j=0;L--){Y=O[L].HTML_PARSER;if(Y){D.mix(j,Y,true);}}this._HTML_PARSER=j;}return this._HTML_PARSER;}});D.Widget=E;},"3.0.0",{requires:["attribute","event-focus","base","node","classnamemanager"]});
// ../yui/widget/widget-position-ext-min.js
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 3.0.0
build: 1549
*/
YUI.add("widget-position-ext",function(A){var H=A.Lang,C="align",E="bindUI",B="syncUI",D="offsetWidth",I="offsetHeight",K="viewportRegion",G="region",J="alignChange";function F(L){if(!this._posNode){A.error("WidgetPosition needs to be added to the Widget, before WidgetPositionExt is added");}A.after(this._syncUIPosExtras,this,B);A.after(this._bindUIPosExtras,this,E);}F.ATTRS={align:{value:null},centered:{setter:function(L){return this._setAlignCenter(L);},lazyAdd:false,value:false}};F.TL="tl";F.TR="tr";F.BL="bl";F.BR="br";F.TC="tc";F.RC="rc";F.BC="bc";F.LC="lc";F.CC="cc";F.prototype={_syncUIPosExtras:function(){var L=this.get(C);if(L){this._uiSetAlign(L.node,L.points);}},_bindUIPosExtras:function(){this.after(J,this._afterAlignChange);},_setAlignCenter:function(L){if(L){this.set(C,{node:L===true?null:L,points:[F.CC,F.CC]});}return L;},_afterAlignChange:function(L){if(L.newVal){this._uiSetAlign(L.newVal.node,L.newVal.points);}},_uiSetAlign:function(O,N){if(!H.isArray(N)||N.length!=2){A.error("align: Invalid Points Arguments");return;}var M,L,P,Q;if(!O){M=this._posNode.get(K);}else{O=A.Node.get(O);if(O){M=O.get(G);}}if(M){M.width=M.width||M.right-M.left;M.height=M.height||M.bottom-M.top;L=N[0];P=N[1];switch(P){case F.TL:Q=[M.left,M.top];break;case F.TR:Q=[M.right,M.top];break;case F.BL:Q=[M.left,M.bottom];break;case F.BR:Q=[M.right,M.bottom];break;case F.TC:Q=[M.left+Math.floor(M.width/2),M.top];break;case F.BC:Q=[M.left+Math.floor(M.width/2),M.bottom];break;case F.LC:Q=[M.left,M.top+Math.floor(M.height/2)];break;case F.RC:Q=[M.right,M.top+Math.floor(M.height/2),L];break;case F.CC:Q=[M.left+Math.floor(M.width/2),M.top+Math.floor(M.height/2),L];break;default:break;}if(Q){this._doAlign(L,Q[0],Q[1]);}}},_doAlign:function(M,L,P){var O=this._posNode,N;switch(M){case F.TL:N=[L,P];break;case F.TR:N=[L-O.get(D),P];break;case F.BL:N=[L,P-O.get(I)];break;case F.BR:N=[L-O.get(D),P-O.get(I)];break;case F.TC:N=[L-(O.get(D)/2),P];break;case F.BC:N=[L-(O.get(D)/2),P-O.get(I)];break;case F.LC:N=[L,P-(O.get(I)/2)];break;case F.RC:N=[(L-O.get(D)),P-(O.get(I)/2)];break;case F.CC:N=[L-(O.get(D)/2),P-(O.get(I)/2)];break;default:break;}if(N){this.move(N);}},align:function(M,L){this.set(C,{node:M,points:L});},centered:function(L){this.align(L,[F.CC,F.CC]);}};A.WidgetPositionExt=F;},"3.0.0",{requires:["widget","widget-position"]});
// ../yui/cookie/cookie-min.js
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 3.0.0
build: 1549
*/
YUI.add("cookie",function(C){var K=C.Lang,I=C.Object,G=null,D=K.isString,P=K.isObject,F=K.isUndefined,E=K.isFunction,H=encodeURIComponent,B=decodeURIComponent,N=C.config.doc;function J(L){throw new TypeError(L);}function M(L){if(!D(L)||L===""){J("Cookie name must be a non-empty string.");}}function A(L){if(!D(L)||L===""){J("Subcookie name must be a non-empty string.");}}C.Cookie={_createCookieString:function(Q,T,R,O){O=O||{};var V=H(Q)+"="+(R?H(T):T),L=O.expires,U=O.path,S=O.domain;if(P(O)){if(L instanceof Date){V+="; expires="+L.toUTCString();}if(D(U)&&U!==""){V+="; path="+U;}if(D(S)&&S!==""){V+="; domain="+S;}if(O.secure===true){V+="; secure";}}return V;},_createCookieHashString:function(L){if(!P(L)){J("Cookie._createCookieHashString(): Argument must be an object.");}var O=[];I.each(L,function(R,Q){if(!E(R)&&!F(R)){O.push(H(Q)+"="+H(String(R)));}});return O.join("&");},_parseCookieHash:function(S){var R=S.split("&"),T=G,Q={};if(S.length){for(var O=0,L=R.length;O0){var L=(Y===false?function(Z){return Z;}:B),U=W.split(/;\s/g),V=G,O=G,R=G;for(var Q=0,S=U.length;Q';U.prototype={_syncUIStack:function(){this._uiSetShim(this.get(P));this._uiSetZIndex(this.get(c));},_bindUIStack:function(){this.after(b,this._afterShimChange);this.after(B,this._afterZIndexChange);},_renderUIStack:function(){this._stackNode.addClass(U.STACKED_CLASS_NAME);},_setZIndex:function(L){if(N.isString(L)){L=parseInt(L,10);}if(!N.isNumber(L)){L=0;}return L;},_afterShimChange:function(L){this._uiSetShim(L.newVal);},_afterZIndexChange:function(L){this._uiSetZIndex(L.newVal);},_uiSetZIndex:function(L){this._stackNode.setStyle(c,L);},_uiSetShim:function(L){if(L){if(this.get(a)){this._renderShim();}else{this._renderShimDeferred();}}else{this._destroyShim();}},_renderShimDeferred:function(){this._stackHandles[O]=this._stackHandles[O]||[];var Y=this._stackHandles[O],L=function(g){if(g.newVal){this._renderShim();}};Y.push(this.on(Z,L));},_addShimResizeHandlers:function(){this._stackHandles[f]=this._stackHandles[f]||[];var Y=this.sizeShim,L=this._stackHandles[f];this.sizeShim();L.push(this.after(Z,Y));L.push(this.after(C,Y));L.push(this.after(J,Y));L.push(this.after(I,Y));},_detachStackHandles:function(L){var Y=this._stackHandles[L],g;if(Y&&Y.length>0){while((g=Y.pop())){g.detach();}}},_renderShim:function(){var L=this._shimNode,Y=this._stackNode;if(!L){L=this._shimNode=this._getShimTemplate();Y.insertBefore(L,Y.get(A));if(T.ie==6){this._addShimResizeHandlers();}this._detachStackHandles(O);}},_destroyShim:function(){if(this._shimNode){this._shimNode.get(M).removeChild(this._shimNode);this._shimNode=null;this._detachStackHandles(O);this._detachStackHandles(f);}},sizeShim:function(){var Y=this._shimNode,L=this._stackNode;if(Y&&T.ie===6&&this.get(a)){Y.setStyle(H,L.get(Q)+K);Y.setStyle(V,L.get(D)+K);}},_getShimTemplate:function(){return d.create(U.SHIM_TEMPLATE,this._stackNode.get(X));}};E.WidgetStack=U;},"3.0.0",{requires:["widget"]});
// ../yui/widget/widget-stdmod-min.js
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 3.0.0
build: 1549
*/
YUI.add("widget-stdmod",function(A){var D=A.Lang,P=A.Node,c=A.NodeList,W=A.UA,C=A.Widget,B="",j="hd",h="bd",H="ft",e="header",m="body",k="footer",q="fillHeight",K="stdmod",t="px",T="Node",i="Content",o="innerHTML",d="firstChild",G="childNodes",l="createDocumentFragment",M="ownerDocument",U="contentBox",p="boundingBox",Z="height",g="offsetHeight",X="auto",J="headerContentChange",b="bodyContentChange",N="footerContentChange",R="fillHeightChange",S="HeightChange",r="contentUpdate",V="renderUI",f="bindUI",E="syncUI",Q=A.Widget.UI_SRC;function s(L){this._stdModNode=this.get(U);A.after(this._renderUIStdMod,this,V);A.after(this._bindUIStdMod,this,f);A.after(this._syncUIStdMod,this,E);}s.HEADER=e;s.BODY=m;s.FOOTER=k;s.AFTER="after";s.BEFORE="before";s.REPLACE="replace";var I=s.HEADER,a=s.BODY,O=s.FOOTER,n=s.AFTER,F=s.BEFORE;s.ATTRS={headerContent:{value:null},footerContent:{value:null},bodyContent:{value:null},fillHeight:{value:s.BODY,validator:function(L){return this._validateFillHeight(L);}}};s.HTML_PARSER={headerContent:function(L){return this._parseStdModHTML(I);},bodyContent:function(L){return this._parseStdModHTML(a);},footerContent:function(L){return this._parseStdModHTML(O);}};s.SECTION_CLASS_NAMES={header:C.getClassName(j),body:C.getClassName(h),footer:C.getClassName(H)};s.TEMPLATES={header:'
',body:'
',footer:'
'};s.prototype={_syncUIStdMod:function(){this._uiSetStdMod(I,this.get(I+i));this._uiSetStdMod(a,this.get(a+i));this._uiSetStdMod(O,this.get(O+i));this._uiSetFillHeight(this.get(q));},_renderUIStdMod:function(){this._stdModNode.addClass(C.getClassName(K));},_bindUIStdMod:function(){this.after(J,this._afterHeaderChange);this.after(b,this._afterBodyChange);this.after(N,this._afterFooterChange);this.after(R,this._afterFillHeightChange);this.after(S,this._fillHeight);this.after(r,this._fillHeight);},_afterHeaderChange:function(L){if(L.src!==Q){this._uiSetStdMod(I,L.newVal,L.stdModPosition);}},_afterBodyChange:function(L){if(L.src!==Q){this._uiSetStdMod(a,L.newVal,L.stdModPosition);}},_afterFooterChange:function(L){if(L.src!==Q){this._uiSetStdMod(O,L.newVal,L.stdModPosition);}},_afterFillHeightChange:function(L){this._uiSetFillHeight(L.newVal);},_validateFillHeight:function(L){return !L||L==s.BODY||L==s.HEADER||L==s.FOOTER;},_uiSetFillHeight:function(u){var Y=this.getStdModNode(u);var L=this._currFillNode;if(L&&Y!==L){L.setStyle(Z,B);}if(Y){this._currFillNode=Y;}this._fillHeight();},_fillHeight:function(){if(this.get(q)){var L=this.get(Z);if(L!=B&&L!=X){this.fillHeight(this._currFillNode);}}},_uiSetStdMod:function(v,u,L){if(u){var Y=this.getStdModNode(v)||this._renderStdMod(v);if(u instanceof P||u instanceof c){this._addNodeRef(Y,u,L);}else{this._addNodeHTML(Y,u,L);}this.set(v+i,this._getStdModContent(v),{src:Q});this.fire(r);}},_renderStdMod:function(u){var L=this.get(U),Y=this._findStdModSection(u);if(!Y){Y=this._getStdModTemplate(u);}this._insertStdModSection(L,u,Y);this[u+T]=Y;return this[u+T];},_insertStdModSection:function(L,v,u){var Y=L.get(d);if(v===O||!Y){L.appendChild(u);}else{if(v===I){L.insertBefore(u,Y);}else{var w=this[O+T];if(w){L.insertBefore(u,w);}else{L.appendChild(u);}}}},_getStdModTemplate:function(L){return P.create(s.TEMPLATES[L],this._stdModNode.get(M));},_addNodeHTML:function(u,Y,L){if(L==n){u.set(o,u.get(o)+Y);}else{if(L==F){u.set(o,Y+u.get(o));}else{u.set(o,Y);}}},_addNodeRef:function(x,v,Y){var L=true,u,w;if(Y==F){var y=x.get(d);if(y){if(v instanceof c){for(u=v.size()-1;u>=0;--u){x.insertBefore(v.item(u),y);}}else{x.insertBefore(v,y);}L=false;}}else{if(Y!=n){x.set(o,B);}}if(L){if(v instanceof c){for(u=0,w=v.size();u ."+s.SECTION_CLASS_NAMES[L]);},_parseStdModHTML:function(x){var w=this._findStdModSection(x),u,Y;if(w){u=w.get(M).invoke(l);Y=w.get(G);for(var L=Y.size()-1;L>=0;L--){var v=u.get(d);if(v){u.insertBefore(Y.item(L),v);}else{u.appendChild(Y.item(L));}}return u;}return null;},_getStdModContent:function(L){return(this[L+T])?this[L+T].get(G):null;},setStdModContent:function(u,Y,L){this.set(u+i,Y,{stdModPosition:L});},getStdModNode:function(L){return this[L+T]||null;},fillHeight:function(u){if(u){var y=this.get(p),AA=[this.headerNode,this.bodyNode,this.footerNode],Y,AB=0,AC=0,x=0,w=false;for(var z=0,v=AA.length;z=0){u.setStyle(Z,x+t);}var L=this.get(U).get(g);if(L!=AB){x=x-(L-AB);u.setStyle(Z,x+t);}}}}}};A.WidgetStdMod=s;},"3.0.0",{requires:["widget"]});
// ../yui/overlay/overlay-min.js
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 3.0.0
build: 1549
*/
YUI.add("overlay",function(A){A.Overlay=A.Base.build("overlay",A.Widget,[A.WidgetPosition,A.WidgetStack,A.WidgetPositionExt,A.WidgetStdMod]);},"3.0.0",{requires:["widget","widget-position","widget-stack","widget-position-ext","widget-stdmod"]});
// ../yui/node-menunav/node-menunav-min.js
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 3.0.0
build: 1549
*/
YUI.add("node-menunav",function(D){var m=D.UA,t=D.later,AL=D.ClassNameManager.getClassName,R="menu",G="menuitem",AH="hidden",S="parentNode",V="children",z="offsetHeight",AC="offsetWidth",AN="px",g="id",I=".",E="handledMouseOut",r="handledMouseOver",a="active",AJ="label",d="a",w="mousedown",AO="keydown",AB="click",Q="",U="first-of-type",AP="role",N="presentation",AD="descendants",j="UI",u="activeDescendant",J="useARIA",x="aria-hidden",y="content",c="host",h=u+"Change",AM=">.yui-menu-content>ul>li>a",O=">.yui-menu-content>ul>li>.yui-menu-label>a:first-child",v="autoSubmenuDisplay",T="mouseOutHideDelay",l=AL(R),AF=AL(R,AH),Z=AL(R,"horizontal"),AI=AL(R,AJ),k=AL(R,AJ,a),X=AL(R,AJ,(R+"visible")),K=AL(G),A=AL(G,a),i=I+l,AG=(I+AL(R,"toggle"));var L=function(Y){var AR=Y.previous(),AQ;if(!AR){AQ=Y.get(S).get(V);AR=AQ.item(AQ.size()-1);}return AR;};var b=function(Y){var AQ=Y.next();if(!AQ){AQ=Y.get(S).get(V).item(0);}return AQ;};var F=function(Y){var AQ=false;if(Y){AQ=Y.get("nodeName").toLowerCase()===d;}return AQ;};var P=function(Y){return Y.hasClass(K);};var s=function(Y){return Y.hasClass(AI);};var q=function(Y){return Y.hasClass(Z);};var n=function(Y){return Y.hasClass(X);};var p=function(Y){return F(Y)?Y:Y.one(d);};var AA=function(AR,AQ,Y){var AS;if(AR){if(AR.hasClass(AQ)){AS=AR;}if(!AS&&Y){AS=AR.ancestor((I+AQ));}}return AS;};var M=function(Y){return Y.ancestor(i);};var W=function(AQ,Y){return AA(AQ,l,Y);};var AE=function(AQ,Y){var AR;if(AQ){AR=AA(AQ,K,Y);}return AR;};var o=function(AQ,Y){var AR;if(AQ){if(Y){AR=AA(AQ,AI,Y);}else{AR=AA(AQ,AI)||AQ.one((I+AI));}}return AR;};var B=function(AQ,Y){var AR;if(AQ){AR=AE(AQ,Y)||o(AQ,Y);}return AR;};var C=function(Y){return B(Y.one("li"));};var f=function(Y){return P(Y)?A:k;};var e=function(Y,AQ){return Y&&!Y[r]&&(Y.compareTo(AQ)||Y.contains(AQ));};var H=function(AQ,Y){return AQ&&!AQ[E]&&(!AQ.compareTo(Y)&&!AQ.contains(Y));};var AK=function(){AK.superclass.constructor.apply(this,arguments);};AK.NAME="nodeMenuNav";AK.NS="menuNav";AK.SHIM_TEMPLATE_TITLE="Menu Stacking Shim";AK.SHIM_TEMPLATE='';AK.ATTRS={useARIA:{value:true,writeOnce:true,lazyAdd:false,setter:function(AT){var AQ=this.get(c),AU,Y,AS,AR;if(AT){AQ.set(AP,R);AQ.all("ul,li,."+AL(R,y)).set(AP,N);AQ.all((I+AL(G,y))).set(AP,G);AQ.all((I+AI)).each(function(AV){AU=AV;Y=AV.one(AG);if(Y){Y.set(AP,N);AU=Y.previous();}AU.set(AP,G);AU.set("aria-haspopup",true);AS=AV.next();if(AS){AS.set(AP,R);AU=AS.previous();Y=AU.one(AG);if(Y){AU=Y;}AR=D.stamp(AU);if(!AU.get(g)){AU.set(g,AR);}AS.set("aria-labelledby",AR);AS.set(x,true);}});}}},autoSubmenuDisplay:{value:true,writeOnce:true},submenuShowDelay:{value:250,writeOnce:true},submenuHideDelay:{value:250,writeOnce:true},mouseOutHideDelay:{value:750,writeOnce:true}};D.extend(AK,D.Plugin.Base,{_rootMenu:null,_activeItem:null,_activeMenu:null,_hasFocus:false,_blockMouseEvent:false,_currentMouseX:0,_movingToSubmenu:false,_showSubmenuTimer:null,_hideSubmenuTimer:null,_hideAllSubmenusTimer:null,_firstItem:null,initializer:function(AR){var AS=this,AT=this.get(c),AQ=[],Y;if(AT){AS._rootMenu=AT;AT.all("ul:first-child").addClass(U);AT.all(i).addClass(AF);AQ.push(AT.on("mouseover",AS._onMouseOver,AS));AQ.push(AT.on("mouseout",AS._onMouseOut,AS));AQ.push(AT.on("mousemove",AS._onMouseMove,AS));AQ.push(AT.on(w,AS._toggleSubmenuDisplay,AS));AQ.push(D.on("key",AS._toggleSubmenuDisplay,AT,"down:13",AS));AQ.push(AT.on(AB,AS._toggleSubmenuDisplay,AS));AQ.push(AT.on("keypress",AS._onKeyPress,AS));AQ.push(AT.on(AO,AS._onKeyDown,AS));Y=AT.get("ownerDocument");AQ.push(Y.on(w,AS._onDocMouseDown,AS));AQ.push(Y.on("focus",AS._onDocFocus,AS));this._eventHandlers=AQ;AS._initFocusManager();}},destructor:function(){var Y=this._eventHandlers;if(Y){D.Array.each(Y,function(AQ){AQ.detach();});this._eventHandlers=null;}this.get(c).unplug("focusManager");},_isRoot:function(Y){return this._rootMenu.compareTo(Y);},_getTopmostSubmenu:function(AS){var AR=this,Y=M(AS),AQ;if(!Y){AQ=AS;}else{if(AR._isRoot(Y)){AQ=AS;}else{AQ=AR._getTopmostSubmenu(Y);}}return AQ;},_clearActiveItem:function(){var AQ=this,Y=AQ._activeItem;if(Y){Y.removeClass(f(Y));}AQ._activeItem=null;},_setActiveItem:function(AQ){var Y=this;if(AQ){Y._clearActiveItem();AQ.addClass(f(AQ));Y._activeItem=AQ;}},_focusItem:function(AR){var AQ=this,Y,AS;if(AR&&AQ._hasFocus){Y=M(AR);AS=p(AR);if(Y&&!Y.compareTo(AQ._activeMenu)){AQ._activeMenu=Y;AQ._initFocusManager();}AQ._focusManager.focus(AS);}},_showMenu:function(AS){var Y=M(AS),AR=AS.get(S),AQ=AR.getXY();if(this.get(J)){AS.set(x,false);}if(q(Y)){AQ[1]=AQ[1]+AR.get(z);}else{AQ[0]=AQ[0]+AR.get(AC);}AS.setXY(AQ);if(m.ie<8){if(m.ie===6&&!AS.hasIFrameShim){AS.appendChild(D.Node.create(AK.SHIM_TEMPLATE));AS.hasIFrameShim=true;}AS.setStyles({height:Q,width:Q});AS.setStyles({height:(AS.get(z)+AN),width:(AS.get(AC)+AN)});}AS.previous().addClass(X);AS.removeClass(AF);},_hideMenu:function(AS,AQ){var AR=this,AT=AS.previous(),Y;AT.removeClass(X);if(AQ){AR._focusItem(AT);AR._setActiveItem(AT);}Y=AS.one((I+A));if(Y){Y.removeClass(A);}AS.setStyles({left:Q,top:Q});AS.addClass(AF);if(AR.get(J)){AS.set(x,true);}},_hideAllSubmenus:function(AQ){var Y=this;AQ.all(i).each(D.bind(function(AR){Y._hideMenu(AR);},Y));},_cancelShowSubmenuTimer:function(){var AQ=this,Y=AQ._showSubmenuTimer;if(Y){Y.cancel();AQ._showSubmenuTimer=null;}},_cancelHideSubmenuTimer:function(){var Y=this,AQ=Y._hideSubmenuTimer;if(AQ){AQ.cancel();Y._hideSubmenuTimer=null;}},_initFocusManager:function(){var AS=this,AU=AS._rootMenu,AQ=AS._activeMenu||AU,AT=AS._isRoot(AQ)?Q:("#"+AQ.get("id")),Y=AS._focusManager,AR,AV,AW;if(q(AQ)){AV=AT+AM+","+AT+O;AR={next:"down:39",previous:"down:37"};}else{AV=AT+AM;AR={next:"down:40",previous:"down:38"};}if(!Y){AU.plug(D.Plugin.NodeFocusManager,{descendants:AV,keys:AR,circular:true});Y=AU.focusManager;AW="#"+AU.get("id")+" .yui-menu a,"+AG;AU.all(AW).set("tabIndex",-1);Y.on(h,this._onActiveDescendantChange,Y,this);
Y.after(h,this._afterActiveDescendantChange,Y,this);AS._focusManager=Y;}else{Y.set(u,-1);Y.set(AD,AV);Y.set("keys",AR);}},_onActiveDescendantChange:function(AQ,Y){if(AQ.src===j&&Y._activeMenu&&!Y._movingToSubmenu){Y._hideAllSubmenus(Y._activeMenu);}},_afterActiveDescendantChange:function(AQ,Y){var AR;if(AQ.src===j){AR=B(this.get(AD).item(AQ.newVal),true);Y._setActiveItem(AR);}},_onDocFocus:function(AT){var AS=this,Y=AS._activeItem,AR=AT.target,AQ;if(AS._rootMenu.contains(AR)){if(AS._hasFocus){AQ=M(AR);if(!AS._activeMenu.compareTo(AQ)){AS._activeMenu=AQ;AS._initFocusManager();AS._focusManager.set(u,AR);AS._setActiveItem(B(AR,true));}}else{AS._hasFocus=true;Y=B(AR,true);if(Y){AS._setActiveItem(Y);}}}else{AS._clearActiveItem();AS._cancelShowSubmenuTimer();AS._hideAllSubmenus(AS._rootMenu);AS._activeMenu=AS._rootMenu;AS._initFocusManager();AS._focusManager.set(u,0);AS._hasFocus=false;}},_onMenuMouseOver:function(AS,AR){var AQ=this,Y=AQ._hideAllSubmenusTimer;if(Y){Y.cancel();AQ._hideAllSubmenusTimer=null;}AQ._cancelHideSubmenuTimer();if(AS&&!AS.compareTo(AQ._activeMenu)){AQ._activeMenu=AS;if(AQ._hasFocus){AQ._initFocusManager();}}if(AQ._movingToSubmenu&&q(AS)){AQ._movingToSubmenu=false;}},_hideAndFocusLabel:function(){var AR=this,AQ=AR._activeMenu,Y;AR._hideAllSubmenus(AR._rootMenu);if(AQ){Y=AR._getTopmostSubmenu(AQ);AR._focusItem(Y.previous());}},_onMenuMouseOut:function(AW,AU){var AT=this,AR=AT._activeMenu,AV=AU.relatedTarget,Y=AT._activeItem,AS,AQ;if(AR&&!AR.contains(AV)){AS=M(AR);if(AS&&!AS.contains(AV)){if(AT.get(T)>0){AT._cancelShowSubmenuTimer();AT._hideAllSubmenusTimer=t(AT.get(T),AT,AT._hideAndFocusLabel);}}else{if(Y){AQ=M(Y);if(!AT._isRoot(AQ)){AT._focusItem(AQ.previous());}}}}},_onMenuLabelMouseOver:function(AT,AV){var AU=this,AS=AU._activeMenu,Y=AU._isRoot(AS),AR=(AU.get(v)&&Y||!Y),AQ;AU._focusItem(AT);AU._setActiveItem(AT);if(AR&&!AU._movingToSubmenu){AU._cancelHideSubmenuTimer();AU._cancelShowSubmenuTimer();if(!n(AT)){AQ=AT.next();if(AQ){AU._hideAllSubmenus(AS);AU._showSubmenuTimer=t(AU.get("submenuShowDelay"),AU,AU._showMenu,AQ);}}}},_onMenuLabelMouseOut:function(AS,AU){var AT=this,Y=AT._isRoot(AT._activeMenu),AR=(AT.get(v)&&Y||!Y),AV=AU.relatedTarget,AQ=AS.next();AT._clearActiveItem();if(AR){if(AT._movingToSubmenu&&!AT._showSubmenuTimer&&AQ){AT._hideSubmenuTimer=t(AT.get("submenuHideDelay"),AT,AT._hideMenu,AQ);}else{if(!AT._movingToSubmenu&&AQ&&!AQ.contains(AV)&&!AV.compareTo(AQ)){AT._cancelShowSubmenuTimer();AT._hideMenu(AQ);}}}},_onMenuItemMouseOver:function(AS,AU){var AT=this,AR=AT._activeMenu,Y=AT._isRoot(AR),AQ=(AT.get(v)&&Y||!Y);AT._focusItem(AS);AT._setActiveItem(AS);if(AQ&&!AT._movingToSubmenu){AT._hideAllSubmenus(AR);}},_onMenuItemMouseOut:function(Y,AQ){this._clearActiveItem();},_onVerticalMenuKeyDown:function(Y){var AQ=this,AU=AQ._activeMenu,AZ=AQ._rootMenu,AR=Y.target,AT=false,AY=Y.keyCode,AW,AS,AV,AX;switch(AY){case 37:AS=M(AU);if(AS&&q(AS)){AQ._hideMenu(AU);AV=L(AU.get(S));AX=B(AV);if(AX){if(s(AX)){AW=AX.next();if(AW){AQ._showMenu(AW);AQ._focusItem(C(AW));AQ._setActiveItem(C(AW));}else{AQ._focusItem(AX);AQ._setActiveItem(AX);}}else{AQ._focusItem(AX);AQ._setActiveItem(AX);}}}else{if(!AQ._isRoot(AU)){AQ._hideMenu(AU,true);}}AT=true;break;case 39:if(s(AR)){AW=AR.next();if(AW){AQ._showMenu(AW);AQ._focusItem(C(AW));AQ._setActiveItem(C(AW));}}else{if(q(AZ)){AW=AQ._getTopmostSubmenu(AU);AV=b(AW.get(S));AX=B(AV);AQ._hideAllSubmenus(AZ);if(AX){if(s(AX)){AW=AX.next();if(AW){AQ._showMenu(AW);AQ._focusItem(C(AW));AQ._setActiveItem(C(AW));}else{AQ._focusItem(AX);AQ._setActiveItem(AX);}}else{AQ._focusItem(AX);AQ._setActiveItem(AX);}}}}AT=true;break;}if(AT){Y.preventDefault();}},_onHorizontalMenuKeyDown:function(AV){var AU=this,AS=AU._activeMenu,AQ=AV.target,Y=B(AQ,true),AT=false,AW=AV.keyCode,AR;if(AW===40){AU._hideAllSubmenus(AS);if(s(Y)){AR=Y.next();if(AR){AU._showMenu(AR);AU._focusItem(C(AR));AU._setActiveItem(C(AR));}AT=true;}}if(AT){AV.preventDefault();}},_onMouseMove:function(AQ){var Y=this;t(10,Y,function(){Y._currentMouseX=AQ.pageX;});},_onMouseOver:function(AT){var AS=this,AQ,Y,AV,AR,AU;if(AS._blockMouseEvent){AS._blockMouseEvent=false;}else{AQ=AT.target;Y=W(AQ,true);AV=o(AQ,true);AU=AE(AQ,true);if(e(Y,AQ)){AS._onMenuMouseOver(Y,AT);Y[r]=true;Y[E]=false;AR=M(Y);if(AR){AR[E]=true;AR[r]=false;}}if(e(AV,AQ)){AS._onMenuLabelMouseOver(AV,AT);AV[r]=true;AV[E]=false;}if(e(AU,AQ)){AS._onMenuItemMouseOver(AU,AT);AU[r]=true;AU[E]=false;}}},_onMouseOut:function(AQ){var AR=this,AT=AR._activeMenu,AY=false,AS,AU,AW,Y,AV,AX;AR._movingToSubmenu=(AT&&!q(AT)&&((AQ.pageX-5)>AR._currentMouseX));AS=AQ.target;AU=AQ.relatedTarget;AW=W(AS,true);Y=o(AS,true);AX=AE(AS,true);if(H(Y,AU)){AR._onMenuLabelMouseOut(Y,AQ);Y[E]=true;Y[r]=false;}if(H(AX,AU)){AR._onMenuItemMouseOut(AX,AQ);AX[E]=true;AX[r]=false;}if(Y){AV=Y.next();if(AV&&(AU.compareTo(AV)||AV.contains(AU))){AY=true;}}if(H(AW,AU)||AY){AR._onMenuMouseOut(AW,AQ);AW[E]=true;AW[r]=false;}},_toggleSubmenuDisplay:function(AR){var AS=this,AT=AR.target,AQ=o(AT,true),Y=AR.type,AX,AW,AV,AY,AZ,AU;if(AQ){AX=F(AT)?AT:AT.ancestor(F);if(AX){AV=AX.getAttribute("href",2);AY=AV.indexOf("#");AZ=AV.length;if(AY===0&&AZ>1){AU=AV.substr(1,AZ);AW=AQ.next();if(AW&&(AW.get(g)===AU)){if(Y===w||Y===AO){if((m.opera||m.gecko||m.ie)&&Y===AO&&!AS._preventClickHandle){AS._preventClickHandle=AS._rootMenu.on("click",function(Aa){Aa.preventDefault();AS._preventClickHandle.detach();AS._preventClickHandle=null;});}if(Y==w){AR.preventDefault();AR.stopImmediatePropagation();AS._hasFocus=true;}if(AS._isRoot(M(AT))){if(n(AQ)){AS._hideMenu(AW);AS._focusItem(AQ);AS._setActiveItem(AQ);}else{AS._hideAllSubmenus(AS._rootMenu);AS._showMenu(AW);AS._focusItem(C(AW));AS._setActiveItem(C(AW));}}else{if(AS._activeItem==AQ){AS._showMenu(AW);AS._focusItem(C(AW));AS._setActiveItem(C(AW));}else{if(!AQ._clickHandle){AQ._clickHandle=AQ.on("click",function(){AS._hideAllSubmenus(AS._rootMenu);AS._hasFocus=false;AS._clearActiveItem();AQ._clickHandle.detach();AQ._clickHandle=null;});}}}}if(Y===AB){AR.preventDefault();
}}}}}},_onKeyPress:function(Y){switch(Y.keyCode){case 37:case 38:case 39:case 40:Y.preventDefault();break;}},_onKeyDown:function(AU){var AT=this,Y=AT._activeItem,AQ=AU.target,AS=M(AQ),AR;if(AS){AT._activeMenu=AS;if(q(AS)){AT._onHorizontalMenuKeyDown(AU);}else{AT._onVerticalMenuKeyDown(AU);}if(AU.keyCode===27){if(!AT._isRoot(AS)){if(m.opera){t(0,AT,function(){AT._hideMenu(AS,true);});}else{AT._hideMenu(AS,true);}AU.stopPropagation();AT._blockMouseEvent=m.gecko?true:false;}else{if(Y){if(s(Y)&&n(Y)){AR=Y.next();if(AR){AT._hideMenu(AR);}}else{AT._focusManager.blur();AT._clearActiveItem();AT._hasFocus=false;}}}}}},_onDocMouseDown:function(AS){var AR=this,AQ=AR._rootMenu,Y=AS.target;if(!(AQ.compareTo(Y)||AQ.contains(Y))){AR._hideAllSubmenus(AQ);if(m.webkit){AR._hasFocus=false;AR._clearActiveItem();}}}});D.namespace("Plugin");D.Plugin.NodeMenuNav=AK;},"3.0.0",{requires:["node","classnamemanager","node-focusmanager"]});
// ../lazr/build/lazr.js
// actions/actions-min.js
YUI.add('lazr.actions',function(Y){Y.namespace('lazr.actions');var ACTION="action",ACTIONCLASS="Action",ACTIONS="actions",ACTIONS_HELPER="ActionsHelper",ACTIONS_ID="actionsId",ITEM="item",ITEMCLASSNAME="itemClassName",LABEL="label",LAZR_ACTION_DISABLED='lazr-action-disabled',LINK="link",LINKCLASSNAME="linkClassName",PERMISSION="permission",RUNNING="running",TITLE="title";var ActionsHelper=function(config){ActionsHelper.superclass.constructor.apply(this,arguments);};ActionsHelper.NAME=ACTIONS_HELPER;ActionsHelper.ATTRS={actions:{valueFn:function(){return[];}},actionsId:{valueFn:function(){return Y.guid();}},};Y.extend(ActionsHelper,Y.Base,{render:function(node){var doc=Y.config.doc;var actions=this.get(ACTIONS);var actionsId=this.get(ACTIONS_ID);var actionsContainer=Y.one("#"+actionsId);if(actionsContainer){actionsContainer.remove()}else{actionsContainer=new Y.Node.create("");}
if(actions.length){for(var i=0;i");link.on("click",this.actionRunner,this);if(label!==null){link.append(Y.Node.create(label));}
if(linkClassName!==null){link.addClass(linkClassName);}
return link;},_createItem:function(){var itemClassName=this.get(ITEMCLASSNAME);var link=this.get(LINK);var item=Y.Node.create(' ');if(itemClassName!==null){item.addClass(itemClassName);}
item.append(link);return item;},render:function(node){var item=this.get(ITEM);var permission=this.get(PERMISSION);if(permission&&!permission()){item.addClass(LAZR_ACTION_DISABLED);}else{item.removeClass(LAZR_ACTION_DISABLED);}
node.append(item);},actionRunner:function(){if(!this.get(RUNNING)){this.get(ACTION)();}}});Y.lazr.actions.Action=Action;},"0.1.",{"requires":["oop","base","node","lazr.base"]});
// anim/anim-min.js
YUI.add('lazr.anim',function(Y){Y.namespace('lazr.anim');Y.lazr.anim.flash_in=function(cfg){var acfg=Y.merge(Y.lazr.anim.flash_in.defaults,cfg);var anim=new Y.lazr.anim.Anim(acfg);return anim;};Y.lazr.anim.flash_in.defaults={duration:1,easing:Y.Easing.easeIn,from:{backgroundColor:'#FFFF00'},to:{backgroundColor:'#FFFFFF'}};Y.lazr.anim.green_flash=function(cfg){return Y.lazr.anim.flash_in(Y.merge(Y.lazr.anim.green_flash.defaults,cfg));};Y.lazr.anim.green_flash.defaults={from:{backgroundColor:'#90EE90'}};Y.lazr.anim.red_flash=function(cfg){return Y.lazr.anim.flash_in(Y.merge(Y.lazr.anim.red_flash.defaults,cfg));};Y.lazr.anim.red_flash.defaults={from:{backgroundColor:'#FF6666'}};var resolveNodeListFrom=function(protonode){if(typeof protonode==='string'){return Y.all(protonode);}else if(protonode._node!==undefined){return new Y.NodeList([protonode]);}else if(protonode._nodes!==undefined){return protonode;}
throw('Not a selector, Node, or NodeList');};Anim=function(cfg){var nodelist=resolveNodeListFrom(cfg.node);this._anims=[];var self=this;var config=cfg;Y.each(nodelist,function(n){var ncfg=Y.merge(config,{node:n});var anim=new Y.Anim(ncfg);var to=ncfg.to;if(to&&typeof to.backgroundColor==='function'){var bg=to.backgroundColor.call(anim,anim.get('node'));if(bg=='transparent'){Y.error("Can not animate to a 'transparent' background "+"in '"+anim+"'");}}
var original_bg=null;anim.on('start',function(){original_bg=anim.get('node').getStyle('backgroundColor');});anim.on('end',function(){anim.get('node').setStyle('backgroundColor',original_bg);});self._anims.push(anim);});};Anim.prototype={run:function(){Y.each(this._anims,function(n){n.run();});},on:function(){var args=arguments;Y.each(this._anims,function(n){n.on.apply(n,args);});}};Y.lazr.anim.Anim=Anim;Y.lazr.anim.resolveNodeListFrom=resolveNodeListFrom;},"0.1",{"requires":["base","node","anim"]});
// effects/effects-async-min.js
YUI.add('lazr.effects-async',function(Y){Y.namespace('lazr.effects');var effects=Y.lazr.effects;var ui=Y.lazr.ui;var FOLDED='lazr-folded';Y.lazr.effects.async_slideout=function(slider,trigger,uri,container){if(Y.UA.ie){return;}
slider=Y.get(slider);if(typeof slider.content_loaded=='undefined'){slider.content_loaded=false;}
if(typeof container=='undefined'||container===null){container=slider;}
trigger.addClass(FOLDED);trigger.addClass('lazr-trigger');slider.addClass(FOLDED);slider.addClass('lazr-content');trigger.on('click',function(e){e.halt();trigger.toggleClass(FOLDED);container.toggleClass(FOLDED);if(!container.content_loaded){fetch_and_reveal_content(slider,container,uri);container.content_loaded=true;}else{animate_drawer(slider);}});};function animate_drawer(slider){slider.fx.stop();slider.fx.set('reverse',!slider.fx.get("reverse"));slider.fx.run();}
function fetch_and_reveal_content(slider,container,uri){var cfg={on:{complete:function(){ui.clear_waiting(container);},success:function(id,response){container.set('innerHTML',response.responseText);slider.fx.stop();slider.fx=effects.slide_out(slider);slider.fx.run();},failure:function(id,response,args){slider.setStyles({height:'auto',overflow:'visible'});show_nice_error(id,response,args,container,run_io);Y.lazr.anim.red_flash({node:slider}).run();slider.fx.stop();slider.fx=effects.slide_in(slider);slider.fx.set('reverse',!slider.fx.get('reverse'));}}};function run_io(){ui.waiting(container);container.set('innerHTML','');slider.fx=effects.slide_out(slider,{to:{height:'20px'}});slider.fx.run();Y.io(uri,cfg);}
run_io();}
function show_nice_error(id,response,args,message_container,retry_callback){var status_msg=''+
response.status+' '+
response.statusText+' ';var msg_html=['','
Communication with the server failed
','
The server\'s response was: '+status_msg+'
','
Retry ','
'].join('');message_container.set('innerHTML',msg_html);message_container.query('button').on('click',function(e){e.halt();retry_callback();});}},null,{"requires":["node","event","io-base","lazr.base","lazr.effects","lazr.anim"]});
// effects/effects-min.js
YUI.add('lazr.effects',function(Y){Y.namespace('lazr.effects');var OPENED='lazr-opened';var CLOSED='lazr-closed';var slide_effect_defaults={easing:Y.Easing.easeOut,duration:0.4};Y.lazr.effects.slide_out=function(node,user_cfg){var cfg=Y.merge(slide_effect_defaults,user_cfg);if(typeof cfg.node=='undefined'){cfg.node=node;}
var node=Y.get(node);if(node===null){Y.fail("A valid node, HTMLElement, or CSS3 selector must be given "+"for the slide_out animation.");return null;}
var default_to_height=function(node){return node.get('scrollHeight');};cfg.from=cfg.from?cfg.from:{};cfg.from.height=cfg.from.height?cfg.from.height:0;cfg.to=cfg.to?cfg.to:{};cfg.to.height=cfg.to.height?cfg.to.height:default_to_height;node.setStyles({height:cfg.from.height,overflow:'hidden',display:'block'});var anim=new Y.Anim(cfg);anim.drawer_closed=true;add_slide_state_events(anim);node.addClass(CLOSED);return anim;};Y.lazr.effects.slide_in=function(node,user_cfg){var cfg=Y.merge(slide_effect_defaults,user_cfg);if(typeof cfg.node=='undefined'){cfg.node=node;}
var node=Y.get(node);if(node===null){Y.fail("A valid node, HTMLElement, or CSS3 selector must be given "+"for the slide_in animation.");return null;}
var default_from_height=node.get('clientHeight');cfg.from=cfg.from?cfg.from:{};cfg.from.height=cfg.from.height?cfg.from.height:default_from_height;cfg.to=cfg.to?cfg.to:{};cfg.to.height=cfg.to.height?cfg.to.height:0;var anim=new Y.Anim(cfg);anim.drawer_closed=false;add_slide_state_events(anim);node.addClass(OPENED);return anim;};function add_slide_state_events(anim){var node=anim.get('node');anim.on('start',function(){if(!this.drawer_closed){node.setStyle('overflow','hidden');}});anim.on('end',function(){if(this.drawer_closed){this.drawer_closed=false;node.setStyle('overflow','visible').addClass(OPENED).removeClass(CLOSED);}else{this.drawer_closed=true;node.addClass(CLOSED).removeClass(OPENED);}});}},null,{"skinnable":true,"requires":["anim","node"]});
// inlineedit/editor-min.js
YUI.add('lazr.editor',function(Y){var EDITOR='ieditor',BOUNDING_BOX='boundingBox',CONTENT_BOX='contentBox',INPUT_EL='input_field',ERROR_MSG='error_message',HIDDEN='hidden',VALUE='value',INITIAL_VALUE_OVERRIDE='initial_value_override',SIZE='size',IN_ERROR='in_error',RENDERED='rendered',CLICK='click',ACCEPT_EMPTY='accept_empty',MULTILINE='multiline',SCROLLBAR_LEGROOM=30,MULTILINE_MIN_LINES=2,TOP_BUTTONS='top_buttons',BOTTOM_BUTTONS='bottom_buttons',BUTTONS='buttons',B_TOP='top',B_BOTTOM='bottom',B_BOTH='both',LOADING='loading',createNode=Y.Node.create,getCN=Y.ClassNameManager.getClassName,C_INPUT=getCN(EDITOR,'input'),C_SUBMIT=getCN(EDITOR,'submit_button'),C_CANCEL=getCN(EDITOR,'cancel_button'),C_BTNBOX=getCN(EDITOR,'btns'),C_MULTILINE=getCN(EDITOR,'multiline'),C_SINGLELINE=getCN(EDITOR,'singleline'),C_WAITING=getCN(EDITOR,'waiting'),C_ERROR=getCN(EDITOR,'errors'),C_IN_ERROR=getCN(EDITOR,'in-error'),C_ERROR_HIDDEN=getCN(EDITOR,'errors',HIDDEN),SAVE='save',CANCEL='cancel',SHRINK='shrink',RESIZED='resized';var strip_px=/px$/;var InlineEditor=function(){InlineEditor.superclass.constructor.apply(this,arguments);};InlineEditor.NAME=EDITOR;InlineEditor.HTML_PARSER={error_message:'.'+C_ERROR};InlineEditor.SUBMIT_TEMPLATE=Y.lazr.ui.OK_BUTTON;InlineEditor.CANCEL_TEMPLATE=Y.lazr.ui.CANCEL_BUTTON;InlineEditor.INPUT_TEMPLATE="";InlineEditor.ATTRS={accept_empty:{value:false},multiline:{value:false},input_field:{value:null},submit_button:{value:null,setter:function(v){return this._setNode(v);}},cancel_button:{value:null,setter:function(v){return this._setNode(v);}},top_buttons:{value:null,setter:function(v){return this._setNode(v);}},bottom_buttons:{value:null,setter:function(v){return this._setNode(v);}},error_message:{value:null,setter:function(v){return this._setNode(v);}},value:{value:'',validator:function(v){return v!==null;}},initial_value_override:{value:null},in_error:{value:false},size:{value:null,validator:function(v){return this._validateSize(v);}},buttons:{value:B_BOTH,validator:function(v){return(v==B_TOP||v==B_BOTTOM||v==B_BOTH);}}};Y.extend(InlineEditor,Y.Widget,{_setNode:function(v){return v?Y.get(v):null;},validate:function(val){if(!this.get(ACCEPT_EMPTY)&&val===''){this.showError("Empty input is unacceptable!");return false;}
if(this.get(ACCEPT_EMPTY)&&val===''){return true;}
return!!val;},save:function(){var input=Y.Lang.trim(this.getInput());if(this.validate(input)){this.clearErrors();this._saveData(input);}},_saveData:function(data){this.set(VALUE,data);this.fire(SAVE);},cancel:function(){this.fire(CANCEL);},_recordInitialSize:function(){if(this.alter_ego&&!this.initial_scroll_width){var text=this.alter_ego.get(VALUE);this.alter_ego.set(VALUE,'');var width=this.alter_ego.get('scrollWidth');if(width>0){this.initial_scroll_width=width;this.initial_scroll_height=this.alter_ego.get('scrollHeight');}
this.alter_ego.set(VALUE,text);}},_forgetInitialSize:function(){this.initial_scroll_width=undefined;this.initial_scroll_height=undefined;},_windowResize:function(e){if(this.get('visible')){this._forgetInitialSize();this.updateSize(false);}},_onChange:function(e){this.updateSize(true);},_resized:function(){this.fire(RESIZED);},_shrink:function(){var anim=new Y.Anim({node:this.get(INPUT_EL),to:{height:this._target_height},duration:0.1});anim.on('end',Y.bind(this._resized,this));anim.run();},_updateNow:function(){this.updateSize(false);},updateSize:function(animate){this._recordInitialSize();var input=this.get(INPUT_EL);this.alter_ego.set(VALUE,input.get(VALUE));var new_height=this.alter_ego.get('scrollHeight');if(new_height===0){return;}
if(input.get('scrollWidth')>this.initial_scroll_width){new_height+=SCROLLBAR_LEGROOM;input.setStyle('overflow','auto');}else{input.setStyle('overflow',HIDDEN);}
if(this.get(MULTILINE)){var min_height=this.initial_scroll_height*MULTILINE_MIN_LINES;if(new_height').addClass(C_BTNBOX);this._renderOKCancel(button_box);parent.appendChild(button_box);this.set(BOTTOM_BUTTONS,button_box);},_renderTopButtons:function(parent){var button_bar=createNode('
').addClass(C_BTNBOX);var label=button_bar.appendChild(createNode('
'));this._renderOKCancel(label);parent.appendChild(button_bar);this.set(TOP_BUTTONS,button_bar);},_renderBottomButtons:function(parent){var button_bar=createNode('
').addClass(C_BTNBOX);var label=button_bar.appendChild(createNode(' 
'));this._renderOKCancel(label);parent.appendChild(button_bar);this.set(BOTTOM_BUTTONS,button_bar);},_renderOKCancel:function(parent){var ok=createNode(InlineEditor.SUBMIT_TEMPLATE).addClass(C_SUBMIT);var cancel=createNode(InlineEditor.CANCEL_TEMPLATE).addClass(C_CANCEL);parent.appendChild(cancel);parent.appendChild(ok);},renderUI:function(){var bounding_box=this.get(BOUNDING_BOX);var content=this.get(CONTENT_BOX);var multiline=this.get(MULTILINE);var buttons;if(multiline){buttons=this.get(BUTTONS);}
if(multiline){if(buttons==B_TOP||buttons==B_BOTH){this._renderTopButtons(content);}}
this._initInput();if(multiline){if(buttons==B_BOTTOM||buttons==B_BOTH){this._renderBottomButtons(content);}
bounding_box.addClass(C_MULTILINE);}else{this._renderSingleLineButtons(content);bounding_box.addClass(C_SINGLELINE);}
this._initErrorMsg();},_makeInputBox:function(){var box=createNode(InlineEditor.INPUT_TEMPLATE),size=this.get(SIZE);if(size){if(Y.Lang.isNumber(size)){size=size+'ex';}
box.setStyle('width',size);}
box.setStyle('height','1em');box.setStyle('overflow',HIDDEN);box.addClass(C_INPUT);this.get(CONTENT_BOX).appendChild(box);return box;},_initInput:function(){if(!this.get(INPUT_EL)){this.set(INPUT_EL,this._makeInputBox());this.alter_ego=this._makeInputBox();this.alter_ego.setStyles({'visibility':HIDDEN,'position':'absolute','left':'-1000px'});}},_initErrorMsg:function(){var cb=this.get(CONTENT_BOX),msg=this.get(ERROR_MSG);if(!msg){msg=cb.appendChild(createNode('
'));this.set(ERROR_MSG,msg);}else if(!cb.contains(msg)){cb.appendChild(msg);}
msg.addClass(C_ERROR);msg.addClass(C_ERROR_HIDDEN);},bindUI:function(){this.after('in_errorChange',this._afterInErrorChange);this._bindButtons(C_SUBMIT,function(e){e.preventDefault();if(this.get(MULTILINE)){this.get(TOP_BUTTONS).query('.'+C_SUBMIT).setStyle('display','none');this.get(TOP_BUTTONS).query('.'+C_CANCEL).setStyle('display','none');var span=Y.Node.create(' ');span.addClass(LOADING);e.target.get('parentNode').appendChild(span);}
this.save();});this._bindButtons(C_CANCEL,function(e){e.preventDefault();this.cancel();});if(!this.get(MULTILINE)){Y.on('key',this.save,this.get(INPUT_EL),'down:13',this);}
Y.on('key',this.cancel,this.get(INPUT_EL),'down:27',this);this.get(INPUT_EL).on('focus',Y.bind(this._updateNow,this));var change_handler=Y.bind(this._onChange,this);Y.on('keyup',change_handler,this.get(INPUT_EL),Y,this);Y.on('keypress',change_handler,this.get(INPUT_EL),Y,this);Y.on('cut',change_handler,this.get(INPUT_EL),Y,this);Y.on('paste',change_handler,this.get(INPUT_EL),Y,this);this._original_show=this.show;this.show=this._extendedShow;this._original_hide=this.hide;this.hide=this._extendedHide;},_bindButtons:function(button_class,method){var box=this.get(CONTENT_BOX);box.queryAll('.'+button_class).on(CLICK,Y.bind(method,this));},_extendedShow:function(){if(!this._resize_handler){this._resize_handler=Y.on('resize',Y.bind(this._windowResize,this),Y.get(window),Y);}
this._forgetInitialSize();return this._original_show.apply(this,arguments[0]);},_extendedHide:function(){if(this._resize_handler){this._resize_handler.detach();this._resize_handler=null;}
return this._original_hide.apply(this,arguments[0]);},syncUI:function(){var value=this.get(INITIAL_VALUE_OVERRIDE);if(value===null||value===undefined){value=this.get(VALUE);}
if(value!==null&&value!==undefined){this.setInput(value);}},getInput:function(){return this.get(INPUT_EL).get(VALUE);},setInput:function(value){this.get(INPUT_EL).set(VALUE,value);this.updateSize(false);},_afterInErrorChange:function(e){this._uiShowErrorMsg(e.newVal);},_uiShowErrorMsg:function(show){var emsg=this.get(ERROR_MSG),cb=this.get(CONTENT_BOX);if(show){emsg.removeClass(C_ERROR_HIDDEN);cb.addClass(C_IN_ERROR);}else{emsg.addClass(C_ERROR_HIDDEN);cb.removeClass(C_IN_ERROR);}},_uiSetWaiting:function(){this.get(INPUT_EL).set('disabled',true);this.get(BOUNDING_BOX).addClass(C_WAITING);},_uiClearWaiting:function(){this.get(INPUT_EL).set('disabled',false);this.get(BOUNDING_BOX).removeClass(C_WAITING);},_validateSize:function(val){if(Y.Lang.isNumber(val)){return(val>=0);}
return(val===null);}});Y.lazr.ui.disableTabIndex(InlineEditor);Y.InlineEditor=InlineEditor;var ETEXT='editable_text',TEXT='text',TRIGGER='trigger',C_TEXT=getCN(ETEXT,TEXT),C_TRIGGER=getCN(ETEXT,TRIGGER),C_EDIT_MODE=getCN(ETEXT,'edit_mode');var EditableText=function(){EditableText.superclass.constructor.apply(this,arguments);};EditableText.NAME=ETEXT;EditableText.ATTRS={trigger:{setter:function(node){if(this.get(RENDERED)){this._bindTrigger(node);}
return node;}},text:{setter:function(v){return Y.Node.get(v);},validator:function(v){return Y.Node.get(v);}},value:{getter:function(){var text_node=this.get(TEXT);var ptags=text_node.queryAll('p');if(Y.Lang.isValue(ptags)&&ptags.size()){var lines=[];ptags.each(function(ptag){lines=lines.concat([ptag.get('text'),'\n\n']);});return lines.join("");}else{return this.get(TEXT).get('text');}},readOnly:true},accept_empty:{value:false,getter:function(){if(this.editor){return this.editor.get(ACCEPT_EMPTY);}}}};EditableText.HTML_PARSER={trigger:'.'+C_TRIGGER,text:'.'+C_TEXT};Y.extend(EditableText,Y.Widget,{_click_handler:null,editor:null,_editor_bb:null,_triggerEdit:function(e){e.preventDefault();this.show_editor();var cancel=this._editor_bb.query('.yui-ieditor-cancel_button');var anim=new Y.Anim({node:cancel,easing:Y.Easing.easeOut,duration:0.2,from:{left:0},to:{left:-7}});var self=this;anim.on('end',function(e){self.editor.focus();});anim.run();},show_editor:function(){this.get(BOUNDING_BOX).addClass(C_EDIT_MODE);this.editor.set(VALUE,this.get(VALUE));this.editor.syncUI();this.editor.show();this.editor.focus();},hide_editor:function(){var box=this.get(BOUNDING_BOX);box.removeClass(C_EDIT_MODE);this.editor.hide();},_uiAnimateSave:function(){this._uiAnimateFlash(Y.lazr.anim.green_flash);},_uiAnimateCancel:function(){this._uiAnimateFlash(Y.lazr.anim.red_flash);},_uiAnimateFlash:function(flash_fn){var anim=flash_fn({node:this.get(TEXT)});anim.run();},initializer:function(cfg){this.editor=cfg.editor?cfg.editor:this._makeEditor(cfg);this.editor.hide();this.editor.render(this.get(CONTENT_BOX));this.editor.addTarget(this);this.after('accept_emptyChange',this._afterAcceptEmptyChange);this.on('render',this._onRender);},destructor:function(){var cb=this.get(CONTENT_BOX);if(this._click_handler){this._click_handler.detach();}
this.editor.destroy();if(this._editor_bb){cb.removeChild(this._editor_bb);}},_onRender:function(e){if(Y.UA.webkit===1){e.preventDefault();}
if(Y.UA.ie){e.preventDefault();}},_makeEditor:function(cfg){var editor_cfg=Y.merge(cfg,{value:this.get(VALUE)});delete editor_cfg.boundingBox;delete editor_cfg.contentBox;var editor=new InlineEditor(editor_cfg);this._editor_bb=editor.get(BOUNDING_BOX);return editor;},renderUI:function(){this.get(TEXT).addClass(C_TEXT);this.get(TRIGGER).addClass(C_TRIGGER);},bindUI:function(){this.editor.after('ieditor:save',this._afterSave,this);this.after('ieditor:cancel',this._afterCancel);this._bindTrigger(this.get(TRIGGER));if(this.editor.get(MULTILINE)){var trigger=this.get(TRIGGER);var edit_controls=trigger.get('parentNode');if(Y.Lang.isValue(edit_controls)){var edit_text=this.get(TEXT);var control_hover_class='edit-controls-hover';var text_hover_class=C_TEXT+'-hover';edit_controls.on('mouseover',function(e){edit_controls.addClass(control_hover_class);edit_text.addClass(text_hover_class);});edit_controls.on('mouseout',function(e){edit_controls.removeClass(control_hover_class);edit_text.removeClass(text_hover_class);});}}},syncUI:function(){if(this.get(RENDERED)){var text=this.get(TEXT),val=this.editor.get(VALUE);text.set('innerHTML','');if(this.editor.get(MULTILINE)){text.set('innerHTML',val);}else{text.appendChild(document.createTextNode(val));}}
this.fire('rendered');},_bindTrigger:function(node){if(this._click_handler){this._click_handler.detach();}
this._click_handler=node.on('click',this._triggerEdit,this);},_afterSave:function(e){if(this.editor.get(MULTILINE)){var spinner=this.editor.get(TOP_BUTTONS).query('.'+LOADING);var parent=spinner.get('parentNode');parent.removeChild(spinner);this.editor.get(TOP_BUTTONS).query('.'+C_SUBMIT).setStyle('display','inline');this.editor.get(TOP_BUTTONS).query('.'+C_CANCEL).setStyle('display','inline');}
this.syncUI();this.hide_editor();this._uiAnimateSave();this.editor.set(INITIAL_VALUE_OVERRIDE,null);},_afterCancel:function(e){this.hide_editor();this._uiAnimateCancel();},_afterAcceptEmptyChange:function(e){this.editor.set(ACCEPT_EMPTY,e.newVal);},renderer:function(){if(this.editor.get(MULTILINE)&&(Y.UA.ie||Y.UA.opera)){return;}
this.renderUI();this.bindUI();this.syncUI();}});Y.lazr.ui.disableTabIndex(EditableText);Y.EditableText=EditableText;},"0.2",{"skinnable":true,"requires":["oop","anim","event","node","widget","lazr.anim","lazr.base"]});
// picker/picker-min.js
YUI.add('lazr.picker',function(Y){var PICKER='picker',BOUNDING_BOX='boundingBox',CONTENT_BOX='contentBox',getCN=Y.ClassNameManager.getClassName,C_SEARCH=getCN(PICKER,'search'),C_SEARCH_BOX=getCN(PICKER,'search-box'),C_SEARCH_SLOT=getCN(PICKER,'search-slot'),C_FOOTER_SLOT=getCN(PICKER,'footer-slot'),C_SEARCH_MODE=getCN(PICKER,'search-mode'),C_RESULTS=getCN(PICKER,'results'),C_RESULT_TITLE=getCN(PICKER,'result-title'),C_RESULT_DESCRIPTION=getCN(PICKER,'result-description'),C_ERROR=getCN(PICKER,'error'),C_ERROR_MODE=getCN(PICKER,'error-mode'),C_NO_RESULTS=getCN(PICKER,'no-results'),C_BATCHES=getCN(PICKER,'batches'),C_SELECTED_BATCH=getCN(PICKER,'selected-batch'),SAVE='save',SEARCH='search',MIN_SEARCH_CHARS='min_search_chars',CURRENT_SEARCH_STRING='current_search_string',ERROR='error',RESULTS='results',BATCHES='batches',BATCH_COUNT='batch_count',SEARCH_SLOT='search_slot',FOOTER_SLOT='footer_slot',SELECTED_BATCH='selected_batch',SEARCH_MODE='search_mode',NO_RESULTS_SEARCH_MESSAGE='no_results_search_message',RENDERUI="renderUI",BINDUI="bindUI",SYNCUI="syncUI";var Picker=function(){Picker.superclass.constructor.apply(this,arguments);Y.after(this._renderUIPicker,this,RENDERUI);Y.after(this._bindUIPicker,this,BINDUI);Y.after(this._syncUIPicker,this,BINDUI);};Y.extend(Picker,Y.lazr.PrettyOverlay,{_search_input:null,_search_button:null,_results_box:null,_search_slot_box:null,_batches_box:null,_prev_button:null,_next_button:null,_error_box:null,initializer:function(cfg){this.publish(SEARCH,{defaultFn:this._defaultSearch});this.publish(SAVE,{defaultFn:this._defaultSave});this.subscribe('cancel',this._defaultCancel);if(this.get('picker_activator')){var element=Y.one(this.get('picker_activator'));element.on('click',function(e){e.halt();this.show();},this);element.addClass(this.get('picker_activator_css_class'));}},_syncSearchSlotUI:function(){var search_slot=this.get(SEARCH_SLOT);this._search_slot_box.set('innerHTML','');if(search_slot!==null){this._search_slot_box.appendChild(search_slot);}},_syncFooterSlotUI:function(){var footer_slot=this.get(FOOTER_SLOT);this._footer_slot_box.set('innerHTML','');if(footer_slot!==null){this._footer_slot_box.appendChild(footer_slot);}},_getBatches:function(){var batches=this.get(BATCHES);if(batches===null){var batch_count=this.get(BATCH_COUNT);if(batch_count===null){batches=[];}
else{batches=[];if(batch_count>1){for(var i=0;i');batch_item.appendChild(document.createTextNode(data.name));this._batches_box.appendChild(batch_item);batch_item.on('click',function(e){this.set(SELECTED_BATCH,i);this.fire(SEARCH,this.get(CURRENT_SEARCH_STRING),data.value);},this);},this);this._next_button=Y.Node.create(Y.lazr.ui.NEXT_BUTTON);this._batches_box.appendChild(this._next_button);this._next_button.on('click',function(e){var selected=this.get(SELECTED_BATCH)+1;this.set(SELECTED_BATCH,selected);this.fire(SEARCH,this.get(CURRENT_SEARCH_STRING),batches[selected].value);},this);},_syncSelectedBatchUI:function(){var idx=this.get(SELECTED_BATCH);var items=this._batches_box.queryAll('span');if(items.size()){this._prev_button.set('disabled',idx===0);items.removeClass(C_SELECTED_BATCH);items.item(idx).addClass(C_SELECTED_BATCH);this._next_button.set('disabled',idx+1===items.size());}},_syncResultsUI:function(){var results=this.get(RESULTS);Y.Event.purgeElement(this._results_box,true);this._results_box.set('innerHTML','');Y.Array.each(results,function(data,i){var li_title=Y.Node.create(' ').addClass(C_RESULT_TITLE);li_title.appendChild(document.createTextNode(data.title));var li_desc=Y.Node.create('
').addClass(C_RESULT_DESCRIPTION);if(data.description){li_desc.replaceChild(document.createTextNode(data.description),li_desc.query('br'));}
var li=Y.Node.create(' ').addClass(i%2?Y.lazr.ui.CSS_ODD:Y.lazr.ui.CSS_EVEN);if(data.css){li.addClass(data.css);}
if(data.image){li.appendChild(Y.Node.create(' ').set('src',data.image));}
li.appendChild(li_title);li.appendChild(li_desc);li.on('click',function(e,value){this.fire(SAVE,value);},this,data);this._results_box.appendChild(li);},this);if(this._search_input.get('value')&&!results.length){var msg=Y.Node.create(' ');msg.appendChild(document.createTextNode(Y.substitute(this.get(NO_RESULTS_SEARCH_MESSAGE),{query:this._search_input.get('value')})));this._results_box.appendChild(msg);this._results_box.addClass(C_NO_RESULTS);}else{this._results_box.removeClass(C_NO_RESULTS);}
if(results.length){this.set('progress',100);}else{this.set('progress',50);}},_syncSearchModeUI:function(){var search_mode=this.get(SEARCH_MODE);this._search_input.set('disabled',search_mode);this._search_button.set('disabled',search_mode);if(search_mode){this.get(BOUNDING_BOX).addClass(C_SEARCH_MODE);}else{this.get(BOUNDING_BOX).removeClass(C_SEARCH_MODE);this._search_input.blur();this._search_input.focus();}},_syncErrorUI:function(){var error=this.get(ERROR);this._error_box.set('innerHTML','');if(error===null){this.get(BOUNDING_BOX).removeClass(C_ERROR_MODE);}else{this._error_box.appendChild(document.createTextNode(error));this.get(BOUNDING_BOX).addClass(C_ERROR_MODE);}},_renderUIPicker:function(){this._search_button=Y.Node.create(Y.lazr.ui.SEARCH_BUTTON);var search_box=Y.Node.create([''].join(""));this._search_input=search_box.query('input');this._search_input.addClass(C_SEARCH);this._error_box=search_box.query('div');this._error_box.addClass(C_ERROR);search_box.insertBefore(this._search_button,this._search_input);search_box.addClass(C_SEARCH_BOX);this._search_slot_box=Y.Node.create('
');this._results_box.addClass(C_RESULTS);this._batches_box=Y.Node.create('
');body.appendChild(search_box);body.appendChild(this._batches_box);body.appendChild(this._results_box);body.appendChild(this._footer_slot_box);body.addClass('yui-widget-bd');this.setStdModContent(Y.WidgetStdMod.BODY,body,Y.WidgetStdMod.APPEND);},_bindUIPicker:function(){Y.on('click',this._defaultSearchUserAction,this._search_button,this);Y.on('key',this._defaultSearchUserAction,this._search_input,'down:13',this);this.after('visibleChange',function(e){var change=e.details[0];if(change.newVal===true&&change.prevVal===false){this.set('centered',true);this._search_input.focus();}},this);this.after('resultsChange',function(e){this._syncResultsUI();this.set(SEARCH_MODE,false);},this);this.after('search_slotChange',function(e){this._syncSearchSlotUI();},this);this.after('footer_slotChange',function(e){this._syncFooterSlotUI();},this);var doBatchesChange=function(e){this._syncBatchesUI();this._syncSelectedBatchUI();};this.after('batchesChange',doBatchesChange,this);this.after('resultsChange',doBatchesChange,this);this.after('selected_batchChange',function(e){this._syncSelectedBatchUI();},this);this.after('search_modeChange',function(e){this._syncSearchModeUI();},this);this.after('errorChange',function(e){this._syncErrorUI();});},_syncUIPicker:function(){this._syncResultsUI();this._syncSearchModeUI();this._syncBatchesUI();this._syncSelectedBatchUI();this._syncErrorUI();this._search_input.focus();},_clear:function(){this.set(CURRENT_SEARCH_STRING,'');this.set(ERROR,'');this.set(RESULTS,[{}]);this.set(BATCHES,null);this.set(BATCH_COUNT,null);this._search_input.set('value','');this._results_box.set('innerHTML','');},_defaultSearchUserAction:function(e){e.preventDefault();var search_string=Y.Lang.trim(this._search_input.get('value'));if(search_string.length=0&&value';FormOverlay.FORM_TEMPLATE='';FormOverlay.SUBMIT_TEMPLATE=' ';FormOverlay.CANCEL_TEMPLATE='Cancel ';FormOverlay.ERROR_TEMPLATE='
';FormOverlay.ATTRS={form_header:{value:''},form_content:{value:''},form_submit_button:{value:null},form_cancel_button:{value:null},form_submit_callback:{value:null}};Y.extend(FormOverlay,Y.lazr.PrettyOverlay,{_renderUIFormOverlay:function(){this.form_header_node=Y.Node.create(FormOverlay.FORM_HEADER_TEMPLATE);this.form_node=Y.Node.create(FormOverlay.FORM_TEMPLATE);if(this.get("form_submit_button")===null){this.set("form_submit_button",Y.Node.create(FormOverlay.SUBMIT_TEMPLATE));}
if(this.get("form_cancel_button")===null){this.set("form_cancel_button",Y.Node.create(FormOverlay.CANCEL_TEMPLATE));}
this.error_node=Y.Node.create(FormOverlay.ERROR_TEMPLATE);this._setFormContent();},_bindUIFormOverlay:function(){Y.on("submit",Y.bind(this._onFormSubmit,this),this.form_node);Y.on("click",Y.bind(function(e){this.hide();},this),this.get("form_cancel_button"));this.on("visibleChange",function(e){if(e.newVal){if(this.get('centered')){this.centered();}
var form_elem=Y.Node.getDOMNode(this.form_node);if(form_elem.elements.length>0){Y.get(form_elem.elements[0]).focus();}}});},_setFormContent:function(){this.form_header_node.set('innerHTML',this.get('form_header'));var form_content=this.get('form_content');if(form_content instanceof Y.Node){this.form_node.appendChild(form_content);}else{this.form_node.set("innerHTML",form_content);}
this.form_node.appendChild(this.error_node);var wrapper_div=Y.Node.create('
');wrapper_div.addClass(FormOverlay.C_ACTIONS);wrapper_div.appendChild(this.get("form_submit_button"));wrapper_div.appendChild(this.get("form_cancel_button"));this.form_node.appendChild(wrapper_div);var body_node=Y.Node.create('
');body_node.appendChild(this.form_header_node);body_node.appendChild(this.form_node);this.setStdModContent(Y.WidgetStdMod.BODY,body_node,Y.WidgetStdMod.REPLACE);},_onFormSubmit:function(e){this.clearError();var submit_callback=this.get("form_submit_callback");if(submit_callback){e.halt(true);var data=this.getFormData();submit_callback(data);}},getFormData:function(){var data={};var addData=function(key,value){if(data[key]===undefined){data[key]=[value];}else{data[key].push(value);}};var getOptionValue=function(option){if(option.attributes.value&&option.attributes.value.specified){return option.value;}else{return option.text;}};var select_idx;var num_options;var option;var option_value;var form_elem=Y.Node.getDOMNode(this.form_node);var elem_idx;var num_elems;for(elem_idx=0,num_elems=form_elem.elements.length;elem_idx-1){option=elem.options[elem.selectedIndex];addData(elem.name,getOptionValue(option));}
break;case'select-multiple':if(elem.selectedIndex>-1){for(select_idx=elem.selectedIndex,num_options=elem.options.length;select_idx"+error_msg.replace(/<([^>]+)>/g,'')+"";});error_html+="";this.error_node.set('innerHTML',error_html);},clearError:function(){this.error_node.set('innerHTML','');},loadFormContentAndRender:function(url,io_provider){if(io_provider===undefined){io_provider=Y;}
function on_success(id,response,overlay){overlay.set('form_content',response.responseText);overlay.renderUI();overlay.bindUI();}
function on_failure(id,response,overlay){overlay.set('form_content',"Sorry, an error occurred while loading the form.");overlay.renderUI();}
var cfg={on:{success:on_success,failure:on_failure},arguments:this}
io_provider.io(url,cfg);}});Y.lazr.FormOverlay=FormOverlay;},"0.1",{"skinnable":true,"requires":["lazr.overlay"]});
// autocomplete/autocomplete-min.js
YUI.add('lazr.autocomplete',function(Y){Y.namespace('lazr');var AUTOCOMP='autocomplete',BOUNDING_BOX='boundingBox',CONTENT_BOX='contentBox',INPUT='input',VALUE='value',QUERY='query',DATA='data',MATCHES='matches',RENDERED='rendered',DELIMITER='delimiter',TAB=9,RETURN=13,ESCAPE=27,ARROW_DOWN=40,getCN=Y.ClassNameManager.getClassName,C_LIST=getCN(AUTOCOMP,'list');var AutoCompleteBase=Y.Base.build("AutoCompleteBase",Y.Widget,[Y.WidgetStack]);function AutoComplete(){AutoComplete.superclass.constructor.apply(this,arguments);}
AutoComplete.NAME='autocomplete';AutoComplete.LIST_TEMPLATE='';AutoComplete.ITEM_TEMPLATE='';AutoComplete.ITEM_CONTENT_TEMPLATE='';AutoComplete.ATTRS={data:{valueFn:function(){return{};}},delimiter:{value:' '},matches:{valueFn:function(){return[];}},input:{value:null,setter:function(val){return this._setInput(val);}},query:{value:null}};Y.extend(AutoComplete,AutoCompleteBase,{_completions:null,_last_input_was_completed:false,initializer:function(){this.hide();if(Y.UA.opera||Y.UA.ie){this.disable();this.render=function(){};}},destructor:function(){var input=this.get('INPUT');if(input&&this.get(RENDERED)){input.detach('keydown',this._onInputKeydown);input.detach('keyup',this._onInputKeyup);}},renderUI:function(){var input=this.get(INPUT);var bounding_box=this.get(BOUNDING_BOX);bounding_box.addClass("yui-menu");Y.get('body').appendChild(bounding_box);this.get(CONTENT_BOX).setStyle('minWidth',input.get('offsetWidth')+"px").addClass('yui-menu-content');var iregion=input.get('region');bounding_box.setStyles({'left':iregion.left+'px','top':iregion.bottom+'px'});},_renderCompletions:function(query){var matches=this.get(MATCHES);if(!this.get(RENDERED)||!matches){return;}
var list=Y.Node.create(AutoComplete.LIST_TEMPLATE);list.addClass(C_LIST);var result;var item;var match;for(var idx=0;idxinput.length)){caret_pos=input.length;}
var delimiter=this.get(DELIMITER);var start=input.lastIndexOf(delimiter,caret_pos-1);var end=input.indexOf(delimiter,caret_pos-1);if((start==end)&&(start!=-1)){return null;}
if(start==-1){start=0;}else{start++;}
if(end==-1){end=input.length;}
while((input[start]==' '||input[start]=='\t')&&(start<=end))
{start++;}
if(start==end){return null;}
var query={text:input.substring(start,end),offset:start};return query;},findMatches:function(query){var matches=this.filterResults(this.get(DATA),query);this.set(MATCHES,matches);return matches;},filterResults:function(data,query){var midx;var match_key;var match_string;var start_indicies=[];var lowercase_query=query.toLowerCase();if(data){Y.Array.each(data,function(match_key){match_string=match_key.toString();midx=match_string.toLowerCase().indexOf(lowercase_query);if(midx>-1){if(!start_indicies[midx]){start_indicies[midx]=[];}
start_indicies[midx].push(match_string);}});}
var matches=[];var match_set;for(var index=0;index'+match+'';return before+match+after;},completeInput:function(){var active_item=this.getActiveItem();if(active_item){var item_index=this._indexForItem(active_item);if(item_index!==null){this.completeInputUsingItem(item_index);}}else{this.completeInputUsingItem(0);}
this.get(INPUT).focus();this._last_input_was_completed=true;},completeInputUsingItem:function(match_num){var matches=this.get(MATCHES);if(matches.length===0){return;}
if(match_num>=matches.length){Y.fail("Failed to complete item number "+match_num+" because there are only "+matches.length+" matches "+"available.");return;}
var completion_txt=matches[match_num].text;var query=this.get(QUERY);var delimiter=this.get(DELIMITER);var input=this.get(INPUT);var input_txt=input.get('value');var query_end=query.offset+query.text.length;var input_head=input_txt.substring(0,query.offset);var input_tail=input_txt.substring(query_end,input_txt.length);var tail_delimiter=delimiter;if(input_tail.charAt(input_tail.length-1)==delimiter){tail_delimiter='';}
var new_input=[input_head,completion_txt,input_tail,tail_delimiter].join('');input.set(VALUE,new_input);this.hide();},getActiveItem:function(){var menu=this.get(BOUNDING_BOX).menuNav;if(menu){return menu._activeItem?menu._activeItem:null;}
return null;},_selectItem:function(index,set_focus){var menu=this.get(BOUNDING_BOX).menuNav;var firstItem=menu._rootMenu.all('.yui-menuitem').item(0)
var item=menu?firstItem:null;if(!menu||!item){return null;}
for(var idx=0;idx','','
'].join(""));this._blocking_div=Y.Node.create('
');this.after("renderedChange",function(){var bounding_box=this.get(BOUNDING_BOX);var content_box=this.get(CONTENT_BOX);var content_box_container=bounding_box.query(".content_box_container");if(content_box_container){content_box_container.appendChild(content_box);}
this._setupCloseFacilities();});this.after('visibleChange',function(e){this._setupCloseFacilities();});this.publish(CANCEL,{defaultFn:this._defaultCancel});},_afterSteptitleChange:function(e){var progress_bar=this.get(BOUNDING_BOX).query(".steps");if(!progress_bar){return;}
var h2=progress_bar.query("h2");if(!h2){h2=Y.Node.create(" ");progress_bar.appendChild(h2);progress_bar.addClass("contains-steptitle");}
while(h2.hasChildNodes()){h2.removeChild(h2.get("firstChild"));}
h2.appendChild(document.createTextNode(this.get("steptitle")));},_afterProgressChange:function(e){var width=parseInt(this.get("progress"),10);if(width<0){width=0;}
if(width>100){width=100;}
if(this.get("progressbar")&&this.get(CONTENT_BOX).query(".steps")){var progress_steps=this.get(CONTENT_BOX).query(".step-on");progress_steps.setStyle("width",width+"%");}},_setupCloseFacilities:function(){var self=this;var visible=this.get('visible');if(visible){Y.get('body').appendChild(this._blocking_div);this._doc_kp_handler=Y.on('key',function(){self.fire(CANCEL);},document,'down:27');}else{this._removeBlockingDiv();}},_removeBlockingDiv:function(){if(this._blocking_div){var blocking_div=Y.get(this._blocking_div);if(blocking_div){var parent=blocking_div.get('parentNode');if(parent){parent.removeChild(this._blocking_div);}}}},destructor:function(){this._removeBlockingDiv();},_bindUIPrettyOverlay:function(){var self=this;var close_button=this.get(BOUNDING_BOX).query('.close a');close_button.on('click',function(e){e.halt();self.fire(CANCEL);});this._blocking_div.on('click',function(e){e.halt();self.fire(CANCEL);});var bounding_box=this.get(BOUNDING_BOX);bounding_box.on('click',function(e){bounding_box.blur();});this.after('steptitleChange',this._afterSteptitleChange);this.after('progressChange',this._afterProgressChange);},_defaultCancel:function(e){this.hide();this._doc_kp_handler.detach();},_insertStdModSection:function(content_box,section,section_node){PrettyOverlay.superclass._insertStdModSection.apply(this,arguments);if(section===Y.WidgetStdMod.HEADER&&this.get("progressbar"))
{var nxt=section_node.next();if(nxt){content_box.insertBefore(this._green_bar,nxt);}else{content_box.appendChild(this._green_bar);}}
this._afterProgressChange();if(this.get('steptitle')){this._afterSteptitleChange();}}});PrettyOverlay.prototype.BOUNDING_TEMPLATE=['','','','',' ','',' ','',' ',' ','','',' ','','',' ','',' ',' ','','',' ','',' ','',' ',' ',' ','
'].join('');Y.namespace('lazr');Y.lazr.PrettyOverlay=PrettyOverlay;},"0.1",{"skinnable":true,"requires":["oop","overlay","event","widget","widget-stack","widget-position","widget-position-ext"]});
// lazr/lazr-min.js
YUI.add('lazr.base',function(Y){var UI=Y.namespace('lazr.ui');var LAZR='lazr';var getCN=Y.ClassNameManager.getClassName;UI.OK_BUTTON='Ok ';UI.CANCEL_BUTTON='Cancel ';UI.SEARCH_BUTTON='Search ';UI.PREVIOUS_BUTTON='Previous ';UI.NEXT_BUTTON='Next ';UI.CSS_EVEN=getCN(LAZR,'even');UI.CSS_ODD=getCN(LAZR,'odd');UI.disableTabIndex=function(widget_class){if(widget_class===undefined){throw"disableTabIndex() must be called after ATTRS "+"is set on the widget.";}
widget_class.ATTRS.tabIndex={readOnly:true,value:-1};};UI.CSS_WAITING='lazr-waiting';UI.waiting=function(node){node.addClass(UI.CSS_WAITING);};UI.clear_waiting=function(node){node.removeClass(UI.CSS_WAITING);};},"0.1",{"skinnable":true,"requires":["classnamemanager"]});
// error/error-min.js
YUI.add('lazr.error',function(Y){Y.namespace('lazr.error');var BasicErrorWidget=function(){BasicErrorWidget.superclass.constructor.apply(this,arguments);};BasicErrorWidget.NAME='lazr-basic-error-widget';BasicErrorWidget.ERROR_LIST_TEMPLATE='';Y.extend(BasicErrorWidget,Y.lazr.PrettyOverlay,{initializer:function(){this.error_list=[];this.content=null;this.publish('cancel',{defaultFn:function(){this.error_list=[];this._defaultCancel();}});},renderUI:function(){this.content=Y.Node.create('The following errors were encountered:
');var error_list_node=Y.Node.create(BasicErrorWidget.ERROR_LIST_TEMPLATE);this.content.appendChild(error_list_node);var dismiss_button=Y.Node.create('Dismiss ');this.content.appendChild(dismiss_button);this.setStdModContent(Y.WidgetStdMod.BODY,this.content,Y.WidgetStdMod.REPLACE);},bindUI:function(){var self=this;var dismiss_button=this.content.one('button.dismiss');dismiss_button.on('click',function(e){e.halt();self.fire('cancel');});},syncUI:function(){var new_error_list_node=Y.Node.create(BasicErrorWidget.ERROR_LIST_TEMPLATE);Y.each(this.error_list,function(error_msg){var error_list_item=Y.Node.create(" ");error_list_item.appendChild(document.createTextNode(error_msg));new_error_list_node.appendChild(error_list_item);});var old_error_list_node=this.content.one('ul.errors');this.content.replaceChild(new_error_list_node,old_error_list_node);},showError:function(error_msg){this.error_list.push(error_msg);this.syncUI();this.show();}});var get_error_widget=function(){if(Y.lazr.error.widget===undefined){Y.lazr.error.widget=new BasicErrorWidget({headerContent:'Error ',centered:true,visible:false});Y.lazr.error.widget.render();}};var maybe_red_flash=function(flash_node,callback)
{if(flash_node){var anim=Y.lazr.anim.red_flash({node:flash_node});anim.on('end',callback);anim.run();}else{callback();}};var display_error=function(msg,flash_node){get_error_widget();maybe_red_flash(flash_node,function(){Y.lazr.error.widget.showError(msg);});};Y.lazr.error.display_error=display_error;Y.namespace('lazr.error_widgets');Y.lazr.error_widgets.BasicErrorWidget=BasicErrorWidget;},"0.1",{"skinnable":true,"requires":["lazr.overlay"]});
// error/error-widget-minimal-min.js
YUI.add('lazr.error-widgets',function(Y){Y.namespace('lazr.error_widgets');var CLICK='click',CONTENT_BOX='contentBox',CURRENT='current',CURRENT_ERROR_INDEX='current_error_index',DISMISS_ALL='dismiss_all',NEXT='next',PREV='prev';var MinimalErrorWidget=function(){MinimalErrorWidget.superclass.constructor.apply(this,arguments);};MinimalErrorWidget.NAME='lazr-minimal-error-widget';MinimalErrorWidget.ERROR_LIST_TEMPLATE='';MinimalErrorWidget.ATTRS={current_error_index:{value:0}};Y.extend(MinimalErrorWidget,Y.Widget,{initializer:function(){this.error_list=[];this.publish(DISMISS_ALL,{defaultFn:function(){this.error_list=[];this.set(CURRENT_ERROR_INDEX,0);this.hide();}});this.publish(NEXT,{defaultFn:function(){this._shift_current_error(1);}});this.publish(PREV,{defaultFn:function(){this._shift_current_error(-1);}});},_update_navigation:function(){var content_box=this.get(CONTENT_BOX);content_box.one('span.error-num').set('innerHTML',this.get(CURRENT_ERROR_INDEX)+1);content_box.one('span.error-count').set('innerHTML',this.error_list.length);},_shift_current_error:function(amount){var new_index=this._wrap_index(this.get(CURRENT_ERROR_INDEX)+amount);this.set(CURRENT_ERROR_INDEX,new_index);},_wrap_index:function(new_index){if(new_index>=this.error_list.length){return 0;}
if(new_index<0){return this.error_list.length-1;}
return new_index;},_update_displayed_error:function(){var content_box=this.get(CONTENT_BOX);var error_nodes=content_box.one('div.error-info ul.errors').get('children');error_nodes.removeClass(CURRENT);var error_index=0;var this_widget=this;var current_error_index=this_widget.get(CURRENT_ERROR_INDEX);error_nodes.each(function(error_node){if(error_index==current_error_index){error_node.addClass(CURRENT);}
error_index+=1;});},bindUI:function(){this.after(CURRENT_ERROR_INDEX+'Change',function(){this._update_displayed_error();this._update_navigation();});var self=this;var contentBox=this.get(CONTENT_BOX);contentBox.one('button.dismiss_all').on(CLICK,function(e){e.halt();self.fire(DISMISS_ALL);});contentBox.one('div.error-controls a.next').on(CLICK,function(e){e.halt();self.fire(NEXT);});contentBox.one('div.error-controls a.prev').on(CLICK,function(e){e.halt();self.fire(PREV);});},syncUI:function(){var new_error_list_node=Y.Node.create(MinimalErrorWidget.ERROR_LIST_TEMPLATE);var error_index=0;var this_widget=this;Y.each(this.error_list,function(error_msg){var error_list_item=Y.Node.create(" ");error_list_item.appendChild(document.createTextNode(error_msg));if(error_index==this_widget.get(CURRENT_ERROR_INDEX)){error_list_item.addClass(CURRENT);}
new_error_list_node.appendChild(error_list_item);error_index+=1;});var content_box=this.get(CONTENT_BOX);var error_info=content_box.one('div.error-info');var old_error_list_node=error_info.one('ul.errors');error_info.replaceChild(new_error_list_node,old_error_list_node);this._update_navigation();},showError:function(error_msg){this.error_list.push(error_msg);this.syncUI();this.show();}});MinimalErrorWidget.prototype.CONTENT_TEMPLATE=['','
',' Viewing
1 of ','
1 ','
Prev ','
Next ','
Dismiss ','
','
',' '+MinimalErrorWidget.ERROR_LIST_TEMPLATE,'
','
'].join('');Y.lazr.error_widgets.MinimalErrorWidget=MinimalErrorWidget;},"0.1",{"skinnable":true,"requires":["oop","event","widget","lazr.error"]});
// choiceedit/choiceedit-min.js
YUI.add('lazr.choiceedit',function(Y){var CHOICESOURCE='ichoicesource',CHOICELIST='ichoicelist',NULLCHOICESOURCE='inullchoicesource',C_EDITICON='editicon',C_VALUELOCATION='value',C_NULLTEXTLOCATION='nulltext',C_ADDICON='addicon',SAVE='save',LEFT_MOUSE_BUTTON=1,RENDERUI="renderUI",BINDUI="bindUI",SYNCUI="syncUI",NOTHING=new Object();var ChoiceSource=function(){ChoiceSource.superclass.constructor.apply(this,arguments);Y.after(this._bindUIChoiceSource,this,BINDUI);Y.after(this._syncUIChoiceSource,this,SYNCUI);};ChoiceSource.NAME=CHOICESOURCE;ChoiceSource.HTML_PARSER={value_location:'.'+C_VALUELOCATION,editicon:'.'+C_EDITICON};ChoiceSource.ATTRS={items:{value:[]},value:{value:null},title:{value:""},value_location:{value:null,setter:function(v){return Y.get(v);}},editicon:{value:null,setter:function(v){return Y.get(v);}},actionicon:{getter:function(){return this.get('editicon');}},elementToFlash:{value:null,setter:function(v){return Y.get(v);}},backgroundColor:{value:null},clickable_content:{value:true}};Y.extend(ChoiceSource,Y.Widget,{initializer:function(cfg){this.publish(SAVE);var editicon=this.get('editicon');editicon.original_src=editicon.get("src")},_bindUIChoiceSource:function(){var that=this;if(this.get('clickable_content')){var clickable_element=this.get('contentBox');}else{var clickable_element=this.get('editicon');}
clickable_element.on("click",this.onClick,this);this.after("valueChange",function(e){this.syncUI();this._showSucceeded();});},_syncUIChoiceSource:function(){var items=this.get("items");var value=this.get("value");var node=this.get("value_location");for(var i=0;i"+this.get("title")+"");this.set("display_items_list",Y.Node.create(""));var display_items_list=this.get("display_items_list");var items=this.get("items");var value=this.get("value");var li;for(var i=0;i'+
items[i].name+' ');}else if(items[i].value==value){li=Y.Node.create(''+
items[i].name+' ');}else{li=Y.Node.create(''+items[i].name+' ');li.query('a')._value=items[i].value;}
if(items[i].css_class!==undefined){li.addClass(items[i].css_class);}else{li.addClass('unstyled');}
display_items_list.appendChild(li);}
this.setStdModContent(Y.WidgetStdMod.BODY,display_items_list,Y.WidgetStdMod.REPLACE);this.move(-10000,0);},_bindUIChoiceList:function(){var display_items_list=this.get("display_items_list");var that=this;Y.delegate("click",function(e){var target=e.currentTarget;var value=target._value;var items=that.get("items");for(var i=0;i ','',v[i].name,' '].join('');}}
return v;},clone:"deep"}}
Y.extend(NullChoiceSource,ChoiceSource,{initializer:function(cfg){var addicon=this.get('addicon');addicon.original_src=addicon.get("src")
var old_uiClearWaiting=this._uiClearWaiting;this._uiClearWaiting=function(){old_uiClearWaiting.call(this);if(Y.Lang.isValue(this.get('value'))){this.get('null_text_location').setStyle('display','none');this.get('addicon').setStyle('display','none');this.get('value_location').setStyle('display','inline');this.get('editicon').setStyle('display','inline');}else{this.get('null_text_location').setStyle('display','inline');this.get('addicon').setStyle('display','inline');this.get('value_location').setStyle('display','none');this.get('editicon').setStyle('display','none');}}},});Y.NullChoiceSource=NullChoiceSource;},"0.2",{"skinnable":true,"requires":["oop","event","event-delegate","node","widget","widget-stdmod","overlay","lazr.overlay","lazr.anim","lazr.base"]});
// activator/activator-min.js
YUI.add('lazr.activator',function(Y){Y.log('loading lazr.activator');var ACTIVATOR='activator',getCN=Y.ClassNameManager.getClassName,MESSAGE_HEADER_TEMPLATE='
',MESSAGE_BODY_TEMPLATE='
',MESSAGE_CLOSE_BUTTON_TEMPLATE='Close ',ACT='act',C_HIDDEN=getCN(ACTIVATOR,'hidden'),C_ACT=getCN(ACTIVATOR,'act'),C_DATA_BOX=getCN(ACTIVATOR,'data-box'),C_MESSAGE_BOX=getCN(ACTIVATOR,'message-box'),C_MESSAGE_CLOSE=getCN(ACTIVATOR,'message-close'),C_MESSAGE_HEADER=getCN(ACTIVATOR,'message-header'),C_MESSAGE_BODY=getCN(ACTIVATOR,'message-body'),C_PROCESSING=getCN(ACTIVATOR,'processing'),C_CANCEL=getCN(ACTIVATOR,'cancellation'),C_SUCCESS=getCN(ACTIVATOR,'success'),C_FAILURE=getCN(ACTIVATOR,'failure'),ALL_STATUSES=[C_SUCCESS,C_FAILURE,C_CANCEL,C_PROCESSING];var Activator=function(){Activator.superclass.constructor.apply(this,arguments);};Activator.NAME=ACTIVATOR;Activator.ATTRS={};Y.extend(Activator,Y.Widget,{message_box:null,data_box:null,action_element:null,_setStatusClass:function(css_class){Y.Array.each(ALL_STATUSES,function(old_class,i){this.get('contentBox').removeClass(old_class);},this);this.get('contentBox').addClass(css_class);},_renderMessage:function(title,message_node){this.message_box.set('innerHTML','');if(message_node===undefined){this.message_box.addClass(C_HIDDEN);}else{this.message_box.removeClass(C_HIDDEN);var message_close_button=Y.Node.create(MESSAGE_CLOSE_BUTTON_TEMPLATE);message_close_button.addClass(C_MESSAGE_CLOSE);message_close_button.addClass('lazr-btn');message_close_button.on('click',function(e){this.message_box.addClass(C_HIDDEN);},this);var message_header=Y.Node.create(MESSAGE_HEADER_TEMPLATE);message_header.appendChild(message_close_button);message_header.appendChild(Y.Node.create(title));message_header.addClass(C_MESSAGE_HEADER);var message_body=Y.Node.create(MESSAGE_BODY_TEMPLATE);message_body.appendChild(message_node);message_body.addClass(C_MESSAGE_BODY);this.message_box.appendChild(message_header);this.message_box.appendChild(message_body);}},renderSuccess:function(data_node,message_node){if(data_node!==undefined){this.data_box.set('innerHTML','');this.data_box.appendChild(data_node);}
this._setStatusClass(C_SUCCESS);this._renderMessage('Message',message_node);var anim=Y.lazr.anim.green_flash({node:this.get('contentBox')});anim.run();},renderFailure:function(message_node){this._renderMessage('Error',message_node);this._setStatusClass(C_FAILURE);var anim=Y.lazr.anim.red_flash({node:this.get('contentBox')});anim.run();},renderCancellation:function(message_node){this._renderMessage('Message',message_node);this._setStatusClass(C_CANCEL);var anim=Y.lazr.anim.red_flash({node:this.get('contentBox')});anim.run();},renderProcessing:function(message_node){this._renderMessage('Message',message_node);this._setStatusClass(C_PROCESSING);},initializer:function(cfg){this.publish(ACT);if(cfg===undefined||cfg.contentBox===undefined){throw new Error("Missing contentBox argument for Activator.");}
this.message_box=this.get('contentBox').query('.'+C_MESSAGE_BOX);if(this.message_box===null){throw new Error("Can't find element with CSS class "+
C_MESSAGE_BOX+".");}
this.data_box=this.get('contentBox').query('.'+C_DATA_BOX);if(this.data_box===null){throw new Error("Can't find element with CSS class "+
C_DATA_BOX+".");}
this.action_element=this.get('contentBox').query('.'+C_ACT);if(this.action_element===null){throw new Error("Can't find element with CSS class "+
C_ACT+".");}},renderUI:function(){this.action_element.removeClass(C_HIDDEN);this.get('contentBox').prepend(' ');},bindUI:function(){var activator=this;Y.on('click',function(e){activator.fire(ACT);e.preventDefault();},this.action_element);},syncUI:function(){}});Y.lazr.ui.disableTabIndex(Activator);Y.namespace('lazr.activator');Y.lazr.activator.Activator=Activator;},"0.1",{"skinnable":true,"requires":["oop","event","node","widget","lazr.anim","lazr.base"]});
// translations/pofile-min.js
YUI.add('lp.pofile',function(Y){Y.log('loading lp.pofile');var self=Y.namespace('lp.pofile');self.setupSuggestionDismissal=function(e){all_dismiss_boxes=Y.all('.dismiss_action');if(all_dismiss_boxes!==null){all_dismiss_boxes.each(function(checkbox){var classbase=checkbox.get('id');var current_class=classbase.replace(/dismiss/,'current');var current_radios=Y.all('.'+current_class);var dismissables=Y.all('.'+classbase+'able');var dismissable_inputs_class=['.',classbase,'able_button input, ','.',classbase,'able_button button, ','.',classbase,'able_button textarea'].join("");checkbox.on('click',function(e){if(checkbox.get('checked')){dismissables.addClass('dismissed');Y.all(dismissable_inputs_class).set('disabled',true);current_radios.set('checked',true);}else{dismissables.removeClass('dismissed');Y.all(dismissable_inputs_class).set('disabled',false);}});});}};},"0.1",{"requires":["event","node"]});
// translations/translations-min.js
YUI.add('translations',function(Y){var translations=Y.namespace('translations');var base_button=' ';var output_panel_html=''+''+' ';var compose_button=function(shown){return base_button+
(shown?' ':' ');};var alter_button=function(button,shown){var button_field=button.get('parentNode');var text=''+
compose_button(shown)+'
';new_button=button_field.create(text);button_field.replaceChild(new_button,button);new_button.on('click',(shown?hide_output:show_output));return button_field.get('parentNode');};var hide_output=function(e){var row=alter_button(e.currentTarget,false);var output_panel=row.next();if(output_panel.hasClass("output-panel")){output_panel.get('parentNode').removeChild(output_panel);}};var output_loader=function(node){return{on:{success:function(entry){var output_block=entry.get('error_output');var error_pre=node.create(' ');error_pre.appendChild(document.createTextNode(output_block));node.set('innerHTML',null);node.appendChild(error_pre);},failure:function(errcode){node.set('innerHTML','ERROR: could not retrieve output. '+'Please try again later. ');}}};};var show_output=function(e){var row=alter_button(e.currentTarget,true);var table=row.get('parentNode');var entry_id=row.get('id');var output=table.create(output_panel_html);table.insertBefore(output,row.next());var entry_uri='+imports/'+entry_id;var div=output.one('div');var lp=new LP.client.Launchpad();lp.get(entry_uri,output_loader(div));};var init_status_choice=function(content_box,index,list){content_box.setStyle('display','');var conf=choice_confs[index];conf.title='Change status to';conf.contentBox=content_box;var status_choice=new Y.ChoiceSource(conf);status_choice.showError=function(err){display_error(null,err);};var entry_id=content_box.ancestor(function(node){return node.hasClass('import_entry_row');}).get('id');status_choice.on('save',function(e){var value_box=content_box.query('.value');var new_status=status_choice.get('value');value_box.setContent(new_status);config={on:{success:function(entry){Y.Array.each(conf.items,function(item){if(item.value==new_status){value_box.addClass(item.css_class);}else{value_box.removeClass(item.css_class);}});}},parameters:{new_status:new_status}};Y.log(config);lp_client=new LP.client.Launchpad();var entry_uri='+imports/'+entry_id;lp_client.named_post(entry_uri,'setStatus',config);});status_choice.render();};var init_error_output_buttons=function(){var button_markers=Y.all('.show-output');button_markers.set('innerHTML',compose_button(false));button_markers.on('click',show_output);};var toggle_node_visibility=function(node,index,list){node.toggleClass('unseen');node.toggleClass('seen');};translations.initialize_import_queue_page=function(Y){var spinner_loader=Y.all('#spinner-loader');spinner_loader.set('innerHTML',' ');init_error_output_buttons();Y.all('.status-choice').each(init_status_choice);spinner_loader.set('innerHTML','');};translations.initialize_languages_table=function(Y){Y.all('.not-preferred-language').each(function(node,index,list){node.addClass('unseen');});Y.all('.preferred-language').each(function(node,index,list){node.addClass('seen');});};translations.toggle_languages_visibility=function(e){e.preventDefault();Y.all('.not-preferred-language').each(toggle_node_visibility);var toggle_button=e.currentTarget;if(toggle_button.hasClass('all-languages-visible')){toggle_button.setContent('View all languages');toggle_button.removeClass('all-languages-visible');}else{toggle_button.setContent('View only preferred languages');toggle_button.addClass('all-languages-visible');}};},"0.1",{"requires":["oop","event","node","widget","plugin","overlay","lazr.choiceedit","lp.client.plugins","lp.errors"]});
// bugs/bug_tags_entry-min.js
YUI.add('bugs.bug_tags_entry',function(Y){var bugs=Y.namespace('bugs');var bug_tags_div;var edit_tags_trigger;var add_tags_trigger;var tag_list_span;var tag_input;var ok_button;var cancel_button;var tags_edit_spinner;var tags_form;var available_tags;var autocomplete;var DISPLAY='display',NONE='none',INLINE='inline',A='a',VALUE='value',BUG='bug',INNER_HTML='innerHTML',ESCAPE=27,TAGS_SHOW='tags-show',TAGS_HIDE='tags-hide';var populate_tags_input=function(){var tags=[];tag_list_span.all(A).each(function(anchor){tags.push(anchor.get(INNER_HTML));});tag_input.set(VALUE,tags.join(' ')+' ');};var base_url=window.location.href.split('/+bug')[0]+'/+bugs?field.tag=';var save_tags=function(){var lp_client=new LP.client.Launchpad();var tags=Y.Array(Y.Lang.trim(tag_input.get(VALUE)).split(new RegExp('\\s+'))).filter(function(elem){return elem!='';});var bug=new LP.client.Entry(lp_client,LP.client.cache[BUG],LP.client.cache[BUG].self_link);bug.removeAttr('http_etag');bug.set('tags',tags);tags_edit_spinner.setStyle(DISPLAY,INLINE);ok_button.setStyle(DISPLAY,NONE);cancel_button.setStyle(DISPLAY,NONE);bug.lp_save({on:{success:function(updated_entry){var official_tags=[];var unofficial_tags=[];Y.each(updated_entry.get('tags'),function(tag){if(available_tags.indexOf(tag)>-1){official_tags.push(tag);}else{unofficial_tags.push(tag);}});official_tags.sort();unofficial_tags.sort();var tags_html=Y.Array(official_tags).map(function(tag){return Y.Lang.substitute('{tag} ',{tag_url:base_url+tag,tag:tag});}).join(' ')+' '+Y.Array(unofficial_tags).map(function(tag){return Y.Lang.substitute('{tag} ',{tag_url:base_url+tag,tag:tag});}).join(' ');tag_list_span.set(INNER_HTML,tags_html);tag_input.setStyle(DISPLAY,NONE);tag_list_span.setStyle(DISPLAY,INLINE);ok_button.setStyle(DISPLAY,NONE);cancel_button.setStyle(DISPLAY,NONE);edit_tags_trigger.setStyle(DISPLAY,INLINE);tags_edit_spinner.setStyle(DISPLAY,NONE);Y.lazr.anim.green_flash({node:tag_list_span}).run();if(Y.Lang.trim(tags_html)==''){Y.one('#bug-tags').removeClass(TAGS_SHOW);Y.one('#bug-tags').addClass(TAGS_HIDE);Y.one('#add-bug-tags').removeClass(TAGS_HIDE);Y.one('#add-bug-tags').addClass(TAGS_SHOW);}},failure:function(id,request){tags_edit_spinner.setStyle(DISPLAY,NONE);Y.lazr.anim.green_flash({node:tag_list_span}).run();}}});};var cancel=function(){tag_input.setStyle(DISPLAY,NONE);tag_list_span.setStyle(DISPLAY,INLINE);ok_button.setStyle(DISPLAY,NONE);cancel_button.setStyle(DISPLAY,NONE);edit_tags_trigger.setStyle(DISPLAY,INLINE);tags_edit_spinner.setStyle(DISPLAY,NONE);autocomplete.hide()
Y.lazr.anim.red_flash({node:tag_list_span}).run();if(Y.Lang.trim(tag_list_span.get('innerHTML'))==''){Y.one('#bug-tags').removeClass(TAGS_SHOW);Y.one('#bug-tags').addClass(TAGS_HIDE);Y.one('#add-bug-tags').removeClass(TAGS_HIDE);Y.one('#add-bug-tags').addClass(TAGS_SHOW);}};var edit=function(){populate_tags_input();tag_list_span.setStyle(DISPLAY,NONE);tag_input.setStyle(DISPLAY,INLINE);tag_input.focus();edit_tags_trigger.setStyle(DISPLAY,NONE);ok_button.setStyle(DISPLAY,INLINE);cancel_button.setStyle(DISPLAY,INLINE);autocomplete.render();};bugs.setup_tag_entry=function(available_official_tags){if(LP.client.links['me']===undefined){return;}
available_tags=Y.Array(available_official_tags);bug_tags_div=Y.one('#bug-tags');edit_tags_trigger=bug_tags_div.one('#edit-tags-trigger');add_tags_trigger=Y.one('#add-tags-trigger');tag_list_span=bug_tags_div.one('#tag-list');tag_input=bug_tags_div.one('#tag-input');ok_button=bug_tags_div.one('#edit-tags-ok');cancel_button=bug_tags_div.one('#edit-tags-cancel');tags_edit_spinner=bug_tags_div.one('#tags-edit-spinner');tags_form=bug_tags_div.one('#tags-form');edit_tags_trigger.on('click',function(e){e.halt();edit();});add_tags_trigger.on('click',function(e){e.halt();Y.one('#bug-tags').removeClass(TAGS_HIDE);Y.one('#bug-tags').addClass(TAGS_SHOW);Y.one('#add-bug-tags').removeClass(TAGS_SHOW);Y.one('#add-bug-tags').addClass(TAGS_HIDE);edit();});cancel_button.on('click',function(e){e.halt();cancel();});ok_button.on('click',function(e){e.halt();save_tags();});tag_input.on('keydown',function(e){if(e.keyCode==ESCAPE){e.halt();cancel();}});tags_form.on('submit',function(e){e.halt();save_tags();});add_tags_trigger.addClass('js-action');edit_tags_trigger.addClass('js-action')
autocomplete=new Y.lazr.AutoComplete({input:'#tag-input',data:available_official_tags,boundingBox:'#tags-autocomplete',contentBox:'#tags-autocomplete-content'});autocomplete.on('queryChange',function(e){var val="null";if(e.newVal!=null){val="'"+e.newVal.text+"', "+e.newVal.offset;}});};},"0.1",{"requires":["base","io-base","node","substitute","node-menunav","lazr.base","lazr.anim","lazr.autocomplete"]});
// bugs/filebug-dupefinder-min.js
YUI.add('bugs.dupe_finder',function(Y){var BLOCK='block',DISPLAY='display',EXPANDER_COLLAPSED='/@@/treeCollapsed',EXPANDER_EXPANDED='/@@/treeExpanded',INLINE='inline',INNER_HTML='innerHTML',LAZR_CLOSED='lazr-closed',NONE='none',SRC='src',UNSEEN='unseen';var bugs=Y.namespace('bugs');var bug_already_reported_expanders;var search_field;var search_button;var search_url_base;var filebug_base_url;var filebug_form_url;var submit_button_html='OK ';var cancel_button_html='Cancel ';function get_details_div(expander){var details_div=expander.get('parentNode').get('parentNode').one('.duplicate-details');if(!Y.Lang.isValue(details_div)){Y.fail("Unable to find details div for expander "+expander.get('id'));}else{return details_div;}}
function collapse_bug_details(expander){var bug_details_div=get_details_div(expander);var anim=Y.lazr.effects.slide_in(bug_details_div);anim.run();expander.set(SRC,EXPANDER_COLLAPSED);}
function show_bug_reporting_form(e){var filebug_form_container=Y.one('#filebug-form-container');if(Y.Lang.isValue(filebug_form_container)){filebug_form_container.setStyle(DISPLAY,BLOCK);}
var bug_reporting_form=Y.one('#bug_reporting_form');bug_reporting_form.setStyle(DISPLAY,BLOCK);Y.one(Y.DOM.byId('field.actions.submit_bug')).focus();var bugtarget_package_btn=Y.one(Y.DOM.byId('field.bugtarget.option.package'));if(Y.Lang.isValue(bugtarget_package_btn)){Y.one(Y.DOM.byId('field.bugtarget.package')).focus();}else{Y.one(Y.DOM.byId('field.comment')).focus();}}
function search_for_and_display_dupes(){function show_failure_message(transaction_id,response,args){var error_message='';if(response.status==503){error_message="Searching for your bug in Launchpad took too long. "+"Try reducing the number of words in the summary "+"field and click \"Check again\" to retry your search. "+"Alternatively, you can enter the details of your bug "+"below.";}else{error_message="An error occured whilst trying to find bugs matching "+"the summary you entered. Click \"Check again\" to retry "+"your search. Alternatively, you can enter the "+"details of your bug below.";}
var error_node=Y.Node.create('
');error_node.set('text',error_message);Y.one('#possible-duplicates').appendChild(error_node);Y.one('#spinner').addClass(UNSEEN);show_bug_reporting_form();Y.one(Y.DOM.byId('field.title')).set('value',search_field.get('value'));search_button.set('value','Check again');search_button.removeClass(UNSEEN);}
function on_success(transaction_id,response,args){Y.one('#spinner').addClass(UNSEEN);var duplicate_div=Y.one('#possible-duplicates');duplicate_div.set(INNER_HTML,response.responseText);bug_already_reported_expanders=Y.all('img.bug-already-reported-expander');if(bug_already_reported_expanders.size()>0){Y.bugs.setup_dupes();}else{show_bug_reporting_form();}
Y.one('#bug_reporting_form input[name=field.title]').set('value',search_field.get('value'));search_button.set('value','Check again');search_button.removeClass(UNSEEN);}
var search_term=encodeURI(search_field.get('value'));var search_url=search_url_base+'?title='+search_term;search_button.addClass(UNSEEN);Y.one('#spinner').removeClass(UNSEEN);Y.one('#possible-duplicates').set(INNER_HTML,'');Y.one('#bug_reporting_form').setStyle(DISPLAY,NONE);config={on:{success:on_success,failure:show_failure_message}};Y.io(search_url,config);}
function create_subscribe_overlay(form){var bug_id=form.one('input.bug-already-reported-as').get('value');var bug_title=Y.one('#bug-'+bug_id+'-title').get(INNER_HTML);if(bug_title.length>35){bug_title=bug_title.substring(0,35)+'...';}
var subscribe_form_body=''+'
#'+bug_id+' "'+bug_title+'"'+'
'+'
'+' '+' '+' '+' Just mark the bug as affecting me'+' '+'
'+'
'+' '+' '+' Subscribe me as well'+' '+'
'+'
';subscribe_form_overlay=new Y.lazr.FormOverlay({headerContent:'I am affected by this bug ',form_content:subscribe_form_body,form_submit_button:Y.Node.create(submit_button_html),form_cancel_button:Y.Node.create(cancel_button_html),centered:true,visible:false});subscribe_form_overlay.render('#duplicate-overlay-bug-'+bug_id);form_node=subscribe_form_overlay.form_node;form_node.set('action',form.get('action'));form_node.set('method','post');var radio_buttons=form.queryAll('input.subscribe-option');Y.each(radio_buttons,function(radio_button){var weight=radio_button.get('checked')?'bold':'normal';radio_button.get('parentNode').setStyle('fontWeight',weight);});return subscribe_form_overlay;}
function reload_filebug_form(){var config={on:{success:function(transaction_id,response,args){var filebug_form_container=Y.one('#filebug-form-container');filebug_form_container.setStyle(DISPLAY,NONE);Y.log(filebug_form_container);Y.one('#possible-duplicates').set(INNER_HTML,'');set_up_filebug_form(response.responseText);search_button.set('value','Next');}}};var product_field=Y.one(Y.DOM.byId('field.product'));if(Y.Lang.isValue(product_field)){var product=product_field.get('value');filebug_form_url=filebug_base_url+product+'/+filebug-inline-form';search_url_base=filebug_base_url+product+'/+filebug-show-similar';}
Y.io(filebug_form_url,config);}
function set_up_filebug_form(form_contents){var filebug_form_container=Y.one('#filebug-form-container');filebug_form_container.set(INNER_HTML,form_contents);var bug_reporting_form=Y.one('#bug_reporting_form');if(Y.Lang.isValue(bug_reporting_form)){activateCollapsibles();}}
function set_up_dupe_finder(transaction_id,response,args){filebug_base_url=Y.one('#filebug-base-url').getAttribute('href');set_up_filebug_form(response.responseText);search_url_base=Y.one('#duplicate-search-url').getAttribute('href');search_field=Y.one(Y.DOM.byId('field.title'));search_field.set('name','field.search');search_field.set('id','field.search');var product_field=Y.one(Y.DOM.byId('field.product'));if(Y.Lang.isValue(product_field)){Y.log(product_field);product_field.on('change',reload_filebug_form);}
search_button=Y.one(Y.DOM.byId('field.actions.search'));search_button.set('value','Next');search_form=Y.one('#filebug-search-form');search_form.on('submit',function(e){e.halt();search_for_and_display_dupes();});}
Y.bugs.setup_dupes=function(){bug_already_reported_expanders=Y.all('img.bug-already-reported-expander');bug_reporting_form=Y.one('#bug_reporting_form');if(bug_already_reported_expanders.size()>0){Y.each(Y.all('div.duplicate-details'),function(div){collapse_bug_details(div);});Y.each(Y.all('.similar-bug'),function(row){var bug_details_div=row.query('div.duplicate-details');var image=row.query('img.bug-already-reported-expander');var bug_title_link=row.query('.duplicate-bug-link');var view_bug_link=row.query('.view-bug-link');bug_title_link.addClass('js-action');bug_title_link.on('click',function(e){e.preventDefault();});view_bug_link.on('click',function(e){e.stopPropagation();});bug_details_div.on('click',function(e){e.stopPropagation();});bug_title_link.on('focus',function(e){if(!bug_details_div.hasClass('lazr-opened')){var anim=Y.lazr.effects.slide_out(bug_details_div);anim.run();image.set(SRC,EXPANDER_EXPANDED);if(bug_reporting_form.getStyle(DISPLAY)==BLOCK){bug_reporting_form.addClass(UNSEEN);}}});row.on('click',function(e){if(bug_details_div.hasClass('lazr-opened')){collapse_bug_details(image);}else{var anim=Y.lazr.effects.slide_out(bug_details_div);anim.run();image.set(SRC,EXPANDER_EXPANDED);}});});bug_reporting_form.addClass(UNSEEN);}
bug_not_reported_button=Y.one('#bug-not-already-reported');if(Y.Lang.isValue(bug_not_reported_button)){bug_not_reported_button.on('click',show_bug_reporting_form);}
var this_is_my_bug_forms=Y.all('form.this-is-my-bug-form');Y.each(this_is_my_bug_forms,function(form){var subscribe_form_overlay=create_subscribe_overlay(form);form.on('submit',function(e){e.halt();subscribe_form_overlay.show();});});};Y.bugs.setup_dupe_finder=function(){Y.log("In setup_dupe_finder");Y.on('domready',function(){config={on:{success:set_up_dupe_finder,failure:function(){}}};var filebug_form_url_element=Y.one('#filebug-form-url');if(Y.Lang.isValue(filebug_form_url_element)){filebug_form_url=filebug_form_url_element.getAttribute('href');Y.io(filebug_form_url,config);}});};},"0.1",{"requires":["base","io","oop","node","event","lazr.formoverlay","lazr.effects"]});
// bugs/subscriber-min.js
YUI.add('lp.subscriber',function(Y){Y.namespace('lp');function Subscription(config){Subscription.superclass.constructor.apply(this,arguments);}
Subscription.ATTRS={'link':{value:null},'can_be_unsubscribed':{value:false},'is_direct':{value:true},'has_dupes':{value:false},'person':{value:null},'is_team':{value:false},'subscriber':{value:null},'spinner':{vallue:null}};Y.extend(Subscription,Y.Base,{'is_node':function(){return this.get('link')instanceof Y.Node;},'is_already_subscribed':function(){var display_name=this.get('person').get('full_display_name');var already_subscribed=false;Y.all('#subscribers-links div').each(function(link){var name=link.one('a').getAttribute('name');if(name==display_name){already_subscribed=true;}});return already_subscribed;},'can_be_unsubscribed_by_user':function(){return this.get('can_be_unsubscribed');},'is_current_user_subscribing':function(){return(this.get('subscriber').get('name')==this.get('person').get('name'));},'is_direct_subscription':function(){return this.get('is_direct');},'has_duplicate_subscriptions':function(){return this.get('has_dupes');},'is_team':function(){return this.get('is_team');},'enable_spinner':function(text){if(Y.Lang.isValue(text)){this.get('spinner').set('innerHTML',text);}
this.get('link').setStyle('display','none');this.get('spinner').setStyle('display','block');},'disable_spinner':function(text){if(Y.Lang.isValue(text)){var link=this.get('link');link.set('innerHTML',text);if(text=='Subscribe'){link.removeClass('modify remove');link.addClass('add');}else{link.removeClass('add');link.addClass('modify remove');}}
this.get('spinner').setStyle('display','none');this.get('link').setStyle('display','inline');}});Y.lp.Subscription=Subscription;function Subscriber(config){Subscriber.superclass.constructor.apply(this,arguments);}
Subscriber.NAME='Subscriber';Subscriber.ATTRS={uri:{value:''},name:{value:''},css_name:{value:''},escaped_uri:{value:''},user_node:{value:null},display_name:{value:''},full_display_name:{value:''},subscriber_ids:{value:null}};Y.extend(Subscriber,Y.Base,{initializer:function(config){if(this.get('uri')!==''){this.set('name',this.get('uri').substring(2));var name=this.get('name');var subscriber_ids=this.get('subscriber_ids');if(Y.Lang.isValue(subscriber_ids)){var css_name=this.get('subscriber_ids')[name];if(Y.Lang.isValue(css_name)){this.set('css_name',css_name);}else{css_name='subscriber-'+Y.guid();subscriber_ids[name]=css_name;this.set('subscriber_ids',subscriber_ids);this.set('css_name',css_name);}}
var escaped_uri;if(name.indexOf('+')>0){escaped_uri=name.replace('+','%2B');}else{escaped_uri=name;}
this.set('escaped_uri','/~'+escaped_uri);}
this.set_display_name();this.set_truncated_display_name();},get_display_name_from_api:function(client){var self=this;var cfg={on:{success:function(person){self.set('display_name',person.lookup_value('display_name'));self.set_truncated_display_name();self.fire('displaynameload');}}};client.get(this.get('escaped_uri'),cfg);},get_display_name_from_node:function(){var user_node;if(Y.Lang.isValue(this.get('user_node'))){user_node=this.get('user_node');}else{user_node=Y.one('.subscriber-'+this.get('name'));}
if(Y.Lang.isValue(user_node)){this.set('user_node',user_node);var anchor=this.get('user_node').one('a');var display_name=anchor.get('name');return display_name;}else{return'';}},set_display_name:function(){var display_name=this.get_display_name_from_node();if(display_name!==''){this.set('display_name',display_name);this.set_truncated_display_name();this.fire('displaynameload');}else{if(window.LP!==undefined&&window.LP.client.links.me!==undefined){var client=new LP.client.Launchpad();this.get_display_name_from_api(client);}}},set_truncated_display_name:function(){var display_name=this.get('display_name');if(display_name!==''){var truncated_name;if(display_name.length>20){truncated_name=display_name.substring(0,17)+'...';}else{truncated_name=display_name;}
this.set('display_name',truncated_name);this.set('full_display_name',display_name);}}});Y.lp.Subscriber=Subscriber;},"0.1",{"requires":["base","node"]});
// bugs/offical_bug_tags-min.js
YUI.add('bugs.official_bug_tag_management',function(Y){var bugs=Y.namespace('bugs');var official_tags;var other_tags;var valid_name_re=new RegExp(valid_name_pattern);var filter_array=function(arr,fn){var new_array=[];Y.each(arr,function(item){if(fn(item)){new_array.push(item);}});return new_array;};var sort_tags=function(tags){tags.sort(function(x,y){if(x.tag==y.tag){return 0;}else if(x.tag>y.tag){return 1;}else{return-1;}});};var get_official_bug_tags=function(official_bug_tags){var tags=[];Y.each(official_bug_tags,function(item){var count=used_bug_tags[item];if(count===null){count=0;}
tags.push({tag:item,count:count});});sort_tags(tags);return tags;};var get_other_bug_tags=function(used_bug_tags){var tags=[];Y.each(used_bug_tags,function(value,key,obj){if(official_bug_tags.indexOf(key)<0){tags.push({tag:key,count:value});}});sort_tags(tags);return tags;};var enable_arrows=function(){var official_cbs=Y.all('#official-tags-list input');var other_cbs=Y.all('#other-tags-list input');var official_cbs_checked=false;if(official_cbs!==null){official_cbs.each(function(cb){official_cbs_checked=official_cbs_checked||cb.get('checked');});}
var other_cbs_checked=false;if(other_cbs!==null){other_cbs.each(function(cb){other_cbs_checked=other_cbs_checked||cb.get('checked');});}
Y.one('#remove-official-tags').set('disabled',!official_cbs_checked);Y.one('#add-official-tags').set('disabled',!other_cbs_checked);};var re_alphanum=new RegExp('[a-zA-Z0-9-]');var mangle_id=function(value){var chars=value.split('');chars=Y.Array(chars).map(function(ch){if(ch.match(re_alphanum)){return ch;}else{return'__'+ch.charCodeAt(0)+'__';}});return chars.join('');};var make_tag_li=function(item){if(item.count===0){item.count='';}
item._tag_id=mangle_id(item.tag);var li_html=Y.Lang.substitute(['',' ',' ',' {tag} ',' {count} ',' ',' '].join(''),item);var li_node=Y.Node.create(li_html);li_node._tag=item;li_node.one('input').on('click',function(e){enable_arrows();var cb_node=li_node.one('input');if(cb_node.get('checked')){li_node.addClass('selected');}else{li_node.removeClass('selected');}});return li_node;};var render_tag_lists=function(){var official_tags_ul=Y.one('#official-tags-list');var other_tags_ul=Y.one('#other-tags-list');official_tags_ul.set('innerHTML','');other_tags_ul.set('innerHTML','');Y.each(official_tags,function(item){official_tags_ul.appendChild(make_tag_li(item));});Y.each(other_tags,function(item){other_tags_ul.appendChild(make_tag_li(item));});};var save_tags=function(){var tags=[];Y.each(official_tags,function(item){tags.push(item.tag);});Y.one('#field-official_bug_tags').set('value',tags.join(' '));Y.one('#save-form').submit();};var get_selected_tags=function(tags_ul){var selected_tags=[];tags_ul.all('li').each(function(li){if(li.one('input').get('checked')){selected_tags.push(li._tag);}});return selected_tags;};var copy_array=function(arr){var new_array=[];Y.each(arr,function(item){new_array.push(item);});return new_array;};var get_updated_tags=function(from_tags_ul,from_tags,to_tags){var new_from_tags=copy_array(from_tags);var new_to_tags=copy_array(to_tags);var selected_tags=get_selected_tags(from_tags_ul);Y.each(selected_tags,function(item){new_to_tags.push(item);});new_from_tags=filter_array(from_tags,function(item){return(selected_tags.indexOf(item)<0);});sort_tags(new_from_tags);sort_tags(new_to_tags);return{from_tags:new_from_tags,to_tags:new_to_tags};};var on_new_tag_add=function(){var new_tag=Y.Lang.trim(Y.one('#new-tag-text').get('value'));var new_tag_already_official=false;Y.each(official_tags,function(item){new_tag_already_official=(new_tag_already_official||(item.tag==new_tag));});var new_tag_already_used=false;Y.each(other_tags,function(item){new_tag_already_used=(new_tag_already_used||(item.tag==new_tag));});if(new_tag_already_used){Y.each(other_tags,function(item){if(item.tag==new_tag){official_tags.push(item);}});other_tags=filter_array(other_tags,function(item){return item.tag!=new_tag;});}
if(!new_tag_already_official&&!new_tag_already_used){if(valid_name_re.test(new_tag)){var count=used_bug_tags[new_tag];if(count===null){count=0;}
official_tags.push({tag:new_tag,count:0});sort_tags(official_tags);Y.one('#new-tag-text').set('value','');Y.one('#new-tag-add').set('disabled',true);Y.one('#save-button').set('disabled',false);}else{display_error();}}
render_tag_lists();};var ERROR_MSG=['','','{new_tag} ','is not a valid tag name.','Tags must start with a letter or number and be lowercase.','The characters "+", "-" and "." are also allowed after the','first character.','
'].join(' ');var display_error=function(){var new_tag=Y.one('#new-tag-text').get('value').replace(new RegExp('<','g'),'<');var overlay=new Y.lazr.PrettyOverlay({headerContent:'',bodyContent:Y.Lang.substitute(ERROR_MSG,{new_tag:new_tag}),align:{points:[Y.WidgetPositionExt.CC,Y.WidgetPositionExt.CC]},progressbar:false,progress:0});overlay.render();};bugs.setup_official_bug_tag_management=function(){official_tags=get_official_bug_tags(official_bug_tags);other_tags=get_other_bug_tags(used_bug_tags);var layout_table=Y.one('#layout-table');layout_table.setStyle('display','block');var official_tags_ul=Y.one('#official-tags-list');var other_tags_ul=Y.one('#other-tags-list');render_tag_lists();Y.one('#add-official-tags').on('click',function(e){var updated_tags=get_updated_tags(other_tags_ul,other_tags,official_tags);other_tags=updated_tags.from_tags;official_tags=updated_tags.to_tags;render_tag_lists();enable_arrows();Y.one('#save-button').set('disabled',false);});Y.one('#remove-official-tags').on('click',function(e){var updated_tags=get_updated_tags(official_tags_ul,official_tags,other_tags);official_tags=updated_tags.from_tags;other_tags=updated_tags.to_tags;render_tag_lists();enable_arrows();Y.one('#save-button').set('disabled',false);});Y.one('#new-tag-add').on('click',function(e){on_new_tag_add();});Y.one('#new-tag-text').on('keypress',function(e){var new_value=Y.Lang.trim(Y.one('#new-tag-text').get('value'));Y.one('#new-tag-add').set('disabled',new_value==='');if(e.keyCode==13){on_new_tag_add();}});Y.one('#save-button').on('click',function(e){e.halt();save_tags();});};},"0.1",{"requires":["node","substitute","base","widget-position-ext","collection","lazr.base","lazr.overlay"]});
// bugs/bugtask-index-min.js
YUI.add('bugs.bugtask_index',function(Y){var bugs=Y.namespace('bugs');var duplicate_form_overlay;var privacy_form_overlay;var update_dupe_url;var lp_client;var lp_bug_entry;var bug_repr;var error_overlay;var submit_button_html='OK ';var cancel_button_html='Cancel ';var privacy_link;var privacy_spinner;var link_branch_link;var subscriber_ids;var PortletTarget=function(){};Y.augment(PortletTarget,Y.Event.Target);Y.bugs.portlet=new PortletTarget();Y.bugs.portlet.subscribe('bugs:portletloaded',function(){load_subscriber_ids();});Y.bugs.portlet.subscribe('bugs:dupeportletloaded',function(){setup_unsubscribe_icon_handlers();});Y.bugs.portlet.subscribe('bugs:portletloadfailed',function(handlers){if(Y.Lang.isArray(handlers)){var click_handler=handlers[0];click_handler.detach();}});Y.bugs.portlet.subscribe('bugs:dupeportletloadfailed',function(handlers){setup_unsubscribe_icon_handlers();});Y.bugs.portlet.subscribe('bugs:portletsubscriberidsloaded',function(){setup_subscription_link_handlers();load_subscribers_from_duplicates();});Y.bugs.portlet.subscribe('bugs:portletsubscriberidsfailed',function(){load_subscribers_from_duplicates();});Y.bugs.portlet.subscribe('bugs:nameloaded',function(subscription){var error_handler=new LP.client.ErrorHandler();error_handler.clearProgressUI=function(){var temp_link=Y.one('#temp-username');if(temp_link){var temp_parent=temp_link.get('parentNode');temp_parent.removeChild(temp_link);}};error_handler.showError=function(error_msg){Y.lp.display_error(Y.one('.menu-link-addsubscriber'),error_msg);};var config={on:{success:function(){var temp_link=Y.one('#temp-username');var temp_spinner=Y.one('#temp-name-spinner');temp_link.removeChild(temp_spinner);var anim=Y.lazr.anim.green_flash({node:temp_link});anim.on('end',function(){add_user_name_link(subscription);var temp_parent=temp_link.get('parentNode');temp_parent.removeChild(temp_link);});anim.run();},failure:error_handler.getFailureHandler()},parameters:{person:LP.client.get_absolute_uri(subscription.get('person').get('escaped_uri'))}};lp_client.named_post(bug_repr.self_link,'subscribe',config);});Y.bugs.setup_bugtask_index=function(){Y.on('load',function(){if(Y.UA.ie){return;}
if(LP.client.links.me===undefined){return;}
setup_client_and_bug();var update_dupe_link=Y.one('.menu-link-mark-dupe, #change_duplicate_bug');if(update_dupe_link){update_dupe_url=update_dupe_link.get('href');var mark_dupe_form_url=update_dupe_url+'/++form++';duplicate_form_overlay=new Y.lazr.FormOverlay({headerContent:'Mark bug report as duplicate ',form_header:'Marking the bug as a duplicate will, by default, '+'hide it from search results listings.',form_submit_button:Y.Node.create(submit_button_html),form_cancel_button:Y.Node.create(cancel_button_html),centered:true,form_submit_callback:update_bug_duplicate,visible:false});duplicate_form_overlay.render('#duplicate-form-container');duplicate_form_overlay.loadFormContentAndRender(mark_dupe_form_url);update_dupe_link.on('click',function(e){if(duplicate_form_overlay){e.preventDefault();duplicate_form_overlay.show();}});update_dupe_link.addClass('js-action');}
privacy_link=Y.one('#privacy-link');if(privacy_link){var privacy_link_url=privacy_link.getAttribute('href')+'/++form++';var privacy_div=Y.one('#privacy-text');var privacy_html=privacy_link.get('innerHTML')+' ';privacy_div.set('innerHTML',privacy_html);var privacy_text=Y.one('#privacy-text');privacy_link=Y.Node.create(''+'edit ');privacy_link.set('href',privacy_link_url);privacy_text.appendChild(privacy_link);privacy_spinner=Y.Node.create(' ');privacy_text.appendChild(privacy_spinner);privacy_form_overlay=new Y.lazr.FormOverlay({headerContent:'Change privacy settings ',form_submit_button:Y.Node.create(submit_button_html),form_cancel_button:Y.Node.create(cancel_button_html),centered:true,form_submit_callback:update_privacy_settings,visible:false});privacy_form_overlay.render('#privacy-form-container');privacy_form_overlay.loadFormContentAndRender(privacy_link_url);privacy_link.on('click',function(e){if(privacy_form_overlay){e.preventDefault();privacy_form_overlay.show();document.getElementById('field.private').focus();}});privacy_link.addClass('js-action');}
setup_add_attachment();setup_link_branch_picker();},window);};function setup_subscribe_someone_else_handler(subscription){var config={header:'Subscribe someone else',step_title:'Search',picker_activator:'.menu-link-addsubscriber'};var picker=Y.lp.picker.create('ValidPersonOrTeam',function(result){subscribe_someone_else(result,subscription);},config);}
function setup_subscription_link_handlers(){if(LP.client.links.me===undefined){return;}
setup_client_and_bug();var subscription=new Y.lp.Subscription({link:Y.one('.menu-link-subscription'),spinner:Y.one('#sub-unsub-spinner'),subscriber:new Y.lp.Subscriber({uri:LP.client.links.me,subscriber_ids:subscriber_ids})});var is_direct=subscription.get('link').get('parentNode').hasClass('subscribed-true');var has_dupes=subscription.get('link').get('parentNode').hasClass('dup-subscribed-true');subscription.set('is_direct',is_direct);subscription.set('has_dupes',has_dupes);if(subscription.is_node()){subscription.get('link').on('click',function(e){e.halt();subscription.set('can_be_unsubscribed',true);subscription.set('person',subscription.get('subscriber'));subscription.set('is_team',false);var parent=e.target.get('parentNode');if(parent.hasClass('subscribed-false')&&parent.hasClass('dup-subscribed-false')){subscribe_current_user(subscription);}
else{unsubscribe_current_user(subscription);}});subscription.get('link').addClass('js-action');}
setup_subscribe_someone_else_handler(subscription);}
function setup_unsubscribe_icon_handlers(){var subscription=new Y.lp.Subscription({link:Y.get('.menu-link-subscription'),spinner:Y.get('#sub-unsub-spinner'),subscriber:new Y.lp.Subscriber({uri:LP.client.links.me,subscriber_ids:subscriber_ids})});Y.on('click',function(e){e.halt();unsubscribe_user_via_icon(e.target,subscription);},'.unsub-icon');}
function setup_client_and_bug(){lp_client=new LP.client.Launchpad();if(bug_repr===undefined){bug_repr=LP.client.cache.bug;lp_bug_entry=new LP.client.Entry(lp_client,bug_repr,bug_repr.self_link);}}
function update_bug_duplicate(data){lp_bug_entry.removeAttr('http_etag');duplicate_form_overlay.hide();var dupe_span=Y.one('#mark-duplicate-text');dupe_span.addClass('update-in-progress-message');var new_dup_url=null;var new_dup_id=data['field.duplicateof'][0];if(new_dup_id!==''){var self_link=lp_bug_entry.get('self_link');var last_slash_index=self_link.lastIndexOf('/');new_dup_url=self_link.slice(0,last_slash_index+1)+new_dup_id;}
var old_dup_url=lp_bug_entry.get('duplicate_of_link');lp_bug_entry.set('duplicate_of_link',new_dup_url);config={on:{success:function(updated_entry){dupe_span.removeClass('update-in-progress-message');lp_bug_entry=updated_entry;if(new_dup_url!==null){dupe_span.set('innerHTML',['Duplicate of bug # ',''].join(""));dupe_span.all('a').item(0).set('href','/bugs/'+new_dup_id).appendChild(document.createTextNode(new_dup_id));dupe_span.all('a').item(1).set('href',update_dupe_url);show_comment_on_duplicate_warning();}else{dupe_span.set('innerHTML',[''].join(""));dupe_span.one('a').set('href',update_dupe_url);hide_comment_on_duplicate_warning();}
Y.lazr.anim.green_flash({node:dupe_span}).run();dupe_span.one('a.menu-link-mark-dupe').on('click',function(e){e.preventDefault();duplicate_form_overlay.show();});},failure:function(id,request){dupe_span.removeClass('update-in-progress-message');if(request.status==400){duplicate_form_overlay.showError(new_dup_id+' is not a valid bug number or'+' nickname.');}else{duplicate_form_overlay.showError(request.responseText);}
duplicate_form_overlay.show();lp_bug_entry.set('duplicate_of_link',old_dup_url);}}};lp_bug_entry.lp_save(config);}
var show_comment_on_duplicate_warning=function(){var duplicate_warning=Y.one('#warning-comment-on-duplicate');if(duplicate_warning===null){var container=Y.one('#add-comment-form');var first_node=container.get('firstChild');duplicate_warning=Y.Node.create([''].join(''));container.insertBefore(duplicate_warning,first_node);}};var hide_comment_on_duplicate_warning=function(){var duplicate_warning=Y.one('#warning-comment-on-duplicate');if(duplicate_warning!==null){duplicate_warning.ancestor().removeChild(duplicate_warning);}};var update_privacy_settings=function(data){lp_bug_entry.removeAttr('http_etag');privacy_form_overlay.hide();var privacy_text=Y.one('#privacy-text');var privacy_div=Y.one('#privacy');privacy_link.setStyle('display','none');privacy_spinner.setStyle('display','inline');if(lp_client===undefined){lp_client=new LP.client.Launchpad();}
if(lp_bug_entry===undefined){var bug_repr=LP.client.cache.bug;lp_bug_entry=new LP.client.Entry(lp_client,bug_repr,bug_repr.self_link);}
var private=data['field.private']!==undefined;var security_related=data['field.security_related']!==undefined;lp_bug_entry.set('private',private);lp_bug_entry.set('security_related',security_related);var error_handler=new LP.client.ErrorHandler();error_handler.clearProgressUI=function(){privacy_spinner.setStyle('display','none');privacy_link.setStyle('display','inline');};error_handler.showError=function(error_msg){Y.lazr.anim.red_flash({node:privacy_div}).run();privacy_form_overlay.showError(error_msg);privacy_form_overlay.show();};var config={on:{success:function(updated_entry){privacy_spinner.setStyle('display','none');privacy_link.setStyle('display','inline');lp_bug_entry=updated_entry;if(private){privacy_div.removeClass('public');privacy_div.addClass('private');privacy_text.set('innerHTML','This report is private ');}else{privacy_div.removeClass('private');privacy_div.addClass('public');privacy_text.set('innerHTML','This report is public ');}
privacy_text.appendChild(privacy_link);privacy_text.appendChild(privacy_spinner);var security_message=Y.one('#security-message');if(security_related){if(security_message===null){var security_message_html=['Security vulnerability
'].join('');security_message=Y.Node.create(security_message_html);privacy_div.appendChild(security_message);}}else{if(security_message!==null){privacy_div.removeChild(security_message);}}
Y.lazr.anim.green_flash({node:privacy_div}).run();},failure:error_handler.getFailureHandler()}};lp_bug_entry.lp_save(config);};function setup_link_branch_picker(){setup_client_and_bug();var error_handler=new LP.client.ErrorHandler();error_handler.clearProgressUI=function(){link_branch_link.toggleClass('update-in-progress-message');};error_handler.showError=function(error_msg){display_error(Y.one('.menu-link-addsubscriber'),error_msg);};function get_branch_and_link_to_bug(data){var branch_url=data.api_uri;config={on:{success:link_branch_to_bug,failure:error_handler.getFailureHandler()}};link_branch_link.toggleClass('update-in-progress-message');lp_client.get(branch_url,config);}
link_branch_link=Y.one('.menu-link-addbranch');if(Y.Lang.isValue(link_branch_link)){var config={header:'Link a related branch',step_title:'Search',picker_activator:'.menu-link-addbranch'};var picker=Y.lp.picker.create('Branch',get_branch_and_link_to_bug,config);}}
function link_branch_to_bug(branch){var error_handler=new LP.client.ErrorHandler();error_handler.clearProgressUI=function(){link_branch_link.toggleClass('update-in-progress-message');};error_handler.showError=function(error_msg){display_error(Y.one('.menu-link-addsubscriber'),error_msg);};config={on:{success:function(bug_branch_entry){link_branch_link.toggleClass('update-in-progress-message');config={on:{success:function(branch_html){add_branch_to_linked_branches(branch_html);}},accept:LP.client.XHTML};lp_client.get(bug_branch_entry.get('self_link'),config);},failure:error_handler.getFailureHandler()},parameters:{branch:branch.get('self_link')}};lp_client.named_post(lp_bug_entry.get('self_link'),'linkBranch',config);}
function add_branch_to_linked_branches(branch_html){var anim;var bug_branch_node=Y.Node.create(branch_html);var bug_branch_list=Y.one('#bug-branches');if(!Y.Lang.isValue(bug_branch_list)){bug_branch_list=Y.Node.create(''+'
Related branches '+'
');var bug_branch_container=Y.one('#bug-branches-container');bug_branch_container.appendChild(bug_branch_list);anim=Y.lazr.anim.green_flash({node:bug_branch_list});}else{anim=Y.lazr.anim.green_flash({node:bug_branch_node});}
var existing_bug_branch_node=bug_branch_list.one('#'+bug_branch_node.getAttribute('id'));if(!Y.Lang.isValue(existing_bug_branch_node)){bug_branch_list.appendChild(bug_branch_node);}else{anim=Y.lazr.anim.green_flash({node:existing_bug_branch_node});}
anim.run();Y.fire('lp:branch-linked',bug_branch_node);}
function get_user_uri_from_icon(icon){var parent_div=icon.get('parentNode').get('parentNode');var user_uri=parent_div.one('a').getAttribute('href');var host_start=user_uri.indexOf('//');if(host_start!=-1){var host_end=user_uri.indexOf('/',host_start+2);return user_uri.substring(host_end,user_uri.length);}
return user_uri;}
function build_user_link_html(subscription){var name=subscription.get('person').get('name');var css_name=subscription.get('person').get('css_name');var full_name=subscription.get('person').get('full_display_name');if(subscription.get('person').get('display_name')===''){subscription.get('person').set_display_name();}
var display_name=subscription.get('person').get('display_name');var terms={name:name,css_name:css_name,display_name:display_name,full_name:full_name};if(subscription.is_current_user_subscribing()){terms.subscribed_by='themselves';}else{terms.subscribed_by='by '+full_name;}
var html=Y.Node.create('');html.addClass(terms.css_name);if(subscription.is_direct_subscription()){html.set('id','direct-'+terms.css_name);}else{html.set('id','dupe-'+terms.css_name);}
html.one('a').set('href','/~'+terms.name).set('name',terms.full_name).set('title','Subscribed '+terms.subscribed_by);var span;if(subscription.is_team()){span=' ';}else{span=' ';}
html.one('a').appendChild(Y.Node.create(span)).appendChild(document.createTextNode(terms.display_name));if(subscription.can_be_unsubscribed_by_user()){var icon_html=Y.Node.create(''+' ');icon_html.set('id','unsubscribe-'+terms.css_name).set('title','Unsubscribe '+terms.full_name);icon_html.one('img').set('id','unsubscribe-icon-'+terms.css_name);html.appendChild(icon_html);}
return html;}
function remove_user_name_link(user_node){var parent=user_node.get('parentNode');parent.removeChild(user_node);}
function get_next_subscriber_node(subscription){var full_name=subscription.get('person').get('full_display_name');var can_be_unsubscribed=subscription.can_be_unsubscribed_by_user();var nodes_by_name={};var unsubscribables=[];var not_unsubscribables=[];var all_subscribers=Y.all('#subscribers-links div');if(all_subscribers.size()>0){all_subscribers.each(function(sub_link){if(sub_link.getAttribute('id')!='temp-username'){var sub_link_name=sub_link.one('a').getAttribute('name');nodes_by_name[sub_link_name]=sub_link;if(sub_link.one('img.unsub-icon')){unsubscribables.push(sub_link_name);}else{not_unsubscribables.push(sub_link_name);}}});if(can_be_unsubscribed){unsubscribables.push(full_name);}else{not_unsubscribables.push(full_name);}
unsubscribables.sort();not_unsubscribables.sort();}else{return;}
var i;if((!unsubscribables&&!not_unsubscribables)||(!can_be_unsubscribed&&!not_unsubscribables)||(can_be_unsubscribed&&unsubscribables&&!not_unsubscribables)){return;}else if(can_be_unsubscribed&&!unsubscribables&¬_unsubscribables){return nodes_by_name[not_unsubscribables[0]];}else if(can_be_unsubscribed){for(i=0;i=unsubscribables.length){return nodes_by_name[not_unsubscribables[0]];}}}}else if(!can_be_unsubscribed){for(i=0;i ',' ',' Other Display Name ',' '].join(''));link_node.one('img').set('src',img_src);link_node.replaceChild(document.createTextNode(display_name),link_node.one('span'));var subscribers=Y.one('#subscribers-links');var next=get_next_subscriber_node(subscription);if(next){subscribers.insertBefore(link_node,next);}else{var none_subscribers=Y.one('#none-subscribers');if(none_subscribers){var none_parent=none_subscribers.get('parentNode');none_parent.removeChild(none_subscribers);}
subscribers.appendChild(link_node);}
Y.bugs.portlet.fire('bugs:nameloaded',subscription);}
function set_none_for_empty_subscribers(){var subscriber_list=Y.one('#subscribers-links');if(!Y.Lang.isValue(subscriber_list.one('div'))&&!Y.Lang.isValue(Y.one('#none-subscribers'))){var none_div=Y.Node.create('None
');subscriber_list.appendChild(none_div);}
var dup_list=Y.one('#subscribers-from-duplicates');if(Y.Lang.isValue(dup_list)&&!Y.Lang.isValue(dup_list.one('div'))){var parent=dup_list.get('parentNode');parent.removeChild(dup_list);}}
function set_subscription_link_parent_class(user_link,subscribed,dupe_subscribed){var parent=user_link.get('parentNode');if(subscribed){parent.removeClass('subscribed-false');parent.addClass('subscribed-true');}else{parent.removeClass('subscribed-true');parent.addClass('subscribed-false');}
if(dupe_subscribed){parent.removeClass('dup-subscribed-false');parent.addClass('dup-subscribed-true');}else{parent.removeClass('dup-subscribed-true');parent.addClass('dup-subscribed-false');}}
function unsubscribe_user_via_icon(icon,subscription){icon.set('src','/@@/spinner');var icon_parent=icon.get('parentNode');var user_uri=get_user_uri_from_icon(icon);var person=new Y.lp.Subscriber({uri:user_uri,subscriber_ids:subscriber_ids});subscription.set('person',person);var is_dupe;var icon_parent_div=icon_parent.get('parentNode');var dupe_id='dupe-'+person.get('css_name');if(icon_parent_div.get('id')==dupe_id){is_dupe=true;}else{is_dupe=false;}
var error_handler=new LP.client.ErrorHandler();error_handler.clearProgressUI=function(){icon.set('src','/@@/remove');var unsubscribe_icon=Y.one('#unsubscribe-icon-'+person.get('css_name'));unsubscribe_icon.on('click',function(e){e.halt();unsubscribe_user_via_icon(e.target,subscription);});};error_handler.showError=function(error_msg){var flash_node=Y.one('.'+person.get('css_name'));Y.lp.display_error(flash_node,error_msg);};var subscription_link=subscription.get('link');var config={on:{success:function(client){icon_parent.removeChild(icon);var anim=Y.lazr.anim.green_flash({node:icon_parent_div});anim.on('end',function(e){remove_user_name_link(icon_parent_div);set_none_for_empty_subscribers();var person_link=Y.one('.'+person.get('css_name'));if(Y.Lang.isNull(person_link)&&subscription.is_current_user_subscribing()){subscription.disable_spinner('Subscribe');set_subscription_link_parent_class(subscription_link,false,false);subscription.set('is_direct',false);subscription.set('has_dupes',false);}else{if(is_dupe){set_subscription_link_parent_class(subscription_link,true,false);subscription.set('is_direct',true);subscription.set('has_dupes',false);}else{set_subscription_link_parent_class(subscription_link,false,true);subscription.set('is_direct',false);subscription.set('has_dupes',true);}}});anim.run();},failure:error_handler.getFailureHandler()}};if(!subscription.is_current_user_subscribing()){config.parameters={person:LP.client.get_absolute_uri(user_uri)};}
if(is_dupe){lp_client.named_post(bug_repr.self_link,'unsubscribeFromDupes',config);}else{lp_client.named_post(bug_repr.self_link,'unsubscribe',config);}}
function subscribe_current_user(subscription){subscription.enable_spinner('Subscribing...');var subscription_link=subscription.get('link');var subscriber=subscription.get('subscriber');var error_handler=new LP.client.ErrorHandler();error_handler.clearProgressUI=function(){subscription.disable_spinner();};error_handler.showError=function(error_msg){Y.lp.display_error(subscription_link,error_msg);};var config={on:{success:function(client){subscription.disable_spinner('Unsubscribe');if(subscription.has_duplicate_subscriptions()){set_subscription_link_parent_class(subscription_link,true,true);}else{set_subscription_link_parent_class(subscription_link,true,false);}
var empty_subscribers=Y.one("#none-subscribers");if(empty_subscribers){var parent=empty_subscribers.get('parentNode');parent.removeChild(empty_subscribers);}
add_user_name_link(subscription);var flash_node=Y.one('.'+subscriber.get('css_name'));var anim=Y.lazr.anim.green_flash({node:flash_node});anim.run();},failure:error_handler.getFailureHandler()},parameters:{person:LP.client.get_absolute_uri(subscriber.get('escaped_uri'))}};lp_client.named_post(bug_repr.self_link,'subscribe',config);}
function unsubscribe_current_user(subscription){subscription.enable_spinner('Unsubscribing...');var subscription_link=subscription.get('link');var subscriber=subscription.get('subscriber');var error_handler=new LP.client.ErrorHandler();error_handler.clearProgressUI=function(){subscription.disable_spinner();};error_handler.showError=function(error_msg){Y.lp.display_error(subscription_link,error_msg);};var config={on:{success:function(client){if(subscription.is_direct_subscription()&&subscription.has_duplicate_subscriptions()){subscription.disable_spinner();set_subscription_link_parent_class(subscription_link,false,true);subscription.set('is_direct',false);}else if(subscription.is_direct_subscription()&&!subscription.has_duplicate_subscriptions()){subscription.disable_spinner('Subscribe');set_subscription_link_parent_class(subscription_link,false,false);subscription.set('is_direct',false);}else{subscription.disable_spinner('Subscribe');set_subscription_link_parent_class(subscription_link,false,false);subscription.set('has_dupes',false);}
var flash_node=Y.one('.'+subscriber.get('css_name'));var anim=Y.lazr.anim.green_flash({node:flash_node});anim.on('end',function(e){remove_user_name_link(flash_node);set_none_for_empty_subscribers();});anim.run();},failure:error_handler.getFailureHandler()}};if(subscription.is_direct_subscription()){lp_client.named_post(bug_repr.self_link,'unsubscribe',config);}else{lp_client.named_post(bug_repr.self_link,'unsubscribeFromDupes',config);}}
bugs.setup_bugtask_row=function(conf){if(Y.UA.ie){return;}
var tr=Y.one('#'+conf.row_id);var bugtarget_content=Y.one('#bugtarget-picker-'+conf.row_id);var status_content=tr.one('.status-content');var importance_content=tr.one('.importance-content');var assignee_content=Y.one('#assignee-picker-'+conf.row_id);var milestone_content=tr.one('.milestone-content');if(status_content===null){return;}
if(Y.Lang.isValue(LP.client.cache.bug)&&Y.Lang.isValue(LP.client.cache.bug.duplicate_of_link)){status_content.on('click',function(e){e.halt();});importance_content.on('click',function(e){e.halt();});return;}
if((LP.client.links.me!==undefined)&&(LP.client.links.me!==null)){if(Y.Lang.isValue(bugtarget_content)){if(conf.target_is_product){if(Y.UA.webkit){bugtarget_content.replaceChild(Y.DOM.create(' '),bugtarget_content.one('.yui-activator-act'));}else{var bugtarget_picker=Y.lp.picker.addPickerPatcher('Product',conf.bugtask_path,"target_link",bugtarget_content.get('id'),false,false,{"step_title":"Search products","header":"Change product"});}}}
if(conf.user_can_edit_status){var status_choice_edit=new Y.ChoiceSource({contentBox:status_content,value:conf.status_value,title:'Change status to',items:conf.status_widget_items,elementToFlash:status_content.get('parentNode'),backgroundColor:tr.hasClass('highlight')?'#FFFF99':'#FFFFFF'});status_choice_edit.showError=function(err){Y.lp.display_error(null,err);};status_choice_edit.on('save',function(e){var cb=status_choice_edit.get('contentBox');Y.Array.each(conf.status_widget_items,function(item){if(item.value==status_choice_edit.get('value')){cb.addClass(item.css_class);}else{cb.removeClass(item.css_class);}});Y.one(document.getElementById(conf.prefix+'.status')).set('value',status_choice_edit.get('value'));});status_choice_edit.plug({fn:Y.lp.client.plugins.PATCHPlugin,cfg:{patch:'status',resource:conf.bugtask_path}});status_choice_edit.render();}
if(conf.user_can_edit_importance){var importance_choice_edit=new Y.ChoiceSource({contentBox:importance_content,value:conf.importance_value,title:'Change importance to',items:conf.importance_widget_items,elementToFlash:importance_content.get('parentNode'),backgroundColor:tr.hasClass('highlight')?'#FFFF99':'#FFFFFF'});importance_choice_edit.showError=function(err){Y.lp.display_error(null,err);};importance_choice_edit.on('save',function(e){var cb=importance_choice_edit.get('contentBox');Y.Array.each(conf.importance_widget_items,function(item){if(item.value==importance_choice_edit.get('value')){cb.addClass(item.css_class);}else{cb.removeClass(item.css_class);}});Y.one(document.getElementById(conf.prefix+'.importance')).set('value',importance_choice_edit.get('value'));});importance_choice_edit.plug({fn:Y.lp.client.plugins.PATCHPlugin,cfg:{patch:'importance',resource:conf.bugtask_path}});importance_choice_edit.render();}}
if(Y.Lang.isValue(milestone_content)&&conf.user_can_edit_milestone){var milestone_choice_edit=new Y.NullChoiceSource({contentBox:milestone_content,value:conf.milestone_value,title:'Target to milestone',items:conf.milestone_widget_items,elementToFlash:milestone_content.get('parentNode'),backgroundColor:tr.hasClass('highlight')?'#FFFF99':'#FFFFFF',clickable_content:false});milestone_choice_edit.showError=function(err){Y.lp.display_error(null,err);};milestone_choice_edit.plug({fn:Y.lp.client.plugins.PATCHPlugin,cfg:{patch:'milestone_link',resource:conf.bugtask_path}});milestone_choice_edit.after('save',function(){var new_value=milestone_choice_edit.get('value');if(Y.Lang.isValue(new_value)){milestone_content.one('.value').setAttribute('href',new_value.replace('/api/beta',''));}
var inline_combo=Y.one(document.getElementById(conf.prefix+'.milestone'));if(Y.Lang.isValue(inline_combo)){inline_combo.set('value',null);Y.Array.each(milestone_choice_edit.get('items'),function(item){if(item.value==milestone_choice_edit.get('value')){inline_combo.all('option').each(function(opt){if(opt.get('innerHTML')==item.name){opt.set('selected',true);}});}});}
milestone_choice_edit._uiClearWaiting();});milestone_content.one('.nulltext').on('click',milestone_choice_edit.onClick,milestone_choice_edit);milestone_choice_edit.render();}
if(Y.Lang.isValue(assignee_content)){var assignee_picker=Y.lp.picker.addPickerPatcher('ValidAssignee',conf.bugtask_path,"assignee_link",assignee_content.get('id'),true,true,{"step_title":"Search for people or teams","header":"Change assignee","remove_button_text":"Remove assignee","null_display_value":"Unassigned"});assignee_picker.render();}};bugs.setup_me_too=function(user_is_affected,others_affected_count){if(Y.UA.ie){return;}
var me_too_content=Y.one('#affectsmetoo');var me_too_edit=new MeTooChoiceSource({contentBox:me_too_content,value:user_is_affected,elementToFlash:me_too_content,editicon:".dynamic img.editicon",others_affected_count:others_affected_count});me_too_edit.render();};function MeTooChoiceSource(){MeTooChoiceSource.superclass.constructor.apply(this,arguments);}
MeTooChoiceSource.NAME='metoocs';MeTooChoiceSource.NS='metoocs';MeTooChoiceSource.ATTRS={title:{value:'Does this bug affect you?'},items:{value:[{name:'Yes, it affects me',value:true,disabled:false},{name:"No, it doesn't affect me",value:false,disabled:false}]},others_affected_count:{value:null}};bugs._MeTooChoiceSource=MeTooChoiceSource;Y.extend(MeTooChoiceSource,Y.ChoiceSource,{initializer:function(){var widget=this;this.error_handler=new LP.client.ErrorHandler();this.error_handler.clearProgressUI=function(){widget._uiClearWaiting();};this.error_handler.showError=function(error_msg){widget.showError(error_msg);};var others_affected_count=this.get('others_affected_count');var source_names=this._getSourceNames(others_affected_count);Y.each(this.get('items'),function(item){if(item.value in source_names){item.source_name=source_names[item.value];}});},_getSourceNames:function(others_affected_count){var source_names={};if(others_affected_count==1){source_names[true]=('This bug affects you and 1 other person');}
else if(others_affected_count>1){source_names[true]=('This bug affects you and '+
others_affected_count+' other people');}
else{source_names[true]='This bug affects you';}
if(others_affected_count==1){source_names[false]=('This bug affects 1 person, but not you');}
else if(others_affected_count>1){source_names[false]=('This bug affects '+others_affected_count+' people, but not you');}
else{source_names[false]="This bug doesn't affect you";}
return source_names;},showError:function(err){Y.lp.display_error(null,err);},render:function(){MeTooChoiceSource.superclass.render.apply(this,arguments);this.get('boundingBox').setStyle('display','inline');this.get('contentBox').one('.static').addClass('unseen');this.get('contentBox').one('.dynamic').removeClass('unseen');},_saveData:function(){this._uiSetWaiting();var value=this.getInput();var client=new LP.client.Launchpad();var widget=this;var config={on:{success:function(entry){widget._uiClearWaiting();MeTooChoiceSource.superclass._saveData.call(widget,value);},failure:this.error_handler.getFailureHandler()},parameters:{affected:value}};client.named_post(LP.client.cache.bug.self_link,'markUserAffected',config);}});function check_can_be_unsubscribed(subscription){var error_handler=new LP.client.ErrorHandler();error_handler.showError=function(error_msg){Y.lp.display_error(Y.one('.menu-link-addsubscriber'),error_msg);};var config={on:{success:function(result){var is_team=result.get('is_team');subscription.set('is_team',is_team);var final_config={on:{success:function(result){var team_member=false;for(var i=0;i"+build.arch_tag+"");new_link.setAttribute("href",build_href);new_link.setAttribute("title",build.title);td_elem.appendChild(new_link);});}}
if(td_ui_changed){var anim=Y.lazr.anim.green_flash({node:td_elem});anim.run();}});},parameterEvaluatorFunction:function(table_node){var td_list=table_node.all('td.build_status');var tds_needsbuild=td_list.filter(".NEEDSBUILD");var tds_building=td_list.filter(".BUILDING");var tds_fullybuilt_pending=td_list.filter(".FULLYBUILT_PENDING");if(tds_needsbuild.size()===0&&tds_building.size()===0&&tds_fullybuilt_pending.size()===0){return null;}
var source_ids=[];var appendSourceIdForTD=function(node){var elem_id=node.get('id');var source_id=elem_id.replace('pubstatus','');source_ids.push(source_id);};Y.each(tds_needsbuild,appendSourceIdForTD);Y.each(tds_building,appendSourceIdForTD);Y.each(tds_fullybuilt_pending,appendSourceIdForTD);if(source_ids.length===0){return null;}else{return{source_ids:"["+source_ids.join(',')+"]"};}},stopUpdatesCheckFunction:function(table_node){var td_list=table_node.all('td.build_status');return(td_list.filter(".NEEDSBUILD").size()===0&&td_list.filter(".BUILDING").size()===0&&td_list.filter(".FULLYBUILT_PENDING").size()===0);}};Y.on("domready",function(){var table=Y.one('table#packages_list');if(table!==null){source_package_table_dynamic_update_config.uri=LP.client.cache.context.self_link;table.plug(Y.lp.DynamicDomUpdater,source_package_table_dynamic_update_config);}});},"0.1",{"requires":["node","lazr.anim","anim","soyuz.dynamic_dom_updater"]});
// soyuz/lp_dynamic_dom_updater-min.js
YUI.add('soyuz.dynamic_dom_updater',function(Y){var lp=Y.namespace('lp');var DomUpdater=function(config){DomUpdater.superclass.constructor.apply(this,arguments);};DomUpdater.NAME='domupdater';DomUpdater.NS='updater';DomUpdater.ATTRS={domUpdateFunction:{value:null}};Y.extend(DomUpdater,Y.Plugin.Base,{update:function(update_data){Y.log("Updating Dom subtree for "+this.get("host"),"info","DomUpdater");var domUpdateFunction=this.get("domUpdateFunction");if(domUpdateFunction!==null){domUpdateFunction(this.get("host"),update_data);}}});Y.lp.DomUpdater=DomUpdater;DynamicDomUpdater=function(config){DynamicDomUpdater.superclass.constructor.apply(this,arguments);};DynamicDomUpdater.NAME='dynamicdomupdater';DynamicDomUpdater.NS='updater';DynamicDomUpdater.ATTRS={uri:{value:null},lp_client:{value:null},api_method_name:{value:null},parameterEvaluatorFunction:{value:null},interval:{value:60000},stopUpdatesCheckFunction:{value:function(data){return false;}},long_processing_time:{value:5000},short_processing_time:{value:1000}};Y.extend(DynamicDomUpdater,DomUpdater,{initializer:function(){Y.log("Initializing updater for "+this.get("host")+" with an interval of "+this.get("interval")+"ms.","info","LPDynamicDomUpdater");this._lp_api_config={on:{success:Y.bind(this._handleSuccess,this),failure:Y.bind(this._handleFailure,this)}};this._actual_interval=this.get('interval');if(null===this.get("lp_client")){this.set("lp_client",new LP.client.Launchpad());}
setTimeout(Y.bind(this.dynamicUpdate,this),this._actual_interval);},dynamicUpdate:function(){Y.log("Starting update for "+this.get("host"),"info","LP.DynamicDomUpdater");var uri=this.get("uri");var api_method_name=this.get("api_method_name");if(this.get("stopUpdatesCheckFunction")(this.get("host"))){Y.log("Cancelling updates for "+this.get("host")+"after stopUpdatesCheckFunction returned true.","info","LP DynamicDomUpdater");return;}
var parameterEvaluatorFunction=this.get("parameterEvaluatorFunction");if(parameterEvaluatorFunction!==null){this._lp_api_config.parameters=parameterEvaluatorFunction(this.get("host"));}
if(uri){if(api_method_name){this.get("lp_client").named_get(uri,api_method_name,this._lp_api_config);}
else{this.get("lp_client").get(uri,this._lp_api_config);}}
this._request_start=new Date().getTime();},_handleSuccess:function(data){var elapsed_time=new Date().getTime()-this._request_start;Y.log(["Data received for ",this.get("host")," after ",elapsed_time,"ms."].join(""),"info","LP.DynamicDomUpdater");this.update(data);var actual_interval_updated=false;if(elapsed_time>this.get('long_processing_time')){this._actual_interval*=2;actual_interval_updated=true;}else if(elapsed_time=config_interval){this._actual_interval=new_actual_interval;actual_interval_updated=true;}else if(this._actual_interval>config_interval){this._actual_interval=config_interval;actual_interval_updated=true;}}
if(actual_interval_updated){Y.log("Actual poll interval updated to "+
this._actual_interval+"ms.");}
setTimeout(Y.bind(this.dynamicUpdate,this),this._actual_interval);},_handleFailure:function(id,request){Y.fail("LP.DynamicDomUpdater for "+this.get("host")+" failed to get dynamic data.");}});Y.lp.DynamicDomUpdater=DynamicDomUpdater;},"0.1",{"requires":["node","plugin"]});
// soyuz/archivesubscribers_index-min.js
YUI.add('soyuz.archivesubscribers_index',function(Y){var soyuz=Y.namespace('soyuz');Y.soyuz.setup_archivesubscribers_index=function(){if(Y.Lang.isNull(Y.one('p.error.message'))){var add_subscriber_row=Y.one('#archive-subscribers .add-subscriber');add_subscriber_row.setStyle('display','none');var subscribers=Y.one('#subscribers');if(Y.Lang.isObject(Y.one('#no-subscribers'))){subscribers.setStyle('display','none');}}
var placeholder=Y.one('#add-subscriber-placeholder');placeholder.set('innerHTML','Add access ');function show_add_subscriber(e){e.preventDefault();subscribers.setStyle('display','block');add_subscriber_row.setStyle('display','table-row');}
Y.on('click',show_add_subscriber,'#add-subscriber-placeholder a');};},"0.1",{"requires":["oop","node","event"]});
// soyuz/base-min.js
YUI.add('soyuz-base',function(Y){var soyuz=Y.namespace('soyuz');soyuz.makeFailureNode=function(text,handler){var failure_message=Y.Node.create('');failure_message.addClass('update-failure-message');var message=Y.Node.create('');message.set('innerHTML',text);failure_message.appendChild(message);var retry_link=Y.Node.create('');retry_link.addClass('update-retry');retry_link.set('href','');retry_link.set('innerHTML','Retry');retry_link.on('click',handler);failure_message.appendChild(retry_link);return failure_message;};soyuz.makeInProgressNode=function(text){var in_progress_message=Y.Node.create('');var message=Y.Node.create('');message.set('innerHTML',text);in_progress_message.addClass('update-in-progress-message');in_progress_message.appendChild(message);return in_progress_message;};},"0.1",{"requires":["node"]});
// lp/dragscroll-min.js
DragScrollEventHandler=function(){this.dragging=false;this.last_position=null;this.event_listeners=[];}
DragScrollEventHandler.prototype={activate:function(){this._addEventListener("mousedown",this._startDragScroll);this._addEventListener("mouseup",this._stopDragScroll);this._addEventListener("mouseout",this._stopDragScroll);this._addEventListener("mousemove",this._dragScroll);this._setGrabCursor();},deactivate:function(){document.removeEventListener("mousedown",this._startDragScroll,false);this._removeEventListeners();this._unsetCursor();},_addEventListener:function(event_type,action){var self=this;var event_listener=function(e){action.call(self,e)};var event_args=[event_type,event_listener,false];this.event_listeners.push(event_args);document.addEventListener.apply(document,event_args);},_removeEventListeners:function(){for(var i=0;i1){hiderWrapper.appendChild(collapsibles[i].childNodes[1]);}}else{hiderWrapper.appendChild(collapsibles[i].childNodes[0]);}}
collapsibles[i].appendChild(hiderWrapper);collapsibles[i].insertBefore(collapsedDescription,hiderWrapper);}}
function toggleFoldable(e){var ELEMENT_NODE=1;var node=this;while(node.nextSibling){node=node.nextSibling;if(node.nodeType!=ELEMENT_NODE){continue;}
if(node.className.indexOf('foldable')==-1){continue;}
if(node.style.display=='none'){node.style.display='inline';}else{node.style.display='none';}}}
function activateFoldables(){var included=getElementsByTagAndClassName('span','foldable',document);var quoted=getElementsByTagAndClassName('span','foldable-quoted',document);var elements=concat(included,quoted);for(var i=0;i]+>/gi,""));}
function writeTextIntoPluralTranslationFields(from_id,to_id_pattern,nplurals){for(var x=1;x'+response.statusText+''+response.responseText+' '+''));};var show_hide_buttons=function(){var link=content_box.one('.yui-activator-data-box a');if(remove_button){if(link===null||!show_remove_button){remove_button.addClass('yui-picker-hidden');}else{remove_button.removeClass('yui-picker-hidden');}}
if(assign_me_button){if(link!==null&&link.get('href').indexOf(LP.client.links.me+'/')!=-1){assign_me_button.addClass('yui-picker-hidden');}else{assign_me_button.removeClass('yui-picker-hidden');}}};var save=function(picker_result){activator.renderProcessing();var success_handler=function(entry){var success_message_node=null;var xhtml=Y.Node.create(entry);var current_field=null;xhtml.all('dl *').each(function(element){if(element.get('tagName')=='DT'){current_field=element.get('innerHTML');}else if(element.get('tagName')=='DD'){if(current_field==attribute_name){success_message_node=element.one('span');}else if(current_field=='self_link'){picker._resource_uri=element.get('innerHTML');}}});activator.renderSuccess(success_message_node);show_hide_buttons();};var patch_payload={};patch_payload[attribute_name]=LP.client.get_absolute_uri(picker_result.api_uri);var client=new LP.client.Launchpad();client.patch(picker._resource_uri,patch_payload,{accept:'application/xhtml+xml',on:{success:success_handler,failure:failure_handler}});};var assign_me=function(){picker.hide();save({image:'/@@/person',title:'Me',api_uri:LP.client.links.me});};var remove=function(){picker.hide();activator.renderProcessing();var success_handler=function(entry){activator.renderSuccess(Y.Node.create(null_display_value));show_hide_buttons();};var patch_payload={};patch_payload[attribute_name]=null;var client=new LP.client.Launchpad();client.patch(picker._resource_uri,patch_payload,{on:{success:success_handler,failure:failure_handler}});};var picker=Y.lp.picker.create(vocabulary,save,config);picker._resource_uri=resource_uri;var extra_buttons=Y.Node.create('
');var remove_button,assign_me_button;if(show_remove_button){remove_button=Y.Node.create(''+
remove_button_text+' ');remove_button.on('click',remove);extra_buttons.appendChild(remove_button);}
if(show_assign_me_button){assign_me_button=Y.Node.create(''+'Assign Me ');assign_me_button.on('click',assign_me);extra_buttons.appendChild(assign_me_button);}
picker.set('footer_slot',extra_buttons);activator.subscribe('act',function(e){picker.show();});activator.render();show_hide_buttons();return picker;};Y.lp.picker.create=function(vocabulary,save,config){if(Y.UA.ie){return;}
if(config!==undefined){var header='Choose an item.';if(config.header!==undefined){header=config.header;}
var step_title="Enter search terms";if(config.step_title!==undefined){step_title=config.step_title;}}
if(typeof vocabulary!='string'){throw new TypeError("vocabulary argument for Y.lp.picker.create() must be a "+"string: "+vocabulary);}
var new_config=Y.merge(config,{align:{points:[Y.WidgetPositionExt.CC,Y.WidgetPositionExt.CC]},progressbar:true,progress:100,headerContent:""+header+" ",steptitle:step_title,zIndex:1000,visible:false});var picker=new Y.Picker(new_config);picker.subscribe('save',function(e){Y.log('Got save event.');save(e.details[Y.Picker.SAVE_RESULT]);});picker.subscribe('cancel',function(e){Y.log('Got cancel event.');});var search_handler=function(e){Y.log('Got search event:'+Y.dump(e.details));var search_text=e.details[0];var selected_batch=e.details[1]||0;var start=BATCH_SIZE*selected_batch;var client=new LP.client.Launchpad();var success_handler=function(ignore,response,args){var entry=Y.JSON.parse(response.responseText);var total_size=entry.total_size;var start=entry.start;var results=entry.entries;if(total_size>(MAX_BATCHES*BATCH_SIZE)){picker.set('error','Too many matches. Please try to narrow your search.');picker.set('results',[{}]);picker.set('batches',[]);}else{picker.set('results',results);if(e.details[1]===undefined){var batches=[];var stop=Math.ceil(total_size/BATCH_SIZE);if(stop>1){for(var i=0;i ');var anchor=Y.Node.create(' ');anchor.appendChild(icon);var span=Y.Node.create(' ');var legend_children=legend.get('children');var len;if(Y.Lang.isValue(legend_children)){len=legend_children.size?legend_children.size():legend_children.length;}else{len=0;}
if(len>0){Y.each(legend_children,function(child_node){if(child_node.get('tagName')=='A'){new_node=Y.Node.create(child_node.get('innerHTML'));span.appendChild(new_node);legend.removeChild(child_node);}else{span.appendChild(child_node);}});}else{span.set('innerHTML',legend.get('innerHTML'));legend.set('innerHTML','');}
anchor.appendChild(span);legend.appendChild(anchor);var wrapper_div=Y.Node.create('
');collapsible.removeChild(legend);var first_child=collapsible.one(':first-child');while(Y.Lang.isValue(first_child)){wrapper_div.appendChild(first_child);first_child=collapsible.one(':first-child');}
collapsible.appendChild(legend);collapsible.appendChild(wrapper_div);if(collapsible.hasClass('collapsed')){collapsible.removeClass('collapsed');var slide_in=Y.lazr.effects.slide_in(wrapper_div);slide_in.run();icon.set('src','/@@/treeCollapsed');}
anchor.on('click',function(e){Y.lp.toggle_collapsible(collapsible);});});};},"0.1",{"requires":["cookie","lazr.effects"]});var VOID_URL='_:void(0);'.replace('_','javascript');function registerLaunchpadFunction(func){YUI().use('node',function(Y){Y.on('load',function(e){func();},window);});}
function toggleExpandableTableRow(element_id){var row=document.getElementById(element_id);var view_icon=document.getElementById(element_id+"-arrow");if(row.style.display=="table-row"){row.style.display="none";view_icon.setAttribute("src","/@@/treeCollapsed");}else{row.style.display="table-row";view_icon.setAttribute("src","/@@/treeExpanded");}
return false;}
function toggleExpandableTableRows(class_name){var view_icon=document.getElementById(class_name+"-arrow");var all_page_tags=document.getElementsByTagName("*");for(i=0;i): '+e);});}
break;}}}
function popup_window(url,name,width,height){var iframe=document.getElementById('popup_iframe_'+name);if(!iframe.src||iframe.src==VOID_URL){iframe.style.width=width+'px';iframe.style.height=height+'px';iframe.style.position='absolute';iframe.style.background='white';iframe.src=url;}
iframe.style.display='inline';}
function selectWidget(widget_name,event){if(event&&(event.keyCode==9||event.keyCode==13)){return;}
document.getElementById(widget_name).checked=true;}
function switchBugBranchFormAndWhiteboard(id){var div=document.getElementById('bugbranch'+id);var wb=document.getElementById('bugbranch'+id+'-wb');if(div.style.display=="none"){if(wb!==null){wb.style.display="none";}
div.style.display="block";document.getElementById('field'+id+'.actions.update').focus();document.getElementById('field'+id+'.whiteboard').focus();}else{if(wb!==null){wb.style.display="block";}
div.style.display="none";}
return false;}
function switchSpecBranchFormAndSummary(id){var div=document.getElementById('specbranch'+id);var wb=document.getElementById('specbranch'+id+'-summary');if(div.style.display=="none"){if(wb!==null){wb.style.display="none";}
div.style.display="block";document.getElementById('field'+id+'.actions.change').focus();document.getElementById('field'+id+'.summary').focus();}else{if(wb!==null){wb.style.display="block";}
div.style.display="none";}
return false;}
function updateField(field,enabled)
{field.disabled=!enabled;}
// lp/mapping-min.js
YUI.add('lp.mapping',function(Y){var mapping=Y.namespace('lp.mapping');mapping.RETURN_FALSE=function(){return false;};mapping.RETURN_NULL=function(){return null;};var gBrowserIsCompatible=mapping.RETURN_FALSE;var gDownloadUrl=mapping.RETURN_NULL;mapping.has_gmaps=(typeof(GBrowserIsCompatible)=='function');if(mapping.has_gmaps){gBrowserIsCompatible=GBrowserIsCompatible;gDownloadUrl=GDownloadUrl;}
mapping.setMarkersInfoWindow=function(data,map,required_bounds,limit){var xml=GXml.parse(data);var markers=xml.documentElement.getElementsByTagName("participant");var participant=null;function attrToProp(attr){participant[attr.name]=attr.value;}
limit=typeof(limit)=='number'?limit:markers.length;if(markers.length','{displayname} ({name}) ','{logo_html} ','Local time: {local_time}'].join(""),participant));map.addOverlay(marker);}};mapping.setMarkersInfoWindowForSmallMap=function(data,map,limit){var required_bounds=new GLatLngBounds();mapping.setMarkersInfoWindow(data,map,required_bounds,limit);var zoom_level=map.getBoundsZoomLevel(required_bounds);zoom_level=Math.min(4,zoom_level-1);map.setZoom(zoom_level);};mapping.setLocation=function(lat,lng,geoname,tz_name,lat_name,lng_name){Y.one(Y.DOM.byId(lat_name)).set('value',lat);Y.one(Y.DOM.byId(lng_name)).set('value',lng);var spinner=Y.one('#tz_spinner');spinner.set('src','/@@/spinner');function succeeded(){if(request.readyState==4){if(request.responseText){var tz=request.responseJSON.timezoneId;Y.one(Y.DOM.byId(tz_name)).set('value',tz);spinner.set('src','/@@/nospin');}}}
var url='http://ba-ws.geonames.net/timezoneJSON'+'?username='+geoname+'&lat='+lat+'&lng='+lng;var request=new JSONScriptRequest();request.open("GET",url);request.onreadystatechange=succeeded;request.send(null);};mapping.toggleShowSmallMaps=function(checkbox){var is_shown=checkbox.get('checked');Y.lp.launchpad_views.set('small_maps',is_shown);var display=is_shown?'block':'none';var maps=Y.all('.small-map');maps.each(function(map){map.setStyle('display',display);});if(is_shown&&!mapping.has_gmaps){window.location.reload();}};mapping.setupShowSmallMapsControl=function(div_id){var show_small_maps=Y.lp.launchpad_views.get('small_maps');var checkbox=Y.Node.create(' ');checkbox.set('checked',show_small_maps);checkbox.on('click',function(e){mapping.toggleShowSmallMaps(checkbox);});var label_text=Y.Node.create('Display map');var label=Y.Node.create(' ');label.appendChild(checkbox);label.appendChild(label_text);var action_div=Y.one(div_id);action_div.appendChild(label);if(!show_small_maps){mapping.toggleShowSmallMaps(checkbox);}};mapping.getSmallMap=function(div_id,center_lat,center_lng){var mapdiv=Y.DOM.byId(div_id);mapdiv.style.width='400px';var map=new GMap2(mapdiv);var center=new GLatLng(center_lat,center_lng);map.setCenter(center,1);map.setMapType(G_NORMAL_MAP);return map;};mapping.renderPersonMapSmall=function(center_lat,center_lng){mapping.setupShowSmallMapsControl('#person_map_actions');if(!gBrowserIsCompatible()){return;}
var map=mapping.getSmallMap('person_map_div',center_lat,center_lng);map.addControl(new GSmallZoomControl());var center=new GLatLng(center_lat,center_lng);var marker=new GMarker(center);map.addOverlay(marker);};mapping.renderTeamMapSmall=function(center_lat,center_lng){mapping.setupShowSmallMapsControl('#team_map_actions');if(!gBrowserIsCompatible()){return;}
var team_map=mapping.getSmallMap('team_map_div',center_lat,center_lng);gDownloadUrl("+mapdataltd",function(data){mapping.setMarkersInfoWindowForSmallMap(data,team_map);});};mapping.getLargeMap=function(div_id){var mapdiv=Y.DOM.byId(div_id);var mapheight=(parseInt(mapdiv.offsetWidth,10)/16*9);mapheight=Math.min(mapheight,Y.DOM.winHeight()-180);mapheight=Math.max(mapheight,400);mapdiv.style.height=mapheight+'px';var map=new GMap2(mapdiv);map.setMapType(G_HYBRID_MAP);map.addControl(new GLargeMapControl());map.addControl(new GMapTypeControl());map.addControl(new GScaleControl());map.enableScrollWheelZoom();var overview_control=new GOverviewMapControl();map.addControl(overview_control);GEvent.addListener(map,'zoomend',function(old,current){try{if(current<3){overview_control.hide();}else{overview_control.show();}}catch(e){}});return map;};mapping.renderTeamMap=function(min_lat,max_lat,min_lng,max_lng,center_lat,center_lng){if(!gBrowserIsCompatible()){return;}
var team_map=mapping.getLargeMap("team_map_div");var center=new GLatLng(center_lat,center_lng);team_map.setCenter(center,0);var sw=new GLatLng(min_lat,min_lng);var ne=new GLatLng(max_lat,max_lng);var required_bounds=new GLatLngBounds(sw,ne);var zoom_level=team_map.getBoundsZoomLevel(required_bounds);zoom_level=Math.min(G_HYBRID_MAP.getMaximumResolution(),zoom_level-1);team_map.setZoom(zoom_level);gDownloadUrl("+mapdata",function(data){mapping.setMarkersInfoWindow(data,team_map);});};mapping.renderPersonMap=function(center_lat,center_lng,displayname,name,logo_html,geoname,lat_name,lng_name,tz_name,zoom,show_marker){if(!gBrowserIsCompatible()){return;}
var map=mapping.getLargeMap('map_div');var center=new GLatLng(center_lat,center_lng);map.setCenter(center,zoom);var marker=new GMarker(center,{draggable:true});marker.bindInfoWindowHtml(Y.substitute(''+'{displayname} '+'{logo_html} ({name})
',{displayname:displayname,logo_html:logo_html,name:name}),{maxWidth:120});GEvent.addListener(marker,"dragend",function(){var point=marker.getLatLng();mapping.setLocation(point.lat(),point.lng(),geoname,tz_name,lat_name,lng_name);});GEvent.addListener(marker,"dragstart",function(){marker.closeInfoWindow();});map.addOverlay(marker);if(!show_marker){marker.hide();}
GEvent.addListener(map,"zoomend",function(){marker.closeInfoWindow();});GEvent.addListener(map,"click",function(overlay,point){marker.setPoint(point);if(marker.isHidden()){marker.show();map.panTo(point);}
mapping.setLocation(point.lat(),point.lng(),geoname,tz_name,lat_name,lng_name);});};},"0.1",{"requires":["node","dom","substitute","lp"]});
// lp/errors-min.js
YUI.add('lp.errors',function(Y){Y.lp=Y.namespace('lp');var cancel_form_button=function(){var button=Y.Node.create('OK ');button.on('click',function(e){e.preventDefault();error_overlay.hide();});return button;};var error_overlay;var create_error_overlay=function(){if(error_overlay===undefined){error_overlay=new Y.lazr.FormOverlay({headerContent:'Error ',form_header:'',form_content:'',form_submit_button:Y.Node.create(' '),form_cancel_button:cancel_form_button(),centered:true,visible:false});error_overlay.render();}};var maybe_red_flash=function(flash_node,callback)
{if(flash_node){var anim=Y.lazr.anim.red_flash({node:flash_node});anim.on('end',callback);anim.run();}else{callback();}};Y.lp.display_error=function(flash_node,msg){create_error_overlay();maybe_red_flash(flash_node,function(){error_overlay.showError(msg);error_overlay.show();});};var info_overlay;Y.lp.display_info=function(msg){if(info_overlay===undefined){info_overlay=new Y.lazr.PrettyOverlay({centered:true,visible:false});info_overlay.render();}
var content=Y.Node.create('
');content.appendChild(Y.Node.create(msg));var button_div=Y.Node.create('
');var ok_button=Y.Node.create('OK ');ok_button.on('click',function(e){info_overlay.fire('cancel');});button_div.appendChild(ok_button);content.appendChild(button_div);info_overlay.set('bodyContent',content);info_overlay.show();};},"0.1",{"requires":["lazr.formoverlay","lazr.overlay"]});
// lp/calendar-min.js
YUI.add('lp.calendar',function(Y){var lp=Y.namespace('lp');var pad_with_zero=function(num){num_as_string=String(num);if(num_as_string.length==1){num_as_string="0"+num_as_string;}
return num_as_string;};var get_initial_value_for_input=function(date_input_node){var date_match=(/(\d{4})-(\d{1,2})-(\d{2})/g).exec(date_input_node.get('value'));var time_match=(/(\d{2}):(\d{2})/g).exec(date_input_node.get('value'));var initial_value=new Date();if(date_match!==null){initial_value.setFullYear(date_match[1]);initial_value.setMonth(parseInt(date_match[2],10)-1);initial_value.setDate(date_match[3]);if(time_match){initial_value.setHours(time_match[1]);initial_value.setMinutes(time_match[2]);}}
return initial_value;};var create_time_selector_node=function(selected_time){if(selected_time===null){selected_time=new Date();}
var inner_html=['Time ',' ',' : ',' ',' OK ',' ','
'].join("\n");return Y.Node.create(inner_html);};var create_calendar_widget_for_input=function(date_input_node,containing_div_node){var initial_value=get_initial_value_for_input(date_input_node);var calendar_widget=new YAHOO.widget.Calendar("calendar_widget",containing_div_node.get('id'),{title:"Select a date",close:true,pagedate:initial_value,selected:[initial_value.getMonth()+1,initial_value.getDate(),initial_value.getFullYear()].join("/")});var is_datetime_widget=date_input_node.hasClass('withtime');var time_selector_node=null;if(is_datetime_widget){calendar_widget.renderEvent.subscribe(function(type,args,obj){time_selector_node=create_time_selector_node(initial_value);containing_div_node.appendChild(time_selector_node);var ok_button=time_selector_node.one('.lazr-btn');Y.on("click",function(e){calendar_widget.selectEvent.fire();calendar_widget.hide();},ok_button);});}
calendar_widget.selectEvent.subscribe(function(type,args,obj){if(!is_datetime_widget){calendar_widget.hide();}
var selected_dates=calendar_widget.getSelectedDates();var selected_date=selected_dates[0];var value_string=[selected_date.getFullYear(),pad_with_zero(selected_date.getMonth()+1),pad_with_zero(selected_date.getDate())].join("-");if(is_datetime_widget){hours=pad_with_zero(time_selector_node.one('.hours').get('value'));minutes=pad_with_zero(time_selector_node.one('.minutes').get('value'));value_string+=" "+hours+":"+minutes;}
date_input_node.set('value',value_string);},calendar_widget,true);calendar_widget.render();return calendar_widget;};lp.add_calendar_widgets=function(){var date_inputs=Y.all('input.yui2-calendar');if(date_inputs===null){return;}
date_inputs.each(function(date_input){if(date_input.hasClass('calendar-added')){return;}
var parent_node=date_input.ancestor();var choose_link=Y.Node.create('('+'Choose... ) ');parent_node.insertBefore(choose_link,date_input.next());var containing_div_id="calendar_container-"+
date_input.get('id');var containing_div_node=Y.Node.create('
');parent_node.insertBefore(containing_div_node,choose_link.next());date_input.addClass('calendar-added');var calendar_widget=null;Y.on("click",function(e){e.preventDefault();if(calendar_widget===null){calendar_widget=create_calendar_widget_for_input(date_input,containing_div_node);}
calendar_widget.show();},choose_link);});};lp.setup_calendar_widgets=function(){Y.on("domready",lp.add_calendar_widgets);};},"0.1",{"requires":["node"]});
// lp/comment-min.js
YUI.add('lp.comment',function(Y){Y.lp=Y.namespace('lp');var Comment=function(){Comment.superclass.constructor.apply(this,arguments);};Comment.NAME='comment';Comment.ATTRS={};Y.extend(Comment,Y.Widget,{initializer:function(){this.submit_button=this.get_submit();this.comment_input=Y.one('[id="field.comment"]');this.lp_client=new LP.client.Launchpad();this.error_handler=new LP.client.ErrorHandler();this.error_handler.clearProgressUI=bind(this.clearProgressUI,this);this.error_handler.showError=bind(function(error_msg){Y.lp.display_error(this.submit_button,error_msg);},this);this.progress_message=Y.Node.create('Saving... ');},get_submit:function(){return Y.one('[id="field.actions.save"]');},renderUI:function(){this.submit_button.addClass('js-action');this.submit_button.setStyle('display','inline');},validate:function(){return trim(this.comment_input.get('value'))!=='';},set_disabled:function(disabled){this.comment_input.set('disabled',disabled);},add_comment:function(e){e.halt();if(!this.validate()){return;}
this.activateProgressUI('Saving...');this.post_comment(bind(function(message_entry){this.get_comment_HTML(message_entry,bind(this.insert_comment_HTML,this));this._add_comment_success();},this));},_add_comment_success:function(){},post_comment:function(callback){var config={on:{success:callback,failure:this.error_handler.getFailureHandler()},parameters:{content:this.comment_input.get('value')}};this.lp_client.named_post(LP.client.cache.bug.self_link,'newMessage',config);},get_comment_HTML:function(message_entry,callback){var config={on:{success:callback},accept:LP.client.XHTML};this.lp_client.get(message_entry.get('self_link'),config);},insert_comment_HTML:function(message_html){var fieldset=Y.one('#add-comment-form');var comment=Y.Node.create(message_html);fieldset.get('parentNode').insertBefore(comment,fieldset);this.reset_contents();Y.lazr.anim.green_flash({node:comment}).run();},reset_contents:function(){this.clearProgressUI();this.comment_input.set('value','');this.syncUI();},activateProgressUI:function(message){this.progress_message.set('innerHTML',message);this.set_disabled(true);this.submit_button.get('parentNode').replaceChild(this.progress_message,this.submit_button);},clearProgressUI:function(){this.progress_message.get('parentNode').replaceChild(this.submit_button,this.progress_message);this.set_disabled(false);},bindUI:function(){this.comment_input.on('keyup',bind(this.syncUI,this));this.comment_input.on('mouseup',bind(this.syncUI,this));this.submit_button.on('click',bind(this.add_comment,this));},syncUI:function(){this.submit_button.set('disabled',!this.validate());}});Y.lp.Comment=Comment;var CodeReviewComment=function(){CodeReviewComment.superclass.constructor.apply(this,arguments);};CodeReviewComment.NAME='codereviewcomment';Y.extend(CodeReviewComment,Comment,{initializer:function(){this.vote_input=Y.one('[id="field.vote"]');this.review_type=Y.one('[id="field.review_type"]');this.in_reply_to=null;},get_submit:function(){return Y.one('[id="field.actions.add"]');},get_vote:function(){var selected_idx=this.vote_input.get('selectedIndex');var selected=this.vote_input.get('options').item(selected_idx);if(selected.get('value')===''){return null;}
return selected.get('innerHTML');},validate:function(){if(this.get_vote()!==null){return true;}
return CodeReviewComment.superclass.validate.apply(this);},set_disabled:function(disabled){CodeReviewComment.superclass.set_disabled.call(this,disabled);this.vote_input.set('disabled',disabled);this.review_type.set('disabled',disabled);},post_comment:function(callback){var config={on:{success:callback,failure:this.error_handler.getFailureHandler()},parameters:{content:this.comment_input.get('value'),subject:'',review_type:this.review_type.get('value'),vote:this.get_vote()}};if(this.in_reply_to!==null){config.parameters.parent=this.in_reply_to.get('self_link');}
this.lp_client.named_post(LP.client.cache.context.self_link,'createComment',config);},get_comment_HTML:function(comment_entry,callback){fragment_url='comments/'+comment_entry.get('id')+'/+fragment';Y.io(fragment_url,{on:{success:function(id,response){callback(response.responseText);},failure:this.error_handler.getFailureHandler()}});},reply_clicked:function(e){e.halt();var reply_link=LP.client.normalize_uri(e.target.get('href'));var root_url=reply_link.substr(0,reply_link.length-'+reply'.length);var object_url='/api/beta'+root_url;this.activateProgressUI('Loading...');window.scrollTo(0,Y.one('#add-comment').getY());this.lp_client.get(object_url,{on:{success:bind(function(comment){this.set_in_reply_to(comment);this.clearProgressUI();this.syncUI();},this),failure:this.error_handler.getFailureHandler()}});},set_in_reply_to:function(comment){this.in_reply_to=comment;this.comment_input.set('value',comment.get('as_quoted_email'));},reset_contents:function(){this.review_type.set('value','');this.vote_input.set('selectedIndex',0);this.in_reply_to=null;CodeReviewComment.superclass.reset_contents.apply(this);},insert_comment_HTML:function(message_html){var conversation=Y.one('[id=conversation]');var comment=Y.Node.create(message_html);conversation.appendChild(comment);this.reset_contents();Y.lazr.anim.green_flash({node:comment}).run();},renderUI:function(){CodeReviewComment.superclass.renderUI.apply(this);},bindUI:function(){CodeReviewComment.superclass.bindUI.apply(this);this.vote_input.on('keyup',bind(this.syncUI,this));this.vote_input.on('mouseup',bind(this.syncUI,this));this.review_type.on('keyup',bind(this.syncUI,this));this.review_type.on('mouseup',bind(this.syncUI,this));Y.all('a.menu-link-reply').on('click',bind(this.reply_clicked,this));},syncUI:function(){CodeReviewComment.superclass.syncUI.apply(this);var review_type_disabled=(this.get_vote()===null);this.review_type.set('disabled',review_type_disabled);},_add_comment_success:function(){var VOTES_TABLE_PATH='+votes';Y.io(VOTES_TABLE_PATH,{on:{success:function(id,response){var target=Y.one('#votes-target');target.set('innerHTML',response.responseText);var username=LP.client.links.me.substring(2);var new_reviewer=Y.one('#review-'+username);if(Y.lang.isValue(new_reviewer)){var anim=Y.lazr.anim.green_flash({node:new_reviewer});anim.run();}},failure:function(){}}});}});Y.lp.CodeReviewComment=CodeReviewComment;},"0.1",{"requires":["oop","io","widget","node","lp.client.plugins","lp.errors"]});
// registry/timeline-min.js
YUI.add('registry.timeline',function(Y){var module=Y.namespace('registry.timeline');var TIMELINE_GRAPH='timelinegraph';var OBSOLETE_SERIES_STATUS='Obsolete';var getCN=Y.ClassNameManager.getClassName;var C_ZOOM_BOX=getCN(TIMELINE_GRAPH,'zoom-box');var C_ZOOM_IN=getCN(TIMELINE_GRAPH,'zoom-in');var C_ZOOM_OUT=getCN(TIMELINE_GRAPH,'zoom-out');var SECOND_MOUSE_BUTTON=2;var MARGIN_LEFT=20;var MARGIN_TOP=25;var MARGIN_BOTTOM=10;var MILESTONE_RADIUS=5;var RELEASE_RADIUS=5;var ARROW_HEIGHT=10;var ARROW_WIDTH=15;var ANGLE_DEGREES=84;var ANGLE_RADIANS=ANGLE_DEGREES/180*Math.PI;var ANGLE_TANGENT=Math.tan(ANGLE_RADIANS);var FONT_SIZE=1;var LINE_COLOR='darkgreen';var OBSOLETE_SERIES_COLOR='#777777';var MILESTONE_LINE_COLOR='darkgray';var MILESTONE_FILL_COLOR='white';var RELEASE_COLOR='black';var ARROW_COLOR=LINE_COLOR;var ZOOM_JUMPS=1.1;var draw_line=function(canvas_context,points,fill){canvas_context.beginPath();canvas_context.moveTo(points[0].x,points[0].y);Y.each(points.slice(1),function(point,i){canvas_context.lineTo(point.x,point.y);});if(fill===true){canvas_context.fill();}else{canvas_context.stroke();}};Position=function(x,y){this.x=x;this.y=y;};Position.prototype={copy:function(){return new Position(this.x,this.y);}};SeriesLine=function(timeline_graph,series,start){this.timeline_graph=timeline_graph;this.series=series;this.start=start;var tooltip=this.series.status+' Series';if(this.series.is_development_focus){tooltip='Development Focus Series';}
this.labels={};Y.each(this.series.landmarks,function(landmark,i){var landmark_tooltip=landmark.type.charAt(0).toUpperCase()+landmark.type.substr(1);if(Y.Lang.isString(landmark.code_name)){landmark_tooltip+=': '+landmark.code_name;}
var cfg={id:landmark.name};if(Y.Lang.isString(this.timeline_graph.resize_frame)){cfg.second_line=landmark.date;}
this.labels[landmark.name]=this.timeline_graph.make_label(landmark.name,landmark_tooltip,landmark.uri,cfg);},this);this.series_date_label=null;if(!Y.Lang.isString(this.timeline_graph.resize_frame)){for(var i=0;i');label_text.appendChild(document.createTextNode(series.name));this.center_series_label=this.timeline_graph.make_label(label_text,tooltip,this.series.uri,{id:series.name});this.left_series_label=this.timeline_graph.make_label('',tooltip,this.series.uri,{second_line:series.name,id:series.name});this.right_series_label=this.timeline_graph.make_label('',tooltip,this.series.uri,{second_line:series.name,id:series.name});};SeriesLine.prototype={get_length:function(){var length=0;if(this.series.status==OBSOLETE_SERIES_STATUS){length=this.series.landmarks.length*this.timeline_graph.landmark_spacing;}else{length=(this.series.landmarks.length+1)*this.timeline_graph.landmark_spacing;}
return Math.max(length,this.timeline_graph.min_series_line_length);},get_y_spacing:function(){var max_y=0;Y.each(this.series.landmarks,function(landmark,i){var label=this.labels[landmark.name];max_y=Math.max(label.get('offsetHeight'));},this);return max_y+(2*RELEASE_RADIUS)+
this.center_series_label.get('offsetHeight');},draw:function(){var context=this.timeline_graph.canvas_context;var stop=new Position(this.start.x+this.get_length(),this.start.y);var thickness,offset;if(this.series.status==OBSOLETE_SERIES_STATUS){thickness=2;offset=-1;context.fillStyle=OBSOLETE_SERIES_COLOR;}else if(this.series.is_development_focus){thickness=4;offset=-2;context.fillStyle=LINE_COLOR;}else{thickness=1;offset=0;context.fillStyle=LINE_COLOR;}
context.fillRect(this.start.x,this.start.y+offset,stop.x-this.start.x,stop.y-this.start.y+thickness);if(this.series.status!=OBSOLETE_SERIES_STATUS){this.timeline_graph.make_landmark(stop,'arrow');}
var center_position=new Position(this.start.x+(this.get_length()/2),this.start.y-RELEASE_RADIUS);this.timeline_graph.place_label(center_position,this.center_series_label,'center','above');var line_width=this.get_length()*this.timeline_graph.graph_scale;if(line_width ');this.get('contentBox').insertBefore(this.canvas,this.get('contentBox').get('children').item(0));if(Y.Lang.isString(this.resize_frame)){var frame=parent.document.getElementById(this.resize_frame);if(frame===null){Y.log('Frame not found: '+this.resize_frame);}
else{frame.height=height;}}},calculate_landmark_spacing:function(){var max_label_width=0;var series_max_label_width=0;Y.each(this.project_line.series_lines,function(series_line,i){series_max_label_width=Math.max(series_max_label_width,series_line.center_series_label.get('offsetWidth'));Y.each(series_line.labels,function(label,j){this.set_font_size(label);max_label_width=Math.max(max_label_width,label.get('offsetWidth'));},this);},this);this.landmark_spacing=max_label_width+5;this.min_series_line_length=series_max_label_width+5;},set_font_size:function(label){label.setStyle('fontSize',(FONT_SIZE*this.graph_scale)+'em');},scroll_to_last_development_focus_landmark:function(label){var series_line=this.project_line.series_lines[0];var landmark=series_line.series.landmarks[0];if(landmark){var landmark_label=series_line.labels[landmark.name];var date_label_width=0;if(series_line.series_date_label!==null){date_label_width=series_line.series_date_label.get('offsetWidth');}
var scroll_x=series_line.start.x+series_line.get_length()+
ARROW_WIDTH+date_label_width-
Y.DOM.winWidth();scroll_x-=window.scrollX;window.scrollBy(scroll_x,0);}},renderUI:function(){this.zoom_in_button=Y.Node.create(' ');this.zoom_in_button.addClass(C_ZOOM_IN);this.zoom_out_button=Y.Node.create(' ');this.zoom_out_button.addClass(C_ZOOM_OUT);var zoom_box=Y.Node.create('
');zoom_box.addClass(C_ZOOM_BOX);zoom_box.appendChild(this.zoom_in_button);zoom_box.appendChild(this.zoom_out_button);var contentBox=this.get('contentBox');contentBox.appendChild(zoom_box);this.project_line=new ProjectLine(this,this.get('timeline'));},bindUI:function(){this.zoom_in_button.on('click',function(){this.zoom_in();},this);this.zoom_out_button.on('click',function(){this.zoom_out();},this);},syncUI:function(){this.calculate_landmark_spacing();var contentBox=this.get('contentBox');this.recreate_canvas();var dom_canvas=Y.Node.getDOMNode(this.canvas);this.canvas_context=dom_canvas.getContext('2d');this.canvas_context.scale(this.graph_scale,this.graph_scale);this.project_line.draw();},make_label:function(text,tooltip,uri,cfg){if(cfg===undefined){cfg={};}
var label=Y.Node.create('
');if(Y.Lang.isString(cfg.id)){label.set('id',cfg.id);}
var text_node;if(text instanceof Y.Node||text instanceof Text){text_node=text;}else{text_node=document.createTextNode(text);}
if(uri){var link=Y.Node.create(' ');link.appendChild(text_node);link.on('click',function(e){if(e.which!=SECOND_MOUSE_BUTTON){parent.location.href=uri;e.preventDefault();}});link.set('href',uri);label.appendChild(link);}else{var span=Y.Node.create(' ');span.appendChild(text_node);label.appendChild(span);}
label.setStyle('position','absolute');if(tooltip){label.set('title',tooltip);}
if(Y.Lang.isString(cfg.second_line)){var div=Y.Node.create('
');div.appendChild(document.createTextNode(cfg.second_line));label.appendChild(div);}
this.get('contentBox').appendChild(label);return label;},place_label:function(position,label,x_align,y_align){var graph_scale=this.graph_scale;var dom_canvas=Y.Node.getDOMNode(this.canvas);this.set_font_size(label);var label_height=label.get('offsetHeight');var y_align_offset;if(y_align=='above'){y_align_offset=-label_height;}else if(y_align=='below'){y_align_offset=0;}else if(y_align=='middle'){y_align_offset=-(label_height/2);}else{throw"Invalid y_align argument: "+y_align;}
var x_align_offset;if(x_align=='left'){x_align_offset=-label.get('offsetWidth');}else if(x_align=='center'){x_align_offset=-(label.get('offsetWidth')/2);}else if(x_align=='right'){x_align_offset=0;}else{throw"Invalid x_align argument: "+x_align;}
var scaled_position=new Position(position.x*graph_scale+
dom_canvas.offsetLeft+x_align_offset,position.y*graph_scale+
dom_canvas.offsetTop+y_align_offset);label.setStyle('left',scaled_position.x+"px");label.setStyle('top',scaled_position.y+"px");},make_landmark:function(position,type){var context=this.canvas_context;if(type=='milestone'){context.fillStyle=MILESTONE_LINE_COLOR;context.beginPath();context.arc(position.x,position.y,MILESTONE_RADIUS,0,(Math.PI*2),true);context.fill();context.fillStyle=MILESTONE_FILL_COLOR;context.beginPath();context.arc(position.x,position.y,MILESTONE_RADIUS-2,0,(Math.PI*2),true);context.fill();}else if(type=='release'){context.fillStyle=RELEASE_COLOR;context.beginPath();context.arc(position.x,position.y,RELEASE_RADIUS,0,(Math.PI*2),true);context.fill();}else if(type=='arrow'){context.fillStyle=ARROW_COLOR;var point=position.copy();point.x+=3;var path=[point];point=point.copy();point.x-=ARROW_WIDTH/2;point.y-=ARROW_HEIGHT/2;path.push(point);point=point.copy();point.x+=ARROW_WIDTH/4;point.y+=ARROW_HEIGHT/2;path.push(point);point=point.copy();point.x-=ARROW_WIDTH/4;point.y+=ARROW_HEIGHT/2;path.push(point);draw_line(context,path,true);}
else{throw"Unknown landmark type: "+type;}}});},"0.1",{"requires":["oop","node","widget"]});
// registry/milestoneoverlay-min.js
YUI.add('lp.milestoneoverlay',function(Y){Y.log('loading lp.milestoneoverlay');var milestoneoverlay=Y.namespace('lp.milestoneoverlay');var milestone_form;var milestone_form_uri;var series_uri;var next_step;var save_new_milestone=function(data){var parameters={name:data['field.name'][0].toLowerCase(),code_name:data['field.code_name'][0],summary:data['field.summary'][0]};var date_targeted=Y.Lang.trim(data['field.dateexpected'][0]);if(date_targeted!==''){parameters.date_targeted=date_targeted;}
var finish_new_milestone=function(ignore){milestone_form.clearError();milestone_form.hide();milestone_form.get('contentBox').one('form').reset();next_step(parameters);};var client=new LP.client.Launchpad();client.named_post(series_uri,'newMilestone',{parameters:parameters,on:{success:finish_new_milestone,failure:function(ignore,response,args){var error_box=Y.one('#milestone-error');var error_message=''+response.statusText+' '+
response.responseText+'
';milestone_form.showError(error_message);}}});};var setup_milestone_form=function(){var form_submit_button=Y.Node.create(' ');milestone_form=new Y.lazr.FormOverlay({headerContent:'Create Milestone ',form_submit_button:form_submit_button,centered:true,form_submit_callback:save_new_milestone,visible:false});milestone_form.render();milestone_form.loadFormContentAndRender(milestone_form_uri);Y.lp.add_calendar_widgets();milestone_form.show();};show_milestone_form=function(e){if(milestone_form){milestone_form.show();}else{setup_milestone_form();}
e.preventDefault();};milestoneoverlay.attach_widget=function(config){if(Y.UA.ie){return;}
if(config===undefined){throw new Error("Missing attach_widget config for milestoneoverlay.");}
if(config.milestone_form_uri===undefined||config.series_uri===undefined||config.next_step===undefined){throw new Error("attach_widget config for milestoneoverlay has "+"undefined properties.");}
milestone_form_uri=config.milestone_form_uri;series_uri=config.series_uri;next_step=config.next_step;config.activate_node.on('click',show_milestone_form);};},"0.1",{"requires":["dom","node","io-base","lazr.anim","lazr.formoverlay","lp.calendar"]});
// registry/team-min.js
YUI.add('registry.team',function(Y){var module=Y.namespace('registry.team');module.setup_add_member_handler=function(){if(Y.UA.ie){return;}
var config={header:'Add a member',step_title:'Search',picker_activator:'.menu-link-add_member'};Y.lp.picker.create('ValidTeamMember',_add_member,config);};var _add_member=function(selected_person){var box=Y.one('#membership');var spinner=box.query('#add-member-spinner');var addmember_link=box.query('.menu-link-add_member');addmember_link.addClass('unseen');spinner.removeClass('unseen');var disable_spinner=function(){addmember_link.removeClass('unseen');spinner.addClass('unseen');};lp_client=new LP.client.Launchpad();var error_handler=new LP.client.ErrorHandler();error_handler.clearProgressUI=disable_spinner;error_handler.showError=function(error_msg){Y.lp.display_error(addmember_link,error_msg);};addmember_config={on:{success:function(change_and_status){var did_status_change=change_and_status[0];var current_status=change_and_status[1];var members_section,members_ul,count_elem;if(did_status_change===false){disable_spinner();Y.lp.display_info(selected_person.title+' is already '+
current_status.toLowerCase()+' as a member of the team.');return;}
if(current_status=='Invited'){members_section=box.query('#recently-invited');members_ul=box.query('#recently-invited-ul');count_elem=box.query('#invited-member-count');}else if(current_status=='Proposed'){members_section=box.query('#recently-proposed');members_ul=box.query('#recently-proposed-ul');count_elem=box.query('#proposed-member-count');}else if(current_status=='Approved'){members_section=box.query('#recently-approved');members_ul=box.query('#recently-approved-ul');count_elem=box.query('#approved-member-count');}else{Y.lp.display_error(addmember_link,'Unexpected status: '+current_status);return;}
var first_node=members_ul.get('firstChild');var xhtml_person_handler=function(person_html){if(count_elem===null&¤t_status=='Invited'){count_elem=Y.Node.create(''+'1 ');var count_box=Y.one('#membership #membership-counts');count_box.append(Y.Node.create(', '));count_box.append(count_elem);count_box.append(Y.Node.create(' '+'invited members '));}else{var count=count_elem.get('innerHTML');count=parseInt(count,10)+1;count_elem.set('innerHTML',count);}
person_repr=Y.Node.create(''+person_html+' ');members_section.removeClass('unseen');members_ul.insertBefore(person_repr,first_node);anim=Y.lazr.anim.green_flash({node:person_repr});anim.run();disable_spinner();};xhtml_person_config={on:{success:xhtml_person_handler,failure:error_handler.getFailureHandler()},accept:LP.client.XHTML};lp_client.get(selected_person.api_uri,xhtml_person_config);},failure:error_handler.getFailureHandler()},parameters:{reviewer:LP.client.get_absolute_uri(LP.client.links.me),person:LP.client.get_absolute_uri(selected_person.api_uri)}};lp_client.named_post(LP.client.cache.context.self_link,'addMember',addmember_config);};},'0.1',{requires:['node','lazr.anim','lp.picker','lp.errors','lp.client.plugins']});
// registry/milestone_table-min.js
YUI.add('lp.milestonetable',function(Y){Y.log('loading lp.milestonetable');var self=Y.namespace('lp.milestonetable');self._milestone_row_uri_template=null;self._tbody=null;self._prepend_node=function(parent_node,child_node){var children=parent_node.get('children');if(children===null){parent_node.appendChild(child_node);}else{parent_node.insertBefore(child_node,children.item(0));}};self._ensure_table_is_seen=function(tbody){table=tbody.ancestor();table.removeClass('unseen');};self._clear_add_handlers=function(data){data.success_handle.detach();data.failure_handle.detach();};self._on_add_success=function(id,response,data){var row=Y.Node.create(Y.Lang.trim(response.responseText));self._ensure_table_is_seen(data.tbody);self._prepend_node(data.tbody,row);Y.lazr.anim.green_flash({node:row}).run();self._clear_add_handlers(data);};self._on_add_failure=function(id,response,data){var row=Y.Node.create(Y.substitute(''+'Could not retrieve milestone {name} ',data));self._ensure_table_is_seen(data.tbody);self._prepend_node(data.tbody,row);Y.lazr.anim.red_flash({node:row}).run();self._clear_add_handlers(data);};self._setup_milestone_event_data=function(parameters,tbody){var data={name:parameters.name,tbody:tbody};data.success_handle=Y.on('io:success',self._on_add_success,this,data);data.failure_handle=Y.on('io:failure',self._on_add_failure,this,data);return data;};self.get_milestone_row=function(parameters){self._setup_milestone_event_data(parameters,self._tbody);var milestone_row_uri=Y.substitute(self._milestone_row_uri_template,parameters);Y.io(milestone_row_uri);};self.setup=function(config){if(config===undefined){throw new Error("Missing setup config for milestonetable.");}
if(config.milestone_row_uri_template===undefined||config.milestone_rows_id===undefined){throw new Error("Undefined properties in setup config for milestonetable.");}
self._milestone_row_uri_template=config.milestone_row_uri_template;self._tbody=Y.one(config.milestone_rows_id);if(self._tbody===null){throw new Error(Y.substitute("'{milestone_rows_id}' not in page.",config));}};},"0.1",{"requires":["node","io-base","substitute","lazr.anim"]});
// sorttable/sorttable-min.js
var SORT_COLUMN_INDEX;var arrowUp="/@@/arrowUp";var arrowDown="/@@/arrowDown";var arrowBlank="/@@/arrowBlank";function trim(str){return str.replace(/^\s*|\s*$/g,"");}
function sortables_init(){if(!document.getElementsByTagName)return;tbls=document.getElementsByTagName("table");for(ti=0;ti0){var firstRow=table.tHead.rows[0];}else if(table.rows&&table.rows.length>0){var firstRow=table.rows[0];}
if(!firstRow)return;for(var i=0;i
';}
for(var i=0;i0){qs+='&';}
qs+=encodeURIComponent(key)+"="+encodeURIComponent(value);return qs;};LP.client.normalize_uri=function(uri){var host_start=uri.indexOf('//');if(host_start!=-1){var host_end=uri.indexOf('/',host_start+2);return uri.substring(host_end,uri.length);}
var base="/api/beta";if(uri.indexOf(base.substring(1,base.length))===0){return'/'+uri;}
if(uri.indexOf(base)!==0){if(uri.indexOf('/')!==0){uri=base+'/'+uri;}else{uri=base+uri;}}
return uri;};LP.client.get_absolute_uri=function(uri){var location=document.location;uri=LP.client.normalize_uri(uri);return location.protocol+'//'+location.host+uri;};LP.client.get_field_uri=function(base_uri,field_name){base_uri=LP.client.normalize_uri(base_uri);field_name=escape(field_name);if(base_uri.charAt(base_uri.length-1)=='/'){return base_uri+field_name;}else{return base_uri+'/'+field_name;}};LP.client.add_accept=function(config,headers){if(headers===undefined){headers={};}
var accept=config.accept||'application/json';headers.Accept=accept;return headers;};LP.client.start_and_size=function(data,start,size){if(start!==undefined){data=LP.client.append_qs(data,"ws.start",start);}
if(size!==undefined){data=LP.client.append_qs(data,"ws.size",size);}
return data;};LP.client.wrap_resource_on_success=function(ignore,response,args){var client=args[0];var uri=args[1];var old_on_success=args[2];var representation,wrapped;if(old_on_success){var media_type=response.getResponseHeader('Content-Type');if(media_type=='application/json'){representation=Y.JSON.parse(response.responseText);wrapped=client.wrap_resource(uri,representation);return old_on_success(wrapped);}else{return old_on_success(response.responseText);}}};LP.client.HostedFile=function(client,uri,content_type,contents){this.lp_client=client;this.uri=uri;this.content_type=content_type;this.contents=contents;};LP.client.HostedFile.prototype={'lp_save':function(config){var on=config.on;var disposition='attachment; filename="'+this.filename+'"';var hosted_file=this;var args=hosted_file;var y_config={method:"PUT",'on':on,'headers':{"Content-Type":hosted_file.content_type,"Content-Disposition":disposition},'arguments':args,'data':hosted_file.contents};Y.io(LP.client.normalize_uri(hosted_file.uri),y_config);},'lp_delete':function(config){var on=config.on;var hosted_file=this;var args=hosted_file;var y_config={method:"DELETE",on:on,'arguments':args};Y.io(hosted_file.uri,y_config);}};LP.client.Resource=function(){};LP.client.Resource.prototype={'init':function(client,representation,uri){this.lp_client=client;this.lp_original_uri=uri;for(key in representation){if(representation.hasOwnProperty(key)){this[key]=representation[key];}}},'lookup_value':function(key){return this[key];},'follow_link':function(link_name,config){var on=config.on;var uri=this.lookup_value(link_name+'_link');if(uri===undefined){uri=this.lookup_value(link_name+'_collection_link');}
if(uri===undefined){throw new Error("No such link: "+link_name);}
var on_success=on.success;var old_on_failure=on.failure;on.failure=function(ignore,response,args){var client=args[0];var original_url=args[1];if(response.status==LP.client.HTTP_NOT_FOUND||response.status==LP.client.HTTP_SEE_ALSO){var file=new LP.client.HostedFile(client,original_url);return on_success(file);}else if(old_on_failure!==undefined){return old_on_failure(ignore,response,args);}};this.lp_client.get(uri,{on:on});},'named_get':function(operation_name,config){return this.lp_client.named_get(this.lp_original_uri,operation_name,config);},'named_post':function(operation_name,config){return this.lp_client.named_post(this.lp_original_uri,operation_name,config);}};LP.client.Root=function(client,representation,uri){this.init(client,representation,uri);};LP.client.Root.prototype=new LP.client.Resource();LP.client.Collection=function(client,representation,uri){this.init(client,representation,uri);};LP.client.Collection.prototype=new LP.client.Resource();LP.client.Collection.prototype.lp_slice=function(on,start,size){return this.lp_client.get(this.lp_original_uri,{on:on,start:start,size:size});};LP.client.Entry=function(client,representation,uri){this.lp_client=client;this.lp_original_uri=uri;this.dirty_attributes=[];var entry=this;for(key in representation){if(representation.hasOwnProperty(key)){this.addAttr(key,{value:representation[key]});this.on(key+"Change",this.mark_as_dirty);}}};LP.client.Entry.prototype=new LP.client.Resource();Y.augment(LP.client.Entry,Y.Attribute);LP.client.Entry.prototype.mark_as_dirty=function(event){if(event.newVal!=event.prevVal){this.dirty_attributes.push(event.attrName);}};LP.client.Entry.prototype.lp_save=function(config){var on=config.on;var representation={};var entry=this;Y.each(this.dirty_attributes,function(attribute,key){representation[attribute]=entry.get(attribute);});var headers={};if(this.get('http_etag')!==undefined){headers['If-Match']=this.get('http_etag');}
var uri=LP.client.normalize_uri(this.get('self_link'));this.lp_client.patch(uri,representation,config,headers);this.dirty_attributes=[];};LP.client.Entry.prototype.lookup_value=function(key){return this.get(key);};LP.client.Launchpad=function(){};LP.client.Launchpad.prototype={'get':function(uri,config){var on=Y.merge(config.on);var start=config.start;var size=config.size;var data=config.data;var headers=LP.client.add_accept(config);uri=LP.client.normalize_uri(uri);if(data===undefined){data="";}
if(start!==undefined||size!==undefined){data=LP.client.start_and_size(data,start,size);}
var old_on_success=on.success;on.success=LP.client.wrap_resource_on_success;var client=this;var y_config={on:on,'arguments':[client,uri,old_on_success],'headers':headers,data:data};Y.io(uri,y_config);},'named_get':function(uri,operation_name,config){var parameters=config.parameters;var data=LP.client.append_qs("","ws.op",operation_name);for(name in parameters){if(parameters.hasOwnProperty(name)){data=LP.client.append_qs(data,name,parameters[name]);}}
config.data=data;return this.get(uri,config);},'named_post':function(uri,operation_name,config){var on=Y.merge(config.on);var parameters=config.parameters;uri=LP.client.normalize_uri(uri);var data=LP.client.append_qs(data,"ws.op",operation_name);for(name in parameters){if(parameters.hasOwnProperty(name)){data=LP.client.append_qs(data,name,parameters[name]);}}
var old_on_success=on.success;on.success=function(unknown,response,args){if(response.status==LP.client.HTTP_CREATED){var new_location=response.getResponseHeader("Location");return client.get(new_location,{on:{success:old_on_success,failure:on.failure}});}
return LP.client.wrap_resource_on_success(undefined,response,args);};var client=this;var y_config={method:"POST",on:on,'arguments':[client,uri,old_on_success],data:data};Y.io(uri,y_config);},'patch':function(uri,representation,config,headers){var on=config.on;var data=Y.JSON.stringify(representation);uri=LP.client.normalize_uri(uri);var old_on_success=on.success;on.success=LP.client.wrap_resource_on_success;args=[this,uri,old_on_success];var extra_headers={"X-HTTP-Method-Override":"PATCH","Content-Type":"application/json","X-Content-Type-Override":"application/json"};if(headers!==undefined){for(name in headers){if(headers.hasOwnProperty(name)){extra_headers[name]=headers[name];}}}
extra_headers=LP.client.add_accept(config,extra_headers);var y_config={'method':"POST",'on':on,'headers':extra_headers,'arguments':args,'data':data};Y.io(uri,y_config);},'wrap_resource':function(uri,representation){if(representation===null||representation===undefined){return representation;}
if(representation.lp_redirect_location!==undefined){uri=representation.lp_redirect_location;}
if(representation.resource_type_link===undefined){if(representation.total_size!==undefined){return new LP.client.Collection(this,representation,uri);}else{return representation;}}else if(representation.resource_type_link.search(/\/#service-root$/)!==-1){return new LP.client.Root(this,representation,uri);}else if(representation.total_size===undefined){return new LP.client.Entry(this,representation,uri);}else{return new LP.client.Collection(this,representation,uri);}}};});YUI().add('lp.client.plugins',function(Y){function PATCHPlugin(){PATCHPlugin.superclass.constructor.apply(this,arguments);}
Y.mix(PATCHPlugin,{NAME:'PATCHPlugin',NS:'patcher',ATTRS:{patch:{},resource:{},patch_field:false,formatter:{valueFn:function(){return this._defaultFormatter;}}}});LP.client.ErrorHandler=function(){};LP.client.ErrorHandler.prototype={clearProgressUI:function(){},showError:function(error_msg){},getFailureHandler:function(){var self=this;return function(ioId,o){self.clearProgressUI();if(o.status==503){self.showError('Timeout error, please try again in a few minutes.');}else if(o.status>=500){var server_error='Server error, please contact an administrator.';if(o.getResponseHeader('X-Lazr-OopsId')){server_error=server_error+' OOPS ID:'+o.getResponseHeader('X-Lazr-OOPSid');}
self.showError(server_error);}else{self.showError(o.responseText);}};}};Y.extend(PATCHPlugin,Y.Plugin.Base,{extra_config:null,initializer:function(config){if(!Y.Lang.isString(config.patch)){Y.fail("missing config: 'patch' containing the attribute name");}
if(!Y.Lang.isString(config.resource)){Y.fail("missing config: 'resource' containing the URL to patch");}
this.extra_config=config||{};this.original_save=config.host._saveData;this.doBefore("_saveData",this.doPATCH);var self=this;this.error_handler=new LP.client.ErrorHandler();this.error_handler.clearProgressUI=function(){config.host._uiClearWaiting();};this.error_handler.showError=function(error_msg){config.host.showError(error_msg);};},doPATCH:function(){var owner=this.get("host"),original_save=this.original_save;owner._uiSetWaiting();var client=new LP.client.Launchpad();var formatter=Y.bind(this.get('formatter'),this);var attribute=this.get('patch');var patch_payload;var val=owner.getInput();if(this.get('patch_field')){patch_payload=val;}else{patch_payload={};patch_payload[attribute]=val;}
var callbacks={on:{success:function(entry){owner._uiClearWaiting();var new_value=formatter(entry,attribute);original_save.apply(owner,[new_value]);},failure:this.error_handler.getFailureHandler()}};var cfg=Y.merge(callbacks,this.extra_config);client.patch(this.get('resource'),patch_payload,cfg);return new Y.Do.Halt();},_defaultFormatter:function(result,attribute){if(Y.Lang.isString(result)){return result;}else{return result.get(attribute);}}});Y.namespace('lp.client.plugins');Y.lp.client.plugins.PATCHPlugin=PATCHPlugin;},"0.1",{"requires":["plugin","dump","lazr.editor"]});
// code/branchstatus-min.js
YUI.add('code.branchstatus',function(Y){Y.branchstatus=Y.namespace('code.branchstatus');Y.branchstatus.connect_status=function(conf){var status_content=Y.one('#branch-details-status-value');if
(conf.user_can_edit_status){var status_choice_edit=new Y.ChoiceSource({contentBox:status_content,value:conf.status_value,title:'Change status to',items:conf.status_widget_items});status_choice_edit.showError=function(err){display_error(null,err);};status_choice_edit.on('save',function(e){var cb=status_choice_edit.get('contentBox');Y.Array.each(conf.status_widget_items,function(item){if(item.value==status_choice_edit.get('value')){cb.one('span').addClass(item.css_class);}else{cb.one('span').removeClass(item.css_class);}});});status_choice_edit.plug({fn:Y.lp.client.plugins.PATCHPlugin,cfg:{patch:'lifecycle_status',resource:conf.branch_path}});status_choice_edit.render();}};},"0.1",{"requires":["node","lazr.choiceedit","lp.client.plugins"]});
// code/codereview-min.js
YUI.add('code.codereview',function(Y){Y.codereview=Y.namespace('code.codereview');var reviewer_picker;var lp_client;Y.codereview.connect_links=function(){var link=Y.one('#request-review');if(link!==null){link.addClass('js-action');link.on('click',show_request_review_form);}
link=Y.one('.menu-link-set_commit_message');if(link!==null){link.addClass('js-action');link.on('click',edit_commit_message);}
var widget=Y.lp.widgets['edit-commit-message'];widget.editor.on('save',function(){commit_message_listener(this.get('value'),true);});widget.editor.on('cancel',function(){commit_message_listener(this.get('value'),false);});};function commit_message_listener(message,saved)
{if(message===''){Y.one('#edit-commit-message').addClass('unseen');var link=Y.one('.menu-link-set_commit_message');link.removeClass('unseen');if(saved){Y.lazr.anim.green_flash({node:link}).run();}
else{Y.lazr.anim.red_flash({node:link}).run();}}}
function edit_commit_message(e){e.halt();Y.one('#edit-commit-message').removeClass('unseen');Y.one('.menu-link-set_commit_message').addClass('unseen');Y.lp.widgets['edit-commit-message']._triggerEdit(e);}
function show_request_review_form(e){e.preventDefault();var config={header:'Request a review',step_title:'Search'};reviewer_picker=Y.lp.picker.create('ValidPersonOrTeam',function(result){var review_type=Y.one("[id=field.review_type]").get('value');request_reviewer(result,review_type);},config);reviewer_picker.set('footer_slot',Y.Node.create(['','
','Review type: ','(Optional) ','
','
'].join(' ')));reviewer_picker.show();}
function request_reviewer(person,reviewtype){var table_row=Y.Node.create(['',' ','Requesting review...',' '].join(""));var last_element=Y.one('#email-review');var reviewer_table=last_element.get('parentNode');reviewer_table.insertBefore(table_row,last_element);var context=LP.client.cache.context;if(lp_client===undefined){lp_client=new LP.client.Launchpad();}
var config={parameters:{reviewer:LP.client.get_absolute_uri(person.api_uri),review_type:reviewtype},on:{success:function(){var username=person.api_uri.substr(2,person.api_uri.length);add_reviewer_html(username);},failure:function(result){alert('An error has occurred. Unable to request review.');Y.log(result);}}};lp_client.named_post(context.self_link,'nominateReviewer',config);}
function add_reviewer_html(username){var VOTES_TABLE_PATH='+votes';Y.io(VOTES_TABLE_PATH,{on:{success:function(id,response){var target=Y.one('#votes-target');target.set('innerHTML',response.responseText);Y.codereview.connect_links();var new_reviewer=Y.one('#review-'+username);var anim=Y.lazr.anim.green_flash({node:new_reviewer});anim.run();},failure:function(){}}});}
var NumberToggle=function(){NumberToggle.superclass.constructor.apply(this,arguments);};var update_nos=function(){var new_display='none';if(this.get('checked')){new_display='block';}
Y.all('td.line-no').setStyle('display',new_display);};NumberToggle.NAME='numbertoggle';NumberToggle.ATTRS={};Y.extend(NumberToggle,Y.Widget,{renderUI:function(){var ui=Y.Node.create(''+' '+' Show line numbers ');var ul=Y.one('#review-diff div div ul.horizontal');if(ul){ul.appendChild(ui);}},bindUI:function(){var cb=Y.one('#show-no');if(cb){cb.on('click',update_nos);}}});Y.codereview.NumberToggle=NumberToggle;},"0.1",{"requires":["base","widget","lazr.anim","lazr.formoverlay","lp.picker"]});
// code/branchlinks-min.js
YUI.add('code.branchlinks',function(Y){Y.branchlinks=Y.namespace('code.branchlinks');var lp_client;var link_bug_overlay;var error_handler;Y.branchlinks.connect_branchlinks=function(){error_handler=new LP.client.ErrorHandler();error_handler.clearProgressUI=function(){destroy_temporary_spinner();};error_handler.showError=function(error_message){alert('An unexpected error has occurred.');Y.log(error_message);};link_bug_overlay=new Y.lazr.FormOverlay({headerContent:'Link to a bug ',form_submit_button:Y.Node.create('Ok '),form_cancel_button:Y.Node.create('Cancel '),centered:true,form_submit_callback:link_bug_to_branch,visible:false});link_bug_overlay.render();link_bug_overlay.loadFormContentAndRender('+linkbug/++form++');var linkbug_handle=Y.one('#linkbug');linkbug_handle.addClass('js-action');linkbug_handle.on('click',function(e){e.preventDefault();link_bug_overlay.show();});connect_remove_links();};function connect_remove_links(){Y.on('click',function(e){e.preventDefault();var bugnumber=get_bugnumber_from_id(e.currentTarget.get('id'));unlink_bug_from_branch(bugnumber);},'.delete-buglink');}
function link_bug_to_branch(data){link_bug_overlay.hide();create_temporary_spinner();var bugnumber=data['field.bug'];var existing=Y.one('#buglink-'+bugnumber);if(Y.Lang.isValue(existing)){Y.lazr.anim.green_flash({node:existing}).run();return;}
get_bug_from_bugnumber(bugnumber,function(bug){config={on:{success:function(entry){var config={on:{success:function(bugtasks){update_bug_links(bug);}}};bug.follow_link('bug_tasks',config);},failure:error_handler.getFailureHandler()},parameters:{bug:bug.get('self_link')}};set_up_lp_client();lp_client.named_post(LP.client.cache.context.self_link,'linkBug',config);});}
function update_bug_links(bug){BUG_LINK_SNIPPET='++bug-links';Y.io(BUG_LINK_SNIPPET,{on:{success:function(id,response){destroy_temporary_spinner();Y.one('#linkbug').set('innerHTML','Link to another bug report');Y.one('#buglink-list').set('innerHTML',response.responseText);var new_buglink=Y.one('#buglink-'+bug.get('id'));var anim=Y.lazr.anim.green_flash({node:new_buglink});anim.on('end',connect_remove_links);anim.run();},failure:function(id,response){destroy_temporary_spinner();alert('Unable to update bug links.');Y.log(response);}}});}
function unlink_bug_from_branch(bugnumber){link_bug_overlay.hide();Y.one('#delete-buglink-'+bugnumber).get('children').set('src','/@@/spinner');get_bug_from_bugnumber(bugnumber,function(bug){config={on:{success:function(updated_entry){var element=Y.one('#buglink-'+bugnumber);var parent_element=element.get('parentNode');anim=Y.lazr.anim.red_flash({node:element});anim.on('end',function(){parent_element.removeChild(element);var buglinks=Y.all(".bug-branch-summary");if(buglinks.size()==0){Y.one('#linkbug').set('innerHTML','Link to a bug report');}});anim.run();},failure:function(id,response){alert('An unexpected error has occurred.');Y.one('#delete-buglink-'+bugnumber).get('children').set('src','/@@/remove');Y.log(response.responseText);}},parameters:{bug:bug.get('self_link')}};set_up_lp_client();lp_client.named_post(LP.client.cache.context.self_link,'unlinkBug',config);});}
function get_bugnumber_from_id(id){return id.substr('remove-buglink-'.length,id.length);}
function get_bug_from_bugnumber(bugnumber,callback){var bug_uri='/bugs/'+bugnumber;config={on:{success:callback}};set_up_lp_client();lp_client.get(bug_uri,config);}
function set_up_lp_client(){if(lp_client===undefined){lp_client=new LP.client.Launchpad();}}
function create_temporary_spinner(){var temp_spinner=Y.Node.create(['','
Linking...','
'].join(''));var buglinks=Y.one('#buglinks');var last=Y.one('#linkbug').get('parentNode');if(last){buglinks.insertBefore(temp_spinner,last);}}
function destroy_temporary_spinner(){var temp_spinner=Y.one('#temp-spinner');var spinner_parent=temp_spinner.get('parentNode');spinner_parent.removeChild(temp_spinner);}},"0.1",{"requires":["base","lazr.anim","lazr.formoverlay","lp.client.plugins"]});
// code/branchmergeproposal-min.js
YUI.add('code.branchmergeproposal',function(Y){Y.code.branchmergeproposal=Y.namespace('code.branchmergeproposal');Y.code.branchmergeproposal.connect_status=function(conf){var status_content=Y.get('#branchmergeproposal-status-value');if(conf.user_can_edit_status){var status_choice_edit=new Y.ChoiceSource({contentBox:status_content,value:conf.status_value,title:'Change status to',items:conf.status_widget_items});status_choice_edit.showError=function(err){display_error(null,err);};status_choice_edit.on('save',function(e){config={on:{success:function(entry){var cb=status_choice_edit.get('contentBox');Y.Array.each(conf.status_widget_items,function(item){if(item.value==status_choice_edit.get('value')){cb.query('span').addClass(item.css_class);}else{cb.query('span').removeClass(item.css_class);}});}},parameters:{status:status_choice_edit.get('value')}};lp_client=new LP.client.Launchpad();lp_client.named_post(LP.client.cache.context.self_link,'setStatus',config);});status_choice_edit.render();}};},"0.1",{"requires":["io","node","lazr.choiceedit","lp.client.plugins"]});
// code/subscription-min.js
YUI.add('code.branch.subscription',function(Y){var namespace=Y.namespace('code.branch.subscription');var display_name,user_name,me;var setUpNames=function(client){me=LP.client.links.me;user_name=me.substring(2);if(Y.Lang.isValue(display_name)){return;}
var config={on:{success:function(person){display_name=person.lookup_value('display_name');}}};client.get(me,config);};var SubscriptionWidget=function(config){SubscriptionWidget.superclass.constructor.apply(this,arguments);};SubscriptionWidget.NAME='branch-subscription-widget';SubscriptionWidget.ATTRS={direct_subscribers:{},self_subscribe:{}};SubscriptionWidget.HTML_PARSER={direct_subscribers:'.branch-subscribers-outer',self_subscribe:'.subscribe-self'};Y.extend(SubscriptionWidget,Y.Widget,{initializer:function(){this._lp_client=new LP.client.Launchpad();this._branch_repr=LP.client.cache.context;setUpNames(this._lp_client);var form_url=this.get("self_subscribe").get("href")+'/++form++';var lp_client=this._lp_client;var form_overlay=new Y.lazr.FormOverlay({headerContent:"Subscribe to branch ",form_submit_button:Y.Node.create('Ok '),form_cancel_button:Y.Node.create('Cancel '),centered:true,form_submit_callback:function(data){form_overlay.hide();var img_src='/@@/persongray';var html=['','
',display_name,'
'].join('');var link_node=Y.Node.create(html);var subscribers=Y.get('.branch-subscribers');var next=subscribers.query('div')[0];if(next){subscribers.insertBefore(link_node,next);}else{var none_subscribers=Y.get('#none-subscribers');if(none_subscribers){var none_parent=none_subscribers.get('parentNode');none_parent.removeChild(none_subscribers);}
subscribers.appendChild(link_node);}
var notification_level=document.getElementById('field.notification_level');var notification_level_update=notification_level.options[notification_level.selectedIndex].text;var max_diff_lines=document.getElementById('field.max_diff_lines');var max_diff_lines_update=max_diff_lines.options[max_diff_lines.selectedIndex].text;var review_level=document.getElementById('field.review_level');var review_level_update=review_level.options[review_level.selectedIndex].text;config={on:{success:function(updated_entry){Y.fire('branch:subscriber-list-stale');},failure:function(id,response){Y.log(response.responseText);subscription_form_overlay.show();}},parameters:{person:LP.client.get_absolute_uri(me),notification_level:notification_level_update,max_diff_lines:max_diff_lines_update,code_review_level:review_level_update}};lp_client.named_post(LP.client.cache.context.self_link,'subscribe',config);},visible:false});this._form_overlay=form_overlay;this._form_overlay.loadFormContentAndRender(form_url);this._form_overlay.render();this._updateSubscribersList=function(){Y.io('+branch-portlet-subscriber-content',{on:{success:function(id,response){Y.get('#branch-subscribers-outer').set('innerHTML',response.responseText);var anim=Y.lazr.anim.green_flash({node:Y.get('#subscriber-'+user_name)});anim.run();},failure:function(id,response){Y.get('#branch-subscribers-outer').set('innerHTML','A problem has occurred.');var anim=Y.lazr.anim.red_flash({node:Y.get('#branch-subscribers-outer')});anim.run();}}});};},bindUI:function(){var form_overlay=this._form_overlay;this.get("self_subscribe").on('click',function(e){if(Y.UA.ie){return;}
e.halt();form_overlay.show();});this.get("self_subscribe").addClass("js-action");Y.on('branch:subscriber-list-stale',this._updateSubscribersList);},});namespace.SubscriptionWidget=SubscriptionWidget;},'0.1',{'requires':['event','io','lazr.formoverlay','node',]});
// code/popupdiff-min.js
YUI.add('code.branchmergeproposal.popupdiff',function(Y){var lp_client;var DiffOverlay=function(){DiffOverlay.superclass.constructor.apply(this,arguments);};Y.extend(DiffOverlay,Y.lazr.PrettyOverlay,{bindUI:function(){this.constructor.superclass.bindUI.call(this);}});DiffOverlay.NAME='diff-overlay';var rendered_overlays={};function display_diff(node,api_url,librarian_url){if(rendered_overlays[api_url]!==undefined){rendered_overlays[api_url].show();return;}
var html=[' '].join('');var spinner=Y.Node.create(html);node.appendChild(spinner);var config={on:{success:function(formatted_diff){node.removeChild(spinner);var diff_overlay=new DiffOverlay({bodyContent:Y.Node.create(formatted_diff),align:{points:[Y.WidgetPositionExt.CC,Y.WidgetPositionExt.CC]},progressbar:false});rendered_overlays[api_url]=diff_overlay;diff_overlay.render();},failure:function(){node.removeChild(spinner);document.location=librarian_url;}},accept:LP.client.XHTML};lp_client.get(api_url,config);}
var popupdiff=Y.namespace('code.branchmergeproposal.popupdiff');function link_popup_diff_onclick(node){var a=node.query('a.diff-link');a.addClass('js-action');var librarian_url=a.getAttribute('href');var api_url=node.query('a.api-ref').getAttribute('href');a.on('click',function(e){e.preventDefault();display_diff(a,api_url,librarian_url);});}
popupdiff.connect_diff_links=function(){if(Y.UA.ie){return;}
lp_client=new LP.client.Launchpad();Y.on('lp:branch-linked',link_popup_diff_onclick);var nl=Y.all('.popup-diff');if(nl){nl.each(link_popup_diff_onclick);}};},'0.1',{requires:['event','io','node','lazr.overlay','lp.client']});
// worlddata/languages-min.js
YUI.add('languages',function(Y){var languages=Y.namespace('languages');var all_languages;var hide_and_show=function(searchstring){searchstring=searchstring.toLowerCase();var count_matches=0;all_languages.each(function(element,index,list){var href=element.get('href');var code=href.substr(href.lastIndexOf("/")+1);var english_name=element.get('text').toLowerCase();var comment_start=english_name.indexOf(' (');if(comment_start!=-1){english_name=english_name.substring(0,comment_start);}
if(code.indexOf(searchstring)==-1&&english_name.indexOf(searchstring)==-1){element.ancestor('li').addClass('unseen');}
else{count_matches=count_matches+1;element.ancestor('li').removeClass('unseen');}});var no_filter_matches=Y.get('#no_filter_matches');if(count_matches==0){no_filter_matches.removeClass('unseen');}
else{no_filter_matches.addClass('unseen');}};var init_filter_form=function(){var heading=Y.get('.searchform h2');heading.setContent('Filter languages in Launchpad');var button=Y.get('.searchform input.submit');var inputfind=Y.get('.searchform input.textType');button.set('value','Filter languages');all_languages=Y.all('#all-languages li a');button.on('click',function(e){e.preventDefault();hide_and_show(inputfind.get('value'));});};languages.initialize_languages_page=function(Y){init_filter_form();};},"0.1",{"requires":["oop","event","node"]});
// inlinehelp/inlinehelp-min.js
function initInlineHelp(){$('help-close').innerHTML='Close ';forEach(findHelpLinks(),setupHelpTrigger);initHelpPane();}
function findHelpLinks(){has_help_target=function(elem){return getNodeAttribute(elem,'target')=='help';};return filter(has_help_target,currentDocument().getElementsByTagName('a'));}
function setupHelpTrigger(elem){addElementClass(elem,'help');connect(elem,'onclick',handleClickOnHelp);}
var last_help_trigger=null;function initHelpPane(){connect('help-close-btn','onclick',handleClickOnClose);dismissHelp();}
function showHelpFor(trigger){makeInvisible('help-pane-content');$('help-pane-content').onload=handleHelpLoaded;setNodeAttribute('help-pane-content','src',trigger.href);var help_pane=$('help-pane');var viewport_dim=getViewportDimensions();var help_pane_dim=elementDimensions('help-pane');var pos_x=Math.round(viewport_dim.w/2)-(help_pane_dim.w/2);var pos_y=Math.round(viewport_dim.h/2)-(help_pane_dim.h/2);setElementPosition(help_pane,new Coordinates(pos_x,pos_y));makeVisible(help_pane);setStyle(help_pane,{'display':''});}
function dismissHelp(){makeInvisible('help-pane');}
function handleClickOnHelp(event){event.stop();var trigger=event.src();if(!isVisible('help-pane')){showHelpFor(trigger);}else if(trigger==last_help_trigger){dismissHelp();}else{dismissHelp();showHelpFor(trigger);}
last_help_trigger=trigger;}
function handleClickOnClose(event){event.stop();dismissHelp();}
function handleHelpLoaded(event){makeVisible('help-pane-content');}
function handleClickOnPage(event){var help=$('help-pane');if(isVisible(help)&&!isInside(event.mouse().page,help)){dismissHelp();}}
function toggleVisible(elem){toggleElementClass("invisible",elem);}
function makeVisible(elem){removeElementClass(elem,"invisible");}
function makeInvisible(elem){addElementClass(elem,"invisible");}
function isVisible(elem){return!hasElementClass(elem,"invisible");}
function isInside(point,element){return intersect(point,getElementPosition(element),getElementDimensions(element));}
function intersect(point,dim_point,dimensions){return((point.x>dim_point.x)&&(point.xdim_point.y)&&(point.y