intl-tel-input 23.0.5 → 23.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2773,7 +2773,7 @@ var intlTelInput = Object.assign(
2773
2773
  //* A map from instance ID to instance object.
2774
2774
  instances: {},
2775
2775
  loadUtils,
2776
- version: "23.0.5"
2776
+ version: "23.0.6"
2777
2777
  }
2778
2778
  );
2779
2779
  var intl_tel_input_default = intlTelInput;
@@ -2785,8 +2785,7 @@ var intl_tel_input_default = intlTelInput;
2785
2785
  a = a.split(".");
2786
2786
  var c = k;
2787
2787
  a[0] in c || "undefined" == typeof c.execScript || c.execScript("var " + a[0]);
2788
- for (var d; a.length && (d = a.shift()); )
2789
- a.length || void 0 === b ? c[d] && c[d] !== Object.prototype[d] ? c = c[d] : c = c[d] = {} : c[d] = b;
2788
+ for (var d; a.length && (d = a.shift()); ) a.length || void 0 === b ? c[d] && c[d] !== Object.prototype[d] ? c = c[d] : c = c[d] = {} : c[d] = b;
2790
2789
  }
2791
2790
  function n(a, b) {
2792
2791
  function c() {
@@ -2796,8 +2795,7 @@ var intl_tel_input_default = intlTelInput;
2796
2795
  a.prototype = new c();
2797
2796
  a.prototype.constructor = a;
2798
2797
  a.sa = function(d, e, f) {
2799
- for (var g = Array(arguments.length - 2), h = 2; h < arguments.length; h++)
2800
- g[h - 2] = arguments[h];
2798
+ for (var g = Array(arguments.length - 2), h = 2; h < arguments.length; h++) g[h - 2] = arguments[h];
2801
2799
  return b.prototype[e].apply(d, g);
2802
2800
  };
2803
2801
  }
@@ -2805,15 +2803,13 @@ var intl_tel_input_default = intlTelInput;
2805
2803
  function aa(a) {
2806
2804
  const b = [];
2807
2805
  let c = 0;
2808
- for (const d in a)
2809
- b[c++] = a[d];
2806
+ for (const d in a) b[c++] = a[d];
2810
2807
  return b;
2811
2808
  }
2812
2809
  ;
2813
2810
  var da = class {
2814
2811
  constructor(a) {
2815
- if (ba !== ba)
2816
- throw Error("SafeUrl is not meant to be built directly");
2812
+ if (ba !== ba) throw Error("SafeUrl is not meant to be built directly");
2817
2813
  this.g = a;
2818
2814
  }
2819
2815
  toString() {
@@ -2825,8 +2821,7 @@ var intl_tel_input_default = intlTelInput;
2825
2821
  const ea = {};
2826
2822
  class fa {
2827
2823
  constructor() {
2828
- if (ea !== ea)
2829
- throw Error("SafeStyle is not meant to be built directly");
2824
+ if (ea !== ea) throw Error("SafeStyle is not meant to be built directly");
2830
2825
  }
2831
2826
  toString() {
2832
2827
  return "".toString();
@@ -2836,8 +2831,7 @@ var intl_tel_input_default = intlTelInput;
2836
2831
  const ha = {};
2837
2832
  class ia {
2838
2833
  constructor() {
2839
- if (ha !== ha)
2840
- throw Error("SafeStyleSheet is not meant to be built directly");
2834
+ if (ha !== ha) throw Error("SafeStyleSheet is not meant to be built directly");
2841
2835
  }
2842
2836
  toString() {
2843
2837
  return "".toString();
@@ -2848,8 +2842,7 @@ var intl_tel_input_default = intlTelInput;
2848
2842
  class ka {
2849
2843
  constructor() {
2850
2844
  var a = k.trustedTypes && k.trustedTypes.emptyHTML || "";
2851
- if (ja !== ja)
2852
- throw Error("SafeHtml is not meant to be built directly");
2845
+ if (ja !== ja) throw Error("SafeHtml is not meant to be built directly");
2853
2846
  this.g = a;
2854
2847
  }
2855
2848
  toString() {
@@ -2917,10 +2910,8 @@ var intl_tel_input_default = intlTelInput;
2917
2910
  var g = 11 == e.h || 10 == e.h;
2918
2911
  if (e.l) {
2919
2912
  e = u(b, f);
2920
- for (var h = 0; h < e.length; h++)
2921
- va(a, f, g ? e[h].clone() : e[h]);
2922
- } else
2923
- e = v(b, f), g ? (g = v(a, f)) ? wa(g, e) : t(a, f, e.clone()) : t(a, f, e);
2913
+ for (var h = 0; h < e.length; h++) va(a, f, g ? e[h].clone() : e[h]);
2914
+ } else e = v(b, f), g ? (g = v(a, f)) ? wa(g, e) : t(a, f, e.clone()) : t(a, f, e);
2924
2915
  }
2925
2916
  }
2926
2917
  }
@@ -2934,18 +2925,14 @@ var intl_tel_input_default = intlTelInput;
2934
2925
  }
2935
2926
  function v(a, b) {
2936
2927
  var c = a.h[b];
2937
- if (null == c)
2938
- return null;
2928
+ if (null == c) return null;
2939
2929
  if (a.l) {
2940
2930
  if (!(b in a.g)) {
2941
2931
  var d = a.l, e = a.j[b];
2942
- if (null != c)
2943
- if (e.l) {
2944
- for (var f = [], g = 0; g < c.length; g++)
2945
- f[g] = d.h(e, c[g]);
2946
- c = f;
2947
- } else
2948
- c = d.h(e, c);
2932
+ if (null != c) if (e.l) {
2933
+ for (var f = [], g = 0; g < c.length; g++) f[g] = d.h(e, c[g]);
2934
+ c = f;
2935
+ } else c = d.h(e, c);
2949
2936
  return a.g[b] = c;
2950
2937
  }
2951
2938
  return a.g[b];
@@ -2957,24 +2944,18 @@ var intl_tel_input_default = intlTelInput;
2957
2944
  return a.j[b].l ? d[c || 0] : d;
2958
2945
  }
2959
2946
  function w(a, b) {
2960
- if (q(a, b))
2961
- a = r(a, b);
2962
- else
2963
- a: {
2964
- a = a.j[b];
2965
- if (void 0 === a.j)
2966
- if (b = a.s, b === Boolean)
2967
- a.j = false;
2968
- else if (b === Number)
2969
- a.j = 0;
2970
- else if (b === String)
2971
- a.j = a.o ? "0" : "";
2972
- else {
2973
- a = new b();
2974
- break a;
2975
- }
2976
- a = a.j;
2947
+ if (q(a, b)) a = r(a, b);
2948
+ else a: {
2949
+ a = a.j[b];
2950
+ if (void 0 === a.j) if (b = a.s, b === Boolean) a.j = false;
2951
+ else if (b === Number) a.j = 0;
2952
+ else if (b === String) a.j = a.o ? "0" : "";
2953
+ else {
2954
+ a = new b();
2955
+ break a;
2977
2956
  }
2957
+ a = a.j;
2958
+ }
2978
2959
  return a;
2979
2960
  }
2980
2961
  function u(a, b) {
@@ -2994,8 +2975,7 @@ var intl_tel_input_default = intlTelInput;
2994
2975
  }
2995
2976
  function y(a, b) {
2996
2977
  var c = [], d;
2997
- for (d in b)
2998
- 0 != d && c.push(new la(d, b[d]));
2978
+ for (d in b) 0 != d && c.push(new la(d, b[d]));
2999
2979
  return new ta(a, c);
3000
2980
  }
3001
2981
  ;
@@ -3006,18 +2986,13 @@ var intl_tel_input_default = intlTelInput;
3006
2986
  throw Error("Unimplemented");
3007
2987
  };
3008
2988
  z.prototype.h = function(a, b) {
3009
- if (11 == a.h || 10 == a.h)
3010
- return b instanceof p ? b : this.g(a.s.prototype.m(), b);
3011
- if (14 == a.h)
3012
- return "string" === typeof b && xa.test(b) && (a = Number(b), 0 < a) ? a : b;
3013
- if (!a.o)
3014
- return b;
2989
+ if (11 == a.h || 10 == a.h) return b instanceof p ? b : this.g(a.s.prototype.m(), b);
2990
+ if (14 == a.h) return "string" === typeof b && xa.test(b) && (a = Number(b), 0 < a) ? a : b;
2991
+ if (!a.o) return b;
3015
2992
  a = a.s;
3016
2993
  if (a === String) {
3017
- if ("number" === typeof b)
3018
- return String(b);
3019
- } else if (a === Number && "string" === typeof b && ("Infinity" === b || "-Infinity" === b || "NaN" === b || xa.test(b)))
3020
- return Number(b);
2994
+ if ("number" === typeof b) return String(b);
2995
+ } else if (a === Number && "string" === typeof b && ("Infinity" === b || "-Infinity" === b || "NaN" === b || xa.test(b))) return Number(b);
3021
2996
  return b;
3022
2997
  };
3023
2998
  var xa = /^-?[0-9]+$/;
@@ -3049,9 +3024,7 @@ var intl_tel_input_default = intlTelInput;
3049
3024
  };
3050
3025
  D.prototype.g = function(a, b, c) {
3051
3026
  this.h += String(a);
3052
- if (null != b)
3053
- for (let d = 1; d < arguments.length; d++)
3054
- this.h += arguments[d];
3027
+ if (null != b) for (let d = 1; d < arguments.length; d++) this.h += arguments[d];
3055
3028
  return this;
3056
3029
  };
3057
3030
  function E(a) {
@@ -8437,8 +8410,7 @@ var intl_tel_input_default = intlTelInput;
8437
8410
  return null != a && (1 != x(a, 9) || -1 != u(a, 9)[0]);
8438
8411
  }
8439
8412
  function O(a, b) {
8440
- for (var c = new D(), d, e = a.length, f = 0; f < e; ++f)
8441
- d = a.charAt(f), d = b[d.toUpperCase()], null != d && c.g(d);
8413
+ for (var c = new D(), d, e = a.length, f = 0; f < e; ++f) d = a.charAt(f), d = b[d.toUpperCase()], null != d && c.g(d);
8442
8414
  return c.toString();
8443
8415
  }
8444
8416
  function Ya(a) {
@@ -8450,15 +8422,12 @@ var intl_tel_input_default = intlTelInput;
8450
8422
  K.prototype.format = function(a, b) {
8451
8423
  if (0 == r(a, 2) && q(a, 5)) {
8452
8424
  var c = w(a, 5);
8453
- if (0 < c.length)
8454
- return c;
8425
+ if (0 < c.length) return c;
8455
8426
  }
8456
8427
  c = w(a, 1);
8457
8428
  var d = Q(a);
8458
- if (0 == b)
8459
- return Za(c, 0, d, "");
8460
- if (!(c in J))
8461
- return d;
8429
+ if (0 == b) return Za(c, 0, d, "");
8430
+ if (!(c in J)) return d;
8462
8431
  var e = R(this, c, S(c));
8463
8432
  a = q(a, 3) && 0 != r(a, 3).length ? 3 == b ? ";ext=" + r(a, 3) : q(e, 13) ? r(e, 13) + w(a, 3) : " ext. " + w(a, 3) : "";
8464
8433
  a: {
@@ -8485,8 +8454,7 @@ var intl_tel_input_default = intlTelInput;
8485
8454
  return "001" == c ? T(a, "" + b) : T(a, c);
8486
8455
  }
8487
8456
  function Q(a) {
8488
- if (!q(a, 2))
8489
- return "";
8457
+ if (!q(a, 2)) return "";
8490
8458
  var b = "" + r(a, 2);
8491
8459
  return q(a, 4) && r(a, 4) && 0 < w(a, 8) ? Array(w(a, 8) + 1).join("0") + b : b;
8492
8460
  }
@@ -8533,14 +8501,12 @@ var intl_tel_input_default = intlTelInput;
8533
8501
  return V(a, r(b, 1)) ? V(a, r(b, 5)) ? 4 : V(a, r(b, 4)) ? 3 : V(a, r(b, 6)) ? 5 : V(a, r(b, 8)) ? 6 : V(a, r(b, 7)) ? 7 : V(a, r(b, 21)) ? 8 : V(a, r(b, 25)) ? 9 : V(a, r(b, 28)) ? 10 : V(a, r(b, 2)) ? r(b, 18) || V(a, r(b, 3)) ? 2 : 0 : !r(b, 18) && V(a, r(b, 3)) ? 1 : -1 : -1;
8534
8502
  }
8535
8503
  function T(a, b) {
8536
- if (null == b)
8537
- return null;
8504
+ if (null == b) return null;
8538
8505
  b = b.toUpperCase();
8539
8506
  var c = a.g[b];
8540
8507
  if (null == c) {
8541
8508
  c = Da[b];
8542
- if (null == c)
8543
- return null;
8509
+ if (null == c) return null;
8544
8510
  c = new C().g(H.m(), c);
8545
8511
  a.g[b] = c;
8546
8512
  }
@@ -8551,32 +8517,28 @@ var intl_tel_input_default = intlTelInput;
8551
8517
  return 0 < x(b, 9) && -1 == u(b, 9).indexOf(c) ? false : N(w(b, 2), a);
8552
8518
  }
8553
8519
  function ab(a, b) {
8554
- if (null == b)
8555
- return null;
8520
+ if (null == b) return null;
8556
8521
  var c = w(b, 1);
8557
8522
  c = J[c];
8558
- if (null == c)
8559
- a = null;
8560
- else if (1 == c.length)
8561
- a = c[0];
8562
- else
8563
- a: {
8564
- b = Q(b);
8565
- for (var d, e = c.length, f = 0; f < e; f++) {
8566
- d = c[f];
8567
- var g = T(a, d);
8568
- if (q(g, 23)) {
8569
- if (0 == b.search(r(g, 23))) {
8570
- a = d;
8571
- break a;
8572
- }
8573
- } else if (-1 != $a(b, g)) {
8523
+ if (null == c) a = null;
8524
+ else if (1 == c.length) a = c[0];
8525
+ else a: {
8526
+ b = Q(b);
8527
+ for (var d, e = c.length, f = 0; f < e; f++) {
8528
+ d = c[f];
8529
+ var g = T(a, d);
8530
+ if (q(g, 23)) {
8531
+ if (0 == b.search(r(g, 23))) {
8574
8532
  a = d;
8575
8533
  break a;
8576
8534
  }
8535
+ } else if (-1 != $a(b, g)) {
8536
+ a = d;
8537
+ break a;
8577
8538
  }
8578
- a = null;
8579
8539
  }
8540
+ a = null;
8541
+ }
8580
8542
  return a;
8581
8543
  }
8582
8544
  function S(a) {
@@ -8585,55 +8547,42 @@ var intl_tel_input_default = intlTelInput;
8585
8547
  }
8586
8548
  function bb(a, b) {
8587
8549
  a = T(a, b);
8588
- if (null == a)
8589
- throw Error("Invalid region code: " + b);
8550
+ if (null == a) throw Error("Invalid region code: " + b);
8590
8551
  return w(a, 10);
8591
8552
  }
8592
8553
  function W(a, b, c, d) {
8593
8554
  var e = U(c, d), f = 0 == x(e, 9) ? u(r(c, 1), 9) : u(e, 9);
8594
8555
  e = u(e, 10);
8595
- if (2 == d)
8596
- if (Xa(U(c, 0)))
8597
- a = U(c, 1), Xa(a) && (f = f.concat(0 == x(a, 9) ? u(r(c, 1), 9) : u(a, 9)), f.sort(), 0 == e.length ? e = u(a, 10) : (e = e.concat(u(a, 10)), e.sort()));
8598
- else
8599
- return W(a, b, c, 1);
8600
- if (-1 == f[0])
8601
- return 5;
8556
+ if (2 == d) if (Xa(U(c, 0))) a = U(c, 1), Xa(a) && (f = f.concat(0 == x(a, 9) ? u(r(c, 1), 9) : u(a, 9)), f.sort(), 0 == e.length ? e = u(a, 10) : (e = e.concat(u(a, 10)), e.sort()));
8557
+ else return W(a, b, c, 1);
8558
+ if (-1 == f[0]) return 5;
8602
8559
  b = b.length;
8603
- if (-1 < e.indexOf(b))
8604
- return 4;
8560
+ if (-1 < e.indexOf(b)) return 4;
8605
8561
  c = f[0];
8606
8562
  return c == b ? 0 : c > b ? 2 : f[f.length - 1] < b ? 3 : -1 < f.indexOf(b, 1) ? 0 : 5;
8607
8563
  }
8608
8564
  function X(a, b, c) {
8609
8565
  var d = Q(b);
8610
8566
  b = w(b, 1);
8611
- if (!(b in J))
8612
- return 1;
8567
+ if (!(b in J)) return 1;
8613
8568
  b = R(a, b, S(b));
8614
8569
  return W(a, d, b, c);
8615
8570
  }
8616
8571
  function cb(a, b) {
8617
8572
  a = a.toString();
8618
- if (0 == a.length || "0" == a.charAt(0))
8619
- return 0;
8620
- for (var c, d = a.length, e = 1; 3 >= e && e <= d; ++e)
8621
- if (c = parseInt(a.substring(0, e), 10), c in J)
8622
- return b.g(a.substring(e)), c;
8573
+ if (0 == a.length || "0" == a.charAt(0)) return 0;
8574
+ for (var c, d = a.length, e = 1; 3 >= e && e <= d; ++e) if (c = parseInt(a.substring(0, e), 10), c in J) return b.g(a.substring(e)), c;
8623
8575
  return 0;
8624
8576
  }
8625
8577
  function db(a, b, c, d, e, f) {
8626
- if (0 == b.length)
8627
- return 0;
8578
+ if (0 == b.length) return 0;
8628
8579
  b = new D(b);
8629
8580
  var g;
8630
8581
  null != c && (g = r(c, 11));
8631
8582
  null == g && (g = "NonMatch");
8632
8583
  var h = b.toString();
8633
- if (0 == h.length)
8634
- g = 20;
8635
- else if (L.test(h))
8636
- h = h.replace(L, ""), E(b), b.g(Va(h)), g = 1;
8584
+ if (0 == h.length) g = 20;
8585
+ else if (L.test(h)) h = h.replace(L, ""), E(b), b.g(Va(h)), g = 1;
8637
8586
  else {
8638
8587
  h = new RegExp(g);
8639
8588
  Wa(b);
@@ -8642,21 +8591,17 @@ var intl_tel_input_default = intlTelInput;
8642
8591
  h = g.match(h)[0].length;
8643
8592
  var l = g.substring(h).match(Ia);
8644
8593
  l && null != l[1] && 0 < l[1].length && "0" == O(l[1], Ea) ? g = false : (E(b), b.g(g.substring(h)), g = true);
8645
- } else
8646
- g = false;
8594
+ } else g = false;
8647
8595
  g = g ? 5 : 20;
8648
8596
  }
8649
8597
  e && t(f, 6, g);
8650
8598
  if (20 != g) {
8651
- if (2 >= b.h.length)
8652
- throw Error("Phone number too short after IDD");
8599
+ if (2 >= b.h.length) throw Error("Phone number too short after IDD");
8653
8600
  a = cb(b, d);
8654
- if (0 != a)
8655
- return t(f, 1, a), a;
8601
+ if (0 != a) return t(f, 1, a), a;
8656
8602
  throw Error("Invalid country calling code");
8657
8603
  }
8658
- if (null != c && (g = w(c, 10), h = "" + g, l = b.toString(), 0 == l.lastIndexOf(h, 0) && (h = new D(l.substring(h.length)), l = r(c, 1), l = new RegExp(w(l, 2)), eb(h, c, null), h = h.toString(), !N(l, b.toString()) && N(l, h) || 3 == W(a, b.toString(), c, -1))))
8659
- return d.g(h), e && t(f, 6, 10), t(f, 1, g), g;
8604
+ if (null != c && (g = w(c, 10), h = "" + g, l = b.toString(), 0 == l.lastIndexOf(h, 0) && (h = new D(l.substring(h.length)), l = r(c, 1), l = new RegExp(w(l, 2)), eb(h, c, null), h = h.toString(), !N(l, b.toString()) && N(l, h) || 3 == W(a, b.toString(), c, -1)))) return d.g(h), e && t(f, 6, 10), t(f, 1, g), g;
8660
8605
  t(f, 1, 0);
8661
8606
  return 0;
8662
8607
  }
@@ -8669,46 +8614,36 @@ var intl_tel_input_default = intlTelInput;
8669
8614
  var h = N(f, d), l = e.length - 1;
8670
8615
  b = r(b, 16);
8671
8616
  if (null == b || 0 == b.length || null == e[l] || 0 == e[l].length) {
8672
- if (!h || N(f, d.substring(e[0].length)))
8673
- null != c && 0 < l && null != e[l] && c.g(e[1]), a.set(d.substring(e[0].length));
8674
- } else if (d = d.replace(g, b), !h || N(f, d))
8675
- null != c && 0 < l && c.g(e[1]), a.set(d);
8617
+ if (!h || N(f, d.substring(e[0].length))) null != c && 0 < l && null != e[l] && c.g(e[1]), a.set(d.substring(e[0].length));
8618
+ } else if (d = d.replace(g, b), !h || N(f, d)) null != c && 0 < l && c.g(e[1]), a.set(d);
8676
8619
  }
8677
8620
  }
8678
8621
  }
8679
8622
  function Y(a, b, c) {
8680
- if (!P(c) && 0 < b.length && "+" != b.charAt(0))
8681
- throw Error("Invalid country calling code");
8623
+ if (!P(c) && 0 < b.length && "+" != b.charAt(0)) throw Error("Invalid country calling code");
8682
8624
  return fb(a, b, c, true);
8683
8625
  }
8684
8626
  function fb(a, b, c, d) {
8685
- if (null == b)
8686
- throw Error("The string supplied did not seem to be a phone number");
8687
- if (250 < b.length)
8688
- throw Error("The string supplied is too long to be a phone number");
8627
+ if (null == b) throw Error("The string supplied did not seem to be a phone number");
8628
+ if (250 < b.length) throw Error("The string supplied is too long to be a phone number");
8689
8629
  var e = new D();
8690
8630
  var f = b.indexOf(";phone-context=");
8691
- if (-1 === f)
8692
- f = null;
8693
- else if (f += 15, f >= b.length)
8694
- f = "";
8631
+ if (-1 === f) f = null;
8632
+ else if (f += 15, f >= b.length) f = "";
8695
8633
  else {
8696
8634
  var g = b.indexOf(";", f);
8697
8635
  f = -1 !== g ? b.substring(f, g) : b.substring(f);
8698
8636
  }
8699
8637
  var h = f;
8700
8638
  null == h ? g = true : 0 === h.length ? g = false : (g = Na.exec(h), h = Oa.exec(h), g = null !== g || null !== h);
8701
- if (!g)
8702
- throw Error("The string supplied did not seem to be a phone number");
8639
+ if (!g) throw Error("The string supplied did not seem to be a phone number");
8703
8640
  null != f ? ("+" === f.charAt(0) && e.g(f), f = b.indexOf("tel:"), e.g(b.substring(0 <= f ? f + 4 : 0, b.indexOf(";phone-context=")))) : (f = e.g, g = b ?? "", h = g.search(Ja), 0 <= h ? (g = g.substring(h), g = g.replace(La, ""), h = g.search(Ka), 0 <= h && (g = g.substring(0, h))) : g = "", f.call(e, g));
8704
8641
  f = e.toString();
8705
8642
  g = f.indexOf(";isub=");
8706
8643
  0 < g && (E(e), e.g(f.substring(0, g)));
8707
- if (!Ua(e.toString()))
8708
- throw Error("The string supplied did not seem to be a phone number");
8644
+ if (!Ua(e.toString())) throw Error("The string supplied did not seem to be a phone number");
8709
8645
  f = e.toString();
8710
- if (!(P(c) || null != f && 0 < f.length && L.test(f)))
8711
- throw Error("Invalid country calling code");
8646
+ if (!(P(c) || null != f && 0 < f.length && L.test(f))) throw Error("Invalid country calling code");
8712
8647
  f = new I();
8713
8648
  d && t(f, 5, b);
8714
8649
  a: {
@@ -8716,13 +8651,12 @@ var intl_tel_input_default = intlTelInput;
8716
8651
  g = b.search(Qa);
8717
8652
  if (0 <= g && Ua(b.substring(0, g))) {
8718
8653
  h = b.match(Qa);
8719
- for (var l = h.length, A = 1; A < l; ++A)
8720
- if (null != h[A] && 0 < h[A].length) {
8721
- E(e);
8722
- e.g(b.substring(0, g));
8723
- b = h[A];
8724
- break a;
8725
- }
8654
+ for (var l = h.length, A = 1; A < l; ++A) if (null != h[A] && 0 < h[A].length) {
8655
+ E(e);
8656
+ e.g(b.substring(0, g));
8657
+ b = h[A];
8658
+ break a;
8659
+ }
8726
8660
  }
8727
8661
  b = "";
8728
8662
  }
@@ -8735,29 +8669,23 @@ var intl_tel_input_default = intlTelInput;
8735
8669
  h = db(a, l, g, b, d, f);
8736
8670
  } catch (ca) {
8737
8671
  if ("Invalid country calling code" == ca.message && L.test(l)) {
8738
- if (l = l.replace(L, ""), h = db(a, l, g, b, d, f), 0 == h)
8739
- throw ca;
8740
- } else
8741
- throw ca;
8672
+ if (l = l.replace(L, ""), h = db(a, l, g, b, d, f), 0 == h) throw ca;
8673
+ } else throw ca;
8742
8674
  }
8743
8675
  0 != h ? (e = S(h), e != c && (g = R(a, h, e))) : (Wa(e), b.g(e.toString()), null != c ? (h = w(g, 10), t(
8744
8676
  f,
8745
8677
  1,
8746
8678
  h
8747
8679
  )) : d && (delete f.h[6], f.g && delete f.g[6]));
8748
- if (2 > b.h.length)
8749
- throw Error("The string supplied is too short to be a phone number");
8680
+ if (2 > b.h.length) throw Error("The string supplied is too short to be a phone number");
8750
8681
  null != g && (c = new D(), e = new D(b.toString()), eb(e, g, c), a = W(a, e.toString(), g, -1), 2 != a && 4 != a && 5 != a && (b = e, d && 0 < c.toString().length && t(f, 7, c.toString())));
8751
8682
  d = b.toString();
8752
8683
  a = d.length;
8753
- if (2 > a)
8754
- throw Error("The string supplied is too short to be a phone number");
8755
- if (17 < a)
8756
- throw Error("The string supplied is too long to be a phone number");
8684
+ if (2 > a) throw Error("The string supplied is too short to be a phone number");
8685
+ if (17 < a) throw Error("The string supplied is too long to be a phone number");
8757
8686
  if (1 < d.length && "0" == d.charAt(0)) {
8758
8687
  t(f, 4, true);
8759
- for (a = 1; a < d.length - 1 && "0" == d.charAt(a); )
8760
- a++;
8688
+ for (a = 1; a < d.length - 1 && "0" == d.charAt(a); ) a++;
8761
8689
  1 != a && t(f, 8, a);
8762
8690
  }
8763
8691
  t(f, 2, parseInt(d, 10));
@@ -8798,8 +8726,7 @@ var intl_tel_input_default = intlTelInput;
8798
8726
  function lb(a) {
8799
8727
  for (var b = a.j.length, c = 0; c < b; ++c) {
8800
8728
  var d = a.j[c], e = w(d, 1);
8801
- if (a.da == e)
8802
- return false;
8729
+ if (a.da == e) return false;
8803
8730
  var f = a;
8804
8731
  var g = d, h = w(g, 1);
8805
8732
  E(f.v);
@@ -8808,8 +8735,7 @@ var intl_tel_input_default = intlTelInput;
8808
8735
  var A = "999999999999999".match(h)[0];
8809
8736
  A.length < l.g.h.length ? l = "" : (l = A.replace(new RegExp(h, "g"), g), l = l.replace(RegExp("9", "g"), "\u2008"));
8810
8737
  0 < l.length ? (f.v.g(l), f = true) : f = false;
8811
- if (f)
8812
- return a.da = e, a.ha = kb.test(r(d, 4)), a.$ = 0, true;
8738
+ if (f) return a.da = e, a.ha = kb.test(r(d, 4)), a.$ = 0, true;
8813
8739
  }
8814
8740
  return a.u = false;
8815
8741
  }
@@ -8827,10 +8753,8 @@ var intl_tel_input_default = intlTelInput;
8827
8753
  if (!a.u) {
8828
8754
  if (!a.la) {
8829
8755
  if (ob(a)) {
8830
- if (pb(a))
8831
- return qb(a);
8832
- } else if (0 < a.o.length && (b = a.g.toString(), E(a.g), a.g.g(a.o), a.g.g(b), b = a.h.toString(), c = b.lastIndexOf(a.o), E(a.h), a.h.g(b.substring(0, c))), a.o != rb(a))
8833
- return a.h.g(" "), qb(a);
8756
+ if (pb(a)) return qb(a);
8757
+ } else if (0 < a.o.length && (b = a.g.toString(), E(a.g), a.g.g(a.o), a.g.g(b), b = a.h.toString(), c = b.lastIndexOf(a.o), E(a.h), a.h.g(b.substring(0, c))), a.o != rb(a)) return a.h.g(" "), qb(a);
8834
8758
  }
8835
8759
  return a.s.toString();
8836
8760
  }
@@ -8840,18 +8764,14 @@ var intl_tel_input_default = intlTelInput;
8840
8764
  case 2:
8841
8765
  return a.s.toString();
8842
8766
  case 3:
8843
- if (ob(a))
8844
- a.ea = true;
8845
- else
8846
- return a.o = rb(a), sb(a);
8767
+ if (ob(a)) a.ea = true;
8768
+ else return a.o = rb(a), sb(a);
8847
8769
  default:
8848
- if (a.ea)
8849
- return pb(a) && (a.ea = false), a.h.toString() + a.g.toString();
8770
+ if (a.ea) return pb(a) && (a.ea = false), a.h.toString() + a.g.toString();
8850
8771
  if (0 < a.j.length) {
8851
8772
  b = tb(a, b);
8852
8773
  c = ub(a);
8853
- if (0 < c.length)
8854
- return c;
8774
+ if (0 < c.length) return c;
8855
8775
  mb(a, a.g.toString());
8856
8776
  return lb(a) ? vb(a) : a.u ? Z(a, b) : a.s.toString();
8857
8777
  }
@@ -8870,8 +8790,7 @@ var intl_tel_input_default = intlTelInput;
8870
8790
  function ub(a) {
8871
8791
  for (var b = a.g.toString(), c = a.j.length, d = 0; d < c; ++d) {
8872
8792
  var e = a.j[d], f = w(e, 1);
8873
- if (new RegExp("^(?:" + f + ")$").test(b) && (a.ha = kb.test(r(e, 4)), e = b.replace(new RegExp(f, "g"), r(e, 2)), e = Z(a, e), O(e, Fa) == a.ba))
8874
- return e;
8793
+ if (new RegExp("^(?:" + f + ")$").test(b) && (a.ha = kb.test(r(e, 4)), e = b.replace(new RegExp(f, "g"), r(e, 2)), e = Z(a, e), O(e, Fa) == a.ba)) return e;
8875
8794
  }
8876
8795
  return "";
8877
8796
  }
@@ -8895,18 +8814,15 @@ var intl_tel_input_default = intlTelInput;
8895
8814
  function vb(a) {
8896
8815
  var b = a.g.toString(), c = b.length;
8897
8816
  if (0 < c) {
8898
- for (var d = "", e = 0; e < c; e++)
8899
- d = tb(a, b.charAt(e));
8817
+ for (var d = "", e = 0; e < c; e++) d = tb(a, b.charAt(e));
8900
8818
  return a.u ? Z(a, d) : a.s.toString();
8901
8819
  }
8902
8820
  return a.h.toString();
8903
8821
  }
8904
8822
  function rb(a) {
8905
8823
  var b = a.g.toString(), c = 0;
8906
- if (1 != r(a.l, 10))
8907
- var d = false;
8908
- else
8909
- d = a.g.toString(), d = "1" == d.charAt(0) && "0" != d.charAt(1) && "1" != d.charAt(1);
8824
+ if (1 != r(a.l, 10)) var d = false;
8825
+ else d = a.g.toString(), d = "1" == d.charAt(0) && "0" != d.charAt(1) && "1" != d.charAt(1);
8910
8826
  d ? (c = 1, a.h.g("1").g(" "), a.ca = true) : q(a.l, 15) && (d = new RegExp("^(?:" + r(a.l, 15) + ")"), d = b.match(d), null != d && null != d[0] && 0 < d[0].length && (a.ca = true, c = d[0].length, a.h.g(b.substring(0, c))));
8911
8827
  E(a.g);
8912
8828
  a.g.g(b.substring(c));
@@ -8918,11 +8834,9 @@ var intl_tel_input_default = intlTelInput;
8918
8834
  return null != c && null != c[0] && 0 < c[0].length ? (a.ca = true, c = c[0].length, E(a.g), a.g.g(b.substring(c)), E(a.h), a.h.g(b.substring(0, c)), "+" != b.charAt(0) && a.h.g(" "), true) : false;
8919
8835
  }
8920
8836
  function pb(a) {
8921
- if (0 == a.g.h.length)
8922
- return false;
8837
+ if (0 == a.g.h.length) return false;
8923
8838
  var b = new D(), c = cb(a.g, b);
8924
- if (0 == c)
8925
- return false;
8839
+ if (0 == c) return false;
8926
8840
  E(a.g);
8927
8841
  a.g.g(b.toString());
8928
8842
  b = S(c);
@@ -8952,8 +8866,7 @@ var intl_tel_input_default = intlTelInput;
8952
8866
  try {
8953
8867
  const c = a.replace(/[^+0-9]/g, ""), d = new gb(b);
8954
8868
  b = "";
8955
- for (let e = 0; e < c.length; e++)
8956
- d.ja = nb(d, c.charAt(e)), b = d.ja;
8869
+ for (let e = 0; e < c.length; e++) d.ja = nb(d, c.charAt(e)), b = d.ja;
8957
8870
  return b;
8958
8871
  } catch (c) {
8959
8872
  return a;
@@ -9002,8 +8915,7 @@ var intl_tel_input_default = intlTelInput;
9002
8915
  try {
9003
8916
  const g = K.g(), h = Y(g, a, b);
9004
8917
  var c = ab(g, h), d = R(g, w(h, 1), c);
9005
- if (null == d)
9006
- var e = -1;
8918
+ if (null == d) var e = -1;
9007
8919
  else {
9008
8920
  var f = Q(h);
9009
8921
  e = $a(f, d);
@@ -9027,8 +8939,7 @@ var intl_tel_input_default = intlTelInput;
9027
8939
  var c = Y(l, a, b), d = ab(l, c);
9028
8940
  a = l;
9029
8941
  var e = w(c, 1), f = R(a, e, d);
9030
- if (null == f || "001" != d && e != bb(a, d))
9031
- var g = false;
8942
+ if (null == f || "001" != d && e != bb(a, d)) var g = false;
9032
8943
  else {
9033
8944
  var h = Q(c);
9034
8945
  g = -1 != $a(h, f);
@@ -9067,7 +8978,7 @@ var intlTelInputWithUtils_default = intl_tel_input_default;
9067
8978
 
9068
8979
  // react/src/intl-tel-input/reactWithUtils.tsx
9069
8980
  var import_react = __toESM(require("react"));
9070
- var IntlTelInput = ({
8981
+ var IntlTelInput = (0, import_react.forwardRef)(function IntlTelInput2({
9071
8982
  initialValue = "",
9072
8983
  onChangeNumber = () => {
9073
8984
  },
@@ -9080,9 +8991,13 @@ var IntlTelInput = ({
9080
8991
  usePreciseValidation = false,
9081
8992
  initOptions = {},
9082
8993
  inputProps = {}
9083
- }) => {
8994
+ }, ref) {
9084
8995
  const inputRef = (0, import_react.useRef)(null);
9085
8996
  const itiRef = (0, import_react.useRef)(null);
8997
+ (0, import_react.useImperativeHandle)(ref, () => ({
8998
+ getInstance: () => itiRef.current,
8999
+ getInput: () => inputRef.current
9000
+ }));
9086
9001
  const update = () => {
9087
9002
  const num = itiRef.current?.getNumber() || "";
9088
9003
  const countryIso = itiRef.current?.getSelectedCountryData().iso2 || "";
@@ -9124,5 +9039,5 @@ var IntlTelInput = ({
9124
9039
  ...inputProps
9125
9040
  }
9126
9041
  );
9127
- };
9042
+ });
9128
9043
  var reactWithUtils_default = IntlTelInput;