UNPKG

virtualized-table

Version:
1 lines 44.9 kB
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("react"));else if("function"==typeof define&&define.amd)define(["react"],t);else{var n,r="object"==typeof exports?t(require("react")):t(e.React);for(n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(window,function(n){return i={},o.m=r=[function(e,t){e.exports=n},function(e,t,n){e.exports=n(7)()},function(e,t,n){"use strict";e.exports=function(n){var a=[];return a.toString=function(){return this.map(function(e){var t=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){e=function(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}(r),t=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(t).concat([e]).join("\n")}return[n].join("\n")}(e,n);return e[2]?"@media "+e[2]+"{"+t+"}":t}).join("")},a.i=function(e,t){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},r=0;r<this.length;r++){var o=this[r][0];null!=o&&(n[o]=!0)}for(r=0;r<e.length;r++){var i=e[r];null!=i[0]&&n[i[0]]||(t&&!i[2]?i[2]=t:t&&(i[2]="("+i[2]+") and ("+t+")"),a.push(i))}},a}},function(e,t,n){var r,o,i,c={},u=(r=function(){return window&&document&&document.all&&!window.atob},function(){return o=void 0===o?r.apply(this,arguments):o}),a=(i={},function(e){if(void 0===i[e]){var t=function(e){return document.querySelector(e)}.call(this,e);if(t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}i[e]=t}return i[e]}),l=null,s=0,d=[],f=n(6);function p(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=c[r.id];if(o){o.refs++;for(var i=0;i<o.parts.length;i++)o.parts[i](r.parts[i]);for(;i<r.parts.length;i++)o.parts.push(y(r.parts[i],t))}else{for(var a=[],i=0;i<r.parts.length;i++)a.push(y(r.parts[i],t));c[r.id]={id:r.id,refs:1,parts:a}}}}function v(e,t){for(var n=[],r={},o=0;o<e.length;o++){var i=e[o],a=t.base?i[0]+t.base:i[0],i={css:i[1],media:i[2],sourceMap:i[3]};r[a]?r[a].parts.push(i):n.push(r[a]={id:a,parts:[i]})}return n}function b(e,t){var n=a(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=d[d.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),d.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");e=a(e.insertInto+" "+e.insertAt.before);n.insertBefore(t,e)}}function m(e){null!==e.parentNode&&(e.parentNode.removeChild(e),0<=(e=d.indexOf(e))&&d.splice(e,1))}function h(e){var t=document.createElement("style");return e.attrs.type="text/css",g(t,e.attrs),b(e,t),t}function g(t,n){Object.keys(n).forEach(function(e){t.setAttribute(e,n[e])})}function y(t,e){var n,r,o,i,a;if(e.transform&&t.css){if(!(i=e.transform(t.css)))return function(){};t.css=i}return o=e.singleton?(a=s++,n=l=l||h(e),r=O.bind(null,n,a,!1),O.bind(null,n,a,!0)):t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(i=e,a=document.createElement("link"),i.attrs.type="text/css",i.attrs.rel="stylesheet",g(a,i.attrs),b(i,a),n=a,r=function(e,t,n){var r=n.css,o=n.sourceMap,n=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||n)&&(r=f(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");o=new Blob([r],{type:"text/css"}),r=e.href;e.href=URL.createObjectURL(o),r&&URL.revokeObjectURL(r)}.bind(null,n,e),function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=h(e),r=function(e,t){var n=t.css,t=t.media;t&&e.setAttribute("media",t);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),function(){m(n)}),r(t),function(e){e?e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap||r(t=e):o()}}e.exports=function(e,a){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(a=a||{}).attrs="object"==typeof a.attrs?a.attrs:{},a.singleton||"boolean"==typeof a.singleton||(a.singleton=u()),a.insertInto||(a.insertInto="head"),a.insertAt||(a.insertAt="bottom");var l=v(e,a);return p(l,a),function(e){for(var t=[],n=0;n<l.length;n++){var r=l[n];(o=c[r.id]).refs--,t.push(o)}e&&p(v(e,a),a);for(var o,n=0;n<t.length;n++)if(0===(o=t[n]).refs){for(var i=0;i<o.parts.length;i++)o.parts[i]();delete c[o.id]}}};var w,x=(w=[],function(e,t){return w[e]=t,w.filter(Boolean).join("\n")});function O(e,t,n,r){var n=n?"":r.css;e.styleSheet?e.styleSheet.cssText=x(t,n):(r=document.createTextNode(n),(n=e.childNodes)[t]&&e.removeChild(n[t]),n.length?e.insertBefore(r,n[t]):e.appendChild(r))}},function(e,t,n){var r=n(5);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0};n(3)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(2)(!1)).push([e.i,'.vt-grid-container {\n flex-grow: 1;\n position: relative;\n overflow: auto;\n display: flex;\n flex-wrap: wrap;\n font-size: 14px;\n color: #333333;\n}\n.vt-grid-container .vt-grid-row {\n position: relative;\n display: flex;\n contain: layout paint;\n}\n.vt-grid-container .vt-grid-row:hover .vt-grid-cell {\n background: #ebf5ff;\n}\n.vt-grid-container .vt-grid-row.vt-grid-row-selected .vt-grid-cell {\n background: #ebf5ff;\n}\n.vt-grid-container .vt-grid-row .vt-grid-cell {\n display: flex;\n align-items: center;\n background: #fff;\n}\n.vt-grid-container .vt-grid-row .vt-grid-cell.vt-align-left {\n justify-content: flex-start;\n}\n.vt-grid-container .vt-grid-row .vt-grid-cell.vt-align-right {\n justify-content: flex-end;\n}\n.vt-grid-container .vt-grid-row .vt-grid-cell.vt-align-center {\n justify-content: center;\n}\n.vt-grid-container .vt-grid-row .vt-grid-cell.vt-default-bordered {\n box-sizing: border-box;\n border-bottom: 1px solid #d1d3d8;\n}\n.vt-grid-container .vt-grid-row .vt-grid-cell.vt-default-bordered.vt-bordered-right {\n border-right: 1px solid #d1d3d8;\n}\n.vt-grid-container .vt-grid-row .vt-grid-cell.vt-default-bordered.vt-has-last-child-border-right:last-child {\n border-right: 1px solid #d1d3d8;\n}\n.vt-grid-container .vt-grid-row .vt-grid-cell.vt-default-bordered.vt-no-last-child-border-right:last-child {\n border-right: none;\n}\n.vt-grid-container .vt-grid-row .vt-grid-cell.vt-cell-fix-left-last {\n border-right: none !important;\n}\n.vt-grid-container .vt-grid-row .vt-grid-cell.vt-cell-fix-left-last:after,\n.vt-grid-container .vt-grid-row .vt-grid-cell.vt-cell-fix-right-first:after {\n position: absolute;\n top: 0;\n bottom: -1px;\n width: 30px;\n transition: box-shadow 0.3s, -webkit-box-shadow 0.3s;\n content: "";\n pointer-events: none;\n}\n.vt-grid-container .vt-grid-row .vt-grid-cell.vt-cell-fix-left-last:after {\n right: 0;\n box-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, 0.15);\n transform: translateX(100%);\n}\n.vt-grid-container .vt-grid-row .vt-grid-cell.vt-cell-fix-right-first:after {\n left: 0;\n box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, 0.15);\n transform: translateX(-100%);\n}\n.vt-grid-container .vt-grid-row .vt-grid-cell .vt-ellipsis {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n',""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var t=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(t)?e:(t=0===t.indexOf("//")?t:0===t.indexOf("/")?n+t:r+t.replace(/^\.\//,""),"url("+JSON.stringify(t)+")")})}},function(e,t,n){"use strict";var a=n(8);function r(){}function o(){}o.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,o,i){if(i!==a){i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}var n={array:e.isRequired=e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:r};return n.PropTypes=n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){var r=n(10);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0};n(3)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(2)(!1)).push([e.i,".vt-multi-grid-container {\n display: flex;\n}\n.vt-multi-grid-container .vt-multi-grid-fixed-left,\n.vt-multi-grid-container .vt-multi-grid-fixed-right {\n position: absolute;\n overflow: hidden;\n}\n.vt-multi-grid-container.vt-table-body .vt-multi-grid-fixed-left .vt-grid-container,\n.vt-multi-grid-container.vt-table-body .vt-multi-grid-fixed-right .vt-grid-container {\n overflow-y: hidden;\n overflow-x: scroll;\n}\n.vt-multi-grid-container .vt-multi-grid-fixed-left {\n left: 0;\n box-shadow: 6px 0 6px -4px rgba(0, 0, 0, 0.15);\n}\n.vt-multi-grid-container .vt-multi-grid-fixed-right {\n right: 0;\n box-shadow: -6px 0 6px -4px rgba(0, 0, 0, 0.15);\n}\n",""])},function(e,t,n){var r=n(12);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0};n(3)(r,o);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(2)(!1)).push([e.i,'.vt-table {\n /* vvv todo 待优化 支持table有border*/\n /* ^^^ */\n position: relative;\n}\n.vt-table .vt-table-header .vt-grid-container::-webkit-scrollbar {\n display: none;\n}\n.vt-table .vt-table-header.vt-header-sticky {\n z-index: 3;\n position: sticky;\n top: 0;\n}\n.vt-table .vt-table-header .vt-grid-row {\n contain: none;\n}\n.vt-table .vt-table-header .vt-grid-row:hover .vt-grid-cell {\n background: #e9ebf0;\n}\n.vt-table .vt-table-header .vt-grid-row .vt-grid-cell {\n background: #e9ebf0 !important;\n font-weight: 700;\n}\n.vt-table .vt-table-footer {\n margin-top: -1px;\n}\n.vt-table .vt-table-footer .vt-grid-container::-webkit-scrollbar {\n display: none;\n}\n.vt-table .vt-table-footer.vt-footer-sticky {\n z-index: 3;\n position: sticky;\n bottom: 0;\n}\n.vt-table .vt-table-footer .vt-grid-row:hover .vt-grid-cell {\n background: #fffae6;\n}\n.vt-table .vt-table-footer .vt-grid-row .vt-grid-cell {\n background: #fffae6;\n border-bottom: none;\n border-top: 1px solid #d1d3d8;\n}\n.vt-table .vt-selection {\n position: relative;\n cursor: pointer;\n width: 16px;\n height: 16px;\n}\n.vt-table .vt-selection input {\n display: none;\n}\n.vt-table .vt-selection input:checked + .vt-show-box:before {\n border: solid #ff8040;\n border-width: 0 2px 2px 0;\n}\n.vt-table .vt-selection .vt-show-box {\n box-sizing: border-box;\n position: absolute;\n top: 0;\n left: 0;\n width: 16px;\n height: 16px;\n border-radius: 2px;\n border: 1px solid #d1d3d8;\n background: #fff;\n}\n.vt-table .vt-selection .vt-show-box:hover {\n border-color: #ff8040;\n}\n.vt-table .vt-selection .vt-show-box:before {\n content: \'\';\n position: absolute;\n top: 1px;\n left: 4px;\n width: 5px;\n height: 8px;\n border: solid #fff;\n border-width: 0 2px 2px 0;\n transform: rotate(45deg);\n}\n.vt-table .vt-selection-disabled {\n cursor: not-allowed;\n}\n.vt-table .vt-selection-disabled .vt-show-box {\n background: #eee;\n}\n.vt-table .vt-selection-disabled .vt-show-box:hover {\n border-color: #d1d3d8;\n}\n.vt-table .vt-selection-disabled .vt-show-box:before {\n border: solid transparent;\n}\n.vt-table .vt-grid-row.vt-grid-row-hover .vt-grid-cell {\n background: #ebf5ff;\n}\n.vt-table .vt-grid-row.vt-grid-row-hover .vt-row-remove {\n position: absolute;\n top: -20px;\n left: -20px;\n border: 20px solid;\n border-color: red transparent transparent transparent;\n transform: rotate(135deg);\n cursor: pointer;\n}\n.vt-table .vt-grid-row.vt-grid-row-hover .vt-row-remove:after {\n content: "x";\n position: absolute;\n top: -20px;\n left: -2px;\n color: #fff;\n transform: rotate(45deg);\n}\n.vt-table .vt-grid-row:hover .vt-row-remove {\n position: absolute;\n top: -20px;\n left: -20px;\n border: 20px solid;\n border-color: red transparent transparent transparent;\n transform: rotate(135deg);\n cursor: pointer;\n}\n.vt-table .vt-grid-row:hover .vt-row-remove:after {\n content: "x";\n position: absolute;\n top: -20px;\n left: -2px;\n color: #fff;\n transform: rotate(45deg);\n}\n.vt-table .vt-table-loading {\n z-index: 20;\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n opacity: 0.8;\n background: #fff;\n}\n.vt-table .vt-table-empty {\n z-index: 20;\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n}\n',""])},function(e,t,n){"use strict";n.r(t);function D(e){return e&&q(e,"Object")&&!V.a.isValidElement(e)}var W=n(0),V=n.n(W),r=n(1),r=n.n(r),z=V.a.createContext({onScroll:function(){},isSticky:!0,headerTitle:[]}),K={left:"vt-align-left",right:"vt-align-right",center:"vt-align-center"},q=function(e,t){return"String"===t?"[object String]"===Object.prototype.toString.call(e):"Number"===t?"[object Number]"===Object.prototype.toString.call(e):"BigInt"===t?"[object BigInt]"===Object.prototype.toString.call(e):"Symbol"===t?"[object Symbol]"===Object.prototype.toString.call(e):"Null"===t?"[object Null]"===Object.prototype.toString.call(e):"Undefined"===t?"[object Undefined]"===Object.prototype.toString.call(e):"Function"===t?"[object Function]"===Object.prototype.toString.call(e):"Object"===t?"[object Object]"===Object.prototype.toString.call(e):"Array"===t?"[object Array]"===Object.prototype.toString.call(e):"Boolean"===t?"[object Boolean]"===Object.prototype.toString.call(e):void 0};function G(){var e,n=arguments,r="";for(e in arguments)!function(t){q(n[t],"String")&&(r+=" ".concat(n[t])),q(n[t],"Object")&&Object.keys(n[t]).forEach(function(e){r+=n[t][e]?" ".concat(e):""})}(e);return r.trim()}function $(e,t,n){for(var r=[],o=e,i=0;i<o.length;i++)n===o[i].getAttribute(t)&&r.push(o[i]);return r}function i(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function a(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?i(Object(o),!0).forEach(function(e){var t,n;t=r,e=o[n=e],n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}function l(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var J=function(e){return function t(n,r){if("object"!==c(n)||null===n)return n;if(r.get(n))return r.get(n);var o;q(n,"Array")?o=l(n):q(n,"Object")&&(o=a({},n));r.set(n,o);Reflect.ownKeys(n).forEach(function(e){"object"===c(n[e])&&null!==n[e]&&(o[e]=t(n[e],r))});return o}(e,new WeakMap)};function _(e){function c(e){return(e=n[e]||{}).key||e.dataIndex}var t=e.columns,n=e.flatColumns,u=e.headerLevel,s=void 0===(e=e.childrenField)?"children":e,d=[],f=[];return function a(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,l=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;e.reduce(function(e,t){d[l]||(d[l]={}),d[l][c(e)]=t.title;var n=e,r=t[s];if(r){a(r,e,l+1),n+=Q({columns:r,childrenField:s}).columns.length,f.push({s:{c:e,r:l},e:{c:n-1,r:l}});for(var o=e+1;o<n;o++)d[l][c(o)]=t.title}else if(n+=1,0<u-1-l){f.push({s:{c:e,r:l},e:{c:e,r:u-1}});for(var i=l+1;i<u;i++)d[i]||(d[i]={}),d[i][c(e)]=t.title}return n},t)}(t),{data:d,merges:f}}function X(e,t,n){return e?q(e,"Function")?e(t):t[e]:n}var Y=function(){var t=0;return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]).forEach(function(e){t+=e.width}),t},Q=function(e){var t=e.columns,e=e.childrenField,o=void 0===e?"children":e,i=[],a=[];return function n(e){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;a[r]=!0,r+=1,e.forEach(function(e){var t=e[o];t&&0<t.length?n(t,r):(e.width=e.width||150,i.push(e))})}(t),{level:a.length,columns:i}};n(4);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Z="object"===("undefined"==typeof performance?"undefined":u(performance))&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function ee(){return(ee=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function s(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function te(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?s(Object(o),!0).forEach(function(e){var t,n;t=r,e=o[n=e],n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}function ne(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||d(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function re(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||d(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){if(e){if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function p(f,e){var a=Object(W.useRef)(null);function l(t){O(function(e){return te(te({},e),t)})}Object(W.useImperativeHandle)(e,function(){return{gridContainer:a.current}});var t=Object(W.useRef)(null),i=Object(W.useRef)(null),c=Object(W.useRef)({gridScrollTop:0,gridScrollLeft:0}),p=Object(W.useContext)(z),C=p.isSticky,n=f.visibleHeight||400,r=f.estimatedRowHeight||40,o=Math.ceil(n/r),u=a.current&&a.current.clientWidth,s=f.visibleWidth||u||1200,e=f.estimatedColumnWidth||150,u=Math.ceil(s/e),R={fixedRowHeight:f.fixedRowHeight,columns:f.columns||[],dataSource:f.dataSource||[],visibleHeight:n,estimatedRowHeight:r,minRowHeight:f.minRowHeight||40,rowVisibleCount:f.rowVisibleCount||o,rowOffsetCount:f.rowOffsetCount||10,visibleWidth:s,estimatedColumnWidth:e,columnVisibleCount:f.columnVisibleCount||u,columnOffsetCount:f.columnOffsetCount||4,fixedLeftColumns:f.fixedLeftColumns||[],fixedRightColumns:f.fixedRightColumns||[]},d=void 0===(s=f.type)?"body":s,v=f.mgType,e=f.className,u=f.gridStyle,b=f.shouldRowHeightSync,m=f.rowKey,h=void 0===(s=f.rowSelection)?{}:s,g=void 0===(s=f.components)?{}:s,y=f.onRow,k=f.headerBordered,E=f.bordered,w=f.onScrollTopSync,x=f.onCellTap,T=(s=re(Object(W.useState)({virtualColumns:[],virtualData:[],startRowIndex:0,endRowIndex:0,startColumnIndex:0,endColumnIndex:0,startVerticalOffset:0,endVerticalOffset:0,startHorizontalOffset:0,endHorizontalOffset:0}),2))[0],O=s[1],S=Object(W.useMemo)(function(){return[].concat(ne(R.fixedLeftColumns),ne(T.virtualColumns),ne(R.fixedRightColumns))},[R.fixedLeftColumns,T.virtualColumns,R.fixedRightColumns]),j=Object(W.useMemo)(function(){var e=S;return 0<S.length&&"checkBox"===S[0].type&&((e=J(S))[0].render=null),e},[S]),I=Object(W.useMemo)(function(){return{header:{row:g.header&&g.header.row||"div",cell:g.header&&g.header.cell||"div"},body:{row:g.body&&g.body.row||"div",cell:g.body&&g.body.cell||"div"},footer:{row:g.footer&&g.footer.row||"div",cell:g.footer&&g.footer.cell||"div"}}},[g]);function A(t,n,r,o,e){var i=e.type,a=n+T.startRowIndex,l=r.fixed?r.realFcIndex:o+T.startColumnIndex,c=t[r.key||r.dataIndex],u=M(c,t,n,a,r,o,l,{type:i}),s=u.childNode,d=(g=u.cellProps).colSpan,f=g.rowSpan,p=(y=N({row:t,rowIndex:n,realRowIndex:a,column:r,columnIndex:o,realColumnIndex:l,colSpan:d,rowSpan:f,type:i})).width,v=y.height,b=y.display,m=y.visibility,h=(w=(O={type:i,isSticky:C,headerBordered:k,bordered:E}).type,x=O.isSticky,j=O.headerBordered,O=O.bordered,x=x?"vt-has-last-child-border-right":"vt-no-last-child-border-right","vt-default-bordered ".concat("header"===w&&j||O?"vt-bordered-right":""," ").concat(x)),g=(e=(S={type:i,column:r}).type,u=S.column,S=K[u.headerAlign]||K.center,u=K[u.align]||K.left,"header"===e?S:u),y=R.fixedLeftColumns,w=R.fixedRightColumns,x=(w=(y=(w={cellInfo:O=(O=(j={column:r,fixedLeftColumns:y,fixedRightColumns:w}).column,x=j.fixedLeftColumns,e=void 0===x?[]:x,S=j.fixedRightColumns,u=void 0===S?[]:S,x=y=void 0,S=j=w=!1,"left"===O.fixed&&0<e.length?(w=!0,y=Y(e.slice(0,O.fcIndex)),j=O.lastFixLeft):"right"===O.fixed&&0<u.length&&(w=!0,x=Y(u.slice(O.fcIndex+1)),S=O.firstFixRight),{isSticky:w,fixLeft:y,fixRight:x,lastFixLeft:j,firstFixRight:S})}).cellInfo).lastFixLeft,y=y.firstFixRight?"vt-cell-fix-right-first":"","".concat(w?"vt-cell-fix-left-last":""," ").concat(y)),w={zIndex:(j=(S=(j={cellInfo:O}).cellInfo).isSticky)?2:void 0,position:j?"sticky":void 0,left:S.fixLeft,right:S.fixRight},O=void 0===(y=r.className)?"":y,S=void 0===(j=r.ellipsisTitle)||j,y=I[i].cell,j="function"==typeof r.onCell?r.onCell(r,a):{},j={header:q(r.onHeaderCell,"Function")?r.onHeaderCell(r,a):void 0,body:q(r.onBodyCell,"Function")?r.onBodyCell(r,a):void 0,footer:q(r.onFooterCell,"Function")?r.onFooterCell(r,a):void 0}[i]||j,i="cell_".concat("body"===i?a:i,"_").concat(l);return V.a.createElement(y,ee({},j,{key:i,"data-key":i,className:"vt-grid-cell ".concat(x," ").concat(h," ").concat(g," ").concat(O),onClick:function(e){return F(e,c,t,n,a,r,o,l)},colSpan:d,rowSpan:f,style:te(te({width:p,minWidth:p,minHeight:R.minRowHeight,height:R.fixedRowHeight?v:void 0,display:b,visibility:m},r.style),w)}),r.ellipsis?V.a.createElement("div",{className:"vt-ellipsis",title:S?c:void 0},s):s)}Object(W.useEffect)(function(){L(!0),"body"===d&&"mainMultiGrid"===v&&setTimeout(function(){p.getBodyScrollBar({ref:a})},0)},[R.dataSource,R.columns]);var L=function(e){P(e),H(e)},P=function(e){var t,n,r=a.current.scrollTop,o=c.current.gridScrollTop,i=40<Math.abs(r-o);(e||i)&&(c.current.gridScrollTop=r,t=R.dataSource,n=R.estimatedRowHeight,o=R.rowOffsetCount,e=R.rowVisibleCount,r=(i={scrollTop:r,dataSource:t,estimatedRowHeight:n,rowOffsetCount:o,rowVisibleCount:e}).scrollTop,t=i.dataSource,n=i.estimatedRowHeight,o=i.rowOffsetCount,e=i.rowVisibleCount,i=t.length,e+=2*o,r=0<(r=Math.floor(r/n))-o?r-o:0,e=i<(r=(o=0<(o=i-e)?o:0)<r?o:r)+e?i:r+e,e={startRowIndex:r,endRowIndex:e,startVerticalOffset:r*n,endVerticalOffset:(i-e)*n,virtualData:t.slice(r,e)},l(e))},H=function(e){var t,n,r=a.current.scrollLeft,o=c.current.gridScrollLeft,i=80<Math.abs(r-o);(e||i)&&(c.current.gridScrollLeft=r,t=R.dataSource,n=R.columns,o=R.estimatedColumnWidth,e=R.columnOffsetCount,i=R.columnVisibleCount,t=(r={scrollLeft:r,dataSource:t,columns:n,estimatedColumnWidth:o,columnOffsetCount:e,columnVisibleCount:i}).scrollLeft,n=r.dataSource,o=r.columns,e=r.estimatedColumnWidth,i=r.columnOffsetCount,r=r.columnVisibleCount+2*i,t=Math.floor(t/e),e=0<t-i?t-i:0,t=o.length-r,i=(e=(t=0<t?t:0)<e?t:e)+r>o.length?o.length:e+r,t=o.slice(0,e),r=0<n.length?Y(t):0,t=o.slice(i,o.length),i={startColumnIndex:e,endColumnIndex:i,startHorizontalOffset:r,endHorizontalOffset:0<n.length?Y(t):0,virtualColumns:o.slice(e,i)},l(i))},N=function(e){var r=e.row,o=e.rowIndex,i=e.realRowIndex,t=e.column,n=e.columnIndex,a=e.realColumnIndex,l=e.colSpan,c=e.rowSpan,u=e.type,l=0===l?0:Number(l||1),c=0===c?0:Number(c||1),s=R.columns,d=R.estimatedColumnWidth,e=c*R.minRowHeight,t=t.width||d,d=s.slice(a,a+l);1<d.length&&(t=Y(d));var f,s=0===l?"none":"flex",a=T.virtualColumns[0]||{},d="header"===u?a._headerCellProps:a.render;return d&&(l=r[a.key||a.dataIndex],f=T.startColumnIndex,a=d(l,r,o,i,a,0,f),D(a)&&0===("header"===u?a:a.props||{}).colSpan&&(n=(a=T.virtualColumns.slice(0,n+1)).filter(function(e,t){var n="header"===u?e._headerCellProps:e.render;if(n){t=n(r[e.key||e.dataIndex],r,o,i,e,t,t+f);if(D(t))return 0===("header"===u?t:t.props||{}).colSpan}}),a.length===n.length&&(s="flex"))),{width:t,height:e,display:s,visibility:c<1?"hidden":void 0}},M=function(e,t,n,r,o,i,a,l){var c={},u=e;return"header"===l.type?(o.headRender&&(u=q(o.headRender,"Function")?o.headRender(e,t,n,r,o,i,a):e),q(o.title,"Function")&&(u=o.title(e,t,n)),q(o._headerCellProps,"Function")&&(c=o._headerCellProps(e,t,n))):o.render&&(a=o.render(e,t,n,r,o,i,a),D(a)?(u=a.children,c=a.props||{}):u=a),{childNode:u=q(u,"Object")&&!V.a.isValidElement(u)?null:u,cellProps:c}},F=function(e,t,n,r,o,i,a,l){e.preventDefault(),"function"==typeof x&&x(t,n,r,o,i,a,l)};function B(n,r,e){var t,o=e.type,i=e.displayedFooterColumns,a=r+T.startRowIndex,l=void 0===(t=h.selectedRowKeys)?[]:t,c=X(m,n,a),e=l.includes(c),u=R.fixedRowHeight?R.minRowHeight:(u=(t={type:o,rowIndex:r}).type,l=t.rowIndex,s=void 0,b&&!p.isSticky&&"body"===u&&"mainMultiGrid"!==v&&(s=(void 0===(t=f.rowsHeightArr)?[]:t)[l]),s="footer"===u?R.minRowHeight:s),s=I[o].row,d="function"==typeof y?y(n,a):{};return V.a.createElement(s,ee({},d,{onMouseEnter:function(e){!function(e){var t=e.type,e=e.rowKey;if("body"===t&&!C)try{$(document.querySelectorAll("div.vt-grid-row"),"data-key","row_".concat(e)).forEach(function(e){var t=e.getAttribute("class")+" vt-grid-row-hover";e.setAttribute("class",t)})}catch(e){console.warn(e)}}({type:o,rowKey:c}),d.onMouseEnter&&d.onMouseEnter(e)},onMouseLeave:function(e){!function(e){var t=e.type,e=e.rowKey;if("body"===t&&!C)try{$(document.querySelectorAll("div.vt-grid-row"),"data-key","row_".concat(e)).forEach(function(e){var t=e.getAttribute("class").replace(" vt-grid-row-hover","");e.setAttribute("class",t)})}catch(e){console.warn(e)}}({type:o,rowKey:c}),d.onMouseLeave&&d.onMouseLeave(e)}},{key:"row_".concat(c),"data-key":"row_".concat(c),className:G("vt-grid-row",{"vt-grid-row-selected":e},d.className),style:{height:u,contain:R.fixedRowHeight?"none":""}}),(i||S).map(function(e,t){return A(n,r,e,t,{type:o})}))}function U(){var e,t,n,r,o;null!==i.current&&(e=i.current,cancelAnimationFrame(e.id)),i.current=(t=_,n=150,r=Z(),o={id:requestAnimationFrame(function e(){Z()-r>=n?t.call(null):o.id=requestAnimationFrame(e)})})}var _=Object(W.useCallback)(function(){i.current=null,t.current.style.pointerEvents=""},[]);return V.a.createElement(V.a.Fragment,null,V.a.createElement("div",{className:G("vt-grid-container",e),ref:a,onScrollCapture:function(e){p.isSticky&&!p.headerNotSticky||"mainMultiGrid"!==v||p.onScroll(e),"body"===d&&w&&w(e),L(),t.current.style.pointerEvents="none",U()},style:te({height:R.visibleHeight},u||{})},V.a.createElement("div",{ref:t,style:{willChange:"transform",paddingTop:T.startVerticalOffset,paddingBottom:T.endVerticalOffset,paddingLeft:T.startHorizontalOffset,paddingRight:T.endHorizontalOffset}},p.isSticky&&!p.headerNotSticky&&V.a.createElement("div",{className:"vt-table-header vt-header-sticky"},p.headerTitle.map(function(e,t){return B(e,t,{type:"header"})})),T.virtualData.map(function(e,t){return B(e,t,{type:d})}),p.isSticky&&p.summaryData&&V.a.createElement("div",{className:"vt-table-footer vt-footer-sticky"},p.summaryData.map(function(e,t){return B(e,t,{type:"footer",displayedFooterColumns:j})})))))}p.propTypes={columns:r.a.array,dataSource:r.a.array,visibleWidth:r.a.number,visibleHeight:r.a.number,estimatedRowHeight:r.a.number,minRowHeight:r.a.number,rowVisibleCount:r.a.number,rowOffsetCount:r.a.number,estimatedColumnWidth:r.a.number,columnVisibleCount:r.a.number,columnOffsetCount:r.a.number,fixedRowHeight:r.a.bool,fixedLeftColumns:r.a.array,fixedRightColumns:r.a.array,type:r.a.string,mgType:r.a.string,className:r.a.string,gridStyle:r.a.object,shouldRowHeightSync:r.a.bool,headerBordered:r.a.bool,bordered:r.a.bool,rowKey:r.a.oneOfType([r.a.string,r.a.func]),components:r.a.object,onRow:r.a.func,onScrollTopSync:r.a.func,onCellTap:r.a.func};var S=V.a.memo(V.a.forwardRef(p));n(9);function j(){return(j=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function C(e){return function(e){if(Array.isArray(e))return b(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||v(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||v(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){if(e){if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){var n=Object(W.useRef)(null),r=Object(W.useRef)(null);Object(W.useImperativeHandle)(t,function(){return{gridContainer:r.current.gridContainer}});var o=e.type,i=e.mgClassName,a=e.shouldRowHeightSync,l=e.columns,c=e.hasFixed,u=e.dataSource,s=void 0===(x=e.fixedLeftColumnCount)?0:x,d=void 0===(m=e.fixedRightColumnCount)?0:m,f=e.bodyScrollBarWidth,t=e.bodyScrollBarHeight,p=Object(W.useRef)(null),v=Object(W.useRef)(null),b=Object(W.useContext)(z),m=(x=R(Object(W.useState)([]),2))[0],h=x[1];Object(W.useEffect)(function(){var n;a&&!b.isSticky&&"body"===o&&c&&(n=setTimeout(function(){var e,t=r.current;t&&(t.gridContainer.scrollLeft+=1,e=setTimeout(function(){--t.gridContainer.scrollLeft,clearTimeout(e)},50)),clearTimeout(n)},150))},[l,u,c]);var g=Object(W.useMemo)(function(){if(!c)return l;var e=d?-d:void 0;return s||d?J(l).slice(s,e):l},[c,l,s,d]),y=Object(W.useMemo)(function(){if(!c)return[];var n,e=s?l.slice(0,s):[];return n={fixedLeftColumns:e}.fixedLeftColumns,J(n).map(function(e,t){return e.fixed="left",e.lastFixLeft=t===n.length-1,e.fcIndex=t,e.realFcIndex=t,e})},[c,l,s]),w=Object(W.useMemo)(function(){if(!c)return[];var n,r,e=d?l.slice(-d):[];return e={fixedRightColumns:e,columnsLength:l.length},n=e.fixedRightColumns,r=e.columnsLength,J(n).map(function(e,t){return e.fixed="right",e.firstFixRight=0===t,e.fcIndex=t,e.realFcIndex=r-n.length+t,e})},[c,l,d]),x=Object(W.useMemo)(function(){return[].concat(C(y),C(g),C(w))},[y,g,w]),u=Object(W.useCallback)(function(e){var t=e&&e.target&&e.target.scrollTop,n=p.current,r=v.current;n&&(e.preventDefault(),n.gridContainer.scrollTop=t),r&&(e.preventDefault(),r.gridContainer.scrollTop=t),O("setState")},[]),O=function(){var e,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"setDomStyle";a&&!b.isSticky&&"body"===o&&c&&(e=r.current.gridContainer.querySelectorAll(".vt-grid-row"),"setState"===t&&(e=Array.prototype.slice.call(e).map(function(e){return e.clientHeight}),h(e)))};return V.a.createElement(V.a.Fragment,null,V.a.createElement("div",{className:G("vt-multi-grid-container",i),ref:n},b.isSticky?V.a.createElement(S,j({},e,{ref:r,key:"".concat(s,"_").concat(d,"_").concat(c),columns:g,fixedLeftColumns:y,fixedRightColumns:w,mgType:"mainMultiGrid"})):V.a.createElement(V.a.Fragment,null,V.a.createElement(S,j({},e,{ref:r,columns:x,fixedLeftColumns:[],fixedRightColumns:[],mgType:"mainMultiGrid",onScrollTopSync:u})),0<y.length?V.a.createElement("div",{className:"vt-multi-grid-fixed-left"},V.a.createElement(S,j({},e,{ref:p,columns:y,fixedLeftColumns:[],fixedRightColumns:[],rowsHeightArr:m,mgType:"leftMultiGrid",gridStyle:{marginBottom:"body"===o?-t:void 0}}))):null,0<w.length?V.a.createElement("div",{className:"vt-multi-grid-fixed-right",style:{marginRight:"body"===o?f:void 0}},V.a.createElement(S,j({},e,{ref:v,columns:w,fixedLeftColumns:[],fixedRightColumns:[],rowsHeightArr:m,mgType:"rightMultiGrid",gridStyle:{marginBottom:"body"===o?-t:void 0}}))):null)))}m.propTypes={type:r.a.string,mgClassName:r.a.string,shouldRowHeightSync:r.a.bool,columns:r.a.array,dataSource:r.a.array,hasFixed:r.a.bool,fixedLeftColumnCount:r.a.number,fixedRightColumnCount:r.a.number,bodyScrollBarWidth:r.a.number,bodyScrollBarHeight:r.a.number};function oe(e){var l={};return e.forEach(function(e){for(var t=e.s.c,n=e.s.r,r=e.e.c,o=e.e.r,i=t;i<=r;i++)for(var a=n;a<=o;a++)l["".concat(i,":").concat(a)]={colSpan:n===a?0:void 0,rowSpan:0};l["".concat(t,":").concat(n)]={colSpan:r-t+1,rowSpan:o-n+1}}),l}var ie=V.a.memo(V.a.forwardRef(m));n(11);function ae(){return(ae=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function h(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function le(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?h(Object(o),!0).forEach(function(e){var t,n;t=r,e=o[n=e],n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):h(Object(o)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})}return r}function ce(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(b){var m=Object(W.useRef)(null),n=Object(W.useRef)(null),r=Object(W.useRef)(null),o=Object(W.useRef)(null),t=b.isSticky,e=void 0!==(A=b.headerNotSticky)&&A,h=b.rowKey,g=b.rowSelection,y=void 0===(S=b.columns)?[]:S,u=void 0===(P=b.dataSource)?[]:P,i=b.summary,a=b.wrapperClassName,l=b.visibleHeight,c=void 0===(C=b.rowHeight)?40:C,s=b.locale,d=b.loading,f=(B=ce(Object(W.useState)(!1),2))[0],p=B[1],w=(U=ce(Object(W.useState)(0),2))[0],v=U[1],x=(T=ce(Object(W.useState)(0),2))[0],O=T[1],S=(A=ce(Object(W.useState)(1),2))[0],j=A[1],C=(P=ce(Object(W.useState)([]),2))[0],R=P[1],k=(B=ce(Object(W.useState)(y),2))[0],E=B[1],T=(U=ce(Object(W.useState)(!0),2))[0],I=U[1],A=q(i,"Function")?i():i;Object(W.useEffect)(function(){var e=void 0===t?function(){for(var e=["","-webkit-","-ms-","-moz-","-o-"],t=e.length,n=document.createElement("div"),r=0;r<t;r++)if(n.style.position=e[r]+"sticky",""!==n.style.position)return!0;return!1}():t;p(e)},[t]),Object(W.useEffect)(function(){return 0<y.length&&(H(),window.addEventListener("resize",H)),function(){return window.removeEventListener("resize",H)}},[y,w,g]);var L=Object(W.useMemo)(function(){var e=J(k);return 0<e.length&&(e[e.length-1].width=e[e.length-1].width+(w||0)),e},[k]),P=Object(W.useMemo)(function(){var e=L;return 0<L.length&&"checkBox"===L[0].type&&((e=J(L))[0].render=null),e},[L]),H=function(){var e=m.current.offsetWidth;g&&(e-=void 0===(l=g.columnWidth)?60:l);var n,r,t,c,u,s,d,o=Q({columns:y}),i=o.columns,a=o.level,l=(p=(f={columns:i,clientWidth:e-(w||0)}).columns,l=f.clientWidth,o=!0,e=J(p),f=Y(p),o=!(f<l)||(p=e.length,f=l-f,n=Math.floor(f%p),r=Math.floor(f/p),e=e.map(function(e,t){return e.width+=r,t<n&&(e.width+=1),e}),!1),{columns:e,hasFixed:o}),f=l.columns,p=_({columns:y,flatColumns:i,headerLevel:a}),e=p.data,o=p.merges,v=oe(o),f=f.map(function(e,r){return e._headerCellProps=function(e,t,n){return le({},v["".concat(r,":").concat(n)])},e});g&&(i=g.columnProps,p=g.columnWidth,t=g.columnTitle,o=g.selectedRowKeys,c=void 0===o?[]:o,u=g.getCheckboxProps,s=g.rowRemoveVisible,d=g.onRowRemove,f.unshift(le(le({type:"checkBox",dataIndex:"checkBox",width:void 0===p?60:p,align:"center"},void 0===i?{}:i),{},{_headerCellProps:function(e,t,n){return{rowSpan:0===n?a:0}},title:function(){var e=N({selectedRowKeys:c,getCheckboxProps:u});return[V.a.createElement("div",{key:0,className:"vt-selection",onClick:F},V.a.createElement("input",{type:"checkbox",checked:e,readOnly:!0}),V.a.createElement("div",{className:"vt-show-box"})),t]},render:function(e,o,i,a){var t=X(h,o,a),n=c.includes(t),r=!1,l=!1;return u&&(t=u(o)||{},r=t.disabled,l=t.notVisible),[s&&V.a.createElement("div",{key:0,onClick:function(e){return t=o,n=i,r=a,(e=e).stopPropagation(),void d(e,t,n,r);var t,n,r}},b.rowRemoveText||V.a.createElement("div",{className:"vt-row-remove"})),l?null:V.a.createElement("div",{key:1,className:G("vt-selection",{"vt-selection-disabled":r}),onClick:function(e){r||M(e,o,a)}},V.a.createElement("input",{type:"checkbox",checked:n,readOnly:!0}),V.a.createElement("div",{className:"vt-show-box"}))]}}))),j(a),R(e),E(f),I(l.hasFixed)},N=function(e){var t=e.selectedRowKeys,o=e.getCheckboxProps,i=[];u.forEach(function(e,t){var n=!!o&&o(e).disabled,r=!!o&&o(e).notVisible;n||r||i.push(X(h,e,t))});t=t.filter(function(e){return i.includes(e)});return 0<i.length&&t.length===i.length},M=function(e,t,n){e.stopPropagation();var r=g.selectedRowKeys,o=void 0===r?[]:r,i=g.onChange,a=void 0===i?function(){}:i,r=g.onSelect,i=void 0===r?function(){}:r,r=X(h,t,n),n=new Set(o),o=void 0,o=n.has(r)?(n.delete(r),!1):(n.add(r),!0),l=[],c=Array.from(n),n=u.filter(function(e,t){t=X(h,e,t);if(c.includes(t))return l.push(t),!0});a(l,n),i(t,o,n,e)},F=function(e){e.stopPropagation();var o,t=g.selectedRowKeys,n=g.onChange,e=void 0===n?function(){}:n,n=g.onSelectAll,n=void 0===n?function(){}:n,i=g.getCheckboxProps;N({selectedRowKeys:void 0===t?[]:t,getCheckboxProps:i})?(e([],[]),n(!1,[])):(o=[],t=u.filter(function(e,t){var n=!!i&&i(e).disabled,r=!!i&&i(e).notVisible;return n||r||(t=X(h,e,t),o.push(t)),!n&&!r}),e(o,t),n(!0,t))},B=q(d,"Object")?d.spinning:d,U=c*S,i=A?c*A.length:0,S=f?l:l-i;return f&&!e||(S-=U),V.a.createElement(V.a.Fragment,null,V.a.createElement(z.Provider,{value:{onScroll:function(e){var t=e&&e.target&&e.target.scrollLeft;window.requestAnimationFrame(function(){n.current&&(n.current.gridContainer.scrollLeft=t),o.current&&(o.current.gridContainer.scrollLeft=t),r.current&&(r.current.gridContainer.scrollLeft=t)})},getBodyScrollBar:function(e){var t,n,r=e.ref;r&&r.current&&(t=(n=r.current).offsetWidth,e=n.clientWidth,r=n.offsetHeight,n=n.clientHeight,v(t-e),O(r-n))},isSticky:f,headerNotSticky:e,headerTitle:C,summaryData:A}},V.a.createElement("div",{ref:m,className:G("vt-table",a),style:{height:l}},(!f||e)&&V.a.createElement(ie,ae({},b,{ref:n,type:"header",mgClassName:"vt-table-header",visibleHeight:U,minRowHeight:c,columns:L,dataSource:C,hasFixed:T,bodyScrollBarWidth:w,bodyScrollBarHeight:x})),V.a.createElement(ie,ae({},b,{ref:r,type:"body",mgClassName:"vt-table-body",visibleHeight:S,minRowHeight:c,columns:k,hasFixed:T,bodyScrollBarWidth:w,bodyScrollBarHeight:x})),!f&&A&&V.a.createElement(ie,ae({},b,{ref:o,type:"footer",mgClassName:"vt-table-footer",visibleHeight:i,minRowHeight:c,columns:P,dataSource:A,hasFixed:T,bodyScrollBarWidth:w,bodyScrollBarHeight:x})),!B&&u.length<1?V.a.createElement("div",{className:"vt-table-empty"},V.a.createElement("div",{style:{pointerEvents:"auto"}},s&&s.emptyText?s.emptyText:"暂无数据")):"",B?V.a.createElement("div",{className:"vt-table-loading"},d&&d.spinningText?d.spinningText:"数据加载中,请稍后..."):"")))}y.propTypes={isSticky:r.a.bool,columns:r.a.array.isRequired,dataSource:r.a.array.isRequired,wrapperClassName:r.a.string,rowHeight:r.a.number,rowKey:r.a.oneOfType([r.a.string,r.a.func]),rowSelection:r.a.object,rowRemoveText:r.a.oneOfType([r.a.string,r.a.element]),summary:r.a.oneOfType([r.a.array,r.a.func]),loading:r.a.oneOfType([r.a.object,r.a.bool]),locale:r.a.object};var w=V.a.memo(y),x={formatToCellsSpan:oe};n.d(t,"VTable",function(){return w}),n.d(t,"Grid",function(){return S}),n.d(t,"VTablePro",function(){return w}),n.d(t,"GridPro",function(){return S}),n.d(t,"utils",function(){return x})}],o.c=i,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=13);function o(e){if(i[e])return i[e].exports;var t=i[e]={i:e,l:!1,exports:{}};return r[e].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var r,i});