diff --git a/dist/xspreadsheet.js b/dist/xspreadsheet.js index fb099183..450586bc 100644 --- a/dist/xspreadsheet.js +++ b/dist/xspreadsheet.js @@ -1,2 +1,2 @@ -!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(t,e){},function(t,e,n){},function(t,e,n){"use strict";function r(t){return function(t){if(Array.isArray(t))return t}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"";!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),"string"==typeof e?(this.el=document.createElement(e),this.el.className=n):this.el=e,this.data={}}var e,n,o;return e=t,(n=[{key:"data",value:function(t,e){return void 0!==e?(this.data[t]=e,this):this.data[t]}},{key:"on",value:function(t,e){var n=r(t.split(".")),i=n[0],o=n.slice(1),a=i;return"mousewheel"===a&&/Firefox/i.test(window.navigator.userAgent)&&(a="DOMMouseScroll"),this.el.addEventListener(a,function(t){e(t);for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"active";return this.toggleClass(t)}},{key:"toggleClass",value:function(t){return this.el.classList.toggle(t)}},{key:"active",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"active";return t?this.addClass(e):this.removeClass(e),this}},{key:"checked",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.active(t,"checked"),this}},{key:"disabled",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t?this.addClass("disabled"):this.removeClass("disabled"),this}},{key:"attr",value:function(t,e){var n=this;if(void 0!==e)this.el.setAttribute(t,e);else{if("string"==typeof t)return this.el.getAttribute(t);Object.keys(t).forEach(function(e){n.el.setAttribute(e,t[e])})}return this}},{key:"removeAttr",value:function(t){return this.el.removeAttribute(t),this}},{key:"html",value:function(t){return void 0!==t?(this.el.innerHTML=t,this):this.el.innerHTML}},{key:"val",value:function(t){return void 0!==t?(this.el.value=t,this):this.el.value}},{key:"cssRemoveKeys",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:"";return new o(t,e)};n(0);function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var c=["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"];function s(t){for(var e="",n=t;n>=c.length;)n/=c.length,n-=1,e+=c[parseInt(n,10)%c.length];var r=t%c.length;return e+=c[r]}function u(t){for(var e=0,n=0;n="0"&&t.charAt(r)<="9"?n+=t.charAt(r):e+=t.charAt(r);return[u(e),parseInt(n,10)-1]}function h(t,e){return"".concat(s(t)).concat(e+1)}function p(t,e,n){var r=l(f(t),2);return h(r[0]+e,r[1]+n)}function y(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function d(t,e){for(var n=0;n4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sri=e,this.sci=n,this.eri=r,this.eci=i,this.w=o,this.h=a}var e,n,r;return e=t,r=[{key:"valueOf",value:function(e){var n=e.split(":"),r=y(f(n[0]),2),i=r[0],o=r[1],a=o,l=i;if(n.length>1){var c=y(f(n[1]),2);l=c[0],a=c[1]}return new t(o,i,a,l)}}],(n=[{key:"set",value:function(t,e,n,r){this.sri=t,this.sci=e,this.eri=n,this.eci=r}},{key:"multiple",value:function(){return this.eri-this.sri>0||this.eci-this.sci>0}},{key:"includes",value:function(){for(var t=0,e=0,n=arguments.length,r=new Array(n),i=0;i1&&void 0!==arguments[1]?arguments[1]:function(){return!0},n=this.sri,r=this.sci,i=this.eri,o=this.eci,a=n;a<=i;a+=1)if(e(a))for(var l=r;l<=o;l+=1)t(a,l)}},{key:"contains",value:function(t){return this.sri<=t.sri&&this.sci<=t.sci&&this.eri>=t.eri&&this.eci>=t.eci}},{key:"within",value:function(t){return this.sri>=t.sri&&this.sci>=t.sci&&this.eri<=t.eri&&this.eci<=t.eci}},{key:"disjoint",value:function(t){return this.sri>t.eri||this.sci>t.eci||t.sri>this.eri||t.sci>this.eci}},{key:"intersects",value:function(t){return this.sri<=t.eri&&this.sci<=t.eci&&t.sri<=this.eri&&t.sci<=this.eci}},{key:"union",value:function(e){var n=this.sri,r=this.sci,i=this.eri,o=this.eci;return new t(e.srii?e.eri:i,e.eci>o?e.eci:o)}},{key:"difference",value:function(e){var n=[],r=function(e,r,i,o){n.push(new t(e,r,i,o))},i=this.sri,o=this.sci,a=this.eri,l=this.eci,c=e.sri-i,s=e.sci-o,u=a-e.eri,f=l-e.eci;return c>0?(r(i,o,e.sri-1,l),u>0?(r(e.eri+1,o,a,l),s>0&&r(e.sri,o,e.eri,e.sci-1),f>0&&r(e.sri,e.eci+1,e.eri,l)):(s>0&&r(e.sri,o,a,e.sci-1),f>0&&r(e.sri,e.eci+1,a,l))):u>0&&(r(e.eri+1,o,a,l),s>0&&r(i,o,e.eri,e.sci-1),f>0&&r(i,e.eci+1,e.eri,l)),s>0?(r(i,o,a,e.sci-1),f>0?(r(i,e.eri+1,a,l),c>0&&r(i,e.sci,e.sri-1,e.eci),u>0&&r(e.sri+1,e.sci,a,e.eci)):(c>0&&r(i,e.sci,e.sri-1,l),u>0&&r(e.sri+1,e.sci,a,l))):f>0&&(r(a,e.eci+1,a,l),c>0&&r(i,o,e.sri-1,e.eci),u>0&&r(e.eri+1,o,a,e.eci)),n}},{key:"size",value:function(){return[this.eri-this.sri+1,this.eci-this.sci+1]}},{key:"toString",value:function(){var t=this.sri,e=this.sci,n=this.eri,r=this.eci,i=h(e,t);return this.multiple()&&(i="".concat(i,":").concat(h(r,n))),i}},{key:"clone",value:function(){return new t(this.sri,this.sci,this.eri,this.eci,this.w,this.h)}},{key:"equals",value:function(t){return this.eri===t.eri&&this.eci===t.eci&&this.sri===t.sri&&this.sci===t.sci}}])&&d(e.prototype,n),r&&d(e,r),t}();function b(t,e){for(var n=0;n0}},{key:"canRedo",value:function(){return this.redoItems.length>0}},{key:"undo",value:function(t,e){var n=this.undoItems,r=this.redoItems;this.canUndo()&&(r.push(JSON.stringify(t)),e(JSON.parse(n.pop())))}},{key:"redo",value:function(t,e){var n=this.undoItems,r=this.redoItems;this.canRedo()&&(n.push(JSON.stringify(t)),e(JSON.parse(r.pop())))}}])&&w(e.prototype,n),r&&w(e,r),t}();function O(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._=e}var e,n,r;return e=t,(n=[{key:"forEach",value:function(t){this._.forEach(t)}},{key:"deleteWithin",value:function(t){this._=this._.filter(function(e){return!e.within(t)})}},{key:"getFirstIncludes",value:function(t,e){for(var n=0;n=e?(s.sri+=n,s.eri+=n):o=e?(s.sci+=n,s.eci+=n):a0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length,r=new Array(n>1?n-1:0),i=1;i1&&void 0!==arguments[1]?arguments[1]:function(t){return t},n=0,r=0;return Object.keys(t).forEach(function(i){n+=e(t[i],i),r+=1}),[n,r]},rangeEach:function(t,e,n){for(var r=t;ri);c+=1)a+=l=o(c);return[c,a-l,l]},deleteProperty:function(t,e){var n=t["".concat(e)];return delete t["".concat(e)],n}};function I(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function z(t,e){for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:"all",i=this.getOrNew(t);"all"===r?i.cells[e]=n:"text"===r?(i.cells[e]=i.cells[e]||{},i.cells[e].text=n.text):"format"===r&&(i.cells[e]=i.cells[e]||{},i.cells[e].style=n.style,n.merge&&(i.cells[e].merge=n.merge))}},{key:"setCellText",value:function(t,e,n){this.getCellOrNew(t,e).text=n}},{key:"copyPaste",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},o=t.sri,a=t.sci,l=t.eri,c=t.eci,s=e.sri,u=e.sci,f=e.eri,h=e.eci,y=t.size(),d=I(y,2),v=d[0],b=d[1],g=e.size(),m=I(g,2),w=m[0],k=m[1],O=!0,S=0;(f0&&function(){var t=P.text,e=_-u+(j-s)+2;if(O||(e-=S+1),"="===t[0])P.text=t.replace(/\w{1,3}\d/g,function(t){var n=0,r=0;return o===s?n=e-1:r=e-1,p(t,n,r)});else{var n=/[\\.\d]+$/.exec(t);if(null!==n){var r=Number(n[0])+e-1;P.text=t.substring(0,n.index)+r}}}(),this.setCell(C,T,P,n),i(C,T,P)}}},{key:"cutPaste",value:function(t,e){var n=this,r={};this.each(function(i){n.eachCells(i,function(o){var a=parseInt(i,10),l=parseInt(o,10);t.includes(i,o)&&(a=e.sri+(a-t.sri),l=e.sci+(l-t.sci)),r[a]=r[a]||{cells:{}},r[a].cells[l]=n._[i].cells[o]})}),this._=r}},{key:"paste",value:function(t,e){var n=this;if(!(t.length<=0)){var r=e.sri,i=e.sci;t.forEach(function(t,e){var o=r+e;t.forEach(function(t,e){var r=i+e;n.setCellText(o,r,t)})})}}},{key:"insert",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n={};this.each(function(r,i){var o=parseInt(r,10);o>=t&&(o+=e),n[o]=i}),this._=n,this.len+=e}},{key:"delete",value:function(t,e){var n=e-t+1,r={};this.each(function(i,o){var a=parseInt(i,10);ae&&(r[a-n]=o)}),this._=r,this.len-=n}},{key:"insertColumn",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.each(function(r,i){var o={};e.eachCells(r,function(e,r){var i=parseInt(e,10);i>=t&&(i+=n),o[i]=r}),i.cells=o})}},{key:"deleteColumn",value:function(t,e){var n=this,r=e-t+1;this.each(function(i,o){var a={};n.eachCells(i,function(n,i){var o=parseInt(n,10);oe&&(a[o-r]=i)}),o.cells=a})}},{key:"deleteCells",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";t.each(function(t,r){e.deleteCell(t,r,n)})}},{key:"deleteCell",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"all",r=this.get(t);if(null!==r){var i=this.getCell(t,e);null!==i&&("all"===n?delete r.cells[e]:"text"===n?(i.text&&delete i.text,i.value&&delete i.value):"format"===n?(void 0!==i.style&&delete i.style,i.merge&&delete i.merge):"merge"===n&&i.merge&&delete i.merge)}}},{key:"maxCell",value:function(){var t=Object.keys(this._),e=t[t.length-1],n=this._[e];if(n){var r=n.cells,i=Object.keys(r),o=i[i.length-1];return[parseInt(e,10),parseInt(o,10)]}return[0,0]}},{key:"each",value:function(t){Object.entries(this._).forEach(function(e){var n=I(e,2),r=n[0],i=n[1];t(r,i)})}},{key:"eachCells",value:function(t,e){this._[t]&&this._[t].cells&&Object.entries(this._[t].cells).forEach(function(t){var n=I(t,2),r=n[0],i=n[1];e(r,i)})}},{key:"setData",value:function(t){t.len&&(this.len=t.len,delete t.len),this._=t}},{key:"getData",value:function(){var t=this.len;return Object.assign({len:t},this._)}}])&&z(e.prototype,n),r&&z(e,r),t}();function W(t,e){for(var n=0;n A",asc:"Sort A -> Z"},filter:{empty:"empty"},dataValidation:{mode:"Mode",range:"Cell Range",criteria:"Criteria",modeType:{cell:"Cell",column:"Colun",row:"Row"},type:{list:"List",number:"Number",date:"Date",phone:"Phone",email:"Email"},operator:{be:"between",nbe:"not betwwen",lt:"less than",lte:"less than or equal to",gt:"greater than",gte:"greater than or equal to",eq:"equal to",neq:"not equal to"}}}};function V(t,e){if(e&&e[F])for(var n=e[F],r=t.split("."),i=0;i2?r-2:0),o=2;o=this.parseValue(l)&&o<=this.parseValue(c),"between",l,c)}if("nbe"===n){var s=U(r,2),u=s[0],f=s[1];return X(othis.parseValue(f),"notBetween",u,f)}if("eq"===n)return X(o===this.parseValue(r),"equal",r);if("neq"===n)return X(o!==this.parseValue(r),"notEqual",r);if("lt"===n)return X(othis.parseValue(r),"greaterThan",r);if("gte"===n)return X(o>=this.parseValue(r),"greaterThanEqual",r)}return[!0]}}])&&Y(e.prototype,n),r&&Y(e,r),t}();function J(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Z(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function G(t,e){for(var n=0;n0}).map(function(t){return t.getData()})}},{key:"setData",value:function(t){this._=t.map(function(t){return tt.valueOf(t)})}}]),t}();function nt(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e2&&void 0!==arguments[2]?arguments[2]:function(){},r=this.merges,i=e.clone(),o=it(t.size(),2),a=o[0],l=o[1],c=it(e.size(),2),s=c[0],u=c[1];return a>s&&(i.eri=e.sri+a-1),l>u&&(i.eci=e.sci+l-1),!r.intersects(i)||(n(q("error.pasteForMergedCell")),!1)}function lt(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.rows,o=this.merges;"all"!==n&&"format"!==n||(i.deleteCells(e,n),o.deleteWithin(e)),i.copyPaste(t,e,n,r,function(t,e,n){if(n&&n.merge){var r=it(n.merge,2),i=r[0],a=r[1];if(i<=0&&a<=0)return;o.add(new v(t,e,t+i,e+a))}})}function ct(t,e){var n=this.clipboard,r=this.rows,i=this.merges;r.cutPaste(t,e),i.move(t,e.sri-t.sri,e.sci-t.sci),n.clear()}function st(t,e,n){var r=this.styles,i=this.rows.getCellOrNew(t,e),o={};void 0!==i.style&&(o=D.cloneDeep(r[i.style])),Object.assign(o,{border:n}),i.style=this.addStyle(o)}var ut=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.settings=D.merge(ot,n||{}),this.name=e||"sheet",this.freeze=[0,0],this.styles=[],this.merges=new A,this.rows=new M(this.settings.row),this.cols=new N(this.settings.col),this.validations=new et,this.hyperlinks={},this.comments={},this.selector=new g,this.scroll=new m,this.history=new k,this.clipboard=new S,this.autoFilter=new T,this.change=function(){},this.exceptRowSet=new Set,this.sortedRowMap=new Map,this.unsortedRowMap=new Map}var e,n,r;return e=t,(n=[{key:"addValidation",value:function(t,e,n){var r=this;this.changeData(function(){r.validations.add(t,e,n)})}},{key:"removeValidation",value:function(){var t=this,e=this.selector.range;this.changeData(function(){t.validations.remove(e)})}},{key:"getSelectedValidator",value:function(){var t=this.selector,e=t.ri,n=t.ci,r=this.validations.get(e,n);return r?r.validator:null}},{key:"getSelectedValidation",value:function(){var t=this.selector,e=t.ri,n=t.ci,r=t.range,i=this.validations.get(e,n),o={ref:r.toString()};return null!==i&&(o.mode=i.mode,o.validator=i.validator),o}},{key:"canUndo",value:function(){return this.history.canUndo()}},{key:"canRedo",value:function(){return this.history.canRedo()}},{key:"undo",value:function(){var t=this;this.history.undo(this.getData(),function(e){t.setData(e)})}},{key:"redo",value:function(){var t=this;this.history.redo(this.getData(),function(e){t.setData(e)})}},{key:"copy",value:function(){this.clipboard.copy(this.selector.range)}},{key:"cut",value:function(){this.clipboard.cut(this.selector.range)}},{key:"paste",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=this.clipboard,i=this.selector;return!r.isClear()&&(!!at.call(this,r.range,i.range,n)&&(this.changeData(function(){r.isCopy()?lt.call(t,r.range,i.range,e):r.isCut()&&ct.call(t,r.range,i.range)}),!0))}},{key:"pasteFromText",value:function(t){var e=t.split("\r\n").map(function(t){return t.replace(/"/g,"").split("\t")});e.length>0&&(e.length-=1);var n=this.rows,r=this.selector;this.changeData(function(){n.paste(e,r.range)})}},{key:"autofill",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},i=this.selector.range;return!!at.call(this,i,t,r)&&(this.changeData(function(){lt.call(n,i,t,e,!0)}),!0)}},{key:"clearClipboard",value:function(){this.clipboard.clear()}},{key:"calSelectedRangeByEnd",value:function(t,e){var n=this.selector,r=this.rows,i=this.cols,o=this.merges,a=n.range,l=a.sri,c=a.sci,s=a.eri,u=a.eci,f=n.ri,h=n.ci,p=t,y=e;return t<0&&(p=r.len-1),e<0&&(y=i.len-1),p>f?(l=f,s=p):(l=p,s=f),y>h?(c=h,u=y):(c=y,u=h),n.range=o.union(new v(l,c,s,u)),n.range=o.union(n.range),n.range}},{key:"calSelectedRangeByStart",value:function(t,e){var n=this.selector,r=this.rows,i=this.cols,o=this.merges.getFirstIncludes(t,e);return null===o&&(o=new v(t,e,t,e),-1===t&&(o.sri=0,o.eri=r.len-1),-1===e&&(o.sci=0,o.eci=i.len-1)),n.range=o,o}},{key:"setSelectedCellAttr",value:function(t,e){var n=this;this.changeData(function(){var r=n.selector,i=n.styles,o=n.rows;if("merge"===t)e?n.merge():n.unmerge();else if("border"===t)(function(t){var e=this,n=t.mode,r=t.style,i=t.color,o=this.styles,a=this.selector,l=this.rows,c=a.range,s=c.sri,u=c.sci,f=c.eri,h=c.eci,p=!this.isSignleSelected();if(p||"inside"!==n&&"horizontal"!==n&&"vertical"!==n)if("outside"!==n||p){if("none"===n)a.range.each(function(t,n){var r=l.getCell(t,n);if(r&&void 0!==r.style){var i=D.cloneDeep(o[r.style]);delete i.border,r.style=e.addStyle(i)}});else if("all"===n||"inside"===n||"outside"===n||"horizontal"===n||"vertical"===n)!function(){for(var t=[],o=s;o<=f;o+=1)for(var a=u;a<=h;a+=1){for(var c=[],y=0;yh)break;var w=l.getCell(o,a),k=0,O=0;if(w&&w.merge){var S=it(w.merge,2);k=S[0],O=S[1],t.push([o,a,k,O])}var x=k>0&&o+k===f,E=O>0&&a+O===h,j={};"all"===n?j={bottom:[r,i],top:[r,i],left:[r,i],right:[r,i]}:"inside"===n?(!E&&a0&&st.call(e,o,a,j),a+=O}}();else if("top"===n||"bottom"===n)for(var y=u;y<=h;y+=1)"top"===n&&(st.call(this,s,y,{top:[r,i]}),y+=l.getCellMerge(s,y)[1]),"bottom"===n&&(st.call(this,f,y,{bottom:[r,i]}),y+=l.getCellMerge(f,y)[1]);else if("left"===n||"right"===n)for(var d=s;d<=f;d+=1)"left"===n&&(st.call(this,d,u,{left:[r,i]}),d+=l.getCellMerge(d,u)[0]),"right"===n&&(st.call(this,d,h,{right:[r,i]}),d+=l.getCellMerge(d,h)[0])}else st.call(this,s,u,{top:[r,i],bottom:[r,i],left:[r,i],right:[r,i]})}).call(n,e);else if("formula"===t){var a=r.ri,l=r.ci,c=r.range;if(r.multiple()){var s=it(r.size(),2),u=s[0],f=s[1],p=c.sri,y=c.sci,d=c.eri,v=c.eci;if(u>1)for(var b=y;b<=v;b+=1){o.getCellOrNew(d+1,b).text="=".concat(e,"(").concat(h(b,p),":").concat(h(b,d),")")}else if(f>1){o.getCellOrNew(a,v+1).text="=".concat(e,"(").concat(h(y,a),":").concat(h(v,a),")")}}else{o.getCellOrNew(a,l).text="=".concat(e,"()")}}else r.range.each(function(r,a){var l=o.getCellOrNew(r,a),c={};if(void 0!==l.style&&(c=D.cloneDeep(i[l.style])),"format"===t)c.format=e,l.style=n.addStyle(c);else if("font-bold"===t||"font-italic"===t||"font-name"===t||"font-size"===t){var s={};s[t.split("-")[1]]=e,c.font=Object.assign(c.font||{},s),l.style=n.addStyle(c)}else"strike"===t||"textwrap"===t||"underline"===t||"align"===t||"valign"===t||"color"===t||"bgcolor"===t?(c[t]=e,l.style=n.addStyle(c)):l[t]=e})})}},{key:"setSelectedCellText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"input",n=this.autoFilter,r=this.selector,i=this.rows,o=r.ri,a=r.ci,l=o;this.unsortedRowMap.has(o)&&(l=this.unsortedRowMap.get(o));var c=i.getCell(l,a),s=c?c.text:"";if(this.setCellText(l,a,t,e),n.active()){var u=n.getFilter(a);if(u){var f=u.value.findIndex(function(t){return t===s});f>=0&&u.value.splice(f,1,t)}}}},{key:"getSelectedCell",value:function(){var t=this.selector,e=t.ri,n=t.ci,r=e;return this.unsortedRowMap.has(e)&&(r=this.unsortedRowMap.get(e)),this.rows.getCell(r,n)}},{key:"xyInSelectedRect",value:function(t,e){var n=this.getSelectedRect(),r=n.left,i=n.top,o=n.width,a=n.height,l=t-this.cols.indexWidth,c=e-this.rows.height;return l>r&&li&&c0&&v>s&&(p=s),d>0&&d>u&&(y=u),{l:s,t:u,left:p,top:y,height:f,width:h,scroll:e}}},{key:"getCellRectByXY",value:function(t,e){var n=this.scroll,r=this.merges,i=this.rows,o=this.cols,a=function(t,e){var n=this.rows,r=this.freezeTotalHeight(),i=n.height;r+n.heightt);a+=1)o.has(a)||(l+=c=n.getHeight(a));return(l-=c)<=0?{ri:-1,top:0,height:c}:{ri:a-1,top:l,height:c}}.call(this,e,n.y),l=a.ri,c=a.top,s=a.height,u=function(t,e){var n=this.cols,r=this.freezeTotalWidth(),i=n.indexWidth;r+n.indexWidth=0||f>=0){var y=r.getFirstIncludes(l,f);if(y){l=y.sri,f=y.sci;var d=this.cellRect(l,f);h=d.left,c=d.top,p=d.width,s=d.height}}return{ri:l,ci:f,left:h,top:c,width:p,height:s}}},{key:"isSignleSelected",value:function(){var t=this.selector.range,e=t.sri,n=t.sci,r=t.eri,i=t.eci,o=this.getCell(e,n);if(o&&o.merge){var a=it(o.merge,2),l=a[0],c=a[1];if(e+l===r&&n+c===i)return!0}return!this.selector.multiple()}},{key:"canUnmerge",value:function(){var t=this.selector.range,e=t.sri,n=t.sci,r=t.eri,i=t.eci,o=this.getCell(e,n);if(o&&o.merge){var a=it(o.merge,2),l=a[0],c=a[1];if(e+l===r&&n+c===i)return!0}return!1}},{key:"merge",value:function(){var t=this,e=this.selector,n=this.rows;if(!this.isSignleSelected()){var r=it(e.size(),2),i=r[0],o=r[1];if(i>1||o>1){var a=e.range,l=a.sri,c=a.sci;this.changeData(function(){var r=n.getCellOrNew(l,c);r.merge=[i-1,o-1],t.merges.add(e.range),t.rows.deleteCells(e.range),t.rows.setCell(l,c,r)})}}}},{key:"unmerge",value:function(){var t=this,e=this.selector;if(this.isSignleSelected()){var n=e.range,r=n.sri,i=n.sci;this.changeData(function(){t.rows.deleteCell(r,i,"merge"),t.merges.deleteWithin(e.range)})}}},{key:"canAutofilter",value:function(){return!this.autoFilter.active()}},{key:"autofilter",value:function(){var t=this,e=this.autoFilter,n=this.selector;this.changeData(function(){e.active()?(e.clear(),t.exceptRowSet=new Set,t.sortedRowMap=new Map,t.unsortedRowMap=new Map):e.ref=n.range.toString()})}},{key:"setAutoFilter",value:function(t,e,n,r){var i=this.autoFilter;i.addFilter(t,n,r),i.setSort(t,e),this.resetAutoFilter()}},{key:"resetAutoFilter",value:function(){var t=this,e=this.autoFilter,n=this.rows;if(e.active()){var r=e.sort,i=e.filteredRows(function(t,e){return n.getCell(t,e)}),o=i.rset,a=i.fset,l=Array.from(a),c=Array.from(a);r&&l.sort(function(t,e){return"asc"===r.order?t-e:"desc"===r.order?e-t:0}),this.exceptRowSet=o,this.sortedRowMap=new Map,this.unsortedRowMap=new Map,l.forEach(function(e,n){t.sortedRowMap.set(c[n],e),t.unsortedRowMap.set(e,c[n])})}}},{key:"deleteCell",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all",n=this.selector;this.changeData(function(){t.rows.deleteCells(n.range,e),"all"!==e&&"format"!==e||t.merges.deleteWithin(n.range)})}},{key:"insert",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.changeData(function(){var r=e.selector.range,i=r.sri,o=r.sci,a=e.rows,l=e.merges,c=e.cols,s=i;"row"===t?a.insert(i,n):"column"===t&&(a.insertColumn(o,n),s=o,c.len+=1),l.shift(t,s,n,function(t,e,n,r){var i=a.getCell(t,e);i.merge[0]+=n,i.merge[1]+=r})})}},{key:"delete",value:function(t){var e=this;this.changeData(function(){var n=e.rows,r=e.merges,i=e.selector,o=e.cols,a=i.range,l=i.range,c=l.sri,s=l.sci,u=l.eri,f=l.eci,h=it(i.range.size(),2),p=h[0],y=h[1],d=c,v=p;"row"===t?n.delete(c,u):"column"===t&&(n.deleteColumn(s,f),d=a.sci,v=y,o.len-=1),r.shift(t,d,-v,function(t,e,r,i){var o=n.getCell(t,e);o.merge[0]+=r,o.merge[1]+=i,0===o.merge[0]&&0===o.merge[1]&&delete o.merge})})}},{key:"scrollx",value:function(t,e){var n=this.scroll,r=this.freeze,i=this.cols,o=it(r,2)[1],a=it(D.rangeReduceIf(o,i.len,0,0,t,function(t){return i.getWidth(t)}),3),l=a[0],c=a[1],s=a[2],u=c;t>0&&(u+=s),n.x!==u&&(n.ci=t>0?l:0,n.x=u,e())}},{key:"scrolly",value:function(t,e){var n=this.scroll,r=this.freeze,i=this.rows,o=it(r,1)[0],a=it(D.rangeReduceIf(o,i.len,0,0,t,function(t){return i.getHeight(t)}),3),l=a[0],c=a[1],s=a[2],u=c;t>0&&(u+=s),n.y!==u&&(n.ri=t>0?l:0,n.y=u,e())}},{key:"cellRect",value:function(t,e){var n=this.rows,r=this.cols,i=r.sumWidth(0,e),o=n.sumHeight(0,t),a=n.getCell(t,e),l=r.getWidth(e),c=n.getHeight(t);if(null!==a&&a.merge){var s=it(a.merge,2),u=s[0],f=s[1];if(u>0)for(var h=1;h<=u;h+=1)c+=n.getHeight(t+h);if(f>0)for(var p=1;p<=f;p+=1)l+=r.getWidth(e+p)}return{left:i,top:o,width:l,height:c,cell:a}}},{key:"getCell",value:function(t,e){return this.rows.getCell(t,e)}},{key:"getCellTextOrDefault",value:function(t,e){var n=this.getCell(t,e);return n&&n.text?n.text:""}},{key:"getCellStyle",value:function(t,e){var n=this.getCell(t,e);return n&&void 0!==n.style?this.styles[n.style]:null}},{key:"getCellStyleOrDefault",value:function(t,e){var n=this.styles,r=this.rows.getCell(t,e),i=r&&void 0!==r.style?n[r.style]:{};return D.merge(this.defaultStyle(),i)}},{key:"getSelectedCellStyle",value:function(){var t=this.selector,e=t.ri,n=t.ci;return this.getCellStyleOrDefault(e,n)}},{key:"setCellText",value:function(t,e,n,r){var i=this.rows,o=this.history,a=this.validations;"finished"===r?(i.setCellText(t,e,""),o.add(this.getData()),i.setCellText(t,e,n)):(i.setCellText(t,e,n),this.change(this.getData())),a.validate(t,e,n)}},{key:"freezeIsActive",value:function(){var t=it(this.freeze,2),e=t[0],n=t[1];return e>0||n>0}},{key:"setFreeze",value:function(t,e){var n=this;this.changeData(function(){n.freeze=[t,e]})}},{key:"freezeTotalWidth",value:function(){return this.cols.sumWidth(0,this.freeze[1])}},{key:"freezeTotalHeight",value:function(){return this.rows.sumHeight(0,this.freeze[0])}},{key:"setRowHeight",value:function(t,e){var n=this;this.changeData(function(){n.rows.setHeight(t,e)})}},{key:"setColWidth",value:function(t,e){var n=this;this.changeData(function(){n.cols.setWidth(t,e)})}},{key:"viewHeight",value:function(){var t=this.settings,e=t.view,n=t.showToolbar,r=e.height();return r-=41,n&&(r-=41),r}},{key:"viewWidth",value:function(){return this.settings.view.width()}},{key:"freezeViewRange",value:function(){var t=it(this.freeze,2),e=t[0],n=t[1];return new v(0,0,e-1,n-1,this.freezeTotalWidth(),this.freezeTotalHeight())}},{key:"contentRange",value:function(){var t=this.rows,e=this.cols,n=it(t.maxCell(),2),r=n[0],i=n[1],o=t.sumHeight(0,r+1),a=e.sumWidth(0,i+1);return new v(0,0,r,i,a,o)}},{key:"exceptRowTotalHeight",value:function(t,e){var n=this.exceptRowSet,r=this.rows,i=Array.from(n),o=0;return i.forEach(function(n){if(ne){var i=r.getHeight(n);o+=i}}),o}},{key:"viewRange",value:function(){var t=this.scroll,e=this.rows,n=this.cols,r=this.freeze,i=this.exceptRowSet,o=t.ri,a=t.ci;o<=0&&(o=it(r,1)[0]);a<=0&&(a=it(r,2)[1]);for(var l=0,c=0,s=[e.len,n.len],u=s[0],f=s[1],h=o;hthis.viewHeight()));h+=1);for(var p=a;pthis.viewWidth()));p+=1);return new v(o,a,u,f,l,c)}},{key:"eachMergesInView",value:function(t,e){this.merges.filterIntersects(t).forEach(function(t){return e(t)})}},{key:"rowEach",value:function(t,e,n){for(var r=0,i=this.rows,o=this.exceptRowSet,a=nt(o),l=0,c=0;cthis.viewHeight())break}}},{key:"colEach",value:function(t,e,n){for(var r=0,i=this.cols,o=t;o<=e;o+=1){var a=i.getWidth(o);if(n(o,r,a),(r+=a)>this.viewWidth())break}}},{key:"defaultStyle",value:function(){return this.settings.style}},{key:"addStyle",value:function(t){for(var e=this.styles,n=0;nMath.abs(e)?r(t>0?"right":"left",t,n):r(e>0?"down":"up",e,n)}var bt="x-spreadsheet";window.devicePixelRatio;function gt(t,e){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.moving=!1,this.vertical=n,this.el=a("div","".concat(bt,"-resizer ").concat(n?"vertical":"horizontal")).children(this.hoverEl=a("div","".concat(bt,"-resizer-hover")).on("mousedown.stop",function(t){return e.mousedownHandler(t)}),this.lineEl=a("div","".concat(bt,"-resizer-line")).hide()).hide(),this.cRect=null,this.finishedFn=null,this.minDistance=r}var e,n,r;return e=t,(n=[{key:"show",value:function(t,e){var n=this.moving,r=this.vertical,i=this.hoverEl,o=this.lineEl,a=this.el;if(!n){this.cRect=t;var l=t.left,c=t.top,s=t.width,u=t.height;a.offset({left:r?l+s-5:l,top:r?c:c+u-5}).show(),i.offset({width:r?5:s,height:r?u:5}),o.offset({width:r?0:e.width,height:r?e.height:0})}}},{key:"hide",value:function(){this.el.offset({left:0,top:0}).hide()}},{key:"mousedownHandler",value:function(t){var e=this,n=t,r=this.el,i=this.lineEl,o=this.cRect,a=this.vertical,l=this.minDistance,c=a?o.width:o.height;i.show(),dt(window,function(t){e.moving=!0,null!==n&&1===t.buttons&&(a?(c+=t.movementX)>l&&r.css("left","".concat(o.left+c,"px")):(c+=t.movementY)>l&&r.css("top","".concat(o.top+c,"px")),n=t)},function(){n=null,i.hide(),e.moving=!1,e.hide(),e.finishedFn&&(cn){var r=this.vertical?"height":"width";this.el.css(r,"".concat(n-15,"px")).show(),this.contentEl.css(this.vertical?"width":"height","1px").css(r,"".concat(e,"px"))}else this.el.hide();return this}}])&&wt(e.prototype,n),r&&wt(e,r),t}();function Ot(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function St(t,e){for(var n=0;nl&&(f-=a.x);var h=r-u;return u>c&&(h-=a.y),{left:f,top:h,width:i,height:o}}function Ct(t){var e=this.data,n=t.left,r=t.width,i=t.height,o=t.l,a=t.t,l=t.scroll,c=e.freezeTotalWidth(),s=n-c;return c>o&&(s-=l.x),{left:s,top:a,width:r,height:i}}function Tt(t){var e=this.data,n=t.top,r=t.width,i=t.height,o=t.l,a=t.t,l=t.scroll,c=e.freezeTotalHeight(),s=n-c;return c>a&&(s-=l.y),{left:o,top:s,width:r,height:i}}function Pt(t){this.br.setAreaOffset(_t.call(this,t))}function At(t){this.t.setAreaOffset(Ct.call(this,t))}function Rt(t){this.l.setAreaOffset(Tt.call(this,t))}function Dt(t){this.l.setClipboardOffset(Tt.call(this,t))}function It(t){this.br.setClipboardOffset(_t.call(this,t))}function zt(t){this.t.setClipboardOffset(Ct.call(this,t))}function Mt(t){Pt.call(this,t),function(t){this.tl.setAreaOffset(t)}.call(this,t),At.call(this,t),Rt.call(this,t)}function Wt(t){It.call(this,t),function(t){this.tl.setClipboardOffset(t)}.call(this,t),zt.call(this,t),Dt.call(this,t)}var Nt=function(){function t(e){Ot(this,t),this.data=e,this.br=new jt,this.t=new jt,this.l=new jt,this.tl=new jt,this.br.el.show(),this.offset=null,this.areaOffset=null,this.indexes=null,this.range=null,this.arange=null,this.el=a("div","".concat(bt,"-selectors")).children(this.tl.el,this.t.el,this.l.el,this.br.el).hide(),this.lastri=-1,this.lastci=-1,Et+=1}return xt(t,[{key:"resetData",value:function(t){this.data=t,this.range=t.selector.range,this.resetAreaOffset()}},{key:"hide",value:function(){this.el.hide()}},{key:"resetOffset",value:function(){var t=this.data,e=this.tl,n=this.t,r=this.l,i=this.br,o=t.freezeTotalHeight(),a=t.freezeTotalWidth();o>0||a>0?(e.setOffset({width:a,height:o}),n.setOffset({left:a,height:o}),r.setOffset({top:o,width:a}),i.setOffset({left:a,top:o})):(e.hide(),n.hide(),r.hide(),i.setOffset({left:0,top:0}))}},{key:"resetAreaOffset",value:function(){var t=this.data.getSelectedRect(),e=this.data.getClipboardRect();Mt.call(this,t),Wt.call(this,e),this.resetOffset()}},{key:"resetBRTAreaOffset",value:function(){var t=this.data.getSelectedRect(),e=this.data.getClipboardRect();Pt.call(this,t),At.call(this,t),It.call(this,e),zt.call(this,e),this.resetOffset()}},{key:"resetBRLAreaOffset",value:function(){var t=this.data.getSelectedRect(),e=this.data.getClipboardRect();Pt.call(this,t),Rt.call(this,t),It.call(this,e),Dt.call(this,e),this.resetOffset()}},{key:"set",value:function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this.data,i=r.calSelectedRangeByStart(t,e),o=i.sri,a=i.sci;if(n){var l=t,c=e;t<0&&(l=0),e<0&&(c=0),r.selector.setIndexes(l,c),this.indexes=[l,c]}this.moveIndexes=[o,a],this.range=i,this.resetAreaOffset(),this.el.show()}},{key:"setEnd",value:function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this.data,i=this.lastri,o=this.lastci;if(n){if(t===i&&e===o)return;this.lastri=t,this.lastci=e}this.range=r.calSelectedRangeByEnd(t,e),Mt.call(this,this.data.getSelectedRect())}},{key:"reset",value:function(){var t=this.data.selector.range,e=t.eri,n=t.eci;this.setEnd(e,n)}},{key:"showAutofill",value:function(t,e){if(-1!==t||-1!==e){var n=this.range,r=n.sri,i=n.sci,o=n.eri,a=n.eci,l=t,c=e,s=r-t,u=o-t,f=a-e;if(i-e>0)this.arange=new v(r,c,o,i-1);else if(s>0)this.arange=new v(l,i,r-1,a);else if(f<0)this.arange=new v(r,a+1,o,c);else{if(!(u<0))return void(this.arange=null);this.arange=new v(o+1,i,l,a)}if(null!==this.arange){var h=this.data.getRect(this.arange);h.width+=2,h.height+=2;var p=this.br,y=this.l,d=this.t,b=this.tl;p.showAutofill(_t.call(this,h)),y.showAutofill(Tt.call(this,h)),d.showAutofill(Ct.call(this,h)),b.showAutofill(h)}}}},{key:"hideAutofill",value:function(){var t=this;["br","l","t","tl"].forEach(function(e){t[e].hideAutofill()})}},{key:"showClipboard",value:function(){var t=this,e=this.data.getClipboardRect();Wt.call(this,e),["br","l","t","tl"].forEach(function(e){t[e].showClipboard()})}},{key:"hideClipboard",value:function(){var t=this;["br","l","t","tl"].forEach(function(e){t[e].hideClipboard()})}}]),t}();function Ft(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e2&&void 0!==arguments[2]?arguments[2]:"200px";!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.filterItems=[],this.items=e,this.el=a("div","".concat(bt,"-suggest")).css("width",r).hide(),this.itemClick=n,this.itemIndex=-1}var e,n,r;return e=t,(n=[{key:"setOffset",value:function(t){this.el.cssRemoveKeys("top","bottom").offset(t)}},{key:"hide",value:function(){var t=this.el;this.filterItems=[],this.itemIndex=-1,t.hide(),pt(this.el.parent())}},{key:"setItems",value:function(t){this.items=t}},{key:"search",value:function(t){var e,n=this,r=this.items;if(/^\s*$/.test(t)||(r=r.filter(function(e){return(e.key||e).startsWith(t.toUpperCase())})),r=r.map(function(t){var e=t.title;e?"function"==typeof e&&(e=e()):e=t;var r=a("div","".concat(bt,"-item")).child(e).on("click.stop",function(){n.itemClick(t),n.hide()});return t.label&&r.child(a("div","label").html(t.label)),r}),this.filterItems=r,!(r.length<=0)){var i=this.el;(e=i.html("")).children.apply(e,Ft(r)).show(),yt(i.parent(),function(){n.hide()})}}},{key:"bindInputEvents",value:function(t){var e=this;t.on("keydown",function(t){return function(t){var e=t.keyCode;switch(t.ctrlKey&&t.stopPropagation(),e){case 37:t.stopPropagation();break;case 38:(function(t){t.preventDefault(),t.stopPropagation();var e=this.filterItems;e.length<=0||(this.itemIndex>=0&&e[this.itemIndex].toggle(),this.itemIndex-=1,this.itemIndex<0&&(this.itemIndex=e.length-1),e[this.itemIndex].toggle())}).call(this,t);break;case 39:t.stopPropagation();break;case 40:(function(t){t.stopPropagation();var e=this.filterItems;e.length<=0||(this.itemIndex>=0&&e[this.itemIndex].toggle(),this.itemIndex+=1,this.itemIndex>e.length-1&&(this.itemIndex=0),e[this.itemIndex].toggle())}).call(this,t);break;case 13:case 9:Vt.call(this,t);break;default:t.stopPropagation()}}.call(e,t)})}}])&&Ht(e.prototype,n),r&&Ht(e,r),t}();function Bt(t){return(Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Lt(t,e){for(var n=0;nr.width){var u=l;l>c&&(u=c,s+=parseInt(l/c,10),s+=l%c>0?1:0),n.css("width","".concat(u,"px"))}(s*=this.rowHeight)>r.height&&n.css("height","".concat(s,"px"))}}function oe(t,e){var n=this.textEl,r=this.textlineEl;n.el.blur(),n.val(t),r.html(t),function(t){var e=this.textEl.el;setTimeout(function(){e.focus(),e.setSelectionRange(t,t)},0)}.call(this,e)}var ae=function(){function t(e,n,r){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.viewFn=n,this.rowHeight=r,this.formulas=e,this.suggest=new qt(e,function(t){(function(t){var e=this.inputText,n=this.validator,r=0;if(n&&"list"===n.type)this.inputText=t,r=this.inputText.length;else{var i=e.lastIndexOf("="),o=e.substring(0,i+1),a=e.substring(i+1);a=-1!==a.indexOf(")")?a.substring(a.indexOf(")")):"",this.inputText="".concat(o+t.key,"("),r=this.inputText.length,this.inputText+=")".concat(a)}oe.call(this,this.inputText,r)}).call(i,t)}),this.datepicker=new ee,this.datepicker.change(function(t){i.setText(function(t){var e=t.getMonth()+1,n=t.getDate();return e<10&&(e="0".concat(e)),n<10&&(n="0".concat(n)),"".concat(t.getFullYear(),"-").concat(e,"-").concat(n)}(t)),i.clear()}),this.areaEl=a("div","".concat(bt,"-editor-area")).children(this.textEl=a("textarea","").on("input",function(t){return function(t){var e=t.target.value,n=this.suggest,r=this.textlineEl,i=this.validator,o=this.cell;if(null!==o)if("editable"in o&&!0===o.editable||void 0===o.editable){if(this.inputText=e,i)"list"===i.type?n.search(e):n.hide();else{var a=e.lastIndexOf("=");-1!==a?n.search(e.substring(a+1)):n.hide()}r.html(e),ie.call(this),this.change("input",e)}else t.target.value="";else{if(this.inputText=e,i)"list"===i.type?n.search(e):n.hide();else{var l=e.lastIndexOf("=");-1!==l?n.search(e.substring(l+1)):n.hide()}r.html(e),ie.call(this),this.change("input",e)}}.call(i,t)}),this.textlineEl=a("div","textline"),this.suggest.el,this.datepicker.el).on("mousemove.stop",function(){}).on("mousedown.stop",function(){}),this.el=a("div","".concat(bt,"-editor")).child(this.areaEl).hide(),this.suggest.bindInputEvents(this.textEl),this.areaOffset=null,this.freeze={w:0,h:0},this.cell=null,this.inputText="",this.change=function(){}}var e,n,r;return e=t,(n=[{key:"setFreezeLengths",value:function(t,e){this.freeze.w=t,this.freeze.h=e}},{key:"clear",value:function(){""!==this.inputText&&this.change("finished",this.inputText),this.cell=null,this.areaOffset=null,this.inputText="",this.el.hide(),this.textEl.val(""),this.textlineEl.html(""),function(){this.suggest.setItems(this.formulas)}.call(this),this.datepicker.hide()}},{key:"setOffset",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n=this.textEl,r=this.areaEl,i=this.suggest,o=this.freeze,a=this.el;if(t){this.areaOffset=t;var l=t.left,c=t.top,s=t.width,u=t.height,f=t.l,h=t.t,p={left:0,top:0};o.w>f&&o.h>h||(o.wf?p.top=o.h:o.h>h&&(p.left=o.w)),a.offset(p),r.offset({left:l-p.left-.8,top:c-p.top-.8}),n.offset({width:s-9+.8,height:u-3+.8});var y={left:0};y[e]=u,i.setOffset(y),i.hide()}}},{key:"setCell",value:function(t,e){var n=this.el,r=this.datepicker,i=this.suggest;n.show(),this.cell=t;var o=t&&t.text||"";if(this.setText(o),this.validator=e,e){var a=e.type;"date"===a&&(r.show(),/^\s*$/.test(o)||r.setValue(o)),"list"===a&&(i.setItems(e.values()),i.search(""))}}},{key:"setText",value:function(t){this.inputText=t,oe.call(this,t,t.length),ie.call(this)}}])&&ne(e.prototype,n),r&&ne(e,r),t}();function le(t){return(le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ce(t,e){return!e||"object"!==le(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function se(t){return(se=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ue(t,e){return(ue=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var fe=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=ce(this,se(e).call(this,"div","".concat(bt,"-button ").concat(r)))).child(q("button.".concat(t))),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ue(t,e)}(e,o),e}();function he(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0?e-.5:.5}var ke=function(){function t(e,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;ye(this,t),this.x=e,this.y=n,this.width=r,this.height=i,this.padding=o,this.bgcolor="#ffffff",this.borderTop=null,this.borderRight=null,this.borderBottom=null,this.borderLeft=null}return ve(t,[{key:"setBorders",value:function(t){var e=t.top,n=t.bottom,r=t.left,i=t.right;e&&(this.borderTop=e),i&&(this.borderRight=i),n&&(this.borderBottom=n),r&&(this.borderLeft=r)}},{key:"innerWidth",value:function(){return this.width-2*this.padding-2}},{key:"innerHeight",value:function(){return this.height-2*this.padding-2}},{key:"textx",value:function(t){var e=this.width,n=this.padding,r=this.x;return"left"===t?r+=n:"center"===t?r+=e/2:"right"===t&&(r+=e-n),r}},{key:"texty",value:function(t,e){var n=this.height,r=this.padding,i=this.y;return"top"===t?i+=r:"middle"===t?i+=n/2-e/2:"bottom"===t&&(i+=n-r-e),i}},{key:"topxys",value:function(){var t=this.x,e=this.y;return[[t,e],[t+this.width,e]]}},{key:"rightxys",value:function(){var t=this.x,e=this.y,n=this.width;return[[t+n,e],[t+n,e+this.height]]}},{key:"bottomxys",value:function(){var t=this.x,e=this.y,n=this.width,r=this.height;return[[t,e+r],[t+n,e+r]]}},{key:"leftxys",value:function(){var t=this.x,e=this.y;return[[t,e],[t,e+this.height]]}}]),t}();function Oe(t,e,n,r,i,o,a){var l={x:0,y:0};"underline"===t?l.y="bottom"===i?0:"top"===i?-(o+2):-o/2:"strike"===t&&("bottom"===i?l.y=o/2:"top"===i&&(l.y=-(o/2+2))),"center"===r?l.x=a/2:"right"===r&&(l.x=a),this.line([e-l.x,n-l.y],[e-l.x+a,n-l.y])}var Se=function(){function t(e,n,r){ye(this,t),this.el=e,this.ctx=e.getContext("2d"),this.resize(n,r),this.ctx.scale(be(),be())}return ve(t,[{key:"resize",value:function(t,e){this.el.style.width="".concat(t,"px"),this.el.style.height="".concat(e,"px"),this.el.width=me(t),this.el.height=me(e)}},{key:"clear",value:function(){var t=this.el,e=t.width,n=t.height;return this.ctx.clearRect(0,0,e,n),this}},{key:"attr",value:function(t){return Object.assign(this.ctx,t),this}},{key:"save",value:function(){return this.ctx.save(),this.ctx.beginPath(),this}},{key:"restore",value:function(){return this.ctx.restore(),this}},{key:"beginPath",value:function(){return this.ctx.beginPath(),this}},{key:"translate",value:function(t,e){return this.ctx.translate(me(t),me(e)),this}},{key:"clearRect",value:function(t,e,n,r){return this.ctx.clearRect(t,e,n,r),this}},{key:"fillRect",value:function(t,e,n,r){return this.ctx.fillRect(me(t)-.5,me(e)-.5,me(n),me(r)),this}},{key:"fillText",value:function(t,e,n){return this.ctx.fillText(t,me(e),me(n)),this}},{key:"text",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=this.ctx,a=r.align,l=r.valign,c=r.font,s=r.color,u=r.strike,f=r.underline,h=e.textx(a);o.save(),o.beginPath(),this.attr({textAlign:a,textBaseline:l,font:"".concat(c.italic?"italic":""," ").concat(c.bold?"bold":""," ").concat(me(c.size),"px ").concat(c.name),fillStyle:s,strokeStyle:s});var p=t.split("\n"),y=e.innerWidth(),d=[];p.forEach(function(t){var e=o.measureText(t).width;if(i&&e>y){for(var n={w:0,len:0,start:0},r=0;r=y&&(d.push(t.substr(n.start,n.len)),n={w:0,len:0,start:r}),n.len+=1,n.w+=o.measureText(t[r]).width+1;n.len>0&&d.push(t.substr(n.start,n.len))}else d.push(t)});var v=(d.length-1)*(c.size+2),b=e.texty(l,v);return d.forEach(function(t){var e=o.measureText(t).width;n.fillText(t,h,b),u&&Oe.call(n,"strike",h,b,a,l,c.size,e),f&&Oe.call(n,"underline",h,b,a,l,c.size,e),b+=c.size+2}),o.restore(),this}},{key:"border",value:function(t,e){var n=this.ctx;return n.lineWidth=ge,n.strokeStyle=e,"medium"===t?n.lineWidth=me(2)-.5:"thick"===t?n.lineWidth=me(3):"dashed"===t?n.setLineDash([me(3),me(2)]):"dotted"===t?n.setLineDash([me(1),me(1)]):"double"===t&&n.setLineDash([me(2),0]),this}},{key:"line",value:function(){var t=this.ctx;if(arguments.length>1){var e=arguments.length<=0?void 0:arguments[0],n=pe(e,2),r=n[0],i=n[1];t.moveTo(we(r),we(i));for(var o=1;o="a"&&c<="z")r.push(c.toUpperCase());else if(c>="0"&&c<="9"||c>="A"&&c<="Z"||"."===c)r.push(c);else if('"'===c){for(l+=1;'"'!==t.charAt(l);)r.push(t.charAt(l)),l+=1;n.push('"'.concat(r.join(""))),r=[]}else{if("("!==c&&r.length>0&&n.push(r.join("")),")"===c){var s=e.pop();if(2===i)try{for(var u=je(f(n.pop()),2),p=u[0],y=u[1],d=je(f(n.pop()),2),v=d[0],b=d[1],g=0,m=v;m<=p;m+=1)for(var w=b;w<=y;w+=1)n.push(h(m,w)),g+=1;n.push([s,g])}catch(t){}else if(1===i||3===i)3===i&&n.push(o),n.push([s,a]),a=1;else for(;"("!==s&&(n.push(s),!(e.length<=0));)s=e.pop();i=0}else if("="===c||">"===c||"<"===c){var k=t.charAt(l+1);o=c,"="!==k&&"-"!==k||(o+=k,l+=1),i=3}else if(":"===c)i=2;else if(","===c)3===i&&n.push(o),i=1,a+=1;else if("("===c&&r.length>0)e.push(r.join(""));else{if(e.length>0&&("+"===c||"-"===c)){var O=e[e.length-1];if("("!==O&&n.push(e.pop()),"*"===O||"/"===O)for(;e.length>0&&"("!==(O=e[e.length-1]);)n.push(e.pop())}e.push(c)}r=[]}}for(r.length>0&&n.push(r.join(""));e.length>0;)n.push(e.pop());return n},Ce=function(t,e){if(t[0]>="0"&&t[0]<="9")return Number(t);if('"'===t[0])return t.substring(1);var n=je(f(t),2);return e(n[0],n[1])},Te=function(t,e,n,r){for(var i=[],o=0;o"===l||"<"===l){var h=i.pop(),p=Function;i.push(new p("return ".concat(i.pop()," ").concat("="===a?"==":a," ").concat(h))())}else if(Array.isArray(a)){for(var y=je(a,2),d=y[0],v=y[1],b=[],g=0;g="a"&&l<="z"||l>="A"&&l<="Z")&&r.push(a),i.push(Ce(a,n))}}return i[0]},Pe={render:function t(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if("="===e[0]){var o=_e(e.substring(1));return o.length<=0?e:Te(o,n,function(e,o){return t(r(e,o),n,r,i)},i)}return e}};function Ae(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Re(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e3&&void 0!==arguments[3]?arguments[3]:0,i=t.cellRect(e,n),o=i.left,a=i.top,l=i.width,c=i.height;return new ke(o,a+r,l,c,Ue)}function Ke(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=e.sortedRowMap,a=n;o.has(n)&&(a=o.get(n));var l=e.getCell(a,r);if(null!==l){var c=!1;"editable"in l&&!1===l.editable&&(c=!0);var s=e.getCellStyleOrDefault(a,r),u=Xe(e,n,r,i);u.bgcolor=s.bgcolor,void 0!==s.border&&(u.setBorders(s.border),t.strokeBorders(u)),t.rect(u,function(){var i=Pe.render(l.text||"",ze,function(t,n){return e.getCellTextOrDefault(n,t)});s.format&&(i=qe[s.format].render(i));var o=Object.assign({},s.font);o.size=function(t){for(var e=0;e0||h>0){if(f>0){var p=i.clone();p.sri=0,p.eri=f-1,p.h=a,Qe.call(this,p,n,r,o,0),Je.call(this,p,n,r,-c,0),Ge.call(this,"top",p,n,r,o,0)}if(h>0){var y=i.clone();y.sci=0,y.eci=h-1,y.w=o,Qe.call(this,y,n,r,0,a),Ge.call(this,"left",y,n,r,0,a),Je.call(this,y,n,r,0,-s)}var d=t.freezeViewRange();Qe.call(this,d,n,r,0,0),Ge.call(this,"all",d,n,r,0,0),Je.call(this,d,n,r,0,0),function(t,e,n,r){var i=this.draw,o=this.data,a=o.viewWidth()-t,l=o.viewHeight()-e;i.save().translate(t,e).attr({strokeStyle:"rgba(75, 137, 255, .6)"}),i.line([0,r],[a,r]),i.line([n,0],[n,l]),i.restore()}.call(this,n,r,o,a)}}},{key:"clear",value:function(){this.draw.clear()}}])&&Le(e.prototype,n),r&&Le(e,r),t}();function en(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e1&&void 0!==arguments[1]&&arguments[1];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.el=(n=a("div","".concat(bt,"-contextmenu"))).children.apply(n,cn(fn.call(this))).hide(),this.viewFn=e,this.itemClick=function(){},this.isHide=r}var e,n,r;return e=t,(n=[{key:"hide",value:function(){var t=this.el;t.hide(),pt(t)}},{key:"setPosition",value:function(t,e){if(!this.isHide){var n=this.el,r=n.show().offset(),i=r.height,o=r.width,a=this.viewFn(),l=e,c=t;a.height-e<=i&&(l-=i),a.width-t<=o&&(c-=o),n.offset({left:c,top:l}),yt(n)}}}])&&sn(e.prototype,n),r&&sn(e,r),t}();function pn(t,e){for(var n=0;n4?c-4:0),u=4;u0)&&(t=this.contentEl).children.apply(t,arguments)}},{key:"setTitle",value:function(t){this.title.html(t),this.hide()}},{key:"show",value:function(){var t=this;this.contentEl.show(),this.parent().active(),yt(this.parent(),function(){t.hide()})}},{key:"hide",value:function(){this.parent().active(!1),this.contentEl.hide(),pt(this.parent())}}])&&Sn(n.prototype,r),i&&Sn(n,i),e}();function Cn(t){return(Cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Tn(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e'],["medium",''],["thick",''],["dashed",''],["dotted",'']],Lr=function(t){function e(t){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=new Xt("line-type"),o=0,l=Br.map(function(e,n){return a("div","".concat(bt,"-item state ").concat(t===e[0]?"checked":"")).on("click",function(){l[o].toggle("checked"),l[n].toggle("checked"),o=n,r.hide(),r.change(e)}).child(a("div","".concat(bt,"-line-type")).html(e[1]))});return r=Hr(this,(n=Vr(e)).call.apply(n,[this,i,"auto",!1,"bottom-left"].concat(Fr(l))))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&qr(t,e)}(e,_n),e}();function Ur(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0?i.show():i.hide()}var Sa=function(){function t(e,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.data=e,this.change=function(){},this.widthFn=n,this.isHide=i;var o=e.defaultStyle();this.items=[[this.undoEl=new Qo,this.redoEl=new Xo,new ia,this.paintformatEl=new xi,this.clearformatEl=new gi],ka(),[this.formatEl=new wo],ka(),[this.fontEl=new ao,this.fontSizeEl=new Xi],ka(),[this.boldEl=new ur,this.italicEl=new dr,this.underlineEl=new Er,this.strikeEl=new wr,this.textColorEl=new Pi(o.color)],ka(),[this.fillColorEl=new Mi(o.bgcolor),this.borderEl=new ai,this.mergeEl=new Bo],ka(),[this.alignEl=new Hn(o.align),this.valignEl=new Yn(o.valign),this.textwrapEl=new sa],ka(),[this.freezeEl=new Wo,this.autofilterEl=new or,this.formulaEl=new Ro,this.moreEl=new ga]],this.el=a("div","".concat(bt,"-toolbar")),this.btns=a("div","".concat(bt,"-toolbar-btns")),this.items.forEach(function(t){Array.isArray(t)?t.forEach(function(t){r.btns.child(t.el),t.change=function(){r.change.apply(r,arguments)}}):r.btns.child(t.el)}),this.el.child(this.btns),i?this.el.hide():(this.reset(),setTimeout(function(){(function(){var t=this;this.btns2=[],this.items.forEach(function(e){if(Array.isArray(e))e.forEach(function(e){var n=e.el,r=n.box(),i=n.computedStyle(),o=i.marginLeft,a=i.marginRight;t.btns2.push([n,r.width+parseInt(o,10)+parseInt(a,10)])});else{var n=e.box(),r=e.computedStyle(),i=r.marginLeft,o=r.marginRight;t.btns2.push([e,n.width+parseInt(i,10)+parseInt(o,10)])}})}).call(r),Oa.call(r)},0),ft(window,"resize",function(){Oa.call(r)}))}var e,n,r;return e=t,(n=[{key:"paintformatActive",value:function(){return this.paintformatEl.active()}},{key:"paintformatToggle",value:function(){this.paintformatEl.toggle()}},{key:"trigger",value:function(t){this["".concat(t,"El")].click()}},{key:"resetData",value:function(t){this.data=t,this.reset()}},{key:"reset",value:function(){if(!this.isHide){var t=this.data,e=t.getSelectedCellStyle(),n=t.getSelectedCell();this.undoEl.setState(!t.canUndo()),this.redoEl.setState(!t.canRedo()),this.mergeEl.setState(t.canUnmerge(),!t.selector.multiple()),this.autofilterEl.setState(!t.canAutofilter());var r=e.font;this.fontEl.setState(r.name),this.fontSizeEl.setState(r.size),this.boldEl.setState(r.bold),this.italicEl.setState(r.italic),this.underlineEl.setState(e.underline),this.strikeEl.setState(e.strike),this.textColorEl.setState(e.color),this.fillColorEl.setState(e.bgcolor),this.alignEl.setState(e.align),this.valignEl.setState(e.valign),this.textwrapEl.setState(e.textwrap),this.freezeEl.setState(t.freezeIsActive()),n&&n.format&&this.formatEl.setState(n.format)}}}])&&ma(e.prototype,n),r&&ma(e,r),t}();function xa(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e2&&void 0!==arguments[2]?arguments[2]:"600px";!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.title=e,this.el=a("div","".concat(bt,"-modal")).css("width",o).children(a("div","".concat(bt,"-modal-header")).children(new Xt("close").on("click.stop",function(){return i.hide()}),this.title),(r=a("div","".concat(bt,"-modal-content"))).children.apply(r,xa(n))).hide()}var e,n,r;return e=t,(n=[{key:"show",value:function(){var t=this;this.dimmer=a("div","".concat(bt,"-dimmer active")),document.body.appendChild(this.dimmer.el);var e=this.el.show().box(),n=e.width,r=e.height,i=document.documentElement,o=i.clientHeight,l=i.clientWidth;this.el.offset({left:(l-n)/2,top:(o-r)/3}),window.xkeydownEsc=function(e){27===e.keyCode&&t.hide()},ft(window,"keydown",window.xkeydownEsc)}},{key:"hide",value:function(){this.el.hide(),document.body.removeChild(this.dimmer.el),ht(window,"keydown",window.xkeydownEsc),delete window.xkeydownEsc}}])&&Ea(e.prototype,n),r&&Ea(e,r),t}();function _a(t,e){for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:function(t){return t},l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.key=e,this.getTitle=o,this.vchange=function(){},this.el=a("div","".concat(bt,"-form-select")),this.suggest=new qt(n.map(function(t){return{key:t,title:i.getTitle(t)}}),function(t){i.itemClick(t.key),l(t.key),i.vchange(t.key)},r,this.el),this.el.children(this.itemEl=a("div","input-text").html(this.getTitle(e)),this.suggest.el).on("click",function(){return i.show()})}var e,n,r;return e=t,(n=[{key:"show",value:function(){this.suggest.search("")}},{key:"itemClick",value:function(t){this.key=t,this.itemEl.html(this.getTitle(t))}},{key:"val",value:function(t){return void 0!==t?(this.key=t,this.itemEl.html(this.getTitle(t)),this):this.key}}])&&Ta(e.prototype,n),r&&Ta(e,r),t}();function Aa(t,e){for(var n=0;n3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(-1!==e||-1!==n){var o=this.table,a=this.selector,l=this.toolbar;t?a.setEnd(e,n,i):a.set(e,n,r),l.reset(),o.render()}}function Ja(t,e){var n=this.selector,r=this.data,i=r.rows,o=r.cols,a=Xa(n.indexes,2),l=a[0],c=a[1],s=n.range,u=s.eri,f=s.eci;if(t){var h=Xa(n.moveIndexes,2);l=h[0],c=h[1]}"left"===e?c>0&&(c-=1):"right"===e?(f!==c&&(c=f),c0&&(l-=1):"down"===e?(u!==l&&(l=u),lu.width)n.move({left:i+c-u.width});else{var f=t.freezeTotalWidth();au.height)e.move({top:o+s-u.height-1});else{var h=t.freezeTotalHeight();l0||o>0){var a=e.freezeTotalWidth(),l=e.freezeTotalHeight();n.setFreezeLengths(a,l)}t.resetAreaOffset()}.call(this),r.render(),i.reset(),o.reset()}function tl(){var t=this.data,e=this.selector;t.clearClipboard(),e.hideClipboard()}function el(){var t=this.data,e=this.selector;t.copy(),e.showClipboard()}function nl(){var t=this.data,e=this.selector;t.cut(),e.showClipboard()}function rl(t){this.data.paste(t,function(t){return Ya("Tip",t)})&&Qa.call(this)}function il(t){var e=this,n=this.selector,r=this.data,i=this.table,o=this.sortFilter,a=t.offsetX,l=t.offsetY,c=t.target.className==="".concat(bt,"-selector-corner"),s=r.getCellRectByXY(a,l),u=s.left,f=s.top,h=s.width,p=s.height,y=s.ri,d=s.ci,v=r.autoFilter;if(v.includes(y,d)&&u+h-20n.height/2&&(r="bottom"),t.setOffset(e,r)}function al(){var t=this.editor,e=this.data;ol.call(this),t.setCell(e.getSelectedCell(),e.getSelectedValidator()),tl.call(this)}function ll(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"finished",n=this.data,r=this.table;n.setSelectedCellText(t,e),"finished"===e&&r.render()}function cl(t){var e=this.data;"insert-row"===t?e.insert("row"):"delete-row"===t?e.delete("row"):"insert-column"===t?e.insert("column"):"delete-column"===t?e.delete("column"):"delete-cell"===t?e.deleteCell():"delete-cell-format"===t?e.deleteCell("format"):"delete-cell-text"===t?e.deleteCell("text"):"cell-printable"===t?e.setSelectedCellAttr("printable",!0):"cell-non-printable"===t?e.setSelectedCellAttr("printable",!1):"cell-editable"===t?e.setSelectedCellAttr("editable",!0):"cell-non-editable"===t&&e.setSelectedCellAttr("editable",!1),tl.call(this),Qa.call(this)}function sl(t,e){var n=this.data;if("undo"===t)this.undo();else if("redo"===t)this.redo();else if("print"===t)this.print.preview();else if("paintformat"===t)!0===e?el.call(this):tl.call(this);else if("clearformat"===t)cl.call(this,"delete-cell-format");else if("link"===t);else if("chart"===t);else if("autofilter"===t)(function(){this.data.autofilter(),Qa.call(this)}).call(this);else if("freeze"===t)if(e){var r=n.selector,i=r.ri,o=r.ci;this.freeze(i,o)}else this.freeze(0,0);else n.setSelectedCellAttr(t,e),"formula"!==t||n.selector.multiple()||al.call(this),Qa.call(this)}function ul(){var t,e,n,r,i,o,a=this,l=this.overlayerEl,c=this.rowResizer,s=this.colResizer,u=this.verticalScrollbar,f=this.horizontalScrollbar,h=this.editor,p=this.contextMenu,y=this.data,d=this.toolbar,v=this.modalValidation,b=this.sortFilter;l.on("mousemove",function(t){(function(t){if(0===t.buttons&&t.target.className!=="".concat(bt,"-resizer-hover")){var e=t.offsetX,n=t.offsetY,r=this.rowResizer,i=this.colResizer,o=this.tableEl,a=this.data,l=a.rows,c=a.cols;if(e>c.indexWidth&&n>l.height)return r.hide(),void i.hide();var s=o.box(),u=a.getCellRectByXY(t.offsetX,t.offsetY);u.ri>=0&&-1===u.ci?(u.width=c.indexWidth,r.show(u,{width:s.width})):r.hide(),-1===u.ri&&u.ci>=0?(u.height=l.height,i.show(u,{height:s.height})):i.hide()}}).call(a,t)}).on("mousedown",function(t){2===t.buttons?y.xyInSelectedRect(t.offsetX,t.offsetY)?(p.setPosition(t.offsetX,t.offsetY),t.stopPropagation()):p.hide():2===t.detail?al.call(a):(h.clear(),il.call(a,t))}).on("mousewheel.stop",function(t){(function(t){var e=this.verticalScrollbar,n=this.horizontalScrollbar,r=this.data,i=e.scroll().top,o=n.scroll().left,a=r.rows,l=r.cols,c=t.deltaY;if(t.detail&&(c=40*t.detail),c>0){var s=r.scroll.ri+1;s=0&&e.move({top:0===u?0:i-a.getHeight(u)})}if(t.deltaX>0){var f=r.scroll.ci+1;f=0&&n.move({left:0===h?0:o-l.getWidth(h)})}}).call(a,t)}).on("mouseout",function(t){var e=t.offsetX;t.offsetY<=0&&s.hide(),e<=0&&c.hide()}),t=l.el,n=(e={move:function(t,e){(function(t,e){var n=this.verticalScrollbar,r=this.horizontalScrollbar,i=n.scroll().top,o=r.scroll().left;"left"===t||"right"===t?r.move({left:o-e}):"up"!==t&&"down"!==t||n.move({top:i-e})}).call(a,t,e)}}).move,r=e.end,i=0,o=0,ft(t,"touchstart",function(t){var e=t.touches[0],n=e.pageX,r=e.pageY;i=n,o=r}),ft(t,"touchmove",function(t){if(n){var e=t.changedTouches[0],r=e.pageX,a=e.pageY,l=r-i,c=a-o;(Math.abs(l)>10||Math.abs(c)>10)&&(vt(l,c,t,n),i=r,o=a),t.preventDefault()}}),ft(t,"touchend",function(t){if(r){var e=t.changedTouches[0],n=e.pageX,a=e.pageY;vt(n-i,a-o,t,r)}}),d.change=function(t,e){return sl.call(a,t,e)},b.ok=function(t,e,n,r){return function(t,e,n,r){this.data.setAutoFilter(t,e,n,r),Qa.call(this)}.call(a,t,e,n,r)},c.finishedFn=function(t,e){(function(t,e){var n=t.ri,r=this.table,i=this.selector;this.data.rows.setHeight(n,e),r.render(),i.resetAreaOffset(),Za.call(this),ol.call(this)}).call(a,t,e)},s.finishedFn=function(t,e){(function(t,e){var n=t.ci,r=this.table,i=this.selector;this.data.cols.setWidth(n,e),r.render(),i.resetAreaOffset(),Ga.call(this),ol.call(this)}).call(a,t,e)},u.moveFn=function(t,e){(function(t){var e=this,n=this.data,r=this.table,i=this.selector;n.scrolly(t,function(){i.resetBRLAreaOffset(),ol.call(e),r.render()})}).call(a,t,e)},f.moveFn=function(t,e){(function(t){var e=this,n=this.data,r=this.table,i=this.selector;n.scrollx(t,function(){i.resetBRTAreaOffset(),ol.call(e),r.render()})}).call(a,t,e)},h.change=function(t,e){ll.call(a,e,t)},v.change=function(t){if("save"===t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r=65&&e<=90||e>=48&&e<=57||e>=96&&e<=105||"="===t.key?(ll.call(a,t.key,"input"),al.call(a)):113===e&&al.call(a)}}})}var fl=function(){function t(e,n){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var i=n.settings,o=i.view,l=i.showToolbar,c=i.showContextmenu;this.el=a("div","".concat(bt,"-sheet")),this.toolbar=new Sa(n,o.width,!l),this.print=new ln(n),e.children(this.toolbar.el,this.el,this.print.el),this.data=n,this.tableEl=a("canvas","".concat(bt,"-table")),this.rowResizer=new mt(!1,n.rows.height),this.colResizer=new mt(!0,n.cols.minWidth),this.verticalScrollbar=new kt(!0),this.horizontalScrollbar=new kt(!1),this.editor=new ae(Ie,function(){return r.getTableOffset()},n.rows.height),this.modalValidation=new Ha,this.contextMenu=new hn(function(){return r.getTableOffset()},!c),this.selector=new Nt(n),this.overlayerCEl=a("div","".concat(bt,"-overlayer-content")).children(this.editor.el,this.selector.el),this.overlayerEl=a("div","".concat(bt,"-overlayer")).child(this.overlayerCEl),this.sortFilter=new Ua,this.el.children(this.tableEl,this.overlayerEl.el,this.rowResizer.el,this.colResizer.el,this.verticalScrollbar.el,this.horizontalScrollbar.el,this.contextMenu.el,this.modalValidation.el,this.sortFilter.el),this.table=new tn(this.tableEl.el,n),ul.call(this),Qa.call(this),Ka.call(this,!1,0,0)}var e,n,r;return e=t,(n=[{key:"resetData",value:function(t){this.data=t,this.toolbar.resetData(t),this.print.resetData(t),this.selector.resetData(t),this.table.resetData(t)}},{key:"loadData",value:function(t){return this.data.setData(t),Qa.call(this),this}},{key:"freeze",value:function(t,e){return this.data.setFreeze(t,e),Qa.call(this),this}},{key:"undo",value:function(){this.data.undo(),Qa.call(this)}},{key:"redo",value:function(){this.data.redo(),Qa.call(this)}},{key:"reload",value:function(){return Qa.call(this),this}},{key:"getRect",value:function(){var t=this.data;return{width:t.viewWidth(),height:t.viewHeight()}}},{key:"getTableOffset",value:function(){var t=this.data,e=t.rows,n=t.cols,r=this.getRect(),i=r.width,o=r.height;return{width:i-n.indexWidth,height:o-e.height,left:n.indexWidth,top:e.height}}}])&&$a(e.prototype,n),r&&$a(e,r),t}();function hl(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function pl(t){return(pl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function yl(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0&&void 0!==arguments[0]?arguments[0]:function(){},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};dl(this,t),this.swapFunc=r,this.dataNames=[],this.activeEl=null,this.deleteEl=null,this.items=[],this.moreEl=new kl(function(t){e.clickSwap2(e.items[t])}),this.contextMenu=new xl,this.contextMenu.itemClick=i,this.el=a("div","".concat(bt,"-bottombar")).children(this.contextMenu.el,this.menuEl=a("ul","".concat(bt,"-menu")).child(a("li","").children(new Xt("add").on("click",function(){e.dataNames.length<10?n():Ya("tip","it less than or equal to 10")}),a("span","").child(this.moreEl))))}return bl(t,[{key:"addItem",value:function(t,e){var n=this,r=t.name;this.dataNames.push(r);var i=a("li",e?"active":"").child(r);i.on("click",function(){n.clickSwap2(i)}).on("contextmenu",function(t){var e=t.target,r=e.offsetLeft,o=e.offsetHeight;n.contextMenu.setOffset({left:r,bottom:o+1}),n.deleteEl=i}),e&&this.clickSwap(i),this.items.push(i),this.menuEl.child(i),this.moreEl.reset(this.dataNames)}},{key:"deleteItem",value:function(){var t=this.activeEl,e=this.deleteEl;if(this.items.length>1){var n=this.items.findIndex(function(t){return t===e});if(this.items.splice(n,1),this.dataNames.splice(n,1),this.menuEl.removeChild(e.el),t===e){var r=hl(this.items,1)[0];this.activeEl=r,this.activeEl.toggle()}return n}return-1}},{key:"clickSwap2",value:function(t){var e=this.items.findIndex(function(e){return e===t});this.clickSwap(t),this.activeEl.toggle(),this.swapFunc(e)}},{key:"clickSwap",value:function(t){null!==this.activeEl&&this.activeEl.toggle(),this.activeEl=t}}]),t}();n(1);function jl(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function _l(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var i=e;this.options=r,this.sheetIndex=1,this.datas=[],"string"==typeof e&&(i=document.querySelector(e)),this.bottombar=new El(function(){var t=n.addSheet();n.sheet.resetData(t)},function(t){var e=n.datas[t];n.sheet.resetData(e)},function(){var t=n.deleteSheet();null!==t&&n.sheet.resetData(t)}),this.data=this.addSheet();var o=a("div","".concat(bt)).on("contextmenu",function(t){return t.preventDefault()});i.appendChild(o.el),this.sheet=new fl(o,this.data),o.child(this.bottombar.el)}var e,n,r;return e=t,r=[{key:"locale",value:function(t,e){L(t,e)}}],(n=[{key:"addSheet",value:function(t){var e=t||"sheet".concat(this.sheetIndex),n=new ut(e,this.options);return this.datas.push(n),this.bottombar.addItem(n,!0),this.sheetIndex+=1,n}},{key:"deleteSheet",value:function(){var t=this.bottombar.deleteItem();if(t>=0){var e=jl(this.datas.splice(t,1),1)[0];return this.sheetIndex-=1,e}return null}},{key:"loadData",value:function(t){var e=Array.isArray(t)?t[0]:t;return this.sheet.loadData(e),this}},{key:"getData",value:function(){return this.datas.map(function(t){return t.getData()})}},{key:"validate",value:function(){return this.data.validations.errors.size<=0}},{key:"change",value:function(t){return this.data.change=t,this}}])&&_l(e.prototype,n),r&&_l(e,r),t}(),Tl=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Cl(t,e)};window&&(window.x=window.x||{},window.x.spreadsheet=Tl,window.x.spreadsheet.locale=function(t,e){return L(t,e)});e.default=Cl}]); +!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=2)}([function(t,e){},function(t,e,n){},function(t,e,n){"use strict";function r(t){return function(t){if(Array.isArray(t))return t}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"";!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),"string"==typeof e?(this.el=document.createElement(e),this.el.className=n):this.el=e,this.data={}}var e,n,o;return e=t,(n=[{key:"data",value:function(t,e){return void 0!==e?(this.data[t]=e,this):this.data[t]}},{key:"on",value:function(t,e){var n=r(t.split(".")),i=n[0],o=n.slice(1),a=i;return"mousewheel"===a&&/Firefox/i.test(window.navigator.userAgent)&&(a="DOMMouseScroll"),this.el.addEventListener(a,function(t){e(t);for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"active";return this.toggleClass(t)}},{key:"toggleClass",value:function(t){return this.el.classList.toggle(t)}},{key:"active",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"active";return t?this.addClass(e):this.removeClass(e),this}},{key:"checked",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.active(t,"checked"),this}},{key:"disabled",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return t?this.addClass("disabled"):this.removeClass("disabled"),this}},{key:"attr",value:function(t,e){var n=this;if(void 0!==e)this.el.setAttribute(t,e);else{if("string"==typeof t)return this.el.getAttribute(t);Object.keys(t).forEach(function(e){n.el.setAttribute(e,t[e])})}return this}},{key:"removeAttr",value:function(t){return this.el.removeAttribute(t),this}},{key:"html",value:function(t){return void 0!==t?(this.el.innerHTML=t,this):this.el.innerHTML}},{key:"val",value:function(t){return void 0!==t?(this.el.value=t,this):this.el.value}},{key:"cssRemoveKeys",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:"";return new o(t,e)};n(0);function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var c=["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"];function s(t){for(var e="",n=t;n>=c.length;)n/=c.length,n-=1,e+=c[parseInt(n,10)%c.length];var r=t%c.length;return e+=c[r]}function u(t){for(var e=0,n=0;n="0"&&t.charAt(r)<="9"?n+=t.charAt(r):e+=t.charAt(r);return[u(e),parseInt(n,10)-1]}function h(t,e){return"".concat(s(t)).concat(e+1)}function p(t,e,n){var r=l(f(t),2);return h(r[0]+e,r[1]+n)}function y(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function d(t,e){for(var n=0;n4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sri=e,this.sci=n,this.eri=r,this.eci=i,this.w=o,this.h=a}var e,n,r;return e=t,r=[{key:"valueOf",value:function(e){var n=e.split(":"),r=y(f(n[0]),2),i=r[0],o=r[1],a=o,l=i;if(n.length>1){var c=y(f(n[1]),2);l=c[0],a=c[1]}return new t(o,i,a,l)}}],(n=[{key:"set",value:function(t,e,n,r){this.sri=t,this.sci=e,this.eri=n,this.eci=r}},{key:"multiple",value:function(){return this.eri-this.sri>0||this.eci-this.sci>0}},{key:"includes",value:function(){for(var t=0,e=0,n=arguments.length,r=new Array(n),i=0;i1&&void 0!==arguments[1]?arguments[1]:function(){return!0},n=this.sri,r=this.sci,i=this.eri,o=this.eci,a=n;a<=i;a+=1)if(e(a))for(var l=r;l<=o;l+=1)t(a,l)}},{key:"contains",value:function(t){return this.sri<=t.sri&&this.sci<=t.sci&&this.eri>=t.eri&&this.eci>=t.eci}},{key:"within",value:function(t){return this.sri>=t.sri&&this.sci>=t.sci&&this.eri<=t.eri&&this.eci<=t.eci}},{key:"disjoint",value:function(t){return this.sri>t.eri||this.sci>t.eci||t.sri>this.eri||t.sci>this.eci}},{key:"intersects",value:function(t){return this.sri<=t.eri&&this.sci<=t.eci&&t.sri<=this.eri&&t.sci<=this.eci}},{key:"union",value:function(e){var n=this.sri,r=this.sci,i=this.eri,o=this.eci;return new t(e.srii?e.eri:i,e.eci>o?e.eci:o)}},{key:"difference",value:function(e){var n=[],r=function(e,r,i,o){n.push(new t(e,r,i,o))},i=this.sri,o=this.sci,a=this.eri,l=this.eci,c=e.sri-i,s=e.sci-o,u=a-e.eri,f=l-e.eci;return c>0?(r(i,o,e.sri-1,l),u>0?(r(e.eri+1,o,a,l),s>0&&r(e.sri,o,e.eri,e.sci-1),f>0&&r(e.sri,e.eci+1,e.eri,l)):(s>0&&r(e.sri,o,a,e.sci-1),f>0&&r(e.sri,e.eci+1,a,l))):u>0&&(r(e.eri+1,o,a,l),s>0&&r(i,o,e.eri,e.sci-1),f>0&&r(i,e.eci+1,e.eri,l)),s>0?(r(i,o,a,e.sci-1),f>0?(r(i,e.eri+1,a,l),c>0&&r(i,e.sci,e.sri-1,e.eci),u>0&&r(e.sri+1,e.sci,a,e.eci)):(c>0&&r(i,e.sci,e.sri-1,l),u>0&&r(e.sri+1,e.sci,a,l))):f>0&&(r(a,e.eci+1,a,l),c>0&&r(i,o,e.sri-1,e.eci),u>0&&r(e.eri+1,o,a,e.eci)),n}},{key:"size",value:function(){return[this.eri-this.sri+1,this.eci-this.sci+1]}},{key:"toString",value:function(){var t=this.sri,e=this.sci,n=this.eri,r=this.eci,i=h(e,t);return this.multiple()&&(i="".concat(i,":").concat(h(r,n))),i}},{key:"clone",value:function(){return new t(this.sri,this.sci,this.eri,this.eci,this.w,this.h)}},{key:"equals",value:function(t){return this.eri===t.eri&&this.eci===t.eci&&this.sri===t.sri&&this.sci===t.sci}}])&&d(e.prototype,n),r&&d(e,r),t}();function b(t,e){for(var n=0;n0}},{key:"canRedo",value:function(){return this.redoItems.length>0}},{key:"undo",value:function(t,e){var n=this.undoItems,r=this.redoItems;this.canUndo()&&(r.push(JSON.stringify(t)),e(JSON.parse(n.pop())))}},{key:"redo",value:function(t,e){var n=this.undoItems,r=this.redoItems;this.canRedo()&&(n.push(JSON.stringify(t)),e(JSON.parse(r.pop())))}}])&&w(e.prototype,n),r&&w(e,r),t}();function O(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._=e}var e,n,r;return e=t,(n=[{key:"forEach",value:function(t){this._.forEach(t)}},{key:"deleteWithin",value:function(t){this._=this._.filter(function(e){return!e.within(t)})}},{key:"getFirstIncludes",value:function(t,e){for(var n=0;n=e?(s.sri+=n,s.eri+=n):o=e?(s.sci+=n,s.eci+=n):a0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length,r=new Array(n>1?n-1:0),i=1;i1&&void 0!==arguments[1]?arguments[1]:function(t){return t},n=0,r=0;return Object.keys(t).forEach(function(i){n+=e(t[i],i),r+=1}),[n,r]},rangeEach:function(t,e,n){for(var r=t;ri);c+=1)a+=l=o(c);return[c,a-l,l]},deleteProperty:function(t,e){var n=t["".concat(e)];return delete t["".concat(e)],n}};function I(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function z(t,e){for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:"all",i=this.getOrNew(t);"all"===r?i.cells[e]=n:"text"===r?(i.cells[e]=i.cells[e]||{},i.cells[e].text=n.text):"format"===r&&(i.cells[e]=i.cells[e]||{},i.cells[e].style=n.style,n.merge&&(i.cells[e].merge=n.merge))}},{key:"setCellText",value:function(t,e,n){this.getCellOrNew(t,e).text=n}},{key:"copyPaste",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){},o=t.sri,a=t.sci,l=t.eri,c=t.eci,s=e.sri,u=e.sci,f=e.eri,h=e.eci,y=t.size(),d=I(y,2),v=d[0],b=d[1],g=e.size(),m=I(g,2),w=m[0],k=m[1],O=!0,S=0;(f0&&function(){var t=P.text,e=_-u+(j-s)+2;if(O||(e-=S+1),"="===t[0])P.text=t.replace(/\w{1,3}\d/g,function(t){var n=0,r=0;return o===s?n=e-1:r=e-1,p(t,n,r)});else{var n=/[\\.\d]+$/.exec(t);if(null!==n){var r=Number(n[0])+e-1;P.text=t.substring(0,n.index)+r}}}(),this.setCell(C,T,P,n),i(C,T,P)}}},{key:"cutPaste",value:function(t,e){var n=this,r={};this.each(function(i){n.eachCells(i,function(o){var a=parseInt(i,10),l=parseInt(o,10);t.includes(i,o)&&(a=e.sri+(a-t.sri),l=e.sci+(l-t.sci)),r[a]=r[a]||{cells:{}},r[a].cells[l]=n._[i].cells[o]})}),this._=r}},{key:"paste",value:function(t,e){var n=this;if(!(t.length<=0)){var r=e.sri,i=e.sci;t.forEach(function(t,e){var o=r+e;t.forEach(function(t,e){var r=i+e;n.setCellText(o,r,t)})})}}},{key:"insert",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n={};this.each(function(r,i){var o=parseInt(r,10);o>=t&&(o+=e),n[o]=i}),this._=n,this.len+=e}},{key:"delete",value:function(t,e){var n=e-t+1,r={};this.each(function(i,o){var a=parseInt(i,10);ae&&(r[a-n]=o)}),this._=r,this.len-=n}},{key:"insertColumn",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.each(function(r,i){var o={};e.eachCells(r,function(e,r){var i=parseInt(e,10);i>=t&&(i+=n),o[i]=r}),i.cells=o})}},{key:"deleteColumn",value:function(t,e){var n=this,r=e-t+1;this.each(function(i,o){var a={};n.eachCells(i,function(n,i){var o=parseInt(n,10);oe&&(a[o-r]=i)}),o.cells=a})}},{key:"deleteCells",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";t.each(function(t,r){e.deleteCell(t,r,n)})}},{key:"deleteCell",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"all",r=this.get(t);if(null!==r){var i=this.getCell(t,e);null!==i&&("all"===n?delete r.cells[e]:"text"===n?(i.text&&delete i.text,i.value&&delete i.value):"format"===n?(void 0!==i.style&&delete i.style,i.merge&&delete i.merge):"merge"===n&&i.merge&&delete i.merge)}}},{key:"maxCell",value:function(){var t=Object.keys(this._),e=t[t.length-1],n=this._[e];if(n){var r=n.cells,i=Object.keys(r),o=i[i.length-1];return[parseInt(e,10),parseInt(o,10)]}return[0,0]}},{key:"each",value:function(t){Object.entries(this._).forEach(function(e){var n=I(e,2),r=n[0],i=n[1];t(r,i)})}},{key:"eachCells",value:function(t,e){this._[t]&&this._[t].cells&&Object.entries(this._[t].cells).forEach(function(t){var n=I(t,2),r=n[0],i=n[1];e(r,i)})}},{key:"setData",value:function(t){t.len&&(this.len=t.len,delete t.len),this._=t}},{key:"getData",value:function(){var t=this.len;return Object.assign({len:t},this._)}}])&&z(e.prototype,n),r&&z(e,r),t}();function N(t,e){for(var n=0;n A",asc:"Sort A -> Z"},filter:{empty:"empty"},dataValidation:{mode:"Mode",range:"Cell Range",criteria:"Criteria",modeType:{cell:"Cell",column:"Colun",row:"Row"},type:{list:"List",number:"Number",date:"Date",phone:"Phone",email:"Email"},operator:{be:"between",nbe:"not betwwen",lt:"less than",lte:"less than or equal to",gt:"greater than",gte:"greater than or equal to",eq:"equal to",neq:"not equal to"}}}};function V(t,e){if(e&&e[F])for(var n=e[F],r=t.split("."),i=0;i2?r-2:0),o=2;o=this.parseValue(l)&&o<=this.parseValue(c),"between",l,c)}if("nbe"===n){var s=U(r,2),u=s[0],f=s[1];return X(othis.parseValue(f),"notBetween",u,f)}if("eq"===n)return X(o===this.parseValue(r),"equal",r);if("neq"===n)return X(o!==this.parseValue(r),"notEqual",r);if("lt"===n)return X(othis.parseValue(r),"greaterThan",r);if("gte"===n)return X(o>=this.parseValue(r),"greaterThanEqual",r)}return[!0]}}])&&Y(e.prototype,n),r&&Y(e,r),t}();function J(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Z(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function G(t,e){for(var n=0;n0}).map(function(t){return t.getData()})}},{key:"setData",value:function(t){this._=t.map(function(t){return tt.valueOf(t)})}}]),t}();function nt(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e2&&void 0!==arguments[2]?arguments[2]:function(){},r=this.merges,i=e.clone(),o=it(t.size(),2),a=o[0],l=o[1],c=it(e.size(),2),s=c[0],u=c[1];return a>s&&(i.eri=e.sri+a-1),l>u&&(i.eci=e.sci+l-1),!r.intersects(i)||(n(q("error.pasteForMergedCell")),!1)}function lt(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.rows,o=this.merges;"all"!==n&&"format"!==n||(i.deleteCells(e,n),o.deleteWithin(e)),i.copyPaste(t,e,n,r,function(t,e,n){if(n&&n.merge){var r=it(n.merge,2),i=r[0],a=r[1];if(i<=0&&a<=0)return;o.add(new v(t,e,t+i,e+a))}})}function ct(t,e){var n=this.clipboard,r=this.rows,i=this.merges;r.cutPaste(t,e),i.move(t,e.sri-t.sri,e.sci-t.sci),n.clear()}function st(t,e,n){var r=this.styles,i=this.rows.getCellOrNew(t,e),o={};void 0!==i.style&&(o=D.cloneDeep(r[i.style])),Object.assign(o,{border:n}),i.style=this.addStyle(o)}var ut=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.settings=D.merge(ot,n||{}),this.name=e||"sheet",this.freeze=[0,0],this.styles=[],this.merges=new A,this.rows=new M(this.settings.row),this.cols=new W(this.settings.col),this.validations=new et,this.hyperlinks={},this.comments={},this.selector=new g,this.scroll=new m,this.history=new k,this.clipboard=new S,this.autoFilter=new T,this.change=function(){},this.exceptRowSet=new Set,this.sortedRowMap=new Map,this.unsortedRowMap=new Map}var e,n,r;return e=t,(n=[{key:"addValidation",value:function(t,e,n){var r=this;this.changeData(function(){r.validations.add(t,e,n)})}},{key:"removeValidation",value:function(){var t=this,e=this.selector.range;this.changeData(function(){t.validations.remove(e)})}},{key:"getSelectedValidator",value:function(){var t=this.selector,e=t.ri,n=t.ci,r=this.validations.get(e,n);return r?r.validator:null}},{key:"getSelectedValidation",value:function(){var t=this.selector,e=t.ri,n=t.ci,r=t.range,i=this.validations.get(e,n),o={ref:r.toString()};return null!==i&&(o.mode=i.mode,o.validator=i.validator),o}},{key:"canUndo",value:function(){return this.history.canUndo()}},{key:"canRedo",value:function(){return this.history.canRedo()}},{key:"undo",value:function(){var t=this;this.history.undo(this.getData(),function(e){t.setData(e)})}},{key:"redo",value:function(){var t=this;this.history.redo(this.getData(),function(e){t.setData(e)})}},{key:"copy",value:function(){this.clipboard.copy(this.selector.range)}},{key:"cut",value:function(){this.clipboard.cut(this.selector.range)}},{key:"paste",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=this.clipboard,i=this.selector;return!r.isClear()&&(!!at.call(this,r.range,i.range,n)&&(this.changeData(function(){r.isCopy()?lt.call(t,r.range,i.range,e):r.isCut()&&ct.call(t,r.range,i.range)}),!0))}},{key:"pasteFromText",value:function(t){var e=t.split("\r\n").map(function(t){return t.replace(/"/g,"").split("\t")});e.length>0&&(e.length-=1);var n=this.rows,r=this.selector;this.changeData(function(){n.paste(e,r.range)})}},{key:"autofill",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},i=this.selector.range;return!!at.call(this,i,t,r)&&(this.changeData(function(){lt.call(n,i,t,e,!0)}),!0)}},{key:"clearClipboard",value:function(){this.clipboard.clear()}},{key:"calSelectedRangeByEnd",value:function(t,e){var n=this.selector,r=this.rows,i=this.cols,o=this.merges,a=n.range,l=a.sri,c=a.sci,s=a.eri,u=a.eci,f=n.ri,h=n.ci,p=t,y=e;return t<0&&(p=r.len-1),e<0&&(y=i.len-1),p>f?(l=f,s=p):(l=p,s=f),y>h?(c=h,u=y):(c=y,u=h),n.range=o.union(new v(l,c,s,u)),n.range=o.union(n.range),n.range}},{key:"calSelectedRangeByStart",value:function(t,e){var n=this.selector,r=this.rows,i=this.cols,o=this.merges.getFirstIncludes(t,e);return null===o&&(o=new v(t,e,t,e),-1===t&&(o.sri=0,o.eri=r.len-1),-1===e&&(o.sci=0,o.eci=i.len-1)),n.range=o,o}},{key:"setSelectedCellAttr",value:function(t,e){var n=this;this.changeData(function(){var r=n.selector,i=n.styles,o=n.rows;if("merge"===t)e?n.merge():n.unmerge();else if("border"===t)(function(t){var e=this,n=t.mode,r=t.style,i=t.color,o=this.styles,a=this.selector,l=this.rows,c=a.range,s=c.sri,u=c.sci,f=c.eri,h=c.eci,p=!this.isSignleSelected();if(p||"inside"!==n&&"horizontal"!==n&&"vertical"!==n)if("outside"!==n||p){if("none"===n)a.range.each(function(t,n){var r=l.getCell(t,n);if(r&&void 0!==r.style){var i=D.cloneDeep(o[r.style]);delete i.border,r.style=e.addStyle(i)}});else if("all"===n||"inside"===n||"outside"===n||"horizontal"===n||"vertical"===n)!function(){for(var t=[],o=s;o<=f;o+=1)for(var a=u;a<=h;a+=1){for(var c=[],y=0;yh)break;var w=l.getCell(o,a),k=0,O=0;if(w&&w.merge){var S=it(w.merge,2);k=S[0],O=S[1],t.push([o,a,k,O])}var x=k>0&&o+k===f,E=O>0&&a+O===h,j={};"all"===n?j={bottom:[r,i],top:[r,i],left:[r,i],right:[r,i]}:"inside"===n?(!E&&a0&&st.call(e,o,a,j),a+=O}}();else if("top"===n||"bottom"===n)for(var y=u;y<=h;y+=1)"top"===n&&(st.call(this,s,y,{top:[r,i]}),y+=l.getCellMerge(s,y)[1]),"bottom"===n&&(st.call(this,f,y,{bottom:[r,i]}),y+=l.getCellMerge(f,y)[1]);else if("left"===n||"right"===n)for(var d=s;d<=f;d+=1)"left"===n&&(st.call(this,d,u,{left:[r,i]}),d+=l.getCellMerge(d,u)[0]),"right"===n&&(st.call(this,d,h,{right:[r,i]}),d+=l.getCellMerge(d,h)[0])}else st.call(this,s,u,{top:[r,i],bottom:[r,i],left:[r,i],right:[r,i]})}).call(n,e);else if("formula"===t){var a=r.ri,l=r.ci,c=r.range;if(r.multiple()){var s=it(r.size(),2),u=s[0],f=s[1],p=c.sri,y=c.sci,d=c.eri,v=c.eci;if(u>1)for(var b=y;b<=v;b+=1){o.getCellOrNew(d+1,b).text="=".concat(e,"(").concat(h(b,p),":").concat(h(b,d),")")}else if(f>1){o.getCellOrNew(a,v+1).text="=".concat(e,"(").concat(h(y,a),":").concat(h(v,a),")")}}else{o.getCellOrNew(a,l).text="=".concat(e,"()")}}else r.range.each(function(r,a){var l=o.getCellOrNew(r,a),c={};if(void 0!==l.style&&(c=D.cloneDeep(i[l.style])),"format"===t)c.format=e,l.style=n.addStyle(c);else if("font-bold"===t||"font-italic"===t||"font-name"===t||"font-size"===t){var s={};s[t.split("-")[1]]=e,c.font=Object.assign(c.font||{},s),l.style=n.addStyle(c)}else"strike"===t||"textwrap"===t||"underline"===t||"align"===t||"valign"===t||"color"===t||"bgcolor"===t?(c[t]=e,l.style=n.addStyle(c)):l[t]=e})})}},{key:"setSelectedCellText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"input",n=this.autoFilter,r=this.selector,i=this.rows,o=r.ri,a=r.ci,l=o;this.unsortedRowMap.has(o)&&(l=this.unsortedRowMap.get(o));var c=i.getCell(l,a),s=c?c.text:"";if(this.setCellText(l,a,t,e),n.active()){var u=n.getFilter(a);if(u){var f=u.value.findIndex(function(t){return t===s});f>=0&&u.value.splice(f,1,t)}}}},{key:"getSelectedCell",value:function(){var t=this.selector,e=t.ri,n=t.ci,r=e;return this.unsortedRowMap.has(e)&&(r=this.unsortedRowMap.get(e)),this.rows.getCell(r,n)}},{key:"xyInSelectedRect",value:function(t,e){var n=this.getSelectedRect(),r=n.left,i=n.top,o=n.width,a=n.height,l=t-this.cols.indexWidth,c=e-this.rows.height;return l>r&&li&&c0&&v>s&&(p=s),d>0&&d>u&&(y=u),{l:s,t:u,left:p,top:y,height:f,width:h,scroll:e}}},{key:"getCellRectByXY",value:function(t,e){var n=this.scroll,r=this.merges,i=this.rows,o=this.cols,a=function(t,e){var n=this.rows,r=this.freezeTotalHeight(),i=n.height;r+n.heightt);a+=1)o.has(a)||(l+=c=n.getHeight(a));return(l-=c)<=0?{ri:-1,top:0,height:c}:{ri:a-1,top:l,height:c}}.call(this,e,n.y),l=a.ri,c=a.top,s=a.height,u=function(t,e){var n=this.cols,r=this.freezeTotalWidth(),i=n.indexWidth;r+n.indexWidth=0||f>=0){var y=r.getFirstIncludes(l,f);if(y){l=y.sri,f=y.sci;var d=this.cellRect(l,f);h=d.left,c=d.top,p=d.width,s=d.height}}return{ri:l,ci:f,left:h,top:c,width:p,height:s}}},{key:"isSignleSelected",value:function(){var t=this.selector.range,e=t.sri,n=t.sci,r=t.eri,i=t.eci,o=this.getCell(e,n);if(o&&o.merge){var a=it(o.merge,2),l=a[0],c=a[1];if(e+l===r&&n+c===i)return!0}return!this.selector.multiple()}},{key:"canUnmerge",value:function(){var t=this.selector.range,e=t.sri,n=t.sci,r=t.eri,i=t.eci,o=this.getCell(e,n);if(o&&o.merge){var a=it(o.merge,2),l=a[0],c=a[1];if(e+l===r&&n+c===i)return!0}return!1}},{key:"merge",value:function(){var t=this,e=this.selector,n=this.rows;if(!this.isSignleSelected()){var r=it(e.size(),2),i=r[0],o=r[1];if(i>1||o>1){var a=e.range,l=a.sri,c=a.sci;this.changeData(function(){var r=n.getCellOrNew(l,c);r.merge=[i-1,o-1],t.merges.add(e.range),t.rows.deleteCells(e.range),t.rows.setCell(l,c,r)})}}}},{key:"unmerge",value:function(){var t=this,e=this.selector;if(this.isSignleSelected()){var n=e.range,r=n.sri,i=n.sci;this.changeData(function(){t.rows.deleteCell(r,i,"merge"),t.merges.deleteWithin(e.range)})}}},{key:"canAutofilter",value:function(){return!this.autoFilter.active()}},{key:"autofilter",value:function(){var t=this,e=this.autoFilter,n=this.selector;this.changeData(function(){e.active()?(e.clear(),t.exceptRowSet=new Set,t.sortedRowMap=new Map,t.unsortedRowMap=new Map):e.ref=n.range.toString()})}},{key:"setAutoFilter",value:function(t,e,n,r){var i=this.autoFilter;i.addFilter(t,n,r),i.setSort(t,e),this.resetAutoFilter()}},{key:"resetAutoFilter",value:function(){var t=this,e=this.autoFilter,n=this.rows;if(e.active()){var r=e.sort,i=e.filteredRows(function(t,e){return n.getCell(t,e)}),o=i.rset,a=i.fset,l=Array.from(a),c=Array.from(a);r&&l.sort(function(t,e){return"asc"===r.order?t-e:"desc"===r.order?e-t:0}),this.exceptRowSet=o,this.sortedRowMap=new Map,this.unsortedRowMap=new Map,l.forEach(function(e,n){t.sortedRowMap.set(c[n],e),t.unsortedRowMap.set(e,c[n])})}}},{key:"deleteCell",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all",n=this.selector;this.changeData(function(){t.rows.deleteCells(n.range,e),"all"!==e&&"format"!==e||t.merges.deleteWithin(n.range)})}},{key:"insert",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.changeData(function(){var r=e.selector.range,i=r.sri,o=r.sci,a=e.rows,l=e.merges,c=e.cols,s=i;"row"===t?a.insert(i,n):"column"===t&&(a.insertColumn(o,n),s=o,c.len+=1),l.shift(t,s,n,function(t,e,n,r){var i=a.getCell(t,e);i.merge[0]+=n,i.merge[1]+=r})})}},{key:"delete",value:function(t){var e=this;this.changeData(function(){var n=e.rows,r=e.merges,i=e.selector,o=e.cols,a=i.range,l=i.range,c=l.sri,s=l.sci,u=l.eri,f=l.eci,h=it(i.range.size(),2),p=h[0],y=h[1],d=c,v=p;"row"===t?n.delete(c,u):"column"===t&&(n.deleteColumn(s,f),d=a.sci,v=y,o.len-=1),r.shift(t,d,-v,function(t,e,r,i){var o=n.getCell(t,e);o.merge[0]+=r,o.merge[1]+=i,0===o.merge[0]&&0===o.merge[1]&&delete o.merge})})}},{key:"scrollx",value:function(t,e){var n=this.scroll,r=this.freeze,i=this.cols,o=it(r,2)[1],a=it(D.rangeReduceIf(o,i.len,0,0,t,function(t){return i.getWidth(t)}),3),l=a[0],c=a[1],s=a[2],u=c;t>0&&(u+=s),n.x!==u&&(n.ci=t>0?l:0,n.x=u,e())}},{key:"scrolly",value:function(t,e){var n=this.scroll,r=this.freeze,i=this.rows,o=it(r,1)[0],a=it(D.rangeReduceIf(o,i.len,0,0,t,function(t){return i.getHeight(t)}),3),l=a[0],c=a[1],s=a[2],u=c;t>0&&(u+=s),n.y!==u&&(n.ri=t>0?l:0,n.y=u,e())}},{key:"cellRect",value:function(t,e){var n=this.rows,r=this.cols,i=r.sumWidth(0,e),o=n.sumHeight(0,t),a=n.getCell(t,e),l=r.getWidth(e),c=n.getHeight(t);if(null!==a&&a.merge){var s=it(a.merge,2),u=s[0],f=s[1];if(u>0)for(var h=1;h<=u;h+=1)c+=n.getHeight(t+h);if(f>0)for(var p=1;p<=f;p+=1)l+=r.getWidth(e+p)}return{left:i,top:o,width:l,height:c,cell:a}}},{key:"getCell",value:function(t,e){return this.rows.getCell(t,e)}},{key:"getCellTextOrDefault",value:function(t,e){var n=this.getCell(t,e);return n&&n.text?n.text:""}},{key:"getCellStyle",value:function(t,e){var n=this.getCell(t,e);return n&&void 0!==n.style?this.styles[n.style]:null}},{key:"getCellStyleOrDefault",value:function(t,e){var n=this.styles,r=this.rows.getCell(t,e),i=r&&void 0!==r.style?n[r.style]:{};return D.merge(this.defaultStyle(),i)}},{key:"getSelectedCellStyle",value:function(){var t=this.selector,e=t.ri,n=t.ci;return this.getCellStyleOrDefault(e,n)}},{key:"setCellText",value:function(t,e,n,r){var i=this.rows,o=this.history,a=this.validations;"finished"===r?(i.setCellText(t,e,""),o.add(this.getData()),i.setCellText(t,e,n)):(i.setCellText(t,e,n),this.change(this.getData())),a.validate(t,e,n)}},{key:"freezeIsActive",value:function(){var t=it(this.freeze,2),e=t[0],n=t[1];return e>0||n>0}},{key:"setFreeze",value:function(t,e){var n=this;this.changeData(function(){n.freeze=[t,e]})}},{key:"freezeTotalWidth",value:function(){return this.cols.sumWidth(0,this.freeze[1])}},{key:"freezeTotalHeight",value:function(){return this.rows.sumHeight(0,this.freeze[0])}},{key:"setRowHeight",value:function(t,e){var n=this;this.changeData(function(){n.rows.setHeight(t,e)})}},{key:"setColWidth",value:function(t,e){var n=this;this.changeData(function(){n.cols.setWidth(t,e)})}},{key:"viewHeight",value:function(){var t=this.settings,e=t.view,n=t.showToolbar,r=e.height();return r-=41,n&&(r-=41),r}},{key:"viewWidth",value:function(){return this.settings.view.width()}},{key:"freezeViewRange",value:function(){var t=it(this.freeze,2),e=t[0],n=t[1];return new v(0,0,e-1,n-1,this.freezeTotalWidth(),this.freezeTotalHeight())}},{key:"contentRange",value:function(){var t=this.rows,e=this.cols,n=it(t.maxCell(),2),r=n[0],i=n[1],o=t.sumHeight(0,r+1),a=e.sumWidth(0,i+1);return new v(0,0,r,i,a,o)}},{key:"exceptRowTotalHeight",value:function(t,e){var n=this.exceptRowSet,r=this.rows,i=Array.from(n),o=0;return i.forEach(function(n){if(ne){var i=r.getHeight(n);o+=i}}),o}},{key:"viewRange",value:function(){var t=this.scroll,e=this.rows,n=this.cols,r=this.freeze,i=this.exceptRowSet,o=t.ri,a=t.ci;o<=0&&(o=it(r,1)[0]);a<=0&&(a=it(r,2)[1]);for(var l=0,c=0,s=[e.len,n.len],u=s[0],f=s[1],h=o;hthis.viewHeight()));h+=1);for(var p=a;pthis.viewWidth()));p+=1);return new v(o,a,u,f,l,c)}},{key:"eachMergesInView",value:function(t,e){this.merges.filterIntersects(t).forEach(function(t){return e(t)})}},{key:"rowEach",value:function(t,e,n){for(var r=0,i=this.rows,o=this.exceptRowSet,a=nt(o),l=0,c=0;cthis.viewHeight())break}}},{key:"colEach",value:function(t,e,n){for(var r=0,i=this.cols,o=t;o<=e;o+=1){var a=i.getWidth(o);if(n(o,r,a),(r+=a)>this.viewWidth())break}}},{key:"defaultStyle",value:function(){return this.settings.style}},{key:"addStyle",value:function(t){for(var e=this.styles,n=0;nMath.abs(e)?r(t>0?"right":"left",t,n):r(e>0?"down":"up",e,n)}var bt="x-spreadsheet";window.devicePixelRatio;function gt(t,e){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1?arguments[1]:void 0;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.moving=!1,this.vertical=n,this.el=a("div","".concat(bt,"-resizer ").concat(n?"vertical":"horizontal")).children(this.hoverEl=a("div","".concat(bt,"-resizer-hover")).on("mousedown.stop",function(t){return e.mousedownHandler(t)}),this.lineEl=a("div","".concat(bt,"-resizer-line")).hide()).hide(),this.cRect=null,this.finishedFn=null,this.minDistance=r}var e,n,r;return e=t,(n=[{key:"show",value:function(t,e){var n=this.moving,r=this.vertical,i=this.hoverEl,o=this.lineEl,a=this.el;if(!n){this.cRect=t;var l=t.left,c=t.top,s=t.width,u=t.height;a.offset({left:r?l+s-5:l,top:r?c:c+u-5}).show(),i.offset({width:r?5:s,height:r?u:5}),o.offset({width:r?0:e.width,height:r?e.height:0})}}},{key:"hide",value:function(){this.el.offset({left:0,top:0}).hide()}},{key:"mousedownHandler",value:function(t){var e=this,n=t,r=this.el,i=this.lineEl,o=this.cRect,a=this.vertical,l=this.minDistance,c=a?o.width:o.height;i.show(),dt(window,function(t){e.moving=!0,null!==n&&1===t.buttons&&(a?(c+=t.movementX)>l&&r.css("left","".concat(o.left+c,"px")):(c+=t.movementY)>l&&r.css("top","".concat(o.top+c,"px")),n=t)},function(){n=null,i.hide(),e.moving=!1,e.hide(),e.finishedFn&&(cn){var r=this.vertical?"height":"width";this.el.css(r,"".concat(n-15,"px")).show(),this.contentEl.css(this.vertical?"width":"height","1px").css(r,"".concat(e,"px"))}else this.el.hide();return this}}])&&wt(e.prototype,n),r&&wt(e,r),t}();function Ot(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function St(t,e){for(var n=0;nl&&(f-=a.x);var h=r-u;return u>c&&(h-=a.y),{left:f,top:h,width:i,height:o}}function Ct(t){var e=this.data,n=t.left,r=t.width,i=t.height,o=t.l,a=t.t,l=t.scroll,c=e.freezeTotalWidth(),s=n-c;return c>o&&(s-=l.x),{left:s,top:a,width:r,height:i}}function Tt(t){var e=this.data,n=t.top,r=t.width,i=t.height,o=t.l,a=t.t,l=t.scroll,c=e.freezeTotalHeight(),s=n-c;return c>a&&(s-=l.y),{left:o,top:s,width:r,height:i}}function Pt(t){this.br.setAreaOffset(_t.call(this,t))}function At(t){this.t.setAreaOffset(Ct.call(this,t))}function Rt(t){this.l.setAreaOffset(Tt.call(this,t))}function Dt(t){this.l.setClipboardOffset(Tt.call(this,t))}function It(t){this.br.setClipboardOffset(_t.call(this,t))}function zt(t){this.t.setClipboardOffset(Ct.call(this,t))}function Mt(t){Pt.call(this,t),function(t){this.tl.setAreaOffset(t)}.call(this,t),At.call(this,t),Rt.call(this,t)}function Nt(t){It.call(this,t),function(t){this.tl.setClipboardOffset(t)}.call(this,t),zt.call(this,t),Dt.call(this,t)}var Wt=function(){function t(e){Ot(this,t),this.data=e,this.br=new jt,this.t=new jt,this.l=new jt,this.tl=new jt,this.br.el.show(),this.offset=null,this.areaOffset=null,this.indexes=null,this.range=null,this.arange=null,this.el=a("div","".concat(bt,"-selectors")).children(this.tl.el,this.t.el,this.l.el,this.br.el).hide(),this.lastri=-1,this.lastci=-1,Et+=1}return xt(t,[{key:"resetData",value:function(t){this.data=t,this.range=t.selector.range,this.resetAreaOffset()}},{key:"hide",value:function(){this.el.hide()}},{key:"resetOffset",value:function(){var t=this.data,e=this.tl,n=this.t,r=this.l,i=this.br,o=t.freezeTotalHeight(),a=t.freezeTotalWidth();o>0||a>0?(e.setOffset({width:a,height:o}),n.setOffset({left:a,height:o}),r.setOffset({top:o,width:a}),i.setOffset({left:a,top:o})):(e.hide(),n.hide(),r.hide(),i.setOffset({left:0,top:0}))}},{key:"resetAreaOffset",value:function(){var t=this.data.getSelectedRect(),e=this.data.getClipboardRect();Mt.call(this,t),Nt.call(this,e),this.resetOffset()}},{key:"resetBRTAreaOffset",value:function(){var t=this.data.getSelectedRect(),e=this.data.getClipboardRect();Pt.call(this,t),At.call(this,t),It.call(this,e),zt.call(this,e),this.resetOffset()}},{key:"resetBRLAreaOffset",value:function(){var t=this.data.getSelectedRect(),e=this.data.getClipboardRect();Pt.call(this,t),Rt.call(this,t),It.call(this,e),Dt.call(this,e),this.resetOffset()}},{key:"set",value:function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this.data,i=r.calSelectedRangeByStart(t,e),o=i.sri,a=i.sci;if(n){var l=t,c=e;t<0&&(l=0),e<0&&(c=0),r.selector.setIndexes(l,c),this.indexes=[l,c]}this.moveIndexes=[o,a],this.range=i,this.resetAreaOffset(),this.el.show()}},{key:"setEnd",value:function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this.data,i=this.lastri,o=this.lastci;if(n){if(t===i&&e===o)return;this.lastri=t,this.lastci=e}this.range=r.calSelectedRangeByEnd(t,e),Mt.call(this,this.data.getSelectedRect())}},{key:"reset",value:function(){var t=this.data.selector.range,e=t.eri,n=t.eci;this.setEnd(e,n)}},{key:"showAutofill",value:function(t,e){if(-1!==t||-1!==e){var n=this.range,r=n.sri,i=n.sci,o=n.eri,a=n.eci,l=t,c=e,s=r-t,u=o-t,f=a-e;if(i-e>0)this.arange=new v(r,c,o,i-1);else if(s>0)this.arange=new v(l,i,r-1,a);else if(f<0)this.arange=new v(r,a+1,o,c);else{if(!(u<0))return void(this.arange=null);this.arange=new v(o+1,i,l,a)}if(null!==this.arange){var h=this.data.getRect(this.arange);h.width+=2,h.height+=2;var p=this.br,y=this.l,d=this.t,b=this.tl;p.showAutofill(_t.call(this,h)),y.showAutofill(Tt.call(this,h)),d.showAutofill(Ct.call(this,h)),b.showAutofill(h)}}}},{key:"hideAutofill",value:function(){var t=this;["br","l","t","tl"].forEach(function(e){t[e].hideAutofill()})}},{key:"showClipboard",value:function(){var t=this,e=this.data.getClipboardRect();Nt.call(this,e),["br","l","t","tl"].forEach(function(e){t[e].showClipboard()})}},{key:"hideClipboard",value:function(){var t=this;["br","l","t","tl"].forEach(function(e){t[e].hideClipboard()})}}]),t}();function Ft(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e2&&void 0!==arguments[2]?arguments[2]:"200px";!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.filterItems=[],this.items=e,this.el=a("div","".concat(bt,"-suggest")).css("width",r).hide(),this.itemClick=n,this.itemIndex=-1}var e,n,r;return e=t,(n=[{key:"setOffset",value:function(t){this.el.cssRemoveKeys("top","bottom").offset(t)}},{key:"hide",value:function(){var t=this.el;this.filterItems=[],this.itemIndex=-1,t.hide(),pt(this.el.parent())}},{key:"setItems",value:function(t){this.items=t}},{key:"search",value:function(t){var e,n=this,r=this.items;if(/^\s*$/.test(t)||(r=r.filter(function(e){return(e.key||e).startsWith(t.toUpperCase())})),r=r.map(function(t){var e=t.title;e?"function"==typeof e&&(e=e()):e=t;var r=a("div","".concat(bt,"-item")).child(e).on("click.stop",function(){n.itemClick(t),n.hide()});return t.label&&r.child(a("div","label").html(t.label)),r}),this.filterItems=r,!(r.length<=0)){var i=this.el;(e=i.html("")).children.apply(e,Ft(r)).show(),yt(i.parent(),function(){n.hide()})}}},{key:"bindInputEvents",value:function(t){var e=this;t.on("keydown",function(t){return function(t){var e=t.keyCode;switch(t.ctrlKey&&t.stopPropagation(),e){case 37:t.stopPropagation();break;case 38:(function(t){t.preventDefault(),t.stopPropagation();var e=this.filterItems;e.length<=0||(this.itemIndex>=0&&e[this.itemIndex].toggle(),this.itemIndex-=1,this.itemIndex<0&&(this.itemIndex=e.length-1),e[this.itemIndex].toggle())}).call(this,t);break;case 39:t.stopPropagation();break;case 40:(function(t){t.stopPropagation();var e=this.filterItems;e.length<=0||(this.itemIndex>=0&&e[this.itemIndex].toggle(),this.itemIndex+=1,this.itemIndex>e.length-1&&(this.itemIndex=0),e[this.itemIndex].toggle())}).call(this,t);break;case 13:case 9:Vt.call(this,t);break;default:t.stopPropagation()}}.call(e,t)})}}])&&Ht(e.prototype,n),r&&Ht(e,r),t}();function Bt(t){return(Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Lt(t,e){for(var n=0;nr.width){var u=l;l>c&&(u=c,s+=parseInt(l/c,10),s+=l%c>0?1:0),n.css("width","".concat(u,"px"))}(s*=this.rowHeight)>r.height&&n.css("height","".concat(s,"px"))}}function oe(t,e){var n=this.textEl,r=this.textlineEl;n.el.blur(),n.val(t),r.html(t),function(t){var e=this.textEl.el;setTimeout(function(){e.focus(),e.setSelectionRange(t,t)},0)}.call(this,e)}var ae=function(){function t(e,n,r){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.viewFn=n,this.rowHeight=r,this.formulas=e,this.suggest=new qt(e,function(t){(function(t){var e=this.inputText,n=this.validator,r=0;if(n&&"list"===n.type)this.inputText=t,r=this.inputText.length;else{var i=e.lastIndexOf("="),o=e.substring(0,i+1),a=e.substring(i+1);a=-1!==a.indexOf(")")?a.substring(a.indexOf(")")):"",this.inputText="".concat(o+t.key,"("),r=this.inputText.length,this.inputText+=")".concat(a)}oe.call(this,this.inputText,r)}).call(i,t)}),this.datepicker=new ee,this.datepicker.change(function(t){i.setText(function(t){var e=t.getMonth()+1,n=t.getDate();return e<10&&(e="0".concat(e)),n<10&&(n="0".concat(n)),"".concat(t.getFullYear(),"-").concat(e,"-").concat(n)}(t)),i.clear()}),this.areaEl=a("div","".concat(bt,"-editor-area")).children(this.textEl=a("textarea","").on("input",function(t){return function(t){var e=t.target.value,n=this.suggest,r=this.textlineEl,i=this.validator,o=this.cell;if(null!==o)if("editable"in o&&!0===o.editable||void 0===o.editable){if(this.inputText=e,i)"list"===i.type?n.search(e):n.hide();else{var a=e.lastIndexOf("=");-1!==a?n.search(e.substring(a+1)):n.hide()}r.html(e),ie.call(this),this.change("input",e)}else t.target.value="";else{if(this.inputText=e,i)"list"===i.type?n.search(e):n.hide();else{var l=e.lastIndexOf("=");-1!==l?n.search(e.substring(l+1)):n.hide()}r.html(e),ie.call(this),this.change("input",e)}}.call(i,t)}),this.textlineEl=a("div","textline"),this.suggest.el,this.datepicker.el).on("mousemove.stop",function(){}).on("mousedown.stop",function(){}),this.el=a("div","".concat(bt,"-editor")).child(this.areaEl).hide(),this.suggest.bindInputEvents(this.textEl),this.areaOffset=null,this.freeze={w:0,h:0},this.cell=null,this.inputText="",this.change=function(){}}var e,n,r;return e=t,(n=[{key:"setFreezeLengths",value:function(t,e){this.freeze.w=t,this.freeze.h=e}},{key:"clear",value:function(){""!==this.inputText&&this.change("finished",this.inputText),this.cell=null,this.areaOffset=null,this.inputText="",this.el.hide(),this.textEl.val(""),this.textlineEl.html(""),function(){this.suggest.setItems(this.formulas)}.call(this),this.datepicker.hide()}},{key:"setOffset",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n=this.textEl,r=this.areaEl,i=this.suggest,o=this.freeze,a=this.el;if(t){this.areaOffset=t;var l=t.left,c=t.top,s=t.width,u=t.height,f=t.l,h=t.t,p={left:0,top:0};o.w>f&&o.h>h||(o.wf?p.top=o.h:o.h>h&&(p.left=o.w)),a.offset(p),r.offset({left:l-p.left-.8,top:c-p.top-.8}),n.offset({width:s-9+.8,height:u-3+.8});var y={left:0};y[e]=u,i.setOffset(y),i.hide()}}},{key:"setCell",value:function(t,e){var n=this.el,r=this.datepicker,i=this.suggest;n.show(),this.cell=t;var o=t&&t.text||"";if(this.setText(o),this.validator=e,e){var a=e.type;"date"===a&&(r.show(),/^\s*$/.test(o)||r.setValue(o)),"list"===a&&(i.setItems(e.values()),i.search(""))}}},{key:"setText",value:function(t){this.inputText=t,oe.call(this,t,t.length),ie.call(this)}}])&&ne(e.prototype,n),r&&ne(e,r),t}();function le(t){return(le="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ce(t,e){return!e||"object"!==le(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function se(t){return(se=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function ue(t,e){return(ue=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var fe=function(t){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=ce(this,se(e).call(this,"div","".concat(bt,"-button ").concat(r)))).child(q("button.".concat(t))),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ue(t,e)}(e,o),e}();function he(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0?e-.5:.5}var ke=function(){function t(e,n,r,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;ye(this,t),this.x=e,this.y=n,this.width=r,this.height=i,this.padding=o,this.bgcolor="#ffffff",this.borderTop=null,this.borderRight=null,this.borderBottom=null,this.borderLeft=null}return ve(t,[{key:"setBorders",value:function(t){var e=t.top,n=t.bottom,r=t.left,i=t.right;e&&(this.borderTop=e),i&&(this.borderRight=i),n&&(this.borderBottom=n),r&&(this.borderLeft=r)}},{key:"innerWidth",value:function(){return this.width-2*this.padding-2}},{key:"innerHeight",value:function(){return this.height-2*this.padding-2}},{key:"textx",value:function(t){var e=this.width,n=this.padding,r=this.x;return"left"===t?r+=n:"center"===t?r+=e/2:"right"===t&&(r+=e-n),r}},{key:"texty",value:function(t,e){var n=this.height,r=this.padding,i=this.y;return"top"===t?i+=r:"middle"===t?i+=n/2-e/2:"bottom"===t&&(i+=n-r-e),i}},{key:"topxys",value:function(){var t=this.x,e=this.y;return[[t,e],[t+this.width,e]]}},{key:"rightxys",value:function(){var t=this.x,e=this.y,n=this.width;return[[t+n,e],[t+n,e+this.height]]}},{key:"bottomxys",value:function(){var t=this.x,e=this.y,n=this.width,r=this.height;return[[t,e+r],[t+n,e+r]]}},{key:"leftxys",value:function(){var t=this.x,e=this.y;return[[t,e],[t,e+this.height]]}}]),t}();function Oe(t,e,n,r,i,o,a){var l={x:0,y:0};"underline"===t?l.y="bottom"===i?0:"top"===i?-(o+2):-o/2:"strike"===t&&("bottom"===i?l.y=o/2:"top"===i&&(l.y=-(o/2+2))),"center"===r?l.x=a/2:"right"===r&&(l.x=a),this.line([e-l.x,n-l.y],[e-l.x+a,n-l.y])}var Se=function(){function t(e,n,r){ye(this,t),this.el=e,this.ctx=e.getContext("2d"),this.resize(n,r),this.ctx.scale(be(),be())}return ve(t,[{key:"resize",value:function(t,e){this.el.style.width="".concat(t,"px"),this.el.style.height="".concat(e,"px"),this.el.width=me(t),this.el.height=me(e)}},{key:"clear",value:function(){var t=this.el,e=t.width,n=t.height;return this.ctx.clearRect(0,0,e,n),this}},{key:"attr",value:function(t){return Object.assign(this.ctx,t),this}},{key:"save",value:function(){return this.ctx.save(),this.ctx.beginPath(),this}},{key:"restore",value:function(){return this.ctx.restore(),this}},{key:"beginPath",value:function(){return this.ctx.beginPath(),this}},{key:"translate",value:function(t,e){return this.ctx.translate(me(t),me(e)),this}},{key:"clearRect",value:function(t,e,n,r){return this.ctx.clearRect(t,e,n,r),this}},{key:"fillRect",value:function(t,e,n,r){return this.ctx.fillRect(me(t)-.5,me(e)-.5,me(n),me(r)),this}},{key:"fillText",value:function(t,e,n){return this.ctx.fillText(t,me(e),me(n)),this}},{key:"text",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=this.ctx,a=r.align,l=r.valign,c=r.font,s=r.color,u=r.strike,f=r.underline,h=e.textx(a);o.save(),o.beginPath(),this.attr({textAlign:a,textBaseline:l,font:"".concat(c.italic?"italic":""," ").concat(c.bold?"bold":""," ").concat(me(c.size),"px ").concat(c.name),fillStyle:s,strokeStyle:s});var p=t.split("\n"),y=e.innerWidth(),d=[];p.forEach(function(t){var e=o.measureText(t).width;if(i&&e>y){for(var n={w:0,len:0,start:0},r=0;r=y&&(d.push(t.substr(n.start,n.len)),n={w:0,len:0,start:r}),n.len+=1,n.w+=o.measureText(t[r]).width+1;n.len>0&&d.push(t.substr(n.start,n.len))}else d.push(t)});var v=(d.length-1)*(c.size+2),b=e.texty(l,v);return d.forEach(function(t){var e=o.measureText(t).width;n.fillText(t,h,b),u&&Oe.call(n,"strike",h,b,a,l,c.size,e),f&&Oe.call(n,"underline",h,b,a,l,c.size,e),b+=c.size+2}),o.restore(),this}},{key:"border",value:function(t,e){var n=this.ctx;return n.lineWidth=ge,n.strokeStyle=e,"medium"===t?n.lineWidth=me(2)-.5:"thick"===t?n.lineWidth=me(3):"dashed"===t?n.setLineDash([me(3),me(2)]):"dotted"===t?n.setLineDash([me(1),me(1)]):"double"===t&&n.setLineDash([me(2),0]),this}},{key:"line",value:function(){var t=this.ctx;if(arguments.length>1){var e=arguments.length<=0?void 0:arguments[0],n=pe(e,2),r=n[0],i=n[1];t.moveTo(we(r),we(i));for(var o=1;o="a"&&c<="z")r.push(c.toUpperCase());else if(c>="0"&&c<="9"||c>="A"&&c<="Z"||"."===c)r.push(c);else if('"'===c){for(l+=1;'"'!==t.charAt(l);)r.push(t.charAt(l)),l+=1;n.push('"'.concat(r.join(""))),r=[]}else{if("("!==c&&r.length>0&&n.push(r.join("")),")"===c){var s=e.pop();if(2===i)try{for(var u=je(f(n.pop()),2),p=u[0],y=u[1],d=je(f(n.pop()),2),v=d[0],b=d[1],g=0,m=v;m<=p;m+=1)for(var w=b;w<=y;w+=1)n.push(h(m,w)),g+=1;n.push([s,g])}catch(t){}else if(1===i||3===i)3===i&&n.push(o),n.push([s,a]),a=1;else for(;"("!==s&&(n.push(s),!(e.length<=0));)s=e.pop();i=0}else if("="===c||">"===c||"<"===c){var k=t.charAt(l+1);o=c,"="!==k&&"-"!==k||(o+=k,l+=1),i=3}else if(":"===c)i=2;else if(","===c)3===i&&n.push(o),i=1,a+=1;else if("("===c&&r.length>0)e.push(r.join(""));else{if(e.length>0&&("+"===c||"-"===c)){var O=e[e.length-1];if("("!==O&&n.push(e.pop()),"*"===O||"/"===O)for(;e.length>0&&"("!==(O=e[e.length-1]);)n.push(e.pop())}e.push(c)}r=[]}}for(r.length>0&&n.push(r.join(""));e.length>0;)n.push(e.pop());return n},Ce=function(t,e){if(t[0]>="0"&&t[0]<="9")return Number(t);if('"'===t[0])return t.substring(1);var n=je(f(t),2);return e(n[0],n[1])},Te=function(t,e,n,r){for(var i=[],o=0;o"===l||"<"===l){var h=i.pop(),p=Function;i.push(new p("return ".concat(i.pop()," ").concat("="===a?"==":a," ").concat(h))())}else if(Array.isArray(a)){for(var y=je(a,2),d=y[0],v=y[1],b=[],g=0;g="a"&&l<="z"||l>="A"&&l<="Z")&&r.push(a),i.push(Ce(a,n))}}return i[0]},Pe={render:function t(e,n,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if("="===e[0]){var o=_e(e.substring(1));return o.length<=0?e:Te(o,n,function(e,o){return t(r(e,o),n,r,i)},i)}return e}};function Ae(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Re(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e3&&void 0!==arguments[3]?arguments[3]:0,i=t.cellRect(e,n),o=i.left,a=i.top,l=i.width,c=i.height;return new ke(o,a+r,l,c,Ue)}function Ke(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=e.sortedRowMap,a=n;o.has(n)&&(a=o.get(n));var l=e.getCell(a,r);if(null!==l){var c=!1;"editable"in l&&!1===l.editable&&(c=!0);var s=e.getCellStyleOrDefault(a,r),u=Xe(e,n,r,i);u.bgcolor=s.bgcolor,void 0!==s.border&&(u.setBorders(s.border),t.strokeBorders(u)),t.rect(u,function(){var i=Pe.render(l.text||"",ze,function(t,n){return e.getCellTextOrDefault(n,t)});s.format&&(i=qe[s.format].render(i));var o=Object.assign({},s.font);o.size=function(t){for(var e=0;e0||h>0){if(f>0){var p=i.clone();p.sri=0,p.eri=f-1,p.h=a,Qe.call(this,p,n,r,o,0),Je.call(this,p,n,r,-c,0),Ge.call(this,"top",p,n,r,o,0)}if(h>0){var y=i.clone();y.sci=0,y.eci=h-1,y.w=o,Qe.call(this,y,n,r,0,a),Ge.call(this,"left",y,n,r,0,a),Je.call(this,y,n,r,0,-s)}var d=t.freezeViewRange();Qe.call(this,d,n,r,0,0),Ge.call(this,"all",d,n,r,0,0),Je.call(this,d,n,r,0,0),function(t,e,n,r){var i=this.draw,o=this.data,a=o.viewWidth()-t,l=o.viewHeight()-e;i.save().translate(t,e).attr({strokeStyle:"rgba(75, 137, 255, .6)"}),i.line([0,r],[a,r]),i.line([n,0],[n,l]),i.restore()}.call(this,n,r,o,a)}}},{key:"clear",value:function(){this.draw.clear()}}])&&Le(e.prototype,n),r&&Le(e,r),t}();function en(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e1&&void 0!==arguments[1]&&arguments[1];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.el=(n=a("div","".concat(bt,"-contextmenu"))).children.apply(n,cn(fn.call(this))).hide(),this.viewFn=e,this.itemClick=function(){},this.isHide=r}var e,n,r;return e=t,(n=[{key:"hide",value:function(){var t=this.el;t.hide(),pt(t)}},{key:"setPosition",value:function(t,e){if(!this.isHide){var n=this.el,r=n.show().offset(),i=r.height,o=r.width,a=this.viewFn(),l=e,c=t;a.height-e<=i&&(l-=i),a.width-t<=o&&(c-=o),n.offset({left:c,top:l}),yt(n)}}}])&&sn(e.prototype,n),r&&sn(e,r),t}();function pn(t,e){for(var n=0;n4?c-4:0),u=4;u0)&&(t=this.contentEl).children.apply(t,arguments)}},{key:"setTitle",value:function(t){this.title.html(t),this.hide()}},{key:"show",value:function(){var t=this;this.contentEl.show(),this.parent().active(),yt(this.parent(),function(){t.hide()})}},{key:"hide",value:function(){this.parent().active(!1),this.contentEl.hide(),pt(this.parent())}}])&&Sn(n.prototype,r),i&&Sn(n,i),e}();function Cn(t){return(Cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Tn(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e'],["medium",''],["thick",''],["dashed",''],["dotted",'']],Lr=function(t){function e(t){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=new Xt("line-type"),o=0,l=Br.map(function(e,n){return a("div","".concat(bt,"-item state ").concat(t===e[0]?"checked":"")).on("click",function(){l[o].toggle("checked"),l[n].toggle("checked"),o=n,r.hide(),r.change(e)}).child(a("div","".concat(bt,"-line-type")).html(e[1]))});return r=Hr(this,(n=Vr(e)).call.apply(n,[this,i,"auto",!1,"bottom-left"].concat(Fr(l))))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&qr(t,e)}(e,_n),e}();function Ur(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0?i.show():i.hide()}var Sa=function(){function t(e,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.data=e,this.change=function(){},this.widthFn=n,this.isHide=i;var o=e.defaultStyle();this.items=[[this.undoEl=new Qo,this.redoEl=new Xo,new ia,this.paintformatEl=new xi,this.clearformatEl=new gi],ka(),[this.formatEl=new wo],ka(),[this.fontEl=new ao,this.fontSizeEl=new Xi],ka(),[this.boldEl=new ur,this.italicEl=new dr,this.underlineEl=new Er,this.strikeEl=new wr,this.textColorEl=new Pi(o.color)],ka(),[this.fillColorEl=new Mi(o.bgcolor),this.borderEl=new ai,this.mergeEl=new Bo],ka(),[this.alignEl=new Hn(o.align),this.valignEl=new Yn(o.valign),this.textwrapEl=new sa],ka(),[this.freezeEl=new No,this.autofilterEl=new or,this.formulaEl=new Ro,this.moreEl=new ga]],this.el=a("div","".concat(bt,"-toolbar")),this.btns=a("div","".concat(bt,"-toolbar-btns")),this.items.forEach(function(t){Array.isArray(t)?t.forEach(function(t){r.btns.child(t.el),t.change=function(){r.change.apply(r,arguments)}}):r.btns.child(t.el)}),this.el.child(this.btns),i?this.el.hide():(this.reset(),setTimeout(function(){(function(){var t=this;this.btns2=[],this.items.forEach(function(e){if(Array.isArray(e))e.forEach(function(e){var n=e.el,r=n.box(),i=n.computedStyle(),o=i.marginLeft,a=i.marginRight;t.btns2.push([n,r.width+parseInt(o,10)+parseInt(a,10)])});else{var n=e.box(),r=e.computedStyle(),i=r.marginLeft,o=r.marginRight;t.btns2.push([e,n.width+parseInt(i,10)+parseInt(o,10)])}})}).call(r),Oa.call(r)},0),ft(window,"resize",function(){Oa.call(r)}))}var e,n,r;return e=t,(n=[{key:"paintformatActive",value:function(){return this.paintformatEl.active()}},{key:"paintformatToggle",value:function(){this.paintformatEl.toggle()}},{key:"trigger",value:function(t){this["".concat(t,"El")].click()}},{key:"resetData",value:function(t){this.data=t,this.reset()}},{key:"reset",value:function(){if(!this.isHide){var t=this.data,e=t.getSelectedCellStyle(),n=t.getSelectedCell();this.undoEl.setState(!t.canUndo()),this.redoEl.setState(!t.canRedo()),this.mergeEl.setState(t.canUnmerge(),!t.selector.multiple()),this.autofilterEl.setState(!t.canAutofilter());var r=e.font;this.fontEl.setState(r.name),this.fontSizeEl.setState(r.size),this.boldEl.setState(r.bold),this.italicEl.setState(r.italic),this.underlineEl.setState(e.underline),this.strikeEl.setState(e.strike),this.textColorEl.setState(e.color),this.fillColorEl.setState(e.bgcolor),this.alignEl.setState(e.align),this.valignEl.setState(e.valign),this.textwrapEl.setState(e.textwrap),this.freezeEl.setState(t.freezeIsActive()),n&&n.format&&this.formatEl.setState(n.format)}}}])&&ma(e.prototype,n),r&&ma(e,r),t}();function xa(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e2&&void 0!==arguments[2]?arguments[2]:"600px";!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.title=e,this.el=a("div","".concat(bt,"-modal")).css("width",o).children(a("div","".concat(bt,"-modal-header")).children(new Xt("close").on("click.stop",function(){return i.hide()}),this.title),(r=a("div","".concat(bt,"-modal-content"))).children.apply(r,xa(n))).hide()}var e,n,r;return e=t,(n=[{key:"show",value:function(){var t=this;this.dimmer=a("div","".concat(bt,"-dimmer active")),document.body.appendChild(this.dimmer.el);var e=this.el.show().box(),n=e.width,r=e.height,i=document.documentElement,o=i.clientHeight,l=i.clientWidth;this.el.offset({left:(l-n)/2,top:(o-r)/3}),window.xkeydownEsc=function(e){27===e.keyCode&&t.hide()},ft(window,"keydown",window.xkeydownEsc)}},{key:"hide",value:function(){this.el.hide(),document.body.removeChild(this.dimmer.el),ht(window,"keydown",window.xkeydownEsc),delete window.xkeydownEsc}}])&&Ea(e.prototype,n),r&&Ea(e,r),t}();function _a(t,e){for(var n=0;n3&&void 0!==arguments[3]?arguments[3]:function(t){return t},l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.key=e,this.getTitle=o,this.vchange=function(){},this.el=a("div","".concat(bt,"-form-select")),this.suggest=new qt(n.map(function(t){return{key:t,title:i.getTitle(t)}}),function(t){i.itemClick(t.key),l(t.key),i.vchange(t.key)},r,this.el),this.el.children(this.itemEl=a("div","input-text").html(this.getTitle(e)),this.suggest.el).on("click",function(){return i.show()})}var e,n,r;return e=t,(n=[{key:"show",value:function(){this.suggest.search("")}},{key:"itemClick",value:function(t){this.key=t,this.itemEl.html(this.getTitle(t))}},{key:"val",value:function(t){return void 0!==t?(this.key=t,this.itemEl.html(this.getTitle(t)),this):this.key}}])&&Ta(e.prototype,n),r&&Ta(e,r),t}();function Aa(t,e){for(var n=0;n3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(-1!==e||-1!==n){var o=this.table,a=this.selector,l=this.toolbar;t?a.setEnd(e,n,i):a.set(e,n,r),l.reset(),o.render()}}function Ja(t,e){var n=this.selector,r=this.data,i=r.rows,o=r.cols,a=Xa(n.indexes,2),l=a[0],c=a[1],s=n.range,u=s.eri,f=s.eci;if(t){var h=Xa(n.moveIndexes,2);l=h[0],c=h[1]}"left"===e?c>0&&(c-=1):"right"===e?(f!==c&&(c=f),c0&&(l-=1):"down"===e?(u!==l&&(l=u),lu.width)n.move({left:i+c-u.width});else{var f=t.freezeTotalWidth();au.height)e.move({top:o+s-u.height-1});else{var h=t.freezeTotalHeight();l0||o>0){var a=e.freezeTotalWidth(),l=e.freezeTotalHeight();n.setFreezeLengths(a,l)}t.resetAreaOffset()}.call(this),r.render(),i.reset(),o.reset()}function tl(){var t=this.data,e=this.selector;t.clearClipboard(),e.hideClipboard()}function el(){var t=this.data,e=this.selector;t.copy(),e.showClipboard()}function nl(){var t=this.data,e=this.selector;t.cut(),e.showClipboard()}function rl(t){this.data.paste(t,function(t){return Ya("Tip",t)})&&Qa.call(this)}function il(t){var e=this,n=this.selector,r=this.data,i=this.table,o=this.sortFilter,a=t.offsetX,l=t.offsetY,c=t.target.className==="".concat(bt,"-selector-corner"),s=r.getCellRectByXY(a,l),u=s.left,f=s.top,h=s.width,p=s.height,y=s.ri,d=s.ci,v=r.autoFilter;if(v.includes(y,d)&&u+h-20n.height/2&&(r="bottom"),t.setOffset(e,r)}function al(){var t=this.editor,e=this.data;ol.call(this),t.setCell(e.getSelectedCell(),e.getSelectedValidator()),tl.call(this)}function ll(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"finished",n=this.data,r=this.table;n.setSelectedCellText(t,e),"finished"===e&&r.render()}function cl(t){var e=this.data;"insert-row"===t?e.insert("row"):"delete-row"===t?e.delete("row"):"insert-column"===t?e.insert("column"):"delete-column"===t?e.delete("column"):"delete-cell"===t?e.deleteCell():"delete-cell-format"===t?e.deleteCell("format"):"delete-cell-text"===t?e.deleteCell("text"):"cell-printable"===t?e.setSelectedCellAttr("printable",!0):"cell-non-printable"===t?e.setSelectedCellAttr("printable",!1):"cell-editable"===t?e.setSelectedCellAttr("editable",!0):"cell-non-editable"===t&&e.setSelectedCellAttr("editable",!1),tl.call(this),Qa.call(this)}function sl(t,e){var n=this.data;if("undo"===t)this.undo();else if("redo"===t)this.redo();else if("print"===t)this.print.preview();else if("paintformat"===t)!0===e?el.call(this):tl.call(this);else if("clearformat"===t)cl.call(this,"delete-cell-format");else if("link"===t);else if("chart"===t);else if("autofilter"===t)(function(){this.data.autofilter(),Qa.call(this)}).call(this);else if("freeze"===t)if(e){var r=n.selector,i=r.ri,o=r.ci;this.freeze(i,o)}else this.freeze(0,0);else n.setSelectedCellAttr(t,e),"formula"!==t||n.selector.multiple()||al.call(this),Qa.call(this)}function ul(){var t,e,n,r,i,o,a=this,l=this.overlayerEl,c=this.rowResizer,s=this.colResizer,u=this.verticalScrollbar,f=this.horizontalScrollbar,h=this.editor,p=this.contextMenu,y=this.data,d=this.toolbar,v=this.modalValidation,b=this.sortFilter;l.on("mousemove",function(t){(function(t){if(0===t.buttons&&t.target.className!=="".concat(bt,"-resizer-hover")){var e=t.offsetX,n=t.offsetY,r=this.rowResizer,i=this.colResizer,o=this.tableEl,a=this.data,l=a.rows,c=a.cols;if(e>c.indexWidth&&n>l.height)return r.hide(),void i.hide();var s=o.box(),u=a.getCellRectByXY(t.offsetX,t.offsetY);u.ri>=0&&-1===u.ci?(u.width=c.indexWidth,r.show(u,{width:s.width})):r.hide(),-1===u.ri&&u.ci>=0?(u.height=l.height,i.show(u,{height:s.height})):i.hide()}}).call(a,t)}).on("mousedown",function(t){2===t.buttons?y.xyInSelectedRect(t.offsetX,t.offsetY)?(p.setPosition(t.offsetX,t.offsetY),t.stopPropagation()):p.hide():2===t.detail?al.call(a):(h.clear(),il.call(a,t))}).on("mousewheel.stop",function(t){(function(t){var e=this.verticalScrollbar,n=this.horizontalScrollbar,r=this.data,i=e.scroll().top,o=n.scroll().left,a=r.rows,l=r.cols,c=t.deltaY;if(t.detail&&(c=40*t.detail),c>0){var s=r.scroll.ri+1;s=0&&e.move({top:0===u?0:i-a.getHeight(u)})}if(t.deltaX>0){var f=r.scroll.ci+1;f=0&&n.move({left:0===h?0:o-l.getWidth(h)})}}).call(a,t)}).on("mouseout",function(t){var e=t.offsetX;t.offsetY<=0&&s.hide(),e<=0&&c.hide()}),t=l.el,n=(e={move:function(t,e){(function(t,e){var n=this.verticalScrollbar,r=this.horizontalScrollbar,i=n.scroll().top,o=r.scroll().left;"left"===t||"right"===t?r.move({left:o-e}):"up"!==t&&"down"!==t||n.move({top:i-e})}).call(a,t,e)}}).move,r=e.end,i=0,o=0,ft(t,"touchstart",function(t){var e=t.touches[0],n=e.pageX,r=e.pageY;i=n,o=r}),ft(t,"touchmove",function(t){if(n){var e=t.changedTouches[0],r=e.pageX,a=e.pageY,l=r-i,c=a-o;(Math.abs(l)>10||Math.abs(c)>10)&&(vt(l,c,t,n),i=r,o=a),t.preventDefault()}}),ft(t,"touchend",function(t){if(r){var e=t.changedTouches[0],n=e.pageX,a=e.pageY;vt(n-i,a-o,t,r)}}),d.change=function(t,e){return sl.call(a,t,e)},b.ok=function(t,e,n,r){return function(t,e,n,r){this.data.setAutoFilter(t,e,n,r),Qa.call(this)}.call(a,t,e,n,r)},c.finishedFn=function(t,e){(function(t,e){var n=t.ri,r=this.table,i=this.selector;this.data.rows.setHeight(n,e),r.render(),i.resetAreaOffset(),Za.call(this),ol.call(this)}).call(a,t,e)},s.finishedFn=function(t,e){(function(t,e){var n=t.ci,r=this.table,i=this.selector;this.data.cols.setWidth(n,e),r.render(),i.resetAreaOffset(),Ga.call(this),ol.call(this)}).call(a,t,e)},u.moveFn=function(t,e){(function(t){var e=this,n=this.data,r=this.table,i=this.selector;n.scrolly(t,function(){i.resetBRLAreaOffset(),ol.call(e),r.render()})}).call(a,t,e)},f.moveFn=function(t,e){(function(t){var e=this,n=this.data,r=this.table,i=this.selector;n.scrollx(t,function(){i.resetBRTAreaOffset(),ol.call(e),r.render()})}).call(a,t,e)},h.change=function(t,e){ll.call(a,e,t)},v.change=function(t){if("save"===t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r=65&&e<=90||e>=48&&e<=57||e>=96&&e<=105||"="===t.key?(ll.call(a,t.key,"input"),al.call(a)):113===e&&al.call(a)}}})}var fl=function(){function t(e,n){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var i=n.settings,o=i.view,l=i.showToolbar,c=i.showContextmenu;this.el=a("div","".concat(bt,"-sheet")),this.toolbar=new Sa(n,o.width,!l),this.print=new ln(n),e.children(this.toolbar.el,this.el,this.print.el),this.data=n,this.tableEl=a("canvas","".concat(bt,"-table")),this.rowResizer=new mt(!1,n.rows.height),this.colResizer=new mt(!0,n.cols.minWidth),this.verticalScrollbar=new kt(!0),this.horizontalScrollbar=new kt(!1),this.editor=new ae(Ie,function(){return r.getTableOffset()},n.rows.height),this.modalValidation=new Ha,this.contextMenu=new hn(function(){return r.getTableOffset()},!c),this.selector=new Wt(n),this.overlayerCEl=a("div","".concat(bt,"-overlayer-content")).children(this.editor.el,this.selector.el),this.overlayerEl=a("div","".concat(bt,"-overlayer")).child(this.overlayerCEl),this.sortFilter=new Ua,this.el.children(this.tableEl,this.overlayerEl.el,this.rowResizer.el,this.colResizer.el,this.verticalScrollbar.el,this.horizontalScrollbar.el,this.contextMenu.el,this.modalValidation.el,this.sortFilter.el),this.table=new tn(this.tableEl.el,n),ul.call(this),Qa.call(this),Ka.call(this,!1,0,0)}var e,n,r;return e=t,(n=[{key:"resetData",value:function(t){this.data=t,this.toolbar.resetData(t),this.print.resetData(t),this.selector.resetData(t),this.table.resetData(t)}},{key:"loadData",value:function(t){return this.data.setData(t),Qa.call(this),this}},{key:"freeze",value:function(t,e){return this.data.setFreeze(t,e),Qa.call(this),this}},{key:"undo",value:function(){this.data.undo(),Qa.call(this)}},{key:"redo",value:function(){this.data.redo(),Qa.call(this)}},{key:"reload",value:function(){return Qa.call(this),this}},{key:"getRect",value:function(){var t=this.data;return{width:t.viewWidth(),height:t.viewHeight()}}},{key:"getTableOffset",value:function(){var t=this.data,e=t.rows,n=t.cols,r=this.getRect(),i=r.width,o=r.height;return{width:i-n.indexWidth,height:o-e.height,left:n.indexWidth,top:e.height}}}])&&$a(e.prototype,n),r&&$a(e,r),t}();function hl(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function pl(t){return(pl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function yl(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0&&void 0!==arguments[0]?arguments[0]:function(){},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){};dl(this,t),this.swapFunc=r,this.updateFunc=o,this.dataNames=[],this.activeEl=null,this.deleteEl=null,this.items=[],this.moreEl=new kl(function(t){e.clickSwap2(e.items[t])}),this.contextMenu=new xl,this.contextMenu.itemClick=i,this.el=a("div","".concat(bt,"-bottombar")).children(this.contextMenu.el,this.menuEl=a("ul","".concat(bt,"-menu")).child(a("li","").children(new Xt("add").on("click",function(){e.dataNames.length<10?n():Ya("tip","it less than or equal to 10")}),a("span","").child(this.moreEl))))}return bl(t,[{key:"addItem",value:function(t,e){var n=this;this.dataNames.push(t);var r=a("li",e?"active":"").child(t);r.on("click",function(){n.clickSwap2(r)}).on("contextmenu",function(t){var e=t.target,i=e.offsetLeft,o=e.offsetHeight;n.contextMenu.setOffset({left:i,bottom:o+1}),n.deleteEl=r}).on("dblclick",function(){var t=r.html(),e=new Ca("auto","");e.val(t),e.input.on("blur",function(e){var i=e.target.value,o=n.dataNames.findIndex(function(e){return e===t});n.dataNames.splice(o,1,i),n.moreEl.reset(n.dataNames),r.html("").child(i),n.updateFunc(o,i)}),r.html("").child(e.el),e.focus()}),e&&this.clickSwap(r),this.items.push(r),this.menuEl.child(r),this.moreEl.reset(this.dataNames)}},{key:"deleteItem",value:function(){var t=this.activeEl,e=this.deleteEl;if(this.items.length>1){var n=this.items.findIndex(function(t){return t===e});if(this.items.splice(n,1),this.dataNames.splice(n,1),this.menuEl.removeChild(e.el),this.moreEl.reset(this.dataNames),t===e){var r=hl(this.items,1)[0];this.activeEl=r,this.activeEl.toggle()}return n}return-1}},{key:"clickSwap2",value:function(t){var e=this.items.findIndex(function(e){return e===t});this.clickSwap(t),this.activeEl.toggle(),this.swapFunc(e)}},{key:"clickSwap",value:function(t){null!==this.activeEl&&this.activeEl.toggle(),this.activeEl=t}}]),t}();n(1);function jl(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==l.return||l.return()}finally{if(i)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function _l(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var i=e;this.options=r,this.sheetIndex=1,this.datas=[],"string"==typeof e&&(i=document.querySelector(e)),this.bottombar=new El(function(){var t=n.addSheet();n.sheet.resetData(t)},function(t){var e=n.datas[t];n.sheet.resetData(e)},function(){var t=n.deleteSheet();null!==t&&n.sheet.resetData(t)},function(t,e){n.datas[t].name=e}),this.data=this.addSheet();var o=a("div","".concat(bt)).on("contextmenu",function(t){return t.preventDefault()});i.appendChild(o.el),this.sheet=new fl(o,this.data),o.child(this.bottombar.el)}var e,n,r;return e=t,r=[{key:"locale",value:function(t,e){L(t,e)}}],(n=[{key:"addSheet",value:function(t){var e=t||"sheet".concat(this.sheetIndex),n=new ut(e,this.options);return this.datas.push(n),this.bottombar.addItem(e,!0),this.sheetIndex+=1,n}},{key:"deleteSheet",value:function(){var t=this.bottombar.deleteItem();if(t>=0){var e=jl(this.datas.splice(t,1),1)[0];return this.sheetIndex-=1,e}return null}},{key:"loadData",value:function(t){var e=Array.isArray(t)?t[0]:t;return this.sheet.loadData(e),this}},{key:"getData",value:function(){return this.datas.map(function(t){return t.getData()})}},{key:"validate",value:function(){return this.data.validations.errors.size<=0}},{key:"change",value:function(t){return this.data.change=t,this}}])&&_l(e.prototype,n),r&&_l(e,r),t}(),Tl=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Cl(t,e)};window&&(window.x=window.x||{},window.x.spreadsheet=Tl,window.x.spreadsheet.locale=function(t,e){return L(t,e)});e.default=Cl}]); //# sourceMappingURL=xspreadsheet.js.map \ No newline at end of file diff --git a/dist/xspreadsheet.js.map b/dist/xspreadsheet.js.map index b46d25cf..80dd28c8 100644 --- a/dist/xspreadsheet.js.map +++ b/dist/xspreadsheet.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/component/element.js","webpack:///./src/core/alphabet.js","webpack:///./src/core/cell_range.js","webpack:///./src/core/selector.js","webpack:///./src/core/scroll.js","webpack:///./src/core/history.js","webpack:///./src/core/clipboard.js","webpack:///./src/core/auto_filter.js","webpack:///./src/core/merge.js","webpack:///./src/core/helper.js","webpack:///./src/core/row.js","webpack:///./src/core/col.js","webpack:///./src/locale/locale.js","webpack:///./src/locale/en.js","webpack:///./src/core/validator.js","webpack:///./src/core/validation.js","webpack:///./src/core/data_proxy.js","webpack:///./src/component/event.js","webpack:///./src/config.js","webpack:///./src/component/resizer.js","webpack:///./src/component/scrollbar.js","webpack:///./src/component/selector.js","webpack:///./src/component/suggest.js","webpack:///./src/component/icon.js","webpack:///./src/component/calendar.js","webpack:///./src/component/datepicker.js","webpack:///./src/component/editor.js","webpack:///./src/component/button.js","webpack:///./src/canvas/draw.js","webpack:///./src/core/font.js","webpack:///./src/core/cell.js","webpack:///./src/core/formula.js","webpack:///./src/core/format.js","webpack:///./src/component/table.js","webpack:///./src/component/print.js","webpack:///./src/component/contextmenu.js","webpack:///./src/component/toolbar/item.js","webpack:///./src/component/tooltip.js","webpack:///./src/component/toolbar/dropdown_item.js","webpack:///./src/component/dropdown.js","webpack:///./src/component/dropdown_align.js","webpack:///./src/component/toolbar/align.js","webpack:///./src/component/toolbar/valign.js","webpack:///./src/component/toolbar/toggle_item.js","webpack:///./src/component/toolbar/autofilter.js","webpack:///./src/component/toolbar/bold.js","webpack:///./src/component/toolbar/italic.js","webpack:///./src/component/toolbar/strike.js","webpack:///./src/component/toolbar/underline.js","webpack:///./src/component/color_palette.js","webpack:///./src/component/dropdown_color.js","webpack:///./src/component/dropdown_linetype.js","webpack:///./src/component/border_palette.js","webpack:///./src/component/dropdown_border.js","webpack:///./src/component/toolbar/border.js","webpack:///./src/component/toolbar/icon_item.js","webpack:///./src/component/toolbar/clearformat.js","webpack:///./src/component/toolbar/paintformat.js","webpack:///./src/component/toolbar/text_color.js","webpack:///./src/component/toolbar/fill_color.js","webpack:///./src/component/dropdown_fontsize.js","webpack:///./src/component/toolbar/font_size.js","webpack:///./src/component/dropdown_font.js","webpack:///./src/component/toolbar/font.js","webpack:///./src/component/dropdown_format.js","webpack:///./src/component/toolbar/format.js","webpack:///./src/component/dropdown_formula.js","webpack:///./src/component/toolbar/formula.js","webpack:///./src/component/toolbar/freeze.js","webpack:///./src/component/toolbar/merge.js","webpack:///./src/component/toolbar/redo.js","webpack:///./src/component/toolbar/undo.js","webpack:///./src/component/toolbar/print.js","webpack:///./src/component/toolbar/textwrap.js","webpack:///./src/component/toolbar/more.js","webpack:///./src/component/toolbar/index.js","webpack:///./src/component/modal.js","webpack:///./src/component/form_input.js","webpack:///./src/component/form_select.js","webpack:///./src/component/form_field.js","webpack:///./src/component/modal_validation.js","webpack:///./src/component/sort_filter.js","webpack:///./src/component/message.js","webpack:///./src/component/sheet.js","webpack:///./src/component/bottombar.js","webpack:///./src/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","Element","tag","className","arguments","length","undefined","_classCallCheck","this","el","document","createElement","data","eventNames","handler","_eventNames$split2","_toArray","split","fen","oen","slice","eventName","test","window","navigator","userAgent","addEventListener","evt","k","button","stopPropagation","_this","keys","forEach","css","concat","_this$el","top","offsetTop","left","offsetLeft","height","offsetHeight","width","offsetWidth","v","scrollLeft","scrollTop","getBoundingClientRect","parentNode","_this2","_len","eles","Array","_key","childNodes","ele","child","removeChild","arg","createTextNode","appendChild","contains","classList","add","remove","cls","toggleClass","toggle","flag","addClass","removeClass","active","_this3","setAttribute","getAttribute","removeAttribute","content","innerHTML","_this4","_len2","_key2","style","removeProperty","_this5","getComputedStyle","h","alphabets","stringAt","index","str","cindex","parseInt","last","indexAt","ret","charCodeAt","exponet","Math","pow","expr2xy","src","x","y","charAt","xy2expr","expr2expr","xn","yn","_expr2xy2","_slicedToArray","CellRange","sri","sci","eri","eci","w","cell_range_classCallCheck","ref","refs","_expr2xy4","cell_range_slicedToArray","_expr2xy6","ri","ci","args","_expr2xy","cb","rowFilter","j","other","addRet","push","dsr","dsc","der","dec","multiple","Selector","selector_classCallCheck","range","size","Scroll","scroll_classCallCheck","History","history_classCallCheck","undoItems","redoItems","JSON","stringify","currentd","canUndo","parse","pop","canRedo","Clipboard","clipboard_classCallCheck","state","cellRange","Filter","operator","auto_filter_classCallCheck","includes","Sort","order","AutoFilter","filters","sort","_ref","fitlers","map","it","getData","filter","getFilter","set","hrange","getCell","rset","Set","fset","_this$range","cell","ctext","text","_this$range2","cnt","valueOf","Merges","merge_classCallCheck","_","cr","within","intersects","union","deleteWithin","type","cbWithin","rn","cn","it1","merges","merge","toString","mergeDeep","sources","source","isArray","helper","cloneDeep","obj","apply","equals","obj1","obj2","v1","v2","ai","arrayEquals","a1","a2","sum","objOrAry","total","rangeEach","min","max","rangeSum","getv","rangeReduceIf","inits","initv","ifv","deleteProperty","oldv","Rows","len","row_classCallCheck","row","getOrNew","exceptSet","has","getHeight","sumHeight","cells","what","getCellOrNew","srcCellRange","dstCellRange","autofill","dsri","dsci","deri","deci","_srcCellRange$size","_srcCellRange$size2","row_slicedToArray","_dstCellRange$size","_dstCellRange$size2","drn","dcn","isAdd","dn","ii","jj","nri","nci","ncell","replace","word","result","exec","Number","substring","setCell","ncellmm","each","eachCells","setCellText","ndata","rndata","_this6","deleteCell","col","ks","entries","_ref2","_ref3","_ref4","_ref5","assign","Cols","indexWidth","minWidth","col_classCallCheck","getWidth","sumWidth","$lang","$messages","en","toolbar","undo","redo","print","paintformat","clearformat","format","fontName","fontSize","fontBold","fontItalic","underline","strike","color","bgcolor","border","align","valign","textwrap","freeze","autofilter","formula","more","contextmenu","copy","cut","paste","pasteValue","pasteFormat","insertRow","insertColumn","deleteSheet","deleteRow","deleteColumn","deleteCellText","validation","cellprintable","cellnonprintable","celleditable","cellnoneditable","normal","number","percent","rmb","usd","eur","date","time","datetime","duration","average","_if","and","or","required","notMatch","between","notBetween","notIn","equal","notEqual","lessThan","lessThanEqual","greaterThan","greaterThanEqual","error","pasteForMergedCell","calendar","weeks","months","next","cancel","save","ok","desc","asc","empty","dataValidation","criteria","modeType","column","list","phone","email","be","nbe","lt","lte","gt","gte","eq","neq","translate","messages","message","spreadsheet","tf","locale","lang","rules","returnMessage","Validator","validator_classCallCheck","Date","values","parseValue","_value","validator_slicedToArray","_value2","Validation","validator","validation_classCallCheck","nrefs","difference","Validations","errors","Map","_v$validator$validate2","validation_slicedToArray","validate","getByValidator","addRef","defaultSettings","view","documentElement","clientHeight","clientWidth","showGrid","showToolbar","showContextmenu","font","bold","italic","canPaste","dst","clone","_src$size2","data_proxy_slicedToArray","srn","scn","_dst$size2","copyPaste","rows","deleteCells","_cell$merge","cutPaste","clipboard","move","clear","setStyleBorder","bss","styles","cstyle","addStyle","DataProxy","settings","data_proxy_classCallCheck","cols","validations","hyperlinks","comments","selector","scroll","history","autoFilter","change","exceptRowSet","sortedRowMap","unsortedRowMap","changeData","_this$selector","_this$selector2","setData","isClear","isCopy","isCut","txt","lines","_this7","srcRange","_selector$range2","cri","cci","getFirstIncludes","_this8","unmerge","_selector$range","isSignleSelected","mergeIndexes","_merges$ii","mri","mci","splice","_cell$merge2","mrl","mcl","bottom","right","getCellMerge","_selector$size2","nfont","oldCell","oldText","vIndex","findIndex","_this$selector3","_this$getSelectedRect","getSelectedRect","x1","y1","getRect","left0","top0","fsh","freezeTotalHeight","fsw","freezeTotalWidth","_getCellRowByY$call","scrollOffsety","frset","_getCellColByX$call","scrollOffsetx","_helper$rangeReduceIf2","totalWidth","totalHeight","_this$cellRect","cellRect","_this$selector$range","_cell$merge3","_this$selector$range2","_cell$merge4","_this9","_selector$size4","_selector$range3","_this10","_selector$range4","_this11","addFilter","setSort","resetAutoFilter","_this12","_autoFilter$filteredR","filteredRows","fary","from","oldAry","a","b","_this13","_this14","_this14$selector$rang","si","insert","shift","_this15","_selector$range5","_selector$range$size2","rsize","csize","fci","_helper$rangeReduceIf4","fri","_helper$rangeReduceIf6","_cell$merge5","cellStyle","defaultStyle","_this$selector4","getCellStyleOrDefault","_this$freeze","_this16","_this17","setHeight","_this18","setWidth","_this$settings","_this$freeze2","_rows$maxCell2","maxCell","exceptRows","exceptRowTH","viewHeight","viewWidth","viewRange","filterIntersects","frary","_toConsumableArray","offset","rowHeight","colWidth","nstyle","_this19","target","fn","unbind","removeEventListener","unbindClickoutside","xclickoutside","body","bindClickoutside","detail","hide","mouseMoveUp","movefunc","upfunc","xEvtUp","calTouchDirection","spanx","spany","abs","cssPrefix","devicePixelRatio","Resizer","vertical","minDistance","resizer_classCallCheck","moving","children","hoverEl","on","mousedownHandler","lineEl","cRect","finishedFn","rect","line","show","startEvt","distance","e","buttons","movementX","movementY","Scrollbar","scrollbar_classCallCheck","moveFn","contentEl","_evt$target","contentDistance","cssKey","startZIndex","SelectorElement","component_selector_classCallCheck","cornerEl","areaEl","clipboardEl","autofillEl","calBRAreaOffset","ftwidth","ftheight","calTAreaOffset","calLAreaOffset","setBRAreaOffset","br","setAreaOffset","setTAreaOffset","setLAreaOffset","setLClipboardOffset","setClipboardOffset","setBRClipboardOffset","setTClipboardOffset","setAllAreaOffset","tl","setAllClipboardOffset","areaOffset","indexes","arange","lastri","lastci","resetAreaOffset","freezeHeight","freezeWidth","setOffset","coffset","getClipboardRect","resetOffset","indexesUpdated","calSelectedRangeByStart","setIndexes","moveIndexes","calSelectedRangeByEnd","_this$data$selector$r","setEnd","ern","ecn","showAutofill","hideAutofill","showClipboard","hideClipboard","inputEnter","preventDefault","filterItems","itemIndex","click","Suggest","items","itemClick","suggest_classCallCheck","cssRemoveKeys","parent","_el$html","startsWith","toUpperCase","title","item","label","html","suggest_toConsumableArray","input","keyCode","ctrlKey","Icon","icon_classCallCheck","_possibleConstructorReturn","_getPrototypeOf","iconNameEl","addMonth","step","setMonth","getMonth","weekday","setDate","getDay","Calendar","_h","calendar_classCallCheck","cvalue","headerLeftEl","bodyEl","buildAll","prev","calendar_toConsumableArray","week","selectChange","buildHeaderLeft","buildBody","getFullYear","_bodyEl$html","trs","year","month","cdate","startDate","datess","disabled","getDate","monthDays","_h2","tds","Datepicker","datepicker_classCallCheck","setValue","RegExp","resetTextareaSize","inputText","textlineEl","textEl","txts","maxTxtSize","editor_toConsumableArray","fontWidth","tlineWidth","maxWidth","viewFn","h1","twidth","setText","position","blur","val","setTimeout","focus","setSelectionRange","Editor","formulas","editor_classCallCheck","suggest","start","lastIndexOf","sit","eit","indexOf","datepicker","dateFormat","editable","search","bindInputEvents","setItems","suggestPosition","elOffset","sOffset","Button","button_classCallCheck","button_possibleConstructorReturn","button_getPrototypeOf","dpr","thinLineWidth","npx","px","npxLine","DrawBox","padding","draw_classCallCheck","borderTop","borderRight","borderBottom","borderLeft","drawFontLine","tx","ty","blheight","blwidth","floffset","Draw","ctx","getContext","resize","scale","clearRect","options","beginPath","restore","fillRect","fillText","mtxt","box","attr","textWrap","textx","textAlign","textBaseline","fillStyle","strokeStyle","biw","innerWidth","ntxts","txtWidth","measureText","textLine","substr","txtHeight","texty","lineWidth","setLineDash","draw_slicedToArray","moveTo","lineTo","stroke","draw_toConsumableArray","topxys","rightxys","bottomxys","leftxys","sx","sy","closePath","fill","dtextcb","clip","baseFonts","fontSizes","pt","infixExprToSuffixExpr","operatorStack","stack","subStrs","fnArgType","fnArgOperator","fnArgsLen","join","c1","cell_slicedToArray","ex","ey","rangelen","nc","evalSubExpr","subExpr","cellRender","evalSuffixExpr","srcStack","formulaMap","cellList","expr","fc","Fn","Function","_expr","params","render","reverse","core_cell","getCellText","baseFormulas","ary","reduce","formula_toConsumableArray","formula_slicedToArray","f","every","some","formulam","formatStringRender","formatNumberRender","_v1$split2","format_toArray","toFixed","first","parts","format_toConsumableArray","baseFormats","formatm","cellPaddingWidth","tableFixedHeaderCleanStyle","tableGridStyle","getDrawBox","rindex","yoffset","_data$cellRect","renderCell","draw","nrindex","frozen","dbox","setBorders","strokeBorders","cellText","_cell","getCellTextOrDefault","getFontSizePxByPt","getError","renderContent","fw","fh","exceptRowTotalHeight","filteredTranslateFunc","eachMergesInView","afRange","dropdown","renderSelectedHeaderCell","renderFixedHeaders","nty","ntx","_data$selector$range","rowEach","colEach","renderContentGrid","ch","cw","Table","table_classCallCheck","_data$scroll","_data$freeze","table_slicedToArray","vr","freezeViewRange","ftw","fth","theight","PAGER_SIZES","inches2px","inc","btnClick","toPrint","Print","print_classCallCheck","paper","print_toConsumableArray","ps","preview","iwidth","iheight","contentRange","pages","canvases","mViewRange","_loop","th","yo","wrap","canvas","rh","yof","contentWindow","idoc","head","cloneNode","drawImage","menuItems","buildMenu","ContextMenu","isHide","contextmenu_classCallCheck","contextmenu_toConsumableArray","_el$show$offset","Item","shortcut","item_classCallCheck","tip","element","_target$getBoundingCl","elBox","tooltip","DropdownItem","dd","getValue","_get","dropdown_item_getPrototypeOf","setTitle","Dropdown","showArrow","placement","dropdown_classCallCheck","dropdown_possibleConstructorReturn","dropdown_getPrototypeOf","headerClick","setContentChildren","headerEl","_this$contentEl","DropdownAlign","aligns","_getPrototypeOf2","dropdown_align_classCallCheck","icon","naligns","iconName","dropdown_align_possibleConstructorReturn","dropdown_align_getPrototypeOf","dropdown_align_toConsumableArray","setName","Align","align_classCallCheck","align_possibleConstructorReturn","align_getPrototypeOf","Valign","valign_classCallCheck","valign_possibleConstructorReturn","valign_getPrototypeOf","ToggleItem","toggle_item_get","toggle_item_getPrototypeOf","hasClass","Autofilter","autofilter_classCallCheck","autofilter_possibleConstructorReturn","autofilter_getPrototypeOf","Bold","bold_classCallCheck","bold_possibleConstructorReturn","bold_getPrototypeOf","Italic","italic_classCallCheck","italic_possibleConstructorReturn","italic_getPrototypeOf","Strike","strike_classCallCheck","strike_possibleConstructorReturn","strike_getPrototypeOf","Underline","underline_classCallCheck","underline_possibleConstructorReturn","underline_getPrototypeOf","themeColorPlaceHolders","themeColors","standardColors","buildTd","ColorPalette","_h4","color_palette_classCallCheck","table","color_palette_toConsumableArray","_h3","DropdownColor","dropdown_color_classCallCheck","colorPalette","dropdown_color_possibleConstructorReturn","dropdown_color_getPrototypeOf","lineTypes","DropdownLineType","dropdown_linetype_classCallCheck","beforei","lineTypeEls","iti","dropdown_linetype_possibleConstructorReturn","dropdown_linetype_getPrototypeOf","dropdown_linetype_toConsumableArray","buildTable","BorderPalette","border_palette_classCallCheck","ddColor","ddType","border_palette_slicedToArray","border_palette_toConsumableArray","DropdownBorder","dropdown_border_classCallCheck","borderPalette","dropdown_border_possibleConstructorReturn","dropdown_border_getPrototypeOf","Border","border_classCallCheck","border_possibleConstructorReturn","border_getPrototypeOf","IconItem","icon_item_get","icon_item_getPrototypeOf","Clearformat","clearformat_classCallCheck","clearformat_possibleConstructorReturn","clearformat_getPrototypeOf","Paintformat","paintformat_classCallCheck","paintformat_possibleConstructorReturn","paintformat_getPrototypeOf","TextColor","text_color_classCallCheck","text_color_possibleConstructorReturn","text_color_getPrototypeOf","FillColor","fill_color_classCallCheck","fill_color_possibleConstructorReturn","fill_color_getPrototypeOf","DropdownFontSize","dropdown_fontsize_classCallCheck","nfontSizes","dropdown_fontsize_possibleConstructorReturn","dropdown_fontsize_getPrototypeOf","dropdown_fontsize_toConsumableArray","Format","font_size_classCallCheck","font_size_possibleConstructorReturn","font_size_getPrototypeOf","DropdownFontsize","DropdownFont","dropdown_font_classCallCheck","nfonts","dropdown_font_possibleConstructorReturn","dropdown_font_getPrototypeOf","dropdown_font_toConsumableArray","Font","font_classCallCheck","font_possibleConstructorReturn","font_getPrototypeOf","DropdownFormat","dropdown_format_classCallCheck","nformats","dropdown_format_possibleConstructorReturn","dropdown_format_getPrototypeOf","dropdown_format_toConsumableArray","format_classCallCheck","format_possibleConstructorReturn","format_getPrototypeOf","DropdownFormula","dropdown_formula_classCallCheck","nformulas","dropdown_formula_possibleConstructorReturn","dropdown_formula_getPrototypeOf","dropdown_formula_toConsumableArray","formula_classCallCheck","formula_possibleConstructorReturn","formula_getPrototypeOf","Freeze","freeze_classCallCheck","freeze_possibleConstructorReturn","freeze_getPrototypeOf","Merge","toolbar_merge_classCallCheck","merge_possibleConstructorReturn","merge_getPrototypeOf","Redo","redo_classCallCheck","redo_possibleConstructorReturn","redo_getPrototypeOf","Undo","undo_classCallCheck","undo_possibleConstructorReturn","undo_getPrototypeOf","toolbar_print_classCallCheck","print_possibleConstructorReturn","print_getPrototypeOf","Textwrap","textwrap_classCallCheck","textwrap_possibleConstructorReturn","textwrap_getPrototypeOf","DropdownMore","more_classCallCheck","moreBtns","more_possibleConstructorReturn","more_getPrototypeOf","More","buildDivider","moreResize","_btns$html","_moreBtns$html","btns","moreEl","btns2","_moreEl$dd","widthFn","sumWidth2","list1","list2","toolbar_slicedToArray","Toolbar","toolbar_classCallCheck","undoEl","redoEl","paintformatEl","clearformatEl","formatEl","fontEl","fontSizeEl","FontSize","boldEl","italicEl","underlineEl","strikeEl","textColorEl","fillColorEl","borderEl","mergeEl","alignEl","valignEl","textwrapEl","freezeEl","autofilterEl","formulaEl","Formula","reset","_el$computedStyle","computedStyle","marginLeft","marginRight","_it$computedStyle","getSelectedCellStyle","getSelectedCell","setState","canUnmerge","canAutofilter","freezeIsActive","Modal","modal_classCallCheck","modal_toConsumableArray","dimmer","_this$el$show$box","_document$documentEle","xkeydownEsc","FormInput","hint","form_input_classCallCheck","vchange","FormSelect","getTitle","form_select_classCallCheck","itemEl","patterns","FormField","rule","labelWidth","form_field_classCallCheck","pattern","fieldLabelWidth","ModalValidation","modal_validation_classCallCheck","mf","rf","cf","criteriaSelected","of","criteriaOperatorSelected","minvf","maxvf","svf","vf","modal_validation_possibleConstructorReturn","modal_validation_getPrototypeOf","action","attrs","field","isShow","clsName","buildSortItem","resetFilterHeader","filterhEl","filterValues","checked","SortFilter","sort_filter_classCallCheck","filterbEl","filterClick","sortAscEl","sortDescEl","sortDesc","tindex","xtoast","_el$box","selectorSet","selectorMove","direction","_selector$indexes","sheet_slicedToArray","_selector$moveIndexes","verticalScrollbar","horizontalScrollbar","_data$getSelectedRect","tableOffset","getTableOffset","verticalScrollbarSet","erth","horizontalScrollbarSet","sheetReset","tableEl","overlayerEl","overlayerCEl","tOffset","vRect","editor","fwidth","fheight","setFreezeLengths","clearClipboard","msg","overlayerMousedown","sortFilter","offsetX","offsetY","isAutofillEl","getCellRectByXY","getSort","shiftKey","_data$getCellRectByXY","paintformatActive","paintformatToggle","editorSetOffset","sPosition","editorSet","getSelectedValidator","dataSetCellText","setSelectedCellText","insertDeleteRowColumn","setSelectedCellAttr","toolbarChange","_data$selector","sheetInitEvents","end","startx","starty","rowResizer","colResizer","contextMenu","modalValidation","tRect","xyInSelectedRect","setPosition","deltaY","deltaX","_evt$touches$","touches","pageX","pageY","_evt$changedTouches$","changedTouches","_evt$changedTouches$2","setAutoFilter","scrolly","resetBRLAreaOffset","scrollx","resetBRTAreaOffset","itext","addValidation","removeValidation","getSelectedValidation","reload","focusing","cdata","clipboardData","pasteFromText","which","altKey","metaKey","trigger","ntxt","Sheet","targetEl","sheet_classCallCheck","_data$settings","resetData","setFreeze","_this$data","_this$getRect","bottombar_classCallCheck","bottombar_possibleConstructorReturn","bottombar_getPrototypeOf","contentClick","bottombar_toConsumableArray","_h$css","Bottombar","addFunc","swapFunc","deleteFunc","dataNames","activeEl","deleteEl","clickSwap2","menuEl","clickSwap","bottombar_slicedToArray","Spreadsheet","selectors","src_classCallCheck","sheetIndex","datas","querySelector","bottombar","addSheet","sheet","newd","rootEl","addItem","oldIndex","deleteItem","oldd","src_slicedToArray","loadData"],"mappings":"aACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,YAAA,CAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cAAiDmB,OAAA,KAQjDrB,EAAAsB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAArB,EAAAqB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,iBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFA1B,EAAAkB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,WAAyCT,YAAA,EAAAK,UACzC,EAAAE,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Ky3C,MAAMvtC,IAAI,SAAAC,GAAE,OAAIA,EAAGC,+CAK/B,OADwBpK,KAAKI,KAArB8b,YACW3C,OAAOlR,MAAQ,iCAG7Bd,GAEL,OADAvH,KAAKI,KAAKqc,OAASlV,EACZvH,4CAQLmY,GAAc,SAAClY,GAAD,IAAKyyB,EAAL9yB,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAe,GAAf,OAAsB,IAAIy3C,GAAYp3C,EAAIyyB,IAE1D3xB,SACFA,OAAO+E,EAAI/E,OAAO+E,GAAK,GACvB/E,OAAO+E,EAAEqS,YAAcA,GACvBpX,OAAO+E,EAAEqS,YAAYE,OAAS,SAACC,EAAMJ,GAAP,OAAmBG,EAAOC,EAAMJ,KAGjDm/B","file":"xspreadsheet.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n","/* global document */\n/* global window */\nclass Element {\n constructor(tag, className = '') {\n if (typeof tag === 'string') {\n this.el = document.createElement(tag);\n this.el.className = className;\n } else {\n this.el = tag;\n }\n this.data = {};\n }\n\n data(key, value) {\n if (value !== undefined) {\n this.data[key] = value;\n return this;\n }\n return this.data[key];\n }\n\n on(eventNames, handler) {\n const [fen, ...oen] = eventNames.split('.');\n let eventName = fen;\n if (eventName === 'mousewheel' && /Firefox/i.test(window.navigator.userAgent)) {\n eventName = 'DOMMouseScroll';\n }\n this.el.addEventListener(eventName, (evt) => {\n handler(evt);\n for (let i = 0; i < oen.length; i += 1) {\n const k = oen[i];\n if (k === 'left' && evt.button !== 0) {\n return;\n }\n if (k === 'right' && evt.button !== 2) {\n return;\n }\n if (k === 'stop') {\n evt.stopPropagation();\n }\n }\n });\n return this;\n }\n\n offset(value) {\n if (value !== undefined) {\n Object.keys(value).forEach((k) => {\n this.css(k, `${value[k]}px`);\n });\n return this;\n }\n const {\n offsetTop, offsetLeft, offsetHeight, offsetWidth,\n } = this.el;\n return {\n top: offsetTop,\n left: offsetLeft,\n height: offsetHeight,\n width: offsetWidth,\n };\n }\n\n scroll(v) {\n const { el } = this;\n if (v !== undefined) {\n if (v.left !== undefined) {\n el.scrollLeft = v.left;\n }\n if (v.top !== undefined) {\n el.scrollTop = v.top;\n }\n }\n return { left: el.scrollLeft, top: el.scrollTop };\n }\n\n box() {\n return this.el.getBoundingClientRect();\n }\n\n parent() {\n return new Element(this.el.parentNode);\n }\n\n children(...eles) {\n if (arguments.length === 0) {\n return this.el.childNodes;\n }\n eles.forEach(ele => this.child(ele));\n return this;\n }\n\n removeChild(el) {\n this.el.removeChild(el);\n }\n\n /*\n first() {\n return this.el.firstChild;\n }\n\n last() {\n return this.el.lastChild;\n }\n\n remove(ele) {\n return this.el.removeChild(ele);\n }\n\n prepend(ele) {\n const { el } = this;\n if (el.children.length > 0) {\n el.insertBefore(ele, el.firstChild);\n } else {\n el.appendChild(ele);\n }\n return this;\n }\n\n prev() {\n return this.el.previousSibling;\n }\n\n next() {\n return this.el.nextSibling;\n }\n */\n\n child(arg) {\n let ele = arg;\n if (typeof arg === 'string') {\n ele = document.createTextNode(arg);\n } else if (arg instanceof Element) {\n ele = arg.el;\n }\n this.el.appendChild(ele);\n return this;\n }\n\n contains(ele) {\n return this.el.contains(ele);\n }\n\n className(v) {\n if (v !== undefined) {\n this.el.className = v;\n return this;\n }\n return this.el.className;\n }\n\n addClass(name) {\n this.el.classList.add(name);\n return this;\n }\n\n hasClass(name) {\n return this.el.classList.contains(name);\n }\n\n removeClass(name) {\n this.el.classList.remove(name);\n return this;\n }\n\n toggle(cls = 'active') {\n return this.toggleClass(cls);\n }\n\n toggleClass(name) {\n return this.el.classList.toggle(name);\n }\n\n active(flag = true, cls = 'active') {\n if (flag) this.addClass(cls);\n else this.removeClass(cls);\n return this;\n }\n\n checked(flag = true) {\n this.active(flag, 'checked');\n return this;\n }\n\n disabled(flag = true) {\n if (flag) this.addClass('disabled');\n else this.removeClass('disabled');\n return this;\n }\n\n // key, value\n // key\n // {k, v}...\n attr(key, value) {\n if (value !== undefined) {\n this.el.setAttribute(key, value);\n } else {\n if (typeof key === 'string') {\n return this.el.getAttribute(key);\n }\n Object.keys(key).forEach((k) => {\n this.el.setAttribute(k, key[k]);\n });\n }\n return this;\n }\n\n removeAttr(key) {\n this.el.removeAttribute(key);\n return this;\n }\n\n html(content) {\n if (content !== undefined) {\n this.el.innerHTML = content;\n return this;\n }\n return this.el.innerHTML;\n }\n\n val(v) {\n if (v !== undefined) {\n this.el.value = v;\n return this;\n }\n return this.el.value;\n }\n\n cssRemoveKeys(...keys) {\n keys.forEach(k => this.el.style.removeProperty(k));\n return this;\n }\n\n // css( propertyName )\n // css( propertyName, value )\n // css( properties )\n css(name, value) {\n if (value === undefined && typeof name !== 'string') {\n Object.keys(name).forEach((k) => {\n this.el.style[k] = name[k];\n });\n return this;\n }\n if (value !== undefined) {\n this.el.style[name] = value;\n return this;\n }\n return this.el.style[name];\n }\n\n computedStyle() {\n return window.getComputedStyle(this.el, null);\n }\n\n show() {\n this.css('display', 'block');\n return this;\n }\n\n hide() {\n this.css('display', 'none');\n return this;\n }\n}\n\nconst h = (tag, className = '') => new Element(tag, className);\n\nexport {\n Element,\n h,\n};\n","import './_.prototypes';\n\nconst alphabets = ['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'];\n\n/** index number 2 letters\n * @example stringAt(26) ==> 'AA'\n * @date 2019-10-10\n * @export\n * @param {number} index\n * @returns {string}\n */\nexport function stringAt(index) {\n let str = '';\n let cindex = index;\n while (cindex >= alphabets.length) {\n cindex /= alphabets.length;\n cindex -= 1;\n str += alphabets[parseInt(cindex, 10) % alphabets.length];\n }\n const last = index % alphabets.length;\n str += alphabets[last];\n return str;\n}\n\n/** translate letter in A1-tag to number\n * @date 2019-10-10\n * @export\n * @param {string} str \"AA\" in A1-tag \"AA1\"\n * @returns {number}\n */\nexport function indexAt(str) {\n let ret = 0;\n for (let i = 0; i < str.length - 1; i += 1) {\n const cindex = str.charCodeAt(i) - 65;\n const exponet = str.length - 1 - i;\n ret += (alphabets.length ** exponet) + (alphabets.length * cindex);\n }\n ret += str.charCodeAt(str.length - 1) - 65;\n return ret;\n}\n\n// B10 => x,y\n/** translate A1-tag to XY-tag\n * @date 2019-10-10\n * @export\n * @param {tagA1} src\n * @returns {tagXY}\n */\nexport function expr2xy(src) {\n let x = '';\n let y = '';\n for (let i = 0; i < src.length; i += 1) {\n if (src.charAt(i) >= '0' && src.charAt(i) <= '9') {\n y += src.charAt(i);\n } else {\n x += src.charAt(i);\n }\n }\n return [indexAt(x), parseInt(y, 10) - 1];\n}\n\n/** translate XY-tag to A1-tag\n * @example x,y => B10\n * @date 2019-10-10\n * @export\n * @param {number} x\n * @param {number} y\n * @returns {tagA1}\n */\nexport function xy2expr(x, y) {\n return `${stringAt(x)}${y + 1}`;\n}\n\n/** translate A1-tag src by (xn, yn)\n * @date 2019-10-10\n * @export\n * @param {tagA1} src\n * @param {number} xn\n * @param {number} yn\n * @returns {tagA1}\n */\nexport function expr2expr(src, xn, yn) {\n const [x, y] = expr2xy(src);\n return xy2expr(x + xn, y + yn);\n}\n\nexport default {\n stringAt,\n indexAt,\n expr2xy,\n xy2expr,\n expr2expr,\n};\n","import { xy2expr, expr2xy } from './alphabet';\n\nclass CellRange {\n constructor(sri, sci, eri, eci, w = 0, h = 0) {\n this.sri = sri;\n this.sci = sci;\n this.eri = eri;\n this.eci = eci;\n this.w = w;\n this.h = h;\n }\n\n set(sri, sci, eri, eci) {\n this.sri = sri;\n this.sci = sci;\n this.eri = eri;\n this.eci = eci;\n }\n\n multiple() {\n return this.eri - this.sri > 0 || this.eci - this.sci > 0;\n }\n\n // cell-index: ri, ci\n // cell-ref: A10\n includes(...args) {\n let [ri, ci] = [0, 0];\n if (args.length === 1) {\n [ci, ri] = expr2xy(args[0]);\n } else if (args.length === 2) {\n [ri, ci] = args;\n }\n const {\n sri, sci, eri, eci,\n } = this;\n return sri <= ri && ri <= eri && sci <= ci && ci <= eci;\n }\n\n each(cb, rowFilter = () => true) {\n const {\n sri, sci, eri, eci,\n } = this;\n for (let i = sri; i <= eri; i += 1) {\n if (rowFilter(i)) {\n for (let j = sci; j <= eci; j += 1) {\n cb(i, j);\n }\n }\n }\n }\n\n contains(other) {\n return this.sri <= other.sri\n && this.sci <= other.sci\n && this.eri >= other.eri\n && this.eci >= other.eci;\n }\n\n // within\n within(other) {\n return this.sri >= other.sri\n && this.sci >= other.sci\n && this.eri <= other.eri\n && this.eci <= other.eci;\n }\n\n // disjoint\n disjoint(other) {\n return this.sri > other.eri\n || this.sci > other.eci\n || other.sri > this.eri\n || other.sci > this.eci;\n }\n\n // intersects\n intersects(other) {\n return this.sri <= other.eri\n && this.sci <= other.eci\n && other.sri <= this.eri\n && other.sci <= this.eci;\n }\n\n // union\n union(other) {\n const {\n sri, sci, eri, eci,\n } = this;\n return new CellRange(\n other.sri < sri ? other.sri : sri,\n other.sci < sci ? other.sci : sci,\n other.eri > eri ? other.eri : eri,\n other.eci > eci ? other.eci : eci,\n );\n }\n\n // intersection\n // intersection(other) {}\n\n // Returns Array that represents that part of this that does not intersect with other\n // difference\n difference(other) {\n const ret = [];\n const addRet = (sri, sci, eri, eci) => {\n ret.push(new CellRange(sri, sci, eri, eci));\n };\n const {\n sri, sci, eri, eci,\n } = this;\n const dsr = other.sri - sri;\n const dsc = other.sci - sci;\n const der = eri - other.eri;\n const dec = eci - other.eci;\n if (dsr > 0) {\n addRet(sri, sci, other.sri - 1, eci);\n if (der > 0) {\n addRet(other.eri + 1, sci, eri, eci);\n if (dsc > 0) {\n addRet(other.sri, sci, other.eri, other.sci - 1);\n }\n if (dec > 0) {\n addRet(other.sri, other.eci + 1, other.eri, eci);\n }\n } else {\n if (dsc > 0) {\n addRet(other.sri, sci, eri, other.sci - 1);\n }\n if (dec > 0) {\n addRet(other.sri, other.eci + 1, eri, eci);\n }\n }\n } else if (der > 0) {\n addRet(other.eri + 1, sci, eri, eci);\n if (dsc > 0) {\n addRet(sri, sci, other.eri, other.sci - 1);\n }\n if (dec > 0) {\n addRet(sri, other.eci + 1, other.eri, eci);\n }\n }\n if (dsc > 0) {\n addRet(sri, sci, eri, other.sci - 1);\n if (dec > 0) {\n addRet(sri, other.eri + 1, eri, eci);\n if (dsr > 0) {\n addRet(sri, other.sci, other.sri - 1, other.eci);\n }\n if (der > 0) {\n addRet(other.sri + 1, other.sci, eri, other.eci);\n }\n } else {\n if (dsr > 0) {\n addRet(sri, other.sci, other.sri - 1, eci);\n }\n if (der > 0) {\n addRet(other.sri + 1, other.sci, eri, eci);\n }\n }\n } else if (dec > 0) {\n addRet(eri, other.eci + 1, eri, eci);\n if (dsr > 0) {\n addRet(sri, sci, other.sri - 1, other.eci);\n }\n if (der > 0) {\n addRet(other.eri + 1, sci, eri, other.eci);\n }\n }\n return ret;\n }\n\n size() {\n return [\n this.eri - this.sri + 1,\n this.eci - this.sci + 1,\n ];\n }\n\n toString() {\n const {\n sri, sci, eri, eci,\n } = this;\n let ref = xy2expr(sci, sri);\n if (this.multiple()) {\n ref = `${ref}:${xy2expr(eci, eri)}`;\n }\n return ref;\n }\n\n clone() {\n const {\n sri, sci, eri, eci, w, h,\n } = this;\n return new CellRange(sri, sci, eri, eci, w, h);\n }\n\n /*\n toJSON() {\n return this.toString();\n }\n */\n\n equals(other) {\n return this.eri === other.eri\n && this.eci === other.eci\n && this.sri === other.sri\n && this.sci === other.sci;\n }\n\n static valueOf(ref) {\n // B1:B8, B1 => 1 x 1 cell range\n const refs = ref.split(':');\n const [sci, sri] = expr2xy(refs[0]);\n let [eri, eci] = [sri, sci];\n if (refs.length > 1) {\n [eci, eri] = expr2xy(refs[1]);\n }\n return new CellRange(sri, sci, eri, eci);\n }\n}\n\nexport default CellRange;\n\nexport {\n CellRange,\n};\n","import { CellRange } from './cell_range';\n\nexport default class Selector {\n constructor() {\n this.range = new CellRange(0, 0, 0, 0);\n this.ri = 0;\n this.ci = 0;\n }\n\n multiple() {\n return this.range.multiple();\n }\n\n setIndexes(ri, ci) {\n this.ri = ri;\n this.ci = ci;\n }\n\n size() {\n return this.range.size();\n }\n}\n","export default class Scroll {\n constructor() {\n this.x = 0; // left\n this.y = 0; // top\n this.ri = 0; // cell row-index\n this.ci = 0; // cell col-index\n }\n}\n","// import helper from '../helper';\n\nexport default class History {\n constructor() {\n this.undoItems = [];\n this.redoItems = [];\n }\n\n add(data) {\n this.undoItems.push(JSON.stringify(data));\n this.redoItems = [];\n }\n\n canUndo() {\n return this.undoItems.length > 0;\n }\n\n canRedo() {\n return this.redoItems.length > 0;\n }\n\n undo(currentd, cb) {\n const { undoItems, redoItems } = this;\n if (this.canUndo()) {\n redoItems.push(JSON.stringify(currentd));\n cb(JSON.parse(undoItems.pop()));\n }\n }\n\n redo(currentd, cb) {\n const { undoItems, redoItems } = this;\n if (this.canRedo()) {\n undoItems.push(JSON.stringify(currentd));\n cb(JSON.parse(redoItems.pop()));\n }\n }\n}\n","export default class Clipboard {\n constructor() {\n this.range = null; // CellRange\n this.state = 'clear';\n }\n\n copy(cellRange) {\n this.range = cellRange;\n this.state = 'copy';\n return this;\n }\n\n cut(cellRange) {\n this.range = cellRange;\n this.state = 'cut';\n return this;\n }\n\n isCopy() {\n return this.state === 'copy';\n }\n\n isCut() {\n return this.state === 'cut';\n }\n\n isClear() {\n return this.state === 'clear';\n }\n\n clear() {\n this.range = null;\n this.state = 'clear';\n }\n}\n","import { CellRange } from './cell_range';\n// operator: all|eq|neq|gt|gte|lt|lte|in|be\n// value:\n// in => []\n// be => [min, max]\nclass Filter {\n constructor(ci, operator, value) {\n this.ci = ci;\n this.operator = operator;\n this.value = value;\n }\n\n set(operator, value) {\n this.operator = operator;\n this.value = value;\n }\n\n includes(v) {\n const { operator, value } = this;\n if (operator === 'all') {\n return true;\n }\n if (operator === 'in') {\n return value.includes(v);\n }\n return false;\n }\n\n vlength() {\n const { operator, value } = this;\n if (operator === 'in') {\n return value.length;\n }\n return 0;\n }\n\n getData() {\n const { ci, operator, value } = this;\n return { ci, operator, value };\n }\n}\n\nclass Sort {\n constructor(ci, order) {\n this.ci = ci;\n this.order = order;\n }\n\n asc() {\n return this.order === 'asc';\n }\n\n desc() {\n return this.order === 'desc';\n }\n}\n\nexport default class AutoFilter {\n constructor() {\n this.ref = null;\n this.filters = [];\n this.sort = null;\n }\n\n setData({ ref, filters, sort }) {\n if (ref != null) {\n this.ref = ref;\n this.fitlers = filters.map(it => new Filter(it.ci, it.operator, it.value));\n if (sort) {\n this.sort = new Sort(sort.ci, sort.order);\n }\n }\n }\n\n getData() {\n if (this.active()) {\n const { ref, filters, sort } = this;\n return { ref, filters: filters.map(it => it.getData()), sort };\n }\n return {};\n }\n\n addFilter(ci, operator, value) {\n const filter = this.getFilter(ci);\n if (filter == null) {\n this.filters.push(new Filter(ci, operator, value));\n } else {\n filter.set(operator, value);\n }\n }\n\n setSort(ci, order) {\n this.sort = order ? new Sort(ci, order) : null;\n }\n\n includes(ri, ci) {\n if (this.active()) {\n return this.hrange().includes(ri, ci);\n }\n return false;\n }\n\n getSort(ci) {\n const { sort } = this;\n if (sort && sort.ci === ci) {\n return sort;\n }\n return null;\n }\n\n getFilter(ci) {\n const { filters } = this;\n for (let i = 0; i < filters.length; i += 1) {\n if (filters[i].ci === ci) {\n return filters[i];\n }\n }\n return null;\n }\n\n filteredRows(getCell) {\n // const ary = [];\n // let lastri = 0;\n const rset = new Set();\n const fset = new Set();\n if (this.active()) {\n const { sri, eri } = this.range();\n const { filters } = this;\n for (let ri = sri + 1; ri <= eri; ri += 1) {\n for (let i = 0; i < filters.length; i += 1) {\n const filter = filters[i];\n const cell = getCell(ri, filter.ci);\n const ctext = cell ? cell.text : '';\n if (!filter.includes(ctext)) {\n rset.add(ri);\n break;\n } else {\n fset.add(ri);\n }\n }\n }\n }\n return { rset, fset };\n }\n\n items(ci, getCell) {\n const m = {};\n if (this.active()) {\n const { sri, eri } = this.range();\n for (let ri = sri + 1; ri <= eri; ri += 1) {\n const cell = getCell(ri, ci);\n if (cell !== null && !/^\\s*$/.test(cell.text)) {\n const key = cell.text;\n const cnt = (m[key] || 0) + 1;\n m[key] = cnt;\n } else {\n m[''] = (m[''] || 0) + 1;\n }\n }\n }\n return m;\n }\n\n range() {\n return CellRange.valueOf(this.ref);\n }\n\n hrange() {\n const r = this.range();\n r.eri = r.sri;\n return r;\n }\n\n clear() {\n this.ref = null;\n this.filters = [];\n this.sort = null;\n }\n\n active() {\n return this.ref !== null;\n }\n}\n","import { CellRange } from './cell_range';\n\nclass Merges {\n constructor(d = []) {\n this._ = d;\n }\n\n forEach(cb) {\n this._.forEach(cb);\n }\n\n deleteWithin(cr) {\n this._ = this._.filter(it => !it.within(cr));\n }\n\n getFirstIncludes(ri, ci) {\n for (let i = 0; i < this._.length; i += 1) {\n const it = this._[i];\n if (it.includes(ri, ci)) {\n return it;\n }\n }\n return null;\n }\n\n filterIntersects(cellRange) {\n return new Merges(this._.filter(it => it.intersects(cellRange)));\n }\n\n intersects(cellRange) {\n for (let i = 0; i < this._.length; i += 1) {\n const it = this._[i];\n if (it.intersects(cellRange)) {\n // console.log('intersects');\n return true;\n }\n }\n return false;\n }\n\n union(cellRange) {\n let cr = cellRange;\n this._.forEach((it) => {\n if (it.intersects(cr)) {\n cr = it.union(cr);\n }\n });\n return cr;\n }\n\n add(cr) {\n this.deleteWithin(cr);\n this._.push(cr);\n }\n\n // type: row | column\n shift(type, index, n, cbWithin) {\n this._.forEach((cellRange) => {\n const {\n sri, sci, eri, eci,\n } = cellRange;\n const range = cellRange;\n if (type === 'row') {\n if (sri >= index) {\n range.sri += n;\n range.eri += n;\n } else if (sri < index && index <= eri) {\n range.eri += n;\n cbWithin(sri, sci, n, 0);\n }\n } else if (type === 'column') {\n if (sci >= index) {\n range.sci += n;\n range.eci += n;\n } else if (sci < index && index <= eci) {\n range.eci += n;\n cbWithin(sri, sci, 0, n);\n }\n }\n });\n }\n\n move(cellRange, rn, cn) {\n this._.forEach((it1) => {\n const it = it1;\n if (it.within(cellRange)) {\n it.eri += rn;\n it.sri += rn;\n it.sci += cn;\n it.eci += cn;\n }\n });\n }\n\n setData(merges) {\n this._ = merges.map(merge => CellRange.valueOf(merge));\n return this;\n }\n\n getData() {\n return this._.map(merge => merge.toString());\n }\n}\n\nexport default {};\nexport {\n Merges,\n};\n","/* eslint-disable no-param-reassign */\nfunction cloneDeep(obj) {\n return JSON.parse(JSON.stringify(obj));\n}\n\nconst mergeDeep = (object = {}, ...sources) => {\n sources.forEach((source) => {\n Object.keys(source).forEach((key) => {\n const v = source[key];\n // console.log('k:', key, ', v:', source[key], typeof v, v instanceof Object);\n if (typeof v === 'string' || typeof v === 'number' || typeof v === 'boolean') {\n object[key] = v;\n } else if (typeof v !== 'function' && !Array.isArray(v) && v instanceof Object) {\n object[key] = object[key] || {};\n mergeDeep(object[key], v);\n } else {\n object[key] = v;\n }\n });\n });\n // console.log('::', object);\n return object;\n};\n\nfunction equals(obj1, obj2) {\n const keys = Object.keys(obj1);\n if (keys.length !== Object.keys(obj2).length) return false;\n for (let i = 0; i < keys.length; i += 1) {\n const k = keys[i];\n const v1 = obj1[k];\n const v2 = obj2[k];\n if (v2 === undefined) return false;\n if (typeof v1 === 'string' || typeof v1 === 'number' || typeof v1 === 'boolean') {\n if (v1 !== v2) return false;\n } else if (Array.isArray(v1)) {\n if (v1.length !== v2.length) return false;\n for (let ai = 0; ai < v1.length; ai += 1) {\n if (!equals(v1[ai], v2[ai])) return false;\n }\n } else if (typeof v1 !== 'function' && !Array.isArray(v1) && v1 instanceof Object) {\n if (!equals(v1, v2)) return false;\n }\n }\n return true;\n}\n\n/*\n objOrAry: obejct or Array\n cb: (value, index | key) => { return value }\n*/\nconst sum = (objOrAry, cb = value => value) => {\n let total = 0;\n let size = 0;\n Object.keys(objOrAry).forEach((key) => {\n total += cb(objOrAry[key], key);\n size += 1;\n });\n return [total, size];\n};\n\nfunction deleteProperty(obj, property) {\n const oldv = obj[`${property}`];\n delete obj[`${property}`];\n return oldv;\n}\n\nfunction rangeReduceIf(min, max, inits, initv, ifv, getv) {\n let s = inits;\n let v = initv;\n let i = min;\n for (; i < max; i += 1) {\n if (s > ifv) break;\n v = getv(i);\n s += v;\n }\n return [i, s - v, v];\n}\n\nfunction rangeSum(min, max, getv) {\n let s = 0;\n for (let i = min; i < max; i += 1) {\n s += getv(i);\n }\n return s;\n}\n\nfunction rangeEach(min, max, cb) {\n for (let i = min; i < max; i += 1) {\n cb(i);\n }\n}\n\nfunction arrayEquals(a1, a2) {\n if (a1.length === a2.length) {\n for (let i = 0; i < a1.length; i += 1) {\n if (a1[i] !== a2[i]) return false;\n }\n } else return false;\n return true;\n}\n\nexport default {\n cloneDeep,\n merge: (...sources) => mergeDeep({}, ...sources),\n equals,\n arrayEquals,\n sum,\n rangeEach,\n rangeSum,\n rangeReduceIf,\n deleteProperty,\n};\n","import helper from './helper';\nimport { expr2expr } from './alphabet';\n\nclass Rows {\n constructor({ len, height }) {\n this._ = {};\n this.len = len;\n // default row height\n this.height = height;\n }\n\n getHeight(ri) {\n const row = this.get(ri);\n if (row && row.height) {\n return row.height;\n }\n return this.height;\n }\n\n setHeight(ri, v) {\n const row = this.getOrNew(ri);\n row.height = v;\n }\n\n setStyle(ri, style) {\n const row = this.getOrNew(ri);\n row.style = style;\n }\n\n sumHeight(min, max, exceptSet) {\n return helper.rangeSum(min, max, (i) => {\n if (exceptSet && exceptSet.has(i)) return 0;\n return this.getHeight(i);\n });\n }\n\n totalHeight() {\n return this.sumHeight(0, this.len);\n }\n\n get(ri) {\n return this._[ri];\n }\n\n getOrNew(ri) {\n this._[ri] = this._[ri] || { cells: {} };\n return this._[ri];\n }\n\n getCell(ri, ci) {\n const row = this.get(ri);\n if (row !== undefined && row.cells !== undefined && row.cells[ci] !== undefined) {\n return row.cells[ci];\n }\n return null;\n }\n\n getCellMerge(ri, ci) {\n const cell = this.getCell(ri, ci);\n if (cell && cell.merge) return cell.merge;\n return [0, 0];\n }\n\n getCellOrNew(ri, ci) {\n const row = this.getOrNew(ri);\n row.cells[ci] = row.cells[ci] || {};\n return row.cells[ci];\n }\n\n // what: all | text | format\n setCell(ri, ci, cell, what = 'all') {\n const row = this.getOrNew(ri);\n if (what === 'all') {\n row.cells[ci] = cell;\n } else if (what === 'text') {\n row.cells[ci] = row.cells[ci] || {};\n row.cells[ci].text = cell.text;\n } else if (what === 'format') {\n row.cells[ci] = row.cells[ci] || {};\n row.cells[ci].style = cell.style;\n if (cell.merge) row.cells[ci].merge = cell.merge;\n }\n }\n\n setCellText(ri, ci, text) {\n const cell = this.getCellOrNew(ri, ci);\n cell.text = text;\n }\n\n // what: all | format | text\n copyPaste(srcCellRange, dstCellRange, what, autofill = false, cb = () => {}) {\n const {\n sri, sci, eri, eci,\n } = srcCellRange;\n const dsri = dstCellRange.sri;\n const dsci = dstCellRange.sci;\n const deri = dstCellRange.eri;\n const deci = dstCellRange.eci;\n const [rn, cn] = srcCellRange.size();\n const [drn, dcn] = dstCellRange.size();\n // console.log(srcIndexes, dstIndexes);\n let isAdd = true;\n let dn = 0;\n if (deri < sri || deci < sci) {\n isAdd = false;\n if (deri < sri) dn = drn;\n else dn = dcn;\n }\n // console.log('drn:', drn, ', dcn:', dcn, dn, isAdd);\n for (let i = sri; i <= eri; i += 1) {\n if (this._[i]) {\n for (let j = sci; j <= eci; j += 1) {\n if (this._[i].cells && this._[i].cells[j]) {\n for (let ii = dsri; ii <= deri; ii += rn) {\n for (let jj = dsci; jj <= deci; jj += cn) {\n const nri = ii + (i - sri);\n const nci = jj + (j - sci);\n const ncell = helper.cloneDeep(this._[i].cells[j]);\n // ncell.text\n if (autofill && ncell && ncell.text && ncell.text.length > 0) {\n const { text } = ncell;\n let n = (jj - dsci) + (ii - dsri) + 2;\n if (!isAdd) {\n n -= dn + 1;\n }\n if (text[0] === '=') {\n ncell.text = text.replace(/\\w{1,3}\\d/g, (word) => {\n let [xn, yn] = [0, 0];\n if (sri === dsri) {\n xn = n - 1;\n // if (isAdd) xn -= 1;\n } else {\n yn = n - 1;\n }\n // console.log('xn:', xn, ', yn:', yn, word, expr2expr(word, xn, yn));\n return expr2expr(word, xn, yn);\n });\n } else {\n const result = /[\\\\.\\d]+$/.exec(text);\n // console.log('result:', result);\n if (result !== null) {\n const index = Number(result[0]) + n - 1;\n ncell.text = text.substring(0, result.index) + index;\n }\n }\n }\n // console.log('ncell:', nri, nci, ncell);\n this.setCell(nri, nci, ncell, what);\n cb(nri, nci, ncell);\n }\n }\n }\n }\n }\n }\n }\n\n cutPaste(srcCellRange, dstCellRange) {\n const ncellmm = {};\n this.each((ri) => {\n this.eachCells(ri, (ci) => {\n let nri = parseInt(ri, 10);\n let nci = parseInt(ci, 10);\n if (srcCellRange.includes(ri, ci)) {\n nri = dstCellRange.sri + (nri - srcCellRange.sri);\n nci = dstCellRange.sci + (nci - srcCellRange.sci);\n }\n ncellmm[nri] = ncellmm[nri] || { cells: {} };\n ncellmm[nri].cells[nci] = this._[ri].cells[ci];\n });\n });\n this._ = ncellmm;\n }\n\n // src: Array>\n paste(src, dstCellRange) {\n if (src.length <= 0) return;\n const { sri, sci } = dstCellRange;\n src.forEach((row, i) => {\n const ri = sri + i;\n row.forEach((cell, j) => {\n const ci = sci + j;\n this.setCellText(ri, ci, cell);\n });\n });\n }\n\n insert(sri, n = 1) {\n const ndata = {};\n this.each((ri, row) => {\n let nri = parseInt(ri, 10);\n if (nri >= sri) {\n nri += n;\n }\n ndata[nri] = row;\n });\n this._ = ndata;\n this.len += n;\n }\n\n delete(sri, eri) {\n const n = eri - sri + 1;\n const ndata = {};\n this.each((ri, row) => {\n const nri = parseInt(ri, 10);\n if (nri < sri) {\n ndata[nri] = row;\n } else if (ri > eri) {\n ndata[nri - n] = row;\n }\n });\n this._ = ndata;\n this.len -= n;\n }\n\n insertColumn(sci, n = 1) {\n this.each((ri, row) => {\n const rndata = {};\n this.eachCells(ri, (ci, cell) => {\n let nci = parseInt(ci, 10);\n if (nci >= sci) {\n nci += n;\n }\n rndata[nci] = cell;\n });\n row.cells = rndata;\n });\n }\n\n deleteColumn(sci, eci) {\n const n = eci - sci + 1;\n this.each((ri, row) => {\n const rndata = {};\n this.eachCells(ri, (ci, cell) => {\n const nci = parseInt(ci, 10);\n if (nci < sci) {\n rndata[nci] = cell;\n } else if (nci > eci) {\n rndata[nci - n] = cell;\n }\n });\n row.cells = rndata;\n });\n }\n\n // what: all | text | format | merge\n deleteCells(cellRange, what = 'all') {\n cellRange.each((i, j) => {\n this.deleteCell(i, j, what);\n });\n }\n\n // what: all | text | format | merge\n deleteCell(ri, ci, what = 'all') {\n const row = this.get(ri);\n if (row !== null) {\n const cell = this.getCell(ri, ci);\n if (cell !== null) {\n if (what === 'all') {\n delete row.cells[ci];\n } else if (what === 'text') {\n if (cell.text) delete cell.text;\n if (cell.value) delete cell.value;\n } else if (what === 'format') {\n if (cell.style !== undefined) delete cell.style;\n if (cell.merge) delete cell.merge;\n } else if (what === 'merge') {\n if (cell.merge) delete cell.merge;\n }\n }\n }\n }\n\n maxCell() {\n const keys = Object.keys(this._);\n const ri = keys[keys.length - 1];\n const col = this._[ri];\n if (col) {\n const { cells } = col;\n const ks = Object.keys(cells);\n const ci = ks[ks.length - 1];\n return [parseInt(ri, 10), parseInt(ci, 10)];\n }\n return [0, 0];\n }\n\n each(cb) {\n Object.entries(this._).forEach(([ri, row]) => {\n cb(ri, row);\n });\n }\n\n eachCells(ri, cb) {\n if (this._[ri] && this._[ri].cells) {\n Object.entries(this._[ri].cells).forEach(([ci, cell]) => {\n cb(ci, cell);\n });\n }\n }\n\n setData(d) {\n if (d.len) {\n this.len = d.len;\n delete d.len;\n }\n this._ = d;\n }\n\n getData() {\n const { len } = this;\n return Object.assign({ len }, this._);\n }\n}\n\nexport default {};\nexport {\n Rows,\n};\n","import helper from './helper';\n\nclass Cols {\n constructor({\n len, width, indexWidth, minWidth,\n }) {\n this._ = {};\n this.len = len;\n this.width = width;\n this.indexWidth = indexWidth;\n this.minWidth = minWidth;\n }\n\n setData(d) {\n if (d.len) {\n this.len = d.len;\n delete d.len;\n }\n this._ = d;\n }\n\n getData() {\n const { len } = this;\n return Object.assign({ len }, this._);\n }\n\n getWidth(i) {\n const col = this._[i];\n if (col && col.width) {\n return col.width;\n }\n return this.width;\n }\n\n getOrNew(ci) {\n this._[ci] = this._[ci] || {};\n return this._[ci];\n }\n\n setWidth(ci, width) {\n const col = this.getOrNew(ci);\n col.width = width;\n }\n\n setStyle(ci, style) {\n const col = this.getOrNew(ci);\n col.style = style;\n }\n\n sumWidth(min, max) {\n return helper.rangeSum(min, max, i => this.getWidth(i));\n }\n\n totalWidth() {\n return this.sumWidth(0, this.len);\n }\n}\n\nexport default {};\nexport {\n Cols,\n};\n","/* global window */\nimport en from './en';\n\nlet $lang = 'en';\nconst $messages = {\n en,\n};\n\nfunction translate(key, messages) {\n if (messages && messages[$lang]) {\n let message = messages[$lang];\n const keys = key.split('.');\n for (let i = 0; i < keys.length; i += 1) {\n const property = keys[i];\n const value = message[property];\n if (i === keys.length - 1) return value;\n if (!value) return undefined;\n message = value;\n }\n }\n return undefined;\n}\n\nfunction t(key) {\n let v = translate(key, $messages);\n if (!v && window && window.x && window.x.spreadsheet && window.x.spreadsheet.$messages) {\n v = translate(key, window.x.spreadsheet.$messages);\n }\n return v || '';\n}\n\nfunction tf(key) {\n return () => t(key);\n}\n\nfunction locale(lang, message) {\n $lang = lang;\n if (message) {\n $messages[lang] = message;\n }\n}\n\nexport default {\n t,\n};\n\nexport {\n locale,\n t,\n tf,\n};\n","export default {\n toolbar: {\n undo: 'Undo',\n redo: 'Redo',\n print: 'Print',\n paintformat: 'Paint format',\n clearformat: 'Clear format',\n format: 'Format',\n fontName: 'Font',\n fontSize: 'Font size',\n fontBold: 'Font bold',\n fontItalic: 'Font italic',\n underline: 'Underline',\n strike: 'Strike',\n color: 'Text color',\n bgcolor: 'Fill color',\n border: 'Borders',\n merge: 'Merge cells',\n align: 'Horizontal align',\n valign: 'Vertical align',\n textwrap: 'Text wrapping',\n freeze: 'Freeze cell',\n autofilter: 'Filter',\n formula: 'Functions',\n more: 'More',\n },\n contextmenu: {\n copy: 'Copy',\n cut: 'Cut',\n paste: 'Paste',\n pasteValue: 'Paste values only',\n pasteFormat: 'Paste format only',\n insertRow: 'Insert row',\n insertColumn: 'Insert column',\n deleteSheet: 'Delete',\n deleteRow: 'Delete row',\n deleteColumn: 'Delete column',\n deleteCell: 'Delete cell',\n deleteCellText: 'Delete cell text',\n validation: 'Data validations',\n cellprintable: 'Enable export',\n cellnonprintable: 'Disable export',\n celleditable: 'Enable editing',\n cellnoneditable: 'Disable editing',\n },\n format: {\n normal: 'Normal',\n text: 'Plain Text',\n number: 'Number',\n percent: 'Percent',\n rmb: 'RMB',\n usd: 'USD',\n eur: 'EUR',\n date: 'Date',\n time: 'Time',\n datetime: 'Date time',\n duration: 'Duration',\n },\n formula: {\n sum: 'Sum',\n average: 'Average',\n max: 'Max',\n min: 'Min',\n _if: 'IF',\n and: 'AND',\n or: 'OR',\n concat: 'Concat',\n },\n validation: {\n required: 'it must be required',\n notMatch: 'it not match its validation rule',\n between: 'it is between {} and {}',\n notBetween: 'it is not between {} and {}',\n notIn: 'it is not in list',\n equal: 'it equal to {}',\n notEqual: 'it not equal to {}',\n lessThan: 'it less than {}',\n lessThanEqual: 'it less than or equal to {}',\n greaterThan: 'it greater than {}',\n greaterThanEqual: 'it greater than or equal to {}',\n },\n error: {\n pasteForMergedCell: 'Unable to do this for merged cells',\n },\n calendar: {\n weeks: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],\n },\n button: {\n next: 'Next',\n cancel: 'Cancel',\n remove: 'Remove',\n save: 'Save',\n ok: 'OK',\n },\n sort: {\n desc: 'Sort Z -> A',\n asc: 'Sort A -> Z',\n },\n filter: {\n empty: 'empty',\n },\n dataValidation: {\n mode: 'Mode',\n range: 'Cell Range',\n criteria: 'Criteria',\n modeType: {\n cell: 'Cell',\n column: 'Colun',\n row: 'Row',\n },\n type: {\n list: 'List',\n number: 'Number',\n date: 'Date',\n phone: 'Phone',\n email: 'Email',\n },\n operator: {\n be: 'between',\n nbe: 'not betwwen',\n lt: 'less than',\n lte: 'less than or equal to',\n gt: 'greater than',\n gte: 'greater than or equal to',\n eq: 'equal to',\n neq: 'not equal to',\n },\n },\n};\n","import { t } from '../locale/locale';\nimport helper from './helper';\n\nconst rules = {\n phone: /^[1-9]\\d{10}$/,\n email: /w+([-+.]w+)*@w+([-.]w+)*.w+([-.]w+)*/,\n};\n\nfunction returnMessage(flag, key, ...arg) {\n let message = '';\n if (!flag) {\n message = t(`validation.${key}`, ...arg);\n }\n return [flag, message];\n}\n\nexport default class Validator {\n // operator: b|nb|eq|neq|lt|lte|gt|gte\n // type: date|number|list|phone|email\n constructor(type, required, value, operator) {\n this.required = required;\n this.value = value;\n this.type = type;\n this.operator = operator;\n this.message = '';\n }\n\n parseValue(v) {\n const { type } = this;\n if (type === 'date') {\n return new Date(v);\n }\n if (type === 'number') {\n return Number(v);\n }\n return v;\n }\n\n equals(other) {\n let flag = this.type === other.type\n && this.required === other.required\n && this.operator === other.operator;\n if (flag) {\n if (Array.isArray(this.value)) {\n flag = helper.arrayEquals(this.value, other.value);\n } else {\n flag = this.value === other.value;\n }\n }\n return flag;\n }\n\n values() {\n return this.value.split(',');\n }\n\n validate(v) {\n const {\n required, operator, value, type,\n } = this;\n if (required && /^\\s*$/.test(v)) {\n return returnMessage(false, 'required');\n }\n if (/^\\s*$/.test(v)) return [true];\n if (rules[type] && !rules[type].test(v)) {\n return returnMessage(false, 'notMatch');\n }\n if (type === 'list') {\n return returnMessage(this.values().includes(v), 'notIn');\n }\n if (operator) {\n const v1 = this.parseValue(v);\n if (operator === 'be') {\n const [min, max] = value;\n return returnMessage(\n v1 >= this.parseValue(min) && v1 <= this.parseValue(max),\n 'between',\n min,\n max,\n );\n }\n if (operator === 'nbe') {\n const [min, max] = value;\n return returnMessage(\n v1 < this.parseValue(min) || v1 > this.parseValue(max),\n 'notBetween',\n min,\n max,\n );\n }\n if (operator === 'eq') {\n return returnMessage(\n v1 === this.parseValue(value),\n 'equal',\n value,\n );\n }\n if (operator === 'neq') {\n return returnMessage(\n v1 !== this.parseValue(value),\n 'notEqual',\n value,\n );\n }\n if (operator === 'lt') {\n return returnMessage(\n v1 < this.parseValue(value),\n 'lessThan',\n value,\n );\n }\n if (operator === 'lte') {\n return returnMessage(\n v1 <= this.parseValue(value),\n 'lessThanEqual',\n value,\n );\n }\n if (operator === 'gt') {\n return returnMessage(\n v1 > this.parseValue(value),\n 'greaterThan',\n value,\n );\n }\n if (operator === 'gte') {\n return returnMessage(\n v1 >= this.parseValue(value),\n 'greaterThanEqual',\n value,\n );\n }\n }\n return [true];\n }\n}\n","import Validator from './validator';\nimport { CellRange } from './cell_range';\n\nclass Validation {\n constructor(mode, refs, validator) {\n this.refs = refs;\n this.mode = mode; // cell\n this.validator = validator;\n }\n\n includes(ri, ci) {\n const { refs } = this;\n for (let i = 0; i < refs.length; i += 1) {\n const cr = CellRange.valueOf(refs[i]);\n if (cr.includes(ri, ci)) return true;\n }\n return false;\n }\n\n addRef(ref) {\n this.remove(CellRange.valueOf(ref));\n this.refs.push(ref);\n }\n\n remove(cellRange) {\n const nrefs = [];\n this.refs.forEach((it) => {\n const cr = CellRange.valueOf(it);\n if (cr.intersects(cellRange)) {\n const crs = cr.difference(cellRange);\n crs.forEach(it1 => nrefs.push(it1.toString()));\n } else {\n nrefs.push(it);\n }\n });\n this.refs = nrefs;\n }\n\n getData() {\n const { refs, mode, validator } = this;\n const {\n type, required, operator, value,\n } = validator;\n return {\n refs, mode, type, required, operator, value,\n };\n }\n\n static valueOf({\n refs, mode, type, required, operator, value,\n }) {\n return new Validation(mode, refs, new Validator(type, required, value, operator));\n }\n}\nclass Validations {\n constructor() {\n this._ = [];\n // ri_ci: errMessage\n this.errors = new Map();\n }\n\n getError(ri, ci) {\n return this.errors.get(`${ri}_${ci}`);\n }\n\n validate(ri, ci, text) {\n const v = this.get(ri, ci);\n const key = `${ri}_${ci}`;\n const { errors } = this;\n if (v !== null) {\n const [flag, message] = v.validator.validate(text);\n if (!flag) {\n errors.set(key, message);\n } else {\n errors.delete(key);\n }\n } else {\n errors.delete(key);\n }\n return true;\n }\n\n // type: date|number|phone|email|list\n // validator: { required, value, operator }\n add(mode, ref, {\n type, required, value, operator,\n }) {\n const validator = new Validator(\n type, required, value, operator,\n );\n const v = this.getByValidator(validator);\n if (v !== null) {\n v.addRef(ref);\n } else {\n this._.push(new Validation(mode, [ref], validator));\n }\n }\n\n getByValidator(validator) {\n for (let i = 0; i < this._.length; i += 1) {\n const v = this._[i];\n if (v.validator.equals(validator)) {\n return v;\n }\n }\n return null;\n }\n\n get(ri, ci) {\n for (let i = 0; i < this._.length; i += 1) {\n const v = this._[i];\n if (v.includes(ri, ci)) return v;\n }\n return null;\n }\n\n remove(cellRange) {\n this.each((it) => {\n it.remove(cellRange);\n });\n }\n\n each(cb) {\n this._.forEach(it => cb(it));\n }\n\n getData() {\n return this._.filter(it => it.refs.length > 0).map(it => it.getData());\n }\n\n setData(d) {\n this._ = d.map(it => Validation.valueOf(it));\n }\n}\n\nexport default {};\nexport {\n Validations,\n};\n","/* global document */\n\nimport Selector from './selector';\nimport Scroll from './scroll';\nimport History from './history';\nimport Clipboard from './clipboard';\nimport AutoFilter from './auto_filter';\nimport { Merges } from './merge';\nimport helper from './helper';\nimport { Rows } from './row';\nimport { Cols } from './col';\nimport { Validations } from './validation';\nimport { CellRange } from './cell_range';\nimport { expr2xy, xy2expr } from './alphabet';\nimport { t } from '../locale/locale';\n\n// private methods\n/*\n * {\n * name: ''\n * freeze: [0, 0],\n * formats: [],\n * styles: [\n * {\n * bgcolor: '',\n * align: '',\n * valign: '',\n * textwrap: false,\n * strike: false,\n * underline: false,\n * color: '',\n * format: 1,\n * border: {\n * left: [style, color],\n * right: [style, color],\n * top: [style, color],\n * bottom: [style, color],\n * },\n * font: {\n * name: 'Helvetica',\n * size: 10,\n * bold: false,\n * italic: false,\n * }\n * }\n * ],\n * merges: [\n * 'A1:F11',\n * ...\n * ],\n * rows: {\n * 1: {\n * height: 50,\n * style: 1,\n * cells: {\n * 1: {\n * style: 2,\n * type: 'string',\n * text: '',\n * value: '', // cal result\n * }\n * }\n * },\n * ...\n * },\n * cols: {\n * 2: { width: 100, style: 1 }\n * }\n * }\n */\nconst defaultSettings = {\n view: {\n height: () => document.documentElement.clientHeight,\n width: () => document.documentElement.clientWidth,\n },\n showGrid: true,\n showToolbar: true,\n showContextmenu: true,\n row: {\n len: 100,\n height: 25,\n },\n col: {\n len: 26,\n width: 100,\n indexWidth: 60,\n minWidth: 60,\n },\n style: {\n bgcolor: '#ffffff',\n align: 'left',\n valign: 'middle',\n textwrap: false,\n strike: false,\n underline: false,\n color: '#0a0a0a',\n font: {\n name: 'Arial',\n size: 10,\n bold: false,\n italic: false,\n },\n },\n};\n\nconst toolbarHeight = 41;\nconst bottombarHeight = 41;\n\n\n// src: cellRange\n// dst: cellRange\nfunction canPaste(src, dst, error = () => {}) {\n const { merges } = this;\n const cellRange = dst.clone();\n const [srn, scn] = src.size();\n const [drn, dcn] = dst.size();\n if (srn > drn) {\n cellRange.eri = dst.sri + srn - 1;\n }\n if (scn > dcn) {\n cellRange.eci = dst.sci + scn - 1;\n }\n if (merges.intersects(cellRange)) {\n error(t('error.pasteForMergedCell'));\n return false;\n }\n return true;\n}\nfunction copyPaste(srcCellRange, dstCellRange, what, autofill = false) {\n const { rows, merges } = this;\n // delete dest merge\n if (what === 'all' || what === 'format') {\n rows.deleteCells(dstCellRange, what);\n merges.deleteWithin(dstCellRange);\n }\n rows.copyPaste(srcCellRange, dstCellRange, what, autofill, (ri, ci, cell) => {\n if (cell && cell.merge) {\n // console.log('cell:', ri, ci, cell);\n const [rn, cn] = cell.merge;\n if (rn <= 0 && cn <= 0) return;\n merges.add(new CellRange(ri, ci, ri + rn, ci + cn));\n }\n });\n}\n\nfunction cutPaste(srcCellRange, dstCellRange) {\n const { clipboard, rows, merges } = this;\n rows.cutPaste(srcCellRange, dstCellRange);\n merges.move(srcCellRange,\n dstCellRange.sri - srcCellRange.sri,\n dstCellRange.sci - srcCellRange.sci);\n clipboard.clear();\n}\n\n// bss: { top, bottom, left, right }\nfunction setStyleBorder(ri, ci, bss) {\n const { styles, rows } = this;\n const cell = rows.getCellOrNew(ri, ci);\n let cstyle = {};\n if (cell.style !== undefined) {\n cstyle = helper.cloneDeep(styles[cell.style]);\n }\n Object.assign(cstyle, { border: bss });\n cell.style = this.addStyle(cstyle);\n}\n\nfunction setStyleBorders({ mode, style, color }) {\n const { styles, selector, rows } = this;\n const {\n sri, sci, eri, eci,\n } = selector.range;\n const multiple = !this.isSignleSelected();\n if (!multiple) {\n if (mode === 'inside' || mode === 'horizontal' || mode === 'vertical') {\n return;\n }\n }\n if (mode === 'outside' && !multiple) {\n setStyleBorder.call(this, sri, sci, {\n top: [style, color], bottom: [style, color], left: [style, color], right: [style, color],\n });\n } else if (mode === 'none') {\n selector.range.each((ri, ci) => {\n const cell = rows.getCell(ri, ci);\n if (cell && cell.style !== undefined) {\n const ns = helper.cloneDeep(styles[cell.style]);\n delete ns.border;\n // ['bottom', 'top', 'left', 'right'].forEach((prop) => {\n // if (ns[prop]) delete ns[prop];\n // });\n cell.style = this.addStyle(ns);\n }\n });\n } else if (mode === 'all' || mode === 'inside' || mode === 'outside'\n || mode === 'horizontal' || mode === 'vertical') {\n const merges = [];\n for (let ri = sri; ri <= eri; ri += 1) {\n for (let ci = sci; ci <= eci; ci += 1) {\n // jump merges -- start\n const mergeIndexes = [];\n for (let ii = 0; ii < merges.length; ii += 1) {\n const [mri, mci, rn, cn] = merges[ii];\n if (ri === mri + rn + 1) mergeIndexes.push(ii);\n if (mri <= ri && ri <= mri + rn) {\n if (ci === mci) {\n ci += cn + 1;\n break;\n }\n }\n }\n mergeIndexes.forEach(it => merges.splice(it, 1));\n if (ci > eci) break;\n // jump merges -- end\n const cell = rows.getCell(ri, ci);\n let [rn, cn] = [0, 0];\n if (cell && cell.merge) {\n [rn, cn] = cell.merge;\n merges.push([ri, ci, rn, cn]);\n }\n const mrl = rn > 0 && ri + rn === eri;\n const mcl = cn > 0 && ci + cn === eci;\n let bss = {};\n if (mode === 'all') {\n bss = {\n bottom: [style, color],\n top: [style, color],\n left: [style, color],\n right: [style, color],\n };\n } else if (mode === 'inside') {\n if (!mcl && ci < eci) bss.right = [style, color];\n if (!mrl && ri < eri) bss.bottom = [style, color];\n } else if (mode === 'horizontal') {\n if (!mrl && ri < eri) bss.bottom = [style, color];\n } else if (mode === 'vertical') {\n if (!mcl && ci < eci) bss.right = [style, color];\n } else if (mode === 'outside' && multiple) {\n if (sri === ri) bss.top = [style, color];\n if (mrl || eri === ri) bss.bottom = [style, color];\n if (sci === ci) bss.left = [style, color];\n if (mcl || eci === ci) bss.right = [style, color];\n }\n if (Object.keys(bss).length > 0) {\n setStyleBorder.call(this, ri, ci, bss);\n }\n ci += cn;\n }\n }\n } else if (mode === 'top' || mode === 'bottom') {\n for (let ci = sci; ci <= eci; ci += 1) {\n if (mode === 'top') {\n setStyleBorder.call(this, sri, ci, { top: [style, color] });\n ci += rows.getCellMerge(sri, ci)[1];\n }\n if (mode === 'bottom') {\n setStyleBorder.call(this, eri, ci, { bottom: [style, color] });\n ci += rows.getCellMerge(eri, ci)[1];\n }\n }\n } else if (mode === 'left' || mode === 'right') {\n for (let ri = sri; ri <= eri; ri += 1) {\n if (mode === 'left') {\n setStyleBorder.call(this, ri, sci, { left: [style, color] });\n ri += rows.getCellMerge(ri, sci)[0];\n }\n if (mode === 'right') {\n setStyleBorder.call(this, ri, eci, { right: [style, color] });\n ri += rows.getCellMerge(ri, eci)[0];\n }\n }\n }\n}\n\nfunction getCellRowByY(y, scrollOffsety) {\n const { rows } = this;\n const fsh = this.freezeTotalHeight();\n // console.log('y:', y, ', fsh:', fsh);\n let inits = rows.height;\n if (fsh + rows.height < y) inits -= scrollOffsety;\n\n // handle ri in autofilter\n const frset = this.exceptRowSet;\n\n let ri = 0;\n let top = inits;\n let { height } = rows;\n for (; ri < rows.len; ri += 1) {\n if (top > y) break;\n if (!frset.has(ri)) {\n height = rows.getHeight(ri);\n top += height;\n }\n }\n top -= height;\n // console.log('ri:', ri, ', top:', top, ', height:', height);\n\n if (top <= 0) {\n return { ri: -1, top: 0, height };\n }\n\n return { ri: ri - 1, top, height };\n}\n\nfunction getCellColByX(x, scrollOffsetx) {\n const { cols } = this;\n const fsw = this.freezeTotalWidth();\n let inits = cols.indexWidth;\n if (fsw + cols.indexWidth < x) inits -= scrollOffsetx;\n const [ci, left, width] = helper.rangeReduceIf(\n 0,\n cols.len,\n inits,\n cols.indexWidth,\n x,\n i => cols.getWidth(i),\n );\n if (left <= 0) {\n return { ci: -1, left: 0, width: cols.indexWidth };\n }\n return { ci: ci - 1, left, width };\n}\n\nexport default class DataProxy {\n constructor(name, settings) {\n this.settings = helper.merge(defaultSettings, settings || {});\n // save data begin\n this.name = name || 'sheet';\n this.freeze = [0, 0];\n this.styles = []; // Array