"undefined"===typeof PDFJS&&(("undefined"!==typeof window?window:this).PDFJS={});PDFJS.version="1.0.83";PDFJS.build="0045325"; (function(){function G(a){PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.infos&&console.log("Info: "+a)}function z(a){PDFJS.verbosity>=PDFJS.VERBOSITY_LEVELS.warnings&&console.log("Warning: "+a)}function v(a){if(1> 2:b;Y>>0},set:function(b){var c=this.buffer,d=a<<2;c[d]=b&255;c[d+1]=b>>8&255;c[d+2]=b>>16&255;c[d+3]=b>>>24&255}}};ja.prototype=Object.create(null);var Y=0,Ca=[1,0,0,1,0,0],Jb=PDFJS,u=function(){};u.makeCssRgb=function(a){return"rgb("+a[0]+","+a[1]+","+a[2]+")"};u.makeCssCmyk=function(a){a=s.singletons.cmyk.getRgb(a,0);return u.makeCssRgb(a)}; u.transform=function(a,b){return[a[0]*b[0]+a[2]*b[1],a[1]*b[0]+a[3]*b[1],a[0]*b[2]+a[2]*b[3],a[1]*b[2]+a[3]*b[3],a[0]*b[4]+a[2]*b[5]+a[4],a[1]*b[4]+a[3]*b[5]+a[5]]};u.applyTransform=function(a,b){return[a[0]*b[0]+a[1]*b[2]+b[4],a[0]*b[1]+a[1]*b[3]+b[5]]};u.applyInverseTransform=function(a,b){var c=b[0]*b[3]-b[1]*b[2];return[(a[0]*b[3]-a[1]*b[2]+b[2]*b[5]-b[4]*b[3])/c,(-a[0]*b[1]+a[1]*b[0]+b[4]*b[1]-b[5]*b[0])/c]};u.getAxialAlignedBoundingBox=function(a,b){var c=u.applyTransform(a,b),d=u.applyTransform(a.slice(2, 4),b),e=u.applyTransform([a[0],a[3]],b),f=u.applyTransform([a[2],a[1]],b);return[Math.min(c[0],d[0],e[0],f[0]),Math.min(c[1],d[1],e[1],f[1]),Math.max(c[0],d[0],e[0],f[0]),Math.max(c[1],d[1],e[1],f[1])]};u.inverseTransform=function(a){var b=a[0]*a[3]-a[1]*a[2];return[a[3]/b,-a[1]/b,-a[2]/b,a[0]/b,(a[2]*a[5]-a[4]*a[3])/b,(a[4]*a[1]-a[5]*a[0])/b]};u.apply3dTransform=function(a,b){return[a[0]*b[0]+a[1]*b[1]+a[2]*b[2],a[3]*b[0]+a[4]*b[1]+a[5]*b[2],a[6]*b[0]+a[7]*b[1]+a[8]*b[2]]};u.singularValueDecompose2dScale= function(a){var b=[a[0],a[2],a[1],a[3]],c=a[0]*b[0]+a[1]*b[2],d=a[2]*b[1]+a[3]*b[3],e=(c+d)/2;a=Math.sqrt((c+d)*(c+d)-4*(c*d-(a[2]*b[0]+a[3]*b[2])*(a[0]*b[1]+a[1]*b[3])))/2;b=e-a||1;return[Math.sqrt(e+a||1),Math.sqrt(b)]};u.normalizeRect=function(a){var b=a.slice(0);a[0]>a[2]&&(b[0]=a[2],b[2]=a[0]);a[1]>a[3]&&(b[1]=a[3],b[3]=a[1]);return b};u.intersect=function(a,b){function c(a,b){return a-b}var d=[a[0],a[2],b[0],b[2]].sort(c),e=[a[1],a[3],b[1],b[3]].sort(c),f=[];a=u.normalizeRect(a);b=u.normalizeRect(b); if(d[0]===a[0]&&d[1]===b[0]||d[0]===b[0]&&d[1]===a[0])f[0]=d[1],f[2]=d[2];else return!1;if(e[0]===a[1]&&e[1]===b[1]||e[0]===b[1]&&e[1]===a[1])f[1]=e[1],f[3]=e[2];else return!1;return f};u.sign=function(a){return 0>a?-1:1};u.concatenateToArray=function(a,b){Array.prototype.push.apply(a,b)};u.prependToArray=function(a,b){Array.prototype.unshift.apply(a,b)};u.extendObj=function(a,b){for(var c in b)a[c]=b[c]};u.getInheritableProperty=function(a,b){for(;a&&!a.has(b);)a=a.get("Parent");return!a?null:a.get(b)}; u.inherit=function(a,b,c){a.prototype=Object.create(b.prototype);a.prototype.constructor=a;for(var d in c)a.prototype[d]=c[d]};u.loadScript=function(a,b){var c=document.createElement("script"),d=!1;c.setAttribute("src",a);b&&(c.onload=function(){d||b();d=!0});document.getElementsByTagName("head")[0].appendChild(c)};var t=Jb.Util=u,Kb=PDFJS,ka=function(a,b,c,d,e,f){this.viewBox=a;this.scale=b;this.rotation=c;this.offsetX=d;this.offsetY=e;var g=(a[2]+a[0])/2,h=(a[3]+a[1])/2,j,k,l;c%=360;switch(0>c? c+360:c){case 180:c=-1;k=j=0;l=1;break;case 90:c=0;k=j=1;l=0;break;case 270:c=0;k=j=-1;l=0;break;default:c=1,k=j=0,l=-1}f&&(k=-k,l=-l);0===c?(d=Math.abs(h-a[1])*b+d,e=Math.abs(g-a[0])*b+e,f=Math.abs(a[3]-a[1])*b,a=Math.abs(a[2]-a[0])*b):(d=Math.abs(g-a[0])*b+d,e=Math.abs(h-a[1])*b+e,f=Math.abs(a[2]-a[0])*b,a=Math.abs(a[3]-a[1])*b);this.transform=[c*b,j*b,k*b,l*b,d-c*b*g-k*b*h,e-j*b*g-l*b*h];this.width=f;this.height=a;this.fontScale=b};ka.prototype={clone:function(a){a=a||{};var b="scale"in a?a.scale: this.scale,c="rotation"in a?a.rotation:this.rotation;return new ka(this.viewBox.slice(),b,c,this.offsetX,this.offsetY,a.dontFlip)},convertToViewportPoint:function(a,b){return t.applyTransform([a,b],this.transform)},convertToViewportRectangle:function(a){var b=t.applyTransform([a[0],a[1]],this.transform);a=t.applyTransform([a[2],a[3]],this.transform);return[b[0],b[1],a[0],a[1]]},convertToPdfPoint:function(a,b){return t.applyInverseTransform([a,b],this.transform)}};Kb.PageViewport=ka;var Hb=[0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364],N=PDFJS.LegacyPromise=function(){var a,b,c=new Promise(function(c,e){a=c;b=e});c.resolve= a;c.reject=b;return c};var H=function(a){this._status=Da;this._handlers=[];a.call(this,this._resolve.bind(this),this._reject.bind(this))};if(y.Promise)"function"!==typeof y.Promise.all&&(y.Promise.all=function(a){var b=0,c=[],d,e,f=new y.Promise(function(a,b){d=a;e=b});a.forEach(function(a,f){b++;a.then(function(a){c[f]=a;b--;0===b&&d(c)},e)});0===b&&d(c);return f}),"function"!==typeof y.Promise.resolve&&(y.Promise.resolve=function(a){return new y.Promise(function(b){b(a)})});else{var Da=0,O=2,la= {handlers:[],running:!1,unhandledRejections:[],pendingRejectionCheck:!1,scheduleHandlers:function(a){a._status!=Da&&(this.handlers=this.handlers.concat(a._handlers),a._handlers=[],this.running||(this.running=!0,setTimeout(this.runHandlers.bind(this),0)))},runHandlers:function(){for(var a=Date.now()+1;0=a)break}0e&&(e=f.length)}a=0;for(b=c.length;a>2]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="[(f&3)<<4|g>>4]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="[d+1>6:64]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="[d+2p&&"DeviceGray"!==this.name&&"DeviceRGB"!==this.name){var m=8>=g?new Uint8Array(p):new Uint16Array(p),r;for(n=0;na?0:255e?0:255f?0:255a?0:255a?0:a;d[e+1]=255b?0:b;d[e+2]=255f?0:f},Sa=function(){this.name="DeviceCMYK";this.numComps=4;this.defaultColor=new Float32Array([0,0,0,1])};Sa.prototype={getRgb:s.prototype.getRgb, getRgbItem:function(a,b,c,d){Ra(a,b,1,c,d)},getRgbBuffer:function(a,b,c,d,e,f,g){f=1/((1<this.XW||0>this.ZW||1!==this.YW)&&v("Invalid WhitePoint components for "+this.name+", no fallback available");if(0>this.XB||0>this.YB||0>this.ZB)G("Invalid BlackPoint for "+this.name+", falling back to default"),this.XB=this.YB=this.ZB=0;(0!==this.XB||0!==this.YB||0!==this.ZB)&&z(this.name+", BlackPoint: XB: "+this.XB+", YB: "+this.YB+", ZB: "+this.ZB+", only default values are supported.");1> this.G&&(G("Invalid Gamma: "+this.G+" for "+this.name+", falling back to default"),this.G=1)},Ua=function(a,b,c,d,e,f){b=Math.pow(b[c]*f,a.G);a=Math.max(116*Math.pow(a.YW*b,1/3)-16,0);d[e]=255*a/100;d[e+1]=255*a/100;d[e+2]=255*a/100};Ta.prototype={getRgb:s.prototype.getRgb,getRgbItem:function(a,b,c,d){Ua(this,a,b,c,d,1)},getRgbBuffer:function(a,b,c,d,e,f,g){f=1/((1<this.XW||0>this.ZW||1!==this.YW)&& v("Invalid WhitePoint components, no fallback available");if(0>this.XB||0>this.YB||0>this.ZB)G("Invalid BlackPoint, falling back to default"),this.XB=this.YB=this.ZB=0;if(this.amin>this.amax||this.bmin>this.bmax)G("Invalid Range, falling back to defaults"),this.amin=-100,this.amax=100,this.bmin=-100,this.bmax=100},na=function(a){return a>=6/29?a*a*a:108/841*(a-4/29)},Wa=function(a,b,c,d,e,f){var g=b[c],h=b[c+1];b=b[c+2];!1!==d&&(g=0+100*g/d,h=a.amin+h*(a.amax-a.amin)/d,b=a.bmin+b*(a.bmax-a.bmin)/ d);h=h>a.amax?a.amax:ha.bmax?a.bmax:ba.ZW?(a=3.1339*h+-1.617*d+-0.4906*g,b=-0.9785*h+1.916*d+0.0333*g,h=0.072*h+-0.229*d+1.4057*g):(a=3.2406*h+-1.5372*d+-0.4986*g,b=-0.9689*h+1.8758*d+0.0415*g,h=0.0557*h+-0.204*d+1.057*g);e[f]=0>=a?0:1<=a?255:255*Math.sqrt(a)|0;e[f+1]=0>=b?0:1<=b?255:255*Math.sqrt(b)|0;e[f+2]=0>=h?0:1<=h?255:255*Math.sqrt(h)|0};Va.prototype={getRgb:s.prototype.getRgb,getRgbItem:function(a, b,c,d){Wa(this,a,b,!1,c,d)},getRgbBuffer:function(a,b,c,d,e,f,g){f=(1<> b)*h);f&=(1<g?a=g:ac[p+1]&&(l=c[p+1]);k[j]=l}f.set(a,k);return k}}};var Ya,Za=function(){this.cache={};this.total=0};Za.prototype={has:function(a){return a in this.cache},get:function(a){return this.cache[a]},set:function(a,b){1024>this.total&&(this.cache[a]=b,this.total++)}};Ya=Za; var $a=function(a){this.stack=a||[]};$a.prototype={push:function(a){100<=this.stack.length&&v("PostScript function stack overflow.");this.stack.push(a)},pop:function(){0>=this.stack.length&&v("PostScript function stack underflow.");return this.stack.pop()},copy:function(a){100<=this.stack.length+a&&v("PostScript function stack overflow.");var b=this.stack,c=b.length-a;for(a-=1;0<=a;a--,c++)b.push(b[c])},index:function(a){this.push(this.stack[this.stack.length-a-1])},roll:function(a,b){var c=this.stack, d=c.length-a,e=c.length-1,f=d+(b-Math.floor(b/a)*a),g,h,j;g=d;for(h=e;g>f);break;case "ceiling":e=a.pop();a.push(Math.ceil(e));break;case "copy":e=a.pop();a.copy(e);break;case "cos":e=a.pop();a.push(Math.cos(e));break;case "cvi":e=a.pop()|0;a.push(e);break;case "cvr":break;case "div":f=a.pop();e=a.pop();a.push(e/f);break;case "dup":a.copy(1); break;case "eq":f=a.pop();e=a.pop();a.push(e==f);break;case "exch":a.roll(2,1);break;case "exp":f=a.pop();e=a.pop();a.push(Math.pow(e,f));break;case "false":a.push(!1);break;case "floor":e=a.pop();a.push(Math.floor(e));break;case "ge":f=a.pop();e=a.pop();a.push(e>=f);break;case "gt":f=a.pop();e=a.pop();a.push(e>f);break;case "idiv":f=a.pop();e=a.pop();a.push(e/f|0);break;case "index":e=a.pop();a.index(e);break;case "le":f=a.pop();e=a.pop();a.push(e<=f);break;case "ln":e=a.pop();a.push(Math.log(e)); break;case "log":e=a.pop();a.push(Math.log(e)/Math.LN10);break;case "lt":f=a.pop();e=a.pop();a.push(ee?Math.ceil(e):Math.floor(e);a.push(e);break;case "xor":f=a.pop();e=a.pop();L(e)&&L(f)?a.push(e!=f):a.push(e^f);break;default:v("Unknown operator "+e)}return a.stack}};Xa=ab;var Lb=["Link","Text","Widget"],C=function(a){if(a.data)this.data=a.data; else{var b=a.dict,c=this.data={};c.subtype=b.get("Subtype").name;var d=b.get("Rect")||[0,0,0,0];c.rect=t.normalizeRect(d);c.annotationFlags=b.get("F");d=b.get("C");c.color=B(d)&&3===d.length?d:[0,0,0];if(b.has("BS"))d=b.get("BS"),c.borderWidth=d.has("W")?d.get("W"):1;else if(d=b.get("Border")||[0,0,1],c.borderWidth=d[2]||0,d=d[3],0b.fontDirection?"rtl":"ltr";a&&(e.fontWeight=a.black?a.bold?"bolder":"bold":a.bold?"bold":"normal",e.fontStyle=a.italic?"italic":"normal",b=a.loadedName,e.fontFamily=(b?'"'+b+'", ':"")+(a.fallbackName||"Helvetica, sans-serif"));c.appendChild(d);return c},getOperatorList:function(a){if(this.appearance)return C.prototype.getOperatorList.call(this,a);var b=new N,c=new OperatorList,d=this.data,e=d.defaultAppearance; if(!e)return b.resolve(c),b;for(var f=Stream,g=e.length,h=new Uint8Array(g),j=0;jf;++f)g=a[f],h=e[f],g===J.setFont?(d.fontRefName=h[0],g=h[1],0>g?(d.fontDirection=-1,d.fontSize=-g):(d.fontDirection=1,d.fontSize=g)):g===J.setFillRGBColor?d.rgb=h:g===J.setFillGray&&(g=255*h[0],d.rgb=[g,g,g]);b.resolve(c);return b}});db=fb;var oa=function(a){C.call(this,a)};t.inherit(oa, C,{hasHtml:function(){return!0},highlight:function(){this.highlightElement&&this.highlightElement.hasAttribute("hidden")&&this.highlightElement.removeAttribute("hidden")},unhighlight:function(){this.highlightElement&&!this.highlightElement.hasAttribute("hidden")&&this.highlightElement.setAttribute("hidden",!0)},initContainer:function(){for(var a=this.data,b=this.getEmptyContainer("section",a.rect,a.borderWidth),c=b.style.backgroundColor=a.color,d=[],e=0;3>e;++e)d[e]=Math.round(255*c[e]);a.colorCssRgb= t.makeCssRgb(d);a=document.createElement("div");a.className="annotationHighlight";a.style.left=a.style.top="-4px";a.style.right=a.style.bottom="-4px";a.setAttribute("hidden",!0);this.highlightElement=a;b.appendChild(this.highlightElement);return b}});var cb,gb=function(a){C.call(this,a);if(!a.data){a=a.dict;var b=this.data,c=a.get("Contents"),d=a.get("T");b.content=T(c||"");b.title=T(d||"");b.hasAppearance?b.name="NoIcon":(b.rect[1]=b.rect[3]-22,b.rect[2]=b.rect[0]+22,b.name=a.has("Name")?a.get("Name").name: "Note");a.has("C")&&(b.hasBgColor=!0)}};t.inherit(gb,oa,{getHtmlElement:function(){!V||v("getHtmlElement() shall be called from main thread");var a=this.data,b=a.rect;10>b[3]-b[1]&&(b[3]=b[1]+10);10>b[2]-b[0]&&(b[2]=b[0]+(b[3]-b[1]));var c=this.initContainer();c.className="annotText";var d=document.createElement("img");d.style.height=c.style.height;d.style.width=c.style.width;var e=a.name;d.src=PDFJS.imageResourcesPath+"annotation-"+e.toLowerCase()+".svg";d.alt="[{{type}} Annotation]";d.dataset.l10nId= "text_annotation_type";d.dataset.l10nArgs=JSON.stringify({type:e});e=document.createElement("div");e.className="annotTextContentWrapper";e.style.left=Math.floor(b[2]-b[0]+5)+"px";e.style.top="-10px";var f=document.createElement("div");f.className="annotTextContent";f.setAttribute("hidden",!0);if(a.hasBgColor){for(var g=a.color,h=[],b=0;3>b;++b){var j=Math.round(255*g[b]);h[b]=Math.round(0.7*(255-j))+j}f.style.backgroundColor=t.makeCssRgb(h)}g=document.createElement("h1");h=document.createElement("p"); g.textContent=a.title;if(!a.content&&!a.title)f.setAttribute("hidden",!0);else{for(var j=document.createElement("span"),k=a.content.split(/(?:\r\n?|\n)/),b=0,a=k.length;barguments.length&&(b=this.rotate);return new PDFJS.PageViewport(this.view,a,b,0,0)},getAnnotations:function(){if(this.annotationsPromise)return this.annotationsPromise;var a=new PDFJS.LegacyPromise;this.annotationsPromise=a;this.transport.getAnnotations(this.pageInfo.pageIndex);return a},render:function(a){function b(a){var b=e.renderTasks.indexOf(f);0<=b&&e.renderTasks.splice(b,1);h.cleanupAfterRender&& (h.pendingDestroy=!0);h._tryDestroy();a?g.promise.reject(a):g.promise.resolve();c.timeEnd("Rendering");c.timeEnd("Overall")}var c=this.stats;c.time("Overall");this.pendingDestroy=!1;var d="intent"in a?"print"==a.intent?"print":"display":"display";this.intentStates[d]||(this.intentStates[d]={});var e=this.intentStates[d];e.displayReadyPromise||(e.receivingOperatorList=!0,e.displayReadyPromise=new N,e.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this.stats.time("Page Request"),this.transport.messageHandler.send("RenderPageRequest", {pageIndex:this.pageNumber-1,intent:d}));var f=new lb(b,a,this.objs,this.commonObjs,e.operatorList,this.pageNumber);e.renderTasks||(e.renderTasks=[]);e.renderTasks.push(f);var g=new mb(f),h=this;e.displayReadyPromise.then(function(a){h.pendingDestroy?b():(c.time("Rendering"),f.initalizeGraphics(a),f.operatorListChanged())},function(a){b(a)});return g},getTextContent:function(){var a=new PDFJS.LegacyPromise;this.transport.messageHandler.send("GetTextContent",{pageIndex:this.pageNumber-1},function(b){a.resolve(b)}); return a},destroy:function(){this.pendingDestroy=!0;this._tryDestroy()},_tryDestroy:function(){this.pendingDestroy&&!Object.keys(this.intentStates).some(function(a){a=this.intentStates[a];return 0!==a.renderTasks.length||a.receivingOperatorList},this)&&(Object.keys(this.intentStates).forEach(function(a){delete this.intentStates[a]},this),this.objs.clear(),this.pendingDestroy=!1)},_startRenderPage:function(a,b){this.intentStates[b].displayReadyPromise.resolve(a)},_renderPageChunk:function(a,b){var c= this.intentStates[b],d,e;d=0;for(e=a.length;d=a||a>this.numPages||(a|0)!==a){var c=new PDFJS.LegacyPromise;c.reject(Error("Invalid page request"));return c}c=a-1;if(c in this.pagePromises)return this.pagePromises[c];b=new PDFJS.LegacyPromise;this.pagePromises[c]=b;this.messageHandler.send("GetPageRequest",{pageIndex:c});return b},getPageIndex:function(a){var b=new PDFJS.LegacyPromise;this.messageHandler.send("GetPageIndex", {ref:a},function(a){b.resolve(a)});return b},getAnnotations:function(a){this.messageHandler.send("GetAnnotationsRequest",{pageIndex:a})},getDestinations:function(){var a=new PDFJS.LegacyPromise;this.messageHandler.send("GetDestinations",null,function(b){a.resolve(b)});return a},getAttachments:function(){var a=new PDFJS.LegacyPromise;this.messageHandler.send("GetAttachments",null,function(b){a.resolve(b)});return a},startCleanup:function(){this.messageHandler.send("Cleanup",null,function(){for(var a= 0,b=this.pageCache.length;a\\376\\377([^<]+)/g,function(a,c){for(var d=c.replace(/\\([0-3])([0-7])([0-7])/g,function(a,b,c,d){return String.fromCharCode(64*b+8*c+1*d)}),e="",f=0;f"+e}),a=(new DOMParser).parseFromString(a,"application/xml")):a instanceof Document||v("Metadata: Invalid metadata object"); this.metaDocument=a;this.metadata={};this.parse()};sb.prototype={parse:function(){var a=this.metaDocument.documentElement;if("rdf:rdf"!==a.nodeName.toLowerCase())for(a=a.firstChild;a&&"rdf:rdf"!==a.nodeName.toLowerCase();)a=a.nextSibling;var b=a?a.nodeName.toLowerCase():null;if(a&&"rdf:rdf"===b&&a.hasChildNodes()){var a=a.childNodes,c,d,e,f,g,h;e=0;for(g=a.length;e>3,w=PDFJS.isLittleEndian||!PDFJS.hasCanvasTypedArrays?4278190080:255;for(p=0;px?d:8*D-7,s=D&-8,P=0,u=0;t>=1}for(;j>=1}a.putImageData(g,0,16*l)}},ub=function(a,b){for(var c="strokeStyle fillStyle fillRule globalAlpha lineWidth lineCap lineJoin miterLimit globalCompositeOperation font".split(" "), d=0,e=c.length;dg)return l.then(c),b}},endDrawing:function(){this.ctx.restore();F.clear();R.clear();this.imageLayer&&this.imageLayer.endLayout()},setLineWidth:function(a){this.current.lineWidth=a;this.ctx.lineWidth=a},setLineCap:function(a){this.ctx.lineCap=Ob[a]},setLineJoin:function(a){this.ctx.lineJoin=Pb[a]},setMiterLimit:function(a){this.ctx.miterLimit= a},setDash:function(a,b){var c=this.ctx;"setLineDash"in c?(c.setLineDash(a),c.lineDashOffset=b):(c.mozDash=a,c.mozDashOffset=b)},setRenderingIntent:function(){},setFlatness:function(){},setGState:function(a){for(var b=0,c=a.length;bg){var h=1-g;d[f-3]=d[f-3]*g+a*h|0;d[f-2]=d[f-2]*g+b*h|0;d[f-1]=d[f-1]*g+c*h|0}}}.bind(null,c[0],c[1],c[2]):function(){},j="Luminosity"===j?function(a,b){for(var c=a.length,d=3;d>16}:function(a,b){for(var c=a.length,d=3;db?(b=-b,d.fontDirection=-1):d.fontDirection=1;this.current.font=c;this.current.fontSize=b;if(!c.coded){var d=c.black?c.bold?"bolder":"bold":c.bold?"bold":"normal",e=c.italic?"italic":"normal",c='"'+(c.loadedName||"sans-serif")+ '", '+c.fallbackName,f=16<=b?b:16;this.current.fontSizeScale=16!=f?1:b/16;this.ctx.font=e+" "+d+" "+f+"px "+c}},setTextRenderingMode:function(a){this.current.textRenderingMode=a},setTextRise:function(a){this.current.textRise=a},moveText:function(a,b){this.current.x=this.current.lineX+=a;this.current.y=this.current.lineY+=b},setLeadingMoveText:function(a,b){this.setLeading(-b);this.moveText(a,b)},setTextMatrix:function(a,b,c,d,e,f){this.current.textMatrix=[a,b,c,d,e,f];this.current.x=this.current.lineX= 0;this.current.y=this.current.lineY=0},nextLine:function(){this.moveText(0,this.current.leading)},applyTextTransforms:function(){var a=this.ctx,b=this.current;a.transform.apply(a,b.textMatrix);a.translate(b.x,b.y+b.textRise);0a[c]){b=!0;break}return K(this,"isFontSubpixelAAEnabled",b)},showText:function(a){var b=this.ctx,c=this.current,d=c.font,e=c.fontSize,f=c.fontSizeScale,g=c.charSpacing,h=c.wordSpacing,j=c.textHScale*c.fontDirection,k=c.fontMatrix||ha,l=a.length,p=d.vertical,q=d.defaultVMetrics,n,m,r;if(0!==e)if(d.coded){b.save();b.transform.apply(b,c.textMatrix);b.translate(c.x,c.y);b.scale(j,1);for(n=0;n=c&&1E3>=d)a:{var g=a.data,h,j,k=c+1,l=new Uint8Array(k*(d+1)),p=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),q=c+7&-8,n=new Uint8Array(q*d),m=0;f=0;for(h=g.length;f>=1}m=g=0;0!==n[m]&&(l[0]=1,++g);for(h=1;h>2)+(n[m+1]?4:0)+(n[m-q+1]?8:0),p[r]&&(l[j+h]=p[r],++g),m++;n[m-q]!==n[m]&&(l[j+h]=n[m]?2:4,++g);if(1E3>4,l[q]&=m>>2|m<<2);n.push(q%k);n.push(q/k|0);--g}while(h!==q);x.push(n);--f}}f=function(a){a.save();a.scale(1/c,-1/d);a.translate(0,-d);a.beginPath();for(var b=0,e=x.length;b 0.0) { maskColor.rgb = maskColor.rgb * maskColor.a + u_backdrop.rgb * (1.0 - maskColor.a); } float lum; if (u_subtype == 0) { lum = maskColor.a; } else { lum = maskColor.r * 0.3 + maskColor.g * 0.59 + maskColor.b * 0.11; } imageColor.a *= lum; imageColor.rgb *= imageColor.a; gl_FragColor = imageColor; } ", g.FRAGMENT_SHADER),k=yb(g,[h,j]);g.useProgram(k);h={};h.gl=g;h.canvas=f;h.resolutionLocation=g.getUniformLocation(k,"u_resolution");h.positionLocation=g.getAttribLocation(k,"a_position");h.backdropLocation=g.getUniformLocation(k,"u_backdrop");h.subtypeLocation=g.getUniformLocation(k,"u_subtype");f=g.getAttribLocation(k,"a_texCoord");var j=g.getUniformLocation(k,"u_image"),k=g.getUniformLocation(k,"u_mask"),l=g.createBuffer();g.bindBuffer(g.ARRAY_BUFFER,l);g.bufferData(g.ARRAY_BUFFER,new Float32Array([0, 0,1,0,0,1,0,1,1,0,1,1]),g.STATIC_DRAW);g.enableVertexAttribArray(f);g.vertexAttribPointer(f,2,g.FLOAT,!1,0,0);g.uniform1i(j,0);g.uniform1i(k,1);ca=h}g=ca;h=g.canvas;f=g.gl;h.width=d;h.height=e;f.viewport(0,0,f.drawingBufferWidth,f.drawingBufferHeight);f.uniform2f(g.resolutionLocation,d,e);c.backdrop?f.uniform4f(g.resolutionLocation,c.backdrop[0],c.backdrop[1],c.backdrop[2],1):f.uniform4f(g.resolutionLocation,0,0,0,0);f.uniform1i(g.subtypeLocation,"Luminosity"===c.subtype?1:0);a=zb(f,a,f.TEXTURE0); b=zb(f,b,f.TEXTURE1);c=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,c);f.bufferData(f.ARRAY_BUFFER,new Float32Array([0,0,d,0,0,e,0,e,d,0,d,e]),f.STATIC_DRAW);f.enableVertexAttribArray(g.positionLocation);f.vertexAttribPointer(g.positionLocation,2,f.FLOAT,!1,0,0);f.clearColor(0,0,0,0);f.enable(f.BLEND);f.blendFunc(f.ONE,f.ONE_MINUS_SRC_ALPHA);f.clear(f.COLOR_BUFFER_BIT);f.drawArrays(f.TRIANGLES,0,6);f.flush();f.deleteTexture(a);f.deleteTexture(b);f.deleteBuffer(c);return h},drawFigures:function(a, b,c,d,e){if(!da){var f,g;ta();f=S;S=null;g=Q;Q=null;var h=ba(g," attribute vec2 a_position; attribute vec3 a_color; uniform vec2 u_resolution; uniform vec2 u_scale; uniform vec2 u_offset; varying vec4 v_color; void main() { vec2 position = (a_position + u_offset) * u_scale; vec2 clipSpace = (position / u_resolution) * 2.0 - 1.0; gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); v_color = vec4(a_color / 255.0, 1.0); } ", g.VERTEX_SHADER),j=ba(g," precision mediump float; varying vec4 v_color; void main() { gl_FragColor = v_color; } ",g.FRAGMENT_SHADER),h=yb(g, [h,j]);g.useProgram(h);j={};j.gl=g;j.canvas=f;j.resolutionLocation=g.getUniformLocation(h,"u_resolution");j.scaleLocation=g.getUniformLocation(h,"u_scale");j.offsetLocation=g.getUniformLocation(h,"u_offset");j.positionLocation=g.getAttribLocation(h,"a_position");j.colorLocation=g.getAttribLocation(h,"a_color");da=j}f=da;g=f.canvas;h=f.gl;g.width=a;g.height=b;h.viewport(0,0,h.drawingBufferWidth,h.drawingBufferHeight);h.uniform2f(f.resolutionLocation,a,b);a=0;var k,l,p;k=0;for(l=d.length;kj[d+1]&&(p=c,c=d,d=p,p=f,f=g,g=p);j[d+1]>j[e+1]&&(p=d,d=e,e=p,p=g,g=h,h=p);j[c+1]>j[d+1]&&(p=c,c=d,d=p,p=f,f=g,g=p);p=(j[c]+b.offsetX)*b.scaleX;c=(j[c+1]+b.offsetY)*b.scaleY;var q=(j[d]+b.offsetX)*b.scaleX;d=(j[d+1]+b.offsetY)*b.scaleY;var n=(j[e]+b.offsetX)*b.scaleX;b=(j[e+1]+b.offsetY)*b.scaleY;if(!(c>=b)){e=k[f];j=k[f+1];f= k[f+2];var m=k[g],r=k[g+1];g=k[g+2];var t=k[h],s=k[h+1];h=k[h+2];for(var v=Math.round(c),k=Math.round(b),u,y,z,C,E,F,G,A,B=v;B<=k;B++){Bb?1:d===b?0:(d-B)/(d-b),v=q-(q-n)*A,u=m-(m-t)*A,y=r-(r-s)*A,z=g-(g-h)*A);A=Bb?1:(c-B)/(c-b);C=p-(p-n)*A;E=e-(e-t)*A;F=j-(j-s)*A;G=f-(f-h)*A;A=Math.round(Math.min(v,C));for(var J=Math.round(Math.max(v,C)),H=a*B+4*A,I=A;I<=J;I++)A=(v-I)/(v-C),A=0>A?0:1>24&255,p>>16&255,p>>8&255,p&255)); g="url(data:font/opentype;base64,"+btoa(l)+");";M.insertRule('@font-face { font-family:"'+a+'";src:'+g+"}");l=[];g=0;for(h=b.length;ga)a=String.fromCharCode.apply(null,b);else{for(var c=[],d=0;d