soff-phone 0.0.1 → 0.0.3

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.
Files changed (136) hide show
  1. package/README.md +102 -14
  2. package/dist/ar-BRemFHRv.d.ts +10 -0
  3. package/dist/ar-JxzqPct0.d.cts +10 -0
  4. package/dist/br-COFIo49r.d.cts +10 -0
  5. package/dist/br-Ct41H5gk.d.ts +10 -0
  6. package/dist/ca-C0PYBvZK.d.cts +10 -0
  7. package/dist/ca-CNnuf6qY.d.ts +10 -0
  8. package/dist/cl-BSQlXUww.d.cts +10 -0
  9. package/dist/cl-W_f2Hza8.d.ts +10 -0
  10. package/dist/cr-C3m9H-RU.d.cts +10 -0
  11. package/dist/cr-UzSwttKD.d.ts +10 -0
  12. package/dist/de-ZAyw44MG.d.cts +10 -0
  13. package/dist/de-bIFBVR-K.d.ts +10 -0
  14. package/dist/ec-CCV5mLhv.d.ts +10 -0
  15. package/dist/ec-D7HUkRKn.d.cts +10 -0
  16. package/dist/es-C7dIuFpf.d.cts +10 -0
  17. package/dist/es-DVVnhfSE.d.ts +10 -0
  18. package/dist/fr-BSghMzs5.d.cts +10 -0
  19. package/dist/fr-C8OxubJ3.d.ts +10 -0
  20. package/dist/gb-B5NBNoma.d.cts +10 -0
  21. package/dist/gb-DDivDdMy.d.ts +10 -0
  22. package/dist/gt-DiiNa6Vm.d.ts +10 -0
  23. package/dist/gt-uZfIOMWw.d.cts +10 -0
  24. package/dist/index.cjs +1 -1
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.cts +16 -0
  27. package/dist/index.d.ts +16 -0
  28. package/dist/index.js +1 -1
  29. package/dist/index.js.map +1 -1
  30. package/dist/it-BtfZnlF6.d.cts +10 -0
  31. package/dist/it-DollYcFl.d.ts +10 -0
  32. package/dist/locales/ar.cjs +2 -0
  33. package/dist/locales/ar.cjs.map +1 -0
  34. package/dist/locales/ar.d.cts +2 -0
  35. package/dist/locales/ar.d.ts +2 -0
  36. package/dist/locales/ar.js +2 -0
  37. package/dist/locales/ar.js.map +1 -0
  38. package/dist/locales/br.cjs +2 -0
  39. package/dist/locales/br.cjs.map +1 -0
  40. package/dist/locales/br.d.cts +2 -0
  41. package/dist/locales/br.d.ts +2 -0
  42. package/dist/locales/br.js +2 -0
  43. package/dist/locales/br.js.map +1 -0
  44. package/dist/locales/ca.cjs +2 -0
  45. package/dist/locales/ca.cjs.map +1 -0
  46. package/dist/locales/ca.d.cts +2 -0
  47. package/dist/locales/ca.d.ts +2 -0
  48. package/dist/locales/ca.js +2 -0
  49. package/dist/locales/ca.js.map +1 -0
  50. package/dist/locales/cl.cjs +2 -0
  51. package/dist/locales/cl.cjs.map +1 -0
  52. package/dist/locales/cl.d.cts +2 -0
  53. package/dist/locales/cl.d.ts +2 -0
  54. package/dist/locales/cl.js +2 -0
  55. package/dist/locales/cl.js.map +1 -0
  56. package/dist/locales/cr.cjs +2 -0
  57. package/dist/locales/cr.cjs.map +1 -0
  58. package/dist/locales/cr.d.cts +2 -0
  59. package/dist/locales/cr.d.ts +2 -0
  60. package/dist/locales/cr.js +2 -0
  61. package/dist/locales/cr.js.map +1 -0
  62. package/dist/locales/de.cjs +2 -0
  63. package/dist/locales/de.cjs.map +1 -0
  64. package/dist/locales/de.d.cts +2 -0
  65. package/dist/locales/de.d.ts +2 -0
  66. package/dist/locales/de.js +2 -0
  67. package/dist/locales/de.js.map +1 -0
  68. package/dist/locales/ec.cjs +2 -0
  69. package/dist/locales/ec.cjs.map +1 -0
  70. package/dist/locales/ec.d.cts +2 -0
  71. package/dist/locales/ec.d.ts +2 -0
  72. package/dist/locales/ec.js +2 -0
  73. package/dist/locales/ec.js.map +1 -0
  74. package/dist/locales/es.cjs +2 -0
  75. package/dist/locales/es.cjs.map +1 -0
  76. package/dist/locales/es.d.cts +2 -0
  77. package/dist/locales/es.d.ts +2 -0
  78. package/dist/locales/es.js +2 -0
  79. package/dist/locales/es.js.map +1 -0
  80. package/dist/locales/fr.cjs +2 -0
  81. package/dist/locales/fr.cjs.map +1 -0
  82. package/dist/locales/fr.d.cts +2 -0
  83. package/dist/locales/fr.d.ts +2 -0
  84. package/dist/locales/fr.js +2 -0
  85. package/dist/locales/fr.js.map +1 -0
  86. package/dist/locales/gb.cjs +2 -0
  87. package/dist/locales/gb.cjs.map +1 -0
  88. package/dist/locales/gb.d.cts +2 -0
  89. package/dist/locales/gb.d.ts +2 -0
  90. package/dist/locales/gb.js +2 -0
  91. package/dist/locales/gb.js.map +1 -0
  92. package/dist/locales/gt.cjs +2 -0
  93. package/dist/locales/gt.cjs.map +1 -0
  94. package/dist/locales/gt.d.cts +2 -0
  95. package/dist/locales/gt.d.ts +2 -0
  96. package/dist/locales/gt.js +2 -0
  97. package/dist/locales/gt.js.map +1 -0
  98. package/dist/locales/it.cjs +2 -0
  99. package/dist/locales/it.cjs.map +1 -0
  100. package/dist/locales/it.d.cts +2 -0
  101. package/dist/locales/it.d.ts +2 -0
  102. package/dist/locales/it.js +2 -0
  103. package/dist/locales/it.js.map +1 -0
  104. package/dist/locales/pa.cjs +2 -0
  105. package/dist/locales/pa.cjs.map +1 -0
  106. package/dist/locales/pa.d.cts +2 -0
  107. package/dist/locales/pa.d.ts +2 -0
  108. package/dist/locales/pa.js +2 -0
  109. package/dist/locales/pa.js.map +1 -0
  110. package/dist/locales/pe.cjs +2 -0
  111. package/dist/locales/pe.cjs.map +1 -0
  112. package/dist/locales/pe.d.cts +2 -0
  113. package/dist/locales/pe.d.ts +2 -0
  114. package/dist/locales/pe.js +2 -0
  115. package/dist/locales/pe.js.map +1 -0
  116. package/dist/locales/us.cjs +2 -0
  117. package/dist/locales/us.cjs.map +1 -0
  118. package/dist/locales/us.d.cts +2 -0
  119. package/dist/locales/us.d.ts +2 -0
  120. package/dist/locales/us.js +2 -0
  121. package/dist/locales/us.js.map +1 -0
  122. package/dist/locales/ve.cjs +2 -0
  123. package/dist/locales/ve.cjs.map +1 -0
  124. package/dist/locales/ve.d.cts +2 -0
  125. package/dist/locales/ve.d.ts +2 -0
  126. package/dist/locales/ve.js +2 -0
  127. package/dist/locales/ve.js.map +1 -0
  128. package/dist/pa-CEAa_MLu.d.cts +10 -0
  129. package/dist/pa-CeerPsSh.d.ts +10 -0
  130. package/dist/pe-CHVFUsc1.d.cts +10 -0
  131. package/dist/pe-ZpTRwvEa.d.ts +10 -0
  132. package/dist/us-BV-jF4X9.d.cts +10 -0
  133. package/dist/us-DcxF3Jrz.d.ts +10 -0
  134. package/dist/ve-Czf_bYd9.d.ts +10 -0
  135. package/dist/ve-DMPrCtKR.d.cts +10 -0
  136. package/package.json +193 -10
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- var u=Object.defineProperty;var m=(o,n)=>{for(var e in n)u(o,e,{get:n[e],enumerable:true});};function i(o){return o.replace(/\D/g,"")}function a(o,n){return `+${o}${n}`}var h={};m(h,{validate:()=>d});var l="57";function d(o,n){let e=i(o),t=e;if(e.startsWith(l)&&e.length>10&&(t=e.slice(l.length)),t.length!==10)return {isValid:false,error:"Phone number must be 10 digits"};let r="unknown";if(t.startsWith("3"))r="mobile";else if(t.startsWith("60"))r="landline";else return {isValid:false,error:"Invalid prefix for Colombia"};let f=t;return n?.format==="e164"?f=a(l,t):n?.format==="international"&&(f=`+${l} ${t}`),{isValid:true,type:r,formatted:f}}var p={};m(p,{validate:()=>c});var s="52";function c(o,n){let e=i(o),t=e;if(e.startsWith(s)&&e.length>10&&(t=e.slice(s.length)),t.length!==10)return {isValid:false,error:"Phone number must be 10 digits"};let r=t;return n?.format==="e164"?r=a(s,t):n?.format==="international"&&(r=`+${s} ${t}`),{isValid:true,type:"unknown",formatted:r}}export{i as cleanPhone,h as co,a as formatE164,p as mx};//# sourceMappingURL=index.js.map
1
+ var H=Object.defineProperty;var s=(r,o)=>{for(var t in o)H(r,t,{get:o[t],enumerable:true});};function l(r){return r.replace(/\D/g,"")}function a(r,o){return `+${r}${o}`}var w={};s(w,{validate:()=>J});var m="54";function J(r,o){let t=l(r),e=t;if(t.startsWith(m)&&t.length>10&&(e=t.slice(m.length)),e.length!==10)return {isValid:false,error:"Phone number must be 10 digits"};let n="unknown";e.startsWith("9")?n="mobile":/^(11|2|3|4)/.test(e)&&(n="landline");let i=e;return o?.format==="e164"?i=a(m,e):o?.format==="international"&&(i=`+${m} ${e}`),{isValid:true,type:n,formatted:i}}var W={};s(W,{validate:()=>K});var h="55";function K(r,o){let t=l(r),e=t;if(t.startsWith(h)&&t.length>10&&(e=t.slice(h.length)),e.length!==10&&e.length!==11)return {isValid:false,error:"Phone number must be 10 or 11 digits"};let n="unknown";if(e.length===11&&e[2]==="9")n="mobile";else if(e.length===10)n="landline";else return {isValid:false,error:"Invalid phone format for Brazil"};let i=e;return o?.format==="e164"?i=a(h,e):o?.format==="international"&&(i=`+${h} ${e}`),{isValid:true,type:n,formatted:i}}var v={};s(v,{validate:()=>L});var d="56";function L(r,o){let t=l(r),e=t;if(t.startsWith(d)&&t.length>9&&(e=t.slice(d.length)),e.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let n="unknown";if(e.startsWith("9"))n="mobile";else if(/^[2-7]/.test(e))n="landline";else return {isValid:false,error:"Invalid prefix for Chile"};let i=e;return o?.format==="e164"?i=a(d,e):o?.format==="international"&&(i=`+${d} ${e}`),{isValid:true,type:n,formatted:i}}var j={};s(j,{validate:()=>M});var u="57";function M(r,o){let t=l(r),e=t;if(t.startsWith(u)&&t.length>10&&(e=t.slice(u.length)),e.length!==10)return {isValid:false,error:"Phone number must be 10 digits"};let n="unknown";if(e.startsWith("3"))n="mobile";else if(e.startsWith("60"))n="landline";else return {isValid:false,error:"Invalid prefix for Colombia"};let i=e;return o?.format==="e164"?i=a(u,e):o?.format==="international"&&(i=`+${u} ${e}`),{isValid:true,type:n,formatted:i}}var D={};s(D,{validate:()=>Q});var p="506";function Q(r,o){let t=l(r),e=t;if(t.startsWith(p)&&t.length>8&&(e=t.slice(p.length)),e.length!==8)return {isValid:false,error:"Phone number must be 8 digits"};let n="unknown";/^[5678]/.test(e)?n="mobile":e.startsWith("2")&&(n="landline");let i=e;return o?.format==="e164"?i=a(p,e):o?.format==="international"&&(i=`+${p} ${e}`),{isValid:true,type:n,formatted:i}}var N={};s(N,{validate:()=>X});var c="593";function X(r,o){let t=l(r),e=t;if(t.startsWith(c)&&t.length>9&&(e=t.slice(c.length)),e.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let n="unknown";if(e.startsWith("9"))n="mobile";else if(/^[2-7]/.test(e))n="landline";else return {isValid:false,error:"Invalid prefix for Ecuador"};let i=e;return o?.format==="e164"?i=a(c,e):o?.format==="international"&&(i=`+${c} ${e}`),{isValid:true,type:n,formatted:i}}var T={};s(T,{validate:()=>Z});var P="502";function Z(r,o){let t=l(r),e=t;if(t.startsWith(P)&&t.length>8&&(e=t.slice(P.length)),e.length!==8)return {isValid:false,error:"Phone number must be 8 digits"};let n="unknown";/^[345]/.test(e)?n="mobile":/^[267]/.test(e)&&(n="landline");let i=e;return o?.format==="e164"?i=a(P,e):o?.format==="international"&&(i=`+${P} ${e}`),{isValid:true,type:n,formatted:i}}var U={};s(U,{validate:()=>ee});var g="52";function ee(r,o){let t=l(r),e=t;if(t.startsWith(g)&&t.length>10&&(e=t.slice(g.length)),e.length!==10)return {isValid:false,error:"Phone number must be 10 digits"};let n=e;return o?.format==="e164"?n=a(g,e):o?.format==="international"&&(n=`+${g} ${e}`),{isValid:true,type:"unknown",formatted:n}}var Y={};s(Y,{validate:()=>te});var V="507";function te(r,o){let t=l(r),e=t;if(t.startsWith(V)&&t.length>8&&(e=t.slice(V.length)),e.length!==8)return {isValid:false,error:"Phone number must be 8 digits"};let n="unknown";e.startsWith("6")?n="mobile":/^[2-57-9]/.test(e)&&(n="landline");let i=e;return o?.format==="e164"?i=a(V,e):o?.format==="international"&&(i=`+${V} ${e}`),{isValid:true,type:n,formatted:i}}var _={};s(_,{validate:()=>ne});var b="51";function ne(r,o){let t=l(r),e=t;if(t.startsWith(b)&&t.length>9&&(e=t.slice(b.length)),e.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let n="unknown";if(e.startsWith("9"))n="mobile";else if(/^[01]/.test(e))n="landline";else return {isValid:false,error:"Invalid prefix for Peru"};let i=e;return o?.format==="e164"?i=a(b,e):o?.format==="international"&&(i=`+${b} ${e}`),{isValid:true,type:n,formatted:i}}var I={};s(I,{validate:()=>ie});var O="58";function ie(r,o){let t=l(r),e=t;if(t.startsWith(O)&&t.length>10&&(e=t.slice(O.length)),e.length!==10)return {isValid:false,error:"Phone number must be 10 digits"};let n="unknown";e.startsWith("4")?n="mobile":/^[2]/.test(e)&&(n="landline");let i=e;return o?.format==="e164"?i=a(O,e):o?.format==="international"&&(i=`+${O} ${e}`),{isValid:true,type:n,formatted:i}}var z={};s(z,{validate:()=>oe});var y="1";function oe(r,o){let t=l(r),e=t;if(t.startsWith(y)&&t.length===11&&(e=t.slice(y.length)),e.length!==10)return {isValid:false,error:"Phone number must be 10 digits"};let n=e.substring(0,3);if(!/^[2-9][0-8][0-9]$/.test(n))return {isValid:false,error:"Invalid area code"};let i=e.substring(3,6);if(!/^[2-9]\d{2}$/.test(i))return {isValid:false,error:"Invalid exchange code"};let f=e;return o?.format==="e164"?f=a(y,e):o?.format==="international"&&(f=`+${y} ${e}`),{isValid:true,type:"unknown",formatted:f}}var B={};s(B,{validate:()=>re});var R="1";function re(r,o){let t=l(r),e=t;if(t.startsWith(R)&&t.length===11&&(e=t.slice(R.length)),e.length!==10)return {isValid:false,error:"Phone number must be 10 digits"};let n=e.substring(0,3);if(!/^[2-9][0-8][0-9]$/.test(n))return {isValid:false,error:"Invalid area code"};let i=e.substring(3,6);if(!/^[2-9]\d{2}$/.test(i))return {isValid:false,error:"Invalid exchange code"};let f=e;return o?.format==="e164"?f=a(R,e):o?.format==="international"&&(f=`+${R} ${e}`),{isValid:true,type:"unknown",formatted:f}}var S={};s(S,{validate:()=>le});var x="49";function le(r,o){let t=l(r),e=t;if(t.startsWith(x)&&(e=t.slice(x.length)),e.startsWith("0")&&(e=e.slice(1)),e.length<9||e.length>11)return {isValid:false,error:"Phone number must be 9-11 digits"};let n="unknown";/^1[567]/.test(e)?n="mobile":n="landline";let i=e;return o?.format==="e164"?i=a(x,e):o?.format==="international"&&(i=`+${x} ${e}`),{isValid:true,type:n,formatted:i}}var q={};s(q,{validate:()=>ae});var C="34";function ae(r,o){let t=l(r),e=t;if(t.startsWith(C)&&t.length>9&&(e=t.slice(C.length)),e.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let n="unknown";if(/^[67]/.test(e))n="mobile";else if(/^[89]/.test(e))n="landline";else return {isValid:false,error:"Invalid prefix for Spain"};let i=e;return o?.format==="e164"?i=a(C,e):o?.format==="international"&&(i=`+${C} ${e}`),{isValid:true,type:n,formatted:i}}var A={};s(A,{validate:()=>se});var $="33";function se(r,o){let t=l(r),e=t;if(t.startsWith($)&&t.length>9&&(e=t.slice($.length)),e.startsWith("0")&&(e=e.slice(1)),e.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let n="unknown";/^[67]/.test(e)?n="mobile":/^[1-5,9]/.test(e)&&(n="landline");let i=e;return o?.format==="e164"?i=a($,e):o?.format==="international"&&(i=`+${$} ${e}`),{isValid:true,type:n,formatted:i}}var F={};s(F,{validate:()=>fe});var E="44";function fe(r,o){let t=l(r),e=t;if(t.startsWith(E)&&t.length>10&&(e=t.slice(E.length)),e.startsWith("0")&&(e=e.slice(1)),e.length!==10)return {isValid:false,error:"Phone number must be 10 digits"};let n="unknown";e.startsWith("7")?n="mobile":/^[123]/.test(e)&&(n="landline");let i=e;return o?.format==="e164"?i=a(E,e):o?.format==="international"&&(i=`+${E} ${e}`),{isValid:true,type:n,formatted:i}}var G={};s(G,{validate:()=>me});var k="39";function me(r,o){let t=l(r),e=t;if(t.startsWith(k)&&t.length>9&&(e=t.slice(k.length)),e.startsWith("0")&&(e=e.slice(1)),e.length<9||e.length>10)return {isValid:false,error:"Phone number must be 9-10 digits"};let n="unknown";e.startsWith("3")?n="mobile":n="landline";let i=e;return o?.format==="e164"?i=a(k,e):o?.format==="international"&&(i=`+${k} ${e}`),{isValid:true,type:n,formatted:i}}export{w as ar,W as br,z as ca,v as cl,l as cleanPhone,j as co,D as cr,S as de,N as ec,q as es,a as formatE164,A as fr,F as gb,T as gt,G as it,U as mx,Y as pa,_ as pe,B as us,I as ve};//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/core/utils.ts","../src/locales/co.ts","../src/locales/mx.ts"],"names":["cleanPhone","phone","formatE164","countryCode","co_exports","__export","validate","COUNTRY_CODE","options","cleaned","national","type","formatted","mx_exports"],"mappings":"6FAAO,SAASA,CAAAA,CAAWC,EAAuB,CAChD,OAAOA,EAAM,OAAA,CAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,CAAAA,CAAqBF,EAAuB,CACrE,OAAO,IAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,KCNAG,CAAAA,CAAA,GAAAC,EAAAD,CAAAA,CAAA,CAAA,QAAA,CAAA,IAAAE,IAGA,IAAMC,CAAAA,CAAe,KAEd,SAASD,CAAAA,CAASL,EAAeO,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUT,CAAAA,CAAWC,CAAK,CAAA,CAG5BS,CAAAA,CAAWD,CAAAA,CAKf,GAJIA,CAAAA,CAAQ,UAAA,CAAWF,CAAY,CAAA,EAAKE,CAAAA,CAAQ,OAAS,EAAA,GACvDC,CAAAA,CAAWD,EAAQ,KAAA,CAAMF,CAAAA,CAAa,MAAM,CAAA,CAAA,CAG1CG,CAAAA,CAAS,SAAW,EAAA,CACtB,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,MAAO,gCAAiC,CAAA,CAGnE,IAAIC,CAAAA,CAA0C,SAAA,CAG9C,GAAID,EAAS,UAAA,CAAW,GAAG,EACzBC,CAAAA,CAAO,QAA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E,CAAU,CACrD","file":"index.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '57';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 10) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n if (national.length !== 10) {\n return { isValid: false, error: 'Phone number must be 10 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 3\n if (national.startsWith('3')) {\n type = 'mobile';\n }\n // Landline: Starts with 60\n else if (national.startsWith('60')) {\n type = 'landline';\n } else {\n return { isValid: false, error: 'Invalid prefix for Colombia' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '52';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 10) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n if (national.length !== 10) {\n return { isValid: false, error: 'Phone number must be 10 digits' };\n }\n\n // Mexico doesn't strictly separate mobile/landline ranges as clearly in the first digit anymore for all cases,\n // but generally we can just validate length.\n // Distinction is harder without a massive database of area codes.\n // We will mark as 'unknown' type unless we want to implement complex area code logic.\n // For now, let's assume valid if 10 digits.\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type: 'unknown', formatted };\n}\n"]}
1
+ {"version":3,"sources":["../src/core/utils.ts","../src/locales/ar.ts","../src/locales/br.ts","../src/locales/cl.ts","../src/locales/co.ts","../src/locales/cr.ts","../src/locales/ec.ts","../src/locales/gt.ts","../src/locales/mx.ts","../src/locales/pa.ts","../src/locales/pe.ts","../src/locales/ve.ts","../src/locales/ca.ts","../src/locales/us.ts","../src/locales/de.ts","../src/locales/es.ts","../src/locales/fr.ts","../src/locales/gb.ts","../src/locales/it.ts"],"names":["cleanPhone","phone","formatE164","countryCode","ar_exports","__export","validate","COUNTRY_CODE","options","cleaned","national","type","formatted","br_exports","cl_exports","co_exports","cr_exports","ec_exports","gt_exports","mx_exports","pa_exports","pe_exports","ve_exports","ca_exports","areaCode","exchangeCode","us_exports","de_exports","es_exports","fr_exports","gb_exports","it_exports"],"mappings":"6FAAO,SAASA,CAAAA,CAAWC,EAAuB,CAChD,OAAOA,EAAM,OAAA,CAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,EAAWC,CAAAA,CAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,GAAGF,CAAK,CAAA,CAChC,CCNA,IAAAG,CAAAA,CAAA,GAAAC,EAAAD,CAAAA,CAAA,CAAA,QAAA,CAAA,IAAAE,CAAAA,CAAAA,CAAAA,CAGA,IAAMC,CAAAA,CAAe,IAAA,CAEd,SAASD,CAAAA,CAASL,CAAAA,CAAeO,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUT,EAAWC,CAAK,CAAA,CAG5BS,CAAAA,CAAWD,CAAAA,CAMf,GALIA,CAAAA,CAAQ,WAAWF,CAAY,CAAA,EAAKE,CAAAA,CAAQ,MAAA,CAAS,EAAA,GACvDC,CA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AAA,CAASL,CAAAA,CAAeO,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUT,CAAAA,CAAWC,CAAK,CAAA,CAG5BS,CAAAA,CAAWD,CAAAA,CAWf,GAVIA,CAAAA,CAAQ,UAAA,CAAWF,CAAY,CAAA,EAAKE,CAAAA,CAAQ,MAAA,CAAS,IACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMF,CAAAA,CAAa,MAAM,CAAA,CAAA,CAK1CG,EAAS,UAAA,CAAW,GAAG,CAAA,GACzBA,CAAAA,CAAWA,CAAAA,CAAS,KAAA,CAAM,CAAC,CAAA,CAAA,CAGzBA,CAAAA,CAAS,MAAA,CAAS,CAAA,EAAKA,CAAAA,CAAS,MAAA,CAAS,GAC3C,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,kCAAmC,EAGrE,IAAIC,CAAAA,CAA0C,SAAA,CAG1CD,CAAAA,CAAS,UAAA,CAAW,GAAG,EACzBC,CAAAA,CAAO,QAAA,CAIPA,CAAAA,CAAO,UAAA,CAGT,IAAIC,CAAAA,CAAYF,EAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYV,CAAAA,CAAWK,EAAcG,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,CAAAA,CAAY,IAAIL,CAAY,CAAA,CAAA,EAAIG,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,KAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"index.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '54';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 10) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Argentine numbers: 10 digits (including area code)\n if (national.length !== 10) {\n return { isValid: false, error: 'Phone number must be 10 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 9 (e.g., 9 11 xxxx-xxxx)\n if (national.startsWith('9')) {\n type = 'mobile';\n }\n // Landline: Starts with 11, 2, 3, 4 or other area codes\n else if (/^(11|2|3|4)/.test(national)) {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '55';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 10) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Brazilian numbers: 10 digits (landline) or 11 digits (mobile with 9 prefix)\n if (national.length !== 10 && national.length !== 11) {\n return { isValid: false, error: 'Phone number must be 10 or 11 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: 11 digits starting with 9 (e.g., 11 98765-4321)\n if (national.length === 11 && national[2] === '9') {\n type = 'mobile';\n }\n // Landline: 10 digits\n else if (national.length === 10) {\n type = 'landline';\n } else {\n return { isValid: false, error: 'Invalid phone format for Brazil' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '56';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Chilean numbers: 9 digits\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 9\n if (national.startsWith('9')) {\n type = 'mobile';\n }\n // Landline: Starts with 2 (Santiago) or other area codes\n else if (/^[2-7]/.test(national)) {\n type = 'landline';\n } else {\n return { isValid: false, error: 'Invalid prefix for Chile' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '57';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 10) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n if (national.length !== 10) {\n return { isValid: false, error: 'Phone number must be 10 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 3\n if (national.startsWith('3')) {\n type = 'mobile';\n }\n // Landline: Starts with 60\n else if (national.startsWith('60')) {\n type = 'landline';\n } else {\n return { isValid: false, error: 'Invalid prefix for Colombia' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '506';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 8) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Costa Rican numbers: 8 digits\n if (national.length !== 8) {\n return { isValid: false, error: 'Phone number must be 8 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 5, 6, 7, 8\n if (/^[5678]/.test(national)) {\n type = 'mobile';\n }\n // Landline: Starts with 2\n else if (national.startsWith('2')) {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '593';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Ecuadorian numbers: 9 digits\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 9\n if (national.startsWith('9')) {\n type = 'mobile';\n }\n // Landline: Starts with 2-7 (area codes)\n else if (/^[2-7]/.test(national)) {\n type = 'landline';\n } else {\n return { isValid: false, error: 'Invalid prefix for Ecuador' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '502';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 8) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Guatemalan numbers: 8 digits\n if (national.length !== 8) {\n return { isValid: false, error: 'Phone number must be 8 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 3, 4, 5\n if (/^[345]/.test(national)) {\n type = 'mobile';\n }\n // Landline: Starts with 2, 6, 7\n else if (/^[267]/.test(national)) {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '52';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 10) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n if (national.length !== 10) {\n return { isValid: false, error: 'Phone number must be 10 digits' };\n }\n\n // Mexico doesn't strictly separate mobile/landline ranges as clearly in the first digit anymore for all cases,\n // but generally we can just validate length.\n // Distinction is harder without a massive database of area codes.\n // We will mark as 'unknown' type unless we want to implement complex area code logic.\n // For now, let's assume valid if 10 digits.\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type: 'unknown', formatted };\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '507';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 8) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Panamanian numbers: 8 digits\n if (national.length !== 8) {\n return { isValid: false, error: 'Phone number must be 8 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 6\n if (national.startsWith('6')) {\n type = 'mobile';\n }\n // Landline: Starts with 2-5, 7-9\n else if (/^[2-57-9]/.test(national)) {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '51';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Peruvian numbers: 9 digits\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 9\n if (national.startsWith('9')) {\n type = 'mobile';\n }\n // Landline: Starts with 1 (Lima) or other area codes (0)\n else if (/^[01]/.test(national)) {\n type = 'landline';\n } else {\n return { isValid: false, error: 'Invalid prefix for Peru' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '58';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 10) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Venezuelan numbers: 10 digits (including area code)\n if (national.length !== 10) {\n return { isValid: false, error: 'Phone number must be 10 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 4\n if (national.startsWith('4')) {\n type = 'mobile';\n }\n // Landline: Starts with 2 (Caracas) or other area codes\n else if (/^[2]/.test(national)) {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '1';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length === 11) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Canadian numbers: 10 digits (NPA-NXX-XXXX) - same format as US\n if (national.length !== 10) {\n return { isValid: false, error: 'Phone number must be 10 digits' };\n }\n\n // Check valid area code (NPA): first digit 2-9, second digit 0-8, third digit 0-9\n const areaCode = national.substring(0, 3);\n if (!/^[2-9][0-8][0-9]$/.test(areaCode)) {\n return { isValid: false, error: 'Invalid area code' };\n }\n\n // Check valid exchange code (NXX): first digit 2-9\n const exchangeCode = national.substring(3, 6);\n if (!/^[2-9]\\d{2}$/.test(exchangeCode)) {\n return { isValid: false, error: 'Invalid exchange code' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type: 'unknown', formatted };\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '1';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length === 11) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // US/Canada numbers: 10 digits (NPA-NXX-XXXX)\n if (national.length !== 10) {\n return { isValid: false, error: 'Phone number must be 10 digits' };\n }\n\n // Check valid area code (NPA): first digit 2-9, second digit 0-8, third digit 0-9\n const areaCode = national.substring(0, 3);\n if (!/^[2-9][0-8][0-9]$/.test(areaCode)) {\n return { isValid: false, error: 'Invalid area code' };\n }\n\n // Check valid exchange code (NXX): first digit 2-9\n const exchangeCode = national.substring(3, 6);\n if (!/^[2-9]\\d{2}$/.test(exchangeCode)) {\n return { isValid: false, error: 'Invalid exchange code' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type: 'unknown', formatted };\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '49';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE)) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // German numbers: variable length (10-11 digits including area code)\n // Often start with 0 for domestic dialing\n if (national.startsWith('0')) {\n national = national.slice(1);\n }\n\n if (national.length < 9 || national.length > 11) {\n return { isValid: false, error: 'Phone number must be 9-11 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 15, 16, 17\n if (/^1[567]/.test(national)) {\n type = 'mobile';\n }\n // Landline: various area codes\n else {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '34';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Spanish numbers: 9 digits\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 6 or 7\n if (/^[67]/.test(national)) {\n type = 'mobile';\n }\n // Landline: Starts with 8 or 9\n else if (/^[89]/.test(national)) {\n type = 'landline';\n } else {\n return { isValid: false, error: 'Invalid prefix for Spain' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '33';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // French numbers: 9 digits (excluding the leading 0)\n // But users often include the leading 0, so we accept both formats\n if (national.startsWith('0')) {\n national = national.slice(1);\n }\n\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 6 or 7\n if (/^[67]/.test(national)) {\n type = 'mobile';\n }\n // Landline: Starts with 1, 2, 3, 4, 5, 9\n else if (/^[1-5,9]/.test(national)) {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '44';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 10) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // UK numbers: 10 digits (excluding the leading 0)\n // But users often include the leading 0, so we accept both formats\n if (national.startsWith('0')) {\n national = national.slice(1);\n }\n\n if (national.length !== 10) {\n return { isValid: false, error: 'Phone number must be 10 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 7\n if (national.startsWith('7')) {\n type = 'mobile';\n }\n // Landline: Starts with 1, 2, 3\n else if (/^[123]/.test(national)) {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '39';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Italian numbers: variable length (9-10 digits)\n // Often start with 0 for domestic dialing\n if (national.startsWith('0')) {\n national = national.slice(1);\n }\n\n if (national.length < 9 || national.length > 10) {\n return { isValid: false, error: 'Phone number must be 9-10 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 3\n if (national.startsWith('3')) {\n type = 'mobile';\n }\n // Landline: various area codes (0, 1, 2, 4, 5, 6, 7, 8, 9)\n else {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,10 @@
1
+ import { a as PhoneOptions, P as PhoneValidationResult } from './types-ClMaPMkH.cjs';
2
+
3
+ declare function validate(phone: string, options?: PhoneOptions): PhoneValidationResult;
4
+
5
+ declare const it_validate: typeof validate;
6
+ declare namespace it {
7
+ export { it_validate as validate };
8
+ }
9
+
10
+ export { it as i, validate as v };
@@ -0,0 +1,10 @@
1
+ import { a as PhoneOptions, P as PhoneValidationResult } from './types-ClMaPMkH.js';
2
+
3
+ declare function validate(phone: string, options?: PhoneOptions): PhoneValidationResult;
4
+
5
+ declare const it_validate: typeof validate;
6
+ declare namespace it {
7
+ export { it_validate as validate };
8
+ }
9
+
10
+ export { it as i, validate as v };
@@ -0,0 +1,2 @@
1
+ 'use strict';function a(e){return e.replace(/\D/g,"")}function s(e,n){return `+${e}${n}`}var r="54";function m(e,n){let i=a(e),t=i;if(i.startsWith(r)&&i.length>10&&(t=i.slice(r.length)),t.length!==10)return {isValid:false,error:"Phone number must be 10 digits"};let o="unknown";t.startsWith("9")?o="mobile":/^(11|2|3|4)/.test(t)&&(o="landline");let l=t;return n?.format==="e164"?l=s(r,t):n?.format==="international"&&(l=`+${r} ${t}`),{isValid:true,type:o,formatted:l}}exports.validate=m;//# sourceMappingURL=ar.cjs.map
2
+ //# sourceMappingURL=ar.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/ar.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"aAAO,SAASA,CAAAA,CAAWC,EAAuB,CAChD,OAAOA,EAAM,OAAA,CAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,EAAWC,CAAAA,CAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,GAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,CAAAA,CAAeK,EAA+C,CACrF,IAAMC,EAAUP,CAAAA,CAAWC,CAAK,CAAA,CAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,EAAQ,UAAA,CAAWH,CAAY,CAAA,EAAKG,CAAAA,CAAQ,MAAA,CAAS,EAAA,GACvDC,EAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,SAAW,EAAA,CACtB,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,MAAO,gCAAiC,CAAA,CAGnE,IAAIC,CAAAA,CAA0C,SAAA,CAG1CD,CAAAA,CAAS,WAAW,GAAG,CAAA,CACzBC,CAAAA,CAAO,QAAA,CAGA,aAAA,CAAc,IAAA,CAAKD,CAAQ,CAAA,GAClCC,CAAAA,CAAO,UAAA,CAAA,CAGT,IAAIC,CAAAA,CAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,OACtBI,CAAAA,CAAYR,CAAAA,CAAWE,EAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,CAAAA,CAAY,IAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,KAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"ar.cjs","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '54';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 10) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Argentine numbers: 10 digits (including area code)\n if (national.length !== 10) {\n return { isValid: false, error: 'Phone number must be 10 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 9 (e.g., 9 11 xxxx-xxxx)\n if (national.startsWith('9')) {\n type = 'mobile';\n }\n // Landline: Starts with 11, 2, 3, 4 or other area codes\n else if (/^(11|2|3|4)/.test(national)) {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.cjs';
2
+ export { v as validate } from '../ar-JxzqPct0.cjs';
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.js';
2
+ export { v as validate } from '../ar-BRemFHRv.js';
@@ -0,0 +1,2 @@
1
+ function a(e){return e.replace(/\D/g,"")}function s(e,n){return `+${e}${n}`}var r="54";function m(e,n){let i=a(e),t=i;if(i.startsWith(r)&&i.length>10&&(t=i.slice(r.length)),t.length!==10)return {isValid:false,error:"Phone number must be 10 digits"};let o="unknown";t.startsWith("9")?o="mobile":/^(11|2|3|4)/.test(t)&&(o="landline");let l=t;return n?.format==="e164"?l=s(r,t):n?.format==="international"&&(l=`+${r} ${t}`),{isValid:true,type:o,formatted:l}}export{m as validate};//# sourceMappingURL=ar.js.map
2
+ //# sourceMappingURL=ar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/ar.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"AAAO,SAASA,CAAAA,CAAWC,EAAuB,CAChD,OAAOA,EAAM,OAAA,CAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,EAAWC,CAAAA,CAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,GAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,CAAAA,CAAeK,EAA+C,CACrF,IAAMC,EAAUP,CAAAA,CAAWC,CAAK,CAAA,CAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,EAAQ,UAAA,CAAWH,CAAY,CAAA,EAAKG,CAAAA,CAAQ,MAAA,CAAS,EAAA,GACvDC,EAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,SAAW,EAAA,CACtB,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,MAAO,gCAAiC,CAAA,CAGnE,IAAIC,CAAAA,CAA0C,SAAA,CAG1CD,CAAAA,CAAS,WAAW,GAAG,CAAA,CACzBC,CAAAA,CAAO,QAAA,CAGA,aAAA,CAAc,IAAA,CAAKD,CAAQ,CAAA,GAClCC,CAAAA,CAAO,UAAA,CAAA,CAGT,IAAIC,CAAAA,CAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,OACtBI,CAAAA,CAAYR,CAAAA,CAAWE,EAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,CAAAA,CAAY,IAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,KAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"ar.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '54';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 10) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Argentine numbers: 10 digits (including area code)\n if (national.length !== 10) {\n return { isValid: false, error: 'Phone number must be 10 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 9 (e.g., 9 11 xxxx-xxxx)\n if (national.startsWith('9')) {\n type = 'mobile';\n }\n // Landline: Starts with 11, 2, 3, 4 or other area codes\n else if (/^(11|2|3|4)/.test(national)) {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';function a(n){return n.replace(/\D/g,"")}function s(n,t){return `+${n}${t}`}var i="55";function u(n,t){let r=a(n),e=r;if(r.startsWith(i)&&r.length>10&&(e=r.slice(i.length)),e.length!==10&&e.length!==11)return {isValid:false,error:"Phone number must be 10 or 11 digits"};let o="unknown";if(e.length===11&&e[2]==="9")o="mobile";else if(e.length===10)o="landline";else return {isValid:false,error:"Invalid phone format for Brazil"};let l=e;return t?.format==="e164"?l=s(i,e):t?.format==="international"&&(l=`+${i} ${e}`),{isValid:true,type:o,formatted:l}}exports.validate=u;//# sourceMappingURL=br.cjs.map
2
+ //# sourceMappingURL=br.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/br.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"aAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,OAAA,CAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,CAAAA,CAAqBF,EAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,CAAAA,CAAeK,EAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,CAAA,CAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,CAAA,EAAKG,CAAAA,CAAQ,OAAS,EAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,MAAA,GAAW,EAAA,EAAMA,CAAAA,CAAS,MAAA,GAAW,EAAA,CAChD,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,sCAAuC,CAAA,CAGzE,IAAIC,CAAAA,CAA0C,SAAA,CAG9C,GAAID,CAAAA,CAAS,MAAA,GAAW,EAAA,EAAMA,CAAAA,CAAS,CAAC,IAAM,GAAA,CAC5CC,CAAAA,CAAO,QAAA,CAAA,KAAA,GAGAD,CAAAA,CAAS,MAAA,GAAW,EAAA,CAC3BC,CAAAA,CAAO,UAAA,CAAA,KAEP,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,iCAAkC,EAGpE,IAAIC,CAAAA,CAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,CAAAA,CAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,CAAAA,CAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"br.cjs","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '55';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 10) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Brazilian numbers: 10 digits (landline) or 11 digits (mobile with 9 prefix)\n if (national.length !== 10 && national.length !== 11) {\n return { isValid: false, error: 'Phone number must be 10 or 11 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: 11 digits starting with 9 (e.g., 11 98765-4321)\n if (national.length === 11 && national[2] === '9') {\n type = 'mobile';\n }\n // Landline: 10 digits\n else if (national.length === 10) {\n type = 'landline';\n } else {\n return { isValid: false, error: 'Invalid phone format for Brazil' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.cjs';
2
+ export { v as validate } from '../br-COFIo49r.cjs';
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.js';
2
+ export { v as validate } from '../br-Ct41H5gk.js';
@@ -0,0 +1,2 @@
1
+ function a(n){return n.replace(/\D/g,"")}function s(n,t){return `+${n}${t}`}var i="55";function u(n,t){let r=a(n),e=r;if(r.startsWith(i)&&r.length>10&&(e=r.slice(i.length)),e.length!==10&&e.length!==11)return {isValid:false,error:"Phone number must be 10 or 11 digits"};let o="unknown";if(e.length===11&&e[2]==="9")o="mobile";else if(e.length===10)o="landline";else return {isValid:false,error:"Invalid phone format for Brazil"};let l=e;return t?.format==="e164"?l=s(i,e):t?.format==="international"&&(l=`+${i} ${e}`),{isValid:true,type:o,formatted:l}}export{u as validate};//# sourceMappingURL=br.js.map
2
+ //# sourceMappingURL=br.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/br.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"AAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,OAAA,CAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,CAAAA,CAAqBF,EAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,CAAAA,CAAeK,EAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,CAAA,CAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,CAAA,EAAKG,CAAAA,CAAQ,OAAS,EAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,MAAA,GAAW,EAAA,EAAMA,CAAAA,CAAS,MAAA,GAAW,EAAA,CAChD,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,sCAAuC,CAAA,CAGzE,IAAIC,CAAAA,CAA0C,SAAA,CAG9C,GAAID,CAAAA,CAAS,MAAA,GAAW,EAAA,EAAMA,CAAAA,CAAS,CAAC,IAAM,GAAA,CAC5CC,CAAAA,CAAO,QAAA,CAAA,KAAA,GAGAD,CAAAA,CAAS,MAAA,GAAW,EAAA,CAC3BC,CAAAA,CAAO,UAAA,CAAA,KAEP,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,iCAAkC,EAGpE,IAAIC,CAAAA,CAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,CAAAA,CAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,CAAAA,CAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"br.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '55';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 10) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Brazilian numbers: 10 digits (landline) or 11 digits (mobile with 9 prefix)\n if (national.length !== 10 && national.length !== 11) {\n return { isValid: false, error: 'Phone number must be 10 or 11 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: 11 digits starting with 9 (e.g., 11 98765-4321)\n if (national.length === 11 && national[2] === '9') {\n type = 'mobile';\n }\n // Landline: 10 digits\n else if (national.length === 10) {\n type = 'landline';\n } else {\n return { isValid: false, error: 'Invalid phone format for Brazil' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';function a(t){return t.replace(/\D/g,"")}function s(t,n){return `+${t}${n}`}var i="1";function u(t,n){let r=a(t),e=r;if(r.startsWith(i)&&r.length===11&&(e=r.slice(i.length)),e.length!==10)return {isValid:false,error:"Phone number must be 10 digits"};let l=e.substring(0,3);if(!/^[2-9][0-8][0-9]$/.test(l))return {isValid:false,error:"Invalid area code"};let f=e.substring(3,6);if(!/^[2-9]\d{2}$/.test(f))return {isValid:false,error:"Invalid exchange code"};let o=e;return n?.format==="e164"?o=s(i,e):n?.format==="international"&&(o=`+${i} ${e}`),{isValid:true,type:"unknown",formatted:o}}exports.validate=u;//# sourceMappingURL=ca.cjs.map
2
+ //# sourceMappingURL=ca.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/ca.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","areaCode","exchangeCode","formatted"],"mappings":"aAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,OAAA,CAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,CAAAA,CAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,GAAA,CAEd,SAASC,CAAAA,CAASJ,CAAAA,CAAeK,EAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,CAAA,CAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,CAAA,EAAKG,CAAAA,CAAQ,MAAA,GAAW,EAAA,GACzDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,MAAA,GAAW,EAAA,CACtB,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,gCAAiC,CAAA,CAInE,IAAMC,CAAAA,CAAWD,CAAAA,CAAS,SAAA,CAAU,CAAA,CAAG,CAAC,CAAA,CACxC,GAAI,CAAC,mBAAA,CAAoB,IAAA,CAAKC,CAAQ,CAAA,CACpC,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,mBAAoB,CAAA,CAItD,IAAMC,CAAAA,CAAeF,CAAAA,CAAS,SAAA,CAAU,CAAA,CAAG,CAAC,CAAA,CAC5C,GAAI,CAAC,cAAA,CAAe,IAAA,CAAKE,CAAY,CAAA,CACnC,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,uBAAwB,CAAA,CAG1D,IAAIC,CAAAA,CAAYH,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBK,CAAAA,CAAYT,CAAAA,CAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BK,CAAAA,CAAY,CAAA,CAAA,EAAIP,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAM,SAAA,CAAW,SAAA,CAAAG,CAAU,CACrD","file":"ca.cjs","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '1';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length === 11) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Canadian numbers: 10 digits (NPA-NXX-XXXX) - same format as US\n if (national.length !== 10) {\n return { isValid: false, error: 'Phone number must be 10 digits' };\n }\n\n // Check valid area code (NPA): first digit 2-9, second digit 0-8, third digit 0-9\n const areaCode = national.substring(0, 3);\n if (!/^[2-9][0-8][0-9]$/.test(areaCode)) {\n return { isValid: false, error: 'Invalid area code' };\n }\n\n // Check valid exchange code (NXX): first digit 2-9\n const exchangeCode = national.substring(3, 6);\n if (!/^[2-9]\\d{2}$/.test(exchangeCode)) {\n return { isValid: false, error: 'Invalid exchange code' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type: 'unknown', formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.cjs';
2
+ export { v as validate } from '../ca-C0PYBvZK.cjs';
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.js';
2
+ export { v as validate } from '../ca-CNnuf6qY.js';
@@ -0,0 +1,2 @@
1
+ function a(t){return t.replace(/\D/g,"")}function s(t,n){return `+${t}${n}`}var i="1";function u(t,n){let r=a(t),e=r;if(r.startsWith(i)&&r.length===11&&(e=r.slice(i.length)),e.length!==10)return {isValid:false,error:"Phone number must be 10 digits"};let l=e.substring(0,3);if(!/^[2-9][0-8][0-9]$/.test(l))return {isValid:false,error:"Invalid area code"};let f=e.substring(3,6);if(!/^[2-9]\d{2}$/.test(f))return {isValid:false,error:"Invalid exchange code"};let o=e;return n?.format==="e164"?o=s(i,e):n?.format==="international"&&(o=`+${i} ${e}`),{isValid:true,type:"unknown",formatted:o}}export{u as validate};//# sourceMappingURL=ca.js.map
2
+ //# sourceMappingURL=ca.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/ca.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","areaCode","exchangeCode","formatted"],"mappings":"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,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BK,CAAAA,CAAY,CAAA,CAAA,EAAIP,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAM,SAAA,CAAW,SAAA,CAAAG,CAAU,CACrD","file":"ca.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '1';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length === 11) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Canadian numbers: 10 digits (NPA-NXX-XXXX) - same format as US\n if (national.length !== 10) {\n return { isValid: false, error: 'Phone number must be 10 digits' };\n }\n\n // Check valid area code (NPA): first digit 2-9, second digit 0-8, third digit 0-9\n const areaCode = national.substring(0, 3);\n if (!/^[2-9][0-8][0-9]$/.test(areaCode)) {\n return { isValid: false, error: 'Invalid area code' };\n }\n\n // Check valid exchange code (NXX): first digit 2-9\n const exchangeCode = national.substring(3, 6);\n if (!/^[2-9]\\d{2}$/.test(exchangeCode)) {\n return { isValid: false, error: 'Invalid exchange code' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type: 'unknown', formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';function a(t){return t.replace(/\D/g,"")}function s(t,n){return `+${t}${n}`}var r="56";function h(t,n){let i=a(t),e=i;if(i.startsWith(r)&&i.length>9&&(e=i.slice(r.length)),e.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let o="unknown";if(e.startsWith("9"))o="mobile";else if(/^[2-7]/.test(e))o="landline";else return {isValid:false,error:"Invalid prefix for Chile"};let l=e;return n?.format==="e164"?l=s(r,e):n?.format==="international"&&(l=`+${r} ${e}`),{isValid:true,type:o,formatted:l}}exports.validate=h;//# sourceMappingURL=cl.cjs.map
2
+ //# sourceMappingURL=cl.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/cl.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"aAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,EAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,EAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,GAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,MAAA,GAAW,CAAA,CACtB,OAAO,CAAE,QAAS,KAAA,CAAO,KAAA,CAAO,+BAAgC,CAAA,CAGlE,IAAIC,CAAAA,CAA0C,UAG9C,GAAID,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,CACzBC,CAAAA,CAAO,iBAGA,QAAA,CAAS,IAAA,CAAKD,CAAQ,CAAA,CAC7BC,CAAAA,CAAO,UAAA,CAAA,KAEP,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,0BAA2B,CAAA,CAG7D,IAAIC,EAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,EAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"cl.cjs","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '56';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Chilean numbers: 9 digits\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 9\n if (national.startsWith('9')) {\n type = 'mobile';\n }\n // Landline: Starts with 2 (Santiago) or other area codes\n else if (/^[2-7]/.test(national)) {\n type = 'landline';\n } else {\n return { isValid: false, error: 'Invalid prefix for Chile' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.cjs';
2
+ export { v as validate } from '../cl-BSQlXUww.cjs';
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.js';
2
+ export { v as validate } from '../cl-W_f2Hza8.js';
@@ -0,0 +1,2 @@
1
+ function a(t){return t.replace(/\D/g,"")}function s(t,n){return `+${t}${n}`}var r="56";function h(t,n){let i=a(t),e=i;if(i.startsWith(r)&&i.length>9&&(e=i.slice(r.length)),e.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let o="unknown";if(e.startsWith("9"))o="mobile";else if(/^[2-7]/.test(e))o="landline";else return {isValid:false,error:"Invalid prefix for Chile"};let l=e;return n?.format==="e164"?l=s(r,e):n?.format==="international"&&(l=`+${r} ${e}`),{isValid:true,type:o,formatted:l}}export{h as validate};//# sourceMappingURL=cl.js.map
2
+ //# sourceMappingURL=cl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/cl.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"AAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,EAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,EAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,GAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,MAAA,GAAW,CAAA,CACtB,OAAO,CAAE,QAAS,KAAA,CAAO,KAAA,CAAO,+BAAgC,CAAA,CAGlE,IAAIC,CAAAA,CAA0C,UAG9C,GAAID,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,CACzBC,CAAAA,CAAO,iBAGA,QAAA,CAAS,IAAA,CAAKD,CAAQ,CAAA,CAC7BC,CAAAA,CAAO,UAAA,CAAA,KAEP,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,0BAA2B,CAAA,CAG7D,IAAIC,EAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,EAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"cl.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '56';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Chilean numbers: 9 digits\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 9\n if (national.startsWith('9')) {\n type = 'mobile';\n }\n // Landline: Starts with 2 (Santiago) or other area codes\n else if (/^[2-7]/.test(national)) {\n type = 'landline';\n } else {\n return { isValid: false, error: 'Invalid prefix for Chile' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';function a(e){return e.replace(/\D/g,"")}function s(e,n){return `+${e}${n}`}var r="506";function m(e,n){let i=a(e),t=i;if(i.startsWith(r)&&i.length>8&&(t=i.slice(r.length)),t.length!==8)return {isValid:false,error:"Phone number must be 8 digits"};let o="unknown";/^[5678]/.test(t)?o="mobile":t.startsWith("2")&&(o="landline");let l=t;return n?.format==="e164"?l=s(r,t):n?.format==="international"&&(l=`+${r} ${t}`),{isValid:true,type:o,formatted:l}}exports.validate=m;//# sourceMappingURL=cr.cjs.map
2
+ //# sourceMappingURL=cr.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/cr.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"aAAO,SAASA,CAAAA,CAAWC,EAAuB,CAChD,OAAOA,EAAM,OAAA,CAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,EAAWC,CAAAA,CAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,GAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,KAAA,CAEd,SAASC,CAAAA,CAASJ,CAAAA,CAAeK,EAA+C,CACrF,IAAMC,EAAUP,CAAAA,CAAWC,CAAK,CAAA,CAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,EAAQ,UAAA,CAAWH,CAAY,CAAA,EAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,EAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,SAAW,CAAA,CACtB,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,MAAO,+BAAgC,CAAA,CAGlE,IAAIC,CAAAA,CAA0C,SAAA,CAG1C,SAAA,CAAU,KAAKD,CAAQ,CAAA,CACzBC,CAAAA,CAAO,QAAA,CAGAD,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,GAC9BC,CAAAA,CAAO,UAAA,CAAA,CAGT,IAAIC,CAAAA,CAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,OACtBI,CAAAA,CAAYR,CAAAA,CAAWE,EAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,CAAAA,CAAY,IAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,KAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"cr.cjs","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '506';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 8) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Costa Rican numbers: 8 digits\n if (national.length !== 8) {\n return { isValid: false, error: 'Phone number must be 8 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 5, 6, 7, 8\n if (/^[5678]/.test(national)) {\n type = 'mobile';\n }\n // Landline: Starts with 2\n else if (national.startsWith('2')) {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.cjs';
2
+ export { v as validate } from '../cr-C3m9H-RU.cjs';
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.js';
2
+ export { v as validate } from '../cr-UzSwttKD.js';
@@ -0,0 +1,2 @@
1
+ function a(e){return e.replace(/\D/g,"")}function s(e,n){return `+${e}${n}`}var r="506";function m(e,n){let i=a(e),t=i;if(i.startsWith(r)&&i.length>8&&(t=i.slice(r.length)),t.length!==8)return {isValid:false,error:"Phone number must be 8 digits"};let o="unknown";/^[5678]/.test(t)?o="mobile":t.startsWith("2")&&(o="landline");let l=t;return n?.format==="e164"?l=s(r,t):n?.format==="international"&&(l=`+${r} ${t}`),{isValid:true,type:o,formatted:l}}export{m as validate};//# sourceMappingURL=cr.js.map
2
+ //# sourceMappingURL=cr.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/cr.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"AAAO,SAASA,CAAAA,CAAWC,EAAuB,CAChD,OAAOA,EAAM,OAAA,CAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,EAAWC,CAAAA,CAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,GAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,KAAA,CAEd,SAASC,CAAAA,CAASJ,CAAAA,CAAeK,EAA+C,CACrF,IAAMC,EAAUP,CAAAA,CAAWC,CAAK,CAAA,CAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,EAAQ,UAAA,CAAWH,CAAY,CAAA,EAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,EAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,SAAW,CAAA,CACtB,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,MAAO,+BAAgC,CAAA,CAGlE,IAAIC,CAAAA,CAA0C,SAAA,CAG1C,SAAA,CAAU,KAAKD,CAAQ,CAAA,CACzBC,CAAAA,CAAO,QAAA,CAGAD,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,GAC9BC,CAAAA,CAAO,UAAA,CAAA,CAGT,IAAIC,CAAAA,CAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,OACtBI,CAAAA,CAAYR,CAAAA,CAAWE,EAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,CAAAA,CAAY,IAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,KAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"cr.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '506';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 8) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Costa Rican numbers: 8 digits\n if (national.length !== 8) {\n return { isValid: false, error: 'Phone number must be 8 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 5, 6, 7, 8\n if (/^[5678]/.test(national)) {\n type = 'mobile';\n }\n // Landline: Starts with 2\n else if (national.startsWith('2')) {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';function s(e){return e.replace(/\D/g,"")}function a(e,n){return `+${e}${n}`}var i="49";function m(e,n){let r=s(e),t=r;if(r.startsWith(i)&&(t=r.slice(i.length)),t.startsWith("0")&&(t=t.slice(1)),t.length<9||t.length>11)return {isValid:false,error:"Phone number must be 9-11 digits"};let o="unknown";/^1[567]/.test(t)?o="mobile":o="landline";let l=t;return n?.format==="e164"?l=a(i,t):n?.format==="international"&&(l=`+${i} ${t}`),{isValid:true,type:o,formatted:l}}exports.validate=m;//# sourceMappingURL=de.cjs.map
2
+ //# sourceMappingURL=de.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/de.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"aAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,EAASJ,CAAAA,CAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,CAAA,CAG5BO,CAAAA,CAAWD,CAAAA,CAWf,GAVIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,CAAA,GACjCI,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,GAK1CI,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,GACzBA,CAAAA,CAAWA,CAAAA,CAAS,MAAM,CAAC,CAAA,CAAA,CAGzBA,CAAAA,CAAS,MAAA,CAAS,CAAA,EAAKA,CAAAA,CAAS,OAAS,EAAA,CAC3C,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,kCAAmC,CAAA,CAGrE,IAAIC,CAAAA,CAA0C,SAAA,CAG1C,SAAA,CAAU,IAAA,CAAKD,CAAQ,CAAA,CACzBC,CAAAA,CAAO,QAAA,CAIPA,CAAAA,CAAO,UAAA,CAGT,IAAIC,EAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,EAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"de.cjs","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '49';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE)) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // German numbers: variable length (10-11 digits including area code)\n // Often start with 0 for domestic dialing\n if (national.startsWith('0')) {\n national = national.slice(1);\n }\n\n if (national.length < 9 || national.length > 11) {\n return { isValid: false, error: 'Phone number must be 9-11 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 15, 16, 17\n if (/^1[567]/.test(national)) {\n type = 'mobile';\n }\n // Landline: various area codes\n else {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.cjs';
2
+ export { v as validate } from '../de-ZAyw44MG.cjs';
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.js';
2
+ export { v as validate } from '../de-bIFBVR-K.js';
@@ -0,0 +1,2 @@
1
+ function s(e){return e.replace(/\D/g,"")}function a(e,n){return `+${e}${n}`}var i="49";function m(e,n){let r=s(e),t=r;if(r.startsWith(i)&&(t=r.slice(i.length)),t.startsWith("0")&&(t=t.slice(1)),t.length<9||t.length>11)return {isValid:false,error:"Phone number must be 9-11 digits"};let o="unknown";/^1[567]/.test(t)?o="mobile":o="landline";let l=t;return n?.format==="e164"?l=a(i,t):n?.format==="international"&&(l=`+${i} ${t}`),{isValid:true,type:o,formatted:l}}export{m as validate};//# sourceMappingURL=de.js.map
2
+ //# sourceMappingURL=de.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/de.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"AAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,EAASJ,CAAAA,CAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,CAAA,CAG5BO,CAAAA,CAAWD,CAAAA,CAWf,GAVIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,CAAA,GACjCI,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,GAK1CI,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,GACzBA,CAAAA,CAAWA,CAAAA,CAAS,MAAM,CAAC,CAAA,CAAA,CAGzBA,CAAAA,CAAS,MAAA,CAAS,CAAA,EAAKA,CAAAA,CAAS,OAAS,EAAA,CAC3C,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,kCAAmC,CAAA,CAGrE,IAAIC,CAAAA,CAA0C,SAAA,CAG1C,SAAA,CAAU,IAAA,CAAKD,CAAQ,CAAA,CACzBC,CAAAA,CAAO,QAAA,CAIPA,CAAAA,CAAO,UAAA,CAGT,IAAIC,EAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,EAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"de.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '49';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE)) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // German numbers: variable length (10-11 digits including area code)\n // Often start with 0 for domestic dialing\n if (national.startsWith('0')) {\n national = national.slice(1);\n }\n\n if (national.length < 9 || national.length > 11) {\n return { isValid: false, error: 'Phone number must be 9-11 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 15, 16, 17\n if (/^1[567]/.test(national)) {\n type = 'mobile';\n }\n // Landline: various area codes\n else {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';function a(t){return t.replace(/\D/g,"")}function s(t,n){return `+${t}${n}`}var i="593";function d(t,n){let r=a(t),e=r;if(r.startsWith(i)&&r.length>9&&(e=r.slice(i.length)),e.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let o="unknown";if(e.startsWith("9"))o="mobile";else if(/^[2-7]/.test(e))o="landline";else return {isValid:false,error:"Invalid prefix for Ecuador"};let l=e;return n?.format==="e164"?l=s(i,e):n?.format==="international"&&(l=`+${i} ${e}`),{isValid:true,type:o,formatted:l}}exports.validate=d;//# sourceMappingURL=ec.cjs.map
2
+ //# sourceMappingURL=ec.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/ec.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"aAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,O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.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '593';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Ecuadorian numbers: 9 digits\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 9\n if (national.startsWith('9')) {\n type = 'mobile';\n }\n // Landline: Starts with 2-7 (area codes)\n else if (/^[2-7]/.test(national)) {\n type = 'landline';\n } else {\n return { isValid: false, error: 'Invalid prefix for Ecuador' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.cjs';
2
+ export { v as validate } from '../ec-D7HUkRKn.cjs';
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.js';
2
+ export { v as validate } from '../ec-CCV5mLhv.js';
@@ -0,0 +1,2 @@
1
+ function a(t){return t.replace(/\D/g,"")}function s(t,n){return `+${t}${n}`}var i="593";function d(t,n){let r=a(t),e=r;if(r.startsWith(i)&&r.length>9&&(e=r.slice(i.length)),e.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let o="unknown";if(e.startsWith("9"))o="mobile";else if(/^[2-7]/.test(e))o="landline";else return {isValid:false,error:"Invalid prefix for Ecuador"};let l=e;return n?.format==="e164"?l=s(i,e):n?.format==="international"&&(l=`+${i} ${e}`),{isValid:true,type:o,formatted:l}}export{d as validate};//# sourceMappingURL=ec.js.map
2
+ //# sourceMappingURL=ec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/ec.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"AAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,KAAA,CAEd,SAASC,CAAAA,CAASJ,EAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,EAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,GAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,MAAA,GAAW,CAAA,CACtB,OAAO,CAAE,QAAS,KAAA,CAAO,KAAA,CAAO,+BAAgC,CAAA,CAGlE,IAAIC,CAAAA,CAA0C,UAG9C,GAAID,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,CACzBC,CAAAA,CAAO,iBAGA,QAAA,CAAS,IAAA,CAAKD,CAAQ,CAAA,CAC7BC,CAAAA,CAAO,UAAA,CAAA,KAEP,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,4BAA6B,CAAA,CAG/D,IAAIC,EAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,EAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"ec.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '593';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Ecuadorian numbers: 9 digits\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 9\n if (national.startsWith('9')) {\n type = 'mobile';\n }\n // Landline: Starts with 2-7 (area codes)\n else if (/^[2-7]/.test(national)) {\n type = 'landline';\n } else {\n return { isValid: false, error: 'Invalid prefix for Ecuador' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';function a(t){return t.replace(/\D/g,"")}function s(t,n){return `+${t}${n}`}var r="34";function m(t,n){let i=a(t),e=i;if(i.startsWith(r)&&i.length>9&&(e=i.slice(r.length)),e.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let o="unknown";if(/^[67]/.test(e))o="mobile";else if(/^[89]/.test(e))o="landline";else return {isValid:false,error:"Invalid prefix for Spain"};let l=e;return n?.format==="e164"?l=s(r,e):n?.format==="international"&&(l=`+${r} ${e}`),{isValid:true,type:o,formatted:l}}exports.validate=m;//# sourceMappingURL=es.cjs.map
2
+ //# sourceMappingURL=es.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/es.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"aAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,EAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,EAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,GAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,MAAA,GAAW,CAAA,CACtB,OAAO,CAAE,QAAS,KAAA,CAAO,KAAA,CAAO,+BAAgC,CAAA,CAGlE,IAAIC,CAAAA,CAA0C,UAG9C,GAAI,OAAA,CAAQ,IAAA,CAAKD,CAAQ,CAAA,CACvBC,CAAAA,CAAO,iBAGA,OAAA,CAAQ,IAAA,CAAKD,CAAQ,CAAA,CAC5BC,CAAAA,CAAO,UAAA,CAAA,KAEP,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,0BAA2B,CAAA,CAG7D,IAAIC,EAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,EAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"es.cjs","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '34';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Spanish numbers: 9 digits\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 6 or 7\n if (/^[67]/.test(national)) {\n type = 'mobile';\n }\n // Landline: Starts with 8 or 9\n else if (/^[89]/.test(national)) {\n type = 'landline';\n } else {\n return { isValid: false, error: 'Invalid prefix for Spain' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.cjs';
2
+ export { v as validate } from '../es-C7dIuFpf.cjs';
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.js';
2
+ export { v as validate } from '../es-DVVnhfSE.js';
@@ -0,0 +1,2 @@
1
+ function a(t){return t.replace(/\D/g,"")}function s(t,n){return `+${t}${n}`}var r="34";function m(t,n){let i=a(t),e=i;if(i.startsWith(r)&&i.length>9&&(e=i.slice(r.length)),e.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let o="unknown";if(/^[67]/.test(e))o="mobile";else if(/^[89]/.test(e))o="landline";else return {isValid:false,error:"Invalid prefix for Spain"};let l=e;return n?.format==="e164"?l=s(r,e):n?.format==="international"&&(l=`+${r} ${e}`),{isValid:true,type:o,formatted:l}}export{m as validate};//# sourceMappingURL=es.js.map
2
+ //# sourceMappingURL=es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/es.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"AAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,EAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,EAG5BO,CAAAA,CAAWD,CAAAA,CAMf,GALIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,GAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAI1CI,CAAAA,CAAS,MAAA,GAAW,CAAA,CACtB,OAAO,CAAE,QAAS,KAAA,CAAO,KAAA,CAAO,+BAAgC,CAAA,CAGlE,IAAIC,CAAAA,CAA0C,UAG9C,GAAI,OAAA,CAAQ,IAAA,CAAKD,CAAQ,CAAA,CACvBC,CAAAA,CAAO,iBAGA,OAAA,CAAQ,IAAA,CAAKD,CAAQ,CAAA,CAC5BC,CAAAA,CAAO,UAAA,CAAA,KAEP,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,0BAA2B,CAAA,CAG7D,IAAIC,EAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,EAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"es.js","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '34';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // Spanish numbers: 9 digits\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 6 or 7\n if (/^[67]/.test(national)) {\n type = 'mobile';\n }\n // Landline: Starts with 8 or 9\n else if (/^[89]/.test(national)) {\n type = 'landline';\n } else {\n return { isValid: false, error: 'Invalid prefix for Spain' };\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';function s(e){return e.replace(/\D/g,"")}function a(e,n){return `+${e}${n}`}var r="33";function m(e,n){let i=s(e),t=i;if(i.startsWith(r)&&i.length>9&&(t=i.slice(r.length)),t.startsWith("0")&&(t=t.slice(1)),t.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let o="unknown";/^[67]/.test(t)?o="mobile":/^[1-5,9]/.test(t)&&(o="landline");let l=t;return n?.format==="e164"?l=a(r,t):n?.format==="international"&&(l=`+${r} ${t}`),{isValid:true,type:o,formatted:l}}exports.validate=m;//# sourceMappingURL=fr.cjs.map
2
+ //# sourceMappingURL=fr.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/fr.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"aAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,EAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,EAG5BO,CAAAA,CAAWD,CAAAA,CAWf,GAVIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,GAAKG,CAAAA,CAAQ,MAAA,CAAS,CAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAK1CI,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,GACzBA,CAAAA,CAAWA,EAAS,KAAA,CAAM,CAAC,CAAA,CAAA,CAGzBA,CAAAA,CAAS,MAAA,GAAW,CAAA,CACtB,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,+BAAgC,CAAA,CAGlE,IAAIC,CAAAA,CAA0C,SAAA,CAG1C,OAAA,CAAQ,IAAA,CAAKD,CAAQ,CAAA,CACvBC,CAAAA,CAAO,QAAA,CAGA,UAAA,CAAW,IAAA,CAAKD,CAAQ,CAAA,GAC/BC,CAAAA,CAAO,UAAA,CAAA,CAGT,IAAIC,CAAAA,CAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,CAAAA,CAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"fr.cjs","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '33';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // French numbers: 9 digits (excluding the leading 0)\n // But users often include the leading 0, so we accept both formats\n if (national.startsWith('0')) {\n national = national.slice(1);\n }\n\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 6 or 7\n if (/^[67]/.test(national)) {\n type = 'mobile';\n }\n // Landline: Starts with 1, 2, 3, 4, 5, 9\n else if (/^[1-5,9]/.test(national)) {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.cjs';
2
+ export { v as validate } from '../fr-BSghMzs5.cjs';
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.js';
2
+ export { v as validate } from '../fr-C8OxubJ3.js';
@@ -0,0 +1,2 @@
1
+ function s(e){return e.replace(/\D/g,"")}function a(e,n){return `+${e}${n}`}var r="33";function m(e,n){let i=s(e),t=i;if(i.startsWith(r)&&i.length>9&&(t=i.slice(r.length)),t.startsWith("0")&&(t=t.slice(1)),t.length!==9)return {isValid:false,error:"Phone number must be 9 digits"};let o="unknown";/^[67]/.test(t)?o="mobile":/^[1-5,9]/.test(t)&&(o="landline");let l=t;return n?.format==="e164"?l=a(r,t):n?.format==="international"&&(l=`+${r} ${t}`),{isValid:true,type:o,formatted:l}}export{m as validate};//# sourceMappingURL=fr.js.map
2
+ //# sourceMappingURL=fr.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/fr.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"AAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,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ace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '33';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 9) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // French numbers: 9 digits (excluding the leading 0)\n // But users often include the leading 0, so we accept both formats\n if (national.startsWith('0')) {\n national = national.slice(1);\n }\n\n if (national.length !== 9) {\n return { isValid: false, error: 'Phone number must be 9 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 6 or 7\n if (/^[67]/.test(national)) {\n type = 'mobile';\n }\n // Landline: Starts with 1, 2, 3, 4, 5, 9\n else if (/^[1-5,9]/.test(national)) {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';function s(e){return e.replace(/\D/g,"")}function a(e,n){return `+${e}${n}`}var r="44";function h(e,n){let i=s(e),t=i;if(i.startsWith(r)&&i.length>10&&(t=i.slice(r.length)),t.startsWith("0")&&(t=t.slice(1)),t.length!==10)return {isValid:false,error:"Phone number must be 10 digits"};let o="unknown";t.startsWith("7")?o="mobile":/^[123]/.test(t)&&(o="landline");let l=t;return n?.format==="e164"?l=a(r,t):n?.format==="international"&&(l=`+${r} ${t}`),{isValid:true,type:o,formatted:l}}exports.validate=h;//# sourceMappingURL=gb.cjs.map
2
+ //# sourceMappingURL=gb.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/utils.ts","../../src/locales/gb.ts"],"names":["cleanPhone","phone","formatE164","countryCode","COUNTRY_CODE","validate","options","cleaned","national","type","formatted"],"mappings":"aAAO,SAASA,CAAAA,CAAWC,CAAAA,CAAuB,CAChD,OAAOA,CAAAA,CAAM,QAAQ,KAAA,CAAO,EAAE,CAChC,CAEO,SAASC,CAAAA,CAAWC,EAAqBF,CAAAA,CAAuB,CACrE,OAAO,CAAA,CAAA,EAAIE,CAAW,CAAA,EAAGF,CAAK,CAAA,CAChC,CCHA,IAAMG,CAAAA,CAAe,IAAA,CAEd,SAASC,CAAAA,CAASJ,EAAeK,CAAAA,CAA+C,CACrF,IAAMC,CAAAA,CAAUP,CAAAA,CAAWC,CAAK,EAG5BO,CAAAA,CAAWD,CAAAA,CAWf,GAVIA,CAAAA,CAAQ,UAAA,CAAWH,CAAY,GAAKG,CAAAA,CAAQ,MAAA,CAAS,EAAA,GACvDC,CAAAA,CAAWD,CAAAA,CAAQ,KAAA,CAAMH,CAAAA,CAAa,MAAM,CAAA,CAAA,CAK1CI,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,GACzBA,CAAAA,CAAWA,EAAS,KAAA,CAAM,CAAC,CAAA,CAAA,CAGzBA,CAAAA,CAAS,MAAA,GAAW,EAAA,CACtB,OAAO,CAAE,OAAA,CAAS,KAAA,CAAO,KAAA,CAAO,gCAAiC,CAAA,CAGnE,IAAIC,CAAAA,CAA0C,SAAA,CAG1CD,CAAAA,CAAS,UAAA,CAAW,GAAG,CAAA,CACzBC,CAAAA,CAAO,QAAA,CAGA,QAAA,CAAS,IAAA,CAAKD,CAAQ,CAAA,GAC7BC,CAAAA,CAAO,UAAA,CAAA,CAGT,IAAIC,CAAAA,CAAYF,CAAAA,CAChB,OAAIF,CAAAA,EAAS,MAAA,GAAW,MAAA,CACtBI,CAAAA,CAAYR,CAAAA,CAAWE,CAAAA,CAAcI,CAAQ,CAAA,CACpCF,CAAAA,EAAS,MAAA,GAAW,eAAA,GAC7BI,EAAY,CAAA,CAAA,EAAIN,CAAY,CAAA,CAAA,EAAII,CAAQ,CAAA,CAAA,CAAA,CAGnC,CAAE,OAAA,CAAS,IAAA,CAAM,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAC,CAAU,CAC1C","file":"gb.cjs","sourcesContent":["export function cleanPhone(phone: string): string {\n return phone.replace(/\\D/g, '');\n}\n\nexport function formatE164(countryCode: string, phone: string): string {\n return `+${countryCode}${phone}`;\n}\n","import type { PhoneValidationResult, PhoneOptions } from '../core/types.js';\nimport { cleanPhone, formatE164 } from '../core/utils.js';\n\nconst COUNTRY_CODE = '44';\n\nexport function validate(phone: string, options?: PhoneOptions): PhoneValidationResult {\n const cleaned = cleanPhone(phone);\n\n // Check if it includes country code\n let national = cleaned;\n if (cleaned.startsWith(COUNTRY_CODE) && cleaned.length > 10) {\n national = cleaned.slice(COUNTRY_CODE.length);\n }\n\n // UK numbers: 10 digits (excluding the leading 0)\n // But users often include the leading 0, so we accept both formats\n if (national.startsWith('0')) {\n national = national.slice(1);\n }\n\n if (national.length !== 10) {\n return { isValid: false, error: 'Phone number must be 10 digits' };\n }\n\n let type: 'mobile' | 'landline' | 'unknown' = 'unknown';\n\n // Mobile: Starts with 7\n if (national.startsWith('7')) {\n type = 'mobile';\n }\n // Landline: Starts with 1, 2, 3\n else if (/^[123]/.test(national)) {\n type = 'landline';\n }\n\n let formatted = national;\n if (options?.format === 'e164') {\n formatted = formatE164(COUNTRY_CODE, national);\n } else if (options?.format === 'international') {\n formatted = `+${COUNTRY_CODE} ${national}`;\n }\n\n return { isValid: true, type, formatted };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.cjs';
2
+ export { v as validate } from '../gb-B5NBNoma.cjs';
@@ -0,0 +1,2 @@
1
+ import '../types-ClMaPMkH.js';
2
+ export { v as validate } from '../gb-DDivDdMy.js';
@@ -0,0 +1,2 @@
1
+ function s(e){return e.replace(/\D/g,"")}function a(e,n){return `+${e}${n}`}var r="44";function h(e,n){let i=s(e),t=i;if(i.startsWith(r)&&i.length>10&&(t=i.slice(r.length)),t.startsWith("0")&&(t=t.slice(1)),t.length!==10)return {isValid:false,error:"Phone number must be 10 digits"};let o="unknown";t.startsWith("7")?o="mobile":/^[123]/.test(t)&&(o="landline");let l=t;return n?.format==="e164"?l=a(r,t):n?.format==="international"&&(l=`+${r} ${t}`),{isValid:true,type:o,formatted:l}}export{h as validate};//# sourceMappingURL=gb.js.map
2
+ //# sourceMappingURL=gb.js.map