intl-tel-input 29.2.2 → 29.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/js/data.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * International Telephone Input v29.2.2
2
+ * International Telephone Input v29.2.3
3
3
  * git+https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * International Telephone Input v29.2.2
2
+ * International Telephone Input v29.2.3
3
3
  * git+https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * International Telephone Input v29.2.2
2
+ * International Telephone Input v29.2.3
3
3
  * git+https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
@@ -4992,7 +4992,7 @@ var _factory = (() => {
4992
4992
  attachUtils,
4993
4993
  startedLoadingUtils: false,
4994
4994
  startedLoadingAutoCountry: false,
4995
- version: "29.2.2",
4995
+ version: "29.2.3",
4996
4996
  NUMBER_FORMAT,
4997
4997
  NUMBER_TYPE,
4998
4998
  VALIDATION_ERROR,
@@ -1,7 +1,7 @@
1
1
  /*
2
- * International Telephone Input v29.2.2
2
+ * International Telephone Input v29.2.3
3
3
  * git+https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
6
- "use strict";var _factory=(()=>{var Z=Object.defineProperty;var Ht=Object.getOwnPropertyDescriptor;var Ut=Object.getOwnPropertyNames;var Ft=Object.prototype.hasOwnProperty;var Wt=(n,t)=>{for(var e in t)Z(n,e,{get:t[e],enumerable:!0})},Bt=(n,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ut(t))!Ft.call(n,s)&&s!==e&&Z(n,s,{get:()=>t[s],enumerable:!(i=Ht(t,s))||i.enumerable});return n};var $t=n=>Bt(Z({},"__esModule",{value:!0}),n);var ne={};Wt(ne,{COUNTRY_SELECTOR_MODE:()=>h,Iti:()=>$,NUMBER_FORMAT:()=>g,NUMBER_TYPE:()=>P,PLACEHOLDER_POLICY:()=>w,VALIDATION_ERROR:()=>X,default:()=>se});var jt=[["af","93",0,null,"0"],["ax","358",1,["18","4","50"],"0"],["al","355",0,null,"0"],["dz","213",0,null,"0"],["as","1",5,["684"],"1"],["ad","376"],["ao","244"],["ai","1",6,["264"],"1"],["ag","1",7,["268"],"1"],["ar","54",0,null,"0"],["am","374",0,null,"0"],["aw","297"],["ac","247"],["au","61",0,["4"],"0"],["at","43",0,null,"0"],["az","994",0,null,"0"],["bs","1",8,["242"],"1"],["bh","973"],["bd","880",0,null,"0"],["bb","1",9,["246"],"1"],["by","375",0,null,"8"],["be","32",0,null,"0"],["bz","501"],["bj","229"],["bm","1",10,["441"],"1"],["bt","975"],["bo","591",0,null,"0"],["ba","387",0,null,"0"],["bw","267"],["br","55",0,null,"0"],["io","246"],["vg","1",11,["284"],"1"],["bn","673"],["bg","359",0,null,"0"],["bf","226"],["bi","257"],["kh","855",0,null,"0"],["cm","237"],["ca","1",1,["204","226","236","249","250","257","263","289","306","343","354","365","367","368","382","403","416","418","428","431","437","438","450","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","942"],"1"],["cv","238"],["bq","599",1,["3","4","7"]],["ky","1",12,["345"],"1"],["cf","236"],["td","235"],["cl","56"],["cn","86",0,null,"0"],["cx","61",2,["4","89164"],"0"],["cc","61",1,["4","89162"],"0"],["co","57",0,null,"0"],["km","269"],["cg","242"],["cd","243",0,null,"0"],["ck","682"],["cr","506"],["ci","225"],["hr","385",0,null,"0"],["cu","53",0,null,"0"],["cw","599",0],["cy","357"],["cz","420"],["dk","45"],["dj","253"],["dm","1",13,["767"],"1"],["do","1",2,["809","829","849"],"1"],["ec","593",0,null,"0"],["eg","20",0,null,"0"],["sv","503"],["gq","240"],["er","291",0,null,"0"],["ee","372"],["sz","268"],["et","251",0,null,"0"],["fk","500"],["fo","298"],["fj","679"],["fi","358",0,["4","50"],"0"],["fr","33",0,null,"0"],["gf","594",0,null,"0"],["pf","689"],["ga","241"],["gm","220"],["ge","995",0,null,"0"],["de","49",0,null,"0"],["gh","233",0,null,"0"],["gi","350"],["gr","30"],["gl","299"],["gd","1",14,["473"],"1"],["gp","590",0,null,"0"],["gu","1",15,["671"],"1"],["gt","502"],["gg","44",1,["1481","7781","7839","79111","79117"],"0"],["gn","224"],["gw","245"],["gy","592"],["ht","509"],["hn","504"],["hk","852"],["hu","36",0,null,"06"],["is","354"],["in","91",0,null,"0"],["id","62",0,null,"0"],["ir","98",0,null,"0"],["iq","964",0,null,"0"],["ie","353",0,null,"0"],["im","44",2,["1624","74576","7524","7624","7924"],"0"],["il","972",0,null,"0"],["it","39",0,["3"]],["jm","1",4,["658","876"],"1"],["jp","81",0,null,"0"],["je","44",3,["1534","7509","77003","77007","77008","7797","7829","7937"],"0"],["jo","962",0,null,"0"],["kz","7",1,["33","7"],"8"],["ke","254",0,null,"0"],["ki","686",0,null,"0"],["xk","383",0,null,"0"],["kw","965"],["kg","996",0,null,"0"],["la","856",0,null,"0"],["lv","371"],["lb","961",0,null,"0"],["ls","266"],["lr","231",0,null,"0"],["ly","218",0,null,"0"],["li","423",0,null,"0"],["lt","370",0,null,"0"],["lu","352"],["mo","853"],["mg","261",0,null,"0"],["mw","265",0,null,"0"],["my","60",0,null,"0"],["mv","960"],["ml","223"],["mt","356"],["mh","692",0,null,"1"],["mq","596",0,null,"0"],["mr","222"],["mu","230"],["yt","262",1,["2689","269","639","7093"],"0"],["mx","52"],["fm","691"],["md","373",0,null,"0"],["mc","377",0,null,"0"],["mn","976",0,null,"0"],["me","382",0,null,"0"],["ms","1",16,["664"],"1"],["ma","212",0,["6","7"],"0"],["mz","258"],["mm","95",0,null,"0"],["na","264",0,null,"0"],["nr","674"],["np","977",0,null,"0"],["nl","31",0,null,"0"],["nc","687"],["nz","64",0,null,"0"],["ni","505"],["ne","227"],["ng","234",0,null,"0"],["nu","683"],["nf","672"],["kp","850",0,null,"0"],["mk","389",0,null,"0"],["mp","1",17,["670"],"1"],["no","47",0,["4","9"]],["om","968"],["pk","92",0,null,"0"],["pw","680"],["ps","970",0,null,"0"],["pa","507"],["pg","675"],["py","595",0,null,"0"],["pe","51",0,null,"0"],["ph","63",0,null,"0"],["pl","48"],["pt","351"],["pr","1",3,["787","939"],"1"],["qa","974"],["re","262",0,null,"0"],["ro","40",0,null,"0"],["ru","7",0,["33"],"8"],["rw","250",0,null,"0"],["ws","685"],["sm","378"],["st","239"],["sa","966",0,null,"0"],["sn","221"],["rs","381",0,null,"0"],["sc","248"],["sl","232",0,null,"0"],["sg","65"],["sx","1",21,["721"],"1"],["sk","421",0,null,"0"],["si","386",0,null,"0"],["sb","677"],["so","252",0,null,"0"],["za","27",0,null,"0"],["kr","82",0,null,"0"],["ss","211",0,null,"0"],["es","34"],["lk","94",0,null,"0"],["bl","590",1,null,"0"],["sh","290"],["kn","1",18,["869"],"1"],["lc","1",19,["758"],"1"],["mf","590",2,null,"0"],["pm","508",0,null,"0"],["vc","1",20,["784"],"1"],["sd","249",0,null,"0"],["sr","597"],["sj","47",1,["4","79","9"]],["se","46",0,null,"0"],["ch","41",0,null,"0"],["sy","963",0,null,"0"],["tw","886",0,null,"0"],["tj","992"],["tz","255",0,null,"0"],["th","66",0,null,"0"],["tl","670"],["tg","228"],["tk","690"],["to","676"],["tt","1",22,["868"],"1"],["tn","216"],["tr","90",0,null,"0"],["tm","993",0,null,"8"],["tc","1",23,["649"],"1"],["tv","688"],["vi","1",24,["340"],"1"],["ug","256",0,null,"0"],["ua","380",0,null,"0"],["ae","971",0,null,"0"],["gb","44",0,null,"0"],["us","1",0,null,"1"],["uy","598",0,null,"0"],["uz","998"],["vu","678"],["va","39",1,["06698","3"]],["ve","58",0,null,"0"],["vn","84",0,null,"0"],["wf","681"],["eh","212",1,["5288","5289","6","7"],"0"],["ye","967",0,null,"0"],["zm","260",0,null,"0"],["zw","263",0,null,"0"]],tt=[];for(let n of jt)tt.push({name:"",iso2:n[0],dialCode:n[1],priority:n[2]||0,areaCodes:n[3]||null,nationalPrefix:n[4]||null});var Vt=new Set(tt.map(n=>n.iso2)),k=n=>Vt.has(n),H=tt;var A={OPEN_COUNTRY_SELECTOR:"open:countryselector",CLOSE_COUNTRY_SELECTOR:"close:countryselector",COUNTRY_CHANGE:"countrychange",INPUT:"input",STRICT_REJECT:"strict:reject"},et=["container","input","countryContainer","selectedCountry","selectedCountryPrimary","selectedFlag","arrow","selectedDialCode","countrySelector","countrySelectorContainer","searchWrapper","searchIcon","searchInput","searchClear","countryList","countryListItem","countryListItemFlag","countryName","dialCode","countryCheck","noResults"],c={HIDE:"iti__hide",V_HIDE:"iti__v-hide",ARROW_UP:"iti__arrow--up",GLOBE:"iti__globe",FLAG:"iti__flag",LOADING:"iti__loading",COUNTRY_ITEM:"iti__country",HIGHLIGHT:"iti__highlight",STRICT_REJECT_ANIMATION:"iti__strict-reject-animation"},T={ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",SPACE:" ",ENTER:"Enter",ESC:"Escape",TAB:"Tab"},it={PASTE:"insertFromPaste",DELETE_FORWARD:"deleteContentForward"},_={ALPHA_UNICODE:/\p{L}/u,NON_PLUS_NUMERIC:/[^+0-9]/,NON_PLUS_NUMERIC_GLOBAL:/[^+0-9]/g,HIDDEN_SEARCH_CHAR:/^[a-zA-ZÀ-ÿа-яА-Я ]$/},st={SEARCH_DEBOUNCE_MS:100,HIDDEN_SEARCH_RESET_MS:1e3,NEXT_TICK:0},O={NARROW_VIEWPORT_WIDTH:500,FALLBACK_SELECTED_COUNTRY_WITH_DIAL_WIDTH:78,FALLBACK_SELECTED_COUNTRY_NO_DIAL_WIDTH:42,INPUT_PADDING_EXTRA_LEFT:6,DROPDOWN_MARGIN:3,FALLBACK_DROPDOWN_HEIGHT:200},Y={PLUS:"+",NANP:"1"},nt=15,G={ISO2:"gb",DIAL_CODE:"44",MOBILE_PREFIX:"7",MOBILE_CORE_LENGTH:10},ft={ISO2:"us",DIAL_CODE:"1"},w={AGGRESSIVE:"AGGRESSIVE",POLITE:"POLITE",OFF:"OFF"},K=["OFF","DROPDOWN","FULLSCREEN","AUTO"],Yt=["E164","INTERNATIONAL","NATIONAL","RFC3966"],U=["FIXED_LINE","MOBILE","FIXED_LINE_OR_MOBILE","TOLL_FREE","PREMIUM_RATE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL","UNKNOWN"],Gt=["IS_POSSIBLE","INVALID_COUNTRY_CODE","TOO_SHORT","TOO_LONG","IS_POSSIBLE_LOCAL_ONLY","INVALID_LENGTH"],z=n=>Object.fromEntries(n.map(t=>[t,t])),g=z(Yt),P=z(U),X=z(Gt),h=z(K),D={ISO2:"iso2",DIAL_CODE:"dialCode",INSTANCE_ID:"intlTelInputId"},p={EXPANDED:"aria-expanded",LABEL:"aria-label",SELECTED:"aria-selected",ACTIVE_DESCENDANT:"aria-activedescendant",HASPOPUP:"aria-haspopup",CONTROLS:"aria-controls",HIDDEN:"aria-hidden",AUTOCOMPLETE:"aria-autocomplete",MODAL:"aria-modal"};var Kt={selectedCountryAriaLabel:"Change country for phone number, currently selected ${countryName} (${dialCode})",noCountrySelected:"Select country for phone number",countryListAriaLabel:"List of countries",searchPlaceholder:"Search",clearSearchAriaLabel:"Clear search",searchEmptyState:"No results found",searchSummaryAria(n){return n===0?"No results found":n===1?"1 result found":`${n} results found`}},mt=Kt;var ot=n=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(n).matches,Et=()=>ot(`(max-width: ${O.NARROW_VIEWPORT_WIDTH}px)`),zt=()=>{if(typeof navigator<"u"&&typeof window<"u"){let n=ot("(max-height: 600px)"),t=ot("(pointer: coarse)");if(Et()||t&&n)return h.FULLSCREEN}return h.DROPDOWN},J={countrySelectorMode:h.AUTO,allowedNumberTypes:[P.MOBILE,P.FIXED_LINE],allowNumberExtensions:!1,allowPhonewords:!1,classNames:{},containerClass:"",countryNameLocale:"en",countryNameOverrides:{},countryOrder:null,countrySearch:!0,customPlaceholder:null,dropdownAlwaysOpen:!1,dropdownParent:null,excludeCountries:null,matchDropdownWidth:!0,formatAsYouType:!0,hiddenInputs:null,uiTranslations:{},initialCountry:"",initialCountryLookup:null,loadUtils:null,numberDisplayFormat:g.INTERNATIONAL,onlyCountries:null,placeholderNumberPolicy:w.POLITE,placeholderNumberType:P.MOBILE,searchInputClass:"",separateDialCode:!0,strictRejectAnimation:!0,showFlags:!0,strictMode:!0},gt=n=>JSON.stringify(n),q=n=>!!n&&typeof n=="object"&&!Array.isArray(n),Xt=n=>typeof n=="function",qt=n=>{if(!n||typeof n!="object")return!1;let t=n;return t.nodeType===1&&typeof t.tagName=="string"&&typeof t.appendChild=="function"},yt=new Set(Object.values(w)),Jt=new Set(et),j=n=>{console.warn(`[intl-tel-input] ${n}`)},L=(n,t,e)=>{j(`Option '${n}' must be ${t}; got ${gt(e)}. Ignoring.`)},Ct=(n,t)=>{let e="an array of iso2 country code strings";if(!Array.isArray(t))return L(n,e,t),!1;let i=[];for(let s of t){if(typeof s!="string")return L(n,e,t),!1;let o=s.toLowerCase();k(o)?i.push(s):j(`Invalid iso2 code in '${n}': '${s}'. Skipping.`)}return i},It=n=>{if(n===void 0)return{};if(!q(n)){let e=`The second argument must be an options object; got ${gt(n)}. Using defaults.`;return j(e),{}}let t={};for(let[e,i]of Object.entries(n)){if(!Object.hasOwn(J,e)){j(`Unknown option '${e}'. Ignoring.`);continue}switch(e){case"allowNumberExtensions":case"allowPhonewords":case"countrySearch":case"dropdownAlwaysOpen":case"matchDropdownWidth":case"formatAsYouType":case"showFlags":case"separateDialCode":case"strictMode":case"strictRejectAnimation":if(typeof i!="boolean"){L(e,"a boolean",i);break}t[e]=i;break;case"countrySelectorMode":if(typeof i!="string"||!K.includes(i)){L("countrySelectorMode",`one of ${K.map(s=>`"${s}"`).join(", ")}`,i);break}t[e]=i;break;case"numberDisplayFormat":if(typeof i!="string"||i===g.RFC3966||!(i===g.E164||i===g.INTERNATIONAL||i===g.NATIONAL)){L("numberDisplayFormat",'one of "E164", "INTERNATIONAL", "NATIONAL"',i);break}t[e]=i;break;case"placeholderNumberPolicy":if(typeof i!="string"||!yt.has(i)){let s=Array.from(yt).join(", ");L("placeholderNumberPolicy",`one of ${s}`,i);break}t[e]=i;break;case"containerClass":case"searchInputClass":case"countryNameLocale":if(typeof i!="string"){L(e,"a string",i);break}t[e]=i;break;case"classNames":{if(!q(i)){L("classNames","an object",i);break}let s={};for(let[o,r]of Object.entries(i))Jt.has(o)?typeof r!="string"?L(`classNames.${o}`,"a string",r):s[o]=r.trim().replace(/\s+/g," "):j(`Unknown slot '${o}' in 'classNames'. Valid slots: ${et.join(", ")}. Skipping.`);t[e]=s;break}case"countryOrder":{if(i===null)t[e]=i;else{let s=Ct(e,i);s!==!1&&(t[e]=s)}break}case"customPlaceholder":case"hiddenInputs":case"initialCountryLookup":case"loadUtils":if(i!==null&&!Xt(i)){L(e,"a function or null",i);break}t[e]=i;break;case"dropdownParent":if(i!==null&&!qt(i)){L("dropdownParent","an HTMLElement or null",i);break}t[e]=i;break;case"excludeCountries":case"onlyCountries":{if(i===null)t[e]=i;else{let s=Ct(e,i);s!==!1&&(t[e]=s)}break}case"uiTranslations":if(i&&!q(i)){L("uiTranslations","an object",i);break}t[e]=i;break;case"countryNameOverrides":if(i&&!q(i)){L("countryNameOverrides","an object",i);break}t[e]=i;break;case"initialCountry":{if(typeof i!="string"){L("initialCountry","a string",i);break}let s=i.toLowerCase();if(s&&!k(s)){L("initialCountry","a valid iso2 country code",i);break}t[e]=i;break}case"placeholderNumberType":if(typeof i!="string"||!U.includes(i)){let s=U.join(", ");L("placeholderNumberType",`one of ${s}`,i);break}t[e]=i;break;case"allowedNumberTypes":if(i!==null){if(!Array.isArray(i)){L("allowedNumberTypes","an array of number types or null",i);break}let s=!0;for(let o of i)if(typeof o!="string"||!U.includes(o)){let r=U.join(", ");L("allowedNumberTypes",`an array of valid number types (${r})`,o),s=!1;break}s&&(t[e]=i)}else t[e]=null;break}}return t},bt=n=>{n.initialCountry&&(n.initialCountry=n.initialCountry.toLowerCase()),n.onlyCountries?.length&&(n.onlyCountries=n.onlyCountries.map(t=>t.toLowerCase())),n.excludeCountries?.length&&(n.excludeCountries=n.excludeCountries.map(t=>t.toLowerCase())),n.countryOrder&&(n.countryOrder=n.countryOrder.map(t=>t.toLowerCase()))},Lt=n=>{n.countrySelectorMode===h.AUTO&&(n.countrySelectorMode=zt()),n.dropdownAlwaysOpen&&(n.countrySelectorMode=h.DROPDOWN),n.countrySelectorMode===h.FULLSCREEN?n.matchDropdownWidth=!1:Et()&&(n.matchDropdownWidth=!0),n.onlyCountries?.length===1&&(n.initialCountry=n.onlyCountries[0]),n.separateDialCode&&n.numberDisplayFormat===g.NATIONAL&&(n.numberDisplayFormat=g.INTERNATIONAL),n.countrySelectorMode!==h.OFF&&!n.showFlags&&!n.separateDialCode&&n.numberDisplayFormat===g.NATIONAL&&(n.numberDisplayFormat=g.INTERNATIONAL),n.uiTranslations={...mt,...n.uiTranslations}};var v=n=>n.replace(/\D/g,""),rt=(n="")=>n.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase();var lt=n=>Object.keys(n).filter(t=>!!n[t]).join(" "),f=(n,t,e)=>{let i=document.createElement(n);return t&&Object.entries(t).forEach(([s,o])=>i.setAttribute(s,o)),e&&e.appendChild(i),i};var Qt="http://www.w3.org/2000/svg",V=([n,t,e])=>{let i=document.createElementNS(Qt,n);if(t)for(let s in t)i.setAttribute(s,String(t[s]));if(e)for(let s of e)i.appendChild(V(s));return i},Tt=()=>V(["svg",{class:"iti__search-icon-svg",width:14,height:14,viewBox:"0 0 24 24",focusable:"false",[p.HIDDEN]:"true"},[["circle",{cx:11,cy:11,r:7}],["line",{x1:21,y1:21,x2:16.65,y2:16.65}]]]),Nt=n=>{let t=`iti-${n}-clear-mask`;return V(["svg",{class:"iti__search-clear-svg",width:12,height:12,viewBox:"0 0 16 16",[p.HIDDEN]:"true",focusable:"false"},[["mask",{id:t,maskUnits:"userSpaceOnUse"},[["rect",{width:16,height:16,fill:"white"}],["path",{d:"M5.2 5.2 L10.8 10.8 M10.8 5.2 L5.2 10.8",stroke:"black","stroke-linecap":"round",class:"iti__search-clear-x"}]]],["circle",{cx:8,cy:8,r:8,class:"iti__search-clear-bg",mask:`url(#${t})`}]]])},St=()=>V(["svg",{class:"iti__country-check-svg",width:14,height:14,viewBox:"0 0 16 16",fill:"currentColor",focusable:"false",[p.HIDDEN]:"true"},[["path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"}]]]),at=()=>V(["svg",{width:256,height:256,viewBox:"0 0 512 512",class:"iti__globe-svg"},[["path",{d:"M508 213a240 240 0 0 0-449-87l-2 5-2 5c-8 14-13 30-17 46a65 65 0 0 1 56 4c16-10 35-19 56-27l9-3c-6 23-10 48-10 74h-16l4 6c3 4 5 8 6 13h6c0 22 3 44 8 65l2 10-25-10-4 5 12 18 9 3 6 2 8 3 9 26 1 2 16-7h1l-5-13-1-2c24 6 49 9 75 10v26l11 10 7 7v-30l1-13c22 0 44-3 65-8l10-2-21 48-1 1a317 317 0 0 1-14 23l-21 5h-2c6 16 7 33 1 50a240 240 0 0 0 211-265m-401-56-11 6c19-44 54-79 98-98-11 20-21 44-29 69-21 6-40 15-58 23m154 182v4c-29-1-57-6-81-13-7-25-12-52-13-81h94zm0-109h-94c1-29 6-56 13-81 24-7 52-12 81-13zm0-112c-22 1-44 4-65 8l-10 2 12-30 9-17 1-2a332 332 0 0 1 13-23c13-4 26-6 40-7zm187 69 6 4c4 12 6 25 6 38v1h-68c-1-26-4-51-10-74l48 20 1 1 14 8zm-14-44 10 20c-20-11-43-21-68-29-8-25-18-49-29-69 37 16 67 44 87 78M279 49h1c13 1 27 3 39 7l14 23 1 2a343 343 0 0 1 12 26l2 5 6 16c-23-6-48-9-74-10h-1zm0 87h1c29 1 56 6 81 13 7 24 12 51 12 80v1h-94zm2 207h-2v-94h95c-1 29-6 56-13 81-24 7-51 12-80 13m86 60-20 10c11-20 21-43 29-68 25-8 48-18 68-29-16 37-43 67-77 87m87-115-7 5-16 9-2 1a337 337 0 0 1-47 21c6-24 9-49 10-75h68c0 13-2 27-6 39"}],["path",{d:"m261 428-2-2-22-21a40 40 0 0 0-32-11h-1a37 37 0 0 0-18 8l-1 1-4 2-2 2-5 4c-9-3-36-31-47-44s-32-45-34-55l3-2a151 151 0 0 0 11-9v-1a39 39 0 0 0 5-48l-3-3-11-19-3-4-5-7h-1l-3-3-4-3-5-2a35 35 0 0 0-16-3h-5c-4 1-14 5-24 11l-4 2-4 3-4 2c-9 8-17 17-18 27a380 380 0 0 0 212 259h3c12 0 25-10 36-21l10-12 6-11a39 39 0 0 0-8-40"}]]]);var ut=n=>rt(n).replace(/[^\p{L}]+/gu," ").trim(),At=n=>{let t=new Map;for(let e of n){let i=ut(e.name),s=i.split(" ").filter(Boolean),o=s.map(r=>r[0]||"").join("");t.set(e.iso2,{normalisedName:i,words:s,initials:o,dialCodePlus:`+${e.dialCode}`})}return t},Ot=(n,t,e)=>{let i=rt(e),s=ut(e),o=i!==""&&s==="",r=[],l=[],a=[],d=[],y=[],C=[],E=[];for(let b of n){let m=t.get(b.iso2);b.iso2===i?r.push(b):!o&&m.normalisedName.startsWith(s)?l.push(b):!o&&m.normalisedName.includes(s)?a.push(b):i===b.dialCode||i===m.dialCodePlus?d.push(b):m.dialCodePlus.includes(i)?y.push(b):m.initials.includes(i)&&C.push(b)}let S=s.split(" ").filter(Boolean);if(S.length>1&&r.length===0&&l.length===0&&a.length===0){let b=new Set([...d.map(m=>m.iso2),...y.map(m=>m.iso2),...C.map(m=>m.iso2)]);for(let m of n){if(b.has(m.iso2))continue;let I=t.get(m.iso2);S.some(R=>I.words.some(M=>M.startsWith(R)))&&E.push(m)}}let N=(b,m)=>b.priority-m.priority;return[...r,...l,...a,...d.sort(N),...y.sort(N),...C,...E]},vt=(n,t,e)=>{let i=ut(e);for(let s of n){let{normalisedName:o}=t.get(s.iso2);if(o.startsWith(i))return s}return null};var F=class n{#t;static toAscii(t){return t?t.replace(/[٠-٩]/g,e=>String.fromCharCode(48+(e.charCodeAt(0)-1632))).replace(/[۰-۹]/g,e=>String.fromCharCode(48+(e.charCodeAt(0)-1776))):""}constructor(t){t&&this.#i(t)}#i(t){/[٠-٩]/.test(t)?this.#t="arabic-indic":/[۰-۹]/.test(t)?this.#t="persian":this.#t="ascii"}denormalise(t){if(!this.#t||this.#t==="ascii")return t;let e=this.#t==="arabic-indic"?1632:1776;return t.replace(/[0-9]/g,i=>String.fromCharCode(e+Number(i)))}normalise(t){return t?(this.#i(t),this.#t==="ascii"?t:n.toAscii(t)):""}isAscii(){return!this.#t||this.#t==="ascii"}};var Rt=typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("anchor-name: --x"),W=class{#t;#i;#T;#E="";#b;#S;#A=null;#w;#H=!1;#e;#s;#p;#a;#y;#n;#O;#c;#h;#r;#u;#f;#N;#j;#l;#C=null;#m=null;#M=new Map;#v=null;#P;telInputEl;hadInitialPlaceholder;constructor(t,e,i){t.dataset[D.INSTANCE_ID]=i.toString(),this.telInputEl=t,this.#t=e,this.#i=i,this.hadInitialPlaceholder=!!t.getAttribute("placeholder"),this.#T=!!this.telInputEl.closest("[dir=rtl]"),this.#E=this.telInputEl.style.paddingLeft}static validateInput(t){let e=t?.tagName;if(!(!!t&&typeof t=="object"&&e==="INPUT"&&typeof t.setAttribute=="function")){let s=Object.prototype.toString.call(t);throw new TypeError(`The first argument must be an HTMLInputElement, not ${s}`)}}#o(t,e){let i=this.#t.classNames[t];return i?`${e} ${i}`:e}buildMarkup(t,e){this.#b=t,this.#S=e,this.telInputEl.classList.add(...this.#o("input","iti__tel-input").split(" ")),this.telInputEl.hasAttribute("type")||this.telInputEl.setAttribute("type","tel"),this.telInputEl.hasAttribute("autocomplete")||this.telInputEl.setAttribute("autocomplete","tel"),this.telInputEl.hasAttribute("inputmode")||this.telInputEl.setAttribute("inputmode","tel");let i=this.#J();this.#Q(i),i.appendChild(this.telInputEl),this.#et(),this.#nt(),this.#it(i),this.ensureDropdownWidthSet()}#J(){let{countrySelectorMode:t,showFlags:e,containerClass:i}=this.#t,s=lt({iti:!0,"iti--input-container":!0,"iti--has-country-selector":t!==h.OFF,"iti--show-flags":e,"iti--inline-country-selector":t!==h.FULLSCREEN,[i]:!!i}),o=f("div",{class:this.#o("container",s)});return this.#T&&o.setAttribute("dir","ltr"),this.telInputEl.before(o),o}#Q(t){let{countrySelectorMode:e,separateDialCode:i,showFlags:s}=this.#t,o=e!==h.OFF;if(!o&&!s&&!i)return;this.#e=f("div",{class:this.#o("countryContainer",`iti__country-container ${c.V_HIDE}`)},t),o?(this.#s=f("button",{type:"button",class:this.#o("selectedCountry","iti__selected-country"),[p.EXPANDED]:"false",[p.LABEL]:this.#t.uiTranslations.noCountrySelected,[p.HASPOPUP]:"dialog",[p.CONTROLS]:`iti-${this.#i}__country-selector`},this.#e),this.telInputEl.disabled&&this.#s.setAttribute("disabled","true")):this.#s=f("div",{class:this.#o("selectedCountry","iti__selected-country")},this.#e);let r=f("div",{class:this.#o("selectedCountryPrimary","iti__selected-country-primary")},this.#s);this.#p=f("div",{class:this.#o("selectedFlag",c.FLAG)},r),o&&(this.#y=f("div",{class:this.#o("arrow","iti__arrow"),[p.HIDDEN]:"true"},r)),i&&(this.#a=f("div",{class:this.#o("selectedDialCode","iti__selected-dial-code")},this.#s)),o&&this.#Z()}ensureDropdownWidthSet(){let{matchDropdownWidth:t,countrySelectorMode:e}=this.#t;if(e===h.OFF||!t||this.#n.style.width)return;let i=this.telInputEl.offsetWidth;i>0&&(this.#n.style.width=`${i}px`)}#Z(){let{matchDropdownWidth:t,countrySelectorMode:e,countrySearch:i,uiTranslations:s,containerClass:o}=this.#t,r=e===h.FULLSCREEN,l=this.#V(),a=t?"":"iti--flexible-dropdown-width";if(this.#n=f("div",{id:`iti-${this.#i}__country-selector`,class:this.#o("countrySelector",`iti__country-selector ${c.HIDE} ${a}`),role:"dialog",[p.MODAL]:"true"}),this.#T&&this.#n.setAttribute("dir","rtl"),i&&this.#tt(),this.#r=f("ul",{class:this.#o("countryList","iti__country-list"),id:`iti-${this.#i}__country-listbox`,role:"listbox",[p.LABEL]:s.countryListAriaLabel},this.#n),this.#st(),i&&this.#Y(),l){let d=lt({iti:!0,"iti--detached-country-selector":!0,"iti--fullscreen-popup":r,"iti--inline-country-selector":!r,[o]:!!o});this.#l=f("div",{class:this.#o("countrySelectorContainer",d)}),this.#l.appendChild(this.#n)}else this.#e.appendChild(this.#n)}#V(){let{countrySelectorMode:t,dropdownParent:e}=this.#t;return t===h.FULLSCREEN?document.body:t===h.DROPDOWN?e:null}#tt(){let{uiTranslations:t,searchInputClass:e}=this.#t,i=f("div",{class:this.#o("searchWrapper","iti__search-input-wrapper")},this.#n);this.#O=f("span",{class:this.#o("searchIcon","iti__search-icon"),[p.HIDDEN]:"true"},i),this.#O.appendChild(Tt()),this.#c=f("input",{id:`iti-${this.#i}__search-input`,type:"search",class:this.#o("searchInput",`iti__search-input ${e}`),placeholder:t.searchPlaceholder,role:"combobox",[p.EXPANDED]:"true",[p.LABEL]:t.searchPlaceholder,[p.CONTROLS]:`iti-${this.#i}__country-listbox`,[p.AUTOCOMPLETE]:"list",autocomplete:"off"},i),this.#h=f("button",{type:"button",class:this.#o("searchClear",`iti__search-clear ${c.HIDE}`),[p.LABEL]:t.clearSearchAriaLabel,tabindex:"-1"},i),this.#h.appendChild(Nt(this.#i)),this.#j=f("span",{class:"iti__a11y-text"},this.#n),this.#N=f("div",{class:this.#o("noResults",`iti__no-results ${c.HIDE}`),[p.HIDDEN]:"true"},this.#n),this.#N.textContent=t.searchEmptyState??null}#et(){this.#e&&(this.#U(),this.#e.classList.remove(c.V_HIDE))}#it(t){let{hiddenInputs:e}=this.#t;if(!e)return;let i=this.telInputEl.getAttribute("name")||"",s=e(i);if(s.phone){let o=this.telInputEl.form?.querySelector(`input[name="${s.phone}"]`);o?this.#u=o:(this.#u=f("input",{type:"hidden",name:s.phone}),t.appendChild(this.#u))}if(s.country){let o=this.telInputEl.form?.querySelector(`input[name="${s.country}"]`);o?this.#f=o:(this.#f=f("input",{type:"hidden",name:s.country}),t.appendChild(this.#f))}}#st(){let t=document.createDocumentFragment(),e=this.#o("countryListItem",c.COUNTRY_ITEM);for(let i=0;i<this.#b.length;i++){let s=this.#b[i],o=f("li",{id:`iti-${this.#i}__item-${s.iso2}`,class:e,tabindex:"-1",role:"option",[p.SELECTED]:"false"});o.dataset[D.DIAL_CODE]=s.dialCode,o.dataset[D.ISO2]=s.iso2,this.#M.set(s.iso2,o),this.#t.showFlags&&f("div",{class:this.#o("countryListItemFlag",`${c.FLAG} iti__${s.iso2}`)},o);let r=f("span",{class:this.#o("countryName","iti__country-name")},o);r.textContent=`${s.name} `;let l=f("span",{class:this.#o("dialCode","iti__dial-code")},r);this.#T&&l.setAttribute("dir","ltr"),l.textContent=`(+${s.dialCode})`,t.appendChild(o)}this.#r.appendChild(t)}#U(){if(this.#s){let t=this.#t.separateDialCode?O.FALLBACK_SELECTED_COUNTRY_WITH_DIAL_WIDTH:O.FALLBACK_SELECTED_COUNTRY_NO_DIAL_WIDTH,i=(this.#s.offsetWidth||this.#ot()||t)+O.INPUT_PADDING_EXTRA_LEFT;this.telInputEl.style.paddingLeft=`${i}px`}}#nt(){!this.#s||typeof ResizeObserver>"u"||(this.#P=new ResizeObserver(()=>{this.#s?.offsetWidth&&this.#U()}),this.#P.observe(this.#s))}#ot(){if(!this.telInputEl.parentNode)return 0;let t=document.body,e=this.telInputEl.parentNode.cloneNode(!1);e.style.visibility="hidden",t.appendChild(e);let i=this.#e.cloneNode();e.appendChild(i);let s=this.#s.cloneNode(!0);i.appendChild(s);let o=s.offsetWidth;return t.removeChild(e),o}#rt(){if(this.#w!==void 0)return;let{countrySearch:t,matchDropdownWidth:e}=this.#t,{height:i,width:s}=this.#x();this.#w=i,t&&(this.#n.style.height=`${i}px`,!e&&s>0&&(this.#n.style.width=`${s}px`))}#x(){let t=document.body,e=this.#n,i=e.parentNode,s=e.nextSibling;e.classList.remove(c.HIDE);let o=f("div",{class:"iti iti--inline-country-selector"});o.appendChild(e),o.style.visibility="hidden",t.appendChild(o);let r=e.offsetHeight,l=e.offsetWidth;return t.removeChild(o),e.classList.add(c.HIDE),i&&i.insertBefore(e,s),{height:r>0?r:O.FALLBACK_DROPDOWN_HEIGHT,width:l}}#Y(){let{uiTranslations:t}=this.#t,e=this.#r.childElementCount;this.#j.textContent=t.searchSummaryAria(e)}#G(t){let e;if(t==="")e=this.#b;else{let i=F.toAscii(t);e=Ot(this.#b,this.#S,i)}this.#L(e)}prefillSearchWithPlus(){this.#c.value="+",this.#c.focus(),this.#G("")}#d(){let t=this.#c.value.trim();this.#G(t),this.#c.value?this.#h.classList.remove(c.HIDE):this.#h.classList.add(c.HIDE)}#R(){this.#A&&clearTimeout(this.#A),this.#A=setTimeout(()=>{this.#d(),this.#A=null},st.SEARCH_DEBOUNCE_MS)}#F(){this.#c.value="",this.#c.focus(),this.#d()}#K(t){let e=this.#r,i=e.getBoundingClientRect(),s=t.getBoundingClientRect(),o=s.top-i.top+e.scrollTop;s.top<i.top?e.scrollTop=o:s.bottom>i.bottom&&(e.scrollTop=o-i.height+s.height)}#g(t,e=!0){if(this.#m?.classList.remove(c.HIGHLIGHT),t){if(t.classList.add(c.HIGHLIGHT),this.#t.countrySearch){let i=t.getAttribute("id")||"";this.#c.setAttribute(p.ACTIVE_DESCENDANT,i)}e&&this.#K(t),this.#m=t}else this.#m=null}bindHiddenInputSubmitListener(t,e,i){let s=this.telInputEl.form;!s||!this.#u&&!this.#f||s.addEventListener("submit",()=>{this.#u&&(this.#u.value=e()),this.#f&&(this.#f.value=i())},{signal:t})}bindAllInitialCountrySelectorListeners(t,e,i){let s=this.telInputEl.closest("label");s&&s.addEventListener("click",o=>{this.isCountrySelectorOpen()?o.preventDefault():this.telInputEl.focus()},{signal:t}),this.#s.addEventListener("click",()=>{!this.isCountrySelectorOpen()&&!this.telInputEl.disabled&&!this.telInputEl.readOnly&&e()},{signal:t}),this.#e.addEventListener("keydown",o=>{let r=[T.ARROW_UP,T.ARROW_DOWN,T.SPACE,T.ENTER];!this.isCountrySelectorOpen()&&r.includes(o.key)&&(o.preventDefault(),o.stopPropagation(),e()),o.key===T.TAB&&i()},{signal:t})}openCountrySelector(t,e){let{countrySearch:i,dropdownAlwaysOpen:s}=this.#t;if(this.#v=new AbortController,this.#t.countrySelectorMode!==h.FULLSCREEN&&this.#rt(),this.ensureDropdownWidthSet(),this.#l)this.#k();else{let r=this.#$(),l=this.telInputEl.offsetHeight+O.DROPDOWN_MARGIN;r?this.#n.style.top=`${l}px`:this.#n.style.bottom=`${l}px`}this.#n.classList.remove(c.HIDE),this.#s.setAttribute(p.EXPANDED,"true");let o=this.#C??this.#r.firstElementChild;o&&this.#g(o),i&&!s&&this.#c.focus(),this.#t.countrySelectorMode===h.FULLSCREEN&&this.#l&&window.visualViewport&&window.visualViewport.addEventListener("resize",()=>{this.#ut(),this.#m&&this.#K(this.#m)},{signal:this.#v.signal}),this.#y.classList.add(c.ARROW_UP),this.#lt(t,e)}#lt(t,e){let i=this.#v.signal;this.#I(i),this.#z(i,t),this.#t.dropdownAlwaysOpen||this.#W(i,e),this.#at(i,t,e),this.#t.countrySearch&&this.#_(i),this.#t.countrySelectorMode===h.DROPDOWN&&this.#t.dropdownParent&&!Rt&&document.addEventListener("scroll",e,{signal:i,capture:!0,passive:!0})}#I(t){this.#r.addEventListener("mouseover",e=>{let i=e.target?.closest(`.${c.COUNTRY_ITEM}`);i&&this.#g(i,!1)},{signal:t})}#z(t,e){this.#r.addEventListener("click",i=>{let s=i.target?.closest(`.${c.COUNTRY_ITEM}`);s&&e(s)},{signal:t})}#W(t,e){setTimeout(()=>{document.documentElement.addEventListener("click",i=>{this.#n.contains(i.target)||e()},{signal:t})},0)}#at(t,e,i){let s="",o=null,r=l=>{[T.ARROW_UP,T.ARROW_DOWN,T.ENTER,T.ESC].includes(l.key)&&(l.preventDefault(),l.stopPropagation(),l.key===T.ARROW_UP||l.key===T.ARROW_DOWN?this.#D(l.key):l.key===T.ENTER&&!l.isComposing?e(this.#m):l.key===T.ESC&&(i(),this.#s.focus())),!this.#t.countrySearch&&_.HIDDEN_SEARCH_CHAR.test(l.key)&&(l.stopPropagation(),o&&clearTimeout(o),s+=l.key.toLowerCase(),this.#X(s),o=setTimeout(()=>{s=""},st.HIDDEN_SEARCH_RESET_MS))};this.#s?.addEventListener("keydown",r,{signal:t}),this.#n?.addEventListener("keydown",r,{signal:t})}#_(t){this.#c.addEventListener("input",()=>this.#R(),{signal:t}),this.#h.addEventListener("click",()=>this.#F(),{signal:t})}#X(t){let e=vt(this.#b,this.#S,t);if(e){let i=this.#M.get(e.iso2);this.#g(i)}}#D(t){let e=t===T.ARROW_UP?this.#m?.previousElementSibling:this.#m?.nextElementSibling;!e&&this.#r.childElementCount>1&&(e=t===T.ARROW_UP?this.#r.lastElementChild:this.#r.firstElementChild),e&&this.#g(e)}#B(t){if(this.#C&&this.#C.dataset[D.ISO2]!==t&&(this.#C.setAttribute(p.SELECTED,"false"),this.#C.querySelector(".iti__country-check")?.remove(),this.#C=null),t&&!this.#C){let e=this.#r.querySelector(`[data-iso2="${t}"]`);e&&(e.setAttribute(p.SELECTED,"true"),f("span",{class:this.#o("countryCheck","iti__country-check"),[p.HIDDEN]:"true"},e).appendChild(St()),this.#C=e,this.#t.dropdownAlwaysOpen&&this.#g(e))}}#L(t){this.#r.replaceChildren();let e=!0;for(let i of t){let s=this.#M.get(i.iso2);s&&(this.#r.appendChild(s),e&&(this.#g(s,!1),e=!1))}e?(this.#g(null),this.#N&&this.#N.classList.remove(c.HIDE)):this.#N&&this.#N.classList.add(c.HIDE),this.#r.scrollTop=0,this.#Y()}closeCountrySelector(){let{countrySearch:t}=this.#t;this.#v.abort(),this.#v=null,this.#n.classList.add(c.HIDE),this.#s.setAttribute(p.EXPANDED,"false"),t&&(this.#c.removeAttribute(p.ACTIVE_DESCENDANT),this.#c.value="",this.#d(),this.#m&&(this.#m.classList.remove(c.HIGHLIGHT),this.#m=null)),this.#y.classList.remove(c.ARROW_UP),this.#l?(this.#l.remove(),this.#l.style.top="",this.#l.style.bottom="",this.#l.style.paddingLeft="",this.#l.style.paddingRight=""):(this.#n.style.top="",this.#n.style.bottom="")}#$(){if(this.#t.dropdownAlwaysOpen)return!0;let t=this.telInputEl.getBoundingClientRect(),e=t.top,i=window.innerHeight-t.bottom;return i>=this.#w||i>=e}#k(){let t=this.#t.countrySelectorMode===h.FULLSCREEN,e=this.#V();if(t){if(window.innerWidth>=O.NARROW_VIEWPORT_WIDTH){let i=this.telInputEl.getBoundingClientRect();this.#l.style.paddingLeft=`${i.left}px`,this.#l.style.paddingRight=`${window.innerWidth-i.right}px`}}else this.#q();if(!t&&!Rt){let i=this.telInputEl.getBoundingClientRect();this.#l.style.left=`${i.left}px`,this.#$()?this.#l.style.top=`${i.bottom+O.DROPDOWN_MARGIN}px`:(this.#l.style.top="unset",this.#l.style.bottom=`${window.innerHeight-i.top+O.DROPDOWN_MARGIN}px`)}e.appendChild(this.#l)}#q(){if(this.#H)return;this.#H=!0;let t=`--iti-anchor-${this.#i}`,e=getComputedStyle(this.telInputEl).anchorName;this.telInputEl.style.anchorName=e&&e!=="none"?`${e}, ${t}`:t,this.#l.style.positionAnchor=t}#ut(){let t=window.visualViewport;if(!t||!this.#l)return;let e=window.innerHeight-t.height;this.#l.style.bottom=`${e}px`}isCountrySelectorOpen(){return!this.#n.classList.contains(c.HIDE)}setLoading(t){this.#p.classList.toggle(c.LOADING,t)}playStrictRejectAnimation(){if(!this.#t.strictRejectAnimation)return;let t=this.telInputEl.parentElement;t&&(t.classList.remove(c.STRICT_REJECT_ANIMATION),t.offsetWidth,t.classList.add(c.STRICT_REJECT_ANIMATION),t.addEventListener("animationend",()=>t.classList.remove(c.STRICT_REJECT_ANIMATION),{once:!0}))}isLoading(){return this.#p.classList.contains(c.LOADING)}setDisabled(t){this.telInputEl.disabled=t,this.#s&&(t?this.#s.setAttribute("disabled","true"):this.#s.removeAttribute("disabled"))}setReadonly(t){this.telInputEl.readOnly=t,this.#s&&(t?this.#s.setAttribute("disabled","true"):this.#s.removeAttribute("disabled"))}setSelectedCountry(t){let{countrySelectorMode:e,showFlags:i,separateDialCode:s,uiTranslations:o}=this.#t,r=t?.name,l=t?.dialCode,a=t?.iso2??"";if(e!==h.OFF&&this.#B(a),this.#s){let d=this.#o("selectedFlag",a&&i?`${c.FLAG} iti__${a}`:`${c.FLAG} ${c.GLOBE}`),y,C,E=null;a?(C=r,y=o.selectedCountryAriaLabel.replace("${countryName}",r).replace("${dialCode}",`+${l}`),i||(E=at())):(C=o.noCountrySelected,y=o.noCountrySelected,E=at()),this.#p.className=d,this.#s.setAttribute("title",C),this.#s.setAttribute(p.LABEL,y),E?this.#p.replaceChildren(E):this.#p.replaceChildren()}if(s){let d=l?`+${l}`:"";this.#a.textContent=d,this.#U()}}destroy(){this.telInputEl.iti=void 0,delete this.telInputEl.dataset[D.INSTANCE_ID],this.#P?.disconnect(),this.telInputEl.style.paddingLeft=this.#E;let t=this.telInputEl.parentNode;t&&(t.before(this.telInputEl),t.remove()),this.#M.clear()}};var _t=n=>{let{onlyCountries:t,excludeCountries:e}=n;return t?.length?H.filter(i=>t.includes(i.iso2)):e?.length?H.filter(i=>!e.includes(i.iso2)):[...H]},Dt=(n,t)=>{let{countryNameLocale:e,countryNameOverrides:i,uiTranslations:s}=t,o=s?.countryNames,r;try{typeof Intl<"u"&&typeof Intl.DisplayNames=="function"?r=new Intl.DisplayNames(e,{type:"region"}):r=null}catch(l){console.error(l),r=null}for(let l of n)l.name=i[l.iso2]||o?.[l.iso2]||r?.of(l.iso2.toUpperCase())||""},wt=n=>{let t=new Set,e=0,i={},s=(r,l)=>{if(!r||!l)return;l.length>e&&(e=l.length),Object.hasOwn(i,l)||(i[l]=[]);let a=i[l];a.includes(r)||a.push(r)},o=[...n].sort((r,l)=>r.priority-l.priority);for(let r of o){t.has(r.dialCode)||t.add(r.dialCode);for(let l=1;l<r.dialCode.length;l++){let a=r.dialCode.substring(0,l);s(r.iso2,a)}if(s(r.iso2,r.dialCode),r.areaCodes){let l=i[r.dialCode][0];for(let a of r.areaCodes){for(let d=1;d<a.length;d++){let y=a.substring(0,d),C=r.dialCode+y;s(l,C),s(r.iso2,C)}s(r.iso2,r.dialCode+a)}}}return{dialCodes:t,dialCodeMaxLength:e,dialCodeToIso2Map:i}},Mt=(n,t)=>{let{countryOrder:e}=t;n.sort((i,s)=>{if(e){let o=e.indexOf(i.iso2),r=e.indexOf(s.iso2),l=o>-1,a=r>-1;if(l||a)return l&&a?o-r:l?-1:1}return i.name.localeCompare(s.name)})};var Zt=new Set(["800","808","870","881","882","883","888","979"]),ct=n=>{let t=v(n).slice(0,3);return n.startsWith("+")&&Zt.has(t)};var ht=(n,t,e,i)=>{if(!e||!t)return n;let s=`+${i.dialCode}`,o=n[s.length]===" "||n[s.length]==="-"?s.length+1:s.length;return n.substring(o)},Pt=(n,t,e,i,s)=>{let o=e?e.formatNumberAsYouType(n,i?.iso2):n,r=i?.dialCode;return s&&t.charAt(0)!=="+"&&o.includes(`+${r}`)?(o.split(`+${r}`)[1]||"").trim():o};var xt=(n,t,e,i)=>{if(e===0&&!i)return 0;let s=0;for(let o=0;o<t.length;o++){if(/[+0-9]/.test(t[o])&&s++,s===n&&!i)return o+1;if(i&&s===n+1)return o}return t.length};var te=new Set(["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"]),dt=n=>{let t=v(n);if(t.startsWith(Y.NANP)&&t.length>=4){let e=t.substring(1,4);return te.has(e)}return!1};var ee=0,B=n=>{if(!u.utils)throw new Error(`intlTelInput.utils is required for ${n}(). See: https://intl-tel-input.com/docs/utils`)},kt=()=>{let n,t;return{promise:new Promise((i,s)=>{n=i,t=s}),resolve:n,reject:t}},$=class n{id;promise;#t;#i;#T;#E;#b;#S;#A;#w;#H;#e=null;#s=null;#p;#a=!0;#y;#n;#O=!1;#c=null;#h;#r;constructor(t,e={}){this.id=ee++,W.validateInput(t);let i=It(e);this.#i={...J,...i},bt(this.#i),Lt(this.#i),this.#t=new W(t,this.#i,this.id),this.#T=typeof navigator<"u"&&/Android/i.test(navigator.userAgent),this.#n=new F(t.value),this.promise=this.#N(this.#i),this.#E=_t(this.#i);let{dialCodes:s,dialCodeMaxLength:o,dialCodeToIso2Map:r}=wt(this.#E);this.#A=s,this.#b=o,this.#S=r,this.#w=new Map(this.#E.map(l=>[l.iso2,l])),this.#j()}#u(){let t=this.#t.telInputEl.value.trim();return this.#n.normalise(t)}#f(t){this.#t.telInputEl.value=this.#n.denormalise(t)}#N(t){let{initialCountry:e,initialCountryLookup:i,loadUtils:s}=t,o=!e&&!!i,r=!!s&&!u.utils;return o&&(this.#h=kt()),r&&(this.#r=kt()),Promise.all([this.#h?.promise,this.#r?.promise]).then(()=>{})}#j(){this.#y=new AbortController,this.#l(),this.#t.buildMarkup(this.#E,this.#H),this.#C(),this.#m(),this.#M(),this.#i.dropdownAlwaysOpen&&this.openCountrySelector()}#l(){Dt(this.#E,this.#i),Mt(this.#E,this.#i),this.#H=At(this.#E)}#C(t=!1){let e=this.#t.telInputEl.getAttribute("value"),i=this.#n.normalise(e??""),s=this.#u(),r=i&&i.startsWith("+")&&(!s||!s.startsWith("+"))?i:s,l=this.#D(r),a=dt(r),{initialCountry:d,initialCountryLookup:y}=this.#i,C=!d&&!!y,E=C&&u.autoCountry?u.autoCountry:d,S=C&&!t&&!u.autoCountry,N=k(E);l?a?N?this.#I(E):S||this.#I(ft.ISO2):(N&&this.#I(E),this.#F(r)):N?this.#I(E):S||this.#I(""),r&&this.#R(r)}#m(){this.#J(),this.#i.countrySelectorMode!==h.OFF&&this.#t.bindAllInitialCountrySelectorListeners(this.#y.signal,()=>this.openCountrySelector(),()=>this.#_()),this.#t.bindHiddenInputSubmitListener(this.#y.signal,()=>this.getNumber(),()=>this.#e?.iso2||"")}#M(){if(this.#r){let{loadUtils:t}=this.#i,e=()=>{u.attachUtils(t).catch(()=>{})};u.documentReady()?e():window.addEventListener("load",e,{signal:this.#y.signal})}this.#h&&(this.#e?this.#h.resolve():this.#v())}async#v(){if(u.autoCountry){this.#q();return}if(this.#t.setLoading(!0),!u.startedLoadingAutoCountry&&(u.startedLoadingAutoCountry=!0,typeof this.#i.initialCountryLookup=="function")){let t;try{let e=await Promise.race([this.#i.initialCountryLookup(),new Promise((s,o)=>{t=setTimeout(()=>o(new Error("intl-tel-input: initialCountryLookup timed out after 10s")),1e4)})]),i=typeof e=="string"?e.toLowerCase():"";if(!k(i)){u.startedLoadingAutoCountry=!1,n.forEachInstance("handleAutoCountryFailure");return}u.autoCountry=i,setTimeout(()=>n.forEachInstance("handleAutoCountryLoaded"))}catch{u.startedLoadingAutoCountry=!1,n.forEachInstance("handleAutoCountryFailure")}finally{t!==void 0&&clearTimeout(t)}}}#P(){this.openCountrySelector(),this.#t.prefillSearchWithPlus()}#o(t){let e=this.#t.telInputEl.selectionStart||0,i=t.substring(0,e-1),s=t.substring(e);return this.#f(i+s),e-1}#J(){this.#et(),this.#st(),this.#nt()}#Q(t){this.#o(t),this.#P()}#Z(t,e){let i=this.#o(t);this.#t.telInputEl.setSelectionRange(i,i),this.#t.playStrictRejectAnimation(),this.#d(A.STRICT_REJECT,{source:"key",rejectedInput:e,reason:"invalid"})}#V(t,e){let i=this.#t.telInputEl.selectionStart||0,o=t.substring(0,i).replace(_.NON_PLUS_NUMERIC_GLOBAL,"").length,r=this.#L(),l=Pt(r,t,u.utils,this.#e,this.#i.separateDialCode),a=xt(o,l,i,e);this.#f(l),this.#t.telInputEl.setSelectionRange(a,a)}#tt(t){if(t.startsWith("+")&&this.#e&&this.#D(t)){let e=ht(t,!0,!0,this.#e);this.#f(e)}}#et(){this.#O=_.ALPHA_UNICODE.test(this.#u()),this.#t.telInputEl.addEventListener("input",this.#it,{signal:this.#y.signal})}#it=t=>{let{strictMode:e,formatAsYouType:i,separateDialCode:s,countrySelectorMode:o,countrySearch:r}=this.#i,l=t?.detail;if(l?.isCountryChange)return;let a=this.#u(),d=t?.inputType===it.PASTE,y=e&&d;if(this.#T&&!d&&t?.data==="+"&&s&&o!==h.OFF&&r){this.#Q(a);return}if(this.#T&&!d&&e&&(t?.data===" "||t?.data==="-"||t?.data===".")){this.#Z(a,t.data);return}if(y){if(this.#rt())return;a=this.#u()}this.#F(a)&&(this.#k(),this.#d(A.INPUT,{isCountryChange:!0})),!y&&t?.data&&_.NON_PLUS_NUMERIC.test(t.data)||d&&a&&!e?this.#O=!0:_.NON_PLUS_NUMERIC.test(a)||(this.#O=!1),i&&!this.#O&&!l?.isSetNumber&&this.#n.isAscii()&&this.#V(a,t?.inputType===it.DELETE_FORWARD),s&&this.#tt(a)};#st(){let{strictMode:t,separateDialCode:e}=this.#i;!t&&!e||this.#t.telInputEl.addEventListener("keydown",this.#U,{signal:this.#y.signal})}#U=t=>{let{strictMode:e,separateDialCode:i,countrySelectorMode:s,countrySearch:o}=this.#i;if(!t.key||t.key.length!==1||t.altKey||t.ctrlKey||t.metaKey)return;if(i&&s!==h.OFF&&o&&t.key==="+"){t.preventDefault(),this.#P();return}if(!e)return;let r=this.#u(),a=!r.startsWith("+")&&this.#t.telInputEl.selectionStart===0&&t.key==="+",d=this.#n.normalise(t.key),y=/^[0-9]$/.test(d),C=i?y:a||y,E=this.#t.telInputEl,S=E.selectionStart,N=E.selectionEnd,b=r.slice(0,S??void 0),m=r.slice(N??void 0),I=b+d+m,R=this.#B(I),M=v(R).length>nt;!M&&u.utils&&this.#s&&(M=u.utils.getCoreNumber(R,this.#e?.iso2).length>this.#s);let x=this.#g(R)!==null;(!C||M&&!x&&!a)&&(this.#t.playStrictRejectAnimation(),this.#d(A.STRICT_REJECT,{source:"key",rejectedInput:t.key,reason:C?"max-length":"invalid"}),t.preventDefault())};#nt(){this.#i.strictMode&&this.#t.telInputEl.addEventListener("paste",this.#ot,{signal:this.#y.signal})}#ot=t=>{let e=this.#t.telInputEl,i=this.#u();this.#c={pastedRaw:t.clipboardData?.getData("text")??"",value:i,selectionStart:e.selectionStart??i.length,selectionEnd:e.selectionEnd??i.length}};#rt(){let t=this.#t.telInputEl,e=this.#c;if(this.#c=null,!e)return!1;let i=e.pastedRaw,s=e.value,o=e.selectionStart,r=e.selectionEnd,l=s.slice(0,o),a=s.slice(r),d=this.#e?.iso2,y=this.#n.normalise(i),C=o===0&&r>0,E=!s.startsWith("+")||C,S=y.replace(_.NON_PLUS_NUMERIC_GLOBAL,""),N=S.startsWith("+"),b=S.replace(/\+/g,""),m=N&&E?`+${b}`:b,I=l+m+a,R=m!==y?"invalid":null;if(I.length>30)return this.#x(e),!0;let M=v(this.#B(I)).length-nt;if(M>0){if(r!==s.length)return this.#x(e),!0;I=I.slice(0,I.length-M),R="max-length"}if(this.#s&&I.length>5&&u.utils){let x=u.utils.getCoreNumber(I,d);for(;x.length===0&&I.length>0;)I=I.slice(0,-1),x=u.utils.getCoreNumber(I,d);if(!x)return this.#x(e),!0;if(x.length>this.#s)if(r===s.length){let pt=x.length-this.#s;I=I.slice(0,I.length-pt),R="max-length"}else return this.#x(e),!0}this.#f(I);let Q=o+m.length;return t.setSelectionRange(Q,Q),R&&(y.length>0&&m.length===0&&this.#t.playStrictRejectAnimation(),this.#d(A.STRICT_REJECT,{source:"paste",rejectedInput:i,reason:R})),!1}#x(t){this.#t.playStrictRejectAnimation(),this.#d(A.STRICT_REJECT,{source:"paste",rejectedInput:t.pastedRaw,reason:"max-length"}),this.#Y(t)}#Y(t){this.#f(t.value),this.#t.telInputEl.setSelectionRange(t.selectionStart,t.selectionEnd)}#G(t){let e=Number(this.#t.telInputEl.getAttribute("maxlength"));return e&&t.length>e?t.substring(0,e):t}#d(t,e={}){let i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:e});this.#t.telInputEl.dispatchEvent(i)}openCountrySelector(){this.#t.isCountrySelectorOpen()||(this.#t.openCountrySelector(t=>this.#at(t),()=>this.#_()),this.#d(A.OPEN_COUNTRY_SELECTOR))}#R(t){let{numberDisplayFormat:e,separateDialCode:i}=this.#i,s=t;if(u.utils&&this.#e){let o=ct(t),r=!s.startsWith("+")&&!i,l=e===g.NATIONAL&&!o||r,a;l?a=g.NATIONAL:e===g.E164&&!o?a=g.E164:a=g.INTERNATIONAL,s=u.utils.formatNumber(s,this.#e?.iso2,a)}s=this.#$(s),this.#f(s)}#F(t){let e=this.#g(t);return e!==null?this.#I(e):!1}#K(t){let e=this.#e?.dialCode,i=this.#e?.nationalPrefix;if(t.startsWith("+")||!e)return t;let r=i&&t.startsWith(i)&&!this.#i.separateDialCode?t.substring(1):t;return`+${e}${r}`}#g(t){let e=t.indexOf("+"),i=e>0?t.substring(e):t,s=this.#e?.iso2;i=this.#K(i);let o=this.#D(i,!0),r=v(i);if(o){let l=v(o),a=this.#S[l];return a.length===1?a[0]===s?null:a[0]:this.#lt(a,l,r)}else if(i.startsWith("+")&&r.length){let l=this.#e?.dialCode||"";return l&&l.startsWith(r)||!s?null:""}else if((!i||i==="+")&&!s&&this.#p)return this.#p;return null}#lt(t,e,i){let s=this.#e?.iso2,o=this.#e?.dialCode;if(!s&&this.#p&&t.includes(this.#p))return this.#p;if(o===Y.NANP&&dt(i))return null;let l=this.#e?.areaCodes,a=this.#e?.priority;if(l){let S=l.map(N=>`${o}${N}`);for(let N of S)if(i.startsWith(N))return null}let y=l&&!(a===0)&&i.length>e.length,C=s&&t.includes(s)&&!y,E=s===t[0];return!C&&!E?t[0]:null}#I(t){let e=this.#e?.iso2||"";return this.#e=t?this.#w.get(t):null,this.#e&&(this.#p=this.#e.iso2),this.#t.setSelectedCountry(this.#e),this.#W(),this.#z(),e!==t}#z(){let{strictMode:t,placeholderNumberType:e,allowedNumberTypes:i}=this.#i;if(!t||!u.utils)return;let s=this.#e?.iso2;if(!s){this.#s=null;return}let o=u.utils.getExampleNumber(s,e,g.E164),r=o;for(;u.utils.isValidNumber(o,s,i);)r=o,o+="0";let l=u.utils.getCoreNumber(r,s);this.#s=l.length,s==="by"&&(this.#s=l.length+1)}#W(){let{placeholderNumberPolicy:t,placeholderNumberType:e,numberDisplayFormat:i,customPlaceholder:s}=this.#i,o=t===w.AGGRESSIVE||!this.#t.hadInitialPlaceholder&&t===w.POLITE;if(!u.utils||!o)return;let r=this.#e?u.utils.getExampleNumber(this.#e.iso2,e,i):"";r=this.#$(r),typeof s=="function"&&(r=s(r,this.#e)),this.#t.telInputEl.setAttribute("placeholder",r)}#at(t){if(!t)return;let e=t.dataset[D.ISO2],i=this.#I(e);this.#_();let s=t.dataset[D.DIAL_CODE];this.#X(s);let o=this.#u();this.#R(o),this.#t.telInputEl.focus(),i&&(this.#k(),this.#d(A.INPUT,{isCountryChange:!0}))}closeCountrySelector(){this.#_()}#_(t){!this.#t.isCountrySelectorOpen()||this.#i.dropdownAlwaysOpen&&!t||(this.#t.closeCountrySelector(),this.#d(A.CLOSE_COUNTRY_SELECTOR))}#X(t){let e=this.#u();if(!e.startsWith("+"))return;let i=`+${t}`,s=this.#D(e),o;s?o=e.replace(s,i):o=i,this.#f(o)}#D(t,e){if(!t.startsWith("+"))return"";let i="",s="",o=!1;for(let r=0;r<t.length;r++){let l=t.charAt(r);if(!/[0-9]/.test(l))continue;if(s+=l,!!!this.#S[s])break;if(this.#A.has(s)){if(i=t.substring(0,r+1),o=!0,!e)break}else e&&o&&(i=t.substring(0,r+1));if(s.length===this.#b)break}return i}#B(t){let e=this.#e?.dialCode,i=v(t);return(this.#i.separateDialCode&&!t.startsWith("+")&&e&&i?`+${e}`:"")+t}#L(){let t=this.#u();return this.#B(t)}#$(t){let e=!!this.#D(t),i=ht(t,e,this.#i.separateDialCode,this.#e);return this.#G(i)}#k(){this.#d(A.COUNTRY_CHANGE,this.#e??null)}#q(){if(!this.#h||!u.autoCountry)return;if(!this.#a){this.#h.resolve();return}let t=document.activeElement===this.#t.telInputEl,e=!!this.#u();this.#t.isLoading()&&!(t&&e)?this.setSelectedCountry(u.autoCountry):this.#p=u.autoCountry,this.#t.setLoading(!1),this.#h.resolve()}#ut(){if(!this.#a){this.#h?.reject();return}this.#t.isLoading()&&this.#C(!0),this.#t.setLoading(!1),this.#h?.reject()}#ht(){if(!this.#a){this.#r?.resolve();return}if(!u.utils){this.#r?.resolve();return}let t=this.#u(),e=document.activeElement===this.#t.telInputEl;t&&!e&&this.#R(t),this.#e&&(this.#W(),this.#z()),this.#r?.resolve()}#dt(t){if(!this.#a){this.#r?.reject(t);return}this.#r?.reject(t)}destroy(){this.#a&&(this.#a=!1,this.#i.countrySelectorMode!==h.OFF&&this.#_(!0),this.#y.abort(),this.#t.destroy(),u.instances.delete(String(this.id)))}isActive(){return this.#a}getExtension(){return this.#a?(B("getExtension"),u.utils.getExtension(this.#L(),this.#e?.iso2)):""}getNumber(t){if(!this.#a)return"";B("getNumber");let e=this.#e?.iso2,i=this.#L(),s=u.utils.formatNumber(i,e,t);return this.#n.denormalise(s)}getNumberType(){return this.#a?(B("getNumberType"),u.utils.getNumberType(this.#L(),this.#e?.iso2)):null}getSelectedCountry(){return this.#e??null}getValidationError(){if(!this.#a)return null;B("getValidationError");let t=this.#e?.iso2;return u.utils.getValidationError(this.#L(),t)}isValidNumber(){if(!this.#a)return null;B("isValidNumber");let t=this.#e?.dialCode,e=this.#e?.iso2,i=this.#L(),s=u.utils.getCoreNumber(i,e);if(s){if(t===G.DIAL_CODE&&s[0]===G.MOBILE_PREFIX&&s.length!==G.MOBILE_CORE_LENGTH)return!1;if(!_.ALPHA_UNICODE.test(i)&&t){let r=i.startsWith("+")?i.slice(1+t.length):i,l=v(r).length;if(s.length>l)return!1}}return this.#ct("possible")}isValidNumberPrecise(){return this.#a?(B("isValidNumberPrecise"),this.#ct("precise")):null}#ct(t){let{allowNumberExtensions:e,allowPhonewords:i,allowedNumberTypes:s}=this.#i,o=this.#e?.iso2,r=this.#L();return!this.#e&&!ct(r)||!(t==="precise"?u.utils.isValidNumberPrecise:u.utils.isValidNumber)(r,o,s)?!1:_.ALPHA_UNICODE.test(r)?!!u.utils.getExtension(r,o)?e:i:!0}setSelectedCountry(t){if(!this.#a)return;let e=t?.toLowerCase();if(!k(e))throw new Error(`Invalid iso2 code: '${e}'`);let i=this.#e?.iso2;if(!(t&&e!==i||!t&&i))return;this.#I(e),this.#X(this.#e?.dialCode||"");let o=this.#u();this.#R(o),this.#k(),this.#d(A.INPUT,{isCountryChange:!0})}setNumber(t){if(!this.#a)return;let e=this.#n.normalise(t),i=this.#F(e);this.#R(e),i&&this.#k(),this.#d(A.INPUT,{isSetNumber:!0})}setPlaceholderNumberType(t){this.#a&&(this.#i.placeholderNumberType=t,this.#W())}setDisabled(t){this.#a&&this.#t.setDisabled(t)}setReadonly(t){this.#a&&this.#t.setReadonly(t)}static forEachInstance(t,...e){let i=[...u.instances.values()],s=e[0];i.forEach(o=>{if(o instanceof n)switch(t){case"handleUtilsLoaded":o.#ht();break;case"handleUtilsFailure":o.#dt(s);break;case"handleAutoCountryLoaded":o.#q();break;case"handleAutoCountryFailure":o.#ut();break}})}},ie=async n=>{if(u.utils||u.startedLoadingUtils)return null;if(typeof n!="function")throw new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utils module, not ${typeof n}`);u.startedLoadingUtils=!0;try{let e=(await n())?.default;if(!e||typeof e!="object")throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return u.utils=e,$.forEachInstance("handleUtilsLoaded"),!0}catch(t){throw $.forEachInstance("handleUtilsFailure",t),t}},u=Object.assign((n,t)=>{let e=new $(n,t);return u.instances.set(String(e.id),e),n.iti=e,e},{defaults:J,documentReady:()=>document.readyState==="complete",getAllCountries:()=>H,getInstance:n=>{let t=n.dataset[D.INSTANCE_ID];return t?u.instances.get(t)??null:null},instances:new Map,attachUtils:ie,startedLoadingUtils:!1,startedLoadingAutoCountry:!1,version:"29.2.2",NUMBER_FORMAT:g,NUMBER_TYPE:P,VALIDATION_ERROR:X,PLACEHOLDER_POLICY:w,COUNTRY_SELECTOR_MODE:h}),se=u;return $t(ne);})();
6
+ "use strict";var _factory=(()=>{var Z=Object.defineProperty;var Ht=Object.getOwnPropertyDescriptor;var Ut=Object.getOwnPropertyNames;var Ft=Object.prototype.hasOwnProperty;var Wt=(n,t)=>{for(var e in t)Z(n,e,{get:t[e],enumerable:!0})},Bt=(n,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ut(t))!Ft.call(n,s)&&s!==e&&Z(n,s,{get:()=>t[s],enumerable:!(i=Ht(t,s))||i.enumerable});return n};var $t=n=>Bt(Z({},"__esModule",{value:!0}),n);var ne={};Wt(ne,{COUNTRY_SELECTOR_MODE:()=>h,Iti:()=>$,NUMBER_FORMAT:()=>g,NUMBER_TYPE:()=>P,PLACEHOLDER_POLICY:()=>w,VALIDATION_ERROR:()=>X,default:()=>se});var jt=[["af","93",0,null,"0"],["ax","358",1,["18","4","50"],"0"],["al","355",0,null,"0"],["dz","213",0,null,"0"],["as","1",5,["684"],"1"],["ad","376"],["ao","244"],["ai","1",6,["264"],"1"],["ag","1",7,["268"],"1"],["ar","54",0,null,"0"],["am","374",0,null,"0"],["aw","297"],["ac","247"],["au","61",0,["4"],"0"],["at","43",0,null,"0"],["az","994",0,null,"0"],["bs","1",8,["242"],"1"],["bh","973"],["bd","880",0,null,"0"],["bb","1",9,["246"],"1"],["by","375",0,null,"8"],["be","32",0,null,"0"],["bz","501"],["bj","229"],["bm","1",10,["441"],"1"],["bt","975"],["bo","591",0,null,"0"],["ba","387",0,null,"0"],["bw","267"],["br","55",0,null,"0"],["io","246"],["vg","1",11,["284"],"1"],["bn","673"],["bg","359",0,null,"0"],["bf","226"],["bi","257"],["kh","855",0,null,"0"],["cm","237"],["ca","1",1,["204","226","236","249","250","257","263","289","306","343","354","365","367","368","382","403","416","418","428","431","437","438","450","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","942"],"1"],["cv","238"],["bq","599",1,["3","4","7"]],["ky","1",12,["345"],"1"],["cf","236"],["td","235"],["cl","56"],["cn","86",0,null,"0"],["cx","61",2,["4","89164"],"0"],["cc","61",1,["4","89162"],"0"],["co","57",0,null,"0"],["km","269"],["cg","242"],["cd","243",0,null,"0"],["ck","682"],["cr","506"],["ci","225"],["hr","385",0,null,"0"],["cu","53",0,null,"0"],["cw","599",0],["cy","357"],["cz","420"],["dk","45"],["dj","253"],["dm","1",13,["767"],"1"],["do","1",2,["809","829","849"],"1"],["ec","593",0,null,"0"],["eg","20",0,null,"0"],["sv","503"],["gq","240"],["er","291",0,null,"0"],["ee","372"],["sz","268"],["et","251",0,null,"0"],["fk","500"],["fo","298"],["fj","679"],["fi","358",0,["4","50"],"0"],["fr","33",0,null,"0"],["gf","594",0,null,"0"],["pf","689"],["ga","241"],["gm","220"],["ge","995",0,null,"0"],["de","49",0,null,"0"],["gh","233",0,null,"0"],["gi","350"],["gr","30"],["gl","299"],["gd","1",14,["473"],"1"],["gp","590",0,null,"0"],["gu","1",15,["671"],"1"],["gt","502"],["gg","44",1,["1481","7781","7839","79111","79117"],"0"],["gn","224"],["gw","245"],["gy","592"],["ht","509"],["hn","504"],["hk","852"],["hu","36",0,null,"06"],["is","354"],["in","91",0,null,"0"],["id","62",0,null,"0"],["ir","98",0,null,"0"],["iq","964",0,null,"0"],["ie","353",0,null,"0"],["im","44",2,["1624","74576","7524","7624","7924"],"0"],["il","972",0,null,"0"],["it","39",0,["3"]],["jm","1",4,["658","876"],"1"],["jp","81",0,null,"0"],["je","44",3,["1534","7509","77003","77007","77008","7797","7829","7937"],"0"],["jo","962",0,null,"0"],["kz","7",1,["33","7"],"8"],["ke","254",0,null,"0"],["ki","686",0,null,"0"],["xk","383",0,null,"0"],["kw","965"],["kg","996",0,null,"0"],["la","856",0,null,"0"],["lv","371"],["lb","961",0,null,"0"],["ls","266"],["lr","231",0,null,"0"],["ly","218",0,null,"0"],["li","423",0,null,"0"],["lt","370",0,null,"0"],["lu","352"],["mo","853"],["mg","261",0,null,"0"],["mw","265",0,null,"0"],["my","60",0,null,"0"],["mv","960"],["ml","223"],["mt","356"],["mh","692",0,null,"1"],["mq","596",0,null,"0"],["mr","222"],["mu","230"],["yt","262",1,["2689","269","639","7093"],"0"],["mx","52"],["fm","691"],["md","373",0,null,"0"],["mc","377",0,null,"0"],["mn","976",0,null,"0"],["me","382",0,null,"0"],["ms","1",16,["664"],"1"],["ma","212",0,["6","7"],"0"],["mz","258"],["mm","95",0,null,"0"],["na","264",0,null,"0"],["nr","674"],["np","977",0,null,"0"],["nl","31",0,null,"0"],["nc","687"],["nz","64",0,null,"0"],["ni","505"],["ne","227"],["ng","234",0,null,"0"],["nu","683"],["nf","672"],["kp","850",0,null,"0"],["mk","389",0,null,"0"],["mp","1",17,["670"],"1"],["no","47",0,["4","9"]],["om","968"],["pk","92",0,null,"0"],["pw","680"],["ps","970",0,null,"0"],["pa","507"],["pg","675"],["py","595",0,null,"0"],["pe","51",0,null,"0"],["ph","63",0,null,"0"],["pl","48"],["pt","351"],["pr","1",3,["787","939"],"1"],["qa","974"],["re","262",0,null,"0"],["ro","40",0,null,"0"],["ru","7",0,["33"],"8"],["rw","250",0,null,"0"],["ws","685"],["sm","378"],["st","239"],["sa","966",0,null,"0"],["sn","221"],["rs","381",0,null,"0"],["sc","248"],["sl","232",0,null,"0"],["sg","65"],["sx","1",21,["721"],"1"],["sk","421",0,null,"0"],["si","386",0,null,"0"],["sb","677"],["so","252",0,null,"0"],["za","27",0,null,"0"],["kr","82",0,null,"0"],["ss","211",0,null,"0"],["es","34"],["lk","94",0,null,"0"],["bl","590",1,null,"0"],["sh","290"],["kn","1",18,["869"],"1"],["lc","1",19,["758"],"1"],["mf","590",2,null,"0"],["pm","508",0,null,"0"],["vc","1",20,["784"],"1"],["sd","249",0,null,"0"],["sr","597"],["sj","47",1,["4","79","9"]],["se","46",0,null,"0"],["ch","41",0,null,"0"],["sy","963",0,null,"0"],["tw","886",0,null,"0"],["tj","992"],["tz","255",0,null,"0"],["th","66",0,null,"0"],["tl","670"],["tg","228"],["tk","690"],["to","676"],["tt","1",22,["868"],"1"],["tn","216"],["tr","90",0,null,"0"],["tm","993",0,null,"8"],["tc","1",23,["649"],"1"],["tv","688"],["vi","1",24,["340"],"1"],["ug","256",0,null,"0"],["ua","380",0,null,"0"],["ae","971",0,null,"0"],["gb","44",0,null,"0"],["us","1",0,null,"1"],["uy","598",0,null,"0"],["uz","998"],["vu","678"],["va","39",1,["06698","3"]],["ve","58",0,null,"0"],["vn","84",0,null,"0"],["wf","681"],["eh","212",1,["5288","5289","6","7"],"0"],["ye","967",0,null,"0"],["zm","260",0,null,"0"],["zw","263",0,null,"0"]],tt=[];for(let n of jt)tt.push({name:"",iso2:n[0],dialCode:n[1],priority:n[2]||0,areaCodes:n[3]||null,nationalPrefix:n[4]||null});var Vt=new Set(tt.map(n=>n.iso2)),k=n=>Vt.has(n),H=tt;var A={OPEN_COUNTRY_SELECTOR:"open:countryselector",CLOSE_COUNTRY_SELECTOR:"close:countryselector",COUNTRY_CHANGE:"countrychange",INPUT:"input",STRICT_REJECT:"strict:reject"},et=["container","input","countryContainer","selectedCountry","selectedCountryPrimary","selectedFlag","arrow","selectedDialCode","countrySelector","countrySelectorContainer","searchWrapper","searchIcon","searchInput","searchClear","countryList","countryListItem","countryListItemFlag","countryName","dialCode","countryCheck","noResults"],c={HIDE:"iti__hide",V_HIDE:"iti__v-hide",ARROW_UP:"iti__arrow--up",GLOBE:"iti__globe",FLAG:"iti__flag",LOADING:"iti__loading",COUNTRY_ITEM:"iti__country",HIGHLIGHT:"iti__highlight",STRICT_REJECT_ANIMATION:"iti__strict-reject-animation"},T={ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",SPACE:" ",ENTER:"Enter",ESC:"Escape",TAB:"Tab"},it={PASTE:"insertFromPaste",DELETE_FORWARD:"deleteContentForward"},_={ALPHA_UNICODE:/\p{L}/u,NON_PLUS_NUMERIC:/[^+0-9]/,NON_PLUS_NUMERIC_GLOBAL:/[^+0-9]/g,HIDDEN_SEARCH_CHAR:/^[a-zA-ZÀ-ÿа-яА-Я ]$/},st={SEARCH_DEBOUNCE_MS:100,HIDDEN_SEARCH_RESET_MS:1e3,NEXT_TICK:0},O={NARROW_VIEWPORT_WIDTH:500,FALLBACK_SELECTED_COUNTRY_WITH_DIAL_WIDTH:78,FALLBACK_SELECTED_COUNTRY_NO_DIAL_WIDTH:42,INPUT_PADDING_EXTRA_LEFT:6,DROPDOWN_MARGIN:3,FALLBACK_DROPDOWN_HEIGHT:200},Y={PLUS:"+",NANP:"1"},nt=15,G={ISO2:"gb",DIAL_CODE:"44",MOBILE_PREFIX:"7",MOBILE_CORE_LENGTH:10},ft={ISO2:"us",DIAL_CODE:"1"},w={AGGRESSIVE:"AGGRESSIVE",POLITE:"POLITE",OFF:"OFF"},K=["OFF","DROPDOWN","FULLSCREEN","AUTO"],Yt=["E164","INTERNATIONAL","NATIONAL","RFC3966"],U=["FIXED_LINE","MOBILE","FIXED_LINE_OR_MOBILE","TOLL_FREE","PREMIUM_RATE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL","UNKNOWN"],Gt=["IS_POSSIBLE","INVALID_COUNTRY_CODE","TOO_SHORT","TOO_LONG","IS_POSSIBLE_LOCAL_ONLY","INVALID_LENGTH"],z=n=>Object.fromEntries(n.map(t=>[t,t])),g=z(Yt),P=z(U),X=z(Gt),h=z(K),D={ISO2:"iso2",DIAL_CODE:"dialCode",INSTANCE_ID:"intlTelInputId"},p={EXPANDED:"aria-expanded",LABEL:"aria-label",SELECTED:"aria-selected",ACTIVE_DESCENDANT:"aria-activedescendant",HASPOPUP:"aria-haspopup",CONTROLS:"aria-controls",HIDDEN:"aria-hidden",AUTOCOMPLETE:"aria-autocomplete",MODAL:"aria-modal"};var Kt={selectedCountryAriaLabel:"Change country for phone number, currently selected ${countryName} (${dialCode})",noCountrySelected:"Select country for phone number",countryListAriaLabel:"List of countries",searchPlaceholder:"Search",clearSearchAriaLabel:"Clear search",searchEmptyState:"No results found",searchSummaryAria(n){return n===0?"No results found":n===1?"1 result found":`${n} results found`}},mt=Kt;var ot=n=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(n).matches,Et=()=>ot(`(max-width: ${O.NARROW_VIEWPORT_WIDTH}px)`),zt=()=>{if(typeof navigator<"u"&&typeof window<"u"){let n=ot("(max-height: 600px)"),t=ot("(pointer: coarse)");if(Et()||t&&n)return h.FULLSCREEN}return h.DROPDOWN},J={countrySelectorMode:h.AUTO,allowedNumberTypes:[P.MOBILE,P.FIXED_LINE],allowNumberExtensions:!1,allowPhonewords:!1,classNames:{},containerClass:"",countryNameLocale:"en",countryNameOverrides:{},countryOrder:null,countrySearch:!0,customPlaceholder:null,dropdownAlwaysOpen:!1,dropdownParent:null,excludeCountries:null,matchDropdownWidth:!0,formatAsYouType:!0,hiddenInputs:null,uiTranslations:{},initialCountry:"",initialCountryLookup:null,loadUtils:null,numberDisplayFormat:g.INTERNATIONAL,onlyCountries:null,placeholderNumberPolicy:w.POLITE,placeholderNumberType:P.MOBILE,searchInputClass:"",separateDialCode:!0,strictRejectAnimation:!0,showFlags:!0,strictMode:!0},gt=n=>JSON.stringify(n),q=n=>!!n&&typeof n=="object"&&!Array.isArray(n),Xt=n=>typeof n=="function",qt=n=>{if(!n||typeof n!="object")return!1;let t=n;return t.nodeType===1&&typeof t.tagName=="string"&&typeof t.appendChild=="function"},yt=new Set(Object.values(w)),Jt=new Set(et),j=n=>{console.warn(`[intl-tel-input] ${n}`)},L=(n,t,e)=>{j(`Option '${n}' must be ${t}; got ${gt(e)}. Ignoring.`)},Ct=(n,t)=>{let e="an array of iso2 country code strings";if(!Array.isArray(t))return L(n,e,t),!1;let i=[];for(let s of t){if(typeof s!="string")return L(n,e,t),!1;let o=s.toLowerCase();k(o)?i.push(s):j(`Invalid iso2 code in '${n}': '${s}'. Skipping.`)}return i},It=n=>{if(n===void 0)return{};if(!q(n)){let e=`The second argument must be an options object; got ${gt(n)}. Using defaults.`;return j(e),{}}let t={};for(let[e,i]of Object.entries(n)){if(!Object.hasOwn(J,e)){j(`Unknown option '${e}'. Ignoring.`);continue}switch(e){case"allowNumberExtensions":case"allowPhonewords":case"countrySearch":case"dropdownAlwaysOpen":case"matchDropdownWidth":case"formatAsYouType":case"showFlags":case"separateDialCode":case"strictMode":case"strictRejectAnimation":if(typeof i!="boolean"){L(e,"a boolean",i);break}t[e]=i;break;case"countrySelectorMode":if(typeof i!="string"||!K.includes(i)){L("countrySelectorMode",`one of ${K.map(s=>`"${s}"`).join(", ")}`,i);break}t[e]=i;break;case"numberDisplayFormat":if(typeof i!="string"||i===g.RFC3966||!(i===g.E164||i===g.INTERNATIONAL||i===g.NATIONAL)){L("numberDisplayFormat",'one of "E164", "INTERNATIONAL", "NATIONAL"',i);break}t[e]=i;break;case"placeholderNumberPolicy":if(typeof i!="string"||!yt.has(i)){let s=Array.from(yt).join(", ");L("placeholderNumberPolicy",`one of ${s}`,i);break}t[e]=i;break;case"containerClass":case"searchInputClass":case"countryNameLocale":if(typeof i!="string"){L(e,"a string",i);break}t[e]=i;break;case"classNames":{if(!q(i)){L("classNames","an object",i);break}let s={};for(let[o,r]of Object.entries(i))Jt.has(o)?typeof r!="string"?L(`classNames.${o}`,"a string",r):s[o]=r.trim().replace(/\s+/g," "):j(`Unknown slot '${o}' in 'classNames'. Valid slots: ${et.join(", ")}. Skipping.`);t[e]=s;break}case"countryOrder":{if(i===null)t[e]=i;else{let s=Ct(e,i);s!==!1&&(t[e]=s)}break}case"customPlaceholder":case"hiddenInputs":case"initialCountryLookup":case"loadUtils":if(i!==null&&!Xt(i)){L(e,"a function or null",i);break}t[e]=i;break;case"dropdownParent":if(i!==null&&!qt(i)){L("dropdownParent","an HTMLElement or null",i);break}t[e]=i;break;case"excludeCountries":case"onlyCountries":{if(i===null)t[e]=i;else{let s=Ct(e,i);s!==!1&&(t[e]=s)}break}case"uiTranslations":if(i&&!q(i)){L("uiTranslations","an object",i);break}t[e]=i;break;case"countryNameOverrides":if(i&&!q(i)){L("countryNameOverrides","an object",i);break}t[e]=i;break;case"initialCountry":{if(typeof i!="string"){L("initialCountry","a string",i);break}let s=i.toLowerCase();if(s&&!k(s)){L("initialCountry","a valid iso2 country code",i);break}t[e]=i;break}case"placeholderNumberType":if(typeof i!="string"||!U.includes(i)){let s=U.join(", ");L("placeholderNumberType",`one of ${s}`,i);break}t[e]=i;break;case"allowedNumberTypes":if(i!==null){if(!Array.isArray(i)){L("allowedNumberTypes","an array of number types or null",i);break}let s=!0;for(let o of i)if(typeof o!="string"||!U.includes(o)){let r=U.join(", ");L("allowedNumberTypes",`an array of valid number types (${r})`,o),s=!1;break}s&&(t[e]=i)}else t[e]=null;break}}return t},bt=n=>{n.initialCountry&&(n.initialCountry=n.initialCountry.toLowerCase()),n.onlyCountries?.length&&(n.onlyCountries=n.onlyCountries.map(t=>t.toLowerCase())),n.excludeCountries?.length&&(n.excludeCountries=n.excludeCountries.map(t=>t.toLowerCase())),n.countryOrder&&(n.countryOrder=n.countryOrder.map(t=>t.toLowerCase()))},Lt=n=>{n.countrySelectorMode===h.AUTO&&(n.countrySelectorMode=zt()),n.dropdownAlwaysOpen&&(n.countrySelectorMode=h.DROPDOWN),n.countrySelectorMode===h.FULLSCREEN?n.matchDropdownWidth=!1:Et()&&(n.matchDropdownWidth=!0),n.onlyCountries?.length===1&&(n.initialCountry=n.onlyCountries[0]),n.separateDialCode&&n.numberDisplayFormat===g.NATIONAL&&(n.numberDisplayFormat=g.INTERNATIONAL),n.countrySelectorMode!==h.OFF&&!n.showFlags&&!n.separateDialCode&&n.numberDisplayFormat===g.NATIONAL&&(n.numberDisplayFormat=g.INTERNATIONAL),n.uiTranslations={...mt,...n.uiTranslations}};var v=n=>n.replace(/\D/g,""),rt=(n="")=>n.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase();var lt=n=>Object.keys(n).filter(t=>!!n[t]).join(" "),f=(n,t,e)=>{let i=document.createElement(n);return t&&Object.entries(t).forEach(([s,o])=>i.setAttribute(s,o)),e&&e.appendChild(i),i};var Qt="http://www.w3.org/2000/svg",V=([n,t,e])=>{let i=document.createElementNS(Qt,n);if(t)for(let s in t)i.setAttribute(s,String(t[s]));if(e)for(let s of e)i.appendChild(V(s));return i},Tt=()=>V(["svg",{class:"iti__search-icon-svg",width:14,height:14,viewBox:"0 0 24 24",focusable:"false",[p.HIDDEN]:"true"},[["circle",{cx:11,cy:11,r:7}],["line",{x1:21,y1:21,x2:16.65,y2:16.65}]]]),Nt=n=>{let t=`iti-${n}-clear-mask`;return V(["svg",{class:"iti__search-clear-svg",width:12,height:12,viewBox:"0 0 16 16",[p.HIDDEN]:"true",focusable:"false"},[["mask",{id:t,maskUnits:"userSpaceOnUse"},[["rect",{width:16,height:16,fill:"white"}],["path",{d:"M5.2 5.2 L10.8 10.8 M10.8 5.2 L5.2 10.8",stroke:"black","stroke-linecap":"round",class:"iti__search-clear-x"}]]],["circle",{cx:8,cy:8,r:8,class:"iti__search-clear-bg",mask:`url(#${t})`}]]])},St=()=>V(["svg",{class:"iti__country-check-svg",width:14,height:14,viewBox:"0 0 16 16",fill:"currentColor",focusable:"false",[p.HIDDEN]:"true"},[["path",{d:"M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z"}]]]),at=()=>V(["svg",{width:256,height:256,viewBox:"0 0 512 512",class:"iti__globe-svg"},[["path",{d:"M508 213a240 240 0 0 0-449-87l-2 5-2 5c-8 14-13 30-17 46a65 65 0 0 1 56 4c16-10 35-19 56-27l9-3c-6 23-10 48-10 74h-16l4 6c3 4 5 8 6 13h6c0 22 3 44 8 65l2 10-25-10-4 5 12 18 9 3 6 2 8 3 9 26 1 2 16-7h1l-5-13-1-2c24 6 49 9 75 10v26l11 10 7 7v-30l1-13c22 0 44-3 65-8l10-2-21 48-1 1a317 317 0 0 1-14 23l-21 5h-2c6 16 7 33 1 50a240 240 0 0 0 211-265m-401-56-11 6c19-44 54-79 98-98-11 20-21 44-29 69-21 6-40 15-58 23m154 182v4c-29-1-57-6-81-13-7-25-12-52-13-81h94zm0-109h-94c1-29 6-56 13-81 24-7 52-12 81-13zm0-112c-22 1-44 4-65 8l-10 2 12-30 9-17 1-2a332 332 0 0 1 13-23c13-4 26-6 40-7zm187 69 6 4c4 12 6 25 6 38v1h-68c-1-26-4-51-10-74l48 20 1 1 14 8zm-14-44 10 20c-20-11-43-21-68-29-8-25-18-49-29-69 37 16 67 44 87 78M279 49h1c13 1 27 3 39 7l14 23 1 2a343 343 0 0 1 12 26l2 5 6 16c-23-6-48-9-74-10h-1zm0 87h1c29 1 56 6 81 13 7 24 12 51 12 80v1h-94zm2 207h-2v-94h95c-1 29-6 56-13 81-24 7-51 12-80 13m86 60-20 10c11-20 21-43 29-68 25-8 48-18 68-29-16 37-43 67-77 87m87-115-7 5-16 9-2 1a337 337 0 0 1-47 21c6-24 9-49 10-75h68c0 13-2 27-6 39"}],["path",{d:"m261 428-2-2-22-21a40 40 0 0 0-32-11h-1a37 37 0 0 0-18 8l-1 1-4 2-2 2-5 4c-9-3-36-31-47-44s-32-45-34-55l3-2a151 151 0 0 0 11-9v-1a39 39 0 0 0 5-48l-3-3-11-19-3-4-5-7h-1l-3-3-4-3-5-2a35 35 0 0 0-16-3h-5c-4 1-14 5-24 11l-4 2-4 3-4 2c-9 8-17 17-18 27a380 380 0 0 0 212 259h3c12 0 25-10 36-21l10-12 6-11a39 39 0 0 0-8-40"}]]]);var ut=n=>rt(n).replace(/[^\p{L}]+/gu," ").trim(),At=n=>{let t=new Map;for(let e of n){let i=ut(e.name),s=i.split(" ").filter(Boolean),o=s.map(r=>r[0]||"").join("");t.set(e.iso2,{normalisedName:i,words:s,initials:o,dialCodePlus:`+${e.dialCode}`})}return t},Ot=(n,t,e)=>{let i=rt(e),s=ut(e),o=i!==""&&s==="",r=[],l=[],a=[],d=[],y=[],C=[],E=[];for(let b of n){let m=t.get(b.iso2);b.iso2===i?r.push(b):!o&&m.normalisedName.startsWith(s)?l.push(b):!o&&m.normalisedName.includes(s)?a.push(b):i===b.dialCode||i===m.dialCodePlus?d.push(b):m.dialCodePlus.includes(i)?y.push(b):m.initials.includes(i)&&C.push(b)}let S=s.split(" ").filter(Boolean);if(S.length>1&&r.length===0&&l.length===0&&a.length===0){let b=new Set([...d.map(m=>m.iso2),...y.map(m=>m.iso2),...C.map(m=>m.iso2)]);for(let m of n){if(b.has(m.iso2))continue;let I=t.get(m.iso2);S.some(R=>I.words.some(M=>M.startsWith(R)))&&E.push(m)}}let N=(b,m)=>b.priority-m.priority;return[...r,...l,...a,...d.sort(N),...y.sort(N),...C,...E]},vt=(n,t,e)=>{let i=ut(e);for(let s of n){let{normalisedName:o}=t.get(s.iso2);if(o.startsWith(i))return s}return null};var F=class n{#t;static toAscii(t){return t?t.replace(/[٠-٩]/g,e=>String.fromCharCode(48+(e.charCodeAt(0)-1632))).replace(/[۰-۹]/g,e=>String.fromCharCode(48+(e.charCodeAt(0)-1776))):""}constructor(t){t&&this.#i(t)}#i(t){/[٠-٩]/.test(t)?this.#t="arabic-indic":/[۰-۹]/.test(t)?this.#t="persian":this.#t="ascii"}denormalise(t){if(!this.#t||this.#t==="ascii")return t;let e=this.#t==="arabic-indic"?1632:1776;return t.replace(/[0-9]/g,i=>String.fromCharCode(e+Number(i)))}normalise(t){return t?(this.#i(t),this.#t==="ascii"?t:n.toAscii(t)):""}isAscii(){return!this.#t||this.#t==="ascii"}};var Rt=typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("anchor-name: --x"),W=class{#t;#i;#T;#E="";#b;#S;#A=null;#w;#H=!1;#e;#s;#p;#a;#y;#n;#O;#c;#h;#r;#u;#f;#N;#j;#l;#C=null;#m=null;#M=new Map;#v=null;#P;telInputEl;hadInitialPlaceholder;constructor(t,e,i){t.dataset[D.INSTANCE_ID]=i.toString(),this.telInputEl=t,this.#t=e,this.#i=i,this.hadInitialPlaceholder=!!t.getAttribute("placeholder"),this.#T=!!this.telInputEl.closest("[dir=rtl]"),this.#E=this.telInputEl.style.paddingLeft}static validateInput(t){let e=t?.tagName;if(!(!!t&&typeof t=="object"&&e==="INPUT"&&typeof t.setAttribute=="function")){let s=Object.prototype.toString.call(t);throw new TypeError(`The first argument must be an HTMLInputElement, not ${s}`)}}#o(t,e){let i=this.#t.classNames[t];return i?`${e} ${i}`:e}buildMarkup(t,e){this.#b=t,this.#S=e,this.telInputEl.classList.add(...this.#o("input","iti__tel-input").split(" ")),this.telInputEl.hasAttribute("type")||this.telInputEl.setAttribute("type","tel"),this.telInputEl.hasAttribute("autocomplete")||this.telInputEl.setAttribute("autocomplete","tel"),this.telInputEl.hasAttribute("inputmode")||this.telInputEl.setAttribute("inputmode","tel");let i=this.#J();this.#Q(i),i.appendChild(this.telInputEl),this.#et(),this.#nt(),this.#it(i),this.ensureDropdownWidthSet()}#J(){let{countrySelectorMode:t,showFlags:e,containerClass:i}=this.#t,s=lt({iti:!0,"iti--input-container":!0,"iti--has-country-selector":t!==h.OFF,"iti--show-flags":e,"iti--inline-country-selector":t!==h.FULLSCREEN,[i]:!!i}),o=f("div",{class:this.#o("container",s)});return this.#T&&o.setAttribute("dir","ltr"),this.telInputEl.before(o),o}#Q(t){let{countrySelectorMode:e,separateDialCode:i,showFlags:s}=this.#t,o=e!==h.OFF;if(!o&&!s&&!i)return;this.#e=f("div",{class:this.#o("countryContainer",`iti__country-container ${c.V_HIDE}`)},t),o?(this.#s=f("button",{type:"button",class:this.#o("selectedCountry","iti__selected-country"),[p.EXPANDED]:"false",[p.LABEL]:this.#t.uiTranslations.noCountrySelected,[p.HASPOPUP]:"dialog",[p.CONTROLS]:`iti-${this.#i}__country-selector`},this.#e),this.telInputEl.disabled&&this.#s.setAttribute("disabled","true")):this.#s=f("div",{class:this.#o("selectedCountry","iti__selected-country")},this.#e);let r=f("div",{class:this.#o("selectedCountryPrimary","iti__selected-country-primary")},this.#s);this.#p=f("div",{class:this.#o("selectedFlag",c.FLAG)},r),o&&(this.#y=f("div",{class:this.#o("arrow","iti__arrow"),[p.HIDDEN]:"true"},r)),i&&(this.#a=f("div",{class:this.#o("selectedDialCode","iti__selected-dial-code")},this.#s)),o&&this.#Z()}ensureDropdownWidthSet(){let{matchDropdownWidth:t,countrySelectorMode:e}=this.#t;if(e===h.OFF||!t||this.#n.style.width)return;let i=this.telInputEl.offsetWidth;i>0&&(this.#n.style.width=`${i}px`)}#Z(){let{matchDropdownWidth:t,countrySelectorMode:e,countrySearch:i,uiTranslations:s,containerClass:o}=this.#t,r=e===h.FULLSCREEN,l=this.#V(),a=t?"":"iti--flexible-dropdown-width";if(this.#n=f("div",{id:`iti-${this.#i}__country-selector`,class:this.#o("countrySelector",`iti__country-selector ${c.HIDE} ${a}`),role:"dialog",[p.MODAL]:"true"}),this.#T&&this.#n.setAttribute("dir","rtl"),i&&this.#tt(),this.#r=f("ul",{class:this.#o("countryList","iti__country-list"),id:`iti-${this.#i}__country-listbox`,role:"listbox",[p.LABEL]:s.countryListAriaLabel},this.#n),this.#st(),i&&this.#Y(),l){let d=lt({iti:!0,"iti--detached-country-selector":!0,"iti--fullscreen-popup":r,"iti--inline-country-selector":!r,[o]:!!o});this.#l=f("div",{class:this.#o("countrySelectorContainer",d)}),this.#l.appendChild(this.#n)}else this.#e.appendChild(this.#n)}#V(){let{countrySelectorMode:t,dropdownParent:e}=this.#t;return t===h.FULLSCREEN?document.body:t===h.DROPDOWN?e:null}#tt(){let{uiTranslations:t,searchInputClass:e}=this.#t,i=f("div",{class:this.#o("searchWrapper","iti__search-input-wrapper")},this.#n);this.#O=f("span",{class:this.#o("searchIcon","iti__search-icon"),[p.HIDDEN]:"true"},i),this.#O.appendChild(Tt()),this.#c=f("input",{id:`iti-${this.#i}__search-input`,type:"search",class:this.#o("searchInput",`iti__search-input ${e}`),placeholder:t.searchPlaceholder,role:"combobox",[p.EXPANDED]:"true",[p.LABEL]:t.searchPlaceholder,[p.CONTROLS]:`iti-${this.#i}__country-listbox`,[p.AUTOCOMPLETE]:"list",autocomplete:"off"},i),this.#h=f("button",{type:"button",class:this.#o("searchClear",`iti__search-clear ${c.HIDE}`),[p.LABEL]:t.clearSearchAriaLabel,tabindex:"-1"},i),this.#h.appendChild(Nt(this.#i)),this.#j=f("span",{class:"iti__a11y-text"},this.#n),this.#N=f("div",{class:this.#o("noResults",`iti__no-results ${c.HIDE}`),[p.HIDDEN]:"true"},this.#n),this.#N.textContent=t.searchEmptyState??null}#et(){this.#e&&(this.#U(),this.#e.classList.remove(c.V_HIDE))}#it(t){let{hiddenInputs:e}=this.#t;if(!e)return;let i=this.telInputEl.getAttribute("name")||"",s=e(i);if(s.phone){let o=this.telInputEl.form?.querySelector(`input[name="${s.phone}"]`);o?this.#u=o:(this.#u=f("input",{type:"hidden",name:s.phone}),t.appendChild(this.#u))}if(s.country){let o=this.telInputEl.form?.querySelector(`input[name="${s.country}"]`);o?this.#f=o:(this.#f=f("input",{type:"hidden",name:s.country}),t.appendChild(this.#f))}}#st(){let t=document.createDocumentFragment(),e=this.#o("countryListItem",c.COUNTRY_ITEM);for(let i=0;i<this.#b.length;i++){let s=this.#b[i],o=f("li",{id:`iti-${this.#i}__item-${s.iso2}`,class:e,tabindex:"-1",role:"option",[p.SELECTED]:"false"});o.dataset[D.DIAL_CODE]=s.dialCode,o.dataset[D.ISO2]=s.iso2,this.#M.set(s.iso2,o),this.#t.showFlags&&f("div",{class:this.#o("countryListItemFlag",`${c.FLAG} iti__${s.iso2}`)},o);let r=f("span",{class:this.#o("countryName","iti__country-name")},o);r.textContent=`${s.name} `;let l=f("span",{class:this.#o("dialCode","iti__dial-code")},r);this.#T&&l.setAttribute("dir","ltr"),l.textContent=`(+${s.dialCode})`,t.appendChild(o)}this.#r.appendChild(t)}#U(){if(this.#s){let t=this.#t.separateDialCode?O.FALLBACK_SELECTED_COUNTRY_WITH_DIAL_WIDTH:O.FALLBACK_SELECTED_COUNTRY_NO_DIAL_WIDTH,i=(this.#s.offsetWidth||this.#ot()||t)+O.INPUT_PADDING_EXTRA_LEFT;this.telInputEl.style.paddingLeft=`${i}px`}}#nt(){!this.#s||typeof ResizeObserver>"u"||(this.#P=new ResizeObserver(()=>{this.#s?.offsetWidth&&this.#U()}),this.#P.observe(this.#s))}#ot(){if(!this.telInputEl.parentNode)return 0;let t=document.body,e=this.telInputEl.parentNode.cloneNode(!1);e.style.visibility="hidden",t.appendChild(e);let i=this.#e.cloneNode();e.appendChild(i);let s=this.#s.cloneNode(!0);i.appendChild(s);let o=s.offsetWidth;return t.removeChild(e),o}#rt(){if(this.#w!==void 0)return;let{countrySearch:t,matchDropdownWidth:e}=this.#t,{height:i,width:s}=this.#x();this.#w=i,t&&(this.#n.style.height=`${i}px`,!e&&s>0&&(this.#n.style.width=`${s}px`))}#x(){let t=document.body,e=this.#n,i=e.parentNode,s=e.nextSibling;e.classList.remove(c.HIDE);let o=f("div",{class:"iti iti--inline-country-selector"});o.appendChild(e),o.style.visibility="hidden",t.appendChild(o);let r=e.offsetHeight,l=e.offsetWidth;return t.removeChild(o),e.classList.add(c.HIDE),i&&i.insertBefore(e,s),{height:r>0?r:O.FALLBACK_DROPDOWN_HEIGHT,width:l}}#Y(){let{uiTranslations:t}=this.#t,e=this.#r.childElementCount;this.#j.textContent=t.searchSummaryAria(e)}#G(t){let e;if(t==="")e=this.#b;else{let i=F.toAscii(t);e=Ot(this.#b,this.#S,i)}this.#L(e)}prefillSearchWithPlus(){this.#c.value="+",this.#c.focus(),this.#G("")}#d(){let t=this.#c.value.trim();this.#G(t),this.#c.value?this.#h.classList.remove(c.HIDE):this.#h.classList.add(c.HIDE)}#R(){this.#A&&clearTimeout(this.#A),this.#A=setTimeout(()=>{this.#d(),this.#A=null},st.SEARCH_DEBOUNCE_MS)}#F(){this.#c.value="",this.#c.focus(),this.#d()}#K(t){let e=this.#r,i=e.getBoundingClientRect(),s=t.getBoundingClientRect(),o=s.top-i.top+e.scrollTop;s.top<i.top?e.scrollTop=o:s.bottom>i.bottom&&(e.scrollTop=o-i.height+s.height)}#g(t,e=!0){if(this.#m?.classList.remove(c.HIGHLIGHT),t){if(t.classList.add(c.HIGHLIGHT),this.#t.countrySearch){let i=t.getAttribute("id")||"";this.#c.setAttribute(p.ACTIVE_DESCENDANT,i)}e&&this.#K(t),this.#m=t}else this.#m=null}bindHiddenInputSubmitListener(t,e,i){let s=this.telInputEl.form;!s||!this.#u&&!this.#f||s.addEventListener("submit",()=>{this.#u&&(this.#u.value=e()),this.#f&&(this.#f.value=i())},{signal:t})}bindAllInitialCountrySelectorListeners(t,e,i){let s=this.telInputEl.closest("label");s&&s.addEventListener("click",o=>{this.isCountrySelectorOpen()?o.preventDefault():this.telInputEl.focus()},{signal:t}),this.#s.addEventListener("click",()=>{!this.isCountrySelectorOpen()&&!this.telInputEl.disabled&&!this.telInputEl.readOnly&&e()},{signal:t}),this.#e.addEventListener("keydown",o=>{let r=[T.ARROW_UP,T.ARROW_DOWN,T.SPACE,T.ENTER];!this.isCountrySelectorOpen()&&r.includes(o.key)&&(o.preventDefault(),o.stopPropagation(),e()),o.key===T.TAB&&i()},{signal:t})}openCountrySelector(t,e){let{countrySearch:i,dropdownAlwaysOpen:s}=this.#t;if(this.#v=new AbortController,this.#t.countrySelectorMode!==h.FULLSCREEN&&this.#rt(),this.ensureDropdownWidthSet(),this.#l)this.#k();else{let r=this.#$(),l=this.telInputEl.offsetHeight+O.DROPDOWN_MARGIN;r?this.#n.style.top=`${l}px`:this.#n.style.bottom=`${l}px`}this.#n.classList.remove(c.HIDE),this.#s.setAttribute(p.EXPANDED,"true");let o=this.#C??this.#r.firstElementChild;o&&this.#g(o),i&&!s&&this.#c.focus(),this.#t.countrySelectorMode===h.FULLSCREEN&&this.#l&&window.visualViewport&&window.visualViewport.addEventListener("resize",()=>{this.#ut(),this.#m&&this.#K(this.#m)},{signal:this.#v.signal}),this.#y.classList.add(c.ARROW_UP),this.#lt(t,e)}#lt(t,e){let i=this.#v.signal;this.#I(i),this.#z(i,t),this.#t.dropdownAlwaysOpen||this.#W(i,e),this.#at(i,t,e),this.#t.countrySearch&&this.#_(i),this.#t.countrySelectorMode===h.DROPDOWN&&this.#t.dropdownParent&&!Rt&&document.addEventListener("scroll",e,{signal:i,capture:!0,passive:!0})}#I(t){this.#r.addEventListener("mouseover",e=>{let i=e.target?.closest(`.${c.COUNTRY_ITEM}`);i&&this.#g(i,!1)},{signal:t})}#z(t,e){this.#r.addEventListener("click",i=>{let s=i.target?.closest(`.${c.COUNTRY_ITEM}`);s&&e(s)},{signal:t})}#W(t,e){setTimeout(()=>{document.documentElement.addEventListener("click",i=>{this.#n.contains(i.target)||e()},{signal:t})},0)}#at(t,e,i){let s="",o=null,r=l=>{[T.ARROW_UP,T.ARROW_DOWN,T.ENTER,T.ESC].includes(l.key)&&(l.preventDefault(),l.stopPropagation(),l.key===T.ARROW_UP||l.key===T.ARROW_DOWN?this.#D(l.key):l.key===T.ENTER&&!l.isComposing?e(this.#m):l.key===T.ESC&&(i(),this.#s.focus())),!this.#t.countrySearch&&_.HIDDEN_SEARCH_CHAR.test(l.key)&&(l.stopPropagation(),o&&clearTimeout(o),s+=l.key.toLowerCase(),this.#X(s),o=setTimeout(()=>{s=""},st.HIDDEN_SEARCH_RESET_MS))};this.#s?.addEventListener("keydown",r,{signal:t}),this.#n?.addEventListener("keydown",r,{signal:t})}#_(t){this.#c.addEventListener("input",()=>this.#R(),{signal:t}),this.#h.addEventListener("click",()=>this.#F(),{signal:t})}#X(t){let e=vt(this.#b,this.#S,t);if(e){let i=this.#M.get(e.iso2);this.#g(i)}}#D(t){let e=t===T.ARROW_UP?this.#m?.previousElementSibling:this.#m?.nextElementSibling;!e&&this.#r.childElementCount>1&&(e=t===T.ARROW_UP?this.#r.lastElementChild:this.#r.firstElementChild),e&&this.#g(e)}#B(t){if(this.#C&&this.#C.dataset[D.ISO2]!==t&&(this.#C.setAttribute(p.SELECTED,"false"),this.#C.querySelector(".iti__country-check")?.remove(),this.#C=null),t&&!this.#C){let e=this.#r.querySelector(`[data-iso2="${t}"]`);e&&(e.setAttribute(p.SELECTED,"true"),f("span",{class:this.#o("countryCheck","iti__country-check"),[p.HIDDEN]:"true"},e).appendChild(St()),this.#C=e,this.#t.dropdownAlwaysOpen&&this.#g(e))}}#L(t){this.#r.replaceChildren();let e=!0;for(let i of t){let s=this.#M.get(i.iso2);s&&(this.#r.appendChild(s),e&&(this.#g(s,!1),e=!1))}e?(this.#g(null),this.#N&&this.#N.classList.remove(c.HIDE)):this.#N&&this.#N.classList.add(c.HIDE),this.#r.scrollTop=0,this.#Y()}closeCountrySelector(){let{countrySearch:t}=this.#t;this.#v.abort(),this.#v=null,this.#n.classList.add(c.HIDE),this.#s.setAttribute(p.EXPANDED,"false"),t&&(this.#c.removeAttribute(p.ACTIVE_DESCENDANT),this.#c.value="",this.#d(),this.#m&&(this.#m.classList.remove(c.HIGHLIGHT),this.#m=null)),this.#y.classList.remove(c.ARROW_UP),this.#l?(this.#l.remove(),this.#l.style.top="",this.#l.style.bottom="",this.#l.style.paddingLeft="",this.#l.style.paddingRight=""):(this.#n.style.top="",this.#n.style.bottom="")}#$(){if(this.#t.dropdownAlwaysOpen)return!0;let t=this.telInputEl.getBoundingClientRect(),e=t.top,i=window.innerHeight-t.bottom;return i>=this.#w||i>=e}#k(){let t=this.#t.countrySelectorMode===h.FULLSCREEN,e=this.#V();if(t){if(window.innerWidth>=O.NARROW_VIEWPORT_WIDTH){let i=this.telInputEl.getBoundingClientRect();this.#l.style.paddingLeft=`${i.left}px`,this.#l.style.paddingRight=`${window.innerWidth-i.right}px`}}else this.#q();if(!t&&!Rt){let i=this.telInputEl.getBoundingClientRect();this.#l.style.left=`${i.left}px`,this.#$()?this.#l.style.top=`${i.bottom+O.DROPDOWN_MARGIN}px`:(this.#l.style.top="unset",this.#l.style.bottom=`${window.innerHeight-i.top+O.DROPDOWN_MARGIN}px`)}e.appendChild(this.#l)}#q(){if(this.#H)return;this.#H=!0;let t=`--iti-anchor-${this.#i}`,e=getComputedStyle(this.telInputEl).anchorName;this.telInputEl.style.anchorName=e&&e!=="none"?`${e}, ${t}`:t,this.#l.style.positionAnchor=t}#ut(){let t=window.visualViewport;if(!t||!this.#l)return;let e=window.innerHeight-t.height;this.#l.style.bottom=`${e}px`}isCountrySelectorOpen(){return!this.#n.classList.contains(c.HIDE)}setLoading(t){this.#p.classList.toggle(c.LOADING,t)}playStrictRejectAnimation(){if(!this.#t.strictRejectAnimation)return;let t=this.telInputEl.parentElement;t&&(t.classList.remove(c.STRICT_REJECT_ANIMATION),t.offsetWidth,t.classList.add(c.STRICT_REJECT_ANIMATION),t.addEventListener("animationend",()=>t.classList.remove(c.STRICT_REJECT_ANIMATION),{once:!0}))}isLoading(){return this.#p.classList.contains(c.LOADING)}setDisabled(t){this.telInputEl.disabled=t,this.#s&&(t?this.#s.setAttribute("disabled","true"):this.#s.removeAttribute("disabled"))}setReadonly(t){this.telInputEl.readOnly=t,this.#s&&(t?this.#s.setAttribute("disabled","true"):this.#s.removeAttribute("disabled"))}setSelectedCountry(t){let{countrySelectorMode:e,showFlags:i,separateDialCode:s,uiTranslations:o}=this.#t,r=t?.name,l=t?.dialCode,a=t?.iso2??"";if(e!==h.OFF&&this.#B(a),this.#s){let d=this.#o("selectedFlag",a&&i?`${c.FLAG} iti__${a}`:`${c.FLAG} ${c.GLOBE}`),y,C,E=null;a?(C=r,y=o.selectedCountryAriaLabel.replace("${countryName}",r).replace("${dialCode}",`+${l}`),i||(E=at())):(C=o.noCountrySelected,y=o.noCountrySelected,E=at()),this.#p.className=d,this.#s.setAttribute("title",C),this.#s.setAttribute(p.LABEL,y),E?this.#p.replaceChildren(E):this.#p.replaceChildren()}if(s){let d=l?`+${l}`:"";this.#a.textContent=d,this.#U()}}destroy(){this.telInputEl.iti=void 0,delete this.telInputEl.dataset[D.INSTANCE_ID],this.#P?.disconnect(),this.telInputEl.style.paddingLeft=this.#E;let t=this.telInputEl.parentNode;t&&(t.before(this.telInputEl),t.remove()),this.#M.clear()}};var _t=n=>{let{onlyCountries:t,excludeCountries:e}=n;return t?.length?H.filter(i=>t.includes(i.iso2)):e?.length?H.filter(i=>!e.includes(i.iso2)):[...H]},Dt=(n,t)=>{let{countryNameLocale:e,countryNameOverrides:i,uiTranslations:s}=t,o=s?.countryNames,r;try{typeof Intl<"u"&&typeof Intl.DisplayNames=="function"?r=new Intl.DisplayNames(e,{type:"region"}):r=null}catch(l){console.error(l),r=null}for(let l of n)l.name=i[l.iso2]||o?.[l.iso2]||r?.of(l.iso2.toUpperCase())||""},wt=n=>{let t=new Set,e=0,i={},s=(r,l)=>{if(!r||!l)return;l.length>e&&(e=l.length),Object.hasOwn(i,l)||(i[l]=[]);let a=i[l];a.includes(r)||a.push(r)},o=[...n].sort((r,l)=>r.priority-l.priority);for(let r of o){t.has(r.dialCode)||t.add(r.dialCode);for(let l=1;l<r.dialCode.length;l++){let a=r.dialCode.substring(0,l);s(r.iso2,a)}if(s(r.iso2,r.dialCode),r.areaCodes){let l=i[r.dialCode][0];for(let a of r.areaCodes){for(let d=1;d<a.length;d++){let y=a.substring(0,d),C=r.dialCode+y;s(l,C),s(r.iso2,C)}s(r.iso2,r.dialCode+a)}}}return{dialCodes:t,dialCodeMaxLength:e,dialCodeToIso2Map:i}},Mt=(n,t)=>{let{countryOrder:e}=t;n.sort((i,s)=>{if(e){let o=e.indexOf(i.iso2),r=e.indexOf(s.iso2),l=o>-1,a=r>-1;if(l||a)return l&&a?o-r:l?-1:1}return i.name.localeCompare(s.name)})};var Zt=new Set(["800","808","870","881","882","883","888","979"]),ct=n=>{let t=v(n).slice(0,3);return n.startsWith("+")&&Zt.has(t)};var ht=(n,t,e,i)=>{if(!e||!t)return n;let s=`+${i.dialCode}`,o=n[s.length]===" "||n[s.length]==="-"?s.length+1:s.length;return n.substring(o)},Pt=(n,t,e,i,s)=>{let o=e?e.formatNumberAsYouType(n,i?.iso2):n,r=i?.dialCode;return s&&t.charAt(0)!=="+"&&o.includes(`+${r}`)?(o.split(`+${r}`)[1]||"").trim():o};var xt=(n,t,e,i)=>{if(e===0&&!i)return 0;let s=0;for(let o=0;o<t.length;o++){if(/[+0-9]/.test(t[o])&&s++,s===n&&!i)return o+1;if(i&&s===n+1)return o}return t.length};var te=new Set(["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"]),dt=n=>{let t=v(n);if(t.startsWith(Y.NANP)&&t.length>=4){let e=t.substring(1,4);return te.has(e)}return!1};var ee=0,B=n=>{if(!u.utils)throw new Error(`intlTelInput.utils is required for ${n}(). See: https://intl-tel-input.com/docs/utils`)},kt=()=>{let n,t;return{promise:new Promise((i,s)=>{n=i,t=s}),resolve:n,reject:t}},$=class n{id;promise;#t;#i;#T;#E;#b;#S;#A;#w;#H;#e=null;#s=null;#p;#a=!0;#y;#n;#O=!1;#c=null;#h;#r;constructor(t,e={}){this.id=ee++,W.validateInput(t);let i=It(e);this.#i={...J,...i},bt(this.#i),Lt(this.#i),this.#t=new W(t,this.#i,this.id),this.#T=typeof navigator<"u"&&/Android/i.test(navigator.userAgent),this.#n=new F(t.value),this.promise=this.#N(this.#i),this.#E=_t(this.#i);let{dialCodes:s,dialCodeMaxLength:o,dialCodeToIso2Map:r}=wt(this.#E);this.#A=s,this.#b=o,this.#S=r,this.#w=new Map(this.#E.map(l=>[l.iso2,l])),this.#j()}#u(){let t=this.#t.telInputEl.value.trim();return this.#n.normalise(t)}#f(t){this.#t.telInputEl.value=this.#n.denormalise(t)}#N(t){let{initialCountry:e,initialCountryLookup:i,loadUtils:s}=t,o=!e&&!!i,r=!!s&&!u.utils;return o&&(this.#h=kt()),r&&(this.#r=kt()),Promise.all([this.#h?.promise,this.#r?.promise]).then(()=>{})}#j(){this.#y=new AbortController,this.#l(),this.#t.buildMarkup(this.#E,this.#H),this.#C(),this.#m(),this.#M(),this.#i.dropdownAlwaysOpen&&this.openCountrySelector()}#l(){Dt(this.#E,this.#i),Mt(this.#E,this.#i),this.#H=At(this.#E)}#C(t=!1){let e=this.#t.telInputEl.getAttribute("value"),i=this.#n.normalise(e??""),s=this.#u(),r=i&&i.startsWith("+")&&(!s||!s.startsWith("+"))?i:s,l=this.#D(r),a=dt(r),{initialCountry:d,initialCountryLookup:y}=this.#i,C=!d&&!!y,E=C&&u.autoCountry?u.autoCountry:d,S=C&&!t&&!u.autoCountry,N=k(E);l?a?N?this.#I(E):S||this.#I(ft.ISO2):(N&&this.#I(E),this.#F(r)):N?this.#I(E):S||this.#I(""),r&&this.#R(r)}#m(){this.#J(),this.#i.countrySelectorMode!==h.OFF&&this.#t.bindAllInitialCountrySelectorListeners(this.#y.signal,()=>this.openCountrySelector(),()=>this.#_()),this.#t.bindHiddenInputSubmitListener(this.#y.signal,()=>this.getNumber(),()=>this.#e?.iso2||"")}#M(){if(this.#r){let{loadUtils:t}=this.#i,e=()=>{u.attachUtils(t).catch(()=>{})};u.documentReady()?e():window.addEventListener("load",e,{signal:this.#y.signal})}this.#h&&(this.#e?this.#h.resolve():this.#v())}async#v(){if(u.autoCountry){this.#q();return}if(this.#t.setLoading(!0),!u.startedLoadingAutoCountry&&(u.startedLoadingAutoCountry=!0,typeof this.#i.initialCountryLookup=="function")){let t;try{let e=await Promise.race([this.#i.initialCountryLookup(),new Promise((s,o)=>{t=setTimeout(()=>o(new Error("intl-tel-input: initialCountryLookup timed out after 10s")),1e4)})]),i=typeof e=="string"?e.toLowerCase():"";if(!k(i)){u.startedLoadingAutoCountry=!1,n.forEachInstance("handleAutoCountryFailure");return}u.autoCountry=i,setTimeout(()=>n.forEachInstance("handleAutoCountryLoaded"))}catch{u.startedLoadingAutoCountry=!1,n.forEachInstance("handleAutoCountryFailure")}finally{t!==void 0&&clearTimeout(t)}}}#P(){this.openCountrySelector(),this.#t.prefillSearchWithPlus()}#o(t){let e=this.#t.telInputEl.selectionStart||0,i=t.substring(0,e-1),s=t.substring(e);return this.#f(i+s),e-1}#J(){this.#et(),this.#st(),this.#nt()}#Q(t){this.#o(t),this.#P()}#Z(t,e){let i=this.#o(t);this.#t.telInputEl.setSelectionRange(i,i),this.#t.playStrictRejectAnimation(),this.#d(A.STRICT_REJECT,{source:"key",rejectedInput:e,reason:"invalid"})}#V(t,e){let i=this.#t.telInputEl.selectionStart||0,o=t.substring(0,i).replace(_.NON_PLUS_NUMERIC_GLOBAL,"").length,r=this.#L(),l=Pt(r,t,u.utils,this.#e,this.#i.separateDialCode),a=xt(o,l,i,e);this.#f(l),this.#t.telInputEl.setSelectionRange(a,a)}#tt(t){if(t.startsWith("+")&&this.#e&&this.#D(t)){let e=ht(t,!0,!0,this.#e);this.#f(e)}}#et(){this.#O=_.ALPHA_UNICODE.test(this.#u()),this.#t.telInputEl.addEventListener("input",this.#it,{signal:this.#y.signal})}#it=t=>{let{strictMode:e,formatAsYouType:i,separateDialCode:s,countrySelectorMode:o,countrySearch:r}=this.#i,l=t?.detail;if(l?.isCountryChange)return;let a=this.#u(),d=t?.inputType===it.PASTE,y=e&&d;if(this.#T&&!d&&t?.data==="+"&&s&&o!==h.OFF&&r){this.#Q(a);return}if(this.#T&&!d&&e&&(t?.data===" "||t?.data==="-"||t?.data===".")){this.#Z(a,t.data);return}if(y){if(this.#rt())return;a=this.#u()}this.#F(a)&&(this.#k(),this.#d(A.INPUT,{isCountryChange:!0})),!y&&t?.data&&_.NON_PLUS_NUMERIC.test(t.data)||d&&a&&!e?this.#O=!0:_.NON_PLUS_NUMERIC.test(a)||(this.#O=!1),i&&!this.#O&&!l?.isSetNumber&&this.#n.isAscii()&&this.#V(a,t?.inputType===it.DELETE_FORWARD),s&&this.#tt(a)};#st(){let{strictMode:t,separateDialCode:e}=this.#i;!t&&!e||this.#t.telInputEl.addEventListener("keydown",this.#U,{signal:this.#y.signal})}#U=t=>{let{strictMode:e,separateDialCode:i,countrySelectorMode:s,countrySearch:o}=this.#i;if(!t.key||t.key.length!==1||t.altKey||t.ctrlKey||t.metaKey)return;if(i&&s!==h.OFF&&o&&t.key==="+"){t.preventDefault(),this.#P();return}if(!e)return;let r=this.#u(),a=!r.startsWith("+")&&this.#t.telInputEl.selectionStart===0&&t.key==="+",d=this.#n.normalise(t.key),y=/^[0-9]$/.test(d),C=i?y:a||y,E=this.#t.telInputEl,S=E.selectionStart,N=E.selectionEnd,b=r.slice(0,S??void 0),m=r.slice(N??void 0),I=b+d+m,R=this.#B(I),M=v(R).length>nt;!M&&u.utils&&this.#s&&(M=u.utils.getCoreNumber(R,this.#e?.iso2).length>this.#s);let x=this.#g(R)!==null;(!C||M&&!x&&!a)&&(this.#t.playStrictRejectAnimation(),this.#d(A.STRICT_REJECT,{source:"key",rejectedInput:t.key,reason:C?"max-length":"invalid"}),t.preventDefault())};#nt(){this.#i.strictMode&&this.#t.telInputEl.addEventListener("paste",this.#ot,{signal:this.#y.signal})}#ot=t=>{let e=this.#t.telInputEl,i=this.#u();this.#c={pastedRaw:t.clipboardData?.getData("text")??"",value:i,selectionStart:e.selectionStart??i.length,selectionEnd:e.selectionEnd??i.length}};#rt(){let t=this.#t.telInputEl,e=this.#c;if(this.#c=null,!e)return!1;let i=e.pastedRaw,s=e.value,o=e.selectionStart,r=e.selectionEnd,l=s.slice(0,o),a=s.slice(r),d=this.#e?.iso2,y=this.#n.normalise(i),C=o===0&&r>0,E=!s.startsWith("+")||C,S=y.replace(_.NON_PLUS_NUMERIC_GLOBAL,""),N=S.startsWith("+"),b=S.replace(/\+/g,""),m=N&&E?`+${b}`:b,I=l+m+a,R=m!==y?"invalid":null;if(I.length>30)return this.#x(e),!0;let M=v(this.#B(I)).length-nt;if(M>0){if(r!==s.length)return this.#x(e),!0;I=I.slice(0,I.length-M),R="max-length"}if(this.#s&&I.length>5&&u.utils){let x=u.utils.getCoreNumber(I,d);for(;x.length===0&&I.length>0;)I=I.slice(0,-1),x=u.utils.getCoreNumber(I,d);if(!x)return this.#x(e),!0;if(x.length>this.#s)if(r===s.length){let pt=x.length-this.#s;I=I.slice(0,I.length-pt),R="max-length"}else return this.#x(e),!0}this.#f(I);let Q=o+m.length;return t.setSelectionRange(Q,Q),R&&(y.length>0&&m.length===0&&this.#t.playStrictRejectAnimation(),this.#d(A.STRICT_REJECT,{source:"paste",rejectedInput:i,reason:R})),!1}#x(t){this.#t.playStrictRejectAnimation(),this.#d(A.STRICT_REJECT,{source:"paste",rejectedInput:t.pastedRaw,reason:"max-length"}),this.#Y(t)}#Y(t){this.#f(t.value),this.#t.telInputEl.setSelectionRange(t.selectionStart,t.selectionEnd)}#G(t){let e=Number(this.#t.telInputEl.getAttribute("maxlength"));return e&&t.length>e?t.substring(0,e):t}#d(t,e={}){let i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:e});this.#t.telInputEl.dispatchEvent(i)}openCountrySelector(){this.#t.isCountrySelectorOpen()||(this.#t.openCountrySelector(t=>this.#at(t),()=>this.#_()),this.#d(A.OPEN_COUNTRY_SELECTOR))}#R(t){let{numberDisplayFormat:e,separateDialCode:i}=this.#i,s=t;if(u.utils&&this.#e){let o=ct(t),r=!s.startsWith("+")&&!i,l=e===g.NATIONAL&&!o||r,a;l?a=g.NATIONAL:e===g.E164&&!o?a=g.E164:a=g.INTERNATIONAL,s=u.utils.formatNumber(s,this.#e?.iso2,a)}s=this.#$(s),this.#f(s)}#F(t){let e=this.#g(t);return e!==null?this.#I(e):!1}#K(t){let e=this.#e?.dialCode,i=this.#e?.nationalPrefix;if(t.startsWith("+")||!e)return t;let r=i&&t.startsWith(i)&&!this.#i.separateDialCode?t.substring(1):t;return`+${e}${r}`}#g(t){let e=t.indexOf("+"),i=e>0?t.substring(e):t,s=this.#e?.iso2;i=this.#K(i);let o=this.#D(i,!0),r=v(i);if(o){let l=v(o),a=this.#S[l];return a.length===1?a[0]===s?null:a[0]:this.#lt(a,l,r)}else if(i.startsWith("+")&&r.length){let l=this.#e?.dialCode||"";return l&&l.startsWith(r)||!s?null:""}else if((!i||i==="+")&&!s&&this.#p)return this.#p;return null}#lt(t,e,i){let s=this.#e?.iso2,o=this.#e?.dialCode;if(!s&&this.#p&&t.includes(this.#p))return this.#p;if(o===Y.NANP&&dt(i))return null;let l=this.#e?.areaCodes,a=this.#e?.priority;if(l){let S=l.map(N=>`${o}${N}`);for(let N of S)if(i.startsWith(N))return null}let y=l&&!(a===0)&&i.length>e.length,C=s&&t.includes(s)&&!y,E=s===t[0];return!C&&!E?t[0]:null}#I(t){let e=this.#e?.iso2||"";return this.#e=t?this.#w.get(t):null,this.#e&&(this.#p=this.#e.iso2),this.#t.setSelectedCountry(this.#e),this.#W(),this.#z(),e!==t}#z(){let{strictMode:t,placeholderNumberType:e,allowedNumberTypes:i}=this.#i;if(!t||!u.utils)return;let s=this.#e?.iso2;if(!s){this.#s=null;return}let o=u.utils.getExampleNumber(s,e,g.E164),r=o;for(;u.utils.isValidNumber(o,s,i);)r=o,o+="0";let l=u.utils.getCoreNumber(r,s);this.#s=l.length,s==="by"&&(this.#s=l.length+1)}#W(){let{placeholderNumberPolicy:t,placeholderNumberType:e,numberDisplayFormat:i,customPlaceholder:s}=this.#i,o=t===w.AGGRESSIVE||!this.#t.hadInitialPlaceholder&&t===w.POLITE;if(!u.utils||!o)return;let r=this.#e?u.utils.getExampleNumber(this.#e.iso2,e,i):"";r=this.#$(r),typeof s=="function"&&(r=s(r,this.#e)),this.#t.telInputEl.setAttribute("placeholder",r)}#at(t){if(!t)return;let e=t.dataset[D.ISO2],i=this.#I(e);this.#_();let s=t.dataset[D.DIAL_CODE];this.#X(s);let o=this.#u();this.#R(o),this.#t.telInputEl.focus(),i&&(this.#k(),this.#d(A.INPUT,{isCountryChange:!0}))}closeCountrySelector(){this.#_()}#_(t){!this.#t.isCountrySelectorOpen()||this.#i.dropdownAlwaysOpen&&!t||(this.#t.closeCountrySelector(),this.#d(A.CLOSE_COUNTRY_SELECTOR))}#X(t){let e=this.#u();if(!e.startsWith("+"))return;let i=`+${t}`,s=this.#D(e),o;s?o=e.replace(s,i):o=i,this.#f(o)}#D(t,e){if(!t.startsWith("+"))return"";let i="",s="",o=!1;for(let r=0;r<t.length;r++){let l=t.charAt(r);if(!/[0-9]/.test(l))continue;if(s+=l,!!!this.#S[s])break;if(this.#A.has(s)){if(i=t.substring(0,r+1),o=!0,!e)break}else e&&o&&(i=t.substring(0,r+1));if(s.length===this.#b)break}return i}#B(t){let e=this.#e?.dialCode,i=v(t);return(this.#i.separateDialCode&&!t.startsWith("+")&&e&&i?`+${e}`:"")+t}#L(){let t=this.#u();return this.#B(t)}#$(t){let e=!!this.#D(t),i=ht(t,e,this.#i.separateDialCode,this.#e);return this.#G(i)}#k(){this.#d(A.COUNTRY_CHANGE,this.#e??null)}#q(){if(!this.#h||!u.autoCountry)return;if(!this.#a){this.#h.resolve();return}let t=document.activeElement===this.#t.telInputEl,e=!!this.#u();this.#t.isLoading()&&!(t&&e)?this.setSelectedCountry(u.autoCountry):this.#p=u.autoCountry,this.#t.setLoading(!1),this.#h.resolve()}#ut(){if(!this.#a){this.#h?.reject();return}this.#t.isLoading()&&this.#C(!0),this.#t.setLoading(!1),this.#h?.reject()}#ht(){if(!this.#a){this.#r?.resolve();return}if(!u.utils){this.#r?.resolve();return}let t=this.#u(),e=document.activeElement===this.#t.telInputEl;t&&!e&&this.#R(t),this.#e&&(this.#W(),this.#z()),this.#r?.resolve()}#dt(t){if(!this.#a){this.#r?.reject(t);return}this.#r?.reject(t)}destroy(){this.#a&&(this.#a=!1,this.#i.countrySelectorMode!==h.OFF&&this.#_(!0),this.#y.abort(),this.#t.destroy(),u.instances.delete(String(this.id)))}isActive(){return this.#a}getExtension(){return this.#a?(B("getExtension"),u.utils.getExtension(this.#L(),this.#e?.iso2)):""}getNumber(t){if(!this.#a)return"";B("getNumber");let e=this.#e?.iso2,i=this.#L(),s=u.utils.formatNumber(i,e,t);return this.#n.denormalise(s)}getNumberType(){return this.#a?(B("getNumberType"),u.utils.getNumberType(this.#L(),this.#e?.iso2)):null}getSelectedCountry(){return this.#e??null}getValidationError(){if(!this.#a)return null;B("getValidationError");let t=this.#e?.iso2;return u.utils.getValidationError(this.#L(),t)}isValidNumber(){if(!this.#a)return null;B("isValidNumber");let t=this.#e?.dialCode,e=this.#e?.iso2,i=this.#L(),s=u.utils.getCoreNumber(i,e);if(s){if(t===G.DIAL_CODE&&s[0]===G.MOBILE_PREFIX&&s.length!==G.MOBILE_CORE_LENGTH)return!1;if(!_.ALPHA_UNICODE.test(i)&&t){let r=i.startsWith("+")?i.slice(1+t.length):i,l=v(r).length;if(s.length>l)return!1}}return this.#ct("possible")}isValidNumberPrecise(){return this.#a?(B("isValidNumberPrecise"),this.#ct("precise")):null}#ct(t){let{allowNumberExtensions:e,allowPhonewords:i,allowedNumberTypes:s}=this.#i,o=this.#e?.iso2,r=this.#L();return!this.#e&&!ct(r)||!(t==="precise"?u.utils.isValidNumberPrecise:u.utils.isValidNumber)(r,o,s)?!1:_.ALPHA_UNICODE.test(r)?!!u.utils.getExtension(r,o)?e:i:!0}setSelectedCountry(t){if(!this.#a)return;let e=t?.toLowerCase();if(!k(e))throw new Error(`Invalid iso2 code: '${e}'`);let i=this.#e?.iso2;if(!(t&&e!==i||!t&&i))return;this.#I(e),this.#X(this.#e?.dialCode||"");let o=this.#u();this.#R(o),this.#k(),this.#d(A.INPUT,{isCountryChange:!0})}setNumber(t){if(!this.#a)return;let e=this.#n.normalise(t),i=this.#F(e);this.#R(e),i&&this.#k(),this.#d(A.INPUT,{isSetNumber:!0})}setPlaceholderNumberType(t){this.#a&&(this.#i.placeholderNumberType=t,this.#W())}setDisabled(t){this.#a&&this.#t.setDisabled(t)}setReadonly(t){this.#a&&this.#t.setReadonly(t)}static forEachInstance(t,...e){let i=[...u.instances.values()],s=e[0];i.forEach(o=>{if(o instanceof n)switch(t){case"handleUtilsLoaded":o.#ht();break;case"handleUtilsFailure":o.#dt(s);break;case"handleAutoCountryLoaded":o.#q();break;case"handleAutoCountryFailure":o.#ut();break}})}},ie=async n=>{if(u.utils||u.startedLoadingUtils)return null;if(typeof n!="function")throw new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utils module, not ${typeof n}`);u.startedLoadingUtils=!0;try{let e=(await n())?.default;if(!e||typeof e!="object")throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return u.utils=e,$.forEachInstance("handleUtilsLoaded"),!0}catch(t){throw $.forEachInstance("handleUtilsFailure",t),t}},u=Object.assign((n,t)=>{let e=new $(n,t);return u.instances.set(String(e.id),e),n.iti=e,e},{defaults:J,documentReady:()=>document.readyState==="complete",getAllCountries:()=>H,getInstance:n=>{let t=n.dataset[D.INSTANCE_ID];return t?u.instances.get(t)??null:null},instances:new Map,attachUtils:ie,startedLoadingUtils:!1,startedLoadingAutoCountry:!1,version:"29.2.3",NUMBER_FORMAT:g,NUMBER_TYPE:P,VALIDATION_ERROR:X,PLACEHOLDER_POLICY:w,COUNTRY_SELECTOR_MODE:h}),se=u;return $t(ne);})();
7
7
  var intlTelInput = _factory.default;
@@ -4955,7 +4955,7 @@ var intlTelInput = Object.assign(
4955
4955
  attachUtils,
4956
4956
  startedLoadingUtils: false,
4957
4957
  startedLoadingAutoCountry: false,
4958
- version: "29.2.2",
4958
+ version: "29.2.3",
4959
4959
  NUMBER_FORMAT,
4960
4960
  NUMBER_TYPE,
4961
4961
  VALIDATION_ERROR,