/*! * * Spread.Sheets Library 10.2.0 * * Copyright(c) GrapeCity, Inc. All rights reserved. * * Licensed under the SpreadJS Commercial License. * spread.sales@grapecity.com * http://spread.grapecity.com/spreadjs/eula/ * * */var GC=GC||{};GC.Spread=GC.Spread||{};GC.Spread.Sheets=GC.Spread.Sheets||{};GC.Spread.Sheets.Print=function(P){function I(L){if(q[L])return q[L].exports;var M=q[L]={exports:{},id:L,loaded:!1};return P[L].call(M.exports,M,M.exports,I),M.loaded=!0,M.exports}var q={};return I.m=P,I.c=q,I.p="/assets/",I(0)}([function(P,I,q){P.exports=q(1)},function(P,I,q){function L(a,b){var c=arguments.length;1===c?this.kind(a):2===c?(this.Vo=a,this._v=b,this.g3=0):this.kind(1)}function M(){var a=this;Q(V,function(b,c){"margin"===b?a["_"+b]=ga(ha):"paperSize"===b?a["_"+b]=new L:a["_"+b]=c})}function T(a){return void 0===a}function Aa(a,b){var c=Yb(a.paperSize(),a.orientation()),d=c.width,c=c.height,e=Zb(a.margin()),g=e.left,f=e.top,k=e.right,e=e.bottom;b.paperSize={width:d,height:c};b.pageImageableArea=new ia(g,f,d-g-k,c-f-e)}function Yb(a,b){var c={},d=.96*a.width(),e=.96*a.height();return 2===b?(c.width=e,c.height=ja(d,10)):(c.width=d,c.height=ja(e,10)),c}function Zb(a){var b={};return b.left=.96*a.left,b.top=.96*a.top,b.right=.96*a.right,b.bottom=.96*a.bottom,b.header=.96*a.header,b.footer=.96*a.footer,b}function sb(a){var b,c,d,e,g,f=a.Mp();b=f.Ff;for(var f=f.Ef,k=a.tables&&a.tables.all();0<=b;b--){if(c=a.Iq(-1,b),ka(c))return b;if(k)for(d=0,e=k.length;d=g.col&&b<=g.col+g.colCount-1)return b;for(d=0;d<=f;d++)if(Ba(a,d,b))return b}return-1}function Na(a){var b,c,d,e,g,f=a.Mp(),k=f.Ff;b=f.Ef;for(f=a.tables&&a.tables.all();0<=b;b--){if(c=a.Iq(b,-1),ka(c))return b;if(f)for(d=0,e=f.length;d=g.row&&b<=g.row+g.rowCount-1)return b;for(d=0;d<=k;d++)if(Ba(a,b,d))return b}return-1}function Ba(a,b,c){var d=a.getValue(b,c),e;return null!==d&&!T(d)||!(!a.getSparkline||!a.getSparkline(b,c))||(e=a.Iq(b,c),ka(e))}function ka(a){return!(!a||!(a.backColor||a.backgroundImage||a.borderBottom||a.borderLeft||a.borderRight||a.borderTop))}function W(a,b){a.pictures&&a.pictures.all().forEach(b)}function Ca(a,b){var c=-1;return W(a,function(a){a.isVisible()&&a.canPrint()&&(c=la(c,b?a.endRow():a.endColumn()))}),c}function Da(a,b){var c,d;c=b.columnEnd();var e=a.getColumnCount();if(-1===c)if(b.useMax()){c=sb(a);if(a.options.allowCellOverflow){var g,f,k,m,n,l,p,r;m=a.ss;d=Na(a)+1;g=n=0;for(f=a.getColumnCount(2);g=f;f++){k=new tb(a,g,f);k=k.nJ(n);l=0;for(p=k.length;lm&&(m=r.endColumn);(l=k.headingOverflowlayout)&&l.endColumn>m&&(m=l.endColumn);(k=k.trailingOverflowLayout)&&k.endColumn>m&&(m=k.endColumn)}c=la(c,m)}d=Ca(a,!1);c=la(c,d)}else c=e-1;return ma(c,e-1)}function Oa(a,b){var c,d,e,g,f=b.rowEnd(),k=a.getRowCount();return-1===f?(b.useMax()?(e=Na(a),g=Ca(a,!0),d=la(e,g)):d=k-1,c=d):c=f,ma(c,k-1)}function C(){var a=this;Q(na,function(b,c){a["_"+b]=c})}function Pa(){var a=this;Q(oa,function(b,c){"columnPage"===b||"rowPage"===b?c=new C:"paperSize"===b?c={width:0,height:0}:"pageImageableArea"===b&&(c=new ia(0,0,0,0));a["_"+b]=c})}function Qa(a,b,c,d){this.OC=a;this.kj=a.getSheet(b);this._sheetIndex=b;this.h3=this.kj.printInfo();this._paperSize=c;this._pageImageableArea=d;this.i3={width:d.width,height:d.height};this.j3=0;this.l3=[];this.m3=[];this.o3=this.n3=1}function Ra(a,b,c){var d=[],e,g,f;d.push(a);e=0;for(g=c.length;e=a&&(d.push(f-1),d.push(f));return d.push(b),d}function ub(a){this.OC=a;this.j3=0;var b=[],c,d,e,g;c=0;for(d=a.getSheetCount();cv&&(v=b.length),y+=b.substr(0,v),D=v+1=b.length?b="":(0>w&&(w=v+1),b=b.substr(w)),!y||!A&&b||(C.push({text:y,underline:B,strikethrough:n,fontFamily:m,fontSize:0=e;h--)d-=f._m(h);else for(d=p.x,h=p.col+1;h<=e;h++)d+=f._m(h);if(d+=a.startColumnOffset()*k,x=a.startRow(),B=n.findRow(x),B)e=B.y;else if(x=x;B--)e-=f.Sl(B);else for(e=q.y,B=q.row+1;B<=x;B++)e+=f.Sl(B);e+=a.startRowOffset()*k;b.save();b.rect(c.x,c.y,c.width,c.height);b.clip();b.beginPath();(a=a.src())&&Ta(b,g,a,d,e,u,t);b.restore()}})}function wb(a,b){W(a,function(c){c.startColumn()<=b&&b<=c.endColumn()&&c.startColumnOffset(c.startColumnOffset()-a.$r(b))})}function xb(a,b){W(a,function(c){c.startRow()<=b&&b<=c.endRow()&&c.startRowOffset(c.startRowOffset()-a.Yr(b))})}function Ua(a,b,c,d){a.wu().execute({cmd:"autoFitColumn",sheetName:a.name(),columns:b,rowHeader:c,autoFitType:d})}function Va(a,b,c,d){a.wu().execute({cmd:"autoFitRow",sheetName:a.name(),rows:b,columnHeader:c,autoFitType:d})}function yb(a,b,c,d){var e=b.toDataURL();a=a.createElement("img");return d&&(a.style.margin=b.style.margin),a.style.width=b.style.width,a.style.height=b.style.height,a.src=e,c.ko(e)||c.fo(e),a}function Wa(a,b){this.xn={};this.OC=a;this.H3=b}function Xa(){}var ha,V,ra,na,ba,oa,ca,N=q(2),da=N.Workbook;I=N.Worksheet;var tb=N.xJ,Z=N.GC$,K=Z.extend,Q=Z.each,zb=N.oo,ia=N.Rect,sa=N.Ul,Ab=sa.Ml;q={};var ma=Math.min,la=Math.max,Bb=Math.floor,ja=parseInt,Sa=parseFloat,ta=JSON.stringify,ga=JSON.parse;K(I.prototype,{printInfo:function(a){var b;return 0===arguments.length?(this.e3||(this.e3=new M),b=this.e3):(this.e3=a,b=this),b},getRowPageBreak:function(a){return this.iq(3).getPageBreak(a)},setRowPageBreak:function(a,b){this.Vr(a,b,"pageBreak",!0)},getColumnPageBreak:function(a){return this.nq(3).getPageBreak(a)},setColumnPageBreak:function(a,b){this.Vr(a,b,"pageBreak",!1)}});I.$n("print",{toJson:function(a){var b=this.e3;b&&(a.printInfo=b.toJSON())},fromJson:function(a){(a=a&&a.printInfo)&&this.printInfo().fromJSON(a)}});da.prototype.print=function(a){(this.f3||(this.f3=new Xa)).print(this,a)};da.$n("print",{dispose:function(){var a=this.f3;a&&a.dispose()}});q.PrintVisibilityType={inherit:0,hide:1,show:2,showOnce:3};q.PrintCentering={none:0,horizontal:1,vertical:2,both:3};q.PrintPageOrientation={portrait:1,landscape:2};q.PrintPageOrder={auto:0,downThenOver:1,overThenDown:2};q.PaperKind={a2:66,a3:8,a3Extra:63,a3ExtraTransverse:68,a3Rotated:76,a3Transverse:67,a4:9,a4Extra:53,a4Plus:60,a4Rotated:77,a4Small:10,a4Transverse:55,a5:11,a5Extra:64,a5Rotated:78,a5Transverse:61,a6:70,a6Rotated:83,aPlus:57,b4:12,b4Envelope:33,b4JisRotated:79,b5:13,b5Envelope:34,b5Extra:65,b5JisRotated:80,b5Transverse:62,b6Envelope:35,b6Jis:88,b6JisRotated:89,bPlus:58,c3Envelope:29,c4Envelope:30,c5Envelope:28,c65Envelope:32,c6Envelope:31,cSheet:24,custom:0,dlEnvelope:27,dSheet:25,eSheet:26,executive:7,folio:14,germanLegalFanfold:41,germanStandardFanfold:40,inviteEnvelope:47,isoB4:42,italyEnvelope:36,japaneseDoublePostcard:69,japaneseDoublePostcardRotated:82,japaneseEnvelopeChouNumber3:73,japaneseEnvelopeChouNumber3Rotated:86,japaneseEnvelopeChouNumber4:74,japaneseEnvelopeChouNumber4Rotated:87,japaneseEnvelopeKakuNumber2:71,japaneseEnvelopeKakuNumber2Rotated:84,japaneseEnvelopeKakuNumber3:72,japaneseEnvelopeKakuNumber3Rotated:85,japaneseEnvelopeYouNumber4:91,japaneseEnvelopeYouNumber4Rotated:92,japanesePostcard:43,japanesePostcardRotated:81,ledger:4,legal:5,legalExtra:51,letter:1,letterExtra:50,letterExtraTransverse:56,letterPlus:59,letterRotated:75,letterSmall:2,letterTransverse:54,monarchEnvelope:37,note:18,number10Envelope:20,number11Envelope:21,number12Envelope:22,number14Envelope:23,number9Envelope:19,personalEnvelope:38,prc16K:93,prc16KRotated:106,prc32K:94,prc32KBig:95,prc32KBigRotated:108,prc32KRotated:107,prcEnvelopeNumber1:96,prcEnvelopeNumber10:105,prcEnvelopeNumber10Rotated:118,prcEnvelopeNumber1Rotated:109,prcEnvelopeNumber2:97,prcEnvelopeNumber2Rotated:110,prcEnvelopeNumber3:98,prcEnvelopeNumber3Rotated:111,prcEnvelopeNumber4:99,prcEnvelopeNumber4Rotated:112,prcEnvelopeNumber5:100,prcEnvelopeNumber5Rotated:113,prcEnvelopeNumber6:101,prcEnvelopeNumber6Rotated:114,prcEnvelopeNumber7:102,prcEnvelopeNumber7Rotated:115,prcEnvelopeNumber8:103,prcEnvelopeNumber8Rotated:116,prcEnvelopeNumber9:104,prcEnvelopeNumber9Rotated:117,quarto:15,standard10x11:45,standard10x14:16,standard11x17:17,standard12x11:90,standard15x11:46,standard9x11:44,statement:6,tabloid:3,tabloidExtra:52,usStandardFanfold:39};K(L.prototype,{height:function(a){return 0===arguments.length?this._v:(this._v!==a&&(this.g3=0),this._v=a,this)},width:function(a){return 0===arguments.length?this.Vo:(this.Vo!==a&&(this.g3=0),this.Vo=a,this)},kind:function(a){var b;return 0===arguments.length?this.g3:(this.g3=a,b=this.getPageSize(a),this.Vo=b.width,this._v=b.height,this)},getPageSize:function(a){function b(a,b){return{width:100*a,height:100*b}}function c(a,b){return{width:a/25.4*100,height:b/25.4*100}}switch(a){case 0:return{width:0,height:0};case 1:return b(8.5,11);case 5:return b(8.5,14);case 9:return c(210,297);case 24:return b(17,22);case 25:return b(22,34);case 26:return b(34,44);case 2:return b(8.5,11);case 3:return b(11,17);case 4:return b(17,11);case 6:return b(5.5,8.5);case 7:return b(7.25,10.5);case 8:return c(297,420);case 10:return c(210,297);case 11:return c(148,210);case 12:return c(250,353);case 13:return c(176,250);case 14:return b(8.5,13);case 15:return c(215,275);case 16:return b(10,14);case 17:return b(11,17);case 18:return b(8.5,11);case 19:return b(3.875,8.875);case 20:return b(4.125,9.5);case 21:return b(4.5,10.375);case 22:return b(4.75,11);case 23:return b(5,11.5);case 27:return c(110,220);case 28:return c(162,229);case 29:return c(324,458);case 30:return c(229,324);case 31:return c(114,162);case 32:return c(114,229);case 33:return c(250,353);case 34:return c(176,250);case 35:return c(176,125);case 36:return c(110,230);case 37:return b(3.875,7.5);case 38:return b(3.625,6.5);case 39:return b(14.875,11);case 40:return b(8.5,12);case 41:return b(8.5,13);case 42:return c(250,353);case 43:return c(100,148);case 44:return b(9,11);case 45:return b(10,11);case 46:return b(15,11);case 47:return c(220,220);case 50:return b(9.275,12);case 51:return b(9.275,15);case 52:return b(11.69,18);case 53:return c(236,322);case 54:return b(8.275,11);case 55:return c(210,297);case 56:return b(9.275,12);case 57:return c(227,356);case 58:return c(305,487);case 59:return b(8.5,12.69);case 60:return c(210,330);case 61:return c(148,210);case 62:return c(182,257);case 63:return c(322,445);case 64:return c(174,235);case 65:return c(201,276);case 66:return c(420,594);case 67:return c(297,420);case 68:return c(322,445);case 69:return c(200,148);case 70:return c(105,148);case 71:return c(240,332);case 72:return c(216,277);case 73:return c(120,235);case 74:return c(90,205);case 75:return b(11,8.5);case 76:return c(420,297);case 77:return c(297,210);case 78:return c(210,148);case 79:return c(364,257);case 80:return c(257,182);case 81:return c(148,100);case 82:return c(148,200);case 83:return c(148,105);case 84:return c(332,240);case 85:return c(277,216);case 86:return c(235,120);case 87:return c(205,90);case 88:return c(128,182);case 89:return c(182,128);case 90:return b(12,11);case 91:return c(235,105);case 92:return c(105,235);case 93:return c(146,215);case 94:return c(97,151);case 95:return c(97,151);case 96:return c(102,165);case 97:return c(102,176);case 98:return c(125,176);case 99:return c(110,208);case 100:return c(110,220);case 101:return c(120,230);case 102:return c(160,230);case 103:return c(120,309);case 104:return c(229,324);case 105:return c(324,458);case 106:return c(146,215);case 107:return c(97,151);case 108:return c(97,151);case 109:return c(165,102);case 110:return c(176,102);case 111:return c(176,125);case 112:return c(208,110);case 113:return c(220,110);case 114:return c(230,120);case 115:return c(230,160);case 116:return c(309,120);case 117:return c(324,229);case 118:return c(458,324);default:return{width:0,height:0}}},toJSON:function(){return{width:this.Vo,height:this._v,kind:this.g3}},fromJSON:function(a){T(a.width)||(this.Vo=a.width);T(a.height)||(this._v=a.height);T(a.kind)||(this.g3=a.kind)}});q.PaperSize=L;ha='{"top":75,"bottom":75,"left":70,"right":70,"header":30,"footer":30}';V={bestFitRows:!1,bestFitColumns:!1,columnStart:-1,columnEnd:-1,rowStart:-1,rowEnd:-1,repeatColumnStart:-1,repeatColumnEnd:-1,repeatRowStart:-1,repeatRowEnd:-1,showBorder:!0,showGridLine:!1,showColumnHeader:0,showRowHeader:0,useMax:!0,centering:0,firstPageNumber:1,headerLeft:"",headerCenter:"",headerRight:"",footerLeft:"",footerCenter:"",footerRight:"",headerLeftImage:"",headerCenterImage:"",headerRightImage:"",footerLeftImage:"",footerCenterImage:"",footerRightImage:"",margin:ga(ha),orientation:1,pageRange:"",pageOrder:0,blackAndWhite:!1,zoomFactor:1,fitPagesTall:-1,fitPagesWide:-1,paperSize:{},qualityFactor:2};ra={toJSON:function(){var a,b,c;return a=this,b={},Q(V,function(d){var e=c=a["_"+d],g=V[d];("margin"===d?ta(g)===ta(e):"paperSize"===d?850===e.width&&1100===e.height&&0===e.kind:"firstPageNumber"===d?1===e&&!a.eja:g===e)||("paperSize"===d?b[d]=c.toJSON():b[d]=c)}),b},fromJSON:function(a){var b=this;Q(V,function(c){var d=a[c];T(d)||("paperSize"===c?b["_"+c].fromJSON(d):("firstPageNumber"===c&&(b.eja=!0),b["_"+c]=d))})}};Q(V,function(a){ra[a]=function(b){if(0===arguments.length)return this["_"+a];if("zoomFactor"===a).1>b?b=.1:4c?c=1:8=this.q3()||0>=this.r3())return void(this.j3=0);if(a=this.h3,b=a.fitPagesTall(),c=a.fitPagesWide(),-1===b&&-1===c&&(d=a.zoomFactor(),this.horizontalZoomFactor(d),this.verticalZoomFactor(d)),this.$m={},this.an={},this.s3(),1<=b||1<=c){e=d=a=0;for(g=this.horizontalPageCount();e=f?(c=a%g,d=Bb(a/g)):(d=a%f,c=Bb(a/f)),b=new Pa,b.sheetIndex(this._sheetIndex),b.pageNumberInSheet(a),b.rowPageIndexInSheet(c),b.columnPageIndexInSheet(d),b.pageNumber(a),b.rowPageIndex(c),b.columnPageIndex(d),b.rowPage(this.m3[c]),b.columnPage(this.l3[d]),b.paperSize(this._paperSize),b.pageImageableArea(this._pageImageableArea),b.workbookName(this.kj.parent.name),b.worksheetName(this.kj.name()),b},verticalZoomFactor:function(a){return 0===arguments.length?this.o3:(this.o3=a,this.$m={},this)},horizontalZoomFactor:function(a){return 0===arguments.length?this.n3:(this.n3=a,this.an={},this)},horizontalPageCount:function(){return this.l3.length},verticalPageCount:function(){return this.m3.length},sheetIndex:function(){return this._sheetIndex},q3:function(){return this.i3.width},r3:function(){return this.i3.height},s3:function(){this.v3();this.w3();this.j3=this.verticalPageCount()*this.horizontalPageCount()},u3:function(a,b){var c,d,e,g=this.h3.fitPagesWide();e=1;g=e&&(this.horizontalZoomFactor(d),this.w3(),this.horizontalPageCount()!==g);e++)d-=c},t3:function(a,b){var c,d,e,g=this.h3.fitPagesTall();e=1;g=e&&(this.verticalZoomFactor(d),this.v3(),this.verticalPageCount()!==g);e++)d-=c},w3:function(){var a,b,c,d,e,g,f,k,m,n,l,p;e=this.h3;var r=this.kj;k=-1===e.columnStart()?0:e.columnStart();m=Da(r,e);if(-1!==m){a=this.x3();b=this.q3();c=e.repeatColumnStart();d=e.repeatColumnEnd();e=e.showRowHeader();g=[];for(f=k;f<=m;f++)r.getColumnPageBreak(f)&&g.push(f);this.l3=[];k=Ra(k,m,g);m=0;for(g=k.length;mb&&(f=a,a=b,b=f);for(f=a;f<=b;f++){if(k&&3===e&&(q=c,F=d,-1!==q&&q<=u)){-1!==F&&F>u&&(F=u-1);null===h&&(h=new C);h.repeatItemStart(c);h.repeatItemEnd(d);for(k=q;k<=F;k++)m=this.C3(k,e),k<=u&&(B+=m);t-=B;k=!1}if(l=this.C3(f,e),l>t&&(z||f===a)){z=!1;for(m=0;l-m>=t;)null===h&&(h=new C),h.repeatItemStart(c),h.repeatItemEnd(d),h.itemStart(f),h.itemEnd(f),h.contentSize(g),h.contentOffset(m),x.push(h),m+=t,h=null,r=p=0,k=!0;if(n=l-m,0===n){u=f;continue}if(u=f-1,f===b){null===h&&(h=new C);h.repeatItemStart(c);h.repeatItemEnd(d);h.itemStart(f);h.itemEnd(f);h.contentSize(n+B);h.contentOffset(m);x.push(h);break}if(f++,!(f<=b))break;null===h&&(h=new C);h.repeatItemStart(c);h.repeatItemEnd(d);p=n;h.contentOffset(m);l=this.C3(f,e)}p+=l;p>t||p===t?(p>t?(r=p-l+B,--f):r=p+B,null===h&&(h=new C),-1===u?h.itemStart(a):h.itemStart(u+1),h.itemEnd(f),h.contentSize(r),x.push(h),h=null,p=0,r=0,B=0,t=g,k=!0,u=f,l>t&&(z=!0)):f===b&&(null===h&&(h=new C),r=p+B,-1===u?h.itemStart(a):h.itemStart(u+1),h.itemEnd(f),h.contentSize(r),x.push(h),h=null,p=0,r=0,B=0,t=g,k=!0)}return x},B3:function(a,b,c,d,e,g){var f,k,m,n;k=cb&&(f=a,a=b,b=f);for(f=a;f<=b;f++){if(k&&3===e&&(y=c,F=d,-1!==y&&y<=u)){-1!==F&&F>u&&(F=u-1);null===h&&(h=new C);h.repeatItemStart(y);h.repeatItemEnd(F);for(k=y;k<=F;k++)m=this.D3(k,e),k<=u&&(q+=m);t-=q;k=!1}if(l=this.D3(f,e),l>t&&(z||f===a)){z=!1;for(m=0;l-m>=t;)null===h&&(h=new C),h.repeatItemStart(c),h.repeatItemEnd(F),h.itemStart(f),h.itemEnd(f),h.contentSize(g),h.contentOffset(m),x.push(h),m+=t,h=null,r=p=0,k=!0;if(n=l-m,0===n){u=f;continue}if(u=f-1,f===b){null===h&&(h=new C);h.repeatItemStart(c);h.repeatItemEnd(d);h.itemStart(f);h.itemEnd(f);h.contentSize(n+q);h.contentOffset(m);x.push(h);break}if(f++,!(f<=b))break;null===h&&(h=new C);h.repeatItemStart(c);h.repeatItemEnd(F);p=n;h.contentOffset(m);l=this.D3(f,e)}p+=l;p>t||p===t?(p>t?(r=p-l+q,--f):r=p+q,null===h&&(h=new C),-1===u?h.itemStart(a):h.itemStart(u+1),h.itemEnd(f),h.contentSize(r),x.push(h),h=null,p=0,r=0,q=0,t=g,k=!0,u=f,l>t&&(z=!0)):f===b&&(null===h&&(h=new C),r=p+q,-1===u?h.itemStart(a):h.itemStart(u+1),h.itemEnd(f),h.contentSize(r),x.push(h),h=null,p=0,r=0,q=0,t=g,k=!0)}return x},E3:function(a,b){var c,d,e,g=this.kj,f=g.defaults,k=g.getColumnVisible(a,b);return 3===b&&a=e?d?f.rowHeaderColWidth:f.colWidth:e)),c},C3:function(a,b){var c,d=this.an[b];return d||(d=this.an[b]={}),c=d[a],T(c)&&(c=d[a]=this.E3(a,b)*this.n3),c},F3:function(a,b){var c,d,e,g,f=this.kj,k=f.defaults,m=k.rowHeight,k=k.colHeaderRowHeight,n=f.getRowVisible(a,b);return 3===b&&a=e?c=d?k:m:(g=e,d?g=Fb?1:-1;for(cb=Fb;cb!==bb;cb+=Ba)Fa.push(cb);Fa.push(bb)}else Fa.push(ja(Ga,10));Db=Fa}else Db=[];var ua=k=Db,Na=a;ua.sort();for(var Gb=[],ea=void 0,Ca=void 0,db=void 0,ea=0,Ca=ua.length;ea=Na||0>ua[ea])&&Gb.push(ea);for(db=Gb.length-1;0<=db;db--)ua.splice(Gb[db],1);Cb=0>k.indexOf(d.pageNumberInSheet())}if(!Cb){m=g.showBorder();n=Zb(g.margin());l=n.left;p=n.right;r=n.top;q=n.bottom;t=n.header;y=n.footer;F=g.centering();u=Yb(g.paperSize(),g.orientation());z=u.width;h=u.height;x=g.qualityFactor();C=z-l-p;I=h-ma(t,r)-ma(y,q);v=la(0,r-t);D=la(0,q-y);w=d.getPageSize();A=w.width;H=w.height;var Da=O,Oa=z,Pa=h,eb=Da.createElement("div"),fb=eb.style,Ra=E=(fb.border="1px transparent solid",fb.boxSizing="border-box",fb.width=Oa+"px",fb.height=Pa+"px",eb.className="gc-printPage",Da.body.appendChild(eb),eb),Sa=C,Ta=I,Ua=l,Va=ma(t,r),Hb=O.createElement("div"),gb=Hb.style;G=(gb.marginLeft=Ua+"px",gb.width=Sa+"px",gb.marginTop=Va+"px",gb.height=Ta+"px",Ra.appendChild(Hb),Hb);if(0=x?K:yb(O,K,b))}var tb=G,wb=C,xb=I-v-D,Ob=O.createElement("div"),ec=Ob.style;L=(ec.width=wb+"px",ec.height=xb+"px",tb.appendChild(Ob),Ob);var Pb=void 0;U=(aa instanceof Qa?Pb=aa:aa instanceof ub&&(Pb=aa.getSheetPaginator(c,{})),Pb);var fc=O,ib=L,jb=A,kb=H,lb=F,zb=U.horizontalZoomFactor(),rc=U.verticalZoomFactor(),gc=x,Ia=void 0,Qb=void 0,mb=void 0,S=void 0,nb=void 0,ob=void 0,Ja=void 0,Rb=void 0,X=0;if(m&&(X=1),Ia=ib.style,1!==lb&&3!==lb||(Ia.boxSizing="border-box",Ia.paddingLeft=(Z(ib).width()-jb-2*X)/2+"px"),2!==lb&&3!==lb||(Ia.boxSizing="border-box",Ia.paddingTop=(Z(ib).height()-kb-2*X)/2+"px"),Qb=fc.createElement("div"),mb=Qb.style,mb.width=jb+"px",mb.height=kb+"px",mb.border=X+"px black solid",S=fc.createElement("canvas"),nb=S.style,nb.margin=X+"px",S.width=1/zb*(jb-2*X),S.height=1/rc*(kb-2*X),nb.width=jb-2*X+"px",nb.height=kb-2*X+"px",ob=gc,Ja=gc,Ab.chrome)for(Rb=S.width*ob*S.height*Ja;65792>Rb;)Rb*=2,Ja*=2;J=(S.width*=ob,S.height*=Ja,S.getContext("2d").scale(ob,Ja),ib.appendChild(Qb),S);M=J.getContext("2d");P=J.width;Q=J.height;var pb=e,sc=M,hc=new ia(0,0,P,Q);pb.bt=b;pb.Us(hc);pb.invalidateLayout();pb.yl.LI(sc,hc);for(var ic=e,tc=M,uc=new ia(0,0,P,Q),vc=b,Ka=void 0,La=void 0,jc=void 0,wc=ic.am(),Ka=0;2>=Ka;Ka++)for(La=0;2>=La;La++)(jc=uc.getIntersectRect(wc.Ft(Ka,La)))&&qc(ic,tc,jc,Ka,La,vc);T=L.children[0];T.appendChild(2>=x?J:yb(O,J,b,!0));if(0=x?N:yb(O,N,b))}if(g.blackAndWhite())if(Ab.mozilla)E.classList.add("grayscale");else for(V=Z("canvas",E),W=0,ga=V.length;W