{"version":3,"file":"_reorder.cjs","sources":["../../../../../../../.yarn/berry/cache/lodash-es-npm-4.18.1-02cf41b912-10c0.zip/node_modules/lodash-es/_reorder.js"],"sourcesContent":["import copyArray from './_copyArray.js';\nimport isIndex from './_isIndex.js';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\nfunction reorder(array, indexes) {\n  var arrLength = array.length,\n      length = nativeMin(indexes.length, arrLength),\n      oldArray = copyArray(array);\n\n  while (length--) {\n    var index = indexes[length];\n    array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n  }\n  return array;\n}\n\nexport default reorder;\n"],"names":["copyArray","isIndex"],"mappings":";;;AAIA,IAAI,YAAY,KAAK;AAYrB,SAAS,QAAQ,OAAO,SAAS;AAC/B,MAAI,YAAY,MAAM,QAClB,SAAS,UAAU,QAAQ,QAAQ,SAAS,GAC5C,WAAWA,WAAU,KAAK;AAE9B,SAAO,UAAU;AACf,QAAI,QAAQ,QAAQ,MAAM;AAC1B,UAAM,MAAM,IAAIC,SAAQ,OAAO,SAAS,IAAI,SAAS,KAAK,IAAI;AAAA,EAChE;AACA,SAAO;AACT;;","x_google_ignoreList":[0]}