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Ae,UAAY,EAEpB,CACT,CAEF,CA9HC","file":"/npm/constructor@0.0.6/constructor.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/constructor@0.0.6/constructor.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/**\r\n *  file:  constructor.js - provides construction prototype and __super__ \r\n *         inheritance to JavaScript\r\n *  author:   @dfkaye - david.kaye\r\n *\tdate:\t2012-10-30\r\n *\r\n *\tTo-DO (if ever)\r\n *    - better 'actual' support for extending natives (like Array) - could be \r\n *      bikeshedding, though...\r\n *\r\n *   11/20/12\r\n *      copied over to local\r\n *\r\n *   12/23/12\r\n *      renamed method .create to .extend\r\n *      made .extend require both args, not just one\r\n *      re-formatted defn to IIFE for pseudo-commonjs\r\n *\r\n *   3/3/13\r\n *      github repo opened ~ test factorings in progress\r\n *\r\n *   12/3/13\r\n *      change parent to __super__\r\n *      change exports support\r\n *\r\n *   3/27/14\r\n *      expose static __super__ and __super__.constructor properties\r\n */\r\n\r\n;(function (exports) {\r\n\r\n  exports = (typeof module != 'undefined' && module.exports) || window;\r\n  exports.Constructor = Constructor;\r\n\r\n  /*\r\n   *  @constructor function Constructor\r\n   *\r\n   *  @param source - source must be either a function or an object specifier\r\n   *  @return function - the new constructor function\r\n   */\r\n  function Constructor(source) {\r\n\r\n    var sourceType = typeof(source);\r\n    var error = \"Constructor(): invalid 'source' argument, must be a function or prototype, but was \";\r\n    var ctr;\r\n\r\n    if ('function' === sourceType) {\r\n      return source\r\n    }\r\n\r\n    if ('undefined' === sourceType) {\r\n      throw new ReferenceError(error + \"undefined\")\r\n    }\r\n\r\n    if ('object' !== sourceType || source === null) {\r\n      throw new TypeError(error + ('object' != sourceType  ? sourceType + \" [\" + source + \"]\" : \"null\"))\r\n    }\r\n\r\n    ctr = source.constructor !== Object ? source.constructor : function () {};\r\n\r\n    ctr.prototype = source;\r\n    ctr.prototype.constructor = ctr;\r\n\r\n    return ctr\r\n  }\r\n\r\n  /*\r\n   *  @method Constructor.extend\r\n   *\r\n   *  @param source - required - source must be either a function or an object specifier\r\n   *  @param target - required - target must be either a function or an object specifier\r\n   *  @return function - the new constructor function\r\n   */\r\n  Constructor.extend = extend;\r\n\r\n  function extend(source, target) {\r\n\r\n    var error = 'Constructor.extend(): ';\r\n\r\n    if (arguments.length < 2) {\r\n      throw new TypeError(error + 'requires 2 arguments, source and target.')\r\n    }\r\n\r\n    var sourceType = typeof(source);\r\n    var targetType = typeof(target);\r\n\r\n    /*\r\n     *  pass-through if not functions; let Constructor throw errors if not objects either;\r\n     */\r\n    var newSource = (sourceType !== 'function') ? new Constructor(source) : source;\r\n    var newConstructor = (targetType !== 'function') ? new Constructor(target) : target;\r\n\r\n    if (newSource == newConstructor) {\r\n      throw new ReferenceError(error + ' source and target arguments should not be identical')\r\n    }\r\n\r\n    var newPrototype;\r\n\r\n    function F() {}\r\n    \r\n    // expose static __super_ and __super__.constructor properties\r\n    F.constructor = newSource; \r\n    newConstructor.__super__ = F;\r\n    \r\n    // create our new prototype\r\n    F.prototype = newSource.prototype;\r\n    newPrototype = new F();\r\n  \r\n    /*\r\n     *  In order to support the target argument as an object specifier, we have\r\n     *  to take the extra step of copying out its properties onto the new target\r\n     *  function's prototype.\r\n     */\r\n    if (targetType === 'object') {\r\n\r\n      var proto = newConstructor.prototype;\r\n\r\n      for (var k in proto) {\r\n        if (proto.hasOwnProperty(k)) {\r\n          newPrototype[k] = proto[k];\r\n        }\r\n      }\r\n    }\r\n\r\n    /*\r\n     * yes this makes 'constructor' an enumerable property\r\n     */\r\n    newPrototype.constructor = newConstructor;\r\n\r\n    /*\r\n     *  @method __super__ - a call-once method for initializing the super/parent constructor of\r\n     *  this constructor.  __super__ is replaced with an instance of the super/parent.\r\n     */\r\n    newPrototype.__super__ = function () {\r\n\r\n      var __super__ = this.constructor.__super__;\r\n      var p = new __super__(this, arguments);\r\n\r\n      p.constructor.apply(p, arguments);\r\n\r\n      for (var k in p) {\r\n        if (p.hasOwnProperty(k)) {\r\n        //if (!(k in this)) {\r\n          this[k] = p[k];\r\n        }\r\n      }\r\n\r\n      this.__super__ = p;\r\n    };\r\n\r\n    newConstructor.prototype = newPrototype;\r\n\r\n    return newConstructor\r\n  }\r\n\r\n}());\r\n"]}