import { v as c } from "./index-DSGwv2Yx.js";
function i(e, n) {
  for (let t = 0; t < e.length; ++t)
    if (e[e.length - t - 1] !== n - 1 - t)
      return !1;
  return !0;
}
function a(e, n, t) {
  const r = e.length + n.length, s = [];
  let o = 0, f = 0;
  for (let u = 0; u < r; u++)
    t.indexOf(u) === -1 ? s.push(e[o++]) : s.push(n[f++]);
  return s;
}
function l(e, n) {
  const t = [], r = e.length;
  for (let o = 0; o < r; o++)
    n.indexOf(o) === -1 && t.push(e[o]);
  const s = n.map((o) => e[o]);
  return [t, s];
}
function h(e, n) {
  const t = n.map((r) => 1);
  return a(e, t, n);
}
function m(e, n, t) {
  c(i(n, t), () => `${e} supports only inner-most axes for now. Got axes ${n} and rank-${t} input.`);
}
function d(e, n) {
  if (i(e, n))
    return null;
  const t = [];
  for (let r = 0; r < n; ++r)
    e.indexOf(r) === -1 && t.push(r);
  return e.forEach((r) => t.push(r)), t;
}
function g(e) {
  return e.map((n, t) => [t, n]).sort((n, t) => n[1] - t[1]).map((n) => n[0]);
}
function x(e, n) {
  const t = [];
  for (let r = n - e; r < n; ++r)
    t.push(r);
  return t;
}
export {
  d as a,
  x as b,
  l as c,
  m as d,
  h as e,
  i as f,
  g,
  a as h
};
