/*! * * SpreadJS Library 13.1.0 * * Copyright(c) GrapeCity, Inc. All rights reserved. * * Licensed under the SpreadJS Commercial License. * us.sales@grapecity.com * http://www.grapecity.com/en/licensing/grapecity/ * * */ var GC="object"==typeof GC?GC:{};GC.Spread=GC.Spread||{},GC.Spread.Sheets=GC.Spread.Sheets||{},GC.Spread.Sheets.Fill=function(a){var b={};function c(d){if(b[d])return b[d].exports;var e=b[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,c),e.l=!0,e.exports}return c.m=a,c.c=b,c.d=function(a,b,d){c.o(a,b)||Object.defineProperty(a,b,{enumerable:!0,get:d})},c.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},c.t=function(a,b){var d,e;if(1&b&&(a=c(a)),8&b)return a;if(4&b&&"object"==typeof a&&a&&a.__esModule)return a;if(d=Object.create(null),c.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:a}),2&b&&"string"!=typeof a)for(e in a)c.d(d,e,function(b){return a[b]}.bind(null,e));return d},c.n=function(a){var b=a&&a.__esModule?function b(){return a.default}:function b(){return a};return c.d(b,"a",b),b},c.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},c.p="/assets/",c(c.s="./dist/plugins/fill/fill.entry.js")}({"./dist/plugins/fill/drag-fill.js":function(a,b,c){"use strict";var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H=this&&this.__extends||function(){var a=function(b,c){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])})(b,c)};return function(b,c){a(b,c);function d(){this.constructor=b}b.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)}}();Object.defineProperty(b,"__esModule",{value:!0}),d=c("Common"),e=c("Core"),f=c("./dist/plugins/fill/fill.js"),g=c("./dist/plugins/fill/fill.ns.js"),h=c("CalcEngine"),i=!!h,j=d.Common.j.Fa,k=null,l=e.kf,m=e.GC$,n=Math.max,o=Math.floor,p=e.Commands.ActionBase,q=e.Commands.xy,r=e.Commands.Bu,s=2047,t="startRange",u="fillRange",v="autoFillType",w="fillDirection",x="cancel",y="fill",z="dragDrop",A=m.isEmptyObject,B=new d.Common.ResourceManager(g.SR),C=B.getResource.bind(B);function I(a){return a.rowCount}function J(a){return a.colCount}function K(a,b){return a.getRowCount(b)}function L(a,b){return a.getColumnCount(b)}function M(a,b,c,d){return!!(a&&b&&b.containsRange(a))&&(!j(c)&&(1===c&&a.row===b.row&&I(a)===I(b)||0===c&&a.col===b.col&&J(a)===J(b))||!(j(d)||(2!==d&&3!==d||a.col!==b.col||J(a)!==J(b))&&(0!==d&&1!==d||a.row!==b.row||I(a)!==I(b))))}D={fillAuto:function(a,b,c){if(!b)throw Error(C().Exp_RangeIsNull);var e=this,g=c.fillType,h=c.series,i=c.direction,l=c.step,m=c.stop,n=new f.z$(e);if(M(a,b,i?k:h,i)){e.suspendPaint(),a&&(e.mm.A$=a);try{4===g?n.B$(b,h,!1,c.withTag,c.withoutStyle):0===g?n.C$(b,i):1===g||2===g?n.D$(1===g,b,h,l,m):3===g&&n.E$(b,h,3,l,j(m)?k:d.Common.l.Ra(m),c.unit)}finally{e.resumePaint()}}}},m.extend(e.Worksheet.prototype,D),e.Worksheet.$n(y,{init:function(){this.Fyb=new f.Gyb(this)},setHost:function(a){if(a){var b=this.wu();b[y]||b.register(y,e.Commands[y]),b[z]||b.register(z,e.Commands[z])}},dispose:function(a){if(a.clearCache!==!1){var b=this;b.Fyb&&(b.Fyb.no(),b.Fyb=k)}}}),E=function(a){H(b,a);function b(b,c){var d=a.call(this)||this,f=d,g=c[w],h=0===g,i=h||1===g,j=c[u],k=c[t],m=k.row,n=k.col,o=I(k),p=J(k);return f.kj=b,f.G$=c,4===c[v]?f.H$=new e.Commands.OA(b,{ranges:[c[u]]}):i?f.I$=l(m,h?j.col:n,o,p+J(j)):f.I$=l(2===g?j.row:m,n,o+I(j),p),f.J$=i?1:0,d}return b.prototype.canExecute=function(){var a=this,b=a.kj,c=a.G$,d=c[t],e=c[u];return!!b.Y3(e.row,e.col,I(e),J(e))&&(4===c[v]||!e.intersect(d.row,d.col,I(d),J(d)))},b.prototype.execute=function(){var a,b,c,d,f,g,h=this;if(h.canExecute()){a=h.G$,b=a[u],c=h.kj,c.ITa.startTransaction(),h.Lz(c,!0);try{i&&c.suspendCalcService(),d=c.getSelections(),c.isDirtySuspended()||(h.N$=new q(c,a[u],s)),4===a[v]?h.K$(c):h.L$(c),c.yu(d,c.getSelections())&&c.Au(d)}finally{h.Mz(c,!0),f=e.Commands.bWa(c.name()),a[f]=c.ITa.endTransaction(),i&&c.resumeCalcService(!1),c.t4&&c.t4(b.row,b.col,I(b),J(b)),g=[],c.isDirtySuspended()||(h.M$=new q(c,b,s),h.M$.uy(h.N$.sy()),g=h.M$.wy()),r(c,b.row,b.col,I(b),J(b),g,1)}}},b.prototype.K$=function(a){var b,c,d,e,f,g,h,i,j,k=this;k.H$.execute(a),b=k.G$,c=b[t],d=b[u],e=0===k.J$,g=I(c),h=J(c),i=e?n(1,g-I(d)):g,j=e?h:n(1,h-J(d)),c.equals(d)||(f=l(c.row,c.col,i,j),a.Kr(n(a.ar(),f.row),n(a.$q(),f.col),a.Nr,a.Pr),a.Tr(),a.addSelection(f.row,f.col,I(f),J(f)))},b.prototype.L$=function(a){var b,c,d,e,f,g,h=this,i=h.kj,j=h.G$[t],k=h.G$[u],l=h.G$[v],m=h.I$,p={fillType:4,series:h.J$,withTag:!0};try{i.tables&&i.tables.hIb(m)}catch(a){return i.Os(6,a.message),void i.resumePaint()}if(1===l){if(i.fillAuto(j,m,p),i.ITa.MTa(j.row,j.col,j.rowCount,j.colCount))for(b=0;b0?b:a.ar(),g=c>0?c:a.$q(),a.Kr(f,g,a.Nr,a.Pr)}function O(a){var b=a.parent,c=b.getActiveSheet();c&&a!==c&&c.repaint()}G=function(a){H(b,a);function b(b,c){return a.call(this,b,c)||this}return b.prototype.canExecute=function(){var a,b,c,d=this,e=d.kj,f=d.VQ,g=f.fromRow,h=f.fromColumn,i=I(f),j=f.columnCount,l=f.toRow,m=f.toColumn,n=!f.copy,o={row:g,col:h,rowCount:i,colCount:j},p={row:l,col:m,rowCount:i,colCount:j};return(!e.tables||!e.tables.zxb(e,o,e,p,n))&&(!!e.pu(g,h,i,j,K(e),L(e))&&(!(!f.insert&&!e.pu(l,m,i,j,K(e),L(e)))&&(a=l>=0&&m<0&&g>=0&&h<0&&i>0&&j<0,b=l<0&&m>=0&&g<0&&h>=0&&i<0&&j>0,c=d.KZa(a,b),e.Y3(l,m,i,j,k,k,c)&&e.Y3(g,h,i,j,k,k,c))))},b.prototype.KZa=function(a,b){var c,d,e=this,f=e.VQ,g=e.kj,h=f.insert,i=g.options.isProtected,j=g.options.protectionOptions;return!(!i||A(j)||(c=j.allowDragInsertRows,d=j.allowDragInsertColumns,!h||!(c&&a||d&&b)))},b.prototype.execute=function(){var a,b,c,d,f,g,h,i,j,k,l,m,n,o,p,q,r=this,s=!1;if(r.canExecute()){a=r.kj,b=r.VQ,r.oUa(),c=void 0,d=void 0,f=void 0,g=b.fromRow,h=b.fromColumn,i=b.toRow,j=b.toColumn,k=I(b),l=b.columnCount,m=b.option,n=a.parent.sheets,e.Commands.Zxb(n),r.Lz(a,!0),a.vxb=!0;try{try{a.tables&&a.tables.hIb(new e.Range(i,j,k,l),new e.Range(g,h,k,l))}catch(b){return a.Os(6,b.message),void a.resumePaint()}b.insert?h>=0&&g<0?(c=h,d=j,f=l,o=j,a.addColumns(d,f),b.copy?a.copyTo(-1,d<=c?c+f:c,-1,d,-1,f,m):(a.moveTo(-1,d<=c?c+f:c,-1,d,-1,f,m),a.deleteColumns(d<=c?c+f:c,f),c=0&&h<0&&(c=g,d=i,f=k,p=i,a.addRows(d,f),b.copy?a.copyTo(d<=c?c+f:c,-1,d,-1,f,-1,m):(a.moveTo(d<=c?c+f:c,-1,d,-1,f,-1,m),a.deleteRows(d<=c?c+f:c,f),c0&&(this.VQ.tableNamesObj={r:c,c:d,rc:e,cc:f,tableNames:h}),g.uy(b.sy()),r(a,c,d,e,f,g.wy(),0,h),g},b.prototype.oUa=function(){var a=this,b=a.kj,c=a.VQ,d=c.io={},e=c.fromRow,f=c.fromColumn,g=c.toRow,h=c.toColumn,i=c.option,j=e<0?0:e,k=f<0?0:f,m=g<0?0:g,n=h<0?0:h,o=e<0?K(b):I(c),p=f<0?L(b):c.columnCount;c.insert||b.isDirtySuspended()||(c.copy||(d.cA=new q(b,l(j,k,o,p),i)),d.fA=new q(b,l(m,n,o,p),i)),d.rA=b.Nr,d.sA=b.Pr,d.tA=b.Jl,d.uA=b.Kl},b.prototype.undo=function(){var a,b,c,d,f,g,h,i,j,k,l,m,n,o,p,q,s,t,u,v,w,x,y,z=this;if(z.canUndo()){if(a=z.kj,b=z.VQ,c=b.fromRow,d=b.fromColumn,f=b.toRow,g=b.toColumn,h=I(b),i=b.columnCount,!a.pu(c,d,h,i,K(a),L(a)))return!1;if(!b.insert&&!a.pu(f,g,h,i,K(a),L(a)))return!1;j=void 0,k=b.io,z.Lz(a,!0),l=a.parent.sheets,e.Commands._xb(l,b);try{b.insert?d>=0&&c>=0||(d>=0?(m=d,j=i,a&&N(a,-1,m,K(a),j)):c>=0&&(j=h,n=c,a&&N(a,n,-1,j,L(a)))):(o=c<0?0:c,p=d<0?0:d,q=f<0?0:f,s=g<0?0:g,t=c<0?K(a):h,u=d<0?L(a):i,a&&(N(a,c,d,h,i),v=b.tableNamesObj,w=[],x=[],v&&(v.r===q&&v.c===s&&v.rc===t&&v.cc===u?x=v.tableNames:w=v.tableNames),r(a,q,s,t,u,k.dA?k.dA.wy():[],0,w),r(a,o,p,t,u,k._z?k._z.wy():[],0,x))),a&&(k.tA!==-1&&k.uA!==-1&&(y=a.getSelections()[0],y.contains(k.tA,k.uA)?a.Jr(k.tA,k.uA):a.Jr(y.row,y.col)),k.rA!==-2&&k.sA!==-2&&k.tA!==-1&&k.uA!==-1&&a.showCell(k.tA,k.uA,3,3))}finally{z.Mz(a,!0)}O(a)}return!0},b}(p),e.Commands[y]={canUndo:!0,execute:function(a,b,c){return e.Commands.h4(a,F,b,c)}},e.Commands[z]={canUndo:!0,execute:function(a,b,c){return e.Commands.h4(a,G,b,c)}}},"./dist/plugins/fill/fill-event.js":function(a,b,c){"use strict";var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A;Object.defineProperty(b,"__esModule",{value:!0}),d=c("Common"),e=c("Core"),f=c("SheetsCalc"),g=c("./dist/plugins/fill/fill-ui.js"),h=c("./dist/plugins/fill/fill.js"),i=c("./dist/plugins/fill/fill.ns.js"),j=c("CalcEngine"),k=!!j,l=e.GC$,m=e.kf,n=d.Common.j.Fa,o=null,p=void 0,q=Math.min,r=Math.abs,s=Math.max,t=5,u=3,v="drag",w="corner",x="black",y=2047,z=new d.Common.ResourceManager(i.SR),A=z.getResource.bind(z);function B(a){return a.rowViewportIndex}function C(a){return a.colViewportIndex}function D(a){return a.frozenRowCount()}function E(a){return a.frozenColumnCount()}function F(a){return a.hitTestType}function G(a,b){return a.getRowCount(b)}function H(a,b){return a.getColumnCount(b)}function I(a){return a.colCount}function J(a){return a.rowCount}function K(a){return a.height}function L(a){return a.width}function M(a,b,c,d,f){a.save();var g,h,i;b===d?(a.rect(b-2,c,7,r(f-c)),a.clip(),a.beginPath(),c=g.row+J(g)&&(h=g.row+J(g)-1),i=g.col+I(g)&&(i=g.col+I(g)-1),f.hitRow=h,f.hitCol=i,f.rowOffset=h-g.row,f.colOffset=i-g.col,j.rG={KG:B(a),MG:C(a),sG:F(a)},j.qG()))},AG:function(){var a,b,c,d,e,f,g,h,i,j,k=this;k.rG&&k.OG&&k.zG&&k.L_&&(a=k.$F,b=k.gA,c=k.kj.getCellRect(b.hitRow,b.hitCol),d=c.width/2,e=c.x+d,f=c.height/2,g=c.y+f,b.hitTarget={x:a.x,y:a.y},h=k.fH(),i=k.gH(),j=!1,(r(e-a.x)>d+5||r(g-a.y)>f+5)&&(j=!0),h>=0&&i>=0&&j&&k.M_(h,i),k.NG())},M_:function(a,b){var c,d,e,f,g,h,i,j,k=this;k.zG&&k.L_&&(c=k.kj,d=k.gA,e=c.Ix(),e.row===-1&&e.col!==-1?(d.row=-1,d.col=s(0,q(H(c)-I(d),b-d.colOffset))):e.row!==-1&&e.col===-1?(d.row=s(0,q(G(c)-J(d),a-d.rowOffset)),d.col=-1):(d.row=d.row<0?-1:s(0,q(G(c)-J(d),a-d.rowOffset)),d.col=d.col<0?-1:s(0,q(H(c)-I(d),b-d.colOffset))),d.hitRow=a,d.hitCol=b,f=c.Tq(d),g=k.N_,g&&f.row===g.row&&f.col===g.col&&J(f)===J(g)&&I(f)===I(g)&&f.row>c.ar()&&f.col>c.$q()&&f.row+J(f)-1=0?(h=l=f.BAND_INDEX_CONST,i=a.col-e,m=a.col-e+I(c)-1):c.col===-1&&c.row>=0?(i=m=f.BAND_INDEX_CONST,h=a.row-d,l=a.row-d+J(c)-1):c.row>=0&&c.col>=0&&(h=a.row-d,l=a.row-d+J(c)-1,i=a.col-e,m=a.col-e+I(c)-1),g=j.uf(o,o,h,i,l,m,!0,!0,!0,!0,d,e)),b.Cf().unparse(b.yj(),g,d,e)):p},wH:function(){var a,b,c,d,f,g,h,i,j,l,n,p,q,r=this,s=!1,t="",u=!1,v=r.kj;r.rG=o,r.RG(),b=v.Ix(),a=b&&(J(b)>0||I(b)>0)?{r:b.row,c:b.col,rc:J(b),cc:I(b)}:{r:v.Jl,c:v.Kl,rc:1,cc:1},r.zG===!0&&r.OG===!0&&(c=a.r,d=a.c,f=a.rc,g=a.cc,h=r.gA.row,i=r.gA.col,j=v.options.protectionOptions,l=void 0,n={fromRow:c,fromColumn:d,rowCount:f,columnCount:g,toRow:h,toColumn:i,isDragInsert:r.OH,isDragCopy:r.PH},v.Wq(e.Events.BeforeDragDrop,n),t=n.invalidMessage,t&&0!==t.length||(!r.OH||c!==-1&&d!==-1?h===c&&i===d||((v.qu(c,d,f,g)||v.qu(h,i,f,g))&&(s=!0,t=A().Exp_ChangeMergedCell),s||k&&(v.Ns(c,d,f,g)||v.Ns(h,i,f,g))&&(s=!0,t=A().Exp_ChangePartOfArray),!s&&v.options.isProtected&&(!r.PH&&v.ou(m(c,d,f,g))||v.ou(m(h,i,f,g)))&&(s=!0,t=A().Exp_CellReadOnly),s||(l=N(v,!0,c,d,h,i,f,g,r.PH,!1,y),l||(u=v.wu().execute({cmd:"dragDrop",sheetName:v.name(),fromRow:c,fromColumn:d,toRow:h,toColumn:i,rowCount:f,columnCount:g,copy:r.PH,insert:!1,option:y}),N(v,!1,c,d,h,i,f,g,r.PH,!1,y)))):d>=0?(r.PH&&(i<=d||i>=d+g)||!r.PH&&(id+g))&&((v.qu(-1,d,-1,g)||v.qu(-1,i,-1,0))&&(s=!0,t=A().Exp_ChangeMergedCell),p=j&&j.allowDragInsertColumns,!s&&v.options.isProtected&&p!==!0&&(s=!0,t=A().Exp_ColumnReadOnly),s||(l=N(v,!0,-1,d,-1,i,-1,g,r.PH,!0,y),l||(u=v.wu().execute({cmd:"dragDrop",sheetName:v.name(),fromRow:-1,fromColumn:d,toRow:-1,toColumn:i,rowCount:-1,columnCount:g,copy:r.PH,insert:!0,option:y}),N(v,!1,-1,d,-1,i,-1,g,r.PH,!0,y)))):c>=0&&d<0&&(r.PH&&(h<=c||h>=c+f)||!r.PH&&(hc+f))&&((v.qu(c,-1,f,-1)||v.qu(h,-1,0,-1))&&(s=!0,t=A().Exp_ChangeMergedCell),s||k&&(v.Ns(c,-1,f,-1)||v.Ns(h,-1,0,-1))&&(s=!0,t=A().Exp_ChangePartOfArray),q=j&&j.allowDragInsertRows,!s&&v.options.isProtected&&q!==!0&&(s=!0,t=A().Exp_RowReadOnly),s||(l=N(v,!0,c,-1,h,-1,f,-1,r.PH,!0,y),l||(u=v.wu().execute({cmd:"dragDrop",sheetName:v.name(),fromRow:c,fromColumn:-1,toRow:h,toColumn:-1,rowCount:f,columnCount:-1,copy:r.PH,insert:!0,option:y}),N(v,!1,c,-1,h,-1,f,-1,r.PH,!0,y)))))),r.OG=!1,r.zG=!1,r.L_=o,r.OH=!1,r.PH=!1,r.N_=o,r.xw(),u||(r.gA={},v.repaint()),s&&v.Os(3,t)},hG:function(a){var b=this;b.BG!==!0&&b.OG!==!0&&(b.P_(),b.A$&&(b.OG=!0,b.BG=!0,b.$I=!0,b.Q_=a,b.R_=C(a),b.S_=B(a),b.T_=C(a),b.U_(),b.rG={KG:B(a),MG:C(a),sG:F(a)},b.qG()))},U_:function(){var a,b=this,c=D(b.kj),d=E(b.kj),e=b.V_();e>=0&&e=c&&e<=G(b.kj)&&(b.W_=1),b.X_()?b.Y_=1:b.Y_=b.Q_,a=b.Z_(),a>=0&&a=d&&a<=H(b.kj)&&(b.__=1),b.a0()?b.b0=1:b.b0=b.R_},CG:function(){var a,b,c,d=this;d.rG&&d.BG&&d.OG&&d.A$&&(d.S_=d.iH(),d.T_=d.jH(),d.c0=d.fH(),d.d0=d.gH(),d.c0>=0&&d.d0>=0&&(d.e0(),d.f0(),a=d.kj.parent,b=!1,c=d.g0(),c&&(b=d.h0(d.A$,d.A_,!0)),a&&a.options.showDragFillTip&&b&&d.i0(),d.j0()),d.NG())},k0:function(){var a,b,c,e,f,g,i,j,k,l,m,n,p,q=this,r=q.kj,s=q.A$,t=q.A_,u=r.parent.options.defaultDragFillType,v=q.l0(3===u?5:u),w=q.m0(),x=q.g0();return 1===v?(a=0===w||1===w?1:0,c=new h.z$(r),e=c.B$(x,a,!0),b=q.n0(w,t,s),f=r.getActualStyle(b.row,b.col),g=f.cellType||r.Al(),i=f.formatter?f.formatter:f._autoFormatter,j=d.Formatter&&d.Formatter.GeneralFormatter,e instanceof Date&&j&&(i=new j(d.Common.CultureManager.q4().DateTimeFormat.shortDatePattern+" hh:mm:ss AM/PM;@","0")),k=q.rG,l=3,k&&(l=k.sG),m={sheet:r,row:b.row,col:b.col,sheetArea:l,quotePrefix:f.quotePrefix},n={},g.format(e,i,n,m)):0===v?(b=q.n0(w,t,s),p=r.getFormula(b.row,b.col),p?o:r.getText(b.row,b.col)):o},n0:function(a,b,c){var d,e=c.row,f=c.col,g=J(c),h=I(c),i=m(e,f,1,1);return 3===a?(d=J(b)%g,d=0===d?e+g-1:e+d-1,i.row=d,i.col=f):1===a?(d=I(b)%h,d=0===d?f+h-1:f+d-1,i.row=e,i.col=d):0===a?(d=I(b)%h,d=0===d?f:f+h-d,i.row=e,i.col=d):2===a&&(d=J(b)%g,d=0===d?e:e+g-d,i.row=d,i.col=f),i},i0:function(){var a,b,c,d,e,f,g=this,h=g.kj,i=g.l0();return 4===i||g.a0()||g.X_()?(g.xw(),o):(d=g.m0(),e=g.g0(),f=h.cm(e),c=g.k0(),3===d||1===d?(a=f.x+f.width+u,b=f.y+f.height+u):0===d?(a=f.x+u,b=f.y+f.height+u):2===d&&(a=f.x+f.width+u,b=f.y+u),void g.uw(c,a,b))},j0:function(){var a=this;a.o0(),a.p0(),a.q0(),a.r0=a.g0()},o0:function(){var a,b=this.kj;this.r0&&(a=b.cm(this.r0),a.x-=2,a.y-=2,a.width+=4,a.height+=4,b.yl.dm(a))},p0:function(a){var b=this.kj;b.yl.im(this.A$,o,a)},q0:function(){var a,b,c=this.kj,d=c.yl,e=this.g0();e&&(a=d.bm(),b=c.cm(e),a.save(),a.beginPath(),d.RI(a,b),a.restore())},f0:function(){this.A_=this._I()},a0:function(){return this.A$.col===-1&&this.A$.row!==-1},X_:function(){return this.A$.row===-1&&this.A$.col!==-1},ZI:function(){return 4===this.dJ||5===this.dJ},_I:function(){var a=this,b=-1,c=-1,d=-1,e=-1;switch(a.dJ){case 0:a.X_()?(b=-1,d=-1):(b=a.V_(),d=J(a.A$)),c=a.d0,e=a.Z_()-c;break;case 1:a.X_()?(b=-1,d=-1):(b=a.V_(),d=J(a.A$)),c=a.s0()+1,e=a.d0-c+1;break;case 2:b=a.c0,d=a.V_()-b,a.a0()?(c=-1,e=-1):(c=a.Z_(),e=I(a.A$));break;case 3:b=a.t0()+1,d=a.c0-b+1,a.a0()?(c=-1,e=-1):(c=a.Z_(),e=I(a.A$));break;case 5:b=a.c0,d=a.t0()-b+1,a.a0()?(c=-1,e=-1):(c=a.Z_(),e=I(a.A$));break;case 4:a.X_()?(b=-1,d=-1):(b=a.A$.row,d=J(a.A$)),c=a.d0,e=a.s0()-c+1}return m(b,c,d,e)},u0:function(){var a=this.t0();return a!==-1?this.kj.Gr(this.Y_).findRow(a):o},v0:function(){return this.kj.Gr(this.S_).findRow(this.w0())},w0:function(){return this.kj.getViewportBottomRow(this.S_)},x0:function(){var a=this.s0();return a!==-1?this.kj.Hr(this.b0).findCol(a):o},y0:function(){return this.kj.Hr(this.T_).findCol(this.z0())},z0:function(){return this.kj.getViewportRightColumn(this.T_)},e0:function(){var a,b,c,d,e,f,g,h,i,j,k,m,n,o,p,s,t,u,v,w,x=this,y=x.a0(),z=x.X_(),A=l(x.kj.Ws()).offset(),B=x.$F.e,C=x.$F.x,D=x.$F.y,E=B.pageX-A.left,F=B.pageY-A.top,G=!1;y||z?z?x.d0>=x.Z_()&&x.d0<=x.s0()?x.dJ=4:x.d0x.s0()&&(x.dJ=1):y&&(x.c0>=x.V_()&&x.c0<=x.t0()?x.dJ=5:x.c0x.t0()&&(x.dJ=3)):x.c0>=x.V_()&&x.c0<=x.t0()?x.d0>=x.Z_()&&x.d0<=x.s0()?(a=r(x.d0-x.s0()),b=r(x.c0-x.t0()),b>a?x.dJ=5:bc.y+c.height?x.dJ=3:(d=x.x0(),d||(d=x.y0()),e=d.x+d.width-C,f=c.y+c.height-D,E>=d.x&&E<=d.x+d.width&&F>=c.y&&F<=c.y+c.height?e>=f?x.dJ=4:x.dJ=5:G=!0))):x.d0x.s0()&&(x.dJ=1):x.c0=x.Z_()&&x.d0<=x.s0()?x.dJ=2:x.d0=a?x.dJ=2:x.dJ=0):x.d0>x.s0()&&(a=r(x.d0-x.s0()),b=r(x.c0-x.V_()),b>=a?x.dJ=2:x.dJ=1):x.c0>x.t0()&&(x.d0>=x.Z_()&&x.d0<=x.s0()?x.dJ=3:x.d0=a?x.dJ=3:x.dJ=0):x.d0>x.s0()&&(a=r(x.d0-x.s0()),b=r(x.c0-x.t0()),b>=a?x.dJ=3:x.dJ=1)),g=x.kj.yl.rH,g&&(h=x.t0(),i=x.s0(),j=h+1,k=i+1,m=x.kj.getRowHeight(h,3),n=x.kj.getColumnWidth(i,3),o=x.kj.getRowHeight(j,3),p=x.kj.getColumnWidth(k,3),s=g.x+g.width/2-q(10,n/2),t=g.x+g.width/2+q(10,p/2),u=g.y+g.height/2-q(10,m/2),v=g.y+g.height/2+q(10,o/2),w=!1,w=y||z?z?s<=E&&E<=t:u<=F&&F<=v:s<=E&&E<=t&&u<=F&&F<=v,w||G?(x.$I=!0,x.dJ=4):x.$I=!1)},V_:function(){return this.A$?this.A$.row===-1?0:this.A$.row:-1},t0:function(){var a=this;return a.A$?a.A$.row===-1?G(a.kj)-1:a.A$.row+J(a.A$)-1:-1},Z_:function(){return this.A$?this.A$.col===-1?0:this.A$.col:-1},s0:function(){var a=this;return a.A$?a.A$.col===-1?H(a.kj)-1:a.A$.col+I(a.A$)-1:-1},hla:function(a,b){var c,d,e,f,g,h,i=m(b.row,b.col,b.rowCount,b.colCount),j=this.kj;return j.ITa.findSpan(a.row,a.col)&&(c=a.rowCount,d=i.rowCount,0!==Math.floor(d%c)&&(e=Math.ceil(d/c)*c,i.row+e<=j.getRowCount()&&(i.rowCount=e)),f=a.colCount,g=i.colCount,0!==Math.floor(g%f)&&(h=Math.ceil(g/f)*f,i.col+h<=j.getColumnCount()&&(i.colCount=h))),i},xH:function(){var a,b,c,d,e,f,g=this,h=g.kj;return g.rG=o,g.RG(),g.xw(),g.BG&&g.OG?(g.BG=!1,g.OG=!1,a=g.g0(),void(a&&(b=g.h0(g.A$,g.A_),!b||g.$I?(g.A0(),g.WA(a)):(c=h.mm.A$,d=g.hla(c,g.A_),e=g.l0(),h.wu().execute({cmd:"fill",sheetName:h.name(),startRange:c,fillRange:d,autoFillType:e,fillDirection:h.mm.m0()}),f=g._$,!f&&g.B0()&&h.parent.options.showDragFillSmartTag&&4!==g.$$?g.C0(g.$$):g.WA(a),g.A0())))):void g.A0()},C0:function(a){var b=this.kj,c=b.yl.rH,d={x:c.x+c.width,y:c.y+c.height,fillType:a};b.NF=new g.K_(b.parent.xv(),b,d),b.NF.OT()},P_:function(){var a=this.kj,b=a.ITa.getSelections();1===b.length?this.A$=b[0]:a.Jl>=0&&a.Kl>=0&&(this.A$=m(a.Jl,a.Kl,1,1))},A0:function(){this.OG=!1,this.BG=!1},WA:function(a){this.kj.yl.im(a)},l0:function(a){var b,c=this,d=c.kj,e=a!==p?a:d.parent.options.defaultDragFillType;return c.ZI()?4:5!==e?e:(b=1===J(c.A$)&&1===I(c.A$)&&!c.X_()&&!c.a0(),b?c.RH?1:0:c.RH?0:1)},g0:function(){var a,b,c,d,e=this;return e.A$?e.ZI()?e.A$:e.A_?(a=0,b=0,c=0,d=0,e.D0()?(a=2===e.dJ?e.A_.row:e.A$.row,b=J(e.A$)+J(e.A_),c=e.A$.col,d=I(e.A$)):(a=e.A$.row,b=J(e.A$),c=0===e.dJ?e.A_.col:e.A$.col,d=I(e.A$)+I(e.A_)),m(a,c,b,d)):o:o},h0:function(a,b,c){var d=this.kj,e=!0,f="";return d.ITa.MTa(b.row,b.col,J(b),I(b))&&!P(d,a,b)&&(e=!1,f=A().Exp_FillRangeContainsMergedCell),e&&d.options.isProtected&&d.ou(b)&&(e=!1,f=A().Exp_FillCellsReadOnly),e||c||d.Os(2,f),e},B0:function(){return this.E0()||this.F0()},E0:function(){return 3===this.dJ||1===this.dJ},F0:function(){return 0===this.dJ||2===this.dJ},D0:function(){return 2===this.dJ||3===this.dJ||5===this.dJ},m0:function(){var a=this.dJ;return a>=0&&a<=3?a:4===a?0:5===a?2:3},tr:function(a,b,c){var d,e,f,g=this,h=o,i=B(a),j=C(a),k=g.kj,l=k.parent;if(n(i)||n(j)||!l.options.allowUserDragDrop&&!l.options.allowUserDragFill)return h;if(d=k.Ix(),d.row===-1&&d.col===-1)return h;if(i>=0&&j>=0&&1===k.ITa.getSelections().length){if(g.qH(i,j,b,c))return h;e=k.getRangeRect(i,j,d),e.x-4e.x+e.width||ce.y+e.height)&&(h.outside=!0)}return l&&l.options.allowUserDragDrop||h&&h.side!==w&&(h.side=o),l&&l.options.allowUserDragFill||h&&h.side===w&&(h.side=o),h},Hyb:function(a,b){var c=this,d=c.kj,e=d.getSpan(a,b,3);return e?!n(c.kj.getValue(e.row,e.col,3,0)):!n(c.kj.getValue(a,b,3,0))},Iyb:function(a,b,c,d){var e,f=this;for(e=b;e=d-n.searchLength;i--)if(k.Hyb(c+m,i)){m++,g=!1;break}if(g){for(j=e+1;j<=e+o.searchLength;j++)if(k.Hyb(c+m,j)){m++,h=!0;break}if(!h)return m}}return m},Myb:function(a){for(var b=this,c=0;b.Iyb(a.row+a.rowCount+c,a.col,1,a.colCount);)c++;return c},Nyb:function(a){var b,c,d,e,f=this;return f.Iyb(a.row+a.rowCount,a.col,1,a.colCount)?f.Myb(a):(d=a.row-2,e=a.row+a.rowCount,1===a.colCount?c=b=a.col:(b=a.col,c=a.col+a.colCount-1),f.Lyb(a,d,e,b,c))},cyb:function(){var a,b,c,d=this,e=d.kj,f=e.mm.A$,g=d.Nyb(f);0!==g&&(a=m(f.row+f.rowCount,f.col,g,f.colCount),d.dJ=3,d.A_=a,b=d.l0(),c=d._$,e.wu().execute({cmd:"fill",sheetName:e.name(),startRange:f,fillRange:a,autoFillType:b,fillDirection:d.dJ}),!c&&e.parent.options.showDragFillSmartTag&&4!==d.$$&&d.C0(d.$$))}}),l.extend(e.oJ.prototype,{gJ:function(a,b){var c,d=this.kj,f=a.x,g=a.y,h=L(a),i=K(a),j=d.Ix(),k=d.am(),l=4,m=-2.5;return b>2007&&(l=5,m=-3),c=new e.Rect((-4),(-4),l,l),j.col===-1?(c.x=k.kt,c.y=g+i+m):j.row===-1?(c.x=f+h+m,c.y=k.nt):(c.x=f+h+m,c.y=g+i+m),c},eJ:function(a,b,c,d,f){var g,h,i=this,j=i.kj,k=j.am(),l=j.parent,m=l&&l.Vv,n=i.gJ(d,m),o=n.x,p=n.y,q=L(n),r=K(n),t=k.Ft(b,c);f&&!n.intersectRect(f)||n.intersectRect(t)&&(g=-1.5,m>2007&&(g=-1),h=new e.Rect(o+g,p+g,q+2,r+2),h.x=s(h.x,t.x),h.y=s(h.y,t.y),i.dm(h),a.save(),f&&!f.containsRect(n)&&(a.rect(f.x,f.y,L(f),K(f)),a.clip()),a.beginPath(),a.fillStyle=e.Rm.Om(j,j.getSelectionBorderColor()),a.fillRect(o,p,q,r),i.rH=new e.Rect(n.x,n.y,4,4),a.beginPath(),a.restore())},RI:function(a,b){var c=b.x,d=b.y,e=c+L(b),f=d+K(b);M(a,c,d,e,d),M(a,c,f,e,f),M(a,c,d,c,f),M(a,e,d,e,f)},NI:function(a,b){var c,d,f,g,h,i,j,k,l,m,n,o=this,p=o.kj,q=p.mm.gA,r=q.hitTarget;q&&r&&(c=q.hitCol,d=q.hitRow,f=p.mm.OH,g=p.OI,a.save(),f!==!0||q.row!==-1&&q.col!==-1?(g&&(h=new e.Rect(g.x-2,g.y-2,L(g)+4,K(g)+4),o.dm(h,b),o.im(p.Ix(),b)),a.rect(b.x,b.y,L(b),K(b)),a.clip(),a.beginPath(),o.RI(a,q)):q.row===-1&&q.col!==-1?(i=p.Hr(0).findCol(c),i||(i=p.Hr(1).findCol(c)),i||(i=p.Hr(2).findCol(c)),i&&(j=i.x,k=L(i),q.col=c,r.x>j+k/2&&(q.colm+n/2&&(q.row0&&p.col+p.colCount<=h&&d.x+L(d)>j.x+L(j)&&d.intersectRect(j)&&(d=d.getIntersectRect(j)),g>0&&p.row+p.rowCount<=i&&d.y+K(d)>j.y+K(j)&&d.intersectRect(j)&&(d=d.getIntersectRect(j)),k=new e.Rect(b.kt,b.nt,b.lt+b.js,b.ot+b.gs),L(d)>0&&K(d)>0?(c.x=d.x,c.y=d.y,c.width=L(d)-1,c.height=K(d)-1,m.NI(a,k)):0!==L(d)&&0!==K(d)||(c.x=d.x,c.y=d.y,c.width=L(d),c.height=K(d),m.NI(a,k)),l=n.mm.OH,l===!0?n.OI=n.QI:n.OI=new e.Rect(c.x,c.y,L(c),K(c)))}})},"./dist/plugins/fill/fill-ui.js":function(a,b,c){"use strict";var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M=this&&this.__extends||function(){var a=function(b,c){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])})(b,c)};return function(b,c){a(b,c);function d(){this.constructor=b}b.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)}}();Object.defineProperty(b,"__esModule",{value:!0}),d=c("Common"),e=c("Core"),f=c("./dist/plugins/fill/fill.ns.js"),g=e.GC$,h=e.Ul.Nl,i=e.Ul.vl,j=g(document),k=" btn btn-default",l="ui-state-hover ",m="gc-fill-type-item",n="gc-fill-menu-container",o=l+"gc-smartMenu-item-hover",p=l+"gc-smart-tag-hover",q="ui-icon ui-icon-check gc-check-image",r="gc-menu-item-input",s="ui-state-active gc-smart-tag-active",t="gc-tag-container",u="float",v="left",w="top",x="display",y="width",z="height",A="margin",B="change",C="input[type=radio]",D="mouseover",E="mouseout",F="click",G="fillTypeChanged",H="keydown.ui-fill",I=new d.Common.ResourceManager(f.SR),J=I.getResource.bind(I);function N(a,b,c,d,e,f){var i=a.CH,j=i?"160px":"150px",l=i?"25px":"20px",m=g(h("div")).css([x,y,z,"padding",A],["block",j,l,0,0]).addClass("gc-smartMenu-item-default "+c+" ui-state-default"+k),n=g(h("div")).addClass(r).appendTo(m),o=g(h("div")).addClass("gc-menu-item-text").appendTo(m),p=g(h("input")).attr({id:b,value:e,type:"radio",name:"fill-group",style:"display:none"}).appendTo(n);return g(h("span")).text(d).appendTo(o),f?(n.addClass(q),p.prop("checked","checked")):p.prop("checked",""),m}K=function(a){M(b,a);function b(b,c){var d,e=a.call(this,b,i(c.parent.qo))||this;return e.kj=c,e.v_=g("."+t),d=e.w_=e.yo(),d.addClass(n),N(c,"smartMenuCopyCells",m,J().CopyCells,"0",!0).appendTo(d),N(c,"smartMenuFillSeries",m,J().FillSeries,"1").appendTo(d),N(c,"smartMenuFillFormattingOnly",m,J().FillFormattingOnly,"2").appendTo(d),N(c,"smartMenuFillWithoutFormatting",m,J().FillWithoutFormatting,"3").appendTo(d),e}return b.prototype.Ao=function(){a.prototype.Ao.call(this)},b.prototype.QQ=function(){var a,b=this,c=g("."+m);c.bind(D,function(){g(this).addClass(o)}).bind(E,function(){g(this).removeClass(o)}).bind(F,function(){var a,c=g(this),d=b.v_,e=c.find(C),f=e[0];f.checked=!0,e.trigger(B),d.trigger(F),d.trigger(E),c.removeClass(o),a=parseInt(g(f).attr("value"),10),b.x_(a)}),a=b.w_.find(C), a.bind(B,function(){g("."+r).removeClass(q),g(this).parent().addClass(q)})},b.prototype.y_=function(){g("."+m).unbind(D).unbind(E).unbind(F),this.w_.find(C).unbind(B)},b.prototype.x_=function(a){var b=this,c=b.kj,d=c.mm;if(b.z_!==a){b.z_=a,c.U$=!0,c.suspendEvent();try{e.Commands.undo.execute(c.parent,{sheetName:c.name()})}finally{c.resumeEvent()}c.U$=!1,c.wu().execute({cmd:"fill",sheetName:c.name(),startRange:d.A$,fillRange:d.A_,autoFillType:a,fillDirection:d.dJ}),b.v_.trigger(G,a)}},b.prototype.MQ=function(){return!!g("."+n).length},b}(e.Go),L=function(a){M(b,a);function b(b,c,d){var e,f=a.call(this,b,i(c.parent.qo))||this;return f.kj=c,f.B_=d,e=f.C_=f.yo().addClass("gc-smart-tag-default "+t+" gc-no-user-select ui-widget-header"+k),f.D_=g(h("div")).attr("class","fillSmartTag").css(u,v).appendTo(e),f.E_=g(h("div")).attr("class","fillSmartTagDown").css([u,x],[v,"none"]).appendTo(e),f}return b.prototype.F_=function(a,b,c){var d=this,e=d.kj.CH,f=g(b),h=d.G_,i=d.E_,j=e?"38px":"32px",k=e?"24px":"18px";h&&h.MQ()||(a?f.addClass(p):f.removeClass(p),f.css([y,z],[a?j:k,k]),c||(a?i.show():i.hide()))},b.prototype.H_=function(){var a=this,b=a.C_,c=e.Ul.rl(),d=e.Ul.Ml.safari&&(c.ipad||c.iphone);b.bind(D,function(){a.F_(!0,this,d)}).bind(E,function(){a.F_(!1,this,d)}),b.bind(F,function(){var b,c,e=g(this),f=a.G_,h=a.E_,i=f&&f.MQ();i?(d&&h.hide(),e.removeClass(s),a.I_()):(d&&h.show(),e.addClass(s),a.J_(),b=a.w_,c=b&&b.find(C)[a.B_.fillType],c&&!c.checked&&(c.checked=!0,g(c).trigger(B)))}),j.bind(H,function(b){27===b.keyCode&&(a.G_&&a.G_.MQ()?a.I_():a.close(),e.Ul.nl(b))})},b.prototype.OT=function(){var a=this,b=a.C_,c=a.B_,d=a.kj.CH,e=d?"3px":"0px",f=d?"24px":"18px";b&&(b.css([v,w],[c.x,c.y]),a.Ao(),a.H_(),a.D_.css(A,e),a.E_.css(z,f),a.hZ())},b.prototype.J_=function(){var a,b,c,d,e,f,g,h=this,i=h.kj;h.G_||(h.G_=new K(i.parent.xv(),i),h.w_=h.G_.yo()),a=h.C_,b=a.css(v),c=a.css(w),d=parseFloat(c),f=h.G_,g=h.B_,f.z_=g.fillType,isNaN(d)||(e=d+a.height()+2),h.w_.css([v,w],[b,e]),f.Ao(),f.QQ(),f.v_.unbind(G).bind(G,function(a,b){g.fillType=b})},b.prototype.I_=function(){var a=this.G_;a&&(a.y_(),a.close())},b.prototype.hZ=function(){var a=this,b=a.G_,c=a.C_;b&&(b.MQ()&&c.trigger(F),c.trigger(E))},b.prototype.close=function(){var b,c=this,d=c.kj;c.hZ(),j.unbind(H),a.prototype.close.call(this),b=d.Xs,b.style.cursor="default",d&&d.zt()},b}(e.Go),b.K_=L},"./dist/plugins/fill/fill.entry.js":function(a,b,c){"use strict";function d(a){for(var c in a)b.hasOwnProperty(c)||(b[c]=a[c])}Object.defineProperty(b,"__esModule",{value:!0}),c("./dist/plugins/fill/drag-fill.js"),c("./dist/plugins/fill/fill-event.js"),d(c("./dist/plugins/fill/fill-ui.js")),d(c("./dist/plugins/fill/fill.js")),d(c("./dist/plugins/fill/fill.ns.js"))},"./dist/plugins/fill/fill.js":function(a,b,c){"use strict";var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,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=this&&this.__extends||function(){var a=function(b,c){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])})(b,c)};return function(b,c){a(b,c);function d(){this.constructor=b}b.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)}}();Object.defineProperty(b,"__esModule",{value:!0}),d=c("Common"),e=c("Core"),f=c("CalcEngine"),g=c("SheetsCalc"),h=c("./dist/plugins/fill/fill.ns.js"),i=!!f,j=d.Common.j,k=null,l=void 0,m=Math.floor,n=e.kf,o=j.Fa,p=j.Pa,q=d.Common.k,r=q.Eb,s=q.ac,t=d.Common.l,u=t.Ra,v=t.Xb,w="number",x="date",y="string",z="default",A=new d.Common.ResourceManager(h.SR),B=A.getResource.bind(A);function Z(a){return!$(a)&&j.Na(a)}function $(a){return"string"==typeof a}!function(a){a[a.copyCells=0]="copyCells",a[a.fillSeries=1]="fillSeries",a[a.fillFormattingOnly=2]="fillFormattingOnly",a[a.fillWithoutFormatting=3]="fillWithoutFormatting",a[a.clearValues=4]="clearValues",a[a.auto=5]="auto"}(C=b.AutoFillType||(b.AutoFillType={})),function(a){a[a.left=0]="left",a[a.right=1]="right",a[a.up=2]="up",a[a.down=3]="down"}(D=b.FillDirection||(b.FillDirection={})),function(a){a[a.column=0]="column",a[a.row=1]="row"}(E=b.FillSeries||(b.FillSeries={})),function(a){a[a.direction=0]="direction",a[a.linear=1]="linear",a[a.growth=2]="growth",a[a.date=3]="date",a[a.auto=4]="auto"}(F=b.FillType||(b.FillType={})),function(a){a[a.day=0]="day",a[a.weekday=1]="weekday",a[a.month=2]="month",a[a.year=3]="year"}(G=b.FillDateUnit||(b.FillDateUnit={}));function _(a){var b=[a];return b.rowCount=1,b.colCount=s(a),b}function aa(a){return a}function ba(a,b,c,e){var f=_(b),g=_(c),h=_([e]),i=a?d.Common.qc(f,g,h,!0,aa,k,k,k):d.Common.sc(f,g,h,!0,k,k,k),j=i&&i[0][0];return typeof j===w?d.Common.o.Lma(j,13):j}function ca(a){return a.toLowerCase()}H=function(){function a(a){this.e_=[],this.f_=[],this.Oyb=[],this.Nc=k,this.Pyb=[],this.Qyb=k,this.g_=o(a)?-1:a}return a.prototype.h_=function(){return s(this.e_)},a.prototype.Ey=function(){var a=this,b=[],c=a.f_,d,e;for(d=0;d0){for(a=d.g_,b=[],c=void 0,a===-1&&(a=e[0]),c=0;c0)for(b=ca(a[0]),c=this.Uyb(),d=void 0,e=void 0,f=void 0,g=void 0,h=void 0,i=void 0,d=0;d=0){for(h=g,j=f.length,k=void 0,l=void 0,m=void 0,n=1;n=0)){q=!1;break}if(m=k-h+j,i){if(i!==m){q=!1;break}}else q=!0,i=m,h=k}if(o=1===p,q||o){q=!0,this.Ryb=g,this.Syb=e,this.Tyb=o?1:i;break}}return q},a.prototype.ge=function(a){var b=this.Syb,c=this.Ryb,d=this.Tyb,e=b.length,f=ea(a,e),g;return g=(c+d*f)%e,b[g]},a}(),J=function(){function a(){this.Uk="",this.Wyb="",this.Tyb=0,this.Xyb=1,this._padding=""}return a.prototype.ge=function(a){var b=this.Tyb*(a-1)+this.Xyb,c=this._padding.length,d=""+Math.abs(b),e=d.length,f=this._padding+d,g=f.length;return d=e>c?d:f.substr(g-c),this.Uk+d+this.Wyb},a}();function da(a){var b,c,d=a.length,e=1;if(d>1)for(e=a[1]-a[0],c=2;c0?(a-1)%b:b-Math.abs(a)%b-1}function fa(a){for(var b="",c=0;ca.Zyb&&ma(e)&&(a.Zyb=h),f=parseInt(e,10),g=d[j],o(a.Qyb)&&(a.Qyb=g),g!==a.Qyb?(a.$yb=!0,a.Qyb=k,a.Pyb=[]):a.Pyb.push(f),!0)})}K=function(){function a(){}return a.prototype.match=function(a){return!1},a.prototype.getTargetValue=function(a,b,c,d,e){},a.prototype.resetProp=function(){},a.prototype._yb=function(a,b){return a.indexOf(b+1)},a.prototype.dispose=function(){},a}(),L=function(a){Y(b,a);function b(){var b=null!==a&&a.apply(this,arguments)||this;return b.azb=0,b.Nc=x,b}return b}(K),M=function(a){Y(b,a);function b(){return null!==a&&a.apply(this,arguments)||this}return b.prototype.match=function(a){var b=this.azb=ga(a[0],a[1]),c=ha(a),d=a.length,e=!0;return c&&d>2&&(e=ka(a,b)),c&&e},b.prototype.getTargetValue=function(a,b){var c=a.Oyb,d=c[0],e=d.getFullYear(),f=d.getMonth(),g=b-1,h=this.azb,i=f+h*g;return new Date(e+parseInt(i/12,10),i%12,1)},b}(L),N=function(a){Y(b,a);function b(){return null!==a&&a.apply(this,arguments)||this}return b.prototype.match=function(a){var b=this.azb=ga(a[0],a[1]),c=ia(a),d=a.length,e=!0;return c&&d>2&&(e=ka(a,b)),c&&e},b.prototype.getTargetValue=function(a,b){var c=a.Oyb,d=c[0],e=d.getFullYear(),f=d.getMonth(),g=b-1,h=this.azb,i=f+h*g,j=e+parseInt(i/12,10),k=i%12;return new Date(j,k,la(j,k))},b}(L),O=function(a){Y(b,a);function b(){return null!==a&&a.apply(this,arguments)||this}return b.prototype.match=function(a){var b=this.azb=ga(a[0],a[1]),c=ja(a),d=c>0,e=a.length,f=!0;return this.bzb=c,d&&e>2&&(f=ka(a,b)),d&&f},b.prototype.getTargetValue=function(a,b){var c=a.Oyb,d=c[0],e=d.getFullYear(),f=d.getMonth(),g=b-1,h=this.azb,i=f+h*g,j=e+parseInt(i/12,10),k=i%12;return new Date(j,k,this.bzb)},b}(L),P=function(a){Y(b,a);function b(){var b=a.call(this)||this;return b.Yyb=k,b.Pyb=[],b.Qyb=k,b.$yb=!1,b.Zyb=0,b.Nc=y,b.t_=!1,b.czb=!1,b.dzb=new J,b}return b.prototype.resetProp=function(){this.Pyb=[],this.Zyb=0,this.Qyb=k,this.$yb=!1,this.t_=!1,this.czb=!1},b.prototype.getInternal=function(a){var b,c,d=!1,e=a[0];for(c=1;cb.Zyb&&ma(a)&&(b.Zyb=e),d=parseInt(a,10),b.Pyb.push(d),!0)})},b.prototype.getTargetValue=function(a,b,c,d,e){var f=a.Oyb,g=this.dzb,h=da(this.Pyb),i=f.length,j=0!==h,l=j?0:ea(b,i),m=this._yb(c,d),n=k,o;return this.t_=j,this.czb=this.getInternal(a.e_),m!==-1&&(g.Tyb=h,g.Xyb=this.Pyb[l],g._padding=fa(this.Zyb),o=i*e+m+1,n=g.ge(o)),n},b}(P),S=function(a){Y(b,a);function b(){var b=null!==a&&a.apply(this,arguments)||this;return b.Yyb=/^(.*\D+)(\d+)$/,b}return b.prototype.match=function(a){return na(this,a,!1)},b.prototype.getTargetValue=function(a,b,c,d,e){var f=a.Oyb,g=this.dzb,h=da(this.Pyb),i=f.length,j=0!==h,l=j?0:ea(b,i),m=this._yb(c,d),n=k,o;return this.t_=j,this.czb=this.getInternal(a.e_),m!==-1&&(g.Uk=this.Qyb,g.Tyb=h,g.Xyb=this.Pyb[l],g._padding=fa(this.Zyb),o=i*e+m+1,n=g.ge(o)),n},b}(P),T=function(a){Y(b,a);function b(){var b=null!==a&&a.apply(this,arguments)||this;return b.Yyb=/^(\d+)(\D+.*)$/,b}return b.prototype.match=function(a){return na(this,a,!0)},b.prototype.getTargetValue=function(a,b,c,d,e){var f=a.Oyb,g=this.dzb,h=da(this.Pyb),i=f.length,j=0!==h,l=j?0:ea(b,i),m=this._yb(c,d),n=k,o;return this.t_=j,this.czb=this.getInternal(a.e_),m!==-1&&(g.Wyb=this.Qyb,g.Tyb=h,g.Xyb=this.Pyb[l],g._padding=fa(this.Zyb),o=i*e+m+1,n=g.ge(o)),n},b}(P),U=function(a){Y(b,a);function b(){return null!==a&&a.apply(this,arguments)||this}return b.prototype.getTargetValue=function(a,b,c){return ba(!0,a.j_(),c,b)},b}(K),V=function(a){Y(b,a);function b(){var b=null!==a&&a.apply(this,arguments)||this;return b.t_=!0,b}return b.prototype.getTargetValue=function(a,b,c,d){var e=a.Oyb,f=e.length,g=ea(b,f);return e[g]},b}(K),W=function(){function a(a){this.fzb=[new M,new N,new O],this.gzb=[new Q(a),new R,new S,new T],this.hzb=new U,this.izb=new V}return a.prototype.getRule=function(a,b){var c,d,e,f=[],g=this.izb;for(a===x?(f=this.fzb,g=this.hzb):a===y?f=this.gzb:a===w&&(g=this.hzb),c=0;c3,m=0,n=1===b,o=n?G:F,p=n?D:E,q=n?D+F:E+G,r=l?1:o,t=this.kj.mm.A$,u=t.row===D&&t.rowCount===F&&t.col>E||t.col===E&&t.colCount===G&&t.row>D,g=p;g=l;)h=i?g.getValue(a,j):g.getValue(j,b),Z(h)&&(f||(f=new H(l)),f.Eb(0,j,h)),j--;return f},a.prototype.m_=function(a,b,c,d,e,f,g){var h,i,j,k=[],l=b,m=e>=0,n=o(f);for(h=0;h=f,j=l<=f,a&&(n||m&&i||!m&&j)?(k.unshift(l),1===d?l-=e:2===d?l/=e:3!==d||o(g)||(l=this.p_(!0,g,b,l,e,h+1))):!a&&(n||m&&j||!m&&i)&&(k.push(l),1===d?l+=e:2===d?l*=e:3!==d||o(g)||(l=this.p_(!1,g,b,l,e,h+1)));return k},a.prototype.n_=function(a,b,c){var d=[],e,f=1===c;if(f||2===c){for(1===a.h_()&&a.Sb(a.e_[0]+1,f?a.k_(a.f_[0]+1):a.Ey()[0]),e=0;e1&&0===p&&(o-=1,p=v),o>0&&p>0)return q=f?n(s,t+o*v,u,p):n(s,t-o*v+v-p,u,p),i.r_(a,q,d,4,e,f,k,f?0:v-p,l,g,h)}else{if(o=m(b/u),p=b%u,i.AX||(q=n(s+j*u,t,b-u+1,c),i.fLb(a,q,j)),!e)for(r=1;r1&&0===p&&(o-=1,p=u),o>0&&p>0)return q=f?n(s+o*u,t,p,v):n(s-o*u+u-p,t,p,v),i.r_(a,q,d,4,e,f,f?0:u-p,k,!0,g,h)}},a.prototype.r_=function(a,b,c,d,e,f,g,h,i,j,l){var m,n,p,q,r,s,t,u,v,z,A,B,C,D,E,F,G,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W=this,X=W.kj,Y=1===c,_=Y?a.row:a.col,aa=Y?a.col:a.row,ba=Y?b.row:b.col,ca=Y?b.col:b.row,da=Y?a.rowCount:a.colCount,ea=Y?a.colCount:a.rowCount,fa=Y?b.colCount:b.rowCount;for(q=0;q=ca&&(M||Y||!Y&&!(i&&X.Ps&&X.Ps(L)))&&(M&&W.eLb.indexOf(z)!==-1||W.o_(X,v,G,z,I,O,d,j,l));p?u+=Y?p.colCount:p.rowCount:u++}else s.Sb(K,J),p?u+=Y?p.colCount:p.rowCount:u++;if(W.AX)for(P=a.row,Q=a.col,R=a.rowCount,S=void 0,T=void 0,U=f===!1?-1:1,V=0;V0){l.AX=!0;break}}if(k=m.xr,l.AX!==!0&&k&&k.isFiltered&&k.isFiltered()){for(h=l.eLb,i=void 0,j=0;j0&&(l.AX=!0)}},a.prototype.o_=function(a,b,c,d,e,f,h,j,l){var m,n,o,p=a.ITa;i&&(a.hasFormula(b,c)||a.hasFormula(d,e))&&(a.setFormula(d,e,k),0!==h&&4!==h||(m=a.Bj(),a.getFormula(b,c)&&g.CalcOperatorAdjustor.copyFormula(m,b,c,m,d,e,1,1))),a.setValue(d,e,f),o=l?0:64,j&&(o|=128),o|=1024,a.copyTo(b,c,d,e,1,1,o),a.removeSpan(d,e,3),n=p.findSpan(b,c),n&&b===n.row&&c===n.col&&a.Sq(d,e,n.rowCount,n.colCount,3)},a.prototype.s_=function(a,b,c,d,e,f,g,h,i,j,l,m){var n,o,p,q,r,s,t,u,v,w,z,A,B,C,D,E,F=this,G=F.kj,H=a?c.col:c.row,I=a?b.col:b.row,J=a?c.colCount:c.rowCount,K=a?b.colCount:b.rowCount;if(i=i||0,r=f.h_(),s=(H-I-i)/K,t=F.t_(f.e_,f.f_),u=f.Nc,t){for(p=[],o=0;o=H&&(a?F.o_(G,d,D,e,E,f.k_(z),4,l,m):j&&G.Ps&&G.Ps(E)||F.o_(G,D,d,E,e,f.k_(z),4,l,m));return k},a.prototype.t_=function(a,b){var c,d,e,f=s(b);if(f<=1||s(a)!==f)return!1;for(c=a[1]-a[0],d=b[1]-b[0],e=2;e1?c:d);if(0===b)j.setDate(j.getDate()+g*e);else if(1===b)for(;i>0;)j.setDate(j.getDate()+g*(e>0?1:-1)),6!==j.getDay()&&0!==j.getDay()&&i--;else 2===b?j.setMonth(j.getMonth()+g*h):j.setFullYear(j.getFullYear()+g*h);return u(j)},a}(),b.z$=X},"./dist/plugins/fill/fill.ns.js":function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var d=c("./dist/plugins/fill/fill.res.en.js");b.SR={en:d}},"./dist/plugins/fill/fill.res.en.js":function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.CopyCells="Copy Cells",b.FillSeries="Fill Series",b.FillFormattingOnly="Fill Formatting Only",b.FillWithoutFormatting="Fill Without Formatting",b.Exp_NumberOnly="Only works for Numbers",b.Exp_RangeContainsMergedCell="Range should not have merged cells.",b.Exp_TargetContainsMergedCells="Target range should not have merged cells.",b.Exp_MergedCellsIdentical="This operation requires the merged cells to be identically sized.",b.Exp_FillRangeContainsMergedCell="Cannot fill range that contains a merged cell.",b.Exp_FillCellsReadOnly="The cells you are trying to fill are protected and therefore read-only.",b.Exp_ChangeMergedCell="Cannot change part of merged cell.",b.Exp_ColumnReadOnly="The column you are trying to change is protected and therefore read-only.",b.Exp_RowReadOnly="The row you are trying to change is protected and therefore read-only.",b.Exp_CellReadOnly="The cell you are trying to change is protected and therefore read-only.",b.Exp_RangeIsNull="range is null",b.Exp_ChangePartOfArray="Cannot change part of an array."},CalcEngine:function(a,b){a.exports=GC.Spread.CalcEngine},Common:function(a,b){a.exports=GC.Spread},Core:function(a,b){a.exports=GC.Spread.Sheets},SheetsCalc:function(a,b){a.exports=GC.Spread.Sheets.CalcEngine}});