/* * International Telephone Input v28.1.0 * git+https://github.com/jackocnr/intl-tel-input.git * Licensed under the MIT license */ "use strict";var _factory=(()=>{var Y1=Object.defineProperty;var P2=Object.getOwnPropertyDescriptor;var x2=Object.getOwnPropertyNames;var H2=Object.prototype.hasOwnProperty;var U2=(r,t)=>{for(var n in t)Y1(r,n,{get:t[n],enumerable:!0})},B2=(r,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of x2(t))!H2.call(r,s)&&s!==n&&Y1(r,s,{get:()=>t[s],enumerable:!(i=P2(t,s))||i.enumerable});return r};var k2=r=>B2(Y1({},"__esModule",{value:!0}),r);var td={};U2(td,{default:()=>dd});var G2=[["af","93",0,null,"0"],["ax","358",1,["18","4"],"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"],"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","7911"],"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","7700","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,["269","639"],"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"]],Z1=[];for(let r of G2)Z1.push({name:"",iso2:r[0],dialCode:r[1],priority:r[2]||0,areaCodes:r[3]||null,nationalPrefix:r[4]||null});var F2=new Set(Z1.map(r=>r.iso2)),r1=r=>F2.has(r),c1=Z1;var W={OPEN_COUNTRY_DROPDOWN:"open:countrydropdown",CLOSE_COUNTRY_DROPDOWN:"close:countrydropdown",COUNTRY_CHANGE:"countrychange",INPUT:"input",STRICT_REJECT:"strict:reject"},y={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"},U={ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",SPACE:" ",ENTER:"Enter",ESC:"Escape",TAB:"Tab"},J1={PASTE:"insertFromPaste",DELETE_FORWARD:"deleteContentForward"},Z={ALPHA_UNICODE:/\p{L}/u,NON_PLUS_NUMERIC:/[^+0-9]/,NON_PLUS_NUMERIC_GLOBAL:/[^+0-9]/g,HIDDEN_SEARCH_CHAR:/^[a-zA-ZÀ-ÿа-яА-Я ]$/},z1={SEARCH_DEBOUNCE_MS:100,HIDDEN_SEARCH_RESET_MS:1e3,NEXT_TICK:0},K={NARROW_VIEWPORT_WIDTH:500,FALLBACK_SELECTED_WITH_DIAL_WIDTH:78,FALLBACK_SELECTED_NO_DIAL_WIDTH:42,INPUT_PADDING_EXTRA_LEFT:6,DROPDOWN_MARGIN:3,FALLBACK_DROPDOWN_HEIGHT:200},H1={PLUS:"+",NANP:"1"},U1={ISO2:"gb",DIAL_CODE:"44",MOBILE_PREFIX:"7",MOBILE_CORE_LENGTH:10},Z0={ISO2:"us",DIAL_CODE:"1"},h1={AGGRESSIVE:"aggressive",POLITE:"polite",OFF:"off"},T1={AUTO:"auto"},W2=["E164","INTERNATIONAL","NATIONAL","RFC3966"],p1=["FIXED_LINE","MOBILE","FIXED_LINE_OR_MOBILE","TOLL_FREE","PREMIUM_RATE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL","UNKNOWN"],V2=["IS_POSSIBLE","INVALID_COUNTRY_CODE","TOO_SHORT","TOO_LONG","IS_POSSIBLE_LOCAL_ONLY","INVALID_LENGTH"],X1=r=>Object.fromEntries(r.map(t=>[t,t])),N1=X1(W2),o1=X1(p1),Q1=X1(V2),J={ISO2:"iso2",DIAL_CODE:"dialCode",INSTANCE_ID:"intlTelInputId"},A={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 j2={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(r){return r===0?"No results found":r===1?"1 result found":`${r} results found`}},J0=j2;var d0=r=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(r).matches,Q0=()=>d0(`(max-width: ${K.NARROW_VIEWPORT_WIDTH}px)`),K2=()=>{if(typeof navigator<"u"&&typeof window<"u"){let r=d0("(max-height: 600px)"),t=d0("(pointer: coarse)");return Q0()||t&&r}return!1},k1={allowDropdown:!0,allowedNumberTypes:[o1.MOBILE,o1.FIXED_LINE],allowNumberExtensions:!1,allowPhonewords:!1,autoPlaceholder:h1.POLITE,containerClass:"",countryNameLocale:"en",countryNameOverrides:{},countryOrder:null,countrySearch:!0,customPlaceholder:null,dropdownAlwaysOpen:!1,dropdownContainer:null,excludeCountries:null,fixDropdownWidth:!0,formatAsYouType:!0,formatOnDisplay:!0,geoIpLookup:null,hiddenInput:null,i18n:{},initialCountry:"",loadUtils:null,nationalMode:!1,onlyCountries:null,placeholderNumberType:o1.MOBILE,searchInputClass:"",separateDialCode:!0,strictRejectAnimation:!0,showFlags:!0,strictMode:!0,useFullscreenPopup:K2()},q0=r=>JSON.stringify(r),q1=r=>!!r&&typeof r=="object"&&!Array.isArray(r),Y2=r=>typeof r=="function",Z2=r=>{if(!r||typeof r!="object")return!1;let t=r;return t.nodeType===1&&typeof t.tagName=="string"&&typeof t.appendChild=="function"},z0=new Set(Object.values(h1)),B1=r=>{console.warn(`[intl-tel-input] ${r}`)},F=(r,t,n)=>{B1(`Option '${r}' must be ${t}; got ${q0(n)}. Ignoring.`)},X0=(r,t)=>{let n="an array of iso2 country code strings";if(!Array.isArray(t))return F(r,n,t),!1;let i=[];for(let s of t){if(typeof s!="string")return F(r,n,t),!1;let u=s.toLowerCase();r1(u)?i.push(s):B1(`Invalid iso2 code in '${r}': '${s}'. Skipping.`)}return i},d2=r=>{if(r===void 0)return{};if(!q1(r)){let n=`The second argument must be an options object; got ${q0(r)}. Using defaults.`;return B1(n),{}}let t={};for(let[n,i]of Object.entries(r)){if(!Object.hasOwn(k1,n)){B1(`Unknown option '${n}'. Ignoring.`);continue}switch(n){case"allowDropdown":case"allowNumberExtensions":case"allowPhonewords":case"countrySearch":case"dropdownAlwaysOpen":case"fixDropdownWidth":case"formatAsYouType":case"formatOnDisplay":case"nationalMode":case"showFlags":case"separateDialCode":case"strictMode":case"strictRejectAnimation":case"useFullscreenPopup":if(typeof i!="boolean"){F(n,"a boolean",i);break}t[n]=i;break;case"autoPlaceholder":if(typeof i!="string"||!z0.has(i)){let s=Array.from(z0).join(", ");F("autoPlaceholder",`one of ${s}`,i);break}t[n]=i;break;case"containerClass":case"searchInputClass":case"countryNameLocale":if(typeof i!="string"){F(n,"a string",i);break}t[n]=i;break;case"countryOrder":{if(i===null)t[n]=i;else{let s=X0(n,i);s!==!1&&(t[n]=s)}break}case"customPlaceholder":case"geoIpLookup":case"hiddenInput":case"loadUtils":if(i!==null&&!Y2(i)){F(n,"a function or null",i);break}t[n]=i;break;case"dropdownContainer":if(i!==null&&!Z2(i)){F("dropdownContainer","an HTMLElement or null",i);break}t[n]=i;break;case"excludeCountries":case"onlyCountries":{if(i===null)t[n]=i;else{let s=X0(n,i);s!==!1&&(t[n]=s)}break}case"i18n":if(i&&!q1(i)){F("i18n","an object",i);break}t[n]=i;break;case"countryNameOverrides":if(i&&!q1(i)){F("countryNameOverrides","an object",i);break}t[n]=i;break;case"initialCountry":{if(typeof i!="string"){F("initialCountry","a string",i);break}let s=i.toLowerCase();if(s&&s!==T1.AUTO&&!r1(s)){F("initialCountry","a valid iso2 country code or 'auto'",i);break}t[n]=i;break}case"placeholderNumberType":if(typeof i!="string"||!p1.includes(i)){let s=p1.join(", ");F("placeholderNumberType",`one of ${s}`,i);break}t[n]=i;break;case"allowedNumberTypes":if(i!==null){if(!Array.isArray(i)){F("allowedNumberTypes","an array of number types or null",i);break}let s=!0;for(let u of i)if(typeof u!="string"||!p1.includes(u)){let h=p1.join(", ");F("allowedNumberTypes",`an array of valid number types (${h})`,u),s=!1;break}s&&(t[n]=i)}else t[n]=null;break}}return t},t2=r=>{r.initialCountry&&(r.initialCountry=r.initialCountry.toLowerCase()),r.onlyCountries?.length&&(r.onlyCountries=r.onlyCountries.map(t=>t.toLowerCase())),r.excludeCountries?.length&&(r.excludeCountries=r.excludeCountries.map(t=>t.toLowerCase())),r.countryOrder&&(r.countryOrder=r.countryOrder.map(t=>t.toLowerCase()))},e2=r=>{r.dropdownAlwaysOpen&&(r.useFullscreenPopup=!1,r.allowDropdown=!0),r.useFullscreenPopup?r.fixDropdownWidth=!1:Q0()&&(r.fixDropdownWidth=!0),r.onlyCountries?.length===1&&(r.initialCountry=r.onlyCountries[0]),r.separateDialCode&&(r.nationalMode=!1),r.allowDropdown&&!r.showFlags&&!r.separateDialCode&&(r.nationalMode=!1),r.useFullscreenPopup&&!r.dropdownContainer&&(r.dropdownContainer=document.body),r.i18n={...J0,...r.i18n}};var Q=r=>r.replace(/\D/g,""),t0=(r="")=>r.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase();var G1=r=>Object.keys(r).filter(t=>!!r[t]).join(" "),v=(r,t,n)=>{let i=document.createElement(r);return t&&Object.entries(t).forEach(([s,u])=>i.setAttribute(s,u)),n&&n.appendChild(i),i};var J2="http://www.w3.org/2000/svg",v1=([r,t,n])=>{let i=document.createElementNS(J2,r);if(t)for(let s in t)i.setAttribute(s,String(t[s]));if(n)for(let s of n)i.appendChild(v1(s));return i},n2=()=>v1(["svg",{class:"iti__search-icon-svg",width:14,height:14,viewBox:"0 0 24 24",focusable:"false",[A.HIDDEN]:"true"},[["circle",{cx:11,cy:11,r:7}],["line",{x1:21,y1:21,x2:16.65,y2:16.65}]]]),i2=r=>{let t=`iti-${r}-clear-mask`;return v1(["svg",{class:"iti__search-clear-svg",width:12,height:12,viewBox:"0 0 16 16",[A.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})`}]]])},$2=()=>v1(["svg",{class:"iti__country-check-svg",width:14,height:14,viewBox:"0 0 16 16",fill:"currentColor",focusable:"false",[A.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"}]]]),e0=()=>v1(["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 n0=r=>t0(r).replace(/[^\p{L}]+/gu," ").trim(),s2=r=>{let t=new Map;for(let n of r){let i=n0(n.name),s=i.split(" ").filter(Boolean),u=s.map(h=>h[0]||"").join("");t.set(n.iso2,{normalisedName:i,words:s,initials:u,dialCodePlus:`+${n.dialCode}`})}return t},r2=(r,t,n)=>{let i=t0(n),s=n0(n),u=i!==""&&s==="",h=[],p=[],g=[],I=[],S=[],L=[],b=[];for(let O of r){let T=t.get(O.iso2);O.iso2===i?h.push(O):!u&&T.normalisedName.startsWith(s)?p.push(O):!u&&T.normalisedName.includes(s)?g.push(O):i===O.dialCode||i===T.dialCodePlus?I.push(O):T.dialCodePlus.includes(i)?S.push(O):T.initials.includes(i)&&L.push(O)}let B=s.split(" ").filter(Boolean);if(B.length>1&&h.length===0&&p.length===0&&g.length===0){let O=new Set([...I.map(T=>T.iso2),...S.map(T=>T.iso2),...L.map(T=>T.iso2)]);for(let T of r){if(O.has(T.iso2))continue;let _=t.get(T.iso2);B.some(Y=>_.words.some(z=>z.startsWith(Y)))&&b.push(T)}}let M=(O,T)=>O.priority-T.priority;return[...h,...p,...g,...I.sort(M),...S.sort(M),...L,...b]},o2=(r,t,n)=>{let i=n0(n);for(let s of r){let{normalisedName:u}=t.get(s.iso2);if(u.startsWith(i))return s}return null};var f1=class r{#d;static toAscii(t){return t?t.replace(/[٠-٩]/g,n=>String.fromCharCode(48+(n.charCodeAt(0)-1632))).replace(/[۰-۹]/g,n=>String.fromCharCode(48+(n.charCodeAt(0)-1776))):""}constructor(t){t&&this.#e(t)}#e(t){/[٠-٩]/.test(t)?this.#d="arabic-indic":/[۰-۹]/.test(t)?this.#d="persian":this.#d="ascii"}denormalise(t){if(!this.#d||this.#d==="ascii")return t;let n=this.#d==="arabic-indic"?1632:1776;return t.replace(/[0-9]/g,i=>String.fromCharCode(n+Number(i)))}normalise(t){return t?(this.#e(t),this.#d==="ascii"?t:r.toAscii(t)):""}isAscii(){return!this.#d||this.#d==="ascii"}};var g1=class r{#d;#e;#T;#m="";#I;#v;#L=null;#O;#g;#t;#l;#C;#$;#n;#f;#o;#A;#i;#u;#r;#a;#U;#s;#E=null;#c=null;#_=new Map;#b=null;#M;telInputEl;hadInitialPlaceholder;constructor(t,n,i){t.dataset[J.INSTANCE_ID]=i.toString(),this.telInputEl=t,this.#d=n,this.#e=i,this.hadInitialPlaceholder=!!t.getAttribute("placeholder"),this.#T=!!this.telInputEl.closest("[dir=rtl]"),this.#m=this.telInputEl.style.paddingLeft}static validateInput(t){let n=t?.tagName;if(!(!!t&&typeof t=="object"&&n==="INPUT"&&typeof t.setAttribute=="function")){let s=Object.prototype.toString.call(t);throw new TypeError(`The first argument must be an HTMLInputElement, not ${s}`)}}buildMarkup(t,n){this.#I=t,this.#v=n,this.telInputEl.classList.add("iti__tel-input"),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.#B();this.#k(i),i.appendChild(this.telInputEl),this.#X(),this.#d1(),this.#Q(i),this.ensureDropdownWidthSet()}#B(){let{allowDropdown:t,showFlags:n,containerClass:i,useFullscreenPopup:s}=this.#d,u=G1({iti:!0,"iti--input-container":!0,"iti--allow-dropdown":t,"iti--show-flags":n,"iti--inline-dropdown":!s,[i]:!!i}),h=v("div",{class:u});return this.#T&&h.setAttribute("dir","ltr"),this.telInputEl.before(h),h}#k(t){let{allowDropdown:n,separateDialCode:i,showFlags:s}=this.#d;if(!n&&!s&&!i)return;this.#g=v("div",{class:`iti__country-container ${y.V_HIDE}`},t),n?(this.#t=v("button",{type:"button",class:"iti__selected-country",[A.EXPANDED]:"false",[A.LABEL]:this.#d.i18n.noCountrySelected,[A.HASPOPUP]:"dialog",[A.CONTROLS]:`iti-${this.#e}__dropdown-content`},this.#g),this.telInputEl.disabled&&this.#t.setAttribute("disabled","true")):this.#t=v("div",{class:"iti__selected-country"},this.#g);let u=v("div",{class:"iti__selected-country-primary"},this.#t);this.#l=v("div",{class:y.FLAG},u),n&&(this.#$=v("div",{class:"iti__arrow",[A.HIDDEN]:"true"},u)),i&&(this.#C=v("div",{class:"iti__selected-dial-code"},this.#t)),n&&this.#J()}ensureDropdownWidthSet(){let{fixDropdownWidth:t,allowDropdown:n}=this.#d;if(!n||!t||this.#n.style.width)return;let i=this.telInputEl.offsetWidth;i>0&&(this.#n.style.width=`${i}px`)}#J(){let{fixDropdownWidth:t,useFullscreenPopup:n,countrySearch:i,i18n:s,dropdownContainer:u,containerClass:h}=this.#d,p=t?"":"iti--flexible-dropdown-width";if(this.#n=v("div",{id:`iti-${this.#e}__dropdown-content`,class:`iti__dropdown-content ${y.HIDE} ${p}`,role:"dialog",[A.MODAL]:"true"}),this.#T&&this.#n.setAttribute("dir","rtl"),i&&this.#z(),this.#i=v("ul",{class:"iti__country-list",id:`iti-${this.#e}__country-listbox`,role:"listbox",[A.LABEL]:s.countryListAriaLabel},this.#n),this.#q(),i&&this.#F(),n||(this.#O=this.#e1(),i&&(this.#n.style.height=`${this.#O}px`)),u){let g=G1({iti:!0,"iti--container":!0,"iti--fullscreen-popup":n,"iti--inline-dropdown":!n,[h]:!!h});this.#s=v("div",{class:g}),this.#s.appendChild(this.#n)}else this.#g.appendChild(this.#n)}#z(){let{i18n:t,searchInputClass:n}=this.#d,i=v("div",{class:"iti__search-input-wrapper"},this.#n);this.#f=v("span",{class:"iti__search-icon",[A.HIDDEN]:"true"},i),this.#f.appendChild(n2()),this.#o=v("input",{id:`iti-${this.#e}__search-input`,type:"search",class:`iti__search-input ${n}`,placeholder:t.searchPlaceholder,role:"combobox",[A.EXPANDED]:"true",[A.LABEL]:t.searchPlaceholder,[A.CONTROLS]:`iti-${this.#e}__country-listbox`,[A.AUTOCOMPLETE]:"list",autocomplete:"off"},i),this.#A=v("button",{type:"button",class:`iti__search-clear ${y.HIDE}`,[A.LABEL]:t.clearSearchAriaLabel,tabindex:"-1"},i),this.#A.appendChild(i2(this.#e)),this.#U=v("span",{class:"iti__a11y-text"},this.#n),this.#a=v("div",{class:`iti__no-results ${y.HIDE}`,[A.HIDDEN]:"true"},this.#n),this.#a.textContent=t.searchEmptyState??null}#X(){this.#g&&(this.#P(),this.#g.classList.remove(y.V_HIDE))}#Q(t){let{hiddenInput:n}=this.#d;if(!n)return;let i=this.telInputEl.getAttribute("name")||"",s=n(i);if(s.phone){let u=this.telInputEl.form?.querySelector(`input[name="${s.phone}"]`);u?this.#u=u:(this.#u=v("input",{type:"hidden",name:s.phone}),t.appendChild(this.#u))}if(s.country){let u=this.telInputEl.form?.querySelector(`input[name="${s.country}"]`);u?this.#r=u:(this.#r=v("input",{type:"hidden",name:s.country}),t.appendChild(this.#r))}}#q(){let t=document.createDocumentFragment();for(let n=0;n"u"||(this.#M=new ResizeObserver(()=>{this.#t?.offsetWidth&&this.#P()}),this.#M.observe(this.#t))}static#G(){let t;try{t=window.top.document.body}catch{t=document.body}return t}#t1(){if(!this.telInputEl.parentNode)return 0;let t=r.#G(),n=this.telInputEl.parentNode.cloneNode(!1);n.style.visibility="hidden",t.appendChild(n);let i=this.#g.cloneNode();n.appendChild(i);let s=this.#t.cloneNode(!0);i.appendChild(s);let u=s.offsetWidth;return t.removeChild(n),u}#e1(){let t=r.#G();this.#n.classList.remove(y.HIDE);let n=v("div",{class:"iti iti--inline-dropdown"});n.appendChild(this.#n),n.style.visibility="hidden",t.appendChild(n);let i=this.#n.offsetHeight;return t.removeChild(n),n.style.visibility="",this.#n.classList.add(y.HIDE),i>0?i:K.FALLBACK_DROPDOWN_HEIGHT}#F(){let{i18n:t}=this.#d,n=this.#i.childElementCount;this.#U.textContent=t.searchSummaryAria(n)}#W(t){let n;if(t==="")n=this.#I;else{let i=f1.toAscii(t);n=r2(this.#I,this.#v,i)}this.#K(n)}prefillSearchWithPlus(){this.#o.value="+",this.#o.focus(),this.#W("")}#w(){let t=this.#o.value.trim();this.#W(t),this.#o.value?this.#A.classList.remove(y.HIDE):this.#A.classList.add(y.HIDE)}#n1(){this.#L&&clearTimeout(this.#L),this.#L=setTimeout(()=>{this.#w(),this.#L=null},z1.SEARCH_DEBOUNCE_MS)}#h(){this.#o.value="",this.#o.focus(),this.#w()}#D(t){let n=this.#i,i=n.getBoundingClientRect(),s=t.getBoundingClientRect(),u=s.top-i.top+n.scrollTop;s.topi.bottom&&(n.scrollTop=u-i.height+s.height)}#p(t,n=!0){if(this.#c?.classList.remove(y.HIGHLIGHT),t){if(t.classList.add(y.HIGHLIGHT),this.#d.countrySearch){let i=t.getAttribute("id")||"";this.#o.setAttribute(A.ACTIVE_DESCENDANT,i)}n&&this.#D(t),this.#c=t}else this.#c=null}bindHiddenInputSubmitListener(t,n,i){let s=this.telInputEl.form;!s||!this.#u&&!this.#r||s.addEventListener("submit",()=>{this.#u&&(this.#u.value=n()),this.#r&&(this.#r.value=i())},{signal:t})}bindAllInitialDropdownListeners(t,n,i){let s=this.telInputEl.closest("label");s&&s.addEventListener("click",u=>{this.isDropdownOpen()?u.preventDefault():this.telInputEl.focus()},{signal:t}),this.#t.addEventListener("click",()=>{!this.isDropdownOpen()&&!this.telInputEl.disabled&&!this.telInputEl.readOnly&&n()},{signal:t}),this.#g.addEventListener("keydown",u=>{let h=[U.ARROW_UP,U.ARROW_DOWN,U.SPACE,U.ENTER];!this.isDropdownOpen()&&h.includes(u.key)&&(u.preventDefault(),u.stopPropagation(),n()),u.key===U.TAB&&i()},{signal:t})}openDropdown(t,n){let{countrySearch:i,dropdownAlwaysOpen:s,dropdownContainer:u}=this.#d;if(this.#b=new AbortController,this.ensureDropdownWidthSet(),u)this.#Y();else{let p=this.#N(),g=this.telInputEl.offsetHeight+K.DROPDOWN_MARGIN;p?this.#n.style.top=`${g}px`:this.#n.style.bottom=`${g}px`}this.#n.classList.remove(y.HIDE),this.#t.setAttribute(A.EXPANDED,"true");let h=this.#E??this.#i.firstElementChild;h&&this.#p(h),i&&!s&&this.#o.focus(),this.#d.useFullscreenPopup&&this.#s&&window.visualViewport&&window.visualViewport.addEventListener("resize",()=>{this.#S(),this.#c&&this.#D(this.#c)},{signal:this.#b.signal}),this.#$.classList.add(y.ARROW_UP),this.#x(t,n)}#x(t,n){let i=this.#b.signal;this.#i1(i),this.#V(i,t),this.#d.dropdownAlwaysOpen||this.#$1(i,n),this.#y(i,t,n),this.#d.countrySearch&&this.#j(i),!this.#d.useFullscreenPopup&&this.#d.dropdownContainer&&window.addEventListener("scroll",n,{signal:i})}#i1(t){this.#i.addEventListener("mouseover",n=>{let i=n.target?.closest(`.${y.COUNTRY_ITEM}`);i&&this.#p(i,!1)},{signal:t})}#V(t,n){this.#i.addEventListener("click",i=>{let s=i.target?.closest(`.${y.COUNTRY_ITEM}`);s&&n(s)},{signal:t})}#$1(t,n){setTimeout(()=>{document.documentElement.addEventListener("click",i=>{this.#n.contains(i.target)||n()},{signal:t})},0)}#y(t,n,i){let s="",u=null,h=p=>{[U.ARROW_UP,U.ARROW_DOWN,U.ENTER,U.ESC].includes(p.key)&&(p.preventDefault(),p.stopPropagation(),p.key===U.ARROW_UP||p.key===U.ARROW_DOWN?this.#s1(p.key):p.key===U.ENTER&&!p.isComposing?n(this.#c):p.key===U.ESC&&(i(),this.#t.focus())),!this.#d.countrySearch&&Z.HIDDEN_SEARCH_CHAR.test(p.key)&&(p.stopPropagation(),u&&clearTimeout(u),s+=p.key.toLowerCase(),this.#H(s),u=setTimeout(()=>{s=""},z1.HIDDEN_SEARCH_RESET_MS))};this.#t?.addEventListener("keydown",h,{signal:t}),this.#n?.addEventListener("keydown",h,{signal:t})}#j(t){this.#o.addEventListener("input",()=>this.#n1(),{signal:t}),this.#A.addEventListener("click",()=>this.#h(),{signal:t})}#H(t){let n=o2(this.#I,this.#v,t);if(n){let i=this.#_.get(n.iso2);this.#p(i)}}#s1(t){let n=t===U.ARROW_UP?this.#c?.previousElementSibling:this.#c?.nextElementSibling;!n&&this.#i.childElementCount>1&&(n=t===U.ARROW_UP?this.#i.lastElementChild:this.#i.firstElementChild),n&&this.#p(n)}#R(t){if(this.#E&&this.#E.dataset[J.ISO2]!==t&&(this.#E.setAttribute(A.SELECTED,"false"),this.#E.querySelector(".iti__country-check")?.remove(),this.#E=null),t&&!this.#E){let n=this.#i.querySelector(`[data-iso2="${t}"]`);n&&(n.setAttribute(A.SELECTED,"true"),v("span",{class:"iti__country-check",[A.HIDDEN]:"true"},n).appendChild($2()),this.#E=n,this.#d.dropdownAlwaysOpen&&this.#p(n))}}#K(t){this.#i.replaceChildren();let n=!0;for(let i of t){let s=this.#_.get(i.iso2);s&&(this.#i.appendChild(s),n&&(this.#p(s,!1),n=!1))}n?(this.#p(null),this.#a&&this.#a.classList.remove(y.HIDE)):this.#a&&this.#a.classList.add(y.HIDE),this.#i.scrollTop=0,this.#F()}closeDropdown(){let{countrySearch:t,dropdownContainer:n}=this.#d;this.#b.abort(),this.#b=null,this.#n.classList.add(y.HIDE),this.#t.setAttribute(A.EXPANDED,"false"),t&&(this.#o.removeAttribute(A.ACTIVE_DESCENDANT),this.#o.value="",this.#w(),this.#c&&(this.#c.classList.remove(y.HIGHLIGHT),this.#c=null)),this.#$.classList.remove(y.ARROW_UP),n?(this.#s.remove(),this.#s.style.top="",this.#s.style.bottom="",this.#s.style.paddingLeft="",this.#s.style.paddingRight=""):(this.#n.style.top="",this.#n.style.bottom="")}#N(){if(this.#d.dropdownAlwaysOpen)return!0;let t=this.telInputEl.getBoundingClientRect(),n=t.top,i=window.innerHeight-t.bottom;return i>=this.#O||i>=n}#Y(){let{dropdownContainer:t,useFullscreenPopup:n}=this.#d;if(n){if(window.innerWidth>=K.NARROW_VIEWPORT_WIDTH){let i=this.telInputEl.getBoundingClientRect();this.#s.style.paddingLeft=`${i.left}px`,this.#s.style.paddingRight=`${window.innerWidth-i.right}px`}}else{let i=this.telInputEl.getBoundingClientRect();this.#s.style.left=`${i.left}px`,this.#N()?this.#s.style.top=`${i.bottom+K.DROPDOWN_MARGIN}px`:(this.#s.style.top="unset",this.#s.style.bottom=`${window.innerHeight-i.top+K.DROPDOWN_MARGIN}px`)}t.appendChild(this.#s)}#S(){let t=window.visualViewport;if(!t||!this.#s)return;let n=window.innerHeight-t.height;this.#s.style.bottom=`${n}px`}isDropdownOpen(){return!this.#n.classList.contains(y.HIDE)}setLoading(t){this.#l.classList.toggle(y.LOADING,t)}playStrictRejectAnimation(){if(!this.#d.strictRejectAnimation)return;let t=this.telInputEl.parentElement;t&&(t.classList.remove(y.STRICT_REJECT_ANIMATION),t.offsetWidth,t.classList.add(y.STRICT_REJECT_ANIMATION),t.addEventListener("animationend",()=>t.classList.remove(y.STRICT_REJECT_ANIMATION),{once:!0}))}isLoading(){return this.#l.classList.contains(y.LOADING)}setDisabled(t){this.telInputEl.disabled=t,this.#t&&(t?this.#t.setAttribute("disabled","true"):this.#t.removeAttribute("disabled"))}setReadonly(t){this.telInputEl.readOnly=t,this.#t&&(t?this.#t.setAttribute("disabled","true"):this.#t.removeAttribute("disabled"))}setCountry(t){let{allowDropdown:n,showFlags:i,separateDialCode:s,i18n:u}=this.#d,h=t?.name,p=t?.dialCode,g=t?.iso2??"";if(n&&this.#R(g),this.#t){let I=g&&i?`${y.FLAG} iti__${g}`:`${y.FLAG} ${y.GLOBE}`,S,L,b=null;g?(L=h,S=u.selectedCountryAriaLabel.replace("${countryName}",h).replace("${dialCode}",`+${p}`),i||(b=e0())):(L=u.noCountrySelected,S=u.noCountrySelected,b=e0()),this.#l.className=I,this.#t.setAttribute("title",L),this.#t.setAttribute(A.LABEL,S),b?this.#l.replaceChildren(b):this.#l.replaceChildren()}if(s){let I=p?`+${p}`:"";this.#C.textContent=I,this.#P()}}destroy(){this.telInputEl.iti=void 0,delete this.telInputEl.dataset[J.INSTANCE_ID],this.#M?.disconnect(),this.telInputEl.style.paddingLeft=this.#m;let t=this.telInputEl.parentNode;t&&(t.before(this.telInputEl),t.remove()),this.#_.clear()}};var l2=r=>{let{onlyCountries:t,excludeCountries:n}=r;return t?.length?c1.filter(i=>t.includes(i.iso2)):n?.length?c1.filter(i=>!n.includes(i.iso2)):[...c1]},u2=(r,t)=>{let{countryNameLocale:n,countryNameOverrides:i}=t,s;try{typeof Intl<"u"&&typeof Intl.DisplayNames=="function"?s=new Intl.DisplayNames(n,{type:"region"}):s=null}catch(u){console.error(u),s=null}for(let u of r)u.name=i[u.iso2]||s?.of(u.iso2.toUpperCase())||""},a2=r=>{let t=new Set,n=0,i={},s=(h,p)=>{if(!h||!p)return;p.length>n&&(n=p.length),Object.hasOwn(i,p)||(i[p]=[]);let g=i[p];g.includes(h)||g.push(h)},u=[...r].sort((h,p)=>h.priority-p.priority);for(let h of u){t.has(h.dialCode)||t.add(h.dialCode);for(let p=1;p{let{countryOrder:n}=t;r.sort((i,s)=>{if(n){let u=n.indexOf(i.iso2),h=n.indexOf(s.iso2),p=u>-1,g=h>-1;if(p||g)return p&&g?u-h:p?-1:1}return i.name.localeCompare(s.name)})};var z2=new Set(["800","808","870","881","882","883","888","979"]),i0=r=>{let t=Q(r).slice(0,3);return r.startsWith("+")&&z2.has(t)};var $0=(r,t,n,i)=>{if(!n||!t)return r;let s=`+${i.dialCode}`,u=r[s.length]===" "||r[s.length]==="-"?s.length+1:s.length;return r.substring(u)},h2=(r,t,n,i,s)=>{let u=n?n.formatNumberAsYouType(r,i?.iso2):r,h=i?.dialCode;return s&&t.charAt(0)!=="+"&&u.includes(`+${h}`)?(u.split(`+${h}`)[1]||"").trim():u};var p2=(r,t,n,i)=>{if(n===0&&!i)return 0;let s=0;for(let u=0;u{let t=Q(r);if(t.startsWith(H1.NANP)&&t.length>=4){let n=t.substring(1,4);return X2.has(n)}return!1};var Q2=0,m1=r=>{if(!C.utils)throw new Error(`intlTelInput.utils is required for ${r}(). See: https://intl-tel-input.com/docs/utils`)},f2=()=>{let r,t;return{promise:new Promise((i,s)=>{r=i,t=s}),resolve:r,reject:t}},L1=class r{id;promise;#d;#e;#T;#m;#I;#v;#L;#O;#g;#t=null;#l=null;#C;#$=!0;#n;#f;#o=!1;#A=null;#i;#u;constructor(t,n={}){this.id=Q2++,g1.validateInput(t);let i=d2(n);this.#e={...k1,...i},t2(this.#e),e2(this.#e),this.#d=new g1(t,this.#e,this.id),this.#T=typeof navigator<"u"&&/Android/i.test(navigator.userAgent),this.#f=new f1(t.value),this.promise=this.#U(this.#e),this.#m=l2(this.#e);let{dialCodes:s,dialCodeMaxLength:u,dialCodeToIso2Map:h}=a2(this.#m);this.#L=s,this.#I=u,this.#v=h,this.#O=new Map(this.#m.map(p=>[p.iso2,p])),this.#s()}#r(){let t=this.#d.telInputEl.value.trim();return this.#f.normalise(t)}#a(t){this.#d.telInputEl.value=this.#f.denormalise(t)}#U(t){let{initialCountry:n,geoIpLookup:i,loadUtils:s}=t,u=n===T1.AUTO&&!!i,h=!!s&&!C.utils;return u&&(this.#i=f2()),h&&(this.#u=f2()),Promise.all([this.#i?.promise,this.#u?.promise]).then(()=>{})}#s(){this.#n=new AbortController,this.#E(),this.#d.buildMarkup(this.#m,this.#g),this.#c(),this.#_(),this.#b(),this.#e.dropdownAlwaysOpen&&this.#D()}#E(){u2(this.#m,this.#e),c2(this.#m,this.#e),this.#g=s2(this.#m)}#c(t=!1){let n=this.#d.telInputEl.getAttribute("value"),i=this.#f.normalise(n??""),s=this.#r(),h=i&&i.startsWith("+")&&(!s||!s.startsWith("+"))?i:s,p=this.#N(h),g=s0(h),{initialCountry:I,geoIpLookup:S}=this.#e,L=I===T1.AUTO&&S,b=L&&C.autoCountry?C.autoCountry:I,B=L&&!t&&!C.autoCountry,M=r1(b);p?g?M?this.#y(b):B||this.#y(Z0.ISO2):(M&&this.#y(b),this.#x(h)):M?this.#y(b):B||this.#y(""),h&&this.#p(h)}#_(){this.#J(),this.#e.allowDropdown&&this.#d.bindAllInitialDropdownListeners(this.#n.signal,()=>this.#D(),()=>this.#R()),this.#d.bindHiddenInputSubmitListener(this.#n.signal,()=>this.getNumber(),()=>this.#t?.iso2||"")}#b(){if(this.#u){let{loadUtils:t}=this.#e,n=()=>{C.attachUtils(t).catch(()=>{})};C.documentReady()?n():window.addEventListener("load",n,{signal:this.#n.signal})}this.#i&&(this.#t?this.#i.resolve():this.#M())}async#M(){if(C.autoCountry){this.#o1();return}if(this.#d.setLoading(!0),!C.startedLoadingAutoCountry&&(C.startedLoadingAutoCountry=!0,typeof this.#e.geoIpLookup=="function")){let t;try{let n=await Promise.race([this.#e.geoIpLookup(),new Promise((s,u)=>{t=setTimeout(()=>u(new Error("intl-tel-input: geoIpLookup timed out after 10s")),1e4)})]),i=typeof n=="string"?n.toLowerCase():"";if(!r1(i)){C.startedLoadingAutoCountry=!1,r.forEachInstance("handleAutoCountryFailure");return}C.autoCountry=i,setTimeout(()=>r.forEachInstance("handleAutoCountryLoaded"))}catch{C.startedLoadingAutoCountry=!1,r.forEachInstance("handleAutoCountryFailure")}finally{t!==void 0&&clearTimeout(t)}}}#B(){this.#D(),this.#d.prefillSearchWithPlus()}#k(t){let n=this.#d.telInputEl.selectionStart||0,i=t.substring(0,n-1),s=t.substring(n);return this.#a(i+s),n-1}#J(){this.#P(),this.#G(),this.#e1()}#z(t){this.#k(t),this.#B()}#X(t,n){let i=this.#k(t);this.#d.telInputEl.setSelectionRange(i,i),this.#d.playStrictRejectAnimation(),this.#h(W.STRICT_REJECT,{source:"key",rejectedInput:n,reason:"invalid"})}#Q(t,n){let i=this.#d.telInputEl.selectionStart||0,u=t.substring(0,i).replace(Z.NON_PLUS_NUMERIC_GLOBAL,"").length,h=this.#S(),p=h2(h,t,C.utils,this.#t,this.#e.separateDialCode),g=p2(u,p,i,n);this.#a(p),this.#d.telInputEl.setSelectionRange(g,g)}#q(t){if(t.startsWith("+")&&this.#t&&this.#N(t)){let n=$0(t,!0,!0,this.#t);this.#a(n)}}#P(){this.#o=Z.ALPHA_UNICODE.test(this.#r()),this.#d.telInputEl.addEventListener("input",this.#d1,{signal:this.#n.signal})}#d1=t=>{let{strictMode:n,formatAsYouType:i,separateDialCode:s,allowDropdown:u,countrySearch:h}=this.#e,p=t?.detail;if(p?.isCountryChange)return;let g=this.#r(),I=t?.inputType===J1.PASTE,S=n&&I;if(this.#T&&!I&&t?.data==="+"&&s&&u&&h){this.#z(g);return}if(this.#T&&!I&&n&&(t?.data===" "||t?.data==="-"||t?.data===".")){this.#X(g,t.data);return}if(S){if(this.#W())return;g=this.#r()}this.#x(g)&&this.#Z(),!S&&t?.data&&Z.NON_PLUS_NUMERIC.test(t.data)||I&&g&&!n?this.#o=!0:Z.NON_PLUS_NUMERIC.test(g)||(this.#o=!1),i&&!this.#o&&!p?.isSetNumber&&this.#f.isAscii()&&this.#Q(g,t?.inputType===J1.DELETE_FORWARD),s&&this.#q(g)};#G(){let{strictMode:t,separateDialCode:n}=this.#e;!t&&!n||this.#d.telInputEl.addEventListener("keydown",this.#t1,{signal:this.#n.signal})}#t1=t=>{let{strictMode:n,separateDialCode:i,allowDropdown:s,countrySearch:u}=this.#e;if(!t.key||t.key.length!==1||t.altKey||t.ctrlKey||t.metaKey)return;if(i&&s&&u&&t.key==="+"){t.preventDefault(),this.#B();return}if(!n)return;let h=this.#r(),g=!h.startsWith("+")&&this.#d.telInputEl.selectionStart===0&&t.key==="+",I=this.#f.normalise(t.key),S=/^[0-9]$/.test(I),L=i?S:g||S,b=this.#d.telInputEl,B=b.selectionStart,M=b.selectionEnd,O=h.slice(0,B??void 0),T=h.slice(M??void 0),_=O+I+T,Y=this.#Y(_),z=!1;C.utils&&this.#l&&(z=C.utils.getCoreNumber(Y,this.#t?.iso2).length>this.#l);let l1=this.#V(Y)!==null;(!L||z&&!l1&&!g)&&(this.#d.playStrictRejectAnimation(),this.#h(W.STRICT_REJECT,{source:"key",rejectedInput:t.key,reason:L?"max-length":"invalid"}),t.preventDefault())};#e1(){this.#e.strictMode&&this.#d.telInputEl.addEventListener("paste",this.#F,{signal:this.#n.signal})}#F=t=>{let n=this.#d.telInputEl,i=this.#r();this.#A={pastedRaw:t.clipboardData?.getData("text")??"",value:i,selectionStart:n.selectionStart??i.length,selectionEnd:n.selectionEnd??i.length}};#W(){let t=this.#d.telInputEl,n=this.#A;if(this.#A=null,!n)return!1;let i=n.pastedRaw,s=n.value,u=n.selectionStart,h=n.selectionEnd,p=s.slice(0,u),g=s.slice(h),I=this.#t?.iso2,S=this.#f.normalise(i),L=u===0&&h>0,b=!s.startsWith("+")||L,B=S.replace(Z.NON_PLUS_NUMERIC_GLOBAL,""),M=B.startsWith("+"),O=B.replace(/\+/g,""),T=M&&b?`+${O}`:O,_=p+T+g,Y=T!==S?"invalid":null;if(_.length>30)return this.#d.playStrictRejectAnimation(),this.#h(W.STRICT_REJECT,{source:"paste",rejectedInput:i,reason:"max-length"}),this.#w(n),!0;if(_.length>5&&C.utils){let q=C.utils.getCoreNumber(_,I);for(;q.length===0&&_.length>0;)_=_.slice(0,-1),q=C.utils.getCoreNumber(_,I);if(!q)return this.#d.playStrictRejectAnimation(),this.#h(W.STRICT_REJECT,{source:"paste",rejectedInput:i,reason:"max-length"}),this.#w(n),!0;if(this.#l&&q.length>this.#l)if(h===s.length){let l1=q.length-this.#l;_=_.slice(0,_.length-l1),Y="max-length"}else return this.#d.playStrictRejectAnimation(),this.#h(W.STRICT_REJECT,{source:"paste",rejectedInput:i,reason:"max-length"}),this.#w(n),!0}this.#a(_);let z=u+T.length;return t.setSelectionRange(z,z),Y&&(S.length>0&&T.length===0&&this.#d.playStrictRejectAnimation(),this.#h(W.STRICT_REJECT,{source:"paste",rejectedInput:i,reason:Y})),!1}#w(t){this.#a(t.value),this.#d.telInputEl.setSelectionRange(t.selectionStart,t.selectionEnd)}#n1(t){let n=Number(this.#d.telInputEl.getAttribute("maxlength"));return n&&t.length>n?t.substring(0,n):t}#h(t,n={}){let i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});this.#d.telInputEl.dispatchEvent(i)}#D(){this.#d.isDropdownOpen()||(this.#d.openDropdown(t=>this.#s1(t),()=>this.#R()),this.#h(W.OPEN_COUNTRY_DROPDOWN))}#p(t){let{formatOnDisplay:n,nationalMode:i,separateDialCode:s}=this.#e,u=t;if(n&&C.utils&&this.#t){let h=i0(t),g=i&&!h||!u.startsWith("+")&&!s?N1.NATIONAL:N1.INTERNATIONAL;u=C.utils.formatNumber(u,this.#t?.iso2,g)}u=this.#r1(u),this.#a(u)}#x(t){let n=this.#V(t);return n!==null?this.#y(n):!1}#i1(t){let n=this.#t?.dialCode,i=this.#t?.nationalPrefix;if(t.startsWith("+")||!n)return t;let h=i&&t.startsWith(i)&&!this.#e.separateDialCode?t.substring(1):t;return`+${n}${h}`}#V(t){let n=t.indexOf("+"),i=n>0?t.substring(n):t,s=this.#t?.iso2;i=this.#i1(i);let u=this.#N(i,!0),h=Q(i);if(u){let p=Q(u),g=this.#v[p];return g.length===1?g[0]===s?null:g[0]:this.#$1(g,p,h)}else if(i.startsWith("+")&&h.length){let p=this.#t?.dialCode||"";return p&&p.startsWith(h)?null:""}else if((!i||i==="+")&&!s&&this.#C)return this.#C;return null}#$1(t,n,i){let s=this.#t?.iso2,u=this.#t?.dialCode;if(!s&&this.#C&&t.includes(this.#C))return this.#C;if(u===H1.NANP&&s0(i))return null;let p=this.#t?.areaCodes,g=this.#t?.priority;if(p){let B=p.map(M=>`${u}${M}`);for(let M of B)if(i.startsWith(M))return null}let S=p&&!(g===0)&&i.length>n.length,L=s&&t.includes(s)&&!S,b=s===t[0];return!L&&!b?t[0]:null}#y(t){let n=this.#t?.iso2||"";return this.#t=t?this.#O.get(t):null,this.#t&&(this.#C=this.#t.iso2),this.#d.setCountry(this.#t),this.#H(),this.#j(),n!==t}#j(){let{strictMode:t,placeholderNumberType:n,allowedNumberTypes:i}=this.#e;if(!t||!C.utils)return;let s=this.#t?.iso2;if(!s){this.#l=null;return}let u=C.utils.getExampleNumber(s,!1,n,!0),h=u;for(;C.utils.isPossibleNumber(u,s,i);)h=u,u+="0";let p=C.utils.getCoreNumber(h,s);this.#l=p.length,s==="by"&&(this.#l=p.length+1)}#H(){let{autoPlaceholder:t,placeholderNumberType:n,nationalMode:i,customPlaceholder:s}=this.#e,u=t===h1.AGGRESSIVE||!this.#d.hadInitialPlaceholder&&t===h1.POLITE;if(!C.utils||!u)return;let h=this.#t?C.utils.getExampleNumber(this.#t.iso2,i,n):"";h=this.#r1(h),typeof s=="function"&&(h=s(h,this.#t)),this.#d.telInputEl.setAttribute("placeholder",h)}#s1(t){if(!t)return;let n=t.dataset[J.ISO2],i=this.#y(n);this.#R();let s=t.dataset[J.DIAL_CODE];if(this.#K(s),this.#e.formatOnDisplay){let u=this.#r();this.#p(u)}this.#d.telInputEl.focus(),i&&(this.#Z(),this.#h(W.INPUT,{isCountryChange:!0}))}#R(t){!this.#d.isDropdownOpen()||this.#e.dropdownAlwaysOpen&&!t||(this.#d.closeDropdown(),this.#h(W.CLOSE_COUNTRY_DROPDOWN))}#K(t){let n=this.#r();if(!n.startsWith("+"))return;let i=`+${t}`,s=this.#N(n),u;s?u=n.replace(s,i):u=i,this.#a(u)}#N(t,n){if(!t.startsWith("+"))return"";let i="",s="",u=!1;for(let h=0;hp)return!1}}return this.#l1("possible")}isValidNumberPrecise(){return this.#$?(m1("isValidNumberPrecise"),this.#l1("precise")):null}#l1(t){let{allowNumberExtensions:n,allowPhonewords:i,allowedNumberTypes:s}=this.#e,u=this.#t?.iso2,h=this.#S();return!this.#t&&!i0(h)||!(t==="precise"?C.utils.isValidNumber:C.utils.isPossibleNumber)(h,u,s)?!1:Z.ALPHA_UNICODE.test(h)?!!C.utils.getExtension(h,u)?n:i:!0}setCountry(t){if(!this.#$)return;let n=t?.toLowerCase();if(!r1(n))throw new Error(`Invalid iso2 code: '${n}'`);let i=this.#t?.iso2;if(t&&n!==i||!t&&i){if(this.#y(n),this.#K(this.#t?.dialCode||""),this.#e.formatOnDisplay){let u=this.#r();this.#p(u)}this.#Z(),this.#h(W.INPUT,{isCountryChange:!0})}}setNumber(t){if(!this.#$)return;let n=this.#f.normalise(t),i=this.#x(n);this.#p(n),i&&this.#Z(),this.#h(W.INPUT,{isSetNumber:!0})}setPlaceholderNumberType(t){this.#$&&(this.#e.placeholderNumberType=t,this.#H())}setDisabled(t){this.#$&&this.#d.setDisabled(t)}setReadonly(t){this.#$&&this.#d.setReadonly(t)}static forEachInstance(t,...n){let i=[...C.instances.values()],s=n[0];i.forEach(u=>{if(u instanceof r)switch(t){case"handleUtilsLoaded":u.#a1();break;case"handleUtilsFailure":u.#c1(s);break;case"handleAutoCountryLoaded":u.#o1();break;case"handleAutoCountryFailure":u.#u1();break}})}},q2=async r=>{if(C.utils||C.startedLoadingUtils)return null;if(typeof r!="function")throw new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utils module, not ${typeof r}`);C.startedLoadingUtils=!0;try{let n=(await r())?.default;if(!n||typeof n!="object")throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return C.utils=n,L1.forEachInstance("handleUtilsLoaded"),!0}catch(t){throw L1.forEachInstance("handleUtilsFailure",t),t}},C=Object.assign((r,t)=>{let n=new L1(r,t);return C.instances.set(String(n.id),n),r.iti=n,n},{defaults:k1,documentReady:()=>document.readyState==="complete",getCountryData:()=>c1,getInstance:r=>{let t=r.dataset[J.INSTANCE_ID];return t?C.instances.get(t)??null:null},instances:new Map,attachUtils:q2,startedLoadingUtils:!1,startedLoadingAutoCountry:!1,version:"28.1.0",NUMBER_FORMAT:N1,NUMBER_TYPE:o1,VALIDATION_ERROR:Q1}),r0=C;var g2={};(function(){var r=this||self;function t(d,e){d=d.split(".");var $=r;d[0]in $||typeof $.execScript>"u"||$.execScript("var "+d[0]);for(var o;d.length&&(o=d.shift());)d.length||e===void 0?$[o]&&$[o]!==Object.prototype[o]?$=$[o]:$=$[o]={}:$[o]=e}function n(d,e){function $(){}$.prototype=e.prototype,d.na=e.prototype,d.prototype=new $,d.prototype.constructor=d,d.ta=function(o,l,a){for(var c=Array(arguments.length-2),f=2;f0)?d:e;if(!d.o)return e;if(d=d.u,d===String){if(typeof e=="number")return String(e)}else if(d===Number&&typeof e=="string"&&(e==="Infinity"||e==="-Infinity"||e==="NaN"||u0.test(e)))return Number(e);return e};var u0=/^-?[0-9]+$/;function F1(){}n(F1,w1),F1.prototype.g=function(d,e){return d=new d.h,d.l=this,d.h=e,d.g={},d};function C1(){}n(C1,F1),C1.prototype.h=function(d,e){return d.h==8?!!e:w1.prototype.h.apply(this,arguments)},C1.prototype.g=function(d,e){return C1.na.g.call(this,d,e)};function R(d,e){d!=null&&this.g.apply(this,arguments)}R.prototype.h="",R.prototype.set=function(d){this.h=""+d},R.prototype.g=function(d,e,$){if(this.h+=String(d),e!=null)for(let o=1;o0)return $}$=N(d,1);var o=A1(d);if(e==0)return T0($,0,o,"");if(!($ in E1))return o;var l=I1(this,$,S1($));d=D(d,3)&&m(d,3).length!=0?e==3?";ext="+m(d,3):D(l,13)?m(l,13)+N(d,3):" ext. "+N(d,3):"";d:{l=(k(l,20)||[]).length==0||e==2?k(l,19)||[]:k(l,20)||[];for(var a,c=l.length,f=0;f0?o.replace(a,l.replace(w2,c)):o.replace(a,l),e==3&&(o=o.replace(RegExp("^[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E]+"),""),o=o.replace(RegExp("[-x\u2010-\u2015\u2212\u30FC\uFF0D-\uFF0F \xA0\xAD\u200B\u2060\u3000()\uFF08\uFF09\uFF3B\uFF3D.\\[\\]/~\u2053\u223C\uFF5E]+","g"),"-"))),T0($,e,o,d)};function I1(d,e,$){return $=="001"?e1(d,""+e):e1(d,$)}function A1(d){if(!D(d,2))return"";var e=""+m(d,2);return D(d,4)&&m(d,4)&&N(d,8)>0?Array(N(d,8)+1).join("0")+e:e}function T0(d,e,$,o){switch(e){case 0:return"+"+d+$+o;case 1:return"+"+d+" "+$+o;case 3:return"tel:+"+d+"-"+$+o;default:return $+o}}function D1(d,e){switch(e){case 4:return m(d,5);case 3:return m(d,4);case 1:return m(d,3);case 0:case 2:return m(d,2);case 5:return m(d,6);case 6:return m(d,8);case 7:return m(d,7);case 8:return m(d,21);case 9:return m(d,25);case 10:return m(d,28);default:return m(d,1)}}function N0(d,e){var $=v0(d,e);return d=I1(d,N(e,1),$),d==null?-1:(e=A1(e),V1(e,d))}function V1(d,e){return V(d,m(e,1))?V(d,m(e,5))?4:V(d,m(e,4))?3:V(d,m(e,6))?5:V(d,m(e,8))?6:V(d,m(e,7))?7:V(d,m(e,21))?8:V(d,m(e,25))?9:V(d,m(e,28))?10:V(d,m(e,2))?m(e,18)||V(d,m(e,3))?2:0:!m(e,18)&&V(d,m(e,3))?1:-1:-1}function e1(d,e){if(e==null)return null;e=e.toUpperCase();var $=d.g[e];if($==null){if($=f0[e],$==null)return null;$=new C1().g(i1.m(),$),d.g[e]=$}return $}function V(d,e){var $=d.length;return d1(e,9)>0&&u1(e).indexOf($)==-1?!1:X(N(e,2),d)}function _2(d,e){var $=v0(d,e),o=N(e,1),l=I1(d,o,$);return l==null||$!="001"&&o!=L0(d,$)?l=!1:(d=A1(e),l=V1(d,l)!=-1),l}function v0(d,e){if(e==null)return null;var $=N(e,1);if($=E1[$],$==null)d=null;else if($.length==1)d=$[0];else d:{e=A1(e);for(var o,l=$.length,a=0;a-1?4:($=a[0],$==e?0:$>e?2:a[a.length-1]-1?0:5))}function M1(d,e,$){var o=A1(e);return e=N(e,1),e in E1?(e=I1(d,e,S1(e)),R1(d,o,e,$)):1}function b0(d,e){if(d=d.toString(),d.length==0||d.charAt(0)=="0")return 0;for(var $,o=d.length,l=1;l<=3&&l<=o;++l)if($=parseInt(d.substring(0,l),10),$ in E1)return e.g(d.substring(l)),$;return 0}function w0(d,e,$,o,l,a){if(e.length==0)return 0;e=new R(e);var c;$!=null&&(c=m($,11)),c==null&&(c="NonMatch");var f=e.toString();if(f.length==0)c=20;else if(y1.test(f))f=f.replace(y1,""),G(e),e.g(y0(f)),c=1;else{if(f=new RegExp(c),I0(e),c=e.toString(),c.search(f)==0){f=c.match(f)[0].length;var E=c.substring(f).match(g0);E&&E[1]!=null&&E[1].length>0&&O1(E[1],W1)=="0"?c=!1:(G(e),e.g(c.substring(f)),c=!0)}else c=!1;c=c?5:20}if(l&&x(a,6,c),c!=20){if(e.h.length<=2)throw Error("Phone number too short after IDD");if(d=b0(e,o),d!=0)return x(a,1,d),d;throw Error("Invalid country calling code")}return $!=null&&(c=N($,10),f=""+c,E=e.toString(),E.lastIndexOf(f,0)==0&&(f=new R(E.substring(f.length)),E=m($,1),E=new RegExp(N(E,2)),O0(f,$,null),f=f.toString(),!X(E,e.toString())&&X(E,f)||R1(d,e.toString(),$,-1)==3))?(o.g(f),l&&x(a,6,10),x(a,1,c),c):(x(a,1,0),0)}function O0(d,e,$){var o=d.toString(),l=o.length,a=m(e,15);if(l!=0&&a!=null&&a.length!=0&&(a=new RegExp("^(?:"+a+")"),l=a.exec(o))){var c=RegExp,f=m(e,1);f=N(f,2),c=new c(f),f=X(c,o);var E=l.length-1;e=m(e,16),e==null||e.length==0||l[E]==null||l[E].length==0?(!f||X(c,o.substring(l[0].length)))&&($!=null&&E>0&&l[E]!=null&&$.g(l[1]),d.set(o.substring(l[0].length))):(o=o.replace(a,e),(!f||X(c,o))&&($!=null&&E>0&&$.g(l[1]),d.set(o)))}}function $1(d,e,$){if(!_1($)&&e.length>0&&e.charAt(0)!="+")throw Error("Invalid country calling code");return _0(d,e,$,!0)}function _0(d,e,$,o){if(e==null)throw Error("The string supplied did not seem to be a phone number");if(e.length>250)throw Error("The string supplied is too long to be a phone number");var l=new R,a=e.indexOf(";phone-context=");if(a===-1)a=null;else if(a+=15,a>=e.length)a="";else{var c=e.indexOf(";",a);a=c!==-1?e.substring(a,c):e.substring(a)}var f=a;if(f==null?c=!0:f.length===0?c=!1:(c=v2.exec(f),f=L2.exec(f),c=c!==null||f!==null),!c||(a!=null?(a.charAt(0)==="+"&&l.g(a),a=e.indexOf("tel:"),l.g(e.substring(a>=0?a+4:0,e.indexOf(";phone-context=")))):(a=l.g,c=e??"",f=c.search(A2),f>=0?(c=c.substring(f),c=c.replace(T2,""),f=c.search(S2),f>=0&&(c=c.substring(0,f))):c="",a.call(l,c)),a=l.toString(),c=a.indexOf(";isub="),c>0&&(G(l),l.g(a.substring(0,c))),!E0(l.toString())))throw Error("The string supplied did not seem to be a phone number");if(a=l.toString(),!(_1($)||a!=null&&a.length>0&&y1.test(a)))throw Error("Invalid country calling code");a=new t1,o&&x(a,5,e);d:{if(e=l.toString(),c=e.search(C0),c>=0&&E0(e.substring(0,c))){f=e.match(C0);for(var E=f.length,j=1;j0){G(l),l.g(e.substring(0,c)),e=f[j];break d}}e=""}e.length>0&&x(a,3,e),c=e1(d,$),e=new R,f=0,E=l.toString();try{f=w0(d,E,c,e,o,a)}catch(x1){if(x1.message=="Invalid country calling code"&&y1.test(E)){if(E=E.replace(y1,""),f=w0(d,E,c,e,o,a),f==0)throw x1}else throw x1}if(f!=0?(l=S1(f),l!=$&&(c=I1(d,f,l))):(I0(l),e.g(l.toString()),$!=null?(f=N(c,10),x(a,1,f)):o&&(delete a.h[6],a.g&&delete a.g[6])),e.h.length<2||(c!=null&&($=new R,l=new R(e.toString()),O0(l,c,$),d=R1(d,l.toString(),c,-1),d!=2&&d!=4&&d!=5&&(e=l,o&&$.toString().length>0&&x(a,7,$.toString()))),o=e.toString(),d=o.length,d<2))throw Error("The string supplied is too short to be a phone number");if(d>17)throw Error("The string supplied is too long to be a phone number");if(o.length>1&&o.charAt(0)=="0"){for(x(a,4,!0),d=1;d0?(a.$.g(E),a=!0):a=!1,a)return d.ea=l,d.ia=R0.test(m(o,4)),d.ba=0,!0}return d.v=!1}function x0(d,e){for(var $=[],o=e.length-3,l=d.j.length,a=0;a0&&(e=d.g.toString(),G(d.g),d.g.g(d.o),d.g.g(e),e=d.h.toString(),$=e.lastIndexOf(d.o),G(d.h),d.h.g(e.substring(0,$))),d.o!=k0(d))return d.h.g(" "),H0(d)}return d.u.toString()}switch(d.da.h.length){case 0:case 1:case 2:return d.u.toString();case 3:if(G0(d))d.fa=!0;else return d.o=k0(d),j1(d);default:return d.fa?(F0(d)&&(d.fa=!1),d.h.toString()+d.g.toString()):d.j.length>0?(e=W0(d,e),$=U0(d),$.length>0?$:(x0(d,d.g.toString()),P0(d)?B0(d):d.v?P1(d,e):d.u.toString())):j1(d)}}function H0(d){return d.v=!0,d.fa=!1,d.j=[],d.ba=0,G(d.$),d.ea="",j1(d)}function U0(d){for(var e=d.g.toString(),$=d.j.length,o=0;o<$;++o){var l=d.j[o],a=N(l,1);if(new RegExp("^(?:"+a+")$").test(e)&&(d.ia=R0.test(m(l,4)),l=e.replace(new RegExp(a,"g"),m(l,2)),l=P1(d,l),O1(l,E2)==d.da))return l}return""}function P1(d,e){var $=d.h.h.length;return d.ia&&$>0&&d.h.toString().charAt($-1)!=" "?d.h+" "+e:d.h+e}function j1(d){var e=d.g.toString();if(e.length>=3){for(var $=d.aa&&d.o.length==0&&d1(d.l,20)>0?k(d.l,20)||[]:k(d.l,19)||[],o=$.length,l=0;l0&&S0(N(a,4))&&!m(a,6)&&!D(a,5)||(d.o.length!=0||d.aa||S0(N(a,4))||m(a,6))&&R2.test(N(a,2))&&d.j.push(a)}return x0(d,e),e=U0(d),e.length>0?e:P0(d)?B0(d):d.u.toString()}return P1(d,e)}function B0(d){var e=d.g.toString(),$=e.length;if($>0){for(var o="",l=0;l<$;l++)o=W0(d,e.charAt(l));return d.v?P1(d,o):d.u.toString()}return d.h.toString()}function k0(d){var e=d.g.toString(),$=0;if(m(d.l,10)!=1)var o=!1;else o=d.g.toString(),o=o.charAt(0)=="1"&&o.charAt(1)!="0"&&o.charAt(1)!="1";return o?($=1,d.h.g("1").g(" "),d.aa=!0):D(d.l,15)&&(o=new RegExp("^(?:"+m(d.l,15)+")"),o=e.match(o),o!=null&&o[0]!=null&&o[0].length>0&&(d.aa=!0,$=o[0].length,d.h.g(e.substring(0,$)))),G(d.g),d.g.g(e.substring($)),e.substring(0,$)}function G0(d){var e=d.da.toString(),$=new RegExp("^(?:\\+|"+m(d.l,11)+")");return $=e.match($),$!=null&&$[0]!=null&&$[0].length>0?(d.aa=!0,$=$[0].length,G(d.g),d.g.g(e.substring($)),G(d.h),d.h.g(e.substring(0,$)),e.charAt(0)!="+"&&d.h.g(" "),!0):!1}function F0(d){if(d.g.h.length==0)return!1;var e=new R,$=b0(d.g,e);return $==0?!1:(G(d.g),d.g.g(e.toString()),e=S1($),e=="001"?d.l=e1(d.ha,""+$):e!=d.la&&(d.l=M0(d,e)),d.h.g(""+$).g(" "),d.o="",!0)}function W0(d,e){var $=d.$.toString();if($.substring(d.ba).search(d.ga)>=0){var o=$.search(d.ga);return e=$.replace(d.ga,e),G(d.$),d.$.g(e),d.ba=o,e.substring(0,d.ba+1)}return d.j.length==1&&(d.v=!1),d.ea="",d.u.toString()}let V0={};["E164","INTERNATIONAL","NATIONAL","RFC3966"].forEach((d,e)=>{V0[d]=e});let s1={};"FIXED_LINE MOBILE FIXED_LINE_OR_MOBILE TOLL_FREE PREMIUM_RATE SHARED_COST VOIP PERSONAL_NUMBER PAGER UAN VOICEMAIL UNKNOWN".split(" ").forEach((d,e)=>{s1[d]=e}),s1.UNKNOWN=-1;let K1={};"IS_POSSIBLE INVALID_COUNTRY_CODE TOO_SHORT TOO_LONG IS_POSSIBLE_LOCAL_ONLY INVALID_LENGTH".split(" ").forEach((d,e)=>{K1[d]=e});let j0={};Object.keys(s1).forEach(d=>{j0[s1[d]]=d});let K0={};Object.keys(K1).forEach(d=>{K0[K1[d]]=d});let Y0=d=>{let e=[];return d.includes("FIXED_LINE_OR_MOBILE")?(d.includes("MOBILE")||e.push("MOBILE"),d.includes("FIXED_LINE")||e.push("FIXED_LINE")):(d.includes("MOBILE")||d.includes("FIXED_LINE"))&&e.push("FIXED_LINE_OR_MOBILE"),d.concat(e)};t("utils",{}),t("utils.formatNumberAsYouType",(d,e)=>{try{let $=d.replace(/[^+0-9]/g,""),o=new D2(e);e="";for(let l=0;l<$.length;l++)o.ka=M2(o,$.charAt(l)),e=o.ka;return e}catch{return d}}),t("utils.formatNumber",(d,e,$)=>{try{let l=H.g(),a=$1(l,d,e);var o=M1(l,a,-1);return o==0||o==4?l.format(a,typeof $>"u"?0:V0[$]):d}catch{return d}}),t("utils.getExampleNumber",(d,e,$,o)=>{try{let j=H.g();d:{var l=j,a=s1[$];if(_1(d)){var c=D1(e1(l,d),a);try{if(D(c,6)){var f=m(c,6),E=_0(l,f,d,!1);break d}}catch{}}E=null}return j.format(E,o?0:e?2:1)}catch{return""}}),t("utils.getExtension",(d,e)=>{try{var $=$1(H.g(),d,e);return m($,3)}catch{return""}}),t("utils.getNumberType",(d,e)=>{try{let $=H.g(),o=$1($,d,e),l=N0($,o);return j0[l]||null}catch{return null}}),t("utils.getValidationError",(d,e)=>{if(!e)return"INVALID_COUNTRY_CODE";try{let $=H.g(),o=$1($,d,e),l=M1($,o,-1);return K0[l]||null}catch($){return $.message==="Invalid country calling code"?"INVALID_COUNTRY_CODE":d.length<=3||$.message==="Phone number too short after IDD"||$.message==="The string supplied is too short to be a phone number"?"TOO_SHORT":$.message==="The string supplied is too long to be a phone number"?"TOO_LONG":null}}),t("utils.isValidNumber",(d,e,$)=>{try{let o=H.g(),l=$1(o,d,e),a=_2(o,l);if($){let c=Y0($).map(f=>s1[f]);return a&&c.includes(N0(o,l))}return a}catch{return!1}}),t("utils.isPossibleNumber",(d,e,$)=>{try{let o=H.g(),l=$1(o,d,e);if($){let a=Y0($);for(let c of a)if(M1(o,l,s1[c])===0)return!0;return!1}return M1(o,l,-1)===0}catch{return!1}}),t("utils.getCoreNumber",(d,e)=>{try{var $=$1(H.g(),d,e);return m($,2).toString()}catch{return""}})}).call(g2);var m2=g2.utils;r0.utils=m2;var dd=r0;return k2(td);})(); var intlTelInput = _factory.default;