function recaptchaLoaded(){document.querySelectorAll(".g-recaptcha").forEach(n=>{var t=grecaptcha.render(n);n.setAttribute("data-grecaptcha-id",t)})}(function(n,t){typeof exports=="object"&&typeof module=="object"?module.exports=t():typeof define=="function"&&define.amd?define("Navigo",[],t):typeof exports=="object"?exports.Navigo=t():n.Navigo=t()})(typeof self!="undefined"?self:this,function(){return function(){"use strict";function n(r){if(t[r])return t[r].exports;var u=t[r]={exports:{}};return i[r](u,u.exports,n),u.exports}var i={"./src/Q.ts":function(n,t,i){function r(n,t,i){var u=t||{},r=0;(function f(){if(!n[r]){i&&i(u);return}Array.isArray(n[r])?(n.splice.apply(n,[r,1].concat(n[r][0](u)?n[r][1]:n[r][2])),f()):n[r](u,function(n){typeof n=="undefined"||n===!0?(r+=1,f()):i&&i(u)})})()}i.r(t);i.d(t,{"default":function(){return r}});r.if=function(n,t,i){return Array.isArray(t)||(t=[t]),Array.isArray(i)||(i=[i]),[n,t,i]}},"./src/constants.ts":function(n,t,i){i.r(t);i.d(t,{PARAMETER_REGEXP:function(){return r},REPLACE_VARIABLE_REGEXP:function(){return u},WILDCARD_REGEXP:function(){return f},REPLACE_WILDCARD:function(){return e},NOT_SURE_REGEXP:function(){return o},REPLACE_NOT_SURE:function(){return s},START_BY_SLASH_REGEXP:function(){return h},MATCH_REGEXP_FLAGS:function(){return c}});var r=/([:*])(\w+)/g,u="([^/]+)",f=/\*/g,e="?(?:.*)",o=/\/\?/g,s="/?([^/]+|)",h="(?:/^|^)",c=""},"./src/index.ts":function(n,t,i){function o(){return o=Object.assign||function(n){for(var i,r,t=1;t=0&&(n=b.hash===!0?n.split("#")[1]||"/":n.split("#")[0]),n}function d(n){return r.clean(p+"/"+r.clean(n))}function g(n,t,i,u){return n=r.isString(n)?d(n):n,{name:u||r.clean(String(n)),path:n,handler:t,hooks:r.accumulateHooks(i)}}function at(n,t,i){var r=this;if(typeof n!="object"||n instanceof RegExp)typeof n=="function"&&(i=t,t=n,n=p);else return Object.keys(n).forEach(function(t){if(typeof n[t]=="function")r.on(t,n[t]);else{var i=n[t],u=i.uses,f=i.as,e=i.hooks;w.push(g(t,u,[k,e],f))}}),this;return w.push(g(n,t,[k,i])),this}function et(n,t){if(i.__dirty){i.__waiting.push(function(){return i.resolve(n,t)});return}i.__dirty=!0;n=n?r.clean(p)+"/"+r.clean(n):undefined;var s={instance:i,to:n,currentLocationPath:n,navigateOptions:{},resolveOptions:o({},b,t)};return u.default([h.default,f.default,u.default.if(function(n){var t=n.matches;return t&&t.length>0},c.default,l.notFoundLifeCycle)],s,e.default),s.matches?s.matches:!1}function ot(n,t){if(i.__dirty){i.__waiting.push(function(){return i.navigate(n,t)});return}i.__dirty=!0;n=r.clean(p)+"/"+r.clean(n);var o={instance:i,to:n,navigateOptions:t||{},resolveOptions:t&&t.resolveOptions?t.resolveOptions:b,currentLocationPath:rt(n)};u.default([a.default,v.default,f.default,u.default.if(function(n){var t=n.matches;return t&&t.length>0},c.default,l.notFoundLifeCycle),y.default,e.default],o,e.default)}function vt(n,t,i){var r=ht(n,t);return r!==null?(ot(r.replace(new RegExp("^/?"+p),""),i),!0):!1}function yt(n){return this.routes=w=w.filter(function(t){return r.isString(n)?r.clean(t.path)!==r.clean(n):r.isFunction(n)?n!==t.handler:String(t.path)!==String(n)}),this}function pt(){ut&&(this.__popstateListener=function(){i.__freezeListening||et()},window.addEventListener("popstate",this.__popstateListener))}function wt(){this.routes=w=[];ut&&window.removeEventListener("popstate",this.__popstateListener);this.destroyed=it=!0}function bt(n,t){return i._notFoundRoute=g("*",n,[k,t],"__NOT_FOUND__"),this}function st(){if(ft)return kt().forEach(function(n){if("false"===n.getAttribute("data-navigo")||"_blank"===n.getAttribute("target")){n.hasListenerAttached&&n.removeEventListener("click",n.navigoHandler);return}n.hasListenerAttached||(n.hasListenerAttached=!0,n.navigoHandler=function(t){var u,f,e;if((t.ctrlKey||t.metaKey)&&t.target.tagName.toLowerCase()==="a"||(u=n.getAttribute("href"),typeof u=="undefined"||u===null))return!1;if(u.match(/^(http|https)/)&&typeof URL!="undefined")try{f=new URL(u);u=f.pathname+f.search}catch(o){}e=r.parseNavigateOptions(n.getAttribute("data-navigo-options"));it||(t.preventDefault(),t.stopPropagation(),i.navigate(r.clean(u),e))},n.addEventListener("click",n.navigoHandler))}),i}function kt(){return ft?[].slice.call(document.querySelectorAll(b.linksSelector||s)):[]}function dt(n){return"/"+p+"/"+r.clean(n)}function gt(n){return k=n,this}function ni(){return tt}function ht(n,t,i){var f=w.find(function(t){return t.name===n}),r=null,u;if(f){if(r=f.path,t)for(u in t)r=r.replace(":"+u,t[u]);r=r.match(/^\//)?r:"/"+r}return r&&i&&!i.includeRoot&&(r=r.replace(new RegExp("^/"+p),"")),r}function ti(n){return n.getAttribute("href")}function ct(n){var u=r.extractGETParameters(r.clean(n)),t=u[0],i=u[1],f=i===""?null:r.parseQuery(i),e=r.extractHashFromURL(n),o=g(t,function(){},[k],t);return{url:t,queryString:i,hashString:e,route:o,data:null,params:f}}function ii(){return ct(r.clean(r.getCurrentEnvURL(p)).replace(new RegExp("^"+p),""))}function ri(n){var t={instance:i,currentLocationPath:n,to:n,navigateOptions:{},resolveOptions:b};return f.default(t,function(){}),t.matches?t.matches:!1}function ui(n,t,u){var f,e;return typeof t!="undefined"&&(typeof u=="undefined"||u)&&(t=d(t)),f={instance:i,to:t,currentLocationPath:t},h.default(f,function(){}),typeof n=="string"&&(n=typeof u=="undefined"||u?d(n):n),e=r.matchRoute(f,{name:String(n),path:n,handler:function(){},hooks:{}}),e?e:!1}function nt(n,t,i){return(typeof t=="string"&&(t=lt(t)),t)?(t.hooks[n]||(t.hooks[n]=[]),t.hooks[n].push(i),function(){t.hooks[n]=t.hooks[n].filter(function(n){return n!==i})}):(console.warn("Route doesn't exists: "+t),function(){})}function lt(n){return typeof n=="string"?w.find(function(t){return t.name===d(n)}):w.find(function(t){return t.handler===n})}function fi(n){n.instance.__dirty=!1;n.instance.__waiting.length>0&&n.instance.__waiting.shift()()}var b=t||{strategy:"ONE",hash:!1,noMatchWarning:!1,linksSelector:s},i=this,p="/",tt=null,w=[],it=!1,k,ut=r.pushStateAvailable(),ft=r.windowAvailable();n?p=r.clean(n):console.warn('Navigo requires a root path in its constructor. If not provided will use "/" as default.');this.root=p;this.routes=w;this.destroyed=it;this.current=tt;this.__freezeListening=!1;this.__waiting=[];this.__dirty=!1;this.__markAsClean=fi;this.on=at;this.off=yt;this.resolve=et;this.navigate=ot;this.navigateByName=vt;this.destroy=wt;this.notFound=bt;this.updatePageLinks=st;this.link=dt;this.hooks=gt;this.extractGETParameters=function(n){return r.extractGETParameters(rt(n))};this.lastResolved=ni;this.generate=ht;this.getLinkPath=ti;this.match=ri;this.matchLocation=ui;this.getCurrentLocation=ii;this.addBeforeHook=nt.bind(this,"before");this.addAfterHook=nt.bind(this,"after");this.addAlreadyHook=nt.bind(this,"already");this.addLeaveHook=nt.bind(this,"leave");this.getRoute=lt;this._pathToMatchObject=ct;this._clean=r.clean;this._checkForAHash=rt;this._setCurrent=function(n){return tt=i.current=n};pt.call(this);st.call(this)}var s;i.r(t);i.d(t,{"default":function(){return p}});var r=i("./src/utils.ts"),u=i("./src/Q.ts"),h=i("./src/middlewares/setLocationPath.ts"),f=i("./src/middlewares/matchPathToRegisteredRoutes.ts"),a=i("./src/middlewares/checkForDeprecationMethods.ts"),v=i("./src/middlewares/checkForForceOp.ts"),y=i("./src/middlewares/updateBrowserURL.ts"),c=i("./src/middlewares/processMatches.ts"),e=i("./src/middlewares/waitingList.ts"),l=i("./src/lifecycles.ts");s="[data-navigo]"},"./src/lifecycles.ts":function(n,t,i){i.r(t);i.d(t,{foundLifecycle:function(){return r},notFoundLifeCycle:function(){return y}});var u=i("./src/Q.ts"),f=i("./src/middlewares/checkForLeaveHook.ts"),e=i("./src/middlewares/checkForBeforeHook.ts"),o=i("./src/middlewares/callHandler.ts"),s=i("./src/middlewares/checkForAfterHook.ts"),h=i("./src/middlewares/checkForAlreadyHook.ts"),c=i("./src/middlewares/checkForNotFoundHandler.ts"),l=i("./src/middlewares/errorOut.ts"),a=i("./src/middlewares/flushCurrent.ts"),v=i("./src/middlewares/updateState.ts"),r=[h.default,e.default,o.default,s.default],y=[f.default,c.default,u.default.if(function(n){return n.notFoundHandled},r.concat([v.default]),[l.default,a.default])]},"./src/middlewares/callHandler.ts":function(n,t,i){function u(n,t){r.undefinedOrTrue(n.navigateOptions,"callHandler")&&n.match.route.handler(n.match);n.instance.updatePageLinks();t()}i.r(t);i.d(t,{"default":function(){return u}});var r=i("./src/utils.ts")},"./src/middlewares/checkForAfterHook.ts":function(n,t,i){function u(n,t){n.match.route.hooks&&n.match.route.hooks.after&&r.undefinedOrTrue(n.navigateOptions,"callHooks")&&n.match.route.hooks.after.forEach(function(t){return t(n.match)});t()}i.r(t);i.d(t,{"default":function(){return u}});var r=i("./src/utils.ts")},"./src/middlewares/checkForAlreadyHook.ts":function(n,t,i){function u(n,t){var i=n.instance.lastResolved();if(i&&i[0]&&i[0].route===n.match.route&&i[0].url===n.match.url&&i[0].queryString===n.match.queryString){i.forEach(function(t){t.route.hooks&&t.route.hooks.already&&r.undefinedOrTrue(n.navigateOptions,"callHooks")&&t.route.hooks.already.forEach(function(t){return t(n.match)})});t(!1);return}t()}i.r(t);i.d(t,{"default":function(){return u}});var r=i("./src/utils.ts")},"./src/middlewares/checkForBeforeHook.ts":function(n,t,i){function f(n,t){n.match.route.hooks&&n.match.route.hooks.before&&u.undefinedOrTrue(n.navigateOptions,"callHooks")?r.default(n.match.route.hooks.before.map(function(t){return function(i,r){return t(function(t){t===!1?n.instance.__markAsClean(n):r()},n.match)}}).concat([function(){return t()}])):t()}i.r(t);i.d(t,{"default":function(){return f}});var r=i("./src/Q.ts"),u=i("./src/utils.ts")},"./src/middlewares/checkForDeprecationMethods.ts":function(n,t,i){function r(n,t){n.navigateOptions&&(typeof n.navigateOptions.shouldResolve!="undefined"&&console.warn('"shouldResolve" is deprecated. Please check the documentation.'),typeof n.navigateOptions.silent!="undefined"&&console.warn('"silent" is deprecated. Please check the documentation.'));t()}i.r(t);i.d(t,{"default":function(){return r}})},"./src/middlewares/checkForForceOp.ts":function(n,t,i){function r(n,t){n.navigateOptions.force===!0?(n.instance._setCurrent([n.instance._pathToMatchObject(n.to)]),t(!1)):t()}i.r(t);i.d(t,{"default":function(){return r}})},"./src/middlewares/checkForLeaveHook.ts":function(n,t,i){function f(n,t){var i=n.instance;if(!i.lastResolved()){t();return}r.default(i.lastResolved().map(function(t){return function(i,f){var e,o,s;if(!t.route.hooks||!t.route.hooks.leave){f();return}if(e=!1,o=n.instance.matchLocation(t.route.path,n.currentLocationPath,!1),t.route.path!=="*"?e=!o:(s=n.matches?n.matches.find(function(n){return t.route.path===n.route.path}):!1,e=!s),u.undefinedOrTrue(n.navigateOptions,"callHooks")&&e){r.default(t.route.hooks.leave.map(function(t){return function(i,r){return t(function(t){t===!1?n.instance.__markAsClean(n):r()},n.matches&&n.matches.length>0?n.matches.length===1?n.matches[0]:n.matches:undefined)}}).concat([function(){return f()}]));return}f()}}),{},function(){return t()})}i.r(t);i.d(t,{"default":function(){return f}});var r=i("./src/Q.ts"),u=i("./src/utils.ts")},"./src/middlewares/checkForNotFoundHandler.ts":function(n,t,i){function u(n,t){var i=n.instance._notFoundRoute,f;if(i){n.notFoundHandled=!0;var e=r.extractGETParameters(n.currentLocationPath),o=e[0],u=e[1],s=r.extractHashFromURL(n.to);i.path=r.clean(o);f={url:i.path,queryString:u,hashString:s,data:null,route:i,params:u!==""?r.parseQuery(u):null};n.matches=[f];n.match=f}t()}i.r(t);i.d(t,{"default":function(){return u}});var r=i("./src/utils.ts")},"./src/middlewares/errorOut.ts":function(n,t,i){function r(n,t){n.resolveOptions&&n.resolveOptions.noMatchWarning!==!1&&typeof n.resolveOptions.noMatchWarning!="undefined"||console.warn('Navigo: "'+n.currentLocationPath+"\" didn't match any of the registered routes.");t()}i.r(t);i.d(t,{"default":function(){return r}})},"./src/middlewares/flushCurrent.ts":function(n,t,i){function r(n,t){n.instance._setCurrent(null);t()}i.r(t);i.d(t,{"default":function(){return r}})},"./src/middlewares/matchPathToRegisteredRoutes.ts":function(n,t,i){function u(n,t){for(var f,u,i=0;i=0?n.split("#").pop()||"":""}function o(n,t){return t.length===0?null:n?n.slice(1,n.length).reduce(function(n,i,r){return n===null&&(n={}),n[t[r]]=decodeURIComponent(i),n},null):null}function s(n){var t=u(n).split(/\?(.*)?$/);return[u(t[0]),t.slice(1).join("")]}function h(n){for(var r,i,t={},f=n.split("&"),u=0;u= 2.0.0-beta.1",7:">= 4.0.0"};t.REVISION_CHANGES=c;f="[object Object]";o.prototype={constructor:o,logger:u["default"],log:u["default"].log,registerHelper:function(n,t){if(r.toString.call(n)===f){if(t)throw new e["default"]("Arg not supported with multiple helpers");r.extend(this.helpers,n)}else this.helpers[n]=t},unregisterHelper:function(n){delete this.helpers[n]},registerPartial:function(n,t){if(r.toString.call(n)===f)r.extend(this.partials,n);else{if(typeof t=="undefined")throw new e["default"]('Attempting to register a partial called "'+n+'" as undefined');this.partials[n]=t}},unregisterPartial:function(n){delete this.partials[n]},registerDecorator:function(n,t){if(r.toString.call(n)===f){if(t)throw new e["default"]("Arg not supported with multiple decorators");r.extend(this.decorators,n)}else this.decorators[n]=t},unregisterDecorator:function(n){delete this.decorators[n]}};l=u["default"].log;t.log=l;t.createFrame=r.createFrame;t.logger=u["default"]},function(n,t){"use strict";function h(n){return e[n]}function f(n){for(var i,t=1;t":">",'"':""","'":"'","`":"`","=":"="},o=/[&<>"'`=]/g,s=/[&<>"'`=]/;i=Object.prototype.toString;t.toString=i;r=function(n){return typeof n=="function"};r(/x/)&&(t.isFunction=r=function(n){return typeof n=="function"&&i.call(n)==="[object Function]"});t.isFunction=r;u=Array.isArray||function(n){return n&&typeof n=="object"?i.call(n)==="[object Array]":!1};t.isArray=u},function(n,t){"use strict";function r(n,t){var f=t&&t.loc,e=undefined,o=undefined,s,u;for(f&&(e=f.start.line,o=f.start.column,n+=" - "+e+":"+o),s=Error.prototype.constructor.call(this,n),u=0;u0?(i.ids&&(i.ids=[i.name]),n.helpers.each(t,i)):f(this):(i.data&&i.ids&&(u=r.createFrame(i.data),u.contextPath=r.appendContextPath(i.data.contextPath,i.name),i={data:u}),e(t,i))})};n.exports=t["default"]},function(n,t,i){"use strict";var u=i(1)["default"];t.__esModule=!0;var r=i(5),f=i(6),e=u(f);t["default"]=function(n){n.registerHelper("each",function(n,t){function h(t,i,f){u&&(u.key=t,u.index=i,u.first=i===0,u.last=!!f,s&&(u.contextPath=s+t));o=o+a(n[t],{data:u,blockParams:r.blockParams([n[t],t],[s+t,null])})}var l,f,c;if(!t)throw new e["default"]("Must pass iterator to #each");var a=t.fn,v=t.inverse,i=0,o="",u=undefined,s=undefined;if(t.data&&t.ids&&(s=r.appendContextPath(t.data.contextPath,t.ids[0])+"."),r.isFunction(n)&&(n=n.call(this)),t.data&&(u=r.createFrame(t.data)),n&&typeof n=="object")if(r.isArray(n))for(l=n.length;i=0?t:parseInt(n,10)}return n},log:function(n){var t;if(n=r.lookupLevel(n),typeof console!="undefined"&&r.lookupLevel(r.level)<=n){t=r.methodMap[n];console[t]||(t="log");for(var u=arguments.length,f=Array(u>1?u-1:0),i=1;i2&&v.push("'"+this.terminals_[a]+"'");b=this.lexer.showPosition?"Parse error on line "+(c+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[i]||i)+"'":"Parse error on line "+(c+1)+": Unexpected "+(i==1?"end of input":"'"+(this.terminals_[i]||i)+"'");this.parseError(b,{text:this.lexer.match,token:this.terminals_[i]||i,line:this.lexer.yylineno,loc:l,expected:v})}if(u[0]instanceof Array&&u.length>1)throw new Error("Parse Error: multiple actions possible at state: "+o+", token: "+i);switch(u[0]){case 1:r.push(i);f.push(this.lexer.yytext);t.push(this.lexer.yylloc);r.push(u[1]);i=null;p?(i=p,p=null):(g=this.lexer.yyleng,d=this.lexer.yytext,c=this.lexer.yylineno,l=this.lexer.yylloc,y>0&&y--);break;case 2:if(e=this.productions_[u[1]][1],s.$=f[f.length-e],s._$={first_line:t[t.length-(e||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(e||1)].first_column,last_column:t[t.length-1].last_column},nt&&(s._$.range=[t[t.length-(e||1)].range[0],t[t.length-1].range[1]]),w=this.performAction.call(s,d,g,c,this.yy,u[1],f,t),typeof w!="undefined")return w;e&&(r=r.slice(0,-2*e),f=f.slice(0,-1*e),t=t.slice(0,-1*e));r.push(this.productions_[u[1]][0]);f.push(s.$);t.push(s._$);tt=h[r[r.length-2]][r[r.length-1]];r.push(tt);break;case 3:return!0}}return!0}},i=function(){var n={EOF:1,parseError:function(n,t){if(this.yy.parser)this.yy.parser.parseError(n,t);else throw new Error(n);},setInput:function(n){return this._input=n,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var n=this._input[0],t;return this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n,t=n.match(/(?:\r\n?|\n).*/g),t?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},unput:function(n){var i=n.length,t=n.split(/(?:\r\n?|\n)/g),r,u;return this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i-1),this.offset-=i,r=this.match.split(/(?:\r\n?|\n)/g),this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),t.length-1&&(this.yylineno-=t.length-1),u=this.yylloc.range,this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:t?(t.length===r.length?this.yylloc.first_column:0)+r[r.length-t.length].length-t[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-i]),this},more:function(){return this._more=!0,this},less:function(n){this.unput(this.match.slice(n))},pastInput:function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var n=this.pastInput(),t=new Array(n.length+1).join("-");return n+this.upcomingInput()+"\n"+t+"^"},next:function(){var f,n,r,e,t,u,i;if(this.done)return this.EOF;for(this._input||(this.done=!0),this._more||(this.yytext="",this.match=""),u=this._currentRules(),i=0;in[0].length)&&(n=r,e=i,!this.options.flex))break;return n?(t=n[0].match(/(?:\r\n?|\n).*/g),t&&(this.yylineno+=t.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:t?t[t.length-1].length-t[t.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+n[0].length},this.yytext+=n[0],this.match+=n[0],this.matches=n,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(n[0].length),this.matched+=n[0],f=this.performAction.call(this,this.yy,this,u[e],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),f)?f:void 0:this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var n=this.next();return typeof n!="undefined"?n:this.lex()},begin:function(n){this.conditionStack.push(n)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(n){this.begin(n)}};return n.options={},n.performAction=function(n,t,i,r){function u(n,i){return t.yytext=t.yytext.substr(n,t.yyleng-i)}var f=r;switch(i){case 0:if(t.yytext.slice(-2)==="\\\\"?(u(0,1),this.begin("mu")):t.yytext.slice(-1)==="\\"?(u(0,1),this.begin("emu")):this.begin("mu"),t.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(t.yytext=t.yytext.substr(5,t.yyleng-9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(t.yytext);this.popState();this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return t.yytext=u(1,2).replace(/\\"/g,'"'),80;case 32:return t.yytext=u(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return t.yytext=t.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},n.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],n.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},n}();return n.lexer=i,t.prototype=n,n.Parser=t,new t}();t.__esModule=!0;t["default"]=i},function(n,t,i){"use strict";function r(){var n=arguments.length<=0||arguments[0]===undefined?{}:arguments[0];this.options=n}function e(n,t,i){t===undefined&&(t=n.length);var r=n[t-1],u=n[t-2];return r?r.type==="ContentStatement"?(u||!i?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(r.original):void 0:i}function o(n,t,i){t===undefined&&(t=-1);var r=n[t+1],u=n[t+2];return r?r.type==="ContentStatement"?(u||!i?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(r.original):void 0:i}function f(n,t,i){var r=n[t==null?0:t+1],u;r&&r.type==="ContentStatement"&&(i||!r.rightStripped)&&(u=r.value,r.value=r.value.replace(i?/^\s+/:/^[ \t]*\r?\n?/,""),r.rightStripped=r.value!==u)}function u(n,t,i){var r=n[t==null?n.length-1:t-1],u;if(r&&r.type==="ContentStatement"&&(i||!r.leftStripped))return u=r.value,r.value=r.value.replace(i?/\s+$/:/[ \t]+$/,""),r.leftStripped=r.value!==u,r.leftStripped}var c=i(1)["default"],s,h;t.__esModule=!0;s=i(25);h=c(s);r.prototype=new h["default"];r.prototype.Program=function(n){var h=!this.options.ignoreStandalone,c=!this.isRootSeen,i,t,l,r,s;for(this.isRootSeen=!0,i=n.body,t=0,l=i.length;t0)throw new r["default"]("Invalid path: "+e,{loc:i});else u===".."&&(s++,l+="../");return{type:"PathExpression",data:n,depth:s,parts:o,original:e,loc:i}}function a(n,t,i,r,u,f){var e=r.charAt(3)||r.charAt(2),o=e!=="{"&&e!=="&",s=/\*/.test(r);return{type:s?"Decorator":"MustacheStatement",path:n,params:t,hash:i,escaped:o,strip:u,loc:this.locInfo(f)}}function v(n,t,i,r){u(n,i);r=this.locInfo(r);var f={type:"Program",body:t,strip:{},loc:r};return{type:"BlockStatement",path:n.path,params:n.params,hash:n.hash,program:f,openStrip:{},inverseStrip:{},closeStrip:{},loc:r}}function y(n,t,i,f,e,o){var h,s,c;if(f&&f.path&&u(n,f),h=/\*/.test(n.open),t.blockParams=n.blockParams,s=undefined,c=undefined,i){if(h)throw new r["default"]("Unexpected inverse block on decorator",i);i.chain&&(i.program.body[0].closeStrip=f.strip);c=i.strip;s=i.program}return e&&(e=s,s=t,t=e),{type:h?"DecoratorBlock":"BlockStatement",path:n.path,params:n.params,hash:n.hash,program:t,inverse:s,openStrip:n.strip,inverseStrip:c,closeStrip:f&&f.strip,loc:this.locInfo(o)}}function p(n,t){if(!t&&n.length){var i=n[0].loc,r=n[n.length-1].loc;i&&r&&(t={source:i.source,start:{line:i.start.line,column:i.start.column},end:{line:r.end.line,column:r.end.column}})}return{type:"Program",body:n,strip:{},loc:t}}function w(n,t,i,r){return u(n,i),{type:"PartialBlockStatement",name:n.path,params:n.params,hash:n.hash,program:t,openStrip:n.strip,closeStrip:i&&i.strip,loc:this.locInfo(r)}}var e=i(1)["default"],f,r;t.__esModule=!0;t.SourceLocation=o;t.id=s;t.stripFlags=h;t.stripComment=c;t.preparePath=l;t.prepareMustache=a;t.prepareRawBlock=v;t.prepareBlock=y;t.prepareProgram=p;t.preparePartialBlock=w;f=i(6);r=e(f)},function(n,t,i){"use strict";function e(){}function v(n,t,i){if(n==null||typeof n!="string"&&n.type!=="Program")throw new r["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+n);t=t||{};"data"in t||(t.data=!0);t.compat&&(t.useDepths=!0);var u=i.parse(n,t),f=(new i.Compiler).compile(u,t);return(new i.JavaScriptCompiler).compile(f,t)}function y(n,t,i){function f(){var r=i.parse(n,t),u=(new i.Compiler).compile(r,t),f=(new i.JavaScriptCompiler).compile(u,t,undefined,!0);return i.template(f)}function e(n,t){return u||(u=f()),u.call(this,n,t)}if(t===undefined&&(t={}),n==null||typeof n!="string"&&n.type!=="Program")throw new r["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+n);"data"in t||(t.data=!0);t.compat&&(t.useDepths=!0);var u=undefined;return e._setup=function(n){return u||(u=f()),u._setup(n)},e._child=function(n,t,i,r){return u||(u=f()),u._child(n,t,i,r)},e}function s(n,t){if(n===t)return!0;if(f.isArray(n)&&f.isArray(t)&&n.length===t.length){for(var i=0;i1)throw new r["default"]("Unsupported number of partial arguments: "+t.length,n);else t.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):t.push({type:"PathExpression",parts:[],depth:0}));e=n.name.original;f=n.name.type==="SubExpression";f&&this.accept(n.name);this.setupFullMustacheParams(n,u,undefined,!0);i=n.indent||"";this.options.preventIndent&&i&&(this.opcode("appendContent",i),i="");this.opcode("invokePartial",f,e,i);this.opcode("append")},PartialBlockStatement:function(n){this.PartialStatement(n)},MustacheStatement:function(n){this.SubExpression(n);n.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(n){this.DecoratorBlock(n)},ContentStatement:function(n){n.value&&this.opcode("appendContent",n.value)},CommentStatement:function(){},SubExpression:function(n){h(n);var t=this.classifySexpr(n);t==="simple"?this.simpleSexpr(n):t==="helper"?this.helperSexpr(n):this.ambiguousSexpr(n)},ambiguousSexpr:function(n,t,i){var r=n.path,u=r.parts[0],f=t!=null||i!=null;this.opcode("getContext",r.depth);this.opcode("pushProgram",t);this.opcode("pushProgram",i);r.strict=!0;this.accept(r);this.opcode("invokeAmbiguous",u,f)},simpleSexpr:function(n){var t=n.path;t.strict=!0;this.accept(t);this.opcode("resolvePossibleLambda")},helperSexpr:function(n,t,i){var o=this.setupFullMustacheParams(n,t,i),f=n.path,e=f.parts[0];if(this.options.knownHelpers[e])this.opcode("invokeKnownHelper",o.length,e);else if(this.options.knownHelpersOnly)throw new r["default"]("You specified knownHelpersOnly, but used the unknown helper "+e,n);else f.strict=!0,f.falsy=!0,this.accept(f),this.opcode("invokeHelper",o.length,f.original,u["default"].helpers.simpleId(f))},PathExpression:function(n){this.addDepth(n.depth);this.opcode("getContext",n.depth);var t=n.parts[0],i=u["default"].helpers.scopedId(n),r=!n.depth&&!i&&this.blockParamIndex(t);r?this.opcode("lookupBlockParam",r,n.parts):t?n.data?(this.options.data=!0,this.opcode("lookupData",n.depth,n.parts,n.strict)):this.opcode("lookupOnContext",n.parts,n.falsy,n.strict,i):this.opcode("pushContext")},StringLiteral:function(n){this.opcode("pushString",n.value)},NumberLiteral:function(n){this.opcode("pushLiteral",n.value)},BooleanLiteral:function(n){this.opcode("pushLiteral",n.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(n){var i=n.pairs,t=0,r=i.length;for(this.opcode("pushHash");t=0)return[t,r]}}},function(n,t,i){"use strict";function u(n){this.value=n}function r(){}function a(n,t,i,r){var u=t.popStack(),f=0,e=i.length;for(n&&e--;f0&&(u+=", "+o.join(", "));f=0;for(i in this.aliases)r=this.aliases[i],this.aliases.hasOwnProperty(i)&&r.children&&r.referenceCount>1&&(u+=", alias"+ ++f+"="+i,r.children[0]="alias"+f);return t=["container","depth0","helpers","partials","data"],(this.useBlockParams||this.useDepths)&&t.push("blockParams"),this.useDepths&&t.push("depths"),e=this.mergeSource(u),n?(t.push(e),Function.apply(this,t)):this.source.wrap(["function(",t.join(","),") {\n ",e,"}"])},mergeSource:function(n){var e=this.environment.isSimple,f=!this.forceBuffer,r=undefined,u=undefined,t=undefined,i=undefined;return this.source.each(function(n){n.appendToBuffer?(t?n.prepend(" + "):t=n,i=n):(t&&(u?t.prepend("buffer += "):r=!0,i.add(";"),t=i=undefined),u=!0,e||(f=!1))}),f?t?(t.prepend("return "),i.add(";")):u||this.source.push('return "";'):(n+=", buffer = "+(r?"":this.initializeBuffer()),t?(t.prepend("return buffer + "),i.add(";")):this.source.push("return buffer;")),n&&this.source.prepend("var "+n.substring(2)+(r?"":";\n")),this.source.merge()},blockValue:function(n){var r=this.aliasable("helpers.blockHelperMissing"),t=[this.contextName(0)],i;this.setupHelperArgs(n,0,t);i=this.popStack();t.splice(1,0,i);this.push(this.source.functionCall(r,"call",t))},ambiguousBlockValue:function(){var i=this.aliasable("helpers.blockHelperMissing"),n=[this.contextName(0)],t;this.setupHelperArgs("",0,n,!0);this.flushInline();t=this.topStack();n.splice(1,0,t);this.pushSource(["if (!",this.lastHelper,") { ",t," = ",this.source.functionCall(i,"call",n),"}"])},appendContent:function(n){this.pendingContent?n=this.pendingContent+n:this.pendingLocation=this.source.currentLocation;this.pendingContent=n},append:function(){if(this.isInline())this.replaceStack(function(n){return[" != null ? ",n,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var n=this.popStack();this.pushSource(["if (",n," != null) { ",this.appendToBuffer(n,undefined,!0)," }"]);this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",undefined,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(n){this.lastContext=n},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(n,t,i,r){var u=0;r||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(n[u++]));this.resolvePath("context",n,u,t,i)},lookupBlockParam:function(n,t){this.useBlockParams=!0;this.push(["blockParams[",n[0],"][",n[1],"]"]);this.resolvePath("context",t,1)},lookupData:function(n,t,i){n?this.pushStackLiteral("container.data(data, "+n+")"):this.pushStackLiteral("data");this.resolvePath("data",t,0,!0,i)},resolvePath:function(n,t,i,r,u){var e=this,f;if(this.options.strict||this.options.assumeObjects){this.push(a(this.options.strict&&u,this,t,n));return}for(f=t.length;ithis.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var r=this.inlineStack,n,f,t,i;for(this.inlineStack=[],n=0,f=r.length;nr&&(r=e);return r}function p(){if(t(document).height()<=t(window).height())return 0;var n=document.createElement("div"),i=document.createElement("div"),r,u;return n.style.visibility="hidden",n.style.width="100px",document.body.appendChild(n),r=n.offsetWidth,n.style.overflow="scroll",i.style.width="100%",n.appendChild(i),u=i.offsetWidth,n.parentNode.removeChild(n),r-u}function nt(){if(!v){var i=t("html"),r=u("is-locked"),f,n;i.hasClass(r)||(n=t(document.body),f=parseInt(n.css("padding-right"),10)+p(),n.css("padding-right",f+"px"),i.addClass(r))}}function w(){if(!v){var i=t("html"),r=u("is-locked"),f,n;i.hasClass(r)&&(n=t(document.body),f=parseInt(n.css("padding-right"),10)-p(),n.css("padding-right",f+"px"),i.removeClass(r))}}function o(n,t,r,f){var e=u("is",t),o=[u("is",i.CLOSING),u("is",i.OPENING),u("is",i.CLOSED),u("is",i.OPENED)].join(" ");n.$bg.removeClass(o).addClass(e);n.$overlay.removeClass(o).addClass(e);n.$wrapper.removeClass(o).addClass(e);n.$modal.removeClass(o).addClass(e);n.state=t;r||n.$modal.trigger({type:t,reason:f},[{reason:f}])}function b(n,i,r){var u=0,f=function(n){n.target===this&&u++},e=function(n){n.target===this&&--u==0&&(t.each(["$bg","$overlay","$wrapper","$modal"],function(n,t){r[t].off(h+" "+c)}),i())};t.each(["$bg","$overlay","$wrapper","$modal"],function(n,t){r[t].on(h,f).on(c,e)});n();a(r.$bg)===0&&a(r.$overlay)===0&&a(r.$wrapper)===0&&a(r.$modal)===0&&(t.each(["$bg","$overlay","$wrapper","$modal"],function(n,t){r[t].off(h+" "+c)}),i())}function k(n){n.state!==i.CLOSED&&(t.each(["$bg","$overlay","$wrapper","$modal"],function(t,i){n[i].off(h+" "+c)}),n.$bg.removeClass(n.settings.modifier),n.$overlay.removeClass(n.settings.modifier).hide(),n.$wrapper.hide(),w(),o(n,i.CLOSED,!0))}function tt(n){var u={},r,f,t,i;for(n=n.replace(/\s*:\s*/g,":").replace(/\s*,\s*/g,","),r=n.split(","),i=0,f=r.length;i").addClass(u("overlay")+" "+u("is",i.CLOSED)).hide(),s.append(o.$overlay));o.$bg=t("."+u("bg")).addClass(u("is",i.CLOSED));o.$modal=n.addClass(e+" "+u("is-initialized")+" "+o.settings.modifier+" "+u("is",i.CLOSED)).attr("tabindex","-1");o.$wrapper=t("
").addClass(u("wrapper")+" "+o.settings.modifier+" "+u("is",i.CLOSED)).hide().append(o.$modal);s.append(o.$wrapper);o.$wrapper.on("click."+e,"[data-"+r+'-action="close"]',function(n){n.preventDefault();o.close()});o.$wrapper.on("click."+e,"[data-"+r+'-action="cancel"]',function(n){n.preventDefault();o.$modal.trigger(l.CANCELLATION);o.settings.closeOnCancel&&o.close(l.CANCELLATION)});o.$wrapper.on("click."+e,"[data-"+r+'-action="confirm"]',function(n){n.preventDefault();o.$modal.trigger(l.CONFIRMATION);o.settings.closeOnConfirm&&o.close(l.CONFIRMATION)});o.$wrapper.on("click."+e,function(n){var i=t(n.target);i.hasClass(u("wrapper"))&&o.settings.closeOnOutsideClick&&o.close()})}var r="remodal",e=n.REMODAL_GLOBALS&&n.REMODAL_GLOBALS.NAMESPACE||r,h=t.map(["animationstart","webkitAnimationStart","MSAnimationStart","oAnimationStart"],function(n){return n+"."+e}).join(" "),c=t.map(["animationend","webkitAnimationEnd","MSAnimationEnd","oAnimationEnd"],function(n){return n+"."+e}).join(" "),d=t.extend({hashTracking:!0,closeOnConfirm:!0,closeOnCancel:!0,closeOnEscape:!0,closeOnOutsideClick:!0,modifier:"",appendTo:null},n.REMODAL_GLOBALS&&n.REMODAL_GLOBALS.DEFAULTS),i={CLOSING:"closing",CLOSED:"closed",OPENING:"opening",OPENED:"opened"},l={CONFIRMATION:"confirmation",CANCELLATION:"cancellation"},g=function(){var n=document.createElement("div").style;return n.animationName!==undefined||n.WebkitAnimationName!==undefined||n.MozAnimationName!==undefined||n.msAnimationName!==undefined||n.OAnimationName!==undefined}(),v=/iPad|iPhone|iPod/.test(navigator.platform),f,y;s.prototype.open=function(){var n=this,u;n.state!==i.OPENING&&n.state!==i.CLOSING&&(u=n.$modal.attr("data-"+r+"-id"),u&&n.settings.hashTracking&&(y=t(window).scrollTop(),location.hash=u),f&&f!==n&&k(f),f=n,nt(),n.$bg.addClass(n.settings.modifier),n.$overlay.addClass(n.settings.modifier).show(),n.$wrapper.show().scrollTop(0),n.$modal.focus(),b(function(){o(n,i.OPENING)},function(){o(n,i.OPENED)},n))};s.prototype.close=function(n){var u=this;u.state!==i.OPENING&&u.state!==i.CLOSING&&u.state!==i.CLOSED&&(u.settings.hashTracking&&u.$modal.attr("data-"+r+"-id")===location.hash.substr(1)&&(location.hash="",t(window).scrollTop(y)),b(function(){o(u,i.CLOSING,!1,n)},function(){u.$bg.removeClass(u.settings.modifier);u.$overlay.removeClass(u.settings.modifier).hide();u.$wrapper.hide();w();o(u,i.CLOSED,!1,n)},u))};s.prototype.getState=function(){return this.state};s.prototype.destroy=function(){var n=t[r].lookup,f;k(this);this.$wrapper.remove();delete n[this.index];f=t.grep(n,function(n){return!!n}).length;f===0&&(this.$overlay.remove(),this.$bg.removeClass(u("is",i.CLOSING)+" "+u("is",i.OPENING)+" "+u("is",i.CLOSED)+" "+u("is",i.OPENED)))};t[r]={lookup:[]};t.fn[r]=function(n){var i,u;return this.each(function(f,e){u=t(e);u.data(r)==null?(i=new s(u,n),u.data(r,i.index),i.settings.hashTracking&&u.attr("data-"+r+"-id")===location.hash.substr(1)&&i.open()):i=t[r].lookup[u.data(r)]}),i};t(document).ready(function(){t(document).on("click","[data-"+r+"-target]",function(n){n.preventDefault();var i=n.currentTarget,u=i.getAttribute("data-"+r+"-target"),f=t("[data-"+r+'-id="'+u+'"]');t[r].lookup[f.data(r)].open()});t(document).find("."+e).each(function(n,i){var f=t(i),u=f.data(r+"-options");u?(typeof u=="string"||u instanceof String)&&(u=tt(u)):u={};f[r](u)});t(document).on("keydown."+e,function(n){f&&f.settings.closeOnEscape&&f.state===i.OPENED&&n.keyCode===27&&f.close()});t(window).on("hashchange."+e,it)})}),function(n){typeof module=="object"&&module.exports?module.exports=n():window.intlTelInput=n()}(()=>{var n=(()=>{var w=Object.defineProperty,ti=Object.getOwnPropertyDescriptor,ii=Object.getOwnPropertyNames,ri=Object.prototype.hasOwnProperty,ui=(n,t)=>{for(var i in t)w(n,i,{get:t[i],enumerable:!0})},fi=(n,t,i,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let u of ii(t))ri.call(n,u)||u===i||w(n,u,{get:()=>t[u],enumerable:!(r=ti(t,u))||r.enumerable});return n},ei=n=>fi(w({},"__esModule",{value:!0}),n),it={},rt,b;ui(it,{Iti:()=>ni,"default":()=>pr});rt=[["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"]];b=[];for(let n of rt)b.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 s=b,a={OPEN_COUNTRY_DROPDOWN:"open:countrydropdown",CLOSE_COUNTRY_DROPDOWN:"close:countrydropdown",COUNTRY_CHANGE:"countrychange",INPUT:"input"},t={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"},u={ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",SPACE:" ",ENTER:"Enter",ESC:"Escape",TAB:"Tab"},ut={PASTE:"insertFromPaste",DELETE_FWD:"deleteContentForward"},o={ALPHA_UNICODE:/\p{L}/u,NON_PLUS_NUMERIC:/[^+0-9]/,NON_PLUS_NUMERIC_GLOBAL:/[^+0-9]/g,HIDDEN_SEARCH_CHAR:/^[a-zA-ZÀ-ÿа-яА-Я ]$/},ft={SEARCH_DEBOUNCE_MS:100,HIDDEN_SEARCH_RESET_MS:1e3,NEXT_TICK:0},et={UNKNOWN_NUMBER_TYPE:-99,UNKNOWN_VALIDATION_ERROR:-99},e={NARROW_VIEWPORT_WIDTH:500,SANE_SELECTED_WITH_DIAL_WIDTH:78,SANE_SELECTED_NO_DIAL_WIDTH:42,INPUT_PADDING_EXTRA_LEFT:6,DROPDOWN_MARGIN:3,SANE_DROPDOWN_HEIGHT:200},ot={PLUS:"+",NANP:"1"},k={ISO2:"gb",DIAL_CODE:"44",MOBILE_PREFIX:"7",MOBILE_CORE_LENGTH:10},oi={ISO2:"us",DIAL_CODE:"1"},v={AGGRESSIVE:"aggressive",POLITE:"polite",OFF:"off"},h={AUTO:"auto"},y=new Set(["FIXED_LINE","MOBILE","FIXED_LINE_OR_MOBILE","TOLL_FREE","PREMIUM_RATE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL","UNKNOWN"]),st={COUNTRY_CODE:"countryCode",DIAL_CODE:"dialCode"},i={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"},si={selectedCountryAriaLabel:"Change country, selected ${countryName} (${dialCode})",noCountrySelected:"Select country",countryListAriaLabel:"List of countries",searchPlaceholder:"Search",clearSearchAriaLabel:"Clear search",searchEmptyState:"No results found",searchSummaryAria(n){return n===0?"No results found":n===1?"1 result found":`${n} results found`}},hi=si,d=n=>typeof window<"u"&&typeof matchMedia=="function"&&window.matchMedia(n).matches,ht=()=>d(`(max-width: ${e.NARROW_VIEWPORT_WIDTH}px)`),ci=()=>{if(typeof navigator<"u"&&typeof window<"u"){let n=d("(max-height: 600px)"),t=d("(pointer: coarse)");return ht()||t&&n}return!1},g={allowDropdown:!0,allowedNumberTypes:["MOBILE","FIXED_LINE"],allowNumberExtensions:!1,allowPhonewords:!1,autoPlaceholder:v.POLITE,containerClass:"",countryNameLocale:"en",countryOrder:null,countrySearch:!0,customPlaceholder:null,dropdownAlwaysOpen:!1,dropdownContainer:null,excludeCountries:[],fixDropdownWidth:!0,formatAsYouType:!0,formatOnDisplay:!0,geoIpLookup:null,hiddenInput:null,i18n:{},initialCountry:"",loadUtils:null,nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",searchInputClass:"",separateDialCode:!1,showFlags:!0,strictMode:!1,useFullscreenPopup:ci()},ct=n=>JSON.stringify(n),lt=n=>!!n&&typeof n=="object"&&!Array.isArray(n),li=n=>typeof n=="function",ai=n=>{if(!n||typeof n!="object")return!1;let t=n;return t.nodeType===1&&typeof t.tagName=="string"&&typeof t.appendChild=="function"},vi=new Set(s.map(n=>n.iso2)),at=n=>vi.has(n),vt=new Set(Object.values(v)),p=n=>{console.warn(`[intl-tel-input] ${n}`)},f=(n,t,i)=>{p(`Option '${n}' must be ${t}; got ${ct(i)}. Ignoring.`)},yi=(n,t)=>Object.prototype.hasOwnProperty.call(n,t),yt=(n,t)=>{let i="an array of ISO2 country code strings";if(!Array.isArray(t))return f(n,i,t),!1;for(let r of t){if(typeof r!="string")return f(n,i,t),!1;let u=r.toLowerCase();if(!at(u))return p(`Invalid country code in '${n}': '${r}'. Ignoring.`),!1}return!0},pi=n=>{if(n===void 0)return{};if(!lt(n)){let t=`The second argument must be an options object; got ${ct(n)}. Using defaults.`;return p(t),{}}let t={};for(let[r,i]of Object.entries(n)){if(!yi(g,r)){p(`Unknown option '${r}'. Ignoring.`);continue}switch(r){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"useFullscreenPopup":if(typeof i!="boolean"){f(r,"a boolean",i);break}t[r]=i;break;case"autoPlaceholder":if(typeof i!="string"||!vt.has(i)){let n=Array.from(vt).join(", ");f("autoPlaceholder",`one of ${n}`,i);break}t[r]=i;break;case"containerClass":case"searchInputClass":case"countryNameLocale":if(typeof i!="string"){f(r,"a string",i);break}t[r]=i;break;case"countryOrder":(i===null||yt(r,i))&&(t[r]=i);break;case"customPlaceholder":case"geoIpLookup":case"hiddenInput":case"loadUtils":if(i!==null&&!li(i)){f(r,"a function or null",i);break}t[r]=i;break;case"dropdownContainer":if(i!==null&&!ai(i)){f("dropdownContainer","an HTMLElement or null",i);break}t[r]=i;break;case"excludeCountries":case"onlyCountries":yt(r,i)&&(t[r]=i);break;case"i18n":if(i&&!lt(i)){f("i18n","an object",i);break}t[r]=i;break;case"initialCountry":{if(typeof i!="string"){f("initialCountry","a string",i);break}let n=i.toLowerCase();if(n&&n!==h.AUTO&&!at(n)){f("initialCountry","a valid ISO2 country code or 'auto'",i);break}t[r]=i;break}case"placeholderNumberType":if(typeof i!="string"||!y.has(i)){let n=Array.from(y).join(", ");f("placeholderNumberType",`one of ${n}`,i);break}t[r]=i;break;case"allowedNumberTypes":if(i!==null){if(!Array.isArray(i)){f("allowedNumberTypes","an array of number types or null",i);break}let n=!0;for(let t of i)if(typeof t!="string"||!y.has(t)){let i=Array.from(y).join(", ");f("allowedNumberTypes",`an array of valid number types (${i})`,t);n=!1;break}n&&(t[r]=i)}else t[r]=null}}return t},wi=n=>{n.dropdownAlwaysOpen&&(n.useFullscreenPopup=!1,n.allowDropdown=!0),n.useFullscreenPopup?n.fixDropdownWidth=!1:ht()&&(n.fixDropdownWidth=!0),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={...hi,...n.i18n}},c=n=>n.replace(/\D/g,""),pt=(n="")=>n.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),bi=()=>typeof navigator<"u"?/Android/i.test(navigator.userAgent):!1,ki=(n,t)=>{let i=pt(t),u=[],f=[],e=[],o=[],s=[],h=[];for(let t of n)t.iso2===i?u.push(t):t.normalisedName.startsWith(i)?f.push(t):t.normalisedName.includes(i)?e.push(t):i===t.dialCode||i===t.dialCodePlus?o.push(t):t.dialCodePlus.includes(i)?s.push(t):t.initials.includes(i)&&h.push(t);let r=(n,t)=>n.priority-t.priority;return[...u.sort(r),...f.sort(r),...e.sort(r),...o.sort(r),...s.sort(r),...h.sort(r)]},di=(n,t)=>{let i=t.toLowerCase();for(let t of n)if(t.name.toLowerCase().startsWith(i))return t;return null},nt=n=>Object.keys(n).filter(t=>!!n[t]).join(" "),r=(n,t,i)=>{let r=document.createElement(n);return t&&Object.entries(t).forEach(([n,t])=>r.setAttribute(n,t)),i&&i.appendChild(r),r},gi=()=>` `,nr=n=>{let t=`iti-${n}-clear-mask`;return` `},tr=()=>` `,wt=()=>` `,bt=class n{constructor(n,t,i){this.searchKeyupTimer=null;this.inlineDropdownHeight=null;this.dropdownForContainer=null;this.highlightedItem=null;this.selectedItem=null;n.dataset.intlTelInputId=i.toString();this.telInput=n;this.options=t;this.id=i;this.a=!!n.getAttribute("placeholder");this.isRTL=!!this.telInput.closest("[dir=rtl]");this.options.separateDialCode&&(this.o=this.telInput.style.paddingLeft)}static validateInput(n){let t=n?.tagName;if(!(!!n&&typeof n=="object"&&t==="INPUT"&&typeof n.setAttribute=="function")){let t=Object.prototype.toString.call(n);throw new TypeError(`The first argument must be an HTMLInputElement, not ${t}`);}}generateMarkup(n){this.countries=n;this.telInput.classList.add("iti__tel-input");this.telInput.hasAttribute("autocomplete")||this.telInput.setAttribute("autocomplete","tel");this.telInput.hasAttribute("inputmode")||this.telInput.setAttribute("inputmode","tel");let t=this._au();this._av(t);t.appendChild(this.telInput);this._ay();this._az(t)}_au(){let{allowDropdown:i,showFlags:u,containerClass:t,useFullscreenPopup:f}=this.options,e=nt({iti:!0,"iti--allow-dropdown":i,"iti--show-flags":u,"iti--inline-dropdown":!f,[t]:!!t}),n=r("div",{"class":e});return this.isRTL&&n.setAttribute("dir","ltr"),this.telInput.before(n),n}_av(n){let{allowDropdown:u,separateDialCode:f,showFlags:e}=this.options;if(u||e||f){this.countryContainer=r("div",{"class":`iti__country-container ${t.V_HIDE}`},n);u?(this.selectedCountry=r("button",{type:"button","class":"iti__selected-country",[i.EXPANDED]:"false",[i.LABEL]:this.options.i18n.noCountrySelected,[i.HASPOPUP]:"dialog",[i.CONTROLS]:`iti-${this.id}__dropdown-content`},this.countryContainer),this.telInput.disabled&&this.selectedCountry.setAttribute("disabled","true")):this.selectedCountry=r("div",{"class":"iti__selected-country"},this.countryContainer);let e=r("div",{"class":"iti__selected-country-primary"},this.selectedCountry);this.selectedCountryInner=r("div",{"class":t.FLAG},e);u&&(this.dropdownArrow=r("div",{"class":"iti__arrow",[i.HIDDEN]:"true"},e));f&&(this.selectedDialCode=r("div",{"class":"iti__selected-dial-code"},this.selectedCountry));u&&this._aw()}}_maybeEnsureDropdownWidthSet(){let{fixDropdownWidth:n}=this.options;if(n&&!this.dropdownContent.style.width){let n=this.telInput.offsetWidth;n>0&&(this.dropdownContent.style.width=`${n}px`)}}_aw(){let{fixDropdownWidth:e,useFullscreenPopup:n,countrySearch:u,i18n:o,dropdownContainer:s,containerClass:f}=this.options,h=e?"":"iti--flexible-dropdown-width";if(this.dropdownContent=r("div",{id:`iti-${this.id}__dropdown-content`,"class":`iti__dropdown-content ${t.HIDE} ${h}`,role:"dialog",[i.MODAL]:"true"}),this.isRTL&&this.dropdownContent.setAttribute("dir","rtl"),u&&this._ax(),this.countryList=r("ul",{"class":"iti__country-list",id:`iti-${this.id}__country-listbox`,role:"listbox",[i.LABEL]:o.countryListAriaLabel},this.dropdownContent),this._ba(),u&&this.updateSearchResultsA11yText(),n||(this._maybeEnsureDropdownWidthSet(),this.inlineDropdownHeight=this.getHiddenInlineDropdownHeight(),u&&(this.dropdownContent.style.height=`${this.inlineDropdownHeight}px`)),s){let t=nt({iti:!0,"iti--container":!0,"iti--fullscreen-popup":n,"iti--inline-dropdown":!n,[f]:!!f});this.dropdownForContainer=r("div",{"class":t});this.dropdownForContainer.appendChild(this.dropdownContent)}else this.countryContainer.appendChild(this.dropdownContent)}_ax(){let{i18n:n,searchInputClass:f}=this.options,u=r("div",{"class":"iti__search-input-wrapper"},this.dropdownContent);this.searchIcon=r("span",{"class":"iti__search-icon",[i.HIDDEN]:"true"},u);this.searchIcon.innerHTML=gi();this.searchInput=r("input",{id:`iti-${this.id}__search-input`,type:"search","class":`iti__search-input ${f}`,placeholder:n.searchPlaceholder,role:"combobox",[i.EXPANDED]:"true",[i.LABEL]:n.searchPlaceholder,[i.CONTROLS]:`iti-${this.id}__country-listbox`,[i.AUTOCOMPLETE]:"list",autocomplete:"off"},u);this.k=r("button",{type:"button","class":`iti__search-clear ${t.HIDE}`,[i.LABEL]:n.clearSearchAriaLabel,tabindex:"-1"},u);this.k.innerHTML=nr(this.id);this.l=r("span",{"class":"iti__a11y-text"},this.dropdownContent);this.searchNoResults=r("div",{"class":`iti__no-results ${t.HIDE}`,[i.HIDDEN]:"true"},this.dropdownContent);this.searchNoResults.textContent=n.searchEmptyState}_ay(){this.countryContainer&&(this.updateInputPadding(),this.countryContainer.classList.remove(t.V_HIDE))}_az(n){let{hiddenInput:t}=this.options;if(t){let u=this.telInput.getAttribute("name")||"",i=t(u);if(i.phone){let t=this.telInput.form?.querySelector(`input[name="${i.phone}"]`);t?this.hiddenInput=t:(this.hiddenInput=r("input",{type:"hidden",name:i.phone}),n.appendChild(this.hiddenInput))}if(i.country){let t=this.telInput.form?.querySelector(`input[name="${i.country}"]`);t?this.m=t:(this.m=r("input",{type:"hidden",name:i.country}),n.appendChild(this.m))}}}_ba(){let n=document.createDocumentFragment();for(let u=0;u0?f:e.SANE_DROPDOWN_HEIGHT}updateSearchResultsA11yText(){let{i18n:n}=this.options,t=this.countryList.childElementCount;this.l.textContent=n.searchSummaryAria(t)}filterCountriesByQuery(n){let t;t=n===""?this.countries:ki(this.countries,n);this.filterCountries(t)}doFilter(){let n=this.searchInput.value.trim();this.filterCountriesByQuery(n);this.searchInput.value?this.k.classList.remove(t.HIDE):this.k.classList.add(t.HIDE)}handleSearchChange(){this.searchKeyupTimer&&clearTimeout(this.searchKeyupTimer);this.searchKeyupTimer=setTimeout(()=>{this.doFilter(),this.searchKeyupTimer=null},ft.SEARCH_DEBOUNCE_MS)}handleSearchClear(){this.searchInput.value="";this.searchInput.focus();this.doFilter()}scrollTo(n){let t=this.countryList,u=document.documentElement.scrollTop,f=t.offsetHeight,i=t.getBoundingClientRect().top+u,s=i+f,e=n.offsetHeight,r=n.getBoundingClientRect().top+u,h=r+e,o=r-i+t.scrollTop;if(rs){let n=f-e;t.scrollTop=o-n}}highlightListItem(n,r){let u=this.highlightedItem;if(u&&u.classList.remove(t.HIGHLIGHT),this.highlightedItem=n,this.highlightedItem&&(this.highlightedItem.classList.add(t.HIGHLIGHT),this.options.countrySearch)){let n=this.highlightedItem.getAttribute("id")||"";this.searchInput.setAttribute(i.ACTIVE_DESCENDANT,n)}r&&this.highlightedItem.focus()}handleUpDownKey(n){let t=n===u.ARROW_UP?this.highlightedItem?.previousElementSibling:this.highlightedItem?.nextElementSibling;!t&&this.countryList.childElementCount>1&&(t=n===u.ARROW_UP?this.countryList.lastElementChild:this.countryList.firstElementChild);t&&(this.scrollTo(t),this.highlightListItem(t,!1))}updateSelectedItem(n){if(this.selectedItem&&this.selectedItem.dataset.countryCode!==n&&(this.selectedItem.setAttribute(i.SELECTED,"false"),this.selectedItem.querySelector(".iti__country-check")?.remove(),this.selectedItem=null),n&&!this.selectedItem){let t=this.countryList.querySelector(`[data-country-code="${n}"]`);if(t){t.setAttribute(i.SELECTED,"true");let n=r("span",{"class":"iti__country-check",[i.HIDDEN]:"true"},t);n.innerHTML=tr();this.selectedItem=t}}}filterCountries(n){this.countryList.innerHTML="";let i=!0;for(let t of n){let n=t.nodeById[this.id];n&&(this.countryList.appendChild(n),i&&(this.highlightListItem(n,!1),i=!1))}i?(this.highlightListItem(null,!1),this.searchNoResults&&this.searchNoResults.classList.remove(t.HIDE)):this.searchNoResults&&this.searchNoResults.classList.add(t.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.o);let 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.k=null;this.searchNoResults=null;this.l=null;this.countryList=null;this.dropdownForContainer=null;this.hiddenInput=null;this.m=null;this.highlightedItem=null;this.selectedItem=null;for(let n of this.countries)delete n.nodeById[this.id];this.countries=null}openDropdown(){let{countrySearch:n,dropdownAlwaysOpen:r,dropdownContainer:u}=this.options;if(this._maybeEnsureDropdownWidthSet(),u)this._handleDropdownContainer();else{let t=this._shouldPositionInlineDropdownBelowInput(),n=this.telInput.offsetHeight+e.DROPDOWN_MARGIN;t?this.dropdownContent.style.top=`${n}px`:this.dropdownContent.style.bottom=`${n}px`}if(this.dropdownContent.classList.remove(t.HIDE),this.selectedCountry.setAttribute(i.EXPANDED,"true"),n){let n=this.countryList.firstElementChild;n&&(this.highlightListItem(n,!1),this.countryList.scrollTop=0);r||this.searchInput.focus()}this.dropdownArrow.classList.add(t.ARROW_UP)}closeDropdown(){let{countrySearch:n,dropdownContainer:r}=this.options;this.dropdownContent.classList.add(t.HIDE);this.selectedCountry.setAttribute(i.EXPANDED,"false");n&&(this.searchInput.removeAttribute(i.ACTIVE_DESCENDANT),this.highlightedItem&&(this.highlightedItem.classList.remove(t.HIGHLIGHT),this.highlightedItem=null));this.dropdownArrow.classList.remove(t.ARROW_UP);r?(this.dropdownForContainer.remove(),this.dropdownForContainer.style.top="",this.dropdownForContainer.style.bottom=""):(this.dropdownContent.style.top="",this.dropdownContent.style.bottom="")}_shouldPositionInlineDropdownBelowInput(){if(this.options.dropdownAlwaysOpen)return!0;let n=this.telInput.getBoundingClientRect(),i=n.top,t=window.innerHeight-n.bottom;return t>=this.inlineDropdownHeight||t>=i}_handleDropdownContainer(){let{dropdownContainer:n,useFullscreenPopup:t}=this.options;if(n){if(!t){let n=this.telInput.getBoundingClientRect();this.dropdownForContainer.style.left=`${n.left}px`;this._shouldPositionInlineDropdownBelowInput()?this.dropdownForContainer.style.top=`${n.bottom+e.DROPDOWN_MARGIN}px`:(this.dropdownForContainer.style.top="unset",this.dropdownForContainer.style.bottom=`${window.innerHeight-n.top+e.DROPDOWN_MARGIN}px`)}n.appendChild(this.dropdownForContainer)}}isDropdownClosed(){return this.dropdownContent.classList.contains(t.HIDE)}setCountry(n){let{allowDropdown:s,showFlags:e,separateDialCode:h,i18n:u}=this.options,{name:o,dialCode:f,iso2:r=""}=n;if(s&&this.updateSelectedItem(r),this.selectedCountry){let c=r&&e?`${t.FLAG} iti__${r}`:`${t.FLAG} ${t.GLOBE}`,n,s,h;r?(s=o,n=u.selectedCountryAriaLabel.replace("${countryName}",o).replace("${dialCode}",`+${f}`),h=e?"":wt()):(s=u.noCountrySelected,n=u.noCountrySelected,h=wt());this.selectedCountryInner.className=c;this.selectedCountry.setAttribute("title",s);this.selectedCountry.setAttribute(i.LABEL,n);this.selectedCountryInner.innerHTML=h}if(h){let n=f?`+${f}`:"";this.selectedDialCode.textContent=n;this.updateInputPadding()}}},ir=n=>{let{onlyCountries:t,excludeCountries:i}=n;if(t?.length){let n=t.map(n=>n.toLowerCase());return s.filter(t=>n.includes(t.iso2))}if(i?.length){let n=i.map(n=>n.toLowerCase());return s.filter(t=>!n.includes(t.iso2))}return s},rr=(n,t)=>{let{countryNameLocale:r,i18n:u}=t,i;try{i=typeof Intl<"u"&&typeof Intl.DisplayNames=="function"?new Intl.DisplayNames(r,{type:"region"}):null}catch(f){console.error(f);i=null}for(let t of n)t.name=u[t.iso2]||i?.of(t.iso2.toUpperCase())||""},ur=n=>{let r=new Set,u=0,t={},i=(n,i)=>{if(n&&i){i.length>u&&(u=i.length);t.hasOwnProperty(i)||(t[i]=[]);let r=t[i];r.includes(n)||r.push(n)}},f=[...n].sort((n,t)=>n.priority-t.priority);for(let n of f){r.has(n.dialCode)||r.add(n.dialCode);for(let t=1;t{t.countryOrder&&(t.countryOrder=t.countryOrder.map(n=>n.toLowerCase())),n.sort((n,i)=>{let{countryOrder:r}=t;if(r){let u=r.indexOf(n.iso2),f=r.indexOf(i.iso2),t=u>-1,e=f>-1;if(t||e)return t&&e?u-f:t?-1:1}return n.name.localeCompare(i.name)})},er=n=>{for(let t of n)t.normalisedName=pt(t.name),t.initials=t.normalisedName.split(/[^a-z]/).map(n=>n[0]).join(""),t.dialCodePlus=`+${t.dialCode}`},or=new Set(["800","808","870","881","882","883","888","979"]),kt=n=>{let t=c(n).slice(0,3);return n.startsWith("+")&&or.has(t)},dt=(n,t,i,r)=>{let u=n;if(i&&t){let n=`+${r.dialCode}`,t=u[n.length]===" "||u[n.length]==="-"?n.length+1:n.length;u=u.substring(t)}return u},sr=(n,t,i,r,u)=>{let f=i?i.formatNumberAsYouType(n,r.iso2):n,{dialCode:e}=r;return u&&t.charAt(0)!=="+"&&f.includes(`+${e}`)?(f.split(`+${e}`)[1]||"").trim():f},hr=(n,t,i,r)=>{if(i===0&&!r)return 0;let u=0;for(let i=0;i{let t=c(n);if(t.startsWith(ot.NANP)&&t.length>=4){let n=t.substring(1,4);return cr.includes(n)}return!1},lr=class{constructor(){}updateNumeralSet(n){this.userNumeralSet=/[\u0660-\u0669]/.test(n)?"arabic-indic":/[\u06F0-\u06F9]/.test(n)?"persian":"ascii"}denormalise(n,t){if(this.userNumeralSet||this.updateNumeralSet(t),this.userNumeralSet==="ascii")return n;let i=this.userNumeralSet==="arabic-indic"?1632:1776;return n.replace(/[0-9]/g,n=>String.fromCharCode(i+Number(n)))}normalise(n){if(!n)return"";if(this.updateNumeralSet(n),this.userNumeralSet==="ascii")return n;let t=this.userNumeralSet==="arabic-indic"?1632:1776,i=this.userNumeralSet==="arabic-indic"?/[\u0660-\u0669]/g:/[\u06F0-\u06F9]/g;return n.replace(i,n=>String.fromCharCode(48+(n.charCodeAt(0)-t)))}isAscii(){return this.userNumeralSet==="ascii"}},ar=0,vr=new Set(s.map(n=>n.iso2)),tt=n=>vr.has(n),ni=class{constructor(n,t={}){this.id=ar++;bt.validateInput(n);let i=pi(t);this.options={...g,...i};wi(this.options);this.ui=new bt(n,this.options,this.id);this.i=bi();this.numerals=new lr;this.promise=this._c(this.options);this.countries=ir(this.options);let{dialCodes:r,dialCodeMaxLen:u,dialCodeToIso2Map:f}=ur(this.countries);this.dialCodes=r;this.dialCodeMaxLen=u;this.dialCodeToIso2Map=f;this.j=new Map(this.countries.map(n=>[n.iso2,n]));this._init()}_getTelInputValue(){let n=this.ui.telInput.value.trim();return this.numerals.normalise(n)}_setTelInputValue(n){let t=this.ui.telInput.value;this.ui.telInput.value=this.numerals.denormalise(n,t)}_c(t){let{initialCountry:u,geoIpLookup:f,loadUtils:e}=t,o=u===h.AUTO&&!!f,s=!!e&&!n.utils,i;o?i=new Promise((n,t)=>{this.b=n,this.c=t}):(i=Promise.resolve(void 0),this.b=()=>{},this.c=()=>{});let r;return s?r=new Promise((n,t)=>{this.d=n,this.e=t}):(r=Promise.resolve(void 0),this.d=()=>{},this.e=()=>{}),Promise.all([i,r])}_init(){this.selectedCountryData={};this.g=new AbortController;this._a();this.ui.generateMarkup(this.countries);this._d();this._e();this._h();this.options.dropdownAlwaysOpen&&this._l()}_a(){rr(this.countries,this.options);fr(this.countries,this.options);er(this.countries)}_d(n=!1){let s=this.ui.telInput.getAttribute("value"),i=this.numerals.normalise(s),r=this._getTelInputValue(),t=i&&i.startsWith("+")&&(!r||!r.startsWith("+"))?i:r,c=this._ao(t),l=gt(t),{initialCountry:f,geoIpLookup:a}=this.options,e=f===h.AUTO&&a&&!n,u=f.toLowerCase(),o=tt(u);c?l?o?this._aj(u):e||this._aj(oi.ISO2):this._ai(t):o?this._aj(u):e||this._aj("");t&&this._ah(t)}_e(){this._j();this.options.allowDropdown&&this._g();(this.ui.hiddenInput||this.ui.m)&&this.ui.telInput.form&&this._f()}_f(){let n=()=>{this.ui.hiddenInput&&(this.ui.hiddenInput.value=this.getNumber()),this.ui.m&&(this.ui.m.value=this.selectedCountryData.iso2||"")};this.ui.telInput.form?.addEventListener("submit",n,{signal:this.g.signal})}_g(){let n=this.g.signal,i=n=>{this.ui.isDropdownClosed()?this.ui.telInput.focus():n.preventDefault()},t=this.ui.telInput.closest("label");t&&t.addEventListener("click",i,{signal:n});let r=()=>{this.ui.isDropdownClosed()&&!this.ui.telInput.disabled&&!this.ui.telInput.readOnly&&this._l()};this.ui.selectedCountry.addEventListener("click",r,{signal:n});let f=n=>{let t=[u.ARROW_UP,u.ARROW_DOWN,u.SPACE,u.ENTER];this.ui.isDropdownClosed()&&t.includes(n.key)&&(n.preventDefault(),n.stopPropagation(),this._l());n.key===u.TAB&&this._am()};this.ui.countryContainer.addEventListener("keydown",f,{signal:n})}_h(){let{loadUtils:t,initialCountry:i,geoIpLookup:r}=this.options;if(t&&!n.utils){let i=()=>{n.attachUtils(t)?.catch(()=>{})};if(n.documentReady())i();else{let n=()=>{i()};window.addEventListener("load",n,{signal:this.g.signal})}}else this.d();i===h.AUTO&&r&&(this.selectedCountryData.iso2?this.b():this._i())}_i(){if(n.autoCountry)this.handleAutoCountry();else if(this.ui.selectedCountryInner.classList.add(t.LOADING),!n.startedLoadingAutoCountry&&(n.startedLoadingAutoCountry=!0,typeof this.options.geoIpLookup=="function")){let i=(i="")=>{this.ui.selectedCountryInner.classList.remove(t.LOADING);let r=i.toLowerCase();tt(r)?(n.autoCountry=r,setTimeout(()=>l("handleAutoCountry"))):l("handleAutoCountryFailure")},r=()=>{this.ui.selectedCountryInner.classList.remove(t.LOADING),l("handleAutoCountryFailure")};this.options.geoIpLookup(i,r)}}_m(){this._l();this.ui.searchInput.value="+";this.ui.filterCountriesByQuery("")}_j(){this._p();this._n();this._o()}_p(){let{strictMode:r,formatAsYouType:u,separateDialCode:t,allowDropdown:f,countrySearch:e}=this.options,i=!1;o.ALPHA_UNICODE.test(this._getTelInputValue())&&(i=!0);let s=s=>{let h=this._getTelInputValue();if(this.i&&s?.data==="+"&&t&&f&&e){let n=this.ui.telInput.selectionStart||0,t=h.substring(0,n-1),i=h.substring(n);this._setTelInputValue(t+i);this._m();return}this._ai(h)&&this._ar();let c=s?.data&&o.NON_PLUS_NUMERIC.test(s.data),l=s?.inputType===ut.PASTE&&h;c||l&&!r?i=!0:o.NON_PLUS_NUMERIC.test(h)||(i=!1);let a=s?.detail&&s.detail.isSetNumber,v=this.numerals.isAscii();if(u&&!i&&!a&&v){let i=this.ui.telInput.selectionStart||0,f=h.substring(0,i).replace(o.NON_PLUS_NUMERIC_GLOBAL,"").length,e=s?.inputType===ut.DELETE_FWD,c=this._ap(),r=sr(c,h,n.utils,this.selectedCountryData,t),u=hr(f,r,i,e);this._setTelInputValue(r);this.ui.telInput.setSelectionRange(u,u)}if(t&&h.startsWith("+")&&this.selectedCountryData.dialCode){let n=dt(h,!0,t,this.selectedCountryData);this._setTelInputValue(n)}};this.ui.telInput.addEventListener("input",s,{signal:this.g.signal})}_n(){let{strictMode:i,separateDialCode:t,allowDropdown:r,countrySearch:u}=this.options;if(i||t){let f=f=>{if(f.key&&f.key.length===1&&!f.altKey&&!f.ctrlKey&&!f.metaKey){if(t&&r&&u&&f.key==="+"){f.preventDefault();this._m();return}if(i){let i=this._getTelInputValue(),r=!i.startsWith("+")&&this.ui.telInput.selectionStart===0&&f.key==="+",s=this.numerals.normalise(f.key),u=/^[0-9]$/.test(s),h=t?u:r||u,e=this.ui.telInput,c=e.selectionStart,l=e.selectionEnd,a=i.slice(0,c),v=i.slice(l),y=a+f.key+v,o=this._ap(y),p=n.utils.getCoreNumber(o,this.selectedCountryData.iso2),w=this.n&&p.length>this.n,b=this._s(o)!==null;h&&(!w||b||r)||f.preventDefault()}}};this.ui.telInput.addEventListener("keydown",f,{signal:this.g.signal})}}_o(){if(this.options.strictMode){let t=t=>{t.preventDefault();let r=this.ui.telInput,f=r.selectionStart,e=r.selectionEnd,u=this._getTelInputValue(),v=u.slice(0,f),y=u.slice(e),s=this.selectedCountryData.iso2,p=t.clipboardData.getData("text"),w=this.numerals.normalise(p),b=f===0&&e>0,k=!u.startsWith("+")||b,h=w.replace(o.NON_PLUS_NUMERIC_GLOBAL,""),d=h.startsWith("+"),c=h.replace(/\+/g,""),l=d&&k?`+${c}`:c,i=v+l+y;if(i.length>5){let t=n.utils.getCoreNumber(i,s);for(;t.length===0&&i.length>0;)i=i.slice(0,-1),t=n.utils.getCoreNumber(i,s);if(!t)return;if(this.n&&t.length>this.n)if(r.selectionEnd===u.length){let n=t.length-this.n;i=i.slice(0,i.length-n)}else return}this._setTelInputValue(i);let a=f+l.length;r.setSelectionRange(a,a);r.dispatchEvent(new InputEvent("input",{bubbles:!0}))};this.ui.telInput.addEventListener("paste",t,{signal:this.g.signal})}}_k(n){let t=Number(this.ui.telInput.getAttribute("maxlength"));return t&&n.length>t?n.substring(0,t):n}_as(n,t={}){let i=new CustomEvent(n,{bubbles:!0,cancelable:!0,detail:t});this.ui.telInput.dispatchEvent(i)}_l(){let{dropdownContainer:n,useFullscreenPopup:t}=this.options;if(this.h=new AbortController,this.ui.openDropdown(),!t&&n){let n=()=>this._am();window.addEventListener("scroll",n,{signal:this.h.signal})}this._y();this._as(a.OPEN_COUNTRY_DROPDOWN)}_y(){let n=this.h.signal;this._z(n);this._aa(n);this.options.dropdownAlwaysOpen||this._ab(n);this._ac(n);this.options.countrySearch&&this._ad(n)}_z(n){let i=n=>{let i=n.target?.closest(`.${t.COUNTRY_ITEM}`);i&&this.ui.highlightListItem(i,!1)};this.ui.countryList.addEventListener("mouseover",i,{signal:n})}_aa(n){let i=n=>{let i=n.target?.closest(`.${t.COUNTRY_ITEM}`);i&&this._al(i)};this.ui.countryList.addEventListener("click",i,{signal:n})}_ab(n){let t=n=>{!!n.target.closest(`#iti-${this.id}__dropdown-content`)||this._am()};setTimeout(()=>{document.documentElement.addEventListener("click",t,{signal:n})},0)}_ac(n){let t="",i=null,r=n=>{[u.ARROW_UP,u.ARROW_DOWN,u.ENTER,u.ESC].includes(n.key)&&(n.preventDefault(),n.stopPropagation(),n.key===u.ARROW_UP||n.key===u.ARROW_DOWN?this.ui.handleUpDownKey(n.key):n.key===u.ENTER?this._ag():n.key===u.ESC&&(this._am(),this.ui.selectedCountry.focus())),!this.options.countrySearch&&o.HIDDEN_SEARCH_CHAR.test(n.key)&&(n.stopPropagation(),i&&clearTimeout(i),t+=n.key.toLowerCase(),this._q(t),i=setTimeout(()=>{t=""},ft.HIDDEN_SEARCH_RESET_MS))};document.addEventListener("keydown",r,{signal:n})}_ad(n){this.ui.searchInput.addEventListener("input",()=>this.ui.handleSearchChange(),{signal:n});this.ui.k.addEventListener("click",()=>this.ui.handleSearchClear(),{signal:n})}_q(n){let t=di(this.countries,n);if(t){let n=t.nodeById[this.id];this.ui.highlightListItem(n,!1);this.ui.scrollTo(n)}}_ag(){this.ui.highlightedItem&&this._al(this.ui.highlightedItem)}_ah(t){let{formatOnDisplay:r,nationalMode:u,separateDialCode:f}=this.options,i=t;if(r&&n.utils&&this.selectedCountryData){let r=kt(t),e=u&&!r||!i.startsWith("+")&&!f,{NATIONAL:o,INTERNATIONAL:s}=n.utils.numberFormat,h=e?o:s;i=n.utils.formatNumber(i,this.selectedCountryData.iso2,h)}i=this._aq(i);this._setTelInputValue(i)}_ai(n){let t=this._s(n);return t!==null?this._aj(t):!1}_r(n){let{dialCode:t,nationalPrefix:i}=this.selectedCountryData;if(n.startsWith("+")||!t)return n;let r=i&&n.startsWith(i)&&!this.options.separateDialCode?n.substring(1):n;return`+${t}${r}`}_s(n){let u=n.indexOf("+"),t=u?n.substring(u):n,i=this.selectedCountryData.iso2,f=this.selectedCountryData.dialCode;t=this._r(t);let e=this._ao(t,!0),r=c(t);if(e){let u=c(e),n=this.dialCodeToIso2Map[u];if(n.length===1)return n[0]===i?null:n[0];if(!i&&this.f&&n.includes(this.f))return this.f;if(f===ot.NANP&>(r))return null;let{areaCodes:t,priority:o}=this.selectedCountryData;if(t){let n=t.map(n=>`${f}${n}`);for(let t of n)if(r.startsWith(t))return null}let s=t&&!(o===0)&&r.length>u.length,h=i&&n.includes(i)&&!s,l=i===n[0];if(!h&&!l)return n[0]}else{if(t.startsWith("+")&&r.length){let n=this.selectedCountryData.dialCode||"";return n&&n.startsWith(r)?null:""}if((!t||t==="+")&&!i&&this.f)return this.f}return null}_aj(n){let t=this.selectedCountryData.iso2||"";return this.selectedCountryData=n?this.j.get(n):{},this.selectedCountryData.iso2&&(this.f=this.selectedCountryData.iso2),this.ui.setCountry(this.selectedCountryData),this._ak(),this._t(),t!==n}_t(){let{strictMode:i,placeholderNumberType:r,allowedNumberTypes:u}=this.options,{iso2:t}=this.selectedCountryData;if(i&&n.utils)if(t){let o=n.utils.numberType[r],i=n.utils.getExampleNumber(t,!1,o,!0),f=i;for(;n.utils.isPossibleNumber(i,t,u);)f=i,i+="0";let e=n.utils.getCoreNumber(f,t);this.n=e.length;t==="by"&&(this.n=e.length+1)}else this.n=null}_ak(){let{autoPlaceholder:t,placeholderNumberType:r,nationalMode:u,customPlaceholder:i}=this.options,f=t===v.AGGRESSIVE||!this.ui.a&&t===v.POLITE;if(n.utils&&f){let f=n.utils.numberType[r],t=this.selectedCountryData.iso2?n.utils.getExampleNumber(this.selectedCountryData.iso2,u,f):"";t=this._aq(t);typeof i=="function"&&(t=i(t,this.selectedCountryData));this.ui.telInput.setAttribute("placeholder",t)}}_al(n){let t=n.dataset[st.COUNTRY_CODE],i=this._aj(t);this._am();let r=n.dataset[st.DIAL_CODE];if(this._an(r),this.options.formatOnDisplay){let n=this._getTelInputValue();this._ah(n)}this.ui.telInput.focus();i&&this._ar()}_am(n){this.ui.isDropdownClosed()||this.options.dropdownAlwaysOpen&&!n||(this.ui.closeDropdown(),this.h.abort(),this.h=null,this._as(a.CLOSE_COUNTRY_DROPDOWN))}_an(n){let t=this._getTelInputValue(),r=`+${n}`,i;if(t.startsWith("+")){let n=this._ao(t);i=n?t.replace(n,r):r;this._setTelInputValue(i)}}_ao(n,t){let i="";if(n.startsWith("+")){let r="",u=!1;for(let f=0;ft?this._w(n):this._u(n),i=this._ap();if(!this.selectedCountryData.iso2&&!kt(i)||!f(i))return!1;if(i.search(o.ALPHA_UNICODE)>-1){let t=this.selectedCountryData.iso2;return n.utils.getExtension(i,t)?r:u}return!0}_w(t){return n.utils?n.utils.isValidNumber(t,this.selectedCountryData.iso2,this.options.allowedNumberTypes):null}setCountry(n){if(this.ui.telInput){let t=n?.toLowerCase();if(!tt(t))throw new Error(`Invalid country code: '${t}'`);let i=this.selectedCountryData.iso2;if(n&&t!==i||!n&&i){if(this._aj(t),this._an(this.selectedCountryData.dialCode),this.options.formatOnDisplay){let n=this._getTelInputValue();this._ah(n)}this._ar()}}}setNumber(n){if(this.ui.telInput){let t=this.numerals.normalise(n),i=this._ai(t);this._ah(t);i&&this._ar();this._as(a.INPUT,{isSetNumber:!0})}}setPlaceholderNumberType(n){this.ui.telInput&&(this.options.placeholderNumberType=n,this._ak())}setDisabled(n){this.ui.telInput&&(this.ui.telInput.disabled=n,n?this.ui.selectedCountry.setAttribute("disabled","true"):this.ui.selectedCountry.removeAttribute("disabled"))}},yr=t=>{if(!n.utils&&!n.startedLoadingUtilsScript){let i;if(typeof t=="function")try{i=Promise.resolve(t())}catch(r){return Promise.reject(r)}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 t}`));return n.startedLoadingUtilsScript=!0,i.then(t=>{let i=t?.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 n.utils=i,l("handleUtils"),!0}).catch(n=>{throw l("handleUtilsFailure",n),n;})}return null},l=(t,...i)=>{Object.values(n.instances).forEach(n=>{let r=n[t];typeof r=="function"&&r.apply(n,i)})},n=Object.assign((t,i)=>{let r=new ni(t,i);return n.instances[r.id]=r,t.iti=r,r},{defaults:g,documentReady:()=>document.readyState==="complete",getCountryData:()=>s,getInstance:t=>{let i=t.dataset.intlTelInputId;return i?n.instances[i]:null},instances:{},attachUtils:yr,startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"26.7.5"}),pr=n;return ei(it)})();return n.default}); /*! * jQuery Cookie Plugin v1.4.1 * https://github.com/carhartl/jquery-cookie * * Copyright 2006, 2014 Klaus Hartl * Released under the MIT license */ (function(n){typeof define=="function"&&define.amd?define(["jquery"],n):typeof exports=="object"?module.exports=n(require("jquery")):n(jQuery)})(function(n){function i(n){return t.raw?n:encodeURIComponent(n)}function f(n){return t.raw?n:decodeURIComponent(n)}function e(n){return i(t.json?JSON.stringify(n):String(n))}function o(n){n.indexOf('"')===0&&(n=n.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return n=decodeURIComponent(n.replace(u," ")),t.json?JSON.parse(n):n}catch(i){}}function r(i,r){var u=t.raw?i:o(i);return n.isFunction(r)?r(u):u}var u=/\+/g,t=n.cookie=function(u,o,s){var v,c;if(arguments.length>1&&!n.isFunction(o))return s=n.extend({},t.defaults,s),typeof s.expires=="number"&&(v=s.expires,c=s.expires=new Date,c.setMilliseconds(c.getMilliseconds()+v*864e5)),document.cookie=[i(u),"=",e(o),s.expires?"; expires="+s.expires.toUTCString():"",s.path?"; path="+s.path:"",s.domain?"; domain="+s.domain:"",s.secure?"; secure":""].join("");for(var l=u?undefined:{},y=document.cookie?document.cookie.split("; "):[],a=0,b=y.length;a=0;r--)l(n(u[r]),i)}function l(t,i,r){var u=r&&r.force?r.force:!1;return t&&(u||n(":focus",t).length===0)?(t[i.hideMethod]({duration:i.hideDuration,easing:i.hideEasing,complete:function(){s(t)}}),!0):!1}function nt(i){return t=n("
").attr("id",i.containerId).addClass(i.positionClass).attr("aria-live","polite").attr("role","alert"),t.appendTo(n(i.target)),t}function tt(){return{tapToDismiss:!0,toastClass:"toast",containerId:"toast-container",debug:!1,showMethod:"fadeIn",showDuration:300,showEasing:"swing",onShown:undefined,hideMethod:"fadeOut",hideDuration:1e3,hideEasing:"swing",onHidden:undefined,extendedTimeOut:1e3,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},iconClass:"toast-info",positionClass:"toast-top-right",timeOut:5e3,titleClass:"toast-title",messageClass:"toast-message",target:"body",closeHtml:'