YUI.add("widget-child",function(s,t){var n=s.Lang;function e(){s.after(this._syncUIChild,this,"syncUI"),s.after(this._bindUIChild,this,"bindUI")}e.ATTRS={selected:{value:0,validator:n.isNumber},index:{readOnly:!0,getter:function(){var t=this.get("parent"),e=-1;return e=t?t.indexOf(this):e}},parent:{readOnly:!0},depth:{readOnly:!0,getter:function(){for(var t=this.get("parent"),e=this.get("root"),i=-1;t&&(i+=1,t!=e);)t=t.get("parent");return i}},root:{readOnly:!0,getter:function(){var r=function(t){var e=t.get("parent"),i=t.ROOT_TYPE,n=e;return(n=i?e&&s.instanceOf(e,i):n)?r(e):t};return r(this)}}},e.prototype={ROOT_TYPE:null,_getUIEventNode:function(){var t,e=this.get("root");return t=e?e.get("boundingBox"):t},next:function(t){var e,i=this.get("parent");return e=!(e=i?i.item(this.get("index")+1):e)&&t?i.item(0):e},previous:function(t){var e,i=this.get("parent"),n=this.get("index");return e=!(e=i&&0<n?i.item([n-1]):e)&&t?i.item(i.size()-1):e},remove:function(t){var e,i;return n.isNumber(t)?i=s.WidgetParent.prototype.remove.apply(this,arguments):(e=this.get("parent"))&&(i=e.remove(this.get("index"))),i},isRoot:function(){return this==this.get("root")},ancestor:function(t){var e,i=this.get("root");if(this.get("depth")>t)for(e=this.get("parent");e!=i&&e.get("depth")>t;)e=e.get("parent");return e},_uiSetChildSelected:function(t){var e=this.get("boundingBox"),i=this.getClassName("selected");0===t?e.removeClass(i):e.addClass(i)},_afterChildSelectedChange:function(t){this._uiSetChildSelected(t.newVal)},_syncUIChild:function(){this._uiSetChildSelected(this.get("selected"))},_bindUIChild:function(){this.after("selectedChange",this._afterChildSelectedChange)}},s.WidgetChild=e},"patched-v3.18.7",{requires:["base-build","widget"]});