% phonenumbers package: phonenumbers-US.def
% Module for North American telephone numbers
% Author: K. Wehr
% Version: 2.7
% Date: 2026-06-25
\clist_const:Nn \c_phone_US_geographic_area_codes_clist {201,
202,
203,
204,
205,
206,
207,
208,
209,
210,
212,
213,
214,
215,
216,
217,
218,
219,
220,
223,
224,
225,
226,
227,
228,
229,
231,
234,
235,
236,
239,
240,
242,
246,
248,
249,
250,
251,
252,
253,
254,
256,
257,
260,
262,
263,
264,
267,
268,
269,
270,
272,
273,
274,
276,
279,
281,
283,
284,
289,
301,
302,
303,
304,
305,
306,
307,
308,
309,
310,
312,
313,
314,
315,
316,
317,
318,
319,
320,
321,
323,
324,
325,
326,
327,
329,
330,
331,
332,
334,
336,
337,
339,
340,
341,
343,
345,
346,
347,
350,
351,
352,
353,
354,
357,
360,
361,
363,
364,
365,
367,
368,
369,
380,
382,
385,
386,
401,
402,
403,
404,
405,
406,
407,
408,
409,
410,
412,
413,
414,
415,
416,
417,
418,
419,
423,
424,
425,
428,
430,
431,
432,
434,
435,
436,
437,
438,
440,
441,
442,
443,
445,
447,
448,
450,
457,
458,
463,
464,
465,
468,
469,
470,
471,
472,
473,
474,
475,
478,
479,
480,
483,
484,
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
512,
513,
514,
515,
516,
517,
518,
519,
520,
530,
531,
534,
539,
540,
541,
548,
551,
557,
559,
561,
562,
563,
564,
565,
567,
570,
571,
572,
573,
574,
575,
579,
580,
581,
582,
584,
585,
586,
587,
601,
602,
603,
604,
605,
606,
607,
608,
609,
610,
612,
613,
614,
615,
616,
617,
618,
619,
620,
621,
623,
624,
626,
628,
629,
630,
631,
636,
639,
640,
641,
645,
646,
647,
649,
650,
651,
656,
657,
658,
659,
660,
661,
662,
664,
667,
669,
670,
671,
672,
678,
679,
680,
681,
682,
683,
684,
686,
689,
701,
702,
703,
704,
705,
706,
707,
708,
709,
712,
713,
714,
715,
716,
717,
718,
719,
720,
721,
724,
725,
726,
727,
728,
729,
730,
731,
732,
734,
737,
738,
740,
742,
743,
747,
748,
753,
754,
757,
758,
760,
761,
762,
763,
765,
767,
769,
770,
771,
772,
773,
774,
775,
778,
779,
780,
781,
782,
784,
785,
786,
787,
801,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
815,
816,
817,
818,
819,
820,
821,
825,
826,
828,
829,
830,
831,
832,
835,
837,
838,
839,
840,
843,
845,
847,
848,
849,
850,
854,
856,
857,
858,
859,
860,
861,
862,
863,
864,
865,
867,
868,
869,
870,
872,
873,
876,
878,
879,
901,
902,
903,
904,
905,
906,
907,
908,
909,
910,
912,
913,
914,
915,
916,
917,
918,
919,
920,
924,
925,
928,
929,
930,
931,
934,
936,
937,
938,
939,
940,
941,
942,
943,
945,
947,
948,
949,
951,
952,
954,
956,
959,
970,
971,
972,
973,
975,
978,
979,
980,
983,
984,
985,
986,
989}
\clist_const:Nn \c_phone_US_required_area_codes_clist {201,
202,
203,
204,
205,
206,
208,
209,
210,
212,
213,
214,
215,
217,
218,
219,
220,
223,
224,
226,
227,
234,
235,
236,
240,
248,
249,
250,
251,
253,
254,
256,
257,
262,
263,
267,
270,
272,
273,
274,
276,
279,
281,
283,
289,
301,
302,
303,
304,
305,
306,
309,
310,
312,
313,
314,
315,
317,
318,
319,
321,
323,
324,
326,
327,
329,
330,
331,
332,
334,
336,
337,
339,
341,
343,
346,
347,
350,
351,
352,
353,
354,
357,
360,
361,
363,
364,
365,
367,
368,
369,
380,
382,
385,
402,
403,
404,
405,
406,
407,
408,
409,
410,
412,
414,
415,
416,
417,
418,
419,
423,
424,
425,
428,
430,
431,
436,
437,
438,
440,
442,
443,
445,
447,
448,
450,
457,
458,
463,
464,
465,
468,
469,
470,
471,
472,
474,
475,
478,
480,
483,
484,
501,
503,
504,
505,
506,
507,
508,
509,
510,
512,
513,
514,
515,
516,
518,
519,
520,
530,
531,
534,
539,
540,
541,
548,
551,
557,
559,
561,
562,
564,
565,
567,
570,
571,
572,
573,
574,
575,
579,
581,
582,
584,
587,
601,
602,
603,
604,
605,
607,
608,
609,
610,
613,
614,
615,
616,
617,
618,
619,
620,
621,
623,
624,
626,
628,
629,
630,
631,
639,
640,
645,
646,
647,
650,
656,
657,
658,
659,
660,
662,
667,
669,
671,
672,
678,
679,
680,
681,
682,
683,
686,
689,
702,
703,
704,
705,
706,
707,
708,
709,
713,
714,
715,
716,
717,
718,
719,
720,
724,
725,
726,
728,
729,
730,
731,
732,
737,
738,
740,
742,
743,
747,
748,
753,
754,
757,
760,
761,
762,
769,
770,
771,
773,
774,
775,
778,
779,
780,
781,
782,
785,
786,
787,
801,
802,
803,
804,
805,
806,
807,
808,
809,
810,
812,
813,
814,
815,
816,
817,
818,
819,
820,
821,
825,
826,
829,
830,
832,
835,
837,
838,
839,
840,
843,
845,
847,
848,
849,
850,
854,
856,
857,
858,
859,
860,
861,
862,
864,
865,
867,
870,
872,
873,
876,
878,
879,
902,
903,
904,
905,
906,
907,
908,
909,
910,
912,
914,
915,
916,
917,
918,
919,
920,
924,
925,
928,
929,
930,
934,
937,
938,
939,
940,
941,
942,
943,
945,
947,
948,
949,
951,
952,
954,
959,
970,
971,
972,
973,
975,
978,
980,
983,
984,
986,
989}
\clist_const:Nn \c_phone_US_nongeographic_area_codes_clist {500,
521,
522,
523,
524,
525,
526,
527,
528,
529,
532,
533,
538,
542,
544,
566,
577,
588,
600,
622,
633,
700,
710,
800,
833,
844,
855,
866,
877,
888,
900}
\tl_const:cn {c_phone_US_place_name_201_tl} {New~Jersey}
\tl_const:cn {c_phone_US_place_name_202_tl} {Washington,~D.\,C.}
\tl_const:cn {c_phone_US_place_name_203_tl} {Connecticut}
\tl_const:cn {c_phone_US_place_name_204_tl} {Manitoba}
\tl_const:cn {c_phone_US_place_name_205_tl} {Alabama}
\tl_const:cn {c_phone_US_place_name_206_tl} {Washington}
\tl_const:cn {c_phone_US_place_name_207_tl} {Maine}
\tl_const:cn {c_phone_US_place_name_208_tl} {Idaho}
\tl_const:cn {c_phone_US_place_name_209_tl} {California}
\tl_const:cn {c_phone_US_place_name_210_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_212_tl} {New~York}
\tl_const:cn {c_phone_US_place_name_213_tl} {California}
\tl_const:cn {c_phone_US_place_name_214_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_215_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_place_name_216_tl} {Ohio}
\tl_const:cn {c_phone_US_place_name_217_tl} {Illinois}
\tl_const:cn {c_phone_US_place_name_218_tl} {Minnesota}
\tl_const:cn {c_phone_US_place_name_219_tl} {Indiana}
\tl_const:cn {c_phone_US_place_name_220_tl} {Ohio}
\tl_const:cn {c_phone_US_place_name_223_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_place_name_224_tl} {Illinois}
\tl_const:cn {c_phone_US_place_name_225_tl} {Louisiana}
\tl_const:cn {c_phone_US_place_name_226_tl} {Ontario}
\tl_const:cn {c_phone_US_place_name_227_tl} {Maryland}
\tl_const:cn {c_phone_US_place_name_228_tl} {Mississippi}
\tl_const:cn {c_phone_US_place_name_229_tl} {Georgia}
\tl_const:cn {c_phone_US_place_name_231_tl} {Michigan}
\tl_const:cn {c_phone_US_place_name_234_tl} {Ohio}
\tl_const:cn {c_phone_US_place_name_235_tl} {Missouri}
\tl_const:cn {c_phone_US_place_name_236_tl} {British~Columbia}
\tl_const:cn {c_phone_US_place_name_239_tl} {Florida}
\tl_const:cn {c_phone_US_place_name_240_tl} {Maryland}
\tl_const:cn {c_phone_US_place_name_242_tl} {Bahamas}
\tl_const:cn {c_phone_US_place_name_246_tl} {Barbados}
\tl_const:cn {c_phone_US_place_name_248_tl} {Michigan}
\tl_const:cn {c_phone_US_place_name_249_tl} {Ontario}
\tl_const:cn {c_phone_US_place_name_250_tl} {British~Columbia}
\tl_const:cn {c_phone_US_place_name_251_tl} {Alabama}
\tl_const:cn {c_phone_US_place_name_252_tl} {North~Carolina}
\tl_const:cn {c_phone_US_place_name_253_tl} {Washington}
\tl_const:cn {c_phone_US_place_name_254_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_256_tl} {Alabama}
\tl_const:cn {c_phone_US_place_name_257_tl} {British~Columbia}
\tl_const:cn {c_phone_US_place_name_260_tl} {Indiana}
\tl_const:cn {c_phone_US_place_name_262_tl} {Wisconsin}
\tl_const:cn {c_phone_US_place_name_263_tl} {Quebec}
\tl_const:cn {c_phone_US_place_name_264_tl} {Anguilla}
\tl_const:cn {c_phone_US_place_name_267_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_place_name_268_tl} {Antigua~and~Barbuda}
\tl_const:cn {c_phone_US_place_name_269_tl} {Michigan}
\tl_const:cn {c_phone_US_place_name_270_tl} {Kentucky}
\tl_const:cn {c_phone_US_place_name_272_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_place_name_273_tl} {Quebec}
\tl_const:cn {c_phone_US_place_name_274_tl} {Wisconsin}
\tl_const:cn {c_phone_US_place_name_276_tl} {Virginia}
\tl_const:cn {c_phone_US_place_name_279_tl} {California}
\tl_const:cn {c_phone_US_place_name_281_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_283_tl} {Ohio}
\tl_const:cn {c_phone_US_place_name_284_tl} {British~Virgin~Islands}
\tl_const:cn {c_phone_US_place_name_289_tl} {Ontario}
\tl_const:cn {c_phone_US_place_name_301_tl} {Maryland}
\tl_const:cn {c_phone_US_place_name_302_tl} {Delaware}
\tl_const:cn {c_phone_US_place_name_303_tl} {Colorado}
\tl_const:cn {c_phone_US_place_name_304_tl} {West~Virginia}
\tl_const:cn {c_phone_US_place_name_305_tl} {Florida}
\tl_const:cn {c_phone_US_place_name_306_tl} {Saskatchewan}
\tl_const:cn {c_phone_US_place_name_307_tl} {Wyoming}
\tl_const:cn {c_phone_US_place_name_308_tl} {Nebraska}
\tl_const:cn {c_phone_US_place_name_309_tl} {Illinois}
\tl_const:cn {c_phone_US_place_name_310_tl} {California}
\tl_const:cn {c_phone_US_place_name_312_tl} {Illinois}
\tl_const:cn {c_phone_US_place_name_313_tl} {Michigan}
\tl_const:cn {c_phone_US_place_name_314_tl} {Missouri}
\tl_const:cn {c_phone_US_place_name_315_tl} {New~York}
\tl_const:cn {c_phone_US_place_name_316_tl} {Kansas}
\tl_const:cn {c_phone_US_place_name_317_tl} {Indiana}
\tl_const:cn {c_phone_US_place_name_318_tl} {Louisiana}
\tl_const:cn {c_phone_US_place_name_319_tl} {Iowa}
\tl_const:cn {c_phone_US_place_name_320_tl} {Minnesota}
\tl_const:cn {c_phone_US_place_name_321_tl} {Florida}
\tl_const:cn {c_phone_US_place_name_323_tl} {California}
\tl_const:cn {c_phone_US_place_name_324_tl} {Florida}
\tl_const:cn {c_phone_US_place_name_325_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_326_tl} {Ohio}
\tl_const:cn {c_phone_US_place_name_327_tl} {Arkansas}
\tl_const:cn {c_phone_US_place_name_329_tl} {New~York}
\tl_const:cn {c_phone_US_place_name_330_tl} {Ohio}
\tl_const:cn {c_phone_US_place_name_331_tl} {Illinois}
\tl_const:cn {c_phone_US_place_name_332_tl} {New~York}
\tl_const:cn {c_phone_US_place_name_334_tl} {Alabama}
\tl_const:cn {c_phone_US_place_name_336_tl} {North~Carolina}
\tl_const:cn {c_phone_US_place_name_337_tl} {Louisiana}
\tl_const:cn {c_phone_US_place_name_339_tl} {Massachusetts}
\tl_const:cn {c_phone_US_place_name_340_tl} {U.\,S.~Virgin~Islands}
\tl_const:cn {c_phone_US_place_name_341_tl} {California}
\tl_const:cn {c_phone_US_place_name_343_tl} {Ontario}
\tl_const:cn {c_phone_US_place_name_345_tl} {Cayman~Islands}
\tl_const:cn {c_phone_US_place_name_346_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_347_tl} {New~York}
\tl_const:cn {c_phone_US_place_name_350_tl} {California}
\tl_const:cn {c_phone_US_place_name_351_tl} {Massachusetts}
\tl_const:cn {c_phone_US_place_name_352_tl} {Florida}
\tl_const:cn {c_phone_US_place_name_353_tl} {Wisconsin}
\tl_const:cn {c_phone_US_place_name_354_tl} {Quebec}
\tl_const:cn {c_phone_US_place_name_357_tl} {California}
\tl_const:cn {c_phone_US_place_name_360_tl} {Washington}
\tl_const:cn {c_phone_US_place_name_361_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_363_tl} {New~York}
\tl_const:cn {c_phone_US_place_name_364_tl} {Kentucky}
\tl_const:cn {c_phone_US_place_name_365_tl} {Ontario}
\tl_const:cn {c_phone_US_place_name_367_tl} {Quebec}
\tl_const:cn {c_phone_US_place_name_368_tl} {Alberta}
\tl_const:cn {c_phone_US_place_name_369_tl} {California}
\tl_const:cn {c_phone_US_place_name_380_tl} {Ohio}
\tl_const:cn {c_phone_US_place_name_382_tl} {Ontario}
\tl_const:cn {c_phone_US_place_name_385_tl} {Utah}
\tl_const:cn {c_phone_US_place_name_386_tl} {Florida}
\tl_const:cn {c_phone_US_place_name_401_tl} {Rhode~Island}
\tl_const:cn {c_phone_US_place_name_402_tl} {Nebraska}
\tl_const:cn {c_phone_US_place_name_403_tl} {Alberta}
\tl_const:cn {c_phone_US_place_name_404_tl} {Georgia}
\tl_const:cn {c_phone_US_place_name_405_tl} {Oklahoma}
\tl_const:cn {c_phone_US_place_name_406_tl} {Montana}
\tl_const:cn {c_phone_US_place_name_407_tl} {Florida}
\tl_const:cn {c_phone_US_place_name_408_tl} {California}
\tl_const:cn {c_phone_US_place_name_409_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_410_tl} {Maryland}
\tl_const:cn {c_phone_US_place_name_412_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_place_name_413_tl} {Massachusetts}
\tl_const:cn {c_phone_US_place_name_414_tl} {Wisconsin}
\tl_const:cn {c_phone_US_place_name_415_tl} {California}
\tl_const:cn {c_phone_US_place_name_416_tl} {Ontario}
\tl_const:cn {c_phone_US_place_name_417_tl} {Missouri}
\tl_const:cn {c_phone_US_place_name_418_tl} {Quebec}
\tl_const:cn {c_phone_US_place_name_419_tl} {Ohio}
\tl_const:cn {c_phone_US_place_name_423_tl} {Tennessee}
\tl_const:cn {c_phone_US_place_name_424_tl} {California}
\tl_const:cn {c_phone_US_place_name_425_tl} {Washington}
\tl_const:cn {c_phone_US_place_name_428_tl} {New~Brunswick}
\tl_const:cn {c_phone_US_place_name_430_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_431_tl} {Manitoba}
\tl_const:cn {c_phone_US_place_name_432_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_434_tl} {Virginia}
\tl_const:cn {c_phone_US_place_name_435_tl} {Utah}
\tl_const:cn {c_phone_US_place_name_436_tl} {Ohio}
\tl_const:cn {c_phone_US_place_name_437_tl} {Ontario}
\tl_const:cn {c_phone_US_place_name_438_tl} {Quebec}
\tl_const:cn {c_phone_US_place_name_440_tl} {Ohio}
\tl_const:cn {c_phone_US_place_name_441_tl} {Bermuda}
\tl_const:cn {c_phone_US_place_name_442_tl} {California}
\tl_const:cn {c_phone_US_place_name_443_tl} {Maryland}
\tl_const:cn {c_phone_US_place_name_445_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_place_name_447_tl} {Illinois}
\tl_const:cn {c_phone_US_place_name_448_tl} {Florida}
\tl_const:cn {c_phone_US_place_name_450_tl} {Quebec}
\tl_const:cn {c_phone_US_place_name_457_tl} {Louisiana}
\tl_const:cn {c_phone_US_place_name_458_tl} {Oregon}
\tl_const:cn {c_phone_US_place_name_463_tl} {Indiana}
\tl_const:cn {c_phone_US_place_name_464_tl} {Illinois}
\tl_const:cn {c_phone_US_place_name_465_tl} {New~York}
\tl_const:cn {c_phone_US_place_name_468_tl} {Quebec}
\tl_const:cn {c_phone_US_place_name_469_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_470_tl} {Georgia}
\tl_const:cn {c_phone_US_place_name_471_tl} {Mississippi}
\tl_const:cn {c_phone_US_place_name_472_tl} {North~Carolina}
\tl_const:cn {c_phone_US_place_name_473_tl} {Grenada}
\tl_const:cn {c_phone_US_place_name_474_tl} {Saskatchewan}
\tl_const:cn {c_phone_US_place_name_475_tl} {Connecticut}
\tl_const:cn {c_phone_US_place_name_478_tl} {Georgia}
\tl_const:cn {c_phone_US_place_name_479_tl} {Arkansas}
\tl_const:cn {c_phone_US_place_name_480_tl} {Arizona}
\tl_const:cn {c_phone_US_place_name_483_tl} {Alabama}
\tl_const:cn {c_phone_US_place_name_484_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_place_name_501_tl} {Arkansas}
\tl_const:cn {c_phone_US_place_name_502_tl} {Kentucky}
\tl_const:cn {c_phone_US_place_name_503_tl} {Oregon}
\tl_const:cn {c_phone_US_place_name_504_tl} {Louisiana}
\tl_const:cn {c_phone_US_place_name_505_tl} {New~Mexico}
\tl_const:cn {c_phone_US_place_name_506_tl} {New~Brunswick}
\tl_const:cn {c_phone_US_place_name_507_tl} {Minnesota}
\tl_const:cn {c_phone_US_place_name_508_tl} {Massachusetts}
\tl_const:cn {c_phone_US_place_name_509_tl} {Washington}
\tl_const:cn {c_phone_US_place_name_510_tl} {California}
\tl_const:cn {c_phone_US_place_name_512_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_513_tl} {Ohio}
\tl_const:cn {c_phone_US_place_name_514_tl} {Quebec}
\tl_const:cn {c_phone_US_place_name_515_tl} {Iowa}
\tl_const:cn {c_phone_US_place_name_516_tl} {New~York}
\tl_const:cn {c_phone_US_place_name_517_tl} {Michigan}
\tl_const:cn {c_phone_US_place_name_518_tl} {New~York}
\tl_const:cn {c_phone_US_place_name_519_tl} {Ontario}
\tl_const:cn {c_phone_US_place_name_520_tl} {Arizona}
\tl_const:cn {c_phone_US_place_name_530_tl} {California}
\tl_const:cn {c_phone_US_place_name_531_tl} {Nebraska}
\tl_const:cn {c_phone_US_place_name_534_tl} {Wisconsin}
\tl_const:cn {c_phone_US_place_name_539_tl} {Oklahoma}
\tl_const:cn {c_phone_US_place_name_540_tl} {Virginia}
\tl_const:cn {c_phone_US_place_name_541_tl} {Oregon}
\tl_const:cn {c_phone_US_place_name_548_tl} {Ontario}
\tl_const:cn {c_phone_US_place_name_551_tl} {New~Jersey}
\tl_const:cn {c_phone_US_place_name_557_tl} {Missouri}
\tl_const:cn {c_phone_US_place_name_559_tl} {California}
\tl_const:cn {c_phone_US_place_name_561_tl} {Florida}
\tl_const:cn {c_phone_US_place_name_562_tl} {California}
\tl_const:cn {c_phone_US_place_name_563_tl} {Iowa}
\tl_const:cn {c_phone_US_place_name_564_tl} {Washington}
\tl_const:cn {c_phone_US_place_name_565_tl} {Georgia}
\tl_const:cn {c_phone_US_place_name_567_tl} {Ohio}
\tl_const:cn {c_phone_US_place_name_570_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_place_name_571_tl} {Virginia}
\tl_const:cn {c_phone_US_place_name_572_tl} {Oklahoma}
\tl_const:cn {c_phone_US_place_name_573_tl} {Missouri}
\tl_const:cn {c_phone_US_place_name_574_tl} {Indiana}
\tl_const:cn {c_phone_US_place_name_575_tl} {New~Mexico}
\tl_const:cn {c_phone_US_place_name_579_tl} {Quebec}
\tl_const:cn {c_phone_US_place_name_580_tl} {Oklahoma}
\tl_const:cn {c_phone_US_place_name_581_tl} {Quebec}
\tl_const:cn {c_phone_US_place_name_582_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_place_name_584_tl} {Manitoba}
\tl_const:cn {c_phone_US_place_name_585_tl} {New~York}
\tl_const:cn {c_phone_US_place_name_586_tl} {Michigan}
\tl_const:cn {c_phone_US_place_name_587_tl} {Alberta}
\tl_const:cn {c_phone_US_place_name_601_tl} {Mississippi}
\tl_const:cn {c_phone_US_place_name_602_tl} {Arizona}
\tl_const:cn {c_phone_US_place_name_603_tl} {New~Hampshire}
\tl_const:cn {c_phone_US_place_name_604_tl} {British~Columbia}
\tl_const:cn {c_phone_US_place_name_605_tl} {South~Dakota}
\tl_const:cn {c_phone_US_place_name_606_tl} {Kentucky}
\tl_const:cn {c_phone_US_place_name_607_tl} {New~York}
\tl_const:cn {c_phone_US_place_name_608_tl} {Wisconsin}
\tl_const:cn {c_phone_US_place_name_609_tl} {New~Jersey}
\tl_const:cn {c_phone_US_place_name_610_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_place_name_612_tl} {Minnesota}
\tl_const:cn {c_phone_US_place_name_613_tl} {Ontario}
\tl_const:cn {c_phone_US_place_name_614_tl} {Ohio}
\tl_const:cn {c_phone_US_place_name_615_tl} {Tennessee}
\tl_const:cn {c_phone_US_place_name_616_tl} {Michigan}
\tl_const:cn {c_phone_US_place_name_617_tl} {Massachusetts}
\tl_const:cn {c_phone_US_place_name_618_tl} {Illinois}
\tl_const:cn {c_phone_US_place_name_619_tl} {California}
\tl_const:cn {c_phone_US_place_name_620_tl} {Kansas}
\tl_const:cn {c_phone_US_place_name_621_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_623_tl} {Arizona}
\tl_const:cn {c_phone_US_place_name_624_tl} {New~York}
\tl_const:cn {c_phone_US_place_name_626_tl} {California}
\tl_const:cn {c_phone_US_place_name_628_tl} {California}
\tl_const:cn {c_phone_US_place_name_629_tl} {Tennessee}
\tl_const:cn {c_phone_US_place_name_630_tl} {Illinois}
\tl_const:cn {c_phone_US_place_name_631_tl} {New~York}
\tl_const:cn {c_phone_US_place_name_636_tl} {Missouri}
\tl_const:cn {c_phone_US_place_name_639_tl} {Saskatchewan}
\tl_const:cn {c_phone_US_place_name_640_tl} {New~Jersey}
\tl_const:cn {c_phone_US_place_name_641_tl} {Iowa}
\tl_const:cn {c_phone_US_place_name_645_tl} {Florida}
\tl_const:cn {c_phone_US_place_name_646_tl} {New~York}
\tl_const:cn {c_phone_US_place_name_647_tl} {Ontario}
\tl_const:cn {c_phone_US_place_name_649_tl} {Turks~and~Caicos~Islands}
\tl_const:cn {c_phone_US_place_name_650_tl} {California}
\tl_const:cn {c_phone_US_place_name_651_tl} {Minnesota}
\tl_const:cn {c_phone_US_place_name_656_tl} {Florida}
\tl_const:cn {c_phone_US_place_name_657_tl} {California}
\tl_const:cn {c_phone_US_place_name_658_tl} {Jamaica}
\tl_const:cn {c_phone_US_place_name_659_tl} {Alabama}
\tl_const:cn {c_phone_US_place_name_660_tl} {Missouri}
\tl_const:cn {c_phone_US_place_name_661_tl} {California}
\tl_const:cn {c_phone_US_place_name_662_tl} {Mississippi}
\tl_const:cn {c_phone_US_place_name_664_tl} {Montserrat}
\tl_const:cn {c_phone_US_place_name_667_tl} {Maryland}
\tl_const:cn {c_phone_US_place_name_669_tl} {California}
\tl_const:cn {c_phone_US_place_name_670_tl} {Northern~Mariana~Islands}
\tl_const:cn {c_phone_US_place_name_671_tl} {Guam}
\tl_const:cn {c_phone_US_place_name_672_tl} {British~Columbia}
\tl_const:cn {c_phone_US_place_name_678_tl} {Georgia}
\tl_const:cn {c_phone_US_place_name_679_tl} {Michigan}
\tl_const:cn {c_phone_US_place_name_680_tl} {New~York}
\tl_const:cn {c_phone_US_place_name_681_tl} {West~Virginia}
\tl_const:cn {c_phone_US_place_name_682_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_683_tl} {Ontario}
\tl_const:cn {c_phone_US_place_name_684_tl} {American~Samoa}
\tl_const:cn {c_phone_US_place_name_686_tl} {Virginia}
\tl_const:cn {c_phone_US_place_name_689_tl} {Florida}
\tl_const:cn {c_phone_US_place_name_701_tl} {North~Dakota}
\tl_const:cn {c_phone_US_place_name_702_tl} {Nevada}
\tl_const:cn {c_phone_US_place_name_703_tl} {Virginia}
\tl_const:cn {c_phone_US_place_name_704_tl} {North~Carolina}
\tl_const:cn {c_phone_US_place_name_705_tl} {Ontario}
\tl_const:cn {c_phone_US_place_name_706_tl} {Georgia}
\tl_const:cn {c_phone_US_place_name_707_tl} {California}
\tl_const:cn {c_phone_US_place_name_708_tl} {Illinois}
\tl_const:cn {c_phone_US_place_name_709_tl} {Newfoundland~and~Labrador}
\tl_const:cn {c_phone_US_place_name_712_tl} {Iowa}
\tl_const:cn {c_phone_US_place_name_713_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_714_tl} {California}
\tl_const:cn {c_phone_US_place_name_715_tl} {Wisconsin}
\tl_const:cn {c_phone_US_place_name_716_tl} {New~York}
\tl_const:cn {c_phone_US_place_name_717_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_place_name_718_tl} {New~York}
\tl_const:cn {c_phone_US_place_name_719_tl} {Colorado}
\tl_const:cn {c_phone_US_place_name_720_tl} {Colorado}
\tl_const:cn {c_phone_US_place_name_721_tl} {Sint~Maarten}
\tl_const:cn {c_phone_US_place_name_724_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_place_name_725_tl} {Nevada}
\tl_const:cn {c_phone_US_place_name_726_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_727_tl} {Florida}
\tl_const:cn {c_phone_US_place_name_728_tl} {Florida}
\tl_const:cn {c_phone_US_place_name_729_tl} {Tennessee}
\tl_const:cn {c_phone_US_place_name_730_tl} {Illinois}
\tl_const:cn {c_phone_US_place_name_731_tl} {Tennessee}
\tl_const:cn {c_phone_US_place_name_732_tl} {New~Jersey}
\tl_const:cn {c_phone_US_place_name_734_tl} {Michigan}
\tl_const:cn {c_phone_US_place_name_737_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_738_tl} {California}
\tl_const:cn {c_phone_US_place_name_740_tl} {Ohio}
\tl_const:cn {c_phone_US_place_name_742_tl} {Ontario}
\tl_const:cn {c_phone_US_place_name_743_tl} {North~Carolina}
\tl_const:cn {c_phone_US_place_name_747_tl} {California}
\tl_const:cn {c_phone_US_place_name_748_tl} {Colorado}
\tl_const:cn {c_phone_US_place_name_753_tl} {Ontario}
\tl_const:cn {c_phone_US_place_name_754_tl} {Florida}
\tl_const:cn {c_phone_US_place_name_757_tl} {Virginia}
\tl_const:cn {c_phone_US_place_name_758_tl} {Saint~Lucia}
\tl_const:cn {c_phone_US_place_name_760_tl} {California}
\tl_const:cn {c_phone_US_place_name_761_tl} {Kentucky}
\tl_const:cn {c_phone_US_place_name_762_tl} {Georgia}
\tl_const:cn {c_phone_US_place_name_763_tl} {Minnesota}
\tl_const:cn {c_phone_US_place_name_765_tl} {Indiana}
\tl_const:cn {c_phone_US_place_name_767_tl} {Dominica}
\tl_const:cn {c_phone_US_place_name_769_tl} {Mississippi}
\tl_const:cn {c_phone_US_place_name_770_tl} {Georgia}
\tl_const:cn {c_phone_US_place_name_771_tl} {Washington,~D.\,C.}
\tl_const:cn {c_phone_US_place_name_772_tl} {Florida}
\tl_const:cn {c_phone_US_place_name_773_tl} {Illinois}
\tl_const:cn {c_phone_US_place_name_774_tl} {Massachusetts}
\tl_const:cn {c_phone_US_place_name_775_tl} {Nevada}
\tl_const:cn {c_phone_US_place_name_778_tl} {British~Columbia}
\tl_const:cn {c_phone_US_place_name_779_tl} {Illinois}
\tl_const:cn {c_phone_US_place_name_780_tl} {Alberta}
\tl_const:cn {c_phone_US_place_name_781_tl} {Massachusetts}
\tl_const:cn {c_phone_US_place_name_782_tl} {Nova~Scotia,~Prince~Edward~Island}
\tl_const:cn {c_phone_US_place_name_784_tl} {Saint~Vincent~and~the~Grenadines}
\tl_const:cn {c_phone_US_place_name_785_tl} {Kansas}
\tl_const:cn {c_phone_US_place_name_786_tl} {Florida}
\tl_const:cn {c_phone_US_place_name_787_tl} {Puerto~Rico}
\tl_const:cn {c_phone_US_place_name_801_tl} {Utah}
\tl_const:cn {c_phone_US_place_name_802_tl} {Vermont}
\tl_const:cn {c_phone_US_place_name_803_tl} {South~Carolina}
\tl_const:cn {c_phone_US_place_name_804_tl} {Virginia}
\tl_const:cn {c_phone_US_place_name_805_tl} {California}
\tl_const:cn {c_phone_US_place_name_806_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_807_tl} {Ontario}
\tl_const:cn {c_phone_US_place_name_808_tl} {Hawaii}
\tl_const:cn {c_phone_US_place_name_809_tl} {Dominican~Republic}
\tl_const:cn {c_phone_US_place_name_810_tl} {Michigan}
\tl_const:cn {c_phone_US_place_name_812_tl} {Indiana}
\tl_const:cn {c_phone_US_place_name_813_tl} {Florida}
\tl_const:cn {c_phone_US_place_name_814_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_place_name_815_tl} {Illinois}
\tl_const:cn {c_phone_US_place_name_816_tl} {Missouri}
\tl_const:cn {c_phone_US_place_name_817_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_818_tl} {California}
\tl_const:cn {c_phone_US_place_name_819_tl} {Quebec}
\tl_const:cn {c_phone_US_place_name_820_tl} {California}
\tl_const:cn {c_phone_US_place_name_821_tl} {South~Carolina}
\tl_const:cn {c_phone_US_place_name_825_tl} {Alberta}
\tl_const:cn {c_phone_US_place_name_826_tl} {Virginia}
\tl_const:cn {c_phone_US_place_name_828_tl} {North~Carolina}
\tl_const:cn {c_phone_US_place_name_829_tl} {Dominican~Republic}
\tl_const:cn {c_phone_US_place_name_830_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_831_tl} {California}
\tl_const:cn {c_phone_US_place_name_832_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_835_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_place_name_837_tl} {California}
\tl_const:cn {c_phone_US_place_name_838_tl} {New~York}
\tl_const:cn {c_phone_US_place_name_839_tl} {South~Carolina}
\tl_const:cn {c_phone_US_place_name_840_tl} {California}
\tl_const:cn {c_phone_US_place_name_843_tl} {South~Carolina}
\tl_const:cn {c_phone_US_place_name_845_tl} {New~York}
\tl_const:cn {c_phone_US_place_name_847_tl} {Illinois}
\tl_const:cn {c_phone_US_place_name_848_tl} {New~Jersey}
\tl_const:cn {c_phone_US_place_name_849_tl} {Dominican~Republic}
\tl_const:cn {c_phone_US_place_name_850_tl} {Florida}
\tl_const:cn {c_phone_US_place_name_854_tl} {South~Carolina}
\tl_const:cn {c_phone_US_place_name_856_tl} {New~Jersey}
\tl_const:cn {c_phone_US_place_name_857_tl} {Massachusetts}
\tl_const:cn {c_phone_US_place_name_858_tl} {California}
\tl_const:cn {c_phone_US_place_name_859_tl} {Kentucky}
\tl_const:cn {c_phone_US_place_name_860_tl} {Connecticut}
\tl_const:cn {c_phone_US_place_name_861_tl} {Illinois}
\tl_const:cn {c_phone_US_place_name_862_tl} {New~Jersey}
\tl_const:cn {c_phone_US_place_name_863_tl} {Florida}
\tl_const:cn {c_phone_US_place_name_864_tl} {South~Carolina}
\tl_const:cn {c_phone_US_place_name_865_tl} {Tennessee}
\tl_const:cn {c_phone_US_place_name_867_tl} {Yukon,~Northwest~Territories,~Nunavut}
\tl_const:cn {c_phone_US_place_name_868_tl} {Trinidad~and~Tobago}
\tl_const:cn {c_phone_US_place_name_869_tl} {Saint~Kitts~and~Nevis}
\tl_const:cn {c_phone_US_place_name_870_tl} {Arkansas}
\tl_const:cn {c_phone_US_place_name_872_tl} {Illinois}
\tl_const:cn {c_phone_US_place_name_873_tl} {Quebec}
\tl_const:cn {c_phone_US_place_name_876_tl} {Jamaica}
\tl_const:cn {c_phone_US_place_name_878_tl} {Pennsylvania}
\tl_const:cn {c_phone_US_place_name_879_tl} {Newfoundland~and~Labrador}
\tl_const:cn {c_phone_US_place_name_901_tl} {Tennessee}
\tl_const:cn {c_phone_US_place_name_902_tl} {Nova~Scotia,~Prince~Edward~Island}
\tl_const:cn {c_phone_US_place_name_903_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_904_tl} {Florida}
\tl_const:cn {c_phone_US_place_name_905_tl} {Ontario}
\tl_const:cn {c_phone_US_place_name_906_tl} {Michigan}
\tl_const:cn {c_phone_US_place_name_907_tl} {Alaska}
\tl_const:cn {c_phone_US_place_name_908_tl} {New~Jersey}
\tl_const:cn {c_phone_US_place_name_909_tl} {California}
\tl_const:cn {c_phone_US_place_name_910_tl} {North~Carolina}
\tl_const:cn {c_phone_US_place_name_912_tl} {Georgia}
\tl_const:cn {c_phone_US_place_name_913_tl} {Kansas}
\tl_const:cn {c_phone_US_place_name_914_tl} {New~York}
\tl_const:cn {c_phone_US_place_name_915_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_916_tl} {California}
\tl_const:cn {c_phone_US_place_name_917_tl} {New~York}
\tl_const:cn {c_phone_US_place_name_918_tl} {Oklahoma}
\tl_const:cn {c_phone_US_place_name_919_tl} {North~Carolina}
\tl_const:cn {c_phone_US_place_name_920_tl} {Wisconsin}
\tl_const:cn {c_phone_US_place_name_924_tl} {Minnesota}
\tl_const:cn {c_phone_US_place_name_925_tl} {California}
\tl_const:cn {c_phone_US_place_name_928_tl} {Arizona}
\tl_const:cn {c_phone_US_place_name_929_tl} {New~York}
\tl_const:cn {c_phone_US_place_name_930_tl} {Indiana}
\tl_const:cn {c_phone_US_place_name_931_tl} {Tennessee}
\tl_const:cn {c_phone_US_place_name_934_tl} {New~York}
\tl_const:cn {c_phone_US_place_name_936_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_937_tl} {Ohio}
\tl_const:cn {c_phone_US_place_name_938_tl} {Alabama}
\tl_const:cn {c_phone_US_place_name_939_tl} {Puerto~Rico}
\tl_const:cn {c_phone_US_place_name_940_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_941_tl} {Florida}
\tl_const:cn {c_phone_US_place_name_942_tl} {Ontario}
\tl_const:cn {c_phone_US_place_name_943_tl} {Georgia}
\tl_const:cn {c_phone_US_place_name_945_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_947_tl} {Michigan}
\tl_const:cn {c_phone_US_place_name_948_tl} {Virginia}
\tl_const:cn {c_phone_US_place_name_949_tl} {California}
\tl_const:cn {c_phone_US_place_name_951_tl} {California}
\tl_const:cn {c_phone_US_place_name_952_tl} {Minnesota}
\tl_const:cn {c_phone_US_place_name_954_tl} {Florida}
\tl_const:cn {c_phone_US_place_name_956_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_959_tl} {Connecticut}
\tl_const:cn {c_phone_US_place_name_970_tl} {Colorado}
\tl_const:cn {c_phone_US_place_name_971_tl} {Oregon}
\tl_const:cn {c_phone_US_place_name_972_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_973_tl} {New~Jersey}
\tl_const:cn {c_phone_US_place_name_975_tl} {Missouri}
\tl_const:cn {c_phone_US_place_name_978_tl} {Massachusetts}
\tl_const:cn {c_phone_US_place_name_979_tl} {Texas}
\tl_const:cn {c_phone_US_place_name_980_tl} {North~Carolina}
\tl_const:cn {c_phone_US_place_name_983_tl} {Colorado}
\tl_const:cn {c_phone_US_place_name_984_tl} {North~Carolina}
\tl_const:cn {c_phone_US_place_name_985_tl} {Louisiana}
\tl_const:cn {c_phone_US_place_name_986_tl} {Idaho}
\tl_const:cn {c_phone_US_place_name_989_tl} {Michigan}
\tl_const:cn {c_phone_US_place_name_500_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_place_name_521_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_place_name_522_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_place_name_523_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_place_name_524_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_place_name_525_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_place_name_526_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_place_name_527_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_place_name_528_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_place_name_529_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_place_name_532_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_place_name_533_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_place_name_538_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_place_name_542_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_place_name_544_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_place_name_566_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_place_name_577_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_place_name_588_tl} {Non-Geographic~Service}
\tl_const:cn {c_phone_US_place_name_600_tl} {Canadian~Non-Geographic~Tariffed~Service}
\tl_const:cn {c_phone_US_place_name_622_tl} {Canadian~Non-Geographic~Service}
\tl_const:cn {c_phone_US_place_name_633_tl} {Canadian~Non-Geographic~Service}
\tl_const:cn {c_phone_US_place_name_700_tl} {Interexchange~Carrier~Service}
\tl_const:cn {c_phone_US_place_name_710_tl} {US~Government}
\tl_const:cn {c_phone_US_place_name_800_tl} {Toll-Free}
\tl_const:cn {c_phone_US_place_name_833_tl} {Toll-Free}
\tl_const:cn {c_phone_US_place_name_844_tl} {Toll-Free}
\tl_const:cn {c_phone_US_place_name_855_tl} {Toll-Free}
\tl_const:cn {c_phone_US_place_name_866_tl} {Toll-Free}
\tl_const:cn {c_phone_US_place_name_877_tl} {Toll-Free}
\tl_const:cn {c_phone_US_place_name_888_tl} {Toll-Free}
\tl_const:cn {c_phone_US_place_name_900_tl} {Premium~Service}

\tl_const:Nn \c_phone_US_landesadjektiv_tl {North~American}
\bool_const:Nn \c_phone_US_erlaubt_durchwahl_bool {\c_false_bool}

\clist_new:N \c_phone_US_area_codes_clist
\clist_concat:NNN \c_phone_US_area_codes_clist \c_phone_US_geographic_area_codes_clist \c_phone_US_nongeographic_area_codes_clist

\msg_new:nnn {phonenumbers} {US/illegal home area code}
   {
      10-digit~dialling~is~required~in~\tl_use:c {c_phone_US_place_name_ #1 _tl}.~#1~cannot~be~set~as~home~area~code~\msg_line_context:.
   }

\msg_new:nnn {phonenumbers} {US/invalid area code}
   {
      unknown~area~code~#1~in~North~American~phone~number~\msg_line_context:
   }

\msg_new:nnn {phonenumbers} {US/invalid central office code}
   {
      invalid~central~office~code~#1~in~North~American~phone~number~\msg_line_context:
   }

\bool_new:N \l_phone_US_ferngespraechspraefix_bool

\keys_define:nn {phonenumbers}
   {
      trunk-prefix .choices:nn = {on,off}
         {
            \str_if_eq:VnTF \l_keys_choice_tl {on}
               {
                  \bool_set_true:N \l_phone_US_ferngespraechspraefix_bool
               }
               {
                  \bool_set_false:N \l_phone_US_ferngespraechspraefix_bool
               }
         },
      trunk-prefix .initial:n = off,
      trunk-prefix .default:n = on
   }

% Prüfe, ob eine Vorwahl als Heimatvorwahl zulässig ist.
% #1: Heimatvorwahl
\prg_new_protected_conditional:Npnn \phone_US_heimatvorwahl_erlaubt:n #1 {T}
   {
      \clist_if_in:NnTF \c_phone_US_geographic_area_codes_clist {#1}
         {
            % In Nordamerika können nur nicht obligatorische Ortsvorwahlen Heimatvorwahl sein.
            \clist_if_in:NnTF \c_phone_US_required_area_codes_clist {#1}
               {
                  \msg_warning:onn {phonenumbers} {US/illegal home area code} {#1}
                  \prg_return_false:
               }
               {
                  \prg_return_true:
               }
         }
         {
            \msg_warning:nnn {phonenumbers} {invalid home area code} {#1}
            \prg_return_false:
         }
   }

% #1: Vorwahl, #2: Folgt eine Rufnummer?
\cs_new_protected:Npn \phone_US_vorwahl_schreiben:nN #1 #2
   {
      \bool_lazy_or:nnTF { \str_if_eq_p:Vn \l_phone_auslandsvorwahltyp_str {off} } { \str_if_eq_p:Vn \l_phone_heimatland_str {US} }
         {
            \bool_lazy_and:nnF { \str_if_eq_p:Vn \l_phone_heimatland_str {US} } { \str_if_eq_p:Vn \l_phone_heimatvorwahl_str {#1} }
               {
                  \bool_if:NTF \l_phone_US_ferngespraechspraefix_bool
                     {
                        \tl_put_right:Nx \l_phone_ausgabetext_tl
                           {
                              \str_if_eq:VnT \l_phone_vorwahldarstellung_str {place-and-number}
                                 {
                                    \tl_if_exist:cT {c_phone_US_place_name_ #1 _tl}
                                       {
                                          \tl_use:c {c_phone_US_place_name_ #1 _tl}
                                          \c_space_tl
                                       }
                                 }

                              \bool_if:NTF #2
                                 {
                                    \str_case:VnF \l_phone_vorwahltrennung_str
                                       {
                                          {brackets} {1 \c_space_tl (#1) \c_space_tl}
                                          {space} {1 \c_space_tl #1 \c_space_tl}
                                       }
                                       {
                                          1 \c_phone_bindestrich_tl #1 \c_phone_bindestrich_tl
                                       }
                                 }
                                 {
                                    \str_case:VnF \l_phone_vorwahltrennung_str
                                       {
                                          {brackets} {1 \c_space_tl (#1)}
                                          {space} {1 \c_space_tl #1}
                                       }
                                       {
                                          1 \c_phone_bindestrich_tl #1
                                       }
                                 }
                           }
                     }
                     {
                        \str_if_eq:VnT \l_phone_vorwahldarstellung_str {place}
                           {
                              \clist_if_in:NnT \c_phone_US_nongeographic_area_codes_clist {#1}
                                 {
                                    \str_set:Nn \l_phone_vorwahldarstellung_str {number}
                                 }
                           }

                        \tl_put_right:Nx \l_phone_ausgabetext_tl
                           {
                              \str_case:Vn \l_phone_vorwahldarstellung_str
                                 {
                                    {number}
                                       {
                                          \bool_if:NTF #2
                                             {
                                                \str_case:VnF \l_phone_vorwahltrennung_str
                                                   {
                                                      {brackets} {(#1) \c_space_tl}
                                                      {space} {#1 \c_space_tl}
                                                   }
                                                   {
                                                      #1 \c_phone_bindestrich_tl
                                                   }
                                             }
                                             {
                                                #1
                                             }
                                       }
                                    {place}
                                       {
                                          \bool_if:NTF #2
                                             {
                                                \str_case:VnF \l_phone_vorwahltrennung_str
                                                   {
                                                      {brackets}
                                                         {
                                                            (
                                                            \tl_if_exist:cTF {c_phone_US_place_name_ #1 _tl}
                                                               {
                                                                  \tl_use:c {c_phone_US_place_name_ #1 _tl}
                                                               }
                                                               {
                                                                  #1
                                                               }
                                                            )
                                                            \c_space_tl
                                                         }
                                                   }
                                                   {
                                                      \tl_if_exist:cTF {c_phone_US_place_name_ #1 _tl}
                                                         {
                                                            \tl_use:c {c_phone_US_place_name_ #1 _tl}
                                                            \c_space_tl
                                                         }
                                                         {
                                                            #1 \c_phone_bindestrich_tl
                                                         }
                                                   }
                                             }
                                             {
                                                \tl_if_exist:cTF {c_phone_US_place_name_ #1 _tl}
                                                   {
                                                      \tl_use:c {c_phone_US_place_name_ #1 _tl}
                                                   }
                                                   {
                                                      #1
                                                   }
                                             }
                                       }
                                    {place-and-number}
                                       {
                                          \tl_if_exist:cT {c_phone_US_place_name_ #1 _tl}
                                             {
                                                \tl_use:c {c_phone_US_place_name_ #1 _tl}
                                                \c_space_tl
                                             }

                                          \bool_if:NTF #2
                                             {
                                                \str_case:VnF \l_phone_vorwahltrennung_str
                                                   {
                                                      {brackets} {(#1) \c_space_tl}
                                                      {space} {#1 \c_space_tl}
                                                   }
                                                   {
                                                      #1 \c_phone_bindestrich_tl
                                                   }
                                             }
                                             {
                                                \str_if_eq:VnTF \l_phone_vorwahltrennung_str {brackets}
                                                   {
                                                      (#1)
                                                   }
                                                   {
                                                      #1
                                                   }
                                             }
                                       }
                                 }
                           }
                     }
               }
         }
         {
            \phone_ungruppierte_auslandsvorwahl_schreiben:n {1}

            \tl_put_right:Nn \l_phone_ausgabetext_tl {\c_space_tl}

            \str_if_eq:VnTF \l_phone_auslandsvorwahltrennung_str {brackets}
               {
                  \tl_put_right:Nn \l_phone_ausgabetext_tl {(#1)}
               }
               {
                  \tl_put_right:Nn \l_phone_ausgabetext_tl {#1}
               }

            \bool_if:NT #2
               {
                  \tl_put_right:NV \l_phone_ausgabetext_tl \c_space_tl
               }
         }

      % Linktext schreiben, falls eine Rufnummer folgt
      \bool_if:NT #2
         {
            \str_put_right:Nn \l_phone_linktext_str {+1 #1}
         }
   }

\cs_generate_variant:Nn \phone_US_vorwahl_schreiben:nN {VN}

% #1: Ortsvorwahl, #2: Vermittlungsstellennummer
\cs_new_protected:Npn \phone_US_vermittlungsstellennummer_schreiben:nn #1 #2
   {
      \str_case:xnTF { \str_head:n {#2} }
         {
            {0} { }
            {1} { }
         }
         {
            \msg_warning:nnn {phonenumbers} {US/invalid central office code} {#2}
         }
         {
            \bool_set_false:N \l_tmpa_bool % Regionalnummer?

            \tl_if_empty:nTF {#1}
               {
                  \bool_set_true:N \l_tmpa_bool
               }
               {
                  \clist_if_in:NnT \c_phone_US_geographic_area_codes_clist {#1}
                     {
                        \bool_set_true:N \l_tmpa_bool
                     }
               }

            \bool_if:NTF \l_tmpa_bool
               {
                  \str_if_eq:xnT { \str_range:nnn {#2} {2} {3} } {11}
                     {
                        \msg_warning:nnn {phonenumbers} {US/invalid central office code} {#2}
                     }
               }
               {
                  \str_if_eq:nnT {#2} {911}
                     {
                        \msg_warning:nnn {phonenumbers} {US/invalid central office code} {#2}
                     }
               }
         }

      \tl_put_right:Nn \l_phone_ausgabetext_tl {#2}

      \bool_lazy_or:nnTF { \str_if_eq_p:Vn \l_phone_auslandsvorwahltyp_str {off} } { \str_if_eq_p:Vn \l_phone_heimatland_str {US} }
         {
            \tl_put_right:NV \l_phone_ausgabetext_tl \c_phone_bindestrich_tl
         }
         {
            \tl_if_empty:nTF {#1}
               {
                  \tl_put_right:NV \l_phone_ausgabetext_tl \c_phone_bindestrich_tl
               }
               {
                  \tl_put_right:NV \l_phone_ausgabetext_tl \c_space_tl
               }
         }

      % Linktext schreiben, falls eine Vorwahl vorangeht
      \tl_if_empty:nF {#1}
         {
            \str_put_right:Nn \l_phone_linktext_str {#2}
         }
   }

\cs_generate_variant:Nn \phone_US_vermittlungsstellennummer_schreiben:nn {Vx}

\cs_new_protected:Npn \phone_US_nummer_schreiben:
   {
      \int_case:nnF { \str_count:N \l_phone_bereinigte_nummer_str }
         {
            {3}
               {
                  \clist_if_in:NVTF \c_phone_US_area_codes_clist \l_phone_bereinigte_nummer_str
                     {
                        \msg_warning:nn {phonenumbers} {missing subscriber number}
                     }
                     {
                        \msg_warning:nnV {phonenumbers} {US/invalid area code} \l_phone_bereinigte_nummer_str
                     }

                  \phone_US_vorwahl_schreiben:VN \l_phone_bereinigte_nummer_str \c_false_bool
               }
            {7}
               {
                  \phone_US_vermittlungsstellennummer_schreiben:Vx \c_empty_tl { \str_range:Nnn \l_phone_bereinigte_nummer_str {1} {3} }

                  \tl_put_right:Nx \l_phone_ausgabetext_tl { \str_range:Nnn \l_phone_bereinigte_nummer_str {4} {7} }
               }
            {10}
               {
                  \str_set:Nx \l_tmpa_str { \str_range:Nnn \l_phone_bereinigte_nummer_str {1} {3} }

                  \clist_if_in:NVF \c_phone_US_area_codes_clist \l_tmpa_str
                     {
                        \msg_warning:nnx {phonenumbers} {US/invalid area code} {\l_tmpa_str}
                     }

                  \phone_US_vorwahl_schreiben:VN \l_tmpa_str \c_true_bool

                  \phone_US_vermittlungsstellennummer_schreiben:Vx \l_tmpa_str { \str_range:Nnn \l_phone_bereinigte_nummer_str {4} {6} }

                  \tl_put_right:Nx \l_phone_ausgabetext_tl { \str_range:Nnn \l_phone_bereinigte_nummer_str {7} {10} }
                  \str_put_right:Nx \l_phone_linktext_str { \str_range:Nnn \l_phone_bereinigte_nummer_str {7} {10} }
               }
         }
         {
            \int_compare:nNnTF { \str_count:N \l_phone_bereinigte_nummer_str } < {10}
               {
                  \msg_warning:nnnn {phonenumbers} {number too short} {phone} {10}
               }
               {
                  \msg_warning:nnnn {phonenumbers} {number too long} {phone} {10}
               }

            \tl_put_right:NV \l_phone_ausgabetext_tl \l_phone_bereinigte_nummer_str
         }
   }

\cs_new_protected:Npn \phone_US_vorwahlliste_ausgeben:n #1
   {
      \begin{tabbing}
      \hspace {3em} \= \kill

      \bool_set_false:N \l_phone_zeilenumbruch_bool

      \clist_map_inline:cn {c_phone_US_ #1 _clist}
         {
            \bool_if:NTF \l_phone_zeilenumbruch_bool
               {
                  \\
               }
               {
                  \bool_gset_true:N \l_phone_zeilenumbruch_bool
               }

            ##1
            \>
            \tl_if_exist:cT {c_phone_US_place_name_ ##1 _tl}
               {
                  \tl_use:c {c_phone_US_place_name_ ##1 _tl}
               }
         }
      \end{tabbing}
   }
