@pdftron/pdfjs-express 8.7.1 → 8.7.3

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.
@@ -1,41 +1,41 @@
1
1
  /** Notice * This file contains works from many authors under various (but compatible) licenses. Please see core.txt for more information. **/
2
2
  (function(){(window.wpCoreControlsBundle=window.wpCoreControlsBundle||[]).push([[16],{445:function(ia,ba,e){function ea(){return!1}function x(e,f,h){if(!(f in fa))return!0;f=fa[f];for(var n=0;n<f.length;n++){var r=e;var w=f[n];var x=h;if(w.name in r){var y="",z=!1;r=r[w.name];switch(w.type){case "s":y="String";z=Object(ca.isString)(r);break;case "a":y="Array";z=Object(ca.isArray)(r);break;case "n":y="Number";z=Object(ca.isNumber)(r)&&Object(ca.isFinite)(r);break;case "o":y="Object",z=Object(ca.isObject)(r)&&
3
3
  !Object(ca.isArray)(r)}z||x.reject('Expected response field "'+w.name+'" to have type '+y);w=z}else x.reject('Response missing field "'+w.name+'"'),w=!1;if(!w)return!1}return!0}e.r(ba);var ha=e(1),ca=e(0);e.n(ca);var da=e(2);ia=e(51);var aa=e(34),w=e(463),y=e(94),n=e(376),h=e(40),f=e(163),r=function(){function e(){this.request=this.result=null;this.state=0;var e=this;e.promise=new Promise(function(f,h){e.resolve=function(){if(0===e.state||4===e.state)e.state=1,e.result=arguments[0],f.apply(null,arguments)};
4
- e.reject=function(){if(0===e.state||4===e.state)e.state=2,h.apply(null,arguments)}})}e.prototype.ht=function(){return 1===(this.state&1)};e.prototype.Oda=function(){return 2===(this.state&2)};e.prototype.Xi=function(){return!this.Oda()&&!this.ht()};e.prototype.pda=function(){return 4===(this.state&4)};e.prototype.iM=function(){this.state|=4};return e}(),z=function(){function e(){this.Rs={};this.Hb=[]}e.prototype.pop=function(){var e=this.Hb.pop();this.Rs[e.key]=void 0;return e};e.prototype.push=function(e,
5
- f){f={key:e,data:f};this.Hb.push(f);this.Rs[e]=f.data};e.prototype.contains=function(e){return!!this.Rs[e]};e.prototype.get=function(e){return this.Rs[e]};e.prototype.set=function(e,f){var h=this;this.Rs[e]=f;this.Hb.forEach(function(f,n){f.key===e&&(h.Hb[n]=f)})};e.prototype.remove=function(e){var f=this;this.Rs[e]=void 0;this.Hb.forEach(function(h,n){h.key===e&&f.Hb.splice(n,1)})};e.prototype.length=function(){return this.Hb.length};return e}(),fa={pages:[{name:"pages",type:"a"}],pdf:[{name:"url",
4
+ e.reject=function(){if(0===e.state||4===e.state)e.state=2,h.apply(null,arguments)}})}e.prototype.ht=function(){return 1===(this.state&1)};e.prototype.Pda=function(){return 2===(this.state&2)};e.prototype.Xi=function(){return!this.Pda()&&!this.ht()};e.prototype.qda=function(){return 4===(this.state&4)};e.prototype.iM=function(){this.state|=4};return e}(),z=function(){function e(){this.Rs={};this.Ib=[]}e.prototype.pop=function(){var e=this.Ib.pop();this.Rs[e.key]=void 0;return e};e.prototype.push=function(e,
5
+ f){f={key:e,data:f};this.Ib.push(f);this.Rs[e]=f.data};e.prototype.contains=function(e){return!!this.Rs[e]};e.prototype.get=function(e){return this.Rs[e]};e.prototype.set=function(e,f){var h=this;this.Rs[e]=f;this.Ib.forEach(function(f,n){f.key===e&&(h.Ib[n]=f)})};e.prototype.remove=function(e){var f=this;this.Rs[e]=void 0;this.Ib.forEach(function(h,n){h.key===e&&f.Ib.splice(n,1)})};e.prototype.length=function(){return this.Ib.length};return e}(),fa={pages:[{name:"pages",type:"a"}],pdf:[{name:"url",
6
6
  type:"s"}],docmod:[{name:"url",type:"s"},{name:"rID",type:"s"}],health:[],tiles:[{name:"z",type:"n"},{name:"rID",type:"n"},{name:"tiles",type:"a"},{name:"size",type:"n"}],cAnnots:[{name:"annots",type:"a"}],annots:[{name:"url",type:"s"},{name:"name",type:"s"}],image:[{name:"url",type:"s"},{name:"name",type:"s"},{name:"p",type:"n"}],text:[{name:"url",type:"s"},{name:"name",type:"s"},{name:"p",type:"n"}],ApString2Xod:[{name:"url",type:"s"},{name:"rID",type:"s"}]};e=function(){function e(e,f,n){var x=
7
- this;this.JM=this.bS=!1;this.lh=this.iF=this.vu=this.KK=this.nH=this.Mm=null;this.om=new r;this.Ep=new r;this.nB=!1;this.Bf=this.De=this.Ee=this.tf=null;this.Tf=[];this.ZB=[];this.cache={};this.timeStamp=0;this.fh=[];this.gj=[];this.rI=null;this.QR=!1;this.uY=this.id=null;this.wK=this.uU=ea;this.ei=0;this.BJ=!1;this.XV=1;this.cj={};this.Pr=0;this.Lt=new z;f.endsWith("/")||(f+="/");n=n||{};this.bS=n.disableWebsockets||!1;this.JM=n.singleServerMode||!1;null!=n.customQueryParameters&&Object(h.b)("wvsQueryParameters",
8
- n.customQueryParameters);f.endsWith("blackbox/")||(f+="blackbox/");this.Mm=n.uploadData||null;this.vu=n.uriData||null;this.nH=n.cacheKey||null;this.KK=n.officeOptions||null;this.Ve=f;this.UH=e;this.Eo(!0);this.es=(new w.a(f,null,this.Ph())).K$(!this.bS,function(e){x.ffa(e)},function(){return null},function(){x.nB=!1},function(){x.hia()})}e.prototype.n7=function(){var e=this;return new Promise(function(f,h){var n=new XMLHttpRequest;n.open("GET",e.Ve+"ck");n.withCredentials=e.Ph();n.onreadystatechange=
9
- function(){n.readyState===XMLHttpRequest.DONE&&(200===n.status?f():h())};n.send()})};e.prototype.Jja=function(e){this.uU=e||ea;this.wK=ea};e.prototype.g6=function(){this.YX();return this.es.Np(!0)};e.prototype.YX=function(){Object(ha.b)(this,void 0,void 0,function(){return Object(ha.d)(this,function(e){switch(e.label){case 0:return this.Ep=new r,this.om=new r,this.nB=!1,this.id=null,this.QR=!1,[4,this.n7()];case 1:return e.ea(),[2]}})})};e.prototype.hia=function(){this.uU();this.YX();this.tf&&(this.tf.Xi()?
10
- this.rh(this.tf.request):this.tf.ht()&&this.wK(this.tf.result.url,"pdf")&&(this.tf=null,this.XX()));this.Bf&&this.Bf.Xi()&&this.rh(this.Bf.request);this.Ee&&this.Ee.Xi()?this.rh(this.Ee.request):this.De&&this.De.Xi()&&this.hU();var e;for(e=0;e<this.fh.length;e++)this.fh[e]&&(this.fh[e].Xi()?this.rh(this.fh[e].request):this.fh[e].ht()&&this.wK(this.fh[e].result.url,"image")&&(this.fh[e]=null,this.jE(Object(ca.uniqueId)(),e)));for(e=0;e<this.gj.length;e++)this.gj[e]&&this.gj[e].Xi()&&!this.gj[e].pda()&&
11
- this.rh(this.gj[e].request);for(e=0;e<this.Tf.length;e++)this.Tf[e]&&this.Tf[e].Xi()&&this.rh(this.Tf[e].request)};e.prototype.Zca=function(){return this.nB?Promise.resolve():(this.nB=!0,this.timeStamp=Date.now(),this.es.TC())};e.prototype.Zla=function(){var e=this,h,n,r,w,x;return new Promise(function(y,z){if(e.Mm)h=new FormData,h.append("file",e.Mm.fileHandle,e.Mm.fileHandle.name),n=e.Mm.loadCallback,w="upload",r=e.Mm.extension;else if(e.vu)h={uri:e.vu.uri,hqa:e.vu.shareId},h=Object.keys(h).map(function(e){return e+
7
+ this;this.JM=this.bS=!1;this.lh=this.iF=this.vu=this.KK=this.nH=this.Mm=null;this.om=new r;this.Ep=new r;this.nB=!1;this.Bf=this.De=this.Ee=this.tf=null;this.Sf=[];this.ZB=[];this.cache={};this.timeStamp=0;this.fh=[];this.gj=[];this.rI=null;this.QR=!1;this.vY=this.id=null;this.wK=this.uU=ea;this.ei=0;this.CJ=!1;this.YV=1;this.cj={};this.Pr=0;this.Lt=new z;f.endsWith("/")||(f+="/");n=n||{};this.bS=n.disableWebsockets||!1;this.JM=n.singleServerMode||!1;null!=n.customQueryParameters&&Object(h.b)("wvsQueryParameters",
8
+ n.customQueryParameters);f.endsWith("blackbox/")||(f+="blackbox/");this.Mm=n.uploadData||null;this.vu=n.uriData||null;this.nH=n.cacheKey||null;this.KK=n.officeOptions||null;this.Ve=f;this.UH=e;this.Eo(!0);this.es=(new w.a(f,null,this.Ph())).L$(!this.bS,function(e){x.gfa(e)},function(){return null},function(){x.nB=!1},function(){x.iia()})}e.prototype.o7=function(){var e=this;return new Promise(function(f,h){var n=new XMLHttpRequest;n.open("GET",e.Ve+"ck");n.withCredentials=e.Ph();n.onreadystatechange=
9
+ function(){n.readyState===XMLHttpRequest.DONE&&(200===n.status?f():h())};n.send()})};e.prototype.Kja=function(e){this.uU=e||ea;this.wK=ea};e.prototype.h6=function(){this.ZX();return this.es.Np(!0)};e.prototype.ZX=function(){Object(ha.b)(this,void 0,void 0,function(){return Object(ha.d)(this,function(e){switch(e.label){case 0:return this.Ep=new r,this.om=new r,this.nB=!1,this.id=null,this.QR=!1,[4,this.o7()];case 1:return e.ea(),[2]}})})};e.prototype.iia=function(){this.uU();this.ZX();this.tf&&(this.tf.Xi()?
10
+ this.rh(this.tf.request):this.tf.ht()&&this.wK(this.tf.result.url,"pdf")&&(this.tf=null,this.YX()));this.Bf&&this.Bf.Xi()&&this.rh(this.Bf.request);this.Ee&&this.Ee.Xi()?this.rh(this.Ee.request):this.De&&this.De.Xi()&&this.hU();var e;for(e=0;e<this.fh.length;e++)this.fh[e]&&(this.fh[e].Xi()?this.rh(this.fh[e].request):this.fh[e].ht()&&this.wK(this.fh[e].result.url,"image")&&(this.fh[e]=null,this.jE(Object(ca.uniqueId)(),e)));for(e=0;e<this.gj.length;e++)this.gj[e]&&this.gj[e].Xi()&&!this.gj[e].qda()&&
11
+ this.rh(this.gj[e].request);for(e=0;e<this.Sf.length;e++)this.Sf[e]&&this.Sf[e].Xi()&&this.rh(this.Sf[e].request)};e.prototype.$ca=function(){return this.nB?Promise.resolve():(this.nB=!0,this.timeStamp=Date.now(),this.es.TC())};e.prototype.$la=function(){var e=this,h,n,r,w,x;return new Promise(function(y,z){if(e.Mm)h=new FormData,h.append("file",e.Mm.fileHandle,e.Mm.fileHandle.name),n=e.Mm.loadCallback,w="upload",r=e.Mm.extension;else if(e.vu)h={uri:e.vu.uri,iqa:e.vu.shareId},h=Object.keys(h).map(function(e){return e+
12
12
  "="+(h[e]?encodeURIComponent(h[e]):"")}).join("&"),x="application/x-www-form-urlencoded; charset=UTF-8",n=e.vu.loadCallback,w="url",r=e.vu.extension;else{y();return}var ba=new XMLHttpRequest,da=Object(aa.j)(e.Ve,"AuxUpload");da=Object(f.a)(da,{type:w,ext:r});ba.open("POST",da);ba.withCredentials=e.Ph();x&&ba.setRequestHeader("Content-Type",x);ba.addEventListener("load",function(){if(ba.readyState===ba.DONE&&200===ba.status){var f=JSON.parse(ba.response);e.UH=f.uri;n(f);y(f)}});ba.addEventListener("error",
13
- function(){z(ba.statusText+" "+JSON.stringify(ba))});e.Mm&&null!=e.Mm.onProgress&&(ba.upload.onprogress=function(f){e.Mm.onProgress(f)});ba.send(h)})};e.prototype.Zha=function(e){this.password=e||null;this.om.ht()||(this.om=new r,this.rh({t:"pages"}));return this.om.promise};e.prototype.Zx=function(e){this.rI=e||null;this.om.ht()||this.rh({t:"pages"});return this.om.promise};e.prototype.Qv=function(e){e=Object.assign(e,{uri:encodeURIComponent(this.UH)});this.rI&&(e.ext=this.rI);this.lh&&(e.c=this.lh);
14
- this.password&&(e.pswd=this.password);this.nH&&(e.cacheKey=this.nH);this.KK&&(e.officeOptions=this.KK);return e};e.prototype.Gia=function(){0<this.Lt.length()&&10>=this.Pr&&this.Hia(this.Lt.pop().data)};e.prototype.H5=function(e){0<this.Lt.length()&&this.Lt.contains(e)&&this.Lt.remove(e)};e.prototype.rh=function(e){e=this.Qv(e);this.es.send(e)};e.prototype.pY=function(e,f){10<this.Pr?this.Lt.push(e,f):(this.Pr++,e=this.Qv(f),this.es.send(e))};e.prototype.Hia=function(e){this.Pr++;e=this.Qv(e);this.es.send(e)};
15
- e.prototype.ul=function(e){return e};e.prototype.tU=function(e){this.JM&&e?Object(da.j)("Server failed health check. Single server mode ignoring check."):!this.qoa&&e&&3>=this.ei?(this.BJ=!0,this.es.Np()):3<this.ei&&(this.JM=!0)};e.prototype.ffa=function(e){var n=this,w=e.data,z=e.err,aa=e.t;switch(aa){case "upload":z?this.$la.reject(z):this.$la.resolve("Success");break;case "pages":z?this.om.reject(z):x(w,aa,this.om)&&this.om.resolve(w);break;case "config":if(z)this.Ep.reject(z);else if(x(w,aa,this.Ep)){this.tU(w.unhealthy);
16
- w.id&&(this.id=w.id);if(w.auth){var ba=Object(h.a)("wvsQueryParameters");ba.auth=w.auth;Object(h.b)("wvsQueryParameters",ba)}w.serverVersion&&(this.iF=w.serverVersion,Object(da.h)("[WebViewer Server] server version: "+this.iF));w.serverID?(this.ei=w.serverID===this.uY&&this.BJ?this.ei+1:0,this.uY=w.serverID):this.ei=0;this.BJ=!1;this.Ep.resolve(w)}break;case "health":z?this.Ep.reject(z):x(w,aa,this.Ep)&&this.tU(w.unhealthy);break;case "pdf":w.url=Object(f.a)(this.Ve+"../"+encodeURI(w.url));z?this.tf.reject(z):
13
+ function(){z(ba.statusText+" "+JSON.stringify(ba))});e.Mm&&null!=e.Mm.onProgress&&(ba.upload.onprogress=function(f){e.Mm.onProgress(f)});ba.send(h)})};e.prototype.$ha=function(e){this.password=e||null;this.om.ht()||(this.om=new r,this.rh({t:"pages"}));return this.om.promise};e.prototype.Zx=function(e){this.rI=e||null;this.om.ht()||this.rh({t:"pages"});return this.om.promise};e.prototype.Qv=function(e){e=Object.assign(e,{uri:encodeURIComponent(this.UH)});this.rI&&(e.ext=this.rI);this.lh&&(e.c=this.lh);
14
+ this.password&&(e.pswd=this.password);this.nH&&(e.cacheKey=this.nH);this.KK&&(e.officeOptions=this.KK);return e};e.prototype.Hia=function(){0<this.Lt.length()&&10>=this.Pr&&this.Iia(this.Lt.pop().data)};e.prototype.I5=function(e){0<this.Lt.length()&&this.Lt.contains(e)&&this.Lt.remove(e)};e.prototype.rh=function(e){e=this.Qv(e);this.es.send(e)};e.prototype.qY=function(e,f){10<this.Pr?this.Lt.push(e,f):(this.Pr++,e=this.Qv(f),this.es.send(e))};e.prototype.Iia=function(e){this.Pr++;e=this.Qv(e);this.es.send(e)};
15
+ e.prototype.vl=function(e){return e};e.prototype.tU=function(e){this.JM&&e?Object(da.j)("Server failed health check. Single server mode ignoring check."):!this.roa&&e&&3>=this.ei?(this.CJ=!0,this.es.Np()):3<this.ei&&(this.JM=!0)};e.prototype.gfa=function(e){var n=this,w=e.data,z=e.err,aa=e.t;switch(aa){case "upload":z?this.ama.reject(z):this.ama.resolve("Success");break;case "pages":z?this.om.reject(z):x(w,aa,this.om)&&this.om.resolve(w);break;case "config":if(z)this.Ep.reject(z);else if(x(w,aa,this.Ep)){this.tU(w.unhealthy);
16
+ w.id&&(this.id=w.id);if(w.auth){var ba=Object(h.a)("wvsQueryParameters");ba.auth=w.auth;Object(h.b)("wvsQueryParameters",ba)}w.serverVersion&&(this.iF=w.serverVersion,Object(da.h)("[WebViewer Server] server version: "+this.iF));w.serverID?(this.ei=w.serverID===this.vY&&this.CJ?this.ei+1:0,this.vY=w.serverID):this.ei=0;this.CJ=!1;this.Ep.resolve(w)}break;case "health":z?this.Ep.reject(z):x(w,aa,this.Ep)&&this.tU(w.unhealthy);break;case "pdf":w.url=Object(f.a)(this.Ve+"../"+encodeURI(w.url));z?this.tf.reject(z):
17
17
  x(w,aa,this.tf)&&this.tf.resolve(w);break;case "ApString2Xod":w.url=Object(f.a)(this.Ve+"../data/"+encodeURI(w.url));z?this.cj[w.rID].reject(z):x(w,aa,this.cj[w.rID])&&this.cj[w.rID].resolve(w);break;case "docmod":w.url=Object(f.a)(this.Ve+"../"+encodeURI(w.url));z?this.cj[w.rID].reject(z):x(w,aa,this.tf)&&this.cj[w.rID].resolve(w);break;case "xod":if(z)this.Ee&&this.Ee.Xi()&&this.Ee.reject(z),this.De&&this.De.Xi()&&this.De.reject(z);else if(w.notFound)w.noCreate||this.Ee&&this.Ee.Xi()&&this.Ee.resolve(w),
18
18
  this.De&&this.De.Xi()&&this.De.resolve(w);else{w.url&&(w.url=Object(f.a)(this.Ve+"../"+encodeURI(w.url)));if(!this.De||this.De.ht())this.De=new r,this.De.request={t:"xod",noCreate:!0};this.Ee||(this.Ee=new r,this.Ee.request={t:"xod"});this.De.resolve(w);this.Ee.resolve(w)}break;case "cAnnots":ba=this.Bf;if(z)ba.reject(z);else if(x(w,aa,ba)){ba.iM();var ea=[],fa=w.annots;w=function(e){var h=fa[e].s,r=fa[e].e,w=ha.Ve+"../"+encodeURI(fa[e].xfdf),x="true"===fa[e].hasAppearance?Object(f.a)(w+".xodapp"):
19
- null,y=Object(ca.range)(h,r+1);ea[e]={range:y,promise:new Promise(function(e,h){var r=new XMLHttpRequest;r.open("GET",Object(f.a)(w));r.responseType="text";r.withCredentials=n.Ph();r.addEventListener("load",function(){r.readyState===r.DONE&&200===r.status&&e({jr:r.response,kl:x,range:y})});r.addEventListener("error",function(){h(r.statusText+" "+JSON.stringify(r))});r.send()})}};var ha=this;for(z=0;z<fa.length;z++)w(z);ba.resolve(ea)}break;case "annots":if(z)this.Bf.reject(z);else if(x(w,aa,this.Bf)){this.Bf.iM();
20
- var ia=new XMLHttpRequest;ba=this.Ve+"../"+encodeURI(w.url);var ja=w.hasAppearance?Object(f.a)(ba+".xodapp"):null;ia.open("GET",Object(f.a)(ba));ia.responseType="text";ia.withCredentials=this.Ph();ia.addEventListener("load",function(){ia.readyState===ia.DONE&&200===ia.status&&n.Bf.resolve({jr:ia.response,kl:ja})});ia.addEventListener("error",function(){n.Bf.reject(ia.statusText+" "+JSON.stringify(ia))});ia.send()}break;case "image":this.Pr--;var ka=this.fh[w.p];z?ka.promise.reject(z):x(w,aa,ka)&&
21
- (ka.result=w,ka.result.url=Object(f.a)(this.Ve+"../"+encodeURI(ka.result.url)),ka.resolve(ka.result));break;case "tiles":this.Pr--;ka=w.rID;ba=this.Tf[ka];this.Tf[ka]=null;this.ZB.push(ka);if(z)ba.reject(z);else if(x(w,aa,ba)){for(z=0;z<w.tiles.length;z++)w.tiles[z]=Object(f.a)(this.Ve+"../"+encodeURI(w.tiles[z]));ba.resolve(w)}break;case "text":ka=this.gj[w.p];if(z)ka.reject(z);else if(x(w,aa,ka)){ka.iM();var wa=new XMLHttpRequest;w=Object(f.a)(this.Ve+"../"+encodeURI(w.url));wa.open("GET",w);wa.withCredentials=
22
- this.Ph();wa.addEventListener("load",function(){wa.readyState===wa.DONE&&200===wa.status&&(ka.result=JSON.parse(wa.response),ka.resolve(ka.result))});wa.addEventListener("error",function(e){ka.reject(wa.statusText+" "+JSON.stringify(e))});wa.send()}break;case "progress":"loading"===w.t&&this.trigger(y.a.Events.DOCUMENT_LOADING_PROGRESS,[w.bytes,w.total])}this.Gia();!aa&&e.echo&&e&&"apstring2xod"===e.echo.t&&(e=e.echo.reqID)&&(2<=parseInt(this.iF,10)?this.cj[e].reject("Message unhandled by server"):
23
- this.cj[e].reject())};e.prototype.qaa=function(){return Object(ha.b)(this,void 0,void 0,function(){return Object(ha.d)(this,function(e){switch(e.label){case 0:return[4,this.Zca()];case 1:return e.ea(),[2,this.Ep.promise]}})})};e.prototype.Z$=function(e){for(var h=this,n=new XMLHttpRequest,w=Object(f.a)(this.Ve+"aul",{id:this.id}),x=new FormData,y={},z=0;z<e.body.length;z++){var aa=e.body[z];y[aa.id]=aa.aH.w+";"+aa.aH.h;x.append(aa.id,aa.aH.dataString)}e={t:"apstring2xod",reqID:this.XV++,parts:y};
24
- var ba=this.Qv(e);x.append("msg",JSON.stringify(ba));this.cj[ba.reqID]=new r;n.open("POST",w);n.withCredentials=this.Ph;w=new Promise(function(e,f){n.onreadystatechange=function(){4===n.readyState&&(200===n.status?e():f("An error occurred while sending down appearance strings to the server"))}});n.send(x);return w.then(function(){return h.cj[ba.reqID].promise})};e.prototype.i6=function(){var e=this.iF.split("-")[0].split("."),f=["1","5","9"];if(3!==e.length)throw Error("Invalid WVS version length.");
25
- if(3!==f.length)throw Error("Invalid version length.");for(var h=0;h<e.length;++h){if(f.length===h||e[h]>f[h])return-1;if(e[h]!==f[h])return 1}return 0};e.prototype.Ap=function(){return 0>=this.i6()};e.prototype.BI=function(){this.Bf||(this.Bf=new r,this.Ap()?this.Bf.request={t:"cAnnots"}:this.Bf.request={t:"annots"},this.rh(this.Bf.request));return this.Bf.promise};e.prototype.jE=function(e,f){this.fh[f]||(this.fh[f]=new r,this.fh[f].request={t:"image",p:f},this.pY(e,this.fh[f].request));return this.fh[f].promise};
26
- e.prototype.$ha=function(e){this.gj[e]||(this.gj[e]=new r,this.gj[e].request={t:"text",p:e},this.rh(this.gj[e].request));return this.gj[e].promise};e.prototype.aia=function(e,f,h,n,w){var x=this.Tf.length;this.ZB.length&&(x=this.ZB.pop());this.Tf[x]=new r;this.Tf[x].request={t:"tiles",p:f,z:h,r:n,size:w,rID:x};this.pY(e,this.Tf[x].request);return this.Tf[x].promise};e.prototype.XX=function(){this.tf||(this.tf=new r,this.tf.request={t:"pdf"},this.QR?this.tf.resolve({url:this.UH}):this.rh(this.tf.request));
27
- return this.tf.promise};e.prototype.BT=function(e){var h=this,n=new XMLHttpRequest,w=Object(f.a)(this.Ve+"aul",{id:this.id}),x=new FormData,y={};e.annots&&(y.annots="xfdf");e.watermark&&(y.watermark="png");e.redactions&&(y.redactions="redact");y={t:"docmod",reqID:this.XV++,parts:y};e.print&&(y.print=!0);var z=this.Qv(y);x.append("msg",JSON.stringify(z));return Promise.all([e.annots,e.watermark,e.redactions].map(function(e){return Promise.resolve(e)})).then(function(e){var f=e[0],y=e[1];e=e[2];f&&
19
+ null,y=Object(ca.range)(h,r+1);ea[e]={range:y,promise:new Promise(function(e,h){var r=new XMLHttpRequest;r.open("GET",Object(f.a)(w));r.responseType="text";r.withCredentials=n.Ph();r.addEventListener("load",function(){r.readyState===r.DONE&&200===r.status&&e({jr:r.response,ll:x,range:y})});r.addEventListener("error",function(){h(r.statusText+" "+JSON.stringify(r))});r.send()})}};var ha=this;for(z=0;z<fa.length;z++)w(z);ba.resolve(ea)}break;case "annots":if(z)this.Bf.reject(z);else if(x(w,aa,this.Bf)){this.Bf.iM();
20
+ var ia=new XMLHttpRequest;ba=this.Ve+"../"+encodeURI(w.url);var ja=w.hasAppearance?Object(f.a)(ba+".xodapp"):null;ia.open("GET",Object(f.a)(ba));ia.responseType="text";ia.withCredentials=this.Ph();ia.addEventListener("load",function(){ia.readyState===ia.DONE&&200===ia.status&&n.Bf.resolve({jr:ia.response,ll:ja})});ia.addEventListener("error",function(){n.Bf.reject(ia.statusText+" "+JSON.stringify(ia))});ia.send()}break;case "image":this.Pr--;var ka=this.fh[w.p];z?ka.promise.reject(z):x(w,aa,ka)&&
21
+ (ka.result=w,ka.result.url=Object(f.a)(this.Ve+"../"+encodeURI(ka.result.url)),ka.resolve(ka.result));break;case "tiles":this.Pr--;ka=w.rID;ba=this.Sf[ka];this.Sf[ka]=null;this.ZB.push(ka);if(z)ba.reject(z);else if(x(w,aa,ba)){for(z=0;z<w.tiles.length;z++)w.tiles[z]=Object(f.a)(this.Ve+"../"+encodeURI(w.tiles[z]));ba.resolve(w)}break;case "text":ka=this.gj[w.p];if(z)ka.reject(z);else if(x(w,aa,ka)){ka.iM();var Ca=new XMLHttpRequest;w=Object(f.a)(this.Ve+"../"+encodeURI(w.url));Ca.open("GET",w);Ca.withCredentials=
22
+ this.Ph();Ca.addEventListener("load",function(){Ca.readyState===Ca.DONE&&200===Ca.status&&(ka.result=JSON.parse(Ca.response),ka.resolve(ka.result))});Ca.addEventListener("error",function(e){ka.reject(Ca.statusText+" "+JSON.stringify(e))});Ca.send()}break;case "progress":"loading"===w.t&&this.trigger(y.a.Events.DOCUMENT_LOADING_PROGRESS,[w.bytes,w.total])}this.Hia();!aa&&e.echo&&e&&"apstring2xod"===e.echo.t&&(e=e.echo.reqID)&&(2<=parseInt(this.iF,10)?this.cj[e].reject("Message unhandled by server"):
23
+ this.cj[e].reject())};e.prototype.raa=function(){return Object(ha.b)(this,void 0,void 0,function(){return Object(ha.d)(this,function(e){switch(e.label){case 0:return[4,this.$ca()];case 1:return e.ea(),[2,this.Ep.promise]}})})};e.prototype.$$=function(e){for(var h=this,n=new XMLHttpRequest,w=Object(f.a)(this.Ve+"aul",{id:this.id}),x=new FormData,y={},z=0;z<e.body.length;z++){var aa=e.body[z];y[aa.id]=aa.aH.w+";"+aa.aH.h;x.append(aa.id,aa.aH.dataString)}e={t:"apstring2xod",reqID:this.YV++,parts:y};
24
+ var ba=this.Qv(e);x.append("msg",JSON.stringify(ba));this.cj[ba.reqID]=new r;n.open("POST",w);n.withCredentials=this.Ph;w=new Promise(function(e,f){n.onreadystatechange=function(){4===n.readyState&&(200===n.status?e():f("An error occurred while sending down appearance strings to the server"))}});n.send(x);return w.then(function(){return h.cj[ba.reqID].promise})};e.prototype.j6=function(){var e=this.iF.split("-")[0].split("."),f=["1","5","9"];if(3!==e.length)throw Error("Invalid WVS version length.");
25
+ if(3!==f.length)throw Error("Invalid version length.");for(var h=0;h<e.length;++h){if(f.length===h||e[h]>f[h])return-1;if(e[h]!==f[h])return 1}return 0};e.prototype.Ap=function(){return 0>=this.j6()};e.prototype.BI=function(){this.Bf||(this.Bf=new r,this.Ap()?this.Bf.request={t:"cAnnots"}:this.Bf.request={t:"annots"},this.rh(this.Bf.request));return this.Bf.promise};e.prototype.jE=function(e,f){this.fh[f]||(this.fh[f]=new r,this.fh[f].request={t:"image",p:f},this.qY(e,this.fh[f].request));return this.fh[f].promise};
26
+ e.prototype.aia=function(e){this.gj[e]||(this.gj[e]=new r,this.gj[e].request={t:"text",p:e},this.rh(this.gj[e].request));return this.gj[e].promise};e.prototype.bia=function(e,f,h,n,w){var x=this.Sf.length;this.ZB.length&&(x=this.ZB.pop());this.Sf[x]=new r;this.Sf[x].request={t:"tiles",p:f,z:h,r:n,size:w,rID:x};this.qY(e,this.Sf[x].request);return this.Sf[x].promise};e.prototype.YX=function(){this.tf||(this.tf=new r,this.tf.request={t:"pdf"},this.QR?this.tf.resolve({url:this.UH}):this.rh(this.tf.request));
27
+ return this.tf.promise};e.prototype.BT=function(e){var h=this,n=new XMLHttpRequest,w=Object(f.a)(this.Ve+"aul",{id:this.id}),x=new FormData,y={};e.annots&&(y.annots="xfdf");e.watermark&&(y.watermark="png");e.redactions&&(y.redactions="redact");y={t:"docmod",reqID:this.YV++,parts:y};e.print&&(y.print=!0);var z=this.Qv(y);x.append("msg",JSON.stringify(z));return Promise.all([e.annots,e.watermark,e.redactions].map(function(e){return Promise.resolve(e)})).then(function(e){var f=e[0],y=e[1];e=e[2];f&&
28
28
  x.append("annots",f);y&&x.append("watermark",y);e&&x.append("redactions",e);h.cj[z.reqID]=new r;n.open("POST",w);n.withCredentials=h.Ph;f=new Promise(function(e,f){n.onreadystatechange=function(){4===n.readyState&&(200===n.status?e():f("An error occurred while sending down annotation data to the server"))}});n.send(x);return f.then(function(){return h.cj[z.reqID].promise})})};e.prototype.hU=function(){this.De||(this.De=new r,this.De.request={t:"xod",noCreate:!0},this.rh(this.De.request));return this.De.promise};
29
- e.prototype.bia=function(){this.Ee||(this.Ee=new r,this.Ee.request={t:"xod"},this.rh(this.Ee.request));return this.Ee.promise};e.prototype.yo=function(){return!0};e.prototype.request=function(){};e.prototype.qX=function(){};e.prototype.abort=function(){for(var e=0;e<this.Tf.length;e++)this.Tf[e]&&(this.Tf[e].resolve(null),this.Tf[e]=null,this.ZB.push(e));this.close()};e.prototype.vE=function(e){this.lh=this.lh||{};this.lh.headers=e};e.prototype.Eo=function(e){this.lh=this.lh||{};this.lh.internal=
30
- this.lh.internal||{};this.lh.internal.withCredentials=e};e.prototype.Ph=function(){return this.lh&&this.lh.internal?this.lh.internal.withCredentials:null};e.prototype.getFileData=function(){return Promise.reject()};return e}();Object(ia.a)(e);Object(n.a)(e);Object(n.b)(e);ba["default"]=e},463:function(ia,ba,e){var ea=e(1),x=e(2),ha=e(34),ca=e(40),da=e(163),aa=e(112),w=function(){function e(e,f,n,w,x,y){void 0===n&&(n=null);void 0===w&&(w=null);void 0===x&&(x=null);void 0===y&&(y=null);this.DV=!1;
31
- this.ei=0;this.XQ=this.rma(e);this.url=f?this.XQ+"/"+f:this.XQ+"/ws";this.NH=n;this.Dx=w;this.Ov=x;this.NL=y}e.prototype.rma=function(e){var f=e.indexOf("://"),h="ws://";0>f?f=0:(5===f&&(h="wss://"),f+=3);var n=e.lastIndexOf("/");0>n&&(n=e.length);return h+e.slice(f,n)};e.prototype.send=function(e){this.Qo.readyState===WebSocket.CLOSED||this.DV||this.Qo.send(JSON.stringify(e))};e.prototype.TC=function(){return Object(ea.b)(this,void 0,void 0,function(){var e,f=this;return Object(ea.d)(this,function(){e=
32
- Object(ca.a)("wvsQueryParameters");e.bcid=Object(ha.k)(8);Object(ca.b)("wvsQueryParameters",e);return[2,new Promise(function(e,h){var n=Object(da.a)(f.url);f.Qo=new WebSocket(n);f.Qo.onopen=function(){f.Dx&&f.Dx();e()};f.Qo.onerror=function(e){f.DV=!0;h(e)};f.Qo.onclose=function(e){var n=e.code;return Object(ea.b)(f,void 0,void 0,function(){var e=this;return Object(ea.d)(this,function(f){switch(f.label){case 0:return this.Ov&&this.Ov(),3E3===n?[3,3]:8>this.ei++?[4,new Promise(function(f){return setTimeout(function(){return Object(ea.b)(e,
29
+ e.prototype.cia=function(){this.Ee||(this.Ee=new r,this.Ee.request={t:"xod"},this.rh(this.Ee.request));return this.Ee.promise};e.prototype.yo=function(){return!0};e.prototype.request=function(){};e.prototype.rX=function(){};e.prototype.abort=function(){for(var e=0;e<this.Sf.length;e++)this.Sf[e]&&(this.Sf[e].resolve(null),this.Sf[e]=null,this.ZB.push(e));this.close()};e.prototype.vE=function(e){this.lh=this.lh||{};this.lh.headers=e};e.prototype.Eo=function(e){this.lh=this.lh||{};this.lh.internal=
30
+ this.lh.internal||{};this.lh.internal.withCredentials=e};e.prototype.Ph=function(){return this.lh&&this.lh.internal?this.lh.internal.withCredentials:null};e.prototype.getFileData=function(){return Promise.reject()};return e}();Object(ia.a)(e);Object(n.a)(e);Object(n.b)(e);ba["default"]=e},463:function(ia,ba,e){var ea=e(1),x=e(2),ha=e(34),ca=e(40),da=e(163),aa=e(112),w=function(){function e(e,f,n,w,x,y){void 0===n&&(n=null);void 0===w&&(w=null);void 0===x&&(x=null);void 0===y&&(y=null);this.EV=!1;
31
+ this.ei=0;this.XQ=this.sma(e);this.url=f?this.XQ+"/"+f:this.XQ+"/ws";this.NH=n;this.Dx=w;this.Ov=x;this.NL=y}e.prototype.sma=function(e){var f=e.indexOf("://"),h="ws://";0>f?f=0:(5===f&&(h="wss://"),f+=3);var n=e.lastIndexOf("/");0>n&&(n=e.length);return h+e.slice(f,n)};e.prototype.send=function(e){this.Qo.readyState===WebSocket.CLOSED||this.EV||this.Qo.send(JSON.stringify(e))};e.prototype.TC=function(){return Object(ea.b)(this,void 0,void 0,function(){var e,f=this;return Object(ea.d)(this,function(){e=
32
+ Object(ca.a)("wvsQueryParameters");e.bcid=Object(ha.k)(8);Object(ca.b)("wvsQueryParameters",e);return[2,new Promise(function(e,h){var n=Object(da.a)(f.url);f.Qo=new WebSocket(n);f.Qo.onopen=function(){f.Dx&&f.Dx();e()};f.Qo.onerror=function(e){f.EV=!0;h(e)};f.Qo.onclose=function(e){var n=e.code;return Object(ea.b)(f,void 0,void 0,function(){var e=this;return Object(ea.d)(this,function(f){switch(f.label){case 0:return this.Ov&&this.Ov(),3E3===n?[3,3]:8>this.ei++?[4,new Promise(function(f){return setTimeout(function(){return Object(ea.b)(e,
33
33
  void 0,void 0,function(){return Object(ea.d)(this,function(e){switch(e.label){case 0:return this.NL(),[4,this.TC()];case 1:return e.ea(),f(),[2]}})})},3E3)})]:[3,2];case 1:return f.ea(),[3,3];case 2:h(aa.a),f.label=3;case 3:return[2]}})})};f.Qo.onmessage=function(e){e&&e.data&&(e=JSON.parse(e.data),e.hb?f.send({hb:!0}):e.end?close():f.NH(e))}})]})})};e.prototype.Np=function(e){void 0===e&&(e=!1);this.ei=0;e?this.Qo.close(3E3):this.Qo.close();return Promise.resolve()};return e}(),y=function(){function e(e,
34
- f,n,w,x,y,aa){void 0===w&&(w=null);void 0===x&&(x=null);void 0===y&&(y=null);void 0===aa&&(aa=null);this.ei=this.iE=this.id=0;this.Uw=!1;this.request=null;e=this.zga(e);this.url=f?e+"/"+f+"pf":e+"/pf";this.bF=n;this.NH=w;this.Dx=x;this.Ov=y;this.NL=aa}e.prototype.zga=function(e){var f=e.lastIndexOf("/");0>f&&(f=e.length);return e.slice(0,f)};e.prototype.X6=function(e){e=e.split("\n");for(e[e.length-1]&&e.pop();0<e.length&&3>e[e.length-1].length;)"]"===e.pop()&&(this.id=0);0<e.length&&3>e[0].length&&
35
- e.shift();for(var f=0;f<e.length;++f)e[f].endsWith(",")&&(e[f]=e[f].substr(0,e[f].length-1));return e};e.prototype.gY=function(){return Object(ea.b)(this,void 0,void 0,function(){var e=this;return Object(ea.d)(this,function(f){switch(f.label){case 0:return 8>this.ei++?[4,new Promise(function(f){return setTimeout(function(){e.NL();e.TC();f()},3E3)})]:[3,2];case 1:f.ea(),f.label=2;case 2:return[2]}})})};e.prototype.Bga=function(e){Object(ea.b)(this,void 0,void 0,function(){var f,h;return Object(ea.d)(this,
36
- function(n){switch(n.label){case 0:f=null,h=0,n.label=1;case 1:if(!(h<e.length))return[3,6];f=JSON.parse(e[h]);if(!f)return[3,5];if(!f.end)return[3,2];close();return[3,5];case 2:if(!f.id||Number(f.id)===this.id)return[3,4];Object(x.j)("Reconnecting, new server detected");this.Np();return[4,this.gY()];case 3:return n.ea(),[3,5];case 4:f.hb&&Number(f.id)===this.id?this.send({hb:!0}):this.Uw||this.NH(f),n.label=5;case 5:return++h,[3,1];case 6:return[2]}})})};e.prototype.cfa=function(e){Object(ea.b)(this,
37
- void 0,void 0,function(){var f,h,n;return Object(ea.d)(this,function(r){switch(r.label){case 0:if(!(3<=e.readyState))return[3,2];try{f=e.responseText.length}catch(ka){return Object(x.h)("caught exception"),[2]}if(0<f)try{h=this.X6(e.responseText),0===this.id&&0<h.length&&(n=JSON.parse(h.shift()),this.id=n.id,this.ei=0),this.Bga(h)}catch(ka){}return this.Uw?[3,2]:[4,this.HS()];case 1:r.ea(),r.label=2;case 2:return[2]}})})};e.prototype.HS=function(){return Object(ea.b)(this,void 0,void 0,function(){var e=
38
- this;return Object(ea.d)(this,function(){return[2,new Promise(function(f,h){function n(){return Object(ea.b)(e,void 0,void 0,function(){return Object(ea.d)(this,function(e){switch(e.label){case 0:h(),this.Np(),e.label=1;case 1:return this.Uw&&8>this.ei?[4,this.gY()]:[3,3];case 2:return e.ea(),[3,1];case 3:return[2]}})})}e.request=new XMLHttpRequest;e.request.withCredentials=e.bF;var r=Object(da.a)(e.url,0!==e.id?{id:String(e.id),uc:String(e.iE)}:{uc:String(e.iE)});e.iE++;e.request.open("GET",r,!0);
39
- e.request.setRequestHeader("Cache-Control","no-cache");e.request.setRequestHeader("X-Requested-With","XMLHttpRequest");e.request.onreadystatechange=function(){e.cfa(e.request)};e.request.addEventListener("error",n);e.request.addEventListener("timeout",n);e.request.addEventListener("load",function(){e.Dx&&e.Dx();f()});e.request.send()})]})})};e.prototype.TC=function(){var e=Object(ca.a)("wvsQueryParameters");e.bcid=Object(ha.k)(8);Object(ca.b)("wvsQueryParameters",e);this.iE=this.id=0;this.Uw=!1;return this.HS()};
34
+ f,n,w,x,y,aa){void 0===w&&(w=null);void 0===x&&(x=null);void 0===y&&(y=null);void 0===aa&&(aa=null);this.ei=this.iE=this.id=0;this.Uw=!1;this.request=null;e=this.Aga(e);this.url=f?e+"/"+f+"pf":e+"/pf";this.bF=n;this.NH=w;this.Dx=x;this.Ov=y;this.NL=aa}e.prototype.Aga=function(e){var f=e.lastIndexOf("/");0>f&&(f=e.length);return e.slice(0,f)};e.prototype.Y6=function(e){e=e.split("\n");for(e[e.length-1]&&e.pop();0<e.length&&3>e[e.length-1].length;)"]"===e.pop()&&(this.id=0);0<e.length&&3>e[0].length&&
35
+ e.shift();for(var f=0;f<e.length;++f)e[f].endsWith(",")&&(e[f]=e[f].substr(0,e[f].length-1));return e};e.prototype.hY=function(){return Object(ea.b)(this,void 0,void 0,function(){var e=this;return Object(ea.d)(this,function(f){switch(f.label){case 0:return 8>this.ei++?[4,new Promise(function(f){return setTimeout(function(){e.NL();e.TC();f()},3E3)})]:[3,2];case 1:f.ea(),f.label=2;case 2:return[2]}})})};e.prototype.Cga=function(e){Object(ea.b)(this,void 0,void 0,function(){var f,h;return Object(ea.d)(this,
36
+ function(n){switch(n.label){case 0:f=null,h=0,n.label=1;case 1:if(!(h<e.length))return[3,6];f=JSON.parse(e[h]);if(!f)return[3,5];if(!f.end)return[3,2];close();return[3,5];case 2:if(!f.id||Number(f.id)===this.id)return[3,4];Object(x.j)("Reconnecting, new server detected");this.Np();return[4,this.hY()];case 3:return n.ea(),[3,5];case 4:f.hb&&Number(f.id)===this.id?this.send({hb:!0}):this.Uw||this.NH(f),n.label=5;case 5:return++h,[3,1];case 6:return[2]}})})};e.prototype.dfa=function(e){Object(ea.b)(this,
37
+ void 0,void 0,function(){var f,h,n;return Object(ea.d)(this,function(r){switch(r.label){case 0:if(!(3<=e.readyState))return[3,2];try{f=e.responseText.length}catch(ka){return Object(x.h)("caught exception"),[2]}if(0<f)try{h=this.Y6(e.responseText),0===this.id&&0<h.length&&(n=JSON.parse(h.shift()),this.id=n.id,this.ei=0),this.Cga(h)}catch(ka){}return this.Uw?[3,2]:[4,this.HS()];case 1:r.ea(),r.label=2;case 2:return[2]}})})};e.prototype.HS=function(){return Object(ea.b)(this,void 0,void 0,function(){var e=
38
+ this;return Object(ea.d)(this,function(){return[2,new Promise(function(f,h){function n(){return Object(ea.b)(e,void 0,void 0,function(){return Object(ea.d)(this,function(e){switch(e.label){case 0:h(),this.Np(),e.label=1;case 1:return this.Uw&&8>this.ei?[4,this.hY()]:[3,3];case 2:return e.ea(),[3,1];case 3:return[2]}})})}e.request=new XMLHttpRequest;e.request.withCredentials=e.bF;var r=Object(da.a)(e.url,0!==e.id?{id:String(e.id),uc:String(e.iE)}:{uc:String(e.iE)});e.iE++;e.request.open("GET",r,!0);
39
+ e.request.setRequestHeader("Cache-Control","no-cache");e.request.setRequestHeader("X-Requested-With","XMLHttpRequest");e.request.onreadystatechange=function(){e.dfa(e.request)};e.request.addEventListener("error",n);e.request.addEventListener("timeout",n);e.request.addEventListener("load",function(){e.Dx&&e.Dx();f()});e.request.send()})]})})};e.prototype.TC=function(){var e=Object(ca.a)("wvsQueryParameters");e.bcid=Object(ha.k)(8);Object(ca.b)("wvsQueryParameters",e);this.iE=this.id=0;this.Uw=!1;return this.HS()};
40
40
  e.prototype.send=function(e){var f=this,h=new XMLHttpRequest;h.withCredentials=this.bF;var n=Object(da.a)(this.url,{id:String(this.id)}),w=new FormData;w.append("data",JSON.stringify(e));h.addEventListener("error",function(){f.Np()});h.open("POST",n);h.setRequestHeader("X-Requested-With","XMLHttpRequest");h.send(w)};e.prototype.Np=function(){this.id=0;this.Uw=!0;this.Ov&&this.Ov();this.request.abort();return Promise.resolve()};return e}();ia=function(){function e(e,f,n){this.wR=e;this.target=f;this.bF=
41
- n}e.prototype.K$=function(e,f,n,x,aa){void 0===e&&(e=!0);void 0===f&&(f=null);void 0===n&&(n=null);void 0===x&&(x=null);void 0===aa&&(aa=null);return e?new w(this.wR,this.target,f,n,x,aa):new y(this.wR,this.target,this.bF,f,n,x,aa)};return e}();ba.a=ia}}]);}).call(this || window)
41
+ n}e.prototype.L$=function(e,f,n,x,aa){void 0===e&&(e=!0);void 0===f&&(f=null);void 0===n&&(n=null);void 0===x&&(x=null);void 0===aa&&(aa=null);return e?new w(this.wR,this.target,f,n,x,aa):new y(this.wR,this.target,this.bF,f,n,x,aa)};return e}();ba.a=ia}}]);}).call(this || window)
@@ -1,3 +1,3 @@
1
1
  /** Notice * This file contains works from many authors under various (but compatible) licenses. Please see core.txt for more information. **/
2
2
  (function(){(window.wpCoreControlsBundle=window.wpCoreControlsBundle||[]).push([[17],{444:function(ia,ba,e){e.r(ba);var ea=e(1),x=e(245);ia=e(434);var ha=e(94);e=e(376);var ca={},da=function(e){function w(w,n){var h=e.call(this,w,n)||this;h.url=w;h.range=n;h.status=x.a.NOT_STARTED;return h}Object(ea.c)(w,e);w.prototype.start=function(e){var n=this;"undefined"===typeof ca[this.range.start]&&(ca[this.range.start]={ku:function(h){var f=atob(h),r,w=f.length;h=new Uint8Array(w);for(r=0;r<w;++r)h[r]=f.charCodeAt(r);
3
- f=h.length;r="";for(var x=0;x<f;)w=h.subarray(x,x+1024),x+=1024,r+=String.fromCharCode.apply(null,w);n.ku(r,e)},AS:function(){n.status=x.a.ERROR;e({code:n.status})}},window.external.Apa(this.url),this.status=x.a.STARTED);n.tC()};return w}(ia.ByteRangeRequest);ia=function(e){function w(w,n,h,f){w=e.call(this,w,h,f)||this;w.Tx=da;return w}Object(ea.c)(w,e);w.prototype.Rv=function(e,n){return e+"?"+n.start+"&"+(n.stop?n.stop:"")};return w}(ha.a);Object(e.a)(ia);Object(e.b)(ia);ba["default"]=ia}}]);}).call(this || window)
3
+ f=h.length;r="";for(var x=0;x<f;)w=h.subarray(x,x+1024),x+=1024,r+=String.fromCharCode.apply(null,w);n.ku(r,e)},AS:function(){n.status=x.a.ERROR;e({code:n.status})}},window.external.Bpa(this.url),this.status=x.a.STARTED);n.tC()};return w}(ia.ByteRangeRequest);ia=function(e){function w(w,n,h,f){w=e.call(this,w,h,f)||this;w.Tx=da;return w}Object(ea.c)(w,e);w.prototype.Rv=function(e,n){return e+"?"+n.start+"&"+(n.stop?n.stop:"")};return w}(ha.a);Object(e.a)(ia);Object(e.b)(ia);ba["default"]=ia}}]);}).call(this || window)
@@ -1547,54 +1547,56 @@ switch(majorVersion){case 1:break a;case 2:_readTrueTypeCollecti.dsigTag=ttc.get
1547
1547
  numFonts=readOpenTypeHeader(ttc);offsetTable=readTables(ttc,numFonts.numTables);if(!offsetTable.name)throw new _util.FormatError('TrueType Collection font must contain a "name" table.');i=readNameTable(offsetTable.name);for(var j=0,jj=i.length;j<jj;j++)for(var k=0,kk=i[j].length;k<kk;k++){var nameEntry=i[j][k];if(nameEntry&&nameEntry.replace(/\s/g,"")===fontName)return{header:numFonts,tables:offsetTable}}}throw new _util.FormatError('TrueType Collection does not contain "'.concat(fontName,'" font.'));
1548
1548
  }function readCmapTable(cmap,font,isSymbolicFont,hasEncoding){if(!cmap)return(0,_util.warn)("No cmap table available."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};var segment;cmap=(font.start?font.start:0)+cmap.offset;font.pos=cmap;font.getUint16();var numTables=font.getUint16(),potentialTable,canBreak=!1;for(segment=0;segment<numTables;segment++){var platformId=font.getUint16(),encodingId=font.getUint16(),offset=font.getInt32()>>>0,useTable=!1;if(!potentialTable||potentialTable.platformId!==
1549
1549
  platformId||potentialTable.encodingId!==encodingId)if(0===platformId&&0===encodingId?useTable=!0:1===platformId&&0===encodingId?useTable=!0:3!==platformId||1!==encodingId||!hasEncoding&&potentialTable?isSymbolicFont&&3===platformId&&0===encodingId&&(canBreak=useTable=!0):(useTable=!0,isSymbolicFont||(canBreak=!0)),useTable&&(potentialTable={platformId:platformId,encodingId:encodingId,offset:offset}),canBreak)break}potentialTable&&(font.pos=cmap+potentialTable.offset);if(!potentialTable||-1===font.peekByte())return(0,
1550
- _util.warn)("Could not find a preferred cmap table."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};cmap=font.getUint16();font.getUint16();font.getUint16();hasEncoding=!1;isSymbolicFont=[];if(0===cmap){for(segment=0;256>segment;segment++)(cmap=font.getByte())&&isSymbolicFont.push({charCode:segment,glyphId:cmap});hasEncoding=!0}else if(4===cmap){numTables=font.getUint16()>>1;font.getBytes(6);platformId=[];for(canBreak=0;canBreak<numTables;canBreak++)platformId.push({end:font.getUint16()});
1551
- font.getUint16();for(canBreak=0;canBreak<numTables;canBreak++)platformId[canBreak].start=font.getUint16();for(canBreak=0;canBreak<numTables;canBreak++)platformId[canBreak].delta=font.getUint16();for(canBreak=cmap=0;canBreak<numTables;canBreak++)segment=platformId[canBreak],(encodingId=font.getUint16())?(offset=(encodingId>>1)-(numTables-canBreak),segment.offsetIndex=offset,cmap=Math.max(cmap,offset+segment.end-segment.start+1)):segment.offsetIndex=-1;useTable=[];for(segment=0;segment<cmap;segment++)useTable.push(font.getUint16());
1552
- for(canBreak=0;canBreak<numTables;canBreak++){segment=platformId[canBreak];cmap=segment.start;font=segment.end;var delta=segment.delta;offset=segment.offsetIndex;for(segment=cmap;segment<=font;segment++)65535!==segment&&(encodingId=0>offset?segment:useTable[offset+segment-cmap],encodingId=encodingId+delta&65535,isSymbolicFont.push({charCode:segment,glyphId:encodingId}))}}else if(6===cmap)for(cmap=font.getUint16(),numTables=font.getUint16(),segment=0;segment<numTables;segment++)encodingId=font.getUint16(),
1553
- isSymbolicFont.push({charCode:cmap+segment,glyphId:encodingId});else return(0,_util.warn)("cmap table has unsupported format: "+cmap),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};isSymbolicFont.sort(function(a,b){return a.charCode-b.charCode});for(segment=1;segment<isSymbolicFont.length;segment++)isSymbolicFont[segment-1].charCode===isSymbolicFont[segment].charCode&&(isSymbolicFont.splice(segment,1),segment--);return{platformId:potentialTable.platformId,encodingId:potentialTable.encodingId,
1554
- mappings:isSymbolicFont,hasShortCmap:hasEncoding}}function sanitizeGlyph(source,sourceStart,sourceEnd,dest,destStart,hintsValid){var glyphProfile={length:0,sizeOfInstructions:0};if(12>=sourceEnd-sourceStart)return glyphProfile;source=source.subarray(sourceStart,sourceEnd);var contoursCount=signedInt16(source[0],source[1]);if(0>contoursCount)return source[1]=-1,source[0]=16777215,dest.set(source,destStart),glyphProfile.length=source.length,glyphProfile;sourceEnd=10;var flagsCount=0;for(sourceStart=
1555
- 0;sourceStart<contoursCount;sourceStart++)flagsCount=(source[sourceEnd]<<8|source[sourceEnd+1])+1,sourceEnd+=2;contoursCount=sourceEnd;var instructionsLength=source[sourceEnd]<<8|source[sourceEnd+1];glyphProfile.sizeOfInstructions=instructionsLength;var instructionsEnd=sourceEnd+=2+instructionsLength,coordinatesLength=0;for(sourceStart=0;sourceStart<flagsCount;sourceStart++){var flag=source[sourceEnd++];flag&192&&(source[sourceEnd-1]=flag&63);var xyLength=(flag&2?1:flag&16?0:2)+(flag&4?1:flag&32?
1556
- 0:2);coordinatesLength+=xyLength;flag&8&&(flag=source[sourceEnd++],sourceStart+=flag,coordinatesLength+=flag*xyLength)}if(0===coordinatesLength)return glyphProfile;sourceStart=sourceEnd+coordinatesLength;if(sourceStart>source.length)return glyphProfile;if(!hintsValid&&0<instructionsLength)return dest.set(source.subarray(0,contoursCount),destStart),dest.set([0,0],destStart+contoursCount),dest.set(source.subarray(instructionsEnd,sourceStart),destStart+contoursCount+2),sourceStart-=instructionsLength,
1557
- 3<source.length-sourceStart&&(sourceStart=sourceStart+3&-4),glyphProfile.length=sourceStart,glyphProfile;if(3<source.length-sourceStart)return sourceStart=sourceStart+3&-4,dest.set(source.subarray(0,sourceStart),destStart),glyphProfile.length=sourceStart,glyphProfile;dest.set(source,destStart);glyphProfile.length=source.length;return glyphProfile}function sanitizeGlyphLocations(loca,glyf,numGlyphs,isGlyphLocationsLong,hintsValid,dupFirstEntry,maxSizeOfInstructions){if(isGlyphLocationsLong){isGlyphLocationsLong=
1558
- 4;var itemDecode=function(data,offset){return data[offset]<<24|data[offset+1]<<16|data[offset+2]<<8|data[offset+3]};var itemEncode=function(data,offset,value){data[offset]=value>>>24&255;data[offset+1]=value>>16&255;data[offset+2]=value>>8&255;data[offset+3]=value&255}}else isGlyphLocationsLong=2,itemDecode=function(data,offset){return data[offset]<<9|data[offset+1]<<1},itemEncode=function(data,offset,value){data[offset]=value>>9&255;data[offset+1]=value>>1&255};var numGlyphsOut=dupFirstEntry?numGlyphs+
1559
- 1:numGlyphs,locaDataSize=isGlyphLocationsLong*(1+numGlyphsOut),locaData=new Uint8Array(locaDataSize);locaData.set(loca.data.subarray(0,locaDataSize));loca.data=locaData;var oldGlyfData=glyf.data,oldGlyfDataLength=oldGlyfData.length,newGlyfData=new Uint8Array(oldGlyfDataLength),startOffset=itemDecode(locaData,0),writeOffset=0;locaDataSize=Object.create(null);itemEncode(locaData,0,writeOffset);var j;var i=0;for(j=isGlyphLocationsLong;i<numGlyphs;i++,j+=isGlyphLocationsLong){var endOffset=itemDecode(locaData,
1560
- j);0===endOffset&&(endOffset=startOffset);endOffset>oldGlyfDataLength&&(oldGlyfDataLength+3&-4)===endOffset&&(endOffset=oldGlyfDataLength);endOffset>oldGlyfDataLength&&(startOffset=endOffset);startOffset=sanitizeGlyph(oldGlyfData,startOffset,endOffset,newGlyfData,writeOffset,hintsValid);var newLength=startOffset.length;0===newLength&&(locaDataSize[i]=!0);startOffset.sizeOfInstructions>maxSizeOfInstructions&&(maxSizeOfInstructions=startOffset.sizeOfInstructions);writeOffset+=newLength;itemEncode(locaData,
1561
- j,writeOffset);startOffset=endOffset}if(0===writeOffset){loca=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]);i=0;for(j=isGlyphLocationsLong;i<numGlyphsOut;i++,j+=isGlyphLocationsLong)itemEncode(locaData,j,loca.length);glyf.data=loca}else dupFirstEntry?(numGlyphs=itemDecode(locaData,isGlyphLocationsLong),newGlyfData.length>numGlyphs+writeOffset?glyf.data=newGlyfData.subarray(0,numGlyphs+writeOffset):(glyf.data=new Uint8Array(numGlyphs+writeOffset),glyf.data.set(newGlyfData.subarray(0,writeOffset))),
1562
- glyf.data.set(newGlyfData.subarray(0,numGlyphs),writeOffset),itemEncode(loca.data,locaData.length-isGlyphLocationsLong,writeOffset+numGlyphs)):glyf.data=newGlyfData.subarray(0,writeOffset);return{missingGlyphs:locaDataSize,maxSizeOfInstructions:maxSizeOfInstructions}}function readPostScriptTable(post,properties,maxpNumGlyphs){var start=(font$jscomp$0.start?font$jscomp$0.start:0)+post.offset;font$jscomp$0.pos=start;start+=post.length;var version=font$jscomp$0.getInt32();font$jscomp$0.getBytes(28);
1563
- post=!0;switch(version){case 65536:var glyphNames=MacStandardGlyphOrdering;break;case 131072:version=font$jscomp$0.getUint16();if(version!==maxpNumGlyphs){post=!1;break}var glyphNameIndexes=[];for(maxpNumGlyphs=0;maxpNumGlyphs<version;++maxpNumGlyphs){var index=font$jscomp$0.getUint16();if(32768<=index){post=!1;break}glyphNameIndexes.push(index)}if(!post)break;index=[];for(glyphNames=[];font$jscomp$0.pos<start;){var stringLength=font$jscomp$0.getByte();glyphNames.length=stringLength;for(maxpNumGlyphs=
1564
- 0;maxpNumGlyphs<stringLength;++maxpNumGlyphs)glyphNames[maxpNumGlyphs]=String.fromCharCode(font$jscomp$0.getByte());index.push(glyphNames.join(""))}glyphNames=[];for(maxpNumGlyphs=0;maxpNumGlyphs<version;++maxpNumGlyphs)start=glyphNameIndexes[maxpNumGlyphs],258>start?glyphNames.push(MacStandardGlyphOrdering[start]):glyphNames.push(index[start-258]);break;case 196608:break;default:(0,_util.warn)("Unknown/unsupported post table version "+version),post=!1,properties.defaultEncoding&&(glyphNames=properties.defaultEncoding)}properties.glyphNames=
1565
- glyphNames;return post}function readNameTable(nameTable){var start=(font$jscomp$0.start?font$jscomp$0.start:0)+nameTable.offset;font$jscomp$0.pos=start;var names=[[],[]],length=nameTable.length;nameTable=start+length;if(0!==font$jscomp$0.getUint16()||6>length)return names;var numRecords=font$jscomp$0.getUint16();length=font$jscomp$0.getUint16();var records=[],i;for(i=0;i<numRecords&&font$jscomp$0.pos+12<=nameTable;i++){var r={platform:font$jscomp$0.getUint16(),encoding:font$jscomp$0.getUint16(),language:font$jscomp$0.getUint16(),
1566
- name:font$jscomp$0.getUint16(),length:font$jscomp$0.getUint16(),offset:font$jscomp$0.getUint16()};(1===r.platform&&0===r.encoding&&0===r.language||3===r.platform&&1===r.encoding&&1033===r.language)&&records.push(r)}i=0;for(numRecords=records.length;i<numRecords;i++)if(r=records[i],!(0>=r.length)){var pos=start+length+r.offset;if(!(pos+r.length>nameTable))if(font$jscomp$0.pos=pos,pos=r.name,r.encoding){var str="",j=0;for(r=r.length;j<r;j+=2)str+=String.fromCharCode(font$jscomp$0.getUint16());names[1][pos]=
1567
- str}else names[0][pos]=(0,_util.bytesToString)(font$jscomp$0.getBytes(r.length))}return names}function sanitizeTTProgram(table,ttContext){for(var data=table.data,i=0,j,n,b,lastEndf=0,lastDeff=0,stack=[],callstack=[],functionsCalled=[],tooComplexToFollowFunctions=ttContext.tooComplexToFollowFunctions,inFDEF=!1,ifLevel=0,inELSE=0,ii=data.length;i<ii;){var op=data[i++];if(64===op)if(n=data[i++],inFDEF||inELSE)i+=n;else for(j=0;j<n;j++)stack.push(data[i++]);else if(65===op)if(n=data[i++],inFDEF||inELSE)i+=
1568
- 2*n;else for(j=0;j<n;j++)b=data[i++],stack.push(b<<8|data[i++]);else if(176===(op&248))if(n=op-176+1,inFDEF||inELSE)i+=n;else for(j=0;j<n;j++)stack.push(data[i++]);else if(184===(op&248))if(n=op-184+1,inFDEF||inELSE)i+=2*n;else for(j=0;j<n;j++)b=data[i++],stack.push(b<<8|data[i++]);else if(43!==op||tooComplexToFollowFunctions)if(44!==op||tooComplexToFollowFunctions)if(45===op)if(inFDEF)inFDEF=!1,lastEndf=i;else{j=callstack.pop();if(!j){(0,_util.warn)("TT: ENDF bad stack");ttContext.hintsValid=!1;
1569
- return}n=functionsCalled.pop();data=j.data;i=j.i;ttContext.functionsStackDeltas[n]=stack.length-j.stackTop}else if(137===op){if(inFDEF||inELSE)(0,_util.warn)("TT: nested IDEFs not allowed"),tooComplexToFollowFunctions=!0;inFDEF=!0;lastDeff=i}else 88===op?++ifLevel:27===op?inELSE=ifLevel:89===op?(inELSE===ifLevel&&(inELSE=0),--ifLevel):28!==op||inFDEF||inELSE||(n=stack[stack.length-1],0<n&&(i+=n-1));else{if(inFDEF||inELSE)(0,_util.warn)("TT: nested FDEFs not allowed"),tooComplexToFollowFunctions=!0;
1570
- inFDEF=!0;lastDeff=i;n=stack.pop();ttContext.functionsDefined[n]={data:data,i:i}}else if(!inFDEF&&!inELSE)if(n=stack[stack.length-1],isNaN(n))(0,_util.info)("TT: CALL empty stack (or invalid entry).");else if(ttContext.functionsUsed[n]=!0,n in ttContext.functionsStackDeltas){n=stack.length+ttContext.functionsStackDeltas[n];if(0>n){(0,_util.warn)("TT: CALL invalid functions stack delta.");ttContext.hintsValid=!1;return}stack.length=n}else if(n in ttContext.functionsDefined&&!functionsCalled.includes(n)){callstack.push({data:data,
1571
- i:i,stackTop:stack.length-1});functionsCalled.push(n);j=ttContext.functionsDefined[n];if(!j){(0,_util.warn)("TT: CALL non-existent function");ttContext.hintsValid=!1;return}data=j.data;i=j.i}if(!inFDEF&&!inELSE){j=142>=op?TTOpsStackDeltas[op]:192<=op&&223>=op?-1:224<=op?-2:0;113<=op&&117>=op&&(n=stack.pop(),isNaN(n)||(j=2*-n));for(;0>j&&0<stack.length;)stack.pop(),j++;for(;0<j;)stack.push(NaN),j--}}ttContext.tooComplexToFollowFunctions=tooComplexToFollowFunctions;ttContext=[data];i>data.length&&ttContext.push(new Uint8Array(i-
1572
- data.length));lastDeff>lastEndf&&((0,_util.warn)("TT: complementing a missing function tail"),ttContext.push(new Uint8Array([34,45])));if(1<ttContext.length){i=data=0;for(lastEndf=ttContext.length;i<lastEndf;i++)data+=ttContext[i].length;data=data+3&-4;lastDeff=new Uint8Array(data);i=stack=0;for(lastEndf=ttContext.length;i<lastEndf;i++)lastDeff.set(ttContext[i],stack),stack+=ttContext[i].length;table.data=lastDeff;table.length=data}}var VALID_TABLES="OS/2;cmap;head;hhea;hmtx;maxp;name;post;loca;glyf;fpgm;prep;cvt ;CFF ".split(";"),
1573
- TTOpsStackDeltas=[0,0,0,0,0,0,0,0,-2,-2,-2,-2,0,0,-2,-5,-1,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,-1,-1,1,-1,-999,0,1,0,-1,-2,0,-1,-2,-1,-1,0,-1,-1,0,0,-999,-999,-1,-1,-1,-1,-2,-999,-2,-2,-999,0,-2,-2,0,0,-2,0,-2,0,0,0,-2,-1,-1,1,1,0,0,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,0,-999,-1,-1,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,-2,-999,-999,-999,-999,-999,-1,-1,-2,-2,0,0,0,0,-1,-1,-999,-2,-2,0,0,-1,-2,-2,0,0,0,-1,-1,-1,-2];font$jscomp$0=new _stream.Stream(new Uint8Array(font$jscomp$0.getBytes()));if(isTrueTypeCollectionFile(font$jscomp$0)){var tables=
1574
- readTrueTypeCollectionData(font$jscomp$0,this.name);var header$jscomp$0=tables.header;tables=tables.tables}else header$jscomp$0=readOpenTypeHeader(font$jscomp$0),tables=readTables(font$jscomp$0,header$jscomp$0.numTables);var isTrueType=!tables["CFF "];if(isTrueType){if(!tables.loca)throw new _util.FormatError('Required "loca" table is not found');tables.glyf||((0,_util.warn)('Required "glyf" table is not found -- trying to recover.'),tables.glyf={tag:"glyf",data:new Uint8Array(0)});this.isOpenType=
1575
- !1}else{var isComposite=properties$jscomp$0.composite&&(0<(properties$jscomp$0.cidToGidMap||[]).length||!(properties$jscomp$0.cMap instanceof _cmap.IdentityCMap));if("OTTO"===header$jscomp$0.version&&!isComposite||!tables.head||!tables.hhea||!tables.maxp||!tables.post){var cffFile=new _stream.Stream(tables["CFF "].data);var cff=new CFFFont(cffFile,properties$jscomp$0);adjustWidths(properties$jscomp$0);return this.convert(name,cff,properties$jscomp$0)}delete tables.glyf;delete tables.loca;delete tables.fpgm;
1576
- delete tables.prep;delete tables["cvt "];this.isOpenType=!0}if(!tables.maxp)throw new _util.FormatError('Required "maxp" table is not found');font$jscomp$0.pos=(font$jscomp$0.start||0)+tables.maxp.offset;var version$jscomp$0=font$jscomp$0.getInt32(),numGlyphs$jscomp$0=font$jscomp$0.getUint16();isComposite=numGlyphs$jscomp$0+1;var dupFirstEntry=!0;65535<isComposite&&(dupFirstEntry=!1,isComposite=numGlyphs$jscomp$0,(0,_util.warn)("Not enough space in glyfs to duplicate first glyph."));var maxFunctionDefs=
1577
- 0,maxSizeOfInstructions=0;65536<=version$jscomp$0&&22<=tables.maxp.length&&(font$jscomp$0.pos+=8,2<font$jscomp$0.getUint16()&&(tables.maxp.data[14]=0,tables.maxp.data[15]=2),font$jscomp$0.pos+=4,maxFunctionDefs=font$jscomp$0.getUint16(),font$jscomp$0.pos+=4,maxSizeOfInstructions=font$jscomp$0.getUint16());tables.maxp.data[4]=isComposite>>8;tables.maxp.data[5]=isComposite&255;maxFunctionDefs=function(fpgm,prep,cvt,maxFunctionDefs){var ttContext={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],
1578
- tooComplexToFollowFunctions:!1,hintsValid:!0};fpgm&&sanitizeTTProgram(fpgm,ttContext);prep&&sanitizeTTProgram(prep,ttContext);if(fpgm&&!ttContext.tooComplexToFollowFunctions)if(ttContext.functionsDefined.length>maxFunctionDefs)(0,_util.warn)("TT: more functions defined than expected"),ttContext.hintsValid=!1;else for(fpgm=0,prep=ttContext.functionsUsed.length;fpgm<prep;fpgm++){if(fpgm>maxFunctionDefs){(0,_util.warn)("TT: invalid function id: "+fpgm);ttContext.hintsValid=!1;break}if(ttContext.functionsUsed[fpgm]&&
1579
- !ttContext.functionsDefined[fpgm]){(0,_util.warn)("TT: undefined function: "+fpgm);ttContext.hintsValid=!1;break}}cvt&&cvt.length&1&&(maxFunctionDefs=new Uint8Array(cvt.length+1),maxFunctionDefs.set(cvt.data),cvt.data=maxFunctionDefs);return ttContext.hintsValid}(tables.fpgm,tables.prep,tables["cvt "],maxFunctionDefs);maxFunctionDefs||(delete tables.fpgm,delete tables.prep,delete tables["cvt "]);(function(font,header,metrics,numGlyphs,dupFirstEntry){header?(font.pos=(font.start?font.start:0)+header.offset,
1580
- font.pos+=4,font.pos+=2,font.pos+=2,font.pos+=2,font.pos+=2,font.pos+=2,font.pos+=2,font.pos+=2,font.pos+=2,font.pos+=2,font.pos+=2,font.pos+=8,font.pos+=2,font=font.getUint16(),font>numGlyphs&&((0,_util.info)("The numOfMetrics ("+font+") should not be greater than the numGlyphs ("+numGlyphs+")"),font=numGlyphs,header.data[34]=(font&65280)>>8,header.data[35]=font&255),header=numGlyphs-font-(metrics.length-4*font>>1),0<header&&(header=new Uint8Array(metrics.length+2*header),header.set(metrics.data),
1581
- dupFirstEntry&&(header[metrics.length]=metrics.data[2],header[metrics.length+1]=metrics.data[3]),metrics.data=header)):metrics&&(metrics.data=null)})(font$jscomp$0,tables.hhea,tables.hmtx,isComposite,dupFirstEntry);if(!tables.head)throw new _util.FormatError('Required "head" table is not found');(function(head,numGlyphs,locaLength){head=head.data;var version=(head[0]<<24)+(head[1]<<16)+(head[2]<<8)+head[3];1!==version>>16&&((0,_util.info)("Attempting to fix invalid version in head table: "+version),
1582
- head[0]=0,head[1]=1,head[2]=0,head[3]=0);version=(head[50]<<8)+head[51];if(0>version||1<version)if((0,_util.info)("Attempting to fix invalid indexToLocFormat in head table: "+version),numGlyphs+=1,locaLength===numGlyphs<<1)head[50]=0,head[51]=0;else if(locaLength===numGlyphs<<2)head[50]=0,head[51]=1;else throw new _util.FormatError("Could not fix indexToLocFormat: "+version);})(tables.head,numGlyphs$jscomp$0,isTrueType?tables.loca.length:0);var missingGlyphs=Object.create(null);isTrueType&&(maxSizeOfInstructions=
1583
- sanitizeGlyphLocations(tables.loca,tables.glyf,numGlyphs$jscomp$0,(tables.head.data[50]<<8)+tables.head.data[51],maxFunctionDefs,dupFirstEntry,maxSizeOfInstructions),missingGlyphs=maxSizeOfInstructions.missingGlyphs,65536<=version$jscomp$0&&22<=tables.maxp.length&&(tables.maxp.data[26]=maxSizeOfInstructions.maxSizeOfInstructions>>8,tables.maxp.data[27]=maxSizeOfInstructions.maxSizeOfInstructions&255));if(!tables.hhea)throw new _util.FormatError('Required "hhea" table is not found');0===tables.hhea.data[10]&&
1584
- 0===tables.hhea.data[11]&&(tables.hhea.data[10]=255,tables.hhea.data[11]=255);version$jscomp$0={unitsPerEm:(tables.head.data[18]<<8)+tables.head.data[19],yMax:(tables.head.data[42]<<8)+tables.head.data[43],yMin:signedInt16(tables.head.data[38],tables.head.data[39]),ascent:(tables.hhea.data[4]<<8)+tables.hhea.data[5],descent:signedInt16(tables.hhea.data[6],tables.hhea.data[7])};this.ascent=version$jscomp$0.ascent/version$jscomp$0.unitsPerEm;this.descent=version$jscomp$0.descent/version$jscomp$0.unitsPerEm;
1585
- tables.post&&readPostScriptTable(tables.post,properties$jscomp$0,numGlyphs$jscomp$0);tables.post={tag:"post",data:createPostTable(properties$jscomp$0)};var charCodeToGlyphId=[],charCode$jscomp$0;if(properties$jscomp$0.composite){var cidToGidMap=properties$jscomp$0.cidToGidMap||[],isCidToGidMapEmpty=0===cidToGidMap.length;properties$jscomp$0.cMap.forEach(function(charCode,cid){if(65535<cid)throw new _util.FormatError("Max size of CID is 65,535");var glyphId=-1;isCidToGidMapEmpty?glyphId=cid:void 0!==
1586
- cidToGidMap[cid]&&(glyphId=cidToGidMap[cid]);0<=glyphId&&glyphId<numGlyphs$jscomp$0&&!missingGlyphs[glyphId]&&(charCodeToGlyphId[charCode]=glyphId)})}else{maxFunctionDefs=readCmapTable(tables.cmap,font$jscomp$0,this.isSymbolicFont,properties$jscomp$0.hasEncoding);maxSizeOfInstructions=maxFunctionDefs.platformId;var cmapEncodingId=maxFunctionDefs.encodingId;maxFunctionDefs=maxFunctionDefs.mappings;var cmapMappingsLength=maxFunctionDefs.length;if(properties$jscomp$0.hasEncoding&&(3===maxSizeOfInstructions&&
1587
- 1===cmapEncodingId||1===maxSizeOfInstructions&&0===cmapEncodingId)||-1===maxSizeOfInstructions&&-1===cmapEncodingId&&(0,_encodings.getEncoding)(properties$jscomp$0.baseEncodingName)){var baseEncoding=[];if("MacRomanEncoding"===properties$jscomp$0.baseEncodingName||"WinAnsiEncoding"===properties$jscomp$0.baseEncodingName)baseEncoding=(0,_encodings.getEncoding)(properties$jscomp$0.baseEncodingName);var glyphsUnicodeMap=(0,_glyphlist.getGlyphsUnicode)();for(charCode$jscomp$0=0;256>charCode$jscomp$0;charCode$jscomp$0++){var glyphName;
1588
- if(glyphName=this.differences&&charCode$jscomp$0 in this.differences?this.differences[charCode$jscomp$0]:charCode$jscomp$0 in baseEncoding&&""!==baseEncoding[charCode$jscomp$0]?baseEncoding[charCode$jscomp$0]:_encodings.StandardEncoding[charCode$jscomp$0]){var standardGlyphName=recoverGlyphName(glyphName,glyphsUnicodeMap);var unicodeOrCharCode;3===maxSizeOfInstructions&&1===cmapEncodingId?unicodeOrCharCode=glyphsUnicodeMap[standardGlyphName]:1===maxSizeOfInstructions&&0===cmapEncodingId&&(unicodeOrCharCode=
1589
- _encodings.MacRomanEncoding.indexOf(standardGlyphName));for(var found=!1,i$jscomp$0=0;i$jscomp$0<cmapMappingsLength;++i$jscomp$0)if(maxFunctionDefs[i$jscomp$0].charCode===unicodeOrCharCode){charCodeToGlyphId[charCode$jscomp$0]=maxFunctionDefs[i$jscomp$0].glyphId;found=!0;break}!found&&properties$jscomp$0.glyphNames&&(found=properties$jscomp$0.glyphNames.indexOf(glyphName),-1===found&&standardGlyphName!==glyphName&&(found=properties$jscomp$0.glyphNames.indexOf(standardGlyphName)),0<found&&!missingGlyphs[found]&&
1590
- (charCodeToGlyphId[charCode$jscomp$0]=found))}}}else if(0===maxSizeOfInstructions&&0===cmapEncodingId)for(unicodeOrCharCode=0;unicodeOrCharCode<cmapMappingsLength;++unicodeOrCharCode)charCodeToGlyphId[maxFunctionDefs[unicodeOrCharCode].charCode]=maxFunctionDefs[unicodeOrCharCode].glyphId;else for(unicodeOrCharCode=0;unicodeOrCharCode<cmapMappingsLength;++unicodeOrCharCode)charCode$jscomp$0=maxFunctionDefs[unicodeOrCharCode].charCode,3===maxSizeOfInstructions&&61440<=charCode$jscomp$0&&61695>=charCode$jscomp$0&&
1591
- (charCode$jscomp$0&=255),charCodeToGlyphId[charCode$jscomp$0]=maxFunctionDefs[unicodeOrCharCode].glyphId}0===charCodeToGlyphId.length&&(charCodeToGlyphId[0]=0);unicodeOrCharCode=isComposite-1;dupFirstEntry||(unicodeOrCharCode=0);dupFirstEntry=adjustMapping(charCodeToGlyphId,function(glyphId){return!missingGlyphs[glyphId]},unicodeOrCharCode);this.toFontChar=dupFirstEntry.toFontChar;tables.cmap={tag:"cmap",data:createCmapTable(dupFirstEntry.charCodeToGlyphId,isComposite)};tables["OS/2"]&&validateOS2Table(tables["OS/2"])||
1592
- (tables["OS/2"]={tag:"OS/2",data:createOS2Table(properties$jscomp$0,dupFirstEntry.charCodeToGlyphId,version$jscomp$0)});if(!isTrueType)try{cffFile=new _stream.Stream(tables["CFF "].data);cff=(new _cff_parser.CFFParser(cffFile,properties$jscomp$0,!0)).parse();cff.duplicateFirstGlyph();var compiler=new _cff_parser.CFFCompiler(cff);tables["CFF "].data=compiler.compile()}catch(e){(0,_util.warn)("Failed to compile font "+properties$jscomp$0.loadedName)}tables.name?(properties$jscomp$0=readNameTable(tables.name),
1593
- tables.name.data=createNameTable(name,properties$jscomp$0)):tables.name={tag:"name",data:createNameTable(this.name)};name=new OpenTypeFileBuilder(header$jscomp$0.version);for(var tableTag in tables)name.addTable(tableTag,tables[tableTag].data);return name.toArray()},convert:function(fontName,font,properties){function getCharCodes(charCodeToGlyphId,glyphId){var charCodes=null,charCode;for(charCode in charCodeToGlyphId)glyphId===charCodeToGlyphId[charCode]&&(charCodes||(charCodes=[]),charCodes.push(charCode|
1594
- 0));return charCodes}function createCharCode(charCodeToGlyphId,glyphId){for(var charCode in charCodeToGlyphId)if(glyphId===charCodeToGlyphId[charCode])return charCode|0;newMapping.charCodeToGlyphId[newMapping.nextAvailableFontCharCode]=glyphId;return newMapping.nextAvailableFontCharCode++}properties.fixedPitch=!1;properties.builtInEncoding&&adjustToUnicode(properties,properties.builtInEncoding);var glyphZeroId=1;font instanceof CFFFont&&(glyphZeroId=font.numGlyphs-1);var mapping=font.getGlyphMapping(properties),
1595
- newMapping=adjustMapping(mapping,font.hasGlyphId.bind(font),glyphZeroId);this.toFontChar=newMapping.toFontChar;var numGlyphs=font.numGlyphs;if((glyphZeroId=font.seacs)&&glyphZeroId.length){var matrix=properties.fontMatrix||_util.FONT_IDENTITY_MATRIX,charset=font.getCharset(),seacMap=Object.create(null);for(glyphId$jscomp$0 in glyphZeroId){glyphId$jscomp$0|=0;var seac=glyphZeroId[glyphId$jscomp$0],accentGlyphName=_encodings.StandardEncoding[seac[3]],baseGlyphId=charset.indexOf(_encodings.StandardEncoding[seac[2]]);
1596
- accentGlyphName=charset.indexOf(accentGlyphName);if(!(0>baseGlyphId||0>accentGlyphName)){seac={x:seac[0]*matrix[0]+seac[1]*matrix[2]+matrix[4],y:seac[0]*matrix[1]+seac[1]*matrix[3]+matrix[5]};var charCodes=getCharCodes(mapping,glyphId$jscomp$0);if(charCodes)for(var i$jscomp$0=0,ii=charCodes.length;i$jscomp$0<ii;i$jscomp$0++){var charCode$jscomp$0=charCodes[i$jscomp$0],charCodeToGlyphId$jscomp$0=newMapping.charCodeToGlyphId,baseFontCharCode=createCharCode(charCodeToGlyphId$jscomp$0,baseGlyphId);charCodeToGlyphId$jscomp$0=
1597
- createCharCode(charCodeToGlyphId$jscomp$0,accentGlyphName);seacMap[charCode$jscomp$0]={baseFontCharCode:baseFontCharCode,accentFontCharCode:charCodeToGlyphId$jscomp$0,accentOffset:seac}}}}properties.seacMap=seacMap}mapping=1/(properties.fontMatrix||_util.FONT_IDENTITY_MATRIX)[0];var glyphId$jscomp$0=new OpenTypeFileBuilder("OTTO");glyphId$jscomp$0.addTable("CFF ",font.data);glyphId$jscomp$0.addTable("OS/2",createOS2Table(properties,newMapping.charCodeToGlyphId));glyphId$jscomp$0.addTable("cmap",createCmapTable(newMapping.charCodeToGlyphId,
1550
+ _util.warn)("Could not find a preferred cmap table."),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};cmap=font.getUint16();font.getUint16();font.getUint16();hasEncoding=!1;isSymbolicFont=[];if(0===cmap){for(segment=0;256>segment;segment++)(hasEncoding=font.getByte())&&isSymbolicFont.push({charCode:segment,glyphId:hasEncoding});hasEncoding=!0}else if(2===cmap){cmap=[];for(numTables=segment=0;256>numTables;numTables++)canBreak=font.getUint16()>>3,cmap.push(canBreak),segment=Math.max(canBreak,
1551
+ segment);canBreak=[];for(numTables=0;numTables<=segment;numTables++)canBreak.push({firstCode:font.getUint16(),entryCount:font.getUint16(),idDelta:signedInt16(font.getByte(),font.getByte()),idRangePos:font.pos+font.getUint16()});for(platformId=0;256>platformId;platformId++)if(0===cmap[platformId])font.pos=canBreak[0].idRangePos+2*platformId,numTables=font.getUint16(),isSymbolicFont.push({charCode:platformId,glyphId:numTables});else for(encodingId=canBreak[cmap[platformId]],segment=0;segment<encodingId.entryCount;segment++)offset=
1552
+ (platformId<<8)+segment+encodingId.firstCode,font.pos=encodingId.idRangePos+2*segment,numTables=font.getUint16(),0!==numTables&&(numTables=(numTables+encodingId.idDelta)%65536),isSymbolicFont.push({charCode:offset,glyphId:numTables})}else if(4===cmap){canBreak=font.getUint16()>>1;font.getBytes(6);encodingId=[];for(platformId=0;platformId<canBreak;platformId++)encodingId.push({end:font.getUint16()});font.getUint16();for(platformId=0;platformId<canBreak;platformId++)encodingId[platformId].start=font.getUint16();
1553
+ for(platformId=0;platformId<canBreak;platformId++)encodingId[platformId].delta=font.getUint16();for(platformId=cmap=0;platformId<canBreak;platformId++)segment=encodingId[platformId],(numTables=font.getUint16())?(offset=(numTables>>1)-(canBreak-platformId),segment.offsetIndex=offset,cmap=Math.max(cmap,offset+segment.end-segment.start+1)):segment.offsetIndex=-1;useTable=[];for(segment=0;segment<cmap;segment++)useTable.push(font.getUint16());for(platformId=0;platformId<canBreak;platformId++){segment=
1554
+ encodingId[platformId];cmap=segment.start;font=segment.end;var delta=segment.delta;offset=segment.offsetIndex;for(segment=cmap;segment<=font;segment++)65535!==segment&&(numTables=0>offset?segment:useTable[offset+segment-cmap],numTables=numTables+delta&65535,isSymbolicFont.push({charCode:segment,glyphId:numTables}))}}else if(6===cmap)for(cmap=font.getUint16(),canBreak=font.getUint16(),segment=0;segment<canBreak;segment++)numTables=font.getUint16(),isSymbolicFont.push({charCode:cmap+segment,glyphId:numTables});
1555
+ else return(0,_util.warn)("cmap table has unsupported format: "+cmap),{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1};isSymbolicFont.sort(function(a,b){return a.charCode-b.charCode});for(segment=1;segment<isSymbolicFont.length;segment++)isSymbolicFont[segment-1].charCode===isSymbolicFont[segment].charCode&&(isSymbolicFont.splice(segment,1),segment--);return{platformId:potentialTable.platformId,encodingId:potentialTable.encodingId,mappings:isSymbolicFont,hasShortCmap:hasEncoding}}function sanitizeGlyph(source,
1556
+ sourceStart,sourceEnd,dest,destStart,hintsValid){var glyphProfile={length:0,sizeOfInstructions:0};if(12>=sourceEnd-sourceStart)return glyphProfile;source=source.subarray(sourceStart,sourceEnd);var contoursCount=signedInt16(source[0],source[1]);if(0>contoursCount)return source[1]=-1,source[0]=16777215,dest.set(source,destStart),glyphProfile.length=source.length,glyphProfile;sourceEnd=10;var flagsCount=0;for(sourceStart=0;sourceStart<contoursCount;sourceStart++)flagsCount=(source[sourceEnd]<<8|source[sourceEnd+
1557
+ 1])+1,sourceEnd+=2;contoursCount=sourceEnd;var instructionsLength=source[sourceEnd]<<8|source[sourceEnd+1];glyphProfile.sizeOfInstructions=instructionsLength;var instructionsEnd=sourceEnd+=2+instructionsLength,coordinatesLength=0;for(sourceStart=0;sourceStart<flagsCount;sourceStart++){var flag=source[sourceEnd++];flag&192&&(source[sourceEnd-1]=flag&63);var xyLength=(flag&2?1:flag&16?0:2)+(flag&4?1:flag&32?0:2);coordinatesLength+=xyLength;flag&8&&(flag=source[sourceEnd++],sourceStart+=flag,coordinatesLength+=
1558
+ flag*xyLength)}if(0===coordinatesLength)return glyphProfile;sourceStart=sourceEnd+coordinatesLength;if(sourceStart>source.length)return glyphProfile;if(!hintsValid&&0<instructionsLength)return dest.set(source.subarray(0,contoursCount),destStart),dest.set([0,0],destStart+contoursCount),dest.set(source.subarray(instructionsEnd,sourceStart),destStart+contoursCount+2),sourceStart-=instructionsLength,3<source.length-sourceStart&&(sourceStart=sourceStart+3&-4),glyphProfile.length=sourceStart,glyphProfile;
1559
+ if(3<source.length-sourceStart)return sourceStart=sourceStart+3&-4,dest.set(source.subarray(0,sourceStart),destStart),glyphProfile.length=sourceStart,glyphProfile;dest.set(source,destStart);glyphProfile.length=source.length;return glyphProfile}function sanitizeGlyphLocations(loca,glyf,numGlyphs,isGlyphLocationsLong,hintsValid,dupFirstEntry,maxSizeOfInstructions){if(isGlyphLocationsLong){isGlyphLocationsLong=4;var itemDecode=function(data,offset){return data[offset]<<24|data[offset+1]<<16|data[offset+
1560
+ 2]<<8|data[offset+3]};var itemEncode=function(data,offset,value){data[offset]=value>>>24&255;data[offset+1]=value>>16&255;data[offset+2]=value>>8&255;data[offset+3]=value&255}}else isGlyphLocationsLong=2,itemDecode=function(data,offset){return data[offset]<<9|data[offset+1]<<1},itemEncode=function(data,offset,value){data[offset]=value>>9&255;data[offset+1]=value>>1&255};var numGlyphsOut=dupFirstEntry?numGlyphs+1:numGlyphs,locaDataSize=isGlyphLocationsLong*(1+numGlyphsOut),locaData=new Uint8Array(locaDataSize);
1561
+ locaData.set(loca.data.subarray(0,locaDataSize));loca.data=locaData;var oldGlyfData=glyf.data,oldGlyfDataLength=oldGlyfData.length,newGlyfData=new Uint8Array(oldGlyfDataLength),startOffset=itemDecode(locaData,0),writeOffset=0;locaDataSize=Object.create(null);itemEncode(locaData,0,writeOffset);var j;var i=0;for(j=isGlyphLocationsLong;i<numGlyphs;i++,j+=isGlyphLocationsLong){var endOffset=itemDecode(locaData,j);0===endOffset&&(endOffset=startOffset);endOffset>oldGlyfDataLength&&(oldGlyfDataLength+3&
1562
+ -4)===endOffset&&(endOffset=oldGlyfDataLength);endOffset>oldGlyfDataLength&&(startOffset=endOffset);startOffset=sanitizeGlyph(oldGlyfData,startOffset,endOffset,newGlyfData,writeOffset,hintsValid);var newLength=startOffset.length;0===newLength&&(locaDataSize[i]=!0);startOffset.sizeOfInstructions>maxSizeOfInstructions&&(maxSizeOfInstructions=startOffset.sizeOfInstructions);writeOffset+=newLength;itemEncode(locaData,j,writeOffset);startOffset=endOffset}if(0===writeOffset){loca=new Uint8Array([0,1,0,
1563
+ 0,0,0,0,0,0,0,0,0,0,0,49,0]);i=0;for(j=isGlyphLocationsLong;i<numGlyphsOut;i++,j+=isGlyphLocationsLong)itemEncode(locaData,j,loca.length);glyf.data=loca}else dupFirstEntry?(numGlyphs=itemDecode(locaData,isGlyphLocationsLong),newGlyfData.length>numGlyphs+writeOffset?glyf.data=newGlyfData.subarray(0,numGlyphs+writeOffset):(glyf.data=new Uint8Array(numGlyphs+writeOffset),glyf.data.set(newGlyfData.subarray(0,writeOffset))),glyf.data.set(newGlyfData.subarray(0,numGlyphs),writeOffset),itemEncode(loca.data,
1564
+ locaData.length-isGlyphLocationsLong,writeOffset+numGlyphs)):glyf.data=newGlyfData.subarray(0,writeOffset);return{missingGlyphs:locaDataSize,maxSizeOfInstructions:maxSizeOfInstructions}}function readPostScriptTable(post,properties,maxpNumGlyphs){var start=(font$jscomp$0.start?font$jscomp$0.start:0)+post.offset;font$jscomp$0.pos=start;start+=post.length;var version=font$jscomp$0.getInt32();font$jscomp$0.getBytes(28);post=!0;switch(version){case 65536:var glyphNames=MacStandardGlyphOrdering;break;case 131072:version=
1565
+ font$jscomp$0.getUint16();if(version!==maxpNumGlyphs){post=!1;break}var glyphNameIndexes=[];for(maxpNumGlyphs=0;maxpNumGlyphs<version;++maxpNumGlyphs){var index=font$jscomp$0.getUint16();if(32768<=index){post=!1;break}glyphNameIndexes.push(index)}if(!post)break;index=[];for(glyphNames=[];font$jscomp$0.pos<start;){var stringLength=font$jscomp$0.getByte();glyphNames.length=stringLength;for(maxpNumGlyphs=0;maxpNumGlyphs<stringLength;++maxpNumGlyphs)glyphNames[maxpNumGlyphs]=String.fromCharCode(font$jscomp$0.getByte());
1566
+ index.push(glyphNames.join(""))}glyphNames=[];for(maxpNumGlyphs=0;maxpNumGlyphs<version;++maxpNumGlyphs)start=glyphNameIndexes[maxpNumGlyphs],258>start?glyphNames.push(MacStandardGlyphOrdering[start]):glyphNames.push(index[start-258]);break;case 196608:break;default:(0,_util.warn)("Unknown/unsupported post table version "+version),post=!1,properties.defaultEncoding&&(glyphNames=properties.defaultEncoding)}properties.glyphNames=glyphNames;return post}function readNameTable(nameTable){var start=(font$jscomp$0.start?
1567
+ font$jscomp$0.start:0)+nameTable.offset;font$jscomp$0.pos=start;var names=[[],[]],length=nameTable.length;nameTable=start+length;if(0!==font$jscomp$0.getUint16()||6>length)return names;var numRecords=font$jscomp$0.getUint16();length=font$jscomp$0.getUint16();var records=[],i;for(i=0;i<numRecords&&font$jscomp$0.pos+12<=nameTable;i++){var r={platform:font$jscomp$0.getUint16(),encoding:font$jscomp$0.getUint16(),language:font$jscomp$0.getUint16(),name:font$jscomp$0.getUint16(),length:font$jscomp$0.getUint16(),
1568
+ offset:font$jscomp$0.getUint16()};(1===r.platform&&0===r.encoding&&0===r.language||3===r.platform&&1===r.encoding&&1033===r.language)&&records.push(r)}i=0;for(numRecords=records.length;i<numRecords;i++)if(r=records[i],!(0>=r.length)){var pos=start+length+r.offset;if(!(pos+r.length>nameTable))if(font$jscomp$0.pos=pos,pos=r.name,r.encoding){var str="",j=0;for(r=r.length;j<r;j+=2)str+=String.fromCharCode(font$jscomp$0.getUint16());names[1][pos]=str}else names[0][pos]=(0,_util.bytesToString)(font$jscomp$0.getBytes(r.length))}return names}
1569
+ function sanitizeTTProgram(table,ttContext){for(var data=table.data,i=0,j,n,b,lastEndf=0,lastDeff=0,stack=[],callstack=[],functionsCalled=[],tooComplexToFollowFunctions=ttContext.tooComplexToFollowFunctions,inFDEF=!1,ifLevel=0,inELSE=0,ii=data.length;i<ii;){var op=data[i++];if(64===op)if(n=data[i++],inFDEF||inELSE)i+=n;else for(j=0;j<n;j++)stack.push(data[i++]);else if(65===op)if(n=data[i++],inFDEF||inELSE)i+=2*n;else for(j=0;j<n;j++)b=data[i++],stack.push(b<<8|data[i++]);else if(176===(op&248))if(n=
1570
+ op-176+1,inFDEF||inELSE)i+=n;else for(j=0;j<n;j++)stack.push(data[i++]);else if(184===(op&248))if(n=op-184+1,inFDEF||inELSE)i+=2*n;else for(j=0;j<n;j++)b=data[i++],stack.push(b<<8|data[i++]);else if(43!==op||tooComplexToFollowFunctions)if(44!==op||tooComplexToFollowFunctions)if(45===op)if(inFDEF)inFDEF=!1,lastEndf=i;else{j=callstack.pop();if(!j){(0,_util.warn)("TT: ENDF bad stack");ttContext.hintsValid=!1;return}n=functionsCalled.pop();data=j.data;i=j.i;ttContext.functionsStackDeltas[n]=stack.length-
1571
+ j.stackTop}else if(137===op){if(inFDEF||inELSE)(0,_util.warn)("TT: nested IDEFs not allowed"),tooComplexToFollowFunctions=!0;inFDEF=!0;lastDeff=i}else 88===op?++ifLevel:27===op?inELSE=ifLevel:89===op?(inELSE===ifLevel&&(inELSE=0),--ifLevel):28!==op||inFDEF||inELSE||(n=stack[stack.length-1],0<n&&(i+=n-1));else{if(inFDEF||inELSE)(0,_util.warn)("TT: nested FDEFs not allowed"),tooComplexToFollowFunctions=!0;inFDEF=!0;lastDeff=i;n=stack.pop();ttContext.functionsDefined[n]={data:data,i:i}}else if(!inFDEF&&
1572
+ !inELSE)if(n=stack[stack.length-1],isNaN(n))(0,_util.info)("TT: CALL empty stack (or invalid entry).");else if(ttContext.functionsUsed[n]=!0,n in ttContext.functionsStackDeltas){n=stack.length+ttContext.functionsStackDeltas[n];if(0>n){(0,_util.warn)("TT: CALL invalid functions stack delta.");ttContext.hintsValid=!1;return}stack.length=n}else if(n in ttContext.functionsDefined&&!functionsCalled.includes(n)){callstack.push({data:data,i:i,stackTop:stack.length-1});functionsCalled.push(n);j=ttContext.functionsDefined[n];
1573
+ if(!j){(0,_util.warn)("TT: CALL non-existent function");ttContext.hintsValid=!1;return}data=j.data;i=j.i}if(!inFDEF&&!inELSE){j=142>=op?TTOpsStackDeltas[op]:192<=op&&223>=op?-1:224<=op?-2:0;113<=op&&117>=op&&(n=stack.pop(),isNaN(n)||(j=2*-n));for(;0>j&&0<stack.length;)stack.pop(),j++;for(;0<j;)stack.push(NaN),j--}}ttContext.tooComplexToFollowFunctions=tooComplexToFollowFunctions;ttContext=[data];i>data.length&&ttContext.push(new Uint8Array(i-data.length));lastDeff>lastEndf&&((0,_util.warn)("TT: complementing a missing function tail"),
1574
+ ttContext.push(new Uint8Array([34,45])));if(1<ttContext.length){i=data=0;for(lastEndf=ttContext.length;i<lastEndf;i++)data+=ttContext[i].length;data=data+3&-4;lastDeff=new Uint8Array(data);i=stack=0;for(lastEndf=ttContext.length;i<lastEndf;i++)lastDeff.set(ttContext[i],stack),stack+=ttContext[i].length;table.data=lastDeff;table.length=data}}var VALID_TABLES="OS/2;cmap;head;hhea;hmtx;maxp;name;post;loca;glyf;fpgm;prep;cvt ;CFF ".split(";"),TTOpsStackDeltas=[0,0,0,0,0,0,0,0,-2,-2,-2,-2,0,0,-2,-5,-1,
1575
+ -1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,-1,-1,1,-1,-999,0,1,0,-1,-2,0,-1,-2,-1,-1,0,-1,-1,0,0,-999,-999,-1,-1,-1,-1,-2,-999,-2,-2,-999,0,-2,-2,0,0,-2,0,-2,0,0,0,-2,-1,-1,1,1,0,0,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,0,-999,-1,-1,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,-2,-999,-999,-999,-999,-999,-1,-1,-2,-2,0,0,0,0,-1,-1,-999,-2,-2,0,0,-1,-2,-2,0,0,0,-1,-1,-1,-2];font$jscomp$0=new _stream.Stream(new Uint8Array(font$jscomp$0.getBytes()));if(isTrueTypeCollectionFile(font$jscomp$0)){var tables=readTrueTypeCollectionData(font$jscomp$0,
1576
+ this.name);var header$jscomp$0=tables.header;tables=tables.tables}else header$jscomp$0=readOpenTypeHeader(font$jscomp$0),tables=readTables(font$jscomp$0,header$jscomp$0.numTables);var isTrueType=!tables["CFF "];if(isTrueType){if(!tables.loca)throw new _util.FormatError('Required "loca" table is not found');tables.glyf||((0,_util.warn)('Required "glyf" table is not found -- trying to recover.'),tables.glyf={tag:"glyf",data:new Uint8Array(0)});this.isOpenType=!1}else{var isComposite=properties$jscomp$0.composite&&
1577
+ (0<(properties$jscomp$0.cidToGidMap||[]).length||!(properties$jscomp$0.cMap instanceof _cmap.IdentityCMap));if("OTTO"===header$jscomp$0.version&&!isComposite||!tables.head||!tables.hhea||!tables.maxp||!tables.post){var cffFile=new _stream.Stream(tables["CFF "].data);var cff=new CFFFont(cffFile,properties$jscomp$0);adjustWidths(properties$jscomp$0);return this.convert(name,cff,properties$jscomp$0)}delete tables.glyf;delete tables.loca;delete tables.fpgm;delete tables.prep;delete tables["cvt "];this.isOpenType=
1578
+ !0}if(!tables.maxp)throw new _util.FormatError('Required "maxp" table is not found');font$jscomp$0.pos=(font$jscomp$0.start||0)+tables.maxp.offset;var version$jscomp$0=font$jscomp$0.getInt32(),numGlyphs$jscomp$0=font$jscomp$0.getUint16();isComposite=numGlyphs$jscomp$0+1;var dupFirstEntry=!0;65535<isComposite&&(dupFirstEntry=!1,isComposite=numGlyphs$jscomp$0,(0,_util.warn)("Not enough space in glyfs to duplicate first glyph."));var maxFunctionDefs=0,maxSizeOfInstructions=0;65536<=version$jscomp$0&&
1579
+ 22<=tables.maxp.length&&(font$jscomp$0.pos+=8,2<font$jscomp$0.getUint16()&&(tables.maxp.data[14]=0,tables.maxp.data[15]=2),font$jscomp$0.pos+=4,maxFunctionDefs=font$jscomp$0.getUint16(),font$jscomp$0.pos+=4,maxSizeOfInstructions=font$jscomp$0.getUint16());tables.maxp.data[4]=isComposite>>8;tables.maxp.data[5]=isComposite&255;maxFunctionDefs=function(fpgm,prep,cvt,maxFunctionDefs){var ttContext={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],tooComplexToFollowFunctions:!1,hintsValid:!0};
1580
+ fpgm&&sanitizeTTProgram(fpgm,ttContext);prep&&sanitizeTTProgram(prep,ttContext);if(fpgm&&!ttContext.tooComplexToFollowFunctions)if(ttContext.functionsDefined.length>maxFunctionDefs)(0,_util.warn)("TT: more functions defined than expected"),ttContext.hintsValid=!1;else for(fpgm=0,prep=ttContext.functionsUsed.length;fpgm<prep;fpgm++){if(fpgm>maxFunctionDefs){(0,_util.warn)("TT: invalid function id: "+fpgm);ttContext.hintsValid=!1;break}if(ttContext.functionsUsed[fpgm]&&!ttContext.functionsDefined[fpgm]){(0,
1581
+ _util.warn)("TT: undefined function: "+fpgm);ttContext.hintsValid=!1;break}}cvt&&cvt.length&1&&(maxFunctionDefs=new Uint8Array(cvt.length+1),maxFunctionDefs.set(cvt.data),cvt.data=maxFunctionDefs);return ttContext.hintsValid}(tables.fpgm,tables.prep,tables["cvt "],maxFunctionDefs);maxFunctionDefs||(delete tables.fpgm,delete tables.prep,delete tables["cvt "]);(function(font,header,metrics,numGlyphs,dupFirstEntry){header?(font.pos=(font.start?font.start:0)+header.offset,font.pos+=4,font.pos+=2,font.pos+=
1582
+ 2,font.pos+=2,font.pos+=2,font.pos+=2,font.pos+=2,font.pos+=2,font.pos+=2,font.pos+=2,font.pos+=2,font.pos+=8,font.pos+=2,font=font.getUint16(),font>numGlyphs&&((0,_util.info)("The numOfMetrics ("+font+") should not be greater than the numGlyphs ("+numGlyphs+")"),font=numGlyphs,header.data[34]=(font&65280)>>8,header.data[35]=font&255),header=numGlyphs-font-(metrics.length-4*font>>1),0<header&&(header=new Uint8Array(metrics.length+2*header),header.set(metrics.data),dupFirstEntry&&(header[metrics.length]=
1583
+ metrics.data[2],header[metrics.length+1]=metrics.data[3]),metrics.data=header)):metrics&&(metrics.data=null)})(font$jscomp$0,tables.hhea,tables.hmtx,isComposite,dupFirstEntry);if(!tables.head)throw new _util.FormatError('Required "head" table is not found');(function(head,numGlyphs,locaLength){head=head.data;var version=(head[0]<<24)+(head[1]<<16)+(head[2]<<8)+head[3];1!==version>>16&&((0,_util.info)("Attempting to fix invalid version in head table: "+version),head[0]=0,head[1]=1,head[2]=0,head[3]=
1584
+ 0);version=(head[50]<<8)+head[51];if(0>version||1<version)if((0,_util.info)("Attempting to fix invalid indexToLocFormat in head table: "+version),numGlyphs+=1,locaLength===numGlyphs<<1)head[50]=0,head[51]=0;else if(locaLength===numGlyphs<<2)head[50]=0,head[51]=1;else throw new _util.FormatError("Could not fix indexToLocFormat: "+version);})(tables.head,numGlyphs$jscomp$0,isTrueType?tables.loca.length:0);var missingGlyphs=Object.create(null);isTrueType&&(maxSizeOfInstructions=sanitizeGlyphLocations(tables.loca,
1585
+ tables.glyf,numGlyphs$jscomp$0,(tables.head.data[50]<<8)+tables.head.data[51],maxFunctionDefs,dupFirstEntry,maxSizeOfInstructions),missingGlyphs=maxSizeOfInstructions.missingGlyphs,65536<=version$jscomp$0&&22<=tables.maxp.length&&(tables.maxp.data[26]=maxSizeOfInstructions.maxSizeOfInstructions>>8,tables.maxp.data[27]=maxSizeOfInstructions.maxSizeOfInstructions&255));if(!tables.hhea)throw new _util.FormatError('Required "hhea" table is not found');0===tables.hhea.data[10]&&0===tables.hhea.data[11]&&
1586
+ (tables.hhea.data[10]=255,tables.hhea.data[11]=255);version$jscomp$0={unitsPerEm:(tables.head.data[18]<<8)+tables.head.data[19],yMax:(tables.head.data[42]<<8)+tables.head.data[43],yMin:signedInt16(tables.head.data[38],tables.head.data[39]),ascent:(tables.hhea.data[4]<<8)+tables.hhea.data[5],descent:signedInt16(tables.hhea.data[6],tables.hhea.data[7])};this.ascent=version$jscomp$0.ascent/version$jscomp$0.unitsPerEm;this.descent=version$jscomp$0.descent/version$jscomp$0.unitsPerEm;tables.post&&readPostScriptTable(tables.post,
1587
+ properties$jscomp$0,numGlyphs$jscomp$0);tables.post={tag:"post",data:createPostTable(properties$jscomp$0)};var charCodeToGlyphId=[],charCode$jscomp$0;if(properties$jscomp$0.composite){var cidToGidMap=properties$jscomp$0.cidToGidMap||[],isCidToGidMapEmpty=0===cidToGidMap.length;properties$jscomp$0.cMap.forEach(function(charCode,cid){if(65535<cid)throw new _util.FormatError("Max size of CID is 65,535");var glyphId=-1;isCidToGidMapEmpty?glyphId=cid:void 0!==cidToGidMap[cid]&&(glyphId=cidToGidMap[cid]);
1588
+ 0<=glyphId&&glyphId<numGlyphs$jscomp$0&&!missingGlyphs[glyphId]&&(charCodeToGlyphId[charCode]=glyphId)})}else{maxFunctionDefs=readCmapTable(tables.cmap,font$jscomp$0,this.isSymbolicFont,properties$jscomp$0.hasEncoding);maxSizeOfInstructions=maxFunctionDefs.platformId;var cmapEncodingId=maxFunctionDefs.encodingId;maxFunctionDefs=maxFunctionDefs.mappings;var cmapMappingsLength=maxFunctionDefs.length;if(properties$jscomp$0.hasEncoding&&(3===maxSizeOfInstructions&&1===cmapEncodingId||1===maxSizeOfInstructions&&
1589
+ 0===cmapEncodingId)||-1===maxSizeOfInstructions&&-1===cmapEncodingId&&(0,_encodings.getEncoding)(properties$jscomp$0.baseEncodingName)){var baseEncoding=[];if("MacRomanEncoding"===properties$jscomp$0.baseEncodingName||"WinAnsiEncoding"===properties$jscomp$0.baseEncodingName)baseEncoding=(0,_encodings.getEncoding)(properties$jscomp$0.baseEncodingName);var glyphsUnicodeMap=(0,_glyphlist.getGlyphsUnicode)();for(charCode$jscomp$0=0;256>charCode$jscomp$0;charCode$jscomp$0++){var glyphName;if(glyphName=
1590
+ this.differences&&charCode$jscomp$0 in this.differences?this.differences[charCode$jscomp$0]:charCode$jscomp$0 in baseEncoding&&""!==baseEncoding[charCode$jscomp$0]?baseEncoding[charCode$jscomp$0]:_encodings.StandardEncoding[charCode$jscomp$0]){var standardGlyphName=recoverGlyphName(glyphName,glyphsUnicodeMap);var unicodeOrCharCode;3===maxSizeOfInstructions&&1===cmapEncodingId?unicodeOrCharCode=glyphsUnicodeMap[standardGlyphName]:1===maxSizeOfInstructions&&0===cmapEncodingId&&(unicodeOrCharCode=_encodings.MacRomanEncoding.indexOf(standardGlyphName));
1591
+ for(var found=!1,i$jscomp$0=0;i$jscomp$0<cmapMappingsLength;++i$jscomp$0)if(maxFunctionDefs[i$jscomp$0].charCode===unicodeOrCharCode){charCodeToGlyphId[charCode$jscomp$0]=maxFunctionDefs[i$jscomp$0].glyphId;found=!0;break}!found&&properties$jscomp$0.glyphNames&&(found=properties$jscomp$0.glyphNames.indexOf(glyphName),-1===found&&standardGlyphName!==glyphName&&(found=properties$jscomp$0.glyphNames.indexOf(standardGlyphName)),0<found&&!missingGlyphs[found]&&(charCodeToGlyphId[charCode$jscomp$0]=found))}}}else if(0===
1592
+ maxSizeOfInstructions&&0===cmapEncodingId)for(unicodeOrCharCode=0;unicodeOrCharCode<cmapMappingsLength;++unicodeOrCharCode)charCodeToGlyphId[maxFunctionDefs[unicodeOrCharCode].charCode]=maxFunctionDefs[unicodeOrCharCode].glyphId;else for(unicodeOrCharCode=0;unicodeOrCharCode<cmapMappingsLength;++unicodeOrCharCode)charCode$jscomp$0=maxFunctionDefs[unicodeOrCharCode].charCode,3===maxSizeOfInstructions&&61440<=charCode$jscomp$0&&61695>=charCode$jscomp$0&&(charCode$jscomp$0&=255),charCodeToGlyphId[charCode$jscomp$0]=
1593
+ maxFunctionDefs[unicodeOrCharCode].glyphId}0===charCodeToGlyphId.length&&(charCodeToGlyphId[0]=0);unicodeOrCharCode=isComposite-1;dupFirstEntry||(unicodeOrCharCode=0);dupFirstEntry=adjustMapping(charCodeToGlyphId,function(glyphId){return!missingGlyphs[glyphId]},unicodeOrCharCode);this.toFontChar=dupFirstEntry.toFontChar;tables.cmap={tag:"cmap",data:createCmapTable(dupFirstEntry.charCodeToGlyphId,isComposite)};tables["OS/2"]&&validateOS2Table(tables["OS/2"])||(tables["OS/2"]={tag:"OS/2",data:createOS2Table(properties$jscomp$0,
1594
+ dupFirstEntry.charCodeToGlyphId,version$jscomp$0)});if(!isTrueType)try{cffFile=new _stream.Stream(tables["CFF "].data);cff=(new _cff_parser.CFFParser(cffFile,properties$jscomp$0,!0)).parse();cff.duplicateFirstGlyph();var compiler=new _cff_parser.CFFCompiler(cff);tables["CFF "].data=compiler.compile()}catch(e){(0,_util.warn)("Failed to compile font "+properties$jscomp$0.loadedName)}tables.name?(properties$jscomp$0=readNameTable(tables.name),tables.name.data=createNameTable(name,properties$jscomp$0)):
1595
+ tables.name={tag:"name",data:createNameTable(this.name)};name=new OpenTypeFileBuilder(header$jscomp$0.version);for(var tableTag in tables)name.addTable(tableTag,tables[tableTag].data);return name.toArray()},convert:function(fontName,font,properties){function getCharCodes(charCodeToGlyphId,glyphId){var charCodes=null,charCode;for(charCode in charCodeToGlyphId)glyphId===charCodeToGlyphId[charCode]&&(charCodes||(charCodes=[]),charCodes.push(charCode|0));return charCodes}function createCharCode(charCodeToGlyphId,
1596
+ glyphId){for(var charCode in charCodeToGlyphId)if(glyphId===charCodeToGlyphId[charCode])return charCode|0;newMapping.charCodeToGlyphId[newMapping.nextAvailableFontCharCode]=glyphId;return newMapping.nextAvailableFontCharCode++}properties.fixedPitch=!1;properties.builtInEncoding&&adjustToUnicode(properties,properties.builtInEncoding);var glyphZeroId=1;font instanceof CFFFont&&(glyphZeroId=font.numGlyphs-1);var mapping=font.getGlyphMapping(properties),newMapping=adjustMapping(mapping,font.hasGlyphId.bind(font),
1597
+ glyphZeroId);this.toFontChar=newMapping.toFontChar;var numGlyphs=font.numGlyphs;if((glyphZeroId=font.seacs)&&glyphZeroId.length){var matrix=properties.fontMatrix||_util.FONT_IDENTITY_MATRIX,charset=font.getCharset(),seacMap=Object.create(null);for(glyphId$jscomp$0 in glyphZeroId){glyphId$jscomp$0|=0;var seac=glyphZeroId[glyphId$jscomp$0],accentGlyphName=_encodings.StandardEncoding[seac[3]],baseGlyphId=charset.indexOf(_encodings.StandardEncoding[seac[2]]);accentGlyphName=charset.indexOf(accentGlyphName);
1598
+ if(!(0>baseGlyphId||0>accentGlyphName)){seac={x:seac[0]*matrix[0]+seac[1]*matrix[2]+matrix[4],y:seac[0]*matrix[1]+seac[1]*matrix[3]+matrix[5]};var charCodes=getCharCodes(mapping,glyphId$jscomp$0);if(charCodes)for(var i$jscomp$0=0,ii=charCodes.length;i$jscomp$0<ii;i$jscomp$0++){var charCode$jscomp$0=charCodes[i$jscomp$0],charCodeToGlyphId$jscomp$0=newMapping.charCodeToGlyphId,baseFontCharCode=createCharCode(charCodeToGlyphId$jscomp$0,baseGlyphId);charCodeToGlyphId$jscomp$0=createCharCode(charCodeToGlyphId$jscomp$0,
1599
+ accentGlyphName);seacMap[charCode$jscomp$0]={baseFontCharCode:baseFontCharCode,accentFontCharCode:charCodeToGlyphId$jscomp$0,accentOffset:seac}}}}properties.seacMap=seacMap}mapping=1/(properties.fontMatrix||_util.FONT_IDENTITY_MATRIX)[0];var glyphId$jscomp$0=new OpenTypeFileBuilder("OTTO");glyphId$jscomp$0.addTable("CFF ",font.data);glyphId$jscomp$0.addTable("OS/2",createOS2Table(properties,newMapping.charCodeToGlyphId));glyphId$jscomp$0.addTable("cmap",createCmapTable(newMapping.charCodeToGlyphId,
1598
1600
  numGlyphs));glyphId$jscomp$0.addTable("head","\x00\u0001\x00\x00\x00\x00\u0010\x00\x00\x00\x00\x00_\u000f<\u00f5\x00\x00"+safeString16(mapping)+"\x00\x00\x00\x00\u009e\x0B~'\x00\x00\x00\x00\u009e\x0B~'\x00\x00"+safeString16(properties.descent)+"\u000f\u00ff"+safeString16(properties.ascent)+string16(properties.italicAngle?2:0)+"\x00\u0011\x00\x00\x00\x00\x00\x00");glyphId$jscomp$0.addTable("hhea","\x00\u0001\x00\x00"+safeString16(properties.ascent)+safeString16(properties.descent)+"\x00\x00\u00ff\u00ff\x00\x00\x00\x00\x00\x00"+
1599
1601
  safeString16(properties.capHeight)+safeString16(Math.tan(properties.italicAngle)*properties.xHeight)+"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"+string16(numGlyphs));glyphId$jscomp$0.addTable("hmtx",function(){for(var charstrings=font.charstrings,cffWidths=font.cff?font.cff.widths:null,hmtx="\x00\x00\x00\x00",i=1;i<numGlyphs;i++){var width=0;charstrings?(width=charstrings[i-1],width="width"in width?width.width:0):cffWidths&&(width=Math.ceil(cffWidths[i]||0));hmtx+=string16(width)+string16(0)}return hmtx}());
1600
1602
  glyphId$jscomp$0.addTable("maxp","\x00\x00P\x00"+string16(numGlyphs));glyphId$jscomp$0.addTable("name",createNameTable(fontName));glyphId$jscomp$0.addTable("post",createPostTable(properties));return glyphId$jscomp$0.toArray()},get spaceWidth(){if("_shadowWidth"in this)return this._shadowWidth;for(var possibleSpaceReplacements=["space","minus","one","i","I"],width,i=0,ii=possibleSpaceReplacements.length;i<ii;i++){width=possibleSpaceReplacements[i];if(width in this.widths){width=this.widths[width];
@@ -8,9 +8,9 @@
8
8
  ja(f,"is-empty")||ja(f.parentNode,"is-disabled")?ja(f,"pika-prev")?h.prevMonth():ja(f,"pika-next")?h.nextMonth():ja(f,"pika-set-today")&&(h.setDate(new Date),h.hide()):(h.setDate(new Date(f.getAttribute("data-pika-year"),f.getAttribute("data-pika-month"),f.getAttribute("data-pika-day"))),n.bound&&sa(function(){h.hide();n.blurFieldOnSelect&&n.field&&n.field.blur()},100))),ja(f,"pika-select"))h._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}};h._onChange=function(e){var f=
9
9
  (e=e||window.event).target||e.srcElement;f&&(ja(f,"pika-select-month")?h.gotoMonth(f.value):ja(f,"pika-select-year")&&h.gotoYear(f.value))};h._onKeyChange=function(e){if(e=e||window.event,h.isVisible())switch(e.keyCode){case 13:case 27:n.field&&n.field.blur();break;case 37:h.adjustDate("subtract",1);break;case 38:h.adjustDate("subtract",7);break;case 39:h.adjustDate("add",1);break;case 40:h.adjustDate("add",7);break;case 8:case 46:h.setDate(null)}};h._parseFieldValue=function(){if(n.parse)return n.parse(n.field.value,
10
10
  n.format);if(la){var f=e(n.field.value,n.format,n.formatStrict);return f&&f.isValid()?f.toDate():null}return new Date(Date.parse(n.field.value))};h._onInputChange=function(e){var f;e.firedBy!==h&&(f=h._parseFieldValue(),r(f)&&h.setDate(f),h._v||h.show())};h._onInputFocus=function(){h.show()};h._onInputClick=function(){h.show()};h._onInputBlur=function(){var e=ra.activeElement;do if(ja(e,"pika-single"))return;while(e=e.parentNode);h._c||(h._b=sa(function(){h.hide()},50));h._c=!1};h._onClick=function(e){var f=
11
- (e=e||window.event).target||e.srcElement;if(e=f){!na&&ja(f,"pika-select")&&(f.onchange||(f.setAttribute("onchange","return;"),oa(f,"change",h._onChange)));do if(ja(e,"pika-single")||e===n.trigger)return;while(e=e.parentNode);h._v&&f!==n.trigger&&e!==n.trigger&&h.hide()}};h.el=ra.createElement("div");h.el.className="pika-single"+(n.isRTL?" is-rtl":"")+(n.theme?" "+n.theme:"");oa(h.el,"mousedown",h._onMouseDown,!0);oa(h.el,"touchend",h._onMouseDown,!0);oa(h.el,"change",h._onChange);n.keyboardInput&&
12
- oa(ra,"keydown",h._onKeyChange);n.field&&(n.container?n.container.appendChild(h.el):n.bound?ra.body.appendChild(h.el):n.field.parentNode.insertBefore(h.el,n.field.nextSibling),oa(n.field,"change",h._onInputChange),n.defaultDate||(n.defaultDate=h._parseFieldValue(),n.setDefaultDate=!0));f=n.defaultDate;r(f)?n.setDefaultDate?h.setDate(f,!0):h.gotoDate(f):h.gotoDate(new Date);n.bound?(this.hide(),h.el.className+=" is-bound",oa(n.trigger,"click",h._onInputClick),oa(n.trigger,"focus",h._onInputFocus),
13
- oa(n.trigger,"blur",h._onInputBlur)):this.show()}function x(e,f,h){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+h+'">'+function(e){var f,h=[];e.showWeekNumber&&h.push("<th></th>");for(f=0;7>f;f++)h.push('<th scope="col"><abbr title="'+w(e,f)+'">'+w(e,f,!0)+"</abbr></th>");return"<thead><tr>"+(e.isRTL?h.reverse():h).join("")+"</tr></thead>"}(e)+("<tbody>"+f.join("")+"</tbody>")+(e.showTodayButton?function(e){var f=[];return f.push('<td colspan="'+
11
+ (e=e||window.event).target||e.srcElement;if(e=f){!na&&ja(f,"pika-select")&&(f.onchange||(f.setAttribute("onchange","return;"),ma(f,"change",h._onChange)));do if(ja(e,"pika-single")||e===n.trigger)return;while(e=e.parentNode);h._v&&f!==n.trigger&&e!==n.trigger&&h.hide()}};h.el=ra.createElement("div");h.el.className="pika-single"+(n.isRTL?" is-rtl":"")+(n.theme?" "+n.theme:"");ma(h.el,"mousedown",h._onMouseDown,!0);ma(h.el,"touchend",h._onMouseDown,!0);ma(h.el,"change",h._onChange);n.keyboardInput&&
12
+ ma(ra,"keydown",h._onKeyChange);n.field&&(n.container?n.container.appendChild(h.el):n.bound?ra.body.appendChild(h.el):n.field.parentNode.insertBefore(h.el,n.field.nextSibling),ma(n.field,"change",h._onInputChange),n.defaultDate||(n.defaultDate=h._parseFieldValue(),n.setDefaultDate=!0));f=n.defaultDate;r(f)?n.setDefaultDate?h.setDate(f,!0):h.gotoDate(f):h.gotoDate(new Date);n.bound?(this.hide(),h.el.className+=" is-bound",ma(n.trigger,"click",h._onInputClick),ma(n.trigger,"focus",h._onInputFocus),
13
+ ma(n.trigger,"blur",h._onInputBlur)):this.show()}function x(e,f,h){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+h+'">'+function(e){var f,h=[];e.showWeekNumber&&h.push("<th></th>");for(f=0;7>f;f++)h.push('<th scope="col"><abbr title="'+w(e,f)+'">'+w(e,f,!0)+"</abbr></th>");return"<thead><tr>"+(e.isRTL?h.reverse():h).join("")+"</tr></thead>"}(e)+("<tbody>"+f.join("")+"</tbody>")+(e.showTodayButton?function(e){var f=[];return f.push('<td colspan="'+
14
14
  (e.showWeekNumber?"8":"7")+'"><button class="pika-set-today">'+e.i18n.today+"</button></td>"),"<tfoot>"+(e.isRTL?f.reverse():f).join("")+"</tfoot>"}(e):"")+"</table>"}function ha(e,f,h,n,r,w){var x,y,aa=e._o,ba=h===aa.minYear,da=h===aa.maxYear,ca='<div id="'+w+'" class="pika-title" role="heading" aria-live="assertive">',ea=!0,fa=!0;var ha=[];for(w=0;12>w;w++)ha.push('<option value="'+(h===r?w-f:12+w-f)+'"'+(w===n?' selected="selected"':"")+(ba&&w<aa.minMonth||da&&w>aa.maxMonth?' disabled="disabled"':
15
15
  "")+">"+aa.i18n.months[w]+"</option>");r='<div class="pika-label">'+aa.i18n.months[n]+'<select class="pika-select pika-select-month" tabindex="-1">'+ha.join("")+"</select></div>";z(aa.yearRange)?(w=aa.yearRange[0],x=aa.yearRange[1]+1):(w=h-aa.yearRange,x=1+h+aa.yearRange);for(ha=[];w<x&&w<=aa.maxYear;w++)w>=aa.minYear&&ha.push('<option value="'+w+'"'+(w===h?' selected="selected"':"")+">"+w+"</option>");return y='<div class="pika-label">'+h+aa.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+
16
16
  ha.join("")+"</select></div>",aa.showMonthAfterYear?ca+=y+r:ca+=r+y,ba&&(0===n||aa.minMonth>=n)&&(ea=!1),da&&(11===n||aa.maxMonth<=n)&&(fa=!1),0===f&&(ca+='<button class="pika-prev'+(ea?"":" is-disabled")+'" type="button">'+aa.i18n.previousMonth+"</button>"),f===e._o.numberOfMonths-1&&(ca+='<button class="pika-next'+(fa?"":" is-disabled")+'" type="button">'+aa.i18n.nextMonth+"</button>"),ca+"</div>"}function ca(e,f,h,n){return'<tr class="pika-row'+(h?" pick-whole-week":"")+(n?" is-selected":"")+'">'+
@@ -18,22 +18,22 @@ ha.join("")+"</select></div>",aa.showMonthAfterYear?ca+=y+r:ca+=r+y,ba&&(0===n||
18
18
  f.push("is-selection-disabled")}return e.isDisabled&&f.push("is-disabled"),e.isToday&&f.push("is-today"),e.isSelected&&(f.push("is-selected"),h="true"),e.hasEvent&&f.push("has-event"),e.isInRange&&f.push("is-inrange"),e.isStartRange&&f.push("is-startrange"),e.isEndRange&&f.push("is-endrange"),'<td data-day="'+e.day+'" class="'+f.join(" ")+'" aria-selected="'+h+'"><button class="pika-button pika-day" type="button" data-pika-year="'+e.year+'" data-pika-month="'+e.month+'" data-pika-day="'+e.day+'">'+
19
19
  e.day+"</button></td>"}function w(e,f,h){for(f+=e.firstDay;7<=f;)f-=7;return h?e.i18n.weekdaysShort[f]:e.i18n.weekdays[f]}function y(e){return 0>e.month&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),11<e.month&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e}function n(e,f,n){var r;ra.createEvent?((r=ra.createEvent("HTMLEvents")).initEvent(f,!0,!1),r=h(r,n),e.dispatchEvent(r)):ra.createEventObject&&(r=ra.createEventObject(),r=h(r,n),e.fireEvent("on"+f,r))}function h(e,f,n){var w,
20
20
  x;for(w in f)(x=void 0!==e[w])&&"object"==typeof f[w]&&null!==f[w]&&void 0===f[w].nodeName?r(f[w])?n&&(e[w]=new Date(f[w].getTime())):z(f[w])?n&&(e[w]=f[w].slice(0)):e[w]=h({},f[w],n):!n&&x||(e[w]=f[w]);return e}function f(e){r(e)&&e.setHours(0,0,0,0)}function r(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())}function z(e){return/Array/.test(Object.prototype.toString.call(e))}function fa(e,f){var h;e.className=(h=(" "+e.className+" ").replace(" "+f+" "," ")).trim?h.trim():
21
- h.replace(/^\s+|\s+$/g,"")}function ia(e,f){ja(e,f)||(e.className=""===e.className?f:e.className+" "+f)}function ja(e,f){return-1!==(" "+e.className+" ").indexOf(" "+f+" ")}function qa(e,f,h,n){na?e.removeEventListener(f,h,!!n):e.detachEvent("on"+f,h)}function oa(e,f,h,n){na?e.addEventListener(f,h,!!n):e.attachEvent("on"+f,h)}var la="function"==typeof e,na=!!window.addEventListener,ra=window.document,sa=window.setTimeout,Ea={field:null,bound:void 0,ariaLabel:"Use the arrow keys to pick a date",position:"bottom left",
21
+ h.replace(/^\s+|\s+$/g,"")}function ia(e,f){ja(e,f)||(e.className=""===e.className?f:e.className+" "+f)}function ja(e,f){return-1!==(" "+e.className+" ").indexOf(" "+f+" ")}function pa(e,f,h,n){na?e.removeEventListener(f,h,!!n):e.detachEvent("on"+f,h)}function ma(e,f,h,n){na?e.addEventListener(f,h,!!n):e.attachEvent("on"+f,h)}var la="function"==typeof e,na=!!window.addEventListener,ra=window.document,sa=window.setTimeout,Da={field:null,bound:void 0,ariaLabel:"Use the arrow keys to pick a date",position:"bottom left",
22
22
  reposition:!0,format:"YYYY-MM-DD",toString:null,parse:null,defaultDate:null,setDefaultDate:!1,firstDay:0,firstWeekOfYearMinDays:4,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,showTodayButton:!1,pickWholeWeek:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,enableSelectionDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,
23
- blurFieldOnSelect:!0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",today:"Today",months:"January February March April May June July August September October November December".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),weekdaysShort:"Sun Mon Tue Wed Thu Fri Sat".split(" ")},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null,keyboardInput:!0};return ba.prototype={config:function(e){this._o||(this._o=h({},Ea,!0));e=h(this._o,
23
+ blurFieldOnSelect:!0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",today:"Today",months:"January February March April May June July August September October November December".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),weekdaysShort:"Sun Mon Tue Wed Thu Fri Sat".split(" ")},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null,keyboardInput:!0};return ba.prototype={config:function(e){this._o||(this._o=h({},Da,!0));e=h(this._o,
24
24
  e,!0);e.isRTL=!!e.isRTL;e.field=e.field&&e.field.nodeName?e.field:null;e.theme="string"==typeof e.theme&&e.theme?e.theme:null;e.bound=!!(void 0!==e.bound?e.field&&e.bound:e.field);e.trigger=e.trigger&&e.trigger.nodeName?e.trigger:e.field;e.disableWeekends=!!e.disableWeekends;e.disableDayFn="function"==typeof e.disableDayFn?e.disableDayFn:null;var f=parseInt(e.numberOfMonths,10)||1;(e.numberOfMonths=4<f?4:f,r(e.minDate)||(e.minDate=!1),r(e.maxDate)||(e.maxDate=!1),e.minDate&&e.maxDate&&e.maxDate<e.minDate&&
25
- (e.maxDate=e.minDate=!1),e.minDate&&this.setMinDate(e.minDate),e.maxDate&&this.setMaxDate(e.maxDate),z(e.yearRange))?(f=(new Date).getFullYear()-10,e.yearRange[0]=parseInt(e.yearRange[0],10)||f,e.yearRange[1]=parseInt(e.yearRange[1],10)||f):(e.yearRange=Math.abs(parseInt(e.yearRange,10))||Ea.yearRange,100<e.yearRange&&(e.yearRange=100));return e},toString:function(f){return f=f||this._o.format,r(this._d)?this._o.toString?this._o.toString(this._d,f):la?e(this._d).format(f):this._d.toDateString():""},
25
+ (e.maxDate=e.minDate=!1),e.minDate&&this.setMinDate(e.minDate),e.maxDate&&this.setMaxDate(e.maxDate),z(e.yearRange))?(f=(new Date).getFullYear()-10,e.yearRange[0]=parseInt(e.yearRange[0],10)||f,e.yearRange[1]=parseInt(e.yearRange[1],10)||f):(e.yearRange=Math.abs(parseInt(e.yearRange,10))||Da.yearRange,100<e.yearRange&&(e.yearRange=100));return e},toString:function(f){return f=f||this._o.format,r(this._d)?this._o.toString?this._o.toString(this._d,f):la?e(this._d).format(f):this._d.toDateString():""},
26
26
  getMoment:function(){return la?e(this._d):null},setMoment:function(f,h){la&&e.isMoment(f)&&this.setDate(f.toDate(),h)},getDate:function(){return r(this._d)?new Date(this._d.getTime()):null},setDate:function(e,f){if(!e)return this._d=null,this._o.field&&(this._o.field.value="",n(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),r(e)){var h=this._o.minDate,w=this._o.maxDate;r(h)&&e<h?e=h:r(w)&&e>w&&(e=w);this._d=new Date(e.getTime());this.gotoDate(this._d);
27
27
  this._o.field&&(this._o.field.value=this.toString(),n(this._o.field,"change",{firedBy:this}));f||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},clear:function(){this.setDate(null)},gotoDate:function(e){var f=!0;if(r(e)){if(this.calendars){f=new Date(this.calendars[0].year,this.calendars[0].month,1);var h=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),n=e.getTime();h.setMonth(h.getMonth()+1);h.setDate(h.getDate()-
28
28
  1);f=n<f.getTime()||h.getTime()<n}f&&(this.calendars=[{month:e.getMonth(),year:e.getFullYear()}],"right"===this._o.mainCalendar&&(this.calendars[0].month+=1-this._o.numberOfMonths));this.adjustCalendars()}},adjustDate:function(e,f){var h,n=this.getDate()||new Date;f=864E5*parseInt(f);"add"===e?h=new Date(n.valueOf()+f):"subtract"===e&&(h=new Date(n.valueOf()-f));this.setDate(h)},adjustCalendars:function(){this.calendars[0]=y(this.calendars[0]);for(var e=1;e<this._o.numberOfMonths;e++)this.calendars[e]=
29
29
  y({month:this.calendars[0].month+e,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(e){isNaN(e)||(this.calendars[0].month=parseInt(e,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++;this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--;this.adjustCalendars()},gotoYear:function(e){isNaN(e)||(this.calendars[0].year=parseInt(e,10),this.adjustCalendars())},setMinDate:function(e){e instanceof Date?(f(e),
30
- this._o.minDate=e,this._o.minYear=e.getFullYear(),this._o.minMonth=e.getMonth()):(this._o.minDate=Ea.minDate,this._o.minYear=Ea.minYear,this._o.minMonth=Ea.minMonth,this._o.startRange=Ea.startRange);this.draw()},setMaxDate:function(e){e instanceof Date?(f(e),this._o.maxDate=e,this._o.maxYear=e.getFullYear(),this._o.maxMonth=e.getMonth()):(this._o.maxDate=Ea.maxDate,this._o.maxYear=Ea.maxYear,this._o.maxMonth=Ea.maxMonth,this._o.endRange=Ea.endRange);this.draw()},setStartRange:function(e){this._o.startRange=
30
+ this._o.minDate=e,this._o.minYear=e.getFullYear(),this._o.minMonth=e.getMonth()):(this._o.minDate=Da.minDate,this._o.minYear=Da.minYear,this._o.minMonth=Da.minMonth,this._o.startRange=Da.startRange);this.draw()},setMaxDate:function(e){e instanceof Date?(f(e),this._o.maxDate=e,this._o.maxYear=e.getFullYear(),this._o.maxMonth=e.getMonth()):(this._o.maxDate=Da.maxDate,this._o.maxYear=Da.maxYear,this._o.maxMonth=Da.maxMonth,this._o.endRange=Da.endRange);this.draw()},setStartRange:function(e){this._o.startRange=
31
31
  e},setEndRange:function(e){this._o.endRange=e},draw:function(e){if(this._v||e){var f=this._o;var h=f.minYear;var n=f.maxYear,r=f.minMonth,w=f.maxMonth;e="";this._y<=h&&(this._y=h,!isNaN(r)&&this._m<r&&(this._m=r));this._y>=n&&(this._y=n,!isNaN(w)&&this._m>w&&(this._m=w));for(n=0;n<f.numberOfMonths;n++)h="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2),e+='<div class="pika-lendar">'+ha(this,n,this.calendars[n].year,this.calendars[n].month,this.calendars[0].year,h)+this.render(this.calendars[n].year,
32
- this.calendars[n].month,h)+"</div>";this.el.innerHTML=e;f.bound&&"hidden"!==f.field.type&&sa(function(){f.trigger.focus()},1);"function"==typeof this._o.onDraw&&this._o.onDraw(this);f.bound&&f.field.setAttribute("aria-label",f.ariaLabel)}},adjustPosition:function(){var e,f,h,n,r,w,x,y,z;if(!this._o.container){if(this.el.style.position="absolute",f=e=this._o.trigger,h=this.el.offsetWidth,n=this.el.offsetHeight,r=window.innerWidth||ra.documentElement.clientWidth,w=window.innerHeight||ra.documentElement.clientHeight,
33
- x=window.pageYOffset||ra.body.scrollTop||ra.documentElement.scrollTop,y=!0,z=!0,"function"==typeof e.getBoundingClientRect){var aa=(f=e.getBoundingClientRect()).left+window.pageXOffset;var ba=f.bottom+window.pageYOffset}else for(aa=f.offsetLeft,ba=f.offsetTop+f.offsetHeight;f=f.offsetParent;)aa+=f.offsetLeft,ba+=f.offsetTop;(this._o.reposition&&aa+h>r||-1<this._o.position.indexOf("right")&&0<aa-h+e.offsetWidth)&&(aa=aa-h+e.offsetWidth,y=!1);(this._o.reposition&&ba+n>w+x||-1<this._o.position.indexOf("top")&&
34
- 0<ba-n-e.offsetHeight)&&(ba=ba-n-e.offsetHeight,z=!1);0>aa&&(aa=0);0>ba&&(ba=0);this.el.style.left=aa+"px";this.el.style.top=ba+"px";ia(this.el,y?"left-aligned":"right-aligned");ia(this.el,z?"bottom-aligned":"top-aligned");fa(this.el,y?"right-aligned":"left-aligned");fa(this.el,z?"top-aligned":"bottom-aligned")}},render:function(e,h,n){var w=this._o,y=new Date,z=[31,0==e%4&&0!=e%100||0==e%400?29:28,31,30,31,30,31,31,30,31,30,31][h],ba=(new Date(e,h,1)).getDay(),ea=[],fa=[];f(y);0<w.firstDay&&0>(ba-=
35
- w.firstDay)&&(ba+=7);for(var ha=0===h?11:h-1,ia=11===h?0:h+1,ja=0===h?e-1:e,pa=11===h?e+1:e,ka=[31,0==ja%4&&0!=ja%100||0==ja%400?29:28,31,30,31,30,31,31,30,31,30,31][ha],la=z+ba,ma=la;7<ma;)ma-=7;la+=7-ma;ma=!1;for(var ra=0,na=0;ra<la;ra++){var oa=new Date(e,h,ra-ba+1),ua=!!r(this._d)&&oa.getTime()===this._d.getTime(),sa=oa.getTime()===y.getTime(),va=-1!==w.events.indexOf(oa.toDateString()),qa=ra<ba||ra>=z+ba,Ea=ra-ba+1,Oa=h,Ta=e,Nb=w.startRange&&w.startRange.getTime()===oa.getTime(),sc=w.endRange&&
36
- w.endRange.getTime()===oa.getTime(),bb=w.startRange&&w.endRange&&w.startRange<oa&&oa<w.endRange;qa&&(ra<ba?(Ea=ka+Ea,Oa=ha,Ta=ja):(Ea-=z,Oa=ia,Ta=pa));var lb;!(lb=w.minDate&&oa<w.minDate||w.maxDate&&oa>w.maxDate)&&(lb=w.disableWeekends)&&(lb=oa.getDay(),lb=0===lb||6===lb);oa={day:Ea,month:Oa,year:Ta,hasEvent:va,isSelected:ua,isToday:sa,isDisabled:lb||w.disableDayFn&&w.disableDayFn(oa),isEmpty:qa,isStartRange:Nb,isEndRange:sc,isInRange:bb,showDaysInNextAndPreviousMonths:w.showDaysInNextAndPreviousMonths,
37
- enableSelectionDaysInNextAndPreviousMonths:w.enableSelectionDaysInNextAndPreviousMonths};w.pickWholeWeek&&ua&&(ma=!0);fa.push(aa(oa));7==++na&&(w.showWeekNumber&&fa.unshift(da(ra-ba,h,e,w.firstWeekOfYearMinDays)),ea.push(ca(fa,w.isRTL,w.pickWholeWeek,ma)),fa=[],na=0,ma=!1)}return x(w,ea,n)},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),fa(this.el,"is-hidden"),this._o.bound&&(oa(ra,"click",this._onClick),this.adjustPosition()),"function"==typeof this._o.onOpen&&
38
- this._o.onOpen.call(this))},hide:function(){var e=this._v;!1!==e&&(this._o.bound&&qa(ra,"click",this._onClick),this._o.container||(this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto"),ia(this.el,"is-hidden"),this._v=!1,void 0!==e&&"function"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){var e=this._o;this.hide();qa(this.el,"mousedown",this._onMouseDown,!0);qa(this.el,"touchend",this._onMouseDown,!0);qa(this.el,"change",this._onChange);e.keyboardInput&&
39
- qa(ra,"keydown",this._onKeyChange);e.field&&(qa(e.field,"change",this._onInputChange),e.bound&&(qa(e.trigger,"click",this._onInputClick),qa(e.trigger,"focus",this._onInputFocus),qa(e.trigger,"blur",this._onInputBlur)));this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},ba})}}]);}).call(this || window)
32
+ this.calendars[n].month,h)+"</div>";this.el.innerHTML=e;f.bound&&"hidden"!==f.field.type&&sa(function(){f.trigger.focus()},1);"function"==typeof this._o.onDraw&&this._o.onDraw(this);f.bound&&f.field.setAttribute("aria-label",f.ariaLabel)}},adjustPosition:function(){var e,f,h,n,r,w,x,y,aa;if(!this._o.container){if(this.el.style.position="absolute",f=e=this._o.trigger,h=this.el.offsetWidth,n=this.el.offsetHeight,r=window.innerWidth||ra.documentElement.clientWidth,w=window.innerHeight||ra.documentElement.clientHeight,
33
+ x=window.pageYOffset||ra.body.scrollTop||ra.documentElement.scrollTop,y=!0,aa=!0,"function"==typeof e.getBoundingClientRect){var z=(f=e.getBoundingClientRect()).left+window.pageXOffset;var ba=f.bottom+window.pageYOffset}else for(z=f.offsetLeft,ba=f.offsetTop+f.offsetHeight;f=f.offsetParent;)z+=f.offsetLeft,ba+=f.offsetTop;(this._o.reposition&&z+h>r||-1<this._o.position.indexOf("right")&&0<z-h+e.offsetWidth)&&(z=z-h+e.offsetWidth,y=!1);(this._o.reposition&&ba+n>w+x||-1<this._o.position.indexOf("top")&&
34
+ 0<ba-n-e.offsetHeight)&&(ba=ba-n-e.offsetHeight,aa=!1);0>z&&(z=0);0>ba&&(ba=0);this.el.style.left=z+"px";this.el.style.top=ba+"px";ia(this.el,y?"left-aligned":"right-aligned");ia(this.el,aa?"bottom-aligned":"top-aligned");fa(this.el,y?"right-aligned":"left-aligned");fa(this.el,aa?"top-aligned":"bottom-aligned")}},render:function(e,h,n){var w=this._o,y=new Date,z=[31,0==e%4&&0!=e%100||0==e%400?29:28,31,30,31,30,31,31,30,31,30,31][h],ba=(new Date(e,h,1)).getDay(),ea=[],fa=[];f(y);0<w.firstDay&&0>(ba-=
35
+ w.firstDay)&&(ba+=7);for(var ha=0===h?11:h-1,ia=11===h?0:h+1,ja=0===h?e-1:e,qa=11===h?e+1:e,ka=[31,0==ja%4&&0!=ja%100||0==ja%400?29:28,31,30,31,30,31,31,30,31,30,31][ha],la=z+ba,ra=la;7<ra;)ra-=7;la+=7-ra;ra=!1;for(var oa=0,na=0;oa<la;oa++){var ma=new Date(e,h,oa-ba+1),va=!!r(this._d)&&ma.getTime()===this._d.getTime(),sa=ma.getTime()===y.getTime(),wa=-1!==w.events.indexOf(ma.toDateString()),pa=oa<ba||oa>=z+ba,Da=oa-ba+1,Oa=h,Ta=e,Nb=w.startRange&&w.startRange.getTime()===ma.getTime(),sc=w.endRange&&
36
+ w.endRange.getTime()===ma.getTime(),bb=w.startRange&&w.endRange&&w.startRange<ma&&ma<w.endRange;pa&&(oa<ba?(Da=ka+Da,Oa=ha,Ta=ja):(Da-=z,Oa=ia,Ta=qa));var lb;!(lb=w.minDate&&ma<w.minDate||w.maxDate&&ma>w.maxDate)&&(lb=w.disableWeekends)&&(lb=ma.getDay(),lb=0===lb||6===lb);ma={day:Da,month:Oa,year:Ta,hasEvent:wa,isSelected:va,isToday:sa,isDisabled:lb||w.disableDayFn&&w.disableDayFn(ma),isEmpty:pa,isStartRange:Nb,isEndRange:sc,isInRange:bb,showDaysInNextAndPreviousMonths:w.showDaysInNextAndPreviousMonths,
37
+ enableSelectionDaysInNextAndPreviousMonths:w.enableSelectionDaysInNextAndPreviousMonths};w.pickWholeWeek&&va&&(ra=!0);fa.push(aa(ma));7==++na&&(w.showWeekNumber&&fa.unshift(da(oa-ba,h,e,w.firstWeekOfYearMinDays)),ea.push(ca(fa,w.isRTL,w.pickWholeWeek,ra)),fa=[],na=0,ra=!1)}return x(w,ea,n)},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),fa(this.el,"is-hidden"),this._o.bound&&(ma(ra,"click",this._onClick),this.adjustPosition()),"function"==typeof this._o.onOpen&&
38
+ this._o.onOpen.call(this))},hide:function(){var e=this._v;!1!==e&&(this._o.bound&&pa(ra,"click",this._onClick),this._o.container||(this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto"),ia(this.el,"is-hidden"),this._v=!1,void 0!==e&&"function"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){var e=this._o;this.hide();pa(this.el,"mousedown",this._onMouseDown,!0);pa(this.el,"touchend",this._onMouseDown,!0);pa(this.el,"change",this._onChange);e.keyboardInput&&
39
+ pa(ra,"keydown",this._onKeyChange);e.field&&(pa(e.field,"change",this._onInputChange),e.bound&&(pa(e.trigger,"click",this._onInputClick),pa(e.trigger,"focus",this._onInputFocus),pa(e.trigger,"blur",this._onInputBlur)));this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},ba})}}]);}).call(this || window)
@@ -1,7 +1,7 @@
1
1
  /** Notice * This file contains works from many authors under various (but compatible) licenses. Please see core.txt for more information. **/
2
- (function(){(window.wpCoreControlsBundle=window.wpCoreControlsBundle||[]).push([[20],{447:function(ia,ba,e){(function(e){function x(e){this.Yf=e=e||{};if(Array.isArray(e.table)){var f=[];e.table.forEach(function(e,h){f[e.charCodeAt(0)]=h});e.R9=e.table;e.b7=f}}var ba=e.from||function(){switch(arguments.length){case 1:return new e(arguments[0]);case 2:return new e(arguments[0],arguments[1]);case 3:return new e(arguments[0],arguments[1],arguments[2]);default:throw new Exception("unexpected call.");}},ca=e.allocUnsafe||
3
- function(f){return new e(f)},da=function(){return"undefined"===typeof Uint8Array?function(e){return Array(e)}:function(e){return new Uint8Array(e)}}(),aa=String.fromCharCode(0),w=aa+aa+aa+aa,y=ba("<~").Vx(0),n=ba("~>").Vx(0),h=function(){var e=Array(85),f;for(f=0;85>f;f++)e[f]=String.fromCharCode(33+f);return e}(),f=function(){var e=Array(256),f;for(f=0;85>f;f++)e[33+f]=f;return e}();aa=ia.exports=new x;x.prototype.encode=function(f,n){var r=da(5),w=f,x=this.Yf,y,z;"string"===typeof w?w=ba(w,"binary"):
4
- w instanceof e||(w=ba(w));n=n||{};if(Array.isArray(n)){f=n;var aa=x.yB||!1;var ea=x.yJ||!1}else f=n.table||x.R9||h,aa=void 0===n.yB?x.yB||!1:!!n.yB,ea=void 0===n.yJ?x.yJ||!1:!!n.yJ;x=0;var ha=Math.ceil(5*w.length/4)+4+(aa?4:0);n=ca(ha);aa&&(x+=n.write("<~",x));var ia=y=z=0;for(ha=w.length;ia<ha;ia++){var Ea=w.wL(ia);z*=256;z+=Ea;y++;if(!(y%4)){if(ea&&538976288===z)x+=n.write("y",x);else if(z){for(y=4;0<=y;y--)Ea=z%85,r[y]=Ea,z=(z-Ea)/85;for(y=0;5>y;y++)x+=n.write(f[r[y]],x)}else x+=n.write("z",x);
5
- y=z=0}}if(y)if(z){w=4-y;for(ia=4-y;0<ia;ia--)z*=256;for(y=4;0<=y;y--)Ea=z%85,r[y]=Ea,z=(z-Ea)/85;for(y=0;5>y;y++)x+=n.write(f[r[y]],x);x-=w}else for(ia=0;ia<y+1;ia++)x+=n.write(f[0],x);aa&&(x+=n.write("~>",x));return n.slice(0,x)};x.prototype.decode=function(h,x){var r=this.Yf,aa=!0,z=!0,da,ea,ha;x=x||r.b7||f;if(!Array.isArray(x)&&(x=x.table||x,!Array.isArray(x))){var ia=[];Object.keys(x).forEach(function(e){ia[e.charCodeAt(0)]=x[e]});x=ia}aa=!x[122];z=!x[121];h instanceof e||(h=ba(h));ia=0;if(aa||
6
- z){var ra=0;for(ha=h.length;ra<ha;ra++){var sa=h.wL(ra);aa&&122===sa&&ia++;z&&121===sa&&ia++}}var Ea=0;ha=Math.ceil(4*h.length/5)+4*ia+5;r=ca(ha);if(4<=h.length&&h.Vx(0)===y){for(ra=h.length-2;2<ra&&h.Vx(ra)!==n;ra--);if(2>=ra)throw Error("Invalid ascii85 string delimiter pair.");h=h.slice(2,ra)}ra=da=ea=0;for(ha=h.length;ra<ha;ra++)sa=h.wL(ra),aa&&122===sa?Ea+=r.write(w,Ea):z&&121===sa?Ea+=r.write(" ",Ea):void 0!==x[sa]&&(ea*=85,ea+=x[sa],da++,da%5||(Ea=r.pma(ea,Ea),da=ea=0));if(da){h=5-da;for(ra=
7
- 0;ra<h;ra++)ea*=85,ea+=84;ra=3;for(ha=h-1;ra>ha;ra--)Ea=r.qma(ea>>>8*ra&255,Ea)}return r.slice(0,Ea)};aa.kna=new x({table:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-:+=^!/*?&<>()[]{}@%$#".split("")});aa.Ima=new x({yB:!0});aa.I_=x}).call(this,e(455).Buffer)}}]);}).call(this || window)
2
+ (function(){(window.wpCoreControlsBundle=window.wpCoreControlsBundle||[]).push([[20],{447:function(ia,ba,e){(function(e){function x(e){this.Xf=e=e||{};if(Array.isArray(e.table)){var f=[];e.table.forEach(function(e,h){f[e.charCodeAt(0)]=h});e.S9=e.table;e.c7=f}}var ba=e.from||function(){switch(arguments.length){case 1:return new e(arguments[0]);case 2:return new e(arguments[0],arguments[1]);case 3:return new e(arguments[0],arguments[1],arguments[2]);default:throw new Exception("unexpected call.");}},ca=e.allocUnsafe||
3
+ function(f){return new e(f)},da=function(){return"undefined"===typeof Uint8Array?function(e){return Array(e)}:function(e){return new Uint8Array(e)}}(),aa=String.fromCharCode(0),w=aa+aa+aa+aa,y=ba("<~").Vx(0),n=ba("~>").Vx(0),h=function(){var e=Array(85),f;for(f=0;85>f;f++)e[f]=String.fromCharCode(33+f);return e}(),f=function(){var e=Array(256),f;for(f=0;85>f;f++)e[33+f]=f;return e}();aa=ia.exports=new x;x.prototype.encode=function(f,n){var r=da(5),w=f,x=this.Xf,y,aa;"string"===typeof w?w=ba(w,"binary"):
4
+ w instanceof e||(w=ba(w));n=n||{};if(Array.isArray(n)){f=n;var z=x.yB||!1;var ea=x.zJ||!1}else f=n.table||x.S9||h,z=void 0===n.yB?x.yB||!1:!!n.yB,ea=void 0===n.zJ?x.zJ||!1:!!n.zJ;x=0;var ha=Math.ceil(5*w.length/4)+4+(z?4:0);n=ca(ha);z&&(x+=n.write("<~",x));var ia=y=aa=0;for(ha=w.length;ia<ha;ia++){var Da=w.wL(ia);aa*=256;aa+=Da;y++;if(!(y%4)){if(ea&&538976288===aa)x+=n.write("y",x);else if(aa){for(y=4;0<=y;y--)Da=aa%85,r[y]=Da,aa=(aa-Da)/85;for(y=0;5>y;y++)x+=n.write(f[r[y]],x)}else x+=n.write("z",
5
+ x);y=aa=0}}if(y)if(aa){w=4-y;for(ia=4-y;0<ia;ia--)aa*=256;for(y=4;0<=y;y--)Da=aa%85,r[y]=Da,aa=(aa-Da)/85;for(y=0;5>y;y++)x+=n.write(f[r[y]],x);x-=w}else for(ia=0;ia<y+1;ia++)x+=n.write(f[0],x);z&&(x+=n.write("~>",x));return n.slice(0,x)};x.prototype.decode=function(h,x){var r=this.Xf,aa=!0,z=!0,da,ea,ha;x=x||r.c7||f;if(!Array.isArray(x)&&(x=x.table||x,!Array.isArray(x))){var ia=[];Object.keys(x).forEach(function(e){ia[e.charCodeAt(0)]=x[e]});x=ia}aa=!x[122];z=!x[121];h instanceof e||(h=ba(h));ia=
6
+ 0;if(aa||z){var ra=0;for(ha=h.length;ra<ha;ra++){var sa=h.wL(ra);aa&&122===sa&&ia++;z&&121===sa&&ia++}}var Da=0;ha=Math.ceil(4*h.length/5)+4*ia+5;r=ca(ha);if(4<=h.length&&h.Vx(0)===y){for(ra=h.length-2;2<ra&&h.Vx(ra)!==n;ra--);if(2>=ra)throw Error("Invalid ascii85 string delimiter pair.");h=h.slice(2,ra)}ra=da=ea=0;for(ha=h.length;ra<ha;ra++)sa=h.wL(ra),aa&&122===sa?Da+=r.write(w,Da):z&&121===sa?Da+=r.write(" ",Da):void 0!==x[sa]&&(ea*=85,ea+=x[sa],da++,da%5||(Da=r.qma(ea,Da),da=ea=0));if(da){h=
7
+ 5-da;for(ra=0;ra<h;ra++)ea*=85,ea+=84;ra=3;for(ha=h-1;ra>ha;ra--)Da=r.rma(ea>>>8*ra&255,Da)}return r.slice(0,Da)};aa.lna=new x({table:"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-:+=^!/*?&<>()[]{}@%$#".split("")});aa.Jma=new x({yB:!0});aa.J_=x}).call(this,e(455).Buffer)}}]);}).call(this || window)