System.register(["__unresolved_0", "__unresolved_1", "__unresolved_2", "__unresolved_3", "__unresolved_4", "__unresolved_5", "__unresolved_6", "__unresolved_7"], function (_export, _context) {
  "use strict";

  var _req, _req2, _req3, _req4, _req5, _req6, _req7, _loader, _cjsExports, __cjsMetaURL;

  _export("default", void 0);

  return {
    setters: [function (_unresolved_) {
      _req = _unresolved_.__cjsMetaURL;
    }, function (_unresolved_2) {
      _req2 = _unresolved_2.__cjsMetaURL;
    }, function (_unresolved_3) {
      _req3 = _unresolved_3.__cjsMetaURL;
    }, function (_unresolved_4) {
      _req4 = _unresolved_4.__cjsMetaURL;
    }, function (_unresolved_5) {
      _req5 = _unresolved_5.__cjsMetaURL;
    }, function (_unresolved_6) {
      _req6 = _unresolved_6.__cjsMetaURL;
    }, function (_unresolved_7) {
      _req7 = _unresolved_7.__cjsMetaURL;
    }, function (_unresolved_8) {
      _loader = _unresolved_8.default;
    }],
    execute: function () {
      _loader.define(_context.meta.url, function (exports, _require, module, __filename, __dirname) {
        let require = _loader.createRequireWithReqMap({
          "../internals/global": _req,
          "../internals/function-call": _req2,
          "../internals/array-buffer-view-core": _req3,
          "../internals/length-of-array-like": _req4,
          "../internals/to-offset": _req5,
          "../internals/to-object": _req6,
          "../internals/fails": _req7
        }, _require);

        (function () {
          var global = require('../internals/global');

          var call = require('../internals/function-call');

          var ArrayBufferViewCore = require('../internals/array-buffer-view-core');

          var lengthOfArrayLike = require('../internals/length-of-array-like');

          var toOffset = require('../internals/to-offset');

          var toIndexedObject = require('../internals/to-object');

          var fails = require('../internals/fails');

          var RangeError = global.RangeError;
          var Int8Array = global.Int8Array;
          var Int8ArrayPrototype = Int8Array && Int8Array.prototype;
          var $set = Int8ArrayPrototype && Int8ArrayPrototype.set;
          var aTypedArray = ArrayBufferViewCore.aTypedArray;
          var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
          var WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS = !fails(function () {
            // eslint-disable-next-line es/no-typed-arrays -- required for testing
            var array = new Uint8ClampedArray(2);
            call($set, array, {
              length: 1,
              0: 3
            }, 1);
            return array[1] !== 3;
          }); // https://bugs.chromium.org/p/v8/issues/detail?id=11294 and other

          var TO_OBJECT_BUG = WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS && ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS && fails(function () {
            var array = new Int8Array(2);
            array.set(1);
            array.set('2', 1);
            return array[0] !== 0 || array[1] !== 2;
          }); // `%TypedArray%.prototype.set` method
          // https://tc39.es/ecma262/#sec-%typedarray%.prototype.set

          exportTypedArrayMethod('set', function set(arrayLike
          /* , offset */
          ) {
            aTypedArray(this);
            var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);
            var src = toIndexedObject(arrayLike);
            if (WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS) return call($set, this, src, offset);
            var length = this.length;
            var len = lengthOfArrayLike(src);
            var index = 0;
            if (len + offset > length) throw RangeError('Wrong length');

            while (index < len) this[offset + index] = src[index++];
          }, !WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS || TO_OBJECT_BUG);
        })();

        _export("default", _cjsExports = module.exports);
      });

      _export("__cjsMetaURL", __cjsMetaURL = _context.meta.url);
    }
  };
});
//# sourceMappingURL=es.typed-array.set.js.map