From fac3450d4b88c6906c19dcc6c3ff43c1b7884383 Mon Sep 17 00:00:00 2001 From: Jack OConnor Date: Wed, 4 Dec 2024 18:33:02 +0000 Subject: [PATCH] Release v25.0.1 --- .github/ISSUE_TEMPLATE.md | 2 +- README.md | 10 +++++----- build/js/data.js | 2 +- build/js/data.min.js | 2 +- build/js/intlTelInput.js | 4 ++-- build/js/intlTelInput.min.js | 4 ++-- build/js/intlTelInputWithUtils.js | 4 ++-- build/js/intlTelInputWithUtils.min.js | 4 ++-- composer.json | 2 +- package-lock.json | 2 +- package.json | 2 +- react/README.md | 2 +- react/build/IntlTelInput.cjs | 2 +- react/build/IntlTelInput.js | 2 +- react/build/IntlTelInputWithUtils.cjs | 2 +- react/build/IntlTelInputWithUtils.js | 2 +- react/demo/set-number/set-number-bundle.js | 2 +- react/demo/simple/simple-bundle.js | 2 +- react/demo/toggle-disabled/toggle-disabled-bundle.js | 2 +- react/demo/validation/validation-bundle.js | 2 +- vue/README.md | 2 +- vue/build/IntlTelInput.mjs | 2 +- vue/build/IntlTelInputWithUtils.mjs | 2 +- 23 files changed, 31 insertions(+), 31 deletions(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 34de38e0f..cc050bdfb 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,7 +1,7 @@ ### Plugin version -e.g. v25.0.0 (please try latest version) +e.g. v25.0.1 (please try latest version) ### Steps to reproduce 1. diff --git a/README.md b/README.md index fbe2b7343..47e1077a5 100644 --- a/README.md +++ b/README.md @@ -75,16 +75,16 @@ _Note: We have now dropped support for all versions of Internet Explorer because ## Getting Started (Using a CDN) 1. Add the CSS ```html - + ``` 2. Add the plugin script and initialise it on your input element ```html - + ``` @@ -317,7 +317,7 @@ The `loadUtils` option takes a function which returns a Promise which resolves t ```js // (A) import utils module from a CDN intlTelInput(htmlInputElement, { - loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@25.0.0/build/js/utils.js"), + loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@25.0.1/build/js/utils.js"), }); // (B) import utils module from your own hosted version of utils.js @@ -598,7 +598,7 @@ The `loadUtils` option takes a function which returns a Promise which resolves t ```js // (A) import utils module from a CDN intlTelInput(htmlInputElement, { - loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@25.0.0/build/js/utils.js"), + loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@25.0.1/build/js/utils.js"), }); // (B) import utils module from your own hosted version of utils.js diff --git a/build/js/data.js b/build/js/data.js index 4386f0ed9..874f6d57b 100644 --- a/build/js/data.js +++ b/build/js/data.js @@ -1,5 +1,5 @@ /* - * International Telephone Input v25.0.0 + * International Telephone Input v25.0.1 * https://github.com/jackocnr/intl-tel-input.git * Licensed under the MIT license */ diff --git a/build/js/data.min.js b/build/js/data.min.js index 100cdefed..fa6a65fea 100644 --- a/build/js/data.min.js +++ b/build/js/data.min.js @@ -1,5 +1,5 @@ /* - * International Telephone Input v25.0.0 + * International Telephone Input v25.0.1 * https://github.com/jackocnr/intl-tel-input.git * Licensed under the MIT license */ diff --git a/build/js/intlTelInput.js b/build/js/intlTelInput.js index eae004aa9..85e75815d 100644 --- a/build/js/intlTelInput.js +++ b/build/js/intlTelInput.js @@ -1,5 +1,5 @@ /* - * International Telephone Input v25.0.0 + * International Telephone Input v25.0.1 * https://github.com/jackocnr/intl-tel-input.git * Licensed under the MIT license */ @@ -3144,7 +3144,7 @@ var factoryOutput = (() => { attachUtils, startedLoadingUtilsScript: false, startedLoadingAutoCountry: false, - version: "25.0.0" + version: "25.0.1" } ); var intl_tel_input_default = intlTelInput; diff --git a/build/js/intlTelInput.min.js b/build/js/intlTelInput.min.js index 5cddf5eac..fe45c45ea 100644 --- a/build/js/intlTelInput.min.js +++ b/build/js/intlTelInput.min.js @@ -1,5 +1,5 @@ /* - * International Telephone Input v25.0.0 + * International Telephone Input v25.0.1 * https://github.com/jackocnr/intl-tel-input.git * Licensed under the MIT license */ @@ -13,7 +13,7 @@ } }(() => { -var factoryOutput=(()=>{var L=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var H=Object.getOwnPropertyNames;var R=Object.prototype.hasOwnProperty;var F=(a,t)=>{for(var e in t)L(a,e,{get:t[e],enumerable:!0})},B=(a,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of H(t))!R.call(a,n)&&n!==e&&L(a,n,{get:()=>t[n],enumerable:!(i=O(t,n))||i.enumerable});return a};var j=a=>B(L({},"__esModule",{value:!0}),a);var Y={};F(Y,{Iti:()=>w,default:()=>q});var D=[["af","93"],["ax","358",1,["18"]],["al","355"],["dz","213"],["as","1",5,["684"]],["ad","376"],["ao","244"],["ai","1",6,["264"]],["ag","1",7,["268"]],["ar","54"],["am","374"],["aw","297"],["ac","247"],["au","61",0],["at","43"],["az","994"],["bs","1",8,["242"]],["bh","973"],["bd","880"],["bb","1",9,["246"]],["by","375"],["be","32"],["bz","501"],["bj","229"],["bm","1",10,["441"]],["bt","975"],["bo","591"],["ba","387"],["bw","267"],["br","55"],["io","246"],["vg","1",11,["284"]],["bn","673"],["bg","359"],["bf","226"],["bi","257"],["kh","855"],["cm","237"],["ca","1",1,["204","226","236","249","250","263","289","306","343","354","365","367","368","382","387","403","416","418","428","431","437","438","450","584","468","474","506","514","519","548","579","581","584","587","604","613","639","647","672","683","705","709","742","753","778","780","782","807","819","825","867","873","879","902","905"]],["cv","238"],["bq","599",1,["3","4","7"]],["ky","1",12,["345"]],["cf","236"],["td","235"],["cl","56"],["cn","86"],["cx","61",2,["89164"]],["cc","61",1,["89162"]],["co","57"],["km","269"],["cg","242"],["cd","243"],["ck","682"],["cr","506"],["ci","225"],["hr","385"],["cu","53"],["cw","599",0],["cy","357"],["cz","420"],["dk","45"],["dj","253"],["dm","1",13,["767"]],["do","1",2,["809","829","849"]],["ec","593"],["eg","20"],["sv","503"],["gq","240"],["er","291"],["ee","372"],["sz","268"],["et","251"],["fk","500"],["fo","298"],["fj","679"],["fi","358",0],["fr","33"],["gf","594"],["pf","689"],["ga","241"],["gm","220"],["ge","995"],["de","49"],["gh","233"],["gi","350"],["gr","30"],["gl","299"],["gd","1",14,["473"]],["gp","590",0],["gu","1",15,["671"]],["gt","502"],["gg","44",1,["1481","7781","7839","7911"]],["gn","224"],["gw","245"],["gy","592"],["ht","509"],["hn","504"],["hk","852"],["hu","36"],["is","354"],["in","91"],["id","62"],["ir","98"],["iq","964"],["ie","353"],["im","44",2,["1624","74576","7524","7924","7624"]],["il","972"],["it","39",0],["jm","1",4,["876","658"]],["jp","81"],["je","44",3,["1534","7509","7700","7797","7829","7937"]],["jo","962"],["kz","7",1,["33","7"]],["ke","254"],["ki","686"],["xk","383"],["kw","965"],["kg","996"],["la","856"],["lv","371"],["lb","961"],["ls","266"],["lr","231"],["ly","218"],["li","423"],["lt","370"],["lu","352"],["mo","853"],["mg","261"],["mw","265"],["my","60"],["mv","960"],["ml","223"],["mt","356"],["mh","692"],["mq","596"],["mr","222"],["mu","230"],["yt","262",1,["269","639"]],["mx","52"],["fm","691"],["md","373"],["mc","377"],["mn","976"],["me","382"],["ms","1",16,["664"]],["ma","212",0],["mz","258"],["mm","95"],["na","264"],["nr","674"],["np","977"],["nl","31"],["nc","687"],["nz","64"],["ni","505"],["ne","227"],["ng","234"],["nu","683"],["nf","672"],["kp","850"],["mk","389"],["mp","1",17,["670"]],["no","47",0],["om","968"],["pk","92"],["pw","680"],["ps","970"],["pa","507"],["pg","675"],["py","595"],["pe","51"],["ph","63"],["pl","48"],["pt","351"],["pr","1",3,["787","939"]],["qa","974"],["re","262",0],["ro","40"],["ru","7",0],["rw","250"],["ws","685"],["sm","378"],["st","239"],["sa","966"],["sn","221"],["rs","381"],["sc","248"],["sl","232"],["sg","65"],["sx","1",21,["721"]],["sk","421"],["si","386"],["sb","677"],["so","252"],["za","27"],["kr","82"],["ss","211"],["es","34"],["lk","94"],["bl","590",1],["sh","290"],["kn","1",18,["869"]],["lc","1",19,["758"]],["mf","590",2],["pm","508"],["vc","1",20,["784"]],["sd","249"],["sr","597"],["sj","47",1,["79"]],["se","46"],["ch","41"],["sy","963"],["tw","886"],["tj","992"],["tz","255"],["th","66"],["tl","670"],["tg","228"],["tk","690"],["to","676"],["tt","1",22,["868"]],["tn","216"],["tr","90"],["tm","993"],["tc","1",23,["649"]],["tv","688"],["ug","256"],["ua","380"],["ae","971"],["gb","44",0],["us","1",0],["uy","598"],["vi","1",24,["340"]],["uz","998"],["vu","678"],["va","39",1,["06698"]],["ve","58"],["vn","84"],["wf","681"],["eh","212",1,["5288","5289"]],["ye","967"],["zm","260"],["zw","263"]],N=[];for(let a=0;aa.replace(/\D/g,""),M=(a="")=>a.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),k=a=>{let t=I(a);if(t.charAt(0)==="1"){let e=t.substr(1,3);return V.indexOf(e)!==-1}return!1},W=(a,t,e,i)=>{if(e===0&&!i)return 0;let n=0;for(let s=0;s{let i=document.createElement(a);return t&&Object.entries(t).forEach(([n,s])=>i.setAttribute(n,s)),e&&e.appendChild(i),i},b=(a,...t)=>{let{instances:e}=r;Object.values(e).forEach(i=>i[a](...t))},w=class{constructor(t,e={}){this.id=K++,this.a=t,this.c=null,this.d=Object.assign({},P,e),this.e=!!t.getAttribute("placeholder")}_init(){this.d.useFullscreenPopup&&(this.d.fixDropdownWidth=!1),this.d.onlyCountries.length===1&&(this.d.initialCountry=this.d.onlyCountries[0]),this.d.separateDialCode&&(this.d.nationalMode=!1),this.d.allowDropdown&&!this.d.showFlags&&!this.d.separateDialCode&&(this.d.nationalMode=!1),this.d.useFullscreenPopup&&!this.d.dropdownContainer&&(this.d.dropdownContainer=document.body),this.isAndroid=typeof navigator<"u"?/Android/i.test(navigator.userAgent):!1,this.isRTL=!!this.a.closest("[dir=rtl]");let t=this.d.allowDropdown||this.d.separateDialCode;this.showSelectedCountryOnLeft=this.isRTL?!t:t,this.d.separateDialCode&&(this.isRTL?this.originalPaddingRight=this.a.style.paddingRight:this.originalPaddingLeft=this.a.style.paddingLeft),this.d.i18n={...T,...this.d.i18n};let e=new Promise((n,s)=>{this.h=n,this.i=s}),i=new Promise((n,s)=>{this.i0=n,this.i1=s});this.promise=Promise.all([e,i]),this.s={},this._b(),this._f(),this._h(),this._i(),this._i3()}_b(){this._d(),this._d2(),this._d0(),this._sortCountries()}_sortCountries(){this.d.countryOrder&&(this.d.countryOrder=this.d.countryOrder.map(t=>t.toLowerCase())),this.p.sort((t,e)=>{let{countryOrder:i}=this.d;if(i){let n=i.indexOf(t.iso2),s=i.indexOf(e.iso2),o=n>-1,u=s>-1;if(o||u)return o&&u?n-s:o?-1:1}return t.name.localeCompare(e.name)})}_c(t,e,i){e.length>this.dialCodeMaxLen&&(this.dialCodeMaxLen=e.length),this.q.hasOwnProperty(e)||(this.q[e]=[]);for(let s=0;sn.toLowerCase());this.p=f.filter(n=>i.indexOf(n.iso2)>-1)}else if(e.length){let i=e.map(n=>n.toLowerCase());this.p=f.filter(n=>i.indexOf(n.iso2)===-1)}else this.p=f}_d0(){for(let t=0;t`),s+=`${e.name}`,s+=`+${e.dialCode}`,n.insertAdjacentHTML("beforeend",s)}}_h(t=!1){let e=this.a.getAttribute("value"),i=this.a.value,s=e&&e.charAt(0)==="+"&&(!i||i.charAt(0)!=="+")?e:i,o=this._5(s),u=k(s),{initialCountry:l,geoIpLookup:p}=this.d,h=l==="auto"&&p;if(o&&!u)this._v(s);else if(!h||t){let d=l?l.toLowerCase():"";d&&this._y(d,!0)?this._z(d):o&&u?this._z("us"):this._z()}s&&this._u(s)}_i(){this._j(),this.d.allowDropdown&&this._i2(),(this.hiddenInput||this.hiddenInputCountry)&&this.a.form&&this._i0()}_i0(){this._a14=()=>{this.hiddenInput&&(this.hiddenInput.value=this.getNumber()),this.hiddenInputCountry&&(this.hiddenInputCountry.value=this.getSelectedCountryData().iso2||"")},this.a.form?.addEventListener("submit",this._a14)}_i2(){this._a9=e=>{this.dropdownContent.classList.contains("iti__hide")?this.a.focus():e.preventDefault()};let t=this.a.closest("label");t&&t.addEventListener("click",this._a9),this._a10=()=>{this.dropdownContent.classList.contains("iti__hide")&&!this.a.disabled&&!this.a.readOnly&&this._n()},this.selectedCountry.addEventListener("click",this._a10),this._a11=e=>{this.dropdownContent.classList.contains("iti__hide")&&["ArrowUp","ArrowDown"," ","Enter"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),this._n()),e.key==="Tab"&&this._2()},this.k.addEventListener("keydown",this._a11)}_i3(){let{loadUtils:t,initialCountry:e,geoIpLookup:i}=this.d;t&&!r.utils?(this._handlePageLoad=()=>{window.removeEventListener("load",this._handlePageLoad),r.attachUtils(t)?.catch(()=>{})},r.documentReady()?this._handlePageLoad():window.addEventListener("load",this._handlePageLoad)):this.i0(),e==="auto"&&i&&!this.s.iso2?this._i4():this.h()}_i4(){r.autoCountry?this.handleAutoCountry():r.startedLoadingAutoCountry||(r.startedLoadingAutoCountry=!0,typeof this.d.geoIpLookup=="function"&&this.d.geoIpLookup((t="")=>{let e=t.toLowerCase();e&&this._y(e,!0)?(r.autoCountry=e,setTimeout(()=>b("handleAutoCountry"))):(this._h(!0),b("rejectAutoCountryPromise"))},()=>{this._h(!0),b("rejectAutoCountryPromise")}))}_nWithPlus(){this._n(),this.searchInput.value="+",this._p3("",!0)}_j(){let{strictMode:t,formatAsYouType:e,separateDialCode:i,formatOnDisplay:n,allowDropdown:s,countrySearch:o}=this.d,u=!1;/\p{L}/u.test(this.a.value)&&(u=!0),this._a12=l=>{if(this.isAndroid&&l?.data==="+"&&i&&s&&o){let m=this.a.selectionStart||0,g=this.a.value.substring(0,m-1),y=this.a.value.substring(m);this.a.value=g+y,this._nWithPlus();return}this._v(this.a.value)&&this._8();let p=l?.data&&/[^+0-9]/.test(l.data),h=l?.inputType==="insertFromPaste"&&this.a.value;p||h&&!t?u=!0:/[^+0-9]/.test(this.a.value)||(u=!1);let d=l?.detail&&l.detail.isSetNumber&&!n;if(e&&!u&&!d){let m=this.a.selectionStart||0,y=this.a.value.substring(0,m).replace(/[^+0-9]/g,"").length,C=l?.inputType==="deleteContentForward",v=this._9(),_=W(y,v,m,C);this.a.value=v,this.a.setSelectionRange(_,_)}},this.a.addEventListener("input",this._a12),(t||i)&&(this._handleKeydownEvent=l=>{if(l.key&&l.key.length===1&&!l.altKey&&!l.ctrlKey&&!l.metaKey){if(i&&s&&o&&l.key==="+"){l.preventDefault(),this._nWithPlus();return}if(t){let p=this.a.value,h=p.charAt(0)==="+",d=!h&&this.a.selectionStart===0&&l.key==="+",m=/^[0-9]$/.test(l.key),g=i?m:d||m,y=p.slice(0,this.a.selectionStart)+l.key+p.slice(this.a.selectionEnd),C=this._6(y),v=r.utils.getCoreNumber(C,this.s.iso2),_=this.maxCoreNumberLength&&v.length>this.maxCoreNumberLength,E=!1;if(h){let x=this.s.iso2;E=this._getCountryFromNumber(C)!==x}(!g||_&&!E&&!d)&&l.preventDefault()}}},this.a.addEventListener("keydown",this._handleKeydownEvent))}_j2(t){let e=parseInt(this.a.getAttribute("maxlength")||"",10);return e&&t.length>e?t.substr(0,e):t}_trigger(t,e={}){let i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:e});this.a.dispatchEvent(i)}_n(){let{fixDropdownWidth:t,countrySearch:e}=this.d;if(t&&(this.dropdownContent.style.width=`${this.a.offsetWidth}px`),this.dropdownContent.classList.remove("iti__hide"),this.selectedCountry.setAttribute("aria-expanded","true"),this._o(),e){let i=this.countryList.firstElementChild;i&&(this._x(i,!1),this.countryList.scrollTop=0),this.searchInput.focus()}this._p(),this.u.classList.add("iti__arrow--up"),this._trigger("open:countrydropdown")}_o(){if(this.d.dropdownContainer&&this.d.dropdownContainer.appendChild(this.dropdown),!this.d.useFullscreenPopup){let t=this.a.getBoundingClientRect(),e=this.a.offsetHeight;this.d.dropdownContainer&&(this.dropdown.style.top=`${t.top+e}px`,this.dropdown.style.left=`${t.left}px`,this._a4=()=>this._2(),window.addEventListener("scroll",this._a4))}}_p(){this._a0=n=>{let s=n.target?.closest(".iti__country");s&&this._x(s,!1)},this.countryList.addEventListener("mouseover",this._a0),this._a1=n=>{let s=n.target?.closest(".iti__country");s&&this._1(s)},this.countryList.addEventListener("click",this._a1);let t=!0;this._a2=()=>{t||this._2(),t=!1},document.documentElement.addEventListener("click",this._a2);let e="",i=null;if(this._a3=n=>{["ArrowUp","ArrowDown","Enter","Escape"].includes(n.key)&&(n.preventDefault(),n.stopPropagation(),n.key==="ArrowUp"||n.key==="ArrowDown"?this._q(n.key):n.key==="Enter"?this._r():n.key==="Escape"&&this._2()),!this.d.countrySearch&&/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(n.key)&&(n.stopPropagation(),i&&clearTimeout(i),e+=n.key.toLowerCase(),this._searchForCountry(e),i=setTimeout(()=>{e=""},1e3))},document.addEventListener("keydown",this._a3),this.d.countrySearch){let n=()=>{let o=this.searchInput.value.trim();o?this._p3(o):this._p3("",!0)},s=null;this._a7=()=>{s&&clearTimeout(s),s=setTimeout(()=>{n(),s=null},100)},this.searchInput.addEventListener("input",this._a7),this.searchInput.addEventListener("click",o=>o.stopPropagation())}}_searchForCountry(t){for(let e=0;eh[0]).join("").toLowerCase(),p=`+${o.dialCode}`;if(e||u.includes(n)||p.includes(n)||o.iso2.includes(n)||l.includes(n)){let h=o.nodeById[this.id];h&&this.countryList.appendChild(h),i&&(this._x(h,!1),i=!1)}}i&&this._x(null,!1),this.countryList.scrollTop=0,this._p4()}_p4(){let{i18n:t}=this.d,e=this.countryList.childElementCount,i;e===0?i=t.zeroSearchResults:e===1?i=t.oneSearchResult:i=t.multipleSearchResults.replace("${count}",e.toString()),this.searchResultsA11yText.textContent=i}_q(t){let e=t==="ArrowUp"?this.c?.previousElementSibling:this.c?.nextElementSibling;!e&&this.countryList.childElementCount>1&&(e=t==="ArrowUp"?this.countryList.lastElementChild:this.countryList.firstElementChild),e&&(this._3(e),this._x(e,!1))}_r(){this.c&&this._1(this.c)}_u(t){let e=t;if(this.d.formatOnDisplay&&r.utils&&this.s){let i=this.d.nationalMode||e.charAt(0)!=="+"&&!this.d.separateDialCode,{NATIONAL:n,INTERNATIONAL:s}=r.utils.numberFormat,o=i?n:s;e=r.utils.formatNumber(e,this.s.iso2,o)}e=this._7(e),this.a.value=e}_v(t){let e=this._getCountryFromNumber(t);return e!==null?this._z(e):!1}_getCountryFromNumber(t){let e=t.indexOf("+"),i=e?t.substring(e):t,n=this.s.dialCode;i&&n==="1"&&i.charAt(0)!=="+"&&(i.charAt(0)!=="1"&&(i=`1${i}`),i=`+${i}`),this.d.separateDialCode&&n&&i.charAt(0)!=="+"&&(i=`+${n}${i}`);let o=this._5(i,!0),u=I(i);if(o){let l=this.q[I(o)],p=l.indexOf(this.s.iso2)!==-1&&u.length<=o.length-1;if(!(n==="1"&&k(u))&&!p){for(let d=0;do){let d=n-u;e.scrollTop=h-d}}_4(t){let e=this.a.value,i=`+${t}`,n;if(e.charAt(0)==="+"){let s=this._5(e);s?n=e.replace(s,i):n=i,this.a.value=n}}_5(t,e){let i="";if(t.charAt(0)==="+"){let n="";for(let s=0;s-1){let i=t.substring(0,e),n=this._utilsIsPossibleNumber(i),s=this._utilsIsPossibleNumber(t);return n&&s}return this._utilsIsPossibleNumber(t)}_utilsIsPossibleNumber(t){return r.utils?r.utils.isPossibleNumber(t,this.s.iso2,this.d.validationNumberTypes):null}isValidNumberPrecise(){if(!this.s.iso2)return!1;let t=this._6(),e=t.search(/\p{L}/u);if(e>-1){let i=t.substring(0,e),n=this._utilsIsValidNumber(i),s=this._utilsIsValidNumber(t);return n&&s}return this._utilsIsValidNumber(t)}_utilsIsValidNumber(t){return r.utils?r.utils.isValidNumber(t,this.s.iso2,this.d.validationNumberTypes):null}setCountry(t){let e=t?.toLowerCase(),i=this.s.iso2;(t&&e!==i||!t&&i)&&(this._z(e),this._4(this.s.dialCode),this._8())}setNumber(t){let e=this._v(t);this._u(t),e&&this._8(),this._trigger("input",{isSetNumber:!0})}setPlaceholderNumberType(t){this.d.placeholderNumberType=t,this._0()}setDisabled(t){this.a.disabled=t,t?this.selectedCountry.setAttribute("disabled","true"):this.selectedCountry.removeAttribute("disabled")}},G=a=>{if(!r.utils&&!r.startedLoadingUtilsScript){let t;if(typeof a=="function")try{t=Promise.resolve(a())}catch(e){return Promise.reject(e)}else return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof a}`));return r.startedLoadingUtilsScript=!0,t.then(e=>{let i=e?.default;if(!i||typeof i!="object")throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return r.utils=i,b("handleUtils"),!0}).catch(e=>{throw b("rejectUtilsScriptPromise",e),e})}return null},r=Object.assign((a,t)=>{let e=new w(a,t);return e._init(),a.setAttribute("data-intl-tel-input-id",e.id.toString()),r.instances[e.id]=e,e},{defaults:P,documentReady:()=>document.readyState==="complete",getCountryData:()=>f,getInstance:a=>{let t=a.getAttribute("data-intl-tel-input-id");return t?r.instances[t]:null},instances:{},attachUtils:G,startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"25.0.0"}),q=r;return j(Y);})(); +var factoryOutput=(()=>{var L=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var H=Object.getOwnPropertyNames;var R=Object.prototype.hasOwnProperty;var F=(a,t)=>{for(var e in t)L(a,e,{get:t[e],enumerable:!0})},B=(a,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of H(t))!R.call(a,n)&&n!==e&&L(a,n,{get:()=>t[n],enumerable:!(i=O(t,n))||i.enumerable});return a};var j=a=>B(L({},"__esModule",{value:!0}),a);var Y={};F(Y,{Iti:()=>w,default:()=>q});var D=[["af","93"],["ax","358",1,["18"]],["al","355"],["dz","213"],["as","1",5,["684"]],["ad","376"],["ao","244"],["ai","1",6,["264"]],["ag","1",7,["268"]],["ar","54"],["am","374"],["aw","297"],["ac","247"],["au","61",0],["at","43"],["az","994"],["bs","1",8,["242"]],["bh","973"],["bd","880"],["bb","1",9,["246"]],["by","375"],["be","32"],["bz","501"],["bj","229"],["bm","1",10,["441"]],["bt","975"],["bo","591"],["ba","387"],["bw","267"],["br","55"],["io","246"],["vg","1",11,["284"]],["bn","673"],["bg","359"],["bf","226"],["bi","257"],["kh","855"],["cm","237"],["ca","1",1,["204","226","236","249","250","263","289","306","343","354","365","367","368","382","387","403","416","418","428","431","437","438","450","584","468","474","506","514","519","548","579","581","584","587","604","613","639","647","672","683","705","709","742","753","778","780","782","807","819","825","867","873","879","902","905"]],["cv","238"],["bq","599",1,["3","4","7"]],["ky","1",12,["345"]],["cf","236"],["td","235"],["cl","56"],["cn","86"],["cx","61",2,["89164"]],["cc","61",1,["89162"]],["co","57"],["km","269"],["cg","242"],["cd","243"],["ck","682"],["cr","506"],["ci","225"],["hr","385"],["cu","53"],["cw","599",0],["cy","357"],["cz","420"],["dk","45"],["dj","253"],["dm","1",13,["767"]],["do","1",2,["809","829","849"]],["ec","593"],["eg","20"],["sv","503"],["gq","240"],["er","291"],["ee","372"],["sz","268"],["et","251"],["fk","500"],["fo","298"],["fj","679"],["fi","358",0],["fr","33"],["gf","594"],["pf","689"],["ga","241"],["gm","220"],["ge","995"],["de","49"],["gh","233"],["gi","350"],["gr","30"],["gl","299"],["gd","1",14,["473"]],["gp","590",0],["gu","1",15,["671"]],["gt","502"],["gg","44",1,["1481","7781","7839","7911"]],["gn","224"],["gw","245"],["gy","592"],["ht","509"],["hn","504"],["hk","852"],["hu","36"],["is","354"],["in","91"],["id","62"],["ir","98"],["iq","964"],["ie","353"],["im","44",2,["1624","74576","7524","7924","7624"]],["il","972"],["it","39",0],["jm","1",4,["876","658"]],["jp","81"],["je","44",3,["1534","7509","7700","7797","7829","7937"]],["jo","962"],["kz","7",1,["33","7"]],["ke","254"],["ki","686"],["xk","383"],["kw","965"],["kg","996"],["la","856"],["lv","371"],["lb","961"],["ls","266"],["lr","231"],["ly","218"],["li","423"],["lt","370"],["lu","352"],["mo","853"],["mg","261"],["mw","265"],["my","60"],["mv","960"],["ml","223"],["mt","356"],["mh","692"],["mq","596"],["mr","222"],["mu","230"],["yt","262",1,["269","639"]],["mx","52"],["fm","691"],["md","373"],["mc","377"],["mn","976"],["me","382"],["ms","1",16,["664"]],["ma","212",0],["mz","258"],["mm","95"],["na","264"],["nr","674"],["np","977"],["nl","31"],["nc","687"],["nz","64"],["ni","505"],["ne","227"],["ng","234"],["nu","683"],["nf","672"],["kp","850"],["mk","389"],["mp","1",17,["670"]],["no","47",0],["om","968"],["pk","92"],["pw","680"],["ps","970"],["pa","507"],["pg","675"],["py","595"],["pe","51"],["ph","63"],["pl","48"],["pt","351"],["pr","1",3,["787","939"]],["qa","974"],["re","262",0],["ro","40"],["ru","7",0],["rw","250"],["ws","685"],["sm","378"],["st","239"],["sa","966"],["sn","221"],["rs","381"],["sc","248"],["sl","232"],["sg","65"],["sx","1",21,["721"]],["sk","421"],["si","386"],["sb","677"],["so","252"],["za","27"],["kr","82"],["ss","211"],["es","34"],["lk","94"],["bl","590",1],["sh","290"],["kn","1",18,["869"]],["lc","1",19,["758"]],["mf","590",2],["pm","508"],["vc","1",20,["784"]],["sd","249"],["sr","597"],["sj","47",1,["79"]],["se","46"],["ch","41"],["sy","963"],["tw","886"],["tj","992"],["tz","255"],["th","66"],["tl","670"],["tg","228"],["tk","690"],["to","676"],["tt","1",22,["868"]],["tn","216"],["tr","90"],["tm","993"],["tc","1",23,["649"]],["tv","688"],["ug","256"],["ua","380"],["ae","971"],["gb","44",0],["us","1",0],["uy","598"],["vi","1",24,["340"]],["uz","998"],["vu","678"],["va","39",1,["06698"]],["ve","58"],["vn","84"],["wf","681"],["eh","212",1,["5288","5289"]],["ye","967"],["zm","260"],["zw","263"]],N=[];for(let a=0;aa.replace(/\D/g,""),M=(a="")=>a.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),k=a=>{let t=I(a);if(t.charAt(0)==="1"){let e=t.substr(1,3);return V.indexOf(e)!==-1}return!1},W=(a,t,e,i)=>{if(e===0&&!i)return 0;let n=0;for(let s=0;s{let i=document.createElement(a);return t&&Object.entries(t).forEach(([n,s])=>i.setAttribute(n,s)),e&&e.appendChild(i),i},b=(a,...t)=>{let{instances:e}=r;Object.values(e).forEach(i=>i[a](...t))},w=class{constructor(t,e={}){this.id=K++,this.a=t,this.c=null,this.d=Object.assign({},P,e),this.e=!!t.getAttribute("placeholder")}_init(){this.d.useFullscreenPopup&&(this.d.fixDropdownWidth=!1),this.d.onlyCountries.length===1&&(this.d.initialCountry=this.d.onlyCountries[0]),this.d.separateDialCode&&(this.d.nationalMode=!1),this.d.allowDropdown&&!this.d.showFlags&&!this.d.separateDialCode&&(this.d.nationalMode=!1),this.d.useFullscreenPopup&&!this.d.dropdownContainer&&(this.d.dropdownContainer=document.body),this.isAndroid=typeof navigator<"u"?/Android/i.test(navigator.userAgent):!1,this.isRTL=!!this.a.closest("[dir=rtl]");let t=this.d.allowDropdown||this.d.separateDialCode;this.showSelectedCountryOnLeft=this.isRTL?!t:t,this.d.separateDialCode&&(this.isRTL?this.originalPaddingRight=this.a.style.paddingRight:this.originalPaddingLeft=this.a.style.paddingLeft),this.d.i18n={...T,...this.d.i18n};let e=new Promise((n,s)=>{this.h=n,this.i=s}),i=new Promise((n,s)=>{this.i0=n,this.i1=s});this.promise=Promise.all([e,i]),this.s={},this._b(),this._f(),this._h(),this._i(),this._i3()}_b(){this._d(),this._d2(),this._d0(),this._sortCountries()}_sortCountries(){this.d.countryOrder&&(this.d.countryOrder=this.d.countryOrder.map(t=>t.toLowerCase())),this.p.sort((t,e)=>{let{countryOrder:i}=this.d;if(i){let n=i.indexOf(t.iso2),s=i.indexOf(e.iso2),o=n>-1,u=s>-1;if(o||u)return o&&u?n-s:o?-1:1}return t.name.localeCompare(e.name)})}_c(t,e,i){e.length>this.dialCodeMaxLen&&(this.dialCodeMaxLen=e.length),this.q.hasOwnProperty(e)||(this.q[e]=[]);for(let s=0;sn.toLowerCase());this.p=f.filter(n=>i.indexOf(n.iso2)>-1)}else if(e.length){let i=e.map(n=>n.toLowerCase());this.p=f.filter(n=>i.indexOf(n.iso2)===-1)}else this.p=f}_d0(){for(let t=0;t`),s+=`${e.name}`,s+=`+${e.dialCode}`,n.insertAdjacentHTML("beforeend",s)}}_h(t=!1){let e=this.a.getAttribute("value"),i=this.a.value,s=e&&e.charAt(0)==="+"&&(!i||i.charAt(0)!=="+")?e:i,o=this._5(s),u=k(s),{initialCountry:l,geoIpLookup:p}=this.d,h=l==="auto"&&p;if(o&&!u)this._v(s);else if(!h||t){let d=l?l.toLowerCase():"";d&&this._y(d,!0)?this._z(d):o&&u?this._z("us"):this._z()}s&&this._u(s)}_i(){this._j(),this.d.allowDropdown&&this._i2(),(this.hiddenInput||this.hiddenInputCountry)&&this.a.form&&this._i0()}_i0(){this._a14=()=>{this.hiddenInput&&(this.hiddenInput.value=this.getNumber()),this.hiddenInputCountry&&(this.hiddenInputCountry.value=this.getSelectedCountryData().iso2||"")},this.a.form?.addEventListener("submit",this._a14)}_i2(){this._a9=e=>{this.dropdownContent.classList.contains("iti__hide")?this.a.focus():e.preventDefault()};let t=this.a.closest("label");t&&t.addEventListener("click",this._a9),this._a10=()=>{this.dropdownContent.classList.contains("iti__hide")&&!this.a.disabled&&!this.a.readOnly&&this._n()},this.selectedCountry.addEventListener("click",this._a10),this._a11=e=>{this.dropdownContent.classList.contains("iti__hide")&&["ArrowUp","ArrowDown"," ","Enter"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),this._n()),e.key==="Tab"&&this._2()},this.k.addEventListener("keydown",this._a11)}_i3(){let{loadUtils:t,initialCountry:e,geoIpLookup:i}=this.d;t&&!r.utils?(this._handlePageLoad=()=>{window.removeEventListener("load",this._handlePageLoad),r.attachUtils(t)?.catch(()=>{})},r.documentReady()?this._handlePageLoad():window.addEventListener("load",this._handlePageLoad)):this.i0(),e==="auto"&&i&&!this.s.iso2?this._i4():this.h()}_i4(){r.autoCountry?this.handleAutoCountry():r.startedLoadingAutoCountry||(r.startedLoadingAutoCountry=!0,typeof this.d.geoIpLookup=="function"&&this.d.geoIpLookup((t="")=>{let e=t.toLowerCase();e&&this._y(e,!0)?(r.autoCountry=e,setTimeout(()=>b("handleAutoCountry"))):(this._h(!0),b("rejectAutoCountryPromise"))},()=>{this._h(!0),b("rejectAutoCountryPromise")}))}_nWithPlus(){this._n(),this.searchInput.value="+",this._p3("",!0)}_j(){let{strictMode:t,formatAsYouType:e,separateDialCode:i,formatOnDisplay:n,allowDropdown:s,countrySearch:o}=this.d,u=!1;/\p{L}/u.test(this.a.value)&&(u=!0),this._a12=l=>{if(this.isAndroid&&l?.data==="+"&&i&&s&&o){let m=this.a.selectionStart||0,g=this.a.value.substring(0,m-1),y=this.a.value.substring(m);this.a.value=g+y,this._nWithPlus();return}this._v(this.a.value)&&this._8();let p=l?.data&&/[^+0-9]/.test(l.data),h=l?.inputType==="insertFromPaste"&&this.a.value;p||h&&!t?u=!0:/[^+0-9]/.test(this.a.value)||(u=!1);let d=l?.detail&&l.detail.isSetNumber&&!n;if(e&&!u&&!d){let m=this.a.selectionStart||0,y=this.a.value.substring(0,m).replace(/[^+0-9]/g,"").length,C=l?.inputType==="deleteContentForward",v=this._9(),_=W(y,v,m,C);this.a.value=v,this.a.setSelectionRange(_,_)}},this.a.addEventListener("input",this._a12),(t||i)&&(this._handleKeydownEvent=l=>{if(l.key&&l.key.length===1&&!l.altKey&&!l.ctrlKey&&!l.metaKey){if(i&&s&&o&&l.key==="+"){l.preventDefault(),this._nWithPlus();return}if(t){let p=this.a.value,h=p.charAt(0)==="+",d=!h&&this.a.selectionStart===0&&l.key==="+",m=/^[0-9]$/.test(l.key),g=i?m:d||m,y=p.slice(0,this.a.selectionStart)+l.key+p.slice(this.a.selectionEnd),C=this._6(y),v=r.utils.getCoreNumber(C,this.s.iso2),_=this.maxCoreNumberLength&&v.length>this.maxCoreNumberLength,E=!1;if(h){let x=this.s.iso2;E=this._getCountryFromNumber(C)!==x}(!g||_&&!E&&!d)&&l.preventDefault()}}},this.a.addEventListener("keydown",this._handleKeydownEvent))}_j2(t){let e=parseInt(this.a.getAttribute("maxlength")||"",10);return e&&t.length>e?t.substr(0,e):t}_trigger(t,e={}){let i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:e});this.a.dispatchEvent(i)}_n(){let{fixDropdownWidth:t,countrySearch:e}=this.d;if(t&&(this.dropdownContent.style.width=`${this.a.offsetWidth}px`),this.dropdownContent.classList.remove("iti__hide"),this.selectedCountry.setAttribute("aria-expanded","true"),this._o(),e){let i=this.countryList.firstElementChild;i&&(this._x(i,!1),this.countryList.scrollTop=0),this.searchInput.focus()}this._p(),this.u.classList.add("iti__arrow--up"),this._trigger("open:countrydropdown")}_o(){if(this.d.dropdownContainer&&this.d.dropdownContainer.appendChild(this.dropdown),!this.d.useFullscreenPopup){let t=this.a.getBoundingClientRect(),e=this.a.offsetHeight;this.d.dropdownContainer&&(this.dropdown.style.top=`${t.top+e}px`,this.dropdown.style.left=`${t.left}px`,this._a4=()=>this._2(),window.addEventListener("scroll",this._a4))}}_p(){this._a0=n=>{let s=n.target?.closest(".iti__country");s&&this._x(s,!1)},this.countryList.addEventListener("mouseover",this._a0),this._a1=n=>{let s=n.target?.closest(".iti__country");s&&this._1(s)},this.countryList.addEventListener("click",this._a1);let t=!0;this._a2=()=>{t||this._2(),t=!1},document.documentElement.addEventListener("click",this._a2);let e="",i=null;if(this._a3=n=>{["ArrowUp","ArrowDown","Enter","Escape"].includes(n.key)&&(n.preventDefault(),n.stopPropagation(),n.key==="ArrowUp"||n.key==="ArrowDown"?this._q(n.key):n.key==="Enter"?this._r():n.key==="Escape"&&this._2()),!this.d.countrySearch&&/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(n.key)&&(n.stopPropagation(),i&&clearTimeout(i),e+=n.key.toLowerCase(),this._searchForCountry(e),i=setTimeout(()=>{e=""},1e3))},document.addEventListener("keydown",this._a3),this.d.countrySearch){let n=()=>{let o=this.searchInput.value.trim();o?this._p3(o):this._p3("",!0)},s=null;this._a7=()=>{s&&clearTimeout(s),s=setTimeout(()=>{n(),s=null},100)},this.searchInput.addEventListener("input",this._a7),this.searchInput.addEventListener("click",o=>o.stopPropagation())}}_searchForCountry(t){for(let e=0;eh[0]).join("").toLowerCase(),p=`+${o.dialCode}`;if(e||u.includes(n)||p.includes(n)||o.iso2.includes(n)||l.includes(n)){let h=o.nodeById[this.id];h&&this.countryList.appendChild(h),i&&(this._x(h,!1),i=!1)}}i&&this._x(null,!1),this.countryList.scrollTop=0,this._p4()}_p4(){let{i18n:t}=this.d,e=this.countryList.childElementCount,i;e===0?i=t.zeroSearchResults:e===1?i=t.oneSearchResult:i=t.multipleSearchResults.replace("${count}",e.toString()),this.searchResultsA11yText.textContent=i}_q(t){let e=t==="ArrowUp"?this.c?.previousElementSibling:this.c?.nextElementSibling;!e&&this.countryList.childElementCount>1&&(e=t==="ArrowUp"?this.countryList.lastElementChild:this.countryList.firstElementChild),e&&(this._3(e),this._x(e,!1))}_r(){this.c&&this._1(this.c)}_u(t){let e=t;if(this.d.formatOnDisplay&&r.utils&&this.s){let i=this.d.nationalMode||e.charAt(0)!=="+"&&!this.d.separateDialCode,{NATIONAL:n,INTERNATIONAL:s}=r.utils.numberFormat,o=i?n:s;e=r.utils.formatNumber(e,this.s.iso2,o)}e=this._7(e),this.a.value=e}_v(t){let e=this._getCountryFromNumber(t);return e!==null?this._z(e):!1}_getCountryFromNumber(t){let e=t.indexOf("+"),i=e?t.substring(e):t,n=this.s.dialCode;i&&n==="1"&&i.charAt(0)!=="+"&&(i.charAt(0)!=="1"&&(i=`1${i}`),i=`+${i}`),this.d.separateDialCode&&n&&i.charAt(0)!=="+"&&(i=`+${n}${i}`);let o=this._5(i,!0),u=I(i);if(o){let l=this.q[I(o)],p=l.indexOf(this.s.iso2)!==-1&&u.length<=o.length-1;if(!(n==="1"&&k(u))&&!p){for(let d=0;do){let d=n-u;e.scrollTop=h-d}}_4(t){let e=this.a.value,i=`+${t}`,n;if(e.charAt(0)==="+"){let s=this._5(e);s?n=e.replace(s,i):n=i,this.a.value=n}}_5(t,e){let i="";if(t.charAt(0)==="+"){let n="";for(let s=0;s-1){let i=t.substring(0,e),n=this._utilsIsPossibleNumber(i),s=this._utilsIsPossibleNumber(t);return n&&s}return this._utilsIsPossibleNumber(t)}_utilsIsPossibleNumber(t){return r.utils?r.utils.isPossibleNumber(t,this.s.iso2,this.d.validationNumberTypes):null}isValidNumberPrecise(){if(!this.s.iso2)return!1;let t=this._6(),e=t.search(/\p{L}/u);if(e>-1){let i=t.substring(0,e),n=this._utilsIsValidNumber(i),s=this._utilsIsValidNumber(t);return n&&s}return this._utilsIsValidNumber(t)}_utilsIsValidNumber(t){return r.utils?r.utils.isValidNumber(t,this.s.iso2,this.d.validationNumberTypes):null}setCountry(t){let e=t?.toLowerCase(),i=this.s.iso2;(t&&e!==i||!t&&i)&&(this._z(e),this._4(this.s.dialCode),this._8())}setNumber(t){let e=this._v(t);this._u(t),e&&this._8(),this._trigger("input",{isSetNumber:!0})}setPlaceholderNumberType(t){this.d.placeholderNumberType=t,this._0()}setDisabled(t){this.a.disabled=t,t?this.selectedCountry.setAttribute("disabled","true"):this.selectedCountry.removeAttribute("disabled")}},G=a=>{if(!r.utils&&!r.startedLoadingUtilsScript){let t;if(typeof a=="function")try{t=Promise.resolve(a())}catch(e){return Promise.reject(e)}else return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof a}`));return r.startedLoadingUtilsScript=!0,t.then(e=>{let i=e?.default;if(!i||typeof i!="object")throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return r.utils=i,b("handleUtils"),!0}).catch(e=>{throw b("rejectUtilsScriptPromise",e),e})}return null},r=Object.assign((a,t)=>{let e=new w(a,t);return e._init(),a.setAttribute("data-intl-tel-input-id",e.id.toString()),r.instances[e.id]=e,e},{defaults:P,documentReady:()=>document.readyState==="complete",getCountryData:()=>f,getInstance:a=>{let t=a.getAttribute("data-intl-tel-input-id");return t?r.instances[t]:null},instances:{},attachUtils:G,startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"25.0.1"}),q=r;return j(Y);})(); // UMD return factoryOutput.default; diff --git a/build/js/intlTelInputWithUtils.js b/build/js/intlTelInputWithUtils.js index 4317276cc..c2eae456e 100644 --- a/build/js/intlTelInputWithUtils.js +++ b/build/js/intlTelInputWithUtils.js @@ -1,5 +1,5 @@ /* - * International Telephone Input v25.0.0 + * International Telephone Input v25.0.1 * https://github.com/jackocnr/intl-tel-input.git * Licensed under the MIT license */ @@ -3143,7 +3143,7 @@ var factoryOutput = (() => { attachUtils, startedLoadingUtilsScript: false, startedLoadingAutoCountry: false, - version: "25.0.0" + version: "25.0.1" } ); var intl_tel_input_default = intlTelInput; diff --git a/build/js/intlTelInputWithUtils.min.js b/build/js/intlTelInputWithUtils.min.js index b7b6c5b6a..3dcdfd76d 100644 --- a/build/js/intlTelInputWithUtils.min.js +++ b/build/js/intlTelInputWithUtils.min.js @@ -1,5 +1,5 @@ /* - * International Telephone Input v25.0.0 + * International Telephone Input v25.0.1 * https://github.com/jackocnr/intl-tel-input.git * Licensed under the MIT license */ @@ -13,7 +13,7 @@ } }(() => { -var factoryOutput=(()=>{var I1=Object.defineProperty;var x2=Object.getOwnPropertyDescriptor;var R2=Object.getOwnPropertyNames;var O2=Object.prototype.hasOwnProperty;var k2=(g,$)=>{for(var n in $)I1(g,n,{get:$[n],enumerable:!0})},B2=(g,$,n,r)=>{if($&&typeof $=="object"||typeof $=="function")for(let u of R2($))!O2.call(g,u)&&u!==n&&I1(g,u,{get:()=>$[u],enumerable:!(r=x2($,u))||r.enumerable});return g};var G2=g=>B2(I1({},"__esModule",{value:!0}),g);var Y2={};k2(Y2,{default:()=>Z2});var s2=[["af","93"],["ax","358",1,["18"]],["al","355"],["dz","213"],["as","1",5,["684"]],["ad","376"],["ao","244"],["ai","1",6,["264"]],["ag","1",7,["268"]],["ar","54"],["am","374"],["aw","297"],["ac","247"],["au","61",0],["at","43"],["az","994"],["bs","1",8,["242"]],["bh","973"],["bd","880"],["bb","1",9,["246"]],["by","375"],["be","32"],["bz","501"],["bj","229"],["bm","1",10,["441"]],["bt","975"],["bo","591"],["ba","387"],["bw","267"],["br","55"],["io","246"],["vg","1",11,["284"]],["bn","673"],["bg","359"],["bf","226"],["bi","257"],["kh","855"],["cm","237"],["ca","1",1,["204","226","236","249","250","263","289","306","343","354","365","367","368","382","387","403","416","418","428","431","437","438","450","584","468","474","506","514","519","548","579","581","584","587","604","613","639","647","672","683","705","709","742","753","778","780","782","807","819","825","867","873","879","902","905"]],["cv","238"],["bq","599",1,["3","4","7"]],["ky","1",12,["345"]],["cf","236"],["td","235"],["cl","56"],["cn","86"],["cx","61",2,["89164"]],["cc","61",1,["89162"]],["co","57"],["km","269"],["cg","242"],["cd","243"],["ck","682"],["cr","506"],["ci","225"],["hr","385"],["cu","53"],["cw","599",0],["cy","357"],["cz","420"],["dk","45"],["dj","253"],["dm","1",13,["767"]],["do","1",2,["809","829","849"]],["ec","593"],["eg","20"],["sv","503"],["gq","240"],["er","291"],["ee","372"],["sz","268"],["et","251"],["fk","500"],["fo","298"],["fj","679"],["fi","358",0],["fr","33"],["gf","594"],["pf","689"],["ga","241"],["gm","220"],["ge","995"],["de","49"],["gh","233"],["gi","350"],["gr","30"],["gl","299"],["gd","1",14,["473"]],["gp","590",0],["gu","1",15,["671"]],["gt","502"],["gg","44",1,["1481","7781","7839","7911"]],["gn","224"],["gw","245"],["gy","592"],["ht","509"],["hn","504"],["hk","852"],["hu","36"],["is","354"],["in","91"],["id","62"],["ir","98"],["iq","964"],["ie","353"],["im","44",2,["1624","74576","7524","7924","7624"]],["il","972"],["it","39",0],["jm","1",4,["876","658"]],["jp","81"],["je","44",3,["1534","7509","7700","7797","7829","7937"]],["jo","962"],["kz","7",1,["33","7"]],["ke","254"],["ki","686"],["xk","383"],["kw","965"],["kg","996"],["la","856"],["lv","371"],["lb","961"],["ls","266"],["lr","231"],["ly","218"],["li","423"],["lt","370"],["lu","352"],["mo","853"],["mg","261"],["mw","265"],["my","60"],["mv","960"],["ml","223"],["mt","356"],["mh","692"],["mq","596"],["mr","222"],["mu","230"],["yt","262",1,["269","639"]],["mx","52"],["fm","691"],["md","373"],["mc","377"],["mn","976"],["me","382"],["ms","1",16,["664"]],["ma","212",0],["mz","258"],["mm","95"],["na","264"],["nr","674"],["np","977"],["nl","31"],["nc","687"],["nz","64"],["ni","505"],["ne","227"],["ng","234"],["nu","683"],["nf","672"],["kp","850"],["mk","389"],["mp","1",17,["670"]],["no","47",0],["om","968"],["pk","92"],["pw","680"],["ps","970"],["pa","507"],["pg","675"],["py","595"],["pe","51"],["ph","63"],["pl","48"],["pt","351"],["pr","1",3,["787","939"]],["qa","974"],["re","262",0],["ro","40"],["ru","7",0],["rw","250"],["ws","685"],["sm","378"],["st","239"],["sa","966"],["sn","221"],["rs","381"],["sc","248"],["sl","232"],["sg","65"],["sx","1",21,["721"]],["sk","421"],["si","386"],["sb","677"],["so","252"],["za","27"],["kr","82"],["ss","211"],["es","34"],["lk","94"],["bl","590",1],["sh","290"],["kn","1",18,["869"]],["lc","1",19,["758"]],["mf","590",2],["pm","508"],["vc","1",20,["784"]],["sd","249"],["sr","597"],["sj","47",1,["79"]],["se","46"],["ch","41"],["sy","963"],["tw","886"],["tj","992"],["tz","255"],["th","66"],["tl","670"],["tg","228"],["tk","690"],["to","676"],["tt","1",22,["868"]],["tn","216"],["tr","90"],["tm","993"],["tc","1",23,["649"]],["tv","688"],["ug","256"],["ua","380"],["ae","971"],["gb","44",0],["us","1",0],["uy","598"],["vi","1",24,["340"]],["uz","998"],["vu","678"],["va","39",1,["06698"]],["ve","58"],["vn","84"],["wf","681"],["eh","212",1,["5288","5289"]],["ye","967"],["zm","260"],["zw","263"]],u2=[];for(let g=0;gg.replace(/\D/g,""),h2=(g="")=>g.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),c2=g=>{let $=c1(g);if($.charAt(0)==="1"){let n=$.substr(1,3);return V2.indexOf(n)!==-1}return!1},j2=(g,$,n,r)=>{if(n===0&&!r)return 0;let u=0;for(let l=0;l<$.length;l++){if(/[+0-9]/.test($[l])&&u++,u===g&&!r)return l+1;if(r&&u===g+1)return l}return $.length},T=(g,$,n)=>{let r=document.createElement(g);return $&&Object.entries($).forEach(([u,l])=>r.setAttribute(u,l)),n&&n.appendChild(r),r},e1=(g,...$)=>{let{instances:n}=f;Object.values(n).forEach(r=>r[g](...$))},b1=class{constructor($,n={}){this.id=K2++,this.telInput=$,this.highlightedItem=null,this.options=Object.assign({},p2,n),this.hadInitialPlaceholder=!!$.getAttribute("placeholder")}_init(){this.options.useFullscreenPopup&&(this.options.fixDropdownWidth=!1),this.options.onlyCountries.length===1&&(this.options.initialCountry=this.options.onlyCountries[0]),this.options.separateDialCode&&(this.options.nationalMode=!1),this.options.allowDropdown&&!this.options.showFlags&&!this.options.separateDialCode&&(this.options.nationalMode=!1),this.options.useFullscreenPopup&&!this.options.dropdownContainer&&(this.options.dropdownContainer=document.body),this.isAndroid=typeof navigator<"u"?/Android/i.test(navigator.userAgent):!1,this.isRTL=!!this.telInput.closest("[dir=rtl]");let $=this.options.allowDropdown||this.options.separateDialCode;this.showSelectedCountryOnLeft=this.isRTL?!$:$,this.options.separateDialCode&&(this.isRTL?this.originalPaddingRight=this.telInput.style.paddingRight:this.originalPaddingLeft=this.telInput.style.paddingLeft),this.options.i18n={..._1,...this.options.i18n};let n=new Promise((u,l)=>{this.resolveAutoCountryPromise=u,this.rejectAutoCountryPromise=l}),r=new Promise((u,l)=>{this.resolveUtilsScriptPromise=u,this.rejectUtilsScriptPromise=l});this.promise=Promise.all([n,r]),this.selectedCountryData={},this._processCountryData(),this._generateMarkup(),this._setInitialState(),this._initListeners(),this._initRequests()}_processCountryData(){this._processAllCountries(),this._processDialCodes(),this._translateCountryNames(),this._sortCountries()}_sortCountries(){this.options.countryOrder&&(this.options.countryOrder=this.options.countryOrder.map($=>$.toLowerCase())),this.countries.sort(($,n)=>{let{countryOrder:r}=this.options;if(r){let u=r.indexOf($.iso2),l=r.indexOf(n.iso2),p=u>-1,y=l>-1;if(p||y)return p&&y?u-l:p?-1:1}return $.name.localeCompare(n.name)})}_addToDialCodeMap($,n,r){n.length>this.dialCodeMaxLen&&(this.dialCodeMaxLen=n.length),this.dialCodeToIso2Map.hasOwnProperty(n)||(this.dialCodeToIso2Map[n]=[]);for(let l=0;lu.toLowerCase());this.countries=K.filter(u=>r.indexOf(u.iso2)>-1)}else if(n.length){let r=n.map(u=>u.toLowerCase());this.countries=K.filter(u=>r.indexOf(u.iso2)===-1)}else this.countries=K}_translateCountryNames(){for(let $=0;$`),l+=`${n.name}`,l+=`+${n.dialCode}`,u.insertAdjacentHTML("beforeend",l)}}_setInitialState($=!1){let n=this.telInput.getAttribute("value"),r=this.telInput.value,l=n&&n.charAt(0)==="+"&&(!r||r.charAt(0)!=="+")?n:r,p=this._getDialCode(l),y=c2(l),{initialCountry:m,geoIpLookup:S}=this.options,I=m==="auto"&&S;if(p&&!y)this._updateCountryFromNumber(l);else if(!I||$){let _=m?m.toLowerCase():"";_&&this._getCountryData(_,!0)?this._setCountry(_):p&&y?this._setCountry("us"):this._setCountry()}l&&this._updateValFromNumber(l)}_initListeners(){this._initTelInputListeners(),this.options.allowDropdown&&this._initDropdownListeners(),(this.hiddenInput||this.hiddenInputCountry)&&this.telInput.form&&this._initHiddenInputListener()}_initHiddenInputListener(){this._handleHiddenInputSubmit=()=>{this.hiddenInput&&(this.hiddenInput.value=this.getNumber()),this.hiddenInputCountry&&(this.hiddenInputCountry.value=this.getSelectedCountryData().iso2||"")},this.telInput.form?.addEventListener("submit",this._handleHiddenInputSubmit)}_initDropdownListeners(){this._handleLabelClick=n=>{this.dropdownContent.classList.contains("iti__hide")?this.telInput.focus():n.preventDefault()};let $=this.telInput.closest("label");$&&$.addEventListener("click",this._handleLabelClick),this._handleClickSelectedCountry=()=>{this.dropdownContent.classList.contains("iti__hide")&&!this.telInput.disabled&&!this.telInput.readOnly&&this._openDropdown()},this.selectedCountry.addEventListener("click",this._handleClickSelectedCountry),this._handleCountryContainerKeydown=n=>{this.dropdownContent.classList.contains("iti__hide")&&["ArrowUp","ArrowDown"," ","Enter"].includes(n.key)&&(n.preventDefault(),n.stopPropagation(),this._openDropdown()),n.key==="Tab"&&this._closeDropdown()},this.countryContainer.addEventListener("keydown",this._handleCountryContainerKeydown)}_initRequests(){let{loadUtils:$,initialCountry:n,geoIpLookup:r}=this.options;$&&!f.utils?(this._handlePageLoad=()=>{window.removeEventListener("load",this._handlePageLoad),f.attachUtils($)?.catch(()=>{})},f.documentReady()?this._handlePageLoad():window.addEventListener("load",this._handlePageLoad)):this.resolveUtilsScriptPromise(),n==="auto"&&r&&!this.selectedCountryData.iso2?this._loadAutoCountry():this.resolveAutoCountryPromise()}_loadAutoCountry(){f.autoCountry?this.handleAutoCountry():f.startedLoadingAutoCountry||(f.startedLoadingAutoCountry=!0,typeof this.options.geoIpLookup=="function"&&this.options.geoIpLookup(($="")=>{let n=$.toLowerCase();n&&this._getCountryData(n,!0)?(f.autoCountry=n,setTimeout(()=>e1("handleAutoCountry"))):(this._setInitialState(!0),e1("rejectAutoCountryPromise"))},()=>{this._setInitialState(!0),e1("rejectAutoCountryPromise")}))}_openDropdownWithPlus(){this._openDropdown(),this.searchInput.value="+",this._filterCountries("",!0)}_initTelInputListeners(){let{strictMode:$,formatAsYouType:n,separateDialCode:r,formatOnDisplay:u,allowDropdown:l,countrySearch:p}=this.options,y=!1;/\p{L}/u.test(this.telInput.value)&&(y=!0),this._handleInputEvent=m=>{if(this.isAndroid&&m?.data==="+"&&r&&l&&p){let L=this.telInput.selectionStart||0,k=this.telInput.value.substring(0,L-1),E=this.telInput.value.substring(L);this.telInput.value=k+E,this._openDropdownWithPlus();return}this._updateCountryFromNumber(this.telInput.value)&&this._triggerCountryChange();let S=m?.data&&/[^+0-9]/.test(m.data),I=m?.inputType==="insertFromPaste"&&this.telInput.value;S||I&&!$?y=!0:/[^+0-9]/.test(this.telInput.value)||(y=!1);let _=m?.detail&&m.detail.isSetNumber&&!u;if(n&&!y&&!_){let L=this.telInput.selectionStart||0,E=this.telInput.value.substring(0,L).replace(/[^+0-9]/g,"").length,N=m?.inputType==="deleteContentForward",z=this._formatNumberAsYouType(),Z=j2(E,z,L,N);this.telInput.value=z,this.telInput.setSelectionRange(Z,Z)}},this.telInput.addEventListener("input",this._handleInputEvent),($||r)&&(this._handleKeydownEvent=m=>{if(m.key&&m.key.length===1&&!m.altKey&&!m.ctrlKey&&!m.metaKey){if(r&&l&&p&&m.key==="+"){m.preventDefault(),this._openDropdownWithPlus();return}if($){let S=this.telInput.value,I=S.charAt(0)==="+",_=!I&&this.telInput.selectionStart===0&&m.key==="+",L=/^[0-9]$/.test(m.key),k=r?L:_||L,E=S.slice(0,this.telInput.selectionStart)+m.key+S.slice(this.telInput.selectionEnd),N=this._getFullNumber(E),z=f.utils.getCoreNumber(N,this.selectedCountryData.iso2),Z=this.maxCoreNumberLength&&z.length>this.maxCoreNumberLength,$1=!1;if(I){let p1=this.selectedCountryData.iso2;$1=this._getCountryFromNumber(N)!==p1}(!k||Z&&!$1&&!_)&&m.preventDefault()}}},this.telInput.addEventListener("keydown",this._handleKeydownEvent))}_cap($){let n=parseInt(this.telInput.getAttribute("maxlength")||"",10);return n&&$.length>n?$.substr(0,n):$}_trigger($,n={}){let r=new CustomEvent($,{bubbles:!0,cancelable:!0,detail:n});this.telInput.dispatchEvent(r)}_openDropdown(){let{fixDropdownWidth:$,countrySearch:n}=this.options;if($&&(this.dropdownContent.style.width=`${this.telInput.offsetWidth}px`),this.dropdownContent.classList.remove("iti__hide"),this.selectedCountry.setAttribute("aria-expanded","true"),this._setDropdownPosition(),n){let r=this.countryList.firstElementChild;r&&(this._highlightListItem(r,!1),this.countryList.scrollTop=0),this.searchInput.focus()}this._bindDropdownListeners(),this.dropdownArrow.classList.add("iti__arrow--up"),this._trigger("open:countrydropdown")}_setDropdownPosition(){if(this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.dropdown),!this.options.useFullscreenPopup){let $=this.telInput.getBoundingClientRect(),n=this.telInput.offsetHeight;this.options.dropdownContainer&&(this.dropdown.style.top=`${$.top+n}px`,this.dropdown.style.left=`${$.left}px`,this._handleWindowScroll=()=>this._closeDropdown(),window.addEventListener("scroll",this._handleWindowScroll))}}_bindDropdownListeners(){this._handleMouseoverCountryList=u=>{let l=u.target?.closest(".iti__country");l&&this._highlightListItem(l,!1)},this.countryList.addEventListener("mouseover",this._handleMouseoverCountryList),this._handleClickCountryList=u=>{let l=u.target?.closest(".iti__country");l&&this._selectListItem(l)},this.countryList.addEventListener("click",this._handleClickCountryList);let $=!0;this._handleClickOffToClose=()=>{$||this._closeDropdown(),$=!1},document.documentElement.addEventListener("click",this._handleClickOffToClose);let n="",r=null;if(this._handleKeydownOnDropdown=u=>{["ArrowUp","ArrowDown","Enter","Escape"].includes(u.key)&&(u.preventDefault(),u.stopPropagation(),u.key==="ArrowUp"||u.key==="ArrowDown"?this._handleUpDownKey(u.key):u.key==="Enter"?this._handleEnterKey():u.key==="Escape"&&this._closeDropdown()),!this.options.countrySearch&&/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(u.key)&&(u.stopPropagation(),r&&clearTimeout(r),n+=u.key.toLowerCase(),this._searchForCountry(n),r=setTimeout(()=>{n=""},1e3))},document.addEventListener("keydown",this._handleKeydownOnDropdown),this.options.countrySearch){let u=()=>{let p=this.searchInput.value.trim();p?this._filterCountries(p):this._filterCountries("",!0)},l=null;this._handleSearchChange=()=>{l&&clearTimeout(l),l=setTimeout(()=>{u(),l=null},100)},this.searchInput.addEventListener("input",this._handleSearchChange),this.searchInput.addEventListener("click",p=>p.stopPropagation())}}_searchForCountry($){for(let n=0;nI[0]).join("").toLowerCase(),S=`+${p.dialCode}`;if(n||y.includes(u)||S.includes(u)||p.iso2.includes(u)||m.includes(u)){let I=p.nodeById[this.id];I&&this.countryList.appendChild(I),r&&(this._highlightListItem(I,!1),r=!1)}}r&&this._highlightListItem(null,!1),this.countryList.scrollTop=0,this._updateSearchResultsText()}_updateSearchResultsText(){let{i18n:$}=this.options,n=this.countryList.childElementCount,r;n===0?r=$.zeroSearchResults:n===1?r=$.oneSearchResult:r=$.multipleSearchResults.replace("${count}",n.toString()),this.searchResultsA11yText.textContent=r}_handleUpDownKey($){let n=$==="ArrowUp"?this.highlightedItem?.previousElementSibling:this.highlightedItem?.nextElementSibling;!n&&this.countryList.childElementCount>1&&(n=$==="ArrowUp"?this.countryList.lastElementChild:this.countryList.firstElementChild),n&&(this._scrollTo(n),this._highlightListItem(n,!1))}_handleEnterKey(){this.highlightedItem&&this._selectListItem(this.highlightedItem)}_updateValFromNumber($){let n=$;if(this.options.formatOnDisplay&&f.utils&&this.selectedCountryData){let r=this.options.nationalMode||n.charAt(0)!=="+"&&!this.options.separateDialCode,{NATIONAL:u,INTERNATIONAL:l}=f.utils.numberFormat,p=r?u:l;n=f.utils.formatNumber(n,this.selectedCountryData.iso2,p)}n=this._beforeSetNumber(n),this.telInput.value=n}_updateCountryFromNumber($){let n=this._getCountryFromNumber($);return n!==null?this._setCountry(n):!1}_getCountryFromNumber($){let n=$.indexOf("+"),r=n?$.substring(n):$,u=this.selectedCountryData.dialCode;r&&u==="1"&&r.charAt(0)!=="+"&&(r.charAt(0)!=="1"&&(r=`1${r}`),r=`+${r}`),this.options.separateDialCode&&u&&r.charAt(0)!=="+"&&(r=`+${u}${r}`);let p=this._getDialCode(r,!0),y=c1(r);if(p){let m=this.dialCodeToIso2Map[c1(p)],S=m.indexOf(this.selectedCountryData.iso2)!==-1&&y.length<=p.length-1;if(!(u==="1"&&c2(y))&&!S){for(let _=0;_p){let _=u-y;n.scrollTop=I-_}}_updateDialCode($){let n=this.telInput.value,r=`+${$}`,u;if(n.charAt(0)==="+"){let l=this._getDialCode(n);l?u=n.replace(l,r):u=r,this.telInput.value=u}}_getDialCode($,n){let r="";if($.charAt(0)==="+"){let u="";for(let l=0;l<$.length;l++){let p=$.charAt(l);if(!isNaN(parseInt(p,10))){if(u+=p,n)this.dialCodeToIso2Map[u]&&(r=$.substr(0,l+1));else if(this.dialCodes[u]){r=$.substr(0,l+1);break}if(u.length===this.dialCodeMaxLen)break}}}return r}_getFullNumber($){let n=$||this.telInput.value.trim(),{dialCode:r}=this.selectedCountryData,u,l=c1(n);return this.options.separateDialCode&&n.charAt(0)!=="+"&&r&&l?u=`+${r}`:u="",u+n}_beforeSetNumber($){let n=$;if(this.options.separateDialCode){let r=this._getDialCode(n);if(r){r=`+${this.selectedCountryData.dialCode}`;let u=n[r.length]===" "||n[r.length]==="-"?r.length+1:r.length;n=n.substr(u)}}return this._cap(n)}_triggerCountryChange(){this._trigger("countrychange")}_formatNumberAsYouType(){let $=this._getFullNumber(),n=f.utils?f.utils.formatNumberAsYouType($,this.selectedCountryData.iso2):$,{dialCode:r}=this.selectedCountryData;return this.options.separateDialCode&&this.telInput.value.charAt(0)!=="+"&&n.includes(`+${r}`)?(n.split(`+${r}`)[1]||"").trim():n}handleAutoCountry(){this.options.initialCountry==="auto"&&f.autoCountry&&(this.defaultCountry=f.autoCountry,this.selectedCountryData.iso2||this.selectedCountryInner.classList.contains("iti__globe")||this.setCountry(this.defaultCountry),this.resolveAutoCountryPromise())}handleUtils(){f.utils&&(this.telInput.value&&this._updateValFromNumber(this.telInput.value),this.selectedCountryData.iso2&&(this._updatePlaceholder(),this._updateMaxLength())),this.resolveUtilsScriptPromise()}destroy(){let{allowDropdown:$,separateDialCode:n}=this.options;if($){this._closeDropdown(),this.selectedCountry.removeEventListener("click",this._handleClickSelectedCountry),this.countryContainer.removeEventListener("keydown",this._handleCountryContainerKeydown);let l=this.telInput.closest("label");l&&l.removeEventListener("click",this._handleLabelClick)}let{form:r}=this.telInput;this._handleHiddenInputSubmit&&r&&r.removeEventListener("submit",this._handleHiddenInputSubmit),this.telInput.removeEventListener("input",this._handleInputEvent),this._handleKeydownEvent&&this.telInput.removeEventListener("keydown",this._handleKeydownEvent),this.telInput.removeAttribute("data-intl-tel-input-id"),n&&(this.isRTL?this.telInput.style.paddingRight=this.originalPaddingRight:this.telInput.style.paddingLeft=this.originalPaddingLeft);let u=this.telInput.parentNode;u?.parentNode?.insertBefore(this.telInput,u),u?.parentNode?.removeChild(u),delete f.instances[this.id]}getExtension(){return f.utils?f.utils.getExtension(this._getFullNumber(),this.selectedCountryData.iso2):""}getNumber($){if(f.utils){let{iso2:n}=this.selectedCountryData;return f.utils.formatNumber(this._getFullNumber(),n,$)}return""}getNumberType(){return f.utils?f.utils.getNumberType(this._getFullNumber(),this.selectedCountryData.iso2):-99}getSelectedCountryData(){return this.selectedCountryData}getValidationError(){if(f.utils){let{iso2:$}=this.selectedCountryData;return f.utils.getValidationError(this._getFullNumber(),$)}return-99}isValidNumber(){if(!this.selectedCountryData.iso2)return!1;let $=this._getFullNumber(),n=$.search(/\p{L}/u);if(n>-1){let r=$.substring(0,n),u=this._utilsIsPossibleNumber(r),l=this._utilsIsPossibleNumber($);return u&&l}return this._utilsIsPossibleNumber($)}_utilsIsPossibleNumber($){return f.utils?f.utils.isPossibleNumber($,this.selectedCountryData.iso2,this.options.validationNumberTypes):null}isValidNumberPrecise(){if(!this.selectedCountryData.iso2)return!1;let $=this._getFullNumber(),n=$.search(/\p{L}/u);if(n>-1){let r=$.substring(0,n),u=this._utilsIsValidNumber(r),l=this._utilsIsValidNumber($);return u&&l}return this._utilsIsValidNumber($)}_utilsIsValidNumber($){return f.utils?f.utils.isValidNumber($,this.selectedCountryData.iso2,this.options.validationNumberTypes):null}setCountry($){let n=$?.toLowerCase(),r=this.selectedCountryData.iso2;($&&n!==r||!$&&r)&&(this._setCountry(n),this._updateDialCode(this.selectedCountryData.dialCode),this._triggerCountryChange())}setNumber($){let n=this._updateCountryFromNumber($);this._updateValFromNumber($),n&&this._triggerCountryChange(),this._trigger("input",{isSetNumber:!0})}setPlaceholderNumberType($){this.options.placeholderNumberType=$,this._updatePlaceholder()}setDisabled($){this.telInput.disabled=$,$?this.selectedCountry.setAttribute("disabled","true"):this.selectedCountry.removeAttribute("disabled")}},W2=g=>{if(!f.utils&&!f.startedLoadingUtilsScript){let $;if(typeof g=="function")try{$=Promise.resolve(g())}catch(n){return Promise.reject(n)}else return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof g}`));return f.startedLoadingUtilsScript=!0,$.then(n=>{let r=n?.default;if(!r||typeof r!="object")throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return f.utils=r,e1("handleUtils"),!0}).catch(n=>{throw e1("rejectUtilsScriptPromise",n),n})}return null},f=Object.assign((g,$)=>{let n=new b1(g,$);return n._init(),g.setAttribute("data-intl-tel-input-id",n.id.toString()),f.instances[n.id]=n,n},{defaults:p2,documentReady:()=>document.readyState==="complete",getCountryData:()=>K,getInstance:g=>{let $=g.getAttribute("data-intl-tel-input-id");return $?f.instances[$]:null},instances:{},attachUtils:W2,startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"25.0.0"}),S1=f;(function(){var g=this||self;function $(d,t){d=d.split(".");var e=g;d[0]in e||typeof e.execScript>"u"||e.execScript("var "+d[0]);for(var i;d.length&&(i=d.shift());)d.length||t===void 0?e[i]&&e[i]!==Object.prototype[i]?e=e[i]:e=e[i]={}:e[i]=t}function n(d,t){function e(){}e.prototype=t.prototype,d.ma=t.prototype,d.prototype=new e,d.prototype.constructor=d,d.sa=function(i,o,s){for(var a=Array(arguments.length-2),h=2;hd.length?!1:B(T2,d)}function B1(d){return B(S2,d)?o1(d,y2):o1(d,g1)}function G1(d){var t=B1(d.toString());R(d),d.g(t)}function H1(d){return d!=null&&(H(d,9)!=1||D(d,9)[0]!=-1)}function o1(d,t){for(var e=new w,i,o=d.length,s=0;st?2:s[s.length-1]=o&&o<=i;++o)if(e=parseInt(d.substring(0,o),10),e in q)return t.g(d.substring(o)),e;return 0}function z1(d,t,e,i,o,s){if(t.length==0)return 0;t=new w(t);var a;e!=null&&(a=c(e,11)),a==null&&(a="NonMatch");var h=t.toString();if(h.length==0)a=20;else if(X.test(h))h=h.replace(X,""),R(t),t.g(B1(h)),a=1;else{if(h=new RegExp(a),G1(t),a=t.toString(),a.search(h)==0){h=a.match(h)[0].length;var C=a.substring(h).match(x1);C&&C[1]!=null&&0=t.h.length)throw Error("Phone number too short after IDD");if(d=W1(t,i),d!=0)return A(s,1,d),d;throw Error("Invalid country calling code")}return e!=null&&(a=v(e,10),h=""+a,C=t.toString(),C.lastIndexOf(h,0)==0&&(h=new w(C.substring(h.length)),C=c(e,1),C=new RegExp(v(C,2)),Z1(h,e,null),h=h.toString(),!B(C,t.toString())&&B(C,h)||a1(d,t.toString(),e,-1)==3))?(i.g(h),o&&A(s,6,10),A(s,1,a),a):(A(s,1,0),0)}function Z1(d,t,e){var i=d.toString(),o=i.length,s=c(t,15);if(o!=0&&s!=null&&s.length!=0){var a=new RegExp("^(?:"+s+")");if(o=a.exec(i)){s=new RegExp(v(c(t,1),2));var h=B(s,i),C=o.length-1;t=c(t,16),t==null||t.length==0||o[C]==null||o[C].length==0?(!h||B(s,i.substring(o[0].length)))&&(e!=null&&0=t.length)s="";else{var a=t.indexOf(";",s);s=a!==-1?t.substring(s,a):t.substring(s)}var h=s;if(h==null?a=!0:h.length===0?a=!1:(a=L2.exec(h),h=w2.exec(h),a=a!==null||h!==null),!a||(s!=null?(s.charAt(0)==="+"&&o.g(s),s=t.indexOf("tel:"),o.g(t.substring(0<=s?s+4:0,t.indexOf(";phone-context=")))):(s=o.g,a=t??"",h=a.search(I2),0<=h?(a=a.substring(h),a=a.replace(b2,""),h=a.search(_2),0<=h&&(a=a.substring(0,h))):a="",s.call(o,a)),s=o.toString(),a=s.indexOf(";isub="),0t.h.length||(a!=null&&(e=new w,o=new w(t.toString()),Z1(o,a,e),d=a1(d,o.toString(),a,-1),d!=2&&d!=4&&d!=5&&(t=o,i&&0d))throw Error("The string supplied is too short to be a phone number");if(17{try{let e=d.replace(/[^+0-9]/g,""),i=new M2(t);t="";for(let o=0;o{try{let o=M.g(),s=W(o,d,t);var i=l1(o,s,-1);return i==0||i==4?o.format(s,typeof e>"u"?0:e):d}catch{return d}}),$("intlTelInputUtilsTemp.getExampleNumber",(d,t,e,i)=>{try{let C=M.g();d:{var o=C;if(s1(d)){var s=u1(F(o,d),e);try{if(x(s,6)){var a=c(s,6),h=Y1(o,a,d,!1);break d}}catch{}}h=null}return C.format(h,i?0:t?2:1)}catch{return""}}),$("intlTelInputUtilsTemp.getExtension",(d,t)=>{try{return c(W(M.g(),d,t),3)}catch{return""}}),$("intlTelInputUtilsTemp.getNumberType",(d,t)=>{try{let e=M.g(),i=W(e,d,t);return K1(e,i)}catch{return-99}}),$("intlTelInputUtilsTemp.getValidationError",(d,t)=>{if(!t)return 1;try{let e=M.g(),i=W(e,d,t);return l1(e,i,-1)}catch(e){return e.message==="Invalid country calling code"?1:3>=d.length||e.message==="Phone number too short after IDD"||e.message==="The string supplied is too short to be a phone number"?2:e.message==="The string supplied is too long to be a phone number"?3:-99}}),$("intlTelInputUtilsTemp.isValidNumber",(d,t,e)=>{try{let i=M.g(),o=W(i,d,t),s=A2(i,o);if(e){let a=e.map(h=>y1[h]);return s&&a.includes(K1(i,o))}return s}catch{return!1}}),$("intlTelInputUtilsTemp.isPossibleNumber",(d,t,e)=>{try{let i=M.g(),o=W(i,d,t);if(e){e.includes("FIXED_LINE_OR_MOBILE")&&(e.includes("MOBILE")||e.push("MOBILE"),e.includes("FIXED_LINE")||e.push("FIXED_LINE"));for(let s of e)if(l1(i,o,y1[s])===0)return!0;return!1}return l1(i,o,-1)===0}catch{return!1}}),$("intlTelInputUtilsTemp.getCoreNumber",(d,t)=>{try{return c(W(M.g(),d,t),2).toString()}catch{return""}}),$("intlTelInputUtilsTemp.numberFormat",{E164:0,INTERNATIONAL:1,NATIONAL:2,RFC3966:3}),$("intlTelInputUtilsTemp.numberType",y1),$("intlTelInputUtilsTemp.validationError",{IS_POSSIBLE:0,INVALID_COUNTRY_CODE:1,TOO_SHORT:2,TOO_LONG:3,IS_POSSIBLE_LOCAL_ONLY:4,INVALID_LENGTH:5})})();var z2=window.intlTelInputUtilsTemp;delete window.intlTelInputUtilsTemp;var f2=z2;S1.utils=f2;var Z2=S1;return G2(Y2);})(); +var factoryOutput=(()=>{var I1=Object.defineProperty;var x2=Object.getOwnPropertyDescriptor;var R2=Object.getOwnPropertyNames;var O2=Object.prototype.hasOwnProperty;var k2=(g,$)=>{for(var n in $)I1(g,n,{get:$[n],enumerable:!0})},B2=(g,$,n,r)=>{if($&&typeof $=="object"||typeof $=="function")for(let u of R2($))!O2.call(g,u)&&u!==n&&I1(g,u,{get:()=>$[u],enumerable:!(r=x2($,u))||r.enumerable});return g};var G2=g=>B2(I1({},"__esModule",{value:!0}),g);var Y2={};k2(Y2,{default:()=>Z2});var s2=[["af","93"],["ax","358",1,["18"]],["al","355"],["dz","213"],["as","1",5,["684"]],["ad","376"],["ao","244"],["ai","1",6,["264"]],["ag","1",7,["268"]],["ar","54"],["am","374"],["aw","297"],["ac","247"],["au","61",0],["at","43"],["az","994"],["bs","1",8,["242"]],["bh","973"],["bd","880"],["bb","1",9,["246"]],["by","375"],["be","32"],["bz","501"],["bj","229"],["bm","1",10,["441"]],["bt","975"],["bo","591"],["ba","387"],["bw","267"],["br","55"],["io","246"],["vg","1",11,["284"]],["bn","673"],["bg","359"],["bf","226"],["bi","257"],["kh","855"],["cm","237"],["ca","1",1,["204","226","236","249","250","263","289","306","343","354","365","367","368","382","387","403","416","418","428","431","437","438","450","584","468","474","506","514","519","548","579","581","584","587","604","613","639","647","672","683","705","709","742","753","778","780","782","807","819","825","867","873","879","902","905"]],["cv","238"],["bq","599",1,["3","4","7"]],["ky","1",12,["345"]],["cf","236"],["td","235"],["cl","56"],["cn","86"],["cx","61",2,["89164"]],["cc","61",1,["89162"]],["co","57"],["km","269"],["cg","242"],["cd","243"],["ck","682"],["cr","506"],["ci","225"],["hr","385"],["cu","53"],["cw","599",0],["cy","357"],["cz","420"],["dk","45"],["dj","253"],["dm","1",13,["767"]],["do","1",2,["809","829","849"]],["ec","593"],["eg","20"],["sv","503"],["gq","240"],["er","291"],["ee","372"],["sz","268"],["et","251"],["fk","500"],["fo","298"],["fj","679"],["fi","358",0],["fr","33"],["gf","594"],["pf","689"],["ga","241"],["gm","220"],["ge","995"],["de","49"],["gh","233"],["gi","350"],["gr","30"],["gl","299"],["gd","1",14,["473"]],["gp","590",0],["gu","1",15,["671"]],["gt","502"],["gg","44",1,["1481","7781","7839","7911"]],["gn","224"],["gw","245"],["gy","592"],["ht","509"],["hn","504"],["hk","852"],["hu","36"],["is","354"],["in","91"],["id","62"],["ir","98"],["iq","964"],["ie","353"],["im","44",2,["1624","74576","7524","7924","7624"]],["il","972"],["it","39",0],["jm","1",4,["876","658"]],["jp","81"],["je","44",3,["1534","7509","7700","7797","7829","7937"]],["jo","962"],["kz","7",1,["33","7"]],["ke","254"],["ki","686"],["xk","383"],["kw","965"],["kg","996"],["la","856"],["lv","371"],["lb","961"],["ls","266"],["lr","231"],["ly","218"],["li","423"],["lt","370"],["lu","352"],["mo","853"],["mg","261"],["mw","265"],["my","60"],["mv","960"],["ml","223"],["mt","356"],["mh","692"],["mq","596"],["mr","222"],["mu","230"],["yt","262",1,["269","639"]],["mx","52"],["fm","691"],["md","373"],["mc","377"],["mn","976"],["me","382"],["ms","1",16,["664"]],["ma","212",0],["mz","258"],["mm","95"],["na","264"],["nr","674"],["np","977"],["nl","31"],["nc","687"],["nz","64"],["ni","505"],["ne","227"],["ng","234"],["nu","683"],["nf","672"],["kp","850"],["mk","389"],["mp","1",17,["670"]],["no","47",0],["om","968"],["pk","92"],["pw","680"],["ps","970"],["pa","507"],["pg","675"],["py","595"],["pe","51"],["ph","63"],["pl","48"],["pt","351"],["pr","1",3,["787","939"]],["qa","974"],["re","262",0],["ro","40"],["ru","7",0],["rw","250"],["ws","685"],["sm","378"],["st","239"],["sa","966"],["sn","221"],["rs","381"],["sc","248"],["sl","232"],["sg","65"],["sx","1",21,["721"]],["sk","421"],["si","386"],["sb","677"],["so","252"],["za","27"],["kr","82"],["ss","211"],["es","34"],["lk","94"],["bl","590",1],["sh","290"],["kn","1",18,["869"]],["lc","1",19,["758"]],["mf","590",2],["pm","508"],["vc","1",20,["784"]],["sd","249"],["sr","597"],["sj","47",1,["79"]],["se","46"],["ch","41"],["sy","963"],["tw","886"],["tj","992"],["tz","255"],["th","66"],["tl","670"],["tg","228"],["tk","690"],["to","676"],["tt","1",22,["868"]],["tn","216"],["tr","90"],["tm","993"],["tc","1",23,["649"]],["tv","688"],["ug","256"],["ua","380"],["ae","971"],["gb","44",0],["us","1",0],["uy","598"],["vi","1",24,["340"]],["uz","998"],["vu","678"],["va","39",1,["06698"]],["ve","58"],["vn","84"],["wf","681"],["eh","212",1,["5288","5289"]],["ye","967"],["zm","260"],["zw","263"]],u2=[];for(let g=0;gg.replace(/\D/g,""),h2=(g="")=>g.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),c2=g=>{let $=c1(g);if($.charAt(0)==="1"){let n=$.substr(1,3);return V2.indexOf(n)!==-1}return!1},j2=(g,$,n,r)=>{if(n===0&&!r)return 0;let u=0;for(let l=0;l<$.length;l++){if(/[+0-9]/.test($[l])&&u++,u===g&&!r)return l+1;if(r&&u===g+1)return l}return $.length},T=(g,$,n)=>{let r=document.createElement(g);return $&&Object.entries($).forEach(([u,l])=>r.setAttribute(u,l)),n&&n.appendChild(r),r},e1=(g,...$)=>{let{instances:n}=f;Object.values(n).forEach(r=>r[g](...$))},b1=class{constructor($,n={}){this.id=K2++,this.telInput=$,this.highlightedItem=null,this.options=Object.assign({},p2,n),this.hadInitialPlaceholder=!!$.getAttribute("placeholder")}_init(){this.options.useFullscreenPopup&&(this.options.fixDropdownWidth=!1),this.options.onlyCountries.length===1&&(this.options.initialCountry=this.options.onlyCountries[0]),this.options.separateDialCode&&(this.options.nationalMode=!1),this.options.allowDropdown&&!this.options.showFlags&&!this.options.separateDialCode&&(this.options.nationalMode=!1),this.options.useFullscreenPopup&&!this.options.dropdownContainer&&(this.options.dropdownContainer=document.body),this.isAndroid=typeof navigator<"u"?/Android/i.test(navigator.userAgent):!1,this.isRTL=!!this.telInput.closest("[dir=rtl]");let $=this.options.allowDropdown||this.options.separateDialCode;this.showSelectedCountryOnLeft=this.isRTL?!$:$,this.options.separateDialCode&&(this.isRTL?this.originalPaddingRight=this.telInput.style.paddingRight:this.originalPaddingLeft=this.telInput.style.paddingLeft),this.options.i18n={..._1,...this.options.i18n};let n=new Promise((u,l)=>{this.resolveAutoCountryPromise=u,this.rejectAutoCountryPromise=l}),r=new Promise((u,l)=>{this.resolveUtilsScriptPromise=u,this.rejectUtilsScriptPromise=l});this.promise=Promise.all([n,r]),this.selectedCountryData={},this._processCountryData(),this._generateMarkup(),this._setInitialState(),this._initListeners(),this._initRequests()}_processCountryData(){this._processAllCountries(),this._processDialCodes(),this._translateCountryNames(),this._sortCountries()}_sortCountries(){this.options.countryOrder&&(this.options.countryOrder=this.options.countryOrder.map($=>$.toLowerCase())),this.countries.sort(($,n)=>{let{countryOrder:r}=this.options;if(r){let u=r.indexOf($.iso2),l=r.indexOf(n.iso2),p=u>-1,y=l>-1;if(p||y)return p&&y?u-l:p?-1:1}return $.name.localeCompare(n.name)})}_addToDialCodeMap($,n,r){n.length>this.dialCodeMaxLen&&(this.dialCodeMaxLen=n.length),this.dialCodeToIso2Map.hasOwnProperty(n)||(this.dialCodeToIso2Map[n]=[]);for(let l=0;lu.toLowerCase());this.countries=K.filter(u=>r.indexOf(u.iso2)>-1)}else if(n.length){let r=n.map(u=>u.toLowerCase());this.countries=K.filter(u=>r.indexOf(u.iso2)===-1)}else this.countries=K}_translateCountryNames(){for(let $=0;$`),l+=`${n.name}`,l+=`+${n.dialCode}`,u.insertAdjacentHTML("beforeend",l)}}_setInitialState($=!1){let n=this.telInput.getAttribute("value"),r=this.telInput.value,l=n&&n.charAt(0)==="+"&&(!r||r.charAt(0)!=="+")?n:r,p=this._getDialCode(l),y=c2(l),{initialCountry:m,geoIpLookup:S}=this.options,I=m==="auto"&&S;if(p&&!y)this._updateCountryFromNumber(l);else if(!I||$){let _=m?m.toLowerCase():"";_&&this._getCountryData(_,!0)?this._setCountry(_):p&&y?this._setCountry("us"):this._setCountry()}l&&this._updateValFromNumber(l)}_initListeners(){this._initTelInputListeners(),this.options.allowDropdown&&this._initDropdownListeners(),(this.hiddenInput||this.hiddenInputCountry)&&this.telInput.form&&this._initHiddenInputListener()}_initHiddenInputListener(){this._handleHiddenInputSubmit=()=>{this.hiddenInput&&(this.hiddenInput.value=this.getNumber()),this.hiddenInputCountry&&(this.hiddenInputCountry.value=this.getSelectedCountryData().iso2||"")},this.telInput.form?.addEventListener("submit",this._handleHiddenInputSubmit)}_initDropdownListeners(){this._handleLabelClick=n=>{this.dropdownContent.classList.contains("iti__hide")?this.telInput.focus():n.preventDefault()};let $=this.telInput.closest("label");$&&$.addEventListener("click",this._handleLabelClick),this._handleClickSelectedCountry=()=>{this.dropdownContent.classList.contains("iti__hide")&&!this.telInput.disabled&&!this.telInput.readOnly&&this._openDropdown()},this.selectedCountry.addEventListener("click",this._handleClickSelectedCountry),this._handleCountryContainerKeydown=n=>{this.dropdownContent.classList.contains("iti__hide")&&["ArrowUp","ArrowDown"," ","Enter"].includes(n.key)&&(n.preventDefault(),n.stopPropagation(),this._openDropdown()),n.key==="Tab"&&this._closeDropdown()},this.countryContainer.addEventListener("keydown",this._handleCountryContainerKeydown)}_initRequests(){let{loadUtils:$,initialCountry:n,geoIpLookup:r}=this.options;$&&!f.utils?(this._handlePageLoad=()=>{window.removeEventListener("load",this._handlePageLoad),f.attachUtils($)?.catch(()=>{})},f.documentReady()?this._handlePageLoad():window.addEventListener("load",this._handlePageLoad)):this.resolveUtilsScriptPromise(),n==="auto"&&r&&!this.selectedCountryData.iso2?this._loadAutoCountry():this.resolveAutoCountryPromise()}_loadAutoCountry(){f.autoCountry?this.handleAutoCountry():f.startedLoadingAutoCountry||(f.startedLoadingAutoCountry=!0,typeof this.options.geoIpLookup=="function"&&this.options.geoIpLookup(($="")=>{let n=$.toLowerCase();n&&this._getCountryData(n,!0)?(f.autoCountry=n,setTimeout(()=>e1("handleAutoCountry"))):(this._setInitialState(!0),e1("rejectAutoCountryPromise"))},()=>{this._setInitialState(!0),e1("rejectAutoCountryPromise")}))}_openDropdownWithPlus(){this._openDropdown(),this.searchInput.value="+",this._filterCountries("",!0)}_initTelInputListeners(){let{strictMode:$,formatAsYouType:n,separateDialCode:r,formatOnDisplay:u,allowDropdown:l,countrySearch:p}=this.options,y=!1;/\p{L}/u.test(this.telInput.value)&&(y=!0),this._handleInputEvent=m=>{if(this.isAndroid&&m?.data==="+"&&r&&l&&p){let L=this.telInput.selectionStart||0,k=this.telInput.value.substring(0,L-1),E=this.telInput.value.substring(L);this.telInput.value=k+E,this._openDropdownWithPlus();return}this._updateCountryFromNumber(this.telInput.value)&&this._triggerCountryChange();let S=m?.data&&/[^+0-9]/.test(m.data),I=m?.inputType==="insertFromPaste"&&this.telInput.value;S||I&&!$?y=!0:/[^+0-9]/.test(this.telInput.value)||(y=!1);let _=m?.detail&&m.detail.isSetNumber&&!u;if(n&&!y&&!_){let L=this.telInput.selectionStart||0,E=this.telInput.value.substring(0,L).replace(/[^+0-9]/g,"").length,N=m?.inputType==="deleteContentForward",z=this._formatNumberAsYouType(),Z=j2(E,z,L,N);this.telInput.value=z,this.telInput.setSelectionRange(Z,Z)}},this.telInput.addEventListener("input",this._handleInputEvent),($||r)&&(this._handleKeydownEvent=m=>{if(m.key&&m.key.length===1&&!m.altKey&&!m.ctrlKey&&!m.metaKey){if(r&&l&&p&&m.key==="+"){m.preventDefault(),this._openDropdownWithPlus();return}if($){let S=this.telInput.value,I=S.charAt(0)==="+",_=!I&&this.telInput.selectionStart===0&&m.key==="+",L=/^[0-9]$/.test(m.key),k=r?L:_||L,E=S.slice(0,this.telInput.selectionStart)+m.key+S.slice(this.telInput.selectionEnd),N=this._getFullNumber(E),z=f.utils.getCoreNumber(N,this.selectedCountryData.iso2),Z=this.maxCoreNumberLength&&z.length>this.maxCoreNumberLength,$1=!1;if(I){let p1=this.selectedCountryData.iso2;$1=this._getCountryFromNumber(N)!==p1}(!k||Z&&!$1&&!_)&&m.preventDefault()}}},this.telInput.addEventListener("keydown",this._handleKeydownEvent))}_cap($){let n=parseInt(this.telInput.getAttribute("maxlength")||"",10);return n&&$.length>n?$.substr(0,n):$}_trigger($,n={}){let r=new CustomEvent($,{bubbles:!0,cancelable:!0,detail:n});this.telInput.dispatchEvent(r)}_openDropdown(){let{fixDropdownWidth:$,countrySearch:n}=this.options;if($&&(this.dropdownContent.style.width=`${this.telInput.offsetWidth}px`),this.dropdownContent.classList.remove("iti__hide"),this.selectedCountry.setAttribute("aria-expanded","true"),this._setDropdownPosition(),n){let r=this.countryList.firstElementChild;r&&(this._highlightListItem(r,!1),this.countryList.scrollTop=0),this.searchInput.focus()}this._bindDropdownListeners(),this.dropdownArrow.classList.add("iti__arrow--up"),this._trigger("open:countrydropdown")}_setDropdownPosition(){if(this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.dropdown),!this.options.useFullscreenPopup){let $=this.telInput.getBoundingClientRect(),n=this.telInput.offsetHeight;this.options.dropdownContainer&&(this.dropdown.style.top=`${$.top+n}px`,this.dropdown.style.left=`${$.left}px`,this._handleWindowScroll=()=>this._closeDropdown(),window.addEventListener("scroll",this._handleWindowScroll))}}_bindDropdownListeners(){this._handleMouseoverCountryList=u=>{let l=u.target?.closest(".iti__country");l&&this._highlightListItem(l,!1)},this.countryList.addEventListener("mouseover",this._handleMouseoverCountryList),this._handleClickCountryList=u=>{let l=u.target?.closest(".iti__country");l&&this._selectListItem(l)},this.countryList.addEventListener("click",this._handleClickCountryList);let $=!0;this._handleClickOffToClose=()=>{$||this._closeDropdown(),$=!1},document.documentElement.addEventListener("click",this._handleClickOffToClose);let n="",r=null;if(this._handleKeydownOnDropdown=u=>{["ArrowUp","ArrowDown","Enter","Escape"].includes(u.key)&&(u.preventDefault(),u.stopPropagation(),u.key==="ArrowUp"||u.key==="ArrowDown"?this._handleUpDownKey(u.key):u.key==="Enter"?this._handleEnterKey():u.key==="Escape"&&this._closeDropdown()),!this.options.countrySearch&&/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(u.key)&&(u.stopPropagation(),r&&clearTimeout(r),n+=u.key.toLowerCase(),this._searchForCountry(n),r=setTimeout(()=>{n=""},1e3))},document.addEventListener("keydown",this._handleKeydownOnDropdown),this.options.countrySearch){let u=()=>{let p=this.searchInput.value.trim();p?this._filterCountries(p):this._filterCountries("",!0)},l=null;this._handleSearchChange=()=>{l&&clearTimeout(l),l=setTimeout(()=>{u(),l=null},100)},this.searchInput.addEventListener("input",this._handleSearchChange),this.searchInput.addEventListener("click",p=>p.stopPropagation())}}_searchForCountry($){for(let n=0;nI[0]).join("").toLowerCase(),S=`+${p.dialCode}`;if(n||y.includes(u)||S.includes(u)||p.iso2.includes(u)||m.includes(u)){let I=p.nodeById[this.id];I&&this.countryList.appendChild(I),r&&(this._highlightListItem(I,!1),r=!1)}}r&&this._highlightListItem(null,!1),this.countryList.scrollTop=0,this._updateSearchResultsText()}_updateSearchResultsText(){let{i18n:$}=this.options,n=this.countryList.childElementCount,r;n===0?r=$.zeroSearchResults:n===1?r=$.oneSearchResult:r=$.multipleSearchResults.replace("${count}",n.toString()),this.searchResultsA11yText.textContent=r}_handleUpDownKey($){let n=$==="ArrowUp"?this.highlightedItem?.previousElementSibling:this.highlightedItem?.nextElementSibling;!n&&this.countryList.childElementCount>1&&(n=$==="ArrowUp"?this.countryList.lastElementChild:this.countryList.firstElementChild),n&&(this._scrollTo(n),this._highlightListItem(n,!1))}_handleEnterKey(){this.highlightedItem&&this._selectListItem(this.highlightedItem)}_updateValFromNumber($){let n=$;if(this.options.formatOnDisplay&&f.utils&&this.selectedCountryData){let r=this.options.nationalMode||n.charAt(0)!=="+"&&!this.options.separateDialCode,{NATIONAL:u,INTERNATIONAL:l}=f.utils.numberFormat,p=r?u:l;n=f.utils.formatNumber(n,this.selectedCountryData.iso2,p)}n=this._beforeSetNumber(n),this.telInput.value=n}_updateCountryFromNumber($){let n=this._getCountryFromNumber($);return n!==null?this._setCountry(n):!1}_getCountryFromNumber($){let n=$.indexOf("+"),r=n?$.substring(n):$,u=this.selectedCountryData.dialCode;r&&u==="1"&&r.charAt(0)!=="+"&&(r.charAt(0)!=="1"&&(r=`1${r}`),r=`+${r}`),this.options.separateDialCode&&u&&r.charAt(0)!=="+"&&(r=`+${u}${r}`);let p=this._getDialCode(r,!0),y=c1(r);if(p){let m=this.dialCodeToIso2Map[c1(p)],S=m.indexOf(this.selectedCountryData.iso2)!==-1&&y.length<=p.length-1;if(!(u==="1"&&c2(y))&&!S){for(let _=0;_p){let _=u-y;n.scrollTop=I-_}}_updateDialCode($){let n=this.telInput.value,r=`+${$}`,u;if(n.charAt(0)==="+"){let l=this._getDialCode(n);l?u=n.replace(l,r):u=r,this.telInput.value=u}}_getDialCode($,n){let r="";if($.charAt(0)==="+"){let u="";for(let l=0;l<$.length;l++){let p=$.charAt(l);if(!isNaN(parseInt(p,10))){if(u+=p,n)this.dialCodeToIso2Map[u]&&(r=$.substr(0,l+1));else if(this.dialCodes[u]){r=$.substr(0,l+1);break}if(u.length===this.dialCodeMaxLen)break}}}return r}_getFullNumber($){let n=$||this.telInput.value.trim(),{dialCode:r}=this.selectedCountryData,u,l=c1(n);return this.options.separateDialCode&&n.charAt(0)!=="+"&&r&&l?u=`+${r}`:u="",u+n}_beforeSetNumber($){let n=$;if(this.options.separateDialCode){let r=this._getDialCode(n);if(r){r=`+${this.selectedCountryData.dialCode}`;let u=n[r.length]===" "||n[r.length]==="-"?r.length+1:r.length;n=n.substr(u)}}return this._cap(n)}_triggerCountryChange(){this._trigger("countrychange")}_formatNumberAsYouType(){let $=this._getFullNumber(),n=f.utils?f.utils.formatNumberAsYouType($,this.selectedCountryData.iso2):$,{dialCode:r}=this.selectedCountryData;return this.options.separateDialCode&&this.telInput.value.charAt(0)!=="+"&&n.includes(`+${r}`)?(n.split(`+${r}`)[1]||"").trim():n}handleAutoCountry(){this.options.initialCountry==="auto"&&f.autoCountry&&(this.defaultCountry=f.autoCountry,this.selectedCountryData.iso2||this.selectedCountryInner.classList.contains("iti__globe")||this.setCountry(this.defaultCountry),this.resolveAutoCountryPromise())}handleUtils(){f.utils&&(this.telInput.value&&this._updateValFromNumber(this.telInput.value),this.selectedCountryData.iso2&&(this._updatePlaceholder(),this._updateMaxLength())),this.resolveUtilsScriptPromise()}destroy(){let{allowDropdown:$,separateDialCode:n}=this.options;if($){this._closeDropdown(),this.selectedCountry.removeEventListener("click",this._handleClickSelectedCountry),this.countryContainer.removeEventListener("keydown",this._handleCountryContainerKeydown);let l=this.telInput.closest("label");l&&l.removeEventListener("click",this._handleLabelClick)}let{form:r}=this.telInput;this._handleHiddenInputSubmit&&r&&r.removeEventListener("submit",this._handleHiddenInputSubmit),this.telInput.removeEventListener("input",this._handleInputEvent),this._handleKeydownEvent&&this.telInput.removeEventListener("keydown",this._handleKeydownEvent),this.telInput.removeAttribute("data-intl-tel-input-id"),n&&(this.isRTL?this.telInput.style.paddingRight=this.originalPaddingRight:this.telInput.style.paddingLeft=this.originalPaddingLeft);let u=this.telInput.parentNode;u?.parentNode?.insertBefore(this.telInput,u),u?.parentNode?.removeChild(u),delete f.instances[this.id]}getExtension(){return f.utils?f.utils.getExtension(this._getFullNumber(),this.selectedCountryData.iso2):""}getNumber($){if(f.utils){let{iso2:n}=this.selectedCountryData;return f.utils.formatNumber(this._getFullNumber(),n,$)}return""}getNumberType(){return f.utils?f.utils.getNumberType(this._getFullNumber(),this.selectedCountryData.iso2):-99}getSelectedCountryData(){return this.selectedCountryData}getValidationError(){if(f.utils){let{iso2:$}=this.selectedCountryData;return f.utils.getValidationError(this._getFullNumber(),$)}return-99}isValidNumber(){if(!this.selectedCountryData.iso2)return!1;let $=this._getFullNumber(),n=$.search(/\p{L}/u);if(n>-1){let r=$.substring(0,n),u=this._utilsIsPossibleNumber(r),l=this._utilsIsPossibleNumber($);return u&&l}return this._utilsIsPossibleNumber($)}_utilsIsPossibleNumber($){return f.utils?f.utils.isPossibleNumber($,this.selectedCountryData.iso2,this.options.validationNumberTypes):null}isValidNumberPrecise(){if(!this.selectedCountryData.iso2)return!1;let $=this._getFullNumber(),n=$.search(/\p{L}/u);if(n>-1){let r=$.substring(0,n),u=this._utilsIsValidNumber(r),l=this._utilsIsValidNumber($);return u&&l}return this._utilsIsValidNumber($)}_utilsIsValidNumber($){return f.utils?f.utils.isValidNumber($,this.selectedCountryData.iso2,this.options.validationNumberTypes):null}setCountry($){let n=$?.toLowerCase(),r=this.selectedCountryData.iso2;($&&n!==r||!$&&r)&&(this._setCountry(n),this._updateDialCode(this.selectedCountryData.dialCode),this._triggerCountryChange())}setNumber($){let n=this._updateCountryFromNumber($);this._updateValFromNumber($),n&&this._triggerCountryChange(),this._trigger("input",{isSetNumber:!0})}setPlaceholderNumberType($){this.options.placeholderNumberType=$,this._updatePlaceholder()}setDisabled($){this.telInput.disabled=$,$?this.selectedCountry.setAttribute("disabled","true"):this.selectedCountry.removeAttribute("disabled")}},W2=g=>{if(!f.utils&&!f.startedLoadingUtilsScript){let $;if(typeof g=="function")try{$=Promise.resolve(g())}catch(n){return Promise.reject(n)}else return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof g}`));return f.startedLoadingUtilsScript=!0,$.then(n=>{let r=n?.default;if(!r||typeof r!="object")throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return f.utils=r,e1("handleUtils"),!0}).catch(n=>{throw e1("rejectUtilsScriptPromise",n),n})}return null},f=Object.assign((g,$)=>{let n=new b1(g,$);return n._init(),g.setAttribute("data-intl-tel-input-id",n.id.toString()),f.instances[n.id]=n,n},{defaults:p2,documentReady:()=>document.readyState==="complete",getCountryData:()=>K,getInstance:g=>{let $=g.getAttribute("data-intl-tel-input-id");return $?f.instances[$]:null},instances:{},attachUtils:W2,startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"25.0.1"}),S1=f;(function(){var g=this||self;function $(d,t){d=d.split(".");var e=g;d[0]in e||typeof e.execScript>"u"||e.execScript("var "+d[0]);for(var i;d.length&&(i=d.shift());)d.length||t===void 0?e[i]&&e[i]!==Object.prototype[i]?e=e[i]:e=e[i]={}:e[i]=t}function n(d,t){function e(){}e.prototype=t.prototype,d.ma=t.prototype,d.prototype=new e,d.prototype.constructor=d,d.sa=function(i,o,s){for(var a=Array(arguments.length-2),h=2;hd.length?!1:B(T2,d)}function B1(d){return B(S2,d)?o1(d,y2):o1(d,g1)}function G1(d){var t=B1(d.toString());R(d),d.g(t)}function H1(d){return d!=null&&(H(d,9)!=1||D(d,9)[0]!=-1)}function o1(d,t){for(var e=new w,i,o=d.length,s=0;st?2:s[s.length-1]=o&&o<=i;++o)if(e=parseInt(d.substring(0,o),10),e in q)return t.g(d.substring(o)),e;return 0}function z1(d,t,e,i,o,s){if(t.length==0)return 0;t=new w(t);var a;e!=null&&(a=c(e,11)),a==null&&(a="NonMatch");var h=t.toString();if(h.length==0)a=20;else if(X.test(h))h=h.replace(X,""),R(t),t.g(B1(h)),a=1;else{if(h=new RegExp(a),G1(t),a=t.toString(),a.search(h)==0){h=a.match(h)[0].length;var C=a.substring(h).match(x1);C&&C[1]!=null&&0=t.h.length)throw Error("Phone number too short after IDD");if(d=W1(t,i),d!=0)return A(s,1,d),d;throw Error("Invalid country calling code")}return e!=null&&(a=v(e,10),h=""+a,C=t.toString(),C.lastIndexOf(h,0)==0&&(h=new w(C.substring(h.length)),C=c(e,1),C=new RegExp(v(C,2)),Z1(h,e,null),h=h.toString(),!B(C,t.toString())&&B(C,h)||a1(d,t.toString(),e,-1)==3))?(i.g(h),o&&A(s,6,10),A(s,1,a),a):(A(s,1,0),0)}function Z1(d,t,e){var i=d.toString(),o=i.length,s=c(t,15);if(o!=0&&s!=null&&s.length!=0){var a=new RegExp("^(?:"+s+")");if(o=a.exec(i)){s=new RegExp(v(c(t,1),2));var h=B(s,i),C=o.length-1;t=c(t,16),t==null||t.length==0||o[C]==null||o[C].length==0?(!h||B(s,i.substring(o[0].length)))&&(e!=null&&0=t.length)s="";else{var a=t.indexOf(";",s);s=a!==-1?t.substring(s,a):t.substring(s)}var h=s;if(h==null?a=!0:h.length===0?a=!1:(a=L2.exec(h),h=w2.exec(h),a=a!==null||h!==null),!a||(s!=null?(s.charAt(0)==="+"&&o.g(s),s=t.indexOf("tel:"),o.g(t.substring(0<=s?s+4:0,t.indexOf(";phone-context=")))):(s=o.g,a=t??"",h=a.search(I2),0<=h?(a=a.substring(h),a=a.replace(b2,""),h=a.search(_2),0<=h&&(a=a.substring(0,h))):a="",s.call(o,a)),s=o.toString(),a=s.indexOf(";isub="),0t.h.length||(a!=null&&(e=new w,o=new w(t.toString()),Z1(o,a,e),d=a1(d,o.toString(),a,-1),d!=2&&d!=4&&d!=5&&(t=o,i&&0d))throw Error("The string supplied is too short to be a phone number");if(17{try{let e=d.replace(/[^+0-9]/g,""),i=new M2(t);t="";for(let o=0;o{try{let o=M.g(),s=W(o,d,t);var i=l1(o,s,-1);return i==0||i==4?o.format(s,typeof e>"u"?0:e):d}catch{return d}}),$("intlTelInputUtilsTemp.getExampleNumber",(d,t,e,i)=>{try{let C=M.g();d:{var o=C;if(s1(d)){var s=u1(F(o,d),e);try{if(x(s,6)){var a=c(s,6),h=Y1(o,a,d,!1);break d}}catch{}}h=null}return C.format(h,i?0:t?2:1)}catch{return""}}),$("intlTelInputUtilsTemp.getExtension",(d,t)=>{try{return c(W(M.g(),d,t),3)}catch{return""}}),$("intlTelInputUtilsTemp.getNumberType",(d,t)=>{try{let e=M.g(),i=W(e,d,t);return K1(e,i)}catch{return-99}}),$("intlTelInputUtilsTemp.getValidationError",(d,t)=>{if(!t)return 1;try{let e=M.g(),i=W(e,d,t);return l1(e,i,-1)}catch(e){return e.message==="Invalid country calling code"?1:3>=d.length||e.message==="Phone number too short after IDD"||e.message==="The string supplied is too short to be a phone number"?2:e.message==="The string supplied is too long to be a phone number"?3:-99}}),$("intlTelInputUtilsTemp.isValidNumber",(d,t,e)=>{try{let i=M.g(),o=W(i,d,t),s=A2(i,o);if(e){let a=e.map(h=>y1[h]);return s&&a.includes(K1(i,o))}return s}catch{return!1}}),$("intlTelInputUtilsTemp.isPossibleNumber",(d,t,e)=>{try{let i=M.g(),o=W(i,d,t);if(e){e.includes("FIXED_LINE_OR_MOBILE")&&(e.includes("MOBILE")||e.push("MOBILE"),e.includes("FIXED_LINE")||e.push("FIXED_LINE"));for(let s of e)if(l1(i,o,y1[s])===0)return!0;return!1}return l1(i,o,-1)===0}catch{return!1}}),$("intlTelInputUtilsTemp.getCoreNumber",(d,t)=>{try{return c(W(M.g(),d,t),2).toString()}catch{return""}}),$("intlTelInputUtilsTemp.numberFormat",{E164:0,INTERNATIONAL:1,NATIONAL:2,RFC3966:3}),$("intlTelInputUtilsTemp.numberType",y1),$("intlTelInputUtilsTemp.validationError",{IS_POSSIBLE:0,INVALID_COUNTRY_CODE:1,TOO_SHORT:2,TOO_LONG:3,IS_POSSIBLE_LOCAL_ONLY:4,INVALID_LENGTH:5})})();var z2=window.intlTelInputUtilsTemp;delete window.intlTelInputUtilsTemp;var f2=z2;S1.utils=f2;var Z2=S1;return G2(Y2);})(); // UMD return factoryOutput.default; diff --git a/composer.json b/composer.json index f718ed07b..7d094a011 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "jackocnr/intl-tel-input", - "version": "25.0.0", + "version": "25.0.1", "description": "A JavaScript plugin for entering and validating international telephone numbers", "keywords": [ "international", diff --git a/package-lock.json b/package-lock.json index a946ae3c8..b59ab6ef2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "intl-tel-input", - "version": "25.0.0", + "version": "25.0.1", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index dc3d7f289..62130faff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "intl-tel-input", - "version": "25.0.0", + "version": "25.0.1", "description": "A JavaScript plugin for entering and validating international telephone numbers", "keywords": [ "international", diff --git a/react/README.md b/react/README.md index 5c02749b4..dcb2f0ef9 100644 --- a/react/README.md +++ b/react/README.md @@ -28,7 +28,7 @@ import "intl-tel-input/styles"; See the [Validation demo](https://github.com/jackocnr/intl-tel-input/blob/master/react/demo/validation/ValidationApp.tsx) for a more fleshed-out example of how to handle validation. -A note on the utils script (~260KB): if you're lazy loading the IntlTelInput chunk (and so less worried about filesize) then you can just import IntlTelInput from `"intl-tel-input/reactWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/react"` import, then you should couple this with the `loadUtils` initialisation option - you will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `loadUtils` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.0.0/build/js/utils.js"`. +A note on the utils script (~260KB): if you're lazy loading the IntlTelInput chunk (and so less worried about filesize) then you can just import IntlTelInput from `"intl-tel-input/reactWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/react"` import, then you should couple this with the `loadUtils` initialisation option - you will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `loadUtils` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.0.1/build/js/utils.js"`. ## Props Here's a list of all of the current props you can pass to the IntlTelInput React component. diff --git a/react/build/IntlTelInput.cjs b/react/build/IntlTelInput.cjs index 1f905f04d..4a12bead6 100644 --- a/react/build/IntlTelInput.cjs +++ b/react/build/IntlTelInput.cjs @@ -3139,7 +3139,7 @@ var intlTelInput = Object.assign( attachUtils, startedLoadingUtilsScript: false, startedLoadingAutoCountry: false, - version: "25.0.0" + version: "25.0.1" } ); var intl_tel_input_default = intlTelInput; diff --git a/react/build/IntlTelInput.js b/react/build/IntlTelInput.js index b7541bf4f..dda6d0504 100644 --- a/react/build/IntlTelInput.js +++ b/react/build/IntlTelInput.js @@ -3103,7 +3103,7 @@ var intlTelInput = Object.assign( attachUtils, startedLoadingUtilsScript: false, startedLoadingAutoCountry: false, - version: "25.0.0" + version: "25.0.1" } ); var intl_tel_input_default = intlTelInput; diff --git a/react/build/IntlTelInputWithUtils.cjs b/react/build/IntlTelInputWithUtils.cjs index 657cbb574..68a500ecf 100644 --- a/react/build/IntlTelInputWithUtils.cjs +++ b/react/build/IntlTelInputWithUtils.cjs @@ -3139,7 +3139,7 @@ var intlTelInput = Object.assign( attachUtils, startedLoadingUtilsScript: false, startedLoadingAutoCountry: false, - version: "25.0.0" + version: "25.0.1" } ); var intl_tel_input_default = intlTelInput; diff --git a/react/build/IntlTelInputWithUtils.js b/react/build/IntlTelInputWithUtils.js index 97ed745ae..0bbd7441a 100644 --- a/react/build/IntlTelInputWithUtils.js +++ b/react/build/IntlTelInputWithUtils.js @@ -3103,7 +3103,7 @@ var intlTelInput = Object.assign( attachUtils, startedLoadingUtilsScript: false, startedLoadingAutoCountry: false, - version: "25.0.0" + version: "25.0.1" } ); var intl_tel_input_default = intlTelInput; diff --git a/react/demo/set-number/set-number-bundle.js b/react/demo/set-number/set-number-bundle.js index 9b7566e97..aa5b9604f 100644 --- a/react/demo/set-number/set-number-bundle.js +++ b/react/demo/set-number/set-number-bundle.js @@ -26690,7 +26690,7 @@ attachUtils, startedLoadingUtilsScript: false, startedLoadingAutoCountry: false, - version: "25.0.0" + version: "25.0.1" } ); var intl_tel_input_default = intlTelInput; diff --git a/react/demo/simple/simple-bundle.js b/react/demo/simple/simple-bundle.js index b1f0f58a6..ea812ff9a 100644 --- a/react/demo/simple/simple-bundle.js +++ b/react/demo/simple/simple-bundle.js @@ -26690,7 +26690,7 @@ attachUtils, startedLoadingUtilsScript: false, startedLoadingAutoCountry: false, - version: "25.0.0" + version: "25.0.1" } ); var intl_tel_input_default = intlTelInput; diff --git a/react/demo/toggle-disabled/toggle-disabled-bundle.js b/react/demo/toggle-disabled/toggle-disabled-bundle.js index 0f351f838..6ac6b0bf3 100644 --- a/react/demo/toggle-disabled/toggle-disabled-bundle.js +++ b/react/demo/toggle-disabled/toggle-disabled-bundle.js @@ -26690,7 +26690,7 @@ attachUtils, startedLoadingUtilsScript: false, startedLoadingAutoCountry: false, - version: "25.0.0" + version: "25.0.1" } ); var intl_tel_input_default = intlTelInput; diff --git a/react/demo/validation/validation-bundle.js b/react/demo/validation/validation-bundle.js index 62ac9427c..0de4f0629 100644 --- a/react/demo/validation/validation-bundle.js +++ b/react/demo/validation/validation-bundle.js @@ -26690,7 +26690,7 @@ attachUtils, startedLoadingUtilsScript: false, startedLoadingAutoCountry: false, - version: "25.0.0" + version: "25.0.1" } ); var intl_tel_input_default = intlTelInput; diff --git a/vue/README.md b/vue/README.md index 38e07b79a..dd2baf038 100644 --- a/vue/README.md +++ b/vue/README.md @@ -34,7 +34,7 @@ See the [Validation demo](https://github.com/jackocnr/intl-tel-input/blob/master "vue:demo": "vite --config vue/demo/[demo variant]/vite.config.js" ``` -A note on the utils script (~260KB): if you're lazy loading the IntlTelInput chunk (and so less worried about filesize) then you can just import IntlTelInput from `"intl-tel-input/vueWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/vue"` import, then you should couple this with the `loadUtils` initialisation option - you will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `loadUtils` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.0.0/build/js/utils.js"`. +A note on the utils script (~260KB): if you're lazy loading the IntlTelInput chunk (and so less worried about filesize) then you can just import IntlTelInput from `"intl-tel-input/vueWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/vue"` import, then you should couple this with the `loadUtils` initialisation option - you will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `loadUtils` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.0.1/build/js/utils.js"`. ## Props Here's a list of all of the current props you can pass to the IntlTelInput Vue component. diff --git a/vue/build/IntlTelInput.mjs b/vue/build/IntlTelInput.mjs index 741caaaaa..c4c5ee4a1 100644 --- a/vue/build/IntlTelInput.mjs +++ b/vue/build/IntlTelInput.mjs @@ -2501,7 +2501,7 @@ const W = (u) => { attachUtils: W, startedLoadingUtilsScript: !1, startedLoadingAutoCountry: !1, - version: "25.0.0" + version: "25.0.1" } ), J = { __name: "IntlTelInput", diff --git a/vue/build/IntlTelInputWithUtils.mjs b/vue/build/IntlTelInputWithUtils.mjs index 8fb515107..3f3b56bea 100644 --- a/vue/build/IntlTelInputWithUtils.mjs +++ b/vue/build/IntlTelInputWithUtils.mjs @@ -2501,7 +2501,7 @@ const H2 = (y) => { attachUtils: H2, startedLoadingUtilsScript: !1, startedLoadingAutoCountry: !1, - version: "25.0.0" + version: "25.0.1" } ); (function() {