import I from "./index-metadata.js";
import { VALID_DIGITS as l } from "./index-constants3.js";
var c = new RegExp("([" + l + "])");
function D(t, r, f, n) {
  if (r) {
    var a = new I(n);
    a.selectNumberingPlan(r, f);
    var i = new RegExp(a.IDDPrefix());
    if (t.search(i) === 0) {
      t = t.slice(t.match(i)[0].length);
      var e = t.match(c);
      if (!(e && e[1] != null && e[1].length > 0 && e[1] === "0"))
        return t;
    }
  }
}
export {
  D as default
};
