Browse Source

Add Short Number capabilities to libphonenumber-javascript. (#2122)

* ShortNumberInfo metadata tooling - add missing fields to generated JSON.

Adjust javascript metadata generation tooling to include PhoneMetadata proto fields 29,30,31, and 33 that were previously excluded which are now needed for ShortNumberInfo.

* Add shortnumberinfo metadata to build metadata golden tests.

* Remove inaccurate comments in build tooling

* Add namespace to BuildMetadataJsonFromXml to support tool reuse

* Use updated build tooling to generate short number metadata file

* update phonemetadata.pb.js to match the current proto definition

* remove field 7 from phonemetadata.pb.js

* Update build tool to correctly namespacee the generated metadata files

* Stop field 32 from being populated as it is not used in the APIs

* remove metadata accessors for field 32.

* Add tests for connectsToEmergenyNumber and isEmergencyNumber.

Updated linter to include shortnumberinfo related files, and fixed some
lint issues existing with PhoneNumberUtil files.

* ShortNumberInfo functionality and tests ported. Unformatted and missing jsdoc

* Added comments, and fixed as many lint issues as possible.

* lint and comment review comments from andyst addressed.

* Add a golden metadata build test for short number metadata.

* Revert changes to the original phone metadata golden tests.

* Fix a lot of linting and jsdoc typing errors caught by the compiler.

* Add ShortNumberInfo to the javascript demo pages.

* Add ShortNumberIInfo porting to pending_code_changes.

* Add constants to golden tests.

* Update the build tooling

* uUdate pending changes to differentiate build and code changes

* Update build file, fix small test closure compilation issues

* Regenerate short number metadata to account for metadata updates between original generation and now.

* Move requires to alphabetical order
pull/2131/head
James Wright 8 years ago
committed by Andy Staudacher
parent
commit
257355d846
20 changed files with 5755 additions and 106 deletions
  1. +9
    -0
      java/build.xml
  2. +9
    -0
      javascript/build.xml
  3. +201
    -61
      javascript/i18n/phonenumbers/demo-compiled.js
  4. +2
    -0
      javascript/i18n/phonenumbers/demo.html
  5. +12
    -0
      javascript/i18n/phonenumbers/demo.js
  6. +226
    -2
      javascript/i18n/phonenumbers/phonemetadata.pb.js
  7. +47
    -28
      javascript/i18n/phonenumbers/phonenumberutil.js
  8. +2
    -2
      javascript/i18n/phonenumbers/phonenumberutil_test.js
  9. +3
    -0
      javascript/i18n/phonenumbers/regioncodefortesting.js
  10. +711
    -0
      javascript/i18n/phonenumbers/shortnumberinfo.js
  11. +39
    -0
      javascript/i18n/phonenumbers/shortnumberinfo_test.html
  12. +467
    -0
      javascript/i18n/phonenumbers/shortnumberinfo_test.js
  13. +3737
    -0
      javascript/i18n/phonenumbers/shortnumbermetadata.js
  14. +2
    -1
      pending_code_changes.txt
  15. +21
    -11
      tools/java/java-build/src/com/google/i18n/phonenumbers/BuildMetadataJsonFromXml.java
  16. BIN
      tools/java/java-build/target/java-build-1.0-SNAPSHOT-jar-with-dependencies.jar
  17. +2
    -1
      tools/java/java-build/test/com/google/i18n/phonenumbers/BuildMetadataJsonFromXmlGoldenTest.java
  18. +60
    -0
      tools/java/java-build/test/com/google/i18n/phonenumbers/BuildShortNumberMetadataJsonFromXmlGoldenTest.java
  19. +117
    -0
      tools/java/java-build/test/com/google/i18n/phonenumbers/buildtools/testdata/ShortNumberMetadataForGoldenTests.xml
  20. +88
    -0
      tools/java/java-build/test/com/google/i18n/phonenumbers/buildtools/testdata/expected_shortnumbermetadata.js

+ 9
- 0
java/build.xml View File

@ -167,6 +167,15 @@
<arg value="${javascript.dir}/i18n/phonenumbers/metadatalite.js"/>
<arg value="true"/> <!-- Lite metadata. -->
</exec>
<exec executable="java">
<arg value="-jar" />
<arg value="${build.tools.jar}"/>
<arg value="BuildMetadataJsonFromXml"/>
<arg value="${resources.dir}/ShortNumberMetadata.xml"/>
<arg value="${javascript.dir}/i18n/phonenumbers/shortnumbermetadata.js"/>
<arg value="false"/> <!-- Lite metadata. -->
<arg value="i18n.phonenumbers.shortnumbermetadata" /> <!-- namespace to provide -->
</exec>
<exec executable="java">
<arg value="-jar" />
<arg value="${build.tools.jar}"/>


+ 9
- 0
javascript/build.xml View File

@ -127,6 +127,14 @@
<arg line='-e "i18n/phonenumbers/metadatalite.js"' />
</extraflags>
</closure-compile>
<closure-compile inputfile="i18n/phonenumbers/shortnumberinfo_test.js"
outputfile="${null.device}">
<extraflags>
<arg line='-p "i18n/phonenumbers"' />
<arg line='-e "i18n/phonenumbers/metadata.js"' />
<arg line='-e "i18n/phonenumbers/metadatalite.js"' />
</extraflags>
</closure-compile>
</target>
<target name="compile" depends="compile-demo,compile-tests" />
@ -135,6 +143,7 @@
<gjslint inputfile="i18n/phonenumbers/asyoutypeformatter*.js" />
<gjslint inputfile="i18n/phonenumbers/demo.js" />
<gjslint inputfile="i18n/phonenumbers/phonenumberutil*.js" />
<gjslint inputfile="i18n/phonenumbers/shortnumberinfo*.js" />
</target>
</project>

+ 201
- 61
javascript/i18n/phonenumbers/demo-compiled.js View File

@ -1,15 +1,14 @@
(function(){for(var aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},k="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,m=["String","prototype","repeat"],ba=0;ba<m.length-1;ba++){var ca=m[ba];ca in k||(k[ca]={});k=k[ca]}
var da=m[m.length-1],ea=k[da],fa=ea?ea:function(a){var b;if(null==this)throw new TypeError("The 'this' value for String.prototype.repeat must not be null or undefined");b=this+"";if(0>a||1342177279<a)throw new RangeError("Invalid count value");a|=0;for(var c="";a;)if(a&1&&(c+=b),a>>>=1)b+=b;return c};fa!=ea&&null!=fa&&aa(k,da,{configurable:!0,writable:!0,value:fa});
function ga(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function n(a){return"string"==typeof a}function p(a,b){function c(){}c.prototype=b.prototype;a.ca=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.na=function(a,c,f){for(var d=Array(arguments.length-2),e=2;e<arguments.length;e++)d[e-2]=arguments[e];return b.prototype[c].apply(a,d)}};function q(a){if(Error.captureStackTrace)Error.captureStackTrace(this,q);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))}p(q,Error);q.prototype.name="CustomError";function ha(a,b){for(var c=a.split("%s"),d="",e=Array.prototype.slice.call(arguments,1);e.length&&1<c.length;)d+=c.shift()+e.shift();return d+c.join("%s")};function ia(a,b){b.unshift(a);q.call(this,ha.apply(null,b));b.shift()}p(ia,q);ia.prototype.name="AssertionError";function ja(a,b){throw new ia("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));};var ka=Array.prototype.indexOf?function(a,b,c){return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(n(a))return n(b)&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1};function la(a,b){a.sort(b||ma)}function ma(a,b){return a>b?1:a<b?-1:0};function na(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function oa(a,b){var c;a:{for(c in a)if(b.call(void 0,a[c],c,a))break a;c=void 0}return c&&a[c]};function pa(a){var b=document;return n(a)?b.getElementById(a):a};function qa(a){var b=[];ra(new sa,a,b);return b.join("")}function sa(){}
function ra(a,b,c){if(null==b)c.push("null");else{if("object"==typeof b){if("array"==ga(b)){var d=b;b=d.length;c.push("[");for(var e="",f=0;f<b;f++)c.push(e),e=d[f],ra(a,e,c),e=",";c.push("]");return}if(b instanceof String||b instanceof Number||b instanceof Boolean)b=b.valueOf();else{c.push("{");f="";for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(e=b[d],"function"!=typeof e&&(c.push(f),ta(d,c),c.push(":"),ra(a,e,c),f=","));c.push("}");return}}switch(typeof b){case "string":ta(b,c);break;case "number":c.push(isFinite(b)&&
!isNaN(b)?String(b):"null");break;case "boolean":c.push(String(b));break;case "function":c.push("null");break;default:throw Error("Unknown type: "+typeof b);}}}var ua={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},va=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g;
function ta(a,b){b.push('"',a.replace(va,function(a){var b=ua[a];b||(b="\\u"+(a.charCodeAt(0)|65536).toString(16).substr(1),ua[a]=b);return b}),'"')};function wa(a,b){this.a=a;this.l=b.name;this.f=!!b.u;this.b=b.c;this.j=b.type;this.i=!1;switch(this.b){case xa:case ya:case za:case Aa:case Ba:case Ca:case Da:this.i=!0}this.g=b.defaultValue}var Da=1,Ca=2,xa=3,ya=4,za=6,Aa=16,Ba=18;function Ea(a,b){this.b=a;this.a={};for(var c=0;c<b.length;c++){var d=b[c];this.a[d.a]=d}}function Fa(a){a=na(a.a);la(a,function(a,c){return a.a-c.a});return a}function Ga(a,b){return oa(a.a,function(a){return a.l==b})||null};function r(){this.b={};this.f=this.h().a;this.a=this.g=null}function Ha(a,b){for(var c in a.b){var d=Number(c);a.f[d]||b.call(a,d,a.b[c])}}r.prototype.has=function(a){return t(this,a.a)};r.prototype.get=function(a,b){return u(this,a.a,b)};r.prototype.set=function(a,b){v(this,a.a,b)};
function Ia(a,b){for(var c=Fa(a.h()),d=0;d<c.length;d++){var e=c[d],f=e.a;if(t(b,f)){a.a&&delete a.a[e.a];var g=11==e.b||10==e.b;if(e.f)for(var e=w(b,f),h=0;h<e.length;h++)Ja(a,f,g?e[h].clone():e[h]);else e=Ka(b,f),g?(g=Ka(a,f))?Ia(g,e):v(a,f,e.clone()):v(a,f,e)}}}r.prototype.clone=function(){var a=new this.constructor;a!=this&&(a.b={},a.a&&(a.a={}),Ia(a,this));return a};function t(a,b){return null!=a.b[b]}
function Ka(a,b){var c=a.b[b];if(null==c)return null;if(a.g){if(!(b in a.a)){var d=a.g,e=a.f[b];if(null!=c)if(e.f){for(var f=[],g=0;g<c.length;g++)f[g]=d.a(e,c[g]);c=f}else c=d.a(e,c);return a.a[b]=c}return a.a[b]}return c}function u(a,b,c){var d=Ka(a,b);return a.f[b].f?d[c||0]:d}function y(a,b){var c;if(t(a,b))c=u(a,b,void 0);else a:{c=a.f[b];if(void 0===c.g){var d=c.j;if(d===Boolean)c.g=!1;else if(d===Number)c.g=0;else if(d===String)c.g=c.i?"0":"";else{c=new d;break a}}c=c.g}return c}
function w(a,b){return Ka(a,b)||[]}function z(a,b){return a.f[b].f?t(a,b)?a.b[b].length:0:t(a,b)?1:0}function v(a,b,c){a.b[b]=c;a.a&&(a.a[b]=c)}function Ja(a,b,c){a.b[b]||(a.b[b]=[]);a.b[b].push(c);a.a&&delete a.a[b]}function La(a,b){delete a.b[b];a.a&&delete a.a[b]}function Ma(a,b){var c=[],d;for(d in b)0!=d&&c.push(new wa(d,b[d]));return new Ea(a,c)};function A(){}A.prototype.b=function(a,b){return 11==a.b||10==a.b?this.g(b):"number"!=typeof b||isFinite(b)?b:b.toString()};A.prototype.f=function(a,b){var c=new a.b;this.i(c,b);return c};
A.prototype.a=function(a,b){if(11==a.b||10==a.b)return b instanceof r?b:this.f(a.j.prototype.h(),b);if(14==a.b){if(n(b)&&Na.test(b)){var c=Number(b);if(0<c)return c}return b}if(!a.i)return b;c=a.j;if(c===String){if("number"==typeof b)return String(b)}else if(c===Number&&n(b)&&("Infinity"===b||"-Infinity"===b||"NaN"===b||Na.test(b)))return Number(b);return b};var Na=/^-?[0-9]+$/;function B(a,b){this.j=a;this.l=b}p(B,A);B.prototype.g=function(a){for(var b=Fa(a.h()),c={},d=0;d<b.length;d++){var e=b[d],f=1==this.j?e.l:e.a;if(a.has(e))if(e.f){var g=[];c[f]=g;for(f=0;f<z(a,e.a);f++)g.push(this.b(e,a.get(e,f)))}else c[f]=this.b(e,a.get(e))}Ha(a,function(a,b){c[a]=b});return c};B.prototype.b=function(a,b){return this.l&&8==a.b&&"boolean"==typeof b?b?1:0:B.ca.b.call(this,a,b)};B.prototype.a=function(a,b){return 8==a.b&&"number"==typeof b?!!b:B.ca.a.call(this,a,b)};
B.prototype.i=function(a,b){var c=a.h(),d;for(d in b){var e,f=b[d],g=!/[^0-9]/.test(d);if(e=g?c.a[parseInt(d,10)]||null:Ga(c,d))if(e.f)for(g=0;g<f.length;g++){var h=this.a(e,f[g]);Ja(a,e.a,h)}else a.set(e,this.a(e,f));else g?(e=a,g=Number(d),e.b[g]=f,e.a&&delete e.a[g]):ja("Failed to find field: "+d)}};function C(a,b){null!=a&&this.a.apply(this,arguments)}C.prototype.b="";C.prototype.set=function(a){this.b=""+a};C.prototype.a=function(a,b,c){this.b+=String(a);if(null!=b)for(var d=1;d<arguments.length;d++)this.b+=arguments[d];return this};function D(a){a.b=""}C.prototype.toString=function(){return this.b};/*
(function(){function h(a){return"string"==typeof a}function aa(a){a.da=void 0;a.ca=function(){return a.da?a.da:a.da=new a}}
function ba(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function l(a,b){function c(){}c.prototype=b.prototype;a.ea=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.pa=function(a,c,f){for(var d=Array(arguments.length-2),e=2;e<arguments.length;e++)d[e-2]=arguments[e];return b.prototype[c].apply(a,d)}};function n(a){if(Error.captureStackTrace)Error.captureStackTrace(this,n);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))}l(n,Error);n.prototype.name="CustomError";function ca(a,b){a=a.split("%s");for(var c="",d=a.length-1,e=0;e<d;e++)c+=a[e]+(e<b.length?b[e]:"%s");n.call(this,c+a[d])}l(ca,n);ca.prototype.name="AssertionError";function da(a,b){throw new ca("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));};var p=Array.prototype.indexOf?function(a,b,c){return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(h(a))return h(b)&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1};function q(a,b){return 0<=p(a,b)}function ea(a,b){a.sort(b||fa)}function fa(a,b){return a>b?1:a<b?-1:0};function ha(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};function ia(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function ja(a,b){a:{for(var c in a)if(b.call(void 0,a[c],c,a)){b=c;break a}b=void 0}return b&&a[b]};function r(a){var b=document;return h(a)?b.getElementById(a):a};function ka(a){var b=[];la(new na,a,b);return b.join("")}function na(){}
function la(a,b,c){if(null==b)c.push("null");else{if("object"==typeof b){if("array"==ba(b)){var d=b;b=d.length;c.push("[");for(var e="",f=0;f<b;f++)c.push(e),e=d[f],la(a,e,c),e=",";c.push("]");return}if(b instanceof String||b instanceof Number||b instanceof Boolean)b=b.valueOf();else{c.push("{");f="";for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(e=b[d],"function"!=typeof e&&(c.push(f),oa(d,c),c.push(":"),la(a,e,c),f=","));c.push("}");return}}switch(typeof b){case "string":oa(b,c);break;case "number":c.push(isFinite(b)&&
!isNaN(b)?String(b):"null");break;case "boolean":c.push(String(b));break;case "function":c.push("null");break;default:throw Error("Unknown type: "+typeof b);}}}var pa={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},qa=/\uffff/.test("\uffff")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g;
function oa(a,b){b.push('"',a.replace(qa,function(a){var b=pa[a];b||(b="\\u"+(a.charCodeAt(0)|65536).toString(16).substr(1),pa[a]=b);return b}),'"')};function ra(a,b){this.a=a;this.j=b.name;this.f=!!b.u;this.b=b.c;this.l=b.type;this.i=!1;switch(this.b){case sa:case ta:case ua:case va:case wa:case xa:case ya:this.i=!0}this.g=b.defaultValue}var ya=1,xa=2,sa=3,ta=4,ua=6,va=16,wa=18;function za(a,b){this.b=a;this.a={};for(a=0;a<b.length;a++){var c=b[a];this.a[c.a]=c}}function Aa(a){a=ia(a.a);ea(a,function(a,c){return a.a-c.a});return a}function Ba(a,b){return ja(a.a,function(a){return a.j==b})||null};function t(){this.b={};this.f=this.h().a;this.a=this.g=null}function Ca(a,b){for(var c in a.b){var d=Number(c);a.f[d]||b.call(a,d,a.b[c])}}t.prototype.has=function(a){return u(this,a.a)};t.prototype.get=function(a,b){return v(this,a.a,b)};t.prototype.set=function(a,b){w(this,a.a,b)};t.prototype.add=function(a,b){Da(this,a.a,b)};
function Ea(a,b){for(var c=Aa(a.h()),d=0;d<c.length;d++){var e=c[d],f=e.a;if(u(b,f)){a.a&&delete a.a[e.a];var g=11==e.b||10==e.b;if(e.f){e=x(b,f);for(var k=0;k<e.length;k++)Da(a,f,g?e[k].clone():e[k])}else e=Fa(b,f),g?(g=Fa(a,f))?Ea(g,e):w(a,f,e.clone()):w(a,f,e)}}}t.prototype.clone=function(){var a=new this.constructor;a!=this&&(a.b={},a.a&&(a.a={}),Ea(a,this));return a};function u(a,b){return null!=a.b[b]}
function Fa(a,b){var c=a.b[b];if(null==c)return null;if(a.g){if(!(b in a.a)){var d=a.g,e=a.f[b];if(null!=c)if(e.f){for(var f=[],g=0;g<c.length;g++)f[g]=d.a(e,c[g]);c=f}else c=d.a(e,c);return a.a[b]=c}return a.a[b]}return c}function v(a,b,c){var d=Fa(a,b);return a.f[b].f?d[c||0]:d}function y(a,b){if(u(a,b))a=v(a,b,void 0);else a:{a=a.f[b];if(void 0===a.g)if(b=a.l,b===Boolean)a.g=!1;else if(b===Number)a.g=0;else if(b===String)a.g=a.i?"0":"";else{a=new b;break a}a=a.g}return a}
function x(a,b){return Fa(a,b)||[]}function z(a,b){return a.f[b].f?u(a,b)?a.b[b].length:0:u(a,b)?1:0}function w(a,b,c){a.b[b]=c;a.a&&(a.a[b]=c)}function Da(a,b,c){a.b[b]||(a.b[b]=[]);a.b[b].push(c);a.a&&delete a.a[b]}function Ga(a,b){delete a.b[b];a.a&&delete a.a[b]}function Ha(a,b){var c=[],d;for(d in b)0!=d&&c.push(new ra(d,b[d]));return new za(a,c)};function A(){}A.prototype.b=function(a,b){return 11==a.b||10==a.b?this.g(b):"number"!=typeof b||isFinite(b)?b:b.toString()};A.prototype.f=function(a,b){a=new a.b;this.i(a,b);return a};
A.prototype.a=function(a,b){if(11==a.b||10==a.b)return b instanceof t?b:this.f(a.l.prototype.h(),b);if(14==a.b)return h(b)&&Ia.test(b)&&(a=Number(b),0<a)?a:b;if(!a.i)return b;a=a.l;if(a===String){if("number"==typeof b)return String(b)}else if(a===Number&&h(b)&&("Infinity"===b||"-Infinity"===b||"NaN"===b||Ia.test(b)))return Number(b);return b};var Ia=/^-?[0-9]+$/;function B(a,b){this.j=a;this.l=b}l(B,A);B.prototype.g=function(a){for(var b=Aa(a.h()),c={},d=0;d<b.length;d++){var e=b[d],f=e.a;switch(this.j){case 1:f=e.j;break;case 2:f=ha(e.j.replace(/_/g,"-"))}if(a.has(e))if(e.f){var g=[];c[f]=g;for(f=0;f<z(a,e.a);f++)g.push(this.b(e,a.get(e,f)))}else c[f]=this.b(e,a.get(e))}Ca(a,function(a,b){c[a]=b});return c};B.prototype.b=function(a,b){return this.l&&8==a.b&&"boolean"==typeof b?b?1:0:B.ea.b.call(this,a,b)};
B.prototype.a=function(a,b){return 8==a.b&&"number"==typeof b?!!b:B.ea.a.call(this,a,b)};B.prototype.i=function(a,b){var c=a.h(),d;for(d in b){var e=b[d],f=!/[^0-9]/.test(d);if(f)var g=c.a[parseInt(d,10)]||null;else 2==this.j&&(d=String(d).replace(/([A-Z])/g,"-$1").toLowerCase().replace(/\-/g,"_")),g=Ba(c,d);if(g)if(g.f)for(f=0;f<e.length;f++)a.add(g,this.a(g,e[f]));else a.set(g,this.a(g,e));else f?(g=a,f=Number(d),g.b[f]=e,g.a&&delete g.a[f]):da("Failed to find field: "+d)}};function C(a,b){null!=a&&this.a.apply(this,arguments)}C.prototype.b="";C.prototype.set=function(a){this.b=""+a};C.prototype.a=function(a,b,c){this.b+=String(a);if(null!=b)for(var d=1;d<arguments.length;d++)this.b+=arguments[d];return this};function D(a){a.b=""}C.prototype.toString=function(){return this.b};/*
Protocol Buffer 2 Copyright 2008 Google Inc.
All other code copyright its respective owners.
@ -27,14 +26,14 @@ B.prototype.i=function(a,b){var c=a.h(),d;for(d in b){var e,f=b[d],g=!/[^0-9]/.t
See the License for the specific language governing permissions and
limitations under the License.
*/
function E(){r.call(this)}p(E,r);var Oa=null;function F(){r.call(this)}p(F,r);var Pa=null;function G(){r.call(this)}p(G,r);var Qa=null;
E.prototype.h=function(){var a=Oa;a||(Oa=a=Ma(E,{0:{name:"NumberFormat",ba:"i18n.phonenumbers.NumberFormat"},1:{name:"pattern",required:!0,c:9,type:String},2:{name:"format",required:!0,c:9,type:String},3:{name:"leading_digits_pattern",u:!0,c:9,type:String},4:{name:"national_prefix_formatting_rule",c:9,type:String},6:{name:"national_prefix_optional_when_formatting",c:8,defaultValue:!1,type:Boolean},5:{name:"domestic_carrier_code_formatting_rule",c:9,type:String}}));return a};E.h=E.prototype.h;
F.prototype.h=function(){var a=Pa;a||(Pa=a=Ma(F,{0:{name:"PhoneNumberDesc",ba:"i18n.phonenumbers.PhoneNumberDesc"},2:{name:"national_number_pattern",c:9,type:String},9:{name:"possible_length",u:!0,c:5,type:Number},10:{name:"possible_length_local_only",u:!0,c:5,type:Number},6:{name:"example_number",c:9,type:String}}));return a};F.h=F.prototype.h;
G.prototype.h=function(){var a=Qa;a||(Qa=a=Ma(G,{0:{name:"PhoneMetadata",ba:"i18n.phonenumbers.PhoneMetadata"},1:{name:"general_desc",c:11,type:F},2:{name:"fixed_line",c:11,type:F},3:{name:"mobile",c:11,type:F},4:{name:"toll_free",c:11,type:F},5:{name:"premium_rate",c:11,type:F},6:{name:"shared_cost",c:11,type:F},7:{name:"personal_number",c:11,type:F},8:{name:"voip",c:11,type:F},21:{name:"pager",c:11,type:F},25:{name:"uan",c:11,type:F},27:{name:"emergency",c:11,type:F},28:{name:"voicemail",c:11,type:F},
24:{name:"no_international_dialling",c:11,type:F},9:{name:"id",required:!0,c:9,type:String},10:{name:"country_code",c:5,type:Number},11:{name:"international_prefix",c:9,type:String},17:{name:"preferred_international_prefix",c:9,type:String},12:{name:"national_prefix",c:9,type:String},13:{name:"preferred_extn_prefix",c:9,type:String},15:{name:"national_prefix_for_parsing",c:9,type:String},16:{name:"national_prefix_transform_rule",c:9,type:String},18:{name:"same_mobile_and_fixed_line_pattern",c:8,defaultValue:!1,
type:Boolean},19:{name:"number_format",u:!0,c:11,type:E},20:{name:"intl_number_format",u:!0,c:11,type:E},22:{name:"main_country_for_code",c:8,defaultValue:!1,type:Boolean},23:{name:"leading_digits",c:9,type:String},26:{name:"leading_zero_possible",c:8,defaultValue:!1,type:Boolean}}));return a};G.h=G.prototype.h;function Ra(){}p(Ra,A);Ra.prototype.f=function(a,b){var c=new a.b;c.g=this;c.b=b;c.a={};return c};Ra.prototype.i=function(){throw Error("Unimplemented");};function H(){}p(H,Ra);H.prototype.g=function(a){for(var b=Fa(a.h()),c=[],d=0;d<b.length;d++){var e=b[d];if(a.has(e)){var f=e.a;if(e.f){c[f]=[];for(var g=0;g<z(a,e.a);g++)c[f][g]=this.b(e,a.get(e,g))}else c[f]=this.b(e,a.get(e))}}Ha(a,function(a,b){c[a]=b});return c};H.prototype.b=function(a,b){return 8==a.b?b?1:0:A.prototype.b.apply(this,arguments)};H.prototype.a=function(a,b){return 8==a.b?!!b:A.prototype.a.apply(this,arguments)};H.prototype.f=function(a,b){return H.ca.f.call(this,a,b)};function I(){r.call(this)}p(I,r);var Sa=null,Ta={ma:0,la:1,ka:5,ja:10,ia:20};
I.prototype.h=function(){var a=Sa;a||(Sa=a=Ma(I,{0:{name:"PhoneNumber",ba:"i18n.phonenumbers.PhoneNumber"},1:{name:"country_code",required:!0,c:5,type:Number},2:{name:"national_number",required:!0,c:4,type:Number},3:{name:"extension",c:9,type:String},4:{name:"italian_leading_zero",c:8,type:Boolean},8:{name:"number_of_leading_zeros",c:5,defaultValue:1,type:Number},5:{name:"raw_input",c:9,type:String},6:{name:"country_code_source",c:14,defaultValue:0,type:Ta},7:{name:"preferred_domestic_carrier_code",
c:9,type:String}}));return a};I.ctor=I;I.ctor.h=I.prototype.h;/*
function F(){t.call(this)}l(F,t);var Ja=null;function G(){t.call(this)}l(G,t);var Ka=null;function H(){t.call(this)}l(H,t);var La=null;
F.prototype.h=function(){var a=Ja;a||(Ja=a=Ha(F,{0:{name:"NumberFormat",ba:"i18n.phonenumbers.NumberFormat"},1:{name:"pattern",required:!0,c:9,type:String},2:{name:"format",required:!0,c:9,type:String},3:{name:"leading_digits_pattern",u:!0,c:9,type:String},4:{name:"national_prefix_formatting_rule",c:9,type:String},6:{name:"national_prefix_optional_when_formatting",c:8,defaultValue:!1,type:Boolean},5:{name:"domestic_carrier_code_formatting_rule",c:9,type:String}}));return a};F.h=F.prototype.h;
G.prototype.h=function(){var a=Ka;a||(Ka=a=Ha(G,{0:{name:"PhoneNumberDesc",ba:"i18n.phonenumbers.PhoneNumberDesc"},2:{name:"national_number_pattern",c:9,type:String},9:{name:"possible_length",u:!0,c:5,type:Number},10:{name:"possible_length_local_only",u:!0,c:5,type:Number},6:{name:"example_number",c:9,type:String}}));return a};G.h=G.prototype.h;
H.prototype.h=function(){var a=La;a||(La=a=Ha(H,{0:{name:"PhoneMetadata",ba:"i18n.phonenumbers.PhoneMetadata"},1:{name:"general_desc",c:11,type:G},2:{name:"fixed_line",c:11,type:G},3:{name:"mobile",c:11,type:G},4:{name:"toll_free",c:11,type:G},5:{name:"premium_rate",c:11,type:G},6:{name:"shared_cost",c:11,type:G},7:{name:"personal_number",c:11,type:G},8:{name:"voip",c:11,type:G},21:{name:"pager",c:11,type:G},25:{name:"uan",c:11,type:G},27:{name:"emergency",c:11,type:G},28:{name:"voicemail",c:11,type:G},
29:{name:"short_code",c:11,type:G},30:{name:"standard_rate",c:11,type:G},31:{name:"carrier_specific",c:11,type:G},33:{name:"sms_services",c:11,type:G},24:{name:"no_international_dialling",c:11,type:G},9:{name:"id",required:!0,c:9,type:String},10:{name:"country_code",c:5,type:Number},11:{name:"international_prefix",c:9,type:String},17:{name:"preferred_international_prefix",c:9,type:String},12:{name:"national_prefix",c:9,type:String},13:{name:"preferred_extn_prefix",c:9,type:String},15:{name:"national_prefix_for_parsing",
c:9,type:String},16:{name:"national_prefix_transform_rule",c:9,type:String},18:{name:"same_mobile_and_fixed_line_pattern",c:8,defaultValue:!1,type:Boolean},19:{name:"number_format",u:!0,c:11,type:F},20:{name:"intl_number_format",u:!0,c:11,type:F},22:{name:"main_country_for_code",c:8,defaultValue:!1,type:Boolean},23:{name:"leading_digits",c:9,type:String},26:{name:"leading_zero_possible",c:8,defaultValue:!1,type:Boolean}}));return a};H.h=H.prototype.h;function Ma(){}l(Ma,A);Ma.prototype.f=function(a,b){a=new a.b;a.g=this;a.b=b;a.a={};return a};Ma.prototype.i=function(){throw Error("Unimplemented");};function I(){}l(I,Ma);I.prototype.g=function(a){for(var b=Aa(a.h()),c=[],d=0;d<b.length;d++){var e=b[d];if(a.has(e)){var f=e.a;if(e.f){c[f]=[];for(var g=0;g<z(a,e.a);g++)c[f][g]=this.b(e,a.get(e,g))}else c[f]=this.b(e,a.get(e))}}Ca(a,function(a,b){c[a]=b});return c};I.prototype.b=function(a,b){return 8==a.b?b?1:0:A.prototype.b.apply(this,arguments)};I.prototype.a=function(a,b){return 8==a.b?!!b:A.prototype.a.apply(this,arguments)};I.prototype.f=function(a,b){return I.ea.f.call(this,a,b)};function J(){t.call(this)}l(J,t);var Na=null,Oa={oa:0,na:1,ma:5,la:10,ka:20};
J.prototype.h=function(){var a=Na;a||(Na=a=Ha(J,{0:{name:"PhoneNumber",ba:"i18n.phonenumbers.PhoneNumber"},1:{name:"country_code",required:!0,c:5,type:Number},2:{name:"national_number",required:!0,c:4,type:Number},3:{name:"extension",c:9,type:String},4:{name:"italian_leading_zero",c:8,type:Boolean},8:{name:"number_of_leading_zeros",c:5,defaultValue:1,type:Number},5:{name:"raw_input",c:9,type:String},6:{name:"country_code_source",c:14,defaultValue:0,type:Oa},7:{name:"preferred_domestic_carrier_code",
c:9,type:String}}));return a};J.ctor=J;J.ctor.h=J.prototype.h;/*
Copyright (C) 2010 The Libphonenumber Authors
@ -50,11 +49,11 @@ c:9,type:String}}));return a};I.ctor=I;I.ctor.h=I.prototype.h;/*
See the License for the specific language governing permissions and
limitations under the License.
*/
var J={1:"US AG AI AS BB BM BS CA DM DO GD GU JM KN KY LC MP MS PR SX TC TT VC VG VI".split(" "),7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],
var K={1:"US AG AI AS BB BM BS CA DM DO GD GU JM KN KY LC MP MS PR SX TC TT VC VG VI".split(" "),7:["RU","KZ"],20:["EG"],27:["ZA"],30:["GR"],31:["NL"],32:["BE"],33:["FR"],34:["ES"],36:["HU"],39:["IT","VA"],40:["RO"],41:["CH"],43:["AT"],44:["GB","GG","IM","JE"],45:["DK"],46:["SE"],47:["NO","SJ"],48:["PL"],49:["DE"],51:["PE"],52:["MX"],53:["CU"],54:["AR"],55:["BR"],56:["CL"],57:["CO"],58:["VE"],60:["MY"],61:["AU","CC","CX"],62:["ID"],63:["PH"],64:["NZ"],65:["SG"],66:["TH"],81:["JP"],82:["KR"],84:["VN"],
86:["CN"],90:["TR"],91:["IN"],92:["PK"],93:["AF"],94:["LK"],95:["MM"],98:["IR"],211:["SS"],212:["MA","EH"],213:["DZ"],216:["TN"],218:["LY"],220:["GM"],221:["SN"],222:["MR"],223:["ML"],224:["GN"],225:["CI"],226:["BF"],227:["NE"],228:["TG"],229:["BJ"],230:["MU"],231:["LR"],232:["SL"],233:["GH"],234:["NG"],235:["TD"],236:["CF"],237:["CM"],238:["CV"],239:["ST"],240:["GQ"],241:["GA"],242:["CG"],243:["CD"],244:["AO"],245:["GW"],246:["IO"],247:["AC"],248:["SC"],249:["SD"],250:["RW"],251:["ET"],252:["SO"],
253:["DJ"],254:["KE"],255:["TZ"],256:["UG"],257:["BI"],258:["MZ"],260:["ZM"],261:["MG"],262:["RE","YT"],263:["ZW"],264:["NA"],265:["MW"],266:["LS"],267:["BW"],268:["SZ"],269:["KM"],290:["SH","TA"],291:["ER"],297:["AW"],298:["FO"],299:["GL"],350:["GI"],351:["PT"],352:["LU"],353:["IE"],354:["IS"],355:["AL"],356:["MT"],357:["CY"],358:["FI","AX"],359:["BG"],370:["LT"],371:["LV"],372:["EE"],373:["MD"],374:["AM"],375:["BY"],376:["AD"],377:["MC"],378:["SM"],380:["UA"],381:["RS"],382:["ME"],383:["XK"],385:["HR"],
386:["SI"],387:["BA"],389:["MK"],420:["CZ"],421:["SK"],423:["LI"],500:["FK"],501:["BZ"],502:["GT"],503:["SV"],504:["HN"],505:["NI"],506:["CR"],507:["PA"],508:["PM"],509:["HT"],590:["GP","BL","MF"],591:["BO"],592:["GY"],593:["EC"],594:["GF"],595:["PY"],596:["MQ"],597:["SR"],598:["UY"],599:["CW","BQ"],670:["TL"],672:["NF"],673:["BN"],674:["NR"],675:["PG"],676:["TO"],677:["SB"],678:["VU"],679:["FJ"],680:["PW"],681:["WF"],682:["CK"],683:["NU"],685:["WS"],686:["KI"],687:["NC"],688:["TV"],689:["PF"],690:["TK"],
691:["FM"],692:["MH"],800:["001"],808:["001"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],870:["001"],878:["001"],880:["BD"],881:["001"],882:["001"],883:["001"],886:["TW"],888:["001"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],979:["001"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},Ua={AC:[,[,,"[46]\\d{4}|[01589]\\d{5}",,
691:["FM"],692:["MH"],800:["001"],808:["001"],850:["KP"],852:["HK"],853:["MO"],855:["KH"],856:["LA"],870:["001"],878:["001"],880:["BD"],881:["001"],882:["001"],883:["001"],886:["TW"],888:["001"],960:["MV"],961:["LB"],962:["JO"],963:["SY"],964:["IQ"],965:["KW"],966:["SA"],967:["YE"],968:["OM"],970:["PS"],971:["AE"],972:["IL"],973:["BH"],974:["QA"],975:["BT"],976:["MN"],977:["NP"],979:["001"],992:["TJ"],993:["TM"],994:["AZ"],995:["GE"],996:["KG"],998:["UZ"]},Pa={AC:[,[,,"[46]\\d{4}|[01589]\\d{5}",,
,,,,,[5,6]],[,,"6[2-467]\\d{3}",,,,"62889",,,[5]],[,,"4\\d{4}",,,,"40123",,,[5]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"AC",247,"00",,,,,,,,,,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"[01589]\\d{5}",,,,"542011",,,[6]],,,[,,,,,,,,,[-1]]],AD:[,[,,"[16]\\d{5,8}|[37-9]\\d{5}",,,,,,,[6,8,9]],[,,"[78]\\d{5}",,,,"712345",,,[6]],[,,"(?:3\\d|6(?:[0-8]|90\\d{2}))\\d{4}",,,,"312345",,,[6,9]],[,,"180[02]\\d{4}",,,,"18001234",,,[8]],[,,"[19]\\d{5}",,,,"912345",,,[6]],[,,,
,,,,,,[-1]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"AD",376,"00",,,,,,,,[[,"(\\d{3})(\\d{3})","$1 $2",["[137-9]|6[0-8]"]],[,"(\\d{4})(\\d{4})","$1 $2",["180","180[02]"]],[,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["690"]]],,[,,,,,,,,,[-1]],,,[,,"1800\\d{4}",,,,"18000000",,,[8]],[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]]],AE:[,[,,"[2-79]\\d{7,8}|800\\d{2,9}",,,,,,,[5,6,7,8,9,10,11,12]],[,,"[2-4679][2-8]\\d{6}",,,,"22345678",,,[8],[7]],[,,"5[024-68]\\d{7}",,,,"501234567",,,[9]],[,,"400\\d{6}|800\\d{2,9}",,,,"800123456"],
[,,"900[02]\\d{5}",,,,"900234567",,,[9]],[,,"700[05]\\d{5}",,,,"700012345",,,[9]],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],"AE",971,"00","0",,,"0",,,,[[,"([2-4679])(\\d{3})(\\d{4})","$1 $2 $3",["[2-4679][2-8]"],"0$1"],[,"(5\\d)(\\d{3})(\\d{4})","$1 $2 $3",["5"],"0$1"],[,"([479]00)(\\d)(\\d{5})","$1 $2 $3",["[479]00"],"$1"],[,"([68]00)(\\d{2,9})","$1 $2",["[68]00"],"$1"]],,[,,,,,,,,,[-1]],,,[,,,,,,,,,[-1]],[,,"600[25]\\d{5}",,,,"600212345",,,[9]],,,[,,,,,,,,,[-1]]],AF:[,[,,"[2-7]\\d{8}",,,,,,,[9],[7]],[,,"(?:[25][0-8]|[34][0-4]|6[0-5])[2-9]\\d{6}",
@ -424,42 +423,183 @@ SA:[,[,,"[15]\\d{8}|8\\d{9}|92\\d{7}",,,,,,,[9,10],[7]],[,,"1(?:1\\d|2[24-8]|3[3
See the License for the specific language governing permissions and
limitations under the License.
*/
function K(){this.a={}}K.a=function(){return K.b?K.b:K.b=new K};
var L={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","\uff10":"0","\uff11":"1","\uff12":"2","\uff13":"3","\uff14":"4","\uff15":"5","\uff16":"6","\uff17":"7","\uff18":"8","\uff19":"9","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u06f0":"0","\u06f1":"1","\u06f2":"2","\u06f3":"3","\u06f4":"4","\u06f5":"5","\u06f6":"6","\u06f7":"7","\u06f8":"8","\u06f9":"9"},Va={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",
7:"7",8:"8",9:"9","+":"+","*":"*","#":"#"},Wa={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","\uff10":"0","\uff11":"1","\uff12":"2","\uff13":"3","\uff14":"4","\uff15":"5","\uff16":"6","\uff17":"7","\uff18":"8","\uff19":"9","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u06f0":"0","\u06f1":"1","\u06f2":"2","\u06f3":"3","\u06f4":"4","\u06f5":"5","\u06f6":"6","\u06f7":"7","\u06f8":"8","\u06f9":"9",A:"2",
B:"2",C:"2",D:"3",E:"3",F:"3",G:"4",H:"4",I:"4",J:"5",K:"5",L:"5",M:"6",N:"6",O:"6",P:"7",Q:"7",R:"7",S:"7",T:"8",U:"8",V:"8",W:"9",X:"9",Y:"9",Z:"9"},Xa=/[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?/,Ya=RegExp("[+\uff0b]+"),M=RegExp("^[+\uff0b]+"),Za=RegExp("([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9])"),$a=RegExp("[+\uff0b0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]"),ab=/[\\\/] *x/,bb=RegExp("[^0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9A-Za-z#]+$"),cb=/(?:.*?[A-Za-z]){3}.*/,db=RegExp("(?:;ext=([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]{1,7})|[ \u00a0\\t,]*(?:e?xt(?:ensi(?:o\u0301?|\u00f3))?n?|\uff45?\uff58\uff54\uff4e?|[;,x\uff58#\uff03~\uff5e]|int|anexo|\uff49\uff4e\uff54)[:\\.\uff0e]?[ \u00a0\\t,-]*([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]{1,7})#?|[- ]+([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]{1,5})#)$",
"i"),eb=RegExp("^[0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]{2}$|^[+\uff0b]*(?:[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\\[\\]/~\u2053\u223c\uff5e*]*[0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]){3,}[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\\[\\]/~\u2053\u223c\uff5e*A-Za-z0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]*(?:;ext=([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]{1,7})|[ \u00a0\\t,]*(?:e?xt(?:ensi(?:o\u0301?|\u00f3))?n?|\uff45?\uff58\uff54\uff4e?|[;,x\uff58#\uff03~\uff5e]|int|anexo|\uff49\uff4e\uff54)[:\\.\uff0e]?[ \u00a0\\t,-]*([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]{1,7})#?|[- ]+([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]{1,5})#)?$",
"i"),fb=/(\$\d)/,gb=/\$NP/,hb=/\$FG/,ib=/\$CC/,jb=/^\(?\$1\)?$/;function kb(a){var b=a.search($a);0<=b?(a=a.substring(b),a=a.replace(bb,""),b=a.search(ab),0<=b&&(a=a.substring(0,b))):a="";return a}function lb(a){return 2>a.length?!1:N(eb,a)}function mb(a){return N(cb,a)?O(a,Wa):O(a,L)}function nb(a){var b=mb(a.toString());D(a);a.a(b)}function ob(a){return!!a&&(1!=z(a,9)||-1!=w(a,9)[0])}
function O(a,b){for(var c=new C,d,e=a.length,f=0;f<e;++f)d=a.charAt(f),d=b[d.toUpperCase()],null!=d&&c.a(d);return c.toString()}function rb(a){return null!=a&&isNaN(a)&&a.toUpperCase()in Ua}function P(a,b,c){if(0==u(b,2)&&t(b,5)){var d=y(b,5);if(0<d.length)return d}var d=y(b,1),e=Q(b);if(0==c)return R(d,0,e,"");if(!(d in J))return e;a=S(a,d,T(d));b=sb(b,a,c);e=tb(e,a,c);return R(d,c,e,b)}
function ub(a,b,c){var d=y(b,1),e=Q(b);if(!(d in J))return e;a=S(a,d,T(d));b=sb(b,a,2);c=tb(e,a,2,c);return R(d,2,c,b)}function S(a,b,c){return"001"==c?U(a,""+b):U(a,c)}
function vb(a,b,c){if(!rb(c))return P(a,b,1);var d=y(b,1),e=Q(b);if(!(d in J))return e;if(1==d){if(null!=c&&0<=ka(J[1],c.toUpperCase()))return d+" "+P(a,b,2)}else if(d==wb(a,c))return P(a,b,2);var f=U(a,c),g=y(f,11);c="";N(Xa,g)?c=g:t(f,17)&&(c=y(f,17));a=S(a,d,T(d));e=tb(e,a,1);b=sb(b,a,1);return 0<c.length?c+" "+d+" "+e+b:R(d,1,e,b)}
function xb(a,b,c){var d;if(d=t(b,5)){d=y(b,1);if(d=S(a,d,T(d))){var e=Q(b);d=!!yb(w(d,19),e)}else d=!1;d=!d}if(d)return y(b,5);if(!t(b,6))return P(a,b,2);switch(u(b,6)){case 1:a=P(a,b,1);break;case 5:a=vb(a,b,c);break;case 10:a=P(a,b,1).substring(1);break;default:d=T(y(b,1));var f;(c=U(a,d))?(c=y(c,12),f=c.length?c=c.replace("~",""):null):f=null;c=P(a,b,2);if(null!=f&&f.length){var g;a:{e=y(b,5);e=O(e,L);if(!e.lastIndexOf(f,0))try{g=zb(a,Ab(a,e.substring(f.length),d,!1));break a}catch(h){}g=!1}if(g)a=
c;else if(g=U(a,d),d=Q(b),g=yb(w(g,19),d))if(d=y(g,4),e=d.indexOf("$1"),0>=e)a=c;else if(d=d.substring(0,e),d=O(d,L),d.length)if(g=g.clone(),La(g,4),d=[g],g=y(b,1),c=Q(b),g in J){a=S(a,g,T(g));if(e=yb(d,c))d=e.clone(),e=y(e,4),0<e.length&&(f=y(a,12),0<f.length?(e=e.replace(gb,f).replace(hb,"$1"),v(d,4,e)):La(d,4)),c=Bb(c,d,2);a=sb(b,a,2);a=R(g,2,c,a)}else a=c;else a=c;else a=c}else a=c}b=y(b,5);null!=a&&0<b.length&&(g=O(a,Va),c=O(b,Va),g!=c&&(a=b));return a}
function Q(a){if(!t(a,2))return"";var b=""+u(a,2);return t(a,4)&&u(a,4)&&0<y(a,8)?Array(y(a,8)+1).join("0")+b:b}function R(a,b,c,d){switch(b){case 0:return"+"+a+c+d;case 1:return"+"+a+" "+c+d;case 3:return"tel:+"+a+"-"+c+d;default:return c+d}}function tb(a,b,c,d){b=w(b,20).length&&2!=c?w(b,20):w(b,19);return(b=yb(b,a))?Bb(a,b,c,d):a}function yb(a,b){for(var c,d=a.length,e=0;e<d;++e){c=a[e];var f=z(c,3);if(!f||!b.search(u(c,3,f-1)))if(f=new RegExp(u(c,1)),N(f,b))return c}return null}
function Bb(a,b,c,d){var e=y(b,2),f=new RegExp(u(b,1)),g=y(b,5);2==c&&null!=d&&0<d.length&&0<g.length?(b=g.replace(ib,d),e=e.replace(fb,b),a=a.replace(f,e)):(b=y(b,4),a=2==c&&null!=b&&0<b.length?a.replace(f,e.replace(fb,b)):a.replace(f,e));3==c&&(a=a.replace(RegExp("^[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\\[\\]/~\u2053\u223c\uff5e]+"),""),a=a.replace(RegExp("[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\\[\\]/~\u2053\u223c\uff5e]+",
"g"),"-"));return a}function sb(a,b,c){return t(a,3)&&u(a,3).length?3==c?";ext="+u(a,3):t(b,13)?u(b,13)+y(a,3):" ext. "+y(a,3):""}function Cb(a,b){switch(b){case 4:return u(a,5);case 3:return u(a,4);case 1:return u(a,3);case 0:case 2:return u(a,2);case 5:return u(a,6);case 6:return u(a,8);case 7:return u(a,7);case 8:return u(a,21);case 9:return u(a,25);case 10:return u(a,28);default:return u(a,1)}}
function Db(a,b){return V(a,u(b,1))?V(a,u(b,5))?4:V(a,u(b,4))?3:V(a,u(b,6))?5:V(a,u(b,8))?6:V(a,u(b,7))?7:V(a,u(b,21))?8:V(a,u(b,25))?9:V(a,u(b,28))?10:V(a,u(b,2))?u(b,18)||V(a,u(b,3))?2:0:!u(b,18)&&V(a,u(b,3))?1:-1:-1}function U(a,b){if(null==b)return null;b=b.toUpperCase();var c=a.a[b];if(!c){c=Ua[b];if(!c)return null;c=(new H).f(G.h(),c);a.a[b]=c}return c}function V(a,b){var c=a.length;return 0<z(b,9)&&-1==ka(w(b,9),c)?!1:N(y(b,2),a)}function zb(a,b){var c=Eb(a,b);return Fb(a,b,c)}
function Fb(a,b,c){var d=y(b,1),e=S(a,d,c);if(!e||"001"!=c&&d!=wb(a,c))return!1;a=Q(b);return-1!=Db(a,e)}function Eb(a,b){if(!b)return null;var c=y(b,1);if(c=J[c])if(1==c.length)c=c[0];else a:{for(var d=Q(b),e,f=c.length,g=0;g<f;g++){e=c[g];var h=U(a,e);if(t(h,23)){if(!d.search(u(h,23))){c=e;break a}}else if(-1!=Db(d,h)){c=e;break a}}c=null}else c=null;return c}function T(a){return(a=J[a])?a[0]:"ZZ"}function wb(a,b){var c=U(a,b);if(!c)throw Error("Invalid region code: "+b);return y(c,10)}
function Gb(a,b,c,d){var e=Cb(c,d),f=z(e,9)?w(e,9):w(u(c,1),9),e=w(e,10);if(2==d)if(ob(Cb(c,0)))a=Cb(c,1),ob(a)&&(f=f.concat(z(a,9)?w(a,9):w(u(c,1),9)),la(f),e.length?(e=e.concat(w(a,10)),la(e)):e=w(a,10));else return Gb(a,b,c,1);if(-1==f[0])return 5;b=b.length;if(-1<ka(e,b))return 4;c=f[0];return c==b?0:c>b?2:f[f.length-1]<b?3:-1<ka(f,b,1)?0:5}function Hb(a,b){var c=Q(b),d=y(b,1);if(!(d in J))return 1;d=S(a,d,T(d));return Gb(a,c,d,-1)}
function Ib(a,b){var c=a.toString();if(!c.length||"0"==c.charAt(0))return 0;for(var d,e=c.length,f=1;3>=f&&f<=e;++f)if(d=parseInt(c.substring(0,f),10),d in J)return b.a(c.substring(f)),d;return 0}
function Jb(a,b,c,d,e,f){if(!b.length)return 0;b=new C(b);var g;c&&(g=u(c,11));null==g&&(g="NonMatch");var h=b.toString();if(h.length)if(M.test(h))h=h.replace(M,""),D(b),b.a(mb(h)),g=1;else{h=new RegExp(g);nb(b);g=b.toString();if(g.search(h))g=!1;else{var h=g.match(h)[0].length,l=g.substring(h).match(Za);l&&null!=l[1]&&0<l[1].length&&"0"==O(l[1],L)?g=!1:(D(b),b.a(g.substring(h)),g=!0)}g=g?5:20}else g=20;e&&v(f,6,g);if(20!=g){if(2>=b.b.length)throw Error("Phone number too short after IDD");if(a=Ib(b,
d))return v(f,1,a),a;throw Error("Invalid country calling code");}if(c&&(g=y(c,10),h=""+g,l=b.toString(),!l.lastIndexOf(h,0)&&(h=new C(l.substring(h.length)),l=u(c,1),l=new RegExp(y(l,2)),Kb(h,c,null),h=h.toString(),!N(l,b.toString())&&N(l,h)||3==Gb(a,b.toString(),c,-1))))return d.a(h),e&&v(f,6,10),v(f,1,g),g;v(f,1,0);return 0}
function Kb(a,b,c){var d=a.toString(),e=d.length,f=u(b,15);if(e&&null!=f&&f.length){var g=new RegExp("^(?:"+f+")");if(e=g.exec(d)){var f=new RegExp(y(u(b,1),2)),h=N(f,d),l=e.length-1;b=u(b,16);if(null!=b&&b.length&&null!=e[l]&&e[l].length){if(d=d.replace(g,b),!h||N(f,d))c&&0<l&&c.a(e[1]),a.set(d)}else if(!h||N(f,d.substring(e[0].length)))c&&0<l&&null!=e[l]&&c.a(e[1]),a.set(d.substring(e[0].length))}}}
function Ab(a,b,c,d){if(null==b)throw Error("The string supplied did not seem to be a phone number");if(250<b.length)throw Error("The string supplied is too long to be a phone number");var e=new C,f=b.indexOf(";phone-context=");if(0<=f){var g=f+15;if("+"==b.charAt(g)){var h=b.indexOf(";",g);0<h?e.a(b.substring(g,h)):e.a(b.substring(g))}g=b.indexOf("tel:");e.a(b.substring(0<=g?g+4:0,f))}else e.a(kb(b));f=e.toString();g=f.indexOf(";isub=");0<g&&(D(e),e.a(f.substring(0,g)));if(!lb(e.toString()))throw Error("The string supplied did not seem to be a phone number");
f=e.toString();if(!(rb(c)||null!=f&&0<f.length&&M.test(f)))throw Error("Invalid country calling code");f=new I;d&&v(f,5,b);a:{b=e.toString();g=b.search(db);if(0<=g&&lb(b.substring(0,g)))for(var h=b.match(db),l=h.length,x=1;x<l;++x)if(null!=h[x]&&0<h[x].length){D(e);e.a(b.substring(0,g));b=h[x];break a}b=""}0<b.length&&v(f,3,b);g=U(a,c);b=new C;h=0;l=e.toString();try{h=Jb(a,l,g,b,d,f)}catch(W){if("Invalid country calling code"==W.message&&M.test(l)){if(l=l.replace(M,""),h=Jb(a,l,g,b,d,f),!h)throw W;
}else throw W;}h?(e=T(h),e!=c&&(g=S(a,h,e))):(nb(e),b.a(e.toString()),null!=c?(h=y(g,10),v(f,1,h)):d&&La(f,6));if(2>b.b.length)throw Error("The string supplied is too short to be a phone number");g&&(c=new C,e=new C(b.toString()),Kb(e,g,c),a=Gb(a,e.toString(),g,-1),2!=a&&4!=a&&5!=a&&(b=e,d&&0<c.toString().length&&v(f,7,c.toString())));d=b.toString();a=d.length;if(2>a)throw Error("The string supplied is too short to be a phone number");if(17<a)throw Error("The string supplied is too long to be a phone number");
if(1<d.length&&"0"==d.charAt(0)){v(f,4,!0);for(a=1;a<d.length-1&&"0"==d.charAt(a);)a++;1!=a&&v(f,8,a)}v(f,2,parseInt(d,10));return f}function N(a,b){var c="string"==typeof a?b.match("^(?:"+a+")$"):b.match(a);return c&&c[0].length==b.length?!0:!1};function Lb(a){this.da=RegExp("\u2008");this.fa="";this.m=new C;this.w="";this.i=new C;this.v=new C;this.j=!0;this.$=this.o=this.ha=!1;this.ea=K.a();this.s=0;this.b=new C;this.aa=!1;this.l="";this.a=new C;this.f=[];this.ga=a;this.g=Mb(this,this.ga)}var Nb=new G;v(Nb,11,"NA");
var Ob=/\[([^\[\]])*\]/g,Pb=/\d(?=[^,}][^,}])/g,Qb=RegExp("^[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\\[\\]/~\u2053\u223c\uff5e]*(\\$\\d[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\\[\\]/~\u2053\u223c\uff5e]*)+$"),Rb=/[- ]/;function Mb(a,b){var c=rb(b)?wb(a.ea,b):0;return(c=U(a.ea,T(c)))?c:Nb}
function Sb(a){for(var b=a.f.length,c=0;c<b;++c){var d=a.f[c],e=y(d,1);if(a.w==e)return!1;var f;f=a;var g=d,h=y(g,1);if(-1!=h.indexOf("|"))f=!1;else{h=h.replace(Ob,"\\d");h=h.replace(Pb,"\\d");D(f.m);var l;l=f;var g=y(g,2),x="999999999999999".match(h)[0];x.length<l.a.b.length?l="":(l=x.replace(new RegExp(h,"g"),g),l=l.replace(RegExp("9","g"),"\u2008"));0<l.length?(f.m.a(l),f=!0):f=!1}if(f)return a.w=e,a.aa=Rb.test(u(d,4)),a.s=0,!0}return a.j=!1}
function Tb(a,b){for(var c=[],d=b.length-3,e=a.f.length,f=0;f<e;++f){var g=a.f[f];z(g,3)?(g=u(g,3,Math.min(d,z(g,3)-1)),b.search(g)||c.push(a.f[f])):c.push(a.f[f])}a.f=c}function Ub(a,b){a.fa=Vb(a,b);return a.fa}
function Vb(a,b){a.i.a(b);var c=b;if(Za.test(c)||1==a.i.b.length&&Ya.test(c)){var c=b,d;"+"==c?(d=c,a.v.a(c)):(d=L[c],a.v.a(d),a.a.a(d));b=d}else a.j=!1,a.ha=!0;if(!a.j){if(!a.ha)if(Wb(a)){if(Xb(a))return Yb(a)}else if(0<a.l.length&&(c=a.a.toString(),D(a.a),a.a.a(a.l),a.a.a(c),c=a.b.toString(),d=c.lastIndexOf(a.l),D(a.b),a.b.a(c.substring(0,d))),a.l!=Zb(a))return a.b.a(" "),Yb(a);return a.i.toString()}switch(a.v.b.length){case 0:case 1:case 2:return a.i.toString();case 3:if(Wb(a))a.$=!0;else return a.l=
Zb(a),$b(a);default:if(a.$)return Xb(a)&&(a.$=!1),a.b.toString()+a.a.toString();if(0<a.f.length){c=ac(a,b);d=bc(a);if(0<d.length)return d;Tb(a,a.a.toString());return Sb(a)?cc(a):a.j?dc(a,c):a.i.toString()}return $b(a)}}function Yb(a){a.j=!0;a.$=!1;a.f=[];a.s=0;D(a.m);a.w="";return $b(a)}function bc(a){for(var b=a.a.toString(),c=a.f.length,d=0;d<c;++d){var e=a.f[d],f=y(e,1);if((new RegExp("^(?:"+f+")$")).test(b))return a.aa=Rb.test(u(e,4)),b=b.replace(new RegExp(f,"g"),u(e,2)),dc(a,b)}return""}
function dc(a,b){var c=a.b.b.length;return a.aa&&0<c&&" "!=a.b.toString().charAt(c-1)?a.b+" "+b:a.b+b}function $b(a){var b=a.a.toString();if(3<=b.length){for(var c=a.o&&0<z(a.g,20)?w(a.g,20):w(a.g,19),d=c.length,e=0;e<d;++e){var f=c[e],g;(g=!t(a.g,12)||a.o||u(f,6))||(g=y(f,4),g=!g.length||jb.test(g));g&&Qb.test(y(f,2))&&a.f.push(f)}Tb(a,b);b=bc(a);return 0<b.length?b:Sb(a)?cc(a):a.i.toString()}return dc(a,b)}
function cc(a){var b=a.a.toString(),c=b.length;if(0<c){for(var d="",e=0;e<c;e++)d=ac(a,b.charAt(e));return a.j?dc(a,d):a.i.toString()}return a.b.toString()}
function Zb(a){var b=a.a.toString(),c=0,d;1!=u(a.g,10)?d=!1:(d=a.a.toString(),d="1"==d.charAt(0)&&"0"!=d.charAt(1)&&"1"!=d.charAt(1));d?(c=1,a.b.a("1").a(" "),a.o=!0):t(a.g,15)&&(d=new RegExp("^(?:"+u(a.g,15)+")"),(d=b.match(d))&&null!=d[0]&&0<d[0].length&&(a.o=!0,c=d[0].length,a.b.a(b.substring(0,c))));D(a.a);a.a.a(b.substring(c));return b.substring(0,c)}
function Wb(a){var b=a.v.toString(),c=new RegExp("^(?:\\+|"+u(a.g,11)+")");return(c=b.match(c))&&null!=c[0]&&0<c[0].length?(a.o=!0,c=c[0].length,D(a.a),a.a.a(b.substring(c)),D(a.b),a.b.a(b.substring(0,c)),"+"!=b.charAt(0)&&a.b.a(" "),!0):!1}function Xb(a){if(!a.a.b.length)return!1;var b=new C,c=Ib(a.a,b);if(!c)return!1;D(a.a);a.a.a(b.toString());b=T(c);"001"==b?a.g=U(a.ea,""+c):b!=a.ga&&(a.g=Mb(a,b));a.b.a(""+c).a(" ");a.l="";return!0}
function ac(a,b){var c=a.m.toString();if(0<=c.substring(a.s).search(a.da)){var d=c.search(a.da),c=c.replace(a.da,b);D(a.m);a.m.a(c);a.s=d;return c.substring(0,a.s+1)}1==a.f.length&&(a.j=!1);a.w="";return a.i.toString()};function ec(){var a=pa("phoneNumber").value,b=pa("defaultCountry").value,c=pa("carrierCode").value,d=new C;try{var e=K.a(),f;if(!rb(b)&&0<a.length&&"+"!=a.charAt(0))throw Error("Invalid country calling code");f=Ab(e,a,b,!0);d.a("****Parsing Result:****\n");d.a(qa((new B(1)).g(f)));d.a("\n\n****Validation Results:****");var g,h=Hb(e,f);g=0==h||4==h;d.a("\nResult from isPossibleNumber(): ");d.a(g);if(g){var l=zb(e,f);d.a("\nResult from isValidNumber(): ");d.a(l);l&&b&&"ZZ"!=b&&(d.a("\nResult from isValidNumberForRegion(): "),
d.a(Fb(e,f,b)));d.a("\nPhone Number region: ");d.a(Eb(e,f));d.a("\nResult from getNumberType(): ");var x;var W=Eb(e,f),pb=S(e,y(f,1),W);if(pb){var gc=Q(f);x=Db(gc,pb)}else x=-1;switch(x){case 0:d.a("FIXED_LINE");break;case 1:d.a("MOBILE");break;case 2:d.a("FIXED_LINE_OR_MOBILE");break;case 3:d.a("TOLL_FREE");break;case 4:d.a("PREMIUM_RATE");break;case 5:d.a("SHARED_COST");break;case 6:d.a("VOIP");break;case 7:d.a("PERSONAL_NUMBER");break;case 8:d.a("PAGER");break;case 9:d.a("UAN");break;case -1:d.a("UNKNOWN")}}else{d.a("\nResult from isPossibleNumberWithReason(): ");
switch(Hb(e,f)){case 1:d.a("INVALID_COUNTRY_CODE");break;case 2:d.a("TOO_SHORT");break;case 3:d.a("TOO_LONG")}d.a("\nNote: numbers that are not possible have type UNKNOWN, an unknown region, and are considered invalid.")}d.a("\n\n****Formatting Results:**** ");d.a("\nE164 format: ");d.a(l?P(e,f,0):"invalid");d.a("\nOriginal format: ");d.a(xb(e,f,b));d.a("\nNational format: ");d.a(P(e,f,2));d.a("\nInternational format: ");d.a(l?P(e,f,1):"invalid");d.a("\nOut-of-country format from US: ");d.a(l?vb(e,
f,"US"):"invalid");d.a("\nOut-of-country format from Switzerland: ");d.a(l?vb(e,f,"CH"):"invalid");0<c.length&&(d.a("\nNational format with carrier code: "),d.a(ub(e,f,c)));d.a("\n\n****AsYouTypeFormatter Results****");for(var hc=new Lb(b),ic=a.length,b=0;b<ic;++b){var qb=a.charAt(b);d.a("\nChar entered: ");d.a(qb);d.a(" Output: ");d.a(Ub(hc,qb))}}catch(jc){d.a("\n"+jc.toString())}pa("output").value=d.toString();return!1}var X=["phoneNumberParser"],Y=this;
X[0]in Y||!Y.execScript||Y.execScript("var "+X[0]);for(var Z;X.length&&(Z=X.shift());){var fc;if(fc=!X.length)fc=void 0!==ec;fc?Y[Z]=ec:Y[Z]?Y=Y[Z]:Y=Y[Z]={}};})();
function Qa(){this.a={}}aa(Qa);
var L={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","\uff10":"0","\uff11":"1","\uff12":"2","\uff13":"3","\uff14":"4","\uff15":"5","\uff16":"6","\uff17":"7","\uff18":"8","\uff19":"9","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u06f0":"0","\u06f1":"1","\u06f2":"2","\u06f3":"3","\u06f4":"4","\u06f5":"5","\u06f6":"6","\u06f7":"7","\u06f8":"8","\u06f9":"9"},Ra={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",
7:"7",8:"8",9:"9","+":"+","*":"*","#":"#"},Sa={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","\uff10":"0","\uff11":"1","\uff12":"2","\uff13":"3","\uff14":"4","\uff15":"5","\uff16":"6","\uff17":"7","\uff18":"8","\uff19":"9","\u0660":"0","\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u06f0":"0","\u06f1":"1","\u06f2":"2","\u06f3":"3","\u06f4":"4","\u06f5":"5","\u06f6":"6","\u06f7":"7","\u06f8":"8","\u06f9":"9",A:"2",
B:"2",C:"2",D:"3",E:"3",F:"3",G:"4",H:"4",I:"4",J:"5",K:"5",L:"5",M:"6",N:"6",O:"6",P:"7",Q:"7",R:"7",S:"7",T:"8",U:"8",V:"8",W:"9",X:"9",Y:"9",Z:"9"},Ta=/[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?/,Ua=/[+\uff0b]+/,M=/^[+\uff0b]+/,Va=/([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9])/,Wa=/[+\uff0b0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]/,Xa=/[\\\/] *x/,Ya=/[^0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9A-Za-z#]+$/,Za=/(?:.*?[A-Za-z]){3}.*/,$a=/(?:;ext=([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]{1,7})|[ \u00a0\t,]*(?:e?xt(?:ensi(?:o\u0301?|\u00f3))?n?|\uff45?\uff58\uff54\uff4e?|[;,x\uff58#\uff03~\uff5e]|int|anexo|\uff49\uff4e\uff54)[:\.\uff0e]?[ \u00a0\t,-]*([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]{1,7})#?|[- ]+([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]{1,5})#)$/i,
ab=/^[0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]{2}$|^[+\uff0b]*(?:[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\[\]/~\u2053\u223c\uff5e*]*[0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]){3,}[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\[\]/~\u2053\u223c\uff5e*A-Za-z0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]*(?:;ext=([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]{1,7})|[ \u00a0\t,]*(?:e?xt(?:ensi(?:o\u0301?|\u00f3))?n?|\uff45?\uff58\uff54\uff4e?|[;,x\uff58#\uff03~\uff5e]|int|anexo|\uff49\uff4e\uff54)[:\.\uff0e]?[ \u00a0\t,-]*([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]{1,7})#?|[- ]+([0-9\uff10-\uff19\u0660-\u0669\u06f0-\u06f9]{1,5})#)?$/i,
bb=/(\$\d)/,cb=/\$NP/,db=/\$FG/,eb=/\$CC/,fb=/^\(?\$1\)?$/;function gb(a){var b=a.search(Wa);0<=b?(a=a.substring(b),a=a.replace(Ya,""),b=a.search(Xa),0<=b&&(a=a.substring(0,b))):a="";return a}function hb(a){return 2>a.length?!1:N(ab,a)}function ib(a){return N(Za,a)?O(a,Sa):O(a,L)}function jb(a){var b=ib(a.toString());D(a);a.a(b)}function kb(a){return null!=a&&(1!=z(a,9)||-1!=x(a,9)[0])}
function O(a,b){for(var c=new C,d,e=a.length,f=0;f<e;++f)d=a.charAt(f),d=b[d.toUpperCase()],null!=d&&c.a(d);return c.toString()}function lb(a){return null!=a&&isNaN(a)&&a.toUpperCase()in Pa}function P(a,b,c){if(0==v(b,2)&&u(b,5)){var d=y(b,5);if(0<d.length)return d}d=y(b,1);var e=Q(b);if(0==c)return S(d,0,e,"");if(!(d in K))return e;a=T(a,d,U(d));b=mb(b,a,c);e=nb(e,a,c);return S(d,c,e,b)}
function ob(a,b,c){var d=y(b,1),e=Q(b);if(!(d in K))return e;a=T(a,d,U(d));b=mb(b,a,2);c=nb(e,a,2,c);return S(d,2,c,b)}function T(a,b,c){return"001"==c?V(a,""+b):V(a,c)}
function pb(a,b,c){if(!lb(c))return P(a,b,1);var d=y(b,1),e=Q(b);if(!(d in K))return e;if(1==d){if(null!=c&&q(K[1],c.toUpperCase()))return d+" "+P(a,b,2)}else if(d==qb(a,c))return P(a,b,2);var f=V(a,c),g=y(f,11);c="";N(Ta,g)?c=g:u(f,17)&&(c=y(f,17));a=T(a,d,U(d));e=nb(e,a,1);b=mb(b,a,1);return 0<c.length?c+" "+d+" "+e+b:S(d,1,e,b)}
function rb(a,b,c){var d;if(d=u(b,5)){d=y(b,1);d=T(a,d,U(d));if(null==d)d=!1;else{var e=Q(b);d=null!=ub(x(d,19),e)}d=!d}if(d)return y(b,5);if(!u(b,6))return P(a,b,2);switch(v(b,6)){case 1:a=P(a,b,1);break;case 5:a=pb(a,b,c);break;case 10:a=P(a,b,1).substring(1);break;default:d=U(y(b,1));c=V(a,d);if(null==c)var f=null;else c=y(c,12),f=0==c.length?null:c=c.replace("~","");c=P(a,b,2);if(null==f||0==f.length)a=c;else{a:{e=y(b,5);e=O(e,L);if(0==e.lastIndexOf(f,0))try{var g=vb(a,wb(a,e.substring(f.length),
d,!1));break a}catch(k){}g=!1}g?a=c:(g=V(a,d),d=Q(b),g=ub(x(g,19),d),null==g?a=c:(d=y(g,4),e=d.indexOf("$1"),0>=e?a=c:(d=d.substring(0,e),d=O(d,L),0==d.length?a=c:(g=g.clone(),Ga(g,4),d=[g],g=y(b,1),c=Q(b),g in K?(a=T(a,g,U(g)),e=ub(d,c),null!=e&&(d=e.clone(),e=y(e,4),0<e.length&&(f=y(a,12),0<f.length?(e=e.replace(cb,f).replace(db,"$1"),w(d,4,e)):Ga(d,4)),c=xb(c,d,2)),a=mb(b,a,2),a=S(g,2,c,a)):a=c))))}}b=y(b,5);null!=a&&0<b.length&&(g=O(a,Ra),c=O(b,Ra),g!=c&&(a=b));return a}
function Q(a){if(!u(a,2))return"";var b=""+v(a,2);return u(a,4)&&v(a,4)&&0<y(a,8)?Array(y(a,8)+1).join("0")+b:b}function S(a,b,c,d){switch(b){case 0:return"+"+a+c+d;case 1:return"+"+a+" "+c+d;case 3:return"tel:+"+a+"-"+c+d;default:return c+d}}function nb(a,b,c,d){b=0==x(b,20).length||2==c?x(b,19):x(b,20);b=ub(b,a);return null==b?a:xb(a,b,c,d)}
function ub(a,b){for(var c,d=a.length,e=0;e<d;++e){c=a[e];var f=z(c,3);if(0==f||0==b.search(v(c,3,f-1)))if(f=new RegExp(v(c,1)),N(f,b))return c}return null}
function xb(a,b,c,d){var e=y(b,2),f=new RegExp(v(b,1)),g=y(b,5);2==c&&null!=d&&0<d.length&&0<g.length?(b=g.replace(eb,d),e=e.replace(bb,b),a=a.replace(f,e)):(b=y(b,4),a=2==c&&null!=b&&0<b.length?a.replace(f,e.replace(bb,b)):a.replace(f,e));3==c&&(a=a.replace(/^[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\[\]/~\u2053\u223c\uff5e]+/,""),a=a.replace(/[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\[\]/~\u2053\u223c\uff5e]+/g,
"-"));return a}function mb(a,b,c){return u(a,3)&&0!=v(a,3).length?3==c?";ext="+v(a,3):u(b,13)?v(b,13)+y(a,3):" ext. "+y(a,3):""}function yb(a,b){switch(b){case 4:return v(a,5);case 3:return v(a,4);case 1:return v(a,3);case 0:case 2:return v(a,2);case 5:return v(a,6);case 6:return v(a,8);case 7:return v(a,7);case 8:return v(a,21);case 9:return v(a,25);case 10:return v(a,28);default:return v(a,1)}}
function zb(a,b){return W(a,v(b,1))?W(a,v(b,5))?4:W(a,v(b,4))?3:W(a,v(b,6))?5:W(a,v(b,8))?6:W(a,v(b,7))?7:W(a,v(b,21))?8:W(a,v(b,25))?9:W(a,v(b,28))?10:W(a,v(b,2))?v(b,18)||W(a,v(b,3))?2:0:!v(b,18)&&W(a,v(b,3))?1:-1:-1}function V(a,b){if(null==b)return null;b=b.toUpperCase();var c=a.a[b];if(null==c){c=Pa[b];if(null==c)return null;c=(new I).f(H.h(),c);a.a[b]=c}return c}function W(a,b){var c=a.length;return 0<z(b,9)&&-1==p(x(b,9),c)?!1:N(y(b,2),a)}function vb(a,b){var c=Ab(a,b);return Bb(a,b,c)}
function Bb(a,b,c){var d=y(b,1),e=T(a,d,c);if(null==e||"001"!=c&&d!=qb(a,c))return!1;a=Q(b);return-1!=zb(a,e)}function Ab(a,b){if(null==b)return null;var c=y(b,1);c=K[c];if(null==c)a=null;else if(1==c.length)a=c[0];else a:{b=Q(b);for(var d,e=c.length,f=0;f<e;f++){d=c[f];var g=V(a,d);if(u(g,23)){if(0==b.search(v(g,23))){a=d;break a}}else if(-1!=zb(b,g)){a=d;break a}}a=null}return a}function U(a){a=K[a];return null==a?"ZZ":a[0]}
function qb(a,b){a=V(a,b);if(null==a)throw Error("Invalid region code: "+b);return y(a,10)}function Cb(a,b,c,d){var e=yb(c,d),f=0==z(e,9)?x(v(c,1),9):x(e,9);e=x(e,10);if(2==d)if(kb(yb(c,0)))a=yb(c,1),kb(a)&&(f=f.concat(0==z(a,9)?x(v(c,1),9):x(a,9)),ea(f),0==e.length?e=x(a,10):(e=e.concat(x(a,10)),ea(e)));else return Cb(a,b,c,1);if(-1==f[0])return 5;b=b.length;if(-1<p(e,b))return 4;c=f[0];return c==b?0:c>b?2:f[f.length-1]<b?3:-1<p(f,b,1)?0:5}
function Db(a,b){var c=Q(b);b=y(b,1);if(!(b in K))return 1;b=T(a,b,U(b));return Cb(a,c,b,-1)}function Eb(a,b){a=a.toString();if(0==a.length||"0"==a.charAt(0))return 0;for(var c,d=a.length,e=1;3>=e&&e<=d;++e)if(c=parseInt(a.substring(0,e),10),c in K)return b.a(a.substring(e)),c;return 0}
function Fb(a,b,c,d,e,f){if(0==b.length)return 0;b=new C(b);var g;null!=c&&(g=v(c,11));null==g&&(g="NonMatch");var k=b.toString();if(0==k.length)g=20;else if(M.test(k))k=k.replace(M,""),D(b),b.a(ib(k)),g=1;else{k=new RegExp(g);jb(b);g=b.toString();if(0==g.search(k)){k=g.match(k)[0].length;var m=g.substring(k).match(Va);m&&null!=m[1]&&0<m[1].length&&"0"==O(m[1],L)?g=!1:(D(b),b.a(g.substring(k)),g=!0)}else g=!1;g=g?5:20}e&&w(f,6,g);if(20!=g){if(2>=b.b.length)throw Error("Phone number too short after IDD");
a=Eb(b,d);if(0!=a)return w(f,1,a),a;throw Error("Invalid country calling code");}if(null!=c&&(g=y(c,10),k=""+g,m=b.toString(),0==m.lastIndexOf(k,0)&&(k=new C(m.substring(k.length)),m=v(c,1),m=new RegExp(y(m,2)),Gb(k,c,null),k=k.toString(),!N(m,b.toString())&&N(m,k)||3==Cb(a,b.toString(),c,-1))))return d.a(k),e&&w(f,6,10),w(f,1,g),g;w(f,1,0);return 0}
function Gb(a,b,c){var d=a.toString(),e=d.length,f=v(b,15);if(0!=e&&null!=f&&0!=f.length){var g=new RegExp("^(?:"+f+")");if(e=g.exec(d)){f=new RegExp(y(v(b,1),2));var k=N(f,d),m=e.length-1;b=v(b,16);if(null==b||0==b.length||null==e[m]||0==e[m].length){if(!k||N(f,d.substring(e[0].length)))null!=c&&0<m&&null!=e[m]&&c.a(e[1]),a.set(d.substring(e[0].length))}else if(d=d.replace(g,b),!k||N(f,d))null!=c&&0<m&&c.a(e[1]),a.set(d)}}}
function wb(a,b,c,d){if(null==b)throw Error("The string supplied did not seem to be a phone number");if(250<b.length)throw Error("The string supplied is too long to be a phone number");var e=new C,f=b.indexOf(";phone-context=");if(0<=f){var g=f+15;if("+"==b.charAt(g)){var k=b.indexOf(";",g);0<k?e.a(b.substring(g,k)):e.a(b.substring(g))}g=b.indexOf("tel:");e.a(b.substring(0<=g?g+4:0,f))}else e.a(gb(b));f=e.toString();g=f.indexOf(";isub=");0<g&&(D(e),e.a(f.substring(0,g)));if(!hb(e.toString()))throw Error("The string supplied did not seem to be a phone number");
f=e.toString();if(!(lb(c)||null!=f&&0<f.length&&M.test(f)))throw Error("Invalid country calling code");f=new J;d&&w(f,5,b);a:{b=e.toString();g=b.search($a);if(0<=g&&hb(b.substring(0,g))){k=b.match($a);for(var m=k.length,E=1;E<m;++E)if(null!=k[E]&&0<k[E].length){D(e);e.a(b.substring(0,g));b=k[E];break a}}b=""}0<b.length&&w(f,3,b);g=V(a,c);b=new C;k=0;m=e.toString();try{k=Fb(a,m,g,b,d,f)}catch(R){if("Invalid country calling code"==R.message&&M.test(m)){if(m=m.replace(M,""),k=Fb(a,m,g,b,d,f),0==k)throw R;
}else throw R;}0!=k?(e=U(k),e!=c&&(g=T(a,k,e))):(jb(e),b.a(e.toString()),null!=c?(k=y(g,10),w(f,1,k)):d&&Ga(f,6));if(2>b.b.length)throw Error("The string supplied is too short to be a phone number");null!=g&&(c=new C,e=new C(b.toString()),Gb(e,g,c),a=Cb(a,e.toString(),g,-1),2!=a&&4!=a&&5!=a&&(b=e,d&&0<c.toString().length&&w(f,7,c.toString())));d=b.toString();a=d.length;if(2>a)throw Error("The string supplied is too short to be a phone number");if(17<a)throw Error("The string supplied is too long to be a phone number");
if(1<d.length&&"0"==d.charAt(0)){w(f,4,!0);for(a=1;a<d.length-1&&"0"==d.charAt(a);)a++;1!=a&&w(f,8,a)}w(f,2,parseInt(d,10));return f}function N(a,b){return(a="string"==typeof a?b.match("^(?:"+a+")$"):b.match(a))&&a[0].length==b.length?!0:!1};function Hb(a){this.fa=/\u2008/;this.ha="";this.m=new C;this.w="";this.i=new C;this.v=new C;this.j=!0;this.$=this.o=this.ja=!1;this.ga=Qa.ca();this.s=0;this.b=new C;this.aa=!1;this.l="";this.a=new C;this.f=[];this.ia=a;this.g=Ib(this,this.ia)}var Jb=new H;w(Jb,11,"NA");
var Kb=/\[([^\[\]])*\]/g,Lb=/\d(?=[^,}][^,}])/g,Mb=/^[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\[\]/~\u2053\u223c\uff5e]*(\$\d[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\[\]/~\u2053\u223c\uff5e]*)+$/,Nb=/[- ]/;function Ib(a,b){var c=a.ga;b=lb(b)?qb(c,b):0;a=V(a.ga,U(b));return null!=a?a:Jb}
function Ob(a){for(var b=a.f.length,c=0;c<b;++c){var d=a.f[c],e=y(d,1);if(a.w==e)return!1;var f=a;var g=d,k=y(g,1);if(-1!=k.indexOf("|"))f=!1;else{k=k.replace(Kb,"\\d");k=k.replace(Lb,"\\d");D(f.m);var m=f;g=y(g,2);var E="999999999999999".match(k)[0];E.length<m.a.b.length?m="":(m=E.replace(new RegExp(k,"g"),g),m=m.replace(/9/g,"\u2008"));0<m.length?(f.m.a(m),f=!0):f=!1}if(f)return a.w=e,a.aa=Nb.test(v(d,4)),a.s=0,!0}return a.j=!1}
function Pb(a,b){for(var c=[],d=b.length-3,e=a.f.length,f=0;f<e;++f){var g=a.f[f];0==z(g,3)?c.push(a.f[f]):(g=v(g,3,Math.min(d,z(g,3)-1)),0==b.search(g)&&c.push(a.f[f]))}a.f=c}function Qb(a,b){a.ha=Rb(a,b);return a.ha}
function Rb(a,b){a.i.a(b);var c=b;Va.test(c)||1==a.i.b.length&&Ua.test(c)?("+"==b?(c=b,a.v.a(b)):(c=L[b],a.v.a(c),a.a.a(c)),b=c):(a.j=!1,a.ja=!0);if(!a.j){if(!a.ja)if(Sb(a)){if(Tb(a))return Ub(a)}else if(0<a.l.length&&(b=a.a.toString(),D(a.a),a.a.a(a.l),a.a.a(b),b=a.b.toString(),c=b.lastIndexOf(a.l),D(a.b),a.b.a(b.substring(0,c))),a.l!=Vb(a))return a.b.a(" "),Ub(a);return a.i.toString()}switch(a.v.b.length){case 0:case 1:case 2:return a.i.toString();case 3:if(Sb(a))a.$=!0;else return a.l=Vb(a),Wb(a);
default:if(a.$)return Tb(a)&&(a.$=!1),a.b.toString()+a.a.toString();if(0<a.f.length){b=Xb(a,b);c=Yb(a);if(0<c.length)return c;Pb(a,a.a.toString());return Ob(a)?Zb(a):a.j?$b(a,b):a.i.toString()}return Wb(a)}}function Ub(a){a.j=!0;a.$=!1;a.f=[];a.s=0;D(a.m);a.w="";return Wb(a)}function Yb(a){for(var b=a.a.toString(),c=a.f.length,d=0;d<c;++d){var e=a.f[d],f=y(e,1);if((new RegExp("^(?:"+f+")$")).test(b))return a.aa=Nb.test(v(e,4)),b=b.replace(new RegExp(f,"g"),v(e,2)),$b(a,b)}return""}
function $b(a,b){var c=a.b.b.length;return a.aa&&0<c&&" "!=a.b.toString().charAt(c-1)?a.b+" "+b:a.b+b}function Wb(a){var b=a.a.toString();if(3<=b.length){for(var c=a.o&&0<z(a.g,20)?x(a.g,20):x(a.g,19),d=c.length,e=0;e<d;++e){var f=c[e],g;(g=!u(a.g,12)||a.o||v(f,6))||(g=y(f,4),g=0==g.length||fb.test(g));g&&Mb.test(y(f,2))&&a.f.push(f)}Pb(a,b);b=Yb(a);return 0<b.length?b:Ob(a)?Zb(a):a.i.toString()}return $b(a,b)}
function Zb(a){var b=a.a.toString(),c=b.length;if(0<c){for(var d="",e=0;e<c;e++)d=Xb(a,b.charAt(e));return a.j?$b(a,d):a.i.toString()}return a.b.toString()}
function Vb(a){var b=a.a.toString(),c=0;if(1!=v(a.g,10))var d=!1;else d=a.a.toString(),d="1"==d.charAt(0)&&"0"!=d.charAt(1)&&"1"!=d.charAt(1);d?(c=1,a.b.a("1").a(" "),a.o=!0):u(a.g,15)&&(d=new RegExp("^(?:"+v(a.g,15)+")"),d=b.match(d),null!=d&&null!=d[0]&&0<d[0].length&&(a.o=!0,c=d[0].length,a.b.a(b.substring(0,c))));D(a.a);a.a.a(b.substring(c));return b.substring(0,c)}
function Sb(a){var b=a.v.toString(),c=new RegExp("^(?:\\+|"+v(a.g,11)+")");c=b.match(c);return null!=c&&null!=c[0]&&0<c[0].length?(a.o=!0,c=c[0].length,D(a.a),a.a.a(b.substring(c)),D(a.b),a.b.a(b.substring(0,c)),"+"!=b.charAt(0)&&a.b.a(" "),!0):!1}function Tb(a){if(0==a.a.b.length)return!1;var b=new C,c=Eb(a.a,b);if(0==c)return!1;D(a.a);a.a.a(b.toString());b=U(c);"001"==b?a.g=V(a.ga,""+c):b!=a.ia&&(a.g=Ib(a,b));a.b.a(""+c).a(" ");a.l="";return!0}
function Xb(a,b){var c=a.m.toString();if(0<=c.substring(a.s).search(a.fa)){var d=c.search(a.fa);b=c.replace(a.fa,b);D(a.m);a.m.a(b);a.s=d;return b.substring(0,a.s+1)}1==a.f.length&&(a.j=!1);a.w="";return a.i.toString()};var ac={AC:[,[,,"9\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"AC",,,,,,,,,,,,,,,,,,[,,"911",,,,"911"],,[,,"911",,,,"911"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],AD:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"AD",,,,,,,,,,,,,,,,,,[,,"11[0268]",,,,"112"],,[,,"11[0268]",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],AE:[,[,,"[149]\\d{2,3}",,,,,,,[3,4]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"AE",,,,,,,,,,,,,,,,,,[,,"112|99[789]",,,,"112",,,[3]],
,[,,"112|445[16]|99[789]",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,"445[16]",,,,"4451",,,[4]]],AF:[,[,,"[14]\\d{2,4}",,,,,,,[3,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"AF",,,,,,,,,,,,,,,,,,[,,"1(?:02|19)",,,,"119",,,[3]],,[,,"1(?:02|19)|40404",,,,"119"],[,,,,,,,,,[-1]],[,,"40404",,,,"40404",,,[5]],,[,,"40404",,,,"40404",,,[5]]],AG:[,[,,"[19]\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"AG",,,,,,,,,,,,,,,,,,[,,"9(?:11|99)",,,,"911"],,[,,"176|9(?:11|99)",,,,"911"],[,,,,,,,,,[-1]],[,
,"176",,,,"176"],,[,,"176",,,,"176"]],AI:[,[,,"[19]\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"AI",,,,,,,,,,,,,,,,,,[,,"911",,,,"911"],,[,,"911",,,,"911"],[,,,,,,,,,[-1]],[,,"176",,,,"176"],,[,,"176",,,,"176"]],AL:[,[,,"[15]\\d{2,5}",,,,,,,[3,5,6]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"AL",,,,,,,,,,,,,,,,,,[,,"1(?:12|2[789])",,,,"129",,,[3]],,[,,"1(?:1(?:2|6(?:000|1(?:06|11|23)))|2[5-9])|5\\d{4}",,,,"129"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,"5\\d{4}",,,,"51234",,,[5]]],AM:[,[,,"[148]\\d{2,4}",
,,,,,,[3,4,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"AM",,,,,,,,,,,,,,,,,,[,,"10[123]",,,,"102",,,[3]],,[,,"1\\d{2}|40404|8[1-7]\\d{2}",,,,"8711"],[,,,,,,,,,[-1]],[,,"40404",,,,"40404",,,[5]],,[,,"40404",,,,"40404",,,[5]]],AO:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"AO",,,,,,,,,,,,,,,,,,[,,"11[235]",,,,"113"],,[,,"11[235]",,,,"113"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],AR:[,[,,"[01389]\\d{1,4}",,,,,,,[2,3,4,5]],,,[,,"[09]\\d{2}|1(?:[02-9]\\d?|1[0-24-9]?)",,,,"111",
,,[2,3]],[,,,,,,,,,[-1]],,,,"AR",,,,,,,,,,,,,,,,,,[,,"10[017]|911",,,,"101",,,[3]],,[,,"000|1(?:0[0-35-7]|1[02-5]|2[15]|9)|3372|89338|911",,,,"121"],[,,,,,,,,,[-1]],[,,"89338|911",,,,"89338",,,[3,5]],,[,,"3372|89338",,,,"3372",,,[4,5]]],AS:[,[,,"[49]\\d{2,4}",,,,,,,[3,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"AS",,,,,,,,,,,,,,,,,,[,,"911",,,,"911",,,[3]],,[,,"40404|911",,,,"911"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,"40404",,,,"40404",,,[5]]],AT:[,[,,"1\\d{2,5}",,,,,,,[3,6]],,,[,,"116(?:00[06]|1(?:17|23))",
,,,"116000",,,[6]],[,,,,,,,,,[-1]],,,,"AT",,,,,,,,,,,,,,,,,,[,,"1(?:[12]2|33|44)",,,,"112",,,[3]],,[,,"1(?:1(?:2|6(?:00[06]|1(?:17|23)))|22|33|44)",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],AU:[,[,,"[027]\\d{2}|1\\d{2,7}",,,,,,,[3,4,5,6,7,8]],,,[,,"1(?:258885|555)|733",,,,"733",,,[3,4,7]],[,,"1(?:2(?:34|456)|9\\d{4})",,,,"191123",,,[4,5,6]],,,,"AU",,,,,,,,,,,,,,,,,,[,,"000|1(?:06|12)",,,,"112",,,[3]],,[,,"000|1(?:06|1(?:00|2|9[46])|2(?:[23]\\d|4\\d{2,3}|5\\d{3,4}|8(?:2|[013-9]\\d))|555|9[13-5]\\d{3})|225|7(?:33|67)",
,,,"112"],[,,"1(?:1\\d{2}|24733)|225|767",,,,"225",,,[3,4,6]],[,,"1(?:258885|555)",,,,"1555",,,[4,7]],,[,,"19\\d{4,6}",,,,"191123",,,[6,7,8]]],AW:[,[,,"[19]\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"AW",,,,,,,,,,,,,,,,,,[,,"100|911",,,,"911"],,[,,"1(?:00|76)|911",,,,"911"],[,,,,,,,,,[-1]],[,,"176",,,,"176"],,[,,"176",,,,"176"]],AX:[,[,,"1\\d{2}|75[12]\\d{2}",,,,,,,[3,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"AX",,,,,,,,,,,,,,,,,,[,,"112",,,,"112",,,[3]],,[,,"112|75[12]\\d{2}",,,,"112"],
[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],AZ:[,[,,"[148]\\d{2,3}",,,,,,,[3,4]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"AZ",,,,,,,,,,,,,,,,,,[,,"1(?:0[123]|12)",,,,"101",,,[3]],,[,,"1(?:0[123]|12)|4040|8800",,,,"101"],[,,,,,,,,,[-1]],[,,"4040|8800",,,,"4040",,,[4]],,[,,"4040|8800",,,,"4040",,,[4]]],BA:[,[,,"1\\d{2,5}",,,,,,,[3,4,5,6]],,,[,,"116\\d{3}",,,,"116000",,,[6]],[,,,,,,,,,[-1]],,,,"BA",,,,,,,,,,,,,,,,,,[,,"12[2-4]",,,,"122",,,[3]],,[,,"1(?:1(?:6(?:00[06]|1(?:1[17]|23))|8\\d{1,2})|2(?:0[0-7]|[2-5]|6[0-26]|[78]\\d{1,2})|[3-5]\\d{2}|7\\d{3})",
,,,"122"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],BB:[,[,,"[2-689]\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"BB",,,,,,,,,,,,,,,,,,[,,"[2359]11",,,,"211"],,[,,"[2-689]11",,,,"211"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],BD:[,[,,"[19]\\d{2,4}",,,,,,,[3,4,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"BD",,,,,,,,,,,,,,,,,,[,,"10[0-2]|999",,,,"999",,,[3]],,[,,"1(?:0(?:[0-39]|5(?:0\\d|[1-4])|6\\d{2}|7[0-4]|8[0-29])|1[6-9]|2(?:2[0-5]|[34])|3(?:1\\d?|3\\d|6[3-6])|4(?:0\\d|1\\d{2})|5[2-9])|9(?:594|99)",
,,,"103"],[,,,,,,,,,[-1]],[,,"9594",,,,"9594",,,[4]],,[,,"9594",,,,"9594",,,[4]]],BE:[,[,,"1\\d{2,5}|[2-9]\\d{3}",,,,,,,[3,4,6]],,,[,,"1(?:0[25-8]|1(?:0|6\\d{3})|7(?:12|77)|813)|8\\d{3}",,,,"116000"],[,,"1(?:2(?:12|34)|3(?:07|13)|414|\\d04)|[2-79]\\d{3}",,,,"7212",,,[4]],,,,"BE",,,,,,,,,,,,,,,,,,[,,"1(?:0[01]|12)",,,,"112",,,[3]],,[,,"1(?:0[0-8]|1(?:[027]|6(?:000|117))|2(?:0[47]|12|3[0-24]|99)|3(?:0[47]|13|99)|4(?:0[47]|14|50|99)|7(?:00|1[27-9]|33|65|7[17]|89)|81[39])|[2-9]\\d{3}",,,,"112"],[,,,,
,,,,,[-1]],[,,,,,,,,,[-1]],,[,,"[2-9]\\d{3}",,,,"2787",,,[4]]],BF:[,[,,"1\\d",,,,,,,[2]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"BF",,,,,,,,,,,,,,,,,,[,,"1[78]",,,,"17"],,[,,"1[78]",,,,"17"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],BG:[,[,,"1\\d{2,5}",,,,,,,[3,6]],,,[,,"116(?:000|111)",,,,"116000",,,[6]],[,,,,,,,,,[-1]],,,,"BG",,,,,,,,,,,,,,,,,,[,,"1(?:12|50|6[06])",,,,"112",,,[3]],,[,,"1(?:1(?:2|6(?:000|111))|50|6[06])",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],BH:[,[,,"[0189]\\d{2,4}",
,,,,,,[3,5]],,,[,,"(?:0[167]|81)\\d{3}",,,,"07123",,,[5]],[,,"9[148]\\d{3}",,,,"94123",,,[5]],,,,"BH",,,,,,,,,,,,,,,,,,[,,"[19]99",,,,"999",,,[3]],,[,,"0[167]\\d{3}|1(?:[02]\\d|12|4[01]|51|8[18]|9[169])|8[158]\\d{3}|9(?:[148]\\d{3}|9[02489])",,,,"999"],[,,,,,,,,,[-1]],[,,"0[67]\\d{3}|88000|98555",,,,"88000",,,[5]],,[,,"88000|98555",,,,"88000",,,[5]]],BI:[,[,,"[16-9]\\d{2,3}",,,,,,,[3,4]],,,[,,"611",,,,"611",,,[3]],[,,,,,,,,,[-1]],,,,"BI",,,,,,,,,,,,,,,,,,[,,"11[237]",,,,"117",,,[3]],,[,,"1(?:1\\d|5[2-9]|6[0-256])|611|7(?:10|77|979)|8[28]8|900",
,,,"117"],[,,,,,,,,,[-1]],[,,"611|7(?:10|77)|888|900",,,,"611",,,[3]],,[,,"710|900",,,,"900",,,[3]]],BJ:[,[,,"[17]\\d{2,3}",,,,,,,[3,4]],,,[,,"7[3-5]\\d{2}",,,,"7312",,,[4]],[,,,,,,,,,[-1]],,,,"BJ",,,,,,,,,,,,,,,,,,[,,"11[78]",,,,"117",,,[3]],,[,,"1(?:1[78]|2[02-5]|60)|7[0-5]\\d{2}",,,,"117"],[,,,,,,,,,[-1]],[,,"12\\d",,,,"122",,,[3]],,[,,,,,,,,,[-1]]],BL:[,[,,"1\\d",,,,,,,[2]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"BL",,,,,,,,,,,,,,,,,,[,,"18",,,,"18"],,[,,"18",,,,"18"],[,,,,,,,,,[-1]],[,,,,,,,,,
[-1]],,[,,,,,,,,,[-1]]],BM:[,[,,"[19]\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"BM",,,,,,,,,,,,,,,,,,[,,"911",,,,"911"],,[,,"176|911",,,,"911"],[,,,,,,,,,[-1]],[,,"176",,,,"176"],,[,,"176",,,,"176"]],BN:[,[,,"9\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"BN",,,,,,,,,,,,,,,,,,[,,"99[135]",,,,"991"],,[,,"99[135]",,,,"991"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],BO:[,[,,"[14]\\d{2,4}",,,,,,,[3,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"BO",,,,,,,,,,,,,,,,,,[,,"11[089]",
,,,"110",,,[3]],,[,,"11[089]|40404",,,,"110"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,"40404",,,,"40404",,,[5]]],BQ:[,[,,"[19]\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"BQ",,,,,,,,,,,,,,,,,,[,,"112|911",,,,"112"],,[,,"1(?:12|76)|911",,,,"112"],[,,,,,,,,,[-1]],[,,"176",,,,"176"],,[,,"176",,,,"176"]],BR:[,[,,"[12469]\\d{2,5}",,,,,,,[3,4,5,6]],,,[,,"1(?:00|[89]\\d)|4(?:57|828)",,,,"181",,,[3,4]],[,,,,,,,,,[-1]],,,,"BR",,,,,,,,,,,,,,,,,,[,,"1(?:12|28|9[023])|911",,,,"190",,,[3]],,[,,"1(?:0(?:[02]|3(?:1[2-579]|2[13-9]|3[124-9]|4[1-3578]|5[1-468]|6[139]|8[149]|9[168])|5[0-35-9]|6(?:0|1[0-35-8]?|2[0145]|3[0137]?|4[37-9]?|5[0-35]|6[016]?|7[137]?|8[5-8]|9[1359]))|1[25-8]|2[35789]|3(?:[024568]|3[12])|4[12568]|5\\d|6[0-8]|8[015]|9[0-4789])|2(?:7(?:330|878)|85959?)|4(?:0404?|11[12]|57|828)|55555|6(?:0\\d{4}|10000)|911",
,,,"168"],[,,"102|27330",,,,"27330",,,[3,5]],[,,"151|27878|4(?:0404?|11[12]|57)|55555",,,,"27878",,,[3,4,5]],,[,,"2(?:7(?:330|878)|85959?)|4(?:0404|828)|6(?:0\\d{4}|10000)",,,,"27878",,,[4,5,6]]],BS:[,[,,"9\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"BS",,,,,,,,,,,,,,,,,,[,,"91[19]",,,,"911"],,[,,"91[19]",,,,"911"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],BT:[,[,,"[14]\\d{2,4}",,,,,,,[3,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"BT",,,,,,,,,,,,,,,,,,[,,"11[023]",,,,"113",,,[3]],
,[,,"11[0-6]|40404",,,,"113"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,"40404",,,,"40404",,,[5]]],BW:[,[,,"[19]\\d{2,4}",,,,,,,[3,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"BW",,,,,,,,,,,,,,,,,,[,,"99[789]",,,,"999",,,[3]],,[,,"13123|99[789]",,,,"999"],[,,,,,,,,,[-1]],[,,"13123",,,,"13123",,,[5]],,[,,"13123",,,,"13123",,,[5]]],BY:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"BY",,,,,,,,,,,,,,,,,,[,,"1(?:0[123]|12)",,,,"112"],,[,,"1(?:0[1-79]|1[246]|35|5[1235]|6[89]|7[5-7]|8[58]|9[1-7])",
,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],BZ:[,[,,"9\\d{1,2}",,,,,,,[2,3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"BZ",,,,,,,,,,,,,,,,,,[,,"9(?:0|11)",,,,"911"],,[,,"9(?:0|11)",,,,"911"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],CA:[,[,,"[124-9]\\d{2,5}|3(?:\\d{2,5}|\\d{7})",,,,,,,[3,5,6,8]],,,[,,"211",,,,"211",,,[3]],[,,,,,,,,,[-1]],,,,"CA",,,,,,,,,,,,,,,,,,[,,"112|911",,,,"911",,,[3]],,[,,"1(?:12|\\d{4,5})|[25-9](?:11|\\d{4,5})|3(?:\\d{4,5}|0000\\d{3}|11)|411",,,,"12345"],
[,,,,,,,,,[-1]],[,,"[23567]11",,,,"611",,,[3]],,[,,"[125-9]\\d{4,5}|3(?:\\d{4,5}|0000\\d{3})",,,,"30001",,,[5,6,8]]],CC:[,[,,"[01]\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"CC",,,,,,,,,,,,,,,,,,[,,"000|112",,,,"112"],,[,,"000|112",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],CD:[,[,,"[14]\\d{2,4}",,,,,,,[3,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"CD",,,,,,,,,,,,,,,,,,[,,"1(?:1[348]|77|88)",,,,"113",,,[3]],,[,,"1(?:1[348]|23|77|88)|40404",,,,"40404"],[,,,,,,,,,[-1]],[,
,"40404",,,,"40404",,,[5]],,[,,"40404",,,,"40404",,,[5]]],CF:[,[,,"1\\d{2,3}",,,,,,,[3,4]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"CF",,,,,,,,,,,,,,,,,,[,,"1(?:1[78]|220)",,,,"1220"],,[,,"1(?:1[478]|220)",,,,"117"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],CG:[,[,,"11\\d",,,,,,,[3]],,,[,,"111",,,,"111"],[,,,,,,,,,[-1]],,,,"CG",,,,,,,,,,,,,,,,,,[,,"11[78]",,,,"117"],,[,,"11[12678]",,,,"117"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],CH:[,[,,"[1-9]\\d{2,5}",,,,,,,[3,4,5,6]],,,[,,"1(?:16\\d{3}|47)|5200",
,,,"116000",,,[3,4,6]],[,,"1(?:145|8\\d{2})|543|83111",,,,"543",,,[3,4,5]],,,,"CH",,,,,,,,,,,,,,,,,,[,,"1(?:1[278]|44)",,,,"112",,,[3]],,[,,"1(?:0[78]\\d{2}|1(?:[278]|45|6(?:000|111))|4(?:[03457]|1[45])|6(?:00|[1-46])|8(?:02|1[189]|50|7|8[08]|99))|[2-9]\\d{2,4}",,,,"147"],[,,"1(?:4(?:[035]|1\\d)|6\\d{1,2})",,,,"1600",,,[3,4]],[,,"5(?:200|35)",,,,"535",,,[3,4]],,[,,"[2-9]\\d{2,4}",,,,"600",,,[3,4,5]]],CI:[,[,,"[14]\\d{2,3}",,,,,,,[3,4]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"CI",,,,,,,,,,,,,,,,,,[,
,"1(?:1[01]|[78]0)",,,,"110",,,[3]],,[,,"1(?:1[01]|[78]0)|4443",,,,"110"],[,,,,,,,,,[-1]],[,,"4443",,,,"4443",,,[4]],,[,,"4443",,,,"4443",,,[4]]],CK:[,[,,"9\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"CK",,,,,,,,,,,,,,,,,,[,,"99[689]",,,,"998"],,[,,"99[689]",,,,"998"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],CL:[,[,,"[1-9]\\d{2,4}",,,,,,,[3,4,5]],,,[,,"1213|4342",,,,"4342",,,[4]],[,,"1(?:060|211|3(?:13|[348]0|5[01])|417|560|818|9(?:19|80))|2(?:0122|22[47]|323|777|882)|3(?:0(?:51|99)|132|3(?:29|77|90)|665)|4(?:142|243|3656|4(?:02|15|77)|554)|5(?:004|4154|5(?:66|77)|995)|6(?:0700|131|222|3(?:00|66)|500|699)|7878|8(?:011|11[28]|482|889)|9(?:011|[12]00|330)",
,,,"2224",,,[4,5]],,,,"CL",,,,,,,,,,,,,,,,,,[,,"13[123]|911",,,,"133",,,[3]],,[,,"1(?:06?0|21[13]|3(?:[02679]|13?|[348]0?|5[01]?)|4(?:0[02-6]|17|[379])|560|818|9(?:19|80))|2(?:0(?:01|122)|22[47]|323|777|882)|3(?:0(?:51|99)|132|3(?:29|37|77|90)|665)|4(?:142|243|3(?:42|656)|4(?:02|15|77)|554)|5(?:004|4154|5(?:66|77)|995)|6(?:0700|131|222|3(?:00|66)|500|699)|7878|8(?:011|11[28]|482|889)|9(?:011|1(?:1|00)|200|330)",,,,"139"],[,,"2001|3337",,,,"3337",,,[4]],[,,,,,,,,,[-1]],,[,,"(?:[137-9]|[2456]\\d?)\\d{3}",
,,,"5577",,,[4,5]]],CM:[,[,,"[18]\\d{1,3}",,,,,,,[2,3,4]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"CM",,,,,,,,,,,,,,,,,,[,,"1?1[37]",,,,"113",,,[2,3]],,[,,"1?1[37]|8711",,,,"113"],[,,,,,,,,,[-1]],[,,"8711",,,,"8711",,,[4]],,[,,"8711",,,,"8711",,,[4]]],CN:[,[,,"[19]\\d{2,5}",,,,,,,[3,5,6]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"CN",,,,,,,,,,,,,,,,,,[,,"1(?:1[09]|20)",,,,"119",,,[3]],,[,,"1(?:00\\d{2}|1[09]|20)|95\\d{3,4}",,,,"119"],[,,"100\\d{2}|95\\d{3,4}",,,,"95566",,,[5,6]],[,,,,,,,,,[-1]],,[,,,,,,
,,,[-1]]],CO:[,[,,"[148]\\d{2,4}",,,,,,,[3,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"CO",,,,,,,,,,,,,,,,,,[,,"1(?:1[29]|23|32|56)",,,,"112",,,[3]],,[,,"1(?:06|1[2569]|2[357]|3[27]|4[467]|5[36]|6[45]|95)|40404|85432",,,,"112"],[,,,,,,,,,[-1]],[,,"40404|85432",,,,"40404",,,[5]],,[,,"40404|85432",,,,"40404",,,[5]]],CR:[,[,,"[1359]\\d{2,3}",,,,,,,[3,4]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"CR",,,,,,,,,,,,,,,,,,[,,"112|911",,,,"911",,,[3]],,[,,"1(?:0(?:00|15|2[2-4679])|1(?:1[0-35-9]|2|37|[46]6|7[57]|8[79]|9[0-379])|2(?:00|[12]2|34|55)|3(?:21|33)|4(?:0[06]|1[4-6])|5(?:15|5[15])|693|7(?:00|1[789]|2[02]|[67]7)|975)|3855|5(?:0(?:30|49)|510)|911",
,,,"1022"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,"3855|5(?:0(?:30|49)|510)",,,,"3855",,,[4]]],CU:[,[,,"1\\d{2,5}",,,,,,,[3,6]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"CU",,,,,,,,,,,,,,,,,,[,,"10[456]",,,,"106",,,[3]],,[,,"1(?:0[456]|1(?:6111|8)|40)",,,,"140"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],CV:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"CV",,,,,,,,,,,,,,,,,,[,,"13[012]",,,,"132"],,[,,"13[012]",,,,"132"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],CW:[,[,,"[19]\\d{2}",
,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"CW",,,,,,,,,,,,,,,,,,[,,"112|911",,,,"112"],,[,,"1(?:12|76)|911",,,,"112"],[,,,,,,,,,[-1]],[,,"176",,,,"176"],,[,,"176",,,,"176"]],CX:[,[,,"[01]\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"CX",,,,,,,,,,,,,,,,,,[,,"000|112",,,,"112"],,[,,"000|112",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],CY:[,[,,"1\\d{2,5}",,,,,,,[3,6]],,,[,,"116(?:000|111)",,,,"116000",,,[6]],[,,,,,,,,,[-1]],,,,"CY",,,,,,,,,,,,,,,,,,[,,"1(?:12|99)",,,
,"112",,,[3]],,[,,"1(?:1(?:2|6(?:000|111))|99)",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],CZ:[,[,,"1\\d{2,5}",,,,,,,[3,4,5,6]],,,[,,"116(?:00[06]|111|123)",,,,"116000",,,[6]],[,,,,,,,,,[-1]],,,,"CZ",,,,,,,,,,,,,,,,,,[,,"1(?:12|5[0568])",,,,"112",,,[3]],,[,,"1(?:1(?:2|6\\d{3}|8\\d)|2\\d{2,3}|3\\d{3,4}|4\\d{3}|5[0568]|99)",,,,"116123"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],DE:[,[,,"1\\d{2,5}",,,,,,,[3,6]],,,[,,"116\\d{3}",,,,"116000",,,[6]],[,,,,,,,,,[-1]],,,,"DE",,,,,
,,,,,,,,,,,,,[,,"11[02]",,,,"112",,,[3]],,[,,"11(?:[025]|6(?:00[06]|1(?:1[17]|23)))",,,,"115"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],DJ:[,[,,"1\\d",,,,,,,[2]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"DJ",,,,,,,,,,,,,,,,,,[,,"1[78]",,,,"17"],,[,,"1[78]",,,,"17"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],DK:[,[,,"1\\d{2,5}",,,,,,,[3,4,6]],,,[,,"116(?:00[06]|111)",,,,"116000",,,[6]],[,,,,,,,,,[-1]],,,,"DK",,,,,,,,,,,,,,,,,,[,,"11[24]",,,,"112",,,[3]],,[,,"1(?:1(?:[2-48]|6(?:00[06]|111))|8(?:01|1[0238]|28|30|5[13]|81))",
,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],DM:[,[,,"[39]\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"DM",,,,,,,,,,,,,,,,,,[,,"333|9(?:11|99)",,,,"999"],,[,,"333|9(?:11|99)",,,,"999"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],DO:[,[,,"[19]\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"DO",,,,,,,,,,,,,,,,,,[,,"112|911",,,,"112"],,[,,"112|911",,,,"911"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],DZ:[,[,,"[17]\\d{1,2}",,,,,,,[2,3]],,,[,,,,,,,,,[-1]],
[,,,,,,,,,[-1]],,,,"DZ",,,,,,,,,,,,,,,,,,[,,"1[47]",,,,"17",,,[2]],,[,,"1[47]|730",,,,"17"],[,,,,,,,,,[-1]],[,,"730",,,,"730",,,[3]],,[,,"730",,,,"730",,,[3]]],EC:[,[,,"[19]\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"EC",,,,,,,,,,,,,,,,,,[,,"1(?:0[12]|12)|911",,,,"911"],,[,,"1(?:0[12]|12)|911",,,,"911"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],EE:[,[,,"1\\d{2,5}",,,,,,,[3,4,5,6]],,,[,,"1(?:1(?:[02]|6(?:000|111))|2(?:0(?:16|5)|28|55[47])|3(?:014|24|3(?:21|5)|660)|492|5(?:1[03]|410|501|977)|6(?:112|333|644)|7(?:012|127|89)|8(?:10|8[57])|9(?:0(?:[134]|90)|14))",
,,,"116000"],[,,"1(?:18(?:[12458]|00)|2(?:0(?:[02-46-8]|1[0-36])|1(?:[0-4]|6[06])|2(?:[0-4]|5[25])|[367]|4(?:0[04]|[12]|4[24]|54)55[12457])|3(?:0(?:[02]|1[13578]|3[356])|1[1347]|2[02-5]|3(?:[01347]|2[023]|88)|4(?:[35]|4[34])|5(?:3[134]|5[035])|666)|4(?:2(?:00|4)|4(?:0[01358]|1[024]|50|7)|900)|5(?:0[0-35]|1(?:[1267]|5[0-7]|82)|2(?:[014-6]|22)|330|4(?:[35]|44)|5(?:00|[1-69])|9(?:[159]|[38]0|77))|6(?:1(?:00|1[19]|[356-9])|2(?:2[26]|[68])|3(?:22|36|6[36])|5|6(?:[0-359]|6[0-26])|7(?:00|55|7|8[89])|9(?:00|1|69))|7(?:0(?:[023]|1[0578])|1(?:00|2[034]|[4-9])|2(?:[07]|20|44)|7(?:[0-57]|9[79])|8(?:0[08]|2|8[0178])|9(?:00|97))|8(?:1[127]|8[1268]|9[269])|9(?:0(?:[02]|69|9[0269])|1[123689]|21))",
,,,"1182",,,[3,4,5]],,,,"EE",,,,,,,,,,,,,,,,,,[,,"11[02]",,,,"112",,,[3]],,[,,"1(?:1(?:[02-579]|6(?:000|111)|8(?:[09]\\d|[1-8]))|2(?:[0-245]\\d{1,2}|[36-9])|3(?:[0-6]\\d{1,2}|[7-9])|4(?:[1-489]\\d{1,2}|[05-7])|5(?:[0-59]\\d{1,2}|[6-8])|6(?:[05]|[1-46-9]\\d{1,2})|7(?:[0-27-9]\\d{1,2}|[3-6])|8(?:[02-7]|[189]\\d{1,2})|9(?:[0-2]\\d{1,2}|[3-9]))",,,,"115"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,"1(?:18[1258]2(?:0(?:1[036]|[46])|166|21|4(?:0[04]|1|5[47])|[67])|3(?:0(?:1[13-578]|2|3[56])|1[15]|2[045]|3(?:[13]|2[13])|43|5(?:00|3[34]|53))|44(?:0[0135]|14|50|7)|5(?:05|1(?:[12]|5[1246]|8[12])|2(?:[01]|22)|3(?:00|3[03])|4(?:15|5)|500|9(?:5|77|80))|6(?:1[35-8]|226|3(?:22|3[36]|66)|644|7(?:00|7|89)|9(?:00|69))|7(?:01[258]|1(?:00|[15])|2(?:44|7)|8(?:00|87|9))|8(?:1[128]|8[56]|9(?:[26]|77))|90(?:2|69|92))",
,,,"13500",,,[4,5]]],EG:[,[,,"[13]\\d{2,4}",,,,,,,[3,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"EG",,,,,,,,,,,,,,,,,,[,,"1(?:2[23]|80)",,,,"122",,,[3]],,[,,"1(?:2[23]|[69]\\d{3}|80)|34400",,,,"122"],[,,,,,,,,,[-1]],[,,"34400",,,,"34400",,,[5]],,[,,"34400",,,,"34400",,,[5]]],EH:[,[,,"1\\d{1,2}",,,,,,,[2,3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"EH",,,,,,,,,,,,,,,,,,[,,"1(?:[59]|77)",,,,"15"],,[,,"1(?:[59]|77)",,,,"15"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],ER:[,[,,"[12]\\d{2,5}",,,,,,,[3,
6]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"ER",,,,,,,,,,,,,,,,,,[,,"1(?:1[2-46]|2(?:4422|7799))|2(?:0(?:1(?:606|917)|2(?:099|914)))",,,,"113"],,[,,"1(?:1[2-6]|2(?:4422|7799))|2(?:0(?:1(?:606|917)|2(?:099|914)))",,,,"114"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],ES:[,[,,"[0-379]\\d{2,5}",,,,,,,[3,4,5,6]],,,[,,"0(?:16|6[57]|88)|1(?:006|16\\d{3}|[3-7]\\d{2})|20\\d{4}",,,,"116111",,,[3,4,6]],[,,"1(?:18\\d{2}|2\\d{1,4})|2(?:2\\d{1,4}|[3-9]\\d{3,4})|9(?:0(?:5[124578]|7)|\\d{4,5})|[37]\\d{4,5}",
,,,"23456"],,,,"ES",,,,,,,,,,,,,,,,,,[,,"08[58]|112",,,,"112",,,[3]],,[,,"0(?:1[0-26]|6[0-257]|8[058]|9[12])|1(?:0[03-57]\\d{1,3}|1(?:2|6(?:000|111)|8\\d{2})|2\\d{1,4}|3(?:[34]|\\d{2})|7(?:7|\\d{2})|[4-689]\\d{2})|2(?:[01]\\d{4}|2\\d{1,4}|[357]\\d{3}|80\\d{2})|3[357]\\d{3}|79[57]\\d{3}|9(?:0(?:5[124578]|7)|9[57]\\d{3})",,,,"010"],[,,"0(?:[16][0-2]|80|9[12])|21\\d{4}",,,,"211234",,,[3,6]],[,,"1(?:2\\d{1,4}|3[34]|77)|22\\d{1,4}",,,,"123"],,[,,"[2379]\\d{4,5}",,,,"23456",,,[5,6]]],ET:[,[,,"9\\d{1,2}",
,,,,,,[2,3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"ET",,,,,,,,,,,,,,,,,,[,,"9(?:11?|[23]|9[17])",,,,"991"],,[,,"9(?:11?|[23]|9[17])",,,,"991"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],FI:[,[,,"1\\d{2,5}|75[12]\\d{2}",,,,,,,[3,5,6]],,,[,,"116111",,,,"116111",,,[6]],[,,,,,,,,,[-1]],,,,"FI",,,,,,,,,,,,,,,,,,[,,"112",,,,"112",,,[3]],,[,,"11(?:2|6111)|75[12]\\d{2}",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],FJ:[,[,,"[0-579]\\d{1,4}",,,,,,,[2,3,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,
[-1]],,,,"FJ",,,,,,,,,,,,,,,,,,[,,"91[17]",,,,"911",,,[3]],,[,,"0(?:1[34]|8[1-4])|1(?:0[1-3]|[25]9)|2[289]|30|4(?:0404|4)|54|75|91[137]",,,,"22"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,"40404",,,,"40404",,,[5]]],FK:[,[,,"[19]\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"FK",,,,,,,,,,,,,,,,,,[,,"999",,,,"999"],,[,,"1\\d{2}|999",,,,"123"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],FM:[,[,,"3\\d{5}|9\\d{2}",,,,,,,[3,6]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"FM",,,,,,,,,,,,,,,,,,[,,"320221|911",
,,,"911"],,[,,"320221|911",,,,"911"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],FO:[,[,,"1\\d{2,3}",,,,,,,[3,4]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"FO",,,,,,,,,,,,,,,,,,[,,"11[24]",,,,"112",,,[3]],,[,,"1(?:1[248]|4[124]\\d|71\\d|8[7-9]\\d)",,,,"114"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],FR:[,[,,"1\\d{1,5}|[267]\\d{2,4}|3\\d{3,4}|[458]\\d{4}",,,,,,,[2,3,4,5,6]],,,[,,"1(?:0(?:07|13)|1(?:[0459]|6\\d{3}|871[03])|9[167])|224|3(?:[01]\\d{2}|3700)|740",,,,"3010",,,[3,4,5,6]],[,,"118(?:[0-68]\\d{2}|7(?:0\\d|1[1-9]|[2-9]\\d))|36665|[4-8]\\d{4}",
,,,"42000",,,[5,6]],,,,"FR",,,,,,,,,,,,,,,,,,[,,"1(?:[578]|12)",,,,"112",,,[2,3]],,[,,"1(?:0\\d{2}|1(?:[02459]|6(?:000|111)|8\\d{3})|9[167]|[578])|2(?:0(?:000|20)|24)|3\\d{3,4}|6(?:1[14]|34|\\d{4})|7(?:0[06]|22|40|\\d{4})|[458]\\d{4}",,,,"1010"],[,,"10(?:14|2[23]|34|6[14]|99)|2020|3(?:646|9[07]0)|6(?:1[14]|34)|70[06]",,,,"1023",,,[3,4]],[,,"118777|2(?:0(?:000|20)|24)|6(?:1[14]|34)|7\\d{2}",,,,"118777",,,[3,4,5,6]],,[,,"(?:114|[3-8]\\d{4})",,,,"33700",,,[3,5]]],GA:[,[,,"1\\d{1,3}",,,,,,,[2,4]],,,[,
,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"GA",,,,,,,,,,,,,,,,,,[,,"1(?:730|8|3\\d{2})",,,,"1730"],,[,,"1(?:730|8|3\\d{2})",,,,"1730"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],GB:[,[,,"[1-467-9]\\d{2,5}",,,,,,,[3,4,5,6]],,,[,,"1(?:16\\d{3}|7[56]0|8000)|2(?:202|48)|4444",,,,"116000"],[,,,,,,,,,[-1]],,,,"GB",,,,,,,,,,,,,,,,,,[,,"112|999",,,,"112",,,[3]],,[,,"1(?:0[01]|1(?:[12]|6(?:000|1(?:11|23))|8\\d{3})|2(?:[123]|50)|33|4(?:1|7\\d)|5(?:\\d|71)|7(?:0\\d|[56]0)|800\\d|9[15])|2(?:02(?:02)?|1300|2(?:02|11|2)|3(?:02|336|45)|4(?:25|8))|3[13]3|4(?:0[02]|35[01]|44[45]|5\\d)|6(?:50|\\d{4})|7(?:0\\d{3}|8(?:9|\\d{3})|9\\d{3})|8\\d{4}|9(?:01|99)",
,,,"150"],[,,,,,,,,,[-1]],[,,"1(?:250|571|7[56]0)|2(?:02(?:02)?|1300|3336|48)|4444|901",,,,"1571",,,[3,4,5]],,[,,"1250|2(?:0202|1300)|7\\d{4}|8[01]\\d{3}",,,,"20202",,,[4,5]]],GD:[,[,,"[19]\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"GD",,,,,,,,,,,,,,,,,,[,,"911",,,,"911"],,[,,"911",,,,"911"],[,,,,,,,,,[-1]],[,,"176",,,,"176"],,[,,"176",,,,"176"]],GE:[,[,,"[041]\\d{2,4}",,,,,,,[3,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"GE",,,,,,,,,,,,,,,,,,[,,"0(?:11|22|33)|1(?:1[123]|22)",,,,"112",
,,[3]],,[,,"0(?:11|22|33)|1(?:1[123]|22)|40404",,,,"112"],[,,,,,,,,,[-1]],[,,"40404",,,,"40404",,,[5]],,[,,"40404",,,,"40404",,,[5]]],GF:[,[,,"1\\d",,,,,,,[2]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"GF",,,,,,,,,,,,,,,,,,[,,"1[578]",,,,"15"],,[,,"1[578]",,,,"15"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],GG:[,[,,"[19]\\d{2,5}",,,,,,,[3,4,5,6]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"GG",,,,,,,,,,,,,,,,,,[,,"112|999",,,,"999",,,[3]],,[,,"1(?:0[01]|1(?:[12]|[68]\\d{3})|23|4(?:1|7\\d)|55|800\\d|95)|999",
,,,"155"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],GH:[,[,,"[14589]\\d{2,4}",,,,,,,[3,4,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"GH",,,,,,,,,,,,,,,,,,[,,"19[123]|999",,,,"999",,,[3]],,[,,"19[123]|40404|(?:54|83)00|999",,,,"999"],[,,,,,,,,,[-1]],[,,"40404|(?:54|83)00",,,,"5400",,,[4,5]],,[,,"40404|(?:54|83)00",,,,"5400",,,[4,5]]],GI:[,[,,"[158]\\d{2,5}",,,,,,,[3,4,5,6]],,,[,,"1(?:00|16\\d{3}|23|4(?:1|7\\d)|5[15]|9[2-4])|555|80\\d{2}",,,,"100",,,[3,4,6]],[,,"8[1-69]\\d{2}",,,,"8112",,,[4]],
,,,"GI",,,,,,,,,,,,,,,,,,[,,"1(?:12|9[09])",,,,"112",,,[3]],,[,,"1(?:00|1(?:2|6(?:00[06]|1(?:1[17]|23))|8\\d{2})|23|4(?:1|7[014])|5[015]|9[02349])|555|8(?:0(?:0|\\d{2})|[1-35-79]\\d{2}|4(?:[0-2]|\\d{2})|8[1-589])",,,,"116000"],[,,"150|87\\d{2}",,,,"150",,,[3,4]],[,,"1(?:18\\d{2}|23|51|9[2-4])|555|8(?:00|88)",,,,"123",,,[3,5]],,[,,,,,,,,,[-1]]],GL:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"GL",,,,,,,,,,,,,,,,,,[,,"112",,,,"112"],,[,,"112",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],
,[,,,,,,,,,[-1]]],GM:[,[,,"1\\d{1,2}",,,,,,,[2,3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"GM",,,,,,,,,,,,,,,,,,[,,"1?1[678]",,,,"117"],,[,,"1?1[678]",,,,"117"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],GN:[,[,,"4\\d{4}",,,,,,,[5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"GN",,,,,,,,,,,,,,,,,,[,,,,,,,,,[-1]],,[,,"40404",,,,"40404"],[,,,,,,,,,[-1]],[,,"40404",,,,"40404"],,[,,"40404",,,,"40404"]],GP:[,[,,"1\\d",,,,,,,[2]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"GP",,,,,,,,,,,,,,,,,,[,,"1[578]",,,,
"18"],,[,,"1[578]",,,,"18"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],GR:[,[,,"1\\d{2,5}",,,,,,,[3,6]],,,[,,"116\\d{3}",,,,"116000",,,[6]],[,,,,,,,,,[-1]],,,,"GR",,,,,,,,,,,,,,,,,,[,,"1(?:00|12|66|99)",,,,"112",,,[3]],,[,,"1(?:00|1(?:2|6(?:000|1(?:11|23)))|66|99)",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],GT:[,[,,"[14]\\d{2,4}",,,,,,,[3,4,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"GT",,,,,,,,,,,,,,,,,,[,,"1(?:10|2[03])",,,,"110",,,[3]],,[,,"1(?:10|2\\d|[57]\\d{2})|40404",
,,,"123"],[,,,,,,,,,[-1]],[,,"40404",,,,"40404",,,[5]],,[,,"40404",,,,"40404",,,[5]]],GU:[,[,,"9\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"GU",,,,,,,,,,,,,,,,,,[,,"911",,,,"911"],,[,,"911",,,,"911"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],GW:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"GW",,,,,,,,,,,,,,,,,,[,,"11[378]",,,,"113"],,[,,"11[378]",,,,"113"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],GY:[,[,,"[019]\\d{2,3}",,,,,,,[3,4]],,,[,,,,,,,,,[-1]],
[,,,,,,,,,[-1]],,,,"GY",,,,,,,,,,,,,,,,,,[,,"91[123]",,,,"911",,,[3]],,[,,"0(?:02|171|444|7(?:[67]7|9)|801|9(?:0[78]|[2-47]))|1(?:443|5[568])|91[123]",,,,"0801"],[,,,,,,,,,[-1]],[,,"1443",,,,"1443",,,[4]],,[,,"1443",,,,"1443",,,[4]]],HK:[,[,,"[19]\\d{2,6}",,,,,,,[3,4,5,6,7]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"HK",,,,,,,,,,,,,,,,,,[,,"112|99[29]",,,,"999",,,[3]],,[,,"1(?:0(?:[0136]\\d{0,4}|2[14]\\d{0,3}|8[138]|9)|12|2(?:[0-3]\\d{0,4}|58\\d{0,3}|8[13]\\d{0,3})|7(?:[135-9]\\d{0,4}|21[89]\\d{0,2}|421\\d{0,2})|8(?:0(?:[13]\\d|60\\d{2}|8)|1(?:0\\d|[2-8])|2(?:182|3|8[128])|3\\d{4}|4(?:1[1-5]|[23]1|6[12])|50[138]|6(?:000|1(?:[13]1|86)|8)|7(?:13|2[1-389]|8[0235-9]|93)\\d{2}|8\\d))|99[29]",
,,,"999"],[,,,,,,,,,[-1]],[,,"1(?:0(?:8\\d|9)|850\\d)",,,,"1088",,,[3,4,5]],,[,,,,,,,,,[-1]]],HN:[,[,,"[14]\\d{2,4}",,,,,,,[3,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"HN",,,,,,,,,,,,,,,,,,[,,"199",,,,"199",,,[3]],,[,,"199|40404",,,,"199"],[,,,,,,,,,[-1]],[,,"40404",,,,"40404",,,[5]],,[,,"40404",,,,"40404",,,[5]]],HR:[,[,,"[19]\\d{1,5}",,,,,,,[2,3,4,5,6]],,,[,,"1(?:16\\d{3}|3977)",,,,"116000",,,[5,6]],[,,"118\\d{2}",,,,"11812",,,[5]],,,,"HR",,,,,,,,,,,,,,,,,,[,,"1(?:12|9[2-4])|9[34]",,,,"112",,,[2,
3]],,[,,"1(?:1(?:2|6(?:00[06]|1(?:1[17]|23))|8\\d{2})|3977|9(?:[2-5]|87))|9[34]",,,,"112"],[,,,,,,,,,[-1]],[,,"13977",,,,"13977",,,[5]],,[,,"13977",,,,"13977",,,[5]]],HT:[,[,,"[14]\\d{2,4}",,,,,,,[3,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"HT",,,,,,,,,,,,,,,,,,[,,"11[48]",,,,"118",,,[3]],,[,,"11[48]|40404",,,,"114"],[,,,,,,,,,[-1]],[,,"40404",,,,"40404",,,[5]],,[,,"40404",,,,"40404",,,[5]]],HU:[,[,,"1\\d{2,5}",,,,,,,[3,6]],,,[,,"116(?:000|1(?:11|23))",,,,"116000",,,[6]],[,,,,,,,,,[-1]],,,,"HU",,
,,,,,,,,,,,,,,,,[,,"1(?:0[457]|12)",,,,"112",,,[3]],,[,,"1(?:0[457]|1(?:2|6(?:000|1(?:11|23))))",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],ID:[,[,,"[178]\\d{2,4}",,,,,,,[3,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"ID",,,,,,,,,,,,,,,,,,[,,"11[02389]",,,,"112",,,[3]],,[,,"1(?:1[02389]|40\\d{2})|71400|89887",,,,"112"],[,,,,,,,,,[-1]],[,,"71400|89887",,,,"71400",,,[5]],,[,,"71400",,,,"71400",,,[5]]],IE:[,[,,"[159]\\d{2,5}",,,,,,,[3,4,5,6]],,,[,,"116\\d{3}",,,,"116000",,,[6]],[,,"5[37]\\d{3}",
,,,"53012",,,[5]],,,,"IE",,,,,,,,,,,,,,,,,,[,,"112|999",,,,"112",,,[3]],,[,,"1(?:1(?:2|6(?:00[06]|1(?:1[17]|23))|8\\d{2})|9\\d{2})|5[0137]\\d{3}|999",,,,"112"],[,,"51\\d{3}",,,,"51012",,,[5]],[,,"51210",,,,"51210",,,[5]],,[,,"118\\d{2}|5(?:[037]\\d{3}|1210)",,,,"51210",,,[5]]],IL:[,[,,"1\\d{2,4}",,,,,,,[3,4,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"IL",,,,,,,,,,,,,,,,,,[,,"1(?:0[012]|12)",,,,"112",,,[3]],,[,,"1(?:0(?:[012]|400)|1(?:[013-9]\\d|2)|[2-9]\\d{2})",,,,"1455"],[,,,,,,,,,[-1]],[,,"10400",
,,,"10400",,,[5]],,[,,"10400",,,,"10400",,,[5]]],IM:[,[,,"[189]\\d{2,5}",,,,,,,[3,5,6]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"IM",,,,,,,,,,,,,,,,,,[,,"999",,,,"999",,,[3]],,[,,"1\\d{2}(?:\\d{3})?|8(?:6444|9887)|999",,,,"150"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,"8(?:6444|9887)",,,,"86444",,,[5]]],IN:[,[,,"[125]\\d{2,7}",,,,,,,[3,4,5,6,7,8]],,,[,,"1\\d{2,5}",,,,"105010",,,[3,4,5,6]],[,,"11[67][0-2]\\d{3}|56161561",,,,"1160530",,,[7,8]],,,,"IN",,,,,,,,,,,,,,,,,,[,,"1(?:0[0128]|12|298)|2611",,,,"108",
,,[3,4]],,[,,"1(?:0(?:[01248]|5(?:010|6|902)|7(?:[07]|80)|9[0157])|1(?:[289]|[67][0-2]\\d{3})|2(?:1|98)|39|4[01]|55[23]\\d{2}|7000|9(?:0[019]|47|50|6[1347]|[89]))|2611|5(?:14(?:2[5-9]|[34]\\d)|3000|6161(?:17[89]|561)|757555)",,,,"108"],[,,"5(?:14(?:2[5-9]|[34]\\d)|757555)",,,,"5757555",,,[5,7]],[,,"1(?:1(?:[67][0-2]\\d{3}|[89])|21|4[01]|55330|7\\d{3}|9(?:[89]|09))|5(?:3000|6161(?:17[89]|561))",,,,"53000"],,[,,"1(?:39|90[019])|5(?:14(?:2[5-9]|[34]\\d)|6161(?:17[89]|561)|757555)",,,,"51431",,,[3,4,
5,7,8]]],IQ:[,[,,"[1479]\\d{2,4}",,,,,,,[3,4,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"IQ",,,,,,,,,,,,,,,,,,[,,"1(?:0[04]|15|22)",,,,"122",,,[3]],,[,,"1(?:0[04]|15|22)|4432|71117|9988",,,,"4432"],[,,,,,,,,,[-1]],[,,"4432|71117|9988",,,,"4432",,,[4,5]],,[,,"4432|71117|9988",,,,"4432",,,[4,5]]],IR:[,[,,"[0-29]\\d{2,5}",,,,,,,[3,4,5,6]],,,[,,"1[129]\\d",,,,"123",,,[3]],[,,,,,,,,,[-1]],,,,"IR",,,,,,,,,,,,,,,,,,[,,"1(?:1[025]|25)|911",,,,"112",,,[3]],,[,,"096(?:0[12]|2[16-8]|3(?:08|[14]5|[23]|66)|4(?:0|80)|5[01]|6[89]|86|9[19])|1(?:1[0-68]|2[0-59]|3[346-8]|4(?:[0147]|[289]0)|5(?:0[14]|1[02479]|2[0-3]|39|[49]0|65)|6(?:[16]6|[27]|90)|8(?:03|1[18]|22|3[37]|4[28]|88|99)|9[0-579])|20(?:00|1(?:[038]|1[079]|26|9[69])|2[01]|90)|9(?:11|9(?:90|0009))",
,,,"112"],[,,"(?:096|1[58])\\d{2}",,,,"09612",,,[4,5]],[,,"1[58]\\d{2}|99(?:90|0009)",,,,"9990",,,[4,6]],,[,,"990009",,,,"990009",,,[6]]],IS:[,[,,"1\\d{2,5}",,,,,,,[3,4,6]],,,[,,"1717",,,,"1717",,,[4]],[,,"1848",,,,"1848",,,[4]],,,,"IS",,,,,,,,,,,,,,,,,,[,,"112",,,,"112",,,[3]],,[,,"1(?:1(?:[28]|6(?:1(?:23|16)))|4(?:00|1[145]|4[0146])|55|7(?:00|17|7[07-9])|8(?:0[08]|1[016-9]|20|48|8[018])|900)",,,,"112"],[,,,,,,,,,[-1]],[,,"1441",,,,"1441",,,[4]],,[,,"1(?:415|848|900)",,,,"1415",,,[4]]],IT:[,[,,"[14]\\d{2,6}",
,,,,,,[3,4,5,6,7]],,,[,,"1(?:16\\d{3}|87)",,,,"187",,,[3,6]],[,,"(?:12|4(?:[478]\\d{1,3}|55))\\d{2}",,,,"1254",,,[4,5,6,7]],,,,"IT",,,,,,,,,,,,,,,,,,[,,"11[2358]",,,,"112",,,[3]],,[,,"1(?:0\\d{2,3}|1(?:[2-5789]|6(?:000|111))|2\\d{2}|3[39]|4(?:82|9\\d{1,3})|5(?:00|1[58]|2[25]|3[03]|44|[59])|60|8[67]|9(?:[01]|2(?:[01]\\d{2}|[2-9])|4\\d|696))|4(?:2323|3(?:[01]|[45]\\d{2})\\d{2}|[478](?:[0-4]|[5-9]\\d{2})\\d{2}|5(?:045|5\\d{2}))",,,,"114"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,"4[3-578]\\d{3,5}",,,,"43000",
,,[5,6,7]]],JE:[,[,,"[129]\\d{2,5}",,,,,,,[3,4,6]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"JE",,,,,,,,,,,,,,,,,,[,,"112|999",,,,"999",,,[3]],,[,,"1(?:00|1(?:2|8\\d{3})|23|4(?:[14]|28|7\\d)|5\\d|7(?:0[12]|[128]|35?)|808|9[135])|23[234]|999",,,,"150"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],JM:[,[,,"[19]\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"JM",,,,,,,,,,,,,,,,,,[,,"11[029]|911",,,,"112"],,[,,"1(?:1[029]|76)|911",,,,"911"],[,,,,,,,,,[-1]],[,,"176",,,,"176"],,[,,"176",,,,"176"]],
JO:[,[,,"[19]\\d{2,4}",,,,,,,[3,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"JO",,,,,,,,,,,,,,,,,,[,,"1(?:12|9[127])|911",,,,"112",,,[3]],,[,,"1(?:09|1[0-2]|9[0-24-79])|9(?:0903|11|8788)",,,,"111"],[,,,,,,,,,[-1]],[,,"9(?:0903|8788)",,,,"90903",,,[5]],,[,,"9(?:0903|8788)",,,,"90903",,,[5]]],JP:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"JP",,,,,,,,,,,,,,,,,,[,,"11[09]",,,,"110"],,[,,"11[09]",,,,"110"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],KE:[,[,,"[1-9]\\d{2,4}",,,,,,
,[3,4,5]],,,[,,"1(?:1(?:6|9\\d)|5(?:01|2[127]|6(?:29|6[67])))",,,,"1501",,,[4,5]],[,,"909\\d{2}",,,,"90912",,,[5]],,,,"KE",,,,,,,,,,,,,,,,,,[,,"112|114|999",,,,"999",,,[3]],,[,,"1(?:0(?:[07-9]|1[0-25]|400)|1(?:[02456]|9[0-579])|2[123]|3[01]|4[14]|5(?:[01][01]|2[0-24-79]|33|4[05]|5[59]|6(?:00|29|6[67]))|6[035]\\d{2}|[78]\\d|9(?:[02-9]\\d{2}|19))|(?:2[0-79]|3[0-29]|4[0-4])\\d{3}|5(?:[0-7]\\d|99)\\d{2}|(?:6[2357]|7[0-29])\\d{3}|8(?:[0-9]\\d{3}|988)|9(?:09\\d{2}|99)",,,,"116"],[,,,,,,,,,[-1]],[,,"1(?:0400|3[01]|4[14]|5(?:1[01]|2[25])|6[35]\\d{2})|(?:2[0-79]|3[0-29]|4[0-4])\\d{3}|5(?:[0-7]\\d|99)\\d{2}|(?:6[2357]|7[0-29])\\d{3}|8(?:988|[0-9]\\d{3})|909\\d{2}",
,,,"90912"],,[,,"1(?:0400|4[14]|5(?:01|55|6(?:29|6[67]))|6[035]\\d{2})|40404|8988|909\\d{2}",,,,"8988"]],KG:[,[,,"[14]\\d{2,3}",,,,,,,[3,4]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"KG",,,,,,,,,,,,,,,,,,[,,"10[123]",,,,"101",,,[3]],,[,,"10[123]|4040",,,,"101"],[,,,,,,,,,[-1]],[,,"4040",,,,"4040",,,[4]],,[,,"4040",,,,"4040",,,[4]]],KH:[,[,,"[146]\\d{2,4}",,,,,,,[3,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"KH",,,,,,,,,,,,,,,,,,[,,"11[789]|666",,,,"117",,,[3]],,[,,"11[789]|40404|666",,,,"117"],[,,,,,,,
,,[-1]],[,,"40404",,,,"40404",,,[5]],,[,,"40404",,,,"40404",,,[5]]],KI:[,[,,"[179]\\d{2,3}",,,,,,,[3,4]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"KI",,,,,,,,,,,,,,,,,,[,,"19[2-5]|99[2349]",,,,"192",,,[3]],,[,,"1(?:0(?:[0-8]|5[01259])|88|9[2-5])|777|99[2349]",,,,"100"],[,,"103",,,,"103",,,[3]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],KM:[,[,,"1\\d",,,,,,,[2]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"KM",,,,,,,,,,,,,,,,,,[,,"1[78]",,,,"17"],,[,,"1[78]",,,,"17"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],
KN:[,[,,"[39]\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"KN",,,,,,,,,,,,,,,,,,[,,"333|9(?:11|99)",,,,"999"],,[,,"333|9(?:11|99)",,,,"999"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],KP:[,[,,"[18]\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"KP",,,,,,,,,,,,,,,,,,[,,"1(?:12|19)|819",,,,"112"],,[,,"1(?:12|19)|819",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],KR:[,[,,"1\\d{2,4}",,,,,,,[3,4,5]],,,[,,"1(?:1[78]|28|330|82)",,,,"118",,,[3,4]],[,,,,,,,,,[-1]],
,,,"KR",,,,,,,,,,,,,,,,,,[,,"11[29]",,,,"112",,,[3]],,[,,"1(?:0(?:[01]|114)|1(?:[0247-9]|114)|2[01389]|3(?:2|3[039]|45|66|88|9[18])|[679]114|8(?:114|2))",,,,"112"],[,,,,,,,,,[-1]],[,,"1(?:0(?:[01]|114)|1(?:114|4)|[6-9]114)",,,,"100",,,[3,5]],,[,,,,,,,,,[-1]]],KW:[,[,,"[18]\\d{2,4}",,,,,,,[3,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"KW",,,,,,,,,,,,,,,,,,[,,"112",,,,"112",,,[3]],,[,,"1[0-7]\\d|89887",,,,"177"],[,,,,,,,,,[-1]],[,,"89887",,,,"89887",,,[5]],,[,,,,,,,,,[-1]]],KY:[,[,,"9\\d{2}",,,,,,,[3]],
,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"KY",,,,,,,,,,,,,,,,,,[,,"911",,,,"911"],,[,,"911",,,,"911"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],KZ:[,[,,"[134]\\d{2,4}",,,,,,,[3,4,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"KZ",,,,,,,,,,,,,,,,,,[,,"1(?:0[123]|12)",,,,"112",,,[3]],,[,,"1(?:0[1-4]|12)|30400|4040",,,,"112"],[,,,,,,,,,[-1]],[,,"30400|4040",,,,"30400",,,[4,5]],,[,,"30400|4040",,,,"30400",,,[4,5]]],LA:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"LA",,,,,,,,,,,,,,,,,
,[,,"19[015]",,,,"190"],,[,,"19[015]",,,,"190"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],LB:[,[,,"[19]\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"LB",,,,,,,,,,,,,,,,,,[,,"1(?:12|40|75)|999",,,,"112"],,[,,"1(?:12|40|75)|999",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],LC:[,[,,"9\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"LC",,,,,,,,,,,,,,,,,,[,,"9(?:11|99)",,,,"911"],,[,,"9(?:11|99)",,,,"911"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],LI:[,
[,,"1\\d{2,3}",,,,,,,[3,4]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"LI",,,,,,,,,,,,,,,,,,[,,"1(?:1[278]|44)",,,,"112",,,[3]],,[,,"1(?:1(?:[278]|45)|4[3-57]|50|75|81[18])",,,,"1145"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],LK:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"LK",,,,,,,,,,,,,,,,,,[,,"11[02689]",,,,"119"],,[,,"11[024-9]",,,,"119"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],LR:[,[,,"[3489]\\d{2,3}",,,,,,,[3,4]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"LR",,,
,,,,,,,,,,,,,,,[,,"355|911",,,,"911",,,[3]],,[,,"355|4040|8(?:400|933)|911",,,,"911"],[,,,,,,,,,[-1]],[,,"4040|8(?:400|933)",,,,"8400",,,[4]],,[,,"4040|8(?:400|933)",,,,"8400",,,[4]]],LS:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"LS",,,,,,,,,,,,,,,,,,[,,"11[257]",,,,"112"],,[,,"11[257]",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],LT:[,[,,"[01]\\d{1,5}",,,,,,,[2,3,6]],,,[,,"116\\d{3}",,,,"116000",,,[6]],[,,,,,,,,,[-1]],,,,"LT",,,,,,,,,,,,,,,,,,[,,"0(?:11?|22?|33?)|1(?:0[123]|12)",
,,,"112",,,[2,3]],,[,,"0(?:11?|22?|33?)|1(?:0[123]|1(?:2|6(?:000|1(?:11|23))))",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],LU:[,[,,"1\\d{2,5}",,,,,,,[3,5,6]],,,[,,"116\\d{3}",,,,"116000",,,[6]],[,,,,,,,,,[-1]],,,,"LU",,,,,,,,,,,,,,,,,,[,,"11[23]",,,,"112",,,[3]],,[,,"1(?:1(?:[23]|6(?:000|111))|2\\d{3})",,,,"12123"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],LV:[,[,,"0\\d|1\\d{2,6}|8\\d{3,4}",,,,,,,[2,3,4,5,6]],,,[,,"116\\d{3}",,,,"116000",,,[6]],[,,"1180|8(?:2\\d{3}|[89]\\d{2})",
,,,"1180",,,[4,5]],,,,"LV",,,,,,,,,,,,,,,,,,[,,"0[123]|11[023]",,,,"112",,,[2,3]],,[,,"0[1-4]|1(?:1(?:[02-4]|6(?:000|111)|8[0189])|55|655|77)|821[57]4",,,,"112"],[,,"1181",,,,"1181",,,[4]],[,,"16\\d{2}",,,,"1655",,,[4]],,[,,,,,,,,,[-1]]],LY:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"LY",,,,,,,,,,,,,,,,,,[,,"19[013]",,,,"193"],,[,,"19[013]",,,,"193"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],MA:[,[,,"1\\d{1,2}",,,,,,,[2,3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"MA",,,,
,,,,,,,,,,,,,,[,,"1(?:[59]|77)",,,,"15"],,[,,"1(?:[59]|77)",,,,"15"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],MC:[,[,,"1\\d{1,2}",,,,,,,[2,3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"MC",,,,,,,,,,,,,,,,,,[,,"1(?:12|[578])",,,,"112"],,[,,"1(?:12|41|[578])",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],MD:[,[,,"[19]\\d{2,5}",,,,,,,[3,4,5,6]],,,[,,"116\\d{3}",,,,"116000",,,[6]],[,,,,,,,,,[-1]],,,,"MD",,,,,,,,,,,,,,,,,,[,,"112|90[1-3]",,,,"112",,,[3]],,[,,"1(?:1(?:2|6(?:000|1(?:11|23))|8\\d{1,2}|99)|4\\d{3}|6[0-389]\\d|9(?:0[04-9]|[1-4]\\d))|90[1-3]",
,,,"116000"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],ME:[,[,,"1\\d{2,5}",,,,,,,[3,4,5,6]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"ME",,,,,,,,,,,,,,,,,,[,,"1(?:12|2[234])",,,,"112",,,[3]],,[,,"1(?:[035]\\d{2}|1(?:[013-57-9]\\d|2|6\\d{3})|2\\d{1,2}|4\\d{2,3}|9\\d{3})",,,,"1011"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],MF:[,[,,"1\\d",,,,,,,[2]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"MF",,,,,,,,,,,,,,,,,,[,,"1[578]",,,,"18"],,[,,"1[578]",,,,"18"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,
,,,,,,[-1]]],MG:[,[,,"1\\d{1,2}",,,,,,,[2,3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"MG",,,,,,,,,,,,,,,,,,[,,"11?[78]",,,,"117"],,[,,"11?[78]",,,,"117"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],MH:[,[,,"9\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"MH",,,,,,,,,,,,,,,,,,[,,"911",,,,"911"],,[,,"911",,,,"911"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],MK:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"MK",,,,,,,,,,,,,,,,,,[,,"1(?:12|9[234])",,,,"112"],,[,,
"1(?:12|9[234])",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],ML:[,[,,"[13678]\\d{1,4}",,,,,,,[2,3,4,5]],,,[,,"35200|67(?:00|77)|74(?:02|44)|8000[12]",,,,"35200",,,[4,5]],[,,"122[13]|3(?:52(?:11|2[02]|3[04-6]|99)|7574)|8002[12]",,,,"35211",,,[4,5]],,,,"ML",,,,,,,,,,,,,,,,,,[,,"1[578]",,,,"17",,,[2]],,[,,"1(?:1(?:2|[013-9]\\d)|2(?:1[02-469]|2[13])|[578])|3(?:5(?:0(?:35|57)|2\\d{2})|[67]\\d{3})|67(?:0[09]|59|77|8[89]|99)|74(?:0[02]|44|55)|800[012][12]",,,,"1210"],[,,"37(?:433|575)|7400|8001[12]",
,,,"7400",,,[4,5]],[,,"3(?:5035|[67]\\d{3})|800[012][12]",,,,"35035",,,[5]],,[,,"3(?:6\\d{3}|7(?:4(?:0[24-9]|[1-9]\\d)|5\\d{2}))|7400",,,,"37575",,,[4,5]]],MM:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"MM",,,,,,,,,,,,,,,,,,[,,"199",,,,"199"],,[,,"199",,,,"199"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],MN:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"MN",,,,,,,,,,,,,,,,,,[,,"10[0-3]",,,,"102"],,[,,"10[0-3]",,,,"102"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,
[,,,,,,,,,[-1]]],MO:[,[,,"9\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"MO",,,,,,,,,,,,,,,,,,[,,"999",,,,"999"],,[,,"999",,,,"999"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],MP:[,[,,"9\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"MP",,,,,,,,,,,,,,,,,,[,,"911",,,,"911"],,[,,"911",,,,"911"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],MQ:[,[,,"1\\d{1,2}",,,,,,,[2,3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"MQ",,,,,,,,,,,,,,,,,,[,,"1(?:12|[578])",,,,"15"],,[,,"1(?:12|[578])",
,,,"15"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],MR:[,[,,"1\\d",,,,,,,[2]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"MR",,,,,,,,,,,,,,,,,,[,,"1[78]",,,,"17"],,[,,"1[78]",,,,"17"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],MS:[,[,,"9\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"MS",,,,,,,,,,,,,,,,,,[,,"9(?:11|99)",,,,"911"],,[,,"9(?:11|99)",,,,"911"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],MT:[,[,,"1\\d{2,5}",,,,,,,[3,6]],,,[,,"116(?:000|1(?:11|23))",,,,"116000",,
,[6]],[,,,,,,,,,[-1]],,,,"MT",,,,,,,,,,,,,,,,,,[,,"112",,,,"112",,,[3]],,[,,"11(?:2|6(?:000|1(?:11|23)))",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],MU:[,[,,"[189]\\d{2,4}",,,,,,,[3,4,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"MU",,,,,,,,,,,,,,,,,,[,,"11[45]|99[59]",,,,"999",,,[3]],,[,,"1\\d{2,4}|8\\d{3}|99\\d",,,,"995"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],MV:[,[,,"[14]\\d{2,3}",,,,,,,[3,4]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"MV",,,,,,,,,,,,,,,,,,[,,"1(?:02|1[89])",
,,,"102",,,[3]],,[,,"1(?:[0-37-9]\\d|[45](?:1|\\d{2})|6\\d{2})|4040",,,,"123"],[,,,,,,,,,[-1]],[,,"1[45]1",,,,"141",,,[3]],,[,,,,,,,,,[-1]]],MW:[,[,,"[189]\\d{2,4}",,,,,,,[3,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"MW",,,,,,,,,,,,,,,,,,[,,"199|99[789]",,,,"997",,,[3]],,[,,"199|80400|99[789]",,,,"997"],[,,,,,,,,,[-1]],[,,"80400",,,,"80400",,,[5]],,[,,"80400",,,,"80400",,,[5]]],MX:[,[,,"[0579]\\d{2,4}",,,,,,,[3,4,5]],,,[,,,,,,,,,[-1]],[,,"53053|7766",,,,"7766",,,[4,5]],,,,"MX",,,,,,,,,,,,,,,,,,[,,
"0(?:6[0568]|80)|911",,,,"066",,,[3]],,[,,"0(?:[249]0|3[01]|5[015]|6[01568]|7[0-578]|8[089])|53053|7766|911",,,,"030"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],MY:[,[,,"[139]\\d{2,4}",,,,,,,[3,4,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"MY",,,,,,,,,,,,,,,,,,[,,"112|999",,,,"999",,,[3]],,[,,"1(?:0(?:[01348]|[569]\\d)|1(?:[02]|1[128]|311)|2(?:0[125]|[13-6]|2\\d{0,2})|3(?:09\\d|[1-39]\\d{1,2}|6|[5-7]\\d{0,2})|5(?:[12]\\d|454|5\\d{1,2}|77|888|999?)|7(?:[136-9]\\d|[45]\\d{1,2})|8(?:18?|2|8[18])|9(?:[03]\\d|[124]\\d?|68|71|9[0679]))|3[23679]\\d{3}|99[1-469]",
,,,"999"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,"3[23679]\\d{3}",,,,"36000",,,[5]]],MZ:[,[,,"1\\d{2,3}",,,,,,,[3,4]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"MZ",,,,,,,,,,,,,,,,,,[,,"1(?:1[79]|9[78])",,,,"119",,,[3]],,[,,"1(?:[02-5]\\d{2}|1[79]|9[78])",,,,"1011"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],NA:[,[,,"[19]\\d{2,4}",,,,,,,[3,4,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"NA",,,,,,,,,,,,,,,,,,[,,"10111",,,,"10111",,,[5]],,[,,"1(?:0111|\\d{3})|9(?:3111|\\d{2})",,,,"93111"],[,,,,,,,,,[-1]],
[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],NC:[,[,,"1\\d{1,3}|3\\d{3}|5\\d{2}",,,,,,,[2,3,4]],,,[,,"10(?:00|1[23]|3[0-2]|88)|3631|577",,,,"1000",,,[3,4]],[,,,,,,,,,[-1]],,,,"NC",,,,,,,,,,,,,,,,,,[,,"1[5-8]",,,,"15",,,[2]],,[,,"1(?:0(?:0[06]|1[02-46]|20|3[0125]|42|5[058]|77|88)|[5-8])|3631|5[6-8]\\d",,,,"1000"],[,,"5(?:67|88)",,,,"567",,,[3]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],NE:[,[,,"[1-358]\\d{1,2}|723141",,,,,,,[2,3,6]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"NE",,,,,,,,,,,,,,,,,,[,,"1[578]|723141",,,,"17",
,,[2,6]],,[,,"1(?:0[01]|1[12]|2[034]|3[013]|40|55?|60|7|8)|222|333|555|723141|888",,,,"112"],[,,,,,,,,,[-1]],[,,"1(?:0[01]|1[12]|2[034]|3[013]|40|55|60)|222|333|555|888",,,,"100",,,[3]],,[,,,,,,,,,[-1]]],NF:[,[,,"9\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"NF",,,,,,,,,,,,,,,,,,[,,"9(?:11|55|77)",,,,"911"],,[,,"9(?:11|55|77)",,,,"911"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],NG:[,[,,"[14]\\d{2,4}",,,,,,,[3,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"NG",,,,,,,,,,,,,,,,,,[,,"199",
,,,"199",,,[3]],,[,,"199|40700",,,,"199"],[,,,,,,,,,[-1]],[,,"40700",,,,"40700",,,[5]],,[,,"40700",,,,"40700",,,[5]]],NI:[,[,,"[12467]\\d{2,3}",,,,,,,[3,4]],,,[,,"7373",,,,"7373",,,[4]],[,,,,,,,,,[-1]],,,,"NI",,,,,,,,,,,,,,,,,,[,,"1(?:1[58]|2[08])",,,,"118",,,[3]],,[,,"1(?:1[58]|2(?:[158]|00?)|900)|2100|4878|6100|7(?:010|100|373)",,,,"118"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],NL:[,[,,"[1349]\\d{2,5}",,,,,,,[3,4,6]],,,[,,"116(?:00[06]|1(?:11|23))",,,,"116000",,,[6]],[,,,,,,,,,[-1]],,
,,"NL",,,,,,,,,,,,,,,,,,[,,"112|911",,,,"112",,,[3]],,[,,"1(?:1(?:2|6(?:00[06]|1(?:11|23)))|2(?:0[0-4]|3[34]|44)|3[03-9]\\d|400|8(?:[02-9]\\d|1[0-79]))|[34]000|911",,,,"1833"],[,,,,,,,,,[-1]],[,,"120[0-4]",,,,"1202",,,[4]],,[,,"[34]000",,,,"4000",,,[4]]],NO:[,[,,"1\\d{2,5}",,,,,,,[3,4,6]],,,[,,"1161(?:1[17]|23)",,,,"116117",,,[6]],[,,,,,,,,,[-1]],,,,"NO",,,,,,,,,,,,,,,,,,[,,"11[023]",,,,"112",,,[3]],,[,,"1(?:1(?:[0239]|61(?:1[17]|23))|2[048]|4(?:12|[59])|7[57]|90)",,,,"112"],[,,,,,,,,,[-1]],[,,,,
,,,,,[-1]],,[,,,,,,,,,[-1]]],NP:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"NP",,,,,,,,,,,,,,,,,,[,,"1(?:0[0-3]|12)",,,,"112"],,[,,"1(?:0[0-3]|12)",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],NR:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"NR",,,,,,,,,,,,,,,,,,[,,"11[0-2]",,,,"110"],,[,,"1(?:1[0-2]|23|92)",,,,"110"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],NU:[,[,,"9\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"NU",,,,,,,,
,,,,,,,,,,[,,"999",,,,"999"],,[,,"999",,,,"999"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],NZ:[,[,,"[14]\\d{2,3}",,,,,,,[3,4]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"NZ",,,,,,,,,,,,,,,,,,[,,"111",,,,"111",,,[3]],,[,,"111|4098",,,,"111"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,"4098",,,,"4098",,,[4]]],OM:[,[,,"9\\d{3}",,,,,,,[4]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"OM",,,,,,,,,,,,,,,,,,[,,"9999",,,,"9999"],,[,,"9999",,,,"9999"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],PA:[,[,,"[19]\\d{2}",
,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"PA",,,,,,,,,,,,,,,,,,[,,"911",,,,"911"],,[,,"10[2-4]|911",,,,"102"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],PE:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"PE",,,,,,,,,,,,,,,,,,[,,"1(?:05|1[67])",,,,"105"],,[,,"1(?:05|1[67])",,,,"105"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],PF:[,[,,"1\\d",,,,,,,[2]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"PF",,,,,,,,,,,,,,,,,,[,,"1[578]",,,,"15"],,[,,"1[578]",,,,"15"],[,,,,,,,,
,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],PG:[,[,,"0\\d{2}|1\\d{2,6}",,,,,,,[3,4,5,6,7]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"PG",,,,,,,,,,,,,,,,,,[,,"000|11[01]",,,,"000",,,[3]],,[,,"000|1(?:1[01]|5\\d{2}|6\\d{2,5})",,,,"000"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,"16\\d{2,5}",,,,"1612",,,[4,5,6,7]]],PH:[,[,,"[19]\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"PH",,,,,,,,,,,,,,,,,,[,,"11[27]|911",,,,"117"],,[,,"11[27]|911",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],PK:[,[,
,"1\\d{1,3}",,,,,,,[2,3,4]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"PK",,,,,,,,,,,,,,,,,,[,,"1(?:1(?:22?|5)|[56])",,,,"112"],,[,,"1(?:1(?:22?|5)|[56])",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],PL:[,[,,"1\\d{2}(?:\\d{2,3})?|9\\d{2}",,,,,,,[3,5,6]],,,[,,"116\\d{3}",,,,"116000",,,[6]],[,,,,,,,,,[-1]],,,,"PL",,,,,,,,,,,,,,,,,,[,,"112|99[789]",,,,"112",,,[3]],,[,,"1(?:1(?:2|6(?:000|1(?:11|23))|8(?:000|91[23]))|9\\d{3})|9(?:8[4-7]|9[1-9])",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,
,,,,,,,[-1]]],PM:[,[,,"1\\d",,,,,,,[2]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"PM",,,,,,,,,,,,,,,,,,[,,"1[578]",,,,"17"],,[,,"1[578]",,,,"17"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],PS:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,"166",,,,"166"],[,,,,,,,,,[-1]],,,,"PS",,,,,,,,,,,,,,,,,,[,,"10[0-2]",,,,"100"],,[,,"1(?:0[0-2]|44|66|99)",,,,"199"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],PR:[,[,,"9\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"PR",,,,,,,,,,,,,,,,,,[,,"911",,,,"911"],,
[,,"911",,,,"911"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],PT:[,[,,"1\\d{2,5}",,,,,,,[3,6]],,,[,,"116(?:000|111)",,,,"116000",,,[6]],[,,,,,,,,,[-1]],,,,"PT",,,,,,,,,,,,,,,,,,[,,"11[25]",,,,"112",,,[3]],,[,,"11(?:[2578]|6(?:000|111))",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],PW:[,[,,"9\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"PW",,,,,,,,,,,,,,,,,,[,,"911",,,,"911"],,[,,"911",,,,"911"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],PY:[,[,,"[19]\\d{2}",
,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"PY",,,,,,,,,,,,,,,,,,[,,"128|911",,,,"911"],,[,,"1[1-4]\\d|911",,,,"123"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],QA:[,[,,"[129]\\d{2,4}",,,,,,,[3,4,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"QA",,,,,,,,,,,,,,,,,,[,,"999",,,,"999",,,[3]],,[,,"(?:1|20|9[27]\\d)\\d{2}|999",,,,"2012"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],RE:[,[,,"1\\d{1,2}",,,,,,,[2,3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"RE",,,,,,,,,,,,,,,,,,[,,"1(?:12|[578])",
,,,"15"],,[,,"1(?:12|[578])",,,,"15"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],RO:[,[,,"[18]\\d{2,5}",,,,,,,[3,4,6]],,,[,,"116(?:000|111)",,,,"116000",,,[6]],[,,"(?:1(?:18(?:300|932)|[24]\\d{2})|8[48]\\d{2})",,,,"8844",,,[4,6]],,,,"RO",,,,,,,,,,,,,,,,,,[,,"112",,,,"112",,,[3]],,[,,"1(?:1(?:2|6(?:000|111)|8(?:300|932))|[24]\\d{2}|9(?:21|3[02]|5[178]))|8[48]\\d{2}",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,"(?:1[24]|8[48])\\d{2}",,,,"8844",,,[4]]],RS:[,[,,"[19]\\d{1,5}",,,,,,,[2,3,4,5,
6]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"RS",,,,,,,,,,,,,,,,,,[,,"112|9[234]",,,,"112",,,[2,3]],,[,,"1[189]\\d{1,4}|9[234]",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],RU:[,[,,"[01]\\d{1,2}",,,,,,,[2,3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"RU",,,,,,,,,,,,,,,,,,[,,"0[1-3]|1(?:0[1-3]|12)",,,,"112"],,[,,"0[1-4]|1(?:0[1-4]|12)",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],RW:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"RW",,,,,,,,,,,,,,,,,,[,,"112",
,,,"112"],,[,,"112",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],SA:[,[,,"[19]\\d{2,5}",,,,,,,[3,4,5,6]],,,[,,"116111|937|998",,,,"116111",,,[3,6]],[,,,,,,,,,[-1]],,,,"SA",,,,,,,,,,,,,,,,,,[,,"112|9(?:11|9[79])",,,,"999",,,[3]],,[,,"1(?:1(?:00|2|6111)|410|9(?:00|1[89]|9(?:099|22|91)))|9(?:0[24-79]|11|3[379]|40|66|8[5-9]|9[02-9])",,,,"937"],[,,"1410",,,,"1410",,,[4]],[,,"1(?:100|410)|90[24679]",,,,"902",,,[3,4]],,[,,,,,,,,,[-1]]],SB:[,[,,"[127-9]\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],
[,,,,,,,,,[-1]],,,,"SB",,,,,,,,,,,,,,,,,,[,,"999",,,,"999"],,[,,"1(?:[02]\\d|1[12]|[35][01]|[49][1-9]|6[2-9]|7[7-9]|8[0-8])|269|777|835|9(?:[01]1|22|33|55|77|88|99)",,,,"100"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],SC:[,[,,"[19]\\d{2,3}",,,,,,,[3,4]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"SC",,,,,,,,,,,,,,,,,,[,,"999",,,,"999",,,[3]],,[,,"1(?:0\\d|1[027]|2[0-8]|3[13]|4[0-2]|[59][15]|6[1-9]|7[124-6]|8[158])|9(?:6\\d{2}|99)",,,,"100"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],SD:[,
[,,"9\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"SD",,,,,,,,,,,,,,,,,,[,,"999",,,,"999"],,[,,"999",,,,"999"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],SE:[,[,,"[1-37-9]\\d{2,5}",,,,,,,[3,4,5,6]],,,[,,"116\\d{3}",,,,"116000",,,[6]],[,,"11811[89]|72\\d{3}",,,,"118118",,,[5,6]],,,,"SE",,,,,,,,,,,,,,,,,,[,,"112|90000",,,,"112",,,[3,5]],,[,,"11(?:[25]|313|4\\d{2}|6(?:00[06]|11[17]|123)|7[0-8]|8(?:1(?:[02-9]\\d|1[013-9])|[02-46-9]\\d{2}))|2(?:2[02358]|33|4[01]|50|6[1-4])|32[13]|7\\d{4}|8(?:22|88)|9(?:0(?:000|1(?:[02-9]\\d|1[013-9])|[2-4]\\d{2}|510)|12)",
,,,"11313"],[,,,,,,,,,[-1]],[,,"2(?:2[02358]|33|4[01]|50|6[1-4])|32[13]|8(?:22|88)|912",,,,"222",,,[3]],,[,,"7\\d{4}",,,,"72123",,,[5]]],SG:[,[,,"[179]\\d{2,4}",,,,,,,[3,4,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"SG",,,,,,,,,,,,,,,,,,[,,"99[359]",,,,"999",,,[3]],,[,,"1(?:[0136]\\d{2}|[89](?:[1-9]\\d|0[1-9])|[57]\\d{2,3})|77222|99[02-9]",,,,"1312"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,"77222",,,,"77222",,,[5]]],SH:[,[,,"[19]\\d{2,3}",,,,,,,[3,4]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"SH",,,,,,,,,,
,,,,,,,,[,,"9(?:11|99)",,,,"999",,,[3]],,[,,"1\\d{2,3}|9(?:11|99)",,,,"1234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],SI:[,[,,"1\\d{2,5}",,,,,,,[3,6]],,,[,,"116(?:000|1(?:11|23))",,,,"116000",,,[6]],[,,,,,,,,,[-1]],,,,"SI",,,,,,,,,,,,,,,,,,[,,"11[23]",,,,"112",,,[3]],,[,,"11(?:[23]|6(?:000|1(?:11|23)))",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],SJ:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"SJ",,,,,,,,,,,,,,,,,,[,,"11[023]",,,,"112"],,[,,"11[023]",,
,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],SK:[,[,,"1\\d{2,5}",,,,,,,[3,4,5,6]],,,[,,"116\\d{3}",,,,"116000",,,[6]],[,,,,,,,,,[-1]],,,,"SK",,,,,,,,,,,,,,,,,,[,,"1(?:12|5[058])",,,,"112",,,[3]],,[,,"1(?:1(?:2|6(?:000|111)|8[0-8])|[24]\\d{3}|5[0589]|8\\d{3})",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],SL:[,[,,"[069]\\d{2,4}",,,,,,,[3,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"SL",,,,,,,,,,,,,,,,,,[,,"(?:01|99)9",,,,"999",,,[3]],,[,,"(?:01|99)9|60400",,,,"999"],[,,,,,
,,,,[-1]],[,,"60400",,,,"60400",,,[5]],,[,,"60400",,,,"60400",,,[5]]],SM:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"SM",,,,,,,,,,,,,,,,,,[,,"11[358]",,,,"113"],,[,,"11[358]",,,,"113"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],SN:[,[,,"[12]\\d{1,5}",,,,,,,[2,3,4,5,6]],,,[,,"1515|2(?:00|1)\\d{3}",,,,"200133",,,[4,5,6]],[,,"2(?:0[246]|[468])\\d{3}",,,,"202222",,,[5,6]],,,,"SN",,,,,,,,,,,,,,,,,,[,,"1[78]",,,,"17",,,[2]],,[,,"1(?:1[69]|2(?:\\d{2})?|[46]\\d{2}|51\\d|[78])|2(?:0[0-246]|[12468])\\d{3}",
,,,"17"],[,,"2(?:01|2)\\d{3}",,,,"201202",,,[5,6]],[,,"1[46]\\d{2}",,,,"1415",,,[4]],,[,,"2[468]\\d{3}",,,,"24123",,,[5]]],SO:[,[,,"[5789]\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"SO",,,,,,,,,,,,,,,,,,[,,"555|888|999",,,,"555"],,[,,"555|777|888|999",,,,"777"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],SR:[,[,,"1\\d{2,3}",,,,,,,[3,4]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"SR",,,,,,,,,,,,,,,,,,[,,"115",,,,"115",,,[3]],,[,,"1\\d{2,3}",,,,"1234"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],
,[,,,,,,,,,[-1]]],ST:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"ST",,,,,,,,,,,,,,,,,,[,,"112",,,,"112"],,[,,"112",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],SV:[,[,,"[49]\\d{2,4}",,,,,,,[3,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"SV",,,,,,,,,,,,,,,,,,[,,"911",,,,"911",,,[3]],,[,,"40404|911",,,,"911"],[,,,,,,,,,[-1]],[,,"40404",,,,"40404",,,[5]],,[,,"40404",,,,"40404",,,[5]]],SX:[,[,,"9\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"SX",,,,,,,,,,,,,,
,,,,[,,"919",,,,"919"],,[,,"919",,,,"919"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],SY:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"SY",,,,,,,,,,,,,,,,,,[,,"11[023]",,,,"112"],,[,,"11[023]",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],SZ:[,[,,"9\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"SZ",,,,,,,,,,,,,,,,,,[,,"999",,,,"999"],,[,,"999",,,,"999"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],TC:[,[,,"9\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],
[,,,,,,,,,[-1]],,,,"TC",,,,,,,,,,,,,,,,,,[,,"9(?:11|99)",,,,"911"],,[,,"9(?:11|99)",,,,"911"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],TD:[,[,,"1\\d",,,,,,,[2]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"TD",,,,,,,,,,,,,,,,,,[,,"1[78]",,,,"17"],,[,,"1[78]",,,,"17"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],TG:[,[,,"1\\d{2,3}",,,,,,,[3,4]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"TG",,,,,,,,,,,,,,,,,,[,,"1(?:1[78]|7[127])",,,,"117",,,[3]],,[,,"1(?:011|1[078]|7[127])",,,,"117"],[,,,,,,,,,[-1]],
[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],TH:[,[,,"1\\d{2,3}",,,,,,,[3,4]],,,[,,"1(?:1(?:00|2[03]|3[3479]|55|7[67]|9[0246])|5(?:55|78)|6(?:44|6[79]|88|9[16])|888)",,,,"1669",,,[4]],[,,"1(?:113|2(?:22|3[89])|5(?:09|56))",,,,"1509",,,[4]],,,,"TH",,,,,,,,,,,,,,,,,,[,,"1(?:669|9[19])",,,,"191"],,[,,"1(?:0[0-2]|1(?:0[03]|1[1-35]|2[0358]|3[03-79]|4[02-489]|5[04-9]|6[04-79]|7[03-9]|8[027-9]|9[02-79])|2(?:22|3[89])|3(?:18|2[23]|3[013]|5[56]|6[45]|73)|477|5(?:0\\d|4[0-37-9]|5[1-8]|6[01679]|7[12568]|8[0-24589]|9[013589])|6(?:0[0-29]|20|4[3-6]|6[1-9]|7[0257-9]|8[0158]|9[014-9])|7(?:19|7[27]|90)|888|9[19])",
,,,"191"],[,,"1(?:1(?:03|1[15]|2[58]|3[056]|4[02-49]|5[046-9]|6[04-79]|7[03-589]|8[02789]|9[579])|3(?:18|2[23]|3[013]|5[4-6])|5(?:0[0-8]|4[0-378]|5[1-478]|6[01679]|7[156]|8[0-24589]|9[013589])|6(?:0[0-29]|20|4[356]|6[1-68]|7[05789]|8[015]|9[0457-9])|7(?:19|7[27]))",,,,"1149",,,[4]],[,,"114[89]",,,,"1148",,,[4]],,[,,,,,,,,,[-1]]],TJ:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"TJ",,,,,,,,,,,,,,,,,,[,,"1(?:0[1-3]|12)",,,,"112"],,[,,"1(?:0[1-3]|12)",,,,"112"],[,,,,,,,,,[-1]],[,,,,
,,,,,[-1]],,[,,,,,,,,,[-1]]],TL:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"TL",,,,,,,,,,,,,,,,,,[,,"11[25]",,,,"112"],,[,,"1(?:0[02]|1[25]|2[0138]|72|9[07])",,,,"102"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],TM:[,[,,"0\\d",,,,,,,[2]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"TM",,,,,,,,,,,,,,,,,,[,,"0[1-3]",,,,"03"],,[,,"0[1-3]",,,,"03"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],TN:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"TN",,,,,,,,,,,,,,
,,,,[,,"19[078]",,,,"197"],,[,,"19[078]",,,,"197"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],TO:[,[,,"9\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"TO",,,,,,,,,,,,,,,,,,[,,"9(?:11|22|33|99)",,,,"911"],,[,,"9(?:11|22|33|99)",,,,"911"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],TR:[,[,,"[1-9]\\d{2,4}",,,,,,,[3,4,5]],,,[,,"1(?:44|58|83)",,,,"183",,,[3]],[,,,,,,,,,[-1]],,,,"TR",,,,,,,,,,,,,,,,,,[,,"1(?:1[02]|55)",,,,"112",,,[3]],,[,,"1(?:1(?:[0239]|811)|2[16]|3(?:37?|[58]6|65)|4(?:[14]|71)|5(?:[3568]|07|78)|6(?:[02]6|[389]|99)|7[0-79]|8(?:\\d|63|95))|2(?:077|268|4(?:17|23)|5(?:7[26]|82)|6[14]4|8\\d{2}|9(?:30|89))|3(?:0(?:05|72)|353|4(?:06|30|64)|502|674|747|851|9(?:1[29]|60))|4(?:0(?:25|3[12]|[47]2)|3(?:3[13]|[89]1)|439|5(?:43|55)|717|832)|5(?:145|290|[4-6]\\d{2}|772|833|9(?:[06]1|92))|6(?:236|6(?:12|39|8[59])|769)|7890|8(?:688|7(?:28|65)|85[06])|9(?:159|290)",
,,,"112"],[,,"2850|5420",,,,"5420",,,[4]],[,,,,,,,,,[-1]],,[,,"1(?:3(?:37|[58]6|65)|4(?:4|71)|5(?:07|78)|6(?:[02]6|99)|8(?:3|63|95))|2(?:077|268|4(?:17|23)|5(?:7[26]|82)|6[14]4|8\\d{2}|9(?:30|89))|3(?:0(?:05|72)|353|4(?:06|30|64)|502|674|747|851|9(?:1[29]|60))|4(?:0(?:25|3[12]|[47]2)|3(?:3[13]|[89]1)|439|5(?:43|55)|717|832)|5(?:145|290|[4-6]\\d{2}|772|833|9(?:[06]1|92))|6(?:236|6(?:12|39|8[59])|769)|7890|8(?:688|7(?:28|65)|85[06])|9(?:159|290)",,,,"5420",,,[3,4]]],TT:[,[,,"9\\d{2}",,,,,,,[3]],,,[,
,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"TT",,,,,,,,,,,,,,,,,,[,,"99[09]",,,,"999"],,[,,"99[09]",,,,"999"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],TV:[,[,,"[19]\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"TV",,,,,,,,,,,,,,,,,,[,,"911",,,,"911"],,[,,"1\\d{2}|911",,,,"911"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],TW:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"TW",,,,,,,,,,,,,,,,,,[,,"11[029]",,,,"110"],,[,,"11[029]",,,,"110"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],
,[,,,,,,,,,[-1]]],TZ:[,[,,"[149]\\d{2,4}",,,,,,,[3,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"TZ",,,,,,,,,,,,,,,,,,[,,"11[12]|999",,,,"111",,,[3]],,[,,"11[12]|46400|999",,,,"111"],[,,,,,,,,,[-1]],[,,"46400",,,,"46400",,,[5]],,[,,"46400",,,,"46400",,,[5]]],UA:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"UA",,,,,,,,,,,,,,,,,,[,,"1(?:0[123]|12)",,,,"112"],,[,,"1(?:0[123]|12)",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],UG:[,[,,"9\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],
[,,,,,,,,,[-1]],,,,"UG",,,,,,,,,,,,,,,,,,[,,"999",,,,"999"],,[,,"999",,,,"999"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],US:[,[,,"[1-9]\\d{2,5}",,,,,,,[3,4,5,6]],,,[,,"611",,,,"611",,,[3]],[,,"2(?:4280|5209|7(?:449|663))|3(?:2340|3786|5564|8(?:135|254))|4(?:1(?:366|463)|3355|6(?:157|327)|7553|8(?:221|277))|5(?:2944|4892|5928|9(?:187|342))|69388|7(?:2(?:078|087)|3(?:288|909)|6426)|8(?:6234|9616)|9(?:5297|6(?:040|835)|7(?:294|688)|9(?:689|796))",,,,"24280",,,[5]],,,,"US",,,,,,,,,,,,,,,,,,[,
,"112|911",,,,"911",,,[3]],,[,,"1(?:1(?:2|5[1-47]|[68]\\d|7[0-57]|98))|[2-9](?:11|\\d{3,5})",,,,"911"],[,,"2(?:3333|42242|56447|6688|75622|9002)|3(?:1010|2665|7404)|40404|560560|6(?:0060|22639|5246|7622)|7(?:0701|3822|4666)|8(?:38255|4816|72265)|99099",,,,"73822",,,[5,6]],[,,"[2-9]\\d{3}|33669|[2356]11",,,,"33669",,,[3,4,5]],,[,,"[2-9]\\d{4,5}",,,,"20566",,,[5,6]]],UY:[,[,,"[19]\\d{2,3}",,,,,,,[3,4]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"UY",,,,,,,,,,,,,,,,,,[,,"128|911",,,,"911",,,[3]],,[,,"1(?:0[4-9]|1[2368]|2[0-3568]|787)|911",
,,,"104"],[,,"1787",,,,"1787",,,[4]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],UZ:[,[,,"[04]\\d{1,4}",,,,,,,[2,3,5]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"UZ",,,,,,,,,,,,,,,,,,[,,"0(?:0[123]|[123]|50)",,,,"01",,,[2,3]],,[,,"0(?:0[123]|[123]|50)|45400",,,,"01"],[,,,,,,,,,[-1]],[,,"45400",,,,"45400",,,[5]],,[,,"45400",,,,"45400",,,[5]]],VA:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"VA",,,,,,,,,,,,,,,,,,[,,"11[2358]",,,,"113"],,[,,"11[2358]",,,,"113"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,
,,,,,,,,[-1]]],VC:[,[,,"9\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"VC",,,,,,,,,,,,,,,,,,[,,"9(?:11|99)",,,,"911"],,[,,"9(?:11|99)",,,,"911"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],VE:[,[,,"[19]\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"VE",,,,,,,,,,,,,,,,,,[,,"1(?:12|71)|911",,,,"171"],,[,,"1(?:12|71)|911",,,,"171"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],VG:[,[,,"9\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"VG",,,,,,,,,,,,,,,,,,[,,"9(?:11|99)",
,,,"911"],,[,,"9(?:11|99)",,,,"911"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],VI:[,[,,"9\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"VI",,,,,,,,,,,,,,,,,,[,,"911",,,,"911"],,[,,"911",,,,"911"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],VN:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"VN",,,,,,,,,,,,,,,,,,[,,"11[345]",,,,"113"],,[,,"11[345]",,,,"113"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],VU:[,[,,"1\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,
,,,,,[-1]],,,,"VU",,,,,,,,,,,,,,,,,,[,,"112",,,,"112"],,[,,"112",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],WF:[,[,,"1\\d",,,,,,,[2]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"WF",,,,,,,,,,,,,,,,,,[,,"1[578]",,,,"15"],,[,,"1[578]",,,,"15"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],WS:[,[,,"9\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"WS",,,,,,,,,,,,,,,,,,[,,"99[4-6]",,,,"994"],,[,,"99[4-6]",,,,"994"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],YE:[,[,,"1\\d{2}",
,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"YE",,,,,,,,,,,,,,,,,,[,,"19[1459]",,,,"191"],,[,,"19[1459]",,,,"191"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],YT:[,[,,"1\\d{1,2}",,,,,,,[2,3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"YT",,,,,,,,,,,,,,,,,,[,,"1(?:12|5)",,,,"15"],,[,,"1(?:12|5)",,,,"112"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],ZA:[,[,,"[134]\\d{2,4}",,,,,,,[3,4,5]],,,[,,,,,,,,,[-1]],[,,"41(?:348|851)",,,,"41851",,,[5]],,,,"ZA",,,,,,,,,,,,,,,,,,[,,"1(?:0(?:1(?:11|77)|7)|12)",
,,,"10111",,,[3,5]],,[,,"1(?:0(?:1(?:11|77)|20|7)|1[12]|77(?:3[237]|[45]7|6[279]|9[26]))|[34]\\d{4}",,,,"10111"],[,,"3(?:078[23]|7(?:064|567)|8126)|4(?:3(?:699|946)|7751)",,,,"47751",,,[5]],[,,"1(?:07|11)",,,,"111",,,[3]],,[,,"[34]\\d{4}",,,,"47751",,,[5]]],ZM:[,[,,"[19]\\d{2}",,,,,,,[3]],,,[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,,,"ZM",,,,,,,,,,,,,,,,,,[,,"(?:112|99[139])",,,,"999"],,[,,"(?:112|99[139])",,,,"999"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]],ZW:[,[,,"[19]\\d{2}",,,,,,,[3]],,,[,,,,
,,,,,[-1]],[,,,,,,,,,[-1]],,,,"ZW",,,,,,,,,,,,,,,,,,[,,"(?:11[24]|99[3-59])",,,,"999"],,[,,"(?:11[249]|99[3-59])",,,,"999"],[,,,,,,,,,[-1]],[,,,,,,,,,[-1]],,[,,,,,,,,,[-1]]]};/*
Copyright (C) 2018 The Libphonenumber Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
function bc(){this.a={}}aa(bc);function cc(a){return(a=K[a])?a:[]}function dc(a,b,c){var d=cc(y(b,1));if(!q(d,c))return!1;a=ec(a,c);if(!a)return!1;b=fc(b).length;return q(x(v(a,1),9),b)}function gc(a,b){var c=cc(y(b,1));b=fc(b).length;for(var d=0;d<c.length;d++){var e=ec(a,c[d]);if(e&&(e=x(v(e,1),9),q(e,b)))return!0}return!1}function hc(a,b,c){var d=cc(y(b,1));if(!q(d,c))return!1;a=ec(a,c);if(!a)return!1;b=fc(b);c=v(a,1);if(!ic(b,c))return!1;a=v(a,29);return ic(b,a)}
function jc(a,b){var c=cc(y(b,1));a:if(0===c.length)var d=null;else if(1===c.length)d=c[0];else{d=fc(b);for(var e=0;e<c.length;e++){var f=c[e],g=ec(a,f);if(g&&ic(d,v(g,29))){d=f;break a}}d=null}return 1<c.length&&null!=d?!0:hc(a,b,d)}function ec(a,b){if(!b)return null;b=b.toUpperCase();var c=a.a[b];if(null==c){c=ac[b];if(null==c)return null;c=(new I).f(H.h(),c);a.a[b]=c}return c}function fc(a){if(!u(a,2))return"";var b=""+v(a,2);return u(a,4)&&v(a,4)&&0<y(a,8)?Array(y(a,8)+1).join("0")+b:b}
function ic(a,b){return 0<x(b,9).length&&!q(x(b,9),a.length)?!1:N(y(b,2),a.toString())};function kc(){var a=r("phoneNumber").value,b=r("defaultCountry").value,c=r("carrierCode").value,d=new C;try{var e=Qa.ca();if(!lb(b)&&0<a.length&&"+"!=a.charAt(0))throw Error("Invalid country calling code");var f=wb(e,a,b,!0);d.a("****Parsing Result:****\n");d.a(ka((new B(1)).g(f)));d.a("\n\n****Validation Results:****");var g=Db(e,f);var k=0==g||4==g;d.a("\nResult from isPossibleNumber(): ");d.a(k);if(k){var m=vb(e,f);d.a("\nResult from isValidNumber(): ");d.a(m);m&&b&&"ZZ"!=b&&(d.a("\nResult from isValidNumberForRegion(): "),
d.a(Bb(e,f,b)));d.a("\nPhone Number region: ");d.a(Ab(e,f));d.a("\nResult from getNumberType(): ");var E=Ab(e,f),R=T(e,y(f,1),E);if(null==R)var sb=-1;else{var mc=Q(f);sb=zb(mc,R)}switch(sb){case 0:d.a("FIXED_LINE");break;case 1:d.a("MOBILE");break;case 2:d.a("FIXED_LINE_OR_MOBILE");break;case 3:d.a("TOLL_FREE");break;case 4:d.a("PREMIUM_RATE");break;case 5:d.a("SHARED_COST");break;case 6:d.a("VOIP");break;case 7:d.a("PERSONAL_NUMBER");break;case 8:d.a("PAGER");break;case 9:d.a("UAN");break;case -1:d.a("UNKNOWN")}}else{d.a("\nResult from isPossibleNumberWithReason(): ");
switch(Db(e,f)){case 1:d.a("INVALID_COUNTRY_CODE");break;case 2:d.a("TOO_SHORT");break;case 3:d.a("TOO_LONG")}d.a("\nNote: numbers that are not possible have type UNKNOWN, an unknown region, and are considered invalid.")}var ma=bc.ca();d.a("\n\n****ShortNumberInfo Results:****");d.a("\nResult from isPossibleShortNumber: ");d.a(gc(ma,f));d.a("\nResult from isValidShortNumber: ");d.a(jc(ma,f));d.a("\nResult from isPossibleShortNumberForRegion: ");d.a(dc(ma,f,b));d.a("\nResult from isValidShortNumberForRegion: ");
d.a(hc(ma,f,b));d.a("\n\n****Formatting Results:**** ");d.a("\nE164 format: ");d.a(m?P(e,f,0):"invalid");d.a("\nOriginal format: ");d.a(rb(e,f,b));d.a("\nNational format: ");d.a(P(e,f,2));d.a("\nInternational format: ");d.a(m?P(e,f,1):"invalid");d.a("\nOut-of-country format from US: ");d.a(m?pb(e,f,"US"):"invalid");d.a("\nOut-of-country format from Switzerland: ");d.a(m?pb(e,f,"CH"):"invalid");0<c.length&&(d.a("\nNational format with carrier code: "),d.a(ob(e,f,c)));d.a("\n\n****AsYouTypeFormatter Results****");
var nc=new Hb(b),oc=a.length;for(b=0;b<oc;++b){var tb=a.charAt(b);d.a("\nChar entered: ");d.a(tb);d.a(" Output: ");d.a(Qb(nc,tb))}}catch(pc){d.a("\n"+pc.toString())}r("output").value=d.toString();return!1}var X=["phoneNumberParser"],Y=this;X[0]in Y||!Y.execScript||Y.execScript("var "+X[0]);for(var Z;X.length&&(Z=X.shift());){var lc;if(lc=!X.length)lc=void 0!==kc;lc?Y[Z]=kc:Y[Z]&&Y[Z]!==Object.prototype[Z]?Y=Y[Z]:Y=Y[Z]={}};})();

+ 2
- 0
javascript/i18n/phonenumbers/demo.html View File

@ -28,8 +28,10 @@ limitations under the License.
<script src="phonemetadata.pb.js"></script>
<script src="phonenumber.pb.js"></script>
<script src="metadata.js"></script>
<script src="shortnumbermetadata.js"></script>
<script src="phonenumberutil.js"></script>
<script src="asyoutypeformatter.js"></script>
<script src="shortnumberinfo.js"></script>
<script src="demo.js"></script>
</head>
<body>


+ 12
- 0
javascript/i18n/phonenumbers/demo.js View File

@ -30,6 +30,7 @@ goog.require('i18n.phonenumbers.PhoneNumberFormat');
goog.require('i18n.phonenumbers.PhoneNumberType');
goog.require('i18n.phonenumbers.PhoneNumberUtil');
goog.require('i18n.phonenumbers.PhoneNumberUtil.ValidationResult');
goog.require('i18n.phonenumbers.ShortNumberInfo');
function phoneNumberParser() {
@ -114,6 +115,17 @@ function phoneNumberParser() {
break;
}
}
var shortInfo = i18n.phonenumbers.ShortNumberInfo.getInstance();
output.append('\n\n****ShortNumberInfo Results:****');
output.append('\nResult from isPossibleShortNumber: ');
output.append(shortInfo.isPossibleShortNumber(number));
output.append('\nResult from isValidShortNumber: ');
output.append(shortInfo.isValidShortNumber(number));
output.append('\nResult from isPossibleShortNumberForRegion: ');
output.append(shortInfo.isPossibleShortNumberForRegion(number, regionCode));
output.append('\nResult from isValidShortNumberForRegion: ');
output.append(shortInfo.isValidShortNumberForRegion(number, regionCode));
var PNF = i18n.phonenumbers.PhoneNumberFormat;
output.append('\n\n****Formatting Results:**** ');
output.append('\nE164 format: ');


+ 226
- 2
javascript/i18n/phonenumbers/phonemetadata.pb.js View File

@ -21,11 +21,10 @@
* @fileoverview Generated Protocol Buffer code for file
* phonemetadata.proto.
*/
goog.provide('i18n.phonenumbers.NumberFormat');
goog.provide('i18n.phonenumbers.PhoneNumberDesc');
goog.provide('i18n.phonenumbers.PhoneMetadata');
goog.provide('i18n.phonenumbers.PhoneMetadataCollection');
goog.provide('i18n.phonenumbers.PhoneNumberDesc');
goog.require('goog.proto2.Message');
@ -1269,6 +1268,210 @@ i18n.phonenumbers.PhoneMetadata.prototype.clearVoicemail = function() {
};
/**
* Gets the value of the short_code field.
* @return {?i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getShortCode = function() {
return /** @type {?i18n.phonenumbers.PhoneNumberDesc} */ (this.get$Value(29));
};
/**
* Gets the value of the short_code field or the default value if not set.
* @return {!i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getShortCodeOrDefault = function() {
return /** @type {!i18n.phonenumbers.PhoneNumberDesc} */ (this.get$ValueOrDefault(29));
};
/**
* Sets the value of the short_code field.
* @param {!i18n.phonenumbers.PhoneNumberDesc} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setShortCode = function(value) {
this.set$Value(29, value);
};
/**
* @return {boolean} Whether the short_code field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasShortCode = function() {
return this.has$Value(29);
};
/**
* @return {number} The number of values in the short_code field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.shortCodeCount = function() {
return this.count$Values(29);
};
/**
* Clears the values in the short_code field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearShortCode = function() {
this.clear$Field(29);
};
/**
* Gets the value of the standard_rate field.
* @return {?i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getStandardRate = function() {
return /** @type {?i18n.phonenumbers.PhoneNumberDesc} */ (this.get$Value(30));
};
/**
* Gets the value of the standard_rate field or the default value if not set.
* @return {!i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getStandardRateOrDefault = function() {
return /** @type {!i18n.phonenumbers.PhoneNumberDesc} */ (this.get$ValueOrDefault(30));
};
/**
* Sets the value of the standard_rate field.
* @param {!i18n.phonenumbers.PhoneNumberDesc} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setStandardRate = function(value) {
this.set$Value(30, value);
};
/**
* @return {boolean} Whether the standard_rate field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasStandardRate = function() {
return this.has$Value(30);
};
/**
* @return {number} The number of values in the standard_rate field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.standardRateCount = function() {
return this.count$Values(30);
};
/**
* Clears the values in the standard_rate field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearStandardRate = function() {
this.clear$Field(30);
};
/**
* Gets the value of the carrier_specific field.
* @return {?i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getCarrierSpecific = function() {
return /** @type {?i18n.phonenumbers.PhoneNumberDesc} */ (this.get$Value(31));
};
/**
* Gets the value of the carrier_specific field or the default value if not set.
* @return {!i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getCarrierSpecificOrDefault = function() {
return /** @type {!i18n.phonenumbers.PhoneNumberDesc} */ (this.get$ValueOrDefault(31));
};
/**
* Sets the value of the carrier_specific field.
* @param {!i18n.phonenumbers.PhoneNumberDesc} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setCarrierSpecific = function(value) {
this.set$Value(31, value);
};
/**
* @return {boolean} Whether the carrier_specific field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasCarrierSpecific = function() {
return this.has$Value(31);
};
/**
* @return {number} The number of values in the carrier_specific field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.carrierSpecificCount = function() {
return this.count$Values(31);
};
/**
* Clears the values in the carrier_specific field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearCarrierSpecific = function() {
this.clear$Field(31);
};
/**
* Gets the value of the sms_services field.
* @return {?i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getSmsServices = function() {
return /** @type {?i18n.phonenumbers.PhoneNumberDesc} */ (this.get$Value(33));
};
/**
* Gets the value of the sms_services field or the default value if not set.
* @return {!i18n.phonenumbers.PhoneNumberDesc} The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.getSmsServicesOrDefault = function() {
return /** @type {!i18n.phonenumbers.PhoneNumberDesc} */ (this.get$ValueOrDefault(33));
};
/**
* Sets the value of the sms_services field.
* @param {!i18n.phonenumbers.PhoneNumberDesc} value The value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.setSmsServices = function(value) {
this.set$Value(33, value);
};
/**
* @return {boolean} Whether the sms_services field has a value.
*/
i18n.phonenumbers.PhoneMetadata.prototype.hasSmsServices = function() {
return this.has$Value(33);
};
/**
* @return {number} The number of values in the sms_services field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.smsServicesCount = function() {
return this.count$Values(33);
};
/**
* Clears the values in the sms_services field.
*/
i18n.phonenumbers.PhoneMetadata.prototype.clearSmsServices = function() {
this.clear$Field(33);
};
/**
* Gets the value of the no_international_dialling field.
* @return {?i18n.phonenumbers.PhoneNumberDesc} The value.
@ -2319,6 +2522,26 @@ i18n.phonenumbers.PhoneMetadata.prototype.getDescriptor = function() {
fieldType: goog.proto2.Message.FieldType.MESSAGE,
type: i18n.phonenumbers.PhoneNumberDesc
},
29: {
name: 'short_code',
fieldType: goog.proto2.Message.FieldType.MESSAGE,
type: i18n.phonenumbers.PhoneNumberDesc
},
30: {
name: 'standard_rate',
fieldType: goog.proto2.Message.FieldType.MESSAGE,
type: i18n.phonenumbers.PhoneNumberDesc
},
31: {
name: 'carrier_specific',
fieldType: goog.proto2.Message.FieldType.MESSAGE,
type: i18n.phonenumbers.PhoneNumberDesc
},
33: {
name: 'sms_services',
fieldType: goog.proto2.Message.FieldType.MESSAGE,
type: i18n.phonenumbers.PhoneNumberDesc
},
24: {
name: 'no_international_dialling',
fieldType: goog.proto2.Message.FieldType.MESSAGE,
@ -2442,3 +2665,4 @@ i18n.phonenumbers.PhoneMetadataCollection.prototype.getDescriptor = function() {
/** @nocollapse */
i18n.phonenumbers.PhoneMetadataCollection.getDescriptor =
i18n.phonenumbers.PhoneMetadataCollection.prototype.getDescriptor;

+ 47
- 28
javascript/i18n/phonenumbers/phonenumberutil.js View File

@ -598,9 +598,9 @@ i18n.phonenumbers.PhoneNumberUtil.PLUS_CHARS_PATTERN =
/**
* @const
* @type {!RegExp}
* @private
* @package
*/
i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN_ =
i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN =
new RegExp('^[' + i18n.phonenumbers.PhoneNumberUtil.PLUS_CHARS_ + ']+');
@ -1049,7 +1049,7 @@ i18n.phonenumbers.PhoneNumberUtil.isViablePhoneNumber = function(number) {
if (number.length < i18n.phonenumbers.PhoneNumberUtil.MIN_LENGTH_FOR_NSN_) {
return false;
}
return i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_(
return i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
i18n.phonenumbers.PhoneNumberUtil.VALID_PHONE_NUMBER_PATTERN_, number);
};
@ -1072,7 +1072,7 @@ i18n.phonenumbers.PhoneNumberUtil.isViablePhoneNumber = function(number) {
* @return {string} the normalized string version of the phone number.
*/
i18n.phonenumbers.PhoneNumberUtil.normalize = function(number) {
if (i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_(
if (i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
i18n.phonenumbers.PhoneNumberUtil.VALID_ALPHA_PHONE_PATTERN_, number)) {
return i18n.phonenumbers.PhoneNumberUtil.normalizeHelper_(number,
i18n.phonenumbers.PhoneNumberUtil.ALL_NORMALIZATION_MAPPINGS_, true);
@ -2070,7 +2070,7 @@ i18n.phonenumbers.PhoneNumberUtil.prototype.formatOutOfCountryCallingNumber =
// prefix.
/** @type {string} */
var internationalPrefixForFormatting = '';
if (i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_(
if (i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
i18n.phonenumbers.PhoneNumberUtil.SINGLE_INTERNATIONAL_PREFIX_,
internationalPrefix)) {
internationalPrefixForFormatting = internationalPrefix;
@ -2410,7 +2410,7 @@ i18n.phonenumbers.PhoneNumberUtil.prototype.
var internationalPrefix =
metadataForRegionCallingFrom.getInternationalPrefixOrDefault();
internationalPrefixForFormatting =
i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_(
i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
i18n.phonenumbers.PhoneNumberUtil.SINGLE_INTERNATIONAL_PREFIX_,
internationalPrefix) ?
internationalPrefix :
@ -2570,8 +2570,8 @@ i18n.phonenumbers.PhoneNumberUtil.prototype.chooseFormattingPatternForNumber_ =
.search(numFormat.getLeadingDigitsPattern(size - 1)) == 0) {
/** @type {!RegExp} */
var patternToMatch = new RegExp(numFormat.getPattern());
if (i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_(patternToMatch,
nationalNumber)) {
if (i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(patternToMatch,
nationalNumber)) {
return numFormat;
}
}
@ -2961,7 +2961,7 @@ i18n.phonenumbers.PhoneNumberUtil.prototype.isNumberMatchingDesc_ =
actualLength) == -1) {
return false;
}
return i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_(
return i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
numberDesc.getNationalNumberPatternOrDefault(), nationalNumber);
};
@ -3259,7 +3259,7 @@ i18n.phonenumbers.PhoneNumberUtil.prototype.isAlphaNumber = function(number) {
/** @type {!goog.string.StringBuffer} */
var strippedNumber = new goog.string.StringBuffer(number);
this.maybeStripExtension(strippedNumber);
return i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_(
return i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
i18n.phonenumbers.PhoneNumberUtil.VALID_ALPHA_PHONE_PATTERN_,
strippedNumber.toString());
};
@ -3725,9 +3725,9 @@ i18n.phonenumbers.PhoneNumberUtil.prototype.maybeExtractCountryCode =
// If the number was not valid before but is valid now, or if it was too
// long before, we consider the number with the country calling code
// stripped to be a better result and keep that instead.
if ((!i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_(
if ((!i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
validNumberPattern, fullNumber.toString()) &&
i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_(
i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
validNumberPattern, potentialNationalNumberStr)) ||
this.testNumberLength_(
fullNumber.toString(), defaultRegionMetadata) ==
@ -3812,10 +3812,10 @@ i18n.phonenumbers.PhoneNumberUtil.prototype.
return i18n.phonenumbers.PhoneNumber.CountryCodeSource.FROM_DEFAULT_COUNTRY;
}
// Check to see if the number begins with one or more plus signs.
if (i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN_
if (i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN
.test(numberStr)) {
numberStr = numberStr.replace(
i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN_, '');
i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN, '');
// Can now normalize the rest of the number since we've consumed the '+'
// sign at the start.
number.clear();
@ -3871,7 +3871,7 @@ i18n.phonenumbers.PhoneNumberUtil.prototype.
// Check if the original number is viable.
/** @type {boolean} */
var isViableOriginalNumber =
i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_(
i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
nationalNumberRule, numberStr);
// prefixMatcher[numOfGroups] == null implies nothing was captured by the
// capturing groups in possibleNationalPrefix; therefore, no transformation
@ -3888,7 +3888,7 @@ i18n.phonenumbers.PhoneNumberUtil.prototype.
// If the original number was viable, and the resultant number is not,
// we return.
if (isViableOriginalNumber &&
!i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_(
!i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
nationalNumberRule,
numberStr.substring(prefixMatcher[0].length))) {
return false;
@ -3907,7 +3907,7 @@ i18n.phonenumbers.PhoneNumberUtil.prototype.
var transformedNumber;
transformedNumber = numberStr.replace(prefixPattern, transformRule);
if (isViableOriginalNumber &&
!i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_(
!i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
nationalNumberRule, transformedNumber)) {
return false;
}
@ -3979,7 +3979,7 @@ i18n.phonenumbers.PhoneNumberUtil.prototype.checkRegionForParsing_ = function(
// If the number is null or empty, we can't infer the region.
return this.isValidRegionCode_(defaultRegion) ||
(numberToParse != null && numberToParse.length > 0 &&
i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN_.test(
i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN.test(
numberToParse));
};
@ -4164,11 +4164,11 @@ i18n.phonenumbers.PhoneNumberUtil.prototype.parseHelper_ =
regionMetadata, normalizedNationalNumber, keepRawInput, phoneNumber);
} catch (e) {
if (e.message == i18n.phonenumbers.Error.INVALID_COUNTRY_CODE &&
i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN_
i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN
.test(nationalNumberStr)) {
// Strip the plus-char, and try again.
nationalNumberStr = nationalNumberStr.replace(
i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN_, '');
i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN, '');
countryCode = this.maybeExtractCountryCode(nationalNumberStr,
regionMetadata, normalizedNationalNumber, keepRawInput, phoneNumber);
if (countryCode == 0) {
@ -4218,12 +4218,10 @@ i18n.phonenumbers.PhoneNumberUtil.prototype.parseHelper_ =
// a valid short number.
var validationResult = this.testNumberLength_(
potentialNationalNumber.toString(), regionMetadata);
if (validationResult !=
i18n.phonenumbers.PhoneNumberUtil.ValidationResult.TOO_SHORT &&
validationResult !=
i18n.phonenumbers.PhoneNumberUtil.ValidationResult.IS_POSSIBLE_LOCAL_ONLY &&
validationResult !=
i18n.phonenumbers.PhoneNumberUtil.ValidationResult.INVALID_LENGTH) {
var validationResults = i18n.phonenumbers.PhoneNumberUtil.ValidationResult;
if (validationResult != validationResults.TOO_SHORT &&
validationResult != validationResults.IS_POSSIBLE_LOCAL_ONLY &&
validationResult != validationResults.INVALID_LENGTH) {
normalizedNationalNumber = potentialNationalNumber;
if (keepRawInput && carrierCode.toString().length > 0) {
phoneNumber.setPreferredDomesticCarrierCode(carrierCode.toString());
@ -4558,9 +4556,9 @@ i18n.phonenumbers.PhoneNumberUtil.prototype.canBeInternationallyDialled =
* @param {!RegExp|string} regex the regular expression to match against.
* @param {string} str the string to test.
* @return {boolean} true if str can be matched entirely against regex.
* @private
* @package
*/
i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_ = function(regex, str) {
i18n.phonenumbers.PhoneNumberUtil.matchesEntirely = function(regex, str) {
/** @type {Array.<string>} */
var matchedGroups = (typeof regex == 'string') ?
str.match('^(?:' + regex + ')$') : str.match(regex);
@ -4569,3 +4567,24 @@ i18n.phonenumbers.PhoneNumberUtil.matchesEntirely_ = function(regex, str) {
}
return false;
};
/**
* Check whether the input sequence can be prefix-matched against the regular
* expression.
*
* @param {!RegExp|string} regex the regular expression to match against.
* @param {string} str the string to test
* @return {boolean} true if a prefix of the string can be matched with this
* regex.
* @package
*/
i18n.phonenumbers.PhoneNumberUtil.matchesPrefix = function(regex, str) {
/** @type {Array.<string>} */
var matchedGroups = (typeof regex == 'string') ?
str.match('^(?:' + regex + ')') : str.match(regex);
if (matchedGroups && goog.string.startsWith(str, matchedGroups[0])) {
return true;
}
return false;
};

+ 2
- 2
javascript/i18n/phonenumbers/phonenumberutil_test.js View File

@ -449,8 +449,8 @@ function testGetSupportedCallingCodes() {
phoneUtil.getSupportedCallingCodes(),
function(callingCode) {
assertTrue(callingCode > 0);
assertFalse(phoneUtil.getRegionCodeForCountryCode(callingCode)
== RegionCode.ZZ);
assertFalse(phoneUtil.getRegionCodeForCountryCode(callingCode) ==
RegionCode.ZZ);
});
// There should be more than just the global network calling codes in this set.
assertTrue(phoneUtil.getSupportedCallingCodes().length >


+ 3
- 0
javascript/i18n/phonenumbers/regioncodefortesting.js View File

@ -36,6 +36,7 @@ i18n.phonenumbers.RegionCode = {
AO: 'AO',
AQ: 'AQ',
AR: 'AR',
AM: 'AM',
AU: 'AU',
BB: 'BB',
BR: 'BR',
@ -43,10 +44,12 @@ i18n.phonenumbers.RegionCode = {
BY: 'BY',
CA: 'CA',
CH: 'CH',
CL: 'CL',
CN: 'CN',
CS: 'CS',
CX: 'CX',
DE: 'DE',
FR: 'FR',
GB: 'GB',
HU: 'HU',
IT: 'IT',


+ 711
- 0
javascript/i18n/phonenumbers/shortnumberinfo.js View File

@ -0,0 +1,711 @@
/**
* @license
* Copyright (C) 2018 The Libphonenumber Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Utility for international phone numbers.
* Functionality includes formatting, parsing and validation.
* (based on the java implementation).
*
* NOTE: A lot of methods in this class require Region Code strings. These must
* be provided using CLDR two-letter region-code format. These should be in
* upper-case. The list of the codes can be found here:
* http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
*
* @author James Wright
*/
goog.provide('i18n.phonenumbers.ShortNumberInfo');
goog.require('goog.array');
goog.require('goog.proto2.PbLiteSerializer');
goog.require('i18n.phonenumbers.PhoneMetadata');
goog.require('i18n.phonenumbers.PhoneNumber');
goog.require('i18n.phonenumbers.PhoneNumberDesc');
goog.require('i18n.phonenumbers.PhoneNumberUtil');
goog.require('i18n.phonenumbers.metadata');
goog.require('i18n.phonenumbers.shortnumbermetadata');
/**
* @constructor
* @private
*/
i18n.phonenumbers.ShortNumberInfo = function() {
/**
* A mapping from region code to the short-number metadata for that region.
* @type {Object.<string, i18n.phonenumbers.PhoneMetadata>}
*/
this.regionToMetadataMap = {};
};
goog.addSingletonGetter(i18n.phonenumbers.ShortNumberInfo);
/**
* In these countries, if extra digits are added to an emergency number, it no
* longer connects to the emergency service.
* @const
* @type {!Array<string>}
* @private
*/
i18n.phonenumbers.ShortNumberInfo.
REGIONS_WHERE_EMERGENCY_NUMBERS_MUST_BE_EXACT_ = [
'BR',
'CL',
'NI'
];
/**
* @enum {number} Cost categories of short numbers.
*/
i18n.phonenumbers.ShortNumberInfo.ShortNumberCost = {
TOLL_FREE: 0,
STANDARD_RATE: 1,
PREMIUM_RATE: 2,
UNKNOWN_COST: 3
};
/**
* Returns a list with the region codes that match the specific country calling
* code. For non-geographical country calling codes, the region code 001 is
* returned. Also, in the case of no region code being found, an empty list
* is returned.
* @param {number} countryCallingCode
* @return {!Array<string>} The region codes that match the given country code.
* @private
*/
i18n.phonenumbers.ShortNumberInfo.prototype.getRegionCodesForCountryCode_ =
function(countryCallingCode) {
var regionCodes = i18n.phonenumbers.metadata
.countryCodeToRegionCodeMap[countryCallingCode];
return regionCodes ? regionCodes : [];
};
/**
* Helper method to check that the country calling code of the number matches
* the region it's being dialed from.
* @param {i18n.phonenumbers.PhoneNumber} number
* @param {?string} regionDialingFrom
* @return {boolean}
* @private
*/
i18n.phonenumbers.ShortNumberInfo.prototype.regionDialingFromMatchesNumber_ =
function(number, regionDialingFrom) {
var regionCodes = this.getRegionCodesForCountryCode_(
number.getCountryCodeOrDefault());
return goog.array.contains(regionCodes, regionDialingFrom);
};
/**
* Check whether a short number is a possible number when dialed from the given
* region. This provides a more lenient check than
* {@link #isValidShortNumberForRegion}.
*
* @param {i18n.phonenumbers.PhoneNumber} number the short number to check
* @param {string} regionDialingFrom the region from which the number is dialed
* @return {boolean} whether the number is a possible short number
*/
i18n.phonenumbers.ShortNumberInfo.prototype.isPossibleShortNumberForRegion =
function(number, regionDialingFrom) {
if (!this.regionDialingFromMatchesNumber_(number, regionDialingFrom)) {
return false;
}
var phoneMetadata = this.getMetadataForRegion_(regionDialingFrom);
if (!phoneMetadata) {
return false;
}
var numberLength = this.getNationalSignificantNumber_(number).length;
return goog.array.contains(
phoneMetadata.getGeneralDesc().possibleLengthArray(), numberLength);
};
/**
* Check whether a short number is a possible number. If a country calling code
* is shared by multiple regions, this returns true if it's possible in any of
* them. This provides a more lenient check than {@link #isValidShortNumber}.
* See {@link #isPossibleShortNumberForRegion(PhoneNumber, String)} for details.
*
* @param {i18n.phonenumbers.PhoneNumber} number the short number to check
* @return {boolean} whether the number is a possible short number
*/
i18n.phonenumbers.ShortNumberInfo.prototype.isPossibleShortNumber =
function(number) {
var regionCodes = this.getRegionCodesForCountryCode_(
number.getCountryCodeOrDefault());
var shortNumberLength = this.getNationalSignificantNumber_(number).length;
for (var i = 0; i < regionCodes.length; i++) {
var region = regionCodes[i];
var phoneMetadata = this.getMetadataForRegion_(region);
if (!phoneMetadata) {
continue;
}
var possibleLengths = phoneMetadata.getGeneralDesc().possibleLengthArray();
if (goog.array.contains(possibleLengths, shortNumberLength)) {
return true;
}
}
return false;
};
/**
* Tests whether a short number matches a valid pattern in a region. Note that
* this doesn't verify the number is actually in use, which is impossible to
* tell by just looking at the number itself.
*
* @param {i18n.phonenumbers.PhoneNumber} number the short number for which we
* want to test the validity
* @param {?string} regionDialingFrom the region from which the number is dialed
* @return {boolean} whether the short number matches a valid pattern
*/
i18n.phonenumbers.ShortNumberInfo.prototype.isValidShortNumberForRegion =
function(number, regionDialingFrom) {
if (!this.regionDialingFromMatchesNumber_(number, regionDialingFrom)) {
return false;
}
var phoneMetadata = this.getMetadataForRegion_(regionDialingFrom);
if (!phoneMetadata) {
return false;
}
var shortNumber = this.getNationalSignificantNumber_(number);
var generalDesc = phoneMetadata.getGeneralDesc();
if (!this.matchesPossibleNumberAndNationalNumber_(shortNumber, generalDesc)) {
return false;
}
var shortNumberDesc = phoneMetadata.getShortCode();
return this.matchesPossibleNumberAndNationalNumber_(shortNumber,
shortNumberDesc);
};
/**
* Tests whether a short number matches a valid pattern. If a country calling
* code is shared by multiple regions, this returns true if it's valid in any of
* them. Note that this doesn't verify the number is actually in use, which is
* impossible to tell by just looking at the number itself. See
* {@link #isValidShortNumberForRegion(PhoneNumber, String)} for details.
*
* @param {i18n.phonenumbers.PhoneNumber} number the short number for which we
* want to test the validity
* @return {boolean} whether the short number matches a valid pattern
*/
i18n.phonenumbers.ShortNumberInfo.prototype.isValidShortNumber =
function(number) {
var regionCodes = this.getRegionCodesForCountryCode_(
number.getCountryCodeOrDefault());
var regionCode = this.getRegionCodeForShortNumberFromRegionList_(number,
regionCodes);
if (regionCodes.length > 1 && regionCode != null) {
// If a matching region had been found for the phone number from among two
// or more regions, then we have already implicitly verified its validity
// for that region.
return true;
}
return this.isValidShortNumberForRegion(number, regionCode);
};
/**
* Gets the expected cost category of a short number when dialed from a region
* (however, nothing is implied about its validity). If it is important that the
* number is valid, then its validity must first be checked using
* {@link #isValidShortNumberForRegion}. Note that emergency numbers are always
* considered toll-free. Example usage:
* <pre>{@code
* // The region for which the number was parsed and the region we subsequently
* // check against need not be the same. Here we parse the number in the US and
* // check it for Canada.
* PhoneNumber number = phoneUtil.parse("110", "US");
* ...
* String regionCode = "CA";
* ShortNumberInfo shortInfo = ShortNumberInfo.getInstance();
* if (shortInfo.isValidShortNumberForRegion(shortNumber, regionCode)) {
* ShortNumberCost cost = shortInfo.getExpectedCostForRegion(number,
* regionCode);
* // Do something with the cost information here.
* }}</pre>
*
* @param {i18n.phonenumbers.PhoneNumber} number the short number for which we
* want to know the expected cost category
* @param {string} regionDialingFrom the region from which the number is dialed
* @return {i18n.phonenumbers.ShortNumberInfo.ShortNumberCost} the expected cost
* category for that region of the short number. Returns UNKNOWN_COST if the
* number does not match a cost category. Note that an invalid number may
* match any cost category.
* @package
*/
// @VisibleForTesting
i18n.phonenumbers.ShortNumberInfo.prototype.getExpectedCostForRegion =
function(number, regionDialingFrom) {
var ShortNumberCost = i18n.phonenumbers.ShortNumberInfo.ShortNumberCost;
if (!this.regionDialingFromMatchesNumber_(number, regionDialingFrom)) {
return ShortNumberCost.UNKNOWN_COST;
}
var phoneMetadata = this.getMetadataForRegion_(regionDialingFrom);
if (!phoneMetadata) {
return ShortNumberCost.UNKNOWN_COST;
}
var shortNumber = this.getNationalSignificantNumber_(number);
if (!goog.array.contains(phoneMetadata.getGeneralDesc().possibleLengthArray(),
shortNumber.length)) {
return ShortNumberCost.UNKNOWN_COST;
}
if (this.matchesPossibleNumberAndNationalNumber_(
shortNumber, phoneMetadata.getPremiumRate())) {
return ShortNumberCost.PREMIUM_RATE;
}
if (this.matchesPossibleNumberAndNationalNumber_(
shortNumber, phoneMetadata.getStandardRate())) {
return ShortNumberCost.STANDARD_RATE;
}
if (this.matchesPossibleNumberAndNationalNumber_(
shortNumber, phoneMetadata.getTollFree())) {
return ShortNumberCost.TOLL_FREE;
}
if (this.isEmergencyNumber(shortNumber, regionDialingFrom)) {
// Emergency numbers are implicitly toll-free
return ShortNumberCost.TOLL_FREE;
}
return ShortNumberCost.UNKNOWN_COST;
};
/**
* Gets the expected cost category of a short number (however, nothing is
* implied about its validity). If the country calling code is unique to a
* region, this method behaves exactly the same as
* {@link #getExpectedCostForRegion(PhoneNumber, String)}. However, if the
* country calling code is shared by multiple regions, then it returns the
* highest cost in the sequence PREMIUM_RATE, UNKNOWN_COST, STANDARD_RATE,
* TOLL_FREE. The reason for the position of UNKNOWN_COST in this order is that
* if a number is UNKNOWN_COST in one region but STANDARD_RATE or TOLL_FREE in
* another, its expected cost cannot be estimated as one of the latter since it
* might be a PREMIUM_RATE number.
* <p>
* For example, if a number is STANDARD_RATE in the US, but TOLL_FREE in Canada,
* the expected cost returned by this method will be STANDARD_RATE, since the
* NANPA countries share the same country calling code.
* <p>
* Note: If the region from which the number is dialed is known, it is highly
* preferable to call {@link #getExpectedCostForRegion(PhoneNumber, String)}
* instead.
*
* @param {i18n.phonenumbers.PhoneNumber} number the short number for which we
* want to know the expected cost category
* @return {i18n.phonenumbers.ShortNumberInfo.ShortNumberCost} the highest
* expected cost category of the short number in the region(s) with the
* given country calling code
* @package
*/
// @VisibleForTesting
i18n.phonenumbers.ShortNumberInfo.prototype.getExpectedCost = function(number) {
var ShortNumberCost = i18n.phonenumbers.ShortNumberInfo.ShortNumberCost;
var regionCodes = this.getRegionCodesForCountryCode_(
number.getCountryCodeOrDefault());
if (regionCodes.length === 0) {
return ShortNumberCost.UNKNOWN_COST;
}
if (regionCodes.length === 1) {
return this.getExpectedCostForRegion(number, regionCodes[0]);
}
var cost = ShortNumberCost.TOLL_FREE;
for (var i = 0; i < regionCodes.length; i++) {
var regionCode = regionCodes[i];
var costForRegion = this.getExpectedCostForRegion(number, regionCode);
switch (costForRegion) {
case ShortNumberCost.PREMIUM_RATE:
return ShortNumberCost.PREMIUM_RATE;
case ShortNumberCost.UNKNOWN_COST:
cost = ShortNumberCost.UNKNOWN_COST;
break;
case ShortNumberCost.STANDARD_RATE:
if (cost !== ShortNumberCost.UNKNOWN_COST) {
cost = ShortNumberCost.STANDARD_RATE;
}
break;
case ShortNumberCost.TOLL_FREE:
// Do nothing.
break;
default:
throw new Error('Unrecognized cost for region: ' + costForRegion);
}
}
return cost;
};
/**
* Helper method to get the region code for a given phone number, from a list
* of possible region codes. If the list contains more than one region, the
* first region for which the number is valid is returned.
* @param {!i18n.phonenumbers.PhoneNumber} number
* @param {Array<string>} regionCodes
* @return {?string}
* @private
*/
i18n.phonenumbers.ShortNumberInfo.prototype.getRegionCodeForShortNumberFromRegionList_ =
function(number, regionCodes) {
if (regionCodes.length === 0) {
return null;
} else if (regionCodes.length === 1) {
return regionCodes[0];
}
var nationalNumber = this.getNationalSignificantNumber_(number);
for (var i = 0; i < regionCodes.length; i++) {
var regionCode = regionCodes[i];
var phoneMetadata = this.getMetadataForRegion_(regionCode);
if (phoneMetadata && this.matchesPossibleNumberAndNationalNumber_(
nationalNumber, phoneMetadata.getShortCode())) {
return regionCode;
}
}
return null;
};
/**
* Convenience method to get a list of what regions the library has metadata for
* @return {Array<string>} the list of region codes
* @package
*/
i18n.phonenumbers.ShortNumberInfo.prototype.getSupportedRegions = function() {
return goog.array.filter(
Object.keys(i18n.phonenumbers.shortnumbermetadata.countryToMetadata),
function(regionCode) {
return isNaN(regionCode);
});
};
/**
* Gets a valid short number for the specified region.
*
* @param {?string} regionCode the region for which an example short number is
* needed
* @return {string} a valid short number for the specified region. Returns an
* empty string when the metadata does not contain such information.
* @package
*/
i18n.phonenumbers.ShortNumberInfo.prototype.getExampleShortNumber =
function(regionCode) {
var phoneMetadata = this.getMetadataForRegion_(regionCode);
if (!phoneMetadata) {
return '';
}
var desc = phoneMetadata.getShortCode();
if (desc.hasExampleNumber()) {
return desc.getExampleNumber() || '';
}
return '';
};
/**
* Gets a valid short number for the specified cost category.
*
* @param {string} regionCode the region for which an example short number is
* needed
* @param {i18n.phonenumbers.ShortNumberInfo.ShortNumberCost} cost the cost
* category of number that is needed
* @return {string} a valid short number for the specified region and cost
* category. Returns an empty string when the metadata does not contain such
* information, or the cost is UNKNOWN_COST.
*/
i18n.phonenumbers.ShortNumberInfo.prototype.getExampleShortNumberForCost =
function(regionCode, cost) {
var phoneMetadata = this.getMetadataForRegion_(regionCode);
if (!phoneMetadata) {
return '';
}
var ShortNumberCost = i18n.phonenumbers.ShortNumberInfo.ShortNumberCost;
var desc = null;
switch (cost) {
case ShortNumberCost.TOLL_FREE:
desc = phoneMetadata.getTollFree();
break;
case ShortNumberCost.STANDARD_RATE:
desc = phoneMetadata.getStandardRate();
break;
case ShortNumberCost.PREMIUM_RATE:
desc = phoneMetadata.getPremiumRate();
break;
default:
// UNKNOWN_COST numbers are computed by the process of elimination from
// the other cost categories.
}
if (desc && desc.hasExampleNumber()) {
return desc.getExampleNumber() || '';
}
return '';
};
/**
* Returns true if the given number, exactly as dialed, might be used to
* connect to an emergency service in the given region.
* <p>
* This method accepts a string, rather than a PhoneNumber, because it needs
* to distinguish cases such as "+1 911" and "911", where the former may not
* connect to an emergency service in all cases but the latter would. This
* method takes into account cases where the number might contain formatting,
* or might have additional digits appended (when it is okay to do that in
* the specified region).
*
* @param {string} number the phone number to test
* @param {string} regionCode the region where the phone number is being
* dialed
* @return {boolean} whether the number might be used to connect to an
* emergency service in the given region
*/
i18n.phonenumbers.ShortNumberInfo.prototype.connectsToEmergencyNumber =
function(number, regionCode) {
return this.matchesEmergencyNumberHelper_(number, regionCode,
true /* allows prefix match */);
};
/**
* Returns true if the given number exactly matches an emergency service
* number in the given region.
* <p>
* This method takes into account cases where the number might contain
* formatting, but doesn't allow additional digits to be appended. Note that
* {@code isEmergencyNumber(number, region)} implies
* {@code connectsToEmergencyNumber(number, region)}.
*
* @param {string} number the phone number to test
* @param {string} regionCode the region where the phone number is being
* dialed
* @return {boolean} whether the number exactly matches an emergency services
* number in the given region.
*/
i18n.phonenumbers.ShortNumberInfo.prototype.isEmergencyNumber =
function(number, regionCode) {
return this.matchesEmergencyNumberHelper_(number, regionCode,
false /* doesn't allow prefix match */);
};
/**
* @param {?string} regionCode The region code to get metadata for
* @return {?i18n.phonenumbers.PhoneMetadata} The region code's metadata, or
* null if it is not available or the region code is invalid.
* @private
*/
i18n.phonenumbers.ShortNumberInfo.prototype.getMetadataForRegion_ =
function(regionCode) {
if (!regionCode) {
return null;
}
regionCode = regionCode.toUpperCase();
var metadata = this.regionToMetadataMap[regionCode];
if (metadata == null) {
/** @type {goog.proto2.PbLiteSerializer} */
var serializer = new goog.proto2.PbLiteSerializer();
var metadataSerialized =
i18n.phonenumbers.shortnumbermetadata.countryToMetadata[regionCode];
if (metadataSerialized == null) {
return null;
}
metadata = /** @type {i18n.phonenumbers.PhoneMetadata} */ (
serializer.deserialize(i18n.phonenumbers.PhoneMetadata.getDescriptor(),
metadataSerialized));
this.regionToMetadataMap[regionCode] = metadata;
}
return metadata;
};
/**
* @param {string} number the number to match against
* @param {string} regionCode the region code to check against
* @param {boolean} allowPrefixMatch whether to allow prefix matching
* @return {boolean} True iff the number matches an emergency number for that
* particular region.
* @private
*/
i18n.phonenumbers.ShortNumberInfo.prototype.matchesEmergencyNumberHelper_ =
function(number, regionCode, allowPrefixMatch) {
var possibleNumber = i18n.phonenumbers.PhoneNumberUtil
.extractPossibleNumber(number);
if (i18n.phonenumbers.PhoneNumberUtil.LEADING_PLUS_CHARS_PATTERN
.test(possibleNumber)) {
return false;
}
var metadata = this.getMetadataForRegion_(regionCode);
if (metadata == null || !metadata.hasEmergency()) {
return false;
}
var normalizedNumber = i18n.phonenumbers.PhoneNumberUtil
.normalizeDigitsOnly(possibleNumber);
var allowPrefixMatchForRegion = allowPrefixMatch && !goog.array.contains(
i18n.phonenumbers.ShortNumberInfo.
REGIONS_WHERE_EMERGENCY_NUMBERS_MUST_BE_EXACT_,
regionCode);
var emergencyNumberPattern = metadata.getEmergency()
.getNationalNumberPatternOrDefault();
var result = i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
emergencyNumberPattern, normalizedNumber);
return result ||
(allowPrefixMatchForRegion &&
i18n.phonenumbers.PhoneNumberUtil
.matchesPrefix(emergencyNumberPattern, normalizedNumber));
};
/**
* Given a valid short number, determines whether it is carrier-specific
* (however, nothing is implied about its validity). Carrier-specific numbers
* may connect to a different end-point, or not connect at all, depending on
* the user's carrier. If it is important that the number is valid, then its
* validity must first be checked using {@link #isValidShortNumber} or
* {@link #isValidShortNumberForRegion}.
*
* @param {i18n.phonenumbers.PhoneNumber} number the valid short number to
* check
* @return {boolean} whether the short number is carrier-specific, assuming the
* input was a valid short number
*/
i18n.phonenumbers.ShortNumberInfo.prototype.isCarrierSpecific =
function(number) {
var regionCodes = this.getRegionCodesForCountryCode_(
number.getCountryCodeOrDefault());
var regionCode = this.getRegionCodeForShortNumberFromRegionList_(number,
regionCodes);
var nationalNumber = this.getNationalSignificantNumber_(number);
var phoneMetadata = this.getMetadataForRegion_(regionCode);
return !!phoneMetadata && this.matchesPossibleNumberAndNationalNumber_(
nationalNumber, phoneMetadata.getCarrierSpecific());
};
/**
* Given a valid short number, determines whether it is carrier-specific when
* dialed from the given region (however, nothing is implied about its
* validity). Carrier-specific numbers may connect to a different end-point, or
* not connect at all, depending on the user's carrier. If it is important that
* the number is valid, then its validity must first be checked using
* {@link #isValidShortNumber} or {@link #isValidShortNumberForRegion}. Returns
* false if the number doesn't match the region provided.
*
* @param {i18n.phonenumbers.PhoneNumber} number the valid short number to
* check
* @param {string} regionDialingFrom the region from which the number is dialed
* @return {boolean} whether the short number is carrier-specific in the
* provided region, assuming the input was a valid short number
*/
i18n.phonenumbers.ShortNumberInfo.prototype.isCarrierSpecificForRegion =
function(number, regionDialingFrom) {
if (!this.regionDialingFromMatchesNumber_(number, regionDialingFrom)) {
return false;
}
var nationalNumber = this.getNationalSignificantNumber_(number);
var phoneMetadata = this.getMetadataForRegion_(regionDialingFrom);
return !!phoneMetadata && this.matchesPossibleNumberAndNationalNumber_(
nationalNumber, phoneMetadata.getCarrierSpecific());
};
/**
* Given a valid short number, determines whether it is an SMS service
* (however, nothing is implied about its validity). An SMS service is where the
* primary or only intended usage is to receive and/or send text messages
* (SMSs). This includes MMS as MMS numbers downgrade to SMS if the other party
* isn't MMS-capable. If it is important that the number is valid, then its
* validity must first be checked using {@link #isValidShortNumber} or {@link
* #isValidShortNumberForRegion}. Returns false if the number doesn't match the
* region provided.
*
* @param {i18n.phonenumbers.PhoneNumber} number the valid short number to
* check
* @param {string} regionDialingFrom the region from which the number is dialed
* @return {boolean} whether the short number is an SMS service in the provided
* region, assuming the input was a valid short number
*/
i18n.phonenumbers.ShortNumberInfo.prototype.isSmsServiceForRegion =
function(number, regionDialingFrom) {
if (!this.regionDialingFromMatchesNumber_(number, regionDialingFrom)) {
return false;
}
var phoneMetadata = this.getMetadataForRegion_(regionDialingFrom);
var nationalNumber = this.getNationalSignificantNumber_(number);
return !!phoneMetadata && this.matchesPossibleNumberAndNationalNumber_(
nationalNumber, phoneMetadata.getSmsServices());
};
/**
* Gets the national significant number of a phone number. Note a national
* significant number doesn't contain a national prefix or any formatting.
* <p>
* This is a temporary duplicate of the {@code getNationalSignificantNumber}
* method from {@code PhoneNumberUtil}. Ultimately a canonical static version
* should exist in a separate utility class (to prevent {@code ShortNumberInfo}
* needing to depend on PhoneNumberUtil).
*
* @param {i18n.phonenumbers.PhoneNumber} number the phone number for which the
* national significant number is needed.
* @return {string} the national significant number of the PhoneNumber object
* passed in.
* @private
*/
i18n.phonenumbers.ShortNumberInfo.prototype.getNationalSignificantNumber_ =
function(number) {
if (!number.hasNationalNumber()) {
return '';
}
/** @type {string} */
var nationalNumber = '' + number.getNationalNumber();
// If leading zero(s) have been set, we prefix this now. Note that a single
// leading zero is not the same as a national prefix; leading zeros should be
// dialled no matter whether you are dialling from within or outside the
// country, national prefixes are added when formatting nationally if
// applicable.
if (number.hasItalianLeadingZero() && number.getItalianLeadingZero() &&
number.getNumberOfLeadingZerosOrDefault() > 0) {
return Array(number.getNumberOfLeadingZerosOrDefault() + 1).join('0') +
nationalNumber;
}
return nationalNumber;
};
/**
* Helper method to add in a performance optimization.
* TODO: Once we have benchmarked ShortNumberInfo, consider if it is worth
* keeping this performance optimization.
* @param {string} number
* @param {i18n.phonenumbers.PhoneNumberDesc} numberDesc
* @return {boolean}
* @private
*/
i18n.phonenumbers.ShortNumberInfo.prototype.matchesPossibleNumberAndNationalNumber_ =
function(number, numberDesc) {
if (numberDesc.possibleLengthArray().length > 0 && !goog.array.contains(
numberDesc.possibleLengthArray(), number.length)) {
return false;
}
return i18n.phonenumbers.PhoneNumberUtil.matchesEntirely(
numberDesc.getNationalNumberPatternOrDefault(), number.toString());
};

+ 39
- 0
javascript/i18n/phonenumbers/shortnumberinfo_test.html View File

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html>
<!--
@license
Copyright (C) 2010 The Libphonenumber Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS-IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
Author: Nikolaos Trogkanis
-->
<head>
<title>libphonenumber Unit Tests - i18n.phonenumbers - shortnumberinfo.js</title>
<script src="../../../../closure-library/closure/goog/base.js"></script>
<script>
goog.require('goog.proto2.Message');
</script>
<script src="phonemetadata.pb.js"></script>
<script src="phonenumber.pb.js"></script>
<script src="metadatafortesting.js"></script>
<script src="shortnumbermetadata.js"></script>
<script src="regioncodefortesting.js"></script>
<script src="phonenumberutil.js"></script>
<script src="shortnumberinfo.js"></script>
<script src="shortnumberinfo_test.js"></script>
</head>
<body>
</body>
</html>

+ 467
- 0
javascript/i18n/phonenumbers/shortnumberinfo_test.js View File

@ -0,0 +1,467 @@
/**
* @license
* Copyright (C) 2018 The Libphonenumber Authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Unit tests for the ShortNumberInfo.
*
* Note that these tests use the test metadata for PhoneNumberUtil related
* operations, but the real short number metadata for testing ShortNumberInfo
* specific operations. This is not intentional, but mirrors the current state
* of the Java test suite.
*
* @author James Wright
*/
goog.require('goog.testing.jsunit');
goog.require('i18n.phonenumbers.PhoneNumber');
goog.require('i18n.phonenumbers.PhoneNumberUtil');
goog.require('i18n.phonenumbers.RegionCode');
goog.require('i18n.phonenumbers.ShortNumberInfo');
/** @type {i18n.phonenumbers.ShortNumberInfo} */
var shortInfo = i18n.phonenumbers.ShortNumberInfo.getInstance();
/** @type {i18n.phonenumbers.PhoneNumberUtil} */
var phoneUtil = i18n.phonenumbers.PhoneNumberUtil.getInstance();
var RegionCode = i18n.phonenumbers.RegionCode;
function testIsPossibleShortNumber() {
var possibleNumber = new i18n.phonenumbers.PhoneNumber();
possibleNumber.setCountryCode(33);
possibleNumber.setNationalNumber(123456);
assertTrue(shortInfo.isPossibleShortNumber(possibleNumber));
assertTrue(shortInfo.isPossibleShortNumberForRegion(
phoneUtil.parse('123456', RegionCode.FR),
RegionCode.FR));
var impossibleNumber = new i18n.phonenumbers.PhoneNumber();
impossibleNumber.setCountryCode(33);
impossibleNumber.setNationalNumber(9);
assertFalse(shortInfo.isPossibleShortNumber(impossibleNumber));
// Note that GB and GG share the country calling code 44, and that this number
// is possible but not valid.
var impossibleUkNumber = new i18n.phonenumbers.PhoneNumber();
impossibleUkNumber.setCountryCode(44);
impossibleUkNumber.setNationalNumber(11001);
assertTrue(shortInfo.isPossibleShortNumber(impossibleUkNumber));
}
function testIsValidShortNumber() {
var shortNumber1 = new i18n.phonenumbers.PhoneNumber();
shortNumber1.setCountryCode(33);
shortNumber1.setNationalNumber(1010);
assertTrue(shortInfo.isValidShortNumber(shortNumber1));
assertTrue(shortInfo.isValidShortNumberForRegion(
phoneUtil.parse('1010', RegionCode.FR),
RegionCode.FR));
var shortNumber2 = new i18n.phonenumbers.PhoneNumber();
shortNumber2.setCountryCode(33);
shortNumber2.setNationalNumber(123456);
assertFalse(shortInfo.isValidShortNumber(shortNumber2));
assertFalse(shortInfo.isValidShortNumberForRegion(
phoneUtil.parse('123456', RegionCode.FR),
RegionCode.FR));
// Note that GB and GG share the country calling code 44.
var shortNumber3 = new i18n.phonenumbers.PhoneNumber();
shortNumber3.setCountryCode(44);
shortNumber3.setNationalNumber(18001);
assertTrue(shortInfo.isValidShortNumber(shortNumber3));
}
function testIsCarrierSpecific() {
var carrierSpecificNumber = new i18n.phonenumbers.PhoneNumber();
carrierSpecificNumber.setCountryCode(1);
carrierSpecificNumber.setNationalNumber(33669);
assertTrue(shortInfo.isCarrierSpecific(carrierSpecificNumber));
assertTrue(shortInfo.isCarrierSpecificForRegion(
phoneUtil.parse('33669', RegionCode.US),
RegionCode.US));
var notCarrierSpecificNumber = new i18n.phonenumbers.PhoneNumber();
notCarrierSpecificNumber.setCountryCode(1);
notCarrierSpecificNumber.setNationalNumber(911);
assertFalse(shortInfo.isCarrierSpecific(notCarrierSpecificNumber));
assertFalse(shortInfo.isCarrierSpecificForRegion(
phoneUtil.parse('911', RegionCode.US),
RegionCode.US));
var carrierSpecificNumberForSomeRegion = new i18n.phonenumbers.PhoneNumber();
carrierSpecificNumberForSomeRegion.setCountryCode(1);
carrierSpecificNumberForSomeRegion.setNationalNumber(211);
assertTrue(shortInfo.isCarrierSpecific(carrierSpecificNumberForSomeRegion));
assertTrue(shortInfo.isCarrierSpecificForRegion(
carrierSpecificNumberForSomeRegion, RegionCode.US));
assertFalse(shortInfo.isCarrierSpecificForRegion(
carrierSpecificNumberForSomeRegion, RegionCode.BB));
}
function testIsSmsService() {
var smsServiceNumberForSomeRegion = new i18n.phonenumbers.PhoneNumber();
smsServiceNumberForSomeRegion.setCountryCode(1);
smsServiceNumberForSomeRegion.setNationalNumber(21234);
assertTrue(shortInfo.isSmsServiceForRegion(smsServiceNumberForSomeRegion,
RegionCode.US));
assertFalse(shortInfo.isSmsServiceForRegion(smsServiceNumberForSomeRegion,
RegionCode.BB));
}
function testGetExpectedCost() {
var premiumRateExample = shortInfo.getExampleShortNumberForCost(RegionCode.FR,
i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.PREMIUM_RATE);
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.PREMIUM_RATE,
shortInfo.getExpectedCostForRegion(
phoneUtil.parse(premiumRateExample, RegionCode.FR),
RegionCode.FR));
var premiumRateNumber = new i18n.phonenumbers.PhoneNumber();
premiumRateNumber.setCountryCode(33);
premiumRateNumber.setNationalNumber(parseInt(premiumRateExample, 10));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.PREMIUM_RATE,
shortInfo.getExpectedCost(premiumRateNumber));
var standardRateExample = shortInfo.getExampleShortNumberForCost(
RegionCode.FR,
i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.STANDARD_RATE);
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.STANDARD_RATE,
shortInfo.getExpectedCostForRegion(
phoneUtil.parse(standardRateExample, RegionCode.FR),
RegionCode.FR));
var standardRateNumber = new i18n.phonenumbers.PhoneNumber();
standardRateNumber.setCountryCode(33);
standardRateNumber.setNationalNumber(parseInt(standardRateExample, 10));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.STANDARD_RATE,
shortInfo.getExpectedCost(standardRateNumber));
var tollFreeExample = shortInfo.getExampleShortNumberForCost(RegionCode.FR,
i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.TOLL_FREE);
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.TOLL_FREE,
shortInfo.getExpectedCostForRegion(
phoneUtil.parse(tollFreeExample, RegionCode.FR),
RegionCode.FR));
var tollFreeNumber = new i18n.phonenumbers.PhoneNumber();
tollFreeNumber.setCountryCode(33);
tollFreeNumber.setNationalNumber(parseInt(tollFreeExample, 10));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.TOLL_FREE,
shortInfo.getExpectedCost(tollFreeNumber));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.UNKNOWN_COST,
shortInfo.getExpectedCostForRegion(
phoneUtil.parse('12345', RegionCode.FR),
RegionCode.FR));
var unknownCostNumber = new i18n.phonenumbers.PhoneNumber();
unknownCostNumber.setCountryCode(33);
unknownCostNumber.setNationalNumber(12345);
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.UNKNOWN_COST,
shortInfo.getExpectedCost(unknownCostNumber));
// Test that an invalid number may nevertheless have a cost other than
// UNKNOWN_COST.
assertFalse(shortInfo.isValidShortNumberForRegion(
phoneUtil.parse('116123', RegionCode.FR),
RegionCode.FR));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.TOLL_FREE,
shortInfo.getExpectedCostForRegion(
phoneUtil.parse('116123', RegionCode.FR),
RegionCode.FR));
var invalidNumber = new i18n.phonenumbers.PhoneNumber();
invalidNumber.setCountryCode(33);
invalidNumber.setNationalNumber(116123);
assertFalse(shortInfo.isValidShortNumber(invalidNumber));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.TOLL_FREE,
shortInfo.getExpectedCost(invalidNumber));
// Test a nonexistent country code.
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.UNKNOWN_COST,
shortInfo.getExpectedCostForRegion(phoneUtil.parse('911', RegionCode.US),
RegionCode.ZZ));
unknownCostNumber = new i18n.phonenumbers.PhoneNumber();
unknownCostNumber.setCountryCode(123);
unknownCostNumber.setNationalNumber(911);
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.UNKNOWN_COST,
shortInfo.getExpectedCost(unknownCostNumber));
}
function testGetExpectedCostForSharedCountryCallingCode() {
// Test some numbers which have different costs in countries sharing the same
// country calling code. In Australia, 1234 is premium-rate, 1194 is
// standard-rate, and 733 is toll-free. These are not known to be valid
// numbers in the Christmas Islands.
var ambiguousPremiumRateString = '1234';
var ambiguousPremiumRateNumber = new i18n.phonenumbers.PhoneNumber();
ambiguousPremiumRateNumber.setCountryCode(61);
ambiguousPremiumRateNumber.setNationalNumber(1234);
var ambiguousStandardRateString = '1194';
var ambiguousStandardRateNumber = new i18n.phonenumbers.PhoneNumber();
ambiguousStandardRateNumber.setCountryCode(61);
ambiguousStandardRateNumber.setNationalNumber(1194);
var ambiguousTollFreeString = '733';
var ambiguousTollFreeNumber = new i18n.phonenumbers.PhoneNumber();
ambiguousTollFreeNumber.setCountryCode(61);
ambiguousTollFreeNumber.setNationalNumber(733);
assertTrue(shortInfo.isValidShortNumber(ambiguousPremiumRateNumber));
assertTrue(shortInfo.isValidShortNumber(ambiguousStandardRateNumber));
assertTrue(shortInfo.isValidShortNumber(ambiguousTollFreeNumber));
assertTrue(shortInfo.isValidShortNumberForRegion(
phoneUtil.parse(ambiguousPremiumRateString, RegionCode.AU),
RegionCode.AU));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.PREMIUM_RATE,
shortInfo.getExpectedCostForRegion(
phoneUtil.parse(ambiguousPremiumRateString, RegionCode.AU),
RegionCode.AU));
assertFalse(shortInfo.isValidShortNumberForRegion(
phoneUtil.parse(ambiguousPremiumRateString, RegionCode.CX),
RegionCode.CX));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.UNKNOWN_COST,
shortInfo.getExpectedCostForRegion(
phoneUtil.parse(ambiguousPremiumRateString, RegionCode.CX),
RegionCode.CX));
// PREMIUM_RATE takes precedence over UNKNOWN_COST.
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.PREMIUM_RATE,
shortInfo.getExpectedCost(ambiguousPremiumRateNumber));
assertTrue(shortInfo.isValidShortNumberForRegion(
phoneUtil.parse(ambiguousStandardRateString, RegionCode.AU),
RegionCode.AU));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.STANDARD_RATE,
shortInfo.getExpectedCostForRegion(
phoneUtil.parse(ambiguousStandardRateString, RegionCode.AU),
RegionCode.AU));
assertFalse(shortInfo.isValidShortNumberForRegion(
phoneUtil.parse(ambiguousStandardRateString, RegionCode.CX),
RegionCode.CX));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.UNKNOWN_COST,
shortInfo.getExpectedCostForRegion(
phoneUtil.parse(ambiguousStandardRateString, RegionCode.CX),
RegionCode.CX));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.UNKNOWN_COST,
shortInfo.getExpectedCost(ambiguousStandardRateNumber));
assertTrue(shortInfo.isValidShortNumberForRegion(
phoneUtil.parse(ambiguousTollFreeString, RegionCode.AU),
RegionCode.AU));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.TOLL_FREE,
shortInfo.getExpectedCostForRegion(
phoneUtil.parse(ambiguousTollFreeString, RegionCode.AU),
RegionCode.AU));
assertFalse(shortInfo.isValidShortNumberForRegion(
phoneUtil.parse(ambiguousTollFreeString, RegionCode.CX),
RegionCode.CX));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.UNKNOWN_COST,
shortInfo.getExpectedCostForRegion(
phoneUtil.parse(ambiguousTollFreeString, RegionCode.CX),
RegionCode.CX));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.UNKNOWN_COST,
shortInfo.getExpectedCost(ambiguousTollFreeNumber));
}
function testGetExampleShortNumber() {
assertEquals('8711', shortInfo.getExampleShortNumber(RegionCode.AM));
assertEquals('1010', shortInfo.getExampleShortNumber(RegionCode.FR));
assertEquals('', shortInfo.getExampleShortNumber(RegionCode.UN001));
assertEquals('', shortInfo.getExampleShortNumber(null));
}
function testGetExampleShortNumberForCost() {
assertEquals('3010', shortInfo.getExampleShortNumberForCost(RegionCode.FR,
i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.TOLL_FREE));
assertEquals('1023', shortInfo.getExampleShortNumberForCost(RegionCode.FR,
i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.STANDARD_RATE));
assertEquals('42000', shortInfo.getExampleShortNumberForCost(RegionCode.FR,
i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.PREMIUM_RATE));
assertEquals('', shortInfo.getExampleShortNumberForCost(RegionCode.FR,
i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.UNKNOWN_COST));
}
function testConnectsToEmergencyNumber_US() {
assertTrue(shortInfo.connectsToEmergencyNumber('911', RegionCode.US));
assertTrue(shortInfo.connectsToEmergencyNumber('112', RegionCode.US));
assertFalse(shortInfo.connectsToEmergencyNumber('999', RegionCode.US));
}
function testConnectsToEmergencyNumberLongNumber_US() {
assertTrue(shortInfo.connectsToEmergencyNumber('9116666666', RegionCode.US));
assertTrue(shortInfo.connectsToEmergencyNumber('1126666666', RegionCode.US));
assertFalse(shortInfo.connectsToEmergencyNumber('9996666666', RegionCode.US));
}
function testConnectsToEmergencyNumberWithFormatting_US() {
assertTrue(shortInfo.connectsToEmergencyNumber('9-1-1', RegionCode.US));
assertTrue(shortInfo.connectsToEmergencyNumber('1-1-2', RegionCode.US));
assertFalse(shortInfo.connectsToEmergencyNumber('9-9-9', RegionCode.US));
}
function testConnectsToEmergencyNumberWithPlusSign_US() {
assertFalse(shortInfo.connectsToEmergencyNumber('+911', RegionCode.US));
assertFalse(shortInfo.connectsToEmergencyNumber('\uFF0B911', RegionCode.US));
assertFalse(shortInfo.connectsToEmergencyNumber(' +911', RegionCode.US));
assertFalse(shortInfo.connectsToEmergencyNumber('+112', RegionCode.US));
assertFalse(shortInfo.connectsToEmergencyNumber('+999', RegionCode.US));
}
function testConnectsToEmergencyNumber_BR() {
assertTrue(shortInfo.connectsToEmergencyNumber('911', RegionCode.BR));
assertTrue(shortInfo.connectsToEmergencyNumber('190', RegionCode.BR));
assertFalse(shortInfo.connectsToEmergencyNumber('999', RegionCode.BR));
}
function testConnectsToEmergencyNumberLongNumber_BR() {
// Brazilian emergency numbers don't work when additional digits are appended.
assertFalse(shortInfo.connectsToEmergencyNumber('9111', RegionCode.BR));
assertFalse(shortInfo.connectsToEmergencyNumber('1900', RegionCode.BR));
assertFalse(shortInfo.connectsToEmergencyNumber('9996', RegionCode.BR));
}
function testConnectsToEmergencyNumber_CL() {
assertTrue(shortInfo.connectsToEmergencyNumber('131', RegionCode.CL));
assertTrue(shortInfo.connectsToEmergencyNumber('133', RegionCode.CL));
}
function testConnectsToEmergencyNumberLongNumber_CL() {
// Chilean emergency numbers don't work when additional digits are appended.
assertFalse(shortInfo.connectsToEmergencyNumber('1313', RegionCode.CL));
assertFalse(shortInfo.connectsToEmergencyNumber('1330', RegionCode.CL));
}
function testConnectsToEmergencyNumber_AO() {
// Angola doesn't have any metadata for emergency numbers in the test
// metadata.
assertFalse(shortInfo.connectsToEmergencyNumber('911', RegionCode.AO));
assertFalse(shortInfo.connectsToEmergencyNumber('222123456', RegionCode.AO));
assertFalse(shortInfo.connectsToEmergencyNumber('923123456', RegionCode.AO));
}
function testConnectsToEmergencyNumber_ZW() {
// Zimbabwe doesn't have any metadata in the test metadata.
assertFalse(shortInfo.connectsToEmergencyNumber('911', RegionCode.ZW));
assertFalse(shortInfo.connectsToEmergencyNumber('01312345', RegionCode.ZW));
assertFalse(shortInfo.connectsToEmergencyNumber('0711234567', RegionCode.ZW));
}
function testIsEmergencyNumber_US() {
assertTrue(shortInfo.isEmergencyNumber('911', RegionCode.US));
assertTrue(shortInfo.isEmergencyNumber('112', RegionCode.US));
assertFalse(shortInfo.isEmergencyNumber('999', RegionCode.US));
}
function testIsEmergencyNumberLongNumber_US() {
assertFalse(shortInfo.isEmergencyNumber('9116666666', RegionCode.US));
assertFalse(shortInfo.isEmergencyNumber('1126666666', RegionCode.US));
assertFalse(shortInfo.isEmergencyNumber('9996666666', RegionCode.US));
}
function testIsEmergencyNumberWithFormatting_US() {
assertTrue(shortInfo.isEmergencyNumber('9-1-1', RegionCode.US));
assertTrue(shortInfo.isEmergencyNumber('*911', RegionCode.US));
assertTrue(shortInfo.isEmergencyNumber('1-1-2', RegionCode.US));
assertTrue(shortInfo.isEmergencyNumber('*112', RegionCode.US));
assertFalse(shortInfo.isEmergencyNumber('9-9-9', RegionCode.US));
assertFalse(shortInfo.isEmergencyNumber('*999', RegionCode.US));
}
function testIsEmergencyNumberWithPlusSign_US() {
assertFalse(shortInfo.isEmergencyNumber('+911', RegionCode.US));
assertFalse(shortInfo.isEmergencyNumber('\uFF0B911', RegionCode.US));
assertFalse(shortInfo.isEmergencyNumber(' +911', RegionCode.US));
assertFalse(shortInfo.isEmergencyNumber('+112', RegionCode.US));
assertFalse(shortInfo.isEmergencyNumber('+999', RegionCode.US));
}
function testIsEmergencyNumber_BR() {
assertTrue(shortInfo.isEmergencyNumber('911', RegionCode.BR));
assertTrue(shortInfo.isEmergencyNumber('190', RegionCode.BR));
assertFalse(shortInfo.isEmergencyNumber('999', RegionCode.BR));
}
function testIsEmergencyNumberLongNumber_BR() {
assertFalse(shortInfo.isEmergencyNumber('9111', RegionCode.BR));
assertFalse(shortInfo.isEmergencyNumber('1900', RegionCode.BR));
assertFalse(shortInfo.isEmergencyNumber('9996', RegionCode.BR));
}
function testIsEmergencyNumber_AO() {
// Angola doesn't have any metadata for emergency numbers in the test
// metadata.
assertFalse(shortInfo.isEmergencyNumber('911', RegionCode.AO));
assertFalse(shortInfo.isEmergencyNumber('222123456', RegionCode.AO));
assertFalse(shortInfo.isEmergencyNumber('923123456', RegionCode.AO));
}
function testIsEmergencyNumber_ZW() {
// Zimbabwe doesn't have any metadata in the test metadata.
assertFalse(shortInfo.isEmergencyNumber('911', RegionCode.ZW));
assertFalse(shortInfo.isEmergencyNumber('01312345', RegionCode.ZW));
assertFalse(shortInfo.isEmergencyNumber('0711234567', RegionCode.ZW));
}
function testEmergencyNumberForSharedCountryCallingCode() {
// Test the emergency number 112, which is valid in both Australia and the
// Christmas Islands.
assertTrue(shortInfo.isEmergencyNumber('112', RegionCode.AU));
assertTrue(shortInfo.isValidShortNumberForRegion(
phoneUtil.parse('112', RegionCode.AU),
RegionCode.AU));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.TOLL_FREE,
shortInfo.getExpectedCostForRegion(phoneUtil.parse('112', RegionCode.AU),
RegionCode.AU));
assertTrue(shortInfo.isEmergencyNumber('112', RegionCode.CX));
assertTrue(shortInfo.isValidShortNumberForRegion(
phoneUtil.parse('112', RegionCode.CX),
RegionCode.CX));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.TOLL_FREE,
shortInfo.getExpectedCostForRegion(phoneUtil.parse('112', RegionCode.CX),
RegionCode.CX));
var sharedEmergencyNumber = new i18n.phonenumbers.PhoneNumber();
sharedEmergencyNumber.setCountryCode(61);
sharedEmergencyNumber.setNationalNumber(112);
assertTrue(shortInfo.isValidShortNumber(sharedEmergencyNumber));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.TOLL_FREE,
shortInfo.getExpectedCost(sharedEmergencyNumber));
}
function testOverlappingNANPANumber() {
// 211 is an emergency number in Barbados, while it is a toll-free information
// line in Canada and the USA.
assertTrue(shortInfo.isEmergencyNumber('211', RegionCode.BB));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.TOLL_FREE,
shortInfo.getExpectedCostForRegion(phoneUtil.parse('211', RegionCode.BB),
RegionCode.BB));
assertFalse(shortInfo.isEmergencyNumber('211', RegionCode.US));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.UNKNOWN_COST,
shortInfo.getExpectedCostForRegion(phoneUtil.parse('211', RegionCode.US),
RegionCode.US));
assertFalse(shortInfo.isEmergencyNumber('211', RegionCode.CA));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.TOLL_FREE,
shortInfo.getExpectedCostForRegion(phoneUtil.parse('211', RegionCode.CA),
RegionCode.CA));
}
function testCountryCallingCodeIsNotIgnored() {
// +46 is the country calling code for Sweden (SE), and 40404 is a valid short
// number in the US.
assertFalse(shortInfo.isPossibleShortNumberForRegion(
phoneUtil.parse('+4640404', RegionCode.SE),
RegionCode.US));
assertFalse(shortInfo.isValidShortNumberForRegion(
phoneUtil.parse('+4640404', RegionCode.SE),
RegionCode.US));
assertEquals(i18n.phonenumbers.ShortNumberInfo.ShortNumberCost.UNKNOWN_COST,
shortInfo.getExpectedCostForRegion(
phoneUtil.parse('+4640404', RegionCode.SE),
RegionCode.US));
}

+ 3737
- 0
javascript/i18n/phonenumbers/shortnumbermetadata.js
File diff suppressed because it is too large
View File


+ 2
- 1
pending_code_changes.txt View File

@ -1 +1,2 @@
Code changes:
- Ported ShortNumberInfo to Javascript.

+ 21
- 11
tools/java/java-build/src/com/google/i18n/phonenumbers/BuildMetadataJsonFromXml.java View File

@ -38,7 +38,7 @@ public class BuildMetadataJsonFromXml extends Command {
private static final String HELP_MESSAGE =
"Usage:\n" +
"BuildMetadataJsonFromXml <inputFile> <outputFile> [<liteBuild>]\n" +
"BuildMetadataJsonFromXml <inputFile> <outputFile> [<liteBuild>] [<namespace>]\n" +
"\n" +
"where:\n" +
" inputFile The input file containing phone number metadata in XML format.\n" +
@ -46,9 +46,11 @@ public class BuildMetadataJsonFromXml extends Command {
" liteBuild Whether to generate the lite-version of the metadata (default:\n" +
" false). When set to true certain metadata will be omitted.\n" +
" At this moment, example numbers information is omitted.\n" +
" namespace If present, the namespace to provide the metadata with (default:\n" +
" " + NAMESPACE + ").\n" +
"\n" +
"Example command line invocation:\n" +
"BuildMetadataJsonFromXml PhoneNumberMetadata.xml metadatalite.js true\n";
"BuildMetadataJsonFromXml PhoneNumberMetadata.xml metadatalite.js true i18n.phonenumbers.testmetadata\n";
private static final String FILE_OVERVIEW =
"/**\n"
@ -83,17 +85,22 @@ public class BuildMetadataJsonFromXml extends Command {
public boolean start() {
String[] args = getArgs();
if (args.length != 3 && args.length != 4) {
if (args.length != 3 && args.length != 4 && args.length != 5) {
System.err.println(HELP_MESSAGE);
return false;
}
String inputFile = args[1];
String outputFile = args[2];
boolean liteBuild = args.length > 3 && args[3].equals("true");
return start(inputFile, outputFile, liteBuild);
String namespace = args.length > 4 ? args[4] : NAMESPACE;
return start(inputFile, outputFile, liteBuild, namespace);
}
static boolean start(String inputFile, String outputFile, boolean liteBuild) {
return start(inputFile, outputFile, liteBuild, NAMESPACE);
}
static boolean start(String inputFile, String outputFile, boolean liteBuild, String namespace) {
try {
PhoneMetadataCollection metadataCollection =
BuildMetadataFromXml.buildPhoneMetadataCollection(inputFile, liteBuild, false);
@ -106,15 +113,15 @@ public class BuildMetadataJsonFromXml extends Command {
Formatter formatter = new Formatter(writer);
formatter.format(FILE_OVERVIEW, inputFile);
writer.write("goog.provide('" + NAMESPACE + "');\n\n");
writer.write("goog.provide('" + namespace + "');\n\n");
writer.write(COUNTRY_CODE_TO_REGION_CODE_MAP_COMMENT);
writer.write(NAMESPACE + ".countryCodeToRegionCodeMap = ");
writer.write(namespace + ".countryCodeToRegionCodeMap = ");
writeCountryCodeToRegionCodeMap(countryCodeToRegionCodeMap, writer);
writer.write(";\n\n");
writer.write(COUNTRY_TO_METADATA_COMMENT);
writer.write(NAMESPACE + ".countryToMetadata = ");
writer.write(namespace + ".countryToMetadata = ");
writeCountryToMetadataMap(metadataCollection, writer);
writer.write(";\n");
@ -408,14 +415,17 @@ public class BuildMetadataJsonFromXml extends Command {
toJsArray(metadata.getEmergency(), jsArrayBuilder);
// optional PhoneNumberDesc voicemail = 28;
toJsArray(metadata.getVoicemail(), jsArrayBuilder);
// Fields 29-31 are omitted due to space increase.
// optional PhoneNumberDesc short_code = 29;
toJsArray(metadata.getShortCode(), jsArrayBuilder);
// optional PhoneNumberDesc standard_rate = 30;
toJsArray(metadata.getStandardRate(), jsArrayBuilder);
// optional PhoneNumberDesc carrier_specific = 31;
toJsArray(metadata.getCarrierSpecific(), jsArrayBuilder);
// optional bool mobile_number_portable_region = 32 [default=false];
// Omit since the JS API doesn't expose this data.
// Note: Need to add null for each of the above fields when a subsequent
// field is being populated.
// left as null because this data is not used in the current JS API's.
jsArrayBuilder.append(null);
// optional PhoneNumberDesc sms_services = 33;
toJsArray(metadata.getSmsServices(), jsArrayBuilder);
jsArrayBuilder.endArray();
}


BIN
tools/java/java-build/target/java-build-1.0-SNAPSHOT-jar-with-dependencies.jar View File


+ 2
- 1
tools/java/java-build/test/com/google/i18n/phonenumbers/BuildMetadataJsonFromXmlGoldenTest.java View File

@ -28,13 +28,14 @@ import junit.framework.TestCase;
public final class BuildMetadataJsonFromXmlGoldenTest extends TestCase {
private static final String INPUT_FILE_NAME = "PhoneNumberMetadataForGoldenTests.xml";
private static final String GOLDEN_FILE_NAME = "expected_metadata.js";
public void testBuildMetadataJsonFromXmlGolden() throws Exception {
File srcDir = new File("target/test-classes/com/google/i18n/phonenumbers/buildtools/testdata");
File inputXml = new File(srcDir, INPUT_FILE_NAME);
File outputFile = File.createTempFile("testOutput", "");
outputFile.deleteOnExit();
File golden = new File(srcDir, "expected_metadata.js");
File golden = new File(srcDir, GOLDEN_FILE_NAME);
BuildMetadataJsonFromXml.start(
inputXml.getAbsolutePath(), outputFile.getAbsolutePath(), false /* not liteBuild */);


+ 60
- 0
tools/java/java-build/test/com/google/i18n/phonenumbers/BuildShortNumberMetadataJsonFromXmlGoldenTest.java View File

@ -0,0 +1,60 @@
/*
* Copyright (C) 2018 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.i18n.phonenumbers;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import junit.framework.TestCase;
/**
* Tests for the output of the JSON metadata producer.
*/
public final class BuildShortNumberMetadataJsonFromXmlGoldenTest extends TestCase {
private static final String INPUT_FILE_NAME = "ShortNumberMetadataForGoldenTests.xml";
private static final String GOLDEN_FILE_NAME = "expected_shortnumbermetadata.js";
public void testBuildMetadataJsonFromXmlGolden() throws Exception {
File srcDir = new File("target/test-classes/com/google/i18n/phonenumbers/buildtools/testdata");
File inputXml = new File(srcDir, INPUT_FILE_NAME);
File outputFile = File.createTempFile("testOutput", "");
outputFile.deleteOnExit();
File golden = new File(srcDir, GOLDEN_FILE_NAME);
BuildMetadataJsonFromXml.start(
inputXml.getAbsolutePath(), outputFile.getAbsolutePath(), false /* not liteBuild */,
"i18n.phonenumbers.shortnumbergoldenmetadata" /* namespace */);
BufferedReader outputReader =
new BufferedReader(new InputStreamReader(new FileInputStream(outputFile), "UTF-8"));
BufferedReader goldenReader =
new BufferedReader(new InputStreamReader(new FileInputStream(golden), "UTF-8"));
while (outputReader.ready() && goldenReader.ready()) {
String goldenLine = goldenReader.readLine();
if (goldenLine.contains("ShortNumberMetadata.xml")) {
// The full path of the input file is contained in the output and these lines will be
// different, so we just check the output file name is present and continue.
assertTrue(outputReader.readLine().contains(INPUT_FILE_NAME));
continue;
}
assertEquals(outputReader.readLine(), goldenLine);
}
// Check the files are the same size.
assertEquals(outputReader.ready(), goldenReader.ready());
}
}

+ 117
- 0
tools/java/java-build/test/com/google/i18n/phonenumbers/buildtools/testdata/ShortNumberMetadataForGoldenTests.xml View File

@ -0,0 +1,117 @@
<phoneNumberMetadata>
<territories>
<!-- Ascension Island -->
<!-- www.itu.int/oth/T02020000AF -->
<territory id="AC">
<generalDesc>
<nationalNumberPattern>9\d{2}</nationalNumberPattern>
</generalDesc>
<shortCode>
<nationalNumberPattern>911</nationalNumberPattern>
<possibleLengths national="3"/>
<exampleNumber>911</exampleNumber>
</shortCode>
<emergency>
<!-- http://studentsabroad.state.gov/content/pdfs/911_ABROAD.pdf
http://www.noonsite.com/Countries/AscensionIsland/?rc=GeneralInfo
Note the 4-digit emergency numbers fit the fixed-line pattern, therefore are not
included. This is consistent with how we handle such numbers in other countries. -->
<nationalNumberPattern>911</nationalNumberPattern>
<possibleLengths national="3"/>
<exampleNumber>911</exampleNumber>
</emergency>
</territory>
<!-- Argentina -->
<!-- http://www.itu.int/oth/T0202000009/en -->
<!-- http://en.wikipedia.org/wiki/Telephone_numbers_in_Argentina#Public_utility_numbers -->
<territory id="AR">
<generalDesc>
<nationalNumberPattern>[01389]\d{1,4}</nationalNumberPattern>
</generalDesc>
<shortCode>
<nationalNumberPattern>
000|
1(?:
0[0-35-7]|
1[02-5]|
2[15]|
9
)|
3372|
89338|
911
</nationalNumberPattern>
<possibleLengths national="[2-5]"/>
<exampleNumber>121</exampleNumber>
</shortCode>
<tollFree>
<!-- According to http://wikitravel.org/en/Argentina all 2 and 3 digit numbers are free,
except for 113. -->
<nationalNumberPattern>
[09]\d{2}|
1(?:
[02-9]\d?|
1[0-24-9]?
)
</nationalNumberPattern>
<possibleLengths national="2,3"/>
<exampleNumber>111</exampleNumber>
</tollFree>
<!-- 911 is only available in select cities. Since it's not available everywhere
and is location specific adding this number here. -->
<carrierSpecific>
<!-- https://support.twitter.com/articles/20170024 -->
<nationalNumberPattern>
89338|
911
</nationalNumberPattern>
<possibleLengths national="3,5"/>
<exampleNumber>89338</exampleNumber>
</carrierSpecific>
<emergency>
<!-- http://en.wikipedia.org/wiki/Telephone_numbers_in_Argentina#Public_utility_numbers -->
<!-- 911 is only available in some places. -->
<nationalNumberPattern>
10[017]|
911
</nationalNumberPattern>
<possibleLengths national="3"/>
<exampleNumber>101</exampleNumber>
</emergency>
<expandedEmergency>
<nationalNumberPattern>10[356]</nationalNumberPattern>
<possibleLengths national="3"/>
<exampleNumber>103</exampleNumber>
</expandedEmergency>
<smsServices>
<!-- https://support.twitter.com/articles/20170024 -->
<nationalNumberPattern>
3372|
89338
</nationalNumberPattern>
<possibleLengths national="4,5"/>
<exampleNumber>3372</exampleNumber>
</smsServices>
</territory>
<!-- Guam -->
<!-- http://www.nationalnanpa.com/nas/public/assigned_code_query_step1.do?method=resetCodeQueryModel -->
<territory id="GU">
<generalDesc>
<nationalNumberPattern>9\d{2}</nationalNumberPattern>
</generalDesc>
<shortCode>
<nationalNumberPattern>911</nationalNumberPattern>
<possibleLengths national="3"/>
<exampleNumber>911</exampleNumber>
</shortCode>
<emergency>
<!-- http://www.justice.gov.gu/compileroflaws/gca/10gca/10gc084.PDF -->
<nationalNumberPattern>911</nationalNumberPattern>
<possibleLengths national="3"/>
<exampleNumber>911</exampleNumber>
</emergency>
</territory>
</territories>
</phoneNumberMetadata>

+ 88
- 0
tools/java/java-build/test/com/google/i18n/phonenumbers/buildtools/testdata/expected_shortnumbermetadata.js View File

@ -0,0 +1,88 @@
/**
* @license
* Copyright (C) 2010 The Libphonenumber Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Generated metadata for file
* googledata/third_party/i18n/phonenumbers/ShortNumberMetadata.xml
* @author Nikolaos Trogkanis
*/
goog.provide('i18n.phonenumbers.shortnumbergoldenmetadata');
/**
* A mapping from a country calling code to the region codes which denote the
* region represented by that country calling code. In the case of multiple
* countries sharing a calling code, such as the NANPA regions, the one
* indicated with "isMainCountryForCode" in the metadata should be first.
* @type {!Object.<number, Array.<string>>}
*/
i18n.phonenumbers.shortnumbergoldenmetadata.countryCodeToRegionCodeMap = {
0:["AC","AR","GU"]
};
/**
* A mapping from a region code to the PhoneMetadata for that region.
* @type {!Object.<string, Array>}
*/
i18n.phonenumbers.shortnumbergoldenmetadata.countryToMetadata = {
"AC":[,[,,"9\\d{2}",,,,,,,[3]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,,"AC",,,,,,,,,,,,,,,,,,[,,"911",,,,"911"]
,,[,,"911",,,,"911"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
,"AR":[,[,,"[01389]\\d{1,4}",,,,,,,[2,3,4,5]
]
,,,[,,"[09]\\d{2}|1(?:[02-9]\\d?|1[0-24-9]?)",,,,"111",,,[2,3]
]
,[,,,,,,,,,[-1]
]
,,,,"AR",,,,,,,,,,,,,,,,,,[,,"10[017]|911",,,,"101",,,[3]
]
,,[,,"000|1(?:0[0-35-7]|1[02-5]|2[15]|9)|3372|89338|911",,,,"121"]
,[,,,,,,,,,[-1]
]
,[,,"89338|911",,,,"89338",,,[3,5]
]
,,[,,"3372|89338",,,,"3372",,,[4,5]
]
]
,"GU":[,[,,"9\\d{2}",,,,,,,[3]
]
,,,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,,,"GU",,,,,,,,,,,,,,,,,,[,,"911",,,,"911"]
,,[,,"911",,,,"911"]
,[,,,,,,,,,[-1]
]
,[,,,,,,,,,[-1]
]
,,[,,,,,,,,,[-1]
]
]
};

Loading…
Cancel
Save