text: "use strict";
  Object.defineProperty(exports, "__esModule", { value: true });
  var core_1 = require("@angular/core");
  var SamplePipe = (function () {
      function SamplePipe() {
      }
      SamplePipe.prototype.transform = function (input, len) {
          if (len === void 0) { len = 1; }
          if (!Array.isArray(input)) {
              return input;
          }
          var sample = [];
          for (var i = 0, tmp = input.slice(), l = len < tmp.length ? len : tmp.length; i < l; ++i) {
              sample = sample.concat(tmp.splice(Math.floor(Math.random() * tmp.length), 1));
          }
          return sample;
      };
      return SamplePipe;
  }());
  SamplePipe.decorators = [
      { type: core_1.Pipe, args: [{ name: 'sample' },] },
  ];
  /** @nocollapse */
  SamplePipe.ctorParameters = function () { return []; };
  exports.SamplePipe = SamplePipe;
  //# sourceMappingURL=sample.js.map