cleavejs-rails 1.3.7
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.
- checksums.yaml +7 -0
- data/README.md +16 -0
- data/lib/cleavejs-rails.rb +7 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ac.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ad.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ae.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.af.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ag.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ai.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.al.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.am.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ao.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ar.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.as.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.at.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.au-cn.js +85 -0
- data/vendor/assets/javascripts/addons/cleave-phone.au.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.aw.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ax.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.az.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ba.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.bb.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.bd.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.be.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.bf.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.bg.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.bh.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.bi.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.bj.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.bl.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.bm.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.bn.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.bo.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.bq.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.br.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.bs.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.bt.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.bw.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.by.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.bz.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ca.js +111 -0
- data/vendor/assets/javascripts/addons/cleave-phone.cc.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.cd.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.cf.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.cg.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ch.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ci.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ck.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.cl.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.cm.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.cn.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.co.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.cr.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.cu.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.cv.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.cw.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.cx.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.cy.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.cz.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.de.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.dj.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.dk.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.dm.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.do.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.dz.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ec.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ee.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.eg.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.eh.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.er.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.es.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.et.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.fi.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.fj.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.fk.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.fm.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.fo.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.fr.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ga.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.gb.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.gd.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ge.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.gf.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.gg.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.gh.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.gi.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.gl.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.gm.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.gn.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.gp.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.gq.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.gr.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.gt.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.gu.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.gw.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.gy.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.hk.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.hn.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.hr.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ht.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.hu.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.i18n.js +58 -0
- data/vendor/assets/javascripts/addons/cleave-phone.id.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ie.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.il.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.im.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.in.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.io.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.iq.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ir.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.is.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.it.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.je.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.jm.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.jo.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.jp.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ke.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.kg.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.kh.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ki.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.km.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.kn.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.kp.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.kr.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.kw.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ky.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.kz.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.la.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.lb.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.lc.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.li.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.lk.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.lr.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ls.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.lt.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.lu.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.lv.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ly.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ma.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.mc.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.md.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.me.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.mf.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.mg.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.mh.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.mk.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ml.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.mm.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.mn.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.mo.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.mp.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.mq.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.mr.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ms.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.mt.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.mu.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.mv.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.mw.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.mx.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.my.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.mz.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.na.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.nc.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ne.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.nf.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ng.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ni.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.nl.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.no.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.np.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.nr.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.nu.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.nz.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.om.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.pa.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.pe.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.pf.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.pg.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ph.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.pk.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.pl.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.pm.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.pr.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ps.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.pt.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.pw.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.py.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.qa.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.re.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ro.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.rs.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ru.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.rw.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.sa.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.sb.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.sc.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.sd.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.se.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.sg.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.sh.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.si.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.sj.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.sk.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.sl.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.sm.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.sn.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.so.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.sr.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ss.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.st.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.sv.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.sx.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.sy.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.sz.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ta.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.tc.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.td.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.tg.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.th.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.tj.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.tk.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.tl.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.tm.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.tn.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.to.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.tr.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.tt.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.tv.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.tw.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.tz.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ua.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ug.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.us.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.uy.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.uz.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.va.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.vc.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ve.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.vg.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.vi.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.vn.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.vu.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.wf.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ws.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.ye.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.yt.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.za.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.zm.js +51 -0
- data/vendor/assets/javascripts/addons/cleave-phone.zw.js +51 -0
- data/vendor/assets/javascripts/cleave-angular.js +1292 -0
- data/vendor/assets/javascripts/cleave-angular.min.js +8 -0
- data/vendor/assets/javascripts/cleave-react-node.js +2443 -0
- data/vendor/assets/javascripts/cleave-react-node.min.js +8 -0
- data/vendor/assets/javascripts/cleave-react.js +2638 -0
- data/vendor/assets/javascripts/cleave-react.min.js +8 -0
- data/vendor/assets/javascripts/cleave.js +1235 -0
- data/vendor/assets/javascripts/cleave.min.js +8 -0
- metadata +343 -0
@@ -0,0 +1,51 @@
|
|
1
|
+
!function(){function t(t,n){var e=t.split("."),r=T;e[0]in r||!r.execScript||r.execScript("var "+e[0]);for(var i;e.length&&(i=e.shift());)e.length||void 0===n?r=r[i]?r[i]:r[i]={}:r[i]=n}function n(t,n){function e(){}e.prototype=n.prototype,t.M=n.prototype,t.prototype=new e,t.prototype.constructor=t,t.N=function(t,e,r){for(var i=Array(arguments.length-2),a=2;a<arguments.length;a++)i[a-2]=arguments[a];return n.prototype[e].apply(t,i)}}function e(t,n){null!=t&&this.a.apply(this,arguments)}function r(t){t.b=""}function i(t,n){t.sort(n||a)}function a(t,n){return t>n?1:n>t?-1:0}function l(t){var n,e=[],r=0;for(n in t)e[r++]=t[n];return e}function o(t,n){this.b=t,this.a={};for(var e=0;e<n.length;e++){var r=n[e];this.a[r.b]=r}}function u(t){return t=l(t.a),i(t,function(t,n){return t.b-n.b}),t}function s(t,n){switch(this.b=t,this.g=!!n.G,this.a=n.c,this.j=n.type,this.h=!1,this.a){case Y:case k:case J:case K:case L:case W:case U:this.h=!0}this.f=n.defaultValue}function f(){this.a={},this.f=this.i().a,this.b=this.g=null}function c(t,n){for(var e=u(t.i()),r=0;r<e.length;r++){var i=e[r],a=i.b;if(null!=n.a[a]){t.b&&delete t.b[i.b];var l=11==i.a||10==i.a;if(i.g)for(var i=p(n,a)||[],o=0;o<i.length;o++){var s=t,f=a,h=l?i[o].clone():i[o];s.a[f]||(s.a[f]=[]),s.a[f].push(h),s.b&&delete s.b[f]}else i=p(n,a),l?(l=p(t,a))?c(l,i):m(t,a,i.clone()):m(t,a,i)}}}function p(t,n){var e=t.a[n];if(null==e)return null;if(t.g){if(!(n in t.b)){var r=t.g,i=t.f[n];if(null!=e)if(i.g){for(var a=[],l=0;l<e.length;l++)a[l]=r.b(i,e[l]);e=a}else e=r.b(i,e);return t.b[n]=e}return t.b[n]}return e}function h(t,n,e){var r=p(t,n);return t.f[n].g?r[e||0]:r}function g(t,n){var e;if(null!=t.a[n])e=h(t,n,void 0);else t:{if(e=t.f[n],void 0===e.f){var r=e.j;if(r===Boolean)e.f=!1;else if(r===Number)e.f=0;else{if(r!==String){e=new r;break t}e.f=e.h?"0":""}}e=e.f}return e}function b(t,n){return t.f[n].g?null!=t.a[n]?t.a[n].length:0:null!=t.a[n]?1:0}function m(t,n,e){t.a[n]=e,t.b&&(t.b[n]=e)}function y(t,n){var e,r=[];for(e in n)0!=e&&r.push(new s(e,n[e]));return new o(t,r)}/*
|
2
|
+
|
3
|
+
Protocol Buffer 2 Copyright 2008 Google Inc.
|
4
|
+
All other code copyright its respective owners.
|
5
|
+
Copyright (C) 2010 The Libphonenumber Authors
|
6
|
+
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
you may not use this file except in compliance with the License.
|
9
|
+
You may obtain a copy of the License at
|
10
|
+
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
See the License for the specific language governing permissions and
|
17
|
+
limitations under the License.
|
18
|
+
*/
|
19
|
+
function v(){f.call(this)}function d(){f.call(this)}function _(){f.call(this)}function S(){}function w(){}function A(){}/*
|
20
|
+
|
21
|
+
Copyright (C) 2010 The Libphonenumber Authors.
|
22
|
+
|
23
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
24
|
+
you may not use this file except in compliance with the License.
|
25
|
+
You may obtain a copy of the License at
|
26
|
+
|
27
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
28
|
+
|
29
|
+
Unless required by applicable law or agreed to in writing, software
|
30
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
31
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
32
|
+
See the License for the specific language governing permissions and
|
33
|
+
limitations under the License.
|
34
|
+
*/
|
35
|
+
function N(){this.a={}}function x(t,n){if(null==n)return null;n=n.toUpperCase();var e=t.a[n];if(null==e){if(e=tt[n],null==e)return null;e=(new A).a(_.i(),e),t.a[n]=e}return e}function j(t){return t=X[t],null==t?"ZZ":t[0]}function E(t){this.H=RegExp(" "),this.B="",this.m=new e,this.v="",this.h=new e,this.u=new e,this.j=!0,this.w=this.o=this.D=!1,this.F=N.b(),this.s=0,this.b=new e,this.A=!1,this.l="",this.a=new e,this.f=[],this.C=t,this.J=this.g=$(this,this.C)}function $(t,n){var e;if(null!=n&&isNaN(n)&&n.toUpperCase()in tt){if(e=x(t.F,n),null==e)throw"Invalid region code: "+n;e=g(e,10)}else e=0;return e=x(t.F,j(e)),null!=e?e:at}function R(t){for(var n=t.f.length,e=0;n>e;++e){var i=t.f[e],a=g(i,1);if(t.v==a)return!1;var l;l=t;var o=i,u=g(o,1);if(-1!=u.indexOf("|"))l=!1;else{u=u.replace(lt,"\\d"),u=u.replace(ot,"\\d"),r(l.m);var s;s=l;var o=g(o,2),f="999999999999999".match(u)[0];f.length<s.a.b.length?s="":(s=f.replace(new RegExp(u,"g"),o),s=s.replace(RegExp("9","g")," ")),0<s.length?(l.m.a(s),l=!0):l=!1}if(l)return t.v=a,t.A=st.test(h(i,4)),t.s=0,!0}return t.j=!1}function C(t,n){for(var e=[],r=n.length-3,i=t.f.length,a=0;i>a;++a){var l=t.f[a];0==b(l,3)?e.push(t.f[a]):(l=h(l,3,Math.min(r,b(l,3)-1)),0==n.search(l)&&e.push(t.f[a]))}t.f=e}function F(t,n){t.h.a(n);var e=n;if(rt.test(e)||1==t.h.b.length&&et.test(e)){var i,e=n;"+"==e?(i=e,t.u.a(e)):(i=nt[e],t.u.a(i),t.a.a(i)),n=i}else t.j=!1,t.D=!0;if(!t.j){if(!t.D)if(P(t)){if(V(t))return B(t)}else if(0<t.l.length&&(e=t.a.toString(),r(t.a),t.a.a(t.l),t.a.a(e),e=t.b.toString(),i=e.lastIndexOf(t.l),r(t.b),t.b.a(e.substring(0,i))),t.l!=H(t))return t.b.a(" "),B(t);return t.h.toString()}switch(t.u.b.length){case 0:case 1:case 2:return t.h.toString();case 3:if(!P(t))return t.l=H(t),M(t);t.w=!0;default:return t.w?(V(t)&&(t.w=!1),t.b.toString()+t.a.toString()):0<t.f.length?(e=q(t,n),i=I(t),0<i.length?i:(C(t,t.a.toString()),R(t)?G(t):t.j?D(t,e):t.h.toString())):M(t)}}function B(t){return t.j=!0,t.w=!1,t.f=[],t.s=0,r(t.m),t.v="",M(t)}function I(t){for(var n=t.a.toString(),e=t.f.length,r=0;e>r;++r){var i=t.f[r],a=g(i,1);if(new RegExp("^(?:"+a+")$").test(n))return t.A=st.test(h(i,4)),n=n.replace(new RegExp(a,"g"),h(i,2)),D(t,n)}return""}function D(t,n){var e=t.b.b.length;return t.A&&e>0&&" "!=t.b.toString().charAt(e-1)?t.b+" "+n:t.b+n}function M(t){var n=t.a.toString();if(3<=n.length){for(var e=t.o&&0<b(t.g,20)?p(t.g,20)||[]:p(t.g,19)||[],r=e.length,i=0;r>i;++i){var a,l=e[i];(a=null==t.g.a[12]||t.o||h(l,6))||(a=g(l,4),a=0==a.length||it.test(a)),a&&ut.test(g(l,2))&&t.f.push(l)}return C(t,n),n=I(t),0<n.length?n:R(t)?G(t):t.h.toString()}return D(t,n)}function G(t){var n=t.a.toString(),e=n.length;if(e>0){for(var r="",i=0;e>i;i++)r=q(t,n.charAt(i));return t.j?D(t,r):t.h.toString()}return t.b.toString()}function H(t){var n,e=t.a.toString(),i=0;return 1!=h(t.g,10)?n=!1:(n=t.a.toString(),n="1"==n.charAt(0)&&"0"!=n.charAt(1)&&"1"!=n.charAt(1)),n?(i=1,t.b.a("1").a(" "),t.o=!0):null!=t.g.a[15]&&(n=new RegExp("^(?:"+h(t.g,15)+")"),n=e.match(n),null!=n&&null!=n[0]&&0<n[0].length&&(t.o=!0,i=n[0].length,t.b.a(e.substring(0,i)))),r(t.a),t.a.a(e.substring(i)),e.substring(0,i)}function P(t){var n=t.u.toString(),e=new RegExp("^(?:\\+|"+h(t.g,11)+")"),e=n.match(e);return null!=e&&null!=e[0]&&0<e[0].length?(t.o=!0,e=e[0].length,r(t.a),t.a.a(n.substring(e)),r(t.b),t.b.a(n.substring(0,e)),"+"!=n.charAt(0)&&t.b.a(" "),!0):!1}function V(t){if(0==t.a.b.length)return!1;var n,i=new e;t:{if(n=t.a.toString(),0!=n.length&&"0"!=n.charAt(0))for(var a,l=n.length,o=1;3>=o&&l>=o;++o)if(a=parseInt(n.substring(0,o),10),a in X){i.a(n.substring(o)),n=a;break t}n=0}return 0==n?!1:(r(t.a),t.a.a(i.toString()),i=j(n),"001"==i?t.g=x(t.F,""+n):i!=t.C&&(t.g=$(t,i)),t.b.a(""+n).a(" "),t.l="",!0)}function q(t,n){var e=t.m.toString();if(0<=e.substring(t.s).search(t.H)){var i=e.search(t.H),e=e.replace(t.H,n);return r(t.m),t.m.a(e),t.s=i,e.substring(0,t.s+1)}return 1==t.f.length&&(t.j=!1),t.v="",t.h.toString()}var T=this;e.prototype.b="",e.prototype.set=function(t){this.b=""+t},e.prototype.a=function(t,n,e){if(this.b+=String(t),null!=n)for(var r=1;r<arguments.length;r++)this.b+=arguments[r];return this},e.prototype.toString=function(){return this.b};var U=1,W=2,Y=3,k=4,J=6,K=16,L=18;f.prototype.set=function(t,n){m(this,t.b,n)},f.prototype.clone=function(){var t=new this.constructor;return t!=this&&(t.a={},t.b&&(t.b={}),c(t,this)),t};var O;n(v,f);var Z;n(d,f);var z;n(_,f),v.prototype.i=function(){return O||(O=y(v,{0:{name:"NumberFormat",I:"i18n.phonenumbers.NumberFormat"},1:{name:"pattern",required:!0,c:9,type:String},2:{name:"format",required:!0,c:9,type:String},3:{name:"leading_digits_pattern",G:!0,c:9,type:String},4:{name:"national_prefix_formatting_rule",c:9,type:String},6:{name:"national_prefix_optional_when_formatting",c:8,type:Boolean},5:{name:"domestic_carrier_code_formatting_rule",c:9,type:String}})),O},v.ctor=v,v.ctor.i=v.prototype.i,d.prototype.i=function(){return Z||(Z=y(d,{0:{name:"PhoneNumberDesc",I:"i18n.phonenumbers.PhoneNumberDesc"},2:{name:"national_number_pattern",c:9,type:String},3:{name:"possible_number_pattern",c:9,type:String},6:{name:"example_number",c:9,type:String},7:{name:"national_number_matcher_data",c:12,type:String},8:{name:"possible_number_matcher_data",c:12,type:String}})),Z},d.ctor=d,d.ctor.i=d.prototype.i,_.prototype.i=function(){return z||(z=y(_,{0:{name:"PhoneMetadata",I:"i18n.phonenumbers.PhoneMetadata"},1:{name:"general_desc",c:11,type:d},2:{name:"fixed_line",c:11,type:d},3:{name:"mobile",c:11,type:d},4:{name:"toll_free",c:11,type:d},5:{name:"premium_rate",c:11,type:d},6:{name:"shared_cost",c:11,type:d},7:{name:"personal_number",c:11,type:d},8:{name:"voip",c:11,type:d},21:{name:"pager",c:11,type:d},25:{name:"uan",c:11,type:d},27:{name:"emergency",c:11,type:d},28:{name:"voicemail",c:11,type:d},24:{name:"no_international_dialling",c:11,type:d},9:{name:"id",required:!0,c:9,type:String},10:{name:"country_code",c:5,type:Number},11:{name:"international_prefix",c:9,type:String},17:{name:"preferred_international_prefix",c:9,type:String},12:{name:"national_prefix",c:9,type:String},13:{name:"preferred_extn_prefix",c:9,type:String},15:{name:"national_prefix_for_parsing",c:9,type:String},16:{name:"national_prefix_transform_rule",c:9,type:String},18:{name:"same_mobile_and_fixed_line_pattern",c:8,defaultValue:!1,type:Boolean},19:{name:"number_format",G:!0,c:11,type:v},20:{name:"intl_number_format",G:!0,c:11,type:v},22:{name:"main_country_for_code",c:8,defaultValue:!1,type:Boolean},23:{name:"leading_digits",c:9,type:String},26:{name:"leading_zero_possible",c:8,defaultValue:!1,type:Boolean}})),z},_.ctor=_,_.ctor.i=_.prototype.i,S.prototype.a=function(t){throw new t.b,Error("Unimplemented")},S.prototype.b=function(t,n){if(11==t.a||10==t.a)return n instanceof f?n:this.a(t.j.prototype.i(),n);if(14==t.a){if("string"==typeof n&&Q.test(n)){var e=Number(n);if(e>0)return e}return n}if(!t.h)return n;if(e=t.j,e===String){if("number"==typeof n)return String(n)}else if(e===Number&&"string"==typeof n&&("Infinity"===n||"-Infinity"===n||"NaN"===n||Q.test(n)))return Number(n);return n};var Q=/^-?[0-9]+$/;n(w,S),w.prototype.a=function(t,n){var e=new t.b;return e.g=this,e.a=n,e.b={},e},n(A,w),A.prototype.b=function(t,n){return 8==t.a?!!n:S.prototype.b.apply(this,arguments)},A.prototype.a=function(t,n){return A.M.a.call(this,t,n)};/*
|
36
|
+
|
37
|
+
Copyright (C) 2010 The Libphonenumber Authors
|
38
|
+
|
39
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
40
|
+
you may not use this file except in compliance with the License.
|
41
|
+
You may obtain a copy of the License at
|
42
|
+
|
43
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
44
|
+
|
45
|
+
Unless required by applicable law or agreed to in writing, software
|
46
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
47
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
48
|
+
See the License for the specific language governing permissions and
|
49
|
+
limitations under the License.
|
50
|
+
*/
|
51
|
+
var X={685:["WS"]},tt={WS:[null,[null,null,"[2-8]\\d{4,6}","\\d{5,7}"],[null,null,"(?:[2-5]\\d|6[1-9]|84\\d{2})\\d{3}","\\d{5,7}",null,null,"22123"],[null,null,"(?:60|7[25-7]\\d)\\d{4}","\\d{6,7}",null,null,"601234"],[null,null,"800\\d{3}","\\d{6}",null,null,"800123"],[null,null,"NA","NA"],[null,null,"NA","NA"],[null,null,"NA","NA"],[null,null,"NA","NA"],"WS",685,"0",null,null,null,null,null,null,null,[[null,"(8\\d{2})(\\d{3,4})","$1 $2",["8"]],[null,"(7\\d)(\\d{5})","$1 $2",["7"]],[null,"(\\d{5})","$1",["[2-6]"]]],null,[null,null,"NA","NA"],null,null,[null,null,"NA","NA"],[null,null,"NA","NA"],null,null,[null,null,"NA","NA"]]};N.b=function(){return N.a?N.a:N.a=new N};var nt={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"},et=RegExp("[++]+"),rt=RegExp("([0-90-9٠-٩۰-۹])"),it=/^\(?\$1\)?$/,at=new _;m(at,11,"NA");var lt=/\[([^\[\]])*\]/g,ot=/\d(?=[^,}][^,}])/g,ut=RegExp("^[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*)+$"),st=/[- ]/;E.prototype.K=function(){this.B="",r(this.h),r(this.u),r(this.m),this.s=0,this.v="",r(this.b),this.l="",r(this.a),this.j=!0,this.w=this.o=this.D=!1,this.f=[],this.A=!1,this.g!=this.J&&(this.g=$(this,this.C))},E.prototype.L=function(t){return this.B=F(this,t)},t("Cleave.AsYouTypeFormatter",E),t("Cleave.AsYouTypeFormatter.prototype.inputDigit",E.prototype.L),t("Cleave.AsYouTypeFormatter.prototype.clear",E.prototype.K)}.call("object"==typeof global&&global?global:window);
|
@@ -0,0 +1,51 @@
|
|
1
|
+
!function(){function t(t,n){var e=t.split("."),r=q;e[0]in r||!r.execScript||r.execScript("var "+e[0]);for(var i;e.length&&(i=e.shift());)e.length||void 0===n?r=r[i]?r[i]:r[i]={}:r[i]=n}function n(t,n){function e(){}e.prototype=n.prototype,t.M=n.prototype,t.prototype=new e,t.prototype.constructor=t,t.N=function(t,e,r){for(var i=Array(arguments.length-2),a=2;a<arguments.length;a++)i[a-2]=arguments[a];return n.prototype[e].apply(t,i)}}function e(t,n){null!=t&&this.a.apply(this,arguments)}function r(t){t.b=""}function i(t,n){t.sort(n||a)}function a(t,n){return t>n?1:n>t?-1:0}function l(t){var n,e=[],r=0;for(n in t)e[r++]=t[n];return e}function o(t,n){this.b=t,this.a={};for(var e=0;e<n.length;e++){var r=n[e];this.a[r.b]=r}}function u(t){return t=l(t.a),i(t,function(t,n){return t.b-n.b}),t}function s(t,n){switch(this.b=t,this.g=!!n.G,this.a=n.c,this.j=n.type,this.h=!1,this.a){case k:case J:case K:case L:case O:case U:case T:this.h=!0}this.f=n.defaultValue}function f(){this.a={},this.f=this.i().a,this.b=this.g=null}function c(t,n){for(var e=u(t.i()),r=0;r<e.length;r++){var i=e[r],a=i.b;if(null!=n.a[a]){t.b&&delete t.b[i.b];var l=11==i.a||10==i.a;if(i.g)for(var i=p(n,a)||[],o=0;o<i.length;o++){var s=t,f=a,h=l?i[o].clone():i[o];s.a[f]||(s.a[f]=[]),s.a[f].push(h),s.b&&delete s.b[f]}else i=p(n,a),l?(l=p(t,a))?c(l,i):m(t,a,i.clone()):m(t,a,i)}}}function p(t,n){var e=t.a[n];if(null==e)return null;if(t.g){if(!(n in t.b)){var r=t.g,i=t.f[n];if(null!=e)if(i.g){for(var a=[],l=0;l<e.length;l++)a[l]=r.b(i,e[l]);e=a}else e=r.b(i,e);return t.b[n]=e}return t.b[n]}return e}function h(t,n,e){var r=p(t,n);return t.f[n].g?r[e||0]:r}function g(t,n){var e;if(null!=t.a[n])e=h(t,n,void 0);else t:{if(e=t.f[n],void 0===e.f){var r=e.j;if(r===Boolean)e.f=!1;else if(r===Number)e.f=0;else{if(r!==String){e=new r;break t}e.f=e.h?"0":""}}e=e.f}return e}function b(t,n){return t.f[n].g?null!=t.a[n]?t.a[n].length:0:null!=t.a[n]?1:0}function m(t,n,e){t.a[n]=e,t.b&&(t.b[n]=e)}function y(t,n){var e,r=[];for(e in n)0!=e&&r.push(new s(e,n[e]));return new o(t,r)}/*
|
2
|
+
|
3
|
+
Protocol Buffer 2 Copyright 2008 Google Inc.
|
4
|
+
All other code copyright its respective owners.
|
5
|
+
Copyright (C) 2010 The Libphonenumber Authors
|
6
|
+
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
you may not use this file except in compliance with the License.
|
9
|
+
You may obtain a copy of the License at
|
10
|
+
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
See the License for the specific language governing permissions and
|
17
|
+
limitations under the License.
|
18
|
+
*/
|
19
|
+
function v(){f.call(this)}function _(){f.call(this)}function d(){f.call(this)}function S(){}function A(){}function w(){}/*
|
20
|
+
|
21
|
+
Copyright (C) 2010 The Libphonenumber Authors.
|
22
|
+
|
23
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
24
|
+
you may not use this file except in compliance with the License.
|
25
|
+
You may obtain a copy of the License at
|
26
|
+
|
27
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
28
|
+
|
29
|
+
Unless required by applicable law or agreed to in writing, software
|
30
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
31
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
32
|
+
See the License for the specific language governing permissions and
|
33
|
+
limitations under the License.
|
34
|
+
*/
|
35
|
+
function N(){this.a={}}function x(t,n){if(null==n)return null;n=n.toUpperCase();var e=t.a[n];if(null==e){if(e=tt[n],null==e)return null;e=(new w).a(d.i(),e),t.a[n]=e}return e}function j(t){return t=X[t],null==t?"ZZ":t[0]}function E(t){this.H=RegExp(" "),this.B="",this.m=new e,this.v="",this.h=new e,this.u=new e,this.j=!0,this.w=this.o=this.D=!1,this.F=N.b(),this.s=0,this.b=new e,this.A=!1,this.l="",this.a=new e,this.f=[],this.C=t,this.J=this.g=$(this,this.C)}function $(t,n){var e;if(null!=n&&isNaN(n)&&n.toUpperCase()in tt){if(e=x(t.F,n),null==e)throw"Invalid region code: "+n;e=g(e,10)}else e=0;return e=x(t.F,j(e)),null!=e?e:at}function R(t){for(var n=t.f.length,e=0;n>e;++e){var i=t.f[e],a=g(i,1);if(t.v==a)return!1;var l;l=t;var o=i,u=g(o,1);if(-1!=u.indexOf("|"))l=!1;else{u=u.replace(lt,"\\d"),u=u.replace(ot,"\\d"),r(l.m);var s;s=l;var o=g(o,2),f="999999999999999".match(u)[0];f.length<s.a.b.length?s="":(s=f.replace(new RegExp(u,"g"),o),s=s.replace(RegExp("9","g")," ")),0<s.length?(l.m.a(s),l=!0):l=!1}if(l)return t.v=a,t.A=st.test(h(i,4)),t.s=0,!0}return t.j=!1}function C(t,n){for(var e=[],r=n.length-3,i=t.f.length,a=0;i>a;++a){var l=t.f[a];0==b(l,3)?e.push(t.f[a]):(l=h(l,3,Math.min(r,b(l,3)-1)),0==n.search(l)&&e.push(t.f[a]))}t.f=e}function F(t,n){t.h.a(n);var e=n;if(rt.test(e)||1==t.h.b.length&&et.test(e)){var i,e=n;"+"==e?(i=e,t.u.a(e)):(i=nt[e],t.u.a(i),t.a.a(i)),n=i}else t.j=!1,t.D=!0;if(!t.j){if(!t.D)if(H(t)){if(P(t))return B(t)}else if(0<t.l.length&&(e=t.a.toString(),r(t.a),t.a.a(t.l),t.a.a(e),e=t.b.toString(),i=e.lastIndexOf(t.l),r(t.b),t.b.a(e.substring(0,i))),t.l!=G(t))return t.b.a(" "),B(t);return t.h.toString()}switch(t.u.b.length){case 0:case 1:case 2:return t.h.toString();case 3:if(!H(t))return t.l=G(t),Y(t);t.w=!0;default:return t.w?(P(t)&&(t.w=!1),t.b.toString()+t.a.toString()):0<t.f.length?(e=V(t,n),i=I(t),0<i.length?i:(C(t,t.a.toString()),R(t)?M(t):t.j?D(t,e):t.h.toString())):Y(t)}}function B(t){return t.j=!0,t.w=!1,t.f=[],t.s=0,r(t.m),t.v="",Y(t)}function I(t){for(var n=t.a.toString(),e=t.f.length,r=0;e>r;++r){var i=t.f[r],a=g(i,1);if(new RegExp("^(?:"+a+")$").test(n))return t.A=st.test(h(i,4)),n=n.replace(new RegExp(a,"g"),h(i,2)),D(t,n)}return""}function D(t,n){var e=t.b.b.length;return t.A&&e>0&&" "!=t.b.toString().charAt(e-1)?t.b+" "+n:t.b+n}function Y(t){var n=t.a.toString();if(3<=n.length){for(var e=t.o&&0<b(t.g,20)?p(t.g,20)||[]:p(t.g,19)||[],r=e.length,i=0;r>i;++i){var a,l=e[i];(a=null==t.g.a[12]||t.o||h(l,6))||(a=g(l,4),a=0==a.length||it.test(a)),a&&ut.test(g(l,2))&&t.f.push(l)}return C(t,n),n=I(t),0<n.length?n:R(t)?M(t):t.h.toString()}return D(t,n)}function M(t){var n=t.a.toString(),e=n.length;if(e>0){for(var r="",i=0;e>i;i++)r=V(t,n.charAt(i));return t.j?D(t,r):t.h.toString()}return t.b.toString()}function G(t){var n,e=t.a.toString(),i=0;return 1!=h(t.g,10)?n=!1:(n=t.a.toString(),n="1"==n.charAt(0)&&"0"!=n.charAt(1)&&"1"!=n.charAt(1)),n?(i=1,t.b.a("1").a(" "),t.o=!0):null!=t.g.a[15]&&(n=new RegExp("^(?:"+h(t.g,15)+")"),n=e.match(n),null!=n&&null!=n[0]&&0<n[0].length&&(t.o=!0,i=n[0].length,t.b.a(e.substring(0,i)))),r(t.a),t.a.a(e.substring(i)),e.substring(0,i)}function H(t){var n=t.u.toString(),e=new RegExp("^(?:\\+|"+h(t.g,11)+")"),e=n.match(e);return null!=e&&null!=e[0]&&0<e[0].length?(t.o=!0,e=e[0].length,r(t.a),t.a.a(n.substring(e)),r(t.b),t.b.a(n.substring(0,e)),"+"!=n.charAt(0)&&t.b.a(" "),!0):!1}function P(t){if(0==t.a.b.length)return!1;var n,i=new e;t:{if(n=t.a.toString(),0!=n.length&&"0"!=n.charAt(0))for(var a,l=n.length,o=1;3>=o&&l>=o;++o)if(a=parseInt(n.substring(0,o),10),a in X){i.a(n.substring(o)),n=a;break t}n=0}return 0==n?!1:(r(t.a),t.a.a(i.toString()),i=j(n),"001"==i?t.g=x(t.F,""+n):i!=t.C&&(t.g=$(t,i)),t.b.a(""+n).a(" "),t.l="",!0)}function V(t,n){var e=t.m.toString();if(0<=e.substring(t.s).search(t.H)){var i=e.search(t.H),e=e.replace(t.H,n);return r(t.m),t.m.a(e),t.s=i,e.substring(0,t.s+1)}return 1==t.f.length&&(t.j=!1),t.v="",t.h.toString()}var q=this;e.prototype.b="",e.prototype.set=function(t){this.b=""+t},e.prototype.a=function(t,n,e){if(this.b+=String(t),null!=n)for(var r=1;r<arguments.length;r++)this.b+=arguments[r];return this},e.prototype.toString=function(){return this.b};var T=1,U=2,k=3,J=4,K=6,L=16,O=18;f.prototype.set=function(t,n){m(this,t.b,n)},f.prototype.clone=function(){var t=new this.constructor;return t!=this&&(t.a={},t.b&&(t.b={}),c(t,this)),t};var Z;n(v,f);var z;n(_,f);var Q;n(d,f),v.prototype.i=function(){return Z||(Z=y(v,{0:{name:"NumberFormat",I:"i18n.phonenumbers.NumberFormat"},1:{name:"pattern",required:!0,c:9,type:String},2:{name:"format",required:!0,c:9,type:String},3:{name:"leading_digits_pattern",G:!0,c:9,type:String},4:{name:"national_prefix_formatting_rule",c:9,type:String},6:{name:"national_prefix_optional_when_formatting",c:8,type:Boolean},5:{name:"domestic_carrier_code_formatting_rule",c:9,type:String}})),Z},v.ctor=v,v.ctor.i=v.prototype.i,_.prototype.i=function(){return z||(z=y(_,{0:{name:"PhoneNumberDesc",I:"i18n.phonenumbers.PhoneNumberDesc"},2:{name:"national_number_pattern",c:9,type:String},3:{name:"possible_number_pattern",c:9,type:String},6:{name:"example_number",c:9,type:String},7:{name:"national_number_matcher_data",c:12,type:String},8:{name:"possible_number_matcher_data",c:12,type:String}})),z},_.ctor=_,_.ctor.i=_.prototype.i,d.prototype.i=function(){return Q||(Q=y(d,{0:{name:"PhoneMetadata",I:"i18n.phonenumbers.PhoneMetadata"},1:{name:"general_desc",c:11,type:_},2:{name:"fixed_line",c:11,type:_},3:{name:"mobile",c:11,type:_},4:{name:"toll_free",c:11,type:_},5:{name:"premium_rate",c:11,type:_},6:{name:"shared_cost",c:11,type:_},7:{name:"personal_number",c:11,type:_},8:{name:"voip",c:11,type:_},21:{name:"pager",c:11,type:_},25:{name:"uan",c:11,type:_},27:{name:"emergency",c:11,type:_},28:{name:"voicemail",c:11,type:_},24:{name:"no_international_dialling",c:11,type:_},9:{name:"id",required:!0,c:9,type:String},10:{name:"country_code",c:5,type:Number},11:{name:"international_prefix",c:9,type:String},17:{name:"preferred_international_prefix",c:9,type:String},12:{name:"national_prefix",c:9,type:String},13:{name:"preferred_extn_prefix",c:9,type:String},15:{name:"national_prefix_for_parsing",c:9,type:String},16:{name:"national_prefix_transform_rule",c:9,type:String},18:{name:"same_mobile_and_fixed_line_pattern",c:8,defaultValue:!1,type:Boolean},19:{name:"number_format",G:!0,c:11,type:v},20:{name:"intl_number_format",G:!0,c:11,type:v},22:{name:"main_country_for_code",c:8,defaultValue:!1,type:Boolean},23:{name:"leading_digits",c:9,type:String},26:{name:"leading_zero_possible",c:8,defaultValue:!1,type:Boolean}})),Q},d.ctor=d,d.ctor.i=d.prototype.i,S.prototype.a=function(t){throw new t.b,Error("Unimplemented")},S.prototype.b=function(t,n){if(11==t.a||10==t.a)return n instanceof f?n:this.a(t.j.prototype.i(),n);if(14==t.a){if("string"==typeof n&&W.test(n)){var e=Number(n);if(e>0)return e}return n}if(!t.h)return n;if(e=t.j,e===String){if("number"==typeof n)return String(n)}else if(e===Number&&"string"==typeof n&&("Infinity"===n||"-Infinity"===n||"NaN"===n||W.test(n)))return Number(n);return n};var W=/^-?[0-9]+$/;n(A,S),A.prototype.a=function(t,n){var e=new t.b;return e.g=this,e.a=n,e.b={},e},n(w,A),w.prototype.b=function(t,n){return 8==t.a?!!n:S.prototype.b.apply(this,arguments)},w.prototype.a=function(t,n){return w.M.a.call(this,t,n)};/*
|
36
|
+
|
37
|
+
Copyright (C) 2010 The Libphonenumber Authors
|
38
|
+
|
39
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
40
|
+
you may not use this file except in compliance with the License.
|
41
|
+
You may obtain a copy of the License at
|
42
|
+
|
43
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
44
|
+
|
45
|
+
Unless required by applicable law or agreed to in writing, software
|
46
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
47
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
48
|
+
See the License for the specific language governing permissions and
|
49
|
+
limitations under the License.
|
50
|
+
*/
|
51
|
+
var X={967:["YE"]},tt={YE:[null,[null,null,"[1-7]\\d{6,8}","\\d{6,9}"],[null,null,"(?:1(?:7\\d|[2-68])|2[2-68]|3[2358]|4[2-58]|5[2-6]|6[3-58]|7[24-68])\\d{5}","\\d{6,8}",null,null,"1234567"],[null,null,"7[0137]\\d{7}","\\d{9}",null,null,"712345678"],[null,null,"NA","NA"],[null,null,"NA","NA"],[null,null,"NA","NA"],[null,null,"NA","NA"],[null,null,"NA","NA"],"YE",967,"00","0",null,null,"0",null,null,null,[[null,"([1-7])(\\d{3})(\\d{3,4})","$1 $2 $3",["[1-6]|7[24-68]"],"0$1"],[null,"(7\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["7[0137]"],"0$1"]],null,[null,null,"NA","NA"],null,null,[null,null,"NA","NA"],[null,null,"NA","NA"],null,null,[null,null,"NA","NA"]]};N.b=function(){return N.a?N.a:N.a=new N};var nt={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"},et=RegExp("[++]+"),rt=RegExp("([0-90-9٠-٩۰-۹])"),it=/^\(?\$1\)?$/,at=new d;m(at,11,"NA");var lt=/\[([^\[\]])*\]/g,ot=/\d(?=[^,}][^,}])/g,ut=RegExp("^[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*)+$"),st=/[- ]/;E.prototype.K=function(){this.B="",r(this.h),r(this.u),r(this.m),this.s=0,this.v="",r(this.b),this.l="",r(this.a),this.j=!0,this.w=this.o=this.D=!1,this.f=[],this.A=!1,this.g!=this.J&&(this.g=$(this,this.C))},E.prototype.L=function(t){return this.B=F(this,t)},t("Cleave.AsYouTypeFormatter",E),t("Cleave.AsYouTypeFormatter.prototype.inputDigit",E.prototype.L),t("Cleave.AsYouTypeFormatter.prototype.clear",E.prototype.K)}.call("object"==typeof global&&global?global:window);
|
@@ -0,0 +1,51 @@
|
|
1
|
+
!function(){function t(t,n){var e=t.split("."),r=V;e[0]in r||!r.execScript||r.execScript("var "+e[0]);for(var i;e.length&&(i=e.shift());)e.length||void 0===n?r=r[i]?r[i]:r[i]={}:r[i]=n}function n(t,n){function e(){}e.prototype=n.prototype,t.M=n.prototype,t.prototype=new e,t.prototype.constructor=t,t.N=function(t,e,r){for(var i=Array(arguments.length-2),a=2;a<arguments.length;a++)i[a-2]=arguments[a];return n.prototype[e].apply(t,i)}}function e(t,n){null!=t&&this.a.apply(this,arguments)}function r(t){t.b=""}function i(t,n){t.sort(n||a)}function a(t,n){return t>n?1:n>t?-1:0}function l(t){var n,e=[],r=0;for(n in t)e[r++]=t[n];return e}function o(t,n){this.b=t,this.a={};for(var e=0;e<n.length;e++){var r=n[e];this.a[r.b]=r}}function u(t){return t=l(t.a),i(t,function(t,n){return t.b-n.b}),t}function s(t,n){switch(this.b=t,this.g=!!n.G,this.a=n.c,this.j=n.type,this.h=!1,this.a){case k:case J:case K:case L:case O:case U:case q:this.h=!0}this.f=n.defaultValue}function f(){this.a={},this.f=this.i().a,this.b=this.g=null}function c(t,n){for(var e=u(t.i()),r=0;r<e.length;r++){var i=e[r],a=i.b;if(null!=n.a[a]){t.b&&delete t.b[i.b];var l=11==i.a||10==i.a;if(i.g)for(var i=p(n,a)||[],o=0;o<i.length;o++){var s=t,f=a,h=l?i[o].clone():i[o];s.a[f]||(s.a[f]=[]),s.a[f].push(h),s.b&&delete s.b[f]}else i=p(n,a),l?(l=p(t,a))?c(l,i):m(t,a,i.clone()):m(t,a,i)}}}function p(t,n){var e=t.a[n];if(null==e)return null;if(t.g){if(!(n in t.b)){var r=t.g,i=t.f[n];if(null!=e)if(i.g){for(var a=[],l=0;l<e.length;l++)a[l]=r.b(i,e[l]);e=a}else e=r.b(i,e);return t.b[n]=e}return t.b[n]}return e}function h(t,n,e){var r=p(t,n);return t.f[n].g?r[e||0]:r}function g(t,n){var e;if(null!=t.a[n])e=h(t,n,void 0);else t:{if(e=t.f[n],void 0===e.f){var r=e.j;if(r===Boolean)e.f=!1;else if(r===Number)e.f=0;else{if(r!==String){e=new r;break t}e.f=e.h?"0":""}}e=e.f}return e}function b(t,n){return t.f[n].g?null!=t.a[n]?t.a[n].length:0:null!=t.a[n]?1:0}function m(t,n,e){t.a[n]=e,t.b&&(t.b[n]=e)}function y(t,n){var e,r=[];for(e in n)0!=e&&r.push(new s(e,n[e]));return new o(t,r)}/*
|
2
|
+
|
3
|
+
Protocol Buffer 2 Copyright 2008 Google Inc.
|
4
|
+
All other code copyright its respective owners.
|
5
|
+
Copyright (C) 2010 The Libphonenumber Authors
|
6
|
+
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
you may not use this file except in compliance with the License.
|
9
|
+
You may obtain a copy of the License at
|
10
|
+
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
See the License for the specific language governing permissions and
|
17
|
+
limitations under the License.
|
18
|
+
*/
|
19
|
+
function v(){f.call(this)}function _(){f.call(this)}function d(){f.call(this)}function S(){}function w(){}function A(){}/*
|
20
|
+
|
21
|
+
Copyright (C) 2010 The Libphonenumber Authors.
|
22
|
+
|
23
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
24
|
+
you may not use this file except in compliance with the License.
|
25
|
+
You may obtain a copy of the License at
|
26
|
+
|
27
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
28
|
+
|
29
|
+
Unless required by applicable law or agreed to in writing, software
|
30
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
31
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
32
|
+
See the License for the specific language governing permissions and
|
33
|
+
limitations under the License.
|
34
|
+
*/
|
35
|
+
function N(){this.a={}}function x(t,n){if(null==n)return null;n=n.toUpperCase();var e=t.a[n];if(null==e){if(e=tt[n],null==e)return null;e=(new A).a(d.i(),e),t.a[n]=e}return e}function j(t){return t=X[t],null==t?"ZZ":t[0]}function E(t){this.H=RegExp(" "),this.B="",this.m=new e,this.v="",this.h=new e,this.u=new e,this.j=!0,this.w=this.o=this.D=!1,this.F=N.b(),this.s=0,this.b=new e,this.A=!1,this.l="",this.a=new e,this.f=[],this.C=t,this.J=this.g=R(this,this.C)}function R(t,n){var e;if(null!=n&&isNaN(n)&&n.toUpperCase()in tt){if(e=x(t.F,n),null==e)throw"Invalid region code: "+n;e=g(e,10)}else e=0;return e=x(t.F,j(e)),null!=e?e:at}function C(t){for(var n=t.f.length,e=0;n>e;++e){var i=t.f[e],a=g(i,1);if(t.v==a)return!1;var l;l=t;var o=i,u=g(o,1);if(-1!=u.indexOf("|"))l=!1;else{u=u.replace(lt,"\\d"),u=u.replace(ot,"\\d"),r(l.m);var s;s=l;var o=g(o,2),f="999999999999999".match(u)[0];f.length<s.a.b.length?s="":(s=f.replace(new RegExp(u,"g"),o),s=s.replace(RegExp("9","g")," ")),0<s.length?(l.m.a(s),l=!0):l=!1}if(l)return t.v=a,t.A=st.test(h(i,4)),t.s=0,!0}return t.j=!1}function F(t,n){for(var e=[],r=n.length-3,i=t.f.length,a=0;i>a;++a){var l=t.f[a];0==b(l,3)?e.push(t.f[a]):(l=h(l,3,Math.min(r,b(l,3)-1)),0==n.search(l)&&e.push(t.f[a]))}t.f=e}function B(t,n){t.h.a(n);var e=n;if(rt.test(e)||1==t.h.b.length&&et.test(e)){var i,e=n;"+"==e?(i=e,t.u.a(e)):(i=nt[e],t.u.a(i),t.a.a(i)),n=i}else t.j=!1,t.D=!0;if(!t.j){if(!t.D)if(G(t)){if(H(t))return I(t)}else if(0<t.l.length&&(e=t.a.toString(),r(t.a),t.a.a(t.l),t.a.a(e),e=t.b.toString(),i=e.lastIndexOf(t.l),r(t.b),t.b.a(e.substring(0,i))),t.l!=M(t))return t.b.a(" "),I(t);return t.h.toString()}switch(t.u.b.length){case 0:case 1:case 2:return t.h.toString();case 3:if(!G(t))return t.l=M(t),Y(t);t.w=!0;default:return t.w?(H(t)&&(t.w=!1),t.b.toString()+t.a.toString()):0<t.f.length?(e=P(t,n),i=D(t),0<i.length?i:(F(t,t.a.toString()),C(t)?$(t):t.j?T(t,e):t.h.toString())):Y(t)}}function I(t){return t.j=!0,t.w=!1,t.f=[],t.s=0,r(t.m),t.v="",Y(t)}function D(t){for(var n=t.a.toString(),e=t.f.length,r=0;e>r;++r){var i=t.f[r],a=g(i,1);if(new RegExp("^(?:"+a+")$").test(n))return t.A=st.test(h(i,4)),n=n.replace(new RegExp(a,"g"),h(i,2)),T(t,n)}return""}function T(t,n){var e=t.b.b.length;return t.A&&e>0&&" "!=t.b.toString().charAt(e-1)?t.b+" "+n:t.b+n}function Y(t){var n=t.a.toString();if(3<=n.length){for(var e=t.o&&0<b(t.g,20)?p(t.g,20)||[]:p(t.g,19)||[],r=e.length,i=0;r>i;++i){var a,l=e[i];(a=null==t.g.a[12]||t.o||h(l,6))||(a=g(l,4),a=0==a.length||it.test(a)),a&&ut.test(g(l,2))&&t.f.push(l)}return F(t,n),n=D(t),0<n.length?n:C(t)?$(t):t.h.toString()}return T(t,n)}function $(t){var n=t.a.toString(),e=n.length;if(e>0){for(var r="",i=0;e>i;i++)r=P(t,n.charAt(i));return t.j?T(t,r):t.h.toString()}return t.b.toString()}function M(t){var n,e=t.a.toString(),i=0;return 1!=h(t.g,10)?n=!1:(n=t.a.toString(),n="1"==n.charAt(0)&&"0"!=n.charAt(1)&&"1"!=n.charAt(1)),n?(i=1,t.b.a("1").a(" "),t.o=!0):null!=t.g.a[15]&&(n=new RegExp("^(?:"+h(t.g,15)+")"),n=e.match(n),null!=n&&null!=n[0]&&0<n[0].length&&(t.o=!0,i=n[0].length,t.b.a(e.substring(0,i)))),r(t.a),t.a.a(e.substring(i)),e.substring(0,i)}function G(t){var n=t.u.toString(),e=new RegExp("^(?:\\+|"+h(t.g,11)+")"),e=n.match(e);return null!=e&&null!=e[0]&&0<e[0].length?(t.o=!0,e=e[0].length,r(t.a),t.a.a(n.substring(e)),r(t.b),t.b.a(n.substring(0,e)),"+"!=n.charAt(0)&&t.b.a(" "),!0):!1}function H(t){if(0==t.a.b.length)return!1;var n,i=new e;t:{if(n=t.a.toString(),0!=n.length&&"0"!=n.charAt(0))for(var a,l=n.length,o=1;3>=o&&l>=o;++o)if(a=parseInt(n.substring(0,o),10),a in X){i.a(n.substring(o)),n=a;break t}n=0}return 0==n?!1:(r(t.a),t.a.a(i.toString()),i=j(n),"001"==i?t.g=x(t.F,""+n):i!=t.C&&(t.g=R(t,i)),t.b.a(""+n).a(" "),t.l="",!0)}function P(t,n){var e=t.m.toString();if(0<=e.substring(t.s).search(t.H)){var i=e.search(t.H),e=e.replace(t.H,n);return r(t.m),t.m.a(e),t.s=i,e.substring(0,t.s+1)}return 1==t.f.length&&(t.j=!1),t.v="",t.h.toString()}var V=this;e.prototype.b="",e.prototype.set=function(t){this.b=""+t},e.prototype.a=function(t,n,e){if(this.b+=String(t),null!=n)for(var r=1;r<arguments.length;r++)this.b+=arguments[r];return this},e.prototype.toString=function(){return this.b};var q=1,U=2,k=3,J=4,K=6,L=16,O=18;f.prototype.set=function(t,n){m(this,t.b,n)},f.prototype.clone=function(){var t=new this.constructor;return t!=this&&(t.a={},t.b&&(t.b={}),c(t,this)),t};var Z;n(v,f);var z;n(_,f);var Q;n(d,f),v.prototype.i=function(){return Z||(Z=y(v,{0:{name:"NumberFormat",I:"i18n.phonenumbers.NumberFormat"},1:{name:"pattern",required:!0,c:9,type:String},2:{name:"format",required:!0,c:9,type:String},3:{name:"leading_digits_pattern",G:!0,c:9,type:String},4:{name:"national_prefix_formatting_rule",c:9,type:String},6:{name:"national_prefix_optional_when_formatting",c:8,type:Boolean},5:{name:"domestic_carrier_code_formatting_rule",c:9,type:String}})),Z},v.ctor=v,v.ctor.i=v.prototype.i,_.prototype.i=function(){return z||(z=y(_,{0:{name:"PhoneNumberDesc",I:"i18n.phonenumbers.PhoneNumberDesc"},2:{name:"national_number_pattern",c:9,type:String},3:{name:"possible_number_pattern",c:9,type:String},6:{name:"example_number",c:9,type:String},7:{name:"national_number_matcher_data",c:12,type:String},8:{name:"possible_number_matcher_data",c:12,type:String}})),z},_.ctor=_,_.ctor.i=_.prototype.i,d.prototype.i=function(){return Q||(Q=y(d,{0:{name:"PhoneMetadata",I:"i18n.phonenumbers.PhoneMetadata"},1:{name:"general_desc",c:11,type:_},2:{name:"fixed_line",c:11,type:_},3:{name:"mobile",c:11,type:_},4:{name:"toll_free",c:11,type:_},5:{name:"premium_rate",c:11,type:_},6:{name:"shared_cost",c:11,type:_},7:{name:"personal_number",c:11,type:_},8:{name:"voip",c:11,type:_},21:{name:"pager",c:11,type:_},25:{name:"uan",c:11,type:_},27:{name:"emergency",c:11,type:_},28:{name:"voicemail",c:11,type:_},24:{name:"no_international_dialling",c:11,type:_},9:{name:"id",required:!0,c:9,type:String},10:{name:"country_code",c:5,type:Number},11:{name:"international_prefix",c:9,type:String},17:{name:"preferred_international_prefix",c:9,type:String},12:{name:"national_prefix",c:9,type:String},13:{name:"preferred_extn_prefix",c:9,type:String},15:{name:"national_prefix_for_parsing",c:9,type:String},16:{name:"national_prefix_transform_rule",c:9,type:String},18:{name:"same_mobile_and_fixed_line_pattern",c:8,defaultValue:!1,type:Boolean},19:{name:"number_format",G:!0,c:11,type:v},20:{name:"intl_number_format",G:!0,c:11,type:v},22:{name:"main_country_for_code",c:8,defaultValue:!1,type:Boolean},23:{name:"leading_digits",c:9,type:String},26:{name:"leading_zero_possible",c:8,defaultValue:!1,type:Boolean}})),Q},d.ctor=d,d.ctor.i=d.prototype.i,S.prototype.a=function(t){throw new t.b,Error("Unimplemented")},S.prototype.b=function(t,n){if(11==t.a||10==t.a)return n instanceof f?n:this.a(t.j.prototype.i(),n);if(14==t.a){if("string"==typeof n&&W.test(n)){var e=Number(n);if(e>0)return e}return n}if(!t.h)return n;if(e=t.j,e===String){if("number"==typeof n)return String(n)}else if(e===Number&&"string"==typeof n&&("Infinity"===n||"-Infinity"===n||"NaN"===n||W.test(n)))return Number(n);return n};var W=/^-?[0-9]+$/;n(w,S),w.prototype.a=function(t,n){var e=new t.b;return e.g=this,e.a=n,e.b={},e},n(A,w),A.prototype.b=function(t,n){return 8==t.a?!!n:S.prototype.b.apply(this,arguments)},A.prototype.a=function(t,n){return A.M.a.call(this,t,n)};/*
|
36
|
+
|
37
|
+
Copyright (C) 2010 The Libphonenumber Authors
|
38
|
+
|
39
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
40
|
+
you may not use this file except in compliance with the License.
|
41
|
+
You may obtain a copy of the License at
|
42
|
+
|
43
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
44
|
+
|
45
|
+
Unless required by applicable law or agreed to in writing, software
|
46
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
47
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
48
|
+
See the License for the specific language governing permissions and
|
49
|
+
limitations under the License.
|
50
|
+
*/
|
51
|
+
var X={262:["RE","YT"]},tt={YT:[null,[null,null,"[268]\\d{8}","\\d{9}"],[null,null,"269(?:6[0-4]|50)\\d{4}","\\d{9}",null,null,"269601234"],[null,null,"639\\d{6}","\\d{9}",null,null,"639123456"],[null,null,"80\\d{7}","\\d{9}",null,null,"801234567"],[null,null,"NA","NA"],[null,null,"NA","NA"],[null,null,"NA","NA"],[null,null,"NA","NA"],"YT",262,"00","0",null,null,"0",null,null,null,null,null,[null,null,"NA","NA"],null,"269|63",[null,null,"NA","NA"],[null,null,"NA","NA"],null,null,[null,null,"NA","NA"]]};N.b=function(){return N.a?N.a:N.a=new N};var nt={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"},et=RegExp("[++]+"),rt=RegExp("([0-90-9٠-٩۰-۹])"),it=/^\(?\$1\)?$/,at=new d;m(at,11,"NA");var lt=/\[([^\[\]])*\]/g,ot=/\d(?=[^,}][^,}])/g,ut=RegExp("^[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*)+$"),st=/[- ]/;E.prototype.K=function(){this.B="",r(this.h),r(this.u),r(this.m),this.s=0,this.v="",r(this.b),this.l="",r(this.a),this.j=!0,this.w=this.o=this.D=!1,this.f=[],this.A=!1,this.g!=this.J&&(this.g=R(this,this.C))},E.prototype.L=function(t){return this.B=B(this,t)},t("Cleave.AsYouTypeFormatter",E),t("Cleave.AsYouTypeFormatter.prototype.inputDigit",E.prototype.L),t("Cleave.AsYouTypeFormatter.prototype.clear",E.prototype.K)}.call("object"==typeof global&&global?global:window);
|
@@ -0,0 +1,51 @@
|
|
1
|
+
!function(){function t(t,n){var e=t.split("."),r=q;e[0]in r||!r.execScript||r.execScript("var "+e[0]);for(var i;e.length&&(i=e.shift());)e.length||void 0===n?r=r[i]?r[i]:r[i]={}:r[i]=n}function n(t,n){function e(){}e.prototype=n.prototype,t.M=n.prototype,t.prototype=new e,t.prototype.constructor=t,t.N=function(t,e,r){for(var i=Array(arguments.length-2),a=2;a<arguments.length;a++)i[a-2]=arguments[a];return n.prototype[e].apply(t,i)}}function e(t,n){null!=t&&this.a.apply(this,arguments)}function r(t){t.b=""}function i(t,n){t.sort(n||a)}function a(t,n){return t>n?1:n>t?-1:0}function l(t){var n,e=[],r=0;for(n in t)e[r++]=t[n];return e}function o(t,n){this.b=t,this.a={};for(var e=0;e<n.length;e++){var r=n[e];this.a[r.b]=r}}function u(t){return t=l(t.a),i(t,function(t,n){return t.b-n.b}),t}function s(t,n){switch(this.b=t,this.g=!!n.G,this.a=n.c,this.j=n.type,this.h=!1,this.a){case Y:case k:case J:case K:case L:case U:case T:this.h=!0}this.f=n.defaultValue}function f(){this.a={},this.f=this.i().a,this.b=this.g=null}function c(t,n){for(var e=u(t.i()),r=0;r<e.length;r++){var i=e[r],a=i.b;if(null!=n.a[a]){t.b&&delete t.b[i.b];var l=11==i.a||10==i.a;if(i.g)for(var i=p(n,a)||[],o=0;o<i.length;o++){var s=t,f=a,h=l?i[o].clone():i[o];s.a[f]||(s.a[f]=[]),s.a[f].push(h),s.b&&delete s.b[f]}else i=p(n,a),l?(l=p(t,a))?c(l,i):m(t,a,i.clone()):m(t,a,i)}}}function p(t,n){var e=t.a[n];if(null==e)return null;if(t.g){if(!(n in t.b)){var r=t.g,i=t.f[n];if(null!=e)if(i.g){for(var a=[],l=0;l<e.length;l++)a[l]=r.b(i,e[l]);e=a}else e=r.b(i,e);return t.b[n]=e}return t.b[n]}return e}function h(t,n,e){var r=p(t,n);return t.f[n].g?r[e||0]:r}function g(t,n){var e;if(null!=t.a[n])e=h(t,n,void 0);else t:{if(e=t.f[n],void 0===e.f){var r=e.j;if(r===Boolean)e.f=!1;else if(r===Number)e.f=0;else{if(r!==String){e=new r;break t}e.f=e.h?"0":""}}e=e.f}return e}function b(t,n){return t.f[n].g?null!=t.a[n]?t.a[n].length:0:null!=t.a[n]?1:0}function m(t,n,e){t.a[n]=e,t.b&&(t.b[n]=e)}function y(t,n){var e,r=[];for(e in n)0!=e&&r.push(new s(e,n[e]));return new o(t,r)}/*
|
2
|
+
|
3
|
+
Protocol Buffer 2 Copyright 2008 Google Inc.
|
4
|
+
All other code copyright its respective owners.
|
5
|
+
Copyright (C) 2010 The Libphonenumber Authors
|
6
|
+
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
you may not use this file except in compliance with the License.
|
9
|
+
You may obtain a copy of the License at
|
10
|
+
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
See the License for the specific language governing permissions and
|
17
|
+
limitations under the License.
|
18
|
+
*/
|
19
|
+
function d(){f.call(this)}function v(){f.call(this)}function _(){f.call(this)}function S(){}function w(){}function x(){}/*
|
20
|
+
|
21
|
+
Copyright (C) 2010 The Libphonenumber Authors.
|
22
|
+
|
23
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
24
|
+
you may not use this file except in compliance with the License.
|
25
|
+
You may obtain a copy of the License at
|
26
|
+
|
27
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
28
|
+
|
29
|
+
Unless required by applicable law or agreed to in writing, software
|
30
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
31
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
32
|
+
See the License for the specific language governing permissions and
|
33
|
+
limitations under the License.
|
34
|
+
*/
|
35
|
+
function A(){this.a={}}function N(t,n){if(null==n)return null;n=n.toUpperCase();var e=t.a[n];if(null==e){if(e=tt[n],null==e)return null;e=(new x).a(_.i(),e),t.a[n]=e}return e}function $(t){return t=X[t],null==t?"ZZ":t[0]}function j(t){this.H=RegExp(" "),this.B="",this.m=new e,this.v="",this.h=new e,this.u=new e,this.j=!0,this.w=this.o=this.D=!1,this.F=A.b(),this.s=0,this.b=new e,this.A=!1,this.l="",this.a=new e,this.f=[],this.C=t,this.J=this.g=E(this,this.C)}function E(t,n){var e;if(null!=n&&isNaN(n)&&n.toUpperCase()in tt){if(e=N(t.F,n),null==e)throw"Invalid region code: "+n;e=g(e,10)}else e=0;return e=N(t.F,$(e)),null!=e?e:at}function R(t){for(var n=t.f.length,e=0;n>e;++e){var i=t.f[e],a=g(i,1);if(t.v==a)return!1;var l;l=t;var o=i,u=g(o,1);if(-1!=u.indexOf("|"))l=!1;else{u=u.replace(lt,"\\d"),u=u.replace(ot,"\\d"),r(l.m);var s;s=l;var o=g(o,2),f="999999999999999".match(u)[0];f.length<s.a.b.length?s="":(s=f.replace(new RegExp(u,"g"),o),s=s.replace(RegExp("9","g")," ")),0<s.length?(l.m.a(s),l=!0):l=!1}if(l)return t.v=a,t.A=st.test(h(i,4)),t.s=0,!0}return t.j=!1}function C(t,n){for(var e=[],r=n.length-3,i=t.f.length,a=0;i>a;++a){var l=t.f[a];0==b(l,3)?e.push(t.f[a]):(l=h(l,3,Math.min(r,b(l,3)-1)),0==n.search(l)&&e.push(t.f[a]))}t.f=e}function F(t,n){t.h.a(n);var e=n;if(rt.test(e)||1==t.h.b.length&&et.test(e)){var i,e=n;"+"==e?(i=e,t.u.a(e)):(i=nt[e],t.u.a(i),t.a.a(i)),n=i}else t.j=!1,t.D=!0;if(!t.j){if(!t.D)if(H(t)){if(P(t))return B(t)}else if(0<t.l.length&&(e=t.a.toString(),r(t.a),t.a.a(t.l),t.a.a(e),e=t.b.toString(),i=e.lastIndexOf(t.l),r(t.b),t.b.a(e.substring(0,i))),t.l!=G(t))return t.b.a(" "),B(t);return t.h.toString()}switch(t.u.b.length){case 0:case 1:case 2:return t.h.toString();case 3:if(!H(t))return t.l=G(t),M(t);t.w=!0;default:return t.w?(P(t)&&(t.w=!1),t.b.toString()+t.a.toString()):0<t.f.length?(e=V(t,n),i=I(t),0<i.length?i:(C(t,t.a.toString()),R(t)?Z(t):t.j?D(t,e):t.h.toString())):M(t)}}function B(t){return t.j=!0,t.w=!1,t.f=[],t.s=0,r(t.m),t.v="",M(t)}function I(t){for(var n=t.a.toString(),e=t.f.length,r=0;e>r;++r){var i=t.f[r],a=g(i,1);if(new RegExp("^(?:"+a+")$").test(n))return t.A=st.test(h(i,4)),n=n.replace(new RegExp(a,"g"),h(i,2)),D(t,n)}return""}function D(t,n){var e=t.b.b.length;return t.A&&e>0&&" "!=t.b.toString().charAt(e-1)?t.b+" "+n:t.b+n}function M(t){var n=t.a.toString();if(3<=n.length){for(var e=t.o&&0<b(t.g,20)?p(t.g,20)||[]:p(t.g,19)||[],r=e.length,i=0;r>i;++i){var a,l=e[i];(a=null==t.g.a[12]||t.o||h(l,6))||(a=g(l,4),a=0==a.length||it.test(a)),a&&ut.test(g(l,2))&&t.f.push(l)}return C(t,n),n=I(t),0<n.length?n:R(t)?Z(t):t.h.toString()}return D(t,n)}function Z(t){var n=t.a.toString(),e=n.length;if(e>0){for(var r="",i=0;e>i;i++)r=V(t,n.charAt(i));return t.j?D(t,r):t.h.toString()}return t.b.toString()}function G(t){var n,e=t.a.toString(),i=0;return 1!=h(t.g,10)?n=!1:(n=t.a.toString(),n="1"==n.charAt(0)&&"0"!=n.charAt(1)&&"1"!=n.charAt(1)),n?(i=1,t.b.a("1").a(" "),t.o=!0):null!=t.g.a[15]&&(n=new RegExp("^(?:"+h(t.g,15)+")"),n=e.match(n),null!=n&&null!=n[0]&&0<n[0].length&&(t.o=!0,i=n[0].length,t.b.a(e.substring(0,i)))),r(t.a),t.a.a(e.substring(i)),e.substring(0,i)}function H(t){var n=t.u.toString(),e=new RegExp("^(?:\\+|"+h(t.g,11)+")"),e=n.match(e);return null!=e&&null!=e[0]&&0<e[0].length?(t.o=!0,e=e[0].length,r(t.a),t.a.a(n.substring(e)),r(t.b),t.b.a(n.substring(0,e)),"+"!=n.charAt(0)&&t.b.a(" "),!0):!1}function P(t){if(0==t.a.b.length)return!1;var n,i=new e;t:{if(n=t.a.toString(),0!=n.length&&"0"!=n.charAt(0))for(var a,l=n.length,o=1;3>=o&&l>=o;++o)if(a=parseInt(n.substring(0,o),10),a in X){i.a(n.substring(o)),n=a;break t}n=0}return 0==n?!1:(r(t.a),t.a.a(i.toString()),i=$(n),"001"==i?t.g=N(t.F,""+n):i!=t.C&&(t.g=E(t,i)),t.b.a(""+n).a(" "),t.l="",!0)}function V(t,n){var e=t.m.toString();if(0<=e.substring(t.s).search(t.H)){var i=e.search(t.H),e=e.replace(t.H,n);return r(t.m),t.m.a(e),t.s=i,e.substring(0,t.s+1)}return 1==t.f.length&&(t.j=!1),t.v="",t.h.toString()}var q=this;e.prototype.b="",e.prototype.set=function(t){this.b=""+t},e.prototype.a=function(t,n,e){if(this.b+=String(t),null!=n)for(var r=1;r<arguments.length;r++)this.b+=arguments[r];return this},e.prototype.toString=function(){return this.b};var T=1,U=2,Y=3,k=4,J=6,K=16,L=18;f.prototype.set=function(t,n){m(this,t.b,n)},f.prototype.clone=function(){var t=new this.constructor;return t!=this&&(t.a={},t.b&&(t.b={}),c(t,this)),t};var O;n(d,f);var z;n(v,f);var Q;n(_,f),d.prototype.i=function(){return O||(O=y(d,{0:{name:"NumberFormat",I:"i18n.phonenumbers.NumberFormat"},1:{name:"pattern",required:!0,c:9,type:String},2:{name:"format",required:!0,c:9,type:String},3:{name:"leading_digits_pattern",G:!0,c:9,type:String},4:{name:"national_prefix_formatting_rule",c:9,type:String},6:{name:"national_prefix_optional_when_formatting",c:8,type:Boolean},5:{name:"domestic_carrier_code_formatting_rule",c:9,type:String}})),O},d.ctor=d,d.ctor.i=d.prototype.i,v.prototype.i=function(){return z||(z=y(v,{0:{name:"PhoneNumberDesc",I:"i18n.phonenumbers.PhoneNumberDesc"},2:{name:"national_number_pattern",c:9,type:String},3:{name:"possible_number_pattern",c:9,type:String},6:{name:"example_number",c:9,type:String},7:{name:"national_number_matcher_data",c:12,type:String},8:{name:"possible_number_matcher_data",c:12,type:String}})),z},v.ctor=v,v.ctor.i=v.prototype.i,_.prototype.i=function(){return Q||(Q=y(_,{0:{name:"PhoneMetadata",I:"i18n.phonenumbers.PhoneMetadata"},1:{name:"general_desc",c:11,type:v},2:{name:"fixed_line",c:11,type:v},3:{name:"mobile",c:11,type:v},4:{name:"toll_free",c:11,type:v},5:{name:"premium_rate",c:11,type:v},6:{name:"shared_cost",c:11,type:v},7:{name:"personal_number",c:11,type:v},8:{name:"voip",c:11,type:v},21:{name:"pager",c:11,type:v},25:{name:"uan",c:11,type:v},27:{name:"emergency",c:11,type:v},28:{name:"voicemail",c:11,type:v},24:{name:"no_international_dialling",c:11,type:v},9:{name:"id",required:!0,c:9,type:String},10:{name:"country_code",c:5,type:Number},11:{name:"international_prefix",c:9,type:String},17:{name:"preferred_international_prefix",c:9,type:String},12:{name:"national_prefix",c:9,type:String},13:{name:"preferred_extn_prefix",c:9,type:String},15:{name:"national_prefix_for_parsing",c:9,type:String},16:{name:"national_prefix_transform_rule",c:9,type:String},18:{name:"same_mobile_and_fixed_line_pattern",c:8,defaultValue:!1,type:Boolean},19:{name:"number_format",G:!0,c:11,type:d},20:{name:"intl_number_format",G:!0,c:11,type:d},22:{name:"main_country_for_code",c:8,defaultValue:!1,type:Boolean},23:{name:"leading_digits",c:9,type:String},26:{name:"leading_zero_possible",c:8,defaultValue:!1,type:Boolean}})),Q},_.ctor=_,_.ctor.i=_.prototype.i,S.prototype.a=function(t){throw new t.b,Error("Unimplemented")},S.prototype.b=function(t,n){if(11==t.a||10==t.a)return n instanceof f?n:this.a(t.j.prototype.i(),n);if(14==t.a){if("string"==typeof n&&W.test(n)){var e=Number(n);if(e>0)return e}return n}if(!t.h)return n;if(e=t.j,e===String){if("number"==typeof n)return String(n)}else if(e===Number&&"string"==typeof n&&("Infinity"===n||"-Infinity"===n||"NaN"===n||W.test(n)))return Number(n);return n};var W=/^-?[0-9]+$/;n(w,S),w.prototype.a=function(t,n){var e=new t.b;return e.g=this,e.a=n,e.b={},e},n(x,w),x.prototype.b=function(t,n){return 8==t.a?!!n:S.prototype.b.apply(this,arguments)},x.prototype.a=function(t,n){return x.M.a.call(this,t,n)};/*
|
36
|
+
|
37
|
+
Copyright (C) 2010 The Libphonenumber Authors
|
38
|
+
|
39
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
40
|
+
you may not use this file except in compliance with the License.
|
41
|
+
You may obtain a copy of the License at
|
42
|
+
|
43
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
44
|
+
|
45
|
+
Unless required by applicable law or agreed to in writing, software
|
46
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
47
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
48
|
+
See the License for the specific language governing permissions and
|
49
|
+
limitations under the License.
|
50
|
+
*/
|
51
|
+
var X={27:["ZA"]},tt={ZA:[null,[null,null,"[1-79]\\d{8}|8(?:[067]\\d{7}|[1-4]\\d{3,7})","\\d{5,9}"],[null,null,"(?:1[0-8]|2[0-378]|3[1-69]|4\\d|5[1346-8])\\d{7}","\\d{9}",null,null,"101234567"],[null,null,"(?:6[0-5]|7[0-46-9])\\d{7}|8[1-4]\\d{3,7}","\\d{5,9}",null,null,"711234567"],[null,null,"80\\d{7}","\\d{9}",null,null,"801234567"],[null,null,"86[2-9]\\d{6}|90\\d{7}","\\d{9}",null,null,"862345678"],[null,null,"860\\d{6}","\\d{9}",null,null,"860123456"],[null,null,"NA","NA"],[null,null,"87\\d{7}","\\d{9}",null,null,"871234567"],"ZA",27,"00","0",null,null,"0",null,null,null,[[null,"(860)(\\d{3})(\\d{3})","$1 $2 $3",["860"],"0$1"],[null,"(\\d{2})(\\d{3})(\\d{4})","$1 $2 $3",["[1-79]|8(?:[0-47]|6[1-9])"],"0$1"],[null,"(\\d{2})(\\d{3,4})","$1 $2",["8[1-4]"],"0$1"],[null,"(\\d{2})(\\d{3})(\\d{2,3})","$1 $2 $3",["8[1-4]"],"0$1"]],null,[null,null,"NA","NA"],null,null,[null,null,"NA","NA"],[null,null,"861\\d{6}","\\d{9}",null,null,"861123456"],null,null,[null,null,"NA","NA"]]};A.b=function(){return A.a?A.a:A.a=new A};var nt={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"},et=RegExp("[++]+"),rt=RegExp("([0-90-9٠-٩۰-۹])"),it=/^\(?\$1\)?$/,at=new _;m(at,11,"NA");var lt=/\[([^\[\]])*\]/g,ot=/\d(?=[^,}][^,}])/g,ut=RegExp("^[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*)+$"),st=/[- ]/;j.prototype.K=function(){this.B="",r(this.h),r(this.u),r(this.m),this.s=0,this.v="",r(this.b),this.l="",r(this.a),this.j=!0,this.w=this.o=this.D=!1,this.f=[],this.A=!1,this.g!=this.J&&(this.g=E(this,this.C))},j.prototype.L=function(t){return this.B=F(this,t)},t("Cleave.AsYouTypeFormatter",j),t("Cleave.AsYouTypeFormatter.prototype.inputDigit",j.prototype.L),t("Cleave.AsYouTypeFormatter.prototype.clear",j.prototype.K)}.call("object"==typeof global&&global?global:window);
|
@@ -0,0 +1,51 @@
|
|
1
|
+
!function(){function t(t,n){var e=t.split("."),r=q;e[0]in r||!r.execScript||r.execScript("var "+e[0]);for(var i;e.length&&(i=e.shift());)e.length||void 0===n?r=r[i]?r[i]:r[i]={}:r[i]=n}function n(t,n){function e(){}e.prototype=n.prototype,t.M=n.prototype,t.prototype=new e,t.prototype.constructor=t,t.N=function(t,e,r){for(var i=Array(arguments.length-2),a=2;a<arguments.length;a++)i[a-2]=arguments[a];return n.prototype[e].apply(t,i)}}function e(t,n){null!=t&&this.a.apply(this,arguments)}function r(t){t.b=""}function i(t,n){t.sort(n||a)}function a(t,n){return t>n?1:n>t?-1:0}function l(t){var n,e=[],r=0;for(n in t)e[r++]=t[n];return e}function o(t,n){this.b=t,this.a={};for(var e=0;e<n.length;e++){var r=n[e];this.a[r.b]=r}}function u(t){return t=l(t.a),i(t,function(t,n){return t.b-n.b}),t}function s(t,n){switch(this.b=t,this.g=!!n.G,this.a=n.c,this.j=n.type,this.h=!1,this.a){case Y:case k:case J:case K:case L:case U:case T:this.h=!0}this.f=n.defaultValue}function f(){this.a={},this.f=this.i().a,this.b=this.g=null}function c(t,n){for(var e=u(t.i()),r=0;r<e.length;r++){var i=e[r],a=i.b;if(null!=n.a[a]){t.b&&delete t.b[i.b];var l=11==i.a||10==i.a;if(i.g)for(var i=p(n,a)||[],o=0;o<i.length;o++){var s=t,f=a,h=l?i[o].clone():i[o];s.a[f]||(s.a[f]=[]),s.a[f].push(h),s.b&&delete s.b[f]}else i=p(n,a),l?(l=p(t,a))?c(l,i):m(t,a,i.clone()):m(t,a,i)}}}function p(t,n){var e=t.a[n];if(null==e)return null;if(t.g){if(!(n in t.b)){var r=t.g,i=t.f[n];if(null!=e)if(i.g){for(var a=[],l=0;l<e.length;l++)a[l]=r.b(i,e[l]);e=a}else e=r.b(i,e);return t.b[n]=e}return t.b[n]}return e}function h(t,n,e){var r=p(t,n);return t.f[n].g?r[e||0]:r}function g(t,n){var e;if(null!=t.a[n])e=h(t,n,void 0);else t:{if(e=t.f[n],void 0===e.f){var r=e.j;if(r===Boolean)e.f=!1;else if(r===Number)e.f=0;else{if(r!==String){e=new r;break t}e.f=e.h?"0":""}}e=e.f}return e}function b(t,n){return t.f[n].g?null!=t.a[n]?t.a[n].length:0:null!=t.a[n]?1:0}function m(t,n,e){t.a[n]=e,t.b&&(t.b[n]=e)}function y(t,n){var e,r=[];for(e in n)0!=e&&r.push(new s(e,n[e]));return new o(t,r)}/*
|
2
|
+
|
3
|
+
Protocol Buffer 2 Copyright 2008 Google Inc.
|
4
|
+
All other code copyright its respective owners.
|
5
|
+
Copyright (C) 2010 The Libphonenumber Authors
|
6
|
+
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
you may not use this file except in compliance with the License.
|
9
|
+
You may obtain a copy of the License at
|
10
|
+
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
See the License for the specific language governing permissions and
|
17
|
+
limitations under the License.
|
18
|
+
*/
|
19
|
+
function v(){f.call(this)}function _(){f.call(this)}function d(){f.call(this)}function S(){}function w(){}function A(){}/*
|
20
|
+
|
21
|
+
Copyright (C) 2010 The Libphonenumber Authors.
|
22
|
+
|
23
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
24
|
+
you may not use this file except in compliance with the License.
|
25
|
+
You may obtain a copy of the License at
|
26
|
+
|
27
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
28
|
+
|
29
|
+
Unless required by applicable law or agreed to in writing, software
|
30
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
31
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
32
|
+
See the License for the specific language governing permissions and
|
33
|
+
limitations under the License.
|
34
|
+
*/
|
35
|
+
function N(){this.a={}}function x(t,n){if(null==n)return null;n=n.toUpperCase();var e=t.a[n];if(null==e){if(e=tt[n],null==e)return null;e=(new A).a(d.i(),e),t.a[n]=e}return e}function j(t){return t=X[t],null==t?"ZZ":t[0]}function $(t){this.H=RegExp(" "),this.B="",this.m=new e,this.v="",this.h=new e,this.u=new e,this.j=!0,this.w=this.o=this.D=!1,this.F=N.b(),this.s=0,this.b=new e,this.A=!1,this.l="",this.a=new e,this.f=[],this.C=t,this.J=this.g=E(this,this.C)}function E(t,n){var e;if(null!=n&&isNaN(n)&&n.toUpperCase()in tt){if(e=x(t.F,n),null==e)throw"Invalid region code: "+n;e=g(e,10)}else e=0;return e=x(t.F,j(e)),null!=e?e:at}function R(t){for(var n=t.f.length,e=0;n>e;++e){var i=t.f[e],a=g(i,1);if(t.v==a)return!1;var l;l=t;var o=i,u=g(o,1);if(-1!=u.indexOf("|"))l=!1;else{u=u.replace(lt,"\\d"),u=u.replace(ot,"\\d"),r(l.m);var s;s=l;var o=g(o,2),f="999999999999999".match(u)[0];f.length<s.a.b.length?s="":(s=f.replace(new RegExp(u,"g"),o),s=s.replace(RegExp("9","g")," ")),0<s.length?(l.m.a(s),l=!0):l=!1}if(l)return t.v=a,t.A=st.test(h(i,4)),t.s=0,!0}return t.j=!1}function C(t,n){for(var e=[],r=n.length-3,i=t.f.length,a=0;i>a;++a){var l=t.f[a];0==b(l,3)?e.push(t.f[a]):(l=h(l,3,Math.min(r,b(l,3)-1)),0==n.search(l)&&e.push(t.f[a]))}t.f=e}function F(t,n){t.h.a(n);var e=n;if(rt.test(e)||1==t.h.b.length&&et.test(e)){var i,e=n;"+"==e?(i=e,t.u.a(e)):(i=nt[e],t.u.a(i),t.a.a(i)),n=i}else t.j=!1,t.D=!0;if(!t.j){if(!t.D)if(H(t)){if(P(t))return B(t)}else if(0<t.l.length&&(e=t.a.toString(),r(t.a),t.a.a(t.l),t.a.a(e),e=t.b.toString(),i=e.lastIndexOf(t.l),r(t.b),t.b.a(e.substring(0,i))),t.l!=G(t))return t.b.a(" "),B(t);return t.h.toString()}switch(t.u.b.length){case 0:case 1:case 2:return t.h.toString();case 3:if(!H(t))return t.l=G(t),D(t);t.w=!0;default:return t.w?(P(t)&&(t.w=!1),t.b.toString()+t.a.toString()):0<t.f.length?(e=V(t,n),i=I(t),0<i.length?i:(C(t,t.a.toString()),R(t)?Z(t):t.j?M(t,e):t.h.toString())):D(t)}}function B(t){return t.j=!0,t.w=!1,t.f=[],t.s=0,r(t.m),t.v="",D(t)}function I(t){for(var n=t.a.toString(),e=t.f.length,r=0;e>r;++r){var i=t.f[r],a=g(i,1);if(new RegExp("^(?:"+a+")$").test(n))return t.A=st.test(h(i,4)),n=n.replace(new RegExp(a,"g"),h(i,2)),M(t,n)}return""}function M(t,n){var e=t.b.b.length;return t.A&&e>0&&" "!=t.b.toString().charAt(e-1)?t.b+" "+n:t.b+n}function D(t){var n=t.a.toString();if(3<=n.length){for(var e=t.o&&0<b(t.g,20)?p(t.g,20)||[]:p(t.g,19)||[],r=e.length,i=0;r>i;++i){var a,l=e[i];(a=null==t.g.a[12]||t.o||h(l,6))||(a=g(l,4),a=0==a.length||it.test(a)),a&&ut.test(g(l,2))&&t.f.push(l)}return C(t,n),n=I(t),0<n.length?n:R(t)?Z(t):t.h.toString()}return M(t,n)}function Z(t){var n=t.a.toString(),e=n.length;if(e>0){for(var r="",i=0;e>i;i++)r=V(t,n.charAt(i));return t.j?M(t,r):t.h.toString()}return t.b.toString()}function G(t){var n,e=t.a.toString(),i=0;return 1!=h(t.g,10)?n=!1:(n=t.a.toString(),n="1"==n.charAt(0)&&"0"!=n.charAt(1)&&"1"!=n.charAt(1)),n?(i=1,t.b.a("1").a(" "),t.o=!0):null!=t.g.a[15]&&(n=new RegExp("^(?:"+h(t.g,15)+")"),n=e.match(n),null!=n&&null!=n[0]&&0<n[0].length&&(t.o=!0,i=n[0].length,t.b.a(e.substring(0,i)))),r(t.a),t.a.a(e.substring(i)),e.substring(0,i)}function H(t){var n=t.u.toString(),e=new RegExp("^(?:\\+|"+h(t.g,11)+")"),e=n.match(e);return null!=e&&null!=e[0]&&0<e[0].length?(t.o=!0,e=e[0].length,r(t.a),t.a.a(n.substring(e)),r(t.b),t.b.a(n.substring(0,e)),"+"!=n.charAt(0)&&t.b.a(" "),!0):!1}function P(t){if(0==t.a.b.length)return!1;var n,i=new e;t:{if(n=t.a.toString(),0!=n.length&&"0"!=n.charAt(0))for(var a,l=n.length,o=1;3>=o&&l>=o;++o)if(a=parseInt(n.substring(0,o),10),a in X){i.a(n.substring(o)),n=a;break t}n=0}return 0==n?!1:(r(t.a),t.a.a(i.toString()),i=j(n),"001"==i?t.g=x(t.F,""+n):i!=t.C&&(t.g=E(t,i)),t.b.a(""+n).a(" "),t.l="",!0)}function V(t,n){var e=t.m.toString();if(0<=e.substring(t.s).search(t.H)){var i=e.search(t.H),e=e.replace(t.H,n);return r(t.m),t.m.a(e),t.s=i,e.substring(0,t.s+1)}return 1==t.f.length&&(t.j=!1),t.v="",t.h.toString()}var q=this;e.prototype.b="",e.prototype.set=function(t){this.b=""+t},e.prototype.a=function(t,n,e){if(this.b+=String(t),null!=n)for(var r=1;r<arguments.length;r++)this.b+=arguments[r];return this},e.prototype.toString=function(){return this.b};var T=1,U=2,Y=3,k=4,J=6,K=16,L=18;f.prototype.set=function(t,n){m(this,t.b,n)},f.prototype.clone=function(){var t=new this.constructor;return t!=this&&(t.a={},t.b&&(t.b={}),c(t,this)),t};var O;n(v,f);var z;n(_,f);var Q;n(d,f),v.prototype.i=function(){return O||(O=y(v,{0:{name:"NumberFormat",I:"i18n.phonenumbers.NumberFormat"},1:{name:"pattern",required:!0,c:9,type:String},2:{name:"format",required:!0,c:9,type:String},3:{name:"leading_digits_pattern",G:!0,c:9,type:String},4:{name:"national_prefix_formatting_rule",c:9,type:String},6:{name:"national_prefix_optional_when_formatting",c:8,type:Boolean},5:{name:"domestic_carrier_code_formatting_rule",c:9,type:String}})),O},v.ctor=v,v.ctor.i=v.prototype.i,_.prototype.i=function(){return z||(z=y(_,{0:{name:"PhoneNumberDesc",I:"i18n.phonenumbers.PhoneNumberDesc"},2:{name:"national_number_pattern",c:9,type:String},3:{name:"possible_number_pattern",c:9,type:String},6:{name:"example_number",c:9,type:String},7:{name:"national_number_matcher_data",c:12,type:String},8:{name:"possible_number_matcher_data",c:12,type:String}})),z},_.ctor=_,_.ctor.i=_.prototype.i,d.prototype.i=function(){return Q||(Q=y(d,{0:{name:"PhoneMetadata",I:"i18n.phonenumbers.PhoneMetadata"},1:{name:"general_desc",c:11,type:_},2:{name:"fixed_line",c:11,type:_},3:{name:"mobile",c:11,type:_},4:{name:"toll_free",c:11,type:_},5:{name:"premium_rate",c:11,type:_},6:{name:"shared_cost",c:11,type:_},7:{name:"personal_number",c:11,type:_},8:{name:"voip",c:11,type:_},21:{name:"pager",c:11,type:_},25:{name:"uan",c:11,type:_},27:{name:"emergency",c:11,type:_},28:{name:"voicemail",c:11,type:_},24:{name:"no_international_dialling",c:11,type:_},9:{name:"id",required:!0,c:9,type:String},10:{name:"country_code",c:5,type:Number},11:{name:"international_prefix",c:9,type:String},17:{name:"preferred_international_prefix",c:9,type:String},12:{name:"national_prefix",c:9,type:String},13:{name:"preferred_extn_prefix",c:9,type:String},15:{name:"national_prefix_for_parsing",c:9,type:String},16:{name:"national_prefix_transform_rule",c:9,type:String},18:{name:"same_mobile_and_fixed_line_pattern",c:8,defaultValue:!1,type:Boolean},19:{name:"number_format",G:!0,c:11,type:v},20:{name:"intl_number_format",G:!0,c:11,type:v},22:{name:"main_country_for_code",c:8,defaultValue:!1,type:Boolean},23:{name:"leading_digits",c:9,type:String},26:{name:"leading_zero_possible",c:8,defaultValue:!1,type:Boolean}})),Q},d.ctor=d,d.ctor.i=d.prototype.i,S.prototype.a=function(t){throw new t.b,Error("Unimplemented")},S.prototype.b=function(t,n){if(11==t.a||10==t.a)return n instanceof f?n:this.a(t.j.prototype.i(),n);if(14==t.a){if("string"==typeof n&&W.test(n)){var e=Number(n);if(e>0)return e}return n}if(!t.h)return n;if(e=t.j,e===String){if("number"==typeof n)return String(n)}else if(e===Number&&"string"==typeof n&&("Infinity"===n||"-Infinity"===n||"NaN"===n||W.test(n)))return Number(n);return n};var W=/^-?[0-9]+$/;n(w,S),w.prototype.a=function(t,n){var e=new t.b;return e.g=this,e.a=n,e.b={},e},n(A,w),A.prototype.b=function(t,n){return 8==t.a?!!n:S.prototype.b.apply(this,arguments)},A.prototype.a=function(t,n){return A.M.a.call(this,t,n)};/*
|
36
|
+
|
37
|
+
Copyright (C) 2010 The Libphonenumber Authors
|
38
|
+
|
39
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
40
|
+
you may not use this file except in compliance with the License.
|
41
|
+
You may obtain a copy of the License at
|
42
|
+
|
43
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
44
|
+
|
45
|
+
Unless required by applicable law or agreed to in writing, software
|
46
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
47
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
48
|
+
See the License for the specific language governing permissions and
|
49
|
+
limitations under the License.
|
50
|
+
*/
|
51
|
+
var X={260:["ZM"]},tt={ZM:[null,[null,null,"[289]\\d{8}","\\d{9}"],[null,null,"21[1-8]\\d{6}","\\d{9}",null,null,"211234567"],[null,null,"9(?:5[05]|6\\d|7[1-9])\\d{6}","\\d{9}",null,null,"955123456"],[null,null,"800\\d{6}","\\d{9}",null,null,"800123456"],[null,null,"NA","NA"],[null,null,"NA","NA"],[null,null,"NA","NA"],[null,null,"NA","NA"],"ZM",260,"00","0",null,null,"0",null,null,null,[[null,"([29]\\d)(\\d{7})","$1 $2",["[29]"],"0$1"],[null,"(800)(\\d{3})(\\d{3})","$1 $2 $3",["8"],"0$1"]],null,[null,null,"NA","NA"],null,null,[null,null,"NA","NA"],[null,null,"NA","NA"],null,null,[null,null,"NA","NA"]]};N.b=function(){return N.a?N.a:N.a=new N};var nt={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"},et=RegExp("[++]+"),rt=RegExp("([0-90-9٠-٩۰-۹])"),it=/^\(?\$1\)?$/,at=new d;m(at,11,"NA");var lt=/\[([^\[\]])*\]/g,ot=/\d(?=[^,}][^,}])/g,ut=RegExp("^[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*)+$"),st=/[- ]/;$.prototype.K=function(){this.B="",r(this.h),r(this.u),r(this.m),this.s=0,this.v="",r(this.b),this.l="",r(this.a),this.j=!0,this.w=this.o=this.D=!1,this.f=[],this.A=!1,this.g!=this.J&&(this.g=E(this,this.C))},$.prototype.L=function(t){return this.B=F(this,t)},t("Cleave.AsYouTypeFormatter",$),t("Cleave.AsYouTypeFormatter.prototype.inputDigit",$.prototype.L),t("Cleave.AsYouTypeFormatter.prototype.clear",$.prototype.K)}.call("object"==typeof global&&global?global:window);
|
@@ -0,0 +1,51 @@
|
|
1
|
+
!function(){function t(t,n){var e=t.split("."),r=q;e[0]in r||!r.execScript||r.execScript("var "+e[0]);for(var i;e.length&&(i=e.shift());)e.length||void 0===n?r=r[i]?r[i]:r[i]={}:r[i]=n}function n(t,n){function e(){}e.prototype=n.prototype,t.M=n.prototype,t.prototype=new e,t.prototype.constructor=t,t.N=function(t,e,r){for(var i=Array(arguments.length-2),a=2;a<arguments.length;a++)i[a-2]=arguments[a];return n.prototype[e].apply(t,i)}}function e(t,n){null!=t&&this.a.apply(this,arguments)}function r(t){t.b=""}function i(t,n){t.sort(n||a)}function a(t,n){return t>n?1:n>t?-1:0}function l(t){var n,e=[],r=0;for(n in t)e[r++]=t[n];return e}function o(t,n){this.b=t,this.a={};for(var e=0;e<n.length;e++){var r=n[e];this.a[r.b]=r}}function u(t){return t=l(t.a),i(t,function(t,n){return t.b-n.b}),t}function s(t,n){switch(this.b=t,this.g=!!n.G,this.a=n.c,this.j=n.type,this.h=!1,this.a){case W:case Y:case k:case J:case K:case U:case T:this.h=!0}this.f=n.defaultValue}function f(){this.a={},this.f=this.i().a,this.b=this.g=null}function c(t,n){for(var e=u(t.i()),r=0;r<e.length;r++){var i=e[r],a=i.b;if(null!=n.a[a]){t.b&&delete t.b[i.b];var l=11==i.a||10==i.a;if(i.g)for(var i=p(n,a)||[],o=0;o<i.length;o++){var s=t,f=a,h=l?i[o].clone():i[o];s.a[f]||(s.a[f]=[]),s.a[f].push(h),s.b&&delete s.b[f]}else i=p(n,a),l?(l=p(t,a))?c(l,i):b(t,a,i.clone()):b(t,a,i)}}}function p(t,n){var e=t.a[n];if(null==e)return null;if(t.g){if(!(n in t.b)){var r=t.g,i=t.f[n];if(null!=e)if(i.g){for(var a=[],l=0;l<e.length;l++)a[l]=r.b(i,e[l]);e=a}else e=r.b(i,e);return t.b[n]=e}return t.b[n]}return e}function h(t,n,e){var r=p(t,n);return t.f[n].g?r[e||0]:r}function g(t,n){var e;if(null!=t.a[n])e=h(t,n,void 0);else t:{if(e=t.f[n],void 0===e.f){var r=e.j;if(r===Boolean)e.f=!1;else if(r===Number)e.f=0;else{if(r!==String){e=new r;break t}e.f=e.h?"0":""}}e=e.f}return e}function d(t,n){return t.f[n].g?null!=t.a[n]?t.a[n].length:0:null!=t.a[n]?1:0}function b(t,n,e){t.a[n]=e,t.b&&(t.b[n]=e)}function m(t,n){var e,r=[];for(e in n)0!=e&&r.push(new s(e,n[e]));return new o(t,r)}/*
|
2
|
+
|
3
|
+
Protocol Buffer 2 Copyright 2008 Google Inc.
|
4
|
+
All other code copyright its respective owners.
|
5
|
+
Copyright (C) 2010 The Libphonenumber Authors
|
6
|
+
|
7
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
you may not use this file except in compliance with the License.
|
9
|
+
You may obtain a copy of the License at
|
10
|
+
|
11
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
|
13
|
+
Unless required by applicable law or agreed to in writing, software
|
14
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
See the License for the specific language governing permissions and
|
17
|
+
limitations under the License.
|
18
|
+
*/
|
19
|
+
function y(){f.call(this)}function v(){f.call(this)}function _(){f.call(this)}function S(){}function $(){}function w(){}/*
|
20
|
+
|
21
|
+
Copyright (C) 2010 The Libphonenumber Authors.
|
22
|
+
|
23
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
24
|
+
you may not use this file except in compliance with the License.
|
25
|
+
You may obtain a copy of the License at
|
26
|
+
|
27
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
28
|
+
|
29
|
+
Unless required by applicable law or agreed to in writing, software
|
30
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
31
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
32
|
+
See the License for the specific language governing permissions and
|
33
|
+
limitations under the License.
|
34
|
+
*/
|
35
|
+
function A(){this.a={}}function N(t,n){if(null==n)return null;n=n.toUpperCase();var e=t.a[n];if(null==e){if(e=tt[n],null==e)return null;e=(new w).a(_.i(),e),t.a[n]=e}return e}function x(t){return t=X[t],null==t?"ZZ":t[0]}function j(t){this.H=RegExp(" "),this.B="",this.m=new e,this.v="",this.h=new e,this.u=new e,this.j=!0,this.w=this.o=this.D=!1,this.F=A.b(),this.s=0,this.b=new e,this.A=!1,this.l="",this.a=new e,this.f=[],this.C=t,this.J=this.g=E(this,this.C)}function E(t,n){var e;if(null!=n&&isNaN(n)&&n.toUpperCase()in tt){if(e=N(t.F,n),null==e)throw"Invalid region code: "+n;e=g(e,10)}else e=0;return e=N(t.F,x(e)),null!=e?e:at}function R(t){for(var n=t.f.length,e=0;n>e;++e){var i=t.f[e],a=g(i,1);if(t.v==a)return!1;var l;l=t;var o=i,u=g(o,1);if(-1!=u.indexOf("|"))l=!1;else{u=u.replace(lt,"\\d"),u=u.replace(ot,"\\d"),r(l.m);var s;s=l;var o=g(o,2),f="999999999999999".match(u)[0];f.length<s.a.b.length?s="":(s=f.replace(new RegExp(u,"g"),o),s=s.replace(RegExp("9","g")," ")),0<s.length?(l.m.a(s),l=!0):l=!1}if(l)return t.v=a,t.A=st.test(h(i,4)),t.s=0,!0}return t.j=!1}function C(t,n){for(var e=[],r=n.length-3,i=t.f.length,a=0;i>a;++a){var l=t.f[a];0==d(l,3)?e.push(t.f[a]):(l=h(l,3,Math.min(r,d(l,3)-1)),0==n.search(l)&&e.push(t.f[a]))}t.f=e}function F(t,n){t.h.a(n);var e=n;if(rt.test(e)||1==t.h.b.length&&et.test(e)){var i,e=n;"+"==e?(i=e,t.u.a(e)):(i=nt[e],t.u.a(i),t.a.a(i)),n=i}else t.j=!1,t.D=!0;if(!t.j){if(!t.D)if(H(t)){if(P(t))return B(t)}else if(0<t.l.length&&(e=t.a.toString(),r(t.a),t.a.a(t.l),t.a.a(e),e=t.b.toString(),i=e.lastIndexOf(t.l),r(t.b),t.b.a(e.substring(0,i))),t.l!=G(t))return t.b.a(" "),B(t);return t.h.toString()}switch(t.u.b.length){case 0:case 1:case 2:return t.h.toString();case 3:if(!H(t))return t.l=G(t),M(t);t.w=!0;default:return t.w?(P(t)&&(t.w=!1),t.b.toString()+t.a.toString()):0<t.f.length?(e=V(t,n),i=I(t),0<i.length?i:(C(t,t.a.toString()),R(t)?Z(t):t.j?D(t,e):t.h.toString())):M(t)}}function B(t){return t.j=!0,t.w=!1,t.f=[],t.s=0,r(t.m),t.v="",M(t)}function I(t){for(var n=t.a.toString(),e=t.f.length,r=0;e>r;++r){var i=t.f[r],a=g(i,1);if(new RegExp("^(?:"+a+")$").test(n))return t.A=st.test(h(i,4)),n=n.replace(new RegExp(a,"g"),h(i,2)),D(t,n)}return""}function D(t,n){var e=t.b.b.length;return t.A&&e>0&&" "!=t.b.toString().charAt(e-1)?t.b+" "+n:t.b+n}function M(t){var n=t.a.toString();if(3<=n.length){for(var e=t.o&&0<d(t.g,20)?p(t.g,20)||[]:p(t.g,19)||[],r=e.length,i=0;r>i;++i){var a,l=e[i];(a=null==t.g.a[12]||t.o||h(l,6))||(a=g(l,4),a=0==a.length||it.test(a)),a&&ut.test(g(l,2))&&t.f.push(l)}return C(t,n),n=I(t),0<n.length?n:R(t)?Z(t):t.h.toString()}return D(t,n)}function Z(t){var n=t.a.toString(),e=n.length;if(e>0){for(var r="",i=0;e>i;i++)r=V(t,n.charAt(i));return t.j?D(t,r):t.h.toString()}return t.b.toString()}function G(t){var n,e=t.a.toString(),i=0;return 1!=h(t.g,10)?n=!1:(n=t.a.toString(),n="1"==n.charAt(0)&&"0"!=n.charAt(1)&&"1"!=n.charAt(1)),n?(i=1,t.b.a("1").a(" "),t.o=!0):null!=t.g.a[15]&&(n=new RegExp("^(?:"+h(t.g,15)+")"),n=e.match(n),null!=n&&null!=n[0]&&0<n[0].length&&(t.o=!0,i=n[0].length,t.b.a(e.substring(0,i)))),r(t.a),t.a.a(e.substring(i)),e.substring(0,i)}function H(t){var n=t.u.toString(),e=new RegExp("^(?:\\+|"+h(t.g,11)+")"),e=n.match(e);return null!=e&&null!=e[0]&&0<e[0].length?(t.o=!0,e=e[0].length,r(t.a),t.a.a(n.substring(e)),r(t.b),t.b.a(n.substring(0,e)),"+"!=n.charAt(0)&&t.b.a(" "),!0):!1}function P(t){if(0==t.a.b.length)return!1;var n,i=new e;t:{if(n=t.a.toString(),0!=n.length&&"0"!=n.charAt(0))for(var a,l=n.length,o=1;3>=o&&l>=o;++o)if(a=parseInt(n.substring(0,o),10),a in X){i.a(n.substring(o)),n=a;break t}n=0}return 0==n?!1:(r(t.a),t.a.a(i.toString()),i=x(n),"001"==i?t.g=N(t.F,""+n):i!=t.C&&(t.g=E(t,i)),t.b.a(""+n).a(" "),t.l="",!0)}function V(t,n){var e=t.m.toString();if(0<=e.substring(t.s).search(t.H)){var i=e.search(t.H),e=e.replace(t.H,n);return r(t.m),t.m.a(e),t.s=i,e.substring(0,t.s+1)}return 1==t.f.length&&(t.j=!1),t.v="",t.h.toString()}var q=this;e.prototype.b="",e.prototype.set=function(t){this.b=""+t},e.prototype.a=function(t,n,e){if(this.b+=String(t),null!=n)for(var r=1;r<arguments.length;r++)this.b+=arguments[r];return this},e.prototype.toString=function(){return this.b};var T=1,U=2,W=3,Y=4,k=6,J=16,K=18;f.prototype.set=function(t,n){b(this,t.b,n)},f.prototype.clone=function(){var t=new this.constructor;return t!=this&&(t.a={},t.b&&(t.b={}),c(t,this)),t};var L;n(y,f);var O;n(v,f);var z;n(_,f),y.prototype.i=function(){return L||(L=m(y,{0:{name:"NumberFormat",I:"i18n.phonenumbers.NumberFormat"},1:{name:"pattern",required:!0,c:9,type:String},2:{name:"format",required:!0,c:9,type:String},3:{name:"leading_digits_pattern",G:!0,c:9,type:String},4:{name:"national_prefix_formatting_rule",c:9,type:String},6:{name:"national_prefix_optional_when_formatting",c:8,type:Boolean},5:{name:"domestic_carrier_code_formatting_rule",c:9,type:String}})),L},y.ctor=y,y.ctor.i=y.prototype.i,v.prototype.i=function(){return O||(O=m(v,{0:{name:"PhoneNumberDesc",I:"i18n.phonenumbers.PhoneNumberDesc"},2:{name:"national_number_pattern",c:9,type:String},3:{name:"possible_number_pattern",c:9,type:String},6:{name:"example_number",c:9,type:String},7:{name:"national_number_matcher_data",c:12,type:String},8:{name:"possible_number_matcher_data",c:12,type:String}})),O},v.ctor=v,v.ctor.i=v.prototype.i,_.prototype.i=function(){return z||(z=m(_,{0:{name:"PhoneMetadata",I:"i18n.phonenumbers.PhoneMetadata"},1:{name:"general_desc",c:11,type:v},2:{name:"fixed_line",c:11,type:v},3:{name:"mobile",c:11,type:v},4:{name:"toll_free",c:11,type:v},5:{name:"premium_rate",c:11,type:v},6:{name:"shared_cost",c:11,type:v},7:{name:"personal_number",c:11,type:v},8:{name:"voip",c:11,type:v},21:{name:"pager",c:11,type:v},25:{name:"uan",c:11,type:v},27:{name:"emergency",c:11,type:v},28:{name:"voicemail",c:11,type:v},24:{name:"no_international_dialling",c:11,type:v},9:{name:"id",required:!0,c:9,type:String},10:{name:"country_code",c:5,type:Number},11:{name:"international_prefix",c:9,type:String},17:{name:"preferred_international_prefix",c:9,type:String},12:{name:"national_prefix",c:9,type:String},13:{name:"preferred_extn_prefix",c:9,type:String},15:{name:"national_prefix_for_parsing",c:9,type:String},16:{name:"national_prefix_transform_rule",c:9,type:String},18:{name:"same_mobile_and_fixed_line_pattern",c:8,defaultValue:!1,type:Boolean},19:{name:"number_format",G:!0,c:11,type:y},20:{name:"intl_number_format",G:!0,c:11,type:y},22:{name:"main_country_for_code",c:8,defaultValue:!1,type:Boolean},23:{name:"leading_digits",c:9,type:String},26:{name:"leading_zero_possible",c:8,defaultValue:!1,type:Boolean}})),z},_.ctor=_,_.ctor.i=_.prototype.i,S.prototype.a=function(t){throw new t.b,Error("Unimplemented")},S.prototype.b=function(t,n){if(11==t.a||10==t.a)return n instanceof f?n:this.a(t.j.prototype.i(),n);if(14==t.a){if("string"==typeof n&&Q.test(n)){var e=Number(n);if(e>0)return e}return n}if(!t.h)return n;if(e=t.j,e===String){if("number"==typeof n)return String(n)}else if(e===Number&&"string"==typeof n&&("Infinity"===n||"-Infinity"===n||"NaN"===n||Q.test(n)))return Number(n);return n};var Q=/^-?[0-9]+$/;n($,S),$.prototype.a=function(t,n){var e=new t.b;return e.g=this,e.a=n,e.b={},e},n(w,$),w.prototype.b=function(t,n){return 8==t.a?!!n:S.prototype.b.apply(this,arguments)},w.prototype.a=function(t,n){return w.M.a.call(this,t,n)};/*
|
36
|
+
|
37
|
+
Copyright (C) 2010 The Libphonenumber Authors
|
38
|
+
|
39
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
40
|
+
you may not use this file except in compliance with the License.
|
41
|
+
You may obtain a copy of the License at
|
42
|
+
|
43
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
44
|
+
|
45
|
+
Unless required by applicable law or agreed to in writing, software
|
46
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
47
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
48
|
+
See the License for the specific language governing permissions and
|
49
|
+
limitations under the License.
|
50
|
+
*/
|
51
|
+
var X={263:["ZW"]},tt={ZW:[null,[null,null,"2(?:[012457-9]\\d{3,8}|6(?:[14]\\d{7}|\\d{4}))|[13-79]\\d{4,9}|8[06]\\d{8}","\\d{3,10}"],[null,null,"(?:2(?:0(?:4\\d|5\\d{2})|2[278]\\d|48\\d|7(?:[1-7]\\d|[089]\\d{2})|8(?:[2-57-9]|[146]\\d{2})|98)|3(?:08|17|3[78]|7(?:[19]|[56]\\d)|8[37]|98)|5[15][78]|6(?:28\\d{2}|[36]7|75\\d|[69]8|8(?:7\\d|8)))\\d{3}|(?:2(?:1[39]|2[0157]|6[14]|7[35]|84)|329)\\d{7}|(?:1(?:3\\d{2}|9\\d|[4-8])|2(?:0\\d{2}|[569]\\d)|3(?:[26]|[013459]\\d)|5(?:0|5\\d{2}|[689]\\d)|6(?:[39]|[01246]\\d|[78]\\d{2}))\\d{3}|(?:29\\d|39|54)\\d{6}|(?:(?:25|54)83|2582\\d)\\d{3}|(?:4\\d{6,7}|9[2-9]\\d{4,5})","\\d{3,10}",null,null,"1312345"],[null,null,"7[1378]\\d{7}","\\d{9}",null,null,"711234567"],[null,null,"800\\d{7}","\\d{10}",null,null,"8001234567"],[null,null,"NA","NA"],[null,null,"NA","NA"],[null,null,"NA","NA"],[null,null,"86(?:1[12]|30|44|55|77|8[367]|99)\\d{6}","\\d{10}",null,null,"8686123456"],"ZW",263,"00","0",null,null,"0",null,null,null,[[null,"([49])(\\d{3})(\\d{2,4})","$1 $2 $3",["4|9[2-9]"],"0$1"],[null,"(7\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["7"],"0$1"],[null,"(86\\d{2})(\\d{3})(\\d{3})","$1 $2 $3",["86[24]"],"0$1"],[null,"([2356]\\d{2})(\\d{3,5})","$1 $2",["2(?:0[45]|2[278]|[49]8|[78])|3(?:08|17|3[78]|7[1569]|8[37]|98)|5[15][78]|6(?:[29]8|[38]7|6[78]|75|[89]8)"],"0$1"],[null,"(\\d{3})(\\d{3})(\\d{3,4})","$1 $2 $3",["2(?:1[39]|2[0157]|6[14]|7[35]|84)|329"],"0$1"],[null,"([1-356]\\d)(\\d{3,5})","$1 $2",["1[3-9]|2[0569]|3[0-69]|5[05689]|6[0-46-9]"],"0$1"],[null,"([235]\\d)(\\d{3})(\\d{3,4})","$1 $2 $3",["[23]9|54"],"0$1"],[null,"([25]\\d{3})(\\d{3,5})","$1 $2",["(?:25|54)8","258[23]|5483"],"0$1"],[null,"(8\\d{3})(\\d{6})","$1 $2",["86"],"0$1"],[null,"(80\\d)(\\d{3})(\\d{4})","$1 $2 $3",["80"],"0$1"]],null,[null,null,"NA","NA"],null,null,[null,null,"NA","NA"],[null,null,"NA","NA"],null,null,[null,null,"NA","NA"]]};A.b=function(){return A.a?A.a:A.a=new A};var nt={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"},et=RegExp("[++]+"),rt=RegExp("([0-90-9٠-٩۰-۹])"),it=/^\(?\$1\)?$/,at=new _;b(at,11,"NA");var lt=/\[([^\[\]])*\]/g,ot=/\d(?=[^,}][^,}])/g,ut=RegExp("^[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*)+$"),st=/[- ]/;j.prototype.K=function(){this.B="",r(this.h),r(this.u),r(this.m),this.s=0,this.v="",r(this.b),this.l="",r(this.a),this.j=!0,this.w=this.o=this.D=!1,this.f=[],this.A=!1,this.g!=this.J&&(this.g=E(this,this.C))},j.prototype.L=function(t){return this.B=F(this,t)},t("Cleave.AsYouTypeFormatter",j),t("Cleave.AsYouTypeFormatter.prototype.inputDigit",j.prototype.L),t("Cleave.AsYouTypeFormatter.prototype.clear",j.prototype.K)}.call("object"==typeof global&&global?global:window);
|
@@ -0,0 +1,1292 @@
|
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
2
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
3
|
+
module.exports = factory();
|
4
|
+
else if(typeof define === 'function' && define.amd)
|
5
|
+
define([], factory);
|
6
|
+
else if(typeof exports === 'object')
|
7
|
+
exports["Cleave"] = factory();
|
8
|
+
else
|
9
|
+
root["Cleave"] = factory();
|
10
|
+
})(this, function() {
|
11
|
+
return /******/ (function(modules) { // webpackBootstrap
|
12
|
+
/******/ // The module cache
|
13
|
+
/******/ var installedModules = {};
|
14
|
+
|
15
|
+
/******/ // The require function
|
16
|
+
/******/ function __webpack_require__(moduleId) {
|
17
|
+
|
18
|
+
/******/ // Check if module is in cache
|
19
|
+
/******/ if(installedModules[moduleId])
|
20
|
+
/******/ return installedModules[moduleId].exports;
|
21
|
+
|
22
|
+
/******/ // Create a new module (and put it into the cache)
|
23
|
+
/******/ var module = installedModules[moduleId] = {
|
24
|
+
/******/ exports: {},
|
25
|
+
/******/ id: moduleId,
|
26
|
+
/******/ loaded: false
|
27
|
+
/******/ };
|
28
|
+
|
29
|
+
/******/ // Execute the module function
|
30
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
31
|
+
|
32
|
+
/******/ // Flag the module as loaded
|
33
|
+
/******/ module.loaded = true;
|
34
|
+
|
35
|
+
/******/ // Return the exports of the module
|
36
|
+
/******/ return module.exports;
|
37
|
+
/******/ }
|
38
|
+
|
39
|
+
|
40
|
+
/******/ // expose the modules object (__webpack_modules__)
|
41
|
+
/******/ __webpack_require__.m = modules;
|
42
|
+
|
43
|
+
/******/ // expose the module cache
|
44
|
+
/******/ __webpack_require__.c = installedModules;
|
45
|
+
|
46
|
+
/******/ // __webpack_public_path__
|
47
|
+
/******/ __webpack_require__.p = "";
|
48
|
+
|
49
|
+
/******/ // Load entry module and return exports
|
50
|
+
/******/ return __webpack_require__(0);
|
51
|
+
/******/ })
|
52
|
+
/************************************************************************/
|
53
|
+
/******/ ([
|
54
|
+
/* 0 */
|
55
|
+
/***/ (function(module, exports, __webpack_require__) {
|
56
|
+
|
57
|
+
/* WEBPACK VAR INJECTION */(function(global) {'use strict';
|
58
|
+
|
59
|
+
/**
|
60
|
+
* Construct a new Cleave instance by passing the configuration object
|
61
|
+
*
|
62
|
+
* @param {String | HTMLElement} element
|
63
|
+
* @param {Object} opts
|
64
|
+
*/
|
65
|
+
var Cleave = function (element, opts) {
|
66
|
+
var owner = this;
|
67
|
+
|
68
|
+
if (typeof element === 'string') {
|
69
|
+
owner.element = document.querySelector(element);
|
70
|
+
} else {
|
71
|
+
owner.element = ((typeof element.length !== 'undefined') && element.length > 0) ? element[0] : element;
|
72
|
+
}
|
73
|
+
|
74
|
+
if (!owner.element) {
|
75
|
+
throw new Error('[cleave.js] Please check the element');
|
76
|
+
}
|
77
|
+
|
78
|
+
opts.initValue = owner.element.value;
|
79
|
+
|
80
|
+
owner.properties = Cleave.DefaultProperties.assign({}, opts);
|
81
|
+
|
82
|
+
owner.init();
|
83
|
+
};
|
84
|
+
|
85
|
+
Cleave.prototype = {
|
86
|
+
init: function () {
|
87
|
+
var owner = this, pps = owner.properties;
|
88
|
+
|
89
|
+
// no need to use this lib
|
90
|
+
if (!pps.numeral && !pps.phone && !pps.creditCard && !pps.date && (pps.blocksLength === 0 && !pps.prefix)) {
|
91
|
+
owner.onInput(pps.initValue);
|
92
|
+
|
93
|
+
return;
|
94
|
+
}
|
95
|
+
|
96
|
+
pps.maxLength = Cleave.Util.getMaxLength(pps.blocks);
|
97
|
+
|
98
|
+
owner.isAndroid = Cleave.Util.isAndroid();
|
99
|
+
owner.lastInputValue = '';
|
100
|
+
|
101
|
+
owner.onChangeListener = owner.onChange.bind(owner);
|
102
|
+
owner.onKeyDownListener = owner.onKeyDown.bind(owner);
|
103
|
+
owner.onFocusListener = owner.onFocus.bind(owner);
|
104
|
+
owner.onCutListener = owner.onCut.bind(owner);
|
105
|
+
owner.onCopyListener = owner.onCopy.bind(owner);
|
106
|
+
|
107
|
+
owner.element.addEventListener('input', owner.onChangeListener);
|
108
|
+
owner.element.addEventListener('keydown', owner.onKeyDownListener);
|
109
|
+
owner.element.addEventListener('focus', owner.onFocusListener);
|
110
|
+
owner.element.addEventListener('cut', owner.onCutListener);
|
111
|
+
owner.element.addEventListener('copy', owner.onCopyListener);
|
112
|
+
|
113
|
+
|
114
|
+
owner.initPhoneFormatter();
|
115
|
+
owner.initDateFormatter();
|
116
|
+
owner.initNumeralFormatter();
|
117
|
+
|
118
|
+
// avoid touch input field if value is null
|
119
|
+
// otherwise Firefox will add red box-shadow for <input required />
|
120
|
+
if (pps.initValue || (pps.prefix && !pps.noImmediatePrefix)) {
|
121
|
+
owner.onInput(pps.initValue);
|
122
|
+
}
|
123
|
+
},
|
124
|
+
|
125
|
+
initNumeralFormatter: function () {
|
126
|
+
var owner = this, pps = owner.properties;
|
127
|
+
|
128
|
+
if (!pps.numeral) {
|
129
|
+
return;
|
130
|
+
}
|
131
|
+
|
132
|
+
pps.numeralFormatter = new Cleave.NumeralFormatter(
|
133
|
+
pps.numeralDecimalMark,
|
134
|
+
pps.numeralIntegerScale,
|
135
|
+
pps.numeralDecimalScale,
|
136
|
+
pps.numeralThousandsGroupStyle,
|
137
|
+
pps.numeralPositiveOnly,
|
138
|
+
pps.stripLeadingZeroes,
|
139
|
+
pps.delimiter
|
140
|
+
);
|
141
|
+
},
|
142
|
+
|
143
|
+
initDateFormatter: function () {
|
144
|
+
var owner = this, pps = owner.properties;
|
145
|
+
|
146
|
+
if (!pps.date) {
|
147
|
+
return;
|
148
|
+
}
|
149
|
+
|
150
|
+
pps.dateFormatter = new Cleave.DateFormatter(pps.datePattern);
|
151
|
+
pps.blocks = pps.dateFormatter.getBlocks();
|
152
|
+
pps.blocksLength = pps.blocks.length;
|
153
|
+
pps.maxLength = Cleave.Util.getMaxLength(pps.blocks);
|
154
|
+
},
|
155
|
+
|
156
|
+
initPhoneFormatter: function () {
|
157
|
+
var owner = this, pps = owner.properties;
|
158
|
+
|
159
|
+
if (!pps.phone) {
|
160
|
+
return;
|
161
|
+
}
|
162
|
+
|
163
|
+
// Cleave.AsYouTypeFormatter should be provided by
|
164
|
+
// external google closure lib
|
165
|
+
try {
|
166
|
+
pps.phoneFormatter = new Cleave.PhoneFormatter(
|
167
|
+
new pps.root.Cleave.AsYouTypeFormatter(pps.phoneRegionCode),
|
168
|
+
pps.delimiter
|
169
|
+
);
|
170
|
+
} catch (ex) {
|
171
|
+
throw new Error('[cleave.js] Please include phone-type-formatter.{country}.js lib');
|
172
|
+
}
|
173
|
+
},
|
174
|
+
|
175
|
+
onKeyDown: function (event) {
|
176
|
+
var owner = this, pps = owner.properties,
|
177
|
+
charCode = event.which || event.keyCode,
|
178
|
+
Util = Cleave.Util,
|
179
|
+
currentValue = owner.element.value;
|
180
|
+
|
181
|
+
if (Util.isAndroidBackspaceKeydown(owner.lastInputValue, currentValue)) {
|
182
|
+
charCode = 8;
|
183
|
+
}
|
184
|
+
|
185
|
+
owner.lastInputValue = currentValue;
|
186
|
+
|
187
|
+
// hit backspace when last character is delimiter
|
188
|
+
if (charCode === 8 && Util.isDelimiter(currentValue.slice(-pps.delimiterLength), pps.delimiter, pps.delimiters)) {
|
189
|
+
pps.backspace = true;
|
190
|
+
|
191
|
+
return;
|
192
|
+
}
|
193
|
+
|
194
|
+
pps.backspace = false;
|
195
|
+
},
|
196
|
+
|
197
|
+
onChange: function () {
|
198
|
+
this.onInput(this.element.value);
|
199
|
+
},
|
200
|
+
|
201
|
+
onFocus: function () {
|
202
|
+
var owner = this,
|
203
|
+
pps = owner.properties;
|
204
|
+
|
205
|
+
Cleave.Util.fixPrefixCursor(owner.element, pps.prefix, pps.delimiter, pps.delimiters);
|
206
|
+
},
|
207
|
+
|
208
|
+
onCut: function (e) {
|
209
|
+
this.copyClipboardData(e);
|
210
|
+
this.onInput('');
|
211
|
+
},
|
212
|
+
|
213
|
+
onCopy: function (e) {
|
214
|
+
this.copyClipboardData(e);
|
215
|
+
},
|
216
|
+
|
217
|
+
copyClipboardData: function (e) {
|
218
|
+
var owner = this,
|
219
|
+
pps = owner.properties,
|
220
|
+
Util = Cleave.Util,
|
221
|
+
inputValue = owner.element.value,
|
222
|
+
textToCopy = '';
|
223
|
+
|
224
|
+
if (!pps.copyDelimiter) {
|
225
|
+
textToCopy = Util.stripDelimiters(inputValue, pps.delimiter, pps.delimiters);
|
226
|
+
} else {
|
227
|
+
textToCopy = inputValue;
|
228
|
+
}
|
229
|
+
|
230
|
+
try {
|
231
|
+
if (e.clipboardData) {
|
232
|
+
e.clipboardData.setData('Text', textToCopy);
|
233
|
+
} else {
|
234
|
+
window.clipboardData.setData('Text', textToCopy);
|
235
|
+
}
|
236
|
+
|
237
|
+
e.preventDefault();
|
238
|
+
} catch (ex) {
|
239
|
+
// empty
|
240
|
+
}
|
241
|
+
},
|
242
|
+
|
243
|
+
onInput: function (value) {
|
244
|
+
var owner = this, pps = owner.properties,
|
245
|
+
Util = Cleave.Util;
|
246
|
+
|
247
|
+
// case 1: delete one more character "4"
|
248
|
+
// 1234*| -> hit backspace -> 123|
|
249
|
+
// case 2: last character is not delimiter which is:
|
250
|
+
// 12|34* -> hit backspace -> 1|34*
|
251
|
+
// note: no need to apply this for numeral mode
|
252
|
+
if (!pps.numeral && pps.backspace && !Util.isDelimiter(value.slice(-pps.delimiterLength), pps.delimiter, pps.delimiters)) {
|
253
|
+
value = Util.headStr(value, value.length - pps.delimiterLength);
|
254
|
+
}
|
255
|
+
|
256
|
+
// phone formatter
|
257
|
+
if (pps.phone) {
|
258
|
+
if (pps.prefix && (!pps.noImmediatePrefix || value.length)) {
|
259
|
+
pps.result = pps.prefix + pps.phoneFormatter.format(value).slice(pps.prefix.length);
|
260
|
+
} else {
|
261
|
+
pps.result = pps.phoneFormatter.format(value);
|
262
|
+
}
|
263
|
+
owner.updateValueState();
|
264
|
+
|
265
|
+
return;
|
266
|
+
}
|
267
|
+
|
268
|
+
// numeral formatter
|
269
|
+
if (pps.numeral) {
|
270
|
+
if (pps.prefix && (!pps.noImmediatePrefix || value.length)) {
|
271
|
+
pps.result = pps.prefix + pps.numeralFormatter.format(value);
|
272
|
+
} else {
|
273
|
+
pps.result = pps.numeralFormatter.format(value);
|
274
|
+
}
|
275
|
+
owner.updateValueState();
|
276
|
+
|
277
|
+
return;
|
278
|
+
}
|
279
|
+
|
280
|
+
// date
|
281
|
+
if (pps.date) {
|
282
|
+
value = pps.dateFormatter.getValidatedDate(value);
|
283
|
+
}
|
284
|
+
|
285
|
+
// strip delimiters
|
286
|
+
value = Util.stripDelimiters(value, pps.delimiter, pps.delimiters);
|
287
|
+
|
288
|
+
// strip prefix
|
289
|
+
value = Util.getPrefixStrippedValue(value, pps.prefix, pps.prefixLength, pps.result);
|
290
|
+
|
291
|
+
// strip non-numeric characters
|
292
|
+
value = pps.numericOnly ? Util.strip(value, /[^\d]/g) : value;
|
293
|
+
|
294
|
+
// convert case
|
295
|
+
value = pps.uppercase ? value.toUpperCase() : value;
|
296
|
+
value = pps.lowercase ? value.toLowerCase() : value;
|
297
|
+
|
298
|
+
// prefix
|
299
|
+
if (pps.prefix && (!pps.noImmediatePrefix || value.length)) {
|
300
|
+
value = pps.prefix + value;
|
301
|
+
|
302
|
+
// no blocks specified, no need to do formatting
|
303
|
+
if (pps.blocksLength === 0) {
|
304
|
+
pps.result = value;
|
305
|
+
owner.updateValueState();
|
306
|
+
|
307
|
+
return;
|
308
|
+
}
|
309
|
+
}
|
310
|
+
|
311
|
+
// update credit card props
|
312
|
+
if (pps.creditCard) {
|
313
|
+
owner.updateCreditCardPropsByValue(value);
|
314
|
+
}
|
315
|
+
|
316
|
+
// strip over length characters
|
317
|
+
value = Util.headStr(value, pps.maxLength);
|
318
|
+
|
319
|
+
// apply blocks
|
320
|
+
pps.result = Util.getFormattedValue(
|
321
|
+
value,
|
322
|
+
pps.blocks, pps.blocksLength,
|
323
|
+
pps.delimiter, pps.delimiters, pps.delimiterLazyShow
|
324
|
+
);
|
325
|
+
|
326
|
+
owner.updateValueState();
|
327
|
+
},
|
328
|
+
|
329
|
+
updateCreditCardPropsByValue: function (value) {
|
330
|
+
var owner = this, pps = owner.properties,
|
331
|
+
Util = Cleave.Util,
|
332
|
+
creditCardInfo;
|
333
|
+
|
334
|
+
// At least one of the first 4 characters has changed
|
335
|
+
if (Util.headStr(pps.result, 4) === Util.headStr(value, 4)) {
|
336
|
+
return;
|
337
|
+
}
|
338
|
+
|
339
|
+
creditCardInfo = Cleave.CreditCardDetector.getInfo(value, pps.creditCardStrictMode);
|
340
|
+
|
341
|
+
pps.blocks = creditCardInfo.blocks;
|
342
|
+
pps.blocksLength = pps.blocks.length;
|
343
|
+
pps.maxLength = Util.getMaxLength(pps.blocks);
|
344
|
+
|
345
|
+
// credit card type changed
|
346
|
+
if (pps.creditCardType !== creditCardInfo.type) {
|
347
|
+
pps.creditCardType = creditCardInfo.type;
|
348
|
+
|
349
|
+
pps.onCreditCardTypeChanged.call(owner, pps.creditCardType);
|
350
|
+
}
|
351
|
+
},
|
352
|
+
|
353
|
+
updateValueState: function () {
|
354
|
+
var owner = this,
|
355
|
+
Util = Cleave.Util,
|
356
|
+
pps = owner.properties;
|
357
|
+
|
358
|
+
if (!owner.element) {
|
359
|
+
return;
|
360
|
+
}
|
361
|
+
|
362
|
+
var endPos = owner.element.selectionEnd;
|
363
|
+
var oldValue = owner.element.value;
|
364
|
+
var newValue = pps.result;
|
365
|
+
|
366
|
+
endPos = Util.getNextCursorPosition(endPos, oldValue, newValue, pps.delimiter, pps.delimiters);
|
367
|
+
|
368
|
+
// fix Android browser type="text" input field
|
369
|
+
// cursor not jumping issue
|
370
|
+
if (owner.isAndroid) {
|
371
|
+
window.setTimeout(function () {
|
372
|
+
owner.element.value = newValue;
|
373
|
+
Util.setSelection(owner.element, endPos, pps.document, false);
|
374
|
+
owner.callOnValueChanged();
|
375
|
+
}, 1);
|
376
|
+
|
377
|
+
return;
|
378
|
+
}
|
379
|
+
|
380
|
+
owner.element.value = newValue;
|
381
|
+
Util.setSelection(owner.element, endPos, pps.document, false);
|
382
|
+
owner.callOnValueChanged();
|
383
|
+
},
|
384
|
+
|
385
|
+
callOnValueChanged: function () {
|
386
|
+
var owner = this,
|
387
|
+
pps = owner.properties;
|
388
|
+
|
389
|
+
pps.onValueChanged.call(owner, {
|
390
|
+
target: {
|
391
|
+
value: pps.result,
|
392
|
+
rawValue: owner.getRawValue()
|
393
|
+
}
|
394
|
+
});
|
395
|
+
},
|
396
|
+
|
397
|
+
setPhoneRegionCode: function (phoneRegionCode) {
|
398
|
+
var owner = this, pps = owner.properties;
|
399
|
+
|
400
|
+
pps.phoneRegionCode = phoneRegionCode;
|
401
|
+
owner.initPhoneFormatter();
|
402
|
+
owner.onChange();
|
403
|
+
},
|
404
|
+
|
405
|
+
setRawValue: function (value) {
|
406
|
+
var owner = this, pps = owner.properties;
|
407
|
+
|
408
|
+
value = value !== undefined && value !== null ? value.toString() : '';
|
409
|
+
|
410
|
+
if (pps.numeral) {
|
411
|
+
value = value.replace('.', pps.numeralDecimalMark);
|
412
|
+
}
|
413
|
+
|
414
|
+
pps.backspace = false;
|
415
|
+
|
416
|
+
owner.element.value = value;
|
417
|
+
owner.onInput(value);
|
418
|
+
},
|
419
|
+
|
420
|
+
getRawValue: function () {
|
421
|
+
var owner = this,
|
422
|
+
pps = owner.properties,
|
423
|
+
Util = Cleave.Util,
|
424
|
+
rawValue = owner.element.value;
|
425
|
+
|
426
|
+
if (pps.rawValueTrimPrefix) {
|
427
|
+
rawValue = Util.getPrefixStrippedValue(rawValue, pps.prefix, pps.prefixLength, pps.result);
|
428
|
+
}
|
429
|
+
|
430
|
+
if (pps.numeral) {
|
431
|
+
rawValue = pps.numeralFormatter.getRawValue(rawValue);
|
432
|
+
} else {
|
433
|
+
rawValue = Util.stripDelimiters(rawValue, pps.delimiter, pps.delimiters);
|
434
|
+
}
|
435
|
+
|
436
|
+
return rawValue;
|
437
|
+
},
|
438
|
+
|
439
|
+
getISOFormatDate: function () {
|
440
|
+
var owner = this,
|
441
|
+
pps = owner.properties;
|
442
|
+
|
443
|
+
return pps.date ? pps.dateFormatter.getISOFormatDate() : '';
|
444
|
+
},
|
445
|
+
|
446
|
+
getFormattedValue: function () {
|
447
|
+
return this.element.value;
|
448
|
+
},
|
449
|
+
|
450
|
+
destroy: function () {
|
451
|
+
var owner = this;
|
452
|
+
|
453
|
+
owner.element.removeEventListener('input', owner.onChangeListener);
|
454
|
+
owner.element.removeEventListener('keydown', owner.onKeyDownListener);
|
455
|
+
owner.element.removeEventListener('focus', owner.onFocusListener);
|
456
|
+
owner.element.removeEventListener('cut', owner.onCutListener);
|
457
|
+
owner.element.removeEventListener('copy', owner.onCopyListener);
|
458
|
+
},
|
459
|
+
|
460
|
+
toString: function () {
|
461
|
+
return '[Cleave Object]';
|
462
|
+
}
|
463
|
+
};
|
464
|
+
|
465
|
+
Cleave.NumeralFormatter = __webpack_require__(1);
|
466
|
+
Cleave.DateFormatter = __webpack_require__(2);
|
467
|
+
Cleave.PhoneFormatter = __webpack_require__(3);
|
468
|
+
Cleave.CreditCardDetector = __webpack_require__(4);
|
469
|
+
Cleave.Util = __webpack_require__(5);
|
470
|
+
Cleave.DefaultProperties = __webpack_require__(6);
|
471
|
+
|
472
|
+
// for angular directive
|
473
|
+
((typeof global === 'object' && global) ? global : window)['Cleave'] = Cleave;
|
474
|
+
|
475
|
+
// CommonJS
|
476
|
+
module.exports = Cleave;
|
477
|
+
|
478
|
+
angular.module('cleave.js', [])
|
479
|
+
.directive('cleave', function () {
|
480
|
+
return {
|
481
|
+
restrict: 'A',
|
482
|
+
require: 'ngModel',
|
483
|
+
|
484
|
+
scope: {
|
485
|
+
cleave: '&',
|
486
|
+
onInit: '&?',
|
487
|
+
onValueChange: '&?'
|
488
|
+
},
|
489
|
+
|
490
|
+
compile: function () {
|
491
|
+
return {
|
492
|
+
pre: function ($scope, $element, attrs, ngModelCtrl) {
|
493
|
+
// eslint-disable-next-line
|
494
|
+
$scope.instance = new Cleave($element[0], $scope.cleave());
|
495
|
+
|
496
|
+
if ($scope.onInit) {
|
497
|
+
$scope.onInit()($scope.instance);
|
498
|
+
}
|
499
|
+
|
500
|
+
ngModelCtrl.$formatters.push(function (val) {
|
501
|
+
$scope.instance.setRawValue(val);
|
502
|
+
|
503
|
+
return $scope.instance.getFormattedValue();
|
504
|
+
});
|
505
|
+
|
506
|
+
ngModelCtrl.$parsers.push(function (newFormattedValue) {
|
507
|
+
if ($scope.onValueChange) {
|
508
|
+
$scope.onValueChange()(newFormattedValue);
|
509
|
+
}
|
510
|
+
|
511
|
+
return $scope.instance.getRawValue();
|
512
|
+
});
|
513
|
+
|
514
|
+
// Recreate cleave instance if any cleave options change
|
515
|
+
$scope.$watch(function() {
|
516
|
+
return $scope.cleave();
|
517
|
+
// eslint-disable-next-line
|
518
|
+
}, function (newOptions, oldOptions) {
|
519
|
+
$scope.instance.destroy();
|
520
|
+
// eslint-disable-next-line
|
521
|
+
$scope.instance = new Cleave($element[0], newOptions);
|
522
|
+
}, true);
|
523
|
+
|
524
|
+
$scope.$on('$destroy', function () {
|
525
|
+
|
526
|
+
$scope.instance.destroy();
|
527
|
+
$scope.instance = null;
|
528
|
+
});
|
529
|
+
}
|
530
|
+
};
|
531
|
+
}
|
532
|
+
};
|
533
|
+
});
|
534
|
+
|
535
|
+
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
536
|
+
|
537
|
+
/***/ }),
|
538
|
+
/* 1 */
|
539
|
+
/***/ (function(module, exports) {
|
540
|
+
|
541
|
+
'use strict';
|
542
|
+
|
543
|
+
var NumeralFormatter = function (numeralDecimalMark,
|
544
|
+
numeralIntegerScale,
|
545
|
+
numeralDecimalScale,
|
546
|
+
numeralThousandsGroupStyle,
|
547
|
+
numeralPositiveOnly,
|
548
|
+
stripLeadingZeroes,
|
549
|
+
delimiter) {
|
550
|
+
var owner = this;
|
551
|
+
|
552
|
+
owner.numeralDecimalMark = numeralDecimalMark || '.';
|
553
|
+
owner.numeralIntegerScale = numeralIntegerScale > 0 ? numeralIntegerScale : 0;
|
554
|
+
owner.numeralDecimalScale = numeralDecimalScale >= 0 ? numeralDecimalScale : 2;
|
555
|
+
owner.numeralThousandsGroupStyle = numeralThousandsGroupStyle || NumeralFormatter.groupStyle.thousand;
|
556
|
+
owner.numeralPositiveOnly = !!numeralPositiveOnly;
|
557
|
+
owner.stripLeadingZeroes = stripLeadingZeroes !== false;
|
558
|
+
owner.delimiter = (delimiter || delimiter === '') ? delimiter : ',';
|
559
|
+
owner.delimiterRE = delimiter ? new RegExp('\\' + delimiter, 'g') : '';
|
560
|
+
};
|
561
|
+
|
562
|
+
NumeralFormatter.groupStyle = {
|
563
|
+
thousand: 'thousand',
|
564
|
+
lakh: 'lakh',
|
565
|
+
wan: 'wan',
|
566
|
+
none: 'none'
|
567
|
+
};
|
568
|
+
|
569
|
+
NumeralFormatter.prototype = {
|
570
|
+
getRawValue: function (value) {
|
571
|
+
return value.replace(this.delimiterRE, '').replace(this.numeralDecimalMark, '.');
|
572
|
+
},
|
573
|
+
|
574
|
+
format: function (value) {
|
575
|
+
var owner = this, parts, partInteger, partDecimal = '';
|
576
|
+
|
577
|
+
// strip alphabet letters
|
578
|
+
value = value.replace(/[A-Za-z]/g, '')
|
579
|
+
// replace the first decimal mark with reserved placeholder
|
580
|
+
.replace(owner.numeralDecimalMark, 'M')
|
581
|
+
|
582
|
+
// strip non numeric letters except minus and "M"
|
583
|
+
// this is to ensure prefix has been stripped
|
584
|
+
.replace(/[^\dM-]/g, '')
|
585
|
+
|
586
|
+
// replace the leading minus with reserved placeholder
|
587
|
+
.replace(/^\-/, 'N')
|
588
|
+
|
589
|
+
// strip the other minus sign (if present)
|
590
|
+
.replace(/\-/g, '')
|
591
|
+
|
592
|
+
// replace the minus sign (if present)
|
593
|
+
.replace('N', owner.numeralPositiveOnly ? '' : '-')
|
594
|
+
|
595
|
+
// replace decimal mark
|
596
|
+
.replace('M', owner.numeralDecimalMark);
|
597
|
+
|
598
|
+
// strip any leading zeros
|
599
|
+
if (owner.stripLeadingZeroes) {
|
600
|
+
value = value.replace(/^(-)?0+(?=\d)/, '$1');
|
601
|
+
}
|
602
|
+
|
603
|
+
partInteger = value;
|
604
|
+
|
605
|
+
if (value.indexOf(owner.numeralDecimalMark) >= 0) {
|
606
|
+
parts = value.split(owner.numeralDecimalMark);
|
607
|
+
partInteger = parts[0];
|
608
|
+
partDecimal = owner.numeralDecimalMark + parts[1].slice(0, owner.numeralDecimalScale);
|
609
|
+
}
|
610
|
+
|
611
|
+
if (owner.numeralIntegerScale > 0) {
|
612
|
+
partInteger = partInteger.slice(0, owner.numeralIntegerScale + (value.slice(0, 1) === '-' ? 1 : 0));
|
613
|
+
}
|
614
|
+
|
615
|
+
switch (owner.numeralThousandsGroupStyle) {
|
616
|
+
case NumeralFormatter.groupStyle.lakh:
|
617
|
+
partInteger = partInteger.replace(/(\d)(?=(\d\d)+\d$)/g, '$1' + owner.delimiter);
|
618
|
+
|
619
|
+
break;
|
620
|
+
|
621
|
+
case NumeralFormatter.groupStyle.wan:
|
622
|
+
partInteger = partInteger.replace(/(\d)(?=(\d{4})+$)/g, '$1' + owner.delimiter);
|
623
|
+
|
624
|
+
break;
|
625
|
+
|
626
|
+
case NumeralFormatter.groupStyle.thousand:
|
627
|
+
partInteger = partInteger.replace(/(\d)(?=(\d{3})+$)/g, '$1' + owner.delimiter);
|
628
|
+
|
629
|
+
break;
|
630
|
+
}
|
631
|
+
|
632
|
+
return partInteger.toString() + (owner.numeralDecimalScale > 0 ? partDecimal.toString() : '');
|
633
|
+
}
|
634
|
+
};
|
635
|
+
|
636
|
+
module.exports = NumeralFormatter;
|
637
|
+
|
638
|
+
|
639
|
+
/***/ }),
|
640
|
+
/* 2 */
|
641
|
+
/***/ (function(module, exports) {
|
642
|
+
|
643
|
+
'use strict';
|
644
|
+
|
645
|
+
var DateFormatter = function (datePattern) {
|
646
|
+
var owner = this;
|
647
|
+
|
648
|
+
owner.date = [];
|
649
|
+
owner.blocks = [];
|
650
|
+
owner.datePattern = datePattern;
|
651
|
+
owner.initBlocks();
|
652
|
+
};
|
653
|
+
|
654
|
+
DateFormatter.prototype = {
|
655
|
+
initBlocks: function () {
|
656
|
+
var owner = this;
|
657
|
+
owner.datePattern.forEach(function (value) {
|
658
|
+
if (value === 'Y') {
|
659
|
+
owner.blocks.push(4);
|
660
|
+
} else {
|
661
|
+
owner.blocks.push(2);
|
662
|
+
}
|
663
|
+
});
|
664
|
+
},
|
665
|
+
|
666
|
+
getISOFormatDate: function () {
|
667
|
+
var owner = this,
|
668
|
+
date = owner.date;
|
669
|
+
|
670
|
+
return date[2] ? (
|
671
|
+
date[2] + '-' + owner.addLeadingZero(date[1]) + '-' + owner.addLeadingZero(date[0])
|
672
|
+
) : '';
|
673
|
+
},
|
674
|
+
|
675
|
+
getBlocks: function () {
|
676
|
+
return this.blocks;
|
677
|
+
},
|
678
|
+
|
679
|
+
getValidatedDate: function (value) {
|
680
|
+
var owner = this, result = '';
|
681
|
+
|
682
|
+
value = value.replace(/[^\d]/g, '');
|
683
|
+
|
684
|
+
owner.blocks.forEach(function (length, index) {
|
685
|
+
if (value.length > 0) {
|
686
|
+
var sub = value.slice(0, length),
|
687
|
+
sub0 = sub.slice(0, 1),
|
688
|
+
rest = value.slice(length);
|
689
|
+
|
690
|
+
switch (owner.datePattern[index]) {
|
691
|
+
case 'd':
|
692
|
+
if (sub === '00') {
|
693
|
+
sub = '01';
|
694
|
+
} else if (parseInt(sub0, 10) > 3) {
|
695
|
+
sub = '0' + sub0;
|
696
|
+
} else if (parseInt(sub, 10) > 31) {
|
697
|
+
sub = '31';
|
698
|
+
}
|
699
|
+
|
700
|
+
break;
|
701
|
+
|
702
|
+
case 'm':
|
703
|
+
if (sub === '00') {
|
704
|
+
sub = '01';
|
705
|
+
} else if (parseInt(sub0, 10) > 1) {
|
706
|
+
sub = '0' + sub0;
|
707
|
+
} else if (parseInt(sub, 10) > 12) {
|
708
|
+
sub = '12';
|
709
|
+
}
|
710
|
+
|
711
|
+
break;
|
712
|
+
}
|
713
|
+
|
714
|
+
result += sub;
|
715
|
+
|
716
|
+
// update remaining string
|
717
|
+
value = rest;
|
718
|
+
}
|
719
|
+
});
|
720
|
+
|
721
|
+
return this.getFixedDateString(result);
|
722
|
+
},
|
723
|
+
|
724
|
+
getFixedDateString: function (value) {
|
725
|
+
var owner = this, datePattern = owner.datePattern, date = [],
|
726
|
+
dayIndex = 0, monthIndex = 0, yearIndex = 0,
|
727
|
+
dayStartIndex = 0, monthStartIndex = 0, yearStartIndex = 0,
|
728
|
+
day, month, year, fullYearDone = false;
|
729
|
+
|
730
|
+
// mm-dd || dd-mm
|
731
|
+
if (value.length === 4 && datePattern[0].toLowerCase() !== 'y' && datePattern[1].toLowerCase() !== 'y') {
|
732
|
+
dayStartIndex = datePattern[0] === 'd' ? 0 : 2;
|
733
|
+
monthStartIndex = 2 - dayStartIndex;
|
734
|
+
day = parseInt(value.slice(dayStartIndex, dayStartIndex + 2), 10);
|
735
|
+
month = parseInt(value.slice(monthStartIndex, monthStartIndex + 2), 10);
|
736
|
+
|
737
|
+
date = this.getFixedDate(day, month, 0);
|
738
|
+
}
|
739
|
+
|
740
|
+
// yyyy-mm-dd || yyyy-dd-mm || mm-dd-yyyy || dd-mm-yyyy || dd-yyyy-mm || mm-yyyy-dd
|
741
|
+
if (value.length === 8) {
|
742
|
+
datePattern.forEach(function (type, index) {
|
743
|
+
switch (type) {
|
744
|
+
case 'd':
|
745
|
+
dayIndex = index;
|
746
|
+
break;
|
747
|
+
case 'm':
|
748
|
+
monthIndex = index;
|
749
|
+
break;
|
750
|
+
default:
|
751
|
+
yearIndex = index;
|
752
|
+
break;
|
753
|
+
}
|
754
|
+
});
|
755
|
+
|
756
|
+
yearStartIndex = yearIndex * 2;
|
757
|
+
dayStartIndex = (dayIndex <= yearIndex) ? dayIndex * 2 : (dayIndex * 2 + 2);
|
758
|
+
monthStartIndex = (monthIndex <= yearIndex) ? monthIndex * 2 : (monthIndex * 2 + 2);
|
759
|
+
|
760
|
+
day = parseInt(value.slice(dayStartIndex, dayStartIndex + 2), 10);
|
761
|
+
month = parseInt(value.slice(monthStartIndex, monthStartIndex + 2), 10);
|
762
|
+
year = parseInt(value.slice(yearStartIndex, yearStartIndex + 4), 10);
|
763
|
+
|
764
|
+
fullYearDone = value.slice(yearStartIndex, yearStartIndex + 4).length === 4;
|
765
|
+
|
766
|
+
date = this.getFixedDate(day, month, year);
|
767
|
+
}
|
768
|
+
|
769
|
+
owner.date = date;
|
770
|
+
|
771
|
+
return date.length === 0 ? value : datePattern.reduce(function (previous, current) {
|
772
|
+
switch (current) {
|
773
|
+
case 'd':
|
774
|
+
return previous + owner.addLeadingZero(date[0]);
|
775
|
+
case 'm':
|
776
|
+
return previous + owner.addLeadingZero(date[1]);
|
777
|
+
default:
|
778
|
+
return previous + (fullYearDone ? owner.addLeadingZeroForYear(date[2]) : '');
|
779
|
+
}
|
780
|
+
}, '');
|
781
|
+
},
|
782
|
+
|
783
|
+
getFixedDate: function (day, month, year) {
|
784
|
+
day = Math.min(day, 31);
|
785
|
+
month = Math.min(month, 12);
|
786
|
+
year = parseInt((year || 0), 10);
|
787
|
+
|
788
|
+
if ((month < 7 && month % 2 === 0) || (month > 8 && month % 2 === 1)) {
|
789
|
+
day = Math.min(day, month === 2 ? (this.isLeapYear(year) ? 29 : 28) : 30);
|
790
|
+
}
|
791
|
+
|
792
|
+
return [day, month, year];
|
793
|
+
},
|
794
|
+
|
795
|
+
isLeapYear: function (year) {
|
796
|
+
return ((year % 4 === 0) && (year % 100 !== 0)) || (year % 400 === 0);
|
797
|
+
},
|
798
|
+
|
799
|
+
addLeadingZero: function (number) {
|
800
|
+
return (number < 10 ? '0' : '') + number;
|
801
|
+
},
|
802
|
+
|
803
|
+
addLeadingZeroForYear: function (number) {
|
804
|
+
return (number < 10 ? '000' : (number < 100 ? '00' : (number < 1000 ? '0' : ''))) + number;
|
805
|
+
}
|
806
|
+
};
|
807
|
+
|
808
|
+
module.exports = DateFormatter;
|
809
|
+
|
810
|
+
|
811
|
+
|
812
|
+
/***/ }),
|
813
|
+
/* 3 */
|
814
|
+
/***/ (function(module, exports) {
|
815
|
+
|
816
|
+
'use strict';
|
817
|
+
|
818
|
+
var PhoneFormatter = function (formatter, delimiter) {
|
819
|
+
var owner = this;
|
820
|
+
|
821
|
+
owner.delimiter = (delimiter || delimiter === '') ? delimiter : ' ';
|
822
|
+
owner.delimiterRE = delimiter ? new RegExp('\\' + delimiter, 'g') : '';
|
823
|
+
|
824
|
+
owner.formatter = formatter;
|
825
|
+
};
|
826
|
+
|
827
|
+
PhoneFormatter.prototype = {
|
828
|
+
setFormatter: function (formatter) {
|
829
|
+
this.formatter = formatter;
|
830
|
+
},
|
831
|
+
|
832
|
+
format: function (phoneNumber) {
|
833
|
+
var owner = this;
|
834
|
+
|
835
|
+
owner.formatter.clear();
|
836
|
+
|
837
|
+
// only keep number and +
|
838
|
+
phoneNumber = phoneNumber.replace(/[^\d+]/g, '');
|
839
|
+
|
840
|
+
// strip delimiter
|
841
|
+
phoneNumber = phoneNumber.replace(owner.delimiterRE, '');
|
842
|
+
|
843
|
+
var result = '', current, validated = false;
|
844
|
+
|
845
|
+
for (var i = 0, iMax = phoneNumber.length; i < iMax; i++) {
|
846
|
+
current = owner.formatter.inputDigit(phoneNumber.charAt(i));
|
847
|
+
|
848
|
+
// has ()- or space inside
|
849
|
+
if (/[\s()-]/g.test(current)) {
|
850
|
+
result = current;
|
851
|
+
|
852
|
+
validated = true;
|
853
|
+
} else {
|
854
|
+
if (!validated) {
|
855
|
+
result = current;
|
856
|
+
}
|
857
|
+
// else: over length input
|
858
|
+
// it turns to invalid number again
|
859
|
+
}
|
860
|
+
}
|
861
|
+
|
862
|
+
// strip ()
|
863
|
+
// e.g. US: 7161234567 returns (716) 123-4567
|
864
|
+
result = result.replace(/[()]/g, '');
|
865
|
+
// replace library delimiter with user customized delimiter
|
866
|
+
result = result.replace(/[\s-]/g, owner.delimiter);
|
867
|
+
|
868
|
+
return result;
|
869
|
+
}
|
870
|
+
};
|
871
|
+
|
872
|
+
module.exports = PhoneFormatter;
|
873
|
+
|
874
|
+
|
875
|
+
|
876
|
+
/***/ }),
|
877
|
+
/* 4 */
|
878
|
+
/***/ (function(module, exports) {
|
879
|
+
|
880
|
+
'use strict';
|
881
|
+
|
882
|
+
var CreditCardDetector = {
|
883
|
+
blocks: {
|
884
|
+
uatp: [4, 5, 6],
|
885
|
+
amex: [4, 6, 5],
|
886
|
+
diners: [4, 6, 4],
|
887
|
+
discover: [4, 4, 4, 4],
|
888
|
+
mastercard: [4, 4, 4, 4],
|
889
|
+
dankort: [4, 4, 4, 4],
|
890
|
+
instapayment: [4, 4, 4, 4],
|
891
|
+
jcb15: [4, 6, 5],
|
892
|
+
jcb: [4, 4, 4, 4],
|
893
|
+
maestro: [4, 4, 4, 4],
|
894
|
+
visa: [4, 4, 4, 4],
|
895
|
+
mir: [4, 4, 4, 4],
|
896
|
+
unionPay: [4, 4, 4, 4],
|
897
|
+
general: [4, 4, 4, 4],
|
898
|
+
generalStrict: [4, 4, 4, 7]
|
899
|
+
},
|
900
|
+
|
901
|
+
re: {
|
902
|
+
// starts with 1; 15 digits, not starts with 1800 (jcb card)
|
903
|
+
uatp: /^(?!1800)1\d{0,14}/,
|
904
|
+
|
905
|
+
// starts with 34/37; 15 digits
|
906
|
+
amex: /^3[47]\d{0,13}/,
|
907
|
+
|
908
|
+
// starts with 6011/65/644-649; 16 digits
|
909
|
+
discover: /^(?:6011|65\d{0,2}|64[4-9]\d?)\d{0,12}/,
|
910
|
+
|
911
|
+
// starts with 300-305/309 or 36/38/39; 14 digits
|
912
|
+
diners: /^3(?:0([0-5]|9)|[689]\d?)\d{0,11}/,
|
913
|
+
|
914
|
+
// starts with 51-55/2221–2720; 16 digits
|
915
|
+
mastercard: /^(5[1-5]\d{0,2}|22[2-9]\d{0,1}|2[3-7]\d{0,2})\d{0,12}/,
|
916
|
+
|
917
|
+
// starts with 5019/4175/4571; 16 digits
|
918
|
+
dankort: /^(5019|4175|4571)\d{0,12}/,
|
919
|
+
|
920
|
+
// starts with 637-639; 16 digits
|
921
|
+
instapayment: /^63[7-9]\d{0,13}/,
|
922
|
+
|
923
|
+
// starts with 2131/1800; 15 digits
|
924
|
+
jcb15: /^(?:2131|1800)\d{0,11}/,
|
925
|
+
|
926
|
+
// starts with 2131/1800/35; 16 digits
|
927
|
+
jcb: /^(?:35\d{0,2})\d{0,12}/,
|
928
|
+
|
929
|
+
// starts with 50/56-58/6304/67; 16 digits
|
930
|
+
maestro: /^(?:5[0678]\d{0,2}|6304|67\d{0,2})\d{0,12}/,
|
931
|
+
|
932
|
+
// starts with 22; 16 digits
|
933
|
+
mir: /^220[0-4]\d{0,12}/,
|
934
|
+
|
935
|
+
// starts with 4; 16 digits
|
936
|
+
visa: /^4\d{0,15}/,
|
937
|
+
|
938
|
+
// starts with 62; 16 digits
|
939
|
+
unionPay: /^62\d{0,14}/
|
940
|
+
},
|
941
|
+
|
942
|
+
getInfo: function (value, strictMode) {
|
943
|
+
var blocks = CreditCardDetector.blocks,
|
944
|
+
re = CreditCardDetector.re;
|
945
|
+
|
946
|
+
// Some credit card can have up to 19 digits number.
|
947
|
+
// Set strictMode to true will remove the 16 max-length restrain,
|
948
|
+
// however, I never found any website validate card number like
|
949
|
+
// this, hence probably you don't want to enable this option.
|
950
|
+
strictMode = !!strictMode;
|
951
|
+
|
952
|
+
for (var key in re) {
|
953
|
+
if (re[key].test(value)) {
|
954
|
+
var block;
|
955
|
+
|
956
|
+
if (strictMode) {
|
957
|
+
block = blocks.generalStrict;
|
958
|
+
} else {
|
959
|
+
block = blocks[key];
|
960
|
+
}
|
961
|
+
|
962
|
+
return {
|
963
|
+
type: key,
|
964
|
+
blocks: block
|
965
|
+
};
|
966
|
+
}
|
967
|
+
}
|
968
|
+
|
969
|
+
return {
|
970
|
+
type: 'unknown',
|
971
|
+
blocks: strictMode ? blocks.generalStrict : blocks.general
|
972
|
+
};
|
973
|
+
}
|
974
|
+
};
|
975
|
+
|
976
|
+
module.exports = CreditCardDetector;
|
977
|
+
|
978
|
+
|
979
|
+
/***/ }),
|
980
|
+
/* 5 */
|
981
|
+
/***/ (function(module, exports) {
|
982
|
+
|
983
|
+
'use strict';
|
984
|
+
|
985
|
+
var Util = {
|
986
|
+
noop: function () {
|
987
|
+
},
|
988
|
+
|
989
|
+
strip: function (value, re) {
|
990
|
+
return value.replace(re, '');
|
991
|
+
},
|
992
|
+
|
993
|
+
isDelimiter: function (letter, delimiter, delimiters) {
|
994
|
+
// single delimiter
|
995
|
+
if (delimiters.length === 0) {
|
996
|
+
return letter === delimiter;
|
997
|
+
}
|
998
|
+
|
999
|
+
// multiple delimiters
|
1000
|
+
return delimiters.some(function (current) {
|
1001
|
+
if (letter === current) {
|
1002
|
+
return true;
|
1003
|
+
}
|
1004
|
+
});
|
1005
|
+
},
|
1006
|
+
|
1007
|
+
getDelimiterREByDelimiter: function (delimiter) {
|
1008
|
+
return new RegExp(delimiter.replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1'), 'g');
|
1009
|
+
},
|
1010
|
+
|
1011
|
+
getNextCursorPosition: function (prevPos, oldValue, newValue, delimiter, delimiters) {
|
1012
|
+
// If cursor was at the end of value, just place it back.
|
1013
|
+
// Because new value could contain additional chars.
|
1014
|
+
if (oldValue.length === prevPos) {
|
1015
|
+
return newValue.length;
|
1016
|
+
}
|
1017
|
+
|
1018
|
+
return prevPos + this.getPositionOffset(prevPos, oldValue, newValue, delimiter ,delimiters);
|
1019
|
+
},
|
1020
|
+
|
1021
|
+
getPositionOffset: function (prevPos, oldValue, newValue, delimiter, delimiters) {
|
1022
|
+
var oldRawValue, newRawValue, lengthOffset;
|
1023
|
+
|
1024
|
+
oldRawValue = this.stripDelimiters(oldValue.slice(0, prevPos), delimiter, delimiters);
|
1025
|
+
newRawValue = this.stripDelimiters(newValue.slice(0, prevPos), delimiter, delimiters);
|
1026
|
+
lengthOffset = oldRawValue.length - newRawValue.length;
|
1027
|
+
|
1028
|
+
return (lengthOffset !== 0) ? (lengthOffset / Math.abs(lengthOffset)) : 0;
|
1029
|
+
},
|
1030
|
+
|
1031
|
+
stripDelimiters: function (value, delimiter, delimiters) {
|
1032
|
+
var owner = this;
|
1033
|
+
|
1034
|
+
// single delimiter
|
1035
|
+
if (delimiters.length === 0) {
|
1036
|
+
var delimiterRE = delimiter ? owner.getDelimiterREByDelimiter(delimiter) : '';
|
1037
|
+
|
1038
|
+
return value.replace(delimiterRE, '');
|
1039
|
+
}
|
1040
|
+
|
1041
|
+
// multiple delimiters
|
1042
|
+
delimiters.forEach(function (current) {
|
1043
|
+
value = value.replace(owner.getDelimiterREByDelimiter(current), '');
|
1044
|
+
});
|
1045
|
+
|
1046
|
+
return value;
|
1047
|
+
},
|
1048
|
+
|
1049
|
+
headStr: function (str, length) {
|
1050
|
+
return str.slice(0, length);
|
1051
|
+
},
|
1052
|
+
|
1053
|
+
getMaxLength: function (blocks) {
|
1054
|
+
return blocks.reduce(function (previous, current) {
|
1055
|
+
return previous + current;
|
1056
|
+
}, 0);
|
1057
|
+
},
|
1058
|
+
|
1059
|
+
// strip value by prefix length
|
1060
|
+
// for prefix: PRE
|
1061
|
+
// (PRE123, 3) -> 123
|
1062
|
+
// (PR123, 3) -> 23 this happens when user hits backspace in front of "PRE"
|
1063
|
+
getPrefixStrippedValue: function (value, prefix, prefixLength, prevValue) {
|
1064
|
+
if (value.slice(0, prefixLength) !== prefix) {
|
1065
|
+
|
1066
|
+
// Check whether if it is a deletion
|
1067
|
+
if (value.length < prevValue.length) {
|
1068
|
+
value = value.length > prefixLength ? prevValue : prefix;
|
1069
|
+
} else {
|
1070
|
+
var diffIndex = this.getFirstDiffIndex(prefix, value.slice(0, prefixLength));
|
1071
|
+
value = prefix + value.slice(diffIndex, diffIndex + 1) + value.slice(prefixLength + 1);
|
1072
|
+
}
|
1073
|
+
}
|
1074
|
+
|
1075
|
+
return value.slice(prefixLength);
|
1076
|
+
},
|
1077
|
+
|
1078
|
+
getFirstDiffIndex: function (prev, current) {
|
1079
|
+
var index = 0;
|
1080
|
+
|
1081
|
+
while (prev.charAt(index) === current.charAt(index)) {
|
1082
|
+
if (prev.charAt(index++) === '') {
|
1083
|
+
return -1;
|
1084
|
+
}
|
1085
|
+
}
|
1086
|
+
|
1087
|
+
return index;
|
1088
|
+
},
|
1089
|
+
|
1090
|
+
getFormattedValue: function (value, blocks, blocksLength, delimiter, delimiters, delimiterLazyShow) {
|
1091
|
+
var result = '',
|
1092
|
+
multipleDelimiters = delimiters.length > 0,
|
1093
|
+
currentDelimiter;
|
1094
|
+
|
1095
|
+
// no options, normal input
|
1096
|
+
if (blocksLength === 0) {
|
1097
|
+
return value;
|
1098
|
+
}
|
1099
|
+
|
1100
|
+
blocks.forEach(function (length, index) {
|
1101
|
+
if (value.length > 0) {
|
1102
|
+
var sub = value.slice(0, length),
|
1103
|
+
rest = value.slice(length);
|
1104
|
+
|
1105
|
+
if (multipleDelimiters) {
|
1106
|
+
currentDelimiter = delimiters[delimiterLazyShow ? (index - 1) : index] || currentDelimiter;
|
1107
|
+
} else {
|
1108
|
+
currentDelimiter = delimiter;
|
1109
|
+
}
|
1110
|
+
|
1111
|
+
if (delimiterLazyShow) {
|
1112
|
+
if (index > 0) {
|
1113
|
+
result += currentDelimiter;
|
1114
|
+
}
|
1115
|
+
|
1116
|
+
result += sub;
|
1117
|
+
} else {
|
1118
|
+
result += sub;
|
1119
|
+
|
1120
|
+
if (sub.length === length && index < blocksLength - 1) {
|
1121
|
+
result += currentDelimiter;
|
1122
|
+
}
|
1123
|
+
}
|
1124
|
+
|
1125
|
+
// update remaining string
|
1126
|
+
value = rest;
|
1127
|
+
}
|
1128
|
+
});
|
1129
|
+
|
1130
|
+
return result;
|
1131
|
+
},
|
1132
|
+
|
1133
|
+
// move cursor to the end
|
1134
|
+
// the first time user focuses on an input with prefix
|
1135
|
+
fixPrefixCursor: function (el, prefix, delimiter, delimiters) {
|
1136
|
+
if (!el) {
|
1137
|
+
return;
|
1138
|
+
}
|
1139
|
+
|
1140
|
+
var val = el.value,
|
1141
|
+
appendix = delimiter || (delimiters[0] || ' ');
|
1142
|
+
|
1143
|
+
if (!el.setSelectionRange || !prefix || (prefix.length + appendix.length) < val.length) {
|
1144
|
+
return;
|
1145
|
+
}
|
1146
|
+
|
1147
|
+
var len = val.length * 2;
|
1148
|
+
|
1149
|
+
// set timeout to avoid blink
|
1150
|
+
setTimeout(function () {
|
1151
|
+
el.setSelectionRange(len, len);
|
1152
|
+
}, 1);
|
1153
|
+
},
|
1154
|
+
|
1155
|
+
setSelection: function (element, position, doc) {
|
1156
|
+
if (element !== doc.activeElement) {
|
1157
|
+
return;
|
1158
|
+
}
|
1159
|
+
|
1160
|
+
// cursor is already in the end
|
1161
|
+
if (element && element.value.length <= position) {
|
1162
|
+
return;
|
1163
|
+
}
|
1164
|
+
|
1165
|
+
if (element.createTextRange) {
|
1166
|
+
var range = element.createTextRange();
|
1167
|
+
|
1168
|
+
range.move('character', position);
|
1169
|
+
range.select();
|
1170
|
+
} else {
|
1171
|
+
try {
|
1172
|
+
element.setSelectionRange(position, position);
|
1173
|
+
} catch (e) {
|
1174
|
+
// eslint-disable-next-line
|
1175
|
+
console.warn('The input element type does not support selection');
|
1176
|
+
}
|
1177
|
+
}
|
1178
|
+
},
|
1179
|
+
|
1180
|
+
isAndroid: function () {
|
1181
|
+
return navigator && /android/i.test(navigator.userAgent);
|
1182
|
+
},
|
1183
|
+
|
1184
|
+
// On Android chrome, the keyup and keydown events
|
1185
|
+
// always return key code 229 as a composition that
|
1186
|
+
// buffers the user’s keystrokes
|
1187
|
+
// see https://github.com/nosir/cleave.js/issues/147
|
1188
|
+
isAndroidBackspaceKeydown: function (lastInputValue, currentInputValue) {
|
1189
|
+
if (!this.isAndroid() || !lastInputValue || !currentInputValue) {
|
1190
|
+
return false;
|
1191
|
+
}
|
1192
|
+
|
1193
|
+
return currentInputValue === lastInputValue.slice(0, -1);
|
1194
|
+
}
|
1195
|
+
};
|
1196
|
+
|
1197
|
+
module.exports = Util;
|
1198
|
+
|
1199
|
+
|
1200
|
+
/***/ }),
|
1201
|
+
/* 6 */
|
1202
|
+
/***/ (function(module, exports) {
|
1203
|
+
|
1204
|
+
/* WEBPACK VAR INJECTION */(function(global) {'use strict';
|
1205
|
+
|
1206
|
+
/**
|
1207
|
+
* Props Assignment
|
1208
|
+
*
|
1209
|
+
* Separate this, so react module can share the usage
|
1210
|
+
*/
|
1211
|
+
var DefaultProperties = {
|
1212
|
+
// Maybe change to object-assign
|
1213
|
+
// for now just keep it as simple
|
1214
|
+
assign: function (target, opts) {
|
1215
|
+
target = target || {};
|
1216
|
+
opts = opts || {};
|
1217
|
+
|
1218
|
+
// credit card
|
1219
|
+
target.creditCard = !!opts.creditCard;
|
1220
|
+
target.creditCardStrictMode = !!opts.creditCardStrictMode;
|
1221
|
+
target.creditCardType = '';
|
1222
|
+
target.onCreditCardTypeChanged = opts.onCreditCardTypeChanged || (function () {});
|
1223
|
+
|
1224
|
+
// phone
|
1225
|
+
target.phone = !!opts.phone;
|
1226
|
+
target.phoneRegionCode = opts.phoneRegionCode || 'AU';
|
1227
|
+
target.phoneFormatter = {};
|
1228
|
+
|
1229
|
+
// date
|
1230
|
+
target.date = !!opts.date;
|
1231
|
+
target.datePattern = opts.datePattern || ['d', 'm', 'Y'];
|
1232
|
+
target.dateFormatter = {};
|
1233
|
+
|
1234
|
+
// numeral
|
1235
|
+
target.numeral = !!opts.numeral;
|
1236
|
+
target.numeralIntegerScale = opts.numeralIntegerScale > 0 ? opts.numeralIntegerScale : 0;
|
1237
|
+
target.numeralDecimalScale = opts.numeralDecimalScale >= 0 ? opts.numeralDecimalScale : 2;
|
1238
|
+
target.numeralDecimalMark = opts.numeralDecimalMark || '.';
|
1239
|
+
target.numeralThousandsGroupStyle = opts.numeralThousandsGroupStyle || 'thousand';
|
1240
|
+
target.numeralPositiveOnly = !!opts.numeralPositiveOnly;
|
1241
|
+
target.stripLeadingZeroes = opts.stripLeadingZeroes !== false;
|
1242
|
+
|
1243
|
+
// others
|
1244
|
+
target.numericOnly = target.creditCard || target.date || !!opts.numericOnly;
|
1245
|
+
|
1246
|
+
target.uppercase = !!opts.uppercase;
|
1247
|
+
target.lowercase = !!opts.lowercase;
|
1248
|
+
|
1249
|
+
target.prefix = (target.creditCard || target.date) ? '' : (opts.prefix || '');
|
1250
|
+
target.noImmediatePrefix = !!opts.noImmediatePrefix;
|
1251
|
+
target.prefixLength = target.prefix.length;
|
1252
|
+
target.rawValueTrimPrefix = !!opts.rawValueTrimPrefix;
|
1253
|
+
target.copyDelimiter = !!opts.copyDelimiter;
|
1254
|
+
|
1255
|
+
target.initValue = (opts.initValue !== undefined && opts.initValue !== null) ? opts.initValue.toString() : '';
|
1256
|
+
|
1257
|
+
target.delimiter =
|
1258
|
+
(opts.delimiter || opts.delimiter === '') ? opts.delimiter :
|
1259
|
+
(opts.date ? '/' :
|
1260
|
+
(opts.numeral ? ',' :
|
1261
|
+
(opts.phone ? ' ' :
|
1262
|
+
' ')));
|
1263
|
+
target.delimiterLength = target.delimiter.length;
|
1264
|
+
target.delimiterLazyShow = !!opts.delimiterLazyShow;
|
1265
|
+
target.delimiters = opts.delimiters || [];
|
1266
|
+
|
1267
|
+
target.blocks = opts.blocks || [];
|
1268
|
+
target.blocksLength = target.blocks.length;
|
1269
|
+
|
1270
|
+
target.document = opts.document || document;
|
1271
|
+
target.root = (typeof global === 'object' && global) ? global : window;
|
1272
|
+
|
1273
|
+
target.maxLength = 0;
|
1274
|
+
|
1275
|
+
target.backspace = false;
|
1276
|
+
target.result = '';
|
1277
|
+
|
1278
|
+
target.onValueChanged = opts.onValueChanged || (function () {});
|
1279
|
+
|
1280
|
+
return target;
|
1281
|
+
}
|
1282
|
+
};
|
1283
|
+
|
1284
|
+
module.exports = DefaultProperties;
|
1285
|
+
|
1286
|
+
|
1287
|
+
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
1288
|
+
|
1289
|
+
/***/ })
|
1290
|
+
/******/ ])
|
1291
|
+
});
|
1292
|
+
;
|