text: /**
   * Javascript Class Helper
   * @author Tom Flidr | tomflidr(at)gmail(dot)com
   * @version 1.4.2
   * @date 2016-08-08
   * @usage
  var ClassName = Class({
  	Extend: ParentClassName,
  	Static: {
  		staticMethod: function () {
  			// call parent static method with same name
  			this.parent(param1, param2, ...);
  			// call any other parent static method
  			this.parent.otherParentStaticMethod(param1, param2, ...);
  		}
  	},
  	Constructor: function () {
  		// call parent Constructor
  		this.parent(param1, param2);
  		// call any other parent dynamic method
  		this.parent.otherParentDynamicMethod(param1, param2, ...);
  	},
  	dynamicMethod: function () {
  		// call parent dynamic method with same name
  		this.parent(param1, param2);
  		// call any other parent dynamic method
  		this.parent.otherParentDynamicMethod(param1, param2, ...);
  	}
  });
  */
  var Class=function(m){function a(){var b=[].slice.apply(arguments),c=a.Constants;if("string"==typeof b[0]){return a.l(b[0],1<b.length?b[1]:{})}b=a.j(b[0],"Class");b[c.Namespace]="";b[c.Fullname]="Class";return b}Function.prototype.bind||(Function.prototype.bind=function(b){function a(){return g.apply(this instanceof d?this:b,f.concat(e.call(arguments)))}function d(){}if("function"!==typeof this){throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");}var e=[].slice,f=e.call(arguments,1),g=this;this.prototype&&(d.prototype=this.prototype);a.prototype=new d;return a});a.Constants={ClassImprint:"$classImprint",InstanceImprint:"$instanceImprint",Inherited:"$inherited",Extend:"Extend",Static:"Static",Constructor:"Constructor",Name:"Name",Namespace:"Namespace",Fullname:"Fullname",self:"self",parent:"parent"};a.a={};a.ClassImprintBaseName="class{0}";a.InstanceImprintBaseName="instance{0}";a.c=0;a.f=0;a.g=[{},{}];a.h={};a.CustomizeSyntax=function(b){var c,d;for(d in b){c=b[d],a.a[c]=!0,a.Constants[d]=c}};a.CustomizeSyntax(a.Constants);a.Create=function(b,c,d){b=a.GetByName(b,d);c=c||[];c.unshift(b);return new(b.bind.apply(b,c))};a.Define=function(b,c){return a.l(b,c||{})};a.GetByName=function(a,c){c=!!c;for(var d=a.split("."),e,f=m,g=0,h=d.length;g<h;g+=1){e=d[g];if(!(e in f)&&c){throw Error("Class '"+a+"' doesn't exist!");}f=f[e]}return f};a.l=function(b,c){for(var d=b.split("."),e=d.pop(),f="",g=a.Constants,h=m,k=0,l=d.length;k<l;k+=1){f=d[k],f in h||(h[f]={}),h=h[f]||{}}c.toString==={}.toString&&(c.toString=function(){return"[object "+b+"]"});f=a.j(c,e);f[g.Namespace]=d.join(".");f[g.Fullname]=b;return h[e]=f};a.j=function(b,c){function Class(){return a.K(b,this,[].slice.apply(arguments))}var d=Class,e=a.Constants,f=e.Extend,g=e.Name,h=e.ClassImprint,e=e.self,k="",l="";b[f]&&("function"==typeof b[f][h]?l=b[f][h]():(l=a.i(),b[f][h]=function(){return l}));k=a.i();d[h]=function(){return k};a.D(d,b,l);a.F(d,b,l);a.L(d,b);a.M(d,b);d[e]=d;b[f]&&(d[e][f]=b[f],a.h[k]=l);d.prototype[e]=d;a.u(d);d[g]=c;return d};a.K=function(b,c,d){var e=a.Constants,f=e.Constructor,g="";if(c===m){a.I(b,c,d,f)}else{return g=a.J(),c[e.InstanceImprint]=function(){return g},a.o(c),"function"==typeof c[f]?c[f].apply(c,d):c}};a.I=function(a,c,d,e){if("function"==typeof a[e]){a[e].apply(c,d)}else{throw Error("Class definition is not possible to call as function, it's necessary to create instance with 'new' keyword before class definition.");}};a.i=function(){var b=a.ClassImprintBaseName.replace("{0}",a.c);a.c+=1;return b};a.J=function(){var b=a.InstanceImprintBaseName.replace("{0}",a.f);a.f+=1;return b};a.D=function(b,c,d){function Prototype(){}var e=Prototype,f=c[a.Constants.Extend],g;f&&(g=f.prototype,f&&(e.prototype=g),b.prototype=new e,a.m(b.prototype,g,c,d,0));a.C(b.prototype)};a.m=function(b,c,d,e,f){for(var g in c){!0===a.a[g]||"function"!=typeof c[g]||g in d||(b[g]="_"==g.substr(0,1)?a.w(g,c[g],e,f):a.B(c[g],f))}};a.B=function(b,c){var d=a.Constants,e=d.self,f=d.Extend;return function(){var a=this[e],d;f in this.self&&(this[e]=a[f]);d=b.apply(c?this[e]:this,[].slice.apply(arguments));this[e]=a;return d}};a.w=function(b,c,d,e){var f=a.Constants.Inherited;c[f]&&(d=c[f][0],c=c[f][1]);b=a.A(b,c,d,e);b[f]=[d,c];return b};a.A=function(b,c,d,e){var f=a.Constants;_selfStr=f.self;_classImprint=f.ClassImprint;_fullname=f.Fullname;return function(){var a=this[_selfStr];if(a[_classImprint]()!=d){throw Error("Private method call: '"+b+"' not allowed from class context: '"+a[_fullname]+"'.");}return c.apply(e?a:this,[].slice.apply(arguments))}};a.C=function(b){var c=a.Constants.Name,d;for(d in b){!0!==a.a[d]&&"function"==typeof b[d]&&"string"!=typeof b[d][c]&&(b[d][c]=d)}};a.F=function(b,c,d){var e="",f=a.Constants,g=f.Name,h=c[f.Extend];if(h){for(e in h){!0!==a.a[e]&&"_"!=e.substr(0,1)&&(b[e]=h[e],"function"==typeof h[e]&&(b[e][g]=e))}a.m(b,h,c[f.Static]||{},d,1)}};a.L=function(b,c){var d=b.prototype,e=a.Constants,f=e.Name,g=e.Constructor,h="";for(h in c){!0!==a.a[h]&&(d[h]=c[h],"function"==typeof c[h]&&(d[h][f]=h))}c[g]&&(d[g]=c[g],d[g][f]=g);d[e.InstanceImprint]=function(){return""}};a.M=function(b,c){var d="",e=a.Constants,f=e.Name;if(e=c[e.Static]){for(d in e){!0!==a.a[d]&&(b[d]=e[d],"function"==typeof e[d]&&(b[d][f]=d))}}};a.o=function(b){var c=a.Constants,d=c.Name,e=c.parent,f=c.self,g="",h=b[f],c=h[f][c.Extend];h.prototype[e]=function(){return a.b(this,arguments.callee.caller[d],[].slice.apply(arguments),0)};e=h.prototype[e];if(c){for(g in h=c.prototype,h){"function"==typeof h[g]&&!0!==a.a[g]&&(e[g]=a.s(b,g))}}};a.s=function(b,c){return function(){return a.b(b,c,[].slice.apply(arguments),0)}};a.u=function(b){var c=a.Constants,d=c.Name,e=c.parent,f="",c=b[c.Extend];b[e]=function(){return a.b(this,arguments.callee.caller[d],[].slice.apply(arguments),1)};e=b[e];if(c){for(f in c){"function"!=typeof c[f]||a.a[f]||(e[f]=a.v(b,f))}}};a.v=function(b,c){return function(){return a.b(b,c,[].slice.apply(arguments),1)}};a.b=function(b,c,d,e){var f=a.Constants,g=f.ClassImprint,h=f.InstanceImprint,f=f.self,h=b[e?g:h](),k=b[f],g=k[g](),g=a.H(g,h,e),g=a.G(k,g),l=e?g[c]:g.prototype[c],m=typeof l;if("undefined"==m){throw"No parent method named: '"+c+"'.";}else{if("function"!=m){throw"Parent method '"+c+"' is not a function.";}}b[f]=g;c=l.apply(e?b[f]:b,d);delete a.g[e][h];b[f]=k;return c};a.H=function(b,c,d){d=a.g[d];"undefined"==typeof d[c]&&(d[c]=b);b=a.h[d[c]];if(!b){throw Error("No parent class defined.");}return d[c]=b};a.G=function(b,c){for(var d=a.Constants,e=d.Extend,d=d.ClassImprint,f=!1,g;"undefined"!=typeof b[e];){g=b[e];if(g[d]()==c){f=!0;break}b=g}if(!f){throw Error("No parent class definition found for class imprint: '"+c+"'.");}return g};return m.Class=a}("undefined"!==typeof module&&module.exports?global:this);