pakdatakit 2.2.1 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/DATA.md +512 -34
  2. package/LICENSE +1 -1
  3. package/NOTICE +14 -0
  4. package/README.md +472 -28
  5. package/dist/address.cjs +6 -5
  6. package/dist/address.js +4 -3
  7. package/dist/bills.cjs +19 -0
  8. package/dist/bills.d.cts +63 -0
  9. package/dist/bills.d.ts +63 -0
  10. package/dist/bills.js +2 -0
  11. package/dist/{chunk-4VSGCQ6K.cjs → chunk-2OBKPYJZ.cjs} +3 -3
  12. package/dist/chunk-33GOK7EE.cjs +5312 -0
  13. package/dist/chunk-33QMFE2Z.js +21244 -0
  14. package/dist/chunk-34U2ZMHR.js +194 -0
  15. package/dist/chunk-4GSBHJX6.js +165 -0
  16. package/dist/chunk-5DDHO5Z7.cjs +565 -0
  17. package/dist/chunk-5EY5DQS7.js +51 -0
  18. package/dist/chunk-5RGX4DWF.js +559 -0
  19. package/dist/chunk-5UCRHVI4.cjs +302 -0
  20. package/dist/{chunk-TTARJWGT.js → chunk-7DY26QPN.js} +2 -2
  21. package/dist/chunk-7E7L3NYS.cjs +11 -0
  22. package/dist/{chunk-3ZA265SK.cjs → chunk-AUQFA7EE.cjs} +172 -4
  23. package/dist/{chunk-QKH7W2CC.js → chunk-B7DOQ5QF.js} +6 -5
  24. package/dist/{chunk-HBOZIITD.js → chunk-CADQM4ZN.js} +14 -14
  25. package/dist/chunk-CF6AMRBU.cjs +198 -0
  26. package/dist/chunk-CZOZB4K3.js +61 -0
  27. package/dist/{chunk-3IARSCO6.cjs → chunk-DHOP7LQX.cjs} +25 -14
  28. package/dist/chunk-E2XU6NOW.js +909 -0
  29. package/dist/chunk-E6GWBOKV.cjs +911 -0
  30. package/dist/chunk-E6HSKRAE.js +9 -0
  31. package/dist/chunk-EA3SIHYT.js +313 -0
  32. package/dist/{chunk-33FXHM2E.cjs → chunk-ESKXG7Y6.cjs} +5 -5
  33. package/dist/chunk-I7UUPD3G.cjs +21252 -0
  34. package/dist/{chunk-YPPKY5XZ.js → chunk-IBZPJS4H.js} +26 -15
  35. package/dist/chunk-IDTRFOQW.js +35 -0
  36. package/dist/{chunk-XCXFGTHW.cjs → chunk-J5ZF46NZ.cjs} +14 -14
  37. package/dist/{chunk-NZQ47NWD.js → chunk-KRYHLYN2.js} +1 -1
  38. package/dist/{chunk-RXNYY5K5.js → chunk-LQHM3ADX.js} +172 -4
  39. package/dist/{chunk-HTERSQGF.cjs → chunk-MTS6SVNP.cjs} +4 -4
  40. package/dist/chunk-OTI7HY55.js +297 -0
  41. package/dist/{chunk-6IPPANNX.js → chunk-P7LVE2TF.js} +2 -2
  42. package/dist/{chunk-47P7HILD.cjs → chunk-QFPEFD67.cjs} +9 -8
  43. package/dist/chunk-RZQJAZKC.js +22 -0
  44. package/dist/{chunk-PLDVGOKZ.js → chunk-S274QFFB.js} +2 -2
  45. package/dist/chunk-SF4ECUZ6.cjs +56 -0
  46. package/dist/chunk-SQIHFEXI.cjs +25 -0
  47. package/dist/{chunk-NAJGGUAM.cjs → chunk-TC3VRWZV.cjs} +2 -2
  48. package/dist/{chunk-U7MWHXMF.cjs → chunk-TVL6RDAU.cjs} +4 -4
  49. package/dist/chunk-UYFTXD4P.js +168 -0
  50. package/dist/{chunk-AZV45DMG.js → chunk-V2XE3NCG.js} +2 -2
  51. package/dist/chunk-XCFZKCV2.cjs +37 -0
  52. package/dist/chunk-XOTCIXY6.js +5301 -0
  53. package/dist/chunk-XVEG53NN.cjs +322 -0
  54. package/dist/chunk-YDUXIENX.cjs +172 -0
  55. package/dist/chunk-YPAWNWFD.cjs +168 -0
  56. package/dist/chunk-YQFI7W3I.cjs +65 -0
  57. package/dist/{chunk-NTD4JLDW.cjs → chunk-YTLE5K7G.cjs} +1 -1
  58. package/dist/{chunk-EMH4IP2U.js → chunk-ZRONAQBV.js} +1 -1
  59. package/dist/class-validator.cjs +65 -0
  60. package/dist/class-validator.d.cts +63 -0
  61. package/dist/class-validator.d.ts +63 -0
  62. package/dist/class-validator.js +54 -0
  63. package/dist/cli.js +1 -1
  64. package/dist/courier.cjs +16 -0
  65. package/dist/courier.d.cts +51 -0
  66. package/dist/courier.d.ts +51 -0
  67. package/dist/courier.js +3 -0
  68. package/dist/fbr-invoice.cjs +25 -0
  69. package/dist/fbr-invoice.d.cts +170 -0
  70. package/dist/fbr-invoice.d.ts +170 -0
  71. package/dist/fbr-invoice.js +4 -0
  72. package/dist/geo.cjs +23 -6
  73. package/dist/geo.d.cts +56 -1
  74. package/dist/geo.d.ts +56 -1
  75. package/dist/geo.js +2 -1
  76. package/dist/holidays.cjs +4 -4
  77. package/dist/holidays.js +1 -1
  78. package/dist/iban.cjs +5 -5
  79. package/dist/iban.d.cts +8 -6
  80. package/dist/iban.d.ts +8 -6
  81. package/dist/iban.js +1 -1
  82. package/dist/incometax.cjs +27 -0
  83. package/dist/incometax.d.cts +91 -0
  84. package/dist/incometax.d.ts +91 -0
  85. package/dist/incometax.js +2 -0
  86. package/dist/index.cjs +253 -111
  87. package/dist/index.d.cts +12 -4
  88. package/dist/index.d.ts +12 -4
  89. package/dist/index.js +25 -15
  90. package/dist/input.cjs +9 -9
  91. package/dist/input.js +3 -3
  92. package/dist/joi.cjs +43 -0
  93. package/dist/joi.d.cts +25 -0
  94. package/dist/joi.d.ts +25 -0
  95. package/dist/joi.js +37 -0
  96. package/dist/networks.cjs +3 -3
  97. package/dist/networks.js +2 -2
  98. package/dist/numbers.cjs +6 -6
  99. package/dist/numbers.js +2 -2
  100. package/dist/passport.cjs +11 -0
  101. package/dist/passport.d.cts +27 -0
  102. package/dist/passport.d.ts +27 -0
  103. package/dist/passport.js +2 -0
  104. package/dist/phone.cjs +8 -8
  105. package/dist/phone.js +3 -3
  106. package/dist/postal.cjs +14 -6
  107. package/dist/postal.d.cts +54 -2
  108. package/dist/postal.d.ts +54 -2
  109. package/dist/postal.js +1 -1
  110. package/dist/quality.cjs +25 -0
  111. package/dist/quality.d.cts +62 -0
  112. package/dist/quality.d.ts +62 -0
  113. package/dist/quality.js +8 -0
  114. package/dist/raast.cjs +6 -6
  115. package/dist/raast.js +2 -2
  116. package/dist/salestax.cjs +20 -0
  117. package/dist/salestax.d.cts +106 -0
  118. package/dist/salestax.d.ts +106 -0
  119. package/dist/salestax.js +3 -0
  120. package/dist/superstruct.cjs +41 -0
  121. package/dist/superstruct.d.cts +25 -0
  122. package/dist/superstruct.d.ts +25 -0
  123. package/dist/superstruct.js +39 -0
  124. package/dist/text.cjs +21 -5
  125. package/dist/text.d.cts +90 -1
  126. package/dist/text.d.ts +90 -1
  127. package/dist/text.js +1 -1
  128. package/dist/valibot.cjs +18 -8
  129. package/dist/valibot.d.cts +3 -0
  130. package/dist/valibot.d.ts +3 -0
  131. package/dist/valibot.js +17 -7
  132. package/dist/vehicle.cjs +15 -0
  133. package/dist/vehicle.d.cts +43 -0
  134. package/dist/vehicle.d.ts +43 -0
  135. package/dist/vehicle.js +2 -0
  136. package/dist/whatsapp.cjs +3 -3
  137. package/dist/whatsapp.js +2 -2
  138. package/dist/yup.cjs +18 -8
  139. package/dist/yup.d.cts +3 -0
  140. package/dist/yup.d.ts +3 -0
  141. package/dist/yup.js +17 -7
  142. package/dist/zod.cjs +18 -8
  143. package/dist/zod.d.cts +3 -0
  144. package/dist/zod.d.ts +3 -0
  145. package/dist/zod.js +17 -7
  146. package/package.json +167 -6
  147. package/dist/chunk-34CJGJ67.cjs +0 -1697
  148. package/dist/chunk-4VVFS6FN.cjs +0 -715
  149. package/dist/chunk-E6DT2DWQ.js +0 -1689
  150. package/dist/chunk-GJENL6VK.cjs +0 -22
  151. package/dist/chunk-HUQY2WR5.js +0 -20
  152. package/dist/chunk-JKE4AMSZ.js +0 -47
  153. package/dist/chunk-KEHCTYLO.cjs +0 -52
  154. package/dist/chunk-LIYNKIKS.js +0 -709
@@ -1,709 +0,0 @@
1
- import { lazy, normalizeKey } from './chunk-ENQ7O7VW.js';
2
-
3
- // data/postal-codes.json
4
- var postal_codes_default = [
5
- {
6
- city: "Islamabad",
7
- postalCode: "44000",
8
- area: "Islamabad GPO",
9
- primary: true
10
- },
11
- {
12
- city: "Rawalpindi",
13
- postalCode: "46000",
14
- area: "Rawalpindi GPO",
15
- primary: true
16
- },
17
- {
18
- city: "Rawalpindi",
19
- postalCode: "46300",
20
- area: "Satellite Town"
21
- },
22
- {
23
- city: "Murree",
24
- postalCode: "47150",
25
- area: "Murree GPO",
26
- primary: true
27
- },
28
- {
29
- city: "Taxila",
30
- postalCode: "47040",
31
- area: "Taxila GPO",
32
- primary: true
33
- },
34
- {
35
- city: "Lahore",
36
- postalCode: "54000",
37
- area: "Lahore GPO",
38
- primary: true
39
- },
40
- {
41
- city: "Lahore",
42
- postalCode: "54660",
43
- area: "Gulberg"
44
- },
45
- {
46
- city: "Lahore",
47
- postalCode: "54700",
48
- area: "Model Town"
49
- },
50
- {
51
- city: "Lahore",
52
- postalCode: "54810",
53
- area: "Lahore Cantt"
54
- },
55
- {
56
- city: "Lahore",
57
- postalCode: "54570",
58
- area: "Iqbal Town"
59
- },
60
- {
61
- city: "Faisalabad",
62
- postalCode: "38000",
63
- area: "Faisalabad GPO",
64
- primary: true
65
- },
66
- {
67
- city: "Multan",
68
- postalCode: "60000",
69
- area: "Multan GPO",
70
- primary: true
71
- },
72
- {
73
- city: "Gujranwala",
74
- postalCode: "52250",
75
- area: "Gujranwala GPO",
76
- primary: true
77
- },
78
- {
79
- city: "Sialkot",
80
- postalCode: "51310",
81
- area: "Sialkot GPO",
82
- primary: true
83
- },
84
- {
85
- city: "Sargodha",
86
- postalCode: "40100",
87
- area: "Sargodha GPO",
88
- primary: true
89
- },
90
- {
91
- city: "Bahawalpur",
92
- postalCode: "63100",
93
- area: "Bahawalpur GPO",
94
- primary: true
95
- },
96
- {
97
- city: "Sheikhupura",
98
- postalCode: "39350",
99
- area: "Sheikhupura GPO",
100
- primary: true
101
- },
102
- {
103
- city: "Gujrat",
104
- postalCode: "50700",
105
- area: "Gujrat GPO",
106
- primary: true
107
- },
108
- {
109
- city: "Jhang",
110
- postalCode: "35200",
111
- area: "Jhang GPO",
112
- primary: true
113
- },
114
- {
115
- city: "Sahiwal",
116
- postalCode: "57000",
117
- area: "Sahiwal GPO",
118
- primary: true
119
- },
120
- {
121
- city: "Okara",
122
- postalCode: "56300",
123
- area: "Okara GPO",
124
- primary: true
125
- },
126
- {
127
- city: "Kasur",
128
- postalCode: "55050",
129
- area: "Kasur GPO",
130
- primary: true
131
- },
132
- {
133
- city: "Dera Ghazi Khan",
134
- postalCode: "32200",
135
- area: "DG Khan GPO",
136
- primary: true
137
- },
138
- {
139
- city: "Muzaffargarh",
140
- postalCode: "34200",
141
- area: "Muzaffargarh GPO",
142
- primary: true
143
- },
144
- {
145
- city: "Rahim Yar Khan",
146
- postalCode: "64200",
147
- area: "RY Khan GPO",
148
- primary: true
149
- },
150
- {
151
- city: "Bahawalnagar",
152
- postalCode: "62300",
153
- area: "Bahawalnagar GPO",
154
- primary: true
155
- },
156
- {
157
- city: "Khanewal",
158
- postalCode: "58150",
159
- area: "Khanewal GPO",
160
- primary: true
161
- },
162
- {
163
- city: "Vehari",
164
- postalCode: "61100",
165
- area: "Vehari GPO",
166
- primary: true
167
- },
168
- {
169
- city: "Pakpattan",
170
- postalCode: "57400",
171
- area: "Pakpattan GPO",
172
- primary: true
173
- },
174
- {
175
- city: "Chiniot",
176
- postalCode: "35400",
177
- area: "Chiniot GPO",
178
- primary: true
179
- },
180
- {
181
- city: "Hafizabad",
182
- postalCode: "52110",
183
- area: "Hafizabad GPO",
184
- primary: true
185
- },
186
- {
187
- city: "Mandi Bahauddin",
188
- postalCode: "50400",
189
- area: "Mandi Bahauddin GPO",
190
- primary: true
191
- },
192
- {
193
- city: "Jhelum",
194
- postalCode: "49600",
195
- area: "Jhelum GPO",
196
- primary: true
197
- },
198
- {
199
- city: "Attock",
200
- postalCode: "43600",
201
- area: "Attock GPO",
202
- primary: true
203
- },
204
- {
205
- city: "Chakwal",
206
- postalCode: "48800",
207
- area: "Chakwal GPO",
208
- primary: true
209
- },
210
- {
211
- city: "Mianwali",
212
- postalCode: "42200",
213
- area: "Mianwali GPO",
214
- primary: true
215
- },
216
- {
217
- city: "Bhakkar",
218
- postalCode: "30000",
219
- area: "Bhakkar GPO",
220
- primary: true
221
- },
222
- {
223
- city: "Khushab",
224
- postalCode: "41000",
225
- area: "Khushab GPO",
226
- primary: true
227
- },
228
- {
229
- city: "Narowal",
230
- postalCode: "51600",
231
- area: "Narowal GPO",
232
- primary: true
233
- },
234
- {
235
- city: "Nankana Sahib",
236
- postalCode: "39100",
237
- area: "Nankana Sahib GPO",
238
- primary: true
239
- },
240
- {
241
- city: "Toba Tek Singh",
242
- postalCode: "36050",
243
- area: "TTS GPO",
244
- primary: true
245
- },
246
- {
247
- city: "Lodhran",
248
- postalCode: "59320",
249
- area: "Lodhran GPO",
250
- primary: true
251
- },
252
- {
253
- city: "Layyah",
254
- postalCode: "31200",
255
- area: "Layyah GPO",
256
- primary: true
257
- },
258
- {
259
- city: "Rajanpur",
260
- postalCode: "33500",
261
- area: "Rajanpur GPO",
262
- primary: true
263
- },
264
- {
265
- city: "Wazirabad",
266
- postalCode: "52000",
267
- area: "Wazirabad GPO",
268
- primary: true
269
- },
270
- {
271
- city: "Talagang",
272
- postalCode: "48100",
273
- area: "Talagang GPO",
274
- primary: true
275
- },
276
- {
277
- city: "Kot Addu",
278
- postalCode: "34050",
279
- area: "Kot Addu GPO",
280
- primary: true
281
- },
282
- {
283
- city: "Karachi",
284
- postalCode: "74200",
285
- area: "Karachi GPO",
286
- primary: true
287
- },
288
- {
289
- city: "Karachi",
290
- postalCode: "74000",
291
- area: "Karachi City GPO"
292
- },
293
- {
294
- city: "Karachi",
295
- postalCode: "74400",
296
- area: "Karachi Saddar GPO"
297
- },
298
- {
299
- city: "Karachi",
300
- postalCode: "74800",
301
- area: "New Town GPO"
302
- },
303
- {
304
- city: "Karachi",
305
- postalCode: "74700",
306
- area: "Al-Hydri GPO"
307
- },
308
- {
309
- city: "Karachi",
310
- postalCode: "75500",
311
- area: "Defence"
312
- },
313
- {
314
- city: "Karachi",
315
- postalCode: "75600",
316
- area: "Clifton"
317
- },
318
- {
319
- city: "Karachi",
320
- postalCode: "75300",
321
- area: "Gulshan-e-Iqbal"
322
- },
323
- {
324
- city: "Karachi",
325
- postalCode: "74600",
326
- area: "Nazimabad"
327
- },
328
- {
329
- city: "Karachi",
330
- postalCode: "74900",
331
- area: "Korangi"
332
- },
333
- {
334
- city: "Karachi",
335
- postalCode: "75950",
336
- area: "Federal B Area"
337
- },
338
- {
339
- city: "Hyderabad",
340
- postalCode: "71000",
341
- area: "Hyderabad GPO",
342
- primary: true
343
- },
344
- {
345
- city: "Sukkur",
346
- postalCode: "65200",
347
- area: "Sukkur GPO",
348
- primary: true
349
- },
350
- {
351
- city: "Larkana",
352
- postalCode: "77150",
353
- area: "Larkana GPO",
354
- primary: true
355
- },
356
- {
357
- city: "Nawabshah",
358
- postalCode: "67450",
359
- area: "Nawabshah GPO",
360
- primary: true
361
- },
362
- {
363
- city: "Mirpur Khas",
364
- postalCode: "69000",
365
- area: "Mirpur Khas GPO",
366
- primary: true
367
- },
368
- {
369
- city: "Jacobabad",
370
- postalCode: "79000",
371
- area: "Jacobabad GPO",
372
- primary: true
373
- },
374
- {
375
- city: "Shikarpur",
376
- postalCode: "78100",
377
- area: "Shikarpur GPO",
378
- primary: true
379
- },
380
- {
381
- city: "Dadu",
382
- postalCode: "76200",
383
- area: "Dadu GPO",
384
- primary: true
385
- },
386
- {
387
- city: "Badin",
388
- postalCode: "72220",
389
- area: "Badin GPO",
390
- primary: true
391
- },
392
- {
393
- city: "Thatta",
394
- postalCode: "73020",
395
- area: "Thatta GPO",
396
- primary: true
397
- },
398
- {
399
- city: "Sanghar",
400
- postalCode: "68100",
401
- area: "Sanghar GPO",
402
- primary: true
403
- },
404
- {
405
- city: "Umerkot",
406
- postalCode: "69100",
407
- area: "Umerkot GPO",
408
- primary: true
409
- },
410
- {
411
- city: "Tharparkar",
412
- postalCode: "69230",
413
- area: "Mithi GPO",
414
- primary: true
415
- },
416
- {
417
- city: "Jamshoro",
418
- postalCode: "76080",
419
- area: "Jamshoro GPO",
420
- primary: true
421
- },
422
- {
423
- city: "Matiari",
424
- postalCode: "70100",
425
- area: "Matiari GPO",
426
- primary: true
427
- },
428
- {
429
- city: "Khairpur",
430
- postalCode: "66020",
431
- area: "Khairpur GPO",
432
- primary: true
433
- },
434
- {
435
- city: "Ghotki",
436
- postalCode: "65110",
437
- area: "Ghotki GPO",
438
- primary: true
439
- },
440
- {
441
- city: "Kashmore",
442
- postalCode: "79200",
443
- area: "Kashmore GPO",
444
- primary: true
445
- },
446
- {
447
- city: "Sujawal",
448
- postalCode: "73220",
449
- area: "Sujawal GPO",
450
- primary: true
451
- },
452
- {
453
- city: "Peshawar",
454
- postalCode: "25000",
455
- area: "Peshawar GPO",
456
- primary: true
457
- },
458
- {
459
- city: "Mardan",
460
- postalCode: "23200",
461
- area: "Mardan GPO",
462
- primary: true
463
- },
464
- {
465
- city: "Abbottabad",
466
- postalCode: "22010",
467
- area: "Abbottabad GPO",
468
- primary: true
469
- },
470
- {
471
- city: "Kohat",
472
- postalCode: "26000",
473
- area: "Kohat GPO",
474
- primary: true
475
- },
476
- {
477
- city: "Bannu",
478
- postalCode: "28100",
479
- area: "Bannu GPO",
480
- primary: true
481
- },
482
- {
483
- city: "Swat",
484
- postalCode: "19200",
485
- area: "Mingora GPO",
486
- primary: true
487
- },
488
- {
489
- city: "Mansehra",
490
- postalCode: "21300",
491
- area: "Mansehra GPO",
492
- primary: true
493
- },
494
- {
495
- city: "Dera Ismail Khan",
496
- postalCode: "29120",
497
- area: "DI Khan GPO",
498
- primary: true
499
- },
500
- {
501
- city: "Nowshera",
502
- postalCode: "24100",
503
- area: "Nowshera GPO",
504
- primary: true
505
- },
506
- {
507
- city: "Swabi",
508
- postalCode: "23430",
509
- area: "Swabi GPO",
510
- primary: true
511
- },
512
- {
513
- city: "Charsadda",
514
- postalCode: "24420",
515
- area: "Charsadda GPO",
516
- primary: true
517
- },
518
- {
519
- city: "Haripur",
520
- postalCode: "22620",
521
- area: "Haripur GPO",
522
- primary: true
523
- },
524
- {
525
- city: "Hangu",
526
- postalCode: "26190",
527
- area: "Hangu GPO",
528
- primary: true
529
- },
530
- {
531
- city: "Karak",
532
- postalCode: "27200",
533
- area: "Karak GPO",
534
- primary: true
535
- },
536
- {
537
- city: "Tank",
538
- postalCode: "29430",
539
- area: "Tank GPO",
540
- primary: true
541
- },
542
- {
543
- city: "Lakki Marwat",
544
- postalCode: "28420",
545
- area: "Lakki Marwat GPO",
546
- primary: true
547
- },
548
- {
549
- city: "Quetta",
550
- postalCode: "87300",
551
- area: "Quetta GPO",
552
- primary: true
553
- },
554
- {
555
- city: "Gwadar",
556
- postalCode: "91200",
557
- area: "Gwadar GPO",
558
- primary: true
559
- },
560
- {
561
- city: "Turbat",
562
- postalCode: "92600",
563
- area: "Turbat GPO",
564
- primary: true
565
- },
566
- {
567
- city: "Khuzdar",
568
- postalCode: "89100",
569
- area: "Khuzdar GPO",
570
- primary: true
571
- },
572
- {
573
- city: "Sibi",
574
- postalCode: "82000",
575
- area: "Sibi GPO",
576
- primary: true
577
- },
578
- {
579
- city: "Loralai",
580
- postalCode: "84800",
581
- area: "Loralai GPO",
582
- primary: true
583
- },
584
- {
585
- city: "Zhob",
586
- postalCode: "85200",
587
- area: "Zhob GPO",
588
- primary: true
589
- },
590
- {
591
- city: "Chaman",
592
- postalCode: "86000",
593
- area: "Chaman GPO",
594
- primary: true
595
- },
596
- {
597
- city: "Hub",
598
- postalCode: "90250",
599
- area: "Hub GPO",
600
- primary: true
601
- },
602
- {
603
- city: "Muzaffarabad",
604
- postalCode: "13100",
605
- area: "Muzaffarabad GPO",
606
- primary: true
607
- },
608
- {
609
- city: "Mirpur",
610
- postalCode: "10250",
611
- area: "Mirpur GPO",
612
- primary: true
613
- },
614
- {
615
- city: "Kotli",
616
- postalCode: "11100",
617
- area: "Kotli GPO",
618
- primary: true
619
- },
620
- {
621
- city: "Rawalakot",
622
- postalCode: "12350",
623
- area: "Rawalakot GPO",
624
- primary: true
625
- },
626
- {
627
- city: "Bagh",
628
- postalCode: "12500",
629
- area: "Bagh GPO",
630
- primary: true
631
- },
632
- {
633
- city: "Gilgit",
634
- postalCode: "15700",
635
- area: "Gilgit GPO",
636
- primary: true
637
- },
638
- {
639
- city: "Skardu",
640
- postalCode: "16100",
641
- area: "Skardu GPO",
642
- primary: true
643
- }
644
- ];
645
-
646
- // src/postal.ts
647
- var POSTAL_ENTRIES = postal_codes_default;
648
- var postalByCode = lazy(
649
- () => new Map(
650
- POSTAL_ENTRIES.map((entry) => [entry.postalCode, entry.city])
651
- )
652
- );
653
- var postalByCity = lazy(() => {
654
- const map = /* @__PURE__ */ new Map();
655
- for (const entry of POSTAL_ENTRIES) {
656
- const key = normalizeKey(entry.city);
657
- if (!map.has(key) || entry.primary === true) {
658
- map.set(key, entry.postalCode);
659
- }
660
- }
661
- return map;
662
- });
663
- function getCityByPostalCode(postalCode) {
664
- const code = stripPostalCode(postalCode);
665
- if (code.length === 0) {
666
- return null;
667
- }
668
- return postalByCode().get(code) ?? null;
669
- }
670
- function getPostalCode(city) {
671
- const key = normalizeKey(city);
672
- if (key.length === 0) {
673
- return null;
674
- }
675
- return postalByCity().get(key) ?? null;
676
- }
677
- function getPostalCodes(city) {
678
- const key = normalizeKey(city);
679
- if (key.length === 0) {
680
- return [];
681
- }
682
- return POSTAL_ENTRIES.filter((entry) => normalizeKey(entry.city) === key).map((entry) => entry.postalCode).sort((a, b) => a.localeCompare(b));
683
- }
684
- function searchPostalCodes(query) {
685
- const normalizedQuery = normalizeKey(query);
686
- if (normalizedQuery.length === 0) {
687
- return [];
688
- }
689
- const matches = POSTAL_ENTRIES.filter((entry) => {
690
- const cityKey = normalizeKey(entry.city);
691
- const areaKey = entry.area ? normalizeKey(entry.area) : "";
692
- return cityKey.includes(normalizedQuery) || areaKey.includes(normalizedQuery) || entry.postalCode.startsWith(query.trim());
693
- }).map((entry) => entry.postalCode);
694
- return [...new Set(matches)].sort((a, b) => a.localeCompare(b));
695
- }
696
- function getPostalAreas(city) {
697
- const key = normalizeKey(city);
698
- if (key.length === 0) {
699
- return [];
700
- }
701
- return POSTAL_ENTRIES.filter(
702
- (entry) => normalizeKey(entry.city) === key && entry.area
703
- ).map((entry) => entry.area).sort((a, b) => a.localeCompare(b));
704
- }
705
- function stripPostalCode(postalCode) {
706
- return postalCode.trim().replace(/\s+/g, "");
707
- }
708
-
709
- export { getCityByPostalCode, getPostalAreas, getPostalCode, getPostalCodes, searchPostalCodes };