@capsitech/react-utilities 0.1.9 → 0.1.11

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 (104) hide show
  1. package/lib/Components/SuspenseRoute.js +29 -0
  2. package/lib/Components/index.js +1 -0
  3. package/lib/Hooks/index.d.ts +2 -2
  4. package/lib/Hooks/index.js +98 -0
  5. package/lib/Hooks/useInfiniteScroll.d.ts +1 -1
  6. package/lib/Hooks/useInfiniteScroll.js +22 -0
  7. package/lib/Hooks/useNetworkState.js +41 -0
  8. package/lib/Hooks/useShortcuts.js +91 -0
  9. package/lib/Utilities/ApiUtility.axios.js +326 -0
  10. package/lib/Utilities/BrowserInfo.js +153 -0
  11. package/lib/Utilities/Countries.js +290 -0
  12. package/lib/Utilities/CustomEventEmitter.js +30 -0
  13. package/lib/Utilities/FastCompare.js +128 -0
  14. package/lib/Utilities/HideablePromise.js +10 -0
  15. package/lib/Utilities/LoadScripts.js +51 -0
  16. package/lib/Utilities/MTDFraudPrevention.js +157 -0
  17. package/lib/Utilities/Nationalities.js +245 -0
  18. package/lib/Utilities/RouteUtils.d.ts +1 -1
  19. package/lib/Utilities/RouteUtils.js +223 -0
  20. package/lib/Utilities/TimeZones.js +1069 -0
  21. package/lib/Utilities/Types.js +1 -0
  22. package/lib/Utilities/Utils.d.ts +1 -1
  23. package/lib/Utilities/Utils.js +331 -0
  24. package/lib/Utilities/dayjs.d.ts +11 -10
  25. package/lib/Utilities/dayjs.js +57 -0
  26. package/lib/Utilities/index.js +14 -0
  27. package/lib/index.js +3 -72
  28. package/package.json +10 -57
  29. package/lib/Components.d.ts +0 -2
  30. package/lib/Components.js +0 -5
  31. package/lib/Components.js.map +0 -1
  32. package/lib/Hooks.d.ts +0 -2
  33. package/lib/Hooks.js +0 -67
  34. package/lib/Hooks.js.map +0 -1
  35. package/lib/Utilities.d.ts +0 -2
  36. package/lib/Utilities.js +0 -54
  37. package/lib/Utilities.js.map +0 -1
  38. package/lib/dayjs-aKjfjjRl.mjs +0 -605
  39. package/lib/dayjs-aKjfjjRl.mjs.map +0 -1
  40. package/lib/index.js.map +0 -1
  41. package/lib/logo.png +0 -0
  42. package/lib/src/Components/SuspenseRoute.d.ts +0 -2
  43. package/lib/src/Components/SuspenseRoute.js +0 -22
  44. package/lib/src/Components/SuspenseRoute.js.map +0 -1
  45. package/lib/src/Components/index.d.ts +0 -2
  46. package/lib/src/Components/index.js +0 -5
  47. package/lib/src/Components/index.js.map +0 -1
  48. package/lib/src/Hooks/index.d.ts +0 -2
  49. package/lib/src/Hooks/index.js +0 -20
  50. package/lib/src/Hooks/index.js.map +0 -1
  51. package/lib/src/Hooks/useInfiniteScroll.d.ts +0 -2
  52. package/lib/src/Hooks/useInfiniteScroll.js +0 -20
  53. package/lib/src/Hooks/useInfiniteScroll.js.map +0 -1
  54. package/lib/src/Hooks/useNetworkState.d.ts +0 -2
  55. package/lib/src/Hooks/useNetworkState.js +0 -33
  56. package/lib/src/Hooks/useNetworkState.js.map +0 -1
  57. package/lib/src/Hooks/useShortcuts.d.ts +0 -2
  58. package/lib/src/Hooks/useShortcuts.js +0 -43
  59. package/lib/src/Hooks/useShortcuts.js.map +0 -1
  60. package/lib/src/Utilities/ApiUtility.axios.d.ts +0 -2
  61. package/lib/src/Utilities/ApiUtility.axios.js +0 -222
  62. package/lib/src/Utilities/ApiUtility.axios.js.map +0 -1
  63. package/lib/src/Utilities/BrowserInfo.d.ts +0 -2
  64. package/lib/src/Utilities/BrowserInfo.js +0 -51
  65. package/lib/src/Utilities/BrowserInfo.js.map +0 -1
  66. package/lib/src/Utilities/Countries.d.ts +0 -2
  67. package/lib/src/Utilities/Countries.js +0 -512
  68. package/lib/src/Utilities/Countries.js.map +0 -1
  69. package/lib/src/Utilities/CustomEventEmitter.d.ts +0 -2
  70. package/lib/src/Utilities/CustomEventEmitter.js +0 -24
  71. package/lib/src/Utilities/CustomEventEmitter.js.map +0 -1
  72. package/lib/src/Utilities/FastCompare.d.ts +0 -2
  73. package/lib/src/Utilities/FastCompare.js +0 -56
  74. package/lib/src/Utilities/FastCompare.js.map +0 -1
  75. package/lib/src/Utilities/HideablePromise.d.ts +0 -2
  76. package/lib/src/Utilities/HideablePromise.js +0 -12
  77. package/lib/src/Utilities/HideablePromise.js.map +0 -1
  78. package/lib/src/Utilities/LoadScripts.d.ts +0 -2
  79. package/lib/src/Utilities/LoadScripts.js +0 -26
  80. package/lib/src/Utilities/LoadScripts.js.map +0 -1
  81. package/lib/src/Utilities/MTDFraudPrevention.d.ts +0 -2
  82. package/lib/src/Utilities/MTDFraudPrevention.js +0 -60
  83. package/lib/src/Utilities/MTDFraudPrevention.js.map +0 -1
  84. package/lib/src/Utilities/Nationalities.d.ts +0 -2
  85. package/lib/src/Utilities/Nationalities.js +0 -250
  86. package/lib/src/Utilities/Nationalities.js.map +0 -1
  87. package/lib/src/Utilities/RouteUtils.d.ts +0 -2
  88. package/lib/src/Utilities/RouteUtils.js +0 -192
  89. package/lib/src/Utilities/RouteUtils.js.map +0 -1
  90. package/lib/src/Utilities/TimeZones.d.ts +0 -2
  91. package/lib/src/Utilities/TimeZones.js +0 -1074
  92. package/lib/src/Utilities/TimeZones.js.map +0 -1
  93. package/lib/src/Utilities/Types.d.ts +0 -1
  94. package/lib/src/Utilities/Types.js +0 -2
  95. package/lib/src/Utilities/Types.js.map +0 -1
  96. package/lib/src/Utilities/Utils.d.ts +0 -2
  97. package/lib/src/Utilities/Utils.js +0 -271
  98. package/lib/src/Utilities/Utils.js.map +0 -1
  99. package/lib/src/Utilities/dayjs.d.ts +0 -2
  100. package/lib/src/Utilities/dayjs.js +0 -6
  101. package/lib/src/Utilities/dayjs.js.map +0 -1
  102. package/lib/src/Utilities/index.d.ts +0 -2
  103. package/lib/src/Utilities/index.js +0 -54
  104. package/lib/src/Utilities/index.js.map +0 -1
@@ -1,2 +0,0 @@
1
- export * from '../../Utilities/BrowserInfo'
2
- export {}
@@ -1,51 +0,0 @@
1
- const o = {
2
- deviceIpString: "",
3
- deviceIpTimeStamp: ""
4
- }, g = () => {
5
- o.deviceIpString = "";
6
- }, T = () => {
7
- o.deviceIpTimeStamp = "";
8
- }, I = () => new Promise((e, t) => {
9
- o.deviceIpString !== "" && o.deviceIpTimeStamp !== "" && e(o);
10
- const c = RTCPeerConnection;
11
- c || t({ message: "WEBRTC_UNSUPPORTED_BROWSER", error: void 0 });
12
- const a = [];
13
- let r;
14
- try {
15
- r = new c();
16
- } catch (n) {
17
- t({ message: "WEBRTC_CONSTRUCTION_FAILED", error: n });
18
- }
19
- r.onicecandidate = (n) => {
20
- if (!n || !n.candidate)
21
- r.close(), a.length < 1 && t({ message: "NO_IP_FOUND", error: void 0 }), o.deviceIpString = a.join(","), o.deviceIpTimeStamp = (/* @__PURE__ */ new Date()).toISOString(), e(o);
22
- else if (n.candidate.candidate) {
23
- const s = n.candidate.candidate.split(" ");
24
- s.length > 4 && a.push(s[4]);
25
- }
26
- }, r.createDataChannel(""), r.createOffer().then(r.setLocalDescription.bind(r)).catch((n) => {
27
- t({ message: "CREATE_CONNECTION_ERROR", error: n });
28
- });
29
- }), D = () => Array.from(navigator.plugins, (e) => e && e.name).filter((e) => e).join(","), d = () => {
30
- const e = (/* @__PURE__ */ new Date()).toString().split("GMT")[1], t = `${e[0]}${e[1]}${e[2]}`, c = `${e[3]}${e[4]}`;
31
- return `${t}:${c}`;
32
- }, l = () => `UTC${d()}`, i = (e) => isNaN(e) ? null : e, m = () => i(screen.width), N = () => i(screen.height), p = () => i(window.devicePixelRatio), S = () => i(screen.colorDepth), f = () => i(window.innerWidth), C = () => i(window.innerHeight), w = () => {
33
- const e = window, t = navigator;
34
- return e.doNotTrack && e.doNotTrack === "1" || t.doNotTrack && (t.doNotTrack === "yes" || t.doNotTrack === "1") || t.msDoNotTrack && t.msDoNotTrack === "1" || e.external && e.external.msTrackingProtectionEnabled && e.external.msTrackingProtectionEnabled() ? "true" : "false";
35
- }, E = () => navigator.userAgent;
36
- export {
37
- w as getBrowserDoNotTrackStatus,
38
- D as getBrowserPluginsAsString,
39
- I as getDeviceLocalIPAsString,
40
- S as getScreenColourDepth,
41
- N as getScreenHeight,
42
- p as getScreenScalingFactor,
43
- m as getScreenWidth,
44
- l as getTimezone,
45
- E as getUserAgent,
46
- C as getWindowHeight,
47
- f as getWindowWidth,
48
- g as resetDeviceIpString,
49
- T as resetDeviceIpTimeStamp
50
- };
51
- //# sourceMappingURL=BrowserInfo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BrowserInfo.js","sources":["../../../src/Utilities/BrowserInfo.ts"],"sourcesContent":["const ICE_CANDIDATE_IP_INDEX = 4;\r\n\r\n// store deviceIpString as a global variable as generating it is expensive and often required several times\r\nconst deviceIpData = {\r\n deviceIpString: '',\r\n deviceIpTimeStamp: '',\r\n};\r\n\r\n/**\r\n * This reset function is valuable only for unit testing\r\n */\r\nexport const resetDeviceIpString = () => {\r\n deviceIpData.deviceIpString = '';\r\n};\r\n\r\nexport const resetDeviceIpTimeStamp = () => {\r\n deviceIpData.deviceIpTimeStamp = '';\r\n};\r\n\r\n/**\r\n * Function that returns the local IP address as a string as an async promise.\r\n * It uses RTCPeerConnection object's onicecandidate event handler which gets called\r\n * automatically when a new Ice Candidate is available.\r\n * @returns {Promise} Promise to get users devices IP address\r\n */\r\nexport const getDeviceLocalIPAsString = (): Promise<typeof deviceIpData> => {\r\n return new Promise((resolve, reject) => {\r\n if (deviceIpData.deviceIpString !== '' && deviceIpData.deviceIpTimeStamp !== '') {\r\n resolve(deviceIpData);\r\n }\r\n const WebRTCConnection = RTCPeerConnection;\r\n if (!WebRTCConnection) {\r\n reject({ message: 'WEBRTC_UNSUPPORTED_BROWSER', error: undefined });\r\n }\r\n //RTCPeerConection is supported, so will try to find the IP\r\n const ip: string[] = [];\r\n let pc: RTCPeerConnection;\r\n try {\r\n pc = new WebRTCConnection();\r\n } catch (err) {\r\n reject({ message: 'WEBRTC_CONSTRUCTION_FAILED', error: err });\r\n }\r\n\r\n pc!.onicecandidate = (event) => {\r\n if (!event || !event.candidate) {\r\n pc.close();\r\n if (ip.length < 1) {\r\n reject({ message: 'NO_IP_FOUND', error: undefined });\r\n }\r\n deviceIpData.deviceIpString = ip.join(',');\r\n deviceIpData.deviceIpTimeStamp = new Date().toISOString();\r\n resolve(deviceIpData);\r\n } else if (event.candidate.candidate) {\r\n const candidateValues = event.candidate.candidate.split(' ');\r\n if (candidateValues.length > ICE_CANDIDATE_IP_INDEX) {\r\n ip.push(candidateValues[ICE_CANDIDATE_IP_INDEX]);\r\n }\r\n }\r\n };\r\n pc!.createDataChannel('');\r\n pc!\r\n .createOffer()\r\n .then(pc!.setLocalDescription.bind(pc!))\r\n .catch((err) => {\r\n reject({ message: 'CREATE_CONNECTION_ERROR', error: err });\r\n });\r\n });\r\n};\r\n\r\n/**\r\n * Function that returns user's browser's all plugin as a comma separated string\r\n * @returns {string} comma separated user's browser's plugins\r\n */\r\nexport const getBrowserPluginsAsString = (): string => {\r\n return Array.from(navigator.plugins, (plugin) => plugin && plugin.name)\r\n .filter((name) => name)\r\n .join(',');\r\n};\r\n\r\nconst getFormattedOffset = () => {\r\n // Date().toString() is in format like \"Wed Sep 30 2020 23:11:02 GMT+0100 (British Summer Time)\"\r\n // To format the offset, we split on \"GMT\"\r\n // and then pick the relevant characters based on their position and reformat with a \":\"\r\n const offset = new Date().toString().split('GMT')[1];\r\n const hourOffset = `${offset[0]}${offset[1]}${offset[2]}`;\r\n const minuteOffset = `${offset[3]}${offset[4]}`;\r\n const formattedUTC = `${hourOffset}:${minuteOffset}`;\r\n return formattedUTC;\r\n};\r\n\r\n/**\r\n * Function that returns user's timezone offset relative to UTC\r\n * @returns {string} UTC concatenated with user's browser's timezone offset\r\n */\r\nexport const getTimezone = (): string => `UTC${getFormattedOffset()}`;\r\n\r\nconst validateAndGetScreenDetail = (value: number): number | null => {\r\n if (isNaN(value)) {\r\n return null;\r\n } else {\r\n return value;\r\n }\r\n};\r\n\r\n/**\r\n * Function that validates the user's screen's width value, and then returns it.\r\n * If it fails validation, it returns null\r\n * @returns {number | null} validated value of screen width\r\n */\r\nexport const getScreenWidth = (): number | null => validateAndGetScreenDetail(screen.width);\r\n\r\n/**\r\n * Function that validates the user's screen's height value, and then returns it.\r\n * If it fails validation, it returns null\r\n * @returns {number | null} validated value of screen height\r\n */\r\nexport const getScreenHeight = (): number | null => validateAndGetScreenDetail(screen.height);\r\n\r\n/**\r\n * Function that validates the user's device's pixel ratio, and then returns it.\r\n * If it fails validation, it returns null\r\n * @returns {number | null} validated value of window's devicePixelRatio\r\n */\r\nexport const getScreenScalingFactor = (): number | null => validateAndGetScreenDetail(window.devicePixelRatio);\r\n\r\n/**\r\n * Function that validates the user's screen's colorDepth, and then returns it.\r\n * If it fails validation, it returns null\r\n * @returns {number | null} validated value of screen's colorDepth\r\n */\r\nexport const getScreenColourDepth = (): number | null => validateAndGetScreenDetail(screen.colorDepth);\r\n\r\n/**\r\n * Function that validates the user's window's interior width in pixels, and then returns it.\r\n * If it fails validation, it returns null\r\n * @returns {number | null} validated value of window's innerWidth\r\n */\r\nexport const getWindowWidth = (): number | null => validateAndGetScreenDetail(window.innerWidth);\r\n\r\n/**\r\n * Function that validates the user's window's interior height in pixels, and then returns it.\r\n * If it fails validation, it returns null\r\n * @returns {number | null} validated value of window's innerHeight\r\n */\r\nexport const getWindowHeight = (): number | null => validateAndGetScreenDetail(window.innerHeight);\r\n\r\n/**\r\n * The function returns users browser's do not track setting by checking the navigator\r\n * and window object for the same\r\n * @returns {string} true or false based on users Do Not Track setting\r\n */\r\nexport const getBrowserDoNotTrackStatus = (): string => {\r\n const windowVar = window as any,\r\n navigatorVar = navigator as any;\r\n const isBrowserDoNotTrack =\r\n (windowVar.doNotTrack && windowVar.doNotTrack === '1') ||\r\n (navigatorVar.doNotTrack && (navigatorVar.doNotTrack === 'yes' || navigatorVar.doNotTrack === '1')) ||\r\n (navigatorVar.msDoNotTrack && navigatorVar.msDoNotTrack === '1') ||\r\n (windowVar.external && windowVar.external.msTrackingProtectionEnabled && windowVar.external.msTrackingProtectionEnabled());\r\n return isBrowserDoNotTrack ? 'true' : 'false';\r\n};\r\n\r\n/**\r\n * This function returns user agent by checking the navigator\r\n * @returns {String} user agent for the current browser\r\n */\r\nexport const getUserAgent = (): string => {\r\n return navigator.userAgent;\r\n};\r\n"],"names":["deviceIpData","resetDeviceIpString","resetDeviceIpTimeStamp","getDeviceLocalIPAsString","resolve","reject","WebRTCConnection","ip","pc","err","event","candidateValues","getBrowserPluginsAsString","plugin","name","getFormattedOffset","offset","hourOffset","minuteOffset","getTimezone","validateAndGetScreenDetail","value","getScreenWidth","getScreenHeight","getScreenScalingFactor","getScreenColourDepth","getWindowWidth","getWindowHeight","getBrowserDoNotTrackStatus","windowVar","navigatorVar","getUserAgent"],"mappings":"AAGA,MAAMA,IAAe;AAAA,EACnB,gBAAgB;AAAA,EAChB,mBAAmB;AACrB,GAKaC,IAAsB,MAAM;AACvC,EAAAD,EAAa,iBAAiB;AAChC,GAEaE,IAAyB,MAAM;AAC1C,EAAAF,EAAa,oBAAoB;AACnC,GAQaG,IAA2B,MAC/B,IAAI,QAAQ,CAACC,GAASC,MAAW;AACtC,EAAIL,EAAa,mBAAmB,MAAMA,EAAa,sBAAsB,MAC3EI,EAAQJ,CAAY;AAEtB,QAAMM,IAAmB;AACzB,EAAKA,KACHD,EAAO,EAAE,SAAS,8BAA8B,OAAO,QAAW;AAGpE,QAAME,IAAe,CAAA;AACrB,MAAIC;AACJ,MAAI;AACF,IAAAA,IAAK,IAAIF,EAAA;AAAA,EACX,SAASG,GAAK;AACZ,IAAAJ,EAAO,EAAE,SAAS,8BAA8B,OAAOI,GAAK;AAAA,EAC9D;AAEA,EAAAD,EAAI,iBAAiB,CAACE,MAAU;AAC9B,QAAI,CAACA,KAAS,CAACA,EAAM;AACnB,MAAAF,EAAG,MAAA,GACCD,EAAG,SAAS,KACdF,EAAO,EAAE,SAAS,eAAe,OAAO,QAAW,GAErDL,EAAa,iBAAiBO,EAAG,KAAK,GAAG,GACzCP,EAAa,qBAAoB,oBAAI,KAAA,GAAO,YAAA,GAC5CI,EAAQJ,CAAY;AAAA,aACXU,EAAM,UAAU,WAAW;AACpC,YAAMC,IAAkBD,EAAM,UAAU,UAAU,MAAM,GAAG;AAC3D,MAAIC,EAAgB,SAAS,KAC3BJ,EAAG,KAAKI,EAAgB,CAAsB,CAAC;AAAA,IAEnD;AAAA,EACF,GACAH,EAAI,kBAAkB,EAAE,GACxBA,EACG,YAAA,EACA,KAAKA,EAAI,oBAAoB,KAAKA,CAAG,CAAC,EACtC,MAAM,CAACC,MAAQ;AACd,IAAAJ,EAAO,EAAE,SAAS,2BAA2B,OAAOI,GAAK;AAAA,EAC3D,CAAC;AACL,CAAC,GAOUG,IAA4B,MAChC,MAAM,KAAK,UAAU,SAAS,CAACC,MAAWA,KAAUA,EAAO,IAAI,EACnE,OAAO,CAACC,MAASA,CAAI,EACrB,KAAK,GAAG,GAGPC,IAAqB,MAAM;AAI/B,QAAMC,yBAAa,KAAA,GAAO,WAAW,MAAM,KAAK,EAAE,CAAC,GAC7CC,IAAa,GAAGD,EAAO,CAAC,CAAC,GAAGA,EAAO,CAAC,CAAC,GAAGA,EAAO,CAAC,CAAC,IACjDE,IAAe,GAAGF,EAAO,CAAC,CAAC,GAAGA,EAAO,CAAC,CAAC;AAE7C,SADqB,GAAGC,CAAU,IAAIC,CAAY;AAEpD,GAMaC,IAAc,MAAc,MAAMJ,GAAoB,IAE7DK,IAA6B,CAACC,MAC9B,MAAMA,CAAK,IACN,OAEAA,GASEC,IAAiB,MAAqBF,EAA2B,OAAO,KAAK,GAO7EG,IAAkB,MAAqBH,EAA2B,OAAO,MAAM,GAO/EI,IAAyB,MAAqBJ,EAA2B,OAAO,gBAAgB,GAOhGK,IAAuB,MAAqBL,EAA2B,OAAO,UAAU,GAOxFM,IAAiB,MAAqBN,EAA2B,OAAO,UAAU,GAOlFO,IAAkB,MAAqBP,EAA2B,OAAO,WAAW,GAOpFQ,IAA6B,MAAc;AACtD,QAAMC,IAAY,QAChBC,IAAe;AAMjB,SAJGD,EAAU,cAAcA,EAAU,eAAe,OACjDC,EAAa,eAAeA,EAAa,eAAe,SAASA,EAAa,eAAe,QAC7FA,EAAa,gBAAgBA,EAAa,iBAAiB,OAC3DD,EAAU,YAAYA,EAAU,SAAS,+BAA+BA,EAAU,SAAS,4BAAA,IACjE,SAAS;AACxC,GAMaE,IAAe,MACnB,UAAU;"}
@@ -1,2 +0,0 @@
1
- export * from '../../Utilities/Countries'
2
- export {}
@@ -1,512 +0,0 @@
1
- import { c as m, g as de } from "../../dayjs-aKjfjjRl.mjs";
2
- import { Utils as re } from "./Utils.js";
3
- var p, U;
4
- function ae() {
5
- if (U) return p;
6
- U = 1;
7
- function o(e, d, i) {
8
- return e === e && (i !== void 0 && (e = e <= i ? e : i), d !== void 0 && (e = e >= d ? e : d)), e;
9
- }
10
- return p = o, p;
11
- }
12
- var u, q;
13
- function ne() {
14
- if (q) return u;
15
- q = 1;
16
- var o = typeof m == "object" && m && m.Object === Object && m;
17
- return u = o, u;
18
- }
19
- var s, _;
20
- function te() {
21
- if (_) return s;
22
- _ = 1;
23
- var o = ne(), e = typeof self == "object" && self && self.Object === Object && self, d = o || e || Function("return this")();
24
- return s = d, s;
25
- }
26
- var S, D;
27
- function K() {
28
- if (D) return S;
29
- D = 1;
30
- var o = te(), e = o.Symbol;
31
- return S = e, S;
32
- }
33
- var T, F;
34
- function ce() {
35
- if (F) return T;
36
- F = 1;
37
- function o(e, d) {
38
- for (var i = -1, r = e == null ? 0 : e.length, t = Array(r); ++i < r; )
39
- t[i] = d(e[i], i, e);
40
- return t;
41
- }
42
- return T = o, T;
43
- }
44
- var f, H;
45
- function le() {
46
- if (H) return f;
47
- H = 1;
48
- var o = Array.isArray;
49
- return f = o, f;
50
- }
51
- var M, j;
52
- function Ce() {
53
- if (j) return M;
54
- j = 1;
55
- var o = K(), e = Object.prototype, d = e.hasOwnProperty, i = e.toString, r = o ? o.toStringTag : void 0;
56
- function t(c) {
57
- var a = d.call(c, r), l = c[r];
58
- try {
59
- c[r] = void 0;
60
- var n = !0;
61
- } catch {
62
- }
63
- var C = i.call(c);
64
- return n && (a ? c[r] = l : delete c[r]), C;
65
- }
66
- return M = t, M;
67
- }
68
- var A, V;
69
- function me() {
70
- if (V) return A;
71
- V = 1;
72
- var o = Object.prototype, e = o.toString;
73
- function d(i) {
74
- return e.call(i);
75
- }
76
- return A = d, A;
77
- }
78
- var R, W;
79
- function ye() {
80
- if (W) return R;
81
- W = 1;
82
- var o = K(), e = Ce(), d = me(), i = "[object Null]", r = "[object Undefined]", t = o ? o.toStringTag : void 0;
83
- function c(a) {
84
- return a == null ? a === void 0 ? r : i : t && t in Object(a) ? e(a) : d(a);
85
- }
86
- return R = c, R;
87
- }
88
- var b, Z;
89
- function pe() {
90
- if (Z) return b;
91
- Z = 1;
92
- function o(e) {
93
- return e != null && typeof e == "object";
94
- }
95
- return b = o, b;
96
- }
97
- var G, Y;
98
- function oe() {
99
- if (Y) return G;
100
- Y = 1;
101
- var o = ye(), e = pe(), d = "[object Symbol]";
102
- function i(r) {
103
- return typeof r == "symbol" || e(r) && o(r) == d;
104
- }
105
- return G = i, G;
106
- }
107
- var I, J;
108
- function ie() {
109
- if (J) return I;
110
- J = 1;
111
- var o = K(), e = ce(), d = le(), i = oe(), r = o ? o.prototype : void 0, t = r ? r.toString : void 0;
112
- function c(a) {
113
- if (typeof a == "string")
114
- return a;
115
- if (d(a))
116
- return e(a, c) + "";
117
- if (i(a))
118
- return t ? t.call(a) : "";
119
- var l = a + "";
120
- return l == "0" && 1 / a == -1 / 0 ? "-0" : l;
121
- }
122
- return I = c, I;
123
- }
124
- var g, k;
125
- function ue() {
126
- if (k) return g;
127
- k = 1;
128
- var o = /\s/;
129
- function e(d) {
130
- for (var i = d.length; i-- && o.test(d.charAt(i)); )
131
- ;
132
- return i;
133
- }
134
- return g = e, g;
135
- }
136
- var N, w;
137
- function se() {
138
- if (w) return N;
139
- w = 1;
140
- var o = ue(), e = /^\s+/;
141
- function d(i) {
142
- return i && i.slice(0, o(i) + 1).replace(e, "");
143
- }
144
- return N = d, N;
145
- }
146
- var B, x;
147
- function Se() {
148
- if (x) return B;
149
- x = 1;
150
- function o(e) {
151
- var d = typeof e;
152
- return e != null && (d == "object" || d == "function");
153
- }
154
- return B = o, B;
155
- }
156
- var L, z;
157
- function Te() {
158
- if (z) return L;
159
- z = 1;
160
- var o = se(), e = Se(), d = oe(), i = NaN, r = /^[-+]0x[0-9a-f]+$/i, t = /^0b[01]+$/i, c = /^0o[0-7]+$/i, a = parseInt;
161
- function l(n) {
162
- if (typeof n == "number")
163
- return n;
164
- if (d(n))
165
- return i;
166
- if (e(n)) {
167
- var C = typeof n.valueOf == "function" ? n.valueOf() : n;
168
- n = e(C) ? C + "" : C;
169
- }
170
- if (typeof n != "string")
171
- return n === 0 ? n : +n;
172
- n = o(n);
173
- var y = t.test(n);
174
- return y || c.test(n) ? a(n.slice(2), y ? 2 : 8) : r.test(n) ? i : +n;
175
- }
176
- return L = l, L;
177
- }
178
- var h, X;
179
- function fe() {
180
- if (X) return h;
181
- X = 1;
182
- var o = Te(), e = 1 / 0, d = 17976931348623157e292;
183
- function i(r) {
184
- if (!r)
185
- return r === 0 ? r : 0;
186
- if (r = o(r), r === e || r === -e) {
187
- var t = r < 0 ? -1 : 1;
188
- return t * d;
189
- }
190
- return r === r ? r : 0;
191
- }
192
- return h = i, h;
193
- }
194
- var E, Q;
195
- function Me() {
196
- if (Q) return E;
197
- Q = 1;
198
- var o = fe();
199
- function e(d) {
200
- var i = o(d), r = i % 1;
201
- return i === i ? r ? i - r : i : 0;
202
- }
203
- return E = e, E;
204
- }
205
- var O, $;
206
- function Ae() {
207
- if ($) return O;
208
- $ = 1;
209
- var o = ie();
210
- function e(d) {
211
- return d == null ? "" : o(d);
212
- }
213
- return O = e, O;
214
- }
215
- var P, ee;
216
- function Re() {
217
- if (ee) return P;
218
- ee = 1;
219
- var o = ae(), e = ie(), d = Me(), i = Ae();
220
- function r(t, c, a) {
221
- return t = i(t), a = a == null ? 0 : o(d(a), 0, t.length), c = e(c), t.slice(a, a + c.length) == c;
222
- }
223
- return P = r, P;
224
- }
225
- var be = Re();
226
- const Ge = /* @__PURE__ */ de(be), v = [
227
- { name: "Afghanistan", dialCode: "93", code: "AF", code3: "AFG", priority: 0 },
228
- { name: "Albania", dialCode: "355", code: "AL", code3: "ALB", priority: 0 },
229
- { name: "Algeria", dialCode: "213", code: "DZ", code3: "DZA", priority: 0 },
230
- { name: "American Samoa", dialCode: "1684", code: "AS", code3: "ASM", priority: 0 },
231
- { name: "Andorra", dialCode: "376", code: "AD", code3: "AND", priority: 0 },
232
- { name: "Angola", dialCode: "244", code: "AO", code3: "AGO", priority: 0 },
233
- { name: "Anguilla", dialCode: "1264", code: "AI", code3: "AIA", priority: 0 },
234
- { name: "Antarctica", dialCode: "672", code: "AQ", code3: "ATA", priority: 0 },
235
- { name: "Antigua and Barbuda", dialCode: "1268", code: "AG", code3: "ATG", priority: 0 },
236
- { name: "Argentina", dialCode: "54", code: "AR", code3: "ARG", priority: 0 },
237
- { name: "Armenia", dialCode: "374", code: "AM", code3: "ARM", priority: 0 },
238
- { name: "Aruba", dialCode: "297", code: "AW", code3: "ABW", priority: 0 },
239
- { name: "Australia", dialCode: "61", code: "AU", code3: "AUS", priority: 0 },
240
- { name: "Austria", dialCode: "43", code: "AT", code3: "AUT", priority: 0 },
241
- { name: "Azerbaijan", dialCode: "994", code: "AZ", code3: "AZE", priority: 0 },
242
- { name: "Bahamas", dialCode: "1242", code: "BS", code3: "BHS", priority: 0 },
243
- { name: "Bahrain", dialCode: "973", code: "BH", code3: "BHR", priority: 0 },
244
- { name: "Bangladesh", dialCode: "880", code: "BD", code3: "BGD", priority: 0 },
245
- { name: "Barbados", dialCode: "1246", code: "BB", code3: "BRB", priority: 0 },
246
- { name: "Belarus", dialCode: "375", code: "BY", code3: "BLR", priority: 0 },
247
- { name: "Belgium", dialCode: "32", code: "BE", code3: "BEL", priority: 0 },
248
- { name: "Belize", dialCode: "501", code: "BZ", code3: "BLZ", priority: 0 },
249
- { name: "Benin", dialCode: "229", code: "BJ", code3: "BEN", priority: 0 },
250
- { name: "Bermuda", dialCode: "1441", code: "BM", code3: "BMU", priority: 0 },
251
- { name: "Bhutan", dialCode: "975", code: "BT", code3: "BTN", priority: 0 },
252
- { name: "Bolivia", dialCode: "591", code: "BO", code3: "BOL", priority: 0 },
253
- { name: "Bosnia and Herzegovina", dialCode: "387", code: "BA", code3: "BIH", priority: 0 },
254
- { name: "Botswana", dialCode: "267", code: "BW", code3: "BWA", priority: 0 },
255
- { name: "Brazil", dialCode: "55", code: "BR", code3: "BRA", priority: 0 },
256
- {
257
- name: "British Indian Ocean Territory",
258
- dialCode: "246",
259
- code: "IO",
260
- code3: "IOT",
261
- priority: 0
262
- },
263
- { name: "British Virgin Islands", dialCode: "1284", code: "VG", code3: "VGB", priority: 0 },
264
- { name: "Brunei", dialCode: "673", code: "BN", code3: "BRN", priority: 0 },
265
- { name: "Bulgaria", dialCode: "359", code: "BG", code3: "BGR", priority: 0 },
266
- { name: "Burkina Faso", dialCode: "226", code: "BF", code3: "BFA", priority: 0 },
267
- { name: "Burundi", dialCode: "257", code: "BI", code3: "BDI", priority: 0 },
268
- { name: "Cambodia", dialCode: "855", code: "KH", code3: "KHM", priority: 0 },
269
- { name: "Cameroon", dialCode: "237", code: "CM", code3: "CMR", priority: 0 },
270
- { name: "Canada", dialCode: "1", code: "CA", code3: "CAN", priority: 1 },
271
- { name: "Cape Verde", dialCode: "238", code: "CV", code3: "CPV", priority: 0 },
272
- { name: "Cayman Islands", dialCode: "1345", code: "KY", code3: "CYM", priority: 0 },
273
- { name: "Central African Republic", dialCode: "236", code: "CF", code3: "CAF", priority: 0 },
274
- { name: "Chad", dialCode: "235", code: "TD", code3: "TCD", priority: 0 },
275
- { name: "Chile", dialCode: "56", code: "CL", code3: "CHL", priority: 0 },
276
- { name: "China", dialCode: "86", code: "CN", code3: "CHN", priority: 0 },
277
- { name: "Christmas Island", dialCode: "61", code: "CX", code3: "CXR", priority: 0 },
278
- { name: "Cocos Islands", dialCode: "61", code: "CC", code3: "CCK", priority: 0 },
279
- { name: "Colombia", dialCode: "57", code: "CO", code3: "COL", priority: 0 },
280
- { name: "Comoros", dialCode: "269", code: "KM", code3: "COM", priority: 0 },
281
- { name: "Cook Islands", dialCode: "682", code: "CK", code3: "COK", priority: 0 },
282
- { name: "Costa Rica", dialCode: "506", code: "CR", code3: "CRI", priority: 0 },
283
- { name: "Croatia", dialCode: "385", code: "HR", code3: "HRV", priority: 0 },
284
- { name: "Cuba", dialCode: "53", code: "CU", code3: "CUB", priority: 0 },
285
- { name: "Curacao", dialCode: "599", code: "CW", code3: "CUW", priority: 0 },
286
- { name: "Cyprus", dialCode: "357", code: "CY", code3: "CYP", priority: 0 },
287
- { name: "Czech Republic", dialCode: "420", code: "CZ", code3: "CZE", priority: 0 },
288
- {
289
- name: "Democratic Republic of the Congo",
290
- dialCode: "243",
291
- code: "CD",
292
- code3: "COD",
293
- priority: 0
294
- },
295
- { name: "Denmark", dialCode: "45", code: "DK", code3: "DNK", priority: 0 },
296
- { name: "Djibouti", dialCode: "253", code: "DJ", code3: "DJI", priority: 0 },
297
- { name: "Dominica", dialCode: "1767", code: "DM", code3: "DMA", priority: 0 },
298
- { name: "Dominican Republic", dialCode: "18", code: "DO", code3: "DOM", priority: 1 },
299
- //'1809, 1829, 1849'
300
- { name: "East Timor", dialCode: "670", code: "TL", code3: "TLS", priority: 0 },
301
- { name: "Ecuador", dialCode: "593", code: "EC", code3: "ECU", priority: 0 },
302
- { name: "Egypt", dialCode: "20", code: "EG", code3: "EGY", priority: 0 },
303
- { name: "England", dialCode: "44", code: "GB", code3: "GBR", priority: 0 },
304
- { name: "El Salvador", dialCode: "503", code: "SV", code3: "SLV", priority: 0 },
305
- { name: "Equatorial Guinea", dialCode: "240", code: "GQ", code3: "GNQ", priority: 0 },
306
- { name: "Eritrea", dialCode: "291", code: "ER", code3: "ERI", priority: 0 },
307
- { name: "Estonia", dialCode: "372", code: "EE", code3: "EST", priority: 0 },
308
- { name: "Ethiopia", dialCode: "251", code: "ET", code3: "ETH", priority: 0 },
309
- { name: "Falkland Islands", dialCode: "500", code: "FK", code3: "FLK", priority: 0 },
310
- { name: "Faroe Islands", dialCode: "298", code: "FO", code3: "FRO", priority: 0 },
311
- { name: "Fiji", dialCode: "679", code: "FJ", code3: "FJI", priority: 0 },
312
- { name: "Finland", dialCode: "358", code: "FI", code3: "FIN", priority: 0 },
313
- { name: "France", dialCode: "33", code: "FR", code3: "FRA", priority: 0 },
314
- { name: "French Polynesia", dialCode: "689", code: "PF", code3: "PYF", priority: 0 },
315
- { name: "Gabon", dialCode: "241", code: "GA", code3: "GAB", priority: 0 },
316
- { name: "Gambia", dialCode: "220", code: "GM", code3: "GMB", priority: 0 },
317
- { name: "Georgia", dialCode: "995", code: "GE", code3: "GEO", priority: 0 },
318
- { name: "Germany", dialCode: "49", code: "DE", code3: "DEU", priority: 0 },
319
- { name: "Ghana", dialCode: "233", code: "GH", code3: "GHA", priority: 0 },
320
- { name: "Gibraltar", dialCode: "350", code: "GI", code3: "GIB", priority: 0 },
321
- { name: "Greece", dialCode: "30", code: "GR", code3: "GRC", priority: 0 },
322
- { name: "Greenland", dialCode: "299", code: "GL", code3: "GRL", priority: 0 },
323
- { name: "Grenada", dialCode: "1473", code: "GD", code3: "GRD", priority: 0 },
324
- { name: "Guam", dialCode: "1671", code: "GU", code3: "GUM", priority: 0 },
325
- { name: "Guatemala", dialCode: "502", code: "GT", code3: "GTM", priority: 0 },
326
- { name: "Guernsey", dialCode: "441481", code: "GG", code3: "GGY", priority: 0 },
327
- { name: "Guinea", dialCode: "224", code: "GN", code3: "GIN", priority: 0 },
328
- { name: "GuineaBissau", dialCode: "245", code: "GW", code3: "GNB", priority: 0 },
329
- { name: "Guyana", dialCode: "592", code: "GY", code3: "GUY", priority: 0 },
330
- { name: "Haiti", dialCode: "509", code: "HT", code3: "HTI", priority: 0 },
331
- { name: "Honduras", dialCode: "504", code: "HN", code3: "HND", priority: 0 },
332
- { name: "Hong Kong", dialCode: "852", code: "HK", code3: "HKG", priority: 0 },
333
- { name: "Hungary", dialCode: "36", code: "HU", code3: "HUN", priority: 0 },
334
- { name: "Iceland", dialCode: "354", code: "IS", code3: "ISL", priority: 0 },
335
- { name: "India", dialCode: "91", code: "IN", code3: "IND", priority: 0 },
336
- { name: "Indonesia", dialCode: "62", code: "ID", code3: "IDN", priority: 0 },
337
- { name: "Iran", dialCode: "98", code: "IR", code3: "IRN", priority: 0 },
338
- { name: "Iraq", dialCode: "964", code: "IQ", code3: "IRQ", priority: 0 },
339
- { name: "Ireland", dialCode: "353", code: "IE", code3: "IRL", priority: 0 },
340
- { name: "Isle of Man", dialCode: "441624", code: "IM", code3: "IMN", priority: 0 },
341
- { name: "Israel", dialCode: "972", code: "IL", code3: "ISR", priority: 0 },
342
- { name: "Italy", dialCode: "39", code: "IT", code3: "ITA", priority: 0 },
343
- { name: "Ivory Coast", dialCode: "225", code: "CI", code3: "CIV", priority: 0 },
344
- { name: "Jamaica", dialCode: "1876", code: "JM", code3: "JAM", priority: 0 },
345
- { name: "Japan", dialCode: "81", code: "JP", code3: "JPN", priority: 0 },
346
- { name: "Jersey", dialCode: "441534", code: "JE", code3: "JEY", priority: 0 },
347
- { name: "Jordan", dialCode: "962", code: "JO", code3: "JOR", priority: 0 },
348
- { name: "Kazakhstan", dialCode: "7", code: "KZ", code3: "KAZ", priority: 1 },
349
- { name: "Kenya", dialCode: "254", code: "KE", code3: "KEN", priority: 0 },
350
- { name: "Kiribati", dialCode: "686", code: "KI", code3: "KIR", priority: 0 },
351
- { name: "Kosovo", dialCode: "383", code: "XK", code3: "XKX", priority: 0 },
352
- { name: "Kuwait", dialCode: "965", code: "KW", code3: "KWT", priority: 0 },
353
- { name: "Kyrgyzstan", dialCode: "996", code: "KG", code3: "KGZ", priority: 0 },
354
- { name: "Laos", dialCode: "856", code: "LA", code3: "LAO", priority: 0 },
355
- { name: "Latvia", dialCode: "371", code: "LV", code3: "LVA", priority: 0 },
356
- { name: "Lebanon", dialCode: "961", code: "LB", code3: "LBN", priority: 0 },
357
- { name: "Lesotho", dialCode: "266", code: "LS", code3: "LSO", priority: 0 },
358
- { name: "Liberia", dialCode: "231", code: "LR", code3: "LBR", priority: 0 },
359
- { name: "Libya", dialCode: "218", code: "LY", code3: "LBY", priority: 0 },
360
- { name: "Liechtenstein", dialCode: "423", code: "LI", code3: "LIE", priority: 0 },
361
- { name: "Lithuania", dialCode: "370", code: "LT", code3: "LTU", priority: 0 },
362
- { name: "Luxembourg", dialCode: "352", code: "LU", code3: "LUX", priority: 0 },
363
- { name: "Macau", dialCode: "853", code: "MO", code3: "MAC", priority: 0 },
364
- { name: "Macedonia", dialCode: "389", code: "MK", code3: "MKD", priority: 0 },
365
- { name: "Madagascar", dialCode: "261", code: "MG", code3: "MDG", priority: 0 },
366
- { name: "Malawi", dialCode: "265", code: "MW", code3: "MWI", priority: 0 },
367
- { name: "Malaysia", dialCode: "60", code: "MY", code3: "MYS", priority: 0 },
368
- { name: "Maldives", dialCode: "960", code: "MV", code3: "MDV", priority: 0 },
369
- { name: "Mali", dialCode: "223", code: "ML", code3: "MLI", priority: 0 },
370
- { name: "Malta", dialCode: "356", code: "MT", code3: "MLT", priority: 0 },
371
- { name: "Marshall Islands", dialCode: "692", code: "MH", code3: "MHL", priority: 0 },
372
- { name: "Mauritania", dialCode: "222", code: "MR", code3: "MRT", priority: 0 },
373
- { name: "Mauritius", dialCode: "230", code: "MU", code3: "MUS", priority: 0 },
374
- { name: "Mayotte", dialCode: "262", code: "YT", code3: "MYT", priority: 0 },
375
- { name: "Mexico", dialCode: "52", code: "MX", code3: "MEX", priority: 0 },
376
- { name: "Micronesia", dialCode: "691", code: "FM", code3: "FSM", priority: 0 },
377
- { name: "Moldova", dialCode: "373", code: "MD", code3: "MDA", priority: 0 },
378
- { name: "Monaco", dialCode: "377", code: "MC", code3: "MCO", priority: 0 },
379
- { name: "Mongolia", dialCode: "976", code: "MN", code3: "MNG", priority: 0 },
380
- { name: "Montenegro", dialCode: "382", code: "ME", code3: "MNE", priority: 0 },
381
- { name: "Montserrat", dialCode: "1664", code: "MS", code3: "MSR", priority: 0 },
382
- { name: "Morocco", dialCode: "212", code: "MA", code3: "MAR", priority: 0 },
383
- { name: "Mozambique", dialCode: "258", code: "MZ", code3: "MOZ", priority: 0 },
384
- { name: "Myanmar", dialCode: "95", code: "MM", code3: "MMR", priority: 0 },
385
- { name: "Namibia", dialCode: "264", code: "NA", code3: "NAM", priority: 0 },
386
- { name: "Nauru", dialCode: "674", code: "NR", code3: "NRU", priority: 0 },
387
- { name: "Nepal", dialCode: "977", code: "NP", code3: "NPL", priority: 0 },
388
- { name: "Netherlands", dialCode: "31", code: "NL", code3: "NLD", priority: 0 },
389
- { name: "Netherlands Antilles", dialCode: "599", code: "AN", code3: "ANT", priority: 1 },
390
- { name: "New Caledonia", dialCode: "687", code: "NC", code3: "NCL", priority: 0 },
391
- { name: "New Zealand", dialCode: "64", code: "NZ", code3: "NZL", priority: 0 },
392
- { name: "Nicaragua", dialCode: "505", code: "NI", code3: "NIC", priority: 0 },
393
- { name: "Niger", dialCode: "227", code: "NE", code3: "NER", priority: 0 },
394
- { name: "Nigeria", dialCode: "234", code: "NG", code3: "NGA", priority: 0 },
395
- { name: "Niue", dialCode: "683", code: "NU", code3: "NIU", priority: 0 },
396
- { name: "North Korea", dialCode: "850", code: "KP", code3: "PRK", priority: 0 },
397
- { name: "Northern Mariana Islands", dialCode: "1670", code: "MP", code3: "MNP", priority: 0 },
398
- { name: "Northern Ireland", dialCode: "44", code: "GB", code3: "GBR", priority: 0 },
399
- { name: "Norway", dialCode: "47", code: "NO", code3: "NOR", priority: 0 },
400
- { name: "Oman", dialCode: "968", code: "OM", code3: "OMN", priority: 0 },
401
- { name: "Pakistan", dialCode: "92", code: "PK", code3: "PAK", priority: 0 },
402
- { name: "Palau", dialCode: "680", code: "PW", code3: "PLW", priority: 0 },
403
- { name: "Palestine", dialCode: "970", code: "PS", code3: "PSE", priority: 0 },
404
- { name: "Panama", dialCode: "507", code: "PA", code3: "PAN", priority: 0 },
405
- { name: "Papua New Guinea", dialCode: "675", code: "PG", code3: "PNG", priority: 0 },
406
- { name: "Paraguay", dialCode: "595", code: "PY", code3: "PRY", priority: 0 },
407
- { name: "Peru", dialCode: "51", code: "PE", code3: "PER", priority: 0 },
408
- { name: "Philippines", dialCode: "63", code: "PH", code3: "PHL", priority: 0 },
409
- { name: "Pitcairn", dialCode: "64", code: "PN", code3: "PCN", priority: 0 },
410
- { name: "Poland", dialCode: "48", code: "PL", code3: "POL", priority: 0 },
411
- { name: "Portugal", dialCode: "351", code: "PT", code3: "PRT", priority: 0 },
412
- { name: "Puerto Rico", dialCode: "1", code: "PR", code3: "PRI", priority: 2 },
413
- { name: "Qatar", dialCode: "974", code: "QA", code3: "QAT", priority: 0 },
414
- { name: "Republic of the Congo", dialCode: "242", code: "CG", code3: "COG", priority: 0 },
415
- { name: "Reunion", dialCode: "262", code: "RE", code3: "REU", priority: 0 },
416
- { name: "Romania", dialCode: "40", code: "RO", code3: "ROU", priority: 0 },
417
- { name: "Russia", dialCode: "7", code: "RU", code3: "RUS", priority: 0 },
418
- { name: "Rwanda", dialCode: "250", code: "RW", code3: "RWA", priority: 0 },
419
- { name: "Saint Barthelemy", dialCode: "590", code: "BL", code3: "BLM", priority: 0 },
420
- { name: "Saint Helena", dialCode: "290", code: "SH", code3: "SHN", priority: 0 },
421
- { name: "Saint Kitts and Nevis", dialCode: "1869", code: "KN", code3: "KNA", priority: 0 },
422
- { name: "Saint Lucia", dialCode: "1758", code: "LC", code3: "LCA", priority: 0 },
423
- { name: "Saint Martin", dialCode: "590", code: "MF", code3: "MAF", priority: 0 },
424
- { name: "Saint Pierre and Miquelon", dialCode: "508", code: "PM", code3: "SPM", priority: 0 },
425
- {
426
- name: "Saint Vincent and the Grenadines",
427
- dialCode: "1784",
428
- code: "VC",
429
- code3: "VCT",
430
- priority: 0
431
- },
432
- { name: "Samoa", dialCode: "685", code: "WS", code3: "WSM", priority: 0 },
433
- { name: "San Marino", dialCode: "378", code: "SM", code3: "SMR", priority: 0 },
434
- { name: "Sao Tome and Principe", dialCode: "239", code: "ST", code3: "STP", priority: 0 },
435
- { name: "Saudi Arabia", dialCode: "966", code: "SA", code3: "SAU", priority: 0 },
436
- { name: "Scotland", dialCode: "44", code: "GB", code3: "GBR", priority: 0 },
437
- { name: "Senegal", dialCode: "221", code: "SN", code3: "SEN", priority: 0 },
438
- { name: "Serbia", dialCode: "381", code: "RS", code3: "SRB", priority: 0 },
439
- { name: "Seychelles", dialCode: "248", code: "SC", code3: "SYC", priority: 0 },
440
- { name: "Sierra Leone", dialCode: "232", code: "SL", code3: "SLE", priority: 0 },
441
- { name: "Singapore", dialCode: "65", code: "SG", code3: "SGP", priority: 0 },
442
- { name: "Sint Maarten", dialCode: "1721", code: "SX", code3: "SXM", priority: 0 },
443
- { name: "Slovakia", dialCode: "421", code: "SK", code3: "SVK", priority: 0 },
444
- { name: "Slovenia", dialCode: "386", code: "SI", code3: "SVN", priority: 0 },
445
- { name: "Solomon Islands", dialCode: "677", code: "SB", code3: "SLB", priority: 0 },
446
- { name: "Somalia", dialCode: "252", code: "SO", code3: "SOM", priority: 0 },
447
- { name: "South Africa", dialCode: "27", code: "ZA", code3: "ZAF", priority: 0 },
448
- { name: "South Korea", dialCode: "82", code: "KR", code3: "KOR", priority: 0 },
449
- { name: "South Sudan", dialCode: "211", code: "SS", code3: "SSD", priority: 0 },
450
- { name: "Spain", dialCode: "34", code: "ES", code3: "ESP", priority: 0 },
451
- { name: "Sri Lanka", dialCode: "94", code: "LK", code3: "LKA", priority: 0 },
452
- { name: "Sudan", dialCode: "249", code: "SD", code3: "SDN", priority: 0 },
453
- { name: "Suriname", dialCode: "597", code: "SR", code3: "SUR", priority: 0 },
454
- { name: "Svalbard and Jan Mayen", dialCode: "47", code: "SJ", code3: "SJM", priority: 0 },
455
- { name: "Swaziland", dialCode: "268", code: "SZ", code3: "SWZ", priority: 0 },
456
- { name: "Sweden", dialCode: "46", code: "SE", code3: "SWE", priority: 0 },
457
- { name: "Switzerland", dialCode: "41", code: "CH", code3: "CHE", priority: 0 },
458
- { name: "Syria", dialCode: "963", code: "SY", code3: "SYR", priority: 0 },
459
- { name: "Taiwan", dialCode: "886", code: "TW", code3: "TWN", priority: 0 },
460
- { name: "Tajikistan", dialCode: "992", code: "TJ", code3: "TJK", priority: 0 },
461
- { name: "Tanzania", dialCode: "255", code: "TZ", code3: "TZA", priority: 0 },
462
- { name: "Thailand", dialCode: "66", code: "TH", code3: "THA", priority: 0 },
463
- { name: "Togo", dialCode: "228", code: "TG", code3: "TGO", priority: 0 },
464
- { name: "Tokelau", dialCode: "690", code: "TK", code3: "TKL", priority: 0 },
465
- { name: "Tonga", dialCode: "676", code: "TO", code3: "TON", priority: 0 },
466
- { name: "Trinidad and Tobago", dialCode: "1868", code: "TT", code3: "TTO", priority: 0 },
467
- { name: "Tunisia", dialCode: "216", code: "TN", code3: "TUN", priority: 0 },
468
- { name: "Turkey", dialCode: "90", code: "TR", code3: "TUR", priority: 0 },
469
- { name: "Turkmenistan", dialCode: "993", code: "TM", code3: "TKM", priority: 0 },
470
- { name: "Turks and Caicos Islands", dialCode: "1649", code: "TC", code3: "TCA", priority: 0 },
471
- { name: "Tuvalu", dialCode: "688", code: "TV", code3: "TUV", priority: 0 },
472
- { name: "U.S. Virgin Islands", dialCode: "1340", code: "VI", code3: "VIR", priority: 0 },
473
- { name: "Uganda", dialCode: "256", code: "UG", code3: "UGA", priority: 0 },
474
- { name: "Ukraine", dialCode: "380", code: "UA", code3: "UKR", priority: 0 },
475
- { name: "United Arab Emirates", dialCode: "971", code: "AE", code3: "ARE", priority: 0 },
476
- { name: "United Kingdom", dialCode: "44", code: "GB", code3: "GBR", priority: 0 },
477
- { name: "United States", dialCode: "1", code: "US", code3: "USA", priority: 0 },
478
- { name: "Uruguay", dialCode: "598", code: "UY", code3: "URY", priority: 0 },
479
- { name: "Uzbekistan", dialCode: "998", code: "UZ", code3: "UZB", priority: 0 },
480
- { name: "Vanuatu", dialCode: "678", code: "VU", code3: "VUT", priority: 0 },
481
- { name: "Vatican", dialCode: "39", code: "VA", code3: "VAT", priority: 1 },
482
- { name: "Venezuela", dialCode: "58", code: "VE", code3: "VEN", priority: 0 },
483
- { name: "Vietnam", dialCode: "84", code: "VN", code3: "VNM", priority: 0 },
484
- { name: "Wallis and Futuna", dialCode: "681", code: "WF", code3: "WLF", priority: 0 },
485
- { name: "Wales", dialCode: "44", code: "GB", code3: "GBR", priority: 0 },
486
- { name: "Western Sahara", dialCode: "212", code: "EH", code3: "ESH", priority: 0 },
487
- { name: "Yemen", dialCode: "967", code: "YE", code3: "YEM", priority: 0 },
488
- { name: "Zambia", dialCode: "260", code: "ZM", code3: "ZMB", priority: 0 },
489
- { name: "Zimbabwe", dialCode: "263", code: "ZW", code3: "ZWE", priority: 0 }
490
- ];
491
- function Ie(o) {
492
- return o && o !== "name" ? re.sortArray(v, o) : v;
493
- }
494
- function Be() {
495
- return Ie().map((e) => ({ key: e.name, text: e.name }));
496
- }
497
- function Le(o) {
498
- if (!o || o.trim() === "") return;
499
- o = o.substring(0, 6);
500
- const e = v.reduce(
501
- (d, i) => Ge(o, i.dialCode) && (i.dialCode.length > d?.dialCode?.length || i.dialCode.length === d.dialCode.length && i.priority < d.priority) ? i : d,
502
- { code: "", code3: "", dialCode: "", name: "", priority: 0 }
503
- );
504
- return e.code ? e : void 0;
505
- }
506
- export {
507
- v as AllCountries,
508
- Ie as getCountries,
509
- Le as getCountryByPhoneNumber,
510
- Be as getCountryOptions
511
- };
512
- //# sourceMappingURL=Countries.js.map