-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclass.min.js
More file actions
3 lines (3 loc) · 1.18 KB
/
class.min.js
File metadata and controls
3 lines (3 loc) · 1.18 KB
1
2
3
var h="undefined"!==typeof define||"undefined"===typeof window?null:window;function j(g,a){g.toString=function(){return a}}function l(g,a,d){var b,c,e;for(b in a)if(a.hasOwnProperty(b)&&(c=g.hasOwnProperty(b),c=!d&&!c,d||c))c=g[b]=a[b],"function"===typeof c&&(e=(e=a.toString===Object.prototype.toString)?g.constructor:a.constructor,j(c,e+"::"+b))}var m;
m={design:function(g,a){var d,b,c;d=a.Extends||null;delete a.Extends;b=a.Implements||null;delete a.Implements;c=a.initialize||null;delete a.initialize;c||(c=d?function(){d.apply(this,arguments)}:function(){});c.toString=function(){return g};var e=c;if(d){var f=function(){};f.prototype=d.prototype;e.prototype=new f;e.prototype.constructor=e;e.Super=d;m.extend(e,d,!1)}e=c;if(b){"function"===typeof b&&(b=[b]);for(f=0;f<b.length;f+=1)l(e.prototype,b[f].prototype,!1)}c.prototype.toString=function(){return g};
m.extend(c,a,!0);if(h){var k,i;b=g.split(".");e=b[b.length-1];f=h;for(i=0;i<b.length-1;i+=1)k=b[i],"undefined"===typeof f[k]&&(f[k]={}),f=f[k];f[e]=c}return c},extend:function(g,a,d){a.STATIC&&(l(g,a.STATIC,d),delete a.STATIC);l(g.prototype,a,d)}};"undefined"!==typeof define?define([],function(){return m}):h?h.Class=m:module.exports=m;