@proprioo/salatim 23.5.9 → 23.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## Changelog
2
2
 
3
+ **23.6.0**
4
+
5
+ * Feat: add United States to <Phone/> flags
6
+
3
7
  **23.5.9**
4
8
 
5
9
  * Fix: remove overflow on Item
package/lib/index.js CHANGED
@@ -646,7 +646,7 @@ object-assign
646
646
  Licensed under the MIT License (MIT), see
647
647
  http://jedwatson.github.io/classnames
648
648
  */
649
- !function(e){!function(){var t={}.hasOwnProperty;function r(){for(var e=[],n=0;n<arguments.length;n++){var o=arguments[n];if(o){var a=typeof o;if("string"===a||"number"===a)e.push(o);else if(Array.isArray(o)&&o.length){var i=r.apply(null,o);i&&e.push(i)}else if("object"===a)for(var l in o)t.call(o,l)&&o[l]&&e.push(l)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r}()}(zb);var Hb=zb.exports;function Gb(e,t){var r=0,n=t.split(""),o=Array.isArray(n),a=0;for(n=o?n:n[Symbol.iterator]();;){var i;if(o){if(a>=n.length)break;i=n[a++]}else{if((a=n.next()).done)break;i=a.value}i===e&&r++}return r}function Ub(e,t){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"x",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:" ",o=e.length,a=Gb("(",e),i=Gb(")",e),l=a-i;l>0&&o<t.length;)e+=t[o].replace(r,n),")"===t[o]&&l--,o++;return e}function Wb(e,t,r){"string"==typeof r&&(r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",r=arguments.length>2?arguments[2]:void 0;if(!e)return function(e){return{text:e}};var n=Gb(t,e);return function(o){if(!o)return{text:"",template:e};var a=0,i="",l=e.split(""),s=Array.isArray(l),u=0;for(l=s?l:l[Symbol.iterator]();;){var d;if(s){if(u>=l.length)break;d=l[u++]}else{if((u=l.next()).done)break;d=u.value}var c=d;if(c===t){if(i+=o[a],++a===o.length&&o.length<n)break}else i+=c}return r&&(i=Ub(i,e)),{text:i,template:e}}}(r));var n=r(e)||{},o=n.text,a=n.template;if(void 0===o&&(o=e),a)if(void 0===t)t=o.length;else{for(var i=0,l=!1,s=-1;i<o.length&&i<a.length;){if(o[i]!==a[i]){if(0===t){l=!0,t=i;break}s=i,t--}i++}l||(t=s+1)}return{text:o,caret:t}}var Kb=8,Vb=46;function qb(e,t){void 0!==t&&(!function(){if("undefined"!=typeof navigator)return Yb.test(navigator.userAgent)}()?e.setSelectionRange(t,t):setTimeout((function(){return e.setSelectionRange(t,t)}),0))}var Yb=/Android/i;function Zb(e,t,r,n,o){if(!t.hasAttribute("readonly")){var a=function(e){switch(e.keyCode){case Kb:return"Backspace";case Vb:return"Delete"}}(e);switch(a){case"Delete":case"Backspace":e.preventDefault();var i=function(e){if(e.selectionStart!==e.selectionEnd)return{start:e.selectionStart,end:e.selectionEnd}}(t);return i?(function(e,t){var r=e.value;r=r.slice(0,t.start)+r.slice(t.end),e.value=r,qb(e,t.start)}(t,i),Jb(t,r,n,void 0,o)):Jb(t,r,n,a,o)}}}function Jb(e,t,r,n,o){var a=function(e,t,r){for(var n="",o=0,a=0;a<e.length;){var i=r(e[a],n);void 0!==i&&(n+=i,void 0!==t&&(t===a?o=n.length-1:t>a&&(o=n.length))),a++}return void 0===t&&(o=n.length),{value:n,caret:o}}(e.value,e.selectionStart,t),i=a.value,l=a.caret;if(n){var s=function(e,t,r){switch(r){case"Backspace":t>0&&(e=e.slice(0,t-1)+e.slice(t),t--);break;case"Delete":e=e.slice(0,t)+e.slice(t+1)}return{value:e,caret:t}}(i,l,n);i=s.value,l=s.caret}var u=Wb(i,l,r),d=u.text;l=u.caret,e.value=d,qb(e,l),o(i)}function Xb(){return(Xb=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function Qb(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function em(e,r){var n=e.value,o=e.parse,a=e.format,i=e.inputComponent,l=e.onChange,s=e.onKeyDown,d=Qb(e,["value","parse","format","inputComponent","onChange","onKeyDown"]),c=t.useRef(),f=t.useCallback((function(e){c.current=e,r&&("function"==typeof r?r(e):r.current=e)}),[r]),p=t.useCallback((function(e){Jb(c.current,o,a,void 0,l)}),[c,o,a,l]),h=t.useCallback((function(e){return s&&s(e),Zb(e,c.current,o,a,l)}),[c,o,a,l,s]);return u.default.createElement(i,Xb({},d,{ref:f,value:a(rm(n)?"":n).text,onKeyDown:h,onChange:p}))}(em=u.default.forwardRef(em)).propTypes={parse:js.func.isRequired,format:js.func.isRequired,inputComponent:js.elementType.isRequired,type:js.string.isRequired,value:js.string,onChange:js.func.isRequired,onKeyDown:js.func,onCut:js.func,onPaste:js.func},em.defaultProps={inputComponent:"input",type:"text"};var tm=em;function rm(e){return null==e}var nm=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=this.constructor.name,this.message=t,this.stack=new Error(t).stack};(nm.prototype=Object.create(Error.prototype)).constructor=nm;var om="".concat("-‐-―−ー-").concat("//").concat("..").concat("  ­​⁠ ").concat("()()[]\\[\\]").concat("~⁓∼~");function am(e,t){e=e.split("-"),t=t.split("-");for(var r=e[0].split("."),n=t[0].split("."),o=0;o<3;o++){var a=Number(r[o]),i=Number(n[o]);if(a>i)return 1;if(i>a)return-1;if(!isNaN(a)&&isNaN(i))return 1;if(isNaN(a)&&!isNaN(i))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}function im(e){return(im="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function um(e,t,r){return t&&sm(e.prototype,t),r&&sm(e,r),e}var dm=/^\d+$/,cm=function(){function e(t){lm(this,e),function(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!bm(e)||!bm(e.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(bm(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+mm(e)+": "+e,"."))}(t),this.metadata=t,wm.call(this,t)}return um(e,[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter((function(e){return"001"!==e}))}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return void 0!==this.getCountryMetadata(e)}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var t=this.countryCallingCodes()[e];if(t&&1===t.length&&"001"===t[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,t){if(e&&dm.test(e)&&(t=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new fm(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw new Error("Unknown calling code: ".concat(t));this.numberingPlan=new fm(this.getNumberingPlanMetadata(t),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var t=this.countryCallingCodes()[e];if(t){if(1===t.length&&3===t[0].length)return;return t}}},{key:"getCountryCodeForCallingCode",value:function(e){var t=this.getCountryCodesForCallingCode(e);if(t)return t[0]}},{key:"getNumberingPlanMetadata",value:function(e){var t=this.getCountryCodeForCallingCode(e);if(t)return this.getCountryMetadata(t);if(this.nonGeographic()){var r=this.nonGeographic()[e];if(r)return r}else{var n=this.countryCallingCodes()[e];if(n&&1===n.length&&"001"===n[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(e){return this.numberingPlan.type(e)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}]),e}(),fm=function(){function e(t,r){lm(this,e),this.globalMetadataObject=r,this.metadata=t,wm.call(this,r.metadata)}return um(e,[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this,t=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return t.map((function(t){return new pm(t,e)}))}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return(!this.types()||0!==this.types().length)&&!!this.types()}},{key:"type",value:function(e){if(this.hasTypes()&&gm(this.types(),e))return new ym(gm(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?" ext. ":this.metadata[13]||" ext. "}}]),e}(),pm=function(){function e(t,r){lm(this,e),this._format=t,this.metadata=r}return um(e,[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!(!this.nationalPrefixFormattingRule()||hm.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),e}(),hm=/^\(?\$1\)?$/,ym=function(){function e(t,r){lm(this,e),this.type=t,this.metadata=r}return um(e,[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]),e}();function gm(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}var bm=function(e){return"object"===im(e)},mm=function(e){return im(e)};function vm(e,t){if((t=new cm(t)).hasCountry(e))return t.country(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function $m(e,t){return void 0!==t.countries[e]}function wm(e){var t=e.version;"number"==typeof t?(this.v1=1===t,this.v2=2===t,this.v3=3===t,this.v4=4===t):t?-1===am(t,"1.2.0")?this.v2=!0:-1===am(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}var xm=function(e){return"([".concat("0-90-9٠-٩۰-۹","]{1,").concat(e,"})")};function Om(e){var t="#?";return";ext="+xm("20")+"|"+("[  \\t,]*(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)[:\\..]?[  \\t,-]*"+xm("20")+t)+"|"+("[  \\t,]*(?:[xx##~~]|int|int)[:\\..]?[  \\t,-]*"+xm("9")+t)+"|"+("[- ]+"+xm("6")+"#")+"|"+("[  \\t]*(?:,{2}|;)[:\\..]?[  \\t,-]*"+xm("15")+t)+"|"+("[  \\t]*(?:,)+[:\\..]?[  \\t,-]*"+xm("9")+t)}var _m="[++]{0,1}(?:["+om+"]*[0-90-9٠-٩۰-۹]){3,}["+om+"0-90-9٠-٩۰-۹]*",Em=new RegExp("^[++]{0,1}(?:["+om+"]*[0-90-9٠-٩۰-۹]){1,2}$","i"),Sm=_m+"(?:"+Om()+")?",Pm=new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^"+Sm+"$","i");function km(e){return e.length>=2&&Pm.test(e)}var Cm=new RegExp("(?:"+Om()+")$","i");var Dm={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function Mm(e){return Dm[e]}function Am(e){var t="",r=e.split(""),n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var a;if(n){if(o>=r.length)break;a=r[o++]}else{if((o=r.next()).done)break;a=o.value}var i=Mm(a);i&&(t+=i)}return t}function Im(e){var t="",r=e.split(""),n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var a;if(n){if(o>=r.length)break;a=r[o++]}else{if((o=r.next()).done)break;a=o.value}t+=Tm(a,t)||""}return t}function Tm(e,t){if("+"===e){if(t)return;return"+"}return Mm(e)}function Nm(e,t){return jm(e,void 0,t)}function jm(e,t,r){var n=r.type(t),o=n&&n.possibleLengths()||r.possibleLengths();if(!o)return"IS_POSSIBLE";if("FIXED_LINE_OR_MOBILE"===t){if(!r.type("FIXED_LINE"))return jm(e,"MOBILE",r);var a=r.type("MOBILE");a&&(o=function(e,t){var r=e.slice(),n=t,o=Array.isArray(n),a=0;for(n=o?n:n[Symbol.iterator]();;){var i;if(o){if(a>=n.length)break;i=n[a++]}else{if((a=n.next()).done)break;i=a.value}var l=i;e.indexOf(l)<0&&r.push(l)}return r.sort((function(e,t){return e-t}))}(o,a.possibleLengths()))}else if(t&&!n)return"INVALID_LENGTH";var i=e.length,l=o[0];return l===i?"IS_POSSIBLE":l>i?"TOO_SHORT":o[o.length-1]<i?"TOO_LONG":o.indexOf(i,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function Fm(e,t){switch(Nm(e,t)){case"IS_POSSIBLE":return!0;default:return!1}}function Rm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(n=(i=l.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==l.return||l.return()}finally{if(o)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Lm(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}var Bm=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function zm(e,t,r){if(t=t||{},e.country){(r=new cm(r)).selectNumberingPlan(e.country,e.countryCallingCode);var n=t.v2?e.nationalNumber:e.phone;if(Lm(n,r.nationalNumberPattern())){if(Hm(n,"FIXED_LINE",r))return r.type("MOBILE")&&""===r.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":r.type("MOBILE")?Hm(n,"MOBILE",r)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var o=0,a=Bm;o<a.length;o++){var i=a[o];if(Hm(n,i,r))return i}}}}function Hm(e,t,r){return!(!(t=r.type(t))||!t.pattern())&&(!(t.possibleLengths()&&t.possibleLengths().indexOf(e.length)<0)&&Lm(e,t.pattern()))}function Gm(e){return e.replace(new RegExp("[".concat(om,"]+"),"g")," ").trim()}var Um=/(\$\d)/;function Wm(e,t,r){var n=r.useInternationalFormat,o=r.withNationalPrefix;r.carrierCode,r.metadata;var a=e.replace(new RegExp(t.pattern()),n?t.internationalFormat():o&&t.nationalPrefixFormattingRule()?t.format().replace(Um,t.nationalPrefixFormattingRule()):t.format());return n?Gm(a):a}var Km=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function Vm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var qm={formatExtension:function(e,t,r){return"".concat(e).concat(r.ext()).concat(t)}};function Ym(e,t,r,n){if(r=r?function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Vm(e,t,r[t])}))}return e}({},qm,r):qm,n=new cm(n),e.country&&"001"!==e.country){if(!n.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));n.country(e.country)}else{if(!e.countryCallingCode)return e.phone||"";n.selectNumberingPlan(e.countryCallingCode)}var o,a=n.countryCallingCode(),i=r.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return i?Jm(o=Zm(i,e.carrierCode,"NATIONAL",n,r),e.ext,n,r.formatExtension):"";case"INTERNATIONAL":return i?(o=Zm(i,null,"INTERNATIONAL",n,r),Jm(o="+".concat(a," ").concat(o),e.ext,n,r.formatExtension)):"+".concat(a);case"E.164":return"+".concat(a).concat(i);case"RFC3966":return function(e){var t=e.number,r=e.ext;if(!t)return"";if("+"!==t[0])throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(t).concat(r?";ext="+r:"")}({number:"+".concat(a).concat(i),ext:e.ext});case"IDD":if(!r.fromCountry)return;return Jm(function(e,t,r,n,o){if(vm(n,o.metadata)===r){var a=Zm(e,t,"NATIONAL",o);return"1"===r?r+" "+a:a}var i=function(e,t,r){var n=new cm(r);return n.selectNumberingPlan(e,t),n.defaultIDDPrefix()?n.defaultIDDPrefix():Km.test(n.IDDPrefix())?n.IDDPrefix():void 0}(n,void 0,o.metadata);if(i)return"".concat(i," ").concat(r," ").concat(Zm(e,null,"INTERNATIONAL",o))}(i,e.carrierCode,a,r.fromCountry,n),e.ext,n,r.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function Zm(e,t,r,n,o){var a=function(e,t){var r=e,n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var a;if(n){if(o>=r.length)break;a=r[o++]}else{if((o=r.next()).done)break;a=o.value}var i=a;if(i.leadingDigitsPatterns().length>0){var l=i.leadingDigitsPatterns()[i.leadingDigitsPatterns().length-1];if(0!==t.search(l))continue}if(Lm(t,i.pattern()))return i}}(n.formats(),e);return a?Wm(e,a,{useInternationalFormat:"INTERNATIONAL"===r,withNationalPrefix:!a.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!o||!1!==o.nationalPrefix,carrierCode:t,metadata:n}):e}function Jm(e,t,r,n){return t?n(e,t,r):e}function Xm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var ev=function(){function e(t,r,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new TypeError("`country` or `countryCallingCode` not passed");if(!r)throw new TypeError("`nationalNumber` not passed");if(!n)throw new TypeError("`metadata` not passed");var o=new cm(n);tv(t)&&(this.country=t,o.country(t),t=o.countryCallingCode()),this.countryCallingCode=t,this.nationalNumber=r,this.number="+"+this.countryCallingCode+this.nationalNumber,this.metadata=n}var t,r,n;return t=e,(r=[{key:"setExt",value:function(e){this.ext=e}},{key:"isPossible",value:function(){return function(e,t,r){if(void 0===t&&(t={}),r=new cm(r),t.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");r.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.country(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");r.selectNumberingPlan(e.countryCallingCode)}}if(r.possibleLengths())return Fm(e.phone||e.nationalNumber,r);if(e.countryCallingCode&&r.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}(this,{v2:!0},this.metadata)}},{key:"isValid",value:function(){return function(e,t,r){return t=t||{},r=new cm(r),!!e.country&&(r.selectNumberingPlan(e.country,e.countryCallingCode),r.hasTypes()?void 0!==zm(e,t,r.metadata):Lm(t.v2?e.nationalNumber:e.phone,r.nationalNumberPattern()))}(this,{v2:!0},this.metadata)}},{key:"isNonGeographic",value:function(){return new cm(this.metadata).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return zm(this,{v2:!0},this.metadata)}},{key:"format",value:function(e,t){return Ym(this,e,t?function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Xm(e,t,r[t])}))}return e}({},t,{v2:!0}):{v2:!0},this.metadata)}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}])&&Qm(t.prototype,r),n&&Qm(t,n),e}(),tv=function(e){return/^[A-Z]{2}$/.test(e)},rv=new RegExp("([0-90-9٠-٩۰-۹])");function nv(e,t,r,n){if(t){var o=new cm(n);o.selectNumberingPlan(t,r);var a=new RegExp(o.IDDPrefix());if(0===e.search(a)){var i=(e=e.slice(e.match(a)[0].length)).match(rv);if(!(i&&null!=i[1]&&i[1].length>0&&"0"===i[1]))return e}}}function ov(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var r=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),n=r.exec(e);if(n){var o,a,i,l=n.length-1,s=l>0&&n[l];if(t.nationalPrefixTransformRule()&&s)o=e.replace(r,t.nationalPrefixTransformRule()),l>1&&(a=n[1]);else{var u=n[0];o=e.slice(u.length),s&&(a=n[1])}if(s){var d=e.indexOf(n[1]);e.slice(0,d)===t.numberingPlan.nationalPrefix()&&(i=t.numberingPlan.nationalPrefix())}else i=n[0];return{nationalNumber:o,nationalPrefix:i,carrierCode:a}}}return{nationalNumber:e}}function av(e,t){var r=ov(e,t),n=r.nationalNumber,o=r.carrierCode;if(!function(e,t,r){if(Lm(e,r.nationalNumberPattern())&&!Lm(t,r.nationalNumberPattern()))return!1;return!0}(e,n,t))return{nationalNumber:e};if(e.length!==n.length+(o?o.length:0)&&t.possibleLengths())switch(Nm(n,t)){case"TOO_SHORT":case"INVALID_LENGTH":return{nationalNumber:e}}return{nationalNumber:n,carrierCode:o}}function iv(e,t,r,n){var o=t?vm(t,n):r;if(0===e.indexOf(o)){(n=new cm(n)).selectNumberingPlan(t,r);var a=e.slice(o.length),i=av(a,n).nationalNumber,l=av(e,n).nationalNumber;if(!Lm(l,n.nationalNumberPattern())&&Lm(i,n.nationalNumberPattern())||"TOO_LONG"===Nm(l,n))return{countryCallingCode:o,number:a}}return{number:e}}function lv(e,t,r,n){if(!e)return{};if("+"!==e[0]){var o=nv(e,t,r,n);if(!o||o===e){if(t||r){var a=iv(e,t,r,n),i=a.countryCallingCode,l=a.number;if(i)return{countryCallingCode:i,number:l}}return{number:e}}e="+"+o}if("0"===e[1])return{};n=new cm(n);for(var s=2;s-1<=3&&s<=e.length;){var u=e.slice(1,s);if(n.hasCallingCode(u))return n.selectNumberingPlan(u),{countryCallingCode:u,number:e.slice(s)};s++}return{}}function sv(e,t,r){var n=r.getCountryCodesForCallingCode(e);if(n)return 1===n.length?n[0]:function(e,t,r){r=new cm(r);var n=e,o=Array.isArray(n),a=0;for(n=o?n:n[Symbol.iterator]();;){var i;if(o){if(a>=n.length)break;i=n[a++]}else{if((a=n.next()).done)break;i=a.value}var l=i;if(r.country(l),r.leadingDigits()){if(t&&0===t.search(r.leadingDigits()))return l}else if(zm({phone:t,country:l},void 0,r.metadata))return l}}(n,t,r.metadata)}var uv=new RegExp("[++0-90-9٠-٩۰-۹]"),dv=new RegExp("[^0-90-9٠-٩۰-۹#]+$");function cv(e,t,r){if(t=t||{},r=new cm(r),t.defaultCountry&&!r.hasCountry(t.defaultCountry)){if(t.v2)throw new nm("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(t.defaultCountry))}var n=function(e,t,r){if(e&&0===e.indexOf("tel:"))return function(e){var t,r,n=(e=e.replace(/^tel:/,"tel=")).split(";"),o=Array.isArray(n),a=0;for(n=o?n:n[Symbol.iterator]();;){var i;if(o){if(a>=n.length)break;i=n[a++]}else{if((a=n.next()).done)break;i=a.value}var l=Rm(i.split("="),2),s=l[0],u=l[1];switch(s){case"tel":t=u;break;case"ext":r=u;break;case"phone-context":"+"===u[0]&&(t=u+t)}}if(!km(t))return{};var d={number:t};return r&&(d.ext=r),d}(e);var n=function(e,t,r){if(!e)return;if(e.length>250){if(r)throw new nm("TOO_LONG");return}if(!1===t)return e;var n=e.search(uv);if(n<0)return;return e.slice(n).replace(dv,"")}(e,r,t);if(!n)return{};if(!km(n))return function(e){return Em.test(e)}(n)?{error:"TOO_SHORT"}:{};var o=function(e){var t=e.search(Cm);if(t<0)return{};for(var r=e.slice(0,t),n=e.match(Cm),o=1;o<n.length;){if(n[o])return{number:r,ext:n[o]};o++}}(n);if(o.ext)return o;return{number:n}}(e,t.v2,t.extract),o=n.number,a=n.ext,i=n.error;if(!o){if(t.v2){if("TOO_SHORT"===i)throw new nm("TOO_SHORT");throw new nm("NOT_A_NUMBER")}return{}}var l=function(e,t,r,n){var o,a=lv(Im(e),t,r,n.metadata),i=a.countryCallingCode,l=a.number;if(i)n.selectNumberingPlan(i);else{if(!l||!t&&!r)return{};n.selectNumberingPlan(t,r),t&&(o=t),i=r||vm(t,n.metadata)}if(!l)return{countryCallingCode:i};var s=av(Im(l),n),u=s.nationalNumber,d=s.carrierCode,c=sv(i,u,n);c&&(o=c,"001"===c||n.country(o));return{country:o,countryCallingCode:i,nationalNumber:u,carrierCode:d}}(o,t.defaultCountry,t.defaultCallingCode,r),s=l.country,u=l.nationalNumber,d=l.countryCallingCode,c=l.carrierCode;if(!r.hasSelectedNumberingPlan()){if(t.v2)throw new nm("INVALID_COUNTRY");return{}}if(!u||u.length<2){if(t.v2)throw new nm("TOO_SHORT");return{}}if(u.length>17){if(t.v2)throw new nm("TOO_LONG");return{}}if(t.v2){var f=new ev(d,u,r.metadata);return s&&(f.country=s),c&&(f.carrierCode=c),a&&(f.ext=a),f}var p=!!(t.extended?r.hasSelectedNumberingPlan():s)&&Lm(u,r.nationalNumberPattern());return t.extended?{country:s,countryCallingCode:d,carrierCode:c,valid:p,possible:!!p||!(!0!==t.extended||!r.possibleLengths()||!Fm(u,r)),phone:u,ext:a}:p?function(e,t,r){var n={country:e,phone:t};r&&(n.ext=r);return n}(s,u,a):{}}function fv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pv(e,t,r){return cv(e,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){fv(e,t,r[t])}))}return e}({},t,{v2:!0}),r)}function hv(e){return(hv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(n=(i=l.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==l.return||l.return()}finally{if(o)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function bv(e){var t,r,n,o=gv(Array.prototype.slice.call(e),4),a=o[0],i=o[1],l=o[2],s=o[3];if("string"!=typeof a)throw new TypeError("A text for parsing must be a string.");if(t=a,i&&"string"!=typeof i){if(!mv(i))throw new Error("Invalid second argument: ".concat(i));l?(r=i,n=l):n=i}else s?(r=l,n=s):(r=void 0,n=l),i&&(r=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){yv(e,t,r[t])}))}return e}({defaultCountry:i},r));return{text:t,options:r,metadata:n}}var mv=function(e){return"object"===hv(e)};function vv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $v(e,t,r){t&&t.defaultCountry&&!$m(t.defaultCountry,r)&&(t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){vv(e,t,r[t])}))}return e}({},t,{defaultCountry:void 0}));try{return pv(e,t,r)}catch(e){if(!(e instanceof nm))throw e}}function wv(){var e=bv(arguments),t=e.text,r=e.options,n=e.metadata;return $v(t,r,n)}function xv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Ov(e,t,r[t])}))}return e}function Ov(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _v(){var e=bv(arguments),t=e.text,r=e.options,n=e.metadata,o=$v(t,r=xv({},r,{extract:!1}),n);return o&&o.isValid()||!1}function Ev(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Sv=function(){function e(t){var r,n,o,a=this,i=t.onCountryChange,l=t.onCallingCodeChange;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o=function(e){for(var t=0,r=Object.keys(e);t<r.length;t++){var n=r[t];a[n]=e[n]}},(n="update")in(r=this)?Object.defineProperty(r,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[n]=o,this.onCountryChange=i,this.onCallingCodeChange=l}var t,r,n;return t=e,(r=[{key:"reset",value:function(e,t){this.international=!1,this.IDDPrefix=void 0,this.missingPlus=void 0,this.callingCode=void 0,this.digits="",this.resetNationalSignificantNumber(),this.initCountryAndCallingCode(e,t)}},{key:"resetNationalSignificantNumber",value:function(){this.nationalSignificantNumber=this.getNationalDigits(),this.nationalSignificantNumberMatchesInput=!0,this.nationalPrefix=void 0,this.carrierCode=void 0,this.complexPrefixBeforeNationalSignificantNumber=void 0}},{key:"initCountryAndCallingCode",value:function(e,t){this.setCountry(e),this.setCallingCode(t)}},{key:"setCountry",value:function(e){this.country=e,this.onCountryChange(e)}},{key:"setCallingCode",value:function(e){return this.callingCode=e,this.onCallingCodeChange(this.country,e)}},{key:"startInternationalNumber",value:function(){this.international=!0,this.initCountryAndCallingCode()}},{key:"appendDigits",value:function(e){this.digits+=e}},{key:"appendNationalSignificantNumberDigits",value:function(e){this.nationalSignificantNumber+=e}},{key:"getNationalDigits",value:function(){return this.international?this.digits.slice((this.IDDPrefix?this.IDDPrefix.length:0)+(this.callingCode?this.callingCode.length:0)):this.digits}},{key:"getDigitsWithoutInternationalPrefix",value:function(){return this.international&&this.IDDPrefix?this.digits.slice(this.IDDPrefix.length):this.digits}}])&&Ev(t.prototype,r),n&&Ev(t,n),e}(),Pv=new RegExp("x");function kv(e,t){if(t<1)return"";for(var r="";t>1;)1&t&&(r+=e),t>>=1,e+=e;return r+e}function Cv(e,t){return")"===e[t]&&t++,function(e){var t=[],r=0;for(;r<e.length;)"("===e[r]?t.push(r):")"===e[r]&&t.pop(),r++;var n=0,o="";t.push(e.length);for(var a=0,i=t;a<i.length;a++){var l=i[a];o+=e.slice(n,l),n=l+1}return o}(e.slice(0,t))}function Dv(e,t,r){var n=r.metadata,o=r.shouldTryNationalPrefixFormattingRule,a=r.getSeparatorAfterNationalPrefix;if(new RegExp("^(?:".concat(t.pattern(),")$")).test(e.nationalSignificantNumber))return function(e,t,r){var n=r.metadata,o=r.shouldTryNationalPrefixFormattingRule,a=r.getSeparatorAfterNationalPrefix;if(e.nationalSignificantNumber,e.international,e.nationalPrefix,e.carrierCode,o(t)){var i=Mv(e,t,{useNationalPrefixFormattingRule:!0,getSeparatorAfterNationalPrefix:a,metadata:n});if(i)return i}return Mv(e,t,{useNationalPrefixFormattingRule:!1,getSeparatorAfterNationalPrefix:a,metadata:n})}(e,t,{metadata:n,shouldTryNationalPrefixFormattingRule:o,getSeparatorAfterNationalPrefix:a})}function Mv(e,t,r){var n=r.metadata,o=r.useNationalPrefixFormattingRule,a=r.getSeparatorAfterNationalPrefix,i=Wm(e.nationalSignificantNumber,t,{carrierCode:e.carrierCode,useInternationalFormat:e.international,withNationalPrefix:o,metadata:n});if(o||(e.nationalPrefix?i=e.nationalPrefix+a(t)+i:e.complexPrefixBeforeNationalSignificantNumber&&(i=e.complexPrefixBeforeNationalSignificantNumber+" "+i)),function(e,t){return Am(e)===t.getNationalDigits()}(i,e))return i}function Av(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Iv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Tv(e,t,r){return t&&Iv(e.prototype,t),r&&Iv(e,r),e}var Nv=function(){function e(t){Av(this,e),this.matchTree=(new Lv).parse(t)}return Tv(e,[{key:"match",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.allowOverflow;if(!e)throw new Error("String is required");var n=jv(e.split(""),this.matchTree,!0);if(n&&n.match&&delete n.matchedChars,!n||!n.overflow||r)return n}}]),e}();function jv(e,t,r){if("string"==typeof t){if(r&&e.length>t.length)return{overflow:!0};var n=e.join("");return 0===t.indexOf(n)?e.length===t.length?{match:!0,matchedChars:e}:{partialMatch:!0}:0===n.indexOf(t)?{match:!0,matchedChars:e.slice(0,t.length)}:void 0}if(Array.isArray(t)){for(var o=e.slice(),a=0;a<t.length;){var i=jv(o,t[a],r&&a===t.length-1);if(!i)return;if(i.overflow)return i;if(!i.match){if(i.partialMatch)return{partialMatch:!0};throw new Error("Unsupported match result:\n".concat(JSON.stringify(i,null,2)))}if(0===(o=o.slice(i.matchedChars.length)).length)return a===t.length-1?{match:!0,matchedChars:e}:{partialMatch:!0};a++}return r?{overflow:!0}:{match:!0,matchedChars:e.slice(0,e.length-o.length)}}switch(t.op){case"|":var l,s=t.args,u=Array.isArray(s),d=0;for(s=u?s:s[Symbol.iterator]();;){var c;if(u){if(d>=s.length)break;c=s[d++]}else{if((d=s.next()).done)break;c=d.value}var f=jv(e,c,r);if(f){if(f.overflow)return f;if(f.match)return{match:!0,matchedChars:f.matchedChars};if(!f.partialMatch)throw new Error("Unsupported match result:\n".concat(JSON.stringify(f,null,2)));l=!0}}return l?{partialMatch:!0}:void 0;case"[]":var p=t.args,h=Array.isArray(p),y=0;for(p=h?p:p[Symbol.iterator]();;){var g;if(h){if(y>=p.length)break;g=p[y++]}else{if((y=p.next()).done)break;g=y.value}var b=g;if(e[0]===b)return 1===e.length?{match:!0,matchedChars:e}:r?{overflow:!0}:{match:!0,matchedChars:[b]}}return;default:throw new Error("Unsupported instruction tree: ".concat(t))}}var Fv=new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])"),Rv=/[\(\)\[\]\?\:\|]/,Lv=function(){function e(){Av(this,e)}return Tv(e,[{key:"parse",value:function(e){if(this.context=[{or:!0,instructions:[]}],this.parsePattern(e),1!==this.context.length)throw new Error("Non-finalized contexts left when pattern parse ended");var t=this.context[0],r=t.branches,n=t.instructions;if(r)return[{op:"|",args:r.concat([n])}];if(0===n.length)throw new Error("Pattern is required");return n}},{key:"startContext",value:function(e){this.context.push(e)}},{key:"endContext",value:function(){this.context.pop()}},{key:"getContext",value:function(){return this.context[this.context.length-1]}},{key:"parsePattern",value:function(e){if(!e)throw new Error("Pattern is required");var t=e.match(Fv);if(t){var r=t[1],n=e.slice(0,t.index),o=e.slice(t.index+r.length);switch(r){case"(?:":n&&this.parsePattern(n),this.startContext({or:!0,instructions:[],branches:[]});break;case")":if(!this.getContext().or)throw new Error('")" operator must be preceded by "(?:" operator');if(n&&this.parsePattern(n),0===this.getContext().instructions.length)throw new Error('No instructions found after "|" operator in an "or" group');var a=this.getContext().branches;a.push(this.getContext().instructions),this.endContext(),this.getContext().instructions.push({op:"|",args:a});break;case"|":if(!this.getContext().or)throw new Error('"|" operator can only be used inside "or" groups');if(n&&this.parsePattern(n),!this.getContext().branches){if(1!==this.context.length)throw new Error('"branches" not found in an "or" group context');this.getContext().branches=[]}this.getContext().branches.push(this.getContext().instructions),this.getContext().instructions=[];break;case"[":n&&this.parsePattern(n),this.startContext({oneOfSet:!0});break;case"]":if(!this.getContext().oneOfSet)throw new Error('"]" operator must be preceded by "[" operator');this.endContext(),this.getContext().instructions.push({op:"[]",args:Bv(n)});break;default:throw new Error("Unknown operator: ".concat(r))}o&&this.parsePattern(o)}else{if(Rv.test(e))throw new Error("Illegal characters found in a pattern: ".concat(e));this.getContext().instructions=this.getContext().instructions.concat(e.split(""))}}}]),e}();function Bv(e){for(var t=[],r=0;r<e.length;){if("-"===e[r]){if(0===r||r===e.length-1)throw new Error("Couldn't parse a one-of set pattern: ".concat(e));for(var n=e[r-1].charCodeAt(0)+1,o=e[r+1].charCodeAt(0)-1,a=n;a<=o;)t.push(String.fromCharCode(a)),a++}else t.push(e[r]);r++}return t}function zv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Hv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Gv=kv("9",15),Uv=/[- ]/,Wv=new RegExp("^["+om+"]*(\\$\\d["+om+"]*)+$"),Kv=function(){function e(t){var r=this;t.state;var n=t.metadata;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Hv(this,"getSeparatorAfterNationalPrefix",(function(e){return r.isNANP||e&&e.nationalPrefixFormattingRule()&&Uv.test(e.nationalPrefixFormattingRule())?" ":""})),Hv(this,"shouldTryNationalPrefixFormattingRule",(function(e,t){var r=t.international,n=t.nationalPrefix;if(e.nationalPrefixFormattingRule()){var o=e.usesNationalPrefix();if(o&&n||!o&&!r)return!0}})),this.metadata=n,this.resetFormat()}var t,r,n;return t=e,(r=[{key:"resetFormat",value:function(){this.chosenFormat=void 0,this.template=void 0,this.nationalNumberTemplate=void 0,this.populatedNationalNumberTemplate=void 0,this.populatedNationalNumberTemplatePosition=-1}},{key:"reset",value:function(e,t){this.resetFormat(),e?(this.isNANP="1"===e.callingCode(),this.matchingFormats=e.formats(),t.nationalSignificantNumber&&this.narrowDownMatchingFormats(t)):(this.isNANP=void 0,this.matchingFormats=[])}},{key:"format",value:function(e,t){var r=this;if(function(e,t){return"IS_POSSIBLE"===Nm(e,t)}(t.nationalSignificantNumber,this.metadata)){var n=this.matchingFormats,o=Array.isArray(n),a=0;for(n=o?n:n[Symbol.iterator]();;){var i;if(o){if(a>=n.length)break;i=n[a++]}else{if((a=n.next()).done)break;i=a.value}var l=i,s=Dv(t,l,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function(e){return r.shouldTryNationalPrefixFormattingRule(e,{international:t.international,nationalPrefix:t.nationalPrefix})},getSeparatorAfterNationalPrefix:this.getSeparatorAfterNationalPrefix});if(s)return this.resetFormat(),this.chosenFormat=l,this.setNationalNumberTemplate(s.replace(/\d/g,"x"),t),this.populatedNationalNumberTemplate=s,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf("x"),s}}return this.formatNationalNumberWithNextDigits(e,t)}},{key:"formatNationalNumberWithNextDigits",value:function(e,t){var r=this.chosenFormat,n=this.chooseFormat(t);if(n)return n===r?this.formatNextNationalNumberDigits(e):this.formatNextNationalNumberDigits(t.getNationalDigits())}},{key:"narrowDownMatchingFormats",value:function(e){var t=this,r=e.nationalSignificantNumber,n=e.nationalPrefix,o=e.international,a=r,i=a.length-3;i<0&&(i=0),this.matchingFormats=this.matchingFormats.filter((function(e){return t.formatSuits(e,o,n)&&t.formatMatches(e,a,i)})),this.chosenFormat&&-1===this.matchingFormats.indexOf(this.chosenFormat)&&this.resetFormat()}},{key:"formatSuits",value:function(e,t,r){return!(r&&!e.usesNationalPrefix()&&!e.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!t&&!r&&e.nationalPrefixIsMandatoryWhenFormattingInNationalFormat())}},{key:"formatMatches",value:function(e,t,r){var n=e.leadingDigitsPatterns().length;if(0===n)return!0;r=Math.min(r,n-1);var o=e.leadingDigitsPatterns()[r];if(t.length<3)try{return void 0!==new Nv(o).match(t,{allowOverflow:!0})}catch(e){return console.error(e),!0}return new RegExp("^(".concat(o,")")).test(t)}},{key:"getFormatFormat",value:function(e,t){return t?e.internationalFormat():e.format()}},{key:"chooseFormat",value:function(e){var t=this,r=function(){if(o){if(a>=n.length)return"break";i=n[a++]}else{if((a=n.next()).done)return"break";i=a.value}var r=i;return t.chosenFormat===r?"break":Wv.test(t.getFormatFormat(r,e.international))?t.createTemplateForFormat(r,e)?(t.chosenFormat=r,"break"):(t.matchingFormats=t.matchingFormats.filter((function(e){return e!==r})),"continue"):"continue"},n=this.matchingFormats.slice(),o=Array.isArray(n),a=0;e:for(n=o?n:n[Symbol.iterator]();;){var i;switch(r()){case"break":break e;case"continue":continue}}return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:"createTemplateForFormat",value:function(e,t){if(!(e.pattern().indexOf("|")>=0)){var r=this.getTemplateForFormat(e,t);return r?(this.setNationalNumberTemplate(r,t),!0):void 0}}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function(e,t){var r=e.IDDPrefix,n=e.missingPlus;return r?t&&!1===t.spacing?r:r+" ":n?"":"+"}},{key:"getTemplate",value:function(e){if(this.template){for(var t=-1,r=0,n=e.international?this.getInternationalPrefixBeforeCountryCallingCode(e,{spacing:!1}):"";r<n.length+e.getDigitsWithoutInternationalPrefix().length;)t=this.template.indexOf("x",t+1),r++;return Cv(this.template,t+1)}}},{key:"setNationalNumberTemplate",value:function(e,t){this.nationalNumberTemplate=e,this.populatedNationalNumberTemplate=e,this.populatedNationalNumberTemplatePosition=-1,t.international?this.template=this.getInternationalPrefixBeforeCountryCallingCode(t).replace(/[\d\+]/g,"x")+kv("x",t.callingCode.length)+" "+e:this.template=e}},{key:"getTemplateForFormat",value:function(e,t){var r=t.nationalSignificantNumber,n=t.international,o=t.nationalPrefix,a=t.complexPrefixBeforeNationalSignificantNumber,i=e.pattern();i=i.replace(/\[([^\[\]])*\]/g,"\\d").replace(/\d(?=[^,}][^,}])/g,"\\d");var l=Gv.match(i)[0];if(!(r.length>l.length)){var s=new RegExp("^"+i+"$"),u=r.replace(/\d/g,"9");s.test(u)&&(l=u);var d,c=this.getFormatFormat(e,n);if(this.shouldTryNationalPrefixFormattingRule(e,{international:n,nationalPrefix:o})){var f=c.replace(Um,e.nationalPrefixFormattingRule());if(Am(e.nationalPrefixFormattingRule())===(o||"")+Am("$1")&&(c=f,d=!0,o))for(var p=o.length;p>0;)c=c.replace(/\d/,"x"),p--}var h=l.replace(new RegExp(i),c).replace(new RegExp("9","g"),"x");return d||(a?h=kv("x",a.length)+" "+h:o&&(h=kv("x",o.length)+this.getSeparatorAfterNationalPrefix(e)+h)),n&&(h=Gm(h)),h}}},{key:"formatNextNationalNumberDigits",value:function(e){var t=function(e,t,r){var n=r.split(""),o=Array.isArray(n),a=0;for(n=o?n:n[Symbol.iterator]();;){var i;if(o){if(a>=n.length)break;i=n[a++]}else{if((a=n.next()).done)break;i=a.value}var l=i;if(e.slice(t+1).search(Pv)<0)return;t=e.search(Pv),e=e.replace(Pv,l)}return[e,t]}(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,e);if(t)return this.populatedNationalNumberTemplate=t[0],this.populatedNationalNumberTemplatePosition=t[1],Cv(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1);this.resetFormat()}}])&&zv(t.prototype,r),n&&zv(t,n),e}();function Vv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(n=(i=l.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==l.return||l.return()}finally{if(o)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function qv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Yv=new RegExp("^"+("["+om+"0-90-9٠-٩۰-۹]+")+"$","i"),Zv="(?:[++]["+om+"0-90-9٠-٩۰-۹]*|["+om+"0-90-9٠-٩۰-۹]+)",Jv=new RegExp("[^"+om+"0-90-9٠-٩۰-۹]+.*$"),Xv=/[^\d\[\]]/,Qv=function(){function e(t){var r=t.defaultCountry,n=t.defaultCallingCode,o=t.metadata,a=t.onNationalSignificantNumberChange;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.defaultCountry=r,this.defaultCallingCode=n,this.metadata=o,this.onNationalSignificantNumberChange=a}var t,r,n;return t=e,(r=[{key:"input",value:function(e,t){var r,n=function(e){var t=Vv(function(e){var t=function(e){var t,r=e.search(Zv);if(!(r<0))return"+"===(e=e.slice(r))[0]&&(t=!0,e=e.slice("+".length)),e=e.replace(Jv,""),t&&(e="+"+e),e}(e)||"";return"+"===t[0]?[t.slice("+".length),!0]:[t]}(e),2),r=t[0],n=t[1];return Yv.test(r)||(r=""),[r,n]}(e),o=Vv(n,2),a=o[0],i=o[1],l=Am(a);return i&&(t.digits||(t.startInternationalNumber(),l||(r=!0))),l&&this.inputDigits(l,t),{digits:l,justLeadingPlus:r}}},{key:"inputDigits",value:function(e,t){var r=t.digits,n=r.length<3&&r.length+e.length>=3;if(t.appendDigits(e),n&&this.extractIddPrefix(t),this.isWaitingForCountryCallingCode(t)){if(!this.extractCountryCallingCode(t))return}else t.appendNationalSignificantNumberDigits(e);t.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(t.getNationalDigits(),t.update)}},{key:"isWaitingForCountryCallingCode",value:function(e){var t=e.international,r=e.callingCode;return t&&!r}},{key:"extractCountryCallingCode",value:function(e){var t=lv("+"+e.getDigitsWithoutInternationalPrefix(),this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),r=t.countryCallingCode,n=t.number;if(r)return e.setCallingCode(r),e.update({nationalSignificantNumber:n}),!0}},{key:"reset",value:function(e){if(e){this.hasSelectedNumberingPlan=!0;var t=e._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=t&&Xv.test(t)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(e,t){if(this.hasSelectedNumberingPlan){var r=ov(e,this.metadata),n=r.nationalPrefix,o=r.nationalNumber,a=r.carrierCode;if(o!==e)return this.onExtractedNationalNumber(n,a,o,e,t),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(e,t,r){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(e,r);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var n=ov(e,this.metadata),o=n.nationalPrefix,a=n.nationalNumber,i=n.carrierCode;if(a!==t)return this.onExtractedNationalNumber(o,i,a,e,r),!0}}},{key:"onExtractedNationalNumber",value:function(e,t,r,n,o){var a,i,l=n.lastIndexOf(r);if(l>=0&&l===n.length-r.length){i=!0;var s=n.slice(0,l);s!==e&&(a=s)}o({nationalPrefix:e,carrierCode:t,nationalSignificantNumber:r,nationalSignificantNumberMatchesInput:i,complexPrefixBeforeNationalSignificantNumber:a}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function(e){return!!this.extractAnotherNationalSignificantNumber(e.getNationalDigits(),e.nationalSignificantNumber,e.update)||(this.extractIddPrefix(e)||this.fixMissingPlus(e)?(this.extractCallingCodeAndNationalSignificantNumber(e),!0):void 0)}},{key:"extractIddPrefix",value:function(e){var t=e.international,r=e.IDDPrefix,n=e.digits;if(e.nationalSignificantNumber,!t&&!r){var o=nv(n,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);return void 0!==o&&o!==n?(e.update({IDDPrefix:n.slice(0,n.length-o.length)}),this.startInternationalNumber(e),!0):void 0}}},{key:"fixMissingPlus",value:function(e){if(!e.international){var t=iv(e.digits,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),r=t.countryCallingCode;if(t.number,r)return e.update({missingPlus:!0}),this.startInternationalNumber(e),!0}}},{key:"startInternationalNumber",value:function(e){e.startInternationalNumber(),e.nationalSignificantNumber&&(e.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function(e){this.extractCountryCallingCode(e)&&this.extractNationalSignificantNumber(e.getNationalDigits(),e.update)}}])&&qv(t.prototype,r),n&&qv(t,n),e}();function e$(e){return(e$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function t$(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(n=(i=l.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==l.return||l.return()}finally{if(o)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function r$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var n$=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.metadata=new cm(r);var n=t$(this.getCountryAndCallingCode(t),2),o=n[0],a=n[1];this.defaultCountry=o,this.defaultCallingCode=a,this.reset()}var t,r,n;return t=e,(r=[{key:"getCountryAndCallingCode",value:function(e){var t,r;return e&&("object"===e$(e)?(t=e.defaultCountry,r=e.defaultCallingCode):t=e),t&&!this.metadata.hasCountry(t)&&(t=void 0),[t,r]}},{key:"input",value:function(e){var t=this.parser.input(e,this.state),r=t.digits;if(t.justLeadingPlus)this.formattedOutput="+";else if(r){var n;if(this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state),this.metadata.hasSelectedNumberingPlan()&&(n=this.formatter.format(r,this.state)),void 0===n&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var o=this.state.getNationalDigits();o&&(n=this.formatter.format(o,this.state))}this.formattedOutput=n?this.getFullNumber(n):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function(){var e=this;return this.state=new Sv({onCountryChange:function(t){e.country=t},onCallingCodeChange:function(t,r){e.metadata.selectNumberingPlan(t,r),e.formatter.reset(e.metadata.numberingPlan,e.state),e.parser.reset(e.metadata.numberingPlan)}}),this.formatter=new Kv({state:this.state,metadata:this.metadata}),this.parser=new Qv({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function(){e.determineTheCountryIfNeeded(),e.formatter.reset(e.metadata.numberingPlan,e.state)}}),this.state.reset(this.defaultCountry,this.defaultCallingCode),this.formattedOutput="",this}},{key:"isInternational",value:function(){return this.state.international}},{key:"getCallingCode",value:function(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function(){return this.getCallingCode()}},{key:"getCountry",value:function(){if(this.state.digits)return this._getCountry()}},{key:"_getCountry",value:function(){return this.state.country}},{key:"determineTheCountryIfNeeded",value:function(){this.state.country&&!this.isCountryCallingCodeAmbiguous()||this.determineTheCountry()}},{key:"getFullNumber",value:function(e){var t=this;if(this.isInternational()){var r=function(e){return t.formatter.getInternationalPrefixBeforeCountryCallingCode(t.state,{spacing:!!e})+e},n=this.state.callingCode;return r(n?e?"".concat(n," ").concat(e):n:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return e}},{key:"getNonFormattedNationalNumberWithPrefix",value:function(){var e=this.state,t=e.nationalSignificantNumber,r=e.complexPrefixBeforeNationalSignificantNumber,n=e.nationalPrefix,o=t,a=r||n;return a&&(o=a+o),o}},{key:"getNonFormattedNumber",value:function(){var e=this.state.nationalSignificantNumberMatchesInput;return this.getFullNumber(e?this.getNonFormattedNationalNumberWithPrefix():this.state.getNationalDigits())}},{key:"getNonFormattedTemplate",value:function(){var e=this.getNonFormattedNumber();if(e)return e.replace(/[\+\d]/g,"x")}},{key:"isCountryCallingCodeAmbiguous",value:function(){var e=this.state.callingCode,t=this.metadata.getCountryCodesForCallingCode(e);return t&&t.length>1}},{key:"determineTheCountry",value:function(){this.state.setCountry(sv(this.isInternational()?this.state.callingCode:this.defaultCallingCode,this.state.nationalSignificantNumber,this.metadata))}},{key:"getNumberValue",value:function(){var e=this.state,t=e.digits,r=e.callingCode,n=e.country,o=e.nationalSignificantNumber;if(t)return this.isInternational()?r?"+"+r+o:"+"+t:n||r?"+"+(n?this.metadata.countryCallingCode():r)+o:void 0}},{key:"getNumber",value:function(){var e=this.state,t=e.nationalSignificantNumber,r=e.carrierCode,n=e.callingCode,o=this._getCountry();if(t&&(o||n)){var a=new ev(o||n,t,this.metadata.metadata);return r&&(a.carrierCode=r),a}}},{key:"isPossible",value:function(){var e=this.getNumber();return!!e&&e.isPossible()}},{key:"isValid",value:function(){var e=this.getNumber();return!!e&&e.isValid()}},{key:"getNationalNumber",value:function(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}])&&r$(t.prototype,r),n&&r$(t,n),e}();function o$(e){return new cm(e).getCountries()}function a$(e){var t=e.country,r=e.international,n=e.withCountryCallingCode,o=e.metadata;return t&&r&&!n?"+".concat(vm(t,o)):""}function i$(e,t){return t&&" "===(e=e.slice(t.length))[0]&&(e=e.slice(1)),e}function l$(){return(l$=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function s$(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var u$=function(e){function r(e,r){var n=e.country,o=e.international,a=e.withCountryCallingCode,i=e.metadata,l=s$(e,["country","international","withCountryCallingCode","metadata"]),s=t.useCallback((function(e){var t=new n$(n,i),r=a$({country:n,international:o,withCountryCallingCode:a,metadata:i}),l=t.input(r+e),s=t.getTemplate();return r&&(l=i$(l,r),s&&(s=i$(s,r))),{text:l,template:s}}),[n,i]);return u.default.createElement(tm,l$({},l,{ref:r,parse:Tm,format:s}))}return(r=u.default.forwardRef(r)).propTypes={value:js.string.isRequired,onChange:js.func.isRequired,country:js.string,international:js.bool,withCountryCallingCode:js.bool,metadata:js.object.isRequired},r.defaultProps={metadata:e},r}();function d$(){return(d$=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function c$(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var f$=function(e){function r(e,r){var n=e.value,o=e.onChange,a=e.country,i=e.international,l=e.withCountryCallingCode,s=e.metadata,d=e.inputComponent,c=c$(e,["value","onChange","country","international","withCountryCallingCode","metadata","inputComponent"]),f=a$({country:a,international:i,withCountryCallingCode:l,metadata:s}),p=t.useCallback((function(e){var t=Im(e.target.value);t===n&&(0===p$(f,t,a,s).indexOf(e.target.value)&&(t=t.slice(0,-1)));o(t)}),[f,n,o,a,s]);return u.default.createElement(d,d$({},c,{ref:r,value:p$(f,n,a,s),onChange:p}))}return(r=u.default.forwardRef(r)).propTypes={value:js.string.isRequired,onChange:js.func.isRequired,country:js.string,international:js.bool,withCountryCallingCode:js.bool,metadata:js.object.isRequired,inputComponent:js.elementType.isRequired},r.defaultProps={metadata:e,inputComponent:"input"},r}();function p$(e,t,r,n){return i$(function(e,t,r){return r||(r=t,t=void 0),new n$(t,r).input(e)}(e+t,r,n),e)}function h$(e){return String.fromCodePoint(127397+e.toUpperCase().charCodeAt(0))}function y$(){return(y$=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function g$(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function b$(e){var r=e.value,n=e.onChange,o=e.options,a=g$(e,["value","onChange","options"]),i=t.useCallback((function(e){var t=e.target.value;n("ZZ"===t?void 0:t)}),[n]);return t.useMemo((function(){return $$(o,r)}),[o,r]),u.default.createElement("select",y$({},a,{value:r||"ZZ",onChange:i}),o.map((function(e){var t=e.value,r=e.label,n=e.divider;return u.default.createElement("option",{key:n?"|":t||"ZZ",value:n?"|":t||"ZZ",disabled:!!n,style:n?m$:void 0},r)})))}b$.propTypes={value:js.string,onChange:js.func.isRequired,options:js.arrayOf(js.shape({value:js.string,label:js.string,divider:js.bool})).isRequired};var m$={fontSize:"1px",backgroundColor:"currentColor",color:"inherit"};function v$(e){var r=e.value,n=e.options,o=e.className,a=e.iconComponent;e.getIconAspectRatio;var i=e.arrowComponent,l=e.unicodeFlags,s=g$(e,["value","options","className","iconComponent","getIconAspectRatio","arrowComponent","unicodeFlags"]),d=t.useMemo((function(){return $$(n,r)}),[n,r]);return u.default.createElement("div",{className:"PhoneInputCountry"},u.default.createElement(b$,y$({},s,{value:r,options:n,className:Hb("PhoneInputCountrySelect",o)})),l&&r&&u.default.createElement("div",{className:"PhoneInputCountryIconUnicode"},function(e){return h$(e[0])+h$(e[1])}(r)),!(l&&r)&&u.default.createElement(a,{country:r,label:d&&d.label,aspectRatio:l?1:void 0}),u.default.createElement(i,null))}function $$(e,t){var r=e,n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var a;if(n){if(o>=r.length)break;a=r[o++]}else{if((o=r.next()).done)break;a=o.value}var i=a;if(!i.divider&&i.value===t)return i}}function w$(){return(w$=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function x$(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function O$(e){var t=e.country,r=e.countryName,n=e.flags,o=e.flagUrl,a=x$(e,["country","countryName","flags","flagUrl"]);return n&&n[t]?n[t]({title:r}):u.default.createElement("img",w$({},a,{alt:r,role:r?void 0:"presentation",src:o.replace("{XX}",t).replace("{xx}",t.toLowerCase())}))}function _$(){return(_$=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function E$(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function S$(e){var t=e.aspectRatio,r=E$(e,["aspectRatio"]);return 1===t?u.default.createElement(k$,r):u.default.createElement(P$,r)}function P$(e){var t=e.title,r=E$(e,["title"]);return u.default.createElement("svg",_$({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 75 50"}),u.default.createElement("title",null,t),u.default.createElement("g",{className:"PhoneInputInternationalIconGlobe",stroke:"currentColor",fill:"none",strokeWidth:"2",strokeMiterlimit:"10"},u.default.createElement("path",{strokeLinecap:"round",d:"M47.2,36.1C48.1,36,49,36,50,36c7.4,0,14,1.7,18.5,4.3"}),u.default.createElement("path",{d:"M68.6,9.6C64.2,12.3,57.5,14,50,14c-7.4,0-14-1.7-18.5-4.3"}),u.default.createElement("line",{x1:"26",y1:"25",x2:"74",y2:"25"}),u.default.createElement("line",{x1:"50",y1:"1",x2:"50",y2:"49"}),u.default.createElement("path",{strokeLinecap:"round",d:"M46.3,48.7c1.2,0.2,2.5,0.3,3.7,0.3c13.3,0,24-10.7,24-24S63.3,1,50,1S26,11.7,26,25c0,2,0.3,3.9,0.7,5.8"}),u.default.createElement("path",{strokeLinecap:"round",d:"M46.8,48.2c1,0.6,2.1,0.8,3.2,0.8c6.6,0,12-10.7,12-24S56.6,1,50,1S38,11.7,38,25c0,1.4,0.1,2.7,0.2,4c0,0.1,0,0.2,0,0.2"})),u.default.createElement("path",{className:"PhoneInputInternationalIconPhone",stroke:"none",fill:"currentColor",d:"M12.4,17.9c2.9-2.9,5.4-4.8,0.3-11.2S4.1,5.2,1.3,8.1C-2,11.4,1.1,23.5,13.1,35.6s24.3,15.2,27.5,11.9c2.8-2.8,7.8-6.3,1.4-11.5s-8.3-2.6-11.2,0.3c-2,2-7.2-2.2-11.7-6.7S10.4,19.9,12.4,17.9z"}))}function k$(e){var t=e.title,r=E$(e,["title"]);return u.default.createElement("svg",_$({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50"}),u.default.createElement("title",null,t),u.default.createElement("g",{className:"PhoneInputInternationalIconGlobe",stroke:"currentColor",fill:"none",strokeWidth:"2",strokeLinecap:"round"},u.default.createElement("path",{d:"M8.45,13A21.44,21.44,0,1,1,37.08,41.56"}),u.default.createElement("path",{d:"M19.36,35.47a36.9,36.9,0,0,1-2.28-13.24C17.08,10.39,21.88.85,27.8.85s10.72,9.54,10.72,21.38c0,6.48-1.44,12.28-3.71,16.21"}),u.default.createElement("path",{d:"M17.41,33.4A39,39,0,0,1,27.8,32.06c6.62,0,12.55,1.5,16.48,3.86"}),u.default.createElement("path",{d:"M44.29,8.53c-3.93,2.37-9.86,3.88-16.49,3.88S15.25,10.9,11.31,8.54"}),u.default.createElement("line",{x1:"27.8",y1:"0.85",x2:"27.8",y2:"34.61"}),u.default.createElement("line",{x1:"15.2",y1:"22.23",x2:"49.15",y2:"22.23"})),u.default.createElement("path",{className:"PhoneInputInternationalIconPhone",stroke:"transparent",fill:"currentColor",d:"M9.42,26.64c2.22-2.22,4.15-3.59.22-8.49S3.08,17,.93,19.17c-2.49,2.48-.13,11.74,9,20.89s18.41,11.5,20.89,9c2.15-2.15,5.91-4.77,1-8.71s-6.27-2-8.49.22c-1.55,1.55-5.48-1.69-8.86-5.08S7.87,28.19,9.42,26.64Z"}))}function C$(e,t){return!!$m(e,t)||(console.error("Country not found: ".concat(e)),!1)}function D$(e,t){return e&&0===(e=e.filter((function(e){return C$(e,t)}))).length&&(e=void 0),e}function M$(e){var t=e.flags,r=e.flagUrl,n=e.flagComponent,o=e.internationalIcon;function a(e){var a=e.country,i=e.label,l=e.aspectRatio,s=o===S$?l:void 0;return u.default.createElement("div",{className:Hb("PhoneInputCountryIcon",{"PhoneInputCountryIcon--square":1===s,"PhoneInputCountryIcon--border":a})},a?u.default.createElement(n,{country:a,countryName:i,flags:t,flagUrl:r,className:"PhoneInputCountryIconImg"}):u.default.createElement(o,{title:i,aspectRatio:s,className:"PhoneInputCountryIconImg"}))}return a.propTypes={country:js.string,label:js.string.isRequired,aspectRatio:js.number},a}v$.propTypes={iconComponent:js.elementType,arrowComponent:js.elementType.isRequired,unicodeFlags:js.bool},v$.defaultProps={arrowComponent:function(){return u.default.createElement("div",{className:"PhoneInputCountrySelectArrow"})}},O$.propTypes={country:js.string.isRequired,countryName:js.string.isRequired,flags:js.objectOf(js.elementType),flagUrl:js.string.isRequired},S$.propTypes={title:js.string.isRequired,aspectRatio:js.number},P$.propTypes={title:js.string.isRequired},k$.propTypes={title:js.string.isRequired},M$({flagUrl:"https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",flagComponent:O$,internationalIcon:S$});var A$=js.shape({country_calling_codes:js.object.isRequired,countries:js.object.isRequired}),I$=js.objectOf(js.string),T$=/^\d+$/;function N$(e,t){var r="+"+vm(e,t);return(t=new cm(t)).selectNumberingPlan(e),t.numberingPlan.leadingDigits()&&T$.test(t.numberingPlan.leadingDigits())&&(r+=t.numberingPlan.leadingDigits()),r}function j$(e,t){return wv(e||"",t)}function F$(e,t){var r=t.prevCountry,n=t.newCountry,o=t.metadata,a=t.useNationalFormat;if(r===n)return e;if(!e)return a?"":N$(n,o);if(n){if("+"===e[0]){if(a)return 0===e.indexOf("+"+vm(n,o))?function(e,t,r){if(t){var n="+"+vm(t,r);if(e.length<n.length){if(0===n.indexOf(e))return""}else if(0===e.indexOf(n))return e.slice(n.length)}for(var o=0,a=Object.keys(r.country_calling_codes);o<a.length;o++){var i=a[o];if(e.indexOf(i)==="+".length)return e.slice("+".length+i.length)}return""}(e,n,o):"";if(r){var i=N$(n,o);return 0===e.indexOf(i)?e:i}var l=N$(n,o);return 0===e.indexOf(l)?e:l}}else if("+"!==e[0])return R$(e,r,o)||"";return e}function R$(e,t,r){if(e){if("+"===e[0]){if("+"===e)return;var n=new n$(t,r);return n.input(e),n.getNumberValue()}if(t){var o=G$(e,t,r);return"+".concat(vm(t,r)).concat(o||"")}}}function L$(e,t,r){var n=G$(e,t,r);if(n){var o=n.length-function(e,t){return(t=new cm(t)).selectNumberingPlan(e),t.numberingPlan.possibleLengths()[t.numberingPlan.possibleLengths().length-1]}(t,r);if(o>0)return e.slice(0,e.length-o)}return e}function B$(e,t){var r=t.country,n=t.countries,o=t.required,a=t.metadata;if("+"===e)return r;var i=function(e,t){var r=new n$(null,t);return r.input(e),r.getCountry()}(e,a);return i&&(!n||n.indexOf(i)>=0)?i:!r||o||U$(e,r,a)?r:void 0}function z$(e,t,r){if(0===e.indexOf(N$(t,r))){var n=new n$(t,r);n.input(e);var o=n.getNumber();return o?o.formatNational().replace(/\D/g,""):""}return e.replace(/\D/g,"")}function H$(e,t,r){return String.prototype.localeCompare?e.localeCompare(t,r):e<t?-1:e>t?1:0}function G$(e,t,r){var n=new n$(t,r);n.input(e);var o=n.getNumber();return o&&o.nationalNumber}function U$(e,t,r){for(var n=N$(t,r),o=0;o<e.length&&o<n.length;){if(e[o]!==n[o])return!1;o++}return!0}function W$(e){var t=e.value,r=e.phoneNumber,n=e.defaultCountry,o=e.international,a=e.useNationalFormat,i=e.metadata;return(!1===o||a)&&r&&r.country?function(e){return e.formatNational().replace(/\D/g,"")}(r):!t&&o&&n?N$(n,i):t}function K$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function V$(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?K$(Object(r),!0).forEach((function(t){q$(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K$(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function q$(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Y$(e){return(Y$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Z$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function J$(){return(J$=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function X$(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Q$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ew(e){return(ew=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tw(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rw(e,t){return(rw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nw(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ow=function(e){function t(e){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=function(e,t){return!t||"object"!==Y$(t)&&"function"!=typeof t?tw(e):t}(this,ew(t).call(this,e)),nw(tw(r),"inputRef",u.default.createRef()),nw(tw(r),"setInputRef",(function(e){r.inputRef.current=e;var t=r.props.inputRef;t&&("function"==typeof t?t(e):t.current=e)})),nw(tw(r),"isCountrySupportedWithError",(function(e){return C$(e,r.props.metadata)})),nw(tw(r),"onCountryChange",(function(e){var t=r.props,n=t.international,o=t.metadata,a=t.onChange,i=t.focusInputOnCountrySelection,l=r.state,s=F$(l.phoneDigits,{prevCountry:l.country,newCountry:e,metadata:o,useNationalFormat:!n}),u=R$(s,e,o);i&&r.inputRef.current.focus(),r.setState({country:e,hasUserSelectedACountry:!0,phoneDigits:s,value:u},(function(){a(u)}))})),nw(tw(r),"onChange",(function(e){var t=r.props,n=t.defaultCountry,o=t.onChange,a=t.addInternationalOption,i=t.international,l=t.limitMaxLength,s=t.countryCallingCodeEditable,u=t.metadata,d=r.state,c=d.countries,f=function(e,t){var r,n=t.prevPhoneDigits,o=t.country,a=t.defaultCountry,i=t.countryRequired,l=t.getAnyCountry,s=t.countries,u=t.international,d=t.limitMaxLength,c=t.countryCallingCodeEditable,f=t.metadata;if(u&&!1===c){var p,h=N$(o,f);if(0!==e.indexOf(h))return e&&"+"!==e[0]?p=R$(e=h+e,o,f):e=h,{phoneDigits:e,value:p,country:o}}return!1===u&&o&&e&&"+"===e[0]&&(e=z$(e,o,f)),e&&o&&d&&(e=L$(e,o,f)),!e||"+"===e[0]||o&&!u||(e="+"+e),!e&&n&&"+"===n[0]&&(o=u?void 0:a),"+"===e&&n&&"+"===n[0]&&n.length>"+".length&&(o=void 0),e&&(r="+"===e[0]&&("+"===e||o&&0===N$(o,f).indexOf(e))?void 0:R$(e,o,f)),r&&(o=B$(r,{country:o,countries:s,metadata:f}),!1===u&&o&&e&&"+"===e[0]&&(r=R$(e=z$(e,o,f),o,f))),!o&&i&&(o=a||l()),{phoneDigits:e,country:o,value:r}}(e,{prevPhoneDigits:d.phoneDigits,country:d.country,countryRequired:!a,defaultCountry:n,getAnyCountry:function(){return r.getFirstSupportedCountry({countries:c})},countries:c,international:i,limitMaxLength:l,countryCallingCodeEditable:s,metadata:u}),p=f.phoneDigits,h=f.country,y=f.value,g={phoneDigits:p,value:y,country:h};!1===s&&(y||p!==r.state.phoneDigits||(g.forceRerender={})),r.setState(g,(function(){return o(y)}))})),nw(tw(r),"_onFocus",(function(){return r.setState({isFocused:!0})})),nw(tw(r),"_onBlur",(function(){return r.setState({isFocused:!1})})),nw(tw(r),"onFocus",(function(e){r._onFocus();var t=r.props.onFocus;t&&t(e)})),nw(tw(r),"onBlur",(function(e){var t=r.props.onBlur;r._onBlur(),t&&t(e)})),nw(tw(r),"onCountryFocus",(function(e){r._onFocus();var t=r.props.countrySelectProps;if(t){var n=t.onFocus;n&&n(e)}})),nw(tw(r),"onCountryBlur",(function(e){r._onBlur();var t=r.props.countrySelectProps;if(t){var n=t.onBlur;n&&n(e)}}));var n=r.props,o=n.value;n.labels;var a=n.international,i=n.addInternationalOption,l=n.displayInitialValueAsLocalNumber,s=n.initialValueFormat,d=n.metadata,c=r.props,f=c.defaultCountry,p=c.countries;f&&(r.isCountrySupportedWithError(f)||(f=void 0)),p=D$(p,d);var h=j$(o,d);r.CountryIcon=M$(r.props);var y=function(e){var t,r=e.value,n=e.phoneNumber,o=e.defaultCountry,a=e.getAnyCountry,i=e.countries,l=e.required,s=e.metadata;return n&&n.country?t=n.country:o&&(r&&!U$(r,o,s)||(t=o)),i&&i.indexOf(t)<0&&(t=void 0),!t&&l&&i&&i.length>0&&(t=a()),t}({value:o,phoneNumber:h,defaultCountry:f,required:!i,countries:p||o$(d),getAnyCountry:function(){return r.getFirstSupportedCountry({countries:p})},metadata:d});return r.state={props:r.props,country:y,countries:p,phoneDigits:W$({value:o,phoneNumber:h,defaultCountry:f,international:a,useNationalFormat:l||"national"===s,metadata:d}),value:o},r}var r,n,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rw(e,t)}(t,u["default"].PureComponent),r=t,o=[{key:"getDerivedStateFromProps",value:function(e,t){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Z$(Object(r),!0).forEach((function(t){nw(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z$(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({props:e},function(e,t,r){var n=e.metadata,o=e.countries,a=e.defaultCountry,i=e.value,l=e.reset,s=e.international,u=e.displayInitialValueAsLocalNumber,d=e.initialValueFormat,c=t.defaultCountry,f=t.value,p=t.reset;r.country;var h=r.value,y=r.hasUserSelectedACountry,g=function(e){return W$(V$({},e,{international:s,useNationalFormat:u||"national"===d,metadata:n}))};if(l!==p)return{phoneDigits:g({value:void 0,defaultCountry:a}),value:void 0,country:a,hasUserSelectedACountry:void 0};if(a!==c){var b=!a||C$(a,n),m=!h||s&&h===g({value:void 0,defaultCountry:c});if(!y&&b&&!i&&m)return{country:a,phoneDigits:g({value:void 0,defaultCountry:a}),value:void 0}}if(i!==f&&i!==h){var v,$,w;if(i){v=j$(i,n);var x=D$(o,n);v&&v.country?(!x||x.indexOf(v.country)>=0)&&($=v.country):$=B$(i,{country:void 0,countries:x,metadata:n})}return i||(w={hasUserSelectedACountry:void 0}),V$({},w,{phoneDigits:g({phoneNumber:v,value:i,defaultCountry:a}),value:i,country:i?$:a})}}(e,t.props,t))}}],(n=[{key:"componentDidMount",value:function(){var e=this.props.onCountryChange,t=this.props.defaultCountry,r=this.state.country;e&&(t&&(this.isCountrySupportedWithError(t)||(t=void 0)),r!==t&&e(r))}},{key:"componentDidUpdate",value:function(e,t){var r=this.props.onCountryChange,n=this.state.country;r&&n!==t.country&&r(n)}},{key:"getCountrySelectOptions",value:function(e){var t,r,n=e.countries,o=this.props,a=o.international,i=o.countryCallingCodeEditable,l=o.countryOptionsOrder,s=o.addInternationalOption,u=o.labels,d=o.locales,c=o.metadata;return t=function(){return function(e,t){if(!t)return e;var r=[],n=[],o=r,a=t,i=Array.isArray(a),l=0;for(a=i?a:a[Symbol.iterator]();;){var s;if(i){if(l>=a.length)break;s=a[l++]}else{if((l=a.next()).done)break;s=l.value}var u=s;"|"===u?o.push({divider:!0}):"..."===u||"…"===u?o=n:function(){var t=void 0;t="🌐"===u?void 0:u;var r=e.indexOf(e.filter((function(e){return e.value===t}))[0]),n=e[r];e.splice(r,1),o.push(n)}()}return r.concat(e).concat(n)}(function(e){var t=e.countries,r=e.countryNames,n=e.addInternationalOption,o=e.compareStringsLocales,a=e.compareStrings;a||(a=H$);var i=t.map((function(e){return{value:e,label:r[e]||e}}));return i.sort((function(e,t){return a(e.label,t.label,o)})),n&&i.unshift({label:r.ZZ}),i}({countries:n||o$(c),countryNames:u,addInternationalOption:(!a||!1!==i)&&s,compareStringsLocales:d}),function(e,t){if(e&&(e=e.filter((function(e){switch(e){case"🌐":case"|":case"...":case"…":return!0;default:return C$(e,t)}}))).length>0)return e}(l,c))},r=[n,l,s,u,c],lw&&function(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;){if(e[r]!==t[r])return!1;r++}return!0}(r,lw)||(iw=t(),lw=r),iw}},{key:"getFirstSupportedCountry",value:function(e){var t=e.countries;return this.getCountrySelectOptions({countries:t})[0].value}},{key:"render",value:function(){var e=this.props,t=e.name,r=e.disabled,n=e.autoComplete,o=e.style,a=e.className;e.inputRef;var i=e.inputComponent,l=e.numberInputProps,s=e.smartCaret,d=e.countrySelectComponent,c=e.countrySelectProps,f=e.containerComponent;e.defaultCountry,e.countries,e.countryOptionsOrder;var p=e.labels;e.flags,e.flagComponent,e.flagUrl,e.addInternationalOption,e.internationalIcon,e.displayInitialValueAsLocalNumber,e.initialValueFormat,e.onCountryChange,e.limitMaxLength,e.countryCallingCodeEditable,e.focusInputOnCountrySelection,e.reset;var h=e.metadata;e.international,e.locales;var y=X$(e,["name","disabled","autoComplete","style","className","inputRef","inputComponent","numberInputProps","smartCaret","countrySelectComponent","countrySelectProps","containerComponent","defaultCountry","countries","countryOptionsOrder","labels","flags","flagComponent","flagUrl","addInternationalOption","internationalIcon","displayInitialValueAsLocalNumber","initialValueFormat","onCountryChange","limitMaxLength","countryCallingCodeEditable","focusInputOnCountrySelection","reset","metadata","international","locales"]),g=this.state,b=g.country,m=g.countries,v=g.phoneDigits,$=g.isFocused,w=s?u$:f$,x=this.getCountrySelectOptions({countries:m});return u.default.createElement(f,{style:o,className:Hb(a,"PhoneInput",{"PhoneInput--focus":$})},u.default.createElement(d,J$({name:t?"".concat(t,"Country"):void 0,"aria-label":p.country},c,{value:b,options:x,onChange:this.onCountryChange,onFocus:this.onCountryFocus,onBlur:this.onCountryBlur,disabled:r||c&&c.disabled,iconComponent:this.CountryIcon})),u.default.createElement(w,J$({ref:this.setInputRef,type:"tel",autoComplete:n},l,y,{name:t,metadata:h,country:b,value:v||"",onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,disabled:r,inputComponent:i,className:Hb("PhoneInputInput",l&&l.className,y.className)})))}}])&&Q$(r.prototype,n),o&&Q$(r,o),t}(),aw=u.default.forwardRef((function(e,t){return u.default.createElement(ow,J$({},e,{inputRef:t}))}));aw.propTypes={value:js.string,onChange:js.func.isRequired,onFocus:js.func,onBlur:js.func,disabled:js.bool,autoComplete:js.string.isRequired,initialValueFormat:js.oneOf(["national"]),displayInitialValueAsLocalNumber:js.bool,defaultCountry:js.string,countries:js.arrayOf(js.string),labels:I$.isRequired,locales:js.oneOfType([js.string,js.arrayOf(js.string)]),flagUrl:js.string.isRequired,flags:js.objectOf(js.elementType),flagComponent:js.elementType.isRequired,addInternationalOption:js.bool.isRequired,internationalIcon:js.elementType.isRequired,countryOptionsOrder:js.arrayOf(js.string),style:js.object,className:js.string,countrySelectComponent:js.elementType.isRequired,countrySelectProps:js.object,inputComponent:js.elementType.isRequired,containerComponent:js.elementType.isRequired,numberInputProps:js.object,smartCaret:js.bool.isRequired,international:js.bool,limitMaxLength:js.bool.isRequired,countryCallingCodeEditable:js.bool.isRequired,metadata:A$.isRequired,onCountryChange:js.func,focusInputOnCountrySelection:js.bool.isRequired},aw.defaultProps={autoComplete:"tel",countrySelectComponent:v$,flagComponent:O$,flagUrl:"https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",internationalIcon:S$,inputComponent:"input",containerComponent:"div",reset:js.any,smartCaret:!0,addInternationalOption:!0,limitMaxLength:!1,countryCallingCodeEditable:!0,focusInputOnCountrySelection:!0};var iw,lw,sw=aw;function uw(e){return(uw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dw(e,t,r){if(r||"object"===uw(t)&&(r=t,t="NATIONAL"),!e)return"";var n=wv(e,r);if(!n)return"";switch(t){case"National":t="NATIONAL";break;case"International":t="INTERNATIONAL"}return n.format(t)}function cw(e,t){return dw(e,"INTERNATIONAL",t)}var fw={ext:"ext.",country:"Phone number country",phone:"Phone",AB:"Abkhazia",AC:"Ascension Island",AD:"Andorra",AE:"United Arab Emirates",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AQ:"Antarctica",AR:"Argentina",AS:"American Samoa",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei Darussalam",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius and Saba",BR:"Brazil",BS:"Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CC:"Cocos (Keeling) Islands",CD:"Congo, Democratic Republic of the",CF:"Central African Republic",CG:"Congo",CH:"Switzerland",CI:"Cote d'Ivoire",CK:"Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cape Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands",FM:"Federated States of Micronesia",FO:"Faroe Islands",FR:"France",GA:"Gabon",GB:"United Kingdom",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GS:"South Georgia and the South Sandwich Islands",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HM:"Heard Island and McDonald Islands",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IL:"Israel",IM:"Isle of Man",IN:"India",IO:"British Indian Ocean Territory",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KM:"Comoros",KN:"Saint Kitts and Nevis",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KY:"Cayman Islands",KZ:"Kazakhstan",LA:"Laos",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MF:"Saint Martin (French Part)",MG:"Madagascar",MH:"Marshall Islands",MK:"North Macedonia",ML:"Mali",MM:"Burma",MN:"Mongolia",MO:"Macao",MP:"Northern Mariana Islands",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",OS:"South Ossetia",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PS:"Palestine",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Reunion",RO:"Romania",RS:"Serbia",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SX:"Sint Maarten",SY:"Syria",SZ:"Swaziland",TA:"Tristan da Cunha",TC:"Turks and Caicos Islands",TD:"Chad",TF:"French Southern Territories",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania",UA:"Ukraine",UG:"Uganda",UM:"United States Minor Outlying Islands",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VA:"Holy See (Vatican City State)",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"Virgin Islands, British",VI:"Virgin Islands, U.S.",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",XK:"Kosovo",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe",ZZ:"International"};function pw(){return(pw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function hw(e){var t=u.default.forwardRef((function(e,t){return u.default.createElement(sw,pw({ref:t},e))}));return t.propTypes={metadata:A$.isRequired,labels:I$.isRequired},t.defaultProps={metadata:e,labels:fw},t}function yw(e,t){var r=Array.prototype.slice.call(t);return r.push(Bb),e.apply(this,r)}hw();var gw=hw(Bb);function bw(){return yw(dw,arguments)}function mw(){return yw(cw,arguments)}function vw(){return yw(_v,arguments)}const $w=["AD","AT","BE","CA","CH","CZ","DE","DK","EE","DZ","ES","FI","FR","GB","GF","GG","GI","GP","GR","HR","IE","IL","IS","IT","LT","LU","MA","MC","NL","NO","PF","PL","PT","RE","RS","RU","SE","TN"],ww={ext:"ext.",country:"Numéro de téléphone pays",phone:"Téléphone",AD:"Andorra",AT:"Österreich",BE:"Belgique",CA:"Canada",CH:"Schweiz",CZ:"Česko",DE:"Deutschland",DK:"Danmark",DZ:"Al-Jazā'ir",EE:"Eesti",ES:"España",FI:"Finland",FR:"France",GB:"United Kingdom",GF:"Guyane française",GG:"Guernsey",GI:"Djebel Tariq",GP:"Guadeloupe",GR:"Guinée équatoriale",HR:"Hrvatska",IE:"Ireland",IL:"Israël",IS:"Ísland",IT:"Italia",LT:"Lietuva",LU:"Luxembourg",MA:"Al-Maġrib",MC:"Monaco",NL:"Nederland",NO:"Norge",PF:"Polynésie française",PL:"Polska",PT:"República Portuguesa",RE:"Île de La Réunion",RS:"Republika Srbija",RU:"Rossiïa",SE:"Sverige",TN:"Tūnis",ZZ:"International"},xw=c.default.div`
649
+ !function(e){!function(){var t={}.hasOwnProperty;function r(){for(var e=[],n=0;n<arguments.length;n++){var o=arguments[n];if(o){var a=typeof o;if("string"===a||"number"===a)e.push(o);else if(Array.isArray(o)&&o.length){var i=r.apply(null,o);i&&e.push(i)}else if("object"===a)for(var l in o)t.call(o,l)&&o[l]&&e.push(l)}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r}()}(zb);var Hb=zb.exports;function Gb(e,t){var r=0,n=t.split(""),o=Array.isArray(n),a=0;for(n=o?n:n[Symbol.iterator]();;){var i;if(o){if(a>=n.length)break;i=n[a++]}else{if((a=n.next()).done)break;i=a.value}i===e&&r++}return r}function Ub(e,t){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"x",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:" ",o=e.length,a=Gb("(",e),i=Gb(")",e),l=a-i;l>0&&o<t.length;)e+=t[o].replace(r,n),")"===t[o]&&l--,o++;return e}function Wb(e,t,r){"string"==typeof r&&(r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",r=arguments.length>2?arguments[2]:void 0;if(!e)return function(e){return{text:e}};var n=Gb(t,e);return function(o){if(!o)return{text:"",template:e};var a=0,i="",l=e.split(""),s=Array.isArray(l),u=0;for(l=s?l:l[Symbol.iterator]();;){var d;if(s){if(u>=l.length)break;d=l[u++]}else{if((u=l.next()).done)break;d=u.value}var c=d;if(c===t){if(i+=o[a],++a===o.length&&o.length<n)break}else i+=c}return r&&(i=Ub(i,e)),{text:i,template:e}}}(r));var n=r(e)||{},o=n.text,a=n.template;if(void 0===o&&(o=e),a)if(void 0===t)t=o.length;else{for(var i=0,l=!1,s=-1;i<o.length&&i<a.length;){if(o[i]!==a[i]){if(0===t){l=!0,t=i;break}s=i,t--}i++}l||(t=s+1)}return{text:o,caret:t}}var Kb=8,Vb=46;function qb(e,t){void 0!==t&&(!function(){if("undefined"!=typeof navigator)return Yb.test(navigator.userAgent)}()?e.setSelectionRange(t,t):setTimeout((function(){return e.setSelectionRange(t,t)}),0))}var Yb=/Android/i;function Zb(e,t,r,n,o){if(!t.hasAttribute("readonly")){var a=function(e){switch(e.keyCode){case Kb:return"Backspace";case Vb:return"Delete"}}(e);switch(a){case"Delete":case"Backspace":e.preventDefault();var i=function(e){if(e.selectionStart!==e.selectionEnd)return{start:e.selectionStart,end:e.selectionEnd}}(t);return i?(function(e,t){var r=e.value;r=r.slice(0,t.start)+r.slice(t.end),e.value=r,qb(e,t.start)}(t,i),Jb(t,r,n,void 0,o)):Jb(t,r,n,a,o)}}}function Jb(e,t,r,n,o){var a=function(e,t,r){for(var n="",o=0,a=0;a<e.length;){var i=r(e[a],n);void 0!==i&&(n+=i,void 0!==t&&(t===a?o=n.length-1:t>a&&(o=n.length))),a++}return void 0===t&&(o=n.length),{value:n,caret:o}}(e.value,e.selectionStart,t),i=a.value,l=a.caret;if(n){var s=function(e,t,r){switch(r){case"Backspace":t>0&&(e=e.slice(0,t-1)+e.slice(t),t--);break;case"Delete":e=e.slice(0,t)+e.slice(t+1)}return{value:e,caret:t}}(i,l,n);i=s.value,l=s.caret}var u=Wb(i,l,r),d=u.text;l=u.caret,e.value=d,qb(e,l),o(i)}function Xb(){return(Xb=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function Qb(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function em(e,r){var n=e.value,o=e.parse,a=e.format,i=e.inputComponent,l=e.onChange,s=e.onKeyDown,d=Qb(e,["value","parse","format","inputComponent","onChange","onKeyDown"]),c=t.useRef(),f=t.useCallback((function(e){c.current=e,r&&("function"==typeof r?r(e):r.current=e)}),[r]),p=t.useCallback((function(e){Jb(c.current,o,a,void 0,l)}),[c,o,a,l]),h=t.useCallback((function(e){return s&&s(e),Zb(e,c.current,o,a,l)}),[c,o,a,l,s]);return u.default.createElement(i,Xb({},d,{ref:f,value:a(rm(n)?"":n).text,onKeyDown:h,onChange:p}))}(em=u.default.forwardRef(em)).propTypes={parse:js.func.isRequired,format:js.func.isRequired,inputComponent:js.elementType.isRequired,type:js.string.isRequired,value:js.string,onChange:js.func.isRequired,onKeyDown:js.func,onCut:js.func,onPaste:js.func},em.defaultProps={inputComponent:"input",type:"text"};var tm=em;function rm(e){return null==e}var nm=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=this.constructor.name,this.message=t,this.stack=new Error(t).stack};(nm.prototype=Object.create(Error.prototype)).constructor=nm;var om="".concat("-‐-―−ー-").concat("//").concat("..").concat("  ­​⁠ ").concat("()()[]\\[\\]").concat("~⁓∼~");function am(e,t){e=e.split("-"),t=t.split("-");for(var r=e[0].split("."),n=t[0].split("."),o=0;o<3;o++){var a=Number(r[o]),i=Number(n[o]);if(a>i)return 1;if(i>a)return-1;if(!isNaN(a)&&isNaN(i))return 1;if(isNaN(a)&&!isNaN(i))return-1}return e[1]&&t[1]?e[1]>t[1]?1:e[1]<t[1]?-1:0:!e[1]&&t[1]?1:e[1]&&!t[1]?-1:0}function im(e){return(im="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function um(e,t,r){return t&&sm(e.prototype,t),r&&sm(e,r),e}var dm=/^\d+$/,cm=function(){function e(t){lm(this,e),function(e){if(!e)throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");if(!bm(e)||!bm(e.countries))throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(bm(e)?"an object of shape: { "+Object.keys(e).join(", ")+" }":"a "+mm(e)+": "+e,"."))}(t),this.metadata=t,wm.call(this,t)}return um(e,[{key:"getCountries",value:function(){return Object.keys(this.metadata.countries).filter((function(e){return"001"!==e}))}},{key:"getCountryMetadata",value:function(e){return this.metadata.countries[e]}},{key:"nonGeographic",value:function(){if(!(this.v1||this.v2||this.v3))return this.metadata.nonGeographic||this.metadata.nonGeographical}},{key:"hasCountry",value:function(e){return void 0!==this.getCountryMetadata(e)}},{key:"hasCallingCode",value:function(e){if(this.getCountryCodesForCallingCode(e))return!0;if(this.nonGeographic()){if(this.nonGeographic()[e])return!0}else{var t=this.countryCallingCodes()[e];if(t&&1===t.length&&"001"===t[0])return!0}}},{key:"isNonGeographicCallingCode",value:function(e){return this.nonGeographic()?!!this.nonGeographic()[e]:!this.getCountryCodesForCallingCode(e)}},{key:"country",value:function(e){return this.selectNumberingPlan(e)}},{key:"selectNumberingPlan",value:function(e,t){if(e&&dm.test(e)&&(t=e,e=null),e&&"001"!==e){if(!this.hasCountry(e))throw new Error("Unknown country: ".concat(e));this.numberingPlan=new fm(this.getCountryMetadata(e),this)}else if(t){if(!this.hasCallingCode(t))throw new Error("Unknown calling code: ".concat(t));this.numberingPlan=new fm(this.getNumberingPlanMetadata(t),this)}else this.numberingPlan=void 0;return this}},{key:"getCountryCodesForCallingCode",value:function(e){var t=this.countryCallingCodes()[e];if(t){if(1===t.length&&3===t[0].length)return;return t}}},{key:"getCountryCodeForCallingCode",value:function(e){var t=this.getCountryCodesForCallingCode(e);if(t)return t[0]}},{key:"getNumberingPlanMetadata",value:function(e){var t=this.getCountryCodeForCallingCode(e);if(t)return this.getCountryMetadata(t);if(this.nonGeographic()){var r=this.nonGeographic()[e];if(r)return r}else{var n=this.countryCallingCodes()[e];if(n&&1===n.length&&"001"===n[0])return this.metadata.countries["001"]}}},{key:"countryCallingCode",value:function(){return this.numberingPlan.callingCode()}},{key:"IDDPrefix",value:function(){return this.numberingPlan.IDDPrefix()}},{key:"defaultIDDPrefix",value:function(){return this.numberingPlan.defaultIDDPrefix()}},{key:"nationalNumberPattern",value:function(){return this.numberingPlan.nationalNumberPattern()}},{key:"possibleLengths",value:function(){return this.numberingPlan.possibleLengths()}},{key:"formats",value:function(){return this.numberingPlan.formats()}},{key:"nationalPrefixForParsing",value:function(){return this.numberingPlan.nationalPrefixForParsing()}},{key:"nationalPrefixTransformRule",value:function(){return this.numberingPlan.nationalPrefixTransformRule()}},{key:"leadingDigits",value:function(){return this.numberingPlan.leadingDigits()}},{key:"hasTypes",value:function(){return this.numberingPlan.hasTypes()}},{key:"type",value:function(e){return this.numberingPlan.type(e)}},{key:"ext",value:function(){return this.numberingPlan.ext()}},{key:"countryCallingCodes",value:function(){return this.v1?this.metadata.country_phone_code_to_countries:this.metadata.country_calling_codes}},{key:"chooseCountryByCountryCallingCode",value:function(e){return this.selectNumberingPlan(e)}},{key:"hasSelectedNumberingPlan",value:function(){return void 0!==this.numberingPlan}}]),e}(),fm=function(){function e(t,r){lm(this,e),this.globalMetadataObject=r,this.metadata=t,wm.call(this,r.metadata)}return um(e,[{key:"callingCode",value:function(){return this.metadata[0]}},{key:"getDefaultCountryMetadataForRegion",value:function(){return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode())}},{key:"IDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[1]}},{key:"defaultIDDPrefix",value:function(){if(!this.v1&&!this.v2)return this.metadata[12]}},{key:"nationalNumberPattern",value:function(){return this.v1||this.v2?this.metadata[1]:this.metadata[2]}},{key:"possibleLengths",value:function(){if(!this.v1)return this.metadata[this.v2?2:3]}},{key:"_getFormats",value:function(e){return e[this.v1?2:this.v2?3:4]}},{key:"formats",value:function(){var e=this,t=this._getFormats(this.metadata)||this._getFormats(this.getDefaultCountryMetadataForRegion())||[];return t.map((function(t){return new pm(t,e)}))}},{key:"nationalPrefix",value:function(){return this.metadata[this.v1?3:this.v2?4:5]}},{key:"_getNationalPrefixFormattingRule",value:function(e){return e[this.v1?4:this.v2?5:6]}},{key:"nationalPrefixFormattingRule",value:function(){return this._getNationalPrefixFormattingRule(this.metadata)||this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion())}},{key:"_nationalPrefixForParsing",value:function(){return this.metadata[this.v1?5:this.v2?6:7]}},{key:"nationalPrefixForParsing",value:function(){return this._nationalPrefixForParsing()||this.nationalPrefix()}},{key:"nationalPrefixTransformRule",value:function(){return this.metadata[this.v1?6:this.v2?7:8]}},{key:"_getNationalPrefixIsOptionalWhenFormatting",value:function(){return!!this.metadata[this.v1?7:this.v2?8:9]}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata)||this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion())}},{key:"leadingDigits",value:function(){return this.metadata[this.v1?8:this.v2?9:10]}},{key:"types",value:function(){return this.metadata[this.v1?9:this.v2?10:11]}},{key:"hasTypes",value:function(){return(!this.types()||0!==this.types().length)&&!!this.types()}},{key:"type",value:function(e){if(this.hasTypes()&&gm(this.types(),e))return new ym(gm(this.types(),e),this)}},{key:"ext",value:function(){return this.v1||this.v2?" ext. ":this.metadata[13]||" ext. "}}]),e}(),pm=function(){function e(t,r){lm(this,e),this._format=t,this.metadata=r}return um(e,[{key:"pattern",value:function(){return this._format[0]}},{key:"format",value:function(){return this._format[1]}},{key:"leadingDigitsPatterns",value:function(){return this._format[2]||[]}},{key:"nationalPrefixFormattingRule",value:function(){return this._format[3]||this.metadata.nationalPrefixFormattingRule()}},{key:"nationalPrefixIsOptionalWhenFormattingInNationalFormat",value:function(){return!!this._format[4]||this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"nationalPrefixIsMandatoryWhenFormattingInNationalFormat",value:function(){return this.usesNationalPrefix()&&!this.nationalPrefixIsOptionalWhenFormattingInNationalFormat()}},{key:"usesNationalPrefix",value:function(){return!(!this.nationalPrefixFormattingRule()||hm.test(this.nationalPrefixFormattingRule()))}},{key:"internationalFormat",value:function(){return this._format[5]||this.format()}}]),e}(),hm=/^\(?\$1\)?$/,ym=function(){function e(t,r){lm(this,e),this.type=t,this.metadata=r}return um(e,[{key:"pattern",value:function(){return this.metadata.v1?this.type:this.type[0]}},{key:"possibleLengths",value:function(){if(!this.metadata.v1)return this.type[1]||this.metadata.possibleLengths()}}]),e}();function gm(e,t){switch(t){case"FIXED_LINE":return e[0];case"MOBILE":return e[1];case"TOLL_FREE":return e[2];case"PREMIUM_RATE":return e[3];case"PERSONAL_NUMBER":return e[4];case"VOICEMAIL":return e[5];case"UAN":return e[6];case"PAGER":return e[7];case"VOIP":return e[8];case"SHARED_COST":return e[9]}}var bm=function(e){return"object"===im(e)},mm=function(e){return im(e)};function vm(e,t){if((t=new cm(t)).hasCountry(e))return t.country(e).countryCallingCode();throw new Error("Unknown country: ".concat(e))}function $m(e,t){return void 0!==t.countries[e]}function wm(e){var t=e.version;"number"==typeof t?(this.v1=1===t,this.v2=2===t,this.v3=3===t,this.v4=4===t):t?-1===am(t,"1.2.0")?this.v2=!0:-1===am(t,"1.7.35")?this.v3=!0:this.v4=!0:this.v1=!0}var xm=function(e){return"([".concat("0-90-9٠-٩۰-۹","]{1,").concat(e,"})")};function Om(e){var t="#?";return";ext="+xm("20")+"|"+("[  \\t,]*(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)[:\\..]?[  \\t,-]*"+xm("20")+t)+"|"+("[  \\t,]*(?:[xx##~~]|int|int)[:\\..]?[  \\t,-]*"+xm("9")+t)+"|"+("[- ]+"+xm("6")+"#")+"|"+("[  \\t]*(?:,{2}|;)[:\\..]?[  \\t,-]*"+xm("15")+t)+"|"+("[  \\t]*(?:,)+[:\\..]?[  \\t,-]*"+xm("9")+t)}var _m="[++]{0,1}(?:["+om+"]*[0-90-9٠-٩۰-۹]){3,}["+om+"0-90-9٠-٩۰-۹]*",Em=new RegExp("^[++]{0,1}(?:["+om+"]*[0-90-9٠-٩۰-۹]){1,2}$","i"),Sm=_m+"(?:"+Om()+")?",Pm=new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^"+Sm+"$","i");function km(e){return e.length>=2&&Pm.test(e)}var Cm=new RegExp("(?:"+Om()+")$","i");var Dm={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"};function Mm(e){return Dm[e]}function Am(e){var t="",r=e.split(""),n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var a;if(n){if(o>=r.length)break;a=r[o++]}else{if((o=r.next()).done)break;a=o.value}var i=Mm(a);i&&(t+=i)}return t}function Im(e){var t="",r=e.split(""),n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var a;if(n){if(o>=r.length)break;a=r[o++]}else{if((o=r.next()).done)break;a=o.value}t+=Tm(a,t)||""}return t}function Tm(e,t){if("+"===e){if(t)return;return"+"}return Mm(e)}function Nm(e,t){return jm(e,void 0,t)}function jm(e,t,r){var n=r.type(t),o=n&&n.possibleLengths()||r.possibleLengths();if(!o)return"IS_POSSIBLE";if("FIXED_LINE_OR_MOBILE"===t){if(!r.type("FIXED_LINE"))return jm(e,"MOBILE",r);var a=r.type("MOBILE");a&&(o=function(e,t){var r=e.slice(),n=t,o=Array.isArray(n),a=0;for(n=o?n:n[Symbol.iterator]();;){var i;if(o){if(a>=n.length)break;i=n[a++]}else{if((a=n.next()).done)break;i=a.value}var l=i;e.indexOf(l)<0&&r.push(l)}return r.sort((function(e,t){return e-t}))}(o,a.possibleLengths()))}else if(t&&!n)return"INVALID_LENGTH";var i=e.length,l=o[0];return l===i?"IS_POSSIBLE":l>i?"TOO_SHORT":o[o.length-1]<i?"TOO_LONG":o.indexOf(i,1)>=0?"IS_POSSIBLE":"INVALID_LENGTH"}function Fm(e,t){switch(Nm(e,t)){case"IS_POSSIBLE":return!0;default:return!1}}function Rm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(n=(i=l.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==l.return||l.return()}finally{if(o)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Lm(e,t){return e=e||"",new RegExp("^(?:"+t+")$").test(e)}var Bm=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function zm(e,t,r){if(t=t||{},e.country){(r=new cm(r)).selectNumberingPlan(e.country,e.countryCallingCode);var n=t.v2?e.nationalNumber:e.phone;if(Lm(n,r.nationalNumberPattern())){if(Hm(n,"FIXED_LINE",r))return r.type("MOBILE")&&""===r.type("MOBILE").pattern()?"FIXED_LINE_OR_MOBILE":r.type("MOBILE")?Hm(n,"MOBILE",r)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE":"FIXED_LINE_OR_MOBILE";for(var o=0,a=Bm;o<a.length;o++){var i=a[o];if(Hm(n,i,r))return i}}}}function Hm(e,t,r){return!(!(t=r.type(t))||!t.pattern())&&(!(t.possibleLengths()&&t.possibleLengths().indexOf(e.length)<0)&&Lm(e,t.pattern()))}function Gm(e){return e.replace(new RegExp("[".concat(om,"]+"),"g")," ").trim()}var Um=/(\$\d)/;function Wm(e,t,r){var n=r.useInternationalFormat,o=r.withNationalPrefix;r.carrierCode,r.metadata;var a=e.replace(new RegExp(t.pattern()),n?t.internationalFormat():o&&t.nationalPrefixFormattingRule()?t.format().replace(Um,t.nationalPrefixFormattingRule()):t.format());return n?Gm(a):a}var Km=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function Vm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var qm={formatExtension:function(e,t,r){return"".concat(e).concat(r.ext()).concat(t)}};function Ym(e,t,r,n){if(r=r?function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Vm(e,t,r[t])}))}return e}({},qm,r):qm,n=new cm(n),e.country&&"001"!==e.country){if(!n.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));n.country(e.country)}else{if(!e.countryCallingCode)return e.phone||"";n.selectNumberingPlan(e.countryCallingCode)}var o,a=n.countryCallingCode(),i=r.v2?e.nationalNumber:e.phone;switch(t){case"NATIONAL":return i?Jm(o=Zm(i,e.carrierCode,"NATIONAL",n,r),e.ext,n,r.formatExtension):"";case"INTERNATIONAL":return i?(o=Zm(i,null,"INTERNATIONAL",n,r),Jm(o="+".concat(a," ").concat(o),e.ext,n,r.formatExtension)):"+".concat(a);case"E.164":return"+".concat(a).concat(i);case"RFC3966":return function(e){var t=e.number,r=e.ext;if(!t)return"";if("+"!==t[0])throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(t).concat(r?";ext="+r:"")}({number:"+".concat(a).concat(i),ext:e.ext});case"IDD":if(!r.fromCountry)return;return Jm(function(e,t,r,n,o){if(vm(n,o.metadata)===r){var a=Zm(e,t,"NATIONAL",o);return"1"===r?r+" "+a:a}var i=function(e,t,r){var n=new cm(r);return n.selectNumberingPlan(e,t),n.defaultIDDPrefix()?n.defaultIDDPrefix():Km.test(n.IDDPrefix())?n.IDDPrefix():void 0}(n,void 0,o.metadata);if(i)return"".concat(i," ").concat(r," ").concat(Zm(e,null,"INTERNATIONAL",o))}(i,e.carrierCode,a,r.fromCountry,n),e.ext,n,r.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(t,'"'))}}function Zm(e,t,r,n,o){var a=function(e,t){var r=e,n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var a;if(n){if(o>=r.length)break;a=r[o++]}else{if((o=r.next()).done)break;a=o.value}var i=a;if(i.leadingDigitsPatterns().length>0){var l=i.leadingDigitsPatterns()[i.leadingDigitsPatterns().length-1];if(0!==t.search(l))continue}if(Lm(t,i.pattern()))return i}}(n.formats(),e);return a?Wm(e,a,{useInternationalFormat:"INTERNATIONAL"===r,withNationalPrefix:!a.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!o||!1!==o.nationalPrefix,carrierCode:t,metadata:n}):e}function Jm(e,t,r,n){return t?n(e,t,r):e}function Xm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qm(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var ev=function(){function e(t,r,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t)throw new TypeError("`country` or `countryCallingCode` not passed");if(!r)throw new TypeError("`nationalNumber` not passed");if(!n)throw new TypeError("`metadata` not passed");var o=new cm(n);tv(t)&&(this.country=t,o.country(t),t=o.countryCallingCode()),this.countryCallingCode=t,this.nationalNumber=r,this.number="+"+this.countryCallingCode+this.nationalNumber,this.metadata=n}var t,r,n;return t=e,(r=[{key:"setExt",value:function(e){this.ext=e}},{key:"isPossible",value:function(){return function(e,t,r){if(void 0===t&&(t={}),r=new cm(r),t.v2){if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");r.selectNumberingPlan(e.countryCallingCode)}else{if(!e.phone)return!1;if(e.country){if(!r.hasCountry(e.country))throw new Error("Unknown country: ".concat(e.country));r.country(e.country)}else{if(!e.countryCallingCode)throw new Error("Invalid phone number object passed");r.selectNumberingPlan(e.countryCallingCode)}}if(r.possibleLengths())return Fm(e.phone||e.nationalNumber,r);if(e.countryCallingCode&&r.isNonGeographicCallingCode(e.countryCallingCode))return!0;throw new Error('Missing "possibleLengths" in metadata. Perhaps the metadata has been generated before v1.0.18.')}(this,{v2:!0},this.metadata)}},{key:"isValid",value:function(){return function(e,t,r){return t=t||{},r=new cm(r),!!e.country&&(r.selectNumberingPlan(e.country,e.countryCallingCode),r.hasTypes()?void 0!==zm(e,t,r.metadata):Lm(t.v2?e.nationalNumber:e.phone,r.nationalNumberPattern()))}(this,{v2:!0},this.metadata)}},{key:"isNonGeographic",value:function(){return new cm(this.metadata).isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(e){return this.number===e.number&&this.ext===e.ext}},{key:"getType",value:function(){return zm(this,{v2:!0},this.metadata)}},{key:"format",value:function(e,t){return Ym(this,e,t?function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Xm(e,t,r[t])}))}return e}({},t,{v2:!0}):{v2:!0},this.metadata)}},{key:"formatNational",value:function(e){return this.format("NATIONAL",e)}},{key:"formatInternational",value:function(e){return this.format("INTERNATIONAL",e)}},{key:"getURI",value:function(e){return this.format("RFC3966",e)}}])&&Qm(t.prototype,r),n&&Qm(t,n),e}(),tv=function(e){return/^[A-Z]{2}$/.test(e)},rv=new RegExp("([0-90-9٠-٩۰-۹])");function nv(e,t,r,n){if(t){var o=new cm(n);o.selectNumberingPlan(t,r);var a=new RegExp(o.IDDPrefix());if(0===e.search(a)){var i=(e=e.slice(e.match(a)[0].length)).match(rv);if(!(i&&null!=i[1]&&i[1].length>0&&"0"===i[1]))return e}}}function ov(e,t){if(e&&t.numberingPlan.nationalPrefixForParsing()){var r=new RegExp("^(?:"+t.numberingPlan.nationalPrefixForParsing()+")"),n=r.exec(e);if(n){var o,a,i,l=n.length-1,s=l>0&&n[l];if(t.nationalPrefixTransformRule()&&s)o=e.replace(r,t.nationalPrefixTransformRule()),l>1&&(a=n[1]);else{var u=n[0];o=e.slice(u.length),s&&(a=n[1])}if(s){var d=e.indexOf(n[1]);e.slice(0,d)===t.numberingPlan.nationalPrefix()&&(i=t.numberingPlan.nationalPrefix())}else i=n[0];return{nationalNumber:o,nationalPrefix:i,carrierCode:a}}}return{nationalNumber:e}}function av(e,t){var r=ov(e,t),n=r.nationalNumber,o=r.carrierCode;if(!function(e,t,r){if(Lm(e,r.nationalNumberPattern())&&!Lm(t,r.nationalNumberPattern()))return!1;return!0}(e,n,t))return{nationalNumber:e};if(e.length!==n.length+(o?o.length:0)&&t.possibleLengths())switch(Nm(n,t)){case"TOO_SHORT":case"INVALID_LENGTH":return{nationalNumber:e}}return{nationalNumber:n,carrierCode:o}}function iv(e,t,r,n){var o=t?vm(t,n):r;if(0===e.indexOf(o)){(n=new cm(n)).selectNumberingPlan(t,r);var a=e.slice(o.length),i=av(a,n).nationalNumber,l=av(e,n).nationalNumber;if(!Lm(l,n.nationalNumberPattern())&&Lm(i,n.nationalNumberPattern())||"TOO_LONG"===Nm(l,n))return{countryCallingCode:o,number:a}}return{number:e}}function lv(e,t,r,n){if(!e)return{};if("+"!==e[0]){var o=nv(e,t,r,n);if(!o||o===e){if(t||r){var a=iv(e,t,r,n),i=a.countryCallingCode,l=a.number;if(i)return{countryCallingCode:i,number:l}}return{number:e}}e="+"+o}if("0"===e[1])return{};n=new cm(n);for(var s=2;s-1<=3&&s<=e.length;){var u=e.slice(1,s);if(n.hasCallingCode(u))return n.selectNumberingPlan(u),{countryCallingCode:u,number:e.slice(s)};s++}return{}}function sv(e,t,r){var n=r.getCountryCodesForCallingCode(e);if(n)return 1===n.length?n[0]:function(e,t,r){r=new cm(r);var n=e,o=Array.isArray(n),a=0;for(n=o?n:n[Symbol.iterator]();;){var i;if(o){if(a>=n.length)break;i=n[a++]}else{if((a=n.next()).done)break;i=a.value}var l=i;if(r.country(l),r.leadingDigits()){if(t&&0===t.search(r.leadingDigits()))return l}else if(zm({phone:t,country:l},void 0,r.metadata))return l}}(n,t,r.metadata)}var uv=new RegExp("[++0-90-9٠-٩۰-۹]"),dv=new RegExp("[^0-90-9٠-٩۰-۹#]+$");function cv(e,t,r){if(t=t||{},r=new cm(r),t.defaultCountry&&!r.hasCountry(t.defaultCountry)){if(t.v2)throw new nm("INVALID_COUNTRY");throw new Error("Unknown country: ".concat(t.defaultCountry))}var n=function(e,t,r){if(e&&0===e.indexOf("tel:"))return function(e){var t,r,n=(e=e.replace(/^tel:/,"tel=")).split(";"),o=Array.isArray(n),a=0;for(n=o?n:n[Symbol.iterator]();;){var i;if(o){if(a>=n.length)break;i=n[a++]}else{if((a=n.next()).done)break;i=a.value}var l=Rm(i.split("="),2),s=l[0],u=l[1];switch(s){case"tel":t=u;break;case"ext":r=u;break;case"phone-context":"+"===u[0]&&(t=u+t)}}if(!km(t))return{};var d={number:t};return r&&(d.ext=r),d}(e);var n=function(e,t,r){if(!e)return;if(e.length>250){if(r)throw new nm("TOO_LONG");return}if(!1===t)return e;var n=e.search(uv);if(n<0)return;return e.slice(n).replace(dv,"")}(e,r,t);if(!n)return{};if(!km(n))return function(e){return Em.test(e)}(n)?{error:"TOO_SHORT"}:{};var o=function(e){var t=e.search(Cm);if(t<0)return{};for(var r=e.slice(0,t),n=e.match(Cm),o=1;o<n.length;){if(n[o])return{number:r,ext:n[o]};o++}}(n);if(o.ext)return o;return{number:n}}(e,t.v2,t.extract),o=n.number,a=n.ext,i=n.error;if(!o){if(t.v2){if("TOO_SHORT"===i)throw new nm("TOO_SHORT");throw new nm("NOT_A_NUMBER")}return{}}var l=function(e,t,r,n){var o,a=lv(Im(e),t,r,n.metadata),i=a.countryCallingCode,l=a.number;if(i)n.selectNumberingPlan(i);else{if(!l||!t&&!r)return{};n.selectNumberingPlan(t,r),t&&(o=t),i=r||vm(t,n.metadata)}if(!l)return{countryCallingCode:i};var s=av(Im(l),n),u=s.nationalNumber,d=s.carrierCode,c=sv(i,u,n);c&&(o=c,"001"===c||n.country(o));return{country:o,countryCallingCode:i,nationalNumber:u,carrierCode:d}}(o,t.defaultCountry,t.defaultCallingCode,r),s=l.country,u=l.nationalNumber,d=l.countryCallingCode,c=l.carrierCode;if(!r.hasSelectedNumberingPlan()){if(t.v2)throw new nm("INVALID_COUNTRY");return{}}if(!u||u.length<2){if(t.v2)throw new nm("TOO_SHORT");return{}}if(u.length>17){if(t.v2)throw new nm("TOO_LONG");return{}}if(t.v2){var f=new ev(d,u,r.metadata);return s&&(f.country=s),c&&(f.carrierCode=c),a&&(f.ext=a),f}var p=!!(t.extended?r.hasSelectedNumberingPlan():s)&&Lm(u,r.nationalNumberPattern());return t.extended?{country:s,countryCallingCode:d,carrierCode:c,valid:p,possible:!!p||!(!0!==t.extended||!r.possibleLengths()||!Fm(u,r)),phone:u,ext:a}:p?function(e,t,r){var n={country:e,phone:t};r&&(n.ext=r);return n}(s,u,a):{}}function fv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pv(e,t,r){return cv(e,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){fv(e,t,r[t])}))}return e}({},t,{v2:!0}),r)}function hv(e){return(hv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(n=(i=l.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==l.return||l.return()}finally{if(o)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function bv(e){var t,r,n,o=gv(Array.prototype.slice.call(e),4),a=o[0],i=o[1],l=o[2],s=o[3];if("string"!=typeof a)throw new TypeError("A text for parsing must be a string.");if(t=a,i&&"string"!=typeof i){if(!mv(i))throw new Error("Invalid second argument: ".concat(i));l?(r=i,n=l):n=i}else s?(r=l,n=s):(r=void 0,n=l),i&&(r=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){yv(e,t,r[t])}))}return e}({defaultCountry:i},r));return{text:t,options:r,metadata:n}}var mv=function(e){return"object"===hv(e)};function vv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $v(e,t,r){t&&t.defaultCountry&&!$m(t.defaultCountry,r)&&(t=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){vv(e,t,r[t])}))}return e}({},t,{defaultCountry:void 0}));try{return pv(e,t,r)}catch(e){if(!(e instanceof nm))throw e}}function wv(){var e=bv(arguments),t=e.text,r=e.options,n=e.metadata;return $v(t,r,n)}function xv(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){Ov(e,t,r[t])}))}return e}function Ov(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _v(){var e=bv(arguments),t=e.text,r=e.options,n=e.metadata,o=$v(t,r=xv({},r,{extract:!1}),n);return o&&o.isValid()||!1}function Ev(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Sv=function(){function e(t){var r,n,o,a=this,i=t.onCountryChange,l=t.onCallingCodeChange;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o=function(e){for(var t=0,r=Object.keys(e);t<r.length;t++){var n=r[t];a[n]=e[n]}},(n="update")in(r=this)?Object.defineProperty(r,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[n]=o,this.onCountryChange=i,this.onCallingCodeChange=l}var t,r,n;return t=e,(r=[{key:"reset",value:function(e,t){this.international=!1,this.IDDPrefix=void 0,this.missingPlus=void 0,this.callingCode=void 0,this.digits="",this.resetNationalSignificantNumber(),this.initCountryAndCallingCode(e,t)}},{key:"resetNationalSignificantNumber",value:function(){this.nationalSignificantNumber=this.getNationalDigits(),this.nationalSignificantNumberMatchesInput=!0,this.nationalPrefix=void 0,this.carrierCode=void 0,this.complexPrefixBeforeNationalSignificantNumber=void 0}},{key:"initCountryAndCallingCode",value:function(e,t){this.setCountry(e),this.setCallingCode(t)}},{key:"setCountry",value:function(e){this.country=e,this.onCountryChange(e)}},{key:"setCallingCode",value:function(e){return this.callingCode=e,this.onCallingCodeChange(this.country,e)}},{key:"startInternationalNumber",value:function(){this.international=!0,this.initCountryAndCallingCode()}},{key:"appendDigits",value:function(e){this.digits+=e}},{key:"appendNationalSignificantNumberDigits",value:function(e){this.nationalSignificantNumber+=e}},{key:"getNationalDigits",value:function(){return this.international?this.digits.slice((this.IDDPrefix?this.IDDPrefix.length:0)+(this.callingCode?this.callingCode.length:0)):this.digits}},{key:"getDigitsWithoutInternationalPrefix",value:function(){return this.international&&this.IDDPrefix?this.digits.slice(this.IDDPrefix.length):this.digits}}])&&Ev(t.prototype,r),n&&Ev(t,n),e}(),Pv=new RegExp("x");function kv(e,t){if(t<1)return"";for(var r="";t>1;)1&t&&(r+=e),t>>=1,e+=e;return r+e}function Cv(e,t){return")"===e[t]&&t++,function(e){var t=[],r=0;for(;r<e.length;)"("===e[r]?t.push(r):")"===e[r]&&t.pop(),r++;var n=0,o="";t.push(e.length);for(var a=0,i=t;a<i.length;a++){var l=i[a];o+=e.slice(n,l),n=l+1}return o}(e.slice(0,t))}function Dv(e,t,r){var n=r.metadata,o=r.shouldTryNationalPrefixFormattingRule,a=r.getSeparatorAfterNationalPrefix;if(new RegExp("^(?:".concat(t.pattern(),")$")).test(e.nationalSignificantNumber))return function(e,t,r){var n=r.metadata,o=r.shouldTryNationalPrefixFormattingRule,a=r.getSeparatorAfterNationalPrefix;if(e.nationalSignificantNumber,e.international,e.nationalPrefix,e.carrierCode,o(t)){var i=Mv(e,t,{useNationalPrefixFormattingRule:!0,getSeparatorAfterNationalPrefix:a,metadata:n});if(i)return i}return Mv(e,t,{useNationalPrefixFormattingRule:!1,getSeparatorAfterNationalPrefix:a,metadata:n})}(e,t,{metadata:n,shouldTryNationalPrefixFormattingRule:o,getSeparatorAfterNationalPrefix:a})}function Mv(e,t,r){var n=r.metadata,o=r.useNationalPrefixFormattingRule,a=r.getSeparatorAfterNationalPrefix,i=Wm(e.nationalSignificantNumber,t,{carrierCode:e.carrierCode,useInternationalFormat:e.international,withNationalPrefix:o,metadata:n});if(o||(e.nationalPrefix?i=e.nationalPrefix+a(t)+i:e.complexPrefixBeforeNationalSignificantNumber&&(i=e.complexPrefixBeforeNationalSignificantNumber+" "+i)),function(e,t){return Am(e)===t.getNationalDigits()}(i,e))return i}function Av(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Iv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Tv(e,t,r){return t&&Iv(e.prototype,t),r&&Iv(e,r),e}var Nv=function(){function e(t){Av(this,e),this.matchTree=(new Lv).parse(t)}return Tv(e,[{key:"match",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.allowOverflow;if(!e)throw new Error("String is required");var n=jv(e.split(""),this.matchTree,!0);if(n&&n.match&&delete n.matchedChars,!n||!n.overflow||r)return n}}]),e}();function jv(e,t,r){if("string"==typeof t){if(r&&e.length>t.length)return{overflow:!0};var n=e.join("");return 0===t.indexOf(n)?e.length===t.length?{match:!0,matchedChars:e}:{partialMatch:!0}:0===n.indexOf(t)?{match:!0,matchedChars:e.slice(0,t.length)}:void 0}if(Array.isArray(t)){for(var o=e.slice(),a=0;a<t.length;){var i=jv(o,t[a],r&&a===t.length-1);if(!i)return;if(i.overflow)return i;if(!i.match){if(i.partialMatch)return{partialMatch:!0};throw new Error("Unsupported match result:\n".concat(JSON.stringify(i,null,2)))}if(0===(o=o.slice(i.matchedChars.length)).length)return a===t.length-1?{match:!0,matchedChars:e}:{partialMatch:!0};a++}return r?{overflow:!0}:{match:!0,matchedChars:e.slice(0,e.length-o.length)}}switch(t.op){case"|":var l,s=t.args,u=Array.isArray(s),d=0;for(s=u?s:s[Symbol.iterator]();;){var c;if(u){if(d>=s.length)break;c=s[d++]}else{if((d=s.next()).done)break;c=d.value}var f=jv(e,c,r);if(f){if(f.overflow)return f;if(f.match)return{match:!0,matchedChars:f.matchedChars};if(!f.partialMatch)throw new Error("Unsupported match result:\n".concat(JSON.stringify(f,null,2)));l=!0}}return l?{partialMatch:!0}:void 0;case"[]":var p=t.args,h=Array.isArray(p),y=0;for(p=h?p:p[Symbol.iterator]();;){var g;if(h){if(y>=p.length)break;g=p[y++]}else{if((y=p.next()).done)break;g=y.value}var b=g;if(e[0]===b)return 1===e.length?{match:!0,matchedChars:e}:r?{overflow:!0}:{match:!0,matchedChars:[b]}}return;default:throw new Error("Unsupported instruction tree: ".concat(t))}}var Fv=new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])"),Rv=/[\(\)\[\]\?\:\|]/,Lv=function(){function e(){Av(this,e)}return Tv(e,[{key:"parse",value:function(e){if(this.context=[{or:!0,instructions:[]}],this.parsePattern(e),1!==this.context.length)throw new Error("Non-finalized contexts left when pattern parse ended");var t=this.context[0],r=t.branches,n=t.instructions;if(r)return[{op:"|",args:r.concat([n])}];if(0===n.length)throw new Error("Pattern is required");return n}},{key:"startContext",value:function(e){this.context.push(e)}},{key:"endContext",value:function(){this.context.pop()}},{key:"getContext",value:function(){return this.context[this.context.length-1]}},{key:"parsePattern",value:function(e){if(!e)throw new Error("Pattern is required");var t=e.match(Fv);if(t){var r=t[1],n=e.slice(0,t.index),o=e.slice(t.index+r.length);switch(r){case"(?:":n&&this.parsePattern(n),this.startContext({or:!0,instructions:[],branches:[]});break;case")":if(!this.getContext().or)throw new Error('")" operator must be preceded by "(?:" operator');if(n&&this.parsePattern(n),0===this.getContext().instructions.length)throw new Error('No instructions found after "|" operator in an "or" group');var a=this.getContext().branches;a.push(this.getContext().instructions),this.endContext(),this.getContext().instructions.push({op:"|",args:a});break;case"|":if(!this.getContext().or)throw new Error('"|" operator can only be used inside "or" groups');if(n&&this.parsePattern(n),!this.getContext().branches){if(1!==this.context.length)throw new Error('"branches" not found in an "or" group context');this.getContext().branches=[]}this.getContext().branches.push(this.getContext().instructions),this.getContext().instructions=[];break;case"[":n&&this.parsePattern(n),this.startContext({oneOfSet:!0});break;case"]":if(!this.getContext().oneOfSet)throw new Error('"]" operator must be preceded by "[" operator');this.endContext(),this.getContext().instructions.push({op:"[]",args:Bv(n)});break;default:throw new Error("Unknown operator: ".concat(r))}o&&this.parsePattern(o)}else{if(Rv.test(e))throw new Error("Illegal characters found in a pattern: ".concat(e));this.getContext().instructions=this.getContext().instructions.concat(e.split(""))}}}]),e}();function Bv(e){for(var t=[],r=0;r<e.length;){if("-"===e[r]){if(0===r||r===e.length-1)throw new Error("Couldn't parse a one-of set pattern: ".concat(e));for(var n=e[r-1].charCodeAt(0)+1,o=e[r+1].charCodeAt(0)-1,a=n;a<=o;)t.push(String.fromCharCode(a)),a++}else t.push(e[r]);r++}return t}function zv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Hv(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Gv=kv("9",15),Uv=/[- ]/,Wv=new RegExp("^["+om+"]*(\\$\\d["+om+"]*)+$"),Kv=function(){function e(t){var r=this;t.state;var n=t.metadata;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Hv(this,"getSeparatorAfterNationalPrefix",(function(e){return r.isNANP||e&&e.nationalPrefixFormattingRule()&&Uv.test(e.nationalPrefixFormattingRule())?" ":""})),Hv(this,"shouldTryNationalPrefixFormattingRule",(function(e,t){var r=t.international,n=t.nationalPrefix;if(e.nationalPrefixFormattingRule()){var o=e.usesNationalPrefix();if(o&&n||!o&&!r)return!0}})),this.metadata=n,this.resetFormat()}var t,r,n;return t=e,(r=[{key:"resetFormat",value:function(){this.chosenFormat=void 0,this.template=void 0,this.nationalNumberTemplate=void 0,this.populatedNationalNumberTemplate=void 0,this.populatedNationalNumberTemplatePosition=-1}},{key:"reset",value:function(e,t){this.resetFormat(),e?(this.isNANP="1"===e.callingCode(),this.matchingFormats=e.formats(),t.nationalSignificantNumber&&this.narrowDownMatchingFormats(t)):(this.isNANP=void 0,this.matchingFormats=[])}},{key:"format",value:function(e,t){var r=this;if(function(e,t){return"IS_POSSIBLE"===Nm(e,t)}(t.nationalSignificantNumber,this.metadata)){var n=this.matchingFormats,o=Array.isArray(n),a=0;for(n=o?n:n[Symbol.iterator]();;){var i;if(o){if(a>=n.length)break;i=n[a++]}else{if((a=n.next()).done)break;i=a.value}var l=i,s=Dv(t,l,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function(e){return r.shouldTryNationalPrefixFormattingRule(e,{international:t.international,nationalPrefix:t.nationalPrefix})},getSeparatorAfterNationalPrefix:this.getSeparatorAfterNationalPrefix});if(s)return this.resetFormat(),this.chosenFormat=l,this.setNationalNumberTemplate(s.replace(/\d/g,"x"),t),this.populatedNationalNumberTemplate=s,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf("x"),s}}return this.formatNationalNumberWithNextDigits(e,t)}},{key:"formatNationalNumberWithNextDigits",value:function(e,t){var r=this.chosenFormat,n=this.chooseFormat(t);if(n)return n===r?this.formatNextNationalNumberDigits(e):this.formatNextNationalNumberDigits(t.getNationalDigits())}},{key:"narrowDownMatchingFormats",value:function(e){var t=this,r=e.nationalSignificantNumber,n=e.nationalPrefix,o=e.international,a=r,i=a.length-3;i<0&&(i=0),this.matchingFormats=this.matchingFormats.filter((function(e){return t.formatSuits(e,o,n)&&t.formatMatches(e,a,i)})),this.chosenFormat&&-1===this.matchingFormats.indexOf(this.chosenFormat)&&this.resetFormat()}},{key:"formatSuits",value:function(e,t,r){return!(r&&!e.usesNationalPrefix()&&!e.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!t&&!r&&e.nationalPrefixIsMandatoryWhenFormattingInNationalFormat())}},{key:"formatMatches",value:function(e,t,r){var n=e.leadingDigitsPatterns().length;if(0===n)return!0;r=Math.min(r,n-1);var o=e.leadingDigitsPatterns()[r];if(t.length<3)try{return void 0!==new Nv(o).match(t,{allowOverflow:!0})}catch(e){return console.error(e),!0}return new RegExp("^(".concat(o,")")).test(t)}},{key:"getFormatFormat",value:function(e,t){return t?e.internationalFormat():e.format()}},{key:"chooseFormat",value:function(e){var t=this,r=function(){if(o){if(a>=n.length)return"break";i=n[a++]}else{if((a=n.next()).done)return"break";i=a.value}var r=i;return t.chosenFormat===r?"break":Wv.test(t.getFormatFormat(r,e.international))?t.createTemplateForFormat(r,e)?(t.chosenFormat=r,"break"):(t.matchingFormats=t.matchingFormats.filter((function(e){return e!==r})),"continue"):"continue"},n=this.matchingFormats.slice(),o=Array.isArray(n),a=0;e:for(n=o?n:n[Symbol.iterator]();;){var i;switch(r()){case"break":break e;case"continue":continue}}return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:"createTemplateForFormat",value:function(e,t){if(!(e.pattern().indexOf("|")>=0)){var r=this.getTemplateForFormat(e,t);return r?(this.setNationalNumberTemplate(r,t),!0):void 0}}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function(e,t){var r=e.IDDPrefix,n=e.missingPlus;return r?t&&!1===t.spacing?r:r+" ":n?"":"+"}},{key:"getTemplate",value:function(e){if(this.template){for(var t=-1,r=0,n=e.international?this.getInternationalPrefixBeforeCountryCallingCode(e,{spacing:!1}):"";r<n.length+e.getDigitsWithoutInternationalPrefix().length;)t=this.template.indexOf("x",t+1),r++;return Cv(this.template,t+1)}}},{key:"setNationalNumberTemplate",value:function(e,t){this.nationalNumberTemplate=e,this.populatedNationalNumberTemplate=e,this.populatedNationalNumberTemplatePosition=-1,t.international?this.template=this.getInternationalPrefixBeforeCountryCallingCode(t).replace(/[\d\+]/g,"x")+kv("x",t.callingCode.length)+" "+e:this.template=e}},{key:"getTemplateForFormat",value:function(e,t){var r=t.nationalSignificantNumber,n=t.international,o=t.nationalPrefix,a=t.complexPrefixBeforeNationalSignificantNumber,i=e.pattern();i=i.replace(/\[([^\[\]])*\]/g,"\\d").replace(/\d(?=[^,}][^,}])/g,"\\d");var l=Gv.match(i)[0];if(!(r.length>l.length)){var s=new RegExp("^"+i+"$"),u=r.replace(/\d/g,"9");s.test(u)&&(l=u);var d,c=this.getFormatFormat(e,n);if(this.shouldTryNationalPrefixFormattingRule(e,{international:n,nationalPrefix:o})){var f=c.replace(Um,e.nationalPrefixFormattingRule());if(Am(e.nationalPrefixFormattingRule())===(o||"")+Am("$1")&&(c=f,d=!0,o))for(var p=o.length;p>0;)c=c.replace(/\d/,"x"),p--}var h=l.replace(new RegExp(i),c).replace(new RegExp("9","g"),"x");return d||(a?h=kv("x",a.length)+" "+h:o&&(h=kv("x",o.length)+this.getSeparatorAfterNationalPrefix(e)+h)),n&&(h=Gm(h)),h}}},{key:"formatNextNationalNumberDigits",value:function(e){var t=function(e,t,r){var n=r.split(""),o=Array.isArray(n),a=0;for(n=o?n:n[Symbol.iterator]();;){var i;if(o){if(a>=n.length)break;i=n[a++]}else{if((a=n.next()).done)break;i=a.value}var l=i;if(e.slice(t+1).search(Pv)<0)return;t=e.search(Pv),e=e.replace(Pv,l)}return[e,t]}(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,e);if(t)return this.populatedNationalNumberTemplate=t[0],this.populatedNationalNumberTemplatePosition=t[1],Cv(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1);this.resetFormat()}}])&&zv(t.prototype,r),n&&zv(t,n),e}();function Vv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(n=(i=l.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==l.return||l.return()}finally{if(o)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function qv(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var Yv=new RegExp("^"+("["+om+"0-90-9٠-٩۰-۹]+")+"$","i"),Zv="(?:[++]["+om+"0-90-9٠-٩۰-۹]*|["+om+"0-90-9٠-٩۰-۹]+)",Jv=new RegExp("[^"+om+"0-90-9٠-٩۰-۹]+.*$"),Xv=/[^\d\[\]]/,Qv=function(){function e(t){var r=t.defaultCountry,n=t.defaultCallingCode,o=t.metadata,a=t.onNationalSignificantNumberChange;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.defaultCountry=r,this.defaultCallingCode=n,this.metadata=o,this.onNationalSignificantNumberChange=a}var t,r,n;return t=e,(r=[{key:"input",value:function(e,t){var r,n=function(e){var t=Vv(function(e){var t=function(e){var t,r=e.search(Zv);if(!(r<0))return"+"===(e=e.slice(r))[0]&&(t=!0,e=e.slice("+".length)),e=e.replace(Jv,""),t&&(e="+"+e),e}(e)||"";return"+"===t[0]?[t.slice("+".length),!0]:[t]}(e),2),r=t[0],n=t[1];return Yv.test(r)||(r=""),[r,n]}(e),o=Vv(n,2),a=o[0],i=o[1],l=Am(a);return i&&(t.digits||(t.startInternationalNumber(),l||(r=!0))),l&&this.inputDigits(l,t),{digits:l,justLeadingPlus:r}}},{key:"inputDigits",value:function(e,t){var r=t.digits,n=r.length<3&&r.length+e.length>=3;if(t.appendDigits(e),n&&this.extractIddPrefix(t),this.isWaitingForCountryCallingCode(t)){if(!this.extractCountryCallingCode(t))return}else t.appendNationalSignificantNumberDigits(e);t.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(t.getNationalDigits(),t.update)}},{key:"isWaitingForCountryCallingCode",value:function(e){var t=e.international,r=e.callingCode;return t&&!r}},{key:"extractCountryCallingCode",value:function(e){var t=lv("+"+e.getDigitsWithoutInternationalPrefix(),this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),r=t.countryCallingCode,n=t.number;if(r)return e.setCallingCode(r),e.update({nationalSignificantNumber:n}),!0}},{key:"reset",value:function(e){if(e){this.hasSelectedNumberingPlan=!0;var t=e._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=t&&Xv.test(t)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(e,t){if(this.hasSelectedNumberingPlan){var r=ov(e,this.metadata),n=r.nationalPrefix,o=r.nationalNumber,a=r.carrierCode;if(o!==e)return this.onExtractedNationalNumber(n,a,o,e,t),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(e,t,r){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(e,r);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var n=ov(e,this.metadata),o=n.nationalPrefix,a=n.nationalNumber,i=n.carrierCode;if(a!==t)return this.onExtractedNationalNumber(o,i,a,e,r),!0}}},{key:"onExtractedNationalNumber",value:function(e,t,r,n,o){var a,i,l=n.lastIndexOf(r);if(l>=0&&l===n.length-r.length){i=!0;var s=n.slice(0,l);s!==e&&(a=s)}o({nationalPrefix:e,carrierCode:t,nationalSignificantNumber:r,nationalSignificantNumberMatchesInput:i,complexPrefixBeforeNationalSignificantNumber:a}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function(e){return!!this.extractAnotherNationalSignificantNumber(e.getNationalDigits(),e.nationalSignificantNumber,e.update)||(this.extractIddPrefix(e)||this.fixMissingPlus(e)?(this.extractCallingCodeAndNationalSignificantNumber(e),!0):void 0)}},{key:"extractIddPrefix",value:function(e){var t=e.international,r=e.IDDPrefix,n=e.digits;if(e.nationalSignificantNumber,!t&&!r){var o=nv(n,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);return void 0!==o&&o!==n?(e.update({IDDPrefix:n.slice(0,n.length-o.length)}),this.startInternationalNumber(e),!0):void 0}}},{key:"fixMissingPlus",value:function(e){if(!e.international){var t=iv(e.digits,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),r=t.countryCallingCode;if(t.number,r)return e.update({missingPlus:!0}),this.startInternationalNumber(e),!0}}},{key:"startInternationalNumber",value:function(e){e.startInternationalNumber(),e.nationalSignificantNumber&&(e.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function(e){this.extractCountryCallingCode(e)&&this.extractNationalSignificantNumber(e.getNationalDigits(),e.update)}}])&&qv(t.prototype,r),n&&qv(t,n),e}();function e$(e){return(e$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function t$(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(n=(i=l.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==l.return||l.return()}finally{if(o)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function r$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var n$=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.metadata=new cm(r);var n=t$(this.getCountryAndCallingCode(t),2),o=n[0],a=n[1];this.defaultCountry=o,this.defaultCallingCode=a,this.reset()}var t,r,n;return t=e,(r=[{key:"getCountryAndCallingCode",value:function(e){var t,r;return e&&("object"===e$(e)?(t=e.defaultCountry,r=e.defaultCallingCode):t=e),t&&!this.metadata.hasCountry(t)&&(t=void 0),[t,r]}},{key:"input",value:function(e){var t=this.parser.input(e,this.state),r=t.digits;if(t.justLeadingPlus)this.formattedOutput="+";else if(r){var n;if(this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state),this.metadata.hasSelectedNumberingPlan()&&(n=this.formatter.format(r,this.state)),void 0===n&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var o=this.state.getNationalDigits();o&&(n=this.formatter.format(o,this.state))}this.formattedOutput=n?this.getFullNumber(n):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function(){var e=this;return this.state=new Sv({onCountryChange:function(t){e.country=t},onCallingCodeChange:function(t,r){e.metadata.selectNumberingPlan(t,r),e.formatter.reset(e.metadata.numberingPlan,e.state),e.parser.reset(e.metadata.numberingPlan)}}),this.formatter=new Kv({state:this.state,metadata:this.metadata}),this.parser=new Qv({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function(){e.determineTheCountryIfNeeded(),e.formatter.reset(e.metadata.numberingPlan,e.state)}}),this.state.reset(this.defaultCountry,this.defaultCallingCode),this.formattedOutput="",this}},{key:"isInternational",value:function(){return this.state.international}},{key:"getCallingCode",value:function(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function(){return this.getCallingCode()}},{key:"getCountry",value:function(){if(this.state.digits)return this._getCountry()}},{key:"_getCountry",value:function(){return this.state.country}},{key:"determineTheCountryIfNeeded",value:function(){this.state.country&&!this.isCountryCallingCodeAmbiguous()||this.determineTheCountry()}},{key:"getFullNumber",value:function(e){var t=this;if(this.isInternational()){var r=function(e){return t.formatter.getInternationalPrefixBeforeCountryCallingCode(t.state,{spacing:!!e})+e},n=this.state.callingCode;return r(n?e?"".concat(n," ").concat(e):n:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return e}},{key:"getNonFormattedNationalNumberWithPrefix",value:function(){var e=this.state,t=e.nationalSignificantNumber,r=e.complexPrefixBeforeNationalSignificantNumber,n=e.nationalPrefix,o=t,a=r||n;return a&&(o=a+o),o}},{key:"getNonFormattedNumber",value:function(){var e=this.state.nationalSignificantNumberMatchesInput;return this.getFullNumber(e?this.getNonFormattedNationalNumberWithPrefix():this.state.getNationalDigits())}},{key:"getNonFormattedTemplate",value:function(){var e=this.getNonFormattedNumber();if(e)return e.replace(/[\+\d]/g,"x")}},{key:"isCountryCallingCodeAmbiguous",value:function(){var e=this.state.callingCode,t=this.metadata.getCountryCodesForCallingCode(e);return t&&t.length>1}},{key:"determineTheCountry",value:function(){this.state.setCountry(sv(this.isInternational()?this.state.callingCode:this.defaultCallingCode,this.state.nationalSignificantNumber,this.metadata))}},{key:"getNumberValue",value:function(){var e=this.state,t=e.digits,r=e.callingCode,n=e.country,o=e.nationalSignificantNumber;if(t)return this.isInternational()?r?"+"+r+o:"+"+t:n||r?"+"+(n?this.metadata.countryCallingCode():r)+o:void 0}},{key:"getNumber",value:function(){var e=this.state,t=e.nationalSignificantNumber,r=e.carrierCode,n=e.callingCode,o=this._getCountry();if(t&&(o||n)){var a=new ev(o||n,t,this.metadata.metadata);return r&&(a.carrierCode=r),a}}},{key:"isPossible",value:function(){var e=this.getNumber();return!!e&&e.isPossible()}},{key:"isValid",value:function(){var e=this.getNumber();return!!e&&e.isValid()}},{key:"getNationalNumber",value:function(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}])&&r$(t.prototype,r),n&&r$(t,n),e}();function o$(e){return new cm(e).getCountries()}function a$(e){var t=e.country,r=e.international,n=e.withCountryCallingCode,o=e.metadata;return t&&r&&!n?"+".concat(vm(t,o)):""}function i$(e,t){return t&&" "===(e=e.slice(t.length))[0]&&(e=e.slice(1)),e}function l$(){return(l$=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function s$(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var u$=function(e){function r(e,r){var n=e.country,o=e.international,a=e.withCountryCallingCode,i=e.metadata,l=s$(e,["country","international","withCountryCallingCode","metadata"]),s=t.useCallback((function(e){var t=new n$(n,i),r=a$({country:n,international:o,withCountryCallingCode:a,metadata:i}),l=t.input(r+e),s=t.getTemplate();return r&&(l=i$(l,r),s&&(s=i$(s,r))),{text:l,template:s}}),[n,i]);return u.default.createElement(tm,l$({},l,{ref:r,parse:Tm,format:s}))}return(r=u.default.forwardRef(r)).propTypes={value:js.string.isRequired,onChange:js.func.isRequired,country:js.string,international:js.bool,withCountryCallingCode:js.bool,metadata:js.object.isRequired},r.defaultProps={metadata:e},r}();function d$(){return(d$=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function c$(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var f$=function(e){function r(e,r){var n=e.value,o=e.onChange,a=e.country,i=e.international,l=e.withCountryCallingCode,s=e.metadata,d=e.inputComponent,c=c$(e,["value","onChange","country","international","withCountryCallingCode","metadata","inputComponent"]),f=a$({country:a,international:i,withCountryCallingCode:l,metadata:s}),p=t.useCallback((function(e){var t=Im(e.target.value);t===n&&(0===p$(f,t,a,s).indexOf(e.target.value)&&(t=t.slice(0,-1)));o(t)}),[f,n,o,a,s]);return u.default.createElement(d,d$({},c,{ref:r,value:p$(f,n,a,s),onChange:p}))}return(r=u.default.forwardRef(r)).propTypes={value:js.string.isRequired,onChange:js.func.isRequired,country:js.string,international:js.bool,withCountryCallingCode:js.bool,metadata:js.object.isRequired,inputComponent:js.elementType.isRequired},r.defaultProps={metadata:e,inputComponent:"input"},r}();function p$(e,t,r,n){return i$(function(e,t,r){return r||(r=t,t=void 0),new n$(t,r).input(e)}(e+t,r,n),e)}function h$(e){return String.fromCodePoint(127397+e.toUpperCase().charCodeAt(0))}function y$(){return(y$=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function g$(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function b$(e){var r=e.value,n=e.onChange,o=e.options,a=g$(e,["value","onChange","options"]),i=t.useCallback((function(e){var t=e.target.value;n("ZZ"===t?void 0:t)}),[n]);return t.useMemo((function(){return $$(o,r)}),[o,r]),u.default.createElement("select",y$({},a,{value:r||"ZZ",onChange:i}),o.map((function(e){var t=e.value,r=e.label,n=e.divider;return u.default.createElement("option",{key:n?"|":t||"ZZ",value:n?"|":t||"ZZ",disabled:!!n,style:n?m$:void 0},r)})))}b$.propTypes={value:js.string,onChange:js.func.isRequired,options:js.arrayOf(js.shape({value:js.string,label:js.string,divider:js.bool})).isRequired};var m$={fontSize:"1px",backgroundColor:"currentColor",color:"inherit"};function v$(e){var r=e.value,n=e.options,o=e.className,a=e.iconComponent;e.getIconAspectRatio;var i=e.arrowComponent,l=e.unicodeFlags,s=g$(e,["value","options","className","iconComponent","getIconAspectRatio","arrowComponent","unicodeFlags"]),d=t.useMemo((function(){return $$(n,r)}),[n,r]);return u.default.createElement("div",{className:"PhoneInputCountry"},u.default.createElement(b$,y$({},s,{value:r,options:n,className:Hb("PhoneInputCountrySelect",o)})),l&&r&&u.default.createElement("div",{className:"PhoneInputCountryIconUnicode"},function(e){return h$(e[0])+h$(e[1])}(r)),!(l&&r)&&u.default.createElement(a,{country:r,label:d&&d.label,aspectRatio:l?1:void 0}),u.default.createElement(i,null))}function $$(e,t){var r=e,n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var a;if(n){if(o>=r.length)break;a=r[o++]}else{if((o=r.next()).done)break;a=o.value}var i=a;if(!i.divider&&i.value===t)return i}}function w$(){return(w$=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function x$(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function O$(e){var t=e.country,r=e.countryName,n=e.flags,o=e.flagUrl,a=x$(e,["country","countryName","flags","flagUrl"]);return n&&n[t]?n[t]({title:r}):u.default.createElement("img",w$({},a,{alt:r,role:r?void 0:"presentation",src:o.replace("{XX}",t).replace("{xx}",t.toLowerCase())}))}function _$(){return(_$=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function E$(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function S$(e){var t=e.aspectRatio,r=E$(e,["aspectRatio"]);return 1===t?u.default.createElement(k$,r):u.default.createElement(P$,r)}function P$(e){var t=e.title,r=E$(e,["title"]);return u.default.createElement("svg",_$({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 75 50"}),u.default.createElement("title",null,t),u.default.createElement("g",{className:"PhoneInputInternationalIconGlobe",stroke:"currentColor",fill:"none",strokeWidth:"2",strokeMiterlimit:"10"},u.default.createElement("path",{strokeLinecap:"round",d:"M47.2,36.1C48.1,36,49,36,50,36c7.4,0,14,1.7,18.5,4.3"}),u.default.createElement("path",{d:"M68.6,9.6C64.2,12.3,57.5,14,50,14c-7.4,0-14-1.7-18.5-4.3"}),u.default.createElement("line",{x1:"26",y1:"25",x2:"74",y2:"25"}),u.default.createElement("line",{x1:"50",y1:"1",x2:"50",y2:"49"}),u.default.createElement("path",{strokeLinecap:"round",d:"M46.3,48.7c1.2,0.2,2.5,0.3,3.7,0.3c13.3,0,24-10.7,24-24S63.3,1,50,1S26,11.7,26,25c0,2,0.3,3.9,0.7,5.8"}),u.default.createElement("path",{strokeLinecap:"round",d:"M46.8,48.2c1,0.6,2.1,0.8,3.2,0.8c6.6,0,12-10.7,12-24S56.6,1,50,1S38,11.7,38,25c0,1.4,0.1,2.7,0.2,4c0,0.1,0,0.2,0,0.2"})),u.default.createElement("path",{className:"PhoneInputInternationalIconPhone",stroke:"none",fill:"currentColor",d:"M12.4,17.9c2.9-2.9,5.4-4.8,0.3-11.2S4.1,5.2,1.3,8.1C-2,11.4,1.1,23.5,13.1,35.6s24.3,15.2,27.5,11.9c2.8-2.8,7.8-6.3,1.4-11.5s-8.3-2.6-11.2,0.3c-2,2-7.2-2.2-11.7-6.7S10.4,19.9,12.4,17.9z"}))}function k$(e){var t=e.title,r=E$(e,["title"]);return u.default.createElement("svg",_$({},r,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50"}),u.default.createElement("title",null,t),u.default.createElement("g",{className:"PhoneInputInternationalIconGlobe",stroke:"currentColor",fill:"none",strokeWidth:"2",strokeLinecap:"round"},u.default.createElement("path",{d:"M8.45,13A21.44,21.44,0,1,1,37.08,41.56"}),u.default.createElement("path",{d:"M19.36,35.47a36.9,36.9,0,0,1-2.28-13.24C17.08,10.39,21.88.85,27.8.85s10.72,9.54,10.72,21.38c0,6.48-1.44,12.28-3.71,16.21"}),u.default.createElement("path",{d:"M17.41,33.4A39,39,0,0,1,27.8,32.06c6.62,0,12.55,1.5,16.48,3.86"}),u.default.createElement("path",{d:"M44.29,8.53c-3.93,2.37-9.86,3.88-16.49,3.88S15.25,10.9,11.31,8.54"}),u.default.createElement("line",{x1:"27.8",y1:"0.85",x2:"27.8",y2:"34.61"}),u.default.createElement("line",{x1:"15.2",y1:"22.23",x2:"49.15",y2:"22.23"})),u.default.createElement("path",{className:"PhoneInputInternationalIconPhone",stroke:"transparent",fill:"currentColor",d:"M9.42,26.64c2.22-2.22,4.15-3.59.22-8.49S3.08,17,.93,19.17c-2.49,2.48-.13,11.74,9,20.89s18.41,11.5,20.89,9c2.15-2.15,5.91-4.77,1-8.71s-6.27-2-8.49.22c-1.55,1.55-5.48-1.69-8.86-5.08S7.87,28.19,9.42,26.64Z"}))}function C$(e,t){return!!$m(e,t)||(console.error("Country not found: ".concat(e)),!1)}function D$(e,t){return e&&0===(e=e.filter((function(e){return C$(e,t)}))).length&&(e=void 0),e}function M$(e){var t=e.flags,r=e.flagUrl,n=e.flagComponent,o=e.internationalIcon;function a(e){var a=e.country,i=e.label,l=e.aspectRatio,s=o===S$?l:void 0;return u.default.createElement("div",{className:Hb("PhoneInputCountryIcon",{"PhoneInputCountryIcon--square":1===s,"PhoneInputCountryIcon--border":a})},a?u.default.createElement(n,{country:a,countryName:i,flags:t,flagUrl:r,className:"PhoneInputCountryIconImg"}):u.default.createElement(o,{title:i,aspectRatio:s,className:"PhoneInputCountryIconImg"}))}return a.propTypes={country:js.string,label:js.string.isRequired,aspectRatio:js.number},a}v$.propTypes={iconComponent:js.elementType,arrowComponent:js.elementType.isRequired,unicodeFlags:js.bool},v$.defaultProps={arrowComponent:function(){return u.default.createElement("div",{className:"PhoneInputCountrySelectArrow"})}},O$.propTypes={country:js.string.isRequired,countryName:js.string.isRequired,flags:js.objectOf(js.elementType),flagUrl:js.string.isRequired},S$.propTypes={title:js.string.isRequired,aspectRatio:js.number},P$.propTypes={title:js.string.isRequired},k$.propTypes={title:js.string.isRequired},M$({flagUrl:"https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",flagComponent:O$,internationalIcon:S$});var A$=js.shape({country_calling_codes:js.object.isRequired,countries:js.object.isRequired}),I$=js.objectOf(js.string),T$=/^\d+$/;function N$(e,t){var r="+"+vm(e,t);return(t=new cm(t)).selectNumberingPlan(e),t.numberingPlan.leadingDigits()&&T$.test(t.numberingPlan.leadingDigits())&&(r+=t.numberingPlan.leadingDigits()),r}function j$(e,t){return wv(e||"",t)}function F$(e,t){var r=t.prevCountry,n=t.newCountry,o=t.metadata,a=t.useNationalFormat;if(r===n)return e;if(!e)return a?"":N$(n,o);if(n){if("+"===e[0]){if(a)return 0===e.indexOf("+"+vm(n,o))?function(e,t,r){if(t){var n="+"+vm(t,r);if(e.length<n.length){if(0===n.indexOf(e))return""}else if(0===e.indexOf(n))return e.slice(n.length)}for(var o=0,a=Object.keys(r.country_calling_codes);o<a.length;o++){var i=a[o];if(e.indexOf(i)==="+".length)return e.slice("+".length+i.length)}return""}(e,n,o):"";if(r){var i=N$(n,o);return 0===e.indexOf(i)?e:i}var l=N$(n,o);return 0===e.indexOf(l)?e:l}}else if("+"!==e[0])return R$(e,r,o)||"";return e}function R$(e,t,r){if(e){if("+"===e[0]){if("+"===e)return;var n=new n$(t,r);return n.input(e),n.getNumberValue()}if(t){var o=G$(e,t,r);return"+".concat(vm(t,r)).concat(o||"")}}}function L$(e,t,r){var n=G$(e,t,r);if(n){var o=n.length-function(e,t){return(t=new cm(t)).selectNumberingPlan(e),t.numberingPlan.possibleLengths()[t.numberingPlan.possibleLengths().length-1]}(t,r);if(o>0)return e.slice(0,e.length-o)}return e}function B$(e,t){var r=t.country,n=t.countries,o=t.required,a=t.metadata;if("+"===e)return r;var i=function(e,t){var r=new n$(null,t);return r.input(e),r.getCountry()}(e,a);return i&&(!n||n.indexOf(i)>=0)?i:!r||o||U$(e,r,a)?r:void 0}function z$(e,t,r){if(0===e.indexOf(N$(t,r))){var n=new n$(t,r);n.input(e);var o=n.getNumber();return o?o.formatNational().replace(/\D/g,""):""}return e.replace(/\D/g,"")}function H$(e,t,r){return String.prototype.localeCompare?e.localeCompare(t,r):e<t?-1:e>t?1:0}function G$(e,t,r){var n=new n$(t,r);n.input(e);var o=n.getNumber();return o&&o.nationalNumber}function U$(e,t,r){for(var n=N$(t,r),o=0;o<e.length&&o<n.length;){if(e[o]!==n[o])return!1;o++}return!0}function W$(e){var t=e.value,r=e.phoneNumber,n=e.defaultCountry,o=e.international,a=e.useNationalFormat,i=e.metadata;return(!1===o||a)&&r&&r.country?function(e){return e.formatNational().replace(/\D/g,"")}(r):!t&&o&&n?N$(n,i):t}function K$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function V$(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?K$(Object(r),!0).forEach((function(t){q$(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K$(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function q$(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Y$(e){return(Y$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Z$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function J$(){return(J$=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function X$(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Q$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ew(e){return(ew=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tw(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rw(e,t){return(rw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nw(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var ow=function(e){function t(e){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=function(e,t){return!t||"object"!==Y$(t)&&"function"!=typeof t?tw(e):t}(this,ew(t).call(this,e)),nw(tw(r),"inputRef",u.default.createRef()),nw(tw(r),"setInputRef",(function(e){r.inputRef.current=e;var t=r.props.inputRef;t&&("function"==typeof t?t(e):t.current=e)})),nw(tw(r),"isCountrySupportedWithError",(function(e){return C$(e,r.props.metadata)})),nw(tw(r),"onCountryChange",(function(e){var t=r.props,n=t.international,o=t.metadata,a=t.onChange,i=t.focusInputOnCountrySelection,l=r.state,s=F$(l.phoneDigits,{prevCountry:l.country,newCountry:e,metadata:o,useNationalFormat:!n}),u=R$(s,e,o);i&&r.inputRef.current.focus(),r.setState({country:e,hasUserSelectedACountry:!0,phoneDigits:s,value:u},(function(){a(u)}))})),nw(tw(r),"onChange",(function(e){var t=r.props,n=t.defaultCountry,o=t.onChange,a=t.addInternationalOption,i=t.international,l=t.limitMaxLength,s=t.countryCallingCodeEditable,u=t.metadata,d=r.state,c=d.countries,f=function(e,t){var r,n=t.prevPhoneDigits,o=t.country,a=t.defaultCountry,i=t.countryRequired,l=t.getAnyCountry,s=t.countries,u=t.international,d=t.limitMaxLength,c=t.countryCallingCodeEditable,f=t.metadata;if(u&&!1===c){var p,h=N$(o,f);if(0!==e.indexOf(h))return e&&"+"!==e[0]?p=R$(e=h+e,o,f):e=h,{phoneDigits:e,value:p,country:o}}return!1===u&&o&&e&&"+"===e[0]&&(e=z$(e,o,f)),e&&o&&d&&(e=L$(e,o,f)),!e||"+"===e[0]||o&&!u||(e="+"+e),!e&&n&&"+"===n[0]&&(o=u?void 0:a),"+"===e&&n&&"+"===n[0]&&n.length>"+".length&&(o=void 0),e&&(r="+"===e[0]&&("+"===e||o&&0===N$(o,f).indexOf(e))?void 0:R$(e,o,f)),r&&(o=B$(r,{country:o,countries:s,metadata:f}),!1===u&&o&&e&&"+"===e[0]&&(r=R$(e=z$(e,o,f),o,f))),!o&&i&&(o=a||l()),{phoneDigits:e,country:o,value:r}}(e,{prevPhoneDigits:d.phoneDigits,country:d.country,countryRequired:!a,defaultCountry:n,getAnyCountry:function(){return r.getFirstSupportedCountry({countries:c})},countries:c,international:i,limitMaxLength:l,countryCallingCodeEditable:s,metadata:u}),p=f.phoneDigits,h=f.country,y=f.value,g={phoneDigits:p,value:y,country:h};!1===s&&(y||p!==r.state.phoneDigits||(g.forceRerender={})),r.setState(g,(function(){return o(y)}))})),nw(tw(r),"_onFocus",(function(){return r.setState({isFocused:!0})})),nw(tw(r),"_onBlur",(function(){return r.setState({isFocused:!1})})),nw(tw(r),"onFocus",(function(e){r._onFocus();var t=r.props.onFocus;t&&t(e)})),nw(tw(r),"onBlur",(function(e){var t=r.props.onBlur;r._onBlur(),t&&t(e)})),nw(tw(r),"onCountryFocus",(function(e){r._onFocus();var t=r.props.countrySelectProps;if(t){var n=t.onFocus;n&&n(e)}})),nw(tw(r),"onCountryBlur",(function(e){r._onBlur();var t=r.props.countrySelectProps;if(t){var n=t.onBlur;n&&n(e)}}));var n=r.props,o=n.value;n.labels;var a=n.international,i=n.addInternationalOption,l=n.displayInitialValueAsLocalNumber,s=n.initialValueFormat,d=n.metadata,c=r.props,f=c.defaultCountry,p=c.countries;f&&(r.isCountrySupportedWithError(f)||(f=void 0)),p=D$(p,d);var h=j$(o,d);r.CountryIcon=M$(r.props);var y=function(e){var t,r=e.value,n=e.phoneNumber,o=e.defaultCountry,a=e.getAnyCountry,i=e.countries,l=e.required,s=e.metadata;return n&&n.country?t=n.country:o&&(r&&!U$(r,o,s)||(t=o)),i&&i.indexOf(t)<0&&(t=void 0),!t&&l&&i&&i.length>0&&(t=a()),t}({value:o,phoneNumber:h,defaultCountry:f,required:!i,countries:p||o$(d),getAnyCountry:function(){return r.getFirstSupportedCountry({countries:p})},metadata:d});return r.state={props:r.props,country:y,countries:p,phoneDigits:W$({value:o,phoneNumber:h,defaultCountry:f,international:a,useNationalFormat:l||"national"===s,metadata:d}),value:o},r}var r,n,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rw(e,t)}(t,u["default"].PureComponent),r=t,o=[{key:"getDerivedStateFromProps",value:function(e,t){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Z$(Object(r),!0).forEach((function(t){nw(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z$(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({props:e},function(e,t,r){var n=e.metadata,o=e.countries,a=e.defaultCountry,i=e.value,l=e.reset,s=e.international,u=e.displayInitialValueAsLocalNumber,d=e.initialValueFormat,c=t.defaultCountry,f=t.value,p=t.reset;r.country;var h=r.value,y=r.hasUserSelectedACountry,g=function(e){return W$(V$({},e,{international:s,useNationalFormat:u||"national"===d,metadata:n}))};if(l!==p)return{phoneDigits:g({value:void 0,defaultCountry:a}),value:void 0,country:a,hasUserSelectedACountry:void 0};if(a!==c){var b=!a||C$(a,n),m=!h||s&&h===g({value:void 0,defaultCountry:c});if(!y&&b&&!i&&m)return{country:a,phoneDigits:g({value:void 0,defaultCountry:a}),value:void 0}}if(i!==f&&i!==h){var v,$,w;if(i){v=j$(i,n);var x=D$(o,n);v&&v.country?(!x||x.indexOf(v.country)>=0)&&($=v.country):$=B$(i,{country:void 0,countries:x,metadata:n})}return i||(w={hasUserSelectedACountry:void 0}),V$({},w,{phoneDigits:g({phoneNumber:v,value:i,defaultCountry:a}),value:i,country:i?$:a})}}(e,t.props,t))}}],(n=[{key:"componentDidMount",value:function(){var e=this.props.onCountryChange,t=this.props.defaultCountry,r=this.state.country;e&&(t&&(this.isCountrySupportedWithError(t)||(t=void 0)),r!==t&&e(r))}},{key:"componentDidUpdate",value:function(e,t){var r=this.props.onCountryChange,n=this.state.country;r&&n!==t.country&&r(n)}},{key:"getCountrySelectOptions",value:function(e){var t,r,n=e.countries,o=this.props,a=o.international,i=o.countryCallingCodeEditable,l=o.countryOptionsOrder,s=o.addInternationalOption,u=o.labels,d=o.locales,c=o.metadata;return t=function(){return function(e,t){if(!t)return e;var r=[],n=[],o=r,a=t,i=Array.isArray(a),l=0;for(a=i?a:a[Symbol.iterator]();;){var s;if(i){if(l>=a.length)break;s=a[l++]}else{if((l=a.next()).done)break;s=l.value}var u=s;"|"===u?o.push({divider:!0}):"..."===u||"…"===u?o=n:function(){var t=void 0;t="🌐"===u?void 0:u;var r=e.indexOf(e.filter((function(e){return e.value===t}))[0]),n=e[r];e.splice(r,1),o.push(n)}()}return r.concat(e).concat(n)}(function(e){var t=e.countries,r=e.countryNames,n=e.addInternationalOption,o=e.compareStringsLocales,a=e.compareStrings;a||(a=H$);var i=t.map((function(e){return{value:e,label:r[e]||e}}));return i.sort((function(e,t){return a(e.label,t.label,o)})),n&&i.unshift({label:r.ZZ}),i}({countries:n||o$(c),countryNames:u,addInternationalOption:(!a||!1!==i)&&s,compareStringsLocales:d}),function(e,t){if(e&&(e=e.filter((function(e){switch(e){case"🌐":case"|":case"...":case"…":return!0;default:return C$(e,t)}}))).length>0)return e}(l,c))},r=[n,l,s,u,c],lw&&function(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;){if(e[r]!==t[r])return!1;r++}return!0}(r,lw)||(iw=t(),lw=r),iw}},{key:"getFirstSupportedCountry",value:function(e){var t=e.countries;return this.getCountrySelectOptions({countries:t})[0].value}},{key:"render",value:function(){var e=this.props,t=e.name,r=e.disabled,n=e.autoComplete,o=e.style,a=e.className;e.inputRef;var i=e.inputComponent,l=e.numberInputProps,s=e.smartCaret,d=e.countrySelectComponent,c=e.countrySelectProps,f=e.containerComponent;e.defaultCountry,e.countries,e.countryOptionsOrder;var p=e.labels;e.flags,e.flagComponent,e.flagUrl,e.addInternationalOption,e.internationalIcon,e.displayInitialValueAsLocalNumber,e.initialValueFormat,e.onCountryChange,e.limitMaxLength,e.countryCallingCodeEditable,e.focusInputOnCountrySelection,e.reset;var h=e.metadata;e.international,e.locales;var y=X$(e,["name","disabled","autoComplete","style","className","inputRef","inputComponent","numberInputProps","smartCaret","countrySelectComponent","countrySelectProps","containerComponent","defaultCountry","countries","countryOptionsOrder","labels","flags","flagComponent","flagUrl","addInternationalOption","internationalIcon","displayInitialValueAsLocalNumber","initialValueFormat","onCountryChange","limitMaxLength","countryCallingCodeEditable","focusInputOnCountrySelection","reset","metadata","international","locales"]),g=this.state,b=g.country,m=g.countries,v=g.phoneDigits,$=g.isFocused,w=s?u$:f$,x=this.getCountrySelectOptions({countries:m});return u.default.createElement(f,{style:o,className:Hb(a,"PhoneInput",{"PhoneInput--focus":$})},u.default.createElement(d,J$({name:t?"".concat(t,"Country"):void 0,"aria-label":p.country},c,{value:b,options:x,onChange:this.onCountryChange,onFocus:this.onCountryFocus,onBlur:this.onCountryBlur,disabled:r||c&&c.disabled,iconComponent:this.CountryIcon})),u.default.createElement(w,J$({ref:this.setInputRef,type:"tel",autoComplete:n},l,y,{name:t,metadata:h,country:b,value:v||"",onChange:this.onChange,onFocus:this.onFocus,onBlur:this.onBlur,disabled:r,inputComponent:i,className:Hb("PhoneInputInput",l&&l.className,y.className)})))}}])&&Q$(r.prototype,n),o&&Q$(r,o),t}(),aw=u.default.forwardRef((function(e,t){return u.default.createElement(ow,J$({},e,{inputRef:t}))}));aw.propTypes={value:js.string,onChange:js.func.isRequired,onFocus:js.func,onBlur:js.func,disabled:js.bool,autoComplete:js.string.isRequired,initialValueFormat:js.oneOf(["national"]),displayInitialValueAsLocalNumber:js.bool,defaultCountry:js.string,countries:js.arrayOf(js.string),labels:I$.isRequired,locales:js.oneOfType([js.string,js.arrayOf(js.string)]),flagUrl:js.string.isRequired,flags:js.objectOf(js.elementType),flagComponent:js.elementType.isRequired,addInternationalOption:js.bool.isRequired,internationalIcon:js.elementType.isRequired,countryOptionsOrder:js.arrayOf(js.string),style:js.object,className:js.string,countrySelectComponent:js.elementType.isRequired,countrySelectProps:js.object,inputComponent:js.elementType.isRequired,containerComponent:js.elementType.isRequired,numberInputProps:js.object,smartCaret:js.bool.isRequired,international:js.bool,limitMaxLength:js.bool.isRequired,countryCallingCodeEditable:js.bool.isRequired,metadata:A$.isRequired,onCountryChange:js.func,focusInputOnCountrySelection:js.bool.isRequired},aw.defaultProps={autoComplete:"tel",countrySelectComponent:v$,flagComponent:O$,flagUrl:"https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg",internationalIcon:S$,inputComponent:"input",containerComponent:"div",reset:js.any,smartCaret:!0,addInternationalOption:!0,limitMaxLength:!1,countryCallingCodeEditable:!0,focusInputOnCountrySelection:!0};var iw,lw,sw=aw;function uw(e){return(uw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dw(e,t,r){if(r||"object"===uw(t)&&(r=t,t="NATIONAL"),!e)return"";var n=wv(e,r);if(!n)return"";switch(t){case"National":t="NATIONAL";break;case"International":t="INTERNATIONAL"}return n.format(t)}function cw(e,t){return dw(e,"INTERNATIONAL",t)}var fw={ext:"ext.",country:"Phone number country",phone:"Phone",AB:"Abkhazia",AC:"Ascension Island",AD:"Andorra",AE:"United Arab Emirates",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AO:"Angola",AQ:"Antarctica",AR:"Argentina",AS:"American Samoa",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei Darussalam",BO:"Bolivia",BQ:"Bonaire, Sint Eustatius and Saba",BR:"Brazil",BS:"Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CC:"Cocos (Keeling) Islands",CD:"Congo, Democratic Republic of the",CF:"Central African Republic",CG:"Congo",CH:"Switzerland",CI:"Cote d'Ivoire",CK:"Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CU:"Cuba",CV:"Cape Verde",CW:"Curaçao",CX:"Christmas Island",CY:"Cyprus",CZ:"Czech Republic",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands",FM:"Federated States of Micronesia",FO:"Faroe Islands",FR:"France",GA:"Gabon",GB:"United Kingdom",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GS:"South Georgia and the South Sandwich Islands",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong",HM:"Heard Island and McDonald Islands",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IL:"Israel",IM:"Isle of Man",IN:"India",IO:"British Indian Ocean Territory",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KM:"Comoros",KN:"Saint Kitts and Nevis",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KY:"Cayman Islands",KZ:"Kazakhstan",LA:"Laos",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MF:"Saint Martin (French Part)",MG:"Madagascar",MH:"Marshall Islands",MK:"North Macedonia",ML:"Mali",MM:"Burma",MN:"Mongolia",MO:"Macao",MP:"Northern Mariana Islands",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NP:"Nepal",NR:"Nauru",NU:"Niue",NZ:"New Zealand",OM:"Oman",OS:"South Ossetia",PA:"Panama",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn",PR:"Puerto Rico",PS:"Palestine",PT:"Portugal",PW:"Palau",PY:"Paraguay",QA:"Qatar",RE:"Reunion",RO:"Romania",RS:"Serbia",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",SS:"South Sudan",ST:"Sao Tome and Principe",SV:"El Salvador",SX:"Sint Maarten",SY:"Syria",SZ:"Swaziland",TA:"Tristan da Cunha",TC:"Turks and Caicos Islands",TD:"Chad",TF:"French Southern Territories",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania",UA:"Ukraine",UG:"Uganda",UM:"United States Minor Outlying Islands",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VA:"Holy See (Vatican City State)",VC:"Saint Vincent and the Grenadines",VE:"Venezuela",VG:"Virgin Islands, British",VI:"Virgin Islands, U.S.",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WS:"Samoa",XK:"Kosovo",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe",ZZ:"International"};function pw(){return(pw=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function hw(e){var t=u.default.forwardRef((function(e,t){return u.default.createElement(sw,pw({ref:t},e))}));return t.propTypes={metadata:A$.isRequired,labels:I$.isRequired},t.defaultProps={metadata:e,labels:fw},t}function yw(e,t){var r=Array.prototype.slice.call(t);return r.push(Bb),e.apply(this,r)}hw();var gw=hw(Bb);function bw(){return yw(dw,arguments)}function mw(){return yw(cw,arguments)}function vw(){return yw(_v,arguments)}const $w=["AD","AT","BE","CA","CH","CZ","DE","DK","EE","DZ","ES","FI","FR","GB","GF","GG","GI","GP","GR","HR","IE","IL","IS","IT","LT","LU","MA","MC","NL","NO","PF","PL","PT","RE","RS","RU","SE","TN","US"],ww={ext:"ext.",country:"Numéro de téléphone pays",phone:"Téléphone",AD:"Andorra",AT:"Österreich",BE:"Belgique",CA:"Canada",CH:"Schweiz",CZ:"Česko",DE:"Deutschland",DK:"Danmark",DZ:"Al-Jazā'ir",EE:"Eesti",ES:"España",FI:"Finland",FR:"France",GB:"United Kingdom",GF:"Guyane française",GG:"Guernsey",GI:"Djebel Tariq",GP:"Guadeloupe",GR:"Guinée équatoriale",HR:"Hrvatska",IE:"Ireland",IL:"Israël",IS:"Ísland",IT:"Italia",LT:"Lietuva",LU:"Luxembourg",MA:"Al-Maġrib",MC:"Monaco",NL:"Nederland",NO:"Norge",PF:"Polynésie française",PL:"Polska",PT:"República Portuguesa",RE:"Île de La Réunion",RS:"Republika Srbija",RU:"Rossiïa",SE:"Sverige",TN:"Tūnis",US:"United States",ZZ:"International"},xw=c.default.div`
650
650
  position: relative;
651
651
  padding-left: ${oe(22)};
652
652