@movmo_app/react-common 0.10.3 → 0.10.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +2 -0
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -111,5 +111,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
111
111
|
Copyright (c) 2017 Jed Watson.
|
|
112
112
|
Licensed under the MIT License (MIT), see
|
|
113
113
|
http://jedwatson.github.io/classnames
|
|
114
|
-
*/(function(){var n={}.hasOwnProperty;function o(){for(var i=[],l=0;l<arguments.length;l++){var s=arguments[l];if(s){var u=typeof s;if(u==="string"||u==="number")i.push(s);else if(Array.isArray(s)&&s.length){var c=o.apply(null,s);c&&i.push(c)}else if(u==="object")for(var d in s)n.call(s,d)&&s[d]&&i.push(d)}}return i.join(" ")}e.exports?(o.default=o,e.exports=o):(a=(function(){return o}).apply(t,[]))===void 0||(e.exports=a)})()},function(e,t,r){(function(a){var n=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,l=/^0o[0-7]+$/i,s=parseInt,u=typeof a=="object"&&a&&a.Object===Object&&a,c=typeof self=="object"&&self&&self.Object===Object&&self,d=u||c||Function("return this")(),h=Object.prototype.toString,x=d.Symbol,y=x?x.prototype:void 0,C=y?y.toString:void 0;function f(E){if(typeof E=="string")return E;if(S(E))return C?C.call(E):"";var A=E+"";return A=="0"&&1/E==-1/0?"-0":A}function v(E){var A=typeof E;return!!E&&(A=="object"||A=="function")}function S(E){return typeof E=="symbol"||function(A){return!!A&&typeof A=="object"}(E)&&h.call(E)=="[object Symbol]"}function w(E){return E?(E=function(A){if(typeof A=="number")return A;if(S(A))return NaN;if(v(A)){var M=typeof A.valueOf=="function"?A.valueOf():A;A=v(M)?M+"":M}if(typeof A!="string")return A===0?A:+A;A=A.replace(n,"");var T=i.test(A);return T||l.test(A)?s(A.slice(2),T?2:8):o.test(A)?NaN:+A}(E))===1/0||E===-1/0?17976931348623157e292*(E<0?-1:1):E==E?E:0:E===0?E:0}e.exports=function(E,A,M){var T,B,Q,U;return E=(T=E)==null?"":f(T),B=function(ce){var H=w(ce),z=H%1;return H==H?z?H-z:H:0}(M),Q=0,U=E.length,B==B&&(U!==void 0&&(B=B<=U?B:U),Q!==void 0&&(B=B>=Q?B:Q)),M=B,A=f(A),E.slice(M,M+A.length)==A}}).call(this,r(3))},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch{typeof window=="object"&&(r=window)}e.exports=r},function(e,t,r){(function(a){var n=/^\[object .+?Constructor\]$/,o=typeof a=="object"&&a&&a.Object===Object&&a,i=typeof self=="object"&&self&&self.Object===Object&&self,l=o||i||Function("return this")(),s,u=Array.prototype,c=Function.prototype,d=Object.prototype,h=l["__core-js_shared__"],x=(s=/[^.]+$/.exec(h&&h.keys&&h.keys.IE_PROTO||""))?"Symbol(src)_1."+s:"",y=c.toString,C=d.hasOwnProperty,f=d.toString,v=RegExp("^"+y.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=u.splice,w=ce(l,"Map"),E=ce(Object,"create");function A(N){var j=-1,W=N?N.length:0;for(this.clear();++j<W;){var $=N[j];this.set($[0],$[1])}}function M(N){var j=-1,W=N?N.length:0;for(this.clear();++j<W;){var $=N[j];this.set($[0],$[1])}}function T(N){var j=-1,W=N?N.length:0;for(this.clear();++j<W;){var $=N[j];this.set($[0],$[1])}}function B(N,j){for(var W,$,te=N.length;te--;)if((W=N[te][0])===($=j)||W!=W&&$!=$)return te;return-1}function Q(N){return!(!z(N)||(j=N,x&&x in j))&&(function(W){var $=z(W)?f.call(W):"";return $=="[object Function]"||$=="[object GeneratorFunction]"}(N)||function(W){var $=!1;if(W!=null&&typeof W.toString!="function")try{$=!!(W+"")}catch{}return $}(N)?v:n).test(function(W){if(W!=null){try{return y.call(W)}catch{}try{return W+""}catch{}}return""}(N));var j}function U(N,j){var W,$,te=N.__data__;return(($=typeof(W=j))=="string"||$=="number"||$=="symbol"||$=="boolean"?W!=="__proto__":W===null)?te[typeof j=="string"?"string":"hash"]:te.map}function ce(N,j){var W=function($,te){return $==null?void 0:$[te]}(N,j);return Q(W)?W:void 0}function H(N,j){if(typeof N!="function"||j&&typeof j!="function")throw new TypeError("Expected a function");var W=function(){var $=arguments,te=j?j.apply(this,$):$[0],Ee=W.cache;if(Ee.has(te))return Ee.get(te);var Z=N.apply(this,$);return W.cache=Ee.set(te,Z),Z};return W.cache=new(H.Cache||T),W}function z(N){var j=typeof N;return!!N&&(j=="object"||j=="function")}A.prototype.clear=function(){this.__data__=E?E(null):{}},A.prototype.delete=function(N){return this.has(N)&&delete this.__data__[N]},A.prototype.get=function(N){var j=this.__data__;if(E){var W=j[N];return W==="__lodash_hash_undefined__"?void 0:W}return C.call(j,N)?j[N]:void 0},A.prototype.has=function(N){var j=this.__data__;return E?j[N]!==void 0:C.call(j,N)},A.prototype.set=function(N,j){return this.__data__[N]=E&&j===void 0?"__lodash_hash_undefined__":j,this},M.prototype.clear=function(){this.__data__=[]},M.prototype.delete=function(N){var j=this.__data__,W=B(j,N);return!(W<0)&&(W==j.length-1?j.pop():S.call(j,W,1),!0)},M.prototype.get=function(N){var j=this.__data__,W=B(j,N);return W<0?void 0:j[W][1]},M.prototype.has=function(N){return B(this.__data__,N)>-1},M.prototype.set=function(N,j){var W=this.__data__,$=B(W,N);return $<0?W.push([N,j]):W[$][1]=j,this},T.prototype.clear=function(){this.__data__={hash:new A,map:new(w||M),string:new A}},T.prototype.delete=function(N){return U(this,N).delete(N)},T.prototype.get=function(N){return U(this,N).get(N)},T.prototype.has=function(N){return U(this,N).has(N)},T.prototype.set=function(N,j){return U(this,N).set(N,j),this},H.Cache=T,e.exports=H}).call(this,r(3))},function(e,t,r){(function(a){var n=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,l=/^0o[0-7]+$/i,s=parseInt,u=typeof a=="object"&&a&&a.Object===Object&&a,c=typeof self=="object"&&self&&self.Object===Object&&self,d=u||c||Function("return this")(),h=Object.prototype.toString,x=Math.max,y=Math.min,C=function(){return d.Date.now()};function f(S){var w=typeof S;return!!S&&(w=="object"||w=="function")}function v(S){if(typeof S=="number")return S;if(function(A){return typeof A=="symbol"||function(M){return!!M&&typeof M=="object"}(A)&&h.call(A)=="[object Symbol]"}(S))return NaN;if(f(S)){var w=typeof S.valueOf=="function"?S.valueOf():S;S=f(w)?w+"":w}if(typeof S!="string")return S===0?S:+S;S=S.replace(n,"");var E=i.test(S);return E||l.test(S)?s(S.slice(2),E?2:8):o.test(S)?NaN:+S}e.exports=function(S,w,E){var A,M,T,B,Q,U,ce=0,H=!1,z=!1,N=!0;if(typeof S!="function")throw new TypeError("Expected a function");function j(O){var L=A,ae=M;return A=M=void 0,ce=O,B=S.apply(ae,L)}function W(O){return ce=O,Q=setTimeout(te,w),H?j(O):B}function $(O){var L=O-U;return U===void 0||L>=w||L<0||z&&O-ce>=T}function te(){var O=C();if($(O))return Ee(O);Q=setTimeout(te,function(L){var ae=w-(L-U);return z?y(ae,T-(L-ce)):ae}(O))}function Ee(O){return Q=void 0,N&&A?j(O):(A=M=void 0,B)}function Z(){var O=C(),L=$(O);if(A=arguments,M=this,U=O,L){if(Q===void 0)return W(U);if(z)return Q=setTimeout(te,w),j(U)}return Q===void 0&&(Q=setTimeout(te,w)),B}return w=v(w)||0,f(E)&&(H=!!E.leading,T=(z="maxWait"in E)?x(v(E.maxWait)||0,w):T,N="trailing"in E?!!E.trailing:N),Z.cancel=function(){Q!==void 0&&clearTimeout(Q),ce=0,A=U=M=Q=void 0},Z.flush=function(){return Q===void 0?B:Ee(C())},Z}}).call(this,r(3))},function(e,t,r){(function(a,n){var o="[object Arguments]",i="[object Map]",l="[object Object]",s="[object Set]",u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/,d=/^\./,h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,x=/\\(\\)?/g,y=/^\[object .+?Constructor\]$/,C=/^(?:0|[1-9]\d*)$/,f={};f["[object Float32Array]"]=f["[object Float64Array]"]=f["[object Int8Array]"]=f["[object Int16Array]"]=f["[object Int32Array]"]=f["[object Uint8Array]"]=f["[object Uint8ClampedArray]"]=f["[object Uint16Array]"]=f["[object Uint32Array]"]=!0,f[o]=f["[object Array]"]=f["[object ArrayBuffer]"]=f["[object Boolean]"]=f["[object DataView]"]=f["[object Date]"]=f["[object Error]"]=f["[object Function]"]=f[i]=f["[object Number]"]=f[l]=f["[object RegExp]"]=f[s]=f["[object String]"]=f["[object WeakMap]"]=!1;var v=typeof a=="object"&&a&&a.Object===Object&&a,S=typeof self=="object"&&self&&self.Object===Object&&self,w=v||S||Function("return this")(),E=t&&!t.nodeType&&t,A=E&&typeof n=="object"&&n&&!n.nodeType&&n,M=A&&A.exports===E&&v.process,T=function(){try{return M&&M.binding("util")}catch{}}(),B=T&&T.isTypedArray;function Q(p,R,P,k){var J=-1,re=p?p.length:0;for(k&&re&&(P=p[++J]);++J<re;)P=R(P,p[J],J,p);return P}function U(p,R){for(var P=-1,k=p?p.length:0;++P<k;)if(R(p[P],P,p))return!0;return!1}function ce(p,R,P,k,J){return J(p,function(re,ve,Le){P=k?(k=!1,re):R(P,re,ve,Le)}),P}function H(p){var R=!1;if(p!=null&&typeof p.toString!="function")try{R=!!(p+"")}catch{}return R}function z(p){var R=-1,P=Array(p.size);return p.forEach(function(k,J){P[++R]=[J,k]}),P}function N(p){var R=-1,P=Array(p.size);return p.forEach(function(k){P[++R]=k}),P}var j,W,$,te=Array.prototype,Ee=Function.prototype,Z=Object.prototype,O=w["__core-js_shared__"],L=(j=/[^.]+$/.exec(O&&O.keys&&O.keys.IE_PROTO||""))?"Symbol(src)_1."+j:"",ae=Ee.toString,_=Z.hasOwnProperty,b=Z.toString,fe=RegExp("^"+ae.call(_).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),de=w.Symbol,le=w.Uint8Array,Ae=Z.propertyIsEnumerable,we=te.splice,Pe=(W=Object.keys,$=Object,function(p){return W($(p))}),X=Ct(w,"DataView"),De=Ct(w,"Map"),Re=Ct(w,"Promise"),G=Ct(w,"Set"),V=Ct(w,"WeakMap"),K=Ct(Object,"create"),ge=yt(X),oe=yt(De),me=yt(Re),he=yt(G),Ge=yt(V),q=de?de.prototype:void 0,ie=q?q.valueOf:void 0,Ce=q?q.toString:void 0;function ee(p){var R=-1,P=p?p.length:0;for(this.clear();++R<P;){var k=p[R];this.set(k[0],k[1])}}function ne(p){var R=-1,P=p?p.length:0;for(this.clear();++R<P;){var k=p[R];this.set(k[0],k[1])}}function ke(p){var R=-1,P=p?p.length:0;for(this.clear();++R<P;){var k=p[R];this.set(k[0],k[1])}}function tt(p){var R=-1,P=p?p.length:0;for(this.__data__=new ke;++R<P;)this.add(p[R])}function Je(p){this.__data__=new ne(p)}function at(p,R){var P=g(p)||Nn(p)?function(ve,Le){for(var Xe=-1,We=Array(ve);++Xe<ve;)We[Xe]=Le(Xe);return We}(p.length,String):[],k=P.length,J=!!k;for(var re in p)!_.call(p,re)||J&&(re=="length"||on(re,k))||P.push(re);return P}function lt(p,R){for(var P=p.length;P--;)if(Gn(p[P][0],R))return P;return-1}ee.prototype.clear=function(){this.__data__=K?K(null):{}},ee.prototype.delete=function(p){return this.has(p)&&delete this.__data__[p]},ee.prototype.get=function(p){var R=this.__data__;if(K){var P=R[p];return P==="__lodash_hash_undefined__"?void 0:P}return _.call(R,p)?R[p]:void 0},ee.prototype.has=function(p){var R=this.__data__;return K?R[p]!==void 0:_.call(R,p)},ee.prototype.set=function(p,R){return this.__data__[p]=K&&R===void 0?"__lodash_hash_undefined__":R,this},ne.prototype.clear=function(){this.__data__=[]},ne.prototype.delete=function(p){var R=this.__data__,P=lt(R,p);return!(P<0)&&(P==R.length-1?R.pop():we.call(R,P,1),!0)},ne.prototype.get=function(p){var R=this.__data__,P=lt(R,p);return P<0?void 0:R[P][1]},ne.prototype.has=function(p){return lt(this.__data__,p)>-1},ne.prototype.set=function(p,R){var P=this.__data__,k=lt(P,p);return k<0?P.push([p,R]):P[k][1]=R,this},ke.prototype.clear=function(){this.__data__={hash:new ee,map:new(De||ne),string:new ee}},ke.prototype.delete=function(p){return zt(this,p).delete(p)},ke.prototype.get=function(p){return zt(this,p).get(p)},ke.prototype.has=function(p){return zt(this,p).has(p)},ke.prototype.set=function(p,R){return zt(this,p).set(p,R),this},tt.prototype.add=tt.prototype.push=function(p){return this.__data__.set(p,"__lodash_hash_undefined__"),this},tt.prototype.has=function(p){return this.__data__.has(p)},Je.prototype.clear=function(){this.__data__=new ne},Je.prototype.delete=function(p){return this.__data__.delete(p)},Je.prototype.get=function(p){return this.__data__.get(p)},Je.prototype.has=function(p){return this.__data__.has(p)},Je.prototype.set=function(p,R){var P=this.__data__;if(P instanceof ne){var k=P.__data__;if(!De||k.length<199)return k.push([p,R]),this;P=this.__data__=new ke(k)}return P.set(p,R),this};var vt,ze=(vt=function(p,R){return p&&Rt(p,R,Ue)},function(p,R){if(p==null)return p;if(!D(p))return vt(p,R);for(var P=p.length,k=-1,J=Object(p);++k<P&&R(J[k],k,J)!==!1;);return p}),Rt=function(p){return function(R,P,k){for(var J=-1,re=Object(R),ve=k(R),Le=ve.length;Le--;){var Xe=ve[++J];if(P(re[Xe],Xe,re)===!1)break}return R}}();function Wt(p,R){for(var P=0,k=(R=kt(R,p)?[R]:Ht(R)).length;p!=null&&P<k;)p=p[Lt(R[P++])];return P&&P==k?p:void 0}function nn(p,R){return p!=null&&R in Object(p)}function ht(p,R,P,k,J){return p===R||(p==null||R==null||!Se(p)&&!Ne(R)?p!=p&&R!=R:function(re,ve,Le,Xe,We,Te){var ut=g(re),qe=g(ve),Qe="[object Array]",Ke="[object Array]";ut||(Qe=(Qe=pt(re))==o?l:Qe),qe||(Ke=(Ke=pt(ve))==o?l:Ke);var dt=Qe==l&&!H(re),Yt=Ke==l&&!H(ve),Tt=Qe==Ke;if(Tt&&!dt)return Te||(Te=new Je),ut||xe(re)?an(re,ve,Le,Xe,We,Te):function(_e,je,mr,_t,Tn,it,It){switch(mr){case"[object DataView]":if(_e.byteLength!=je.byteLength||_e.byteOffset!=je.byteOffset)return!1;_e=_e.buffer,je=je.buffer;case"[object ArrayBuffer]":return!(_e.byteLength!=je.byteLength||!_t(new le(_e),new le(je)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Gn(+_e,+je);case"[object Error]":return _e.name==je.name&&_e.message==je.message;case"[object RegExp]":case"[object String]":return _e==je+"";case i:var Pt=z;case s:var ln=2⁢if(Pt||(Pt=N),_e.size!=je.size&&!ln)return!1;var Pn=It.get(_e);if(Pn)return Pn==je;it|=1,It.set(_e,je);var Jt=an(Pt(_e),Pt(je),_t,Tn,it,It);return It.delete(_e),Jt;case"[object Symbol]":if(ie)return ie.call(_e)==ie.call(je)}return!1}(re,ve,Qe,Le,Xe,We,Te);if(!(2&We)){var ga=dt&&_.call(re,"__wrapped__"),ma=Yt&&_.call(ve,"__wrapped__");if(ga||ma){var Bs=ga?re.value():re,Vs=ma?ve.value():ve;return Te||(Te=new Je),Le(Bs,Vs,Xe,We,Te)}}return Tt?(Te||(Te=new Je),function(_e,je,mr,_t,Tn,it){var It=2&Tn,Pt=Ue(_e),ln=Pt.length,Pn=Ue(je).length;if(ln!=Pn&&!It)return!1;for(var Jt=ln;Jt--;){var Ot=Pt[Jt];if(!(It?Ot in je:_.call(je,Ot)))return!1}var va=it.get(_e);if(va&&it.get(je))return va==je;var On=!0;it.set(_e,je),it.set(je,_e);for(var vr=It;++Jt<ln;){Ot=Pt[Jt];var Fn=_e[Ot],Mn=je[Ot];if(_t)var ha=It?_t(Mn,Fn,Ot,je,_e,it):_t(Fn,Mn,Ot,_e,je,it);if(!(ha===void 0?Fn===Mn||mr(Fn,Mn,_t,Tn,it):ha)){On=!1;break}vr||(vr=Ot=="constructor")}if(On&&!vr){var Bn=_e.constructor,Vn=je.constructor;Bn==Vn||!("constructor"in _e)||!("constructor"in je)||typeof Bn=="function"&&Bn instanceof Bn&&typeof Vn=="function"&&Vn instanceof Vn||(On=!1)}return it.delete(_e),it.delete(je),On}(re,ve,Le,Xe,We,Te)):!1}(p,R,ht,P,k,J))}function Gt(p){return!(!Se(p)||function(R){return!!L&&L in R}(p))&&(Y(p)||H(p)?fe:y).test(yt(p))}function Nt(p){return typeof p=="function"?p:p==null?He:typeof p=="object"?g(p)?function(k,J){return kt(k)&&En(J)?wn(Lt(k),J):function(re){var ve=function(Le,Xe,We){var Te=Le==null?void 0:Wt(Le,Xe);return Te===void 0?We:Te}(re,k);return ve===void 0&&ve===J?function(Le,Xe){return Le!=null&&function(We,Te,ut){Te=kt(Te,We)?[Te]:Ht(Te);for(var qe,Qe=-1,Ke=Te.length;++Qe<Ke;){var dt=Lt(Te[Qe]);if(!(qe=We!=null&&ut(We,dt)))break;We=We[dt]}return qe||!!(Ke=We?We.length:0)&&pe(Ke)&&on(dt,Ke)&&(g(We)||Nn(We))}(Le,Xe,nn)}(re,k):ht(J,ve,void 0,3)}}(p[0],p[1]):function(k){var J=function(re){for(var ve=Ue(re),Le=ve.length;Le--;){var Xe=ve[Le],We=re[Xe];ve[Le]=[Xe,We,En(We)]}return ve}(k);return J.length==1&&J[0][2]?wn(J[0][0],J[0][1]):function(re){return re===k||function(ve,Le,Xe,We){var Te=Xe.length,ut=Te;if(ve==null)return!ut;for(ve=Object(ve);Te--;){var qe=Xe[Te];if(qe[2]?qe[1]!==ve[qe[0]]:!(qe[0]in ve))return!1}for(;++Te<ut;){var Qe=(qe=Xe[Te])[0],Ke=ve[Qe],dt=qe[1];if(qe[2]){if(Ke===void 0&&!(Qe in ve))return!1}else{var Yt=new Je,Tt;if(!(Tt===void 0?ht(dt,Ke,We,3,Yt):Tt))return!1}}return!0}(re,k,J)}}(p):kt(R=p)?(P=Lt(R),function(k){return k==null?void 0:k[P]}):function(k){return function(J){return Wt(J,k)}}(R);var R,P}function rn(p){if(P=(R=p)&&R.constructor,k=typeof P=="function"&&P.prototype||Z,R!==k)return Pe(p);var R,P,k,J=[];for(var re in Object(p))_.call(p,re)&&re!="constructor"&&J.push(re);return J}function Ht(p){return g(p)?p:Rn(p)}function an(p,R,P,k,J,re){var ve=2&J,Le=p.length,Xe=R.length;if(Le!=Xe&&!(ve&&Xe>Le))return!1;var We=re.get(p);if(We&&re.get(R))return We==R;var Te=-1,ut=!0,qe=1&J?new tt:void 0;for(re.set(p,R),re.set(R,p);++Te<Le;){var Qe=p[Te],Ke=R[Te];if(k)var dt=ve?k(Ke,Qe,Te,R,p,re):k(Qe,Ke,Te,p,R,re);if(dt!==void 0){if(dt)continue;ut=!1;break}if(qe){if(!U(R,function(Yt,Tt){if(!qe.has(Tt)&&(Qe===Yt||P(Qe,Yt,k,J,re)))return qe.add(Tt)})){ut=!1;break}}else if(Qe!==Ke&&!P(Qe,Ke,k,J,re)){ut=!1;break}}return re.delete(p),re.delete(R),ut}function zt(p,R){var P,k,J=p.__data__;return((k=typeof(P=R))=="string"||k=="number"||k=="symbol"||k=="boolean"?P!=="__proto__":P===null)?J[typeof R=="string"?"string":"hash"]:J.map}function Ct(p,R){var P=function(k,J){return k==null?void 0:k[J]}(p,R);return Gt(P)?P:void 0}var pt=function(p){return b.call(p)};function on(p,R){return!!(R=R??9007199254740991)&&(typeof p=="number"||C.test(p))&&p>-1&&p%1==0&&p<R}function kt(p,R){if(g(p))return!1;var P=typeof p;return!(P!="number"&&P!="symbol"&&P!="boolean"&&p!=null&&!Ie(p))||c.test(p)||!u.test(p)||R!=null&&p in Object(R)}function En(p){return p==p&&!Se(p)}function wn(p,R){return function(P){return P!=null&&P[p]===R&&(R!==void 0||p in Object(P))}}(X&&pt(new X(new ArrayBuffer(1)))!="[object DataView]"||De&&pt(new De)!=i||Re&&pt(Re.resolve())!="[object Promise]"||G&&pt(new G)!=s||V&&pt(new V)!="[object WeakMap]")&&(pt=function(p){var R=b.call(p),P=R==l?p.constructor:void 0,k=P?yt(P):void 0;if(k)switch(k){case ge:return"[object DataView]";case oe:return i;case me:return"[object Promise]";case he:return s;case Ge:return"[object WeakMap]"}return R});var Rn=sn(function(p){var R;p=(R=p)==null?"":function(k){if(typeof k=="string")return k;if(Ie(k))return Ce?Ce.call(k):"";var J=k+"";return J=="0"&&1/k==-1/0?"-0":J}(R);var P=[];return d.test(p)&&P.push(""),p.replace(h,function(k,J,re,ve){P.push(re?ve.replace(x,"$1"):J||k)}),P});function Lt(p){if(typeof p=="string"||Ie(p))return p;var R=p+"";return R=="0"&&1/p==-1/0?"-0":R}function yt(p){if(p!=null){try{return ae.call(p)}catch{}try{return p+""}catch{}}return""}function sn(p,R){if(typeof p!="function"||R&&typeof R!="function")throw new TypeError("Expected a function");var P=function(){var k=arguments,J=R?R.apply(this,k):k[0],re=P.cache;if(re.has(J))return re.get(J);var ve=p.apply(this,k);return P.cache=re.set(J,ve),ve};return P.cache=new(sn.Cache||ke),P}function Gn(p,R){return p===R||p!=p&&R!=R}function Nn(p){return function(R){return Ne(R)&&D(R)}(p)&&_.call(p,"callee")&&(!Ae.call(p,"callee")||b.call(p)==o)}sn.Cache=ke;var g=Array.isArray;function D(p){return p!=null&&pe(p.length)&&!Y(p)}function Y(p){var R=Se(p)?b.call(p):"";return R=="[object Function]"||R=="[object GeneratorFunction]"}function pe(p){return typeof p=="number"&&p>-1&&p%1==0&&p<=9007199254740991}function Se(p){var R=typeof p;return!!p&&(R=="object"||R=="function")}function Ne(p){return!!p&&typeof p=="object"}function Ie(p){return typeof p=="symbol"||Ne(p)&&b.call(p)=="[object Symbol]"}var xe=B?function(p){return function(R){return p(R)}}(B):function(p){return Ne(p)&&pe(p.length)&&!!f[b.call(p)]};function Ue(p){return D(p)?at(p):rn(p)}function He(p){return p}n.exports=function(p,R,P){var k=g(p)?Q:ce,J=arguments.length<3;return k(p,Nt(R),P,J,ze)}}).call(this,r(3),r(7)(e))},function(e,t){e.exports=function(r){return r.webpackPolyfill||(r.deprecate=function(){},r.paths=[],r.children||(r.children=[]),Object.defineProperty(r,"loaded",{enumerable:!0,get:function(){return r.l}}),Object.defineProperty(r,"id",{enumerable:!0,get:function(){return r.i}}),r.webpackPolyfill=1),r}},function(e,t){String.prototype.padEnd||(String.prototype.padEnd=function(r,a){return r>>=0,a=String(a!==void 0?a:" "),this.length>r?String(this):((r-=this.length)>a.length&&(a+=a.repeat(r/a.length)),String(this)+a.slice(0,r))})},function(e,t,r){function a(Z,O,L){return O in Z?Object.defineProperty(Z,O,{value:L,enumerable:!0,configurable:!0,writable:!0}):Z[O]=L,Z}function n(Z){if(Symbol.iterator in Object(Z)||Object.prototype.toString.call(Z)==="[object Arguments]")return Array.from(Z)}function o(Z){return function(O){if(Array.isArray(O)){for(var L=0,ae=new Array(O.length);L<O.length;L++)ae[L]=O[L];return ae}}(Z)||n(Z)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(Z){if(Array.isArray(Z))return Z}function l(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function s(Z,O){if(!(Z instanceof O))throw new TypeError("Cannot call a class as a function")}function u(Z,O){for(var L=0;L<O.length;L++){var ae=O[L];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(Z,ae.key,ae)}}function c(Z){return(c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(O){return typeof O}:function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O})(Z)}function d(Z){return(d=typeof Symbol=="function"&&c(Symbol.iterator)==="symbol"?function(O){return c(O)}:function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":c(O)})(Z)}function h(Z){if(Z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Z}function x(Z){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(O){return O.__proto__||Object.getPrototypeOf(O)})(Z)}function y(Z,O){return(y=Object.setPrototypeOf||function(L,ae){return L.__proto__=ae,L})(Z,O)}r.r(t);var C=r(0),f=r.n(C),v=r(5),S=r.n(v),w=r(4),E=r.n(w),A=r(6),M=r.n(A),T=r(2),B=r.n(T),Q=r(1),U=r.n(Q);r(8);function ce(Z,O){return i(Z)||function(L,ae){var _=[],b=!0,fe=!1,de=void 0;try{for(var le,Ae=L[Symbol.iterator]();!(b=(le=Ae.next()).done)&&(_.push(le.value),!ae||_.length!==ae);b=!0);}catch(we){fe=!0,de=we}finally{try{b||Ae.return==null||Ae.return()}finally{if(fe)throw de}}return _}(Z,O)||l()}var H=[["Afghanistan",["asia"],"af","93"],["Albania",["europe"],"al","355"],["Algeria",["africa","north-africa"],"dz","213"],["Andorra",["europe"],"ad","376"],["Angola",["africa"],"ao","244"],["Antigua and Barbuda",["america","carribean"],"ag","1268"],["Argentina",["america","south-america"],"ar","54","(..) ........",0,["11","221","223","261","264","2652","280","2905","291","2920","2966","299","341","342","343","351","376","379","381","3833","385","387","388"]],["Armenia",["asia","ex-ussr"],"am","374",".. ......"],["Aruba",["america","carribean"],"aw","297"],["Australia",["oceania"],"au","61","(..) .... ....",0,["2","3","4","7","8","02","03","04","07","08"]],["Austria",["europe","eu-union"],"at","43"],["Azerbaijan",["asia","ex-ussr"],"az","994","(..) ... .. .."],["Bahamas",["america","carribean"],"bs","1242"],["Bahrain",["middle-east"],"bh","973"],["Bangladesh",["asia"],"bd","880"],["Barbados",["america","carribean"],"bb","1246"],["Belarus",["europe","ex-ussr"],"by","375","(..) ... .. .."],["Belgium",["europe","eu-union"],"be","32","... .. .. .."],["Belize",["america","central-america"],"bz","501"],["Benin",["africa"],"bj","229"],["Bhutan",["asia"],"bt","975"],["Bolivia",["america","south-america"],"bo","591"],["Bosnia and Herzegovina",["europe","ex-yugos"],"ba","387"],["Botswana",["africa"],"bw","267"],["Brazil",["america","south-america"],"br","55","(..) ........."],["British Indian Ocean Territory",["asia"],"io","246"],["Brunei",["asia"],"bn","673"],["Bulgaria",["europe","eu-union"],"bg","359"],["Burkina Faso",["africa"],"bf","226"],["Burundi",["africa"],"bi","257"],["Cambodia",["asia"],"kh","855"],["Cameroon",["africa"],"cm","237"],["Canada",["america","north-america"],"ca","1","(...) ...-....",1,["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde",["africa"],"cv","238"],["Caribbean Netherlands",["america","carribean"],"bq","599","",1],["Central African Republic",["africa"],"cf","236"],["Chad",["africa"],"td","235"],["Chile",["america","south-america"],"cl","56"],["China",["asia"],"cn","86","..-........."],["Colombia",["america","south-america"],"co","57","... ... ...."],["Comoros",["africa"],"km","269"],["Congo",["africa"],"cd","243"],["Congo",["africa"],"cg","242"],["Costa Rica",["america","central-america"],"cr","506","....-...."],["Côte d’Ivoire",["africa"],"ci","225",".. .. .. .."],["Croatia",["europe","eu-union","ex-yugos"],"hr","385"],["Cuba",["america","carribean"],"cu","53"],["Curaçao",["america","carribean"],"cw","599","",0],["Cyprus",["europe","eu-union"],"cy","357",".. ......"],["Czech Republic",["europe","eu-union"],"cz","420","... ... ..."],["Denmark",["europe","eu-union","baltic"],"dk","45",".. .. .. .."],["Djibouti",["africa"],"dj","253"],["Dominica",["america","carribean"],"dm","1767"],["Dominican Republic",["america","carribean"],"do","1","",2,["809","829","849"]],["Ecuador",["america","south-america"],"ec","593"],["Egypt",["africa","north-africa"],"eg","20"],["El Salvador",["america","central-america"],"sv","503","....-...."],["Equatorial Guinea",["africa"],"gq","240"],["Eritrea",["africa"],"er","291"],["Estonia",["europe","eu-union","ex-ussr","baltic"],"ee","372",".... ......"],["Ethiopia",["africa"],"et","251"],["Fiji",["oceania"],"fj","679"],["Finland",["europe","eu-union","baltic"],"fi","358",".. ... .. .."],["France",["europe","eu-union"],"fr","33",". .. .. .. .."],["French Guiana",["america","south-america"],"gf","594"],["French Polynesia",["oceania"],"pf","689"],["Gabon",["africa"],"ga","241"],["Gambia",["africa"],"gm","220"],["Georgia",["asia","ex-ussr"],"ge","995"],["Germany",["europe","eu-union","baltic"],"de","49",".... ........"],["Ghana",["africa"],"gh","233"],["Greece",["europe","eu-union"],"gr","30"],["Grenada",["america","carribean"],"gd","1473"],["Guadeloupe",["america","carribean"],"gp","590","",0],["Guam",["oceania"],"gu","1671"],["Guatemala",["america","central-america"],"gt","502","....-...."],["Guinea",["africa"],"gn","224"],["Guinea-Bissau",["africa"],"gw","245"],["Guyana",["america","south-america"],"gy","592"],["Haiti",["america","carribean"],"ht","509","....-...."],["Honduras",["america","central-america"],"hn","504"],["Hong Kong",["asia"],"hk","852",".... ...."],["Hungary",["europe","eu-union"],"hu","36"],["Iceland",["europe"],"is","354","... ...."],["India",["asia"],"in","91",".....-....."],["Indonesia",["asia"],"id","62"],["Iran",["middle-east"],"ir","98","... ... ...."],["Iraq",["middle-east"],"iq","964"],["Ireland",["europe","eu-union"],"ie","353",".. ......."],["Israel",["middle-east"],"il","972","... ... ...."],["Italy",["europe","eu-union"],"it","39","... .......",0],["Jamaica",["america","carribean"],"jm","1876"],["Japan",["asia"],"jp","81",".. .... ...."],["Jordan",["middle-east"],"jo","962"],["Kazakhstan",["asia","ex-ussr"],"kz","7","... ...-..-..",1,["310","311","312","313","315","318","321","324","325","326","327","336","7172","73622"]],["Kenya",["africa"],"ke","254"],["Kiribati",["oceania"],"ki","686"],["Kosovo",["europe","ex-yugos"],"xk","383"],["Kuwait",["middle-east"],"kw","965"],["Kyrgyzstan",["asia","ex-ussr"],"kg","996","... ... ..."],["Laos",["asia"],"la","856"],["Latvia",["europe","eu-union","ex-ussr","baltic"],"lv","371",".. ... ..."],["Lebanon",["middle-east"],"lb","961"],["Lesotho",["africa"],"ls","266"],["Liberia",["africa"],"lr","231"],["Libya",["africa","north-africa"],"ly","218"],["Liechtenstein",["europe"],"li","423"],["Lithuania",["europe","eu-union","ex-ussr","baltic"],"lt","370"],["Luxembourg",["europe","eu-union"],"lu","352"],["Macau",["asia"],"mo","853"],["Macedonia",["europe","ex-yugos"],"mk","389"],["Madagascar",["africa"],"mg","261"],["Malawi",["africa"],"mw","265"],["Malaysia",["asia"],"my","60","..-....-...."],["Maldives",["asia"],"mv","960"],["Mali",["africa"],"ml","223"],["Malta",["europe","eu-union"],"mt","356"],["Marshall Islands",["oceania"],"mh","692"],["Martinique",["america","carribean"],"mq","596"],["Mauritania",["africa"],"mr","222"],["Mauritius",["africa"],"mu","230"],["Mexico",["america","central-america"],"mx","52","... ... ....",0,["55","81","33","656","664","998","774","229"]],["Micronesia",["oceania"],"fm","691"],["Moldova",["europe"],"md","373","(..) ..-..-.."],["Monaco",["europe"],"mc","377"],["Mongolia",["asia"],"mn","976"],["Montenegro",["europe","ex-yugos"],"me","382"],["Morocco",["africa","north-africa"],"ma","212"],["Mozambique",["africa"],"mz","258"],["Myanmar",["asia"],"mm","95"],["Namibia",["africa"],"na","264"],["Nauru",["africa"],"nr","674"],["Nepal",["asia"],"np","977"],["Netherlands",["europe","eu-union"],"nl","31",".. ........"],["New Caledonia",["oceania"],"nc","687"],["New Zealand",["oceania"],"nz","64","...-...-...."],["Nicaragua",["america","central-america"],"ni","505"],["Niger",["africa"],"ne","227"],["Nigeria",["africa"],"ng","234"],["North Korea",["asia"],"kp","850"],["Norway",["europe","baltic"],"no","47","... .. ..."],["Oman",["middle-east"],"om","968"],["Pakistan",["asia"],"pk","92","...-......."],["Palau",["oceania"],"pw","680"],["Palestine",["middle-east"],"ps","970"],["Panama",["america","central-america"],"pa","507"],["Papua New Guinea",["oceania"],"pg","675"],["Paraguay",["america","south-america"],"py","595"],["Peru",["america","south-america"],"pe","51"],["Philippines",["asia"],"ph","63",".... ......."],["Poland",["europe","eu-union","baltic"],"pl","48","...-...-..."],["Portugal",["europe","eu-union"],"pt","351"],["Puerto Rico",["america","carribean"],"pr","1","",3,["787","939"]],["Qatar",["middle-east"],"qa","974"],["Réunion",["africa"],"re","262"],["Romania",["europe","eu-union"],"ro","40"],["Russia",["europe","asia","ex-ussr","baltic"],"ru","7","(...) ...-..-..",0],["Rwanda",["africa"],"rw","250"],["Saint Kitts and Nevis",["america","carribean"],"kn","1869"],["Saint Lucia",["america","carribean"],"lc","1758"],["Saint Vincent and the Grenadines",["america","carribean"],"vc","1784"],["Samoa",["oceania"],"ws","685"],["San Marino",["europe"],"sm","378"],["São Tomé and Príncipe",["africa"],"st","239"],["Saudi Arabia",["middle-east"],"sa","966"],["Senegal",["africa"],"sn","221"],["Serbia",["europe","ex-yugos"],"rs","381"],["Seychelles",["africa"],"sc","248"],["Sierra Leone",["africa"],"sl","232"],["Singapore",["asia"],"sg","65","....-...."],["Slovakia",["europe","eu-union"],"sk","421"],["Slovenia",["europe","eu-union","ex-yugos"],"si","386"],["Solomon Islands",["oceania"],"sb","677"],["Somalia",["africa"],"so","252"],["South Africa",["africa"],"za","27"],["South Korea",["asia"],"kr","82","... .... ...."],["South Sudan",["africa","north-africa"],"ss","211"],["Spain",["europe","eu-union"],"es","34","... ... ..."],["Sri Lanka",["asia"],"lk","94"],["Sudan",["africa"],"sd","249"],["Suriname",["america","south-america"],"sr","597"],["Swaziland",["africa"],"sz","268"],["Sweden",["europe","eu-union","baltic"],"se","46","(...) ...-..."],["Switzerland",["europe"],"ch","41",".. ... .. .."],["Syria",["middle-east"],"sy","963"],["Taiwan",["asia"],"tw","886"],["Tajikistan",["asia","ex-ussr"],"tj","992"],["Tanzania",["africa"],"tz","255"],["Thailand",["asia"],"th","66"],["Timor-Leste",["asia"],"tl","670"],["Togo",["africa"],"tg","228"],["Tonga",["oceania"],"to","676"],["Trinidad and Tobago",["america","carribean"],"tt","1868"],["Tunisia",["africa","north-africa"],"tn","216"],["Turkey",["europe"],"tr","90","... ... .. .."],["Turkmenistan",["asia","ex-ussr"],"tm","993"],["Tuvalu",["asia"],"tv","688"],["Uganda",["africa"],"ug","256"],["Ukraine",["europe","ex-ussr"],"ua","380","(..) ... .. .."],["United Arab Emirates",["middle-east"],"ae","971"],["United Kingdom",["europe","eu-union"],"gb","44",".... ......"],["United States",["america","north-america"],"us","1","(...) ...-....",0,["907","205","251","256","334","479","501","870","480","520","602","623","928","209","213","310","323","408","415","510","530","559","562","619","626","650","661","707","714","760","805","818","831","858","909","916","925","949","951","303","719","970","203","860","202","302","239","305","321","352","386","407","561","727","772","813","850","863","904","941","954","229","404","478","706","770","912","808","319","515","563","641","712","208","217","309","312","618","630","708","773","815","847","219","260","317","574","765","812","316","620","785","913","270","502","606","859","225","318","337","504","985","413","508","617","781","978","301","410","207","231","248","269","313","517","586","616","734","810","906","989","218","320","507","612","651","763","952","314","417","573","636","660","816","228","601","662","406","252","336","704","828","910","919","701","308","402","603","201","609","732","856","908","973","505","575","702","775","212","315","516","518","585","607","631","716","718","845","914","216","330","419","440","513","614","740","937","405","580","918","503","541","215","412","570","610","717","724","814","401","803","843","864","605","423","615","731","865","901","931","210","214","254","281","325","361","409","432","512","713","806","817","830","903","915","936","940","956","972","979","435","801","276","434","540","703","757","804","802","206","253","360","425","509","262","414","608","715","920","304","307"]],["Uruguay",["america","south-america"],"uy","598"],["Uzbekistan",["asia","ex-ussr"],"uz","998",".. ... .. .."],["Vanuatu",["oceania"],"vu","678"],["Vatican City",["europe"],"va","39",".. .... ....",1],["Venezuela",["america","south-america"],"ve","58"],["Vietnam",["asia"],"vn","84"],["Yemen",["middle-east"],"ye","967"],["Zambia",["africa"],"zm","260"],["Zimbabwe",["africa"],"zw","263"]],z=[["American Samoa",["oceania"],"as","1684"],["Anguilla",["america","carribean"],"ai","1264"],["Bermuda",["america","north-america"],"bm","1441"],["British Virgin Islands",["america","carribean"],"vg","1284"],["Cayman Islands",["america","carribean"],"ky","1345"],["Cook Islands",["oceania"],"ck","682"],["Falkland Islands",["america","south-america"],"fk","500"],["Faroe Islands",["europe"],"fo","298"],["Gibraltar",["europe"],"gi","350"],["Greenland",["america"],"gl","299"],["Jersey",["europe","eu-union"],"je","44",".... ......"],["Montserrat",["america","carribean"],"ms","1664"],["Niue",["asia"],"nu","683"],["Norfolk Island",["oceania"],"nf","672"],["Northern Mariana Islands",["oceania"],"mp","1670"],["Saint Barthélemy",["america","carribean"],"bl","590","",1],["Saint Helena",["africa"],"sh","290"],["Saint Martin",["america","carribean"],"mf","590","",2],["Saint Pierre and Miquelon",["america","north-america"],"pm","508"],["Sint Maarten",["america","carribean"],"sx","1721"],["Tokelau",["oceania"],"tk","690"],["Turks and Caicos Islands",["america","carribean"],"tc","1649"],["U.S. Virgin Islands",["america","carribean"],"vi","1340"],["Wallis and Futuna",["oceania"],"wf","681"]];function N(Z,O,L,ae,_){return!L||_?Z+"".padEnd(O.length,".")+" "+ae:Z+"".padEnd(O.length,".")+" "+L}function j(Z,O,L,ae,_){var b,fe,de=[];return fe=O===!0,[(b=[]).concat.apply(b,o(Z.map(function(le){var Ae={name:le[0],regions:le[1],iso2:le[2],countryCode:le[3],dialCode:le[3],format:N(L,le[3],le[4],ae,_),priority:le[5]||0},we=[];return le[6]&&le[6].map(function(Pe){var X=function(De){for(var Re=1;Re<arguments.length;Re++){var G=arguments[Re]!=null?arguments[Re]:{},V=Object.keys(G);typeof Object.getOwnPropertySymbols=="function"&&(V=V.concat(Object.getOwnPropertySymbols(G).filter(function(K){return Object.getOwnPropertyDescriptor(G,K).enumerable}))),V.forEach(function(K){a(De,K,G[K])})}return De}({},Ae);X.dialCode=le[3]+Pe,X.isAreaCode=!0,X.areaCodeLength=Pe.length,we.push(X)}),we.length>0?(Ae.mainCode=!0,fe||O.constructor.name==="Array"&&O.includes(le[2])?(Ae.hasAreaCodes=!0,[Ae].concat(we)):(de=de.concat(we),[Ae])):[Ae]}))),de]}function W(Z,O,L,ae){if(L!==null){var _=Object.keys(L),b=Object.values(L);_.forEach(function(fe,de){if(ae)return Z.push([fe,b[de]]);var le=Z.findIndex(function(we){return we[0]===fe});if(le===-1){var Ae=[fe];Ae[O]=b[de],Z.push(Ae)}else Z[le][O]=b[de]})}}function $(Z,O){return O.length===0?Z:Z.map(function(L){var ae=O.findIndex(function(b){return b[0]===L[2]});if(ae===-1)return L;var _=O[ae];return _[1]&&(L[4]=_[1]),_[3]&&(L[5]=_[3]),_[2]&&(L[6]=_[2]),L})}var te=function Z(O,L,ae,_,b,fe,de,le,Ae,we,Pe,X,De,Re){s(this,Z),this.filterRegions=function(q,ie){if(typeof q=="string"){var Ce=q;return ie.filter(function(ee){return ee.regions.some(function(ne){return ne===Ce})})}return ie.filter(function(ee){return q.map(function(ne){return ee.regions.some(function(ke){return ke===ne})}).some(function(ne){return ne})})},this.sortTerritories=function(q,ie){var Ce=[].concat(o(q),o(ie));return Ce.sort(function(ee,ne){return ee.name<ne.name?-1:ee.name>ne.name?1:0}),Ce},this.getFilteredCountryList=function(q,ie,Ce){return q.length===0?ie:Ce?q.map(function(ee){var ne=ie.find(function(ke){return ke.iso2===ee});if(ne)return ne}).filter(function(ee){return ee}):ie.filter(function(ee){return q.some(function(ne){return ne===ee.iso2})})},this.localizeCountries=function(q,ie,Ce){for(var ee=0;ee<q.length;ee++)ie[q[ee].iso2]!==void 0?q[ee].localName=ie[q[ee].iso2]:ie[q[ee].name]!==void 0&&(q[ee].localName=ie[q[ee].name]);return Ce||q.sort(function(ne,ke){return ne.localName<ke.localName?-1:ne.localName>ke.localName?1:0}),q},this.getCustomAreas=function(q,ie){for(var Ce=[],ee=0;ee<ie.length;ee++){var ne=JSON.parse(JSON.stringify(q));ne.dialCode+=ie[ee],Ce.push(ne)}return Ce},this.excludeCountries=function(q,ie){return ie.length===0?q:q.filter(function(Ce){return!ie.includes(Ce.iso2)})};var G=function(q,ie,Ce){var ee=[];return W(ee,1,q,!0),W(ee,3,ie),W(ee,2,Ce),ee}(le,Ae,we),V=$(JSON.parse(JSON.stringify(H)),G),K=$(JSON.parse(JSON.stringify(z)),G),ge=ce(j(V,O,X,De,Re),2),oe=ge[0],me=ge[1];if(L){var he=ce(j(K,O,X,De,Re),2),Ge=he[0];he[1],oe=this.sortTerritories(Ge,oe)}ae&&(oe=this.filterRegions(ae,oe)),this.onlyCountries=this.localizeCountries(this.excludeCountries(this.getFilteredCountryList(_,oe,de.includes("onlyCountries")),fe),Pe,de.includes("onlyCountries")),this.preferredCountries=b.length===0?[]:this.localizeCountries(this.getFilteredCountryList(b,oe,de.includes("preferredCountries")),Pe,de.includes("preferredCountries")),this.hiddenAreaCodes=this.excludeCountries(this.getFilteredCountryList(_,me),fe)},Ee=function(Z){function O(_){var b;s(this,O),(b=function(G,V){return!V||d(V)!=="object"&&typeof V!="function"?h(G):V}(this,x(O).call(this,_))).getProbableCandidate=E()(function(G){return G&&G.length!==0?b.state.onlyCountries.filter(function(V){return B()(V.name.toLowerCase(),G.toLowerCase())},h(h(b)))[0]:null}),b.guessSelectedCountry=E()(function(G,V,K,ge){var oe;if(b.props.enableAreaCodes===!1&&(ge.some(function(Ge){if(B()(G,Ge.dialCode))return K.some(function(q){if(Ge.iso2===q.iso2&&q.mainCode)return oe=q,!0}),!0}),oe))return oe;var me=K.find(function(Ge){return Ge.iso2==V});if(G.trim()==="")return me;var he=K.reduce(function(Ge,q){return B()(G,q.dialCode)&&(q.dialCode.length>Ge.dialCode.length||q.dialCode.length===Ge.dialCode.length&&q.priority<Ge.priority)?q:Ge},{dialCode:"",priority:10001},h(h(b)));return he.name?he:me}),b.updateCountry=function(G){var V,K=b.state.onlyCountries;(V=G.indexOf(0)>="0"&&G.indexOf(0)<="9"?K.find(function(ge){return ge.dialCode==+G}):K.find(function(ge){return ge.iso2==G}))&&V.dialCode&&b.setState({selectedCountry:V,formattedNumber:b.props.disableCountryCode?"":b.formatNumber(V.dialCode,V)})},b.scrollTo=function(G,V){if(G){var K=b.dropdownRef;if(K&&document.body){var ge=K.offsetHeight,oe=K.getBoundingClientRect().top+document.body.scrollTop,me=oe+ge,he=G,Ge=he.getBoundingClientRect(),q=he.offsetHeight,ie=Ge.top+document.body.scrollTop,Ce=ie+q,ee=ie-oe+K.scrollTop,ne=ge/2-q/2;if(b.props.enableSearch?ie<oe+32:ie<oe)V&&(ee-=ne),K.scrollTop=ee;else if(Ce>me){V&&(ee+=ne);var ke=ge-q;K.scrollTop=ee-ke}}}},b.scrollToTop=function(){var G=b.dropdownRef;G&&document.body&&(G.scrollTop=0)},b.formatNumber=function(G,V){if(!V)return G;var K,ge=V.format,oe=b.props,me=oe.disableCountryCode,he=oe.enableAreaCodeStretch,Ge=oe.enableLongNumbers,q=oe.autoFormat;if(me?((K=ge.split(" ")).shift(),K=K.join(" ")):he&&V.isAreaCode?((K=ge.split(" "))[1]=K[1].replace(/\.+/,"".padEnd(V.areaCodeLength,".")),K=K.join(" ")):K=ge,!G||G.length===0)return me?"":b.props.prefix;if(G&&G.length<2||!K||!q)return me?G:b.props.prefix+G;var ie,Ce=M()(K,function(ee,ne){if(ee.remainingText.length===0)return ee;if(ne!==".")return{formattedText:ee.formattedText+ne,remainingText:ee.remainingText};var ke,tt=i(ke=ee.remainingText)||n(ke)||l(),Je=tt[0],at=tt.slice(1);return{formattedText:ee.formattedText+Je,remainingText:at}},{formattedText:"",remainingText:G.split("")});return(ie=Ge?Ce.formattedText+Ce.remainingText.join(""):Ce.formattedText).includes("(")&&!ie.includes(")")&&(ie+=")"),ie},b.cursorToEnd=function(){var G=b.numberInputRef;if(document.activeElement===G){G.focus();var V=G.value.length;G.value.charAt(V-1)===")"&&(V-=1),G.setSelectionRange(V,V)}},b.getElement=function(G){return b["flag_no_".concat(G)]},b.getCountryData=function(){return b.state.selectedCountry?{name:b.state.selectedCountry.name||"",dialCode:b.state.selectedCountry.dialCode||"",countryCode:b.state.selectedCountry.iso2||"",format:b.state.selectedCountry.format||""}:{}},b.handleFlagDropdownClick=function(G){if(G.preventDefault(),b.state.showDropdown||!b.props.disabled){var V=b.state,K=V.preferredCountries,ge=V.onlyCountries,oe=V.selectedCountry,me=b.concatPreferredCountries(K,ge).findIndex(function(he){return he.dialCode===oe.dialCode&&he.iso2===oe.iso2});b.setState({showDropdown:!b.state.showDropdown,highlightCountryIndex:me},function(){b.state.showDropdown&&b.scrollTo(b.getElement(b.state.highlightCountryIndex))})}},b.handleInput=function(G){var V=G.target.value,K=b.props,ge=K.prefix,oe=K.onChange,me=b.props.disableCountryCode?"":ge,he=b.state.selectedCountry,Ge=b.state.freezeSelection;if(!b.props.countryCodeEditable){var q=ge+(he.hasAreaCodes?b.state.onlyCountries.find(function(ze){return ze.iso2===he.iso2&&ze.mainCode}).dialCode:he.dialCode);if(V.slice(0,q.length)!==q)return}if(V===ge)return oe&&oe("",b.getCountryData(),G,""),b.setState({formattedNumber:""});if(!(V.replace(/\D/g,"").length>15&&(b.props.enableLongNumbers===!1||typeof b.props.enableLongNumbers=="number"&&V.replace(/\D/g,"").length>b.props.enableLongNumbers))&&V!==b.state.formattedNumber){G.preventDefault?G.preventDefault():G.returnValue=!1;var ie=b.props.country,Ce=b.state,ee=Ce.onlyCountries,ne=Ce.selectedCountry,ke=Ce.hiddenAreaCodes;if(oe&&G.persist(),V.length>0){var tt=V.replace(/\D/g,"");(!b.state.freezeSelection||ne&&ne.dialCode.length>tt.length)&&(he=b.props.disableCountryGuess?ne:b.guessSelectedCountry(tt.substring(0,6),ie,ee,ke)||ne,Ge=!1),me=b.formatNumber(tt,he),he=he.dialCode?he:ne}var Je=G.target.selectionStart,at=G.target.selectionStart,lt=b.state.formattedNumber,vt=me.length-lt.length;b.setState({formattedNumber:me,freezeSelection:Ge,selectedCountry:he},function(){vt>0&&(at-=vt),me.charAt(me.length-1)==")"?b.numberInputRef.setSelectionRange(me.length-1,me.length-1):at>0&<.length>=me.length?b.numberInputRef.setSelectionRange(at,at):Je<lt.length&&b.numberInputRef.setSelectionRange(Je,Je),oe&&oe(me.replace(/[^0-9]+/g,""),b.getCountryData(),G,me)})}},b.handleInputClick=function(G){b.setState({showDropdown:!1}),b.props.onClick&&b.props.onClick(G,b.getCountryData())},b.handleDoubleClick=function(G){var V=G.target.value.length;G.target.setSelectionRange(0,V)},b.handleFlagItemClick=function(G,V){var K=b.state.selectedCountry,ge=b.state.onlyCountries.find(function(Ge){return Ge==G});if(ge){var oe=b.state.formattedNumber.replace(" ","").replace("(","").replace(")","").replace("-",""),me=oe.length>1?oe.replace(K.dialCode,ge.dialCode):ge.dialCode,he=b.formatNumber(me.replace(/\D/g,""),ge);b.setState({showDropdown:!1,selectedCountry:ge,freezeSelection:!0,formattedNumber:he,searchValue:""},function(){b.cursorToEnd(),b.props.onChange&&b.props.onChange(he.replace(/[^0-9]+/g,""),b.getCountryData(),V,he)})}},b.handleInputFocus=function(G){b.numberInputRef&&b.numberInputRef.value===b.props.prefix&&b.state.selectedCountry&&!b.props.disableCountryCode&&b.setState({formattedNumber:b.props.prefix+b.state.selectedCountry.dialCode},function(){b.props.jumpCursorToEnd&&setTimeout(b.cursorToEnd,0)}),b.setState({placeholder:""}),b.props.onFocus&&b.props.onFocus(G,b.getCountryData()),b.props.jumpCursorToEnd&&setTimeout(b.cursorToEnd,0)},b.handleInputBlur=function(G){G.target.value||b.setState({placeholder:b.props.placeholder}),b.props.onBlur&&b.props.onBlur(G,b.getCountryData())},b.handleInputCopy=function(G){if(b.props.copyNumbersOnly){var V=window.getSelection().toString().replace(/[^0-9]+/g,"");G.clipboardData.setData("text/plain",V),G.preventDefault()}},b.getHighlightCountryIndex=function(G){var V=b.state.highlightCountryIndex+G;return V<0||V>=b.state.onlyCountries.length+b.state.preferredCountries.length?V-G:b.props.enableSearch&&V>b.getSearchFilteredCountries().length?0:V},b.searchCountry=function(){var G=b.getProbableCandidate(b.state.queryString)||b.state.onlyCountries[0],V=b.state.onlyCountries.findIndex(function(K){return K==G})+b.state.preferredCountries.length;b.scrollTo(b.getElement(V),!0),b.setState({queryString:"",highlightCountryIndex:V})},b.handleKeydown=function(G){var V=b.props.keys,K=G.target.className;if(K.includes("selected-flag")&&G.which===V.ENTER&&!b.state.showDropdown)return b.handleFlagDropdownClick(G);if(K.includes("form-control")&&(G.which===V.ENTER||G.which===V.ESC))return G.target.blur();if(b.state.showDropdown&&!b.props.disabled&&(!K.includes("search-box")||G.which===V.UP||G.which===V.DOWN||G.which===V.ENTER||G.which===V.ESC&&G.target.value==="")){G.preventDefault?G.preventDefault():G.returnValue=!1;var ge=function(oe){b.setState({highlightCountryIndex:b.getHighlightCountryIndex(oe)},function(){b.scrollTo(b.getElement(b.state.highlightCountryIndex),!0)})};switch(G.which){case V.DOWN:ge(1);break;case V.UP:ge(-1);break;case V.ENTER:b.props.enableSearch?b.handleFlagItemClick(b.getSearchFilteredCountries()[b.state.highlightCountryIndex]||b.getSearchFilteredCountries()[0],G):b.handleFlagItemClick([].concat(o(b.state.preferredCountries),o(b.state.onlyCountries))[b.state.highlightCountryIndex],G);break;case V.ESC:case V.TAB:b.setState({showDropdown:!1},b.cursorToEnd);break;default:(G.which>=V.A&&G.which<=V.Z||G.which===V.SPACE)&&b.setState({queryString:b.state.queryString+String.fromCharCode(G.which)},b.state.debouncedQueryStingSearcher)}}},b.handleInputKeyDown=function(G){var V=b.props,K=V.keys,ge=V.onEnterKeyPress,oe=V.onKeyDown;G.which===K.ENTER&&ge&&ge(G),oe&&oe(G)},b.handleClickOutside=function(G){b.dropdownRef&&!b.dropdownContainerRef.contains(G.target)&&b.state.showDropdown&&b.setState({showDropdown:!1})},b.handleSearchChange=function(G){var V=G.currentTarget.value,K=b.state,ge=K.preferredCountries,oe=K.selectedCountry,me=0;if(V===""&&oe){var he=b.state.onlyCountries;me=b.concatPreferredCountries(ge,he).findIndex(function(Ge){return Ge==oe}),setTimeout(function(){return b.scrollTo(b.getElement(me))},100)}b.setState({searchValue:V,highlightCountryIndex:me})},b.concatPreferredCountries=function(G,V){return G.length>0?o(new Set(G.concat(V))):V},b.getDropdownCountryName=function(G){return G.localName||G.name},b.getSearchFilteredCountries=function(){var G=b.state,V=G.preferredCountries,K=G.onlyCountries,ge=G.searchValue,oe=b.props.enableSearch,me=b.concatPreferredCountries(V,K),he=ge.trim().toLowerCase().replace("+","");if(oe&&he){if(/^\d+$/.test(he))return me.filter(function(ie){var Ce=ie.dialCode;return["".concat(Ce)].some(function(ee){return ee.toLowerCase().includes(he)})});var Ge=me.filter(function(ie){var Ce=ie.iso2;return["".concat(Ce)].some(function(ee){return ee.toLowerCase().includes(he)})}),q=me.filter(function(ie){var Ce=ie.name,ee=ie.localName;return ie.iso2,["".concat(Ce),"".concat(ee||"")].some(function(ne){return ne.toLowerCase().includes(he)})});return b.scrollToTop(),o(new Set([].concat(Ge,q)))}return me},b.getCountryDropdownList=function(){var G=b.state,V=G.preferredCountries,K=G.highlightCountryIndex,ge=G.showDropdown,oe=G.searchValue,me=b.props,he=me.disableDropdown,Ge=me.prefix,q=b.props,ie=q.enableSearch,Ce=q.searchNotFound,ee=q.disableSearchIcon,ne=q.searchClass,ke=q.searchStyle,tt=q.searchPlaceholder,Je=q.autocompleteSearch,at=b.getSearchFilteredCountries().map(function(ze,Rt){var Wt=K===Rt,nn=U()({country:!0,preferred:ze.iso2==="us"||ze.iso2==="gb",active:ze.iso2==="us",highlight:Wt}),ht="flag ".concat(ze.iso2);return f.a.createElement("li",Object.assign({ref:function(Gt){return b["flag_no_".concat(Rt)]=Gt},key:"flag_no_".concat(Rt),"data-flag-key":"flag_no_".concat(Rt),className:nn,"data-dial-code":"1",tabIndex:he?"-1":"0","data-country-code":ze.iso2,onClick:function(Gt){return b.handleFlagItemClick(ze,Gt)},role:"option"},Wt?{"aria-selected":!0}:{}),f.a.createElement("div",{className:ht}),f.a.createElement("span",{className:"country-name"},b.getDropdownCountryName(ze)),f.a.createElement("span",{className:"dial-code"},ze.format?b.formatNumber(ze.dialCode,ze):Ge+ze.dialCode))}),lt=f.a.createElement("li",{key:"dashes",className:"divider"});V.length>0&&(!ie||ie&&!oe.trim())&&at.splice(V.length,0,lt);var vt=U()(a({"country-list":!0,hide:!ge},b.props.dropdownClass,!0));return f.a.createElement("ul",{ref:function(ze){return!ie&&ze&&ze.focus(),b.dropdownRef=ze},className:vt,style:b.props.dropdownStyle,role:"listbox",tabIndex:"0"},ie&&f.a.createElement("li",{className:U()(a({search:!0},ne,ne))},!ee&&f.a.createElement("span",{className:U()(a({"search-emoji":!0},"".concat(ne,"-emoji"),ne)),role:"img","aria-label":"Magnifying glass"},"🔎"),f.a.createElement("input",{className:U()(a({"search-box":!0},"".concat(ne,"-box"),ne)),style:ke,type:"search",placeholder:tt,autoFocus:!0,autoComplete:Je?"on":"off",value:oe,onChange:b.handleSearchChange})),at.length>0?at:f.a.createElement("li",{className:"no-entries-message"},f.a.createElement("span",null,Ce)))};var fe,de=new te(_.enableAreaCodes,_.enableTerritories,_.regions,_.onlyCountries,_.preferredCountries,_.excludeCountries,_.preserveOrder,_.masks,_.priority,_.areaCodes,_.localization,_.prefix,_.defaultMask,_.alwaysDefaultMask),le=de.onlyCountries,Ae=de.preferredCountries,we=de.hiddenAreaCodes,Pe=_.value?_.value.replace(/\D/g,""):"";fe=_.disableInitialCountryGuess?0:Pe.length>1?b.guessSelectedCountry(Pe.substring(0,6),_.country,le,we)||0:_.country&&le.find(function(G){return G.iso2==_.country})||0;var X,De=Pe.length<2&&fe&&!B()(Pe,fe.dialCode)?fe.dialCode:"";X=Pe===""&&fe===0?"":b.formatNumber((_.disableCountryCode?"":De)+Pe,fe.name?fe:void 0);var Re=le.findIndex(function(G){return G==fe});return b.state={showDropdown:_.showDropdown,formattedNumber:X,onlyCountries:le,preferredCountries:Ae,hiddenAreaCodes:we,selectedCountry:fe,highlightCountryIndex:Re,queryString:"",freezeSelection:!1,debouncedQueryStingSearcher:S()(b.searchCountry,250),searchValue:""},b}var L,ae;return function(_,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");_.prototype=Object.create(b&&b.prototype,{constructor:{value:_,writable:!0,configurable:!0}}),b&&y(_,b)}(O,Z),L=O,(ae=[{key:"componentDidMount",value:function(){document.addEventListener&&this.props.enableClickOutside&&document.addEventListener("mousedown",this.handleClickOutside),this.props.onMount&&this.props.onMount(this.state.formattedNumber.replace(/[^0-9]+/g,""),this.getCountryData(),this.state.formattedNumber)}},{key:"componentWillUnmount",value:function(){document.removeEventListener&&this.props.enableClickOutside&&document.removeEventListener("mousedown",this.handleClickOutside)}},{key:"componentDidUpdate",value:function(_,b,fe){_.country!==this.props.country?this.updateCountry(this.props.country):_.value!==this.props.value&&this.updateFormattedNumber(this.props.value)}},{key:"updateFormattedNumber",value:function(_){if(_===null)return this.setState({selectedCountry:0,formattedNumber:""});var b=this.state,fe=b.onlyCountries,de=b.selectedCountry,le=b.hiddenAreaCodes,Ae=this.props,we=Ae.country,Pe=Ae.prefix;if(_==="")return this.setState({selectedCountry:de,formattedNumber:""});var X,De,Re=_.replace(/\D/g,"");if(de&&B()(_,Pe+de.dialCode))De=this.formatNumber(Re,de),this.setState({formattedNumber:De});else{var G=(X=this.props.disableCountryGuess?de:this.guessSelectedCountry(Re.substring(0,6),we,fe,le)||de)&&B()(Re,Pe+X.dialCode)?X.dialCode:"";De=this.formatNumber((this.props.disableCountryCode?"":G)+Re,X||void 0),this.setState({selectedCountry:X,formattedNumber:De})}}},{key:"render",value:function(){var _,b,fe,de=this,le=this.state,Ae=le.onlyCountries,we=le.selectedCountry,Pe=le.showDropdown,X=le.formattedNumber,De=le.hiddenAreaCodes,Re=this.props,G=Re.disableDropdown,V=Re.renderStringAsFlag,K=Re.isValid,ge=Re.defaultErrorMessage,oe=Re.specialLabel;if(typeof K=="boolean")b=K;else{var me=K(X.replace(/\D/g,""),we,Ae,De);typeof me=="boolean"?(b=me)===!1&&(fe=ge):(b=!1,fe=me)}var he=U()((a(_={},this.props.containerClass,!0),a(_,"react-tel-input",!0),_)),Ge=U()({arrow:!0,up:Pe}),q=U()(a({"form-control":!0,"invalid-number":!b,open:Pe},this.props.inputClass,!0)),ie=U()({"selected-flag":!0,open:Pe}),Ce=U()(a({"flag-dropdown":!0,"invalid-number":!b,open:Pe},this.props.buttonClass,!0)),ee="flag ".concat(we&&we.iso2);return f.a.createElement("div",{className:"".concat(he," ").concat(this.props.className),style:this.props.style||this.props.containerStyle,onKeyDown:this.handleKeydown},oe&&f.a.createElement("div",{className:"special-label"},oe),fe&&f.a.createElement("div",{className:"invalid-number-message"},fe),f.a.createElement("input",Object.assign({className:q,style:this.props.inputStyle,onChange:this.handleInput,onClick:this.handleInputClick,onDoubleClick:this.handleDoubleClick,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,onCopy:this.handleInputCopy,value:X,onKeyDown:this.handleInputKeyDown,placeholder:this.props.placeholder,disabled:this.props.disabled,type:"tel"},this.props.inputProps,{ref:function(ne){de.numberInputRef=ne,typeof de.props.inputProps.ref=="function"?de.props.inputProps.ref(ne):typeof de.props.inputProps.ref=="object"&&(de.props.inputProps.ref.current=ne)}})),f.a.createElement("div",{className:Ce,style:this.props.buttonStyle,ref:function(ne){return de.dropdownContainerRef=ne}},V?f.a.createElement("div",{className:ie},V):f.a.createElement("div",{onClick:G?void 0:this.handleFlagDropdownClick,className:ie,title:we?"".concat(we.localName||we.name,": + ").concat(we.dialCode):"",tabIndex:G?"-1":"0",role:"button","aria-haspopup":"listbox","aria-expanded":!!Pe||void 0},f.a.createElement("div",{className:ee},!G&&f.a.createElement("div",{className:Ge}))),Pe&&this.getCountryDropdownList()))}}])&&u(L.prototype,ae),O}(f.a.Component);Ee.defaultProps={country:"",value:"",onlyCountries:[],preferredCountries:[],excludeCountries:[],placeholder:"1 (702) 123-4567",searchPlaceholder:"search",searchNotFound:"No entries to show",flagsImagePath:"./flags.png",disabled:!1,containerStyle:{},inputStyle:{},buttonStyle:{},dropdownStyle:{},searchStyle:{},containerClass:"",inputClass:"",buttonClass:"",dropdownClass:"",searchClass:"",className:"",autoFormat:!0,enableAreaCodes:!1,enableTerritories:!1,disableCountryCode:!1,disableDropdown:!1,enableLongNumbers:!1,countryCodeEditable:!0,enableSearch:!1,disableSearchIcon:!1,disableInitialCountryGuess:!1,disableCountryGuess:!1,regions:"",inputProps:{},localization:{},masks:null,priority:null,areaCodes:null,preserveOrder:[],defaultMask:"... ... ... ... ..",alwaysDefaultMask:!1,prefix:"+",copyNumbersOnly:!0,renderStringAsFlag:"",autocompleteSearch:!1,jumpCursorToEnd:!0,enableAreaCodeStretch:!1,enableClickOutside:!0,showDropdown:!1,isValid:!0,defaultErrorMessage:"",specialLabel:"Phone",onEnterKeyPress:null,keys:{UP:38,DOWN:40,RIGHT:39,LEFT:37,ENTER:13,ESC:27,PLUS:43,A:65,Z:90,SPACE:32,TAB:9}},t.default=Ee}]);const mb=Ws(gb),Os=({value:e,onChange:t,error:r,onBlur:a,id:n,name:o,required:i,defaultCountry:l="us",className:s,responsive:u=!1,enableSearch:c=!0,autoComplete:d})=>{const h=(x,y)=>{t("+"+x,y.countryCode)};return m.jsxs("div",{className:s,children:[m.jsx("div",{className:Me("movmo-phone-input flex items-center px-3.5 py-0 h-10 rounded-lg border",u&&"movmo-phone-input-responsive",r?"border-error-500 focus:ring-error-500":"border-grayWarm-300 focus-within:ring-2 focus-within:ring-grayWarm-950"),children:m.jsx(mb,{country:l,value:e.replace("+",""),onChange:h,inputProps:{onBlur:a,required:i,id:n,name:o,...d&&{autoComplete:d}},enableSearch:c,autoFormat:!0})}),r&&m.jsx("p",{className:"text-error-500 text-xs mt-1",children:r})]})},Fs=({email:e,phone:t,otpLength:r,otpAction:a,onVerify:n,onClose:o,externalError:i,title:l,description:s})=>{const[u,c]=F.useState("".padStart(r,"")),[d,h]=F.useState(null),x=(f,v)=>{if(!/^\d*$/.test(f))return;const S=u.split("");if(S[v]=f.slice(-1),c(S.join("")),d&&h(null),f&&v<r-1){const w=document.getElementById(`otp-input-${v+1}`);w&&w.focus()}},y=f=>{f.preventDefault();const S=f.clipboardData.getData("text/plain").replace(/\D/g,"");if(S.length>0){const w=u.split("");for(let T=0;T<Math.min(S.length,r);T++)w[T]=S[T];c(w.join("")),d&&h(null);const E=w.findIndex(T=>T===""),A=E!==-1?E:r-1,M=document.getElementById(`otp-input-${A}`);M&&M.focus()}},C=f=>{const v=u.split("");if(v[f]="",c(v.join("")),f>0){const S=document.getElementById(`otp-input-${f-1}`);S&&S.focus()}};return F.useEffect(()=>{u.length===r&&!u.includes(" ")&&u.trim().length===r&&n(u)},[u,r,n]),F.useEffect(()=>{const f=v=>{v.key==="Escape"&&o()};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[o]),m.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center z-[110] px-4",children:m.jsxs($r,{className:"w-full max-w-[400px] rounded-lg",children:[m.jsx(Qr,{className:"p-4 border-b border-grayWarm-200",children:m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx("button",{onClick:o,className:"w-8 h-8 flex items-center justify-center bg-grayWarm-100 hover:bg-grayWarm-200 rounded-lg transition-colors","aria-label":"Close modal",children:m.jsx("svg",{className:"w-4 h-4 text-grayWarm-600",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),m.jsx("h2",{className:"text-xl md:text-lg font-bold text-center flex-1",children:l||"Verify Account"}),m.jsx("div",{className:"w-8"})]})}),m.jsxs(Kr,{className:"p-4 text-center",children:[m.jsxs("div",{className:"text-center mb-3",children:[m.jsx("p",{className:"text-sm md:text-md text-grayWarm-600",children:s||`Enter the ${r}-digit code we sent to`}),!s&&m.jsx("p",{className:"text-sm md:text-md text-grayWarm-600 mt-1",children:a===rt.OTPAction.EMAILED?e:t})]}),m.jsx("div",{className:"flex justify-center gap-1.5 sm:gap-2 mb-6",children:Array.from({length:r}).map((f,v)=>m.jsx("input",{type:"text",maxLength:1,className:"w-full max-w-10 h-16 border border-grayWarm-300 shadow-xs rounded-md text-center text-lg focus:outline-none focus:ring-2 focus:ring-grayWarm-950",value:u[v]||"",onChange:S=>x(S.target.value,v),onPaste:y,id:`otp-input-${v}`,"data-testid":`otp-input-${v}`,onKeyDown:S=>{S.key==="Backspace"&&C(v)}},v))}),(d||i)&&m.jsx("p",{className:"text-error-500 text-center text-sm mb-4",children:i||d})]})]})})},Ms=e=>/^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$/.test(e),vb={us:{dialCode:"1",lengths:[10]},ca:{dialCode:"1",lengths:[10]},gb:{dialCode:"44",lengths:[10]},au:{dialCode:"61",lengths:[9]},de:{dialCode:"49",lengths:[10,11]},fr:{dialCode:"33",lengths:[9]},it:{dialCode:"39",lengths:[9,10]},es:{dialCode:"34",lengths:[9]},jp:{dialCode:"81",lengths:[10,11]},kr:{dialCode:"82",lengths:[10,11]},in:{dialCode:"91",lengths:[10]},br:{dialCode:"55",lengths:[10,11]},mx:{dialCode:"52",lengths:[10]},cn:{dialCode:"86",lengths:[11]}};function Yr(e,t){if(!e||!e.startsWith("+"))return!1;const r=e.slice(1);if(!/^\d+$/.test(r))return!1;if(t){const a=vb[t.toLowerCase()];if(a){if(!r.startsWith(a.dialCode))return!1;const n=r.slice(a.dialCode.length);return a.lengths.includes(n.length)}}return r.length>=7&&r.length<=15}const hb=({isOpen:e,onClose:t,loginUser:r,verifyOTP:a,getCurrentUser:n,onLoginSuccess:o})=>{const[i,l]=F.useState(""),[s,u]=F.useState(null),[c,d]=F.useState(""),[h,x]=F.useState(null),[y,C]=F.useState(!1),[f,v]=F.useState(null),[S,w]=F.useState(6),[E,A]=F.useState(null),[M,T]=F.useState(!1),[B,Q]=F.useState(""),[U,ce]=F.useState(rt.OTPAction.EMAILED),[H,z]=F.useState("us"),N=O=>{const L=O.target.value;l(L),s&&u(null)},j=(O,L)=>{d(O),z(L),h&&x(null)},W=()=>{c&&!Yr(c,H)&&x("Please enter a valid phone number")},$=async()=>{let O=!1;if((!i||!Ms(i))&&(u("Please enter a valid email address"),O=!0),Yr(c,H)||(x("Please enter a valid phone number"),O=!0),!O){T(!0);try{const L=await r(i,c,rt.AuthenticationUsernameType.EMAIL);v(L.session),Q(L.username||i),L.challengeName&&(w(8),A(L.challengeName),ce(L.challengeName===rt.AuthenticationChallengeName.SMS_OTP?rt.OTPAction.TEXTED:rt.OTPAction.EMAILED)),C(!0),t()}catch(L){console.error("Error sending OTP:",L),u("An error occurred. Please try again.")}finally{T(!1)}}},te=async O=>{if(f)try{await a(B,O,f,E);const L=await n();o(L),C(!1),l(""),Q(""),v(null),w(6),ce(rt.OTPAction.EMAILED),A(null)}catch(L){console.error("Error verifying OTP:",L)}},Ee=()=>{C(!1),l(""),Q(""),d(""),x(null),v(null),w(6),ce(rt.OTPAction.EMAILED),A(null)},Z=()=>{u(null),x(null),y||(l(""),d("")),t()};return m.jsxs(m.Fragment,{children:[m.jsx(pr,{isOpen:e,onClose:Z,title:"Sign in to Movmo",maxWidthPx:398,children:m.jsxs("form",{onSubmit:O=>{O.preventDefault(),$()},className:"space-y-4",children:[m.jsxs("div",{children:[m.jsx(At,{id:"sign-in-email",type:"email",placeholder:"Email",required:!0,value:i,onChange:N,className:`w-full ${s?"border-error-500 focus:ring-error-500":""} autofill:bg-white autofill:shadow-[inset_0_0_0px_1000px_white]`,autoFocus:!0}),s&&m.jsx("p",{className:"text-error-500 text-xs mt-1",children:s})]}),m.jsx(Os,{value:c,onChange:j,onBlur:W,error:h,required:!0,id:"sign-in-phone",name:"sign-in-phone"}),m.jsx("button",{type:"submit",disabled:M,className:"w-full py-3 px-4 bg-gradient-to-r from-[#E91E63] to-[#E91E63] hover:from-[#D81B60] hover:to-[#D81B60] text-white font-semibold rounded-lg transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:M?"Loading...":"Continue"})]})}),y&&m.jsx(Fs,{email:i,phone:c,otpLength:S,otpAction:U,onVerify:te,onClose:Ee})]})};exports.Avatar=_i;exports.AvatarFallback=Zi;exports.AvatarImage=Xi;exports.Badge=Oi;exports.Button=Ao;exports.COUNTRY_OPTIONS=zr;exports.CURRENCY_OPTIONS=gr;exports.Card=$r;exports.CardContent=Kr;exports.CardDescription=Po;exports.CardFooter=Oo;exports.CardHeader=Qr;exports.CardTitle=To;exports.Checkbox=Pi;exports.Chip=vs;exports.CurrencyModal=bb;exports.DEFAULT_LOCALE=Ts;exports.DateDropdowns=Hr;exports.IconButton=Fi;exports.Input=At;exports.LOCALE_OPTIONS=br;exports.LOCALE_STORAGE_KEY=sb;exports.LocaleModal=db;exports.Modal=pr;exports.OTPModal=Fs;exports.Pagination=gs;exports.PassengerForm=rb;exports.PassengerFormSkeleton=ib;exports.PhoneInput=Os;exports.SearchInput=ms;exports.SelectDropdown=Cn;exports.Separator=No;exports.SignInModal=hb;exports.Textarea=bs;exports.Toggle=$i;exports.ToggleGroup=fs;exports.ToggleGroupItem=ps;exports.findCurrencyOption=pb;exports.findLocaleOption=lb;exports.getCurrencyDisplayText=Ps;exports.getLanguageDisplayName=ub;exports.validateEmail=Ms;exports.validatePhoneNumber=Yr;
|
|
114
|
+
*/(function(){var n={}.hasOwnProperty;function o(){for(var i=[],l=0;l<arguments.length;l++){var s=arguments[l];if(s){var u=typeof s;if(u==="string"||u==="number")i.push(s);else if(Array.isArray(s)&&s.length){var c=o.apply(null,s);c&&i.push(c)}else if(u==="object")for(var d in s)n.call(s,d)&&s[d]&&i.push(d)}}return i.join(" ")}e.exports?(o.default=o,e.exports=o):(a=(function(){return o}).apply(t,[]))===void 0||(e.exports=a)})()},function(e,t,r){(function(a){var n=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,l=/^0o[0-7]+$/i,s=parseInt,u=typeof a=="object"&&a&&a.Object===Object&&a,c=typeof self=="object"&&self&&self.Object===Object&&self,d=u||c||Function("return this")(),h=Object.prototype.toString,x=d.Symbol,y=x?x.prototype:void 0,C=y?y.toString:void 0;function f(E){if(typeof E=="string")return E;if(S(E))return C?C.call(E):"";var A=E+"";return A=="0"&&1/E==-1/0?"-0":A}function v(E){var A=typeof E;return!!E&&(A=="object"||A=="function")}function S(E){return typeof E=="symbol"||function(A){return!!A&&typeof A=="object"}(E)&&h.call(E)=="[object Symbol]"}function w(E){return E?(E=function(A){if(typeof A=="number")return A;if(S(A))return NaN;if(v(A)){var M=typeof A.valueOf=="function"?A.valueOf():A;A=v(M)?M+"":M}if(typeof A!="string")return A===0?A:+A;A=A.replace(n,"");var T=i.test(A);return T||l.test(A)?s(A.slice(2),T?2:8):o.test(A)?NaN:+A}(E))===1/0||E===-1/0?17976931348623157e292*(E<0?-1:1):E==E?E:0:E===0?E:0}e.exports=function(E,A,M){var T,B,Q,U;return E=(T=E)==null?"":f(T),B=function(ce){var H=w(ce),z=H%1;return H==H?z?H-z:H:0}(M),Q=0,U=E.length,B==B&&(U!==void 0&&(B=B<=U?B:U),Q!==void 0&&(B=B>=Q?B:Q)),M=B,A=f(A),E.slice(M,M+A.length)==A}}).call(this,r(3))},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch{typeof window=="object"&&(r=window)}e.exports=r},function(e,t,r){(function(a){var n=/^\[object .+?Constructor\]$/,o=typeof a=="object"&&a&&a.Object===Object&&a,i=typeof self=="object"&&self&&self.Object===Object&&self,l=o||i||Function("return this")(),s,u=Array.prototype,c=Function.prototype,d=Object.prototype,h=l["__core-js_shared__"],x=(s=/[^.]+$/.exec(h&&h.keys&&h.keys.IE_PROTO||""))?"Symbol(src)_1."+s:"",y=c.toString,C=d.hasOwnProperty,f=d.toString,v=RegExp("^"+y.call(C).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=u.splice,w=ce(l,"Map"),E=ce(Object,"create");function A(N){var j=-1,W=N?N.length:0;for(this.clear();++j<W;){var $=N[j];this.set($[0],$[1])}}function M(N){var j=-1,W=N?N.length:0;for(this.clear();++j<W;){var $=N[j];this.set($[0],$[1])}}function T(N){var j=-1,W=N?N.length:0;for(this.clear();++j<W;){var $=N[j];this.set($[0],$[1])}}function B(N,j){for(var W,$,te=N.length;te--;)if((W=N[te][0])===($=j)||W!=W&&$!=$)return te;return-1}function Q(N){return!(!z(N)||(j=N,x&&x in j))&&(function(W){var $=z(W)?f.call(W):"";return $=="[object Function]"||$=="[object GeneratorFunction]"}(N)||function(W){var $=!1;if(W!=null&&typeof W.toString!="function")try{$=!!(W+"")}catch{}return $}(N)?v:n).test(function(W){if(W!=null){try{return y.call(W)}catch{}try{return W+""}catch{}}return""}(N));var j}function U(N,j){var W,$,te=N.__data__;return(($=typeof(W=j))=="string"||$=="number"||$=="symbol"||$=="boolean"?W!=="__proto__":W===null)?te[typeof j=="string"?"string":"hash"]:te.map}function ce(N,j){var W=function($,te){return $==null?void 0:$[te]}(N,j);return Q(W)?W:void 0}function H(N,j){if(typeof N!="function"||j&&typeof j!="function")throw new TypeError("Expected a function");var W=function(){var $=arguments,te=j?j.apply(this,$):$[0],Ee=W.cache;if(Ee.has(te))return Ee.get(te);var Z=N.apply(this,$);return W.cache=Ee.set(te,Z),Z};return W.cache=new(H.Cache||T),W}function z(N){var j=typeof N;return!!N&&(j=="object"||j=="function")}A.prototype.clear=function(){this.__data__=E?E(null):{}},A.prototype.delete=function(N){return this.has(N)&&delete this.__data__[N]},A.prototype.get=function(N){var j=this.__data__;if(E){var W=j[N];return W==="__lodash_hash_undefined__"?void 0:W}return C.call(j,N)?j[N]:void 0},A.prototype.has=function(N){var j=this.__data__;return E?j[N]!==void 0:C.call(j,N)},A.prototype.set=function(N,j){return this.__data__[N]=E&&j===void 0?"__lodash_hash_undefined__":j,this},M.prototype.clear=function(){this.__data__=[]},M.prototype.delete=function(N){var j=this.__data__,W=B(j,N);return!(W<0)&&(W==j.length-1?j.pop():S.call(j,W,1),!0)},M.prototype.get=function(N){var j=this.__data__,W=B(j,N);return W<0?void 0:j[W][1]},M.prototype.has=function(N){return B(this.__data__,N)>-1},M.prototype.set=function(N,j){var W=this.__data__,$=B(W,N);return $<0?W.push([N,j]):W[$][1]=j,this},T.prototype.clear=function(){this.__data__={hash:new A,map:new(w||M),string:new A}},T.prototype.delete=function(N){return U(this,N).delete(N)},T.prototype.get=function(N){return U(this,N).get(N)},T.prototype.has=function(N){return U(this,N).has(N)},T.prototype.set=function(N,j){return U(this,N).set(N,j),this},H.Cache=T,e.exports=H}).call(this,r(3))},function(e,t,r){(function(a){var n=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,l=/^0o[0-7]+$/i,s=parseInt,u=typeof a=="object"&&a&&a.Object===Object&&a,c=typeof self=="object"&&self&&self.Object===Object&&self,d=u||c||Function("return this")(),h=Object.prototype.toString,x=Math.max,y=Math.min,C=function(){return d.Date.now()};function f(S){var w=typeof S;return!!S&&(w=="object"||w=="function")}function v(S){if(typeof S=="number")return S;if(function(A){return typeof A=="symbol"||function(M){return!!M&&typeof M=="object"}(A)&&h.call(A)=="[object Symbol]"}(S))return NaN;if(f(S)){var w=typeof S.valueOf=="function"?S.valueOf():S;S=f(w)?w+"":w}if(typeof S!="string")return S===0?S:+S;S=S.replace(n,"");var E=i.test(S);return E||l.test(S)?s(S.slice(2),E?2:8):o.test(S)?NaN:+S}e.exports=function(S,w,E){var A,M,T,B,Q,U,ce=0,H=!1,z=!1,N=!0;if(typeof S!="function")throw new TypeError("Expected a function");function j(O){var L=A,ae=M;return A=M=void 0,ce=O,B=S.apply(ae,L)}function W(O){return ce=O,Q=setTimeout(te,w),H?j(O):B}function $(O){var L=O-U;return U===void 0||L>=w||L<0||z&&O-ce>=T}function te(){var O=C();if($(O))return Ee(O);Q=setTimeout(te,function(L){var ae=w-(L-U);return z?y(ae,T-(L-ce)):ae}(O))}function Ee(O){return Q=void 0,N&&A?j(O):(A=M=void 0,B)}function Z(){var O=C(),L=$(O);if(A=arguments,M=this,U=O,L){if(Q===void 0)return W(U);if(z)return Q=setTimeout(te,w),j(U)}return Q===void 0&&(Q=setTimeout(te,w)),B}return w=v(w)||0,f(E)&&(H=!!E.leading,T=(z="maxWait"in E)?x(v(E.maxWait)||0,w):T,N="trailing"in E?!!E.trailing:N),Z.cancel=function(){Q!==void 0&&clearTimeout(Q),ce=0,A=U=M=Q=void 0},Z.flush=function(){return Q===void 0?B:Ee(C())},Z}}).call(this,r(3))},function(e,t,r){(function(a,n){var o="[object Arguments]",i="[object Map]",l="[object Object]",s="[object Set]",u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/,d=/^\./,h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,x=/\\(\\)?/g,y=/^\[object .+?Constructor\]$/,C=/^(?:0|[1-9]\d*)$/,f={};f["[object Float32Array]"]=f["[object Float64Array]"]=f["[object Int8Array]"]=f["[object Int16Array]"]=f["[object Int32Array]"]=f["[object Uint8Array]"]=f["[object Uint8ClampedArray]"]=f["[object Uint16Array]"]=f["[object Uint32Array]"]=!0,f[o]=f["[object Array]"]=f["[object ArrayBuffer]"]=f["[object Boolean]"]=f["[object DataView]"]=f["[object Date]"]=f["[object Error]"]=f["[object Function]"]=f[i]=f["[object Number]"]=f[l]=f["[object RegExp]"]=f[s]=f["[object String]"]=f["[object WeakMap]"]=!1;var v=typeof a=="object"&&a&&a.Object===Object&&a,S=typeof self=="object"&&self&&self.Object===Object&&self,w=v||S||Function("return this")(),E=t&&!t.nodeType&&t,A=E&&typeof n=="object"&&n&&!n.nodeType&&n,M=A&&A.exports===E&&v.process,T=function(){try{return M&&M.binding("util")}catch{}}(),B=T&&T.isTypedArray;function Q(p,R,P,k){var J=-1,re=p?p.length:0;for(k&&re&&(P=p[++J]);++J<re;)P=R(P,p[J],J,p);return P}function U(p,R){for(var P=-1,k=p?p.length:0;++P<k;)if(R(p[P],P,p))return!0;return!1}function ce(p,R,P,k,J){return J(p,function(re,ve,Le){P=k?(k=!1,re):R(P,re,ve,Le)}),P}function H(p){var R=!1;if(p!=null&&typeof p.toString!="function")try{R=!!(p+"")}catch{}return R}function z(p){var R=-1,P=Array(p.size);return p.forEach(function(k,J){P[++R]=[J,k]}),P}function N(p){var R=-1,P=Array(p.size);return p.forEach(function(k){P[++R]=k}),P}var j,W,$,te=Array.prototype,Ee=Function.prototype,Z=Object.prototype,O=w["__core-js_shared__"],L=(j=/[^.]+$/.exec(O&&O.keys&&O.keys.IE_PROTO||""))?"Symbol(src)_1."+j:"",ae=Ee.toString,_=Z.hasOwnProperty,b=Z.toString,fe=RegExp("^"+ae.call(_).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),de=w.Symbol,le=w.Uint8Array,Ae=Z.propertyIsEnumerable,we=te.splice,Pe=(W=Object.keys,$=Object,function(p){return W($(p))}),X=Ct(w,"DataView"),De=Ct(w,"Map"),Re=Ct(w,"Promise"),G=Ct(w,"Set"),V=Ct(w,"WeakMap"),K=Ct(Object,"create"),ge=yt(X),oe=yt(De),me=yt(Re),he=yt(G),Ge=yt(V),q=de?de.prototype:void 0,ie=q?q.valueOf:void 0,Ce=q?q.toString:void 0;function ee(p){var R=-1,P=p?p.length:0;for(this.clear();++R<P;){var k=p[R];this.set(k[0],k[1])}}function ne(p){var R=-1,P=p?p.length:0;for(this.clear();++R<P;){var k=p[R];this.set(k[0],k[1])}}function ke(p){var R=-1,P=p?p.length:0;for(this.clear();++R<P;){var k=p[R];this.set(k[0],k[1])}}function tt(p){var R=-1,P=p?p.length:0;for(this.__data__=new ke;++R<P;)this.add(p[R])}function Je(p){this.__data__=new ne(p)}function at(p,R){var P=g(p)||Nn(p)?function(ve,Le){for(var Xe=-1,We=Array(ve);++Xe<ve;)We[Xe]=Le(Xe);return We}(p.length,String):[],k=P.length,J=!!k;for(var re in p)!_.call(p,re)||J&&(re=="length"||on(re,k))||P.push(re);return P}function lt(p,R){for(var P=p.length;P--;)if(Gn(p[P][0],R))return P;return-1}ee.prototype.clear=function(){this.__data__=K?K(null):{}},ee.prototype.delete=function(p){return this.has(p)&&delete this.__data__[p]},ee.prototype.get=function(p){var R=this.__data__;if(K){var P=R[p];return P==="__lodash_hash_undefined__"?void 0:P}return _.call(R,p)?R[p]:void 0},ee.prototype.has=function(p){var R=this.__data__;return K?R[p]!==void 0:_.call(R,p)},ee.prototype.set=function(p,R){return this.__data__[p]=K&&R===void 0?"__lodash_hash_undefined__":R,this},ne.prototype.clear=function(){this.__data__=[]},ne.prototype.delete=function(p){var R=this.__data__,P=lt(R,p);return!(P<0)&&(P==R.length-1?R.pop():we.call(R,P,1),!0)},ne.prototype.get=function(p){var R=this.__data__,P=lt(R,p);return P<0?void 0:R[P][1]},ne.prototype.has=function(p){return lt(this.__data__,p)>-1},ne.prototype.set=function(p,R){var P=this.__data__,k=lt(P,p);return k<0?P.push([p,R]):P[k][1]=R,this},ke.prototype.clear=function(){this.__data__={hash:new ee,map:new(De||ne),string:new ee}},ke.prototype.delete=function(p){return zt(this,p).delete(p)},ke.prototype.get=function(p){return zt(this,p).get(p)},ke.prototype.has=function(p){return zt(this,p).has(p)},ke.prototype.set=function(p,R){return zt(this,p).set(p,R),this},tt.prototype.add=tt.prototype.push=function(p){return this.__data__.set(p,"__lodash_hash_undefined__"),this},tt.prototype.has=function(p){return this.__data__.has(p)},Je.prototype.clear=function(){this.__data__=new ne},Je.prototype.delete=function(p){return this.__data__.delete(p)},Je.prototype.get=function(p){return this.__data__.get(p)},Je.prototype.has=function(p){return this.__data__.has(p)},Je.prototype.set=function(p,R){var P=this.__data__;if(P instanceof ne){var k=P.__data__;if(!De||k.length<199)return k.push([p,R]),this;P=this.__data__=new ke(k)}return P.set(p,R),this};var vt,ze=(vt=function(p,R){return p&&Rt(p,R,Ue)},function(p,R){if(p==null)return p;if(!D(p))return vt(p,R);for(var P=p.length,k=-1,J=Object(p);++k<P&&R(J[k],k,J)!==!1;);return p}),Rt=function(p){return function(R,P,k){for(var J=-1,re=Object(R),ve=k(R),Le=ve.length;Le--;){var Xe=ve[++J];if(P(re[Xe],Xe,re)===!1)break}return R}}();function Wt(p,R){for(var P=0,k=(R=kt(R,p)?[R]:Ht(R)).length;p!=null&&P<k;)p=p[Lt(R[P++])];return P&&P==k?p:void 0}function nn(p,R){return p!=null&&R in Object(p)}function ht(p,R,P,k,J){return p===R||(p==null||R==null||!Se(p)&&!Ne(R)?p!=p&&R!=R:function(re,ve,Le,Xe,We,Te){var ut=g(re),qe=g(ve),Qe="[object Array]",Ke="[object Array]";ut||(Qe=(Qe=pt(re))==o?l:Qe),qe||(Ke=(Ke=pt(ve))==o?l:Ke);var dt=Qe==l&&!H(re),Yt=Ke==l&&!H(ve),Tt=Qe==Ke;if(Tt&&!dt)return Te||(Te=new Je),ut||xe(re)?an(re,ve,Le,Xe,We,Te):function(_e,je,mr,_t,Tn,it,It){switch(mr){case"[object DataView]":if(_e.byteLength!=je.byteLength||_e.byteOffset!=je.byteOffset)return!1;_e=_e.buffer,je=je.buffer;case"[object ArrayBuffer]":return!(_e.byteLength!=je.byteLength||!_t(new le(_e),new le(je)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Gn(+_e,+je);case"[object Error]":return _e.name==je.name&&_e.message==je.message;case"[object RegExp]":case"[object String]":return _e==je+"";case i:var Pt=z;case s:var ln=2⁢if(Pt||(Pt=N),_e.size!=je.size&&!ln)return!1;var Pn=It.get(_e);if(Pn)return Pn==je;it|=1,It.set(_e,je);var Jt=an(Pt(_e),Pt(je),_t,Tn,it,It);return It.delete(_e),Jt;case"[object Symbol]":if(ie)return ie.call(_e)==ie.call(je)}return!1}(re,ve,Qe,Le,Xe,We,Te);if(!(2&We)){var ga=dt&&_.call(re,"__wrapped__"),ma=Yt&&_.call(ve,"__wrapped__");if(ga||ma){var Bs=ga?re.value():re,Vs=ma?ve.value():ve;return Te||(Te=new Je),Le(Bs,Vs,Xe,We,Te)}}return Tt?(Te||(Te=new Je),function(_e,je,mr,_t,Tn,it){var It=2&Tn,Pt=Ue(_e),ln=Pt.length,Pn=Ue(je).length;if(ln!=Pn&&!It)return!1;for(var Jt=ln;Jt--;){var Ot=Pt[Jt];if(!(It?Ot in je:_.call(je,Ot)))return!1}var va=it.get(_e);if(va&&it.get(je))return va==je;var On=!0;it.set(_e,je),it.set(je,_e);for(var vr=It;++Jt<ln;){Ot=Pt[Jt];var Fn=_e[Ot],Mn=je[Ot];if(_t)var ha=It?_t(Mn,Fn,Ot,je,_e,it):_t(Fn,Mn,Ot,_e,je,it);if(!(ha===void 0?Fn===Mn||mr(Fn,Mn,_t,Tn,it):ha)){On=!1;break}vr||(vr=Ot=="constructor")}if(On&&!vr){var Bn=_e.constructor,Vn=je.constructor;Bn==Vn||!("constructor"in _e)||!("constructor"in je)||typeof Bn=="function"&&Bn instanceof Bn&&typeof Vn=="function"&&Vn instanceof Vn||(On=!1)}return it.delete(_e),it.delete(je),On}(re,ve,Le,Xe,We,Te)):!1}(p,R,ht,P,k,J))}function Gt(p){return!(!Se(p)||function(R){return!!L&&L in R}(p))&&(Y(p)||H(p)?fe:y).test(yt(p))}function Nt(p){return typeof p=="function"?p:p==null?He:typeof p=="object"?g(p)?function(k,J){return kt(k)&&En(J)?wn(Lt(k),J):function(re){var ve=function(Le,Xe,We){var Te=Le==null?void 0:Wt(Le,Xe);return Te===void 0?We:Te}(re,k);return ve===void 0&&ve===J?function(Le,Xe){return Le!=null&&function(We,Te,ut){Te=kt(Te,We)?[Te]:Ht(Te);for(var qe,Qe=-1,Ke=Te.length;++Qe<Ke;){var dt=Lt(Te[Qe]);if(!(qe=We!=null&&ut(We,dt)))break;We=We[dt]}return qe||!!(Ke=We?We.length:0)&&pe(Ke)&&on(dt,Ke)&&(g(We)||Nn(We))}(Le,Xe,nn)}(re,k):ht(J,ve,void 0,3)}}(p[0],p[1]):function(k){var J=function(re){for(var ve=Ue(re),Le=ve.length;Le--;){var Xe=ve[Le],We=re[Xe];ve[Le]=[Xe,We,En(We)]}return ve}(k);return J.length==1&&J[0][2]?wn(J[0][0],J[0][1]):function(re){return re===k||function(ve,Le,Xe,We){var Te=Xe.length,ut=Te;if(ve==null)return!ut;for(ve=Object(ve);Te--;){var qe=Xe[Te];if(qe[2]?qe[1]!==ve[qe[0]]:!(qe[0]in ve))return!1}for(;++Te<ut;){var Qe=(qe=Xe[Te])[0],Ke=ve[Qe],dt=qe[1];if(qe[2]){if(Ke===void 0&&!(Qe in ve))return!1}else{var Yt=new Je,Tt;if(!(Tt===void 0?ht(dt,Ke,We,3,Yt):Tt))return!1}}return!0}(re,k,J)}}(p):kt(R=p)?(P=Lt(R),function(k){return k==null?void 0:k[P]}):function(k){return function(J){return Wt(J,k)}}(R);var R,P}function rn(p){if(P=(R=p)&&R.constructor,k=typeof P=="function"&&P.prototype||Z,R!==k)return Pe(p);var R,P,k,J=[];for(var re in Object(p))_.call(p,re)&&re!="constructor"&&J.push(re);return J}function Ht(p){return g(p)?p:Rn(p)}function an(p,R,P,k,J,re){var ve=2&J,Le=p.length,Xe=R.length;if(Le!=Xe&&!(ve&&Xe>Le))return!1;var We=re.get(p);if(We&&re.get(R))return We==R;var Te=-1,ut=!0,qe=1&J?new tt:void 0;for(re.set(p,R),re.set(R,p);++Te<Le;){var Qe=p[Te],Ke=R[Te];if(k)var dt=ve?k(Ke,Qe,Te,R,p,re):k(Qe,Ke,Te,p,R,re);if(dt!==void 0){if(dt)continue;ut=!1;break}if(qe){if(!U(R,function(Yt,Tt){if(!qe.has(Tt)&&(Qe===Yt||P(Qe,Yt,k,J,re)))return qe.add(Tt)})){ut=!1;break}}else if(Qe!==Ke&&!P(Qe,Ke,k,J,re)){ut=!1;break}}return re.delete(p),re.delete(R),ut}function zt(p,R){var P,k,J=p.__data__;return((k=typeof(P=R))=="string"||k=="number"||k=="symbol"||k=="boolean"?P!=="__proto__":P===null)?J[typeof R=="string"?"string":"hash"]:J.map}function Ct(p,R){var P=function(k,J){return k==null?void 0:k[J]}(p,R);return Gt(P)?P:void 0}var pt=function(p){return b.call(p)};function on(p,R){return!!(R=R??9007199254740991)&&(typeof p=="number"||C.test(p))&&p>-1&&p%1==0&&p<R}function kt(p,R){if(g(p))return!1;var P=typeof p;return!(P!="number"&&P!="symbol"&&P!="boolean"&&p!=null&&!Ie(p))||c.test(p)||!u.test(p)||R!=null&&p in Object(R)}function En(p){return p==p&&!Se(p)}function wn(p,R){return function(P){return P!=null&&P[p]===R&&(R!==void 0||p in Object(P))}}(X&&pt(new X(new ArrayBuffer(1)))!="[object DataView]"||De&&pt(new De)!=i||Re&&pt(Re.resolve())!="[object Promise]"||G&&pt(new G)!=s||V&&pt(new V)!="[object WeakMap]")&&(pt=function(p){var R=b.call(p),P=R==l?p.constructor:void 0,k=P?yt(P):void 0;if(k)switch(k){case ge:return"[object DataView]";case oe:return i;case me:return"[object Promise]";case he:return s;case Ge:return"[object WeakMap]"}return R});var Rn=sn(function(p){var R;p=(R=p)==null?"":function(k){if(typeof k=="string")return k;if(Ie(k))return Ce?Ce.call(k):"";var J=k+"";return J=="0"&&1/k==-1/0?"-0":J}(R);var P=[];return d.test(p)&&P.push(""),p.replace(h,function(k,J,re,ve){P.push(re?ve.replace(x,"$1"):J||k)}),P});function Lt(p){if(typeof p=="string"||Ie(p))return p;var R=p+"";return R=="0"&&1/p==-1/0?"-0":R}function yt(p){if(p!=null){try{return ae.call(p)}catch{}try{return p+""}catch{}}return""}function sn(p,R){if(typeof p!="function"||R&&typeof R!="function")throw new TypeError("Expected a function");var P=function(){var k=arguments,J=R?R.apply(this,k):k[0],re=P.cache;if(re.has(J))return re.get(J);var ve=p.apply(this,k);return P.cache=re.set(J,ve),ve};return P.cache=new(sn.Cache||ke),P}function Gn(p,R){return p===R||p!=p&&R!=R}function Nn(p){return function(R){return Ne(R)&&D(R)}(p)&&_.call(p,"callee")&&(!Ae.call(p,"callee")||b.call(p)==o)}sn.Cache=ke;var g=Array.isArray;function D(p){return p!=null&&pe(p.length)&&!Y(p)}function Y(p){var R=Se(p)?b.call(p):"";return R=="[object Function]"||R=="[object GeneratorFunction]"}function pe(p){return typeof p=="number"&&p>-1&&p%1==0&&p<=9007199254740991}function Se(p){var R=typeof p;return!!p&&(R=="object"||R=="function")}function Ne(p){return!!p&&typeof p=="object"}function Ie(p){return typeof p=="symbol"||Ne(p)&&b.call(p)=="[object Symbol]"}var xe=B?function(p){return function(R){return p(R)}}(B):function(p){return Ne(p)&&pe(p.length)&&!!f[b.call(p)]};function Ue(p){return D(p)?at(p):rn(p)}function He(p){return p}n.exports=function(p,R,P){var k=g(p)?Q:ce,J=arguments.length<3;return k(p,Nt(R),P,J,ze)}}).call(this,r(3),r(7)(e))},function(e,t){e.exports=function(r){return r.webpackPolyfill||(r.deprecate=function(){},r.paths=[],r.children||(r.children=[]),Object.defineProperty(r,"loaded",{enumerable:!0,get:function(){return r.l}}),Object.defineProperty(r,"id",{enumerable:!0,get:function(){return r.i}}),r.webpackPolyfill=1),r}},function(e,t){String.prototype.padEnd||(String.prototype.padEnd=function(r,a){return r>>=0,a=String(a!==void 0?a:" "),this.length>r?String(this):((r-=this.length)>a.length&&(a+=a.repeat(r/a.length)),String(this)+a.slice(0,r))})},function(e,t,r){function a(Z,O,L){return O in Z?Object.defineProperty(Z,O,{value:L,enumerable:!0,configurable:!0,writable:!0}):Z[O]=L,Z}function n(Z){if(Symbol.iterator in Object(Z)||Object.prototype.toString.call(Z)==="[object Arguments]")return Array.from(Z)}function o(Z){return function(O){if(Array.isArray(O)){for(var L=0,ae=new Array(O.length);L<O.length;L++)ae[L]=O[L];return ae}}(Z)||n(Z)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(Z){if(Array.isArray(Z))return Z}function l(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function s(Z,O){if(!(Z instanceof O))throw new TypeError("Cannot call a class as a function")}function u(Z,O){for(var L=0;L<O.length;L++){var ae=O[L];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(Z,ae.key,ae)}}function c(Z){return(c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(O){return typeof O}:function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O})(Z)}function d(Z){return(d=typeof Symbol=="function"&&c(Symbol.iterator)==="symbol"?function(O){return c(O)}:function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":c(O)})(Z)}function h(Z){if(Z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Z}function x(Z){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(O){return O.__proto__||Object.getPrototypeOf(O)})(Z)}function y(Z,O){return(y=Object.setPrototypeOf||function(L,ae){return L.__proto__=ae,L})(Z,O)}r.r(t);var C=r(0),f=r.n(C),v=r(5),S=r.n(v),w=r(4),E=r.n(w),A=r(6),M=r.n(A),T=r(2),B=r.n(T),Q=r(1),U=r.n(Q);r(8);function ce(Z,O){return i(Z)||function(L,ae){var _=[],b=!0,fe=!1,de=void 0;try{for(var le,Ae=L[Symbol.iterator]();!(b=(le=Ae.next()).done)&&(_.push(le.value),!ae||_.length!==ae);b=!0);}catch(we){fe=!0,de=we}finally{try{b||Ae.return==null||Ae.return()}finally{if(fe)throw de}}return _}(Z,O)||l()}var H=[["Afghanistan",["asia"],"af","93"],["Albania",["europe"],"al","355"],["Algeria",["africa","north-africa"],"dz","213"],["Andorra",["europe"],"ad","376"],["Angola",["africa"],"ao","244"],["Antigua and Barbuda",["america","carribean"],"ag","1268"],["Argentina",["america","south-america"],"ar","54","(..) ........",0,["11","221","223","261","264","2652","280","2905","291","2920","2966","299","341","342","343","351","376","379","381","3833","385","387","388"]],["Armenia",["asia","ex-ussr"],"am","374",".. ......"],["Aruba",["america","carribean"],"aw","297"],["Australia",["oceania"],"au","61","(..) .... ....",0,["2","3","4","7","8","02","03","04","07","08"]],["Austria",["europe","eu-union"],"at","43"],["Azerbaijan",["asia","ex-ussr"],"az","994","(..) ... .. .."],["Bahamas",["america","carribean"],"bs","1242"],["Bahrain",["middle-east"],"bh","973"],["Bangladesh",["asia"],"bd","880"],["Barbados",["america","carribean"],"bb","1246"],["Belarus",["europe","ex-ussr"],"by","375","(..) ... .. .."],["Belgium",["europe","eu-union"],"be","32","... .. .. .."],["Belize",["america","central-america"],"bz","501"],["Benin",["africa"],"bj","229"],["Bhutan",["asia"],"bt","975"],["Bolivia",["america","south-america"],"bo","591"],["Bosnia and Herzegovina",["europe","ex-yugos"],"ba","387"],["Botswana",["africa"],"bw","267"],["Brazil",["america","south-america"],"br","55","(..) ........."],["British Indian Ocean Territory",["asia"],"io","246"],["Brunei",["asia"],"bn","673"],["Bulgaria",["europe","eu-union"],"bg","359"],["Burkina Faso",["africa"],"bf","226"],["Burundi",["africa"],"bi","257"],["Cambodia",["asia"],"kh","855"],["Cameroon",["africa"],"cm","237"],["Canada",["america","north-america"],"ca","1","(...) ...-....",1,["204","226","236","249","250","289","306","343","365","387","403","416","418","431","437","438","450","506","514","519","548","579","581","587","604","613","639","647","672","705","709","742","778","780","782","807","819","825","867","873","902","905"]],["Cape Verde",["africa"],"cv","238"],["Caribbean Netherlands",["america","carribean"],"bq","599","",1],["Central African Republic",["africa"],"cf","236"],["Chad",["africa"],"td","235"],["Chile",["america","south-america"],"cl","56"],["China",["asia"],"cn","86","..-........."],["Colombia",["america","south-america"],"co","57","... ... ...."],["Comoros",["africa"],"km","269"],["Congo",["africa"],"cd","243"],["Congo",["africa"],"cg","242"],["Costa Rica",["america","central-america"],"cr","506","....-...."],["Côte d’Ivoire",["africa"],"ci","225",".. .. .. .."],["Croatia",["europe","eu-union","ex-yugos"],"hr","385"],["Cuba",["america","carribean"],"cu","53"],["Curaçao",["america","carribean"],"cw","599","",0],["Cyprus",["europe","eu-union"],"cy","357",".. ......"],["Czech Republic",["europe","eu-union"],"cz","420","... ... ..."],["Denmark",["europe","eu-union","baltic"],"dk","45",".. .. .. .."],["Djibouti",["africa"],"dj","253"],["Dominica",["america","carribean"],"dm","1767"],["Dominican Republic",["america","carribean"],"do","1","",2,["809","829","849"]],["Ecuador",["america","south-america"],"ec","593"],["Egypt",["africa","north-africa"],"eg","20"],["El Salvador",["america","central-america"],"sv","503","....-...."],["Equatorial Guinea",["africa"],"gq","240"],["Eritrea",["africa"],"er","291"],["Estonia",["europe","eu-union","ex-ussr","baltic"],"ee","372",".... ......"],["Ethiopia",["africa"],"et","251"],["Fiji",["oceania"],"fj","679"],["Finland",["europe","eu-union","baltic"],"fi","358",".. ... .. .."],["France",["europe","eu-union"],"fr","33",". .. .. .. .."],["French Guiana",["america","south-america"],"gf","594"],["French Polynesia",["oceania"],"pf","689"],["Gabon",["africa"],"ga","241"],["Gambia",["africa"],"gm","220"],["Georgia",["asia","ex-ussr"],"ge","995"],["Germany",["europe","eu-union","baltic"],"de","49",".... ........"],["Ghana",["africa"],"gh","233"],["Greece",["europe","eu-union"],"gr","30"],["Grenada",["america","carribean"],"gd","1473"],["Guadeloupe",["america","carribean"],"gp","590","",0],["Guam",["oceania"],"gu","1671"],["Guatemala",["america","central-america"],"gt","502","....-...."],["Guinea",["africa"],"gn","224"],["Guinea-Bissau",["africa"],"gw","245"],["Guyana",["america","south-america"],"gy","592"],["Haiti",["america","carribean"],"ht","509","....-...."],["Honduras",["america","central-america"],"hn","504"],["Hong Kong",["asia"],"hk","852",".... ...."],["Hungary",["europe","eu-union"],"hu","36"],["Iceland",["europe"],"is","354","... ...."],["India",["asia"],"in","91",".....-....."],["Indonesia",["asia"],"id","62"],["Iran",["middle-east"],"ir","98","... ... ...."],["Iraq",["middle-east"],"iq","964"],["Ireland",["europe","eu-union"],"ie","353",".. ......."],["Israel",["middle-east"],"il","972","... ... ...."],["Italy",["europe","eu-union"],"it","39","... .......",0],["Jamaica",["america","carribean"],"jm","1876"],["Japan",["asia"],"jp","81",".. .... ...."],["Jordan",["middle-east"],"jo","962"],["Kazakhstan",["asia","ex-ussr"],"kz","7","... ...-..-..",1,["310","311","312","313","315","318","321","324","325","326","327","336","7172","73622"]],["Kenya",["africa"],"ke","254"],["Kiribati",["oceania"],"ki","686"],["Kosovo",["europe","ex-yugos"],"xk","383"],["Kuwait",["middle-east"],"kw","965"],["Kyrgyzstan",["asia","ex-ussr"],"kg","996","... ... ..."],["Laos",["asia"],"la","856"],["Latvia",["europe","eu-union","ex-ussr","baltic"],"lv","371",".. ... ..."],["Lebanon",["middle-east"],"lb","961"],["Lesotho",["africa"],"ls","266"],["Liberia",["africa"],"lr","231"],["Libya",["africa","north-africa"],"ly","218"],["Liechtenstein",["europe"],"li","423"],["Lithuania",["europe","eu-union","ex-ussr","baltic"],"lt","370"],["Luxembourg",["europe","eu-union"],"lu","352"],["Macau",["asia"],"mo","853"],["Macedonia",["europe","ex-yugos"],"mk","389"],["Madagascar",["africa"],"mg","261"],["Malawi",["africa"],"mw","265"],["Malaysia",["asia"],"my","60","..-....-...."],["Maldives",["asia"],"mv","960"],["Mali",["africa"],"ml","223"],["Malta",["europe","eu-union"],"mt","356"],["Marshall Islands",["oceania"],"mh","692"],["Martinique",["america","carribean"],"mq","596"],["Mauritania",["africa"],"mr","222"],["Mauritius",["africa"],"mu","230"],["Mexico",["america","central-america"],"mx","52","... ... ....",0,["55","81","33","656","664","998","774","229"]],["Micronesia",["oceania"],"fm","691"],["Moldova",["europe"],"md","373","(..) ..-..-.."],["Monaco",["europe"],"mc","377"],["Mongolia",["asia"],"mn","976"],["Montenegro",["europe","ex-yugos"],"me","382"],["Morocco",["africa","north-africa"],"ma","212"],["Mozambique",["africa"],"mz","258"],["Myanmar",["asia"],"mm","95"],["Namibia",["africa"],"na","264"],["Nauru",["africa"],"nr","674"],["Nepal",["asia"],"np","977"],["Netherlands",["europe","eu-union"],"nl","31",".. ........"],["New Caledonia",["oceania"],"nc","687"],["New Zealand",["oceania"],"nz","64","...-...-...."],["Nicaragua",["america","central-america"],"ni","505"],["Niger",["africa"],"ne","227"],["Nigeria",["africa"],"ng","234"],["North Korea",["asia"],"kp","850"],["Norway",["europe","baltic"],"no","47","... .. ..."],["Oman",["middle-east"],"om","968"],["Pakistan",["asia"],"pk","92","...-......."],["Palau",["oceania"],"pw","680"],["Palestine",["middle-east"],"ps","970"],["Panama",["america","central-america"],"pa","507"],["Papua New Guinea",["oceania"],"pg","675"],["Paraguay",["america","south-america"],"py","595"],["Peru",["america","south-america"],"pe","51"],["Philippines",["asia"],"ph","63",".... ......."],["Poland",["europe","eu-union","baltic"],"pl","48","...-...-..."],["Portugal",["europe","eu-union"],"pt","351"],["Puerto Rico",["america","carribean"],"pr","1","",3,["787","939"]],["Qatar",["middle-east"],"qa","974"],["Réunion",["africa"],"re","262"],["Romania",["europe","eu-union"],"ro","40"],["Russia",["europe","asia","ex-ussr","baltic"],"ru","7","(...) ...-..-..",0],["Rwanda",["africa"],"rw","250"],["Saint Kitts and Nevis",["america","carribean"],"kn","1869"],["Saint Lucia",["america","carribean"],"lc","1758"],["Saint Vincent and the Grenadines",["america","carribean"],"vc","1784"],["Samoa",["oceania"],"ws","685"],["San Marino",["europe"],"sm","378"],["São Tomé and Príncipe",["africa"],"st","239"],["Saudi Arabia",["middle-east"],"sa","966"],["Senegal",["africa"],"sn","221"],["Serbia",["europe","ex-yugos"],"rs","381"],["Seychelles",["africa"],"sc","248"],["Sierra Leone",["africa"],"sl","232"],["Singapore",["asia"],"sg","65","....-...."],["Slovakia",["europe","eu-union"],"sk","421"],["Slovenia",["europe","eu-union","ex-yugos"],"si","386"],["Solomon Islands",["oceania"],"sb","677"],["Somalia",["africa"],"so","252"],["South Africa",["africa"],"za","27"],["South Korea",["asia"],"kr","82","... .... ...."],["South Sudan",["africa","north-africa"],"ss","211"],["Spain",["europe","eu-union"],"es","34","... ... ..."],["Sri Lanka",["asia"],"lk","94"],["Sudan",["africa"],"sd","249"],["Suriname",["america","south-america"],"sr","597"],["Swaziland",["africa"],"sz","268"],["Sweden",["europe","eu-union","baltic"],"se","46","(...) ...-..."],["Switzerland",["europe"],"ch","41",".. ... .. .."],["Syria",["middle-east"],"sy","963"],["Taiwan",["asia"],"tw","886"],["Tajikistan",["asia","ex-ussr"],"tj","992"],["Tanzania",["africa"],"tz","255"],["Thailand",["asia"],"th","66"],["Timor-Leste",["asia"],"tl","670"],["Togo",["africa"],"tg","228"],["Tonga",["oceania"],"to","676"],["Trinidad and Tobago",["america","carribean"],"tt","1868"],["Tunisia",["africa","north-africa"],"tn","216"],["Turkey",["europe"],"tr","90","... ... .. .."],["Turkmenistan",["asia","ex-ussr"],"tm","993"],["Tuvalu",["asia"],"tv","688"],["Uganda",["africa"],"ug","256"],["Ukraine",["europe","ex-ussr"],"ua","380","(..) ... .. .."],["United Arab Emirates",["middle-east"],"ae","971"],["United Kingdom",["europe","eu-union"],"gb","44",".... ......"],["United States",["america","north-america"],"us","1","(...) ...-....",0,["907","205","251","256","334","479","501","870","480","520","602","623","928","209","213","310","323","408","415","510","530","559","562","619","626","650","661","707","714","760","805","818","831","858","909","916","925","949","951","303","719","970","203","860","202","302","239","305","321","352","386","407","561","727","772","813","850","863","904","941","954","229","404","478","706","770","912","808","319","515","563","641","712","208","217","309","312","618","630","708","773","815","847","219","260","317","574","765","812","316","620","785","913","270","502","606","859","225","318","337","504","985","413","508","617","781","978","301","410","207","231","248","269","313","517","586","616","734","810","906","989","218","320","507","612","651","763","952","314","417","573","636","660","816","228","601","662","406","252","336","704","828","910","919","701","308","402","603","201","609","732","856","908","973","505","575","702","775","212","315","516","518","585","607","631","716","718","845","914","216","330","419","440","513","614","740","937","405","580","918","503","541","215","412","570","610","717","724","814","401","803","843","864","605","423","615","731","865","901","931","210","214","254","281","325","361","409","432","512","713","806","817","830","903","915","936","940","956","972","979","435","801","276","434","540","703","757","804","802","206","253","360","425","509","262","414","608","715","920","304","307"]],["Uruguay",["america","south-america"],"uy","598"],["Uzbekistan",["asia","ex-ussr"],"uz","998",".. ... .. .."],["Vanuatu",["oceania"],"vu","678"],["Vatican City",["europe"],"va","39",".. .... ....",1],["Venezuela",["america","south-america"],"ve","58"],["Vietnam",["asia"],"vn","84"],["Yemen",["middle-east"],"ye","967"],["Zambia",["africa"],"zm","260"],["Zimbabwe",["africa"],"zw","263"]],z=[["American Samoa",["oceania"],"as","1684"],["Anguilla",["america","carribean"],"ai","1264"],["Bermuda",["america","north-america"],"bm","1441"],["British Virgin Islands",["america","carribean"],"vg","1284"],["Cayman Islands",["america","carribean"],"ky","1345"],["Cook Islands",["oceania"],"ck","682"],["Falkland Islands",["america","south-america"],"fk","500"],["Faroe Islands",["europe"],"fo","298"],["Gibraltar",["europe"],"gi","350"],["Greenland",["america"],"gl","299"],["Jersey",["europe","eu-union"],"je","44",".... ......"],["Montserrat",["america","carribean"],"ms","1664"],["Niue",["asia"],"nu","683"],["Norfolk Island",["oceania"],"nf","672"],["Northern Mariana Islands",["oceania"],"mp","1670"],["Saint Barthélemy",["america","carribean"],"bl","590","",1],["Saint Helena",["africa"],"sh","290"],["Saint Martin",["america","carribean"],"mf","590","",2],["Saint Pierre and Miquelon",["america","north-america"],"pm","508"],["Sint Maarten",["america","carribean"],"sx","1721"],["Tokelau",["oceania"],"tk","690"],["Turks and Caicos Islands",["america","carribean"],"tc","1649"],["U.S. Virgin Islands",["america","carribean"],"vi","1340"],["Wallis and Futuna",["oceania"],"wf","681"]];function N(Z,O,L,ae,_){return!L||_?Z+"".padEnd(O.length,".")+" "+ae:Z+"".padEnd(O.length,".")+" "+L}function j(Z,O,L,ae,_){var b,fe,de=[];return fe=O===!0,[(b=[]).concat.apply(b,o(Z.map(function(le){var Ae={name:le[0],regions:le[1],iso2:le[2],countryCode:le[3],dialCode:le[3],format:N(L,le[3],le[4],ae,_),priority:le[5]||0},we=[];return le[6]&&le[6].map(function(Pe){var X=function(De){for(var Re=1;Re<arguments.length;Re++){var G=arguments[Re]!=null?arguments[Re]:{},V=Object.keys(G);typeof Object.getOwnPropertySymbols=="function"&&(V=V.concat(Object.getOwnPropertySymbols(G).filter(function(K){return Object.getOwnPropertyDescriptor(G,K).enumerable}))),V.forEach(function(K){a(De,K,G[K])})}return De}({},Ae);X.dialCode=le[3]+Pe,X.isAreaCode=!0,X.areaCodeLength=Pe.length,we.push(X)}),we.length>0?(Ae.mainCode=!0,fe||O.constructor.name==="Array"&&O.includes(le[2])?(Ae.hasAreaCodes=!0,[Ae].concat(we)):(de=de.concat(we),[Ae])):[Ae]}))),de]}function W(Z,O,L,ae){if(L!==null){var _=Object.keys(L),b=Object.values(L);_.forEach(function(fe,de){if(ae)return Z.push([fe,b[de]]);var le=Z.findIndex(function(we){return we[0]===fe});if(le===-1){var Ae=[fe];Ae[O]=b[de],Z.push(Ae)}else Z[le][O]=b[de]})}}function $(Z,O){return O.length===0?Z:Z.map(function(L){var ae=O.findIndex(function(b){return b[0]===L[2]});if(ae===-1)return L;var _=O[ae];return _[1]&&(L[4]=_[1]),_[3]&&(L[5]=_[3]),_[2]&&(L[6]=_[2]),L})}var te=function Z(O,L,ae,_,b,fe,de,le,Ae,we,Pe,X,De,Re){s(this,Z),this.filterRegions=function(q,ie){if(typeof q=="string"){var Ce=q;return ie.filter(function(ee){return ee.regions.some(function(ne){return ne===Ce})})}return ie.filter(function(ee){return q.map(function(ne){return ee.regions.some(function(ke){return ke===ne})}).some(function(ne){return ne})})},this.sortTerritories=function(q,ie){var Ce=[].concat(o(q),o(ie));return Ce.sort(function(ee,ne){return ee.name<ne.name?-1:ee.name>ne.name?1:0}),Ce},this.getFilteredCountryList=function(q,ie,Ce){return q.length===0?ie:Ce?q.map(function(ee){var ne=ie.find(function(ke){return ke.iso2===ee});if(ne)return ne}).filter(function(ee){return ee}):ie.filter(function(ee){return q.some(function(ne){return ne===ee.iso2})})},this.localizeCountries=function(q,ie,Ce){for(var ee=0;ee<q.length;ee++)ie[q[ee].iso2]!==void 0?q[ee].localName=ie[q[ee].iso2]:ie[q[ee].name]!==void 0&&(q[ee].localName=ie[q[ee].name]);return Ce||q.sort(function(ne,ke){return ne.localName<ke.localName?-1:ne.localName>ke.localName?1:0}),q},this.getCustomAreas=function(q,ie){for(var Ce=[],ee=0;ee<ie.length;ee++){var ne=JSON.parse(JSON.stringify(q));ne.dialCode+=ie[ee],Ce.push(ne)}return Ce},this.excludeCountries=function(q,ie){return ie.length===0?q:q.filter(function(Ce){return!ie.includes(Ce.iso2)})};var G=function(q,ie,Ce){var ee=[];return W(ee,1,q,!0),W(ee,3,ie),W(ee,2,Ce),ee}(le,Ae,we),V=$(JSON.parse(JSON.stringify(H)),G),K=$(JSON.parse(JSON.stringify(z)),G),ge=ce(j(V,O,X,De,Re),2),oe=ge[0],me=ge[1];if(L){var he=ce(j(K,O,X,De,Re),2),Ge=he[0];he[1],oe=this.sortTerritories(Ge,oe)}ae&&(oe=this.filterRegions(ae,oe)),this.onlyCountries=this.localizeCountries(this.excludeCountries(this.getFilteredCountryList(_,oe,de.includes("onlyCountries")),fe),Pe,de.includes("onlyCountries")),this.preferredCountries=b.length===0?[]:this.localizeCountries(this.getFilteredCountryList(b,oe,de.includes("preferredCountries")),Pe,de.includes("preferredCountries")),this.hiddenAreaCodes=this.excludeCountries(this.getFilteredCountryList(_,me),fe)},Ee=function(Z){function O(_){var b;s(this,O),(b=function(G,V){return!V||d(V)!=="object"&&typeof V!="function"?h(G):V}(this,x(O).call(this,_))).getProbableCandidate=E()(function(G){return G&&G.length!==0?b.state.onlyCountries.filter(function(V){return B()(V.name.toLowerCase(),G.toLowerCase())},h(h(b)))[0]:null}),b.guessSelectedCountry=E()(function(G,V,K,ge){var oe;if(b.props.enableAreaCodes===!1&&(ge.some(function(Ge){if(B()(G,Ge.dialCode))return K.some(function(q){if(Ge.iso2===q.iso2&&q.mainCode)return oe=q,!0}),!0}),oe))return oe;var me=K.find(function(Ge){return Ge.iso2==V});if(G.trim()==="")return me;var he=K.reduce(function(Ge,q){return B()(G,q.dialCode)&&(q.dialCode.length>Ge.dialCode.length||q.dialCode.length===Ge.dialCode.length&&q.priority<Ge.priority)?q:Ge},{dialCode:"",priority:10001},h(h(b)));return he.name?he:me}),b.updateCountry=function(G){var V,K=b.state.onlyCountries;(V=G.indexOf(0)>="0"&&G.indexOf(0)<="9"?K.find(function(ge){return ge.dialCode==+G}):K.find(function(ge){return ge.iso2==G}))&&V.dialCode&&b.setState({selectedCountry:V,formattedNumber:b.props.disableCountryCode?"":b.formatNumber(V.dialCode,V)})},b.scrollTo=function(G,V){if(G){var K=b.dropdownRef;if(K&&document.body){var ge=K.offsetHeight,oe=K.getBoundingClientRect().top+document.body.scrollTop,me=oe+ge,he=G,Ge=he.getBoundingClientRect(),q=he.offsetHeight,ie=Ge.top+document.body.scrollTop,Ce=ie+q,ee=ie-oe+K.scrollTop,ne=ge/2-q/2;if(b.props.enableSearch?ie<oe+32:ie<oe)V&&(ee-=ne),K.scrollTop=ee;else if(Ce>me){V&&(ee+=ne);var ke=ge-q;K.scrollTop=ee-ke}}}},b.scrollToTop=function(){var G=b.dropdownRef;G&&document.body&&(G.scrollTop=0)},b.formatNumber=function(G,V){if(!V)return G;var K,ge=V.format,oe=b.props,me=oe.disableCountryCode,he=oe.enableAreaCodeStretch,Ge=oe.enableLongNumbers,q=oe.autoFormat;if(me?((K=ge.split(" ")).shift(),K=K.join(" ")):he&&V.isAreaCode?((K=ge.split(" "))[1]=K[1].replace(/\.+/,"".padEnd(V.areaCodeLength,".")),K=K.join(" ")):K=ge,!G||G.length===0)return me?"":b.props.prefix;if(G&&G.length<2||!K||!q)return me?G:b.props.prefix+G;var ie,Ce=M()(K,function(ee,ne){if(ee.remainingText.length===0)return ee;if(ne!==".")return{formattedText:ee.formattedText+ne,remainingText:ee.remainingText};var ke,tt=i(ke=ee.remainingText)||n(ke)||l(),Je=tt[0],at=tt.slice(1);return{formattedText:ee.formattedText+Je,remainingText:at}},{formattedText:"",remainingText:G.split("")});return(ie=Ge?Ce.formattedText+Ce.remainingText.join(""):Ce.formattedText).includes("(")&&!ie.includes(")")&&(ie+=")"),ie},b.cursorToEnd=function(){var G=b.numberInputRef;if(document.activeElement===G){G.focus();var V=G.value.length;G.value.charAt(V-1)===")"&&(V-=1),G.setSelectionRange(V,V)}},b.getElement=function(G){return b["flag_no_".concat(G)]},b.getCountryData=function(){return b.state.selectedCountry?{name:b.state.selectedCountry.name||"",dialCode:b.state.selectedCountry.dialCode||"",countryCode:b.state.selectedCountry.iso2||"",format:b.state.selectedCountry.format||""}:{}},b.handleFlagDropdownClick=function(G){if(G.preventDefault(),b.state.showDropdown||!b.props.disabled){var V=b.state,K=V.preferredCountries,ge=V.onlyCountries,oe=V.selectedCountry,me=b.concatPreferredCountries(K,ge).findIndex(function(he){return he.dialCode===oe.dialCode&&he.iso2===oe.iso2});b.setState({showDropdown:!b.state.showDropdown,highlightCountryIndex:me},function(){b.state.showDropdown&&b.scrollTo(b.getElement(b.state.highlightCountryIndex))})}},b.handleInput=function(G){var V=G.target.value,K=b.props,ge=K.prefix,oe=K.onChange,me=b.props.disableCountryCode?"":ge,he=b.state.selectedCountry,Ge=b.state.freezeSelection;if(!b.props.countryCodeEditable){var q=ge+(he.hasAreaCodes?b.state.onlyCountries.find(function(ze){return ze.iso2===he.iso2&&ze.mainCode}).dialCode:he.dialCode);if(V.slice(0,q.length)!==q)return}if(V===ge)return oe&&oe("",b.getCountryData(),G,""),b.setState({formattedNumber:""});if(!(V.replace(/\D/g,"").length>15&&(b.props.enableLongNumbers===!1||typeof b.props.enableLongNumbers=="number"&&V.replace(/\D/g,"").length>b.props.enableLongNumbers))&&V!==b.state.formattedNumber){G.preventDefault?G.preventDefault():G.returnValue=!1;var ie=b.props.country,Ce=b.state,ee=Ce.onlyCountries,ne=Ce.selectedCountry,ke=Ce.hiddenAreaCodes;if(oe&&G.persist(),V.length>0){var tt=V.replace(/\D/g,"");(!b.state.freezeSelection||ne&&ne.dialCode.length>tt.length)&&(he=b.props.disableCountryGuess?ne:b.guessSelectedCountry(tt.substring(0,6),ie,ee,ke)||ne,Ge=!1),me=b.formatNumber(tt,he),he=he.dialCode?he:ne}var Je=G.target.selectionStart,at=G.target.selectionStart,lt=b.state.formattedNumber,vt=me.length-lt.length;b.setState({formattedNumber:me,freezeSelection:Ge,selectedCountry:he},function(){vt>0&&(at-=vt),me.charAt(me.length-1)==")"?b.numberInputRef.setSelectionRange(me.length-1,me.length-1):at>0&<.length>=me.length?b.numberInputRef.setSelectionRange(at,at):Je<lt.length&&b.numberInputRef.setSelectionRange(Je,Je),oe&&oe(me.replace(/[^0-9]+/g,""),b.getCountryData(),G,me)})}},b.handleInputClick=function(G){b.setState({showDropdown:!1}),b.props.onClick&&b.props.onClick(G,b.getCountryData())},b.handleDoubleClick=function(G){var V=G.target.value.length;G.target.setSelectionRange(0,V)},b.handleFlagItemClick=function(G,V){var K=b.state.selectedCountry,ge=b.state.onlyCountries.find(function(Ge){return Ge==G});if(ge){var oe=b.state.formattedNumber.replace(" ","").replace("(","").replace(")","").replace("-",""),me=oe.length>1?oe.replace(K.dialCode,ge.dialCode):ge.dialCode,he=b.formatNumber(me.replace(/\D/g,""),ge);b.setState({showDropdown:!1,selectedCountry:ge,freezeSelection:!0,formattedNumber:he,searchValue:""},function(){b.cursorToEnd(),b.props.onChange&&b.props.onChange(he.replace(/[^0-9]+/g,""),b.getCountryData(),V,he)})}},b.handleInputFocus=function(G){b.numberInputRef&&b.numberInputRef.value===b.props.prefix&&b.state.selectedCountry&&!b.props.disableCountryCode&&b.setState({formattedNumber:b.props.prefix+b.state.selectedCountry.dialCode},function(){b.props.jumpCursorToEnd&&setTimeout(b.cursorToEnd,0)}),b.setState({placeholder:""}),b.props.onFocus&&b.props.onFocus(G,b.getCountryData()),b.props.jumpCursorToEnd&&setTimeout(b.cursorToEnd,0)},b.handleInputBlur=function(G){G.target.value||b.setState({placeholder:b.props.placeholder}),b.props.onBlur&&b.props.onBlur(G,b.getCountryData())},b.handleInputCopy=function(G){if(b.props.copyNumbersOnly){var V=window.getSelection().toString().replace(/[^0-9]+/g,"");G.clipboardData.setData("text/plain",V),G.preventDefault()}},b.getHighlightCountryIndex=function(G){var V=b.state.highlightCountryIndex+G;return V<0||V>=b.state.onlyCountries.length+b.state.preferredCountries.length?V-G:b.props.enableSearch&&V>b.getSearchFilteredCountries().length?0:V},b.searchCountry=function(){var G=b.getProbableCandidate(b.state.queryString)||b.state.onlyCountries[0],V=b.state.onlyCountries.findIndex(function(K){return K==G})+b.state.preferredCountries.length;b.scrollTo(b.getElement(V),!0),b.setState({queryString:"",highlightCountryIndex:V})},b.handleKeydown=function(G){var V=b.props.keys,K=G.target.className;if(K.includes("selected-flag")&&G.which===V.ENTER&&!b.state.showDropdown)return b.handleFlagDropdownClick(G);if(K.includes("form-control")&&(G.which===V.ENTER||G.which===V.ESC))return G.target.blur();if(b.state.showDropdown&&!b.props.disabled&&(!K.includes("search-box")||G.which===V.UP||G.which===V.DOWN||G.which===V.ENTER||G.which===V.ESC&&G.target.value==="")){G.preventDefault?G.preventDefault():G.returnValue=!1;var ge=function(oe){b.setState({highlightCountryIndex:b.getHighlightCountryIndex(oe)},function(){b.scrollTo(b.getElement(b.state.highlightCountryIndex),!0)})};switch(G.which){case V.DOWN:ge(1);break;case V.UP:ge(-1);break;case V.ENTER:b.props.enableSearch?b.handleFlagItemClick(b.getSearchFilteredCountries()[b.state.highlightCountryIndex]||b.getSearchFilteredCountries()[0],G):b.handleFlagItemClick([].concat(o(b.state.preferredCountries),o(b.state.onlyCountries))[b.state.highlightCountryIndex],G);break;case V.ESC:case V.TAB:b.setState({showDropdown:!1},b.cursorToEnd);break;default:(G.which>=V.A&&G.which<=V.Z||G.which===V.SPACE)&&b.setState({queryString:b.state.queryString+String.fromCharCode(G.which)},b.state.debouncedQueryStingSearcher)}}},b.handleInputKeyDown=function(G){var V=b.props,K=V.keys,ge=V.onEnterKeyPress,oe=V.onKeyDown;G.which===K.ENTER&&ge&&ge(G),oe&&oe(G)},b.handleClickOutside=function(G){b.dropdownRef&&!b.dropdownContainerRef.contains(G.target)&&b.state.showDropdown&&b.setState({showDropdown:!1})},b.handleSearchChange=function(G){var V=G.currentTarget.value,K=b.state,ge=K.preferredCountries,oe=K.selectedCountry,me=0;if(V===""&&oe){var he=b.state.onlyCountries;me=b.concatPreferredCountries(ge,he).findIndex(function(Ge){return Ge==oe}),setTimeout(function(){return b.scrollTo(b.getElement(me))},100)}b.setState({searchValue:V,highlightCountryIndex:me})},b.concatPreferredCountries=function(G,V){return G.length>0?o(new Set(G.concat(V))):V},b.getDropdownCountryName=function(G){return G.localName||G.name},b.getSearchFilteredCountries=function(){var G=b.state,V=G.preferredCountries,K=G.onlyCountries,ge=G.searchValue,oe=b.props.enableSearch,me=b.concatPreferredCountries(V,K),he=ge.trim().toLowerCase().replace("+","");if(oe&&he){if(/^\d+$/.test(he))return me.filter(function(ie){var Ce=ie.dialCode;return["".concat(Ce)].some(function(ee){return ee.toLowerCase().includes(he)})});var Ge=me.filter(function(ie){var Ce=ie.iso2;return["".concat(Ce)].some(function(ee){return ee.toLowerCase().includes(he)})}),q=me.filter(function(ie){var Ce=ie.name,ee=ie.localName;return ie.iso2,["".concat(Ce),"".concat(ee||"")].some(function(ne){return ne.toLowerCase().includes(he)})});return b.scrollToTop(),o(new Set([].concat(Ge,q)))}return me},b.getCountryDropdownList=function(){var G=b.state,V=G.preferredCountries,K=G.highlightCountryIndex,ge=G.showDropdown,oe=G.searchValue,me=b.props,he=me.disableDropdown,Ge=me.prefix,q=b.props,ie=q.enableSearch,Ce=q.searchNotFound,ee=q.disableSearchIcon,ne=q.searchClass,ke=q.searchStyle,tt=q.searchPlaceholder,Je=q.autocompleteSearch,at=b.getSearchFilteredCountries().map(function(ze,Rt){var Wt=K===Rt,nn=U()({country:!0,preferred:ze.iso2==="us"||ze.iso2==="gb",active:ze.iso2==="us",highlight:Wt}),ht="flag ".concat(ze.iso2);return f.a.createElement("li",Object.assign({ref:function(Gt){return b["flag_no_".concat(Rt)]=Gt},key:"flag_no_".concat(Rt),"data-flag-key":"flag_no_".concat(Rt),className:nn,"data-dial-code":"1",tabIndex:he?"-1":"0","data-country-code":ze.iso2,onClick:function(Gt){return b.handleFlagItemClick(ze,Gt)},role:"option"},Wt?{"aria-selected":!0}:{}),f.a.createElement("div",{className:ht}),f.a.createElement("span",{className:"country-name"},b.getDropdownCountryName(ze)),f.a.createElement("span",{className:"dial-code"},ze.format?b.formatNumber(ze.dialCode,ze):Ge+ze.dialCode))}),lt=f.a.createElement("li",{key:"dashes",className:"divider"});V.length>0&&(!ie||ie&&!oe.trim())&&at.splice(V.length,0,lt);var vt=U()(a({"country-list":!0,hide:!ge},b.props.dropdownClass,!0));return f.a.createElement("ul",{ref:function(ze){return!ie&&ze&&ze.focus(),b.dropdownRef=ze},className:vt,style:b.props.dropdownStyle,role:"listbox",tabIndex:"0"},ie&&f.a.createElement("li",{className:U()(a({search:!0},ne,ne))},!ee&&f.a.createElement("span",{className:U()(a({"search-emoji":!0},"".concat(ne,"-emoji"),ne)),role:"img","aria-label":"Magnifying glass"},"🔎"),f.a.createElement("input",{className:U()(a({"search-box":!0},"".concat(ne,"-box"),ne)),style:ke,type:"search",placeholder:tt,autoFocus:!0,autoComplete:Je?"on":"off",value:oe,onChange:b.handleSearchChange})),at.length>0?at:f.a.createElement("li",{className:"no-entries-message"},f.a.createElement("span",null,Ce)))};var fe,de=new te(_.enableAreaCodes,_.enableTerritories,_.regions,_.onlyCountries,_.preferredCountries,_.excludeCountries,_.preserveOrder,_.masks,_.priority,_.areaCodes,_.localization,_.prefix,_.defaultMask,_.alwaysDefaultMask),le=de.onlyCountries,Ae=de.preferredCountries,we=de.hiddenAreaCodes,Pe=_.value?_.value.replace(/\D/g,""):"";fe=_.disableInitialCountryGuess?0:Pe.length>1?b.guessSelectedCountry(Pe.substring(0,6),_.country,le,we)||0:_.country&&le.find(function(G){return G.iso2==_.country})||0;var X,De=Pe.length<2&&fe&&!B()(Pe,fe.dialCode)?fe.dialCode:"";X=Pe===""&&fe===0?"":b.formatNumber((_.disableCountryCode?"":De)+Pe,fe.name?fe:void 0);var Re=le.findIndex(function(G){return G==fe});return b.state={showDropdown:_.showDropdown,formattedNumber:X,onlyCountries:le,preferredCountries:Ae,hiddenAreaCodes:we,selectedCountry:fe,highlightCountryIndex:Re,queryString:"",freezeSelection:!1,debouncedQueryStingSearcher:S()(b.searchCountry,250),searchValue:""},b}var L,ae;return function(_,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function");_.prototype=Object.create(b&&b.prototype,{constructor:{value:_,writable:!0,configurable:!0}}),b&&y(_,b)}(O,Z),L=O,(ae=[{key:"componentDidMount",value:function(){document.addEventListener&&this.props.enableClickOutside&&document.addEventListener("mousedown",this.handleClickOutside),this.props.onMount&&this.props.onMount(this.state.formattedNumber.replace(/[^0-9]+/g,""),this.getCountryData(),this.state.formattedNumber)}},{key:"componentWillUnmount",value:function(){document.removeEventListener&&this.props.enableClickOutside&&document.removeEventListener("mousedown",this.handleClickOutside)}},{key:"componentDidUpdate",value:function(_,b,fe){_.country!==this.props.country?this.updateCountry(this.props.country):_.value!==this.props.value&&this.updateFormattedNumber(this.props.value)}},{key:"updateFormattedNumber",value:function(_){if(_===null)return this.setState({selectedCountry:0,formattedNumber:""});var b=this.state,fe=b.onlyCountries,de=b.selectedCountry,le=b.hiddenAreaCodes,Ae=this.props,we=Ae.country,Pe=Ae.prefix;if(_==="")return this.setState({selectedCountry:de,formattedNumber:""});var X,De,Re=_.replace(/\D/g,"");if(de&&B()(_,Pe+de.dialCode))De=this.formatNumber(Re,de),this.setState({formattedNumber:De});else{var G=(X=this.props.disableCountryGuess?de:this.guessSelectedCountry(Re.substring(0,6),we,fe,le)||de)&&B()(Re,Pe+X.dialCode)?X.dialCode:"";De=this.formatNumber((this.props.disableCountryCode?"":G)+Re,X||void 0),this.setState({selectedCountry:X,formattedNumber:De})}}},{key:"render",value:function(){var _,b,fe,de=this,le=this.state,Ae=le.onlyCountries,we=le.selectedCountry,Pe=le.showDropdown,X=le.formattedNumber,De=le.hiddenAreaCodes,Re=this.props,G=Re.disableDropdown,V=Re.renderStringAsFlag,K=Re.isValid,ge=Re.defaultErrorMessage,oe=Re.specialLabel;if(typeof K=="boolean")b=K;else{var me=K(X.replace(/\D/g,""),we,Ae,De);typeof me=="boolean"?(b=me)===!1&&(fe=ge):(b=!1,fe=me)}var he=U()((a(_={},this.props.containerClass,!0),a(_,"react-tel-input",!0),_)),Ge=U()({arrow:!0,up:Pe}),q=U()(a({"form-control":!0,"invalid-number":!b,open:Pe},this.props.inputClass,!0)),ie=U()({"selected-flag":!0,open:Pe}),Ce=U()(a({"flag-dropdown":!0,"invalid-number":!b,open:Pe},this.props.buttonClass,!0)),ee="flag ".concat(we&&we.iso2);return f.a.createElement("div",{className:"".concat(he," ").concat(this.props.className),style:this.props.style||this.props.containerStyle,onKeyDown:this.handleKeydown},oe&&f.a.createElement("div",{className:"special-label"},oe),fe&&f.a.createElement("div",{className:"invalid-number-message"},fe),f.a.createElement("input",Object.assign({className:q,style:this.props.inputStyle,onChange:this.handleInput,onClick:this.handleInputClick,onDoubleClick:this.handleDoubleClick,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,onCopy:this.handleInputCopy,value:X,onKeyDown:this.handleInputKeyDown,placeholder:this.props.placeholder,disabled:this.props.disabled,type:"tel"},this.props.inputProps,{ref:function(ne){de.numberInputRef=ne,typeof de.props.inputProps.ref=="function"?de.props.inputProps.ref(ne):typeof de.props.inputProps.ref=="object"&&(de.props.inputProps.ref.current=ne)}})),f.a.createElement("div",{className:Ce,style:this.props.buttonStyle,ref:function(ne){return de.dropdownContainerRef=ne}},V?f.a.createElement("div",{className:ie},V):f.a.createElement("div",{onClick:G?void 0:this.handleFlagDropdownClick,className:ie,title:we?"".concat(we.localName||we.name,": + ").concat(we.dialCode):"",tabIndex:G?"-1":"0",role:"button","aria-haspopup":"listbox","aria-expanded":!!Pe||void 0},f.a.createElement("div",{className:ee},!G&&f.a.createElement("div",{className:Ge}))),Pe&&this.getCountryDropdownList()))}}])&&u(L.prototype,ae),O}(f.a.Component);Ee.defaultProps={country:"",value:"",onlyCountries:[],preferredCountries:[],excludeCountries:[],placeholder:"1 (702) 123-4567",searchPlaceholder:"search",searchNotFound:"No entries to show",flagsImagePath:"./flags.png",disabled:!1,containerStyle:{},inputStyle:{},buttonStyle:{},dropdownStyle:{},searchStyle:{},containerClass:"",inputClass:"",buttonClass:"",dropdownClass:"",searchClass:"",className:"",autoFormat:!0,enableAreaCodes:!1,enableTerritories:!1,disableCountryCode:!1,disableDropdown:!1,enableLongNumbers:!1,countryCodeEditable:!0,enableSearch:!1,disableSearchIcon:!1,disableInitialCountryGuess:!1,disableCountryGuess:!1,regions:"",inputProps:{},localization:{},masks:null,priority:null,areaCodes:null,preserveOrder:[],defaultMask:"... ... ... ... ..",alwaysDefaultMask:!1,prefix:"+",copyNumbersOnly:!0,renderStringAsFlag:"",autocompleteSearch:!1,jumpCursorToEnd:!0,enableAreaCodeStretch:!1,enableClickOutside:!0,showDropdown:!1,isValid:!0,defaultErrorMessage:"",specialLabel:"Phone",onEnterKeyPress:null,keys:{UP:38,DOWN:40,RIGHT:39,LEFT:37,ENTER:13,ESC:27,PLUS:43,A:65,Z:90,SPACE:32,TAB:9}},t.default=Ee}]);const mb=Ws(gb),Os=({value:e,onChange:t,error:r,onBlur:a,id:n,name:o,required:i,defaultCountry:l="us",className:s,responsive:u=!1,enableSearch:c=!0,autoComplete:d})=>{const h=(x,y)=>{t("+"+x,y.countryCode)};return m.jsxs("div",{className:s,children:[m.jsx("div",{className:Me("movmo-phone-input flex items-center px-3.5 py-0 h-10 rounded-lg border",u&&"movmo-phone-input-responsive",r?"border-error-500 focus:ring-error-500":"border-grayWarm-300 focus-within:ring-2 focus-within:ring-grayWarm-950"),children:m.jsx(mb,{country:l,value:e.replace("+",""),onChange:h,inputProps:{onBlur:a,required:i,id:n,name:o,...d&&{autoComplete:d}},enableSearch:c,autoFormat:!0})}),r&&m.jsx("p",{className:"text-error-500 text-xs mt-1",children:r})]})},Fs=({email:e,phone:t,otpLength:r,otpAction:a,onVerify:n,onClose:o,externalError:i,title:l,description:s})=>{const[u,c]=F.useState("".padStart(r,"")),[d,h]=F.useState(null),x=(f,v)=>{if(!/^\d*$/.test(f))return;const S=u.split("");if(S[v]=f.slice(-1),c(S.join("")),d&&h(null),f&&v<r-1){const w=document.getElementById(`otp-input-${v+1}`);w&&w.focus()}},y=f=>{f.preventDefault();const S=f.clipboardData.getData("text/plain").replace(/\D/g,"");if(S.length>0){const w=u.split("");for(let T=0;T<Math.min(S.length,r);T++)w[T]=S[T];c(w.join("")),d&&h(null);const E=w.findIndex(T=>T===""),A=E!==-1?E:r-1,M=document.getElementById(`otp-input-${A}`);M&&M.focus()}},C=f=>{const v=u.split("");if(v[f]="",c(v.join("")),f>0){const S=document.getElementById(`otp-input-${f-1}`);S&&S.focus()}};return F.useEffect(()=>{u.length===r&&!u.includes(" ")&&u.trim().length===r&&n(u)},[u,r,n]),F.useEffect(()=>{const f=v=>{v.key==="Escape"&&o()};return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[o]),m.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex justify-center items-center z-[110] px-4",children:m.jsxs($r,{className:"w-full max-w-[400px] rounded-lg",children:[m.jsx(Qr,{className:"p-4 border-b border-grayWarm-200",children:m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx("button",{onClick:o,className:"w-8 h-8 flex items-center justify-center bg-grayWarm-100 hover:bg-grayWarm-200 rounded-lg transition-colors","aria-label":"Close modal",children:m.jsx("svg",{className:"w-4 h-4 text-grayWarm-600",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),m.jsx("h2",{className:"text-xl md:text-lg font-bold text-center flex-1",children:l||"Verify Account"}),m.jsx("div",{className:"w-8"})]})}),m.jsxs(Kr,{className:"p-4 text-center",children:[m.jsxs("div",{className:"text-center mb-3",children:[m.jsx("p",{className:"text-sm md:text-md text-grayWarm-600",children:s||`Enter the ${r}-digit code we sent to`}),!s&&m.jsx("p",{className:"text-sm md:text-md text-grayWarm-600 mt-1",children:a===rt.OTPAction.EMAILED?e:t})]}),m.jsx("div",{className:"flex justify-center gap-1.5 sm:gap-2 mb-6",children:Array.from({length:r}).map((f,v)=>m.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",maxLength:1,className:"w-full max-w-10 h-16 border border-grayWarm-300 shadow-xs rounded-md text-center text-lg focus:outline-none focus:ring-2 focus:ring-grayWarm-950",value:u[v]||"",onChange:S=>x(S.target.value,v),onPaste:y,id:`otp-input-${v}`,"data-testid":`otp-input-${v}`,onKeyDown:S=>{S.key==="Backspace"&&C(v)}},v))}),(d||i)&&m.jsx("p",{className:"text-error-500 text-center text-sm mb-4",children:i||d})]})]})})},Ms=e=>/^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$/.test(e),vb={us:{dialCode:"1",lengths:[10]},ca:{dialCode:"1",lengths:[10]},gb:{dialCode:"44",lengths:[10]},au:{dialCode:"61",lengths:[9]},de:{dialCode:"49",lengths:[10,11]},fr:{dialCode:"33",lengths:[9]},it:{dialCode:"39",lengths:[9,10]},es:{dialCode:"34",lengths:[9]},jp:{dialCode:"81",lengths:[10,11]},kr:{dialCode:"82",lengths:[10,11]},in:{dialCode:"91",lengths:[10]},br:{dialCode:"55",lengths:[10,11]},mx:{dialCode:"52",lengths:[10]},cn:{dialCode:"86",lengths:[11]}};function Yr(e,t){if(!e||!e.startsWith("+"))return!1;const r=e.slice(1);if(!/^\d+$/.test(r))return!1;if(t){const a=vb[t.toLowerCase()];if(a){if(!r.startsWith(a.dialCode))return!1;const n=r.slice(a.dialCode.length);return a.lengths.includes(n.length)}}return r.length>=7&&r.length<=15}const hb=({isOpen:e,onClose:t,loginUser:r,verifyOTP:a,getCurrentUser:n,onLoginSuccess:o})=>{const[i,l]=F.useState(""),[s,u]=F.useState(null),[c,d]=F.useState(""),[h,x]=F.useState(null),[y,C]=F.useState(!1),[f,v]=F.useState(null),[S,w]=F.useState(6),[E,A]=F.useState(null),[M,T]=F.useState(!1),[B,Q]=F.useState(""),[U,ce]=F.useState(rt.OTPAction.EMAILED),[H,z]=F.useState("us"),N=O=>{const L=O.target.value;l(L),s&&u(null)},j=(O,L)=>{d(O),z(L),h&&x(null)},W=()=>{c&&!Yr(c,H)&&x("Please enter a valid phone number")},$=async()=>{let O=!1;if((!i||!Ms(i))&&(u("Please enter a valid email address"),O=!0),Yr(c,H)||(x("Please enter a valid phone number"),O=!0),!O){T(!0);try{const L=await r(i,c,rt.AuthenticationUsernameType.EMAIL);v(L.session),Q(L.username||i),L.challengeName&&(w(8),A(L.challengeName),ce(L.challengeName===rt.AuthenticationChallengeName.SMS_OTP?rt.OTPAction.TEXTED:rt.OTPAction.EMAILED)),C(!0),t()}catch(L){console.error("Error sending OTP:",L),u("An error occurred. Please try again.")}finally{T(!1)}}},te=async O=>{if(f)try{await a(B,O,f,E);const L=await n();o(L),C(!1),l(""),Q(""),v(null),w(6),ce(rt.OTPAction.EMAILED),A(null)}catch(L){console.error("Error verifying OTP:",L)}},Ee=()=>{C(!1),l(""),Q(""),d(""),x(null),v(null),w(6),ce(rt.OTPAction.EMAILED),A(null)},Z=()=>{u(null),x(null),y||(l(""),d("")),t()};return m.jsxs(m.Fragment,{children:[m.jsx(pr,{isOpen:e,onClose:Z,title:"Sign in to Movmo",maxWidthPx:398,children:m.jsxs("form",{onSubmit:O=>{O.preventDefault(),$()},className:"space-y-4",children:[m.jsxs("div",{children:[m.jsx(At,{id:"sign-in-email",type:"email",placeholder:"Email",required:!0,value:i,onChange:N,className:`w-full ${s?"border-error-500 focus:ring-error-500":""} autofill:bg-white autofill:shadow-[inset_0_0_0px_1000px_white]`,autoFocus:!0}),s&&m.jsx("p",{className:"text-error-500 text-xs mt-1",children:s})]}),m.jsx(Os,{value:c,onChange:j,onBlur:W,error:h,required:!0,id:"sign-in-phone",name:"sign-in-phone"}),m.jsx("button",{type:"submit",disabled:M,className:"w-full py-3 px-4 bg-gradient-to-r from-[#E91E63] to-[#E91E63] hover:from-[#D81B60] hover:to-[#D81B60] text-white font-semibold rounded-lg transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:M?"Loading...":"Continue"})]})}),y&&m.jsx(Fs,{email:i,phone:c,otpLength:S,otpAction:U,onVerify:te,onClose:Ee})]})};exports.Avatar=_i;exports.AvatarFallback=Zi;exports.AvatarImage=Xi;exports.Badge=Oi;exports.Button=Ao;exports.COUNTRY_OPTIONS=zr;exports.CURRENCY_OPTIONS=gr;exports.Card=$r;exports.CardContent=Kr;exports.CardDescription=Po;exports.CardFooter=Oo;exports.CardHeader=Qr;exports.CardTitle=To;exports.Checkbox=Pi;exports.Chip=vs;exports.CurrencyModal=bb;exports.DEFAULT_LOCALE=Ts;exports.DateDropdowns=Hr;exports.IconButton=Fi;exports.Input=At;exports.LOCALE_OPTIONS=br;exports.LOCALE_STORAGE_KEY=sb;exports.LocaleModal=db;exports.Modal=pr;exports.OTPModal=Fs;exports.Pagination=gs;exports.PassengerForm=rb;exports.PassengerFormSkeleton=ib;exports.PhoneInput=Os;exports.SearchInput=ms;exports.SelectDropdown=Cn;exports.Separator=No;exports.SignInModal=hb;exports.Textarea=bs;exports.Toggle=$i;exports.ToggleGroup=fs;exports.ToggleGroupItem=ps;exports.findCurrencyOption=pb;exports.findLocaleOption=lb;exports.getCurrencyDisplayText=Ps;exports.getLanguageDisplayName=ub;exports.validateEmail=Ms;exports.validatePhoneNumber=Yr;
|
|
115
115
|
//# sourceMappingURL=index.cjs.js.map
|