text: "use strict";
  
  var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
  
  var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _desc, _value, _class;
  
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = undefined;
  
  var _methods = require("./decorators/methods");
  
  var methods = _interopRequireWildcard(_methods);
  
  var _validators = require("./validators");
  
  var validators = _interopRequireWildcard(_validators);
  
  function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
  
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  
  var AudioNodeDisconnectUtils = (_dec = methods.param("output", validators.isPositiveInteger), _dec2 = methods.contract({
    precondition: function precondition(output) {
      if (this.numberOfOutputs <= output) {
        throw new TypeError("output index (" + output + ") exceeds number of outputs (" + this.numberOfOutputs + ")");
      }
    }
  }), _dec3 = methods.param("destination", validators.isAudioSource), _dec4 = methods.contract({
    precondition: function precondition(destination) {
      if (!this._.outputs.some(function (junction) {
        return junction.isConnected(destination);
      })) {
        throw new TypeError("the given destination is not connected");
      }
    }
  }), _dec5 = methods.param("destination", validators.isAudioSource), _dec6 = methods.param("output", validators.isPositiveInteger), _dec7 = methods.contract({
    precondition: function precondition(destination, output) {
      if (!this._.outputs.some(function (junction) {
        return junction.isConnected(destination);
      })) {
        throw new TypeError("the given destination is not connected");
      }
      if (output < 0 || this.numberOfOutputs <= output) {
        throw new TypeError("output provided (" + output + ") is outside the range [0, " + this.numberOfOutputs + ")");
      }
    }
  }), _dec8 = methods.param("destination", validators.isAudioSource), _dec9 = methods.param("output", validators.isPositiveInteger), _dec10 = methods.param("input", validators.isPositiveInteger), _dec11 = methods.contract({
    precondition: function precondition(destination, output, input) {
      if (!this._.outputs.some(function (junction) {
        return junction.isConnected(destination);
      })) {
        throw new TypeError("the given destination is not connected");
      }
      if (output < 0 || this.numberOfOutputs <= output) {
        throw new TypeError("output provided (" + output + ") is outside the range [0, " + this.numberOfOutputs + ")");
      }
      if (input < 0 || destination.numberOfInputs <= input) {
        throw new TypeError("input provided (" + input + ") is outside the range [0, " + this.numberOfInputs + ")");
      }
    }
  }), (_class = (function () {
    function AudioNodeDisconnectUtils() {
      _classCallCheck(this, AudioNodeDisconnectUtils);
    }
  
    _createClass(AudioNodeDisconnectUtils, null, [{
      key: "disconnectAll",
      value: function disconnectAll() {
        this._.outputs.forEach(function (junction) {
          junction.disconnectAll();
        });
      }
    }, {
      key: "disconnectChannel",
      value: function disconnectChannel(output) {
        this._.outputs[output].disconnectAll();
      }
    }, {
      key: "disconnectSelective1",
      value: function disconnectSelective1(destination) {
        this._.outputs.forEach(function (junction) {
          junction.disconnectNode(destination);
        });
      }
    }, {
      key: "disconnectSelective2",
      value: function disconnectSelective2(destination, output) {
        this._.outputs[output].disconnectNode(destination);
      }
    }, {
      key: "disconnectSelective3",
      value: function disconnectSelective3(destination, output, input) {
        this._.outputs[output].disconnectChannel(destination, input);
      }
    }]);
  
    return AudioNodeDisconnectUtils;
  })(), (_desc = _dec(_class, "disconnectChannel", _desc = _dec2(_class, "disconnectChannel", _desc = Object.getOwnPropertyDescriptor(_class, "disconnectChannel")) || _desc) || _desc, _desc ? Object.defineProperty(_class, "disconnectChannel", _desc) : void 0, _desc = _dec3(_class, "disconnectSelective1", _desc = _dec4(_class, "disconnectSelective1", _desc = Object.getOwnPropertyDescriptor(_class, "disconnectSelective1")) || _desc) || _desc, _desc ? Object.defineProperty(_class, "disconnectSelective1", _desc) : void 0, _desc = _dec5(_class, "disconnectSelective2", _desc = _dec6(_class, "disconnectSelective2", _desc = _dec7(_class, "disconnectSelective2", _desc = Object.getOwnPropertyDescriptor(_class, "disconnectSelective2")) || _desc) || _desc) || _desc, _desc ? Object.defineProperty(_class, "disconnectSelective2", _desc) : void 0, _desc = _dec8(_class, "disconnectSelective3", _desc = _dec9(_class, "disconnectSelective3", _desc = _dec10(_class, "disconnectSelective3", _desc = _dec11(_class, "disconnectSelective3", _desc = Object.getOwnPropertyDescriptor(_class, "disconnectSelective3")) || _desc) || _desc) || _desc) || _desc, _desc ? Object.defineProperty(_class, "disconnectSelective3", _desc) : void 0), _class));
  exports.default = AudioNodeDisconnectUtils;