cheetah-grid
Version:
Cheetah Grid is a high performance grid engine that works on canvas
2 lines • 284 kB
JavaScript
/*! Cheetah Grid v1.16.6 | license MIT */
(function(e){var t,o;t=e,o=function(){return function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,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(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.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=80)}([function(t,o,n){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.emptyFn=o.style=o.event=o.str=o.obj=o.browser=o.cellInRange=o.cellEquals=o.array=o.then=o.getIgnoreCase=o.getOrApply=o.applyChainSafe=o.getChainSafe=o.isDescendantElement=o.isNode=o.isPromise=o.extend=o.defaults=o.omit=o.each=void 0;const r=void 0===e||void 0===e.window;let i,s;o.isNode=r;const l={get find(){return i||(i=Array.prototype.find?(e,t)=>Array.prototype.find.call(e,t):(e,t)=>{const o=l.findIndex(e,t);return o>=0?e[o]:void 0},i)},get findIndex(){return s||(s=Array.prototype.findIndex?(e,t)=>Array.prototype.findIndex.call(e,t):(e,t)=>{const{length:o}=e;for(let n=0;n<o;n++)if(t(e[n],n,e))return n;return-1},s)}};o.array=l;const{IE:a,Chrome:c,Firefox:u,Edge:h,Safari:d}=function(){if(r)return{IE:!1,Edge:!1,Chrome:!1,Firefox:!1,Safari:!1};{const t=e.navigator.userAgent.toLowerCase();return{IE:!!/(msie|trident)/.exec(t),Edge:t.indexOf("edge")>-1,Chrome:t.indexOf("chrome")>-1&&-1===t.indexOf("edge"),Firefox:t.indexOf("firefox")>-1,Safari:t.indexOf("safari")>-1&&-1===t.indexOf("edge")}}}();function f(e,t,...o){let n=e;for(let e=0;e<o.length&&null!=n;e++)n=t(n,o[e]);return n}function g(e){return Boolean(e&&"function"==typeof e.then)}o.each=function(e,t){for(const o in e)t(e[o],o,e)},o.omit=function(e,t){const o={};for(const n in e)t.indexOf(n)>=0||Object.defineProperty(o,n,{get:()=>e[n],set(t){e[n]=t},configurable:!0,enumerable:!0});return o},o.defaults=function(e,t){const o=[],n={};for(const r in e)o.push(r),Object.defineProperty(n,r,{get(){const o=e[r];return void 0===o?t[r]:o},set(t){e[r]=t},configurable:!0,enumerable:!0});for(const r in t)o.indexOf(r)>=0||Object.defineProperty(n,r,{get(){const o=e[r];return void 0===o?t[r]:o},set(t){e[r]=t},configurable:!0,enumerable:!0});return n},o.extend=function(...e){const t={};return e.forEach(e=>{for(const o in e)Object.defineProperty(t,o,{get:()=>e[o],set(t){e[o]=t},configurable:!0,enumerable:!0})}),t},o.isDescendantElement=function(e,t){for(;t.parentElement;){const o=t.parentElement;if(e===o)return!0;t=o}return!1},o.applyChainSafe=f,o.getChainSafe=function(e,...t){return f(e,(e,t)=>e[t],...t)},o.getOrApply=function(e,...t){return"function"==typeof e?e(...t):e},o.isPromise=g,o.then=function(e,t){return g(e)?e.then(e=>t(e)):t(e)},o.getIgnoreCase=function(e,t){if(e[t])return e[t];const o=t.toLowerCase();if(e[o])return e[o];const n=t.toLowerCase();if(e[n])return e[n];for(const t in e)if(t.toLowerCase()===o)return e[t]},o.cellEquals=function(e,t){return e.col===t.col&&e.row===t.row},o.cellInRange=function(e,t,o){return e.start.col<=t&&t<=e.end.col&&e.start.row<=o&&o<=e.end.row},o.browser={IE:a,Edge:h,Chrome:c,Firefox:u,Safari:d,heightLimit:c?16777216:u?17895588:10737433},o.obj={setReadonly:function(e,t,o){Object.defineProperty(e,t,{enumerable:!1,configurable:!0,value:o})},isObject:function(e){return e===Object(e)}},o.str={endsWith:function(e,t,o){const n=e.toString();("number"!=typeof o||!isFinite(o)||Math.floor(o)!==o||o>n.length)&&(o=n.length),o-=t.length;const r=n.lastIndexOf(t,o);return-1!==r&&r===o},genChars:function(e){const t=/([\uD800-\uDBFF][\uDC00-\uDFFF]|\r\n|[^\uD800-\uDFFF])([\u180B-\u180D]|[\uFE00-\uFE0F]|\uDB40[\uDD00-\uDDEF])?/g;return{next(){const o=t.exec(e);return null!==o?o[0]:null}}},genWords:function(e){const t=/[!-~]+|[^!-~\s]+|\s+/g;return{next(){const o=t.exec(e);return null!==o?o[0]:null}}}},o.event={getMouseButtons:function(e){return null!=e.buttons?e.buttons:null!=e.which?3===e.which||2===e.which?4:e.which:0===e.button||1===e.button?1:2===e.button?2:0},getKeyCode:function(e){return e.keyCode||e.which},isTouchEvent:function(e){return!!e.changedTouches},cancel:function(e){e.preventDefault(),e.stopPropagation()}},o.style={toBoxArray:function(e){return Array.isArray(e)?3===e.length?[e[0],e[1],e[2],e[1]]:2===e.length?[e[0],e[1],e[0],e[1]]:1===e.length?[e[0],e[0],e[0],e[0]]:e:[e,e,e,e]}},o.emptyFn=Function.prototype},function(t,o,n){"use strict";(function(t){Object.defineProperty(o,"__esModule",{value:!0}),o.getCheckHeaderStateId=o.getInlineMenuEditorStateId=o.getInlineInputEditorStateId=o.getSmallDialogInputEditorStateId=o.getTreeColumnStateId=o.getBranchGraphColumnStateId=o.getColumnFadeinStateId=o.getButtonColumnStateId=o.getRadioColumnStateId=o.getCheckColumnStateId=o.getProtectedSymbol=o.get=void 0;const r=n(0).isNode?t.Symbol:e.Symbol?e.Symbol:(()=>{function e(){const e="abcdefghijklmnopqrstuvwxyz0123456789",t=e.length;let o="";for(let n=0;n<10;n++)o+=e[Math.floor(Math.random()*t)];return o}return t=>t?`#${t}_${e()}`:"#_"+e()})(),i={};function s(e){return e?i[e]?i[e]:i[e]=r(e):r()}o.get=s,o.getProtectedSymbol=function(){return s("protected")},o.getCheckColumnStateId=function(){return s("chkcol.stateID")},o.getRadioColumnStateId=function(){return s("rdcol.stateID")},o.getButtonColumnStateId=function(){return s("btncol.stateID")},o.getColumnFadeinStateId=function(){return s("col.fadein_stateID")},o.getBranchGraphColumnStateId=function(){return s("branch_graph_col.stateID")},o.getTreeColumnStateId=function(){return s("tree_col.stateID")},o.getSmallDialogInputEditorStateId=function(){return s("small_dialog_input_editor.stateID")},o.getInlineInputEditorStateId=function(){return s("inline_input_editor.stateID")},o.getInlineMenuEditorStateId=function(){return s("inline_menu_editor.stateID")},o.getCheckHeaderStateId=function(){return s("check_header.stateID")}}).call(this,n(83))},function(e,t,o){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o=function(e,t){var o,n,r,i=e[1]||"",s=e[3];if(!s)return i;if(t&&"function"==typeof btoa){var l=(o=s,n=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),"/*# ".concat(r," */")),a=s.sources.map((function(e){return"/*# sourceURL=".concat(s.sourceRoot||"").concat(e," */")}));return[i].concat(a).concat([l]).join("\n")}return[i].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(o,"}"):o})).join("")},t.i=function(e,o,n){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(n)for(var i=0;i<this.length;i++){var s=this[i][0];null!=s&&(r[s]=!0)}for(var l=0;l<e.length;l++){var a=[].concat(e[l]);n&&r[a[0]]||(o&&(a[2]?a[2]="".concat(o," and ").concat(a[2]):a[2]=o),t.push(a))}},t}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventHandler=void 0;const n=o(0);let r=1;t.EventHandler=class{constructor(){this._listeners={}}on(e,t,o,...n){e.addEventListener&&e.addEventListener(t,o,...n);const i={target:e,type:t,listener:o,options:n},s=r++;return this._listeners[s]=i,s}once(e,t,o,...n){const r=this.on(e,t,(...e)=>{this.off(r),o(...e)},...n);return r}tryWithOffEvents(e,t,o){const r=[];try{(0,n.each)(this._listeners,o=>{o.target===e&&o.type===t&&(o.target.removeEventListener&&o.target.removeEventListener(o.type,o.listener,...o.options),r.push(o))}),o()}finally{r.forEach(e=>{e.target.addEventListener&&e.target.addEventListener(e.type,e.listener,...e.options)})}}off(e){if(null==e)return;const t=this._listeners[e];t&&(delete this._listeners[e],t.target.removeEventListener&&t.target.removeEventListener(t.type,t.listener,...t.options))}fire(e,t,...o){(0,n.each)(this._listeners,n=>{n.target===e&&n.type===t&&n.listener.call(n.target,...o)})}hasListener(e,t){let o=!1;return(0,n.each)(this._listeners,n=>{n.target===e&&n.type===t&&(o=!0)}),o}clear(){(0,n.each)(this._listeners,e=>{e.target.removeEventListener&&e.target.removeEventListener(e.type,e.listener,...e.options)}),this._listeners={}}dispose(){this.clear(),this._listeners=null}}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DG_EVENT_TYPE=void 0,t.DG_EVENT_TYPE={CLICK_CELL:"click_cell",DBLCLICK_CELL:"dblclick_cell",DBLTAP_CELL:"dbltap_cell",MOUSEDOWN_CELL:"mousedown_cell",MOUSEUP_CELL:"mouseup_cell",SELECTED_CELL:"selected_cell",KEYDOWN:"keydown",MOUSEMOVE_CELL:"mousemove_cell",MOUSEENTER_CELL:"mouseenter_cell",MOUSELEAVE_CELL:"mouseleave_cell",MOUSEOVER_CELL:"mouseover_cell",MOUSEOUT_CELL:"mouseout_cell",TOUCHSTART_CELL:"touchstart_cell",CONTEXTMENU_CELL:"contextmenu_cell",INPUT_CELL:"input_cell",PASTE_CELL:"paste_cell",DELETE_CELL:"delete_cell",EDITABLEINPUT_CELL:"editableinput_cell",MODIFY_STATUS_EDITABLEINPUT_CELL:"modify_status_editableinput_cell",RESIZE_COLUMN:"resize_column",SCROLL:"scroll",FOCUS_GRID:"focus_grid",BLUR_GRID:"blur_grid"}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Style=void 0;const n=o(21);let r;class i extends n.StdBaseStyle{static get DEFAULT(){return r||(r=new i)}constructor(e={}){super(e),this._color=e.color,this._font=e.font,this._textOverflow=e.textOverflow||"clip"}get color(){return this._color}set color(e){this._color=e,this.doChangeStyle()}get font(){return this._font}set font(e){this._font=e,this.doChangeStyle()}get textOverflow(){return this._textOverflow}set textOverflow(e){this._textOverflow=e,this.doChangeStyle()}clone(){return new i(this)}}t.Style=i},function(e,t,o){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&n(t,e,o);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.loadIcons=void 0;const s=i(o(26)),l=o(0);t.loadIcons=function e(t,o,n,r){let i=void 0;if(t)if((0,l.isPromise)(t))t.then(t=>{e(t,o.toCurrentContext(),n,r)});else{const e=s.toNormalizeArray(t);e.forEach(e=>{e.font&&e.content&&n.testFontLoad(e.font,e.content,o)}),i=e}r(i,o)}},function(t,o,n){"use strict";var r,i=function(){return void 0===r&&(r=Boolean(e&&document&&document.all&&!e.atob)),r},s=function(){var t={};return function(o){if(void 0===t[o]){var n=document.querySelector(o);if(e.HTMLIFrameElement&&n instanceof e.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[o]=n}return t[o]}}(),l=[];function a(e){for(var t=-1,o=0;o<l.length;o++)if(l[o].identifier===e){t=o;break}return t}function c(e,t){for(var o={},n=[],r=0;r<e.length;r++){var i=e[r],s=t.base?i[0]+t.base:i[0],c=o[s]||0,u="".concat(s," ").concat(c);o[s]=c+1;var h=a(u),d={css:i[1],media:i[2],sourceMap:i[3]};-1!==h?(l[h].references++,l[h].updater(d)):l.push({identifier:u,updater:m(d,t),references:1}),n.push(u)}return n}function u(e){var t=document.createElement("style"),o=e.attributes||{};if(void 0===o.nonce){var r=n.nc;r&&(o.nonce=r)}if(Object.keys(o).forEach((function(e){t.setAttribute(e,o[e])})),"function"==typeof e.insert)e.insert(t);else{var i=s(e.insert||"head");if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(t)}return t}var h,d=(h=[],function(e,t){return h[e]=t,h.filter(Boolean).join("\n")});function f(e,t,o,n){var r=o?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=d(t,r);else{var i=document.createTextNode(r),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(i,s[t]):e.appendChild(i)}}function g(e,t,o){var n=o.css,r=o.media,i=o.sourceMap;if(r?e.setAttribute("media",r):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var p=null,_=0;function m(e,t){var o,n,r;if(t.singleton){var i=_++;o=p||(p=u(t)),n=f.bind(null,o,i,!1),r=f.bind(null,o,i,!0)}else o=u(t),n=g.bind(null,o,t),r=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(o)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else r()}}t.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=i());var o=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<o.length;n++){var r=a(o[n]);l[r].references--}for(var i=c(e,t),s=0;s<o.length;s++){var u=a(o[s]);0===l[u].references&&(l[u].updater(),l.splice(u,1))}o=i}}}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calcStartPosition=t.calcBasePosition=t.getFontSize=void 0;const n={};function r(e,t,o,n,{offset:r=0,padding:{left:i=0,right:s=0,top:l=0,bottom:a=0}={}}={}){const c=e.textAlign||"left",u=e.textBaseline||"middle";e.textAlign=c,e.textBaseline=u;let h=t.left+r+i;"right"===c||"end"===c?h=t.right-o-r-s:"center"===c&&(h=t.left+(t.width-o+i-s)/2);let d=t.top+r+l;return"bottom"===u||"alphabetic"===u||"ideographic"===u?d=t.bottom-n-r-a:"middle"===u&&(d=t.top+(t.height-n+l-a)/2),{x:h,y:d}}t.getFontSize=function(e,t){const o=t||e.font;if(n[o])return n[o];const r=e.font;e.canvas.style.letterSpacing="normal";try{e.font=o;const t=e.measureText("あ").width;return n[o]={width:t,height:t}}finally{e.canvas.style.letterSpacing="",e.font=r}},t.calcBasePosition=function(e,t,{offset:o=0,padding:{left:n=0,right:i=0,top:s=0,bottom:l=0}={}}={}){return r(e,t,0,0,{offset:o,padding:{left:n,right:i,top:s,bottom:l}})},t.calcStartPosition=r},function(e,t,o){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&n(t,e,o);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseColumn=void 0;const s=i(o(25)),l=o(0),a=o(19),c=o(18),u=o(1),h=o(94),{setReadonly:d}=l.obj,f=(0,u.getColumnFadeinStateId)();function g(e){let t=e[f];return t||(t={cells:{}},d(e,f,t)),t}function p(e,t,o,n,r,i){return s=>{const l=g(e),a=`${o}:${t}`;1===s?delete l.cells[a]:l.cells[a]={opacity:s},i(),r();const c=l.cells[a];if(c){const e=n.getContext();e.globalAlpha=1-c.opacity;try{i()}finally{e.globalAlpha=1}}}}const _={animate(e,t,o,n,r,i){const s=g(e),l=[p(e,t,o,n,r,i)];s.activeFadeins=l,(0,c.animate)(500,e=>{l.forEach(t=>t(e)),1===e&&delete s.activeFadeins})},margeAnimate(e,t,o,n,r,i){const s=g(e);s.activeFadeins?s.activeFadeins.push(p(e,t,o,n,r,i)):r()}};t.BaseColumn=class{constructor(e){this.onDrawCell=this.onDrawCell.bind(this),this._fadeinWhenCallbackInPromise=null==e?void 0:e.fadeinWhenCallbackInPromise}get fadeinWhenCallbackInPromise(){return this._fadeinWhenCallbackInPromise}get StyleClass(){return a.BaseStyle}onDrawCell(e,t,o,n){var r;const{style:i,getRecord:a,drawCellBase:c}=t,u=n.getGridCanvasHelper();c();const h=a();let d;if((0,l.isPromise)(h))d=h;else if((0,l.isPromise)(e))d=e;else{const e=t.getMessage();(0,l.isPromise)(e)&&(d=e)}if(d){const r=Date.now();return Promise.all([h,e,d.then(()=>e).then(()=>t.getMessage())]).then(({0:e,1:l,2:a})=>{if(!o.toCurrentContext().getDrawRect())return;const h=Date.now()-r,d=()=>{const r=o.toCurrentContext();if(!r.getDrawRect())return;const c=s.of(i,e,this.StyleClass);this.drawInternal(this.convertInternal(l),r,c,u,n,t),this.drawMessageInternal(a,r,c,u,n,t),this.drawIndicatorsInternal(r,c,u,n,t)};if(function(e,t){return null!=e.fadeinWhenCallbackInPromise?e.fadeinWhenCallbackInPromise:!!t.configure("fadeinWhenCallbackInPromise")}(this,n)){const{col:e,row:t}=o;h<80?_.margeAnimate(n,e,t,o,d,c):_.animate(n,e,t,o,d,c)}else d()})}{const l=s.of(i,h,this.StyleClass);this.drawInternal(this.convertInternal(e),o,l,u,n,t),this.drawMessageInternal(t.getMessage(),o,l,u,n,t),this.drawIndicatorsInternal(o,l,u,n,t);const{col:a,row:d}=o,g=`${a}:${d}`,p=null===(r=n[f])||void 0===r?void 0:r.cells[g];if(p){const e=o.getContext();e.globalAlpha=1-p.opacity;try{c()}finally{e.globalAlpha=1}}return}}convertInternal(e){return null!=e?e:""}drawMessageInternal(e,t,o,n,r,i){i.messageHandler.drawCellMessage(e,t,o,n,r,i)}drawIndicatorsInternal(e,t,o,n,r){var i;const{indicatorTopLeft:s,indicatorTopRight:l,indicatorBottomRight:a,indicatorBottomLeft:c}=t;for(const{0:t,1:u}of[[s,0],[l,1],[a,2],[c,3]])t&&(null===(i=(0,h.getDrawIndicator)(t))||void 0===i||i(e,t,u,o,n,r))}bindGridEvent(e,t){return[]}getCopyCellValue(e,t,o){return e}}},function(e,t,o){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&n(t,e,o);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Column=void 0;const s=i(o(6)),l=o(9),a=o(5);class c extends l.BaseColumn{get StyleClass(){return a.Style}clone(){return new c(this)}drawInternal(e,t,o,n,r,{drawCellBase:i,getIcon:l}){const{textAlign:a,textBaseline:c,color:u,font:h,bgColor:d,padding:f,textOverflow:g,visibility:p}=o;if(d&&i({bgColor:d}),"hidden"===p)return;const _=null!=e?String(e):"";n.testFontLoad(h,_,t),s.loadIcons(l(),t,n,(e,t)=>{n.text(_,t,{textAlign:a,textBaseline:c,color:u,font:h,padding:f,textOverflow:g,icons:e})})}}t.Column=c},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Rect=void 0;class n{constructor(e,t,o,n){this._left=e,this._top=t,this._width=o,this._height=n}static bounds(e,t,o,r){return new n(e,t,o-e,r-t)}static max(e,t){return n.bounds(Math.min(e.left,t.left),Math.min(e.top,t.top),Math.max(e.right,t.right),Math.max(e.bottom,t.bottom))}get left(){return this._left}set left(e){const{right:t}=this;this._left=e,this.right=t}get top(){return this._top}set top(e){const{bottom:t}=this;this._top=e,this.bottom=t}get width(){return this._width}set width(e){this._width=e,this._right=void 0}get height(){return this._height}set height(e){this._height=e,this._bottom=void 0}get right(){return void 0!==this._right?this._right:this._right=this.left+this.width}set right(e){this._right=e,this.width=e-this.left}get bottom(){return void 0!==this._bottom?this._bottom:this._bottom=this.top+this.height}set bottom(e){this._bottom=e,this.height=e-this.top}offsetLeft(e){this._left+=e,this._right=void 0}offsetTop(e){this._top+=e,this._bottom=void 0}copy(){return new n(this.left,this.top,this.width,this.height)}intersection(e){const t=Math.max(this.left,e.left),o=Math.min(this.left+this.width,e.left+e.width);if(t<=o){const r=Math.max(this.top,e.top),i=Math.min(this.top+this.height,e.top+e.height);if(r<=i)return n.bounds(t,r,o,i)}return null}contains(e){return this.left<=e.left&&this.left+this.width>=e.left+e.width&&this.top<=e.top&&this.top+this.height>=e.top+e.height}inPoint(e,t){return this.left<=e&&this.left+this.width>=e&&this.top<=t&&this.top+this.height>=t}}t.Rect=n},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toggleValue=t.isReadOnlyRecord=t.isDisabledRecord=void 0;const n=o(0);function r(e,t,o){if("function"==typeof e){const r=t.getRowRecord(o);return!!(0,n.isPromise)(r)||!!e(r)}return!!e}t.isDisabledRecord=function(e,t,o){return!!t.disabled||r(e,t,o)},t.isReadOnlyRecord=function(e,t,o){return!!t.readOnly||r(e,t,o)},t.toggleValue=function(e){if("number"==typeof e)return 0===e?1:0;if("string"==typeof e){if("false"===e)return"true";if("off"===e)return"on";if(/^0+$/.exec(e))return e.replace(/^(0*)0$/,"$11");if("true"===e)return"false";if("on"===e)return"off";if(/^0*1$/.exec(e))return e.replace(/^(0*)1$/,"$10")}return!e}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Editor=void 0;const n=o(24);class r extends n.BaseAction{constructor(e={}){super(e),this._readOnly=e.readOnly||!1}get editable(){return!0}get readOnly(){return this._readOnly}set readOnly(e){this._readOnly=e,this.onChangeReadOnlyInternal()}onChangeReadOnlyInternal(){}}t.Editor=r},function(e,t,o){"use strict";function n(e,{classList:t,text:o,html:n}={}){const r=document.createElement(e);return t&&(Array.isArray(t)?r.classList.add(...t):r.classList.add(t)),o?r.textContent=o:n&&(r.innerHTML=n),r}function r(e){if(Array.isArray(e)){const t=[];return e.forEach(e=>{t.push(...r(e))}),t}const t=function(e){if(function(e){return!(!e.nodeType||!e.nodeName)}(e))return e;const t=n("div",{html:e});return Array.prototype.slice.call(t.childNodes)}(e);return Array.isArray(t)?t:[t]}function i(e){return null!=e.tabIndex&&e.tabIndex>-1}Object.defineProperty(t,"__esModule",{value:!0}),t.findNextSiblingFocusable=t.findPrevSiblingFocusable=t.isFocusable=t.enableFocus=t.disableFocus=t.appendHtml=t.toNodeList=t.empty=t.createElement=void 0,t.createElement=n,t.empty=function(e){let t;for(;t=e.firstChild;)e.removeChild(t)},t.toNodeList=r,t.appendHtml=function(e,t){r(t).forEach(t=>{e.appendChild(t)})},t.disableFocus=function e(t){t.dataset.disableBeforeTabIndex=""+t.tabIndex,t.tabIndex=-1,Array.prototype.slice.call(t.children,0).forEach(e)},t.enableFocus=function e(t){"disableBeforeTabIndex"in t.dataset&&(t.tabIndex=Number(t.dataset.disableBeforeTabIndex)),Array.prototype.slice.call(t.children,0).forEach(e)},t.isFocusable=i,t.findPrevSiblingFocusable=function(e){let t=e.previousSibling;for(;t&&!i(t);)t=t.previousSibling;return t},t.findNextSiblingFocusable=function(e){let t=e.nextSibling;for(;t&&!i(t);)t=t.nextSibling;return t}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Inline=void 0;const n=o(0);function r(e,t){return e.measureText(t).width}function i(e,t,o,n,i){const l=[];let a=o.next();for(let e=0;e<n&&null!==a;e++,a=o.next())l.push(a);let c=r(e,l.join(""));if(c>i)for(;l.length&&(c-=r(e,l.pop()||""),!(c<=i)););else if(c<i)for(;null!==a;){const t=r(e,a);if(c+t>i)break;l.push(a),c+=t,a=o.next()}const u=l.join("").replace(/\s+$/,""),h=t.slice(u.length).replace(/^\s+/,"");return{before:u?new s(u):null,after:h?new s(h):null}}class s{constructor(e){this._content=null!=e?e:""}width({ctx:e}){return r(e,this._content)}font(){return null}color(){return null}canDraw(){return!0}onReady(e){}draw({ctx:e,canvashelper:t,rect:o,offset:n,offsetLeft:r,offsetRight:i,offsetTop:s,offsetBottom:l}){t.fillTextRect(e,this._content,o.left,o.top,o.width,o.height,{offset:n+1,padding:{left:r,right:i,top:s,bottom:l}})}canBreak(){return!!this._content}splitIndex(e){const t=this._content,o=n.str.genChars(t),r=[];let i=o.next();for(let t=0;t<e&&null!==i;t++,i=o.next())r.push(i);const l=r.join(""),a=t.slice(l.length);return{before:l?new s(l):null,after:a?new s(a):null}}breakWord(e,t){const o=this._content,r=this.width({ctx:e}),s=Math.floor(this._content.length*t/r);return i(e,o,n.str.genWords(o),s,t)}breakAll(e,t){const o=this._content,r=this.width({ctx:e}),s=Math.floor(this._content.length*t/r);return i(e,o,n.str.genChars(o),s,t)}toString(){return this._content}}t.Inline=s},function(e,t,o){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&n(t,e,o);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseHeader=void 0;const s=i(o(35)),l=o(36);t.BaseHeader=class{constructor(e={}){this.onDrawCell=this.onDrawCell.bind(this)}get StyleClass(){return l.BaseStyle}onDrawCell(e,t,o,n){const{style:r,drawCellBase:i}=t,l=n.getGridCanvasHelper();i(),this.drawInternal(this.convertInternal(e),o,s.of(r,this.StyleClass),l,n,t)}convertInternal(e){return"function"==typeof e&&(e=e()),null!=e?""+e:""}bindGridEvent(e,t){return[]}getCopyCellValue(e,t,o){return"function"==typeof e&&(e=e()),null!=e?e:""}}},function(e,t,o){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&n(t,e,o);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.style=t.type=t.action=void 0;const s=i(o(81));t.action=s;const l=i(o(25));t.style=l;const a=i(o(46));t.type=a},function(t,o,n){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.animate=void 0;const r=n(0);function i(e,t,o,n){let r;return e*=3,t*=3,o*=3,n*=3,function(i){let s,l,a,c,u,h,d;if(i<0||1<i)throw new Error(""+i);s=r||i;do{l=1-s,a=l*l,c=s*s,u=c*s,h=e*a*s+o*l*c+u,d=i-h,s+=.5*d}while(1e-4<Math.abs(d));return r=s,t*a*s+n*l*c+u}}const s={linear:e=>e,easeIn:i(.42,0,1,1),easeOut:i(0,0,.58,1),easeInOut:i(.42,0,.58,1)},l=r.isNode?()=>{}:e.requestAnimationFrame||(e=>setTimeout(e,1));function a(){return Date.now()}o.animate=function(e,t,o){const n=a(),r=null==o?s.easeInOut:"string"==typeof o?s[o]:o;let i=!1;const c=(o,s)=>{const c=()=>{const u=a()-n;i?s&&s():u>=e?(t(1),o&&o()):(t(r(u/e)),l(c))};return c},u=()=>{i=!0};if("undefined"!=typeof Promise){const e=new Promise((e,o)=>{const n=c(e,o);t(0),n()});return e.cancel=u,e}{const e=c(()=>{},()=>{});return t(0),e(),{cancel:u}}}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseStyle=void 0;const n=o(20),r={CHANGE_STYLE:"change_style"};let i;class s extends n.EventTarget{static get EVENT_TYPE(){return r}static get DEFAULT(){return i||(i=new s)}constructor({bgColor:e,visibility:t,indicatorTopLeft:o,indicatorTopRight:n,indicatorBottomRight:r,indicatorBottomLeft:i}={}){super(),this._bgColor=e,this._visibility=a(t,void 0),this._indicatorTopLeft=l(o),this._indicatorTopRight=l(n),this._indicatorBottomRight=l(r),this._indicatorBottomLeft=l(i)}get bgColor(){return this._bgColor}set bgColor(e){this._bgColor=e,this.doChangeStyle()}get visibility(){return this._visibility}set visibility(e){const t=a(e,this._visibility);this._visibility!==t&&(this._visibility=t,this.doChangeStyle())}get indicatorTopLeft(){return this._indicatorTopLeft}set indicatorTopLeft(e){this._indicatorTopLeft=l(e),this.doChangeStyle()}get indicatorTopRight(){return this._indicatorTopRight}set indicatorTopRight(e){this._indicatorTopRight=l(e),this.doChangeStyle()}get indicatorBottomRight(){return this._indicatorBottomRight}set indicatorBottomRight(e){this._indicatorBottomRight=l(e),this.doChangeStyle()}get indicatorBottomLeft(){return this._indicatorBottomLeft}set indicatorBottomLeft(e){this._indicatorBottomLeft=l(e),this.doChangeStyle()}doChangeStyle(){this.fireListeners(r.CHANGE_STYLE)}clone(){return new s(this)}}function l(e){return"string"==typeof e?{style:e}:e}function a(e,t){return e&&"visible"!==e&&"hidden"!==e?t:e}t.BaseStyle=s},function(e,t,o){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.EventTarget=void 0;const r=o(0),i=(0,o(1).get)();let s=1;t.EventTarget=class{constructor(){this[n]={listeners:{},listenerData:{}}}listen(e,t){const o=this[i].listeners[e]||(this[i].listeners[e]=[]);o.push(t);const n=s++;return this[i].listenerData[n]={type:e,listener:t,remove:()=>{delete this[i].listenerData[n];const r=o.indexOf(t);o.splice(r,1),this[i].listeners[e].length||delete this[i].listeners[e]}},n}unlisten(e){this[i]&&this[i].listenerData[e].remove()}addEventListener(e,t){this.listen(e,t)}removeEventListener(e,t){this[i]&&(0,r.each)(this[i].listenerData,(o,n)=>{o.type===e&&o.listener===t&&this.unlisten(n)})}hasListeners(e){return!!this[i]&&!!this[i].listeners[e]}fireListeners(e,...t){if(!this[i])return[];const o=this[i].listeners[e];return o?o.map(e=>e.call(this,...t)).filter(e=>null!=e):[]}dispose(){delete this[i]}},n=i},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StdBaseStyle=void 0;const n=o(19);let r;class i extends n.BaseStyle{static get DEFAULT(){return r||(r=new i)}constructor(e={}){super(e),this._textAlign=e.textAlign||"left",this._textBaseline=e.textBaseline||"middle",this._padding=e.padding}get textAlign(){return this._textAlign}set textAlign(e){this._textAlign=e,this.doChangeStyle()}get textBaseline(){return this._textBaseline}set textBaseline(e){this._textBaseline=e,this.doChangeStyle()}get padding(){return this._padding}set padding(e){this._padding=e,this.doChangeStyle()}clone(){return new i(this)}}t.StdBaseStyle=i},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ofCell=t.of=t.MultilineTextHeader=t.CheckHeader=t.SortHeader=t.Header=t.BaseHeader=void 0;const n=o(16);Object.defineProperty(t,"BaseHeader",{enumerable:!0,get:function(){return n.BaseHeader}});const r=o(132);Object.defineProperty(t,"CheckHeader",{enumerable:!0,get:function(){return r.CheckHeader}});const i=o(133);Object.defineProperty(t,"Header",{enumerable:!0,get:function(){return i.Header}});const s=o(134);Object.defineProperty(t,"MultilineTextHeader",{enumerable:!0,get:function(){return s.MultilineTextHeader}});const l=o(135);Object.defineProperty(t,"SortHeader",{enumerable:!0,get:function(){return l.SortHeader}});const a={DEFAULT:new i.Header,SORT:new l.SortHeader,CHECK:new r.CheckHeader,MULTILINETEXT:new s.MultilineTextHeader};function c(e){if(e){if("string"==typeof e){const t=e.toUpperCase();return a[t]||c(null)}return e}return a.DEFAULT}t.of=c,t.ofCell=function(e){return e.sort?a.SORT:c(e.headerType)}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindCellKeyAction=t.bindCellClickAction=void 0;const n=o(0),r=o(4);t.bindCellClickAction=function(e,t,{action:o,mouseOver:i,mouseOut:s,area:l}){function a(o,n){return e.getLayoutCellId(o,n)===t}let c=null,u=null;function h(t){u=t,i&&!i({col:t.col,row:t.row})||(e.getElement().style.cursor="pointer")}function d(t){s&&s({col:t.col,row:t.row}),u=null,e.getElement().style.cursor=""}const f=[e.listen(r.DG_EVENT_TYPE.CLICK_CELL,t=>{if(!a(t.col,t.row))return;const r=e.selection.select;r.col===t.col&&r.row===t.row&&((0,n.isPromise)(e.getRowRecord(t.row))||l&&!l(t)||o({col:t.col,row:t.row}))}),e.listen(r.DG_EVENT_TYPE.MOUSEOVER_CELL,t=>{a(t.col,t.row)&&((0,n.isPromise)(e.getRowRecord(t.row))||(c=t,l&&!l(t)||h(t)))}),e.listen(r.DG_EVENT_TYPE.MOUSEOUT_CELL,e=>{c&&c.col===e.col&&c.row===e.row&&(u||d(e))})];return l&&f.push(e.listen(r.DG_EVENT_TYPE.MOUSEMOVE_CELL,e=>{if(!c||c.col!==e.col||c.row!==e.row)return;const t=l(e);if(u){if(t)return;d(e)}else{if(!t)return;h(e)}})),f},t.bindCellKeyAction=function(e,t,{action:o,acceptKeys:i=[]}){return i=[...i,13,32],[e.listen(r.DG_EVENT_TYPE.KEYDOWN,r=>{var s;if(-1===i.indexOf(r.keyCode))return;if((null===(s=e.keyboardOptions)||void 0===s?void 0:s.moveCellOnEnter)&&13===r.keyCode)return;const l=e.selection.select;var a,c;a=l.col,c=l.row,e.getLayoutCellId(a,c)===t&&((0,n.isPromise)(e.getRowRecord(l.row))||(o({col:l.col,row:l.row}),n.event.cancel(r.event)))})]}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseAction=void 0,t.BaseAction=class{constructor(e={}){this._disabled=e.disabled||!1}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this.onChangeDisabledInternal()}onChangeDisabledInternal(){}}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.of=t.TreeStyle=t.MenuStyle=t.MultilineTextStyle=t.PercentCompleteBarStyle=t.IconStyle=t.ImageStyle=t.ButtonStyle=t.RadioStyle=t.CheckStyle=t.NumberStyle=t.Style=t.BaseStyle=t.EVENT_TYPE=void 0;const n=o(19);Object.defineProperty(t,"BaseStyle",{enumerable:!0,get:function(){return n.BaseStyle}});const r=o(47);Object.defineProperty(t,"ButtonStyle",{enumerable:!0,get:function(){return r.ButtonStyle}});const i=o(48);Object.defineProperty(t,"CheckStyle",{enumerable:!0,get:function(){return i.CheckStyle}});const s=o(49);Object.defineProperty(t,"IconStyle",{enumerable:!0,get:function(){return s.IconStyle}});const l=o(50);Object.defineProperty(t,"ImageStyle",{enumerable:!0,get:function(){return l.ImageStyle}});const a=o(51);Object.defineProperty(t,"MenuStyle",{enumerable:!0,get:function(){return a.MenuStyle}});const c=o(52);Object.defineProperty(t,"MultilineTextStyle",{enumerable:!0,get:function(){return c.MultilineTextStyle}});const u=o(53);Object.defineProperty(t,"NumberStyle",{enumerable:!0,get:function(){return u.NumberStyle}});const h=o(54);Object.defineProperty(t,"PercentCompleteBarStyle",{enumerable:!0,get:function(){return h.PercentCompleteBarStyle}});const d=o(55);Object.defineProperty(t,"RadioStyle",{enumerable:!0,get:function(){return d.RadioStyle}});const f=o(5);Object.defineProperty(t,"Style",{enumerable:!0,get:function(){return f.Style}});const g=o(56);Object.defineProperty(t,"TreeStyle",{enumerable:!0,get:function(){return g.TreeStyle}});const{EVENT_TYPE:p}=n.BaseStyle;t.EVENT_TYPE=p,t.of=function e(t,o,r=f.Style){return t?t instanceof n.BaseStyle?t:"function"==typeof t?e(t(o),o,r):o&&t in o?e(o[t],o,r):new r(t):r.DEFAULT}},function(t,o,n){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.iconPropKeys=o.toNormalizeArray=o.getIconProps=void 0;const r=["content","font","color","className","tagName","isLiga","width","src","svg","name","path","offsetTop","offsetLeft"],i={},s={};function l(t,o){const n=s[t]||(s[t]={});if(n[o])return n[o];const r=i[t]||(i[t]=document.createElement(t));r.className=o,r.classList.add("cheetah-grid-icon"),document.body.appendChild(r);try{const t=(document.defaultView||e).getComputedStyle(r,"::before");let i=t.getPropertyValue("content");i.length>=3&&('"'===i[0]||"'"===i[0])&&i[0]===i[i.length-1]&&(i=i.slice(1,-1));let s=t.getPropertyValue("font");s||(s=`${t.getPropertyValue("font-style")} ${t.getPropertyValue("font-variant")} ${t.getPropertyValue("font-weight")} ${t.getPropertyValue("font-size")}/${t.getPropertyValue("line-height")} ${function(e){const t=[],o=e.split(/,\s*/);for(let e=0;e<o.length;e++){const n=o[e].replace(/['"]/g,"");-1!==n.indexOf(" ")||/^\d/.test(n)?t.push(`'${n}'`):t.push(n)}return t.join(",")}(t.getPropertyValue("font-family"))}`);const l=t.getPropertyValue("color"),a=r.clientWidth,c=(t.getPropertyValue("font-feature-settings")||"").indexOf("liga")>-1;return n[o]={content:i,font:s,color:l,width:a,isLiga:c}}finally{document.body.removeChild(r)}}function a(e){if(!e)return e;if(Array.isArray(e))return e;const t={};let o=0;r.forEach(t=>{const n=e[t];n&&(o=Array.isArray(n)?Math.max(o,n.length):Math.max(o,1))}),r.forEach(n=>{const r=function(e,t){const o=[];if(Array.isArray(e)){o.push(...e);for(let n=e.length;n<t;n++)o.push(null)}else for(let n=0;n<t;n++)o.push(e);return o}(e[n],o);t[n]=r});const n=[];for(let e=0;e<o;e++){const o={};r.forEach(n=>{const r=t[n][e];o[n]=r}),n.push(o)}return n}function c(e){return r.indexOf(e)>=0}o.getIconProps=l,o.toNormalizeArray=function(e){const t=a(e);return t?t.map(e=>function(e){const t={};for(const o in e)"className"!==o&&c(o)&&(t[o]=e[o]);if(e.className){const o=l(e.tagName||"i",e.className);for(const n in o)c(n)&&null==e[n]&&(t[n]=o[n])}return t}(e)):t},o.iconPropKeys=r},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toBoolean=void 0,t.toBoolean=function(e){if("string"==typeof e){if("false"===e)return!1;if("off"===e)return!1;if(/^0+$/.exec(e))return!1}return Boolean(e)}},function(e,t,o){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&n(t,e,o);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.string=t.buildInlines=t.of=t.iconOf=void 0;const s=i(o(60)),l=i(o(29)),a=o(15),c=o(62),u=o(110),h=o(64),d=o(113),f=o(114),g=o(8);function p(e){if(e instanceof a.Inline)return e;if(!e)return null;if(function(e){return!(!e.font||!e.content)}(e))return new u.InlineIcon(e);if(function(e){return!!e.src}(e))return new h.InlineImage({src:e.src,width:e.width,height:e.width});if(e.svg)return new f.InlineSvg({svg:e.svg,width:e.width,height:e.width});if(function(e){return!!e.path}(e))return new d.InlinePath2D({path:e.path,width:e.width,height:e.width,color:e.color});const t=s.get();if(e.name&&t[e.name]){const o=t[e.name],n=e.width||Math.max(o.width,o.height);return new c.InlineDrawer({draw({ctx:e,rect:t,offset:r,offsetLeft:i,offsetRight:s,offsetTop:a,offsetBottom:c}){!function(e,t,o,n,r,i,s,a,{offset:c=2,padding:u}={}){const h={left:r,top:i,width:s,height:a,right:r+s,bottom:i+a};e.save();try{e.beginPath(),e.rect(h.left,h.top,h.width,h.height),e.clip();const r=(0,g.calcStartPosition)(e,h,o,n,{offset:c,padding:u});l.fill(t,e,r.x,r.y,o,n)}finally{e.restore()}}(e,o,n,n,t.left,t.top,t.width,t.height,{offset:r+1,padding:{left:i,right:s,top:a,bottom:c}})},width:n,height:n,color:e.color})}return new u.InlineIcon(e)}function _(e){return null==e?null:e instanceof a.Inline?e:new a.Inline(e)}function m(e,t){const o=[];if(e&&o.push(...e.map(e=>p(e)).filter(e=>null!=e)),Array.isArray(t))o.push(...t.map(e=>_(e)).filter(e=>null!=e));else{const e=_(t);e&&o.push(e)}return o}t.iconOf=p,t.of=_,t.buildInlines=m,t.string=function(e){return m(void 0,e).join("")}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fill=t.getPath2D=void 0;const n=o(0);function r(){return"undefined"==typeof Path2D||n.browser.Edge?o(107).Path2DShim:Path2D}t.getPath2D=r,t.fill=function(e,t,o,n,i,s){t.save();try{const{width:l,height:a}=e,{ud:c,x:u=0,y:h=0}=e,d=(i=i||l)/l,f=(s=s||a)/(c?-a:a);o=o||0,n=c?(n||0)+-a*f:n||0,t.translate(o,n),t.scale(d,f),0===u&&0===h||t.translate(u,h);const g=r(),p=e.path2d=e.path2d||new g(e.d);t.fill(p)}finally{t.restore()}}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toPx=void 0;const n=o(0);function r(e){return 9===e||10===e||12===e||13===e||32===e}function i(e){return e>=48&&e<=57}function s(e){return 46===e}function l(e){return function(e){return function(e){return e>=97&&e<=122}(e)||function(e){return e>=65&&e<=90}(e)}(e)||37===e}function a(e){return new Error("calc parse error: "+e)}const c={"*":3,"/":3,"+":2,"-":2};function u(e){return function e(t,o){function r(e){const t=e.pop(),n=e.pop(),r=e.pop();if(!(r&&r.nodeType&&n&&2===n.type&&t&&t.nodeType))throw a(o);return{nodeType:11,left:r,op:n,right:t}}const i=[];for(;t.length;){const s=t.shift();if(0===s.type&&"("===s.value){let r=0;const s=n.array.findIndex(t,e=>{if(0===e.type&&"("===e.value)r++;else if(0===e.type&&")"===e.value){if(!r)return!0;r--}return!1});if(-1===s)throw a(o);i.push(e(t.splice(0,s),o)),t.shift()}else if(2===s.type){if(i.length>=3){const e=i[i.length-2].value;c[s.value]<=c[e]&&i.push(r(i))}i.push(s)}else if(1===s.type){const{value:e,unit:t}=s;i.push({nodeType:10,value:e,unit:t})}else 3===s.type&&i.push({nodeType:12,value:s.value})}for(;i.length>1;)i.push(r(i));return i[0]}(function(e){const t=e.replace(/calc\(/g,"(").trim(),o=[],n=t.length;for(let l=0;l<n;l++){const n=t[l],h=n.charCodeAt(0);if("("===n||")"===n)o.push({value:n,type:0});else if("*"===n||"/"===n)o.push({value:n,type:2});else if("+"===n||"-"===n)l=c(n,l+1)-1;else if(i(h)||s(h))l=u(n,l+1)-1;else if(!r(h))throw a(e)}function c(e,r){if(r<n){const o=t[r],n=o.charCodeAt(0);if(i(n)||s(n))return u(e+o,r+1)}return o.push({value:e,type:2}),r}function u(r,s){let c=s;for(;c<n;c++){const o=t[c],n=o.charCodeAt(0);if(i(n))r+=o;else{if("."!==o){if(l(n))return h(r,o,c+1);break}if(r.indexOf(".")>=0)throw a(e);r+=o}}if("."===r)throw a(e);return o.push({value:parseFloat(r),type:3}),c}function h(e,r,i){let s=i;for(;s<n;s++){const e=t[s];if(!l(e.charCodeAt(0)))break;r+=e}return o.push({value:parseFloat(e),unit:r,type:1}),s}return o}(e),e)}function h(e,t){return function e(t,o){if(11===t.nodeType){const n=e(t.left,o),r=e(t.right,o);switch(t.op.value){case"+":return n+r;case"-":return n-r;case"*":return n*r;case"/":return n/r;default:throw new Error("calc error. unknown operator: "+t.op.value)}}else if(10===t.nodeType)switch(t.unit){case"%":return t.value*o.full/100;case"em":return t.value*o.em;case"px":return t.value;default:throw new Error("calc error. unknown unit: "+t.unit)}else if(12===t.nodeType)return t.value;throw new Error("calc error.")}(u(e),t)}t.toPx=function(e,t){return"string"==typeof e?h(e.trim(),t):e-0}},function(e,t,o){"use strict";function n(e){return"\n"!==e[e.length-1]?e:"\r"===e[e.length-2]?e.slice(0,-2):e.slice(0,-1)}Object.defineProperty(t,"__esModule",{value:!0}),t.parsePasteRangeBoxValues=t.normalizePasteValue=void 0,t.normalizePasteValue=n,t.parsePasteRangeBoxValues=function(e,t){const o=n(e),{values:r,colCount:i}=function(e,{trimOnPaste:t}){const o=e.length,n=t?e=>e.trim():e=>e;let r=1,i=[];const s=[i];let l="";for(let t=0;t<o;t++){const o=e[t];if("\t"!==o)if("\n"!==o){if('"'===o&&!l.trim()){const e=a(t+1);if(e){({cell:l}=e),t=e.next-1;continue}}l+=o}else l=n(l),"\r"===l[l.length-1]&&(l=l.slice(0,-1)),i.push(l),r=Math.max(r,i.length),i=[],s.push(i),l="";else i.push(n(l)),l=""}return i.push(n(l)),r=Math.max(r,i.length),{values:s,colCount:r};function a(t){let n="",r=t;for(;r<o;){const t=e[r];if('"'!==t){n+=t,r++;continue}if('"'===e[r+1]){n+='"',r+=2;continue}let i=r+1;for(;i<o;){const t=e[i];if(t.trim())return null;if("\t"===t||"\n"===t)break;i++}return{cell:n,next:i}}return null}}(o,t);return{colCount:i,rowCount:r.length,getCellValue(e,t){var o,n;return null!==(n=null===(o=r[t])||void 0===o?void 0:o[e])&&void 0!==n?n:""}}}},function(e,t,o){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,o,n){void 0===n&&(n=o);var r=Object.getOwnPropertyDescriptor(t,o);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[o]}}),Object.defineProperty(e,n,r)}:function(e,t,o,n){void 0===n&&(n=o),e[n]=t[o]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&n(t,e,o);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.DataSource=void 0;const s=i(o(68)),l=o(0),a=o(20);function c(e){return!!(l.obj.isObject(e)&&e.get&&e.set)}const u={UPDATE_LENGTH:"update_length",UPDATED_LENGTH:"updated_length",UPDATED_ORDER:"updated_order"};function h(e,t){return e===t?0:null==e?null==t?0:-1:null==t||e>t?1:-1}function d(e,t){return-1*h(e,t)}function f(e,t){const o=(0,l.getOrApply)(e);if((0,l.isPromise)(o)){const e=o.then(e=>(t(e),e));return t(e),e}return o}function g(e,t,o){if(null==e)return!1;const n=c(t)?t.set:t;if(n in e)e[n]=o;else{if("function"==typeof n)return n(e,o);if("string"==typeof n){const t=(""+n).split(".");let r=e;const{length:i}=t;for(let e=0;e<i;e++){const n=t[e];e===i-1?r[n]=o:r=r[n]||(r[n]={})}}else e[n]=o}return!0}function p(e,t){if(!e)return t;const o=e[t];return null!=o?o:t}class _ extends a.EventTarget{static get EVENT_TYPE(){return u}static ofArray(e){return new _({get:t=>e[t],length:e.length,source:e})}constructor(e){var t;super(),this._sortedIndexMap=null,this._get=(null==e?void 0:e.get.bind(e))||void 0,this._length=(null==e?void 0:e.length)||0,this._source=null!==(t=null==e?void 0:e.source)&&void 0!==t?t:e}get source(){return this._source}get(e){return this.getOriginal(p(this._sortedIndexMap,e))}getField(e,t){return this.getOriginalField(p(this._sortedIndexMap,e),t)}hasField(e,t){return this.hasOriginalField(p(this._sortedIndexMap,e),t)}setField(e,t,o){return this.setOriginalField(p(this._sortedIndexMap,e),t,o)}sort(e,t){const o=new Array(this._length),n="desc"!==t?h:d;return s.sortPromise(e=>null!=o[e]?o[e]:o[e]=e,(e,t)=>{o[e]=t},this._length,n,t=>this.getOriginalField(t,e)).then(()=>{this._sortedIndexMap=o,this.fireListeners(u.UPDATED_ORDER)})}get length(){return this._length}set length(e){if(this._length===e)return;const t=this.fireListeners(u.UPDATE_LENGTH,e);l.array.findIndex(t,e=>!e)>=0||(this._length=e,this.fireListeners(u.UPDATED_LENGTH,this._length))}get dataSource(){return this}dispose(){super.dispose()}getOriginal(e){return f(this._get(e),t=>{this.recordPromiseCallBackInternal(e,t)})}getOriginalField(e,t){if(null!=t)return function e(t,o,n){if(null==t)return;if((0,l.isPromise)(t))return t.then(t=>e(t,o,n));const r=c(o)?o.get:o;if(r in t)return f(t[r],n);if("function"==typeof r)return f(r(t),n);const i=String(r).split(".");return i.length<=1?f(t[r],n):f((0,l.applyChainSafe)(t,(t,o)=>e(t,o,l.emptyFn),...i),n)}(this.getOriginal(e),t,o=>{this.fieldPromiseCallBackInternal(e,t,o)})}hasOriginalField(e,t){if(null==t)return!1;if("function"==typeof t)return!0;const o=this.getOriginal(e);return Boolean(o&&t in o)}setOriginalField(e,t,o){if(null==t)return!1;const n=this.getOriginal(e);return(0,l.isPromise)(n)?n.then(e=>g(e,t,o)):g(n,t,o)}fieldPromiseCallBackInternal(e,t,o){}recordPromiseCallBackInternal(e,t){}}t.DataSource=_,_.EMPTY=new _({get(){},length:0})},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ofCell=t.of=t.CheckHeaderAction=t.SortHeaderAction=t.BaseAction=t.ACTIONS=void 0;const n=o(34);Object.defineProperty(t,"BaseAction",{enumerable:!0,get:function(){return n.BaseAction}});const r=o(129);Object.defineProperty(t,"CheckHeaderAction",{enumerable:!0,get:function(){return r.CheckHeaderAction}});const i=o(130);Object.defineProperty(t,"SortHeaderAction",{enumerable:!0,get:function(){return i.SortHeaderAction}});class s extends i.SortHeaderAction{get disabled(){return this._disabled}}class l extends r.CheckHeaderAction{get disabled(){return this._disabled}}function a(e){if(e){if("string"==typeof e){const o=e.toUpperCase();return t.ACTIONS[o]||a(null)}return e}}t.ACTIONS={SORT:new s,CHECK:new l},t.of=a,t.ofCell=function(e){if(e.sort){if("function"==typeof e.sort){const t=e.sort;return new s({sort:({order:o,col:n,grid:r})=>t.call(e,o,n,r)})}return"string"==typeof e.sort?new s({sort:e.sort}):t.ACTIONS.SORT}return a(e.headerAction)}},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseAction=void 0;class n{constructor(e={}){this._disabled=!!e.disabled||!1}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this.onChangeDisabledInternal()}clone(){return new n(this)}bindGridEvent(e,t){return[]}onChangeDisabledInternal(){}}t.BaseAction=n},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.of=t.MultilineTextHeaderStyle=t.CheckHeaderStyle=t.SortHeaderStyle=t.Style=t.BaseStyle=void 0;const n=o(36);Object.defineProperty(t,"BaseStyle",{enumerable:!0,get:function(){return n.BaseStyle}});const r=o(70);Object.defineProperty(t,"CheckHeaderStyle",{enumerable:!0,get:function(){return r.CheckHeaderStyle}});const i=o(72);Object.defineProperty(t,"MultilineTextHeaderStyle",{enumerable:!0,get:function(){return i.MultilineTextHeaderStyle}});const s=o(73);Object.defineProperty(t,"SortHeaderStyle",{enumerable:!0,get:function(){return s.SortHeaderStyle}});const l=o(74);Object.defineProperty(t,"Style",{enumerable:!0,get:function(){return l.Style}}),t.of=function e(t,o){return t?t instanceof l.Style?t:"function"==typeof t?e(t(),o):new o(t):o.DEFAULT}},function(e,t,o){"use strict