/*
 * @require jade.js
 */
jade.Object=function(){this.connectedSlots={}};jade.Object.className="jade.Object";
jade.Object.prototype.connectedSlots=null;jade.Object.prototype.sendSignal=function(f,d){var c,b,g,e,a,h,j;
c=this.connectedSlots[f];if(c===undefined){return true}e=Array.prototype.slice.call(arguments,0);
e[0]=this;c=(c.slice());a=true;for(b=0,g=c.length;b<g;b++){h=c[b];if(h.args){j=e.concat(h.args)
}else{j=e}if(h.func.apply(h.context,j)===false){a=false}}return a};jade.Object.prototype.sendQuery=function(g,c,e){var d,b,h,f,a,j;
d=this.connectedSlots[g];if(d===undefined){return c}f=arguments;f[0]=this;a=true;
for(b=0,h=d.length;b<h;b++){j=d[b];f[1]=j.func.apply(j.context,f)}return f[1]};jade.Object.prototype.connect=function(e,f,d,a){var c,b;
if(!f){throw new Error("Invalid slot for signal "+e)}if(this.isConnected(e,f,d)){return
}if(d===undefined){d=window}c=this.connectedSlots[e];if(c===undefined){c=[];this.connectedSlots[e]=c
}if(arguments.length>3){b=Array.prototype.slice.call(arguments,3)}else{b=null}c.push({func:f,context:d,args:b})
};jade.Object.prototype.disconnect=function(d,e,c){var b,a;if(d===undefined){this.connectedSlots={};
return}if(c===undefined){c=window}b=this.connectedSlots[d];if(b===undefined){return
}for(a=b.length-1;a>=0;a--){if(!e||(jade.equals(b[a].func,e)&&b[a].context==c)){b.splice(a,1)
}}};jade.Object.prototype.isConnected=function(d,e,c){var b,a;if(!d){for(a in (this.connectedSlots)){return true
}return false}b=this.connectedSlots[d];if(!b){return false}if(e===undefined){return b&&!!b.length
}if(c===undefined){c=window}if(b===undefined){return false}for(a=b.length-1;a>=0;
a--){if(jade.equals(b[a].func,e)&&b[a].context==c){return true}}return false};jade.Object.getName=function(){var a;
a=this.className;if(!a){throw new Error("Unable to retrieve class name from "+this)
}return a};jade.Object.prototype.getClass=function(){return this.constructor};jade.Object.getSuperclass=function(){var a;
a=(this.parentConstructor);return a?a:null};