YUI.add("recordset-indexer",function(n,e){function t(e){t.superclass.constructor.apply(this,arguments)}n.mix(t,{NS:"indexer",NAME:"recordsetIndexer",ATTRS:{hashTables:{value:{}},keys:{value:{}}}}),n.extend(t,n.Plugin.Base,{initializer:function(e){var t=this.get("host");this.onHostEvent("add",n.bind("_defAddHash",this),t),this.onHostEvent("remove",n.bind("_defRemoveHash",this),t),this.onHostEvent("update",n.bind("_defUpdateHash",this),t)},destructor:function(e){},_setHashTable:function(e){for(var t=this.get("host"),s={},a=0,n=t.getLength();a<n;a++)s[t._items[a].getValue(e)]=t._items[a];return s},_defAddHash:function(e){var t=this.get("hashTables");n.each(t,function(t,s){n.each(e.added||e.updated,function(e){e.getValue(s)&&(t[e.getValue(s)]=e)})})},_defRemoveHash:function(e){var a,t=this.get("hashTables");n.each(t,function(t,s){n.each(e.removed||e.overwritten,function(e){(a=e.getValue(s))&&t[a]===e&&delete t[a]})})},_defUpdateHash:function(e){e.added=e.updated,e.removed=e.overwritten,this._defAddHash(e),this._defRemoveHash(e)},createTable:function(e){var t=this.get("hashTables");return t[e]=this._setHashTable(e),this.set("hashTables",t),t[e]},getTable:function(e){return this.get("hashTables")[e]}}),n.namespace("Plugin").RecordsetIndexer=t},"patched-v3.18.3",{requires:["recordset-base","plugin"]});