//>>built define("dojo/_base/declare dojo/_base/lang dojo/_base/sniff dojo/dom-construct dojo/dom-class ./Selection".split(" "),function(k,h,l,m,n,p){return k(p,{postCreate:function(){this.inherited(arguments);this.on(".dgrid-selector:click,.dgrid-selector:keydown",h.hitch(this,"_handleSelectorClick"));this.on("dgrid-select",h.hitch(this,"_changeSelectorInput",!0));this.on("dgrid-deselect",h.hitch(this,"_changeSelectorInput",!1))},_defaultRenderSelectorInput:function(a,b,c,g){var e=a.grid;n.add(c,"dgrid-selector"); return c.input=m.create("input",{"aria-checked":b,checked:b,disabled:!e.allowSelect(e.row(g)),tabIndex:isNaN(a.tabIndex)?-1:a.tabIndex,type:a.selector},c)},_configureSelectorColumn:function(a){var b=this,c=a.selector;this._selectorColumns.push(a);this._selectorSingleRow=this._selectorSingleRow||"radio"===a.selector;var g="function"===typeof c?c:this._defaultRenderSelectorInput;a.sortable=!1;a.renderCell=function(c,d,f){d=(d=c&&b.row(c))&&b.selection[d.id];g(a,!!d,f,c)};a.renderHeaderCell=function(c){var d= "label"in a?a.label:a.field||"";"radio"!==a.selector&&b.allowSelectAll?(a._selectorHeaderCheckbox=g(a,!1,c,{}),b._hasSelectorHeaderCheckbox=!0):c.appendChild(document.createTextNode(d))}},_handleSelectorClick:function(a){if("INPUT"!==a.target.nodeName||"keydown"!==a.type||32!==a.keyCode){var b=this.cell(a).row;if("click"===a.type||32===a.keyCode||!l("opera")&&13===a.keyCode||0===a.keyCode){this._selectionTriggerEvent=a;if(b){if(this.allowSelect(b)){var c=this._lastSelected&&this.row(this._lastSelected); this._selectorSingleRow?c&&c.id===b.id||(this.clearSelection(),this.select(b,null,!0),this._lastSelected=b.element):b&&(a.shiftKey?this._changeSelectorInput(!0,{rows:[b]}):c=null,c=a.shiftKey?c:null,this.select(c||b,b,c?void 0:null),this._lastSelected=b.element)}}else this[this.allSelected?"clearSelection":"selectAll"]();this._selectionTriggerEvent=null}}},_changeSelectorInput:function(a,b){this._selectorColumns.length&&this._updateRowSelectors(a,b);this._hasSelectorHeaderCheckbox&&this._updateHeaderCheckboxes()}, _updateRowSelectors:function(a,b){b=b.rows;for(var c=b.length,g=this._selectorColumns.length,e=0;e