diff --git a/src/demo-compiled.js b/src/demo-compiled.js index 4d8ebce..5852540 100644 --- a/src/demo-compiled.js +++ b/src/demo-compiled.js @@ -3,16 +3,16 @@ Copyright The Closure Library Authors. SPDX-License-Identifier: Apache-2.0 */ -var aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};function ba(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;bc&&(c=Math.max(c+e,0));cb?1:ac&&(c=Math.max(c+f,0));cb?1:aa.length?!1:L(ab,a)}function ib(a){return L(Wa,a)?M(a,Pa):M(a,I)}function jb(a){var b=ib(a.toString());B(a);a.a(b)}function kb(a){return null!=a&&(1!=x(a,9)||-1!=v(a,9)[0])} -function M(a,b){for(var c=new A,d,e=a.length,f=0;f=e?c=b:(d=d.substring(0,e),d=M(d,I),0==d.length?c=b:(g=g.clone(),Da(g,4),d=[g],g=w(a,1),b=P(a),g in H?(c=R(c,g,S(g)),e=yb(d,b),null!=e&&(d=e.clone(),e=w(e,4),0b?2:f[f.length-1]=e&&e<=d;++e)if(c=parseInt(a.substring(0,e),10),c in H)return b.a(a.substring(e)),c;return 0} -function Ib(a,b,c,d,e,f){if(0==b.length)return 0;b=new A(b);var g;null!=c&&(g=r(c,11));null==g&&(g="NonMatch");var h=b.toString();if(0==h.length)g=20;else if(J.test(h))h=h.replace(J,""),B(b),b.a(ib(h)),g=1;else{h=new RegExp(g);jb(b);g=b.toString();if(0==g.search(h)){h=g.match(h)[0].length;var m=g.substring(h).match(Sa);m&&null!=m[1]&&0=b.b.length)throw Error("Phone number too short after IDD"); -a=Hb(b,d);if(0!=a)return u(f,1,a),a;throw Error("Invalid country calling code");}if(null!=c&&(g=w(c,10),h=""+g,m=b.toString(),0==m.lastIndexOf(h,0)&&(h=new A(m.substring(h.length)),m=r(c,1),m=new RegExp(w(m,2)),Jb(h,c,null),h=h.toString(),!L(m,b.toString())&&L(m,h)||3==V(a,b.toString(),c,-1))))return d.a(h),e&&u(f,6,10),u(f,1,g),g;u(f,1,0);return 0} -function Jb(a,b,c){var d=a.toString(),e=d.length,f=r(b,15);if(0!=e&&null!=f&&0!=f.length){var g=new RegExp("^(?:"+f+")");if(e=g.exec(d)){f=new RegExp(w(r(b,1),2));var h=L(f,d),m=e.length-1;b=r(b,16);if(null==b||0==b.length||null==e[m]||0==e[m].length){if(!h||L(f,d.substring(e[0].length)))null!=c&&0=b.length)f="";else{var g=b.indexOf(";",f);f=-1!==g?b.substring(f,g):b.substring(f)}var h=f;null==h?g=!0:0===h.length?g=!1:(g=Xa.exec(h),h=Ya.exec(h),g=null!==g||null!==h);if(!g)throw Error("The string supplied did not seem to be a phone number"); -null!=f?("+"===f.charAt(0)&&e.a(f),f=b.indexOf("tel:"),e.a(b.substring(0<=f?f+4:0,b.indexOf(";phone-context=")))):e.a(gb(null!=b?b:""));f=e.toString();g=f.indexOf(";isub=");0b.b.length)throw Error("The string supplied is too short to be a phone number");null!= -g&&(c=new A,e=new A(b.toString()),Jb(e,g,c),a=V(a,e.toString(),g,-1),2!=a&&4!=a&&5!=a&&(b=e,d&&0a)throw Error("The string supplied is too short to be a phone number");if(17a.length?!1:K(xb,a)}function Eb(a){return K(sb,a)?L(a,kb):L(a,ib)}function Fb(a){var b=Eb(a.toString());A(a);a.g(b)}function Gb(a){return null!=a&&(1!=w(a,9)||-1!=u(a,9)[0])}function L(a,b){for(var c=new z,d,f=a.length,e=0;eb?2:e[e.length-1]=f&&f<=d;++f)if(c=parseInt(a.substring(0,f),10),c in I)return b.g(a.substring(f)),c;return 0} +function tc(a,b,c,d,f,e){if(0==b.length)return 0;b=new z(b);var g;null!=c&&(g=q(c,11));null==g&&(g="NonMatch");var h=b.toString();if(0==h.length)g=20;else if(nb.test(h))h=h.replace(nb,""),A(b),b.g(Eb(h)),g=1;else{h=new RegExp(g);Fb(b);g=b.toString();if(0==g.search(h)){h=g.match(h)[0].length;var m=g.substring(h).match(ob);m&&null!=m[1]&&0=b.h.length)throw Error("Phone number too short after IDD"); +a=sc(b,d);if(0!=a)return t(e,1,a),a;throw Error("Invalid country calling code");}if(null!=c&&(g=v(c,10),h=""+g,m=b.toString(),0==m.lastIndexOf(h,0)&&(h=new z(m.substring(h.length)),m=q(c,1),m=new RegExp(v(m,2)),uc(h,c,null),h=h.toString(),!K(m,b.toString())&&K(m,h)||3==qc(a,b.toString(),c,-1))))return d.g(h),f&&t(e,6,10),t(e,1,g),g;t(e,1,0);return 0} +function uc(a,b,c){var d=a.toString(),f=d.length,e=q(b,15);if(0!=f&&null!=e&&0!=e.length){var g=new RegExp("^(?:"+e+")");if(f=g.exec(d)){e=new RegExp(v(q(b,1),2));var h=K(e,d),m=f.length-1;b=q(b,16);if(null==b||0==b.length||null==f[m]||0==f[m].length){if(!h||K(e,d.substring(f[0].length)))null!=c&&0=b.length)e="";else{var g=b.indexOf(";",e);e=-1!==g?b.substring(e,g):b.substring(e)}var h=e;null==h?g=!0:0===h.length?g=!1:(g=tb.exec(h),h=ub.exec(h),g=null!==g||null!==h);if(!g)throw Error("The string supplied did not seem to be a phone number"); +null!=e?("+"===e.charAt(0)&&f.g(e),e=b.indexOf("tel:"),f.g(b.substring(0<=e?e+4:0,b.indexOf(";phone-context=")))):(e=f.g,g=null!=b?b:"",h=g.search(pb),0<=h?(g=g.substring(h),g=g.replace(rb,""),h=g.search(qb),0<=h&&(g=g.substring(0,h))):g="",e.call(f,g));e=f.toString();g=e.indexOf(";isub=");0b.h.length)throw Error("The string supplied is too short to be a phone number");null!=g&&(c=new z,f=new z(b.toString()),uc(f,g,c),a=qc(a,f.toString(),g,-1),2!=a&&4!=a&&5!=a&&(b=f,d&&0a)throw Error("The string supplied is too short to be a phone number");if(17=fc)B=ma;else if(Z=Z.substring(0,fc),Z=L(Z,ib),0==Z.length)B=ma;else{var gc=Ua.clone();Qa(gc,4);ka=[gc];var Aa=v(e,1),Ba=N(e);if(Aa in I){var hc=O(r,Aa,P(Aa)),Va=Qb(ka,Ba);if(null==Va)var ic=Ba;else{var Wa=Va.clone(), +Ca=v(Va,4);if(0