text: "use strict";
  //
  // An iterable that iterates the elements in reverse.
  //
  var __values = (this && this.__values) || function (o) {
      var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
      if (m) return m.call(o);
      return {
          next: function () {
              if (o && i >= o.length) o = void 0;
              return { value: o && o[i++], done: !o };
          }
      };
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  var array_iterator_1 = require("../iterators/array-iterator");
  var ReverseIterable = /** @class */ (function () {
      function ReverseIterable(iterable) {
          this.iterable = iterable;
      }
      ReverseIterable.prototype[Symbol.iterator] = function () {
          var working = [];
          try {
              for (var _a = __values(this.iterable), _b = _a.next(); !_b.done; _b = _a.next()) {
                  var value = _b.value;
                  working.push(value);
              }
          }
          catch (e_1_1) { e_1 = { error: e_1_1 }; }
          finally {
              try {
                  if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
              }
              finally { if (e_1) throw e_1.error; }
          }
          working.reverse();
          return new array_iterator_1.ArrayIterator(working);
          var e_1, _c;
      };
      return ReverseIterable;
  }());
  exports.ReverseIterable = ReverseIterable;
  //# sourceMappingURL=reverse-iterable.js.map