react-international-phone
Advanced tools
Comparing version 1.6.0 to 1.6.1
@@ -1,1 +0,1 @@ | ||
!function(e,a){"object"==typeof exports&&"object"==typeof module?module.exports=a(require("react")):"function"==typeof define&&define.amd?define(["react"],a):"object"==typeof exports?exports["react-international-phone"]=a(require("react")):e["react-international-phone"]=a(e.react)}(this,(e=>(()=>{"use strict";var a={634:(e,a,r)=>{r.r(a)},435:(e,a,r)=>{r.r(a)},185:(e,a,r)=>{r.r(a)},986:(e,a,r)=>{r.r(a)},235:(e,a,r)=>{r.r(a)},661:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)},n=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:!0,value:a})}:function(e,a){e.default=a}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(a,e,r);return i(a,e),a},u=this&&this.__rest||function(e,a){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)a.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(r[t[n]]=e[t[n]])}return r};Object.defineProperty(a,"__esModule",{value:!0}),a.CountrySelector=void 0,r(634);var l=o(r(156)),s=r(79),c=r(71),d=r(926),f=r(626),p=r(472),h=r(918);a.CountrySelector=function(e){var a,r,n=e.selectedCountry,i=e.onSelect,o=e.disabled,m=e.hideDropdown,y=e.countries,v=void 0===y?s.defaultCountries:y,b=e.renderButtonWrapper,C=u(e,["selectedCountry","onSelect","disabled","hideDropdown","countries","renderButtonWrapper"]),g=(0,l.useState)(!1),P=g[0],O=g[1],_=(0,l.useMemo)((function(){if(n)return(0,f.getCountry)({value:n,field:"iso2",countries:v})}),[v,n]),w=(0,l.useRef)(null);return(0,c.useOnClickOutside)({ref:w,onClickOutside:function(){return O(!1)}}),l.default.createElement("div",{className:(0,d.buildClassNames)({addPrefix:["country-selector"],rawClassNames:[C.className]}),style:C.style,ref:w},(a=function(){return O((function(e){return!e}))},r=l.default.createElement("div",{className:(0,d.buildClassNames)({addPrefix:["country-selector-button__button-content"],rawClassNames:[C.buttonContentWrapperClassName]}),style:C.buttonContentWrapperStyle},l.default.createElement(p.FlagEmoji,{iso2:n,className:(0,d.buildClassNames)({addPrefix:["country-selector-button__flag-emoji",o&&"country-selector-button__flag-emoji--disabled"],rawClassNames:[C.flagClassName]}),style:t({visibility:n?"visible":"hidden"},C.flagStyle)}),!m&&l.default.createElement("div",{className:(0,d.buildClassNames)({addPrefix:["country-selector-button__dropdown-arrow",o&&"country-selector-button__dropdown-arrow--disabled",P&&"country-selector-button__dropdown-arrow--active"],rawClassNames:[C.dropdownArrowClassName]}),style:C.dropdownArrowStyle})),b?b({children:r,onClick:a}):l.default.createElement("button",{title:null==_?void 0:_.name,onClick:a,className:(0,d.buildClassNames)({addPrefix:["country-selector-button",P&&"country-selector-button--active",o&&"country-selector-button--disabled",m&&"country-selector-button--hide-dropdown"],rawClassNames:[C.buttonClassName]}),disabled:m||o,"aria-haspopup":"listbox","aria-expanded":m,"data-country":n,style:C.buttonStyle},r)),l.default.createElement(h.CountrySelectorDropdown,t({show:P,countries:v,onSelect:function(e){O(!1),null==i||i(e)},selectedCountry:n,onEscapePress:function(){O(!1)}},C.dropdownStyleProps)))}},918:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)},n=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:!0,value:a})}:function(e,a){e.default=a}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(a,e,r);return i(a,e),a},u=this&&this.__rest||function(e,a){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)a.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(r[t[n]]=e[t[n]])}return r};Object.defineProperty(a,"__esModule",{value:!0}),a.CountrySelectorDropdown=void 0,r(435);var l=o(r(156)),s=r(79),c=r(926),d=r(626),f=r(472);a.CountrySelectorDropdown=function(e){var a=e.show,r=e.dialCodePrefix,n=void 0===r?"+":r,i=e.selectedCountry,o=e.countries,p=void 0===o?s.defaultCountries:o,h=e.onSelect,m=e.onEscapePress,y=u(e,["show","dialCodePrefix","selectedCountry","countries","onSelect","onEscapePress"]),v=(0,l.useRef)(null),b=(0,l.useCallback)((function(e,a){"Enter"===e.key&&(null==h||h(a)),"Escape"===e.key&&(null==m||m())}),[m,h]);return l.default.createElement("ul",{ref:v,role:"listbox",className:(0,c.buildClassNames)({addPrefix:["country-selector-dropdown"],rawClassNames:[y.className]}),style:t({display:a?"block":"none"},y.style)},p.map((function(e){var a=(0,d.parseCountry)(e),r=a.iso2===i;return l.default.createElement("li",{key:a.iso2,"data-country":a.iso2,tabIndex:0,role:"option",className:(0,c.buildClassNames)({addPrefix:["country-selector-dropdown__list-item",r&&"country-selector-dropdown__list-item--selected"],rawClassNames:[y.listItemClassName]}),onClick:function(){return null==h?void 0:h(a)},onKeyDown:function(e){b(e,a)},style:y.listItemStyle},l.default.createElement(f.FlagEmoji,{iso2:a.iso2,className:(0,c.buildClassNames)({addPrefix:["country-selector-dropdown__list-item-flag-emoji"],rawClassNames:[y.listItemFlagClassName]}),style:y.listItemFlagStyle}),l.default.createElement("span",{className:(0,c.buildClassNames)({addPrefix:["country-selector-dropdown__list-item-country-name"],rawClassNames:[y.listItemCountryNameClassName]}),style:y.listItemCountryNameStyle},a.name),l.default.createElement("span",{className:(0,c.buildClassNames)({addPrefix:["country-selector-dropdown__list-item-dial-code"],rawClassNames:[y.listItemDialCodeClassName]}),style:y.listItemDialCodeStyle},n,a.dialCode))})))}},66:function(e,a,r){var t=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.DialCodePreview=void 0,r(185);var n=t(r(156)),i=r(926);a.DialCodePreview=function(e){var a=e.dialCode,r=e.prefix,t=e.disabled,o=e.style,u=e.className;return n.default.createElement("div",{className:(0,i.buildClassNames)({addPrefix:["dial-code-preview",t&&"dial-code-preview--disabled"],rawClassNames:[u]}),style:o},"".concat(r).concat(a))}},472:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)},n=this&&this.__rest||function(e,a){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)a.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(r[t[n]]=e[t[n]])}return r},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.FlagEmoji=void 0,r(986);var o=i(r(156)),u=r(926),l="abcdefghijklmnopqrstuvwxyz".split("").reduce((function(e,a,r){var n,i,o;return t(t({},e),((n={})[a]=(i=r,o=parseInt("1f1e6",16),Number(o+i).toString(16)),n))}),{});a.FlagEmoji=function(e){var a=e.iso2,r=e.size,i=void 0===r?"24px":r,s=e.protocol,c=void 0===s?"https":s,d=e.className,f=n(e,["iso2","size","protocol","className"]);if(!a)return o.default.createElement("img",t({width:i,height:i},f));var p=function(e){return[l[e[0]],l[e[1]]].join("-")}(a),h="".concat(c,"://twemoji.maxcdn.com/2/svg/").concat(p,".svg");return o.default.createElement("img",t({className:(0,u.buildClassNames)({addPrefix:["flag-emoji"],rawClassNames:[d]}),src:h,width:i,height:i,draggable:!1,"data-country":a},f))}},351:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)},n=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:!0,value:a})}:function(e,a){e.default=a}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(a,e,r);return i(a,e),a},u=this&&this.__rest||function(e,a){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)a.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(r[t[n]]=e[t[n]])}return r};Object.defineProperty(a,"__esModule",{value:!0}),a.PhoneInput=void 0,r(235);var l=o(r(156)),s=r(79),c=r(343),d=r(926),f=r(626),p=r(661),h=r(66);a.PhoneInput=function(e){var a,r=e.hideDropdown,n=e.placeholder,i=e.disabled,o=e.showDisabledDialCodeAndPrefix,m=e.inputProps,y=e.onChange,v=e.style,b=e.className,C=e.inputStyle,g=e.inputClassName,P=e.countrySelectorStyleProps,O=e.dialCodePreviewStyleProps,_=e.countries,w=void 0===_?s.defaultCountries:_,j=u(e,["hideDropdown","placeholder","disabled","showDisabledDialCodeAndPrefix","inputProps","onChange","style","className","inputStyle","inputClassName","countrySelectorStyleProps","dialCodePreviewStyleProps","countries"]),D=(0,c.usePhoneInput)(t(t({},j),{countries:w,onCountryChange:function(e){null==y||y(e)}})),x=D.phone,S=D.inputRef,M=D.country,N=D.setCountry,k=D.handlePhoneValueChange,A=(0,l.useMemo)((function(){if(M)return(0,f.getCountry)({value:M,field:"iso2",countries:w})}),[w,M]),E=j.disableDialCodeAndPrefix&&o&&(null==A?void 0:A.dialCode);return l.default.createElement("div",{className:(0,d.buildClassNames)({addPrefix:["input-container"],rawClassNames:[b]}),style:v},l.default.createElement(p.CountrySelector,t({onSelect:function(e){return N(e.iso2)},selectedCountry:M,countries:w,disabled:i,hideDropdown:r},P)),E&&l.default.createElement(h.DialCodePreview,t({dialCode:A.dialCode,prefix:null!==(a=j.prefix)&&void 0!==a?a:"+",disabled:i},O)),l.default.createElement("input",t({onChange:function(e){var a=k(e);null==y||y(a)},value:x,type:"tel",ref:S,className:(0,d.buildClassNames)({addPrefix:["input",i&&"input--disabled"],rawClassNames:[g]}),placeholder:n,disabled:i,style:C},m)))}},79:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.defaultCountries=void 0,a.defaultCountries=[["Afghanistan",["asia"],"af","93"],["Albania",["europe"],"al","355"],["Algeria",["africa","north-africa"],"dz","213"],["Andorra",["europe"],"ad","376"],["Angola",["africa"],"ao","244"],["Antigua and Barbuda",["america","carribean"],"ag","1268"],["Argentina",["america","south-america"],"ar","54","(..) ........",0,["11","221","223","261","264","2652","280","2905","291","2920","2966","299","341","342","343","351","376","379","381","3833","385","387","388"]],["Armenia",["asia","ex-ussr"],"am","374",".. ......"],["Aruba",["america","carribean"],"aw","297"],["Australia",["oceania"],"au","61","(..) .... ....",0,["2","3","4","7","8","02","03","04","07","08"]],["Austria",["europe","eu-union"],"at","43"],["Azerbaijan",["asia","ex-ussr"],"az","994","(..) ... .. .."],["Bahamas",["america","carribean"],"bs","1242"],["Bahrain",["middle-east"],"bh","973"],["Bangladesh",["asia"],"bd","880"],["Barbados",["america","carribean"],"bb","1246"],["Belarus",["europe","ex-ussr"],"by","375","(..) ... .. .."],["Belgium",["europe","eu-union"],"be","32","... .. .. .."],["Belize",["america","central-america"],"bz","501"],["Benin",["africa"],"bj","229"],["Bhutan",["asia"],"bt","975"],["Bolivia",["america","south-america"],"bo","591"],["Bosnia and Herzegovina",["europe","ex-yugos"],"ba","387"],["Botswana",["africa"],"bw","267"],["Brazil",["america","south-america"],"br","55","(..) ........."],["British Indian Ocean Territory",["asia"],"io","246"],["Brunei",["asia"],"bn","673"],["Bulgaria",["europe","eu-union"],"bg","359"],["Burkina Faso",["africa"],"bf","226"],["Burundi",["africa"],"bi","257"],["Cambodia",["asia"],"kh","855"],["Cameroon",["africa"],"cm","237"],["Canada",["america","north-america"],"ca","1","(...) ...-....",1,["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde",["africa"],"cv","238"],["Caribbean Netherlands",["america","carribean"],"bq","599","",1],["Central African Republic",["africa"],"cf","236"],["Chad",["africa"],"td","235"],["Chile",["america","south-america"],"cl","56"],["China",["asia"],"cn","86","..-........."],["Colombia",["america","south-america"],"co","57","... ... ...."],["Comoros",["africa"],"km","269"],["Congo",["africa"],"cd","243"],["Congo",["africa"],"cg","242"],["Costa Rica",["america","central-america"],"cr","506","....-...."],["Côte d'Ivoire",["africa"],"ci","225",".. .. .. .."],["Croatia",["europe","eu-union","ex-yugos"],"hr","385"],["Cuba",["america","carribean"],"cu","53"],["Curaçao",["america","carribean"],"cw","599","",0],["Cyprus",["europe","eu-union"],"cy","357",".. ......"],["Czech Republic",["europe","eu-union"],"cz","420","... ... ..."],["Denmark",["europe","eu-union","baltic"],"dk","45",".. .. .. .."],["Djibouti",["africa"],"dj","253"],["Dominica",["america","carribean"],"dm","1767"],["Dominican Republic",["america","carribean"],"do","1","",2],["Ecuador",["america","south-america"],"ec","593"],["Egypt",["africa","north-africa"],"eg","20"],["El Salvador",["america","central-america"],"sv","503","....-...."],["Equatorial Guinea",["africa"],"gq","240"],["Eritrea",["africa"],"er","291"],["Estonia",["europe","eu-union","ex-ussr","baltic"],"ee","372",".... ......"],["Ethiopia",["africa"],"et","251"],["Fiji",["oceania"],"fj","679"],["Finland",["europe","eu-union","baltic"],"fi","358",".. ... .. .."],["France",["europe","eu-union"],"fr","33",". .. .. .. .."],["French Guiana",["america","south-america"],"gf","594"],["French Polynesia",["oceania"],"pf","689"],["Gabon",["africa"],"ga","241"],["Gambia",["africa"],"gm","220"],["Georgia",["asia","ex-ussr"],"ge","995"],["Germany",["europe","eu-union","baltic"],"de","49",".... ........"],["Ghana",["africa"],"gh","233"],["Greece",["europe","eu-union"],"gr","30"],["Grenada",["america","carribean"],"gd","1473"],["Guadeloupe",["america","carribean"],"gp","590","",0],["Guam",["oceania"],"gu","1671"],["Guatemala",["america","central-america"],"gt","502","....-...."],["Guinea",["africa"],"gn","224"],["Guinea-Bissau",["africa"],"gw","245"],["Guyana",["america","south-america"],"gy","592"],["Haiti",["america","carribean"],"ht","509","....-...."],["Honduras",["america","central-america"],"hn","504"],["Hong Kong",["asia"],"hk","852",".... ...."],["Hungary",["europe","eu-union"],"hu","36"],["Iceland",["europe"],"is","354","... ...."],["India",["asia"],"in","91",".....-....."],["Indonesia",["asia"],"id","62"],["Iran",["middle-east"],"ir","98","... ... ...."],["Iraq",["middle-east"],"iq","964"],["Ireland",["europe","eu-union"],"ie","353",".. ......."],["Israel",["middle-east"],"il","972","... ... ...."],["Italy",["europe","eu-union"],"it","39","... .......",0],["Jamaica",["america","carribean"],"jm","1876"],["Japan",["asia"],"jp","81",".. .... ...."],["Jordan",["middle-east"],"jo","962"],["Kazakhstan",["asia","ex-ussr"],"kz","7","... ...-..-..",1,["310","311","312","313","315","318","321","324","325","326","327","336","7172","73622"]],["Kenya",["africa"],"ke","254"],["Kiribati",["oceania"],"ki","686"],["Kosovo",["europe","ex-yugos"],"xk","383"],["Kuwait",["middle-east"],"kw","965"],["Kyrgyzstan",["asia","ex-ussr"],"kg","996","... ... ..."],["Laos",["asia"],"la","856"],["Latvia",["europe","eu-union","ex-ussr","baltic"],"lv","371",".. ... ..."],["Lebanon",["middle-east"],"lb","961"],["Lesotho",["africa"],"ls","266"],["Liberia",["africa"],"lr","231"],["Libya",["africa","north-africa"],"ly","218"],["Liechtenstein",["europe"],"li","423"],["Lithuania",["europe","eu-union","ex-ussr","baltic"],"lt","370"],["Luxembourg",["europe","eu-union"],"lu","352"],["Macau",["asia"],"mo","853"],["Macedonia",["europe","ex-yugos"],"mk","389"],["Madagascar",["africa"],"mg","261"],["Malawi",["africa"],"mw","265"],["Malaysia",["asia"],"my","60","..-....-...."],["Maldives",["asia"],"mv","960"],["Mali",["africa"],"ml","223"],["Malta",["europe","eu-union"],"mt","356"],["Marshall Islands",["oceania"],"mh","692"],["Martinique",["america","carribean"],"mq","596"],["Mauritania",["africa"],"mr","222"],["Mauritius",["africa"],"mu","230"],["Mexico",["america","central-america"],"mx","52","... ... ....",0,["33","55","81","229","656","664","774","998"]],["Micronesia",["oceania"],"fm","691"],["Moldova",["europe"],"md","373","(..) ..-..-.."],["Monaco",["europe"],"mc","377"],["Mongolia",["asia"],"mn","976"],["Montenegro",["europe","ex-yugos"],"me","382"],["Morocco",["africa","north-africa"],"ma","212"],["Mozambique",["africa"],"mz","258"],["Myanmar",["asia"],"mm","95"],["Namibia",["africa"],"na","264"],["Nauru",["africa"],"nr","674"],["Nepal",["asia"],"np","977"],["Netherlands",["europe","eu-union"],"nl","31",".. ........"],["New Caledonia",["oceania"],"nc","687"],["New Zealand",["oceania"],"nz","64","...-...-...."],["Nicaragua",["america","central-america"],"ni","505"],["Niger",["africa"],"ne","227"],["Nigeria",["africa"],"ng","234"],["North Korea",["asia"],"kp","850"],["Norway",["europe","baltic"],"no","47","... .. ..."],["Oman",["middle-east"],"om","968"],["Pakistan",["asia"],"pk","92","...-......."],["Palau",["oceania"],"pw","680"],["Palestine",["middle-east"],"ps","970"],["Panama",["america","central-america"],"pa","507"],["Papua New Guinea",["oceania"],"pg","675"],["Paraguay",["america","south-america"],"py","595"],["Peru",["america","south-america"],"pe","51"],["Philippines",["asia"],"ph","63",".... ......."],["Poland",["europe","eu-union","baltic"],"pl","48","...-...-..."],["Portugal",["europe","eu-union"],"pt","351"],["Puerto Rico",["america","carribean"],"pr","1","",3],["Qatar",["middle-east"],"qa","974"],["Réunion",["africa"],"re","262"],["Romania",["europe","eu-union"],"ro","40"],["Russia",["europe","asia","ex-ussr","baltic"],"ru","7","(...) ...-..-..",0],["Rwanda",["africa"],"rw","250"],["Saint Kitts and Nevis",["america","carribean"],"kn","1869"],["Saint Lucia",["america","carribean"],"lc","1758"],["Saint Vincent and the Grenadines",["america","carribean"],"vc","1784"],["Samoa",["oceania"],"ws","685"],["San Marino",["europe"],"sm","378"],["São Tomé and Príncipe",["africa"],"st","239"],["Saudi Arabia",["middle-east"],"sa","966"],["Senegal",["africa"],"sn","221"],["Serbia",["europe","ex-yugos"],"rs","381"],["Seychelles",["africa"],"sc","248"],["Sierra Leone",["africa"],"sl","232"],["Singapore",["asia"],"sg","65","....-...."],["Slovakia",["europe","eu-union"],"sk","421"],["Slovenia",["europe","eu-union","ex-yugos"],"si","386"],["Solomon Islands",["oceania"],"sb","677"],["Somalia",["africa"],"so","252"],["South Africa",["africa"],"za","27"],["South Korea",["asia"],"kr","82","... .... ...."],["South Sudan",["africa","north-africa"],"ss","211"],["Spain",["europe","eu-union"],"es","34","... ... ..."],["Sri Lanka",["asia"],"lk","94"],["Sudan",["africa"],"sd","249"],["Suriname",["america","south-america"],"sr","597"],["Swaziland",["africa"],"sz","268"],["Sweden",["europe","eu-union","baltic"],"se","46","(...) ...-..."],["Switzerland",["europe"],"ch","41",".. ... .. .."],["Syria",["middle-east"],"sy","963"],["Taiwan",["asia"],"tw","886"],["Tajikistan",["asia","ex-ussr"],"tj","992"],["Tanzania",["africa"],"tz","255"],["Thailand",["asia"],"th","66"],["Timor-Leste",["asia"],"tl","670"],["Togo",["africa"],"tg","228"],["Tonga",["oceania"],"to","676"],["Trinidad and Tobago",["america","carribean"],"tt","1868"],["Tunisia",["africa","north-africa"],"tn","216"],["Turkey",["europe"],"tr","90","... ... .. .."],["Turkmenistan",["asia","ex-ussr"],"tm","993"],["Tuvalu",["asia"],"tv","688"],["Uganda",["africa"],"ug","256"],["Ukraine",["europe","ex-ussr"],"ua","380","(..) ... .. .."],["United Arab Emirates",["middle-east"],"ae","971"],["United Kingdom",["europe","eu-union"],"gb","44",".... ......"],["United States",["america","north-america"],"us","1","(...) ...-....",0,["201","202","203","205","206","207","208","209","210","212","213","214","215","216","217","218","219","225","228","229","231","239","248","251","252","253","254","256","260","262","269","270","276","281","301","302","303","304","305","307","308","309","310","312","313","314","315","316","317","318","319","320","321","323","325","330","334","336","337","352","360","361","386","401","402","404","405","406","407","408","409","410","412","413","414","415","417","419","423","425","432","434","435","440","478","479","480","501","502","503","504","505","507","508","509","510","512","513","515","516","517","518","520","530","540","541","559","561","562","563","570","573","574","575","580","585","586","601","602","603","605","606","607","608","609","610","612","614","615","616","617","618","619","620","623","626","630","631","636","641","650","651","660","661","662","701","702","703","704","706","707","708","712","713","714","715","716","717","718","719","724","727","731","732","734","740","757","760","763","765","770","772","773","775","781","785","801","802","803","804","805","806","808","810","812","813","814","815","816","817","818","828","830","831","843","845","847","850","856","858","859","860","863","864","865","870","901","903","904","906","907","908","909","910","912","913","914","915","916","918","919","920","925","928","931","936","937","940","941","949","951","952","954","956","970","972","973","978","979","985","989"]],["Uruguay",["america","south-america"],"uy","598"],["Uzbekistan",["asia","ex-ussr"],"uz","998",".. ... .. .."],["Vanuatu",["oceania"],"vu","678"],["Vatican City",["europe"],"va","39",".. .... ....",1],["Venezuela",["america","south-america"],"ve","58"],["Vietnam",["asia"],"vn","84"],["Yemen",["middle-east"],"ye","967"],["Zambia",["africa"],"zm","260"],["Zimbabwe",["africa"],"zw","263"]]},586:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)},n=this&&this.__spreadArray||function(e,a,r){if(r||2===arguments.length)for(var t,n=0,i=a.length;n<i;n++)!t&&n in a||(t||(t=Array.prototype.slice.call(a,0,n)),t[n]=a[n]);return e.concat(t||Array.prototype.slice.call(a))};Object.defineProperty(a,"__esModule",{value:!0}),a.useHistoryState=void 0;var i=r(156),o={size:20};a.useHistoryState=function(e,a){var r=t(t({},o),a).size,u=(0,i.useState)(e),l=u[0],s=u[1],c=(0,i.useState)([e]),d=c[0],f=c[1],p=(0,i.useState)(0),h=p[0],m=p[1],y=(0,i.useCallback)((function(e,a){if(e!==l){if(null==a?void 0:a.overrideLastHistoryItem)f((function(a){return n(n([],a.slice(0,h),!0),[e],!1)}));else{var t=d.length>=r;f((function(a){return n(n([],a.slice(t?1:0,h+1),!0),[e],!1)})),t||m((function(e){return e+1}))}s(e)}}),[l,h,d.length,r]),v=(0,i.useCallback)((function(){return!(h<=0||(s(d[h-1]),m((function(e){return e-1})),0))}),[d,h]),b=(0,i.useCallback)((function(){return!(h+1>=d.length||(s(d[h+1]),m((function(e){return e+1})),0))}),[d,h]);return[l,y,v,b]}},71:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.useOnClickOutside=void 0;var t=r(156);a.useOnClickOutside=function(e){var a=e.ref,r=e.onClickOutside;(0,t.useEffect)((function(){if(void 0!==typeof document){var e=function(e){a.current&&!a.current.contains(e.target)&&r(e)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}}}),[a,r])}},72:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)};Object.defineProperty(a,"__esModule",{value:!0}),a.usePhone=a.defaultPhoneConfig=a.MASK_CHAR=void 0;var n=r(156),i=r(79),o=r(626),u=r(586),l=r(15);a.MASK_CHAR=".",a.defaultPhoneConfig={prefix:"+",defaultMask:"............",charAfterDialCode:" ",historySaveDebounceMS:200,disableCountryGuess:!1,disableDialCodePrefill:!1,forceDialCode:!1,disableDialCodeAndPrefix:!1,countries:i.defaultCountries},a.usePhone=function(e,r){var i=t(t({},a.defaultPhoneConfig),r),s=i.country,c=i.countries,d=i.prefix,f=i.defaultMask,p=i.charAfterDialCode,h=i.historySaveDebounceMS,m=i.disableCountryGuess,y=i.disableDialCodePrefill,v=i.forceDialCode,b=i.disableDialCodeAndPrefix,C=i.onCountryGuess,g=i.onPhoneUpdate,P=!b&&!m,O=(0,l.useTimer)(),_=(0,n.useMemo)((function(){if(s)return(0,o.getCountry)({value:s,field:"iso2",countries:c})}),[s,c]),w=(0,u.useHistoryState)(""),j=w[0],D=w[1],x=w[2],S=w[3],M=(0,n.useState)(!1),N=M[0],k=M[1],A=function(e,r){var t,n=void 0===r?{}:r,i=n.deletion,u=n.cursorPosition,l=function(e,r){var t,n,i=r.trimNonDigitsEnd,u=r.insertDialCodeOnEmpty,l=r.forceDisableCountryGuess,s=!l&&P?(0,o.guessCountryByPartialNumber)({phone:e,countries:c}):void 0,h=!l&&P&&null!==(t=null==s?void 0:s.country)&&void 0!==t?t:_;return{phone:h?(0,o.formatPhone)(e,{prefix:d,mask:null!==(n=h.format)&&void 0!==n?n:f,maskChar:a.MASK_CHAR,dialCode:h.dialCode,trimNonDigitsEnd:i,charAfterDialCode:p,forceDialCode:v,insertDialCodeOnEmpty:u,disableDialCodeAndPrefix:b}):e,countryGuessResult:s,formatCountry:h}}(e,{trimNonDigitsEnd:"backward"===i,insertDialCodeOnEmpty:n.insertDialCodeOnEmpty||!N&&!y,forceDisableCountryGuess:v&&!!i&&(0,o.removeNonDigits)(e).length<(null!==(t=null==_?void 0:_.dialCode.length)&&void 0!==t?t:0)}),m=l.phone,w=l.countryGuessResult,j=l.formatCountry,x=O.check();return D(m,{overrideLastHistoryItem:!(!x||x>h)}),null==g||g(m,{formatCountry:j,unformattedValue:e,cursorPosition:null!=u?u:0,deletion:i}),P&&(null==w?void 0:w.country)&&w.country.name!==s&&(null==C||C(w)),N||k(!0),m};return(0,n.useEffect)((function(){N&&e===j||A(e)}),[e]),{phone:j,initialized:N,undo:x,redo:S,handleValueChange:A}}},343:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)},n=this&&this.__rest||function(e,a){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)a.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(r[t[n]]=e[t[n]])}return r};Object.defineProperty(a,"__esModule",{value:!0}),a.usePhoneInput=void 0;var i=r(156),o=r(79),u=r(626),l=r(72);a.usePhoneInput=function(e){var a,r=e.initialCountry,s=e.value,c=void 0===s?"":s,d=e.prefix,f=void 0===d?"+":d,p=e.countries,h=void 0===p?o.defaultCountries:p,m=e.disableDialCodeAndPrefix,y=e.hideSpaceAfterDialCode,v=e.onCountryChange,b=n(e,["initialCountry","value","prefix","countries","disableDialCodeAndPrefix","hideSpaceAfterDialCode","onCountryChange"]),C=(0,i.useRef)(null),g=(0,i.useState)(r),P=g[0],O=g[1],_=(0,i.useMemo)((function(){if(P)return(0,u.getCountry)({value:P,field:"iso2",countries:h})}),[h,P]),w=y?"":" ",j=null!==(a=null==_?void 0:_.dialCode)&&void 0!==a?a:"",D=m?(0,u.removeDialCode)({phone:c,dialCode:j,charAfterDialCode:w,prefix:f}):c,x=(0,l.usePhone)(D,t({country:P,countries:h,prefix:f,disableDialCodeAndPrefix:m,charAfterDialCode:w,onCountryGuess:function(e){var a=e.country;e.fullDialCodeMatch&&O(a.iso2)},onPhoneUpdate:function(e,a){var r,t,n=a.formatCountry,i=a.unformattedValue,o=a.cursorPosition,l=a.deletion,s=(0,u.getCursorPosition)({cursorPositionAfterInput:o,phoneBeforeInput:S,phoneAfterInput:i,phoneAfterFormatted:e,leftOffset:b.forceDialCode?f.length+(null!==(t=null===(r=null==n?void 0:n.dialCode)||void 0===r?void 0:r.length)&&void 0!==t?t:0)+w.length:0,deletion:l});Promise.resolve().then((function(){var e;null===(e=C.current)||void 0===e||e.setSelectionRange(s,s)}))}},b)),S=x.phone,M=x.initialized,N=x.undo,k=x.redo,A=x.handleValueChange;return(0,i.useEffect)((function(){var e=null==C?void 0:C.current;if(e){var a=function(e){var a=e.ctrlKey,r=e.shiftKey,t="z"===e.key.toLowerCase();if(a&&t)return r?k():N()};return null==e||e.addEventListener("keydown",a),function(){null==e||e.removeEventListener("keydown",a)}}}),[C,N,k]),(0,i.useEffect)((function(){var e;if(_&&M&&!(0,u.removeNonDigits)(S).startsWith(_.dialCode)){var a=A("",{insertDialCodeOnEmpty:!0});null===(e=C.current)||void 0===e||e.focus(),null==v||v(a)}}),[P]),{phone:S,handlePhoneValueChange:function(e){var a;e.preventDefault();var r=e.nativeEvent.inputType,t=A(e.target.value,{deletion:function(){var e;if(null!==(e=null==r?void 0:r.toLocaleLowerCase().includes("delete"))&&void 0!==e&&e)return(null==r?void 0:r.toLocaleLowerCase().includes("forward"))?"forward":"backward"}(),cursorPosition:null!==(a=e.target.selectionStart)&&void 0!==a?a:0});return m?(0,u.addDialCode)({phone:t,dialCode:j,charAfterDialCode:w,prefix:f}):t},inputRef:C,country:P,setCountry:O}}},707:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.usePhoneValidation=void 0;var t=r(626);a.usePhoneValidation=function(e,a){return(0,t.validatePhone)(e,a)}},15:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.useTimer=void 0;var t=r(156);a.useTimer=function(){var e=(0,t.useState)(),a=e[0],r=e[1],n=(0,t.useState)(Date.now()),i=n[0],o=n[1];return{check:function(){var e=Date.now(),t=a?e-i:void 0;return r(i),o(e),t}}}},926:function(e,a){var r=this&&this.__spreadArray||function(e,a,r){if(r||2===arguments.length)for(var t,n=0,i=a.length;n<i;n++)!t&&n in a||(t||(t=Array.prototype.slice.call(a,0,n)),t[n]=a[n]);return e.concat(t||Array.prototype.slice.call(a))};Object.defineProperty(a,"__esModule",{value:!0}),a.buildClassNames=a.classNamesWithPrefix=a.joinClasses=a.classPrefix=void 0,a.classPrefix="react-international-phone-",a.joinClasses=function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];return e.filter((function(e){return!!e})).join(" ").trim()},a.classNamesWithPrefix=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return a.joinClasses.apply(void 0,e).split(" ").map((function(e){return"".concat(a.classPrefix).concat(e)})).join(" ")},a.buildClassNames=function(e){var t=e.addPrefix,n=e.rawClassNames;return a.joinClasses.apply(void 0,r([a.classNamesWithPrefix.apply(void 0,t)],n,!1))}},868:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.applyMask=void 0,a.applyMask=function(e){var a=e.value,r=e.mask,t=e.maskSymbol,n=e.offset,i=void 0===n?0:n,o=e.trimNonMaskCharsLeftover,u=void 0!==o&&o;if(a.length<i)return a;for(var l=a.slice(0,i),s=a.slice(i),c=l,d=0,f=0,p=r.split("");f<p.length;f++){var h=p[f];if(d>=s.length){if(!u&&h!==t){c+=h;continue}break}h===t?(c+=s[d],d+=1):c+=h}return c}},597:function(e,a,r){var t=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),n=this&&this.__exportStar||function(e,a){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(a,r)||t(a,e,r)};Object.defineProperty(a,"__esModule",{value:!0}),n(r(868),a),n(r(75),a)},75:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.removeNonDigits=void 0,a.removeNonDigits=function(e){return e.replace(/\D/g,"")}},279:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.buildCountryData=void 0,a.buildCountryData=function(e){return[e.name,e.regions,e.iso2,e.dialCode,e.format,e.priority,e.areaCodes].filter(Boolean)}},548:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getCountry=void 0;var t=r(929);a.getCountry=function(e){var a=e.value,r=e.field,n=e.countries;if(["regions","priority"].includes(r))throw new Error(function(e){return'Field "'.concat(e,'" is not supported')}(r));var i=n.find((function(e){var n=(0,t.parseCountry)(e);return a===n[r]}));if(i)return(0,t.parseCountry)(i)}},741:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.guessCountryByPartialNumber=void 0;var t=r(597),n=r(929);a.guessCountryByPartialNumber=function(e){var a=e.phone,r=e.countries,i={country:void 0,fullDialCodeMatch:!1,areaCodeMatch:void 0};if(!a)return i;var o=(0,t.removeNonDigits)(a);if(!o)return i;for(var u=i,l=function(e){var a,r,t,n,i=e.country,o=e.fullDialCodeMatch,l=e.areaCodeMatch,s=i.dialCode===(null===(a=u.country)||void 0===a?void 0:a.dialCode),c=(null!==(r=i.priority)&&void 0!==r?r:0)<(null!==(n=null===(t=u.country)||void 0===t?void 0:t.priority)&&void 0!==n?n:0);s&&!c||(u={country:i,fullDialCodeMatch:o,areaCodeMatch:l})},s=0,c=r;s<c.length;s++){var d=c[s],f=(0,n.parseCountry)(d),p=f.dialCode,h=f.areaCodes;if(o.startsWith(p)){var m=!u.country||Number(p)>=Number(u.country.dialCode);if(h)for(var y=o.substring(p.length),v=0,b=h;v<b.length;v++){var C=b[v];if(y.startsWith(C))return{country:f,fullDialCodeMatch:!0,areaCodeMatch:!0}}!m&&p!==o&&u.fullDialCodeMatch||l({country:f,fullDialCodeMatch:!0,areaCodeMatch:h?!h:void 0})}u.fullDialCodeMatch||o.length<p.length&&p.startsWith(o)&&(!u.country||Number(p)<=Number(u.country.dialCode))&&l({country:f,fullDialCodeMatch:!1})}return u}},981:function(e,a,r){var t=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),n=this&&this.__exportStar||function(e,a){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(a,r)||t(a,e,r)};Object.defineProperty(a,"__esModule",{value:!0}),n(r(279),a),n(r(548),a),n(r(741),a),n(r(929),a)},929:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.parseCountry=void 0,a.parseCountry=function(e){return{name:e[0],regions:e[1],iso2:e[2],dialCode:e[3],format:e[4],priority:e[5],areaCodes:e[6]}}},626:function(e,a,r){var t=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),n=this&&this.__exportStar||function(e,a){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(a,r)||t(a,e,r)};Object.defineProperty(a,"__esModule",{value:!0}),n(r(597),a),n(r(981),a),n(r(394),a)},540:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDialCode=void 0;var t=r(475);a.addDialCode=function(e){var a=e.phone,r=e.dialCode,n=e.prefix,i=void 0===n?"+":n,o=e.charAfterDialCode,u=void 0===o?" ":o;return"".concat(i).concat(r).concat(u).concat((0,t.removeDialCode)({phone:a,dialCode:r,charAfterDialCode:u,prefix:i}))}},798:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.formatPhone=void 0;var t=r(597);a.formatPhone=function(e,a){var r=!a.disableDialCodeAndPrefix&&a.forceDialCode,n=!a.disableDialCodeAndPrefix&&a.insertDialCodeOnEmpty,i=e,o=function(e){return a.trimNonDigitsEnd?e.trim():e};if(!i)return n&&!i.length||r?o("".concat(a.prefix).concat(a.dialCode).concat(a.charAfterDialCode)):o(i);if((i=(0,t.removeNonDigits)(i))===a.dialCode&&!a.disableDialCodeAndPrefix)return o("".concat(a.prefix).concat(a.dialCode).concat(a.charAfterDialCode));if(a.dialCode.startsWith(i)&&!a.disableDialCodeAndPrefix)return o(r?"".concat(a.prefix).concat(a.dialCode).concat(a.charAfterDialCode):"".concat(a.prefix).concat(i));if(!i.startsWith(a.dialCode)&&!a.disableDialCodeAndPrefix){if(r)return o("".concat(a.prefix).concat(a.dialCode).concat(a.charAfterDialCode));if(i.length<a.dialCode.length)return o("".concat(a.prefix).concat(i))}var u,l=(u=a.dialCode.length,a.disableDialCodeAndPrefix&&(u=0),{phoneLeftSide:i.slice(0,u),phoneRightSide:i.slice(u)}),s=l.phoneLeftSide,c=l.phoneRightSide;return s="".concat(a.prefix).concat(s).concat(a.charAfterDialCode),c=(0,t.applyMask)({value:c,mask:a.mask,maskSymbol:a.maskChar,trimNonMaskCharsLeftover:a.trimNonDigitsEnd}),a.disableDialCodeAndPrefix&&(s=""),o("".concat(s).concat(c))}},378:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getCursorPosition=void 0;var r=function(e){return/\d/.test(e)};a.getCursorPosition=function(e){var a=e.phoneBeforeInput,t=e.phoneAfterInput,n=e.phoneAfterFormatted,i=e.cursorPositionAfterInput,o=e.leftOffset,u=void 0===o?0:o,l=e.deletion;if(i<u)return u;if(!a)return n.length;var s="backward"===l;if(0===i&&t.length>0&&n.length>0){if(s)return 0;for(var c=0;c<n.length;c+=1)if(r(n[c]))return c;return n.length}if(t.length<a.length&&1===t.length)return n.length;var d=null;for(c=i-1;c>=0;c-=1)if(r(t[c])){d=c;break}if(null===d)return 0!==i?i:n.length;var f=0;for(c=0;c<d;c+=1)r(t[c])&&(f+=1);s&&(f-=1);var p=0,h=0;for(c=0;c<n.length&&(p+=1,r(n[c])&&(h+=1),h!==f+1);c+=1);for(;!r(n[p])&&p<n.length;)p+=1;return s&&(p+=1),p}},394:function(e,a,r){var t=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),n=this&&this.__exportStar||function(e,a){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(a,r)||t(a,e,r)};Object.defineProperty(a,"__esModule",{value:!0}),n(r(540),a),n(r(798),a),n(r(378),a),n(r(475),a),n(r(439),a)},475:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.removeDialCode=void 0,a.removeDialCode=function(e){var a=e.phone,r=e.dialCode,t=e.prefix,n=void 0===t?"+":t,i=e.charAfterDialCode,o=void 0===i?" ":i;if(!a||!r)return a;var u=a;return u.startsWith(n)&&(u=u.replace(n,"")),u.startsWith(r)?((u=u.replace(r,"")).startsWith(o)&&(u=u.replace(o,"")),u):a}},439:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)};Object.defineProperty(a,"__esModule",{value:!0}),a.validatePhone=void 0;var n=r(72),i=r(597),o=r(981);a.validatePhone=function(e,a){var r=t(t({},n.defaultPhoneConfig),a),u=r.countries,l=r.defaultMask,s=r.defaultMaskMinPhoneLength,c=void 0===s?10:s,d=r.prefix,f=r.charAfterDialCode,p=(0,o.guessCountryByPartialNumber)({phone:e,countries:u}),h=p.country,m=p.fullDialCodeMatch,y=p.areaCodeMatch;if(!h||!m)return{country:void 0,lengthMatch:!1,areaCodeMatch:y,isValid:!1};var v="".concat(d).concat(h.dialCode).concat(f);if(!e.startsWith(v))return{country:h,lengthMatch:!1,areaCodeMatch:y,isValid:!1};var b=e.substring(v.length),C=!h.format,g=C?l:h.format;if(C&&(0,i.removeNonDigits)(e).length<c)return{country:h,lengthMatch:!1,areaCodeMatch:y,isValid:!1};if(!C&&b.length!==g.length)return{country:h,lengthMatch:!1,areaCodeMatch:y,isValid:!1};for(var P=0;P<b.length;P+=1)if(b[P]!==g[P]&&g[P]!==n.MASK_CHAR)return{country:h,lengthMatch:!1,areaCodeMatch:y,isValid:!1};return{country:h,lengthMatch:!0,areaCodeMatch:y,isValid:null==y||y}}},156:a=>{a.exports=e}},r={};function t(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={exports:{}};return a[e].call(i.exports,i,i.exports,t),i.exports}t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.validatePhone=e.parseCountry=e.buildCountryData=e.usePhoneValidation=e.usePhoneInput=e.usePhone=e.defaultCountries=e.PhoneInput=e.FlagEmoji=e.DialCodePreview=e.CountrySelectorDropdown=e.CountrySelector=void 0;var a=t(661);Object.defineProperty(e,"CountrySelector",{enumerable:!0,get:function(){return a.CountrySelector}});var r=t(918);Object.defineProperty(e,"CountrySelectorDropdown",{enumerable:!0,get:function(){return r.CountrySelectorDropdown}});var i=t(66);Object.defineProperty(e,"DialCodePreview",{enumerable:!0,get:function(){return i.DialCodePreview}});var o=t(472);Object.defineProperty(e,"FlagEmoji",{enumerable:!0,get:function(){return o.FlagEmoji}});var u=t(351);Object.defineProperty(e,"PhoneInput",{enumerable:!0,get:function(){return u.PhoneInput}});var l=t(79);Object.defineProperty(e,"defaultCountries",{enumerable:!0,get:function(){return l.defaultCountries}});var s=t(72);Object.defineProperty(e,"usePhone",{enumerable:!0,get:function(){return s.usePhone}});var c=t(343);Object.defineProperty(e,"usePhoneInput",{enumerable:!0,get:function(){return c.usePhoneInput}});var d=t(707);Object.defineProperty(e,"usePhoneValidation",{enumerable:!0,get:function(){return d.usePhoneValidation}});var f=t(626);Object.defineProperty(e,"buildCountryData",{enumerable:!0,get:function(){return f.buildCountryData}}),Object.defineProperty(e,"parseCountry",{enumerable:!0,get:function(){return f.parseCountry}}),Object.defineProperty(e,"validatePhone",{enumerable:!0,get:function(){return f.validatePhone}})})(),n})())); | ||
!function(e,a){"object"==typeof exports&&"object"==typeof module?module.exports=a(require("react")):"function"==typeof define&&define.amd?define(["react"],a):"object"==typeof exports?exports["react-international-phone"]=a(require("react")):e["react-international-phone"]=a(e.react)}(this,(e=>(()=>{"use strict";var a={634:(e,a,r)=>{r.r(a)},435:(e,a,r)=>{r.r(a)},185:(e,a,r)=>{r.r(a)},986:(e,a,r)=>{r.r(a)},235:(e,a,r)=>{r.r(a)},661:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)},n=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:!0,value:a})}:function(e,a){e.default=a}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(a,e,r);return i(a,e),a},u=this&&this.__rest||function(e,a){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)a.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(r[t[n]]=e[t[n]])}return r};Object.defineProperty(a,"__esModule",{value:!0}),a.CountrySelector=void 0,r(634);var l=o(r(156)),s=r(79),c=r(71),d=r(926),f=r(626),p=r(472),h=r(918);a.CountrySelector=function(e){var a,r,n=e.selectedCountry,i=e.onSelect,o=e.disabled,m=e.hideDropdown,y=e.countries,v=void 0===y?s.defaultCountries:y,b=e.renderButtonWrapper,C=u(e,["selectedCountry","onSelect","disabled","hideDropdown","countries","renderButtonWrapper"]),g=(0,l.useState)(!1),P=g[0],_=g[1],O=(0,l.useMemo)((function(){if(n)return(0,f.getCountry)({value:n,field:"iso2",countries:v})}),[v,n]),j=(0,l.useRef)(null);return(0,c.useOnClickOutside)({ref:j,onClickOutside:function(){return _(!1)}}),l.default.createElement("div",{className:(0,d.buildClassNames)({addPrefix:["country-selector"],rawClassNames:[C.className]}),style:C.style,ref:j},(a=function(){return _((function(e){return!e}))},r=l.default.createElement("div",{className:(0,d.buildClassNames)({addPrefix:["country-selector-button__button-content"],rawClassNames:[C.buttonContentWrapperClassName]}),style:C.buttonContentWrapperStyle},l.default.createElement(p.FlagEmoji,{iso2:n,className:(0,d.buildClassNames)({addPrefix:["country-selector-button__flag-emoji",o&&"country-selector-button__flag-emoji--disabled"],rawClassNames:[C.flagClassName]}),style:t({visibility:n?"visible":"hidden"},C.flagStyle)}),!m&&l.default.createElement("div",{className:(0,d.buildClassNames)({addPrefix:["country-selector-button__dropdown-arrow",o&&"country-selector-button__dropdown-arrow--disabled",P&&"country-selector-button__dropdown-arrow--active"],rawClassNames:[C.dropdownArrowClassName]}),style:C.dropdownArrowStyle})),b?b({children:r,onClick:a}):l.default.createElement("button",{title:null==O?void 0:O.name,onClick:a,className:(0,d.buildClassNames)({addPrefix:["country-selector-button",P&&"country-selector-button--active",o&&"country-selector-button--disabled",m&&"country-selector-button--hide-dropdown"],rawClassNames:[C.buttonClassName]}),disabled:m||o,"aria-haspopup":"listbox","aria-expanded":m,"data-country":n,style:C.buttonStyle},r)),l.default.createElement(h.CountrySelectorDropdown,t({show:P,countries:v,onSelect:function(e){_(!1),null==i||i(e)},selectedCountry:n,onEscapePress:function(){_(!1)}},C.dropdownStyleProps)))}},918:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)},n=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:!0,value:a})}:function(e,a){e.default=a}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(a,e,r);return i(a,e),a},u=this&&this.__rest||function(e,a){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)a.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(r[t[n]]=e[t[n]])}return r};Object.defineProperty(a,"__esModule",{value:!0}),a.CountrySelectorDropdown=void 0,r(435);var l=o(r(156)),s=r(79),c=r(926),d=r(626),f=r(472);a.CountrySelectorDropdown=function(e){var a=e.show,r=e.dialCodePrefix,n=void 0===r?"+":r,i=e.selectedCountry,o=e.countries,p=void 0===o?s.defaultCountries:o,h=e.onSelect,m=e.onEscapePress,y=u(e,["show","dialCodePrefix","selectedCountry","countries","onSelect","onEscapePress"]),v=(0,l.useRef)(null),b=(0,l.useRef)(),C=(0,l.useCallback)((function(e){b.current=e.iso2,null==h||h(e)}),[h]),g=(0,l.useCallback)((function(e,a){"Enter"===e.key&&C(a),"Escape"===e.key&&(null==m||m())}),[C,m]);return(0,l.useEffect)((function(){if(v.current&&i&&i!==b.current){var e=v.current.querySelector('[data-country="'.concat(i,'"]'));e&&((0,d.scrollToChild)(v.current,e),b.current=i)}}),[i]),l.default.createElement("ul",{ref:v,role:"listbox",className:(0,c.buildClassNames)({addPrefix:["country-selector-dropdown"],rawClassNames:[y.className]}),style:t({display:a?"block":"none"},y.style)},p.map((function(e){var a=(0,d.parseCountry)(e),r=a.iso2===i;return l.default.createElement("li",{key:a.iso2,"data-country":a.iso2,tabIndex:0,role:"option",className:(0,c.buildClassNames)({addPrefix:["country-selector-dropdown__list-item",r&&"country-selector-dropdown__list-item--selected"],rawClassNames:[y.listItemClassName]}),onClick:function(){return C(a)},onKeyDown:function(e){g(e,a)},style:y.listItemStyle},l.default.createElement(f.FlagEmoji,{iso2:a.iso2,className:(0,c.buildClassNames)({addPrefix:["country-selector-dropdown__list-item-flag-emoji"],rawClassNames:[y.listItemFlagClassName]}),style:y.listItemFlagStyle}),l.default.createElement("span",{className:(0,c.buildClassNames)({addPrefix:["country-selector-dropdown__list-item-country-name"],rawClassNames:[y.listItemCountryNameClassName]}),style:y.listItemCountryNameStyle},a.name),l.default.createElement("span",{className:(0,c.buildClassNames)({addPrefix:["country-selector-dropdown__list-item-dial-code"],rawClassNames:[y.listItemDialCodeClassName]}),style:y.listItemDialCodeStyle},n,a.dialCode))})))}},66:function(e,a,r){var t=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.DialCodePreview=void 0,r(185);var n=t(r(156)),i=r(926);a.DialCodePreview=function(e){var a=e.dialCode,r=e.prefix,t=e.disabled,o=e.style,u=e.className;return n.default.createElement("div",{className:(0,i.buildClassNames)({addPrefix:["dial-code-preview",t&&"dial-code-preview--disabled"],rawClassNames:[u]}),style:o},"".concat(r).concat(a))}},472:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)},n=this&&this.__rest||function(e,a){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)a.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(r[t[n]]=e[t[n]])}return r},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(a,"__esModule",{value:!0}),a.FlagEmoji=void 0,r(986);var o=i(r(156)),u=r(926),l="abcdefghijklmnopqrstuvwxyz".split("").reduce((function(e,a,r){var n,i,o;return t(t({},e),((n={})[a]=(i=r,o=parseInt("1f1e6",16),Number(o+i).toString(16)),n))}),{});a.FlagEmoji=function(e){var a=e.iso2,r=e.size,i=void 0===r?"24px":r,s=e.protocol,c=void 0===s?"https":s,d=e.className,f=n(e,["iso2","size","protocol","className"]);if(!a)return o.default.createElement("img",t({width:i,height:i},f));var p=function(e){return[l[e[0]],l[e[1]]].join("-")}(a),h="".concat(c,"://twemoji.maxcdn.com/2/svg/").concat(p,".svg");return o.default.createElement("img",t({className:(0,u.buildClassNames)({addPrefix:["flag-emoji"],rawClassNames:[d]}),src:h,width:i,height:i,draggable:!1,"data-country":a},f))}},351:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)},n=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,a){Object.defineProperty(e,"default",{enumerable:!0,value:a})}:function(e,a){e.default=a}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var a={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(a,e,r);return i(a,e),a},u=this&&this.__rest||function(e,a){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)a.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(r[t[n]]=e[t[n]])}return r};Object.defineProperty(a,"__esModule",{value:!0}),a.PhoneInput=void 0,r(235);var l=o(r(156)),s=r(79),c=r(343),d=r(926),f=r(626),p=r(661),h=r(66);a.PhoneInput=function(e){var a,r=e.hideDropdown,n=e.placeholder,i=e.disabled,o=e.showDisabledDialCodeAndPrefix,m=e.inputProps,y=e.onChange,v=e.style,b=e.className,C=e.inputStyle,g=e.inputClassName,P=e.countrySelectorStyleProps,_=e.dialCodePreviewStyleProps,O=e.countries,j=void 0===O?s.defaultCountries:O,w=u(e,["hideDropdown","placeholder","disabled","showDisabledDialCodeAndPrefix","inputProps","onChange","style","className","inputStyle","inputClassName","countrySelectorStyleProps","dialCodePreviewStyleProps","countries"]),D=(0,c.usePhoneInput)(t(t({},w),{countries:j,onCountryChange:function(e){null==y||y(e)}})),S=D.phone,x=D.inputRef,M=D.country,N=D.setCountry,k=D.handlePhoneValueChange,A=(0,l.useMemo)((function(){if(M)return(0,f.getCountry)({value:M,field:"iso2",countries:j})}),[j,M]),E=w.disableDialCodeAndPrefix&&o&&(null==A?void 0:A.dialCode);return l.default.createElement("div",{className:(0,d.buildClassNames)({addPrefix:["input-container"],rawClassNames:[b]}),style:v},l.default.createElement(p.CountrySelector,t({onSelect:function(e){return N(e.iso2)},selectedCountry:M,countries:j,disabled:i,hideDropdown:r},P)),E&&l.default.createElement(h.DialCodePreview,t({dialCode:A.dialCode,prefix:null!==(a=w.prefix)&&void 0!==a?a:"+",disabled:i},_)),l.default.createElement("input",t({onChange:function(e){var a=k(e);null==y||y(a)},value:S,type:"tel",ref:x,className:(0,d.buildClassNames)({addPrefix:["input",i&&"input--disabled"],rawClassNames:[g]}),placeholder:n,disabled:i,style:C},m)))}},79:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.defaultCountries=void 0,a.defaultCountries=[["Afghanistan",["asia"],"af","93"],["Albania",["europe"],"al","355"],["Algeria",["africa","north-africa"],"dz","213"],["Andorra",["europe"],"ad","376"],["Angola",["africa"],"ao","244"],["Antigua and Barbuda",["america","carribean"],"ag","1268"],["Argentina",["america","south-america"],"ar","54","(..) ........",0,["11","221","223","261","264","2652","280","2905","291","2920","2966","299","341","342","343","351","376","379","381","3833","385","387","388"]],["Armenia",["asia","ex-ussr"],"am","374",".. ......"],["Aruba",["america","carribean"],"aw","297"],["Australia",["oceania"],"au","61","(..) .... ....",0,["2","3","4","7","8","02","03","04","07","08"]],["Austria",["europe","eu-union"],"at","43"],["Azerbaijan",["asia","ex-ussr"],"az","994","(..) ... .. .."],["Bahamas",["america","carribean"],"bs","1242"],["Bahrain",["middle-east"],"bh","973"],["Bangladesh",["asia"],"bd","880"],["Barbados",["america","carribean"],"bb","1246"],["Belarus",["europe","ex-ussr"],"by","375","(..) ... .. .."],["Belgium",["europe","eu-union"],"be","32","... .. .. .."],["Belize",["america","central-america"],"bz","501"],["Benin",["africa"],"bj","229"],["Bhutan",["asia"],"bt","975"],["Bolivia",["america","south-america"],"bo","591"],["Bosnia and Herzegovina",["europe","ex-yugos"],"ba","387"],["Botswana",["africa"],"bw","267"],["Brazil",["america","south-america"],"br","55","(..) ........."],["British Indian Ocean Territory",["asia"],"io","246"],["Brunei",["asia"],"bn","673"],["Bulgaria",["europe","eu-union"],"bg","359"],["Burkina Faso",["africa"],"bf","226"],["Burundi",["africa"],"bi","257"],["Cambodia",["asia"],"kh","855"],["Cameroon",["africa"],"cm","237"],["Canada",["america","north-america"],"ca","1","(...) ...-....",1,["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde",["africa"],"cv","238"],["Caribbean Netherlands",["america","carribean"],"bq","599","",1],["Central African Republic",["africa"],"cf","236"],["Chad",["africa"],"td","235"],["Chile",["america","south-america"],"cl","56"],["China",["asia"],"cn","86","..-........."],["Colombia",["america","south-america"],"co","57","... ... ...."],["Comoros",["africa"],"km","269"],["Congo",["africa"],"cd","243"],["Congo",["africa"],"cg","242"],["Costa Rica",["america","central-america"],"cr","506","....-...."],["Côte d'Ivoire",["africa"],"ci","225",".. .. .. .."],["Croatia",["europe","eu-union","ex-yugos"],"hr","385"],["Cuba",["america","carribean"],"cu","53"],["Curaçao",["america","carribean"],"cw","599","",0],["Cyprus",["europe","eu-union"],"cy","357",".. ......"],["Czech Republic",["europe","eu-union"],"cz","420","... ... ..."],["Denmark",["europe","eu-union","baltic"],"dk","45",".. .. .. .."],["Djibouti",["africa"],"dj","253"],["Dominica",["america","carribean"],"dm","1767"],["Dominican Republic",["america","carribean"],"do","1","",2],["Ecuador",["america","south-america"],"ec","593"],["Egypt",["africa","north-africa"],"eg","20"],["El Salvador",["america","central-america"],"sv","503","....-...."],["Equatorial Guinea",["africa"],"gq","240"],["Eritrea",["africa"],"er","291"],["Estonia",["europe","eu-union","ex-ussr","baltic"],"ee","372",".... ......"],["Ethiopia",["africa"],"et","251"],["Fiji",["oceania"],"fj","679"],["Finland",["europe","eu-union","baltic"],"fi","358",".. ... .. .."],["France",["europe","eu-union"],"fr","33",". .. .. .. .."],["French Guiana",["america","south-america"],"gf","594"],["French Polynesia",["oceania"],"pf","689"],["Gabon",["africa"],"ga","241"],["Gambia",["africa"],"gm","220"],["Georgia",["asia","ex-ussr"],"ge","995"],["Germany",["europe","eu-union","baltic"],"de","49",".... ........"],["Ghana",["africa"],"gh","233"],["Greece",["europe","eu-union"],"gr","30"],["Grenada",["america","carribean"],"gd","1473"],["Guadeloupe",["america","carribean"],"gp","590","",0],["Guam",["oceania"],"gu","1671"],["Guatemala",["america","central-america"],"gt","502","....-...."],["Guinea",["africa"],"gn","224"],["Guinea-Bissau",["africa"],"gw","245"],["Guyana",["america","south-america"],"gy","592"],["Haiti",["america","carribean"],"ht","509","....-...."],["Honduras",["america","central-america"],"hn","504"],["Hong Kong",["asia"],"hk","852",".... ...."],["Hungary",["europe","eu-union"],"hu","36"],["Iceland",["europe"],"is","354","... ...."],["India",["asia"],"in","91",".....-....."],["Indonesia",["asia"],"id","62"],["Iran",["middle-east"],"ir","98","... ... ...."],["Iraq",["middle-east"],"iq","964"],["Ireland",["europe","eu-union"],"ie","353",".. ......."],["Israel",["middle-east"],"il","972","... ... ...."],["Italy",["europe","eu-union"],"it","39","... .......",0],["Jamaica",["america","carribean"],"jm","1876"],["Japan",["asia"],"jp","81",".. .... ...."],["Jordan",["middle-east"],"jo","962"],["Kazakhstan",["asia","ex-ussr"],"kz","7","... ...-..-..",1,["310","311","312","313","315","318","321","324","325","326","327","336","7172","73622"]],["Kenya",["africa"],"ke","254"],["Kiribati",["oceania"],"ki","686"],["Kosovo",["europe","ex-yugos"],"xk","383"],["Kuwait",["middle-east"],"kw","965"],["Kyrgyzstan",["asia","ex-ussr"],"kg","996","... ... ..."],["Laos",["asia"],"la","856"],["Latvia",["europe","eu-union","ex-ussr","baltic"],"lv","371",".. ... ..."],["Lebanon",["middle-east"],"lb","961"],["Lesotho",["africa"],"ls","266"],["Liberia",["africa"],"lr","231"],["Libya",["africa","north-africa"],"ly","218"],["Liechtenstein",["europe"],"li","423"],["Lithuania",["europe","eu-union","ex-ussr","baltic"],"lt","370"],["Luxembourg",["europe","eu-union"],"lu","352"],["Macau",["asia"],"mo","853"],["Macedonia",["europe","ex-yugos"],"mk","389"],["Madagascar",["africa"],"mg","261"],["Malawi",["africa"],"mw","265"],["Malaysia",["asia"],"my","60","..-....-...."],["Maldives",["asia"],"mv","960"],["Mali",["africa"],"ml","223"],["Malta",["europe","eu-union"],"mt","356"],["Marshall Islands",["oceania"],"mh","692"],["Martinique",["america","carribean"],"mq","596"],["Mauritania",["africa"],"mr","222"],["Mauritius",["africa"],"mu","230"],["Mexico",["america","central-america"],"mx","52","... ... ....",0,["33","55","81","229","656","664","774","998"]],["Micronesia",["oceania"],"fm","691"],["Moldova",["europe"],"md","373","(..) ..-..-.."],["Monaco",["europe"],"mc","377"],["Mongolia",["asia"],"mn","976"],["Montenegro",["europe","ex-yugos"],"me","382"],["Morocco",["africa","north-africa"],"ma","212"],["Mozambique",["africa"],"mz","258"],["Myanmar",["asia"],"mm","95"],["Namibia",["africa"],"na","264"],["Nauru",["africa"],"nr","674"],["Nepal",["asia"],"np","977"],["Netherlands",["europe","eu-union"],"nl","31",".. ........"],["New Caledonia",["oceania"],"nc","687"],["New Zealand",["oceania"],"nz","64","...-...-...."],["Nicaragua",["america","central-america"],"ni","505"],["Niger",["africa"],"ne","227"],["Nigeria",["africa"],"ng","234"],["North Korea",["asia"],"kp","850"],["Norway",["europe","baltic"],"no","47","... .. ..."],["Oman",["middle-east"],"om","968"],["Pakistan",["asia"],"pk","92","...-......."],["Palau",["oceania"],"pw","680"],["Palestine",["middle-east"],"ps","970"],["Panama",["america","central-america"],"pa","507"],["Papua New Guinea",["oceania"],"pg","675"],["Paraguay",["america","south-america"],"py","595"],["Peru",["america","south-america"],"pe","51"],["Philippines",["asia"],"ph","63",".... ......."],["Poland",["europe","eu-union","baltic"],"pl","48","...-...-..."],["Portugal",["europe","eu-union"],"pt","351"],["Puerto Rico",["america","carribean"],"pr","1","",3],["Qatar",["middle-east"],"qa","974"],["Réunion",["africa"],"re","262"],["Romania",["europe","eu-union"],"ro","40"],["Russia",["europe","asia","ex-ussr","baltic"],"ru","7","(...) ...-..-..",0],["Rwanda",["africa"],"rw","250"],["Saint Kitts and Nevis",["america","carribean"],"kn","1869"],["Saint Lucia",["america","carribean"],"lc","1758"],["Saint Vincent and the Grenadines",["america","carribean"],"vc","1784"],["Samoa",["oceania"],"ws","685"],["San Marino",["europe"],"sm","378"],["São Tomé and Príncipe",["africa"],"st","239"],["Saudi Arabia",["middle-east"],"sa","966"],["Senegal",["africa"],"sn","221"],["Serbia",["europe","ex-yugos"],"rs","381"],["Seychelles",["africa"],"sc","248"],["Sierra Leone",["africa"],"sl","232"],["Singapore",["asia"],"sg","65","....-...."],["Slovakia",["europe","eu-union"],"sk","421"],["Slovenia",["europe","eu-union","ex-yugos"],"si","386"],["Solomon Islands",["oceania"],"sb","677"],["Somalia",["africa"],"so","252"],["South Africa",["africa"],"za","27"],["South Korea",["asia"],"kr","82","... .... ...."],["South Sudan",["africa","north-africa"],"ss","211"],["Spain",["europe","eu-union"],"es","34","... ... ..."],["Sri Lanka",["asia"],"lk","94"],["Sudan",["africa"],"sd","249"],["Suriname",["america","south-america"],"sr","597"],["Swaziland",["africa"],"sz","268"],["Sweden",["europe","eu-union","baltic"],"se","46","(...) ...-..."],["Switzerland",["europe"],"ch","41",".. ... .. .."],["Syria",["middle-east"],"sy","963"],["Taiwan",["asia"],"tw","886"],["Tajikistan",["asia","ex-ussr"],"tj","992"],["Tanzania",["africa"],"tz","255"],["Thailand",["asia"],"th","66"],["Timor-Leste",["asia"],"tl","670"],["Togo",["africa"],"tg","228"],["Tonga",["oceania"],"to","676"],["Trinidad and Tobago",["america","carribean"],"tt","1868"],["Tunisia",["africa","north-africa"],"tn","216"],["Turkey",["europe"],"tr","90","... ... .. .."],["Turkmenistan",["asia","ex-ussr"],"tm","993"],["Tuvalu",["asia"],"tv","688"],["Uganda",["africa"],"ug","256"],["Ukraine",["europe","ex-ussr"],"ua","380","(..) ... .. .."],["United Arab Emirates",["middle-east"],"ae","971"],["United Kingdom",["europe","eu-union"],"gb","44",".... ......"],["United States",["america","north-america"],"us","1","(...) ...-....",0,["201","202","203","205","206","207","208","209","210","212","213","214","215","216","217","218","219","225","228","229","231","239","248","251","252","253","254","256","260","262","269","270","276","281","301","302","303","304","305","307","308","309","310","312","313","314","315","316","317","318","319","320","321","323","325","330","334","336","337","352","360","361","386","401","402","404","405","406","407","408","409","410","412","413","414","415","417","419","423","425","432","434","435","440","478","479","480","501","502","503","504","505","507","508","509","510","512","513","515","516","517","518","520","530","540","541","559","561","562","563","570","573","574","575","580","585","586","601","602","603","605","606","607","608","609","610","612","614","615","616","617","618","619","620","623","626","630","631","636","641","650","651","660","661","662","701","702","703","704","706","707","708","712","713","714","715","716","717","718","719","724","727","731","732","734","740","757","760","763","765","770","772","773","775","781","785","801","802","803","804","805","806","808","810","812","813","814","815","816","817","818","828","830","831","843","845","847","850","856","858","859","860","863","864","865","870","901","903","904","906","907","908","909","910","912","913","914","915","916","918","919","920","925","928","931","936","937","940","941","949","951","952","954","956","970","972","973","978","979","985","989"]],["Uruguay",["america","south-america"],"uy","598"],["Uzbekistan",["asia","ex-ussr"],"uz","998",".. ... .. .."],["Vanuatu",["oceania"],"vu","678"],["Vatican City",["europe"],"va","39",".. .... ....",1],["Venezuela",["america","south-america"],"ve","58"],["Vietnam",["asia"],"vn","84"],["Yemen",["middle-east"],"ye","967"],["Zambia",["africa"],"zm","260"],["Zimbabwe",["africa"],"zw","263"]]},586:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)},n=this&&this.__spreadArray||function(e,a,r){if(r||2===arguments.length)for(var t,n=0,i=a.length;n<i;n++)!t&&n in a||(t||(t=Array.prototype.slice.call(a,0,n)),t[n]=a[n]);return e.concat(t||Array.prototype.slice.call(a))};Object.defineProperty(a,"__esModule",{value:!0}),a.useHistoryState=void 0;var i=r(156),o={size:20};a.useHistoryState=function(e,a){var r=t(t({},o),a).size,u=(0,i.useState)(e),l=u[0],s=u[1],c=(0,i.useState)([e]),d=c[0],f=c[1],p=(0,i.useState)(0),h=p[0],m=p[1],y=(0,i.useCallback)((function(e,a){if(e!==l){if(null==a?void 0:a.overrideLastHistoryItem)f((function(a){return n(n([],a.slice(0,h),!0),[e],!1)}));else{var t=d.length>=r;f((function(a){return n(n([],a.slice(t?1:0,h+1),!0),[e],!1)})),t||m((function(e){return e+1}))}s(e)}}),[l,h,d.length,r]),v=(0,i.useCallback)((function(){return!(h<=0||(s(d[h-1]),m((function(e){return e-1})),0))}),[d,h]),b=(0,i.useCallback)((function(){return!(h+1>=d.length||(s(d[h+1]),m((function(e){return e+1})),0))}),[d,h]);return[l,y,v,b]}},71:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.useOnClickOutside=void 0;var t=r(156);a.useOnClickOutside=function(e){var a=e.ref,r=e.onClickOutside;(0,t.useEffect)((function(){if(void 0!==typeof document){var e=function(e){a.current&&!a.current.contains(e.target)&&r(e)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}}}),[a,r])}},72:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)};Object.defineProperty(a,"__esModule",{value:!0}),a.usePhone=a.defaultPhoneConfig=a.MASK_CHAR=void 0;var n=r(156),i=r(79),o=r(626),u=r(586),l=r(15);a.MASK_CHAR=".",a.defaultPhoneConfig={prefix:"+",defaultMask:"............",charAfterDialCode:" ",historySaveDebounceMS:200,disableCountryGuess:!1,disableDialCodePrefill:!1,forceDialCode:!1,disableDialCodeAndPrefix:!1,countries:i.defaultCountries},a.usePhone=function(e,r){var i=t(t({},a.defaultPhoneConfig),r),s=i.country,c=i.countries,d=i.prefix,f=i.defaultMask,p=i.charAfterDialCode,h=i.historySaveDebounceMS,m=i.disableCountryGuess,y=i.disableDialCodePrefill,v=i.forceDialCode,b=i.disableDialCodeAndPrefix,C=i.onCountryGuess,g=i.onPhoneUpdate,P=!b&&!m,_=(0,l.useTimer)(),O=(0,n.useMemo)((function(){if(s)return(0,o.getCountry)({value:s,field:"iso2",countries:c})}),[s,c]),j=(0,u.useHistoryState)(""),w=j[0],D=j[1],S=j[2],x=j[3],M=(0,n.useState)(!1),N=M[0],k=M[1],A=function(e,r){var t,n=void 0===r?{}:r,i=n.deletion,u=n.cursorPosition,l=function(e,r){var t,n,i=r.trimNonDigitsEnd,u=r.insertDialCodeOnEmpty,l=r.forceDisableCountryGuess,s=!l&&P?(0,o.guessCountryByPartialNumber)({phone:e,countries:c}):void 0,h=!l&&P&&null!==(t=null==s?void 0:s.country)&&void 0!==t?t:O;return{phone:h?(0,o.formatPhone)(e,{prefix:d,mask:null!==(n=h.format)&&void 0!==n?n:f,maskChar:a.MASK_CHAR,dialCode:h.dialCode,trimNonDigitsEnd:i,charAfterDialCode:p,forceDialCode:v,insertDialCodeOnEmpty:u,disableDialCodeAndPrefix:b}):e,countryGuessResult:s,formatCountry:h}}(e,{trimNonDigitsEnd:"backward"===i,insertDialCodeOnEmpty:n.insertDialCodeOnEmpty||!N&&!y,forceDisableCountryGuess:v&&!!i&&(0,o.removeNonDigits)(e).length<(null!==(t=null==O?void 0:O.dialCode.length)&&void 0!==t?t:0)}),m=l.phone,j=l.countryGuessResult,w=l.formatCountry,S=_.check();return D(m,{overrideLastHistoryItem:!(!S||S>h)}),null==g||g(m,{formatCountry:w,unformattedValue:e,cursorPosition:null!=u?u:0,deletion:i}),P&&(null==j?void 0:j.country)&&j.country.name!==s&&(null==C||C(j)),N||k(!0),m};return(0,n.useEffect)((function(){N&&e===w||A(e)}),[e]),{phone:w,initialized:N,undo:S,redo:x,handleValueChange:A}}},343:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)},n=this&&this.__rest||function(e,a){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&a.indexOf(t)<0&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(t=Object.getOwnPropertySymbols(e);n<t.length;n++)a.indexOf(t[n])<0&&Object.prototype.propertyIsEnumerable.call(e,t[n])&&(r[t[n]]=e[t[n]])}return r};Object.defineProperty(a,"__esModule",{value:!0}),a.usePhoneInput=void 0;var i=r(156),o=r(79),u=r(626),l=r(72);a.usePhoneInput=function(e){var a,r=e.initialCountry,s=e.value,c=void 0===s?"":s,d=e.prefix,f=void 0===d?"+":d,p=e.countries,h=void 0===p?o.defaultCountries:p,m=e.disableDialCodeAndPrefix,y=e.hideSpaceAfterDialCode,v=e.onCountryChange,b=n(e,["initialCountry","value","prefix","countries","disableDialCodeAndPrefix","hideSpaceAfterDialCode","onCountryChange"]),C=(0,i.useRef)(null),g=(0,i.useState)(r),P=g[0],_=g[1],O=(0,i.useMemo)((function(){if(P)return(0,u.getCountry)({value:P,field:"iso2",countries:h})}),[h,P]),j=y?"":" ",w=null!==(a=null==O?void 0:O.dialCode)&&void 0!==a?a:"",D=m?(0,u.removeDialCode)({phone:c,dialCode:w,charAfterDialCode:j,prefix:f}):c,S=(0,l.usePhone)(D,t({country:P,countries:h,prefix:f,disableDialCodeAndPrefix:m,charAfterDialCode:j,onCountryGuess:function(e){var a=e.country;e.fullDialCodeMatch&&_(a.iso2)},onPhoneUpdate:function(e,a){var r,t,n=a.formatCountry,i=a.unformattedValue,o=a.cursorPosition,l=a.deletion,s=(0,u.getCursorPosition)({cursorPositionAfterInput:o,phoneBeforeInput:x,phoneAfterInput:i,phoneAfterFormatted:e,leftOffset:b.forceDialCode?f.length+(null!==(t=null===(r=null==n?void 0:n.dialCode)||void 0===r?void 0:r.length)&&void 0!==t?t:0)+j.length:0,deletion:l});Promise.resolve().then((function(){var e;null===(e=C.current)||void 0===e||e.setSelectionRange(s,s)}))}},b)),x=S.phone,M=S.initialized,N=S.undo,k=S.redo,A=S.handleValueChange;return(0,i.useEffect)((function(){var e=null==C?void 0:C.current;if(e){var a=function(e){var a=e.ctrlKey,r=e.shiftKey,t="z"===e.key.toLowerCase();if(a&&t)return r?k():N()};return null==e||e.addEventListener("keydown",a),function(){null==e||e.removeEventListener("keydown",a)}}}),[C,N,k]),(0,i.useEffect)((function(){var e;if(O&&M&&!(0,u.removeNonDigits)(x).startsWith(O.dialCode)){var a=A("",{insertDialCodeOnEmpty:!0});null===(e=C.current)||void 0===e||e.focus(),null==v||v(a)}}),[P]),{phone:x,handlePhoneValueChange:function(e){var a;e.preventDefault();var r=e.nativeEvent.inputType,t=A(e.target.value,{deletion:function(){var e;if(null!==(e=null==r?void 0:r.toLocaleLowerCase().includes("delete"))&&void 0!==e&&e)return(null==r?void 0:r.toLocaleLowerCase().includes("forward"))?"forward":"backward"}(),cursorPosition:null!==(a=e.target.selectionStart)&&void 0!==a?a:0});return m?(0,u.addDialCode)({phone:t,dialCode:w,charAfterDialCode:j,prefix:f}):t},inputRef:C,country:P,setCountry:_}}},707:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.usePhoneValidation=void 0;var t=r(626);a.usePhoneValidation=function(e,a){return(0,t.validatePhone)(e,a)}},15:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.useTimer=void 0;var t=r(156);a.useTimer=function(){var e=(0,t.useState)(),a=e[0],r=e[1],n=(0,t.useState)(Date.now()),i=n[0],o=n[1];return{check:function(){var e=Date.now(),t=a?e-i:void 0;return r(i),o(e),t}}}},926:function(e,a){var r=this&&this.__spreadArray||function(e,a,r){if(r||2===arguments.length)for(var t,n=0,i=a.length;n<i;n++)!t&&n in a||(t||(t=Array.prototype.slice.call(a,0,n)),t[n]=a[n]);return e.concat(t||Array.prototype.slice.call(a))};Object.defineProperty(a,"__esModule",{value:!0}),a.buildClassNames=a.classNamesWithPrefix=a.joinClasses=a.classPrefix=void 0,a.classPrefix="react-international-phone-",a.joinClasses=function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];return e.filter((function(e){return!!e})).join(" ").trim()},a.classNamesWithPrefix=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return a.joinClasses.apply(void 0,e).split(" ").map((function(e){return"".concat(a.classPrefix).concat(e)})).join(" ")},a.buildClassNames=function(e){var t=e.addPrefix,n=e.rawClassNames;return a.joinClasses.apply(void 0,r([a.classNamesWithPrefix.apply(void 0,t)],n,!1))}},868:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.applyMask=void 0,a.applyMask=function(e){var a=e.value,r=e.mask,t=e.maskSymbol,n=e.offset,i=void 0===n?0:n,o=e.trimNonMaskCharsLeftover,u=void 0!==o&&o;if(a.length<i)return a;for(var l=a.slice(0,i),s=a.slice(i),c=l,d=0,f=0,p=r.split("");f<p.length;f++){var h=p[f];if(d>=s.length){if(!u&&h!==t){c+=h;continue}break}h===t?(c+=s[d],d+=1):c+=h}return c}},597:function(e,a,r){var t=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),n=this&&this.__exportStar||function(e,a){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(a,r)||t(a,e,r)};Object.defineProperty(a,"__esModule",{value:!0}),n(r(868),a),n(r(75),a),n(r(80),a)},75:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.removeNonDigits=void 0,a.removeNonDigits=function(e){return e.replace(/\D/g,"")}},80:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.scrollToChild=void 0,a.scrollToChild=function(e,a){var r=e.style.display;"block"!==r&&(e.style.display="block");var t=e.getBoundingClientRect().top,n=a.getBoundingClientRect().top;n>=t&&n<=t+e.clientHeight||(e.scrollTop+=n-t),e.style.display=r}},279:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.buildCountryData=void 0,a.buildCountryData=function(e){return[e.name,e.regions,e.iso2,e.dialCode,e.format,e.priority,e.areaCodes].filter(Boolean)}},548:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getCountry=void 0;var t=r(929);a.getCountry=function(e){var a=e.value,r=e.field,n=e.countries;if(["regions","priority"].includes(r))throw new Error(function(e){return'Field "'.concat(e,'" is not supported')}(r));var i=n.find((function(e){var n=(0,t.parseCountry)(e);return a===n[r]}));if(i)return(0,t.parseCountry)(i)}},741:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.guessCountryByPartialNumber=void 0;var t=r(597),n=r(929);a.guessCountryByPartialNumber=function(e){var a=e.phone,r=e.countries,i={country:void 0,fullDialCodeMatch:!1,areaCodeMatch:void 0};if(!a)return i;var o=(0,t.removeNonDigits)(a);if(!o)return i;for(var u=i,l=function(e){var a,r,t,n,i=e.country,o=e.fullDialCodeMatch,l=e.areaCodeMatch,s=i.dialCode===(null===(a=u.country)||void 0===a?void 0:a.dialCode),c=(null!==(r=i.priority)&&void 0!==r?r:0)<(null!==(n=null===(t=u.country)||void 0===t?void 0:t.priority)&&void 0!==n?n:0);s&&!c||(u={country:i,fullDialCodeMatch:o,areaCodeMatch:l})},s=0,c=r;s<c.length;s++){var d=c[s],f=(0,n.parseCountry)(d),p=f.dialCode,h=f.areaCodes;if(o.startsWith(p)){var m=!u.country||Number(p)>=Number(u.country.dialCode);if(h)for(var y=o.substring(p.length),v=0,b=h;v<b.length;v++){var C=b[v];if(y.startsWith(C))return{country:f,fullDialCodeMatch:!0,areaCodeMatch:!0}}!m&&p!==o&&u.fullDialCodeMatch||l({country:f,fullDialCodeMatch:!0,areaCodeMatch:h?!h:void 0})}u.fullDialCodeMatch||o.length<p.length&&p.startsWith(o)&&(!u.country||Number(p)<=Number(u.country.dialCode))&&l({country:f,fullDialCodeMatch:!1})}return u}},981:function(e,a,r){var t=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),n=this&&this.__exportStar||function(e,a){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(a,r)||t(a,e,r)};Object.defineProperty(a,"__esModule",{value:!0}),n(r(279),a),n(r(548),a),n(r(741),a),n(r(929),a)},929:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.parseCountry=void 0,a.parseCountry=function(e){return{name:e[0],regions:e[1],iso2:e[2],dialCode:e[3],format:e[4],priority:e[5],areaCodes:e[6]}}},626:function(e,a,r){var t=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),n=this&&this.__exportStar||function(e,a){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(a,r)||t(a,e,r)};Object.defineProperty(a,"__esModule",{value:!0}),n(r(597),a),n(r(981),a),n(r(394),a)},540:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDialCode=void 0;var t=r(475);a.addDialCode=function(e){var a=e.phone,r=e.dialCode,n=e.prefix,i=void 0===n?"+":n,o=e.charAfterDialCode,u=void 0===o?" ":o;return"".concat(i).concat(r).concat(u).concat((0,t.removeDialCode)({phone:a,dialCode:r,charAfterDialCode:u,prefix:i}))}},798:(e,a,r)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.formatPhone=void 0;var t=r(597);a.formatPhone=function(e,a){var r=!a.disableDialCodeAndPrefix&&a.forceDialCode,n=!a.disableDialCodeAndPrefix&&a.insertDialCodeOnEmpty,i=e,o=function(e){return a.trimNonDigitsEnd?e.trim():e};if(!i)return n&&!i.length||r?o("".concat(a.prefix).concat(a.dialCode).concat(a.charAfterDialCode)):o(i);if((i=(0,t.removeNonDigits)(i))===a.dialCode&&!a.disableDialCodeAndPrefix)return o("".concat(a.prefix).concat(a.dialCode).concat(a.charAfterDialCode));if(a.dialCode.startsWith(i)&&!a.disableDialCodeAndPrefix)return o(r?"".concat(a.prefix).concat(a.dialCode).concat(a.charAfterDialCode):"".concat(a.prefix).concat(i));if(!i.startsWith(a.dialCode)&&!a.disableDialCodeAndPrefix){if(r)return o("".concat(a.prefix).concat(a.dialCode).concat(a.charAfterDialCode));if(i.length<a.dialCode.length)return o("".concat(a.prefix).concat(i))}var u,l=(u=a.dialCode.length,a.disableDialCodeAndPrefix&&(u=0),{phoneLeftSide:i.slice(0,u),phoneRightSide:i.slice(u)}),s=l.phoneLeftSide,c=l.phoneRightSide;return s="".concat(a.prefix).concat(s).concat(a.charAfterDialCode),c=(0,t.applyMask)({value:c,mask:a.mask,maskSymbol:a.maskChar,trimNonMaskCharsLeftover:a.trimNonDigitsEnd}),a.disableDialCodeAndPrefix&&(s=""),o("".concat(s).concat(c))}},378:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getCursorPosition=void 0;var r=function(e){return/\d/.test(e)};a.getCursorPosition=function(e){var a=e.phoneBeforeInput,t=e.phoneAfterInput,n=e.phoneAfterFormatted,i=e.cursorPositionAfterInput,o=e.leftOffset,u=void 0===o?0:o,l=e.deletion;if(i<u)return u;if(!a)return n.length;var s="backward"===l;if(0===i&&t.length>0&&n.length>0){if(s)return 0;for(var c=0;c<n.length;c+=1)if(r(n[c]))return c;return n.length}if(t.length<a.length&&1===t.length)return n.length;var d=null;for(c=i-1;c>=0;c-=1)if(r(t[c])){d=c;break}if(null===d)return 0!==i?i:n.length;var f=0;for(c=0;c<d;c+=1)r(t[c])&&(f+=1);s&&(f-=1);var p=0,h=0;for(c=0;c<n.length&&(p+=1,r(n[c])&&(h+=1),h!==f+1);c+=1);for(;!r(n[p])&&p<n.length;)p+=1;return s&&(p+=1),p}},394:function(e,a,r){var t=this&&this.__createBinding||(Object.create?function(e,a,r,t){void 0===t&&(t=r);var n=Object.getOwnPropertyDescriptor(a,r);n&&!("get"in n?!a.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return a[r]}}),Object.defineProperty(e,t,n)}:function(e,a,r,t){void 0===t&&(t=r),e[t]=a[r]}),n=this&&this.__exportStar||function(e,a){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(a,r)||t(a,e,r)};Object.defineProperty(a,"__esModule",{value:!0}),n(r(540),a),n(r(798),a),n(r(378),a),n(r(475),a),n(r(439),a)},475:(e,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.removeDialCode=void 0,a.removeDialCode=function(e){var a=e.phone,r=e.dialCode,t=e.prefix,n=void 0===t?"+":t,i=e.charAfterDialCode,o=void 0===i?" ":i;if(!a||!r)return a;var u=a;return u.startsWith(n)&&(u=u.replace(n,"")),u.startsWith(r)?((u=u.replace(r,"")).startsWith(o)&&(u=u.replace(o,"")),u):a}},439:function(e,a,r){var t=this&&this.__assign||function(){return t=Object.assign||function(e){for(var a,r=1,t=arguments.length;r<t;r++)for(var n in a=arguments[r])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},t.apply(this,arguments)};Object.defineProperty(a,"__esModule",{value:!0}),a.validatePhone=void 0;var n=r(72),i=r(597),o=r(981);a.validatePhone=function(e,a){var r=t(t({},n.defaultPhoneConfig),a),u=r.countries,l=r.defaultMask,s=r.defaultMaskMinPhoneLength,c=void 0===s?10:s,d=r.prefix,f=r.charAfterDialCode,p=(0,o.guessCountryByPartialNumber)({phone:e,countries:u}),h=p.country,m=p.fullDialCodeMatch,y=p.areaCodeMatch;if(!h||!m)return{country:void 0,lengthMatch:!1,areaCodeMatch:y,isValid:!1};var v="".concat(d).concat(h.dialCode).concat(f);if(!e.startsWith(v))return{country:h,lengthMatch:!1,areaCodeMatch:y,isValid:!1};var b=e.substring(v.length),C=!h.format,g=C?l:h.format;if(C&&(0,i.removeNonDigits)(e).length<c)return{country:h,lengthMatch:!1,areaCodeMatch:y,isValid:!1};if(!C&&b.length!==g.length)return{country:h,lengthMatch:!1,areaCodeMatch:y,isValid:!1};for(var P=0;P<b.length;P+=1)if(b[P]!==g[P]&&g[P]!==n.MASK_CHAR)return{country:h,lengthMatch:!1,areaCodeMatch:y,isValid:!1};return{country:h,lengthMatch:!0,areaCodeMatch:y,isValid:null==y||y}}},156:a=>{a.exports=e}},r={};function t(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={exports:{}};return a[e].call(i.exports,i,i.exports,t),i.exports}t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.validatePhone=e.parseCountry=e.buildCountryData=e.usePhoneValidation=e.usePhoneInput=e.usePhone=e.defaultCountries=e.PhoneInput=e.FlagEmoji=e.DialCodePreview=e.CountrySelectorDropdown=e.CountrySelector=void 0;var a=t(661);Object.defineProperty(e,"CountrySelector",{enumerable:!0,get:function(){return a.CountrySelector}});var r=t(918);Object.defineProperty(e,"CountrySelectorDropdown",{enumerable:!0,get:function(){return r.CountrySelectorDropdown}});var i=t(66);Object.defineProperty(e,"DialCodePreview",{enumerable:!0,get:function(){return i.DialCodePreview}});var o=t(472);Object.defineProperty(e,"FlagEmoji",{enumerable:!0,get:function(){return o.FlagEmoji}});var u=t(351);Object.defineProperty(e,"PhoneInput",{enumerable:!0,get:function(){return u.PhoneInput}});var l=t(79);Object.defineProperty(e,"defaultCountries",{enumerable:!0,get:function(){return l.defaultCountries}});var s=t(72);Object.defineProperty(e,"usePhone",{enumerable:!0,get:function(){return s.usePhone}});var c=t(343);Object.defineProperty(e,"usePhoneInput",{enumerable:!0,get:function(){return c.usePhoneInput}});var d=t(707);Object.defineProperty(e,"usePhoneValidation",{enumerable:!0,get:function(){return d.usePhoneValidation}});var f=t(626);Object.defineProperty(e,"buildCountryData",{enumerable:!0,get:function(){return f.buildCountryData}}),Object.defineProperty(e,"parseCountry",{enumerable:!0,get:function(){return f.parseCountry}}),Object.defineProperty(e,"validatePhone",{enumerable:!0,get:function(){return f.validatePhone}})})(),n})())); |
export * from './applyMask'; | ||
export * from './removeNonDigits'; | ||
export * from './scrollToChild'; |
{ | ||
"name": "react-international-phone", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"description": "☎️ International phone input component for React", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
78290
42
526