"use client";
import g from "./number.js";
var x = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, c = new RegExp(x.source, "g");
function h(i) {
  return function() {
    return i;
  };
}
function m(i) {
  return function(n) {
    return i(n) + "";
  };
}
function v(i, n) {
  var u = x.lastIndex = c.lastIndex = 0, f, l, t, r = -1, e = [], s = [];
  for (i = i + "", n = n + ""; (f = x.exec(i)) && (l = c.exec(n)); )
    (t = l.index) > u && (t = n.slice(u, t), e[r] ? e[r] += t : e[++r] = t), (f = f[0]) === (l = l[0]) ? e[r] ? e[r] += l : e[++r] = l : (e[++r] = null, s.push({ i: r, x: g(f, l) })), u = c.lastIndex;
  return u < n.length && (t = n.slice(u), e[r] ? e[r] += t : e[++r] = t), e.length < 2 ? s[0] ? m(s[0].x) : h(n) : (n = s.length, function(a) {
    for (var o = 0, d; o < n; ++o) e[(d = s[o]).i] = d.x(a);
    return e.join("");
  });
}
export {
  v as default
};
