10 lines
51 KiB
JavaScript
10 lines
51 KiB
JavaScript
/*
|
|
* Kendo UI v2015.3.1111 (http://www.telerik.com/kendo-ui)
|
|
* Copyright 2015 Telerik AD. All rights reserved.
|
|
*
|
|
* Kendo UI commercial licenses may be obtained at
|
|
* http://www.telerik.com/purchase/license-agreement/kendo-ui-complete
|
|
* If you do not own a commercial license, this file shall be governed by the trial license terms.
|
|
*/
|
|
!function(e,define){define(["./kendo.core.min","./kendo.color.min","./kendo.drawing.min"],e)}(function(){return function(){!function(e,t,n){"use strict";function i(){function e(){var t,o,r;for(t=0;t<arguments.length;++t){if(o=arguments[t],o===n)throw Error("Cannot output undefined to PDF");if(o instanceof y)o.beforeRender(e),o.render(e);else if(V(o))g(o,e);else if(p(o))m(o,e);else if("number"==typeof o){if(isNaN(o))throw Error("Cannot output NaN to PDF");r=o.toFixed(7),r.indexOf(".")>=0&&(r=r.replace(/\.?0+$/,"")),"-0"==r&&(r="0"),i.writeString(r)}else/string|boolean/.test(typeof o)?i.writeString(o+""):"function"==typeof o.get?i.write(o.get()):"object"==typeof o&&(o?e(new q(o)):i.writeString("null"))}}var t=0,i=R();return e.writeData=function(e){i.write(e)},e.withIndent=function(n){++t,n(e),--t},e.indent=function(){e(ie,d("",2*t," ")),e.apply(null,arguments)},e.offset=function(){return i.offset()},e.toString=function(){throw Error("FIX CALLER")},e.get=function(){return i.get()},e.stream=function(){return i},e}function o(e,t){var n=e.beforeRender,i=e.render;e.beforeRender=function(){},e.render=function(e){e(t," 0 R")},e.renderFull=function(o){e._offset=o.offset(),o(t," 0 obj "),n.call(e,o),i.call(e,o),o(" endobj")}}function r(e){var t,n=e("paperSize",se.a4);if(!n)return{};if("string"==typeof n&&(n=se[n.toLowerCase()],null==n))throw Error("Unknown paper size");return n[0]=b(n[0]),n[1]=b(n[1]),e("landscape",!1)&&(n=[Math.max(n[0],n[1]),Math.min(n[0],n[1])]),t=e("margin"),t&&("string"==typeof t||"number"==typeof t?(t=b(t,0),t={left:t,top:t,right:t,bottom:t}):t={left:b(t.left,0),top:b(t.top,0),right:b(t.right,0),bottom:b(t.bottom,0)},e("addMargin")&&(n[0]+=t.left+t.right,n[1]+=t.top+t.bottom)),{paperSize:n,margin:t}}function s(e){function t(t,n){return e&&null!=e[t]?e[t]:n}var n,s,a=this,l=i(),c=0,u=[];a.getOption=t,a.attach=function(e){return u.indexOf(e)<0&&(o(e,++c),u.push(e)),e},a.pages=[],a.FONTS={},a.IMAGES={},a.GRAD_COL_FUNCTIONS={},a.GRAD_OPC_FUNCTIONS={},a.GRAD_COL={},a.GRAD_OPC={},n=a.attach(new Y),s=a.attach(new Q),n.setPages(s),a.addPage=function(e){var t,n,o,l=r(function(t,n){return e&&null!=e[t]?e[t]:n}),c=l.paperSize,u=l.margin,d=c[0],h=c[1];return u&&(d-=u.left+u.right,h-=u.top+u.bottom),t=new $(i(),null,!0),n={Contents:a.attach(t),Parent:s,MediaBox:[0,0,c[0],c[1]]},o=new J(a,n),o._content=t,s.addPage(a.attach(o)),o.transform(1,0,0,-1,0,c[1]),u&&(o.translate(u.left,u.top),o.rect(0,0,d,h),o.clip()),a.pages.push(o),o},a.render=function(){var e,i;for(l("%PDF-1.4",ie,"%ÂÁÚÏÎ",ie,ie),e=0;u.length>e;++e)u[e].renderFull(l),l(ie,ie);for(i=l.offset(),l("xref",ie,0," ",u.length+1,ie),l("0000000000 65535 f ",ie),e=0;u.length>e;++e)l(h(u[e]._offset,10)," 00000 n ",ie);return l(ie),l("trailer",ie),l(new q({Size:u.length+1,Root:n,Info:new q({Producer:new U(t("producer","Kendo UI PDF Generator")),Title:new U(t("title","")),Author:new U(t("author","")),Subject:new U(t("subject","")),Keywords:new U(t("keywords","")),Creator:new U(t("creator","Kendo UI PDF Generator")),CreationDate:t("date",new Date)})}),ie,ie),l("startxref",ie,i,ie),l("%%EOF",ie),l.stream().offset(0)}}function a(t,n){function i(){e.console&&(e.console.error?e.console.error("Cannot load URL: %s",t):e.console.log("Cannot load URL: %s",t)),n(null)}var o=new XMLHttpRequest;o.open("GET",t,!0),ne&&(o.responseType="arraybuffer"),o.onload=function(){200==o.status||304==o.status?n(ne?new Uint8Array(o.response):new VBArray(o.responseBody).toArray()):i()},o.onerror=i,o.send(null)}function l(e,t){var n=ae[e];n?t(n):a(e,function(n){if(null==n)throw Error("Cannot load font from "+e);var i=new te.pdf.TTFFont(n);ae[e]=i,t(i)})}function c(e,t){function i(e){c.src=e,c.complete&&!te.support.browser.msie?r():(c.onload=r,c.onerror=o)}function o(){t(le[e]="TAINTED")}function r(){var i,r,l,u,d,h,f,p,g,m,v,_;if(a&&/^image\/jpe?g$/i.test(a.type))return i=new FileReader,i.onload=function(){c=new C(c.width,c.height,R(new Uint8Array(this.result))),URL.revokeObjectURL(s),t(le[e]=c)},i.readAsArrayBuffer(a),n;r=document.createElement("canvas"),r.width=c.width,r.height=c.height,l=r.getContext("2d"),l.drawImage(c,0,0);try{u=l.getImageData(0,0,c.width,c.height)}catch(w){return o()}finally{s&&URL.revokeObjectURL(s)}for(d=!1,h=R(),f=R(),p=u.data,g=0;p.length>g;)h.writeByte(p[g++]),h.writeByte(p[g++]),h.writeByte(p[g++]),m=p[g++],255>m&&(d=!0),f.writeByte(m);d?c=new S(c.width,c.height,h,f):(v=r.toDataURL("image/jpeg"),v=v.substr(v.indexOf(";base64,")+8),_=R(),_.writeBase64(v),_.offset(0),c=new C(c.width,c.height,_)),t(le[e]=c)}var s,a,l,c=le[e];c?t(c):(c=new Image,/^data:/i.test(e)||(c.crossOrigin="Anonymous"),ne&&!/^data:/i.test(e)?(l=new XMLHttpRequest,l.onload=function(){a=l.response,s=URL.createObjectURL(a),i(s)},l.onerror=o,l.open("GET",e,!0),l.responseType="blob",l.send()):i(e))}function u(e){return function(t,n){var i=t.length,o=i;if(0===i)return n();for(;o-->0;)e(t[o],function(){0===--i&&n()})}}function d(e,t,n){for(;t>e.length;)e=n+e;return e}function h(e,t){return d(e+"",t,"0")}function f(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function p(e){return e instanceof Date}function g(e,t){t("["),e.length>0&&t.withIndent(function(){for(var n=0;e.length>n;++n)n>0&&n%8===0?t.indent(e[n]):t(" ",e[n])}),t(" ]")}function m(e,t){t("(D:",h(e.getUTCFullYear(),4),h(e.getUTCMonth()+1,2),h(e.getUTCDate(),2),h(e.getUTCHours(),2),h(e.getUTCMinutes(),2),h(e.getUTCSeconds(),2),"Z)")}function v(e){return e*(72/25.4)}function _(e){return v(10*e)}function w(e){return 72*e}function b(e,n){var i,o;if("number"==typeof e)return e;if("string"==typeof e&&(i=/^\s*([0-9.]+)\s*(mm|cm|in|pt)\s*$/.exec(e),i&&(o=t(i[1]),!isNaN(o))))return"pt"==i[2]?o:{mm:v,cm:_,"in":w}[i[2]](o);if(null!=n)return n;throw Error("Can't parse unit: "+e)}function y(){}function x(e,t,n){n||(n=y),e.prototype=new n;for(var i in t)f(t,i)&&(e.prototype[i]=t[i]);return e}function k(e){return f(G,e)?G[e]:G[e]=new j(e)}function C(e,t,n){this.asStream=function(){var i=new $(n,{Type:k("XObject"),Subtype:k("Image"),Width:e,Height:t,BitsPerComponent:8,ColorSpace:k("DeviceRGB"),Filter:k("DCTDecode")});return i._resourceName=k("I"+ ++oe),i}}function S(e,t,n,i){this.asStream=function(o){var r=new $(i,{Type:k("XObject"),Subtype:k("Image"),Width:e,Height:t,BitsPerComponent:8,ColorSpace:k("DeviceGray")},!0),s=new $(n,{Type:k("XObject"),Subtype:k("Image"),Width:e,Height:t,BitsPerComponent:8,ColorSpace:k("DeviceRGB"),SMask:o.attach(r)},!0);return s._resourceName=k("I"+ ++oe),s}}function T(e){return e.map(function(e){return V(e)?T(e):"number"==typeof e?(Math.round(1e3*e)/1e3).toFixed(3):e}).join(" ")}function D(e,t,n,i,o,r,s){var a=T([t,n,i,o,r,s]),l=e.GRAD_COL_FUNCTIONS[a];return l||(l=e.GRAD_COL_FUNCTIONS[a]=e.attach(new q({FunctionType:2,Domain:[0,1],Range:[0,1,0,1,0,1],N:1,C0:[t,n,i],C1:[o,r,s]}))),l}function A(e,t,n){var i=T([t,n]),o=e.GRAD_OPC_FUNCTIONS[i];return o||(o=e.GRAD_OPC_FUNCTIONS[i]=e.attach(new q({FunctionType:2,Domain:[0,1],Range:[0,1],N:1,C0:[t],C1:[n]}))),o}function E(e,t){function n(e){return 1==e.length?e[0]:{FunctionType:3,Functions:e,Domain:[0,1],Bounds:d,Encode:h}}var i,o,r,s,a,l=!1,c=[],u=[],d=[],h=[];for(i=1;t.length>i;++i)o=t[i-1],r=t[i],s=o.color,a=r.color,u.push(D(e,s.r,s.g,s.b,a.r,a.g,a.b)),(1>s.a||1>a.a)&&(l=!0),d.push(r.offset),h.push(0,1);if(l)for(i=1;t.length>i;++i)o=t[i-1],r=t[i],s=o.color,a=r.color,c.push(A(e,s.a,a.a));return d.pop(),{hasAlpha:l,colors:n(u),opacities:l?n(c):null}}function M(e,t,n,i,o,r){var s,a,l;return r||(l=[t].concat(i),n.forEach(function(e){l.push(e.offset,e.color.r,e.color.g,e.color.b)}),a=T(l),s=e.GRAD_COL[a]),s||(s=new q({Type:k("Shading"),ShadingType:t?3:2,ColorSpace:k("DeviceRGB"),Coords:i,Domain:[0,1],Function:o,Extend:[!0,!0]}),e.attach(s),s._resourceName="S"+ ++oe,a&&(e.GRAD_COL[a]=s)),s}function P(e,t,n,i,o,r){var s,a,l;return r||(l=[t].concat(i),n.forEach(function(e){l.push(e.offset,e.color.a)}),a=T(l),s=e.GRAD_OPC[a]),s||(s=new q({Type:k("ExtGState"),AIS:!1,CA:1,ca:1,SMask:{Type:k("Mask"),S:k("Luminosity"),G:e.attach(new $("/a0 gs /s0 sh",{Type:k("XObject"),Subtype:k("Form"),FormType:1,BBox:r?[r.left,r.top+r.height,r.left+r.width,r.top]:[0,1,1,0],Group:{Type:k("Group"),S:k("Transparency"),CS:k("DeviceGray"),I:!0},Resources:{ExtGState:{a0:{CA:1,ca:1}},Shading:{s0:{ColorSpace:k("DeviceGray"),Coords:i,Domain:[0,1],ShadingType:t?3:2,Function:o,Extend:[!0,!0]}}}}))}}),e.attach(s),s._resourceName="O"+ ++oe,a&&(e.GRAD_OPC[a]=s)),s}function I(e,t,n){var i="radial"==t.type,o=E(e,t.stops),r=i?[t.start.x,t.start.y,t.start.r,t.end.x,t.end.y,t.end.r]:[t.start.x,t.start.y,t.end.x,t.end.y],s=M(e,i,t.stops,r,o.colors,t.userSpace&&n),a=o.hasAlpha?P(e,i,t.stops,r,o.opacities,t.userSpace&&n):null;return{hasAlpha:o.hasAlpha,shading:s,opacity:a}}function R(t){function n(){return T>=D}function i(){return D>T?t[T++]:0}function o(e){y(T),t[T++]=255&e,T>D&&(D=T)}function r(){return i()<<8|i()}function s(e){o(e>>8),o(e)}function a(){var e=r();return e>=32768?e-65536:e}function l(e){s(0>e?e+65536:e)}function c(){return 65536*r()+r()}function u(e){s(e>>>16&65535),s(65535&e)}function d(){var e=c();return e>=2147483648?e-4294967296:e}function h(e){u(0>e?e+4294967296:e)}function f(){return c()/65536}function p(e){u(Math.round(65536*e))}function g(){return d()/65536}function m(e){h(Math.round(65536*e))}function v(e){return b(e,i)}function _(e){return String.fromCharCode.apply(String,v(e))}function w(e){for(var t=0;e.length>t;++t)o(e.charCodeAt(t))}function b(e,t){for(var n=Array(e),i=0;e>i;++i)n[i]=t();return n}var y,x,k,C,S,T=0,D=0;return null==t?t=ne?new Uint8Array(256):[]:D=t.length,y=ne?function(e){if(e>=t.length){var n=new Uint8Array(Math.max(e+256,2*t.length));n.set(t,0),t=n}}:function(){},x=ne?function(){return new Uint8Array(t.buffer,0,D)}:function(){return t},k=ne?function(e){if("string"==typeof e)return w(e);var n=e.length;y(T+n),t.set(e,T),T+=n,T>D&&(D=T)}:function(e){if("string"==typeof e)return w(e);for(var t=0;e.length>t;++t)o(e[t])},C=ne?function(e,n){if(t.buffer.slice)return new Uint8Array(t.buffer.slice(e,e+n));var i=new Uint8Array(n);return i.set(new Uint8Array(t.buffer,e,n)),i}:function(e,n){return t.slice(e,e+n)},S={eof:n,readByte:i,writeByte:o,readShort:r,writeShort:s,readLong:c,writeLong:u,readFixed:f,writeFixed:p,readShort_:a,writeShort_:l,readLong_:d,writeLong_:h,readFixed_:g,writeFixed_:m,read:v,write:k,readString:_,writeString:w,times:b,get:x,slice:C,offset:function(e){return null!=e?(T=e,S):T},skip:function(e){T+=e},toString:function(){throw Error("FIX CALLER. BinaryStream is no longer convertible to string!")},length:function(){return D},saveExcursion:function(e){var t=T;try{return e()}finally{T=t}},writeBase64:function(t){e.atob?w(e.atob(t)):k(re.decode(t))},base64:function(){return re.encode(x())}}}function B(e){return e.replace(/^\s*(['"])(.*)\1\s*$/,"$2")}function z(e){var t,n=/^\s*((normal|italic)\s+)?((normal|small-caps)\s+)?((normal|bold|\d+)\s+)?(([0-9.]+)(px|pt))(\/(([0-9.]+)(px|pt)|normal))?\s+(.*?)\s*$/i,i=n.exec(e);return i?(t=i[8]?parseInt(i[8],10):12,{italic:i[2]&&"italic"==i[2].toLowerCase(),variant:i[4],bold:i[6]&&/bold|700/i.test(i[6]),fontSize:t,lineHeight:i[12]?"normal"==i[12]?t:parseInt(i[12],10):null,fontFamily:i[14].split(/\s*,\s*/g).map(B)}):{fontSize:12,fontFamily:"sans-serif"}}function L(e){function t(t){return e.bold&&(t+="|bold"),e.italic&&(t+="|italic"),t.toLowerCase()}var n,i,o,r=e.fontFamily;if(r instanceof Array)for(o=0;r.length>o&&(n=t(r[o]),!(i=ee[n]));++o);else i=ee[r.toLowerCase()];for(;"function"==typeof i;)i=i();return i||(i="Times-Roman"),i}function F(e,t){e=e.toLowerCase(),ee[e]=function(){return ee[t]},ee[e+"|bold"]=function(){return ee[t+"|bold"]},ee[e+"|italic"]=function(){return ee[t+"|italic"]},ee[e+"|bold|italic"]=function(){return ee[t+"|bold|italic"]}}function O(e,t){if(1==arguments.length)for(var n in e)f(e,n)&&O(n,e[n]);else switch(e=e.toLowerCase(),ee[e]=t,e){case"dejavu sans":ee["sans-serif"]=t;break;case"dejavu sans|bold":ee["sans-serif|bold"]=t;break;case"dejavu sans|italic":ee["sans-serif|italic"]=t;break;case"dejavu sans|bold|italic":ee["sans-serif|bold|italic"]=t;break;case"dejavu serif":ee.serif=t;break;case"dejavu serif|bold":ee["serif|bold"]=t;break;case"dejavu serif|italic":ee["serif|italic"]=t;break;case"dejavu serif|bold|italic":ee["serif|bold|italic"]=t;break;case"dejavu mono":ee.monospace=t;break;case"dejavu mono|bold":ee["monospace|bold"]=t;break;case"dejavu mono|italic":ee["monospace|italic"]=t;break;case"dejavu mono|bold|italic":ee["monospace|bold|italic"]=t}}function N(e,t){var n=e[0],i=e[1],o=e[2],r=e[3],s=e[4],a=e[5],l=t[0],c=t[1],u=t[2],d=t[3],h=t[4],f=t[5];return[n*l+i*u,n*c+i*d,o*l+r*u,o*c+r*d,s*l+a*u+h,s*c+a*d+f]}function H(e){return 1===e[0]&&0===e[1]&&0===e[2]&&1===e[3]&&0===e[4]&&0===e[5]}var V,U,W,j,G,q,$,Y,Q,X,K,Z,J,ee,te=e.kendo,ne=!!e.Uint8Array,ie="\n",oe=0,re=function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return{decode:function(t){for(var n,i,o,r,s,a,l,c=t.replace(/[^A-Za-z0-9\+\/\=]/g,""),u=0,d=c.length,h=[];d>u;)n=e.indexOf(c.charAt(u++)),i=e.indexOf(c.charAt(u++)),o=e.indexOf(c.charAt(u++)),r=e.indexOf(c.charAt(u++)),s=n<<2|i>>>4,a=(15&i)<<4|o>>>2,l=(3&o)<<6|r,h.push(s),64!=o&&h.push(a),64!=r&&h.push(l);return h},encode:function(t){for(var n,i,o,r,s,a,l,c=0,u=t.length,d="";u>c;)n=t[c++],i=t[c++],o=t[c++],r=n>>>2,s=(3&n)<<4|i>>>4,a=(15&i)<<2|o>>>6,l=63&o,c-u==2?a=l=64:c-u==1&&(l=64),d+=e.charAt(r)+e.charAt(s)+e.charAt(a)+e.charAt(l);return d}}}(),se={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],executive:[521.86,756],folio:[612,936],legal:[612,1008],letter:[612,792],tabloid:[792,1224]},ae={"Times-Roman":!0,"Times-Bold":!0,"Times-Italic":!0,"Times-BoldItalic":!0,Helvetica:!0,"Helvetica-Bold":!0,"Helvetica-Oblique":!0,"Helvetica-BoldOblique":!0,Courier:!0,"Courier-Bold":!0,"Courier-Oblique":!0,"Courier-BoldOblique":!0,Symbol:!0,ZapfDingbats:!0},le={},ce=u(l),ue=u(c);s.prototype={loadFonts:ce,loadImages:ue,getFont:function(e){var t=this.FONTS[e];if(!t){if(t=ae[e],!t)throw Error("Font "+e+" has not been loaded");t=this.attach(t===!0?new X(e):new K(this,t)),this.FONTS[e]=t}return t},getImage:function(e){var t=this.IMAGES[e];if(!t){if(t=le[e],!t)throw Error("Image "+e+" has not been loaded");if("TAINTED"===t)return null;t=this.IMAGES[e]=this.attach(t.asStream(this))}return t},getOpacityGS:function(e,n){var i,o,r,s=t(e).toFixed(3);return e=t(s),s+=n?"S":"F",i=this._opacityGSCache||(this._opacityGSCache={}),o=i[s],o||(r={Type:k("ExtGState")},n?r.CA=e:r.ca=e,o=this.attach(new q(r)),o._resourceName=k("GS"+ ++oe),i[s]=o),o},dict:function(e){return new q(e)},name:function(e){return k(e)},stream:function(e,t){return new $(t,e)}},V=Array.isArray||function(e){return e instanceof Array},y.prototype.beforeRender=function(){},U=x(function(e){this.value=e},{render:function(e){var t,n="",i=this.escape();for(t=0;i.length>t;++t)n+=String.fromCharCode(255&i.charCodeAt(t));e("(",n,")")},escape:function(){return this.value.replace(/([\(\)\\])/g,"\\$1")},toString:function(){return this.value}}),W=x(function(e){this.value=e},{render:function(e){e("<");for(var t=0;this.value.length>t;++t)e(h(this.value.charCodeAt(t).toString(16),4));e(">")}},U),j=x(function(e){this.name=e},{render:function(e){e("/"+this.escape())},escape:function(){return this.name.replace(/[^\x21-\x7E]/g,function(e){return"#"+h(e.charCodeAt(0).toString(16),2)})},toString:function(){return this.name}}),G={},j.get=k,q=x(function(e){this.props=e},{render:function(e){var t=this.props,n=!0;e("<<"),e.withIndent(function(){for(var i in t)f(t,i)&&!/^_/.test(i)&&(n=!1,e.indent(k(i)," ",t[i]))}),n||e.indent(),e(">>")}}),$=x(function(e,t,n){if("string"==typeof e){var i=R();i.write(e),e=i}this.data=e,this.props=t||{},this.compress=n},{render:function(t){var n=this.data.get(),i=this.props;this.compress&&e.pako&&"function"==typeof e.pako.deflate&&(i.Filter?i.Filter instanceof Array||(i.Filter=[i.Filter]):i.Filter=[],i.Filter.unshift(k("FlateDecode")),n=e.pako.deflate(n)),i.Length=n.length,t(new q(i)," stream",ie),t.writeData(n),t(ie,"endstream")}}),Y=x(function(e){e=this.props=e||{},e.Type=k("Catalog")},{setPages:function(e){this.props.Pages=e}},q),Q=x(function(){this.props={Type:k("Pages"),Kids:[],Count:0}},{addPage:function(e){this.props.Kids.push(e),this.props.Count++}},q),X=x(function(e){this.props={Type:k("Font"),Subtype:k("Type1"),BaseFont:k(e)},this._resourceName=k("F"+ ++oe)},{encodeText:function(e){return new U(e+"")}},q),K=x(function(e,t,n){var i,o;n=this.props=n||{},n.Type=k("Font"),n.Subtype=k("Type0"),n.Encoding=k("Identity-H"),this._pdf=e,this._font=t,this._sub=t.makeSubset(),this._resourceName=k("F"+ ++oe),i=t.head,this.name=t.psName,o=this.scale=t.scale,this.bbox=[i.xMin*o,i.yMin*o,i.xMax*o,i.yMax*o],this.italicAngle=t.post.italicAngle,this.ascent=t.ascent*o,this.descent=t.descent*o,this.lineGap=t.lineGap*o,this.capHeight=t.os2.capHeight||this.ascent,this.xHeight=t.os2.xHeight||0,this.stemV=0,this.familyClass=(t.os2.familyClass||0)>>8,this.isSerif=this.familyClass>=1&&7>=this.familyClass,this.isScript=10==this.familyClass,this.flags=(t.post.isFixedPitch?1:0)|(this.isSerif?2:0)|(this.isScript?8:0)|(0!==this.italicAngle?64:0)|32},{encodeText:function(e){return new W(this._sub.encodeText(e+""))},getTextWidth:function(e,t){var n,i,o=0,r=this._font.cmap.getUnicodeEntry().codeMap;for(n=0;t.length>n;++n)i=r[t.charCodeAt(n)],o+=this._font.widthOfGlyph(i||0);return o*e/1e3},beforeRender:function(){var e,t,n,o,r=this,s=r._sub,a=s.render(),l=new $(R(a),{Length1:a.length},!0),c=r._pdf.attach(new q({Type:k("FontDescriptor"),FontName:k(r._sub.psName),FontBBox:r.bbox,Flags:r.flags,StemV:r.stemV,ItalicAngle:r.italicAngle,Ascent:r.ascent,Descent:r.descent,CapHeight:r.capHeight,XHeight:r.xHeight,FontFile2:r._pdf.attach(l)})),u=s.ncid2ogid,d=s.firstChar,h=s.lastChar,f=[];!function p(e,t){if(h>=e){var n=u[e];null==n?p(e+1):(t||f.push(e,t=[]),t.push(r._font.widthOfGlyph(n)),p(e+1,t))}}(d),e=new q({Type:k("Font"),Subtype:k("CIDFontType2"),BaseFont:k(r._sub.psName),CIDSystemInfo:new q({Registry:new U("Adobe"),Ordering:new U("Identity"),Supplement:0}),FontDescriptor:c,FirstChar:d,LastChar:h,DW:Math.round(r._font.widthOfGlyph(0)),W:f,CIDToGIDMap:r._pdf.attach(r._makeCidToGidMap())}),t=r.props,t.BaseFont=k(r._sub.psName),t.DescendantFonts=[r._pdf.attach(e)],n=new Z(d,h,s.subset),o=new $(i(),null,!0),o.data(n),t.ToUnicode=r._pdf.attach(o)},_makeCidToGidMap:function(){return new $(R(this._sub.cidToGidMap()),null,!0)}},q),Z=x(function(e,t,n){this.firstChar=e,this.lastChar=t,this.map=n},{render:function(e){e.indent("/CIDInit /ProcSet findresource begin"),e.indent("12 dict begin"),e.indent("begincmap"),e.indent("/CIDSystemInfo <<"),e.indent(" /Registry (Adobe)"),e.indent(" /Ordering (UCS)"),e.indent(" /Supplement 0"),e.indent(">> def"),e.indent("/CMapName /Adobe-Identity-UCS def"),e.indent("/CMapType 2 def"),e.indent("1 begincodespacerange"),e.indent(" <0000><ffff>"),e.indent("endcodespacerange");var t=this;e.indent(t.lastChar-t.firstChar+1," beginbfchar"),e.withIndent(function(){var n,i;for(n=t.firstChar;t.lastChar>=n;++n)i=t.map[n],e.indent("<",h(n.toString(16),4),">","<",h(i.toString(16),4),">")}),e.indent("endbfchar"),e.indent("endcmap"),e.indent("CMapName currentdict /CMap defineresource pop"),e.indent("end"),e.indent("end")}}),J=x(function(e,t){this._pdf=e,this._rcount=0,this._textMode=!1,this._fontResources={},this._gsResources={},this._xResources={},this._patResources={},this._shResources={},this._opacity=1,this._matrix=[1,0,0,1,0,0],this._annotations=[],this._font=null,this._fontSize=null,this._contextStack=[],t=this.props=t||{},t.Type=k("Page"),t.ProcSet=[k("PDF"),k("Text"),k("ImageB"),k("ImageC"),k("ImageI")],t.Resources=new q({Font:new q(this._fontResources),ExtGState:new q(this._gsResources),XObject:new q(this._xResources),Pattern:new q(this._patResources),Shading:new q(this._shResources)}),t.Annots=this._annotations},{_out:function(){this._content.data.apply(null,arguments)},transform:function(e,t,n,i,o,r){H(arguments)||(this._matrix=N(arguments,this._matrix),this._out(e," ",t," ",n," ",i," ",o," ",r," cm"),this._out(ie))},translate:function(e,t){this.transform(1,0,0,1,e,t)},scale:function(e,t){this.transform(e,0,0,t,0,0)},rotate:function(e){var t=Math.cos(e),n=Math.sin(e);this.transform(t,n,-n,t,0,0)},beginText:function(){this._textMode=!0,this._out("BT",ie)},endText:function(){this._textMode=!1,this._out("ET",ie)},_requireTextMode:function(){if(!this._textMode)throw Error("Text mode required; call page.beginText() first")},_requireFont:function(){if(!this._font)throw Error("No font selected; call page.setFont() first")},setFont:function(e,t){this._requireTextMode(),null==e?e=this._font:e instanceof K||(e=this._pdf.getFont(e)),null==t&&(t=this._fontSize),this._fontResources[e._resourceName]=e,this._font=e,this._fontSize=t,this._out(e._resourceName," ",t," Tf",ie)},setTextLeading:function(e){this._requireTextMode(),this._out(e," TL",ie)},setTextRenderingMode:function(e){this._requireTextMode(),this._out(e," Tr",ie)},showText:function(e,t){var n,i;this._requireFont(),e.length>1&&t&&this._font instanceof K&&(n=this._font.getTextWidth(this._fontSize,e),i=t/n*100,this._out(i," Tz ")),this._out(this._font.encodeText(e)," Tj",ie)},showTextNL:function(e){this._requireFont(),this._out(this._font.encodeText(e)," '",ie)},addLink:function(e,t){var n=this._toPage({x:t.left,y:t.bottom}),i=this._toPage({x:t.right,y:t.top});this._annotations.push(new q({Type:k("Annot"),Subtype:k("Link"),Rect:[n.x,n.y,i.x,i.y],Border:[0,0,0],A:new q({Type:k("Action"),S:k("URI"),URI:new U(e)})}))},setStrokeColor:function(e,t,n){this._out(e," ",t," ",n," RG",ie)},setOpacity:function(e){this.setFillOpacity(e),this.setStrokeOpacity(e),this._opacity*=e},setStrokeOpacity:function(e){if(1>e){var t=this._pdf.getOpacityGS(this._opacity*e,!0);this._gsResources[t._resourceName]=t,this._out(t._resourceName," gs",ie)}},setFillColor:function(e,t,n){this._out(e," ",t," ",n," rg",ie)},setFillOpacity:function(e){if(1>e){var t=this._pdf.getOpacityGS(this._opacity*e,!1);this._gsResources[t._resourceName]=t,this._out(t._resourceName," gs",ie)}},gradient:function(e,t){var n,i,o;this.save(),this.rect(t.left,t.top,t.width,t.height),this.clip(),e.userSpace||this.transform(t.width,0,0,t.height,t.left,t.top),n=I(this._pdf,e,t),i=n.shading._resourceName,this._shResources[i]=n.shading,n.hasAlpha&&(o=n.opacity._resourceName,this._gsResources[o]=n.opacity,this._out("/"+o+" gs ")),this._out("/"+i+" sh",ie),this.restore()},setDashPattern:function(e,t){this._out(e," ",t," d",ie)},setLineWidth:function(e){this._out(e," w",ie)},setLineCap:function(e){this._out(e," J",ie)},setLineJoin:function(e){this._out(e," j",ie)},setMitterLimit:function(e){this._out(e," M",ie)},save:function(){this._contextStack.push(this._context()),this._out("q",ie)},restore:function(){this._out("Q",ie),this._context(this._contextStack.pop())},moveTo:function(e,t){this._out(e," ",t," m",ie)},lineTo:function(e,t){this._out(e," ",t," l",ie)},bezier:function(e,t,n,i,o,r){this._out(e," ",t," ",n," ",i," ",o," ",r," c",ie)},bezier1:function(e,t,n,i){this._out(e," ",t," ",n," ",i," y",ie)},bezier2:function(e,t,n,i){this._out(e," ",t," ",n," ",i," v",ie)},close:function(){this._out("h",ie)},rect:function(e,t,n,i){this._out(e," ",t," ",n," ",i," re",ie)},ellipse:function(e,t,n,i){function o(t){return e+t}function r(e){return t+e}var s=.5522847498307936;this.moveTo(o(0),r(i)),this.bezier(o(n*s),r(i),o(n),r(i*s),o(n),r(0)),this.bezier(o(n),r(-i*s),o(n*s),r(-i),o(0),r(-i)),this.bezier(o(-n*s),r(-i),o(-n),r(-i*s),o(-n),r(0)),this.bezier(o(-n),r(i*s),o(-n*s),r(i),o(0),r(i))},circle:function(e,t,n){this.ellipse(e,t,n,n)},stroke:function(){this._out("S",ie)},nop:function(){this._out("n",ie)},clip:function(){this._out("W n",ie)},clipStroke:function(){this._out("W S",ie)},closeStroke:function(){this._out("s",ie)},fill:function(){this._out("f",ie)},fillStroke:function(){this._out("B",ie)},drawImage:function(e){var t=this._pdf.getImage(e);t&&(this._xResources[t._resourceName]=t,this._out(t._resourceName," Do",ie))},comment:function(e){var t=this;e.split(/\r?\n/g).forEach(function(e){t._out("% ",e,ie)})},_context:function(e){return null==e?{opacity:this._opacity,matrix:this._matrix}:(this._opacity=e.opacity,this._matrix=e.matrix,n)},_toPage:function(e){var t=this._matrix,n=t[0],i=t[1],o=t[2],r=t[3],s=t[4],a=t[5];return{x:n*e.x+o*e.y+s,y:i*e.x+r*e.y+a}}},q),ee={serif:"Times-Roman","serif|bold":"Times-Bold","serif|italic":"Times-Italic","serif|bold|italic":"Times-BoldItalic","sans-serif":"Helvetica","sans-serif|bold":"Helvetica-Bold","sans-serif|italic":"Helvetica-Oblique","sans-serif|bold|italic":"Helvetica-BoldOblique",monospace:"Courier","monospace|bold":"Courier-Bold","monospace|italic":"Courier-Oblique","monospace|bold|italic":"Courier-BoldOblique",zapfdingbats:"ZapfDingbats","zapfdingbats|bold":"ZapfDingbats","zapfdingbats|italic":"ZapfDingbats","zapfdingbats|bold|italic":"ZapfDingbats"},F("Times New Roman","serif"),F("Courier New","monospace"),F("Arial","sans-serif"),F("Helvetica","sans-serif"),F("Verdana","sans-serif"),F("Tahoma","sans-serif"),F("Georgia","sans-serif"),F("Monaco","monospace"),F("Andale Mono","monospace"),te.pdf={Document:s,BinaryStream:R,defineFont:O,parseFontDef:z,getFontURL:L,loadFonts:ce,loadImages:ue,getPaperOptions:r,TEXT_RENDERING_MODE:{fill:0,stroke:1,fillAndStroke:2,invisible:3,fillAndClip:4,strokeAndClip:5,fillStrokeClip:6,clip:7}}}(window,parseFloat)}(),function(){!function(e){"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function n(e){return Object.keys(e).sort(function(e,t){return e-t}).map(parseFloat)}function i(e){var t,n,i;for(this.raw=e,this.scalerType=e.readLong(),this.tableCount=e.readShort(),this.searchRange=e.readShort(),this.entrySelector=e.readShort(),this.rangeShift=e.readShort(),t=this.tables={},n=0;this.tableCount>n;++n)i={tag:e.readString(4),checksum:e.readLong(),offset:e.readLong(),length:e.readLong()},t[i.tag]=i}function o(e){function n(e,t){this.definition=t,this.length=t.length,this.offset=t.offset,this.file=e,this.rawData=e.raw,this.parse(e.raw)}n.prototype.raw=function(){return this.rawData.slice(this.offset,this.length)};for(var i in e)t(e,i)&&(n[i]=n.prototype[i]=e[i]);return n}function r(){var e,t="",n=_+"";for(e=0;n.length>e;++e)t+=String.fromCharCode(n.charCodeAt(e)-48+65);return++_,t}function s(e){this.font=e,this.subset={},this.unicodes={},this.ogid2ngid={0:0},this.ngid2ogid={0:0},this.ncid2ogid={},this.next=this.firstChar=1,this.nextGid=1,this.psName=r()+"+"+this.font.psName}function a(e,t){var n,i,o,r=this,s=r.contents=b(e);if("ttcf"==s.readString(4)){if(!t)throw Error("Must specify a name for TTC files");for(s.readLong(),n=s.readLong(),i=0;n>i;++i)if(o=s.readLong(),s.saveExcursion(function(){s.offset(o),r.parse()}),r.psName==t)return;throw Error("Font "+t+" not found in collection")}s.offset(0),r.parse()}var l,c,u,d,h,f,p,g,m,v,_,w=e.kendo.pdf,b=w.BinaryStream;i.prototype={readTable:function(e,t){var n=this.tables[e];if(!n)throw Error("Table "+e+" not found in directory");return this[e]=n.table=new t(this,n)},render:function(e){var n,i,o,r,s,a,l,c,u=Object.keys(e).length,d=Math.pow(2,Math.floor(Math.log(u)/Math.LN2)),h=16*d,f=Math.floor(Math.log(d)/Math.LN2),p=16*u-h,g=b();g.writeLong(this.scalerType),g.writeShort(u),g.writeShort(h),g.writeShort(f),g.writeShort(p),n=16*u,i=g.offset()+n,o=null,r=b();for(s in e)if(t(e,s))for(a=e[s],g.writeString(s),g.writeLong(this.checksum(a)),g.writeLong(i),g.writeLong(a.length),r.write(a),"head"==s&&(o=i),i+=a.length;i%4;)r.writeByte(0),i++;return g.write(r.get()),l=this.checksum(g.get()),c=2981146554-l,g.offset(o+8),g.writeLong(c),g.get()},checksum:function(e){e=b(e);for(var t=0;!e.eof();)t+=e.readLong();return 4294967295&t}},l=o({parse:function(e){e.offset(this.offset),this.version=e.readLong(),this.revision=e.readLong(),this.checkSumAdjustment=e.readLong(),this.magicNumber=e.readLong(),this.flags=e.readShort(),this.unitsPerEm=e.readShort(),this.created=e.read(8),this.modified=e.read(8),this.xMin=e.readShort_(),this.yMin=e.readShort_(),this.xMax=e.readShort_(),this.yMax=e.readShort_(),this.macStyle=e.readShort(),this.lowestRecPPEM=e.readShort(),this.fontDirectionHint=e.readShort_(),this.indexToLocFormat=e.readShort_(),this.glyphDataFormat=e.readShort_()},render:function(e){var t=b();return t.writeLong(this.version),t.writeLong(this.revision),t.writeLong(0),t.writeLong(this.magicNumber),t.writeShort(this.flags),t.writeShort(this.unitsPerEm),t.write(this.created),t.write(this.modified),t.writeShort_(this.xMin),t.writeShort_(this.yMin),t.writeShort_(this.xMax),t.writeShort_(this.yMax),t.writeShort(this.macStyle),t.writeShort(this.lowestRecPPEM),t.writeShort_(this.fontDirectionHint),t.writeShort_(e),t.writeShort_(this.glyphDataFormat),t.get()}}),c=o({parse:function(e){e.offset(this.offset);var t=this.file.head.indexToLocFormat;this.offsets=0===t?e.times(this.length/2,function(){return 2*e.readShort()}):e.times(this.length/4,e.readLong)},offsetOf:function(e){return this.offsets[e]},lengthOf:function(e){return this.offsets[e+1]-this.offsets[e]},render:function(e){var t,n=b(),i=e[e.length-1]>65535;for(t=0;e.length>t;++t)i?n.writeLong(e[t]):n.writeShort(e[t]/2);return{format:i?1:0,table:n.get()}}}),u=o({parse:function(e){e.offset(this.offset),this.version=e.readLong(),this.ascent=e.readShort_(),this.descent=e.readShort_(),this.lineGap=e.readShort_(),this.advanceWidthMax=e.readShort(),this.minLeftSideBearing=e.readShort_(),this.minRightSideBearing=e.readShort_(),this.xMaxExtent=e.readShort_(),this.caretSlopeRise=e.readShort_(),this.caretSlopeRun=e.readShort_(),this.caretOffset=e.readShort_(),e.skip(8),this.metricDataFormat=e.readShort_(),this.numOfLongHorMetrics=e.readShort()},render:function(e){var t=b();return t.writeLong(this.version),t.writeShort_(this.ascent),t.writeShort_(this.descent),t.writeShort_(this.lineGap),t.writeShort(this.advanceWidthMax),t.writeShort_(this.minLeftSideBearing),t.writeShort_(this.minRightSideBearing),t.writeShort_(this.xMaxExtent),t.writeShort_(this.caretSlopeRise),t.writeShort_(this.caretSlopeRun),t.writeShort_(this.caretOffset),t.write([0,0,0,0,0,0,0,0]),t.writeShort_(this.metricDataFormat),t.writeShort(e.length),t.get()}}),d=o({parse:function(e){e.offset(this.offset),this.version=e.readLong(),this.numGlyphs=e.readShort(),this.maxPoints=e.readShort(),this.maxContours=e.readShort(),this.maxComponentPoints=e.readShort(),this.maxComponentContours=e.readShort(),this.maxZones=e.readShort(),this.maxTwilightPoints=e.readShort(),this.maxStorage=e.readShort(),this.maxFunctionDefs=e.readShort(),this.maxInstructionDefs=e.readShort(),this.maxStackElements=e.readShort(),this.maxSizeOfInstructions=e.readShort(),this.maxComponentElements=e.readShort(),this.maxComponentDepth=e.readShort()},render:function(e){var t=b();return t.writeLong(this.version),t.writeShort(e.length),t.writeShort(this.maxPoints),t.writeShort(this.maxContours),t.writeShort(this.maxComponentPoints),t.writeShort(this.maxComponentContours),t.writeShort(this.maxZones),t.writeShort(this.maxTwilightPoints),t.writeShort(this.maxStorage),t.writeShort(this.maxFunctionDefs),t.writeShort(this.maxInstructionDefs),t.writeShort(this.maxStackElements),t.writeShort(this.maxSizeOfInstructions),t.writeShort(this.maxComponentElements),t.writeShort(this.maxComponentDepth),t.get()}}),h=o({parse:function(e){var t,n,i;e.offset(this.offset),
|
|
t=this.file,n=t.hhea,this.metrics=e.times(n.numOfLongHorMetrics,function(){return{advance:e.readShort(),lsb:e.readShort_()}}),i=t.maxp.numGlyphs-t.hhea.numOfLongHorMetrics,this.leftSideBearings=e.times(i,e.readShort_)},forGlyph:function(e){var t=this.metrics,n=t.length;return n>e?t[e]:{advance:t[n-1].advance,lsb:this.leftSideBearings[e-n]}},render:function(e){var t,n,i=b();for(t=0;e.length>t;++t)n=this.forGlyph(e[t]),i.writeShort(n.advance),i.writeShort_(n.lsb);return i.get()}}),f=function(){function e(e){this.raw=e}function n(e){var t,n,o;for(this.raw=e,t=this.glyphIds=[],n=this.idOffsets=[];;){if(o=e.readShort(),n.push(e.offset()),t.push(e.readShort()),!(o&s))break;e.skip(o&i?4:2),o&l?e.skip(8):o&a?e.skip(4):o&r&&e.skip(2)}}var i,r,s,a,l;return e.prototype={compound:!1,render:function(){return this.raw.get()}},i=1,r=8,s=32,a=64,l=128,n.prototype={compound:!0,render:function(e){var t,n,i=b(this.raw.get());for(t=0;this.glyphIds.length>t;++t)n=this.glyphIds[t],i.offset(this.idOffsets[t]),i.writeShort(e[n]);return i.get()}},o({parse:function(){this.cache={}},glyphFor:function(i){var o,r,s,a,l,c,u,d,h,f,p,g=this.cache;return t(g,i)?g[i]:(o=this.file.loca,r=o.lengthOf(i),0===r?g[i]=null:(s=this.rawData,a=this.offset+o.offsetOf(i),l=b(s.slice(a,r)),c=l.readShort_(),u=l.readShort_(),d=l.readShort_(),h=l.readShort_(),f=l.readShort_(),p=g[i]=-1==c?new n(l):new e(l),p.numberOfContours=c,p.xMin=u,p.yMin=d,p.xMax=h,p.yMax=f,p))},render:function(e,t,n){var i,o,r,s=b(),a=[];for(i=0;t.length>i;++i)o=t[i],r=e[o],a.push(s.offset()),r&&s.write(r.render(n));return a.push(s.offset()),{table:s.get(),offsets:a}}})}(),p=function(){function e(e,t){this.text=e,this.length=e.length,this.platformID=t.platformID,this.platformSpecificID=t.platformSpecificID,this.languageID=t.languageID,this.nameID=t.nameID}return o({parse:function(t){var n,i,o,r,s,a,l;for(t.offset(this.offset),t.readShort(),n=t.readShort(),i=this.offset+t.readShort(),o=t.times(n,function(){return{platformID:t.readShort(),platformSpecificID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:t.readShort()+i}}),r=this.strings={},s=0;o.length>s;++s)a=o[s],t.offset(a.offset),l=t.readString(a.length),r[a.nameID]||(r[a.nameID]=[]),r[a.nameID].push(new e(l,a));this.postscriptEntry=r[6][0],this.postscriptName=this.postscriptEntry.text.replace(/[^\x20-\x7F]/g,"")},render:function(n){var i,o,r,s,a,l,c=this.strings,u=0;for(i in c)t(c,i)&&(u+=c[i].length);o=b(),r=b(),o.writeShort(0),o.writeShort(u),o.writeShort(6+12*u);for(i in c)if(t(c,i))for(s=6==i?[new e(n,this.postscriptEntry)]:c[i],a=0;s.length>a;++a)l=s[a],o.writeShort(l.platformID),o.writeShort(l.platformSpecificID),o.writeShort(l.languageID),o.writeShort(l.nameID),o.writeShort(l.length),o.writeShort(r.offset()),r.writeString(l.text);return o.write(r.get()),o.get()}})}(),g=function(){var e=".notdef .null nonmarkingreturn space exclam quotedbl numbersign dollar percent ampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash zero one two three four five six seven eight nine colon semicolon less equal greater question at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z bracketleft backslash bracketright asciicircum underscore grave a b c d e f g h i j k l m n o p q r s t u v w x y z braceleft bar braceright asciitilde Adieresis Aring Ccedilla Eacute Ntilde Odieresis Udieresis aacute agrave acircumflex adieresis atilde aring ccedilla eacute egrave ecircumflex edieresis iacute igrave icircumflex idieresis ntilde oacute ograve ocircumflex odieresis otilde uacute ugrave ucircumflex udieresis dagger degree cent sterling section bullet paragraph germandbls registered copyright trademark acute dieresis notequal AE Oslash infinity plusminus lessequal greaterequal yen mu partialdiff summation product pi integral ordfeminine ordmasculine Omega ae oslash questiondown exclamdown logicalnot radical florin approxequal Delta guillemotleft guillemotright ellipsis nonbreakingspace Agrave Atilde Otilde OE oe endash emdash quotedblleft quotedblright quoteleft quoteright divide lozenge ydieresis Ydieresis fraction currency guilsinglleft guilsinglright fi fl daggerdbl periodcentered quotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute Edieresis Egrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex apple Ograve Uacute Ucircumflex Ugrave dotlessi circumflex tilde macron breve dotaccent ring cedilla hungarumlaut ogonek caron Lslash lslash Scaron scaron Zcaron zcaron brokenbar Eth eth Yacute yacute Thorn thorn minus multiply onesuperior twosuperior threesuperior onehalf onequarter threequarters franc Gbreve gbreve Idotaccent Scedilla scedilla Cacute cacute Ccaron ccaron dcroat".split(/\s+/g);return o({parse:function(e){var t,n;switch(e.offset(this.offset),this.format=e.readLong(),this.italicAngle=e.readFixed_(),this.underlinePosition=e.readShort_(),this.underlineThickness=e.readShort_(),this.isFixedPitch=e.readLong(),this.minMemType42=e.readLong(),this.maxMemType42=e.readLong(),this.minMemType1=e.readLong(),this.maxMemType1=e.readLong(),this.format){case 65536:case 196608:break;case 131072:for(t=e.readShort(),this.glyphNameIndex=e.times(t,e.readShort),this.names=[],n=this.offset+this.length;e.offset()<n;)this.names.push(e.readString(e.readByte()));break;case 151552:t=e.readShort(),this.offsets=e.read(t);break;case 262144:this.map=e.times(this.file.maxp.numGlyphs,e.readShort)}},glyphFor:function(t){switch(this.format){case 65536:return e[t]||".notdef";case 131072:var n=this.glyphNameIndex[t];return e.length>n?e[n]:this.names[n-e.length]||".notdef";case 151552:case 196608:return".notdef";case 262144:return this.map[t]||65535}},render:function(t){var n,i,o,r,s,a,l;if(196608==this.format)return this.raw();for(n=b(this.rawData.slice(this.offset,32)),n.writeLong(131072),n.offset(32),i=[],o=[],r=0;t.length>r;++r)s=t[r],a=this.glyphFor(s),l=e.indexOf(a),l>=0?i.push(l):(i.push(e.length+o.length),o.push(a));for(n.writeShort(t.length),r=0;i.length>r;++r)n.writeShort(i[r]);for(r=0;o.length>r;++r)n.writeByte(o[r].length),n.writeString(o[r]);return n.get()}})}(),m=function(){function e(e,t){var n=this;n.platformID=e.readShort(),n.platformSpecificID=e.readShort(),n.offset=t+e.readLong(),e.saveExcursion(function(){var t,i,o,r,s,a,l,c,u,d,h,f,p;switch(e.offset(n.offset),n.format=e.readShort(),n.length=e.readShort(),n.language=e.readShort(),n.isUnicode=3==n.platformID&&1==n.platformSpecificID&&4==n.format||0===n.platformID&&4==n.format,n.codeMap={},n.format){case 0:for(t=0;256>t;++t)n.codeMap[t]=e.readByte();break;case 4:for(i=e.readShort()/2,e.skip(6),o=e.times(i,e.readShort),e.skip(2),r=e.times(i,e.readShort),s=e.times(i,e.readShort_),a=e.times(i,e.readShort),l=(n.length+n.offset-e.offset())/2,c=e.times(l,e.readShort),t=0;i>t;++t)for(u=r[t],d=o[t],h=u;d>=h;++h)0===a[t]?f=h+s[t]:(p=a[t]/2-(i-t)+(h-u),f=c[p]||0,0!==f&&(f+=s[t])),n.codeMap[h]=65535&f}})}function t(e,t){function i(n){return t[e[n]]}var o,r,s,a,l,c,u,d,h,f,p,g,m,v,_,w,y,x=n(e),k=[],C=[],S=null,T=null;for(o=0;x.length>o;++o)r=x[o],s=i(r),a=s-r,(null==S||a!==T)&&(S&&C.push(S),k.push(r),T=a),S=r;for(S&&C.push(S),C.push(65535),k.push(65535),l=k.length,c=2*l,u=2*Math.pow(2,Math.floor(Math.log(l)/Math.LN2)),d=Math.log(u/2)/Math.LN2,h=c-u,f=[],p=[],g=[],o=0;l>o;++o){if(m=k[o],v=C[o],65535==m){f.push(0),p.push(0);break}if(_=i(m),m-_>=32768)for(f.push(0),p.push(2*(g.length+l-o)),w=m;v>=w;++w)g.push(i(w));else f.push(_-m),p.push(0)}return y=b(),y.writeShort(3),y.writeShort(1),y.writeLong(12),y.writeShort(4),y.writeShort(16+8*l+2*g.length),y.writeShort(0),y.writeShort(c),y.writeShort(u),y.writeShort(d),y.writeShort(h),C.forEach(y.writeShort),y.writeShort(0),k.forEach(y.writeShort),f.forEach(y.writeShort_),p.forEach(y.writeShort),g.forEach(y.writeShort),y.get()}return o({parse:function(t){var n,i=this,o=i.offset;t.offset(o),i.version=t.readShort(),n=t.readShort(),i.unicodeEntry=null,i.tables=t.times(n,function(){var n=new e(t,o);return n.isUnicode&&(i.unicodeEntry=n),n})},render:function(e,n){var i=b();return i.writeShort(0),i.writeShort(1),i.write(t(e,n)),i.get()},getUnicodeEntry:function(){if(!this.unicodeEntry)throw Error("Font doesn't have an Unicode encoding");return this.unicodeEntry}})}(),v=o({parse:function(e){e.offset(this.offset),this.version=e.readShort(),this.averageCharWidth=e.readShort_(),this.weightClass=e.readShort(),this.widthClass=e.readShort(),this.type=e.readShort(),this.ySubscriptXSize=e.readShort_(),this.ySubscriptYSize=e.readShort_(),this.ySubscriptXOffset=e.readShort_(),this.ySubscriptYOffset=e.readShort_(),this.ySuperscriptXSize=e.readShort_(),this.ySuperscriptYSize=e.readShort_(),this.ySuperscriptXOffset=e.readShort_(),this.ySuperscriptYOffset=e.readShort_(),this.yStrikeoutSize=e.readShort_(),this.yStrikeoutPosition=e.readShort_(),this.familyClass=e.readShort_(),this.panose=e.times(10,e.readByte),this.charRange=e.times(4,e.readLong),this.vendorID=e.readString(4),this.selection=e.readShort(),this.firstCharIndex=e.readShort(),this.lastCharIndex=e.readShort(),this.version>0&&(this.ascent=e.readShort_(),this.descent=e.readShort_(),this.lineGap=e.readShort_(),this.winAscent=e.readShort(),this.winDescent=e.readShort(),this.codePageRange=e.times(2,e.readLong),this.version>1&&(this.xHeight=e.readShort(),this.capHeight=e.readShort(),this.defaultChar=e.readShort(),this.breakChar=e.readShort(),this.maxContext=e.readShort()))},render:function(){return this.raw()}}),_=1e5,s.prototype={use:function(e){var t,n,i,o,r;if("string"==typeof e){for(n="",i=0;e.length>i;++i)t=this.use(e.charCodeAt(i)),n+=String.fromCharCode(t);return n}return t=this.unicodes[e],t||(t=this.next++,this.subset[t]=e,this.unicodes[e]=t,o=this.font.cmap.getUnicodeEntry().codeMap[e],o&&(this.ncid2ogid[t]=o,null==this.ogid2ngid[o]&&(r=this.nextGid++,this.ogid2ngid[o]=r,this.ngid2ogid[r]=o))),t},encodeText:function(e){return this.use(e)},glyphIds:function(){return n(this.ogid2ngid)},glyphsFor:function(e,t){var n,i,o;for(t||(t={}),n=0;e.length>n;++n)i=e[n],t[i]||(o=t[i]=this.font.glyf.glyphFor(i),o&&o.compound&&this.glyphsFor(o.glyphIds,t));return t},render:function(){var e,i,o,r,s,a,l,c,u=this.glyphsFor(this.glyphIds());for(e in u)t(u,e)&&(e=parseInt(e,10),null==this.ogid2ngid[e]&&(i=this.nextGid++,this.ogid2ngid[e]=i,this.ngid2ogid[i]=e));return o=n(this.ngid2ogid),r=o.map(function(e){return this.ngid2ogid[e]},this),s=this.font,a=s.glyf.render(u,r,this.ogid2ngid),l=s.loca.render(a.offsets),this.lastChar=this.next-1,c={cmap:m.render(this.ncid2ogid,this.ogid2ngid),glyf:a.table,loca:l.table,hmtx:s.hmtx.render(r),hhea:s.hhea.render(r),maxp:s.maxp.render(r),post:s.post.render(r),name:s.name.render(this.psName),head:s.head.render(l.format),"OS/2":s.os2.render()},this.font.directory.render(c)},cidToGidMap:function(){var e,t,n,i=b(),o=0;for(e=this.firstChar;this.next>e;++e){for(;e>o;)i.writeShort(0),o++;t=this.ncid2ogid[e],t?(n=this.ogid2ngid[t],i.writeShort(n)):i.writeShort(0),o++}return i.get()}},a.prototype={parse:function(){var e=this.directory=new i(this.contents);this.head=e.readTable("head",l),this.loca=e.readTable("loca",c),this.hhea=e.readTable("hhea",u),this.maxp=e.readTable("maxp",d),this.hmtx=e.readTable("hmtx",h),this.glyf=e.readTable("glyf",f),this.name=e.readTable("name",p),this.post=e.readTable("post",g),this.cmap=e.readTable("cmap",m),this.os2=e.readTable("OS/2",v),this.psName=this.name.postscriptName,this.ascent=this.os2.ascent||this.hhea.ascent,this.descent=this.os2.descent||this.hhea.descent,this.lineGap=this.os2.lineGap||this.hhea.lineGap,this.scale=1e3/this.head.unitsPerEm},widthOfGlyph:function(e){return this.hmtx.forGlyph(e).advance*this.scale},makeSubset:function(){return new s(this)}},w.TTFFont=a}(window)}(),function(){!function(e,t){"use strict";function n(t,n){function i(e,t,n){return n||(n=u),n.pdf&&null!=n.pdf[e]?n.pdf[e]:t}function o(){function o(e){var t,n,o,r,l,c=e.options,u=T(e),d=u.bbox;e=u.root,t=i("paperSize",i("paperSize","auto"),c),n=!1,"auto"==t&&(d?(o=d.getSize(),t=[o.width,o.height],n=!0,r=d.getOrigin(),u=new D.Group,u.transform(new A.Matrix(1,0,0,1,-r.x,-r.y)),u.append(e),e=u):t="A4"),l=s.addPage({paperSize:t,margin:i("margin",i("margin"),c),addMargin:n,landscape:i("landscape",i("landscape",!1),c)}),a(e,l,s)}if(!(--r>0)){var s=new e.pdf.Document({producer:i("producer"),title:i("title"),author:i("author"),subject:i("subject"),keywords:i("keywords"),creator:i("creator"),date:i("date")});d?t.children.forEach(o):o(t),n(s.render(),s)}}var r,l=[],c=[],u=t.options,d=i("multiPage");t.traverse(function(t){s({Image:function(e){c.indexOf(e.src())<0&&c.push(e.src())},Text:function(t){var n=e.pdf.parseFontDef(t.options.font),i=e.pdf.getFontURL(n);l.indexOf(i)<0&&l.push(i)}},t)}),r=2,e.pdf.loadFonts(l,o),e.pdf.loadImages(c,o)}function i(e,t){n(e,function(e){t("data:application/pdf;base64,"+e.base64())})}function o(e,t){n(e,function(e){t(new Blob([e.get()],{type:"application/pdf"}))})}function r(t,n,r,s){window.Blob&&!e.support.browser.safari?o(t,function(t){e.saveAs({dataURI:t,fileName:n}),s&&s(t)}):i(t,function(t){e.saveAs({dataURI:t,fileName:n,proxyURL:r}),s&&s(t)})}function s(e,t){var n=e[t.nodeType];return n?n.call.apply(n,arguments):t}function a(e,t,n){var i,o,r;e.options._pdfDebug&&t.comment("BEGIN: "+e.options._pdfDebug),i=e.transform(),o=e.opacity(),t.save(),null!=o&&1>o&&t.setOpacity(o),l(e,t,n),c(e,t,n),i&&(r=i.matrix(),t.transform(r.a,r.b,r.c,r.d,r.e,r.f)),u(e,t,n),s({Path:m,MultiPath:v,Circle:_,Arc:w,Text:b,Image:x,Group:y,Rect:k},e,t,n),t.restore(),e.options._pdfDebug&&t.comment("END: "+e.options._pdfDebug)}function l(e,t){var n,i,o,r,s,a,l=e.stroke&&e.stroke();if(l){if(n=l.color){if(n=S(n),null==n)return;t.setStrokeColor(n.r,n.g,n.b),1!=n.a&&t.setStrokeOpacity(n.a)}if(i=l.width,null!=i){if(0===i)return;t.setLineWidth(i)}o=l.dashType,o&&t.setDashPattern(M[o],0),r=l.lineCap,r&&t.setLineCap(P[r]),s=l.lineJoin,s&&t.setLineJoin(I[s]),a=l.opacity,null!=a&&t.setStrokeOpacity(a)}}function c(e,t){var n,i,o=e.fill&&e.fill();if(o&&!(o instanceof D.Gradient)){if(n=o.color){if(n=S(n),null==n)return;t.setFillColor(n.r,n.g,n.b),1!=n.a&&t.setFillOpacity(n.a)}i=o.opacity,null!=i&&t.setFillOpacity(i)}}function u(e,t,n){var i=e.clip();i&&(g(i,t,n),t.clip())}function d(e){return e&&(e instanceof D.Gradient||e.color&&!/^(none|transparent)$/i.test(e.color)&&(null==e.width||e.width>0)&&(null==e.opacity||e.opacity>0))}function h(e,t,n,i){var o,r,s,a,l,c,u,d=e.fill();return d instanceof D.Gradient?(i?t.clipStroke():t.clip(),o=d instanceof D.RadialGradient,o?(r={x:d.center().x,y:d.center().y,r:0},s={x:d.center().x,y:d.center().y,r:d.radius()}):(r={x:d.start().x,y:d.start().y},s={x:d.end().x,y:d.end().y}),a={type:o?"radial":"linear",start:r,end:s,userSpace:d.userSpace(),stops:d.stops.elements().map(function(e){var t,n=e.offset();return n=/%$/.test(n)?parseFloat(n)/100:parseFloat(n),t=S(e.color()),t.a*=e.opacity(),{offset:n,color:t}})},l=e.rawBBox(),c=l.topLeft(),u=l.getSize(),l={left:c.x,top:c.y,width:u.width,height:u.height},t.gradient(a,l),!0):void 0}function f(e,t,n){d(e.fill())&&d(e.stroke())?h(e,t,n,!0)||t.fillStroke():d(e.fill())?h(e,t,n,!1)||t.fill():d(e.stroke())?t.stroke():t.nop()}function p(e,t){var n,i,o,r=e.segments;if(4==r.length&&e.options.closed){for(n=[],i=0;r.length>i;++i){if(r[i].controlIn())return!1;n[i]=r[i].anchor()}if(o=n[0].y==n[1].y&&n[1].x==n[2].x&&n[2].y==n[3].y&&n[3].x==n[0].x||n[0].x==n[1].x&&n[1].y==n[2].y&&n[2].x==n[3].x&&n[3].y==n[0].y)return t.rect(n[0].x,n[0].y,n[2].x-n[0].x,n[2].y-n[0].y),!0}}function g(e,t,n){var i,o,r,s,a,l,c=e.segments;if(0!==c.length&&!p(e,t,n)){for(o=0;c.length>o;++o)r=c[o],s=r.anchor(),i?(a=i.controlOut(),l=r.controlIn(),a&&l?t.bezier(a.x,a.y,l.x,l.y,s.x,s.y):t.lineTo(s.x,s.y)):t.moveTo(s.x,s.y),i=r;e.options.closed&&t.close()}}function m(e,t,n){g(e,t,n),f(e,t,n)}function v(e,t,n){var i,o=e.paths;for(i=0;o.length>i;++i)g(o[i],t,n);f(e,t,n)}function _(e,t,n){var i=e.geometry();t.circle(i.center.x,i.center.y,i.radius),f(e,t,n)}function w(e,t,n){var i,o=e.geometry().curvePoints();for(t.moveTo(o[0].x,o[0].y),i=1;o.length>i;)t.bezier(o[i].x,o[i++].y,o[i].x,o[i++].y,o[i].x,o[i++].y);f(e,t,n)}function b(t,n){var i,o=e.pdf.parseFontDef(t.options.font),r=t._position;t.fill()&&t.stroke()?i=E.fillAndStroke:t.fill()?i=E.fill:t.stroke()&&(i=E.stroke),n.transform(1,0,0,-1,r.x,r.y+o.fontSize),n.beginText(),n.setFont(e.pdf.getFontURL(o),o.fontSize),n.setTextRenderingMode(i),n.showText(t.content(),t._pdfRect?t._pdfRect.width():null),n.endText()}function y(e,t,n){var i,o;for(e._pdfLink&&t.addLink(e._pdfLink.url,e._pdfLink),i=e.children,o=0;i.length>o;++o)a(i[o],t,n)}function x(e,t){var n,i,o,r=e.src();r&&(n=e.rect(),i=n.getOrigin(),o=n.getSize(),t.transform(o.width,0,0,-o.height,i.x,i.y+o.height),t.drawImage(r))}function k(e,t,n){var i=e.geometry();t.rect(i.origin.x,i.origin.y,i.size.width,i.size.height),f(e,t,n)}function C(e,n){var i,o=t.Deferred();for(i in n)e.options.set("pdf."+i,n[i]);return D.pdf.toDataURL(e,o.resolve),o.promise()}function S(t){var n=e.parseColor(t,!0);return n?n.toRGB():null}function T(e){function t(e){return l=!0,e}function n(e){return e.visible()&&e.opacity()>0&&(d(e.fill())||d(e.stroke()))}function i(e){var t,n,i=[];for(t=0;e.length>t;++t)n=a(e[t]),null!=n&&i.push(n);return i}function o(e,t){var n,i=c,o=u;e.transform()&&(u=u.multiplyCopy(e.transform().matrix())),n=e.clip(),n&&(n=n.bbox(),n&&(n=n.bbox(u),c=c?A.Rect.intersect(c,n):n));try{return t()}finally{c=i,u=o}}function r(e){if(null==c)return!1;var t=e.rawBBox().bbox(u);return c&&t&&(t=A.Rect.intersect(t,c)),t}function a(a){return o(a,function(){if(!(a instanceof D.Group||a instanceof D.MultiPath)){var o=r(a);if(!o)return t(null);h=h?A.Rect.union(h,o):o}return s({Path:function(e){return 0!==e.segments.length&&n(e)?e:t(null)},MultiPath:function(e){if(!n(e))return t(null);var o=new D.MultiPath(e.options);return o.paths=i(e.paths),0===o.paths.length?t(null):o},Circle:function(e){return n(e)?e:t(null)},Arc:function(e){return n(e)?e:t(null)},Text:function(e){return/\S/.test(e.content())&&n(e)?e:t(null)},Image:function(e){return e.visible()&&e.opacity()>0?e:t(null)},Group:function(n){var o=new D.Group(n.options);return o.children=i(n.children),o._pdfLink=n._pdfLink,n===e||0!==o.children.length||n._pdfLink?o:t(null)},Rect:function(e){return n(e)?e:t(null)}},a)})}var l,c=!1,u=A.Matrix.unit(),h=null;do l=!1,e=a(e);while(e&&l);return{root:e,bbox:h}}var D=e.drawing,A=e.geometry,E=e.pdf.TEXT_RENDERING_MODE,M={dash:[4],dashDot:[4,2,1,2],dot:[1,2],longDash:[8,2],longDashDot:[8,2,1,2],longDashDotDot:[8,2,1,2,1,2],solid:[]},P={butt:0,round:1,square:2},I={miter:0,round:1,bevel:2};e.deepExtend(D,{exportPDF:C,pdf:{toDataURL:i,toBlob:o,saveAs:r,toStream:n}})}(window.kendo,window.kendo.jQuery)}(),function(e,t){e.PDFMixin={extend:function(e){e.events.push("pdfExport"),e.options.pdf=this.options,e.saveAsPDF=this.saveAsPDF,e._drawPDF=this._drawPDF,e._drawPDFShadow=this._drawPDFShadow},options:{fileName:"Export.pdf",proxyURL:"",paperSize:"auto",allPages:!1,landscape:!1,margin:null,title:null,author:null,subject:null,keywords:null,creator:"Kendo UI PDF Generator",date:null},saveAsPDF:function(){var n,i=new t.Deferred,o=i.promise(),r={promise:o};if(!this.trigger("pdfExport",r))return n=this.options.pdf,n.multiPage=n.allPages,this._drawPDF(i).then(function(t){return e.drawing.exportPDF(t,n)}).done(function(t){e.saveAs({dataURI:t,fileName:n.fileName,proxyURL:n.proxyURL,forceProxy:n.forceProxy,proxyTarget:n.proxyTarget}),i.resolve()}).fail(function(e){i.reject(e)}),o},_drawPDF:function(n){var i=new t.Deferred;return e.drawing.drawDOM(this.wrapper).done(function(e){var t={page:e,pageNumber:1,progress:1,totalPages:1};n.notify(t),i.resolve(t.page)}).fail(function(e){i.reject(e)}),i},_drawPDFShadow:function(n,i){var o,r,s;return n=n||{},o=this.wrapper,r=t("<div class='k-pdf-export-shadow'>"),n.width&&r.css({width:n.width,overflow:"visible"}),o.before(r),r.append(n.content||o.clone(!0,!0)),s=t.Deferred(),setTimeout(function(){var t=e.drawing.drawDOM(r,i);t.always(function(){r.remove()}).then(function(){s.resolve.apply(s,arguments)}).fail(function(){s.reject.apply(s,arguments)}).progress(function(){s.progress.apply(s,arguments)})},15),s.promise()}}}(kendo,window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t){t()}); |