// Generated by CoffeeScript 1.3.3 /* mixin-js.js 0.1.4 (c) 2011, 2012 Kevin Malakoff. Mixin is freely distributable under the MIT license. See the following for full license details: https://github.com/kmalakoff/mixin/blob/master/LICENSE Dependencies: None. Note: some code from Underscore.js is embedded in this file to remove dependencies on the full library. Please see the following for details on Underscore.js and its licensing: https://github.com/documentcloud/underscore https://github.com/documentcloud/underscore/blob/master/LICENSE */(function(){var e,t,n={}.hasOwnProperty,r=function(e,t){function i(){this.constructor=e}for(var r in t)n.call(t,r)&&(e[r]=t[r]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e};e=this.Mixin=typeof exports!="undefined"?exports:{},e.Core||(e.Core={}),e.VERSION="0.1.4";if(typeof require!="undefined")try{t=require("lodash")}catch(i){t=require("underscore")}else t=this._;t&&t.hasOwnProperty("_")&&(t=t._),t||(t={}),e._=t,t.isArray||(t.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"}),t.isString||(t.isString=function(e){return!!(e===""||e&&e.charCodeAt&&e.substr)}),t.isFunction||(t.isFunction=function(e){return!!(e&&e.constructor&&e.call&&e.apply)}),t.isEmpty||(t.isEmpty=function(e){var n,r;if(t.isArray(e)||t.isString(e))return e.length===0;for(n in e)return r=e[n],!1;return!0}),t.classOf||(t.classOf=function(e){return e instanceof Object?e.prototype&&e.prototype.constructor&&e.prototype.constructor.name?e.prototype.constructor.name:e.constructor&&e.constructor.name?e.constructor.name:void 0:void 0}),t.size||(t.size=function(e){var t,n;t=0;for(n in e)t++;return t}),t.find||(t.find=function(e,t){var n,r,i;for(r=0,i=e.length;r=0){i=this.instance_records[r];if(i.mix_target===e&&i.destroyMixin(n)){s=!0,t.isEmpty(i.initialized_mixins)&&(i.destroy(),this.instance_records.splice(r,1));if(n)return!0}r--}return s},n.prototype._getInstanceRecord=function(e){var t,n,r,i;i=this.instance_records;for(n=0,r=i.length;n1){s=i[1];if(!(t.isString(s)&&n.isAvailable(s)||t.isArray(s)&&s.length>=1&&t.isString(s[0])&&n.isAvailable(s[0])))return u.apply(this,arguments),r}for(a=0,f=i.length;a1){l=Array.prototype.slice.call(arguments,1);for(o=0,a=l.length;o