1// Copyright (C) 2013 Google Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// The data in this file is automatically generated.
16
17#include "region_data_constants.h"
18
19#include <libaddressinput/address_field.h>
20#include <libaddressinput/util/basictypes.h>
21
22#include <algorithm>
23#include <cstddef>
24#include <map>
25#include <set>
26#include <string>
27#include <utility>
28#include <vector>
29
30#include "address_field_util.h"
31#include "format_element.h"
32#include "lookup_key.h"
33
34namespace i18n {
35namespace addressinput {
36
37// ---- BEGIN AUTOGENERATED CODE ----
38namespace {
39
40std::map<std::string, std::string> InitRegionData() {
41  std::map<std::string, std::string> region_data;
42  region_data.insert(std::make_pair("AC", "{"
43      "\"zipex\":\"ASCN 1ZZ\","
44      "\"languages\":\"en\""
45      "}"));
46  region_data.insert(std::make_pair("AD", "{"
47      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
48      "\"require\":\"A\","
49      "\"zipex\":\"AD100,AD501,AD700\","
50      "\"posturl\":\"http://www.correos.es/comun/CodigosPostales/1010_s-CodPostal.asp\?Provincia=\","
51      "\"languages\":\"ca\""
52      "}"));
53  region_data.insert(std::make_pair("AE", "{"
54      "\"fmt\":\"%N%n%O%n%A%n%C\","
55      "\"require\":\"AC\","
56      "\"languages\":\"ar\""
57      "}"));
58  region_data.insert(std::make_pair("AF", "{"
59      "\"zipex\":\"1001,2601,3801\","
60      "\"posturl\":\"http://afghanpost.gov.af/Postal%20Code/\","
61      "\"languages\":\"fa~ps\""
62      "}"));
63  region_data.insert(std::make_pair("AG", "{"
64      "\"require\":\"A\","
65      "\"languages\":\"en\""
66      "}"));
67  region_data.insert(std::make_pair("AI", "{"
68      "\"zipex\":\"2640\","
69      "\"languages\":\"en\""
70      "}"));
71  region_data.insert(std::make_pair("AL", "{"
72      "\"zipex\":\"1001,1017,3501\","
73      "\"languages\":\"sq\""
74      "}"));
75  region_data.insert(std::make_pair("AM", "{"
76      "\"fmt\":\"%N%n%O%n%A%n%Z%n%C%n%S\","
77      "\"lfmt\":\"%N%n%O%n%A%n%Z%n%C%n%S\","
78      "\"zipex\":\"375010,0002,0010\","
79      "\"languages\":\"hy\""
80      "}"));
81  region_data.insert(std::make_pair("AO", "{"
82      "\"languages\":\"pt\""
83      "}"));
84  region_data.insert(std::make_pair("AQ", "{"
85      "\"languages\":\"\""
86      "}"));
87  region_data.insert(std::make_pair("AR", "{"
88      "\"fmt\":\"%N%n%O%n%A%n%Z %C%n%S\","
89      "\"state_name_type\":\"state\","
90      "\"zipex\":\"C1070AAM,C1000WAM,B1000TBU,X5187XAB\","
91      "\"posturl\":\"http://www.correoargentino.com.ar/formularios/cpa\","
92      "\"languages\":\"es\""
93      "}"));
94  region_data.insert(std::make_pair("AS", "{"
95      "\"fmt\":\"%N%n%O%n%A%n%C %S %Z\","
96      "\"require\":\"ACSZ\","
97      "\"zip_name_type\":\"zip\","
98      "\"state_name_type\":\"state\","
99      "\"zipex\":\"96799\","
100      "\"posturl\":\"http://zip4.usps.com/zip4/welcome.jsp\","
101      "\"languages\":\"sm~en\""
102      "}"));
103  region_data.insert(std::make_pair("AT", "{"
104      "\"fmt\":\"%O%n%N%n%A%n%Z %C\","
105      "\"require\":\"ACZ\","
106      "\"zipex\":\"1010,3741\","
107      "\"posturl\":\"http://www.post.at/post_subsite_postleitzahlfinder.php\","
108      "\"languages\":\"de\""
109      "}"));
110  region_data.insert(std::make_pair("AU", "{"
111      "\"fmt\":\"%O%n%N%n%A%n%C %S %Z\","
112      "\"require\":\"ACSZ\","
113      "\"state_name_type\":\"state\","
114      "\"zipex\":\"2060,3171,6430,4000,4006,3001\","
115      "\"posturl\":\"http://www1.auspost.com.au/postcodes/\","
116      "\"languages\":\"en\""
117      "}"));
118  region_data.insert(std::make_pair("AW", "{"
119      "\"languages\":\"nl~pap\""
120      "}"));
121  region_data.insert(std::make_pair("AX", "{"
122      "\"fmt\":\"%O%n%N%n%A%nAX-%Z %C%n\\u00c5LAND\","
123      "\"require\":\"ACZ\","
124      "\"zipex\":\"22150,22550,22240,22710,22270,22730,22430\","
125      "\"posturl\":\"http://www.posten.ax/department.con\?iPage=123\","
126      "\"languages\":\"sv\""
127      "}"));
128  region_data.insert(std::make_pair("AZ", "{"
129      "\"fmt\":\"%N%n%O%n%A%nAZ %Z %C\","
130      "\"zipex\":\"1000\","
131      "\"languages\":\"az-Latn~az-Cyrl\""
132      "}"));
133  region_data.insert(std::make_pair("BA", "{"
134      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
135      "\"zipex\":\"71000\","
136      "\"posturl\":\"http://www.post.ba/postanski_brojevi.php\","
137      "\"languages\":\"bs-Cyrl~bs-Latn~hr~sr-Cyrl~sr-Latn\""
138      "}"));
139  region_data.insert(std::make_pair("BB", "{"
140      "\"state_name_type\":\"parish\","
141      "\"zipex\":\"BB23026,BB22025\","
142      "\"posturl\":\"http://barbadospostal.com/zipcodes.html\","
143      "\"languages\":\"en\""
144      "}"));
145  region_data.insert(std::make_pair("BD", "{"
146      "\"fmt\":\"%N%n%O%n%A%n%C - %Z\","
147      "\"zipex\":\"1340,1000\","
148      "\"posturl\":\"http://www.bangladeshpost.gov.bd/PostCode.asp\","
149      "\"languages\":\"bn\""
150      "}"));
151  region_data.insert(std::make_pair("BE", "{"
152      "\"fmt\":\"%O%n%N%n%A%n%Z %C\","
153      "\"require\":\"ACZ\","
154      "\"zipex\":\"4000,1000\","
155      "\"posturl\":\"http://www.post.be/site/nl/residential/customerservice/search/postal_codes.html\","
156      "\"languages\":\"nl~fr~de\""
157      "}"));
158  region_data.insert(std::make_pair("BF", "{"
159      "\"fmt\":\"%N%n%O%n%A%n%C %X\","
160      "\"languages\":\"fr\""
161      "}"));
162  region_data.insert(std::make_pair("BG", "{"
163      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
164      "\"zipex\":\"1000,1700\","
165      "\"posturl\":\"http://www.bgpost.bg/\?cid=5\","
166      "\"languages\":\"bg\""
167      "}"));
168  region_data.insert(std::make_pair("BH", "{"
169      "\"fmt\":\"%N%n%O%n%A%n%C %Z\","
170      "\"zipex\":\"317\","
171      "\"languages\":\"ar\""
172      "}"));
173  region_data.insert(std::make_pair("BI", "{"
174      "\"languages\":\"rn~fr\""
175      "}"));
176  region_data.insert(std::make_pair("BJ", "{"
177      "\"languages\":\"fr\""
178      "}"));
179  region_data.insert(std::make_pair("BL", "{"
180      "\"fmt\":\"%O%n%N%n%A%n%Z %C %X\","
181      "\"require\":\"ACZ\","
182      "\"zipex\":\"97100\","
183      "\"posturl\":\"http://www.laposte.fr/Particulier/Utiliser-nos-outils-pratiques/Outils-et-documents/Trouvez-un-code-postal\","
184      "\"languages\":\"fr\""
185      "}"));
186  region_data.insert(std::make_pair("BM", "{"
187      "\"fmt\":\"%N%n%O%n%A%n%C %Z\","
188      "\"zipex\":\"FL 07,HM GX,HM 12\","
189      "\"posturl\":\"http://www.landvaluation.bm/\","
190      "\"languages\":\"en\""
191      "}"));
192  region_data.insert(std::make_pair("BN", "{"
193      "\"fmt\":\"%N%n%O%n%A%n%C %Z\","
194      "\"zipex\":\"BT2328,KA1131,BA1511\","
195      "\"posturl\":\"http://www.post.gov.bn/index.php/extensions/postcode-guide\","
196      "\"languages\":\"ms-Latn~ms-Arab\""
197      "}"));
198  region_data.insert(std::make_pair("BO", "{"
199      "\"languages\":\"es~qu~ay\""
200      "}"));
201  region_data.insert(std::make_pair("BR", "{"
202      "\"fmt\":\"%O%n%N%n%A%n%C-%S%n%Z\","
203      "\"require\":\"ASCZ\","
204      "\"state_name_type\":\"state\","
205      "\"zipex\":\"40301-110,70002-900\","
206      "\"posturl\":\"http://www.correios.com.br/servicos/cep/cep_default.cfm\","
207      "\"languages\":\"pt\""
208      "}"));
209  region_data.insert(std::make_pair("BS", "{"
210      "\"fmt\":\"%N%n%O%n%A%n%C, %S\","
211      "\"state_name_type\":\"island\","
212      "\"languages\":\"en\""
213      "}"));
214  region_data.insert(std::make_pair("BT", "{"
215      "\"zipex\":\"11001,31101,35003\","
216      "\"posturl\":\"http://www.bhutanpost.com.bt/postcode/postcode.php\","
217      "\"languages\":\"dz\""
218      "}"));
219  region_data.insert(std::make_pair("BV", "{"
220      "\"languages\":\"\""
221      "}"));
222  region_data.insert(std::make_pair("BW", "{"
223      "\"languages\":\"en~tn\""
224      "}"));
225  region_data.insert(std::make_pair("BY", "{"
226      "\"fmt\":\"%S%n%Z %C %X%n%A%n%O%n%N\","
227      "\"zipex\":\"20050,223016,225860,220050\","
228      "\"posturl\":\"http://zip.belpost.by\","
229      "\"languages\":\"be~ru\""
230      "}"));
231  region_data.insert(std::make_pair("BZ", "{"
232      "\"languages\":\"en\""
233      "}"));
234  region_data.insert(std::make_pair("CA", "{"
235      "\"fmt\":\"%N%n%O%n%A%n%C %S %Z\","
236      "\"require\":\"ACSZ\","
237      "\"zipex\":\"H3Z 2Y7,V8X 3X4,T0L 1K0,T0H 1A0,K1A 0B1\","
238      "\"posturl\":\"http://www.canadapost.ca/cpotools/apps/fpc/personal/findByCity\?execution=e2s1\","
239      "\"languages\":\"en~fr\""
240      "}"));
241  region_data.insert(std::make_pair("CC", "{"
242      "\"fmt\":\"%O%n%N%n%A%n%C %S %Z\","
243      "\"languages\":\"en\""
244      "}"));
245  region_data.insert(std::make_pair("CD", "{"
246      "\"fmt\":\"%N%n%O%n%A%n%C %X\","
247      "\"languages\":\"fr\""
248      "}"));
249  region_data.insert(std::make_pair("CF", "{"
250      "\"languages\":\"fr~sg\""
251      "}"));
252  region_data.insert(std::make_pair("CG", "{"
253      "\"languages\":\"fr~ln\""
254      "}"));
255  region_data.insert(std::make_pair("CH", "{"
256      "\"fmt\":\"%O%n%N%n%A%nCH-%Z %C\","
257      "\"require\":\"ACZ\","
258      "\"zipex\":\"2544,1211,1556,3030\","
259      "\"posturl\":\"http://www.post.ch/db/owa/pv_plz_pack/pr_main\","
260      "\"languages\":\"de~fr~it\""
261      "}"));
262  region_data.insert(std::make_pair("CI", "{"
263      "\"fmt\":\"%N%n%O%n%X %A %C %X\","
264      "\"languages\":\"fr\""
265      "}"));
266  region_data.insert(std::make_pair("CK", "{"
267      "\"fmt\":\"%N%n%O%n%A%n%C %Z\","
268      "\"languages\":\"en\""
269      "}"));
270  region_data.insert(std::make_pair("CL", "{"
271      "\"fmt\":\"%N%n%O%n%A%n%Z %C%n%S\","
272      "\"state_name_type\":\"state\","
273      "\"zipex\":\"8340457,8720019,1230000,8329100\","
274      "\"posturl\":\"http://www.correos.cl/SitePages/home.aspx\","
275      "\"languages\":\"es\""
276      "}"));
277  region_data.insert(std::make_pair("CM", "{"
278      "\"languages\":\"fr~en\""
279      "}"));
280  region_data.insert(std::make_pair("CN", "{"
281      "\"fmt\":\"%Z%n%S%C%D%n%A%n%O%n%N\","
282      "\"lfmt\":\"%N%n%O%n%A%n%D%n%C%n%S, %Z\","
283      "\"require\":\"ACSZ\","
284      "\"zipex\":\"266033,317204,100096,100808\","
285      "\"posturl\":\"http://www.cpdc.com.cn/postcdQueryAction.do\?reqCode=gotoQueryPostAddr\","
286      "\"languages\":\"zh-Hans\""
287      "}"));
288  region_data.insert(std::make_pair("CO", "{"
289      "\"fmt\":\"%N%n%O%n%A%n%C, %S\","
290      "\"zipex\":\"111221,130001,760011\","
291      "\"posturl\":\"http://www.codigopostal4-72.com.co/codigosPostales/\","
292      "\"languages\":\"es\""
293      "}"));
294  region_data.insert(std::make_pair("CR", "{"
295      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
296      "\"zipex\":\"1000,2010,1001\","
297      "\"posturl\":\"https://www.correos.go.cr/nosotros/codigopostal/busqueda.html\","
298      "\"languages\":\"es\""
299      "}"));
300  region_data.insert(std::make_pair("CV", "{"
301      "\"fmt\":\"%N%n%O%n%A%n%Z %C%n%S\","
302      "\"state_name_type\":\"island\","
303      "\"zipex\":\"7600\","
304      "\"languages\":\"pt\""
305      "}"));
306  region_data.insert(std::make_pair("CX", "{"
307      "\"fmt\":\"%O%n%N%n%A%n%C %S %Z\","
308      "\"languages\":\"en\""
309      "}"));
310  region_data.insert(std::make_pair("CY", "{"
311      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
312      "\"zipex\":\"2008,3304,1900\","
313      "\"languages\":\"el~tr\""
314      "}"));
315  region_data.insert(std::make_pair("CZ", "{"
316      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
317      "\"zipex\":\"100 00,251 66,530 87,110 00,225 99\","
318      "\"posturl\":\"http://psc.ceskaposta.cz/CleanForm.action\","
319      "\"languages\":\"cs\""
320      "}"));
321  region_data.insert(std::make_pair("DE", "{"
322      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
323      "\"require\":\"ACZ\","
324      "\"zipex\":\"26133,53225\","
325      "\"posturl\":\"http://www.postdirekt.de/plzserver/\","
326      "\"languages\":\"de\""
327      "}"));
328  region_data.insert(std::make_pair("DJ", "{"
329      "\"languages\":\"ar~fr\""
330      "}"));
331  region_data.insert(std::make_pair("DK", "{"
332      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
333      "\"require\":\"ACZ\","
334      "\"zipex\":\"8660,1566\","
335      "\"posturl\":\"http://www.postdanmark.dk/da/Privat/Kundeservice/postnummerkort/Sider/Find-postnummer.aspx\","
336      "\"languages\":\"da\""
337      "}"));
338  region_data.insert(std::make_pair("DM", "{"
339      "\"languages\":\"en\""
340      "}"));
341  region_data.insert(std::make_pair("DO", "{"
342      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
343      "\"zipex\":\"11903,10101\","
344      "\"posturl\":\"http://inposdom.gob.do/servicios/codigo-postal.html#buscar_codigo\","
345      "\"languages\":\"es\""
346      "}"));
347  region_data.insert(std::make_pair("DZ", "{"
348      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
349      "\"zipex\":\"40304,16027\","
350      "\"languages\":\"ar~fr\""
351      "}"));
352  region_data.insert(std::make_pair("EC", "{"
353      "\"fmt\":\"%N%n%O%n%A%n%Z%n%C\","
354      "\"zipex\":\"EC090112,090105,H0103C,P0133B,P0133A,P0133V\","
355      "\"languages\":\"es\""
356      "}"));
357  region_data.insert(std::make_pair("EE", "{"
358      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
359      "\"zipex\":\"69501,11212,1001\","
360      "\"posturl\":\"http://www.post.ee/\?op=sihtnumbriotsing\","
361      "\"languages\":\"et\""
362      "}"));
363  region_data.insert(std::make_pair("EG", "{"
364      "\"fmt\":\"%N%n%O%n%A%n%C%n%S%n%Z\","
365      "\"lfmt\":\"%N%n%O%n%A%n%C%n%S%n%Z\","
366      "\"zipex\":\"12411,11599\","
367      "\"languages\":\"ar\""
368      "}"));
369  region_data.insert(std::make_pair("EH", "{"
370      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
371      "\"zipex\":\"70000,72000\","
372      "\"languages\":\"ar\""
373      "}"));
374  region_data.insert(std::make_pair("ER", "{"
375      "\"languages\":\"ti~en~ar\""
376      "}"));
377  region_data.insert(std::make_pair("ES", "{"
378      "\"fmt\":\"%N%n%O%n%A%n%Z %C %S\","
379      "\"require\":\"ACSZ\","
380      "\"zipex\":\"28039,28300,28070\","
381      "\"posturl\":\"http://www.correos.es/contenido/13-MenuRec2/04-MenuRec24/1010_s-CodPostal.asp\","
382      "\"languages\":\"es\""
383      "}"));
384  region_data.insert(std::make_pair("ET", "{"
385      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
386      "\"zipex\":\"1000\","
387      "\"languages\":\"am\""
388      "}"));
389  region_data.insert(std::make_pair("FI", "{"
390      "\"fmt\":\"%O%n%N%n%A%nFI-%Z %C\","
391      "\"require\":\"ACZ\","
392      "\"zipex\":\"00550,00011\","
393      "\"posturl\":\"http://www.verkkoposti.com/e3/postinumeroluettelo\","
394      "\"languages\":\"fi~sv\""
395      "}"));
396  region_data.insert(std::make_pair("FJ", "{"
397      "\"languages\":\"en~fj\""
398      "}"));
399  region_data.insert(std::make_pair("FK", "{"
400      "\"fmt\":\"%N%n%O%n%A%n%X%n%C%n%Z\","
401      "\"require\":\"ACZ\","
402      "\"zipex\":\"FIQQ 1ZZ\","
403      "\"languages\":\"en\""
404      "}"));
405  region_data.insert(std::make_pair("FM", "{"
406      "\"fmt\":\"%N%n%O%n%A%n%C %S %Z\","
407      "\"require\":\"ACSZ\","
408      "\"zip_name_type\":\"zip\","
409      "\"state_name_type\":\"state\","
410      "\"zipex\":\"96941,96944\","
411      "\"posturl\":\"http://zip4.usps.com/zip4/welcome.jsp\","
412      "\"languages\":\"chk~pon~kos~yap~en~uli\""
413      "}"));
414  region_data.insert(std::make_pair("FO", "{"
415      "\"fmt\":\"%N%n%O%n%A%nFO%Z %C\","
416      "\"zipex\":\"100\","
417      "\"posturl\":\"http://www.postur.fo/\","
418      "\"languages\":\"fo\""
419      "}"));
420  region_data.insert(std::make_pair("FR", "{"
421      "\"fmt\":\"%O%n%N%n%A%n%Z %C %X\","
422      "\"require\":\"ACZ\","
423      "\"zipex\":\"33380,34092,33506\","
424      "\"posturl\":\"http://www.laposte.fr/Particulier/Utiliser-nos-outils-pratiques/Outils-et-documents/Trouvez-un-code-postal\","
425      "\"languages\":\"fr\""
426      "}"));
427  region_data.insert(std::make_pair("GA", "{"
428      "\"languages\":\"fr\""
429      "}"));
430  region_data.insert(std::make_pair("GB", "{"
431      "\"fmt\":\"%N%n%O%n%A%n%C%n%S%n%Z\","
432      "\"require\":\"ACZ\","
433      "\"state_name_type\":\"county\","
434      "\"zipex\":\"EC1Y 8SY,GIR 0AA,M2 5BQ,M34 4AB,CR0 2YR,DN16 9AA,W1A 4ZZ,EC1A 1HQ,OX14 4PG,BS18 8HF,NR25 7HG,RH6 OHP,BH23 6AA,B6 5BA,RH6 0HP,SO23 9AP,PO1 3AX,BFPO 61\","
435      "\"posturl\":\"http://www.royalmail.com/postcode-finder\","
436      "\"languages\":\"en\""
437      "}"));
438  region_data.insert(std::make_pair("GD", "{"
439      "\"languages\":\"en\""
440      "}"));
441  region_data.insert(std::make_pair("GE", "{"
442      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
443      "\"zipex\":\"0101\","
444      "\"posturl\":\"http://www.georgianpost.ge/index.php\?page=10\","
445      "\"languages\":\"ka\""
446      "}"));
447  region_data.insert(std::make_pair("GF", "{"
448      "\"fmt\":\"%O%n%N%n%A%n%Z %C %X\","
449      "\"require\":\"ACZ\","
450      "\"zipex\":\"97300\","
451      "\"posturl\":\"http://www.laposte.fr/Particulier/Utiliser-nos-outils-pratiques/Outils-et-documents/Trouvez-un-code-postal\","
452      "\"languages\":\"fr\""
453      "}"));
454  region_data.insert(std::make_pair("GG", "{"
455      "\"fmt\":\"%N%n%O%n%A%n%X%n%C%nGUERNSEY%n%Z\","
456      "\"require\":\"ACZ\","
457      "\"zipex\":\"GY1 1AA,GY2 2BT\","
458      "\"posturl\":\"http://www.guernseypost.com/postcode_finder/\","
459      "\"languages\":\"en\""
460      "}"));
461  region_data.insert(std::make_pair("GH", "{"
462      "\"languages\":\"en\""
463      "}"));
464  region_data.insert(std::make_pair("GI", "{"
465      "\"fmt\":\"%N%n%O%n%A\","
466      "\"require\":\"A\","
467      "\"zipex\":\"GX11 1AA\","
468      "\"languages\":\"en\""
469      "}"));
470  region_data.insert(std::make_pair("GL", "{"
471      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
472      "\"require\":\"ACZ\","
473      "\"zipex\":\"3900,3950,3911\","
474      "\"languages\":\"kl~da\""
475      "}"));
476  region_data.insert(std::make_pair("GM", "{"
477      "\"languages\":\"en\""
478      "}"));
479  region_data.insert(std::make_pair("GN", "{"
480      "\"fmt\":\"%N%n%O%n%Z %A %C\","
481      "\"zipex\":\"001,200,100\","
482      "\"languages\":\"fr\""
483      "}"));
484  region_data.insert(std::make_pair("GP", "{"
485      "\"fmt\":\"%O%n%N%n%A%n%Z %C %X\","
486      "\"require\":\"ACZ\","
487      "\"zipex\":\"97100\","
488      "\"posturl\":\"http://www.laposte.fr/Particulier/Utiliser-nos-outils-pratiques/Outils-et-documents/Trouvez-un-code-postal\","
489      "\"languages\":\"fr\""
490      "}"));
491  region_data.insert(std::make_pair("GQ", "{"
492      "\"languages\":\"es~fr\""
493      "}"));
494  region_data.insert(std::make_pair("GR", "{"
495      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
496      "\"require\":\"ACZ\","
497      "\"zipex\":\"151 24,151 10,101 88\","
498      "\"posturl\":\"http://www.elta.gr/findapostcode.aspx\","
499      "\"languages\":\"el\""
500      "}"));
501  region_data.insert(std::make_pair("GS", "{"
502      "\"fmt\":\"%N%n%O%n%A%n%X%n%C%n%Z\","
503      "\"require\":\"ACZ\","
504      "\"zipex\":\"SIQQ 1ZZ\","
505      "\"languages\":\"\""
506      "}"));
507  region_data.insert(std::make_pair("GT", "{"
508      "\"fmt\":\"%N%n%O%n%A%n%Z- %C\","
509      "\"zipex\":\"09001,01501\","
510      "\"languages\":\"es\""
511      "}"));
512  region_data.insert(std::make_pair("GU", "{"
513      "\"fmt\":\"%N%n%O%n%A%n%C %S %Z\","
514      "\"require\":\"ACSZ\","
515      "\"zip_name_type\":\"zip\","
516      "\"state_name_type\":\"state\","
517      "\"zipex\":\"96910,96931\","
518      "\"posturl\":\"http://zip4.usps.com/zip4/welcome.jsp\","
519      "\"languages\":\"en~ch\""
520      "}"));
521  region_data.insert(std::make_pair("GW", "{"
522      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
523      "\"zipex\":\"1000,1011\","
524      "\"languages\":\"pt\""
525      "}"));
526  region_data.insert(std::make_pair("GY", "{"
527      "\"languages\":\"en\""
528      "}"));
529  region_data.insert(std::make_pair("HK", "{"
530      "\"fmt\":\"%S%n%A%n%O%n%N\","
531      "\"lfmt\":\"%N%n%O%n%A%n%S\","
532      "\"require\":\"AS\","
533      "\"state_name_type\":\"area\","
534      "\"languages\":\"zh-Hant~en\""
535      "}"));
536  region_data.insert(std::make_pair("HM", "{"
537      "\"fmt\":\"%O%n%N%n%A%n%C %S %Z\","
538      "\"languages\":\"\""
539      "}"));
540  region_data.insert(std::make_pair("HN", "{"
541      "\"fmt\":\"%N%n%O%n%A%n%C, %S%n%Z\","
542      "\"require\":\"ACS\","
543      "\"languages\":\"es\""
544      "}"));
545  region_data.insert(std::make_pair("HR", "{"
546      "\"fmt\":\"%N%n%O%n%A%nHR-%Z %C\","
547      "\"zipex\":\"10000,21001,10002\","
548      "\"posturl\":\"http://www.posta.hr/default.aspx\?pretpum\","
549      "\"languages\":\"hr\""
550      "}"));
551  region_data.insert(std::make_pair("HT", "{"
552      "\"fmt\":\"%N%n%O%n%A%nHT%Z %C %X\","
553      "\"zipex\":\"6120,5310,6110,8510\","
554      "\"languages\":\"ht~fr\""
555      "}"));
556  region_data.insert(std::make_pair("HU", "{"
557      "\"fmt\":\"%N%n%O%n%C%n%A%n%Z\","
558      "\"zipex\":\"1037,2380,1540\","
559      "\"posturl\":\"http://posta.hu/ugyfelszolgalat/iranyitoszam_kereso\","
560      "\"languages\":\"hu\""
561      "}"));
562  region_data.insert(std::make_pair("ID", "{"
563      "\"fmt\":\"%N%n%O%n%A%n%C%n%S %Z\","
564      "\"state_name_type\":\"district\","
565      "\"zipex\":\"40115\","
566      "\"languages\":\"id\""
567      "}"));
568  region_data.insert(std::make_pair("IE", "{"
569      "\"fmt\":\"%N%n%O%n%A%n%C%n%S\","
570      "\"state_name_type\":\"county\","
571      "\"languages\":\"en\""
572      "}"));
573  region_data.insert(std::make_pair("IL", "{"
574      "\"fmt\":\"%N%n%O%n%A%n%C %Z\","
575      "\"zipex\":\"9614303\","
576      "\"posturl\":\"http://www.israelpost.co.il/zipcode.nsf/demozip\?openform\","
577      "\"languages\":\"iw~ar\""
578      "}"));
579  region_data.insert(std::make_pair("IM", "{"
580      "\"fmt\":\"%N%n%O%n%A%n%X%n%C%n%Z\","
581      "\"require\":\"ACZ\","
582      "\"zipex\":\"IM2 1AA,IM99 1PS\","
583      "\"posturl\":\"http://www.gov.im/post/postal/fr_main.asp\","
584      "\"languages\":\"en~gv\""
585      "}"));
586  region_data.insert(std::make_pair("IN", "{"
587      "\"fmt\":\"%N%n%O%n%A%n%C %Z%n%S\","
588      "\"require\":\"ACSZ\","
589      "\"state_name_type\":\"state\","
590      "\"zipex\":\"110034,110001\","
591      "\"posturl\":\"http://www.indiapost.gov.in/pin/pinsearch.aspx\","
592      "\"languages\":\"en\""
593      "}"));
594  region_data.insert(std::make_pair("IO", "{"
595      "\"fmt\":\"%N%n%O%n%A%n%X%n%C%n%Z\","
596      "\"require\":\"ACZ\","
597      "\"zipex\":\"BBND 1ZZ\","
598      "\"languages\":\"en\""
599      "}"));
600  region_data.insert(std::make_pair("IQ", "{"
601      "\"fmt\":\"%O%n%N%n%A%n%C, %S%n%Z\","
602      "\"require\":\"ACS\","
603      "\"languages\":\"ar\""
604      "}"));
605  region_data.insert(std::make_pair("IS", "{"
606      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
607      "\"zipex\":\"320,121,220,110\","
608      "\"posturl\":\"http://www.postur.is/cgi-bin/hsrun.exe/Distributed/vefur/vefur.htx;start=HS_landakort_postnumer\","
609      "\"languages\":\"is\""
610      "}"));
611  region_data.insert(std::make_pair("IT", "{"
612      "\"fmt\":\"%N%n%O%n%A%n%Z %C %S\","
613      "\"require\":\"ACSZ\","
614      "\"zipex\":\"00144,47037,39049\","
615      "\"posturl\":\"http://www.poste.it/online/cercacap/\","
616      "\"languages\":\"it\""
617      "}"));
618  region_data.insert(std::make_pair("JE", "{"
619      "\"fmt\":\"%N%n%O%n%A%n%X%n%C%nJERSEY%n%Z\","
620      "\"require\":\"ACZ\","
621      "\"zipex\":\"JE1 1AA,JE2 2BT\","
622      "\"posturl\":\"http://www.jerseypost.com/tools/postcode-address-finder/\","
623      "\"languages\":\"en\""
624      "}"));
625  region_data.insert(std::make_pair("JM", "{"
626      "\"fmt\":\"%N%n%O%n%A%n%C%n%S %X\","
627      "\"require\":\"ACS\","
628      "\"state_name_type\":\"parish\","
629      "\"languages\":\"en\""
630      "}"));
631  region_data.insert(std::make_pair("JO", "{"
632      "\"fmt\":\"%N%n%O%n%A%n%C %Z\","
633      "\"zipex\":\"11937,11190\","
634      "\"languages\":\"ar\""
635      "}"));
636  region_data.insert(std::make_pair("JP", "{"
637      "\"fmt\":\"\\u3012%Z%n%S%C%n%A%n%O%n%N\","
638      "\"lfmt\":\"%N%n%O%n%A%n%C, %S%n%Z\","
639      "\"require\":\"ACSZ\","
640      "\"state_name_type\":\"prefecture\","
641      "\"zipex\":\"154-0023,350-1106,951-8073,112-0001,208-0032,231-0012\","
642      "\"posturl\":\"http://search.post.japanpost.jp/zipcode/\","
643      "\"languages\":\"ja\""
644      "}"));
645  region_data.insert(std::make_pair("KE", "{"
646      "\"fmt\":\"%N%n%O%n%A%n%C%n%Z\","
647      "\"zipex\":\"20100,00100\","
648      "\"languages\":\"en~sw\""
649      "}"));
650  region_data.insert(std::make_pair("KG", "{"
651      "\"fmt\":\"%Z %C %X%n%A%n%O%n%N\","
652      "\"zipex\":\"720001\","
653      "\"languages\":\"ky-Cyrl~ru\""
654      "}"));
655  region_data.insert(std::make_pair("KH", "{"
656      "\"fmt\":\"%N%n%O%n%A%n%C %Z\","
657      "\"zipex\":\"12203,14206,12000\","
658      "\"languages\":\"km\""
659      "}"));
660  region_data.insert(std::make_pair("KI", "{"
661      "\"fmt\":\"%N%n%O%n%A%n%S%n%C\","
662      "\"state_name_type\":\"island\","
663      "\"languages\":\"en~gil\""
664      "}"));
665  region_data.insert(std::make_pair("KM", "{"
666      "\"languages\":\"ar~fr~zdj\""
667      "}"));
668  region_data.insert(std::make_pair("KN", "{"
669      "\"fmt\":\"%N%n%O%n%A%n%C, %S\","
670      "\"require\":\"ACS\","
671      "\"state_name_type\":\"island\","
672      "\"languages\":\"en\""
673      "}"));
674  region_data.insert(std::make_pair("KR", "{"
675      "\"fmt\":\"%S %C%D%n%A%n%O%n%N%n%Z\","
676      "\"lfmt\":\"%N%n%O%n%A%n%D%n%C%n%S%n%Z\","
677      "\"require\":\"ACSZ\","
678      "\"state_name_type\":\"do_si\","
679      "\"zipex\":\"110-110,699-800\","
680      "\"posturl\":\"http://www.epost.go.kr/search/zipcode/search5.jsp\","
681      "\"languages\":\"ko\""
682      "}"));
683  region_data.insert(std::make_pair("KW", "{"
684      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
685      "\"zipex\":\"54541,54551,54404,13009\","
686      "\"languages\":\"ar\""
687      "}"));
688  region_data.insert(std::make_pair("KY", "{"
689      "\"fmt\":\"%N%n%O%n%A%n%S\","
690      "\"require\":\"AS\","
691      "\"state_name_type\":\"island\","
692      "\"zipex\":\"KY1-1100,KY1-1702,KY2-2101\","
693      "\"posturl\":\"http://www.caymanpost.gov.ky/portal/page\?_pageid=3561,1&_dad=portal&_schema=PORTAL\","
694      "\"languages\":\"en\""
695      "}"));
696  region_data.insert(std::make_pair("KZ", "{"
697      "\"fmt\":\"%Z%n%S%n%C%n%A%n%O%n%N\","
698      "\"zipex\":\"040900,050012\","
699      "\"languages\":\"ru~kk-Cyrl\""
700      "}"));
701  region_data.insert(std::make_pair("LA", "{"
702      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
703      "\"zipex\":\"01160,01000\","
704      "\"languages\":\"lo\""
705      "}"));
706  region_data.insert(std::make_pair("LB", "{"
707      "\"fmt\":\"%N%n%O%n%A%n%C %Z\","
708      "\"zipex\":\"2038 3054,1107 2810,1000\","
709      "\"languages\":\"ar\""
710      "}"));
711  region_data.insert(std::make_pair("LC", "{"
712      "\"languages\":\"en\""
713      "}"));
714  region_data.insert(std::make_pair("LI", "{"
715      "\"fmt\":\"%O%n%N%n%A%nFL-%Z %C\","
716      "\"require\":\"ACZ\","
717      "\"zipex\":\"9496,9491,9490,9485\","
718      "\"posturl\":\"http://www.post.ch/db/owa/pv_plz_pack/pr_main\","
719      "\"languages\":\"de~gsw\""
720      "}"));
721  region_data.insert(std::make_pair("LK", "{"
722      "\"fmt\":\"%N%n%O%n%A%n%C%n%Z\","
723      "\"zipex\":\"20000,00100\","
724      "\"posturl\":\"http://www.slpost.gov.lk/\","
725      "\"languages\":\"si~ta\""
726      "}"));
727  region_data.insert(std::make_pair("LR", "{"
728      "\"fmt\":\"%N%n%O%n%A%n%Z %C %X\","
729      "\"zipex\":\"1000\","
730      "\"languages\":\"en\""
731      "}"));
732  region_data.insert(std::make_pair("LS", "{"
733      "\"fmt\":\"%N%n%O%n%A%n%C %Z\","
734      "\"zipex\":\"100\","
735      "\"languages\":\"st~en\""
736      "}"));
737  region_data.insert(std::make_pair("LT", "{"
738      "\"fmt\":\"%O%n%N%n%A%nLT-%Z %C\","
739      "\"zipex\":\"04340,03500\","
740      "\"posturl\":\"http://www.post.lt/lt/\?id=316\","
741      "\"languages\":\"lt\""
742      "}"));
743  region_data.insert(std::make_pair("LU", "{"
744      "\"fmt\":\"%O%n%N%n%A%nL-%Z %C\","
745      "\"require\":\"ACZ\","
746      "\"zipex\":\"4750,2998\","
747      "\"posturl\":\"http://www.pt.lu/portal/services_en_ligne/recherche_codes_postaux\","
748      "\"languages\":\"fr~lb~de\""
749      "}"));
750  region_data.insert(std::make_pair("LV", "{"
751      "\"fmt\":\"%N%n%O%n%A%n%C, %Z\","
752      "\"zipex\":\"LV-1073,LV-1000\","
753      "\"posturl\":\"http://www.pasts.lv/lv/uzzinas/nodalas/\","
754      "\"languages\":\"lv\""
755      "}"));
756  region_data.insert(std::make_pair("LY", "{"
757      "\"languages\":\"ar\""
758      "}"));
759  region_data.insert(std::make_pair("MA", "{"
760      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
761      "\"zipex\":\"53000,10000,20050,16052\","
762      "\"languages\":\"ar~fr~tzm-Latn\""
763      "}"));
764  region_data.insert(std::make_pair("MC", "{"
765      "\"fmt\":\"%N%n%O%n%A%nMC-%Z %C %X\","
766      "\"zipex\":\"98000,98020,98011,98001\","
767      "\"languages\":\"fr\""
768      "}"));
769  region_data.insert(std::make_pair("MD", "{"
770      "\"fmt\":\"%N%n%O%n%A%nMD-%Z %C\","
771      "\"zipex\":\"2012,2019\","
772      "\"languages\":\"ro\""
773      "}"));
774  region_data.insert(std::make_pair("ME", "{"
775      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
776      "\"zipex\":\"81257,81258,81217,84314,85366\","
777      "\"languages\":\"sr-Latn\""
778      "}"));
779  region_data.insert(std::make_pair("MF", "{"
780      "\"fmt\":\"%O%n%N%n%A%n%Z %C %X\","
781      "\"require\":\"ACZ\","
782      "\"zipex\":\"97100\","
783      "\"posturl\":\"http://www.laposte.fr/Particulier/Utiliser-nos-outils-pratiques/Outils-et-documents/Trouvez-un-code-postal\","
784      "\"languages\":\"fr\""
785      "}"));
786  region_data.insert(std::make_pair("MG", "{"
787      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
788      "\"zipex\":\"501,101\","
789      "\"languages\":\"mg~fr~en\""
790      "}"));
791  region_data.insert(std::make_pair("MH", "{"
792      "\"fmt\":\"%N%n%O%n%A%n%C %S %Z\","
793      "\"require\":\"ACSZ\","
794      "\"zip_name_type\":\"zip\","
795      "\"state_name_type\":\"state\","
796      "\"zipex\":\"96960,96970\","
797      "\"posturl\":\"http://zip4.usps.com/zip4/welcome.jsp\","
798      "\"languages\":\"en~mh\""
799      "}"));
800  region_data.insert(std::make_pair("MK", "{"
801      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
802      "\"zipex\":\"1314,1321,1443,1062\","
803      "\"languages\":\"mk~sq\""
804      "}"));
805  region_data.insert(std::make_pair("ML", "{"
806      "\"languages\":\"fr\""
807      "}"));
808  region_data.insert(std::make_pair("MN", "{"
809      "\"fmt\":\"%N%n%O%n%A%n%S %C-%X%n%Z\","
810      "\"zipex\":\"65030,65270\","
811      "\"posturl\":\"http://www.zipcode.mn/\","
812      "\"languages\":\"mn-Cyrl\""
813      "}"));
814  region_data.insert(std::make_pair("MO", "{"
815      "\"fmt\":\"%A%n%O%n%N\","
816      "\"lfmt\":\"%N%n%O%n%A\","
817      "\"require\":\"A\","
818      "\"languages\":\"zh-Hant~pt\""
819      "}"));
820  region_data.insert(std::make_pair("MP", "{"
821      "\"fmt\":\"%N%n%O%n%A%n%C %S %Z\","
822      "\"require\":\"ACSZ\","
823      "\"zip_name_type\":\"zip\","
824      "\"state_name_type\":\"state\","
825      "\"zipex\":\"96950,96951,96952\","
826      "\"posturl\":\"http://zip4.usps.com/zip4/welcome.jsp\","
827      "\"languages\":\"en\""
828      "}"));
829  region_data.insert(std::make_pair("MQ", "{"
830      "\"fmt\":\"%O%n%N%n%A%n%Z %C %X\","
831      "\"require\":\"ACZ\","
832      "\"zipex\":\"97220\","
833      "\"posturl\":\"http://www.laposte.fr/Particulier/Utiliser-nos-outils-pratiques/Outils-et-documents/Trouvez-un-code-postal\","
834      "\"languages\":\"fr\""
835      "}"));
836  region_data.insert(std::make_pair("MR", "{"
837      "\"languages\":\"ar\""
838      "}"));
839  region_data.insert(std::make_pair("MS", "{"
840      "\"languages\":\"en\""
841      "}"));
842  region_data.insert(std::make_pair("MT", "{"
843      "\"fmt\":\"%N%n%O%n%A%n%C %Z\","
844      "\"zipex\":\"NXR 01,ZTN 05,GPO 01,BZN 1130,SPB 6031,VCT 1753\","
845      "\"posturl\":\"http://postcodes.maltapost.com/\","
846      "\"languages\":\"mt~en\""
847      "}"));
848  region_data.insert(std::make_pair("MU", "{"
849      "\"fmt\":\"%N%n%O%n%A%n%Z%n%C\","
850      "\"zipex\":\"742CU001\","
851      "\"languages\":\"en~fr\""
852      "}"));
853  region_data.insert(std::make_pair("MV", "{"
854      "\"fmt\":\"%N%n%O%n%A%n%C %Z\","
855      "\"zipex\":\"20026\","
856      "\"posturl\":\"http://www.maldivespost.com/\?lid=10\","
857      "\"languages\":\"dv\""
858      "}"));
859  region_data.insert(std::make_pair("MW", "{"
860      "\"fmt\":\"%N%n%O%n%A%n%C %X\","
861      "\"languages\":\"en~ny\""
862      "}"));
863  region_data.insert(std::make_pair("MX", "{"
864      "\"fmt\":\"%N%n%O%n%A%n%D%n%Z %C, %S\","
865      "\"require\":\"ACZ\","
866      "\"state_name_type\":\"state\","
867      "\"zipex\":\"02860,77520,06082\","
868      "\"posturl\":\"http://www.correosdemexico.gob.mx/ServiciosLinea/Paginas/ccpostales.aspx\","
869      "\"languages\":\"es\""
870      "}"));
871  region_data.insert(std::make_pair("MY", "{"
872      "\"fmt\":\"%N%n%O%n%A%n%Z %C, %S\","
873      "\"require\":\"ACZ\","
874      "\"state_name_type\":\"state\","
875      "\"zipex\":\"43000,50754,88990,50670\","
876      "\"posturl\":\"http://www.pos.com.my/pos/homepage.aspx\","
877      "\"languages\":\"ms\""
878      "}"));
879  region_data.insert(std::make_pair("MZ", "{"
880      "\"fmt\":\"%N%n%O%n%A%n%C\","
881      "\"zipex\":\"1102,1119,3212\","
882      "\"languages\":\"pt\""
883      "}"));
884  region_data.insert(std::make_pair("NA", "{"
885      "\"languages\":\"af~en\""
886      "}"));
887  region_data.insert(std::make_pair("NC", "{"
888      "\"fmt\":\"%O%n%N%n%A%n%Z %C %X\","
889      "\"require\":\"ACZ\","
890      "\"zipex\":\"98814,98800,98810\","
891      "\"posturl\":\"http://poste.opt.nc/index.php\?option=com_content&view=article&id=80&Itemid=131\","
892      "\"languages\":\"fr\""
893      "}"));
894  region_data.insert(std::make_pair("NE", "{"
895      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
896      "\"zipex\":\"8001\","
897      "\"languages\":\"fr\""
898      "}"));
899  region_data.insert(std::make_pair("NF", "{"
900      "\"fmt\":\"%O%n%N%n%A%n%C %S %Z\","
901      "\"languages\":\"en\""
902      "}"));
903  region_data.insert(std::make_pair("NG", "{"
904      "\"fmt\":\"%N%n%O%n%A%n%C %Z%n%S\","
905      "\"state_name_type\":\"state\","
906      "\"zipex\":\"930283,300001,931104\","
907      "\"posturl\":\"http://www.nigeriapostcodes.com/views/\","
908      "\"languages\":\"en\""
909      "}"));
910  region_data.insert(std::make_pair("NI", "{"
911      "\"fmt\":\"%N%n%O%n%A%n%Z%n%C, %S\","
912      "\"state_name_type\":\"department\","
913      "\"zipex\":\"52000\","
914      "\"posturl\":\"http://www.correos.gob.ni/index.php/codigo-postal-2\","
915      "\"languages\":\"es\""
916      "}"));
917  region_data.insert(std::make_pair("NL", "{"
918      "\"fmt\":\"%O%n%N%n%A%n%Z %C\","
919      "\"require\":\"ACZ\","
920      "\"zipex\":\"1234 AB,2490 AA\","
921      "\"posturl\":\"http://www.postnl.nl/voorthuis/\","
922      "\"languages\":\"nl\""
923      "}"));
924  region_data.insert(std::make_pair("NO", "{"
925      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
926      "\"require\":\"ACZ\","
927      "\"zipex\":\"0025,0107,6631\","
928      "\"posturl\":\"http://adressesok.posten.no/nb/postal_codes/search\","
929      "\"languages\":\"no~nn\""
930      "}"));
931  region_data.insert(std::make_pair("NP", "{"
932      "\"fmt\":\"%N%n%O%n%A%n%C %Z\","
933      "\"zipex\":\"44601\","
934      "\"posturl\":\"http://www.gpo.gov.np/postalcode.aspx\","
935      "\"languages\":\"ne\""
936      "}"));
937  region_data.insert(std::make_pair("NR", "{"
938      "\"fmt\":\"%N%n%O%n%A%n%S\","
939      "\"require\":\"AS\","
940      "\"state_name_type\":\"district\","
941      "\"languages\":\"en\""
942      "}"));
943  region_data.insert(std::make_pair("NU", "{"
944      "\"languages\":\"en~niu\""
945      "}"));
946  region_data.insert(std::make_pair("NZ", "{"
947      "\"fmt\":\"%N%n%O%n%A%n%C %Z\","
948      "\"require\":\"ACZ\","
949      "\"zipex\":\"6001,6015,6332,8252,1030\","
950      "\"posturl\":\"http://www.nzpost.co.nz/Cultures/en-NZ/OnlineTools/PostCodeFinder/\","
951      "\"languages\":\"en~mi\""
952      "}"));
953  region_data.insert(std::make_pair("OM", "{"
954      "\"fmt\":\"%N%n%O%n%A%n%Z%n%C\","
955      "\"zipex\":\"133,112,111\","
956      "\"languages\":\"ar\""
957      "}"));
958  region_data.insert(std::make_pair("PA", "{"
959      "\"fmt\":\"%N%n%O%n%A%n%C%n%S\","
960      "\"languages\":\"es\""
961      "}"));
962  region_data.insert(std::make_pair("PE", "{"
963      "\"zipex\":\"LIMA 23,LIMA 42,CALLAO 2,02001\","
964      "\"posturl\":\"http://www.serpost.com.pe/cpostal/codigo\","
965      "\"languages\":\"es~qu\""
966      "}"));
967  region_data.insert(std::make_pair("PF", "{"
968      "\"fmt\":\"%N%n%O%n%A%n%Z %C %S\","
969      "\"require\":\"ACSZ\","
970      "\"state_name_type\":\"island\","
971      "\"languages\":\"fr~ty\""
972      "}"));
973  region_data.insert(std::make_pair("PG", "{"
974      "\"fmt\":\"%N%n%O%n%A%n%C %Z %S\","
975      "\"require\":\"ACS\","
976      "\"zipex\":\"111\","
977      "\"languages\":\"tpi~en~ho\""
978      "}"));
979  region_data.insert(std::make_pair("PH", "{"
980      "\"fmt\":\"%N%n%O%n%A%n%Z %C%n%S\","
981      "\"zipex\":\"1008,1050,1135,1207,2000,1000\","
982      "\"posturl\":\"http://www.philpost.gov.ph/\","
983      "\"languages\":\"en\""
984      "}"));
985  region_data.insert(std::make_pair("PK", "{"
986      "\"fmt\":\"%N%n%O%n%A%n%C-%Z\","
987      "\"zipex\":\"44000\","
988      "\"posturl\":\"http://www.pakpost.gov.pk/postcode/postcode.html\","
989      "\"languages\":\"ur~en\""
990      "}"));
991  region_data.insert(std::make_pair("PL", "{"
992      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
993      "\"require\":\"ACZ\","
994      "\"zipex\":\"00-950,05-470,48-300,32-015,00-940\","
995      "\"posturl\":\"http://www.poczta-polska.pl/kody.php\","
996      "\"languages\":\"pl\""
997      "}"));
998  region_data.insert(std::make_pair("PM", "{"
999      "\"fmt\":\"%O%n%N%n%A%n%Z %C %X\","
1000      "\"require\":\"ACZ\","
1001      "\"zipex\":\"97500\","
1002      "\"languages\":\"fr\""
1003      "}"));
1004  region_data.insert(std::make_pair("PN", "{"
1005      "\"fmt\":\"%N%n%O%n%A%n%X%n%C%n%Z\","
1006      "\"require\":\"ACZ\","
1007      "\"zipex\":\"PCRN 1ZZ\","
1008      "\"languages\":\"en\""
1009      "}"));
1010  region_data.insert(std::make_pair("PR", "{"
1011      "\"fmt\":\"%N%n%O%n%A%n%C PR %Z\","
1012      "\"require\":\"ACZ\","
1013      "\"zip_name_type\":\"zip\","
1014      "\"zipex\":\"00930\","
1015      "\"posturl\":\"http://zip4.usps.com/zip4/welcome.jsp\","
1016      "\"languages\":\"es~en\""
1017      "}"));
1018  region_data.insert(std::make_pair("PS", "{"
1019      "\"languages\":\"ar\""
1020      "}"));
1021  region_data.insert(std::make_pair("PT", "{"
1022      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
1023      "\"require\":\"ACZ\","
1024      "\"zipex\":\"2725-079,1250-096,1201-950,2860-571,1208-148\","
1025      "\"posturl\":\"http://www.ctt.pt/feapl_2/app/open/tools.jspx\?tool=1\","
1026      "\"languages\":\"pt\""
1027      "}"));
1028  region_data.insert(std::make_pair("PW", "{"
1029      "\"fmt\":\"%N%n%O%n%A%n%C %S %Z\","
1030      "\"require\":\"ACSZ\","
1031      "\"zip_name_type\":\"zip\","
1032      "\"state_name_type\":\"state\","
1033      "\"zipex\":\"96940\","
1034      "\"posturl\":\"http://zip4.usps.com/zip4/welcome.jsp\","
1035      "\"languages\":\"pau~en\""
1036      "}"));
1037  region_data.insert(std::make_pair("PY", "{"
1038      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
1039      "\"zipex\":\"1536,1538,1209\","
1040      "\"languages\":\"gn~es\""
1041      "}"));
1042  region_data.insert(std::make_pair("QA", "{"
1043      "\"languages\":\"ar\""
1044      "}"));
1045  region_data.insert(std::make_pair("RE", "{"
1046      "\"fmt\":\"%O%n%N%n%A%n%Z %C %X\","
1047      "\"require\":\"ACZ\","
1048      "\"zipex\":\"97400\","
1049      "\"posturl\":\"http://www.laposte.fr/Particulier/Utiliser-nos-outils-pratiques/Outils-et-documents/Trouvez-un-code-postal\","
1050      "\"languages\":\"fr\""
1051      "}"));
1052  region_data.insert(std::make_pair("RO", "{"
1053      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
1054      "\"zipex\":\"060274,061357,200716\","
1055      "\"posturl\":\"http://www.posta-romana.ro/zip_codes\","
1056      "\"languages\":\"ro\""
1057      "}"));
1058  region_data.insert(std::make_pair("RS", "{"
1059      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
1060      "\"zipex\":\"106314\","
1061      "\"posturl\":\"http://www.posta.rs/struktura/lat/aplikacije/pronadji/nadji-postu.asp\","
1062      "\"languages\":\"sr-Cyrl~sr-Latn\""
1063      "}"));
1064  region_data.insert(std::make_pair("RU", "{"
1065      "\"fmt\":\"%N%n%O%n%A%n%C%n%S%n%Z\","
1066      "\"require\":\"ACZ\","
1067      "\"state_name_type\":\"oblast\","
1068      "\"zipex\":\"125075,247112,103375\","
1069      "\"posturl\":\"http://info.russianpost.ru/servlet/department\","
1070      "\"languages\":\"ru\""
1071      "}"));
1072  region_data.insert(std::make_pair("RW", "{"
1073      "\"languages\":\"rw~fr~en\""
1074      "}"));
1075  region_data.insert(std::make_pair("SA", "{"
1076      "\"fmt\":\"%N%n%O%n%A%n%C %Z\","
1077      "\"zipex\":\"11564,11187,11142\","
1078      "\"languages\":\"ar\""
1079      "}"));
1080  region_data.insert(std::make_pair("SB", "{"
1081      "\"languages\":\"en\""
1082      "}"));
1083  region_data.insert(std::make_pair("SC", "{"
1084      "\"fmt\":\"%N%n%O%n%A%n%C%n%S\","
1085      "\"state_name_type\":\"island\","
1086      "\"languages\":\"fr~en\""
1087      "}"));
1088  region_data.insert(std::make_pair("SE", "{"
1089      "\"fmt\":\"%O%n%N%n%A%nSE-%Z %C\","
1090      "\"require\":\"ACZ\","
1091      "\"zipex\":\"11455,12345,10500\","
1092      "\"posturl\":\"http://www.posten.se/sv/Kundservice/Sidor/Sok-postnummer-resultat.aspx\","
1093      "\"languages\":\"sv\""
1094      "}"));
1095  region_data.insert(std::make_pair("SG", "{"
1096      "\"fmt\":\"%N%n%O%n%A%nSINGAPORE %Z\","
1097      "\"require\":\"AZ\","
1098      "\"zipex\":\"546080,308125,408600\","
1099      "\"posturl\":\"http://www.singpost.com.sg/quick_services/index.htm\","
1100      "\"languages\":\"en~zh-Hans~ms-Latn~ta\""
1101      "}"));
1102  region_data.insert(std::make_pair("SH", "{"
1103      "\"fmt\":\"%N%n%O%n%A%n%X%n%C%n%Z\","
1104      "\"require\":\"ACZ\","
1105      "\"zipex\":\"STHL 1ZZ\","
1106      "\"languages\":\"en\""
1107      "}"));
1108  region_data.insert(std::make_pair("SI", "{"
1109      "\"fmt\":\"%N%n%O%n%A%nSI- %Z %C\","
1110      "\"zipex\":\"4000,1001,2500\","
1111      "\"languages\":\"sl\""
1112      "}"));
1113  region_data.insert(std::make_pair("SJ", "{"
1114      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
1115      "\"require\":\"ACZ\","
1116      "\"zipex\":\"9170\","
1117      "\"posturl\":\"http://epab.posten.no/\","
1118      "\"languages\":\"no\""
1119      "}"));
1120  region_data.insert(std::make_pair("SK", "{"
1121      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
1122      "\"zipex\":\"010 01,023 14,972 48,921 01,975 99\","
1123      "\"posturl\":\"http://psc.posta.sk\","
1124      "\"languages\":\"sk\""
1125      "}"));
1126  region_data.insert(std::make_pair("SL", "{"
1127      "\"languages\":\"en\""
1128      "}"));
1129  region_data.insert(std::make_pair("SM", "{"
1130      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
1131      "\"require\":\"AZ\","
1132      "\"zipex\":\"47890,47891,47895,47899\","
1133      "\"posturl\":\"http://www.poste.it/online/cercacap/\","
1134      "\"languages\":\"it\""
1135      "}"));
1136  region_data.insert(std::make_pair("SN", "{"
1137      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
1138      "\"zipex\":\"12500,46024,16556,10000\","
1139      "\"languages\":\"fr~wo\""
1140      "}"));
1141  region_data.insert(std::make_pair("SO", "{"
1142      "\"fmt\":\"%N%n%O%n%A%n%C, %S %Z\","
1143      "\"require\":\"ACS\","
1144      "\"zipex\":\"09010,11010\","
1145      "\"languages\":\"so\""
1146      "}"));
1147  region_data.insert(std::make_pair("SR", "{"
1148      "\"fmt\":\"%N%n%O%n%A%n%C %X%n%S\","
1149      "\"languages\":\"nl\""
1150      "}"));
1151  region_data.insert(std::make_pair("ST", "{"
1152      "\"fmt\":\"%N%n%O%n%A%n%C %X\","
1153      "\"languages\":\"pt\""
1154      "}"));
1155  region_data.insert(std::make_pair("SV", "{"
1156      "\"fmt\":\"%N%n%O%n%A%n%Z-%C%n%S\","
1157      "\"require\":\"ACS\","
1158      "\"zipex\":\"CP 1101\","
1159      "\"languages\":\"es\""
1160      "}"));
1161  region_data.insert(std::make_pair("SZ", "{"
1162      "\"fmt\":\"%N%n%O%n%A%n%C%n%Z\","
1163      "\"zipex\":\"H100\","
1164      "\"posturl\":\"http://www.sptc.co.sz/swazipost/codes.php\","
1165      "\"languages\":\"en~ss\""
1166      "}"));
1167  region_data.insert(std::make_pair("TA", "{"
1168      "\"zipex\":\"TDCU 1ZZ\","
1169      "\"languages\":\"en\""
1170      "}"));
1171  region_data.insert(std::make_pair("TC", "{"
1172      "\"fmt\":\"%N%n%O%n%A%n%X%n%C%n%Z\","
1173      "\"require\":\"ACZ\","
1174      "\"zipex\":\"TKCA 1ZZ\","
1175      "\"languages\":\"en\""
1176      "}"));
1177  region_data.insert(std::make_pair("TD", "{"
1178      "\"languages\":\"fr~ar\""
1179      "}"));
1180  region_data.insert(std::make_pair("TF", "{"
1181      "\"languages\":\"fr\""
1182      "}"));
1183  region_data.insert(std::make_pair("TG", "{"
1184      "\"languages\":\"fr\""
1185      "}"));
1186  region_data.insert(std::make_pair("TH", "{"
1187      "\"fmt\":\"%N%n%O%n%A%n%D %C%n%S %Z\","
1188      "\"lfmt\":\"%N%n%O%n%A%n%D, %C%n%S %Z\","
1189      "\"zipex\":\"10150,10210\","
1190      "\"languages\":\"th\""
1191      "}"));
1192  region_data.insert(std::make_pair("TJ", "{"
1193      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
1194      "\"zipex\":\"735450,734025\","
1195      "\"languages\":\"tg-Cyrl\""
1196      "}"));
1197  region_data.insert(std::make_pair("TK", "{"
1198      "\"languages\":\"en~tkl\""
1199      "}"));
1200  region_data.insert(std::make_pair("TL", "{"
1201      "\"languages\":\"pt~tet\""
1202      "}"));
1203  region_data.insert(std::make_pair("TM", "{"
1204      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
1205      "\"zipex\":\"744000\","
1206      "\"languages\":\"tk-Latn\""
1207      "}"));
1208  region_data.insert(std::make_pair("TN", "{"
1209      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
1210      "\"zipex\":\"1002,8129,3100,1030\","
1211      "\"posturl\":\"http://www.poste.tn/codes.php\","
1212      "\"languages\":\"ar~fr\""
1213      "}"));
1214  region_data.insert(std::make_pair("TO", "{"
1215      "\"languages\":\"to~en\""
1216      "}"));
1217  region_data.insert(std::make_pair("TR", "{"
1218      "\"fmt\":\"%N%n%O%n%A%n%Z %C/%S\","
1219      "\"require\":\"ACZ\","
1220      "\"zipex\":\"01960,06101\","
1221      "\"posturl\":\"http://postakodu.ptt.gov.tr/\","
1222      "\"languages\":\"tr\""
1223      "}"));
1224  region_data.insert(std::make_pair("TT", "{"
1225      "\"languages\":\"en\""
1226      "}"));
1227  region_data.insert(std::make_pair("TV", "{"
1228      "\"fmt\":\"%N%n%O%n%A%n%X%n%C%n%S\","
1229      "\"state_name_type\":\"island\","
1230      "\"languages\":\"tyv\""
1231      "}"));
1232  region_data.insert(std::make_pair("TW", "{"
1233      "\"fmt\":\"%Z%n%S%C%n%A%n%O%n%N\","
1234      "\"lfmt\":\"%N%n%O%n%A%n%C, %S %Z\","
1235      "\"require\":\"ACSZ\","
1236      "\"state_name_type\":\"county\","
1237      "\"zipex\":\"104,106,10603,40867\","
1238      "\"posturl\":\"http://www.post.gov.tw/post/internet/f_searchzone/index.jsp\?ID=190102\","
1239      "\"languages\":\"zh-Hant\""
1240      "}"));
1241  region_data.insert(std::make_pair("TZ", "{"
1242      "\"zipex\":\"6090\","
1243      "\"languages\":\"sw~en\""
1244      "}"));
1245  region_data.insert(std::make_pair("UA", "{"
1246      "\"fmt\":\"%N%n%O%n%A%n%C%n%S%n%Z\","
1247      "\"require\":\"ACZ\","
1248      "\"state_name_type\":\"oblast\","
1249      "\"zipex\":\"15432,01055,01001\","
1250      "\"posturl\":\"http://services.ukrposhta.com/postindex_new/\","
1251      "\"languages\":\"uk~ru\""
1252      "}"));
1253  region_data.insert(std::make_pair("UG", "{"
1254      "\"languages\":\"sw~en\""
1255      "}"));
1256  region_data.insert(std::make_pair("UM", "{"
1257      "\"fmt\":\"%N%n%O%n%A%n%C %S %Z\","
1258      "\"require\":\"ACS\","
1259      "\"zip_name_type\":\"zip\","
1260      "\"state_name_type\":\"state\","
1261      "\"zipex\":\"96898\","
1262      "\"posturl\":\"http://zip4.usps.com/zip4/welcome.jsp\","
1263      "\"languages\":\"en\""
1264      "}"));
1265  region_data.insert(std::make_pair("US", "{"
1266      "\"fmt\":\"%N%n%O%n%A%n%C, %S %Z\","
1267      "\"require\":\"ACSZ\","
1268      "\"zip_name_type\":\"zip\","
1269      "\"state_name_type\":\"state\","
1270      "\"zipex\":\"95014,22162-1010\","
1271      "\"posturl\":\"https://tools.usps.com/go/ZipLookupAction!input.action\","
1272      "\"languages\":\"en\""
1273      "}"));
1274  region_data.insert(std::make_pair("UY", "{"
1275      "\"fmt\":\"%N%n%O%n%A%n%Z %C %S\","
1276      "\"zipex\":\"11600\","
1277      "\"posturl\":\"http://www.correo.com.uy/index.asp\?codPag=codPost&switchMapa=codPost\","
1278      "\"languages\":\"es\""
1279      "}"));
1280  region_data.insert(std::make_pair("UZ", "{"
1281      "\"fmt\":\"%N%n%O%n%A%n%Z %C%n%S\","
1282      "\"zipex\":\"702100,700000\","
1283      "\"posturl\":\"http://www.pochta.uz/index.php/uz/pochta-indekslari/9\","
1284      "\"languages\":\"uz-Latn~uz-Cyrl\""
1285      "}"));
1286  region_data.insert(std::make_pair("VA", "{"
1287      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
1288      "\"zipex\":\"00120\","
1289      "\"languages\":\"la\""
1290      "}"));
1291  region_data.insert(std::make_pair("VC", "{"
1292      "\"zipex\":\"VC0100,VC0110,VC0400\","
1293      "\"posturl\":\"http://www.svgpost.gov.vc/\?option=com_content&view=article&id=3&Itemid=16\","
1294      "\"languages\":\"en\""
1295      "}"));
1296  region_data.insert(std::make_pair("VE", "{"
1297      "\"fmt\":\"%N%n%O%n%A%n%C %Z, %S\","
1298      "\"require\":\"ACS\","
1299      "\"zipex\":\"1010,3001,8011,1020\","
1300      "\"posturl\":\"http://www.ipostel.gob.ve/nlinea/codigo_postal.php\","
1301      "\"languages\":\"es\""
1302      "}"));
1303  region_data.insert(std::make_pair("VG", "{"
1304      "\"require\":\"A\","
1305      "\"zipex\":\"VG1110,VG1150,VG1160\","
1306      "\"languages\":\"en\""
1307      "}"));
1308  region_data.insert(std::make_pair("VI", "{"
1309      "\"fmt\":\"%N%n%O%n%A%n%C %S %Z\","
1310      "\"require\":\"ACSZ\","
1311      "\"zip_name_type\":\"zip\","
1312      "\"state_name_type\":\"state\","
1313      "\"zipex\":\"00802-1222,00850-9802\","
1314      "\"posturl\":\"http://zip4.usps.com/zip4/welcome.jsp\","
1315      "\"languages\":\"en\""
1316      "}"));
1317  region_data.insert(std::make_pair("VN", "{"
1318      "\"fmt\":\"%N%n%O%n%A%n%C%n%S\","
1319      "\"lfmt\":\"%N%n%O%n%A%n%C%n%S\","
1320      "\"require\":\"AC\","
1321      "\"zipex\":\"119415,136065,720344\","
1322      "\"posturl\":\"http://postcode.vnpost.vn/services/search.aspx\","
1323      "\"languages\":\"vi\""
1324      "}"));
1325  region_data.insert(std::make_pair("VU", "{"
1326      "\"languages\":\"bi~en~fr\""
1327      "}"));
1328  region_data.insert(std::make_pair("WF", "{"
1329      "\"fmt\":\"%O%n%N%n%A%n%Z %C %X\","
1330      "\"require\":\"ACZ\","
1331      "\"zipex\":\"98600\","
1332      "\"languages\":\"fr\""
1333      "}"));
1334  region_data.insert(std::make_pair("WS", "{"
1335      "\"languages\":\"sm~en\""
1336      "}"));
1337  region_data.insert(std::make_pair("XK", "{"
1338      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
1339      "\"zipex\":\"10000\","
1340      "\"languages\":\"sq~sr-Cyrl~sr-Latn\""
1341      "}"));
1342  region_data.insert(std::make_pair("YE", "{"
1343      "\"require\":\"AC\","
1344      "\"languages\":\"ar\""
1345      "}"));
1346  region_data.insert(std::make_pair("YT", "{"
1347      "\"fmt\":\"%O%n%N%n%A%n%Z %C %X\","
1348      "\"require\":\"ACZ\","
1349      "\"zipex\":\"97600\","
1350      "\"languages\":\"fr\""
1351      "}"));
1352  region_data.insert(std::make_pair("ZA", "{"
1353      "\"fmt\":\"%N%n%O%n%A%n%C%n%Z\","
1354      "\"require\":\"ACZ\","
1355      "\"zipex\":\"0083,1451,0001\","
1356      "\"posturl\":\"http://www.postoffice.co.za/tools/postalcode.html\","
1357      "\"languages\":\"en~zu~xh~af~nso~tn~st~ts~ss~ve~nr\""
1358      "}"));
1359  region_data.insert(std::make_pair("ZM", "{"
1360      "\"fmt\":\"%N%n%O%n%A%n%Z %C\","
1361      "\"require\":\"AC\","
1362      "\"zipex\":\"50100,50101\","
1363      "\"languages\":\"en\""
1364      "}"));
1365  region_data.insert(std::make_pair("ZW", "{"
1366      "\"languages\":\"en~sn~nd\""
1367      "}"));
1368  return region_data;
1369}
1370
1371}  // namespace
1372
1373// static
1374const std::string& RegionDataConstants::GetDefaultRegionData() {
1375  static const std::string kDefaultRegionData(
1376      "{"
1377      "\"fmt\":\"%N%n%O%n%A%n%C\","
1378      "\"require\":\"AC\","
1379      "\"zip_name_type\":\"postal\","
1380      "\"state_name_type\":\"province\""
1381      "}");
1382  return kDefaultRegionData;
1383}
1384// ---- END AUTOGENERATED CODE ----
1385
1386namespace {
1387
1388const std::map<std::string, std::string>& GetAllRegionData() {
1389  static const std::map<std::string, std::string> kRegionData(InitRegionData());
1390  return kRegionData;
1391}
1392
1393struct SelectFirst {
1394  template <typename Pair>
1395  const typename Pair::first_type& operator()(const Pair& pair) const {
1396    return pair.first;
1397  }
1398};
1399
1400std::vector<std::string> InitRegionCodes() {
1401  std::vector<std::string> region_codes(GetAllRegionData().size());
1402  std::transform(GetAllRegionData().begin(),
1403                 GetAllRegionData().end(),
1404                 region_codes.begin(),
1405                 SelectFirst());
1406  return region_codes;
1407}
1408
1409const std::map<std::string, size_t> InitMaxLookupKeyDepth() {
1410  std::map<std::string, size_t> max_depth;
1411  for (std::map<std::string, std::string>::const_iterator
1412       it = GetAllRegionData().begin(); it != GetAllRegionData().end(); ++it) {
1413    std::vector<FormatElement> fields;
1414    // Here it->second actually contains the entire JSON blob for this region,
1415    // and not only the format field, but it doesn't really matter when just
1416    // checking whether a particular formatting code (eg. "%C") is present, as
1417    // there isn't anything else in the JSON that erroneously could match a
1418    // formatting code.
1419    ParseFormatRule(it->second, &fields);
1420    size_t depth = 1;
1421    for (; depth < arraysize(LookupKey::kHierarchy); ++depth) {
1422      AddressField field = LookupKey::kHierarchy[depth];
1423      // Check to see if a particular field in the hierarchy is used by
1424      // addresses in this country. If not, the maximum depth has been reached.
1425      if (std::find(fields.begin(), fields.end(), FormatElement(field)) ==
1426          fields.end()) {
1427        break;
1428      }
1429    }
1430    max_depth.insert(std::make_pair(it->first, depth - 1));
1431  }
1432  return max_depth;
1433}
1434
1435}  // namespace
1436
1437// static
1438const bool RegionDataConstants::IsSupported(const std::string& region_code) {
1439  static const std::set<std::string> kRegionCodes(GetRegionCodes().begin(),
1440                                                  GetRegionCodes().end());
1441  return kRegionCodes.find(region_code) != kRegionCodes.end();
1442}
1443
1444// static
1445const std::vector<std::string>& RegionDataConstants::GetRegionCodes() {
1446  static const std::vector<std::string> kRegionCodes(InitRegionCodes());
1447  return kRegionCodes;
1448}
1449
1450// static
1451const std::string& RegionDataConstants::GetRegionData(
1452    const std::string& region_code) {
1453  static const std::string kEmptyString;
1454  std::map<std::string, std::string>::const_iterator it =
1455      GetAllRegionData().find(region_code);
1456  return it != GetAllRegionData().end() ? it->second : kEmptyString;
1457}
1458
1459// static
1460size_t RegionDataConstants::GetMaxLookupKeyDepth(
1461    const std::string& region_code) {
1462  static const std::map<std::string, size_t> kMaxDepth(InitMaxLookupKeyDepth());
1463  std::map<std::string, size_t>::const_iterator it =
1464      kMaxDepth.find(region_code);
1465  return it != kMaxDepth.end() ? it->second : 0;
1466}
1467
1468}  // namespace addressinput
1469}  // namespace i18n
1470