import { VALID_DIGITS as n } from "./index-constants3.js";
var v = "+", I = "[\\-\\.\\(\\)]?", R = "([" + n + "]|" + I + ")", i = "^\\" + v + R + "*[" + n + "]" + R + "*$", N = new RegExp(i, "g"), r = n, C = "[" + r + "]+((\\-)*[" + r + "])*", L = "a-zA-Z", f = "[" + L + "]+((\\-)*[" + r + "])*", E = "^(" + C + "\\.)*" + f + "\\.?$", O = new RegExp(E, "g"), l = "tel:", a = ";phone-context=", u = ";isub=";
function D(_) {
  var t = _.indexOf(a);
  if (t < 0)
    return null;
  var e = t + a.length;
  if (e >= _.length)
    return "";
  var A = _.indexOf(";", e);
  return A >= 0 ? _.substring(e, A) : _.substring(e);
}
function S(_) {
  return _ === null ? !0 : _.length === 0 ? !1 : N.test(_) || O.test(_);
}
export {
  v as PLUS_SIGN,
  u as RFC3966_ISDN_SUBADDRESS_,
  a as RFC3966_PHONE_CONTEXT_,
  l as RFC3966_PREFIX_,
  D as default,
  S as isPhoneContextValid
};
