phonelib 0.3.6 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1894) hide show
  1. checksums.yaml +8 -8
  2. data/README.rdoc +11 -0
  3. data/data/extended_data.dat +0 -0
  4. data/data/libphonenumber/AUTHORS +4 -0
  5. data/data/libphonenumber/CONTRIBUTORS +68 -0
  6. data/data/libphonenumber/LICENSE +176 -0
  7. data/data/libphonenumber/LICENSE.Chromium +37 -0
  8. data/data/libphonenumber/README.md +112 -0
  9. data/data/libphonenumber/codereview.settings +4 -0
  10. data/data/libphonenumber/cpp/CMakeLists.txt +573 -0
  11. data/data/libphonenumber/cpp/LICENSE +13 -0
  12. data/data/libphonenumber/cpp/README +284 -0
  13. data/data/libphonenumber/cpp/src/phonenumbers/alternate_format.cc +960 -0
  14. data/data/libphonenumber/cpp/src/phonenumbers/alternate_format.h +29 -0
  15. data/data/libphonenumber/cpp/src/phonenumbers/asyoutypeformatter.cc +774 -0
  16. data/data/libphonenumber/cpp/src/phonenumbers/asyoutypeformatter.h +243 -0
  17. data/data/libphonenumber/cpp/src/phonenumbers/base/basictypes.h +208 -0
  18. data/data/libphonenumber/cpp/src/phonenumbers/base/logging.h +41 -0
  19. data/data/libphonenumber/cpp/src/phonenumbers/base/memory/scoped_ptr.h +450 -0
  20. data/data/libphonenumber/cpp/src/phonenumbers/base/memory/singleton.h +95 -0
  21. data/data/libphonenumber/cpp/src/phonenumbers/base/memory/singleton_posix.h +53 -0
  22. data/data/libphonenumber/cpp/src/phonenumbers/base/strings/string_piece.cc +221 -0
  23. data/data/libphonenumber/cpp/src/phonenumbers/base/strings/string_piece.h +194 -0
  24. data/data/libphonenumber/cpp/src/phonenumbers/base/synchronization/lock.h +89 -0
  25. data/data/libphonenumber/cpp/src/phonenumbers/base/synchronization/lock_posix.h +63 -0
  26. data/data/libphonenumber/cpp/src/phonenumbers/base/template_util.h +108 -0
  27. data/data/libphonenumber/cpp/src/phonenumbers/base/thread_checker.h +70 -0
  28. data/data/libphonenumber/cpp/src/phonenumbers/callback.h +88 -0
  29. data/data/libphonenumber/cpp/src/phonenumbers/default_logger.cc +58 -0
  30. data/data/libphonenumber/cpp/src/phonenumbers/default_logger.h +105 -0
  31. data/data/libphonenumber/cpp/src/phonenumbers/encoding_utils.h +51 -0
  32. data/data/libphonenumber/cpp/src/phonenumbers/geocoding/area_code_map.cc +94 -0
  33. data/data/libphonenumber/cpp/src/phonenumbers/geocoding/area_code_map.h +75 -0
  34. data/data/libphonenumber/cpp/src/phonenumbers/geocoding/default_map_storage.cc +65 -0
  35. data/data/libphonenumber/cpp/src/phonenumbers/geocoding/default_map_storage.h +76 -0
  36. data/data/libphonenumber/cpp/src/phonenumbers/geocoding/geocoding_data.h +77 -0
  37. data/data/libphonenumber/cpp/src/phonenumbers/geocoding/mapping_file_provider.cc +175 -0
  38. data/data/libphonenumber/cpp/src/phonenumbers/geocoding/mapping_file_provider.h +75 -0
  39. data/data/libphonenumber/cpp/src/phonenumbers/geocoding/phonenumber_offline_geocoder.cc +216 -0
  40. data/data/libphonenumber/cpp/src/phonenumbers/geocoding/phonenumber_offline_geocoder.h +165 -0
  41. data/data/libphonenumber/cpp/src/phonenumbers/lite_metadata.cc +11422 -0
  42. data/data/libphonenumber/cpp/src/phonenumbers/logger.cc +27 -0
  43. data/data/libphonenumber/cpp/src/phonenumbers/logger.h +103 -0
  44. data/data/libphonenumber/cpp/src/phonenumbers/matcher_api.h +54 -0
  45. data/data/libphonenumber/cpp/src/phonenumbers/metadata.cc +12330 -0
  46. data/data/libphonenumber/cpp/src/phonenumbers/metadata.h +29 -0
  47. data/data/libphonenumber/cpp/src/phonenumbers/normalize_utf8.h +50 -0
  48. data/data/libphonenumber/cpp/src/phonenumbers/phonenumber.cc +87 -0
  49. data/data/libphonenumber/cpp/src/phonenumbers/phonenumber.h +40 -0
  50. data/data/libphonenumber/cpp/src/phonenumbers/phonenumbermatch.cc +91 -0
  51. data/data/libphonenumber/cpp/src/phonenumbers/phonenumbermatch.h +125 -0
  52. data/data/libphonenumber/cpp/src/phonenumbers/phonenumbermatcher.cc +908 -0
  53. data/data/libphonenumber/cpp/src/phonenumbers/phonenumbermatcher.h +201 -0
  54. data/data/libphonenumber/cpp/src/phonenumbers/phonenumberutil.cc +2799 -0
  55. data/data/libphonenumber/cpp/src/phonenumbers/phonenumberutil.h +826 -0
  56. data/data/libphonenumber/cpp/src/phonenumbers/regex_based_matcher.cc +68 -0
  57. data/data/libphonenumber/cpp/src/phonenumbers/regex_based_matcher.h +61 -0
  58. data/data/libphonenumber/cpp/src/phonenumbers/regexp_adapter.h +168 -0
  59. data/data/libphonenumber/cpp/src/phonenumbers/regexp_adapter_icu.cc +237 -0
  60. data/data/libphonenumber/cpp/src/phonenumbers/regexp_adapter_icu.h +41 -0
  61. data/data/libphonenumber/cpp/src/phonenumbers/regexp_adapter_re2.cc +161 -0
  62. data/data/libphonenumber/cpp/src/phonenumbers/regexp_adapter_re2.h +40 -0
  63. data/data/libphonenumber/cpp/src/phonenumbers/regexp_cache.cc +60 -0
  64. data/data/libphonenumber/cpp/src/phonenumbers/regexp_cache.h +77 -0
  65. data/data/libphonenumber/cpp/src/phonenumbers/regexp_factory.h +44 -0
  66. data/data/libphonenumber/cpp/src/phonenumbers/region_code.h +40 -0
  67. data/data/libphonenumber/cpp/src/phonenumbers/short_metadata.cc +2795 -0
  68. data/data/libphonenumber/cpp/src/phonenumbers/short_metadata.h +29 -0
  69. data/data/libphonenumber/cpp/src/phonenumbers/shortnumberinfo.cc +403 -0
  70. data/data/libphonenumber/cpp/src/phonenumbers/shortnumberinfo.h +237 -0
  71. data/data/libphonenumber/cpp/src/phonenumbers/stl_util.h +51 -0
  72. data/data/libphonenumber/cpp/src/phonenumbers/string_byte_sink.cc +33 -0
  73. data/data/libphonenumber/cpp/src/phonenumbers/string_byte_sink.h +40 -0
  74. data/data/libphonenumber/cpp/src/phonenumbers/stringutil.cc +448 -0
  75. data/data/libphonenumber/cpp/src/phonenumbers/stringutil.h +176 -0
  76. data/data/libphonenumber/cpp/src/phonenumbers/test_metadata.cc +888 -0
  77. data/data/libphonenumber/cpp/src/phonenumbers/unicodestring.cc +114 -0
  78. data/data/libphonenumber/cpp/src/phonenumbers/unicodestring.h +133 -0
  79. data/data/libphonenumber/cpp/src/phonenumbers/utf/README +1 -0
  80. data/data/libphonenumber/cpp/src/phonenumbers/utf/rune.c +358 -0
  81. data/data/libphonenumber/cpp/src/phonenumbers/utf/stringpiece.h +23 -0
  82. data/data/libphonenumber/cpp/src/phonenumbers/utf/stringprintf.h +22 -0
  83. data/data/libphonenumber/cpp/src/phonenumbers/utf/unicodetext.cc +520 -0
  84. data/data/libphonenumber/cpp/src/phonenumbers/utf/unicodetext.h +461 -0
  85. data/data/libphonenumber/cpp/src/phonenumbers/utf/unilib.cc +68 -0
  86. data/data/libphonenumber/cpp/src/phonenumbers/utf/unilib.h +99 -0
  87. data/data/libphonenumber/cpp/src/phonenumbers/utf/utf.h +240 -0
  88. data/data/libphonenumber/cpp/src/phonenumbers/utf/utfdef.h +27 -0
  89. data/data/libphonenumber/cpp/test/phonenumbers/asyoutypeformatter_test.cc +1237 -0
  90. data/data/libphonenumber/cpp/test/phonenumbers/geocoding/area_code_map_test.cc +201 -0
  91. data/data/libphonenumber/cpp/test/phonenumbers/geocoding/geocoding_data_test.cc +176 -0
  92. data/data/libphonenumber/cpp/test/phonenumbers/geocoding/geocoding_test_data.h +50 -0
  93. data/data/libphonenumber/cpp/test/phonenumbers/geocoding/geocoding_test_program.cc +43 -0
  94. data/data/libphonenumber/cpp/test/phonenumbers/geocoding/mapping_file_provider_test.cc +91 -0
  95. data/data/libphonenumber/cpp/test/phonenumbers/geocoding/phonenumber_offline_geocoder_test.cc +205 -0
  96. data/data/libphonenumber/cpp/test/phonenumbers/logger_test.cc +172 -0
  97. data/data/libphonenumber/cpp/test/phonenumbers/phonenumbermatch_test.cc +92 -0
  98. data/data/libphonenumber/cpp/test/phonenumbers/phonenumbermatcher_test.cc +1226 -0
  99. data/data/libphonenumber/cpp/test/phonenumbers/phonenumberutil_test.cc +3915 -0
  100. data/data/libphonenumber/cpp/test/phonenumbers/regexp_adapter_test.cc +322 -0
  101. data/data/libphonenumber/cpp/test/phonenumbers/regexp_cache_test.cc +60 -0
  102. data/data/libphonenumber/cpp/test/phonenumbers/run_tests.cc +21 -0
  103. data/data/libphonenumber/cpp/test/phonenumbers/shortnumberinfo_test.cc +468 -0
  104. data/data/libphonenumber/cpp/test/phonenumbers/stringutil_test.cc +306 -0
  105. data/data/libphonenumber/cpp/test/phonenumbers/test_util.cc +63 -0
  106. data/data/libphonenumber/cpp/test/phonenumbers/test_util.h +199 -0
  107. data/data/libphonenumber/cpp/test/phonenumbers/unicodestring_test.cc +236 -0
  108. data/data/libphonenumber/cpp/test/phonenumbers/utf/unicodetext_test.cc +45 -0
  109. data/data/libphonenumber/debian/README.source +21 -0
  110. data/data/libphonenumber/debian/changelog +5 -0
  111. data/data/libphonenumber/debian/compat +1 -0
  112. data/data/libphonenumber/debian/control +73 -0
  113. data/data/libphonenumber/debian/copyright +74 -0
  114. data/data/libphonenumber/debian/libphonenumber6-dev.install +3 -0
  115. data/data/libphonenumber/debian/libphonenumber6-java.jlibs +1 -0
  116. data/data/libphonenumber/debian/libphonenumber6-java.poms +39 -0
  117. data/data/libphonenumber/debian/libphonenumber6.install +1 -0
  118. data/data/libphonenumber/debian/maven.cleanIgnoreRules +17 -0
  119. data/data/libphonenumber/debian/maven.ignoreRules +23 -0
  120. data/data/libphonenumber/debian/maven.properties +4 -0
  121. data/data/libphonenumber/debian/maven.publishedRules +19 -0
  122. data/data/libphonenumber/debian/maven.rules +31 -0
  123. data/data/libphonenumber/debian/patches/0003-maven-exclude-demo.patch +13 -0
  124. data/data/libphonenumber/debian/patches/series +1 -0
  125. data/data/libphonenumber/debian/rules +89 -0
  126. data/data/libphonenumber/debian/source/format +1 -0
  127. data/data/libphonenumber/debian/watch +3 -0
  128. data/data/libphonenumber/java/build.xml +303 -0
  129. data/data/libphonenumber/java/carrier/pom.xml +46 -0
  130. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/PhoneNumberToCarrierMapper.java +124 -0
  131. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1242_en +0 -0
  132. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1246_en +0 -0
  133. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1264_en +0 -0
  134. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1441_en +0 -0
  135. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1473_en +0 -0
  136. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1649_en +0 -0
  137. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1671_en +0 -0
  138. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1684_en +0 -0
  139. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1758_en +0 -0
  140. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1767_en +0 -0
  141. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1784_en +0 -0
  142. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1787_en +0 -0
  143. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1809_en +0 -0
  144. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1868_en +0 -0
  145. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1869_en +0 -0
  146. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/1939_en +0 -0
  147. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/20_en +0 -0
  148. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/211_en +0 -0
  149. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/212_en +0 -0
  150. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/213_en +0 -0
  151. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/216_en +0 -0
  152. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/220_en +0 -0
  153. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/221_en +0 -0
  154. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/222_en +0 -0
  155. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/223_en +0 -0
  156. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/224_en +0 -0
  157. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/225_en +0 -0
  158. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/226_en +0 -0
  159. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/227_en +0 -0
  160. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/228_en +0 -0
  161. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/229_en +0 -0
  162. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/230_en +0 -0
  163. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/231_en +0 -0
  164. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/232_en +0 -0
  165. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/233_en +0 -0
  166. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/234_en +0 -0
  167. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/235_en +0 -0
  168. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/236_en +0 -0
  169. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/237_en +0 -0
  170. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/238_en +0 -0
  171. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/239_en +0 -0
  172. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/240_en +0 -0
  173. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/241_en +0 -0
  174. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/242_en +0 -0
  175. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/243_en +0 -0
  176. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/244_en +0 -0
  177. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/245_en +0 -0
  178. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/248_en +0 -0
  179. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/249_en +0 -0
  180. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/250_en +0 -0
  181. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/251_en +0 -0
  182. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/252_en +0 -0
  183. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/253_en +0 -0
  184. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/254_en +0 -0
  185. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/255_en +0 -0
  186. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/256_en +0 -0
  187. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/257_en +0 -0
  188. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/258_en +0 -0
  189. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/260_en +0 -0
  190. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/261_en +0 -0
  191. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/263_en +0 -0
  192. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/265_en +0 -0
  193. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/267_en +0 -0
  194. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/268_en +0 -0
  195. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/27_en +0 -0
  196. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/297_en +0 -0
  197. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/298_en +0 -0
  198. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/299_en +0 -0
  199. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/30_en +0 -0
  200. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/31_en +0 -0
  201. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/32_en +0 -0
  202. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/33_en +0 -0
  203. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/350_en +0 -0
  204. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/351_en +0 -0
  205. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/352_en +0 -0
  206. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/353_en +0 -0
  207. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/354_en +0 -0
  208. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/355_en +0 -0
  209. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/356_en +0 -0
  210. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/357_en +0 -0
  211. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/358_en +0 -0
  212. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/359_en +0 -0
  213. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/36_en +0 -0
  214. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/370_en +0 -0
  215. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/372_en +0 -0
  216. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/373_en +0 -0
  217. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/374_en +0 -0
  218. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/375_be +0 -0
  219. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/375_en +0 -0
  220. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/375_ru +0 -0
  221. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/376_en +0 -0
  222. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/380_en +0 -0
  223. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/381_en +0 -0
  224. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/385_en +0 -0
  225. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/386_en +0 -0
  226. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/387_en +0 -0
  227. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/389_en +0 -0
  228. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/39_en +0 -0
  229. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/40_en +0 -0
  230. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/41_en +0 -0
  231. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/420_en +0 -0
  232. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/421_en +0 -0
  233. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/43_en +0 -0
  234. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/45_en +0 -0
  235. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/47_en +0 -0
  236. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/48_en +0 -0
  237. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/49_en +0 -0
  238. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/501_en +0 -0
  239. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/505_en +0 -0
  240. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/506_en +0 -0
  241. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/507_en +0 -0
  242. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/51_en +0 -0
  243. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/53_en +0 -0
  244. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/54_en +0 -0
  245. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/55_en +0 -0
  246. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/56_en +0 -0
  247. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/57_en +0 -0
  248. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/58_en +0 -0
  249. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/591_en +0 -0
  250. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/595_en +0 -0
  251. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/597_en +0 -0
  252. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/598_en +0 -0
  253. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/599_en +0 -0
  254. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/60_en +0 -0
  255. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/61_en +0 -0
  256. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/62_en +0 -0
  257. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/63_en +0 -0
  258. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/64_en +0 -0
  259. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/65_en +0 -0
  260. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/66_en +0 -0
  261. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/670_en +0 -0
  262. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/673_en +0 -0
  263. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/675_en +0 -0
  264. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/676_en +0 -0
  265. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/677_en +0 -0
  266. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/678_en +0 -0
  267. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/679_en +0 -0
  268. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/685_en +0 -0
  269. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/686_en +0 -0
  270. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/7_en +0 -0
  271. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/84_en +0 -0
  272. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/852_en +0 -0
  273. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/855_en +0 -0
  274. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/856_en +0 -0
  275. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/86_en +0 -0
  276. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/880_en +0 -0
  277. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/90_en +0 -0
  278. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/91_en +0 -0
  279. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/92_en +0 -0
  280. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/93_en +0 -0
  281. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/94_en +0 -0
  282. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/95_en +0 -0
  283. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/960_en +0 -0
  284. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/961_en +0 -0
  285. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/962_en +0 -0
  286. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/964_en +0 -0
  287. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/965_ar +0 -0
  288. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/965_en +0 -0
  289. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/966_en +0 -0
  290. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/967_en +0 -0
  291. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/968_en +0 -0
  292. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/970_en +0 -0
  293. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/971_en +0 -0
  294. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/972_en +0 -0
  295. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/973_en +0 -0
  296. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/974_en +0 -0
  297. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/975_en +0 -0
  298. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/977_en +0 -0
  299. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/98_en +0 -0
  300. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/992_en +0 -0
  301. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/993_en +0 -0
  302. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/994_en +0 -0
  303. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/995_en +0 -0
  304. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/996_en +0 -0
  305. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/998_en +0 -0
  306. data/data/libphonenumber/java/carrier/src/com/google/i18n/phonenumbers/carrier/data/config +0 -0
  307. data/data/libphonenumber/java/carrier/test/com/google/i18n/phonenumbers/PhoneNumberToCarrierMapperTest.java +121 -0
  308. data/data/libphonenumber/java/carrier/test/com/google/i18n/phonenumbers/carrier/testing_data/1650_en +0 -0
  309. data/data/libphonenumber/java/carrier/test/com/google/i18n/phonenumbers/carrier/testing_data/244_en +0 -0
  310. data/data/libphonenumber/java/carrier/test/com/google/i18n/phonenumbers/carrier/testing_data/44_en +0 -0
  311. data/data/libphonenumber/java/carrier/test/com/google/i18n/phonenumbers/carrier/testing_data/44_sv +0 -0
  312. data/data/libphonenumber/java/carrier/test/com/google/i18n/phonenumbers/carrier/testing_data/config +0 -0
  313. data/data/libphonenumber/java/demo/README +16 -0
  314. data/data/libphonenumber/java/demo/build.xml +59 -0
  315. data/data/libphonenumber/java/demo/pom.xml +107 -0
  316. data/data/libphonenumber/java/demo/src/com/google/phonenumbers/PhoneNumberParserServlet.java +298 -0
  317. data/data/libphonenumber/java/demo/war/WEB-INF/appengine-web.xml +11 -0
  318. data/data/libphonenumber/java/demo/war/WEB-INF/lib/commons-fileupload-1.2.1.jar +0 -0
  319. data/data/libphonenumber/java/demo/war/WEB-INF/lib/commons-io-1.4.jar +0 -0
  320. data/data/libphonenumber/java/demo/war/WEB-INF/logging.properties +13 -0
  321. data/data/libphonenumber/java/demo/war/WEB-INF/web.xml +18 -0
  322. data/data/libphonenumber/java/demo/war/favicon.ico +0 -0
  323. data/data/libphonenumber/java/demo/war/phonenumberparser.jsp +39 -0
  324. data/data/libphonenumber/java/demo/war/stylesheets/main.css +26 -0
  325. data/data/libphonenumber/java/geocoder/pom.xml +54 -0
  326. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/PhoneNumberToTimeZonesMapper.java +192 -0
  327. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/PhoneNumberOfflineGeocoder.java +228 -0
  328. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1201_en +0 -0
  329. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1202_en +0 -0
  330. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1203_en +0 -0
  331. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1204_en +0 -0
  332. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1205_en +0 -0
  333. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1206_en +0 -0
  334. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1207_en +0 -0
  335. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1208_en +0 -0
  336. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1209_en +0 -0
  337. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1210_en +0 -0
  338. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1212_en +0 -0
  339. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1213_en +0 -0
  340. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1214_en +0 -0
  341. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1215_en +0 -0
  342. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1216_en +0 -0
  343. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1217_en +0 -0
  344. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1218_en +0 -0
  345. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1219_en +0 -0
  346. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1224_en +0 -0
  347. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1225_en +0 -0
  348. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1226_en +0 -0
  349. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1228_en +0 -0
  350. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1229_en +0 -0
  351. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1231_en +0 -0
  352. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1234_en +0 -0
  353. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1236_en +0 -0
  354. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1239_en +0 -0
  355. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1240_en +0 -0
  356. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1242_en +0 -0
  357. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1248_en +0 -0
  358. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1250_en +0 -0
  359. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1251_en +0 -0
  360. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1252_en +0 -0
  361. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1253_en +0 -0
  362. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1254_en +0 -0
  363. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1256_en +0 -0
  364. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1260_en +0 -0
  365. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1262_en +0 -0
  366. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1267_en +0 -0
  367. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1269_en +0 -0
  368. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1270_en +0 -0
  369. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1272_en +0 -0
  370. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1276_en +0 -0
  371. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1281_en +0 -0
  372. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1289_en +0 -0
  373. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1301_en +0 -0
  374. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1302_en +0 -0
  375. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1303_en +0 -0
  376. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1304_en +0 -0
  377. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1305_en +0 -0
  378. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1306_en +0 -0
  379. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1307_en +0 -0
  380. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1308_en +0 -0
  381. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1309_en +0 -0
  382. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1310_en +0 -0
  383. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1312_en +0 -0
  384. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1313_en +0 -0
  385. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1314_en +0 -0
  386. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1315_en +0 -0
  387. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1316_en +0 -0
  388. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1317_en +0 -0
  389. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1318_en +0 -0
  390. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1319_en +0 -0
  391. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1320_en +0 -0
  392. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1321_en +0 -0
  393. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1323_en +0 -0
  394. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1325_en +0 -0
  395. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1330_en +0 -0
  396. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1331_en +0 -0
  397. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1334_en +0 -0
  398. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1336_en +0 -0
  399. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1337_en +0 -0
  400. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1339_en +0 -0
  401. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1345_en +0 -0
  402. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1346_en +0 -0
  403. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1347_en +0 -0
  404. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1351_en +0 -0
  405. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1352_en +0 -0
  406. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1360_en +0 -0
  407. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1361_en +0 -0
  408. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1364_en +0 -0
  409. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1365_en +0 -0
  410. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1385_en +0 -0
  411. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1386_en +0 -0
  412. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1401_en +0 -0
  413. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1402_en +0 -0
  414. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1403_en +0 -0
  415. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1404_en +0 -0
  416. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1405_en +0 -0
  417. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1406_en +0 -0
  418. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1407_en +0 -0
  419. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1408_en +0 -0
  420. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1409_en +0 -0
  421. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1410_en +0 -0
  422. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1412_en +0 -0
  423. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1413_en +0 -0
  424. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1414_en +0 -0
  425. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1415_en +0 -0
  426. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1416_en +0 -0
  427. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1417_en +0 -0
  428. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1418_en +0 -0
  429. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1419_en +0 -0
  430. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1423_en +0 -0
  431. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1424_en +0 -0
  432. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1425_en +0 -0
  433. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1430_en +0 -0
  434. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1431_en +0 -0
  435. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1432_en +0 -0
  436. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1434_en +0 -0
  437. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1435_en +0 -0
  438. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1437_en +0 -0
  439. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1438_en +0 -0
  440. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1440_en +0 -0
  441. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1441_en +0 -0
  442. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1443_en +0 -0
  443. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1450_en +0 -0
  444. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1469_en +0 -0
  445. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1478_en +0 -0
  446. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1479_en +0 -0
  447. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1480_en +0 -0
  448. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1484_en +0 -0
  449. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1501_en +0 -0
  450. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1502_en +0 -0
  451. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1503_en +0 -0
  452. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1504_en +0 -0
  453. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1505_en +0 -0
  454. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1506_en +0 -0
  455. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1507_en +0 -0
  456. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1508_en +0 -0
  457. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1509_en +0 -0
  458. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1510_en +0 -0
  459. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1512_en +0 -0
  460. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1513_en +0 -0
  461. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1514_en +0 -0
  462. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1515_en +0 -0
  463. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1516_en +0 -0
  464. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1517_en +0 -0
  465. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1518_en +0 -0
  466. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1519_en +0 -0
  467. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1520_en +0 -0
  468. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1530_en +0 -0
  469. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1540_en +0 -0
  470. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1541_en +0 -0
  471. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1551_en +0 -0
  472. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1559_en +0 -0
  473. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1561_en +0 -0
  474. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1562_en +0 -0
  475. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1563_en +0 -0
  476. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1567_en +0 -0
  477. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1570_en +0 -0
  478. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1571_en +0 -0
  479. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1573_en +0 -0
  480. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1574_en +0 -0
  481. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1575_en +0 -0
  482. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1580_en +0 -0
  483. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1585_en +0 -0
  484. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1586_en +0 -0
  485. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1587_en +0 -0
  486. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1601_en +0 -0
  487. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1602_en +0 -0
  488. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1603_en +0 -0
  489. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1604_en +0 -0
  490. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1605_en +0 -0
  491. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1606_en +0 -0
  492. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1607_en +0 -0
  493. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1608_en +0 -0
  494. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1609_en +0 -0
  495. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1610_en +0 -0
  496. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1612_en +0 -0
  497. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1613_en +0 -0
  498. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1614_en +0 -0
  499. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1615_en +0 -0
  500. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1616_en +0 -0
  501. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1617_en +0 -0
  502. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1618_en +0 -0
  503. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1619_en +0 -0
  504. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1620_en +0 -0
  505. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1623_en +0 -0
  506. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1626_en +0 -0
  507. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1630_en +0 -0
  508. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1631_en +0 -0
  509. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1636_en +0 -0
  510. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1639_en +0 -0
  511. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1641_en +0 -0
  512. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1646_en +0 -0
  513. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1647_en +0 -0
  514. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1649_en +0 -0
  515. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1650_en +0 -0
  516. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1651_en +0 -0
  517. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1657_en +0 -0
  518. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1660_en +0 -0
  519. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1661_en +0 -0
  520. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1662_en +0 -0
  521. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1667_en +0 -0
  522. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1669_en +0 -0
  523. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1671_en +0 -0
  524. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1678_en +0 -0
  525. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1682_en +0 -0
  526. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1701_en +0 -0
  527. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1702_en +0 -0
  528. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1703_en +0 -0
  529. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1704_en +0 -0
  530. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1705_en +0 -0
  531. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1706_en +0 -0
  532. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1707_en +0 -0
  533. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1708_en +0 -0
  534. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1709_en +0 -0
  535. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1712_en +0 -0
  536. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1713_en +0 -0
  537. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1714_en +0 -0
  538. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1715_en +0 -0
  539. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1716_en +0 -0
  540. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1717_en +0 -0
  541. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1718_en +0 -0
  542. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1719_en +0 -0
  543. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1720_en +0 -0
  544. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1724_en +0 -0
  545. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1725_en +0 -0
  546. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1726_en +0 -0
  547. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1727_en +0 -0
  548. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1730_en +0 -0
  549. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1731_en +0 -0
  550. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1732_en +0 -0
  551. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1734_en +0 -0
  552. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1737_en +0 -0
  553. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1740_en +0 -0
  554. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1754_en +0 -0
  555. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1757_en +0 -0
  556. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1760_en +0 -0
  557. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1763_en +0 -0
  558. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1765_en +0 -0
  559. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1769_en +0 -0
  560. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1770_en +0 -0
  561. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1772_en +0 -0
  562. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1773_en +0 -0
  563. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1774_en +0 -0
  564. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1775_en +0 -0
  565. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1778_en +0 -0
  566. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1779_en +0 -0
  567. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1780_en +0 -0
  568. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1781_en +0 -0
  569. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1782_en +0 -0
  570. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1785_en +0 -0
  571. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1786_en +0 -0
  572. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1801_en +0 -0
  573. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1802_en +0 -0
  574. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1803_en +0 -0
  575. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1804_en +0 -0
  576. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1805_en +0 -0
  577. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1806_en +0 -0
  578. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1807_en +0 -0
  579. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1808_en +0 -0
  580. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1809_en +0 -0
  581. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1810_en +0 -0
  582. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1812_en +0 -0
  583. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1813_en +0 -0
  584. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1814_en +0 -0
  585. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1815_en +0 -0
  586. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1816_en +0 -0
  587. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1817_en +0 -0
  588. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1818_en +0 -0
  589. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1819_en +0 -0
  590. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1828_en +0 -0
  591. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1830_en +0 -0
  592. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1831_en +0 -0
  593. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1832_en +0 -0
  594. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1838_en +0 -0
  595. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1843_en +0 -0
  596. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1845_en +0 -0
  597. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1847_en +0 -0
  598. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1848_en +0 -0
  599. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1850_en +0 -0
  600. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1851_en +0 -0
  601. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1856_en +0 -0
  602. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1857_en +0 -0
  603. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1858_en +0 -0
  604. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1859_en +0 -0
  605. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1860_en +0 -0
  606. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1862_en +0 -0
  607. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1863_en +0 -0
  608. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1864_en +0 -0
  609. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1865_en +0 -0
  610. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1867_en +0 -0
  611. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1870_en +0 -0
  612. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1872_en +0 -0
  613. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1873_en +0 -0
  614. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1876_en +0 -0
  615. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1878_en +0 -0
  616. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1888_en +0 -0
  617. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1901_en +0 -0
  618. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1902_en +0 -0
  619. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1903_en +0 -0
  620. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1904_en +0 -0
  621. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1905_en +0 -0
  622. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1906_en +0 -0
  623. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1907_en +0 -0
  624. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1908_en +0 -0
  625. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1909_en +0 -0
  626. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1910_en +0 -0
  627. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1912_en +0 -0
  628. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1913_en +0 -0
  629. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1914_en +0 -0
  630. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1915_en +0 -0
  631. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1916_en +0 -0
  632. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1917_en +0 -0
  633. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1918_en +0 -0
  634. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1919_en +0 -0
  635. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1920_en +0 -0
  636. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1925_en +0 -0
  637. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1928_en +0 -0
  638. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1929_en +0 -0
  639. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1930_en +0 -0
  640. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1931_en +0 -0
  641. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1936_en +0 -0
  642. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1937_en +0 -0
  643. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1938_en +0 -0
  644. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1940_en +0 -0
  645. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1941_en +0 -0
  646. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1947_en +0 -0
  647. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1949_en +0 -0
  648. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1951_en +0 -0
  649. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1952_en +0 -0
  650. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1954_en +0 -0
  651. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1956_en +0 -0
  652. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1959_en +0 -0
  653. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1970_en +0 -0
  654. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1971_en +0 -0
  655. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1972_en +0 -0
  656. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1973_en +0 -0
  657. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1978_en +0 -0
  658. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1979_en +0 -0
  659. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1980_en +0 -0
  660. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1984_en +0 -0
  661. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1985_en +0 -0
  662. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/1989_en +0 -0
  663. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/20_en +0 -0
  664. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/212_en +0 -0
  665. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/212_fr +0 -0
  666. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/213_en +0 -0
  667. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/216_en +0 -0
  668. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/220_en +0 -0
  669. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/221_en +0 -0
  670. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/222_en +0 -0
  671. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/222_fr +0 -0
  672. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/224_en +0 -0
  673. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/225_en +0 -0
  674. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/225_fr +0 -0
  675. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/226_en +0 -0
  676. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/228_en +0 -0
  677. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/228_es +0 -0
  678. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/228_fr +0 -0
  679. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/229_en +0 -0
  680. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/229_fr +0 -0
  681. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/230_en +0 -0
  682. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/230_es +0 -0
  683. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/230_fr +0 -0
  684. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/232_en +0 -0
  685. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/233_en +0 -0
  686. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/234_en +0 -0
  687. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/237_en +0 -0
  688. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/238_en +0 -0
  689. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/238_pt +0 -0
  690. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/239_en +0 -0
  691. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/239_pt +0 -0
  692. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/241_en +0 -0
  693. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/242_en +0 -0
  694. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/242_fr +0 -0
  695. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/243_en +0 -0
  696. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/243_fr +0 -0
  697. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/244_en +0 -0
  698. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/244_pt +0 -0
  699. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/245_en +0 -0
  700. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/245_pt +0 -0
  701. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/247_en +0 -0
  702. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/249_en +0 -0
  703. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/251_en +0 -0
  704. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/252_en +0 -0
  705. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/254_en +0 -0
  706. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/256_en +0 -0
  707. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/257_en +0 -0
  708. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/258_en +0 -0
  709. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/258_pt +0 -0
  710. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/260_en +0 -0
  711. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/261_en +0 -0
  712. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/263_en +0 -0
  713. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/264_en +0 -0
  714. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/266_en +0 -0
  715. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/267_en +0 -0
  716. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/268_en +0 -0
  717. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/269_en +0 -0
  718. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/269_fr +0 -0
  719. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/27_en +0 -0
  720. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/290_en +0 -0
  721. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/290_fr +0 -0
  722. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/299_en +0 -0
  723. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/30_el +0 -0
  724. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/30_en +0 -0
  725. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/31_en +0 -0
  726. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/31_nl +0 -0
  727. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/32_de +0 -0
  728. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/32_en +0 -0
  729. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/32_fr +0 -0
  730. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/32_nl +0 -0
  731. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/33_en +0 -0
  732. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/33_fr +0 -0
  733. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/34_en +0 -0
  734. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/34_es +0 -0
  735. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/351_en +0 -0
  736. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/351_pt +0 -0
  737. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/352_de +0 -0
  738. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/352_en +0 -0
  739. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/352_fr +0 -0
  740. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/353_en +0 -0
  741. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/354_en +0 -0
  742. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/355_en +0 -0
  743. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/358_en +0 -0
  744. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/358_fi +0 -0
  745. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/358_se +0 -0
  746. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/359_bg +0 -0
  747. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/359_en +0 -0
  748. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/36_en +0 -0
  749. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/36_hu +0 -0
  750. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/370_en +0 -0
  751. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/371_en +0 -0
  752. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/372_en +0 -0
  753. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/373_en +0 -0
  754. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/373_ro +0 -0
  755. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/373_ru +0 -0
  756. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/374_am +0 -0
  757. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/374_en +0 -0
  758. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/374_ru +0 -0
  759. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/375_be +0 -0
  760. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/375_en +0 -0
  761. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/375_ru +0 -0
  762. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/381_en +0 -0
  763. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/381_sr +0 -0
  764. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/389_en +0 -0
  765. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/39_en +0 -0
  766. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/39_it +0 -0
  767. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/40_en +0 -0
  768. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/40_ro +0 -0
  769. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/41_de +0 -0
  770. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/41_en +0 -0
  771. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/41_fr +0 -0
  772. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/41_it +0 -0
  773. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/420_en +0 -0
  774. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/421_en +0 -0
  775. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/43_de +0 -0
  776. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/43_en +0 -0
  777. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/44_en +0 -0
  778. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/46_en +0 -0
  779. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/46_sv +0 -0
  780. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/47_en +0 -0
  781. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/48_en +0 -0
  782. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/48_pl +0 -0
  783. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/49_de +0 -0
  784. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/49_en +0 -0
  785. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/51_en +0 -0
  786. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/53_en +0 -0
  787. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/54_en +0 -0
  788. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/54_es +0 -0
  789. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/55_en +0 -0
  790. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/55_pt +0 -0
  791. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/56_en +0 -0
  792. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/56_es +0 -0
  793. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/57_en +0 -0
  794. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/58_en +0 -0
  795. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/58_es +0 -0
  796. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/599_en +0 -0
  797. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/62_en +0 -0
  798. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/62_id +0 -0
  799. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/66_en +0 -0
  800. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/66_th +0 -0
  801. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/686_en +0 -0
  802. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/7_en +0 -0
  803. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/7_ru +0 -0
  804. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/81_en +0 -0
  805. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/81_ja +0 -0
  806. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/82_ar +0 -0
  807. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/82_cs +0 -0
  808. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/82_en +0 -0
  809. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/82_fr +0 -0
  810. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/82_ko +0 -0
  811. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/82_zh +0 -0
  812. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/82_zh_Hant +0 -0
  813. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/84_en +0 -0
  814. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/84_vi +0 -0
  815. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/86_en +0 -0
  816. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/86_zh +0 -0
  817. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/886_en +0 -0
  818. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/886_zh +0 -0
  819. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/886_zh_Hant +0 -0
  820. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/90_en +0 -0
  821. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/90_tr +0 -0
  822. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/91_en +0 -0
  823. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/94_en +0 -0
  824. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/962_en +0 -0
  825. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/966_ar +0 -0
  826. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/966_en +0 -0
  827. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/98_en +0 -0
  828. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/98_fa +0 -0
  829. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/geocoding/data/config +0 -0
  830. data/data/libphonenumber/java/geocoder/src/com/google/i18n/phonenumbers/timezones/data/map_data +0 -0
  831. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/PhoneNumberToTimeZonesMapperTest.java +136 -0
  832. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/geocoding/PhoneNumberOfflineGeocoderTest.java +163 -0
  833. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/geocoding/testing_data/1201_de +0 -0
  834. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/geocoding/testing_data/1201_en +0 -0
  835. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/geocoding/testing_data/1212_en +0 -0
  836. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/geocoding/testing_data/1617_en +0 -0
  837. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/geocoding/testing_data/1650_de +0 -0
  838. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/geocoding/testing_data/1650_en +0 -0
  839. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/geocoding/testing_data/1989_en +0 -0
  840. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/geocoding/testing_data/54_en +0 -0
  841. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/geocoding/testing_data/82_en +0 -0
  842. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/geocoding/testing_data/82_ko +0 -0
  843. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/geocoding/testing_data/config +0 -0
  844. data/data/libphonenumber/java/geocoder/test/com/google/i18n/phonenumbers/timezones/testing_data/map_data +0 -0
  845. data/data/libphonenumber/java/internal/prefixmapper/pom.xml +36 -0
  846. data/data/libphonenumber/java/internal/prefixmapper/src/com/google/i18n/phonenumbers/prefixmapper/DefaultMapStorage.java +94 -0
  847. data/data/libphonenumber/java/internal/prefixmapper/src/com/google/i18n/phonenumbers/prefixmapper/FlyweightMapStorage.java +263 -0
  848. data/data/libphonenumber/java/internal/prefixmapper/src/com/google/i18n/phonenumbers/prefixmapper/MappingFileProvider.java +229 -0
  849. data/data/libphonenumber/java/internal/prefixmapper/src/com/google/i18n/phonenumbers/prefixmapper/PhonePrefixMap.java +216 -0
  850. data/data/libphonenumber/java/internal/prefixmapper/src/com/google/i18n/phonenumbers/prefixmapper/PhonePrefixMapStorageStrategy.java +108 -0
  851. data/data/libphonenumber/java/internal/prefixmapper/src/com/google/i18n/phonenumbers/prefixmapper/PrefixFileReader.java +143 -0
  852. data/data/libphonenumber/java/internal/prefixmapper/src/com/google/i18n/phonenumbers/prefixmapper/PrefixTimeZonesMap.java +126 -0
  853. data/data/libphonenumber/java/internal/prefixmapper/test/com/google/i18n/phonenumbers/prefixmapper/FlyweightMapStorageTest.java +107 -0
  854. data/data/libphonenumber/java/internal/prefixmapper/test/com/google/i18n/phonenumbers/prefixmapper/MappingFileProviderTest.java +93 -0
  855. data/data/libphonenumber/java/internal/prefixmapper/test/com/google/i18n/phonenumbers/prefixmapper/PhonePrefixMapTest.java +193 -0
  856. data/data/libphonenumber/java/internal/prefixmapper/test/com/google/i18n/phonenumbers/prefixmapper/PrefixFileReaderTest.java +75 -0
  857. data/data/libphonenumber/java/internal/prefixmapper/test/com/google/i18n/phonenumbers/prefixmapper/PrefixTimeZonesMapTest.java +176 -0
  858. data/data/libphonenumber/java/lib/junit-4.8.1.jar +0 -0
  859. data/data/libphonenumber/java/libphonenumber/pom.xml +33 -0
  860. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/AlternateFormatsCountryCodeSet.java +79 -0
  861. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java +656 -0
  862. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/CountryCodeToRegionCodeMap.java +941 -0
  863. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/MetadataLoader.java +34 -0
  864. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/MetadataManager.java +138 -0
  865. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/NumberParseException.java +62 -0
  866. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberMatch.java +123 -0
  867. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberMatcher.java +725 -0
  868. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java +3232 -0
  869. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/Phonemetadata.java +1053 -0
  870. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/Phonenumber.java +285 -0
  871. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/RegexCache.java +78 -0
  872. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/ShortNumberInfo.java +587 -0
  873. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/ShortNumberUtil.java +80 -0
  874. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/ShortNumbersRegionCodeSet.java +268 -0
  875. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_255 +0 -0
  876. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_27 +0 -0
  877. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_30 +0 -0
  878. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_31 +0 -0
  879. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_34 +0 -0
  880. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_350 +0 -0
  881. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_351 +0 -0
  882. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_352 +0 -0
  883. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_358 +0 -0
  884. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_359 +0 -0
  885. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_36 +0 -0
  886. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_372 +0 -0
  887. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_373 +0 -0
  888. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_375 +0 -0
  889. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_380 +0 -0
  890. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_381 +0 -0
  891. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_385 +0 -0
  892. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_43 +0 -0
  893. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_44 +0 -0
  894. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_49 +0 -0
  895. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_505 +0 -0
  896. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_506 +0 -0
  897. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_54 +0 -0
  898. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_55 +0 -0
  899. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_58 +0 -0
  900. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_595 +0 -0
  901. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_61 +0 -0
  902. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_62 +0 -0
  903. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_63 +0 -0
  904. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_66 +0 -0
  905. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_675 +0 -0
  906. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_676 +0 -0
  907. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_679 +0 -0
  908. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_7 +0 -0
  909. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_81 +0 -0
  910. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_84 +0 -0
  911. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_855 +0 -0
  912. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_90 +0 -0
  913. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_91 +0 -0
  914. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_94 +0 -0
  915. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_95 +0 -0
  916. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_971 +0 -0
  917. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_972 +0 -0
  918. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberAlternateFormatsProto_995 +0 -0
  919. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_800 +0 -0
  920. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_808 +0 -0
  921. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_870 +0 -0
  922. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_878 +0 -0
  923. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_881 +0 -0
  924. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_882 +0 -0
  925. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_883 +0 -0
  926. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_888 +0 -0
  927. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_979 +0 -0
  928. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AC +0 -0
  929. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AD +0 -0
  930. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AE +0 -0
  931. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AF +0 -0
  932. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AG +0 -0
  933. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AI +0 -0
  934. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AL +0 -0
  935. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AM +0 -0
  936. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AO +0 -0
  937. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AR +0 -0
  938. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AS +0 -0
  939. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AT +0 -0
  940. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AU +0 -0
  941. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AW +0 -0
  942. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AX +0 -0
  943. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_AZ +0 -0
  944. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BA +0 -0
  945. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BB +0 -0
  946. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BD +0 -0
  947. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BE +0 -0
  948. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BF +0 -0
  949. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BG +0 -0
  950. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BH +0 -0
  951. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BI +0 -0
  952. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BJ +0 -0
  953. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BL +0 -0
  954. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BM +0 -0
  955. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BN +0 -0
  956. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BO +0 -0
  957. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BQ +0 -0
  958. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BR +0 -0
  959. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BS +0 -0
  960. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BT +0 -0
  961. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BW +0 -0
  962. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BY +0 -0
  963. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_BZ +0 -0
  964. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CA +0 -0
  965. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CC +0 -0
  966. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CD +0 -0
  967. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CF +0 -0
  968. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CG +0 -0
  969. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CH +0 -0
  970. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CI +0 -0
  971. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CK +0 -0
  972. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CL +0 -0
  973. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CM +0 -0
  974. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CN +0 -0
  975. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CO +0 -0
  976. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CR +0 -0
  977. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CU +0 -0
  978. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CV +0 -0
  979. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CW +0 -0
  980. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CX +0 -0
  981. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CY +0 -0
  982. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_CZ +0 -0
  983. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DE +0 -0
  984. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DJ +0 -0
  985. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DK +0 -0
  986. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DM +0 -0
  987. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DO +0 -0
  988. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_DZ +0 -0
  989. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EC +0 -0
  990. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EE +0 -0
  991. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EG +0 -0
  992. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_EH +0 -0
  993. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ER +0 -0
  994. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ES +0 -0
  995. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ET +0 -0
  996. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FI +0 -0
  997. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FJ +0 -0
  998. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FK +0 -0
  999. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FM +0 -0
  1000. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FO +0 -0
  1001. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_FR +0 -0
  1002. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GA +0 -0
  1003. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GB +0 -0
  1004. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GD +0 -0
  1005. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GE +0 -0
  1006. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GF +0 -0
  1007. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GG +0 -0
  1008. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GH +0 -0
  1009. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GI +0 -0
  1010. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GL +0 -0
  1011. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GM +0 -0
  1012. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GN +0 -0
  1013. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GP +0 -0
  1014. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GQ +0 -0
  1015. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GR +0 -0
  1016. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GT +0 -0
  1017. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GU +0 -0
  1018. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GW +0 -0
  1019. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_GY +0 -0
  1020. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HK +0 -0
  1021. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HN +0 -0
  1022. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HR +0 -0
  1023. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HT +0 -0
  1024. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_HU +0 -0
  1025. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ID +0 -0
  1026. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IE +0 -0
  1027. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IL +0 -0
  1028. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IM +0 -0
  1029. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IN +0 -0
  1030. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IO +0 -0
  1031. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IQ +0 -0
  1032. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IR +0 -0
  1033. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IS +0 -0
  1034. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_IT +0 -0
  1035. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JE +0 -0
  1036. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JM +0 -0
  1037. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JO +0 -0
  1038. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_JP +0 -0
  1039. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KE +0 -0
  1040. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KG +0 -0
  1041. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KH +0 -0
  1042. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KI +0 -0
  1043. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KM +0 -0
  1044. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KN +0 -0
  1045. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KP +0 -0
  1046. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KR +0 -0
  1047. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KW +0 -0
  1048. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KY +0 -0
  1049. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_KZ +0 -0
  1050. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LA +0 -0
  1051. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LB +0 -0
  1052. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LC +0 -0
  1053. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LI +0 -0
  1054. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LK +0 -0
  1055. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LR +0 -0
  1056. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LS +0 -0
  1057. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LT +0 -0
  1058. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LU +0 -0
  1059. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LV +0 -0
  1060. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_LY +0 -0
  1061. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MA +0 -0
  1062. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MC +0 -0
  1063. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MD +0 -0
  1064. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ME +0 -0
  1065. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MF +0 -0
  1066. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MG +0 -0
  1067. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MH +0 -0
  1068. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MK +0 -0
  1069. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ML +0 -0
  1070. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MM +0 -0
  1071. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MN +0 -0
  1072. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MO +0 -0
  1073. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MP +0 -0
  1074. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MQ +0 -0
  1075. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MR +0 -0
  1076. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MS +0 -0
  1077. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MT +0 -0
  1078. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MU +0 -0
  1079. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MV +0 -0
  1080. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MW +0 -0
  1081. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MX +0 -0
  1082. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MY +0 -0
  1083. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_MZ +0 -0
  1084. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NA +0 -0
  1085. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NC +0 -0
  1086. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NE +0 -0
  1087. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NF +0 -0
  1088. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NG +0 -0
  1089. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NI +0 -0
  1090. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NL +0 -0
  1091. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NO +0 -0
  1092. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NP +0 -0
  1093. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NR +0 -0
  1094. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NU +0 -0
  1095. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_NZ +0 -0
  1096. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_OM +0 -0
  1097. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PA +0 -0
  1098. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PE +0 -0
  1099. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PF +0 -0
  1100. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PG +0 -0
  1101. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PH +0 -0
  1102. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PK +0 -0
  1103. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PL +0 -0
  1104. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PM +0 -0
  1105. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PR +0 -0
  1106. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PS +0 -0
  1107. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PT +0 -0
  1108. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PW +0 -0
  1109. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_PY +0 -0
  1110. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_QA +0 -0
  1111. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RE +0 -0
  1112. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RO +0 -0
  1113. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RS +0 -0
  1114. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RU +0 -0
  1115. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_RW +0 -0
  1116. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SA +0 -0
  1117. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SB +0 -0
  1118. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SC +0 -0
  1119. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SD +0 -0
  1120. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SE +0 -0
  1121. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SG +0 -0
  1122. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SH +0 -0
  1123. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SI +0 -0
  1124. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SJ +0 -0
  1125. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SK +0 -0
  1126. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SL +0 -0
  1127. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SM +0 -0
  1128. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SN +0 -0
  1129. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SO +0 -0
  1130. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SR +0 -0
  1131. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SS +0 -0
  1132. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ST +0 -0
  1133. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SV +0 -0
  1134. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SX +0 -0
  1135. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SY +0 -0
  1136. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_SZ +0 -0
  1137. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TA +0 -0
  1138. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TC +0 -0
  1139. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TD +0 -0
  1140. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TG +0 -0
  1141. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TH +0 -0
  1142. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TJ +0 -0
  1143. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TK +0 -0
  1144. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TL +0 -0
  1145. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TM +0 -0
  1146. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TN +0 -0
  1147. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TO +0 -0
  1148. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TR +0 -0
  1149. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TT +0 -0
  1150. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TV +0 -0
  1151. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TW +0 -0
  1152. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_TZ +0 -0
  1153. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UA +0 -0
  1154. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UG +0 -0
  1155. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_US +0 -0
  1156. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UY +0 -0
  1157. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_UZ +0 -0
  1158. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VA +0 -0
  1159. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VC +0 -0
  1160. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VE +0 -0
  1161. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VG +0 -0
  1162. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VI +0 -0
  1163. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VN +0 -0
  1164. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_VU +0 -0
  1165. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_WF +0 -0
  1166. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_WS +0 -0
  1167. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_YE +0 -0
  1168. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_YT +0 -0
  1169. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZA +0 -0
  1170. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZM +0 -0
  1171. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProto_ZW +0 -0
  1172. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AC +0 -0
  1173. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AD +0 -0
  1174. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AE +0 -0
  1175. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AF +0 -0
  1176. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AG +0 -0
  1177. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AI +0 -0
  1178. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AL +0 -0
  1179. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AM +0 -0
  1180. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AO +0 -0
  1181. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AR +0 -0
  1182. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AS +0 -0
  1183. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AT +0 -0
  1184. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AU +0 -0
  1185. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AW +0 -0
  1186. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AX +0 -0
  1187. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_AZ +0 -0
  1188. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BA +0 -0
  1189. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BB +0 -0
  1190. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BD +0 -0
  1191. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BE +0 -0
  1192. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BF +0 -0
  1193. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BG +0 -0
  1194. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BH +0 -0
  1195. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BI +0 -0
  1196. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BJ +0 -0
  1197. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BL +0 -0
  1198. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BM +0 -0
  1199. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BN +0 -0
  1200. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BO +0 -0
  1201. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BQ +0 -0
  1202. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BR +0 -0
  1203. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BS +0 -0
  1204. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BT +0 -0
  1205. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BW +0 -0
  1206. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BY +0 -0
  1207. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_BZ +0 -0
  1208. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CA +0 -0
  1209. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CC +0 -0
  1210. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CD +0 -0
  1211. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CH +0 -0
  1212. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CI +0 -0
  1213. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CK +0 -0
  1214. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CL +0 -0
  1215. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CM +0 -0
  1216. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CN +0 -0
  1217. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CO +0 -0
  1218. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CR +0 -0
  1219. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CU +0 -0
  1220. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CV +0 -0
  1221. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CW +0 -0
  1222. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CX +0 -0
  1223. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CY +0 -0
  1224. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_CZ +0 -0
  1225. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_DE +0 -0
  1226. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_DJ +0 -0
  1227. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_DK +0 -0
  1228. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_DM +0 -0
  1229. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_DO +0 -0
  1230. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_DZ +0 -0
  1231. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_EC +0 -0
  1232. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_EE +0 -0
  1233. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_EG +0 -0
  1234. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_EH +0 -0
  1235. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_ES +0 -0
  1236. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_ET +0 -0
  1237. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_FI +0 -0
  1238. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_FJ +0 -0
  1239. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_FK +0 -0
  1240. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_FM +0 -0
  1241. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_FO +0 -0
  1242. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_FR +0 -0
  1243. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GA +0 -0
  1244. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GB +0 -0
  1245. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GD +0 -0
  1246. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GE +0 -0
  1247. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GF +0 -0
  1248. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GG +0 -0
  1249. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GH +0 -0
  1250. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GI +0 -0
  1251. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GL +0 -0
  1252. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GM +0 -0
  1253. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GN +0 -0
  1254. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GP +0 -0
  1255. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GR +0 -0
  1256. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GT +0 -0
  1257. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GU +0 -0
  1258. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GW +0 -0
  1259. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_GY +0 -0
  1260. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_HK +0 -0
  1261. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_HN +0 -0
  1262. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_HR +0 -0
  1263. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_HT +0 -0
  1264. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_HU +0 -0
  1265. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_ID +0 -0
  1266. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_IE +0 -0
  1267. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_IL +0 -0
  1268. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_IM +0 -0
  1269. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_IN +0 -0
  1270. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_IQ +0 -0
  1271. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_IR +0 -0
  1272. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_IS +0 -0
  1273. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_IT +0 -0
  1274. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_JE +0 -0
  1275. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_JM +0 -0
  1276. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_JO +0 -0
  1277. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_JP +0 -0
  1278. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_KE +0 -0
  1279. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_KG +0 -0
  1280. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_KH +0 -0
  1281. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_KI +0 -0
  1282. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_KM +0 -0
  1283. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_KN +0 -0
  1284. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_KR +0 -0
  1285. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_KW +0 -0
  1286. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_KY +0 -0
  1287. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_KZ +0 -0
  1288. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_LA +0 -0
  1289. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_LB +0 -0
  1290. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_LC +0 -0
  1291. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_LI +0 -0
  1292. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_LK +0 -0
  1293. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_LR +0 -0
  1294. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_LS +0 -0
  1295. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_LT +0 -0
  1296. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_LU +0 -0
  1297. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_LV +0 -0
  1298. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_LY +0 -0
  1299. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MA +0 -0
  1300. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MC +0 -0
  1301. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MD +0 -0
  1302. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_ME +0 -0
  1303. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MF +0 -0
  1304. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MG +0 -0
  1305. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MH +0 -0
  1306. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MK +0 -0
  1307. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_ML +0 -0
  1308. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MM +0 -0
  1309. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MN +0 -0
  1310. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MO +0 -0
  1311. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MP +0 -0
  1312. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MQ +0 -0
  1313. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MR +0 -0
  1314. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MS +0 -0
  1315. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MT +0 -0
  1316. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MU +0 -0
  1317. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MV +0 -0
  1318. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MW +0 -0
  1319. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MX +0 -0
  1320. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MY +0 -0
  1321. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_MZ +0 -0
  1322. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_NA +0 -0
  1323. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_NC +0 -0
  1324. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_NF +0 -0
  1325. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_NG +0 -0
  1326. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_NI +0 -0
  1327. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_NL +0 -0
  1328. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_NO +0 -0
  1329. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_NP +0 -0
  1330. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_NR +0 -0
  1331. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_NU +0 -0
  1332. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_NZ +0 -0
  1333. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_OM +0 -0
  1334. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_PA +0 -0
  1335. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_PE +0 -0
  1336. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_PF +0 -0
  1337. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_PG +0 -0
  1338. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_PH +0 -0
  1339. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_PK +0 -0
  1340. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_PL +0 -0
  1341. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_PM +0 -0
  1342. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_PR +0 -0
  1343. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_PT +0 -0
  1344. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_PW +0 -0
  1345. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_PY +0 -0
  1346. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_QA +0 -0
  1347. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_RE +0 -0
  1348. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_RO +0 -0
  1349. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_RS +0 -0
  1350. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_RU +0 -0
  1351. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_RW +0 -0
  1352. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SA +0 -0
  1353. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SB +0 -0
  1354. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SC +0 -0
  1355. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SD +0 -0
  1356. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SE +0 -0
  1357. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SG +0 -0
  1358. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SH +0 -0
  1359. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SI +0 -0
  1360. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SJ +0 -0
  1361. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SK +0 -0
  1362. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SL +0 -0
  1363. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SM +0 -0
  1364. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SN +0 -0
  1365. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SR +0 -0
  1366. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_ST +0 -0
  1367. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SV +0 -0
  1368. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SX +0 -0
  1369. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SY +0 -0
  1370. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_SZ +0 -0
  1371. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TC +0 -0
  1372. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TD +0 -0
  1373. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TG +0 -0
  1374. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TH +0 -0
  1375. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TJ +0 -0
  1376. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TL +0 -0
  1377. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TM +0 -0
  1378. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TN +0 -0
  1379. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TO +0 -0
  1380. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TR +0 -0
  1381. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TT +0 -0
  1382. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TV +0 -0
  1383. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TW +0 -0
  1384. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_TZ +0 -0
  1385. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_UA +0 -0
  1386. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_UG +0 -0
  1387. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_US +0 -0
  1388. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_UY +0 -0
  1389. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_UZ +0 -0
  1390. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_VA +0 -0
  1391. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_VC +0 -0
  1392. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_VE +0 -0
  1393. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_VG +0 -0
  1394. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_VI +0 -0
  1395. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_VN +0 -0
  1396. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_VU +0 -0
  1397. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_WF +0 -0
  1398. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_WS +0 -0
  1399. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_YE +0 -0
  1400. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_YT +0 -0
  1401. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_ZA +0 -0
  1402. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_ZM +0 -0
  1403. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/data/ShortNumberMetadataProto_ZW +0 -0
  1404. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/internal/MatcherApi.java +38 -0
  1405. data/data/libphonenumber/java/libphonenumber/src/com/google/i18n/phonenumbers/internal/RegexBasedMatcher.java +52 -0
  1406. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/AsYouTypeFormatterTest.java +1173 -0
  1407. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/CountryCodeToRegionCodeMapForTesting.java +142 -0
  1408. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/ExampleNumbersTest.java +256 -0
  1409. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/MetadataManagerTest.java +51 -0
  1410. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/PhoneNumberMatchTest.java +70 -0
  1411. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/PhoneNumberMatcherTest.java +1090 -0
  1412. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/PhoneNumberUtilTest.java +2570 -0
  1413. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/PhonenumberTest.java +112 -0
  1414. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/RegexCacheTest.java +55 -0
  1415. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/RegionCode.java +61 -0
  1416. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/ShortNumberInfoTest.java +344 -0
  1417. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/ShortNumberUtilTest.java +140 -0
  1418. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/TestMetadataTestCase.java +46 -0
  1419. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_800 +0 -0
  1420. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_979 +0 -0
  1421. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AD +0 -0
  1422. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AE +0 -0
  1423. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AO +0 -0
  1424. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AR +0 -0
  1425. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_AU +0 -0
  1426. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_BB +0 -0
  1427. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_BR +0 -0
  1428. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_BS +0 -0
  1429. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_BY +0 -0
  1430. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_CA +0 -0
  1431. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_CC +0 -0
  1432. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_CN +0 -0
  1433. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_CX +0 -0
  1434. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_DE +0 -0
  1435. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_FR +0 -0
  1436. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_GB +0 -0
  1437. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_GG +0 -0
  1438. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_HU +0 -0
  1439. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_IT +0 -0
  1440. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_JP +0 -0
  1441. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_KR +0 -0
  1442. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_MX +0 -0
  1443. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_NZ +0 -0
  1444. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_PL +0 -0
  1445. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_RE +0 -0
  1446. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_SG +0 -0
  1447. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_US +0 -0
  1448. data/data/libphonenumber/java/libphonenumber/test/com/google/i18n/phonenumbers/data/PhoneNumberMetadataProtoForTesting_YT +0 -0
  1449. data/data/libphonenumber/java/pom.xml +186 -0
  1450. data/data/libphonenumber/java/release_notes.txt +963 -0
  1451. data/data/libphonenumber/javadoc/allclasses-frame.html +49 -0
  1452. data/data/libphonenumber/javadoc/allclasses-noframe.html +49 -0
  1453. data/data/libphonenumber/javadoc/com/google/i18n/phonenumbers/AsYouTypeFormatter.html +302 -0
  1454. data/data/libphonenumber/javadoc/com/google/i18n/phonenumbers/NumberParseException.ErrorType.html +369 -0
  1455. data/data/libphonenumber/javadoc/com/google/i18n/phonenumbers/NumberParseException.html +311 -0
  1456. data/data/libphonenumber/javadoc/com/google/i18n/phonenumbers/PhoneNumberMatch.html +378 -0
  1457. data/data/libphonenumber/javadoc/com/google/i18n/phonenumbers/PhoneNumberUtil.Leniency.html +330 -0
  1458. data/data/libphonenumber/javadoc/com/google/i18n/phonenumbers/PhoneNumberUtil.MatchType.html +373 -0
  1459. data/data/libphonenumber/javadoc/com/google/i18n/phonenumbers/PhoneNumberUtil.PhoneNumberFormat.html +365 -0
  1460. data/data/libphonenumber/javadoc/com/google/i18n/phonenumbers/PhoneNumberUtil.PhoneNumberType.html +469 -0
  1461. data/data/libphonenumber/javadoc/com/google/i18n/phonenumbers/PhoneNumberUtil.ValidationResult.html +357 -0
  1462. data/data/libphonenumber/javadoc/com/google/i18n/phonenumbers/PhoneNumberUtil.html +1405 -0
  1463. data/data/libphonenumber/javadoc/com/google/i18n/phonenumbers/package-frame.html +68 -0
  1464. data/data/libphonenumber/javadoc/com/google/i18n/phonenumbers/package-summary.html +211 -0
  1465. data/data/libphonenumber/javadoc/com/google/i18n/phonenumbers/package-tree.html +161 -0
  1466. data/data/libphonenumber/javadoc/constant-values.html +142 -0
  1467. data/data/libphonenumber/javadoc/deprecated-list.html +142 -0
  1468. data/data/libphonenumber/javadoc/help-doc.html +209 -0
  1469. data/data/libphonenumber/javadoc/index-all.html +413 -0
  1470. data/data/libphonenumber/javadoc/index.html +36 -0
  1471. data/data/libphonenumber/javadoc/overview-tree.html +163 -0
  1472. data/data/libphonenumber/javadoc/package-list +1 -0
  1473. data/data/libphonenumber/javadoc/resources/inherit.gif +0 -0
  1474. data/data/libphonenumber/javadoc/serialized-form.html +184 -0
  1475. data/data/libphonenumber/javadoc/stylesheet.css +29 -0
  1476. data/data/libphonenumber/javascript/README +99 -0
  1477. data/data/libphonenumber/javascript/build.xml +137 -0
  1478. data/data/libphonenumber/javascript/i18n/phonenumbers/asyoutypeformatter.js +1108 -0
  1479. data/data/libphonenumber/javascript/i18n/phonenumbers/asyoutypeformatter_test.html +38 -0
  1480. data/data/libphonenumber/javascript/i18n/phonenumbers/asyoutypeformatter_test.js +1205 -0
  1481. data/data/libphonenumber/javascript/i18n/phonenumbers/demo-compiled.html +53 -0
  1482. data/data/libphonenumber/javascript/i18n/phonenumbers/demo-compiled.js +510 -0
  1483. data/data/libphonenumber/javascript/i18n/phonenumbers/demo.html +62 -0
  1484. data/data/libphonenumber/javascript/i18n/phonenumbers/demo.js +161 -0
  1485. data/data/libphonenumber/javascript/i18n/phonenumbers/metadata.js +5167 -0
  1486. data/data/libphonenumber/javascript/i18n/phonenumbers/metadatafortesting.js +616 -0
  1487. data/data/libphonenumber/javascript/i18n/phonenumbers/metadatalite.js +5167 -0
  1488. data/data/libphonenumber/javascript/i18n/phonenumbers/phonemetadata.pb.js +2283 -0
  1489. data/data/libphonenumber/javascript/i18n/phonenumbers/phonenumber.pb.js +520 -0
  1490. data/data/libphonenumber/javascript/i18n/phonenumbers/phonenumberutil.js +4194 -0
  1491. data/data/libphonenumber/javascript/i18n/phonenumbers/phonenumberutil_test.html +37 -0
  1492. data/data/libphonenumber/javascript/i18n/phonenumbers/phonenumberutil_test.js +3322 -0
  1493. data/data/libphonenumber/javascript/i18n/phonenumbers/regioncodefortesting.js +66 -0
  1494. data/data/libphonenumber/pom.xml +26 -0
  1495. data/data/libphonenumber/resources/PhoneNumberAlternateFormats.xml +1853 -0
  1496. data/data/{PhoneNumberMetaData.xml → libphonenumber/resources/PhoneNumberMetadata.xml} +0 -0
  1497. data/data/libphonenumber/resources/PhoneNumberMetadataForTesting.xml +938 -0
  1498. data/data/libphonenumber/resources/ShortNumberMetadata.xml +8725 -0
  1499. data/data/libphonenumber/resources/carrier/README +2 -0
  1500. data/data/libphonenumber/resources/carrier/ar/965.txt +17 -0
  1501. data/data/libphonenumber/resources/carrier/be/375.txt +28 -0
  1502. data/data/libphonenumber/resources/carrier/en/1.txt +459 -0
  1503. data/data/libphonenumber/resources/carrier/en/20.txt +17 -0
  1504. data/data/libphonenumber/resources/carrier/en/211.txt +18 -0
  1505. data/data/libphonenumber/resources/carrier/en/212.txt +107 -0
  1506. data/data/libphonenumber/resources/carrier/en/213.txt +20 -0
  1507. data/data/libphonenumber/resources/carrier/en/216.txt +26 -0
  1508. data/data/libphonenumber/resources/carrier/en/220.txt +19 -0
  1509. data/data/libphonenumber/resources/carrier/en/221.txt +23 -0
  1510. data/data/libphonenumber/resources/carrier/en/222.txt +19 -0
  1511. data/data/libphonenumber/resources/carrier/en/223.txt +15 -0
  1512. data/data/libphonenumber/resources/carrier/en/224.txt +21 -0
  1513. data/data/libphonenumber/resources/carrier/en/225.txt +52 -0
  1514. data/data/libphonenumber/resources/carrier/en/226.txt +36 -0
  1515. data/data/libphonenumber/resources/carrier/en/227.txt +24 -0
  1516. data/data/libphonenumber/resources/carrier/en/228.txt +16 -0
  1517. data/data/libphonenumber/resources/carrier/en/229.txt +26 -0
  1518. data/data/libphonenumber/resources/carrier/en/230.txt +61 -0
  1519. data/data/libphonenumber/resources/carrier/en/231.txt +19 -0
  1520. data/data/libphonenumber/resources/carrier/en/232.txt +21 -0
  1521. data/data/libphonenumber/resources/carrier/en/233.txt +23 -0
  1522. data/data/libphonenumber/resources/carrier/en/234.txt +245 -0
  1523. data/data/libphonenumber/resources/carrier/en/235.txt +15 -0
  1524. data/data/libphonenumber/resources/carrier/en/236.txt +18 -0
  1525. data/data/libphonenumber/resources/carrier/en/237.txt +27 -0
  1526. data/data/libphonenumber/resources/carrier/en/238.txt +20 -0
  1527. data/data/libphonenumber/resources/carrier/en/239.txt +16 -0
  1528. data/data/libphonenumber/resources/carrier/en/240.txt +17 -0
  1529. data/data/libphonenumber/resources/carrier/en/241.txt +35 -0
  1530. data/data/libphonenumber/resources/carrier/en/242.txt +16 -0
  1531. data/data/libphonenumber/resources/carrier/en/243.txt +23 -0
  1532. data/data/libphonenumber/resources/carrier/en/244.txt +19 -0
  1533. data/data/libphonenumber/resources/carrier/en/245.txt +16 -0
  1534. data/data/libphonenumber/resources/carrier/en/248.txt +16 -0
  1535. data/data/libphonenumber/resources/carrier/en/249.txt +19 -0
  1536. data/data/libphonenumber/resources/carrier/en/250.txt +15 -0
  1537. data/data/libphonenumber/resources/carrier/en/251.txt +15 -0
  1538. data/data/libphonenumber/resources/carrier/en/252.txt +22 -0
  1539. data/data/libphonenumber/resources/carrier/en/253.txt +17 -0
  1540. data/data/libphonenumber/resources/carrier/en/254.txt +44 -0
  1541. data/data/libphonenumber/resources/carrier/en/255.txt +21 -0
  1542. data/data/libphonenumber/resources/carrier/en/256.txt +26 -0
  1543. data/data/libphonenumber/resources/carrier/en/257.txt +25 -0
  1544. data/data/libphonenumber/resources/carrier/en/258.txt +18 -0
  1545. data/data/libphonenumber/resources/carrier/en/260.txt +17 -0
  1546. data/data/libphonenumber/resources/carrier/en/261.txt +18 -0
  1547. data/data/libphonenumber/resources/carrier/en/263.txt +17 -0
  1548. data/data/libphonenumber/resources/carrier/en/265.txt +16 -0
  1549. data/data/libphonenumber/resources/carrier/en/267.txt +54 -0
  1550. data/data/libphonenumber/resources/carrier/en/268.txt +15 -0
  1551. data/data/libphonenumber/resources/carrier/en/27.txt +70 -0
  1552. data/data/libphonenumber/resources/carrier/en/297.txt +29 -0
  1553. data/data/libphonenumber/resources/carrier/en/298.txt +18 -0
  1554. data/data/libphonenumber/resources/carrier/en/299.txt +17 -0
  1555. data/data/libphonenumber/resources/carrier/en/30.txt +20 -0
  1556. data/data/libphonenumber/resources/carrier/en/31.txt +65 -0
  1557. data/data/libphonenumber/resources/carrier/en/32.txt +18 -0
  1558. data/data/libphonenumber/resources/carrier/en/33.txt +72 -0
  1559. data/data/libphonenumber/resources/carrier/en/350.txt +19 -0
  1560. data/data/libphonenumber/resources/carrier/en/351.txt +26 -0
  1561. data/data/libphonenumber/resources/carrier/en/352.txt +23 -0
  1562. data/data/libphonenumber/resources/carrier/en/353.txt +20 -0
  1563. data/data/libphonenumber/resources/carrier/en/354.txt +44 -0
  1564. data/data/libphonenumber/resources/carrier/en/355.txt +18 -0
  1565. data/data/libphonenumber/resources/carrier/en/356.txt +27 -0
  1566. data/data/libphonenumber/resources/carrier/en/357.txt +19 -0
  1567. data/data/libphonenumber/resources/carrier/en/358.txt +44 -0
  1568. data/data/libphonenumber/resources/carrier/en/359.txt +18 -0
  1569. data/data/libphonenumber/resources/carrier/en/36.txt +17 -0
  1570. data/data/libphonenumber/resources/carrier/en/370.txt +50 -0
  1571. data/data/libphonenumber/resources/carrier/en/372.txt +30 -0
  1572. data/data/libphonenumber/resources/carrier/en/373.txt +44 -0
  1573. data/data/libphonenumber/resources/carrier/en/374.txt +29 -0
  1574. data/data/libphonenumber/resources/carrier/en/375.txt +28 -0
  1575. data/data/libphonenumber/resources/carrier/en/376.txt +15 -0
  1576. data/data/libphonenumber/resources/carrier/en/380.txt +15 -0
  1577. data/data/libphonenumber/resources/carrier/en/381.txt +23 -0
  1578. data/data/libphonenumber/resources/carrier/en/385.txt +19 -0
  1579. data/data/libphonenumber/resources/carrier/en/386.txt +23 -0
  1580. data/data/libphonenumber/resources/carrier/en/387.txt +20 -0
  1581. data/data/libphonenumber/resources/carrier/en/389.txt +23 -0
  1582. data/data/libphonenumber/resources/carrier/en/39.txt +23 -0
  1583. data/data/libphonenumber/resources/carrier/en/40.txt +20 -0
  1584. data/data/libphonenumber/resources/carrier/en/41.txt +18 -0
  1585. data/data/libphonenumber/resources/carrier/en/420.txt +32 -0
  1586. data/data/libphonenumber/resources/carrier/en/421.txt +28 -0
  1587. data/data/libphonenumber/resources/carrier/en/43.txt +26 -0
  1588. data/data/libphonenumber/resources/carrier/en/45.txt +364 -0
  1589. data/data/libphonenumber/resources/carrier/en/47.txt +239 -0
  1590. data/data/libphonenumber/resources/carrier/en/48.txt +118 -0
  1591. data/data/libphonenumber/resources/carrier/en/49.txt +44 -0
  1592. data/data/libphonenumber/resources/carrier/en/501.txt +16 -0
  1593. data/data/libphonenumber/resources/carrier/en/505.txt +101 -0
  1594. data/data/libphonenumber/resources/carrier/en/506.txt +49 -0
  1595. data/data/libphonenumber/resources/carrier/en/507.txt +84 -0
  1596. data/data/libphonenumber/resources/carrier/en/51.txt +584 -0
  1597. data/data/libphonenumber/resources/carrier/en/53.txt +15 -0
  1598. data/data/libphonenumber/resources/carrier/en/54.txt +98 -0
  1599. data/data/libphonenumber/resources/carrier/en/55.txt +9479 -0
  1600. data/data/libphonenumber/resources/carrier/en/56.txt +538 -0
  1601. data/data/libphonenumber/resources/carrier/en/57.txt +38 -0
  1602. data/data/libphonenumber/resources/carrier/en/58.txt +18 -0
  1603. data/data/libphonenumber/resources/carrier/en/591.txt +51 -0
  1604. data/data/libphonenumber/resources/carrier/en/595.txt +19 -0
  1605. data/data/libphonenumber/resources/carrier/en/597.txt +33 -0
  1606. data/data/libphonenumber/resources/carrier/en/598.txt +25 -0
  1607. data/data/libphonenumber/resources/carrier/en/599.txt +47 -0
  1608. data/data/libphonenumber/resources/carrier/en/60.txt +113 -0
  1609. data/data/libphonenumber/resources/carrier/en/61.txt +92 -0
  1610. data/data/libphonenumber/resources/carrier/en/62.txt +701 -0
  1611. data/data/libphonenumber/resources/carrier/en/63.txt +53 -0
  1612. data/data/libphonenumber/resources/carrier/en/64.txt +22 -0
  1613. data/data/libphonenumber/resources/carrier/en/65.txt +403 -0
  1614. data/data/libphonenumber/resources/carrier/en/66.txt +47 -0
  1615. data/data/libphonenumber/resources/carrier/en/670.txt +16 -0
  1616. data/data/libphonenumber/resources/carrier/en/673.txt +22 -0
  1617. data/data/libphonenumber/resources/carrier/en/675.txt +29 -0
  1618. data/data/libphonenumber/resources/carrier/en/676.txt +39 -0
  1619. data/data/libphonenumber/resources/carrier/en/677.txt +38 -0
  1620. data/data/libphonenumber/resources/carrier/en/678.txt +31 -0
  1621. data/data/libphonenumber/resources/carrier/en/679.txt +23 -0
  1622. data/data/libphonenumber/resources/carrier/en/685.txt +17 -0
  1623. data/data/libphonenumber/resources/carrier/en/686.txt +20 -0
  1624. data/data/libphonenumber/resources/carrier/en/7.txt +24 -0
  1625. data/data/libphonenumber/resources/carrier/en/84.txt +24 -0
  1626. data/data/libphonenumber/resources/carrier/en/852.txt +282 -0
  1627. data/data/libphonenumber/resources/carrier/en/855.txt +34 -0
  1628. data/data/libphonenumber/resources/carrier/en/856.txt +18 -0
  1629. data/data/libphonenumber/resources/carrier/en/86.txt +43 -0
  1630. data/data/libphonenumber/resources/carrier/en/880.txt +20 -0
  1631. data/data/libphonenumber/resources/carrier/en/90.txt +26 -0
  1632. data/data/libphonenumber/resources/carrier/en/91.txt +1647 -0
  1633. data/data/libphonenumber/resources/carrier/en/92.txt +49 -0
  1634. data/data/libphonenumber/resources/carrier/en/93.txt +27 -0
  1635. data/data/libphonenumber/resources/carrier/en/94.txt +19 -0
  1636. data/data/libphonenumber/resources/carrier/en/95.txt +16 -0
  1637. data/data/libphonenumber/resources/carrier/en/960.txt +16 -0
  1638. data/data/libphonenumber/resources/carrier/en/961.txt +25 -0
  1639. data/data/libphonenumber/resources/carrier/en/962.txt +18 -0
  1640. data/data/libphonenumber/resources/carrier/en/964.txt +19 -0
  1641. data/data/libphonenumber/resources/carrier/en/965.txt +17 -0
  1642. data/data/libphonenumber/resources/carrier/en/966.txt +27 -0
  1643. data/data/libphonenumber/resources/carrier/en/967.txt +21 -0
  1644. data/data/libphonenumber/resources/carrier/en/968.txt +18 -0
  1645. data/data/libphonenumber/resources/carrier/en/970.txt +16 -0
  1646. data/data/libphonenumber/resources/carrier/en/971.txt +18 -0
  1647. data/data/libphonenumber/resources/carrier/en/972.txt +32 -0
  1648. data/data/libphonenumber/resources/carrier/en/973.txt +30 -0
  1649. data/data/libphonenumber/resources/carrier/en/974.txt +18 -0
  1650. data/data/libphonenumber/resources/carrier/en/975.txt +15 -0
  1651. data/data/libphonenumber/resources/carrier/en/977.txt +25 -0
  1652. data/data/libphonenumber/resources/carrier/en/98.txt +29 -0
  1653. data/data/libphonenumber/resources/carrier/en/992.txt +23 -0
  1654. data/data/libphonenumber/resources/carrier/en/993.txt +17 -0
  1655. data/data/libphonenumber/resources/carrier/en/994.txt +20 -0
  1656. data/data/libphonenumber/resources/carrier/en/995.txt +34 -0
  1657. data/data/libphonenumber/resources/carrier/en/996.txt +22 -0
  1658. data/data/libphonenumber/resources/carrier/en/998.txt +33 -0
  1659. data/data/libphonenumber/resources/carrier/ru/375.txt +28 -0
  1660. data/data/libphonenumber/resources/geocoding/am/374.txt +177 -0
  1661. data/data/libphonenumber/resources/geocoding/ar/82.txt +34 -0
  1662. data/data/libphonenumber/resources/geocoding/ar/966.txt +27 -0
  1663. data/data/libphonenumber/resources/geocoding/be/375.txt +144 -0
  1664. data/data/libphonenumber/resources/geocoding/bg/359.txt +2105 -0
  1665. data/data/libphonenumber/resources/geocoding/cs/82.txt +35 -0
  1666. data/data/libphonenumber/resources/geocoding/de/32.txt +59 -0
  1667. data/data/libphonenumber/resources/geocoding/de/352.txt +229 -0
  1668. data/data/libphonenumber/resources/geocoding/de/41.txt +37 -0
  1669. data/data/libphonenumber/resources/geocoding/de/43.txt +1037 -0
  1670. data/data/libphonenumber/resources/geocoding/de/49.txt +5219 -0
  1671. data/data/libphonenumber/resources/geocoding/el/30.txt +259 -0
  1672. data/data/libphonenumber/resources/geocoding/en/1.txt +36228 -0
  1673. data/data/libphonenumber/resources/geocoding/en/20.txt +45 -0
  1674. data/data/libphonenumber/resources/geocoding/en/212.txt +85 -0
  1675. data/data/libphonenumber/resources/geocoding/en/213.txt +30 -0
  1676. data/data/libphonenumber/resources/geocoding/en/216.txt +26 -0
  1677. data/data/libphonenumber/resources/geocoding/en/220.txt +59 -0
  1678. data/data/libphonenumber/resources/geocoding/en/221.txt +19 -0
  1679. data/data/libphonenumber/resources/geocoding/en/222.txt +28 -0
  1680. data/data/libphonenumber/resources/geocoding/en/224.txt +38 -0
  1681. data/data/libphonenumber/resources/geocoding/en/225.txt +28 -0
  1682. data/data/libphonenumber/resources/geocoding/en/226.txt +50 -0
  1683. data/data/libphonenumber/resources/geocoding/en/228.txt +24 -0
  1684. data/data/libphonenumber/resources/geocoding/en/229.txt +52 -0
  1685. data/data/libphonenumber/resources/geocoding/en/230.txt +25 -0
  1686. data/data/libphonenumber/resources/geocoding/en/232.txt +20 -0
  1687. data/data/libphonenumber/resources/geocoding/en/233.txt +86 -0
  1688. data/data/libphonenumber/resources/geocoding/en/234.txt +79 -0
  1689. data/data/libphonenumber/resources/geocoding/en/237.txt +125 -0
  1690. data/data/libphonenumber/resources/geocoding/en/238.txt +54 -0
  1691. data/data/libphonenumber/resources/geocoding/en/239.txt +35 -0
  1692. data/data/libphonenumber/resources/geocoding/en/241.txt +48 -0
  1693. data/data/libphonenumber/resources/geocoding/en/242.txt +23 -0
  1694. data/data/libphonenumber/resources/geocoding/en/243.txt +22 -0
  1695. data/data/libphonenumber/resources/geocoding/en/244.txt +54 -0
  1696. data/data/libphonenumber/resources/geocoding/en/245.txt +36 -0
  1697. data/data/libphonenumber/resources/geocoding/en/247.txt +27 -0
  1698. data/data/libphonenumber/resources/geocoding/en/249.txt +28 -0
  1699. data/data/libphonenumber/resources/geocoding/en/251.txt +385 -0
  1700. data/data/libphonenumber/resources/geocoding/en/252.txt +21 -0
  1701. data/data/libphonenumber/resources/geocoding/en/254.txt +46 -0
  1702. data/data/libphonenumber/resources/geocoding/en/256.txt +30 -0
  1703. data/data/libphonenumber/resources/geocoding/en/257.txt +28 -0
  1704. data/data/libphonenumber/resources/geocoding/en/258.txt +27 -0
  1705. data/data/libphonenumber/resources/geocoding/en/260.txt +26 -0
  1706. data/data/libphonenumber/resources/geocoding/en/261.txt +40 -0
  1707. data/data/libphonenumber/resources/geocoding/en/263.txt +116 -0
  1708. data/data/libphonenumber/resources/geocoding/en/264.txt +1046 -0
  1709. data/data/libphonenumber/resources/geocoding/en/266.txt +18 -0
  1710. data/data/libphonenumber/resources/geocoding/en/267.txt +35 -0
  1711. data/data/libphonenumber/resources/geocoding/en/268.txt +54 -0
  1712. data/data/libphonenumber/resources/geocoding/en/269.txt +32 -0
  1713. data/data/libphonenumber/resources/geocoding/en/27.txt +57 -0
  1714. data/data/libphonenumber/resources/geocoding/en/290.txt +24 -0
  1715. data/data/libphonenumber/resources/geocoding/en/299.txt +43 -0
  1716. data/data/libphonenumber/resources/geocoding/en/30.txt +261 -0
  1717. data/data/libphonenumber/resources/geocoding/en/31.txt +137 -0
  1718. data/data/libphonenumber/resources/geocoding/en/32.txt +59 -0
  1719. data/data/libphonenumber/resources/geocoding/en/33.txt +5592 -0
  1720. data/data/libphonenumber/resources/geocoding/en/34.txt +123 -0
  1721. data/data/libphonenumber/resources/geocoding/en/351.txt +67 -0
  1722. data/data/libphonenumber/resources/geocoding/en/352.txt +228 -0
  1723. data/data/libphonenumber/resources/geocoding/en/353.txt +71 -0
  1724. data/data/libphonenumber/resources/geocoding/en/354.txt +23 -0
  1725. data/data/libphonenumber/resources/geocoding/en/355.txt +188 -0
  1726. data/data/libphonenumber/resources/geocoding/en/358.txt +38 -0
  1727. data/data/libphonenumber/resources/geocoding/en/359.txt +2102 -0
  1728. data/data/libphonenumber/resources/geocoding/en/36.txt +70 -0
  1729. data/data/libphonenumber/resources/geocoding/en/370.txt +64 -0
  1730. data/data/libphonenumber/resources/geocoding/en/371.txt +53 -0
  1731. data/data/libphonenumber/resources/geocoding/en/372.txt +35 -0
  1732. data/data/libphonenumber/resources/geocoding/en/373.txt +62 -0
  1733. data/data/libphonenumber/resources/geocoding/en/374.txt +184 -0
  1734. data/data/libphonenumber/resources/geocoding/en/375.txt +142 -0
  1735. data/data/libphonenumber/resources/geocoding/en/381.txt +50 -0
  1736. data/data/libphonenumber/resources/geocoding/en/389.txt +28 -0
  1737. data/data/libphonenumber/resources/geocoding/en/39.txt +137 -0
  1738. data/data/libphonenumber/resources/geocoding/en/40.txt +98 -0
  1739. data/data/libphonenumber/resources/geocoding/en/41.txt +37 -0
  1740. data/data/libphonenumber/resources/geocoding/en/420.txt +37 -0
  1741. data/data/libphonenumber/resources/geocoding/en/421.txt +42 -0
  1742. data/data/libphonenumber/resources/geocoding/en/43.txt +1036 -0
  1743. data/data/libphonenumber/resources/geocoding/en/44.txt +852 -0
  1744. data/data/libphonenumber/resources/geocoding/en/46.txt +265 -0
  1745. data/data/libphonenumber/resources/geocoding/en/47.txt +49 -0
  1746. data/data/libphonenumber/resources/geocoding/en/48.txt +65 -0
  1747. data/data/libphonenumber/resources/geocoding/en/49.txt +5218 -0
  1748. data/data/libphonenumber/resources/geocoding/en/51.txt +42 -0
  1749. data/data/libphonenumber/resources/geocoding/en/53.txt +33 -0
  1750. data/data/libphonenumber/resources/geocoding/en/54.txt +236 -0
  1751. data/data/libphonenumber/resources/geocoding/en/55.txt +84 -0
  1752. data/data/libphonenumber/resources/geocoding/en/56.txt +40 -0
  1753. data/data/libphonenumber/resources/geocoding/en/57.txt +186 -0
  1754. data/data/libphonenumber/resources/geocoding/en/58.txt +73 -0
  1755. data/data/libphonenumber/resources/geocoding/en/599.txt +22 -0
  1756. data/data/libphonenumber/resources/geocoding/en/62.txt +324 -0
  1757. data/data/libphonenumber/resources/geocoding/en/66.txt +40 -0
  1758. data/data/libphonenumber/resources/geocoding/en/686.txt +50 -0
  1759. data/data/libphonenumber/resources/geocoding/en/7.txt +355 -0
  1760. data/data/libphonenumber/resources/geocoding/en/81.txt +1547 -0
  1761. data/data/libphonenumber/resources/geocoding/en/82.txt +35 -0
  1762. data/data/libphonenumber/resources/geocoding/en/84.txt +80 -0
  1763. data/data/libphonenumber/resources/geocoding/en/86.txt +145812 -0
  1764. data/data/libphonenumber/resources/geocoding/en/886.txt +30 -0
  1765. data/data/libphonenumber/resources/geocoding/en/90.txt +182 -0
  1766. data/data/libphonenumber/resources/geocoding/en/91.txt +2669 -0
  1767. data/data/libphonenumber/resources/geocoding/en/94.txt +46 -0
  1768. data/data/libphonenumber/resources/geocoding/en/962.txt +32 -0
  1769. data/data/libphonenumber/resources/geocoding/en/966.txt +29 -0
  1770. data/data/libphonenumber/resources/geocoding/en/98.txt +53 -0
  1771. data/data/libphonenumber/resources/geocoding/es/228.txt +23 -0
  1772. data/data/libphonenumber/resources/geocoding/es/230.txt +23 -0
  1773. data/data/libphonenumber/resources/geocoding/es/34.txt +124 -0
  1774. data/data/libphonenumber/resources/geocoding/es/54.txt +238 -0
  1775. data/data/libphonenumber/resources/geocoding/es/56.txt +42 -0
  1776. data/data/libphonenumber/resources/geocoding/es/57.txt +186 -0
  1777. data/data/libphonenumber/resources/geocoding/es/58.txt +72 -0
  1778. data/data/libphonenumber/resources/geocoding/fa/98.txt +50 -0
  1779. data/data/libphonenumber/resources/geocoding/fi/358.txt +39 -0
  1780. data/data/libphonenumber/resources/geocoding/fr/212.txt +84 -0
  1781. data/data/libphonenumber/resources/geocoding/fr/222.txt +29 -0
  1782. data/data/libphonenumber/resources/geocoding/fr/225.txt +30 -0
  1783. data/data/libphonenumber/resources/geocoding/fr/228.txt +24 -0
  1784. data/data/libphonenumber/resources/geocoding/fr/229.txt +55 -0
  1785. data/data/libphonenumber/resources/geocoding/fr/230.txt +23 -0
  1786. data/data/libphonenumber/resources/geocoding/fr/242.txt +25 -0
  1787. data/data/libphonenumber/resources/geocoding/fr/243.txt +24 -0
  1788. data/data/libphonenumber/resources/geocoding/fr/269.txt +34 -0
  1789. data/data/libphonenumber/resources/geocoding/fr/290.txt +24 -0
  1790. data/data/libphonenumber/resources/geocoding/fr/32.txt +59 -0
  1791. data/data/libphonenumber/resources/geocoding/fr/33.txt +5593 -0
  1792. data/data/libphonenumber/resources/geocoding/fr/352.txt +231 -0
  1793. data/data/libphonenumber/resources/geocoding/fr/41.txt +37 -0
  1794. data/data/libphonenumber/resources/geocoding/fr/82.txt +33 -0
  1795. data/data/libphonenumber/resources/geocoding/hu/36.txt +71 -0
  1796. data/data/libphonenumber/resources/geocoding/id/62.txt +325 -0
  1797. data/data/libphonenumber/resources/geocoding/it/39.txt +248 -0
  1798. data/data/libphonenumber/resources/geocoding/it/41.txt +37 -0
  1799. data/data/libphonenumber/resources/geocoding/ja/81.txt +1546 -0
  1800. data/data/libphonenumber/resources/geocoding/ko/82.txt +35 -0
  1801. data/data/libphonenumber/resources/geocoding/nl/31.txt +145 -0
  1802. data/data/libphonenumber/resources/geocoding/nl/32.txt +59 -0
  1803. data/data/libphonenumber/resources/geocoding/pl/48.txt +66 -0
  1804. data/data/libphonenumber/resources/geocoding/pt/238.txt +58 -0
  1805. data/data/libphonenumber/resources/geocoding/pt/239.txt +37 -0
  1806. data/data/libphonenumber/resources/geocoding/pt/244.txt +59 -0
  1807. data/data/libphonenumber/resources/geocoding/pt/245.txt +37 -0
  1808. data/data/libphonenumber/resources/geocoding/pt/258.txt +29 -0
  1809. data/data/libphonenumber/resources/geocoding/pt/351.txt +69 -0
  1810. data/data/libphonenumber/resources/geocoding/pt/55.txt +86 -0
  1811. data/data/libphonenumber/resources/geocoding/ro/373.txt +61 -0
  1812. data/data/libphonenumber/resources/geocoding/ro/40.txt +99 -0
  1813. data/data/libphonenumber/resources/geocoding/ru/373.txt +61 -0
  1814. data/data/libphonenumber/resources/geocoding/ru/374.txt +177 -0
  1815. data/data/libphonenumber/resources/geocoding/ru/375.txt +143 -0
  1816. data/data/libphonenumber/resources/geocoding/ru/7.txt +108 -0
  1817. data/data/libphonenumber/resources/geocoding/se/358.txt +38 -0
  1818. data/data/libphonenumber/resources/geocoding/sr/381.txt +51 -0
  1819. data/data/libphonenumber/resources/geocoding/sv/46.txt +266 -0
  1820. data/data/libphonenumber/resources/geocoding/th/66.txt +39 -0
  1821. data/data/libphonenumber/resources/geocoding/tr/90.txt +182 -0
  1822. data/data/libphonenumber/resources/geocoding/vi/84.txt +80 -0
  1823. data/data/libphonenumber/resources/geocoding/zh/82.txt +35 -0
  1824. data/data/libphonenumber/resources/geocoding/zh/86.txt +145812 -0
  1825. data/data/libphonenumber/resources/geocoding/zh/886.txt +30 -0
  1826. data/data/libphonenumber/resources/geocoding/zh_Hant/82.txt +35 -0
  1827. data/data/libphonenumber/resources/geocoding/zh_Hant/886.txt +30 -0
  1828. data/data/libphonenumber/resources/phonemetadata.proto +282 -0
  1829. data/data/libphonenumber/resources/phonenumber.proto +123 -0
  1830. data/data/libphonenumber/resources/test/carrier/en/1.txt +16 -0
  1831. data/data/libphonenumber/resources/test/carrier/en/244.txt +16 -0
  1832. data/data/libphonenumber/resources/test/carrier/en/44.txt +17 -0
  1833. data/data/libphonenumber/resources/test/carrier/sv/44.txt +15 -0
  1834. data/data/libphonenumber/resources/test/geocoding/de/1.txt +16 -0
  1835. data/data/libphonenumber/resources/test/geocoding/en/1.txt +21 -0
  1836. data/data/libphonenumber/resources/test/geocoding/en/54.txt +15 -0
  1837. data/data/libphonenumber/resources/test/geocoding/en/82.txt +30 -0
  1838. data/data/libphonenumber/resources/test/geocoding/ko/82.txt +29 -0
  1839. data/data/libphonenumber/resources/test/timezones/map_data.txt +24 -0
  1840. data/data/libphonenumber/resources/timezones/map_data.txt +1996 -0
  1841. data/data/libphonenumber/tools/cpp/CMakeLists.txt +57 -0
  1842. data/data/libphonenumber/tools/cpp/gtest.cmake +47 -0
  1843. data/data/libphonenumber/tools/cpp/src/base/basictypes.h +312 -0
  1844. data/data/libphonenumber/tools/cpp/src/cpp-build/generate_geocoding_data.cc +654 -0
  1845. data/data/libphonenumber/tools/cpp/src/cpp-build/generate_geocoding_data.h +37 -0
  1846. data/data/libphonenumber/tools/cpp/src/cpp-build/generate_geocoding_data_main.cc +21 -0
  1847. data/data/libphonenumber/tools/cpp/test/cpp-build/generate_geocoding_data_test.cc +39 -0
  1848. data/data/libphonenumber/tools/cpp/test/cpp-build/run_tests.cc +21 -0
  1849. data/data/libphonenumber/tools/java/common/pom.xml +61 -0
  1850. data/data/libphonenumber/tools/java/common/src/com/google/i18n/phonenumbers/BuildMetadataFromXml.java +514 -0
  1851. data/data/libphonenumber/tools/java/common/src/com/google/i18n/phonenumbers/Command.java +51 -0
  1852. data/data/libphonenumber/tools/java/common/src/com/google/i18n/phonenumbers/CommandDispatcher.java +78 -0
  1853. data/data/libphonenumber/tools/java/common/src/com/google/i18n/phonenumbers/CopyrightNotice.java +66 -0
  1854. data/data/libphonenumber/tools/java/common/src/com/google/i18n/phonenumbers/FileUtils.java +52 -0
  1855. data/data/libphonenumber/tools/java/common/test/com/google/i18n/phonenumbers/BuildMetadataFromXmlTest.java +657 -0
  1856. data/data/libphonenumber/tools/java/cpp-build/pom.xml +149 -0
  1857. data/data/libphonenumber/tools/java/cpp-build/src/com/google/i18n/phonenumbers/BuildMetadataCppFromXml.java +219 -0
  1858. data/data/libphonenumber/tools/java/cpp-build/src/com/google/i18n/phonenumbers/CppMetadataGenerator.java +197 -0
  1859. data/data/libphonenumber/tools/java/cpp-build/src/com/google/i18n/phonenumbers/EntryPoint.java +33 -0
  1860. data/data/libphonenumber/tools/java/cpp-build/target/cpp-build-1.0-SNAPSHOT-jar-with-dependencies.jar +0 -0
  1861. data/data/libphonenumber/tools/java/cpp-build/test/com/google/i18n/phonenumbers/BuildMetadataCppFromXmlTest.java +185 -0
  1862. data/data/libphonenumber/tools/java/cpp-build/test/com/google/i18n/phonenumbers/CppMetadataGeneratorTest.java +122 -0
  1863. data/data/libphonenumber/tools/java/data/README +16 -0
  1864. data/data/libphonenumber/tools/java/data/pom.xml +111 -0
  1865. data/data/libphonenumber/tools/java/data/src/com/google/i18n/phonenumbers/CombineGeoData.java +287 -0
  1866. data/data/libphonenumber/tools/java/data/src/com/google/i18n/phonenumbers/CombineGeoDataServlet.java +46 -0
  1867. data/data/libphonenumber/tools/java/data/test/com/google/i18n/phonenumbers/CombineGeoDataTest.java +233 -0
  1868. data/data/libphonenumber/tools/java/data/webapp/WEB-INF/appengine-web.xml +8 -0
  1869. data/data/libphonenumber/tools/java/data/webapp/WEB-INF/logging.properties +13 -0
  1870. data/data/libphonenumber/tools/java/data/webapp/WEB-INF/web.xml +18 -0
  1871. data/data/libphonenumber/tools/java/data/webapp/index.html +22 -0
  1872. data/data/libphonenumber/tools/java/java-build/pom.xml +113 -0
  1873. data/data/libphonenumber/tools/java/java-build/src/com/google/i18n/phonenumbers/BuildMetadataJsonFromXml.java +389 -0
  1874. data/data/libphonenumber/tools/java/java-build/src/com/google/i18n/phonenumbers/BuildMetadataProtoFromXml.java +349 -0
  1875. data/data/libphonenumber/tools/java/java-build/src/com/google/i18n/phonenumbers/EntryPoint.java +39 -0
  1876. data/data/libphonenumber/tools/java/java-build/src/com/google/i18n/phonenumbers/JSArrayBuilder.java +142 -0
  1877. data/data/libphonenumber/tools/java/java-build/src/com/google/i18n/phonenumbers/buildtools/AbstractPhonePrefixDataIOHandler.java +62 -0
  1878. data/data/libphonenumber/tools/java/java-build/src/com/google/i18n/phonenumbers/buildtools/GeneratePhonePrefixData.java +483 -0
  1879. data/data/libphonenumber/tools/java/java-build/src/com/google/i18n/phonenumbers/buildtools/GeneratePhonePrefixDataEntryPoint.java +58 -0
  1880. data/data/libphonenumber/tools/java/java-build/src/com/google/i18n/phonenumbers/buildtools/GenerateTimeZonesMapData.java +143 -0
  1881. data/data/libphonenumber/tools/java/java-build/src/com/google/i18n/phonenumbers/buildtools/GenerateTimeZonesMapDataEntryPoint.java +60 -0
  1882. data/data/libphonenumber/tools/java/java-build/src/com/google/i18n/phonenumbers/buildtools/PhonePrefixDataIOHandler.java +59 -0
  1883. data/data/libphonenumber/tools/java/java-build/target/java-build-1.0-SNAPSHOT-jar-with-dependencies.jar +0 -0
  1884. data/data/libphonenumber/tools/java/java-build/test/com/google/i18n/phonenumbers/buildtools/GeneratePhonePrefixDataTest.java +291 -0
  1885. data/data/libphonenumber/tools/java/java-build/test/com/google/i18n/phonenumbers/buildtools/GenerateTimeZonesMapDataTest.java +136 -0
  1886. data/data/libphonenumber/tools/java/pom.xml +29 -0
  1887. data/data/libphonenumber/tools/script/continuous-integration.sh +96 -0
  1888. data/data/phone_data.dat +0 -0
  1889. data/lib/phonelib/core.rb +36 -1
  1890. data/lib/phonelib/data_importer.rb +268 -0
  1891. data/lib/phonelib/phone.rb +67 -0
  1892. data/lib/phonelib/version.rb +1 -1
  1893. data/lib/tasks/phonelib_tasks.rake +2 -70
  1894. metadata +1892 -7
@@ -0,0 +1,4194 @@
1
+ /**
2
+ * @license
3
+ * Copyright (C) 2010 The Libphonenumber Authors.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ /**
19
+ * @fileoverview Utility for international phone numbers.
20
+ * Functionality includes formatting, parsing and validation.
21
+ * (based on the java implementation).
22
+ *
23
+ * NOTE: A lot of methods in this class require Region Code strings. These must
24
+ * be provided using ISO 3166-1 two-letter country-code format. These should be
25
+ * in upper-case (but for compatibility lower-case is also allowed). The list of
26
+ * the codes can be found here:
27
+ * http://www.iso.org/iso/english_country_names_and_code_elements
28
+ *
29
+ * @author Nikolaos Trogkanis
30
+ */
31
+
32
+ goog.provide('i18n.phonenumbers.Error');
33
+ goog.provide('i18n.phonenumbers.PhoneNumberFormat');
34
+ goog.provide('i18n.phonenumbers.PhoneNumberType');
35
+ goog.provide('i18n.phonenumbers.PhoneNumberUtil');
36
+ goog.provide('i18n.phonenumbers.PhoneNumberUtil.MatchType');
37
+ goog.provide('i18n.phonenumbers.PhoneNumberUtil.ValidationResult');
38
+
39
+ goog.require('goog.array');
40
+ goog.require('goog.proto2.PbLiteSerializer');
41
+ goog.require('goog.string');
42
+ goog.require('goog.string.StringBuffer');
43
+ goog.require('i18n.phonenumbers.NumberFormat');
44
+ goog.require('i18n.phonenumbers.PhoneMetadata');
45
+ goog.require('i18n.phonenumbers.PhoneMetadataCollection');
46
+ goog.require('i18n.phonenumbers.PhoneNumber');
47
+ goog.require('i18n.phonenumbers.PhoneNumber.CountryCodeSource');
48
+ goog.require('i18n.phonenumbers.PhoneNumberDesc');
49
+ goog.require('i18n.phonenumbers.metadata');
50
+
51
+
52
+
53
+ /**
54
+ * @constructor
55
+ * @private
56
+ */
57
+ i18n.phonenumbers.PhoneNumberUtil = function() {
58
+ /**
59
+ * A mapping from a region code to the PhoneMetadata for that region.
60
+ * @type {Object.<string, i18n.phonenumbers.PhoneMetadata>}
61
+ */
62
+ this.regionToMetadataMap = {};
63
+ };
64
+ goog.addSingletonGetter(i18n.phonenumbers.PhoneNumberUtil);
65
+
66
+
67
+ /**
68
+ * Errors encountered when parsing phone numbers.
69
+ *
70
+ * @enum {string}
71
+ */
72
+ i18n.phonenumbers.Error = {
73
+ INVALID_COUNTRY_CODE: 'Invalid country calling code',
74
+ // This generally indicates the string passed in had less than 3 digits in it.
75
+ // More specifically, the number failed to match the regular expression
76
+ // VALID_PHONE_NUMBER.
77
+ NOT_A_NUMBER: 'The string supplied did not seem to be a phone number',
78
+ // This indicates the string started with an international dialing prefix, but
79
+ // after this was stripped from the number, had less digits than any valid
80
+ // phone number (including country calling code) could have.
81
+ TOO_SHORT_AFTER_IDD: 'Phone number too short after IDD',
82
+ // This indicates the string, after any country calling code has been
83
+ // stripped, had less digits than any valid phone number could have.
84
+ TOO_SHORT_NSN: 'The string supplied is too short to be a phone number',
85
+ // This indicates the string had more digits than any valid phone number could
86
+ // have.
87
+ TOO_LONG: 'The string supplied is too long to be a phone number'
88
+ };
89
+
90
+
91
+ /**
92
+ * @const
93
+ * @type {number}
94
+ * @private
95
+ */
96
+ i18n.phonenumbers.PhoneNumberUtil.NANPA_COUNTRY_CODE_ = 1;
97
+
98
+
99
+ /**
100
+ * The minimum length of the national significant number.
101
+ *
102
+ * @const
103
+ * @type {number}
104
+ * @private
105
+ */
106
+ i18n.phonenumbers.PhoneNumberUtil.MIN_LENGTH_FOR_NSN_ = 2;
107
+
108
+
109
+ /**
110
+ * The ITU says the maximum length should be 15, but we have found longer
111
+ * numbers in Germany.
112
+ *
113
+ * @const
114
+ * @type {number}
115
+ * @private
116
+ */
117
+ i18n.phonenumbers.PhoneNumberUtil.MAX_LENGTH_FOR_NSN_ = 17;
118
+
119
+
120
+ /**
121
+ * The maximum length of the country calling code.
122
+ *
123
+ * @const
124
+ * @type {number}
125
+ * @private
126
+ */
127
+ i18n.phonenumbers.PhoneNumberUtil.MAX_LENGTH_COUNTRY_CODE_ = 3;
128
+
129
+
130
+ /**
131
+ * We don't allow input strings for parsing to be longer than 250 chars. This
132
+ * prevents malicious input from consuming CPU.
133
+ *
134
+ * @const
135
+ * @type {number}
136
+ * @private
137
+ */
138
+ i18n.phonenumbers.PhoneNumberUtil.MAX_INPUT_STRING_LENGTH_ = 250;
139
+
140
+
141
+ /**
142
+ * Region-code for the unknown region.
143
+ *
144
+ * @const
145
+ * @type {string}
146
+ * @private
147
+ */
148
+ i18n.phonenumbers.PhoneNumberUtil.UNKNOWN_REGION_ = 'ZZ';
149
+
150
+
151
+ /**
152
+ * The prefix that needs to be inserted in front of a Colombian landline number
153
+ * when dialed from a mobile phone in Colombia.
154
+ *
155
+ * @const
156
+ * @type {string}
157
+ * @private
158
+ */
159
+ i18n.phonenumbers.PhoneNumberUtil.COLOMBIA_MOBILE_TO_FIXED_LINE_PREFIX_ = '3';
160
+
161
+
162
+ /**
163
+ * Map of country calling codes that use a mobile token before the area code.
164
+ * One example of when this is relevant is when determining the length of the
165
+ * national destination code, which should be the length of the area code plus
166
+ * the length of the mobile token.
167
+ *
168
+ * @const
169
+ * @type {!Object.<number, string>}
170
+ * @private
171
+ */
172
+ i18n.phonenumbers.PhoneNumberUtil.MOBILE_TOKEN_MAPPINGS_ = {
173
+ 52: '1',
174
+ 54: '9'
175
+ };
176
+
177
+
178
+ /**
179
+ * The PLUS_SIGN signifies the international prefix.
180
+ *
181
+ * @const
182
+ * @type {string}
183
+ */
184
+ i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN = '+';
185
+
186
+
187
+ /**
188
+ * @const
189
+ * @type {string}
190
+ * @private
191
+ */
192
+ i18n.phonenumbers.PhoneNumberUtil.STAR_SIGN_ = '*';
193
+
194
+
195
+ /**
196
+ * The RFC 3966 format for extensions.
197
+ *
198
+ * @const
199
+ * @type {string}
200
+ * @private
201
+ */
202
+ i18n.phonenumbers.PhoneNumberUtil.RFC3966_EXTN_PREFIX_ = ';ext=';
203
+
204
+
205
+ /**
206
+ * @const
207
+ * @type {string}
208
+ * @private
209
+ */
210
+ i18n.phonenumbers.PhoneNumberUtil.RFC3966_PREFIX_ = 'tel:';
211
+
212
+
213
+ /**
214
+ * @const
215
+ * @type {string}
216
+ * @private
217
+ */
218
+ i18n.phonenumbers.PhoneNumberUtil.RFC3966_PHONE_CONTEXT_ = ';phone-context=';
219
+
220
+
221
+ /**
222
+ * @const
223
+ * @type {string}
224
+ * @private
225
+ */
226
+ i18n.phonenumbers.PhoneNumberUtil.RFC3966_ISDN_SUBADDRESS_ = ';isub=';
227
+
228
+
229
+ /**
230
+ * These mappings map a character (key) to a specific digit that should replace
231
+ * it for normalization purposes. Non-European digits that may be used in phone
232
+ * numbers are mapped to a European equivalent.
233
+ *
234
+ * @const
235
+ * @type {!Object.<string, string>}
236
+ */
237
+ i18n.phonenumbers.PhoneNumberUtil.DIGIT_MAPPINGS = {
238
+ '0': '0',
239
+ '1': '1',
240
+ '2': '2',
241
+ '3': '3',
242
+ '4': '4',
243
+ '5': '5',
244
+ '6': '6',
245
+ '7': '7',
246
+ '8': '8',
247
+ '9': '9',
248
+ '\uFF10': '0', // Fullwidth digit 0
249
+ '\uFF11': '1', // Fullwidth digit 1
250
+ '\uFF12': '2', // Fullwidth digit 2
251
+ '\uFF13': '3', // Fullwidth digit 3
252
+ '\uFF14': '4', // Fullwidth digit 4
253
+ '\uFF15': '5', // Fullwidth digit 5
254
+ '\uFF16': '6', // Fullwidth digit 6
255
+ '\uFF17': '7', // Fullwidth digit 7
256
+ '\uFF18': '8', // Fullwidth digit 8
257
+ '\uFF19': '9', // Fullwidth digit 9
258
+ '\u0660': '0', // Arabic-indic digit 0
259
+ '\u0661': '1', // Arabic-indic digit 1
260
+ '\u0662': '2', // Arabic-indic digit 2
261
+ '\u0663': '3', // Arabic-indic digit 3
262
+ '\u0664': '4', // Arabic-indic digit 4
263
+ '\u0665': '5', // Arabic-indic digit 5
264
+ '\u0666': '6', // Arabic-indic digit 6
265
+ '\u0667': '7', // Arabic-indic digit 7
266
+ '\u0668': '8', // Arabic-indic digit 8
267
+ '\u0669': '9', // Arabic-indic digit 9
268
+ '\u06F0': '0', // Eastern-Arabic digit 0
269
+ '\u06F1': '1', // Eastern-Arabic digit 1
270
+ '\u06F2': '2', // Eastern-Arabic digit 2
271
+ '\u06F3': '3', // Eastern-Arabic digit 3
272
+ '\u06F4': '4', // Eastern-Arabic digit 4
273
+ '\u06F5': '5', // Eastern-Arabic digit 5
274
+ '\u06F6': '6', // Eastern-Arabic digit 6
275
+ '\u06F7': '7', // Eastern-Arabic digit 7
276
+ '\u06F8': '8', // Eastern-Arabic digit 8
277
+ '\u06F9': '9' // Eastern-Arabic digit 9
278
+ };
279
+
280
+
281
+ /**
282
+ * A map that contains characters that are essential when dialling. That means
283
+ * any of the characters in this map must not be removed from a number when
284
+ * dialling, otherwise the call will not reach the intended destination.
285
+ *
286
+ * @const
287
+ * @type {!Object.<string, string>}
288
+ * @private
289
+ */
290
+ i18n.phonenumbers.PhoneNumberUtil.DIALLABLE_CHAR_MAPPINGS_ = {
291
+ '0': '0',
292
+ '1': '1',
293
+ '2': '2',
294
+ '3': '3',
295
+ '4': '4',
296
+ '5': '5',
297
+ '6': '6',
298
+ '7': '7',
299
+ '8': '8',
300
+ '9': '9',
301
+ '+': i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN,
302
+ '*': '*'
303
+ };
304
+
305
+
306
+ /**
307
+ * Only upper-case variants of alpha characters are stored.
308
+ *
309
+ * @const
310
+ * @type {!Object.<string, string>}
311
+ * @private
312
+ */
313
+ i18n.phonenumbers.PhoneNumberUtil.ALPHA_MAPPINGS_ = {
314
+ 'A': '2',
315
+ 'B': '2',
316
+ 'C': '2',
317
+ 'D': '3',
318
+ 'E': '3',
319
+ 'F': '3',
320
+ 'G': '4',
321
+ 'H': '4',
322
+ 'I': '4',
323
+ 'J': '5',
324
+ 'K': '5',
325
+ 'L': '5',
326
+ 'M': '6',
327
+ 'N': '6',
328
+ 'O': '6',
329
+ 'P': '7',
330
+ 'Q': '7',
331
+ 'R': '7',
332
+ 'S': '7',
333
+ 'T': '8',
334
+ 'U': '8',
335
+ 'V': '8',
336
+ 'W': '9',
337
+ 'X': '9',
338
+ 'Y': '9',
339
+ 'Z': '9'
340
+ };
341
+
342
+
343
+ /**
344
+ * For performance reasons, amalgamate both into one map.
345
+ *
346
+ * @const
347
+ * @type {!Object.<string, string>}
348
+ * @private
349
+ */
350
+ i18n.phonenumbers.PhoneNumberUtil.ALL_NORMALIZATION_MAPPINGS_ = {
351
+ '0': '0',
352
+ '1': '1',
353
+ '2': '2',
354
+ '3': '3',
355
+ '4': '4',
356
+ '5': '5',
357
+ '6': '6',
358
+ '7': '7',
359
+ '8': '8',
360
+ '9': '9',
361
+ '\uFF10': '0', // Fullwidth digit 0
362
+ '\uFF11': '1', // Fullwidth digit 1
363
+ '\uFF12': '2', // Fullwidth digit 2
364
+ '\uFF13': '3', // Fullwidth digit 3
365
+ '\uFF14': '4', // Fullwidth digit 4
366
+ '\uFF15': '5', // Fullwidth digit 5
367
+ '\uFF16': '6', // Fullwidth digit 6
368
+ '\uFF17': '7', // Fullwidth digit 7
369
+ '\uFF18': '8', // Fullwidth digit 8
370
+ '\uFF19': '9', // Fullwidth digit 9
371
+ '\u0660': '0', // Arabic-indic digit 0
372
+ '\u0661': '1', // Arabic-indic digit 1
373
+ '\u0662': '2', // Arabic-indic digit 2
374
+ '\u0663': '3', // Arabic-indic digit 3
375
+ '\u0664': '4', // Arabic-indic digit 4
376
+ '\u0665': '5', // Arabic-indic digit 5
377
+ '\u0666': '6', // Arabic-indic digit 6
378
+ '\u0667': '7', // Arabic-indic digit 7
379
+ '\u0668': '8', // Arabic-indic digit 8
380
+ '\u0669': '9', // Arabic-indic digit 9
381
+ '\u06F0': '0', // Eastern-Arabic digit 0
382
+ '\u06F1': '1', // Eastern-Arabic digit 1
383
+ '\u06F2': '2', // Eastern-Arabic digit 2
384
+ '\u06F3': '3', // Eastern-Arabic digit 3
385
+ '\u06F4': '4', // Eastern-Arabic digit 4
386
+ '\u06F5': '5', // Eastern-Arabic digit 5
387
+ '\u06F6': '6', // Eastern-Arabic digit 6
388
+ '\u06F7': '7', // Eastern-Arabic digit 7
389
+ '\u06F8': '8', // Eastern-Arabic digit 8
390
+ '\u06F9': '9', // Eastern-Arabic digit 9
391
+ 'A': '2',
392
+ 'B': '2',
393
+ 'C': '2',
394
+ 'D': '3',
395
+ 'E': '3',
396
+ 'F': '3',
397
+ 'G': '4',
398
+ 'H': '4',
399
+ 'I': '4',
400
+ 'J': '5',
401
+ 'K': '5',
402
+ 'L': '5',
403
+ 'M': '6',
404
+ 'N': '6',
405
+ 'O': '6',
406
+ 'P': '7',
407
+ 'Q': '7',
408
+ 'R': '7',
409
+ 'S': '7',
410
+ 'T': '8',
411
+ 'U': '8',
412
+ 'V': '8',
413
+ 'W': '9',
414
+ 'X': '9',
415
+ 'Y': '9',
416
+ 'Z': '9'
417
+ };
418
+
419
+
420
+ /**
421
+ * Separate map of all symbols that we wish to retain when formatting alpha
422
+ * numbers. This includes digits, ASCII letters and number grouping symbols such
423
+ * as '-' and ' '.
424
+ *
425
+ * @const
426
+ * @type {!Object.<string, string>}
427
+ * @private
428
+ */
429
+ i18n.phonenumbers.PhoneNumberUtil.ALL_PLUS_NUMBER_GROUPING_SYMBOLS_ = {
430
+ '0': '0',
431
+ '1': '1',
432
+ '2': '2',
433
+ '3': '3',
434
+ '4': '4',
435
+ '5': '5',
436
+ '6': '6',
437
+ '7': '7',
438
+ '8': '8',
439
+ '9': '9',
440
+ 'A': 'A',
441
+ 'B': 'B',
442
+ 'C': 'C',
443
+ 'D': 'D',
444
+ 'E': 'E',
445
+ 'F': 'F',
446
+ 'G': 'G',
447
+ 'H': 'H',
448
+ 'I': 'I',
449
+ 'J': 'J',
450
+ 'K': 'K',
451
+ 'L': 'L',
452
+ 'M': 'M',
453
+ 'N': 'N',
454
+ 'O': 'O',
455
+ 'P': 'P',
456
+ 'Q': 'Q',
457
+ 'R': 'R',
458
+ 'S': 'S',
459
+ 'T': 'T',
460
+ 'U': 'U',
461
+ 'V': 'V',
462
+ 'W': 'W',
463
+ 'X': 'X',
464
+ 'Y': 'Y',
465
+ 'Z': 'Z',
466
+ 'a': 'A',
467
+ 'b': 'B',
468
+ 'c': 'C',
469
+ 'd': 'D',
470
+ 'e': 'E',
471
+ 'f': 'F',
472
+ 'g': 'G',
473
+ 'h': 'H',
474
+ 'i': 'I',
475
+ 'j': 'J',
476
+ 'k': 'K',
477
+ 'l': 'L',
478
+ 'm': 'M',
479
+ 'n': 'N',
480
+ 'o': 'O',
481
+ 'p': 'P',
482
+ 'q': 'Q',
483
+ 'r': 'R',
484
+ 's': 'S',
485
+ 't': 'T',
486
+ 'u': 'U',
487
+ 'v': 'V',
488
+ 'w': 'W',
489
+ 'x': 'X',
490
+ 'y': 'Y',
491
+ 'z': 'Z',
492
+ '-': '-',
493
+ '\uFF0D': '-',
494
+ '\u2010': '-',
495
+ '\u2011': '-',
496
+ '\u2012': '-',
497
+ '\u2013': '-',
498
+ '\u2014': '-',
499
+ '\u2015': '-',
500
+ '\u2212': '-',
501
+ '/': '/',
502
+ '\uFF0F': '/',
503
+ ' ': ' ',
504
+ '\u3000': ' ',
505
+ '\u2060': ' ',
506
+ '.': '.',
507
+ '\uFF0E': '.'
508
+ };
509
+
510
+
511
+ /**
512
+ * Pattern that makes it easy to distinguish whether a region has a unique
513
+ * international dialing prefix or not. If a region has a unique international
514
+ * prefix (e.g. 011 in USA), it will be represented as a string that contains a
515
+ * sequence of ASCII digits. If there are multiple available international
516
+ * prefixes in a region, they will be represented as a regex string that always
517
+ * contains character(s) other than ASCII digits. Note this regex also includes
518
+ * tilde, which signals waiting for the tone.
519
+ *
520
+ * @const
521
+ * @type {!RegExp}
522
+ * @private
523
+ */
524
+ i18n.phonenumbers.PhoneNumberUtil.UNIQUE_INTERNATIONAL_PREFIX_ =
525
+ /[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?/;
526
+
527
+
528
+ /**
529
+ * Regular expression of acceptable punctuation found in phone numbers. This
530
+ * excludes punctuation found as a leading character only. This consists of dash
531
+ * characters, white space characters, full stops, slashes, square brackets,
532
+ * parentheses and tildes. It also includes the letter 'x' as that is found as a
533
+ * placeholder for carrier information in some phone numbers. Full-width
534
+ * variants are also present.
535
+ *
536
+ * @const
537
+ * @type {string}
538
+ */
539
+ i18n.phonenumbers.PhoneNumberUtil.VALID_PUNCTUATION =
540
+ '-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \u00A0\u00AD\u200B\u2060\u3000' +
541
+ '()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E';
542
+
543
+
544
+ /**
545
+ * Digits accepted in phone numbers (ascii, fullwidth, arabic-indic, and eastern
546
+ * arabic digits).
547
+ *
548
+ * @const
549
+ * @type {string}
550
+ * @private
551
+ */
552
+ i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ =
553
+ '0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9';
554
+
555
+
556
+ /**
557
+ * We accept alpha characters in phone numbers, ASCII only, upper and lower
558
+ * case.
559
+ *
560
+ * @const
561
+ * @type {string}
562
+ * @private
563
+ */
564
+ i18n.phonenumbers.PhoneNumberUtil.VALID_ALPHA_ = 'A-Za-z';
565
+
566
+
567
+ /**
568
+ * @const
569
+ * @type {string}
570
+ * @private
571
+ */
572
+ i18n.phonenumbers.PhoneNumberUtil.PLUS_CHARS_ = '+\uFF0B';
573
+
574
+
575
+ /**
576
+ * @const
577
+ * @type {!RegExp}
578
+ */
579
+ i18n.phonenumbers.PhoneNumberUtil.PLUS_CHARS_PATTERN =
580
+ new RegExp('[' + i18n.phonenumbers.PhoneNumberUtil.PLUS_CHARS_ + ']+');
581
+
582
+
583
+ /**
584
+ * @const
585
+ * @type {!RegExp}
586
+ * @private
587
+ */
588
+ i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN_ =
589
+ new RegExp('^[' + i18n.phonenumbers.PhoneNumberUtil.PLUS_CHARS_ + ']+');
590
+
591
+
592
+ /**
593
+ * @const
594
+ * @type {string}
595
+ * @private
596
+ */
597
+ i18n.phonenumbers.PhoneNumberUtil.SEPARATOR_PATTERN_ =
598
+ '[' + i18n.phonenumbers.PhoneNumberUtil.VALID_PUNCTUATION + ']+';
599
+
600
+
601
+ /**
602
+ * @const
603
+ * @type {!RegExp}
604
+ */
605
+ i18n.phonenumbers.PhoneNumberUtil.CAPTURING_DIGIT_PATTERN =
606
+ new RegExp('([' + i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ + '])');
607
+
608
+
609
+ /**
610
+ * Regular expression of acceptable characters that may start a phone number for
611
+ * the purposes of parsing. This allows us to strip away meaningless prefixes to
612
+ * phone numbers that may be mistakenly given to us. This consists of digits,
613
+ * the plus symbol and arabic-indic digits. This does not contain alpha
614
+ * characters, although they may be used later in the number. It also does not
615
+ * include other punctuation, as this will be stripped later during parsing and
616
+ * is of no information value when parsing a number.
617
+ *
618
+ * @const
619
+ * @type {!RegExp}
620
+ * @private
621
+ */
622
+ i18n.phonenumbers.PhoneNumberUtil.VALID_START_CHAR_PATTERN_ =
623
+ new RegExp('[' + i18n.phonenumbers.PhoneNumberUtil.PLUS_CHARS_ +
624
+ i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ + ']');
625
+
626
+
627
+ /**
628
+ * Regular expression of characters typically used to start a second phone
629
+ * number for the purposes of parsing. This allows us to strip off parts of the
630
+ * number that are actually the start of another number, such as for:
631
+ * (530) 583-6985 x302/x2303 -> the second extension here makes this actually
632
+ * two phone numbers, (530) 583-6985 x302 and (530) 583-6985 x2303. We remove
633
+ * the second extension so that the first number is parsed correctly.
634
+ *
635
+ * @const
636
+ * @type {!RegExp}
637
+ * @private
638
+ */
639
+ i18n.phonenumbers.PhoneNumberUtil.SECOND_NUMBER_START_PATTERN_ = /[\\\/] *x/;
640
+
641
+
642
+ /**
643
+ * Regular expression of trailing characters that we want to remove. We remove
644
+ * all characters that are not alpha or numerical characters. The hash character
645
+ * is retained here, as it may signify the previous block was an extension.
646
+ *
647
+ * @const
648
+ * @type {!RegExp}
649
+ * @private
650
+ */
651
+ i18n.phonenumbers.PhoneNumberUtil.UNWANTED_END_CHAR_PATTERN_ =
652
+ new RegExp('[^' + i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ +
653
+ i18n.phonenumbers.PhoneNumberUtil.VALID_ALPHA_ + '#]+$');
654
+
655
+
656
+ /**
657
+ * We use this pattern to check if the phone number has at least three letters
658
+ * in it - if so, then we treat it as a number where some phone-number digits
659
+ * are represented by letters.
660
+ *
661
+ * @const
662
+ * @type {!RegExp}
663
+ * @private
664
+ */
665
+ i18n.phonenumbers.PhoneNumberUtil.VALID_ALPHA_PHONE_PATTERN_ =
666
+ /(?:.*?[A-Za-z]){3}.*/;
667
+
668
+
669
+ /**
670
+ * Regular expression of viable phone numbers. This is location independent.
671
+ * Checks we have at least three leading digits, and only valid punctuation,
672
+ * alpha characters and digits in the phone number. Does not include extension
673
+ * data. The symbol 'x' is allowed here as valid punctuation since it is often
674
+ * used as a placeholder for carrier codes, for example in Brazilian phone
675
+ * numbers. We also allow multiple '+' characters at the start.
676
+ * Corresponds to the following:
677
+ * [digits]{minLengthNsn}|
678
+ * plus_sign*
679
+ * (([punctuation]|[star])*[digits]){3,}([punctuation]|[star]|[digits]|[alpha])*
680
+ *
681
+ * The first reg-ex is to allow short numbers (two digits long) to be parsed if
682
+ * they are entered as "15" etc, but only if there is no punctuation in them.
683
+ * The second expression restricts the number of digits to three or more, but
684
+ * then allows them to be in international form, and to have alpha-characters
685
+ * and punctuation. We split up the two reg-exes here and combine them when
686
+ * creating the reg-ex VALID_PHONE_NUMBER_PATTERN_ itself so we can prefix it
687
+ * with ^ and append $ to each branch.
688
+ *
689
+ * Note VALID_PUNCTUATION starts with a -, so must be the first in the range.
690
+ *
691
+ * @const
692
+ * @type {string}
693
+ * @private
694
+ */
695
+ i18n.phonenumbers.PhoneNumberUtil.MIN_LENGTH_PHONE_NUMBER_PATTERN_ =
696
+ '[' + i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ + ']{' +
697
+ i18n.phonenumbers.PhoneNumberUtil.MIN_LENGTH_FOR_NSN_ + '}';
698
+
699
+
700
+ /**
701
+ * See MIN_LENGTH_PHONE_NUMBER_PATTERN_ for a full description of this reg-exp.
702
+ *
703
+ * @const
704
+ * @type {string}
705
+ * @private
706
+ */
707
+ i18n.phonenumbers.PhoneNumberUtil.VALID_PHONE_NUMBER_ =
708
+ '[' + i18n.phonenumbers.PhoneNumberUtil.PLUS_CHARS_ + ']*(?:[' +
709
+ i18n.phonenumbers.PhoneNumberUtil.VALID_PUNCTUATION +
710
+ i18n.phonenumbers.PhoneNumberUtil.STAR_SIGN_ + ']*[' +
711
+ i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ + ']){3,}[' +
712
+ i18n.phonenumbers.PhoneNumberUtil.VALID_PUNCTUATION +
713
+ i18n.phonenumbers.PhoneNumberUtil.STAR_SIGN_ +
714
+ i18n.phonenumbers.PhoneNumberUtil.VALID_ALPHA_ +
715
+ i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ + ']*';
716
+
717
+
718
+ /**
719
+ * Default extension prefix to use when formatting. This will be put in front of
720
+ * any extension component of the number, after the main national number is
721
+ * formatted. For example, if you wish the default extension formatting to be
722
+ * ' extn: 3456', then you should specify ' extn: ' here as the default
723
+ * extension prefix. This can be overridden by region-specific preferences.
724
+ *
725
+ * @const
726
+ * @type {string}
727
+ * @private
728
+ */
729
+ i18n.phonenumbers.PhoneNumberUtil.DEFAULT_EXTN_PREFIX_ = ' ext. ';
730
+
731
+
732
+ /**
733
+ * Pattern to capture digits used in an extension.
734
+ * Places a maximum length of '7' for an extension.
735
+ *
736
+ * @const
737
+ * @type {string}
738
+ * @private
739
+ */
740
+ i18n.phonenumbers.PhoneNumberUtil.CAPTURING_EXTN_DIGITS_ =
741
+ '([' + i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ + ']{1,7})';
742
+
743
+
744
+ /**
745
+ * Regexp of all possible ways to write extensions, for use when parsing. This
746
+ * will be run as a case-insensitive regexp match. Wide character versions are
747
+ * also provided after each ASCII version. There are three regular expressions
748
+ * here. The first covers RFC 3966 format, where the extension is added using
749
+ * ';ext='. The second more generic one starts with optional white space and
750
+ * ends with an optional full stop (.), followed by zero or more spaces/tabs and
751
+ * then the numbers themselves. The other one covers the special case of
752
+ * American numbers where the extension is written with a hash at the end, such
753
+ * as '- 503#'. Note that the only capturing groups should be around the digits
754
+ * that you want to capture as part of the extension, or else parsing will fail!
755
+ * We allow two options for representing the accented o - the character itself,
756
+ * and one in the unicode decomposed form with the combining acute accent.
757
+ *
758
+ * @const
759
+ * @type {string}
760
+ * @private
761
+ */
762
+ i18n.phonenumbers.PhoneNumberUtil.EXTN_PATTERNS_FOR_PARSING_ =
763
+ i18n.phonenumbers.PhoneNumberUtil.RFC3966_EXTN_PREFIX_ +
764
+ i18n.phonenumbers.PhoneNumberUtil.CAPTURING_EXTN_DIGITS_ + '|' +
765
+ '[ \u00A0\\t,]*' +
766
+ '(?:e?xt(?:ensi(?:o\u0301?|\u00F3))?n?|\uFF45?\uFF58\uFF54\uFF4E?|' +
767
+ '[,x\uFF58#\uFF03~\uFF5E]|int|anexo|\uFF49\uFF4E\uFF54)' +
768
+ '[:\\.\uFF0E]?[ \u00A0\\t,-]*' +
769
+ i18n.phonenumbers.PhoneNumberUtil.CAPTURING_EXTN_DIGITS_ + '#?|' +
770
+ '[- ]+([' + i18n.phonenumbers.PhoneNumberUtil.VALID_DIGITS_ + ']{1,5})#';
771
+
772
+
773
+ /**
774
+ * Regexp of all known extension prefixes used by different regions followed by
775
+ * 1 or more valid digits, for use when parsing.
776
+ *
777
+ * @const
778
+ * @type {!RegExp}
779
+ * @private
780
+ */
781
+ i18n.phonenumbers.PhoneNumberUtil.EXTN_PATTERN_ =
782
+ new RegExp('(?:' +
783
+ i18n.phonenumbers.PhoneNumberUtil.EXTN_PATTERNS_FOR_PARSING_ +
784
+ ')$', 'i');
785
+
786
+
787
+ /**
788
+ * We append optionally the extension pattern to the end here, as a valid phone
789
+ * number may have an extension prefix appended, followed by 1 or more digits.
790
+ *
791
+ * @const
792
+ * @type {!RegExp}
793
+ * @private
794
+ */
795
+ i18n.phonenumbers.PhoneNumberUtil.VALID_PHONE_NUMBER_PATTERN_ =
796
+ new RegExp(
797
+ '^' +
798
+ i18n.phonenumbers.PhoneNumberUtil.MIN_LENGTH_PHONE_NUMBER_PATTERN_ +
799
+ '$|' +
800
+ '^' + i18n.phonenumbers.PhoneNumberUtil.VALID_PHONE_NUMBER_ +
801
+ '(?:' + i18n.phonenumbers.PhoneNumberUtil.EXTN_PATTERNS_FOR_PARSING_ +
802
+ ')?' + '$', 'i');
803
+
804
+
805
+ /**
806
+ * @const
807
+ * @type {!RegExp}
808
+ * @private
809
+ */
810
+ i18n.phonenumbers.PhoneNumberUtil.NON_DIGITS_PATTERN_ = /\D+/;
811
+
812
+
813
+ /**
814
+ * This was originally set to $1 but there are some countries for which the
815
+ * first group is not used in the national pattern (e.g. Argentina) so the $1
816
+ * group does not match correctly. Therefore, we use \d, so that the first
817
+ * group actually used in the pattern will be matched.
818
+ * @const
819
+ * @type {!RegExp}
820
+ * @private
821
+ */
822
+ i18n.phonenumbers.PhoneNumberUtil.FIRST_GROUP_PATTERN_ = /(\$\d)/;
823
+
824
+
825
+ /**
826
+ * @const
827
+ * @type {!RegExp}
828
+ * @private
829
+ */
830
+ i18n.phonenumbers.PhoneNumberUtil.NP_PATTERN_ = /\$NP/;
831
+
832
+
833
+ /**
834
+ * @const
835
+ * @type {!RegExp}
836
+ * @private
837
+ */
838
+ i18n.phonenumbers.PhoneNumberUtil.FG_PATTERN_ = /\$FG/;
839
+
840
+
841
+ /**
842
+ * @const
843
+ * @type {!RegExp}
844
+ * @private
845
+ */
846
+ i18n.phonenumbers.PhoneNumberUtil.CC_PATTERN_ = /\$CC/;
847
+
848
+
849
+ /**
850
+ * A pattern that is used to determine if the national prefix formatting rule
851
+ * has the first group only, i.e., does not start with the national prefix.
852
+ * Note that the pattern explicitly allows for unbalanced parentheses.
853
+ * @const
854
+ * @type {!RegExp}
855
+ * @private
856
+ */
857
+ i18n.phonenumbers.PhoneNumberUtil.FIRST_GROUP_ONLY_PREFIX_PATTERN_ =
858
+ /^\(?\$1\)?$/;
859
+
860
+
861
+ /**
862
+ * @const
863
+ * @type {string}
864
+ */
865
+ i18n.phonenumbers.PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY = '001';
866
+
867
+
868
+ /**
869
+ * INTERNATIONAL and NATIONAL formats are consistent with the definition in
870
+ * ITU-T Recommendation E123. For example, the number of the Google Switzerland
871
+ * office will be written as '+41 44 668 1800' in INTERNATIONAL format, and as
872
+ * '044 668 1800' in NATIONAL format. E164 format is as per INTERNATIONAL format
873
+ * but with no formatting applied, e.g. '+41446681800'. RFC3966 is as per
874
+ * INTERNATIONAL format, but with all spaces and other separating symbols
875
+ * replaced with a hyphen, and with any phone number extension appended with
876
+ * ';ext='. It also will have a prefix of 'tel:' added, e.g.
877
+ * 'tel:+41-44-668-1800'.
878
+ *
879
+ * Note: If you are considering storing the number in a neutral format, you are
880
+ * highly advised to use the PhoneNumber class.
881
+ * @enum {number}
882
+ */
883
+ i18n.phonenumbers.PhoneNumberFormat = {
884
+ E164: 0,
885
+ INTERNATIONAL: 1,
886
+ NATIONAL: 2,
887
+ RFC3966: 3
888
+ };
889
+
890
+
891
+ /**
892
+ * Type of phone numbers.
893
+ *
894
+ * @enum {number}
895
+ */
896
+ i18n.phonenumbers.PhoneNumberType = {
897
+ FIXED_LINE: 0,
898
+ MOBILE: 1,
899
+ // In some regions (e.g. the USA), it is impossible to distinguish between
900
+ // fixed-line and mobile numbers by looking at the phone number itself.
901
+ FIXED_LINE_OR_MOBILE: 2,
902
+ // Freephone lines
903
+ TOLL_FREE: 3,
904
+ PREMIUM_RATE: 4,
905
+ // The cost of this call is shared between the caller and the recipient, and
906
+ // is hence typically less than PREMIUM_RATE calls. See
907
+ // http://en.wikipedia.org/wiki/Shared_Cost_Service for more information.
908
+ SHARED_COST: 5,
909
+ // Voice over IP numbers. This includes TSoIP (Telephony Service over IP).
910
+ VOIP: 6,
911
+ // A personal number is associated with a particular person, and may be routed
912
+ // to either a MOBILE or FIXED_LINE number. Some more information can be found
913
+ // here: http://en.wikipedia.org/wiki/Personal_Numbers
914
+ PERSONAL_NUMBER: 7,
915
+ PAGER: 8,
916
+ // Used for 'Universal Access Numbers' or 'Company Numbers'. They may be
917
+ // further routed to specific offices, but allow one number to be used for a
918
+ // company.
919
+ UAN: 9,
920
+ // Used for 'Voice Mail Access Numbers'.
921
+ VOICEMAIL: 10,
922
+ // A phone number is of type UNKNOWN when it does not fit any of the known
923
+ // patterns for a specific region.
924
+ UNKNOWN: -1
925
+ };
926
+
927
+
928
+ /**
929
+ * Types of phone number matches. See detailed description beside the
930
+ * isNumberMatch() method.
931
+ *
932
+ * @enum {number}
933
+ */
934
+ i18n.phonenumbers.PhoneNumberUtil.MatchType = {
935
+ NOT_A_NUMBER: 0,
936
+ NO_MATCH: 1,
937
+ SHORT_NSN_MATCH: 2,
938
+ NSN_MATCH: 3,
939
+ EXACT_MATCH: 4
940
+ };
941
+
942
+
943
+ /**
944
+ * Possible outcomes when testing if a PhoneNumber is possible.
945
+ *
946
+ * @enum {number}
947
+ */
948
+ i18n.phonenumbers.PhoneNumberUtil.ValidationResult = {
949
+ IS_POSSIBLE: 0,
950
+ INVALID_COUNTRY_CODE: 1,
951
+ TOO_SHORT: 2,
952
+ TOO_LONG: 3
953
+ };
954
+
955
+
956
+ /**
957
+ * Attempts to extract a possible number from the string passed in. This
958
+ * currently strips all leading characters that cannot be used to start a phone
959
+ * number. Characters that can be used to start a phone number are defined in
960
+ * the VALID_START_CHAR_PATTERN. If none of these characters are found in the
961
+ * number passed in, an empty string is returned. This function also attempts to
962
+ * strip off any alternative extensions or endings if two or more are present,
963
+ * such as in the case of: (530) 583-6985 x302/x2303. The second extension here
964
+ * makes this actually two phone numbers, (530) 583-6985 x302 and (530) 583-6985
965
+ * x2303. We remove the second extension so that the first number is parsed
966
+ * correctly.
967
+ *
968
+ * @param {string} number the string that might contain a phone number.
969
+ * @return {string} the number, stripped of any non-phone-number prefix (such as
970
+ * 'Tel:') or an empty string if no character used to start phone numbers
971
+ * (such as + or any digit) is found in the number.
972
+ */
973
+ i18n.phonenumbers.PhoneNumberUtil.extractPossibleNumber = function(number) {
974
+ /** @type {string} */
975
+ var possibleNumber;
976
+
977
+ /** @type {number} */
978
+ var start = number
979
+ .search(i18n.phonenumbers.PhoneNumberUtil.VALID_START_CHAR_PATTERN_);
980
+ if (start >= 0) {
981
+ possibleNumber = number.substring(start);
982
+ // Remove trailing non-alpha non-numerical characters.
983
+ possibleNumber = possibleNumber.replace(
984
+ i18n.phonenumbers.PhoneNumberUtil.UNWANTED_END_CHAR_PATTERN_, '');
985
+
986
+ // Check for extra numbers at the end.
987
+ /** @type {number} */
988
+ var secondNumberStart = possibleNumber
989
+ .search(i18n.phonenumbers.PhoneNumberUtil.SECOND_NUMBER_START_PATTERN_);
990
+ if (secondNumberStart >= 0) {
991
+ possibleNumber = possibleNumber.substring(0, secondNumberStart);
992
+ }
993
+ } else {
994
+ possibleNumber = '';
995
+ }
996
+ return possibleNumber;
997
+ };
998
+
999
+
1000
+ /**
1001
+ * Checks to see if the string of characters could possibly be a phone number at
1002
+ * all. At the moment, checks to see that the string begins with at least 2
1003
+ * digits, ignoring any punctuation commonly found in phone numbers. This method
1004
+ * does not require the number to be normalized in advance - but does assume
1005
+ * that leading non-number symbols have been removed, such as by the method
1006
+ * extractPossibleNumber.
1007
+ *
1008
+ * @param {string} number string to be checked for viability as a phone number.
1009
+ * @return {boolean} true if the number could be a phone number of some sort,
1010
+ * otherwise false.
1011
+ */
1012
+ i18n.phonenumbers.PhoneNumberUtil.isViablePhoneNumber = function(number) {
1013
+ if (number.length < i18n.phonenumbers.PhoneNumberUtil.MIN_LENGTH_FOR_NSN_) {
1014
+ return false;
1015
+ }
1016
+ return i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_(
1017
+ i18n.phonenumbers.PhoneNumberUtil.VALID_PHONE_NUMBER_PATTERN_, number);
1018
+ };
1019
+
1020
+
1021
+ /**
1022
+ * Normalizes a string of characters representing a phone number. This performs
1023
+ * the following conversions:
1024
+ * Punctuation is stripped.
1025
+ * For ALPHA/VANITY numbers:
1026
+ * Letters are converted to their numeric representation on a telephone
1027
+ * keypad. The keypad used here is the one defined in ITU Recommendation
1028
+ * E.161. This is only done if there are 3 or more letters in the number,
1029
+ * to lessen the risk that such letters are typos.
1030
+ * For other numbers:
1031
+ * Wide-ascii digits are converted to normal ASCII (European) digits.
1032
+ * Arabic-Indic numerals are converted to European numerals.
1033
+ * Spurious alpha characters are stripped.
1034
+ *
1035
+ * @param {string} number a string of characters representing a phone number.
1036
+ * @return {string} the normalized string version of the phone number.
1037
+ */
1038
+ i18n.phonenumbers.PhoneNumberUtil.normalize = function(number) {
1039
+ if (i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_(
1040
+ i18n.phonenumbers.PhoneNumberUtil.VALID_ALPHA_PHONE_PATTERN_, number)) {
1041
+ return i18n.phonenumbers.PhoneNumberUtil.normalizeHelper_(number,
1042
+ i18n.phonenumbers.PhoneNumberUtil.ALL_NORMALIZATION_MAPPINGS_, true);
1043
+ } else {
1044
+ return i18n.phonenumbers.PhoneNumberUtil.normalizeDigitsOnly(number);
1045
+ }
1046
+ };
1047
+
1048
+
1049
+ /**
1050
+ * Normalizes a string of characters representing a phone number. This is a
1051
+ * wrapper for normalize(String number) but does in-place normalization of the
1052
+ * StringBuffer provided.
1053
+ *
1054
+ * @param {!goog.string.StringBuffer} number a StringBuffer of characters
1055
+ * representing a phone number that will be normalized in place.
1056
+ * @private
1057
+ */
1058
+ i18n.phonenumbers.PhoneNumberUtil.normalizeSB_ = function(number) {
1059
+ /** @type {string} */
1060
+ var normalizedNumber = i18n.phonenumbers.PhoneNumberUtil.normalize(number
1061
+ .toString());
1062
+ number.clear();
1063
+ number.append(normalizedNumber);
1064
+ };
1065
+
1066
+
1067
+ /**
1068
+ * Normalizes a string of characters representing a phone number. This converts
1069
+ * wide-ascii and arabic-indic numerals to European numerals, and strips
1070
+ * punctuation and alpha characters.
1071
+ *
1072
+ * @param {string} number a string of characters representing a phone number.
1073
+ * @return {string} the normalized string version of the phone number.
1074
+ */
1075
+ i18n.phonenumbers.PhoneNumberUtil.normalizeDigitsOnly = function(number) {
1076
+ return i18n.phonenumbers.PhoneNumberUtil.normalizeHelper_(number,
1077
+ i18n.phonenumbers.PhoneNumberUtil.DIGIT_MAPPINGS, true);
1078
+ };
1079
+
1080
+
1081
+ /**
1082
+ * Converts all alpha characters in a number to their respective digits on a
1083
+ * keypad, but retains existing formatting. Also converts wide-ascii digits to
1084
+ * normal ascii digits, and converts Arabic-Indic numerals to European numerals.
1085
+ *
1086
+ * @param {string} number a string of characters representing a phone number.
1087
+ * @return {string} the normalized string version of the phone number.
1088
+ */
1089
+ i18n.phonenumbers.PhoneNumberUtil.convertAlphaCharactersInNumber =
1090
+ function(number) {
1091
+
1092
+ return i18n.phonenumbers.PhoneNumberUtil.normalizeHelper_(number,
1093
+ i18n.phonenumbers.PhoneNumberUtil.ALL_NORMALIZATION_MAPPINGS_, false);
1094
+ };
1095
+
1096
+
1097
+ /**
1098
+ * Gets the length of the geographical area code from the
1099
+ * {@code national_number} field of the PhoneNumber object passed in, so that
1100
+ * clients could use it to split a national significant number into geographical
1101
+ * area code and subscriber number. It works in such a way that the resultant
1102
+ * subscriber number should be diallable, at least on some devices. An example
1103
+ * of how this could be used:
1104
+ *
1105
+ * <pre>
1106
+ * var phoneUtil = i18n.phonenumbers.PhoneNumberUtil.getInstance();
1107
+ * var number = phoneUtil.parse('16502530000', 'US');
1108
+ * var nationalSignificantNumber =
1109
+ * phoneUtil.getNationalSignificantNumber(number);
1110
+ * var areaCode;
1111
+ * var subscriberNumber;
1112
+ *
1113
+ * var areaCodeLength = phoneUtil.getLengthOfGeographicalAreaCode(number);
1114
+ * if (areaCodeLength > 0) {
1115
+ * areaCode = nationalSignificantNumber.substring(0, areaCodeLength);
1116
+ * subscriberNumber = nationalSignificantNumber.substring(areaCodeLength);
1117
+ * } else {
1118
+ * areaCode = '';
1119
+ * subscriberNumber = nationalSignificantNumber;
1120
+ * }
1121
+ * </pre>
1122
+ *
1123
+ * N.B.: area code is a very ambiguous concept, so the I18N team generally
1124
+ * recommends against using it for most purposes, but recommends using the more
1125
+ * general {@code national_number} instead. Read the following carefully before
1126
+ * deciding to use this method:
1127
+ * <ul>
1128
+ * <li> geographical area codes change over time, and this method honors those
1129
+ * changes; therefore, it doesn't guarantee the stability of the result it
1130
+ * produces.
1131
+ * <li> subscriber numbers may not be diallable from all devices (notably
1132
+ * mobile devices, which typically requires the full national_number to be
1133
+ * dialled in most regions).
1134
+ * <li> most non-geographical numbers have no area codes, including numbers
1135
+ * from non-geographical entities.
1136
+ * <li> some geographical numbers have no area codes.
1137
+ * </ul>
1138
+ *
1139
+ * @param {i18n.phonenumbers.PhoneNumber} number the PhoneNumber object for
1140
+ * which clients want to know the length of the area code.
1141
+ * @return {number} the length of area code of the PhoneNumber object passed in.
1142
+ */
1143
+ i18n.phonenumbers.PhoneNumberUtil.prototype.getLengthOfGeographicalAreaCode =
1144
+ function(number) {
1145
+ /** @type {i18n.phonenumbers.PhoneMetadata} */
1146
+ var metadata = this.getMetadataForRegion(this.getRegionCodeForNumber(number));
1147
+ if (metadata == null) {
1148
+ return 0;
1149
+ }
1150
+ // If a country doesn't use a national prefix, and this number doesn't have
1151
+ // an Italian leading zero, we assume it is a closed dialling plan with no
1152
+ // area codes.
1153
+ if (!metadata.hasNationalPrefix() && !number.hasItalianLeadingZero()) {
1154
+ return 0;
1155
+ }
1156
+
1157
+ if (!this.isNumberGeographical(number)) {
1158
+ return 0;
1159
+ }
1160
+
1161
+ return this.getLengthOfNationalDestinationCode(number);
1162
+ };
1163
+
1164
+
1165
+ /**
1166
+ * Gets the length of the national destination code (NDC) from the PhoneNumber
1167
+ * object passed in, so that clients could use it to split a national
1168
+ * significant number into NDC and subscriber number. The NDC of a phone number
1169
+ * is normally the first group of digit(s) right after the country calling code
1170
+ * when the number is formatted in the international format, if there is a
1171
+ * subscriber number part that follows. An example of how this could be used:
1172
+ *
1173
+ * <pre>
1174
+ * var phoneUtil = i18n.phonenumbers.PhoneNumberUtil.getInstance();
1175
+ * var number = phoneUtil.parse('18002530000', 'US');
1176
+ * var nationalSignificantNumber =
1177
+ * phoneUtil.getNationalSignificantNumber(number);
1178
+ * var nationalDestinationCode;
1179
+ * var subscriberNumber;
1180
+ *
1181
+ * var nationalDestinationCodeLength =
1182
+ * phoneUtil.getLengthOfNationalDestinationCode(number);
1183
+ * if (nationalDestinationCodeLength > 0) {
1184
+ * nationalDestinationCode =
1185
+ * nationalSignificantNumber.substring(0, nationalDestinationCodeLength);
1186
+ * subscriberNumber =
1187
+ * nationalSignificantNumber.substring(nationalDestinationCodeLength);
1188
+ * } else {
1189
+ * nationalDestinationCode = '';
1190
+ * subscriberNumber = nationalSignificantNumber;
1191
+ * }
1192
+ * </pre>
1193
+ *
1194
+ * Refer to the unittests to see the difference between this function and
1195
+ * {@link #getLengthOfGeographicalAreaCode}.
1196
+ *
1197
+ * @param {i18n.phonenumbers.PhoneNumber} number the PhoneNumber object for
1198
+ * which clients want to know the length of the NDC.
1199
+ * @return {number} the length of NDC of the PhoneNumber object passed in.
1200
+ */
1201
+ i18n.phonenumbers.PhoneNumberUtil.prototype.getLengthOfNationalDestinationCode =
1202
+ function(number) {
1203
+
1204
+ /** @type {i18n.phonenumbers.PhoneNumber} */
1205
+ var copiedProto;
1206
+ if (number.hasExtension()) {
1207
+ // We don't want to alter the proto given to us, but we don't want to
1208
+ // include the extension when we format it, so we copy it and clear the
1209
+ // extension here.
1210
+ copiedProto = number.clone();
1211
+ copiedProto.clearExtension();
1212
+ } else {
1213
+ copiedProto = number;
1214
+ }
1215
+
1216
+ /** @type {string} */
1217
+ var nationalSignificantNumber = this.format(copiedProto,
1218
+ i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL);
1219
+ /** @type {!Array.<string>} */
1220
+ var numberGroups = nationalSignificantNumber.split(
1221
+ i18n.phonenumbers.PhoneNumberUtil.NON_DIGITS_PATTERN_);
1222
+ // The pattern will start with '+COUNTRY_CODE ' so the first group will always
1223
+ // be the empty string (before the + symbol) and the second group will be the
1224
+ // country calling code. The third group will be area code if it is not the
1225
+ // last group.
1226
+ // NOTE: On IE the first group that is supposed to be the empty string does
1227
+ // not appear in the array of number groups... so make the result on non-IE
1228
+ // browsers to be that of IE.
1229
+ if (numberGroups[0].length == 0) {
1230
+ numberGroups.shift();
1231
+ }
1232
+ if (numberGroups.length <= 2) {
1233
+ return 0;
1234
+ }
1235
+
1236
+ if (this.getNumberType(number) == i18n.phonenumbers.PhoneNumberType.MOBILE) {
1237
+ // For example Argentinian mobile numbers, when formatted in the
1238
+ // international format, are in the form of +54 9 NDC XXXX.... As a result,
1239
+ // we take the length of the third group (NDC) and add the length of the
1240
+ // mobile token, which also forms part of the national significant number.
1241
+ // This assumes that the mobile token is always formatted separately from
1242
+ // the rest of the phone number.
1243
+ /** @type {string} */
1244
+ var mobileToken = i18n.phonenumbers.PhoneNumberUtil.getCountryMobileToken(
1245
+ number.getCountryCodeOrDefault());
1246
+ if (mobileToken != '') {
1247
+ return numberGroups[2].length + mobileToken.length;
1248
+ }
1249
+ }
1250
+ return numberGroups[1].length;
1251
+ };
1252
+
1253
+
1254
+ /**
1255
+ * Returns the mobile token for the provided country calling code if it has
1256
+ * one, otherwise returns an empty string. A mobile token is a number inserted
1257
+ * before the area code when dialing a mobile number from that country from
1258
+ * abroad.
1259
+ *
1260
+ * @param {number} countryCallingCode the country calling code for which we
1261
+ * want the mobile token.
1262
+ * @return {string} the mobile token for the given country calling code.
1263
+ */
1264
+ i18n.phonenumbers.PhoneNumberUtil.getCountryMobileToken =
1265
+ function(countryCallingCode) {
1266
+ return i18n.phonenumbers.PhoneNumberUtil.MOBILE_TOKEN_MAPPINGS_[
1267
+ countryCallingCode] || '';
1268
+ };
1269
+
1270
+
1271
+ /**
1272
+ * Convenience method to get a list of what regions the library has metadata
1273
+ * for.
1274
+ * @return {!Array.<string>} region codes supported by the library.
1275
+ */
1276
+ i18n.phonenumbers.PhoneNumberUtil.prototype.getSupportedRegions = function() {
1277
+ return goog.array.filter(
1278
+ Object.keys(i18n.phonenumbers.metadata.countryToMetadata),
1279
+ function(regionCode) {
1280
+ return isNaN(regionCode);
1281
+ });
1282
+ };
1283
+
1284
+
1285
+ /**
1286
+ * Convenience method to get a list of what global network calling codes the
1287
+ * library has metadata for.
1288
+ * @return {!Array.<number>} global network calling codes supported by the
1289
+ * library.
1290
+ */
1291
+ i18n.phonenumbers.PhoneNumberUtil.prototype.
1292
+ getSupportedGlobalNetworkCallingCodes = function() {
1293
+ var callingCodesAsStrings = goog.array.filter(
1294
+ Object.keys(i18n.phonenumbers.metadata.countryToMetadata),
1295
+ function(regionCode) {
1296
+ return !isNaN(regionCode);
1297
+ });
1298
+ return goog.array.map(callingCodesAsStrings,
1299
+ function(callingCode) {
1300
+ return parseInt(callingCode, 10);
1301
+ });
1302
+ };
1303
+
1304
+
1305
+ /**
1306
+ * Normalizes a string of characters representing a phone number by replacing
1307
+ * all characters found in the accompanying map with the values therein, and
1308
+ * stripping all other characters if removeNonMatches is true.
1309
+ *
1310
+ * @param {string} number a string of characters representing a phone number.
1311
+ * @param {!Object.<string, string>} normalizationReplacements a mapping of
1312
+ * characters to what they should be replaced by in the normalized version
1313
+ * of the phone number.
1314
+ * @param {boolean} removeNonMatches indicates whether characters that are not
1315
+ * able to be replaced should be stripped from the number. If this is false,
1316
+ * they will be left unchanged in the number.
1317
+ * @return {string} the normalized string version of the phone number.
1318
+ * @private
1319
+ */
1320
+ i18n.phonenumbers.PhoneNumberUtil.normalizeHelper_ =
1321
+ function(number, normalizationReplacements, removeNonMatches) {
1322
+
1323
+ /** @type {!goog.string.StringBuffer} */
1324
+ var normalizedNumber = new goog.string.StringBuffer();
1325
+ /** @type {string} */
1326
+ var character;
1327
+ /** @type {string} */
1328
+ var newDigit;
1329
+ /** @type {number} */
1330
+ var numberLength = number.length;
1331
+ for (var i = 0; i < numberLength; ++i) {
1332
+ character = number.charAt(i);
1333
+ newDigit = normalizationReplacements[character.toUpperCase()];
1334
+ if (newDigit != null) {
1335
+ normalizedNumber.append(newDigit);
1336
+ } else if (!removeNonMatches) {
1337
+ normalizedNumber.append(character);
1338
+ }
1339
+ // If neither of the above are true, we remove this character.
1340
+ }
1341
+ return normalizedNumber.toString();
1342
+ };
1343
+
1344
+
1345
+ /**
1346
+ * Helper function to check if the national prefix formatting rule has the first
1347
+ * group only, i.e., does not start with the national prefix.
1348
+ *
1349
+ * @param {string} nationalPrefixFormattingRule The formatting rule for the
1350
+ * national prefix.
1351
+ * @return {boolean} true if the national prefix formatting rule has the first
1352
+ * group only.
1353
+ */
1354
+ i18n.phonenumbers.PhoneNumberUtil.prototype.formattingRuleHasFirstGroupOnly =
1355
+ function(nationalPrefixFormattingRule) {
1356
+ return nationalPrefixFormattingRule.length == 0 ||
1357
+ i18n.phonenumbers.PhoneNumberUtil.FIRST_GROUP_ONLY_PREFIX_PATTERN_.
1358
+ test(nationalPrefixFormattingRule);
1359
+ };
1360
+
1361
+
1362
+ /**
1363
+ * Tests whether a phone number has a geographical association. It checks if
1364
+ * the number is associated to a certain region in the country where it belongs
1365
+ * to. Note that this doesn't verify if the number is actually in use.
1366
+ *
1367
+ * @param {i18n.phonenumbers.PhoneNumber} phoneNumber The phone number to test.
1368
+ * @return {boolean} true if the phone number has a geographical association.
1369
+ */
1370
+ i18n.phonenumbers.PhoneNumberUtil.prototype.isNumberGeographical =
1371
+ function(phoneNumber) {
1372
+ /** @type {i18n.phonenumbers.PhoneNumberType} */
1373
+ var numberType = this.getNumberType(phoneNumber);
1374
+ // TODO: Include mobile phone numbers from countries like Indonesia, which
1375
+ // has some mobile numbers that are geographical.
1376
+ return numberType == i18n.phonenumbers.PhoneNumberType.FIXED_LINE ||
1377
+ numberType == i18n.phonenumbers.PhoneNumberType.FIXED_LINE_OR_MOBILE;
1378
+ };
1379
+
1380
+
1381
+ /**
1382
+ * Helper function to check region code is not unknown or null.
1383
+ *
1384
+ * @param {?string} regionCode the ISO 3166-1 two-letter region code.
1385
+ * @return {boolean} true if region code is valid.
1386
+ * @private
1387
+ */
1388
+ i18n.phonenumbers.PhoneNumberUtil.prototype.isValidRegionCode_ =
1389
+ function(regionCode) {
1390
+
1391
+ // In Java we check whether the regionCode is contained in supportedRegions
1392
+ // that is built out of all the values of countryCallingCodeToRegionCodeMap
1393
+ // (countryCodeToRegionCodeMap in JS) minus REGION_CODE_FOR_NON_GEO_ENTITY.
1394
+ // In JS we check whether the regionCode is contained in the keys of
1395
+ // countryToMetadata but since for non-geographical country calling codes
1396
+ // (e.g. +800) we use the country calling codes instead of the region code as
1397
+ // key in the map we have to make sure regionCode is not a number to prevent
1398
+ // returning true for non-geographical country calling codes.
1399
+ return regionCode != null &&
1400
+ isNaN(regionCode) &&
1401
+ regionCode.toUpperCase() in i18n.phonenumbers.metadata.countryToMetadata;
1402
+ };
1403
+
1404
+
1405
+ /**
1406
+ * Helper function to check the country calling code is valid.
1407
+ *
1408
+ * @param {number} countryCallingCode the country calling code.
1409
+ * @return {boolean} true if country calling code code is valid.
1410
+ * @private
1411
+ */
1412
+ i18n.phonenumbers.PhoneNumberUtil.prototype.hasValidCountryCallingCode_ =
1413
+ function(countryCallingCode) {
1414
+
1415
+ return countryCallingCode in
1416
+ i18n.phonenumbers.metadata.countryCodeToRegionCodeMap;
1417
+ };
1418
+
1419
+
1420
+ /**
1421
+ * Formats a phone number in the specified format using default rules. Note that
1422
+ * this does not promise to produce a phone number that the user can dial from
1423
+ * where they are - although we do format in either 'national' or
1424
+ * 'international' format depending on what the client asks for, we do not
1425
+ * currently support a more abbreviated format, such as for users in the same
1426
+ * 'area' who could potentially dial the number without area code. Note that if
1427
+ * the phone number has a country calling code of 0 or an otherwise invalid
1428
+ * country calling code, we cannot work out which formatting rules to apply so
1429
+ * we return the national significant number with no formatting applied.
1430
+ *
1431
+ * @param {i18n.phonenumbers.PhoneNumber} number the phone number to be
1432
+ * formatted.
1433
+ * @param {i18n.phonenumbers.PhoneNumberFormat} numberFormat the format the
1434
+ * phone number should be formatted into.
1435
+ * @return {string} the formatted phone number.
1436
+ */
1437
+ i18n.phonenumbers.PhoneNumberUtil.prototype.format =
1438
+ function(number, numberFormat) {
1439
+
1440
+ if (number.getNationalNumber() == 0 && number.hasRawInput()) {
1441
+ // Unparseable numbers that kept their raw input just use that.
1442
+ // This is the only case where a number can be formatted as E164 without a
1443
+ // leading '+' symbol (but the original number wasn't parseable anyway).
1444
+ // TODO: Consider removing the 'if' above so that unparseable strings
1445
+ // without raw input format to the empty string instead of "+00"
1446
+ /** @type {string} */
1447
+ var rawInput = number.getRawInputOrDefault();
1448
+ if (rawInput.length > 0) {
1449
+ return rawInput;
1450
+ }
1451
+ }
1452
+ /** @type {number} */
1453
+ var countryCallingCode = number.getCountryCodeOrDefault();
1454
+ /** @type {string} */
1455
+ var nationalSignificantNumber = this.getNationalSignificantNumber(number);
1456
+ if (numberFormat == i18n.phonenumbers.PhoneNumberFormat.E164) {
1457
+ // Early exit for E164 case (even if the country calling code is invalid)
1458
+ // since no formatting of the national number needs to be applied.
1459
+ // Extensions are not formatted.
1460
+ return this.prefixNumberWithCountryCallingCode_(
1461
+ countryCallingCode, i18n.phonenumbers.PhoneNumberFormat.E164,
1462
+ nationalSignificantNumber, '');
1463
+ }
1464
+ if (!this.hasValidCountryCallingCode_(countryCallingCode)) {
1465
+ return nationalSignificantNumber;
1466
+ }
1467
+ // Note getRegionCodeForCountryCode() is used because formatting information
1468
+ // for regions which share a country calling code is contained by only one
1469
+ // region for performance reasons. For example, for NANPA regions it will be
1470
+ // contained in the metadata for US.
1471
+ /** @type {string} */
1472
+ var regionCode = this.getRegionCodeForCountryCode(countryCallingCode);
1473
+
1474
+ // Metadata cannot be null because the country calling code is valid (which
1475
+ // means that the region code cannot be ZZ and must be one of our supported
1476
+ // region codes).
1477
+ /** @type {i18n.phonenumbers.PhoneMetadata} */
1478
+ var metadata =
1479
+ this.getMetadataForRegionOrCallingCode_(countryCallingCode, regionCode);
1480
+ /** @type {string} */
1481
+ var formattedExtension =
1482
+ this.maybeGetFormattedExtension_(number, metadata, numberFormat);
1483
+ /** @type {string} */
1484
+ var formattedNationalNumber =
1485
+ this.formatNsn_(nationalSignificantNumber, metadata, numberFormat);
1486
+ return this.prefixNumberWithCountryCallingCode_(countryCallingCode,
1487
+ numberFormat,
1488
+ formattedNationalNumber,
1489
+ formattedExtension);
1490
+ };
1491
+
1492
+
1493
+ /**
1494
+ * Formats a phone number in the specified format using client-defined
1495
+ * formatting rules. Note that if the phone number has a country calling code of
1496
+ * zero or an otherwise invalid country calling code, we cannot work out things
1497
+ * like whether there should be a national prefix applied, or how to format
1498
+ * extensions, so we return the national significant number with no formatting
1499
+ * applied.
1500
+ *
1501
+ * @param {i18n.phonenumbers.PhoneNumber} number the phone number to be
1502
+ * formatted.
1503
+ * @param {i18n.phonenumbers.PhoneNumberFormat} numberFormat the format the
1504
+ * phone number should be formatted into.
1505
+ * @param {Array.<i18n.phonenumbers.NumberFormat>} userDefinedFormats formatting
1506
+ * rules specified by clients.
1507
+ * @return {string} the formatted phone number.
1508
+ */
1509
+ i18n.phonenumbers.PhoneNumberUtil.prototype.formatByPattern =
1510
+ function(number, numberFormat, userDefinedFormats) {
1511
+
1512
+ /** @type {number} */
1513
+ var countryCallingCode = number.getCountryCodeOrDefault();
1514
+ /** @type {string} */
1515
+ var nationalSignificantNumber = this.getNationalSignificantNumber(number);
1516
+ if (!this.hasValidCountryCallingCode_(countryCallingCode)) {
1517
+ return nationalSignificantNumber;
1518
+ }
1519
+ // Note getRegionCodeForCountryCode() is used because formatting information
1520
+ // for regions which share a country calling code is contained by only one
1521
+ // region for performance reasons. For example, for NANPA regions it will be
1522
+ // contained in the metadata for US.
1523
+ /** @type {string} */
1524
+ var regionCode = this.getRegionCodeForCountryCode(countryCallingCode);
1525
+ // Metadata cannot be null because the country calling code is valid
1526
+ /** @type {i18n.phonenumbers.PhoneMetadata} */
1527
+ var metadata =
1528
+ this.getMetadataForRegionOrCallingCode_(countryCallingCode, regionCode);
1529
+
1530
+ /** @type {string} */
1531
+ var formattedNumber = '';
1532
+
1533
+ /** @type {i18n.phonenumbers.NumberFormat} */
1534
+ var formattingPattern = this.chooseFormattingPatternForNumber_(
1535
+ userDefinedFormats, nationalSignificantNumber);
1536
+ if (formattingPattern == null) {
1537
+ // If no pattern above is matched, we format the number as a whole.
1538
+ formattedNumber = nationalSignificantNumber;
1539
+ } else {
1540
+ // Before we do a replacement of the national prefix pattern $NP with the
1541
+ // national prefix, we need to copy the rule so that subsequent replacements
1542
+ // for different numbers have the appropriate national prefix.
1543
+ /** @type {i18n.phonenumbers.NumberFormat} */
1544
+ var numFormatCopy = formattingPattern.clone();
1545
+ /** @type {string} */
1546
+ var nationalPrefixFormattingRule =
1547
+ formattingPattern.getNationalPrefixFormattingRuleOrDefault();
1548
+ if (nationalPrefixFormattingRule.length > 0) {
1549
+ /** @type {string} */
1550
+ var nationalPrefix = metadata.getNationalPrefixOrDefault();
1551
+ if (nationalPrefix.length > 0) {
1552
+ // Replace $NP with national prefix and $FG with the first group ($1).
1553
+ nationalPrefixFormattingRule = nationalPrefixFormattingRule
1554
+ .replace(i18n.phonenumbers.PhoneNumberUtil.NP_PATTERN_,
1555
+ nationalPrefix)
1556
+ .replace(i18n.phonenumbers.PhoneNumberUtil.FG_PATTERN_, '$1');
1557
+ numFormatCopy.setNationalPrefixFormattingRule(
1558
+ nationalPrefixFormattingRule);
1559
+ } else {
1560
+ // We don't want to have a rule for how to format the national prefix if
1561
+ // there isn't one.
1562
+ numFormatCopy.clearNationalPrefixFormattingRule();
1563
+ }
1564
+ }
1565
+ formattedNumber = this.formatNsnUsingPattern_(
1566
+ nationalSignificantNumber, numFormatCopy, numberFormat);
1567
+ }
1568
+
1569
+ /** @type {string} */
1570
+ var formattedExtension =
1571
+ this.maybeGetFormattedExtension_(number, metadata, numberFormat);
1572
+ return this.prefixNumberWithCountryCallingCode_(countryCallingCode,
1573
+ numberFormat,
1574
+ formattedNumber,
1575
+ formattedExtension);
1576
+ };
1577
+
1578
+
1579
+ /**
1580
+ * Formats a phone number in national format for dialing using the carrier as
1581
+ * specified in the {@code carrierCode}. The {@code carrierCode} will always be
1582
+ * used regardless of whether the phone number already has a preferred domestic
1583
+ * carrier code stored. If {@code carrierCode} contains an empty string, returns
1584
+ * the number in national format without any carrier code.
1585
+ *
1586
+ * @param {i18n.phonenumbers.PhoneNumber} number the phone number to be
1587
+ * formatted.
1588
+ * @param {string} carrierCode the carrier selection code to be used.
1589
+ * @return {string} the formatted phone number in national format for dialing
1590
+ * using the carrier as specified in the {@code carrierCode}.
1591
+ */
1592
+ i18n.phonenumbers.PhoneNumberUtil.prototype.
1593
+ formatNationalNumberWithCarrierCode = function(number, carrierCode) {
1594
+
1595
+ /** @type {number} */
1596
+ var countryCallingCode = number.getCountryCodeOrDefault();
1597
+ /** @type {string} */
1598
+ var nationalSignificantNumber = this.getNationalSignificantNumber(number);
1599
+ if (!this.hasValidCountryCallingCode_(countryCallingCode)) {
1600
+ return nationalSignificantNumber;
1601
+ }
1602
+
1603
+ // Note getRegionCodeForCountryCode() is used because formatting information
1604
+ // for regions which share a country calling code is contained by only one
1605
+ // region for performance reasons. For example, for NANPA regions it will be
1606
+ // contained in the metadata for US.
1607
+ /** @type {string} */
1608
+ var regionCode = this.getRegionCodeForCountryCode(countryCallingCode);
1609
+ // Metadata cannot be null because the country calling code is valid.
1610
+ /** @type {i18n.phonenumbers.PhoneMetadata} */
1611
+ var metadata =
1612
+ this.getMetadataForRegionOrCallingCode_(countryCallingCode, regionCode);
1613
+ /** @type {string} */
1614
+ var formattedExtension = this.maybeGetFormattedExtension_(
1615
+ number, metadata, i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
1616
+ /** @type {string} */
1617
+ var formattedNationalNumber = this.formatNsn_(
1618
+ nationalSignificantNumber, metadata,
1619
+ i18n.phonenumbers.PhoneNumberFormat.NATIONAL, carrierCode);
1620
+ return this.prefixNumberWithCountryCallingCode_(
1621
+ countryCallingCode, i18n.phonenumbers.PhoneNumberFormat.NATIONAL,
1622
+ formattedNationalNumber, formattedExtension);
1623
+ };
1624
+
1625
+
1626
+ /**
1627
+ * @param {number} countryCallingCode
1628
+ * @param {?string} regionCode
1629
+ * @return {i18n.phonenumbers.PhoneMetadata}
1630
+ * @private
1631
+ */
1632
+ i18n.phonenumbers.PhoneNumberUtil.prototype.getMetadataForRegionOrCallingCode_ =
1633
+ function(countryCallingCode, regionCode) {
1634
+ return i18n.phonenumbers.PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY ==
1635
+ regionCode ?
1636
+ this.getMetadataForNonGeographicalRegion(countryCallingCode) :
1637
+ this.getMetadataForRegion(regionCode);
1638
+ };
1639
+
1640
+
1641
+ /**
1642
+ * Formats a phone number in national format for dialing using the carrier as
1643
+ * specified in the preferred_domestic_carrier_code field of the PhoneNumber
1644
+ * object passed in. If that is missing, use the {@code fallbackCarrierCode}
1645
+ * passed in instead. If there is no {@code preferred_domestic_carrier_code},
1646
+ * and the {@code fallbackCarrierCode} contains an empty string, return the
1647
+ * number in national format without any carrier code.
1648
+ *
1649
+ * <p>Use {@link #formatNationalNumberWithCarrierCode} instead if the carrier
1650
+ * code passed in should take precedence over the number's
1651
+ * {@code preferred_domestic_carrier_code} when formatting.
1652
+ *
1653
+ * @param {i18n.phonenumbers.PhoneNumber} number the phone number to be
1654
+ * formatted.
1655
+ * @param {string} fallbackCarrierCode the carrier selection code to be used, if
1656
+ * none is found in the phone number itself.
1657
+ * @return {string} the formatted phone number in national format for dialing
1658
+ * using the number's preferred_domestic_carrier_code, or the
1659
+ * {@code fallbackCarrierCode} passed in if none is found.
1660
+ */
1661
+ i18n.phonenumbers.PhoneNumberUtil.prototype.
1662
+ formatNationalNumberWithPreferredCarrierCode = function(
1663
+ number, fallbackCarrierCode) {
1664
+ return this.formatNationalNumberWithCarrierCode(
1665
+ number,
1666
+ number.hasPreferredDomesticCarrierCode() ?
1667
+ number.getPreferredDomesticCarrierCodeOrDefault() :
1668
+ fallbackCarrierCode);
1669
+ };
1670
+
1671
+
1672
+ /**
1673
+ * Returns a number formatted in such a way that it can be dialed from a mobile
1674
+ * phone in a specific region. If the number cannot be reached from the region
1675
+ * (e.g. some countries block toll-free numbers from being called outside of the
1676
+ * country), the method returns an empty string.
1677
+ *
1678
+ * @param {i18n.phonenumbers.PhoneNumber} number the phone number to be
1679
+ * formatted.
1680
+ * @param {string} regionCallingFrom the region where the call is being placed.
1681
+ * @param {boolean} withFormatting whether the number should be returned with
1682
+ * formatting symbols, such as spaces and dashes.
1683
+ * @return {string} the formatted phone number.
1684
+ */
1685
+ i18n.phonenumbers.PhoneNumberUtil.prototype.formatNumberForMobileDialing =
1686
+ function(number, regionCallingFrom, withFormatting) {
1687
+
1688
+ /** @type {number} */
1689
+ var countryCallingCode = number.getCountryCodeOrDefault();
1690
+ if (!this.hasValidCountryCallingCode_(countryCallingCode)) {
1691
+ return number.hasRawInput() ? number.getRawInputOrDefault() : '';
1692
+ }
1693
+
1694
+ /** @type {string} */
1695
+ var formattedNumber = '';
1696
+ // Clear the extension, as that part cannot normally be dialed together with
1697
+ // the main number.
1698
+ /** @type {i18n.phonenumbers.PhoneNumber} */
1699
+ var numberNoExt = number.clone();
1700
+ numberNoExt.clearExtension();
1701
+ /** @type {string} */
1702
+ var regionCode = this.getRegionCodeForCountryCode(countryCallingCode);
1703
+ /** @type {i18n.phonenumbers.PhoneNumberType} */
1704
+ var numberType = this.getNumberType(numberNoExt);
1705
+ /** @type {boolean} */
1706
+ var isValidNumber = (numberType != i18n.phonenumbers.PhoneNumberType.UNKNOWN);
1707
+ if (regionCallingFrom == regionCode) {
1708
+ /** @type {boolean} */
1709
+ var isFixedLineOrMobile =
1710
+ (numberType == i18n.phonenumbers.PhoneNumberType.FIXED_LINE) ||
1711
+ (numberType == i18n.phonenumbers.PhoneNumberType.MOBILE) ||
1712
+ (numberType == i18n.phonenumbers.PhoneNumberType.FIXED_LINE_OR_MOBILE);
1713
+ // Carrier codes may be needed in some countries. We handle this here.
1714
+ if (regionCode == 'CO' &&
1715
+ numberType == i18n.phonenumbers.PhoneNumberType.FIXED_LINE) {
1716
+ formattedNumber = this.formatNationalNumberWithCarrierCode(
1717
+ numberNoExt,
1718
+ i18n.phonenumbers.PhoneNumberUtil
1719
+ .COLOMBIA_MOBILE_TO_FIXED_LINE_PREFIX_);
1720
+ } else if (regionCode == 'BR' && isFixedLineOrMobile) {
1721
+ formattedNumber = numberNoExt.hasPreferredDomesticCarrierCode() ?
1722
+ this.formatNationalNumberWithPreferredCarrierCode(numberNoExt, '') :
1723
+ // Brazilian fixed line and mobile numbers need to be dialed with a
1724
+ // carrier code when called within Brazil. Without that, most of the
1725
+ // carriers won't connect the call. Because of that, we return an
1726
+ // empty string here.
1727
+ '';
1728
+ } else if (isValidNumber && regionCode == 'HU') {
1729
+ // The national format for HU numbers doesn't contain the national prefix,
1730
+ // because that is how numbers are normally written down. However, the
1731
+ // national prefix is obligatory when dialing from a mobile phone. As a
1732
+ // result, we add it back here if it is a valid regular length phone
1733
+ // number.
1734
+ formattedNumber =
1735
+ this.getNddPrefixForRegion(regionCode, true /* strip non-digits */) +
1736
+ ' ' + this.format(numberNoExt,
1737
+ i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
1738
+ } else if (countryCallingCode ==
1739
+ i18n.phonenumbers.PhoneNumberUtil.NANPA_COUNTRY_CODE_) {
1740
+ // For NANPA countries, we output international format for numbers that
1741
+ // can be dialed internationally, since that always works, except for
1742
+ // numbers which might potentially be short numbers, which are always
1743
+ // dialled in national format.
1744
+ /** @type {i18n.phonenumbers.PhoneMetadata} */
1745
+ var regionMetadata = this.getMetadataForRegion(regionCallingFrom);
1746
+ if (this.canBeInternationallyDialled(numberNoExt) &&
1747
+ !this.isShorterThanPossibleNormalNumber_(
1748
+ regionMetadata, this.getNationalSignificantNumber(numberNoExt))) {
1749
+ formattedNumber = this.format(
1750
+ numberNoExt, i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL);
1751
+ } else {
1752
+ formattedNumber = this.format(
1753
+ numberNoExt, i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
1754
+ }
1755
+ } else {
1756
+ // For non-geographical countries, Mexican and Chilean fixed line and
1757
+ // mobile numbers, we output international format for numbers that can be
1758
+ // dialed internationally, as that always works.
1759
+ if ((regionCode ==
1760
+ i18n.phonenumbers.PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY ||
1761
+ // MX fixed line and mobile numbers should always be formatted in
1762
+ // international format, even when dialed within MX. For national
1763
+ // format to work, a carrier code needs to be used, and the correct
1764
+ // carrier code depends on if the caller and callee are from the
1765
+ // same local area. It is trickier to get that to work correctly than
1766
+ // using international format, which is tested to work fine on all
1767
+ // carriers.
1768
+ // CL fixed line numbers need the national prefix when dialing in the
1769
+ // national format, but don't have it when used for display. The
1770
+ // reverse is true for mobile numbers. As a result, we output them in
1771
+ // the international format to make it work.
1772
+ ((regionCode == 'MX' || regionCode == 'CL') &&
1773
+ isFixedLineOrMobile)) &&
1774
+ this.canBeInternationallyDialled(numberNoExt)) {
1775
+ formattedNumber = this.format(
1776
+ numberNoExt, i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL);
1777
+ } else {
1778
+ formattedNumber = this.format(
1779
+ numberNoExt, i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
1780
+ }
1781
+ }
1782
+ } else if (isValidNumber && this.canBeInternationallyDialled(numberNoExt)) {
1783
+ // We assume that short numbers are not diallable from outside their region,
1784
+ // so if a number is not a valid regular length phone number, we treat it as
1785
+ // if it cannot be internationally dialled.
1786
+ return withFormatting ?
1787
+ this.format(numberNoExt,
1788
+ i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL) :
1789
+ this.format(numberNoExt, i18n.phonenumbers.PhoneNumberFormat.E164);
1790
+ }
1791
+ return withFormatting ?
1792
+ formattedNumber :
1793
+ i18n.phonenumbers.PhoneNumberUtil.normalizeHelper_(formattedNumber,
1794
+ i18n.phonenumbers.PhoneNumberUtil.DIALLABLE_CHAR_MAPPINGS_, true);
1795
+ };
1796
+
1797
+
1798
+ /**
1799
+ * Formats a phone number for out-of-country dialing purposes. If no
1800
+ * regionCallingFrom is supplied, we format the number in its INTERNATIONAL
1801
+ * format. If the country calling code is the same as that of the region where
1802
+ * the number is from, then NATIONAL formatting will be applied.
1803
+ *
1804
+ * <p>If the number itself has a country calling code of zero or an otherwise
1805
+ * invalid country calling code, then we return the number with no formatting
1806
+ * applied.
1807
+ *
1808
+ * <p>Note this function takes care of the case for calling inside of NANPA and
1809
+ * between Russia and Kazakhstan (who share the same country calling code). In
1810
+ * those cases, no international prefix is used. For regions which have multiple
1811
+ * international prefixes, the number in its INTERNATIONAL format will be
1812
+ * returned instead.
1813
+ *
1814
+ * @param {i18n.phonenumbers.PhoneNumber} number the phone number to be
1815
+ * formatted.
1816
+ * @param {string} regionCallingFrom the region where the call is being placed.
1817
+ * @return {string} the formatted phone number.
1818
+ */
1819
+ i18n.phonenumbers.PhoneNumberUtil.prototype.formatOutOfCountryCallingNumber =
1820
+ function(number, regionCallingFrom) {
1821
+
1822
+ if (!this.isValidRegionCode_(regionCallingFrom)) {
1823
+ return this.format(number,
1824
+ i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL);
1825
+ }
1826
+ /** @type {number} */
1827
+ var countryCallingCode = number.getCountryCodeOrDefault();
1828
+ /** @type {string} */
1829
+ var nationalSignificantNumber = this.getNationalSignificantNumber(number);
1830
+ if (!this.hasValidCountryCallingCode_(countryCallingCode)) {
1831
+ return nationalSignificantNumber;
1832
+ }
1833
+ if (countryCallingCode ==
1834
+ i18n.phonenumbers.PhoneNumberUtil.NANPA_COUNTRY_CODE_) {
1835
+ if (this.isNANPACountry(regionCallingFrom)) {
1836
+ // For NANPA regions, return the national format for these regions but
1837
+ // prefix it with the country calling code.
1838
+ return countryCallingCode + ' ' +
1839
+ this.format(number, i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
1840
+ }
1841
+ } else if (countryCallingCode ==
1842
+ this.getCountryCodeForValidRegion_(regionCallingFrom)) {
1843
+ // If regions share a country calling code, the country calling code need
1844
+ // not be dialled. This also applies when dialling within a region, so this
1845
+ // if clause covers both these cases. Technically this is the case for
1846
+ // dialling from La Reunion to other overseas departments of France (French
1847
+ // Guiana, Martinique, Guadeloupe), but not vice versa - so we don't cover
1848
+ // this edge case for now and for those cases return the version including
1849
+ // country calling code. Details here:
1850
+ // http://www.petitfute.com/voyage/225-info-pratiques-reunion
1851
+ return this.format(number,
1852
+ i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
1853
+ }
1854
+ // Metadata cannot be null because we checked 'isValidRegionCode()' above.
1855
+ /** @type {i18n.phonenumbers.PhoneMetadata} */
1856
+ var metadataForRegionCallingFrom =
1857
+ this.getMetadataForRegion(regionCallingFrom);
1858
+ /** @type {string} */
1859
+ var internationalPrefix =
1860
+ metadataForRegionCallingFrom.getInternationalPrefixOrDefault();
1861
+
1862
+ // For regions that have multiple international prefixes, the international
1863
+ // format of the number is returned, unless there is a preferred international
1864
+ // prefix.
1865
+ /** @type {string} */
1866
+ var internationalPrefixForFormatting = '';
1867
+ if (i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_(
1868
+ i18n.phonenumbers.PhoneNumberUtil.UNIQUE_INTERNATIONAL_PREFIX_,
1869
+ internationalPrefix)) {
1870
+ internationalPrefixForFormatting = internationalPrefix;
1871
+ } else if (metadataForRegionCallingFrom.hasPreferredInternationalPrefix()) {
1872
+ internationalPrefixForFormatting =
1873
+ metadataForRegionCallingFrom.getPreferredInternationalPrefixOrDefault();
1874
+ }
1875
+
1876
+ /** @type {string} */
1877
+ var regionCode = this.getRegionCodeForCountryCode(countryCallingCode);
1878
+ // Metadata cannot be null because the country calling code is valid.
1879
+ /** @type {i18n.phonenumbers.PhoneMetadata} */
1880
+ var metadataForRegion =
1881
+ this.getMetadataForRegionOrCallingCode_(countryCallingCode, regionCode);
1882
+ /** @type {string} */
1883
+ var formattedNationalNumber = this.formatNsn_(
1884
+ nationalSignificantNumber, metadataForRegion,
1885
+ i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL);
1886
+ /** @type {string} */
1887
+ var formattedExtension = this.maybeGetFormattedExtension_(number,
1888
+ metadataForRegion, i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL);
1889
+ return internationalPrefixForFormatting.length > 0 ?
1890
+ internationalPrefixForFormatting + ' ' + countryCallingCode + ' ' +
1891
+ formattedNationalNumber + formattedExtension :
1892
+ this.prefixNumberWithCountryCallingCode_(
1893
+ countryCallingCode, i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL,
1894
+ formattedNationalNumber, formattedExtension);
1895
+ };
1896
+
1897
+
1898
+ /**
1899
+ * Formats a phone number using the original phone number format that the number
1900
+ * is parsed from. The original format is embedded in the country_code_source
1901
+ * field of the PhoneNumber object passed in. If such information is missing,
1902
+ * the number will be formatted into the NATIONAL format by default. When the
1903
+ * number contains a leading zero and this is unexpected for this country, or we
1904
+ * don't have a formatting pattern for the number, the method returns the raw
1905
+ * input when it is available.
1906
+ *
1907
+ * Note this method guarantees no digit will be inserted, removed or modified as
1908
+ * a result of formatting.
1909
+ *
1910
+ * @param {i18n.phonenumbers.PhoneNumber} number the phone number that needs to
1911
+ * be formatted in its original number format.
1912
+ * @param {string} regionCallingFrom the region whose IDD needs to be prefixed
1913
+ * if the original number has one.
1914
+ * @return {string} the formatted phone number in its original number format.
1915
+ */
1916
+ i18n.phonenumbers.PhoneNumberUtil.prototype.formatInOriginalFormat =
1917
+ function(number, regionCallingFrom) {
1918
+
1919
+ if (number.hasRawInput() &&
1920
+ (this.hasUnexpectedItalianLeadingZero_(number) ||
1921
+ !this.hasFormattingPatternForNumber_(number))) {
1922
+ // We check if we have the formatting pattern because without that, we might
1923
+ // format the number as a group without national prefix.
1924
+ return number.getRawInputOrDefault();
1925
+ }
1926
+ if (!number.hasCountryCodeSource()) {
1927
+ return this.format(number, i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
1928
+ }
1929
+ /** @type {string} */
1930
+ var formattedNumber;
1931
+ switch (number.getCountryCodeSource()) {
1932
+ case i18n.phonenumbers.PhoneNumber.CountryCodeSource
1933
+ .FROM_NUMBER_WITH_PLUS_SIGN:
1934
+ formattedNumber = this.format(number,
1935
+ i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL);
1936
+ break;
1937
+ case i18n.phonenumbers.PhoneNumber.CountryCodeSource.FROM_NUMBER_WITH_IDD:
1938
+ formattedNumber =
1939
+ this.formatOutOfCountryCallingNumber(number, regionCallingFrom);
1940
+ break;
1941
+ case i18n.phonenumbers.PhoneNumber.CountryCodeSource
1942
+ .FROM_NUMBER_WITHOUT_PLUS_SIGN:
1943
+ formattedNumber = this.format(number,
1944
+ i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL).substring(1);
1945
+ break;
1946
+ case i18n.phonenumbers.PhoneNumber.CountryCodeSource.FROM_DEFAULT_COUNTRY:
1947
+ // Fall-through to default case.
1948
+ default:
1949
+ /** @type {string} */
1950
+ var regionCode =
1951
+ this.getRegionCodeForCountryCode(number.getCountryCodeOrDefault());
1952
+ // We strip non-digits from the NDD here, and from the raw input later,
1953
+ // so that we can compare them easily.
1954
+ /** @type {?string} */
1955
+ var nationalPrefix = this.getNddPrefixForRegion(regionCode, true);
1956
+ /** @type {string} */
1957
+ var nationalFormat =
1958
+ this.format(number, i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
1959
+ if (nationalPrefix == null || nationalPrefix.length == 0) {
1960
+ // If the region doesn't have a national prefix at all, we can safely
1961
+ // return the national format without worrying about a national prefix
1962
+ // being added.
1963
+ formattedNumber = nationalFormat;
1964
+ break;
1965
+ }
1966
+ // Otherwise, we check if the original number was entered with a national
1967
+ // prefix.
1968
+ if (this.rawInputContainsNationalPrefix_(
1969
+ number.getRawInputOrDefault(), nationalPrefix, regionCode)) {
1970
+ // If so, we can safely return the national format.
1971
+ formattedNumber = nationalFormat;
1972
+ break;
1973
+ }
1974
+ // Metadata cannot be null here because getNddPrefixForRegion() (above)
1975
+ // returns null if there is no metadata for the region.
1976
+ /** @type {i18n.phonenumbers.PhoneMetadata} */
1977
+ var metadata = this.getMetadataForRegion(regionCode);
1978
+ /** @type {string} */
1979
+ var nationalNumber = this.getNationalSignificantNumber(number);
1980
+ /** @type {i18n.phonenumbers.NumberFormat} */
1981
+ var formatRule = this.chooseFormattingPatternForNumber_(
1982
+ metadata.numberFormatArray(), nationalNumber);
1983
+ // The format rule could still be null here if the national number was 0
1984
+ // and there was no raw input (this should not be possible for numbers
1985
+ // generated by the phonenumber library as they would also not have a
1986
+ // country calling code and we would have exited earlier).
1987
+ if (formatRule == null) {
1988
+ formattedNumber = nationalFormat;
1989
+ break;
1990
+ }
1991
+ // When the format we apply to this number doesn't contain national
1992
+ // prefix, we can just return the national format.
1993
+ // TODO: Refactor the code below with the code in
1994
+ // isNationalPrefixPresentIfRequired.
1995
+ /** @type {string} */
1996
+ var candidateNationalPrefixRule =
1997
+ formatRule.getNationalPrefixFormattingRuleOrDefault();
1998
+ // We assume that the first-group symbol will never be _before_ the
1999
+ // national prefix.
2000
+ /** @type {number} */
2001
+ var indexOfFirstGroup = candidateNationalPrefixRule.indexOf('$1');
2002
+ if (indexOfFirstGroup <= 0) {
2003
+ formattedNumber = nationalFormat;
2004
+ break;
2005
+ }
2006
+ candidateNationalPrefixRule =
2007
+ candidateNationalPrefixRule.substring(0, indexOfFirstGroup);
2008
+ candidateNationalPrefixRule = i18n.phonenumbers.PhoneNumberUtil
2009
+ .normalizeDigitsOnly(candidateNationalPrefixRule);
2010
+ if (candidateNationalPrefixRule.length == 0) {
2011
+ // National prefix not used when formatting this number.
2012
+ formattedNumber = nationalFormat;
2013
+ break;
2014
+ }
2015
+ // Otherwise, we need to remove the national prefix from our output.
2016
+ /** @type {i18n.phonenumbers.NumberFormat} */
2017
+ var numFormatCopy = formatRule.clone();
2018
+ numFormatCopy.clearNationalPrefixFormattingRule();
2019
+ formattedNumber = this.formatByPattern(number,
2020
+ i18n.phonenumbers.PhoneNumberFormat.NATIONAL, [numFormatCopy]);
2021
+ break;
2022
+ }
2023
+ /** @type {string} */
2024
+ var rawInput = number.getRawInputOrDefault();
2025
+ // If no digit is inserted/removed/modified as a result of our formatting, we
2026
+ // return the formatted phone number; otherwise we return the raw input the
2027
+ // user entered.
2028
+ if (formattedNumber != null && rawInput.length > 0) {
2029
+ /** @type {string} */
2030
+ var normalizedFormattedNumber =
2031
+ i18n.phonenumbers.PhoneNumberUtil.normalizeHelper_(formattedNumber,
2032
+ i18n.phonenumbers.PhoneNumberUtil.DIALLABLE_CHAR_MAPPINGS_,
2033
+ true /* remove non matches */);
2034
+ /** @type {string} */
2035
+ var normalizedRawInput =
2036
+ i18n.phonenumbers.PhoneNumberUtil.normalizeHelper_(rawInput,
2037
+ i18n.phonenumbers.PhoneNumberUtil.DIALLABLE_CHAR_MAPPINGS_,
2038
+ true /* remove non matches */);
2039
+ if (normalizedFormattedNumber != normalizedRawInput) {
2040
+ formattedNumber = rawInput;
2041
+ }
2042
+ }
2043
+ return formattedNumber;
2044
+ };
2045
+
2046
+
2047
+ /**
2048
+ * Check if rawInput, which is assumed to be in the national format, has a
2049
+ * national prefix. The national prefix is assumed to be in digits-only form.
2050
+ * @param {string} rawInput
2051
+ * @param {string} nationalPrefix
2052
+ * @param {string} regionCode
2053
+ * @return {boolean}
2054
+ * @private
2055
+ */
2056
+ i18n.phonenumbers.PhoneNumberUtil.prototype.rawInputContainsNationalPrefix_ =
2057
+ function(rawInput, nationalPrefix, regionCode) {
2058
+
2059
+ /** @type {string} */
2060
+ var normalizedNationalNumber =
2061
+ i18n.phonenumbers.PhoneNumberUtil.normalizeDigitsOnly(rawInput);
2062
+ if (goog.string.startsWith(normalizedNationalNumber, nationalPrefix)) {
2063
+ try {
2064
+ // Some Japanese numbers (e.g. 00777123) might be mistaken to contain the
2065
+ // national prefix when written without it (e.g. 0777123) if we just do
2066
+ // prefix matching. To tackle that, we check the validity of the number if
2067
+ // the assumed national prefix is removed (777123 won't be valid in
2068
+ // Japan).
2069
+ return this.isValidNumber(
2070
+ this.parse(normalizedNationalNumber.substring(nationalPrefix.length),
2071
+ regionCode));
2072
+ } catch (e) {
2073
+ return false;
2074
+ }
2075
+ }
2076
+ return false;
2077
+ };
2078
+
2079
+
2080
+ /**
2081
+ * Returns true if a number is from a region whose national significant number
2082
+ * couldn't contain a leading zero, but has the italian_leading_zero field set
2083
+ * to true.
2084
+ * @param {i18n.phonenumbers.PhoneNumber} number
2085
+ * @return {boolean}
2086
+ * @private
2087
+ */
2088
+ i18n.phonenumbers.PhoneNumberUtil.prototype.hasUnexpectedItalianLeadingZero_ =
2089
+ function(number) {
2090
+
2091
+ return number.hasItalianLeadingZero() &&
2092
+ !this.isLeadingZeroPossible(number.getCountryCodeOrDefault());
2093
+ };
2094
+
2095
+
2096
+ /**
2097
+ * @param {i18n.phonenumbers.PhoneNumber} number
2098
+ * @return {boolean}
2099
+ * @private
2100
+ */
2101
+ i18n.phonenumbers.PhoneNumberUtil.prototype.hasFormattingPatternForNumber_ =
2102
+ function(number) {
2103
+
2104
+ /** @type {number} */
2105
+ var countryCallingCode = number.getCountryCodeOrDefault();
2106
+ /** @type {string} */
2107
+ var phoneNumberRegion = this.getRegionCodeForCountryCode(countryCallingCode);
2108
+ /** @type {i18n.phonenumbers.PhoneMetadata} */
2109
+ var metadata = this.getMetadataForRegionOrCallingCode_(
2110
+ countryCallingCode, phoneNumberRegion);
2111
+ if (metadata == null) {
2112
+ return false;
2113
+ }
2114
+ /** @type {string} */
2115
+ var nationalNumber = this.getNationalSignificantNumber(number);
2116
+ /** @type {i18n.phonenumbers.NumberFormat} */
2117
+ var formatRule = this.chooseFormattingPatternForNumber_(
2118
+ metadata.numberFormatArray(), nationalNumber);
2119
+ return formatRule != null;
2120
+ };
2121
+
2122
+
2123
+ /**
2124
+ * Formats a phone number for out-of-country dialing purposes.
2125
+ *
2126
+ * Note that in this version, if the number was entered originally using alpha
2127
+ * characters and this version of the number is stored in raw_input, this
2128
+ * representation of the number will be used rather than the digit
2129
+ * representation. Grouping information, as specified by characters such as '-'
2130
+ * and ' ', will be retained.
2131
+ *
2132
+ * <p><b>Caveats:</b></p>
2133
+ * <ul>
2134
+ * <li>This will not produce good results if the country calling code is both
2135
+ * present in the raw input _and_ is the start of the national number. This is
2136
+ * not a problem in the regions which typically use alpha numbers.
2137
+ * <li>This will also not produce good results if the raw input has any grouping
2138
+ * information within the first three digits of the national number, and if the
2139
+ * function needs to strip preceding digits/words in the raw input before these
2140
+ * digits. Normally people group the first three digits together so this is not
2141
+ * a huge problem - and will be fixed if it proves to be so.
2142
+ * </ul>
2143
+ *
2144
+ * @param {i18n.phonenumbers.PhoneNumber} number the phone number that needs to
2145
+ * be formatted.
2146
+ * @param {string} regionCallingFrom the region where the call is being placed.
2147
+ * @return {string} the formatted phone number.
2148
+ */
2149
+ i18n.phonenumbers.PhoneNumberUtil.prototype.
2150
+ formatOutOfCountryKeepingAlphaChars = function(number, regionCallingFrom) {
2151
+ /** @type {string} */
2152
+ var rawInput = number.getRawInputOrDefault();
2153
+ // If there is no raw input, then we can't keep alpha characters because there
2154
+ // aren't any. In this case, we return formatOutOfCountryCallingNumber.
2155
+ if (rawInput.length == 0) {
2156
+ return this.formatOutOfCountryCallingNumber(number, regionCallingFrom);
2157
+ }
2158
+ /** @type {number} */
2159
+ var countryCode = number.getCountryCodeOrDefault();
2160
+ if (!this.hasValidCountryCallingCode_(countryCode)) {
2161
+ return rawInput;
2162
+ }
2163
+ // Strip any prefix such as country calling code, IDD, that was present. We do
2164
+ // this by comparing the number in raw_input with the parsed number. To do
2165
+ // this, first we normalize punctuation. We retain number grouping symbols
2166
+ // such as ' ' only.
2167
+ rawInput = i18n.phonenumbers.PhoneNumberUtil.normalizeHelper_(
2168
+ rawInput,
2169
+ i18n.phonenumbers.PhoneNumberUtil.ALL_PLUS_NUMBER_GROUPING_SYMBOLS_,
2170
+ true);
2171
+ // Now we trim everything before the first three digits in the parsed number.
2172
+ // We choose three because all valid alpha numbers have 3 digits at the start
2173
+ // - if it does not, then we don't trim anything at all. Similarly, if the
2174
+ // national number was less than three digits, we don't trim anything at all.
2175
+ /** @type {string} */
2176
+ var nationalNumber = this.getNationalSignificantNumber(number);
2177
+ if (nationalNumber.length > 3) {
2178
+ /** @type {number} */
2179
+ var firstNationalNumberDigit =
2180
+ rawInput.indexOf(nationalNumber.substring(0, 3));
2181
+ if (firstNationalNumberDigit != -1) {
2182
+ rawInput = rawInput.substring(firstNationalNumberDigit);
2183
+ }
2184
+ }
2185
+ /** @type {i18n.phonenumbers.PhoneMetadata} */
2186
+ var metadataForRegionCallingFrom =
2187
+ this.getMetadataForRegion(regionCallingFrom);
2188
+ if (countryCode == i18n.phonenumbers.PhoneNumberUtil.NANPA_COUNTRY_CODE_) {
2189
+ if (this.isNANPACountry(regionCallingFrom)) {
2190
+ return countryCode + ' ' + rawInput;
2191
+ }
2192
+ } else if (metadataForRegionCallingFrom != null &&
2193
+ countryCode == this.getCountryCodeForValidRegion_(regionCallingFrom)) {
2194
+ /** @type {i18n.phonenumbers.NumberFormat} */
2195
+ var formattingPattern = this.chooseFormattingPatternForNumber_(
2196
+ metadataForRegionCallingFrom.numberFormatArray(), nationalNumber);
2197
+ if (formattingPattern == null) {
2198
+ // If no pattern above is matched, we format the original input.
2199
+ return rawInput;
2200
+ }
2201
+ /** @type {i18n.phonenumbers.NumberFormat} */
2202
+ var newFormat = formattingPattern.clone();
2203
+ // The first group is the first group of digits that the user wrote
2204
+ // together.
2205
+ newFormat.setPattern('(\\d+)(.*)');
2206
+ // Here we just concatenate them back together after the national prefix
2207
+ // has been fixed.
2208
+ newFormat.setFormat('$1$2');
2209
+ // Now we format using this pattern instead of the default pattern, but
2210
+ // with the national prefix prefixed if necessary.
2211
+ // This will not work in the cases where the pattern (and not the leading
2212
+ // digits) decide whether a national prefix needs to be used, since we have
2213
+ // overridden the pattern to match anything, but that is not the case in the
2214
+ // metadata to date.
2215
+ return this.formatNsnUsingPattern_(rawInput, newFormat,
2216
+ i18n.phonenumbers.PhoneNumberFormat.NATIONAL);
2217
+ }
2218
+ /** @type {string} */
2219
+ var internationalPrefixForFormatting = '';
2220
+ // If an unsupported region-calling-from is entered, or a country with
2221
+ // multiple international prefixes, the international format of the number is
2222
+ // returned, unless there is a preferred international prefix.
2223
+ if (metadataForRegionCallingFrom != null) {
2224
+ /** @type {string} */
2225
+ var internationalPrefix =
2226
+ metadataForRegionCallingFrom.getInternationalPrefixOrDefault();
2227
+ internationalPrefixForFormatting =
2228
+ i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_(
2229
+ i18n.phonenumbers.PhoneNumberUtil.UNIQUE_INTERNATIONAL_PREFIX_,
2230
+ internationalPrefix) ?
2231
+ internationalPrefix :
2232
+ metadataForRegionCallingFrom.getPreferredInternationalPrefixOrDefault();
2233
+ }
2234
+ /** @type {string} */
2235
+ var regionCode = this.getRegionCodeForCountryCode(countryCode);
2236
+ // Metadata cannot be null because the country calling code is valid.
2237
+ /** @type {i18n.phonenumbers.PhoneMetadata} */
2238
+ var metadataForRegion =
2239
+ this.getMetadataForRegionOrCallingCode_(countryCode, regionCode);
2240
+ /** @type {string} */
2241
+ var formattedExtension = this.maybeGetFormattedExtension_(
2242
+ number, metadataForRegion,
2243
+ i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL);
2244
+ if (internationalPrefixForFormatting.length > 0) {
2245
+ return internationalPrefixForFormatting + ' ' + countryCode + ' ' +
2246
+ rawInput + formattedExtension;
2247
+ } else {
2248
+ // Invalid region entered as country-calling-from (so no metadata was found
2249
+ // for it) or the region chosen has multiple international dialling
2250
+ // prefixes.
2251
+ return this.prefixNumberWithCountryCallingCode_(
2252
+ countryCode, i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL,
2253
+ rawInput, formattedExtension);
2254
+ }
2255
+ };
2256
+
2257
+
2258
+ /**
2259
+ * Gets the national significant number of the a phone number. Note a national
2260
+ * significant number doesn't contain a national prefix or any formatting.
2261
+ *
2262
+ * @param {i18n.phonenumbers.PhoneNumber} number the phone number for which the
2263
+ * national significant number is needed.
2264
+ * @return {string} the national significant number of the PhoneNumber object
2265
+ * passed in.
2266
+ */
2267
+ i18n.phonenumbers.PhoneNumberUtil.prototype.getNationalSignificantNumber =
2268
+ function(number) {
2269
+
2270
+ // If leading zero(s) have been set, we prefix this now. Note this is not a
2271
+ // national prefix.
2272
+ /** @type {string} */
2273
+ var nationalNumber = '' + number.getNationalNumber();
2274
+ if (number.hasItalianLeadingZero() && number.getItalianLeadingZero()) {
2275
+ return Array(number.getNumberOfLeadingZerosOrDefault() + 1).join('0') +
2276
+ nationalNumber;
2277
+ }
2278
+ return nationalNumber;
2279
+ };
2280
+
2281
+
2282
+ /**
2283
+ * A helper function that is used by format and formatByPattern.
2284
+ *
2285
+ * @param {number} countryCallingCode the country calling code.
2286
+ * @param {i18n.phonenumbers.PhoneNumberFormat} numberFormat the format the
2287
+ * phone number should be formatted into.
2288
+ * @param {string} formattedNationalNumber
2289
+ * @param {string} formattedExtension
2290
+ * @return {string} the formatted phone number.
2291
+ * @private
2292
+ */
2293
+ i18n.phonenumbers.PhoneNumberUtil.prototype.
2294
+ prefixNumberWithCountryCallingCode_ = function(countryCallingCode,
2295
+ numberFormat,
2296
+ formattedNationalNumber,
2297
+ formattedExtension) {
2298
+
2299
+ switch (numberFormat) {
2300
+ case i18n.phonenumbers.PhoneNumberFormat.E164:
2301
+ return i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN + countryCallingCode +
2302
+ formattedNationalNumber + formattedExtension;
2303
+ case i18n.phonenumbers.PhoneNumberFormat.INTERNATIONAL:
2304
+ return i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN + countryCallingCode +
2305
+ ' ' + formattedNationalNumber + formattedExtension;
2306
+ case i18n.phonenumbers.PhoneNumberFormat.RFC3966:
2307
+ return i18n.phonenumbers.PhoneNumberUtil.RFC3966_PREFIX_ +
2308
+ i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN + countryCallingCode +
2309
+ '-' + formattedNationalNumber + formattedExtension;
2310
+ case i18n.phonenumbers.PhoneNumberFormat.NATIONAL:
2311
+ default:
2312
+ return formattedNationalNumber + formattedExtension;
2313
+ }
2314
+ };
2315
+
2316
+
2317
+ /**
2318
+ * Note in some regions, the national number can be written in two completely
2319
+ * different ways depending on whether it forms part of the NATIONAL format or
2320
+ * INTERNATIONAL format. The numberFormat parameter here is used to specify
2321
+ * which format to use for those cases. If a carrierCode is specified, this will
2322
+ * be inserted into the formatted string to replace $CC.
2323
+ *
2324
+ * @param {string} number a string of characters representing a phone number.
2325
+ * @param {i18n.phonenumbers.PhoneMetadata} metadata the metadata for the
2326
+ * region that we think this number is from.
2327
+ * @param {i18n.phonenumbers.PhoneNumberFormat} numberFormat the format the
2328
+ * phone number should be formatted into.
2329
+ * @param {string=} opt_carrierCode
2330
+ * @return {string} the formatted phone number.
2331
+ * @private
2332
+ */
2333
+ i18n.phonenumbers.PhoneNumberUtil.prototype.formatNsn_ =
2334
+ function(number, metadata, numberFormat, opt_carrierCode) {
2335
+
2336
+ /** @type {Array.<i18n.phonenumbers.NumberFormat>} */
2337
+ var intlNumberFormats = metadata.intlNumberFormatArray();
2338
+ // When the intlNumberFormats exists, we use that to format national number
2339
+ // for the INTERNATIONAL format instead of using the numberDesc.numberFormats.
2340
+ /** @type {Array.<i18n.phonenumbers.NumberFormat>} */
2341
+ var availableFormats =
2342
+ (intlNumberFormats.length == 0 ||
2343
+ numberFormat == i18n.phonenumbers.PhoneNumberFormat.NATIONAL) ?
2344
+ metadata.numberFormatArray() : metadata.intlNumberFormatArray();
2345
+ /** @type {i18n.phonenumbers.NumberFormat} */
2346
+ var formattingPattern = this.chooseFormattingPatternForNumber_(
2347
+ availableFormats, number);
2348
+ return (formattingPattern == null) ?
2349
+ number :
2350
+ this.formatNsnUsingPattern_(number, formattingPattern,
2351
+ numberFormat, opt_carrierCode);
2352
+ };
2353
+
2354
+
2355
+ /**
2356
+ * @param {Array.<i18n.phonenumbers.NumberFormat>} availableFormats the
2357
+ * available formats the phone number could be formatted into.
2358
+ * @param {string} nationalNumber a string of characters representing a phone
2359
+ * number.
2360
+ * @return {i18n.phonenumbers.NumberFormat}
2361
+ * @private
2362
+ */
2363
+ i18n.phonenumbers.PhoneNumberUtil.prototype.chooseFormattingPatternForNumber_ =
2364
+ function(availableFormats, nationalNumber) {
2365
+
2366
+ /** @type {i18n.phonenumbers.NumberFormat} */
2367
+ var numFormat;
2368
+ /** @type {number} */
2369
+ var l = availableFormats.length;
2370
+ for (var i = 0; i < l; ++i) {
2371
+ numFormat = availableFormats[i];
2372
+ /** @type {number} */
2373
+ var size = numFormat.leadingDigitsPatternCount();
2374
+ if (size == 0 ||
2375
+ // We always use the last leading_digits_pattern, as it is the most
2376
+ // detailed.
2377
+ nationalNumber
2378
+ .search(numFormat.getLeadingDigitsPattern(size - 1)) == 0) {
2379
+ /** @type {!RegExp} */
2380
+ var patternToMatch = new RegExp(numFormat.getPattern());
2381
+ if (i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_(patternToMatch,
2382
+ nationalNumber)) {
2383
+ return numFormat;
2384
+ }
2385
+ }
2386
+ }
2387
+ return null;
2388
+ };
2389
+
2390
+
2391
+ /**
2392
+ * Note that carrierCode is optional - if null or an empty string, no carrier
2393
+ * code replacement will take place.
2394
+ *
2395
+ * @param {string} nationalNumber a string of characters representing a phone
2396
+ * number.
2397
+ * @param {i18n.phonenumbers.NumberFormat} formattingPattern the formatting rule
2398
+ * the phone number should be formatted into.
2399
+ * @param {i18n.phonenumbers.PhoneNumberFormat} numberFormat the format the
2400
+ * phone number should be formatted into.
2401
+ * @param {string=} opt_carrierCode
2402
+ * @return {string} the formatted phone number.
2403
+ * @private
2404
+ */
2405
+ i18n.phonenumbers.PhoneNumberUtil.prototype.formatNsnUsingPattern_ =
2406
+ function(nationalNumber, formattingPattern, numberFormat, opt_carrierCode) {
2407
+
2408
+ /** @type {string} */
2409
+ var numberFormatRule = formattingPattern.getFormatOrDefault();
2410
+ /** @type {!RegExp} */
2411
+ var patternToMatch = new RegExp(formattingPattern.getPattern());
2412
+ /** @type {string} */
2413
+ var domesticCarrierCodeFormattingRule =
2414
+ formattingPattern.getDomesticCarrierCodeFormattingRuleOrDefault();
2415
+ /** @type {string} */
2416
+ var formattedNationalNumber = '';
2417
+ if (numberFormat == i18n.phonenumbers.PhoneNumberFormat.NATIONAL &&
2418
+ opt_carrierCode != null && opt_carrierCode.length > 0 &&
2419
+ domesticCarrierCodeFormattingRule.length > 0) {
2420
+ // Replace the $CC in the formatting rule with the desired carrier code.
2421
+ /** @type {string} */
2422
+ var carrierCodeFormattingRule = domesticCarrierCodeFormattingRule
2423
+ .replace(i18n.phonenumbers.PhoneNumberUtil.CC_PATTERN_,
2424
+ opt_carrierCode);
2425
+ // Now replace the $FG in the formatting rule with the first group and
2426
+ // the carrier code combined in the appropriate way.
2427
+ numberFormatRule = numberFormatRule.replace(
2428
+ i18n.phonenumbers.PhoneNumberUtil.FIRST_GROUP_PATTERN_,
2429
+ carrierCodeFormattingRule);
2430
+ formattedNationalNumber =
2431
+ nationalNumber.replace(patternToMatch, numberFormatRule);
2432
+ } else {
2433
+ // Use the national prefix formatting rule instead.
2434
+ /** @type {string} */
2435
+ var nationalPrefixFormattingRule =
2436
+ formattingPattern.getNationalPrefixFormattingRuleOrDefault();
2437
+ if (numberFormat == i18n.phonenumbers.PhoneNumberFormat.NATIONAL &&
2438
+ nationalPrefixFormattingRule != null &&
2439
+ nationalPrefixFormattingRule.length > 0) {
2440
+ formattedNationalNumber = nationalNumber.replace(patternToMatch,
2441
+ numberFormatRule.replace(
2442
+ i18n.phonenumbers.PhoneNumberUtil.FIRST_GROUP_PATTERN_,
2443
+ nationalPrefixFormattingRule));
2444
+ } else {
2445
+ formattedNationalNumber =
2446
+ nationalNumber.replace(patternToMatch, numberFormatRule);
2447
+ }
2448
+ }
2449
+ if (numberFormat == i18n.phonenumbers.PhoneNumberFormat.RFC3966) {
2450
+ // Strip any leading punctuation.
2451
+ formattedNationalNumber = formattedNationalNumber.replace(
2452
+ new RegExp('^' + i18n.phonenumbers.PhoneNumberUtil.SEPARATOR_PATTERN_),
2453
+ '');
2454
+ // Replace the rest with a dash between each number group.
2455
+ formattedNationalNumber = formattedNationalNumber.replace(
2456
+ new RegExp(i18n.phonenumbers.PhoneNumberUtil.SEPARATOR_PATTERN_, 'g'),
2457
+ '-');
2458
+ }
2459
+ return formattedNationalNumber;
2460
+ };
2461
+
2462
+
2463
+ /**
2464
+ * Gets a valid number for the specified region.
2465
+ *
2466
+ * @param {string} regionCode the region for which an example number is needed.
2467
+ * @return {i18n.phonenumbers.PhoneNumber} a valid fixed-line number for the
2468
+ * specified region. Returns null when the metadata does not contain such
2469
+ * information, or the region 001 is passed in. For 001 (representing non-
2470
+ * geographical numbers), call {@link #getExampleNumberForNonGeoEntity}
2471
+ * instead.
2472
+ */
2473
+ i18n.phonenumbers.PhoneNumberUtil.prototype.getExampleNumber =
2474
+ function(regionCode) {
2475
+
2476
+ return this.getExampleNumberForType(regionCode,
2477
+ i18n.phonenumbers.PhoneNumberType.FIXED_LINE);
2478
+ };
2479
+
2480
+
2481
+ /**
2482
+ * Gets a valid number for the specified region and number type.
2483
+ *
2484
+ * @param {string} regionCode the region for which an example number is needed.
2485
+ * @param {i18n.phonenumbers.PhoneNumberType} type the type of number that is
2486
+ * needed.
2487
+ * @return {i18n.phonenumbers.PhoneNumber} a valid number for the specified
2488
+ * region and type. Returns null when the metadata does not contain such
2489
+ * information or if an invalid region or region 001 was entered.
2490
+ * For 001 (representing non-geographical numbers), call
2491
+ * {@link #getExampleNumberForNonGeoEntity} instead.
2492
+ */
2493
+ i18n.phonenumbers.PhoneNumberUtil.prototype.getExampleNumberForType =
2494
+ function(regionCode, type) {
2495
+
2496
+ // Check the region code is valid.
2497
+ if (!this.isValidRegionCode_(regionCode)) {
2498
+ return null;
2499
+ }
2500
+ /** @type {i18n.phonenumbers.PhoneNumberDesc} */
2501
+ var desc = this.getNumberDescByType_(
2502
+ this.getMetadataForRegion(regionCode), type);
2503
+ try {
2504
+ if (desc.hasExampleNumber()) {
2505
+ return this.parse(desc.getExampleNumberOrDefault(), regionCode);
2506
+ }
2507
+ } catch (e) {
2508
+ }
2509
+ return null;
2510
+ };
2511
+
2512
+
2513
+ /**
2514
+ * Gets a valid number for the specified country calling code for a
2515
+ * non-geographical entity.
2516
+ *
2517
+ * @param {number} countryCallingCode the country calling code for a
2518
+ * non-geographical entity.
2519
+ * @return {i18n.phonenumbers.PhoneNumber} a valid number for the
2520
+ * non-geographical entity. Returns null when the metadata does not contain
2521
+ * such information, or the country calling code passed in does not belong
2522
+ * to a non-geographical entity.
2523
+ */
2524
+ i18n.phonenumbers.PhoneNumberUtil.prototype.getExampleNumberForNonGeoEntity =
2525
+ function(countryCallingCode) {
2526
+ /** @type {i18n.phonenumbers.PhoneMetadata} */
2527
+ var metadata =
2528
+ this.getMetadataForNonGeographicalRegion(countryCallingCode);
2529
+ if (metadata != null) {
2530
+ /** @type {i18n.phonenumbers.PhoneNumberDesc} */
2531
+ var desc = metadata.getGeneralDesc();
2532
+ try {
2533
+ if (desc.hasExampleNumber()) {
2534
+ return this.parse('+' + countryCallingCode + desc.getExampleNumber(),
2535
+ 'ZZ');
2536
+ }
2537
+ } catch (e) {
2538
+ }
2539
+ }
2540
+ return null;
2541
+ };
2542
+
2543
+
2544
+ /**
2545
+ * Gets the formatted extension of a phone number, if the phone number had an
2546
+ * extension specified. If not, it returns an empty string.
2547
+ *
2548
+ * @param {i18n.phonenumbers.PhoneNumber} number the PhoneNumber that might have
2549
+ * an extension.
2550
+ * @param {i18n.phonenumbers.PhoneMetadata} metadata the metadata for the
2551
+ * region that we think this number is from.
2552
+ * @param {i18n.phonenumbers.PhoneNumberFormat} numberFormat the format the
2553
+ * phone number should be formatted into.
2554
+ * @return {string} the formatted extension if any.
2555
+ * @private
2556
+ */
2557
+ i18n.phonenumbers.PhoneNumberUtil.prototype.maybeGetFormattedExtension_ =
2558
+ function(number, metadata, numberFormat) {
2559
+
2560
+ if (!number.hasExtension() || number.getExtension().length == 0) {
2561
+ return '';
2562
+ } else {
2563
+ if (numberFormat == i18n.phonenumbers.PhoneNumberFormat.RFC3966) {
2564
+ return i18n.phonenumbers.PhoneNumberUtil.RFC3966_EXTN_PREFIX_ +
2565
+ number.getExtension();
2566
+ } else {
2567
+ if (metadata.hasPreferredExtnPrefix()) {
2568
+ return metadata.getPreferredExtnPrefix() +
2569
+ number.getExtensionOrDefault();
2570
+ } else {
2571
+ return i18n.phonenumbers.PhoneNumberUtil.DEFAULT_EXTN_PREFIX_ +
2572
+ number.getExtensionOrDefault();
2573
+ }
2574
+ }
2575
+ }
2576
+ };
2577
+
2578
+
2579
+ /**
2580
+ * @param {i18n.phonenumbers.PhoneMetadata} metadata
2581
+ * @param {i18n.phonenumbers.PhoneNumberType} type
2582
+ * @return {i18n.phonenumbers.PhoneNumberDesc}
2583
+ * @private
2584
+ */
2585
+ i18n.phonenumbers.PhoneNumberUtil.prototype.getNumberDescByType_ =
2586
+ function(metadata, type) {
2587
+
2588
+ switch (type) {
2589
+ case i18n.phonenumbers.PhoneNumberType.PREMIUM_RATE:
2590
+ return metadata.getPremiumRate();
2591
+ case i18n.phonenumbers.PhoneNumberType.TOLL_FREE:
2592
+ return metadata.getTollFree();
2593
+ case i18n.phonenumbers.PhoneNumberType.MOBILE:
2594
+ return metadata.getMobile();
2595
+ case i18n.phonenumbers.PhoneNumberType.FIXED_LINE:
2596
+ case i18n.phonenumbers.PhoneNumberType.FIXED_LINE_OR_MOBILE:
2597
+ return metadata.getFixedLine();
2598
+ case i18n.phonenumbers.PhoneNumberType.SHARED_COST:
2599
+ return metadata.getSharedCost();
2600
+ case i18n.phonenumbers.PhoneNumberType.VOIP:
2601
+ return metadata.getVoip();
2602
+ case i18n.phonenumbers.PhoneNumberType.PERSONAL_NUMBER:
2603
+ return metadata.getPersonalNumber();
2604
+ case i18n.phonenumbers.PhoneNumberType.PAGER:
2605
+ return metadata.getPager();
2606
+ case i18n.phonenumbers.PhoneNumberType.UAN:
2607
+ return metadata.getUan();
2608
+ case i18n.phonenumbers.PhoneNumberType.VOICEMAIL:
2609
+ return metadata.getVoicemail();
2610
+ default:
2611
+ return metadata.getGeneralDesc();
2612
+ }
2613
+ };
2614
+
2615
+
2616
+ /**
2617
+ * Gets the type of a phone number.
2618
+ *
2619
+ * @param {i18n.phonenumbers.PhoneNumber} number the phone number that we want
2620
+ * to know the type.
2621
+ * @return {i18n.phonenumbers.PhoneNumberType} the type of the phone number.
2622
+ */
2623
+ i18n.phonenumbers.PhoneNumberUtil.prototype.getNumberType =
2624
+ function(number) {
2625
+
2626
+ /** @type {?string} */
2627
+ var regionCode = this.getRegionCodeForNumber(number);
2628
+ /** @type {i18n.phonenumbers.PhoneMetadata} */
2629
+ var metadata = this.getMetadataForRegionOrCallingCode_(
2630
+ number.getCountryCodeOrDefault(), regionCode);
2631
+ if (metadata == null) {
2632
+ return i18n.phonenumbers.PhoneNumberType.UNKNOWN;
2633
+ }
2634
+ /** @type {string} */
2635
+ var nationalSignificantNumber = this.getNationalSignificantNumber(number);
2636
+ return this.getNumberTypeHelper_(nationalSignificantNumber, metadata);
2637
+ };
2638
+
2639
+
2640
+ /**
2641
+ * @param {string} nationalNumber
2642
+ * @param {i18n.phonenumbers.PhoneMetadata} metadata
2643
+ * @return {i18n.phonenumbers.PhoneNumberType}
2644
+ * @private
2645
+ */
2646
+ i18n.phonenumbers.PhoneNumberUtil.prototype.getNumberTypeHelper_ =
2647
+ function(nationalNumber, metadata) {
2648
+
2649
+ if (!this.isNumberMatchingDesc_(nationalNumber, metadata.getGeneralDesc())) {
2650
+ return i18n.phonenumbers.PhoneNumberType.UNKNOWN;
2651
+ }
2652
+
2653
+ if (this.isNumberMatchingDesc_(nationalNumber, metadata.getPremiumRate())) {
2654
+ return i18n.phonenumbers.PhoneNumberType.PREMIUM_RATE;
2655
+ }
2656
+ if (this.isNumberMatchingDesc_(nationalNumber, metadata.getTollFree())) {
2657
+ return i18n.phonenumbers.PhoneNumberType.TOLL_FREE;
2658
+ }
2659
+ if (this.isNumberMatchingDesc_(nationalNumber, metadata.getSharedCost())) {
2660
+ return i18n.phonenumbers.PhoneNumberType.SHARED_COST;
2661
+ }
2662
+ if (this.isNumberMatchingDesc_(nationalNumber, metadata.getVoip())) {
2663
+ return i18n.phonenumbers.PhoneNumberType.VOIP;
2664
+ }
2665
+ if (this.isNumberMatchingDesc_(nationalNumber,
2666
+ metadata.getPersonalNumber())) {
2667
+ return i18n.phonenumbers.PhoneNumberType.PERSONAL_NUMBER;
2668
+ }
2669
+ if (this.isNumberMatchingDesc_(nationalNumber, metadata.getPager())) {
2670
+ return i18n.phonenumbers.PhoneNumberType.PAGER;
2671
+ }
2672
+ if (this.isNumberMatchingDesc_(nationalNumber, metadata.getUan())) {
2673
+ return i18n.phonenumbers.PhoneNumberType.UAN;
2674
+ }
2675
+ if (this.isNumberMatchingDesc_(nationalNumber, metadata.getVoicemail())) {
2676
+ return i18n.phonenumbers.PhoneNumberType.VOICEMAIL;
2677
+ }
2678
+
2679
+ /** @type {boolean} */
2680
+ var isFixedLine = this.isNumberMatchingDesc_(nationalNumber, metadata
2681
+ .getFixedLine());
2682
+ if (isFixedLine) {
2683
+ if (metadata.getSameMobileAndFixedLinePattern()) {
2684
+ return i18n.phonenumbers.PhoneNumberType.FIXED_LINE_OR_MOBILE;
2685
+ } else if (this.isNumberMatchingDesc_(nationalNumber,
2686
+ metadata.getMobile())) {
2687
+ return i18n.phonenumbers.PhoneNumberType.FIXED_LINE_OR_MOBILE;
2688
+ }
2689
+ return i18n.phonenumbers.PhoneNumberType.FIXED_LINE;
2690
+ }
2691
+ // Otherwise, test to see if the number is mobile. Only do this if certain
2692
+ // that the patterns for mobile and fixed line aren't the same.
2693
+ if (!metadata.getSameMobileAndFixedLinePattern() &&
2694
+ this.isNumberMatchingDesc_(nationalNumber, metadata.getMobile())) {
2695
+ return i18n.phonenumbers.PhoneNumberType.MOBILE;
2696
+ }
2697
+ return i18n.phonenumbers.PhoneNumberType.UNKNOWN;
2698
+ };
2699
+
2700
+
2701
+ /**
2702
+ * Returns the metadata for the given region code or {@code null} if the region
2703
+ * code is invalid or unknown.
2704
+ *
2705
+ * @param {?string} regionCode
2706
+ * @return {i18n.phonenumbers.PhoneMetadata}
2707
+ */
2708
+ i18n.phonenumbers.PhoneNumberUtil.prototype.getMetadataForRegion =
2709
+ function(regionCode) {
2710
+
2711
+ if (regionCode == null) {
2712
+ return null;
2713
+ }
2714
+ regionCode = regionCode.toUpperCase();
2715
+ /** @type {i18n.phonenumbers.PhoneMetadata} */
2716
+ var metadata = this.regionToMetadataMap[regionCode];
2717
+ if (metadata == null) {
2718
+ /** @type {goog.proto2.PbLiteSerializer} */
2719
+ var serializer = new goog.proto2.PbLiteSerializer();
2720
+ /** @type {Array} */
2721
+ var metadataSerialized =
2722
+ i18n.phonenumbers.metadata.countryToMetadata[regionCode];
2723
+ if (metadataSerialized == null) {
2724
+ return null;
2725
+ }
2726
+ metadata = /** @type {i18n.phonenumbers.PhoneMetadata} */ (
2727
+ serializer.deserialize(i18n.phonenumbers.PhoneMetadata.getDescriptor(),
2728
+ metadataSerialized));
2729
+ this.regionToMetadataMap[regionCode] = metadata;
2730
+ }
2731
+ return metadata;
2732
+ };
2733
+
2734
+
2735
+ /**
2736
+ * @param {number} countryCallingCode
2737
+ * @return {i18n.phonenumbers.PhoneMetadata}
2738
+ */
2739
+ i18n.phonenumbers.PhoneNumberUtil.prototype.
2740
+ getMetadataForNonGeographicalRegion = function(countryCallingCode) {
2741
+
2742
+ return this.getMetadataForRegion('' + countryCallingCode);
2743
+ };
2744
+
2745
+
2746
+ /**
2747
+ * @param {string} nationalNumber
2748
+ * @param {i18n.phonenumbers.PhoneNumberDesc} numberDesc
2749
+ * @return {boolean}
2750
+ * @private
2751
+ */
2752
+ i18n.phonenumbers.PhoneNumberUtil.prototype.isNumberMatchingDesc_ =
2753
+ function(nationalNumber, numberDesc) {
2754
+
2755
+ return i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_(
2756
+ numberDesc.getPossibleNumberPatternOrDefault(), nationalNumber) &&
2757
+ i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_(
2758
+ numberDesc.getNationalNumberPatternOrDefault(), nationalNumber);
2759
+ };
2760
+
2761
+
2762
+ /**
2763
+ * Tests whether a phone number matches a valid pattern. Note this doesn't
2764
+ * verify the number is actually in use, which is impossible to tell by just
2765
+ * looking at a number itself.
2766
+ *
2767
+ * @param {i18n.phonenumbers.PhoneNumber} number the phone number that we want
2768
+ * to validate.
2769
+ * @return {boolean} a boolean that indicates whether the number is of a valid
2770
+ * pattern.
2771
+ */
2772
+ i18n.phonenumbers.PhoneNumberUtil.prototype.isValidNumber = function(number) {
2773
+ /** @type {?string} */
2774
+ var regionCode = this.getRegionCodeForNumber(number);
2775
+ return this.isValidNumberForRegion(number, regionCode);
2776
+ };
2777
+
2778
+
2779
+ /**
2780
+ * Tests whether a phone number is valid for a certain region. Note this doesn't
2781
+ * verify the number is actually in use, which is impossible to tell by just
2782
+ * looking at a number itself. If the country calling code is not the same as
2783
+ * the country calling code for the region, this immediately exits with false.
2784
+ * After this, the specific number pattern rules for the region are examined.
2785
+ * This is useful for determining for example whether a particular number is
2786
+ * valid for Canada, rather than just a valid NANPA number.
2787
+ * Warning: In most cases, you want to use {@link #isValidNumber} instead. For
2788
+ * example, this method will mark numbers from British Crown dependencies such
2789
+ * as the Isle of Man as invalid for the region "GB" (United Kingdom), since it
2790
+ * has its own region code, "IM", which may be undesirable.
2791
+ *
2792
+ * @param {i18n.phonenumbers.PhoneNumber} number the phone number that we want
2793
+ * to validate.
2794
+ * @param {?string} regionCode the region that we want to validate the phone
2795
+ * number for.
2796
+ * @return {boolean} a boolean that indicates whether the number is of a valid
2797
+ * pattern.
2798
+ */
2799
+ i18n.phonenumbers.PhoneNumberUtil.prototype.isValidNumberForRegion =
2800
+ function(number, regionCode) {
2801
+
2802
+ /** @type {number} */
2803
+ var countryCode = number.getCountryCodeOrDefault();
2804
+ /** @type {i18n.phonenumbers.PhoneMetadata} */
2805
+ var metadata =
2806
+ this.getMetadataForRegionOrCallingCode_(countryCode, regionCode);
2807
+ if (metadata == null ||
2808
+ (i18n.phonenumbers.PhoneNumberUtil.REGION_CODE_FOR_NON_GEO_ENTITY !=
2809
+ regionCode &&
2810
+ countryCode != this.getCountryCodeForValidRegion_(regionCode))) {
2811
+ // Either the region code was invalid, or the country calling code for this
2812
+ // number does not match that of the region code.
2813
+ return false;
2814
+ }
2815
+ /** @type {string} */
2816
+ var nationalSignificantNumber = this.getNationalSignificantNumber(number);
2817
+
2818
+ return this.getNumberTypeHelper_(nationalSignificantNumber, metadata) !=
2819
+ i18n.phonenumbers.PhoneNumberType.UNKNOWN;
2820
+ };
2821
+
2822
+
2823
+ /**
2824
+ * Returns the region where a phone number is from. This could be used for
2825
+ * geocoding at the region level.
2826
+ *
2827
+ * @param {i18n.phonenumbers.PhoneNumber} number the phone number whose origin
2828
+ * we want to know.
2829
+ * @return {?string} the region where the phone number is from, or null
2830
+ * if no region matches this calling code.
2831
+ */
2832
+ i18n.phonenumbers.PhoneNumberUtil.prototype.getRegionCodeForNumber =
2833
+ function(number) {
2834
+
2835
+ if (number == null) {
2836
+ return null;
2837
+ }
2838
+ /** @type {number} */
2839
+ var countryCode = number.getCountryCodeOrDefault();
2840
+ /** @type {Array.<string>} */
2841
+ var regions =
2842
+ i18n.phonenumbers.metadata.countryCodeToRegionCodeMap[countryCode];
2843
+ if (regions == null) {
2844
+ return null;
2845
+ }
2846
+ if (regions.length == 1) {
2847
+ return regions[0];
2848
+ } else {
2849
+ return this.getRegionCodeForNumberFromRegionList_(number, regions);
2850
+ }
2851
+ };
2852
+
2853
+
2854
+ /**
2855
+ * @param {i18n.phonenumbers.PhoneNumber} number
2856
+ * @param {Array.<string>} regionCodes
2857
+ * @return {?string}
2858
+ * @private
2859
+ */
2860
+ i18n.phonenumbers.PhoneNumberUtil.prototype.
2861
+ getRegionCodeForNumberFromRegionList_ = function(number, regionCodes) {
2862
+
2863
+ /** @type {string} */
2864
+ var nationalNumber = this.getNationalSignificantNumber(number);
2865
+ /** @type {string} */
2866
+ var regionCode;
2867
+ /** @type {number} */
2868
+ var regionCodesLength = regionCodes.length;
2869
+ for (var i = 0; i < regionCodesLength; i++) {
2870
+ regionCode = regionCodes[i];
2871
+ // If leadingDigits is present, use this. Otherwise, do full validation.
2872
+ // Metadata cannot be null because the region codes come from the country
2873
+ // calling code map.
2874
+ /** @type {i18n.phonenumbers.PhoneMetadata} */
2875
+ var metadata = this.getMetadataForRegion(regionCode);
2876
+ if (metadata.hasLeadingDigits()) {
2877
+ if (nationalNumber.search(metadata.getLeadingDigits()) == 0) {
2878
+ return regionCode;
2879
+ }
2880
+ } else if (this.getNumberTypeHelper_(nationalNumber, metadata) !=
2881
+ i18n.phonenumbers.PhoneNumberType.UNKNOWN) {
2882
+ return regionCode;
2883
+ }
2884
+ }
2885
+ return null;
2886
+ };
2887
+
2888
+
2889
+ /**
2890
+ * Returns the region code that matches the specific country calling code. In
2891
+ * the case of no region code being found, ZZ will be returned. In the case of
2892
+ * multiple regions, the one designated in the metadata as the 'main' region for
2893
+ * this calling code will be returned.
2894
+ *
2895
+ * @param {number} countryCallingCode the country calling code.
2896
+ * @return {string}
2897
+ */
2898
+ i18n.phonenumbers.PhoneNumberUtil.prototype.getRegionCodeForCountryCode =
2899
+ function(countryCallingCode) {
2900
+
2901
+ /** @type {Array.<string>} */
2902
+ var regionCodes =
2903
+ i18n.phonenumbers.metadata.countryCodeToRegionCodeMap[countryCallingCode];
2904
+ return regionCodes == null ?
2905
+ i18n.phonenumbers.PhoneNumberUtil.UNKNOWN_REGION_ : regionCodes[0];
2906
+ };
2907
+
2908
+
2909
+ /**
2910
+ * Returns a list with the region codes that match the specific country calling
2911
+ * code. For non-geographical country calling codes, the region code 001 is
2912
+ * returned. Also, in the case of no region code being found, an empty list is
2913
+ * returned.
2914
+ *
2915
+ * @param {number} countryCallingCode the country calling code.
2916
+ * @return {Array.<string>}
2917
+ */
2918
+ i18n.phonenumbers.PhoneNumberUtil.prototype.getRegionCodesForCountryCode =
2919
+ function(countryCallingCode) {
2920
+
2921
+ /** @type {Array.<string>} */
2922
+ var regionCodes =
2923
+ i18n.phonenumbers.metadata.countryCodeToRegionCodeMap[countryCallingCode];
2924
+ return regionCodes == null ? [] : regionCodes;
2925
+ };
2926
+
2927
+
2928
+ /**
2929
+ * Returns the country calling code for a specific region. For example, this
2930
+ * would be 1 for the United States, and 64 for New Zealand.
2931
+ *
2932
+ * @param {?string} regionCode the region that we want to get the country
2933
+ * calling code for.
2934
+ * @return {number} the country calling code for the region denoted by
2935
+ * regionCode.
2936
+ */
2937
+ i18n.phonenumbers.PhoneNumberUtil.prototype.getCountryCodeForRegion =
2938
+ function(regionCode) {
2939
+
2940
+ if (!this.isValidRegionCode_(regionCode)) {
2941
+ return 0;
2942
+ }
2943
+ return this.getCountryCodeForValidRegion_(regionCode);
2944
+ };
2945
+
2946
+
2947
+ /**
2948
+ * Returns the country calling code for a specific region. For example, this
2949
+ * would be 1 for the United States, and 64 for New Zealand. Assumes the region
2950
+ * is already valid.
2951
+ *
2952
+ * @param {?string} regionCode the region that we want to get the country
2953
+ * calling code for.
2954
+ * @return {number} the country calling code for the region denoted by
2955
+ * regionCode.
2956
+ * @throws {string} if the region is invalid
2957
+ * @private
2958
+ */
2959
+ i18n.phonenumbers.PhoneNumberUtil.prototype.getCountryCodeForValidRegion_ =
2960
+ function(regionCode) {
2961
+
2962
+ /** @type {i18n.phonenumbers.PhoneMetadata} */
2963
+ var metadata = this.getMetadataForRegion(regionCode);
2964
+ if (metadata == null) {
2965
+ throw 'Invalid region code: ' + regionCode;
2966
+ }
2967
+ return metadata.getCountryCodeOrDefault();
2968
+ };
2969
+
2970
+
2971
+ /**
2972
+ * Returns the national dialling prefix for a specific region. For example, this
2973
+ * would be 1 for the United States, and 0 for New Zealand. Set stripNonDigits
2974
+ * to true to strip symbols like '~' (which indicates a wait for a dialling
2975
+ * tone) from the prefix returned. If no national prefix is present, we return
2976
+ * null.
2977
+ *
2978
+ * <p>Warning: Do not use this method for do-your-own formatting - for some
2979
+ * regions, the national dialling prefix is used only for certain types of
2980
+ * numbers. Use the library's formatting functions to prefix the national prefix
2981
+ * when required.
2982
+ *
2983
+ * @param {?string} regionCode the region that we want to get the dialling
2984
+ * prefix for.
2985
+ * @param {boolean} stripNonDigits true to strip non-digits from the national
2986
+ * dialling prefix.
2987
+ * @return {?string} the dialling prefix for the region denoted by
2988
+ * regionCode.
2989
+ */
2990
+ i18n.phonenumbers.PhoneNumberUtil.prototype.getNddPrefixForRegion = function(
2991
+ regionCode, stripNonDigits) {
2992
+ /** @type {i18n.phonenumbers.PhoneMetadata} */
2993
+ var metadata = this.getMetadataForRegion(regionCode);
2994
+ if (metadata == null) {
2995
+ return null;
2996
+ }
2997
+ /** @type {string} */
2998
+ var nationalPrefix = metadata.getNationalPrefixOrDefault();
2999
+ // If no national prefix was found, we return null.
3000
+ if (nationalPrefix.length == 0) {
3001
+ return null;
3002
+ }
3003
+ if (stripNonDigits) {
3004
+ // Note: if any other non-numeric symbols are ever used in national
3005
+ // prefixes, these would have to be removed here as well.
3006
+ nationalPrefix = nationalPrefix.replace('~', '');
3007
+ }
3008
+ return nationalPrefix;
3009
+ };
3010
+
3011
+
3012
+ /**
3013
+ * Checks if this is a region under the North American Numbering Plan
3014
+ * Administration (NANPA).
3015
+ *
3016
+ * @param {?string} regionCode the ISO 3166-1 two-letter region code.
3017
+ * @return {boolean} true if regionCode is one of the regions under NANPA.
3018
+ */
3019
+ i18n.phonenumbers.PhoneNumberUtil.prototype.isNANPACountry =
3020
+ function(regionCode) {
3021
+
3022
+ return regionCode != null && goog.array.contains(
3023
+ i18n.phonenumbers.metadata.countryCodeToRegionCodeMap[
3024
+ i18n.phonenumbers.PhoneNumberUtil.NANPA_COUNTRY_CODE_],
3025
+ regionCode.toUpperCase());
3026
+ };
3027
+
3028
+
3029
+ /**
3030
+ * Checks whether countryCode represents the country calling code from a region
3031
+ * whose national significant number could contain a leading zero. An example of
3032
+ * such a region is Italy. Returns false if no metadata for the country is
3033
+ * found.
3034
+ *
3035
+ * @param {number} countryCallingCode the country calling code.
3036
+ * @return {boolean}
3037
+ */
3038
+ i18n.phonenumbers.PhoneNumberUtil.prototype.isLeadingZeroPossible =
3039
+ function(countryCallingCode) {
3040
+ /** @type {i18n.phonenumbers.PhoneMetadata} */
3041
+ var mainMetadataForCallingCode = this.getMetadataForRegionOrCallingCode_(
3042
+ countryCallingCode,
3043
+ this.getRegionCodeForCountryCode(countryCallingCode));
3044
+ return mainMetadataForCallingCode != null &&
3045
+ mainMetadataForCallingCode.getLeadingZeroPossibleOrDefault();
3046
+ };
3047
+
3048
+
3049
+ /**
3050
+ * Checks if the number is a valid vanity (alpha) number such as 800 MICROSOFT.
3051
+ * A valid vanity number will start with at least 3 digits and will have three
3052
+ * or more alpha characters. This does not do region-specific checks - to work
3053
+ * out if this number is actually valid for a region, it should be parsed and
3054
+ * methods such as {@link #isPossibleNumberWithReason} and
3055
+ * {@link #isValidNumber} should be used.
3056
+ *
3057
+ * @param {string} number the number that needs to be checked.
3058
+ * @return {boolean} true if the number is a valid vanity number.
3059
+ */
3060
+ i18n.phonenumbers.PhoneNumberUtil.prototype.isAlphaNumber = function(number) {
3061
+ if (!i18n.phonenumbers.PhoneNumberUtil.isViablePhoneNumber(number)) {
3062
+ // Number is too short, or doesn't match the basic phone number pattern.
3063
+ return false;
3064
+ }
3065
+ /** @type {!goog.string.StringBuffer} */
3066
+ var strippedNumber = new goog.string.StringBuffer(number);
3067
+ this.maybeStripExtension(strippedNumber);
3068
+ return i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_(
3069
+ i18n.phonenumbers.PhoneNumberUtil.VALID_ALPHA_PHONE_PATTERN_,
3070
+ strippedNumber.toString());
3071
+ };
3072
+
3073
+
3074
+ /**
3075
+ * Convenience wrapper around {@link #isPossibleNumberWithReason}. Instead of
3076
+ * returning the reason for failure, this method returns a boolean value.
3077
+ *
3078
+ * @param {i18n.phonenumbers.PhoneNumber} number the number that needs to be
3079
+ * checked.
3080
+ * @return {boolean} true if the number is possible.
3081
+ */
3082
+ i18n.phonenumbers.PhoneNumberUtil.prototype.isPossibleNumber =
3083
+ function(number) {
3084
+
3085
+ return this.isPossibleNumberWithReason(number) ==
3086
+ i18n.phonenumbers.PhoneNumberUtil.ValidationResult.IS_POSSIBLE;
3087
+ };
3088
+
3089
+
3090
+ /**
3091
+ * Helper method to check a number against a particular pattern and determine
3092
+ * whether it matches, or is too short or too long. Currently, if a number
3093
+ * pattern suggests that numbers of length 7 and 10 are possible, and a number
3094
+ * in between these possible lengths is entered, such as of length 8, this will
3095
+ * return TOO_LONG.
3096
+ *
3097
+ * @param {string} numberPattern
3098
+ * @param {string} number
3099
+ * @return {i18n.phonenumbers.PhoneNumberUtil.ValidationResult}
3100
+ * @private
3101
+ */
3102
+ i18n.phonenumbers.PhoneNumberUtil.prototype.testNumberLengthAgainstPattern_ =
3103
+ function(numberPattern, number) {
3104
+ if (i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_(numberPattern,
3105
+ number)) {
3106
+ return i18n.phonenumbers.PhoneNumberUtil.ValidationResult.IS_POSSIBLE;
3107
+ }
3108
+ if (number.search(numberPattern) == 0) {
3109
+ return i18n.phonenumbers.PhoneNumberUtil.ValidationResult.TOO_LONG;
3110
+ } else {
3111
+ return i18n.phonenumbers.PhoneNumberUtil.ValidationResult.TOO_SHORT;
3112
+ }
3113
+ };
3114
+
3115
+
3116
+ /**
3117
+ * Helper method to check whether a number is too short to be a regular length
3118
+ * phone number in a region.
3119
+ *
3120
+ * @param {i18n.phonenumbers.PhoneMetadata} regionMetadata
3121
+ * @param {string} number
3122
+ * @return {boolean}
3123
+ * @private
3124
+ */
3125
+ i18n.phonenumbers.PhoneNumberUtil.prototype.isShorterThanPossibleNormalNumber_ =
3126
+ function(regionMetadata, number) {
3127
+ /** @type {string} */
3128
+ var possibleNumberPattern =
3129
+ regionMetadata.getGeneralDesc().getPossibleNumberPatternOrDefault();
3130
+ return this.testNumberLengthAgainstPattern_(possibleNumberPattern, number) ==
3131
+ i18n.phonenumbers.PhoneNumberUtil.ValidationResult.TOO_SHORT;
3132
+ };
3133
+
3134
+
3135
+ /**
3136
+ * Check whether a phone number is a possible number. It provides a more lenient
3137
+ * check than {@link #isValidNumber} in the following sense:
3138
+ * <ol>
3139
+ * <li>It only checks the length of phone numbers. In particular, it doesn't
3140
+ * check starting digits of the number.
3141
+ * <li>It doesn't attempt to figure out the type of the number, but uses general
3142
+ * rules which applies to all types of phone numbers in a region. Therefore, it
3143
+ * is much faster than isValidNumber.
3144
+ * <li>For fixed line numbers, many regions have the concept of area code, which
3145
+ * together with subscriber number constitute the national significant number.
3146
+ * It is sometimes okay to dial the subscriber number only when dialing in the
3147
+ * same area. This function will return true if the subscriber-number-only
3148
+ * version is passed in. On the other hand, because isValidNumber validates
3149
+ * using information on both starting digits (for fixed line numbers, that would
3150
+ * most likely be area codes) and length (obviously includes the length of area
3151
+ * codes for fixed line numbers), it will return false for the
3152
+ * subscriber-number-only version.
3153
+ * </ol>
3154
+ *
3155
+ * @param {i18n.phonenumbers.PhoneNumber} number the number that needs to be
3156
+ * checked.
3157
+ * @return {i18n.phonenumbers.PhoneNumberUtil.ValidationResult} a
3158
+ * ValidationResult object which indicates whether the number is possible.
3159
+ */
3160
+ i18n.phonenumbers.PhoneNumberUtil.prototype.isPossibleNumberWithReason =
3161
+ function(number) {
3162
+
3163
+ /** @type {string} */
3164
+ var nationalNumber = this.getNationalSignificantNumber(number);
3165
+ /** @type {number} */
3166
+ var countryCode = number.getCountryCodeOrDefault();
3167
+ // Note: For Russian Fed and NANPA numbers, we just use the rules from the
3168
+ // default region (US or Russia) since the getRegionCodeForNumber will not
3169
+ // work if the number is possible but not valid. This would need to be
3170
+ // revisited if the possible number pattern ever differed between various
3171
+ // regions within those plans.
3172
+ if (!this.hasValidCountryCallingCode_(countryCode)) {
3173
+ return i18n.phonenumbers.PhoneNumberUtil.ValidationResult
3174
+ .INVALID_COUNTRY_CODE;
3175
+ }
3176
+ /** @type {string} */
3177
+ var regionCode = this.getRegionCodeForCountryCode(countryCode);
3178
+ // Metadata cannot be null because the country calling code is valid.
3179
+ /** @type {i18n.phonenumbers.PhoneMetadata} */
3180
+ var metadata =
3181
+ this.getMetadataForRegionOrCallingCode_(countryCode, regionCode);
3182
+ /** @type {string} */
3183
+ var possibleNumberPattern =
3184
+ metadata.getGeneralDesc().getPossibleNumberPatternOrDefault();
3185
+ return this.testNumberLengthAgainstPattern_(possibleNumberPattern,
3186
+ nationalNumber);
3187
+ };
3188
+
3189
+
3190
+ /**
3191
+ * Check whether a phone number is a possible number given a number in the form
3192
+ * of a string, and the region where the number could be dialed from. It
3193
+ * provides a more lenient check than {@link #isValidNumber}. See
3194
+ * {@link #isPossibleNumber} for details.
3195
+ *
3196
+ * <p>This method first parses the number, then invokes
3197
+ * {@link #isPossibleNumber} with the resultant PhoneNumber object.
3198
+ *
3199
+ * @param {string} number the number that needs to be checked, in the form of a
3200
+ * string.
3201
+ * @param {string} regionDialingFrom the region that we are expecting the number
3202
+ * to be dialed from.
3203
+ * Note this is different from the region where the number belongs.
3204
+ * For example, the number +1 650 253 0000 is a number that belongs to US.
3205
+ * When written in this form, it can be dialed from any region. When it is
3206
+ * written as 00 1 650 253 0000, it can be dialed from any region which uses
3207
+ * an international dialling prefix of 00. When it is written as
3208
+ * 650 253 0000, it can only be dialed from within the US, and when written
3209
+ * as 253 0000, it can only be dialed from within a smaller area in the US
3210
+ * (Mountain View, CA, to be more specific).
3211
+ * @return {boolean} true if the number is possible.
3212
+ */
3213
+ i18n.phonenumbers.PhoneNumberUtil.prototype.isPossibleNumberString =
3214
+ function(number, regionDialingFrom) {
3215
+
3216
+ try {
3217
+ return this.isPossibleNumber(this.parse(number, regionDialingFrom));
3218
+ } catch (e) {
3219
+ return false;
3220
+ }
3221
+ };
3222
+
3223
+
3224
+ /**
3225
+ * Attempts to extract a valid number from a phone number that is too long to be
3226
+ * valid, and resets the PhoneNumber object passed in to that valid version. If
3227
+ * no valid number could be extracted, the PhoneNumber object passed in will not
3228
+ * be modified.
3229
+ * @param {i18n.phonenumbers.PhoneNumber} number a PhoneNumber object which
3230
+ * contains a number that is too long to be valid.
3231
+ * @return {boolean} true if a valid phone number can be successfully extracted.
3232
+ */
3233
+ i18n.phonenumbers.PhoneNumberUtil.prototype.truncateTooLongNumber =
3234
+ function(number) {
3235
+
3236
+ if (this.isValidNumber(number)) {
3237
+ return true;
3238
+ }
3239
+ /** @type {i18n.phonenumbers.PhoneNumber} */
3240
+ var numberCopy = number.clone();
3241
+ /** @type {number} */
3242
+ var nationalNumber = number.getNationalNumberOrDefault();
3243
+ do {
3244
+ nationalNumber = Math.floor(nationalNumber / 10);
3245
+ numberCopy.setNationalNumber(nationalNumber);
3246
+ if (nationalNumber == 0 ||
3247
+ this.isPossibleNumberWithReason(numberCopy) ==
3248
+ i18n.phonenumbers.PhoneNumberUtil.ValidationResult.TOO_SHORT) {
3249
+ return false;
3250
+ }
3251
+ } while (!this.isValidNumber(numberCopy));
3252
+ number.setNationalNumber(nationalNumber);
3253
+ return true;
3254
+ };
3255
+
3256
+
3257
+ /**
3258
+ * Extracts country calling code from fullNumber, returns it and places the
3259
+ * remaining number in nationalNumber. It assumes that the leading plus sign or
3260
+ * IDD has already been removed. Returns 0 if fullNumber doesn't start with a
3261
+ * valid country calling code, and leaves nationalNumber unmodified.
3262
+ *
3263
+ * @param {!goog.string.StringBuffer} fullNumber
3264
+ * @param {!goog.string.StringBuffer} nationalNumber
3265
+ * @return {number}
3266
+ */
3267
+ i18n.phonenumbers.PhoneNumberUtil.prototype.extractCountryCode =
3268
+ function(fullNumber, nationalNumber) {
3269
+
3270
+ /** @type {string} */
3271
+ var fullNumberStr = fullNumber.toString();
3272
+ if ((fullNumberStr.length == 0) || (fullNumberStr.charAt(0) == '0')) {
3273
+ // Country codes do not begin with a '0'.
3274
+ return 0;
3275
+ }
3276
+ /** @type {number} */
3277
+ var potentialCountryCode;
3278
+ /** @type {number} */
3279
+ var numberLength = fullNumberStr.length;
3280
+ for (var i = 1;
3281
+ i <= i18n.phonenumbers.PhoneNumberUtil.MAX_LENGTH_COUNTRY_CODE_ &&
3282
+ i <= numberLength; ++i) {
3283
+ potentialCountryCode = parseInt(fullNumberStr.substring(0, i), 10);
3284
+ if (potentialCountryCode in
3285
+ i18n.phonenumbers.metadata.countryCodeToRegionCodeMap) {
3286
+ nationalNumber.append(fullNumberStr.substring(i));
3287
+ return potentialCountryCode;
3288
+ }
3289
+ }
3290
+ return 0;
3291
+ };
3292
+
3293
+
3294
+ /**
3295
+ * Tries to extract a country calling code from a number. This method will
3296
+ * return zero if no country calling code is considered to be present. Country
3297
+ * calling codes are extracted in the following ways:
3298
+ * <ul>
3299
+ * <li>by stripping the international dialing prefix of the region the person is
3300
+ * dialing from, if this is present in the number, and looking at the next
3301
+ * digits
3302
+ * <li>by stripping the '+' sign if present and then looking at the next digits
3303
+ * <li>by comparing the start of the number and the country calling code of the
3304
+ * default region. If the number is not considered possible for the numbering
3305
+ * plan of the default region initially, but starts with the country calling
3306
+ * code of this region, validation will be reattempted after stripping this
3307
+ * country calling code. If this number is considered a possible number, then
3308
+ * the first digits will be considered the country calling code and removed as
3309
+ * such.
3310
+ * </ul>
3311
+ *
3312
+ * It will throw a i18n.phonenumbers.Error if the number starts with a '+' but
3313
+ * the country calling code supplied after this does not match that of any known
3314
+ * region.
3315
+ *
3316
+ * @param {string} number non-normalized telephone number that we wish to
3317
+ * extract a country calling code from - may begin with '+'.
3318
+ * @param {i18n.phonenumbers.PhoneMetadata} defaultRegionMetadata metadata
3319
+ * about the region this number may be from.
3320
+ * @param {!goog.string.StringBuffer} nationalNumber a string buffer to store
3321
+ * the national significant number in, in the case that a country calling
3322
+ * code was extracted. The number is appended to any existing contents. If
3323
+ * no country calling code was extracted, this will be left unchanged.
3324
+ * @param {boolean} keepRawInput true if the country_code_source and
3325
+ * preferred_carrier_code fields of phoneNumber should be populated.
3326
+ * @param {i18n.phonenumbers.PhoneNumber} phoneNumber the PhoneNumber object
3327
+ * where the country_code and country_code_source need to be populated.
3328
+ * Note the country_code is always populated, whereas country_code_source is
3329
+ * only populated when keepCountryCodeSource is true.
3330
+ * @return {number} the country calling code extracted or 0 if none could be
3331
+ * extracted.
3332
+ * @throws {i18n.phonenumbers.Error}
3333
+ */
3334
+ i18n.phonenumbers.PhoneNumberUtil.prototype.maybeExtractCountryCode =
3335
+ function(number, defaultRegionMetadata, nationalNumber,
3336
+ keepRawInput, phoneNumber) {
3337
+
3338
+ if (number.length == 0) {
3339
+ return 0;
3340
+ }
3341
+ /** @type {!goog.string.StringBuffer} */
3342
+ var fullNumber = new goog.string.StringBuffer(number);
3343
+ // Set the default prefix to be something that will never match.
3344
+ /** @type {?string} */
3345
+ var possibleCountryIddPrefix;
3346
+ if (defaultRegionMetadata != null) {
3347
+ possibleCountryIddPrefix = defaultRegionMetadata.getInternationalPrefix();
3348
+ }
3349
+ if (possibleCountryIddPrefix == null) {
3350
+ possibleCountryIddPrefix = 'NonMatch';
3351
+ }
3352
+
3353
+ /** @type {i18n.phonenumbers.PhoneNumber.CountryCodeSource} */
3354
+ var countryCodeSource = this.maybeStripInternationalPrefixAndNormalize(
3355
+ fullNumber, possibleCountryIddPrefix);
3356
+ if (keepRawInput) {
3357
+ phoneNumber.setCountryCodeSource(countryCodeSource);
3358
+ }
3359
+ if (countryCodeSource !=
3360
+ i18n.phonenumbers.PhoneNumber.CountryCodeSource.FROM_DEFAULT_COUNTRY) {
3361
+ if (fullNumber.getLength() <=
3362
+ i18n.phonenumbers.PhoneNumberUtil.MIN_LENGTH_FOR_NSN_) {
3363
+ throw i18n.phonenumbers.Error.TOO_SHORT_AFTER_IDD;
3364
+ }
3365
+ /** @type {number} */
3366
+ var potentialCountryCode = this.extractCountryCode(fullNumber,
3367
+ nationalNumber);
3368
+ if (potentialCountryCode != 0) {
3369
+ phoneNumber.setCountryCode(potentialCountryCode);
3370
+ return potentialCountryCode;
3371
+ }
3372
+
3373
+ // If this fails, they must be using a strange country calling code that we
3374
+ // don't recognize, or that doesn't exist.
3375
+ throw i18n.phonenumbers.Error.INVALID_COUNTRY_CODE;
3376
+ } else if (defaultRegionMetadata != null) {
3377
+ // Check to see if the number starts with the country calling code for the
3378
+ // default region. If so, we remove the country calling code, and do some
3379
+ // checks on the validity of the number before and after.
3380
+ /** @type {number} */
3381
+ var defaultCountryCode = defaultRegionMetadata.getCountryCodeOrDefault();
3382
+ /** @type {string} */
3383
+ var defaultCountryCodeString = '' + defaultCountryCode;
3384
+ /** @type {string} */
3385
+ var normalizedNumber = fullNumber.toString();
3386
+ if (goog.string.startsWith(normalizedNumber, defaultCountryCodeString)) {
3387
+ /** @type {!goog.string.StringBuffer} */
3388
+ var potentialNationalNumber = new goog.string.StringBuffer(
3389
+ normalizedNumber.substring(defaultCountryCodeString.length));
3390
+ /** @type {i18n.phonenumbers.PhoneNumberDesc} */
3391
+ var generalDesc = defaultRegionMetadata.getGeneralDesc();
3392
+ /** @type {!RegExp} */
3393
+ var validNumberPattern =
3394
+ new RegExp(generalDesc.getNationalNumberPatternOrDefault());
3395
+ // Passing null since we don't need the carrier code.
3396
+ this.maybeStripNationalPrefixAndCarrierCode(
3397
+ potentialNationalNumber, defaultRegionMetadata, null);
3398
+ /** @type {string} */
3399
+ var potentialNationalNumberStr = potentialNationalNumber.toString();
3400
+ /** @type {string} */
3401
+ var possibleNumberPattern =
3402
+ generalDesc.getPossibleNumberPatternOrDefault();
3403
+ // If the number was not valid before but is valid now, or if it was too
3404
+ // long before, we consider the number with the country calling code
3405
+ // stripped to be a better result and keep that instead.
3406
+ if ((!i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_(
3407
+ validNumberPattern, fullNumber.toString()) &&
3408
+ i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_(
3409
+ validNumberPattern, potentialNationalNumberStr)) ||
3410
+ this.testNumberLengthAgainstPattern_(possibleNumberPattern,
3411
+ fullNumber.toString()) ==
3412
+ i18n.phonenumbers.PhoneNumberUtil.ValidationResult.TOO_LONG) {
3413
+ nationalNumber.append(potentialNationalNumberStr);
3414
+ if (keepRawInput) {
3415
+ phoneNumber.setCountryCodeSource(
3416
+ i18n.phonenumbers.PhoneNumber.CountryCodeSource
3417
+ .FROM_NUMBER_WITHOUT_PLUS_SIGN);
3418
+ }
3419
+ phoneNumber.setCountryCode(defaultCountryCode);
3420
+ return defaultCountryCode;
3421
+ }
3422
+ }
3423
+ }
3424
+ // No country calling code present.
3425
+ phoneNumber.setCountryCode(0);
3426
+ return 0;
3427
+ };
3428
+
3429
+
3430
+ /**
3431
+ * Strips the IDD from the start of the number if present. Helper function used
3432
+ * by maybeStripInternationalPrefixAndNormalize.
3433
+ *
3434
+ * @param {!RegExp} iddPattern the regular expression for the international
3435
+ * prefix.
3436
+ * @param {!goog.string.StringBuffer} number the phone number that we wish to
3437
+ * strip any international dialing prefix from.
3438
+ * @return {boolean} true if an international prefix was present.
3439
+ * @private
3440
+ */
3441
+ i18n.phonenumbers.PhoneNumberUtil.prototype.parsePrefixAsIdd_ =
3442
+ function(iddPattern, number) {
3443
+
3444
+ /** @type {string} */
3445
+ var numberStr = number.toString();
3446
+ if (numberStr.search(iddPattern) == 0) {
3447
+ /** @type {number} */
3448
+ var matchEnd = numberStr.match(iddPattern)[0].length;
3449
+ /** @type {Array.<string>} */
3450
+ var matchedGroups = numberStr.substring(matchEnd).match(
3451
+ i18n.phonenumbers.PhoneNumberUtil.CAPTURING_DIGIT_PATTERN);
3452
+ if (matchedGroups && matchedGroups[1] != null &&
3453
+ matchedGroups[1].length > 0) {
3454
+ /** @type {string} */
3455
+ var normalizedGroup =
3456
+ i18n.phonenumbers.PhoneNumberUtil.normalizeDigitsOnly(
3457
+ matchedGroups[1]);
3458
+ if (normalizedGroup == '0') {
3459
+ return false;
3460
+ }
3461
+ }
3462
+ number.clear();
3463
+ number.append(numberStr.substring(matchEnd));
3464
+ return true;
3465
+ }
3466
+ return false;
3467
+ };
3468
+
3469
+
3470
+ /**
3471
+ * Strips any international prefix (such as +, 00, 011) present in the number
3472
+ * provided, normalizes the resulting number, and indicates if an international
3473
+ * prefix was present.
3474
+ *
3475
+ * @param {!goog.string.StringBuffer} number the non-normalized telephone number
3476
+ * that we wish to strip any international dialing prefix from.
3477
+ * @param {string} possibleIddPrefix the international direct dialing prefix
3478
+ * from the region we think this number may be dialed in.
3479
+ * @return {i18n.phonenumbers.PhoneNumber.CountryCodeSource} the corresponding
3480
+ * CountryCodeSource if an international dialing prefix could be removed
3481
+ * from the number, otherwise CountryCodeSource.FROM_DEFAULT_COUNTRY if
3482
+ * the number did not seem to be in international format.
3483
+ */
3484
+ i18n.phonenumbers.PhoneNumberUtil.prototype.
3485
+ maybeStripInternationalPrefixAndNormalize = function(number,
3486
+ possibleIddPrefix) {
3487
+ /** @type {string} */
3488
+ var numberStr = number.toString();
3489
+ if (numberStr.length == 0) {
3490
+ return i18n.phonenumbers.PhoneNumber.CountryCodeSource.FROM_DEFAULT_COUNTRY;
3491
+ }
3492
+ // Check to see if the number begins with one or more plus signs.
3493
+ if (i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN_
3494
+ .test(numberStr)) {
3495
+ numberStr = numberStr.replace(
3496
+ i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN_, '');
3497
+ // Can now normalize the rest of the number since we've consumed the '+'
3498
+ // sign at the start.
3499
+ number.clear();
3500
+ number.append(i18n.phonenumbers.PhoneNumberUtil.normalize(numberStr));
3501
+ return i18n.phonenumbers.PhoneNumber.CountryCodeSource
3502
+ .FROM_NUMBER_WITH_PLUS_SIGN;
3503
+ }
3504
+ // Attempt to parse the first digits as an international prefix.
3505
+ /** @type {!RegExp} */
3506
+ var iddPattern = new RegExp(possibleIddPrefix);
3507
+ i18n.phonenumbers.PhoneNumberUtil.normalizeSB_(number);
3508
+ return this.parsePrefixAsIdd_(iddPattern, number) ?
3509
+ i18n.phonenumbers.PhoneNumber.CountryCodeSource.FROM_NUMBER_WITH_IDD :
3510
+ i18n.phonenumbers.PhoneNumber.CountryCodeSource.FROM_DEFAULT_COUNTRY;
3511
+ };
3512
+
3513
+
3514
+ /**
3515
+ * Strips any national prefix (such as 0, 1) present in the number provided.
3516
+ *
3517
+ * @param {!goog.string.StringBuffer} number the normalized telephone number
3518
+ * that we wish to strip any national dialing prefix from.
3519
+ * @param {i18n.phonenumbers.PhoneMetadata} metadata the metadata for the
3520
+ * region that we think this number is from.
3521
+ * @param {goog.string.StringBuffer} carrierCode a place to insert the carrier
3522
+ * code if one is extracted.
3523
+ * @return {boolean} true if a national prefix or carrier code (or both) could
3524
+ * be extracted.
3525
+ */
3526
+ i18n.phonenumbers.PhoneNumberUtil.prototype.
3527
+ maybeStripNationalPrefixAndCarrierCode = function(number, metadata,
3528
+ carrierCode) {
3529
+ /** @type {string} */
3530
+ var numberStr = number.toString();
3531
+ /** @type {number} */
3532
+ var numberLength = numberStr.length;
3533
+ /** @type {?string} */
3534
+ var possibleNationalPrefix = metadata.getNationalPrefixForParsing();
3535
+ if (numberLength == 0 || possibleNationalPrefix == null ||
3536
+ possibleNationalPrefix.length == 0) {
3537
+ // Early return for numbers of zero length.
3538
+ return false;
3539
+ }
3540
+ // Attempt to parse the first digits as a national prefix.
3541
+ /** @type {!RegExp} */
3542
+ var prefixPattern = new RegExp('^(?:' + possibleNationalPrefix + ')');
3543
+ /** @type {Array.<string>} */
3544
+ var prefixMatcher = prefixPattern.exec(numberStr);
3545
+ if (prefixMatcher) {
3546
+ /** @type {!RegExp} */
3547
+ var nationalNumberRule = new RegExp(
3548
+ metadata.getGeneralDesc().getNationalNumberPatternOrDefault());
3549
+ // Check if the original number is viable.
3550
+ /** @type {boolean} */
3551
+ var isViableOriginalNumber =
3552
+ i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_(
3553
+ nationalNumberRule, numberStr);
3554
+ // prefixMatcher[numOfGroups] == null implies nothing was captured by the
3555
+ // capturing groups in possibleNationalPrefix; therefore, no transformation
3556
+ // is necessary, and we just remove the national prefix.
3557
+ /** @type {number} */
3558
+ var numOfGroups = prefixMatcher.length - 1;
3559
+ /** @type {?string} */
3560
+ var transformRule = metadata.getNationalPrefixTransformRule();
3561
+ /** @type {boolean} */
3562
+ var noTransform = transformRule == null || transformRule.length == 0 ||
3563
+ prefixMatcher[numOfGroups] == null ||
3564
+ prefixMatcher[numOfGroups].length == 0;
3565
+ if (noTransform) {
3566
+ // If the original number was viable, and the resultant number is not,
3567
+ // we return.
3568
+ if (isViableOriginalNumber &&
3569
+ !i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_(
3570
+ nationalNumberRule,
3571
+ numberStr.substring(prefixMatcher[0].length))) {
3572
+ return false;
3573
+ }
3574
+ if (carrierCode != null &&
3575
+ numOfGroups > 0 && prefixMatcher[numOfGroups] != null) {
3576
+ carrierCode.append(prefixMatcher[1]);
3577
+ }
3578
+ number.set(numberStr.substring(prefixMatcher[0].length));
3579
+ return true;
3580
+ } else {
3581
+ // Check that the resultant number is still viable. If not, return. Check
3582
+ // this by copying the string buffer and making the transformation on the
3583
+ // copy first.
3584
+ /** @type {string} */
3585
+ var transformedNumber;
3586
+ transformedNumber = numberStr.replace(prefixPattern, transformRule);
3587
+ if (isViableOriginalNumber &&
3588
+ !i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_(
3589
+ nationalNumberRule, transformedNumber)) {
3590
+ return false;
3591
+ }
3592
+ if (carrierCode != null && numOfGroups > 0) {
3593
+ carrierCode.append(prefixMatcher[1]);
3594
+ }
3595
+ number.set(transformedNumber);
3596
+ return true;
3597
+ }
3598
+ }
3599
+ return false;
3600
+ };
3601
+
3602
+
3603
+ /**
3604
+ * Strips any extension (as in, the part of the number dialled after the call is
3605
+ * connected, usually indicated with extn, ext, x or similar) from the end of
3606
+ * the number, and returns it.
3607
+ *
3608
+ * @param {!goog.string.StringBuffer} number the non-normalized telephone number
3609
+ * that we wish to strip the extension from.
3610
+ * @return {string} the phone extension.
3611
+ */
3612
+ i18n.phonenumbers.PhoneNumberUtil.prototype.maybeStripExtension =
3613
+ function(number) {
3614
+
3615
+ /** @type {string} */
3616
+ var numberStr = number.toString();
3617
+ /** @type {number} */
3618
+ var mStart =
3619
+ numberStr.search(i18n.phonenumbers.PhoneNumberUtil.EXTN_PATTERN_);
3620
+ // If we find a potential extension, and the number preceding this is a viable
3621
+ // number, we assume it is an extension.
3622
+ if (mStart >= 0 && i18n.phonenumbers.PhoneNumberUtil.isViablePhoneNumber(
3623
+ numberStr.substring(0, mStart))) {
3624
+ // The numbers are captured into groups in the regular expression.
3625
+ /** @type {Array.<string>} */
3626
+ var matchedGroups =
3627
+ numberStr.match(i18n.phonenumbers.PhoneNumberUtil.EXTN_PATTERN_);
3628
+ /** @type {number} */
3629
+ var matchedGroupsLength = matchedGroups.length;
3630
+ for (var i = 1; i < matchedGroupsLength; ++i) {
3631
+ if (matchedGroups[i] != null && matchedGroups[i].length > 0) {
3632
+ // We go through the capturing groups until we find one that captured
3633
+ // some digits. If none did, then we will return the empty string.
3634
+ number.clear();
3635
+ number.append(numberStr.substring(0, mStart));
3636
+ return matchedGroups[i];
3637
+ }
3638
+ }
3639
+ }
3640
+ return '';
3641
+ };
3642
+
3643
+
3644
+ /**
3645
+ * Checks to see that the region code used is valid, or if it is not valid, that
3646
+ * the number to parse starts with a + symbol so that we can attempt to infer
3647
+ * the region from the number.
3648
+ * @param {string} numberToParse number that we are attempting to parse.
3649
+ * @param {?string} defaultRegion region that we are expecting the number to be
3650
+ * from.
3651
+ * @return {boolean} false if it cannot use the region provided and the region
3652
+ * cannot be inferred.
3653
+ * @private
3654
+ */
3655
+ i18n.phonenumbers.PhoneNumberUtil.prototype.checkRegionForParsing_ = function(
3656
+ numberToParse, defaultRegion) {
3657
+ // If the number is null or empty, we can't infer the region.
3658
+ return this.isValidRegionCode_(defaultRegion) ||
3659
+ (numberToParse != null && numberToParse.length > 0 &&
3660
+ i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN_.test(
3661
+ numberToParse));
3662
+ };
3663
+
3664
+
3665
+ /**
3666
+ * Parses a string and returns it in proto buffer format. This method will throw
3667
+ * a {@link i18n.phonenumbers.Error} if the number is not considered to be a
3668
+ * possible number. Note that validation of whether the number is actually a
3669
+ * valid number for a particular region is not performed. This can be done
3670
+ * separately with {@link #isValidNumber}.
3671
+ *
3672
+ * @param {?string} numberToParse number that we are attempting to parse. This
3673
+ * can contain formatting such as +, ( and -, as well as a phone number
3674
+ * extension. It can also be provided in RFC3966 format.
3675
+ * @param {?string} defaultRegion region that we are expecting the number to be
3676
+ * from. This is only used if the number being parsed is not written in
3677
+ * international format. The country_code for the number in this case would
3678
+ * be stored as that of the default region supplied. If the number is
3679
+ * guaranteed to start with a '+' followed by the country calling code, then
3680
+ * 'ZZ' or null can be supplied.
3681
+ * @return {i18n.phonenumbers.PhoneNumber} a phone number proto buffer filled
3682
+ * with the parsed number.
3683
+ * @throws {i18n.phonenumbers.Error} if the string is not considered to be a
3684
+ * viable phone number or if no default region was supplied and the number
3685
+ * is not in international format (does not start with +).
3686
+ */
3687
+ i18n.phonenumbers.PhoneNumberUtil.prototype.parse = function(numberToParse,
3688
+ defaultRegion) {
3689
+ return this.parseHelper_(numberToParse, defaultRegion, false, true);
3690
+ };
3691
+
3692
+
3693
+ /**
3694
+ * Parses a string and returns it in proto buffer format. This method differs
3695
+ * from {@link #parse} in that it always populates the raw_input field of the
3696
+ * protocol buffer with numberToParse as well as the country_code_source field.
3697
+ *
3698
+ * @param {string} numberToParse number that we are attempting to parse. This
3699
+ * can contain formatting such as +, ( and -, as well as a phone number
3700
+ * extension.
3701
+ * @param {?string} defaultRegion region that we are expecting the number to be
3702
+ * from. This is only used if the number being parsed is not written in
3703
+ * international format. The country calling code for the number in this
3704
+ * case would be stored as that of the default region supplied.
3705
+ * @return {i18n.phonenumbers.PhoneNumber} a phone number proto buffer filled
3706
+ * with the parsed number.
3707
+ * @throws {i18n.phonenumbers.Error} if the string is not considered to be a
3708
+ * viable phone number or if no default region was supplied.
3709
+ */
3710
+ i18n.phonenumbers.PhoneNumberUtil.prototype.parseAndKeepRawInput =
3711
+ function(numberToParse, defaultRegion) {
3712
+
3713
+ if (!this.isValidRegionCode_(defaultRegion)) {
3714
+ if (numberToParse.length > 0 && numberToParse.charAt(0) !=
3715
+ i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN) {
3716
+ throw i18n.phonenumbers.Error.INVALID_COUNTRY_CODE;
3717
+ }
3718
+ }
3719
+ return this.parseHelper_(numberToParse, defaultRegion, true, true);
3720
+ };
3721
+
3722
+
3723
+ /**
3724
+ * A helper function to set the values related to leading zeros in a
3725
+ * PhoneNumber.
3726
+ *
3727
+ * @param {string} nationalNumber the number we are parsing.
3728
+ * @param {i18n.phonenumbers.PhoneNumber} phoneNumber a phone number proto
3729
+ * buffer to fill in.
3730
+ * @private
3731
+ */
3732
+ i18n.phonenumbers.PhoneNumberUtil.prototype.setItalianLeadingZerosForPhoneNumber_ =
3733
+ function(nationalNumber, phoneNumber) {
3734
+ if (nationalNumber.length > 1 && nationalNumber.charAt(0) == '0') {
3735
+ phoneNumber.setItalianLeadingZero(true);
3736
+ var numberOfLeadingZeros = 1;
3737
+ // Note that if the national number is all "0"s, the last "0" is not counted
3738
+ // as a leading zero.
3739
+ while (numberOfLeadingZeros < nationalNumber.length - 1 &&
3740
+ nationalNumber.charAt(numberOfLeadingZeros) == '0') {
3741
+ numberOfLeadingZeros++;
3742
+ }
3743
+ if (numberOfLeadingZeros != 1) {
3744
+ phoneNumber.setNumberOfLeadingZeros(numberOfLeadingZeros);
3745
+ }
3746
+ }
3747
+ };
3748
+
3749
+
3750
+ /**
3751
+ * Parses a string and returns it in proto buffer format. This method is the
3752
+ * same as the public {@link #parse} method, with the exception that it allows
3753
+ * the default region to be null, for use by {@link #isNumberMatch}.
3754
+ *
3755
+ * @param {?string} numberToParse number that we are attempting to parse. This
3756
+ * can contain formatting such as +, ( and -, as well as a phone number
3757
+ * extension.
3758
+ * @param {?string} defaultRegion region that we are expecting the number to be
3759
+ * from. This is only used if the number being parsed is not written in
3760
+ * international format. The country calling code for the number in this
3761
+ * case would be stored as that of the default region supplied.
3762
+ * @param {boolean} keepRawInput whether to populate the raw_input field of the
3763
+ * phoneNumber with numberToParse.
3764
+ * @param {boolean} checkRegion should be set to false if it is permitted for
3765
+ * the default coregion to be null or unknown ('ZZ').
3766
+ * @return {i18n.phonenumbers.PhoneNumber} a phone number proto buffer filled
3767
+ * with the parsed number.
3768
+ * @throws {i18n.phonenumbers.Error}
3769
+ * @private
3770
+ */
3771
+ i18n.phonenumbers.PhoneNumberUtil.prototype.parseHelper_ =
3772
+ function(numberToParse, defaultRegion, keepRawInput, checkRegion) {
3773
+
3774
+ if (numberToParse == null) {
3775
+ throw i18n.phonenumbers.Error.NOT_A_NUMBER;
3776
+ } else if (numberToParse.length >
3777
+ i18n.phonenumbers.PhoneNumberUtil.MAX_INPUT_STRING_LENGTH_) {
3778
+ throw i18n.phonenumbers.Error.TOO_LONG;
3779
+ }
3780
+
3781
+ /** @type {!goog.string.StringBuffer} */
3782
+ var nationalNumber = new goog.string.StringBuffer();
3783
+ this.buildNationalNumberForParsing_(numberToParse, nationalNumber);
3784
+
3785
+ if (!i18n.phonenumbers.PhoneNumberUtil.isViablePhoneNumber(
3786
+ nationalNumber.toString())) {
3787
+ throw i18n.phonenumbers.Error.NOT_A_NUMBER;
3788
+ }
3789
+
3790
+ // Check the region supplied is valid, or that the extracted number starts
3791
+ // with some sort of + sign so the number's region can be determined.
3792
+ if (checkRegion &&
3793
+ !this.checkRegionForParsing_(nationalNumber.toString(), defaultRegion)) {
3794
+ throw i18n.phonenumbers.Error.INVALID_COUNTRY_CODE;
3795
+ }
3796
+
3797
+ /** @type {i18n.phonenumbers.PhoneNumber} */
3798
+ var phoneNumber = new i18n.phonenumbers.PhoneNumber();
3799
+ if (keepRawInput) {
3800
+ phoneNumber.setRawInput(numberToParse);
3801
+ }
3802
+ // Attempt to parse extension first, since it doesn't require region-specific
3803
+ // data and we want to have the non-normalised number here.
3804
+ /** @type {string} */
3805
+ var extension = this.maybeStripExtension(nationalNumber);
3806
+ if (extension.length > 0) {
3807
+ phoneNumber.setExtension(extension);
3808
+ }
3809
+
3810
+ /** @type {i18n.phonenumbers.PhoneMetadata} */
3811
+ var regionMetadata = this.getMetadataForRegion(defaultRegion);
3812
+ // Check to see if the number is given in international format so we know
3813
+ // whether this number is from the default region or not.
3814
+ /** @type {!goog.string.StringBuffer} */
3815
+ var normalizedNationalNumber = new goog.string.StringBuffer();
3816
+ /** @type {number} */
3817
+ var countryCode = 0;
3818
+ /** @type {string} */
3819
+ var nationalNumberStr = nationalNumber.toString();
3820
+ try {
3821
+ countryCode = this.maybeExtractCountryCode(nationalNumberStr,
3822
+ regionMetadata, normalizedNationalNumber, keepRawInput, phoneNumber);
3823
+ } catch (e) {
3824
+ if (e == i18n.phonenumbers.Error.INVALID_COUNTRY_CODE &&
3825
+ i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN_
3826
+ .test(nationalNumberStr)) {
3827
+ // Strip the plus-char, and try again.
3828
+ nationalNumberStr = nationalNumberStr.replace(
3829
+ i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN_, '');
3830
+ countryCode = this.maybeExtractCountryCode(nationalNumberStr,
3831
+ regionMetadata, normalizedNationalNumber, keepRawInput, phoneNumber);
3832
+ if (countryCode == 0) {
3833
+ throw e;
3834
+ }
3835
+ } else {
3836
+ throw e;
3837
+ }
3838
+ }
3839
+ if (countryCode != 0) {
3840
+ /** @type {string} */
3841
+ var phoneNumberRegion = this.getRegionCodeForCountryCode(countryCode);
3842
+ if (phoneNumberRegion != defaultRegion) {
3843
+ // Metadata cannot be null because the country calling code is valid.
3844
+ regionMetadata = this.getMetadataForRegionOrCallingCode_(
3845
+ countryCode, phoneNumberRegion);
3846
+ }
3847
+ } else {
3848
+ // If no extracted country calling code, use the region supplied instead.
3849
+ // The national number is just the normalized version of the number we were
3850
+ // given to parse.
3851
+ i18n.phonenumbers.PhoneNumberUtil.normalizeSB_(nationalNumber);
3852
+ normalizedNationalNumber.append(nationalNumber.toString());
3853
+ if (defaultRegion != null) {
3854
+ countryCode = regionMetadata.getCountryCodeOrDefault();
3855
+ phoneNumber.setCountryCode(countryCode);
3856
+ } else if (keepRawInput) {
3857
+ phoneNumber.clearCountryCodeSource();
3858
+ }
3859
+ }
3860
+ if (normalizedNationalNumber.getLength() <
3861
+ i18n.phonenumbers.PhoneNumberUtil.MIN_LENGTH_FOR_NSN_) {
3862
+ throw i18n.phonenumbers.Error.TOO_SHORT_NSN;
3863
+ }
3864
+
3865
+ if (regionMetadata != null) {
3866
+ /** @type {!goog.string.StringBuffer} */
3867
+ var carrierCode = new goog.string.StringBuffer();
3868
+ /** @type {!goog.string.StringBuffer} */
3869
+ var potentialNationalNumber =
3870
+ new goog.string.StringBuffer(normalizedNationalNumber.toString());
3871
+ this.maybeStripNationalPrefixAndCarrierCode(
3872
+ potentialNationalNumber, regionMetadata, carrierCode);
3873
+ if (!this.isShorterThanPossibleNormalNumber_(
3874
+ regionMetadata, potentialNationalNumber.toString())) {
3875
+ normalizedNationalNumber = potentialNationalNumber;
3876
+ if (keepRawInput) {
3877
+ phoneNumber.setPreferredDomesticCarrierCode(carrierCode.toString());
3878
+ }
3879
+ }
3880
+ }
3881
+ /** @type {string} */
3882
+ var normalizedNationalNumberStr = normalizedNationalNumber.toString();
3883
+ /** @type {number} */
3884
+ var lengthOfNationalNumber = normalizedNationalNumberStr.length;
3885
+ if (lengthOfNationalNumber <
3886
+ i18n.phonenumbers.PhoneNumberUtil.MIN_LENGTH_FOR_NSN_) {
3887
+ throw i18n.phonenumbers.Error.TOO_SHORT_NSN;
3888
+ }
3889
+ if (lengthOfNationalNumber >
3890
+ i18n.phonenumbers.PhoneNumberUtil.MAX_LENGTH_FOR_NSN_) {
3891
+ throw i18n.phonenumbers.Error.TOO_LONG;
3892
+ }
3893
+ this.setItalianLeadingZerosForPhoneNumber_(
3894
+ normalizedNationalNumberStr, phoneNumber);
3895
+ phoneNumber.setNationalNumber(parseInt(normalizedNationalNumberStr, 10));
3896
+ return phoneNumber;
3897
+ };
3898
+
3899
+
3900
+ /**
3901
+ * Converts numberToParse to a form that we can parse and write it to
3902
+ * nationalNumber if it is written in RFC3966; otherwise extract a possible
3903
+ * number out of it and write to nationalNumber.
3904
+ *
3905
+ * @param {?string} numberToParse number that we are attempting to parse. This
3906
+ * can contain formatting such as +, ( and -, as well as a phone number
3907
+ * extension.
3908
+ * @param {!goog.string.StringBuffer} nationalNumber a string buffer for storing
3909
+ * the national significant number.
3910
+ * @private
3911
+ */
3912
+ i18n.phonenumbers.PhoneNumberUtil.prototype.buildNationalNumberForParsing_ =
3913
+ function(numberToParse, nationalNumber) {
3914
+
3915
+ /** @type {number} */
3916
+ var indexOfPhoneContext = numberToParse.indexOf(
3917
+ i18n.phonenumbers.PhoneNumberUtil.RFC3966_PHONE_CONTEXT_);
3918
+ if (indexOfPhoneContext > 0) {
3919
+ var phoneContextStart = indexOfPhoneContext +
3920
+ i18n.phonenumbers.PhoneNumberUtil.RFC3966_PHONE_CONTEXT_.length;
3921
+ // If the phone context contains a phone number prefix, we need to capture
3922
+ // it, whereas domains will be ignored.
3923
+ if (numberToParse.charAt(phoneContextStart) ==
3924
+ i18n.phonenumbers.PhoneNumberUtil.PLUS_SIGN) {
3925
+ // Additional parameters might follow the phone context. If so, we will
3926
+ // remove them here because the parameters after phone context are not
3927
+ // important for parsing the phone number.
3928
+ var phoneContextEnd = numberToParse.indexOf(';', phoneContextStart);
3929
+ if (phoneContextEnd > 0) {
3930
+ nationalNumber.append(numberToParse.substring(phoneContextStart,
3931
+ phoneContextEnd));
3932
+ } else {
3933
+ nationalNumber.append(numberToParse.substring(phoneContextStart));
3934
+ }
3935
+ }
3936
+
3937
+ // Now append everything between the "tel:" prefix and the phone-context.
3938
+ // This should include the national number, an optional extension or
3939
+ // isdn-subaddress component. Note we also handle the case when "tel:" is
3940
+ // missing, as we have seen in some of the phone number inputs.
3941
+ // In that case, we append everything from the beginning.
3942
+ var indexOfRfc3966Prefix = numberToParse.indexOf(
3943
+ i18n.phonenumbers.PhoneNumberUtil.RFC3966_PREFIX_);
3944
+ var indexOfNationalNumber = (indexOfRfc3966Prefix >= 0) ?
3945
+ indexOfRfc3966Prefix +
3946
+ i18n.phonenumbers.PhoneNumberUtil.RFC3966_PREFIX_.length : 0;
3947
+ nationalNumber.append(numberToParse.substring(indexOfNationalNumber,
3948
+ indexOfPhoneContext));
3949
+ } else {
3950
+ // Extract a possible number from the string passed in (this strips leading
3951
+ // characters that could not be the start of a phone number.)
3952
+ nationalNumber.append(
3953
+ i18n.phonenumbers.PhoneNumberUtil.extractPossibleNumber(numberToParse));
3954
+ }
3955
+
3956
+ // Delete the isdn-subaddress and everything after it if it is present.
3957
+ // Note extension won't appear at the same time with isdn-subaddress
3958
+ // according to paragraph 5.3 of the RFC3966 spec,
3959
+ /** @type {string} */
3960
+ var nationalNumberStr = nationalNumber.toString();
3961
+ var indexOfIsdn = nationalNumberStr.indexOf(
3962
+ i18n.phonenumbers.PhoneNumberUtil.RFC3966_ISDN_SUBADDRESS_);
3963
+ if (indexOfIsdn > 0) {
3964
+ nationalNumber.clear();
3965
+ nationalNumber.append(nationalNumberStr.substring(0, indexOfIsdn));
3966
+ }
3967
+ // If both phone context and isdn-subaddress are absent but other
3968
+ // parameters are present, the parameters are left in nationalNumber. This
3969
+ // is because we are concerned about deleting content from a potential
3970
+ // number string when there is no strong evidence that the number is
3971
+ // actually written in RFC3966.
3972
+ };
3973
+
3974
+
3975
+ /**
3976
+ * Takes two phone numbers and compares them for equality.
3977
+ *
3978
+ * <p>Returns EXACT_MATCH if the country_code, NSN, presence of a leading zero
3979
+ * for Italian numbers and any extension present are the same. Returns NSN_MATCH
3980
+ * if either or both has no region specified, and the NSNs and extensions are
3981
+ * the same. Returns SHORT_NSN_MATCH if either or both has no region specified,
3982
+ * or the region specified is the same, and one NSN could be a shorter version
3983
+ * of the other number. This includes the case where one has an extension
3984
+ * specified, and the other does not. Returns NO_MATCH otherwise. For example,
3985
+ * the numbers +1 345 657 1234 and 657 1234 are a SHORT_NSN_MATCH. The numbers
3986
+ * +1 345 657 1234 and 345 657 are a NO_MATCH.
3987
+ *
3988
+ * @param {i18n.phonenumbers.PhoneNumber|string} firstNumberIn first number to
3989
+ * compare. If it is a string it can contain formatting, and can have
3990
+ * country calling code specified with + at the start.
3991
+ * @param {i18n.phonenumbers.PhoneNumber|string} secondNumberIn second number to
3992
+ * compare. If it is a string it can contain formatting, and can have
3993
+ * country calling code specified with + at the start.
3994
+ * @return {i18n.phonenumbers.PhoneNumberUtil.MatchType} NOT_A_NUMBER, NO_MATCH,
3995
+ * SHORT_NSN_MATCH, NSN_MATCH or EXACT_MATCH depending on the level of
3996
+ * equality of the two numbers, described in the method definition.
3997
+ */
3998
+ i18n.phonenumbers.PhoneNumberUtil.prototype.isNumberMatch =
3999
+ function(firstNumberIn, secondNumberIn) {
4000
+
4001
+ // If the input arguements are strings parse them to a proto buffer format.
4002
+ // Else make copies of the phone numbers so that the numbers passed in are not
4003
+ // edited.
4004
+ /** @type {i18n.phonenumbers.PhoneNumber} */
4005
+ var firstNumber;
4006
+ /** @type {i18n.phonenumbers.PhoneNumber} */
4007
+ var secondNumber;
4008
+ if (typeof firstNumberIn == 'string') {
4009
+ // First see if the first number has an implicit country calling code, by
4010
+ // attempting to parse it.
4011
+ try {
4012
+ firstNumber = this.parse(
4013
+ firstNumberIn, i18n.phonenumbers.PhoneNumberUtil.UNKNOWN_REGION_);
4014
+ } catch (e) {
4015
+ if (e != i18n.phonenumbers.Error.INVALID_COUNTRY_CODE) {
4016
+ return i18n.phonenumbers.PhoneNumberUtil.MatchType.NOT_A_NUMBER;
4017
+ }
4018
+ // The first number has no country calling code. EXACT_MATCH is no longer
4019
+ // possible. We parse it as if the region was the same as that for the
4020
+ // second number, and if EXACT_MATCH is returned, we replace this with
4021
+ // NSN_MATCH.
4022
+ if (typeof secondNumberIn != 'string') {
4023
+ /** @type {string} */
4024
+ var secondNumberRegion = this.getRegionCodeForCountryCode(
4025
+ secondNumberIn.getCountryCodeOrDefault());
4026
+ if (secondNumberRegion !=
4027
+ i18n.phonenumbers.PhoneNumberUtil.UNKNOWN_REGION_) {
4028
+ try {
4029
+ firstNumber = this.parse(firstNumberIn, secondNumberRegion);
4030
+ } catch (e2) {
4031
+ return i18n.phonenumbers.PhoneNumberUtil.MatchType.NOT_A_NUMBER;
4032
+ }
4033
+ /** @type {i18n.phonenumbers.PhoneNumberUtil.MatchType} */
4034
+ var match = this.isNumberMatch(firstNumber, secondNumberIn);
4035
+ if (match ==
4036
+ i18n.phonenumbers.PhoneNumberUtil.MatchType.EXACT_MATCH) {
4037
+ return i18n.phonenumbers.PhoneNumberUtil.MatchType.NSN_MATCH;
4038
+ }
4039
+ return match;
4040
+ }
4041
+ }
4042
+ // If the second number is a string or doesn't have a valid country
4043
+ // calling code, we parse the first number without country calling code.
4044
+ try {
4045
+ firstNumber = this.parseHelper_(firstNumberIn, null, false, false);
4046
+ } catch (e2) {
4047
+ return i18n.phonenumbers.PhoneNumberUtil.MatchType.NOT_A_NUMBER;
4048
+ }
4049
+ }
4050
+ } else {
4051
+ firstNumber = firstNumberIn.clone();
4052
+ }
4053
+ if (typeof secondNumberIn == 'string') {
4054
+ try {
4055
+ secondNumber = this.parse(
4056
+ secondNumberIn, i18n.phonenumbers.PhoneNumberUtil.UNKNOWN_REGION_);
4057
+ return this.isNumberMatch(firstNumberIn, secondNumber);
4058
+ } catch (e) {
4059
+ if (e != i18n.phonenumbers.Error.INVALID_COUNTRY_CODE) {
4060
+ return i18n.phonenumbers.PhoneNumberUtil.MatchType.NOT_A_NUMBER;
4061
+ }
4062
+ return this.isNumberMatch(secondNumberIn, firstNumber);
4063
+ }
4064
+ } else {
4065
+ secondNumber = secondNumberIn.clone();
4066
+ }
4067
+ // First clear raw_input, country_code_source and
4068
+ // preferred_domestic_carrier_code fields and any empty-string extensions so
4069
+ // that we can use the proto-buffer equality method.
4070
+ firstNumber.clearRawInput();
4071
+ firstNumber.clearCountryCodeSource();
4072
+ firstNumber.clearPreferredDomesticCarrierCode();
4073
+ secondNumber.clearRawInput();
4074
+ secondNumber.clearCountryCodeSource();
4075
+ secondNumber.clearPreferredDomesticCarrierCode();
4076
+ if (firstNumber.hasExtension() && firstNumber.getExtension().length == 0) {
4077
+ firstNumber.clearExtension();
4078
+ }
4079
+ if (secondNumber.hasExtension() && secondNumber.getExtension().length == 0) {
4080
+ secondNumber.clearExtension();
4081
+ }
4082
+
4083
+ // Early exit if both had extensions and these are different.
4084
+ if (firstNumber.hasExtension() && secondNumber.hasExtension() &&
4085
+ firstNumber.getExtension() != secondNumber.getExtension()) {
4086
+ return i18n.phonenumbers.PhoneNumberUtil.MatchType.NO_MATCH;
4087
+ }
4088
+ /** @type {number} */
4089
+ var firstNumberCountryCode = firstNumber.getCountryCodeOrDefault();
4090
+ /** @type {number} */
4091
+ var secondNumberCountryCode = secondNumber.getCountryCodeOrDefault();
4092
+ // Both had country_code specified.
4093
+ if (firstNumberCountryCode != 0 && secondNumberCountryCode != 0) {
4094
+ if (firstNumber.equals(secondNumber)) {
4095
+ return i18n.phonenumbers.PhoneNumberUtil.MatchType.EXACT_MATCH;
4096
+ } else if (firstNumberCountryCode == secondNumberCountryCode &&
4097
+ this.isNationalNumberSuffixOfTheOther_(firstNumber, secondNumber)) {
4098
+ // A SHORT_NSN_MATCH occurs if there is a difference because of the
4099
+ // presence or absence of an 'Italian leading zero', the presence or
4100
+ // absence of an extension, or one NSN being a shorter variant of the
4101
+ // other.
4102
+ return i18n.phonenumbers.PhoneNumberUtil.MatchType.SHORT_NSN_MATCH;
4103
+ }
4104
+ // This is not a match.
4105
+ return i18n.phonenumbers.PhoneNumberUtil.MatchType.NO_MATCH;
4106
+ }
4107
+ // Checks cases where one or both country_code fields were not specified. To
4108
+ // make equality checks easier, we first set the country_code fields to be
4109
+ // equal.
4110
+ firstNumber.setCountryCode(0);
4111
+ secondNumber.setCountryCode(0);
4112
+ // If all else was the same, then this is an NSN_MATCH.
4113
+ if (firstNumber.equals(secondNumber)) {
4114
+ return i18n.phonenumbers.PhoneNumberUtil.MatchType.NSN_MATCH;
4115
+ }
4116
+ if (this.isNationalNumberSuffixOfTheOther_(firstNumber, secondNumber)) {
4117
+ return i18n.phonenumbers.PhoneNumberUtil.MatchType.SHORT_NSN_MATCH;
4118
+ }
4119
+ return i18n.phonenumbers.PhoneNumberUtil.MatchType.NO_MATCH;
4120
+ };
4121
+
4122
+
4123
+ /**
4124
+ * Returns true when one national number is the suffix of the other or both are
4125
+ * the same.
4126
+ *
4127
+ * @param {i18n.phonenumbers.PhoneNumber} firstNumber the first PhoneNumber
4128
+ * object.
4129
+ * @param {i18n.phonenumbers.PhoneNumber} secondNumber the second PhoneNumber
4130
+ * object.
4131
+ * @return {boolean} true if one PhoneNumber is the suffix of the other one.
4132
+ * @private
4133
+ */
4134
+ i18n.phonenumbers.PhoneNumberUtil.prototype.isNationalNumberSuffixOfTheOther_ =
4135
+ function(firstNumber, secondNumber) {
4136
+
4137
+ /** @type {string} */
4138
+ var firstNumberNationalNumber = '' + firstNumber.getNationalNumber();
4139
+ /** @type {string} */
4140
+ var secondNumberNationalNumber = '' + secondNumber.getNationalNumber();
4141
+ // Note that endsWith returns true if the numbers are equal.
4142
+ return goog.string.endsWith(firstNumberNationalNumber,
4143
+ secondNumberNationalNumber) ||
4144
+ goog.string.endsWith(secondNumberNationalNumber,
4145
+ firstNumberNationalNumber);
4146
+ };
4147
+
4148
+
4149
+ /**
4150
+ * Returns true if the number can be dialled from outside the region, or
4151
+ * unknown. If the number can only be dialled from within the region, returns
4152
+ * false. Does not check the number is a valid number.
4153
+ * TODO: Make this method public when we have enough metadata to make it
4154
+ * worthwhile. Currently visible for testing purposes only.
4155
+ *
4156
+ * @param {i18n.phonenumbers.PhoneNumber} number the phone-number for which we
4157
+ * want to know whether it is diallable from outside the region.
4158
+ * @return {boolean} true if the number can only be dialled from within the
4159
+ * country.
4160
+ */
4161
+ i18n.phonenumbers.PhoneNumberUtil.prototype.canBeInternationallyDialled =
4162
+ function(number) {
4163
+ /** @type {i18n.phonenumbers.PhoneMetadata} */
4164
+ var metadata = this.getMetadataForRegion(this.getRegionCodeForNumber(number));
4165
+ if (metadata == null) {
4166
+ // Note numbers belonging to non-geographical entities (e.g. +800 numbers)
4167
+ // are always internationally diallable, and will be caught here.
4168
+ return true;
4169
+ }
4170
+ /** @type {string} */
4171
+ var nationalSignificantNumber = this.getNationalSignificantNumber(number);
4172
+ return !this.isNumberMatchingDesc_(nationalSignificantNumber,
4173
+ metadata.getNoInternationalDialling());
4174
+ };
4175
+
4176
+
4177
+ /**
4178
+ * Check whether the entire input sequence can be matched against the regular
4179
+ * expression.
4180
+ *
4181
+ * @param {!RegExp|string} regex the regular expression to match against.
4182
+ * @param {string} str the string to test.
4183
+ * @return {boolean} true if str can be matched entirely against regex.
4184
+ * @private
4185
+ */
4186
+ i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_ = function(regex, str) {
4187
+ /** @type {Array.<string>} */
4188
+ var matchedGroups = (typeof regex == 'string') ?
4189
+ str.match('^(?:' + regex + ')$') : str.match(regex);
4190
+ if (matchedGroups && matchedGroups[0].length == str.length) {
4191
+ return true;
4192
+ }
4193
+ return false;
4194
+ };