vendor: 10,803 bytes, line 1
1import{g as Ft,e as Wt,o as Vt,w as $t,s as Gt,i as zt,k as jt,v as Kt,u as Yt,j as V,K as qt,z as pt,t as Xt,r as $,_ as Qt}from"./index-znqRjZ0b.js";import{_ as Jt}from"./_plugin-vue_export-helper-DlAUqK2U.js";var mt={exports:{}};(function(U){(function(N){U.exports?U.exports=N():window.intlTelInput=N()})(()=>{var N=(()=>{var M=Object.defineProperty,j=Object.getOwnPropertyDescriptor,K=Object.getOwnPropertyNames,Y=Object.prototype.hasOwnProperty,L=(n,t)=>{for(var e in t)M(n,e,{get:t[e],enumerable:!0})},A=(n,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of K(t))!Y.call(n,s)&&s!==e&&M(n,s,{get:()=>t[s],enumerable:!(i=j(t,s))||i.enumerable});return n},B=n=>A(M({},"__esModule",{value:!0}),n),O={};L(O,{Iti:()=>ht,default:()=>Bt});var q=[["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"]],H=[];for(const n of q)H.push({name:"",iso2:n[0],dialCode:n[1],priority:n[2]||0,areaCodes:n[3]||null,nodeById:{},nationalPrefix:n[4]||null,normalisedName:"",initials:"",dialCodePlus:""});var v=H,_={ad:"Andorra",ae:"United Arab Emirates",af:"Afghanistan",ag:"Antigua & Barbuda",ai:"Anguilla",al:"Albania",am:"Armenia",ao:"Angola",ar:"Argentina",as:"American Samoa",at:"Austria",au:"Australia",aw:"Aruba",ax:"Ã
land Islands",az:"Azerbaijan",ba:"Bosnia & Herzegovina",bb:"Barbados",bd:"Bangladesh",be:"Belgium",bf:"Burkina Faso",bg:"Bulgaria",bh:"Bahrain",bi:"Burundi",bj:"Benin",bl:"St. Barthélemy",bm:"Bermuda",bn:"Brunei",bo:"Bolivia",bq:"Caribbean Netherlands",br:"Brazil",bs:"Bahamas",bt:"Bhutan",bw:"Botswana",by:"Belarus",bz:"Belize",ca:"Canada",cc:"Cocos (Keeling) Islands",cd:"Congo - Kinshasa",cf:"Central African Republic",cg:"Congo - Brazzaville",ch:"Switzerland",ci:"Côte dâIvoire",ck:"Cook Islands",cl:"Chile",cm:"Cameroon",cn:"China",co:"Colombia",cr:"Costa Rica",cu:"Cuba",cv:"Cape Verde",cw:"Curaçao",cx:"Christmas Island",cy:"Cyprus",cz:"Czechia",de:"Germany",dj:"Djibouti",dk:"Denmark",dm:"Dominica",do:"Dominican Republic",dz:"Algeria",ec:"Ecuador",ee:"Estonia",eg:"Egypt",eh:"Western Sahara",er:"Eritrea",es:"Spain",et:"Ethiopia",fi:"Finland",fj:"Fiji",fk:"Falkland Islands",fm:"Micronesia",fo:"Faroe Islands",fr:"France",ga:"Gabon",gb:"United Kingdom",gd:"Grenada",ge:"Georgia",gf:"French Guiana",gg:"Guernsey",gh:"Ghana",gi:"Gibraltar",gl:"Greenland",gm:"Gambia",gn:"Guinea",gp:"Guadeloupe",gq:"Equatorial Guinea",gr:"Greece",gt:"Guatemala",gu:"Guam",gw:"Guinea-Bissau",gy:"Guyana",hk:"Hong Kong SAR China",hn:"Honduras",hr:"Croatia",ht:"Haiti",hu:"Hungary",id:"Indonesia",ie:"Ireland",il:"Israel",im:"Isle of Man",in:"India",io:"British Indian Ocean Territory",iq:"Iraq",ir:"Iran",is:"Iceland",it:"Italy",je:"Jersey",jm:"Jamaica",jo:"Jordan",jp:"Japan",ke:"Kenya",kg:"Kyrgyzstan",kh:"Cambodia",ki:"Kiribati",km:"Comoros",kn:"St. Kitts & Nevis",kp:"North Korea",kr:"South Korea",kw:"Kuwait",ky:"Cayman Islands",kz:"Kazakhstan",la:"Laos",lb:"Lebanon",lc:"St. Lucia",li:"Liechtenstein",lk:"Sri Lanka",lr:"Liberia",ls:"Lesotho",lt:"Lithuania",lu:"Luxembourg",lv:"Latvia",ly:"Libya",ma:"Morocco",mc:"Monaco",md:"Moldova",me:"Montenegro",mf:"St. Martin",mg:"Madagascar",mh:"Marshall Islands",mk:"North Macedonia",ml:"Mali",mm:"Myanmar (Burma)",mn:"Mongolia",mo:"Macao SAR China",mp:"Northern Mariana Islands",mq:"Martinique",mr:"Mauritania",ms:"Montserrat",mt:"Malta",mu:"Mauritius",mv:"Maldives",mw:"Malawi",mx:"Mexico",my:"Malaysia",mz:"Mozambique",na:"Namibia",nc:"New Caledonia",ne:"Niger",nf:"Norfolk Island",ng:"Nigeria",ni:"Nicaragua",nl:"Netherlands",no:"Norway",np:"Nepal",nr:"Nauru",nu:"Niue",nz:"New Zealand",om:"Oman",pa:"Panama",pe:"Peru",pf:"French Polynesia",pg:"Papua New Guinea",ph:"Philippines",pk:"Pakistan",pl:"Poland",pm:"St. Pierre & Miquelon",pr:"Puerto Rico",ps:"Palestinian Territories",pt:"Portugal",pw:"Palau",py:"Paraguay",qa:"Qatar",re:"Réunion",ro:"Romania",rs:"Serbia",ru:"Russia",rw:"Rwanda",sa:"Saudi Arabia",sb:"Solomon Islands",sc:"Seychelles",sd:"Sudan",se:"Sweden",sg:"Singapore",sh:"St. Helena",si:"Slovenia",sj:"Svalbard & Jan Mayen",sk:"Slovakia",sl:"Sierra Leone",sm:"San Marino",sn:"Senegal",so:"Somalia",sr:"Suriname",ss:"South Sudan",st:"São Tomé & PrÃncipe",sv:"El Salvador",sx:"Sint Maarten",sy:"Syria",sz:"Eswatini",tc:"Turks & Caicos Islands",td:"Chad",tg:"Togo",th:"Thailand",tj:"Tajikistan",tk:"Tokelau",tl:"Timor-Leste",tm:"Turkmenistan",tn:"Tunisia",to:"Tonga",tr:"Turkey",tt:"Trinidad & Tobago",tv:"Tuvalu",tw:"Taiwan",tz:"Tanzania",ua:"Ukraine",ug:"Uganda",us:"United States",uy:"Uruguay",uz:"Uzbekistan",va:"Vatican City",vc:"St. Vincent & Grenadines",ve:"Venezuela",vg:"British Virgin Islands",vi:"U.S. Virgin Islands",vn:"Vietnam",vu:"Vanuatu",wf:"Wallis & Futuna",ws:"Samoa",ye:"Yemen",yt:"Mayotte",za:"South Africa",zm:"Zambia",zw:"Zimbabwe"},y=_,I={selectedCountryAriaLabel:"Change country, selected ${countryName} (${dialCode})",noCountrySelected:"Select country",countryListAriaLabel:"List of countries",searchPlaceholder:"Search",clearSearchAriaLabel:"Clear search",zeroSearchResults:"No results found",oneSearchResult:"1 result found",multipleSearchResults:"${count} results found",ac:"Ascension Island",xk:"Kosovo"},X=I,G={...y,...X},F=G,R={OPEN_COUNTRY_DROPDOWN:"open:countrydropdown",CLOSE_COUNTRY_DROPDOWN:"close:countrydropdown",COUNTRY_CHANGE:"countrychange",INPUT:"input"},c={HIDE:"iti__hide",V_HIDE:"iti__v-hide",ARROW_UP:"iti__arrow--up",GLOBE:"iti__globe",FLAG:"iti__flag",COUNTRY_ITEM:"iti__country",HIGHLIGHT:"iti__highlight"},g={ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",SPACE:" ",ENTER:"Enter",ESC:"Escape",TAB:"Tab"}
1,ot={PASTE:"insertFromPaste",DELETE_FWD:"deleteContentForward"},x={ALPHA_UNICODE:new RegExp("\\p{L}","u"),NON_PLUS_NUMERIC:/[^+0-9]/,NON_PLUS_NUMERIC_GLOBAL:/[^+0-9]/g,HIDDEN_SEARCH_CHAR:/^[a-zA-ZÃ-ÿа-ÑÐ-Я ]$/},yt={HIDDEN_SEARCH_RESET_MS:1e3},rt={UNKNOWN_NUMBER_TYPE:-99,UNKNOWN_VALIDATION_ERROR:-99},Q={SANE_SELECTED_WITH_DIAL_WIDTH:78,SANE_SELECTED_NO_DIAL_WIDTH:42,INPUT_PADDING_EXTRA_LEFT:6},at={NANP:"1"},J={DIAL_CODE:"44",MOBILE_PREFIX:"7",MOBILE_CORE_LENGTH:10},gt={ISO2:"us"},Z={AGGRESSIVE:"aggressive",POLITE:"polite"},tt={AUTO:"auto"},lt={COUNTRY_CODE:"countryCode",DIAL_CODE:"dialCode"},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"},et=n=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(n).matches,_t=()=>{if(typeof navigator<"u"&&typeof window<"u"){const n=/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),t=et("(max-width: 500px)"),e=et("(max-height: 600px)"),i=et("(pointer: coarse)");return n||t||i&&e}return!1},ut={allowPhonewords:!1,allowDropdown:!0,autoPlaceholder:Z.POLITE,containerClass:"",countryOrder:null,countrySearch:!0,customPlaceholder:null,dropdownContainer:null,excludeCountries:[],fixDropdownWidth:!0,formatAsYouType:!0,formatOnDisplay:!0,geoIpLookup:null,hiddenInput:null,i18n:{},initialCountry:"",loadUtils:null,nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",showFlags:!0,separateDialCode:!1,strictMode:!1,useFullscreenPopup:_t(),validationNumberTypes:["MOBILE"]},It=(n,t)=>{n.useFullscreenPopup&&(n.fixDropdownWidth=!1),n.onlyCountries.length===1&&(n.initialCountry=n.onlyCountries[0]),n.separateDialCode&&(n.nationalMode=!1),n.allowDropdown&&!n.showFlags&&!n.separateDialCode&&(n.nationalMode=!1),n.useFullscreenPopup&&!n.dropdownContainer&&(n.dropdownContainer=document.body),n.i18n={...t,...n.i18n}},z=n=>n.replace(/\D/g,""),dt=(n="")=>n.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),bt=(n,t)=>{const e=dt(t),i=[],s=[],r=[],o=[],a=[],l=[];for(const h of n)h.iso2===e?i.push(h):h.normalisedName.startsWith(e)?s.push(h):h.normalisedName.includes(e)?r.push(h):e===h.dialCode||e===h.dialCodePlus?o.push(h):h.dialCodePlus.includes(e)?a.push(h):h.initials.includes(e)&&l.push(h);const d=(h,m)=>h.priority-m.priority;return[...i.sort(d),...s.sort(d),...r.sort(d),...o.sort(d),...a.sort(d),...l.sort(d)]},Nt=(n,t)=>{const e=t.toLowerCase();for(const i of n)if(i.name.toLowerCase().startsWith(e))return i;return null},it=n=>Object.keys(n).filter(t=>!!n[t]).join(" "),C=(n,t,e)=>{const i=document.createElement(n);return t&&Object.entries(t).forEach(([s,r])=>i.setAttribute(s,r)),e&&e.appendChild(i),i},wt=()=>` 2 <svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" ${p.HIDDEN}="true"> 3 <circle cx="11" cy="11" r="7" /> 4 <line x1="21" y1="21" x2="16.65" y2="16.65" /> 5 </svg>`,Dt=n=>{const t=`iti-${n}-clear-mask`;return` 6 <svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" ${p.HIDDEN}="true" focusable="false"> 7 <mask id="${t}" maskUnits="userSpaceOnUse"> 8 <rect width="16" height="16" fill="white" /> 9 <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" /> 10 </mask> 11 <circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${t})" /> 12 </svg>`},Et=class{constructor(n,t,e){this.highlightedItem=null,this.selectedItem=null,n.dataset.intlTelInputId=e.toString(),this.telInput=n,this.options=t,this.id=e,this.hadInitialPlaceholder=!!n.getAttribute("placeholder"),this.isRTL=!!this.telInput.closest("[dir=rtl]"),this.options.separateDialCode&&(this.originalPaddingLeft=this.telInput.style.paddingLeft)}generateMarkup(n){this.countries=n,this._prepareTelInput();const t=this._createWrapperAndInsert();this._maybeBuildCountryContainer(t),t.appendChild(this.telInput),this._maybeUpdateInputPaddingAndReveal(),this._maybeBuildHiddenInput
12s(t)}_prepareTelInput(){var n;this.telInput.classList.add("iti__tel-input"),!this.telInput.hasAttribute("autocomplete")&&!((n=this.telInput.form)!=null&&n.hasAttribute("autocomplete"))&&this.telInput.setAttribute("autocomplete","off")}_createWrapperAndInsert(){const{allowDropdown:n,showFlags:t,containerClass:e,useFullscreenPopup:i}=this.options,s=it({iti:!0,"iti--allow-dropdown":n,"iti--show-flags":t,"iti--inline-dropdown":!i,[e]:!!e}),r=C("div",{class:s});return this.isRTL&&r.setAttribute("dir","ltr"),this.telInput.before(r),r}_maybeBuildCountryContainer(n){const{allowDropdown:t,separateDialCode:e,showFlags:i}=this.options;if(t||i||e){this.countryContainer=C("div",{class:`iti__country-container ${c.V_HIDE}`},n),t?(this.selectedCountry=C("button",{type:"button",class:"iti__selected-country",[p.EXPANDED]:"false",[p.LABEL]:this.options.i18n.noCountrySelected,[p.HASPOPUP]:"dialog",[p.CONTROLS]:`iti-${this.id}__dropdown-content`},this.countryContainer),this.telInput.disabled&&this.selectedCountry.setAttribute("disabled","true")):this.selectedCountry=C("div",{class:"iti__selected-country"},this.countryContainer);const s=C("div",{class:"iti__selected-country-primary"},this.selectedCountry);this.selectedCountryInner=C("div",{class:c.FLAG},s),t&&(this.dropdownArrow=C("div",{class:"iti__arrow",[p.HIDDEN]:"true"},s)),e&&(this.selectedDialCode=C("div",{class:"iti__selected-dial-code"},this.selectedCountry)),t&&this._buildDropdownContent()}}_buildDropdownContent(){const{fixDropdownWidth:n,useFullscreenPopup:t,countrySearch:e,i18n:i,dropdownContainer:s,containerClass:r}=this.options,o=n?"":"iti--flexible-dropdown-width";if(this.dropdownContent=C("div",{id:`iti-${this.id}__dropdown-content`,class:`iti__dropdown-content ${c.HIDE} ${o}`,role:"dialog",[p.MODAL]:"true"}),this.isRTL&&this.dropdownContent.setAttribute("dir","rtl"),e&&this._buildSearchUI(),this.countryList=C("ul",{class:"iti__country-list",id:`iti-${this.id}__country-listbox`,role:"listbox",[p.LABEL]:i.countryListAriaLabel},this.dropdownContent),this._appendListItems(),e&&this.updateSearchResultsA11yText(),s){const a=it({iti:!0,"iti--container":!0,"iti--fullscreen-popup":t,"iti--inline-dropdown":!t,[r]:!!r});this.dropdown=C("div",{class:a}),this.dropdown.appendChild(this.dropdownContent)}else this.countryContainer.appendChild(this.dropdownContent)}_buildSearchUI(){const{i18n:n}=this.options,t=C("div",{class:"iti__search-input-wrapper"},this.dropdownContent);this.searchIcon=C("span",{class:"iti__search-icon",[p.HIDDEN]:"true"},t),this.searchIcon.innerHTML=wt(),this.searchInput=C("input",{id:`iti-${this.id}__search-input`,type:"search",class:"iti__search-input",placeholder:n.searchPlaceholder,role:"combobox",[p.EXPANDED]:"true",[p.LABEL]:n.searchPlaceholder,[p.CONTROLS]:`iti-${this.id}__country-listbox`,[p.AUTOCOMPLETE]:"list",autocomplete:"off"},t),this.searchClearButton=C("button",{type:"button",class:`iti__search-clear ${c.HIDE}`,[p.LABEL]:n.clearSearchAriaLabel,tabindex:"-1"},t),this.searchClearButton.innerHTML=Dt(this.id),this.searchResultsA11yText=C("span",{class:"iti__a11y-text"},this.dropdownContent),this.searchNoResults=C("div",{class:`iti__no-results ${c.HIDE}`,[p.HIDDEN]:"true"},this.dropdownContent),this.searchNoResults.textContent=n.zeroSearchResults}_maybeUpdateInputPaddingAndReveal(){this.countryContainer&&(this.updateInputPadding(),this.countryContainer.classList.remove(c.V_HIDE))}_maybeBuildHiddenInputs(n){var e,i;const{hiddenInput:t}=this.options;if(t){const s=this.telInput.getAttribute("name")||"",r=t(s);if(r.phone){const o=(e=this.telInput.form)==null?void 0:e.querySelector(`input[name="${r.phone}"]`);o?this.hiddenInput=o:(this.hiddenInput=C("input",{type:"hidden",name:r.phone}),n.appendChild(this.hiddenInput))}if(r.country){const o=(i=this.telInput.form)==null?void 0:i.querySelector(`input[name="${r.country}"]`);o?this.hiddenInputCountry=o:(this.hiddenInputCountry=C("input",{type:"hidden",name:r.country}),n.appendChild(this.hiddenInputCountry))}}}_appendListItems(){const n=document.createDocumentFragment();for(let t=0;t<this.countries.length;t++){const e=this.countries[t],i=it({[c.COUNTRY_ITEM]:!0}),s=C("li",{id:`iti-${this.id}__item-${e.iso2}`,class:i,tabindex:"-1",role:"option",[p.SELECTED]:"false"});s.dataset.dialCode=e.dialCode,s.dataset.countryCode=e.iso2,e.nodeById[this.id]=s,this.options.showFlags&&C("div",{class:`${c.FLAG} iti__${e.iso2}`},s);const r=C("span",{class:"iti__country-name"},s);r.textContent=e.name;const o=C("span",{class:"iti__dial-code"},s);this.isRTL&&o.setAttribute("dir","ltr"),o.textContent=`+${e.dialCode}`,n.appendChild(s)}this.countryList.appendChild(n)}updateInputPadding(){if(this.selectedCountry){const n=this.options.separateDialCode?Q.SANE_SELECTED_WITH_DIAL_WIDTH:Q.SANE_SELECTED_NO_DIAL_WIDTH,e=(this.selectedCountry.offsetWidth||this._getHiddenSelectedCountryWidth()||n)+Q.INPUT_PADDING_EXTRA_LEFT;this.telInput.style.paddingLeft=`${e}px`}}_getHiddenSelectedCountryWidth(){if(this.telInput.parentNode){let n;try{n=window.top.document.body}catch{n=document.body}const t=this.telInput.parentNode.cloneNode(!1);t.style.visibility="hidden",n.appendChild(t);const e=this.countryContainer.cloneNode();t.appendChild(e);const i=this.selectedCountry.cloneNode(!0);e.appendChild(i);const s=i.offsetWidth;return n.removeChild(t),s}return 0}updateSearchResultsA11yText(){const{i18n:n}=this.options,t=this.countryList.childElementCount;let e;t===0?e=n.zeroSearchResults:n.searchResultsText?e=n.searchResultsText(t):t===1?e=n.oneSearchResult:e=n.multipleSearchResults.replace("${count}",t.toString()),this.searchResultsA11yText.textContent=e}scrollTo(n){const t=this.countryList,e=document.documentElement.scrollTop,i=t.offsetHeight,s=t.getBoundingClientRect().top+e,r=s+i,o=n.offsetHeight,a=n.getBoundingClientRect().top+e,l=a+o,d=a-s+t.scrollTop;if(a<s)t.scrollTop=d;else if(l>r){const h=i-o;t.scrollTop=d-h}}highlightListItem(n,t){const e=this.highlightedItem;if(e&&e.classList.remove(c.HIGHLIGHT),this.highlightedItem=n,this.highlightedItem&&(this.highlightedItem.classList.add(c.HIGHLIGHT),this.options.countrySearch)){const i=this.highlightedItem.getAttribute("id")||"";this.searchInput.setAttribute(p.ACTIVE_DESCENDANT,i)}t&&this.highlightedItem.focus()}updateSelectedItem(n){if(this.selectedItem&&this.selectedItem.dataset.countryCode!==n&&(this.selectedItem.setAttribute(p.SELECTED,"false"),this.selectedItem=null),n&&!this.selectedItem){const t=this.countryList.querySelector(`[data-country-code="${n}"]`);t&&(t.setAttribute(p.SELECTED,"true"),this.selectedItem=t)}}filterCountries(n){this.countryList.innerHTML="";let t=!0;for(const e of n){const i=e.nodeById[this.id];i&&(this.countryList.appendChild(i),t&&(this.highlightListItem(i,!1),t=!1))}t?(this.highlightListItem(null,!1),this.searchNoResults&&this.searchNoResults.classList.remove(c.HIDE)):this.searchNoResults&&this.searchNoResults.classList.add(c.HIDE),this.countryList.scrollTop=0,this.updateSearchResultsA11yText()}destroy(){this.telInput.iti=void 0,delete this.telInput.dataset.intlTelInputId,this.options.separateDialCode&&(this.telInput.style.paddingLeft=this.originalPaddingLeft);const n=this.telInput.parentNode;n.before(this.telInput),n.remove(),this.telInput=null,this.countryContainer=null,this.selectedCountry=null,this.selectedCountryInner=null,this.selectedDialCode=null,this.dropdownArrow=null,this.dropdownContent=null,this.searchInput=null,this.searchIcon=null,this.searchClearButton=null,this.searchNoResults=null,this.searchResultsA11yText=null,this.countryList=null,this.dropdown=null,this.hiddenInput=null,this.hiddenInputCountry=null,this.highlightedItem=null,this.selectedItem=null;for(const t of this.countries)delete t.nodeById[this.id];this.countries=null}},vt=n=>{const{onlyCountries:t,excludeCountries:e}=n;if(t.length){const i=t.map(s=>s.toLowerCase());return v.filter(s=>i.includes(s.iso2))}else if(e.length){const i=e.map(s=>s.toLowerCase());return v.filter(s=>!i.includes(s.iso2))}return v},Lt=(n,t)=>{for(const e of n){const i=e.iso2.toLowerCase();t.i18n[i]&&(e.name=t.i18n[i])}},At=n=>{const t=new Set;let e=0;const i={},s=(o,a)=>
12{if(!o||!a)return;a.length>e&&(e=a.length),i.hasOwnProperty(a)||(i[a]=[]);const l=i[a];l.includes(o)||l.push(o)},r=[...n].sort((o,a)=>o.priority-a.priority);for(const o of r){t.has(o.dialCode)||t.add(o.dialCode);for(let a=1;a<o.dialCode.length;a++){const l=o.dialCode.substring(0,a);s(o.iso2,l)}if(s(o.iso2,o.dialCode),o.areaCodes){const a=i[o.dialCode][0];for(const l of o.areaCodes){for(let d=1;d<l.length;d++){const h=l.substring(0,d),m=o.dialCode+h;s(a,m),s(o.iso2,m)}s(o.iso2,o.dialCode+l)}}}return{dialCodes:t,dialCodeMaxLen:e,dialCodeToIso2Map:i}},Tt=(n,t)=>{t.countryOrder&&(t.countryOrder=t.countryOrder.map(e=>e.toLowerCase())),n.sort((e,i)=>{const{countryOrder:s}=t;if(s){const r=s.indexOf(e.iso2),o=s.indexOf(i.iso2),a=r>-1,l=o>-1;if(a||l)return a&&l?r-o:a?-1:1}return e.name.localeCompare(i.name)})},St=n=>{for(const t of n)t.normalisedName=dt(t.name),t.initials=t.normalisedName.split(/[^a-z]/).map(e=>e[0]).join(""),t.dialCodePlus=`+${t.dialCode}`},Pt=(n,t,e,i)=>{let s=n;if(e&&t){t=`+${i.dialCode}`;const r=s[t.length]===" "||s[t.length]==="-"?t.length+1:t.length;s=s.substring(r)}return s},Ot=(n,t,e,i,s)=>{const r=e?e.formatNumberAsYouType(n,i.iso2):n,{dialCode:o}=i;return s&&t.charAt(0)!=="+"&&r.includes(`+${o}`)?(r.split(`+${o}`)[1]||"").trim():r},Rt=(n,t,e,i)=>{if(e===0&&!i)return 0;let s=0;for(let r=0;r<t.length;r++){if(/[+0-9]/.test(t[r])&&s++,s===n&&!i)return r+1;if(i&&s===n+1)return r}return t.length},xt=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"],ct=n=>{const t=z(n);if(t.startsWith(at.NANP)&&t.length>=4){const e=t.substring(1,4);return xt.includes(e)}return!1};for(const n of v)n.name=F[n.iso2];var kt=0,Mt=new Set(v.map(n=>n.iso2)),st=n=>Mt.has(n),ht=class ft{constructor(t,e={}){this.id=kt++,this.options={...ut,...e},It(this.options,F),this.ui=new Et(t,this.options,this.id),this.isAndroid=ft._getIsAndroid(),this.promise=this._createInitPromises(),this.countries=vt(this.options);const{dialCodes:i,dialCodeMaxLen:s,dialCodeToIso2Map:r}=At(this.countries);this.dialCodes=i,this.dialCodeMaxLen=s,this.dialCodeToIso2Map=r,this.countryByIso2=new Map(this.countries.map(o=>[o.iso2,o])),this._init()}static _getIsAndroid(){return typeof navigator<"u"?/Android/i.test(navigator.userAgent):!1}_updateNumeralSet(t){/[\u0660-\u0669]/.test(t)?this.userNumeralSet="arabic-indic":/[\u06F0-\u06F9]/.test(t)?this.userNumeralSet="persian":this.userNumeralSet="ascii"}_mapAsciiToUserNumerals(t){if(this.userNumeralSet||this._updateNumeralSet(this.ui.telInput.value),this.userNumeralSet==="ascii")return t;const e=this.userNumeralSet==="arabic-indic"?1632:1776;return t.replace(/[0-9]/g,i=>String.fromCharCode(e+Number(i)))}_normaliseNumerals(t){if(!t)return"";if(this._updateNumeralSet(t),this.userNumeralSet==="ascii")return t;const e=this.userNumeralSet==="arabic-indic"?1632:1776,i=this.userNumeralSet==="arabic-indic"?/[\u0660-\u0669]/g:/[\u06F0-\u06F9]/g;return t.replace(i,s=>String.fromCharCode(48+(s.charCodeAt(0)-e)))}_getTelInputValue(){const t=this.ui.telInput.value.trim();return this._normaliseNumerals(t)}_setTelInputValue(t){this.ui.telInput.value=this._mapAsciiToUserNumerals(t)}_createInitPromises(){const t=new Promise((i,s)=>{this.resolveAutoCountryPromise=i,this.rejectAutoCountryPromise=s}),e=new Promise((i,s)=>{this.resolveUtilsScriptPromise=i,this.rejectUtilsScriptPromise=s});return Promise.all([t,e])}_init(){this.selectedCountryData={},this.abortController=new AbortController,this._processCountryData(),this.ui.generateMarkup(this.countries),this._setInitialState(),this._initListeners(),this._initRequests()}_processCountryData(){Lt(this.countries,this.options),Tt(this.countries,this.options),St(this.countries)}_setInitialState(t=!1){const e=this.ui.telInput.getAttribute("value"),i=this._normaliseNumerals(e),s=this._getTelInputValue(),o=i&&i.startsWith("+")&&(!s||!s.startsWith("+"))?i:s,a=this._getDialCode(o),l=ct(o),{initialCountry:d,geoIpLookup:h}=this.options,m=d===tt.AUTO&&h;if(a&&!l)this._updateCountryFromNumber(o);else if(!m||t){const w=d?d.toLowerCase():"";st(w)?this._setCountry(w):a&&l?this._setCountry(gt.ISO2):this._setCountry("")}
12o&&this._updateValFromNumber(o)}_initListeners(){this._initTelInputListeners(),this.options.allowDropdown&&this._initDropdownListeners(),(this.ui.hiddenInput||this.ui.hiddenInputCountry)&&this.ui.telInput.form&&this._initHiddenInputListener()}_initHiddenInputListener(){var e;const t=()=>{this.ui.hiddenInput&&(this.ui.hiddenInput.value=this.getNumber()),this.ui.hiddenInputCountry&&(this.ui.hiddenInputCountry.value=this.selectedCountryData.iso2||"")};(e=this.ui.telInput.form)==null||e.addEventListener("submit",t,{signal:this.abortController.signal})}_initDropdownListeners(){const t=this.abortController.signal,e=o=>{this.ui.dropdownContent.classList.contains(c.HIDE)?this.ui.telInput.focus():o.preventDefault()},i=this.ui.telInput.closest("label");i&&i.addEventListener("click",e,{signal:t});const s=()=>{this.ui.dropdownContent.classList.contains(c.HIDE)&&!this.ui.telInput.disabled&&!this.ui.telInput.readOnly&&this._openDropdown()};this.ui.selectedCountry.addEventListener("click",s,{signal:t});const r=o=>{this.ui.dropdownContent.classList.contains(c.HIDE)&&[g.ARROW_UP,g.ARROW_DOWN,g.SPACE,g.ENTER].includes(o.key)&&(o.preventDefault(),o.stopPropagation(),this._openDropdown()),o.key===g.TAB&&this._closeDropdown()};this.ui.countryContainer.addEventListener("keydown",r,{signal:t})}_initRequests(){const{loadUtils:t,initialCountry:e,geoIpLookup:i}=this.options;if(t&&!u.utils){const r=()=>{var o;(o=u.attachUtils(t))==null||o.catch(()=>{})};if(u.documentReady())r();else{const o=()=>{r()};window.addEventListener("load",o,{signal:this.abortController.signal})}}else this.resolveUtilsScriptPromise();e===tt.AUTO&&i&&!this.selectedCountryData.iso2?this._loadAutoCountry():this.resolveAutoCountryPromise()}_loadAutoCountry(){u.autoCountry?this.handleAutoCountry():u.startedLoadingAutoCountry||(u.startedLoadingAutoCountry=!0,typeof this.options.geoIpLookup=="function"&&this.options.geoIpLookup((t="")=>{const e=t.toLowerCase();st(e)?(u.autoCountry=e,setTimeout(()=>W("handleAutoCountry"))):(this._setInitialState(!0),W("rejectAutoCountryPromise"))},()=>{this._setInitialState(!0),W("rejectAutoCountryPromise")}))}_openDropdownWithPlus(){this._openDropdown(),this.ui.searchInput.value="+",this._filterCountriesByQuery("")}_initTelInputListeners(){this._bindInputListener(),this._maybeBindKeydownListener(),this._maybeBindPasteListener()}_bindInputListener(){const{strictMode:t,formatAsYouType:e,separateDialCode:i,allowDropdown:s,countrySearch:r}=this.options;let o=!1;x.ALPHA_UNICODE.test(this._getTelInputValue())&&(o=!0);const a=l=>{const d=this._getTelInputValue();if(this.isAndroid&&(l==null?void 0:l.data)==="+"&&i&&s&&r){const b=this.ui.telInput.selectionStart||0,T=d.substring(0,b-1),D=d.substring(b);this._setTelInputValue(T+D),this._openDropdownWithPlus();return}this._updateCountryFromNumber(d)&&this._triggerCountryChange();const h=(l==null?void 0:l.data)&&x.NON_PLUS_NUMERIC.test(l.data),m=(l==null?void 0:l.inputType)===ot.PASTE&&d;h||m&&!t?o=!0:x.NON_PLUS_NUMERIC.test(d)||(o=!1);const w=(l==null?void 0:l.detail)&&l.detail.isSetNumber,k=this.userNumeralSet==="ascii";if(e&&!o&&!w&&k){const b=this.ui.telInput.selectionStart||0,D=d.substring(0,b).replace(x.NON_PLUS_NUMERIC_GLOBAL,"").length,S=(l==null?void 0:l.inputType)===ot.DELETE_FWD,f=this._getFullNumber(),P=Ot(f,d,u.utils,this.selectedCountryData,this.options.separateDialCode),E=Rt(D,P,b,S);this._setTelInputValue(P),this.ui.telInput.setSelectionRange(E,E)}};this.ui.telInput.addEventListener("input",a,{signal:this.abortController.signal})}_maybeBindKeydownListener(){const{strictMode:t,separateDialCode:e,allowDropdown:i,countrySearch:s}=this.options;if(t||e){const r=o=>{if(o.key&&o.key.length===1&&!o.altKey&&!o.ctrlKey&&!o.metaKey){if(e&&i&&s&&o.key==="+"){o.preventDefault(),this._openDropdownWithPlus();return}if(t){const a=this._getTelInputValue(),d=!a.startsWith("+")&&this.ui.telInput.selectionStart===0&&o.key==="+",h=this._normaliseNumerals(o.key),m=/^[0-9]$/.test(h),w=e?m:d||m,k=this.ui.telInput,b=k.selectionStart,T=k.selectionEnd,D=a.slice(0,b),S=a.slice(T),f=D+o.key+S,P=this._getFullNumber(f),E=u.utils.getCoreNumber(P,this.selectedCountryData.iso2),nt=this.maxCoreNumberLength&&E.length>this.maxCoreNumberLength,Ht=this._getNewCountryFromNumber(P)!==null;(!w||nt&&!Ht&&!d)&&o.preventDefault()}}};this.ui.telInput.addEventListener("keydown",r,{signal:this.abortController.signal})}}
12_maybeBindPasteListener(){if(this.options.strictMode){const t=e=>{e.preventDefault();const i=this.ui.telInput,s=i.selectionStart,r=i.selectionEnd,o=this._getTelInputValue(),a=o.slice(0,s),l=o.slice(r),d=this.selectedCountryData.iso2,h=e.clipboardData.getData("text"),m=this._normaliseNumerals(h),w=s===0&&r>0,k=!o.startsWith("+")||w,b=m.replace(x.NON_PLUS_NUMERIC_GLOBAL,""),T=b.startsWith("+"),D=b.replace(/\+/g,""),S=T&&k?`+${D}`:D;let f=a+S+l;if(f.length>5){let E=u.utils.getCoreNumber(f,d);for(;E.length===0&&f.length>0;)f=f.slice(0,-1),E=u.utils.getCoreNumber(f,d);if(!E)return;if(this.maxCoreNumberLength&&E.length>this.maxCoreNumberLength)if(i.selectionEnd===o.length){const nt=E.length-this.maxCoreNumberLength;f=f.slice(0,f.length-nt)}else return}this._setTelInputValue(f);const P=s+S.length;i.setSelectionRange(P,P),i.dispatchEvent(new InputEvent("input",{bubbles:!0}))};this.ui.telInput.addEventListener("paste",t,{signal:this.abortController.signal})}}_cap(t){const e=Number(this.ui.telInput.getAttribute("maxlength"));return e&&t.length>e?t.substring(0,e):t}_trigger(t,e={}){const i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:e});this.ui.telInput.dispatchEvent(i)}_openDropdown(){const{fixDropdownWidth:t,countrySearch:e}=this.options;if(this.dropdownAbortController=new AbortController,t&&(this.ui.dropdownContent.style.width=`${this.ui.telInput.offsetWidth}px`),this.ui.dropdownContent.classList.remove(c.HIDE),this.ui.selectedCountry.setAttribute(p.EXPANDED,"true"),this._setDropdownPosition(),e){const i=this.ui.countryList.firstElementChild;i&&(this.ui.highlightListItem(i,!1),this.ui.countryList.scrollTop=0),this.ui.searchInput.focus()}this._bindDropdownListeners(),this.ui.dropdownArrow.classList.add(c.ARROW_UP),this._trigger(R.OPEN_COUNTRY_DROPDOWN)}_setDropdownPosition(){if(this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.ui.dropdown),!this.options.useFullscreenPopup){const t=this.ui.telInput.getBoundingClientRect(),e=this.ui.telInput.offsetHeight;if(this.options.dropdownContainer){this.ui.dropdown.style.top=`${t.top+e}px`,this.ui.dropdown.style.left=`${t.left}px`;const i=()=>this._closeDropdown();window.addEventListener("scroll",i,{signal:this.dropdownAbortController.signal})}}}_bindDropdownListeners(){const t=this.dropdownAbortController.signal;this._bindDropdownMouseoverListener(t),this._bindDropdownCountryClickListener(t),this._bindDropdownClickOffListener(t),this._bindDropdownKeydownListener(t),this.options.countrySearch&&this._bindDropdownSearchListeners(t)}_bindDropdownMouseoverListener(t){const e=i=>{var r;const s=(r=i.target)==null?void 0:r.closest(`.${c.COUNTRY_ITEM}`);s&&this.ui.highlightListItem(s,!1)};this.ui.countryList.addEventListener("mouseover",e,{signal:t})}_bindDropdownCountryClickListener(t){const e=i=>{var r;const s=(r=i.target)==null?void 0:r.closest(`.${c.COUNTRY_ITEM}`);s&&this._selectListItem(s)};this.ui.countryList.addEventListener("click",e,{signal:t})}_bindDropdownClickOffListener(t){const e=i=>{!!i.target.closest(`#iti-${this.id}__dropdown-content`)||this._closeDropdown()};setTimeout(()=>{document.documentElement.addEventListener("click",e,{signal:t})},0)}_bindDropdownKeydownListener(t){let e="",i=null;const s=r=>{[g.ARROW_UP,g.ARROW_DOWN,g.ENTER,g.ESC].includes(r.key)&&(r.preventDefault(),r.stopPropagation(),r.key===g.ARROW_UP||r.key===g.ARROW_DOWN?this._handleUpDownKey(r.key):r.key===g.ENTER?this._handleEnterKey():r.key===g.ESC&&(this._closeDropdown(),this.ui.selectedCountry.focus())),!this.options.countrySearch&&x.HIDDEN_SEARCH_CHAR.test(r.key)&&(r.stopPropagation(),i&&clearTimeout(i),e+=r.key.toLowerCase(),this._searchForCountry(e),i=setTimeout(()=>{e=""},yt.HIDDEN_SEARCH_RESET_MS))};document.addEventListener("keydown",s,{signal:t})}_bindDropdownSearchListeners(t){const e=()=>{const o=this.ui.searchInput.value.trim();this._filterCountriesByQuery(o),this.ui.searchInput.value?this.ui.searchClearButton.classList.remove(c.HIDE):this.ui.searchClearButton.classList.add(c.HIDE)};let i=null;const s=()=>{i&&clearTimeout(i),i=setTimeout(()=>{e(),i=null},100)};this.ui.searchInput.addEventListener("input",s,{signal:t});const r=()=>{this.ui.searchInput.value="",this.ui.searchInput.focus(),e()};this.ui.searchClearButton.addEventListener("click",r,{signal:t})}_searchForCountry(t){const e=Nt(this.countries,t);if(e){const i=e.nodeById[this.id];this.ui.highlightListItem(i,!1),this.ui.scrollTo(i)}}_filterCountriesByQuery(t){let e;t===""?e=this.countries:e=bt(this.countries,t),this.ui.filterCountries(e)}_handleUpDownKey(t){var i,s;let e=t===g.ARROW_UP?(i=this.ui.highlightedItem)==null?void 0:i.previousElementSibling:(s=this.ui.highlightedItem)==null?void 0:s.nextElementSibling;!e&&this.ui.countryList.childElementCount>1&&(e=t===g.ARROW_UP?this.ui.countryList.lastElementChild:this.ui.countryList.firstElementChild),e&&(this.ui.scrollTo(e),this.ui.highlightListItem(e,!1))}_handleEnterKey(){this.ui.highlightedItem&&this._selectListItem(this.ui.highlightedItem)}_updateValFromNumber(t){let e=t;if(this.options.formatOnDisplay&&u.utils&&this.selectedCountryData){const i=this.options.nationalMode||!e.startsWith("+")&&!this.options.separateDialCode,{NATIONAL:s,INT
12ERNATIONAL:r}=u.utils.numberFormat,o=i?s:r;e=u.utils.formatNumber(e,this.selectedCountryData.iso2,o)}e=this._beforeSetNumber(e),this._setTelInputValue(e)}_updateCountryFromNumber(t){const e=this._getNewCountryFromNumber(t);return e!==null?this._setCountry(e):!1}_ensureHasDialCode(t){const{dialCode:e,nationalPrefix:i}=this.selectedCountryData;if(t.startsWith("+")||!e)return t;const o=i&&t.startsWith(i)&&!this.options.separateDialCode?t.substring(1):t;return`+${e}${o}`}_getNewCountryFromNumber(t){const e=t.indexOf("+");let i=e?t.substring(e):t;const s=this.selectedCountryData.iso2,r=this.selectedCountryData.dialCode;i=this._ensureHasDialCode(i);const o=this._getDialCode(i,!0),a=z(i);if(o){const l=z(o),d=this.dialCodeToIso2Map[l];if(d.length===1)return d[0]===s?null:d[0];if(!s&&this.defaultCountry&&d.includes(this.defaultCountry))return this.defaultCountry;if(r===at.NANP&&ct(a))return null;const{areaCodes:m,priority:w}=this.selectedCountryData;if(m){const S=m.map(f=>`${r}${f}`);for(const f of S)if(a.startsWith(f))return null}const b=m&&!(w===0)&&a.length>l.length,T=s&&d.includes(s)&&!b,D=s===d[0];if(!T&&!D)return d[0]}else if(i.startsWith("+")&&a.length){const l=this.selectedCountryData.dialCode||"";return l&&l.startsWith(a)?null:""}else if((!i||i==="+")&&!s)return this.defaultCountry;return null}_setCountry(t){const{separateDialCode:e,showFlags:i,i18n:s,allowDropdown:r}=this.options,o=this.selectedCountryData.iso2||"";if(r&&this.ui.updateSelectedItem(t),this.selectedCountryData=t?this.countryByIso2.get(t):{},this.selectedCountryData.iso2&&(this.defaultCountry=this.selectedCountryData.iso2),this.ui.selectedCountry){const a=t&&i?`${c.FLAG} iti__${t}`:`${c.FLAG} ${c.GLOBE}`;let l,d;if(t){const{name:h,dialCode:m}=this.selectedCountryData;d=h,l=s.selectedCountryAriaLabel.replace("${countryName}",h).replace("${dialCode}",`+${m}`)}else d=s.noCountrySelected,l=s.noCountrySelected;this.ui.selectedCountryInner.className=a,this.ui.selectedCountry.setAttribute("title",d),this.ui.selectedCountry.setAttribute(p.LABEL,l)}if(e){const a=this.selectedCountryData.dialCode?`+${this.selectedCountryData.dialCode}`:"";this.ui.selectedDialCode.textContent=a,this.ui.updateInputPadding()}return this._updatePlaceholder(),this._updateMaxLength(),o!==t}_updateMaxLength(){const{strictMode:t,placeholderNumberType:e,validationNumberTypes:i}=this.options,{iso2:s}=this.selectedCountryData;if(t&&u.utils)if(s){const r=u.utils.numberType[e];let o=u.utils.getExampleNumber(s,!1,r,!0),a=o;for(;u.utils.isPossibleNumber(o,s,i);)a=o,o+="0";const l=u.utils.getCoreNumber(a,s);this.maxCoreNumberLength=l.length,s==="by"&&(this.maxCoreNumberLength=l.length+1)}else this.maxCoreNumberLength=null}_updatePlaceholder(){const{autoPlaceholder:t,placeholderNumberType:e,nationalMode:i,customPlaceholder:s}=this.options,r=t===Z.AGGRESSIVE||!this.ui.hadInitialPlaceholder&&t===Z.POLITE;if(u.utils&&r){const o=u.utils.numberType[e];let a=this.selectedCountryData.iso2?u.utils.getExampleNumber(this.selectedCountryData.iso2,i,o):"";a=this._beforeSetNumber(a),typeof s=="function"&&(a=s(a,this.selectedCountryData)),this.ui.telInput.setAttribute("placeholder",a)}}_selectListItem(t){const e=t.dataset[lt.COUNTRY_CODE],i=this._setCountry(e);this._closeDropdown();const s=t.dataset[lt.DIAL_CODE];if(this._updateDialCode(s),this.options.formatOnDisplay){const r=this._getTelInputValue();this._updateValFromNumber(r)}this.ui.telInput.focus(),i&&this._triggerCountryChange()}_closeDropdown(){this.ui.dropdownContent.classList.contains(c.HIDE)||(this.ui.dropdownContent.classList.add(c.HIDE),this.ui.selectedCountry.setAttribute(p.EXPANDED,"false"),this.options.countrySearch&&(this.ui.searchInput.removeAttribute(p.ACTIVE_DESCENDANT),this.ui.highlightedItem&&(this.ui.highlightedItem.classList.remove(c.HIGHLIGHT),this.ui.highlightedItem=null)),this.ui.dropdownArrow.classList.remove(c.ARROW_UP),this.dropdownAbortController.abort(),this.dropdownAbortController=null,this.options.dropdownContainer&&this.ui.dropdown.remove(),this._trigger(R.CLOSE_COUNTRY_DROPDOWN))}_updateDialCode(t){const e=this._getTelInputValue(),i=`+${t}`;let s;if(e.startsWith("+")){const r=this._getDialCode(e);r?s=e.replace(r,i):s=i,this._setTelInputValue(s)}}_getDialCode(t,e){let i="";if(t.startsWith("+")){let s="",r=!1;for(let o=0;o<t.length;o++){const a=t.charAt(o);if(/[0-9]/.test(a)){if(s+=a,!!!this.dialCodeToIso2Map[s])break;if(this.dialCodes.has(s)){if(i=t.substring(0,o+1),r=!0,!e)break}else e&&r&&(i=t.substring(0,o+1));if(s.length===this.dialCodeMaxLen)break}}}return i}_getFullNumber(t){const e=t?this._normaliseNumerals(t):this._getTelInputValue(),{dialCode:i}=this.selectedCountryData;let s;const r=z(e);return this.options.separateDialCode&&!e.startsWith("+")&&i&&r?s=`+${i}`:s="",s+e}_beforeSetNumber(t){const e=this._getDialCode(t),i=Pt(t,e,this.options.separateDialCode,this.selectedCountryData);return this._cap(i)}_triggerCountryChange(){this._trigger(R.COUNTRY_CHANGE)}handleAutoCountry(){this.options.initialCountry===tt.AUTO&&u.autoCountry&&(this.defaultCountry=u.autoCountry,this.selectedCountryData.iso2||this.ui.selectedCountryInner.classList.contains(c.GLOBE)||this.setCountry(this.defaultCountry),this.resolveAutoCountryPromise())}
12handleUtils(){if(u.utils){const t=this._getTelInputValue();t&&this._updateValFromNumber(t),this.selectedCountryData.iso2&&(this._updatePlaceholder(),this._updateMaxLength())}this.resolveUtilsScriptPromise()}destroy(){this.ui.telInput&&(this.options.allowDropdown&&this._closeDropdown(),this.abortController.abort(),this.abortController=null,this.ui.destroy(),u.instances instanceof Map?u.instances.delete(this.id):delete u.instances[this.id])}getExtension(){return u.utils?u.utils.getExtension(this._getFullNumber(),this.selectedCountryData.iso2):""}getNumber(t){if(u.utils){const{iso2:e}=this.selectedCountryData,i=this._getFullNumber(),s=u.utils.formatNumber(i,e,t);return this._mapAsciiToUserNumerals(s)}return""}getNumberType(){return u.utils?u.utils.getNumberType(this._getFullNumber(),this.selectedCountryData.iso2):rt.UNKNOWN_NUMBER_TYPE}getSelectedCountryData(){return this.selectedCountryData}getValidationError(){if(u.utils){const{iso2:t}=this.selectedCountryData;return u.utils.getValidationError(this._getFullNumber(),t)}return rt.UNKNOWN_VALIDATION_ERROR}isValidNumber(){const{dialCode:t,iso2:e}=this.selectedCountryData;if(t===J.DIAL_CODE&&u.utils){const i=this._getFullNumber(),s=u.utils.getCoreNumber(i,e);if(s[0]===J.MOBILE_PREFIX&&s.length!==J.MOBILE_CORE_LENGTH)return!1}return this._validateNumber(!1)}isValidNumberPrecise(){return this._validateNumber(!0)}_utilsIsPossibleNumber(t){return u.utils?u.utils.isPossibleNumber(t,this.selectedCountryData.iso2,this.options.validationNumberTypes):null}_validateNumber(t){if(!u.utils)return null;if(!this.selectedCountryData.iso2)return!1;const e=o=>t?this._utilsIsValidNumber(o):this._utilsIsPossibleNumber(o),i=this._getFullNumber(),s=i.search(x.ALPHA_UNICODE);if(s>-1&&!this.options.allowPhonewords){const o=i.substring(0,s),a=e(o),l=e(i);return a&&l}return e(i)}_utilsIsValidNumber(t){return u.utils?u.utils.isValidNumber(t,this.selectedCountryData.iso2,this.options.validationNumberTypes):null}setCountry(t){const e=t==null?void 0:t.toLowerCase();if(!st(e))throw new Error(`Invalid country code: '${e}'`);const i=this.selectedCountryData.iso2;if(t&&e!==i||!t&&i){if(this._setCountry(e),this._updateDialCode(this.selectedCountryData.dialCode),this.options.formatOnDisplay){const r=this._getTelInputValue();this._updateValFromNumber(r)}this._triggerCountryChange()}}setNumber(t){const e=this._normaliseNumerals(t),i=this._updateCountryFromNumber(e);this._updateValFromNumber(e),i&&this._triggerCountryChange(),this._trigger(R.INPUT,{isSetNumber:!0})}setPlaceholderNumberType(t){this.options.placeholderNumberType=t,this._updatePlaceholder()}setDisabled(t){this.ui.telInput.disabled=t,t?this.ui.selectedCountry.setAttribute("disabled","true"):this.ui.selectedCountry.removeAttribute("disabled")}},Ut=n=>{if(!u.utils&&!u.startedLoadingUtilsScript){let t;if(typeof n=="function")try{t=Promise.resolve(n())}catch(e){return Promise.reject(e)}else return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof n}`));return u.startedLoadingUtilsScript=!0,t.then(e=>{const i=e==null?void 0:e.default;if(!i||typeof i!="object")throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return u.utils=i,W("handleUtils"),!0}).catch(e=>{throw W("rejectUtilsScriptPromise",e),e})}return null},W=(n,...t)=>{Object.values(u.instances).forEach(e=>{const i=e[n];typeof i=="function"&&i.apply(e,t)})},u=Object.assign((n,t)=>{const e=new ht(n,t);return u.instances[e.id]=e,n.iti=e,e},{defaults:ut,documentReady:()=>document.readyState==="complete",getCountryData:()=>v,getInstance:n=>{const t=n.dataset.intlTelInputId;return t?u.instances[t]:null},instances:{},attachUtils:Ut,startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"25.15.1"}),Bt=u;return B(O)})();return N.default})})(mt);var Zt=mt.exports;const Ct=Ft(Zt),te=["id","name"],ee={class:"invalid-feedback"},ie=Wt({__name:"TelInput",props:{id:{},name:{},value:{}},setup(U){const N=U,M=window.etData,j=M.intlTelInputData.cc,K=M.intlTelInputData.errorText,Y={initialCountry:j,containerClass:"iti-wrapper form-floating",validationNumberTypes:["FIXED_LINE_OR_MOBILE"],separateDialCode:!0};let L=$(""),A=$(null),B=$(null);const O=$(!1),q=$(K);Vt(async()=>{const _=()=>Qt(()=>import("./utils-3P6Si2Fo.js"),[]);if(await Ct.attachUtils(_),A.value){const y=Ct(A.value,Y);A.value.telInput=y,N.value&&(L.value=N.value,y.setNumber(N.value),v(N.value,""),H())}});const H=()=>{var I;const _=(I=A.value)==null?void 0:I.telInput;if(!_||!B.value)return;const y=_.getNumber();B.value.value=y},v=(_,y)=>{var R;if(_===y)return;const I=(R=A.value)==null?void 0:R.telInput;if(!I)return;const X=document.getElementById("p_telefon_type"),G=document.getElementById("p_telefon_valid"),F=I.isValidNumber();if(!F&&_.length>0)I.getValidationError(),O.value=!F,G.value=0;else{O.value=!1;const c=I.getNumberType();X.value=c,G.value=1,H()}};return $t(L,function(_,y){v(_,y)}),(_,y)=>(Gt(),zt("div",{class:pt(["tel-wrapper",{focused:_.focused,filled:_.filled,invalid:O.value}])},[jt(V("input",{ref_key:"phoneNumberInput",ref:A,type:"tel",name:"p_telefon_number",class:pt(["form-control tel_input rounded",{"is-invalid":O.value}]),"onUpdate:modelValue":y[0]||(y[0]=I=>qt(L)?L.value=I:L=I)},null,2),[[Kt,Yt(L),void 0,{lazy:!0,trim:!0}]]),V("input",{type:"hidden",id:N.id,name:U.name,ref_key:"fullPhoneInput",ref:B},null,8,te),y[1]||(y[1]=V("input",{type:"hidden",class:"p_telefon_type",id:"p_telefon_type",name:"p_telefon_type"},null,-1)),y[2]||(y[2]=V("input",{type:"hidden",class:"p_telefon_valid",id:"p_telefon_valid",name:"p_telefon_valid"},null,-1)),V("div",ee,Xt(q.value),1)],2))}}),re=Jt(ie,[["__scopeId","data-v-3006cabb"]]);export{re as default}; 13//# sourceMappingURL=TelInput-C1pb9Vb8.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.