import { b as isObject$1 } from './normalize-component-43ce05b9.js';
import { c as classofRaw, w as wellKnownSymbol$1 } from './well-known-symbol-9b7e0fd8.js';

var classof = classofRaw;

// `IsArray` abstract operation
// https://tc39.es/ecma262/#sec-isarray
// eslint-disable-next-line es/no-array-isarray -- safe
var isArray$1 = Array.isArray || function isArray(arg) {
  return classof(arg) == 'Array';
};

var isObject = isObject$1;
var isArray = isArray$1;
var wellKnownSymbol = wellKnownSymbol$1;

var SPECIES = wellKnownSymbol('species');

// `ArraySpeciesCreate` abstract operation
// https://tc39.es/ecma262/#sec-arrayspeciescreate
var arraySpeciesCreate = function (originalArray, length) {
  var C;
  if (isArray(originalArray)) {
    C = originalArray.constructor;
    // cross-realm fallback
    if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
    else if (isObject(C)) {
      C = C[SPECIES];
      if (C === null) C = undefined;
    }
  } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
};

export { arraySpeciesCreate as a, isArray$1 as i };
