diff --git a/dist/vue-tel-input.esm.js b/dist/vue-tel-input.esm.js index c87380ec..bca1e5db 100644 --- a/dist/vue-tel-input.esm.js +++ b/dist/vue-tel-input.esm.js @@ -1,5 +1,3 @@ -import { AsYouType, formatNumber, isValidNumber, parsePhoneNumberFromString } from 'libphonenumber-js'; - var _isObject = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; @@ -22,6 +20,10 @@ var _descriptors = !_fails(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); +function unwrapExports (x) { + return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x; +} + function createCommonjsModule(fn, module) { return module = { exports: {} }, fn(module, module.exports), module.exports; } @@ -1748,6 +1750,495 @@ if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) { _redefine(_global, NUMBER, $Number); } +var lib = createCommonjsModule(function (module, exports) { +(function(){var h,aa=this;function l(a){return "string"==typeof a}function m(a,b){a=a.split(".");var c=aa;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b;} +function n(a,b){function c(){}c.prototype=b.prototype;a.xa=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Da=function(a,c,f){for(var d=Array(arguments.length-2),e=2;ec?Math.max(0,a.length+c):c;if(l(a))return l(b)&&1==b.length?a.indexOf(b,c):-1;for(;cb?1:aa.length?!1:N(La,a)}function Qa(a){return N(Ja,a)?Ra(a,Ca):Ra(a,Ba)}function Sa(a){var b=Qa(a.toString());r(a);a.a(b);}function Ta(){return ba(Object.keys(K),function(a){return isNaN(a)})}function Ua(){var a=ba(Object.keys(K),function(a){return !isNaN(a)});return ca(a,function(a){return parseInt(a,10)})} +function Va(){var a=Object.keys(J);return da(Ua(),ca(a,function(a){return parseInt(a,10)}))}function Wa(a){return null!=a&&(1!=B(a,9)||-1!=y(a,9)[0])}function Ra(a,b){for(var c=new q,d,e=a.length,f=0;fb?2:f[f.length-1]=e&&e<=d;++e)if(c=parseInt(a.substring(0,e),10),c in J)return b.a(a.substring(e)),c;return 0} +function lb(a,b,c,d,e){if(0==b.length)return 0;b=new q(b);var f;null!=c&&(f=w(c,11));null==f&&(f="NonMatch");var g=b.toString();if(0==g.length)f=20;else if(M.test(g))g=g.replace(M,""),r(b),b.a(Qa(g)),f=1;else{g=new RegExp(f);Sa(b);f=b.toString();if(0==f.search(g)){g=f.match(g)[0].length;var k=f.substring(g).match(Fa);k&&null!=k[1]&&0=b.b.length)throw Error("Phone number too short after IDD");a=kb(b, +d);if(0!=a)return x(e,1,a),a;throw Error("Invalid country calling code");}if(null!=c&&(f=A(c,10),g=""+f,k=b.toString(),0==k.lastIndexOf(g,0)&&(g=new q(k.substring(g.length)),k=w(c,1),k=new RegExp(A(k,2)),mb(g,c,null),g=g.toString(),!N(k,b.toString())&&N(k,g)||3==jb(a,b.toString(),c,-1))))return d.a(g),x(e,1,f),f;x(e,1,0);return 0} +function mb(a,b,c){var d=a.toString(),e=d.length,f=w(b,15);if(0!=e&&null!=f&&0!=f.length){var g=new RegExp("^(?:"+f+")");if(e=g.exec(d)){f=new RegExp(A(w(b,1),2));var k=N(f,d),p=e.length-1;b=w(b,16);if(null==b||0==b.length||null==e[p]||0==e[p].length){if(!k||N(f,d.substring(e[0].length)))null!=c&&0e.b.length)throw Error("The string supplied is too short to be a phone number");null!=f&&(c=new q(e.toString()),mb(c,f,new q),a=jb(a,c.toString(),f,-1),2!=a&&4!=a&&5!=a&&(e=c));a=e.toString();c=a.length;if(2>c)throw Error("The string supplied is too short to be a phone number");if(17d;++d){c=void 0;if(a.length\n \n \n
\n +{{ activeCountry.dialCode }}\n \n {{ open ? \"▲\" : \"▼\" }}\n \n \n
    \n \n
    \n {{ pb.name }}\n +{{ pb.dialCode }}\n \n
\n
\n \n \n\n\n\n\n\n\n"] + "sourcesContent": ["\n\n\n\n\n\n"] }, media: undefined }); @@ -2635,7 +3120,7 @@ var __vue_inject_styles__ = function __vue_inject_styles__(inject) { /* scoped */ -var __vue_scope_id__ = "data-v-48307be2"; +var __vue_scope_id__ = "data-v-fa23bda4"; /* module identifier */ var __vue_module_identifier__ = undefined; diff --git a/dist/vue-tel-input.min.js b/dist/vue-tel-input.min.js index d1902899..125de4c8 100644 --- a/dist/vue-tel-input.min.js +++ b/dist/vue-tel-input.min.js @@ -1 +1 @@ -var VueTelInput=function(n){"use strict";var t=function(n){return"object"==typeof n?null!==n:"function"==typeof n},e=function(n){if(!t(n))throw TypeError(n+" is not an object!");return n},i=function(n){try{return!!n()}catch(n){return!0}},r=!i(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a});function d(n,t){return n(t={exports:{}},t.exports),t.exports}var o=d(function(n){var t=n.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)}),a=o.document,s=t(a)&&t(a.createElement),u=function(n){return s?a.createElement(n):{}},f=!r&&!i(function(){return 7!=Object.defineProperty(u("div"),"a",{get:function(){return 7}}).a}),l=function(n,e){if(!t(n))return n;var i,r;if(e&&"function"==typeof(i=n.toString)&&!t(r=i.call(n)))return r;if("function"==typeof(i=n.valueOf)&&!t(r=i.call(n)))return r;if(!e&&"function"==typeof(i=n.toString)&&!t(r=i.call(n)))return r;throw TypeError("Can't convert object to primitive value")},p=Object.defineProperty,c={f:r?Object.defineProperty:function(n,t,i){if(e(n),t=l(t,!0),e(i),f)try{return p(n,t,i)}catch(n){}if("get"in i||"set"in i)throw TypeError("Accessors not supported!");return"value"in i&&(n[t]=i.value),n}},h=c.f,v=Function.prototype,g=/^\s*function ([^ (]*)/;"name"in v||r&&h(v,"name",{configurable:!0,get:function(){try{return(""+this).match(g)[1]}catch(n){return""}}});var y=d(function(n){var t=n.exports={version:"2.6.9"};"number"==typeof __e&&(__e=t)}),x=(y.version,function(n,t){return{enumerable:!(1&n),configurable:!(2&n),writable:!(4&n),value:t}}),b=r?function(n,t,e){return c.f(n,t,x(1,e))}:function(n,t,e){return n[t]=e,n},m={}.hasOwnProperty,$=function(n,t){return m.call(n,t)},A=0,k=Math.random(),C=function(n){return"Symbol(".concat(void 0===n?"":n,")_",(++A+k).toString(36))},P=d(function(n){var t=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(n.exports=function(n,e){return t[n]||(t[n]=void 0!==e?e:{})})("versions",[]).push({version:y.version,mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),w=P("native-function-to-string",Function.toString),L=d(function(n){var t=C("src"),e=(""+w).split("toString");y.inspectSource=function(n){return w.call(n)},(n.exports=function(n,i,r,d){var a="function"==typeof r;a&&($(r,"name")||b(r,"name",i)),n[i]!==r&&(a&&($(r,t)||b(r,t,n[i]?""+n[i]:e.join(String(i)))),n===o?n[i]=r:d?n[i]?n[i]=r:b(n,i,r):(delete n[i],b(n,i,r)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[t]||w.call(this)})}),X=function(n,t,e){if(function(n){if("function"!=typeof n)throw TypeError(n+" is not a function!")}(n),void 0===t)return n;switch(e){case 1:return function(e){return n.call(t,e)};case 2:return function(e,i){return n.call(t,e,i)};case 3:return function(e,i,r){return n.call(t,e,i,r)}}return function(){return n.apply(t,arguments)}},T=function(n,t,e){var i,r,d,a,s=n&T.F,u=n&T.G,f=n&T.S,l=n&T.P,p=n&T.B,c=u?o:f?o[t]||(o[t]={}):(o[t]||{}).prototype,h=u?y:y[t]||(y[t]={}),v=h.prototype||(h.prototype={});for(i in u&&(e=t),e)d=((r=!s&&c&&void 0!==c[i])?c:e)[i],a=p&&r?X(d,o):l&&"function"==typeof d?X(Function.call,d):d,c&&L(c,i,d,n&T.U),h[i]!=d&&b(h,i,a),l&&v[i]!=d&&(v[i]=d)};o.core=y,T.F=1,T.G=2,T.S=4,T.P=8,T.B=16,T.W=32,T.U=64,T.R=128;var N=T,I={}.toString,S=function(n){return I.call(n).slice(8,-1)},R=Object("z").propertyIsEnumerable(0)?Object:function(n){return"String"==S(n)?n.split(""):Object(n)},E=function(n){if(null==n)throw TypeError("Can't call method on "+n);return n},O=function(n){return R(E(n))},F=Math.ceil,V=Math.floor,z=function(n){return isNaN(n=+n)?0:(n>0?V:F)(n)},j=Math.min,M=function(n){return n>0?j(z(n),9007199254740991):0},D=Math.max,B=Math.min,U=function(n){return function(t,e,i){var r,d=O(t),o=M(d.length),a=function(n,t){return(n=z(n))<0?D(n+t,0):B(n,t)}(i,o);if(n&&e!=e){for(;o>a;)if((r=d[a++])!=r)return!0}else for(;o>a;a++)if((n||a in d)&&d[a]===e)return n||a||0;return!n&&-1}},H=P("keys"),K=function(n){return H[n]||(H[n]=C(n))},q=U(!1),G=K("IE_PROTO"),J=function(n,t){var e,i=O(n),r=0,d=[];for(e in i)e!=G&&$(i,e)&&d.push(e);for(;t.length>r;)$(i,e=t[r++])&&(~q(d,e)||d.push(e));return d},W="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),Z=W.concat("length","prototype"),Y={f:Object.getOwnPropertyNames||function(n){return J(n,Z)}},Q={f:Object.getOwnPropertySymbols},_=o.Reflect,nn=_&&_.ownKeys||function(n){var t=Y.f(e(n)),i=Q.f;return i?t.concat(i(n)):t},tn={f:{}.propertyIsEnumerable},en=Object.getOwnPropertyDescriptor,rn={f:r?en:function(n,t){if(n=O(n),t=l(t,!0),f)try{return en(n,t)}catch(n){}if($(n,t))return x(!tn.f.call(n,t),n[t])}},dn=function(n,t,e){t in n?c.f(n,t,x(0,e)):n[t]=e};N(N.S,"Object",{getOwnPropertyDescriptors:function(n){for(var t,e,i=O(n),r=rn.f,d=nn(i),o={},a=0;d.length>a;)void 0!==(e=r(i,t=d[a++]))&&dn(o,t,e);return o}});var on=d(function(n){var t=P("wks"),e=o.Symbol,i="function"==typeof e;(n.exports=function(n){return t[n]||(t[n]=i&&e[n]||(i?e:C)("Symbol."+n))}).store=t}),an=on("unscopables"),sn=Array.prototype;null==sn[an]&&b(sn,an,{});var un=function(n){sn[an][n]=!0},fn=function(n,t){return{value:t,done:!!n}},ln={},pn=Object.keys||function(n){return J(n,W)},cn=r?Object.defineProperties:function(n,t){e(n);for(var i,r=pn(t),d=r.length,o=0;d>o;)c.f(n,i=r[o++],t[i]);return n},hn=o.document,vn=hn&&hn.documentElement,gn=K("IE_PROTO"),yn=function(){},xn=function(){var n,t=u("iframe"),e=W.length;for(t.style.display="none",vn.appendChild(t),t.src="javascript:",(n=t.contentWindow.document).open(),n.write("\n"] + "sourcesContent": ["\n\n\n\n\n\n"] }, media: undefined }); @@ -7300,7 +3126,7 @@ /* scoped */ - var __vue_scope_id__ = "data-v-48307be2"; + var __vue_scope_id__ = "data-v-fa23bda4"; /* module identifier */ var __vue_module_identifier__ = undefined; diff --git a/package.json b/package.json index 4a1e60de..7b2e9235 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-tel-input", - "version": "3.0.0", + "version": "3.1.0", "description": "International Telephone Input with Vue", "author": "Steven Dao ", "license": "MIT",