/** * RealGrid v2.9.6.2005 * Copyright (C) 2013-2025 WooriTech Inc. * All Rights Reserved. */ var RealGrid=function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var i=function t(){if(this instanceof t){var i=[null];return i.push.apply(i,arguments),new(Function.bind.apply(e,i))}return e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(i,e,o.get?o:{enumerable:!0,get:function(){return t[e]}})})),i}var i={},o=function(t,e){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},o(t,e)};var n=function(){return n=Object.assign||function(t){for(var e,i=1,o=arguments.length;i=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var o,n,r=i.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(t){n={error:t}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}return s}function l(t){return this instanceof l?(this.v=t,this):new l(t)}var h=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};var u=Object.freeze({__proto__:null,get __assign(){return n},__asyncDelegator:function(t){var e,i;return e={},o("next"),o("throw",(function(t){throw t})),o("return"),e[Symbol.iterator]=function(){return this},e;function o(o,n){e[o]=t[o]?function(e){return(i=!i)?{value:l(t[o](e)),done:"return"===o}:n?n(e):e}:n}},__asyncGenerator:function(t,e,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o,n=i.apply(t,e||[]),r=[];return o={},s("next"),s("throw"),s("return"),o[Symbol.asyncIterator]=function(){return this},o;function s(t){n[t]&&(o[t]=function(e){return new Promise((function(i,o){r.push([t,e,i,o])>1||a(t,e)}))})}function a(t,e){try{(i=n[t](e)).value instanceof l?Promise.resolve(i.value.v).then(h,u):d(r[0][2],i)}catch(t){d(r[0][3],t)}var i}function h(t){a("next",t)}function u(t){a("throw",t)}function d(t,e){t(e),r.shift(),r.length&&a(r[0][0],r[0][1])}},__asyncValues:function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,i=t[Symbol.asyncIterator];return i?i.call(t):(t=s(t),e={},o("next"),o("throw"),o("return"),e[Symbol.asyncIterator]=function(){return this},e);function o(i){e[i]=t[i]&&function(e){return new Promise((function(o,n){(function(t,e,i,o){Promise.resolve(o).then((function(e){t({value:e,done:i})}),e)})(o,n,(e=t[i](e)).done,e.value)}))}}},__await:l,__awaiter:function(t,e,i,o){return new(i||(i=Promise))((function(n,r){function s(t){try{l(o.next(t))}catch(t){r(t)}}function a(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?n(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}l((o=o.apply(t,e||[])).next())}))},__classPrivateFieldGet:function(t,e,i,o){if("a"===i&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?o:"a"===i?o.call(t):o?o.value:e.get(t)},__classPrivateFieldIn:function(t,e){if(null===e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?e===t:t.has(e)},__classPrivateFieldSet:function(t,e,i,o,n){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?n.call(t,i):n?n.value=i:e.set(t,i),i},__createBinding:r,__decorate:function(t,e,i,o){var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s},__exportStar:function(t,e){for(var i in t)"default"===i||Object.prototype.hasOwnProperty.call(e,i)||r(e,t,i)},__extends:function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)},__generator:function(t,e){var i,o,n,r,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(a){return function(l){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;r&&(r=0,a[0]&&(s=0)),s;)try{if(i=1,o&&(n=2&a[0]?o.return:a[0]?o.throw||((n=o.return)&&n.call(o),0):o.next)&&!(n=n.call(o,a[1])).done)return n;switch(o=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,o=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(n=s.trys,(n=n.length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]=0,a=r.indexOf("WIN")>=0,l=!!i.chrome,h=void 0!==i.InstallTrigger,u=!!i.safari||!l&&n.indexOf("Safari")>=0,d=/iPad|iPhone|iPod/.test(n)&&!i.MSStream,c=!!n.match(/Trident.*rv\:11\./),p=-1!==n.indexOf("MSIE 10"),_=-1!==n.indexOf("MSIE 9"),f=c||p||_,g=Date.now(),m=void 0,y=void 0,v=void 0,C=void 0,w=void 0;function I(t){return t&&t.ownerDocument&&(t.ownerDocument.defaultView||t.ownerDocument.parentWindow)}function S(t){return t&&t.ownerDocument}function R(t){return t.defaultView||t.parentWindow}b.getWin=I,b.getDoc=S,b.getDocWin=R;var T=function(){function t(){}return t.stopEvent=function(t,e){void 0===e&&(e=!1),t.preventDefault?(t.preventDefault(),t.stopPropagation()):t.returnValue=!1,e&&t.stopImmediatePropagation()},t.setDebugging=function(e,i,o){t.$$_debugging=i,t.$$_keyLog=o},t.isDebugging=function(){return t.$$_debugging},t.setSlotMode=function(e){t.$$_slotMode=e},t.setLanguage=function(e){t.$$_lang=e},Object.defineProperty(t,"language",{get:function(){return this.$$_lang}}),t.isSlotMode=function(){return t.$$_slotMode},t.log=function(e){for(var i=[],o=1;o=0:n==r)},t.cast=function(t,e){return t instanceof e?t:null},t.toInt=function(t,e){var i=parseInt(t,e||10);return isNaN(i)?0:i},t.toFloat=function(t){var e=parseFloat(t);return isNaN(e)?0:e},t.hex=function(t,e,i){void 0===e&&(e=2),void 0===i&&(i="0"),e=Math.max(e||2,1);var o=t.toString(16);return i=i||"0",new Array(e-o.length+1).join(i)+o},t.deepCopy=function(e){if(null==e||"object"!=typeof e)return e;if(e instanceof Date)return new Date(e);for(var i=t.isArray(e)?[]:{},o=0,n=Object.keys(e);o=0),t},t.getBrowserSize=function(e){var i=e?e.ownerDocument:document,o=i.defaultView,n=i.body,r=i.documentElement,s=t.getZoom(n);return{width:o.innerWidth/s||r.clientWidth||n.clientWidth,height:o.innerHeight/s||r.clientHeight||n.clientHeight}},t.move=function(t,e,i){t.style.left=e+"px",t.style.top=i+"px"},t.htmlEncode=function(t){return document.createElement("a").appendChild(document.createTextNode(t)).parentNode.innerHTML},t.detach=function(t){var e=t&&t.parentElement;if(e)try{e.contains(t)&&e.removeChild(t)}catch(t){}return null},t.getSize=function(e){return t.getClientRect(e)},t.getScrolled=function(t){var e=t.body,i=R(t),o=t.documentElement;return{sx:i.pageXOffset||o.scrollLeft||e.scrollLeft,sy:i.pageYOffset||o.scrollTop||e.scrollTop}},t.getOffset=function(e){var i=t.getZoom(e),o=e.ownerDocument,n=o.defaultView,r=t.getClientRect(e),s=o.body,a=o.documentElement,l=n.pageYOffset||a.scrollTop||s.scrollTop,h=n.pageXOffset||a.scrollLeft||s.scrollLeft;1==i&&i!=t.$$_zoom?(l/=t.$$_zoom,h/=t.$$_zoom):(l/=i,h/=i);var u=a.clientTop||s.clientTop||0,d=a.clientLeft||s.clientLeft||0,c=r.left+h-d,p=r.top+l-u;return{x:Math.round(c),y:Math.round(p)}},t.isAncestorOf=function(t,e,i){var o;if(e instanceof HTMLElement)o=e;else for(var n=this.getComposedPath(i);n.length;){var r=n.shift();if(r instanceof HTMLElement){o=r;break}}for(;o;){if(o==t)return!0;o=o.parentElement}return!1},t.getComposedPath=function(t){if(t.composedPath)return t.composedPath();for(var e=t.target,i=[];e;)i.push(e),e=e.parentElement||e.parentNode;return i},t.equalNumbers=function(t,e){return isNaN(t)&&isNaN(e)||!isNaN(t)&&t==e},t.equalArrays=function(t,e){if(t===e)return!0;if(null==t||null==e)return!1;var i=t.length;if(i!=e.length)return!1;for(var o=0;o=0&&o.splice(i,1),t.className=o.join(" ")}},t.setStyle=function(t,e){var i=e.style;for(var o in t)null!=t[o]?i[o]=t[o]:(i.removeProperty?i.removeProperty(o):i.removeAttribute&&i.removeAttribute(o),i[o]="")},t.getTextLength=function(t){for(var e=0,i=0,o=0;t&&(i=t.charCodeAt(o));o++)e+=i>>7?2:1;return e},t.escapeRegExp=function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},t.isEmpty=function(t){return t&&Object.keys(t).length>0},t.isPassive=function(){if(null===t.$_supportPassive){t.$_supportPassive=!1;try{addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){t.$_supportPassive=!0}}))}catch(e){t.log("passive not support")}}return t.$_supportPassive},t.hangulToChosungAll=function(e){for(var i="",o=0;o-1&&n<11172?t.cho[Math.floor(n/588)]:e[o]}return i},t.hangulToChosung=function(e){var i={cho:e,org:e};if(/[ㄱ-힝]/.test(e)){var o=t.cho,n=e.charCodeAt(0);n>=12593&&n<=12622&&(i.org=void 0),(n-=44032)>=0&&n<11172&&(i.cho=o[Math.floor(n/588)])}return i},t.addQuot=function(t,e){return t&&(t.indexOf("\n")>=0||t.indexOf("\r\n")>=0||'"'==t.charAt(0))&&(t='"'+(t=t.replace(/\"/g,'""'))+'"'),t},t.addQuatation=function(t,e,i,o){return null!=t&&((i||o)&&(i&&t&&(t=t.replace(/\n/g,i)),o&&t&&(t=t.replace(/\r/g,o))),(e||t.indexOf("\n")>=0||t.indexOf(",")>=0||t.indexOf('"')>=0)&&(t='"'+t.replace(/\"/g,'""')+'"')),null===t?"":t},t.isClickableTemplate=function(t,e){return Array.prototype.some.call(t.querySelectorAll("input, textarea, a, select, button, [tabindex]"),(function(t){return e===t}))},t.isFocusableTemplate=function(t,e){return Array.prototype.some.call(t.querySelectorAll("input, textarea, select"),(function(t){var i=t.type;return t===e&&"button"!==i&&"checkbox"!==i}))},t.objectToCssText=function(t){return"string"==typeof t?t:t?Object.keys(t).map((function(e){return"".concat(e.split(/(?=[A-Z])/).join("-").toLowerCase(),":").concat(t[e])})).join(";"):null},t.getLast=function(t){return t[t.length-1]},t.camelToHyphen=function(t,e,i){return void 0===i&&(i="-"),t?e?t.split(/(?=[A-Z])/).join(i).toUpperCase():t.split(/(?=[A-Z])/).join(i).toLowerCase():t},t.find=function(t,e){for(var i=0;ih.documentElement.clientWidth&&(g-=18),h.documentElement.scrollHeight>h.documentElement.clientHeight&&(f-=18);var C=t.getMargin(e);n+=C.x,r+=C.y,n+=p.left-c.left,r+=p.top-c.top,(t.ieTen||t.ieOld)&&(n+=h.documentElement.scrollLeft,r+=h.documentElement.scrollTop),r+m.height>g+v&&a&&(r=r-a.height-m.height)<0&&(r=g-m.height-2),t.isMobile()&&!t.isTablet()||!a||(c.bottomf+y&&(n=f-m.width),t.isMobile()&&!t.isTablet()||o.offsetParent||(n+=h.documentElement.offsetLeft,r+=h.documentElement.offsetTop),t.move(o,Math.max(0,n),Math.max(0,r))},t.setEvent=function(t,e){Object.keys(e).forEach((function(i){0===i.indexOf("on")&&(t[i]=e[i])}))},t.assignConfig=function(t,e){e.columns&&t.setColumns(e.columns),e.layout&&t.setColumnLayout(e.layout),e.rowStyleCallback&&t.setRowStyleCallback(e.rowStyleCallback),e.cellStyleCallback&&t.setCellStyleCallback(e.cellStyleCallback),e.contextMenu&&t.setContextMenu(e.contextMenu)},t.snapshotStyle=function(t){for(var e={},i=0,o=["border-left","border-right","border-top","border-bottom","font-family","font-size","font-weight","font-style","text-decoration-line","text-decoration-style","color","background-image","background-color","text-align","vertical-align","white-space-collapse","white-space","text-wrap","text-wrap-mode"];i>2,s=(3&i)<<4|(o=e.charCodeAt(u++))>>4,a=(15&o)<<2|(n=e.charCodeAt(u++))>>6,l=63&n,isNaN(o)?a=l=64:isNaN(n)&&(l=64),h=h+d.charAt(r)+d.charAt(s)+d.charAt(a)+d.charAt(l);return h},t.decode=function(e){var i,o,n,r,s,a,l="",h=0,u=t.CHARACTERS;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");h>4,o=(15&r)<<4|(s=u.indexOf(e.charAt(h++)))>>2,n=(3&s)<<6|(a=u.indexOf(e.charAt(h++))),l+=String.fromCharCode(i),64!=s&&(l+=String.fromCharCode(o)),64!=a&&(l+=String.fromCharCode(n));return l=t.utf8_decode(l)},t.utf8_encode=function(t){t=t.replace(/\r\n/g,"\n");for(var e="",i=0;i127&&o<2048?(e+=String.fromCharCode(o>>6|192),e+=String.fromCharCode(63&o|128)):(e+=String.fromCharCode(o>>12|224),e+=String.fromCharCode(o>>6&63|128),e+=String.fromCharCode(63&o|128))}return e},t.utf8_decode=function(t){for(var e="",i=0,o=0,n=0,r=0,s=t.length;i191&&o<224?(n=t.charCodeAt(i+1),e+=String.fromCharCode((31&o)<<6|63&n),i+=2):(n=t.charCodeAt(i+1),r=t.charCodeAt(i+2),e+=String.fromCharCode((15&o)<<12|(63&n)<<6|63&r),i+=3);return e},t.CHARACTERS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",t.btoa=function(e){for(var i,o,n,r,s=t.CHARACTERS,a="",l=0,h=(e=String(e)).length%3;l255||(n=e.charCodeAt(l++))>255||(r=e.charCodeAt(l++))>255)throw new TypeError("Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.");i=o<<16|n<<8|r,a+=s.charAt(i>>18&63)+s.charAt(i>>12&63)+s.charAt(i>>6&63)+s.charAt(63&i)}return h?a.slice(0,h-3)+"===".substring(h):a},t}();return b.Base64=D,b}var R,T={};function D(){return R||(R=1,function(t){var e;Object.defineProperty(t,"__esModule",{value:!0}),t.isDeletedState=t.RowState=void 0,function(t){t.NONE="none",t.CREATED="created",t.UPDATED="updated",t.DELETED="deleted",t.CREATE_AND_DELETED="createAndDeleted"}(e=t.RowState||(t.RowState={}));t.isDeletedState=function(t){return t==e.DELETED||t==e.CREATE_AND_DELETED}}(T)),T}var k,M={},O={},F={},L={};function P(){if(k)return L;k=1,Object.defineProperty(L,"__esModule",{value:!0}),L.BooleanConverter=void 0;var t=function(){function t(t){this.format=t}return _dp(t,"format",{get:function(){return this._format},set:function(t){t!=this._format&&(this._format=t,this.parse(t))}}),t.prototype.toBool=function(t){return!!this.toBoolStrict(t)},t.prototype.toBoolEx=function(t){var e=this._sensitive?t:t.toLowerCase(),i=this.$_toBool(t);return null!=i?i:e?Boolean(e):void 0},t.prototype.toBoolStrict=function(t){return this.$_toBool(t)},t.prototype.toText=function(t){return t?this._trueText:this._falseText},t.prototype.$_toBool=function(t){if(this._values){var e=this._sensitive?t:t.toLowerCase();if(e in this._values)return this._values[e]}},t.prototype.parse=function(t){var e=this;if(this._values={},t){this._trueText=this._falseText=null;var i=t.split(/[;\:]/),o=this._sensitive="0"!=i[2],n=i[0]?o?i[0].split(","):i[0].toLowerCase().split(","):null,r=i[1]?o?i[1].split(","):i[1].toLowerCase().split(","):null;n&&n.forEach((function(t){e._values[t]=!1,e._falseText=e._falseText||t})),r&&r.forEach((function(t){e._values[t]=!0,e._trueText=e._trueText||t}))}else this._values[this._trueText="true"]=!0,this._values[this._falseText="false"]=!1},t.Default=new t("false,f,0:true,t,1:0"),t}();return L.BooleanConverter=t,L}var B,V,A={},N={};function $(){if(V)return A;V=1,Object.defineProperty(A,"__esModule",{value:!0}),A.DateTimeReader=void 0;var t=function(){if(B)return N;B=1,Object.defineProperty(N,"__esModule",{value:!0}),N.DateTimeParser=void 0;var t=S(),e=function(){function e(t){this._format=null,this._baseYear=2e3,this._patterns=[],this._amText="AM",this._pmText="PM",this._matchPattern=!1,t&&(this.format=t)}return _dp(e,"format",{get:function(){return this._format},set:function(t){if(t!=this._format){if(!t)throw new Error("Invalid empty date format");this._format=t,this.parseFormat(t)}}}),_dp(e,"baseYear",{get:function(){return this._baseYear},set:function(t){t!=this._baseYear&&(this._baseYear=t)}}),_dp(e,"amText",{get:function(){return this._amText},set:function(t){t!=this._amText&&(this._amText=t)}}),_dp(e,"pmText",{get:function(){return this._pmText},set:function(t){t!=this._pmText&&(this._pmText=t)}}),e.prototype.parse=function(t,i){try{for(var o=0,n=1,r=1,s=0,a=0,l=0,h=0,u=0,d=0,c=this._patterns.length,p=0,_=t.length,f=this._matchPattern,g=this.getStrPattern(t),m=0;m0?12==s&&(s=0):d>0&&s<12&&(s+=12);var w=new Date(o,n-1,r,s,a,l,h);return w.getFullYear()===o&&w.getMonth()===n-1&&w.getDate()===r?w:null}catch(t){if(i)throw t;return null}},e.prototype.parseFormat=function(e){var i=this,o=0,n=function(t){t&&!isNaN(parseInt(t))&&(i._baseYear=parseInt(t))},r=function(t){if(t){var e=t.split(",");e.length>0&&e[0]&&(i._amText=e[0]||i._amText),e.length>1&&e[1]&&(i._pmText=e[1]||i._pmText)}},s=e.split(";");if(s.length>2)n(s[1]),r(s[2]);else if(s.length>1){var a=s[1];isNaN(parseInt(a))?a&&r(a):n(a)}var l,h,u,d=s[0],c=d.length,p=0;for(this._patterns=[];p0&&(this._patterns.push({c:h,p:p,len:u}),p+=u)}this._matchPattern=2*o+1===this._patterns.length},e.prototype.throwInvalidFormat=function(t){throw new Error("Invalid date format: "+t)},e.prototype.throwInvalidValue=function(t){throw new Error("Invalid date format: "+t)},e.prototype.getPattern=function(t,e,i){for(var o=1;++eo;){var s=e[o];if(/-|\.|\/|:| /.test(s))if(r.push(e.substr(n,o-n)),r.push(s),t.Utils.isWhiteSpace(s)){for(;t.Utils.isWhiteSpace(e[++o])&&i>o;);n=o}else n=o+1;o++}return r.push(e.substr(n,o-n)),r},e.DATE_SEPARATORS="./-: ",e}();return N.DateTimeParser=e,N}(),e=function(){function e(e){this._format="",this._type=0,this._parser=new t.DateTimeParser(null),this.format=e}return e.initialize=function(){e.Default.amText="AM",e.Default.pmText="PM",e.Default.baseYear=2e3},e.getReader=function(t){var i=e.Formatters[t];return i||(e.Formatters[t]=i=new e(t)),i},e.getSimpleDateNull=function(t){if(t instanceof Date)return t;if("number"==typeof t)return new Date(t);if("string"!=typeof t)return null;var e=(t=8===t.length&&/^[0-9]*$/.test(t)?t.replace(/(\d{4})(\d{2})(\d{2})/,"$1/$2/$3"):t).split(/[.//-]/);if(3!=e.length)return null;var i=parseInt(e[0]),o=parseInt(e[1])-1,n=parseInt(e[2]);return i==(t=new Date(i,o,n)).getFullYear()&&o==t.getMonth()&&n==t.getDate()?t:null},_dp(e,"format",{get:function(){return this._format},set:function(t){t!=this._format&&(this._format=t,this.parse(t))}}),_dp(e,"amText",{get:function(){return this._parser.amText},set:function(t){this._parser.amText=t}}),_dp(e,"pmText",{get:function(){return this._parser.pmText},set:function(t){this._parser.pmText=t}}),_dp(e,"baseYear",{get:function(){return this._parser.baseYear},set:function(t){this._parser.baseYear=t}}),e.prototype.toDate=function(t,e){if(!t)return null;var i=null;switch(this._type){case 0:i=this._parser.parse(t,e);break;case 2:var o=parseInt(t);i=new Date(o);break;default:i=new Date(t)}return i&&!isNaN(i.getTime())?i:null},e.prototype.parse=function(t){if(t){if(t.indexOf("T")>0||t.indexOf("Z")>0||/([+\-])(\d\d)?(:)?(\d\d)?$/.test(t))this._type=e.Formats.indexOf("iso");else{var i=t.toLowerCase();this._type=Math.max(0,e.Formats.indexOf(i))}0==this._type&&(this._parser.format=t)}},e.Formats=["custom","iso","timestamp","platform"],e.Default=new e("yyyy/MM/dd HH:mm:ss"),e.Formatters={},e}();return A.DateTimeReader=e,e.initialize(),A}var U,H={};function G(){if(U)return H;U=1,Object.defineProperty(H,"__esModule",{value:!0}),H.Base=void 0;var t=0,e=function(){function e(e){this.$_disposed=!1,e||(this.$_hash=t++)}return e.prototype.dispose=function(){return this.$_disposed||this.$_disposing||(this.$_disposed=!0,this.$_disposing=!0,this._doDispose()),null},e.prototype._doDispose=function(){},_dp(e,"disposing",{get:function(){return this.$_disposing}}),e.prototype.isMe=function(t){return t==this.$_hash},e.prototype.$_getters=function(t){for(var e=[],i=Object.getOwnPropertyNames(t),o=0,n=i.length;o="0".charCodeAt(0)&&t<="9".charCodeAt(0)||t>="a".charCodeAt(0)&&t<="z".charCodeAt(0)||t>="A".charCodeAt(0)&&t<="Z".charCodeAt(0),this.IS_INTEGER[t]=t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)||t>="a".charCodeAt(0)&&t<="f".charCodeAt(0)||t>="A".charCodeAt(0)&&t<="F".charCodeAt(0),this.IS_NUMBER[t]=t>="0".charCodeAt(0)&&t<="9".charCodeAt(0)||t==".".charCodeAt(0)||t=="e".charCodeAt(0)||t=="E".charCodeAt(0),this.IS_WHITE[t]=t>=1&&t<=9||11==t||t>=14&&t<=32,this.IS_END[t]=0==t;this.initProcs()}return t.prototype.clear=function(){this._source=null},t.prototype.next=function(){var t=this._source.charCodeAt(this._run);this._tokenPos=this._run,t<256?this._procs[t].call(this):this.identProc()},t.prototype.unkownProc=function(){this._tokenId=0,this._run++},t.prototype.symbolProc=function(){this._tokenId=80,this._run++},t.prototype.commaProc=function(){this._tokenId=32,this._run++},t.prototype.crProc=function(){this._tokenId=33,10==this._source.charCodeAt(this._run+1)?this._run+=2:this._run++,this._lineNo++,this._linePos=this._run},t.prototype.lfProc=function(){this._tokenId=33,this._run++,this._lineNo++,this._linePos=this._run},t.prototype.equalProc=function(){this._tokenId=40,"="==this._source.charAt(++this._run)&&"="==this._source.charAt(++this._run)&&this._run++},t.prototype.notProc=function(){this._tokenId=13,"="==this._source.charAt(++this._run)&&(this._tokenId=45,"="==this._source.charAt(++this._run)&&this._run++)},t.prototype.greaterProc=function(){"="==this._source.charAt(this._run+1)?(this._tokenId=42,this._run+=2):(this._tokenId=41,this._run++)},t.prototype.lowerProc=function(){"="==this._source.charAt(this._run+1)?(this._tokenId=44,this._run+=2):">"==this._source.charAt(this._run+1)?(this._tokenId=45,this._run+=2):(this._tokenId=43,this._run++)},t.prototype.nextIdent=function(){for(var t=this._run;te?(this._nextRun=t,this._source.substr(e,t-e).toLowerCase()):null},t.prototype.identProc=function(){for(var t=this._run;this._run255);)this._run++;var e=this._source.substr(t,this._run-t).toLowerCase();if(this.Keywords.hasOwnProperty(e))switch(this._tokenId=this.Keywords[e],this._tokenId){case 13:if(e=this.nextIdent())switch(e){case"like":this._tokenId=47,this._run=this._nextRun;break;case"ilike":this._tokenId=49,this._run=this._nextRun;break;case"match":this._tokenId=51,this._run=this._nextRun;break;case"imatch":this._tokenId=53,this._run=this._nextRun;break;case"likehan":this._tokenId=56,this._run=this._nextRun;break;case"ilikehan":this._tokenId=57,this._run=this._nextRun}break;case 26:"not"==(e=this.nextIdent())&&(this._tokenId=27,this._run=this._nextRun)}else this._tokenId=10},t.prototype.integerProc=function(){for(this._tokenId=64,this._run++;this._run".charCodeAt(0)]=this.greaterProc,this._procs["[".charCodeAt(0)]=this.bracketOpenProc,this._procs["]".charCodeAt(0)]=this.bracketCloseProc,this._procs["!".charCodeAt(0)]=this.notProc},_dp(t,"tokenId",{get:function(){return this._tokenId}}),_dp(t,"tokenLoc",{get:function(){return{x:this._tokenPos-this._linePos,y:this._lineNo}}}),_dp(t,"tokenLen",{get:function(){return this._run-this._tokenPos}}),_dp(t,"token",{get:function(){return this._source.substr(this._tokenPos,this.tokenLen)}}),_dp(t,"isSpace",{get:function(){return 71==this._tokenId}}),t.prototype.init=function(t){this._source=t,this._len=t.length,this._lineNo=0,this._linePos=0,this._tokenPos=0,this._runAhead=this._run=0,this._tokenId=0},t.prototype.charAhread=function(){for(this._runAhead=this._run;this._runAhead0&&this._source.charCodeAt(this._runAhead)<=32;)this._runAhead++;return this._source.charCodeAt(this._runAhead)},t.prototype.nextId=function(t){do{this.next()}while(this._run0&&this.IS_WHITE[this._source.charCodeAt(e)];)e--;return 0==e||(10==(t=this._source.charCodeAt(e))||13==t)},t}(),c=function(e){function i(){return e.call(this)||this}return t.__extends(i,e),i.prototype.isIdentifier=function(t){throw new Error("Token is not a valid Identifier: "+t)},i.prototype.evaluateIdentifier=function(t){throw new Error("Invalid identifier key: "+t)},i.prototype.evaluateIndexerI=function(t,e){throw new Error("Invalid identifier indexer: "+t)},i.prototype.evaluateIndexerS=function(t,e,i){throw new Error("Invalid identifier indexer: "+t)},i}(e.Base);z.ExpressionRuntime=c;var p=function(){function t(){}return _dp(t,"value",{get:function(){}}),_dp(t,"asLiteral",{get:function(){return null}}),t.prototype.prepareValue=function(){},t.prototype.getLiteral=function(){},t.prototype.isIdentifier=function(t){return!1},t.prototype.toString=function(){return String(this)},t}();z.ExpressionNode=p;var _=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(i,e),i}(p);!function(e){function i(){return e.call(this)||this}t.__extends(i,e),i.prototype.evaluate=function(t){},i.prototype.toString=function(){return""},i.Default=new i}(p);var f=function(e){function o(){var t=e.call(this)||this;return t._operator=0,t}return t.__extends(o,e),o.prototype.evaluate=function(t){if(this._literal)return this._literal.value;if(!this._rightExpr)return this._leftExpr.evaluate(t);var e=this._leftExpr.evaluate(t),i=this._rightExpr.evaluate(t);switch(this._operator){case 40:return e==i;case 45:return e!=i;case 41:return e>i;case 42:return e>=i;case 43:return e1){var s="%"==n.charAt(0),a="%"==n.charAt(r-1);if(s&&a)return n=n.substr(1,r-2),o.indexOf(n,0)>=0;if(s){n=n.substr(1,r-1);var l=o.lastIndexOf(n);return l>=0&&l==o.length-n.length}return a?(n=n.substr(0,r-1),0==o.indexOf(n,0)):o==n}return"%"!=n&&o==n}return!1},o.prototype.calcLikeHan=function(t,e,o){if(t&&e){t=String(t);var n=(e=String(e)).length,r="%"==e.charAt(0),s="%"==e.charAt(n-1);if(e=r&&s?e.substr(1,n-2):r?e.substr(1,n-1):s?e.substr(0,n-1):e,t.length=0;){for(var d=0;d=0&&h===a.length-l.length){for(d=0;d>=n}}return i},i.prototype.toString=function(){var t="";if(this._literal)t=this._literal.toString();else if(1==this._factors.length)t=this._factors[0].toString();else{t="("+this._factors[0].toString();for(var e=1;e=0)}return new E(t)},t.prototype.doNumber=function(){var t=this._lexer.token;return this.nextToken(),new x(t)},t.prototype.doInteger=function(){var t=this._lexer.token;return this.nextToken(),new b(t)},t.prototype.doMinus=function(){return this.nextToken(),new M(this.doFactor())},t.prototype.doPlus=function(){return this.nextToken(),new O(this.doFactor())},t.prototype.doNot=function(){return this.nextToken(),new F(this.doFactor())},t.prototype.doDefined=function(){return this.nextToken(),new m},t.prototype.doNull=function(){return this.nextToken(),new v},t.prototype.doEmpty=function(){return this.nextToken(),new y},t.prototype.doNaN=function(){return this.nextToken(),new C},t.prototype.doToBool=function(){return this.nextToken(),new L(this.doFactor())},t.prototype.doToNumber=function(){return this.nextToken(),new P(this.doFactor())},t.prototype.doToString=function(){return this.nextToken(),new B(this.doFactor())},t.prototype.doLength=function(){return this.nextToken(),new D(this.doFactor())},t.prototype.doTrim=function(){return this.nextToken(),new k(this.doFactor())},t.prototype.doToDateString=function(){return this.nextToken(),new V(this.doFactor())},t.prototype.doToYear=function(){return this.nextToken(),new A(this.doFactor())},t.prototype.doToMonth=function(){return this.nextToken(),new N(this.doFactor())},t.prototype.doToDay=function(){return this.nextToken(),new $(this.doFactor())},t.prototype.doToHour=function(){return this.nextToken(),new U(this.doFactor())},t.prototype.doRoundDown=function(){return this.nextToken(),new H(this.doFactor())},t.prototype.doTimeStamp=function(){return this.nextToken(),new j(this.doFactor())},t.prototype.parse=function(t,e){if(t){this._capitalIndexers=e||[],this._lexer.init(t),this.nextToken();var i=this.doExpression();return i&&i.prepareValue(),this._lexer.clear(),this._capitalIndexers=null,i}return null},t.prototype.evaluate=function(t,e,i){return this.parse(t,i).evaluate(e)},t.Default=new t,t}();return z.ExpressionParser=X,z}var q,X={};function K(){return q||(q=1,t=X,Object.defineProperty(t,"__esModule",{value:!0}),t.RestoreMode=void 0,function(t){t.NONE="none",t.EXPLICIT="explicit",t.AUTO="auto"}(t.RestoreMode||(t.RestoreMode={}))),X;var t}var Z,J={};var Q,tt={};function et(){if(Q)return tt;Q=1,Object.defineProperty(tt,"__esModule",{value:!0}),tt.EventAware=void 0;var t=d,e=function(e){function i(){var t=e.call(this)||this;return t._listeners=[],t}return t.__extends(i,e),i.prototype._doDispose=function(){return this._listeners=[],e.prototype._doDispose.call(this)},_dp(i,"listenerCount",{get:function(){return this._listeners.length}}),i.prototype.addListener=function(t,e){return null!=t&&this._listeners&&this._listeners.indexOf(t)<0&&(null!=e&&e>=0?this._listeners.splice(e,0,t):this._listeners.push(t)),this},i.prototype.removeListener=function(t){if(!this.disposing&&null!=t&&this._listeners){var e=this._listeners.indexOf(t);e>=0&&this._listeners.splice(e,1)}return this},i.prototype.clearListener=function(){this._listeners.length=0},i.prototype.fireEvent=function(t){var e=Array.prototype.slice.call(arguments,0);e[0]=this;for(var i=0,o=this._listeners.length;i=i?o.substr(0,i):(e=Math.max(o.length,e),("0000"+t.toString()).substr(-e))},f=function(){function f(t){this.format=t}return f.getFormatter=function(t){var e=f.Formatters[t];return e||(f.Formatters[t]=e=new f(t)),e},Object.defineProperty(f,"Default",{get:function(){return f.getFormatter(f.DEFAULT_FORMAT)}}),_dp(f,"format",{get:function(){return this._format},set:function(t){(t=t||f.DEFAULT_FORMAT)!=this._format&&(this._tokens=[],this.parse(t),this._format=t)}}),f.prototype.getText=function(t){if(!this._tokens)return"";var e=this._hasUTC,i=new Date(t);e||null==this._timeOff||(i=new Date(i.getTime()+60*i.getTimezoneOffset()*1e3+this._timeOff));for(var f=this._tokens,g="",m=e?i.getUTCHours():i.getHours(),y=0,v=f.length;y12?m-12:m:m,w);break;case l:g+=_(e?i.getUTCMinutes():i.getMinutes(),w);break;case p:g+=_(e?i.getUTCSeconds():i.getSeconds(),w);break;case n:case o:g+=m<12?this._amText:this._pmText;break;case c:g+=_(e?i.getUTCMilliseconds():i.getMilliseconds(),w,w);break;default:g+=C}}if(!e&&null!=this._timeOff){var x=this._timeOff>=0?"+":"-",b=Math.abs(this._timeOff/6e4);g+=x+"".concat(_(Math.floor(b/60),2),":").concat(_(b%60,2))}return g},f.prototype.parseDateFormatTokens=function(o){var n=[];if(o){var r,s=o.trim(),a=0;if(r=s.match(/([+\-])(\d\d)?(:)?(\d\d)?$/)){var l=r[1];if(null==r[2])this._timeOff=60*-(new Date).getTimezoneOffset()*1e3;else{var h=parseInt(r[2]),u=parseInt(r[4]||"00");this._timeOff=60*(60*h+u)*1e3,"-"===l&&(this._timeOff=-this._timeOff)}s=s.substr(0,r.index)}for(var d=s.length;a=0)n.push(c),a++;else{for(var p=a++;a=0||this._tokens.indexOf("A")>=0,this._hasUTC=this._tokens.indexOf("z")>0||this._tokens.indexOf("Z")>0;var i=void 0;if(e.length>2?i=e[2]:e.length>1&&e[1]&&(i=e[1]),i){var o=i.split(",");o.length>0&&o[0]&&(this._amText=o[0]||this._amText),o.length>1&&o[1]&&(this._pmText=o[1]||this._pmText)}}},f.DEFAULT_FORMAT="yyyy/MM/dd",f.Formatters={},f}();return nt.DateTimeWriter=f,nt}var st,at={};function lt(){if(st)return at;st=1,Object.defineProperty(at,"__esModule",{value:!0}),at.BooleanFormatter=void 0;var t=function(){function t(t){this.$_parse(this._format=t)}return t.getFormatter=function(e){var i=t.Formatters[e];return i||(t.Formatters[e]=i=new t(e)),i},_dp(t,"format",{get:function(){return this._format}}),t.prototype.formatValue=function(t){return void 0===t?this._nullText:t?this._trueText:this._falseText},t.prototype.$_parse=function(t){if(this._falseText=this._trueText=null,t){var e=t.split(/[;\:]/);this._falseText=e[0],e.length>0&&(this._trueText=e[1]),e.length>1&&(this._nullText=e[2])}},t.Formatters={},t}();return at.BooleanFormatter=t,at}var ht,ut,dt,ct={},pt={};function _t(){if(ht)return pt;ht=1,Object.defineProperty(pt,"__esModule",{value:!0}),pt.Locale=pt.Messages=void 0;var t=S(),e=function(){function e(){}return Object.defineProperty(e,"messages",{get:function(){return e.currentMessages?e.currentMessages:this.currentMessages=t.Utils.assign({},e.defaultMessages)}}),e.setMessages=function(i){e.currentMessages=t.Utils.assign({},e.defaultMessages,i)},e.defaultMessages={dateEditorCancelLabel:"Cancel",dateEditorDeleteLabel:"Delete",dateEditorHourLabel:"시",dateEditorMinuteLabel:"분",dateEditorMonths:void 0,dateEditorSaveLabel:"Save",dateEditorSecondLabel:"초",dateEditorTodayLabel:"Today",dateEditorWeekDays:["일","월","화","수","목","금","토"],dateEditorYearDisplayFormat:"{Y}년",dateEditorMonthDisplayFormat:"{M}월",dateEditorYearMonthDisplayFormat:void 0,searchEditorMoreText:"더보기",checkListAcceptText:"Accept",checkListCancelText:"Cancel",checkListAllCheckText:"Check All",filterSelectorAcceptText:"확인",filterSelectorAllCheckText:"(전체 선택)",filterSelectorCancelText:"취소",filterSelectorEmptyFilterText:"(값 없음)",filterSelectorFilterResetText:"초기화",filterSelectorFiltersResetText:"전체 초기화",filterSelectorSearchPlaceholder:"검색...",filterSelectorSearchedCheckText:"(조회 전체 선택)",filterSelectorDateYearFormat:"{YYYY}년도",filterSelectorDateQuarterFormat:"{Q}사분기",filterSelectorDateMonthFormat:"{M}월",filterSelectorDateDayFormat:"YYYY-MM-DD",filterSelectorHourFormat:"{H}시",filterSelectorMinuteFormat:"{M}분",filterSelectorSecondFormat:"{S}초",filterToastMessage:"Filtering...",dataDropProxyLabel:"${rows}행 ${mode}",dataDropModeMove:"이동",dataDropModeCopy:"복사",groupingPrompt:"컬럼 헤더를 이 곳으로 끌어다 놓으면 그 컬럼으로 그룹핑합니다.",groupingToastMessage:"Grouping...",groupResetText:"초기화",displayEmptyMessage:"표시할 데이타가 없습니다.",filterOperatorContains:"포함",filterOperatorNotContains:"포함하지 않음",filterOperatorStartsWith:"시작 문자",filterOperatorEndsWith:"끝 문자",filterOperatorEqual:"같음",filterOperatorNotEqual:"같지 않음",filterOperatorEmpty:"값 없음",filterOperatorReset:"초기화",filterOperatorGreater:"보다 큼",filterOperatorGreaterEqual:"크거나 같음",filterOperatorLower:"보다 작음",filterOperatorLowerEqual:"작거나 같음",filterOperatorBetween:"범위",invalidDatetimeFormat1:"Invalid datetime read format - 'H'와 'a'가 같이 존재할 수 없습니다: ",invalidDatetimeFormat2:"Invalid datetime read format - 'h'가 있으면 'a'가 반드시 있어야 합니다: ",commitEditingMessage:"먼저 편집을 완료 하십시오.",deleteRowsMessage:"선택된 행(들)을 삭제하시겠습니까?",invalidFormatMessage:"잘못된 입력 유형입니다.",decimalSeparator:".",thousandsSeparator:",",sortingToastMessage:"Sorting...",exportProgressMessage:"Exporting...",rowIndicatorHeadText:"No.",rowIndicatorFootText:"Σ",rowIndicatorSumText:"Σ",stateTextCreateAndDeleted:"X",stateTextCreated:"C",stateTextDeleted:"D",stateTextUpdated:"U",rowOutOfBounds:"row is out of bounds: ",fieldIndexOutOfBounds:"fieldIndex is out of bounds: ",fieldNameMustExists:"fieldName must be exists.",fieldNameAlreadyExists:"fieldName is already exists: ",clientEditingError:"Client is editing (call grid.commit() or grid.cancel() first)",gridElementAttachFail:"Grid is already contained ContainerDiv",gridContainerNotFind:"Invalid grid container element: ",multiSelectionCopyFailText:"multi selection copy not supported",multiSelectionPasteFailText:"multi selection paste not supported"},e}();pt.Messages=e;var i=function(){function i(){}return Object.defineProperty(i,"currency",{get:function(){return i._currency}}),Object.defineProperty(i,"locale",{get:function(){return i._locale}}),Object.defineProperty(i,"numberFormats",{get:function(){return i._numberFormats||(i._numberFormats=t.Utils.assign({},i.defNumberFormats())),i._numberFormats}}),i.defNumberFormats=function(){var t=i._currency||"KRW";return{number:{style:"decimal",excelFormat:"#,##0.0"},currency:{style:"currency",currency:t,excelFormat:"KRW"===t?"₩#,##0":void 0},accounting:{style:"currency",currency:t,currencySign:"accounting"}}},i.getNumberFormatter=function(e){var o=i._numberFormats;o||(o=i._numberFormats=t.Utils.assign({},i.defNumberFormats()));var n=o[e];if(n){var r=n.formatter;return r||(r=n.formatter=new Intl.NumberFormat(i._locale||navigator.language,n)),r}},i.addNumberFormat=function(e,o,n){var r=i._numberFormats;if(o&&e)return r||(r=i._numberFormats=t.Utils.assign({},i.defNumberFormats())),r[e]&&(!n&&console.warn("numberFormat name is already exists: "+e),!n)||(r[e]=o),e},i.setLocale=function(o){if(i._locale=o.locale||navigator.language,t.Utils.setLanguage(i._locale),i._currency=o.currency||"KRW",i._numberFormats=t.Utils.assign({},i.defNumberFormats()),o.numberFormats)for(var n in o.numberFormats)i.addNumberFormat(n,o.numberFormats[n],!0);o.messages&&e.setMessages(o.messages)},i.getLocale=function(){var o={locale:i._locale||navigator.language,currency:i._currency||"KRW"};return o.messages=t.Utils.assign({},e.messages),o.numberFormats=t.Utils.assign({},o.numberFormats||i.defNumberFormats()),o},i}();return pt.Locale=i,pt}function ft(){if(ut)return ct;ut=1,Object.defineProperty(ct,"__esModule",{value:!0}),ct.DecimalFormatter=void 0;var t=_t(),e=S(),i=function(t){return e.Utils.included(t,"c","f","C","F","a","A")},o=function(){function e(t){this._groupPos=0,this._replacement="$&,",this.parse(this._format=t)}return e.getFormatter=function(t){var i=e.Formatters[t];return i||(e.Formatters[t]=i=new e(t)),i},Object.defineProperty(e,"Default",{get:function(){return e.getFormatter(e.DEFAULT_FORMAT)}}),_dp(e,"format",{get:function(){return this._format}}),_dp(e,"separator",{get:function(){return this._seperator}}),_dp(e,"groupSep",{get:function(){return this._groupSep}}),_dp(e,"minDigits",{get:function(){return this._minDigits}}),_dp(e,"maxDigits",{get:function(){return this._maxDigits}}),e.prototype.parse=function(t){this._minDigits=0,this._maxDigits=0,this._parse(t)},e.prototype.getText=function(e,i){void 0===i&&(i=!0);var o=Number(e);if(isNaN(o))return"";if((t.Locale.numberFormats||{}).hasOwnProperty(this._format)){var n=t.Locale.getNumberFormatter(this._format);return n&&n.format(e)}var r=this._minDigits,s=0;if(this._optDecimal){var a=(h=(""+o).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/))?Math.max(0,(h[1]?h[1].length:0)-(h[2]?+h[2]:0)):0;r=Math.min(Math.max(a,this._minDigits),this._maxDigits)}if(this._round)switch(s=Math.pow(10,r),this._round){case"c":o=Math.ceil(s*o)/s;break;case"f":var l=o.toString().split(".");o=parseFloat(l.length>1?l[0]+"."+l[1].substr(0,r):l[0])}o="a"===this._round?Math.abs(o):o;var h,u=(o=Number(o.toPrecision(15))).toFixed(r);return!i&&(s=parseFloat(u))===Math.abs(parseFloat(u))&&0===s&&(u=Math.abs(o).toFixed(r)),this._seperator&&(u=u.replace(".",this._seperator)),this._reg?r?u.replace(this._regDecimal,this._replacement):u.replace(this._reg,this._replacement):u},e.prototype._parse=function(e){if((e&&(e=e.trim()),e)&&!(t.Locale.numberFormats||{}).hasOwnProperty(e)){var o=t.Messages.messages.decimalSeparator,n=t.Messages.messages.thousandsSeparator;if(e.indexOf(";")>-1){var r=e.split(";");e=r[0],r.length>1&&r[1]&&!i(r[1])&&(o=r[1]),r.length>2&&r[2]&&!i(r[2])&&(n=r[2]),this._round=r[3]||r[2]||r[1],this._round=i(this._round)?this._round.toLowerCase():this._round}this._seperator="."==o?null:o,this._groupSep=","==n?null:n;var s=e.length,a=e.indexOf(".");if(this._optDecimal=e.indexOf("#",a)>0,a>=0){for(var l=a+1;l=0;l--){var c=e.charAt(l);if("0"==c&&d);else if(0==this._groupPos&&","==c)this._groupPos=u-l-1;else{if("#"!=c)break;d=!1}}}this._groupPos>0&&(this._replacement="$&"+n,this._reg=new RegExp("\\d(?=(\\d{"+this._groupPos+"})+($|\\"+o+"))","g"),this._regDecimal=new RegExp("\\d(?=(\\d{"+this._groupPos+"})+\\"+o+")","g"))}},e.DEFAULT_FORMAT="#,##0.0",e.Formatters={},e}();return ct.DecimalFormatter=o,ct}function gt(){if(dt)return ot;dt=1,Object.defineProperty(ot,"__esModule",{value:!0}),ot.DataOutputOptions=void 0;var t=d,e=G(),i=rt(),o=lt(),n=ft(),r=function(e){function r(t){var i=e.call(this)||this;return i._datetimeWriter=null,i._booleanFormatter=null,i._numberFormatter=null,i.assignFrom(t),i}return t.__extends(r,e),_dp(r,"datetimeFormat",{get:function(){return this._datetimeFormat},set:function(t){t!=this._datetimeFormat&&(this._datetimeFormat=t,this._datetimeWriter=t?i.DateTimeWriter.getFormatter(t):null)}}),_dp(r,"booleanFormat",{get:function(){return this._booleanFormat},set:function(t){t!=this._booleanFormat&&(this._booleanFormat=t,this._booleanFormatter=t?o.BooleanFormatter.getFormatter(t):null)}}),_dp(r,"numberFormat",{get:function(){return this._numberFormat},set:function(t){t!=this._numberFormat&&(this._numberFormat=t,this._numberFormatter=t?n.DecimalFormatter.getFormatter(t):null)}}),_dp(r,"datetimeCallback",{get:function(){return this._datetimeCallback},set:function(t){this._datetimeCallback=t}}),_dp(r,"booleanCallback",{get:function(){return this._booleanCallback},set:function(t){this._booleanCallback=t}}),_dp(r,"numberCallback",{get:function(){return this._numberCallback},set:function(t){this._numberCallback=t}}),_dp(r,"nullDateText",{get:function(){return this._nullDateText},set:function(t){this._nullDateText=t}}),_dp(r,"nullText",{get:function(){return this._nullText},set:function(t){this._nullText=t}}),_dp(r,"nanText",{get:function(){return this._nanText},set:function(t){this._nanText=t}}),_dp(r,"rowState",{get:function(){return this._rowState},set:function(t){this._rowState=t}}),_dp(r,"datetimeWriter",{get:function(){return this._datetimeWriter}}),_dp(r,"booleanFormatter",{get:function(){return this._booleanFormatter}}),_dp(r,"numberFormatter",{get:function(){return this._numberFormatter}}),r}(e.Base);return ot.DataOutputOptions=r,ot}var mt,yt,vt={};function Ct(){if(mt)return vt;mt=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.DefaultOptions=void 0;var t=S(),e=function(){function e(){}return Object.defineProperty(e,"summaryMode",{get:function(){return e._summaryMode}}),Object.defineProperty(e,"fixed",{get:function(){return e._fixed||{}}}),Object.defineProperty(e,"display",{get:function(){return e._display||{}}}),Object.defineProperty(e,"format",{get:function(){return e._format||{}}}),Object.defineProperty(e,"edit",{get:function(){return e._edit||{}}}),Object.defineProperty(e,"editor",{get:function(){return e._editor||{}}}),Object.defineProperty(e,"copy",{get:function(){return e._copy||{}}}),Object.defineProperty(e,"paste",{get:function(){return e._paste||{}}}),Object.defineProperty(e,"sorting",{get:function(){return e._sorting||{}}}),Object.defineProperty(e,"filtering",{get:function(){return e._filtering||{}}}),Object.defineProperty(e,"dataDrop",{get:function(){return e._dataDrop||{}}}),Object.defineProperty(e,"rowIndicator",{get:function(){return e._rowIndicator||{}}}),Object.defineProperty(e,"checkBar",{get:function(){return e._checkBar||{}}}),Object.defineProperty(e,"stateBar",{get:function(){return e._stateBar||{}}}),Object.defineProperty(e,"header",{get:function(){return e._header||{}}}),Object.defineProperty(e,"footer",{get:function(){return e._footer}}),Object.defineProperty(e,"footers",{get:function(){return e._footers||{}}}),Object.defineProperty(e,"headerSummary",{get:function(){return e._headerSummary||{}}}),Object.defineProperty(e,"headerSummaries",{get:function(){return e._headerSummaries||{}}}),Object.defineProperty(e,"hideDeletedRows",{get:function(){return e._hideDeletedRows}}),Object.defineProperty(e,"sortMode",{get:function(){return e._sortMode}}),Object.defineProperty(e,"groupSummaryMode",{get:function(){return e._groupSummaryMode}}),Object.defineProperty(e,"filterOr",{get:function(){return e._filterOr}}),Object.defineProperty(e,"filterMode",{get:function(){return e._filterMode}}),Object.defineProperty(e,"rowGroup",{get:function(){return e._rowGroup||{}}}),Object.defineProperty(e,"groupPanel",{get:function(){return e._groupPanel||{}}}),Object.defineProperty(e,"grouping",{get:function(){return e._grouping||{}}}),Object.defineProperty(e,"filterPanel",{get:function(){return e._filterPanel||{}}}),Object.defineProperty(e,"dataOptions",{get:function(){return e._dataOptions||{}}}),Object.defineProperty(e,"mobile",{get:function(){return e._mobile||{}}}),e.setDefaultOptions=function(i,o){i&&(e._fixed=t.Utils.assign({},i.fixed),e._display=t.Utils.assign({},i.display),e._format=t.Utils.assign({},i.format),e._edit=t.Utils.assign({},i.edit),e._editor=t.Utils.assign({},i.editor),e._copy=t.Utils.assign({},i.copy),e._paste=t.Utils.assign({},i.paste),e._sorting=t.Utils.assign({},i.sorting),e._filtering=t.Utils.assign({},i.filtering),e._dataDrop=t.Utils.assign({},i.dataDrop),e._rowIndicator=t.Utils.assign({},i.rowIndicator),e._checkBar=t.Utils.assign({},i.checkBar),e._stateBar=t.Utils.assign({},i.stateBar),e._header=t.Utils.assign({},i.header),e._footer=t.Utils.assign({},i.footer),e._footers=t.Utils.assign({},i.footers),e._headerSummary=t.Utils.assign({},i.headerSummary),e._headerSummaries=t.Utils.assign({},i.headerSummaries),void 0!==i.hideDeleted&&(e._hideDeletedRows=i.hideDeletedRows),void 0!==i.hideDeletedRows&&(e._hideDeletedRows=i.hideDeletedRows),void 0!==i.sortMode&&(e._sortMode=i.sortMode),void 0!==i.summaryMode&&(e._summaryMode=i.summaryMode),void 0!==i.inclusiveFiltering&&(e._filterOr=i.inclusiveFiltering),void 0!==i.filterOr&&(e._filterOr=i.filterOr),void 0!==i.filterMode&&(e._filterMode=i.filterMode),e._groupPanel=t.Utils.assign({},i.groupPanel),void 0!==i.groupSummaryMode&&(e._groupSummaryMode=i.groupSummaryMode),e._rowGroup=t.Utils.assign({},i.rowGroup),e._groupPanel=t.Utils.assign({},i.groupPanel),e._grouping=t.Utils.assign({},i.grouping),e._filterPanel=t.Utils.assign({},i.filterPanel),e._mobile=t.Utils.assign({},i.mobile)),o&&(e._dataOptions=t.Utils.assign({},o))},e}();return vt.DefaultOptions=e,vt}function wt(){if(yt)return O;yt=1,Object.defineProperty(O,"__esModule",{value:!0}),O.DataSource=O.ClientEditingError=O.DataSourceError=void 0;var t=d,e=function(){if(j)return F;j=1,Object.defineProperty(F,"__esModule",{value:!0}),F.DataField=void 0;var t=d,e=P(),i=$(),o=G(),n=C(),r=S(),s=Y(),a=["value","values"],l=function(o){function l(t,e,i){void 0===e&&(e=n.ValueType.TEXT),void 0===i&&(i=0);var r=o.call(this)||this;return r._index=-1,r._dataType=n.ValueType.TEXT,r._subType=null,r._runType=n.ValueType.TEXT,r._length=0,r._subTypeEnabled=!0,r._required=!1,r._updatable=!0,r._ranged=!1,r._runSet=null,r._typeLock=!1,r._objectKey=null,r._objectCallback=null,t&&(r.fieldName=t),null!=e&&(e===n.ValueType.DATE&&(e=n.ValueType.DATETIME,r._subType=n.ValueType.DATE,r._subTypeEnabled=!0),r._dataType=e),r._length=i,r}return t.__extends(l,o),_dp(l,"hash",{get:function(){return this._fieldName}}),_dp(l,"index",{get:function(){return this._index}}),_dp(l,"fieldName",{get:function(){return this._fieldName},set:function(t){if(!(t=t&&t.trim()))throw new Error("Field name must be exists.");t!=this._orgFieldName&&(this._orgFieldName=t,this._orgAttrName="@"+t,this._fieldName=t.toUpperCase(),this.changed())}}),_dp(l,"orgFieldName",{get:function(){return this._orgFieldName}}),_dp(l,"orgAttrName",{get:function(){return this._orgAttrName}}),_dp(l,"dataType",{get:function(){return this._dataType},set:function(t){t!=this._dataType&&(this._dataType=t,this.resetTypes(),this.changed())}}),_dp(l,"runType",{get:function(){return this._runType}}),_dp(l,"subType",{get:function(){return this._subType},set:function(t){(t=t||null)!=this._subType&&(this._subType=t,this.resetTypes(),this.changed())}}),_dp(l,"subTypeEnabled",{get:function(){return this._subTypeEnabled},set:function(t){t!=this._subTypeEnabled&&(this._subTypeEnabled=t,this.resetTypes(),this.changed())}}),_dp(l,"baseField",{get:function(){return this._baseField},set:function(t){t!=this._orgBaseField&&(this._orgBaseField=t,this._baseField=t&&t.toUpperCase(),this.changed())}}),_dp(l,"length",{get:function(){return this._length},set:function(t){(t=t||0)!=this._length&&(this._length=t,this.resetTypes(),this.changed())}}),_dp(l,"set",{get:function(){return this._set},set:function(t){t!==this._set&&(this._set=t,this.resetTypes(),this.changed())}}),_dp(l,"minimum",{get:function(){return this._minimum},set:function(t){t!=this._minimum&&(this._minimum=t,this.resetTypes(),this.changed())}}),_dp(l,"maximum",{get:function(){return this._maximum},set:function(t){t!=this._maximum&&(this._maximum=t,this.resetTypes(),this.changed())}}),_dp(l,"required",{get:function(){return this._required},set:function(t){t!=this._required&&(this._required=t,this.changed())}}),_dp(l,"header",{get:function(){return this._header},set:function(t){t!=this._header&&(this._header=t,this.changed())}}),_dp(l,"defaultValue",{get:function(){return this._defaultValue},set:function(t){t!=this._defaultValue&&(this._defaultValue=t)}}),_dp(l,"nullValue",{get:function(){return this._nullValue}}),_dp(l,"booleanFormat",{get:function(){return this._booleanFormat},set:function(t){t!=this._booleanFormat&&(this._booleanFormat=t,this._boolParser=t?new e.BooleanConverter(t):null,this.changed())}}),_dp(l,"datetimeFormat",{get:function(){return this._datetimeFormat},set:function(t){t!=this._datetimeFormat&&(this._datetimeFormat=t,t?(this._dateParser=new i.DateTimeReader(t),this._amText&&(this._dateParser.amText=this._amText),this._pmText&&(this._dateParser.pmText=this._pmText),this._baseYear&&(this._dateParser.baseYear=this._baseYear)):this._dateParser=null,this.changed())}}),_dp(l,"amText",{get:function(){return this._amText},set:function(t){t!=this._amText&&(this._amText=t,this._dateParser&&(this._dateParser.amText=t),this.changed())}}),_dp(l,"pmText",{get:function(){return this._pmText},set:function(t){t!=this._pmText&&(this._pmText=t,this._dateParser&&(this._dateParser.pmText=t),this.changed())}}),_dp(l,"baseYear",{get:function(){return this._baseYear},set:function(t){t!=this._baseYear&&(this._baseYear=t,this._dateParser&&(this._dateParser.baseYear=t),this.changed())}}),_dp(l,"valueExpression",{get:function(){return this._valueExpression},set:function(t){t!=this._valueExpression&&(this._valueExpression=t,this._owner&&this._owner.updateField(this,!0))}}),_dp(l,"valueCallback",{get:function(){return this._valueCallback},set:function(t){t!=this._valueCallback&&(this._valueCallback=t,this._owner&&this._owner.updateField(this,!0))}}),_dp(l,"tag",{get:function(){return this._tag},set:function(t){this._tag=t}}),_dp(l,"objectKey",{get:function(){return this._objectKey},set:function(t){this._objectKey=t}}),_dp(l,"objectCallback",{get:function(){return this._objectCallback},set:function(t){this._objectCallback=t}}),_dp(l,"calculated",{get:function(){return!!this._valueExpression||!!this._valueCallback}}),_dp(l,"updatable",{get:function(){return!this._valueExpression&&!this._valueCallback&&this._updatable},set:function(t){t!=this._updatable&&(this._updatable=t)}}),l.prototype.isEmpty=function(t){var e=null==t||""===t;return e||this._dataType!=n.ValueType.NUMBER||(e=isNaN(t)),e},l.prototype.equalValues=function(t,e){return this._equalValues(t,e)},l.prototype.sameValues=function(t,e){return this._sameValues(t,e)},l.prototype.readValue=function(t){return this._readValue(t)},l.prototype.getBool=function(t,e){return"boolean"==typeof e?e:this._boolParser?this._boolParser.toBool(e):t.toBool(e)},l.prototype.getDate=function(t,e){return e instanceof Date?new Date(e.getTime()):"number"==typeof e?new Date(e):this._dateParser?this._dateParser.toDate(e,!1):t.toDate(e,!1)},l.prototype.clone=function(){var t=new l(this.fieldName,this.dataType,this.length);return t._orgFieldName=this._orgFieldName,t._orgAttrName=this._orgAttrName,t._boolParser=this._boolParser,t._dateParser=this._dateParser,t._orgBaseField=this._orgBaseField,t._baseField=this._baseField,t._defaultValue=this._defaultValue,t._valueCallback=this._valueCallback,t._valueExpression=this._valueExpression,t},l.prototype.$_resetTypes=function(t){this.resetTypes(t)},l.prototype.assignFrom=function(t){"fieldName"in t&&(this.fieldName=t.fieldName),"subType"in t&&(this._subType=t.subType),"set"in t&&(this._set=t.set instanceof Array?t.set.slice():null),"defaultValue"in t&&(this._defaultValue=t.defaultValue),"baseField"in t&&(this.baseField=t.baseField),"booleanFormat"in t&&(this.booleanFormat=t.booleanFormat),"amText"in t&&(this._amText=t.amText),"pmText"in t&&(this._pmText=t.pmText),"baseYear"in t&&(this._baseYear=t.baseYear),"header"in t&&(this._header=t.header),"datetimeFormat"in t&&(this.datetimeFormat=t.datetimeFormat),"objectKey"in t&&(this._objectKey=t.objectKey),"objectCallback"in t&&(this._objectCallback=t.objectCallback),"required"in t&&(this._required=t.required),"minimum"in t&&(this._minimum=t.minimum),"maximum"in t&&(this._maximum=t.maximum),"valueExpression"in t&&(this.valueExpression=t.valueExpression),"valueCallback"in t&&(this._valueCallback=t.valueCallback),"tag"in t&&(this._tag=t.tag)},l.prototype.$_setIndex=function(t){this._index=t},l.prototype.$_prepare=function(t){this._owner=t},l.prototype.changed=function(){},l.prototype.resetTypes=function(t){if(!this._typeLock){t&&(this._ownerBoolParser=t.boolParser,this._ownerDateParser=t.dateParser);var e=this._dataType,i=this._subType;if(this._runType=e,this._ranged=!1,(!this._owner||this._owner.subTypeEnabled)&&this._subTypeEnabled){if(i)switch(e){case n.ValueType.TEXT:i==n.ValueType.CHAR&&this._length>0&&(e=i);break;case n.ValueType.NUMBER:i!=n.ValueType.UNUM&&i!=n.ValueType.INT&&i!=n.ValueType.UINT||(e=i);break;case n.ValueType.DATETIME:i==n.ValueType.DATE&&(e=i)}if(this._runType=e,this._runSet=null,this._set&&this._set.length){if(this._runType==n.ValueType.DATETIME){this._runSet=[];for(var o=0;o=0?Math.floor(t):Math.ceil(t);if(this._ranged){if(this._runSet){if(this._runSet.indexOf(e)<0)return}else isNaN(this._runMin)||(e=Math.max(this._runMin,e)),isNaN(this._runMax)||(e=Math.min(this._runMax,e));e=e>=0?Math.floor(e):Math.ceil(e)}return e}},l.prototype.readUintValue=function(t){if(null!=t&&""!==t){var e=Math.max(0,Math.floor(Math.floor(t)));if(this._ranged){if(this._runSet){if(this._runSet.indexOf(e)<0)return}else isNaN(this._runMin)||(e=Math.max(this._runMin,e)),isNaN(this._runMax)||(e=Math.min(this._runMax,e));e=Math.max(0,Math.floor(Math.floor(e)))}return e}},l.prototype.readDatetimeValue=function(t){if(void 0!==t){if(null===t)return this._nullValue;var e=this.getDate(this._ownerDateParser,t);if(e&&this._ranged)if(this._runSet){for(var i=!1,o=this._runSet.length;o--;)if(e.getTime()==this._runSet[o]){i=!0;break}if(!i)return}else this._runMin&&e.getTime()this._runMax.getTime()&&(e=new Date(this._runMax));return e}},l.prototype.readDateValue=function(t){if(void 0!==t){if(null===t)return this._nullValue;var e=this.getDate(this._ownerDateParser,t);if(e&&(e.setHours(0,0,0,0),this._ranged))if(this._runSet){for(var i=!1,o=this._runSet.length;o--;)if(e.getTime()==this._runSet[o]){i=!0;break}if(!i)return}else this._runMin&&e.getTime()this._runMax.getTime()&&(e=new Date(this._runMax));return e}},l.prototype.readBooleanValue=function(t){return void 0===t?t:null!==t&&this.getBool(this._ownerBoolParser,t)},l.prototype.readObjectValues=function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(e){throw new Error("Invalid Object String "+e+"\r\n"+t)}else if(null!=t&&"object"!=typeof t)try{t=JSON.parse(t)}catch(e){r.Utils.log("JSON.parse fail => ".concat(t))}return r.Utils.deepCopy(t)},l.prototype.$_compareObject=function(t,e,i,o){var n=this._objectKey,r=this._objectCallback,s=r?r(this.orgFieldName,i,t):n&&t.hasOwnProperty(n)?t[n]:null,a=r?r(this.orgFieldName,o,e):n&&e.hasOwnProperty(n)?e[n]:null;return s>a?1:s=this._fieldCount)throw new e.ExpressionEvaluationError("Data field index out of bounds:"+i);return this._values[i]}throw new e.ExpressionEvaluationError("Invalid identifier indexer: "+t)}},o.prototype.evaluateIndexerS=function(t,i,n){if(t!=o.ID_VALUE&&t!=o.ID_VALUES)throw new e.ExpressionEvaluationError("Invalid identifier indexer: "+t);if(this._values&&this._fields){var r=this._fields.indexOf(i);if(r<0||r>=this._fieldCount)throw new e.ExpressionEvaluationError("Data field is not exists:"+i);return this._values[r]}},o.ID_VALUE=0,o.ID_VALUES=1,o.IDENTS={value:o.ID_VALUE,values:o.ID_VALUES},o}(e.ExpressionRuntime);return J.CalculateExpressionRuntime=i,J}(),a=et(),l=gt(),h=S(),u=C(),c=Ct(),p=_t(),_=function(){function t(){}return t.prototype.compare=function(t,e,i){return t.dataType==u.ValueType.NUMBER?Number(e)-Number(i):e>i?1:e0}}),_dp(d,"valuesCallback",{get:function(){return this._valuesCallback},set:function(t){this._valuesCallback=t}}),d.prototype.registerClient=function(t){t&&this._clients.indexOf(t)<0&&this._clients.push(t)},d.prototype.unregisterClient=function(t){if(t){var e=this._clients.indexOf(t);e>=0&&this._clients.splice(e,1)}},d.prototype.cancelClients=function(){for(var t=0,e=this._clients;t0?(this.clearCommandStack(),this._fireReset(e)):this._fireRefresh(),this._countLock>0&&this._fireRowCountChanged()),this._resetLock=this._countLock=0)},d.prototype.addField=function(t,e,i){if(this._checkClientState()){var o;this.beginUpdate();try{(o=this.$_internalAddField(t))&&o.$_resetTypes(this)}finally{e?this._doFieldsReset():this._resetLock++,i&&this._reCalculateFields(),this.endUpdate(!0,!1)}return o}},d.prototype.removeField=function(t,i){var o;if(this._checkClientState()&&t&&("string"==typeof t?o=this.fieldByName(t):t instanceof e.DataField?o=t:"object"==typeof t&&t.fieldName&&(o=this.fieldByName(t.fieldName)),o)){this.beginUpdate();try{this.$_internalRemoveField(o)}finally{i?this._doFieldsReset():this._resetLock++,this.endUpdate(!0,!1)}}},d.prototype.updateField=function(t,e){var i=0,o=this._calcFields;if(t.calculated&&o.indexOf(t)<0){i=o.length;for(var n=0;n=t.index){i=n;break}o.splice(i,0,t)}else t.calculated||(i=o.indexOf(t))>=0&&o.splice(i,1);if(e&&t.calculated){this.beginUpdate();try{this._reCalculateFields(t)}finally{this.endUpdate(!0)}}},d.prototype.clearFields=function(){this._checkClientState()&&this._fields.length>0&&(this.$_internalClearFields(),this._doFieldsReset())},d.prototype.setFields=function(t){if(this._checkClientState()){this.beginUpdate();try{if(this.$_internalClearFields(),t)for(var e=0,i=t.length;e=0&&t=0&&e=0)try{var o=this.getRowState(t);return!o||o==i.RowState.CREATED||o==i.RowState.CREATE_AND_DELETED}catch(t){return!1}return!0}return!1},d.prototype.getDataComparer=function(t){return t>=0&&this._comparers[t]},d.prototype.setDataComparer=function(t,e){this._comparers[t]=e},d.prototype.canSummarize=function(t){return t>=0&&t=this._fields.length)throw new f(p.Messages.messages.fieldIndexOutOfBounds+t)},d.prototype.$_internalClearFields=function(){this._checkClientState();for(var t=0,e=this._fields;ti)throw h.Utils.isDebugging(),new f(p.Messages.messages.fieldIndexOutOfBounds+t);if(e){e.$_prepare(this),this._fields.splice(t,0,e),this._fieldNames.splice(t,0,e.fieldName),e.calculated&&this._calcFields.push(e),e.$_setIndex(t),this._fieldMap[e.fieldName]=t;for(var o=t+1;o<=i;o++)(e=this._fields[o]).$_setIndex(o),this._fieldMap[e.fieldName]=o;return t}return-1},d.prototype.$_internalRemoveField=function(t){if(this._checkClientState(),t){var e=t.index;this._fields.splice(e,1),this._fieldNames.splice(e,1),delete this._fieldMap[t.fieldName];for(var i=0;i<=this._fields.length-1;i++)(t=this._fields[i]).$_setIndex(i),this._fieldMap[t.fieldName]=i}},d.prototype.$_addField=function(t,i,o,n){if(!t)throw new f(p.Messages.messages.fieldNameMustExists);if(this.getFieldIndex(t)>=0)throw new f(p.Messages.messages.fieldNameAlreadyExists+t);var r=new e.DataField(t,i,o);n&&r.assignFrom(n);var s=n&&null!=n.index&&!isNaN(n.index)?n.index:this._fields.length;return this.$_internalInsertField(s,r),r},d.prototype.$_internalAddField=function(t){var i=null;return"string"==typeof t?i=this.$_addField(t,u.ValueType.TEXT,0):t instanceof e.DataField?(i=t.clone(),this.$_internalInsertField(this._fields.length,i)):t&&(i=this.$_addField(t.fieldName,t.dataType||u.ValueType.TEXT,t.length,t)),i},d.prototype._internalCalculateValues=function(t,e,i){var o=i?h.Utils.makeArray(i):this._calcFields;if(o.length>0){for(var n=[],r=0;r=0);)s--;if(r<=s){if(r!=s){var l=t[r];t[r]=t[s],t[s]=l}r++,s--}}while(r<=s);o=0&&(this._tags.splice(e,1),t.disconnect())}},i.prototype.clearRows=function(){if(null!=this._tags)for(var t=0,e=this._tags;t=this._fieldCount)throw new e.ExpressionEvaluationError("Data field index out of bounds:"+i);switch(t){case o.ID_VALUE:case o.ID_VALUES:return this._values[i]}throw new e.ExpressionEvaluationError("Invalid identifier indexer: "+t)},o.prototype.evaluateIndexerS=function(t,i,n){switch(t){case o.ID_VALUE:case o.ID_VALUES:var r=this.getField(i,n);return this._values[r]}throw new e.ExpressionEvaluationError("Invalid identifier indexer: "+t)},o.prototype.getField=function(t,i){var o=i?this._ds.getFieldIndexC(t):this._ds.getFieldIndex(t);if(o<0||o>=this._fieldCount)throw new e.ExpressionEvaluationError("Data field is not exits:"+t);return o},o.ID_ROW=0,o.ID_VALUE=1,o.ID_VALUES=2,o.IDENTS={row:o.ID_ROW,value:o.ID_VALUE,values:o.ID_VALUES},o}(e.ExpressionRuntime);return Tt.DataFilterRuntime=n,Tt}(),n=_t(),r=function(r){function s(){var t=r.call(this)||this;return t._tags=new i.DataTagCollection(t),t._filterRuntime=new o.DataFilterRuntime,t._commandListeners=[],t}return t.__extends(s,r),s.prototype._doDispose=function(){this._tags=this._tags.dispose(),this._filters=this._filters&&this._filters.dispose(),this._filterRuntime=this._filterRuntime.dispose(),this._commandListeners=null,this._fireDispose(),r.prototype._doDispose.call(this)},s.prototype.editCommandStackChanged=function(t,e,i){this._fireCommandStackChanged(e,i)},_dp(s,"filters",{get:function(){return this._filters}}),_dp(s,"filterRuntime",{get:function(){return this._filterRuntime}}),_dp(s,"deletedCount",{get:function(){return 0}}),_dp(s,"tags",{get:function(){return this._tags}}),s.prototype.addTag=function(t){this._tags.add(t)},s.prototype.removeTag=function(t){this._tags.remove(t)},s.prototype.setFilterMode=function(t){this._filters&&t==this._filters.filterMode||(this._filters?this._filters.filterMode=t:this._filters=new o.DataFilterCollection(null,t))},s.prototype.setFilters=function(t,e){!t||t instanceof o.DataFilterCollection?(this._filters=t,this._filters&&e&&(this._filters.filterMode=e)):this._filters=new o.DataFilterCollection(t,e)},s.prototype.getRowObject=function(t){if(t<0||t>=this.rowCount)throw new e.DataSourceError(n.Messages.messages.rowOutOfBounds+t);for(var i={},o=0,r=this.fieldCount;o=0&&this._commandListeners.splice(e,1)},s.prototype.findRow=function(t,e,i){},s.prototype._doFieldsReset=function(){this._fireReset(!0)},s.prototype._keepCommandStates=function(t){if(this._commandListeners.length>0)return this._commandListeners[0].getCommandStates(t)},s.prototype._yieldCommandStates=function(t,e){if(this._commandListeners.length>0)return this._commandListeners[0].setCommandStates(t,e)},s.prototype._fireDispose=function(){this._eventLock<=0&&this.fireEvent("onDataProviderDisposed")},s.prototype._fireReset=function(t){this._eventLock<=0?this.fireEvent("onDataProviderReset",t):this._resetLock++},s.prototype._fireRefresh=function(){this._eventLock<=0&&this.fireEvent("onDataProviderRefresh")},s.prototype._fireRowCountChanged=function(){this._eventLock<=0?this.fireEvent("onDataProviderRowCountChanged"):this._countLock++},s.prototype.fireDataLoadComplated=function(){this._eventLock<=0&&this.fireEvent("onDataProviderDataLoadComplated")},s.prototype.fireRowInserting=function(t,e){return!(this._eventLock<=0)||this.fireConfirmEvent("onDataProviderRowInserting",t,e)},s.prototype.fireRowInserted=function(t){this._eventLock<=0&&(this.fireEvent("onDataProviderRowInserted",t),this.fireEvent("onDataProviderDataChanged"))},s.prototype.fireRowsInserted=function(t,e){this._eventLock<=0&&(this.fireEvent("onDataProviderRowsInserted",t,e),this.fireEvent("onDataProviderDataChanged"))},s.prototype.fireRowRemoving=function(t){return!(this._eventLock<=0)||this.fireConfirmEvent("onDataProviderRowRemoving",t)},s.prototype.fireRowRemoved=function(t){this._eventLock<=0&&(this.fireEvent("onDataProviderRowRemoved",t),this.fireEvent("onDataProviderDataChanged"))},s.prototype.fireRowsRemoving=function(t){return!(this._eventLock<=0)||this.fireConfirmEvent("onDataProviderRowsRemoving",t)},s.prototype.fireRowsRemoved=function(t){this._eventLock<=0&&(this.fireEvent("onDataProviderRowsRemoved",t),this.fireEvent("onDataProviderDataChanged"))},s.prototype.fireRowUpdating=function(t,e,i){return!(this._eventLock<=0)||this.fireConfirmEvent("onDataProviderRowUpdating",t,e,i)},s.prototype.fireRowUpdated=function(t){this._eventLock<=0&&(this.fireEvent("onDataProviderRowUpdated",t),this.fireEvent("onDataProviderDataChanged"))},s.prototype.fireRowsUpdated=function(t,e){this._eventLock<=0&&(this.fireEvent("onDataProviderRowsUpdated",t,e),this.fireEvent("onDataProviderDataChanged"))},s.prototype.fireRowListUpdated=function(t){this._eventLock<=0&&(this.fireEvent("onDataProviderRowListUpdated",t),this.fireEvent("onDataProviderDataChanged"))},s.prototype.fireRowMoving=function(t,e){return!(this._eventLock<=0)||this.fireConfirmEvent("onDataProviderRowMoving",t,e)},s.prototype.fireRowMoved=function(t,e){this._eventLock<=0&&this.fireEvent("onDataProviderRowMoved",t,e)},s.prototype.fireRowsMoving=function(t,e,i){return!(this._eventLock<=0)||this.fireConfirmEvent("onDataProviderRowsMoving",t,e,i)},s.prototype.fireRowsMoved=function(t,e,i){this._eventLock<=0&&this.fireEvent("onDataProviderRowsMoved",t,e,i)},s.prototype.fireRowListMoving=function(t,e){return!(this._eventLock<=0)||this.fireConfirmEvent("onDataProviderRowListMoving",t,e)},s.prototype.fireRowListMoved=function(t,e){this._eventLock<=0&&this.fireEvent("onDataProviderRowListMoved",t,e)},s.prototype.fireValueChanging=function(t,e,i){return!(this._eventLock<=0)||this.fireConfirmEvent("onDataProviderValueChanging",t,e,i)},s.prototype.fireValueChanged=function(t,e){this._eventLock<=0&&(this.fireEvent("onDataProviderValueChanged",t,e),this.fireEvent("onDataProviderDataChanged"))},s.prototype.fireRowStateChanged=function(t,e){this._eventLock<=0&&this.fireEvent("onDataProviderStateChanged",t,e)},s.prototype.fireRowStatesChanged=function(t,e){this._eventLock<=0&&this.fireEvent("onDataProviderStatesChanged",t,e)},s.prototype.fireRowStatesCleared=function(){this._eventLock<=0&&this.fireEvent("onDataProviderStatesCleared")},s.prototype.fireRestoreRows=function(t){this._eventLock<=0&&this.fireEvent("onDataProviderRestoreRows",t)},s.prototype.fireRowHided=function(t,e){this._eventLock<=0&&this.fireEvent("onDataProviderRowHided",t,e)},s}(e.DataSource);return bt.DataProvider=r,bt}var kt,Mt={};function Ot(){if(kt)return Mt;kt=1,Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.SearchCellOptions=Mt.SearchOptions=void 0;var t=d,e=G(),i=function(e){function i(t){var i=e.call(this)||this;return i.fields=[],i.values=[],i.startIndex=0,i.wrap=!0,i.select=!0,i.allFields=!0,i.caseSensitive=!1,i.partialMatch=!1,i.compareCallback=null,i.reverse=!1,t&&i.extend(t),i}return t.__extends(i,e),i}(e.Base);Mt.SearchOptions=i;var o=function(e){function i(t){var i=e.call(this)||this;return i.fields=null,i.value=null,i.startIndex=0,i.startFieldIndex=0,i.wrap=!0,i.select=!0,i.caseSensitive=!1,i.partialMatch=!1,i.columns=null,i.compareCallback=null,i.reverse=!1,t&&i.extend(t),i}return t.__extends(i,e),i}(e.Base);return Mt.SearchCellOptions=o,Mt}var Ft,Lt,Pt={},Bt={};function Vt(){if(Ft)return Bt;Ft=1,Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.EditCommandStack=Bt.EditCommandGruop=Bt.EditCommand=Bt.EditCommandError=void 0;var t=d,e=G(),i=et(),o=function(e){function i(t){return e.call(this,t)||this}return t.__extends(i,e),i}(Error);Bt.EditCommandError=o;var n=function(e){function i(){return e.call(this)||this}return t.__extends(i,e),i.prototype._doDispose=function(){},i.prototype.undo=function(){},i.prototype.redo=function(t){},i.prototype.execute=function(){return this.redo(!1)},i}(e.Base);Bt.EditCommand=n;var r=function(e){function i(){return e.call(this)||this}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},i.prototype.undo=function(){},i.prototype.redo=function(t){},i.prototype.execute=function(){return this.redo(!1)},i}(n);Bt.EditCommandGruop=r;var s=function(e){function i(t){var i=e.call(this)||this;return i._commands=[],i._current=-1,i._undoing=!1,i._redoing=!1,i._owner=t,i}return t.__extends(i,e),i.prototype._doDispose=function(){this._owner=null,this._commands=null,e.prototype._doDispose.call(this)},_dp(i,"owner",{get:function(){return this._owner}}),_dp(i,"length",{get:function(){return this._commands.length}}),_dp(i,"canUndo",{get:function(){return this._current>=0}}),_dp(i,"canRedo",{get:function(){return this._commands.length>this._current+1}}),_dp(i,"undoing",{get:function(){return this._undoing}}),_dp(i,"redoing",{get:function(){return this._redoing}}),i.prototype.undo=function(){if(this.canUndo){var t=this._commands[this._current];this._undoing=!0;try{t.undo()}finally{this._undoing=!1}this._current=this._current-1,this._changed()}},i.prototype.redo=function(t){var e;if(this.canRedo){var i=this._current+1,o=this._commands[i];this._redoing=!0;try{e=o.redo(!0)}finally{this._redoing=!1}this._current=i,this._changed()}return e},i.prototype.execute=function(t){if(t){var e=this._current++;this._commands[this._current]=t,this.$_shrink(this._current+1);var i=void 0;try{i=t.execute()}catch(t){throw this.$_shrink(e+1),this._current=e,t}return this._changed(),i}},i.prototype.flush=function(){var t=this._commands.length;if(t>0){for(;t--;)this._commands[t].dispose();this._commands=[],this._current=-1,this._changed()}},i.prototype._changed=function(){null!=this._owner&&this._owner.editCommandStackChanged(this,this.canUndo,this.canRedo)},i.prototype.$_shrink=function(t){if(t>=0&&t=t;e--)this._commands[e].dispose();this._commands.splice(t,this._commands.length-t)}},i}(i.EventAware);return Bt.EditCommandStack=s,Bt}function At(){if(Lt)return Pt;Lt=1,Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.LocalDataCommandStack=Pt.LocalDataEditCommand=Pt.DataEditCommand=void 0;var t=d,e=Vt(),i=S(),o=function(e){function o(t){var i=e.call(this)||this;return i._ds=t,i}return t.__extends(o,e),o.prototype._doDispose=function(){this._ds=null,this._save=null,e.prototype._doDispose.call(this)},o.prototype.redo=function(t){return t?this._doRedo(this._ds,this._save):this._save=this._doRun(this._ds),this._save&&this._save.result},o.prototype.undo=function(){this._doUndo(this._ds,this._save)},o.prototype._setSoftDeleting=function(t,e){t._softDeleting=e},o.prototype._setDeleteCreated=function(t,e){t._deleteCreated=e},o.prototype._cloneRow=function(t){if(i.Utils.isArray(t))return t.slice();if(t){var e={};for(var o in t)e[o]=t[o];return e}},o.prototype._cloneValues=function(t,e,o){if(void 0===e&&(e=0),void 0===o&&(o=-1),t){var n=t.length,r=[];o<0&&(o=n),e=Math.max(0,e);for(var s=Math.min(n,e+o),a=e;a0&&a.push(u.join("")),a.length>0&&s.push(a),i>0&&(o<=0?s.splice(0,i):s=s.splice(i,o));for(var _=t.getFields(),f=_.length,g=f>0,m=0,y=s.length;mf&&(a.length=f);for(var v=0;v=0){var c=d.nodeValue;null==c&&d.hasChildNodes()&&(c=i.Utils.included(d.childNodes[0].nodeType,3,4)?d.childNodes[0].nodeValue:void 0),null!=c&&(a[u]=c)}}for(l=0;l0||r.length>0)&&t._fireRefresh()},o}(e.LocalDataEditCommand);return Jt.ClearRowStatesDataCommand=o,Jt}(),m=function(){if(Qt)return te;Qt=1,Object.defineProperty(te,"__esModule",{value:!0}),te.UpdateRowsDataCommand=void 0;var t=d,e=function(e){function i(t,i,o,n,r,s,a){var l=e.call(this,t)||this;return l._row=i,l._values=l._cloneValues(o,n,r),l._start=0,l._count=l._values.length,l._rowEvents=s,l._strict=a,l}return t.__extends(i,e),i.prototype._doDispose=function(){this._values=null,e.prototype._doDispose.call(this)},i.prototype._doRun=function(t){var e={};return t.$_updateRows(this._row,this._values,this._start,this._count,this._strict,this._rowEvents,e),e},i.prototype._doRedo=function(t,e){t.$_updateRows(this._row,this._values,this._start,this._count,this._strict,this._rowEvents,null)},i.prototype._doUndo=function(t,e){var i=e.rows;if(i&&!(i.length<1)){for(var o=e.values,n=e.states,r=e.orgValues,s=0;s0&&t._fireRefresh(),s=0;sthis._newCount){var i=e.rows,o=e.statedRows;if(i.length<1&&o.length<1)return;for(var n=e.rowSaves,r=e.states,s=0;s0&&t.fireRowStatesChanged(o,(0,i.isDeletedState)(this._state))},o}(e.LocalDataEditCommand);return we.SetRowStatesDataCommand=o,we}(),L=function(){if(xe)return Ie;xe=1,Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.RestoreRowsDataCommand=void 0;var t=d,e=function(e){function i(t,i){var o=e.call(this,t)||this;return o._rows=i&&i.slice(),o}return t.__extends(i,e),i.prototype._doDispose=function(){this._rows=null,e.prototype._doDispose.call(this)},i.prototype._doRun=function(t){var e={};return t.$_restoreUpdatedRows(this._rows,e),e},i.prototype._doRedo=function(t,e){t.$_restoreUpdatedRows(this._rows,null)},i.prototype._doUndo=function(t,e){var i=e.rows;if(i&&!(i.length<1)){for(var o=0;o=0){for(var i=this._values.length,n=0;n=0){for(var i=0,n=this._values;ia&&(i||o)){var d=this.fieldCount,c=o;if(!c||c instanceof Array||(c=this.objectToRow(c)),c&&c.length<1&&(c=null),i||c)for(var p=c?Math.min(c.length,d):0,_=a;_0)for(g=0;ga)for(_=a;_0)for(_=a-1;_>=l;_--)(0,e.isDeletedState)(u[_])&&this._deletedCount--}n=this.checkStates&&n?n:e.RowState.NONE,s.length=h.length=u.length=l,this._orgValues&&this._orgValues.length>l&&(this._orgValues.length=l);for(_=a;_=0;_--){g=this._hiddenIds[_];h.indexOf(g)<0&&this._hiddenIds.splice(_,1)}this.tags.setRowCount(l),this._fireRefresh(),this._fireRowCountChanged()}}},d.prototype.$_clearRows=function(){this._values.length=0,this._rowIds.length=0,this._rowStates.length=0,this._hiddenIds.length=0,this._previousStates.length=0,this._orgValues?this._orgValues.length=0:this._orgValues=null,this._deletedCount=0,this.clearCommandStack(),this.tags.clearRows()},d.prototype.clearRows=function(){this._checkClientState()&&(this.$_clearRows(),this._fireRefresh(),this._fireRowCountChanged(),this.fireDataLoadComplated())},d.prototype.setRows=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=-1),this._checkClientState()&&0!=i){this.refreshFieldFormats(),this.beginUpdate();try{this.$_clearRows();var o=this.checkStates,n=this.filters,r=this.filterRuntime,s=void 0;if(t&&(s=t.length)>0&&ee){this._values.length=this._rowIds.length=this._rowStates.length=a-e;for(l=0,u=e;uthis._values.length)throw new i.DataSourceError(O.Messages.messages.rowOutOfBounds+t);this.refreshFieldFormats(),o=Math.max(0,o);var a=Math.min(s,o+n);if(r)for(var l=t,h=o;h=0;l--)n[l]=this._convertValues(n[l],e);this.insertRows(o,n)},d.prototype.appendRowsFrom=function(t,e,i){this.insertRowsFrom(t,e,i,this.rowCount)},d.prototype.insertXmlRows=function(t,e,i,o,n){void 0===i&&(i=0),void 0===o&&(o=-1),void 0===n&&(n=!1),this._checkClientState()&&(e=w.DataHelper.xmlToArray(this,e,i,o),this.insertRows(t,e,0,-1,n))},d.prototype.appendXmlRows=function(t,e,i,o){void 0===o&&(o=!1),this.insertXmlRows(this.rowCount,t,e,i,o)},d.prototype.fillValue=function(t,e){if(this.undoable)return this._commands.execute(new E.FillValueDataCommand(this,t,e));this.$_fillValue(t,e)},d.prototype.updateRows=function(t,e,i,o,n,r){if(void 0===r&&(r=!1),this.undoable)return this._commands.execute(new m.UpdateRowsDataCommand(this,t,e,i,o,r,n));this.$_updateRows(t,e,i,o,n,r)},d.prototype.updateRows2=function(t,e,i){if(this.undoable)return this._commands.execute(new T.UpdateRowsDataCommand2(this,t,i,e));this.$_updateRows2(t,e,i)},d.prototype.updateXmlRows=function(t,e,i,o,n){void 0===n&&(n=!1),this._checkClientState()&&(e=w.DataHelper.xmlToArray(this,e,i,o),this.updateRows(t,e,0,-1,n))},d.prototype.getValue=function(t,e){this.$_checkRowIndex(t),this._checkFieldIndex(e);var i=this._values[t];return i?i[e]:void 0},d.prototype.setValue=function(t,e,i){return this.undoable?this._commands.execute(new h.SetValueDataCommand(this,t,e,i)):this.$_setValue(t,e,i)},d.prototype.$_setValue=function(t,o,n){if(!this._checkClientState())return!1;this.$_checkRowIndex(t),this._checkFieldIndex(o);var r=this.getField(o),s=this._rowStates[t];if(!r)throw new i.DataSourceError(O.Messages.messages.fieldIndexOutOfBounds+o);if(!r.updatable&&(s==e.RowState.NONE||s==e.RowState.UPDATED))return!1;var a,l=this._values[t],h=r.readValue(n);if(l&&r.equalValues(h,l[o]))return!1;this.refreshFieldFormat(r);var u=this.checkStates&&(s==e.RowState.NONE||!s);return l||(this._values[t]=l=new Array(this.fieldCount)),u&&this._orgValues&&(a=l.concat()),l[o]=h,this._internalCalculateValues(l,t),u?(a&&(this._orgValues[t]=a),this.$_changeRowState(t,e.RowState.UPDATED,!0)):this._needRestore&&this.restoreState(t),this.tags.setValue(t,o),this.fireValueChanged(t,o),!0},d.prototype.updateRow=function(t,e,i){return this.undoable?this._commands.execute(new u.UpdateRowDataCommand(this,t,e,i)):this.$_updateRow(t,e,i)},d.prototype.getRow=function(t){this.$_checkRowIndex(t);var e=this._values[t];return e?e.slice():[]},d.prototype.getRows=function(t,e){void 0===t&&(t=0),void 0===e&&(e=-1);var i=this._values.length,o=Math.max(0,t),n=e<0?i-1:Math.min(i-1,e);if(o>=i||n=o||r=o||i=0&&t0},d.prototype.insertRow=function(t,e){return this.undoable?this._commands.execute(new c.InsertRowDataCommand(this,t,e)):this.$_insertRow(t,e)},d.prototype.$_insertRow=function(t,e,o){if(void 0===o&&(o=void 0),!this._checkClientState())return!1;if(t<0||t>this._values.length)throw new i.DataSourceError(O.Messages.messages.rowOutOfBounds+t);return this.refreshFieldFormats(),!(!e||!this.fireRowInserting(t,e))&&(n.Utils.isArray(e)||(e=this.objectToRow(e)),this.$_internalInsertRow(t,e,!0,null),o&&this._yieldStates(t,o),this.fireRowInserted(t),this._fireRowCountChanged(),!0)},d.prototype.appendRow=function(t){var e=this.rowCount;return this.insertRow(e,t)?e:-1},d.prototype.removeRow=function(t){if(this.undoable){if(this.softDeleting&&this.checkStates)switch(this._rowStates[t]){case e.RowState.CREATED:if(!this.deleteCreated)return this._commands.execute(new f.ChangeRowStateDataCommand(this,t,e.RowState.CREATE_AND_DELETED));break;case e.RowState.DELETED:case e.RowState.CREATE_AND_DELETED:return;default:return this._commands.execute(new f.ChangeRowStateDataCommand(this,t,e.RowState.DELETED))}return this._commands.execute(new p.RemoveRowDataCommand(this,t))}return this.$_removeRow(t)},d.prototype.$_removeRow=function(t){if(!this._checkClientState())return!1;if(this.$_checkRowIndex(t),this.softDeleting&&this.checkStates){switch(this._rowStates[t]){case e.RowState.CREATED:this.deleteCreated?this.$_deleteRow(t):this.$_changeRowState(t,e.RowState.CREATE_AND_DELETED,!0,!0);break;case e.RowState.DELETED:case e.RowState.CREATE_AND_DELETED:break;default:this.$_changeRowState(t,e.RowState.DELETED,!0,!0)}return!0}return this.$_deleteRow(t)},d.prototype.removeRows=function(t,e){void 0===e&&(e=!1),this.undoable?this._commands.execute(new y.RemoveRowsDataCommand(this,t,e)):this.$_removeRows(t,e,null)},d.prototype.$_removeRows=function(t,i,o){if(this._checkClientState()){var n,r=this.deleteCreated;if(t&&!((n=t.length)<1)){if(t=t.slice(),o&&(o.rows=[],o.rowSaves=[],o.statedRows=[],o.states=[]),this.softDeleting&&this.checkStates){for(var s=i?null:[],a=n;a--;){var l=t[a],h=this._rowStates[l],u=!1;switch(this.$_checkRowIndex(l),h){case e.RowState.CREATED:r||(o&&(o.statedRows.push(l),o.states.push(h)),u=this.$_changeRowState(l,e.RowState.CREATE_AND_DELETED,i,!1),t.splice(a,1));break;case e.RowState.DELETED:case e.RowState.CREATE_AND_DELETED:t.splice(a,1);break;default:o&&(o.statedRows.push(l),o.states.push(h)),u=this.$_changeRowState(l,e.RowState.DELETED,i,!1),t.splice(a,1)}s&&u&&s.push(l)}i||s&&s.length>0&&this.fireRowStatesChanged(s,!0)}if((n=t.length)>0){if(n>1&&t.sort((function(t,e){return t-e})),o)for(a=0;a0&&this.fireRowStatesChanged(a)}},d.prototype.clearRowStates=function(t,e){void 0===e&&(e=!1),this.undoable?this._commands.execute(new g.ClearRowStatesDataCommand(this,t,e)):this.$_clearRowStates(t,e)},d.prototype.$_clearRowStates=function(t,i,o){if(void 0===i&&(i=!1),void 0===o&&(o=!1),this._checkClientState()){for(var n=[],r=o?this._rowStates.slice():null,s=o?[]:null,a=o?this._rowIds.slice():null,l=this._rowStates.length;l--;){var h=this._rowStates[l];switch(s&&(s[l]=null),h){case e.RowState.CREATE_AND_DELETED:case e.RowState.DELETED:if(t){if(n.push(l),s){var u=this._keepRow(l);u&&(s[l]=u.values)}i?this.$_deleteRow(l):(this.$_internalRemoveRow(l),this.tags.removeRow(l),this._deletedCount--)}else this.$_changeRowState(l,e.RowState.NONE,i);break;default:this.$_changeRowState(l,e.RowState.NONE,i)}}return this.$_resetOrgValues(),i||(n.length>0&&(this.fireRowsRemoved(n),this._fireRowCountChanged()),this.fireRowStatesCleared()),o?{rows:n,states:r,values:s,rowIds:a}:void 0}},d.prototype.$_restoreStates=function(t,e){this.fireRowStatesChanged(t)},d.prototype.getStateRows=function(t){var e=[];if(t)for(var i=0,o=this._rowStates.length;i1)for(var n=0;n=0&&o++}else for(r=t[0],n=0;nr?o[r]:void 0,l=i.length>r?i[r]:void 0,h=this.getField(r);if(n){if(!h.equalValues(a,l))return!1}else if(!h.sameValues(a,l))return!1}return this._rowStates[t]=e.RowState.NONE,!0}}return!1},d.prototype.restoreUpdatedStates=function(t){if(this._orgValues&&this._checkClientState()){var e=[];if(null!=t)for(var i=0,o=t.length;i=0&&n0&&this.fireRowStatesChanged(e)}},d.prototype.$_restoreUpdatedRow=function(t,i){var o=this._rowStates[t];if(o===e.RowState.UPDATED){var n=this._orgValues[t];if(n){var r=this._values[t];if(i)i[t]={state:o,values:r.slice(),orgValues:n.slice()},(i.rows||(i.rows=[])).push(t);for(var s=0,a=Math.min(n.length,this.fieldCount);s=0&&r0&&(e&&(e.rows=i.slice()),this.fireRestoreRows(i),this.fireRowStatesChanged(i))}},d.prototype._reCalculateFields=function(t){var e=this;this._values.forEach((function(i,o){e._internalCalculateValues(i,o,t)}))},d.prototype.getUpdatedCells=function(t){var i=this.restoreMode;if(!this._orgValues||i!=s.RestoreMode.AUTO&&i!=s.RestoreMode.EXPLICIT)return null;if(null==t&&(t=this.getStateRows(e.RowState.UPDATED)),null==t)return null;for(var o=[],n=0,r=t.length;n=0&&this._orgValues&&ac?h[c]:void 0,f=l.length>c?l[c]:void 0,g=this.getField(c);g.calculated||(u?g.equalValues(_,f)||d.push({fieldName:this.getOrgFieldName(c),oldValue:l[c],newValue:h[c]}):g.sameValues(_,f)||d.push({fieldName:this.getOrgFieldName(c),oldValue:l[c],newValue:h[c]}))}d.length>0&&o.push({__rowId:a,updatedCells:d})}}return o},d.prototype._doRestoreModeChanged=function(){this.$_resetOrgValues()},d.prototype.findRow=function(t,e,i){if(void 0===i&&(i=0),t.length<1||e.length=0&&l0&&o>0){for(var n=new Array(o),r=0;r=0;e--){var i=this._points[e];if(i.id==t){this.$_removeSavePoints(e+1),this.setRows(i.data);var o=i.states;o&&(this._rowStates=o.concat());break}}},d.prototype.$_removeSavePoints=function(t){for(var e=this._points,i=e.length-1;i>=t;i--){e[i].data=null,e.pop()}},d.prototype.clearSavePoints=function(){this.$_removeSavePoints(0)},d.prototype.getSavePoints=function(){for(var t=[],e=0,i=this._points.length;e1?e:-1,this._checkFieldIndex(t),e<0&&(e=this._values.length),e>0){for(var r=this.getField(t).dataType,s=[],l=void 0,h=0,u=this.rowCount;h(l=n?String(l).toLowerCase():l)?1:aa?1:ss)&&(s=m))}if(t.count=o,h>0)if(t.sum=n,t.min=r,t.max=s,l&&(t.avg=n/o),t.dataCount=h,l&&(t.dataAvg=n/h),i&&l){for(var p=0,_=t.avg,f=0;f=this._values.length)throw n.Utils.isDebugging(),new i.DataSourceError(O.Messages.messages.rowOutOfBounds+t)},d.prototype.$_resetOrgValues=function(){var t=this.restoreMode;this._orgValues=this.checkStates&&t!=s.RestoreMode.NONE?[]:null,this._needRestore=this._orgValues&&t==s.RestoreMode.AUTO},d.prototype.arrayToRow=function(t,e){for(var i=Math.min(t?t.length:0,this.fieldCount),o=new Array(i),n=0;n0&&this.fireRowStatesChanged(f),this.tags.updateRows(t,n=u-o),this.fireRowsUpdated(t,n)}}}},d.prototype.$_updateRows2=function(t,i,o,n){var r=this;if(this._checkClientState()&&t)if(this.refreshFieldFormats(),n&&(n.rows=[],n.values=[],n.states=[],n.orgValues=[]),Object.keys(t).forEach((function(t){return r.$_checkRowIndex(parseInt(t))})),o)for(var s in t){var a=Number(s),l=t[s],h=this.$_createValue(l,this._values[a]);!this._values[a]&&(this._values[a]=new Array(this.fieldCount)),this.fireRowUpdating(a,h,this._values[s].slice())&&(n&&(n.rows.push(a),n.values.push(this._values[a].slice()),n.states.push(this._rowStates[a]),n.orgValues.push(this._orgValues&&this._orgValues[a])),this.$_internalUpdateRow(a,l,i,!0,!0),this.fireRowUpdated(a))}else{var u=[],d=[];for(var s in t){a=Number(s);this._rowStates[a]==e.RowState.NONE&&u.push(a),!this._values[a]&&(this._values[a]=new Array(this.fieldCount)),n&&(n.rows.push(a),n.values.push(this._values[a].slice()),n.states.push(this._rowStates[a]),n.orgValues.push(this._orgValues&&this._orgValues[a]));l=t[s];this.$_internalUpdateRow(a,l,i,!1,!1),d.push(a)}u.length>0&&this.fireRowStatesChanged(u),this.tags.updateRowList(d),this.fireRowListUpdated(d)}},d.prototype.$_fillValue=function(t,i,o){if(void 0===o&&(o=null),this._checkClientState()&&Object.keys(t).length){this.refreshFieldFormats(),o&&(o.rows=[],o.values=[],o.states=[],o.orgValues=[]);var n=[],r=[];for(var s in t){r.push(+s),this._rowStates[s]==e.RowState.NONE&&n.push(+s),!this._values[s]&&(this._values[s]=new Array(this.fieldCount)),o&&(o.rows.push(s),o.values.push(this._values[s].slice()),o.states.push(this._rowStates[s]),o.orgValues.push(this._orgValues&&this._orgValues[s]));for(var a=this._values[s].slice(),l=0,h=t[s];l0&&this.fireRowStatesChanged(n),this.tags.updateRowList(r),this.fireRowListUpdated(r)}},d.prototype.$_internalUpdateRow=function(t,i,o,r,s){var a,l=this.getFields(),h=n.Utils.isArray(i),u=Math.min(l.length,h?i.length:l.length),d=this._values[t],c=this._rowStates[t],p=this.checkStates&&(c==e.RowState.NONE||!c);d||(this._values[t]=d=new Array(this.fieldCount)),p&&this._orgValues&&(a=n.Utils.deepCopy(d));for(var _=!1,f=0;fr?o[r]:void 0,l=i.length>r?i[r]:void 0;if(n){if(!this.getField(r).equalValues(a,l))return!1}else if(!this.getField(r).sameValues(a,l))return!1}return this._rowStates[t]=e.RowState.NONE,!0}}return!1},d.prototype.prepareOrgValues=function(t,i,o){o==e.RowState.UPDATED?i==e.RowState.DELETED&&this._orgValues[t]||(this._orgValues[t]=this._values[t]?this._values[t].concat():[]):i==e.RowState.UPDATED&&this._orgValues[t]&&(this._orgValues[t]=void 0)},d.prototype.$_changeRowStateEx=function(t,e,i,o){var n=this._rowStates[t];return!!this.$_changeRowState(t,e,!1,o)&&(this._orgValues&&this.prepareOrgValues(t,n,e),i&&this.fireRowStateChanged(t,n),!0)},d.prototype.$_getRowObject=function(t,e){var i={},o=this._values[t];if(o){for(var n=0;n=0&&this._hiddenIds.splice(this._hiddenIds.indexOf(e),1),this._values.splice(t,1),this._rowIds.splice(t,1),this._orgValues&&this._orgValues.length>t&&this._orgValues.splice(t,1),this._rowStates.splice(t,1)},d.prototype.$_internalMoveRow=function(t,e){var i=this._values[t],o=this._rowIds[t],n=this._rowStates[t],r=this._previousStates[t];this._values.splice(t,1),this._rowIds.splice(t,1),this._rowStates.splice(t,1),this._previousStates.splice(t,1),this._values.splice(e,0,i),this._rowIds.splice(e,0,o),this._rowStates.splice(e,0,n),this._previousStates.splice(e,0,r),this._orgValues&&(this._orgValues.length=Math.max(this._orgValues.length,e+1),i=this._orgValues[t],this._orgValues.splice(t,1),this._orgValues.splice(e,0,i))},d.prototype.$_internalMoveRows=function(t,e,i){for(var o=this._values.splice(t,e),n=this._rowIds.splice(t,e),r=this._rowStates.splice(t,e),s=this._previousStates.splice(t,e),a=0,l=o.length;a=0;s--){var a=t[s];i.push(this._values.splice(a,1)[0]),o.push(this._rowIds.splice(a,1)[0]),n.push(this._rowStates.splice(a,1)[0]),r.push(this._previousStates.splice(a,1)[0])}i=i.reverse(),o=o.reverse(),n=n.reverse(),r=r.reverse();s=0;for(var l=t.length;s=0;s--)i.push(this._orgValues.splice(t[s],1)[0]);i=i.reverse();for(s=0,l=t.length;s=r:m<=r;_?m--:m++){var y=!0;for(g=0;g0&&o&&o.length>0){for(var s=i.length,a=[],l=0;l=0&&a.push(u)}else a.push(h)}if(a.length>0){s=this.rowCount;var d=t.reverse;n=d?Math.min(s,n):Math.max(0,n),(e=(d?n>-1:n0)&&(e=this.$_searchDataRow(a,o,t,d?s-1:0,d?n+1:n-1))}}return e},d.prototype.$_searchData=function(t,e,i,o,r,s){var l=this.rowCount;if(l<1)return null;for(var h=i.caseSensitive,u=i.partialMatch,d=this.fieldCount,c=t.length,p=i.reverse,_=null,f=[],g=0;g=t.length&&(o++,s=0);for(var m=i.compareCallback||n.Utils.compareTextValue,y=o;p?y>=r:y<=r;p?y--:y++)for(g=p?yo?0:s;p?g>=0:g=0&&v0&&null!=i))return null;s.forEach((function(t){a.push(e.getFieldIndex(t))})),t instanceof r.SearchCellOptions||(t.reverse&&(t.hasOwnProperty("startIndex")||(t.startIndex=o-1),t.hasOwnProperty("startFieldIndex")||(t.startFieldIndex=a.length-1)),t=new r.SearchCellOptions(t));var l=null,h=t.reverse,u=a.length,d=h?Math.min(o-1,t.startIndex):Math.max(0,t.startIndex),c=h?0:o-1,p=h?Math.min(u-1,t.startFieldIndex):Math.max(0,t.startFieldIndex),_=h?d0||p>0;return!(l=(h?d>=0&&p>=0:d=0&&(o.push(i[r]),this._hiddenIds.splice(l,1))}}o.length&&this.fireRowHided(o,e)}},d.prototype.hideRows=function(t){this.$_hideRows(t,!0)},d.prototype.showRows=function(t){this.$_hideRows(t,!1)},d.prototype.clearHiddenRows=function(){this._hiddenIds.length>0&&this.fireRowHided(this._hiddenIds.splice(0),!1)},d.prototype.getHiddenRows=function(){for(var t=[],e=0,i=this._hiddenIds.length;e=0&&t.push(o)}return t.sort((function(t,e){return t-e})),t},d.prototype.isHiddenRow=function(t){var e=this._rowIds[t];return this._hiddenIds.indexOf(e)>=0},_dp(d,"hiddenCount",{get:function(){return this._hiddenIds.length}}),d.prototype.undo=function(){this.canUndo&&this._commands.undo()},d.prototype.redo=function(){this.canRedo&&this._commands.redo(!0)},d.prototype.clearCommandStack=function(){this._commands&&this._commands.flush()},d}(o.DataProvider);return M.LocalDataProvider=P,M}var Se,Re={},Te={};var De,ke,Me,Oe={},Fe={},Le={};function Pe(){if(De)return Le;De=1,Object.defineProperty(Le,"__esModule",{value:!0}),Le.XmlUtils=void 0;var t=function(){function t(){}return t.parse=function(t){return(new window.DOMParser).parseFromString(t,"text/xml")},t.toString=function(t){return(new window.XMLSerializer).serializeToString(t)},t.getNodeValue=function(t){return t.firstChild.nodeValue},t.getAttr=function(t,e){return t.getAttribute(e)},t.setAttr=function(t,e,i){t.setAttribute(e,i)},t.addChild=function(t,e,i){var o=t.createElement(i);return e.appendChild(o),o},t.addChildWithAttr=function(t,e,i,o,n){var r=t.createElement(i);return r.setAttribute(o,n),e.appendChild(r),r},t.addChildWithValue=function(t,e,i,o){var n=t.createElement(i);return n.nodeValue=o,e.appendChild(n),n},t.parseXml=function(t){var e=null;try{(e=new ActiveXObject("Microsoft.XMLDOM")).async=!1,e.loadXML(t)}catch(i){if(e)throw i;e=(new window.DOMParser).parseFromString(t,"text/xml")}return e},t}();return Le.XmlUtils=t,Le}function Be(){return ke||(ke=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DataLoader=t.DataFillOptions=t.DataFillMode=t.DataPath=void 0;var e=d,i=G(),o=S(),n=Pe(),r=ae();function s(t,e){var i=[];if(t){var o=t.childNodes;if(o)for(var n=0,r=o.length;n0&&a>s){var l=r.substring(0,s),h="$"!=l?i[l]:i;if(Array.isArray(h)){l=r.substring(s+1,a);var u=parseInt(l);i=u>=0&&u0&&l>a){var h=r.substring(0,a);if(i=s(i?i[0]:t,h))h=r.substring(a+1,l),i=i[parseInt(h)]}else i=s(i?i[0]:t,r);if(!i)break}}return i},i}(i.Base);t.DataPath=l,function(t){t.SET="set",t.APPEND="append",t.INSERT="insert",t.UPDATE="update"}(a=t.DataFillMode||(t.DataFillMode={}));var h=function(t){function i(e){var i=t.call(this)||this;if(i.fillMode=a.SET,i.fillPos=0,i.count=-1,i.rootArray=!0,i.rows="row",i.start=0,i.delimiter=",",i.quoted=!1,i.parentId=0,i.childrenField=null,i.treeField=null,i.iconField=null,i.needSorting=!1,i.noStates=!1,e){for(var o in e)null!=e[o]&&(i[o]=e[o]);i.parentId=e.parentId||e.parent,i.childrenField=e.childrenField||e.children,i.treeField=e.treeField||e.tree,i.iconField=e.iconField||e.icon,i.needSorting=e.needSorting||e.sorting}return i}return e.__extends(i,t),i}(i.Base);t.DataFillOptions=h;var u=function(t){function i(e){var i=t.call(this)||this;return i._provider=e,i}return e.__extends(i,t),i.prototype._doDispose=function(){this._provider=null},i.prototype.load=function(t,e,i){var o=new h(i);if(this._checkEmpty(e,o))return 0;var n=this._provider.checkStates;o.noStates&&(this._provider.checkStates=!1);try{switch(t){case"json":return this._loadJson(e,o);case"xml":return this._loadXml(e,o);case"csv":return this._loadCsv(e,o)}}finally{this._provider.checkStates=n,this._provider.fireDataLoadComplated()}},i.prototype._loadJson=function(t,e){"string"==typeof t&&(t=JSON.parse(t));var i=null;if(e.rootArray&&(i=o.Utils.isArray(t)?t:null),i||(i=l.extractJson(t,e.rows)),i){var n=e.fillPos,r=e.start,s=e.count;switch(e.fillMode){case a.APPEND:this._provider.appendRows(i,r,s);break;case a.INSERT:this._provider.insertRows(n,i,r,s);break;case a.UPDATE:this._provider.updateRows(n,i,r,s,!1);break;case a.SET:default:this._provider.setRows(i,r,s)}return i.length}return this._fillEmpty(e),0},i.prototype._loadXml=function(t,e){if("string"==typeof t&&(t=n.XmlUtils.parse(t)),t&&t.documentElement){var i=e.fillPos,o=e.start,r=e.count,s=e.rows,h=l.extractXml(t.documentElement,s);switch(e.fillMode){case a.APPEND:this._provider.appendXmlRows(h,o,r);break;case a.INSERT:this._provider.insertXmlRows(i,h,o,r);break;case a.UPDATE:this._provider.updateXmlRows(i,h,o,r);break;case a.SET:default:this._provider.setXmlRows(h,o,r)}return h.length}return this._fillEmpty(e),0},i.prototype._loadCsv=function(t,e){var i=e.fillPos,o=e.start,n=e.count,s=e.quoted,l=e.delimiter,h=r.DataHelper.csvToArray(this._provider,t,o,n,s,l);if(h&&(n=h.length)>0){switch(e.fillMode){case a.APPEND:this._provider.appendRows(h,0,n);break;case a.INSERT:this._provider.insertRows(i,h,0,n);break;case a.UPDATE:this._provider.updateRows(i,h,0,n,!1);break;case a.SET:default:this._provider.setRows(h,0,n)}return h.length}return this._fillEmpty(e),0},i.prototype._fillEmpty=function(t){t.fillMode===a.SET&&this._provider.setRows(null)},i.prototype._checkEmpty=function(t,e){return!t&&(this._fillEmpty(e),!0)},i}(i.Base);t.DataLoader=u}(Fe)),Fe}var Ve,Ae,Ne={},$e={};function Ue(){if(Ve)return $e;Ve=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.LocalTreeDataCommandStack=$e.LocalTreeDataCommand=void 0;var t=d,e=At(),i=Vt(),o=function(e){function i(t){return e.call(this,t)||this}return t.__extends(i,e),i.prototype._keepChildren=function(t,e,i){for(var o=0;o=0;)t.push(e),e=e.parent;return t}}),_dp(h,"rowState",{get:function(){return o.RowState.NONE}}),_dp(h,"prevRowState",{get:function(){}}),_dp(h,"values",{get:function(){return null}}),h.prototype.getChild=function(t){if(t>=0){if(!this._children||t>=this._children.length)throw new RangeError("Index is invalid: "+t);return this._children[t]}throw new RangeError("Index is invalid: "+t)},h.prototype.getChildObjects=function(t,e,i,o,n,r){void 0===r&&(r=-1);var s=this._children;if(s){var a=[];e=e||"rows",i=i||"iconIndex";for(var l=0,h=s.length;l=0&&a=i)throw new e.DataSourceError(s.Messages.messages.fieldIndexOutOfBounds+t)},h.prototype._descendantCountChanged=function(t){this._descendantCount+=t;var e=this.parent;e&&e._descendantCountChanged(t)},h.prototype._moveChild=function(t,e){if(t!=e){if(t<0||t>=this._children.length)throw new RangeError("index is out of range: "+t);if(e<0||e>=this._children.length)throw new RangeError("newIndex is out of range: "+e);var i=this._children[t];if(t>e)for(var o=t;o>e;o--)this._children[o]=this._children[o-1];else for(o=t;o=this._children.length)throw new RangeError("index is out of range: "+t[0]);if(e<0||e>=this._children.length)throw new RangeError("newIndex is out of range: "+e);for(var o=this._children,n=[],r=t.length-1;r>=0;r--)n.push(o.splice(t[r],1)[0]);for(r=0;rt._children.length)throw new RangeError("index is out of range: "+e);var i=this.parent,o=this.index;i._children.splice(o,1),i._descendantCountChanged(-1-this.descendantCount),i._detach(this),t._children.splice(e,0,this),t._descendantCountChanged(1+this.descendantCount),t._attach(this)},h.prototype._insertChild=function(t,e,i,n){var r=this.provider;if(r&&!i){if(!r._checkClientState())return!1;r.refreshFieldFormats()}if(!e)throw new Error("child is null");if(this._children=this._children||[],t<0||t>this._children.length)throw new RangeError("Insert index is invalid: "+t);return!(!i&&!this._doChildAdding(t,e))&&(this._children.splice(t,0,e),this._descendantCountChanged(1+e.descendantCount),this._attach(e),n||e._changeRowState(o.RowState.CREATED,!0,!1),this._doChildAdded(t,e),!0)},h.prototype._insertChildren=function(t,e,i,n){var r=this.provider;if(r&&!i){if(!r._checkClientState())return!1;r.refreshFieldFormats()}if(this._children=this._children||[],t<0||t>this._children.length)throw new RangeError("Insert index is invalid: "+t);if(i||this._doRowsAdding(t,e)){for(var s=0,a=0;a0)for(var l=t.children,h=t.count;h--;)t._removeChild(l[h],e,i,a&&a.children)}return!1}},h.prototype._removeChildren=function(){this._children&&this._children.length>0&&(this._children.splice(0,this._children.length),this._descendantCountChanged(-this._descendantCount),this._doCleared())},h.prototype._setChildren=function(t){this._children&&this._children.length>0&&this._children.splice(0,this._children.length);var e,i=-this._descendantCount;if(t&&(e=t.length)>0){this._children||(this._children=[]);for(var o=0;o=0&&this._commandListeners.splice(e,1)},i.prototype._keepCommandStates=function(t){if(this._commandListeners.length>0)return this._commandListeners[0].getCommandStates(t)},i.prototype._yieldCommandStates=function(t,e){if(this._commandListeners.length>0)return this._commandListeners[0].setCommandStates(t,e)},i.prototype._fireDispose=function(){this.fireEvent("onTreeDataProviderDisposed")},i.findSave=function(t,e){if(e)for(var i=0,o=e;i=0&&(this._tags.splice(e,1),t.disconnect())}},i.prototype.clearRows=function(){if(this._tags)for(var t=this._tags.length;t--;)this._tags[t].clearRows()},i.prototype.setRows=function(){if(this._tags)for(var t=this._tags.length;t--;)this._tags[t].setRows()},i.prototype.addRow=function(t){if(this._tags)for(var e=this._tags.length;e--;)this._tags[e].addRow(t)},i.prototype.addRows=function(t){if(this._tags)for(var e=this._tags.length;e--;)this._tags[e].addRows(t)},i.prototype.removeRow=function(t){if(this._tags)for(var e=this._tags.length;e--;)this._tags[e].removeRow(t)},i.prototype.removeRows=function(t){if(this._tags)for(var e=this._tags.length;e--;)this._tags[e].removeRows(t)},i.prototype.updateRow=function(t){if(this._tags)for(var e=this._tags.length;e--;)this._tags[e].updateRow(t)},i.prototype.updateRows=function(t){if(this._tags)for(var e=this._tags.length;e--;)this._tags[e].updateRows(t)},i}(G().Base);return Te.TreeDataTagCollection=e,Te}(),r=function(){if(Me)return Oe;Me=1,Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.XmlTreeSource=Oe.JsonTreeSource=Oe.CsvTreeSource=Oe.ArrayTreeSource=Oe.TreeDataSource=void 0;var t=d,e=G(),i=ae(),o=Be(),n=Pe(),r=function(e){function i(t,i){var o=e.call(this)||this;return o._rowCount=0,o._ds=t,o._rootRow=i,o}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(i,"provider",{get:function(){return this._ds}}),_dp(i,"rootRow",{get:function(){return this._rootRow}}),_dp(i,"insertedRows",{get:function(){return this._rows}}),_dp(i,"insertedCount",{get:function(){return this._rowCount}}),i.prototype._prepareLoad=function(t){this._rowCount=0,this._rows=[]},i.prototype._createRow=function(t,e,i){return this._ds.createRow(i,isNaN(i[e])?-1:i[e],i[t],!1)},i.prototype._createRow2=function(t,e,i){return this._ds.createRow(i,e,t,!1)},i.prototype._rowAdded=function(t,e){this._rowCount++,this._rows&&e.parent===t&&this._rows.push(e)},i.prototype._addRow=function(t,e,i,o,n){var r=this._createRow(i,o,n);return e._insertChild(e.count,r,!0,!0),this._rowAdded(t,r),r},i.prototype._addRow2=function(t,e,i,o,n){var r=this._createRow2(i,o,n);return e._insertChild(e.count,r,!0,!0),this._rowAdded(t,r),r},i}(e.Base);Oe.TreeDataSource=r;var s=function(e){function i(t,i){return e.call(this,t,i)||this}return t.__extends(i,e),i.prototype._loadData=function(t,e,i,o,n,r){if(this._prepareLoad(e),!t||t.length<1)return this._rowCount;for(var s=this.provider,a=t.length,l=[],h=new Array(t.length),u=0;u=0);)a--;if(s<=a){if(s!=a){var h=t[s];t[s]=t[a],t[a]=h}s++,a--}}while(s<=a);o1)for(var u=e.length,d=l,c=1;c0){this.provider.beginUpdate();try{this.$_buildJsonTree(this.provider,t||this.rootRow,s,i,n,r)}finally{this.provider.endUpdate(!1)}}}return this._rowCount},i.prototype.load2=function(t,e,i,n,r,s){if(this._prepareLoad(t),e){var a=o.DataPath.extractJson(e,i);if(a&&a.length>0){this.provider.beginUpdate();try{this.$_buildJsonTree2(this.provider,t||this.rootRow,a,n,r,s)}finally{this.provider.endUpdate(!1)}}}return this._rowCount},i.prototype.$_buildJsonTree=function(t,e,i,o,n,r){var s=t.getOrgFieldNames();!function t(i,s,a,l){for(var h=l.length,u=0,d=a.length;u0&&t(i,g,m,l)}}}(this,e,i,s)},i.prototype.$_buildJsonTree2=function(t,e,i,o,n,r){var s=t.getOrgFieldNames();!function t(i,s,a,l){for(var h=l.length,u=0,d=a.length;u0&&t(i,g,m,l)}}}(this,e,i,s)},i}(r);Oe.JsonTreeSource=h;var u=function(e){function r(t,i){return e.call(this,t,i)||this}return t.__extends(r,e),r.prototype.load=function(t,e,i,r,s){if(this._prepareLoad(t),e){var a="string"==typeof e?n.XmlUtils.parseXml(e):e;if(a){var l=o.DataPath.extractXml(a.documentElement,i);if(l&&l.length>0){this.provider.beginUpdate();try{this.$_buildXmlTree(this.provider,t||this.rootRow,l,i,r,s)}finally{this.provider.endUpdate(!1)}}}}return this._rowCount},r.prototype.$_buildXmlTree=function(t,e,n,r,s,a){!function t(n,l,h,u,d){for(var c=0,p=h.length;c0&&t(n,g,m,u,d)}}(this,e,n,t.getFields(),t.getOrgFieldNames())},r}(s);return Oe.XmlTreeSource=u,Oe}(),s=K(),a=C(),l=Ot(),h=function(){if(Ae)return Ne;Ae=1,Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.UpdateTreeDataCommand=void 0;var t=d,e=function(e){function i(t,i,o,n){var r=e.call(this,t)||this;return r._rowId=i.rowId,r._values=r._cloneRow(o),r._strict=n,r}return t.__extends(i,e),i.prototype._doRun=function(t){var e={},i=t.rowById(this._rowId);return e.row=i._keepRow(t),(e.result=i.$_update(t,this._values,this._strict,!1))&&(this._newState=i.rowState),e},i.prototype._doRedo=function(t,e){var i=t.rowById(this._rowId);i&&i.$_update(t,this._values,this._strict,!1)},i.prototype._doUndo=function(t,e){var i=t.rowById(this._rowId);i&&i._yieldRow(t,e.row),e.row.state!=this._newState&&t._fireRowStateChanged(i,!1),t._rowUpdated(i)},i}(Ue().LocalTreeDataCommand);return Ne.UpdateTreeDataCommand=e,Ne}(),u=qe(),c=Ue(),p=function(){if(Xe)return Ke;Xe=1,Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.FillValueTreeDataCommand=void 0;var t=d,e=Ue(),i=S(),o=function(e){function o(t,o,n){var r=e.call(this,t)||this;return r._rowFields=i.Utils.deepCopy(o),r._value=n,r}return t.__extends(o,e),o.prototype._doRun=function(t){var e={};for(var i in this._rowFields){var o=t.rowById(+i)._keepRow(t);e[i]=o}return t.$_fillValue(this._rowFields,this._value),e},o.prototype._doRedo=function(t,e){t.$_fillValue(this._rowFields,this._value)},o.prototype._doUndo=function(t,e){var i=[];for(var o in this._rowFields){var n=t.rowById(+o);n._yieldRow(t,e[o]),i.push(n)}t._fireRowsUpdated(i)},o}(e.LocalTreeDataCommand);return Ke.FillValueTreeDataCommand=o,Ke}(),_=function(){if(Ze)return Je;Ze=1,Object.defineProperty(Je,"__esModule",{value:!0}),Je.UpdateRowsTreeDataCommand=void 0;var t=d,e=function(e){function i(t,i,o,n){var r=e.call(this,t)||this;return r._rowIds=i.map((function(t){return t.rowId})),r._values=r._cloneValues(o.slice()),r}return t.__extends(i,e),i.prototype._doRun=function(t){for(var e=[],i=this._rowIds.map((function(e){return t.rowById(e)})),o=0,n=i;o0);return t.rowById(this._parentId)._insertChild(this._index,s,!1,this._noState)?((e=s._keepRow(t,!1)).index=this._index,r&&r.length&&this._createChildren(t,s,r,e.children=[]),e.result=s.rowId):e.result=-1,e},o.prototype._doRedo=function(t,e){var i=t.createTemp();i._yieldRow(t,e,!0),e.children&&e.children.length&&this._restoreChildren(t,i,e.children);var o=t.rowById(this._parentId);o&&o._insertChild(e.index,i,!1,this._noState)},o.prototype._doUndo=function(t,e){var i=t.rowById(this._parentId),o=t.rowById(e.rowId);i&&o&&i.$_removeChild(o,this._index,!1)},o}(e.LocalTreeDataCommand);return ni.InsertNodeTreeDataCommand=o,ni}(),v=function(){if(ri)return si;ri=1,Object.defineProperty(si,"__esModule",{value:!0}),si.ChangeRowStateTreeData=void 0;var t=d,e=function(e){function i(t,i,o){var n=e.call(this,t)||this;return n._rowId=i.rowId,n._newState=o,n}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},i.prototype._doRun=function(t){var e={},i=t.rowById(this._rowId);return e.state=i&&i._keepState(t),i&&i._changeRowState(this._newState,!0,!1),e},i.prototype._doRedo=function(t,e){t.rowById(this._rowId)._changeRowState(this._newState,!0,!1)},i.prototype._doUndo=function(t,e){var i=t.rowById(this._rowId);i._yieldStates(t,e),e.state!=this._newState&&(i._changeRowState(e.state,!0,!1),t._fireRowStateChanged(i,!0))},i}(Ue().LocalTreeDataCommand);return si.ChangeRowStateTreeData=e,si}(),w=function(){if(ai)return li;ai=1,Object.defineProperty(li,"__esModule",{value:!0}),li.ChangeRowStatesTreeData=void 0;var t=d,e=function(e){function i(t,i,o,n,r){var s=e.call(this,t)||this;return s._rows=i.slice(),s._newState=o,s._force=n,s._rowEvents=r,s}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},i.prototype._doRun=function(t){for(var e=[],i=0,o=this._rows;is?o[s]:void 0,h=e.length>s?e[s]:void 0;if(r){if(!n.getField(s).equalValues(l,h))return!1}else if(!n.getField(s).sameValues(l,h))return!1}return this._state=i.RowState.NONE,!0}return!1},n.prototype.$_getUpdatedCells=function(){var t=this._orgValues,e=this._values,i=this.provider,o=i.strictRestore,n=[];if(!t||t.length<=0)return null;for(var r=0,s=i.fieldCount;rr?e[r]:void 0,l=t.length>r?t[r]:void 0,h=i.getField(r);h.calculated||(o?h.equalValues(a,l)||n.push({fieldName:i.getOrgFieldName(r),oldValue:t[r],newValue:e[r]}):h.sameValues(a,l)||n.push({fieldName:i.getOrgFieldName(r),oldValue:t[r],newValue:e[r]}))}return n},n.prototype.$_setHasChildren=function(t){this._hasChildren=t},n.prototype.$_setIconIndex=function(t){this._iconIndex=isNaN(t)?-1:t},n.prototype.$_internalUpdate=function(t,e,o){var n=!1,r=Array.isArray(t),s=this.provider;if(s){var a=Math.min(s.fieldCount,r?t.length:s.fieldCount),l=s.checkStates&&(this._state==i.RowState.NONE||!this._state),h=null;l&&s._needOrgValues&&(h=this._values.concat());for(var u=0;u=0){this.beginUpdate();try{this._clearRows(),this.refreshFieldFormats();var l=new r.ArrayTreeSource(this,this._rootRow);l.parentCallback=this._parentCallback,s=l.load(null,t,a,i,this.getFieldIndex(o),this.getFieldIndex(n)),this._checkSum(s),this.$_prepareMap()}finally{this.endUpdate(!1),this.clearCommandStack()}}return this._tags.setRows(),this._fireRefresh(),this._fireRowCountChanged(),this.fireDataLoadComplated(),s},d.prototype.setCsvRows=function(t,e,i,o,n){if(!this._checkClientState())return-1;var s=0,a=this.getFieldIndex(e);if(this._treeField=e,this._firePrepareRemain(),a>=0){this.beginUpdate();try{this._clearRows(),this.refreshFieldFormats();var l=new r.CsvTreeSource(this,this._rootRow);l.parentCallback=this._parentCallback,s=l.load(null,t,a,i,this.getFieldIndex(o),this.getFieldIndex(n)),this._checkSum(s),this.$_prepareMap()}finally{this.endUpdate(!1),this.clearCommandStack()}}return this._tags.setRows(),this._fireRefresh(),this._fireRowCountChanged(),this.fireDataLoadComplated(),s},d.prototype.setXmlRows=function(t,e,i,o){if(!this._checkClientState())return-1;var n=0;if(t){this.beginUpdate();try{this._clearRows(),this.refreshFieldFormats(),n=new r.XmlTreeSource(this,this._rootRow).load(null,t,e,this.getFieldIndex(i),this.getFieldIndex(o)),this._checkSum(n),this.$_prepareMap()}finally{this.endUpdate(!1),this.clearCommandStack()}}return this._tags.setRows(),this._fireRefresh(),this._fireRowCountChanged(),this.fireDataLoadComplated(),n},d.prototype.setJsonRows=function(t,e,i,o){if(!this._checkClientState())return-1;if(t){this.beginUpdate();try{this._clearRows(),this.refreshFieldFormats();var n=new r.JsonTreeSource(this,this._rootRow);this._rowCount=n.load(null,t,e,this.getFieldIndex(i),this.getFieldIndex(o)),this.$_prepareMap()}finally{this.endUpdate(!1),this.clearCommandStack()}}return this._tags.setRows(),this._fireRefresh(),this._fireRowCountChanged(),this.fireDataLoadComplated(),this.rowCount},d.prototype.setJsonRows2=function(t,e,i,o,n){if(!this._checkClientState())return-1;if(t){this.beginUpdate();try{this._clearRows(),this.refreshFieldFormats();var s=new r.JsonTreeSource(this,this._rootRow);this._rowCount=s.load2(null,t,e,i,o,n),this.$_prepareMap()}finally{this.endUpdate(!1),this.clearCommandStack()}}return this._tags.setRows(),this._fireRefresh(),this._fireRowCountChanged(),this.fireDataLoadComplated(),this.rowCount},d.prototype.appendDataRows=function(t,e,i,o,n,s){if(!this._checkClientState())return-1;var a=0,l=this.getFieldIndex(i);if(l>=0){var h=new r.ArrayTreeSource(this,this._rootRow);h.parentCallback=this._parentCallback,this.beginUpdate();try{this.refreshFieldFormats(),a=h.load(t,e,l,o,this.getFieldIndex(n),this.getFieldIndex(s))}finally{if(this.endUpdate(!1),a>0){var u=h.insertedRows;u&&(a=u.length)>0&&this._rowsAdded(t,u)}}}return a},d.prototype.appendCsvRows=function(t,e,i,o,n,s){if(!this._checkClientState())return-1;var a=0,l=this.getFieldIndex(i);if(l>=0){this.beginUpdate();try{this.refreshFieldFormats();var h=new r.CsvTreeSource(this,this._rootRow);h.parentCallback=this._parentCallback,a=h.load(t,e,l,o,this.getFieldIndex(n),this.getFieldIndex(s))}finally{this.endUpdate(!1)}}return this._tags.setRows(),this._fireRefresh(),this._fireRowCountChanged(),a},d.prototype.appendXmlRows=function(t,e,i,o,n){if(!this._checkClientState())return-1;var s=0;if(e){var a=new r.XmlTreeSource(this,this._rootRow);this.beginUpdate();try{this.refreshFieldFormats(),s=a.load(t,e,i,this.getFieldIndex(o),this.getFieldIndex(n))}finally{if(this.endUpdate(!1),s>0){var l=a.insertedRows;l&&(s=l.length)>0&&this._rowsAdded(t,l)}}}return this._fireRowCountChanged(),s},d.prototype.appendJsonRows=function(t,e,i,o,n){if(!this._checkClientState())return-1;var s=0;if(e){var a=new r.JsonTreeSource(this,this._rootRow);this.beginUpdate();try{this.refreshFieldFormats(),s=a.load(t,e,i,this.getFieldIndex(o),this.getFieldIndex(n))}finally{if(this.endUpdate(!1),s>0){var l=a.insertedRows;l&&(s=l.length)>0&&this._rowsAdded(t,l)}}}return this._fireRowCountChanged(),s},d.prototype.setIconIndex=function(t,e){return t.iconIndex!=e&&(t.$_setIconIndex(e),!0)},d.prototype.setHasChildren=function(t,e){return e!=t.hasChildren&&(t.$_setHasChildren(e),!0)},d.prototype.getChildCount=function(t){return(t||this._rootRow).count},d.prototype.getRows=function(t){return(t||this._rootRow).children},d.prototype.getDescendantCount=function(t){return(t||this._rootRow).descendantCount},d.prototype.getDescendants=function(t,e){e=arguments.length>1?e:0;var i=t||this._rootRow;if(e<=0)return i.descendants;if(e>i.level){var o=[];return function t(e,i,o){for(var n=0,r=e.count;ns.level&&t(s,i,o)}}(i,o,e),o}return null},d.prototype.getChild=function(t,e){return(t||this._rootRow).getChild(e)},d.prototype.hasData=function(t){return null!=this.rowById(t)},d.prototype.rowById=function(t){var e=this._rowMap[t];return e&&e.rowId===t||(e=this._findRowById(t))&&(this._rowMap[t]=e),e||this.rootRow.rowId!==t?e:this.rootRow},d.prototype.getDataRow=function(t){var e=this._rowMap[t];return null==e&&(e=this._findRowById(t)),null!=e?t:-1},d.prototype.rowsByIds=function(t,e){if(t){for(var i=[],o=0,n=t;o=0&&(r[a]=t[s])}n=new T(this,r)}return n&&(this._internalCalculateValues(n._values,n.rowId),n._iconIndex=e,n._hasChildren=i),n},d.prototype.createTemp=function(){return new T(this,null,!0)},d.prototype.clearRows=function(){this._checkClientState()&&(this._clearRows(),this.clearCommandStack(),this._eventLock<=0&&(this._fireRefresh(),this._fireRowCountChanged(),this.fireDataLoadComplated()))},d.prototype.$_removeRows=function(t,e,o){if(this.softDeleting&&this.checkStates){for(var n=[],r=t.length-1;r>=0;r--){var s=t[r],a=u.TreeDataProvider.findSave(s.rowId,o),l=!1;switch(s.rowState){case i.RowState.CREATED:this.deleteCreated||(l=s._changeRowState(i.RowState.CREATE_AND_DELETED,!1,!1),a&&(a.changeState=i.RowState.CREATE_AND_DELETED,a.run="state"),t.splice(r,1));break;case i.RowState.DELETED:case i.RowState.CREATE_AND_DELETED:t.splice(r,1),a&&(a.run="state");break;default:l=s._changeRowState(i.RowState.DELETED,!0,!1),t.splice(r,1),a&&(a.run="state",a.changeState=i.RowState.DELETED)}if(l&&n.push(s),e&&s.count>0)for(var h=s.count;h--;)s._removeChild(s.children[h],!1,e,a&&a.children)}n.length>0&&this._fireRowStatesChanged(n)}return this.deleteRows(t),!0},d.prototype.removeRows=function(t,e){for(var i=[],o=t.length;o--;){var n=this.rowById(t[o]);n&&i.push(n)}function r(t,e){for(var o=e;o>=0;o--)if(i[o].isAncestorOf(t))return!1;return!0}if(this._checkClientState()&&i&&!(i.length<1)){i.sort((function(t,e){return t.level-e.level}));for(o=i.length;o--;)i[o].level>1&&!r(i[o],o-1)&&i.splice(o,1);return!(i.length<1||!this._rowsRemoving(i))&&(this.undoable?void this._commands.execute(new m.RemoveRowsTreeData(this,i,e)):this.$_removeRows(i,e,null))}},d.prototype.$_changeRowIndex=function(t,e){if(0==e)return!1;if(!this._checkClientState())return!1;var i=t.parent,o=i.children.length,n=t.index,r=Math.min(Math.max(n+e,0),o-1);return 0!=(e=r-n)&&(!!this._fireRowSiblingMoving(t,e)&&(i._moveChild(n,r),this._fireRowSiblingMoved(t,e),!0))},d.prototype.changeRowIndex=function(t,e){return this.undoable?this._commands.execute(new x.ChagneRowIndexTreeData(this,t,e)):this.$_changeRowIndex(t,e)},d.prototype.$_changeRowsIndex=function(t,e){if(0==e)return!1;if(!this._checkClientState())return!1;var i=t[0].parent,o=i.children.length,n=t[0].index,r=Math.min(Math.max(n+e,0),o-1);if(0==(e=r-n))return!1;for(var s=[],a=0,l=t;a0?this._fireReset(e):this._fireRefresh(),this._countDirty&&this._fireRowCountChanged()),this._resetLock=0,this._countDirty=!1)},d.prototype.$_extractTreeRowIds=function(t){if(t){for(var e=t.length,i=new Array(e),o=0;o=s:v<=s;m?v--:v++){var C=!0;if(C)for(y=0;y0&&u&&u.length>0){for(var c=h.length,p=[],_=0;_=0&&p.push(g)}}p.length>0&&(d=(r?a>0:a0)&&(d=this.$_searchDataRow(i,p,u,t,r?s-1:0,r?a+1:a-1))}return d},d.prototype.$_searchData=function(t,e,i,n,r,s,l){var h=this.rowCount;if(h<1)return null;for(var u=n&&n.caseSensitive,d=n&&n.partialMatch,c=this.fieldCount,p=e.length,_=null,f=[],m=n.reverse,y=n.compareCallback||o.Utils.compareTextValue,v=0;v=e.length&&(r++,l=0);for(var C=r;m?C>=s:C<=s;m?C--:C++)for(v=m?Cr?0:l;m?v>=0:v=0&&x=0){var r=this.rowById(e);if(!r)return null;i=this.$_extractTreeRowIds(r.descendants)}else i=this.$_extractTreeRowIds(this._rootRow.descendants);if(!Array.isArray(i)||i.length<=0)return null;var s=i.length,a=null,h=o.Utils.makeArray(t.fields)||this.getOrgFieldNames();h&&h.length||(h=this.getOrgFieldNames());var u=[];h.forEach((function(t){return u.push(n.getFieldIndex(t))})),t instanceof l.SearchCellOptions||(t.reverse&&(t.hasOwnProperty("startIndex")||(t.startIndex=s-1),t.hasOwnProperty("startFieldIndex")||(t.startFieldIndex=u.length-1)),t=new l.SearchCellOptions(t));var d=t.reverse,c=u.length,p=t.value,_=i.indexOf(t.startIndex)<0?d?s-1:0:i.indexOf(t.startIndex),f=d?0:s-1,g=Math.max(0,Math.min(c-1,t.startFieldIndex)),m=d?_>=0&&g>0:_0||g>0;return null!=p&&u.length>0&&!(a=m?this.$_searchData(i,u,p,t,_,f,g):null)&&t.wrap&&y&&(a=this.$_searchData(i,u,p,t,d?s-1:0,_-1,d?g:0)),a},d.prototype.$_hideDataRows=function(t,e){if(null!=t){for(var i=o.Utils.isArray(t)?t:[t],n=this._hiddenRows.length,r=[],s=0,a=i.length;s=0&&this._hiddenRows.splice(h,1)}}this._hiddenRows.length!==n&&this._fireRowsHiddenChanged(r,e)}},d.prototype.hideRows=function(t){this.$_hideDataRows(t,!0)},d.prototype.showRows=function(t){this.$_hideDataRows(t,!1)},d.prototype.clearHiddenRows=function(){if(this._hiddenRows.length>0){var t=this._hiddenRows.concat();this._hiddenRows=[],this._fireRowsHiddenChanged(t,!1)}},d.prototype.getHiddenRows=function(){var t=this._hiddenRows.concat();return t.sort((function(t,e){return t-e})),t},d.prototype.isHiddenRow=function(t){return!!this.rowById(t)&&this._hiddenRows.indexOf(t)>=0},_dp(d,"hiddenCount",{get:function(){return this._hiddenRows.length}}),d.prototype.summarize=function(t,e){if(null==t)return!1;t.clear();var i=this.rowCount;if(i<1)return!1;if(t.count=i,t.sum=0,t.min=null,t.max=null,t.dataCount=0,this.$_summarizeChildren(this._rootRow,t),t.avg=t.sum/t.count,t.dataAvg=0===t.dataCount?NaN:t.sum/t.dataCount,e){var o=this.$_summarizeVars(this._rootRow,t);t.varsp=o/t.count,t.vars=o/(t.count-1)}return!0},d.prototype.summarizeRange=function(t,e,i){if(null==t||null==e)return!1;t.clear();var o=e.length;if(o<1)return!1;for(var n=0,r=t.field,s=this.getField(r).dataType===a.ValueType.NUMBER,l=null,h=null,u=null,d=0;du)&&(u=f))}if(t.count=o,n>0&&(l=null!=l?l:s?NaN:null,h=null!=h?h:s?NaN:null,u=null!=u?u:s?NaN:null,t.sum=l,t.min=h,t.max=u,t.avg=l/o,t.dataCount=n,t.dataAvg=0===t.dataCount?NaN:t.sum/t.dataCount,i))if(o>1){for(var c=0,p=t.avg,_=0;_0){var e=this._softDeleting;this.beginUpdate();try{this._softDeleting=!1,this._tagLock=!0;try{for(var i=t.length-1;i>=0;i--){var o=t[i],n=o&&o.parent;n&&n._removeChild(o,!0,!1,null)}}finally{this._tagLock=!1}}finally{this._softDeleting=e,this.endUpdate(!1)}this._rowsRemoved(t)}},d.prototype.equalValues=function(t,e,i){if(e!==i){var o=this._fields[t],n=e.getValue(t),r=i.getValue(t);return o.equalValues(n,r)}return!0},d.prototype.sameValues=function(t,e,i,o){if(e!==i){var n=this._fields[t],r=e.getValue(t),s=i.getValue(t);return o?String(r).toLowerCase()==String(s).toLowerCase():n.sameValues(r,s)}return!0},d.prototype.equalTexts=function(t,e,i){return this.sameValues(t,e,i,!0)},d.prototype.compareValues=function(t,e,i,o,n){if(e!==i){var r=e.getValue(t),s=i.getValue(t);return-1===o&&(r=""==r?null:r,s=""==s?null:s),null==r?null==s?0:-1*o:null==s?1*o:(r=n?String(r).toLowerCase():r)>(s=n?String(s).toLowerCase():s)?1:rr?1:n0){for(var r=this.getDescendants(this._rootRow,0),s=this.getField(t).dataType,l=[],h=void 0,u=0,d=r.length;u0&&this._rootRow.count>0){var e=this._rootRow.copy(),i=this._nextPoint++;return t||e.clearRowStates(!1,!1),this._points.push({id:i,nextRowId:this._nextRowId,data:e}),i}return-1}},d.prototype.rollback=function(t){if(void 0===t&&(t=0),this._checkClientState())for(var e=this._points.length-1;e>=0;e--){var i=this._points[e];if(i.id==t){this.$_removeSavePoints(e+1),this._rowMap=[],this._rootRow.set(i.data),this._nextRowId=i.nextRowId,this.$_prepareMap(),this._fireRefresh();break}}},d.prototype.$_removeSavePoints=function(t){for(var e=this._points,i=e.length-1;i>=t;i--){e[i].data=null,e.pop()}},d.prototype.clearSavePoints=function(){this.$_removeSavePoints(0)},d.prototype.getSavePoints=function(){for(var t=[],e=0,i=this._points.length;e0)for(var o=0,n=e.children;o0)for(var o=0,n=e.children;o0&&this._fireRowStatesChanged(o)},d.prototype.$_clearRowStates=function(t,e){this._checkClientState()&&this._rootRow.clearRowStates(t,e)},d.prototype.clearRowStates=function(t,e){this._undoable?this._commands.execute(new E.ClearRowStatesTreeData(this,t,e)):this.$_clearRowStates(t,e)},d.prototype.$_collectStateRows=function(t,e,i){for(var o=0,n=t.count;o0&&this._fireRowStatesChanged(n)},d.prototype.setRowStates=function(t,e,i,o){this._checkClientState()&&(this.undoable?this._commands.execute(new w.ChangeRowStatesTreeData(this,t,e,i,o)):this.$_setRowStates(t,e,i,o))},d.prototype.$_getRowStateCount=function(t,e){for(var i=0,o=0,n=t.count;o=0&&i++,i+=this.$_getRowStateCount(r,e)}return i},d.prototype.getRowStateCount=function(t){return this.$_getRowStateCount(this._rootRow,t)},d.prototype.restoreUpdatedStates=function(t){this.restoreUpdatedRows(t)},d.prototype.restoreUpdatedRows=function(t){this.undoable?this._commands.execute(new R.RestoreUpdatedTreeRows(this,t)):this.$_restoreUpdatedRows(t,null,!1)},d.prototype.revert=function(t){t=o.Utils.makeArray(t,!0);for(var e=0;e1&&this._fireRowStatesChanged(o)}},d.prototype.$_undoRestoreRow=function(t,e){var i=this.rowById(t);if(e){for(var o=0,n=Math.min(i.values.length,e.values.length);o0&&o.push({__rowId:a.rowId,updatedCells:l})}}return o},d.prototype.canUpdateRow=function(t){return!0},d.prototype.canInsertRow=function(t){return!0},d.prototype.canDeleteRow=function(t){return!0},d.prototype.isDataChanged=function(t,e){if(t<0)return!1;var n=this.rowById(t);!n&&o.Utils.isDebugging();var r=n._orgValues;if(n.rowState!==i.RowState.UPDATED||!r)return!1;if(r){var s=r[e],a=n._values[e],l=this._fields[e];return l&&!l.sameValues(s,a)}return!1},d.prototype.$_createFrom=function(t,e){var i=t.getObject();e&&(i=this._convertValues(i,e));for(var o=this.objectToRow(i),n=new T(this,o),r=0;r=0?this.rowById(o):null,h=l?l.parent:this.rootRow;if(o>=0){var u=h.indexOf(l);h.insertChildren(u,n,!1)}else h.insertChildren(h.count,n,!1)},d.prototype.$_insertChildNode=function(t,e,i,n,r,s){var a=o.Utils.getNumber(i[r],-1),l=i[n],h=this.createRow(i,a,l&&l.length>0);if(e>=0?t._insertChild(e,h,!1,s):t._addChild(h,!1,s),l)for(var u=0;u "+this.rowCount)},d.prototype._clearRows=function(){this._rootRow._removeChildren(),this._rowMap=[],this._rootRow&&this._rootRow.descendantCount>0||(this._nextRowId=1),this._tags.clearRows(),this._checkSum(0)},d.prototype.$_prepareMap=function(){var t=this;!function e(i){var o=i.children;o&&o.forEach((function(i){t._rowMap[i.rowId]=i,e(i)}))}(this._rootRow)},d.prototype.$_removeMap=function(t){var e=this;(t=o.Utils.makeArray(t,!0)).forEach((function(t){e._rowMap[t.rowId]=void 0,e.$_removeMap(t.children),t.dispose()}))},d.prototype.$_fillValue=function(t,e){if(this._checkClientState()){var o=Object.keys(t);if(o&&o.length){this.refreshFieldFormats();var n=[],r=[];for(var s in t){var a=this.rowById(+s);r.push(a),a.rowState==i.RowState.NONE&&n.push(a);for(var l=a.values,h=t[s],u=0;u0&&this._fireRowStatesChanged(n),this._tags.updateRows(r),this._fireRowsUpdated(r)}}},d.prototype.$_updateRows=function(t,e,o){if(this._checkClientState()&&t&&e){var n=Math.min(t.length,e.length);if(!(n<1)){this.refreshFieldFormats();for(var r=[],s=0;s0&&this._fireRowStatesChanged(r),this._tags.updateRows(t),this._fireRowsUpdated(t)}}},d.prototype.findRow=function(t,e){return t&&t.length>0&&e&&e.length>=t.length?this._rootRow.findChild(t,e):null},d.prototype.$_resetOrgValues=function(){this._needOrgValues=this.checkStates&&this.restoreMode!=s.RestoreMode.NONE,this._needRestore=this._needOrgValues&&this.restoreMode==s.RestoreMode.AUTO,this._rootRow._clearOrgValues()},d.prototype.$_summarizeChildren=function(t,e){for(var i=e.field,o=t.count,n=this.getField(e.field).dataType===a.ValueType.NUMBER,r=0;re.max)&&(e.max=l)),this.$_summarizeChildren(s,e)}},d.prototype.$_summarizeVars=function(t,e){for(var i=e.field,o=e.avg,n=t.count,r=0,s=0;s';if(r+='',r+='',r+='',n)for(var s in n)r+='';r+="";var a=o.createElement("div");a.innerHTML=r,o.body.appendChild(a),o.getElementById("submitBtn").click(),setTimeout((function(){o.body.removeChild(a)}),100)},e}();return ki.ExporterBase=e,ki}function Oi(){if(Di)return y;Di=1,Object.defineProperty(y,"__esModule",{value:!0}),y.LocalTreeDataProvider=y.LocalDataProvider=y.DataProviderBase=y.EventListenerBase=void 0;var t=d,e=C(),i=S(),o=D(),n=Ee(),r=Ci(),s=Be(),a=function(){if(wi)return xi;wi=1,Object.defineProperty(xi,"__esModule",{value:!0}),xi.TreeDataLoader=void 0;var t=d,e=G(),i=Be(),o=Pe(),n=ae(),r=function(e){function r(t){var i=e.call(this)||this;return i._ds=t,i}return t.__extends(r,e),r.prototype._doDispose=function(){e.prototype._doDispose.call(this)},r.prototype.load=function(t,e,o){var n=new i.DataFillOptions(o);if(this.$_checkEmpty(e,n))return 0;switch(this.$_prepareLoad(n),t=t&&t.toLowerCase()){case"json":return this.$_loadJson(e,n);case"xml":return this.$_loadXml(e,n);case"csv":return this.$_loadCsv(e,n)}return 0},r.prototype.$_loadJson=function(t,e){if("string"==typeof t&&(t=JSON.parse(t)),t){var o=e.childrenField,n=e.iconField;if(e.fillMode==i.DataFillMode.APPEND){var r=this._ds.rowById(e.parentId);return this._ds.appendJsonRows(r,t,e.rows,o,n)}return this._ds.setJsonRows(t,e.rows,o,n)}return 0},r.prototype.$_loadXml=function(t,e){if("string"==typeof t&&(t=o.XmlUtils.parseXml(t)),t&&t.documentElement){var n=e.childrenField,r=e.iconField;if(e.fillMode==i.DataFillMode.APPEND){var s=this._ds.rowById(e.parentId);return this._ds.appendXmlRows(s,t,e.rows,n,r)}return this._ds.setXmlRows(t,e.rows,n,r)}return 0},r.prototype.$_loadCsv=function(t,e){var o=e.start,r=e.count,s=e.quoted,a=e.delimiter,l=n.DataHelper.csvToArray(this._ds,t,o,r,s,a);if(l&&(r=l.length)>0){var h=e.treeField,u=e.childrenField,d=e.iconField,c=e.needSorting;if(e.fillMode==i.DataFillMode.APPEND){var p=this._ds.rowById(e.parentId);this._ds.appendDataRows(p,l,h,c,u,d)}else this._ds.setRows(l,h,c,u,d);return l.length}return 0},r.prototype.$_fillEmpty=function(t){t.fillMode===i.DataFillMode.SET&&this._ds.setRows(null,null,!1,null,null)},r.prototype.$_checkEmpty=function(t,e){return!t&&(this.$_fillEmpty(e),!0)},r.prototype.$_prepareLoad=function(t){},r}(e.Base);return xi.TreeDataLoader=r,xi}(),l=gt(),h=qe(),u=function(){if(Ti)return Ii;Ti=1,Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.DataCsvExporter=Ii.DataExportOptions=void 0;var t=d,e=Ci(),i=Ee(),o=ft(),n=C(),r=S(),s=Si(),a=Mi(),l=rt(),h=lt(),u=function(e){function i(t){var i=e.call(this,t)||this;return i.exportFields=null,i.hideFields=null,i.includeFieldNames=!1,i.extend(t),i}return t.__extends(i,e),_dp(i,"type",{get:function(){return s.ExportType.CSV}}),i}(s.ExportOptions);Ii.DataExportOptions=u;var c=function(a){function d(){return a.call(this)||this}return t.__extends(d,a),d.prototype.dispose=function(){return a.prototype.dispose.call(this),null},d.prototype.export=function(t,o){this._dataSource=t,this._exportOptions=o instanceof u?o:new u(o),this._exportFields=this.$_prepareFields(t,o.exportFields,o.hideFields),this._rows=[],t instanceof e.LocalTreeDataProvider?this.$_buildTreeBook((function(){this.save()})):t instanceof i.LocalDataProvider&&this.$_buildBook((function(){this.save()}))},d.prototype.$_prepareFields=function(t,e,i){var o=t.getFields();return e?e.map((function(e){return t.fieldByName(e)})).filter((function(t){return t})):i?o.filter((function(t){return i.indexOf(t.orgFieldName)<0})):o},d.prototype.addQuatation=function(t,e){return r.Utils.addQuatation(t,e===n.ValueType.TEXT,this._exportOptions.replaceLfText,this._exportOptions.replaceCrText)},d.prototype.$_buildFieldName=function(){return this._exportFields.map((function(t){return t.orgFieldName})).join(this._exportOptions.seperator||",")},d.prototype.$_buildBook=function(t){var e=this._exportOptions,i=this._dataSource.rowCount,o=Math.max(0,e.start),n=-1==e.count?i:Math.min(Math.max(e.count,0),i),r=Math.min(i,o+n);e.includeFieldNames&&this._rows.push(this.$_buildFieldName());for(var a=o;a0?this._dp.getRowStateCount(e):void 0},t.prototype.restoreUpdatedStates=function(t){return this._dp.restoreUpdatedStates(t)},t.prototype.revertDeletedStates=function(t){return this._dp.revert(t)},t.prototype.restoreUpdatedRows=function(t){return this._dp.restoreUpdatedRows(i.Utils.makeArray(t))},t.prototype.getUpdatedCells=function(t){return this._dp.getUpdatedCells(t)},t.prototype.getDistinctValues=function(t,i,o){void 0===i&&(i=-1),void 0===o&&(o=e.SortDirection.ASCENDING);var n=o||e.SortDirection.ASCENDING,r="string"==typeof t?this._dp.getFieldIndex(t):t;return this._dp.getDistinctValues(r,i,n)},t.prototype.savePoint=function(t){return void 0===t&&(t=!0),this._dp.savePoint(t)},t.prototype.rollback=function(t){void 0===t&&(t=0),this._dp.rollback(t)},t.prototype.clearSavePoints=function(){this._dp.clearSavePoints()},t.prototype.getSavePoints=function(){return this._dp.getSavePoints()},t.prototype.setDataComparer=function(t,e){var i="string"==typeof t?this._dp.getFieldIndex(t):t;this._dp.setDataComparer(i,e)},t.prototype.exportToCsv=function(t){(new u.DataCsvExporter).export(this._dp,t)},t.prototype.destroy=function(){return this.dispose()},t.prototype.undo=function(){this._dp.undo()},t.prototype.redo=function(){this._dp.redo()},t.prototype.clearCommandStack=function(){this._dp.clearCommandStack()},t.prototype.getDataRowId=function(t){return this._dp.getRowId(t)},t.prototype.getProvider=function(){return this._dp},t}();y.DataProviderBase=_;var f=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.onRowCountChanged=null,t.onRowUpdating=null,t.onRowUpdated=null,t.onRowsUpdated=null,t.onRowListUpdated=null,t.onRowInserting=null,t.onRowInserted=null,t.onRowsInserted=null,t.onRowDeleting=null,t.onRowDeleted=null,t.onRowsDeleted=null,t.onRowMoving=null,t.onRowMoved=null,t.onRowsMoving=null,t.onRowsMoved=null,t.onRowListMoving=null,t.onRowListMoved=null,t.onValueChanged=null,t.onDataChanged=null,t.onRowStateChanged=null,t.onRowStatesChanged=null,t.onRowStatesCleared=null,t.onRestoreRows=null,t}return t.__extends(i,e),_dp(i,"rowCount",{get:function(){return this._dp.rowCount},set:function(t){this._dp.setRowCount(t)}}),i.prototype.getRowCount=function(){return this._dp.rowCount},i.prototype.setRowCount=function(t,e,i,n){return void 0===e&&(e=!1),void 0===i&&(i=null),void 0===n&&(n=o.RowState.NONE),this._dp.setRowCount(t,e,i,n)},i.prototype.setFilterMode=function(t){void 0===t&&(t="and"),this._dp.setFilterMode(t)},i.prototype.setFilters=function(t,e){void 0===e&&(e="and"),this._dp.setFilters(t,e)},i.prototype.fillJsonData=function(t,e){var i=e instanceof s.DataFillOptions?e:new s.DataFillOptions(e);c.fillData(this._dp,"json",t,i)},i.prototype.fillXmlData=function(t,e){var i=e instanceof s.DataFillOptions?e:new s.DataFillOptions(e);c.fillData(this._dp,"xml",t,i)},i.prototype.fillCsvData=function(t,e){var i=e instanceof s.DataFillOptions?e:new s.DataFillOptions(e);c.fillData(this._dp,"csv",t,i)},i.prototype.setRows=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=-1),this._dp.setRows(t,e,i)},i.prototype.addRows=function(t,e,i,o){void 0===e&&(e=0),void 0===i&&(i=-1),void 0===o&&(o=!1),this._dp.appendRows(t,e,i,o)},i.prototype.insertRows=function(t,e,i,o,n){void 0===i&&(i=0),void 0===o&&(o=-1),void 0===n&&(n=!1),this._dp.insertRows(t,e,i,o,n)},i.prototype.updateRows=function(t,e,i,o,n,r){void 0===i&&(i=0),void 0===o&&(o=-1),void 0===n&&(n=!1),void 0===r&&(r=!1),this._dp.updateRows(t,e,i,o,n,r)},i.prototype.updateRowsByDataRow=function(t,e,i){this._dp.updateRows2(t,e,i)},i.prototype.clearRows=function(){this._dp.clearRows()},i.prototype.updateRow=function(t,e,i){void 0===i&&(i=!1),this._dp.updateRow(t,e,i)},i.prototype.hideRows=function(t){this._dp.hideRows(t)},i.prototype.showHiddenRows=function(t){this._dp.showRows(t)},i.prototype.getHiddenRows=function(){return this._dp.getHiddenRows()},i.prototype.isHiddenRow=function(t){return this._dp.isHiddenRow(t)},i.prototype.resetHiddenRows=function(){this._dp.clearHiddenRows()},i.prototype.addRow=function(t){return this._dp.appendRow(t)},i.prototype.insertRow=function(t,e){return this._dp.insertRow(t,e)},i.prototype.removeRow=function(t){this._dp.removeRow(t)},i.prototype.removeRows=function(t,e){void 0===e&&(e=!1),this._dp.removeRows(t,e)},i.prototype.moveRow=function(t,e){this._dp.moveRow(t,e)},i.prototype.moveRows=function(t,e,i){this._dp.moveRows(t,e,i)},i.prototype.getValue=function(t,e){var i=c.getFieldIndex(this._dp,e);return this._dp.getValue(t,i)},i.prototype.setValue=function(t,e,i){var o=c.getFieldIndex(this._dp,e);this._dp.setValue(t,o,i)},i.prototype.getRows=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=-1),this._dp.getRows(t,e)},i.prototype.getJsonRow=function(t,e){return this._dp.getRowObject(t,e)},i.prototype.getJsonRows=function(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=-1),void 0===i&&(i=!1),this._dp.getRowObjects(t,e,i)},i.prototype.getOutputRow=function(t,e){return this._dp.getOutputObject(t,e)},i.prototype.getOutputRows=function(t,e,i){return void 0===e&&(e=0),void 0===i&&(i=-1),this._dp.getOutputObjects(t,e,i)},i.prototype.getFieldValues=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=-1);var o=c.getFieldIndex(this._dp,t);return this._dp.getFieldValues(o,e,i)},i.prototype.searchDataRow=function(t){return t?this._dp.searchDataRow(t):-1},i.prototype.searchData=function(t){return t?this._dp.searchData(t):null},i.prototype._createProvider=function(t){return new n.LocalDataProvider(t,this)},i.prototype._createListener=function(t){return new m(this,t)},i}(_);y.LocalDataProvider=f;var g=function(e){function i(t){void 0===t&&(t=!1);var i=e.call(this,t)||this;return i.onRowCountChanged=null,i.onRowAdding=null,i.onRowAdded=null,i.onRowsAdded=null,i.onRowDeleting=null,i.onRowDeleted=null,i.onRowsDeleted=null,i.onRowUpdating=null,i.onRowUpdated=null,i.onRowsUpdating=null,i.onRowsUpdated=null,i.onValueChanged=null,i.onDataChanged=null,i.onRowStateChanged=null,i.onRowStatesChanged=null,i.onRowSiblingMoving=null,i.onRowSiblingMoved=null,i.onRowsSiblingMoving=null,i.onRowsSiblingMoved=null,i.onRowParentChanging=null,i.onRowParentChanged=null,i}return t.__extends(i,e),i.prototype.getRowCount=function(){return this._dp.rowCount},i.prototype.setRows=function(t,e,i,o,n){void 0===i&&(i=!1),this._dp.setRows(t,e,i,o,n)},i.prototype.setCsvRows=function(t,e,i,o,n){this._dp.setCsvRows(t,e,i,o,n)},i.prototype.setXmlRows=function(t,e,i,o){this._dp.setXmlRows(t,e,i,o)},i.prototype.setObjectRows=function(t,e,i,o){this._dp.setJsonRows(t,e,i,o)},i.prototype.setNestedRows=function(t,e,i,o,n){this._dp.setJsonRows2(t,e,i,o,n)},i.prototype.fillJsonData=function(t,e){var i=new s.DataFillOptions(e);try{c.fillTreeData(this._dp,"json",t,i)}finally{i.dispose(),i=null}},i.prototype.fillXmlData=function(t,e){var i=new s.DataFillOptions(e);try{c.fillTreeData(this._dp,"xml",t,i)}finally{i.dispose(),i=null}},i.prototype.fillCsvData=function(t,e){var i=new s.DataFillOptions(e);try{c.fillTreeData(this._dp,"csv",t,i)}finally{i.dispose(),i=null}},i.prototype.getIconIndex=function(t){return this._dp.rowById(t).iconIndex},i.prototype.setIconIndex=function(t,e){this._dp.rowById(t).iconIndex=e},i.prototype.getParent=function(t){var e=this._dp.rowById(t);return e&&e.parent?e.parent.rowId:-1},i.prototype.getLevel=function(t){return this._dp.rowById(t).level},i.prototype.getChildCount=function(t){var e=this._dp;if(null==t||-1==t)return e.getChildCount(null);var i=e.rowById(t);return i&&i.children?i.children.length:0},i.prototype.getChildren=function(t){var e,i=this._dp;null==t||-1==t?e=i.getRows(null):e=i.rowById(t).children;return c.extractTreeRows(e)},i.prototype.getDescendantCount=function(t){var e=this._dp;return null==t||-1==t?e.getDescendantCount(null):e.rowById(t).descendantCount},i.prototype.getDescendants=function(t,e){void 0===e&&(e=-1);var i=null,o=this._dp;null!=t&&-1!=t&&(i=o.rowById(t));var n=o.getDescendants(i,e);return c.extractTreeRows(n)},i.prototype.getAncestors=function(t){var e=this._dp.rowById(t);return e&&e.ancestors?c.extractTreeRows(e.ancestors):null},i.prototype.getJsonRow=function(t,e,i,o,n,r){void 0===o&&(o="rows"),void 0===n&&(n="iconIndex"),void 0===r&&(r=-1);var s=this._dp,a=null==t||t<0?s.rootRow:s.rowById(t);if(a){var l=a.getObject()||{};return e&&(l.__rowState=a.rowState),i&&0!==r&&(l[o]=a.getChildObjects(i,o,n,!1,e,r-1)),l}return null},i.prototype.getJsonRows=function(t,e,i,o,n){void 0===e&&(e=!1),void 0===i&&(i="rows"),void 0===o&&(o="iconIndex");var r=this._dp,s=null==t||t<=-1?r.rootRow:r.rowById(t);return s?s.getChildObjects(e,i,o,!0,n):null},i.prototype.getOutputRow=function(t,e,i){void 0===i&&(i="iconIndex");var o,n=new l.DataOutputOptions(t);try{var r=this._dp,s=null==e||e<0?r.rootRow:r.rowById(e);o=s?s.getOutput(n,i):null}finally{n.dispose()}return o},i.prototype.getOutputRows=function(t,e,i,o,n){void 0===i&&(i=!1),void 0===o&&(o="rows"),void 0===n&&(n="iconIndex");var r,s=new l.DataOutputOptions(t);try{var a=this._dp,h=null==e||e<=-1?a.rootRow:a.rowById(e);r=h?h.getChildOutputObjects(s,i,o,n):null}finally{s.dispose()}return r},i.prototype.addChildRow=function(t,e,i,o){void 0===i&&(i=-1),void 0===o&&(o=!1);var n=this._dp,r=n.rowById(t)||n.rootRow,s=n.createRow(e,i,o);return r.addChild(s,!1)?s.rowId:-1},i.prototype.insertChildRow=function(t,e,i,o,n){void 0===o&&(o=-1),void 0===n&&(n=!1);var r=this._dp,s=r.rowById(t)||r.rootRow,a=r.createRow(i,o,n);return s.insertChild(e,a,!1)?a.rowId:-1},i.prototype.insertChildNode=function(t,e,i,o,n,r){void 0===o&&(o="rows"),void 0===n&&(n="iconField"),void 0===r&&(r=!1);var s=this._dp,a=null==t||t<0?s.rootRow:s.rowById(t);if(a)return s.insertChildNode(a,e,i,o,n,r)},i.prototype.updateRow=function(t,e,i){var o=this._dp.rowById(t);return!!o&&o.update(e,i)},i.prototype.updateRows=function(t,e,i){this._dp.updateRows(t,e,i)},i.prototype.removeRow=function(t,e){var i=this._dp.rowById(t);return!(!i||!i.parent)&&i.parent.removeChild(i,e)},i.prototype.removeRows=function(t,e){return!!(t&&t.length>0)&&this._dp.removeRows(t,e)},i.prototype.clearRows=function(){this._dp.clearRows()},i.prototype.hideRows=function(t){this._dp.hideRows(t)},i.prototype.showHiddenRows=function(t){this._dp.showRows(t)},i.prototype.getHiddenRows=function(){return this._dp.getHiddenRows()},i.prototype.isHiddenRow=function(t){return this._dp.isHiddenRow(t)},i.prototype.resetHiddenRows=function(){this._dp.clearHiddenRows()},i.prototype.getValue=function(t,e){var i=this._dp,o=i.rowById(t),n=c.getFieldIndex(i,e);return o?o.getValue(n):null},i.prototype.setValue=function(t,e,i){var o=this._dp,n=o.rowById(t),r=c.getFieldIndex(o,e);n&&n.setValue(r,i,!1)},i.prototype.moveRowSibling=function(t,e){var i=this._dp,o=i.rowById(t);return!!o&&i.changeRowIndex(o,e)},i.prototype.changeRowParent=function(t,e,i){var o=this._dp,n=o.rowById(t),r=e<0?o.rootRow:o.rowById(e);return!(!n||!r)&&o.changeRowParent(n,r,i)},i.prototype.searchDataRow=function(t){return t?this._dp.searchDataRow(t,t.parentId):-1},i.prototype.searchData=function(t){return t?this._dp.searchData(t,t.parentId):null},i.prototype._createProvider=function(t){return new r.LocalTreeDataProvider(t,this)},i.prototype._createListener=function(t){return new v(this,t)},i}(_);y.LocalTreeDataProvider=g;var m=function(e){function o(t,i){var o=e.call(this)||this;return o._del=t,o._provider=i,o._provider.addListener(o),o}return t.__extends(o,e),o.prototype.dispose=function(){return this._del=null,this._provider.removeListener(this),this._provider=null},o.prototype.onDataProviderRowCountChanged=function(t){this._del.onRowCountChanged?this._del.onRowCountChanged(this._del,t.rowCount):i.Utils.log("onRowCountChanged: "+t.rowCount)},o.prototype.onDataProviderRowUpdating=function(t,e,o,n){return this._del.onRowUpdating?this._del.onRowUpdating(this._del,e,n,o):(i.Utils.log("onRowUpdating: "+e),!0)},o.prototype.onDataProviderRowUpdated=function(t,e){this._del.onRowUpdated?this._del.onRowUpdated(this._del,e):i.Utils.log("onRowUpdated: "+e)},o.prototype.onDataProviderRowsUpdated=function(t,e,o){this._del.onRowsUpdated?this._del.onRowsUpdated(this._del,e,o):i.Utils.log("onRowsUpdated: "+e+", "+o)},o.prototype.onDataProviderRowListUpdated=function(t,e){this._del.onRowListUpdated?this._del.onRowListUpdated(this._del,e):i.Utils.log("onRowListUpdated: "+e)},o.prototype.onDataProviderRowInserting=function(t,e,o){return this._del.onRowInserting?this._del.onRowInserting(this._del,e,o):(i.Utils.log("onRowInserting: "+e),!0)},o.prototype.onDataProviderRowInserted=function(t,e){this._del.onRowInserted?this._del.onRowInserted(this._del,e):i.Utils.log("onRowInserted: "+e)},o.prototype.onDataProviderRowsInserted=function(t,e,o){this._del.onRowsInserted?this._del.onRowsInserted(this._del,e,o):i.Utils.log("onRowsInserted: "+e+", "+o)},o.prototype.onDataProviderRowRemoving=function(t,e){return this._del.onRowDeleting?this._del.onRowDeleting(this._del,e):(i.Utils.log("onRowDeleting: "+e),!0)},o.prototype.onDataProviderRowRemoved=function(t,e){this._del.onRowDeleted?this._del.onRowDeleted(this._del,e):i.Utils.log("onRowDeleted: "+e)},o.prototype.onDataProviderRowsRemoving=function(t,e){return!0},o.prototype.onDataProviderRowsRemoved=function(t,e){this._del.onRowsDeleted?this._del.onRowsDeleted(this._del,e):i.Utils.log("onRowsDeleted: ",e)},o.prototype.onDataProviderRowMoving=function(t,e,o){return this._del.onRowMoving?this._del.onRowMoving(this._del,e,o):(i.Utils.log("onRowMoving: "+e+", "+o),!0)},o.prototype.onDataProviderRowMoved=function(t,e,o){this._del.onRowMoved?this._del.onRowMoved(this._del,e,o):i.Utils.log("onRowMoved: "+e+", "+o)},o.prototype.onDataProviderRowsMoving=function(t,e,o,n){return this._del.onRowsMoving?this._del.onRowsMoving(this._del,e,o,n):(i.Utils.log("onRowsMoving: "+e+", "+o+", "+n),!0)},o.prototype.onDataProviderRowsMoved=function(t,e,o,n){this._del.onRowsMoved?this._del.onRowsMoved(this._del,e,o,n):i.Utils.log("onRowsMoved: "+e+", "+o+", "+n)},o.prototype.onDataProviderRowListMoving=function(t,e,o){return this._del.onRowListMoving?this._del.onRowListMoving(this._del,e,o):(i.Utils.log("onRowListMoving: ",e,", ",o),!0)},o.prototype.onDataProviderRowListMoved=function(t,e,o){this._del.onRowListMoved?this._del.onRowListMoved(this._del,e,o):i.Utils.log("onRowListMoved: ",e,o)},o.prototype.onDataProviderValueChanged=function(t,e,o){this._del.onValueChanged?this._del.onValueChanged(this._del,e,o):i.Utils.log("onValueChanged:"+e+", "+o)},o.prototype.onDataProviderDataChanged=function(t){this._del.onDataChanged?this._del.onDataChanged(this._del):i.Utils.log("onDataChanged")},o.prototype.onDataProviderStateChanged=function(t,e){this._del.onRowStateChanged?this._del.onRowStateChanged(this._del,e):i.Utils.log("onRowStateChanged: "+e)},o.prototype.onDataProviderStatesChanged=function(t,e){this._del.onRowStatesChanged?this._del.onRowStatesChanged(this._del,e):i.Utils.log("onRowStatesChanged",e)},o.prototype.onDataProviderStatesCleared=function(t){this._del.onRowStatesCleared?this._del.onRowStatesCleared(this._del):i.Utils.log("onRowStatesCleared")},o.prototype.onDataProviderRestoreRows=function(t,e){this._del.onRestoreRows?this._del.onRestoreRows(this._del,e):i.Utils.log("onRestoreRows",e)},o}(p),v=function(e){function o(t,i){var o=e.call(this)||this;return o._del=t,o._provider=i,o._provider.addListener(o),o}return t.__extends(o,e),o.prototype.dispose=function(){return this._del=null,this._provider.removeListener(this),this._provider=null},o.prototype.onTreeDataProviderRowCountChanged=function(t){this._del.onRowCountChanged?this._del.onRowCountChanged(this._del,t.rowCount):i.Utils.log("onRowCountChanged: "+t.rowCount)},o.prototype.onTreeDataProviderRowAdding=function(t,e,o,n){return this._del.onRowAdding?this._del.onRowAdding(this._del,e.rowId,o,n._values):(i.Utils.log("onRowAdding: "+e.rowId+", "+o,n._values),!0)},o.prototype.onTreeDataProviderRowAdded=function(t,e){this._del.onRowAdded?this._del.onRowAdded(this._del,e.rowId):i.Utils.log("onRowAdded: "+e.rowId)},o.prototype.onTreeDataProviderRowsAdded=function(t,e,o){var n=c.extractTreeRows(o);this._del.onRowsAdded?this._del.onRowsAdded(this._del,e.rowId,n):i.Utils.log("onRowsAdded: "+e.rowId,n)},o.prototype.onTreeDataProviderRowRemoving=function(t,e){return this._del.onRowDeleting?this._del.onRowDeleting(this._del,e.rowId):(i.Utils.log("onRowDeleting: "+e.rowId),!0)},o.prototype.onTreeDataProviderRowRemoved=function(t,e){this._del.onRowDeleted?this._del.onRowDeleted(this._del,e.rowId):i.Utils.log("onRowDeleted: "+e.rowId)},o.prototype.onTreeDataProviderRowsRemoved=function(t,e){var o=c.extractTreeRows(e);this._del.onRowsDeleted?this._del.onRowsDeleted(this._del,o):i.Utils.log("onRowsDeleted: ",o)},o.prototype.onTreeDataProviderRowUpdating=function(t,e,o,n){return this._del.onRowUpdating?this._del.onRowUpdating(this._del,e.rowId,n,o):(i.Utils.log("onRowUpdating:"+e.rowId),!0)},o.prototype.onTreeDataProviderRowUpdated=function(t,e){this._del.onRowUpdated?this._del.onRowUpdated(this._del,e.rowId):i.Utils.log("onRowUpdated: "+e.rowId)},o.prototype.onTreeDataProviderRowsUpdating=function(t,e){return this._del.onRowsUpdating?this._del.onRowsUpdating(this._del,h.TreeDataRow.getRowIds(e)):(i.Utils.log("onRowUpdating:"+e.length),!0)},o.prototype.onTreeDataProviderRowsUpdated=function(t,e){this._del.onRowsUpdated?this._del.onRowsUpdated(this._del,h.TreeDataRow.getRowIds(e)):i.Utils.log("onRowsUpdated: "+e.length)},o.prototype.onTreeDataProviderValueChanged=function(t,e,o){this._del.onValueChanged?this._del.onValueChanged(this._del,e.rowId,o):i.Utils.log("onValueChanged: "+e.rowId+", "+o)},o.prototype.onTreeDataProviderRowStateChanged=function(t,e){this._del.onRowStateChanged?this._del.onRowStateChanged(this._del,e.rowId):i.Utils.log("onRowStateChanged: "+e.rowId)},o.prototype.onTreeDataProviderRowStatesChanged=function(t,e){var o=c.extractTreeRows(e);this._del.onRowStatesChanged?this._del.onRowStatesChanged(this._del,o):i.Utils.log("onRowStatesChanged: ",o)},o.prototype.onTreeDataProviderRowSiblingMoving=function(t,e,o){return this._del.onRowSiblingMoving?this._del.onRowSiblingMoving(this._del,e.rowId,o):(i.Utils.log("onRowSiblingMoveing: "+e.rowId+", "+o),!0)},o.prototype.onTreeDataProviderRowSiblingMoved=function(t,e,o){this._del.onRowSiblingMoved?this._del.onRowSiblingMoved(this._del,e.rowId,o):i.Utils.log("onSiblingMoved: "+e.rowId+", "+o)},o.prototype.onTreeDataProviderRowsSiblingMoving=function(t,e,o){return this._del.onRowsSiblingMoving?this._del.onRowsSiblingMoving(this._del,h.TreeDataRow.getRowIds(e),o):(i.Utils.log("onRowSiblingMoveing: ",e,o),!0)},o.prototype.onTreeDataProviderRowsSiblingMoved=function(t,e,o){this._del.onRowsSiblingMoved?this._del.onRowsSiblingMoved(this._del,h.TreeDataRow.getRowIds(e),o):i.Utils.log("onSiblingMoved: ",e,o)},o.prototype.onTreeDataProviderRowParentChanging=function(t,e,o,n){if(this._del.onRowParentChanging)return this._del.onRowParentChanging(this._del,e.rowId,o.rowId,n);i.Utils.log("onRowParentChanging: "+e.rowId+", "+o.rowId+", "+n)},o.prototype.onTreeDataProviderRowParentChanged=function(t,e,o,n){this._del.onRowParentChanged?this._del.onRowParentChanged(this._del,e.rowId,o.rowId,n):i.Utils.log("onRowParentChanged: "+e.rowId+", "+o.rowId+", "+n)},o}(p);return y}var Fi,Li,Pi,Bi,Vi={},Ai={},Ni={},$i={},Ui={};function Hi(){if(Fi)return Ui;Fi=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.FieldSummary=void 0;var t=function(){function t(t){this.field=t,this.count=0,this.sum=NaN,this.max=NaN,this.min=NaN,this.avg=NaN,this.vars=NaN,this.varsp=NaN,this.dataCount=0,this.dataAvg=NaN}return t.prototype.clear=function(){this.count=this.dataCount=0,this.sum=this.dataAvg=this.max=this.min=this.avg=this.vars=this.varsp=NaN},t}();return Ui.FieldSummary=t,Ui}function Gi(){return Li||(Li=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.GroupFooter=t.GroupItemImpl=t.GroupItem=t.GridRow=t.GridItem=t.RowStyle=t.ItemState_isInsertItem=t.ItemState_isInserting=t.ItemState_isEditing=t.ItemState=t.ITEM_EXT_CHECKED=void 0;var e=d,i=D(),o=Hi(),n=Dt(),r=C(),s=S();t.ITEM_EXT_CHECKED=1;var a,l=65536,h=131072,u=196608,c=4294705152;!function(t){t.NORMAL="normal",t.FOCUSED="focused",t.UPDATING="updating",t.INSERTING="inserting",t.APPENDING="appending",t.DUMMY="dummy"}(a=t.ItemState||(t.ItemState={}));t.ItemState_isEditing=function(t){return t==a.UPDATING||t==a.INSERTING||t==a.APPENDING};t.ItemState_isInserting=function(t){return t==a.INSERTING||t==a.APPENDING};t.ItemState_isInsertItem=function(t,e){return t==a.INSERTING||t==a.APPENDING||e==i.RowState.CREATED};var p=function(){function t(){}return t.prototype.clear=function(){return this.styleName=this.readOnly=this.editable=this.style=void 0,this},t.prototype.assign=function(t){"string"==typeof t?this.styleName=t:(null!=t.readOnly&&(this.readOnly=t.readOnly),null!=t.editable&&(this.editable=t.editable),null!=t.styleName&&(this.styleName=t.styleName.trim()),null!=t.style&&(this.style=t.style),null!=t.exportStyleName&&(this.exportStyleName=t.exportStyleName))},t}();t.RowStyle=p;var _=function(){function e(){this._id=e.$$_grid_item_id++,this._index=-1}return e.prototype.dispose=function(){this._parent=null},_dp(e,"id",{get:function(){return this._id}}),_dp(e,"index",{get:function(){return this._index}}),_dp(e,"itemIndex",{get:function(){return this._index}}),_dp(e,"parent",{get:function(){return this._parent}}),_dp(e,"parentIndex",{get:function(){return this._parent?this._parent._index:-1}}),_dp(e,"root",{get:function(){for(var t=this._parent;t&&t.level>1;)t=t._parent;return t}}),_dp(e,"childIndex",{get:function(){return this._parent?this._parent.indexOf(this):-1}}),_dp(e,"level",{get:function(){return this._parent?this._parent.level+1:0}}),_dp(e,"isData",{get:function(){return!1}}),_dp(e,"isDataRow",{get:function(){return!1}}),_dp(e,"visible",{get:function(){return this._parent&&this._index>=0}}),_dp(e,"displayLevel",{get:function(){return this.level}}),_dp(e,"provider",{get:function(){return this._parent&&this._parent.provider}}),_dp(e,"dataSource",{get:function(){return this._parent&&this._parent.dataSource}}),_dp(e,"dataRow",{get:function(){return-1}}),_dp(e,"dataId",{get:function(){return-1}}),_dp(e,"dataRowId",{get:function(){return-1}}),_dp(e,"rowState",{get:function(){var t=this.dataRow;if(t>=0){var e=this.dataSource;return e?e.getRowState(t):i.RowState.NONE}return i.RowState.NONE}}),_dp(e,"itemState",{get:function(){return a.NORMAL}}),_dp(e,"indeterminate",{get:function(){return 0!=(2&this._getExtents())}}),_dp(e,"checked",{get:function(){var e=0!=(this._getExtents()&t.ITEM_EXT_CHECKED);return this.provider.getItemChecked(this,e)}}),_dp(e,"checkable",{get:function(){return 0==(4&this._getExtents())}}),_dp(e,"editable",{get:function(){return!1}}),_dp(e,"resizable",{get:function(){return!1}}),_dp(e,"merged",{get:function(){return!1}}),_dp(e,"height",{get:function(){var t=this._getExtents();return t&u?(t&c)>>>18:NaN}}),e.prototype.$_setHeight=function(t,e){var i=this._getExtents();if(t=Math.round(t),isNaN(t)){if(i&u)return this._setExtents(-196609&i),!0}else{if(t!=(i&c)>>>18)return t=Math.max(0,Math.min(53247,t))<<18,i=e?-196609&i|h:-196609&i|l,this._setExtents(262143&i|t),!0;if(e){if(0==(i&h))return i=-196609&i|h,this._setExtents(i),!0}else if(0==(i&l))return i=-196609&i|l,this._setExtents(i),!0}},e.prototype.$_clearHeight=function(t){t?this._setExtents(-196609&this._getExtents()):this._setExtents(-65537&this._getExtents()),this.heights=null,0==this.index&&s.Utils.log("HEIGHT",this.height)},_dp(e,"heights",{get:function(){return this._heights},set:function(t){this._heights=t}}),e.prototype.getShadowRow=function(){return this.dataRow},e.prototype.getHeight=function(t){return this._heights[t]},e.prototype.setChecked=function(t,e){var i=this.provider;i&&i.checkItem(this,t,void 0,e)},e.prototype.setCheckable=function(t){var e=this.provider;e&&e.setCheckable(this,t)},e.prototype.getAncestor=function(t){if(tt;)e=e._parent;return e}return this instanceof g?this:null},e.prototype.getVisibleAncestor=function(){var t=this._parent;do{if(t.visible)return t;t=t._parent}while(t)},e.prototype.getAncestors=function(){var t=null,e=this._parent;if(e){t=[];do{t.push(e),e=e._parent}while(e)}return t},e.prototype.isDescendantOf=function(t){if(t){for(var e=this._parent;e&&e!=t;)e=e._parent;return e===t}return!1},e.prototype.getData=function(t){var e=this.dataSource;t=e.getFieldIndex(t);var i=this.getShadowRow();return e&&i>=0?e.getValue(i,t):void 0},e.prototype.setData=function(t,e){var i=this.dataSource;t=i.getFieldIndex(t),i&&i.setValue(this.dataRow,t,e)},e.prototype.getRowData=function(){var t=this.dataRow;if(t>=0){var e=this.dataSource;if(e)return e.getRow(t)}return null},e.prototype.getRowObject=function(){var t=this.dataRow;if(t>=0){var e=this.dataSource;if(e)return e.getRowObject(t)}return null},e.prototype.isChanged=function(t){var e=this.dataSource;return e?e.isDataChanged(this.dataRow,t):void 0},e.prototype.canEdit=function(){return!1},e.prototype._setIndex=function(t){this._index=t},e.prototype._setChecked=function(e){this.provider.setItemChecked(this,e)||(null===e?(this._setExtents(2|this._getExtents()),this._setExtents(this._getExtents()&~t.ITEM_EXT_CHECKED)):(this._setExtents(e?this._getExtents()|t.ITEM_EXT_CHECKED:this._getExtents()&~t.ITEM_EXT_CHECKED),this._setExtents(-3&this._getExtents())))},e.prototype._setCheckable=function(t){this._setExtents(t?-5&this._getExtents():4|this._getExtents())},e.PARENT="_parent",e.$$_grid_item_id=0,e}();t.GridItem=_;var f=function(t){function i(e){var i=t.call(this)||this;return i._displayLevel=-1,i._extents=0,i._dataRow=e,i}return e.__extends(i,t),_dp(i,"dataRowId",{get:function(){return this._dataRowId}}),_dp(i,"editable",{get:function(){return this._editable}}),_dp(i,"readOnly",{get:function(){return this._readOnly}}),i.prototype.setEditable=function(t,e){this._editable=t,this._readOnly=e},i.prototype._getExtents=function(){return this._extents},i.prototype._setExtents=function(t){this._extents=t},_dp(i,"isData",{get:function(){return!0}}),_dp(i,"isDataRow",{get:function(){return!0}}),_dp(i,"dataRow",{get:function(){return this._dataRow}}),_dp(i,"dataId",{get:function(){return this.dataSource.getRowId(this._dataRow)}}),_dp(i,"isLeaf",{get:function(){return!0}}),_dp(i,"resizable",{get:function(){return!0}}),_dp(i,"displayLevel",{get:function(){return this._displayLevel>=0?this._displayLevel:this.level}}),_dp(i,"type",{get:function(){return r.ItemType.ROW}}),i.prototype.canEdit=function(){return!0},i.prototype.getShadowRow=function(){return this._dataRow},i.prototype.$_setDisplayLevel=function(t){this._displayLevel=t},i}(_);t.GridRow=f;var g=function(t){function i(){var e=t.call(this)||this;return e._children=[],e._expanded=!1,e._descendantCount=0,e._summaries=null,e._rows=null,e}return e.__extends(i,t),i.prototype.dispose=function(){this._children=null,t.prototype.dispose.call(this)},_dp(i,"expanded",{get:function(){return this._expanded}}),_dp(i,"collapsed",{get:function(){return!this.expanded}}),_dp(i,"count",{get:function(){return this._children.length}}),_dp(i,"children",{get:function(){return this._children.slice()}}),_dp(i,"allFooterCount",{get:function(){return 0}}),_dp(i,"rows",{get:function(){return!this._rows&&this.$_collectRows(this,this._rows=[]),this._rows}}),_dp(i,"first",{get:function(){return this._children.length>0?this._children[0]:null}}),_dp(i,"last",{get:function(){var t=this._children.length;return t>0?this._children[t-1]:null}}),_dp(i,"firstItem",{get:function(){if(this._children.length>0){var t=this._children[0];return t instanceof i?t.firstItem:t}return null}}),_dp(i,"firstDataItem",{get:function(){if(this._children.length>0)for(var t=0,e=this._children.length;t0){for(var o=this._children.length;o&&(e=this._children[o-1],t&&e instanceof y);o--);return e instanceof i?e.getLastItem(t):e}return null},_dp(i,"lastDataItem",{get:function(){var t=this._children.length;if(t>0)for(;t>0;t--){var e=this._children[t-1];if(e instanceof i)return e.lastDataItem;if(e instanceof f)return e}return null}}),_dp(i,"descendantCount",{get:function(){return this._descendantCount}}),_dp(i,"expandable",{get:function(){return!0}}),_dp(i,"collapsable",{get:function(){return!0}}),i.prototype.getItem=function(t){if(t<0||t>=this._children.length)throw new RangeError("index is invalid: "+t);return this._children[t]},i.prototype.getRows=function(){var t=[];return this.$_collectRows(this,t),t},i.prototype.getFooterIndex=function(t){return 0},i.prototype.itemOfRow=function(t){for(var e=this._children.length;e--;)if(this._children[e].dataRow==t)return this._children[e];return null},i.prototype.indexOf=function(t){return this._children.indexOf(t)},i.prototype.isDescendant=function(t){if(t&&t!==this){for(var e=t._parent;e&&e!==this;)e=e._parent;return e===this}return!1},i.prototype.getDescendants=function(t){if((!t||this._expanded)&&this._children&&this._children.length>0){var e=[];return function e(o,n){for(var r=o.count,s=0;s=0&&(this._children.splice(e,1),t instanceof _&&(t[_.PARENT]=null))},i.prototype.setItem=function(t,e){if(t&&e&&t!==e){var i=this._removeChild(t);this._insertChild(i,e),e._index=t.index}},i.prototype.setExpanded=function(t,e,i){(t!=this._expanded||i)&&(t?this.provider.expand(this,e,i,0):this.provider.collapse(this,e,i))},i.prototype.getNumber=function(t){var e=this.$_getSummary(t);return e instanceof o.FieldSummary?e.count:e?e.length:this._descendantCount},i.prototype.getDataCount=function(t){var e=this.$_getSummary(t);if(e instanceof o.FieldSummary)return e.dataCount;if(e){var i=this.dataSource,n=e.length,r=0;if(n>0){for(var s=0;s0&&!isNaN(r)?r/s:NaN}return NaN},i.prototype.getSum=function(t){var e=this.$_getSummary(t);if(e instanceof o.FieldSummary)return e.sum;if(e){for(var i=this.dataSource,n=e.length,r=void 0,s=0;sh?a:h);return h}return n?NaN:null},i.prototype.getMin=function(t){var e=this.$_getSummary(t),i=this.dataSource,n=i.getField(t).dataType===r.ValueType.NUMBER;if(e instanceof o.FieldSummary)return e.min;if(e){for(var s=e.length,a=void 0,l=0,h=null;l1){for(var a=0,l=0;l1){for(var a=0,l=0;l0)for(var i=0;i=0&&(this._children.splice(e,1),t instanceof _&&(t[_.PARENT]=null)),e},i.prototype._exchangeItems=function(t,e){if(t<0||t>=this._children.length)throw new RangeError("index1 is out of range: "+t);if(e<0||e>=this._children.length)throw new RangeError("index2 is out of range: "+e);if(t!==e){var i=this._children[t];this._children[t]=this._children[e],this._children[e]=i}},i.prototype._moveChild=function(t,e){var i=this._children.length;if(t<0||t>=i)throw new RangeError("index is out of range: "+t);var o=Math.min(Math.max(t+e,0),i-1),n=this._children[t];if(e<0)for(var r=t;r>o;r--)this._children[r]=this._children[r-1];else for(r=t;r3&&e.canSummarize(t)){var n=new o.FieldSummary(t);return e.summarizeRange(n,this._rows,i==r.SummaryMode.STATISTICAL),n}return this._rows}return null},i.prototype._saveExpanded=function(){this._setExtents(this.expanded?16|this._getExtents():-17&this._getExtents())},i.prototype._restoreExpanded=function(t){if(void 0===t&&(t=!1),this._setExpanded(0!=(16&this._getExtents())),t)for(var e=this.count-1;e>=0;e--){var o=this.getItem(e);o instanceof i&&o._restoreExpanded(!0)}},i}(_);t.GroupItem=g;var m=function(t){function i(e){var i=t.call(this)||this;return i._footers=0,i._extents=0,i._allFooters=[],i._groupField=e,i}return e.__extends(i,t),i.prototype.dispose=function(){this._allFooters=null,t.prototype.dispose.call(this)},_dp(i,"groupField",{get:function(){return this._groupField}}),_dp(i,"groupValue",{get:function(){return this._groupValue},set:function(t){this._groupValue=t}}),i.prototype._getExtents=function(){return this._extents},i.prototype._setExtents=function(t){this._extents=t},_dp(i,"footer",{get:function(){return this._footer}}),_dp(i,"type",{get:function(){return r.ItemType.GROUP}}),_dp(i,"footerCount",{get:function(){return this._footers}}),_dp(i,"allFooterCount",{get:function(){return this._allFooters.length}}),i.prototype.getHiddenFooterCount=function(){for(var t=0,e=0;e1)for(var e=this._children,i=e.length-1;i>=0;i--){if(e[i]===t)return!0;if(e[i]===this._footer)break}return!1},i.prototype._addChild=function(e,i){e instanceof y?(this._allFooters.push(e),e[_.PARENT]=this,e.hiddenFooter||(t.prototype._addChild.call(this,e,i),this._footer=this._footer||e,this._footers++)):t.prototype._addChild.call(this,e,i)},i.prototype.getFirstVisibleItem=function(t){if(this.visible)return this;for(var e=0,i=this.children.length;e-1?this.$_vindex:this.$_footerIndex}}),_dp(i,"hiddenFooter",{get:function(){return this._hiddenFooter},set:function(t){this._hiddenFooter=t}}),i.prototype._getExtents=function(){return this._extents},i.prototype._setExtents=function(t){this._extents=t},_dp(i,"isLeaf",{get:function(){return!0}}),_dp(i,"isData",{get:function(){return!0}}),_dp(i,"displayLevel",{get:function(){return this.level}}),_dp(i,"type",{get:function(){return r.ItemType.FOOTER}}),i}(_);t.GroupFooter=y}($i)),$i}function Wi(){if(Pi)return Ni;Pi=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.ProxyItemProvider=Ni.ItemProvider=Ni.RootItem=void 0;var t=d,e=C(),i=Gi(),o=et(),n=function(e){function i(t){var i=e.call(this,-1)||this;return i._provider=t,i}return t.__extends(i,e),_dp(i,"provider",{get:function(){return this._provider}}),_dp(i,"level",{get:function(){return 0}}),_dp(i,"expanded",{get:function(){return!1}}),_dp(i,"isLeaf",{get:function(){return!1}}),_dp(i,"dataSource",{get:function(){return this._provider.dataSource}}),_dp(i,"expandable",{get:function(){return!1}}),_dp(i,"collapsable",{get:function(){return!1}}),i}(i.GroupItemImpl);Ni.RootItem=n;var r=function(o){function r(t){var e=o.call(this)||this;return e._hideDeleted=!1,e._eventLock=0,e._rowHeighted=!1,e._explicitHeighted=!1,e._indexing=t,e._rootItem=e._createRootItem(),e}return t.__extends(r,o),r.prototype._doDispose=function(){return this._rootItem.dispose(),null},_dp(r,"hideDeleted",{get:function(){return this._hideDeleted},set:function(t){t!=this._hideDeleted&&(this._hideDeleted=t,this._hideDeletedChanged())}}),_dp(r,"summaryMode",{get:function(){return e.SummaryMode.AGGREGATE},set:function(t){}}),_dp(r,"sortMode",{get:function(){return e.SortMode.AUTO},set:function(t){}}),_dp(r,"fixedCount",{get:function(){return 0}}),_dp(r,"maxItemCount",{get:function(){return 0},set:function(t){}}),r.prototype.isFiltered=function(t){return!1},r.prototype.getMovable=function(t){return!1},r.prototype.setFixed=function(t,e,i,o){},r.prototype.attachItem=function(t){t._parent=this._rootItem},r.prototype.getItemsByIndices=function(t){var e=[];if(t)for(var i=0,o=t.length;i0){for(var n=0,r=t.length;n=0||s)&&(s||o.canUpdateRow(n))}return!1},r.prototype.canAppend=function(){var t=this.dataSource;return t&&t.canAppendRow()},r.prototype.canInsert=function(t){if(t){var e=t.dataRow,i=this.dataSource;return i&&i.canInsertRow(e)}return!1},r.prototype.canDelete=function(t){if(t){var e=t.dataRow,i=this.dataSource;return e>=0&&i&&i.canDeleteRow(e)}return!1},r.prototype.appendDummy=function(){},r.prototype.cancelDummy=function(){},r.prototype.findItem=function(t,e,i,o,n){return-1},r.prototype.findCell=function(t,e,i,o,n,r){return null},r.prototype.getNumber=function(t){return NaN},r.prototype.getSum=function(t){return NaN},r.prototype.getMax=function(t){return NaN},r.prototype.getMin=function(t){return NaN},r.prototype.getAvg=function(t){return NaN},r.prototype.getVar=function(t){return NaN},r.prototype.getVarp=function(t){return NaN},r.prototype.getStdev=function(t){return NaN},r.prototype.getStdevp=function(t){return NaN},r.prototype.getDataCount=function(t){return NaN},r.prototype.getDataAvg=function(t){return NaN},_dp(r,"isIndexing",{get:function(){return this._indexing}}),r.prototype.setRowHeight=function(t,e,i){t.$_setHeight(e,i)&&(isNaN(e)||(i?this._explicitHeighted=!0:this._rowHeighted=!0))},r.prototype.clearRowHeights=function(t){if(t||this._rowHeighted){for(var e=!1,i=this.itemCount-1;i>=0;i--){var o=this.getItem(i);isNaN(o.height)&&!o.heights||(o.$_clearHeight(t),o.heights=null,e=!0)}return this._rowHeighted=!1,t&&(this._explicitHeighted=!1),e}},r.prototype.isRowHeighted=function(t){return void 0===t&&(t=!0),this._rowHeighted||t&&this._explicitHeighted},r.prototype.setCheckFieldIndex=function(t){this._checkFieldIndex=t},r.prototype.getItemChecked=function(t,e){return this._checkFieldIndex>-1?this.dataSource.getField(this._checkFieldIndex).readBooleanValue(t.getData(this._checkFieldIndex)):e},r.prototype.setItemChecked=function(t,e){if(this._checkFieldIndex>-1){var i=this.dataSource.getField(this._checkFieldIndex),o=i.readBooleanValue(t.getData(this._checkFieldIndex));return!!o!=e&&(o=(i._boolParser||i._ownerBoolParser).toText(e),t.setData(this._checkFieldIndex,o)),!0}return!1},_dp(r,"rootItem",{get:function(){return this._rootItem}}),r.prototype._createRootItem=function(){return new n(this)},r.prototype._hideDeletedChanged=function(){},r.prototype.$_canFire=function(){return this._eventLock<=0},r.prototype._setChecked=function(t,e){t._setChecked(e)},r.prototype._setIndeterminated=function(t,e){t._setChecked(!!e&&null)},r.prototype._clearChecked=function(){for(var t=0,e=this.itemCount;t=i.fieldCount)throw new o.DataSourceError(s.Messages.messages.fieldIndexOutOfBounds+t);var n=i.getField(t),r=this._values[t];e=n.readValue(e),this._values[t]=e,this._started&&!n.equalValues(r,e)&&this.provider._editItemCellUpdated(this,t,r,e),this.$_clearHeight(!1)},_dp(n,"resizable",{get:function(){return!1}}),_dp(n,"itemState",{get:function(){return this._state}}),_dp(n,"level",{get:function(){return this._target?this._target.level:1}}),n.prototype.getData=function(t){if((t=this.dataSource.getFieldIndex(t))<0&&t>=this.dataSource.fieldCount)throw new RangeError("field index is out of bounds: "+t);return this._values[t]},n.prototype.setData=function(t,e){var i=this.dataSource;if(t<0&&t>=i.fieldCount)throw new RangeError("field index is out of bounds: "+t);var o=i.getField(t),n=this._values[t],r=!this._checkDiff;e=o.readValue(e),r||(r=this._strictDiff?!o.equalValues(n,e):!o.sameValues(n,e)),r&&(this._values[t]=e,this._changeValues[t]=!0,this.provider._editItemCellUpdated(this,t,n,e),this.provider._editItemCellEdited(this,t)),this.$_clearHeight(!1)},n.prototype.getRowData=function(){return this._values.concat()},n.prototype.getRowObject=function(){var t=this.dataSource;if(t){for(var e={},i=0,o=t.fieldCount;i=0&&en.index?i.getItem(t-1):i.getItem(t):t=0&&null!=o._index2&&this.moveItem(s,o._index2)}}return i},o.prototype.remove=function(t,e){var i=this.dataSource;if(t&&!this.isEditing(t)&&i){var o=t.dataRow;o>=0&&i.removeRow(o,e)}},o.prototype.revert=function(t){this.revertAll([t])},o.prototype.revertAll=function(t){if(t&&0!=t.length){var e=this.dataSource;if(e){var i=this.getItemsByIndices(t).map((function(t){return t.dataRow}));e.revert(i)}}},o.prototype.getRemovableRows=function(t){if(!t||0==t.length)return null;for(var e=[],i=0,o=t.length;i=0&&e.push(n)}return e},o.prototype.removeRows=function(t,e){t&&(t.length>1?this.dataSource.removeRows(t,!1,e):this.dataSource.removeRow(t[0],e))},o.prototype.updateRows2=function(t){this.dataSource.updateRows2(t,!1,!1)},o.prototype._createDummyEditItem=function(){return new a(this,this.itemCount)},o.prototype._createEditItem=function(t,e,o,n,r){var s=this.dataSource;if(!s)return null;var a=null,h=s.fieldCount;switch(e){case i.ItemState.UPDATING:a=new l(this,t,t.index,t.dataRow,e);for(var u=0;u=0&&g<=d._pubItems.length&&(a._index2=g)}}if(o)for(u=0;uu&&a.setValue(u,o[u])}return a},o}(h);return Ai.EditableItemProviderImpl=u,Ai}var zi,Yi={},qi={},Xi={};function Ki(){if(zi)return Xi;zi=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.ExpressionStatement=Xi.ExpressionStatementError=void 0;var t=d,e=function(e){function i(t,i){var o=e.call(this,t)||this;return o.message=t,o.tokenPos=i,o}return t.__extends(i,e),i}(Error);Xi.ExpressionStatementError=e;var i=function(){function t(t){this.literal=t}return t.prototype.evaluate=function(t){return this.literal},t}(),o=function(){function t(t,e){void 0===e&&(e=-1),this.ident=t,this.idKey=e}return t.prototype.evaluate=function(t){return this.idKey<0&&(this.idKey=t.isIdentifier(this.ident)),t.evaluateIdentifier(this.idKey)},t}(),n=function(){function t(t,e,i){void 0===e&&(e=-1),void 0===i&&(i=!1),this.ident=t,this.idKey=e,this.capital=i}return t.prototype.evaluate=function(t){var e=this.ident,i=e.indexOf("["),o=e.indexOf("]");if(i=0){var l=t.indexOf("}",a+2);if(l>=0){if(a>s){var h=t.substring(s,a);e=new i(h),this._tokens.push(e)}if(c=t.substring(a+2,l).trim()){var u,d=void 0;e=(u=c.indexOf("["))&&(d=c.indexOf("]"))&&u=0;e--)if(this._items[e].name==t)return e;return-1},e.prototype.getActiveItems=function(t){for(var e=[],i=this._items.length-1;i>=0;i--)this._items[i].active==t&&e.push(this._items[i]);return e},e.prototype.assignFrom=function(t){if(t!==this){var e=this.activeCount;if(this.clear(!1),t)for(var i=t instanceof Array?t:[t],o=i.length,n=0;n0){for(var o=0;o0){for(var o=0,n=t.length,r=0;r=0?(this._items[h]&&this._items[h].removeListener(this),this._items[h]=l):this._items.push(l),l.addListener(this),this._names[l.name]=l,l.active&&o++}}this.changed(null,!1,!(o>0&&i))}},e.prototype.removeItems=function(t){if(t){for(var e=0,i=t.length-1;i>=0;i--){var o=this.indexOf(t[i]);if(o>=0){var n=this._items[o];this._items.splice(o,1),delete this._names[n.name],n.removeListener(this),n.active&&e++}}this.changed(null,!1,!e)}},e.prototype.$_activateItems=function(t,e,i,o,n){var r=o;this._updating=!0;try{t.forEach((function(t){t.active!=e&&(t._active=e,r=!0)}))}finally{this._updating=!1}i&&r&&this.changed(null,n)},e.prototype.activateItems=function(t,e,i){var o=this;if(void 0===i&&(i=!0),t){var n=t.filter((function(t){return t&&o._names[t]})).map((function(t){return o._names[t]}));this.$_activateItems(n,e,i)}},e.prototype.activateAll=function(t,e,i,o){this.$_activateItems(this._items,t,e,i,o)},e.prototype.$_hideFilters=function(t,e){t.forEach((function(t){t&&(t.visible=!e)}))},e.prototype.hideFilters=function(t,e){var i=this;t&&this.$_hideFilters(t.filter((function(t){return i._names[t]})).map((function(t){return i._names[t]})),e)},e.prototype.hideAllFilters=function(t){this.$_hideFilters(this._items,t)},e.prototype.$_toggleItems=function(t){var e=!1;this._updating=!0;try{t.forEach((function(t){t._active=!t.active,e=!0}))}finally{this._updating=!1}e&&this.changed(null)},e.prototype.toggleItems=function(t){var e=this;t&&this.$_toggleItems(t.filter((function(t){return e._names[t]})).map((function(t){return e._names[t]})))},e.prototype.toggleAll=function(){this.$_toggleItems(this._items)},e.prototype.changed=function(t,e,i){this._updating||this.fireEvent(a.CHANGED,t,e,i)},e.prototype.$_checkName=function(t){if(this._names.hasOwnProperty(t))throw new Error("Column filter already existes: "+t)},e.prototype.onColumnFilterChanged=function(t){this.changed(t)},e}(o.EventAware);t.ColumnFilterCollection=u;var c=function(t){function e(){var e=t.call(this)||this;return e._field=-1,e._fieldCount=0,e}return i.__extends(e,t),e.prototype._doDispose=function(){this._item=this._ds=null,t.prototype._doDispose.call(this)},e.prototype.setDataSource=function(t){this._ds=t,this._fieldCount=this._ds?this._ds.fieldCount:0},e.prototype.setData=function(t,e,i){this._item=t,this._field=e,this._model=i},e.prototype.isIdentifier=function(i){return i=i.toLowerCase(),e.IDENTS.hasOwnProperty(i)?e.IDENTS[i]:t.prototype.isIdentifier.call(this,i)},e.prototype.$_getLookupText=function(t){var e=t._owner._owner;if(e.lookupDisplay){var i=e.lookupSource;if(i){for(var o=e.lookupKeyFieldIds,n=o.length,r=[],s=0;s=0?this._item.getData(a):e.getLookupLabel(this._item.getData(e.fieldName),!1)}return""},e.prototype.evaluateIdentifier=function(t){switch(t){case e.ID_VALUE:return this._item.getData(this._field);case e.ID_TEXT:return this.$_getLookupText(this._model);case e.ID_STATE:switch(this._item.rowState){case r.RowState.CREATED:return"c";case r.RowState.UPDATED:return"u";case r.RowState.DELETED:return"d";case r.RowState.CREATE_AND_DELETED:return"x"}return;case e.ID_CHANGED_CELL:var i=this._item.dataRow,o=this._field;return o>=0&&this._item.rowState==r.RowState.UPDATED&&this._ds.isDataChanged(i,o);case e.ID_FIELD:return this._field}throw new n.ExpressionEvaluationError("Invalid identifier key: "+t)},e.prototype.evaluateIndexerI=function(t,i){if(this._item){if(t==e.ID_VALUE||t==e.ID_VALUES){if(i<0||i>=this._fieldCount)throw new n.ExpressionEvaluationError("Data field index out of bounds:"+i);return this._item.getData(i)}throw new n.ExpressionEvaluationError("Invalid identifier indexer: "+t)}},e.prototype.evaluateIndexerS=function(t,i,o){if(t!=e.ID_VALUE&&t!=e.ID_VALUES)throw new n.ExpressionEvaluationError("Invalid identifier indexer: "+t);if(this._ds){var r=o?this._ds.getFieldIndexC(i):this._ds.getFieldIndex(i);if(r<0||r>=this._fieldCount)throw new n.ExpressionEvaluationError("Data field is not exists:"+i);return this._item.getData(r)}},e.ID_VALUE=0,e.ID_FIELD=1,e.ID_VALUES=2,e.ID_STATE=3,e.ID_CHANGED_CELL=4,e.ID_TEXT=5,e.IDENTS={value:e.ID_VALUE,field:e.ID_FIELD,values:e.ID_VALUES,state:e.ID_STATE,changedcell:e.ID_CHANGED_CELL,text:e.ID_TEXT},e}(n.ExpressionRuntime);t.ColumnFilterRuntime=c}(Ji)),Ji}var to,eo={};function io(){if(to)return eo;to=1,Object.defineProperty(eo,"__esModule",{value:!0}),eo.VisualObject=eo.GridObject=void 0;var t=d,e=function(e){function i(t){var i=e.call(this)||this;return i._dirty=!1,i._grid=t,i}return t.__extends(i,e),i.prototype._doDispose=function(){this._grid=null,e.prototype._doDispose.call(this)},_dp(i,"owner",{get:function(){return this._grid}}),_dp(i,"dirty",{get:function(){return this._dirty},set:function(t){t!==this._dirty&&(this._dirty=t,this.invalidate())}}),i.prototype.clean=function(){this._dirty&&(this._dirty=!1)},i.prototype.invalidate=function(){this._grid&&this._grid.invalidate()},i.prototype.refreshOwner=function(){this._grid&&this._grid.refreshView()},i.prototype._changed=function(){this._doChanged(),this._dirty||(this._dirty=!0,this.refreshOwner())},i.prototype._doChanged=function(){},i}(et().EventAware);eo.GridObject=e;var i=function(e){function i(t){var i=e.call(this,t)||this;return i._visible=!0,i}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(i,"visible",{get:function(){return this._visible},set:function(t){t!=this._visible&&(this._visible=t,this._visibleChanged())}}),i.prototype._doChanged=function(){this._grid&&this._grid._visualObjectChanged(this)},i.prototype._visibleChanged=function(){this._changed()},i}(e);return eo.VisualObject=i,eo}var oo,no,ro={},so={},ao={},lo={};function ho(){if(oo)return lo;oo=1,Object.defineProperty(lo,"__esModule",{value:!0}),lo.RowGroupStatementRuntime=lo.EqualBlankRuntime=lo.DataRowExpressionRuntime=void 0;var t=d,e=Y(),i=Gi(),o=S(),n=D(),r=function(r){function s(){var t=r.call(this)||this;return t._item=null,t._group=null,t._dataSource=null,t._fieldCount=0,t}return t.__extends(s,r),s.prototype._doDispose=function(){this._item=null,this._group=null,this._dataSource=null,r.prototype._doDispose.call(this)},_dp(s,"index",{get:function(){return this._item.index}}),_dp(s,"item",{get:function(){return this._item}}),s.prototype.setDataSource=function(t){this._dataSource=t,this._fieldCount=t?t.fieldCount:0},s.prototype.setItem=function(t){this._item=t,this._group=o.Utils.cast(t,i.GroupItem)},s.prototype.isIdentifier=function(t){return t=t.toLowerCase(),s.IDENTS.hasOwnProperty(t)?s.IDENTS[t]:r.prototype.isIdentifier.call(this,t)},s.prototype.evaluateIdentifier=function(t){switch(t){case s.ID_ROW:return this._item.index;case s.ID_DATAROW:return this._item.dataRow;case s.ID_CHECKED:return this._item.checked;case s.ID_STATE:switch(this._item.rowState){case n.RowState.CREATED:return"c";case n.RowState.UPDATED:return"u";case n.RowState.DELETED:return"d";case n.RowState.CREATE_AND_DELETED:return"x"}return;case s.ID_COUNT:return this._group?this._group.count:0;case s.ID_DCOUNT:return this._group?this._group.descendantCount:0}throw new e.ExpressionEvaluationError("Invalid identifier key: "+t)},s.prototype.evaluateIndexerI=function(t,i){if(this._item){if(t==s.ID_VALUE||t==s.ID_VALUES){if(i<0||i>=this._fieldCount)throw new e.ExpressionEvaluationError("Data field index out of bounds:"+i);return this._item.getData(i)}throw new e.ExpressionEvaluationError("Invalid identifier indexer: "+t)}},s.prototype.evaluateIndexerS=function(t,i,o){if(t!=s.ID_VALUE&&t!=s.ID_VALUES)throw new e.ExpressionEvaluationError("Invalid identifier indexer: "+t);if(this._dataSource){var n=o?this._dataSource.getFieldIndexC(i):this._dataSource.getFieldIndex(i);if(n<0||n>=this._fieldCount)throw new e.ExpressionEvaluationError("Data field is not exists:"+i);return this._item.getData(n)}},s.ID_ROW=0,s.ID_DATAROW=1,s.ID_CHECKED=2,s.ID_VALUE=3,s.ID_VALUES=4,s.ID_STATE=5,s.ID_COUNT=6,s.ID_DCOUNT=7,s.IDENTS={row:s.ID_ROW,datarow:s.ID_DATAROW,checked:s.ID_CHECKED,value:s.ID_VALUE,values:s.ID_VALUES,state:s.ID_STATE,count:s.ID_COUNT,dcount:s.ID_DCOUNT},s}(e.ExpressionRuntime);lo.DataRowExpressionRuntime=r;var s=function(i){function o(){var t=i.call(this)||this;return t._fieldCount=0,t}return t.__extends(o,i),o.prototype._doDispose=function(){this._cell=null,this._item=null,this._ds=null,this._grid=null,i.prototype._doDispose.call(this)},o.prototype.setDataArguments=function(t,e,i){this._ds=t,this._fieldCount=t?t.fieldCount:0,this._cell=e,this._item=i,this._grid=e&&e.index.column.grid},o.prototype.setItem=function(t){this._item=t},o.prototype.isIdentifier=function(t){return t=t.toLowerCase(),o.IDENTS.hasOwnProperty(t)?o.IDENTS[t]:i.prototype.isIdentifier.call(this,t)},o.prototype.evaluateIdentifier=function(t){var i;switch(t){case o.ID_VALUE:return this._item.getData(this._cell.index.dataField);case o.ID_BASE:return(i=this._cell.index.dataColumn.baseIndex)>=0?this._item.getData(i):void 0;case o.ID_PREV_VALUES:var n=this._cell.index.column,r=this._grid.getDataColumns();i=r.indexOf(n);var s=[];if(r.length||i<0)return;for(var a=0,l=Math.min(i,r.length);a=this._fieldCount)throw new e.ExpressionEvaluationError("Data field index out of bounds:"+i);return this._item.getData(i)}throw new e.ExpressionEvaluationError("Invalid identifier indexer: "+t)}},o.prototype.evaluateIndexerS=function(t,i,n){if(t!=o.ID_VALUE&&t!=o.ID_VALUES)throw new e.ExpressionEvaluationError("Invalid identifier indexer: "+t);if(this._ds){var r=n?this._ds.getFieldIndexC(i):this._ds.getFieldIndex(i);if(r<0||r>=this._fieldCount)throw new e.ExpressionEvaluationError("Data field is not exists:"+i);return this._item.getData(r)}},o.ID_VALUE=0,o.ID_VALUES=1,o.ID_BASE=2,o.ID_PREV_VALUES=3,o.IDENTS={value:o.ID_VALUE,values:o.ID_VALUES,base:o.ID_BASE,prevvalues:o.ID_PREV_VALUES},o}(e.ExpressionRuntime);lo.EqualBlankRuntime=s;var a=function(i){function o(){return i.call(this)||this}return t.__extends(o,i),o.prototype.setGrid=function(t){this._grid=t},o.prototype.setGroup=function(t){this._group=t},o.prototype.isIdentifier=function(t){return t=t.toLowerCase(),o.IDENTS.hasOwnProperty(t)?o.IDENTS[t]:i.prototype.isIdentifier.call(this,t)},o.prototype.evaluateIdentifier=function(t){var i,n,r=this._group;switch(t){case o.ID_GROUP_FIELD:return(i=r.dataSource.getField(r.groupField))?i.fieldName:"";case o.ID_FIELD_HEADER:return(i=r.dataSource.getField(r.groupField))?i.header:"";case o.ID_GROUP_COLUMN:return(n=this._grid?this._grid.columnByField(r.groupField):null)?n.displayText:r.dataSource.getFieldName(r.groupField);case o.ID_COLUMN_HEADER:return(n=this._grid?this._grid.columnByField(r.groupField):null)?n.header.text||n.displayText:r.dataSource.getFieldName(r.groupField);case o.ID_COLUMN_FOOTER:return(n=this._grid?this._grid.columnByField(r.groupField):null)?n.footer.text||n.displayText:r.dataSource.getFieldName(r.groupField);case o.ID_GROUP_VALUE:return r?r.groupValue:void 0;case o.ID_ROW_COUNT:return r.descendantCount}throw new e.ExpressionEvaluationError("Invalid identifier key: "+t)},o.prototype.evaluateIndexerI=function(t,i){switch(t){case o.ID_SUM:case o.ID_MAX:case o.ID_MIN:case o.ID_AVG:case o.ID_DATA_COUNT:case o.ID_DATA_AVG:if(isNaN(i)||i<0)return;var n=void 0;switch(t){case o.ID_SUM:n=this._group.getSum(i);break;case o.ID_MAX:n=this._group.getMax(i);break;case o.ID_MIN:n=this._group.getMin(i);break;case o.ID_AVG:n=this._group.getAvg(i);break;case o.ID_DATA_COUNT:n=this._group.getDataCount(i);break;case o.ID_DATA_AVG:n=this._group.getDataAvg(i)}return isNaN(n)?"":String(n)}throw new e.ExpressionEvaluationError("Invalid identifier indexer: "+t)},o.prototype.evaluateIndexerS=function(t,e,i){var o=this._group.dataSource,n=e?o?o.getFieldIndex(e):-1:this._group.groupField;return this.evaluateIndexerI(t,n)},o.ID_GROUP_FIELD=0,o.ID_FIELD_HEADER=1,o.ID_GROUP_COLUMN=2,o.ID_COLUMN_HEADER=3,o.ID_COLUMN_FOOTER=4,o.ID_GROUP_VALUE=5,o.ID_ROW_COUNT=6,o.ID_SUM=7,o.ID_MAX=8,o.ID_MIN=9,o.ID_AVG=10,o.ID_DATA_COUNT=11,o.ID_DATA_AVG=12,o.IDENTS={groupfield:o.ID_GROUP_FIELD,fieldheader:o.ID_FIELD_HEADER,groupcolumn:o.ID_GROUP_COLUMN,columnheader:o.ID_COLUMN_HEADER,columnfooter:o.ID_COLUMN_FOOTER,groupvalue:o.ID_GROUP_VALUE,rowcount:o.ID_ROW_COUNT,sum:o.ID_SUM,max:o.ID_MAX,min:o.ID_MIN,avg:o.ID_AVG,datacount:o.ID_DATA_COUNT,dataavg:o.ID_DATA_AVG},o}(e.ExpressionRuntime);return lo.RowGroupStatementRuntime=a,lo}function uo(){if(no)return ao;no=1,Object.defineProperty(ao,"__esModule",{value:!0}),ao.SeriesCell=ao.LiteralCell=ao.HiddenDataCell=ao.DataCell=ao.ValueCell=ao.StyledCell=ao.GridCell=void 0;var t=d,e=G(),i=cn(),o=Gi(),n=C(),r=rn(),s=ho(),a=Y(),l=function(e){function o(t){var o=e.call(this)||this;return o._index=new i.CellIndex,o._name=t,o}return t.__extends(o,e),o.prototype._doDispose=function(){this._index&&this._index.dispose(),this._index=null,e.prototype._doDispose.call(this)},_dp(o,"name",{get:function(){return this._name}}),_dp(o,"index",{get:function(){return this._index}}),_dp(o,"item",{get:function(){return this._index.item}}),_dp(o,"valueColumn",{get:function(){return this._index.valueColumn}}),_dp(o,"dataColumn",{get:function(){return this._index.dataColumn}}),_dp(o,"text",{get:function(){return null}}),_dp(o,"value",{get:function(){}}),_dp(o,"level",{get:function(){return 0}}),o.prototype.setIndex=function(t){this._index.assignFrom(t)},o.prototype.setIndex2=function(t,e,i){this._index._grid=t,this._index.set(e,i)},o.prototype.setLayout=function(t){this._index.layout=t},o.ERROR="<>",o}(e.Base);ao.GridCell=l;var h=function(e){function i(t,i){void 0===i&&(i=null);var o=e.call(this,i)||this;return o._model=t,o}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(i,"model",{get:function(){return this._model},set:function(t){this._model=t}}),i}(l);ao.StyledCell=h;var u=function(e){function i(t){return e.call(this,t)||this}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},i.prototype.getBlankState=function(t){return n.BlankState.NONE},i.prototype.isValueChanged=function(){return!1},i}(l);ao.ValueCell=u;var c=function(e){function r(t){return void 0===t&&(t=null),e.call(this,t||"dataCell")||this}return t.__extends(r,e),r.getText=function(t,e){var i=e.dataIndex>=0?t.getData(e.dataIndex):void 0;return r._getText(t,e,i)},r._getText=function(t,e,o){var r,s=e,a=function(){var e=s.labelFieldIndex;return e>=0?t.getData(e):s.getLookupLabel(o,!0)};if(s.lookupDisplay){var l=s.lookupSource;if(l){for(var h=s.lookupKeyFieldIds,u=h.length,d=[],c=0;c=0?a():l.lookup(d,s.valueSeparator,s.textOfInvalid)}else r=a()}else{var p,_=void 0;if(r=o,s.valueType==n.ValueType.NUMBER&&null!=(p=s.nanText)&&isNaN(r))r=p;else if(_=s.displayCallback){r=_(s.grid.handler,i.DummyCellIndex.tempItem(s.grid,t,e).proxy(),r)}else null!=r&&"object"==typeof r&&(r=JSON.stringify(r))}return null==r?"":String(r)},r._getDisplayText=function(t,e,i,o,s){var a,l=t.formatOptions,h=s.textFormatter||void 0===i.textFormat&&l.textFormatter,u=s.numberFormatter||void 0===i.numberFormat&&l.numberFormatter,d=s.booleanFormatter||void 0===i.booleanFormat&&l.boolFormatter,c=s.datetimeWriter||void 0===i.datetimeFormat&&l.datetimeWriter;if(null!=s.text)return s.text;if(i){switch(i.valueType){case n.ValueType.TEXT:a=o&&h?h.getText(o):r._getText(e,i,o);break;case n.ValueType.NUMBER:var p=Number(o);a=(isNaN(p)||null==p)&&i.nanText?i.nanText:0==p&&null!=i.zeroText?i.zeroText:u?u.getText(p,i.displayMinusZero):r._getText(e,i,o);break;case n.ValueType.DATETIME:a=o instanceof Date&&c?c.getText(o):r._getText(e,i,o);break;case n.ValueType.BOOLEAN:a=d?d.formatValue(o):r._getText(e,i,o);break;case n.ValueType.OBJECT:var _=i.getField(),f=e.dataRow,g=i.objectKey||_.objectKey,m=i.objectCallback||_.objectCallback;if(o){var y=m&&"function"==typeof m?m(_.orgFieldName,f,o):g?o[g]:r._getText(e,i,o);switch(typeof y){case"string":a=r._getText(e,i,y);break;case"number":a=u?u.getText(y,i.displayMinusZero):String(y);break;case"boolean":a=d?d.formatValue(y):String(y);break;default:a=y instanceof Date&&c?c.getText(y):y?String(y):""}}break;default:a=r._getText(e,i,o)}if(a){var v=s.prefix;v&&(a=v+a),(v=s.suffix)&&(a+=v)}}return a},r.equalBlankRuntime=function(){return this._equalBlankRuntime||(this._equalBlankRuntime=new s.EqualBlankRuntime),this._equalBlankRuntime},r.prototype._doDispose=function(){e.prototype._doDispose.call(this)},r.prototype.getValue=function(){if(this.item.itemState===o.ItemState.DUMMY&&this.dataColumn)return this.dataColumn.defaultValue;var t=this.dataColumn.dataIndex;return t>=0?this.item.getData(t):void 0},r.prototype.getDisplayText=function(t,e){return r._getDisplayText(t,this.index.item,this.index.dataColumn,this.getValue(),e)},_dp(r,"value",{get:function(){return this.getValue()}}),r.prototype.getBlankState=function(t){var e=function(t,e){return t instanceof Date&&e instanceof Date?+t==+e:t==e},i=function(t){return _&&_ instanceof a.ExpressionNode?(f.setItem(t),_.evaluate(f)):t.getData(c.dataIndex)},s=function(t,e,i){var o=function(e){for(var i=e;i.level>t;)i=i.parent;return i};return o(e)===o(i)},l=function(r,a,l){if(r>=a&&r=0){var C=u.itemIndex;return _&&f&&f.setDataArguments(p.dataSource,this,p),h=C=0&&this.item.isChanged(t)},r}(u);ao.DataCell=c;var p=function(e){function i(t){return e.call(this,t||"hiddenDataCell")||this}return t.__extends(i,e),i.prototype.setItem=function(t){this.$_item=t},_dp(i,"item",{get:function(){return this.$_item}}),i}(c);ao.HiddenDataCell=p;var _=function(e){function i(t){return void 0===t&&(t=null),e.call(this,t||"literalCell")||this}return t.__extends(i,e),i.getDisplayText=function(t,e,i,o,n){var r=n.prefix||"",s=n.suffix||"",a=null!=n.text?n.text:o;return a?r+a+s:""},i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(i,"text",{get:function(){return this.index.literalColumn.value}}),_dp(i,"value",{get:function(){return this.index.column.value}}),i.prototype.getDisplayText=function(t,e){return i.getDisplayText(t,this.index.item,this.index.column,this.value,e)},i}(u);ao.LiteralCell=_;var f=function(e){function i(t){return void 0===t&&(t=null),e.call(this,t||"seriesCell")||this}return t.__extends(i,e),i.getText=function(t,e){return void 0===e&&(e=","),t?t.join(e):""},i.getValue=function(t){var e=t.column;if(e instanceof r.SeriesColumn){var i=e.fields,o=i?i.length:0;if(o>0){for(var n=t.item,s=new Array(o),a=0;a=0&&(s[a]=n.getData(i[a]));return s}}return[]},i._getDisplayText=function(t,e){void 0===e&&(e=",");var o=i.getValue(t);return o?o.join(e):""},i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},i.prototype.getDisplayText=function(t,e){var i=this.value;return this.index.seriesColumn.actualTarget&&(i=i.reverse()),i?i.join(e):""},_dp(i,"getText",{get:function(){return null}}),_dp(i,"value",{get:function(){return i.getValue(this.index)}}),i}(u);return ao.SeriesCell=f,ao}var co,po={};var _o,fo={};function go(){if(_o)return fo;_o=1,Object.defineProperty(fo,"__esModule",{value:!0}),fo.SvgElement=fo.SvgRenderer=void 0;var t=d,e=G(),i=S(),o="http://www.w3.org/2000/svg",n=function(e){function n(t,i){var o=e.call(this)||this;return o._transforms=[],o._defs=t,o._element=i,o}return t.__extends(n,e),n.prototype._doDispose=function(){this.clear(),e.prototype._doDispose.call(this)},_dp(n,"doc",{get:function(){return(0,i.getDoc)(this._element)||document}}),n.prototype.init=function(t,e){return this._defs=t,this._element=e,this},n.prototype.clear=function(){this._defs=null,this._element=null,this._transforms=null},n.prototype.sline=function(t,e,i,n,r){var s=this.doc.createElementNS(o,"line");this._element.appendChild(s),s.x1.baseVal.valueAsString=e,s.y1.baseVal.valueAsString=i,s.x2.baseVal.valueAsString=n,s.y2.baseVal.valueAsString=r,t&&s.setAttribute("class",t)},n.prototype.polygon=function(t,e){if(!(null==e||e.length<4)){var i=this.doc.createElementNS(o,"polygon");this._element.appendChild(i);var n=[];n.push(e[0]+","+e[1]);for(var r=2;r1&&e.removeChild(e.lastElementChild);var l=a.createElementNS(o,"g"),h=this._renderer.init(e.firstChild,l);e.appendChild(l),n.call(t,e,h,r,s),h.clear()},r.prototype._doDispose=function(){this._renderer=this._renderer.dispose(),this._element.parentElement&&this._element.parentElement.removeChild(this._element),this._element=this._defs=null,e.prototype._doDispose.call(this)},_dp(r,"element",{get:function(){return this._element}}),r.prototype.render=function(t){this._clear(),t?t.call(this,this._renderer,this._element.clientWidth,this._element.clientHeight):this._doRender(this._renderer,this._element.clientWidth,this._element.clientHeight)},r.prototype._clear=function(){this._element.childElementCount>1&&this._element.removeChild(this._element.lastElementChild);var t=(0,i.getDoc)(this._element).createElementNS(o,"g");this._element.appendChild(t),this._renderer._element=t},r.prototype._doRender=function(t,e,i){},r._renderer=new n,r}(e.Base);return fo.SvgElement=r,fo}var mo,yo={};var vo,Co={};var wo,xo,bo,Io={},Eo={};function So(){return wo||(wo=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.collapsable=t.isMultiLine=void 0;var e=C();t.isMultiLine=function(t){var e=t.visible?1:0,i=t.footerCount;if((e+=Math.max(t.descendantCount,t.count)-i)>1)return!0;for(var o=0;o1)return!0;return!1};t.collapsable=function(i,o){return(0,t.isMultiLine)(i)||i.footerCount>0||(0,e.isHeaderAdornment)(o)}}(Eo)),Eo}function Ro(){if(xo)return Io;xo=1,Object.defineProperty(Io,"__esModule",{value:!0}),Io.GroupedItemProvider=Io.MergedGroupHeader=Io.MergedGroupFooter=void 0;var t=d,e=Wi(),i=Gi(),o=G(),n=C(),r=S(),s=rt(),a=Ct(),l=So(),h=function(e){function i(){return e.call(this)||this}return t.__extends(i,e),i.prototype.getShadowRow=function(){var t=this.parent.firstDataItem;return t?t.dataRow:-1},i}(i.GroupFooter);Io.MergedGroupFooter=h;var u=function(e){function i(t,i){var o=e.call(this,i)||this;return o._level=0,o._level=t,o}return t.__extends(i,e),_dp(i,"groupLevel",{get:function(){return this._level}}),i.prototype.getShadowRow=function(){var t=this.firstDataItem;return t?t.dataRow:-1},_dp(i,"merged",{get:function(){return!0}}),i}(i.GroupItemImpl);Io.MergedGroupHeader=u;var c=function(o){function r(t){var e=o.call(this)||this;return e._fixedCount=0,e._items=[],e._rowCount=NaN,e._rs=t,e}return t.__extends(r,o),r.prototype._doDispose=function(){o.prototype._doDispose.call(this)},_dp(r,"provider",{get:function(){return this._rs}}),_dp(r,"count",{get:function(){return this._items.length}}),_dp(r,"fixedCount",{get:function(){return this._fixedCount}}),_dp(r,"items",{get:function(){return this._items.slice()}}),_dp(r,"rowCount",{get:function(){if(isNaN(this._rowCount)){for(var t=this._items,e=0,o=t.length-1;o>=0;o--)t[o]instanceof i.GridRow&&e++;this._rowCount=e}return this._rowCount}}),r.prototype.getItem=function(t){return this._items[t]},r.prototype.clear=function(t){void 0===t&&(t=null);for(var e=this._rs,o=0,n=(t=t||this._items).length;o=0?(a.splice(l,1),t._index=-1):(l=this.$_firstIndex(t,s.expandedAdornments==n.RowGroupAdornments.SUMMARY,!0))<0&&(l=t.firstItem.index);var h=0;if(l>=0)for(;l+h0?this._items[t.index-1]:null},r.prototype.$_changed=function(){this._rowCount=NaN},r.prototype.$_collectChildren=function(t,o,r,s,a){var l=this._rs,h=l.expandedAdornments,u=l.collapsedAdornments;if(s&&t&&t._setExpanded(!0),l.mergeMode){var d=void 0;if(!(t instanceof e.RootItem))if(h==n.RowGroupAdornments.HEADER||h==n.RowGroupAdornments.BOTH)o.push(t);else if(h==n.RowGroupAdornments.SUMMARY)for(var c=0,p=t.footerCount;c1){c=g.indexOf(d);for(var v=1;v1))for(c=g.indexOf(d),v=1;v1)for(c=t.indexOf(d),_=1;_0&&this._items.splice(s=t._allFooters[0].index,t.allFooterCount);break;case n.RowGroupAdornments.HEADER:default:this._items.splice(s=t.index,1)}o&&(t._index=-1)}var l=[];this.$_collectChildren(t,l,i,o,r),this._items=this._items.splice(0,s).concat(l).concat(this._items)},r.prototype.$_firstIndex=function(t,e,i){var o=t.index;if(o>=0)return o;for(var n=this._items,r=0,s=n.length;r=0)for(var e=this._groupFields.length;e--;)if(this._groupFields[e]==t)return e+1;return 0},_dp(o,"groupedFields",{get:function(){return this._groupFields?this._groupFields.concat():null}}),o.prototype.expand=function(t,e,i,o){if(t&&(!t.expanded||i)&&this.fireExpand(t)&&(t.expanded&&this._visibleItems.collapse(t,!1),this._visibleItems.expand(t,e,!0,o)))try{this._fireRefresh()}finally{this.fireExpanded(t)}},o.prototype.$_collapseChild=function(t,e,o){for(var n=!1,r=0,s=t.count;r=a:v<=a;g?v--:v++){var C=this.$_getItem(v),w=C.dataRow,x=w>=0;if(x)for(m=0;m=t.length&&(o++,l=0);for(var C=o;f?C>=a:C<=a;f?C--:C++){var w=this.$_getItem(C),x=w.dataRow;if(x>=0)for(v=f?Co?0:l;f?v>=0:v<_;f?v--:v++){var b=t[v];if(b>=0&&b=0&&t0)if(o)for(var l=a;l--;){var h=this.getItem(l);h.checkable&&h._setChecked(t)}else for(l=a;l--;)this.getItem(l)._setChecked(t);var u=this.source._checkFieldIndex>-1;u&&s.beginUpdate();try{this.$_checkChildren(this.rootItem,t,o,r)}finally{u&&s.endUpdate(!1)}n?this._fireItemAllChecked(t):this._fireRefreshClient(),this._fireItemCheckChanged(null,t)}},o.prototype.getItemChecked=function(t,e){return this.source.getItemChecked(t,e)},o.prototype.setItemChecked=function(t,e){return this.source.setItemChecked(t,e)},o.prototype.getFirstRow=function(){for(var t=0,e=this._visibleItems.count;t=0;t--){var e=this._visibleItems.getItem(t);if(e instanceof i.GridRow)return e}},o.prototype.getPrevRow=function(t){if(t){t.visible||(t=t.getVisibleAncestor());for(var e=t.index-1;e>=0;e--)if((t=this._visibleItems.getItem(e))instanceof i.GridRow)return t}return this.getFirstRow()},o.prototype.getNextRow=function(t){if(t){t.visible||(t=t.getVisibleAncestor());for(var e=t.index+1,o=this._visibleItems.count;e=0&&l>=0&&(e[s]={expanded:r._expanded,children:[]},this.$_saveExpand(r,e[s].children))}}},o.prototype.$_restoreExpand=function(t,e){if(this.dataSource)for(var o=0,n=t.count;o=0&&l>=0&&e[s]&&(r._setExpanded(e[s].expanded),this.$_restoreExpand(r,e[s].children))}}},o.prototype.$_populateItems=function(t){if(this.dataSource){var e={},i=this.source.itemCount,o=this._rootItem;if(t&&i>0&&o&&this.$_saveExpand(o,e),this._clearItems(),this.source){if(this._groupFields){for(var n=this.dataSource.fieldCount,r=this._groupFields.length-1;r>=0;r--)this._groupFields[r]>=n&&this._groupFields.splice(r,1);this._grouped=this._groupFields.length>0}else this._grouped=!1;this._grouped&&i>0&&(this.$_buildGroupItems(i),t&&this.$_restoreExpand(o,e),this.$_resetVisibleItems())}}},o.prototype.$_checkChildren=function(t,e,o,n){for(var r=0,s=t.count;rthis._visibleItems.fixedCount&&this._visibleItems.expand(this.rootItem,!1,!1,0)},o.prototype.$_buildGroupItems=function(t){if(t>this.fixedCount){var e=new p(this.fixedCount,t-1);this.$_buildGroups(e,this.source,this._groupFields),this.$_buildItems(this.rootItem,e,this._groupFields),this.mergeMode&&(this._clearDisplayLevels(),this.$_resetDisplayLevels(this.rootItem))}},o.prototype.$_resetDisplayLevels=function(t){for(var e=0,o=t.count;e0){n=e.level;for(var a=o[e.level],l=0;l0){var _=this._callbackOnwer,f=this._footerCallback;if(this._footerCounter)for(var g=0,m=(l=0,this._footerCounter.getGroupFooterCount(t));l0&&(n=Math.min(this.maxBarWidth,n))),o*=n,e.x+=(e.width-o)/2,e.x=Math.floor(e.x),this._drawBars(t,this.barStyle,i,e.x,e.y,n,e.height)}},i}(e),o=[2171426,2236706,2236961,1184291,1184546,1249826,1188371,1188626,1253906,2232851,2233106,2298386,1122866,1188146,1188401,1126946,1192226,1192481,2241041,2232626,2232881,2175506,2240786,3219761,3215906,3281186,3281441,3219986,3285266,3285521,2171171,2171681,2302241,1119011,1249571,1250081,1123091,1253651,1254161,2167571,2298131,2298641,1122611,1123121,1253681,1126691,1127201,1257761,3223841,2167601,2298161,2175251,2175761,2175281,3215651,3216161,3346721,3219731,3220241,3350801,3227921,2233361,4395281,1118756,1119266,1184036,1184801,1315106,1315361,1122836,1123346,1188116,1188881,1319186,1319441,2363921,2232596,4272401,2363666,1261841,1118786,1184066,1184321,1131026,1196306,1196561,4264466,4329746,4330001,2171201,2179361,4268321,1118531,1119041,1249601,1130771,1131281,4264211,4264721,1126721,1130801,3215681,4264241,2167826,2167316,2167346,36901138],n=[103,104,105],r=[251658240,15728640,983040,61440,3840,240,15],s=function(e){function i(){var t=e.call(this)||this;return t.quietZoneWidth=10,t}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},i.prototype._parse=function(t){this._weights=[];var e=t?t.length:0;if(!(e<1)){var i=this.$_detectType(t),r=n[i],s=o[r],a=r;if(this._weights.push(s),2==i)for(var l=0;l>4*(5-d);c*=s,d%2==0&&(i?t.sbounds(e,o+"",n+"%",c+"",a+"%"):t.bounds(e,o,n,c,a)),o+=c}}for(l=this._weights[h],d=0;d<7;d++)c=(l&r[d])>>4*(6-d),c*=s,d%2==0&&(i?t.sbounds(e,o+"",n+"%",c+"",a+"%"):t.bounds(e,o,n,c,a)),o+=c},i.prototype.$_convert=function(t,e){switch(t){case 0:if(e>=0&&e<32)return e+64;if(e>=32&&e<96)return e-32;break;case 1:if(e>=32&&e<128)return e-32;break;case 2:if(e>=0&&e<=99)return e}throw new Error("Invalid code128 charactor: "+e)},i.prototype.$_detectType=function(t){return t.length%2==0&&/^\d+$/.test(t)?2:/[a-z]/.test(t)?1:0},i}(i);po.Code128=s;var a={0:"nnnwwnwnn",1:"wnnwnnnnw",2:"nnwwnnnnw",3:"wnwwnnnnn",4:"nnnwwnnnw",5:"wnnwwnnnn",6:"nnwwwnnnn",7:"nnnwnnwnw",8:"wnnwnnwnn",9:"nnwwnnwnn",A:"wnnnnwnnw",B:"nnwnnwnnw",C:"wnwnnwnnn",D:"nnnnwwnnw",E:"wnnnwwnnn",F:"nnwnwwnnn",G:"nnnnnwwnw",H:"wnnnnwwnn",I:"nnwnnwwnn",J:"nnnnwwwnn",K:"wnnnnnnww",L:"nnwnnnnww",M:"wnwnnnnwn",N:"nnnnwnnww",O:"wnnnwnnwn",P:"nnwnwnnwn",Q:"nnnnnnwww",R:"wnnnnnwwn",S:"nnwnnnwwn",T:"nnnnwnwwn",U:"wwnnnnnnw",V:"nwwnnnnnw",W:"wwwnnnnnn",X:"nwnnwnnnw",Y:"wwnnwnnnn",Z:"nwwnwnnnn","-":"nwnnnnwnw",".":"wwnnnnwnn"," ":"nwwnnnwnn",$:"nwnwnwnnn","/":"nwnwnnnwn","+":"nwnnnwnwn","%":"nnnwnwnwn","*":"nwnnwnwnn"},l=function(e){function i(){var t=e.call(this)||this;return t._wideWidth=3,t}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},i.prototype._parse=function(t){if(this._codes=[],t){var e=t.length;this._codes.push(a["*"]);for(var i=0;i2)for(var l=0;l=0){var n=t.dataSource.getFieldIndex(i);if(n>=0)return t.dataSource.getValue(o,n)}},o.prototype._makeText=function(t,e,o){var n;return e instanceof i.DataCell?n=e.getDisplayText(t,o)||e.dataColumn.placeHolder:e instanceof i.SeriesCell?n=e.getDisplayText(t,this.index.seriesColumn.valueSeparator):e instanceof i.LiteralCell&&(n=e.getDisplayText(t,o)),n||""},o.prototype._clearHeight=function(){this._dom.style.height=""},o.prototype._setHeight=function(t){this._dom.style.height=t>=0?t+"px":""},o.prototype._isEmpty=function(t){return null==t||""==t||"number"==typeof t&&isNaN(t)},o.prototype._doInitOptions=function(){},o}(l.Base);t.DataCellRenderer=f;var g,m=function(t){function o(){return t.call(this)||this}return e.__extends(o,t),o.prototype._doDispose=function(){t.prototype._doDispose.call(this)},_dp(o,"type",{get:function(){return o.TYPE}}),o.prototype._doRenderCell=function(t,e,o,n,r){if(e instanceof i.ValueCell)if(e.index.itemIndex!==t.layoutManager.topIndex){var s=t.blankGroupData()&&t.isGroupedColumn(e.index.dataColumn);switch(e.getBlankState(s)){case a.BlankState.BODY:case a.BlankState.TAIL:return this.$_setText(e.dataColumn.equalBlankText);default:this.$_setText(this._makeText(t,e,o))}}else this.$_setText(this._makeText(t,e,o))},o.prototype.$_setText=function(t){this._dom[this._textProp]=t||""},o.TYPE="text",o.Default=new o,o}(f);t.TextCellRenderer=m,function(t){t.DEFAULT="default",t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(g=t.BarOrigin||(t.BarOrigin={}));var y=function(t){function i(){var e=t.call(this)||this;return e._barStyle=i.BAR_STYLE,e._rightBarStyle=i.BAR_RIGHT_STYLE,e._topBarStyle=i.BAR_TOP_STYLE,e._bottomBarStyle=i.BAR_BOTTOM_STYLE,e._minimum=0,e._maximum=100,e._barWidth="80%",e._showLabel=!0,e._origin=g.LEFT,e._absoluteValue=!1,e._textOffset=5,e._negativeStyle=i.BAR_NEGATIVE_STYLE,e._percentShapeWidth=80,e}return e.__extends(i,t),i.prototype._doDispose=function(){t.prototype._doDispose.call(this)},i.prototype._doInitOptions=function(){this._barStyle=i.BAR_STYLE,this._rightBarStyle=i.BAR_RIGHT_STYLE,this._topBarStyle=i.BAR_TOP_STYLE,this._bottomBarStyle=i.BAR_BOTTOM_STYLE,this._negativeStyle=i.BAR_NEGATIVE_STYLE,this._origin=g.LEFT,this._baseValue=void 0,this._minimum=0,this._maximum=100},_dp(i,"barStyle",{get:function(){return this._barStyle},set:function(t){this._barStyle=t}}),_dp(i,"rightBarStyle",{get:function(){return this._rightBarStyle},set:function(t){this._rightBarStyle=t}}),_dp(i,"topBarStyle",{get:function(){return this._topBarStyle},set:function(t){this._topBarStyle=t}}),_dp(i,"bottomBarStyle",{get:function(){return this._bottomBarStyle},set:function(t){this._bottomBarStyle=t}}),_dp(i,"minimum",{get:function(){return this._minimum},set:function(t){this._minimum=t}}),_dp(i,"maximum",{get:function(){return this._maximum},set:function(t){this._maximum=t}}),_dp(i,"showLabel",{get:function(){return this._showLabel},set:function(t){this._showLabel=t}}),_dp(i,"barWidth",{get:function(){return this._barWidth},set:function(t){t!=this._barWidth&&(this._barWidth=t,"string"==typeof t&&"%"==t.charAt(t.length-1)?this._percentShapeWidth=parseFloat(t.substring(0,t.length-1)):this._percentShapeWidth=NaN)}}),_dp(i,"origin",{get:function(){return this._origin},set:function(t){this._origin=t}}),_dp(i,"absoluteValue",{get:function(){return this._absoluteValue},set:function(t){this._absoluteValue=t}}),_dp(i,"baseValue",{get:function(){return this._baseValue},set:function(t){this._baseValue=t}}),_dp(i,"textOffset",{get:function(){return this._textOffset},set:function(t){this._textOffset=t}}),_dp(i,"negativeStyle",{get:function(){return this._negativeStyle},set:function(t){this._negativeStyle=t}}),_dp(i,"type",{get:function(){return i.TYPE}}),_dp(i,"styleName",{get:function(){return i.STYLE_NAME}}),i.prototype._doInitContent=function(t){var e,i,o=(0,h.getDoc)(t);t[this._textProp]="",(e=this._div=o.createElement("div")).style.position="relative",t.appendChild(e);var n=(i=this._span=o.createElement("span")).style;n.display="inline-block",n.position="absolute",t.appendChild(i)},i.prototype._doRenderCell=function(t,e,o,n,r){var s,a=this._div,l=a.style,u=this._minimum,d=this._maximum,c=h.Utils.included(this._origin,g.LEFT,g.BOTTOM)?this._baseValue:NaN,p=Math.min(d,Math.max(u,e.value));switch(isNaN(c)&&this._absoluteValue&&(p=this._absoluteValue?Math.abs(e.value):e.value),isNaN(c)?(s=Math.min(1,(p-this._minimum)/(this._maximum-this._minimum)),this._middlePosition=NaN):(s=Math.min(1,(p-c)/(d-u)),this._middlePosition=(c-u)/(d-u)),isNaN(s)&&(s=0),this._origin){case g.RIGHT:this.$_renderBar(g.RIGHT,l,s),a.className=this.rightBarStyle||i.BAR_RIGHT_STYLE;break;case g.TOP:this.$_renderBar(g.TOP,l,s),a.className=this.topBarStyle||i.BAR_TOP_STYLE;break;case g.BOTTOM:this.$_renderBar(g.BOTTOM,l,s),a.className=!isNaN(c)&&p0?e+"px":"")},i.prototype.$_setImgHeight=function(t,e,i){((e=isNaN(e)?0:e)!=this._imgHeight||i)&&(this._imgHeight=e,t.style.height=e>0?e+"px":"")},i.prototype.$_setImgBounds=function(t,e,i,o,n,r){(e!=this._imgTop||r)&&(this._imgTop=e,t.style.top=e>0?e+"px":""),(i!=this._imgLeft||r)&&(this._imgLeft=i,t.style.left=i>0?i+"px":""),(o!=this._imgBottom||r)&&(this._imgBottom=o,t.style.bottom=o>0?o+"px":""),(n!=this._imgRight||r)&&(this._imgRight=n,t.style.right=n>0?n+"px":"")},i.prototype.$_clearImgBounds=function(t,e){(this._imgTop>0||e)&&(this._imgTop=0,t.style.top=""),(this._imgLeft>0||e)&&(this._imgLeft=0,t.style.left=""),(this._imgBottom>0||e)&&(this._imgBottom=0,t.style.bottom=""),(this._imgRight>0||e)&&(this._imgRight=0,t.style.right="")},i.prototype.$_setSpanVis=function(t){t!=this._spanVis&&(this._spanVis=t,this._span.style.display=t?"":"none",this.grid.accessibility&&(t?this._span.removeAttribute("aria-hidden"):this._span.setAttribute("aria-hidden","true")))},i.prototype.$_setSpanPadLeft=function(t){t!=this._spanPadLeft&&(this._spanPadLeft=t,this._span.style.paddingLeft=t>0?t+"px":"")},i.prototype.$_setSpanPadRight=function(t){t!=this._spanPadRight&&(this._spanPadRight=t,this._span.style.paddingRight=t>0?t+"px":"")},i.prototype.$_setSpanCenter=function(t,e){if(void 0===e&&(e=0),t!=this._spanCenter){var i=this._span.style;this._spanCenter=t,t?(i.left="50%",i.top=50+e+"%",i.transform="translate(-50%, -50%)",i.position="absolute"):(i.left="",i.top="",i.transform="",i.position="")}},i.prototype.$_setSpanText=function(t){if(t!=this._spanText){this._spanText=t;var e=this._textVisible?this._spanText:void 0;this._span[this._textProp]=e}},i.prototype.$_layoutLeft=function(t,e,i,o){this._reversed&&(t.insertBefore(e,i),this._reversed=!1),this._splitted&&(t.removeChild(this._br),this._splitted=!1),this.$_setImgFixed(e,!1,o),this.$_setImgMiddle(e,!0,o),this.$_setImgCenter(e,!1,o),this.$_clearImgBounds(e,o),this.$_setSpanVis(!0),this.$_setSpanCenter(!1),this.$_setSpanPadLeft(this._itemGap),this.$_setSpanPadRight(0)},i.prototype.$_layoutRight=function(t,e,i,o){this._reversed||(t.insertBefore(i,e),this._reversed=!0),this._splitted&&(t.removeChild(this._br),this._splitted=!1),this.$_setImgFixed(e,!1,o),this.$_setImgMiddle(e,!0,o),this.$_setImgCenter(e,!1,o),this.$_clearImgBounds(e,o),this.$_setSpanVis(!0),this.$_setSpanCenter(!1),this.$_setSpanPadLeft(0),this.$_setSpanPadRight(4)},i.prototype.$_layoutTop=function(t,e,i,o){this._reversed&&(t.insertBefore(e,i),this._reversed=!1),this._splitted||(t.insertBefore(this._br,i),this._splitted=!0),this.$_setImgFixed(e,!1,o),this.$_setImgMiddle(e,!1,o),this.$_setImgCenter(e,!1,o),this.$_clearImgBounds(e,o),this.$_setSpanVis(!0),this.$_setSpanCenter(!1),this.$_setSpanPadLeft(0),this.$_setSpanPadRight(0)},i.prototype.$_layoutBottom=function(t,e,i,o){this._reversed||(t.insertBefore(i,e),this._reversed=!0),this._splitted||(t.insertBefore(this._br,e),this._splitted=!0),this.$_setImgFixed(e,!1,o),this.$_setImgMiddle(e,!1,o),this.$_setImgCenter(e,!1,o),this.$_clearImgBounds(e,o),this.$_setSpanVis(!0),this.$_setSpanCenter(!1),this.$_setSpanPadLeft(0),this.$_setSpanPadRight(0)},i.prototype.$_layoutLeftEdge=function(t,e,i,o,n){this._reversed&&(t.insertBefore(e,i),this._reversed=!1),this._splitted&&(t.removeChild(this._br),this._splitted=!1),this.$_setImgFixed(e,!0,n),this.$_setImgMiddle(e,!0,n),this.$_setImgCenter(e,!1,n),this.$_setImgBounds(e,0,2,0,0,n),this.$_setSpanVis(!0),this.$_setSpanCenter(!1),this.$_setSpanPadLeft(0),this.$_setSpanPadRight(0),i.style.marginLeft=isNaN(o)?"":o+"px"},i.prototype.$_layoutRightEdge=function(t,e,i,o,n){this._reversed||(t.insertBefore(i,e),this._reversed=!0),this._splitted&&(t.removeChild(this._br),this._splitted=!1),this.$_setImgFixed(e,!0,n),this.$_setImgMiddle(e,!0,n),this.$_setImgCenter(e,!1,n),this.$_setImgBounds(e,0,0,0,2,n),this.$_setSpanVis(!0),this.$_setSpanCenter(!1),this.$_setSpanPadLeft(0),this.$_setSpanPadRight(o)},i.prototype.$_layoutTopEdge=function(t,e,i,o,n,r,s,a){this._reversed&&(t.insertBefore(e,i),this._reversed=!1),this._splitted||(t.insertBefore(this._br,i),this._splitted=!0),this.$_setImgFixed(e,!0,a),this.$_setImgMiddle(e,!1,a),this.$_setImgCenter(e,!1,a),this.$_setImgBounds(e,2,(o-r)/2,0,0,a),this.$_setSpanVis(!0),this.$_setSpanCenter(!0,s*((n-s)/n)),this.$_setSpanPadLeft(0),this.$_setSpanPadRight(0)},i.prototype.$_layoutBottomEdge=function(t,e,i,o,n,r,s,a){this._reversed||(t.insertBefore(i,e),this._reversed=!0),this._splitted||(t.insertBefore(this._br,e),this._splitted=!0),this.$_setImgFixed(e,!0,a),this.$_setImgMiddle(e,!1,a),this.$_setImgCenter(e,!0,a),this.$_setImgBounds(e,0,(o-r)/2,2,0,a),this.$_setSpanVis(!0),this.$_setSpanCenter(!0,(n-s)/n*-s),this.$_setSpanPadLeft(0),this.$_setSpanPadRight(0)},i.prototype.$_layoutCenter=function(t,e,i,o){this._reversed&&(t.insertBefore(e,i),this._reversed=!1),this._splitted&&(t.removeChild(this._br),this._splitted=!1),this.$_setImgFixed(e,!1,o),this.$_setImgMiddle(e,!0,o),this.$_setImgCenter(e,!0,o),this.$_clearImgBounds(e,o),this.$_setSpanVis(!1),this.$_setSpanCenter(!0),this.$_setSpanPadLeft(0),this.$_setSpanPadRight(0)},i}(f);t.FlexibleCellRenderer=w;var x=function(t){function i(){var e=t.call(this)||this;return e._iconWidth=NaN,e._iconHeight=NaN,e._iconLocation=a.IconLocation.LEFT,e._spaceKey=!1,e._enterKey=!1,e._imgSrc="",e._itemClickable=!0,e}return e.__extends(i,t),i.prototype._doDispose=function(){t.prototype._doDispose.call(this)},_dp(i,"iconMap",{get:function(){return this._iconMap},set:function(t){t!==this._iconMap&&(this._iconMap=t,this._changed())}}),_dp(i,"iconCallback",{get:function(){return this._iconCallback},set:function(t){t!==this._iconCallback&&(this._iconCallback=t,this._changed())}}),_dp(i,"titleCallback",{get:function(){return this._titleCallback},set:function(t){this._titleCallback=t,this._changed()}}),_dp(i,"iconUrl",{get:function(){return this._iconUrl},set:function(t){this._iconUrl=t,this._changed()}}),_dp(i,"iconField",{get:function(){return this._iconField},set:function(t){t!=this._iconField&&(this._iconField=t,this._changed())}}),_dp(i,"iconLocation",{get:function(){return this._iconLocation},set:function(t){t!=this._iconLocation&&(this._oldLocation=this._iconLocation,this._iconLocation=t,this._changed())}}),_dp(i,"iconWidth",{get:function(){return this._iconWidth},set:function(t){t!=this._iconWidth&&(this._iconWidth=t,this._changed())}}),_dp(i,"iconHeight",{get:function(){return this._iconHeight},set:function(t){t!=this._iconHeight&&(this._iconHeight=t,this._changed())}}),_dp(i,"spaceKey",{get:function(){return this._spaceKey},set:function(t){this._spaceKey=t}}),_dp(i,"enterKey",{get:function(){return this._enterKey},set:function(t){this._enterKey=t}}),_dp(i,"type",{get:function(){return i.TYPE}}),_dp(i,"styleName",{get:function(){return i.STYLE_NAME+" rg-icon-"+this.$_getStyleName().toLowerCase()}}),i.prototype._doInitContent=function(t){var e=(0,h.getDoc)(t),i=this._img=e.createElement("img");i.alt="",t.appendChild(i);var o=this._span=e.createElement("span");t.appendChild(o),this._br=e.createElement("br")},i.prototype._reset=function(){t.prototype._reset.call(this),this._imgSrc=this._splitted=this._reversed=void 0},i.prototype._doInitOptions=function(){this._iconMap=this._iconCallback=this._titleCallback=this._iconUrl=this._iconField=void 0,this._iconWidth=this._iconHeight=NaN,this._iconLocation=a.IconLocation.LEFT},i.prototype._doRenderCell=function(t,e,i,o,n){var r=this._img,s=this._span;if(this.$_setImgWidth(r,this._iconWidth,!1),this.$_setImgHeight(r,this._iconHeight,!1),this.$_setImgSrc(this.$_getIconUrl(t,e),this.$_getTitle(t,e)),this.$_setSpanText(this._makeText(t,e,i)),this._oldLocation!=this._iconLocation){switch(this._iconLocation){case a.IconLocation.LEFT:this.$_layoutLeft(this._dom,r,s,!1);break;case a.IconLocation.RIGHT:this.$_layoutRight(this._dom,r,s,!1);break;case a.IconLocation.TOP:this.$_layoutTop(this._dom,r,s,!1);break;case a.IconLocation.BOTTOM:this.$_layoutBottom(this._dom,r,s,!1);break;case a.IconLocation.LEFT_EDGE:this.$_layoutLeftEdge(this._dom,r,s,this._iconWidth,!1);break;case a.IconLocation.RIGHT_EDGE:this.$_layoutRightEdge(this._dom,r,s,this._iconWidth,!1);break;case a.IconLocation.TOP_EDGE:this.$_layoutTopEdge(this._dom,r,s,o,n,this._iconWidth,this._iconHeight,!1);break;case a.IconLocation.BOTTOM_EDGE:this.$_layoutBottomEdge(this._dom,r,s,o,n,this._iconWidth,this._iconHeight,!1);break;case a.IconLocation.CENTER:this.$_layoutCenter(this._dom,r,s,!1);break;default:this.$_layoutLeft(this._dom,r,s,!1)}this._oldLocation=this._iconLocation}this._iconLocation==a.IconLocation.TOP_EDGE||this._iconLocation==a.IconLocation.BOTTOM_EDGE?this._setHeight(n):this._clearHeight()},i.prototype.canClick=function(t){return t.target===this._img},i.prototype.canClickSpaceKey=function(t){return(this.spaceKey&&32==t.keyCode||this.enterKey&&13===t.keyCode)&&!h.Utils.specialKey(t)},i.prototype._doClick=function(t,e,i){var o={};if(e.target===this._img||"keydown"===e.type)return o.type=this.type,o.value=t.value,o},i.prototype._doItemClick=function(){this._img.click()},i.prototype.$_getIconUrl=function(t,e){var i=void 0,o=this._iconCallback;return o&&(i=o.call(this,t.handler,e)),void 0===i&&this._iconMap&&(i=this._iconMap[e.value]),void 0===i&&this._iconField&&(i=this._getValue(t,e,this._iconField)),void 0===i&&(i=this._iconUrl),i||""},i.prototype.$_getTitle=function(t,e){var i,o=this._titleCallback;return o&&(i=o.call(this,t.handler,e)),i||""},i.prototype.$_setImgSrc=function(t,e){t==this._imgSrc&&e===this._img.alt||(this._imgSrc=t,t?(this._img.src=t,this._img.alt=e):(this._img.removeAttribute("src"),this._img.alt=""))},i.prototype.$_getStyleName=function(){return String(this._iconLocation)||String(a.IconLocation.LEFT)},i.prototype.preventDefaultClick=function(t){t.target===this._img&&(t.preventDefault(),t.stopImmediatePropagation())},i.TYPE="icon",i.STYLE="rg-icon-renderer",i.STYLE_NAME="rg-renderer "+i.STYLE,i}(w);t.IconCellRenderer=x;var b=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(i,t),i.prototype._doInitContent=function(e){t.prototype._doInitContent.call(this,e),e.style.setProperty("display","flex","important")},i.prototype._doClearContent=function(e){t.prototype._doClearContent.call(this,e),u.RenderHelper.clearFlex(e)},i.prototype.$_layoutLeft=function(t,e,i){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.LEFT)},i.prototype.$_layoutRight=function(t,e,i){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.RIGHT)},i.prototype.$_layoutTop=function(t,e,i){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.TOP)},i.prototype.$_layoutBottom=function(t,e,i){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.BOTTOM)},i.prototype.$_layoutLeftEdge=function(t,e,i){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.LEFT_EDGE)},i.prototype.$_layoutRightEdge=function(t,e,i){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.RIGHT_EDGE)},i.prototype.$_layoutTopEdge=function(t,e,i){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.TOP_EDGE)},i.prototype.$_layoutBottomEdge=function(t,e,i){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.BOTTOM_EDGE)},i.prototype.$_layoutCenter=function(t,e,i){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.CENTER)},i}(x);t.FlexIconCellRenderer=b;var I=function(t){function i(){var e=t.call(this,16,16)||this;return e._strictValue=!1,e._threeStates=!1,e._checkLocation=a.IconLocation.CENTER,e._useImages=!1,e._checkedStyle=i.CHECKED_STYLE,e._uncheckedStyle=i.UNCHECKED_STYLE,e._intermediateStyle=i.INTERMEDIATE_STYLE,e._editable=!0,e._spaceKey=!0,e._enterKey=!1,e._showInnerFocus=!1,e._oldUsed=!1,e._useChanged=!1,e._values={},e.refreshFocusChanged=!0,e}return e.__extends(i,t),i.prototype._doDispose=function(){t.prototype._doDispose.call(this)},_dp(i,"getCheckedCallback",{get:function(){return this._getCheckedCallback},set:function(t){t!==this._getCheckedCallback&&(this._getCheckedCallback=t,this._changed())}}),_dp(i,"setCheckedCallback",{get:function(){return this._setCheckedCallback},set:function(t){t!==this._setCheckedCallback&&(this._setCheckedCallback=t,this._changed())}}),_dp(i,"trueValues",{get:function(){return this._trueValues},set:function(t){t!==this._trueValues&&(this._trueValues=t,this.$_resetValues(),this._changed())}}),_dp(i,"falseValues",{get:function(){return this._falseValues},set:function(t){t!==this._falseValues&&(this._falseValues=t,this.$_resetValues(),this._changed())}}),_dp(i,"strictValue",{get:function(){return this._strictValue},set:function(t){t!=this._strictValue&&(this._strictValue=t,this._changed())}}),_dp(i,"threeStates",{get:function(){return this._threeStates},set:function(t){t!=this._threeStates&&(this._threeStates=t,this._changed())}}),_dp(i,"spaceKey",{get:function(){return this._spaceKey},set:function(t){this._spaceKey=t}}),_dp(i,"enterKey",{get:function(){return this._enterKey},set:function(t){this._enterKey=t}}),_dp(i,"checkLocation",{get:function(){return this._checkLocation},set:function(t){t!=this._checkLocation&&(this._checkLocation=t,this._changed())}}),_dp(i,"useImages",{get:function(){return this._useImages},set:function(t){t!=this._useImages&&(this._useImages=t,this._changed())}}),_dp(i,"editable",{get:function(){return this._editable},set:function(t){this._editable=t}}),_dp(i,"showInnerFocus",{get:function(){return this._showInnerFocus},set:function(t){this._showInnerFocus=t}}),_dp(i,"clickOnlyFocusedCell",{get:function(){return!this.grid.editOptions.commitByCell||this._clickOnlyFocusedCell},set:function(t){this._clickOnlyFocusedCell=t}}),_dp(i,"readOnlySetDisabled",{get:function(){return this._readOnlySetDisabled},set:function(t){t!=this._readOnlySetDisabled&&(this._readOnlySetDisabled=t,this._changed())}}),_dp(i,"type",{get:function(){return i.TYPE}}),_dp(i,"styleName",{get:function(){return i.STYLE_NAME}}),i.prototype.canEdit=function(){var t=this.grid.editOptions;if(t.columnEditableFirst){if(!(null!=this.editable?this.editable:t.editable))return!1}else if(!t.editable||!this.editable)return!1;return this._editable},i.prototype.canShowInnerFocus=function(){return this._showInnerFocus&&this._editable},i.prototype._doInitContent=function(t){var e=(0,h.getDoc)(t),i=this._check=e.createElement("input");i.type="checkbox",i.tabIndex=-1,i.style.display="inline-block";var o=this._span=e.createElement("label");t.appendChild(i),t.appendChild(o);var n=this._image=e.createElement("span");n.className=this._checkedStyle,n.role="checkbox",n.ariaChecked="false",n.tabIndex=-1,n.style.display="inline-block",this._br=e.createElement("br")},i.prototype._reset=function(){t.prototype._reset.call(this),this._splitted=this._reversed=void 0,this._oldUsed=!1},i.prototype._doRenderCell=function(t,e,o,n,r){var s=this._check,l=this._image,u=this._span,d=this._dom,c=s;this._imgWidth=t.container.measureCheckWidth(),this._imgHeight=t.container.measureCheckHeight();var p=this.$_getChecked(t,e.value,e.index,this._getCheckedCallback),_=s.id="".concat(i.FOR_ID,"-").concat(e.dataColumn.$_hash,"-").concat(e.item.index);if(u.setAttribute("for",_),s.checked=p,s.indeterminate=this._threeStates&&void 0===p,s.disabled=this._readOnlySetDisabled&&!this.canEdit(),this._useChanged=this._useImages!==this._oldUsed,this._useChanged&&(this._oldUsed?(d.removeChild(l),this._check.style.display="inline-block"):(d.insertBefore(l,this._check),this._check.style.display="none")),this._oldUsed=this._useImages,this._useImages&&(p?(l.className=this._checkedStyle,l.ariaChecked="true"):void 0===p&&this.threeStates?(l.className=this._intermediateStyle,l.ariaChecked="mixed"):(l.className=this._uncheckedStyle,l.ariaChecked="false"),this._readOnlySetDisabled&&!this.canEdit()?(l.className+=" disabled",l.ariaDisabled="true"):l.removeAttribute("aria-disabled"),c=l),o.merged&&this.canEdit()&&!h.Utils.included(this.checkLocation,a.IconLocation.TOP_EDGE,a.IconLocation.BOTTOM_EDGE)&&o.focused||d.style.removeProperty("top"),this.$_setSpanText(this._makeText(t,e,o)),this._oldLocation!=this._checkLocation){switch(this._checkLocation){case a.IconLocation.LEFT:this.$_layoutLeft(d,c,u);break;case a.IconLocation.RIGHT:this.$_layoutRight(d,c,u);break;case a.IconLocation.TOP:this.$_layoutTop(d,c,u);break;case a.IconLocation.BOTTOM:this.$_layoutBottom(d,c,u);break;case a.IconLocation.LEFT_EDGE:this.$_layoutLeftEdge(d,c,u);break;case a.IconLocation.RIGHT_EDGE:this.$_layoutRightEdge(d,c,u);break;case a.IconLocation.TOP_EDGE:this.$_layoutTopEdge(d,c,u,n,r);break;case a.IconLocation.BOTTOM_EDGE:this.$_layoutBottomEdge(d,c,u,n,r);break;case a.IconLocation.CENTER:this.$_layoutCenter(d,c,u);break;default:this.$_layoutLeft(d,c,u)}this._oldLocation=this._checkLocation}this._checkLocation==a.IconLocation.TOP_EDGE||this._checkLocation==a.IconLocation.BOTTOM_EDGE?this._setHeight(r):this._clearHeight()},i.prototype.canEditClickAt=function(t){return this.preventDefaultEditClick(t),t.target===this._check||t.target===this._image},i.prototype.preventDefaultEditClick=function(t){t.target===this._check&&t.preventDefault()},i.prototype._doEditClick=function(t,e,i){if(e.target===this._check||e.target===this._image)return this.$_edit(t,i),!0},i.prototype.canEditKey=function(t){return(this.spaceKey&&32==t.keyCode||this.enterKey&&13==t.keyCode)&&!h.Utils.specialKey(t)},i.prototype._doEditKey=function(t,e,i){return this.$_edit(t,i),!0},i.prototype._doItemClick=function(){this._check.click()},i.prototype.moveClickElement=function(t,e){var i=this._dom;e||!this.canEdit()||h.Utils.included(a.IconLocation.TOP_EDGE,a.IconLocation.BOTTOM_EDGE)||(i.style.top=t+"px")},i.prototype.$_resetValues=function(){var t;if(this._values={},this._falseValues)if(t=this._falseValues.split(",")){var e=void 0;this._falseValue=(e=t.length)>0?t[0]:void 0;for(var i=0;i0?t[0]:void 0;for(i=0;i0?r.gap=this._gap+"px":r.removeProperty("gap"),this._wrap?r.flexWrap="wrap":r.removeProperty("flex-wrap");this._views&&this._views.length>0;){var s=this._views.pop();s&&this.$_removeView(s)}e.appendChild(n)},i.prototype._doInitOptions=function(){},i.prototype._doRenderCell=function(t,e,o,n,r){var s=this._container;o.merged&&this.canEdit()&&o.focused||s.style.removeProperty("top");var a=this.$_setItems(t,e.item);for(this._views||(this._views=[]);this._views.lengtha;){(f=this._views.pop())&&this.$_removeView(f)}for(var l=e.value,u=this._multiSelect&&l?l.split(this.valueSeparator):[],d=this._items,c=d.map((function(t){return t.value})),p=d.map((function(t){return t.label})),_=0;_=0)?h.Utils.addClassName(f.image,"checked"):h.Utils.addClassName(f.image,"unchecked")):(h.Utils.addClassName(f.image,"radio"),(f.radio.checked=c[_]===l)?h.Utils.addClassName(f.image,"checked"):h.Utils.addClassName(f.image,"unchecked")),m?(h.Utils.addClassName(f.div,"disabled"),h.Utils.addClassName(f.image,"disabled")):(h.Utils.removeClassName(f.div,"disabled"),h.Utils.removeClassName(f.image,"disabled"))}},_dp(i,"type",{get:function(){return i.TYPE}}),_dp(i,"styleName",{get:function(){return i.STYLE_NAME}}),i.prototype._doClearContent=function(e){u.RenderHelper.clearFlex(e),t.prototype._doClearContent.call(this,e)},i.prototype.canEdit=function(){var t=this.grid.editOptions,e=t.columnEditableFirst,i=this.editable;if(e){if(!(null!=i?i:t.editable))return!1}else if(!t.editable||!i)return!1;return i},i.prototype.canEditClickAt=function(t){return this.preventDefaultEditClick(t),this.$_canClick(t.target)},i.prototype.canEditKey=function(t){var e,i=this._keyToValueCallback,o=this._items.map((function(t){return t.value}));if(this._keyValue=null,i)this._keyValue=e=this._keyToValueCallback.call(this.grid.handler,this.grid.handler,this.index.itemIndex,this.index.dataColumn,t,o);else if(this._useCtrlNumber&&h.Utils.ctrlKey(t)&&!t.shiftKey&&!t.altKey&&/[0-9]/.test(t.key)){t.preventDefault();var n=parseInt(t.key);this._items&&this._items.length>0&&this._items.length>=n&&(this._keyValue=e=this._items[n-1].value)}return!!e},i.prototype._doItemClick=function(t){if(this._keyValue)for(var e=0;e0)i=this._values,o=this._labels;else if(n.dataColumn&&n.item&&(r>=0||(0,c.ItemState_isEditing)(e.itemState))){var s=n.dataColumn;if(s.lookupSource){for(var a=s.lookupKeyFieldIds,l=[],h=0;h0&&(i=u.keys,o=u.values)}else s.values&&s.values.length>0&&(i=s.values,o=s.labels)}return this._items=i.map((function(t,e){return{value:t,label:o&&o[e]||i[e]}})),this._items?this._items.length:0},i.prototype.$_setProps=function(t){var e=t.div,i=t.image,o=t.radio;t.label;var n=e.style,r=this._itemDirection===a.LayoutDirection.VERTICAL?"column":"row";n.flexDirection=r+"".concat(this._itemReverse?"-reverse":""),this._itemGap>0?n.gap=this._itemGap+"px":n.removeProperty("gap"),o.type=this._multiSelect?"checkbox":"radio",(n=o.style).display=this._useImages?"none":"",(n=i.style).display=this._useImages?"":"none"},i.prototype.$_addView=function(t){var e=(0,h.getDoc)(t),o=e.createElement("div");o.className=i.ITEM_STYLE,o.style;var n=e.createElement("input");n.tabIndex=-1;var r=e.createElement("span"),s=e.createElement("label");return s.style,o.appendChild(n),o.appendChild(r),o.appendChild(s),t.appendChild(o),{div:o,radio:n,image:r,label:s}},i.prototype.$_removeView=function(t){var e=t.div;e.removeChild(t.radio),e.removeChild(t.image),e.removeChild(t.label),h.Utils.detach(e)},i.prototype.$_canClick=function(t){for(var e=0;this._views&&e=0)r.splice(r.indexOf(o),1),a=r;else for(l=0;l=0?a.push(s[l]):s[l]===o&&a.push(o);o=a.join(this.valueSeparator)}e.value=o},i.TYPE="multicheck",i.STYLE="rg-multicheck-renderer",i.ITEM_STYLE="rg-multicheck-renderer-item",i.IMAGE_STYLE="rg-multicheck-image",i.CONTAINER_STYLE="rg-multicheck-container",i.FOR_ID="$$-radio-cell-renderer",i.STYLE_NAME="rg-renderer "+i.STYLE,i}(f);t.MultiCheckCellRenderer=R;var T=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(i,t),i.prototype._doInitContent=function(e){t.prototype._doInitContent.call(this,e),e.style.setProperty("display","flex","important")},i.prototype._doClearContent=function(e){t.prototype._doClearContent.call(this,e),u.RenderHelper.clearFlex(e)},i.prototype.$_layoutLeft=function(t,e,i){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.LEFT)},i.prototype.$_layoutRight=function(t,e,i){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.RIGHT)},i.prototype.$_layoutTop=function(t,e,i){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.TOP)},i.prototype.$_layoutBottom=function(t,e,i){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.BOTTOM)},i.prototype.$_layoutLeftEdge=function(t,e,i){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.LEFT_EDGE)},i.prototype.$_layoutRightEdge=function(t,e,i){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.RIGHT_EDGE)},i.prototype.$_layoutTopEdge=function(t,e,i,o,n){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.TOP_EDGE)},i.prototype.$_layoutBottomEdge=function(t,e,i,o,n){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.BOTTOM_EDGE)},i.prototype.$_layoutCenter=function(t,e,i){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.CENTER)},i}(I);t.FlexCheckCellRenderer=T;var D=function(t){function i(){var e=t.call(this)||this;return e._buttonStyle=i.BUTTON_STYLE,e._hideWhenEmpty=!0,e._spaceKey=!0,e._enterKey=!1,e._itemClickable=!0,e}return e.__extends(i,t),i.prototype._doDispose=function(){t.prototype._doDispose.call(this)},_dp(i,"buttonStyle",{get:function(){return this._buttonStyle},set:function(t){t!=this._buttonStyle&&(this._buttonStyle=t,this._changed())}}),_dp(i,"hideWhenEmpty",{get:function(){return this._hideWhenEmpty},set:function(t){t!=this._hideWhenEmpty&&(this._hideWhenEmpty=t,this._changed())}}),_dp(i,"spaceKey",{get:function(){return this._spaceKey},set:function(t){this._spaceKey=t}}),_dp(i,"enterKey",{get:function(){return this._enterKey},set:function(t){this._enterKey=t}}),_dp(i,"type",{get:function(){return i.TYPE}}),_dp(i,"styleName",{get:function(){return i.STYLE_NAME}}),i.prototype._doInitContent=function(t){var e=this._button=(0,h.getDoc)(t).createElement("button");e.type="button",e.tabIndex=-1,e.style.display="inline-block",t.appendChild(e)},i.prototype._doRenderCell=function(t,e,i,o,n){var r=this._button,s=r[this._textProp]=this._makeText(t,e,i);r.setAttribute("class",this._buttonStyle),r.style.visibility=this._hideWhenEmpty&&this._isEmpty(s)?"hidden":""},i.prototype.canClick=function(t){return t.target===this._button},i.prototype.canClickSpaceKey=function(t){return(this.spaceKey&&32==t.keyCode||this.enterKey&&13===t.keyCode)&&!h.Utils.specialKey(t)},i.prototype._doClick=function(t,e,i){if(e.target===this._button||"keydown"===e.type)return{type:this.type,value:t.value}},i.prototype._doItemClick=function(){this._button.click()},i.TYPE="button",i.STYLE="rg-button-renderer",i.STYLE_NAME="rg-renderer "+i.STYLE,i.BUTTON_STYLE="rg-button-renderer-button",i}(f);t.ButtonCellRenderer=D;var k=function(t){function i(){var e=t.call(this)||this;return e._spaceKey=!0,e._enterKey=!1,e._hideWhenEmpty=!0,e._itemClickable=!0,e}return e.__extends(i,t),i.prototype._doDispose=function(){t.prototype._doDispose.call(this)},_dp(i,"baseUrl",{get:function(){return this._baseUrl},set:function(t){t!=this._baseUrl&&(this._baseUrl=t,this._changed())}}),_dp(i,"linkField",{get:function(){return this._linkField},set:function(t){t!=this._linkField&&(this._linkField=t,this._changed())}}),_dp(i,"urlCallback",{get:function(){return this._urlCallback},set:function(t){t!==this._urlCallback&&(this._urlCallback=t,this._changed())}}),_dp(i,"titleField",{get:function(){return this._titleField},set:function(t){t!=this._titleField&&(this._titleField=t,this._changed())}}),_dp(i,"titleCallback",{get:function(){return this._titleCallback},set:function(t){t!==this._titleCallback&&(this._titleCallback=t,this._changed())}}),_dp(i,"spaceKey",{get:function(){return this._spaceKey},set:function(t){this._spaceKey=t}}),_dp(i,"enterKey",{get:function(){return this._enterKey},set:function(t){this._enterKey=t}}),_dp(i,"classCallback",{get:function(){return this._classCallback},set:function(t){this._classCallback=t}}),_dp(i,"target",{get:function(){return this._target},set:function(t){this._target=t}}),_dp(i,"hideWhenEmpty",{get:function(){return this._hideWhenEmpty},set:function(t){this._hideWhenEmpty=!0}}),_dp(i,"type",{get:function(){return i.TYPE}}),_dp(i,"styleName",{get:function(){return i.STYLE_NAME}}),i.prototype._doInitContent=function(t){var e=this._anchor=(0,h.getDoc)(t).createElement("a");e.tabIndex=-1,t.appendChild(e)},i.prototype._doInitOptions=function(){this._baseUrl=this._linkField=this._urlCallback=this._titleField=this._titleCallback=this._url=this._classCallback=void 0},i.prototype._doRenderCell=function(t,e,i,o,n){var r=this._anchor,s=this._makeText(t,e,i);r[this._textProp]=s,this._url="","#"===this._baseUrl?(r.removeAttribute("target"),r.href="#"):(this._url=this.$_getUrl(t,e),this._url&&(r.target=null==this.target?"_blank":this.target,r.href=this._url));var a=this.$_getTitle(t,e);a?r.title=a:delete r.title;var l=this.$_getStyle(t,e);l?r.className=l:r.removeAttribute("class"),this.hideWhenEmpty&&!s?h.Utils.detach(r):h.Utils.addChild(this._dom,r)},i.prototype.preventDefaultClick=function(t){t.target===this._anchor&&(t.preventDefault(),t.stopImmediatePropagation())},i.prototype.canClick=function(t){return t.target===this._anchor},i.prototype._doClick=function(t,e,i){if(e.target===this._anchor||"keydown"===e.type)return{type:this.type,url:this._url,value:t.value}},i.prototype.canClickSpaceKey=function(t){return(this.spaceKey&&32==t.keyCode||this.enterKey&&13===t.keyCode)&&!h.Utils.specialKey(t)},i.prototype._doItemClick=function(){this._anchor.click()},i.prototype.$_getUrl=function(t,e){var i="",o=this._urlCallback;return o&&(i=o.call(this,t.handler,e)),i||(i=this._linkField?this._getValue(t,e,this._linkField):e.value,this._baseUrl&&(i=this._baseUrl+i)),i||""},i.prototype.$_getTitle=function(t,e){var i="",o=this._titleCallback;return o&&(i=o.call(this,t.handler,e)),!i&&this._titleField&&(i=this._getValue(t,e,this._titleField)),i||""},i.prototype.$_getStyle=function(t,e){var i="",o=this._classCallback;return o&&(i=o.call(this,t.handler,e)),i||""},i.TYPE="link",i.STYLE="rg-link-renderer",i.STYLE_NAME="rg-renderer "+i.STYLE,i}(f);t.LinkCellRenderer=k;var M=function(t){function i(){var e=t.call(this)||this;return e._shapeStyle=i.SHAPE_STYLE,e._shape=s.PolygonShape.STAR,e._shapeWidth=16,e._shapeHeight=16,e._shapeLocation=a.IconLocation.LEFT,e}return e.__extends(i,t),i.prototype._doDispose=function(){t.prototype._doDispose.call(this)},_dp(i,"shapeStyle",{get:function(){return this._shapeStyle},set:function(t){t!=this._shapeStyle&&(this._shapeStyle=t,this._changed())}}),_dp(i,"shape",{get:function(){return this._shape},set:function(t){t!=this._shape&&(this._shape=t,this._changed())}}),_dp(i,"shapeMap",{get:function(){return this._shapeMap},set:function(t){t!==this._shapeMap&&(this._shapeMap=t,this._changed())}}),_dp(i,"shapeCallback",{get:function(){return this._shapeCallback},set:function(t){t!=this._shapeCallback&&(this._shapeCallback=t,this._changed())}}),_dp(i,"shapeWidth",{get:function(){return this._shapeWidth},set:function(t){this._shapeWidth!==t&&(this._shapeWidth=t,this._changed())}}),_dp(i,"shapeHeight",{get:function(){return this._shapeHeight},set:function(t){this._shapeHeight!==t&&(this._shapeHeight=t,this._changed())}}),_dp(i,"shapeLocation",{get:function(){return this._shapeLocation},set:function(t){t!=this._shapeLocation&&(this._oldLocation=this._shapeLocation,this._shapeLocation=t,this._changed())}}),_dp(i,"type",{get:function(){return i.TYPE}}),_dp(i,"styleName",{get:function(){return i.STYLE_NAME}}),i.prototype._doInitContent=function(t){var e=(0,h.getDoc)(t),i=(this._svg=n.SvgElement.createSVG(t)).style,o=isNaN(this._shapeWidth)||this._shapeWidth<=0?16:this._shapeWidth,r=isNaN(this._shapeHeight)||this._shapeHeight<=0?16:this._shapeHeight;i.display="inline-block",i.width=o+"px",i.height=r+"px";var s=this._span=e.createElement("span");t.appendChild(s),this._br=e.createElement("br")},i.prototype._reset=function(){t.prototype._reset.call(this),this._splitted=this._reversed=void 0},i.prototype._doRenderCell=function(t,e,i,o,r){var s=this._svg,l=this._span;if(this._runShape=this.$_getShape(t,e),s.setAttribute("class",this._shapeStyle),n.SvgElement.renderSVG(t,s,this.$_render.bind(this)),this.$_setSpanText(this._makeText(t,e,i)),this._oldLocation!=this._shapeLocation){switch(this._shapeLocation){case a.IconLocation.LEFT:this.$_layoutLeft(this._dom,s,l,!1);break;case a.IconLocation.RIGHT:this.$_layoutRight(this._dom,s,l,!1);break;case a.IconLocation.TOP:this.$_layoutTop(this._dom,s,l,!1);break;case a.IconLocation.BOTTOM:this.$_layoutBottom(this._dom,s,l,!1);break;case a.IconLocation.LEFT_EDGE:this.$_layoutLeftEdge(this._dom,s,l,this._shapeWidth,!1);break;case a.IconLocation.RIGHT_EDGE:this.$_layoutRightEdge(this._dom,s,l,this._shapeWidth,!1);break;case a.IconLocation.TOP_EDGE:this.$_layoutTopEdge(this._dom,s,l,o,r,this._shapeWidth,this._shapeHeight,!1);break;case a.IconLocation.BOTTOM_EDGE:this.$_layoutBottomEdge(this._dom,s,l,o,r,this._shapeWidth,this._shapeHeight,!1);break;case a.IconLocation.CENTER:this.$_layoutCenter(this._dom,s,l,!1);break;default:this.$_layoutLeft(this._dom,s,l,!1)}this._oldLocation=this._shapeLocation}this._shapeLocation==a.IconLocation.TOP_EDGE||this._shapeLocation==a.IconLocation.BOTTOM_EDGE?this._setHeight(r):this._clearHeight()},i.prototype.$_getShape=function(t,e){var i=void 0,o=this._shapeCallback;return o&&(i=o.call(this,t.handler,e)),null==i&&this._shapeMap&&(i=this._shapeMap[e.value]),null==i&&(i=this._shape),i},i.prototype.$_getDrawing=function(t){var e;return t&&("ellipse"==(t=t.toLowerCase())?e=this._ellipse?this._ellipse:this._ellipse=new s.EllipseShape:(e=this._polygon?this._polygon:this._polygon=new s.PolygonShape(t),this._polygon.shape=t)),e},i.prototype.$_render=function(t,e,i,o){if(this._runShape){var n=this.$_getDrawing(this._runShape);n&&n.draw(e,i,o)}},i.TYPE="shape",i.STYLE="rg-shape-renderer",i.STYLE_NAME="rg-renderer "+i.STYLE,i.SHAPE_STYLE="rg-shape-renderer-shape",i}(w);t.ShapeCellRenderer=M;var O=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(i,t),i.prototype._doInitContent=function(e){e.style.setProperty("display","flex","important"),t.prototype._doInitContent.call(this,e)},i.prototype._doClearContent=function(e){t.prototype._doClearContent.call(this,e),u.RenderHelper.clearFlex(e)},i.prototype.$_layoutLeft=function(t,e,i){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.LEFT)},i.prototype.$_layoutRight=function(t,e,i){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.RIGHT)},i.prototype.$_layoutTop=function(t,e,i){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.TOP)},i.prototype.$_layoutBottom=function(t,e,i){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.BOTTOM)},i.prototype.$_layoutLeftEdge=function(t,e,i){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.LEFT_EDGE)},i.prototype.$_layoutRightEdge=function(t,e,i){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.RIGHT_EDGE)},i.prototype.$_layoutTopEdge=function(t,e,i,o,n){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.TOP_EDGE)},i.prototype.$_layoutBottomEdge=function(t,e,i,o,n){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.BOTTOM_EDGE)},i.prototype.$_layoutCenter=function(t,e,i){u.RenderHelper.layoutFlex(t,e,i,this._itemGap,this._verticalEdgePad,a.IconLocation.CENTER)},i}(M);t.FlexShapeCellRenderer=O;var F=function(t){function i(){var e=t.call(this)||this;return e._barStyle=i.BAR_STYLE,e._inactiveStyle=i.INACTIVE_STYLE,e._barCount=10,e._minimum=NaN,e._maximum=NaN,e._startRate=50,e._endRate=100,e._absoluteValue=!1,e}return e.__extends(i,t),i.prototype._doDispose=function(){t.prototype._doDispose.call(this)},i.prototype._doInitOptions=function(){this._barStyle=i.BAR_STYLE,this._inactiveStyle=i.INACTIVE_STYLE,this._barCount=10,this._minimum=NaN,this._maximum=NaN,this._startRate=50,this._endRate=100,this._absoluteValue=!1},_dp(i,"barStyle",{get:function(){return this._barStyle},set:function(t){t!=this._barStyle&&(this._barStyle=t,this._changed())}}),_dp(i,"inactiveStyle",{get:function(){return this._inactiveStyle},set:function(t){t!=this._inactiveStyle&&(this._inactiveStyle=t,this._changed())}}),_dp(i,"barCount",{get:function(){return this._barCount},set:function(t){(t=Math.max(2,t))!=this._barCount&&(this._barCount=t,this._changed())}}),_dp(i,"minimum",{get:function(){return this._minimum},set:function(t){t!=this._minimum&&(this._minimum=t,this._changed())}}),_dp(i,"maximum",{get:function(){return this._maximum},set:function(t){t!=this._maximum&&(this._maximum=t,this._changed())}}),_dp(i,"startRate",{get:function(){return this._startRate},set:function(t){!isNaN(t)&&t>=0&&t<=100&&t!==this._startRate&&(this._startRate=t,this._changed())}}),_dp(i,"endRate",{get:function(){return this._endRate},set:function(t){!isNaN(t)&&t>=0&&t<=100&&t!==this._endRate&&(this._endRate=t,this._changed())}}),_dp(i,"absoluteValue",{get:function(){return this._absoluteValue},set:function(t){t!=this._absoluteValue&&(this._absoluteValue=t,this._changed())}}),_dp(i,"type",{get:function(){return i.TYPE}}),_dp(i,"styleName",{get:function(){return i.STYLE_NAME}}),i.prototype._doInitContent=function(t){var e=this._div=(0,h.getDoc)(t).createElement("div");e.style.position="relative",e.style.height="100%",t.appendChild(e);var i=(this._svg=n.SvgElement.createSVG(e)).style;i.position="absolute",i.left="0px",i.width="100%",i.top=(100-Math.max(this._startRate,this._endRate))/2+"%",i.height=Math.max(this._startRate,this._endRate)+"%"},i.prototype._doRenderCell=function(t,e,i,o,r){var s=this._svg;this._value=parseFloat(e.value),s.setAttribute("class",this._barStyle),n.SvgElement.renderSVG2(t,s,this.$_render.bind(this))},i.prototype.$_render=function(t,e){var i=this.absoluteValue?Math.abs(this._value):this._value;isNaN(this._minimum)||isNaN(this._maximum)||(i=this._barCount*(i-this._minimum)/(this._maximum-this._minimum));for(var o=100/Math.max(this._startRate,this._endRate),n=(100-2*(this._barCount+1))/this._barCount,r=0,s=this._startRate*o,a=(this._endRate-this._startRate)/(this._barCount-1),l=0;ls&&(e.push(t.substring(s,l)),s=l);var h=a.substring(2,a.length-1),u={type:"value"===h?1:"text"===h?4:0==h.indexOf("value:")?2:"itemindex"===h?5:3,field:h};2==u.type&&(u.field=u.field.substring(6)),e.push(u),s+=a.length}s=0||this._dom===i)},i.prototype.click=function(t,e,i){return this._doClick(t,e,i||e.target)},i.prototype._doRenderCell=function(t,e,i,o,n){var r=this._callback;r?this.$_setHtml(r.call(this,t.handler,e,o,n),this._templateEvents):this.$_setHtml(this._parser.realize(t,e,i,this._valueCallback),this._templateEvents)},i.prototype._doClick=function(t,e,i){return{type:this.type,target:e.target,value:t.value}},i.prototype.$_setHtml=function(t,e){if(t!=this._html){var i=this._dom;this._html=t,i.innerHTML=t,e&&(0,n.attachTemplateEvent)(i,e)}},i.TYPE="html",i}(e.DataCellRenderer);return ro.TemplateCellRenderer=a,ro}var Lo,Po,Bo,Vo={},Ao={},No={},$o={},Uo={};function Ho(){if(Po)return $o;Po=1,Object.defineProperty($o,"__esModule",{value:!0}),$o.DefaultItemProvider=$o.CheckableExpressionRuntime=void 0;var t=d,e=Wi(),i=Gi(),o=Qi(),n=C(),r=Hi(),s=Y(),a=ho(),l=Et(),h=D(),u=Ro(),c=function(){if(Lo)return Uo;Lo=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.CellStyleMapTag=void 0;var t=d,e=function(e){function i(t){var i=e.call(this)||this;return i._styleMap={},i._owner=t,i}return t.__extends(i,e),i.prototype._doDispose=function(){this._styleMap=null,e.prototype._doDispose.call(this)},i.prototype.addCellStyle=function(t,e,i){return(this._styleMap[t]||(this._styleMap[t]={}))[e]=i,!0},i.prototype.getCellStyle=function(t,e){var i=this._styleMap[t];return i&&i[e]},i.prototype.removeCellStyle=function(t,e){if(null==t)this._styleMap={};else{var i=this._styleMap[t];i&&(e?delete i[e]:delete this._styleMap[t])}return!0},i.prototype.connect=function(t){this._styleMap={}},i.prototype.disconnect=function(){this._styleMap={}},i.prototype.clearRows=function(){this._styleMap={}},i.prototype.setRows=function(){this._styleMap={}},i.prototype.removeRow=function(t){var e=this._owner.getItemOfRow(t,!0);e&&delete this._styleMap[e.dataRowId]},i.prototype.removeRows=function(t){var e=this;t.forEach((function(t){var i=e._owner.getItemOfRow(t,!0);i&&delete e._styleMap[i.dataRowId]}))},i}(Et().DataTag);return Uo.CellStyleMapTag=e,Uo}(),p=Ct(),_=function(e){function i(){return e.call(this)||this}return t.__extends(i,e),i}(a.DataRowExpressionRuntime);$o.CheckableExpressionRuntime=_;var f=function(e){function o(t,i,o){var n=e.call(this)||this;return n._runtime=new _,n._owner=t,n._exprNode=s.ExpressionParser.Default.parse(i,["value","values"]),n._runtime=new _,n._callback=o,n}return t.__extends(o,e),o.clearCheckables=function(t){for(var e=t.itemCount;e--;)t.getItem(e)._setCheckable(!0)},o.prototype.connect=function(t){this._runtime.setDataSource(t)},o.prototype.disconnect=function(){},o.prototype.clearRows=function(){o.clearCheckables(this._owner)},o.prototype.setRows=function(){for(var t=this._owner._rows,e=t.length;e--;){var i=t[e];this.$_setCheckable(i)}},o.prototype.insertRow=function(t){var e=this._owner.getItemOfRow(t,!0);this.$_setCheckable(e)},o.prototype.insertRows=function(t,e){for(var o=0;o0&&(this._filterLock=Math.max(0,this._filterLock-1),0==this._filterLock&&t&&this.applyFilters(!0,e,i,o))},s.prototype.hasFilter=function(t){var e=this._filters[t];return e&&e.length>0},s.prototype.addFilter=function(t,e){if(t>=0){var i=this._filters[t];if(i||(i=[],this._filters[t]=i),e.criteria||e.callback){var n=new o.ColumnFilterRun(e);return i.push(n),this.applyFilters(),n}}},s.prototype.clearAllFilters=function(){this._filtered&&(this._filters=[],this.applyFilters())},s.prototype.hasFilters=function(){for(var t=this._filters.length,e=0;e0)return!0}return!1},s.prototype.applyFilters=function(t,e,i,o){if(void 0===t&&(t=!0),void 0===e&&(e=null),void 0===i&&(i=null),!(this._filterLock>0)){this.$_buildItems();try{t&&this._fireRefresh()}finally{this._fireFiltered(e,i,o)}}},s.prototype.orderBy=function(t,e,i,o){var r=this;void 0===t&&(t=null),void 0===e&&(e=null),void 0===i&&(i=null),void 0===o&&(o=!0),this._fireSort(t,e,i),this._sortFields=[],this._sortDirections=[],this._sortCases=[];for(var s=t?t.length:0,a=e?e.length:0,l=i?i.length:0,h=0;hh?this._sortDirections.push(e[h]):a>0?this._sortDirections.push(e[a-1]):this._sortDirections.push(n.SortDirection.ASCENDING),l>h?this._sortCases.push(i[h]):l>0?this._sortCases.push(i[l-1]):this._sortCases.push(n.SortCase.SENSITIVE);this._sorted=this.$_checkSorted(),this.$_buildItems();var u=this.outerSort;if(u&&u instanceof Function){var d=this._fireOuterSort(u,this._sortFields,this._sortDirections);d instanceof Promise?d.then((function(){o&&(r._fireRefresh(),r._fireSorted())})):o&&(this._fireRefresh(),this._fireSorted())}else o&&(this._fireRefresh(),this._fireSorted())},s.prototype.getSortFields=function(){return this._sortFields.slice()},s.prototype.getSortDirections=function(){return this._sortDirections.slice()},s.prototype.getSortCases=function(){return this._sortCases.concat()},s.prototype.setPaging=function(t,e,i,o){void 0===e&&(e=10),void 0===i&&(i=-1),void 0===o&&(o=null),e=Math.max(e,1),i=Math.max(i,-1),t==this._paging&&e==this._pageSize&&i==this._pageCount&&o==this._pagingSource||(this._currPage=0,this._paging=t,this._pagingSource=o,this._pageSize=e,this._pageCount=i,this.$_buildItems(),this._fireRefresh())},_dp(s,"page",{get:function(){return this._paging?this._currPage:-1}}),s.prototype.setPage=function(t,e){void 0===t&&(t=0),void 0===e&&(e=-1),this._paging&&(t=Math.max(0,Math.min(this.pageCount-1,t)),e=Math.max(-1,e),t==this._currPage&&e==this._pageStartIndex||(this._currPage=t,this._pageStartIndex=e,this.$_buildPage(),this._fireRefresh()))},_dp(s,"pageCount",{get:function(){if(this._paging){if(this._pageCount>=0)return this._pageCount;var t=this.$_getPageItems();return Math.floor((t.length+this._pageSize-1)/this._pageSize)}return 0},set:function(t){this._paging&&(t=Math.max(-1,t))!=this._pageCount&&(this._pageCount=t,this.$_buildPage(),this._fireRefresh())}}),s.prototype.getPageOfDataRow=function(t){if(this._dataSource){if(this._paging){if(t<0||t>=this._dataSource.rowCount)return-1;var e=this.$_getPageItems();if(!e||!e.length)return-1;for(var i=0;i=this._pubCount?null:this._pubItems[t]},s.prototype.getItems=function(t,e){return this._pubItems.slice(t,t+e)},s.prototype.getIndexOfRow=function(t){if(t>=0&&t=0?e.index:-1}return-1},s.prototype.getItemOfRow=function(t,e){if(t>=0&&t=0||e?i:null}return null},s.prototype._refreshItems=function(){var t={};this.$_saveExtents(t),this.$_clearRows(!1),this.$_buildRows(t),this._fireRefresh()},s.prototype.setFixed=function(t,e,i,o){t=Math.max(0,t),(o||t!=this._fixedCount||e!=this._fixedSorting||i!=this._filtering)&&(this._fixedCount=t,this._fixedSorting=e,this._fixedFiltering=i,this.$_buildItems(),this._fireRefresh())},s.prototype.exchange=function(t,e){if(t!=e&&!this._sorted&&!this._filtered){if(t<0||t>=this._rows.length)throw new Error("index1 is out of bounds: "+t);if(e<0||e>=this._rows.length)throw new Error("index2 is out of bounds: "+t);var i=this._rows[t];this._rows[t]=this._rows[e],this._rows[e]=i}},s.prototype.moveItem=function(t,e){if(t.index!==e&&t instanceof i.GridRow&&!this.$_needBuildItems()){var o=this._pubItems,n=t.index;(n>e||n=0&&(t[o.dataRowId]={exts:o._extents,heights:o.heights&&o.heights.slice()})}},s.prototype.$_clearRows=function(t){t&&this.clearRowHeights(!0),this._rows.length=this._filteredItems.length=this._sortedItems.length=this._pubCount=0,this._filtered=!1,this._sorted=!1,this._pubItems=this._rows,this.$_clearDistincts()},s.prototype.$_clearIndicies=function(){for(var t=this._rows.length;t--;)this._rows[t]._index=-1},s.prototype.$_clearDistincts=function(){for(var t=this._distinctRows.length;t--;)this._distinctRows[t]=null;this._distinctRows.length=0},s.prototype.$_buildRows=function(t){void 0===t&&(t=null);var e=this._dataSource;if(e){this._filtered=this.$_checkFiltered(),this._sorted=this.$_checkSorted(),this._rowCount=e.rowCount,!this._filtered&&!this._paging&&this.maxItemCount>0&&(this._rowCount=Math.min(this._rowCount,this.maxItemCount)),this._rows=new Array(this._rowCount);for(var i=0,o=this._rowCount;i0?this.maxItemCount:this._rows.length;if(this._rowCount=this._rows.length,this._pubItems=this._items=this._rows,this._pubCount=this._itemCount=this._rows.length,this._filtered=this.$_checkFiltered(),this._sorted=this.$_checkSorted(),(this._filtered||this._paging)&&this.$_clearIndicies(),this._filtered){if(this._filteredItems.length=0,this.hideDeleted||i.hiddenCount>0)for(var n=0;n0&&!this._fixedFiltering,d=this._rows.length;if(!t){n=0;for(var c=this._filters.length;n=0)if(t||u&&_=0?this._pageStartIndex:this._currPage*this._pageSize,i=t.length,o=this.maxItemCount>0?this.maxItemCount:i,n=Math.min(this._pageSize,o);e0;e++,n--)this._pageItems.push(t[e]);this._pubItems=this._pageItems,this._pubCount=this._pubItems.length},s.prototype.$_buildPage=function(){this.$_clearIndicies(),this.$_buildPageItems()},s.prototype.$_compareFuncs=function(t,e){var i={},o=this._dataSource;if(o){for(var r=0,s=t.length;r0&&!this._fixedSorting&&(o=i.splice(0,this._fixedCount));var r=this.$_compareFuncs(this._sortFields,this._sortCases);i.sort((function(t,i){for(var o,s,a,l=0,h=e._nullsOrder,u=0,d=e._sortFields.length;u=0;t--)this._summaryMap[t]&&this._summaryMap[t].clear()},s.prototype.$_getSummary=function(t){var e=this._summaryMap[t];if(!e){var i=this._dataSource;i&&i.canSummarize(t)&&(e=new r.FieldSummary(t),this._summaryMap[t]=e)}return e&&0==e.count&&this.itemCount>0&&this.$_summarize(e),e},s.prototype.$_summarize=function(t){var e=this._dataSource;if(e)if(this._filtered){for(var i=this._items.length,o=new Array(i),r=0;r0||this._dataSource.hiddenCount>0},s.prototype.$_select=function(t,e,i){for(var o=0,n=t.length;o=0;t--){var e=this._dataSource?this._dataSource.fieldCount:0;this._sortFields[t]>e&&(this._sortFields.splice(t,1),this._sortDirections.splice(t,1),this._sortCases.splice(t,1))}return this._sortFields&&this._sortFields.length>0},s.prototype.$_getPageItems=function(){return this._sorted?this._sortedItems:this._filtered?this._filteredItems:this._items},s.prototype.fireGrouping=function(t){return this.fireConfirmEvent(u.GroupedItemProvider.GROUPING,t)},s.prototype.onDataSourceCommandStackChanged=function(t,e,i){this._fireCommandStackChanged(e,i)},s.prototype.onDataProviderDisposed=function(t){this._checkableTag&&this._checkableTag.disconnect(),this.$_clearRows(!0),this.$_buildRows(),this.$_resetSummary(),this._fireReset(!0),this.dataSource=null},s.prototype.onDataProviderReset=function(t,e){this.$_clearRows(!0),this.$_buildRows(),this.$_resetSummary(),this._fireReset(e)},s.prototype.onDataProviderRefresh=function(t){this._refreshItems()},s.prototype.onDataProviderRefreshClient=function(t){this._fireRefreshClient()},s.prototype.onDataProviderRowCountChanged=function(t,e){this._fireRefreshClient()},s.prototype.onDataProviderDataLoadComplated=function(){this._fireDataLoadComplated()},s.prototype.$_silentInsertRow=function(t){return!!(t&&t.index>=0&&t.index=0?0:1)}),0)&&(t.length>0&&(this.$_workItems().forEach((function(i){for(var o=0;o=0&&e.splice(i,1)})),this.$_clearSummary(),this.$_resetCounts()},s.prototype.onDataProviderRowRemoved=function(t,e){var i=this._rows,o=i[e];i.splice(e,1);for(var n=i.length-1;n>=e;n--)i[n]._dataRow=n;this.$_needBuildItems()?this.$_buildItems():this.$_silentRemoveRow(o),0==i.length&&this.clearRowHeights(!0),this._fireItemDeleted(o),this._fireRefresh()},s.prototype.onDataProviderRowsRemoving=function(t,e){return!0},s.prototype.$_silentRemoveRows=function(t){this.$_workItems().forEach((function(e){for(var i=0;i=0&&e.splice(n,1)}})),this.$_clearSummary(),this.$_resetCounts()},s.prototype.onDataProviderRowsRemoved=function(t,e){if(e&&!(e.length<1)){e.length>1&&e.sort((function(t,e){return t-e}));for(var i=this._rows,o=e[0],n=[],r=e.length-1;r>=0;r--)n.push(i[e[r]]),i.splice(e[r],1);for(r=this._rows.length-1;r>=o;r--)i[r]._dataRow=r;this.$_needBuildItems()?this.$_buildItems():this.$_silentRemoveRows(n),0==e.length&&this.clearRowHeights(!0),this._fireRefresh()}},s.prototype.onDataProviderRowUpdating=function(t,e,i){return!0},s.prototype.onDataProviderRowUpdated=function(t,e){this.$_needBuildItems()?this.$_buildItems():this.$_clearSummary(),this._checkableTag&&this._checkableTag.updateRow(e),this._rows[e]&&this._fireItemUpdated(this._rows[e]),this._fireRefresh()},s.prototype.onDataProviderRowsUpdated=function(t,e,i){this.$_needBuildItems()?this.$_buildItems():this.$_clearSummary(),this._checkableTag&&this._checkableTag.updateRows(e,i),this._fireRefresh()},s.prototype.onDataProviderRowListUpdated=function(t,e){this.$_needBuildItems()?this.$_buildItems():this.$_clearSummary(),this._checkableTag&&this._checkableTag.updateRowList(e),this._fireRefresh()},s.prototype.onDataProviderValueChanging=function(t,e,i,o){return!0},s.prototype.onDataProviderValueChanged=function(t,e,i){this.$_needBuildItems()?this.$_buildItems():this.$_clearSummary(),this._checkableTag&&this._checkableTag.updateRow(e),this._rows[e]&&this._fireItemUpdated(this._rows[e]),this._fireRefresh()},s.prototype.onDataProviderRowMoving=function(t,e,i){return!0},s.prototype.onDataProviderRowMoved=function(t,e,i){var o=this._rows,n=o.splice(e,1);o.splice(i,0,n[0]);for(var r=o.length,s=e=Math.min(e,i);s=0;e--)this.addRow(t.getChild(e))},i.prototype.addRows=function(t){for(var e=0,i=t;e=0;e--)this.removeRow(t.getChild(e))},i.prototype.removeRows=function(t){for(var e=0,i=t;e0||this._dataRow&&this._dataRow.hasChildren}}),_dp(n,"rootItem",{get:function(){for(var t=this;t.level>1;)t=t.parent;return t}}),_dp(n,"summaryMode",{get:function(){return o.SummaryMode.AGGREGATE}}),_dp(n,"editable",{get:function(){return this._editable}}),_dp(n,"readOnly",{get:function(){return this._readOnly}}),n.prototype.setEditable=function(t,e){this._editable=t,this._readOnly=e},n.prototype._getExtents=function(){var t=this.provider;return t?t._extents.getExtents(this):0},n.prototype._setExtents=function(t){var e;null===(e=this.provider)||void 0===e||e._extents.setExtents(this,t)},_dp(n,"isData",{get:function(){return!0}}),_dp(n,"isDataRow",{get:function(){return!0}}),_dp(n,"footer",{get:function(){return this._footer}}),_dp(n,"footerCount",{get:function(){return this._footer?1:0}}),_dp(n,"dataRow",{get:function(){return this._dataRow?this._dataRow.rowId:-1}}),n.prototype.getShadowRow=function(){return this._dataRow?this._dataRow.rowId:-1},_dp(n,"dataId",{get:function(){return this._dataRow?this._dataRow.rowId:-1}}),_dp(n,"dataRowId",{get:function(){return this.dataId}}),_dp(n,"descendantCount",{get:function(){return this._dataRow.descendantCount}}),_dp(n,"rowState",{get:function(){return this._dataRow.rowState}}),_dp(n,"isLeaf",{get:function(){return!this.hasChildren}}),_dp(n,"resizable",{get:function(){return!0}}),_dp(n,"type",{get:function(){return o.ItemType.TREE}}),n.prototype.getFooter=function(t){return this._footer},n.prototype.isFooter=function(t){return t===this._footer},n.prototype.canEdit=function(){return!0},n.prototype.createFooter=function(){this._footer||(this._footer=new m)},n.prototype.setExpanded=function(t,e,i){(t!=this.expanded||i)&&(t?this.provider.expand(this,e,i,0):this.provider.collapse(this,e,i))},n.prototype.getData=function(t){return t=this.dataSource?this.dataSource.getFieldIndex(t):t,this._dataRow.getValue(t)},n.prototype.setData=function(t,e){t=this.dataSource?this.dataSource.getFieldIndex(t):t,this._dataRow.setValue(t,e,!1)},n.prototype.setItem=function(t,e){i.prototype.setItem.call(this,t,e),e._addChildren(t.children),t.clear()},n.prototype.exchange=function(t,e){this._exchangeItems(t,e)},n.prototype.moveChild=function(t,e){var i=t+e,o=this._children,n=o[t];if(e<0)for(var r=t;r>i;r--)o[r]=o[r-1];else for(r=t;rt.level;){if(i[o]==t.footer){e.footerWhenCollapsed||(i[o]._index=-1,i.splice(o,1));break}i[o]._index=-1,i.splice(o,1)}},i.prototype.getNext=function(t){return t&&t.visible&&t.index0?this._items[t.index-1]:null},i.prototype.insert=function(t,e){this._items.splice(e,0,t)},i.prototype.remove=function(t){var e=this._items,i=e.indexOf(t);if(i>=0&&(e.splice(i,1),t.expanded))for(;i0?t.level+i:1e6),e){for(var s=o,a=n.length;s0&&this._sortMode==o.SortMode.AUTO},r.prototype.insertItem=function(t,e,i,o){var n=this._visibleItems;t.collapsed&&n.expand(t,!1);var r=n.indexOf(t.getItem(i));if(o){t.insert(i+1,e);for(var s=n.count,a=t.level+1;++r0?o.indexOf(t.getItem(t.count-1)):o.indexOf(t);for(var n=o.count,r=t.level;++i0?t.level+o:1e6,r);try{this._fireRefresh(!1)}finally{n&&this._fireExpanded(t)}}},r.prototype.expand=function(t,e,i,o){void 0===o&&(o=0),this._expandItem(t,i,e,o,!0,!0)},r.prototype.expandAll=function(t,e){this._expandItem(this._rootItem,!0,!0,t>0?t+1:0,!0,e)},r.prototype.$_setCollapsed=function(t,e){if(this._setExpanded(t,!1),e)for(var i=0,o=t.count;ih?this._sortDirections.push(e[h]):a>0?this._sortDirections.push(e[a-1]):this._sortDirections.push(o.SortDirection.ASCENDING),l>h?this._sortCases.push(i[h]):l>0?this._sortCases.push(i[l-1]):this._sortCases.push(o.SortCase.SENSITIVE);this._saveAndRefresh(!0,n);var u=this.outerSort;if(u&&u instanceof Function){var d=this._fireOuterSort(u,this._sortFields,this._sortDirections);d instanceof Promise?d.then((function(){n&&r._fireRefresh(),r._fireSorted()})):(n&&this._fireRefresh(),this._fireSorted())}else n&&this._fireRefresh(),this._fireSorted()},r.prototype.getSortFields=function(){return this._sortFields.concat()},r.prototype.getSortDirections=function(){return this._sortDirections.concat()},r.prototype.getSortCases=function(){return this._sortCases.concat()},r.prototype.beginFiltering=function(){this._filterLock++},r.prototype.$_prepareFiltering=function(t,i){for(var o=i._dataRow.count,n=i.rowId,r=n<=-1||this.$_selectItem(i),s=0;s0&&(this._filterLock=Math.max(0,this._filterLock-1),t&&0==this._filterLock&&this.applyFilters(e,i,n,o))},r.prototype.hasFilter=function(t){var e=this._filters[t];return!!e&&e.length>0},r.prototype.addFilter=function(t,e){var i=this._filters[t];i||(i=[],this._filters[t]=i);var o=new s.ColumnFilterRun(e);return i.push(o),o},r.prototype.clearAllFilters=function(){this._filtered&&(this._filters={},this.applyFilters(null,null))},r.prototype.hasFilters=function(){for(var t in this._filters){var e=this._filters[t];if(e&&e.length>0)return!0}return!1},r.prototype.$_prepareFilters=function(){var t=this.dataSource,e=t.fieldCount;for(var i in this._filters)Number(i)>=e&&(this._filters[i]=null);if(this._filtered=this.hasFilters())for(var o in this._filters){var n=this._filters[o];if(n)for(var r=n.length;r--;)n[r].prepare(this._filterRuntime,t)}},r.prototype.applyFilters=function(t,e,i,o){if(i||this.$_prepareFilters(),0==this._filterLock){this.$_saveExpanded(this._rootItem),this.$_clearItems(),this.$_buildTree(!0,i);try{this._fireRefresh()}finally{this._fireFiltered(t,e,o)}}},r.prototype.getItemByRow=function(t){return t?this._itemMap[t.rowId]:null},r.prototype.getCheckedRows=function(){var t=[];return function t(e,i){if(e instanceof y)for(var o=0,n=e.count;o=0&&i.push(s),t(r,i)}}(this._rootItem,t),t},r.prototype.resetCheckables=function(){this._checkableTag&&(this._checkableTag.clearRows(),this._fireRefresh())},r.prototype.applyCheckables=function(){this._checkableTag?this._checkableTag.setRows():_.clearCheckables(this),this._fireRefresh()},r.prototype.$_checkChildren=function(t,e,i){for(var o=0,n=t.count;o0}}),r.prototype.getMovable=function(t){return!this.sorted||t&&this.sortMode===o.SortMode.EXPLICIT},r.prototype._createRootItem=function(){var t=new v(this);return this._setExpanded(t,!0),t},r.prototype.getItem=function(t){return t>=0&&t=r:y<=r;f?y--:y++){var v=this._visibleItems.getItem(y),C=v.dataRow,w=v.dataRow>=0;if(w)for(m=0;m=t.length&&(n++,s=0);var y=i.compareCallback;y="function"==typeof y?y:u.Utils.compareTextValue;for(var v=n;l?v>=r:v<=r;l?v--:v++){var C=this._visibleItems.getItem(v),w=C.dataRow,x=!1;if(C.dataRow>=0)for(m=l?vn?0:s;l?m>=0:m<_;l?m--:m++){var b=t[m],I=a.getOrgFieldName(b);if(b>=0&&b0&&this.$_buildItems(l,e,i)}}},r.prototype.$_compareRemainExpand=function(t,e){var i=this._ds,o=i.getFieldIndex(i.treeField),n=t.getData(o);this._remainExpandedMap.hasOwnProperty(n)?this._remainExpandedMap[n]&&this.$_setExpanded(t,!1,0,!1):e&&this.$_setExpanded(t,!1,0,!1)},r.prototype.$_sortItem=function(t){this.$_sort(t,this._sortFields,this._sortDirections,this._sortCases)},r.prototype.$_sort=function(t,e,i,n){var r=this,s=this._nullsOrder;t._children.sort((function(t,a){for(var l,h,u=0,d=0,c=e.length;d=o)&&(n.splice(a,1),r.splice(a,1),s.splice(a,1));this.sorted&&this._rootItem.count>0&&!this.outerSort&&this.$_sortItem(this._rootItem),this.$_resetVisibleItems(),this._checkableTag&&this._checkableTag.setRows()},r.prototype.$_resetSummary=function(){this._summaryMap=[]},r.prototype.$_resetGroupSummary=function(){},r.prototype.$_clearSummary=function(){if(this._summaryMap)for(var t=this._summaryMap.length;t--;)this._summaryMap[t]&&this._summaryMap[t].clear()},r.prototype.$_getSummary=function(t){var e=this._summaryMap[t];if(!e){var i=this.dataSource;i&&i.canSummarize(t)&&(e=new h.FieldSummary(t),this._summaryMap[t]=e)}return e&&0==e.count&&this.itemCount>0&&this.$_summarize(e),e},r.prototype.$_summarize=function(t){var e=this.dataSource;if(e)if(this._filtered||this.hideDeleted||e.hiddenCount>0){for(var i=this._rootItem.getDescendants(!1),n=i.length,r=[],s=0;s0&&t(r,i,o)}return o}(this.rootItem,e,{})},r.prototype._fireItemChanged=function(t){this._eventLock<=0&&this.fireEvent(r.ITEM_CHANGED,t)},r.prototype._fireExpanding=function(t){return!(this._eventLock<=0)||this.fireConfirmEvent(r.EXPANDING,t)},r.prototype._fireExpanded=function(t){this._eventLock<=0&&this.fireEvent(r.EXPANDED,t)},r.prototype._fireCollapsing=function(t){return!(this._eventLock<=0)||this.fireConfirmEvent(r.COLLAPSING,t)},r.prototype._fireCollapsed=function(t){this._eventLock<=0&&this.fireEvent(r.COLLAPSED,t)},r.prototype._fireParentChanging=function(t,e,i){return!(this._eventLock<=0)||this.fireConfirmEvent(r.PARENT_CHANGING,t,e,i)},r.prototype._fireParentChanged=function(t,e,i){this._eventLock<=0&&this.fireEvent(r.PARENT_CHANGED,t,e,i)},r.prototype._refreshItems=function(){this.$_clearItems(),this.$_buildTree(),this._fireRefresh()},r.prototype._saveAndRefresh=function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!0),t&&this.$_saveExpanded(this._rootItem);var i={};this.hasFilters()&&function t(e,i){i[e.dataId]=!0,e.children.length>0&&e.children.forEach((function(e){t(e,i)}))}(this._rootItem,i),this.$_clearItems(),this.$_buildTree(t,i),e&&this._fireRefresh()},r.prototype.onDataSourceCommandStackChanged=function(t,e,i){this._fireCommandStackChanged(e,i)},r.prototype.onTreeDataProviderDisposed=function(t){this.disposing||(this.$_clearItems(),this.$_resetSummary(),this._fireReset(!0),this.dataSource=null)},r.prototype.onTreeDataProviderReset=function(t,e){this.$_clearItems(),this.$_resetSummary(),this.$_buildTree(),this._fireReset(e)},r.prototype.onTreeDataProviderRefresh=function(t){this._refreshItems(),this._remainExpandedMap=void 0},r.prototype.onTreeDataProviderRefreshClient=function(t){this._fireRefreshClient()},r.prototype.onTreeDataProviderPrepareRemain=function(){this._remainExpandedMap=this.$_saveRemainPrepareMap()},r.prototype.onDataProvderCleared=function(t){this._refreshItems()},r.prototype.onTreeDataProviderRowCountChanged=function(t,e){},r.prototype.onTreeDataProviderRowAdding=function(t,e,i){return!0},r.prototype.onTreeDataProviderRowAdded=function(t,e){var i=this._itemMap[e.parent.rowId];if(i){var o=this.$_internalAddItem(i,e,!0);o?(this.$_buildItems(o),this.$_clearSummary(),i.expanded?this._expandItem(i,!0,!1,0,!1,!0):this._fireItemChanged(i)):this.$_resetVisibleItems()}this._checkableTag&&(this._checkableTag.addRow(e,!1),e.parent.level>0&&this._checkableTag.addRow(e.parent,!1)),this.$_needSort()&&this._saveAndRefresh()},r.prototype.onTreeDataProviderRowsAdded=function(t,e,i){var o,n=this._itemMap[e.rowId];if(n&&i&&(o=i.length)>0){for(var r=0;r0&&this._checkableTag.addRow(e))}this.$_needSort()&&this._saveAndRefresh()},r.prototype.onTreeDataProviderRowRemoving=function(t,e){return!0},r.prototype.onTreeDataProviderRowRemoved=function(t,e){var i=this._itemMap[e.rowId];if(i){var o=i.parent;this.$_internalRemoveItem(i),this.$_clearSummary(),o.expanded&&o.visible&&(this._visibleItems.remove(i),this._fireRefresh())}},r.prototype.onTreeDataProviderRowsRemoving=function(t,e){return!0},r.prototype.onTreeDataProviderRowsRemoved=function(t,e){for(var i=e.length,o=!1,n=0;n0){var s=!1;if(this.hideDeleted)for(var a=0,l=e.length;a=i.fieldCount)throw new RangeError("field index is out of bounds: "+t);var o=i.getField(t),n=this._values[t];e=o.readValue(e),this._values[t]=e,this._started&&this.parent&&!o.equalValues(n,e)&&this._rs._editItemCellUpdated(this,t,n,e)},_dp(i,"dataSource",{get:function(){return this._rs.dataSource}}),_dp(i,"itemState",{get:function(){return this._state}}),_dp(i,"rowState",{get:function(){return this._target?this._target.rowState:n.RowState.NONE}}),_dp(i,"expanded",{get:function(){return!!this._target&&this._target.expanded}}),i.prototype.getData=function(t){return t=this.dataSource.getFieldIndex(t),this._values[t]},i.prototype.setData=function(t,e){var i=this.dataSource;if((t=i.getFieldIndex(t))<0||t>=i.fieldCount)throw new RangeError("field index is out of bounds: "+t);var o=i.getField(t),n=this._values[t];e=o.readValue(e);var r=!this._checkDiff;r||(r=this._strictDiff?!o.equalValues(n,e):!o.sameValues(n,e)),r&&(this._values[t]=e,this._changeValues[t]=!0,this.parent&&(this._rs._editItemCellUpdated(this,t,n,e),this._rs._editItemCellEdited(this,t)))},i.prototype.getRowData=function(){return this._values.concat()},i.prototype.getRowObject=function(){var t=this.dataSource;if(t){for(var e={},i=0,o=t.fieldCount;i0){for(var e=[],i=0,o=t.length;il&&r.setValue(l,o[l])}return this._editingItem},n.prototype.addCellStyle=function(t,e,i){return this._rs.addCellStyle(t,e,i)},n.prototype.removeCellStyle=function(t,e){return this._rs.removeCellStyle(t,e)},n.prototype.getUserCellStyle=function(t,e){return this._rs.getUserCellStyle(t,e)},n.prototype.setSortingOptions=function(t){this._rs.setSortingOptions(t)},n.prototype.setTreeOptions=function(t){this._rs.setTreeOptions(t)},n.prototype.onItemProviderFilterAdd=function(t,e,i){},n.prototype.onItemProviderFilterRemove=function(t,e,i){},n.prototype.onItemProviderFilterClear=function(t,e){},n.prototype.onItemProviderFilterClearAll=function(t){},n.prototype.onItemProviderOuterSort=function(t,e,i,o){return this._fireOuterSort(e,i,o)},n.prototype.onTreeItemProviderItemChanged=function(t,i){this._eventLock<=0&&this.fireEvent(e.TreeItemProvider.ITEM_CHANGED,i)},n.prototype.onTreeItemProviderExpanding=function(t,i){return!(this._eventLock<=0)||this.fireConfirmEvent(e.TreeItemProvider.EXPANDING,i)},n.prototype.onTreeItemProviderExpanded=function(t,i){this._eventLock<=0&&this.fireEvent(e.TreeItemProvider.EXPANDED,i)},n.prototype.onTreeItemProviderCollapsing=function(t,i){return!(this._eventLock<=0)||this.fireConfirmEvent(e.TreeItemProvider.COLLAPSING,i)},n.prototype.onTreeItemProviderCollapsed=function(t,i){this._eventLock<=0&&this.fireEvent(e.TreeItemProvider.COLLAPSED,i)},n}(o.EditableItemProvider);return Ao.TreeGridItemProvider=l,Ao}function Ko(){if(zo)return Vo;zo=1,Object.defineProperty(Vo,"__esModule",{value:!0}),Vo.ValidationManager=Vo.DataCellValidationRuntime=Vo.DataRowValidationRuntime=Vo.EditValidationCollection=Vo.EditValidation=Vo.ValidationError=Vo.AbortError=void 0;var t=d,e=C(),i=G(),o=Y(),n=S(),r=Gi(),s=cn(),a=ji(),l=Xo(),h=function(e){function i(t){var o=e.call(this,t)||this;return Object.setPrototypeOf(o,i.prototype),o}return t.__extends(i,e),i}(Error);Vo.AbortError=h;var u=function(e){function i(t,o,n,r){var s=e.call(this,o)||this;return Object.setPrototypeOf(s,i.prototype),s.level=t,s.column=n,s.userMessage=r,s}return t.__extends(i,e),i.prototype.toString=function(){return"Validation failed["+this.level.toUpperCase()+"]: "+this.message},i}(h);Vo.ValidationError=u;var c=function(i){function n(t){var o=i.call(this)||this;return o._active=!0,o._mode=e.ValidationMode.ALWAYS,o._level=e.ValidationLevel.ERROR,o._name=t,o}return t.__extends(n,i),_dp(n,"name",{get:function(){return this._name}}),_dp(n,"active",{get:function(){return this._active},set:function(t){this._active=t}}),_dp(n,"mode",{get:function(){return this._mode},set:function(t){this._mode=t}}),_dp(n,"level",{get:function(){return this._level},set:function(t){this._level=t}}),_dp(n,"criteria",{get:function(){return this._criteria},set:function(t){t!=this._criteria&&(this._criteria=t,this._exprNode=t?o.ExpressionParser.Default.parse(t,n.CAPITAL_INDEXERS):null)}}),_dp(n,"message",{get:function(){return this._message},set:function(t){this._message=t}}),_dp(n,"description",{get:function(){return this._description},set:function(t){this._description=t}}),n.prototype.validate=function(t){if(this._exprNode&&!this._exprNode.evaluate(t)){var e=this._message||this._description||this._name||this._criteria;throw new u(this._level,e,null,this._message)}},n.prototype.doAssignSimple=function(t){if("string"==typeof t)return this.criteria=t,!0},n.CAPITAL_INDEXERS=["value","values"],n}(i.Base);Vo.EditValidation=c;var p=function(i){function o(t){var e=i.call(this)||this;return e._items=[],e._isColumn=t,e}return t.__extends(o,i),o.prototype._doDispose=function(){this._items=null,i.prototype._doDispose.call(this)},_dp(o,"count",{get:function(){return this._items.length}}),_dp(o,"items",{get:function(){return this._items.slice()},set:function(t){this.assignFrom(t)}}),o.prototype.clear=function(){this._items=[]},o.prototype.addAll=function(t){if(t&&t.length>0)for(var e=0,i=t.length;e=this._fieldCount)throw new o.ExpressionEvaluationError("Data field index out of bounds:"+e);switch(t){case i.ID_VALUE:case i.ID_VALUES:return this._item.getData(e)}throw new o.ExpressionEvaluationError("Invalid identifier indexer: "+t)},i.prototype.evaluateIndexerS=function(t,e,n){var r=n?this._dataSource.getFieldIndexC(e):this._dataSource.getFieldIndex(e);if(r<0||r>=this._fieldCount)throw new o.ExpressionEvaluationError("Data field is not exists:"+e);switch(t){case i.ID_VALUE:case i.ID_VALUES:return this._item.getData(r)}throw new o.ExpressionEvaluationError("Invalid identifier indexer: "+t)},i.ID_ROW=0,i.ID_DATAROW=1,i.ID_CHECKED=2,i.ID_VALUE=3,i.ID_VALUES=4,i.IDENTS={row:i.ID_ROW,datarow:i.ID_DATAROW,checked:i.ID_CHECKED,value:i.ID_VALUE,values:i.ID_VALUES},i}(o.ExpressionRuntime);Vo.DataRowValidationRuntime=_;var f=function(e){function i(){return e.call(this)||this}return t.__extends(i,e),i.prototype._doDispose=function(){this._index=null,this._dataSource=null,e.prototype._doDispose.call(this)},i.prototype.setIndex=function(t){this._index=t,this._value=this._index.item.getData(this._index.dataColumn.dataIndex),this._dataSource=this._index.item.dataSource},i.prototype.isIdentifier=function(t){return t=t.toLowerCase(),i.IDENTS.hasOwnProperty(t)?i.IDENTS[t]:e.prototype.isIdentifier.call(this,t)},i.prototype.evaluateIdentifier=function(t){switch(t){case i.ID_VALUE:return this._value;case i.ID_ROW:return this._index.itemIndex;case i.ID_DATAROW:return this._index.item.dataRow;case i.ID_INDEX:return this._index.column.index;case i.ID_FIELD:return this._index.dataColumn.dataIndex;case i.ID_CHECKED:var e=this._index.item;return!!e&&e.checked;case i.ID_TAG:return this._index.column.tag;case i.ID_BASE:var n=this._index.dataColumn.baseIndex;return n>=0?this._index.item.getData(n):void 0}throw new o.ExpressionEvaluationError("Invalid identifier key: "+t)},i.prototype.evaluateIndexerI=function(t,e){var n=this._dataSource.fieldCount;if(e<0||e>=n)throw new o.ExpressionEvaluationError("Data field index out of bounds:"+e);switch(t){case i.ID_VALUE:case i.ID_VALUES:return this._index.item.getData(e)}throw new o.ExpressionEvaluationError("Invalid identifier indexer: "+t)},i.prototype.evaluateIndexerS=function(t,e,n){var r=n?this._dataSource.getFieldIndexC(e):this._dataSource.getFieldIndex(e),s=this._dataSource.fieldCount;if(r<0||r>=s)throw new o.ExpressionEvaluationError("Data field is not exists:"+e);switch(t){case i.ID_VALUE:case i.ID_VALUES:return this._index.item.getData(r)}throw new o.ExpressionEvaluationError("Invalid identifier indexer: "+t)},i.ID_VALUE=0,i.ID_ROW=1,i.ID_DATAROW=2,i.ID_INDEX=3,i.ID_FIELD=4,i.ID_CHECKED=5,i.ID_TAG=6,i.ID_BASE=7,i.ID_VALUES=8,i.IDENTS={value:i.ID_VALUE,row:i.ID_ROW,datarow:i.ID_DATAROW,index:i.ID_INDEX,field:i.ID_FIELD,checked:i.ID_CHECKED,tag:i.ID_TAG,base:i.ID_BASE,values:i.ID_VALUES},i}(o.ExpressionRuntime);Vo.DataCellValidationRuntime=f;var g=function(i){function o(t){var e=i.call(this)||this;return e._cellList={},e._owner=t,e}return t.__extends(o,i),_dp(o,"owner",{get:function(){return this._owner}}),_dp(o,"cellList",{get:function(){return this._cellList}}),o.prototype.validateCell=function(t,e,i){this.$_validateCell(t,e,!0,this._owner.editOptions.commitLevel,i)},o.prototype.validateRow=function(t,i,o,n){var r=this._owner.editOptions.commitLevel,a=new s.CellIndex;if(!o)for(var l=this._owner.getDataColumns(),h=0,d=l.length;h0){var _=this._owner.rowValidationRuntime;_.item=t,p.validate(i?e.ValidationMode.INSERT:e.ValidationMode.UPDATE,_,!0,r)}this.owner._fireValidateRow(t,i,t.getRowObject())},o.prototype.clearInvalidCells=function(t){this.$_clearInvalidateList(t)},o.prototype.clearInvalidCell=function(t){this.$_clearInvalidateCell(t)},o.prototype.getError=function(t){return t.item?(this._cellList[(0,r.ItemState_isEditing)(t.item.itemState)?-1:t.dataId]||{})[t.dataField]:null},o.prototype.cloneError=function(t,e){var i=this._cellList;i[t]&&(i[e]=JSON.parse(JSON.stringify(i[t])))},o.prototype.addInvalidateCell=function(t,e){return this.$_addInvalidateCell(t,e)},o.prototype.getInvalidCells=function(e){var i,o=[],r=this._owner.dataSource,s=this._cellList;if(null!=e){var a=r.getRowId(e);if(null==a)return null;(i={})[a]=this._cellList[a],s=i}for(var l in s){var h=s[l];for(var u in e=r.getDataRow(+l),h){var d=t.__assign(t.__assign({},h[u]),{dataRow:e});o.push(n.Utils.deepCopy(d))}}return o.length>0?o:null},o.prototype.validateCells=function(t,i,o,r){var a=this._owner,l=a.getDataColumns(),h=[];if(r)for(var u=l.length;u--;)r.indexOf(l[u].name)<0&&l.splice(u,1);if(t=n.Utils.makeArray(t)){u=0;for(var d=t.length;u0){var m=this._owner.columnValidationRuntime;m.setIndex(t),g.validate(i?e.ValidationMode.INSERT:e.ValidationMode.UPDATE,m,o,n)}this.owner._fireValidateCell(t,i,t.item.getData(t.dataField)),!r&&this.$_clearInvalidateCell(t)}catch(e){throw e instanceof u&&(e.column=s,!r&&this.$_addInvalidateCell(t,e)),e}}},o.prototype.$_addInvalidateCell=function(e,i){var o=(0,r.ItemState_isEditing)(e.item.itemState)?-1:e.dataId,n=e.dataColumn&&e.dataColumn.dataIndex;if(!(null==o||n<=-1)){var s=this._cellList,a=s[o]=s[o]||{};return a[n]={message:i.message,userMessage:i.userMessage,level:i.level,column:e.dataColumn.name,fieldName:e.dataColumn.fieldName},this.owner.refreshView(),t.__assign(t.__assign({},a[n]),{dataRow:e.dataRow})}},o.prototype.$_clearInvalidateCell=function(t){var e=(0,r.ItemState_isEditing)(t.item.itemState)?-1:t.dataId,i=t.dataField,o=this._cellList[e];o&&o[i]&&delete o[i],this.owner.refreshView()},o.prototype.$_clearInvalidateList=function(t){null!=t?delete this._cellList[t]:this._cellList={},this._owner.refreshView()},o}(i.Base);return Vo.ValidationManager=g,Vo}var Zo,Jo={};function Qo(){if(Zo)return Jo;Zo=1,Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.TextFormatter=void 0;var t=S(),e=/(.*)/,i=function(){function i(t){this._pattern=e,this._replace="$1",this.$_parse(this._format=t)}return i.getFormatter=function(t){var e=i.Formatters[t];return e||(i.Formatters[t]=e=new i(t)),e},_dp(i,"format",{get:function(){return this._format}}),i.prototype.getText=function(t){return t&&t.replace(this._pattern,this._replace)},i.prototype.$_parse=function(e){if(e){var i=e.trim().split(t.Utils.colonreg);if(i.length>1){var o=i[0].trim(),n=i[1].trim();o&&n&&('"'==o.charAt(0)&&(o=o.substr(1,o.length-2)),o&&('"'==n.charAt(0)&&(n=o.substr(1,n.length-2)),n&&(this._pattern=new RegExp(o,i[2]||""),this._replace=n)))}}},i.Formatters={},i}();return Jo.TextFormatter=i,Jo}var tn,en,on={};function nn(){if(tn)return on;tn=1,Object.defineProperty(on,"__esModule",{value:!0}),on.ColumnMergeManager=on.ColumnMergeRoom=on.GridMergeRoom=on.ColumnMergeRule=on.RowGroupMergeRule=on.GridMergeRule=void 0;var t=d,e=G(),i=Gi(),o=S(),n=Y(),r=rn(),s=cn(),a=ji(),l=Ro(),h=C(),u=function(e){function i(){return e.call(this)||this}return t.__extends(i,e),i.prototype._changed=function(){},i.INIT_COUNT=200,i}(e.Base);on.GridMergeRule=u;var c=function(e){function n(){var t=e.call(this)||this;return t._level=0,t._mergeMode=!1,t}return t.__extends(n,e),n.getDefault=function(t,e){var i=n.$_default;return i._level=t,i._mergeMode=e,i},n.prototype.parseInit=function(t,e,i,o,n){var r=t.itemCount;(o=Math.min(r-i,o))<1||(this._mergeMode?this.$_parseMerged(t,e,i,o,n):this.$_parseNormal(t,e,i,o,n))},n.prototype.parseBounds=function(t,e,i,o,n){if(!(t.itemCount<1)){for(i=Math.max(0,i);i>=0&&n[i]<=0;){var r=t.getItem(i);if(r==this.$_getAncestor(r,this._level))break;i--}for(;i<=o&&n[i]>0;)i++;i<=o&&(this._mergeMode?this.$_parseMergedBounds(t,e,i,o,n):this.$_parseNormalBounds(t,e,i,o,n))}},n.prototype.$_getAncestor=function(t,e){var n=o.Utils.cast(t,i.GroupItem);for(n||(n=t.parent);n.level>e;)n=n.parent;return n},n.prototype.$_parseNormal=function(t,e,o,n,r){var s=t.itemCount;if(!(s<1)){var a=t.fixedCount,l=t.getItem(o),h=l,u=o,d=u+1;for(r[u]=u+1;d=o)break;a=u,l=h}n[h]=l+1,h++}},n.prototype.$_parseNormalBounds=function(t,e,i,o,n){var r=t.itemCount;if(!(r<1)){var s=t.fixedCount,a=t.getItem(i),l=a,h=i,u=h+1;for(n[h]=h+1;uo)break;a=u,l=h}n[h]=l+1,h++}}},n.$_default=new n,n}(u);on.RowGroupMergeRule=c;var p=function(e){function i(){var t=e.call(this)||this;return t._item=null,t._field=-1,t._ds=null,t._fieldCount=0,t._grid=null,t._layout=null,t}return t.__extends(i,e),i.getObjectText=function(t,e,i,o){var n=e.objectKey||e.objectCallback,r=n?e.objectKey:i.objectKey,s=n?e.objectCallback:i.objectCallback;return s&&"function"==typeof s?s(i.orgFieldName,t.dataRow,o):r&&o.hasOwnProperty(r)?o[r]:JSON.stringify(o)},i.prototype._doDispose=function(){this._item=null,this._ds=null,this._grid=null,this._layout=null,e.prototype._doDispose.call(this)},i.prototype.setDataSource=function(t){this._ds=t,this._fieldCount=t?t.fieldCount:0},i.prototype.setLayout=function(t){this._layout=t,this._column=t.firstColumn,this._grid=t.grid},i.prototype.setCell=function(t){this._item=t.item,this._field=t.dataField},i.prototype.setItem=function(t,e){this._item=t,this._field=e},i.prototype.clear=function(){this._item=null,this._field=null,this._layout=null,this._column=null,this._grid=null,this._ds=null},i.prototype.isIdentifier=function(t){return t=t.toLowerCase(),i.IDENTS.hasOwnProperty(t)?i.IDENTS[t]:e.prototype.isIdentifier.call(this,t)},i.prototype.evaluateIdentifier=function(t){if(this._item){var e=void 0;switch(t){case i.ID_ROW:return this._item.index;case i.ID_DATAROW:return this._item.dataRow;case i.ID_CHECKED:return this._item.checked;case i.ID_GROUP:return this._item.parent;case i.ID_VALUE:var o=this._ds.getField(this._field);return null!=(e=this._item.getData(this._field))&&o.dataType===h.ValueType.OBJECT?i.getObjectText(this._item,this._column,o,e):e;case i.ID_PREV_VALUES:var r=this._grid.getDataColumns(),s=r.indexOf(this._column);if(!r.length||s<1)return"";for(var a=[],l=0,u=Math.min(s,r.length);l=this._fieldCount)throw new n.ExpressionEvaluationError("Data field index out of bounds:"+e);var o=this._item.getData(e);if(null!=o&&this._ds.getField(e).dataType===h.ValueType.OBJECT){var r=this._column.grid.columnByField(e);return i.getObjectText(this._item,r,r.getField(),o)}return o}throw new n.ExpressionEvaluationError("Invalid identifier indexer: "+t)}},i.prototype.evaluateIndexerS=function(t,e,o){if(t!=i.ID_VALUE&&t!=i.ID_VALUES)throw new n.ExpressionEvaluationError("Invalid identifier indexer: "+t);if(this._ds){var r=o?this._ds.getFieldIndexC(e):this._ds.getFieldIndex(e);if(r<0||r>=this._fieldCount)throw new n.ExpressionEvaluationError("Data field is not exists:"+e);var s=this._item.getData(r);if(null!=s&&this._ds.getField(r).dataType===h.ValueType.OBJECT){var a=this._column.grid.columnByField(r);return i.getObjectText(this._item,a,a.getField(),s)}return s}},i.ID_ROW=0,i.ID_DATAROW=1,i.ID_CHECKED=2,i.ID_VALUE=3,i.ID_VALUES=4,i.ID_GROUP=5,i.ID_PREV_VALUES=6,i.IDENTS={row:i.ID_ROW,datarow:i.ID_DATAROW,checked:i.ID_CHECKED,value:i.ID_VALUE,values:i.ID_VALUES,group:i.ID_GROUP,prevvalues:i.ID_PREV_VALUES},i}(n.ExpressionRuntime),_={},f=function(e){function o(t){var i=e.call(this)||this;return i._runtime=o.$_runtime=o.$_runtime||new p,"function"==typeof t?i._callback=t:i.criteria=t,i}return t.__extends(o,e),o.createRule=function(t){var e="string"==typeof t||"function"==typeof t?t:t&&t.criteria;return e?new o(e):null},o.prototype._doDispose=function(){this._runtime.clear(),this._runtime=null,e.prototype._doDispose.call(this)},_dp(o,"criteria",{get:function(){return this._criteria},set:function(t){(t=t?t.trim():null)!=this._criteria&&(this._criteria=t,this._exprNode=t?n.ExpressionParser.Default.parse(t,null):null,this._changed())}}),o.prototype.$_getValue=function(t,e,i,o){return o?e.getData(i):this._callback?this._callback.call(null,t.handler,this._layout.getDataColumn(),e.itemIndex,e.getData(i)):(this._runtime.setItem(e,i),this._exprNode.evaluate(this._runtime))},o.prototype.parseInit=function(t,e,i,o,n){var r=this._layout.isBreakMergeOnEmpty(),s=t.fixedCount,a=t.itemCount,l=t.dataSource.rowCount,u=this._layout.grid;if(!((o=Math.min(a-i,o))<1||l<=0)){this._runtime.setDataSource(t.dataSource),this._runtime.setLayout(this._layout);for(var d=null,c=i;c=a)){var p,f=!this._callback&&this._exprNode.isIdentifier("value")&&this._layout.getDataColumn().valueType!==h.ValueType.OBJECT,g=i=c;if(n[g]=g+1,!(d.dataRow>=l))for(p=this.$_getValue(u,d,e,f),c=i+1;c=l)break;var m=this.$_getValue(u,d,e,f);if(c==s||null==m&&r||(m instanceof Date&&p instanceof Date?+m!=+p:m!=p)){if(c>=o)break;g=c,p=m}n[c]=g+1}else{if(c>=o)break;p=_,g=c,n[c]=g+1}}}},o.prototype.parseBounds=function(t,e,i,o,n){var r=this._layout.isBreakMergeOnEmpty(),s=!1,a=t.itemCount;if(!(a<1)){var l=t.fixedCount,u=this._layout.grid,d=!this._callback&&this._exprNode.isIdentifier("value")&&this._layout.getDataColumn().valueType!==h.ValueType.OBJECT,c=_,p=Math.max(0,i),f=p,g=-1;if(this._runtime.setDataSource(t.dataSource),this._runtime.setLayout(this._layout),p>0&&n[p]<=0){var m=t.getItem(p);if(this.$_isRow(m,s)){var y=this.$_getValue(u,m,e,d);for(p--;p>=0&&(m=t.getItem(p),this.$_isRow(m,s))&&(c=this.$_getValue(u,m,e,d),!(p==l||null==c&&r||(c instanceof Date&&y instanceof Date?+c!=+y:c!=y)));)p--;for(var v=f-1;v>p;v--)n[v]=p+2;f-1>p&&(g=p+1)}else{n[p]=p+1;for(v=f-1;v>p;v--)n[v]=p+2;for(f-1>p+1&&(g=p+2),p--;p>=0&&n[p]<=0&&!this.$_isRow(t.getItem(p),s);)n[p]=p+1,p--}}for(p=Math.max(0,i);p<=o&&n[p]>0;)p++;for(;p<=o&&!this.$_isRow(t.getItem(p),s);)n[p]=p+1,p++;if(p=0&&(C=g,g=-1);for(v=f;v=o)break;y=c,f=p}else n[p]=f+1;p++}else{C=f;g>=0&&(C=g,g=-1);for(v=f;v=o)break}if(p==a&&(c instanceof Date&&y instanceof Date?+c==+y:c==y))for(C=g>=0?g:f,v=f;v=this._head&&t.itemIndex<=this._tail},i.$_rooms=new Array,i.$_roomCount=0,i}(g);on.ColumnMergeRoom=m;var y=-1,v=65535,w=function(e){function o(t){var i=e.call(this)||this;return i._flags=null,i._fixedRooms=[],i._rooms=[],i._inited=!1,i._fixedCells=[],i._cells=[],i._nextId=0,i._layout=t,t._merges=i,i}return t.__extends(o,e),o.prototype._doDispose=function(){this._layout=null,this._rooms=this._fixedRooms=null,e.prototype._doDispose.call(this)},_dp(o,"count",{get:function(){return this._rooms.length}}),o.prototype.clear=function(){this._flags=null,this._rooms=[],this._inited=!1},o.prototype.initialize=function(t){if(!this._inited){var e=this._layout.grid,i=e.rowGroup,o=e.itemSource,n=this._layout.firstColumn,r=e.getGroupLevel(n.dataIndex),s=e.isGroupedColumn(n)&&n.mergeGrouped?c.getDefault(r,i.mergeMode):this._layout.$_mergeRuleObj();if(s){for(var a=this._flags=new Array(o.itemCount),l=e.fixedOptions.mergeRows?0:o.fixedCount,h=o.itemCount;h--;)a[h]=0;s._layout=this._layout,s.parseInit(o,n.dataIndex,l,t,a)}this._inited=!0}},o.prototype.refreshRooms=function(t,e,o){if(this._nextId=0,this._inited&&this._flags&&!(e0&&r.mergeGrouped?c.getDefault(u,n.rowGroup.mergeMode):this._layout.$_mergeRuleObj(),p=n.displayOptions.editItemMerging,_=0;if(this._fixedRooms.length=0,this._rooms.length=0,d&&(d._layout=this._layout,d.parseBounds(h,r.dataIndex,t,e,this._flags)),o)for(;_=u){for(var v=y instanceof i.GroupItem?y:y.parent;v.level>u;)v=v.parent;(f=new m(g)).group=v,s.push(f)}_=g.r2+1}else _+=1}}}},o.prototype.getFixedRooms=function(){return this._fixedRooms.slice()},o.prototype.getRooms=function(){return this._rooms.slice()},o.prototype.scroll=function(t){},o.prototype.getRoom=function(t){for(var e=t.rowFixed?this._fixedRooms:this._rooms,i=e.length-1;i>=0;i--)if(e[i].contains(t))return e[i];return null},o.prototype.prepareCells=function(t,e){if(t>0){for(var i=this._fixedCells,o=0;o=0;o--){var n=i[o];this.addFixedCells(n.head,n.tail-n.head+1)}for(o=(i=this.getRooms()).length-1;o>=0;o--){n=i[o];var r=Math.max(0,n.head-e-t),s=n.tail-e-t;this.addCells(r,s-r+1)}},o.prototype.addFixedCells=function(t,e){for(var i=this._fixedCells,o=this._nextId++,n=t+1;ny:this._cells[t-e]>y},o.prototype.isMergeRoot=function(t,e){return ty&&this._fixedCells[t]y&&this._cells[t]=v:this._cells[t-e]>=v},o.prototype.getMerged=function(t,e){var i=1;if(t0){var r=e.grid,a=r.displayOptions,l=e.mergeEdit&&r.editOptions.commitByCell||a.editItemMerging,h=o,u=this._flags[h],d=t.getItem(h);if(u<=0||(0,i.ItemState_isEditing)(d.itemState)&&!l)return null;for(;h&&!(this._flags[h-1]u||p&&!l)return c>h+1||p?s.CellRange.createRange(h,e.layout,c-1,e.layout):null;c++}}return null},o.prototype.$_checkMerge=function(t,e,o,n,a){if(o>=0){var h=e.grid,u=h.displayOptions,d=e.mergeEdit&&h.editOptions.commitByCell&&h.isEditing()&&h.isItemEditing()||u.editItemMerging,c=o,p=this._flags[c],_=t.getItem(c);if(p<=0||(0,i.ItemState_isEditing)(_.itemState)&&!d)return null;if(n)for(;c>a&&!(this._flags[c-1]p||this._flags[g]<=0||m&&!d){if(g>c+1)return s.CellRange.createRange(c,e.layout,g-1,e.layout);var y=e instanceof r.DataColumn?e.groupLevel:-1;return(_=t.getItem(c))instanceof l.MergedGroupHeader&&_.collapsed||_ instanceof l.MergedGroupFooter&&_.parent.level==y&&(g==o+1||_.parent.collapsed)||(_ instanceof l.MergedGroupHeader||_ instanceof l.MergedGroupFooter)&&_.parent.level>y?s.CellRange.createRange(c,e.layout,g-1,e.layout):null}g++}if(g>c){if(g>c+1)return s.CellRange.createRange(c,e.layout,g-1,e.layout);y=e instanceof r.DataColumn?e.groupLevel:-1;return(_=t.getItem(c))instanceof l.MergedGroupHeader&&_.collapsed||_ instanceof l.MergedGroupFooter&&_.parent.level==y&&(g==o+1||_.parent.collapsed)||(_ instanceof l.MergedGroupHeader||_ instanceof l.MergedGroupFooter)&&_.parent.level>y?s.CellRange.createRange(c,e.layout,g-1,e.layout):null}}return null},o.MERGE_ROOMS="mergeRooms",o}(e.Base);return on.ColumnMergeManager=w,on}function rn(){if(en)return qi;en=1,Object.defineProperty(qi,"__esModule",{value:!0}),qi.ColumnLayoutCollection=qi.LiteralColumn=qi.SeriesColumn=qi.DataColumn=qi.ValueColumn=qi.GridColumn=qi.ColumnStyle=qi.ColumnFooterCollection=qi.ColumnFooter=qi.ColumnHeader=qi.ColumnHeaderSummaryCollection=qi.ColumnHeaderSummary=qi.ColumnSummary=qi.ColumnSummaryStyle=qi.ColumnObject=void 0;var t=d,e=G(),i=S(),o=Ki(),n=rt(),r=ft(),s=lt(),a=Qi(),l=io(),h=Y(),u=C(),c=Fo(),p=Ko(),_=Qo(),f=nn(),g=function(e){function o(t){var i=e.call(this,null)||this;return i._column=t,i}return t.__extends(o,e),o.prototype._doDispose=function(){this._column=null,this._template=null,e.prototype._doDispose.call(this)},_dp(o,"column",{get:function(){return this._column}}),_dp(o,"template",{get:function(){return this._template&&this._template.template},set:function(t){t!=this.template&&(t?(this.template||(this._template=new c.HtmlTemplateParser),this._template.template=t):this._template=void 0,this._changed())}}),_dp(o,"templateEvents",{get:function(){return this._templateEvents},set:function(t){this._templateEvents=i.Utils.makeArray(t,!0),this._changed()}}),_dp(o,"values",{get:function(){return this._values},set:function(t){t!==this._values&&(t?i.Utils.extendObj(t,this._values={}):this._values=void 0,this._changed())}}),_dp(o,"popupMenu",{get:function(){return this._popupMenu},set:function(t){t!=this._popupMenu&&(this._popupMenu=t,this._popupMenuName="string"==typeof t?t:null)}}),_dp(o,"popupMenuName",{get:function(){if(this._popupMenuName)return this._popupMenuName;if(this._popupMenu){this._popupMenuName="$$_column_popup_menu"+this.$_hash;var t=this.column.grid;return t&&t.addPopupMenu(this._popupMenuName,this._popupMenu,!0),t&&this._popupMenuName}return null},set:function(t){null!=t&&"string"!=typeof t||(this._popupMenuName=t,this._changed())}}),_dp(o,"text",{get:function(){return this._text},set:function(t){null!=t&&(t=String(t)),t!=this._text&&(this._text=t,this._changed())}}),_dp(o,"styleName",{get:function(){return this._styleName},set:function(t){t!=this._styleName&&(this._styleName=t,this._changed())}}),_dp(o,"exportStyleName",{get:function(){return this._exportStyleName},set:function(t){this._exportStyleName=t}}),o.prototype.getValue=function(t){return this._values&&this._values[t]},o.prototype.setValue=function(t,e){this._values||(this._values={}),this._values[t]!=e&&(this._values[t]=e,this._changed())},o}(l.GridObject);qi.ColumnObject=g;var m=function(){function t(){}return t.prototype.clear=function(){return this.styleName=this.exportStyleName=this.textFormat=this.datetimeFormat=this.numberFormat=this.booleanFormat=this.prefix=this.suffix=this.text=void 0,this},t.prototype.assign=function(t){if("string"==typeof t)this.styleName=t;else if(t)for(var e=0,o=Object.keys(t);e=0&&t0&&this._autoFilters.clear(),this._changed())}}),_dp(n,"filters",{get:function(){return this._filters},set:function(t){t instanceof a.ColumnFilterCollection||this.setFilters(t)}}),_dp(n,"autoFilters",{get:function(){return this._autoFilters}}),_dp(n,"showInlineFilter",{get:function(){return this._showInlineFilter},set:function(t){t!==this._showInlineFilter&&(this._showInlineFilter=t,this._changed())}}),_dp(n,"filterSelectorWidth",{get:function(){return this._filterSelectorWidth},set:function(t){this._filterSelectorWidth=t}}),_dp(n,"required",{get:function(){return this._required},set:function(t){t!=this._required&&(this._required=t,this._changed())}}),_dp(n,"requiredMessage",{get:function(){return this._requiredMessage},set:function(t){t!=this._requiredMessage&&(this._requiredMessage=t,this._changed())}}),_dp(n,"requiredLevel",{get:function(){return this._requiredLevel},set:function(t){t!=this._requiredLevel&&(this._requiredLevel=t,this._changed())}}),_dp(n,"validations",{get:function(){return this._validations},set:function(t){this._validations.assignFrom(t)}}),_dp(n,"groupable",{get:function(){return this._groupable},set:function(t){this._groupable!=t&&(this._groupable=t)}}),_dp(n,"objectKey",{get:function(){return this._objectKey},set:function(t){t!=this._objectKey&&(this._objectKey=t,this._changed())}}),_dp(n,"objectCallback",{get:function(){return this._objectCallback},set:function(t){this._objectCallback=t,this._changed()}}),_dp(n,"displayText",{get:function(){return this.header.text||this.fieldName||this.name||"col_"+this.index}}),_dp(n,"lookupData",{get:function(){return this._lookupData},set:function(t){if(t!==this._lookupData){var e=void 0,o=void 0,n=void 0,r=void 0,s={};if(this._lookupData=i.Utils.deepCopy(t),t){i.Utils.isArray(t)?s.list=t:s=t,this._labels=[],this._values=[],this._lookupMap=null,this._listItem=[],e=s.hasOwnProperty("value")?s.value:"value",o=s.hasOwnProperty("label")?s.label:"label";for(var a=0,l=s.list.length;a=0){var e=this.grid.dataSource;if(e)return e.getField(t)}return null},n.prototype.getLookupLabel=function(t,e){if(null!=t){var i,o=this._lookupMap;if(!o){var n=this._values,r=this._labels||[];if(n&&n.length>0){o=this._lookupMap={};for(var s=0;s0)for(var e=0,i=this._values.length;e0)for(var o=i.Utils.isArray(t)?t:String(t).split(this._valueSeparator),n=0,r=o.length;n=0&&e.push(this._values.indexOf(o[n]));return e},n.prototype.getLookupValue=function(t){if(this._values&&this._values.length>0)return this._values[t]},n.prototype.getLookupValues=function(t){var e=[];if(this._values&&this._values.length>0)for(var i=0,o=t.length;i=0&&t[i]=0&&e.length>o)return e[o];if((o=e.indexOf(t))>=0)return e[o]}},n.prototype.getSourceValues=function(t){var e=this._values,o=this._labels;if(o&&e){for(var n=void 0,r=[],s=this._valueSeparator,a=0,l=(t=i.Utils.isArray(t)?t:s&&t?String(t).split(s):i.Utils.makeArray(t)).length;a=0&&e.length>n?r.push(e[n]):r.push(t[a]);if(r.length>0&&s)return r.join(s);if(r.length>0)return r.join()}},_dp(n,"$_filters",{get:function(){return this._autoFilter?this._autoFilters:this._filters}}),n.prototype.clearFilters=function(){this.setFilters(null)},n.prototype.addFilters=function(t,e){if(t){var o=this.grid;o&&!o.canFiltering()||this._filters.addAll(i.Utils.makeArray(t),e)}},n.prototype.removeFilters=function(t){if(t){var e=this.grid;e&&!e.canFiltering()||this._filters.removeItems(i.Utils.makeArray(t))}},n.prototype.activateFilters=function(t,e){if(t){var o=this.grid;o&&!o.canFiltering()||this.$_filters.activateItems(i.Utils.makeArray(t),e)}},n.prototype.activateAllFilters=function(t,e){void 0===e&&(e=!0);var i=this.grid;i&&!i.canFiltering()||this.$_filters.activateAll(t,e)},n.prototype.hideColumnFilters=function(t,e){this.$_filters.hideFilters(i.Utils.makeArray(t),e)},n.prototype.hideAllColumnFilters=function(t){this.$_filters.hideAllFilters(t)},n.prototype.toggleFilters=function(t){if(t){var e=this.grid;e&&!e.canFiltering()||this.$_filters.toggleItems(i.Utils.makeArray(t))}},n.prototype.toggleAllFilters=function(){var t=this.grid;t&&!t.canFiltering()||this.$_filters.toggleAll()},n.prototype.getFilter=function(t){var e=this.$_filters,i=e.indexOf(t);return e.getItem(i)},n.prototype.getActiveFilters=function(t){return this.$_filters.getActiveItems(t)},_dp(n,"hasFilters",{get:function(){return this._autoFilter||this._filters.count>0}}),n.prototype.isFiltered=function(){return this.grid.itemSource.isFiltered(this.dataIndex)},n.prototype.setFilters=function(t){var e=this.grid;e&&!e.canFiltering()||this._filters.assignFrom(t)},n.prototype.autoFilterRefresh=function(t){var e=this.grid,i=null==e?void 0:e.dataSource;if(e&&i&&this._autoFilter){var o=e.filterSelector._manager;o&&o.buildItems(this,i,!0,t)}},n.prototype.setInlineFilter=function(t,e){var i=this._inlineFilters,o=i.getItem(0);o||(i.add({name:"inlineFilter"},!1),o=i.getItem(0)),o.criteria!=t&&(void 0===t?(o.criteria=void 0,e?o.active=!1:o._active=!1):(o._active=!1,o.criteria=t,o.active=!!o.criteria))},n.prototype.onColumnFilterChanged=function(t,e,i,o){var n=this.grid;n&&(o?this._changed():n.columnFilterChanged(t,e,i))},n.prototype._prepareLayout=function(t,i){e.prototype._prepareLayout.call(this,t,i)},n.prototype._resetIndices=function(t){this._dataIndex=-1,this._baseIndex=-1;var e=t.dataSource;e&&(this._fieldName?this._dataIndex=e.getFieldIndex(this._fieldName):this._dataIndex=this._fieldIndex,this._dataIndex>=0&&(this._baseIndex=e.getBaseField(this._dataIndex),this._valueType=e.getValueType(this._dataIndex)),this._labelFieldIndex=e.getFieldIndex(this._labelField),this.$_resetLookup(t))},n.prototype.isWritable=function(){var t=this.grid.editOptions;return(t.columnEditableFirst?null!=this._editable?this._editable:t.editable:t.editable&&!1!==this._editable)&&!this._readOnly},n.prototype.assignFrom=function(t){e.prototype.assignFrom.call(this,t)},n.prototype.$_setMergeGrouped=function(t){this._mergeGrouped=t},n.prototype.$_setGroupLevel=function(t){this._groupLevel=t},n.prototype.$_resetLookup=function(t){if(this._lookupKeyFields&&this._lookupKeyFields.length>0&&this._lookupSourceId){for(var e=this._lookupKeyFields.length,i=this._lookupKeyFieldIds=new Array(e),o=0;o1){var s=e.getFieldIndex(r[0]),a=e.getFieldIndex(r[1]);if(s>=0&&a>=0)for(var l=Math.min(s,a),h=Math.max(s,a),u=l;u<=h;u++)this._fields.push(u)}else{(u=e.getFieldIndex(n))>=0&&this._fields.push(u)}}},i}(D);qi.SeriesColumn=M;var O=function(e){function i(t){var i=e.call(this)||this;return t&&i.assignFrom(t),i}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(i,"value",{get:function(){return this._value},set:function(t){this._value=t,this._changed()}}),_dp(i,"cellProtectProps",{get:function(){return this._cellProtectProps},set:function(t){this._cellProtectProps=t}}),i}(D);qi.LiteralColumn=O;var F=function(){function t(){this._layouts={}}return t.prototype._doDispose=function(){this._layouts=null},t.prototype.find=function(t){return this._layouts[t]},t.prototype.clear=function(){this._layouts={}},t.prototype.load=function(t){if(t=i.Utils.makeArray(t),this._layouts={},t)for(var e=0,o=t.length;e1)return;this._cellWidth=t}}},o.prototype._setFitWidth=function(t,e,i){this._fitWidth=t},o.prototype._clearFitWidth=function(){this._fitWidth=NaN},o.prototype._changed=function(){this._parent&&this._parent._changed()},o.prototype.$_setMerged=function(t){this._merged=t},o.prototype._propChanged=function(t,e,i){var o=this.grid;o&&o._fireLayoutPropertyChanged(this,t,e,i)},o}(o.Base);t.CellLayoutItem=c;var p=function(t){function i(e,i){var o=t.call(this)||this;return o._type=l.CellLayoutType.PROXY,o._source=e,o._index=i,o}return e.__extends(i,t),i.prototype._doDispose=function(){this._source=null,t.prototype._doDispose.call(this)},_dp(i,"cellWidth",{get:function(){return this._cellWidth},set:function(t){}}),_dp(i,"isNull",{get:function(){return!0}}),_dp(i,"isProxy",{get:function(){return!0}}),_dp(i,"source",{get:function(){return this._source}}),_dp(i,"visible",{get:function(){return this._source.visible}}),i.prototype.$_isVisible=function(t){return this._source.$_isVisible(t)},_dp(i,"cols",{get:function(){return this._source.cols}}),_dp(i,"headerRows",{get:function(){return this._source.headerRows}}),_dp(i,"rows",{get:function(){return this._source.rows}}),_dp(i,"root",{get:function(){return this._source.root}}),_dp(i,"displayText",{get:function(){return null}}),_dp(i,"first",{get:function(){return this}}),_dp(i,"last",{get:function(){return this}}),_dp(i,"firstColumn",{get:function(){return this._source.firstColumn}}),_dp(i,"lastColumn",{get:function(){return this._source.lastColumn}}),_dp(i,"boundColumn",{get:function(){return this._source.boundColumn}}),i.prototype.load=function(t){},i.prototype._isResizable=function(){return!1},i.prototype._isMovable=function(){return!1},i.prototype.clearMergeGrouped=function(){},i.prototype.containLayout=function(t){return!1},i}(c);t.ProxyCellLayoutItem=p;var _,f=function(t){function o(e){var i=t.call(this)||this;return i._cellSpan=1,i._cellWidths=[],i._cols=1,i._rows=1,i._blanked=!1,i._type=l.CellLayoutType.COLUMN,i._column=e,i._columnObj=e instanceof r.ValueColumn?e:null,i}return e.__extends(o,t),o.prototype._doDispose=function(){this._column=this._columnObj=null,this._merges=this._merges&&this._merges.dispose(),this._mergeRuleObj=this._mergeRuleObj&&this._mergeRuleObj.dispose(),this._equalBlankNode=null,t.prototype._doDispose.call(this)},_dp(o,"column",{get:function(){return this._column}}),_dp(o,"cellWidth",{get:function(){if(this.owner.isShowing(this)){var t=this.owner.getCellWidths(this._col,this._defColSpan);return isNaN(t)&&(t=this.width),t||this._cellWidth}return this._cellWidths&&this._cellWidths.reduce((function(t,e){return t+e}),0)||this._cellWidth},set:function(t){if(!this.owner._loading){var e=!!this.grid&&this.grid.layoutManager.isColumnFitted;t=Math.max(this.grid.displayOptions.minCellWidth,t),this.changeCellWidth(t,e,!0)}}}),_dp(o,"merges",{get:function(){return this._merges}}),_dp(o,"mergeRule",{get:function(){return this._mergeRule},set:function(t){if(t!==this._mergeRule){this._mergeRule=t,this._mergeRuleObj&&this._mergeRuleObj.dispose(),this._mergeRuleObj=t?s.ColumnMergeRule.createRule(t):void 0===t?void 0:null;var e=this.grid;e&&e._columnMergeRuleChanged(this)}}}),_dp(o,"breakMergeOnEmpty",{get:function(){return this._breakMergeOnEmpty},set:function(t){if(t!==this._breakMergeOnEmpty){this._breakMergeOnEmpty=t;var e=this.grid;e&&e._columnMergeRuleChanged(this)}}}),o.prototype.isBreakMergeOnEmpty=function(){return void 0===this._breakMergeOnEmpty?this._columnObj instanceof r.DataColumn&&this._columnObj.breakMergeOnEmpty:this._breakMergeOnEmpty},_dp(o,"equalBlank",{get:function(){return this._equalBlank},set:function(t){t!==this._equalBlank&&(this._equalBlank=t,this._changed())}}),_dp(o,"equalBlankNode",{get:function(){return this._blankNodeRun}}),_dp(o,"blanked",{get:function(){return this._blanked}}),_dp(o,"equalBlankExpression",{get:function(){return this._equalBlankExpression},set:function(t){t!==this._equalBlankExpression&&(this._equalBlankExpression=t,this._equalBlankNode=t?a.ExpressionParser.Default.parse(t,null):void 0===t?void 0:null,this._changed())}}),_dp(o,"cellSpan",{get:function(){return this._cellSpan},set:function(t){(t=Math.max(1,t))!=this._cellSpan&&(this._cellSpan=t,this._changed())}}),_dp(o,"headerSpan",{get:function(){return this._headerSpan},set:function(t){t!=this._headerSpan&&(void 0!==t&&(t=Math.max(1,t)),this._headerSpan=t,this._changed())}}),_dp(o,"summarySpan",{get:function(){return this._summarySpans?this._summarySpans[0]:void 0},set:function(t){this._summarySpans=this._summarySpans||[],t!=this._summarySpans[0]&&(void 0!==t&&(t=Math.max(1,t)),this._summarySpans[0]=t,this._changed())}}),_dp(o,"summarySpans",{get:function(){return this._summarySpans&&this._summarySpans.slice()},set:function(t){t!==this._summarySpans&&(this._summarySpans=t&&t.slice(),this._changed())}}),_dp(o,"footerSpan",{get:function(){return this._footerSpans&&this._footerSpans[0]},set:function(t){this._footerSpans=this._footerSpans||[],t!=this._footerSpans[0]&&(void 0!==t&&(t=Math.max(1,t)),this._footerSpans[0]=t,this._changed())}}),_dp(o,"footerSpans",{get:function(){return this._footerSpans&&this._footerSpans.slice()},set:function(t){t!==this._footerSpans&&(this._footerSpans=t&&t.slice(),this._changed())}}),_dp(o,"dataSpan",{get:function(){return this._dataSpan},set:function(t){t!=this._dataSpan&&(void 0!==t&&(t=Math.max(1,t)),this._dataSpan=t,this._changed())}}),_dp(o,"groupFooterSpan",{get:function(){return this._groupFooterSpans&&this._groupFooterSpans[0]},set:function(t){this._groupFooterSpans=this._groupFooterSpans||[],t!=this._groupFooterSpans[0]&&(void 0!==t&&(t=Math.max(1,t)),this._groupFooterSpans[0]=t,this._changed())}}),_dp(o,"groupFooterSpans",{get:function(){return this._groupFooterSpans&&this._groupFooterSpans.slice()},set:function(t){t!==this._groupFooterSpans&&(this._groupFooterSpans=t&&t.slice(),this._changed())}}),_dp(o,"spanCallback",{get:function(){return this._spanCallback},set:function(t){t!=this._spanCallback&&(this._spanCallback=t,this._changed())}}),_dp(o,"summarySpanCallback",{get:function(){return this._summarySpanCallback},set:function(t){t!=this._summarySpanCallback&&(this._summarySpanCallback=t,this._changed())}}),_dp(o,"footerSpanCallback",{get:function(){return this._footerSpanCallback},set:function(t){t!=this._footerSpanCallback&&(this._footerSpanCallback=t,this._changed())}}),_dp(o,"groupFooterSpanCallback",{get:function(){return this._groupFooterSpanCallback},set:function(t){t!=this._groupFooterSpanCallback&&(this._groupFooterSpanCallback=t,this._changed())}}),_dp(o,"footerUserSpans",{get:function(){return this._footerUserSpans},set:function(t){this._footerUserSpans=i.Utils.makeArray(t,!0).slice(),this._changed()}}),_dp(o,"summaryUserSpans",{get:function(){return this._summaryUserSpans},set:function(t){this._summaryUserSpans=i.Utils.makeArray(t,!0).slice(),this._changed()}}),_dp(o,"groupFooterUserSpans",{get:function(){return this._groupFooterUserSpans},set:function(t){this._groupFooterUserSpans=i.Utils.makeArray(t,!0).slice(),this._changed()}}),_dp(o,"groupFooterUserSpanCallback",{get:function(){return this._groupFooterUserSpanCallback},set:function(t){t!=this._groupFooterUserSpanCallback&&(this._groupFooterUserSpanCallback=t,this._changed())}}),o.prototype.canMerge=function(){if(null!=this._mergeRuleObj)return!0;var t=this._columnObj;if(t instanceof r.DataColumn){if(t.mergeGrouped)return!0;if(t._mergeCallback)return!0;if(void 0===this._mergeRuleObj)return null!=t._mergeRuleObj}},_dp(o,"isNull",{get:function(){return!this._columnObj}}),_dp(o,"cols",{get:function(){return this._cols}}),_dp(o,"headerRows",{get:function(){return 1}}),_dp(o,"rows",{get:function(){return this._rows},set:function(t){this._rows=t}}),_dp(o,"first",{get:function(){return this}}),_dp(o,"last",{get:function(){return this}}),_dp(o,"firstColumn",{get:function(){return this._columnObj}}),_dp(o,"lastColumn",{get:function(){if(this._columnObj)return this._columnObj;for(var t=this.parent.visibles,e=t.indexOf(this);e-- >0;){var i=t[e];if(i instanceof o&&i.lastColumn)return i.lastColumn}return null}}),_dp(o,"boundColumn",{get:function(){return this._columnObj}}),_dp(o,"displayText",{get:function(){return this._header&&this._header.text||this._columnObj&&this._columnObj.displayText||this.toString()}}),o.prototype.getHeaderSpan=function(){return void 0===this._headerSpan?this._cellSpan:this._headerSpan},o.prototype.getSummarySpan=function(t){var e,i=this._summarySpanCallback,o=this._summarySpans;return i?void 0===(e=i(this.grid.handler,this,t))&&o&&o.length>t&&(e=o[t]):o&&o.length>t&&(e=o[t]),void 0===e?this._cellSpan:e},o.prototype.getFooterSpan=function(t){var e,i=this._footerSpanCallback,o=this._footerSpans;return i?void 0===(e=i(this.grid.handler,this,t))&&o&&o.length>t&&(e=o[t]):o&&o.length>t&&(e=o[t]),void 0===e?this._cellSpan:e},o.prototype.getFooterUserSpan=function(t){return this._footerUserSpans&&this._footerUserSpans[t]},o.prototype.getSummaryUserSpan=function(t){return this._summaryUserSpans&&this._summaryUserSpans[t]},o.prototype.getGroupFooterUserSpan=function(t,e){var i,o=this._groupFooterUserSpanCallback;return o&&(i=o(this.grid.handler,this,t,t.index,e)),i||this._groupFooterUserSpans&&this._groupFooterUserSpans[e]},o.prototype.getGroupFooterSpan=function(t,e){var i,o=this._groupFooterSpanCallback,n=this._groupFooterSpans;return o?void 0===(i=o(this.grid.handler,this,t,e))&&n&&n.length>e&&(i=n[e]):n&&n.length>e&&(i=n[e]),void 0===i?this._cellSpan:i},o.prototype.getDataSpan=function(){return void 0===this._dataSpan?this._cellSpan:this._dataSpan},o.prototype.getDataColumn=function(){return this._columnObj},o.prototype._createHeader=function(){return new g(this)},o.prototype._isResizable=function(){return!this._columnObj||this._columnObj.resizable},o.prototype._isMovable=function(){for(var t=!0,e=this.parent;e;)t=t&&e.childColumnMovable,e=e.parent;return t&&(!this._columnObj||this._columnObj.movable)},o.prototype.isColumn=function(t){return this._columnObj===t},o.prototype.findLayout=function(t){return t&&this._columnObj===t?this:null},o.prototype.load=function(e){if(this.assignFrom(e),t.prototype.load.call(this,e),!this._columnObj&&"string"==typeof this._column){var i=this.owner&&this.owner.grid;this._columnObj=i?i.columnByName(this._column):null}},o.prototype.cleanColumns=function(){this._columnObj&&this._columnObj.clean()},o.prototype.$_isVisible=function(t){return t?this._visible:this._visible&&(!this._columnObj||this._columnObj.visible)},o.prototype._getWidth=function(t){return isNaN(t)?this._columnObj?this._columnObj.width:NaN:t},o.prototype._getFillWidth=function(t){return isNaN(t)?this._columnObj?this._columnObj.fillWidth:NaN:t},o.prototype._prepareLayout=function(e,i,o){if(t.prototype._prepareLayout.call(this,e,i,o),this._columnObj){this._columnObj._prepareLayout(e,this);var n=this.parent.direction===_.VERTICAL?this.cellSpan+this._dspan-1:this._dspan;(this._blanked=n===this.owner.dataRows)&&(this._blankNodeRun=this._equalBlankNode,this._blanked=this._equalBlank||null!=this._blankNodeRun,this._blanked||(void 0===this._equalBlankNode&&(this._blanked=null!=(this._blankNodeRun=this._columnObj._equalBlankNode)),this._blanked||void 0!==this._equalBlank||(this._blanked=this._columnObj._equalBlank)))}},o.prototype.toString=function(){return"string"==typeof this._column?this._column:t.prototype.toString.call(this)},o.prototype.clearMergeGrouped=function(){this.firstColumn instanceof r.DataColumn&&this.firstColumn.$_setMergeGrouped(!1)},o.prototype.areEqualColumn=function(t){var e=this.boundColumn,i=t&&t.boundColumn;return t&&this.grid===t.grid&&e&&i&&e.name===i.name},o.prototype.containLayout=function(t){return t.source===this},o.prototype.$_bindColumn=function(t,e,i){if(void 0===i&&(i=!1),this._columnObj||(this._columnObj=e.columnByName(this._column)),!this._columnObj)throw new Error("not exists column ".concat(this._column));var o=this._columnObj.$_hash;if(t[o])throw new Error("Column is already contained in layouts: "+(this._columnObj.name||this._columnObj.displayText));i||(this._columnObj._layout=this),!i&&(this._columnObj._layout=this),t[o]=this},o.prototype.$_mergeRuleObj=function(){return this._mergeRuleObj?this._mergeRuleObj:void 0===this._mergeRuleObj&&this._columnObj instanceof r.DataColumn?this._columnObj._mergeRuleObj:null},o}(c);t.CellLayoutColumnItem=f,function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(_=t.ColumnLayoutDirection||(t.ColumnLayoutDirection={}));var g=function(t){function i(e){var i=t.call(this)||this;return i._layout=e,i}return e.__extends(i,t),i.prototype._doDispose=function(){this._layout=null,t.prototype._doDispose.call(this)},_dp(i,"layout",{get:function(){return this._layout}}),_dp(i,"text",{get:function(){return this._text},set:function(t){t!=this._text&&(this._text=t,this._changed())}}),_dp(i,"styleName",{get:function(){return this.layout.firstColumn.header.styleName},set:function(t){this.layout.firstColumn.header.styleName=t}}),_dp(i,"exportStyleName",{get:function(){return this.layout.firstColumn.header.exportStyleName},set:function(t){this.layout.firstColumn.header.exportStyleName=t}}),_dp(i,"rows",{get:function(){return 1}}),i.prototype.isVisible=function(){return!0},i.prototype.getDisplayText=function(){return this._text},i.prototype.doAssignSimple=function(t){return"string"==typeof t&&(this.text=t,!0)},i.prototype._changed=function(){this._layout&&this._layout._headerChanged()},i}(o.Base);t.CellLayoutHeader=g;var m=function(t){function o(e){var i=t.call(this,e)||this;return i._visible=!0,i._showTooltip=void 0,i._tooltipEllipsisOnly=void 0,i}return e.__extends(o,t),_dp(o,"visible",{get:function(){return this._visible},set:function(t){if(t!=this._visible){var e=this._layout;if(e&&e.isRoot&&!t&&(e.hideChildHeaders||1===e.headerRows))throw new Error("Group header cannot be hidden when all child headers are already hidden.");this._visible=t,this._changed()}}}),_dp(o,"template",{get:function(){return this._template&&this._template.template},set:function(t){t!=this.template&&(t?(this.template||(this._template=new h.HtmlTemplateParser),this._template.template=t):this._template=void 0,this._changed())}}),_dp(o,"templateEvents",{get:function(){return this._templateEvents},set:function(t){this._templateEvents=i.Utils.makeArray(t,!0),this._changed()}}),_dp(o,"values",{get:function(){return this._values},set:function(t){t!==this._values&&(t?i.Utils.extendObj(t,this._values={}):this._values=void 0,this._changed())}}),_dp(o,"showTooltip",{get:function(){return this._showTooltip},set:function(t){t!==this._showTooltip&&(this._showTooltip=t,this._changed())}}),_dp(o,"tooltipEllipsisOnly",{get:function(){return this._tooltipEllipsisOnly},set:function(t){t!==this._tooltipEllipsisOnly&&(this._tooltipEllipsisOnly=t,this._changed())}}),_dp(o,"tooltip",{get:function(){return this._tooltip},set:function(t){t!==this._tooltip&&(this._tooltip=t,this._changed())}}),_dp(o,"edgeMark",{get:function(){return this._edgeMark},set:function(t){t!==this._edgeMark&&(this._edgeMark=t,this._changed())}}),_dp(o,"styleName",{get:function(){return this._styleName},set:function(t){t!==this._styleName&&(this._styleName=t,this._changed())}}),_dp(o,"exportStyleName",{get:function(){return this._exportStyleName},set:function(t){this._exportStyleName=t}}),_dp(o,"rows",{get:function(){return Math.max(1,this._rows||1)},set:function(t){t!==this._rows&&(this._rows=t,this._changed())}}),_dp(o,"templateCallback",{get:function(){return this._templateCallback},set:function(t){this._templateCallback=t,this._changed()}}),o.prototype.realizeTemplate=function(){var t=this._template;return t?t.realizeHeader(this,this._templateCallback,this._layout.grid):void 0},o.prototype.getValue=function(t){return this._values&&this._values[t]},o.prototype.doAssignSimple=function(e){return!t.prototype.doAssignSimple.call(this,e)&&"boolean"==typeof e&&(this.visible=e,!0)},o.prototype.isVisible=function(){return this._visible},o.prototype.getDisplayText=function(){var t=this.layout;return t.hideChildHeaders&&t.tiedColumn?t.tiedColumn.displayText:this.text||this.layout.name},_dp(o,"displayText",{get:function(){return this.getDisplayText()}}),o}(g);t.CellLayoutGroupHeader=m;var y=function(t){function o(e,i){var o=t.call(this)||this;return o._direction=_.HORIZONTAL,o._items=[],o._resizable=!0,o._movable=!0,o._hideChildHeaders=!1,o._childColumnMovable=!0,o._visibles=[],o._cols=0,o._rows=0,o._headerRows=0,o._expandedLayouts=[],o._collapsedLayouts=[],o._type=l.CellLayoutType.GROUP,o._name=e,o._direction=i==_.VERTICAL?_.VERTICAL:_.HORIZONTAL,o}return e.__extends(o,t),o.getNext=function(t){var e=t&&t.parent;return e?((t=e.nextOf(t))||(t=o.getNext(e)),t):null},o.getPrev=function(t){var e=t&&t.parent;return e?((t=e.prevOf(t))||(t=o.getPrev(e)),t):null},o.isTop=function(t){for(var e=t&&t.parent;e;){if(e.vertical&&e.visibleCount>1&&t.vindex>0)return!1;e=(t=e).parent}return!0},o.isBottom=function(t){for(var e=t&&t.parent;e;){if(e.vertical&&e.visibleCount>1&&t.vindex1&&t.vindex>0)return!1;e=(t=e).parent}return!0},o.isRight=function(t){return o.isBottom(t)},o.prototype._doDispose=function(){this._items.forEach((function(t){t&&t.dispose()})),this._visibles=this._items=null,t.prototype._doDispose.call(this)},_dp(o,"name",{get:function(){return this._name}}),_dp(o,"direction",{get:function(){return this._direction},set:function(t){t!=_.VERTICAL&&(t=_.HORIZONTAL),t!=this._direction&&(this._direction=t,this._changed())}}),_dp(o,"vertical",{get:function(){return this._direction==_.VERTICAL}}),_dp(o,"horizontal",{get:function(){return this._direction!=_.VERTICAL}}),_dp(o,"resizable",{get:function(){return this._resizable},set:function(t){this._resizable=t}}),_dp(o,"movable",{get:function(){return this._movable},set:function(t){this._movable=t}}),_dp(o,"hideChildHeaders",{get:function(){return this._hideChildHeaders},set:function(t){if(t!=this._hideChildHeaders){if(t&&this.isRoot&&!this.header.visible)throw new Error("cannot hide child headers when the group header is not visible.");this._hideChildHeaders=t,this._changed()}}}),_dp(o,"childColumnMovable",{get:function(){return this._childColumnMovable},set:function(t){this._childColumnMovable=t}}),_dp(o,"count",{get:function(){return this._items.length}}),_dp(o,"items",{get:function(){return this._items.slice()},set:function(t){this._items=t?t.slice():[];for(var e=0,i=this._items;e0},_dp(o,"expandable",{get:function(){return this._expandable},set:function(t){t!=this._expandable&&(this._expandable=t,this._changed())}}),_dp(o,"expanded",{get:function(){return this._expanded},set:function(t){t!=this._expanded&&this.owner.expandLayout(this,t)}}),_dp(o,"tiedColumn",{get:function(){if(this._tiedColumn instanceof r.DataColumn)return this._tiedColumn},set:function(t){"string"==typeof t?this._tiedColumn=this.grid.columnByName(t):t instanceof r.DataColumn?this._tiedColumn=t:this._tiedColumn=null,this._changed()}}),_dp(o,"header",{get:function(){return this._header}}),o.prototype.indexOf=function(t){return this._items.indexOf(t)},o.prototype.getItem=function(t){return this._items[t]},o.prototype.getVisible=function(t){return this._visibles[t]},o.prototype.addLayout=function(t,e){if(!this.owner.isDefault()){var i,n,s,a=this.grid,h=this.owner;if(a&&a._checkEditing(),"string"==typeof t?s=h.layoutByName(t):t instanceof r.ValueColumn?s=h.layoutByColumn(t):t&&"string"==typeof t.column&&(s=h.layoutByName(t.column)),s)throw new Error("addLayout fail - Column or Group is already contained in layouts: "+s.firstColumn.name);if("string"==typeof t||t instanceof r.ValueColumn)i="string"==typeof t&&u(a,t),n=new f(t);else if(t)if("string"==typeof t.column)i=u(a,t.column),n=new f(t.column);else if((t.type===l.CellLayoutType.GROUP||t.items)&&t.name){if(h.layoutByName(t.name))throw new Error("addLayout fail - group is already contained in layouts: "+t.name);n=new o(t.name,t.direction)}return n?("object"==typeof t&&n.load(t),this.addItem(n,e),(n instanceof f&&i||n instanceof o&&n._items.length)&&this.owner._root&&this.owner._root.resetColumns(a._columns),n):void 0}function u(t,e){var i=t.columnByName(e);if(!i)throw new Error("not exists column ".concat(e));return i}},o.prototype.removeLayout=function(t){if(!this.owner.isDefault()){var e=this.grid;return e&&e._checkEditing(),"string"==typeof t?t=this.layoutByName(t):t instanceof r.ValueColumn&&(t=t.layout),t instanceof c?(t.parent.removeItem(t,!0,!0),t):void 0}},o.prototype.addItem=function(t,e){void 0===e&&(e=this._items.length),null!=t&&e>=0&&e<=this._items.length&&(this._items.splice(e,0,t),t._parent=this,this._changed())},o.prototype.clear=function(t){void 0===t&&(t=!0);for(var e=0,i=this._items;e=0){if(t instanceof f&&t.cellSpan>1)for(var n=t.cellSpan-1;n--;){var r=this._items.splice(o+n,1)[0];r&&(r._detach(),e&&r.dispose())}this._items.splice(o,1),i&&(o=this._visibles.indexOf(t))>=0&&this._visibles.splice(o,1),t._detach(),e&&t.dispose(),this._changed()}},o.prototype.layoutByName=function(t){if(t)for(var e=0,i=this._items;e=0)return!0;for(var e=0,i=this._items;e0)return t=w(this,e-1)}catch(t){i.Utils.log("prevOf fail")}return null},o.prototype.isExpandable=function(){return this.expandable&&this._expandedLayouts.length>0&&this._collapsedLayouts.length>0},o.prototype.expandAll=function(t,e){this.expandable&&(this.expanded=t),this._items.forEach((function(i){i instanceof o&&i.expandAll(t,e)}))},o.prototype._clearFitWidth=function(){t.prototype._clearFitWidth.call(this);for(var e=0,i=this._visibles;e0?this._visibles[0].first:this}}),_dp(o,"last",{get:function(){var t=this._visibles?this._visibles.length:0;return t>0?this._visibles[t-1].last:this}}),_dp(o,"firstColumn",{get:function(){return this._visibles&&this._visibles.length>0?this._visibles[0].firstColumn:null}}),_dp(o,"lastColumn",{get:function(){for(var t=this._visibles?this._visibles.length-1:-1;t>=0;t--){var e=this._visibles[t].lastColumn;if(e)return e}return null}}),_dp(o,"boundColumn",{get:function(){return this.tiedColumn}}),_dp(o,"displayText",{get:function(){return this._header&&this._header.getDisplayText()||this._name}}),o.prototype._createHeader=function(){return new m(this)},o.prototype.load=function(e){this.clear(),void 0!==e.hideChildHeaders&&(this.hideChildHeaders=e.hideChildHeaders),this.expandable=e.expandable,this._expanded=null==e.expanded||e.expanded,void 0!==e.resizable&&(this.resizable=e.resizable),void 0!==e.childColumnMovable&&(this.childColumnMovable=e.childColumnMovable),void 0!==e.movable&&(this.movable=e.movable),e.tiedColumn&&(this.tiedColumn=e.tiedColumn),null==e.rows||isNaN(e.rows)||(this._rows=e.rows),e.items&&this._loadItems(e.items),t.prototype.load.call(this,e)},o.prototype.findLayout=function(t){for(var e=0,i=this._items;e0?s+=v.fillWidth:v.cellWidth,r.push(v)}if(s>0)break}var h=e-(i=r.map((function(t){return t._cellWidth}))).reduce((function(t,e){return t+e}),0);if(s>0&&o===u.GridFitStyle.FILL)for(var d=0;d0){for(var c=Math.round(h*v.fillWidth/s),_=0,g=0,m=0,y=v._defColSpan;m0&&(t[e][i]=h),h.$_parseHeaderCells(t,e+u,i),u>0){for(var d=0;d=l;_--){var g=t[a+u][_];if(null!=g){g=c.getSource(g);for(var m=_+1;m<=h;m++){var y=t[a+u][m]=new p(g,m-l);s?(y._hrow=a+u,y._hcol=m):(y._row=a+u,y._col=m,y._parent=g.group,g.row===y.row&&(g._cspan++,g instanceof f&&g._clen++))}break}}},o.prototype.$_fillVert=function(t,e,i,o,n,r,s){for(var a=o+r,l=o+e-1,h=n+i-1,u=n;u<=h;u++)for(var d=l;d>=a;d--){var _=t[d][u];if(null!=_){_=c.getSource(_);for(var g=d+1;g<=l;g++){var m=t[g][u]=new p(_,g-a);s?(m._hrow=g,m._hcol=u,_.hcol===m.hcol&&(_._hspan++,_ instanceof f&&_._hlen++)):(m._row=g,m._col=u,_.col===m.col&&(_._dspan++,_ instanceof f&&_._dlen++),m._parent=_.group)}break}}},o.prototype.$_adjustHeaderCells=function(t){var e=this._header.isVisible()?this._header.rows:0;if(e&&this._hideChildHeaders){this._hspan=this._hlen;for(var i=0,n=0;n1)for(var y=0,v=this.visibles;y=0:this._collapsedLayouts.indexOf(a)>=0),l&&(this._visibles.push(a),a._vindex=i++)}if(!t&&n.length!=this._visibles.length&&this.direction===_.HORIZONTAL)for(var h=this;h;)h._cellWidth=NaN,h.width=NaN,h=h.parent;this.$_calcSpans()},o.prototype.$_collectCellWidths=function(t){for(var e=[],i=0,n=this._visibles;i0&&!d.ignoreCalcWidth)&&(e[u]+=d._cellWidth,o[u]++)}for(n=0;n=0&&e=0&&e=0;i--){var o=t.getVisible(i);if(o instanceof f)return o;if(o instanceof y&&(o=c.getSource(o.last))instanceof f)return o}return null},x=function(t,e,i){for(var o=i?t.visibleCount:t.count,n=0;n0&&(this.$_bindColumns({},t,!1),this.$_resetVisibles(!1))},_dp(i,"grid",{get:function(){return this._owner.grid}}),_dp(i,"owner",{get:function(){return this._owner}}),_dp(i,"root",{get:function(){return this}}),i.prototype._changed=function(){this._owner&&this._owner._changed()},i.prototype._childIndexChanged=function(t){this._owner._itemIndexChanged(t)},i.prototype._childWidthChanged=function(t){this._owner._itemWidthChanged(t)},i.prototype._childFillWidthChanged=function(t){this._owner._itemFillWidthChanged(t)},i.prototype._setColumns=function(t){var e=this._items;e.length=0;for(var i=0,o=t.count;i=0;r--){var s=n[r].layout.col;(so)&&n.splice(r,1)}return n},i.prototype.getHorzColumns=function(t,e){void 0===t&&(t=0);var i=null==e?t+this._root.visibleCount-1:t+e-1,o=[];return this._root.$_collectHorzColumns(o,t,i),o},i.prototype.getHomeOf=function(t){return t=c.getSource(t),t=this._dataCells[t?t.row:0][0],c.getSource(t)},i.prototype.getEndOf=function(t){t=c.getSource(t);var e=this._dataCells,i=t?t.row:e.length-1;return t=e[i][e[i].length-1],c.getSource(t)},i.prototype.getTopOf=function(t){return t=this._dataCells[0][t.col],c.getSource(t)},i.prototype.getBottomOf=function(t,e){var i=this._dataCells;return t=i[i.length-1][t.col],e?t:c.getSource(t)},i.prototype.getLowerOf=function(t){t=c.getSource(t);var e=this._dataCells,i=t.row,o=t.col,n=0;return i+t.rows0?t=e[i-1][o]:(n=-1,t=e[e.length-1][o]),{dy:n,layout:c.getSource(t)}},i.prototype.getRightOf=function(t){var e=this._dataCells[t.row],i=t.col;return i+t.cols0?(t=e[i-1],c.getSource(t)):null},i.prototype.getHeaderLeftOf=function(t){t=c.getSource(t);var e=this._headerCells[t.hrow],i=t.hcol;return i>0?(t=e[i-1],c.getSource(t)):null},i.prototype.getCellWidths=function(t,e){for(var i=0,o=0;o=0,(c=a.toProxy(!1)).visible=t?d:a.visible,c.width=(t&&e?a._fitWidth:a._cellWidth)||a.width,c.column=u.name,c}else{if(a.isProxy)return(t&&e?a._fitWidth:a._cellWidth)||a.width;if(a instanceof y){var d,c;h=a._items,l=[],d=(d=a.visible||i)&&n.indexOf(a.name)<0||o.indexOf(a.name)>=0;for(var p=0,_=h.length;p<_;p++)l.push(s.call(this,h[p]));if((c=a.toProxy(!1)).name=a.name,c.items=l,c.visible=t?d:a.visible,c.header=a.header&&a.header.toProxy(!1),a.tiedColumn&&(c.tiedColumn=a.tiedColumn.name),t&&c.expandable)switch(r){case"current":break;case"expand":c.expanded=!0;break;case"collapse":c.expanded=!1;break;default:c.expandable=!1}return delete c.width,c}}}void 0===o&&(o=[]),void 0===n&&(n=[]),e=e&&!!this.grid.layoutManager.isColumnFitted;for(var a=this._root._items,l=[],h=0,u=a.length;h=n-i)},i.prototype.$_parseCells=function(t,e){var i=t._visibles;this.$_parseHeaderCells(i),this.$_parseDataCells(i)},i.prototype.$_parseHeaderCells=function(t){for(var e=this._headerCells=[],i=0,o=0,n=t;o0;a--)n[t+a]=Math.max(n[t+a]+r[a]-r[a-1],o);n[t]=Math.max(n[t]+r[0],o),this.invalidateSize()},i.prototype.$_calcGroupWidths=function(){var t=this._cellWidths;!function e(i){for(var o=0,n=0;n=e.rightFirstLayout||this._itemIndex>=0&&this._itemIndex=0&&this._itemIndex=t.rightFirstLayout}return!1}}),_dp(n,"isTop",{get:function(){return!this._layout||!this._layout.group||(this.$_isSpanned()?this.grid.$_isTopCell(this):s.CellLayoutGroupItem.isTop(this._layout))}}),_dp(n,"isBottom",{get:function(){return!this._layout||!this._layout.group||(this.$_isSpanned()?this.grid.$_isBottomCell(this):s.CellLayoutGroupItem.isBottom(this._layout))}}),_dp(n,"isLeft",{get:function(){if(this._layout){var t=this._layout.group;return t?0==t.vindex&&s.CellLayoutGroupItem.isLeft(this._layout):0==this._layout.vindex}return!1}}),_dp(n,"isRight",{get:function(){if(this._layout){var t=this._layout.group;return t?0==t.vindex&&s.CellLayoutGroupItem.isRight(this._layout):this._layout.vindex==this._grid.visibleLayoutCount-1}return!1}}),_dp(n,"isFirst",{get:function(){if(this._layout&&(this._grid&&this._grid.visibleLayoutCount>0))return s.CellLayoutItem.getSource(this._grid.activeCellLayout.first)===this._layout;return!1}}),_dp(n,"isEditableFirst",{get:function(){var t=this._grid;if(t&&this._layout){var e=t.collectColumns(!0,!0,!0),i=e.indexOf(this._layout.firstColumn);if(i>=0){for(var o=i;o--;){var s=e[o];if(s instanceof r.SeriesColumn)return!1;var a=n.temp(t,this.itemIndex,s);if(t.getWritableAt(a,!0))return!1}return!0}}return!1}}),_dp(n,"isEditableLast",{get:function(){var t=this._grid;if(t&&this._layout)for(var e=t.collectColumns(!0,!0,!0),i=e.indexOf(this._layout.firstColumn)+1,o=e.length;i0))return s.CellLayoutItem.getSource(this._grid.activeCellLayout.last)===this._layout;return!1}}),n.prototype.set=function(t,e,i){return void 0!==i&&(this._grid=i),this._itemIndex=t,this._layout=e instanceof r.GridColumn?e.layout:e,this},n.prototype.assign=function(t){return t?(t.grid&&(this._grid=t._grid),this._itemIndex=t._itemIndex,this._layout=t._layout):(this._itemIndex=-1,this._layout=null),this},n.prototype.reset=function(){return this._itemIndex=-1,this._layout=null,this},n.prototype.clone=function(){return new n(this._grid,this._itemIndex,this._layout)},n.prototype.proxy=function(){return{itemIndex:isNaN(this._itemIndex)?-1:this._itemIndex,column:this.column?this.column.name:null,dataRow:this.dataRow,fieldIndex:this.dataColumn?this.column.dataIndex:-1,fieldName:this.dataColumn?this.column.fieldName:null}},n.prototype.normalize=function(t){if(t){this._grid=t;var e=this._layout;if(!e||!t.activeCellLayout.contains(e)){var i=void 0;e&&(i=t.activeCellLayout.layoutByColumn(e.firstColumn)),this._layout=i||t.getFirstLayout()}this._itemIndex=Math.max(0,Math.min(this._itemIndex,t.itemCount-1))}return this},n.prototype.incRow=function(t){this._grid&&(this._itemIndex=Math.max(0,Math.min(this._grid.itemCount-1,this._itemIndex+t)))},n.prototype.first=function(){this._grid&&(this._itemIndex=0)},n.prototype.last=function(){this._grid&&(this._itemIndex=this._grid.itemCount-1)},n.prototype.right=function(){if(this.grid.editOptions.focusMoveStep!==i.GROUP){var t=this._grid&&this.$_gridLayout().getRightOf(this._layout);t&&(this._layout=t)}else this.next()},n.prototype.left=function(){if(this.grid.editOptions.focusMoveStep!==i.GROUP){var t=this._grid&&this.$_gridLayout().getLeftOf(this._layout);t&&(this._layout=t)}else this.prev()},n.prototype.next=function(){if(this.grid.editOptions.focusMoveStep===i.GROUP){var t=this.layout.getAncestor(this.grid.displayOptions.groupFocusLevel),e=t.isRoot?this.grid.activeCellLayout:t.parent,o=t.vindex;if(o0)return void(this._layout=e.getVisible(o-1).first)}var n=c(this._grid,this._layout);if(n)return this._layout=n,!0},n.prototype.home=function(){this._layout=this._grid&&this.$_gridLayout().getHomeOf(this._layout)},n.prototype.end=function(){this._layout=this._grid&&this.$_gridLayout().getEndOf(this._layout)},n.prototype.firstCell=function(){this._layout=this._grid&&s.CellLayoutItem.getSource(this.grid.activeCellLayout.first)},n.prototype.lastCell=function(){this._layout=this.grid&&s.CellLayoutItem.getSource(this.grid.activeCellLayout.last)},n.prototype.down=function(t,o,n){void 0===t&&(t=e.ROW),this._grid&&(this.itemIndex0&&this.grid.editOptions.focusMoveStep===i.GROUP)this.incRow(-1);else if(t==e.ROW&&!o||this.isTop||n){if(this._itemIndex>0){if(t==e.CELL)if(this._grid.spanned){var r=this._grid.$_getUpperOfCell(this);this._layout=r||this.$_gridLayout().getBottomOf(this._layout)}else this._layout=this.$_gridLayout().getBottomOf(this._layout);this.incRow(-1)}}else this._grid.spanned?this._layout=this._grid.$_getUpperOfCell(this):this._layout=this.$_gridLayout().getUpperOf(this._layout).layout},n.prototype.getValue=function(){if(this._grid){var t=this.dataColumn,e=this._grid.getItem(this._itemIndex);return t&&e&&e.getData(t.dataIndex)}},n.prototype.assignFrom=function(e){e instanceof n?(this._grid=e._grid,this._layout=e._layout,this._itemIndex=e._itemIndex):t.prototype.assignFrom.call(this,e)},n.prototype.toString=function(){return"("+this._itemIndex+", "+this.column+")"},n.prototype.$_gridLayout=function(){return this._grid._activeCellLayout},n.prototype.$_isSpanned=function(){return this._grid&&this._grid.spanned},n}(n.Base);t.CellIndex=l;var h=function(t){function e(e,i,o){var n=t.call(this,e,i&&i.index,o)||this;return n._item=i,n}return o.__extends(e,t),e.tempItem=function(t,i,o){return e.$_itemTemp||(e.$_itemTemp=new e),e.$_itemTemp._grid=t,e.$_itemTemp._item=i,e.$_itemTemp._itemIndex=i.index,e.$_itemTemp._layout=o instanceof s.CellLayoutItem?o:o&&o.layout,e.$_itemTemp},_dp(e,"item",{get:function(){return this._item}}),e}(l);t.DummyCellIndex=h;var u=function(t,e){if(!t||!e)return null;var i=t.layoutManager,o=s.CellLayoutGroupItem.getNext(e);if(o)return o;for(var n=(e.group?e.root.vindex:e.vindex)+1,r=i.layoutCount;n=0;n--){if((o=i.getLayout(n))instanceof s.CellLayoutColumnItem)return o;if(o instanceof s.CellLayoutGroupItem&&(o=s.CellLayoutItem.getSource(o.last)))return o}},p=function(t){function e(){var e=t.call(this)||this;return e._row1=0,e._row2=0,e}return o.__extends(e,t),e.$_setRange=function(t,e,i,o,n){return t._row1=e<=o?e:o,t._row2=e<=o?o:e,t._col1=i.col<=n.col?i:n,t._col2=i.col<=n.col?n:i,t},e.create=function(t,i){if(i&&t!==i)return e.$_setRange(new e,t.itemIndex,t.layout,i.itemIndex,i.layout);var o=new e;return o._row1=o._row2=t.itemIndex,o._col1=o._col2=t.layout,o},e.temp=function(t,i){var o=e.$_TEMP;return i&&t!==i?e.$_setRange(o,t.itemIndex,t.layout,i.itemIndex,i.layout):(o._row1=o._row2=t.itemIndex,o._col1=o._col2=t.layout,o)},e.createRange=function(t,i,o,n){return e.$_setRange(new e,t,i,o,n)},_dp(e,"empty",{get:function(){return this._row2=this._row2?this._row1:this._row2,this._col1.col===this._col2.col?t.layout=this._col1.row>=this._col2.row?this._col1:this._col2:t.layout=this._col1.col>=this._col2.col?this._col1:this._col2,t}}),e.prototype.contains=function(t,e){if(e){var i=e.col;return t>=this._row1&&t<=this._row2&&i>=this._col1.col&&i<=this._col2.col}return!1},e.prototype.normalize=function(){if(this._row1>this._row2){var t=this._row1;this._row1=this._row2,this._row2=t}if(this._col1.col<=this._col2.col){if(this._col1.row>this._col2.row){var e=this._col1;this._col1=this._col2,this._col2=e}}else{e=this._col1;this._col1=this._col2,this._col2=e}return this},e.prototype.normalizeData=function(){return this.normalize(),this},e.prototype.intersectsWith=function(t){return!1},e.NULL=new e,e.$_TEMP=new e,e}(n.Base);t.CellRange=p}(Yi)),Yi}var pn,_n={},fn={};function gn(){if(pn)return fn;pn=1,Object.defineProperty(fn,"__esModule",{value:!0}),fn.RowGroupSummaryRuntime=fn.ColumnSummaryRuntime=fn.SummaryExpressionRuntime=void 0;var t=d,e=Y(),i=function(i){function o(){return i.call(this)||this}return t.__extends(o,i),o.prototype._doDispose=function(){i.prototype._doDispose.call(this)},o.prototype.isIdentifier=function(t){return t=t.toLowerCase(),o.IDENTS.hasOwnProperty(t)?o.IDENTS[t]:i.prototype.isIdentifier.call(this,t)},o.prototype.evaluateIdentifier=function(t){switch(t){case o.ID_COUNT:return this._getCount();case o.ID_SUM:return this._getSum();case o.ID_MAX:return this._getMax();case o.ID_MIN:return this._getMin();case o.ID_AVG:return this._getAvg();case o.ID_VAR:return this._getVar();case o.ID_VARP:return this._getVarp();case o.ID_STDEV:return this._getStdev();case o.ID_STDEVP:return this._getStdevp();case o.ID_DATA_COUNT:return this._getDataCount();case o.ID_DATA_AVG:return this._getDataAvg();case o.ID_GROUP_VALUE:return this._getGroupValue()}throw new e.ExpressionEvaluationError("Invalid identifier key: "+t)},o.prototype.evaluateIndexerI=function(t,i){throw new e.ExpressionEvaluationError("Invalid identifier indexer: "+t)},o.prototype.evaluateIndexerS=function(t,i,o){throw new e.ExpressionEvaluationError("Invalid identifier indexer: "+t)},o.ID_COUNT=0,o.ID_SUM=1,o.ID_MAX=2,o.ID_MIN=3,o.ID_AVG=4,o.ID_VAR=5,o.ID_VARP=6,o.ID_STDEV=7,o.ID_STDEVP=8,o.ID_DATA_COUNT=9,o.ID_DATA_AVG=10,o.ID_GROUP_VALUE=11,o.IDENTS={count:o.ID_COUNT,sum:o.ID_SUM,max:o.ID_MAX,min:o.ID_MIN,avg:o.ID_AVG,var:o.ID_VAR,varp:o.ID_VARP,stdev:o.ID_STDEV,stdevp:o.ID_STDEVP,datacount:o.ID_DATA_COUNT,dataavg:o.ID_DATA_AVG,groupvalue:o.ID_GROUP_VALUE},o}(e.ExpressionRuntime);fn.SummaryExpressionRuntime=i;var o=function(o){function n(){return o.call(this)||this}return t.__extends(n,o),n.prototype._doDispose=function(){this._grid=null,this._ds=null,this._column=null,this._summarizer=null,o.prototype._doDispose.call(this)},n.prototype.setColumn=function(t,e){this._column=t,this._grid=t.grid,this._ds=this._grid.dataSource,this._fieldCount=this._ds.fieldCount,this._summarizer=e},n.prototype.isIdentifier=function(t){return t=t.toLowerCase(),i.IDENTS.hasOwnProperty(t)?i.IDENTS[t]:o.prototype.isIdentifier.call(this,t)},n.prototype.evaluateIndexerI=function(t,o){if(this._summarizer){if(o<0||o>=this._fieldCount)throw new e.ExpressionEvaluationError("Data field index out of bounds: "+o);switch(t){case i.ID_SUM:return this._summarizer.getSum(o);case i.ID_COUNT:return this._summarizer.getCount(o);case i.ID_MAX:return this._summarizer.getMax(o);case i.ID_MIN:return this._summarizer.getMin(o);case i.ID_AVG:return this._summarizer.getAvg(o);case i.ID_VAR:return this._summarizer.getVar(o);case i.ID_VARP:return this._summarizer.getVarp(o);case i.ID_STDEV:return this._summarizer.getStdev(o);case i.ID_STDEVP:return this._summarizer.getStdevp(o);case i.ID_DATA_COUNT:return this._summarizer.getDataCount(o);case i.ID_DATA_AVG:return this._summarizer.getDataAvg(o)}throw new e.ExpressionEvaluationError("Invalid identifier indexer: "+t)}switch(t){case i.ID_SUM:case i.ID_COUNT:return 0;case i.ID_MAX:case i.ID_MIN:case i.ID_AVG:case i.ID_VAR:case i.ID_VARP:case i.ID_STDEV:case i.ID_STDEVP:return NaN}},n.prototype.evaluateIndexerS=function(t,o,n){if(this._summarizer&&this._ds){var r=n?this._ds.getFieldIndexC(o):this._ds.getFieldIndex(o);if(r<0||r>=this._fieldCount)throw new e.ExpressionEvaluationError("Data field index out of bounds: "+r);switch(t){case i.ID_SUM:return this._summarizer.getSum(r);case i.ID_COUNT:return this._summarizer.getCount(r);case i.ID_MAX:return this._summarizer.getMax(r);case i.ID_MIN:return this._summarizer.getMin(r);case i.ID_AVG:return this._summarizer.getAvg(r);case i.ID_VAR:return this._summarizer.getVar(r);case i.ID_VARP:return this._summarizer.getVarp(r);case i.ID_STDEV:return this._summarizer.getStdev(r);case i.ID_STDEVP:return this._summarizer.getStdevp(r)}throw new e.ExpressionEvaluationError("Invalid identifier indexer: "+t)}switch(t){case i.ID_SUM:case i.ID_COUNT:return 0;case i.ID_MAX:case i.ID_MIN:case i.ID_AVG:case i.ID_VAR:case i.ID_VARP:case i.ID_STDEV:case i.ID_STDEVP:return NaN}},n.prototype._getCount=function(){return this._summarizer?this._summarizer.getCount(this._column.dataIndex):0},n.prototype._getSum=function(){return this._summarizer?this._summarizer.getSum(this._column.dataIndex):0},n.prototype._getMax=function(){return this._summarizer?this._summarizer.getMax(this._column.dataIndex):NaN},n.prototype._getMin=function(){return this._summarizer?this._summarizer.getMin(this._column.dataIndex):NaN},n.prototype._getAvg=function(){return this._summarizer?this._summarizer.getAvg(this._column.dataIndex):NaN},n.prototype._getVar=function(){return this._summarizer?this._summarizer.getVar(this._column.dataIndex):NaN},n.prototype._getVarp=function(){return this._summarizer?this._summarizer.getVarp(this._column.dataIndex):NaN},n.prototype._getStdev=function(){return this._summarizer?this._summarizer.getStdev(this._column.dataIndex):NaN},n.prototype._getStdevp=function(){return this._summarizer?this._summarizer.getStdevp(this._column.dataIndex):NaN},n.prototype._getDataCount=function(){return this._summarizer?this._summarizer.getDataCount(this._column.dataIndex):NaN},n.prototype._getDataAvg=function(){return this._summarizer?this._summarizer.getDataAvg(this._column.dataIndex):NaN},n.prototype._getGroupValue=function(){return""},n}(i);fn.ColumnSummaryRuntime=o;var n=function(e){function i(){return e.call(this)||this}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(i,"item",{get:function(){return this._item}}),i.prototype.setItem=function(t){this._item=t},i.prototype._getCount=function(){return this._item.getNumber(this._column.dataIndex)},i.prototype._getSum=function(){return this._item.getSum(this._column.dataIndex)},i.prototype._getMax=function(){return this._item.getMax(this._column.dataIndex)},i.prototype._getMin=function(){return this._item.getMin(this._column.dataIndex)},i.prototype._getAvg=function(){return this._item.getAvg(this._column.dataIndex)},i.prototype._getVar=function(){return this._item.getVar(this._column.dataIndex,1)},i.prototype._getVarp=function(){return this._item.getVar(this._column.dataIndex,0)},i.prototype._getStdev=function(){return this._item.getStdev(this._column.dataIndex,1)},i.prototype._getStdevp=function(){return this._item.getStdev(this._column.dataIndex,0)},i.prototype._getDataCount=function(){return this._item.getDataCount(this._column.dataIndex)},i.prototype._getDataAvg=function(){return this._item.getDataAvg(this._column.dataIndex)},i.prototype._getGroupValue=function(){return this._column.groupLevel&&this._item.level>=this._column.groupLevel?this._item.firstDataItem.getData(this._column.dataIndex):""},i}(o);return fn.RowGroupSummaryRuntime=n,fn}var mn,yn={};var vn,Cn={};var wn,xn={};function bn(){if(wn)return xn;wn=1,Object.defineProperty(xn,"__esModule",{value:!0}),xn.GridFooterCollection=xn.SummaryCollection=xn.GridFooter=xn.GridSummaryObject=xn.FooterCell=xn.SummaryCell=xn.FooterExpressionRuntime=void 0;var t=d,e=Y(),i=uo(),o=rn(),n=C(),r=io(),s=S(),a=Ct(),l=function(i){function o(){return i.call(this)||this}return t.__extends(o,i),o.prototype._doDispose=function(){this._cell=null,i.prototype._doDispose.call(this)},o.prototype.setCell=function(t){this._cell=t},o.prototype.isIdentifier=function(t){return t=t.toLowerCase(),o.IDENTS.hasOwnProperty(t)?o.IDENTS[t]:i.prototype.isIdentifier.call(this,t)},o.prototype.evaluateIdentifier=function(t){switch(t){case o.ID_VALUE:return this._cell.value;case o.ID_FIELD:return this._cell.index.dataField;case o.ID_LEVEL:return this._cell.level}throw new e.ExpressionEvaluationError("Invalid identifier key: "+t)},o.prototype.evaluateIndexerI=function(t,e){},o.prototype.evaluateIndexerS=function(t,e,i){},o.ID_VALUE=0,o.ID_FIELD=1,o.ID_LEVEL=2,o.IDENTS={value:o.ID_VALUE,field:o.ID_FIELD,level:o.ID_LEVEL},o}(e.ExpressionRuntime);xn.FooterExpressionRuntime=l;var h=function(e){function r(t){var i=e.call(this,t)||this;return i._childIndex=0,i._error=null,i._errorDetail=null,i}return t.__extends(r,e),r.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(r,"level",{get:function(){return 0}}),_dp(r,"error",{get:function(){return this._error}}),_dp(r,"errorDetail",{get:function(){return this._errorDetail}}),r.prototype.calculate=function(){var t=this.valueColumn,e=t&&t.grid,i=this._getSummary(t,this._childIndex);if(this._value=NaN,this._error=null,e&&i&&e.itemSource.summaryMode!=n.SummaryMode.NONE){i._value=void 0;var r=i.expression,s=void 0;try{if(r&&e.dataCount>0&&t instanceof o.DataColumn&&t.dataIndex>=0){var a=e.columnSummaryRuntime;a.setColumn(t,e.summarizer),s=i.evaluate(a,this._childIndex)}var l=i.valueCallback;l&&(s=l(e.handler,t,this._childIndex,i,s)),i._value=this._value=s}catch(t){this._error=t,this._errorDetail=t,i._value=void 0}}},_dp(r,"text",{get:function(){if(this._error)return i.GridCell.ERROR}}),_dp(r,"value",{get:function(){return this._value}}),r.prototype.getDisplayText=function(t){var e,i=this._value,o=this.valueColumn,n="";if(null!=t.text)n=t.text;else if(void 0!==i&&o){if("string"==typeof i)n=i+"";else if("boolean"==typeof i)n=String(i);else if(i instanceof Date){var r=t.datetimeWriter;n=r?r.getText(this._value):String(i)}else if("number"!=typeof i||isNaN(i))null==i&&(n="");else{var s=t.numberFormatter;n=s?s.getText(i):String(i)}if(n){var a=t.prefix;a&&(n=a+n),(a=t.suffix)&&(n+=a)}}return!n&&o&&(n=null===(e=this._getSummary(o,this._childIndex))||void 0===e?void 0:e.text),n},r.prototype.getSummary=function(){return this._getSummary(this.valueColumn,this._childIndex)},r.prototype.getTemplate=function(t){var e=this._getSummary(this.valueColumn,this._childIndex);return e?e.realizeSummary(this,t):void 0},r}(i.GridCell);xn.SummaryCell=h;var u=function(e){function i(){return e.call(this,"footerCell")||this}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(i,"footerIndex",{get:function(){return this._childIndex},set:function(t){t!=this._childIndex&&(this._childIndex=t)}}),i.prototype._getSummary=function(t,e){return t&&t.footers.get(e)},i}(h);xn.FooterCell=u;var c=function(e){function i(t){var i=e.call(this,t)||this;return i._minHeight=23,i._height=0,i._heights=[],i._formatter={numberFormatter:null,datetimeWriter:null,booleanFormatter:null,textFormatter:null,prefix:"",suffix:"",text:null},i._childIndex=0,i._displayIndex=0,i._runtime=new l,i._cell=i._createCell(),i.visible=!0,i}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(i,"styleName",{get:function(){return this._styleName},set:function(t){t!=this._styleName&&(this._styleName=t,this._changed())}}),_dp(i,"displayIndex",{get:function(){return this._displayIndex}}),_dp(i,"minHeight",{get:function(){return this._minHeight},set:function(t){(t=Math.max(0,t))!=this._minHeight&&(this._minHeight=t,this._changed())}}),_dp(i,"height",{get:function(){return this._height},set:function(t){(t=Math.max(0,t))!=this._height&&(this._height=t,this._changed())}}),_dp(i,"heights",{get:function(){return this._heights},set:function(t){this._heights=t.slice(),this._changed()}}),_dp(i,"cellStyleCallback",{get:function(){return this._cellStyleCallback},set:function(t){t!==this._cellStyleCallback&&(this._cellStyleCallback=t,this.refreshOwner())}}),_dp(i,"childIndex",{get:function(){return this._childIndex}}),i.prototype.getCell=function(t){var e=this._cell,i=t.firstColumn;return e.index.set(-1,i),e._childIndex=this._childIndex,e.calculate(),e},i.prototype.getCellStyle=function(t,e,i){void 0===i&&(i=!0);var o,n=t.getSummary(),r=this._cellStyleCallback;r&&(o=r(this._grid.handler,t),e.assign(o)),n&&(r=n.styleCallback)&&(o=r(this._grid.handler,t),e.assign(o));var s=e.styleName||n&&n.styleName||"";return i&&(e.styleName=this.getCellStyleName()+" "+s),e},i.prototype.getCellFormatters=function(t,e){return e?(e.numberFormatter=e.numberFormatter||t.numberFormatter,e.datetimeWriter=e.datetimeWriter||t.datetimeWriter,e.booleanFormatter=e.booleanFormatter||t.boolFormatter,e.textFormatter=e.textFormatter||t.textFormatter,e.prefix=e.prefix||t.prefix,e.suffix=e.suffix||t.suffix):((e=this._formatter).numberFormatter=t.numberFormatter,e.datetimeWriter=t.datetimeWriter,e.booleanFormatter=t.boolFormatter,e.textFormatter=t.textFormatter,e.prefix=t.prefix,e.suffix=t.suffix),e},i.prototype._visibleChanged=function(){e.prototype._visibleChanged.call(this),this.$_owner&&this.$_owner.$_visibleChanged(this)},i.prototype._doChanged=function(){e.prototype._doChanged.call(this),this.$_owner&&this.$_owner._doChanged()},i}(r.VisualObject);xn.GridSummaryObject=c;var p=function(e){function i(t){var i=e.call(this,t)||this;return i.assignFrom(a.DefaultOptions.footer),i}return t.__extends(i,e),i.prototype.getCellStyleName=function(){return i.CELL_CSS},i.prototype._createCell=function(){return new u},i.CELL_CSS="rg-footer-cell",i}(c);xn.GridFooter=p;var _=function(e){function i(t){var i=e.call(this,t)||this;i._items=[],i._visibles=[];var o=i._createSummary(t);return o.$_owner=i,i._items.push(o),o.visible&&i._visibles.push(o),i}return t.__extends(i,e),i.prototype._doDispose=function(){for(var t=0,i=this._items;t0}}),_dp(i,"count",{get:function(){return this._items.length}}),_dp(i,"visibleCount",{get:function(){return this._visibles.length}}),_dp(i,"dirty",{get:function(){for(var t=this._dirty,e=0,i=this._visibles;e0},i.prototype.assignFrom=function(t){var i;if(e.prototype.assignFrom.call(this,t),t&&t.items?i=s.Utils.makeArray(t.items):s.Utils.isArray(t)&&(i=t),i){for(var o=this._items,n=i.length;o.length>n;)o.pop().dispose();for(var r=0,a=i.length;r0&&(t.items=i.slice()),t},i.prototype.$_visibleChanged=function(t){this.$_resetVisibles()},i.prototype.$_resetVisibles=function(){this._visibles.length=0;for(var t=0,e=0;t=0&&(t+=i.indexOffset,!i.zeroBase&&t++,a=String(t));break;case e.ROW:r.isDataRow&&(t=n.dataRow,t+=i.rowOffset,i.zeroBase||t++,a=String(t))}return a}}),_dp(i,"value",{get:function(){return null}}),i}(n.GridCell);t.RowIndicatorCell=u;var c=function(t){function i(e){var i=t.call(this,e)||this;return i._zeroBase=!1,i._indexOffset=0,i._rowOffset=0,i._minWidth=32,i._maxWidth=0,i._width=0,i._selectable=!0,i._displayWidth=0,i._cell=new u(i),i.headText=h.Messages.messages.rowIndicatorHeadText,i.footText=h.Messages.messages.rowIndicatorFootText,i.sumText=h.Messages.messages.rowIndicatorSumText,i.showFocus=i.showSelection=!0,i.assignFrom(l.DefaultOptions.rowIndicator),i}return o.__extends(i,t),i.prototype._doDispose=function(){t.prototype._doDispose.call(this)},_dp(i,"displayValue",{get:function(){return this._displayValue||e.INDEX},set:function(t){t!=this._displayValue&&(this._displayValue=t,this._changed())}}),_dp(i,"zeroBase",{get:function(){return this._zeroBase},set:function(t){t!=this._zeroBase&&(this._zeroBase=t,this._changed())}}),_dp(i,"indexOffset",{get:function(){return this._indexOffset},set:function(t){t!=this._indexOffset&&(this._indexOffset=t,this._changed())}}),_dp(i,"rowOffset",{get:function(){return this._rowOffset},set:function(t){t!=this._rowOffset&&(this._rowOffset=t,this._changed())}}),_dp(i,"minWidth",{get:function(){return this._minWidth},set:function(t){t!=this._minWidth&&(this._minWidth=t,this._changed())}}),_dp(i,"maxWidth",{get:function(){return this._maxWidth},set:function(t){t!=this._maxWidth&&(this._maxWidth=t,this._changed())}}),_dp(i,"width",{get:function(){return this._width},set:function(t){t!=this._width&&(this._width=t,this._changed())}}),_dp(i,"displayWidth",{get:function(){return this._displayWidth}}),_dp(i,"selectable",{get:function(){return this._selectable},set:function(t){t!=this._selectable&&(this._selectable=t,this._changed())}}),_dp(i,"draggableSelectedRows",{get:function(){return this._draggableSelectedRows},set:function(t){this._draggableSelectedRows=t}}),i.prototype.getCellType=function(){return a.GridCellType.INDICATOR},_dp(i,"staticOrder",{get:function(){return 0}}),i.prototype.getCell=function(t){var e=this._cell;if(e.setIndex(t),t.item){var i=t.item.itemState;i==s.ItemState.NORMAL&&this._grid.focusedIndex.itemIndex==t.itemIndex&&(i=s.ItemState.FOCUSED),e.itemState=i}return e},i.prototype.getHeadStyleName=function(){return"rg-rowindicator-head"},i.prototype.getFootStyleName=function(){return"rg-rowindicator-foot"},i.prototype.getSumStyleName=function(){return"rg-rowindicator-sum"},i.prototype.getFilterStyleName=function(){return"rg-rowindicator-filter"},i}(r.SectionObject);t.RowIndicator=c}(Sn)),Sn}var kn,Mn={};function On(){if(kn)return Mn;kn=1,Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.StateBar=Mn.StateBarCell=void 0;var t=d,e=uo(),i=Tn(),o=D(),n=Dn(),r=C(),s=Ct(),a=_t(),l=function(e){function i(t){var i=e.call(this,"stateBarCell")||this;return i._bar=t,i}return t.__extends(i,e),i.prototype._doDispose=function(){this._bar=null,e.prototype._doDispose.call(this)},_dp(i,"text",{get:function(){var t,e=this._bar.stateTexts[this.item.rowState]||(null===(t=s.DefaultOptions.stateBar.stateTexts)||void 0===t?void 0:t[this.item.rowState]);if(!e)switch(this.item.rowState){case o.RowState.CREATED:return a.Messages.messages.stateTextCreated;case o.RowState.UPDATED:return a.Messages.messages.stateTextUpdated;case o.RowState.CREATE_AND_DELETED:return a.Messages.messages.stateTextCreateAndDeleted;case o.RowState.DELETED:return a.Messages.messages.stateTextDeleted}return e}}),_dp(i,"value",{get:function(){return null}}),i}(e.GridCell);Mn.StateBarCell=l;var h=function(e){function i(t){var i=e.call(this,t)||this;return i._width=20,i._mark=n.StateMark.IMAGE,i._stateTexts={},i._errorVisible=!1,i._cell=new l(i),i.assignFrom(s.DefaultOptions.stateBar),i}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(i,"width",{get:function(){return this._width},set:function(t){t!=this._width&&(this._width=t,this._changed())}}),_dp(i,"mark",{get:function(){return this._mark},set:function(t){t!=this._mark&&(this._mark=t,this._changed())}}),_dp(i,"stateTexts",{get:function(){return this._stateTexts},set:function(t){if(t!=this._stateTexts){var e=[];for(var i in o.RowState)e.push(o.RowState[i]);for(var n in t)e.indexOf(n)>=0&&(this._stateTexts[n]=t[n]);this._changed()}}}),_dp(i,"errorVisible",{get:function(){return this._errorVisible},set:function(t){t!=this._errorVisible&&(this._errorVisible=t,this._changed())}}),i.prototype.getCellType=function(){return r.GridCellType.STATE},_dp(i,"staticOrder",{get:function(){return 1e3}}),i.prototype.getCell=function(t){var e=this._cell;return e.setIndex(t),e},i.prototype.getHeadStyleName=function(){return"rg-statebar-head"},i.prototype.getFootStyleName=function(){return"rg-statebar-foot"},i.prototype.getSumStyleName=function(){return"rg-statebar-sum"},i.prototype.getFilterStyleName=function(){return"rg-statebar-filter"},i}(i.SectionObject);return Mn.StateBar=h,Mn}var Fn,Ln={};function Pn(){if(Fn)return Ln;Fn=1,Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.CheckBarMergeManager=Ln.CheckBarMergeRoom=Ln.CheckBarMergeRule=Ln.IndexRange=Ln.CheckBar=Ln.CheckBarCell=void 0;var t=d,e=uo(),i=Tn(),o=cn(),n=nn(),r=Y(),s=Gi(),a=ji(),l=G(),h=Ro(),u=C(),c=Ct(),p=function(e){function i(){return e.call(this,"checkBarCell")||this}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(i,"getText",{get:function(){return String(this.index.dataRow)}}),_dp(i,"value",{get:function(){return this.item.checked}}),i}(e.GridCell);Ln.CheckBarCell=p;var _=function(e){function i(t){var i=e.call(this,t)||this;return i._width=20,i._exclusive=!1,i._toggleRadio=!1,i._showAll=!0,i._showGroup=!0,i._showGroupFooter=!0,i._visibleOnly=!1,i._checkableOnly=!0,i._syncHeadCheck=!1,i._headThreeStates=!1,i._useImages=!1,i._checkLocation=u.ColumnHeaderItemLocation.TOP,i._itemGap=5,i._fieldIndex=-1,i._breakMergeOnEmpty=!1,i._cell=new p,i._merged=!1,i.assignFrom(c.DefaultOptions.checkBar),i}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(i,"width",{get:function(){return this._width},set:function(t){t!=this._width&&(this._width=t,this._changed())}}),_dp(i,"exclusive",{get:function(){return this._exclusive},set:function(t){t!=this._exclusive&&(this._exclusive=t,this._changed())}}),_dp(i,"toggleRadio",{get:function(){return this._toggleRadio},set:function(t){this._toggleRadio=t}}),_dp(i,"checkLocation",{get:function(){return this._checkLocation},set:function(t){t!=this._checkLocation&&(this._checkLocation=t,this._changed())}}),_dp(i,"itemGap",{get:function(){return this._itemGap},set:function(t){t!=this._itemGap&&(this._itemGap=t,this._changed())}}),_dp(i,"showAll",{get:function(){return this._showAll},set:function(t){t!=this._showAll&&(this._showAll=t,this._changed())}}),_dp(i,"showGroup",{get:function(){return this._showGroup},set:function(t){t!=this._showGroup&&(this._showGroup=t,this._grid.itemSource.setGroupCheckable(t,t&&this._showGroupFooter),this._changed())}}),_dp(i,"showGroupFooter",{get:function(){return this._showGroupFooter},set:function(t){t!=this._showGroupFooter&&(this._showGroupFooter=t,this._grid.itemSource.setGroupCheckable(this._showGroup,this._showGroup&&t),this._changed())}}),_dp(i,"visibleOnly",{get:function(){return this._visibleOnly},set:function(t){t!=this._visibleOnly&&(this._visibleOnly=t,this._changed())}}),_dp(i,"checkableOnly",{get:function(){return this._checkableOnly},set:function(t){t!=this._checkableOnly&&(this._checkableOnly=t,this._changed())}}),_dp(i,"checkableExpression",{get:function(){return this._checkableExpression},set:function(t){t!=this._checkableExpression&&(this._checkableExpression=t,this._grid.itemSource.checkableExpression=t,this._changed())}}),_dp(i,"checkableCallback",{get:function(){return this._checkableCallback},set:function(t){this._checkableCallback=t,this._grid.itemSource.checkableCallback=t,this._changed()}}),_dp(i,"syncHeadCheck",{get:function(){return this._syncHeadCheck},set:function(t){t!=this._syncHeadCheck&&(this._syncHeadCheck=t,this._changed())}}),_dp(i,"headThreeStates",{get:function(){return this._headThreeStates},set:function(t){t!==this._headThreeStates&&(this._headThreeStates=t,this._changed())}}),_dp(i,"fieldName",{get:function(){return this._fieldName},set:function(t){t!=this._fieldName&&(this._fieldName=t,this._fieldIndex=this._grid.dataSource.getFieldIndex(t),this._grid.setCheckFieldIndex(this._fieldIndex),this._changed())}}),_dp(i,"fieldIndex",{get:function(){return this._fieldIndex}}),_dp(i,"useImages",{get:function(){return this._useImages},set:function(t){this._useImages!==t&&(this._useImages=t,this._changed())}}),_dp(i,"mergeRule",{get:function(){return this._mergeRule},set:function(t){t!=this._mergeRule&&(this._mergeRule=t,this._mergeRuleObj&&this._mergeRuleObj.dispose(),this._mergeRuleObj=t?y.createRule(t):null,this._changed(),this.owner._columnMergeRuleChanged(null))}}),_dp(i,"breakMergeOnEmpty",{get:function(){return this._breakMergeOnEmpty},set:function(t){t!=this._breakMergeOnEmpty&&(this._breakMergeOnEmpty=t,this._changed())}}),_dp(i,"focusMove",{get:function(){return!!this._focusMove},set:function(t){this._focusMove=t}}),i.prototype.getCell=function(t){var e=this._cell;return e.setIndex(t),e._exclusive=this._exclusive,e},i.prototype.getHeadStyleName=function(){return"rg-checkbar-head"},i.prototype.getFootStyleName=function(){return"rg-checkbar-foot"},i.prototype.getSumStyleName=function(){return"rg-checkbar-sum"},i.prototype.getFilterStyleName=function(){return"rg-checkbar-filter"},i.prototype.canMerge=function(){return null!=this._mergeRuleObj},i.prototype.getCellType=function(){return u.GridCellType.CHECK},_dp(i,"staticOrder",{get:function(){return 2e3}}),_dp(i,"merges",{get:function(){return this._merges}}),i.prototype._doChanged=function(){this._grid&&(this._grid._itemCheckChanged=this._syncHeadCheck)},_dp(i,"merged",{get:function(){return this._merged}}),i}(i.SectionObject);Ln.CheckBar=_;var f=function(e){function i(){var t=e.call(this)||this;return t._row1=0,t._row2=0,t}return t.__extends(i,e),i.$_setRange=function(t,e,i){return t._row1=e<=i?e:i,t._row2=e<=i?i:e,t},i.create=function(t,e){if(e&&t!==e)return i.$_setRange(new i,t.itemIndex,e.itemIndex);var o=new i;return o._row1=o._row2=t.itemIndex,o},i.temp=function(t,e){var o=i.$_TEMP;return e&&t!==e?i.$_setRange(o,t.itemIndex,e.itemIndex):(o._row1=o._row2=t.itemIndex,o)},i.createRange=function(t,e){return i.$_setRange(new i,t,e)},_dp(i,"empty",{get:function(){return this._row2=this._row2?this._row1:this._row2,t}}),i.prototype.contains=function(t){return t>=this._row1&&t<=this._row2},i.prototype.intersectsWith=function(t){return!1},i.NULL=new i,i.$_TEMP=new i,i}(l.Base);Ln.IndexRange=f;var g=function(e){function i(){var t=e.call(this)||this;return t._item=null,t._ds=null,t._fieldCount=0,t}return t.__extends(i,e),i.prototype._doDispose=function(){this._item=null,this._ds=null,e.prototype._doDispose.call(this)},i.prototype.setDataSource=function(t){this._ds=t,this._fieldCount=t?t.fieldCount:0},i.prototype.setCell=function(t){this._item=t.item},i.prototype.setItem=function(t){this._item=t},i.prototype.clear=function(){this._item=null,this._ds=null},i.prototype.isIdentifier=function(t){return t=t.toLowerCase(),i.IDENTS.hasOwnProperty(t)?i.IDENTS[t]:e.prototype.isIdentifier.call(this,t)},i.prototype.evaluateIdentifier=function(t){if(this._item){switch(t){case i.ID_ROW:return this._item.index;case i.ID_DATAROW:return this._item.dataRow;case i.ID_GROUP:return this._item.parent}throw new r.ExpressionEvaluationError("Invalid identifier key: "+t)}},i.prototype.evaluateIndexerI=function(t,e){if(this._item){if(t==i.ID_VALUE||t==i.ID_VALUES){if(e<0||e>=this._fieldCount)throw new r.ExpressionEvaluationError("Data field index out of bounds:"+e);return this._item.getData(e)}throw new r.ExpressionEvaluationError("Invalid identifier indexer: "+t)}},i.prototype.evaluateIndexerS=function(t,e,o){if(t!=i.ID_VALUE&&t!=i.ID_VALUES)throw new r.ExpressionEvaluationError("Invalid identifier indexer: "+t);if(this._ds){var n=o?this._ds.getFieldIndexC(e):this._ds.getFieldIndex(e);if(n<0||n>=this._fieldCount)throw new r.ExpressionEvaluationError("Data field is not exists:"+e);return this._item.getData(n)}},i.ID_ROW=0,i.ID_DATAROW=1,i.ID_CHECKED=2,i.ID_VALUE=3,i.ID_VALUES=4,i.ID_GROUP=5,i.ID_PREV_VALUES=6,i.IDENTS={row:i.ID_ROW,datarow:i.ID_DATAROW,checked:i.ID_CHECKED,value:i.ID_VALUE,values:i.ID_VALUES,group:i.ID_GROUP,prevvalues:i.ID_PREV_VALUES},i}(r.ExpressionRuntime),m={},y=function(e){function i(t){var o=e.call(this)||this;return o._runtime=i.$_runtime=i.$_runtime||new g,o.criteria=t,o}return t.__extends(i,e),i.createRule=function(t){var e="string"==typeof t?t:t&&t.criteria;return e?new i(e):null},i.prototype._doDispose=function(){this._runtime.clear(),this._runtime=null,e.prototype._doDispose.call(this)},_dp(i,"criteria",{get:function(){return this._criteria},set:function(t){(t=t?t.trim():null)!=this._criteria&&(this._criteria=t,this._exprNode=t?r.ExpressionParser.Default.parse(t,null):null,this._changed())}}),i.prototype.parseInit=function(t,e,i,o,n){var r=this._checkBar.breakMergeOnEmpty,s=t.fixedCount,a=t.itemCount,l=t.dataSource.rowCount;if(!((o=Math.min(a-i,o))<1||l<=0)){this._runtime.setDataSource(t.dataSource);for(var h=null;i=a)){this._runtime.setItem(h);var u=this._exprNode.evaluate(this._runtime),d=h.checked,c=i;if(n[c]=c+1,!(h.dataRow>=l)){this._runtime.setItem(h);for(var p=i+1;p=l)break;this._runtime.setItem(h);var _=this._exprNode.evaluate(this._runtime),f=h.checked;if(p==s||void 0===_&&r||(_ instanceof Date&&u instanceof Date?+_!=+u:_!=u)||f!=d){if(p>=o)break;c=p,u=_,d=f}n[p]=c+1}else{if(p>=o)break;u=m,c=p,n[p]=c+1}}}}},i.prototype.parseBounds=function(t,e,i,o,n){var r=this._checkBar.breakMergeOnEmpty,s=!1,a=t.itemCount;if(!(a<1)){var l,h,u,d=t.fixedCount,c=m,p=Math.max(0,i),_=p,f=-1;if(this._runtime.setDataSource(t.dataSource),p>0&&n[p]<=0){var g=t.getItem(p);if(this.$_isRow(g,s)){for(this._runtime.setItem(g),h=this._exprNode.evaluate(this._runtime),u=g.checked,p--;p>=0&&(g=t.getItem(p),this.$_isRow(g,s))&&(this._runtime.setItem(g),c=this._exprNode.evaluate(this._runtime),l=g.checked,!(p==d||void 0===c&&r||(c instanceof Date&&h instanceof Date?+c!=+h:c!=h)||u!=l));)p--;for(var y=_-1;y>p;y--)n[y]=p+2;_-1>p&&(f=p+1)}else{n[p]=p+1;for(y=_-1;y>p;y--)n[y]=p+2;for(_-1>p+1&&(f=p+2),p--;p>=0&&n[p]<=0&&!this.$_isRow(t.getItem(p),s);)n[p]=p+1,p--}}for(p=Math.max(0,i);p<=o&&n[p]>0;)p++;for(;p<=o&&!this.$_isRow(t.getItem(p),s);)n[p]=p+1,p++;if(p=0&&(v=f,f=-1);for(y=_;y=o)break;h=c,u=l,_=p}else n[p]=_+1;p++}else{v=_;f>=0&&(v=f,f=-1);for(y=_;y=o)break}if(p==a&&(c instanceof Date&&h instanceof Date?+c==+h:c==h)||u!=l)for(v=f>=0?f:_,y=_;y=this._head&&t.itemIndex<=this._tail},i.$_rooms=new Array,i}(n.GridMergeRoom);Ln.CheckBarMergeRoom=v;var w=-1,x=65535,b=function(e){function i(t){var i=e.call(this)||this;return i._flags=null,i._fixedRooms=[],i._rooms=[],i._inited=!1,i._fixedCells=[],i._cells=[],i._nextId=0,i._checkBar=t,t._merges=i,i}return t.__extends(i,e),i.prototype._doDispose=function(){this._checkBar=null,this._rooms=this._fixedRooms=null,e.prototype._doDispose.call(this)},_dp(i,"count",{get:function(){return this._rooms.length}}),i.prototype.clear=function(){this._flags=null,this._rooms=[],this._inited=!1},i.prototype.initialize=function(t){if(!this._inited){var e=this._checkBar.owner,i=e.itemSource,o=this._checkBar._mergeRuleObj;if(o){for(var n=this._flags=new Array(i.itemCount),r=e.fixedOptions.mergeRows?0:i.fixedCount,s=i.itemCount;s--;)n[s]=0;o._checkBar=this._checkBar,o.parseInit(i,-1,r,t,n)}this._inited=!0}},i.prototype.refreshRooms=function(t,e,i){if(this._nextId=0,this._inited&&this._flags&&!(e=0;i--)if(e[i].contains(t))return e[i];return null},i.prototype.prepareCells=function(t,e){if(t>0){for(var i=this._fixedCells,o=0;o=0;o--){var n=i[o];this.addFixedCells(n.head,n.tail-n.head+1)}for(o=(i=this.getRooms()).length-1;o>=0;o--){n=i[o];var r=Math.max(0,n.head-e-t),s=n.tail-e-t;this.addCells(r,s-r+1)}},i.prototype.addFixedCells=function(t,e){for(var i=this._fixedCells,o=this._nextId++,n=t+1;nw:this._cells[t-e]>w},i.prototype.isMergeRoot=function(t,e){return tw&&this._fixedCells[t]w&&this._cells[t]=x:this._cells[t-e]>=x},i.prototype.getMerged=function(t,e){var i=1;if(t0){var o=e,n=this._flags[o];if(n<=0)return null;for(var r=e+1;r<=i;){if(r==i||this._flags[r]>n)return r>o+1?f.createRange(o,r-1):null;r++}}return null},i.prototype.$_checkMerge=function(t,e,i,o){if(e>=0){var n=e,r=this._flags[n];t.getItem(n);if(r<=0)return null;if(i)for(;n>o&&!(this._flags[n-1]r||this._flags[a]<=0)return a>n+1?f.createRange(n,a-1):t.getItem(n).isDataRow?null:f.createRange(n,a-1);a++}if(a>n)return a>n+1?f.createRange(n,a-1):t.getItem(n).isDataRow?null:f.createRange(n,a-1)}return null},i.MERGE_ROOMS="mergeRooms",i}(l.Base);return Ln.CheckBarMergeManager=b,Ln}var Bn,Vn,An,Nn={},$n={},Un={},Hn={},Gn={};function Wn(){if(Bn)return Gn;Bn=1,Object.defineProperty(Gn,"__esModule",{value:!0}),Gn.Point=void 0;var t=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e}return t.prototype.setEmpty=function(){return this.x=this.y=0,this},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.toString=function(){return"{x: "+this.x+", y: "+this.y+"}"},t}();return Gn.Point=t,Gn}function jn(){if(Vn)return Hn;Vn=1,Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.ViewLayer=Hn.LayerElement=Hn.VisualElement=void 0;var t=d,e=et(),i=Wn(),o=E(),n=S(),r=function(e){function r(t,i){void 0===i&&(i=null);var o=e.call(this)||this;o._x=0,o._y=0,o._width=0,o._height=0,o._visible=!0,o._mouseEnabled=!0,o._elements=null,o._dirty=!0,o._className="",o._name=i;var n=o._dom=o._createDom(t);return n&&o._initDom(n),o}return t.__extends(r,e),r.prototype._doDispose=function(){if(this._dom&&(n.Utils.detach(this._dom),this._dom=null),this._elements){for(var t=0,i=this._elements;t=0},r.prototype.getAncestor=function(t){for(var e=this._parent;e;){if(e instanceof t)return e;e=e._parent}return null},r.prototype.addChild=function(t){return this.insertChild(-1,t)},r.prototype.insertChild=function(t,e){if(e&&!this.contains(e)){var i=this._elements||[],o=e._dom;if(t<0||t>=i.length)this._dom&&o&&this._dom.appendChild(o),i.push(e);else{if(o){var n=this._elements[t]._dom;this._dom&&n&&this._dom.insertBefore(o,n)}i.splice(t,0,e)}return this._elements=i,e._parent=this,e.$_attached(this),this.invalidate(),!0}return!1},r.prototype.removeChild=function(t){if(t&&this._elements){var e=this._elements.indexOf(t);if(e>=0)return this.removeChildAt(e)===t}return!1},r.prototype.removeChildAt=function(t){if(t>=0&&t0?this.removeChildAt(this._elements.length-1):null},r.prototype.clear=function(){var t=this._elements;if((t?t.length:0)>0){for(var e=0,i=t;e=0&&t=0&&e=0&&t=0&&e0)for(var r=n-1;r>=0;r--){var s=o[r];if(s.visible){var a=t-s._x,l=e-s._y;if((i||s._mouseEnabled)&&(s.isLayer||s.hitTest(a,l))){var h=s.findChildAt(a,l,i);if(h)return h;if(!s.isLayer&&s._mouseEnabled)return s}}}return null},r.prototype.move=function(t,e){t==this._x&&e==this._y||(this._x=t,this._y=e,this.invalidate())},r.prototype.resize=function(t,e){t==this._width&&e==this._height||(this._width=t,this._height=e,this.invalidate())},r.prototype.setBounds=function(t,e,i,o){t==this._x&&e==this._y&&i==this._width&&o==this._height||(this._x=t,this._y=e,this._width=i,this._height=o,this.sizeChanged())},r.prototype.setRect=function(t){t.x==this._x&&t.y==this._y&&t.width==this._width&&t.height==this._height||(this._x=t.x,this._y=t.y,this._width=t.width,this._height=t.height,this.sizeChanged())},r.prototype.setRectI=function(t){var e=t.x>>0,i=t.y>>0,o=t.width>>0,n=t.height>>0;e==this._x&&i==this._y&&o==this._width&&n==this._height||(this._x=e,this._y=i,this._width=o,this._height=n,this.sizeChanged())},r.prototype.draw=function(){this._dirty&&this._dom&&(this._beforeDraw(this._dom),this._doDraw(this._dom),this._dirty=!1)},r.prototype.resetSize=function(){this._dom&&this._setSizeStyle(this._dom.style)},r.prototype.setImportantStyle=function(t,e){this._dom.style.setProperty(t,e,"important")},r.prototype._createDom=function(t){return t.createElement("div")},r.prototype._initDom=function(t){var e=t.style;e.position="absolute",e.boxSizing="border-box"},r.prototype.$_attached=function(t){this._doAttached(t)},r.prototype._doAttached=function(t){},r.prototype.$_detached=function(t){this._doDetached(t)},r.prototype._doDetached=function(t){},r.prototype._setSizeStyle=function(t){t.width=this._width+"px",t.height=this._height+"px"},r.prototype._getCssDisplay=function(){return"block"},r.prototype.resetStyleName=function(){this._setClassName(this._dom)},r.prototype._setClassName=function(t){var e=this._getCssSelector();e!=this._className&&(this._className=e,(t||this._dom).className=e||"")},r.prototype.applyBounds=function(){var t=this._dom.style;t.left=this._x+"px",t.top=this._y+"px",this._setSizeStyle(t)},r.prototype._beforeDraw=function(t){this._setClassName(t);var e=t.style;e.left=this._x+"px",e.top=this._y+"px",this._setSizeStyle(e)},r.prototype._hoverChanged=function(){},r.prototype._visibleChanged=function(){},r.prototype.sizeChanged=function(){this.invalidate(),this._doSizeChanged()},r.prototype._doSizeChanged=function(){},r}(e.EventAware);Hn.VisualElement=r;var s=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(i,e),_dp(i,"isLayer",{get:function(){return!0}}),i.prototype._getCssSelector=function(){},i.prototype._doDraw=function(t){},i}(r);Hn.LayerElement=s;var a=function(e){function i(t,i){void 0===i&&(i=!1);var o=e.call(this,t)||this;return o._active=i,o}return t.__extends(i,e),_dp(i,"active",{get:function(){return this._active}}),i}(s);return Hn.ViewLayer=a,Hn}function zn(){return An||(An=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionLayer=t.SelectionMask=t.SelectionView=t.ColumnSelection=t.RowSelection=t.BlockSelection=t.SelectionManager=t.SelectionItem=t.isColumnSelection=t.isRowSelection=t.isSingleSelectionStyle=t.SelectionDisplay=t.SelectionStyle=t.SelectionMode=void 0;var e,i,o,n=d,r=G(),s=cn(),a=et(),l=jn(),h=E(),u=S();!function(t){t.NONE="none",t.SINGLE="single",t.EXTENDED="extended"}(e=t.SelectionMode||(t.SelectionMode={})),function(t){t.BLOCK="block",t.GROUP="group",t.ROWS="rows",t.COLUMNS="columns",t.SINGLE_ROW="singleRow",t.SINGLE_COLUMN="singleColumn",t.SINGLE="single",t.NONE="none"}(i=t.SelectionStyle||(t.SelectionStyle={})),(o=t.SelectionDisplay||(t.SelectionDisplay={})).CELL="cell",o.CELL_AND_BORDER="cellAndBorder",o.MASK="mask";t.isSingleSelectionStyle=function(t){return t==i.SINGLE_ROW||t==i.SINGLE_COLUMN||t==i.SINGLE};t.isRowSelection=function(t){var e=t&&t.style;return e==i.ROWS||e==i.SINGLE_ROW};t.isColumnSelection=function(t){var e=t&&t.style;return e==i.COLUMNS||e==i.SINGLE_COLUMN};var c=function(t){function e(e,i){var o=t.call(this)||this;return o._manager=e,o._runStyle=i,o}return n.__extends(e,t),e.prototype._doDispose=function(){t.prototype._doDispose.call(this)},_dp(e,"grid",{get:function(){return this._manager&&this._manager.grid}}),_dp(e,"runStyle",{get:function(){return this._runStyle}}),e.prototype.setValues=function(t,e){var i=this.grid.dataSource,o=this._getRows(),n=this.grid,r={};if(o&&o.rows&&o.rows.length>0&&o.fields&&o.fields.length>0){for(var s=o.rows,a=0;a=0)&&i.push(a)}return i},e.prototype.getItemIndices=function(t){void 0===t&&(t=!0);for(var e=this.grid,i=[],o=this.getBounds(),n=o.top,r=o.bottom,s=n;s<=r;s++){var a=e.getItem(s);a&&(!t||a.dataRow>=0)&&i.push(a.index)}return i},e.prototype.getRows=function(){for(var t=this.grid,e=[],i=this.getBounds(),o=i.top,n=i.bottom,r=o;r<=n;r++){var s=t.getItem(r);if(s&&s.dataRow>=0){var a=s.dataRow;a>=0&&e.push(a)}}return e},e.prototype._resized=function(){this._manager&&this._manager.$_itemResized(this)},e.prototype.toProxy=function(){var t=this.grid,e=this.getBounds(),i=t.getItem(e.r1),o=t.getItem(e.r2);return{style:this.style,startItem:e.r1,startRow:i?i.dataRow:-1,startColumn:e.c1.firstColumn.name,endItem:e.r2,endRow:o?o.dataRow:-1,endColumn:e.c2.lastColumn.name,startLayout:e.c1,endLayout:e.c2}},_dp(e,"startItem",{get:function(){return this.getBounds().r1}}),_dp(e,"startRow",{get:function(){var t=this.grid.getItem(this.getBounds().r1);return t?t.dataRow:-1}}),_dp(e,"startColumn",{get:function(){return this.getBounds().c1.firstColumn.name}}),_dp(e,"endItem",{get:function(){return this.getBounds().r2}}),_dp(e,"endRow",{get:function(){var t=this.grid.getItem(this.getBounds().r2);return t?t.dataRow:-1}}),_dp(e,"endColumn",{get:function(){return this.getBounds().c2.firstColumn.name}}),_dp(e,"startLayout",{get:function(){return this.getBounds().c1}}),_dp(e,"endLayout",{get:function(){return this.getBounds().c2}}),e}(r.Base);t.SelectionItem=c;var p=function(o){function r(t){var e=o.call(this)||this;return e._items=[],e._locked=!1,e._grid=t,e}return n.__extends(r,o),r.prototype._doDispose=function(){this._grid=null,this._items=null,o.prototype._doDispose.call(this)},_dp(r,"grid",{get:function(){return this._grid}}),_dp(r,"exclusiveMode",{get:function(){return this._grid.displayOptions.selectionMode!==e.EXTENDED}}),_dp(r,"count",{get:function(){return this._items.length}}),_dp(r,"single",{get:function(){return 1==this._items.length&&this._items[0].single}}),r.prototype.lock=function(){this._locked=!0},r.prototype.unlock=function(){this._locked=!1},r.prototype.getItem=function(t){return this._items[t]},r.prototype.getItemByIndex=function(t,e){for(var i=this._items.length-1;i>=0;i--){var o=this._items[i];if((!e||o instanceof e)&&o.contains(t.itemIndex,t.layout))return o}},r.prototype.getItems=function(){return this._items.slice()},r.prototype.lastItem=function(){return this._items[this._items.length-1]},r.prototype.add=function(t,e,o,n){if(this._locked)return null;if(o==i.NONE)return this.clear(!0),null;this.exclusiveMode&&this.clear(!0);var r=null;switch(o){case i.COLUMNS:r=new g(this,o,t.layout.first,e.layout.last);break;case i.SINGLE_COLUMN:r=new g(this,o,t.layout.first,t.layout.first);break;case i.ROWS:r=new f(this,o,t.itemIndex,e.itemIndex);break;case i.SINGLE_ROW:r=new f(this,o,t.itemIndex,t.itemIndex);break;case i.BLOCK:r=new _(this,o,t,e);break;case i.GROUP:(t=t.clone()).layout=t.layout.root.first,(e=e.clone()).layout=e.layout.root.last.source,r=new _(this,o,t,e);break;case i.SINGLE:r=new _(this,o,t,t)}return r&&this.$_addItem(r,n)},r.prototype.remove=function(t){if(!this._locked){var e=this._items.indexOf(t);e>=0&&(this._items.splice(e,1),this.fireEvent(r.REMOVED,t),this._changed())}},r.prototype.clear=function(t){this._locked||this._items.length>0&&(this._items.length=0,this.fireEvent(r.CLEARED,t))},r.prototype.selectBlock=function(t,e){e&&this.clear(!0),this.containsCell(t)||this.$_addItem(new _(this,i.BLOCK,t,t,!0),!0)},r.prototype.selectRow=function(t,e){e&&this.clear(!0),this.containsItem(t,f)||this.$_addItem(new f(this,i.ROWS,t,t),!0)},r.prototype.containsItem=function(t,e){for(var i=0,o=this._items.length;io.layout.root.vindex&&(e=this._endIndex.clone(),o=this._startIndex.clone()),e.layout=e.layout.root.first,o.layout=o.layout.root.last);if(s.CellIndex.areEquals(e,o))return s.CellRange.create(e);var n=t.activeCellLayout._dataCells,r=e.layout,a=o.layout,l=void 0,h=void 0;return r.col<=a.col?(l=n[0][r.col],h=n[n.length-1][a.col]):(l=n[0][a.col],h=n[n.length-1][r.col]),s.CellRange.createRange(e.itemIndex,l,o.itemIndex,h)},e.prototype.containsItem=function(t){var e=Math.min(this._startIndex.itemIndex,this._endIndex.itemIndex),i=Math.max(this._startIndex.itemIndex,this._endIndex.itemIndex);return t>=e&&t<=i},e.prototype.containsLayout=function(t){if(!t)return!1;if(this.single)return this._startIndex.layout===t;var e=t.distance,i=this._startIndex.layout.distance,o=this._endIndex.layout.distance;return i=i&&e<=o:e>=o&&e<=i},e.prototype.contains=function(t,e){return this.getBounds().contains(t,e)},e.prototype.resizeTo=function(t){var e=this.grid,i=e.displayOptions;e.isValid(t)&&!s.CellIndex.areEquals(t,this._endIndex)&&(i.selectAtSingleRow&&(t.itemIndex=this.startItem),this._endIndex.assign(t),this._resized())},e.prototype.moveRow=function(t){this._startIndex.itemIndex+=t,this._endIndex.itemIndex+=t},e.prototype.intersectsWith=function(t){return this.getBounds().intersectsWith(t.getBounds())},e.prototype.mergeWith=function(t){},e.prototype.getData=function(t){if(void 0===t&&(t=-1),0==t)return null;var e,i=this.grid,o=this.getBounds(),n=this.single?[o.c1.firstColumn]:i.collectDataColumns(o.c1,o.c2);if(!n||(e=n.length)<1)return null;for(var r=o.r1,s=o.r2,a=[],l=r;l<=s;l++){var h=i.getItem(l);if(h&&h.isDataRow){var u={};u.__rowId=h.dataRow;for(var d=0;d0&&a.length==t)break}}return a},e.prototype._inflateLeft=function(t){this._startIndex.layout.distance<=this._endIndex.layout.distance?t.layout!==this._startIndex.layout&&(this._startIndex.layout=t.layout,this._resized()):t.layout!==this._endIndex.layout&&(this._endIndex.layout=t.layout,this._resized())},e.prototype._inflateRight=function(t){this._startIndex.layout.distance>this._endIndex.layout.distance?t.layout!==this._startIndex.layout&&(this._startIndex.layout=t.layout,this._resized()):t.layout!==this._endIndex.layout&&(this._endIndex.layout=t.layout,this._resized())},e.prototype._inflateTop=function(t){var e=this.grid,i=Math.max(0,Math.min(e.itemCount-1,t.itemIndex));this._startIndex.itemIndex<=this._endIndex.itemIndex?i!==this._startIndex.itemIndex&&(this._startIndex.itemIndex=i,this._resized()):i!==this._endIndex.itemIndex&&(this._endIndex.itemIndex=i,this._resized())},e.prototype._inflateBottom=function(t){var e=this.grid,i=Math.max(0,Math.min(e.itemCount-1,t.itemIndex));this._startIndex.itemIndex>this._endIndex.itemIndex?i!==this._startIndex.itemIndex&&(this._startIndex.itemIndex=i,this._resized()):i!==this._endIndex.itemIndex&&(this._endIndex.itemIndex=i,this._resized())},e.prototype._getRows=function(){var t=this.grid,e=t.collectDataColumns(this._startIndex.layout,this._endIndex.layout);if(e&&!(e.length<1)){for(var i=Math.min(this._startIndex.itemIndex,this._endIndex.itemIndex),o=Math.max(this._startIndex.itemIndex,this._endIndex.itemIndex),n=[],r=[],s=i;s<=o;s++)n.push(t.getItem(s).dataRow);for(var a=0,l=e;a=this.topRow&&t<=this.bottomRow},e.prototype.containsLayout=function(t){return!0},e.prototype.resizeTo=function(t){var e=Math.max(0,t.itemIndex);e!=this._endRow&&(this._endRow=Math.max(0,Math.min(this.grid.itemCount-1,e)),this._resized())},e.prototype.moveRow=function(t){this._startRow+=t,this._endRow+=t},e.prototype.intersectsWith=function(t){return this.getBounds().intersectsWith(t.getBounds())},e.prototype.mergeWith=function(t){},e.prototype.getData=function(t){if(void 0===t&&(t=-1),0==t)return null;var e=this.grid,i=e.collectDataColumns(e.getVisibleLayout(0),e.getVisibleLayout(e.visibleLayoutCount-1));if(!i)return null;var o=i.length;if(o<1)return null;for(var n=Math.max(0,Math.min(this._startRow,this._endRow)),r=Math.min(e.itemCount-1,Math.max(this._startRow,this._endRow)),s=[],a=n;a<=r;a++){var l=e.getItem(a);if(l&&l.isDataRow){var h={};h.__rowId=l.dataRow;for(var u=0;u0&&s.length==t)break}}return s},e.prototype._inflateLeft=function(t){},e.prototype._inflateRight=function(t){},e.prototype._inflateTop=function(t){var e=t.itemIndex;e!=this.topRow&&(this._startRow<=this._endRow?this._startRow=Math.max(0,Math.min(this.grid.itemCount-1,e)):this._endRow=Math.max(0,Math.min(this.grid.itemCount-1,e)),this._resized())},e.prototype._inflateBottom=function(t){var e=t.itemIndex;e!=this.bottomRow&&(this._startRow>this._endRow?this._startRow=Math.max(0,Math.min(this.grid.itemCount-1,e)):this._endRow=Math.max(0,Math.min(this.grid.itemCount-1,e)),this._resized())},e.prototype._getRows=function(){var t=this.grid,e=t.activeCellLayout,i=t.collectDataColumns(e.first,e.last);if(i&&!(i.length<1)){for(var o=Math.max(0,Math.min(this._startRow,this._endRow)),n=Math.min(t.itemCount-1,Math.max(this._startRow,this._endRow)),r=[],s=[],a=o;a<=n;a++)r.push(t.getItem(a).dataRow);for(var l=0,h=i;lthis._endLayout.col?this._startLayout:this._endLayout}}),_dp(e,"style",{get:function(){return this._runStyle||i.COLUMNS}}),_dp(e,"single",{get:function(){return!1}}),e.prototype.getBounds=function(){var t=this.grid.activeCellLayout,e=this._startLayout,i=this._endLayout;if(e.col>i.col){var o=e;e=i,i=o}e=t.getTopOf(e),i=t.getBottomOf(i,!0);var n=this.grid.itemCount-1;return s.CellRange.createRange(0,e,n,i)},e.prototype.contains=function(t,e){return this.containsLayout(e)},e.prototype.containsItem=function(t){return!0},e.prototype.containsLayout=function(t){return t.col>=this.leftLayout.col&&t.col<=this.rightLayout.col},e.prototype.resizeTo=function(t){t.layout!==this._endLayout&&(this._endLayout=t.layout,this._resized())},e.prototype.moveRow=function(t){},e.prototype.intersectsWith=function(t){return this.getBounds().intersectsWith(t.getBounds())},e.prototype.mergeWith=function(t){},e.prototype.getData=function(t){if(void 0===t&&(t=-1),0==t)return null;var e=this.grid,i=e.collectDataColumns(this._startLayout,this._endLayout);if(!i)return null;for(var o=e.itemCount,n=[],r=0;r0&&n.length==t)break}}return n},e.prototype._inflateLeft=function(t){var e=t.layout;e!==this.leftLayout&&(this._startLayout.distance<=this._endLayout.distance?this._startLayout=e:this._endLayout=e,this._resized())},e.prototype._inflateRight=function(t){var e=t.layout;e!==this.rightLayout&&(this._startLayout.distance>this._endLayout.distance?this._startLayout=e:this._endLayout=e,this._resized())},e.prototype._inflateTop=function(t){},e.prototype._inflateBottom=function(t){},e.prototype._getRows=function(){var t=this.grid,e=t.collectDataColumns(this._startLayout,this._endLayout);if(e){for(var i=t.itemCount,o=[],n=[],r=0;rl&&(n._bottomed=!0,e.bottom=l)}n.visible=a,n.visible&&(n.setRectI(e),n.updateElement(),n.invalidate())}},e.prototype.$_getSelectionRowsRect=function(t,e,i,o){var n,r,s=this._grid,a=e.getBounds(),l=a.r1,h=a.r2,u=t.itemCount,d=t.fixedItemCount,c=s.topIndex;if(d>0){if(l>=c+d+u||h<0||l>=d&&h=c?(r=t.getTableItemBounds(Math.min(t.itemCount+d-1,h-c))).y=Math.max(r.y,p):r=n}else{if(!(u>0))return!1;if(l>=c+u||h0?t.rightContentBounds.right:t.contentBounds.right,!0},e.prototype.$_getSelectionColumnsRect=function(t,e,i,o,n){var r=this._grid,s=e.getBounds(),a=t.fixedLayoutCount,l=t.fixedCellCount,h=t.rightLayoutCount,u=s.c1.col,d=s.c2.col,c=r.fixedOptions.rightBarWidth,p=t.getDataRect(s.c1),_=t.getDataRect(s.c2),f=a>0&&u0&&f?p.x:Math.min(p.x,_.x),o.right=Math.max(p.right,_.right),o.y=t.contentBounds.y+t.headerBounds.bottom+t.summaryBounds.height,o.height=Math.min(t.dataBounds.height,t.footerBounds.y),n&&n.copy(o),u>=l){var g=t.fixedContentBounds.right;o.x=l){var m=t.getDataRect(t.getLayout(a-1));o.right0){var y=t.rightFirstCell,v=t.rightContentBounds;o.left>=v.left+c?u>=y?o.width=_.right-p.left:d>=y?(o.width=Math.max(0,_.right-v.left-(_.left-v.left-c==0?c:0)),o.left=v.left+c):o.width=0:d=v.left&&(o.right=Math.min(o.right,v.x),i._righted=!0)}return!0},e.prototype.$_getSelectionRangeRect=function(t,e,i,o,n){var r=this._rangeRect;return!!this.$_getSelectionRowsRect(t,e,i,r)&&(o.y=r.y,o.bottom=r.bottom,this.$_getSelectionColumnsRect(t,e,i,r,n),o.x=r.x,o.right=r.right,n&&(n.y=o.y,n.height=o.height),!0)},e}(l.LayerElement);t.SelectionLayer=v}(Un)),Un}var Yn,qn,Xn={},Kn={};function Zn(){if(qn)return Xn;qn=1,Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.PopupCellEditor=Xn.EditorMarquee=Xn.NumberCellEditor=Xn.MultiLineCellEditor=Xn.PasswordCellEditor=Xn.LineCellEditor=Xn.TextCellEditor=Xn.TextCellEditorBase=Xn.EditMask=Xn.CellEditor=void 0;var t=d,e=S(),i=et(),o=cn(),n=function(){if(Yn)return Kn;Yn=1,Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.DateTimeConverter=void 0;var t=$(),e=rt(),i=S(),o=function(){function o(i){this._format=i,this._reader=t.DateTimeReader.getReader(i),this._writer=e.DateTimeWriter.getFormatter(i),o.validateDateFormat(i)}return o.getConverter=function(t){var e=o.Formatters;if(e[t])return e[t];var i=new o(t);return e[t]=i},o.validateDateFormat=function(t){if(t=t&&t.trim()){var e=t.indexOf("a")>=0||t.indexOf("A")>=0;if(e&&t.indexOf("H")>=0)throw"Invalid datetime read format - 'H'와 'a'가 같이 존재할 수 없습니다: "+t;if(t.indexOf("h")>=0&&!e)throw"Invalid datetime read format - 'h'가 있으면 'a'가 반드시 있어야 합니다: "+t}},_dp(o,"format",{get:function(){return this._format}}),o.prototype.getDate=function(t){return this._reader.toDate(t,!0)},o.prototype.getDateNull=function(t){try{return this.getDate(t)}catch(e){return i.Utils.log("getDateNull Fail string => ".concat(t)),null}},o.prototype.getText=function(t){return this._writer.getText(t)},o.DEFAULT_FORMAT="yyyy/MM/dd",o.Formatters={},o.Default=o.getConverter(o.DEFAULT_FORMAT),o}();return Kn.DateTimeConverter=o,Kn}(),r=P(),s=E(),a=C(),l=Ko(),h=ft(),u=jn(),c=Ct(),p=_t(),_=e.Utils.isSafari?1:0,f=function(i){function h(t,o){var l=i.call(this)||this;if(l._textCase=a.TextInputCase.DEFAULT,l._readOnly=!1,l._textReadOnly=!1,l._allowEmpty=!1,l._isMobile=e.Utils.isMobile(),l._isTablet=e.Utils.isTablet(),l._started=!1,l._dateConverter=n.DateTimeConverter.Default,l._boolConverter=r.BooleanConverter.Default,l._cellBounds=new s.Rectangle,l._checkHangeul=!1,l._composing=!1,l._grid=t,l._options=t.editorOptions,l._parentElement=o,l._editor=l._createEditor(o),l._editor.className=h.EDITOR_CSS+l._getInputSelector(),l._container&&(l._container.className=h.CONTAINER_CSS),l._editor.$_owner=l,l._editIndex=t.getIndex(),l._editor){var u=t.container;u.$_addListener(l._editor,"focus",function(t){this._grid.$_setEditFocused(!0,t)}.bind(l),!1),u.$_addListener(l._editor,"focusin",function(t){this._grid.$_setEditFocused(!0,t)}.bind(l),!1),u.$_addListener(l._editor,"blur",function(t){this._grid.$_setEditFocused(!1,t)}.bind(l),!1),u.$_addListener(l._editor,"focusout",function(t){this._grid.$_setEditFocused(!1,t)}.bind(l),!1)}return l.setVisible(!1,!0),l.$_setEditorId(l._editor),l}return t.__extends(h,i),h.$_copyProc=function(t,e){if(!t.isDisabled()){var i=t._grid;t.editing||i.copyToClipboard(e,null)}},h.copyCutProc=function(t,i){i.preventDefault();var o=t._editor,n=(0,e.getDoc)(t._editor);return 67==i.keyCode||45==i.keyCode?(n.execCommand("copy"),!0):88==i.keyCode&&(o.value="cut",o.setSelectionRange(0,3),n.execCommand("cut"),o.value="",!0)},h.prototype._copyHandler=function(t){h.$_copyProc(this,t)},h.prototype._pasteHandler=function(t){if(!this.isDisabled()){var e=this._grid.pasteOptions;try{var i=void 0,o=(t.originalEvent||t).clipboardData;if(null!=(i=o?o.getData("text/plain"):window.clipboardData.getData("text"))){if(this.visible)return this._doPaste(t,i),this._doChanged(),void t.stopPropagation();t.preventDefault(),this._grid.pasteFromClipboard(i,t)}}catch(t){if(t instanceof l.ValidationError){if(e.throwValidationError)throw t}else if(t instanceof l.AbortError)alert(t.message);else if(t)throw t}}},h.prototype._doPaste=function(t,e){},h.initDefault=function(i){for(var o=[],n=1;n_&&parseInt(this._container.style.height)>_}}),h.prototype.setVisible=function(t,i){void 0===i&&(i=!1);var o=i?!t:this.visible;if(!t&&(this._container.style.width=_+"px",this._container.style.height=_+"px",e.Utils.isMobile())){var n=this._grid;if(n){var r=n.container._containerDom,s=(0,e.getDoc)(this._container);this._editor===s.activeElement&&r&&r.focus({preventScroll:!0})}else this._editor.blur()}t!=o&&this._doVisibleChanged(t)},h.prototype._doVisibleChanged=function(t){this.setEditorZIndex(t)},_dp(h,"readOnly",{get:function(){return this._readOnly},set:function(t){var i=(0,e.getWin)(this._container);this._editor instanceof i.HTMLInputElement&&(this._editor.readOnly=this._readOnly=t)}}),_dp(h,"textReadOnly",{get:function(){return this._textReadOnly}}),h.prototype._setTextReadOnly=function(t){t!=this._textReadOnly&&(this._textReadOnly=t,this._changed())},_dp(h,"allowEmpty",{get:function(){return this._allowEmpty}}),h.prototype._setAllowEmpty=function(t){t!=this._allowEmpty&&(this._allowEmpty=t,this._changed())},_dp(h,"editing",{get:function(){return this._started}}),_dp(h,"editIndex",{get:function(){return this._editIndex}}),_dp(h,"value",{get:function(){return this._editor.value}}),_dp(h,"listing",{get:function(){return!1}}),h.prototype.hasButton=function(t,e){return!1},h.prototype.applyOptions=function(t){t&&this.assignFrom(t)},h.prototype.setEditIndex=function(t){this._editIndex.assign(t)},h.prototype.setController=function(t){this._controller=t},h.prototype.prepare=function(){!this.native&&this._editor&&this._editor.removeAttribute("type")},h.prototype.unprepare=function(){},h.prototype.beginEdit=function(t,e){this._started||(this._started=this._doBeginEdit())&&(t&&this.clear(),e&&this.selectAll())},h.prototype.endEdit=function(){this._started&&(this._doEndEdit(),this._started=!1)},h.prototype.isEdited=function(){return!1},h.prototype.isDisabled=function(){return!this._grid||this._grid.container.disabled},h.prototype.caretToLast=function(){},h.prototype.commit=function(){this._doCommit()},h.prototype.setReadOnly=function(t){this._editor.readOnly=this._readOnly=t},h.prototype.getEditValue=function(t,e){},h.prototype.getEditListItem=function(){},h.prototype.setEditValue=function(t){this._oldValue=t},h.prototype.setCellEditValue=function(t,e){!this.readOnly&&this._requestStart(e)&&(this.setEditValue(t),this._doChanged())},h.prototype.getEditText=function(){return""},h.prototype.selectAll=function(t){void 0===t&&(t=!1),this._grid.$_editFocused&&(!t&&e.Utils.isMobile()||this._selectAll())},h.prototype.clear=function(){var t=(0,e.getWin)(this._container);this._editor instanceof t.HTMLInputElement&&(this._editor.value="")},h.prototype.setFocus=function(){var t=!e.Utils.isMobile();this._grid.accessibility&&this.attach(this._grid.getEditContainer(this.editIndex)),!this._grid.handler._draggable&&this._editor.focus({preventScroll:t})},h.prototype.setEditorTitle=function(t){},h.prototype.setBounds=function(t,e,i,o,n){},h.prototype.setCellBounds=function(t,e,i,o){this._cellBounds.set(t,e,i,o)},h.prototype.closeList=function(t){},h.prototype.dropDownList=function(t){},h.prototype.buttonClicked=function(t,e){!this.listing&&this.dropDownList(!1)},h.prototype.buttonDown=function(t,e){},h.prototype.buttonUp=function(t,e){},h.prototype.skipMaskChar=function(t){return!1},h.prototype.setButtonStyle=function(t,e,i,o,n){return!1},h.prototype.attach=function(t){e.Utils.addChild(t,this._container)},h.prototype.detach=function(){e.Utils.detach(this._container)},h.prototype.setInert=function(t){var e=this._container;t?(this._inertTimer&&clearTimeout(this._inertTimer),e.removeAttribute("inert"),this.editor.removeAttribute("aria-hidden")):(this._inertTimer&&clearTimeout(this._inertTimer),this._inertTimer=setTimeout((function(){e.setAttribute("inert","")}),0),this.editor.setAttribute("aria-hidden","true"))},h.prototype.initOptions=function(){this._emptyValue=void 0,this.booleanFormat=null,this._todayChar=null,this._nowChar=null,this.datetimeFormat=null,this._textCase=a.TextInputCase.DEFAULT,this._checkHangeul=!1,this._composing=!1},h.prototype.$_setEditorId=function(t){},h.prototype._changed=function(){},h.prototype.$_setController=function(t){this._controller=t},h.prototype._editField=function(){return this._grid.dataSource?this._grid.dataSource.getField(this._editIndex.dataField):null},h.prototype._isDateEditor=function(){return!1},h.prototype._requestStart=function(t){return this._started?this._started:(this.selectAll(),this._controller.onEditorStart(this))},h.prototype._valToStr=function(t){var i=this.editIndex,o="";try{if(void 0!==t||this._mask){var n=i.grid.dataSource.getField(i.dataField);if(n)switch(n.dataType){case a.ValueType.DATETIME:t&&(o=this._dateConverter.getText(t)),this._mask&&(o=this._mask.writeBuffer(o));break;case a.ValueType.BOOLEAN:o=this._boolConverter.toText(t);break;case a.ValueType.NUMBER:isNaN(t)||(o=e.Utils.toStr(t));break;case a.ValueType.OBJECT:var r=i.column._objectKey||n.objectKey;t&&(o=r?t[r]:null!=t&&"object"==typeof t?JSON.stringify(t):"");break;default:o=this._mask?this._mask.writeBuffer(t):t}else o=t}}catch(e){o=t}return null==o?"":o},h.prototype._strToVal=function(t){t=e.Utils.toStr(t);var i=this._editIndex,o=i.dataColumn&&this._textCase==a.TextInputCase.DEFAULT?i.dataColumn.textInputCase:this._textCase;try{var n=i.grid.dataSource.getField(i.dataField);if(n){var r=n.dataType;if(r==a.ValueType.DATETIME||t&&this._isDateEditor()&&r==a.ValueType.TEXT){var s=r==a.ValueType.DATETIME,l=null;return t&&t==this._nowChar&&(l=new Date),!l&&t&&t==this._todayChar&&(l=new Date).setHours(0,0,0,0),l||(this._mask&&(t=this._mask.getStripValue()),l=this._dateConverter.getDate(t)),s?!l||isNaN(l.getFullYear())?void 0:l:l?this._dateConverter.getText(l):void 0}if(r==a.ValueType.BOOLEAN)return this._boolConverter.toBoolEx(t);if(r==a.ValueType.NUMBER)return parseFloat(t);r==a.ValueType.TEXT&&this._mask&&(t=this._mask.getStripValue())}return o===a.TextInputCase.UPPER?t?t.toLocaleUpperCase():t:o===a.TextInputCase.LOWER&&t?t.toLocaleLowerCase():t}catch(t){return}},h.prototype._dispatchKeyDown=function(t){return this._controller,this._controller.onEditorKeyDown(this,t)},h.prototype._dispatchKeyPress=function(t){return this._controller,this._controller.onEditorKeyPress(this,t)},h.prototype._dispatchKeyUp=function(t){return this._controller,this._controller.onEditorKeyUp(this,t)},h.prototype._dispatchChange=function(){this._controller.onEditorChange(this)},h.prototype._dispatchSearch=function(t){this._controller.onEditorSearch(this,t)},h.prototype._dispatchSearchCellButtonClick=function(t){return this._controller.onSearchCellButtonClick(this,t)},h.prototype._dispatchCommit=function(){this._controller.onEditorCommit(this)},h.prototype._sendToParent=function(t,i,n){void 0===i&&(i=void 0);try{var r=e.Utils.ctrlKey(t);if(2==i){if(this._dispatchKeyPress(t))return t.preventDefault&&(t.preventDefault(),t.stopImmediatePropagation()),!0}else if(3==i){if(this._dispatchKeyUp(t))return t.preventDefault&&(t.preventDefault(),t.stopImmediatePropagation()),!0;try{var s=this._controller._grid,a=s.editOptions;if(a.maxLengthToNextCell){var h=a.skipReadOnly,u=s.activeTool,d=this.maxLength,c=this.editIndex.clone(),p=e.Utils.included(t.keyCode,38,33,40,34,113,9,13);if(!this._checkHangeul&&!p&&!r&&!t.altKey&&s&&s.isEditing(c)&&d>0&&!this._composing&&t.keyCode>47){var _=this._mask?this._mask.getStripValue():this._editor.value;if(this instanceof I&&this.maxLengthExceptComma){var f=this.getEditValue();isNaN(f)&&null!=f||(_=String(f))}if(_&&_.length>=d)return s.getBodyViewAt(c).spanRight(s.layoutManager,c),c.right(),h&&u._checkReadOnly(c)&&(u._skipReadOnly(c,1)||(c=this.editIndex.clone())),o.CellIndex.areEquals(c,this.editIndex)||u.setFocused(c,!0,!0),!0}}}catch(t){if(t instanceof l.ValidationError)throw t;return!0}}else if(this._dispatchKeyDown(t))return t.preventDefault&&(t.preventDefault(),t.stopImmediatePropagation()),!0;return!1}finally{}},h.Unselected={},h.InvalidFormat={},h.EDITOR_CSS="rg-editor ",h.CONTAINER_CSS="rg-editor-container",h}(i.EventAware);Xn.CellEditor=f;var g=function(){function t(t,e){this._includedFormat=!1,this._showInvalidFormatMessage=!0,this._overwrite=!1,this._allowEmpty=!1,this._restrictNull=!1,this._definitions={9:/[0-9 ]/,0:/[\d]/,a:/[A-Za-z]/,"*":/[A-Za-z0-9]/},this._tests=null,this._defBuffer=[],this._editor=t,e&&this.setOptions(e)}return t.prototype.dispose=function(){return this._definitions=null,this._tests=null,this._editor._editor&&(this._editor._editor.onclick=null),this._editor=null,null},_dp(t,"includedFormat",{get:function(){return this._includedFormat},set:function(t){t!=this._includedFormat&&(this._includedFormat=t,this._changed())}}),_dp(t,"placeHolder",{get:function(){return this._placeHolder},set:function(t){t!=this._placeHolder&&(this._placeHolder=t,this._changed())}}),_dp(t,"editMask",{get:function(){return this._editMask},set:function(t){t!=this._editMask&&(this._editMask=t,this._changed())}}),_dp(t,"definitions",{get:function(){return this._definitions},set:function(t){t!=this._definitions&&(this._definitions=t,this._changed())}}),_dp(t,"invalidFormatMessage",{get:function(){return this._invalidFormatMessage},set:function(t){t!=this._invalidFormatMessage&&(this._invalidFormatMessage=t,this._changed())}}),_dp(t,"showInvalidFormatMessage",{get:function(){return this._showInvalidFormatMessage},set:function(t){t!=this._showInvalidFormatMessage&&(this._showInvalidFormatMessage=t,this._changed())}}),_dp(t,"overWrite",{get:function(){return this._overwrite},set:function(t){t!=this._overwrite&&(this._overwrite=t,this._changed())}}),_dp(t,"allowEmpty",{get:function(){return this._allowEmpty},set:function(t){t!=this._allowEmpty&&(this._allowEmpty=t,this._changed())}}),_dp(t,"restrictNull",{get:function(){return this._restrictNull},set:function(t){t!=this._restrictNull&&(this._restrictNull=t,this._changed())}}),t.prototype.clickHandler=function(t){this.restrictNull&&this._moveCaret()},t.prototype.clearBuffer=function(t,e){t=arguments.length>0?t:0,e=arguments.length>1?e:this._tests.length;for(var i=t;i0&&(t=t.concat(e),e=[]),t.push(this._buffer[i]));return t.join("")},t.prototype.setOptions=function(t){if("string"==typeof t)this.$_parseMask(t);else if(t.definitions&&this.$_parseDefinitions(t.definitions),t.placeHolder&&(this._placeHolder=t.placeHolder),t.editMask&&this.$_parseMask(t.editMask),null!=t.includedFormat&&(this._includedFormat=t.includedFormat),t.invalidFormatMessage&&(this._invalidFormatMessage=t.invalidFormatMessage),null!=t.allowEmpty&&(this._allowEmpty=t.allowEmpty),null!=t.showInvalidFormatMessage&&(this._showInvalidFormatMessage=t.showInvalidFormatMessage),null!=t.overwrite&&(this._overwrite=t.overwrite),null!=t.overWrite&&(this._overwrite=t.overWrite),null!=t.restrictNull&&(this._restrictNull=t.restrictNull),this._restrictNull&&this._editor){var e=this._editor._editor;!e.onclick&&(e.onclick=this.clickHandler.bind(this))}},t.prototype.checkValid=function(){var t=[];if(this.allowEmpty){for(var e=0,i=this._tests.length;e0?t:i.selectionStart,n=e=arguments.length>1?e:i.selectionEnd,r=t-1;r>=0;r--){if(this._tests[r]&&this._tests[r].test(this._buffer[r])){o=r+1;break}o=r}for(r=e-1;r>=0;r--){if(this._tests[r]&&this._tests[r].test(this._buffer[r])){n=r+1;break}n=r}if(o!=t||n!=e){for(r=o;r<=t&&!this._tests[r];r++)o++;for(r=n;r<=e&&!this._tests[r];r++)n++;return i.setSelectionRange(o,n),!0}return o!=t||n!=e},t.prototype.$_setCaret=function(t,e){this._editor._editor.setSelectionRange(t,e)},t.prototype.$_parseDefinitions=function(t){for(var e in t)"string"==typeof t[e]&&(this._definitions[e]=new RegExp(t[e]))},t.prototype.$_parseMask=function(t){var e=this._tests=[],i=this._definitions,o=t.split("");this._editMask=t,this._buffer=[];for(var n=0,r=o.length;nt?this._placeHolder[t]:this._tests[t]?"_":this._editMask&&this._editMask.length>t?this._editMask[t]:"_"},t.prototype.$_seekPrev=function(t){for(;--t>=0&&!this._tests[t];);return Math.max(0,t)},t.prototype.$_seekNext=function(t){for(;++t=0)for(var n=t,r=this.$_seekNext(e);i>n;n++)if(this._tests[n]){if(!(i>r&&this._tests[n].test(o[r])))break;o[n]=o[r],this._defBuffer[n]=this._defBuffer[r],o[r]=this.$_getPlaceHolder(r),this._defBuffer[r]="",r=this.$_seekNext(r)}},t.prototype.$_shiftR=function(t){for(var e,i,o=this._editMask.length,n=this._buffer,r=t,s=this.$_getPlaceHolder(t);o>r;r++)if(this._tests[r]){if(e=this.$_seekNext(r),i=n[r],this._defBuffer[r]=s,n[r]=s,!(o>e&&this._tests[e].test(i)))break;s=i}},t.prototype.keydown=function(t){var e=this._editor.editor;if(!e.readOnly){var i=t.which||t.keyCode,o=e.selectionStart,n=e.selectionEnd;if(46===i||8===i)o==n&&(o=46!==i?this.$_seekPrev(o):n=this.$_seekNext(o-1),n=46===i?this.$_seekNext(n):n),this.clearBuffer(o,n),!this._overwrite&&this.$_shiftL(o,n-1),e.value=this.writeBuffer(),this.$_setCaret(Math.max(0,o),Math.max(0,o));else if(39===i||35===i)return this._moveCaret();this._pStart=e.selectionStart}},t.prototype.keyPress=function(t){var e=this._editor.editor;if(!e.readOnly){this.restrictNull&&this._moveCaret();var i,o=e.selectionStart,n=e.selectionEnd,r=t.which||t.keyCode;this.clearBuffer(o,n),o!==n&&this.$_shiftL(o,n-1);var s=this.$_seekNext(o-1);this._editMask&&this._editMask.length>s&&this._tests[s]&&this._tests[s].test(i=String.fromCharCode(r))&&(!this._overwrite&&this.$_shiftR(o),this._buffer[s]=i,this._defBuffer[s]=i,e.value=this.writeBuffer(),s=this.$_seekNext(s),this.$_setCaret(Math.max(0,s),Math.max(0,s))),this._pStart=e.selectionStart}},t.prototype.input=function(t){var e=this._editor.editor;if(!e.readOnly){var i=e.value;/[ㄱ-ㅎㅏ-ㅣ가-힝]/.test(i)&&(e.value=e.value.replace(/[ㄱ-ㅎㅏ-ㅣ가-힝]/g,""),null!=this._pStart&&e.setSelectionRange(this._pStart,this._pStart))}},t}();Xn.EditMask=g;var m=function(i){function o(){var t=null!==i&&i.apply(this,arguments)||this;return t._maxLength=0,t._fontSize=0,t._modified=!1,t}return t.__extends(o,i),_dp(o,"maxLength",{get:function(){return this._maxLength},set:function(t){t!=this._maxLength&&(this._maxLength=t,this._changed())}}),_dp(o,"fontSize",{get:function(){return this._fontSize},set:function(t){this._fontSize=isNaN(t)?0:Math.max(0,t)}}),o.prototype._createContainer=function(t){var e=t.createElement("div"),i=e.style;return e.spellcheck=!1,i.position="absolute",i.width="0px",i.height="0px",i.padding="0px",i.margin="0px",e},o.prototype.initOptions=function(){i.prototype.initOptions.call(this),this._maxLength=0},_dp(o,"readonly",{set:function(t){this._editor.readOnly=this._readOnly=t}}),o.prototype.isEdited=function(){return this._modified},o.prototype.setVisible=function(t,e){i.prototype.setVisible.call(this,t,e);var o=this._container.style;t?(o.border="",o.boxShadow=""):t||(o.border="none",o.boxShadow="none")},o.prototype.setEditIndex=function(t){i.prototype.setEditIndex.call(this,t);var o=this._editor.style;e.Utils.isMobile()?o.fontSize=Math.max(this.fontSize,16)+"px":this.fontSize>0&&(o.fontSize=this.fontSize+"px");var n=t.valueColumn;if(n)switch(this._textCase==a.TextInputCase.DEFAULT?n.textInputCase:this._textCase){case a.TextInputCase.LOWER:this._editor.style.textTransform="lowercase";break;case a.TextInputCase.UPPER:this._editor.style.textTransform="uppercase";break;default:this._editor.style.textTransform="none"}},o.prototype.getEditText=function(){return this._editor.value},o.prototype.setEditValue=function(t){i.prototype.setEditValue.call(this,t),this._editor.value=this._valToStr(t)},o.prototype.getEditValue=function(t,i){void 0===t&&(t=!0);var o=this._editField(),n=this._emptyValue;try{var r=o.dataType,s=this._editor.value;if(r==a.ValueType.TEXT)s||void 0===this._emptyValue||(s=this._emptyValue),void 0===(n=this._strToVal(s))&&(n="");else{if(r===a.ValueType.OBJECT){var l=this._editIndex.dataColumn.objectKey||o.objectKey,h=this._editIndex.item.getData(o.index)||{};return h[l]=s,h}if(e.Utils.isWhiteSpace(s))if(void 0!==this._emptyValue)n=this._strToVal(this._emptyValue);else switch(r){case a.ValueType.NUMBER:isNaN(this._oldValue)&&(n=NaN);break;case a.ValueType.DATETIME:null===this._oldValue&&(n=null);case a.ValueType.BOOLEAN:}else n=this._strToVal(s)}if(n===f.InvalidFormat)return n;n=o.readValue(n)}catch(e){if(t)throw e;n=this._emptyValue}return n},o.prototype._selectAll=function(){var t=this._editor;if(t.select&&t.value){var e=t.value;t.value="",t.value=e,t.select()}},o.prototype._setSelectionRange=function(t,i){try{var o=this._editor;(!e.Utils.isMobile()||!this.hasList)&&null!=o.selectionStart&&o.setSelectionRange(t,i)}catch(t){e.Utils.log("setSelectionRange fail type => ".concat(this._editor.getAttribute("type")))}},o.prototype._doBeginEdit=function(){if(this._modified=!1,this.visible)return e.Utils.isMobile()&&this.caretToLast(),!0},o.prototype._doEndEdit=function(){this._modified=!1},o.prototype._doCommit=function(){},o.prototype.$_createEditor=function(t,i){var o=(0,e.getDoc)(t);this._container=this._createContainer(o),t.appendChild(this._container);var n="$$_rg_editor"+this.$_hash,r=o.createElement("label");r.setAttribute("for",n);var s=r.style;s.display="none",s.position="absolute",s.width=s.height="0px";var a=o.createElement(i);a.id=n,s=a.style,a.autocomplete="off",s.position="absolute",s.boxSizing="border-box",s.margin="0px",s.padding="0px 2px",s.wordWrap="normal",s.overflow="hidden",s.resize="none",s.border="none",s.outline="none",s.left="0px",s.top="0px",s.width="100%",s.height="100%",s["-webkit-user-modify"]="read-write-plaintext-only",s["white-space"]="pre",s["-webkit-transform"]="translateZ(0)",a.tabIndex=-1,this._container.appendChild(a),this._container.appendChild(r),a.onkeydown=this._keyDownHandler.bind(this),a.onkeyup=this._keyUpHandler.bind(this),a.onkeypress=this._keyPressHandler.bind(this),a.oninput=this._inputHandler.bind(this),a.onpaste=this._pasteHandler.bind(this),a.oncopy=this._copyHandler.bind(this),a.oncut=this._copyHandler.bind(this);var l=this._grid.container;return l.$_addListener(a,"compositionstart",this._compositionstartHandler.bind(this),!1),l.$_addListener(a,"compositionupdate",this._compositionupdateHandler.bind(this),!1),l.$_addListener(a,"compositionend",this._compositionendHandler.bind(this),!1),a},o}(f);Xn.TextCellEditorBase=m;var y=function(i){function o(){return null!==i&&i.apply(this,arguments)||this}return t.__extends(o,i),o.prototype._doDispose=function(){this._editor.$_owner=null,this._editor.onkeydown=null,this._editor.onkeyup=null,this._editor.onkeypress=null,this._editor.oninput=null,this._editor.onpaste=null,this._editor.oncopy=null,i.prototype._doDispose.call(this)},_dp(o,"mask",{get:function(){return this._mask}}),_dp(o,"text",{get:function(){return this._editor.value},set:function(t){!this._editor||t==this._editor.value&&t==this._controller.getData(this._editIndex)||(this._editor.value=t,this._doChanged())}}),o.prototype.setMask=function(t){this._mask=null,t&&(this._mask=new g(this,t))},o.prototype.setAlignment=function(t){this._container.style.textAlign="left"},o.prototype._createEditor=function(t){var e=i.prototype.$_createEditor.call(this,t,"input");return this._defMaxLength=e.maxLength>0?e.maxLength:1e6,e},o.prototype.initOptions=function(){i.prototype.initOptions.call(this),this._editor.readOnly=this._readOnly=!1,this._mask&&(this._mask=this._mask.dispose())},o.prototype.applyOptions=function(t){i.prototype.applyOptions.call(this,t),t.mask&&this.setMask(t.mask)},o.prototype.caretToLast=function(){var t=e.Utils.toStr(this._editor.value).length;this._setSelectionRange(t,t)},o.prototype.setEditIndex=function(t){i.prototype.setEditIndex.call(this,t),this._editor.maxLength=this.maxLength>0?this.maxLength:this._defMaxLength},o.prototype.setEditorZIndex=function(t){var e=this._editor.style,i=this._grid.displayOptions.baseZindex;t?e.zIndex=String(i+0):e.removeProperty("z-index")},o.prototype._doChanged=function(){this._requestStart(),this._started&&(this._textReadOnly||!this._editor.readOnly||this.allowEmpty&&""===this.text)&&(this._modified=!0,this._dispatchChange())},o.prototype.setBounds=function(t,i,o,n,r){e.Utils.setBounds(this._container,t,i,o,n),0==o||0==n?this._editor.style.width="100%":r>0&&(this._editor.style.height=Math.round(n-4)+"px",this._editor.style.width=r+"px")},o.prototype._doPaste=function(t,e){if(this._mask){t.preventDefault();var o=this._editor,n=o.value,r=o.selectionStart,s=o.selectionEnd;n=n.substr(0,r)+e+n.substr(s),o.value=this._mask.writeBuffer(n,!0)}else i.prototype._doPaste.call(this,t,e)},o.prototype._keyDownHandler=function(t){if(!this.isDisabled()){var i=this._editor,o=t.keyCode,n=e.Utils.ctrlKey(t);if(n){if(this.visible&&e.Utils.included(o,89,90,121,122))return;if(e.Utils.isIE){if(86===o&&i.readOnly)return t.preventDefault(),this._pasteHandler(t),!1;if((88===o||67===o||45===o)&&""==i.value&&f.copyCutProc(this,t))return!1}}switch(this._inputValue=i.value,o){case 8:case 46:this._sendToParent(t)||(!this.visible&&this._requestStart()?i.readOnly&&!this.allowEmpty||!this._controller._getData(this._editIndex)||(this._mask?(t.preventDefault(),t.stopImmediatePropagation(),this._mask.keydown(t),this._doChanged()):this.text=""):this._mask&&(t.preventDefault(),t.stopImmediatePropagation(),this._mask.keydown(t),this._doChanged()),8===o&&i.readOnly&&(t.preventDefault(),t.stopImmediatePropagation()));break;case 9:return!this._sendToParent(t);case 37:if(!this.visible||0==i.selectionEnd&&i.selectionEnd==i.selectionStart)return!this._sendToParent(t);if(i.readOnly&&e.Utils.isChrome)return!this._sendToParent(t);t.stopImmediatePropagation();break;case 39:if(!this.visible||i.selectionEnd==i.value.length&&i.selectionEnd==i.selectionStart)return!this._sendToParent(t);if(i.readOnly&&e.Utils.isChrome)return!this._sendToParent(t);if(!e.Utils.specialKey(t)&&this._mask&&this._mask.restrictNull){var r=i.selectionStart;this._mask._moveCaret(r+1,r+1)&&(t.preventDefault(),t.stopImmediatePropagation())}t.stopImmediatePropagation();break;case 36:if(!this.visible)return!this._sendToParent(t);t.stopImmediatePropagation();break;case 35:if(!this.visible)return!this._sendToParent(t);if(this._mask&&this._mask.restrictNull){var s=i.value?i.value.length-1:0;this._mask._moveCaret(s,s)&&(t.preventDefault(),t.stopImmediatePropagation())}t.stopImmediatePropagation();break;case 32:if(!this.visible||n||t.altKey)return!this._sendToParent(t);break;case 38:case 33:case 40:case 34:case 13:case 27:case 113:case 45:return t.preventDefault(),t.stopImmediatePropagation(),!this._sendToParent(t);case 229:this._sendToParent(t);break;default:return!this._sendToParent(t,null,!0)}return e.Utils.isFirefox?!n&&!t.altKey&&229!==o&&o>=32&&(o<112||o>130)&&this._requestStart():e.Utils.isIE,!0}},o.prototype._keyUpHandler=function(t){if(!this.isDisabled()){var i=t.keyCode;switch(8!=i&&46!=i||e.Utils.ieOld&&this.visible&&!this._editor.readOnly&&this._editor.value!=this._inputValue&&this._doChanged(),t.keyCode){case 37:case 39:case 36:case 35:case 32:this.visible||this._sendToParent(t,3);break;default:this._sendToParent(t,3)}}},o.prototype._keyPressHandler=function(t){if(!this.isDisabled()){var i=t.which||t.keyCode,o=e.Utils.isMac&&t.metaKey,n=e.Utils.ctrlKey(t);this._sendToParent(t,2),e.Utils.isFirefox?n||t.altKey||!(0==i||i>=32)||(this._requestStart()?this._mask&&(this._mask._pStart=t.target.selectionStart,this._mask.keyPress(t),this._doChanged(),t.preventDefault()):t.preventDefault()):!o||122!==i&&121!==i?(!o||99!==i&&118!==i&&120!==i)&&(o&&t.shiftKey&&32===i||i>=32&&(this._requestStart()?this._mask&&(this._mask._pStart=t.target.selectionStart,this._mask.keyPress(t),this._doChanged(),t.preventDefault()):t.preventDefault())):t.preventDefault()}},o.prototype._compositionstartHandler=function(t){this.isDisabled()||(this._composing=!0)},o.prototype._compositionendHandler=function(){this._composing=!1},o.prototype._compositionupdateHandler=function(){this._composing=!0,!this._started&&this._requestStart(),this._started&&!this._editor.readOnly&&(this._checkHangeul=!0)},o.prototype._changeHandler=function(t){},o.prototype._inputHandler=function(t){this.isDisabled()||(!e.Utils.isIE||this._started||this._composing)&&"historyUndo"!==t.inputType&&"historyRedo"!==t.inputType&&(this._mask&&this._mask.input(t),this._doChanged())},o.prototype._getInputSelector=function(){return null},o}(m);Xn.TextCellEditor=y;var v=function(e){function i(t,i){return e.call(this,t,i)||this}return t.__extends(i,e),_dp(i,"inputCharacters",{get:function(){return this._inputCharacters},set:function(t){this._inputCharacters=t}}),_dp(i,"ignoreCharacters",{get:function(){return this._ignoreCharacters},set:function(t){this._ignoreCharacters=t}}),i.prototype.initOptions=function(){this._inputCharacters=null,this._ignoreCharacters=null,e.prototype.initOptions.call(this)},i.prototype.initDefaultOptions=function(){},i.prototype._inputHandler=function(t){this.$_resetValue(t),e.prototype._inputHandler.call(this,t)},i.prototype._keyDownHandler=function(t){return this._pStart=t.target.selectionStart,e.prototype._keyDownHandler.call(this,t)},i.prototype._createEditor=function(t){var i=e.prototype._createEditor.call(this,t);return i.tabIndex=-1,i},i.prototype._getInputSelector=function(){return i.INPUT_CSS},i.prototype.$_resetValue=function(t){var e,i,o=this,n=this._editor,r=n.value,s=function(e){e.test(r)&&(i=!0,"insertFromPaste"===t.inputType?(r=r.replace(e,""),o._pStart+=t.data.replace(e,"").length):r=o._inputValue?o._inputValue.replace(e,""):r.replace(e,""))};this.visible&&((e=this.inputCharacters)&&s.call(this,new RegExp("[^"+e+"]","g")),(e=this.ignoreCharacters)&&s.call(this,new RegExp("["+e+"]","g")),i&&(n.value=r,null!=this._pStart&&n.setSelectionRange(this._pStart,this._pStart)),this._pStart=null)},i.INPUT_CSS="rg-text-editor",i}(y);Xn.LineCellEditor=v;var w=function(e){function i(t,i){return e.call(this,t,i)||this}return t.__extends(i,e),i.prototype._createEditor=function(t){var i=e.prototype._createEditor.call(this,t);return i.setAttribute("type","password"),i.tabIndex=-1,i},i.prototype._getInputSelector=function(){return i.INPUT_CSS},i.prototype.initDefaultOptions=function(){},i.prototype.prepare=function(){},i.INPUT_CSS="rg-password-editor",i}(y);Xn.PasswordCellEditor=w;var x=function(i){function o(t,e){return i.call(this,t,e)||this}return t.__extends(o,i),o.prototype._doDispose=function(){this._editor.onkeydown=null,this._editor.onkeyup=null,this._editor.onkeypress=null,this._editor.oninput=null,this._editor.onpaste=null,this._editor.oncopy=null,i.prototype._doDispose.call(this)},_dp(o,"minHeight",{get:function(){return this._minHeight},set:function(t){t!=this._minHeight&&(this._minHeight=t,this._changed())}}),_dp(o,"height",{get:function(){return this._height},set:function(t){this._height=t}}),_dp(o,"minWidth",{get:function(){return this._minWidth},set:function(t){this._minWidth=t}}),_dp(o,"width",{get:function(){return this._width},set:function(t){this._width=t}}),_dp(o,"altEnterNewLine",{get:function(){return this._altEnterNewLine},set:function(t){t!=this._altEnterNewLine&&(this._altEnterNewLine=t,this._changed())}}),_dp(o,"text",{get:function(){return this._editor.value}}),o.prototype.setAlignment=function(t){this._container.style.textAlign="left"},o.prototype.initOptions=function(){i.prototype.initOptions.call(this),this._minHeight=0,this._height=0,this._minWidth=0,this._width=0,this._altEnterNewLine=!1,this._editor.style.setProperty("overflow","hidden"),this.setReadOnly(!1)},o.prototype.initDefaultOptions=function(){},o.prototype.setEditIndex=function(t){i.prototype.setEditIndex.call(this,t),this._editor.maxLength=this.maxLength>0?this.maxLength:2e9},o.prototype.setCellEditValue=function(t){i.prototype.setCellEditValue.call(this,t,!1)},o.prototype.setEditorZIndex=function(t){function e(t,e,i){var o=e.style;t?o.zIndex=String(i+0):o.removeProperty("z-index")}var i=this._grid.displayOptions.baseZindex;e(t,this._editor,i),this._grid.accessibility&&e(t,this._container,i)},o.prototype._doChanged=function(){this._requestStart(),this._started&&!this._editor.readOnly&&(this._modified=!0,this._dispatchChange(),this.$_resetBounds())},o.prototype.$_resetBounds=function(){var t,i,o=e.Utils.getSize(this._container),n=this._editor,r=this._grid.getEditCellBounds(this,this._editIndex);this._height<0?t=r.height+(e.Utils.isMobile()?3:1):this._height>0&&(t=this._height),this._width<0?i=r.width+(e.Utils.isMobile()?3:1):this._width>0&&(i=this._width);var s=o.cx,a=o.cy,l=o.width,h=Math.round(o.height),u=(t&&n.scrollHeight-n.clientHeight)>0?e.Utils.isMac?0:15:0,d=(i&&n.scrollWidth-n.clientWidth)>0?e.Utils.isMac?0:15:0;t?(n.style.overflowY="auto",h=t):n.scrollHeight+d>h&&(h=n.scrollHeight+6+d),i?(n.style.overflowX="auto",l=i):n.scrollWidth+u>l&&(l=n.scrollWidth+6+u);var c=isNaN(this._minHeight)?0:this._minHeight;c>0&&(h=Math.max(h,c));var p=isNaN(this._minWidth)?0:this._minWidth;p>0&&(l=Math.max(l,p)),o=e.Utils.getSize(this._parentElement),l=Math.min(o.width,l),h=Math.min(o.height,h),s+l>o.width&&(s=o.width-l),a+h>o.height&&(a=o.height-h),e.Utils.setBounds(this._container,Math.max(s,0),Math.max(a,0),l,h)},o.prototype._createEditor=function(t){var o=i.prototype.$_createEditor.call(this,t,"textarea"),n=(0,e.getDoc)(t),r=o.style;r.padding="0px";var s=this._dummyEditor=n.createElement("input");return(r=s.style).width="1px",r.height="1px",r.position="absolute",r.top="0px",r.zIndex="-1",r.border="none",s.tabIndex=-1,e.Utils.isWin&&this._container.appendChild(s),o},o.prototype.setBounds=function(t,i,o,n){e.Utils.setBounds(this._container,t,i,o,n),t>e.Utils.$_INVISIBLE_EDIT_BOUNDS.x&&this.$_resetBounds()},o.prototype._getInputSelector=function(){return o.INPUT_CSS},o.prototype._compositionstartHandler=function(t){this.isDisabled()||(this._composing=!0,this._requestStart())},o.prototype._compositionendHandler=function(){this._composing=!1},o.prototype._compositionupdateHandler=function(){this._composing=!0},o.prototype._keyDownHandler=function(t){if(!this.isDisabled()){var i=this._editor,o=t.keyCode;if(e.Utils.ctrlKey(t)){if(this.visible&&(90===o||89===o))return;if(e.Utils.isIE){if(86===o&&i.readOnly)return t.preventDefault(),this._pasteHandler(t),!1;if((88===o||67===o||45===o)&&""==i.value&&f.copyCutProc(this,t))return!1}}switch(o){case 8:case 46:this._sendToParent(t)||!this.visible&&this._requestStart()&&(t.preventDefault(),t.stopImmediatePropagation(),!this._editor.readOnly&&this._controller.getData(this._editIndex)&&(this._editor.value="",this._modified=!0,this._dispatchChange()));break;case 9:return!this._sendToParent(t);case 37:if(!this.visible||0==i.selectionEnd&&i.selectionEnd==i.selectionStart)return!this._sendToParent(t);break;case 39:if(!this.visible||i.selectionEnd==i.value.length&&i.selectionEnd==i.selectionStart)return!this._sendToParent(t);break;case 36:case 35:case 38:case 33:case 40:case 34:if(!this.visible)return!this._sendToParent(t);t.stopImmediatePropagation();break;case 32:if(!this.visible)return!this._sendToParent(t);break;case 13:var n=e.Utils.ctrlKey(t);if(this.altEnterNewLine){if(!(t.altKey&&this.editing||t.shiftKey))return!this._sendToParent(t)}else if(!(n&&this.editing||t.shiftKey))return!this._sendToParent(t);if((this.altEnterNewLine&&t.altKey||!this.altEnterNewLine&&n)&&!t.shiftKey){t.preventDefault(),t.stopImmediatePropagation();var r=i.value;if(r)try{this._grid.container._dummyFocus=!0,e.Utils.isWin&&this._dummyEditor&&this._dummyEditor.focus();var s=i.selectionEnd;r=r.substring(0,s)+"\r\n"+r.substring(s),i.value=r,i.setSelectionRange(s+1,s+1),e.Utils.isWin&&i.focus(),this._doChanged()}finally{this._grid.container._dummyFocus=!1}}break;case 27:case 113:case 45:return t.preventDefault(),t.stopImmediatePropagation(),!this._sendToParent(t);case 229:break;default:return this._sendToParent(t,null,!0),!0}return t.keyCode,!0}},o.prototype._keyUpHandler=function(t){if(!this.isDisabled()){var i=t.keyCode;switch(8!=i&&46!=i||e.Utils.ieOld&&this.visible&&!this._editor.readOnly&&this._editor.value!=this._inputValue&&this._doChanged(),t.keyCode){case 37:case 39:case 36:case 35:case 32:this.visible||this._sendToParent(t,3);break;default:this._sendToParent(t,3)}}},o.prototype._keyPressHandler=function(t){var i=t.which||t.keyCode,o=e.Utils.isMac&&t.metaKey;this.isDisabled()||(!o||122!==i&&121!==i?(!o||99!==i&&118!==i)&&(o&&t.shiftKey&&32===i||i>=32&&!this._requestStart()&&t.preventDefault()):t.preventDefault())},o.prototype._inputHandler=function(t){this.isDisabled()||"historyUndo"!==t.inputType&&"historyRedo"!==t.inputType&&this._doChanged()},o.INPUT_CSS="rg-multiline-editor",o}(m);Xn.MultiLineCellEditor=x;var b=/[ㄱ-ㅎㅏ-ㅣ가-힝]/g,I=function(i){function o(t,e){var o=i.call(this,t,e)||this;return o._regxAll=/[\d]|,|\.|\-|\+|e|E/,o._regxPos=/[\d]|,|\.|\+|e|E/,o._regxInt=/[\d]|,|\+|\-/,o._regxPosInt=/[\d]|,|\+/,o._regx=o._regxAll,o._decLen=void 0,o._decimalFormatter=void 0,o._isMultiple=!1,o._active=!1,o._stepChanged=!1,o._editor.style["ime-mode"]="disabled",o._editor.style["-webkit-ime-mode"]="disabled",o._editor.style["-moz-ime-mode"]="disabled",o._editor.style["-ms-ime-mode"]="disabled",o}return t.__extends(o,i),_dp(o,"positiveOnly",{get:function(){return this._positiveOnly},set:function(t){t!=this._positiveOnly&&(this._positiveOnly=t,this.$_resetRistrict())}}),_dp(o,"integerOnly",{get:function(){return this._integerOnly},set:function(t){t!=this._integerOnly&&(this._integerOnly=t,this.$_resetRistrict())}}),_dp(o,"editFormat",{get:function(){return this._editFormat},set:function(t){if(t!=this._editFormat)if(this._editFormat=t,t){var e=this._decimalFormatter=new h.DecimalFormatter(t);e&&(this._decSep=e.separator||p.Messages.messages.decimalSeparator,this._groupSep=e.groupSep||p.Messages.messages.thousandsSeparator,this._decLen=Math.max(e.minDigits,e.maxDigits))}else this._decimalFormatter=void 0,this._decSep=p.Messages.messages.decimalSeparator,this._groupSep=p.Messages.messages.thousandsSeparator,this._decLen=void 0}}),_dp(o,"multipleChar",{get:function(){return this._multipleChar},set:function(t){t!=this._multipleChar&&(this._multipleChar=t,this._changed())}}),_dp(o,"addString",{get:function(){return this._addString},set:function(t){t!=this._addString&&(this._addString=t,this._changed())}}),_dp(o,"maxLengthExceptComma",{get:function(){return this._maxLengthExceptComma},set:function(t){t!=this._maxLengthExceptComma&&(this._maxLengthExceptComma=t,this._changed())}}),_dp(o,"maxIntegerLength",{get:function(){return this._maxIntegerLength},set:function(t){t!=this._maxIntegerLength&&(this._maxIntegerLength=t,this._changed())}}),_dp(o,"blankWhenSpace",{get:function(){return this._blankWhenSpace},set:function(t){t!=this._blankWhenSpace&&(this._blankWhenSpace=t,this._changed())}}),_dp(o,"step",{get:function(){return this._step},set:function(t){t!==this._step&&0!=t&&(this._step=t,this._changed())}}),_dp(o,"max",{get:function(){return this._max},set:function(t){this._max=t}}),_dp(o,"min",{get:function(){return this._min},set:function(t){this._min=t}}),_dp(o,"delay",{get:function(){return this._delay},set:function(t){t!==this._delay&&(this._delay=t)}}),_dp(o,"textReadOnly",{get:function(){return this._textReadOnly},set:function(t){this._setTextReadOnly(t)}}),_dp(o,"direction",{get:function(){return this._direction},set:function(t){this._direction=t}}),_dp(o,"showStepButton",{get:function(){return this._showStepButton},set:function(t){this._showStepButton=t}}),o.prototype.setMask=function(t){this._mask=null},o.prototype.initOptions=function(){i.prototype.initOptions.call(this),this.editFormat=void 0,this._positiveOnly=!1,this._integerOnly=!1,this._multipleChar=void 0,this._addString="000",this._blankWhenSpace=!1,this._maxLengthExceptComma=!1,this._maxIntegerLength=0,this._step=1,this._min=this._max=void 0,this._delay=100,this._active=!1,this._direction="vertical",this._showStepButton=!1,this._textReadOnly=!1,this.$_resetRistrict()},o.prototype.initDefaultOptions=function(){var t=this._grid;t&&f.initDefault(this,c.DefaultOptions.editor.numberCellEditor,t.editorOptions.numberCellEditor)},o.prototype.hasButton=function(t,e){return null!=e.showStepButton&&e.showStepButton},_dp(o,"buttonCount",{get:function(){return 2}}),o.prototype.setEditIndex=function(t){i.prototype.setEditIndex.call(this,t),this._editor.maxLength=this.maxLengthExceptComma||this.maxLength<=0?this._defMaxLength:this.maxLength},o.prototype._inputHandler=function(t){t.data&&t.data.match(b)?t.target.value=this._inputValue:(t.isComposing||this._editFormat&&this.$_editFormatting(t),i.prototype._inputHandler.call(this,t))},o.prototype._keyPressHandler=function(t){var o=t.keyCode||t.which;if(e.Utils.isFirefox){if(t.ctrlKey||0===t.charCode)return void i.prototype._keyPressHandler.call(this,t)}else if(e.Utils.isSafari&&e.Utils.ctrlKey(t)&&e.Utils.included(o,99,118,120))return void i.prototype._keyPressHandler.call(this,t);var n=!0,r=String.fromCharCode(t.keyCode||t.charCode);(!this._regx.test(r)||t.target.value&&t.target.value.indexOf(this._decSep)>=0&&r==this._decSep)&&(this._multipleChar&&r===this._multipleChar||(n=!1,(!this.blankWhenSpace||" "!==r)&&t.preventDefault()));var s=t.target.selectionStart,a=t.target.selectionEnd,l=t.target.value,h=new RegExp("\\"+this._groupSep,"g"),u=l?l.split(""):[];if(u.splice(s,a-s,r===this._multipleChar?this._addString:r),u=u.join("").replace(h,""),this.maxLength>0&&n&&this.maxLengthExceptComma&&l){var d=u&&"-"===u[0];d&&(u=u.substr(1)),u.length>this.maxLength&&t.preventDefault(),u=d?"-"+u:u}if(this._maxIntegerLength>0&&r!==this._decSep){var c=Math.floor(this.$_strToNum(u));if(!isNaN(c)){var p=Math.abs(c).toString().length;this._maxIntegerLength3?s.length%3:0;if(o.indexOf(".")>=0){for(var l=o.split(".")[1].split("");l.length>0&&"0"===l[l.length-1]&&l.length>e;)l.splice(l.length-1,1);o=l.join(""),r=l.length}return n+(a?s.substr(0,a)+this._groupSep:"")+s.substr(a).replace(/(\d{3})(?=\d)/g,"$1"+this._groupSep)+(r?this._decSep+o:"")},o.prototype.$_editFormatting=function(t){var e=t.target,i=e.value,o=i&&"-"===i[0],n=i&&i[i.length-1]==this._decSep,r=e.selectionStart,s=e.selectionEnd;this._isMultiple&&this._addString&&(i=i.replace(new RegExp("\\"+this._multipleChar,"gi"),this._addString),r+=this._addString.length,s+=this._addString.length);var a,l=i.split(this._decSep);l.length>1&&(l.length=2,l[1]=l[1].substr(0,this._decimalFormatter._maxDigits),i=l.join(this._decSep)),a=2==l.length?Math.min(l[1].length,null!=this._decLen?this._decLen:99):0;var h=this.$_strToNum(i);if(!isNaN(h)){if(this.maxLength>0||this.maxIntegerLength>0){h=Math.abs(h);var u=String(h).split(".");this.maxIntegerLength>0&&(u[0]=u[0].substr(0,this.maxIntegerLength));var d=u.join(".");this.maxLength>0&&(d=d.substr(0,this.maxLength)),h=parseFloat(d),o&&(h=-h)}i=this.$_formatNum(h,a,this._decimalFormatter.maxDigits);var c=(i=n&&this._decLen&&i.indexOf(this._decSep)<0?i+this._decSep:i).length,p=e.value.length;1==Math.abs(c-p)&&(c>p?(r++,s++):i.indexOf(this._decSep)>=r-1&&(r--,s--)),e.value=i,e.setSelectionRange(Math.max(r,0),Math.max(s,0))}},o.prototype.$_resetValue=function(){if(this.visible){var t=this._editor,e=t.selectionStart,i=t.selectionEnd,o=t.value?t.value.length:0;t.value=t.value.replace(b,"").trim(),(t.value?t.value.length:0)==o?t.setSelectionRange(e,i):t.setSelectionRange(i,i)}},o.prototype.$_resetRistrict=function(){this._positiveOnly&&this._integerOnly?this._regx=this._regxPosInt:this._positiveOnly?this._regx=this._regxPos:this._integerOnly?this._regx=this._regxInt:this._regx=this._regxAll},o.prototype.$_changeStepValue=function(t){var e=this.getEditValue();e=null==e||e==isNaN(e)?0:e,e+=t,null!=this._max&&(e=Math.min(this._max,e)),null!=this._min&&(e=Math.max(this._min,e)),this.setEditValue(e),this._stepChanged=!0,this._doChanged(),this._stepChanged=!1},o.INPUT_CSS="rg-number-editor",o}(y);Xn.NumberCellEditor=I;var R=function(i){function o(){return null!==i&&i.apply(this,arguments)||this}return t.__extends(o,i),o.prototype._getCssSelector=function(){return"rg-editor-marquee"},o.prototype._initDom=function(t){i.prototype._initDom.call(this,t),t.style.pointerEvents="none"},o.prototype._doDraw=function(t){},o.prototype.spread=function(){var t=this._dom,i=t.style,o=t.parentElement,n=e.Utils.getSize(o);i.left=n.left+"px",i.top=-n.top+"px",i.width=n.width+"px",i.height=n.height+"px",this._setClassName(t)},o}(u.VisualElement);Xn.EditorMarquee=R;var T=function(i){function o(t,o){var n=i.call(this,t,o)||this;if(n._dropDownWhenTyping=!0,n._isMobile){var r=(0,e.getDoc)(o);n._marquee=new R(r)}return n}return t.__extends(o,i),_dp(o,"textReadOnly",{get:function(){return this._textReadOnly},set:function(t){this._setTextReadOnly(t)}}),_dp(o,"allowEmpty",{get:function(){return this._allowEmpty},set:function(t){this._setAllowEmpty(t)}}),_dp(o,"dropDownWhenEnter",{get:function(){return this._dropDownWhenEnter},set:function(t){this._dropDownWhenEnter=t}}),_dp(o,"dropDownWhenClick",{get:function(){return this._dropDownWhenClick},set:function(t){this._dropDownWhenClick=t}}),_dp(o,"dropDownWhenTyping",{get:function(){return this._dropDownWhenTyping},set:function(t){this._dropDownWhenTyping=t}}),o.prototype.hasButton=function(t,e){return!0},_dp(o,"buttonCount",{get:function(){return 1}}),_dp(o,"hasList",{get:function(){return!0}}),o.prototype.initOptions=function(){i.prototype.initOptions.call(this),this._dropDownWhenTyping=!0,this._dropDownWhenClick=!1,this._dropDownWhenEnter=!1},o.prototype.isShowMarquee=function(){return this._isMobile&&this._grid.editorOptions.showMarquee&&!this._isTablet},o.prototype._showMarquee=function(t){this._marquee&&(t.appendChild(this._marquee._dom),this._marquee.spread())},o.prototype.registerPositionListener=function(){this._grid.container.addPositionListener(this)},o.prototype.unRegisterPositionListener=function(){this._grid.container.removePositionListener(this)},o.prototype._centerPopup=function(t,i){var o=e.Utils.getSize(i),n=e.Utils.getSize(t),r=(0,e.getWin)(t),s=e.Utils.getZoom(t),a=r.innerHeight/s;t.appendChild(i),i.style.left=(n.width-o.width)/2+"px",i.style.top=(a-o.height)/2-n.top+"px"},o.prototype._closeMarquee=function(){this._marquee&&e.Utils.detach(this._marquee._dom)},o.prototype._isMarquee=function(t){return this._marquee&&t===this._marquee._dom},o}(y);return Xn.PopupCellEditor=T,Xn}var Jn,Qn={};function tr(){return Jn||(Jn=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.NativeListCellEditor=t.SearchCellEditor=t.MultiCheckCellEditor=t.DropDownCellEditor=t.DropDownList=t.DropDownValueLabel=t.DropDownSortStyle=t.DropDownPosition=void 0;var e,i,o,n=d,r=S(),s=Zn(),a=et(),l=C(),h=Gi(),u=_t(),c=Ct();!function(t){t.BUTTON="button",t.EDITOR="editor"}(e=t.DropDownPosition||(t.DropDownPosition={})),function(t){t.NONE="none",t.ASCENDING="ascending",t.DESCENDING="descending"}(i=t.DropDownSortStyle||(t.DropDownSortStyle={})),function(t){t.VALUE="value",t.LABEL="label",t.VALUE_LABEL="valueLabel",t.LABEL_VALUE="labelValue"}(o=t.DropDownValueLabel||(t.DropDownValueLabel={}));var p=function(t){function s(e){var i=t.call(this)||this;return i._items=null,i._itemIndex=-1,i._viewGridInside=!1,i._selected=!1,i._clickHandler=function(t){var e=t.currentTarget,i=r.Utils.getChildIndex(e);i>=0&&(this._itemIndex=i,this._selected=!0,this.fireEvent(s.CLOSE_UP,!0))}.bind(i),i._nextClickHandler=function(t){var e=t.currentTarget;this.$_addMoreItems(e)}.bind(i),i._container=e,i._element=i._createList(e.doc),i}return n.__extends(s,t),s.prototype._doDispose=function(){this._container=null,this._containerElement=null,this._items=null,r.Utils.clearElements(this._element),this._element.parentNode&&this._element.parentNode.removeChild(this._element),this._element=null,t.prototype._doDispose.call(this)},_dp(s,"items",{get:function(){return this._items},set:function(t){if(this._items=[],t)for(var e=0,i=t.length;e=0&&e=0)for(var e=0,i=this._items.length;e=0&&this.listing&&this._refreshItems()}}),_dp(s,"selected",{get:function(){return this._selected}}),s.prototype.setItemIndex=function(t,e,i){var o=this._element.childNodes;if((t=Math.max(-1,t))=o.length-1)){if(i&&t>=o.length-1){var n=o[o.length-1];if(n.isMoreButton){var r=t-(o.length-1);r=(Math.floor(r/this.moreItemCount)+1)*this.moreItemCount,this.$_addMoreItems(n,r)}}this._itemIndex=t,this.listing&&this._refreshItems(),this._selected=t>=0}},s.prototype.setZIndex=function(t){this._element.style.zIndex=String(t)},s.prototype.show=function(t,e,o,n,r){this._containerElement=this.viewGridInside?this._container._container:t,this.sortStyle!=i.NONE&&this.$_sortItems(),this._show(e,o,n,r)},s.prototype.hide=function(){r.Utils.detach(this._element),this._containerElement=null},s.prototype.currentIsMore=function(t){var e=this._element.childNodes[null!=t?t:this._itemIndex];return e&&e.isMoreButton},s.prototype.addMoreItems=function(){if(this.currentIsMore(null)){var t=this._element.childNodes[this._itemIndex];this.$_addMoreItems(t,0)}},s.prototype._changed=function(){},s.prototype._createList=function(t){var e=t.createElement("div");return e.className="rg-dropdownlist",e.id="rg-dropdown-list-"+_.$$_LIST_ID++,e.setAttribute("role","listbox"),e},s.prototype.$_sortItems=function(){this.sortStyle==i.ASCENDING?this._items.sort((function(t,e){return t.labele.label?1:0})):this._items.sort((function(t,e){return t.label>e.label?-1:t.label0?Math.min(this.dropDownCount,this._items.length):this._items.length;t.style.height=(i.height+n)*a+4+s+"px"}else t.style.height="10px"},s.prototype._resetWidth=function(t){var e=this._element,i=r.Utils.getSize(e),o=this.dropDownWidth,n=o,s=e.offsetWidth?e.offsetWidth+(r.Utils.ieOld&&"border-box"===e.style.boxSizing?17:0):0;n<=0?(e.style.removeProperty("width"),n=n<0?t:10):e.style.width=n+"px";var a=0;if(this._firstChild){var l=(0,r.getWin)(this._firstChild),h=this._firstChild.currentStyle||l.getComputedStyle(this._firstChild),u=parseInt(h.marginLeft.replace("px",""));u=isNaN(u)?0:u;var d=parseInt(h.marginRight.replace("px",""));d=isNaN(d)?0:d;for(var c=e.childNodes,p=0;p=0||a>n)&&(n+=20),na&&(n=t,a=e)},c=this._items,p=e||(this._element.children.length>0?this.moreItemCount:this.initCount);if(c&&!(c.length<1)){for(var _=t,f=c.length;_=p&&_=0&&o=this._element.scrollTop+this._element.clientHeight&&(this._element.scrollTop=n-this._element.clientHeight)}},s.prototype.$_search=function(t,e){void 0===e&&(e=!1);try{if(this._items&&this._items.length>0&&t){for(var i=this._items,o=i.length,n=this.caseSensitive?t:t.toLowerCase(),s=[],a=0;a0)return void this.setItemIndex(a,e,!0)}else if(d&&d.indexOf(n)>0)return void this.setItemIndex(a,e,!0)}}this.setItemIndex(-1)}finally{e&&(this._selected=!0)}},s.CLOSE_UP="onDropDownListCloseUp",s.EDITOR_FOCUS="onDropDownListEditorFocus",s.ACTIVE_DESCENDENT="onDropDownListActiveDescendant",s}(a.EventAware);t.DropDownList=p;var _=function(t){function a(e,i){var o=t.call(this,e,i)||this;o._trimLabelText=!0,o._sameValueModified=!1,o._lookup=!1,o._labeling=!1,o._domain=null,o._closing=!1,o._selectedIndex=-1,o._globalMouseHandler=function(t){var e=t.target;if(o._isMarquee(e))o.closeUp(!1,!1);else{var i=o._grid.editController._commandView;if(!(r.Utils.isMobile()&&i&&i._dom&&i._dom.contains(e))){for(;e;){if(e==o._list._element)return;e=e.parentElement}o.closeUp(!0,!0)}}};var n=o._list=o._createDropDown(e.container);return o._setEditorAria("aria-owns",n._element.id),o._setEditorAria("aria-expanded","false"),o._setEditorAria("aria-haspopup","true"),o._setEditorAria("role","combobox"),o._list.addListener(o),o}return n.__extends(a,t),a.prototype._doDispose=function(){this._globalMouseHandler=null,this._list.removeListener(this),this._list.dispose(),this._list=this._items=this._values=this._labels=null,t.prototype._doDispose.call(this)},_dp(a,"values",{get:function(){return this._values},set:function(t){(t=r.Utils.makeArray(t,!0))?this._values=t.map((function(t){return null!=t?String(t):t})):this._values=[]}}),_dp(a,"labels",{get:function(){return this._labels},set:function(t){this._labels=t?t.slice():[]}}),_dp(a,"displayLabels",{get:function(){return this._displayLabels},set:function(t){this._displayLabels=t}}),_dp(a,"domainOnly",{get:function(){return this._domainOnly},set:function(t){this._domainOnly=t}}),_dp(a,"dropDownWidth",{get:function(){return this._dropDownWidth},set:function(t){this._dropDownWidth=t}}),_dp(a,"dropDownPosition",{get:function(){return this._dropDownPosition},set:function(t){this._dropDownPosition=t}}),_dp(a,"dropDownCount",{get:function(){return this._dropDownCount},set:function(t){this._dropDownCount=t}}),_dp(a,"itemSortStyle",{get:function(){return this._itemSortStyle},set:function(t){this._itemSortStyle=t}}),_dp(a,"caseSensitive",{get:function(){return this._caseSensitive},set:function(t){this._caseSensitive=t}}),_dp(a,"partialMatch",{get:function(){return this._partialMatch},set:function(t){this._partialMatch=t}}),_dp(a,"commitOnSelect",{get:function(){return this._commitOnSelect},set:function(t){this._commitOnSelect=t}}),_dp(a,"trimLabelText",{get:function(){return this._trimLabelText},set:function(t){this._trimLabelText=t}}),_dp(a,"separator",{get:function(){return this._separator},set:function(t){this._separator=t}}),_dp(a,"itemColumned",{get:function(){return this._itemColumned},set:function(t){this._itemColumned=t}}),_dp(a,"sameValueModified",{get:function(){return this._sameValueModified},set:function(t){this._sameValueModified=t}}),_dp(a,"listCallback",{get:function(){return this._listCallback},set:function(t){this._listCallback=t}}),_dp(a,"templateCallback",{get:function(){return this._templateCallback},set:function(t){this._templateCallback=t}}),_dp(a,"listing",{get:function(){return this._list.listing}}),a.prototype.dropDown=function(t,e){var i=this;if(void 0===t&&(t=!1),void 0===e&&(e=!0),!this.readOnly&&!this.listing&&!this._closing){e&&this._refreshItems(!1,!1,!0);var o=(0,r.getDoc)(this._container),n=(0,r.getWin)(this._container);if(t||this._items&&this._items.length>0){var s=this._list,a=this._options,l=o.body,h=r.Utils.getSize(this._container);if(this._grid.accessibility){var u=r.Utils.getSize(this._grid.container._containerDiv);h.cx=h.x-u.x+h.cx,h.cy=h.y-u.y+h.cy}s.viewGridInside=a.viewGridInside,s.displayLabels=this.displayLabels,s.separator=this.separator,s.itemColumned=this.itemColumned,s.items=this._items,this._saveIndex=this._selectedIndex,this._saveText=this._editor.value,s.caseSensitive=this._caseSensitive,s.partialMatch=this._partialMatch,s.dropDownCount=this._dropDownCount,s.dropDownWidth=this._dropDownWidth,s.dropDownPosition=this._dropDownPosition,s.sortStyle=this._itemSortStyle,s.trimLabelText=this._trimLabelText,s._templateCallback=function(){if(i._templateCallback)return function(t,e){return i._templateCallback(i._grid.handler,i.editIndex.toProxy(),t,e.value,e.label,e.item)}}();var d=this._grid.displayOptions;return s.setZIndex(d.baseZindex+3),this.isShowMarquee()?(this._showMarquee(l),s.viewGridInside=!1,s.show(l,0,0,0,null),this._centerPopup(l,s._element)):(s.show(l,h.cx+1,h.cy+h.height,this._cellBounds.width,r.Utils.getSize(this._editor)),this.registerPositionListener()),s.valueIndex=this._selectedIndex,this._setEditorAria("aria-expanded","true"),!r.Utils.isSlotMode()&&n.addEventListener(r.Utils.isIEMode()?"mousedown":"pointerdown",this._globalMouseHandler),!0}}return!1},a.prototype.resetPosition=function(){var t=r.Utils.getSize(this._container),e=this._list;if(this._grid.accessibility){var i=r.Utils.getSize(this._grid.container._containerDiv);t.cx=t.x-i.x+t.cx,t.cy=t.y-i.y+t.cy}e.$_resetPosition(t.cx+1,t.cy+t.height,this._cellBounds.width,r.Utils.getSize(this._editor))},a.prototype.closeUp=function(t,e){if(this.unRegisterPositionListener(),this.listing){this._closing=!0;var i=this._list,o=this._items;try{var n=(0,r.getWin)(this._container);!r.Utils.isSlotMode()&&n.removeEventListener(r.Utils.isIEMode()?"mousedown":"pointerdown",this._globalMouseHandler),this._closeMarquee(),i.hide();var s=void 0;if(t&&i.selected&&(s=i.valueIndex)>=0&&o&&o.length>s){this._selectedIndex=s;var a=this._labeling?o[s].label:o[s].value;this._editor.value=a,(s!=this._saveIndex||a!=this._saveText||this._sameValueModified)&&this._dispatchChange(),e&&this._commitOnSelect&&this._dispatchCommit()}}finally{this._closing=!1,this._setEditorAria("aria-expanded","false"),this.setActiveDescendant(null)}return!0}},a.prototype.initOptions=function(){t.prototype.initOptions.call(this),this._values=[],this._labels=[],this._displayLabels=o.LABEL,this._separator=" - ",this._itemColumned=!1,this._domainOnly=!1,this._textReadOnly=!1,this._dropDownWidth=-1,this._dropDownPosition=e.BUTTON,this._dropDownCount=8,this._itemSortStyle=i.NONE,this._caseSensitive=!1,this._partialMatch=!1,this._commitOnSelect=!0,this._listCallback=null,this._templateCallback=null,this._tempItems=null,this._viewGridInside=!1,this._setEditorAria("aria-activedescendant",null)},a.prototype.initDefaultOptions=function(){var t=this._grid;t&&s.CellEditor.initDefault(this,c.DefaultOptions.editor.dropdownCellEditor,t.editorOptions.dropdownCellEditor)},a.prototype.setEditIndex=function(e){t.prototype.setEditIndex.call(this,e),this._lookup=!1,this._labeling=!1,this._domain=null,this._items=null,this._refreshItems(!1,!1,!1)},a.prototype.setEditValue=function(e){var i=this,o=-1,n=function(e,o){var n;t.prototype.setEditValue.call(i,e?((n={})[e]=o,n):o)};this._value=e;var r=this._editIndex.dataColumn,s=r.getField(),a=r.objectKey||s.objectKey;if(e=a&&e?e[a]:e,this._lookup){var l=this._domain;if(l){var h=o=l.keys?l.keys.indexOf(e):-1;h>=0&&l.values&&l.values.length>h?l.values[h]:e}else o=this._editIndex.dataColumn.getLookupIndex(e);this._labeling?n(a,l?o>=0&&l.values&&l.values.length>o?l.values[o]:e:o>=0?this._editIndex.dataColumn.getLookupLabel(e,!1):e):n(a,e)}else this._values&&this._labeling&&this._labels?(o=this._values.indexOf(e),n(a,this._labels[o]||e)):n(a,e);this._selectedIndex=o},a.prototype.isEdited=function(){var e=t.prototype.isEdited.call(this);return e&&this.domainOnly&&(e=void 0!==this.$_getEditValue(!1)),e},a.prototype._getInputSelector=function(){return a.INPUT_CSS},a.prototype._setEditorAria=function(t,e){e?this._editor.setAttribute(t,e):this._editor.removeAttribute(t)},a.prototype._createDropDown=function(t){return new p(t)},a.prototype.setCellEditValue=function(e,i){t.prototype.setCellEditValue.call(this,e,i)},a.prototype.getEditValue=function(t,e){return void 0===t&&(t=!0),!this.isEdited()&&this._selectedIndex<0?this._value:this.$_getEditValue(t,e)},a.prototype.getEditListItem=function(){var t=this._selectedIndex;if(this.isEdited()||!(t<0))return this._list.items&&t>=0&&to?e[o]:t[o],item:i&&i[o]})},a.prototype._refreshItems=function(t,e,i){var n,s=this,a=function(){return s.displayLabels!==o.VALUE&&s._labels&&s._labels.length>=s._values.length},l=function(t){if(t&&t.list){var e=[],i=[],o=[],n=t.value||"value",r=t.label||"label";t.list.forEach((function(t){e.push(t[n]),i.push(null!=t[r]?t[r]:t[n]),o.push(t)})),s.$_setItems(s._values=e,s._labels=i,o)}s._labeling=a()},u=function(){if(d.dataColumn&&d.item&&(d.dataRow>=0||(0,h.ItemState_isEditing)(c.itemState))){var t=d.dataColumn;if(t.lookupSource){for(var e=t.lookupKeyFieldIds,o=[],n=0;n0&&(s.$_setItems(r.keys,r.values,r.listItem),s._labeling=!0,s._lookup=!0,s._domain=r,i&&s.setEditValue(s._value))}else t.values&&t.values.length>0&&(s.$_setItems(t.values,t.labels,t.listItem),s._labeling=a(),s._lookup=!0)}},d=this.editIndex,c=d.item;if((i=i&&!!this._listCallback)&&(n=this._listCallback(this._grid.handler,this.editIndex.toProxy())),n?(this._lookup=!1,this._domain=null,n instanceof Promise?(this._items=null,n.then((function(t){t?l(t):u(),s.dropDown(!1,!1)}))):l(n)):this._values&&(this._values.length>0||e)?(this.$_setItems(this._values,this._labels,null),this._labeling=a()):u(),t&&this.listing){this._list.items=this._items;var p=r.Utils.getSize(this._container);this._list._resetItems(p.cx+1,p.cy+p.height,this._cellBounds.width,r.Utils.getSize(this._editor))}},a.prototype.$_getEditValue=function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!1);var i=this.text,o=s.TextCellEditor.prototype.getEditValue.call(this,t,e),n=this._editIndex.dataColumn,r=this._selectedIndex,a=r>=0,h=n.getField(),u=h.dataType===l.ValueType.OBJECT&&(n.objectKey||h.objectKey),d=u&&o?o[u]:o;if(this._lookup){if(this._domain){if(this._labeling)d=(c=a?r:this._domain.values?this._domain.values.indexOf(i):-1)>=0&&this._domain.keys&&this._domain.keys.length>c?this._domain.keys[c]:d;if(this.domainOnly&&d&&(!this._domain.keys||this._domain.keys.indexOf(d)<0))return s.CellEditor.Unselected}else if(this._labeling&&(d=a?n.getLookupValue(r):n.getSourceValue(i)||(u?o[u]:o)),this.domainOnly&&d&&(!n.values||n.values.indexOf(d)<0))return s.CellEditor.Unselected}else{var c;if(this._labeling)(c=a?r:this._labels?this._labels.indexOf(i):-1)>=0&&c=0&&t=this._items.length)){var s=this._items[i].index;o?r.indexOf(s)<0&&r.push(s):r.indexOf(s)>=0&&r.splice(r.indexOf(s),1),t.className="rg-multicheck-item"+(o?" rg-multicheck-select":""),t.setAttribute("aria-selected",o?"true":"false"),this._selected=!0,this.$_changeAllCheck(),n&&this.fireEvent(e.CHECK_CLICK)}},e.prototype._createList=function(){var t=this._container.doc,e=t.createElement("div");e.tabIndex=-1,e.className="rg-multicheck",e.id="rg-dropdown-list-"+_.$$_LIST_ID++,e.setAttribute("role","listbox");var i=t.createElement("div");i.className="rg-multicheck-allcheck",this._allCheckElement=i,i.style.paddingLeft="2px",r.Utils.disableSelection(i),e.appendChild(i);var o=t.createElement("div");o.className="rg-multicheck-list",this._listElement=o,e.appendChild(o);var n=t.createElement("div");return n.style.textAlign="center",n.style.whiteSpace="nowrap",n.className="rg-multicheck-button",this._buttonElement=n,n.style.margin="2px",r.Utils.disableSelection(n),e.appendChild(n),e},e.prototype._getListElement=function(){return this._listElement},e.prototype.setZIndex=function(t){var e=this._element.style;e.zIndex=String(t),(e=this._listElement.style).zIndex=String(t)},e.prototype.$_toggleAllCheck=function(){for(var t=this._listElement.childElementCount,i=this._allCheck.checked,o=0;on&&(t=e,n=i)}.bind(this),u=this._items;if(u&&!(u.length<1)){for(var d=0,c=u.length;d=0;_.className="rg-multicheck-item"+(g?" rg-multicheck-select":""),r.Utils.disableSelection(_),this._listElement.appendChild(_),0==d&&(this._firstChild=_),_.onclick=this._divClickHandler;var m=i.createElement("input");m.id="$multiCheck_item_"+e.$_checkId++,m.type="checkBox",m.onclick=this._checkClickHandler,m.checked=g,_.setAttribute("aria-selected",g?"true":"false"),_.appendChild(m);var y=null;if(this._templateCallback){var v=document.createElement("div");v.style.display="inline-block",_.appendChild(v),this._templateCallback(v,p)}else switch(this.displayLabels){case o.LABEL:a(_,p,m);break;case o.VALUE:s(_,p,m);break;case o.LABEL_VALUE:y=a(_,p,m),l(_,this.separator),s(_,p,m);break;case o.VALUE_LABEL:y=s(_,p,m),l(_,this.separator),a(_,p,m)}y&&this.itemColumned&&(h(y),_._span=y)}if(this.itemColumned&&t){var C=Math.ceil(r.Utils.getSize(t).width);if(C>0)for(d=0,c=this._listElement.childNodes.length;d=0&&e=this._listElement.scrollTop+this._listElement.clientHeight&&(this._listElement.scrollTop=n-this._listElement.clientHeight)}},e.CLOSE_UP_2="onMultiCheckListCloseUp",e.CANCEL="onMultiCheckListCancel",e.CHECK_CLICK="onMultiCheckListCheckClick",e.$_checkId=0,e}(p),g=function(t){function e(e,i){var o=t.call(this,e,i)||this;return o._showButtons=!0,o._showAllCheck=!1,o._setEditorAria("aria-multiselectable","true"),o}return n.__extends(e,t),_dp(e,"showButtons",{get:function(){return this._showButtons},set:function(t){this._showButtons=t}}),_dp(e,"acceptText",{get:function(){return this._acceptText||u.Messages.messages.checkListAcceptText},set:function(t){this._acceptText=t}}),_dp(e,"cancelText",{get:function(){return this._cancelText||u.Messages.messages.checkListCancelText},set:function(t){this._cancelText=t}}),_dp(e,"allCheckText",{get:function(){return this._allCheckText||u.Messages.messages.checkListAllCheckText},set:function(t){this._allCheckText=t}}),_dp(e,"showAllCheck",{get:function(){return this._showAllCheck},set:function(t){this._showAllCheck=t}}),e.prototype._createDropDown=function(t){return new f(t)},e.prototype.setMask=function(t){this._mask=null},e.prototype.dropDown=function(t,e){var i=this;if(void 0===t&&(t=!1),void 0===e&&(e=!0),!this.readOnly&&!this.listing&&!this._closing){e&&this._refreshItems(!1,!1,!0);var o=(0,r.getDoc)(this._container),n=(0,r.getWin)(this._container);if(t||this._items&&this._items.length>0){var s=this._list,a=this._options;this._selectedIndices=function(t,e,i){if(!e)return[];var o=e.split(i);return t.map((function(t,e){if(o.indexOf(t.value)>=0)return e})).filter((function(t){return null!=t}))}(this._items,this._value,this._editIndex.dataColumn.valueSeparator)||[],s.viewGridInside=a.viewGridInside,s.displayLabels=this.displayLabels,s.separator=this.separator,s.itemColumned=this.itemColumned,s.items=this._items;var l=r.Utils.getSize(this._container);if(this._grid.accessibility){var h=r.Utils.getSize(this._grid.container._containerDiv);l.cx=l.x-h.x+l.cx,l.cy=l.y-h.y+l.cy}this._saveIndices=this._selectedIndices.slice(),this._saveText=this._editor.value,s.caseSensitive=this.caseSensitive,s.dropDownCount=this.dropDownCount,s.dropDownWidth=this.dropDownWidth,s.dropDownPosition=this.dropDownPosition,s.setButtonOptions(this.acceptText,this.cancelText,this.showButtons,this.showAllCheck,this.allCheckText),s.sortStyle=this.itemSortStyle,s.valueIndices=this._selectedIndices.slice(),s.trimLabelText=this.trimLabelText,s._templateCallback=function(){if(i._templateCallback)return function(t,e){return i._templateCallback(i._grid.handler,i.editIndex.toProxy(),t,e.value,e.label,e.item)}}();var u=this._grid.displayOptions;s.setZIndex(u.baseZindex+3);var d=o.body;return this.isShowMarquee()?(s.viewGridInside=!1,this._showMarquee(d),s.show(d,0,0,0,null),this._centerPopup(d,s._element)):(s.show(d,l.cx+1,l.cy+l.height,this._cellBounds.width,r.Utils.getSize(this._editor)),this.registerPositionListener()),!r.Utils.isSlotMode()&&n.addEventListener(r.Utils.isIEMode()?"mousedown":"pointerdown",this._globalMouseHandler),!0}}return!1},e.prototype.getCheckValues=function(t,e,i){for(var o=[],n=0,r=t.length;n=0&&t[n]=0&&i.push(o=0&&i.push(this._labels&&o>=0&&this._labels.length>o?this._labels[o]:u[c]);this._labeling&&this._labels?h(i.join(this._editIndex.dataColumn.valueSeparator)):h(t)}else h(t)},e.prototype.setCellEditValue=function(e,i){t.prototype.setCellEditValue.call(this,e,i)},e.prototype.getEditValue=function(t,e){return void 0===t&&(t=!0),void 0===e&&(e=!1),this.isEdited()||this._list.selected?this.$_getEditValue(t,e):this._value},e.prototype.getEditListItem=function(){var t=this;if(this.isEdited()||!(this._selectedIndices.length<0)){var e=this._list.items.map((function(e,i){if(t._selectedIndices.indexOf(i)>=0)return e&&e.item})).filter((function(t){return null!=t}));return e&&e.length>0?e:void 0}},e.prototype._keyDownHandler=function(e){if(!this.isDisabled()){var i=this._list;if(r.Utils.ctrlKey(e)&&65==e.keyCode&&this.listing)return e.preventDefault(),i._allCheck&&(i._allCheck.checked=!i._allCheck.checked,i.$_toggleAllCheck()),!0;if(32===e.keyCode)if(this.listing)return i.changeCheckIndex(i.itemIndex,null,!0),e.preventDefault(),!0;return t.prototype._keyDownHandler.call(this,e)}},e.prototype._keyPressHandler=function(e){t.prototype._keyPressHandler.call(this,e),this._list._selected=!1},e.prototype._inputHandler=function(e){t.prototype._inputHandler.call(this,e),this._list._selected=!1},e.prototype.$_getEditValue=function(t,e){function i(t,e,i,o,n){var r=[],s=e&&e.split(n.valueSeparator);if(s&&s.length>0)for(var a=0,l=s.length;a=0&&o.indexOf(s[a])=0||!t.domainOnly)&&r.push(s[a]);return r}void 0===t&&(t=!1),void 0===e&&(e=!1);var o=this._strToVal(this.text),n=s.TextCellEditor.prototype.getEditValue.call(this,t,e),a=this._editIndex.dataColumn,h=a.getField(),u=h.dataType===l.ValueType.OBJECT&&(a.objectKey||h.objectKey),d=u?n[u]:n,c=this._selectedIndices.slice(),p=[],_=this._list.selected;if(this._lookup){if(this._domain){if(this._labeling){if(_)for(var f=0,g=c.length;f=0;f--)a.values.indexOf(d[f])<0&&d.splice(f,1)}}else{if(this._labeling){if(_)for(f=0,g=c.length;f=0;f--)this._values.indexOf(d[f])<0&&d.splice(f,1)}}return d=r.Utils.isArray(d)?d.join(a.valueSeparator):d,u?(n[u]=d,n):d},e.prototype._getInputSelector=function(){return e.INPUT_CSS},e.prototype.onMultiCheckListCloseUp=function(t,e){!this._isMobile&&this.setFocus(),this.closeUp(e,!0)},e.prototype.onMultiCheckListCheckClick=function(t){this._editor.value=this.getCheckValues(t._selectItemIndices,this._items).join(this.editIndex.dataColumn.valueSeparator),this._selectedIndices=t._selectItemIndices.slice(),this._saveIndices=t._selectItemIndices.slice(),this._modified=!0,this._dispatchChange(),!this._isMobile&&this._editor.focus()},e.prototype.onMultiCheckListCancel=function(){this._controller.cancelEditor(!0)},e.INPUT_CSS="rg-multicheck-editor",e}(_);t.MultiCheckCellEditor=g;var m=function(t){function e(e,i){var o=t.call(this,e,i)||this;return o._searchLength=1,o._searchDelay=1e3,o._useCtrlEnterKey=!1,o._useEnterKey=!1,o._initCount=0,o._moreItemCount=25,o._reInquery=!0,o._timer=void 0,o._editor.setAttribute("aria-autocomplate","list"),o.assignFrom(c.DefaultOptions.editor.searchCellEditor),o}return n.__extends(e,t),_dp(e,"searchLength",{get:function(){return this._searchLength},set:function(t){this._searchLength=t}}),_dp(e,"searchDelay",{get:function(){return this._searchDelay},set:function(t){this._searchDelay=t}}),_dp(e,"useCtrlEnterKey",{get:function(){return this._useCtrlEnterKey},set:function(t){this._useCtrlEnterKey=t}}),_dp(e,"useEnterKey",{get:function(){return this._useEnterKey},set:function(t){this._useEnterKey=t}}),_dp(e,"initCount",{get:function(){return this._initCount},set:function(t){this._initCount=t}}),_dp(e,"moreItemCount",{get:function(){return this._moreItemCount},set:function(t){this._moreItemCount=t}}),_dp(e,"moreText",{get:function(){return this._moreText||u.Messages.messages.searchEditorMoreText},set:function(t){this._moreText=t}}),_dp(e,"reInquery",{get:function(){return this._reInquery},set:function(t){this._reInquery=t}}),e.prototype.fillItems=function(t,e,i,o){if(this.listing&&t==this.getEditText()){if(o&&!e){e=[],i=[];var n=o.value||"value",r=o.label||"label";o.list.forEach((function(t){e.push(t[n]),i.push(t[r]||t[n])}))}return this.values=e,this.labels=i,this._tempItems=o&&o.list,this._refreshItems(!0,!0,!1),this._list.$_search(this._editor.value,!0),!0}return!1},e.prototype.initOptions=function(){t.prototype.initOptions.call(this),this.initCount=0,this.moreItemCount=25},e.prototype.initDefaultOptions=function(){var t=this._grid;t&&s.CellEditor.initDefault(this,c.DefaultOptions.editor.searchCellEditor,t.editorOptions.searchCellEditor)},e.prototype.$_setItems=function(e,i){t.prototype.$_setItems.call(this,e,i,this._tempItems),(!this.values||this.values.length<=0)&&(this.values=e,this.labels=i)},e.prototype._keyDownHandler=function(e){if(!this.isDisabled()){var i=13==e.keyCode,o=r.Utils.ctrlKey(e);if(i&&(i=o?this.useCtrlEnterKey:this.useEnterKey&&(!this._items||this._items.length<1)),i&&this.editing){r.Utils.stopEvent(e),this.$_stopTimer();var n=this.getEditText();return(o||n&&n!=this._searchKey)&&(this.listing||this.dropDown(!0),this._searchKey=n,this._dispatchSearch(n)),!0}return t.prototype._keyDownHandler.call(this,e)}},e.prototype._inputHandler=function(e){this.isDisabled()||(t.prototype._inputHandler.call(this,e),this.$_search())},e.prototype._doEndEdit=function(){t.prototype._doEndEdit.call(this),this.$_stopTimer(),this._searchKey=null},e.prototype.$_getEditValue=function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!1);var i=this.text,o=s.TextCellEditor.prototype.getEditValue.call(this,t,e),n=this._selectedIndex,r=n>=0;if(this._labeling){var a=r?n:this._labels?this._labels.indexOf(i):-1;a>=0&&a=this._searchLength?this.$_startTimer():this.$_stopTimer()},e.prototype.$_startTimer=function(){this.$_stopTimer(),!this.reInquery&&this.listing&&this._list._items.length>0||(this._timer=setTimeout(function(){var t=this.getEditText();t&&t!=this._searchKey&&(this._searchKey=t,this.$_stopTimer(),this._dispatchSearch(t,!0))}.bind(this),this._searchDelay))},e.prototype.$_stopTimer=function(){this._timer&&clearTimeout(this._timer)},e.INPUT_CSS="rg-search-editor",e}(_);t.SearchCellEditor=m;var y=function(t){function e(e,o){var n=t.call(this,e,o)||this;return n._values=null,n._items=null,n._labels=null,n._sortStyle=i.NONE,n._itemIndex=-1,n._displayLabels=null,n._separator=null,n._itemColumned=!1,n._trimLabelText=!0,n.$_selectChanged=null,n._handled=!1,n._globalKeyDownHandler=function(t){var e=(0,r.getWin)(this._container);if(!(t.target instanceof e.HTMLTableCellElement))return this._keyDownHandler(t)}.bind(n),n}return n.__extends(e,t),e.prototype._dodispose=function(){this._editor&&this._editor.removeEventListener("change",this.$_selectChanged),this._values=null,this._labels=null,this._items=null,t.prototype.dispose.call(this)},_dp(e,"native",{get:function(){return!0}}),_dp(e,"buttonCount",{get:function(){return 1}}),e.prototype.hasButton=function(t,e){return null==t||t},e.prototype._createEditor=function(t){var e=(0,r.getDoc)(t);this._container=this._createContainer(e),t.appendChild(this._container);var i=e.createElement("select"),o=i.style;return i.setAttribute("aria-hidden","true"),o.position="absolute",o.boxSizing="border-box",o.margin="0px",o.padding="0px",o.wordWrap="normal",o.overflow="hidden",o.resize="none",o.border="none",o.outline="none",o.left="0px",o.top="0px",o.width="100%",o.height="100%",this.$_selectChanged=function(t){var e=t.target;this._itemIndex!==e.selectedIndex&&(this._dispatchChange(),this._dispatchCommit())}.bind(this),i.addEventListener("change",this.$_selectChanged),this._container.appendChild(i),i},e.prototype._getInputSelector=function(){return e.INPUT_CSS},e.prototype.initOptions=function(){t.prototype.initOptions.call(this),this._values=[],this._labels=[],this._items=[],this._itemIndex=-1},e.prototype.initDefaultOptions=function(){},e.prototype.setEditIndex=function(e){t.prototype.setEditIndex.call(this,e),this._refreshItems(),this._resetPosition()},e.prototype.setEditValue=function(e){t.prototype.setEditValue.call(this,e),this._itemIndex=-1;for(var i=this._editor.options,o=0,n=i.length;o0||e))this.$_setItems(this._values,this._labels);else if(i.dataColumn&&i.item&&(i.dataRow>=0||(0,h.ItemState_isEditing)(o.itemState))){var n=i.dataColumn;if(n.lookupSource){for(var r=n.lookupKeyFieldIds,s=[],a=0;a0&&this.$_setItems(l.keys,l.values)}else n.values&&n.values.length>0&&this.$_setItems(n.values,n.labels)}},e.prototype.$_setItems=function(t,e){this._items=[];for(var i=this._editor,o=i.options,n=(0,r.getDoc)(i),s=o.length-1;s>=0;s--)o.remove(s);s=0;for(var a=t.length;ss?e[s]:t[s],this._items.push({value:l.value,label:l.text}),i.options.add(l,null)}},e.prototype.getEditValue=function(){return this.$_getEditValue()},e.prototype.$_getEditValue=function(){return this._editor.value},e.INPUT_CSS="rg-nlist-editor",e}(s.TextCellEditor);t.NativeListCellEditor=y}(Qn)),Qn}var er,ir,or,nr,rr={},sr={};function ar(){if(ir)return rr;ir=1,Object.defineProperty(rr,"__esModule",{value:!0}),rr.NativeDateCellEditor=rr.BTDateCellEditor=rr.DateCellEditor=rr.HolidayCollection=rr.Holiday=void 0;var t,e,i,o=d,n=G(),r=S(),s=Zn(),a=tr(),l=et(),h=C(),u=rt(),c=$(),p=(er||(er=1,t=sr,Object.defineProperty(t,"__esModule",{value:!0}),t.CalendarMode=t.TimeSelectType=void 0,(e=t.TimeSelectType||(t.TimeSelectType={})).NONE="none",e.HOUR="hour",e.MINUTE="minute",e.SECOND="second",(i=t.CalendarMode||(t.CalendarMode={})).DAY="day",i.MONTH="month",i.YEAR="year"),sr),_=_t(),f=Ct(),g=/[ㄱ-ㅎㅏ-ㅣ가-힝]/g,m=function(t){if(!t)return null;(t=String(t))&&(t=t.replace(/[^0-9]/g,""));var e=parseInt(t.substr(0,4)),i=parseInt(t.substr(4,2));if(isNaN(e)||e<=0||isNaN(i)||i<0)return null;var o=new Date(e,0,1),n=4-o.getDay()+1;return o.setDate(n),o.getFullYear()==e&&i--,n=7*i,o.setDate(o.getDate()+n),o},y=function(t,e,i){var o,n=function(t){var i=new Date(t),o=i.getDay();o=or?1:Math.ceil((a.valueOf()-s.valueOf())/6048e5)+(l===h?1:0),String(h)+(null!=i?i:"")+(o<10?"0"+o:String(o))},v=function(t){function e(e){var i=t.call(this)||this;return i._tooltips=[],i._items=[],i._enabled=!0,i._owner=e,i}return o.__extends(e,t),e.prototype._doDispose=function(){this._owner=null,this._tooltips=null,this._items=null,t.prototype._doDispose.call(this)},_dp(e,"tooltips",{get:function(){return this._tooltips},set:function(t){this._tooltips=t}}),_dp(e,"items",{get:function(){return this._items},set:function(t){this._items=t.slice()}}),_dp(e,"enabled",{get:function(){return this._enabled},set:function(t){this._enabled=t}}),_dp(e,"count",{get:function(){return this._items&&this._items.length}}),_dp(e,"styleName",{get:function(){return this._styleName||""},set:function(t){this._styleName=t}}),e.prototype.load=function(t){this.clear()},e.prototype.clear=function(){this._items=[],this._tooltips=[]},e.prototype.contains=function(t){return!1},e.prototype.getTooltip=function(t){return null},e}(n.Base);rr.Holiday=v;var w=function(t){function e(e,i){var o=t.call(this,e)||this;return i&&o.load(i),o}return o.__extends(e,t),e.prototype._doDispose=function(){t.prototype._doDispose.call(this)},e.prototype.load=function(e){if(t.prototype.load.call(this,e),e){var i=r.Utils.makeArray(e.dates,!0);e.tooltips=r.Utils.makeArray(e.tooltips,!0);for(var o=0,n=i.length;o=0},e.prototype.getTooltip=function(t){var e=this.getItemIndex(t);return e>=0?this._tooltips[e]:null},e}(v),x=function(t){function e(e,i){var o=t.call(this,e)||this;return i&&o.load(i),o}return o.__extends(e,t),e.prototype._doDispose=function(){t.prototype._doDispose.call(this)},e.prototype.load=function(e){t.prototype.load.call(this,e),e&&(this._items=r.Utils.makeArray(e.days,!0),this._tooltips=r.Utils.makeArray(e.tooltips,!0),this.enabled=!!e.enabled,this.styleName=e.styleName)},e.prototype.contains=function(t){return t instanceof Date&&this._items.indexOf(t.getDay())>=0},e.prototype.getTooltip=function(t){var e=t instanceof Date?this._items.indexOf(t.getDay()):this._items.indexOf(t);return e>=0?this._tooltips[e]:null},e}(v),b=function(t){function e(){var e=t.call(this)||this;return e._items=[],e._count=-1,e}return o.__extends(e,t),e.prototype._doDispose=function(){this._editor=null,this._items=null,t.prototype._doDispose.call(this)},_dp(e,"items",{get:function(){return this._items},set:function(t){this._items=t}}),_dp(e,"editor",{get:function(){return this._editor},set:function(t){this._editor=t}}),_dp(e,"isNull",{get:function(){return-1==this._count}}),_dp(e,"count",{get:function(){return this._count}}),e.prototype.setNull=function(){this.clear()},e.prototype.clear=function(){for(var t=0,e=this._items.length;t0&&this._items.push(n)}this._count=this._items.length}else this._count=-1},e.prototype.contains=function(t){for(var e=0,i=this._items.length;e=0&&!(o.t-r.t>100);s--)r=e[s];var a=r.x,l=r.y,h=o.x,u=o.y;if(Math.sqrt(Math.pow(a-h,2)+Math.pow(l-u,2))/Math.max(16,o.t-r.t)>.1){var d="right",c=Math.round(180*Math.atan2(u-l,h-a)/Math.PI);if(c<0&&(c=360+c),c>45&&c<=135?d="bottom":c>135&&c<=225?d="left":c>225&&c<=315&&(d="top"),n.currentMode===p.CalendarMode.DAY)switch(d){case"bottom":case"right":n.$_prevMonth(t);break;case"top":case"left":n.$_nextMonth(t)}else if(n.currentMode===p.CalendarMode.MONTH)switch(d){case"bottom":case"right":n.$_prevYearMonth(t);break;case"top":case"left":n.$_nextYearMonth(t)}else if(n._currentMode===p.CalendarMode.YEAR)switch(d){case"bottom":case"right":n.$_prevYear();break;case"top":case"left":n.$_nextYear()}}n._touchs=n._applyTouchs=null}}},n._pointermoveHandler=function(t){var e=n._touchs,i=n._applyTouchs;if(!(t.buttons<1)&&e&&i){var o={x:t.clientX,y:t.clientY,t:t.timeStamp};e.push(o),i.push(o)}},n._mouseupHandler=function(t){!r.Utils.isMobile()&&n._editor.setFocus()},n._timeWheelHandler=function(t){r.Utils.stopEvent(t),n._doTimeWheel(t)},n._timeClickHandler=function(t){r.Utils.stopEvent(t),n._doTimeClick(t)},n._touchStartHandler=function(t){n._touchs=[],n._applyTouchs=[],n._swipeTimer=clearInterval(n._swipeTimer),1!=t.touches.length&&(n._touchId=void 0),n._touchId=t.touches[0].identifier;var e=t.touches[0];n._touchs.push({x:e.clientX,y:e.clientY,t:t.timeStamp}),n._applyTouchs.push({x:e.clientX,y:e.clientY,t:t.timeStamp})},n._touchEndHandler=function(t){n._checkSwipe(t.target),n._touchs=n._applyTouchs=null},n._touchMoveHandler=function(t){if(!(t.touches.length>1)&&(r.Utils.stopEvent(t),n._touchId)){var e=n._touchs,i=n._applyTouchs,o=t.touches[0],s={x:o.clientX,y:o.clientY,t:t.timeStamp};e.push(s),i.push(s);var a=i[0].y,l=i[i.length-1].y;Math.abs(a-l)>13&&(n._applyTouchs=[],n._doTimeScroll(t.target,a-l))}},n._checkSwipe=function(t){var e=n._touchs,i=e.length;if(!(i<2)){for(var o=e[i-1],r=e[i-2],s=i-3;s>=0&&!(o.t-r.t>100);s--)r=e[s];var a=r.x,l=r.y,h=o.x,u=o.y,d=Math.sqrt(Math.pow(a-h,2)+Math.pow(l-u,2))/Math.max(16,o.t-r.t),c=.998;if(d>.1){var p=Math.log(.1/d)/Math.log(c),_=d*(1-Math.pow(c,p+1))/(1-c),f="right",g=Math.round(180*Math.atan2(u-l,h-a)/Math.PI);return g<0&&(g=360+g),g>45&&g<=135?f="bottom":g>135&&g<=225?f="left":g>225&&g<=315&&(f="top"),n.onSwipeHandler(p,_,f,t)}return!1}},n.$_scrollRow=function(){r.Utils.getTimer()-n._swipeStarted=0?null==(o=n[e+t])&&(o=1===t?n[0]:n[n.length-1]):o=n[0]:o=(24+o+t)%24,i.setHours(o),this.$_setTime(this._hourElement,null,o,!0),this.date=i},e.prototype.incMinute=function(t){var e,i=new Date(this._currDate),o=this._minutes,n=i.getMinutes();return o?(e=o.indexOf(n))>=0?null==(n=o[e+t])&&(n=1===t?o[0]:o[o.length-1]):n=o[0]:n=(24+n+t)%24,i.setMinutes(n),this.$_setTime(this._minuteElement,null,n,!0),this.date=i},e.prototype.incSecond=function(t){var e=new Date(this._currDate),i=e.getSeconds();return i=(60+i+t)%60,e.setSeconds(i),this.$_setTime(this._secondElement,null,i,!0),this.date=e},e.prototype.setCurrentLoc=function(t){var e="focused";1===t?r.Utils.addClassName(this._hourElement,e):r.Utils.removeClassName(this._hourElement,e),2===t?r.Utils.addClassName(this._minuteElement,e):r.Utils.removeClassName(this._minuteElement,e),3===t?r.Utils.addClassName(this._secondElement,e):r.Utils.removeClassName(this._secondElement,e)},e.prototype._changed=function(){},e.prototype.$_getCellDate=function(t,e){var i=new Date(t);return i.setDate(e),i},e.prototype.$_createPicker=function(t){var e=this,i=this._container.doc,o=i.createElement("div"),n=function(t){t.addEventListener("pointerdown",e._pointerdownHandler),t.addEventListener("pointermove",e._pointermoveHandler),t.addEventListener("pointerup",e._pointerupHandler),t.addEventListener("touchmove",e._touchMoveHandler)};this._id=o.id="rg-calendar-"+R.$$_LIST_ID++,o.tabIndex=-1;var r=o.style;return r.position="absolute",r.boxSizing="border-box",r.margin="0px",r.overflow="auto",r.zIndex=String(t._baseZindex+2),o.className="rg-calendar",this._header=this.$_createHeader(i),o.appendChild(this._header),this._bodyElement=this.$_createBody(i),o.appendChild(this._bodyElement),this._calendarElement=this.$_createCalTable(i),this._monthsElement=this.$_createMonths(i),this._yearsElement=this.$_createYears(i),n(this._calendar),n(this._monthsElement),n(this._yearsElement),this._footer=this.$_createFooter(i),o.appendChild(this._footer),o},e.prototype.$_createBody=function(t){var e=t.createElement("div");return e.className="rg-calendar-body",e},e.prototype.$_createCalTable=function(t){var e,i=t.createElement("div");(e=i.style).display="flex",e.flexDirection="row";var o=this._dateContainer=t.createElement("div");(e=o.style).display="inline-block",i.appendChild(o),this._calendar=this.$_createCalendar(t),o.appendChild(this._calendar);var n=this._timeContainer=t.createElement("div");return i.appendChild(n),(e=n.style).display="none",e.overflow="hidden",e.height="0px",n.appendChild(this._hourElement=this.$_createHour(t)),n.appendChild(this._minuteElement=this.$_createMinute(t)),n.appendChild(this._secondElement=this.$_createSecond(t)),i},e.prototype._getCell=function(t){for(var e=(0,r.getWin)(t);t&&!(t instanceof e.HTMLTableCellElement);)t=t.parentElement;return t},e.prototype.$_setCurrentTime=function(t,e,i){for(var o=t.parentElement.clientHeight,n=t.offsetTop,s=0,a=0;ao?l.style.visibility="hidden":l.style.removeProperty("visibility")}},e.prototype._doTimeScroll=function(t,e){for(var i=(0,r.getWin)(this._containerElement),o=t;!(o instanceof i.HTMLUListElement)||null==o;)o=o.parentElement;if(o){var n=o.parentElement;if(!(n.scrollHeight<=n.clientHeight)){var s;switch(o.firstElementChild.getAttribute("kind")){case p.TimeSelectType.HOUR:s=this._currDate.getHours();break;case p.TimeSelectType.MINUTE:s=this._currDate.getMinutes();break;case p.TimeSelectType.SECOND:s=this._currDate.getSeconds()}if(o){for(var a=[],l=0;l0?a.push(a.shift()):a.unshift(a.pop()),this.$_setCurrentTime(o,a,s)}}}},e.prototype._doTimeWheel=function(t){this._doTimeScroll(t.target,t.deltaY)},e.prototype._doTimeClick=function(t){var i=t.target,o=new Date(this._currDate),n=i.getAttribute("kind"),r=Number(i.getAttribute("time-value"));switch(n){case p.TimeSelectType.HOUR:o.setHours(r);break;case p.TimeSelectType.MINUTE:o.setMinutes(r);break;case p.TimeSelectType.SECOND:o.setSeconds(r)}this._editor.$_selectDate(this.date=o),this.selected=!0,n===this._editor.timeSelectType&&!this.showButtons&&this.fireEvent(e.CLOSE_UP,!0)},e.prototype._changeCurrent=function(t){switch(this._currentMode){case p.CalendarMode.DAY:this.currentMode=t?p.CalendarMode.MONTH:p.CalendarMode.DAY;break;case p.CalendarMode.MONTH:this.currentMode=t?p.CalendarMode.YEAR:p.CalendarMode.DAY;break;case p.CalendarMode.YEAR:this.currentMode=t?p.CalendarMode.YEAR:p.CalendarMode.MONTH}},e.prototype.$_createHeader=function(t){var e=this,i=function(t,e){var i=t.createElement("span"),o=i.style;return o.position="relative",o.minWidth="17px",o.minHeight="17px",i},o=this,n=this._headerElement=t.createElement("div"),r=n.style;r.position="relative",r.display="flex",n.className="rg-cal-header";var s=n.appendChild(n.$_prev=i(t));s.className="rg-cal-prev-month",s.onclick=this.$_prevMonth;var a=t.createElement("div");(r=a.style).position="relative",r.textAlign="center",r.display="flex",r.alignItems="center",r.justifyContent="center",r.height="100%",r.flexGrow="1",n.appendChild(n.$_title=a),a.className="rg-cal-yearmonth";var l=t.createElement("div");(r=l.style).position="relative",r.fontSize="14px",l.className="rg-cal-year",a.appendChild(a.$_year=l),l.onclick=function(t){e._currentMode!==p.CalendarMode.YEAR&&e._changeCurrent(!0)};var h=this._todayElement=t.createElement("span");(r=h.style).position="relative",h.className="rg-cal-today-button",n.appendChild(h),h.onclick=function(t){var e=new Date;o.focused=!0,o.date=e,o.selected=!0,o.currentMode=o.viewMode||p.CalendarMode.DAY,o._editor.$_selectDate(o._currDate),o._setTime(e,!0)};var u=n.appendChild(n.$_next=i(t));return u.className="rg-cal-next-month",u.onclick=this.$_nextMonth,n},e.prototype.$_createFooter=function(t){var i,o=this,n=t.createElement("div"),r=n.style;return r.display="none",n.className="rg-cal-buttons",(i=this._deleteElement=t.createElement("span")).className="rg-cal-delete-button",(r=i.style).float="left",i.onclick=function(t){o.selected=!0,o.date=null,o._editor.$_selectDate(null)},n.appendChild(i),(i=this._saveElement=t.createElement("span")).className="rg-cal-save-button",(r=i.style).float="right",i.onclick=function(t){o.fireEvent(e.CLOSE_UP,!0)},n.appendChild(i),(i=this._cancelElement=t.createElement("span")).className="rg-cal-cancel-button",(r=i.style).float="right",i.onclick=function(t){o.selected=!1,o._canceled=!0,o.fireEvent(e.CLOSE_UP,!1)},n.appendChild(i),n},e.prototype.$_createCalendar=function(t){var i=e.weeksClass,o=t.createElement("table"),n=o.style;n.margin="2px",o.className="rg-cal-days-table";var r=o.createTHead();r.className="rg-cal-weeks";var s=t.createElement("tr");r.appendChild(s);var a=[],l=t.createElement("th");(n=l.style).minWidth="20px",n.textAlign="center",l.className="rg-cal-week-year-week",s.appendChild(l);var h=t.createElement("span");l.appendChild(h),r.$_weeks=l;for(var u=0;u<7;u++){var d=t.createElement("th");(n=d.style).minWidth="20px",n.textAlign="center",d.className="rg-cal-week-"+i[u],s.appendChild(d);var c=t.createElement("span");d.appendChild(c),a.push(c)}r.$_cells=a;var p=t.createElement("tbody");p.className="rg-cal-days",o.appendChild(o.$_body=p);for(var _=p.$_rows=[],f=p.$_yearweeks=[],g=0;g<6;g++){var m=t.createElement("tr");p.appendChild(m),_.push(m),m.$_cells=a=[];var y=t.createElement("td");(n=y.style).padding="1px",m.appendChild(y);var v=t.createElement("span");y.appendChild(y.$_span=v),f.push(y);for(u=0;u<7;u++){var C=t.createElement("td");(n=C.style).padding="1px",C.className="rg-cal-day rg-cal-week-"+i[(u+this.startWeek)%7],m.appendChild(C),C.onclick=this._clickHandler,C.ondblclick=this._dblClickHandler;var w=t.createElement("span");C.appendChild(C.$_span=w),C.id=this._id+"-"+g.toString()+"-"+u.toString(),a.push(C)}}return o},e.prototype.$_buildYear=function(t){for(var e=this._yearTable.tBodies[0],i=this._currDate.getFullYear(),o=t=10*Math.floor(t/10)-1,n=0;n<3;n++)for(var s=e.rows[n],a=0;a<4;a++){var l=s.cells[a];l.setAttribute("year",t.toString()),l.firstElementChild[r.Utils.TextProp]=r.Utils.htmlEncode(this.yearDisplayFormat?this.yearDisplayFormat.replace("{Y}",t+""):t+""),i===t?r.Utils.addClassName(l,"rg-cal-focusday"):r.Utils.removeClassName(l,"rg-cal-focusday"),t++}var h="".concat(this.yearDisplayFormat?this.yearDisplayFormat.replace("{Y}",o+""):o," - ").concat(this.yearDisplayFormat?this.yearDisplayFormat.replace("{Y}",--t+""):--t);this._headerElement.$_title.$_year[r.Utils.TextProp]=r.Utils.htmlEncode(h)},e.prototype.$_buildMonths=function(){for(var t=this.months,e=0,i=this._currDate.getMonth(),o=this._monthTable.tBodies[0],n=0;n<3;n++)for(var s=o.rows[n],a=0;a<4;a++){var l=s.cells[a];l.setAttribute("month",e.toString());var h=l.firstElementChild;t&&t[e]?h[r.Utils.TextProp]=r.Utils.htmlEncode(t[e]):h[r.Utils.TextProp]=this.monthDisplayFormat?this.monthDisplayFormat.replace("{M}",e+1+""):"".concat(e+1),i===e?r.Utils.addClassName(l,"rg-cal-focusday"):r.Utils.removeClassName(l,"rg-cal-focusday"),e++}var u=this._currDate.getFullYear(),d="".concat(this.yearDisplayFormat?this.yearDisplayFormat.replace("{Y}",u+""):u);this._headerElement.$_title.$_year[r.Utils.TextProp]=r.Utils.htmlEncode(d)},e.prototype.$_buildHourMinutes=function(t){var e,i,o=this._container.doc;switch(t){case p.TimeSelectType.HOUR:e=this._hourElement,i=this._hours;break;case p.TimeSelectType.MINUTE:e=this._minuteElement,i=this._minutes}var n=e.$_UL;if(n){for(;n.lastElementChild;)n.removeChild(n.lastElementChild);i.forEach((function(e){var i=o.createElement("li");i.className="rg-cal-time-item",i.setAttribute("time-value",e.toString()),i[r.Utils.TextProp]=r.Utils.pad(e,2),i.setAttribute("kind",t),n.appendChild(i)}))}},e.prototype.$_monthClick=function(t,i){var o=this._getCell(t.target);if(o){var n=parseInt(o.getAttribute("month")),r=this._currDate.getDate(),s=new Date(this._currDate.getFullYear(),n+1,0).getDate();if(this._currDate.setMonth(n,Math.min(r,s)),this.viewMode===p.CalendarMode.MONTH)return this.selected=!0,this.date=this._currDate,this._editor.$_selectDate(this._currDate),void(this.showButtons&&!i?this.$_buildMonths():this.fireEvent(e.CLOSE_UP,!0));this._changeCurrent(!1),this.$_buildCalendar()}},e.prototype.$_createMonths=function(t){var e=this,i=t.createElement("div"),o=this._monthTable=t.createElement("table");o.className="rg-cal-month-table";var n=t.createElement("tbody");o.appendChild(n);for(var r=0;r<3;r++){var s=n.appendChild(t.createElement("tr"));s.className="rg-cal-month-row";for(var a=0;a<4;a++){var l=s.appendChild(t.createElement("td"));l.className="rg-cal-month-cell",l.appendChild(t.createElement("div"))}}return i.appendChild(o),o.onclick=function(t){e.$_monthClick(t,!1)},o.ondblclick=function(t){e.showButtons&&e.$_monthClick(t,!0)},i},e.prototype.$_yearClick=function(t,i){var o=this._getCell(t.target);if(o){var n=parseInt(o.getAttribute("year"));if(this._currDate.setFullYear(n),this.viewMode===p.CalendarMode.YEAR)return this.selected=!0,this.date=this._currDate,this._editor.$_selectDate(this._currDate),void(this.showButtons&&!i?this.$_buildYear(this._currDate.getFullYear()):this.fireEvent(e.CLOSE_UP,!0));this._changeCurrent(!1)}},e.prototype.$_createYears=function(t){var e=this,i=t.createElement("div"),o=this._yearTable=t.createElement("table");o.className="rg-cal-year-table";for(var n=o.appendChild(t.createElement("tbody")),r=0;r<3;r++){var s=n.appendChild(t.createElement("tr"));s.className="rg-cal-year-row";for(var a=0;a<4;a++){var l=s.appendChild(t.createElement("td"));l.className="rg-cal-year-cell",l.appendChild(t.createElement("div"))}}return i.appendChild(o),o.onclick=function(t){e.$_yearClick(t,!1)},o.ondblclick=function(t){e.showButtons&&e.$_yearClick(t,!0)},i},e.prototype.$_createTimeElt=function(t,e,i,o){var n=e.style;e.className="rg-cal-time rg-cal-time-".concat(o),n.display="inline-block",n.height="100%",n.overflow="hidden",n.position="relative";var s=t.createElement("div");s.className="rg-time-header";var a=t.createElement("div");a.className="rg-time-title",e.$_Label=a,s.appendChild(a),e.appendChild(s);var l=t.createElement("ul");l.addEventListener("wheel",this._timeWheelHandler),l.addEventListener("click",this._timeClickHandler),l.addEventListener("touchstart",this._touchStartHandler),l.addEventListener("touchend",this._touchEndHandler),l.addEventListener("touchmove",this._touchMoveHandler),l.addEventListener("dblclick",this._dblClickHandler),l.className="rg-cal-time-list";for(var h=0;h2){var h=a.splice(0,l-2);a.push.apply(a,h)}else if(l<2){h=a.splice(a.length-l);a.unshift.apply(a,h)}this.$_setCurrentTime(n,a,i)}}},e.prototype._setTime=function(t,e){this.$_setTime(this._hourElement,this._editor.hourLabel,t.getHours(),e),this.$_setTime(this._minuteElement,this._editor.minuteLabel,t.getMinutes(),e),this.$_setTime(this._secondElement,this._editor.secondLabel,t.getSeconds(),e)},e.prototype.$_setTimeSelector=function(){var t=this._editor.timeSelectType,e=this._hourElement.style,i=this._minuteElement.style,o=this._secondElement.style;if(e.display=i.display=o.display="none",this.viewMode===p.CalendarMode.DAY){var n=0;switch(t){case p.TimeSelectType.SECOND:o.display="inline-block",n++;case p.TimeSelectType.MINUTE:i.display="inline-block",n++;case p.TimeSelectType.HOUR:e.display="inline-block",n++}var r=this._headerElement.clientHeight+"px";this._hourElement.firstElementChild.style.height=this._minuteElement.firstElementChild.style.height=this._secondElement.firstElementChild.style.height=r,this._timeContainer.style.display=n?"inline-block":"none"}},e.prototype.$_buildCalendar=function(){var t,i,o=e.weeksClass,n=this._header,s=this._currDate,a=n.$_title,l=s.getFullYear(),h=s.getMonth(),u="";if(this.yearMonthDisplayFormat){var d=this.yearMonthDisplayFormat,c=this.months&&this.months[h];u=d.replace("{Y}",l+""),u=c?u.replace("{MM}",c).replace("{M}",c):u.replace("{MM}",r.Utils.pad(h+1,2)).replace("{M}",h+1+"")}else u=(this.yearDisplayFormat?this.yearDisplayFormat.replace("{Y}",l+""):l)+" ",this.months&&this.months.length>0?u+=this.months[h]:u+=this.monthDisplayFormat?this.monthDisplayFormat.replace("{M}",(h+1).toString()):h+1;a.$_year.innerHTML=u,u=a.$_year.innerText;for(var p=this._calendar.tHead.$_cells,_=0;_<7;_++){var f=p[(_+7-this.startWeek)%7];f.innerHTML=r.Utils.htmlEncode(this._weekDays[_]),f.parentElement.className="rg-cal-week-"+e.weeksClass[_]}this._calendar.tHead.$_weeks.style.display=this.showWeeks?"":"none";for(var g=this._calendar.$_body,m=g.$_yearweeks,v=(_=0,m.length);_=5?r.Utils.addChild(g,C[5]):r.Utils.removeChild(g,C[5]),28==w&&0==b?r.Utils.removeChild(g,C[4]):r.Utils.addChild(g,C[4]);var I,E,S=0,R=m[0];if(p=C[0].$_cells,b>0){var T=l,D=h-1;D<0&&(T--,D=11);var k=r.Utils.month_days[r.Utils.isLeapYear(T)?1:0][D];for(_=0;_=this._minDate)&&(!this._maxDate||t<=this._maxDate)},e.prototype.initOptions=function(){t.prototype.initOptions.call(this),this._textReadOnly=!1,this._minDate=new Date(1970,0,1),this._maxDate=new Date(2100,11,31),this._dropDownPosition=a.DropDownPosition.BUTTON,this._showToday=!0,this._showWeeks=!1,this._startWeek=0,this._weekSelectable=!1,this._weekSeparator="",this._commitOnSelect=!1,this._defaultShowDate=h.DefaultShowDate.NORMAL,this._showButtons=!0,this._cancelLabel=null,this._saveLabel=null,this._deleteLabel=null,this._todayLabel=null,this._timeSelectType=p.TimeSelectType.NONE,this._hours=null,this._minutes=null,this._viewMode=p.CalendarMode.DAY,this._holidayCollection&&this._holidayCollection.setNull(),this._yearDisplayFormat=this._monthDisplayFormat=this._yearMonthDisplayFormat=null},e.prototype.initDefaultOptions=function(){var t=this._grid;t&&s.CellEditor.initDefault(this,f.DefaultOptions.editor.dateCellEditor,t.editorOptions.dateCellEditor)},e.prototype.setEditIndex=function(e){var i;t.prototype.setEditIndex.call(this,e);var o=null===(i=this._editField())||void 0===i?void 0:i.dataType;this._weekSelectable=this._weekSelectable&&o!==h.ValueType.DATE&&o!==h.ValueType.DATETIME},e.prototype.setEditValue=function(e){t.prototype.setEditValue.call(this,e),this.weekSelectable?this._date=m(e):this._date="string"==typeof e?this._dateConverter.getDateNull(e):e},e.prototype.getEditValue=function(e,i){void 0===e&&(e=!0),void 0===i&&(i=!1);var o=t.prototype.getEditValue.call(this,e),n=this._editField().dataType;return o&&i&&(n==h.ValueType.DATE||n==h.ValueType.DATETIME)&&(o=this._minDate?Math.max(this._minDate.getTime(),o):o,(o=this._maxDate?Math.min(this._maxDate.getTime(),o):o)&&(o=new Date(o))),o},e.prototype._createEditor=function(e){return t.prototype._createEditor.call(this,e)},e.prototype._textHandler=function(){this._requestStart(!1)},e.prototype._compositionstartHandler=function(t){this.isDisabled()||this._requestStart(!1)},e.prototype._keyDownHandler=function(e){if(!this.isDisabled()){var i=this._list,o=this.listing,n=this.dropDownWhenEnter&&(this.dropDownWhenTyping||!this.getEditText()),s=o&&i.focused,a=this._list.currentMode;switch(e.keyCode){case 13:if((e.altKey||n)&&13===e.keyCode&&!o)return this._requestStart(!0),r.Utils.stopEvent(e,!0),this._list.focused=!0,this.$_setListDate(),!0;var l=!0;if(o&&s&&r.Utils.included(a,p.CalendarMode.YEAR,p.CalendarMode.MONTH)){if(this._viewMode!==a)return l=!1,i.currentMode=a===p.CalendarMode.YEAR?p.CalendarMode.MONTH:p.CalendarMode.DAY,i.currentMode===p.CalendarMode.DAY&&i.$_buildCalendar(),void r.Utils.stopEvent(e,!0);l=!0}if(l&&this.closeUp(!0))return r.Utils.stopEvent(e,!0),!this._sendToParent(e);break;case 27:if(this.closeUp(!1))return r.Utils.stopEvent(e,!0),!0;break;case 36:case 35:if(s)return r.Utils.stopEvent(e,!0),this.$_selectDate(36===e.keyCode?i.startDay():i.endDay()),!0;break;case 37:case 39:if(s){if(0===this._currentLoc){switch(this._list.currentMode){case p.CalendarMode.DAY:this.$_selectDate(i.incDay(37===e.keyCode?-1:1));break;case p.CalendarMode.MONTH:this.$_selectDate(i.incMonth(37===e.keyCode?-1:1));break;case p.CalendarMode.YEAR:this.$_selectDate(i.incMonth(37===e.keyCode?-12:12))}return r.Utils.stopEvent(e,!0),!0}if(this._setLocation(39===e.keyCode))return r.Utils.stopEvent(e,!0),!0}break;case 33:case 34:if(s){r.Utils.stopEvent(e,!0);var h=33===e.keyCode?-1:1,u=e.shiftKey?12:1;return a===p.CalendarMode.MONTH?u=12:a===p.CalendarMode.YEAR&&(u=120),this.$_selectDate(i.incMonth(h*u)),!0}break;case 40:case 38:if(e.altKey&&40===e.keyCode&&!o)return this._requestStart(!0),r.Utils.stopEvent(e,!0),this._list.focused=!0,this.$_setListDate(),!0;if(e.altKey&&38===e.keyCode&&o)return this.closeUp(!1),r.Utils.stopEvent(e,!0),!0;if(o){if(r.Utils.stopEvent(e,!0),s){h=40===e.keyCode?1:-1;0===this._currentLoc?a===p.CalendarMode.MONTH?this.$_selectDate(i.incMonth(4*h)):a===p.CalendarMode.YEAR?this.$_selectDate(i.incMonth(48*h)):this.$_selectDate(i.incDay(7*h)):1===this._currentLoc?this.$_selectDate(i.incHour(1*h)):2===this._currentLoc?this.$_selectDate(i.incMinute(1*h)):3===this._currentLoc&&this.$_selectDate(i.incSecond(1*h))}else this._list.focused=!0;return!0}break;case 84:e.altKey&&o&&(r.Utils.stopEvent(e,!0),this._list.date=new Date,this.$_selectDate(this._list.date));break;case 9:if(s&&this.timeSelectType!==p.TimeSelectType.NONE&&this._setLocation(!e.shiftKey))return r.Utils.stopEvent(e,!0),!0}return t.prototype._keyDownHandler.call(this,e)}},e.prototype._setLocation=function(t){var e=this._timeSelectType,i=this._currentLoc,o=1;if(e!==p.TimeSelectType.NONE){switch(e){case p.TimeSelectType.SECOND:o++;case p.TimeSelectType.MINUTE:o++;case p.TimeSelectType.HOUR:o++}return t?++i:--i,i<0||i>=o?!1:(this._list.setCurrentLoc(this._currentLoc=i),!0)}this._currentLoc=0},e.prototype._keyPressHandler=function(e){if(!this.isDisabled()){var i=this._list,o=e.keyCode||e.which,n=String.fromCharCode(o);if(n.toLocaleLowerCase()==this.todayChar){if(r.Utils.stopEvent(e,!0),this.listing)return i.focused=!0,this.$_selectDate(i.today),i._setTime(i.today,!0),!0}else{if(r.Utils.isFirefox&&(e.ctrlKey||0===o))return void t.prototype._keyPressHandler.call(this,e);if(r.Utils.isSafari&&r.Utils.ctrlKey(e)&&r.Utils.included(o,99,118,120))return void t.prototype._keyPressHandler.call(this,e);if(!this._regx.test(n))return void e.preventDefault()}t.prototype._keyPressHandler.call(this,e),e.keyCode&&this.textReadOnly&&e.preventDefault()}},e.prototype.$_resetValue=function(t){if(void 0===t&&(t=!1),this.visible||t){var e=this._editor,i=e.selectionStart,o=e.selectionEnd,n=e.value?e.value.length:0;e.value=e.value.replace(g,"");var r=e.value?e.value.length:0;this._isMobile||(r==n?e.setSelectionRange(i,o):e.setSelectionRange(o,o))}},e.prototype._dispatchChange=function(){(this._isMobile||this.visible)&&(this.$_resetValue(this._isMobile),t.prototype._dispatchChange.call(this))},e.prototype._changeHandler=function(e){t.prototype._changeHandler.call(this,e)},e.prototype._requestStart=function(e){return!!t.prototype._requestStart.call(this)&&(this._isMobile||e?e&&this.dropDown(!1):!1!==e&&this.dropDownWhenTyping&&this.dropDown(!1),!0)},e.prototype.setBounds=function(e,i,o,n,r){t.prototype.setBounds.call(this,e,i,o,n,r)},e.prototype._doChanged=function(){this._isMobile?!this._controller.readOnly&&this._controller.editable&&(this._modified=!0,this._dispatchChange()):(!this._started&&this._requestStart(),this._started&&!this._controller.readOnly&&this._controller.editable&&(this._modified=!0,this._dispatchChange()))},e.prototype.dropDownList=function(t){this.dropDown(!0)},e.prototype.closeList=function(t){this.closeUp(t)},e.prototype._getInputSelector=function(){return e.INPUT_CSS},e.prototype.skipMaskChar=function(t){return" "===t},e.prototype._isDateEditor=function(){var t=this._editField().dataType;return t==h.ValueType.DATE||t==h.ValueType.DATETIME||!this.weekSelectable},e.prototype.$_selectDate=function(t){if(t){if(this._date=t,this.containsRange(t)){var e=void 0;e=this.weekSelectable?y(t,this._startWeek,this.weekSeparator):this._dateConverter.getText(this._date),this._mask&&(e=this._mask.writeBuffer(e)),this._editor.value=e,this._doChanged()}}else this._date=null,this._mask&&this._mask.clearBuffer(),this._editor.value="",this._doChanged()},e.prototype.$_setListDate=function(){var t,e=this._defaultDate instanceof Date?new Date(this._defaultDate):this._dateConverter.getDateNull(this._defaultDate),i=this._editor.value;switch(this._mask&&(i=this._mask.getStripValue()),t=this.weekSelectable?m(i):this._dateConverter.getDateNull(i),this._defaultShowDate){case h.DefaultShowDate.TODAY:t=new Date;break;case h.DefaultShowDate.NORMAL:break;case h.DefaultShowDate.TODAY_WHEN_NULL:t=t||new Date;break;case h.DefaultShowDate.DEFAULT_WHEN_NULL:t=t||e;break;case h.DefaultShowDate.DEFAULT:t=e}t&&(this._list.date=t)},e.prototype.onDatePickerCloseUp=function(t,e){!this._isMobile&&this.setFocus(),this.closeUp(e)},e.INPUT_CSS="rg-date-editor",e.$$_LIST_ID=0,e}(s.PopupCellEditor);rr.DateCellEditor=R;var T=function(t){function e(e,i,o){var n=t.call(this)||this;n._focused=!1;var s=(0,r.getDocWin)(e.doc);return n._jquery=s&&s.jQuery,n._editor=i,n._container=e,n._btOptions=o,n._element=n.$_createList(e.doc),n}return o.__extends(e,t),e.prototype._doDispose=function(){this._jquery=null,this._editor=null,this._container=null,this._containerElement=null,t.prototype._doDispose.call(this)},_dp(e,"date",{get:function(){return this._date},set:function(t){if(this._date=t,t.getTime()!==this._date.getTime()&&(this._currDate=new Date(t),this._date=new Date(t),this.listing)){var e=new Date(t.getFullYear(),t.getMonth(),t.getDate());this._jquery&&this._jquery(this._element).datepicker("update",e)}}}),_dp(e,"listing",{get:function(){return this._jquery&&this._jquery(this._element).data("datepicker")}}),_dp(e,"focused",{get:function(){return this._focused},set:function(t){t!=this._focused&&(this._focused=t,this._element.style.border=t?"1px solid rgba(50, 50, 50, 1)":"1px solid rgba(50, 50, 50, 0.3)",this._element.style.boxShadow=t?"rgba(0, 0, 0, 0.8) 1px 2px 5px":"rgba(0, 0, 0, 0.5) 1px 2px 5px")}}),e.prototype.$_destroy=function(){this._jquery&&this._jquery(this._element).datepicker("destroy")},e.prototype.keydown=function(t){if(this._jquery){this._jquery(this._element).datepicker("keydown",t);var e=this._jquery(this._element).data("datepicker").viewDate;e instanceof Date&&(this.date=e,this._editor&&this._editor.selectDate(this._date))}},e.prototype.$_createList=function(t){var e=t.createElement("div");e.tabIndex=-1,e.id="rg-calendar-"+R.$$_LIST_ID++,e.className="rg-calendar";var i=e.style;return i.position="absolute",i.cssFloat="none",i.clear="both",i.boxSizing="border-box",i.zIndex=String(this._editor._baseZindex+2),i.margin="0px",i.overflow="auto",e},e.prototype.show=function(t,e,i,o,n){if(this._containerElement=!r.Utils.isMobile()&&this._viewGridInside?this._container._container:t,!this.$_createCalendar())throw alert("BootStrap DatePicker Not Include"),new Error("BootStrap DatePicker Not Include");return this.$_show(e,i,o,n),!0},e.prototype.$_createCalendar=function(){var t,e=this,i=this._element,o=this._btOptions;return this._date&&(t=new Date(this._date.getFullYear(),this._date.getMonth(),this._date.getDate())),!(!this._jquery||!this._jquery().datepicker)&&(this._jquery(i).datepicker&&this._jquery(i).datepicker(o).datepicker("setDate",t).on("changeDate",(function(t){var i=t.date;i&&!e._editor.containsRange(i)||(i?(e._date=new Date(i),e.selected=!0):(e._date=void 0,e.selected=!0),e.fireEvent(E.CLOSE_UP,!0))})),!0)},e.prototype.$_show=function(t,e,i,o){this.focused=!1,this.selected=!1,this._containerElement.appendChild(this._element);var n=this._date;this._currDate=n?new Date(n):new Date,this.$_resetPosition(t,e,i,o),this._element.style.setProperty("width",Math.ceil(r.Utils.getSize(this._element).width)+"px")},e.prototype.today=function(){return this.date=new Date},e.prototype.incDay=function(t){var e;return this._date.getMonth()==this._currDate.getMonth()?(e=new Date(this._date),this._date&&e.setDate(this._date.getDate()+t)):(e=this._currDate,e=new Date(e.getFullYear(),e.getMonth(),1)),this.date=e},e.prototype.incMonth=function(t){var e;return this._date.getMonth()==this._currDate.getMonth()?(e=new Date(this._date),this._date&&r.Utils.incMonth(e,t)):(e=this._currDate,e=new Date(e.getFullYear(),e.getMonth(),1)),this.date=e},e.prototype.firstDay=function(){var t=new Date(this._currDate);return this._date&&t.setDate(1),this.date=t},e.prototype.lastDay=function(){var t=new Date(this._currDate);if(this._date){var e=t.getFullYear(),i=t.getMonth(),o=r.Utils.month_days[r.Utils.isLeapYear(e)?1:0][i];t.setDate(o)}return this.date=t},e}(I),D=function(t){function e(e,i){var o=t.call(this,e,i)||this;return o._minDate=new Date(1970,0,1),o._maxDate=new Date(2100,11,31),o._dropDownPosition=a.DropDownPosition.BUTTON,o._commitOnSelect=!1,o._regx=/[0-9]|\.|\-|\/|a|A|p|P|m/,o._closing=!1,o._globalMouseHandler=function(t){var e=t.target;if(this._isMarquee(e))this.closeUp(!1);else{for(;e;){if(e==this._list._element)return;e=e.parentNode}this.closeUp(!0)}}.bind(o),o._baseZindex=o._grid.displayOptions.baseZindex,o}return o.__extends(e,t),e.prototype._doDispose=function(){this._globalMouseHandler=null,t.prototype._doDispose.call(this)},_dp(e,"list",{get:function(){return this._list},set:function(t){this._list=t}}),_dp(e,"btOptions",{get:function(){return this._btOptions},set:function(t){this._btOptions=t}}),_dp(e,"editFormat",{get:function(){return this.datetimeFormat},set:function(t){this.datetimeFormat=t}}),_dp(e,"minDate",{get:function(){return this._minDate},set:function(t){this._minDate=t?t instanceof Date?t:"string"==typeof t?this._dateConverter.getDateNull(t):null:null,this._minDate&&this._minDate.setHours(0,0,0,0)}}),_dp(e,"maxDate",{get:function(){return this._maxDate},set:function(t){this._maxDate=t?t instanceof Date?t:"string"==typeof t?this._dateConverter.getDateNull(t):null:null,this._maxDate&&this._maxDate.setHours(23,59,59)}}),_dp(e,"commitOnSelect",{get:function(){return this._commitOnSelect},set:function(t){this._commitOnSelect=t}}),e.prototype.resetPosition=function(){var t=this._list,e=this._grid,i=r.Utils.getSize(this._container);if(e.accessibility){var o=r.Utils.getSize(this._grid.container._containerDiv);i.cx=i.x-o.x+i.cx,i.cy=i.y-o.y+i.cy}t.$_resetPosition(i.cx+1,i.cy+i.height,this._cellBounds.width,r.Utils.getSize(this._editor))},e.prototype.dropDown=function(){if(!(this.readOnly||this._controller._readOnly||this.listing||this._closing)){var t=(0,r.getDoc)(this._container),e=(0,r.getDocWin)(t),i=this._grid,o=this._list=new T(i.container,this,this._btOptions),n=t.body,s=r.Utils.getSize(this._container);if(i.accessibility){var a=r.Utils.getSize(this._grid.container._containerDiv);s.cx=s.x-a.x+s.cx,s.cy=s.y-a.y+s.cy}if(o.addListener(this),o.viewGridInside=this._options&&this._options.viewGridInside,o.dropDownPosition=this._dropDownPosition,o.minDate=this._minDate,o.maxDate=this._maxDate,this.$_setListDate(),this.isShowMarquee()){if(this._showMarquee(n),!o.show(n,0,0,0,null))return!1;this._centerPopup(n,o._element)}else{if(!o.show(n,s.cx+1,s.cy+s.height,this._cellBounds.width,r.Utils.getSize(this._editor)))return!1;this.registerPositionListener()}return!r.Utils.isSlotMode()&&e.addEventListener(r.Utils.isIEMode()?"mousedown":"pointerdown",this._globalMouseHandler),!0}return!1},e.prototype.closeUp=function(t){if(this.unRegisterPositionListener(),this.listing){var e=(0,r.getDoc)(this._container),i=(0,r.getDocWin)(e);this._closing=!0;try{!r.Utils.isSlotMode()&&i.removeEventListener(r.Utils.isIEMode()?"mousedown":"pointerdown",this._globalMouseHandler),this._closeMarquee(),t&&this._list.selected&&(this.$_selectDate(this._list.date),(this._isMobile||this._commitOnSelect)&&this._dispatchCommit())}finally{this.$_listDestroy(),this._closing=!1}return!0}return!1},e.prototype.dropDownList=function(){this.dropDown()},e.prototype.closeList=function(t){this.closeUp(t)},e.prototype.$_setListDate=function(){var t=this._editor.value;t&&this._mask&&(t=this._mask.getStripValue());var e=this._dateConverter.getDateNull(t);e&&(this._list.date=e)},e.prototype.selectDate=function(t){this.$_selectDate(t)},e.prototype.$_selectDate=function(t){if(t&&t!=this._date){if(this._date=t,this.containsRange(t)){var e=this._dateConverter.getText(this._date);this._mask&&(e=this._mask.writeBuffer(e)),this._editor.value=e,this._doChanged()}}else void 0===t&&(this._editor.value=this._mask?(this._mask.clearBuffer(),this._mask.writeBuffer(null)):"",this._doChanged())},e.prototype.containsRange=function(t){return(!this._minDate||t>=this._minDate)&&(!this._maxDate||t<=this._maxDate)},_dp(e,"listing",{get:function(){return!!this._list&&this._list.listing}}),e.prototype.initOptions=function(){t.prototype.initOptions.call(this),this._textReadOnly=!1,this._viewGridInside=!1,this._minDate=new Date(1970,0,1),this._maxDate=new Date(2100,11,31),this._commitOnSelect=!1},e.prototype.initDefaultOptions=function(){},e.prototype._isDateEditor=function(){return!0},e.prototype.setEditValue=function(e){t.prototype.setEditValue.call(this,e),this._date="string"==typeof e?this._dateConverter.getDateNull(e):e},e.prototype.getEditValue=function(e,i){var o=t.prototype.getEditValue.call(this,e),n=this._editField().dataType;return o&&i&&(n==h.ValueType.DATE||n==h.ValueType.DATETIME)&&(o=o.getTime(),o=this._minDate?Math.max(this._minDate.getTime(),o):o,(o=this._maxDate?Math.min(this._maxDate.getTime(),o):o)&&(o=new Date(o))),o},e.prototype._requestStart=function(e){return!!t.prototype._requestStart.call(this,e)&&(this._isMobile||e?e&&this.dropDown():!1!==e&&this.dropDownWhenTyping&&this.dropDown(),!0)},e.prototype._textHandler=function(){this._requestStart()},e.prototype._compositionstartHandler=function(){this._requestStart()},e.prototype._keyDownHandler=function(e){if(!this.isDisabled()){var i=this._list,o=this.listing,n=o&&i.focused;switch(e.keyCode){case 13:if(this.closeUp(!0))return r.Utils.stopEvent(e,!0),!this._sendToParent(e);break;case 27:if(this.closeUp(!1))return r.Utils.stopEvent(e,!0),!0;break;case 36:if(n)return r.Utils.stopEvent(e,!0),this.$_selectDate(i.firstDay()),!0;break;case 35:if(n)return r.Utils.stopEvent(e,!0),this.$_selectDate(i.lastDay()),!0;break;case 37:case 39:if(n)return r.Utils.stopEvent(e,!0),i&&i.keydown(e),!0;break;case 33:if(n)return r.Utils.stopEvent(e,!0),this.$_selectDate(i.incMonth(-1)),!0;break;case 34:if(n)return r.Utils.stopEvent(e,!0),this.$_selectDate(i.incMonth(1)),!0;break;case 40:if(e.altKey&&!o)return this._requestStart(!0),r.Utils.stopEvent(e,!0),!0;if(o)return r.Utils.stopEvent(e,!0),n?i.keydown(e):(i.focused=!0,this.$_setListDate()),!0;break;case 38:if(e.altKey&&o)return this.closeUp(!1),r.Utils.stopEvent(e,!0),!0;if(o){if(r.Utils.stopEvent(e,!0),n)i.date.getDate()<=7?i.focused=!1:i.keydown(e);else i.focused=!1;return!0}break;case 84:e.altKey&&o&&(r.Utils.stopEvent(e,!0),i.date=new Date,this.$_selectDate(i.date))}return t.prototype._keyDownHandler.call(this,e)}},e.prototype._keyPressHandler=function(e){if(!this.isDisabled()){var i=this._list,o=r.Utils.ctrlKey(e),n=e.keyCode||e.which,s=String.fromCharCode(e.keyCode||e.charCode);if(s.toLocaleLowerCase()==this.todayChar){if(r.Utils.stopEvent(e,!0),this.listing)return i.focused=!0,this.$_selectDate(i.today()),!0}else{if(r.Utils.isFirefox&&(e.ctrlKey||0===n))return t.prototype._keyPressHandler.call(this,e);if(r.Utils.isSafari&&o&&r.Utils.included(n,99,118,120))return void t.prototype._keyPressHandler.call(this,e);if(!this._regx.test(s))return void e.preventDefault()}t.prototype._keyPressHandler.call(this,e),e.keyCode&&this.textReadOnly&&e.preventDefault()}},e.prototype.$_resetValue=function(t){if(void 0===t&&(t=!1),this.visible||t){var e=this._editor,i=e.selectionStart,o=e.selectionEnd,n=e.value?e.value.length:0;e.value=e.value.replace(g,"");var r=e.value?e.value.length:0;this._isMobile||(r==n?e.setSelectionRange(i,o):e.setSelectionRange(o,o))}},e.prototype.setBounds=function(e,i,o,n,r){t.prototype.setBounds.call(this,e,i,o,n,r)},e.prototype._doChanged=function(){this._isMobile?!this._controller.readOnly&&this._controller.editable&&(this._modified=!0,this._dispatchChange()):(this._started&&this._requestStart(),this._started&&!this._controller.readOnly&&this._controller.editable&&(this._modified=!0,this._dispatchChange()))},e.prototype._dispatchChange=function(){(this._isMobile||this.visible)&&(this.$_resetValue(this._isMobile),t.prototype._dispatchChange.call(this))},e.prototype.onDatePickerCloseUp=function(t,e){!this._isMobile&&this.setFocus(),this.closeUp(e)},e.prototype._getInputSelector=function(){return e.INPUT_CSS},e.prototype.$_listDestroy=function(){var t=this._list&&this._list._element.parentElement;this._list&&(this._list.$_destroy(),t.removeChild(this._list._element),this._list.dispose(),delete this._list)},e.INPUT_CSS="rg-btdate-editor",e}(s.PopupCellEditor);rr.BTDateCellEditor=D;var k=function(t){function e(e,i){var o=t.call(this,e,i)||this;return o._minDate=new Date(1970,0,1),o._maxDate=new Date(2100,11,31),o}return o.__extends(e,t),_dp(e,"minDate",{get:function(){return this._minDate},set:function(t){t!=this._minDate&&(this._minDate=t?t instanceof Date?t:"string"==typeof t?this._dateConverter.getDateNull(t):null:null,this._minDate&&this._minDate.setHours(0,0,0,0),this._changed())}}),_dp(e,"maxDate",{get:function(){return this._maxDate},set:function(t){t!=this._maxDate&&(this._maxDate=t?t instanceof Date?t:"string"==typeof t?this._dateConverter.getDateNull(t):null:null,this._maxDate&&this._maxDate.setHours(23,59,59),this._changed())}}),_dp(e,"native",{get:function(){return!0}}),_dp(e,"buttonCount",{get:function(){return 1}}),e.prototype._createEditor=function(e){var i=t.prototype._createEditor.call(this,e);return i.setAttribute("type","date"),i.tabIndex=this._isMobile?-1:0,i},e.prototype._getInputSelector=function(){return e.INPUT_CSS},e.prototype.initOptions=function(){t.prototype.initOptions.call(this)},e.prototype.initDefaultOptions=function(){},e.prototype.hasButton=function(t,e){return null==t||t},e.prototype.setVisible=function(e,i){void 0===i&&(i=!1),t.prototype.setVisible.call(this,e,i),this.visible&&this._editor.click()},e.prototype.setEditIndex=function(e){t.prototype.setEditIndex.call(this,e);var i=this._editor;i.min=this._minDate?this.$_toInputDate(this._minDate):"",i.max=this._maxDate?this.$_toInputDate(this._maxDate):""},e.prototype.setEditValue=function(t){this._date="string"==typeof t?this._dateConverter.getDateNull(t):t,this._editor.value=this.$_toInputDate(this._date)},e.prototype._keyDownHandler=function(e){if(!this.isDisabled()){if(40===e.keyCode)if(e.altKey)return this._requestStart(),!0;return t.prototype._keyDownHandler.call(this,e)}},e.prototype.setBounds=function(e,i,o,n,s){t.prototype.setBounds.call(this,e,i,o,n,0),this._editor&&r.Utils.isiOS&&(this._editor.style.minWidth=o+"px",this._editor.style.width=o+"px")},e.prototype.$_toInputDate=function(t){return t?e.Formatter.getText(t):""},e.INPUT_CSS="rg-ndate-editor",e.Formatter=u.DateTimeWriter.getFormatter("yyyy-MM-dd"),e}(s.TextCellEditor);return rr.NativeDateCellEditor=k,rr}function lr(){if(or)return $n;or=1,Object.defineProperty($n,"__esModule",{value:!0}),$n.ClipboardManager=$n.ClipboardIndex=$n.ClipboardItem=$n.DefaultClipboardData=$n.ClipboardSource=$n.ClipboardData=void 0;var t=d,e=Gi(),i=cn(),o=dn(),n=S(),r=rn(),s=C(),a=G(),l=zn(),h=zn(),u=ft(),c=Zn(),p=tr(),_=Ko(),f=rt(),g=lt(),m=uo(),y=ar(),v=function(e){function i(){return e.call(this)||this}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},i.prototype.lastLayout=function(){throw new Error("Method not implemented.")},i.prototype.getText=function(t,e,i,o){throw new Error("Method not implemented.")},i.prototype.getCellText=function(t,e){throw new Error("Method not implemented.")},i.prototype.getRows=function(t,e,i){throw new Error("Method not implemented.")},i.prototype.getCell=function(t,e,i){throw new Error("Method not implemented.")},i}(a.Base);$n.ClipboardData=v;var w=function(e){function o(t,i,o){var n=e.call(this)||this;return n._colCount=0,n._blockPaste=!1,n._lines=[],n._colCount=0,n._blockPaste=!1,n._parse(t,i,o),n}return t.__extends(o,e),o.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(o,"rowCount",{get:function(){return this._lines.length}}),_dp(o,"colCount",{get:function(){return this._colCount},set:function(t){this._colCount=t}}),_dp(o,"empty",{get:function(){return 0==this._lines.length||0==this._colCount}}),_dp(o,"single",{get:function(){return 1==this._lines.length&&1==this._colCount}}),_dp(o,"blockPaste",{get:function(){return this._blockPaste},set:function(t){this._blockPaste=t}}),_dp(o,"startIndex",{get:function(){return this._startIndex}}),o.prototype.get=function(t){return this._lines[t]},o.prototype._parse=function(t,e,o){var n,r,s,a,l,u=this._lines,d=[],c=t.length,p=0,_="";if(""===t)d.push(t),u.push(d),this._colCount=1;else{for(;p0||l)&&d.push(_),d.length>0&&(this._colCount=Math.max(this._colCount,d.length),u.push(d))}if(e&&e instanceof h.BlockSelection&&!e.single&&(!o||1===this._colCount&&1===u.length)){var f=e.startIndex,g=e.endIndex;if(f&&g){var m=e.grid,y=f.layout,v=g.layout,C=f.itemIndex,w=g.itemIndex;if(y.col>v.col){var x=y;y=v,v=x}if(C>w){var b=C;C=w,w=b}y=m.activeCellLayout.getTopOf(y);for(var I=(v=m.activeCellLayout.getBottomOf(v,!0)).col-y.col+1,E=0,S=C;S<=w;S++){var R=m.getItem(S);R&&R.isDataRow&&E++}var T=(v.row-y.row+1)*E;p=0;for(var D=0,k=u.length;D=M.length?0:p;this._colCount=Math.max(this._colCount,u[D].length)}p=0;for(D=u.length;D=u.length?0:p;this._blockPaste=!0,this._startIndex=i.CellIndex.temp(m,C,y)}}},o}(a.Base);$n.ClipboardSource=w;var x=function(s){function a(){var t=s.call(this)||this;return t._lastLayout=null,t}return t.__extends(a,s),a.prototype._doDispose=function(){return s.prototype._doDispose.call(this)},a.prototype.lastLayout=function(){return this._lastLayout},a.prototype.getText=function(t,o,s,a){var l,h,u,d,c,p=t.grid,_=this._rangeToCells(t,null,o,a),f=[];if(p.copyOptions.includeHeaderText)for(u=0;u<_.length;u++){var g=[];for(d=0;d<_[u].length;d++)(l=n.Utils.cast(_[u][d],r.ValueColumn))?g.push(n.Utils.addQuot(l.header.displayText)):g.push("");f.push(g.join("\t"))}if(!s){s=[];for(var m=o.r1,y=o.r2;m<=y;m++)s.push(m)}return s.forEach((function(o){var s=p.getItem(o);if(s.dataRow>=0||(0,e.ItemState_isInserting)(s.itemState))for(u=0;u<_.length;u++){var a=[];for(d=0;d<_[u].length;d++)(l=n.Utils.cast(_[u][d],r.ValueColumn))&&!l.blankWhenCopy?(h=i.CellIndex.temp(p,o,l).clone(),a.push(t.getData(h))):a.push("");c=0!=a.join("\t").length,f.push(a.join("\t"))}})),f.join("\r\n")+(c?"":"\r\n")},a.prototype.getCellText=function(t,e){var i="";return t.grid.copyOptions.includeHeaderText&&(i=e.valueColumn.header.displayText+"\r\n"),i+=t.getData(e)},a.prototype.getRows=function(t,e,o){if(null==e)return null;var n,r=o.grid,s=r.pasteOptions,a=r.getSelection(),u=o.dataColumn;if(a&&a.single&&!r.isTree()&&u&&u.mergeEdit&&r.editOptions.commitByCell){var d=r.getMergedItems(o.itemIndex,u,!0,!0),c=new i.CellIndex(r,d[0],u),p=new i.CellIndex(r,d[d.length-1],u);a=new h.BlockSelection(r.selections,l.SelectionStyle.BLOCK,c,p),n=!0}else{if(s.selectBlockPaste&&r.selections.count>1)return void alert(s.multiSelectionPasteFailText);a=s.selectBlockPaste&&a}var _=new w(e,a,n);if(_.empty)return null;if(_.single)return _.get(0)[0];_.blockPaste&&_.startIndex&&o.assign(_.startIndex);for(var f=r.activeCellLayout._dataCells,g=f[0][o.layout.col],m=f[f.length-1][Math.min(f[0].length-1,o.layout.col+_.colCount-1)],y=new i.CellIndex(r,o.itemIndex,g),v=new i.CellIndex(r,o.itemIndex,m),C=i.CellRange.create(y,v),x=this._rangeToCells(t,_,C,null),b=void 0,I=void 0,E=void 0,S=void 0,R=[],T=0,D=_.rowCount;T=0?(p.push(f.firstColumn),d[_]=d[_]||f):p.push(null)}u.push(p)}for(_=a[0].length-1;_>=0;_--)for(c=l;c<=h;c++)!d[_]&&u[c].splice(_,1)}else for(c=l;c<=h;c++){p=[];var g=r.source,m=s.source,y=g.col,v=m.col+m._defColSpan-1;for(_=y;_<=v;_++){(f=a[c][_])instanceof o.CellLayoutColumnItem?p.push(f.firstColumn):p.push(null)}u.push(p)}return this._lastLayout=a[h][s.col],u},a}(v);$n.DefaultClipboardData=x;var b=function(i){function o(t){var e=i.call(this)||this;return e._values=null,e._dataRow=-1,e._grid=t,e}return t.__extends(o,i),_dp(o,"isLeaf",{get:function(){return!0}}),_dp(o,"dataSource",{get:function(){return this._grid.dataSource}}),_dp(o,"checked",{get:function(){return 0!=(this._getExtents()&e.ITEM_EXT_CHECKED)}}),_dp(o,"type",{get:function(){return s.ItemType.ROW}}),o.prototype._getExtents=function(){return 0},o.prototype._setExtents=function(t){},_dp(o,"values",{set:function(t){this._values=t}}),_dp(o,"dataRow",{get:function(){return this._dataRow},set:function(t){this._dataRow=t}}),_dp(o,"dataId",{get:function(){return this.dataSource.getRowId(this._dataRow)}}),o.prototype.getRowObject=function(){for(var t={},e=this.dataSource,i=this._dataRow>=0&&e.getRow(this._dataRow),o=0,n=e.fieldCount;o=0&&e.getRow(this._dataRow),o=0,n=e.fieldCount;o=0))return"";if(o=t.value,l&&!l.blankWhenCopy){if(null==(i=p?p.call(this,a,t.itemIndex,l,o):void 0))if(u.copyDisplayText||l instanceof r.SeriesColumn)i=a.getDisplayText(t);else{switch(l instanceof r.DataColumn?l.valueType:s.ValueType.TEXT){case s.ValueType.DATETIME:case s.ValueType.DATE:i=o?d?d.getText(o):String(o):"";break;case s.ValueType.BOOLEAN:i=null!=o?c?c.formatValue(o):String(o):"";break;case s.ValueType.NUMBER:i=null==o||isNaN(o)?"":String(o);break;case s.ValueType.OBJECT:i=o&&"object"==typeof o?JSON.stringify(o):"";break;default:i=u.lookupDisplay&&l instanceof r.DataColumn&&(l.lookupDisplay||l.labelField)?m.DataCell.getText(h,l):null!=o?String(o):""}}return n.Utils.addQuot(i)}return""},t.prototype.copyEmtpyToClipboard=function(){return""},t.prototype.copyToClipboard=function(t,e,i){return this._data.getText(this,t,e,i)},t.prototype.copyCellToClipboard=function(t){return this._data.getCellText(this,t)},t.prototype.pasteCellFromClipboard=function(t,e){if((t=this._correctIndex(t))&&this._grid.isValid(t)&&null!=e){var i=this._data.getCell(this,e,t);this._pasteSingleCell(t,i)}},t.prototype.pasteFromClipboard=function(t,e){var o=t.clone(),n=this.grid.pasteOptions.forceAppend;if((t=this._correctIndex(t))&&this._grid.isValid(t)){if(null!=e){var r=this._data.getRows(this,e,t);null!=r&&("string"==typeof r?this._pasteSingleCell(t,r):1!=r.length||n?(r.length>1||1===r.length&&n)&&this._pasteMultiLines(t,r):this._pasteSingleLine(t,r[0]))}i.CellIndex.areEquals(t,o)||this._grid.setFocusedIndex(o,!1,!1)}},t.prototype._correctIndex=function(t){if(t){var e=this._grid;if(t.normalize(e),this._grid.isValid(t)&&e.pasteOptions.selectionBase&&e.selections.count>0){var i=e.selections.getItem(0).getBounds().firstCell;t.column=i.column,t.itemIndex=i.itemIndex}}return t},t.prototype._convertValue=function(t,e,i,o,n,r){var a,l=void 0,h=i.dataIndex,d=t.getField(h),_=this._grid,f=function(){var t=_.body.getIndexCellStyle(r).editor||i.editor||{};"string"==typeof t&&(t={type:t});var e=_.delegate.getCellEditor(c.CellEditor.getEditorType(t));return e.initOptions(),e.initDefaultOptions(),e.applyOptions(t),e};switch(d.dataType){case s.ValueType.NUMBER:l=NaN;var g=void 0;if(o){var m=void 0;(e.applyNumberFormat||e.applyMaxLength)&&(m=a=f());var v=i.name;if(e.applyNumberFormat){var C=m&&m.editFormat||i.numberFormat||_.formatOptions.numberFormat;C&&(g=new u.DecimalFormatter(C))}var w=e.numberCharExpOfCol(v);w&&(o=o.replace(w,""));var x=e.numberSeparatorOfCol(v);if(x&&(o=o.replace(x,".")),l=g?+parseFloat(o).toFixed(g.maxDigits):parseFloat(o),e.applyMaxLength){var b=String(l).split(".");m&&m.maxIntegerLength>0&&(b[0]=b[0].substr(0,m.maxIntegerLength)),o=b.join("."),m&&m.maxLength>0&&(o=o.substr(0,m.maxLength)),l=parseFloat(o)}}else""==o&&(l=null);break;case s.ValueType.DATETIME:l=null;var I=e.dateReaders;if(o&&I)for(var E=0;E0)M=a.values,k=a.labels;else if(i.lookupSource){var O=i.lookupSource,F=i.lookupKeyFieldIds,L=[];for(E=0;E0&&(M=i.values,k=i.labels);if(a instanceof p.MultiCheckCellEditor){b=o.split(i.valueSeparator);var B=[];for(E=0;E=0&&(V=M[D]),R&&(!M||M.indexOf(V)<0)||B.push(V)}o=B.join(i.valueSeparator)}else o=T&&M&&k&&M.indexOf(o)<0&&(D=k.indexOf(o))>=0?M[D]:o,o=M&&M.indexOf(o)>=0?o:R?"":o}else a instanceof y.DateCellEditor?(a.mask&&a.mask.writeBuffer(o,!0),o=null==(l=a._strToVal(o))?void 0:l):(e.applyMaxLength&&a&&a instanceof c.TextCellEditor&&a.maxLength>0&&(o=o.substr(0,a.maxLength)),i.textInputCase==s.TextInputCase.LOWER?o=o.toLocaleLowerCase():i.textInputCase==s.TextInputCase.UPPER&&(o=o.toLocaleUpperCase()));l=o}if(e.applyEditMask||e.applyInputChars){if(a||(a=f()),e.applyEditMask&&"string"==typeof l){var A=a.mask;A&&(A.clearBuffer(),A.writeBuffer(l,!0),l=A.checkValid()?A.getStripValue():null)}if(e.applyInputChars&&a instanceof c.LineCellEditor){var N=a.inputCharacters,$=void 0;a.inputCharacters&&($=new RegExp("[^"+N+"]","g")).test(l)&&(l=l.replace($,"")),(N=a.ignoreCharacters)&&($=new RegExp("["+N+"]","g")).test(l)&&(l=l.replace($,""))}}return l},t.prototype._fireRowsPasted=function(t){for(var e=this._grid,i=[],o=0;o0&&e._fireItemsPasted(i)},t.prototype._cellWritable=function(t,i,o){var n=this._grid,r=n._fireCellPasting(t,o.value,o);if("boolean"==typeof r)return r;if(!n.pasteOptions.checkReadOnly)return!0;var s=n.body.getIndexCellStyle(t);if(s&&(null!=s.readOnly||null!=s.editable))return null!=s.editable?s.editable&&!s.readOnly:!s.readOnly;var a=n.body.getRowStyle(t.item,t.itemIndex-1&&void 0===B[z.dataIndex]&&void 0!==z.defaultValue&&(B[z.dataIndex]=z.defaultValue)}if(h.fillFieldDefaults)for(R=0;R0&&((t=t.clone()).itemIndex=f-D.length),n.setFocusedIndex(t,!1),n.selections.clear(!0),n.selections.add(t,new i.CellIndex(t.grid,f-1,this._data.lastLayout()),l.SelectionStyle.BLOCK,!0)}},t}();return $n.ClipboardManager=E,$n}function hr(){if(nr)return Nn;nr=1,Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.GridBody=void 0;var t=d,e=uo(),i=io(),o=Gi(),n=rn(),r=C(),s=lr(),a=function(i){function a(t){var r=i.call(this,t)||this;return r._cellButtonWidth=16,r._editButtonWidth=16,r._editButtonHeight=16,r._errorIconWidth=16,r._showChangeMarker=!1,r._formatter={numberFormatter:null,datetimeWriter:null,booleanFormatter:null,textFormatter:null,prefix:"",suffix:"",text:null},r._buttonHeight=16,r._dataCell=new e.DataCell,r._hiddenCell=new e.HiddenDataCell,r._literalCell=new e.LiteralCell,r._seriesCell=new e.SeriesCell,r._cs=new n.ColumnStyle,r._rowCs=new o.RowStyle,r}return t.__extends(a,i),a.prototype._doDispose=function(){this._dataCell=this._dataCell.dispose(),this._hiddenCell=this._hiddenCell.dispose(),this._literalCell=this._literalCell.dispose(),this._seriesCell=this._seriesCell.dispose(),this._cs=null,this._rowCs=null,i.prototype._doDispose.call(this)},_dp(a,"cellStyleCallback",{get:function(){return this._cellStyleCallback},set:function(t){t!==this._cellStyleCallback&&(this._cellStyleCallback=t,this.refreshOwner())}}),_dp(a,"rowStyleCallback",{get:function(){return this._rowStyleCallback},set:function(t){t!==this._rowStyleCallback&&(this._rowStyleCallback=t,this.refreshOwner())}}),_dp(a,"ariaLabelCallback",{get:function(){return this._ariaLabelCallback},set:function(t){this._ariaLabelCallback=t,this.refreshOwner()}}),_dp(a,"cellButtonWidth",{get:function(){return this._cellButtonWidth},set:function(t){t!=this._cellButtonWidth&&(this._cellButtonWidth=t,this.refreshOwner())}}),_dp(a,"editButtonWidth",{get:function(){return this._editButtonWidth},set:function(t){t!=this._editButtonWidth&&(this._editButtonWidth=t,this.refreshOwner())}}),_dp(a,"editButtonHeight",{get:function(){return this._editButtonHeight},set:function(t){t!=this._editButtonHeight&&(this._editButtonHeight=t,this._buttonHeight=Math.max(16,t),this.refreshOwner())}}),_dp(a,"errorIconWidth",{get:function(){return this._errorIconWidth},set:function(t){t!=this._errorIconWidth&&(this._errorIconWidth=t,this.refreshOwner())}}),_dp(a,"buttonHeight",{get:function(){return this._buttonHeight}}),a.prototype.getCell=function(t){return this.getCellAt(t.item,t.column)},a.prototype.getCellAt=function(t,e){var i,o=this._grid;if(e instanceof n.DataColumn?t.index<0||t instanceof s.ClipboardItem?(i=this._hiddenCell,this._hiddenCell.setItem(t)):i=this._dataCell:i=e instanceof n.SeriesColumn?this._seriesCell:e instanceof n.LiteralColumn?this._literalCell:this._dataCell,i.setIndex2(o,t?t.index:-1,e),e instanceof n.DataColumn){var a=o.validationManager.getError(i.index);a?(i.error=a.message,i.errorLevel=a.level):(i.error=null,i.errorLevel=r.ValidationLevel.IGNORE)}return i},a.prototype.getIndexCellStyle=function(t,e){var i=this.getCell(t);return this.getCellStyle(i,this._cs.clear(),!1,e)},a.prototype.getCellStyle=function(t,e,i,o){void 0===o&&(o=!0);var n,r=t.valueColumn,s=this._cellStyleCallback;s&&(n=s(this._grid.handler,t),e.assign(n)),r&&(n=r.getCellStyle(t),e.assign(n));var a=this.getUserCellStyle(t.index.dataRow,t.valueColumn.name);a&&e.assign(a);var l=e.styleName||r&&r.styleName||"";return o&&(e.styleName="rg-data-cell "+(i?"rg-merged-cell ":"")+l),e},a.prototype.getCellFormatters=function(t,e,i,o){if(e?(e.numberFormatter=e.numberFormatter||t.numberFormatter,e.datetimeWriter=e.datetimeWriter||t.datetimeWriter,e.booleanFormatter=e.booleanFormatter||t.boolFormatter,e.textFormatter=e.textFormatter||t.textFormatter,e.prefix=e.prefix||t.prefix,e.suffix=e.suffix||t.suffix):((e=this._formatter).numberFormatter=t.numberFormatter,e.datetimeWriter=t.datetimeWriter,e.booleanFormatter=t.boolFormatter,e.textFormatter=t.textFormatter,e.prefix=t.prefix,e.suffix=t.suffix,e.text=null),i){var n=i.grid,r=n.body.getCell(i);e=(o=n.body.getCellStyle(r,o)).toFormatter(e)}return e},a.prototype.getRowStyle=function(t,e,i,n){void 0===i&&(i=!1),void 0===n&&(n=!0);var r=this._grid,s=this._rowCs;if(s.clear(),n){var l=this._rowStyleCallback;if(l){var h=l(r.handler,t,e)||{};s.assign(h)}var u=this.getUserCellStyle(t.dataRow,-1);u&&s.assign(u)}if(!s.styleName){var d=a.ROW_STYLE;t.index%2&&r.displayOptions.useAlternateRowStyle&&(d+=a.ALTERNATE_ROW_STYLE),e&&(d+=a.FIXED_ROW_STYLE),i||(d+=a.STATE_ROW_STYLES[t.rowState]||""),t.checked&&(d+=a.CHECKED_ROW_STYLE),t.itemState===o.ItemState.DUMMY&&(d+=a.DUMMY_ROW_STYLE),s.styleName=d}return s},a.prototype.addUserCellStyle=function(t,e,i){var o=this._grid,n=o.getItemOfRow(t,!0);n&&(o.itemSource.addCellStyle(n.dataId,e,i)&&o.refreshView())},a.prototype.removeUserCellStyle=function(t,e){var i=this._grid,o=null!=t?i.getItemOfRow(t,!0):null;(o||null==t)&&(i.itemSource.removeCellStyle(o?o.dataRowId:null,e)&&i.refreshView())},a.prototype.getUserCellStyle=function(t,e){var i=this._grid,o=i.getItemOfRow(t,!0);if(o)return i.itemSource.getUserCellStyle(o.dataId,e)},a.prototype._prepareUpdate=function(){var t=this._grid=this.owner;this._ds=t.dataSource,this._showChangeMarker=t.displayOptions.showChangeMarker},a.ROW_STYLE=" rg-data-row",a.ALTERNATE_ROW_STYLE=" rg-alternate-row",a.FIXED_ROW_STYLE=" rg-fixed-row",a.CHECKED_ROW_STYLE=" rg-checked-row",a.DUMMY_ROW_STYLE=" rg-dummy-row",a.STATE_ROW_STYLES={created:" rg-created-row",deleted:" rg-deleted-row",createAndDeleted:" rg-deleted-row",updated:" rg-updated-row"},a}(i.VisualObject);return Nn.GridBody=a,Nn}var ur,dr,cr={},pr={};function _r(){if(ur)return pr;ur=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.GridBaseOptions=void 0;var t=d,e=function(e){function i(t){var i=e.call(this)||this;return i._grid=t,i}return t.__extends(i,e),i.prototype._doDispose=function(){return this._grid=null,e.prototype._doDispose.call(this)},_dp(i,"grid",{get:function(){return this._grid}}),i.prototype._changed=function(){this._grid&&this._grid.optionsChanged(this)},i.prototype._invalidateOwner=function(){this._grid&&this._grid.invalidate()},i.prototype._layoutOwner=function(){this._grid&&this._grid.invalidateLayout()},i.prototype._refreshOwner=function(){this._grid&&this._grid.refreshView()},i}(G().Base);return pr.GridBaseOptions=e,pr}function fr(){if(dr)return cr;dr=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.FixedOptions=void 0;var t=d,e=_r(),i=Ct(),o=function(e){function o(t){var o=e.call(this,t)||this;return o._colCount=0,o._rightCount=0,o._rowCount=0,o._rightFixed=!0,o._exceptFromFiltering=!0,o._exceptFromSorting=!0,o._editable=!0,o._rowEditable=!0,o._resizable=!1,o._rowResizable=!1,o._movable=!1,o._colBarWidth=3,o._rightBarWidth=3,o._rowBarHeight=3,o._mergeRows=!1,o._blankRows=!1,o.assignFrom(i.DefaultOptions.fixed),o}return t.__extends(o,e),o.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(o,"colCount",{get:function(){return this._colCount},set:function(t){(t=Math.max(0,t))!=this._colCount&&(this._colCount=t,this.grid&&this._refreshOwner())}}),_dp(o,"rightCount",{get:function(){return this._rightCount},set:function(t){(t=Math.max(0,t))!=this._rightCount&&(this._rightCount=t,this.grid&&this._refreshOwner())}}),_dp(o,"rowCount",{get:function(){return this._rowCount},set:function(t){(t=Math.max(0,t))!=this._rowCount&&(this._rowCount=t,this.$_resetItemSource())}}),_dp(o,"rightFixed",{get:function(){return this._rightFixed},set:function(t){t!=this._rightFixed&&(this._rightFixed=t,this._refreshOwner())}}),_dp(o,"exceptFromFiltering",{get:function(){return this._exceptFromFiltering},set:function(t){t!=this._exceptFromFiltering&&(this._exceptFromFiltering=t,this.$_resetItemSource())}}),_dp(o,"exceptFromSorting",{get:function(){return this._exceptFromSorting},set:function(t){t!=this._exceptFromSorting&&(this._exceptFromSorting=t,this.$_resetItemSource())}}),_dp(o,"editable",{get:function(){return this._editable},set:function(t){t!=this._editable&&(this._editable=t,this._refreshOwner())}}),_dp(o,"rowEditable",{get:function(){return this._rowEditable},set:function(t){t!=this._rowEditable&&(this._rowEditable=t,this._refreshOwner())}}),_dp(o,"resizable",{get:function(){return this._resizable},set:function(t){t!=this._resizable&&(this._resizable=t)}}),_dp(o,"rowResizable",{get:function(){return this._rowResizable},set:function(t){t!=this._rowResizable&&(this._rowResizable=t)}}),_dp(o,"movable",{get:function(){return this._movable},set:function(t){t!=this._movable&&(this._movable=t)}}),_dp(o,"colBarWidth",{get:function(){return this._colBarWidth},set:function(t){(t=Math.max(0,t))!=this._colBarWidth&&(this._colBarWidth=t,this._refreshOwner())}}),_dp(o,"rightBarWidth",{get:function(){return this._rightBarWidth},set:function(t){(t=Math.max(0,t))!=this._rightBarWidth&&(this._rightBarWidth=t,this._refreshOwner())}}),_dp(o,"rowBarHeight",{get:function(){return this._rowBarHeight},set:function(t){(t=Math.max(0,t))!=this._rowBarHeight&&(this._rowBarHeight=t,this._refreshOwner())}}),_dp(o,"mergeRows",{get:function(){return this._mergeRows},set:function(t){t!=this._mergeRows&&(this._mergeRows=t,this.grid._columnMergeRuleChanged(null))}}),_dp(o,"blankRows",{get:function(){return this._blankRows},set:function(t){t!=this._blankRows&&(this._blankRows=t,this.$_resetItemSource(!0))}}),o.prototype._refreshOwner=function(){e.prototype._refreshOwner.call(this),this.grid&&this.grid.invalidateColumns()},o.prototype.$_resetItemSource=function(t){var e,i=this.grid;i&&(e=i.itemSource)?(e.setFixed(this._rowCount,!this._exceptFromSorting,!this._exceptFromFiltering,t),this._dirty=!1):this._dirty=!0},o.ROW_BAR_STYLE="rg-fixed-row-bar",o.ROW_BAR_CELL_STYLE="rg-fixed-row-bar-cell",o.COLUMN_BAR_STYLE="rg-fixed-column-bar",o}(e.GridBaseOptions);return cr.FixedOptions=o,cr}var gr,mr={};function yr(){if(gr)return mr;gr=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.DisplayOptions=void 0;var t=d,e=_r(),i=C(),o=zn(),n=S(),r=Ct(),s=function(e){function s(t){var s=e.call(this,t)||this;return s._refreshMode=i.RefreshMode.ALL,s._columnResizable=!0,s._columnMovable=!0,s._columnResizeThreshold=3,s._minCellWidth=8,s._defaultColumnWidth=100,s._fitLayoutPadding=0,s._fitStyle=i.GridFitStyle.NONE,s._rowResizable=!1,s._eachRowResizable=!1,s._autoClearHeights=!0,s._rowHeight=0,s._rowHeightPadding=0,s._refCalcHeights=!0,s._dataHeights=null,s._minTableRowHeight=23,s._minRowHeight=23,s._maxRowHeight=0,s._hscrollBar=!0,s._vscrollBar=!0,s._liveScroll=!0,s._scrollDuration=0,s._hscrollDuration=0,s._hintDelay=0,s._showTooltip=!1,s._tooltipEllipsisOnly=!1,s._rowChangeDelay=0,s._horzPageScroll=!1,s._showEmptyMessage=!1,s._focusVisible=!0,s._focusType=i.FocusType.LAYER,s._rowFocusType=i.RowMaskType.NONE,s._groupFocusVisible=!1,s._wheelEnabled=!0,s._wheelScrollLines=3,s._wheelScrollHorz=16,s._wheelAccelDelay=0,s._wheelAccelScroll=null,s._wheelEventPropagate=!0,s._rightClickable=!0,s._remergeWhenColumnMoved=!0,s._editItemMerging=!1,s._showInnerFocus=!0,s._toastZIndex=3e3,s._popupDropdownCount=0,s._popupViewDistance=0,s._selectionMode=o.SelectionMode.SINGLE,s._selectionStyle=o.SelectionStyle.BLOCK,s._selectionDisplay=o.SelectionDisplay.CELL,s._selectAndImmediateDrag=!1,s._altSelectAndImmediateDrag=!1,s._selectAtSingleRow=!1,s._rowHoverType=i.RowMaskType.NONE,s._rowBlockType=i.RowMaskType.NONE,s._showEmptyTooltip=!1,s._showChangeMarker=!0,s._showNativeEditButton=!1,s._baseZindex=2e3,s._useAlternateRowStyle=!0,s._useFocusClass=!1,s._watchDisplayChange=!0,s._syncGridHeight=i.SyncGridHeight.NONE,s._groupFocusLevel=-1,s._selectionRemovable=!1,s.assignFrom(r.DefaultOptions.display),n.Utils.isMobile()&&(s._selectionStyle=o.SelectionStyle.NONE),(n.Utils.ieNine||n.Utils.ieTen)&&(s._focusType=i.FocusType.LINE),t.setWatchTimer(s._watchDisplayChange),s}return t.__extends(s,e),s.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(s,"refreshMode",{get:function(){return this._refreshMode},set:function(t){t!=this._refreshMode&&(this._refreshMode=t,this.grid.setNeedRefresh(!0),this._changed())}}),_dp(s,"columnResizable",{get:function(){return this._columnResizable},set:function(t){this._columnResizable=t}}),_dp(s,"columnMovable",{get:function(){return this._columnMovable},set:function(t){this._columnMovable=t}}),_dp(s,"columnResizeThreshold",{get:function(){return this._columnResizeThreshold},set:function(t){this._columnResizeThreshold=Math.min(Math.max(3,t),10)}}),_dp(s,"defaultColumnWidth",{get:function(){return this._defaultColumnWidth},set:function(t){t!=this._defaultColumnWidth&&(this._defaultColumnWidth=t,this._changed())}}),_dp(s,"fitLayoutPadding",{get:function(){return this._fitLayoutPadding},set:function(t){this._fitLayoutPadding=t}}),_dp(s,"fitStyle",{get:function(){return this._fitStyle},set:function(t){t!=this._fitStyle&&(this._fitStyle=t,this._changed())}}),_dp(s,"fitStyleIncludeFixed",{get:function(){return this._fitStyleIncludeFixed},set:function(t){t!=this._fitStyleIncludeFixed&&(this._fitStyleIncludeFixed=t,this._changed())}}),_dp(s,"rowResizable",{get:function(){return this._rowResizable},set:function(t){this._rowResizable=t}}),_dp(s,"eachRowResizable",{get:function(){return this._eachRowResizable},set:function(t){this._eachRowResizable=t}}),_dp(s,"autoClearHeights",{get:function(){return this._autoClearHeights},set:function(t){t!=this._autoClearHeights&&(this._autoClearHeights=t,this._changed())}}),_dp(s,"refCalcHeights",{get:function(){return this._refCalcHeights},set:function(t){t!=this._refCalcHeights&&(this._refCalcHeights=t)}}),_dp(s,"rowHeight",{get:function(){return this._rowHeight},set:function(t){t!=this._rowHeight&&(this._rowHeight=t,this._autoClearHeights&&this.grid&&this.grid.clearRowHeights(!1),this._changed())}}),_dp(s,"rowHeightPadding",{get:function(){return this._rowHeightPadding},set:function(t){t!==this._rowHeightPadding&&(this._rowHeightPadding=t,this._autoClearHeights&&this.grid&&this.grid.clearRowHeights(!1),this._changed())}}),_dp(s,"dataHeights",{get:function(){return this._dataHeights},set:function(t){t&&t.length>0?this._dataHeights=t.slice():this._dataHeights=null,this._changed()}}),_dp(s,"minTableRowHeight",{get:function(){return this._minTableRowHeight},set:function(t){(t=Math.max(s.MIN_TABLE_ROW_HEIGHT,t))!=this._minTableRowHeight&&(this._minTableRowHeight=t,this._changed())}}),_dp(s,"minRowHeight",{get:function(){return this._minRowHeight},set:function(t){(t=Math.max(s.MIN_TABLE_ROW_HEIGHT,t))!=this._minRowHeight&&(this._minRowHeight=t,this._changed())}}),_dp(s,"maxRowHeight",{get:function(){return this._maxRowHeight},set:function(t){(t=Math.max(0,t))!=this._maxRowHeight&&(this._maxRowHeight=t,this._autoClearHeights&&this.grid&&this.grid.clearRowHeights(!1),this._changed())}}),_dp(s,"minCellWidth",{get:function(){return this._minCellWidth},set:function(t){(t=Math.max(0,t))!=this._minCellWidth&&(this._minCellWidth=t,this._changed())}}),_dp(s,"hscrollBar",{get:function(){return this._hscrollBar},set:function(t){t!=this._hscrollBar&&(this._hscrollBar=t,this._changed())}}),_dp(s,"vscrollBar",{get:function(){return this._vscrollBar},set:function(t){t!=this._vscrollBar&&(this._vscrollBar=t,this._changed())}}),_dp(s,"liveScroll",{get:function(){return this._liveScroll},set:function(t){t!=this._liveScroll&&(this._liveScroll=t,this._changed())}}),_dp(s,"scrollDuration",{get:function(){return this._scrollDuration},set:function(t){this._scrollDuration=t}}),_dp(s,"hscrollDuration",{get:function(){return this._hscrollDuration},set:function(t){this._hscrollDuration=t}}),_dp(s,"hintDelay",{get:function(){return this._hintDelay},set:function(t){this._hintDelay=Math.max(t,0)}}),_dp(s,"showTooltip",{get:function(){return this._showTooltip},set:function(t){this._showTooltip=t}}),_dp(s,"tooltipEllipsisOnly",{get:function(){return this._tooltipEllipsisOnly},set:function(t){this._tooltipEllipsisOnly=t}}),_dp(s,"rowChangeDelay",{get:function(){return this._rowChangeDelay},set:function(t){this._rowChangeDelay=t}}),_dp(s,"horzPageScroll",{get:function(){return this._horzPageScroll},set:function(t){this._horzPageScroll=t}}),_dp(s,"emptyMessage",{get:function(){return this._emptyMessage},set:function(t){t!=this._emptyMessage&&(this._emptyMessage=t,this.grid.setEmptyMessage(t))}}),_dp(s,"showEmptyMessage",{get:function(){return this._showEmptyMessage},set:function(t){t!=this._showEmptyMessage&&(this._showEmptyMessage=t,this._changed())}}),_dp(s,"focusVisible",{get:function(){return this._focusVisible},set:function(t){t!=this._focusVisible&&(this._focusVisible=t,this._changed())}}),_dp(s,"focusType",{get:function(){return this._focusType},set:function(t){t!==this.focusType&&(this._focusType=t,this._changed())}}),_dp(s,"rowFocusType",{get:function(){return this._rowFocusType},set:function(t){t!=this._rowFocusType&&(this._rowFocusType=t,this._changed())}}),_dp(s,"groupFocusVisible",{get:function(){return this._groupFocusVisible},set:function(t){t!==this._groupFocusVisible&&(this._groupFocusVisible=t,this._changed())}}),_dp(s,"groupFocusLevel",{get:function(){return this._groupFocusLevel},set:function(t){t!=this._groupFocusLevel&&(this._groupFocusLevel=t,this._changed())}}),_dp(s,"wheelEnabled",{get:function(){return this._wheelEnabled},set:function(t){this._wheelEnabled=t}}),_dp(s,"wheelScrollLines",{get:function(){return this._wheelScrollLines},set:function(t){this._wheelScrollLines=t}}),_dp(s,"wheelScrollHorz",{get:function(){return this._wheelScrollHorz},set:function(t){this._wheelScrollHorz=t}}),_dp(s,"wheelAccelDelay",{get:function(){return this._wheelAccelDelay},set:function(t){this._wheelAccelDelay=t}}),_dp(s,"wheelAccelScroll",{get:function(){return this._wheelAccelScroll},set:function(t){this._wheelAccelScroll=t}}),_dp(s,"wheelDeltaY",{get:function(){return this._wheelDeltaY},set:function(t){this._wheelDeltaY=t}}),_dp(s,"wheelEventPropagate",{get:function(){return this._wheelEventPropagate},set:function(t){this._wheelEventPropagate=t}}),_dp(s,"rightClickable",{get:function(){return this._rightClickable},set:function(t){this._rightClickable=t}}),_dp(s,"remergeWhenColumnMoved",{get:function(){return this._remergeWhenColumnMoved},set:function(t){this._remergeWhenColumnMoved=t}}),_dp(s,"editItemMerging",{get:function(){return this._editItemMerging},set:function(t){t!=this._editItemMerging&&(this._editItemMerging=t,this._changed())}}),_dp(s,"showInnerFocus",{get:function(){return this._showInnerFocus},set:function(t){t!=this._showInnerFocus&&(this._showInnerFocus=t,this._changed())}}),_dp(s,"toastZIndex",{get:function(){return this._toastZIndex},set:function(t){this._toastZIndex=t}}),_dp(s,"popupDropdownCount",{get:function(){return this._popupDropdownCount},set:function(t){this._popupDropdownCount=t}}),_dp(s,"selectionMode",{get:function(){return this._selectionMode},set:function(t){t!=this._selectionMode&&(this._selectionMode=t,this.grid.clearAddSelection())}}),_dp(s,"selectionStyle",{get:function(){return this._selectionStyle},set:function(t){t!=this._selectionStyle&&(this.grid.selections.clear(!0),this._selectionStyle=t,this._refreshOwner())}}),_dp(s,"selectionDisplay",{get:function(){return this._selectionDisplay},set:function(t){t!=this._selectionDisplay&&(this._selectionDisplay=t,this._refreshOwner())}}),_dp(s,"selectAndImmediateDrag",{get:function(){return this._selectAndImmediateDrag},set:function(t){this._selectAndImmediateDrag=t}}),_dp(s,"altSelectAndImmediateDrag",{get:function(){return this._altSelectAndImmediateDrag},set:function(t){this._altSelectAndImmediateDrag=t}}),_dp(s,"selectAtSingleRow",{get:function(){return this._selectAtSingleRow},set:function(t){this._selectAtSingleRow=t}}),_dp(s,"rowHoverType",{get:function(){return this._rowHoverType},set:function(t){t!=this._rowHoverType&&(this._rowHoverType=t,this._refreshOwner())}}),_dp(s,"rowBlockType",{get:function(){return this._rowBlockType},set:function(t){t!=this._rowBlockType&&(this._rowBlockType=t,this._refreshOwner())}}),_dp(s,"rowBlockCallback",{get:function(){return this._rowBlockCallback},set:function(t){t!==this._rowBlockCallback&&(this._rowBlockCallback=t,this._rowBlockType!=i.RowMaskType.NONE&&this._refreshOwner())}}),_dp(s,"showEmptyTooltip",{get:function(){return this._showEmptyTooltip},set:function(t){this._showEmptyTooltip=t}}),_dp(s,"showChangeMarker",{get:function(){return this._showChangeMarker},set:function(t){t!=this._showChangeMarker&&(this._showChangeMarker=t,this._refreshOwner())}}),_dp(s,"scrollMessageCallback",{get:function(){return this._scrollMessageCallback},set:function(t){this._scrollMessageCallback=t}}),_dp(s,"showNativeEditButton",{get:function(){return this._showNativeEditButton},set:function(t){t!=this._showNativeEditButton&&(this._showNativeEditButton=t,this._changed())}}),_dp(s,"baseZindex",{get:function(){return this._baseZindex},set:function(t){this._baseZindex=Math.max(t,0)}}),_dp(s,"useAlternateRowStyle",{get:function(){return this._useAlternateRowStyle},set:function(t){t!=this._useAlternateRowStyle&&(this._useAlternateRowStyle=t,this._changed())}}),_dp(s,"useFocusClass",{get:function(){return this._useFocusClass},set:function(t){t!=this._useFocusClass&&(t||(this.grid.setFocusedClass(this.grid.focusedIndex,!1),this.grid.setFocusedRowClass(this.grid.focusedIndex,!1)),this._useFocusClass=t,this._changed())}}),_dp(s,"editButtonHeight",{get:function(){return this.grid.body.editButtonHeight},set:function(t){this.grid.body.editButtonHeight=t}}),_dp(s,"watchDisplayChange",{get:function(){return this._watchDisplayChange},set:function(t){t!=this._watchDisplayChange&&(this._watchDisplayChange=t,this.grid.setWatchTimer(t))}}),_dp(s,"syncGridHeight",{get:function(){return this._syncGridHeight},set:function(t){t!=this._syncGridHeight&&(this._syncGridHeight=t,t!==i.SyncGridHeight.ALWAYS&&this.grid.recallHeight(),this._changed())}}),_dp(s,"popupViewDistance",{get:function(){return this._popupViewDistance},set:function(t){this._popupViewDistance=t}}),_dp(s,"rowHeightCallback",{get:function(){return this._rowHeightCallback},set:function(t){this._rowHeightCallback=t,this.grid.clearRowHeights(!1),this._changed()}}),_dp(s,"selectionRemovable",{get:function(){return this._selectionRemovable},set:function(t){this._selectionRemovable=t}}),_dp(s,"showTooltipWhileEditing",{get:function(){return this._tooltipOnEditing},set:function(t){this._tooltipOnEditing=t}}),s.MIN_TABLE_ROW_HEIGHT=15,s}(e.GridBaseOptions);return mr.DisplayOptions=s,mr}var vr,Cr={},wr={};function xr(){if(vr)return wr;vr=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.Size=void 0;var t=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.width=t,this.height=e}return t.create=function(e,i){return void 0===e&&(e=0),void 0===i&&(i=0),new t(e,i)},t.prototype.toString=function(){return"{width: "+this.width+", height: "+this.height+"}"},t.EMPTY=new t,t}();return wr.Size=t,wr}var br,Ir,Er={},Sr={};function Rr(){if(br)return Sr;br=1,Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.EmptyGridElement=Sr.VisualObjectElement=Sr.isItemElement=Sr.GridElement=void 0;var t=d,e=jn(),i=ml(),o=xr(),n=S(),r=_t(),s=function(e){function n(t,i){return void 0===i&&(i=null),e.call(this,t,i)||this}return t.__extends(n,e),n.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(n,"grid",{get:function(){for(var t=this.parent;t;){if(t instanceof i.GridBase)return t;t=t.parent}return null}}),n.prototype.measure=function(t,e,i){return this._setClassName(this._dom),this._doMeasure(t,e,i)},n.prototype.layoutContent=function(t,e){void 0===e&&(e=!1),(this.grid._loading||this.visible)&&(this._doPrepareContent(t),this._doLayoutContent(t,e))},n.prototype._getCssSelector=function(){return""},n.prototype._getCssDisplay=function(){return"table"},n.prototype._doDraw=function(t){this._doRender(t)},n.prototype._doMeasure=function(t,e,i){return new o.Size(e,i)},n.prototype._doPrepareContent=function(t){},n.prototype._doLayoutContent=function(t,e){},n.prototype._doRender=function(t){},n}(e.VisualElement);Sr.GridElement=s,Sr.isItemElement=function(t){return t&&"itemIndex"in t};var a=function(e){function i(t,i,o){void 0===o&&(o=null);var r=e.call(this,t,o)||this;return r._ff=n.Utils.isFirefox,r._chromium=n.Utils.isChromium,r._textProp=n.Utils.TextProp,r._cursor="default",r._model=i,r}return t.__extends(i,e),i.prototype._doDispose=function(){this._model=null,e.prototype._doDispose.call(this)},_dp(i,"model",{get:function(){return this._model}}),i.prototype.setCursor=function(t){t!==this._cursor&&(this._cursor=t,this._dom.style.cursor=t)},i}(s);Sr.VisualObjectElement=a;var l=function(e){function i(t){return e.call(this,t,"emptyGridView")||this}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},i.prototype.setMessage=function(t){this._span.innerHTML=t||r.Messages.messages.displayEmptyMessage},i.prototype.setFocus=function(){var t=this._span;t.tabIndex=-1,t.focus()},i.prototype._createDom=function(t){var i=e.prototype._createDom.call(this,t),o=this._span=t.createElement("span");return o.role="gridcell",i.appendChild(o),i},i.prototype._getCssSelector=function(){return"rg-empty-grid"},i.prototype._doDraw=function(t){this.setMessage(this.grid.displayOptions.emptyMessage)},i}(s);return Sr.EmptyGridElement=l,Sr}function Tr(){if(Ir)return Er;Ir=1,Object.defineProperty(Er,"__esModule",{value:!0}),Er.DataTableElement=Er.SimpleTableElement=Er.TableBaseElement=void 0;var t=d,e=Rr(),i=Wn(),o=S(),n=C(),r=function(e){function r(t,i,o){void 0===o&&(o=null);var n=e.call(this,t,i,o)||this;return n._explicitWidth=NaN,n}return t.__extends(r,e),r.prototype._doDispose=function(){this._tbody=this._thead=this._table=null,e.prototype._doDispose.call(this)},_dp(r,"tableRowCount",{get:function(){return this._tbody.childElementCount}}),r.prototype.getCellPoint=function(t,e){return(e=e||new i.Point).x+=t.offsetLeft,e.y+=t.offsetTop,e},r.prototype._getTableHidden=function(){return!0},r.prototype._getTableCaption=function(){return""},r.prototype._createDom=function(t){var e=t.createElement("div"),i=this._table=t.createElement("table"),o=i.createCaption();o.textContent="grid table ";var n=o.style;return n.width=n.height="0px",n.overflow="hidden",n.setProperty("padding","0px","important"),n.boxSizing="border-box",(n=i.style).setProperty("table-layout","fixed","important"),n.setProperty("width","100%","important"),i.className="rg-table",e.appendChild(i),this._thead=t.createElement("thead"),i.appendChild(this._thead),this._tbody=t.createElement("tbody"),i.appendChild(this._tbody),e},r.prototype._initDom=function(t){e.prototype._initDom.call(this,t),t[n.T_VIEW]=this[n.T_HASH],t.style.overflow="hidden"},r.prototype._doPrepareContent=function(t){var e=this._getExplicitWidth(t);o.Utils.equalNumbers(e,this._explicitWidth)||(this._table.style.width=e>0?e+"px":"100%",this._explicitWidth=e),this._doPrepareTableExtents(t),this._doPrepareTable(t)},r.prototype._doDraw=function(t){this._doRender(t),this._doRenderTable(this._tbody)},r.prototype._visibleChanged=function(){e.prototype._visibleChanged.call(this),this.visible?!this._table.parentElement&&this._dom.appendChild(this._table):o.Utils.detach(this._table)},r.prototype._getExplicitWidth=function(t){return NaN},r.prototype._doPrepareTableExtents=function(t){this._initExec||(this._initExec=!0,t.grid.accessibility&&this._getTableHidden()&&this._getTableHidden()&&this._table.setAttribute("aria-hidden","true"))},r.prototype._doPrepareTable=function(t){this._doPrepareTableHead(t,this._thead),this._doPrepareTableRows(t,this._tbody)},r.prototype._doPrepareTableHead=function(t,e){var i,n=(0,o.getDoc)(e);0==e.childElementCount?(i=n.createElement("tr"),e.appendChild(i),this._getTableHidden()&&i.setAttribute("aria-hidden","true"),(h=i.style).setProperty("border","0px none","important")):i=e.lastElementChild;for(var r=this._getCellCount(t);i.childElementCountr;)i.removeChild(i.lastChild);for(var s=i.children,a=0;ai;){a=e.lastElementChild;this._cleanCellContent(a),e.removeChild(e.lastElementChild)}return e.childElementCount},r.prototype._isFixedHeight=function(t){return!0},r.prototype._getMinRowHeight=function(t){return t.minRowHeight},r.prototype._doPrepareTableRow=function(t,e,i,o){this._prepareTableRowCells(t,o);var r=this._isFixedHeight(t),s=o.children,a=this._isDataTable(),l=r?this._getTableRowHeight(t,i):this._getMinRowHeight(t),h=isNaN(l)||l<2?"0px":l-2+"px",u=o.style;o[n.T_VIEW]=this[n.T_HASH],o[n.T_FIX]=r,o[n.T_HEI]=r?l:0,a||r?u.setProperty("height",l+"px"):u.removeProperty("height"),u.display="";for(var d=this._getStartCell(t)-this._getFirstCell(t),c=s.length;d0?t.itemIndexi;)e.removeChild(e.lastChild);for(var s=e.children,a=0;a0?1:0},i.prototype.$_getTableIndex=function(t,e){var i=t.fixedItemCount,o=e*this._trs;return i>0&&e>=i?o+1:o},i.prototype._getTableRow=function(t,e){var i=this.$_getTableIndex(t,e);return this._tbody.children[i]},i.prototype._doPrepareTableRows=function(t,e){for(var i=t.$_getItems(),n=this._trs=this._getTrs(t),r=t.fixedItemCount,s=t.itemCount+r,a=this._trCount=Math.max(0,this._getTableRowCount(t)),l=(0,o.getDoc)(e);e.childElementCounta;)e.removeChild(e.lastChild);var u=e.children,d=0,c=0;if(r>0){for(d=0;d0?(s.height=t.fixedBarHeight+"px",s.display=""):s.display="none";for(var a=e.children,l=0;la&&(a=h))}var u=isNaN(this._baseValue)?s:this._baseValue;isNaN(s)||this._renderChart(e,n,s,a,u)}}.bind(t),t}return t.__extends(n,e),n.interfaced=function(t){return i.Utils.included(t.type,s.TYPE,a.TYPE,l.TYPE)},_dp(n,"baseValue",{get:function(){return this._baseValue},set:function(t){this._baseValue=t}}),_dp(n,"firstStyle",{get:function(){return this._firstStyle},set:function(t){this._firstStyle=t}}),_dp(n,"lastStyle",{get:function(){return this._lastStyle},set:function(t){this._lastStyle=t}}),_dp(n,"highStyle",{get:function(){return this._highStyle},set:function(t){this._highStyle=t}}),_dp(n,"lowStyle",{get:function(){return this._lowStyle},set:function(t){this._lowStyle=t}}),_dp(n,"belowStyle",{get:function(){return this._belowStyle},set:function(t){this._belowStyle=t}}),_dp(n,"pointStyle",{get:function(){return this._pointStyle},set:function(t){this._pointStyle=t}}),n.prototype._doInitContent=function(t){var e=(0,i.getDoc)(t),n=this._div=e.createElement("div");n.style.position="relative",n.style.height="100%",t.appendChild(n);var r=(this._svg=o.SvgElement.createSVG(n)).style;r.position="absolute",r.left=r.top="0px",r.width=r.height="100%"},n.prototype._doRenderCell=function(t,e,i,n,r){var s=this._svg;s.setAttribute("class",this._getChartStyle()),this._values=this._getValues(e),o.SvgElement.renderSVG2(t,s,this.$_render)},n.prototype._getPoints=function(t,e,i){for(var o=t.length,n=[],r=i-e,s=0;s=o){d=l[2*u],c=l[2*u+1];t.scircle(r,d+"%",c+"%","2")}if(r=this.lowStyle)for(u=0;u=o&&this.highStyle?this.highStyle:f0?t.pbounds(r,d-p/2,100-g-m,p,m):t.pbounds(r,d-p/2,100-g,p,m)}else{m=0==c?100:Math.max(1,Math.floor(100*(f-a)/c));t.pbounds(r,d-p/2,h,p,-m)}d+=u}},i.TYPE="sparkcolumn",i.STYLE="rg-sparkcolumn-renderer",i.CHART_STYLE="rg-sparkcolumn-renderer-chart",i.LAST_STYLE="rg-sparkcolumn-renderer-last",i.HIGH_STYLE="rg-sparkcolumn-renderer-high",i.LOW_STYLE="rg-sparkcolumn-renderer-low",i.STYLE_NAME="rg-renderer "+i.STYLE,i}(r);Pr.SparkColumnRenderer=a;var l=function(e){function i(){var t=e.call(this)||this;return t._chartStyle=i.CHART_STYLE,t._barWidth=.8,t._belowHeight=.4,t.belowStyle=i.BELOW_STYLE,t}return t.__extends(i,e),i.interfaced=function(t){return t.type===i.TYPE},_dp(i,"chartStyle",{get:function(){return this._chartStyle},set:function(t){this._chartStyle=t}}),_dp(i,"barWidth",{get:function(){return this._barWidth},set:function(t){this._barWidth=Math.min(1,Math.max(0,t))}}),_dp(i,"belowHeight",{get:function(){return this._belowHeight},set:function(t){this._belowHeight=Math.min(1,Math.max(0,t))}}),_dp(i,"type",{get:function(){return i.TYPE}}),_dp(i,"styleName",{get:function(){return i.STYLE_NAME}}),i.prototype._getChartStyle=function(){return this._chartStyle},i.prototype._renderChart=function(t,e,i,o,n){for(var r=e.length,s=100/r,a=0+s/2,l=s*this._barWidth,h=0+100*(1-this._belowHeight),u=0;u=0||e.indexOf("rg-tree-collapsed")>=0)},s.prototype.resetButtons=function(t,e,i){for(var n=t.layoutManager,r=this._trs,s=this.parent._cells,a=this._getFirstCell(n),l=this._getStartCell(n)-a,h=this._getEndCell(n)-a,u=e&&i&&e.head===i.head&&t.canMergeEditing(i),d=0;d0&&(d=!0),(d||e.item.isDataRow&&this.$_getButtonVisible(t,e,r.editButtonVisibility,null))&&(o=t.body.editButtonWidth)}l=u=null}return o},s.prototype.$_editButtonCount=function(t,e){var i=e.editorType,o=t.delegate.getCellEditor(i);return o?o.buttonCount:0},s.prototype.$_editButtonVerti=function(t,e){if("number"===e.editorType){var i=e.editor||e.dataColumn.editor||{};return null==i.direction||"horizontal"!==i.direction}},s.prototype.$_errorWidth=function(t,e){return e.error?t.body.errorIconWidth:0},s.prototype.$_setButtons=function(t,e,o,r){var s,a,l=e.cell,u=t.doc,d=t.layoutManager,c=e.dataColumn,p=this.$_buttonWidth(t,e),_=this.$_editButtonWidth(t,e),f=this.$_errorWidth(t,e),g=_&&this.$_editButtonCount(t,e),m=_&&this.$_editButtonVerti(t,e),y=t.canMergeEditing(e),v=c&&(c.buttonVisibility===n.ButtonVisibility.ROWFOCUSED||c.editButtonVisibility===n.ButtonVisibility.ROWFOCUSED),C=0,w=0,x=void 0;if(p>0&&w++,_>0&&(w+=g),f>0&&w++,e.merged&&(l=(e=e.head).cell,o=e.cell.firstElementChild),w>0){(x=e.buttons)||((x=e.buttons=u.createElement("div")).className="rg-cell-buttons",x.style.position="absolute",x.style.overflow="hidden",l.appendChild(x));var b=t.body.buttonHeight,I=e.height,E=-100;if((s=x.style).height=b+"px",s.right="0px",e.merged){var S=e.rowIndex,R=d.getTableItemBounds(S),T=S,D=t.getIndex(t.focusedRow,e.dataColumn);if(!y&&(e.contains(t.focusedIndex)||v&&e.contains(D)||r))if(t.focusedRowt.topIndex+d.itemCount)E=1e4,e.buttonsOffset=-1;else{T=S+(t.focusedRow-e.item.index);var k=d.getTableItemBounds(T);E=k.y-R.y,E=Math.floor(E+(k.height-b)/2),e.buttonsOffset=T-S}else E=h.Utils.getSize(e.cell).height,E=Math.floor((E-b)/2),e.buttonsOffset=y?0:-1}else E=Math.floor((I-b)/2),e.buttonsOffset=0;s.top=Math.floor(E)+"px",C=x.childElementCount}else e.buttons&&(e.clearButtons(),o.style.maxWidth="");for(var M=C;Mw;M--)x.removeChild(x.lastElementChild);var F=w>0?x.children:null;if(w=0,p>0){if(e.cellButton=F[w++],(a=e.cellButton.style).right="0px",a.width=p+"px",e.resetButtonClass(),t.accessibility){l.removeAttribute("aria-haspopup");var L=e.renderer2;L&&e.button==n.CellButton.POPUP&&!L.itemClickable&&l.setAttribute("aria-haspopup","true")}e.$_buttonWidth=p}else e.cellButton=null,e.$_buttonWidth=0;if(_>0){e.editButtons=[];var P=e.editorType,B=t.delegate.getCellEditor(P);for(M=0;M0?(e.errorIcon=F[w],(a=e.errorIcon.style).right=p+e.$_editWidth+"px",a.width=f+"px",a.height="100%",e.resetErrorClass(),e.$_errorWidth=f):(e.errorIcon=null,e.$_errorWidth=0),x){var $=e.$_buttonWidth+e.$_editWidth+e.$_errorWidth,U=this.$_getCellWidth2(d,e.tcol,e.colSpan);s.width=$+"px",o.style.maxWidth=U-$+"px"}else o.style.maxWidth=""},s.prototype.$_setButtonZIndex=function(t,e,i,o){var n=e.merged?e.head:e,r=t.displayOptions.baseZindex;function s(t){!i||o&&o.native?t.removeProperty("z-index"):t.zIndex=String(r+1)}n.editButtons&&n.editButtons.forEach((function(t){s(t.style)})),n.cellButton&&s(n.cellButton.style),n.errorIcon&&s(n.errorIcon.style)},s}(c);Lr.RowElement=f;var g=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(i,e),i.prototype._getFirstCell=function(t){return this._getStartCell(t)},i.prototype._getLastCell=function(t){return this._getEndCell(t)},i.prototype._getStartCell=function(t){return 0},i.prototype._getEndCell=function(t){return t.fixedCellCount-1},i.prototype.$_getCellWidth2=function(t,e,i){return t.getFixedCellWidth2(e,i)},i}(f);Lr.FixedRowElement=g;var m=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(i,e),i.prototype._getFirstCell=function(t){return this._getStartCell(t)},i.prototype._getLastCell=function(t){return this._getEndCell(t)},i.prototype._getStartCell=function(t){return t.cellCount-t.rightCellCount},i.prototype._getEndCell=function(t){return t.cellCount-1},i.prototype.$_getCellWidth2=function(t,e,i){return t.getRightCellWidth2(e,i)},i}(f);return Lr.RightRowElement=m,Lr}function Ar(){if(Mr)return Fr;Mr=1,Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.RightBodyElement=Fr.FixedBodyElement=Fr.GridBodyElement=Fr.BodyTableCell=Fr.TableCell=void 0;var t=d,e=xr(),i=ft(),o=rt(),n=lt(),r=S(),s=Tr(),a=Gi(),l=Vr(),h=rn(),u=Ro(),c=C(),p=Qo(),_=fr(),f=Zn(),g="rowspan",m="colspan",y=function(){function t(t){this.cell=null,this.layout=null,this.visible=void 0,this.spanned=!1,this.rowSpan=1,this.colSpan=1,this.className="",this.width=0,this.height=0,this.text=void 0,this.cell=t}return t.addEdgeMark=function(t,e,i){if(t!==e.edgeMark){var o=e.cell;if(t){var n=e.edgeMarker;switch(n||(n=e.edgeMarker=i.createElement("div")),t){case c.EdgeMark.LEFT_TOP:n.className="rg-edgemarker-lefttop";break;case c.EdgeMark.LEFT_BOTTOM:n.className="rg-edgemarker-leftbottom";break;case c.EdgeMark.RIGHT_TOP:n.className="rg-edgemarker-righttop";break;case c.EdgeMark.RIGHT_BOTTOM:n.className="rg-edgemarker-rightbottom";break;default:n.className=t}o.appendChild(n)}else e.edgeMarker&&o.removeChild(e.edgeMarker);e.edgeMark=t}},t.prototype.dispose=function(){this.cell=null},t.prototype.setColSpan=function(t){return this.colSpan!=t&&(this.colSpan=t,t>1?this.cell.colSpan=t:this.cell.removeAttribute(m)),this},t.prototype.setRowSpan=function(t){return this.rowSpan!=t&&(this.rowSpan=t,t>1?this.cell.rowSpan=t:this.cell.removeAttribute(g)),this},t.prototype.setVisible=function(t){return t!==this.visible&&(this.visible=t,this.cell.style.display=t?"":"none"),this},t.prototype.set=function(t,e,i){return this.setColSpan(t).setRowSpan(e).setVisible(i)},t.prototype.clear=function(t){return this.set(1,1,t)},t.prototype.isClickableElt=function(t){return!1},t}();Fr.TableCell=y;var v=function(e){function s(t){var i=e.call(this,t)||this;return i.cellButton=null,i.editButtons=null,i.errorIcon=null,i.buttons=null,i.changedMarker=null,i.expander=null,i.item=null,i.grouped=!1,i.rowIndex=-1,i.rows=0,i.trow=-1,i.tcol=-1,i.head=null,i.merged=!1,i.spanHead=null,i.heighted=!1,i.buttonsOffset=0,i.template=void 0,i.marginRight=-1,i.style=new h.ColumnStyle,i.rendererChanged=!1,i.valueChanged=!1,i.mouseEntered=!1,i.focused=!1,i.borderBottom=1,i.readonly=void 0,i.editable=void 0,i.error=void 0,i.errorLevel=c.ValidationLevel.IGNORE,i.$_errorWidth=0,i.button=c.CellButton.NONE,i.$_buttonWidth=0,i.buttonWidth=0,i.$_editWidth=0,i.edgeMarker=null,i.text=t[r.Utils.TextProp],i}return t.__extends(s,e),s.prototype.dispose=function(){e.prototype.dispose.call(this),this.renderer2=this.renderer2&&this.renderer2.clearAndDispose(),this.item=null,this.editButtons&&this.editButtons.forEach((function(t){r.Utils.detach(t)})),this.buttons=this.cellButton=this.editButtons=this.errorIcon=null,this.changedMarker=this.expander=null,this.layout=null},_dp(s,"dataColumn",{get:function(){return this.layout.getDataColumn()}}),s.prototype.reset=function(t){return this.renderer2=this.renderer2&&this.renderer2.clearAndDispose(),this.editButtons&&this.editButtons.forEach((function(t){r.Utils.detach(t)})),this.buttons=this.cellButton=this.editButtons=this.errorIcon=null,this.changedMarker=this.expander=null,this.cell=t,this},s.prototype.span=function(t){this.spanned=!0,this.spanHead=t,this.clear(!1)},s.prototype.refreshFormatters=function(t){var e;this.textFormatter=null,this.numberFormatter=null,this.datetimeWriter=null,this.booleanFormatter=null,(e=t.textFormat)&&(this.textFormatter=p.TextFormatter.getFormatter(e)),(e=t.numberFormat)&&(this.numberFormatter=i.DecimalFormatter.getFormatter(e)),(e=t.datetimeFormat)&&(this.datetimeWriter=o.DateTimeWriter.getFormatter(e)),(e=t.booleanFormat)&&(this.booleanFormatter=n.BooleanFormatter.getFormatter(e)),this.prefix=t.prefix,this.suffix=t.suffix,this.text=t.text},s.prototype.setClassName=function(t){return t!=this.className&&(this.cell.className=this.className=t,!0)},s.prototype.setEditor=function(t,e){this.editor=t,this.editorType=f.CellEditor.getEditorType2(t,e)},s.prototype.setBorderBottom=function(t){t!=this.borderBottom&&(this.borderBottom=t,this.cell.style.borderBottom=0==t?"0":"")},s.prototype.setMarginRight=function(t,e){e!=this.marginRight&&(this.marginRight=e,t.style.marginRight=e<=0?"":e+"px")},s.prototype.isCellButton=function(t){return t===this.cellButton},s.prototype.isEditButton=function(t){return this.editButtons&&this.editButtons.some((function(e){return e===t}))},s.prototype.isButton=function(t){return t===this.cellButton||this.isEditButton(t)},s.prototype.resetButtonClass=function(){var t=this.button==c.CellButton.POPUP?"rg-button-popup":"rg-button-action";this.cellButton.className=t},s.prototype.resetEditClass=function(t,e){var i;switch(this.editorType){case"date":case"btdate":case"ndate":i="rg-button-calendar";break;default:i="rg-button-list"}t.className=i},s.prototype.resetErrorClass=function(){var t;switch(this.errorLevel){case c.ValidationLevel.ERROR:t="rg-validation-error";break;case c.ValidationLevel.WARNING:t="rg-validation-warning";break;case c.ValidationLevel.INFO:t="rg-validation-info";break;default:t=""}this.errorIcon.className=t},s.prototype.clearExpander=function(){this.expander&&(this.cell.removeChild(this.expander),this.expander=null)},s.prototype.clearButtons=function(){this.buttons&&(this.cell.removeChild(this.buttons),this.buttons=null,this.$_errorWidth=this.$_buttonWidth=this.$_editWidth=0)},s.prototype.getEditIndex=function(t){var e=this.item.index;return this.merged&&(e+=this.buttonsOffset),t.set(e,this.layout.firstColumn)},s.prototype.contains=function(t){if(t.layout===this.layout){var e=t.itemIndex,i=this.item.index,o=i+this.rowSpan/this.layout._dspan;return i<=e&&e1&&r==o.getDataSpan()?r:e.item.isData?o._dspan:1,a=t.getTableRowBounds(n,s),l=e.tcol,h=e.colSpan;return this.fixed?(a.x=t.getFixedCellPoint(l),a.width=t.getFixedCellWidth2(l,h)):this.rightFixed?(a.x=t.getRightCellPoint(l),a.width=t.getRightCellWidth2(l,h)):(a.x=t.getCellPoint(l),a.width=t.getCellWidth2(l,h)),a},o.prototype.getRowView=function(t){for(var e=0,i=this.childCount;e=0;n--){var r=e[n][o];if(!r.spanned)return r;if(r.spanHead.trow===r.trow)return r.spanHead}},o.prototype.isTopCell=function(t){for(var e=this._cells,i=t.rowIndex,o=t.trow,n=t.tcol,r=o-1;r>=0;r--){var s=e[r][n];if(s.rowIndex!=i)break;if(!s.spanned||s.rowIndex===t.rowIndex&&s.trow!==t.trow&&s.layout.source)return!1}return!0},o.prototype.getNextVisibleCell=function(t){for(var e=this.bodyCellAt(t);e&&e.spanned;){if(!t.next())return!1;e=this.bodyCellAt(t)}return null!=e},o.prototype.getPrevVisibleCell=function(t){for(var e=this.bodyCellAt(t);e&&e.spanned;){if(!t.prev())return!1;e=this.bodyCellAt(t)}return null!=e},o.prototype.tdClone=function(t){var e=this.grid,i=t&&e.isValid(t)&&this.getCellAt(e.layoutManager,t);if(i){var o=(i=i.merged?i.head:i).cell,n=o.parentElement;if(n){var s=o.cloneNode(!1);s.appendChild(o.firstElementChild.cloneNode(!1)),s.style.display="none",i.rendererChanged=!0,n.insertBefore(s,o.nextElementSibling),i.reset(s),s.setAttribute("tabindex","0");var a=[];if(n=this._table,r.Utils.isIE)for(;n&&n!==e.container._containerDom;)a.push({top:n.scrollTop,left:n.scrollLeft}),n=n.parentElement;if(s.style.display="",s.focus({preventScroll:!0}),r.Utils.detach(o),n=this._table,r.Utils.isIE)for(;n&&n!==e.container._containerDom;){var l=a.shift();l&&l.top!==n.scrollTop&&(n.scrollTop=l.top),l&&l.left!==n.scrollLeft&&(n.scrollLeft=l.left),n=n.parentElement}}else o.focus()}},o.prototype.refreshTdFocused=function(t,e){var i=this.grid,o=t&&i.isValid(t)&&this.getCellAt(i.layoutManager,t);if(o){o=o.merged?o.head:o;var n=this._tbody,r=Array.prototype.slice.call(n.querySelectorAll("td"));e?s.call(this,o):setTimeout(function(){s.call(this,o)}.bind(this),15)}function s(t){var e=t.cell;e&&(r.forEach((function(t){t!==e&&(t.tabIndex=-1)})),e.setAttribute("tabindex","0"),e.focus({preventScroll:!0}))}},o.prototype.cleanRecycle=function(){for(var t=this._tbody,e=0;e0;)n.rows[n.rows.length-1].recycle=!1,n.insertBefore(n.rows[n.rows.length-1],n.rows[u]),r.splice.apply(r,t.__spreadArray([u,0],r.splice(-1),!1))}else{for(;i-- >0;){a+=s.getItem(l+i).isData?this._trs:1}for(;a-- >0;){var d=n.removeChild(n.rows[u]);d.recycle=!1,n.appendChild(d),r.push.apply(r,r.splice(u,1))}}},o.prototype._doAttached=function(t){},o.prototype._getCssSelector=function(){return"rg-body"},o.prototype._getTableHidden=function(){return!1},o.prototype._getTableCaption=function(){var t=this.grid;return t&&t.accessibility&&t.WaiOptions&&t.WaiOptions.getDescription()||""},o.prototype._isFixedHeight=function(t){return!t.isAutoRowHeights()},o.prototype._getTrs=function(t){return t.trs},o.prototype._getTableRowCount=function(t){var e=t.fixedItemCount,o=this.grid,n=this._trs;if(t.syncHeight()){for(var r=0,s=0,a=this.grid.itemCount;s=i&&t.isRowGrouped()){var o=this._trs,n=i*o;i>0&&n++;for(var r=i;r0&&e>=i?n+1:n},o.prototype._prepareCellContent=function(t,e){return this.grid.doc.createElement("div")},o.prototype._doPrepareTableHead=function(t,e){i.prototype._doPrepareTableHead.call(this,t,e);var o=this.grid;if(o._columnsDirty||o._needPosition||o._cellLayoutDirty||t.syncHeight()){this._table.caption.innerHTML=this._getTableCaption();for(var n=this._getFirstCell(t),s=this._getLastCell(t)-n+1,a=t.cellLayouts._dataCells,l=0;l<1;l++)for(var h=a[l],u=e.children[l],d=0;d0?"":"none",r.Utils.setClassName(n,_.FixedOptions.ROW_BAR_STYLE),this.$_refreshRowCells(t,null,-1,e,i,1,o),this.$_setFixedBarCellsDisplay(t,this._cells,e);for(var l=0,h=this._cells[e];l0&&r=n&&r-n>=o&&r-n=o&&(r-=n),(r=this.$_getTableIndex(t,r))=m)q.grouped=!0,q.clear(!0);else{var D=!0,k=void 0,M=1;x&&x.mergeGrouped&&x.groupLevel<=n.parent.level||(n.isDataRow?(void 0===(M=(k=w.spanCallback)?k(p.handler,w,q.item.index):void 0)&&(M=w.dataSpan),void 0===M&&(D=!1,M=w.cellSpan)):a.GroupFooter);var O=0;if(M>1){var F=0,L=w.vindex+1;if(I)for(M--;F++1&&D)for(N=1;NN;N++)this._cells[s+y+N][C+F].span(q);Y[C+F].span(q)}}}var G=w._defColSpan,W=w._dspan,j=w.merged&&w.merges;if(j&&n instanceof u.MergedGroupFooter&&C>=n.parent.level&&(j=null),j)if(q.merged=j.isMerged(r,_),j.isHidden(r,_))q.set(G+O,W,!1),q.head=f[C-d];else{var z=void 0;z=n.isDataRow?(q.rows=j.getMerged(r,_))*W:j.getMerged2(p,n.index,r-_,W),q.set(G+O,z,!0),f[C-d]=q.head=q}else I?q.set(G,W+O,!0):q.set(G+O,W,!0)}}else{var Y=o[s];for(C=d;C<=c;C++){var q;(q=Y[C]).clear(!1),q.merged=!1,q.grouped=!0}}},o.prototype.$_refreshSpans=function(t,e,i){},o.prototype.$_cleanRowViews=function(t){for(;this.childCount>t;)this.$_removeView(this.childCount-1)},o.prototype.$_cutTailBodyCells=function(t){for(var e=this._cells,i=t;i=t;i--){var o=e[i];r.Utils.detach(o)}else{for(i=e.length-1;i>=this._cells.length;i--)for(var n=e[i].cells,s=n.length;s--;){for(var a=n[s];a.childElementCount>1;)a.removeChild(a.lastElementChild);a.removeAttribute(g),a.removeAttribute(m)}for(i=e.length-1;i>=t;i--){(o=e[i]).childElementCount>0?(o[c.T_IDX]=-1,o.style.display="none"):r.Utils.detach(o)}}},o.prototype.$_resetHeights=function(t,e){var i=this._tbody.children,o=0;if(t.length>0){for(var n=1;n0){for(var n=1;n0||h.$_editWidth>0)&&h.buttons&&(h.buttons.style.top=Math.floor((d-i)/2)+"px")),e&&!h.heighted){var c=Math.max(0,h.height-2);h.cell.firstElementChild.style.maxHeight=c+"px",r.Utils.ieTen&&(h.cell.firstElementChild.style.height=c+"px")}}},o.prototype.$_focusChanged=function(t,e,i){this.$_cellStateChanged(t,e,"focused",i)},o.prototype.$_mouseEnteredChanged=function(t,e,i){this.$_cellStateChanged(t,e,"mouseEntered",i)},o.prototype.$_cellStateChanged=function(t,e,i,o){var n=t.canMergeEditing(e);if(e&&e.item,e&&o!=e[i]){var r=this.getRowView(e.item);if(r instanceof l.ItemElement){var s=this.model,a=e.dataColumn;if(e[i]=o,a&&t.getCellType(e.cell)===c.GridCellType.DATA){var h=s.getCellAt(e.item,a);if(r.$_setButtons(t,e,e.cell.firstElementChild),e.merged&&e.head){var u=e.head,d=t.layoutManager,p=this.getCellRect(d,e,!1),_=this.getCellRect(d,e,!0),f=u.renderer2;if(e.focused){var g=p.top-_.top+p.height/2-_.height/2;f.moveClickElement(g,n)}else e.mouseEntered||u.contains(t.focusedIndex)||f.moveClickElement(0,n)}r instanceof l.RowElement&&e.renderer2&&"focused"===i&&e.renderer2.refreshFocusChanged&&r.cellRefresh(t,s,h,a,e)}}}},o.prototype.$_buttonZIndexChanged=function(t,e,i,o){var n=e&&e.item;if(n&&n.isDataRow){var r=this.getRowView(n);if(r instanceof l.ItemElement)e.dataColumn&&r.$_setButtonZIndex(t,e,i,o)}},o.prototype.$_rendererChanged=function(t){for(var e=this._cells,i=0;i=0;l--)for(h=0;h=0;r--)if(!this._cells[r][o].spanned)return this._cells[r][o].layout}else for(r=o-1;r>=0;r--)if(!i[r].spanned)return i[r].layout;return t}}},a.prototype.refresh=function(t){for(var e=t.focusedColumn,i=t.layoutManager,n=this._getFirstCell(i),s=this._getLastCell(i)-n+1,a=0;a0){for(var u=0,d=0;d0&&(c=Math.min(c,this._maxRowHeight)),u+=h[d]=c}s=u}return s=s<=0?Math.max(this._minRowHeight,t.heightMeasurer.headerHeight(this._getCssSelector(),n.styleName||"","rg-header-cell"))*r:Math.max(this._minRowHeight*r,s),this._fixedHeight=s>=0,s=Math.max(this._minRowHeight*r,n.minHeight,s),this._maxRowHeight>0&&(s=Math.min(s,this._maxRowHeight*r)),n.setCalcHeights(h,!1),e.Size.create(i,s)},a.prototype._doPrepareTableExtents=function(t){i.prototype._doPrepareTableExtents.call(this,t);var e=this.model,o=this._rowPoints,n=this.height,r=e.getCalcHeights(),s=Math.floor(n/t.headerRows);if(o.length=this._getTableRowCount(t)+1,o[0]=0,o.length>0){for(var a=1;a0){var g=0,m=d.vindex+1;if(p)for(;g++-1&&(M.left=B+"px"),V>-1&&(M.top=V+"px")}else I&&I.style.removeProperty("display"),F&&(n.Utils.detach(F),n.Utils.detach(L));var A=o.filter;w>0?(A?M=A.style:(A=l.createElement("span"),o.filter=A,(M=A.style).position="absolute",M.display="inline-block"),n.Utils.addChild(b,A),A.className="rg-header-filtering"+(c.isFiltered()?" filter-activated":""),T+=w,M.left=E-T+"px",M.top=Math.floor((S-e.filterHeight)/2)+"px",M.width=w+"px",M.height=e.filterWidth+"px"):n.Utils.detach(A);var N=o.sort;if(y){switch(N?M=N.style:(N=l.createElement("span"),o.sort=N,(M=N.style).position="absolute",M.display="inline-block"),n.Utils.addChild(b,N),v){case r.SortDirection.DESCENDING:N.className="rg-header-sort-descending";break;case r.SortDirection.ASCENDING:N.className="rg-header-sort-ascending";break;default:N.className="rg-header-sort-none"}T+=C,M.left=E-T+"px",M.width=C+"px",u.showSortOrder&&c.sortOrder>=0?(N[n.Utils.TextProp]=(c.sortOrder+1).toString(),M.top=Math.max(0,Math.floor((S-e.sortHeight-10)/2))+"px",M.height=Math.min(o.height,e.sortHeight+10)+"px",M.backgroundPositionY=n.Utils.isIE?"5px":"70%",M.lineHeight=n.Utils.isIE?"1.5em":"1em"):(N[n.Utils.TextProp]="",M.backgroundPositionY="center",M.top=Math.floor((S-e.sortHeight)/2)+"px",M.height=e.sortHeight+"px")}else n.Utils.detach(N);var $=o.popup;x>0?($?M=$.style:($=l.createElement("span"),o.popup=$,(M=$.style).position="absolute",M.display="inline-block"),n.Utils.addChild(b,$),$.className="rg-header-popup",T+=x,M.left=E-T+"px",M.top=Math.floor((S-e.popupHeight)/2)+"px",M.width=x+"px",M.height=e.popupWidth+"px"):n.Utils.detach($),M=b.style,o.showTooltip=i.showTooltip,o.tooltipEllipsisOnly=i.tooltipEllipsisOnly,o.tooltip=i.tooltip,o.setDivMarigns(M,R,T,D,k);var U=c.header.realizeTemplate(),H=c.header.templateEvents;if(U){var G=o.setHtml(I,U,H);o.renderCallback&&o.renderCallback.forEach((function(e){e.callback.call(null,t.handler,c.header,e.elt,G)}))}else o.setText(I,i.text||"");s.TableCell.addEdgeMark(i.edgeMark,o,l)},a.prototype._updateGroupCell=function(t,e,i,o){var n=t.doc,r=t.layoutManager,a=o.cell.firstElementChild,l=o.textSpan,h=this.$_getCellHeight(o),u=o.layout,d=0,c=a.style;r.fitHeader()?c.removeProperty("max-height"):c.setProperty("max-height",Math.max(h-2,0)+"px");var p=this.$_canExpanderHandleVisible(u),_=o.expander;if(p){o.expander||((_=o.expander=n.createElement("span")).style.position="absolute",_.style.display="inline-block"),_.className=u.expanded?"rg-column-expanded":"rg-column-collapsed";var f=_.style;f.left="2px",f.top=Math.floor((h-e.expanderHeight)/2)+"px",f.width=e.expanderWidth+"px",f.height=e.expanderHeight+"px",d+=e.expanderWidth+2,a.appendChild(o.expander)}else o.expander&&a.removeChild(o.expander);o.showTooltip=i.showTooltip,o.tooltipEllipsisOnly=i.tooltipEllipsisOnly,o.tooltip=i.tooltip,o.setDivMarigns(c,d,0,0,0);var g=u.header.realizeTemplate(),m=u.header.templateEvents;if(g){var y=o.setHtml(l,g,m);o.renderCallback&&o.renderCallback.forEach((function(e){e.callback.call(null,t.handler,u.header,e.elt,y)}))}else o.setText(l,i.text||"");s.TableCell.addEdgeMark(i.edgeMark,o,n)},a.prototype.$_canPopupHandleVisible=function(t,e,i){if(null==e.header.popupMenuName)return!1;switch(t.showPopupMenu){case r.HandleVisibility.VISIBLE:case r.HandleVisibility.ALWAYS:return!0;case r.HandleVisibility.HOVERED:return i.hovered;case r.HandleVisibility.HIDDEN:return!1}},a.prototype.$_canFilterHandleVisible=function(t,e,i){var o=t.enabled&&e.hasFilters&&e.filterable&&e.filterIconVisible;if(o)switch(t.handleVisibility){case r.HandleVisibility.HIDDEN:o=!1;break;case r.HandleVisibility.HOVERED:o=i.hovered;break;case r.HandleVisibility.ACTIVE_OR_HOVERED:o=e.isFiltered()||i.hovered}return o},a.prototype.$_canSortHandleVisible=function(t,e,i){switch(t.handleVisibility){case r.HandleVisibility.VISIBLE:return e.sortOrder>=0;case r.HandleVisibility.HOVERED:return i.hovered&&e.sortOrder>=0;case r.HandleVisibility.ALWAYS:return e.sortable||e.sortOrder>=0;case r.HandleVisibility.HIDDEN:return!1}},a.prototype.$_canCheckHandleVisible=function(t,e){return!1},a.prototype.$_canExpanderHandleVisible=function(t){return t.isExpandable()},a.prototype.$_checkHeight=function(){return(this.model&&this.model.dirty||this._dirty)&&this._table.offsetHeight!=this._rowPoints[this._rowPoints.length-1]},a.prototype.getHeights=function(t,e){var i=this._tbody.rows,o=this.model,n=o.heights||[],r=o.minRowHeight,s=o.maxRowHeight;if(0==t.length)for(var a=0,l=this._rowPoints.length-1;a0&&(t[a]=Math.min(t[a],s))},a.RENDERER_STYLE="rg-header-renderer",a.CHECK_IMAGE_STYLE="rg-header-check-image",a}(i.SimpleTableElement);Cr.HeaderElement=h;var u=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(i,e),i.prototype._getExplicitWidth=function(t){return t.fixedWidth-t.fixedBarWidth},i.prototype._getFirstCell=function(t){return this._getStartCell(t)},i.prototype._getLastCell=function(t){return this._getEndCell(t)},i.prototype._getStartCell=function(t){return 0},i.prototype._getEndCell=function(t){return t.fixedCellCount-1},i.prototype._getCellCount=function(t){return t.fixedCellCount},i.prototype._getCellWidth=function(t,e){return t.getFixedCellWidth(e)},i.prototype._getCellWidth2=function(t,e,i){return t.getFixedCellWidth2(e,i)},i.prototype.tableCellByLayout2=function(t,e){return this.tableCellByLayout(e)},i}(h);Cr.FixedHeaderElement=u;var c=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(i,e),i.prototype._getFirstCell=function(t){return this._getStartCell(t)},i.prototype._getLastCell=function(t){return this._getEndCell(t)},i.prototype._getStartCell=function(t){return t.cellCount-t.rightCellCount},i.prototype._getEndCell=function(t){return t.cellCount-1},i.prototype._getCellCount=function(t){return t.cellCount-1},i.prototype._getCellWidth=function(t,e){return t.getRightCellWidth(e)},i.prototype._getCellWidth2=function(t,e,i){return t.getRightCellWidth2(e,i)},i.prototype.tableCellByLayout2=function(t,e){return this.tableCellByLayout(e)},i}(h);return Cr.RightHeaderElement=c,Cr}var $r,Ur={};function Hr(){if($r)return Ur;$r=1,Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.GridLayoutManager=void 0;var t=d,e=G(),i=E(),o=cn(),n=nn(),r=dn(),s=Ar(),a=S(),l=yr(),h=C(),u=Pn(),c=function(e){function d(t){var i=e.call(this)||this;return i._refreshMode=h.RefreshMode.ALL,i._leftPos=0,i._rightFixed=!0,i._footerCount=0,i._headerSummaryCount=0,i._layoutCount=0,i._fixedLayoutCount=0,i._rightLayoutCount=0,i._firstLayout=0,i._lastLayout=0,i._layoutsLength=0,i._layouts=[],i._layoutPoints=[],i._fixedLayoutPoints=[],i._rightLayoutPoints=[],i._cellCount=0,i._fixedCellCount=0,i._rightCellCount=0,i._firstCell=0,i._lastCell=0,i._startCell=0,i._endCell=0,i._cellPoints=[],i._fixedCellPoints=[],i._rightCellPoints=[],i._trs=1,i._rowGrouped=!1,i._items=[],i._topIndex=0,i._itemCount=0,i._fixedItemCount=0,i._fullItemCount=0,i._fixedItemPoints=[],i._itemPoints=[],i._fixedTableRowCount=0,i._tableRowCount=0,i._fixedTableRowPoints=[],i._tableRowPoints=[],i._fixedTableItemPoints=[],i._tableItemPoints=[],i._fixedDataHeight=0,i._dataRowHeights=[],i._dataHeight=0,i._fixedBarWidth=0,i._rightBarWidth=0,i._fixedBarHeight=0,i._itemsBounds=0,i._fixedWidth=0,i._rightWidth=0,i._fixedHeight=0,i._autoRowHeights=!1,i._minRowHeight=l.DisplayOptions.MIN_TABLE_ROW_HEIGHT,i._minItemHeight=l.DisplayOptions.MIN_TABLE_ROW_HEIGHT,i._maxHeight=l.DisplayOptions.MIN_TABLE_ROW_HEIGHT,i._itemHeight=0,i._hscrolled=!1,i._vscrolled=!1,i._hscrollBar=!1,i._vscrollBar=!1,i._scrollBarWidth=0,i._scrollBarHeight=0,i._scrollWidth=0,i._fitStyle=void 0,i._grid=t,i}return t.__extends(d,e),d.prototype._doDispose=function(){this._grid=null,this._rs=null,e.prototype._doDispose.call(this)},_dp(d,"grid",{get:function(){return this._grid}}),_dp(d,"footerCount",{get:function(){return this._footerCount}}),_dp(d,"headerSummaryCount",{get:function(){return this._headerSummaryCount}}),_dp(d,"vscrollBar",{get:function(){return this._vscrollBar}}),_dp(d,"hscrollBar",{get:function(){return this._hscrollBar}}),_dp(d,"scrollBarWidth",{get:function(){return this._scrollBarWidth}}),_dp(d,"scrollBarHeight",{get:function(){return this._scrollBarHeight}}),_dp(d,"dataBounds",{get:function(){return this._dataBounds}}),_dp(d,"bodyBounds",{get:function(){return this._bodyBounds}}),_dp(d,"fixedBodyBounds",{get:function(){return this._fixedBodyBounds}}),_dp(d,"gridBounds",{get:function(){return this._gridBounds}}),_dp(d,"headerBounds",{get:function(){return this._headerBounds}}),_dp(d,"summaryBounds",{get:function(){return this._summaryBounds}}),_dp(d,"footerBounds",{get:function(){return this._footerBounds}}),_dp(d,"filterPanelBounds",{get:function(){return this._filterPanelBounds}}),_dp(d,"topContentBounds",{get:function(){return this._topContentBounds}}),_dp(d,"leftContentBounds",{get:function(){return this._leftContentBounds}}),_dp(d,"rowBarBounds",{get:function(){return this._rowBarBounds}}),_dp(d,"sideContentBounds",{get:function(){return this._sideContentBounds}}),_dp(d,"contentBounds",{get:function(){return this._contentBounds}}),_dp(d,"fixedContentBounds",{get:function(){return this._fixedContentBounds}}),_dp(d,"nonFixedBounds",{get:function(){return this._nonFixedBounds}}),_dp(d,"rightContentBounds",{get:function(){return this._rightContentBounds}}),_dp(d,"headBounds",{get:function(){return this._headBounds}}),_dp(d,"sumBounds",{get:function(){return this._sumBounds}}),_dp(d,"footBounds",{get:function(){return this._footBounds}}),_dp(d,"fixedWidth",{get:function(){return this._fixedWidth}}),_dp(d,"rightWidth",{get:function(){return this._rightWidth}}),_dp(d,"defaultItemHeight",{get:function(){return this._itemHeight}}),_dp(d,"topIndex",{get:function(){return this._topIndex}}),_dp(d,"itemCount",{get:function(){return this._itemCount}}),_dp(d,"fixedItemCount",{get:function(){return this._fixedItemCount}}),_dp(d,"fullItemCount",{get:function(){return this._fullItemCount}}),_dp(d,"fixedTableRowCount",{get:function(){return this._fixedTableRowCount}}),_dp(d,"tableRowCount",{get:function(){return this._tableRowCount}}),_dp(d,"trs",{get:function(){return this._cellLayouts.dataRows}}),_dp(d,"leftPos",{get:function(){return this._leftPos}}),_dp(d,"cellLayouts",{get:function(){return this._cellLayouts}}),_dp(d,"layoutCount",{get:function(){return this._layoutCount}}),_dp(d,"fixedLayoutCount",{get:function(){return this._fixedLayoutCount}}),_dp(d,"rightLayoutCount",{get:function(){return this._rightLayoutCount}}),_dp(d,"firstLayout",{get:function(){return this._firstLayout}}),_dp(d,"lastLayout",{get:function(){return this._lastLayout}}),_dp(d,"rightFirstLayout",{get:function(){return this._layoutCount-this._rightLayoutCount}}),_dp(d,"rightFirstCell",{get:function(){var t=this._layouts[this.rightFirstLayout];return t?t.col:1/0}}),_dp(d,"layoutsLength",{get:function(){return this._layoutsLength}}),_dp(d,"cellCount",{get:function(){return this._cellCount}}),_dp(d,"fixedCellCount",{get:function(){return this._fixedCellCount}}),_dp(d,"rightCellCount",{get:function(){return this._rightCellCount}}),_dp(d,"firstCell",{get:function(){return this._firstCell}}),_dp(d,"lastCell",{get:function(){return this._lastCell}}),_dp(d,"startCell",{get:function(){return this._startCell}}),_dp(d,"endCell",{get:function(){return this._endCell}}),_dp(d,"isColumnFitted",{get:function(){return!!this._fitStyle}}),_dp(d,"scrollWidth",{get:function(){return this._scrollWidth}}),_dp(d,"fixedBarWidth",{get:function(){return this._fixedBarWidth}}),_dp(d,"rightBarWidth",{get:function(){return this._rightBarWidth}}),_dp(d,"fixedHeight",{get:function(){return this._fixedHeight}}),_dp(d,"fixedBarHeight",{get:function(){return this._fixedBarHeight}}),_dp(d,"rowGrouped",{get:function(){return!1}}),_dp(d,"mergedRowGrouped",{get:function(){return!1}}),_dp(d,"rowGroupFields",{get:function(){return null}}),_dp(d,"rowGroupLevels",{get:function(){return 0}}),_dp(d,"clientRect",{get:function(){return this._clientRect}}),_dp(d,"headerRows",{get:function(){return this._cellLayouts.headerRows}}),_dp(d,"dataRows",{get:function(){return this._cellLayouts.dataRows}}),_dp(d,"topPanelVisible",{get:function(){return!1}}),_dp(d,"minRowHeight",{get:function(){return this._minRowHeight}}),_dp(d,"minItemHeight",{get:function(){return this._minItemHeight}}),_dp(d,"fitStyle",{get:function(){return this._fitStyle}}),d.prototype.syncHeight=function(){return this.grid.displayOptions.syncGridHeight!==h.SyncGridHeight.NONE},d.prototype.fitSyncHeight=function(){return this._fitSyncHeight},d.prototype.fitHeader=function(){return this._fitHeader},d.prototype.getStartCell=function(t){if(void 0===t&&(t=!0),t)return this._firstCell;var e=this.grid,i=e.isRecycleMode();switch(this._refreshMode){case h.RefreshMode.VISIBLE_ONLY:return this._startCell;case h.RefreshMode.RECYCLE:return i?e._needRefresh&&e._horzScrolled?this._firstCell:this._startCell:this._firstCell;default:return this._firstCell}},d.prototype.getEndCell=function(t){if(void 0===t&&(t=!0),t)return this._lastCell;var e=this.grid,i=e.isRecycleMode();switch(this._refreshMode){case h.RefreshMode.VISIBLE_ONLY:return this._endCell;case h.RefreshMode.RECYCLE:return i?e._needRefresh&&e._horzScrolled?this._lastCell:this._endCell:this._lastCell;default:return this._lastCell}},d.prototype.getLayout=function(t){return this._layouts[t]},d.prototype.getLayoutBounds=function(t){return new i.Rectangle(this._layoutPoints[t],0,this._layoutPoints[t+1]-this._layoutPoints[t],0)},d.prototype.getLayoutWidth=function(t){return this._layoutPoints[t+1]-this._layoutPoints[t]},d.prototype.getPositionToVIndex=function(t){for(var e=this._layoutPoints,i=0;i=e[i]&&t=e[i]&&t0)for(var n=0;n0&&(e=i.reduce((function(t,e){return t+e}),0)),e<=0&&(e=t.heightMeasurer.rowHeight*this._trs),i.length>0&&this._maxHeight>0&&(e>this._maxHeight||e0&&(e=Math.min(this._maxHeight,e)),e=Math.max(this._minItemHeight,e)},d.prototype.measure=function(t,e,i,o,n){var r=this._grid;this._rs=r.itemSource,this._cellLayouts=r._activeCellLayout,this._footerCount=r.footers.visibleCount,this._headerSummaryCount=r.headerSummaries.visibleCount,this._leftPos=e,this._topIndex=i,this._focusIndex&&!r.isValid(this._focusIndex)&&this._focusIndex.normalize(r),this._prevVscrollBar=this._vscrollBar,this._prevHscrollBar=this._hscrollBar,this._doMeasure(t,o,n),this._prevVscrollBar===this._vscrollBar&&this._prevHscrollBar===this._hscrollBar||(r._columnsDirty=!0)},d.prototype.layout=function(t,e){void 0===e&&(e=!1);var i=this._grid;i.invalidateGridObject(),this._doLayout(i,t),this._adjustLayout(i,this._gridBounds.clone(),e),this._prevFocused=this._focusIndex,this._focusIndex=null,this._oldSyncHeight=i.displayOptions.syncGridHeight},d.prototype.getItemHeight=function(t){var e=t.index;return e0&&t0&&t0&&t1&&(t-=i),this._tableRowPoints[Math.min(t+e,this._tableRowPoints.length-1)]-this._tableRowPoints[t])},d.prototype.getTableRowHeight=function(t,e){return t0&&(t-=this._fixedItemCount*this._trs+1),this._tableRowPoints[Math.min(t+e,this._tableRowPoints.length-1)]-this._tableRowPoints[t])},d.prototype.getTableRowBounds=function(t,e){var o,n;return this._fixedTableRowCount>0&&t0&&(t-=this._fixedTableRowCount+1),o=this._tableRowPoints[t],n=this._tableRowPoints[Math.min(t+e,this._tableRowCount)]-o),new i.Rectangle(0,o,1e3,n)},d.prototype.getTableRowIndex=function(t){t-=this.contentBounds.y+this.bodyBounds.y;for(var e=0;e0?this._fixedTableRowCount+1:0);return-1},d.prototype.setLeftPos=function(t,e){var i=this._grid;this._leftPos=e,this.$_calcLeftPos(),i.contentPane.x=this._contentBounds.x=this.fixedContentBounds.right-this._leftPos},d.prototype.isMergedCell=function(t){return!1},d.prototype.getMergeRoom=function(t){var e=t.layout;if(e instanceof r.CellLayoutColumnItem&&e.canMerge()){var i=e.merges;return i&&i.getRoom(t)}return null},d.prototype.getHeaderCellAt=function(t,e,i){void 0===i&&(i=!1);var o,n=this._grid,r=this._cellLayouts._headerCells,s=-1;if(t=this._fixedCellPoints[a]&&tthis._rightContentBounds.x){o=n.rightHeaderView,t-=this._rightContentBounds.x;for(a=0;a=this._rightCellPoints[a]&&t=this._cellPoints[a]&&t=0){var l=r[o.getRowAt(e-this._headerBounds.y-this._contentBounds.y)][s];return(l=o.getSpanRoot(l))&&!i?l.source:l}},d.prototype.getHeaderCellRect=function(t,e){void 0===e&&(e=!1);var o,n,r=this.grid,s=t.hcol,a=this.cellCount-this.rightCellCount;if(s=a){l=this._rightContentBounds.x+this._grid.fixedOptions.rightBarWidth,h=s-a,u=(n=r.rightHeaderView.tableCellByLayout(t))?n.colSpan:t.cols;o=new i.Rectangle(this._rightCellPoints[h]+l,0,this._rightCellPoints[h+u]-this._rightCellPoints[h],0)}else{l=this._contentBounds.x,h=s-this._fixedCellCount,u=(n=r.headerView.tableCellByLayout(t))?n.colSpan:t.cols;o=new i.Rectangle(this._cellPoints[h]+l,0,this._cellPoints[h+u]-this._cellPoints[h],0)}return o.y=this._contentBounds.y+r.headerView.getLayoutPos(t),o.height=r.headerView.getLayoutHeight(t,n,e),o},d.prototype.getDataRect=function(t){var e,o=(t=t.source).col,n=t instanceof r.CellLayoutGroupItem?t._clen:t._defColSpan,s=this.cellCount-this.rightCellCount;if(o=s){a=this._rightContentBounds.x+this._grid.fixedOptions.rightBarWidth,l=o-s;e=new i.Rectangle(this._rightCellPoints[l]+a,0,this._rightCellPoints[l+n]-this._rightCellPoints[l],0)}else{a=this._contentBounds.x,l=o-this._fixedCellCount;e=new i.Rectangle(this._cellPoints[l]+a,0,this._cellPoints[l+n]-this._cellPoints[l],0)}return e},d.prototype.getBodyView=function(t){var e=this.rightFirstLayout,i=(t instanceof r.CellLayoutItem?t:t.layout).root.vindex;return i=e?this._grid.rightBodyView:this._grid.bodyView},d.prototype.$_getItemIndexByPosY=function(t,e){var i=this.grid,o=this._trs,n=-1,r=0,s=function(t,e,i){for(var s=0;s=i[s]&&t=a.y&&t0&&t=0&&(n+=i.topItem))):e?n=this._itemCount+i.topItem:(s(t,this._footerCount,i.footerView._rowPoints),n=-2),{itemIndex:n,rowIndex:r}},d.prototype.mouseToIndex=function(t,e,i,o){if(o.set(-1,null),this._layoutCount<1)return o;var n=this.grid;if(o.itemIndex=this.$_getItemIndexByPosY(i,!0).itemIndex,t){var r=n.getCellViewOf(t),a=r&&n.getBodyView(r),l=a instanceof s.GridBodyElement&&a.layoutByCell(r);if(l)return o.layout=l,o}return o},d.prototype.mouseToIndex2=function(t,e,i){var n,r,s=this.grid,a=this.cellLayouts._dataCells,l=this.$_getItemIndexByPosY(e,i),h=l.itemIndex,u=function(t,e,i){for(var o=0;o=i[o]&&t0&&(t>this._rightContentBounds.x?(r=u(t-=this._rightContentBounds.x,this._rightCellCount,this._rightCellPoints),n=d&&d[this._fixedCellCount+c+r]):(t-=this._rowBarBounds.width)=i){if(e=this._topIndex+i+this._fullItemCount)return!1}var r=t.layout;if(o!==this.grid.activeCellLayout||!o.contains(r)||!o.getDataCellPos(r.firstColumn))return!1;var s=r.col;if(s>=(i=this._fixedLayoutCount)){if(n[s=r.col-this._fixedCellCount]this._nonFixedBounds.width)return!1}return!0},d.prototype.clearFocusRequest=function(){this._focusIndex=null},d.prototype.focusIsVisible=function(t){return(t=t||this._focusIndex)&&this.cellIsVisible(t)},d.prototype.makeCellVisible=function(t){this._focusIndex=t.clone()},d.prototype.isAutoRowHeights=function(){return this._autoRowHeights},d.prototype.isRowGrouped=function(){return this._rowGrouped},d.prototype.scrollToNextCell=function(){for(var t=0;tthis._leftPos)return this._cellPoints[t];return this._leftPos},d.prototype.scrollToPrevCell=function(){for(var t=this._cellCount-1;t>=0;t--)if(this._cellPoints[t]0){var r=this._layouts,s=this._fixedLayoutPoints,a=this._fixedCellPoints,l=0,h=0;s.push(l),a.push(l);for(var u=0;u0){var a=0,l=this._cellCount;o.push(a),n.push(a);for(var h=0;h0){var a=0,l=this._cellCount;n.push(a),r.push(a);for(var h=o-this._rightLayoutCount;h=this._fixedLayoutCount&&i=n[a+1]&&(l=l-(this.gridBounds.width+n[a]-n[a+1])+(this._fixedContentBounds.width+this._rightContentBounds.width)),e=l;else{var u=t.getAncestor(r.displayOptions.groupFocusLevel),d=n[a+(s?u.cols:t.cols)]-this._leftPos-this._scrollWidth;h&&n[a]-this._leftPos>=this._scrollWidth&&(d=Math.max(n[a]-n[this.getLeftCell()],d)),d>0&&(e=Math.min(l,this._leftPos+d))}}}(e=Math.max(0,Math.min(e,this._layoutsLength-this._scrollWidth)))!==this._leftPos&&(this.grid._horzScrolled=!0,this._leftPos=e),this._firstLayout=this._fixedLayoutCount,this._lastLayout=this._layoutCount>0?this._layoutCount-this._rightLayoutCount-1:-1},d.prototype.$_checkFitting=function(t,e){var i=t.fitStyle,o=this.grid,n=o.fixedOptions,r=o.activeCellLayout.count;if(i!=h.GridFitStyle.NONE){if(r>=0&&n.colCount+n.rightCount>=r)return t.fitStyleIncludeFixed?i:void 0;var s=this._cellPoints,a=s.length;if(a>0)return i==h.GridFitStyle.EVEN_FILL||e-s[a-1]>0?i:void 0}},d.prototype.$_fitColumns=function(t,e,o){var n=t.fitStyle,r=this._fixedLayoutCount,s=!1;if(t.fitStyleIncludeFixed&&this._fixedCellCount+this._rightCellCount>0){var l=this._layouts.slice(0,r),u=this._layouts.slice(r,this.rightFirstLayout),d=this._layouts.slice(this.rightFirstLayout),c=[{points:this._fixedLayoutPoints,layouts:l,cellPoints:this._fixedCellPoints},{points:this._layoutPoints,layouts:u,cellPoints:this._cellPoints},{points:this._rightLayoutPoints,layouts:d,cellPoints:this._rightCellPoints}],p=0;c.forEach((function(t){var e=t.points;e.length>0&&(p+=e[e.length-1])}));var _=this._clientRect.width-this._leftContentBounds.width-this._sideContentBounds.width-this._scrollBarWidth;if(_=_-(this._fixedCellCount?this._fixedBarWidth:0)-(this._rightCellCount?this._rightBarWidth:0),n===h.GridFitStyle.FILL){var f=0,g=0,m=[];c.forEach((function(t){for(var e=t.points,i=t.widths=[],o=1;o0?f+=S:g+=m[y]}(s=f>0)&&(g=_-g,c.forEach((function(t){for(var e=t.points,i=1;i0?e[i-1]+o*g/f:e[i-1]+t.widths[i-1]}})))}s||c.forEach((function(t){for(var e=t.points,i=1;i0){var b=this._layouts;if(n==h.GridFitStyle.FILL){var I=0,E=0;for(y=0;y0?E+=S:I+=x[y]}if(s=E>0){I=o-I;for(y=1;y0?C[y-1]+R*I/E:C[y-1]+x[y-1]}}}if(!s)for(y=1;y0&&D>2+T&&(C[y]-=T,T=0)}var k=this._cellPoints=[],M=0;k.push(M);for(y=0;y0&&(t.fixedFilterView._rowPoints=t.filterPanelView._rowPoints.slice()),this._fixedSummaryBounds.x=i.x,this._fixedSummaryBounds.y=this._fixedFilterBounds.bottom,this._fixedSummaryBounds.width=i.width,i.topBy(this._fixedSummaryBounds.height),e>0&&(t.fixedHeaderSummaryView._rowPoints=t.headerSummaryView._rowPoints.slice()),this._fixedFooterBounds.x=i.x,this._fixedFooterBounds.y=i.bottom-this._fixedFooterBounds.height,this._fixedFooterBounds.width=i.width,i.bottomBy(-this._fixedFooterBounds.height),e>0&&(t.fixedFooterView._rowPoints=t.footerView._rowPoints.slice()),this._fixedBodyBounds=i},d.prototype.$_measureRightPane=function(t){var e=this._rightWidth;this._rightContentBounds.width=e;var i=this._rightContentBounds.clone();i.x=this._rightBarWidth,i.y=0,i.width-=i.x,this._rightHeaderBounds.x=i.x,this._rightHeaderBounds.y=i.y,this._rightHeaderBounds.width=i.width,i.topBy(this._rightHeaderBounds.height),this._rightFilterBounds.x=i.x,this._rightFilterBounds.y=i.y,this._rightFilterBounds.width=i.width,i.topBy(this._rightFilterBounds.height),e>0&&(t.rightFilterView._rowPoints=t.filterPanelView._rowPoints.slice()),this._rightSummaryBounds.x=i.x,this._rightSummaryBounds.y=this._rightFilterBounds.bottom,this._rightSummaryBounds.width=i.width,i.topBy(this._rightSummaryBounds.height),e>0&&(t.rightHeaderSummaryView._rowPoints=t.headerSummaryView._rowPoints.slice()),this._rightFooterBounds.x=i.x,this._rightFooterBounds.y=i.bottom-this._rightFooterBounds.height,this._rightFooterBounds.width=i.width,i.bottomBy(-this._rightFooterBounds.height),e>0&&(t.rightFooterView._rowPoints=t.footerView._rowPoints.slice()),this._rightBodyBounds=i},d.prototype.$_measureContentPane=function(t){var e=this._layoutsLength;this._contentBounds.width=e;var i=this._contentBounds.clone();i.x=i.y=0,this._headerBounds&&(this._headerBounds.x=i.x,this._headerBounds.y=i.y,this._headerBounds.width=i.width,i.topBy(this._headerBounds.height)),this._filterPanelBounds&&(this._filterPanelBounds.x=i.x,this._filterPanelBounds.y=i.y,this._filterPanelBounds.width=i.width,i.topBy(this._filterPanelBounds.height)),this._summaryBounds&&(this._summaryBounds.x=i.x,this._summaryBounds.y=this._filterPanelBounds.bottom,this._summaryBounds.width=i.width,i.topBy(this._summaryBounds.height)),this._dataBounds=i.clone(),this._footerBounds&&(this._footerBounds.x=i.x,this._footBounds.y=this._footerBounds.y=i.bottom-this._footerBounds.height,this._footerBounds.width=i.width,i.bottomBy(-this._footerBounds.height)),this._bodyBounds=i},d.prototype.getRowHeightOfCallback=function(t,e){var i=t.getItem(e),o=t.displayOptions.rowHeightCallback;if(o){var n=o.call(this,t.handler,i.type,e),r=[],s=void 0,a=this.trs;if(null!=n){if(Array.isArray(n)){r=n.slice(0,a);for(l=n.length;l0){this._fixedItemPoints.push(r);for(var a=0;a0&&r=this._fixedItemCount&&un?1:0),t&&u>=this._topIndex+this._fixedItemCount+this._fullItemCount){r=this.fixedItemCount>0?this._fixedHeight+e.fixedOptions.rowBarHeight:0;var c,p=u-this._fixedItemCount-Math.max(0,this._fullItemCount-1)-this._topIndex;null==(c=e.topIndexChanging(this._topIndex,p,t,!1))||isNaN(c)||(p=c),this._topIndex+=p,this._itemPoints=[r],this._itemCount=0,this._fullItemCount=0;for(a=this._topIndex;a=n?1:0)}}else this._topIndex=0},d.prototype.$_updateScrollInfo=function(t,e,i){var o=this,n=function(i){return!1!==e.vscrollBar&&!c&&(o._topIndex>0||t.itemCount>o._itemCount+o._fixedItemCount||l>o._bodyBounds.height-i)},r=this._reqScrollBarWidth,s=this._reqScrollBarHeight,a=i?this._tableItemPoints:this._itemPoints,l=a[a.length-1],u=this._layoutsLength,d=e.fitStyle==h.GridFitStyle.EVEN_FILL,c=this.syncHeight();this._hscrolled=!1!==e.hscrollBar&&u>this._scrollWidth,this._vscrolled=n(0);var p="always"===e.hscrollBar||s>0&&this._hscrolled&&!d,_="always"===e.vscrollBar||r>0&&this._vscrolled;p!=_&&(p?(r>0&&!c&&(_=l>this._bodyBounds.height-s,this._hscrolled=u>this._scrollWidth-r),this._vscrolled=n(s)):(s>0&&!d&&(p=u>this._scrollWidth-r,this._vscrolled=n(s)),this._hscrolled=!1!==e.hscrollBar&&!d&&u>this._scrollWidth-r)),this._hscrollBar=p,this._vscrollBar=_,this._scrollBarWidth=_?r:0,this._scrollBarHeight=p?s:0,this._scrollWidth-=this._scrollBarWidth},d.prototype.$_recalcScrollInfo=function(t){this._scrollWidth+=this._scrollBarWidth,this._bodyBounds.height+=this._scrollBarHeight,this._gridBounds.height+=this._scrollBarHeight,this._clientRect.height+=this._scrollBarHeight,this.$_updateScrollInfo(t,t.displayOptions,!0),this._bodyBounds.height-=this._scrollBarHeight,this._gridBounds.height-=this._scrollBarHeight,this._clientRect.height-=this._scrollBarHeight},d.prototype.$_adjustVerticals=function(){var t=this._scrollBarHeight,e=this._itemPoints;if(t>0){this._leftContentBounds.height-=t,this._footBounds.y-=t,this._rowBarBounds.height-=t,this._sideContentBounds.height-=t,this._fixedContentBounds.height-=t,this._fixedFooterBounds.y-=t,this._fixedBodyBounds.height-=t,this._nonFixedBounds.height-=t,this._contentBounds.height-=t,this._footerBounds.y-=t,this._bodyBounds.height-=t,this._rightContentBounds.height-=t,this._rightFooterBounds.y-=t,this._rightBodyBounds.height-=t;for(var i=this.syncHeight()?1/0:this._bodyBounds.height;e[e.length-2]>i;)this._itemCount--,e.pop();var o=this._fullItemCount=Math.max(0,this._itemCount-(e[this._itemCount]>=i?1:0)),n=this._focusIndex?this._focusIndex.itemIndex:-1;if(n>=0&&o>0&&this._itemCount>o&&n>=this._topIndex+this._fixedItemCount+o){for(var r=this.grid,s=e[this._itemCount],a=0;s>i;)s-=e[++a];var l=r._prevTop+1!==this._topIndex;if(a>0&&"mousedown"!==r._eventFrom){var h=r.topIndexChanging(this._topIndex,a,!!this._focusIndex,!0);null==h||isNaN(h)||(a=h),e.splice(0,a),this._topIndex+=a,this._itemCount-=a,this._fullItemCount-=a,s=e[0];for(var u=0;uo){this._startCell+=r-1;break}for(r=i-2;r>=0;r--)if(e[r]0){for(var u=this._fixedItemPoints;h0){for(u=this._itemPoints;h0&&(C+E+b>=I||t.displayOptions.syncGridHeight===h.SyncGridHeight.ALWAYS))?x.style.height=C+E+b+"px":(t.recallHeight(),E=I-C-b+(this.topPanelVisible?0:1));var S=new i.Rectangle(0,0,w.clientWidth,w.clientHeight);t.setRect(S),this._topContentBounds.width=S.width,this.$_layoutTopPane(t,this.grid._topContentPane),this._bodyBounds.height=this._fixedBodyBounds.height=this._rightBodyBounds.height=E,t.bodyView.setRect(this._bodyBounds),t.fixedBodyView.setRect(this._fixedBodyBounds),t.rightBodyView.setRect(this._rightBodyBounds),this._contentBounds.height=this._fixedContentBounds.height=this._rightContentBounds.height=this._headerBounds.height+this._summaryBounds.height+this._bodyBounds.height+this._footerBounds.height+this._filterBounds.height,this._contentBounds.x=this._leftContentBounds.width+this._sideContentBounds.width+this._fixedContentBounds.width,this.$_layoutContentPane(t,t._contentPane),this.$_layoutFixedPane(t,t._fixedContentPane),this.$_layoutRightPane(t,t._rightContentPane),this._gridBounds.height=this._headerBounds.height+this._summaryBounds.height+this._bodyBounds.height+this._filterBounds.height,this._footBounds.y=this._footerBounds.y=this._fixedFooterBounds.y=this._rightFooterBounds.y=this._bodyBounds.bottom,t.footView.y=t.footerView.y=t.fixedFooterView.y=t.rightFooterView.y=this._bodyBounds.bottom,e=this._gridBounds.clone()}else this._fitSyncHeight=!1;if(this._topIndex>0){var R=r?this._minItemHeight:this._itemHeight;if(this._contentBounds.y+this._dataBounds.bottom+R<=this._gridBounds.bottom&&(r?this.$_fillBottomAuto(t,_,g,f,this._bodyBounds.height):this.$_fillBottomFixed(t,_,g,f,this._bodyBounds.height)),0==this._topIndex){var T=this._vscrollBar;this.$_recalcScrollInfo(t),this._vscrollBar!=T&&this._fitStyle&&(this.$_layoutBodyRows(t,_,g,f,this._bodyBounds.height,!1),this.$_adjustTableRowHeights())}}t.fixedBodyView.visible&&t.fixedBodyView.$_resetCellHeights2(this,r),t.bodyView.visible&&t.bodyView.$_resetCellHeights2(this,r),t.rightBodyView.visible&&t.rightBodyView.$_resetCellHeights2(this,r);var D=this._tableItemPoints;(this._dataBounds.height=D[D.length-1],y=this._sumBounds.bottom,m=Math.min(e.height,this._dataBounds.height),this._rowBarBounds.y=y,this._rowBarBounds.height=m,_)&&t._fixedContentPane.layoutBars(this,this._fixedContentBounds.width,this._fixedContentBounds.height);f&&t._rightContentPane.layoutBars(this,this._rightContentBounds.width,this._rightContentBounds.height);(n=t.headView).visible&&(n.setRect(this._headBounds),n.layoutContent(this)),(n=t.rowBarContainer).visible&&(n.setRect(this._rowBarBounds),n.layoutContent(this))},d.prototype.$_layoutBodyRows=function(t,e,i,o,n,r,s){void 0===r&&(r=!0),void 0===s&&(s=!1);var l=this,h=e&&this._fixedCellCount>0?t.fixedBodyView:null,u=i&&this.cellCount>0?t.bodyView:null,d=(o&&this._rightCellCount)>0?t.rightBodyView:null,c=[h,u,d];function p(t,e,i,o){l._items.push(t),c.forEach((function(n,r){n&&n.layoutRow(e,w[r],i,o,t,s)}))}function _(e,i,o,n){var r=e.height,s=[];if(!t.displayOptions.refCalcHeights||isNaN(r)){for(var a=0;aT){var d=T/u;u=T;for(var p=0;p0?Math.min(Math.max(this._maxHeight,S*R),n):n,D=Math.floor(c.reduce((function(t,e){return e?Math.max(e.tableRowCount,t):t}),0)/R),k=0,M=0,O=0,F=[],L=[],P=[];this._fixedTableRowCount=0,this._tableRowCount=0,this._fixedDataHeight=this._dataHeight=0,this._items=[];var B=Math.min(y,this._fixedItemCount,Math.ceil(n/S));if(this._fixedHeight=0,y>0){F.push(M),L.push(O);for(var V=k,A=0;A0&&M=this._fixedItemCount&&zn?1:0)}v&&c.forEach((function(t){t&&t.$_resetHeights(L,P)})),a.Utils.ieOld&&c.forEach((function(t){t&&t.$_resetCellStyleHeights(L,P)})),this._fixedItemPoints=F,this._itemPoints=W,this._fixedTableRowPoints=L,this._tableRowPoints=P,this._dataBounds.height=W[W.length-1];var Y=this._items.length=this.fixedItemCount+this._itemCount;c.forEach((function(t){t&&t.cleanRows(Y,k)}))}},d.prototype.$_adjustTableRowHeights=function(){if(this.fixedItemCount+this._itemCount!=0){for(var t=this._items,e=this._trs,i=this._fixedTableRowPoints,o=this._fixedTableItemPoints=[0],n=0,r=1,s=this._fixedItemCount;r<=s;r++,n++)o.push(i[r*e]);i=this._tableRowPoints,o=this._tableItemPoints=[i[0]];r=0;var a=0;for(s=this._itemCount;r=0;)a++;this._topIndex=Math.max(0,this._topIndex-a),this.$_calcItemPoints(!1),this._prepareItems(this._autoRowHeights),this.$_calcTableRowPoints(),this.$_layoutBodyRows(t,e,i,o,n),this.$_adjustTableRowHeights()},d.prototype.$_fillBottomAuto=function(t,e,i,o,n){for(;this._topIndex>0&&this._gridBounds.bottom-this._contentBounds.y-this._dataBounds.bottom>this._minItemHeight;){var r=this._tableItemPoints,s=r[1]-r[0];if(this._topIndex--,this.$_calcItemPoints(!1),this._prepareItems(this._autoRowHeights),this.$_calcTableRowPoints(),this.$_layoutBodyRows(t,e,i,o,n),this.$_adjustTableRowHeights(),s+(r=this._tableItemPoints)[r.length-1]+this._contentBounds.y+this._dataBounds.y>this._gridBounds.bottom){this._topIndex++,this.$_calcItemPoints(),this._prepareItems(this._autoRowHeights),this.$_calcTableRowPoints(),this.$_layoutBodyRows(t,e,i,o,n),this.$_adjustTableRowHeights();break}}},d.prototype.$_prepareColumnMerges=function(t,e,i,o){for(var r=this._fixedItemCount,s=this._itemCount,a=!1,l=0,h=t.length;l0&&i.mergeRows,a=e?o:o+r,l=e?t.itemCount-1:Math.min(t.itemCount-1,o+r+n-1);l>=0&&this.$_prepareColumnMerges(t.getHorzColumns(),a,l,s)},d}(e.Base);return Ur.GridLayoutManager=c,Ur}var Gr,Wr,jr={},zr={};function Yr(){if(Gr)return zr;Gr=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.SummaryElement=zr.SummaryTableCell=void 0;var t=d,e=xr(),i=Tr(),o=dn(),n=S(),r=rn(),s=ft(),a=rt(),l=lt(),h=Qo(),u=Ar(),c=Oo(),p=function(e){function i(t){var i=e.call(this,t)||this;return i.summaryIndex=0,i.rowIndex=-1,i.rendererClass="",i.style=new r.ColumnSummaryStyle,i.html=void 0,i.text=t[n.Utils.TextProp],i}return t.__extends(i,e),i.prototype.dispose=function(){e.prototype.dispose.call(this),this.layout=null,this.renderCallback=null},i.prototype.span=function(){this.spanned=!0,this.clear(!1)},i.prototype.clear=function(t){e.prototype.clear.call(this,t);var i=this.cell.firstElementChild;return this.className&&(this.cell.className=this.className=""),this.rendererClass&&(i.className=this.rendererClass=""),this.text&&(i[n.Utils.TextProp]=this.text=""),this.html&&(i.innerHTML=this.html="",this.renderCallback=null),this},i.prototype.refreshFormatters=function(t){var e;this.textFormatter=null,this.numberFormatter=null,this.datetimeWriter=null,this.booleanFormatter=null,(e=t.textFormat)&&(this.textFormatter=h.TextFormatter.getFormatter(e)),(e=t.numberFormat)&&(this.numberFormatter=s.DecimalFormatter.getFormatter(e)),(e=t.datetimeFormat)&&(this.datetimeWriter=a.DateTimeWriter.getFormatter(e)),(e=t.booleanFormat)&&(this.booleanFormatter=l.BooleanFormatter.getFormatter(e)),this.prefix=t.prefix,this.suffix=t.suffix,this.text=t.text},i.prototype.setText=function(t){t!==this.displayText&&(this.cell.firstElementChild[n.Utils.TextProp]=(this.displayText=t)||"",this.renderCallback=null)},i.prototype.setHtml=function(t,e){if(t!==this.html){var i=this.cell.firstElementChild;return i.innerHTML=(this.html=t)||"",this.renderCallback=e&&(0,c.attachTemplateEvent)(i,e),!0}},i.prototype.setClassName=function(t){return t!=this.className&&(this.cell.className=this.className=t,!0)},i.prototype.setRendererClassName=function(t){t!=this.rendererClass&&(this.cell.firstElementChild.className=this.rendererClass=t)},i}(u.TableCell);zr.SummaryTableCell=p;var _=function(i){function r(t,e,o){var n=i.call(this,t,e,o)||this;return n._rowPoints=[],n._cells=[],n}return t.__extends(r,i),r.prototype._doDispose=function(){i.prototype._doDispose.call(this)},r.prototype.tableCellByCell=function(t){for(var e=0;e0){for(var y=0;y0?(l+=m[w],h.push(l),C+=m[w]):d[w]?(l+=Math.round(d[w]*(g/c)),h.push(l),C+=Math.round(d[w]*(g/c))):(l+=v,h.push(l),C+=v);l+=g-C,h.push(l),u+=g}return e.Size.create(i,u)},r.prototype.$_refreshHeadTitle=function(t,e){for(var i=this._cells[0],o=e.children[0],r=0;o&&r0?v*e:y.rowspan||1,w=y.colspan||1;d.set(w,C,!0);for(var x=0;x0){var E=0,S=c.vindex+1;if(_)for(;E++1&&(d.height=s[d.rowIndex+d.rowSpan]-s[d.rowIndex],d.cell.firstElementChild.style.maxHeight=d.height-2+"px")}}},r.prototype._doPrepareTableRow=function(t,e,o,n){i.prototype._doPrepareTableRow.call(this,t,e,o,n)},r}(i.SimpleTableElement);return zr.SummaryElement=_,zr}function qr(){if(Wr)return jr;Wr=1,Object.defineProperty(jr,"__esModule",{value:!0}),jr.RightFooterElement=jr.FixedFooterElement=jr.FooterElement=void 0;var t=d,e=function(e){function i(t,i){return e.call(this,t,i,"footerView")||this}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},i.prototype._getCssSelector=function(){return"rg-footer"},i.prototype._getRendererStyle=function(){return"rg-footer-renderer"},i.prototype._getSummaryRows=function(t){return t.dataRows},i.prototype._getCollection=function(){return this.model},i.prototype._getSummaryHeight=function(t){return t.footerHeight},i.prototype._getSummaryCount=function(t){return t.footerCount},i.prototype._getSpanOf=function(t,e){return t.getFooterSpan(e)},i.prototype._getUserSpanOf=function(t,e){return t.getFooterUserSpan(e)},i.prototype._getTableRowCount=function(t){return t.dataRows*t.footerCount},i.prototype._getSummaryItem=function(t,e){return t.firstColumn.footers.get(e)},i}(Yr().SummaryElement);jr.FooterElement=e;var i=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(i,e),i.prototype._getCssSelector=function(){return"rg-fixed-footer"},i.prototype._getExplicitWidth=function(t){return t.fixedWidth-t.fixedBarWidth},i.prototype._getFirstCell=function(t){return this._getStartCell(t)},i.prototype._getLastCell=function(t){return this._getEndCell(t)},i.prototype._getStartCell=function(t){return 0},i.prototype._getEndCell=function(t){return t.fixedCellCount-1},i.prototype._getCellCount=function(t){return t.fixedCellCount},i.prototype._getCellWidth=function(t,e){return t.getFixedCellWidth(e)},i}(e);jr.FixedFooterElement=i;var o=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(i,e),i.prototype._getCssSelector=function(){return"rg-fixed-footer"},i.prototype._getFirstCell=function(t){return this._getStartCell(t)},i.prototype._getLastCell=function(t){return this._getEndCell(t)},i.prototype._getStartCell=function(t){return t.cellCount-t.rightCellCount},i.prototype._getEndCell=function(t){return t.cellCount-1},i.prototype._getCellCount=function(t){return t.rightCellCount},i.prototype._getCellWidth=function(t,e){return t.getRightCellWidth(e)},i}(e);return jr.RightFooterElement=o,jr}var Xr,Kr={},Zr={};function Jr(){if(Xr)return Zr;Xr=1,Object.defineProperty(Zr,"__esModule",{value:!0}),Zr._gk=Zr.$_instanceOf=void 0;return Zr.$_instanceOf=function(t,e){return"object"==typeof t&&Object.prototype.toString.call(t).indexOf(e)>=0},Zr._gk="dkdl",Zr}var Qr,ts={},es={};function is(){if(Qr)return es;Qr=1,Object.defineProperty(es,"__esModule",{value:!0}),es.DragTracker=void 0;var t=d,e=function(e){function i(t,i){var o=e.call(this)||this;return o._active=!1,o._completed=!1,o._dragging=!1,o._currentX=0,o._currentY=0,o._container=t,o._name=i,o}return t.__extends(i,e),_dp(i,"container",{get:function(){return this._container}}),_dp(i,"name",{get:function(){return this._name}}),_dp(i,"active",{get:function(){return this._active}}),_dp(i,"dragging",{get:function(){return this._dragging}}),_dp(i,"startWhenCreated",{get:function(){return!1}}),_dp(i,"completed",{get:function(){return this._completed}}),_dp(i,"linkable",{get:function(){return!1}}),_dp(i,"clickable",{get:function(){return!1}}),_dp(i,"scrollable",{get:function(){return!1}}),i.prototype.activate=function(){this._active||(this._doActivate(),this._active=!0)},i.prototype.deactivate=function(){this._active&&(this.cancel(),this._doDeactivate(),this._active=!1)},i.prototype.start=function(t,e,i,o){return void 0===o&&(o=null),this.cancel(),!(!this._active||!this._doStart(t,e,i,o))&&(this._currentX=this._startX=e,this._currentY=this._startY=i,this._dragging=!0,this._completed=!1,this._showFeedback(e,i),!0)},i.prototype.drag=function(t,e,i,o){return!(!this._dragging||(this._currentX=e,this._currentY=i,!this._doDrag(t,e,i,o)))&&(this._moveFeedback(e,i),!0)},i.prototype.cancel=function(){try{if(this._dragging)try{this._dragging=!1,this._doCanceled(this._currentX,this._currentY)}finally{this._doEnded()}}finally{this._hideFeedback()}},i.prototype.drop=function(t,e,i,o){try{if(this._dragging)try{this._currentX=e,this._currentY=i,this._dragging=!1,this._canAccept(t,e,i,o)?(this._doCompleted(t,e,i,o),this._completed=!0):this._doCanceled(e,i)}finally{this._doEnded()}}finally{this._hideFeedback()}},i.prototype.getRequest=function(){return null},i.prototype.getNextRequest=function(t,e){return null},i.prototype.init=function(t,e,i){this._doInit(t,e,i)},_dp(i,"currentX",{get:function(){return this._currentX}}),_dp(i,"currentY",{get:function(){return this._currentY}}),i.prototype._showFeedback=function(t,e){},i.prototype._moveFeedback=function(t,e){},i.prototype._hideFeedback=function(){},i.prototype._doActivate=function(){},i.prototype._doDeactivate=function(){},i.prototype._doStart=function(t,e,i,o){return!0},i.prototype._doDrag=function(t,e,i,o){return!0},i.prototype._doCanceled=function(t,e){},i.prototype._canAccept=function(t,e,i,o){return!0},i.prototype._doCompleted=function(t,e,i,o){},i.prototype._doEnded=function(){},i.prototype._doInit=function(t,e,i){},i}(G().Base);return es.DragTracker=e,es}var os,ns,rs,ss,as,ls,hs={},us={},ds={},cs={};function ps(){return os||(os=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DataDropOptions=t.DragFeedbackStyle=t.DataDropMode=void 0;var e,i,o=d,n=_r(),r=_t(),s=Ct();!function(t){t.COPY="copy",t.MOVE="move"}(e=t.DataDropMode||(t.DataDropMode={})),function(t){t.LINE="line",t.ROW="row",t.CELL="cell",t.GROUP="group"}(i=t.DragFeedbackStyle||(t.DragFeedbackStyle={}));var a=function(t){function n(o){var n=t.call(this,o)||this;return n._dropMode=e.COPY,n._feedbackStyle=i.LINE,n._scroll=!0,n._cursor="move",n._dropOtherElement=!1,n._dropOtherGrid=!0,n.assignFrom(s.DefaultOptions.dataDrop),n}return o.__extends(n,t),n.prototype._doDispose=function(){t.prototype._doDispose.call(this)},_dp(n,"dragCallback",{get:function(){return this._dragCallback},set:function(t){this._dragCallback=t}}),_dp(n,"callback",{get:function(){return this._callback},set:function(t){this._callback=t}}),_dp(n,"dropMode",{get:function(){return this._dropMode},set:function(t){this._dropMode=t}}),_dp(n,"feedbackStyle",{get:function(){return this._feedbackStyle},set:function(t){this._feedbackStyle=t}}),_dp(n,"fieldMap",{get:function(){return this._fieldMap},set:function(t){this._fieldMap=t}}),_dp(n,"fieldMapCallback",{get:function(){return this._fieldMapCallback},set:function(t){this._fieldMapCallback=t}}),_dp(n,"proxyLabel",{get:function(){return this._proxyLabel||r.Messages.messages.dataDropProxyLabel},set:function(t){this._proxyLabel=t}}),_dp(n,"labelCallback",{get:function(){return this._labelCallback},set:function(t){this._labelCallback=t}}),_dp(n,"scroll",{get:function(){return this._scroll},set:function(t){this._scroll=t}}),_dp(n,"cursor",{get:function(){return this._cursor},set:function(t){this._cursor=t}}),_dp(n,"dropOtherElement",{get:function(){return this._dropOtherElement},set:function(t){this._dropOtherElement=t}}),_dp(n,"dropOtherGrid",{get:function(){return this._dropOtherGrid},set:function(t){this._dropOtherGrid=t}}),n.prototype.getEnabled=function(t,e,i,o,n,r){if(!this.dropOtherElement&&r||this.grid!==t&&!t.dataDropOptions.dropOtherGrid)return!1;var s=this._dragCallback;if(s)return!1!==s(t.handler,e,r||this.grid.handler,i.index,i.column);if(this.grid===t&&!r){var a=t.layoutManager;return(n-=a.contentBounds.y)<=a.footerBounds.y&&n>=a.summaryBounds.bottom}return!0},n.prototype.getLabel=function(t,i,o,n){var s=this._labelCallback,a=void 0;return s&&(a=s(t.handler,i,n||this.grid.handler,o.index,o.column)),void 0===a&&this.proxyLabel&&(a=(a=(a=(a=this.proxyLabel.replace("${rows}",i.length+"")).replace("${mode}",t==this.grid||this.dropMode==e.MOVE?r.Messages.messages.dataDropModeMove:r.Messages.messages.dataDropModeCopy)).replace("${from}",i[0]+"")).replace("${to}",o.index+"")),a},n}(n.GridBaseOptions);t.DataDropOptions=a}(cs)),cs}function _s(){if(ns)return ds;ns=1,Object.defineProperty(ds,"__esModule",{value:!0}),ds.RowMoveTracker=ds.HeaderResizeTracker=ds.RowResizeTracker=ds.ColumnMoveTracker=ds.ColumnResizeTracker=ds.GridDragTracker=void 0;var t=d,e=is(),i=zn(),o=S(),n=ps(),r=function(e){function i(t,i){var o=e.call(this,t.container,i)||this;return o._grid=t,o}return t.__extends(i,e),i.prototype._doDispose=function(){this._grid=null,e.prototype._doDispose.call(this)},_dp(i,"grid",{get:function(){return this._grid}}),_dp(i,"startWhenCreated",{get:function(){return!1}}),i}(e.DragTracker);ds.GridDragTracker=r;var s=function(e){function i(t,i){var o=e.call(this,t.layout.grid,"columnResizeTracker")||this;o._request=t,o._feedback=i;var n=t.layout;return o._layoutX=t.x-n.domWidth,o._offset=t.offset,o}return t.__extends(i,e),i.prototype._doDispose=function(){this._request=null,this._feedback=null,e.prototype._doDispose.call(this)},i.prototype.getRequest=function(){return this._request},i.prototype._doStart=function(t,e,i,o){var n=this.grid.layoutManager,r=n.contentBounds.y,s=n.contentBounds.bottom;return this._feedback.resize(2,s-r),this._feedback.move(e-this._offset,r),this.grid.addFeedbackElement(this._feedback),!0},i.prototype._doDrag=function(t,e,i,o){var n=this.grid.displayOptions.minCellWidth;return e>=this._layoutX+n&&e0?l:e-h.x,this._feedback.setBounds(h.x,h.y,i.WING_SIZE,h.height)):(this._offset=l>0?l:o-h.y,this._feedback.setBounds(h.x,h.y,h.width,i.WING_SIZE)),this._request.offset=this._offset,this._feedback.visible=!1,this._cellFeedback.setBounds(h.x,h.y,h.width,h.height),this._cellFeedback.model=r.header.getCell(this._layout),this._cellFeedback.dragging=!1,r.addFeedbackElement(this._cellFeedback),r.addFeedbackElement(this._feedback);var u=this._feedback._dom.style;return u.borderLeft=u.borderRight=u.borderTop=u.borderBottom="",!0},i.prototype._doDrag=function(t,e,i,n){var r=this.grid,s=this._layout.parent,a=this.grid.layoutManager;if(ia.clientRect.right)this.$_startTimer();else{this.$_stopTimer();var l=a.getHeaderCellAt(e,i),h=this.$_findTarget(l);o.Utils.log("MOVE: ",this._layout.displayText+" => "+(null==h?void 0:h.displayText)),h&&!r.canMoveToLayout(h)&&(h=null),this.$_setTarget(h),this._cellFeedback.dragging=!0,s.horizontal?this._cellFeedback.x=e-this._offset:this._cellFeedback.y=i-this._offset}return!0},i.prototype._doCanceled=function(){this.$_stopTimer()},i.prototype._doCompleted=function(){this.$_stopTimer(),this._target&&(this._layout.vindex=this._target.vindex,this._layout.owner.setMoveColumn(this._layout))},i.prototype._doEnded=function(){this.$_stopTimer(),this.grid.removeFeedbackElement(this._feedback),this.grid.removeFeedbackElement(this._cellFeedback)},i.prototype.getNextRequest=function(t,e){return this.grid.activeTool.getNextRequest(this._request,this._cellFeedback,t,e)},i.prototype.$_startTimer=function(){this._timer||(this._colLoop=this._colPrevLoop=0,this._timer=setInterval(this.$_timerHandler.bind(this),60))},i.prototype.$_stopTimer=function(){this._timer&&(clearInterval(this._timer),this._timer=null)},i.prototype.$_timerHandler=function(){var t=this._grid,e=this.currentX,i=t.layoutManager,o=0;e>i.clientRect.right?(o=Math.max(0,Math.min(3,(e-i.clientRect.right)/40)),this._interval=4-o,this._colLoop++):e0&&(this._interval=4-o),this._colLoop-this._colPrevLoop>=2*this._interval&&(this._colPrevLoop=this._colLoop,e>i.clientRect.right?t.leftCell+=1:e0&&(t.leftCell-=1)),this.$_setTarget(null)},i.prototype.$_findTarget=function(t){if(t)for(var e=this._layout.parent;t;){if(t.parent===e)return t;t=t.parent}},i.prototype.$_setTarget=function(t){var e=this._request.layout,i=e.parent,o=this._feedback,n=o._dom.style,r=this.grid.layoutManager;if(this.currentX,this.currentY,this._target=t,o.visible=null!=t&&t.parent===i&&t!==e){var s=r.getHeaderCellRect(t,!0);if(i.horizontal){var a=e.hcol;n.height=s.height+"px",t.hcola&&(n.borderLeft="none",n.borderRight="",o.x=s.right-o.width)}else{var l=e.row;n.width=s.width+"px",t.rowl&&(n.borderTop="none",n.borderBottom="",o.y=s.bottom-o.height)}}},i.WING_SIZE=7,i}(r);ds.ColumnMoveTracker=a;var l=function(e){function i(t,i){var o=e.call(this,t.grid,"rowResizeTracker")||this;return o._request=t,o._feedback=i,o}return t.__extends(i,e),i.prototype._doDispose=function(){this._request=null,this._feedback=null,e.prototype._doDispose.call(this)},i.prototype.getRequest=function(){return this._request},i.prototype._doStart=function(t,e,i,o){var n=this.grid.layoutManager,r=n.leftContentBounds.x,s=n.rightContentBounds.right;return this._feedback.resize(s-r,2),this._feedback.move(r,i-this._request.offset),this.grid.addFeedbackElement(this._feedback),!0},i.prototype._doDrag=function(t,e,i,o){return i-this._request.offset-this._request.rowTop>=this.grid.displayOptions.minRowHeight&&(this._feedback.y=i-this._request.offset,!0)},i.prototype._doCompleted=function(t,e,i,o){var n=this.grid,r=n.displayOptions,s=Math.max(r.minRowHeight,i-this._request.offset-this._request.rowTop);(s=0===r.maxRowHeight?s:Math.min(r.maxRowHeight,s))>=n.layoutManager.bodyBounds.height&&(s=n.layoutManager.bodyBounds.height-1),this._request.variable?n.setRowHeight(this._request.itemIndex,s):r.rowHeight=s},i.prototype._doEnded=function(){this.grid.removeFeedbackElement(this._feedback)},i}(r);ds.RowResizeTracker=l;var h=function(e){function i(t,i){var o=e.call(this,t.grid,"rowResizeTracker")||this;return o._request=t,o._feedback=i,o}return t.__extends(i,e),i.prototype._doDispose=function(){this._request=null,this._feedback=null,e.prototype._doDispose.call(this)},i.prototype.getRequest=function(){return this._request},i.prototype._doStart=function(t,e,i,o){var n=this.grid.layoutManager,r=n.leftContentBounds.x,s=n.rightContentBounds.right;return this._feedback.resize(s-r,2),this._feedback.move(r,i-this._request.offset),this.grid.addFeedbackElement(this._feedback),!0},i.prototype._doDrag=function(t,e,i,o){return i-this._request.offset-this._request.top>=this.grid.header.minHeight&&(this._feedback.y=i-this._request.offset,!0)},i.prototype._doCompleted=function(t,e,i,o){var n=this.grid.header,r=Math.max(n.minHeight,i-this._request.offset-this._request.top);n.height=r},i.prototype._doEnded=function(){this.grid.removeFeedbackElement(this._feedback)},i}(r);ds.HeaderResizeTracker=h;var u=function(e){function r(t,i,o){var n=e.call(this,t.grid,"rowMoveTracker")||this;return n._timer=null,n._request=t,n._proxy=i,n._line=o,n}return t.__extends(r,e),r.updateLineFeedback=function(t,e,i,r,s,a,l,h,u){var d={index:-1,position:0,column:void 0};if(a<0||l<-20||a>=t.width||l>=t.height+20)return s.visible=!1,d;var c=s.feedbackStyle=t.dataDropOptions.feedbackStyle,p=t.layoutManager,_=p.defaultItemHeight;l-=p.contentBounds.y;var f=0,g=p.contentBounds.right,m=-1,y=-1,v=0,C=2,w=t.cellToIndex(u),x=!1,b=o.Utils.included(c,n.DragFeedbackStyle.CELL,n.DragFeedbackStyle.GROUP);if(l=p.footerBounds.y)y=p.topIndex+p.fullItemCount,m=p.getTableItemBottom(p.fullItemCount);else{var I=l-p.summaryBounds.bottom,E=p.getTableItemIndex(I);E<0&&p.itemCount>0&&(E=(Number.MAX_VALUE,p.itemCount-1));var S=p.getTableItemHeight(E);if((y=E)>=p.fixedItemCount&&(y+=p.topIndex),y!=e||b){var R=p.getTableItemTop(E);if(c===n.DragFeedbackStyle.ROW){m=R||0,C=S||_;var T=Math.floor(S/3);IR+2*T&&(v=1)}else if(c===n.DragFeedbackStyle.GROUP){if(w&&t.isValid(w)){var D=p.getDataRect(w.layout.root),k=w.layout.root.first;C=S,m=R,g=(f=D.x)+D.width,d.column=k.getDataColumn().name,x=k!==i}}else if(c===n.DragFeedbackStyle.CELL){if(w&&t.isValid(w)){var M=p.getBodyView(w);m=(D=M.getCellRectAt(p,w,!0)).y,C=(D=M.boundsByContainer(D)).height,g=(f=D.x)+D.width,x=w.layout!==i,d.column=w.layout.getDataColumn().name}}else Ie&&(y=Math.max(p.topIndex,y-1)),v=-1):((m=E>-1?p.getTableItemBottom(E):h?0:-1)>=0&&ye?y>e+r-1:(y>=0||c===n.DragFeedbackStyle.ROW)&&(y!=e||x),s.visible?(s.resize(g-f,C),0==t.itemCount&&c!==n.DragFeedbackStyle.ROW&&(m+=_),s.move(f,m)):y=-1,t.dataDropOptions.scroll&&(l=p.footerBounds.y&&t.topIndex++),d.index=y,d.position=v,d},r.prototype._doDispose=function(){this._request=null,this._proxy=null,this._line=null,e.prototype._doDispose.call(this)},_dp(r,"request",{get:function(){return this._request}}),_dp(r,"sourceItems",{get:function(){return this._sourceItems}}),r.prototype.setEnabled=function(t){this._proxy.setEnabled(t)&&this._proxy.draw()},r.prototype.setLabel=function(t){this._proxy.setLabel(t)&&this._proxy.draw()},_dp(r,"startWhenCreated",{get:function(){return!1}}),_dp(r,"linkable",{get:function(){return!0}}),r.prototype.getRequest=function(){return this._request},r.prototype._doStart=function(t,e,r,s){var a=this.grid,l=(0,o.getDoc)(t),h=a.selections.count;if(this._sourceItems=[],0===h||(0,i.isColumnSelection)(a.selections.getItem(0)))if(a.displayOptions.selectionStyle===i.SelectionStyle.NONE)a.selections.selectBlock(a.focusedIndex,!0);else switch(a.dataDropOptions.feedbackStyle){case n.DragFeedbackStyle.LINE:case n.DragFeedbackStyle.ROW:a.selections.selectRow(this._request.itemIndex,!0);break;case n.DragFeedbackStyle.CELL:case n.DragFeedbackStyle.GROUP:a.selections.selectBlock(a.focusedIndex,!0)}if(a.selections.count>=1){this._sourceItems=a.selections.getItem(0).getItemIndices(),l.body.appendChild(this._proxy._dom),a.addFeedbackElement(this._line);var u=this.$_updateLine(e,r,t);return this._proxy.setZIndex(a.displayOptions.baseZindex+6),this.$_updateProxy(e,r,u,t),!0}return!1},r.prototype._doDrag=function(t,e,i,o){var n=this.grid.layoutManager;t=this.$_getTarget(o,t);var r=this.$_updateLine(e,i,t);return this.$_updateProxy(e,i,r,t),(i-=n.contentBounds.y)>n.footerBounds.y||i=0&&(l=a.canMoveRow(!0,!1)&&a.dataDropOptions.getEnabled(a,this._sourceItems,s,e,i)):l=a.canMoveRow(!1,!0)&&a.dataDropOptions.getEnabled(a,this._sourceItems,s,e,i,t),l){var u=this._request.itemIndex,d=a.dataDropOptions.callback;if(d)h?d(a.handler,this._sourceItems,a.handler,s.index,s.column):d(a.handler,this._sourceItems,t,null,null);else if(h===a.container){var c=s.index>u?s.index-(u+this._sourceItems.length-1):s.index-u,p=a.dataDropOptions.feedbackStyle;o.Utils.included(p,n.DragFeedbackStyle.CELL,n.DragFeedbackStyle.GROUP)||a.moveSelection(c,"mouseup")}}},r.prototype._doCanceled=function(t,e){},r.prototype._doEnded=function(){this.$_stopTimer(),this.grid.removeFeedbackElement(this._line),o.Utils.detach(this._proxy._dom)},r.prototype.$_getTarget=function(t,e){var i;if(o.Utils.isMobile()){var n=(0,o.getDoc)(t.target);i=n&&n.elementFromPoint(t.clientX,t.clientY)}return i||e},r.prototype.$_updateLine=function(t,e,i){return this._targetRow=r.updateLineFeedback(this.grid,this._request.itemIndex,this._request.layout,this._sourceItems.length,this._line,t,e,!1,i)},r.prototype.$_updateProxy=function(t,e,i,n){var r=this.grid,s=r.container.findContainer(null,n),a=s!==r.container,l=o.Utils.getOffset(r.container._containerDom);l.y+=e,l.x+=t+20;var h=!0;if(!a)for(var u=r.selections.getItem(0).getItems(),d=u[0].level,c=1,p=u.length;c=0),!a||!s){var _=r.dataDropOptions.getLabel(r,this._sourceItems,i,!s&&n);this._proxy.setLabel(_)}return this._proxy.draw(),h},r.prototype.$_startTimer=function(){this._timer||(this._timer=setInterval(this.$_timerHandler.bind(this),100))},r.prototype.$_stopTimer=function(){this._timer&&(clearInterval(this._timer),this._timer=null)},r.prototype.$_timerHandler=function(){var t=this.currentX,e=this.currentY;this.$_updateLine(t,e,null)},r}(r);return ds.RowMoveTracker=u,ds}function fs(){if(rs)return us;rs=1,Object.defineProperty(us,"__esModule",{value:!0}),us.ColumnsSelectTracker=us.RowsSelectTracker=us.BlockSelectTracker=us.SelectTracker=void 0;var t=d,e=zn(),i=_s(),o=cn(),n=S(),r=function(e){function i(t,i,o,n){var r=e.call(this,t.index.grid,i)||this;return r._request=t,r._currX=o,r._currY=n,r}return t.__extends(i,e),i.prototype._doDispose=function(){this._request.dispose(),this._request=null,e.prototype._doDispose.call(this)},_dp(i,"startWhenCreated",{get:function(){return!1}}),_dp(i,"clickable",{get:function(){return!0}}),_dp(i,"scrollable",{get:function(){var t=this._getItem().getBounds();return t.top===t.bottom}}),i.prototype.getRequest=function(){return this._request},i.prototype._doCanceled=function(){},i.prototype._doEnded=function(){var t=this._getItem();this.grid.selections.$_ended(t)},i.prototype.spanHome=function(t){var e=this.grid;e.getBodyViewAt(t).spanHead(e.layoutManager,t)},i.prototype.spanRight=function(t){var e=this.grid;e.getBodyViewAt(t).spanRight(e.layoutManager,t)},i.prototype.immediateDrag=function(t){var e=this.grid;return e.displayOptions.selectAndImmediateDrag||e.displayOptions.altSelectAndImmediateDrag&&t.altKey},i}(i.GridDragTracker);us.SelectTracker=r;var s=function(i){function r(t,e,o){var n=i.call(this,t,"blockSelectTracker",e,o)||this;return n._timer=null,n._rowPrevLoop=0,n._rowLoop=0,n._colPrevLoop=0,n._colLoop=0,n._interval=0,n}return t.__extends(r,i),r.prototype._doDispose=function(){i.prototype._doDispose.call(this)},r.prototype._getItem=function(){return this._item||this.grid.selections.lastItem()},r.prototype._doStart=function(t,i,o,r){var s=this.grid,a=s.selections,l=s.layoutManager,h=r&&r.shiftKey,u=n.Utils.ctrlKey(r),d=this._request.index;if(l.isMergedCell(d)&&!(d=s.pointToIndex(t,i,o,!0)).layout)return!1;if(h)this._item=a.count>0&&a.lastItem();else{var c=void 0;u||1===a.count&&a.lastItem()instanceof e.BlockSelection?c=a.lastItem():a.clear(!0),c&&c instanceof e.BlockSelection?this._item=c:this._item=a.add(d,d,e.SelectionStyle.BLOCK,!0)}return!!this._item},r.prototype._doDrag=function(t,e,i,n){if(this._item){var r=this.grid;if(this.immediateDrag(n))return!1;var s=r.layoutManager;if(this._currX=e,this._currY=i,i-s.contentBounds.y>s.footerBounds.y||is.clientRect.right)this.$_startTimer();else{this.$_stopTimer();var a=r.pointToIndex(t,e,i,!0);a.column&&a.itemIndex>=0&&(o.CellIndex.compareHorz(a,this._item.startIndex)>=0?(this.spanRight(a),this.spanHome(this._item.startIndex)):this.spanRight(this._item.startIndex),this._item.resizeTo(a))}return!0}},r.prototype._doEnded=function(){this.$_stopTimer(),i.prototype._doEnded.call(this)},r.prototype.getNextRequest=function(t,e){return this.grid.activeTool.getNextRequest(this._request,null,t,e)},r.prototype.$_startTimer=function(){this._timer||(this._rowLoop=this._rowPrevLoop=this._colLoop=this._colPrevLoop=0,this._timer=setInterval(this.$_timerHandler.bind(this),30),this._grid.selections.lock())},r.prototype.$_stopTimer=function(){this._timer&&(clearInterval(this._timer),this._timer=null,this._grid.selections.unlock())},r.prototype.$_timerHandler=function(){var t=this._grid,e=this._currX,i=this._currY,o=t.layoutManager,n=0,r=0;i>o.footerBounds.y?(r=Math.max(0,Math.min(3,(i-o.footerBounds.y)/40)),this._interval=4-r,this._rowLoop++):io.clientRect.right?(n=Math.max(0,Math.min(3,(e-o.clientRect.right)/40)),this._interval=4-n,this._colLoop++):e0&&(this._interval=4-Math.max(n,r)),this._rowLoop-this._rowPrevLoop>=this._interval&&(this._rowPrevLoop=this._rowLoop,i>o.footerBounds.y?t.topItem+o.fullItemCounto.fixedItemCount&&(t.topIndex=t.topIndex-1,s=!0)),s||this._colLoop-this._colPrevLoop>=2*this._interval&&(this._colPrevLoop=this._colLoop,e>o.clientRect.right?(t.leftPos+=e-o.clientRect.right,s=!0):e0&&(t.leftPos-=o.gridBounds.left-e,s=!0)),s){var a=t.pointToIndex(null,e,i,!1);a.column&&(a.itemIndex=Math.min(Math.max(0,a.itemIndex,t.topIndex),t.itemCount-1),this._item.resizeTo(a))}},r}(r);us.BlockSelectTracker=s;var a=function(i){function o(t,e,o){var n=i.call(this,t,"rowsSelectTracker",e,o)||this;return n._timer=null,n._prevLoop=0,n._loop=0,n._colPrevLoop=0,n._colLoop=0,n._interval=0,n}return t.__extends(o,i),o.prototype._doDispose=function(){i.prototype._doDispose.call(this)},o.prototype._getItem=function(){return this._item||this.grid.selections.lastItem()},o.prototype._doStart=function(t,i,o,r){var s=this.grid,a=s.selections,l=s.layoutManager,h=r&&r.shiftKey,u=n.Utils.ctrlKey(r),d=this._request.index;if(l.isMergedCell(d)&&(d=s.pointToIndex(t,i,o,!0)),h)this._item=a.count>0&&a.lastItem();else{var c=void 0;u||1===a.count&&a.lastItem()instanceof e.RowSelection?c=a.lastItem():a.clear(!0),c&&c instanceof e.RowSelection?this._item=c:this._item=a.add(d,d,e.SelectionStyle.ROWS,!0)}return!!this._item},o.prototype._doDrag=function(t,e,i,o){if(this._item){var n=this.grid;if(this.immediateDrag(o))return!1;var r=n.layoutManager;if(this._currX=e,this._currY=i,i>r.footerBounds.y||ir.clientRect.right)this.$_startTimer();else{this.$_stopTimer();var s=this.grid.pointToIndex(t,e,i,!1);s.itemIndex>=0&&this._item.resizeTo(s)}return!0}return!1},o.prototype._doEnded=function(){this.$_stopTimer(),i.prototype._doEnded.call(this)},o.prototype.getNextRequest=function(t,e){return this.grid.activeTool.getNextRequest(this._request,null,t,e)},o.prototype.$_startTimer=function(){this._timer||(this._loop=this._prevLoop=this._colLoop=this._colPrevLoop=0,this._interval=1,this._timer=setInterval(this.$_timerHandler.bind(this),30),this._grid.selections.lock())},o.prototype.$_stopTimer=function(){this._timer&&(clearInterval(this._timer),this._timer=null,this._grid.selections.unlock())},o.prototype.$_timerHandler=function(){var t,e,i=this._grid,o=this._currX,n=this._currY,r=i.layoutManager;(n>r.footerBounds.y?(t=Math.max(0,Math.min(3,(n-r.footerBounds.y)/40)),this._interval=4-t,this._loop++):n=this._interval)?(this._prevLoop=this._loop,n>r.footerBounds.y?i.topIndex=i.topIndex+1:nr.clientRect.right?(t=Math.max(0,Math.min(3,(o-r.clientRect.right)/40)),this._interval=4-t,this._colLoop++):o<0&&(t=Math.max(0,Math.min(3,(r.gridBounds.x-o)/40)),this._interval=4-t,this._colLoop++),this._colLoop-this._colPrevLoop>=2*this._interval&&(this._colPrevLoop=this._colLoop,o>r.clientRect.right?i.leftLayout=i.leftLayout+1:o0&&(i.leftLayout=i.leftLayout-1),(e=i.pointToIndex(null,this._currX,this._currY,!1)).itemIndex>=0&&(e.itemIndex=Math.min(Math.max(0,e.itemIndex,i.topIndex),i.itemCount-1),this._item.resizeTo(e))))},o}(r);us.RowsSelectTracker=a;var l=function(i){function o(t,e,o){var n=i.call(this,t,"columnsSelectTracker",e,o)||this;return n._timer=null,n._prevLoop=0,n._loop=0,n._rowPrevLoop=0,n._rowLoop=0,n._interval=0,n}return t.__extends(o,i),o.prototype._doDispose=function(){i.prototype._doDispose.call(this)},_dp(o,"startWhenCreated",{get:function(){return!0}}),o.prototype._getItem=function(){return this._item||this.grid.selections.lastItem()},o.prototype._doStart=function(t,i,o,r){var s,a=this.grid,l=a.selections,h=a.layoutManager,u=r&&r.shiftKey,d=n.Utils.ctrlKey(r),c=this._request.index;return h.isMergedCell(c)&&(c=a.pointToIndex(t,i,o,!0)),u?s=l.count>0&&l.lastItem():d||1===l.count&&l.lastItem()instanceof e.ColumnSelection?s=l.lastItem():l.clear(!0),s&&l.containsLayout(c.layout,e.ColumnSelection)?this._item=s:this._item=l.add(c,c,e.SelectionStyle.COLUMNS,!0),!!this._item},o.prototype._doDrag=function(t,e,i,o){if(this._item){var n=this.grid.layoutManager;if(this._currX=e,this._currY=i,en.clientRect.right||i>n.footerBounds.y||i<0)this.$_startTimer();else{this.$_stopTimer();var r=this.grid.pointToIndex(t,e,i,!1);null!=r.column&&this._item.resizeTo(r)}return!0}return!1},o.prototype._doEnded=function(){this.$_stopTimer(),i.prototype._doEnded.call(this)},o.prototype.$_startTimer=function(){this._timer||(this._loop=this._prevLoop=this._rowLoop=this._rowPrevLoop=0,this._interval=1,this._timer=setInterval(this.$_timerHandler.bind(this),30),this._grid.selections.lock())},o.prototype.$_stopTimer=function(){this._timer&&(clearInterval(this._timer),this._timer=null,this._grid.selections.unlock())},o.prototype.$_timerHandler=function(){var t,e,i=this._grid,o=this._currX,n=this._currY,r=i.layoutManager;(o>r.clientRect.right?(t=Math.max(0,Math.min(3,(o-r.clientRect.right)/40)),this._interval=4-t,this._loop++):o=2*this._interval)?(this._prevLoop=this._loop,o>r.clientRect.right?i.leftLayout=i.leftLayout+1:o0&&(i.leftLayout=i.leftLayout-1),(e=i.pointToIndex(null,this._currX,this._currY,!1)).column&&this._item.resizeTo(e)):(n>r.footerBounds.y?(t=Math.max(0,Math.min(3,(n-r.footerBounds.y)/40)),this._interval=4-t,this._rowLoop++):n<0&&(t=Math.max(0,Math.min(3,(r.gridBounds.y-n)/40)),this._interval=4-t,this._rowLoop++),this._rowLoop-this._rowPrevLoop>=this._interval&&(this._rowPrevLoop=this._rowLoop,n>r.footerBounds.y?i.topIndex=i.topIndex+1:n=s||Math.abs(i-this._clickY)>=s){if(1===n)return void this._startDragTracker(e,i,t);this._stopDragTracker(e,i,!0,t),this._dragTracker=null}}this._doPointerMove(t)},n.prototype.pointerUp=function(t){var e=this,o=this._mouseX=t.mouseX,n=this._mouseY=t.mouseY;clearTimeout(this._longTimer),this._touchEvents&&this._touchEvents.push({x:t.mouseX,y:t.mouseY,t:t.timeStamp}),this.dragging?(i.Utils.isMobile()&&"pointerup"===t.type&&this._checkSwipe(t),this._stopDragTracker(o,n,!1,t),this._dragTracker&&this._dragTracker.clickable&&!this._longPressed&&this._doPointerUp(t)):(this._dragTracker&&this._dragTracker._doEnded(),this._dragTracker=null,this._doPointerUp(t)),setTimeout((function(){e._longPressed=!1}),100),this._touchEvents=[]},n.prototype.mouseEnter=function(t){this._doMouseEnter(t)},n.prototype.mouseLeave=function(t){this._doMouseLeave(t)},n.prototype.mouseOver=function(t){this._doMouseOver(t)},n.prototype.mouseOutside=function(){this._doMouseOutside()},n.prototype.mouseWheel=function(t){return this._doMouseWheel(t)},n.prototype.contextMenu=function(t){return this._doContextMenu(t)},n.prototype.click=function(t){this._doClick(t)},n.prototype.dblclick=function(t){this._doDblClick(t)},n.prototype.setFocus=function(t){this._doSetFocus(t)},n.prototype.focusLeave=function(t){this._doFocusLeave(t)},n.prototype.resetFocused=function(){},n.prototype.globalKeyup=function(t){this._doGlobalKeyup(t)},n.prototype.globalKeydown=function(t){this._doGlobalKeydown(t)},n.prototype.touchMove=function(t){return this._doTouchMove(t)},n.prototype._checkSwipe=function(t){},_dp(n,"mouseEventTarget",{get:function(){return this._mouseEventTarget}}),n.prototype.isMouseEventTarget=function(t){return t._dom===this._mouseEventTarget},n.prototype._doActivated=function(t){},n.prototype._doDeactivated=function(){},n.prototype._doKeyDown=function(t){return!1},n.prototype._doKeyUp=function(t){return!1},n.prototype._doKeyPress=function(t){return!1},n.prototype._doCopyEvent=function(t){},n.prototype._doPasteEvent=function(t){},n.prototype._doPointerDown=function(t){},n.prototype._doPointerCancel=function(t){},n.prototype._doPointerMove=function(t){},n.prototype._doPointerUp=function(t){},n.prototype._doMouseDown=function(t){},n.prototype._doMouseEnter=function(t){},n.prototype._doMouseLeave=function(t){},n.prototype._doMouseOver=function(t){},n.prototype._doMouseOutside=function(){},n.prototype._doMouseWheel=function(t){return!1},n.prototype._doContextMenu=function(t){},n.prototype._doClick=function(t){},n.prototype._doDblClick=function(t){},n.prototype._doSetFocus=function(t){},n.prototype._doFocusLeave=function(t){},n.prototype._doGlobalKeyup=function(t){},n.prototype._doGlobalKeydown=function(t){},n.prototype._getDragTracker=function(t,e,i){return null},n.prototype._startDragTracker=function(t,e,i){void 0===i&&(i=null),this._dragTracker&&(this._dragTracker.start(this._mouseEventTarget,t,e,i)?this._doDragTrackerStarted(this._dragTracker):this._dragTracker=null)},n.prototype._stopDragTracker=function(t,e,i,o){if(this.dragging){var n=this._dragTracker;i?n.cancel():n.drop(this._mouseEventTarget,t,e,o),this._doDragTrackerFinished(n,i)}},n.prototype._doDragTrackerStarted=function(t){},n.prototype._doDragTrackerFinished=function(t,e){},n.prototype._findTableCell=function(t){return this.owner.getTableCell(t||this.mouseEventTarget)},n.prototype._doTouchMove=function(t){return!0},n}(e.Base);hs.VisualTool=n;var r=function(e){function i(){return e.call(this)||this}return t.__extends(i,e),_dp(i,"cursor",{get:function(){return"default"}}),_dp(i,"source",{get:function(){}}),_dp(i,"selectable",{get:function(){return!1}}),_dp(i,"dblClickable",{get:function(){return!1}}),i}(e.Base);return hs.EditRequest=r,hs}function ms(){return as||(as=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ScrollTipView=t.ScrollTool=t.ScrollTrackTimer=t.ScrollButtonTimer=t.ScrollThumbTracker=t.ScrollBar=t.ScrollThumb=t.ScrollButton=t.ScrollTrack=t.ScrollEdge=t.ScrollElement=t.ScrollEventType=void 0;var e,i=d,o=jn(),n=is(),r=gs(),s=et(),a=G(),l=S();!function(t){t.LINE="line",t.PAGE="page",t.THUMB_TRACK="thumbTrack",t.THUMB_END="thumbEnd",t.SCROLL_END="scrollEnd"}(e=t.ScrollEventType||(t.ScrollEventType={}));var h=function(t){function e(e,i,o){var n=t.call(this,e,o)||this;return n._scrollBar=i,n}return i.__extends(e,t),e.prototype._doDispose=function(){this._scrollBar=null,t.prototype._doDispose.call(this)},_dp(e,"scrollBar",{get:function(){return this._scrollBar}}),_dp(e,"vertical",{get:function(){return this._scrollBar.vertical}}),e.prototype._doDraw=function(t){this._doRender(t)},e.prototype._doRender=function(t){},e.prototype._changed=function(){this.invalidate()},e}(o.VisualElement);t.ScrollElement=h;var u=function(t){function e(e){return t.call(this,e,null,"scrollEdgeView")||this}return i.__extends(e,t),e.prototype._getCssSelector=function(){return"rg-scrolledge"},e}(h);t.ScrollEdge=u;var c=function(t){function e(e){return t.call(this,e.doc,e,"scrollTrackView")||this}return i.__extends(e,t),e.prototype._doDispose=function(){t.prototype._doDispose.call(this)},e.prototype._getCssSelector=function(){return"rg-scrolltrack"},e}(h);t.ScrollTrack=c;var p=function(t){function e(e,i){var o=t.call(this,e.doc,e,"scrollButtonView")||this;return o._enabled=!0,o._far=i,o}return i.__extends(e,t),_dp(e,"enabled",{get:function(){return this._enabled},set:function(t){t!=this._enabled&&(this._enabled=t,this._changed())}}),_dp(e,"far",{get:function(){return this._far}}),e.prototype._getCssSelector=function(){return this.scrollBar.vertical?this._far?"rg-scroll-down":"rg-scroll-up":this._far?"rg-scroll-right":"rg-scroll-left"},e}(h);t.ScrollButton=p;var _=function(t){function e(e){return t.call(this,e.doc,e,"scrollThumbView")||this}return i.__extends(e,t),e.prototype._getCssSelector=function(){return"rg-scrollthumb"},e}(h);t.ScrollThumb=_;var f=function(t){function e(e,i){void 0===i&&(i=!1);var o=t.call(this,e.doc,"scrollBarView")||this;return o._lineScrollSize=1,o._pageScrollSize=1,o._minThumbSize=20,o._min=0,o._max=0,o._pos=0,o._page=0,o._maxPosition=0,o._buttonSize=20,o._needLayout=!0,o._tipView=null,o._container=e,o._vertical=i,o._track=new c(o),o.addChild(o._track),o._thumb=new _(o),o.addChild(o._thumb),o._nearButton=new p(o,!1),o.addChild(o._nearButton),o._farButton=new p(o,!0),o.addChild(o._farButton),o}return i.__extends(e,t),e.prototype._doDispose=function(){this._track=this._track.dispose(),this._thumb=this._thumb.dispose(),this._nearButton=this._nearButton.dispose(),this._farButton=this._farButton.dispose(),t.prototype._doDispose.call(this)},_dp(e,"container",{get:function(){return this._container}}),_dp(e,"lineScrollSize",{get:function(){return this._lineScrollSize},set:function(t){(t=Math.max(1,t))!=this._lineScrollSize&&(this._lineScrollSize=t)}}),_dp(e,"pageScrollSize",{get:function(){return this._pageScrollSize},set:function(t){(t=Math.max(1,t))!=this._pageScrollSize&&(this._pageScrollSize=t)}}),_dp(e,"minThumbSize",{get:function(){return this._minThumbSize},set:function(t){(t=Math.max(8,t))!=this._minThumbSize&&(this._minThumbSize=t,this.invalidateLayout())}}),_dp(e,"vertical",{get:function(){return this._vertical}}),_dp(e,"pos",{get:function(){return this._pos}}),_dp(e,"maxPosition",{get:function(){return this._maxPosition}}),_dp(e,"buttonSize",{get:function(){return this._buttonSize}}),_dp(e,"tipView",{set:function(t){this._tipView=t}}),e.prototype.layoutContent=function(){this._needLayout&&(this._needLayout=!1,this._doLayoutContent())},e.prototype.setProperties=function(t,e,i,o){t=Math.max(0,t),e=Math.max(t,e),this._scrollable=o,t==this._min&&e==this._max&&i==this._page||(this._min=t,this._max=e,this._page=i,this._pos=Math.min(this._max,Math.max(this._min,this._pos)),this._maxPosition=Math.max(0,this._max-this._page),this.invalidate(),this._needLayout=!0)},e.prototype.setPosition=function(t,e){void 0===e&&(e=!0),(t=Math.min(this._maxPosition,Math.max(this._min,t)))!=this._pos&&(this._pos=t,this.invalidate(),this._needLayout=!0,e&&this.layoutContent())},e.prototype.ptInTrack=function(t,e,i){var o=this.containerToElement(t,e);if(this._vertical){if(o.y>=this._nearButton.height&&o.x=this._thumb.bottom}else if(t>=this._nearButton.width&&t=this._thumb.right;return!1},e.prototype.setText=function(t){if(this._tipView&&t){this._tipView.show(),this._tipView.setText(t);var e=void 0,i=void 0;if(this._vertical){var o=this._tipView.width();e=this.x-o-5,i=this._thumb.y}else{var n=this._tipView.height();e=this._thumb.x,i=this.y-n-5}this._tipView.move(e,i)}},e.prototype._getCssSelector=function(){return this._vertical?"rg-vscrollbar":"rg-hscrollbar"},e.prototype.draw=function(){t.prototype.draw.call(this)},e.prototype._doDraw=function(t){},e.prototype._doSizeChanged=function(){this.invalidateLayout()},e.prototype.invalidateLayout=function(){this._needLayout=!0,t.prototype.invalidateLayout.call(this)},e.prototype._doLayoutContent=function(){var t=this._vertical,e=this._buttonSize,i=this.height,o=this.width,n=(t?i:o)-2*e,r=Math.min(n,Math.max(this._minThumbSize,Math.floor(n*this._page/(this._max-this._min+1)))),s=e+Math.min(n-r,Math.max(0,Math.floor((n-r)*this._pos/(this._maxPosition-this._min))));this._track.setBounds(0,0,o,i),isNaN(s)&&(s=e),t?(this._nearButton.setBounds(0,0,o,e),this._farButton.setBounds(0,i-e,o,e),r<=n&&this._thumb.setBounds(2,s,o-4,r)):(this._nearButton.setBounds(0,0,e,i),this._farButton.setBounds(o-e,0,e,i),r<=n&&this._thumb.setBounds(s,2,r,i-4)),this._thumb.visible=this._scrollable},e.prototype._doScroll=function(t,i,o){this.fireEvent(e.SCROLLED,t,i,o)},e.SCROLLED="onScrollBarScrolled",e}(o.VisualElement);t.ScrollBar=f;var g=function(t){function o(e){return t.call(this,e,"scrollThumbTracker")||this}return i.__extends(o,t),o.prototype._doDispose=function(){this._thumb=this._thumb&&this._thumb.dispose(),t.prototype._doDispose.call(this)},_dp(o,"thumb",{get:function(){return this._thumb},set:function(t){this._thumb=t}}),_dp(o,"startWhenCreated",{get:function(){return!0}}),o.prototype._doStart=function(t,e,i,o){var n=this._thumb.scrollBar,r=n.containerToElement(e,i);return n.vertical?this._offset=r.y-this._thumb.y:this._offset=r.x-this._thumb.x,l.Utils.isSlotMode()&&o instanceof PointerEvent&&t.setPointerCapture(o.pointerId),!0},o.prototype._doDrag=function(t,i,o,n){return this.$_doScroll(i,o,e.THUMB_TRACK)},o.prototype._doCompleted=function(t,i,o,n){return l.Utils.isSlotMode()&&n instanceof PointerEvent&&t.releasePointerCapture(n.pointerId),this.$_doScroll(i,o,e.THUMB_END)},o.prototype._doCanceled=function(t,e){},o.prototype._doEnded=function(){},o.prototype.$_doScroll=function(t,e,i){var o=this._thumb.scrollBar,n=o._maxPosition-o._min+1,r=o._buttonSize,s=o.containerToElement(t,e);if(o.vertical){if((a=o.height-2*r-this._thumb.height)<=0)return!1;s.y-=this._offset,s.y=(s.y-r)*n/a,o._doScroll(i,0,Math.max(Math.floor(s.y),0))}else{var a;if((a=o.width-2*r-this._thumb.width)<=0)return!1;s.x-=this._offset,s.x=(s.x-r)*n/a,o._doScroll(i,0,Math.max(Math.floor(s.x),0))}return!0},o}(n.DragTracker);t.ScrollThumbTracker=g;var m=function(t){function o(){var e=t.call(this)||this;return e._active=!1,e._timer=void 0,e._ready=!1,e}return i.__extends(o,t),_dp(o,"active",{get:function(){return void 0!==this._timer}}),o.prototype.start=function(t){this._button=t,this._scrollBar=t.scrollBar,this._active=!0,setTimeout(function(){this._ready&&(this._ready=!1,clearInterval(this._timer),this._timer=setInterval(function(){this._active&&this.$_fireEvent()}.bind(this),20))}.bind(this),300),this._ready=!0,this.$_fireEvent()},o.prototype.move=function(t,e){var i=this._button.containerToElement(t,e);this._active=this._button.containsInClient(i.x,i.y)},o.prototype.stop=function(){this._ready=!1,this._timer&&(this._timer=clearInterval(this._timer))},o.prototype.$_fireEvent=function(){var t=this._button.far?1:-1,i=e.LINE;this._scrollBar._doScroll(i,this._scrollBar.lineScrollSize*t,0)},o}(s.EventAware);t.ScrollButtonTimer=m;var y=function(t){function o(){var e=t.call(this)||this;return e._active=!1,e._timer=void 0,e._ready=!1,e._mouseX=0,e._mouseY=0,e}return i.__extends(o,t),_dp(o,"active",{get:function(){return this._active}}),o.prototype.start=function(t,e,i,o){var n=this;this._scrollBar=t,this._far=e,this._active=!0,setTimeout((function(){n._ready&&(n._ready=!1,n._timer=setInterval((function(){n._active&&n.$_fireEvent()}),50))}),300),this._ready=!0;var r=this._scrollBar.containerToElement(i,o);this._mouseX=r.x,this._mouseY=r.y,this.$_fireEvent()},o.prototype.move=function(t,e){var i=this._scrollBar.containerToElement(t,e);this._mouseX=i.x,this._mouseY=i.y,this._active=this._scrollBar.ptInTrack(i.x,i.y,this._far)},o.prototype.stop=function(){this._ready=!1,this._timer&&clearInterval(this._timer)},o.prototype.$_fireEvent=function(){var t=null,i=0,o=this._scrollBar._thumb;if(this._scrollBar.vertical){var n=this._mouseY;this._far&&n>o.bottom?(t=e.PAGE,i=1):!this._far&&no.right?(i=1,t=e.PAGE):r0)throw new Error(l.Messages.messages.gridElementAttachFail);s.requestAnimationFrame=s.requestAnimationFrame||function(t){return s.setTimeout(t,10)},s.cancelAnimationFrame=s.cancelAnimationFrame||function(t){s.clearTimeout(t)};var h=this._containerDom=r.createElement("div");this._container=this._containerDom;var u=h.style;this._cursor=u.cursor,this._containerDiv.appendChild(h),h.setAttribute("tabindex","0"),u.position="relative",u.width="100%",u.height="100%",u.boxSizing="border-box",u.overflow="hidden",u["-webkit-touch-callout"]="none",u["-webkit-user-select"]="none",u["user-select"]="none",u["-webkit-tap-highlight-color"]="rgba(0, 0, 0, 0)",this._rootElement=this._createRootElement(r),this._measurer=r.createElement("div"),this._measurer.setAttribute("inert",""),this._container.appendChild(this._measurer);var d=this._textMeasurer=r.createElement("span");d.setAttribute("inert",""),d.style.position="absolute",d.style.left="-10000px",d.style.top="-10000px",d.style.display="block",this._container.appendChild(d);var c=this._checkMeasurer=r.createElement("input");c.type="checkbox",c.title="grid check measurer",c.tabIndex=-1,c.setAttribute("inert",""),c.style.position="absolute",c.style.left="-1000px",c.style.top="-11000px",c.style.display="block",this._container.appendChild(c),this._doPrepareContainer(h,i,o)},o.prototype._doPrepareContainer=function(t,e,i){},o.prototype._createRootElement=function(t){var e=new h(t,"root",this);return this._containerDom.appendChild(e._dom),e},o.prototype.isLayoutNeeded=function(){return this._layoutNeeded},o.prototype.invalidateLayout=function(){this._layoutNeeded||(this._layoutNeeded=!0,this.invalidate(!0))},o.prototype.cancelRequestAnimation=function(){var t=(0,n.getDocWin)(this._doc);this._requestTimer&&t.cancelAnimationFrame(this._requestTimer)},o.prototype.invalidate=function(t){var e=(0,n.getDocWin)(this._doc);this._updateRequested&&this._invalidated||!t&&this._drawing||(this._requestTimer||(this._requestTimer=e.requestAnimationFrame(this._containerRender)),this._updateRequested=!0,this._invalidated=!0)},o.prototype.invalidateElement=function(t){var e=(0,n.getDocWin)(this._doc);this._drawing||this._updateRequested||(this._requestTimer||(this._requestTimer=e.requestAnimationFrame(this._containerRender)),this._updateRequested=!0)},o.prototype._render=function(t){if(!this.disposing){this._updateRequested=!1,this._drawing=!0;try{this._doBeforeRender(),this.$$_render(t)}finally{this._drawing=!1,this._invalidated=!1,this._requestTimer=null,this._doAfterRender()}}},o.prototype.$$_render=function(t){var e=this._containerDom,i=isNaN(this._testWidth)?e.clientWidth:this._testWidth,o=isNaN(this._testHeight)?e.clientHeight:this._testHeight;if(this._layoutChildren(new r.Rectangle(0,0,i,o)),this._layoutNeeded)try{this._doLayout(new r.Rectangle(0,0,i,o))}finally{this._layoutNeeded=!1}else this._doPrepareRender(new r.Rectangle(0,0,i,o));this._doRenderHtml(new r.Rectangle(0,0,i,o))},o.prototype._doLayout=function(t){},o.prototype._doAfterRender=function(){},o.prototype._doPrepareRender=function(t){},o.prototype._doRenderHtml=function(t){this._doDrawContainer(t),this._drawElement(this._rootElement),this._validateChildren(this._rootElement)},o.prototype._doDrawContainer=function(t){},o.prototype._drawElement=function(t){t.draw();for(var e=0,i=t.childCount;e=0&&this._positionListener.splice(e,1)},o.prototype._keyDownHandler=function(t){var e=this;if(this._isEnabled()&&this.$_checkKeyElement(t)){var i=t.code;if(n.Utils.isMobile()&&n.Utils.ctrlKey(t)&&n.Utils.included(i,"KeyC","KeyX","KeyV")){var o=document.createElement("input");o.style.position="absolute",o.style.width="0px",o.style.height="0px",o.style.top="-1000px",o.readOnly=!0,this._containerDom.appendChild(o),o.value="test",o.focus({preventScroll:!0}),o.select(),n.Utils.isiOS&&(t.preventDefault(),"KeyC"===i?document.execCommand("copy"):"KeyX"===i?document.execCommand("cut"):"KeyV"===i&&document.execCommand("paste")),setTimeout((function(){e.setFocus(),n.Utils.detach(o)}),10)}else this._activeTool.keyDown(t)}},o.prototype._keyUpHandler=function(t){this._isEnabled()&&this.$_checkKeyElement(t)&&this._activeTool.keyUp(t)},o.prototype._keyPressHandler=function(t){this._isEnabled()&&this.$_checkKeyElement(t)&&this._activeTool.keyPress(t)},o.prototype._copyHandler=function(t){this._isEnabled()&&!t.defaultPrevented&&this._activeTool.copyHandler(t)},o.prototype._pasteHandler=function(t){this._isEnabled()&&!t.defaultPrevented&&this._activeTool.pasteHandler(t)},o.prototype.eventToContainer=function(t){var e=this._containerDom.getBoundingClientRect(),i=this._zoomRatio;return 1==i&&i!=n.Utils.$$_zoom?new a.Point((t.clientX/n.Utils.$$_zoom-e.left)/i,(t.clientY/n.Utils.$$_zoom-e.top)/i):new a.Point((t.clientX-e.left)/i,(t.clientY-e.top)/i)},o.prototype.toOffset=function(t){var e=this._containerDom.getBoundingClientRect();return 1==this._zoomRatio&&this._zoomRatio!=n.Utils.$$_zoom?(t.mouseX=(t.clientX/n.Utils.$$_zoom-e.left)/this._zoomRatio,t.mouseY=(t.clientY/n.Utils.$$_zoom-e.top)/this._zoomRatio):(t.mouseX=(t.clientX-e.left)/this._zoomRatio,t.mouseY=(t.clientY-e.top)/this._zoomRatio),t},o.prototype.toOffsetTouch=function(t){var e=this._containerDom.getBoundingClientRect(),i=t.touches[0]||t.changedTouches[0];return t.mouseX=(i.clientX-e.left)/this._zoomRatio,t.mouseY=(i.clientY-e.top)/this._zoomRatio,t},o.prototype._clickHandler=function(t){this._clickTimer=this._clickTimer&&clearTimeout(this._clickTimer),this._isEnabled()?this._activeTool.click(this.toOffset(t)):t.preventDefault()},o.prototype._dblclickHandler=function(t){this._isEnabled()?this._activeTool.dblclick(this.toOffset(t)):t.preventDefault()},o.prototype.$_setMouseTarget=function(t){for(var e=(0,n.getWin)(this._containerDom),i=t.target;i&&!(i instanceof e.HTMLElement);)i=i.parentElement||i.parentNode;this.activeTool._mouseEventTarget=i instanceof e.HTMLElement?i:null},o.prototype.$_pointerDownHandler=function(t,e){if(this._isEnabled()){o.$_mouseContainer=this.$_hash,this.toOffset(t),this._currentX=t.mouseX,this._currentY=t.mouseY;var i=this.findElementAt(this._currentX,this._currentY,!1);i&&i.getAncestor(s.ScrollBar)&&0===t.button?(this.activeTool.setFocus(),this.activeTool!==this._scrollTool&&(this._scrollTool.previous=this.activeTool),this.activeTool=this._scrollTool):this.activeTool!==this._defaultTool&&(this._defaultTool.previous=this.activeTool,this.activeTool=this._defaultTool),this.$_setMouseTarget(t),e.call(this.activeTool,t)}else t.preventDefault();t.defaultPrevented||(this.activeTool._clickTarget=t.target)},o.prototype._pointerDownHandler=function(t){(n.Utils.isIEMode()||t.isPrimary)&&this.$_pointerDownHandler(t,this.activeTool.pointerDown)},o.prototype._mouseDownHandler=function(t){this.$_pointerDownHandler(t,this.activeTool.mouseDown)},o.prototype._mouseUpHandler=function(t){this.removeMouseEvent(),this.$_pointerUpHandler(t)},o.prototype._pointerMoveHandler=function(t){var e;if(this._containerDom.parentElement&&(n.Utils.isIEMode()||t.isPrimary)&&(this.toOffset(t),this._currentX=t.mouseX,this._currentY=t.mouseY,this._isEnabled())){e=this._activeTool,this.$_setMouseTarget(t),e.pointerMove(t);var i=e.dragTracker;if(i&&i.linkable&&o.$_mouseContainer==this.$_hash)for(var r in o.$_Containers){var s=o.$_Containers[r];s!==this&&(e=s._activeTool)&&e.dragFrom(t,i)}}},o.prototype.$_pointerUpHandler=function(t){var e=o.$_mouseContainer==this.$_hash,i=this._activeTool;try{if(this.toOffset(t),this._currentX=t.mouseX,this._currentY=t.mouseY,this._isEnabled()){var r=i.dragTracker;if(this.$_setMouseTarget(t),i.pointerUp(t),i instanceof s.ScrollTool&&(this.activeTool=i.previous),r&&r.linkable&&e){var a=n.Utils.isMobile()&&document.elementFromPoint(t.clientX,t.clientY),l=this.findContainer(t,a);if(l&&l!==this){var h=l._activeTool;h&&h.dropFrom(t,r)}}}else t.preventDefault()}finally{i&&(this.setCursor("default"),i.dragTracker=null),e&&(o.$_mouseContainer=-1)}},o.prototype._pointerUpHandler=function(t){(n.Utils.isIEMode()||t.isPrimary)&&((this.activeTool.dragging||!this.$_existListener(this._rootElement._dom,"mouseup")||this.activeTool._longPressed)&&(this.removeMouseEvent(),this.$_pointerUpHandler(t)),n.Utils.isMobile()||!n.Utils.isSafari||t.defaultPrevented||this.activeTool._clickTarget!==t.target||(this._clickTimer=setTimeout((function(){var e=new PointerEvent("click",{bubbles:t.bubbles,cancelable:t.cancelable,view:t.view,ctrlKey:t.ctrlKey,shiftKey:t.shiftKey,altKey:t.altKey,metaKey:t.metaKey,button:t.button,buttons:t.buttons,clientX:t.clientX,clientY:t.clientY,screenX:t.screenX,screenY:t.screenY});t.target.dispatchEvent(e)}),50)))},o.prototype._pointerEnterHandler=function(t){this._isEnabled()&&this._activeTool.mouseEnter(this.toOffset(t))},o.prototype._pointerLeaveHandler=function(t){this._isEnabled()&&this._activeTool.mouseLeave(this.toOffset(t))},o.prototype._pointerOverHandler=function(t){this._isEnabled()&&this._activeTool.mouseOver(this.toOffset(t))},o.prototype._pointerCancelHandler=function(t){this._isEnabled()&&this._activeTool.pointerCancel(this.toOffset(t))},o.prototype._contextMenuHander=function(t){this.toOffset(t),this._currentX=t.mouseX,this._currentY=t.mouseY,this._isEnabled()&&(this.$_setMouseTarget(t),this._activeTool.contextMenu(this.toOffset(t)))},o.prototype._wheelHandler=function(t){this._isEnabled()&&(this.$_setMouseTarget(t),this._activeTool.mouseWheel(this.toOffset(t))&&n.Utils.stopEvent(t))},o.prototype._focusHandler=function(t){},o.prototype._blurHandler=function(t){},o.prototype._selectstartHandler=function(t){return!1},o.prototype._focusinHandler=function(t){},o.prototype._globalPointerDownHandler=function(t){n.Utils.isAncestorOf(this._containerDiv,t.target,t)||this._isOutChildElement(t)||this._isEnabled()&&this._activeTool.focusLeave(t)},o.prototype._globalKeyupHandler=function(t){this._activeTool.globalKeyup(t)},o.prototype._globalKeydownHandler=function(t){this._activeTool.globalKeydown(t)},o.prototype._focusoutHandler=function(t){var e=t.relatedTarget,i=t.target,o=!!this._focused,r=n.Utils.isAncestorOf(this._containerDiv,i,t),s=e&&n.Utils.isAncestorOf(this._containerDiv,e,t);if(!s){var a=!e;if((a=a||r&&!s&&!this._isOutChildElement(t))&&(this._focused=!1,this._isEnabled()&&this._activeTool.focusLeave(t)),!this._focused&&o!==!!this._focused){var l=n.Utils.isChromium?!t.relatedTarget&&!t.sourceCapabilities:void 0;this._focusChanged(this._focused,l,t)}}},o.prototype._focusHandlerFireFox=function(t){var e=!!this._focused;if(t.target===this._containerDom||n.Utils.isAncestorOf(this._containerDom,t.target,t)?this._isEnabled()&&!this._dummyFocus&&(this._focused=!0,this._activeTool.setFocus(t.target)):this._isOutChildElement(t)?this._focused=!0:this._containerDom.setAttribute("tabindex","0"),this._focused&&e!==!!this._focused){var i=n.Utils.isChromium?!t.relatedTarget&&!t.sourceCapabilities:void 0;this._focusChanged(this._focused,i,t)}},o.prototype._touchMoveHandler=function(t){if(!(t.touches.length>1))return this.toOffsetTouch(t),this._activeTool.touchMove(t)},o.$_Containers={},o.$_mouseContainer=-1,o.$_ActiveGrid=null,o}(i.EventAware);return Kr.VisualContainer=u,Kr}var vs,Cs,ws={},xs={};function bs(){if(vs)return xs;vs=1,Object.defineProperty(xs,"__esModule",{value:!0}),xs.CellElement=void 0;var t=d,e=Rr(),i=cn(),o=S(),n=function(e){function n(t,o){void 0===o&&(o=null);var n=e.call(this,t,o)||this;return n._fixed=!1,n._index=new i.CellIndex,n}return t.__extends(n,e),n.prototype._doDispose=function(){this._index&&this._index.dispose(),this._index=null,this._cellDom=o.Utils.detach(this._cellDom),e.prototype._doDispose.call(this)},_dp(n,"fixed",{get:function(){return this._fixed}}),_dp(n,"index",{get:function(){return this._index},set:function(t){i.CellIndex.areEquals(this._index,t)||(this._index.assignFrom(t),this._changed())}}),_dp(n,"item",{get:function(){return this._index.item}}),n.prototype.updateCell=function(t,e,i){i!=this._cellDom&&(i&&this._clearCellDom(i),this._clearCellCache(),this._cellDom=i),this.index=e.index,this._doPrepareValue(t,e),this._doUpdateContent(t,e,this._cellDom)},n.prototype.removeCellDom=function(t){void 0===t&&(t=!1),t&&this._cellDom&&this._clearCellDom(this._cellDom),this._cellDom=null,this._clearCellCache()},n.prototype._createDom=function(t){return null},n.prototype._clearCellDom=function(t){t.innerHTML=""},n.prototype._clearCellCache=function(){},_dp(n,"valueColumn",{get:function(){return this._index.valueColumn}}),_dp(n,"dataColumn",{get:function(){return this._index.dataColumn}}),n.prototype._changed=function(){this.invalidate()},n.prototype._doPrepareValue=function(t,e){},n.prototype._doUpdateContent=function(t,e,i){},n.prototype._doLayoutContent=function(t){},n}(e.GridElement);return xs.CellElement=n,xs}function Is(){if(Cs)return ws;Cs=1,Object.defineProperty(ws,"__esModule",{value:!0}),ws.GridHeadElement=ws.CheckHeadCellElement=ws.GridHeadCellElement=void 0;var t=d,e=Tr(),i=Tn(),o=Dn(),n=On(),r=Pn(),s=bs(),a=C(),l=S(),h=function(e){function i(t,i,o){void 0===o&&(o="gridHeadCellView");var n=e.call(this,t,o)||this;return n._text="",n._styleName="",n._textChanged=!1,n._model=i,n}return t.__extends(i,e),_dp(i,"model",{get:function(){return this._model}}),i.prototype.setStyleName=function(t,e,i){i==this._styleName&&e==this._cellDom||(this._styleName=i,this._className="",this._setClassName(t))},i.prototype._getCssSelector=function(){return this._styleName},i.prototype._clearCellCache=function(){e.prototype._clearCellCache.call(this),this._textChanged=!0},i.prototype._doPrepareValue=function(t,e){this._model.headText!=this._text&&(this._text=this._model.headText||"",this._textChanged=!0)},i.prototype._doUpdateContent=function(t,e,i){this._textChanged&&(this._textChanged=!1,i[l.Utils.TextProp]=this._text)},i}(s.CellElement);ws.GridHeadCellElement=h;var u=function(e){function i(t,i){var o=e.call(this,t,i,"chekHeadCellView")||this;return o._checked=!1,o._indeterminate=!1,o}return t.__extends(i,e),_dp(i,"checked",{get:function(){return this._checked},set:function(t){this._checked=t}}),_dp(i,"indeterminate",{get:function(){return this._indeterminate},set:function(t){this._indeterminate=t}}),i.prototype._clearCellCache=function(){this._check=this._image=this._span=this._label=null},i.prototype._doUpdateContent=function(t,e,i){var o,n=t.doc,r=this.model,s=r.showAll&&!r.exclusive;if(s&&!this._check){var h=this._check=n.createElement("input");h.id="$$-grid-head-check-"+this.model.$_hash,o=h.style,h.type="checkbox",h.className="rg-checkbox",h.tabIndex=-1,o.display=r.useImages?"none":"inline-block",i.appendChild(h);var u=this._image=n.createElement("span");(o=u.style).display=r.useImages?"inline-block":"none",i.appendChild(u);var d=this._label=n.createElement("label");d.setAttribute("for",this._check.id),d[l.Utils.TextProp]="grid head check",(o=d.style).display="none",i.appendChild(d)}if(s?(this._check.style.display=r.useImages?"none":"inline-block",this._image.style.display=r.useImages?"inline-block":"none",this._image.className=this._checked?"rg-checkbar-head-checked":this._indeterminate?"rg-checkbar-head-indeterminate":"rg-checkbar-head-unchecked",this._check.checked=this._checked,l.Utils.setInert(this._check,!t.accessibility),this._check.indeterminate=this._indeterminate):(l.Utils.detach(this._check),l.Utils.detach(this._image),l.Utils.detach(this._label),this._check=this._image=this._label=null),this._textChanged&&(this._span||(this._span=n.createElement("span"),this._span.style.display="block",i.appendChild(this._span)),this._span[l.Utils.TextProp]=this._text),s&&this._span&&this._text){var c=r.useImages?this._image:this._check,p=this._span,_=c.parentElement,f=null!=r.itemGap?r.itemGap+"px":"5px";switch((o=p.style).margin="",r.checkLocation){case a.ColumnHeaderItemLocation.BOTTOM:_.insertBefore(p,c),o.display="block",o.marginBottom=f;break;case a.ColumnHeaderItemLocation.LEFT:_.insertBefore(c,p),o.display="inline-block",o.marginLeft=f;break;case a.ColumnHeaderItemLocation.RIGHT:_.insertBefore(p,c),o.display="inline-block",o.marginRight=f;break;case a.ColumnHeaderItemLocation.TOP:default:_.insertBefore(c,p),o.display="block",o.marginTop=f}}},i.prototype.$_updateContent=function(){var t=this.model;t.showAll&&!t.exclusive&&this._check&&(this._check.checked=this._checked,this._check.indeterminate=this.indeterminate,this._image.className=this._checked?"rg-checkbar-head-checked":this._indeterminate?"rg-checkbar-head-indeterminate":"rg-checkbar-head-unchecked")},i}(h);ws.CheckHeadCellElement=u;var c=function(e){function s(t){var i=e.call(this,t.doc,null,"gridHeadView")||this;i._cells=[];var o=t.doc;return i.addChild(i._indicatorCell=new h(o,t.rowIndicator)),i.addChild(i._stateCell=new h(o,t.stateBar)),i.addChild(i._checkCell=new u(o,t.checkBar)),i}return t.__extends(s,e),s.prototype._doDispose=function(){this._cells=null,e.prototype._doDispose.call(this)},_dp(s,"allChecked",{get:function(){return this._checkCell.checked},set:function(t){var e=this._checkCell;e.checked=t,e.$_updateContent()}}),_dp(s,"indeterminate",{get:function(){return this._checkCell.indeterminate},set:function(t){var e=this._checkCell;e.indeterminate=t,e.$_updateContent()}}),s.prototype.getHeadModel=function(t){for(var e=0;eo;)this.removeLast();for(var s=0;s0){s.opacity="1";var _=p/2;s.transition="opacity ".concat(_,"s ease ").concat(_,"s")}}}},o.prototype.$_disableSelection=function(t){void 0!==t.onselectstart?t.onselectstart=function(){return!1}:void 0!==t.style.MozUserSelect?t.style.MozUserSelect="none":t.onmousedown=function(){return!1}},o}(e.Base);Ps.ToastView=n;var r=function(e){function i(t){var i=e.call(this)||this;return i._active=!1,i._container=t.container,i}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(i,"visible",{get:function(){return this._active}}),i.prototype.show=function(t,e,i){var r=this;if(!this._active||e){this.close(!1);var s=t instanceof o?t:t?new o(t):null;if(s&&s.visible)return this._toast||(this._toast=new n(this._container)),this._toast.show(s),this._active=!0,void(i?setTimeout((function(){try{i()}finally{r.close(s.fadeOut>0)}}),0):s.fadeOut>0&&this.close(!0))}i&&i()},i.prototype.close=function(t){this._active&&(this._toast&&this._toast.hide(t),this._active=!1)},i}(e.Base);return Ps.ToastManager=r,Ps}var Vs,As={};function Ns(){if(Vs)return As;Vs=1,Object.defineProperty(As,"__esModule",{value:!0}),As.RightContentPane=As.FixedContentPane=As.DataContentPane=As.LeftContentPane=As.ContentPane=void 0;var t=d,e=jn(),i=ml(),o=xr(),n=fr(),r=function(e){function n(t,i){return void 0===i&&(i=null),e.call(this,t,i)||this}return t.__extends(n,e),n.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(n,"grid",{get:function(){for(var t=this.parent;t;){if(t instanceof i.GridBase)return t;t=t.parent}return null}}),n.prototype.measure=function(t,e,i){return this._doMeasure(t,e,i)},n.prototype.layoutContent=function(t,e,i){this._doLayoutContent(t,e,i)},n.prototype._doMeasure=function(t,e,i){return new o.Size(e,i)},n.prototype._doLayoutContent=function(t,e,i){},n}(e.LayerElement);As.ContentPane=r;var s=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(i,e),i.prototype._initDom=function(t){e.prototype._initDom.call(this,t)},i}(r);As.LeftContentPane=s;var a=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(i,e),i}(r);As.DataContentPane=a;var l=function(e){function i(t){var i=e.call(this,t.doc,"fixedColumnBar")||this;return i._grid=t,i}return t.__extends(i,e),i.prototype._getCssSelector=function(){return n.FixedOptions.COLUMN_BAR_STYLE},i}(e.LayerElement),h=function(e){function i(t,i){return void 0===i&&(i=null),e.call(this,t,i)||this}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},i.prototype.layoutBars=function(t,e,i){this._layoutBars(t,e,i)},i.prototype._doLayoutContent=function(t,i,o){this._barView||(this._barView=this._createBar(t.grid),this.addChild(this._barView),this._barView2=this._createBar(t.grid),this.addChild(this._barView2)),e.prototype._doLayoutContent.call(this,t,i,o)},i.prototype._createBar=function(t){return new l(t)},i.prototype._layoutBars=function(t,e,i){var o=t.fixedBarWidth,n=t.footBounds.height;if(this._barView.visible=o>0,this._barView2.visible=!1,this._barView.visible){var r=Math.min(i-n,t.dataBounds.bottom);this._barView.setBounds(e-o,0,o,r),n>0&&(this._barView2.visible=!0,this._barView2.setBounds(e-o,i-n,o,n))}},i}(a);As.FixedContentPane=h;var u=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(i,e),i.prototype._getCssSelector=function(){return"rg-right-column-bar"},i}(e.LayerElement),c=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(i,e),i.prototype._createBar=function(){return new u(this.doc,"rightColumnBar")},i.prototype._layoutBars=function(t,e,i){var o=t.rightBarWidth,n=t.footBounds.height;if(this._barView.visible=o>0,this._barView2.visible=!1,this._barView.visible){var r=Math.min(i-n,t.dataBounds.bottom);this._barView.setBounds(0,0,o,r),n>0&&(this._barView2.visible=!0,this._barView2.setBounds(0,i-n,o,n))}},i}(h);return As.RightContentPane=c,As}var $s,Us={};var Hs,Gs={},Ws={};function js(){if(Hs)return Ws;Hs=1,Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.RowMoveRequest=Ws.HeaderResizeRequest=Ws.RowResizeRequest=Ws.ColumnMoveRequest=Ws.ColumnResizeRequest=Ws.SelectRequest=Ws.CellRequest=Ws.GridEditRequest=void 0;var t=d,e=gs(),i=zn(),o=dn(),n=function(e){function i(t){var i=e.call(this)||this;return i._grid=t,i}return t.__extends(i,e),i.prototype._doDispose=function(){this._grid=null,e.prototype._doDispose.call(this)},_dp(i,"grid",{get:function(){return this._grid}}),i.prototype.canFocus=function(){return!0},i}(e.EditRequest);Ws.GridEditRequest=n;var r=function(e){function i(t){var i=e.call(this,t.grid)||this;return i._index=t,i}return t.__extends(i,e),i.prototype._doDispose=function(){this._index.dispose(),this._index=null,e.prototype._doDispose.call(this)},_dp(i,"index",{get:function(){return this._index}}),i}(n);Ws.CellRequest=r;var s=function(e){function i(t,i){var o=e.call(this,t)||this;return o._style=i,o}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(i,"style",{get:function(){return this._style}}),_dp(i,"manager",{get:function(){return this.grid.selections}}),_dp(i,"selectable",{get:function(){return!0}}),i}(r);Ws.SelectRequest=s;var a=function(e){function i(t){return e.call(this,t)||this}return t.__extends(i,e),i.prototype._doDispose=function(){this._layout=null,e.prototype._doDispose.call(this)},_dp(i,"layout",{get:function(){return this._layout}}),_dp(i,"x",{get:function(){return this._x}}),_dp(i,"y",{get:function(){return this._y}}),_dp(i,"offset",{get:function(){return this._offset}}),i.prototype.init=function(t,e,i,o){return this._layout=t,this._x=e,this._y=i,this._offset=o,this},_dp(i,"cursor",{get:function(){return"col-resize"}}),i}(n);Ws.ColumnResizeRequest=a;var l=function(e){function i(t){return e.call(this,t)||this}return t.__extends(i,e),i.prototype._doDispose=function(){this._layout=null,e.prototype._doDispose.call(this)},_dp(i,"layout",{get:function(){return this._layout}}),_dp(i,"x",{get:function(){return this._x}}),_dp(i,"y",{get:function(){return this._y}}),_dp(i,"offset",{get:function(){return this._offset},set:function(t){this._offset=t}}),i.prototype.init=function(t,e,i,n){return this._layout=o.CellLayoutItem.getSource(t),this._x=e,this._y=i,null!=n&&(this._offset=n),this},_dp(i,"cursor",{get:function(){return"default"}}),i}(n);Ws.ColumnMoveRequest=l;var h=function(e){function i(t){var i=e.call(this,t)||this;return i._itemIndex=-1,i._variable=!1,i._rowTop=0,i._offset=0,i}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(i,"itemIndex",{get:function(){return this._itemIndex}}),_dp(i,"variable",{get:function(){return this._variable}}),_dp(i,"rowTop",{get:function(){return this._rowTop}}),_dp(i,"offset",{get:function(){return this._offset}}),i.prototype.init=function(t,e,i,o){return this._itemIndex=t,this._variable=e,this._rowTop=i,this._offset=o,this},_dp(i,"cursor",{get:function(){return"row-resize"}}),i.prototype.canFocus=function(){return!1},i}(n);Ws.RowResizeRequest=h;var u=function(e){function i(t){var i=e.call(this,t)||this;return i._offset=0,i._top=0,i}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(i,"top",{get:function(){return this._top}}),_dp(i,"offset",{get:function(){return this._offset}}),i.prototype.init=function(t,e){return this._top=t,this._offset=e,this},_dp(i,"cursor",{get:function(){return"row-resize"}}),i}(n);Ws.HeaderResizeRequest=u;var c=function(e){function o(t){var i=e.call(this,t)||this;return i._itemIndex=-1,i._offset=0,i._layout=null,i}return t.__extends(o,e),o.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(o,"itemIndex",{get:function(){return this._itemIndex}}),_dp(o,"offset",{get:function(){return this._offset}}),_dp(o,"layout",{get:function(){return this._layout}}),o.prototype.init=function(t,e){return this._selStyle=t&&t.style,this._selStyle&&this._selStyle!=i.SelectionStyle.COLUMNS&&this._selStyle!=i.SelectionStyle.SINGLE_COLUMN?(this._itemIndex=t.getBounds().top,this._layout=t.startLayout,this._offset=e-this._itemIndex):(this._itemIndex=e,this._offset=0,this._layout=null),this},_dp(o,"cursor",{get:function(){return this.grid.dataDropOptions.cursor}}),o.prototype.canFocus=function(){return this._selStyle==i.SelectionStyle.COLUMNS||this._selStyle==i.SelectionStyle.SINGLE_COLUMN},o}(n);return Ws.RowMoveRequest=c,Ws}var zs,Ys,qs={},Xs={};function Ks(){if(zs)return Xs;zs=1,Object.defineProperty(Xs,"__esModule",{value:!0}),Xs.CustomCellRenderer=Xs.CustomCellRendererImpl=void 0;var t=d,e=To(),i=function(e){function i(t){var i=e.call(this)||this;return i._type=t,i}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(i,"inputFocusable",{get:function(){return this._inputFocusable},set:function(t){this._inputFocusable=t}}),_dp(i,"dom",{get:function(){return this._dom}}),_dp(i,"itemClickable",{get:function(){return this._itemClickable},set:function(t){this._itemClickable=t}}),_dp(i,"type",{get:function(){return this._type}}),_dp(i,"grid",{get:function(){return this._index&&this._index.grid.handler}}),_dp(i,"index",{get:function(){return this._index}}),_dp(i,"showTooltip",{get:function(){return this._showTooltip}}),_dp(i,"refreshFocusChanged",{get:function(){return this._refreshFocusChanged}}),_dp(i,"clickOnlyFocusedCell",{get:function(){return this._clickOnlyFocusedCell}}),i.prototype._doRenderCell=function(t,e,i,o,n){var r={};r.focused=i.focused,this.render(t.handler,e,o,n,r)},i.prototype.tooltip=function(t,e){},i.prototype.canEdit=function(){return e.prototype.canEdit.call(this)},i.prototype.canClick=function(t){return e.prototype.canClick.call(this,t)},i.prototype.canEditClickAt=function(t){return e.prototype.canEditClickAt.call(this,t)},i.prototype.canClickSpaceKey=function(t){return e.prototype.canClickSpaceKey.call(this,t)},i.prototype.click=function(t,i,o){return e.prototype.click.call(this,t,i,o)},i.prototype.itemClick=function(t){e.prototype.itemClick.call(this,t)},i.prototype.preventDefaultEditClick=function(t){e.prototype.preventDefaultEditClick.call(this,t)},i.prototype.preventDefaultClick=function(t){e.prototype.preventDefaultClick.call(this,t)},i.prototype._doEditClick=function(t,i,o){return e.prototype._doEditClick.call(this,t,i,o)},i}(e.DataCellRenderer);Xs.CustomCellRendererImpl=i;var o=function(e){function i(t,i){var o=e.call(this)||this;return o._inputFocusable=!1,o._tags={},t&&"function"==typeof t.render?(o._impl=t,o._impl.type=i,o.assignFrom(o._impl)):o._impl=null,o._itemClickable=!0,o}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(i,"inputFocusable",{get:function(){return this._inputFocusable},set:function(t){this._inputFocusable!==t&&(this._inputFocusable=t)}}),_dp(i,"tags",{get:function(){return this._tags},set:function(t){this._tags=t}}),_dp(i,"grid",{get:function(){return this.index.grid.handler}}),_dp(i,"type",{get:function(){return this._impl&&this._impl.type}}),i.prototype._doInitContent=function(t){this._impl&&this._impl.initContent&&this._impl.initContent.call(this,t)},i.prototype._doClearContent=function(t){this._impl&&this._impl.clearContent&&this._impl.clearContent.call(this,t)},i.prototype._doRenderCell=function(t,e,i,o,n){var r={};r.focused=i.focused,this._impl&&this._impl.render&&this._impl.render.call(this,t.handler,e,o,n,r)},i.prototype.preventDefaultEditClick=function(t){return this._impl&&this._impl.preventEditClick?this._impl.preventEditClick.call(this,t):e.prototype.preventDefaultEditClick.call(this,t)},i.prototype._doEditClick=function(t,i,o){return this._impl&&this._impl.editClick?this._impl.editClick.call(this,t,i,o):e.prototype._doEditClick.call(this,t,i,o)},i.prototype.canEditClickAt=function(t){return this._impl&&this._impl.canEditClickAt?this._impl.canEditClickAt.call(this,t):e.prototype.canEditClickAt.call(this,t)},i.prototype.preventDefaultClick=function(t){return this._impl&&this._impl.preventClick?this._impl.preventClick.call(this,t):e.prototype.preventDefaultClick.call(this,t)},i.prototype._doClick=function(t,i){return this._impl&&this._impl.click?this._impl.click.call(this,i):e.prototype._doClick.call(this,t,i)},i.prototype._doEditKey=function(t,i,o){return this._impl&&this._impl.editKey?this._impl.editKey.call(this,i,o):e.prototype._doEditKey.call(this,t,i,o)},i.prototype.canClick=function(t){return this._impl&&this._impl.canClick?this._impl.canClick.call(this,t):e.prototype.canClick.call(this,t)},i.prototype.canEdit=function(){return this._impl&&this._impl.canEdit?this._impl.canEdit.call(this):e.prototype.canEdit.call(this)},i.prototype.canEditKey=function(t){return this._impl&&this._impl.canEditKey?this._impl.canEditKey.call(this,t):e.prototype.canEditKey.call(this,t)},i}(e.DataCellRenderer);return Xs.CustomCellRenderer=o,Xs}function Zs(){if(Ys)return qs;Ys=1,Object.defineProperty(qs,"__esModule",{value:!0}),qs.DefaultEditController=qs.EditValueCommand=void 0;var t=d,e=Zn(),i=G(),o=cn(),n=tr(),r=C(),s=S(),a=Vt(),l=Fo(),h=Ks(),u=function(e){function i(t,i,o,n){var r=e.call(this)||this;return r._row=t,r._field=i,r._value=o,r._column=n,r._oldValue=s.Utils.deepCopy(t.getData(i)),r}return t.__extends(i,e),i.prototype.undo=function(){this._row.setData(this._field,this._oldValue),this.$_focusCell()},i.prototype.redo=function(){this._row.setData(this._field,this._value),this.$_focusCell()},i.prototype.$_focusCell=function(){var t=this._column.grid,e=t.focusedIndex.clone();e.layout=this._column.layout,t.setFocusedIndex(e),t.makeCellVisible(e)},i}(a.EditCommand);qs.EditValueCommand=u;var c=function(i){function a(t){var e=i.call(this)||this;return e._editIndex=new o.CellIndex,e._starting=!1,e._needPrepare=!1,e._needDropdown=!1,e._modified=!1,e._commiting=!1,e._canceling=!1,e._resetting=!1,e._dirty=!1,e._editable=!1,e._readOnly=!1,e._grid=t,e._access=t.accessibility,e._access||(e._defaultEditor=t.delegate.getDefaultCellEditor(),e._defaultEditor&&e._defaultEditor.setController(e),e._defaultEditor&&e._internalHideEditor(e._defaultEditor)),e}return t.__extends(a,i),a.prototype._doDispose=function(){this._grid=null,this._editIndex&&this._editIndex.dispose(),this._editIndex=null,this._editor&&this._editor.dispose(),this._editor=null,this._defaultEditor&&this._defaultEditor.dispose(),this._defaultEditor=null,i.prototype._doDispose.call(this)},_dp(a,"readOnly",{get:function(){return this._readOnly}}),_dp(a,"editable",{get:function(){return this._editable}}),a.prototype.onEditorStart=function(t){if(!t.visible&&!this._commiting&&!this._canceling)return this._activateEditor(!1,!1)},a.prototype.onEditorKeyDown=function(t,e){var i=s.Utils.ctrlKey(e);return t&&(t.textReadOnly||i||e.altKey||!this._isEditKey(e.keyCode)?t.textReadOnly?t._editor.readOnly=t.textReadOnly:229==e.keyCode&&t.setReadOnly(this._readOnly):t.setReadOnly(this._readOnly)),this._grid.activeTool.keyDown(e)},a.prototype.onEditorKeyPress=function(t,e){return this._grid.activeTool.keyPress(e)},a.prototype.onEditorKeyUp=function(t,e){return this._grid.activeTool.keyUp(e)},a.prototype.onEditorChange=function(t){if(this._modified||(this._modified=!0,this._grid._editorStarted(t,this._editIndex)),this.editing){this._grid.makeCellVisible(this._editIndex);var i=t.getEditValue(!1,!1);i=i===e.CellEditor.Unselected?t.getEditText():i,this._grid._editorChange(t,this._editIndex,i)}},a.prototype.onEditorSearch=function(t,e){this._grid._editorSearch(this._editor,this._editIndex,e)},a.prototype.onSearchCellButtonClick=function(t,e){return this._grid._searchCellButtonClick(this._editor,this._editIndex,e)},a.prototype.onEditorCommit=function(t){return this.commitEditor(!0,!1,!0,!1)},_dp(a,"editIndex",{get:function(){return this._editIndex.clone()}}),_dp(a,"editing",{get:function(){return this._editor&&this._editor.editing}}),_dp(a,"editValue",{get:function(){return this._editor&&this._editor.value}}),a.prototype.setFocus=function(t,e){var i;if(e&&(!this._editor||e!==this._editor.editor)){var o=(0,s.getWin)(e),n=this._grid,a=void 0,u=null===(i=this._editor)||void 0===i?void 0:i.editor;if((e instanceof o.HTMLInputElement||e instanceof o.HTMLSelectElement||e instanceof o.HTMLTextAreaElement)&&(a=n.getTableCell(e))){var d=n.getCellType(a),c=n.getTableView(a),p=c&&c.tableCellByCell&&c.tableCellByCell(a);if(d===r.GridCellType.DATA){var _=this._grid.focusedIndex.clone(),f=this._grid.getBodyCellAt(_,!0),g=f&&f.renderer2;if((g instanceof l.TemplateCellRenderer||g instanceof h.CustomCellRenderer||g instanceof h.CustomCellRendererImpl)&&g.inputFocusable)return;u&&(u.tabIndex=-1)}else if(d===r.GridCellType.INLINE_FILTER){if(n.isItemEditing()&&n.filterPanel.beforeCommit&&n.commit(!1),!n.isEditing())return u&&(u.tabIndex=0),void n.makeColumnVisible(p.layout&&p.layout.firstColumn)}else if(s.Utils.included(d,r.GridCellType.HEADER,r.GridCellType.LAYOUT_HEADER,r.GridCellType.FOOTER,r.GridCellType.SUMMARY)&&!p.isClickableElt(e)&&s.Utils.isFocusableTemplate(a,e))return}}this.$_focusToEditor(t,e)},a.prototype.resetEditor=function(t){if(this.editing){if(this._grid.isValid(this._editIndex)){if(this._resetBounds(),t&&this.editing){var e=this.getData(this._editIndex);this._resetting=!0;try{this._editor.setEditValue(e),this._editor.beginEdit(!1,!0)}finally{this._resetting=!1}}}else this.hideEditor();return!0}},a.prototype.invalidateEditor=function(){this._dirty=!0},a.prototype.closeList=function(t){this._editor&&this._editor.closeList(t)},a.prototype.focusedIndexChanging=function(){return!this.editing||(this.closeList(!0),this.commitEditor(!0,!1,!0,!1))},a.prototype.focusedIndexChanged=function(t,e,i){this._hideEditor(),this._grid.isValid(e)&&(i?this._prepareEditor(e):this._needPrepare=!0)},a.prototype.prepareEditor=function(t){this._needPrepare&&(this._needPrepare=!1,this._grid.isValid(t)&&(this._prepareEditor(t),this._needDropdown=!1))},a.prototype.requestPrepareEditor=function(t){this._needPrepare=!0,this._needDropdown=t},a.prototype.showEditor=function(t,e){var i=this._grid,o=this._editor;if(i&&i.isValid(t)&&t.item.canEdit()){if(o&&o.editing)return i.makeCellVisible(t),!0;if(o&&!o.editing&&(!this._showEditorTimer&&this._prepareEditor(t),i.makeCellVisible(t),this._activateEditor(!1,!0,e)))return!0}},a.prototype.showList=function(t){var e=this._grid,i=this._editor;if(i&&i.editing&&(e.makeCellVisible(t),this.cancelEditor(!0)),e&&e.isValid(t)&&(this._prepareEditor(t),e.makeCellVisible(t),i&&this._editable&&!i.editing))return i.dropDownList(!0),!0},a.prototype.caretToLast=function(){this._editor&&this._editor.caretToLast()},a.prototype.hideEditor=function(){if(this.editing){this._modified=!1,this._resetting=!0;try{this._internalHideEditor(this._editor),this._prepareEditor(this._editIndex)}finally{this._resetting=!1}}},a.prototype.commitEditor=function(t,i,n,r){if(!this.editing||this._commiting)return!0;var s=this._editor;if(!s)return!1;var a,l,h=this._grid,u=h.validationManager,d=h.editOptions,c=this._editIndex,p=c.dataColumn,_=!0,f=s._mask;this._commiting=!0;try{if(s.commit(),(this._modified||s.isEdited())&&p&&p.dataIndex>=0)try{try{if((a=f&&!f.checkValid()?e.CellEditor.InvalidFormat:s.getEditValue(!0,!0))===e.CellEditor.InvalidFormat)_=!1,d.showInvalidFormatMessage&&f&&f.showInvalidFormatMessage&&alert(f&&f.invalidFormatMessage||d.invalidFormatMessage);else if(a===e.CellEditor.Unselected)this._modified=!1,_=!0;else{var g=this._getData(c),m={text:s.getEditText(),value:a,oldValue:g},y=s.getEditListItem();y&&(m.item=y),_=this._grid.getEditValue(s,c,m),a=m.value,"boolean"!=typeof _&&(_=r||this._grid.editorCommit(c,g,a))}}catch(t){_=!1}this._grid.isItemEditing()?_&&a!==e.CellEditor.Unselected&&(this._setData(c,a),this._grid.isItemEditing(c.item)&&(a=this._getData(c),this._grid.validateCellCommit(c,a)),this._modified=!1):this._modified=!1}catch(t){l=t,_=!1}if(this._resetting=!0,_&&t)try{this._internalHideEditor(s),this._prepareEditor(c,n),s.isEdited()||this._grid.activeTool.resetFocused()}finally{this._resetting=!1}if(l){if(i)throw l;d.showCommitError&&alert(l.message||l)}}finally{this._commiting=!1}if(_&&h.isCellEditing()){var v=h.itemSource,C=v.editingItem.invalidFields;if(h.editOptions.validateOnEdited){var w=u.getError(c);if(w)return C.push(p.dataIndex),d.showCommitError&&alert(w.userMessage||w.message||w),!1;C.indexOf(p.dataIndex)>=0&&C.splice(C.indexOf(p.dataIndex),1),u.clearInvalidCell(c)}if(C.length>0)return!0;var x=h.canMergeEditing(h.getBodyCellAt(c,!0));if(!v.commit(x))return v.cancel(),!0;u.cloneError(-1,c.dataId),u.clearInvalidCells(-1);var b=o.CellIndex.temp(h,c.itemIndex,p);if(x&&a!==e.CellEditor.Unselected){var I=p.layout.merges.getRoom(c),E={},S={};S[p.fieldName]=a;for(var R=I.head;R<=I.tail;R++){var T=h.getItem(R);b.itemIndex=T.index,T.isDataRow&&(E[T.dataRow]=S),h.editOptions.validateOnEdited&&u.clearInvalidCell(b)}v.updateRows2(E)}}return _},a.prototype.cancelEditor=function(t){if(this.editing){this._canceling=!0;try{try{this._modified=!1,this._grid.editorCancel(this._editor,this._editIndex)}catch(t){throw t}this._resetting=!0;try{this._internalHideEditor(this._editor),this._prepareEditor(this._editIndex)}finally{this._resetting=!1}}finally{this._canceling=!1,this._grid.editorCanceled()}if(this._grid.editOptions.commitByCell){var e=this._grid.itemSource;e.isUpdating&&e.cancel()}}},a.prototype.fillSearchItems=function(t,e,i,o,r){this.editing&&this._editIndex.column===t&&this._editor instanceof n.SearchCellEditor&&this._editor.fillItems(e,i,o,r)},a.prototype.buttonClicked=function(t,e){var i=this._editor,n=this._grid,r=n.getBodyCellAt(t,!1),s=t.layout.getDataColumn();i&&o.CellIndex.areEquals(this._editIndex,t)&&i.hasButton(n.displayOptions.showNativeEditButton,r.editor||s.editor)&&i.buttonClicked(this._editIndex,e)},a.prototype.buttonDown=function(t,e){this._editor&&this._editor.buttonDown(t,e)},a.prototype.buttonUp=function(t,e){this._editor&&this._editor.buttonUp(t,e)},a.prototype.getData=function(t){return this._getData(t)},a.prototype.setEditValue=function(t,e){this._editor&&this._editor.setCellEditValue(t,e)},a.prototype.currentEditor=function(){return this._editor},a.prototype.detachEditors=function(){for(var t=this._grid.delegate.editors,e=0,i=Object.keys(t);e=0)return i.getData(o)}},a.prototype._setData=function(t,e){var i=t.item;if(i){var o=t.dataColumn.dataIndex;o>=0&&(this._grid.undoable?this._grid.execute(new u(t.item,o,e,t.column)):i.setData(o,e))}},a.prototype._isEditKey=function(t){return 8==t||t>=46&&t<=90||t>=96&&t<=111||t>=186&&t<=222||13==t&&this._grid.editOptions.enterToEdit},a}(i.Base);return qs.DefaultEditController=c,qs}var Js,Qs={};function ta(){if(Js)return Qs;Js=1,Object.defineProperty(Qs,"__esModule",{value:!0}),Qs.RowBarElement=void 0;var t=d,e=C(),i=Rr(),o=S(),n=function(i){function n(t,e,o){var n=i.call(this,t,e,o)||this;return n._col=-1,n._colChanged=!1,n}return t.__extends(n,i),n.prototype._doDispose=function(){i.prototype._doDispose.call(this)},n.prototype.getCellIndex=function(t){return t.parentElement[e.T_ROW]},n.prototype.refresh=function(t,i){for(var n=0;n0?e.minWidth:i,Math.min(e.maxWidth>0?e.maxWidth:i)),e._displayWidth=i,i},s.prototype._layoutCell=function(t,e,o){if(n.prototype._layoutCell.call(this,t,e,o),e){var r=this.model.getCell(e);i.Utils.setClassName(o,this.$_getCellSelector(o)),this._updateCellContent(t,r,o.firstElementChild,o)}},s.prototype.$_getCellSelector=function(t){var s=this.grid,a=t.parentElement[o.T_ROW],l=t[o.T_FOC],h=this.model,u="rg-rowindicator-cell";if(-99===a)return r.FixedOptions.ROW_BAR_CELL_STYLE;if(l){u+=h.showFocus?" rg-rowindicator-focus":"";var d=s.getItem(a);i.Utils.isDebugging();var c=d&&d.itemState;(0,e.ItemState_isInserting)(c)?u+=" rg-rowindicator-inserting":c==e.ItemState.UPDATING&&(u+=" rg-rowindicator-editing")}else s.isSelectedItem(a)&&h.showSelection&&(u+=" rg-rowindicator-select");return u+n.prototype.$_getCellSelector.call(this,t)},s}(n.RowBarElement);return oa.RowIndicatorElement=s,oa}(),u=function(){if(na)return ra;na=1,Object.defineProperty(ra,"__esModule",{value:!0}),ra.StateBarElement=void 0;var t=d,e=D(),i=Dn(),o=S(),n=C(),r=ta(),s=fr(),a=function(r){function a(t,e){var i=r.call(this,t,e,"stateBarView")||this;return i._textMark=!1,i}return t.__extends(a,r),a.prototype.rowOf=function(t){return t.parentElement[n.T_ROW]},a.prototype._getCssSelector=function(){return"rg-statebar"},a.prototype.measureWidth=function(t){return t.stateBar.width},a.prototype._layoutCell=function(t,e,n){if(r.prototype._layoutCell.call(this,t,e,n),e){var s=this.model,a=s.mark;this._textMark=a==i.StateMark.TEXT;var l=s.getCell(e);o.Utils.setClassName(n,this.$_getCellSelector(n)),this._updateCellContent(t,l,n.firstElementChild,n)}},a.prototype._updateCellContent=function(t,e,i,n){i[o.Utils.TextProp]=this._textMark&&e.text||""},a.prototype.$_getCellSelector=function(t){var o=this.grid,a=o.getItem(t.parentElement[n.T_ROW]),l=t.parentElement[n.T_ROW],h=t[n.T_FOC],u=this.model,d=u.mark==i.StateMark.IMAGE,c="rg-statebar-cell ";if(-99===l)return s.FixedOptions.ROW_BAR_CELL_STYLE;if(h?u.showFocus&&(c+=" rg-statebar-focus"):l>=0&&u.showSelection&&this.grid.isSelectedItem(l)&&(c+=" rg-statebar-select"),o.isItemEditing(a)&&this._error&&this.model.errorVisible)switch(this._error.level){case n.ValidationLevel.INFO:c+=" rg-statebar-info";break;case n.ValidationLevel.WARNING:c+=" rg-statebar-warning";break;case n.ValidationLevel.ERROR:c+=" rg-statebar-error"}else if(a&&l>=0&&d)switch(a.rowState){case e.RowState.UPDATED:c+=" rg-statebar-updated";break;case e.RowState.CREATED:c+=" rg-statebar-created";break;case e.RowState.DELETED:c+=" rg-statebar-deleted";break;case e.RowState.CREATE_AND_DELETED:c+=" rg-statebar-create-and-deleted"}return c+r.prototype.$_getCellSelector.call(this,t)},a}(r.RowBarElement);return ra.StateBarElement=a,ra}(),c=function(){if(sa)return la;sa=1,Object.defineProperty(la,"__esModule",{value:!0}),la.CheckBarElement=void 0;var t=d,e=S(),i=Gi(),o=C(),n=ta(),r=Go(),s=fr(),a=function(n){function a(t,e){var i=n.call(this,t,e,"checkBarView")||this;return i._fixedCount=0,i._prevChecked=-1,i._exclusive=!1,i._typeChanged=!1,i._useImage=!1,i._imageChanged=!1,i}return t.__extends(a,n),a.prototype.rowOf=function(t){return t.parentElement[o.T_ROW]},a.prototype._getCssSelector=function(){return"rg-checkbar"},a.prototype._doPrepareContent=function(t){var e=t.grid.checkBar;(this._typeChanged=e.exclusive!==this._exclusive)&&(this._exclusive=e.exclusive),(this._imageChanged=e.useImages!==this._useImage)&&(this._useImage=e.useImages)},a.prototype._clearCellContent=function(t){t[this._textProp]="",n.prototype._clearCellContent.call(this,t)},a.prototype._prepareCellContent=function(t,i){var o=(0,e.getDoc)(t),n=a.FOR_ID+this.rowOf(i)+"-"+this.model.$_hash,r=o.createElement("input"),s=r.style;r.type=this._exclusive?"radio":"checkbox",r.id=n,r.tabIndex=-1,r.className=this._exclusive?"rg-radio":"rg-checkbox",s.display=this._useImage?"none":"inline-block",t.appendChild(r);var l=o.createElement("span");(s=l.style).display=this._useImage?"inline-block":"none",t.appendChild(l);var h=o.createElement("label");h.setAttribute("for",n),(s=h.style).display="none",t.appendChild(h)},a.prototype.measureWidth=function(t){return this.model.width},a.prototype._layoutCell=function(t,i,o){n.prototype._layoutCell.call(this,t,i,o);var r=i&&this.model.getCell(i);e.Utils.setClassName(o,this.$_getCellSelector(o)),o.style.display="",o.removeAttribute("rowspan");var s=t.fixedOptions.rowCount,a=t.checkBar;if(a._merged&&i){var l=a._merges,h=i.itemIndex;if(h=h0?1:0))}))},d.prototype.rowOf=function(t){return t.parentElement[n.T_ROW]},d.prototype.getCheckBox=function(t){return this._checkView.getCheckBox(t)},d.prototype.getCellType=function(t){var e=this._views[t.cellIndex];return e instanceof h.RowIndicatorElement?n.GridCellType.INDICATOR:e instanceof u.StateBarElement?n.GridCellType.STATE:e instanceof c.CheckBarElement?n.GridCellType.CHECK:void 0},d.prototype.isRowIndicator=function(t){return this._views[t.cellIndex]instanceof h.RowIndicatorElement},d.prototype.getSectionObject=function(t){void 0===t&&(t=!1);var e=this.getChildren().map((function(t){return t.model}));return(e=e.filter((function(e){return!t||e.visible?e:void 0}))).sort((function(t,e){var i=t.displayOrder,o=e.displayOrder;return i==o?t.staticOrder-e.staticOrder:i-o}))},d.prototype._getCssSelector=function(){return"rg-rowbarcontainer"},d.prototype._getFirstCell=function(t){return 0},d.prototype._getEndCell=function(t){return this._bars.length},d.prototype._isFixedHeight=function(){return!0},d.prototype._doPrepareContent=function(t){if(this._views.length){this._dirty&&this._dom.appendChild(this._table);for(var o=0,n=this._views;o0&&e>i?t.getTableItemHeight(e-1):t.getTableItemHeight(e)},d.prototype._doMeasure=function(t,e,i){this.$_prepareBars(t);for(var o=0,n=0,s=this._views;n0&&this._layoutFixedBar(e.fixedOptions,s)},d.prototype._doUpdateCellContent=function(t,e,i){i[this._textProp]=e.text},d.prototype._doRender=function(t){},d.prototype._doDraw=function(t){this._views.forEach((function(t){t.validate()}))},d.prototype._getCellCount=function(t){return this._bars.length},d.prototype._getCellWidth=function(t,e){return this._views[e].width},d.prototype.$_prepareBars=function(t){for(var e=this._bars=this.getSectionObject(!0),i=this._views=[],o=0,n=e.length;o=0)}))},d.prototype._layoutFixedBar=function(t,e){var r=this._tbody.children[e];r[n.T_IDX]=e,r[n.T_ROW]=-99,i.Utils.setClassName(r,o.FixedOptions.ROW_BAR_STYLE);for(var s=0;s=Math.abs(a),this._vertical){if(Math.abs(l)>10){var h=r.topIndex,u=r.layoutManager.fullItemCount,d=r.itemCount;if(u===d)return this._scrolling=!1,!1;if(void 0===this._scrolling){if(h+u>=d&&l<0||0==h&&l>0)return this._scrolling=!1,!1;this._scrolling=!0}else if(this._scrolling){for(var c=0,p=this._dragTableItemPoints;++c=Math.abs(l)););r.topIndex=this._dragTopIndex+--c*(l>0?-1:1)}}}else Math.abs(a)>10&&(this._scrolling=!0,r.leftPos=this._dragLeftPos-a);return!0},o.prototype._doEnd=function(t){this._scrolling=void 0},o.prototype._doCanceled=function(t,e){this._scrolling=void 0},o.prototype._doInit=function(t,e,i){this._tapY=e,this._tapX=t,this._scrolling=void 0},o}(l);da.TouchScrollTracker=h;var u=function(e){function i(t){return e.call(this,t)||this}return t.__extends(i,e),i.prototype._doStart=function(t,e,i,o){return!0},i.prototype._doDrag=function(t,e,i,o){var n=this._grid.pointToIndex(null,e,i,!1);if(n&&n.itemIndex>=0){var r=this.request.handle,s=r.selectionMask.item;s&&s.inflate(r.dir,n)}return!0},i}(l);return da.TouchSelectTracker=u,da}var pa,_a,fa={};function ga(){if(pa)return fa;pa=1,Object.defineProperty(fa,"__esModule",{value:!0}),fa.MobileSelectionMask=fa.MobileSelectionLayer=fa.MobileSelectionHandle=void 0;var t=d,e=jn(),i=zn(),o=E(),n=function(e){function i(t,i){var o=e.call(this,t.doc,"mobileSelectionHandle")||this;return o._dir=i,o._owner=t,o}return t.__extends(i,e),i.prototype._doDispose=function(){this._owner=null,e.prototype._doDispose.call(this)},_dp(i,"selectionMask",{get:function(){return this._owner}}),_dp(i,"dir",{get:function(){return this._dir}}),i.prototype._getCssSelector=function(){return i.STYLE_NAME+this._dir+"-handle"},i.prototype._initDom=function(t){e.prototype._initDom.call(this,t),t.style.background="red"},i.prototype._doDraw=function(){},i.STYLE_NAME="rg-selection-handle",i}(e.VisualElement);fa.MobileSelectionHandle=n;var r=function(e){function n(t,i){return e.call(this,t,i)||this}return t.__extends(n,e),n.prototype._doDispose=function(){},n.prototype.getSelectHandle=function(t){for(var e in this._views){var i=this._views[e];if(i.leftHandle._dom===t)return i.leftHandle;if(i.topHandle._dom===t)return i.topHandle;if(i.bottomHandle._dom===t)return i.bottomHandle;if(i.rightHandle._dom===t)return i.rightHandle}},n.prototype.addView=function(t){var e=t.$_hash,i=this._views[e];return i||(i=this._pool.pop()||new s(this.doc),this._views[e]=i),i._item=t,this.addChild(i),this.addChild(i.leftHandle),this.addChild(i.topHandle),this.addChild(i.bottomHandle),this.addChild(i.rightHandle),i},n.prototype.clearViews=function(){for(var t in this._views){var e=this._views[t];this.removeChild(e.leftHandle),this.removeChild(e.topHandle),this.removeChild(e.bottomHandle),this.removeChild(e.rightHandle),this.removeChild(e),this._pool.push(e)}this._views={}},n.prototype.layout=function(){var t=this._grid.layoutManager,e=new o.Rectangle;for(var n in this._views){var r=this._views[n],s=r.item,a=!1,l=new o.Rectangle;if(r.prepare(),s instanceof i.RowSelection){a=this.$_getMobileSelectionRowsRect(t,s,r,l);var h=t.gridBounds;e.set(l.x,l.y,h.width,l.height),r._lefted=!0,r._righted=!0}else s instanceof i.ColumnSelection||(a=this.$_getMobileSelectionRangeRect(t,s,r,l,e));if(a){var u=t.footerBounds.y+t.contentBounds.y;l.bottom>u&&(r._bottomed=!0,l.bottom=u)}r.visible=a,r.visible&&(r.setRectI(l),r.updateElement(),this._layoutHandle(r,l,e),r.invalidate(!1,!0))}},n.prototype._layoutHandle=function(t,e,i){var o,n,r=13,s=13,a=this._grid.mobileOptions.showSelectionHandle;!t._lefted&&a?(t.leftHandle.visible=!0,o=i.x-6.5,n=e.y+(e.height-r)/2,t.leftHandle.setBounds(o,n,s,r)):t.leftHandle.visible=!1,o=i.x+(i.width-s)/2,n=e.y-6.5,!t._toped&&o>=e.x&&a?(t.topHandle.visible=!0,t.topHandle.setBounds(o,n,s,r)):t.topHandle.visible=!1,n=e.bottom-6.5,!t._bottomed&&o>=e.x&&a?(t.bottomHandle.visible=!0,t.bottomHandle.setBounds(o,n,s,r)):t.bottomHandle.visible=!1,!t._righted&&a?(t.rightHandle.visible=!0,o=i.right-6.5,n=e.y+(e.height-r)/2,t.rightHandle.setBounds(o,n,s,r)):t.rightHandle.visible=!1},n.prototype.$_getMobileSelectionRowsRect=function(t,i,o,n){return e.prototype.$_getSelectionRowsRect.call(this,t,i,o,n)},n.prototype.$_getMobileSelectionColumnsRect=function(t,i,o,n){return e.prototype.$_getSelectionColumnsRect.call(this,t,i,o,n)},n.prototype.$_getMobileSelectionRangeRect=function(t,o,n,r,s){return!(o instanceof i.BlockSelection&&o.move)&&e.prototype.$_getSelectionRangeRect.call(this,t,o,n,r,s)},n}(i.SelectionLayer);fa.MobileSelectionLayer=r;var s=function(e){function i(t){var i=e.call(this,t)||this;return i._leftHandle=new n(i,"left"),i._topHandle=new n(i,"top"),i._bottomHandle=new n(i,"bottom"),i._rightHandle=new n(i,"right"),i}return t.__extends(i,e),i.prototype._doDispose=function(){this._leftHandle=this._leftHandle.dispose(),this._topHandle=this._topHandle.dispose(),this._bottomHandle=this._bottomHandle.dispose(),this._rightHandle=this._rightHandle.dispose(),e.prototype._doDispose.call(this)},_dp(i,"leftHandle",{get:function(){return this._leftHandle}}),_dp(i,"topHandle",{get:function(){return this._topHandle}}),_dp(i,"bottomHandle",{get:function(){return this._bottomHandle}}),_dp(i,"rightHandle",{get:function(){return this._rightHandle}}),i.prototype.prepare=function(){e.prototype.prepare.call(this)},i.prototype.updateElement=function(){e.prototype.updateElement.call(this)},i.prototype._initDom=function(t){e.prototype._initDom.call(this,t),this.setImportantStyle("overflow","hidden"),this.setImportantStyle("pointer-events","none")},i.prototype._visibleChanged=function(){this._leftHandle.visible=this._topHandle.visible=this._bottomHandle.visible=this._rightHandle.visible=this.visible},i}(i.SelectionMask);return fa.MobileSelectionMask=s,fa}function ma(){if(_a)return Gs;_a=1,Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.GridSelectionTool=Gs.RowFocusView=Gs.RowHoverView=Gs.GridTool=Gs.RowMoverProxy=Gs.RowMoverLine=Gs.HeaderCellMover=Gs.HeaderCellFeedback=Gs.HeaderCellResizer=Gs.RowBlockView=Gs.GroupFocusView=Gs.FocusMask=Gs.FocusView=Gs.ClickData=void 0;var t=d,e=gs(),i=ml(),o=jn(),n=bs(),r=Tr(),s=cn(),a=Ar(),l=js(),h=zn(),u=C(),c=S(),p=Ko(),_=Gi(),f=rn(),g=Wn(),m=_s(),y=Nr(),v=fs(),w=E(),x=ji(),b=dn(),I=Rr(),R=Vr(),T=Zs(),D=Ro(),k=ta(),M=ha(),O=Is(),F=ca(),L=ga(),P=ps(),B=Yr(),V=ms(),A=qr(),N=function(){function t(){}return t.assignData=function(e){var i=new t;return Object.keys(e).forEach((function(t){return i[t]=e[t]})),i},t.getData=function(e){var i=new t;return i.cellType=e,i},t.getSub=function(e,i){var o=new t;return o.cellType=e,o.subType=i,o},t.getField=function(e,i,o){var n=new t;return n.cellType=e,n.field=n.fieldIndex=i,n.fieldName=o,n},t.getItem=function(e,i,o){var n=new t;return n.cellType=e,n.itemIndex=i,null!=o&&(n.dataRow=o),n},t.getLayout=function(e,i){var o=new t;return o.cellType=e,i instanceof b.CellLayoutGroupItem?(o.subType=u.GridCellType.LAYOUT_HEADER,o.column=i.name):(o.column=i.firstColumn&&i.firstColumn.name,i.firstColumn instanceof f.DataColumn&&(o.field=o.fieldIndex=i.firstColumn.dataIndex,o.fieldName=i.firstColumn.fieldName)),o},t.getCell=function(e,i,o){var n=new t;e===u.GridCellType.DATA&&(n.editable=i.editable,n.readOnly=i.readonly);var r=i.layout;return n.cellType=e,n.itemIndex=o?o.itemIndex:i.item.index,n.dataRow=o?o.dataRow:i.item.dataRow,n.column=i.layout.firstColumn&&i.layout.firstColumn.name,r.firstColumn instanceof f.DataColumn&&(n.field=n.fieldIndex=r.firstColumn.dataIndex,n.fieldName=r.firstColumn.fieldName),n.fieldName&&(n.value=o.value),n},t.getGroupFooter=function(e,i,o,n){var r=new t,s=o.firstColumn;return r.cellType=e,r.itemIndex=i,r.index=n,r.column=s&&s.name,s instanceof f.DataColumn&&(r.field=r.fieldIndex=s.dataIndex,r.fieldName=s.fieldName),r},t.getSummary=function(e,i,o){var n=new t;return n.cellType=e,n.index=i,n.column=o.firstColumn&&o.firstColumn.name,o.firstColumn instanceof f.DataColumn&&(n.field=n.fieldIndex=o.firstColumn.dataIndex,n.fieldName=o.firstColumn.fieldName),n},t.getGroupElt=function(e,i){var o=new t;return o.cellType=e,o.groupLevel=i,o},t}();Gs.ClickData=N;var $=function(e){function i(t,i){var o=e.call(this,t,"focusView")||this;return o._editing=!1,o._focusType=u.FocusType.LAYER,o._inner=i,o}return t.__extends(i,e),_dp(i,"focusType",{get:function(){return this._focusType},set:function(t){t!==this._focusType&&(this._focusType=t,this.$_typeChanged(t))}}),i.prototype.$_createLine=function(t){function e(t,e,i){var o=t.createElement("div");o.className=e?"rg-focus-inner-line":"rg-focus-line";var n=o.style;return n.display="none",n.position="absolute",n.boxSizing="border-box",n.left="0px",n.top="0px",1!==i&&(n.borderTop="none"),2!==i&&(n.borderBottom="none"),3!==i&&(n.borderLeft="none"),4!==i&&(n.borderRight="none"),o}var i=(0,c.getDoc)(t);t.appendChild(this._topLine=e(i,this._inner,1)),t.appendChild(this._bottomLine=e(i,this._inner,2)),t.appendChild(this._leftLine=e(i,this._inner,3)),t.appendChild(this._rightLine=e(i,this._inner,4))},i.prototype.$_typeChanged=function(t){var e=this._dom.style;this._topLine||this.$_createLine(this._dom),t===u.FocusType.LINE?(e.height="0px",e.width="0px",e.border="none",this._topLine.style.display=this._bottomLine.style.display=this._leftLine.style.display=this._rightLine.style.display="block",this.invalidate()):(e.removeProperty("border"),this._topLine.style.display=this._bottomLine.style.display=this._leftLine.style.display=this._rightLine.style.display="none")},i.prototype.$_linePosition=function(t,e,i,o){var n=this._topLine.style,r=this._bottomLine.style,s=this._leftLine.style,a=this._rightLine.style,l=this.parent.width,h=this.parent.height;r.left=n.left=-t+"px",r.width=n.width=l+t+"px",r.top=o-2+"px",a.height=s.height=h+"px",a.left=i-2+"px",r.display=h0&&r=o.topIndex+n&&r<=n+o.topIndex+o.fullItemCount)&&this.$_resetFocusView(),!i.isEditing()&&e.item instanceof x.DummyEditItem&&i.append()},i.prototype.currentRowChanged=function(t,e){var i=this.grid,o=i.displayOptions;if(this._rowBlockStart=-1,this._rowBlockEnd=-1,o.rowBlockType!=u.RowMaskType.NONE){var n=o.rowBlockCallback;if(n){var r;(r=n(i.handler,i.getItemIndexOfRow(e)))?(this._rowBlockStart=r.start,this._rowBlockEnd=r.end):this._rowBlockStart=this._rowBlockEnd=-1}}this.$_resetRowBlockMask()},i.prototype.getNextRequest=function(t,e,i,o){return null},i.prototype.isMouseEventTarget=function(t){if(t instanceof n.CellElement){var i=t.getAncestor(r.TableBaseElement);if(i)return i.getContentAt(t.index)==this.mouseEventTarget}return e.prototype.isMouseEventTarget.call(this,t)},i.prototype._doSetFocus=function(t){!c.Utils.isMobile()&&this.grid.setFocus(t),this._focusMask.setActivated(this.grid.container.hasFocus())},i.prototype._doFocusLeave=function(t){var e=this.grid;e._resetTdFocus=void 0,e.editOptions.commitWhenLeave&&(e.isEditing()||e.isItemEdited())&&e.container.hasFocus()&&(e.commit(!1,void 0,!1)||c.Utils.stopEvent(t,!0)),c.Utils.isSlotMode()&&e.closePopups(),this._focusMask.setActivated(e.container.hasFocus())},i.prototype._doGlobalKeyup=function(t){var e=this.grid;"Tab"===t.code?e.setEventFrom("keyup_tab"):e.setEventFrom("keyup")},i.prototype._doGlobalKeydown=function(t){var e=this.grid;"Tab"===t.code?e.setEventFrom("keydown_tab"):e.setEventFrom("keydown")},i.prototype._doLayoutChanged=function(){},i.prototype.$_resetFocusView=function(){var t=this._grid,e=t.layoutManager,i=t.displayOptions,o=t.focusedIndex,n=t.fixedOptions,r=this._tempInnerIndex.assign(o),s=!1,a=!1,l=!1;if(i.focusVisible&&t.isValid(r)&&!t.isEditing()){var h=r.item,d=t.getBodyViewAt(r),c=d.getCellAt(e,r),p=c;if(!c&&r.layout.merged){var _=e.getMergeRoom(r);_&&(r.itemIndex=e.fixedItemCount+e.topIndex,_.contains(r)&&(c=d.getCellAt(e,r)),c||(r.itemIndex=e.fixedItemCount+e.topIndex+e.itemCount-1,_.contains(r)&&(c=d.getCellAt(e,r))))}if(c&&!c.grouped){var f=t.isEditing(),g=d.getCellRectAt(e,r,!0);if((g=d.boundsByContainer(g)).width>0&&g.height>0){var m=0,y=g.width;if(!r.colFixed&&!r.rightFixed){var v=e.fixedContentBounds;m=Math.max(0,v.right-g.x),y=Math.max(0,g.width-m),v=e.rightContentBounds,y-=g.right-v.x}if(y>0){f&&(g.y--,g.height+=1);var C=g.clone();if((v=e.footerBounds.clone()).y+=e.contentBounds.y,Math.max(0,g.bottom-v.y),g.width=Math.min(g.width,y),g.x+=m,g.bottom=Math.min(g.bottom,v.y),this._focusMask.setRect(g),this._focusMask.focusType=i.focusType,this._focusMask.updateElement(-m,0,C.width,C.height,f),s=!0,!(t.canMergeEditing(p)&&!1))if(p&&p.merged){if(i.showInnerFocus)if((I=d.getCellRectAt(e,r,!1)).height=T?k-e.topIndex:k)>=0&&k<=e.itemCount-1){switch((g=e.getTableItemBounds(k)).y+=e.contentBounds.y+e.bodyBounds.y,g.bottom>R&&(g.bottom=R),S){case u.RowMaskType.DATA:g.x=t.fixedContentPane.x,g.right=t.rightContentPane.width?t.rightContentPane.right:t.contentPane.right;break;case u.RowMaskType.FILL:g.x=0,g.width=t.width;break;case u.RowMaskType.ROW:g.x=0,g.right=t.rightContentPane.width?t.rightContentPane.right:t.contentPane.right}this._rowFocusView.setRect(g),a=!0}else a=!1}if(this._groupFocusMask.visible=i.groupFocusVisible&&t.isValid(o)){var D=o.layout.getAncestor(i.groupFocusLevel);if(D){var k;R=e.footerBounds.y+e.contentBounds.y,T=e.fixedItemCount;if((k=(k=o.itemIndex)>=T?k-e.topIndex:k)>=0&&k<=e.itemCount+T-1){g=e.getTableItemBounds(k),m=0;(I=e.getDataRect(D)).height=g.height,g.x=I.x;y=I.width;g.y+=e.contentBounds.y+e.bodyBounds.y,g.bottom>R&&(g.bottom=R);v=void 0;if(v=!o.colFixed&&n.colCount>0?e.fixedContentBounds:e.rowBarBounds,g.x=Math.max(v.right,I.x),m=Math.min(0,I.x-v.right),!o.rightFixed&&n.rightCount>0){var M=e.rightContentBounds;y-=Math.max(0,I.right-M.x)}y<=0&&(this._groupFocusMask.visible=!1),g.width=y,g.x-=1,g.y-=1,g.width++,g.height++,this._groupFocusMask.setRect(g),this._groupFocusMask.updateElement(m,0,I.width+1,I.height+1)}else this._groupFocusMask.visible=!1}}this._rowFocusView.visible=a,this._focusMask.visible=s,this._innerFocusMask.visible=l,this._focusMask.visible,t.setFocusedClass(o,!0),t.setFocusedRowClass(o,!0)},i.prototype.$_resetRowBlockMask=function(){var t=this.grid,e=t.layoutManager,i=e.fixedItemCount,o=t.topItem,n=this._rowBlockMask,r=t.displayOptions.rowBlockType,s=this._rowBlockStart,a=this._rowBlockEnd,l=Math.max(s-o+i,i),h=Math.min(Math.max(a-o+i),e.itemCount+i-1);if(n.visible=r&&r!=u.RowMaskType.NONE&&l>=0&&h>=0&&ld&&(c.bottom=d),r){case u.RowMaskType.DATA:c.x=t.fixedContentPane.x,c.right=t.rightContentPane.width?t.rightContentPane.right:t.contentPane.right;break;case u.RowMaskType.FILL:c.x=0,c.width=t.width;break;case u.RowMaskType.ROW:c.x=0,c.right=t.rightContentPane.width?t.rightContentPane.right:t.contentPane.right}n.setRect(c)}},i.prototype.$_resetFocusButton=function(t){var e,i=this.grid;if(i.isValid(t)){var o=i.getBodyViewAt(t),n=i.getBodyCellAt(t),r=this._tempIndex.assign(t);if(!n&&r.layout.merged){var s=i.layoutManager;(e=s.getMergeRoom(r))&&(r.itemIndex=s.fixedItemCount+s.topIndex,e.contains(r)&&(n=i.getBodyCellAt(r)),n||(r.itemIndex=s.fixedItemCount+s.topIndex+s.itemCount-1,e.contains(r)&&(n=i.getBodyCellAt(r))))}var a=o&&n&&o.getRowView(n.item);a&&a.$_setButtons(i,n,n.cell.firstElementChild,e)}},i.prototype._doCancel=function(t){if(t.closeFilterSelector(),t.isEditing())t.cancelEditor(!0);else if(t.isItemEditing())t.itemEditCancel()&&t.cancel();else if(this.dragging&&this.dragTracker)try{this._stopDragTracker(null,null,!0,null),this.dragTracker.cancel(),this.dragTracker.linkable&&t.container.cancelOtherContainer(this.dragTracker)}catch(t){throw t}finally{this.dragTracker=null}},i.prototype._doEnter=function(t,e,i,o){var n=t.isEditing(),r=o.shiftKey;if(n&&!e.enterToTab)t.commitEditor(!0);else{var a=i.clone(),l=e.skipReadOnly,h=e.skipReadOnlyCell,u=t.editController,d=s.CellIndex.areEquals(u.editIndex,a)&&u.currentEditor(),c=d&&d.dropDownWhenEnter,_=e.enterToEdit||c;if(t.isValid(a)){if(e.enterToNextRow&&(!r&&a.itemIndex0))r?a.up():a.down(),h&&this._checkReadOnly(a)&&(this._skipReadOnlyCell(a,r?-1:1)||a.assign(i));else if(!r&&(!_||n)&&e.enterToTab&&e.enterToNextCell&&e.crossWhenExitLast&&(a.isLast||e.skipReadOnly&&a.isEditableLast)&&a.itemIndex0)a.up(),a.lastCell(),l&&this._skipReadOnly(a,-1);else if((!n||e.enterToTab)&&e.commitWhenExitLast&&a.isLast){try{t.commit(e.commitWhenNoEdit)}catch(i){throw i instanceof p.ValidationError&&(i=t._fireValidationFail(a.item.index,i.column,i))&&alert(e.showOnlyValidationMessage&&i.userMessage?i.userMessage:i.toString()),i}e.appendWhenExitLast&&a.itemIndex===t.itemCount-1&&(t.append(),t.isItemEditing()&&(a.down(),a.firstCell()))}else if(e.enterToTab&&(t.isEditing()||this._checkReadOnly(a))||!_){if(t.isEditing())if(!t.commitEditor(!0))return!0;e.enterToNextCell&&(r?(a.prev(),this._getPrevVisible(t,a)):(a.next(),this._getNextVisible(t,a)),l&&!this._skipReadOnly(a,r?-1:1)&&a.assign(i))}}else a.normalize(t);s.CellIndex.areEquals(a,i)?t.isValid(a)&&_&&!n&&!t.isEditing()&&i&&i.dataColumn&&!this._checkReadOnly(i)&&t.showEditor(i,!1,c):this.setFocused(a,!0,!0)}return!0},i.prototype._doTab=function(t,e,i,o){var n=i.clone(),r=!1,a=o.shiftKey;if(t.isValid(n)){if(e.useTabKey){var l=e.exitGridWhenTab;if(a){if(e.crossWhenExitLast&&(n.isFirst||e.skipReadOnly&&n.isEditableFirst)&&n.itemIndex>0?(n.up(),n.lastCell()):(n.prev(),this._getPrevVisible(t,n)),e.skipReadOnly&&!this._skipReadOnly(n,-1)&&n.assign(i),s.CellIndex.areEquals(n,i)&&l){switch(l){case"row":r=!0;break;case"grid":r=n.itemIndex<=0}if(r)return!c.Utils.isMobile()&&t.container._containerDom.setAttribute("tabindex","-1"),!1}}else{if(e.crossWhenExitLast&&(n.isLast||e.skipReadOnly&&n.isEditableLast)&&n.itemIndex=t.itemCount-1}if(r)return!1}}return s.CellIndex.areEquals(n,i)||this.setFocused(n,!0,!0),o&&(o.preventDefault&&o.preventDefault(),o.stopImmediatePropagation()),!0}}else n.normalize(t),this._skipReadOnly(n,1);return a&&!c.Utils.isMobile()&&t.container._containerDom.setAttribute("tabindex","-1"),!1},i.prototype._getNextVisible=function(t,e){t.getBodyViewAt(e).getNextVisibleCell(e)},i.prototype._getPrevVisible=function(t,e){t.getBodyViewAt(e).getPrevVisibleCell(e)},i.prototype._checkReadOnly=function(t){var e=this.grid;if(!e.isValid(t))return!0;var i=e.getWritableAt(t,!0);return null!=i?!i:!t.dataColumn.isWritable()},i.prototype._skipReadOnly=function(t,e){var i=!1;if(this.grid.editOptions.skipReadOnly){var o=this._skipIndex;if(o.assign(t),!(i=!this._checkReadOnly(o)))if(e>0){for(;o.next();)if(!this._checkReadOnly(o)){t.assign(o),i=!0;break}}else for(;o.prev();)if(!this._checkReadOnly(o)){t.assign(o),i=!0;break}}return i},i.prototype._skipReadOnlyCell=function(t,e,i){var o=this.grid,n=!t.dataColumn.isWritable()&&!0;if(!n&&o.editOptions.skipReadOnlyCell){var r=this._skipIndex;r.assign(t),n=!this._checkReadOnly(r)}return n},i.prototype._commitCancel=function(t,e){var i=this.grid;try{switch(t.itemState){case _.ItemState.INSERTING:return i.commit(e.forceInsert)||i.cancel(!0),!0;case _.ItemState.APPENDING:return i.commit(e.forceAppend)||i.cancel(!0),!0;case _.ItemState.UPDATING:return i.commit(e.commitWhenNoEdit)||i.cancel(!0),!0}}catch(o){if(o instanceof p.ValidationError)return(o=i._fireValidationFail(t.index,o.column,o))&&alert(e.showOnlyValidationMessage&&o.userMessage?o.userMessage:o.toString()),!1;if(o instanceof p.AbortError)return!1;throw o}return!1},i.prototype._editButtonClicked=function(t,e){},i}(e.VisualTool);Gs.GridTool=K;var Z=function(e){function i(t){var i=e.call(this,t,"rowHoverView")||this;return i.visible=!1,i}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},i.prototype._getCssSelector=function(){return"rg-rowhover"},i.prototype._initDom=function(t){e.prototype._initDom.call(this,t),this.setImportantStyle("pointer-events","none")},i}(o.LayerElement);Gs.RowHoverView=Z;var J=function(e){function i(t){var i=e.call(this,t,"rowFocusView")||this;return i.visible=!1,i}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},i.prototype._getCssSelector=function(){return"rg-rowfocus"},i.prototype._initDom=function(t){e.prototype._initDom.call(this,t),this.setImportantStyle("pointer-events","none")},i}(o.LayerElement);Gs.RowFocusView=J;var Q=function(e){function o(t,i){var o=e.call(this,t,i)||this;o._checkScroll=Date.now(),o._prevScroll=Date.now(),o._wheelDeltaY=0,o._tempRect=new w.Rectangle,o._reqPoint=new g.Point,o._swipeTimer=null,o._swipeDistance=0,o._swipeDuration=0,o._swipeStarted=null,o._swipeAmount=0;var n=t.doc,r=o.grid;return o._cellResizer=new j(n),o._cellMover=new Y(n),o._cellFeedback=new z(n),o._rowMoverLine=new q(n),o._rowMoverProxy=new X(n),o._colResizeReq=new l.ColumnResizeRequest(r),o._colMoveReq=new l.ColumnMoveRequest(r),o._rowResizeReq=new l.RowResizeRequest(r),o._headerResizeReq=new l.HeaderResizeRequest(r),o._rowMoveReq=new l.RowMoveRequest(r),o._tooltipIndex=new s.CellIndex(r),c.Utils.isMobile()&&(o._touchScrollRequest=new F.TouchScrollRequest(r),o._touchScrollTracker=new F.TouchScrollTracker(r),o._touchSelectRequest=new F.TouchSelectRequest(r),o._touchSelectTracker=new F.TouchSelectTracker(r)),o}return t.__extends(o,e),o.prototype._doDispose=function(){this._clickCell=null,this._clickElement=null,this._cellResizer=this._cellResizer.dispose(),this._cellMover=this._cellMover.dispose(),this._cellFeedback=this._cellFeedback.dispose(),this._rowMoverLine=this._rowMoverLine.dispose(),this._rowMoverProxy=this._rowMoverProxy.dispose(),this._colResizeReq=this._colResizeReq.dispose(),this._colMoveReq=this._colMoveReq.dispose(),this._rowMoveReq=this._rowMoveReq.dispose(),this._rowResizeReq=this._rowResizeReq.dispose(),this._headerResizeReq=this._headerResizeReq.dispose(),clearTimeout(this._tooltipShowTimer),e.prototype._doDispose.call(this)},o.prototype._doDeactivated=function(){this._clickCell=this._clickElement=null},o.prototype._doDragTrackerFinished=function(t,e){e||t.clickable||(this._clickCell=this._clickElement=null)},o.prototype.$_getIndexAt=function(t,e,i,o,n){var r=t.getDataCellIndex(o,this._tempIndex),s=i.getCellAt(e,r);if(s&&s.merged){var a=e.getTableRowIndex(n);if(a<0)return r;var l=i.getRowIndex(a);r.itemIndex=Math.min(Math.max(s.item.index,l),s.item.index+s.rowSpan-1)}return r},o.prototype._doPointerDown=function(t){var e=t.mouseX,i=t.mouseY,o=c.Utils.ctrlKey(t),n=t.shiftKey,r=t.altKey,d=t.button,p=this.grid,_=p.layoutManager,f=p.displayOptions,g=p.focusedIndex.clone(),m=p.selections.exclusiveMode;this._longTimer=c.Utils.isMobile()&&setTimeout(this._longTimerHandler,p.mobileOptions.longTapDuration),this._hideTooltip(),p.closePopups(),p.setEventFrom("mousedown"),this._scrollY=window.scrollY,this._swipeTimer=clearInterval(this._swipeTimer),this._touchMoving=!1;var v=this._clickCell=null,C=this._clickElement=null;if(this._userActionIndex=null,0==d||p.displayOptions.rightClickable&&2==d){var w=this._tempIndex,x=this.mouseEventTarget,b=0==d&&!(c.Utils.isMac&&t.ctrlKey)&&(this._getEditRequest(x,g,e,i,o,n,r)||this._getSelectRequest(x,e,i,o,n,r)||c.Utils.isMobile()&&this._getTouchRequest(t));if(b instanceof l.GridEditRequest&&!b.canFocus())b instanceof l.RowMoveRequest&&(v=this._clickCell=this._findTableCell(),C=this._clickElement=this.findElementAt(e,i,!1));else if(v=this._clickCell=this._findTableCell(),C=this._clickElement=this.findElementAt(e,i,!1),v){var E=p.getTableView(v),S=E instanceof y.HeaderElement,R=E instanceof a.GridBodyElement,T=E instanceof M.RowBarContainer&&E.isRowIndicator(v);if(o&&f.selectionRemovable&&!m&&(!b||b instanceof l.SelectRequest)){var D=null;if(R?w=this.$_getIndexAt(p,_,E,v,i):S?(w.layout=E.layoutByCell(v),D=h.ColumnSelection):T&&(w.itemIndex=v.parentElement[u.T_ROW],D=h.RowSelection),k=p.selections.getItemByIndex(w,D))return p.selections.remove(k),void(R&&this.setFocused(w,!1,0===p.selections.getItems().length))}if(S||R||T){var k=p.selections.lastItem();if(R?(w=this.$_getIndexAt(p,_,E,v,i),p.editOptions.focusMoveStep===s.FocusMoveStep.GROUP&&(w.layout=w.layout.getAncestor(p.displayOptions.groupFocusLevel).first)):S?(w.assign(p.focusedIndex),w.layout=E.layoutByCell(v)):(w.assign(p.focusedIndex),w.itemIndex=v.parentElement[u.T_ROW]),S)if(o&&n)k&&this.$_resizeSelection(k,w,h.SelectionStyle.COLUMNS);else{if(n)return;o&&b instanceof l.SelectRequest&&p.selections.containsLayout(w.layout,h.ColumnSelection)&&(b=null)}else{if(n&&k){var O=S?h.SelectionStyle.COLUMNS:T?h.SelectionStyle.ROWS:null;return void this.$_resizeSelection(k,w,O)}if(R){if(this.$_checkAppending(p.focusedIndex,!0,w))return this._clickElement=null,void(this._clickCell=null);var L=E.getCellAt(_,w),P=E.bodyCellByCell(this._clickCell);if(P&&L&&0===d&&P.isEditButton(t.target))this.setFocused(w,!0,!0)&&L.editable&&!L.readonly&&p.editController.buttonDown(w,t);else if(c.Utils.isMobile()&&b instanceof F.TouchScrollRequest){this.grid.container.addMouseEvent(null)}else{var B=!(o&&p.selections.containsCell(w));this.setFocused(w,!o,B)||b instanceof l.SelectRequest&&(b=null)}}else if(T&&p.rowIndicator.selectable)if(o&&b instanceof l.SelectRequest&&p.selections.containsItem(w.itemIndex,h.RowSelection)&&(b=null),null==w.column&&w.item.isDataRow&&(w.layout=p.getFirstLayout()),b instanceof l.SelectRequest){if(this.setFocused(w,m||!o,!1)){var V=k&&(0,h.isRowSelection)(k)?k.getItemIndices():[];(1!==V.length||V[0]!==w.itemIndex)&&p.selections.selectRow(w.itemIndex,!o)}_.clearFocusRequest()}else{B=void 0;B=p.displayOptions.selectionStyle===h.SelectionStyle.SINGLE_ROW?!(o&&p.selections.containsItem(w.itemIndex,null)):!(o&&p.selections.containsCell(w)),this.setFocused(w,m||!o,B)}}}}else(0,I.isItemElement)(C)&&(w.assign(p.focusedIndex),w.itemIndex=C.itemIndex,null==w.column&&(w.layout=p.getFirstLayout()),this.setFocused(w,!0,!0));!b||p.isItemEditing()&&b.selectable||(this.dragTracker=this._getDragTracker(b,e,i),b instanceof l.ColumnResizeRequest&&t.target.setPointerCapture(t.pointerId))}p.$_resetHovering(e,i);var A=this.dragTracker;A&&A.startWhenCreated?this._startDragTracker(e,i,t):A&&A.init(e,i,t)},o.prototype._doPointerCancel=function(t){this.grid.container.removeMouseEvent()},o.prototype._doMouseDown=function(t){var e=this.grid,i=e.editOptions,o=c.Utils.ctrlKey(t),n=e.selections.exclusiveMode,r=t.mouseX,a=t.mouseY,l=this._tempIndex;if(s.CellIndex.areEquals(l,this.focused)&&i.editWhenClickFocused)e.showEditor();else{var h=!(o&&e.selections.containsCell(l));this.setFocused(l,n||!o,h)}e.$_resetHovering(r,a)},o.prototype.$_checkOtherGridRowMoving=function(t,e){this._dragTimer=this._dragTimer&&clearInterval(this._dragTimer);var o=this.grid,n=o.container,r=n.getMouseContainer(),s={index:-1,position:0,column:void 0};if(r&&r!==n){var l=c.Utils.isMobile()&&document.elementFromPoint(t.clientX,t.clientY);if(n.findContainer(t,l)!==n)o.removeFeedbackElement(this._rowMoverLine);else if(e instanceof m.RowMoveTracker){for(var h=n.eventToContainer(t),u=n.findElementAt(h.x,h.y,!1),d=!1,p=[R.RowElement,k.RowBarElement,M.RowBarContainer,i.GridBase,a.GridBodyElement],_=0;_=0&&i.$_dropData(e.grid,e.sourceItems,o)}},o.prototype.cancelFrom=function(t){var e=this.grid;this._dragTimer=this._dragTimer&&clearInterval(this._dragTimer),t instanceof m.RowMoveTracker&&e.removeFeedbackElement(this._rowMoverLine)},o.prototype._doPointerMove=function(t){var e,i=t.mouseX,o=t.mouseY,n=c.Utils.ctrlKey(t),r=this.grid,s=r.layoutManager,l=this.mouseEventTarget,h=t.shiftKey,u=t.altKey;r.$_resetHovering(i,o)||this._hideTooltip();var d=r.container,p=d.getMouseContainer();if(!p||d===p){var _=this.dragTracker;if(!_||!_.active){var f=this._getEditRequest(l,r.focusedIndex,i,o,n,h,u);if(c.Utils.isMobile()&&!f&&(f=this._getTouchRequest(t)),!f&&r.editOptions.movable&&t.altKey&&r.displayOptions.altSelectAndImmediateDrag&&(f=this._getSelectRequest(l,i,o,n,h,u))&&(e=r.dataDropOptions.cursor),!e&&f&&f.cursor&&(e=f.cursor),r.setCursor(l,e||"default"),!f&&!this.dragging){var g=this._findTableCell(),m=g&&r.getTableView(g);if(m instanceof a.GridBodyElement){var y=m.bodyCellByCell(g);if(y&&y.merged){var v=y.head||y,C=this.$_getIndexAt(r,s,m,g,o);if(!v.contains(r.focusedIndex)){if(y.buttons){var w=m.getRowView(v.item);w instanceof R.RowElement&&w.moveCellButtons(s,v,C.itemIndex)}var x=r.canMergeEditing(v);if(v.renderer2&&v.renderer2.refreshFocusChanged){var b=m.getCellRectAt(s,C,!1),I=m.getCellRect(s,v,!0),E=v.renderer2,S=b.top-I.top+b.height/2-I.height/2;E.moveClickElement(S,x)}}}}}}}},o.prototype._doPointerUp=function(t){var e=this._findTableCell(),i=this.grid,o=i.focusedIndex,n=i.layoutManager;i.setEventFrom("mouseup");var r=i.getCellType(e);if(i.setCursor(this.mouseEventTarget,"default"),i.editController.buttonUp(null,t),c.Utils.isMobile()){if(this._longPressed&&c.Utils.isiOS){var a=new PointerEvent("contextmenu",{bubbles:!0,clientX:t.clientX,clientY:t.clientY});return void t.target.dispatchEvent(a)}r===u.GridCellType.DATA&&this.dragTracker&&this.dragTracker.clickable&&!s.CellIndex.areEquals(this._tempIndex,o)&&this.setFocused(this._tempIndex,!0,!0)}if(r===u.GridCellType.DATA&&(!this.dragTracker||this.dragTracker.scrollable)){var l=e&&i.cellToIndex(e);i.isValid(o)&&s.CellIndex.areEquals(o,l)&&!n.focusIsVisible(o)&&(n.makeCellVisible(o),i.invalidateLayout())}},o.prototype._doClick=function(t,e,i){if(c.Utils.isMobile()&&this._longPressed)c.Utils.stopEvent(t,!0);else{e=e||t.mouseX,i=i||t.mouseY;var o,n=this.grid,r=this.findElementAt(e,i,!1),a=this._findTableCell(),h=n.getCellType(a),d=this.focused,p=h===u.GridCellType.DATA&&n.cellToIndex(a);(!n._eventFrom||n._eventFrom.indexOf("key")>=0)&&(this._clickCell=a=this._findTableCell(t.target),n.getCellType(a)===u.GridCellType.DATA&&(d=n.getDataCellIndex(a))),n.setEventFrom(null);try{if(a&&a==this._clickCell){var _=n.getCellType(a),f=void 0,g=void 0;switch(_){case u.GridCellType.HEAD:if(this.$_gridCellClicked(o=N.getSub(_,n.headView.getCellType(a))),"check"===o.subType){var m=n.headView._checkCell;c.Utils.included(t.target,m._check,m._image,m._span)&&this._checkAllClicked()}break;case u.GridCellType.FOOT:this.$_gridCellClicked(N.getSub(_,n.footView.getCellType(a)));break;case u.GridCellType.INDICATOR:case u.GridCellType.STATE:case u.GridCellType.CHECK:_===u.GridCellType.CHECK&&this.$_checkCellClicked2(a,t),f=n.rowBarContainer.rowOf(a),g=n.getRowOfItem(f);var y=n.getItem(f);(_!==u.GridCellType.CHECK||y.checkable)&&this.$_gridCellClicked(N.getItem(_,f,g));break;case u.GridCellType.HEADER:var v=n.getHeaderView(a),C=v.tableCellByCell(a);if(!(this._getEditRequest(this.mouseEventTarget,d,e,i,!1,!1,!1)instanceof l.ColumnResizeRequest)&&this._doColumnHeaderClicked(t,C.layout)){var w=v.layoutByCell(a);w instanceof b.CellLayoutGroupItem&&w.hideChildHeaders&&w.tiedColumn&&(w=w.tiedColumn.layout),this.$_gridCellClicked(N.getLayout(_,w))}break;case u.GridCellType.DATA:var x=n.getBodyView(a).bodyCellByCell(a),I=s.CellIndex.areEquals(d,p)||x.contains(d);if(I||n.editOptions.focusMoveStep===s.FocusMoveStep.GROUP&&(I=d.layout.root===p.layout.root&&d.itemIndex===p.itemIndex),I&&x.grouped)this.$_gridCellClicked(N.getItem(u.GridCellType.GROUP_HEADER,x.item.index,null));else{if(I&&x.isCellButton(t.target))return this.$_cellButtonClicked(x),void(!n.editOptions.exceptDataClickWhenButton&&this.$_gridCellClicked(N.getCell(_,x,d)));if(I&&R.RowElement.isExpander(t.target))return void(!n.editOptions.exceptDataClickWhenButton&&this.$_gridCellClicked(N.getCell(_,x,d)));var E=n.editController._editor,S=x.isEditButton(t.target);if(I&&(S||!x.readonly&&E&&E.dropDownWhenClick)){if(n.layoutManager.focusIsVisible(this.focused))return n.canMergeEditing(x)?this._tempIndex=n.focusedIndex.clone():x.getEditIndex(this._tempIndex),!E||E.editing&&E.listing||this._editButtonClicked(this._tempIndex,t),void this.$_gridCellClicked(N.getCell(_,x,d));S&&n.editController.requestPrepareEditor(!0)}else if(n.isValid(d)&&!c.Utils.ctrlKey(t)){var T=!s.CellIndex.areEquals(this._userActionIndex,n.focusedIndex);(T&&n.editOptions.editWhenFocused||!T&&n.editOptions.editWhenClickFocused)&&n.showEditor()}var D=x.renderer2;if(D)if(I||!D.clickOnlyFocusedCell)return o=N.getCell(_,x,p),this.$_performRendererClick(x,t,o)?void((!n.editOptions.exceptDataClickWhenButton||!D.itemClickable)&&this.$_gridCellClicked(o)):void this.$_gridCellClicked(N.getCell(_,x,p));c.Utils.isInteractive(t.target)&&c.Utils.stopEvent(t,!0)}break;case u.GridCellType.FOOTER:var k=n.getFooterView(a).tableCellByCell(a);this.$_gridCellClicked(N.getSummary(_,k.summaryIndex,k.layout));break;case u.GridCellType.SUMMARY:var M=n.getSummaryView(a).tableCellByCell(a);this.$_gridCellClicked(N.getSummary(_,M.summaryIndex,M.layout));break;case u.GridCellType.INLINE_FILTER:var O=n.getFilterView(a).tableCellByCell(a),F=t.target;F===O.operatorButton&&n.popupMenuManager.show(O.popupMenu,F,this._tempIndex.set(-1,O.layout,this.grid),!1);break;case u.GridCellType.SUM:this.$_gridCellClicked(N.getSub(_,n.sumView.getCellType(a)));break;case u.GridCellType.FILTER:this.$_gridCellClicked(N.getSub(_,n.filterView.getCellType(a)));break;case u.GridCellType.GROUP_FOOTER:var L=n.getBodyView(a).bodyCellByCell(a),P=L.item.footerIndex;this.$_gridCellClicked(N.getGroupFooter(_,L.item.index,L.layout,P));break;case u.GridCellType.GROUP_HEAD:case u.GridCellType.GROUP_FOOT:var B=a[u.T_LEV];this.$_gridCellClicked(N.getGroupElt(_,B));break;case u.GridCellType.GROUP_BAR:var V=a[u.T_ROW];g=this.grid.getRowOfItem(V),this.$_gridCellClicked(N.getItem(_,V,g))}}else if(r&&r===this._clickElement){var A=this._getClickData(r,t);A&&(A.cellType===u.GridCellType.GRID_EMPTY&&n.isEditing()&&n.commitEditor(!0),this.$_gridCellClicked(A))}}finally{if(c.Utils.isMobile()&&t.timeStamp!==this._clickTimeStamp){var $=n.mobileOptions.doubleTapInterval||500;this._clickTimeStamp&&this._clickTimeStamp+$>t.timeStamp&&this._clickElt===this._findTableCell(t.target)?h!==u.GridCellType.DATA||s.CellIndex.areEquals(this._clickIndex,p)?(this._clickTimeStamp=null,this._clickIndex=null,this._doDblClick(t)):this._clickTimeStamp=t.timeStamp:(this._clickTimeStamp=t.timeStamp,this._clickElt=this._findTableCell(t.target),h===u.GridCellType.DATA&&(this._clickIndex=p.clone()))}}}},o.prototype._getClickData=function(t,e){if(t instanceof i.GridBase||t instanceof I.EmptyGridElement||t instanceof a.GridBodyElement)return N.getData(u.GridCellType.GRID_EMPTY);if(2===e.button&&t instanceof V.ScrollElement){var o=u.GridCellType.SCROLL_BAR,n=t.scrollBar&&t.scrollBar.vertical;if(t instanceof V.ScrollThumb)return N.assignData({cellType:o,subType:u.GridCellType.SCROLL_THUMB,vertical:n});if(t instanceof V.ScrollButton)return N.assignData({cellType:o,subType:u.GridCellType.SCROLL_BUTTON,vertical:n,far:t.far});if(t instanceof V.ScrollTrack)return N.assignData({cellType:o,subType:u.GridCellType.SCROLL_TRACK,vertical:n});if(t instanceof V.ScrollEdge)return N.assignData({cellType:o,subType:u.GridCellType.SCROLL_EDGE})}},o.prototype.$_commitRendererEdit=function(t,e,i){var o=e.item,n=e.dataField,r=e.dataColumn,s=!1;try{(s=t.editorCommit(e,o.getData(n),i))&&(t.undoable?t.execute(new T.EditValueCommand(e.item,n,i,e.column)):o.setData(n,i),t.isItemEditing(e.item)&&t.validateCellCommit(e,i))}catch(e){if(!t.editOptions.showCommitError)throw e;alert(e.message||e)}if(s&&t.isCellEditing()){var a=t.itemSource,l=a.editingItem.invalidFields,h=t.validationManager.getError(e);if(h)return l.push(r.dataIndex),void(t.editOptions.showCommitError&&alert(h.userMessage||h.message||h));if(l.indexOf(r.dataIndex)>=0&&l.splice(l.indexOf(r.dataIndex),1),t.validationManager.clearInvalidCell(e),l.length>0)return;var u=t.canMergeEditing(t.getBodyCellAt(e,!0));if(a.commit(u)||a.cancel(),u){var d=r.layout.merges.getRoom(e),c={},p={};p[r.fieldName]=i;for(var _=d.head;_<=d.tail;_++){var f=t.getItem(_);f.isDataRow&&(c[f.dataRow]=p)}a.updateRows2(c)}}},o.prototype.$_performRendererClick=function(t,e,i){var o,n=t.renderer2,r=this.grid,s=r.layoutManager;if(n){if(t.merged)if(e.pointerType){var a=e.mouseY,l=this._findTableCell(),h=l&&r.getTableView(l);o=this.$_getIndexAt(r,s,h,l,a)}else o=r.focusedIndex.clone();else o=n.index;if(r.canWriteAt(o)&&n.canEdit()&&n.canEditClickAt(e)&&r.edit(o)){var u=n.editClick(o,e);if(u)return u.commit&&this.$_commitRendererEdit(r,o,u.value),!0}if(n.canClick(e)){var d=n.click(o,e);if(d)return c.Utils.extendObj(i,d),!1===r._fireCellItemClicked(o,d)&&n.preventDefaultClick(e),!0}return n.preventDefaultEditClick(e),!1}},o.prototype.$_performRendererKey=function(t,e){var i,o=t.renderer2,n=t.head;if(o)i=o.index;else{if(!n||!(o=n.renderer2))return;var r=t.rowIndex-n.rowIndex;(i=o.index.clone()).incRow(r)}var a=this.grid,l=a.canWriteAt(i)&&o.canEdit();if(s.CellIndex.areEquals(i,a.focusedIndex)){var h=N.getCell(a.getCellType(t.cell),t,i);if(l&&o.canEditKey(e)||o.canClickSpaceKey(e))return o.itemClick(e),!0;if(32===e.keyCode&&a.editOptions.buttonClickWhenSpace&&!c.Utils.specialKey(e))return t.button===u.CellButton.ACTION||t.button===u.CellButton.POPUP?(a.closePopups(),t.cellButton.click(),!0):(this.$_gridCellClicked(h),!0)}},o.prototype._doDblClick=function(t){var e=t.mouseX,i=t.mouseY,o=c.Utils.ctrlKey(t),n=t.shiftKey,r=t.altKey,a=this.grid,h=a.layoutManager,d=this.focused,p=this.findElementAt(e,i,!1),_=this._findTableCell();if(a.setEventFrom(null),_&&_==this._clickCell){var f=a.getCellType(_),g=void 0,m=void 0;switch(f){case u.GridCellType.HEAD:this.$_gridCellDblClicked(N.getSub(f,a.headView.getCellType(_)));break;case u.GridCellType.FOOT:this.$_gridCellDblClicked(N.getSub(f,a.footView.getCellType(_)));break;case u.GridCellType.INDICATOR:case u.GridCellType.STATE:case u.GridCellType.CHECK:g=a.rowBarContainer.rowOf(_),m=a.getRowOfItem(g),this.$_gridCellDblClicked(N.getItem(f,g,m));break;case u.GridCellType.HEADER:var y=a.getHeaderView(_),v=y.tableCellByCell(_);if(v&&v.isClickableElt(t.target));else(C=y.layoutByCell(_))instanceof b.CellLayoutGroupItem&&C.hideChildHeaders&&C.tiedColumn&&(C=C.tiedColumn.layout),this.$_gridCellDblClicked(N.getLayout(f,C));var C,w=this._getEditRequest(this.mouseEventTarget,a.focusedIndex,e,i,o,n,r);if(w instanceof l.ColumnResizeRequest)(C=w.layout).firstColumn&&a.fitLayoutWidth(C);break;case u.GridCellType.DATA:var x=a.getBodyView(_),I=x.bodyCellByCell(_),E=this.$_getIndexAt(a,h,x,_,i);if(R.RowElement.isExpander(t.target))return;if(I.grouped)this.$_gridCellDblClicked(N.getItem(u.GridCellType.GROUP_HEADER,I.item.index,null));else if(this.$_gridCellDblClicked(N.getCell(f,I,d)),s.CellIndex.areEquals(E,d)){var S=a.editController.currentEditor();a.showEditor(E,void 0,c.Utils.isMobile()&&(null==S?void 0:S.hasList))}break;case u.GridCellType.FOOTER:var T=a.getFooterView(_).tableCellByCell(_);this.$_gridCellDblClicked(N.getSummary(f,T.summaryIndex,T.layout));break;case u.GridCellType.SUMMARY:var D=a.getSummaryView(_).tableCellByCell(_);this.$_gridCellDblClicked(N.getSummary(f,D.summaryIndex,D.layout));break;case u.GridCellType.SUM:this.$_gridCellDblClicked(N.getSub(f,a.sumView.getCellType(_)));break;case u.GridCellType.GROUP_FOOTER:var k=a.getBodyView(_).bodyCellByCell(_),M=k.item.footerIndex;this.$_gridCellDblClicked(N.getGroupFooter(f,k.item.index,k.layout,M));break;case u.GridCellType.GROUP_HEAD:case u.GridCellType.GROUP_FOOT:var O=_[u.T_LEV];this.$_gridCellDblClicked(N.getGroupElt(f,O));break;case u.GridCellType.GROUP_BAR:var F=_[u.T_ROW];m=a.getRowOfItem(F),this.$_gridCellDblClicked(N.getItem(f,F,m))}}else if(p&&p===this._clickElement){var L=this._getClickData(p,t);L&&this.$_gridCellDblClicked(L)}},o.prototype._doMouseWheel=function(t){var e=this,i=this.grid;function o(t,e){return c.Utils.isSafari?Math.floor(t)===t:c.Utils.isChromium?e%120!=0:c.Utils.isFirefox?e%(c.Utils.isMac?48:120)!=0:void 0}i.setEventFrom(null),i.scrollOnEditing();var n=i.displayOptions,r=t.deltaX,s=t.deltaY,a=t.wheelDeltaX,l=t.wheelDeltaY;if(n.wheelEnabled&&!t.ctrlKey){if(!i._fireWheel(t))return!0;var h=(t.shiftKey||Math.abs(r)>Math.abs(s))&&0!==n.wheelScrollHorz;if(void 0!==this._scrollDirection&&this._scrollDirection!==h)return!0;if(clearTimeout(this._scrollTimer),this._scrollTimer=setTimeout((function(){e._scrollDirection=void 0}),100),this._scrollDirection=h,h){var u=i.leftPos;r=t.shiftKey?r||s:r;var d=Math.abs(n.wheelScrollHorz||16)*(r>0?1:-1);if(i.leftPos=u+d,(0===u||i.leftPos===u)&&o(r,a)){if((0===i.leftPos||i.leftPos===u)&&"undefined"!=typeof visualViewport){var p=visualViewport;if(r<0?p.offsetLeft+r>0:p.pageLeft+p.width+r0){if(!(this._wheelDeltaY+Math.abs(s)>=m))return this._wheelDeltaY+=Math.abs(s),!0;this._wheelDeltaY=0}if(n.wheelAccelDelay>0)if(f>this._prevScroll+300)this._checkScroll=f;else if(this._checkScroll+n.wheelAccelDelay0){var C=i.itemCount;g=Math.floor(parseInt(v.substr(0,v.length-1))/100*C)}}}i.topIndex=i.topIndex+(s>0?g:-g);var w=!0;return _!=i.topIndex||this._prevScroll+150>f?this._prevScroll=f:w=this._prevScroll+150>f,!n.wheelEventPropagate||w}return!1},o.prototype._doMouseEnter=function(t){},o.prototype._doMouseLeave=function(t){var e=t.mouseX,i=t.mouseY;this._hideTooltip(),this.$_setHoveredHeaderCell(null,e,i),this.$_setHoveredCell(null,e,i)},o.prototype._doMouseOver=function(t){},o.prototype._doContextMenu=function(t){var e=this.grid,i=this._findTableCell(),o=e.getCellType(i);return c.Utils.isMobile()&&e.displayOptions.rightClickable&&o===u.GridCellType.DATA&&!s.CellIndex.areEquals(this._tempIndex,e.focusedIndex)&&this.setFocused(this._tempIndex,!0,!0),e.doContextMenu(t)},o.prototype.$_doHome=function(t,e,i){var o=t.clone();if(t.first(),i&&this._checkReadOnly(t)&&!this._skipReadOnlyCell(t,1,o))return t.assign(e),!0},o.prototype.$_doEnd=function(t,e,i){var o=t.clone();if(t.last(),i&&this._checkReadOnly(t)&&!this._skipReadOnlyCell(t,-1,o))return t.assign(e),!0},o.prototype._doKeyDown=function(t){var i,o=t.keyCode,n=c.Utils.isMac,r=c.Utils.ctrlKey(t),a=t.shiftKey,l=t.altKey,u=this.grid,d=u.editOptions,p=u.layoutManager,f=u.popupMenuManager,g=d.skipReadOnly,m=d.skipReadOnlyCell,y=u.focusedIndex,v=y.clone(),C=d.verticalMoveStep;if(t.repeat||(this._userActionIndex=null),!u._fireKeyDown(t))return!0;if(!u.isEditing()&&u.accessibility&&c.Utils.included(o,36,35,40,34,38,33,32,37,39)&&c.Utils.stopEvent(t),f.isShow()&&c.Utils.included(o,37,39,38,40,13,32)){var w=u.getBodyCellAt(y);return f.keyDown(t,w&&w.cell),!0}if((u.setEventFrom("keydown"),y&&!u.isEditing())&&((w=u.getBodyCellAt(y))&&this.$_performRendererKey(w,t)))return!0;if(!u.isEditing()&&u.accessibility&&(67===o||86===o)&&r)return u.editController.setFocus(!0),!1;if(27==o)u.closePopups(),this._doCancel(u);else{if(13==o)return this._doEnter(u,d,v,t);if(9==o)return this._doTab(u,d,v,t);if(113==o)!u.isEditing()&&v.dataColumn&&(u.accessibility&&u.$_setEditFocused(!0,null),u.showEditor(v,a));else{if(c.Utils.isMac&&r&&a&&90===o)return u.redo();if(90==o&&r)return u.undo();if(89==o&&r)return u.redo();if(45==o)d.appendWhenInsertKey||0==u.itemCount?u.append():u.insert(v.item,a,r);else{if(46==o)return r&&a?(u.revertSelection(),!0):r?(u.deleteSelection(),!0):!!a&&(u.eraseSelection(!1,!1),!0);if(l&&a&&40==o)u.moveSelection(1,"keydown");else if(l&&a&&38==o)u.moveSelection(-1,"keydown");else if(32==o&&a&&r&&u.rowBarContainer.rowIndicator.visible&&u.editOptions.checkable){var x=u.selections.getItem(0),b=x&&((0,h.isRowSelection)(x)||c.Utils.included(x.style,h.SelectionStyle.BLOCK,h.SelectionStyle.GROUP))&&x.getItems(u.checkBar.merged||u.checkBar.fieldIndex>=0);b||u.checkBar.merged?(b=b||[v.item],u.toggleChecks(b,v.item)):u.toggleCheck(v.itemIndex),n&&t.preventDefault()}else if(u.editOptions.useArrowKeys&&c.Utils.included(o,36,35,39,37,40,38,34,33)){c.Utils.isMobile()&&t&&t.preventDefault&&t.preventDefault();var I=u.itemCount;if(40==o&&0==I)return u.append(),!0;if(!u.isValid(v))return v.normalize(u),this.setFocused(v,!0,!0),!0;if((c.Utils.included(o,40,34)||35==o&&r)&&v.isBottom&&this.$_checkAppending(v))return!0;if((c.Utils.included(o,38,33)||36==o&&r)&&v.isTop&&this.$_checkAppending(v,!0))return!0;var E=u.getBodyViewAt(v);if(!E)return!0;switch(o){case 36:if(r){if(t.preventDefault(),this.$_doHome(v,y,g))break}else v.home(),this._skipReadOnly(v,1);break;case 35:if(r){if(this.$_doEnd(v,y,g))break}else v.end(),this._skipReadOnly(v,-1);break;case 39:if(E.spanRight(p,v),v.right(),g&&this._checkReadOnly(v)&&!this._skipReadOnly(v,1)){v.assign(y);break}break;case 37:if(v.left(),g&&this._checkReadOnly(v)&&!this._skipReadOnly(v,-1)){v.assign(y);break}break;case 38:if(n&&r){this.$_doHome(v,y,g);break}try{if(0==v.itemIndex&&v.isTop){if(this.$_commitCancel(v.item,d))return!0;u.filterPanel.visible?u.inlineFilterFocus(v.layout):v.up(C)}else{if(r)return void u.topIndex--;v.up(C,u.isItemEditing(v.item))}}finally{m&&this._checkReadOnly(v)&&(this._skipReadOnlyCell(v,-1)||v.assign(y))}break;case 33:if(i=v.clone(),v.incRow(-p.fullItemCount),g&&this._checkReadOnly(v)&&!this._skipReadOnlyCell(v,1,i)){v.assign(y);break}break;case 40:if(n&&r){this.$_doEnd(v,y,g);break}try{if(v.itemIndex!=I-1||!v.isBottom&&C!=s.VerticalMoveStep.ROW){if(r)return u.topIndex++,!0;v.down(C,u.isItemEditing(v.item))}else{if(v.isBottom&&this._commitCancel(v.item,d))return!0;u.append(),v.down(C,u.isItemEditing(v.item))}}finally{m&&this._checkReadOnly(v)&&(this._skipReadOnlyCell(v,1)||v.assign(y))}break;case 34:if(v.itemIndex==u.itemCount-1&&v.isBottom&&(0,_.ItemState_isInserting)(v.item.itemState))return u.commit(d.forceAppend),!0;if(i=v.clone(),v.incRow(p.fullItemCount),g&&this._checkReadOnly(v)&&!this._skipReadOnlyCell(v,-1,i)){v.assign(y);break}}return E.spanHead(p,v),a&&u.selections.count>0&&!(0,h.isSingleSelectionStyle)(u.displayOptions.selectionStyle)?(this.setFocused(v,!1,!1),u.selections.lastItem().resizeTo(v)):this.setFocused(v,!0,!0,t),!0}}}}return e.prototype._doKeyDown.call(this,t)},o.prototype._doKeyPress=function(t){this.grid._fireKeyPress(t)},o.prototype._doKeyUp=function(t){var e=this.grid;this._userActionIndex&&!s.CellIndex.areEquals(this._userActionIndex,e.focusedIndex)&&e.isValid(e.focusedIndex)&&e.editOptions.editWhenFocused&&e.showEditor(e.focusedIndex,!1,!1),this._userActionIndex=null,this.grid._fireKeyUp(t)},o.prototype._doCopyEvent=function(t){var e=this.grid;e&&!e.isEditing()&&e.copyToClipboard(t,null)},o.prototype._doPasteEvent=function(t){this.grid&&this.grid.fromClipboard(t)},o.prototype._editButtonClicked=function(t,i){this.grid.makeCellVisible(t),this.grid.showEditor(t,!1,!0)&&this.grid.editorButtonClicked(t,i),e.prototype._editButtonClicked.call(this,t,i)},o.prototype._getSelectRequest=function(t,e,i,o,n,r){var s=this.grid,a=s.displayOptions,d=a.selectionMode,p=a.selectionStyle,_=this._findTableCell(t);if(!_)return null;var f=a.selectAndImmediateDrag||a.altSelectAndImmediateDrag&&r;if(!f&&(d==h.SelectionMode.NONE||p==h.SelectionStyle.NONE))return null;var g=s.getCellType(_);if(g==u.GridCellType.INDICATOR){if(s.rowIndicator.selectable&&(f||!(0,h.isSingleSelectionStyle)(p)))return new l.SelectRequest(s.getIndex(s.rowBarContainer.getCellIndex(_)),h.SelectionStyle.ROWS)}else if(g==u.GridCellType.HEADER){if(o&&s.rowIndicator.selectable){var m=s.layoutByDataCell(_);if(!(0,h.isSingleSelectionStyle)(p))return new l.SelectRequest(s.getIndex(-1,m),h.SelectionStyle.COLUMNS)}}else if(g==u.GridCellType.DATA){var y=s.getDataCellIndex(_,this._tempIndex);if(o&&s.selections.containsCell(y))return null;if((f||!(0,h.isSingleSelectionStyle)(p))&&!c.Utils.isMobile())return new l.SelectRequest(y.clone(),p)}return null},o.prototype._getEditRequest=function(t,e,i,o,n,r,l){var u=(0,c.getDocWin)(this.grid.doc),d=this.grid;d.layoutManager;var p=d.displayOptions,_=this._findTableCell(t);if(!_)return null;var f=d.getTableView(_),g=!c.Utils.isInteractive(t)&&this.$_getRowResizeRequest(f,_,i,o,n,r,l);if(g)return g;if(f instanceof M.RowBarContainer&&f.isRowIndicator(_)){c.Utils.isIE&&(l=l||n);var m=!(F=d.getSelection())||!c.Utils.included(F.style,h.SelectionStyle.COLUMNS,h.SelectionStyle.SINGLE_COLUMN);if(m=m&&!c.Utils.included(d.dataDropOptions.feedbackStyle,P.DragFeedbackStyle.CELL,P.DragFeedbackStyle.GROUP),(l||d.rowIndicator.draggableSelectedRows&&m)&&d.canMoveRow(!1,!1)){var v=d.rowBarContainer.rowOf(_),C=!1;if(F?C=F.containsItem(v):v==e.itemIndex&&(C=!0),C)return this._rowMoveReq.init(F,v)}}else if(f instanceof y.HeaderElement){if(t instanceof u.HTMLInputElement)return null;if(!n){var w=f.layoutByCell(_);if(w){var x=d.cellToContainer(_,this._reqPoint.setEmpty());if(p.columnResizable){var b=d.getHeaderCellAt(w),I=d.activeCellLayout,E=d.displayOptions.columnResizeThreshold,S=x.x+(b?b.width:w.domWidth),R=void 0,T=void 0;if(x.x+E>=i&&!w.$_rfixed?(R=I.getHeaderLeftOf(w),T=i-x.x):S-E<=i&&(R=w,T=i-S),R&&R._isResizable()&&(!R.isFixed||d.fixedOptions.resizable))return this._colResizeReq.init(R,i,o,T)}if(p.columnMovable&&w._isMovable()&&(!w.isRoot||d.canMoveLayout(w)))return this._colMoveReq.init(w,i,o,-1)}}}else if(f instanceof a.GridBodyElement){var D=d.getDataCellIndex(_,this._tempIndex);v=D&&D.itemIndex;if(d.canMoveRow(!1,!1)&&v>=0){var k=!1,F=d.getSelection();if((b=d.getBodyCellAt(D,!0)).expander===t)return null;if(c.Utils.isIE&&(l=l||n),F?!(k=F.containsItem(v))||l&&!d.displayOptions.altSelectAndImmediateDrag||(k=d.editOptions.movableWhenFocusedOnly?s.CellIndex.areEquals(e,D):F.containsLayout(D.layout)&&(l||this._canMoveRowAt(f,D,i))):e&&v==e.itemIndex&&(k=!!l||!c.Utils.isMobile()&&s.CellIndex.areEquals(D,e)&&this._canMoveRowAt(f,D,i)),k)return this._rowMoveReq.init(F,v)}}else if(f instanceof O.GridHeadElement){var L=f.boundsByContainer();if(d.header.resizable&&o<=L.bottom+1&&o>=L.bottom-2)return this._headerResizeReq.init(L.top,o-L.bottom-1)}},o.prototype.$_resizeSelection=function(t,e,i){var o=this.grid.selections,n=t?t.runStyle:i;if(!(0,h.isSingleSelectionStyle)(n)&&c.Utils.included(i,h.SelectionStyle.ROWS,h.SelectionStyle.COLUMNS,h.SelectionStyle.SINGLE_COLUMN)&&(n=i),t){if(t.runStyle!=n){this.grid.selections.clear(!0);var r=t.getBounds();t=o.add(r.firstCell,r.lastCell,n,!0)}o.canResize(t)&&t.resizeTo(e)}else t=o.add(e,e,n,!0)},o.prototype._canMoveRowAt=function(t,e,i){return!!c.Utils.isMobile()||i0&&t.fixed||0===h.fixedOptions.colCount)&&0===e.cellIndex&&(l=e.parentElement.$_row)),l<0)return null;var u=h.layoutManager,d=h.displayOptions,c=d.eachRowResizable&&!n,p=u.fixedItemCount,_=u.contentBounds.y,f=t.boundsByContainer(this._tempRect.setWidth(t.width));if(f.width<=0||i=f.right)return null;if(l=f.bottom-3))return this._rowResizeReq.init(l,c,f.y,o-f.bottom-1)}else if(d.rowResizable&&(!d.dataHeights||d.dataHeights.length<=0))for(var g=u.itemCount,m=h.topIndex,y=0;y=f.bottom-3))return this._rowResizeReq.init(v,c,f.y,o-f.bottom-1)}return null},o.prototype._getDragTracker=function(t,e,i){if(t instanceof l.SelectRequest)switch(t.style){case h.SelectionStyle.ROWS:case h.SelectionStyle.SINGLE_ROW:return new v.RowsSelectTracker(t,e,i);case h.SelectionStyle.COLUMNS:return new v.ColumnsSelectTracker(t,e,i);case h.SelectionStyle.BLOCK:case h.SelectionStyle.GROUP:case h.SelectionStyle.NONE:return new v.BlockSelectTracker(t,e,i)}else{if(t instanceof l.ColumnResizeRequest)return new m.ColumnResizeTracker(t,this._cellResizer);if(t instanceof l.ColumnMoveRequest)return new m.ColumnMoveTracker(t,this._cellFeedback,this._cellMover);if(t instanceof l.RowResizeRequest)return new m.RowResizeTracker(t,this._cellResizer);if(t instanceof l.RowMoveRequest)return new m.RowMoveTracker(t,this._rowMoverProxy,this._rowMoverLine);if(t instanceof l.HeaderResizeRequest)return new m.HeaderResizeTracker(t,this._cellResizer);if(c.Utils.isMobile()){if(t instanceof F.TouchScrollRequest)return this._touchScrollTracker.request=t,this._touchScrollTracker;if(t instanceof F.TouchSelectRequest)return this._touchSelectTracker.request=t,this._touchSelectTracker}}return null},o.prototype.$_checkCellClicked2=function(t,e){if(t!==e.target&&t.firstElementChild!==e.target){var i=(0,c.getWin)(t),o=this.grid,n=o.checkBar,r=o.rowBarContainer.getCheckBox(t);if(o.editOptions.checkable){var s=o.getEditItem(),a=o.getItem(t.parentElement[u.T_ROW]),l=!0;if(s&&s.dataRow!==a.dataRow){var h=o.editOptions;try{switch(s.itemState){case _.ItemState.APPENDING:l=o.commit(h.forceAppend);break;case _.ItemState.INSERTING:l=o.commit(h.forceInsert);break;case _.ItemState.UPDATING:l=o.commit(h.commitWhenNoEdit)}}catch(t){throw e.preventDefault(),t}}if(!1===l)return void e.preventDefault();if(a.checkable){var d=r.checked;n.exclusive?d=!n.toggleRadio||!a.checked:e.target instanceof i.HTMLSpanElement&&(d=!r.checked),r.checked=d}this._doCheck(r,a,e.shiftKey)}else e.preventDefault()}},o.prototype._doCheck=function(t,e,i){var o=this.grid,n=o.checkBar,r=o.rowBarContainer.checkBar;if(o.editOptions.checkable){var a=o.checkBar;if(e.checkable&&(a.showGroup||e.dataRow>=0)&&t){var l=r._prevChecked,h=void 0,u=void 0,d=[],c=-1,p=-1,_=void 0;if(i&&l>=0&&!n.exclusive||a.merged){i&&l>=0?(h=s.CellIndex.temp(o,l,null),u=o.getItem(l).checked,a.merged?(c=(_=a.merges.getRoom(h))?_.head:l,p=_?_.tail:l):(c=Math.min(l,e.index),p=Math.max(l,e.index))):(u=t.checked,c=p=e.index,r.$_setPrevChecked(e.index),n.exclusive&&o.itemSource._clearChecked()),a.merged&&(h=s.CellIndex.temp(o,e.index,null),_=a.merges.getRoom(h),c=Math.min(_?_.head:e.index,c),p=Math.max(_?_.tail:e.index,p));for(var f=c;f<=p;f++){var g=o.getItem(f);g.checkable&&g.dataRow>=0&&d.push(g)}d.length>0&&o.itemSource.checkItems(d,u,!0)}else if(o.itemSource.checkItem(e,t.checked,a.exclusive,!0),r.$_setPrevChecked(e.index),a.focusMove){var m=o.focusedIndex.clone();m.itemIndex=e.index,!o.isValid(m)&&null==m.column&&m.item.isDataRow&&(m.layout=o.getFirstLayout()),this.setFocused(m,!0,!0)}}}},o.prototype._checkAllClicked=function(){var t=this.grid;if(!t.empty&&t.editOptions.checkable){var e=t.checkBar,i=t.headView;e.showAll&&!e.exclusive&&(i.allChecked=!i.allChecked,i.indeterminate=!1,t.itemSource.checkAll(i.allChecked,e.visibleOnly,e.checkableOnly,!0,e.showGroup&&!e.merged&&e.fieldIndex<0))}},o.prototype._doColumnHeaderClicked=function(t,e){var i=2==t.button,o=c.Utils.ctrlKey(t),n=t.target;if(!i){var r=void 0;e instanceof b.CellLayoutColumnItem?r=e.getDataColumn():e instanceof b.CellLayoutGroupItem&&e.hideChildHeaders&&e.tiedColumn&&(r=e.tiedColumn);var s=this.grid,a=s.getHeaderView(this._clickCell).tableCellByCell(this._clickCell);if(r)if(n===a.check||n===a.checkSpan)a.check.checked=r.checked=!r.checked,s._columnCheckedChanged(r);else if(n===a.filter&&r.hasFilters)s.selectColumnFilters(a);else{if(n!==a.popup)return!!c.Utils.isClickableTemplate(a.cell,n)||(!(r.sortable&&s.sortingOptions.enabled&&!o)||(s.sortColumn(r,t),!0));var l=r.header.popupMenuName,h=s.getCellViewOf(a.cell);l&&h&&s.popupMenuManager.show(l,h,null,!0)}else if(e instanceof b.CellLayoutGroupItem){if(n!==a.expander||!e.expandable)return!0;e.expanded=!e.expanded}}},o.prototype.$_gridCellClicked=function(t){this.grid._fireCellClicked(t)},o.prototype.$_gridCellDblClicked=function(t){this.grid._fireCellDblClicked(t)},o.prototype.$_setHoveredCell=function(t,e,i){var o=this.grid,n=this._findTableCell();if(t&&n){var r=o.getTableView(n),a=this.$_getIndexAt(o,o.layoutManager,r,n,i);if(t!==this._tooltipCell||!s.CellIndex.areEquals(this._tooltipIndex,a)){this._hideTooltip(),this._tooltipShowTimer&&clearTimeout(this._tooltipShowTimer);var l=o.displayOptions.hintDelay;if(t)if(l>0){var h=this;this._tooltipShowTimer=setTimeout(function(){h.$_showTooltip2(t,a)}.bind(h),l)}else this.$_showTooltip2(t,a)}}},o.prototype._hideTooltip=function(){this.grid.tooltipManager.close(),this._tooltipCell=null,this._tooltipIndex.reset()},o.prototype.$_showTooltip2=function(t,e){var i=this.grid,o=i.validationManager.getError(e);if(i.editOptions.hintOnError&&o)this.$_showTooltip(t,e,{message:o.message});else{var n=t.renderer2,r=i.getCellType(t.cell),a=e.item,l=this._findTableCell();if(!l)return;var h=l.firstElementChild,d=h.clientWidth0&&a.groupLevel+1>=e.dataColumn.groupLevel:a instanceof D.MergedGroupFooter&&(_=_&&e.dataColumn&&a.level>e.dataColumn.groupLevel),(_=_&&!!n)&&(_=p.showTooltip?!1!==n.showTooltip:n.showTooltip),_&&(p.tooltipEllipsisOnly&&!1!==n.tooltipEllipsisOnly||!0===n.tooltipEllipsisOnly)&&(_=d),_&&!s.CellIndex.areEquals(e,this._tooltipIndex)){var f=n.getTooltip(t,e);if(f||p.showEmptyTooltip){var g=i._fireShowTooltip(e,f,d);g&&("boolean"==typeof g?g={message:f}:"string"==typeof g&&(g={message:g}),this.$_showTooltip(t,e,g))}}}},o.prototype.$_showTooltip=function(t,e,i){var o=this.grid,n=o.tooltipManager,r=o.layoutManager;if(!n.visible||this._tooltipCell!=t){this._hideTooltip();var s=o.getBodyView(t.cell),a=s.getCellRectAt(r,e,!1);a=s.boundsByContainer(a);var l=t.layout.isFixed?a.x:Math.max(a.x,r.nonFixedBounds.x),h=a.y+a.height;n.show(i,l,h,a.height,!1),this._tooltipCell=t,this._tooltipIndex.assign(e)}},o.prototype.$_showStateError=function(t,e){var i=this.grid,o=i.tooltipManager,n=i.layoutManager;if(t!==this._tooltipCell){this._hideTooltip();var r=i.focusedIndex.itemIndex,s=i.rowBarContainer.boundsByContainer(),a=n.getItemBounds(r0){var n=this;this._tooltipShowTimer=setTimeout(function(){n.$_showRowBarTooltip(t,e,i)}.bind(n),o)}else this.$_showRowBarTooltip(t,e,i)}},o.prototype.$_showRowBarTooltip=function(t,e,i){var o=this.grid;if(this._findTableCell()&&(o.rowIndicator.showTooltip&&t===u.GridCellType.INDICATOR||o.stateBar.showTooltip&&t===u.GridCellType.STATE||o.checkBar.showTooltip&&t===u.GridCellType.CHECK)){var n=o._fireShowRowBarTooltip(t,i.itemIndex,i.dataRow);if(n){if("string"==typeof n)n={message:n};else if(!n.message||"string"!=typeof n.message)return;var r=o.rowBarContainer,s=o.tooltipManager,a=o.layoutManager,l=i.itemIndex,h=r.boundsByContainer(),d=a.getItemBounds(l0){var n=this;this._tooltipShowTimer=setTimeout(function(){n.$_showHeaderTooltip2(t)}.bind(n),o)}else this.$_showHeaderTooltip2(t)}},o.prototype.$_showHeaderTooltip2=function(t){var e=this.grid,i=e.header.showTooltip,o=e.header.tooltipEllipsisOnly,n=this._findTableCell();if(n){var r=n.firstElementChild,s=r.clientWidth=0&&!(s.t-l.t>100);h--)l=n[h];var d=l.x,p=l.y,_=s.x,f=s.y,g=Math.sqrt(Math.pow(d-_,2)+Math.pow(p-f,2))/Math.max(16,s.t-l.t),m=.998;if(g>.1){var y=Math.log(.1/g)/Math.log(m),v=g*(1-Math.pow(m,y+1))/(1-m),C="right",w=Math.round(180*Math.atan2(f-p,_-d)/Math.PI);if(w<0&&(w=360+w),w>45&&w<=135?C="bottom":w>135&&w<=225?C="left":w>225&&w<=315&&(C="top"),i instanceof B.SummaryElement&&c.Utils.included(C,"bottom","top"))return;return this.onSwipeHandler(y,v,C,t)}}}},o.prototype.onSwipeHandler=function(t,e,i,o){this._touchMoving=!0,this._swipeDuration=t,this._swipeStarted=c.Utils.getTimer(),this._swipeAmount=0;var n=1;switch(i){case"right":n=-1;case"left":this._swipeDistance=n*e/20,this._swipeTimer=setInterval(this.$_scrollLeftPos.bind(this),50);break;case"bottom":n=-1;case"top":this._swipeDistance=n*e/20,this._swipeTimer=setInterval(this.$_scrollRow.bind(this),50)}return!0},o.prototype.$_checkTopBottom=function(t){var e=this.grid,i=e.layoutManager;return 0===e.topIndex&&t<0||e.topIndex+i.fullItemCount>=e.itemCount&&t>0},o.prototype.$_scrollRow=function(){var t=c.Utils.getTimer();if(Math.abs(this._scrollY-window.scrollY)>10)this._touchMoving=this._swipeTimer=clearInterval(this._swipeTimer);else if(t-this._swipeStarted0&&u.indexOf("${actual")>0&&(h="none",u=u.replace("${target}",a).replace("${actual}",l),this._templateDiv.style.display="",this._templateDiv.innerHTML=u)}this._targetSpan.style.display=this._separatorSpan.style.display=this._actualSpan.style.display=h,s.length?(this._targetSpan[i.Utils.TextProp]=a,this._actualSpan[i.Utils.TextProp]=l):(this._targetSpan[i.Utils.TextProp]="",this._actualSpan[i.Utils.TextProp]="")},o.prototype._makeText=function(t,e){var i=this._valueSeparator||this.index.seriesColumn.valueSeparator;return e.getDisplayText(t,i)},o.TYPE="actualtargettext",o.TARGET_STYLE="rg-actualtarget-target",o.ACTUAL_STYLE="rg-actualtarget-actual",o.SEPARATOR_STYLE="rg-actualtarget-separator",o}(o.DataCellRenderer);wa.ActualTargetTextRenderer=n;var r=function(o){function n(){var t=o.call(this)||this;return t._minValue=0,t._maxValue=100,t.$_render=function(e,i,o,n){var r=t._values;if(r&&!(r.length<2)){var s=r[0],a=r[1];if(null!=s&&null!=a){i.sbounds(t.backgroundStyle,"0%","10%","100%","80%");var l="1px";t.strokeWidth>0&&(l="".concat(t.strokeWidth,"px"));var h="40%",u="30%";if(t.actualHeight){var d=t.actualHeight,c=parseFloat(d);if(d.indexOf("%")>=0)u="".concat((100-c)/2,"%"),h="".concat(c,"%");else u="".concat((.9*n-c)/2,"px"),h="".concat(c,"px")}var p=t.getValueRate(a);i.sbounds(t.actualStyle,l,u,"".concat(p,"%"),h);var _=t.targetWidth||3,f=t.getValueRate(s)*((o-_)/o);i.sbounds(t.targetStyle,"".concat(f,"%"),"10%","".concat(_,"px"),"80%")}}},t}return t.__extends(n,o),n.prototype._doDispose=function(){o.prototype._doDispose.call(this)},n.prototype._doInitOptions=function(){this._actualStyle=n.ACTUAL_STYLE,this._targetStyle=n.TARGET_STYLE,this._backgroundStyle=n.BASE_STYLE,this._minValue=0,this._maxValue=100,this._strokeWidth=this._targetWidth=this._actualHeight=void 0},_dp(n,"backgroundStyle",{get:function(){return this._backgroundStyle||n.BASE_STYLE},set:function(t){this._backgroundStyle=t}}),_dp(n,"targetStyle",{get:function(){return this._targetStyle||n.TARGET_STYLE},set:function(t){this._targetStyle=t}}),_dp(n,"actualStyle",{get:function(){return this._actualStyle||n.ACTUAL_STYLE},set:function(t){this._actualStyle=t}}),_dp(n,"maxValue",{get:function(){return this._maxValue},set:function(t){this._maxValue=t}}),_dp(n,"minValue",{get:function(){return this._minValue},set:function(t){this._minValue=t}}),_dp(n,"strokeWidth",{get:function(){return this._strokeWidth},set:function(t){this._strokeWidth=t}}),_dp(n,"targetWidth",{get:function(){return this._targetWidth},set:function(t){this._targetWidth=t}}),_dp(n,"actualHeight",{get:function(){return this._actualHeight},set:function(t){"number"==typeof t?this._actualHeight=t+"px":t.indexOf("%")>0||t.indexOf("px")>0?this._actualHeight=t:this._actualHeight="".concat(t,"%")}}),n.prototype.getValueRate=function(t){t=parseFloat(t);var e=Math.floor((t-this._minValue)/(this._maxValue-this._minValue)*1e4)/100;return Math.min(e,100)},_dp(n,"type",{get:function(){return n.TYPE}}),_dp(n,"styleName",{get:function(){return n.STYLE_NAME}}),n.prototype._doInitContent=function(t){var o=(0,i.getDoc)(t),n=t.style,r=this._div=o.createElement("div");(n=r.style).position="relative",n.height="100%",t.appendChild(r),(n=(this._svg=e.SvgElement.createSVG(r)).style).position="absolute",n.left=n.top="0px",n.width=n.height="100%"},n.prototype._doRenderCell=function(t,i,o,n,r){var s=this._svg;this._values=i.value||[],e.SvgElement.renderSVG2(t,s,this.$_render,n,r)},n.prototype._makeText=function(t,e){return e.getDisplayText(t,this.index.seriesColumn.valueSeparator)},n.TYPE="actualtargetbullet",n.STYLE="rg-bullet-renderer",n.BASE_STYLE="rg-bullet-background",n.TARGET_STYLE="rg-bullet-target",n.ACTUAL_STYLE="rg-bullet-actual",n.STYLE_NAME="rg-renderer "+n.STYLE,n}(o.DataCellRenderer);return wa.ActualTargetBulletRenderer=r,wa}function ba(){if(va)return Ca;va=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.GridDelegate=void 0;var t=d,e=G(),i=Zn(),o=tr(),n=ar(),r=To(),s=Br(),a=Fo(),l=Ks(),h=S(),u=Ct(),c=xa(),p=function(e){function d(t){var i=e.call(this)||this;return i._cellEditors={},i._customRenderers={},i._grid=t,i}return t.__extends(d,e),d.registryCustomRenderer=function(t,e,i){t&&e&&(d.$_customRenderers[t]&&!i||(d.$_customRenderers[t]=e))},d.prototype._doDispose=function(){this._grid=null,e.prototype._doDispose.call(this)},_dp(d,"grid",{get:function(){return this._grid}}),_dp(d,"editors",{get:function(){return this._cellEditors}}),d.prototype.getDefaultCellEditor=function(){if(!this._defaultEditor){var t=this._grid.container._container;this._defaultEditor=new i.LineCellEditor(this._grid,t),this._cellEditors.line=this._defaultEditor,this._defaultEditor.setController(this._grid.editController)}return this._defaultEditor},d.prototype.getCellEditor=function(t){var e=this._grid.container._container,r=this._cellEditors[t];if(!r){switch(t){case"list":case"dropdown":r=new o.DropDownCellEditor(this._grid,e);break;case"nlist":r=new o.NativeListCellEditor(this._grid,e);break;case"multiline":r=new i.MultiLineCellEditor(this._grid,e);break;case"number":r=new i.NumberCellEditor(this._grid,e);break;case"date":r=new n.DateCellEditor(this._grid,e);break;case"btdate":r=new n.BTDateCellEditor(this._grid,e);break;case"search":r=new o.SearchCellEditor(this._grid,e);break;case"checklist":r=new o.MultiCheckCellEditor(this._grid,e);break;case"password":r=new i.PasswordCellEditor(this._grid,e);break;case"ndate":r=new n.NativeDateCellEditor(this._grid,e);break;default:r=this.getDefaultCellEditor()}this._cellEditors[t]=r,r&&r.setController(this._grid.editController),this._grid.accessibility&&r.detach()}return r},d.prototype.getEditConfig=function(t){var e=this.grid,i=e.editorOptions;if(e&&t)switch(t){case"list":case"dropdown":return h.Utils.assign({},u.DefaultOptions.editor.dropdownCellEditor,i.dropdownCellEditor);case"number":return h.Utils.assign({},u.DefaultOptions.editor.numberCellEditor,i.numberCellEditor);case"date":return h.Utils.assign({},u.DefaultOptions.editor.dateCellEditor,i.dateCellEditor);case"search":return h.Utils.assign({},u.DefaultOptions.editor.searchCellEditor,i.searchCellEditor);case"checklist":return h.Utils.assign({},u.DefaultOptions.editor.multiCheckCellEditor,i.multiCheckCellEditor)}},d.prototype.$_checkFlexible=function(t,e){if(!h.Utils.ieOld&&!h.Utils.ieTen)return t&&t.flexible||e&&e.flexible},d.prototype.createRenderer=function(t,e,i){var o=null;if(t){switch(t){case r.TextCellRenderer.TYPE:o=new r.TextCellRenderer;break;case r.BarCellRenderer.TYPE:o=new r.BarCellRenderer;break;case r.ImageCellRenderer.TYPE:o=new r.ImageCellRenderer;break;case r.IconCellRenderer.TYPE:o=this.$_checkFlexible(e,i)?new r.FlexIconCellRenderer:new r.IconCellRenderer;break;case r.CheckCellRenderer.TYPE:o=this.$_checkFlexible(e,i)?new r.FlexCheckCellRenderer:new r.CheckCellRenderer;break;case r.ButtonCellRenderer.TYPE:o=new r.ButtonCellRenderer;break;case r.ShapeCellRenderer.TYPE:o=this.$_checkFlexible(e,i)?new r.FlexShapeCellRenderer:new r.ShapeCellRenderer;break;case r.LinkCellRenderer.TYPE:o=new r.LinkCellRenderer;break;case r.SignalBarCellRenderer.TYPE:o=new r.SignalBarCellRenderer;break;case r.Code39CellRenderer.TYPE:o=new r.Code39CellRenderer;break;case r.Code128CellRenderer.TYPE:o=new r.Code128CellRenderer;break;case s.SeriesTextCellRenderer.SERIES_TYPE:o=new s.SeriesTextCellRenderer;break;case s.SparkLineRenderer.TYPE:o=new s.SparkLineRenderer;break;case s.SparkColumnRenderer.TYPE:o=new s.SparkColumnRenderer;break;case s.SparkWinLossRenderer.TYPE:o=new s.SparkWinLossRenderer;break;case a.TemplateCellRenderer.TYPE:o=new a.TemplateCellRenderer;break;case r.MultiCheckCellRenderer.TYPE:o=new r.MultiCheckCellRenderer;break;case c.ActualTargetTextRenderer.TYPE:o=new c.ActualTargetTextRenderer;break;case c.ActualTargetBulletRenderer.TYPE:o=new c.ActualTargetBulletRenderer}if(!o){var n=this._customRenderers[t]||d.$_customRenderers[t];n&&(o="function"==typeof n?new n(t):new l.CustomCellRenderer(n,t))}o||(h.Utils.log("Renderer type is invalid: "+t),o=new r.TextCellRenderer),e&&o.assignFrom(e),i&&o.assignFrom(i)}return o},d.prototype.addCustomRenderer=function(t,e){t&&e&&(this._customRenderers[t]=e)},d.prototype.removeCustomRenderer=function(t){delete this._customRenderers[t]},d.prototype.existsCustomRenderer=function(t){return this._customRenderers.hasOwnProperty(t)},d.prototype.clearCustomRenderers=function(){this._customRenderers={}},d.$_customRenderers={},d}(e.Base);return Ca.GridDelegate=p,Ca}var Ia,Ea={};var Sa,Ra={};function Ta(){if(Sa)return Ra;Sa=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.PopupMenuManager=Ra.PopupMenuView=Ra.PopupMenu=Ra.PopupMenuItem=void 0;var t=d,e=et(),i=C(),o=S(),n=ml(),r=ma(),s=dn(),a=function(e){function i(t){var i=e.call(this)||this;return i._visible=!0,i._enabled=!0,t&&t.name&&(i._name=t.name),t&&i.assignFrom(t),i}return t.__extends(i,e),i.prototype._doDispose=function(){return e.prototype._doDispose.call(this)},_dp(i,"name",{get:function(){return this._name},set:function(t){this._name=t}}),_dp(i,"visible",{get:function(){return this._visible},set:function(t){this._visible=t}}),_dp(i,"enabled",{get:function(){return this._enabled&&!this.isSeparator()},set:function(t){this._enabled=t}}),_dp(i,"label",{get:function(){return this._label},set:function(t){this._label=t}}),_dp(i,"tag",{get:function(){return this._tag},set:function(t){this._tag=t}}),_dp(i,"group",{get:function(){return null}}),_dp(i,"styleName",{get:function(){return this._styleName},set:function(t){this._styleName=t}}),_dp(i,"manager",{get:function(){return null}}),_dp(i,"type",{get:function(){return null}}),_dp(i,"checked",{get:function(){return null}}),i.prototype.click=function(){},i.prototype.isSeparator=function(){return!1},i}(e.EventAware),l=function(e){function o(t,i){var o=e.call(this,i)||this;return o._parent=t,o}return t.__extends(o,e),o.prototype._doDispose=function(){this._parent=null,this._callback=null,e.prototype._doDispose.call(this)},_dp(o,"type",{get:function(){return this._type},set:function(t){this._type=t}}),_dp(o,"group",{get:function(){return this._group},set:function(t){this._group=t}}),_dp(o,"checked",{get:function(){return this._checked},set:function(t){this._checked=t}}),_dp(o,"callback",{get:function(){return this._callback},set:function(t){this._callback=t}}),_dp(o,"parent",{get:function(){return this._parent},set:function(t){this._parent=t}}),o.prototype.isSeparator=function(){return"-"===this._label||this._type===i.MenuItemType.SEPARATOR},o.prototype.getData=function(){return{label:this._label,checked:this._checked,enabled:this._enabled,tag:this.tag}},o.prototype.click=function(){"check"===this._type&&(this._checked=!this._checked),this._parent&&this._parent.itemClicked(this)},_dp(o,"manager",{get:function(){return this._parent.manager}}),o.prototype._itemClicked=function(t){},o}(a);Ra.PopupMenuItem=l;var h=function(e){function n(t,i){var o=e.call(this,i)||this;return o._parent=t,o._items=o._load(i.children),o}return t.__extends(n,e),n.prototype._doDispose=function(){this._items&&this._items.forEach((function(t,e){t.dispose()})),this._items=null,this._parent=null,e.prototype._doDispose.call(this)},_dp(n,"children",{get:function(){return this._items}}),_dp(n,"parent",{get:function(){return this._parent}}),_dp(n,"manager",{get:function(){for(var t=this._parent;t;){if(t.popupMenuManager instanceof c)return t.popupMenuManager;if(t instanceof c)return t;t=t._parent}return null}}),n.prototype.count=function(){return this._items?this._items.length:0},n.prototype.itemClicked=function(t){if(t.parent==this&&t.type===i.MenuItemType.RADIO){var e=t.group,o=void 0;if(e){for(var n=0;n0){var a=new n(this,s);e.push(a)}else{a=new l(this,s);e.push(a)}}return e},n.CLICKED="onPopupMenuClicked",n}(a);Ra.PopupMenu=h;var u=function(e){function r(t){var i=e.call(this)||this;return i._showing=!1,i._viewGridInside=!1,i._container=t,i._element=i._createElement(),i._element.addEventListener("contextmenu",(function(t){t.preventDefault()})),i}return t.__extends(r,e),r._borrowView=function(t){var e=r.$_views[t.$_hash]||[];return r.$_views[t.$_hash]=e,e.pop()||new r(t)},r._returnView=function(t){r.$_views[t._container.$_hash].push(t)},r.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(r,"parentView",{get:function(){return this._parentView},set:function(t){this._parentView=t}}),_dp(r,"childView",{get:function(){return this._childView},set:function(t){this._childView=t}}),_dp(r,"currDiv",{get:function(){return this._currDiv}}),_dp(r,"manager",{get:function(){return this._menu.manager}}),r.prototype.getElementId=function(){return"rg-popup-"+this._menu.name},r.prototype.show=function(t,e,i,o,r,s,a,l){if(!this._showing){this._showing=!0;try{var h=i.parent;for(this._parentView=e,this._firstItem=null,this._menu=i;h._parent&&!(h instanceof n.GridBase);)h=h.parent;h&&(this._viewGridInside=h instanceof n.GridBase?h.editorOptions.viewGridInside:h instanceof c&&h.grid.editorOptions.viewGridInside),this.$_show(t,this._menu,o,r,s,a)}finally{this._showing=!1}}},r.prototype.boundsByContainer=function(){return null},r.prototype.hide=function(t){void 0===t&&(t=!0),t&&this._parentView?this._parentView.hide(!0):(this.$_hideChildView(),o.Utils.detach(this._element))},r.prototype.hideChild=function(){this.$_hideChildView()},r.prototype.changeItemIndex=function(t){var e,i=this._itemIndex,o=this._menu._items;if(0==t)return this._itemIndex=-1,void this.$_refreshItems(this._itemIndex);if(o&&!(i>=o.length)){for(;(e=o[i+=t])&&!e.enabled;);e&&(this._itemIndex=i,this.$_refreshItems(this._itemIndex))}},r.prototype.getActiveElementId=function(){var t=this._menu._items[this._itemIndex];return t?t._elementId:""},r.prototype.menuItemClicked=function(t){this._menuItemClicked(t)},r.prototype.$_show=function(t,e,i,n,r,s){if(this._element){var a=t.doc,l=this._element,h=l.style,u=this.manager,d=t.gridView.displayOptions.baseZindex,c=t._containerDiv;this._element.style.zIndex=String(d+4);var p,_=u.dropdownCount;if(this._viewGridInside)p=t._container;else{var f=c.parentNode;p=!o.Utils.isSlotMode()||1!==f.nodeType&&11!==f.nodeType?a.body:f}this._containerElement=p,l.id="rg-popup-"+this._menu.name,this._menu=e,this._itemIndex=-1,o.Utils.clearElements(l),this.$_buildItems(e),o.Utils.disableSelection(l),p.appendChild(l);var g=0;if(_&&e.children.length>_)for(var m=0,y=0;m0&&ga.documentElement.clientWidth&&(y-=18),a.documentElement.scrollHeight>a.documentElement.clientHeight&&(m-=18),this._viewGridInside?(v.height>=f.height&&(u.height=f.height-4+"px",u.overflow="auto",v=o.Utils.getSize(this._element)),i+f.top+v.height>f.bottom&&(i=this._parentView?f.bottom-v.height-f.top-3:i-v.height-r),e+f.left+v.width>f.right&&(e=this._parentView?f.right-v.width-f.left-3:e-v.width-n)):(this._parentView||(c===d.parentNode?(e+=d.offsetLeft,i+=d.offsetTop):(e+=f.left-_.left,i+=f.top-_.top)),v.height>=y&&(u.height=y-4+"px",u.overflow="auto",v=o.Utils.getSize(this._element)),i+v.height>=y+w-3&&(i=i-v.height-3)<0&&(i=Math.max(0,y-v.height-3)),e+v.width>=m+C-3?e=Math.max(0,m-v.width-3):void 0!==n&&v.widths?e.scrollTop=Math.max(0,e.scrollTop+(s-h)):h+l=0?this._menus.splice(s,1,r):this._menus.push(r),r},n.prototype.removeMenu=function(t){var e=this.indexOf(t);e>-1&&this._menus.splice(e,1).forEach((function(t){return t.dispose()}))},n.prototype.show=function(t,e,a,l){var h=this.grid,u=(0,o.getWin)(this._containerDom),d=a&&h.getBodyCellAt(a);if("string"==typeof t&&t){var c=o.Utils.getSize(this._containerDom),p=void 0;if(d){var _=d.cellButton||d.merged&&d.head.cellButton||d.cell;p=o.Utils.getSize(_)}else p=o.Utils.getSize(e);var f=p.bottom,g=p.left-c.x,m=f-c.y,y=p.width,v=p.height;if(e instanceof u.HTMLTableCellElement){var C=h.getCellType(e),w=h.getTableView(e),x=void 0;if(C===i.GridCellType.DATA)x=(d=d||w.bodyCellByCell(e)).grouped?r.ClickData.getItem(i.GridCellType.GROUP_HEADER,d.item.index,null):r.ClickData.getCell(C,d,a);else if(C===i.GridCellType.HEADER){var b=w.layoutByCell(e);b instanceof s.CellLayoutGroupItem&&b.hideChildHeaders&&b.tiedColumn&&(b=b.tiedColumn.layout),x=r.ClickData.getLayout(C,b)}this.clickData=x}else if(e instanceof u.HTMLElement){var I=h.getCellViewOf(e),E=(w=h.getTableView(I)).tableCellByCell&&w.tableCellByCell(I);(C=h.getCellType(I))===i.GridCellType.INLINE_FILTER&&(this.clickData=r.ClickData.getLayout(C,E.layout))}var S=l?this.fireObjectEvent(n.POPUP_MENU_POPUP,g,m,this.clickData,t,!1):t;if("string"==typeof S)t=S;else if(!1===S||null!=S)return;var R=this.getMenu(t);R&&this.$_show(R,g,m,y,v,e)}},n.prototype.$_show=function(t,e,i,n,r,s){var a=(0,o.getWin)(this._containerDom);this._mainView=this._activeView=u._borrowView(this._container),this._mainView.show(this._container,null,t,e,i,n,r),this._popupPosition={x:e,y:i,width:n,height:r},this._container.addPositionListener(this),!o.Utils.isSlotMode()&&s&&s.setAttribute("aria-activedescendant",this._mainView.getElementId()),!o.Utils.isSlotMode()&&a.addEventListener(o.Utils.isIEMode()?"mousedown":"pointerdown",this._grolbalMouseHandler,!1)},n.prototype.resetPosition=function(){var t=this._popupPosition;this._mainView.movePosition(this._container,t.x,t.y,t.width,t.height,!0)},n.prototype.showContext=function(t,e,i,o,n){t&&!this._mainView&&(this.clickData=n,this.$_show(t,i,o,0,0,null))},n.prototype.close=function(){if(this._container.removePositionListener(this),this._mainView){var t=(0,o.getWin)(this._containerDom);this._mainView.hide(),u._returnView(this._mainView),this._mainView=null,!o.Utils.isSlotMode()&&t.removeEventListener(o.Utils.isIEMode()?"mousedown":"pointerdown",this._grolbalMouseHandler,!1)}},n.prototype.keyDown=function(t,e){this._doKeydown(t,e)},n.prototype.doMenuItemClick=function(t,e){this.fireEvent(n.MENU_ITEM_CLICKED,t,e)},n.prototype._doKeydown=function(t,e){var i=this._activeView,n=null==i?void 0:i.currDiv;switch(t.keyCode){case 40:i.changeItemIndex(1);break;case 38:i.changeItemIndex(-1);break;case 37:i.parentView&&(i.changeItemIndex(0),i.hideChild(),this._showingView=this._activeView=i.parentView||this._mainView);break;case 39:i&&i.childView&&(i=this._showingView=this._activeView=i.childView).changeItemIndex(1);break;case 13:case 32:n&&n.parentElement&&i.menuItemClicked(n)}!o.Utils.isSlotMode()&&e&&e.setAttribute("aria-activedescendant",i.getActiveElementId())},n.MENU_ITEM_CLICKED="onPopupMenuManagerMenuItemClicked",n.POPUP_MENU_POPUP="onPopupMenuManagerPopup",n}(e.EventAware);return Ra.PopupMenuManager=c,Ra}var Da,ka={};var Ma,Oa={};var Fa,La={};var Pa,Ba={};var Va,Aa,Na,$a={},Ua={},Ha={};function Ga(){if(Aa)return Ua;Aa=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.FilteringManager=void 0;var t,e,i,o=Qi(),n=C(),r=S(),s=(Va||(Va=1,t=Ha,Object.defineProperty(t,"__esModule",{value:!0}),t.UserFilterPosition=void 0,(e=t.UserFilterPosition||(t.UserFilterPosition={})).FIRST="first",e.LAST="last",e.NONE="none"),Ha);!function(t){t[t.ALL=0]="ALL",t[t.YQ=1]="YQ",t[t.YM=2]="YM",t[t.Y=3]="Y",t[t.QM=4]="QM",t[t.Q=5]="Q",t[t.M=6]="M",t[t.NONE=7]="NONE"}(i||(i={}));var a=function(){function t(t){this._options=t}return t.HasPartial=function(t,e,i){if(i&&(t=t&&t.toLowerCase(),e=e&&e.toLowerCase()),t.indexOf(e)>=0)return!0;for(var o=r.Utils.hangulToChosungAll(t),n=r.Utils.hangulToChosungAll(e),s=-1,a=!1;(s=o.indexOf(n,s+1))>=0;){for(var l=0;l5?2:1;case 2:return Math.floor(t.getMonth()/3);case 3:return t.getMonth();case 4:var i=new Date(t.getFullYear(),t.getMonth(),1);return i.setDate(i.getDate()-i.getDay()),Math.floor((t.getTime()-i.getTime())/6048e5)+1;case 5:return t.getDate();case 6:return t.getHours()}},t.prototype.dispose=function(){return this._filters=null,this._options=null,null},_dp(t,"searched",{get:function(){return this._searched}}),t.prototype.buildItems=function(t,e,i,o){void 0===o&&(o=!0);var r=function(e){if(e===l.userFilterPosition){for(var i=[],o=t.filters.items,n=0;n0&&u.addAll(i,!0,!1)}},a=this._options.selector,l=this._options.automating,h=a.emptyFilterText;this._autoFilter=i;var u=this._filters=i?t.autoFilters:t.filters,d=[];if(i){t.autoFilters.activeCount>0&&(d=this._getActivatedFilters(t.autoFilters)),t.autoFilters.clear(!1),r(s.UserFilterPosition.FIRST);var c=!1,p=void 0;this._valueType=t.valueType;var _=l.filteredDataOnly?t.grid.getDistinctItemValues(t.dataIndex):e.getDistinctValues(t.dataIndex);switch(this._valueType){case n.ValueType.DATETIME:(c=l.timeCategorize)!==n.TimeCategory.NONE&&(p=this._categorizeTimeValues(_,c,h)),p&&p.length||(p=(c=l.dateCategorize)&&l.dateCategoryCallback?l.dateCategoryCallback(t,_):this._categorizeDateValues(_,c,h));break;case n.ValueType.NUMBER:p=(c=l.numberCategorize)&&l.numberCategoryCallback?l.numberCategoryCallback(t,_):this._categorizeNumberValues(_,c,h);break;case n.ValueType.BOOLEAN:p=[];for(var f=!1,g=0;g<_.length;g++){var m=_[g];null!=m?p.push({text:m.toString().toUpperCase(),value:m}):f=!0}f&&a.showEmptyFilter&&p.push({text:h,empty:!0});break;case n.ValueType.TEXT:c=l.textCategorize,p=t.lookupSource&&this._options.automating.lookupDisplay&&!l.textCategoryCallback?this._categorizeLookupTree(e,t,h):c&&l.textCategoryCallback?l.textCategoryCallback(t,_):this._categorizeTextValues(_,c,h)}p&&this._createCategories(p,null,t.valueType,u),r(s.UserFilterPosition.LAST),this._filters.activateItems(d,!0,o)}},t.prototype.search=function(e){var i=[];function n(t,e){if(i.indexOf(t)<0){for(var o=[],n=t;n;)i.indexOf(n)<0&&o.push(n),n=n.category;Array.prototype.push.apply(i,o.reverse())}}for(var r=0,s=this._filters.count;r=0?t.replace("{".concat(e,"}"),l).replace("{".concat(i,"}"),s):t.replace(e,l).replace(i,s):s},t.prototype.$$_formatYear=function(t,e){var i=e+"";return t?t.replace("{YYYY}",i).replace("{YY}",i.slice(-2)).replace("YYYY",i).replace("YY",i.slice(-2)):i},t.prototype.$$_formatQuater=function(t,e){return this.formatFilterText(t,"QQ","Q",e+1,2)},t.prototype.$$_formatMonth=function(t,e){return this.formatFilterText(t,"MM","M",e+1,2)},t.prototype.$$_formatDay=function(t,e){return this.formatFilterText(t,"DD","D",e,2)},t.prototype.$$_formatDateStr=function(t,e,i,o){var n=this.$$_formatYear(t,e);return n=this.$$_formatMonth(n,i),n=this.$$_formatDay(n,o)},t.prototype.$$_formatHour=function(t,e){return this.formatFilterText(t,"HH","H",e,2)},t.prototype.$$_formatminute=function(t,e){return this.formatFilterText(t,"MM","M",e,2)},t.prototype.$$_formatSecond=function(t,e){return this.formatFilterText(t,"SS","S",e,2)},t.prototype._categorizeTimeValues=function(t,e,i){var o=this,s=this._options.automating;var a={hourCnt:new Map,minuteCnt:new Map,secondCnt:new Map},l=a.hourCnt,h=a.minuteCnt,u=a.secondCnt,d=function(t){var i=t.map((function(t){var i=1e3;switch(e){case n.TimeCategory.HOUR:i*=60;case n.TimeCategory.MINUTE:i*=60}return t&&Math.floor(t.getTime()/i)*i}));return i.sort((function(t,e){return t>e?1:t1)e=n.TimeCategory.SECOND;else if(h.size>1)e=n.TimeCategory.MINUTE;else{if(!(l.size>1))return;e=n.TimeCategory.HOUR}for(var c=!1,p={},_=[],f=function(t,e){var i,r;switch(e){case n.TimeCategory.HOUR:return(i=p[t.dateStr])||(i=p[t.dateStr]={text:t.dateStr,childs:[]},_.push(i)),i;case n.TimeCategory.MINUTE:return(i=(r=f(t,n.TimeCategory.HOUR))[t.hour])||(i=r[t.hour]={text:o.$$_formatHour(s.hourFormat,t.hour),childs:[]},r.childs.push(i)),i;case n.TimeCategory.SECOND:return(i=(r=f(t,n.TimeCategory.MINUTE))[t.minute])||(i=r[t.minute]={text:o.$$_formatminute(s.minuteFormat,t.minute),childs:[]},r.childs.push(i)),i}},g=0,m=d;g1&&d>6)&&(x.push(0),b.push((function(t,e,i){return r.$$_formatYear(w.dateYearFormat,i)}))),(a=d/u>6)&&(x.push(2),b.push(s?function(t,e,i){return r.$$_formatQuater(w.dateQuarterFormat,i)}:function(t,e,i){return r.$$_formatYear(w.dateYearFormat,t)+" "+r.$$_formatQuater(w.dateQuarterFormat,i)})),(l=c>9&&d>3)&&(x.push(3),b.push(s||a?function(t,e,i){return r.$$_formatMonth(w.dateMonthFormat,i)}:function(t,e,i){return r.$$_formatYear(w.dateYearFormat,t)+" "+r.$$_formatMonth(w.dateMonthFormat,i)}))),x.push(5),b.push((function(t,e,i){return r.$$_formatDateStr(w.dateDayFormat,t,e,i)}));var I=[];return function e(o,r,h,u,d){void 0===u&&(u=0),void 0===d&&(d=-1),d=-1==d?o.length-1:d;for(var c,p,_=null,f=u,g=!1,m=function(n){var d=o[n],m=function(e,i,o){for(var n=[],r=0;r<=o;r++)n.push(t.getDateProperty(e,i[r]));return n}(d,x,r),v=function(t,e,i){if(!t)return null;switch(e[i]){case 0:return t.getFullYear().toString();case 1:return t.getFullYear().toString()+Math.floor(t.getMonth()/6).toString();case 2:return t.getFullYear().toString()+Math.floor(t.getMonth()/3).toString();case 3:return t.getFullYear().toString()+t.getMonth().toString();case 5:return t.getFullYear().toString()+t.getMonth()+t.getDate()}}(d,x,r);if(n>u&&v!=_){var C=c[r];if(p)if(r===x.length-1){var w={text:"",year:p.getFullYear(),month:p.getMonth(),day:p.getDate(),value:p};w.text=b[r](w.year,w.month,w.day),h.push(w)}else{var I={text:"",childs:[]},E=function(){I.year=p.getFullYear()},S=function(){I.quarter=Math.floor(p.getMonth()/3)},R=function(){I.month=p.getMonth()},T=s&&a&&l?i.ALL:s&&a?i.YQ:s&&l?i.YM:s?i.Y:a&&l?i.QM:a?i.Q:l?i.M:i.NONE;T===i.ALL?0===r?E():1===r?(E(),S()):2===r&&(E(),S(),R()):T===i.YQ?0===r?E():1===r&&(E(),S()):T===i.YM?0===r?E():1===r&&(E(),R()):T===i.Y?E():T===i.QM?0===r?S():1===r&&(S(),R()):T===i.Q?S():T===i.M&&R(),I.text=b[r](p.getFullYear(),p.getMonth(),C),h.push(I),e.call(y,o,r+1,I.childs,f,n-1)}f=n}n>u&&null==p&&(g=!0),_=v,c=m,p=d},y=this,v=u;v<=d+1;v++)m(v);0==r&&g&&this._options.selector.showEmptyFilter&&h.push({text:n,empty:!0})}.call(this,e,0,I),I},t.prototype._categorizeNumberValues=function(t,e,i){if(!t||!t.length)return null;var o=t.filter((function(t){return null!=t&&null!=t&&!isNaN(t)})).sort((function(t,e){return t-e})),n=o.length,r=o.length!==t.length,s=1,a=[];if(e&&n>15)for(s=Math.round(n/Math.min(Math.max(4,Math.round(n/5)),8));o.length>0;){var l=o.splice(0,s);a.push({text:l[0]+" ~ "+l[l.length-1],values:l})}else for(var h=0;h15){for(var s=[{},{},{},{}],a=[0,0,0,0],l=[0,0,0,0],h=0;h=48&&d<=57?0:d>=65&&d<=90||d>=97&&d<=122?1:d>=1e4?2:3][w]?s[p][w].push(u):(s[p][w]=[u],c=!0),a[p]++,c&&l[p]++}else r=!0}for(var _=Math.min(Math.max(4,Math.round(o/5)),8),f=0;f<4;f++){var g=0==a[f]?0:Math.max(1,Math.min(l[f],Math.round(a[f]/o*_))),m=Math.round(l[f]/g),y=m,v=s[f],C="",w="",x=[];for(w in v)y===m&&(C=w),x.push.apply(x,s[f][w]),0==--y&&(n.push({text:C+" ~ "+w,values:x}),x=[],y=m);x.length>0&&n.push({text:C+" ~ "+w,values:x})}}else{h=0;for(var b=t.length;h>>18&63)),o.push(i.charAt(l>>>12&63)),o.push(i.charAt(l>>>6&63)),o.push(i.charAt(63&l))}switch(r){case 2:l=e[s++]<<16|e[s++]<<8,o.push(i.charAt(l>>>18&63)),o.push(i.charAt(l>>>12&63)),o.push(i.charAt(l>>>6&63)),o.push(t.SUFFIX);break;case 1:l=e[s++]<<16,o.push(i.charAt(l>>>18&63)),o.push(i.charAt(l>>>12&63)),o.push(t.SUFFIX),o.push(t.SUFFIX)}return o.join("")},t.decode=function(e){for(var i=t.CHARACTERS,o=t.SUFFIX,n=e.split(""),r=[],s=n.length;n[--s]===o;);for(var a=0;a>>16&255),r.push(l>>>8&255),r.push(255&l)}for(;0===r[r.length-1];)r.pop();return r},t.SUFFIX="=",t.CHARACTERS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t}(),r=function(){function t(){}return t.union=function(t,e){var i=e.s3[255&t],o=e.s2[255&(t>>=8)],n=e.s1[255&(t>>=8)];return((n=((n=((t=e.s0[255&(t>>=8)])>>16)+(n>>16)+((65535&t)+(65535&n)>>16)<<16|(65535&t)+(65535&n)&65535)>>16^o>>16)<<16|65535&(65535&n^65535&o))>>16)+(i>>16)+((65535&n)+(65535&i)>>16)<<16|(65535&n)+(65535&i)&65535},t.xor=function(t,e){return(t>>16^e>>16)<<16|65535&(65535&t^65535&e)},t._encryptBlock=function(e,i){var o=e.left,n=e.right,r=t.xor,s=t.union;o=r(o,i.p[0]),n=r(n,r(s(o,i),i.p[1])),o=r(o,r(s(n,i),i.p[2])),n=r(n,r(s(o,i),i.p[3])),o=r(o,r(s(n,i),i.p[4])),n=r(n,r(s(o,i),i.p[5])),o=r(o,r(s(n,i),i.p[6])),n=r(n,r(s(o,i),i.p[7])),o=r(o,r(s(n,i),i.p[8])),n=r(n,r(s(o,i),i.p[9])),o=r(o,r(s(n,i),i.p[10])),n=r(n,r(s(o,i),i.p[11])),o=r(o,r(s(n,i),i.p[12])),n=r(n,r(s(o,i),i.p[13])),o=r(o,r(s(n,i),i.p[14])),n=r(n,r(s(o,i),i.p[15])),o=r(o,r(s(n,i),i.p[16])),e.right=o,e.left=r(n,i.p[17])},t._decryptBlock=function(e,i){var o=e.left,n=e.right,r=t.xor,s=t.union;o=r(o,i.p[17]),n=r(n,r(s(o,i),i.p[16])),o=r(o,r(s(n,i),i.p[15])),n=r(n,r(s(o,i),i.p[14])),o=r(o,r(s(n,i),i.p[13])),n=r(n,r(s(o,i),i.p[12])),o=r(o,r(s(n,i),i.p[11])),n=r(n,r(s(o,i),i.p[10])),o=r(o,r(s(n,i),i.p[9])),n=r(n,r(s(o,i),i.p[8])),o=r(o,r(s(n,i),i.p[7])),n=r(n,r(s(o,i),i.p[6])),o=r(o,r(s(n,i),i.p[5])),n=r(n,r(s(o,i),i.p[4])),o=r(o,r(s(n,i),i.p[3])),n=r(n,r(s(o,i),i.p[2])),o=r(o,r(s(n,i),i.p[1])),e.right=o,e.left=r(n,i.p[0])},t._init=function(e){for(var i,o=e.split("").map((function(t){return 255&t.charCodeAt(0)})),n=(e=t.kb,t._encryptBlock),r=0,s=0,a={left:0,right:0},l={p:e.p.slice(0).map((function(e){for(var i=o.length,n=0;n<4;n++)s=s*t.POW8|o[r++%i];return(e>>16^s>>16)<<16|65535&(65535&e^65535&s)})),s0:e.s0.slice(0),s1:e.s1.slice(0),s2:e.s2.slice(0),s3:e.s3.slice(0)},h=0,u=l.p.length;h>3,d={left:null,right:null};for(a=0;a>24&255),h.push(d.left>>16&255),h.push(d.left>>8&255),h.push(255&d.left),h.push(d.right>>24&255),h.push(d.right>>16&255),h.push(d.right>>8&255),h.push(255&d.right),l+=8;return n.encode(h)},t.decrypt=function(e,i){for(var o=t._decryptBlock,r=t._init(i),s=[],a=n.decode(e),l=0,h=a.length>>3,u={left:null,right:null},d=0;d>24&255),s.push(c>>16&255),s.push(c>>8&255),s.push(255&c),s.push(p>>24&255),s.push(p>>16&255),s.push(p>>8&255),s.push(255&p),l+=8}return s[s.length-1]!==s[s.length-2]&&1!==s[s.length-1]||(e=s[s.length-1],s.splice(s.length-e,e)),s.map((function(t){return String.fromCharCode(t)})).join("")},t.POW2=Math.pow(2,2),t.POW3=Math.pow(2,3),t.POW4=Math.pow(2,4),t.POW8=Math.pow(2,8),t.POW16=Math.pow(2,16),t.POW24=Math.pow(2,24),t.kb={p:[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],s0:[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],s1:[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],s2:[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],s3:[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462],k:[202,218,204,100]},t}(),s=String.fromCharCode(100,107,100,108),a=function(){function t(t){this._gk=null!=t?t:s}return t.prototype._ldk=function(t){for(var e="",i=0,o=t.length;i>1);return e},t.prototype.get=function(){return this._gk+this._ldk(r.kb.k)},t}(),l=function(){function t(){}return t.run=function(t,e){return e=new a(e).get(),r.encrypt(t,e)},t}();e.r=l;var h=function(t){function e(){var i=t.call(this)||this;return Object.setPrototypeOf(i,e.prototype),i}return o(e,t),e}(Error),u=function(){function t(t,e){this._gk=e,this._code=t,this._lic=this.run()}return t.prototype.run=function(){for(var t={},e=r.decrypt(this._code,new a(this._gk).get()).split(";"),i=0,o=e.length;it;)(i=e.pop()).dispose();this.$_itemChanged(null)}}}),_dp(i,"items",{get:function(){return this._items}}),i.prototype.get=function(t){return this._items[t]},i.prototype.assignFrom=function(t){e.prototype.assignFrom.call(this,t);var i=this._items,o=t&&t.items?a.Utils.makeArray(t.items,!0):t;if(Array.isArray(o))for(var n=Math.max(o.length,1),r=0;r=1?1:-1;return t=Math.min(this._grid.rowGroupLevels,Math.abs(t))*e},set:function(t){t!==this._indentVisibleLevel&&(this._indentVisibleLevel=t,this._changed())}}),_dp(i,"levelIndent",{get:function(){return this._levelIndent},set:function(t){(t=Math.max(0,t))!=this._levelIndent&&(this._levelIndent=t,this._changed())}}),_dp(i,"footers",{get:function(){return this._footers},set:function(t){this.setFooters(t)}}),i.prototype.setFooters=function(t){this._footers.assignFrom(t)},_dp(i,"headerStatement",{get:function(){return this._headerStatement},set:function(t){t!==this._headerStatement&&(this._headerStatement=t,this._headerStatementExpr.source=t,this._changed())}}),_dp(i,"headerCallback",{get:function(){return this._headerCallback},set:function(t){this._headerCallback=t,this._changed()}}),_dp(i,"footerStatement",{get:function(){return this._footerStatement},set:function(t){t!=this._footerStatement&&(this._footerStatement=t,this._footerStatementExpr.source=t,this._changed())}}),_dp(i,"mergeExpanderVisibility",{get:function(){return this.expanderVisibility},set:function(t){this.expanderVisibility=t}}),_dp(i,"expanderVisibility",{get:function(){return this._expanderVisibility},set:function(t){t!==this.expanderVisibility&&(this._expanderVisibility=t,this._changed())}}),_dp(i,"expanderVisibleCallback",{get:function(){return this._expanderVisibleCallback},set:function(t){this._expanderVisibleCallback=t,this._changed()}}),_dp(i,"valueForGroupCallback",{get:function(){return this._valueForGroupCallback},set:function(t){this._valueForGroupCallback=t,this._grid&&this._grid.$_rowGroupAdornmentsChanged(this,!0),this._changed()}}),_dp(i,"resetOriginVindex",{get:function(){return this._resetOriginVindex},set:function(t){this._resetOriginVindex=t}}),_dp(i,"blankGroupData",{get:function(){return this._blankGroupData},set:function(t){t!==this._blankGroupData&&(this._blankGroupData=t,this._changed())}}),i.prototype.getHeaderCell=function(t){return this._headerCell.setIndex(l.CellIndex.temp(this.owner,t.index)),this._headerCell},i.prototype.getFooterCell=function(t){var e=t.item;return this._footerCell.setIndex(t),this._footerCell.calculate(e),this._footerCell},i.prototype.getFooterStyleName=function(t){var e=this._footers.get(t.$_footerIndex),i="rg-rowgroup-footer rg-rowgroup-footer-level-"+String(t.parent.level),o=e.styleName,n=e.styleCallback;return o&&(i+=" "+o),n&&(o=n(this._grid.handler,t.index,e.index))&&(i+=" "+o),i},i.prototype.getFooterCellStyle=function(t,e,o){void 0===o&&(o=!0);var n=t.footerIndex,r=this._footers.get(n).cellStyleCallback,s=t.index.column.groupFooters.get(t.footerIndex);if(r){var a=r(this._grid.handler,t);e.assign(a)}if(s){var l=s.styleCallback;if(l){var h=l(this._grid.handler,t);e.assign(h)}}return!e.styleName&&s&&(e.styleName=s.styleName),o&&(e.styleName?e.styleName=i.FOOTER_CELL_STYLE+" "+e.styleName:e.styleName=i.FOOTER_CELL_STYLE),e},i.prototype.getFooterCellFormatters=function(t,e){return e&&t?(e.numberFormatter=e.numberFormatter||t.numberFormatter,e.datetimeWriter=e.datetimeWriter||t.datetimeWriter,e.booleanFormatter=e.booleanFormatter||t.boolFormatter,e.textFormatter=e.textFormatter||t.textFormatter,e.prefix=e.prefix||t.prefix,e.suffix=e.suffix||t.suffix):t&&((e=this._footerFormatter).numberFormatter=t.numberFormatter,e.datetimeWriter=t.datetimeWriter,e.booleanFormatter=t.boolFormatter,e.textFormatter=t.textFormatter,e.prefix=t.prefix,e.suffix=t.suffix),e},i.prototype.getBarCell=function(t){return this._barCell.setIndex(t),this._barCell},i.prototype.getHeaderText=function(t){return!this._headerStatement&&this._headerCallback?this._headerCallback(this.owner.handler,t):(this._statementRuntime.setGrid(this.owner),this._statementRuntime.setGroup(t),this._headerStatementExpr.evaluate(this._statementRuntime))},i.prototype.getFooterText=function(t){if(this._footerStatement&&this._footerStatementExpr)return this._statementRuntime.setGrid(this.owner),this._statementRuntime.setGroup(t),this._footerStatementExpr.evaluate(this._statementRuntime)},i.prototype.getIndentCount=function(t){var e=this.indentVisibleLevel;return 0===e?t:Math.min(Math.abs(e),t)},i.prototype._doChanged=function(){this.owner.$_rowGroupChanged(this)},i.prototype.$_isExpanderVisible=function(t){var e;if(!t.expanded)return!0;if(this._expanderVisibleCallback)e=null==(e=this._expanderVisibleCallback.call(this._grid,this._grid.handler,t))||e;else switch(this._expanderVisibility){case u.ExpanderVisibility.NONE:e=!1;break;case u.ExpanderVisibility.ALWAYS:e=!0;break;default:e=(0,p.isMultiLine)(t)}return!!e&&(t instanceof o.GroupItemImpl?t.footerCount>0||(0,u.isHeaderAdornment)(this.collapsedAdornments):void 0)},i.FOOTER_CELL_STYLE="rg-rowgroup-footer-cell",i.FOOTER_CELL_RENDERER="rg-rowgroup-footer-renderer",i}(e.VisualObject);return Ja.RowGroup=v,Ja}var tl,el={};var il,ol={};var nl,rl={};var sl,al={};var ll,hl={};var ul,dl={};var cl,pl={};var _l,fl,gl={};function ml(){if(fl)return _n;fl=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.GridBase=void 0;var t=d,e=S(),i=wt(),o=rn(),n=Gi(),r=gn(),s=function(){if(mn)return yn;mn=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.ColumnCollection=void 0;var t=d,e=G(),i=ml(),o=rn(),n=S(),r=function(e){function r(t){var i=e.call(this)||this;return i._columns=[],i._orgColumns=[],i._nameMap={},i._owner=t,i}return t.__extends(r,e),r.prototype._doDispose=function(){this._clearColumn(),this._columns=null,this._owner=null,this._nameMap=null,e.prototype._doDispose.call(this)},_dp(r,"owner",{get:function(){return this._owner}}),_dp(r,"count",{get:function(){return this._columns.length}}),_dp(r,"columns",{get:function(){return this._columns.slice()}}),r.prototype.getColumn=function(t){return this._columns[t]},r.prototype.setColumns=function(t){if(this._columns.length=0,this._nameMap={},t)for(var e=0,i=t;e0&&(this._nameMap[e].$_hash===t.$_hash&&delete this._nameMap[e],this._nameMap[i]=t)},r.prototype.resetIndices=function(){if(this._owner)for(var t=0,e=this._columns.length;t=0)for(var e=0,i=this.count;e=0)for(var i=0,n=this.count;i=0)throw new Error("column is already contained");e<0?n.push(t):n.splice(e,0,t);var r=t.name;if(!r||this._nameMap[r])if(r=t instanceof o.DataColumn?t.fieldName:t instanceof o.SeriesColumn?"series":"column",this._nameMap[r]){for(var s=0;s<1e3;s++)if(!this._nameMap[r+s]){t.name=r+=s;break}}else t.name=r;return r&&(this._nameMap[r]=t),t}return null},r.prototype._removeColumn=function(t){var e=this._columns.indexOf(t);return e>=0&&(this._columns.splice(e,1),t.$_owner=void 0,delete this._nameMap[t.name],!0)},r.prototype._restoreColumn=function(){this._columns=this._orgColumns.slice()},r.prototype._clearColumn=function(){for(var t=0,e=this._columns;t0&&(this._heights[e]=Math.min(this._heights[e],this._maxRowHeight));this._changed()}}}),_dp(i,"resizable",{get:function(){return this._resizable},set:function(t){t!=this._resizable&&(this._resizable=t,this._changed())}}),_dp(i,"itemOffset",{get:function(){return this._itemOffset},set:function(t){t!=this._itemOffset&&(this._itemOffset=t,this._changed())}}),_dp(i,"itemGap",{get:function(){return this._itemGap},set:function(t){t!=this._itemGap&&(this._itemGap=t,this._changed())}}),_dp(i,"showTooltip",{get:function(){return this._showTooltip},set:function(t){t!=this._showTooltip&&(this._showTooltip=t,this._changed())}}),_dp(i,"tooltipEllipsisOnly",{get:function(){return this._tooltipEllipsisOnly},set:function(t){this._tooltipEllipsisOnly=t}}),_dp(i,"showSelection",{get:function(){return this._showSelection},set:function(t){t!=this._showSelection&&(this._showSelection=t,this._changed())}}),_dp(i,"sortWidth",{get:function(){return this._sortWidth},set:function(t){t!=this._sortWidth&&(this._sortWidth=t,this._changed())}}),_dp(i,"sortHeight",{get:function(){return this._sortHeight},set:function(t){t!=this._sortHeight&&(this._sortHeight=t,this._changed())}}),_dp(i,"filterWidth",{get:function(){return this._filterWidth},set:function(t){t!=this._filterWidth&&(this._filterWidth=t,this._changed())}}),_dp(i,"filterHeight",{get:function(){return this._filterHeight},set:function(t){t!=this._filterHeight&&(this._filterHeight=t,this._changed())}}),_dp(i,"popupWidth",{get:function(){return this._popupWidth},set:function(t){t!=this._popupWidth&&(this._popupWidth=t,this._changed())}}),_dp(i,"popupHeight",{get:function(){return this._popupHeight},set:function(t){t!=this._popupHeight&&(this._popupHeight=t,this._changed())}}),_dp(i,"expanderWidth",{get:function(){return this._expanderWidth},set:function(t){t!=this._expanderWidth&&(this._popupWidth=t,this._changed())}}),_dp(i,"expanderHeight",{get:function(){return this._expanderHeight},set:function(t){t!=this._expanderHeight&&(this._popupHeight=t,this._changed())}}),_dp(i,"showPopupMenu",{get:function(){return this._showPopupMenu},set:function(t){t!=this._showPopupMenu&&(this._showPopupMenu=t,this._changed())}}),_dp(i,"checkWidth",{get:function(){return this._checkWidth},set:function(t){t!=this._checkWidth&&(this._checkWidth=t,this._changed())}}),_dp(i,"checkHeight",{get:function(){return this._checkHeight},set:function(t){t!=this._checkHeight&&(this._checkHeight=t,this._changed())}}),_dp(i,"styleName",{get:function(){return this._styleName},set:function(t){t!=this._styleName&&(this._styleName=t,this._changed())}}),_dp(i,"exportStyleName",{get:function(){return this._exportStyleName},set:function(t){this._exportStyleName=t}}),i.prototype.setCalcHeights=function(t,e){this._calcHeights=t.slice(),e&&(this._fitHeights=t.slice())},i.prototype.getCalcHeights=function(){return this._calcHeights},i.prototype.getCell=function(t){var e=this._cell;e.setLayout(t);var i=t instanceof n.CellLayoutGroupItem?t.header:t.firstColumn.header;if(i&&(e.text=i.displayText,e.showTooltip=i.showTooltip,e.tooltipEllipsisOnly=i.tooltipEllipsisOnly,e.tooltip=i.tooltip,e.edgeMark=i.edgeMark,i instanceof s.ColumnHeader)){var o=t.firstColumn,r=void 0;e.index.set(-1,t.firstColumn),e.itemOffset=void 0===(r=i.itemOffset)?this._itemOffset:r,e.itemGap=void 0===(r=i.itemGap)?this._itemGap:r,e.checkLocation=i.checkLocation,e.checked=o.checked,e.useCheckImage=i.useCheckImage}return e},i.prototype.getStyleName=function(){return this._styleName},i.prototype._doChanged=function(){e.prototype._doChanged.call(this),this._grid&&this._grid.invalidatePosition()},i}(e.VisualObject);return Cn.GridHeader=h,Cn}(),u=bn(),c=Dn(),p=On(),_=Pn(),f=hr(),g=fr(),m=yr(),y=C(),v=jn(),w=Nr(),x=Ar(),b=E(),I=Hr(),R=qr(),T=ys(),k=ms(),M=Is(),O=function(){if(Ss)return Rs;Ss=1,Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.GridFootElement=Rs.GridFootCellElement=void 0;var t=d,e=Ds(),i=function(e){function i(t){return e.call(this,t,"gridFootCellView")||this}return t.__extends(i,e),i}(e.SectionCellElement);Rs.GridFootCellElement=i;var o=function(e){function o(t){var i=e.call(this,t,null,"gridFootView")||this;return i._domCssSelector="rg-foot",i}return t.__extends(o,e),o.prototype.getFootModel=function(t){return this._getCellModel(t)},o.prototype._createCellElement=function(t){return new i(t)},o.prototype._sectionCell=function(t){return t.getFootCell()},o.prototype._getSectionStyleName=function(t){return this.$_getCellSelector()+" "+t.getFootStyleName()},o.prototype._getHeadTrText=function(t){return t.getCellType()+" foot"},o.prototype._getSectionText=function(t){return t.footText},o.prototype.$_getCellSelector=function(){return"rg-foot-cell"},o}(e.SectionTableElement);return Rs.GridFootElement=o,Rs}(),F=function(){if(ks)return Ms;ks=1,Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.FormatOptions=void 0;var t=d,e=_r(),i=rt(),o=ft(),n=lt(),r=Qo(),s=Ct(),a=function(e){function a(t){var n=e.call(this,t)||this;return n._datetimeFormat=i.DateTimeWriter.DEFAULT_FORMAT,n._datetimeWriter=i.DateTimeWriter.Default,n._numberFormatter=o.DecimalFormatter.getFormatter(n._numberFormat=o.DecimalFormatter.DEFAULT_FORMAT),n.assignFrom(s.DefaultOptions.format),n}return t.__extends(a,e),a.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(a,"textFormat",{get:function(){return this._textFormat},set:function(t){t!=this._textFormat&&(this._textFormat=t,this._textFormatter=t?r.TextFormatter.getFormatter(t):null,this._changed())}}),_dp(a,"datetimeFormat",{get:function(){return this._datetimeFormat},set:function(t){t!=this._datetimeFormat&&(this._datetimeFormat=t,this._datetimeWriter=t?i.DateTimeWriter.getFormatter(t):null,this._changed())}}),_dp(a,"numberFormat",{get:function(){return this._numberFormat},set:function(t){t!=this._numberFormat&&(this._numberFormat=t,this._numberFormatter=t?o.DecimalFormatter.getFormatter(t):null,this._changed())}}),_dp(a,"booleanFormat",{get:function(){return this._booleanFormat},set:function(t){t!=this._booleanFormat&&(this._booleanFormat=t,this._boolFormatter=t?n.BooleanFormatter.getFormatter(t):null,this._changed())}}),_dp(a,"textFormatter",{get:function(){return this._textFormatter}}),_dp(a,"numberFormatter",{get:function(){return this._numberFormatter}}),_dp(a,"datetimeWriter",{get:function(){return this._datetimeWriter}}),_dp(a,"boolFormatter",{get:function(){return this._boolFormatter}}),a}(e.GridBaseOptions);return Ms.FormatOptions=a,Ms}(),L=function(){if(Fs)return Ls;Fs=1,Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.SortingOptions=void 0;var t=d,e=_r(),i=C(),o=Bs(),n=Ct(),r=_t(),s=function(e){function s(t){var i=e.call(this,t)||this;return i._pageSorting=!1,i._toast=new o.ToastOptions({visible:!1,message:i._messageCallback}),i.assignFrom(n.DefaultOptions.sorting),i}return t.__extends(s,e),s.prototype._doDispose=function(){this._toast=this._toast.dispose(),e.prototype._doDispose.call(this)},_dp(s,"enabled",{get:function(){var t=n.DefaultOptions.sorting.enabled;return void 0!==this._enabled?this._enabled:void 0===t||t},set:function(t){t!=this._enabled&&(this._enabled=t,this._changed())}}),_dp(s,"style",{get:function(){return this._style||n.DefaultOptions.sorting.style||i.SortStyle.EXCLUSIVE},set:function(t){t!=this._style&&(this._style=t,this._changed())}}),_dp(s,"handleVisibility",{get:function(){return this._handleVisibility||n.DefaultOptions.sorting.handleVisibility||i.HandleVisibility.VISIBLE},set:function(t){t!=this._handleVisibility&&(this._handleVisibility=t,this._changed())}}),_dp(s,"commitBeforeSorting",{get:function(){var t=n.DefaultOptions.sorting.commitBeforeSorting,e=this._commitBeforeSorting;return void 0!==e?e:void 0===t||t},set:function(t){t!=this._commitBeforeSorting&&(this._commitBeforeSorting=t,this._changed())}}),_dp(s,"keepFocusedRow",{get:function(){var t=n.DefaultOptions.sorting.keepFocusedRow,e=this._keepFocusedRow;return void 0!==e?e:void 0!==t&&t},set:function(t){t!=this._keepFocusedRow&&(this._keepFocusedRow=t,this._changed())}}),_dp(s,"textCase",{get:function(){return this._textCase||n.DefaultOptions.sorting.textCase||i.SortCase.SENSITIVE},set:function(t){t!=this._textCase&&(this._textCase=t,this._changed())}}),_dp(s,"showSortOrder",{get:function(){var t=n.DefaultOptions.sorting.showSortOrder,e=this._showSortOrder;return void 0!==e?e:void 0!==t&&t},set:function(t){t!=this._showSortOrder&&(this._showSortOrder=t,this._changed())}}),_dp(s,"pageSorting",{get:function(){return this._pageSorting},set:function(t){t!=this._pageSorting&&(this._pageSorting=t,this._changed())}}),_dp(s,"toast",{get:function(){return this._toast},set:function(e){e&&!e.message&&(e=t.__assign(t.__assign({},e),{message:this._messageCallback})),this._toast&&this._toast.assignFrom(e)}}),_dp(s,"nullsOrder",{get:function(){return this._nullsOrder||n.DefaultOptions.sorting.nullsOrder||i.NullsOrder.DEFAULT},set:function(t){t!==this._nullsOrder&&(this._nullsOrder=t,this._changed())}}),_dp(s,"outerSort",{get:function(){return this._outerSort},set:function(t){t!==this._outerSort&&(this._outerSort=t,this._changed())}}),_dp(s,"sortDataRow",{get:function(){var t=n.DefaultOptions.sorting.sortDataRow,e=this._sortDataRow;return void 0!==e?e:void 0===t||t},set:function(t){t!==this._sortDataRow&&(this._sortDataRow=t,this._changed())}}),s.prototype.assignFrom=function(t){e.prototype.assignFrom.call(this,t),this.grid&&this.grid.sortOptionsChanged()},s.prototype._changed=function(){e.prototype._changed.call(this),this.grid&&this.grid.sortOptionsChanged()},s.prototype._messageCallback=function(){var t;return(null===(t=n.DefaultOptions.sorting.toast)||void 0===t?void 0:t.message)||r.Messages.messages.sortingToastMessage},s}(e.GridBaseOptions);return Ls.SortingOptions=s,Ls}(),B=Ns(),V=function(){if($s)return Us;$s=1,Object.defineProperty(Us,"__esModule",{value:!0}),Us.MobileOptions=Us.PasteOptions=Us.CopyOptions=Us.EditorOptions=Us.EditorTitleExpressionRuntime=Us.EditOptions=void 0;var t=d,e=_r(),i=P(),o=$(),n=Ki(),r=Y(),s=cn(),a=ar(),l=S(),h=C(),u=_t(),c=Ct(),p=function(e){function i(t){var i=e.call(this,t)||this;return i._readOnly=!1,i._editable=!l.Utils.isMobile(),i._checkable=!0,i._updatable=!0,i._appendable=!1,i._insertable=!1,i._deletable=!1,i._revertable=!1,i._erasable=!1,i._movable=!1,i._commitByCell=!1,i._editWhenFocused=!1,i._commitWhenNoEdit=!1,i._commitWhenExitLast=!1,i._commitWhenLeave=!1,i._crossWhenExitLast=!1,i._validateOnEdited=!0,i._hintOnError=!0,i._showInvalidFormatMessage=!0,i._confirmWhenDelete=!0,i._editWhenClickFocused=!1,i._commitLevel=h.ValidationLevel.IGNORE,i._useTabKey=!0,i._useArrowKeys=!0,i._skipReadOnly=!1,i._skipReadOnlyCell=!1,i._verticalMoveStep=s.VerticalMoveStep.CELL,i._focusMoveStep=s.FocusMoveStep.CELL,i._enterToTab=!1,i._enterToNextCell=!0,i._enterToNextRow=!1,i._enterToEdit=!1,i._maxLengthToNextCell=!1,i._forceInsert=!1,i._forceAppend=!1,i._checkDiff=!1,i._checkCellDiff=!1,i._strictDiff=!1,i._deletableWhenEdit=!0,i._showCommitError=!1,i._firstCellWhenInsert=!1,i._appendWhenInsertKey=!1,i._appendWhenExitLast=!1,i._showOnlyValidationMessage=!0,i._displayEmptyEditRow=!1,i._buttonClickWhenSpace=!1,i._exitGridWhenTab=h.ExitGridWhenTab.NONE,i._cancelWhenLastUndo=!1,i._exceptDataClickWhenButton=!1,i._removeValidateOnCommit=!1,i._validateOnlyEditColumn=!1,i._columnEditableFirst=!1,i._currentChangingFirst=!1,i._movableWhenFocusedOnly=!1,i.assignFrom(c.DefaultOptions.edit),i}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(i,"readOnly",{get:function(){return this._readOnly},set:function(t){t!=this._readOnly&&(this._readOnly=t,this._refreshOwner(),this.$_invalidateEditor())}}),_dp(i,"editable",{get:function(){return this._editable},set:function(t){t!=this._editable&&(this._editable=t,this._refreshOwner(),this.$_invalidateEditor())}}),_dp(i,"columnEditableFirst",{get:function(){return this._columnEditableFirst},set:function(t){t!=this._columnEditableFirst&&(this._columnEditableFirst=t,this._refreshOwner(),this.$_invalidateEditor())}}),_dp(i,"checkable",{get:function(){return this._checkable},set:function(t){t!=this._checkable&&(this._checkable=t,this._changed())}}),_dp(i,"updatable",{get:function(){return this._updatable},set:function(t){t!=this._updatable&&(this._updatable=t,this._changed())}}),_dp(i,"appendable",{get:function(){return this._appendable},set:function(t){t!=this._appendable&&(this._appendable=t,this.displayEmptyEditRow=this._displayEmptyEditRow,this._changed())}}),_dp(i,"insertable",{get:function(){return this._insertable},set:function(t){t!=this._insertable&&(this._insertable=t,this._changed())}}),_dp(i,"deletable",{get:function(){return this._deletable},set:function(t){t!=this._deletable&&(this._deletable=t,this._changed())}}),_dp(i,"revertable",{get:function(){return this._revertable},set:function(t){t!=this._revertable&&(this._revertable=t,this._changed())}}),_dp(i,"erasable",{get:function(){return this._erasable},set:function(t){t!=this._erasable&&(this._erasable=t,this._changed())}}),_dp(i,"movable",{get:function(){return this._movable},set:function(t){t!=this._movable&&(this._movable=t,this._changed())}}),_dp(i,"commitByCell",{get:function(){return this._commitByCell},set:function(t){t!=this._commitByCell&&(this._commitByCell=t,this._changed())}}),_dp(i,"editWhenFocused",{get:function(){return this._editWhenFocused},set:function(t){this._editWhenFocused=t}}),_dp(i,"commitWhenNoEdit",{get:function(){return this._commitWhenNoEdit},set:function(t){this._commitWhenNoEdit=t}}),_dp(i,"commitWhenExitLast",{get:function(){return this._commitWhenExitLast},set:function(t){this._commitWhenExitLast=t}}),_dp(i,"commitWhenLeave",{get:function(){return this._commitWhenLeave},set:function(t){this._commitWhenLeave=t}}),_dp(i,"crossWhenExitLast",{get:function(){return this._crossWhenExitLast},set:function(t){this._crossWhenExitLast=t}}),_dp(i,"validateOnEdited",{get:function(){return this._validateOnEdited},set:function(t){this._validateOnEdited=t}}),_dp(i,"hintOnError",{get:function(){return this._hintOnError},set:function(t){this._hintOnError=t}}),_dp(i,"removeValidateOnCommit",{get:function(){return this._removeValidateOnCommit},set:function(t){this._removeValidateOnCommit=t}}),_dp(i,"validateOnlyEditColumn",{get:function(){return this._validateOnlyEditColumn},set:function(t){this._validateOnlyEditColumn=t}}),_dp(i,"deleteRowsMessage",{get:function(){return this._deleteRowsMessage||u.Messages.messages.deleteRowsMessage},set:function(t){this._deleteRowsMessage=t}}),_dp(i,"invalidFormatMessage",{get:function(){return this._invalidFormatMessage||u.Messages.messages.invalidFormatMessage},set:function(t){this._invalidFormatMessage=t}}),_dp(i,"showInvalidFormatMessage",{get:function(){return this._showInvalidFormatMessage},set:function(t){this._showInvalidFormatMessage=t}}),_dp(i,"confirmWhenDelete",{get:function(){return this._confirmWhenDelete},set:function(t){this._confirmWhenDelete=t}}),_dp(i,"editWhenClickFocused",{get:function(){return this._editWhenClickFocused},set:function(t){this._editWhenClickFocused=t}}),_dp(i,"commitLevel",{get:function(){return this._commitLevel},set:function(t){this._commitLevel=t}}),_dp(i,"useTabKey",{get:function(){return this._useTabKey},set:function(t){this._useTabKey=t}}),_dp(i,"useArrowKeys",{get:function(){return this._useArrowKeys},set:function(t){this._useArrowKeys=t}}),_dp(i,"skipReadOnly",{get:function(){return this._skipReadOnly},set:function(t){this._skipReadOnly=t}}),_dp(i,"skipReadOnlyCell",{get:function(){return this._skipReadOnlyCell},set:function(t){this._skipReadOnlyCell=t}}),_dp(i,"verticalMoveStep",{get:function(){return this._verticalMoveStep},set:function(t){this._verticalMoveStep=t}}),_dp(i,"focusMoveStep",{get:function(){return this._focusMoveStep},set:function(t){this._focusMoveStep=t}}),_dp(i,"enterToTab",{get:function(){return this._enterToTab},set:function(t){this._enterToTab=t}}),_dp(i,"enterToNextCell",{get:function(){return this._enterToNextCell},set:function(t){this._enterToNextCell=t}}),_dp(i,"enterToNextRow",{get:function(){return this._enterToNextRow},set:function(t){this._enterToNextRow=t}}),_dp(i,"enterToEdit",{get:function(){return this._enterToEdit},set:function(t){this._enterToEdit=t}}),_dp(i,"maxLengthToNextCell",{get:function(){return this._maxLengthToNextCell},set:function(t){this._maxLengthToNextCell=t}}),_dp(i,"forceInsert",{get:function(){return this._forceInsert},set:function(t){this._forceInsert=t}}),_dp(i,"forceAppend",{get:function(){return this._forceAppend},set:function(t){this._forceAppend=t}}),_dp(i,"checkDiff",{get:function(){return this._checkDiff},set:function(t){this._checkDiff=t}}),_dp(i,"checkCellDiff",{get:function(){return this._checkCellDiff},set:function(t){this._checkCellDiff=t}}),_dp(i,"strictDiff",{get:function(){return this._strictDiff},set:function(t){this._strictDiff=t}}),_dp(i,"deletableWhenEdit",{get:function(){return this._deletableWhenEdit},set:function(t){this._deletableWhenEdit=t}}),_dp(i,"commitEditingMessage",{get:function(){return this._commitEditingMessage||u.Messages.messages.commitEditingMessage},set:function(t){this._commitEditingMessage=t}}),_dp(i,"showCommitError",{get:function(){return this._showCommitError},set:function(t){this._showCommitError=t}}),_dp(i,"firstCellWhenInsert",{get:function(){return this._firstCellWhenInsert},set:function(t){this._firstCellWhenInsert=t}}),_dp(i,"appendWhenInsertKey",{get:function(){return this._appendWhenInsertKey},set:function(t){this._appendWhenInsertKey=t}}),_dp(i,"appendWhenExitLast",{get:function(){return this._appendWhenExitLast},set:function(t){this._appendWhenExitLast=t}}),_dp(i,"showOnlyValidationMessage",{get:function(){return this._showOnlyValidationMessage},set:function(t){this._showOnlyValidationMessage=t}}),_dp(i,"displayEmptyEditRow",{get:function(){return this._displayEmptyEditRow},set:function(t){var e=this.grid;this._displayEmptyEditRow=t,e.itemSource&&(this._displayEmptyEditRow&&this._appendable?e.itemSource.appendDummy():e.itemSource.cancelDummy(),this._refreshOwner())}}),_dp(i,"buttonClickWhenSpace",{get:function(){return this._buttonClickWhenSpace},set:function(t){this._buttonClickWhenSpace=t}}),_dp(i,"exitGridWhenTab",{get:function(){return this._exitGridWhenTab},set:function(t){this._exitGridWhenTab=t}}),_dp(i,"cancelWhenLastUndo",{get:function(){return this._cancelWhenLastUndo},set:function(t){this._cancelWhenLastUndo=t}}),_dp(i,"exceptDataClickWhenButton",{get:function(){return this._exceptDataClickWhenButton},set:function(t){this._exceptDataClickWhenButton=t}}),_dp(i,"scrollOnEditing",{get:function(){return this._scrollOnEditing},set:function(t){this._scrollOnEditing=t}}),_dp(i,"currentChangingFirst",{get:function(){return this._currentChangingFirst},set:function(t){this._currentChangingFirst=t}}),_dp(i,"movableWhenFocusedOnly",{get:function(){return this._movableWhenFocusedOnly},set:function(t){this._movableWhenFocusedOnly=t}}),i.prototype.isWritable=function(){return this._editable&&!this._readOnly},i.prototype.canUpdate=function(t){return!this._readOnly&&(t||this._updatable)},i.prototype.canInsert=function(){return!this._readOnly&&this._insertable},i.prototype.canAppend=function(){return!this._readOnly&&this._appendable},i.prototype.canDelete=function(){return!this._readOnly&&this._deletable},i.prototype.$_invalidateEditor=function(){this.grid&&this.grid.requestPrepareEditor()},i}(e.GridBaseOptions);Us.EditOptions=p;var _=function(e){function i(){return e.call(this)||this}return t.__extends(i,e),i.prototype._doDispose=function(){this._cell=null,e.prototype._doDispose.call(this)},_dp(i,"value",{set:function(t){this._value=t}}),_dp(i,"cell",{set:function(t){this._cell=t}}),i.prototype.isIdentifier=function(t){return t=t.toLowerCase(),i.IDENTS.hasOwnProperty(t)?i.IDENTS[t]:e.prototype.isIdentifier.call(this,t)},i.prototype.evaluateIdentifier=function(t){switch(t){case i.ID_VALUE:return this._value;case i.ID_ROW:return this._cell.itemIndex+1;case i.ID_COLUMN_HEADER:var e=this._cell&&this._cell.column;return e&&e.header&&e.header.text?e.header.text:e.displayText}throw new r.ExpressionEvaluationError("Invalid identifier key: "+t)},i.ID_VALUE=0,i.ID_ROW=1,i.ID_COLUMN_HEADER=2,i.IDENTS={value:i.ID_VALUE,row:i.ID_ROW,dcount:i.ID_COLUMN_HEADER},i}(r.ExpressionRuntime);Us.EditorTitleExpressionRuntime=_;var f=function(e){function i(t){var i=e.call(this,t)||this;return i._months=null,i._weekDays=null,i._viewGridInside=!1,i._holidays=null,i._dateCellEditor={},i._numberCellEditor={},i._dropdownCellEditor={},i._multiCheckCellEditor={},i._searchCellEditor={},i._showMarquee=!0,i._titleExprRuntime=new _,i.assignFrom(c.DefaultOptions.editor),i}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(i,"yearDisplayFormat",{get:function(){return this._yearDisplayFormat||u.Messages.messages.dateEditorYearDisplayFormat},set:function(t){this._yearDisplayFormat=t}}),_dp(i,"monthDisplayFormat",{get:function(){return this._monthDisplayFormat||u.Messages.messages.dateEditorMonthDisplayFormat},set:function(t){this._monthDisplayFormat=t}}),_dp(i,"months",{get:function(){return this._months||u.Messages.messages.dateEditorMonths},set:function(t){this._months=t.slice()}}),_dp(i,"weekDays",{get:function(){return this._weekDays||u.Messages.messages.dateEditorWeekDays},set:function(t){this._weekDays=t.slice()}}),_dp(i,"dateCellEditor",{get:function(){return this._dateCellEditor},set:function(e){this._dateCellEditor=t.__assign({},e)}}),_dp(i,"numberCellEditor",{get:function(){return this._numberCellEditor},set:function(e){this._numberCellEditor=t.__assign({},e)}}),_dp(i,"dropdownCellEditor",{get:function(){return this._dropdownCellEditor},set:function(e){this._dropdownCellEditor=t.__assign({},e)}}),_dp(i,"multiCheckCellEditor",{get:function(){return this._multiCheckCellEditor},set:function(e){this._multiCheckCellEditor=t.__assign({},e)}}),_dp(i,"searchCellEditor",{get:function(){return this._searchCellEditor},set:function(e){this._searchCellEditor=t.__assign({},e)}}),_dp(i,"showMarquee",{get:function(){return this._showMarquee},set:function(t){this._showMarquee=t}}),_dp(i,"viewGridInside",{get:function(){return this._viewGridInside},set:function(t){this._viewGridInside=t}}),_dp(i,"titleStatement",{get:function(){return this._titleStatement},set:function(t){t!=this._titleStatement&&(this._titleStatement=t,t?this._titleExprStatement?this._titleExprStatement.source=t:this._titleExprStatement=new n.ExpressionStatement(t):this._titleExprStatement=null,this._changed())}}),_dp(i,"holidays",{get:function(){return this._holidays},set:function(t){t!=this._holidays&&(this._holidays=t,t?(this._holidayCollection=this._holidayCollection||new a.HolidayCollection,this._holidayCollection.load(t)):this._holidayCollection&&this._holidayCollection.clear(),this._changed())}}),i}(e.GridBaseOptions);Us.EditorOptions=f;var g=function(e){function i(t){var i=e.call(this,t)||this;return i._enabled=!0,i.assignFrom(c.DefaultOptions.copy),i}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(i,"enabled",{get:function(){return this._enabled},set:function(t){this._enabled=t}}),_dp(i,"singleMode",{get:function(){return this._singleMode},set:function(t){this._singleMode=t}}),_dp(i,"datetimeFormat",{get:function(){return this._datetimeFormat},set:function(t){this._datetimeFormat=t}}),_dp(i,"booleanFormat",{get:function(){return this._booleanFormat},set:function(t){this._booleanFormat=t}}),_dp(i,"lookupDisplay",{get:function(){return this._lookupDisplay},set:function(t){this._lookupDisplay=t}}),_dp(i,"copyDisplayText",{get:function(){return this._copyDisplayText},set:function(t){this._copyDisplayText=t}}),_dp(i,"includeHeaderText",{get:function(){return this._includeHeaderText},set:function(t){this._includeHeaderText=t}}),_dp(i,"copyTextCallback",{get:function(){return this._copyTextCallback},set:function(t){this._copyTextCallback=t}}),_dp(i,"cutReadOnlyCell",{get:function(){return this._cutReadOnlyCell},set:function(t){this._cutReadOnlyCell=t}}),_dp(i,"multiSelectionCopyFailText",{get:function(){return this._multiSelectionCopyFailText||u.Messages.messages.multiSelectionCopyFailText},set:function(t){this._multiSelectionCopyFailText=t}}),i}(e.GridBaseOptions);Us.CopyOptions=g;var m=function(e){function n(t){var i=e.call(this,t)||this;return i._enabled=!0,i._startEdit=!0,i._commitEdit=!0,i._enableAppend=!0,i._numberCharsOfCols={},i._numberSeparatorOfCols={},i._stopOnError=!0,i._throwValidationError=!0,i.assignFrom(c.DefaultOptions.paste),i}return t.__extends(n,e),n.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(n,"enabled",{get:function(){return this._enabled},set:function(t){this._enabled=t}}),_dp(n,"singleMode",{get:function(){return this._singleMode},set:function(t){this._singleMode=t}}),_dp(n,"startEdit",{get:function(){return this._startEdit},set:function(t){this._startEdit=t}}),_dp(n,"commitEdit",{get:function(){return this._commitEdit},set:function(t){this._commitEdit=t}}),_dp(n,"enableAppend",{get:function(){return this._enableAppend},set:function(t){this._enableAppend=t}}),_dp(n,"forceAppend",{get:function(){return this._forceAppend},set:function(t){this._forceAppend=t}}),_dp(n,"fillFieldDefaults",{get:function(){return this._fillFieldDefaults},set:function(t){this._fillFieldDefaults=t}}),_dp(n,"fillColumnDefaults",{get:function(){return this._fillColumnDefaults},set:function(t){this._fillColumnDefaults=t}}),_dp(n,"forceRowValidation",{get:function(){return this._forceRowValidation},set:function(t){this._forceRowValidation=t}}),_dp(n,"forceColumnValidation",{get:function(){return this._forceColumnValidation},set:function(t){this._forceColumnValidation=t}}),_dp(n,"datetimeFormats",{get:function(){return this._datetimeFormats},set:function(t){if(t!==this._datetimeFormats)if(this._datetimeFormats=t&&t.concat(),t){this._dateReaders=[];for(var e=0;e0){for(var e="[",i=0;i0){for(var o="[",n=0,r=i.length;n0&&e<=this._levels){if((e=Math.min(e,this._levels)-1)>0){for(var o=this._tree,n=0;n0&&e&&e.length>0){for(var n=Math.min(t.length,e.length),r=0;r0){for(var e=0,i=t.length;e1){var n=void 0,r=this._levels-1;for(o=this._tree,n=0;n1)for(i=0,o=e.length;i0?d=l:-1===a?(d=this._viewWidth,u=Math.max(u,140)):-2===a?d=i.layout.cellWidth:a>0&&(d=a),d>0?(u>0&&(d=Math.max(u,d)),e.maxWidth>0&&(d=Math.min(d,e.maxWidth)),d=Math.min(d,s),h.width=Math.max(d,u)+"px"):h.removeProperty("width"),o.Utils.resetPosition(t.offsetParent,null,t,r.x,r.bottom,r.width,r,!0)},r.prototype.show=function(t,e,i,n){this._opened&&this.hide();var r=this._element,s=this._soptions,a=this._grid,l=a.container,h=a.displayOptions,u=(0,o.getWin)(r),d=l._containerDiv;(o.Utils.isSlotMode()?d:l.doc.body).appendChild(r),this._targetColumn=t,this._targetCell=e,r.className=s.style,r.tabIndex=-1,r.style.display="block",r.style.zIndex="".concat(h.baseZindex+7),this._autoFiltering=t.autoFilter,this._build(t,i,this._autoFiltering),this.resetPosition(),l.addPositionListener(this),!o.Utils.isSlotMode()&&u.addEventListener(o.Utils.isIEMode()?"mousedown":"pointerdown",this._globalMouseDownHandler,!1),!o.Utils.isSlotMode()&&u.addEventListener("keydown",this._globalKeyDownHandler,!1),n&&(this._searchInput&&(this._searchInput.value=n),this._doSearch(n)),this._opened=!0,!o.Utils.isMobile()&&this._searchInput&&this._searchInput.focus({preventScroll:!0})},r.prototype.hide=function(){if(this._opened){var t=this._grid.container;t.hasFocus()&&this._gridContainer.focus({preventScroll:!0}),o.Utils.detach(this._element);var e=(0,o.getWin)(this._element);t.removePositionListener(this),!o.Utils.isSlotMode()&&e.removeEventListener(o.Utils.isIEMode()?"mousedown":"pointerdown",this._globalMouseDownHandler,!1),!o.Utils.isSlotMode()&&e.removeEventListener("keydown",this._globalKeyDownHandler,!1),this._finalize(),this._element.style.display="none",this._opened=!1}},r.prototype._createItemInfo=function(t){this._items=[],this._visbleItemMap={};for(var e=this._soptions,i=(t=t instanceof n.ColumnFilterCollection?t.items:t).length,o=[],r=0;r0){var u=o[a-1];l.parent=u,u.childs||(u.childs=[]),u.childs.push(l)}this._visbleItemMap[r]=l}}this._calcluateStates(),this._visibleCount=this._calcVisibleItems()},r.prototype._setSelectInfo=function(t){var e=this;t.items.forEach((function(t){(t.criteria||t.callback)&&(e._selectInfo[t.name]={filter:t,active:t.active,checked:t.active})}))},r.prototype._build=function(t,e,i){var o=this._soptions,n=this._applyBatch=o.showButtons,r=this.doc;this._selectInfo={},this._manager.buildItems(t,e,i,!1);var s=this._filters=i?t.autoFilters:t.filters;this._createItemInfo(s),this._setSelectInfo(s),this._headerDiv=r.createElement("div"),this._headerDiv.className="rg-filter-header",o.showTitle&&this._buildTitle(this._headerDiv),o.filterReset&&this._buildReset(this._headerDiv),this._soptions.partialSearch&&this._buildSearchbox(this._headerDiv),this._buildSelectAllBox(),this._element.appendChild(this._headerDiv);var a=this._viewportDiv=r.createElement("div");a.className="rg-filter-list-viewport",a.style.height=o.listHeight+"px",a.addEventListener("scroll",this._scrollHandler),a.addEventListener("wheel",this._wheelHandler),this._listDiv=r.createElement("div"),this._listDiv.className="rg-filter-list",this._listDiv.style.position="relative",a.appendChild(this._listDiv),this._element.appendChild(a),this._calcAllChecked(),this._calcluateStates(),this._buildItems(),n&&this._buildFooter(this._element),this._searched=!1},r.prototype._finalize=function(){var t;this._visbleItemMap={};for(var e=this._items.length;e--;)this._items[e].filter=null,this._items[e].parent=null,this._items[e].childs=null,this._items[e]=null;for(this._items=[],(t=this._resetDiv)&&(t.removeEventListener("click",this._resetClickHandler),this._resetDiv=o.Utils.detach(this._resetDiv)),(t=this._titleDiv)&&(this._titleDiv=o.Utils.detach(this._titleDiv)),(t=this._searchDiv)&&(t.removeEventListener("input",this._searchInputHandler),t.removeEventListener("keydown",this._searchKeyDownHandler),this._searchInput=o.Utils.detach(this._searchInput),this._searchDiv=o.Utils.detach(this._searchDiv)),this._selectAllDiv.removeEventListener("click",this._checkAllClickHandler),this._selectAllDiv=o.Utils.detach(this._selectAllDiv),this._headerDiv=o.Utils.detach(this._headerDiv),this._footerDiv&&(this._confirmButton.removeEventListener("click",this._confirmClickHandler),this._cancelButton.removeEventListener("click",this._cancelClickHandler),this._confirmButton=o.Utils.detach(this._confirmButton),this._cancelButton=o.Utils.detach(this._cancelButton),this._footerDiv=o.Utils.detach(this._footerDiv)),e=this._itemElements.length;e--;)this._removeItem(e);this._itemElements=[];var i=this._viewportDiv;i.removeEventListener("scroll",this._scrollHandler),i.removeEventListener("wheel",this._wheelHandler),this._listDiv=o.Utils.detach(this._listDiv),this._viewportDiv=o.Utils.detach(this._viewportDiv)},r.prototype._buildSelectAllBox=function(){var t=this.doc,e=this._soptions,i=e.allCheckText,n=this._selectAllDiv=t.createElement("div");n.className="rg-filter-select-all",e.textToTitle&&i&&(n.title=i);var r=this._selectAllCheck=t.createElement("input");r.type="checkbox",r.className="rg-filter-checkbox",this._setCheckState(r,this._allCheck),n.appendChild(r);var s=this._selectAllText=t.createElement("div");s.className="rg-filter-text",s.innerHTML=o.Utils.htmlEncode(i),n.appendChild(s);var a=this._columnReset=t.createElement("div");e.useFilterResetImage?(a.className="rg-filter-column-reset image",a.innerHTML=""):(a.className="rg-filter-column-reset",a.innerHTML=o.Utils.htmlEncode(e.filterResetText)),n.appendChild(a),this._headerDiv.appendChild(this._selectAllDiv),this._selectAllDiv.addEventListener("click",this._checkAllClickHandler)},r.prototype._buildReset=function(t){var e=this.doc,i=this._resetDiv=e.createElement("div");i.className="rg-filter-reset",i.appendChild(e.createTextNode(this._soptions.filtersResetText)),i.addEventListener("click",this._resetClickHandler),t.appendChild(i)},r.prototype._buildTitle=function(t){var e=this.doc,i=this._titleDiv=e.createElement("div");i.className="rg-filter-title",i.appendChild(e.createTextNode(this._soptions.title||this._targetColumn.displayText)),t.appendChild(i)},r.prototype._buildItems=function(){var t="temp임시",e=o.Utils.getTextLength(t),i=0;this._filters.items.forEach((function(n){i=Math.max(i,n.level);var r=n.toString();ethis._visibleCount&&(n=Math.max(0,this._visibleCount-i));for(var r=0,s=0;sr-1;s--)this._removeItem(s);var l=this._visibleCount*this._itemHeight;this._listDiv.style.height=l+"px";var h=this._viewportDiv;h.scrollTop+h.offsetHeight>l&&(h.scrollTop=l-h.offsetHeight)},r.prototype._changeItemModel=function(t,e){var i=(0,o.getWin)(t),n=this._items[e];t.filter_id=e+"",this._soptions.textToTitle&&n.text&&(t.title=n.text);for(var r=t.childNodes.length;r--;){var s=t.childNodes.item(r);if(s instanceof i.HTMLElement){var a=s.className;if(a)if(a.indexOf("rg-filter-item-indent-")>-1)s.className="rg-filter-item-indent-"+n.level;else if(a.indexOf("rg-filter-expander")>-1){var l="rg-filter-expander";void 0!==n.expanded&&(l+=" "+(n.expanded?"rg-filter-expander-expanded":"rg-filter-expander-collapsed")),s.className=l}else if(s instanceof i.HTMLInputElement&&"rg-filter-checkbox"==a)this._setCheckState(s,n.state);else if(a.indexOf("rg-filter-text")>=0){var h=o.Utils.htmlEncode(n.text),u=this._searchInput?o.Utils.htmlEncode(this._searchInput.value):"",d="g"+(this._soptions.searchIgnoreCase?"i":"");h=u?h.replace(new RegExp(o.Utils.escapeRegExp(u),d),(function(t,e,i){return''.concat(t,"")})):h,s.innerHTML=""+h+""}}}},r.prototype._doScroll=function(){for(var t=this._itemElements,e=Math.max(0,Math.floor(Math.min(this._viewportDiv.scrollTop,this._listDiv.offsetHeight-this._viewportDiv.offsetHeight)/this._itemHeight)),i=0,o=t.length;i0&&this._filters.activateItems(l,e)}for(var p=t.parent;p;)p.state=this._calculateState(p.childs),p=p.parent;(t.parent||t.childs)&&this._redrawCheck(),this._calcAllChecked()},r.prototype._doFilterApply=function(){this._filters._updating=!0;try{for(var t=Object.keys(this._selectInfo),e=[],i=0;i0?2:-2)*this._itemHeight,this._viewportDiv.scrollTop+=e,this._doScroll()),t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation()},r.prototype._scrollHandler=function(t){this._doScroll()},r.prototype._searchInputHandler=function(t){var e=t.target;e instanceof(0,o.getWin)(e).HTMLInputElement&&this._doSearch(e.value)},r.prototype._searchKeyDownHandler=function(t){if(13==t.keyCode&&(this._doSearch(this._searchInput.value),this._searched&&this._soptions.activeWhenEnter&&this._items.length)){var e=this._selectAllCheck;e.checked=!(e.indeterminate=!1),this.$_allCheck(!0)}},r.prototype.$_refreshItem=function(t){for(var e=this._itemElements.length;e--;)this._removeItem(e);this._itemElements=[],this._manager.buildItems(t,t.grid.dataSource,t.autoFilter,!1),this._createItemInfo(t.autoFilters),this._buildItems()},r.prototype._resetClickHandler=function(){this._grid.resetFilters(!0);var t=this._soptions.closeWhenClick;this._resetActive(!1,t),t&&this.hide()},r.prototype.$_allCheck=function(t){this._activateAll(t),this._allCheck=t?n.ActiveState.ACTIVE:n.ActiveState.UNACTIVE,!this._applyBatch&&this._soptions.closeWhenClick&&this.hide()},r.prototype._checkAllClickHandler=function(t){var e=this._selectAllCheck,i=t.target;i===this._columnReset?this._resetActive(!0,!1):i!==e?(e.checked=!e.checked,e.indeterminate=!1,this.$_allCheck(e.checked)):i===e&&this.$_allCheck(e.checked)},r.prototype._itemClickHandler=function(t){for(var e=t.target,i=e.className.indexOf("rg-filter-expander")>-1,o="rg-filter-checkbox"==e.className,n=e;n&&"rg-filter-item"!==n.className;)n=n.parentElement;!n&&(n=t.currentTarget);var s=parseInt(n.filter_id),a=this._visbleItemMap[s];if(i)void 0!==a.expanded&&this._doExpand(a,!a.expanded);else{var l=void 0;o?l=e:(l=n.children.item(r.INDEX_CHECKBOX)).checked=!l.checked,this._doCheck(a,l.checked),!this._applyBatch&&this._soptions.closeWhenClick&&this.hide()}},r.prototype._confirmClickHandler=function(){this._doFilterApply(),this.hide()},r.prototype._cancelClickHandler=function(){this.hide()},r.INDEX_CHECKBOX=2,r}(e.EventAware);return $a.FilterSelector=r,$a}(),st=function(){if(Wa)return ja;Wa=1,Object.defineProperty(ja,"__esModule",{value:!0}),ja.TooltipManager=ja.ToolTipView=void 0;var t=d,e=G(),i=S(),o=function(e){function o(t,o){var n=e.call(this)||this;return n.$_touchendHandler=null,n._container=t,n._element=n.$_createElement(t.doc),n._isMessage=o,n.$_touchendHandler=function(t){t.preventDefault(),this.hide()}.bind(n),i.Utils.isMobile()&&n._element.addEventListener("touchend",n.$_touchendHandler,!1),n}return t.__extends(o,e),o.prototype._doDispose=function(){e.prototype._doDispose.call(this),this._element&&this._element.removeEventListener("touchend",this.$_touchendHandler),i.Utils.detach(this._element)},o.prototype.show=function(t,e,i,o,n){this.$_show(t,e,i,o,n)},o.prototype.hide=function(){clearTimeout(this._timer),i.Utils.detach(this._element)},o.prototype.$_createElement=function(t){var e=t.createElement("div");return e.style.pointerEvents="none",e.onkeydown=function(t){27==t.keyCode&&this.hide()}.bind(this),this.$_disableSelection(e),this._span=t.createElement("span"),e.appendChild(this._span),this.$_disableSelection(this._span),e},o.prototype.$_disableSelection=function(t){void 0!==t.onselectstart?t.onselectstart=function(){return!1}:void 0!==t.style.MozUserSelect?t.style.MozUserSelect="none":t.onmousedown=function(){return!1}},o.prototype.$_show=function(t,e,o,n,r){var s=this,a=this._container.gridView.displayOptions.baseZindex+4,l=this._element,h=t&&t.message;if(l&&h){this._span.innerHTML=h.replace(/\n/g,"
");var u=this._isMessage?"rg-message":"rg-tooltip";t.styleName&&(u="".concat(u," ").concat(t.styleName)),i.Utils.setClassName(l,u);var d=l.style;d.position="absolute",d.left="0px",d.top=o+"px",d.overflow="hidden",d.zIndex=String(a),this._container._container.appendChild(l);var c=i.Utils.getSize(l),p=i.Utils.getSize(this._container._container);d.left=p.width-c.width>e?e+"px":Math.max(p.right-c.width-p.left-2,0)+"px",c.bottom>p.bottom&&(l.style.top=r?Math.max(0,o-(c.bottom-p.bottom))+"px":Math.max(o-c.height-n,0)+"px"),d.visibility="visible",clearTimeout(this._timer),t.hideDuration&&(this._timer=setTimeout((function(){s.hide()}),t.hideDuration))}},o}(e.Base);ja.ToolTipView=o;var n=function(e){function i(t){var i=e.call(this)||this;return i._active=!1,i._messageActive=!1,i._container=t.container,i}return t.__extends(i,e),i.prototype._doDispose=function(){this._container=null,e.prototype._doDispose.call(this)},_dp(i,"visible",{get:function(){return this._active}}),i.prototype.show=function(t,e,i,n,r){return!(this._active||(this.close(),!t)||(this._tipView||(this._tipView=new o(this._container,!1)),this._tipView.show(t,e,i,n,r),this._active=!0,0))},i.prototype.showMessage=function(t,e,i){t&&((this._messageView||(this._messageView=new o(this._container,!0))).show(t,e,i,0,!1),this._messageActive=!0)},i.prototype.close=function(){return!!this._active&&(this._tipView&&this._tipView.hide(),this._active=!1,!0)},i.prototype.closeMessage=function(){this._messageActive&&(this._messageView&&this._messageView.hide(),this._messageActive=!1)},i}(e.Base);return ja.TooltipManager=n,ja}(),at=Ka(),ht=Bs(),ut=uo(),dt=Qa(),ct=ga(),pt=ps(),gt=Ot(),mt=function(){if(tl)return el;tl=1,Object.defineProperty(el,"__esModule",{value:!0}),el.DebugLayer=void 0;var t=d,e=jn(),i=S(),o=function(e){function o(t){var i=e.call(this,t.doc,"gridDebugLayer")||this;return i._owner=t,i}return t.__extends(o,e),o.prototype._doDispose=function(){e.prototype._doDispose.call(this)},o.prototype.layout=function(){var t=this._owner.layoutManager;this.$_setBounds(this._grid,t.gridBounds.clone().inflate(-1,-1));var e=t.dataBounds.clone();e.offset(t.contentBounds.x,t.contentBounds.y),this.$_setBounds(this._data,e)},o.prototype._getCssSelector=function(){return"rg-debug-layer"},o.prototype._initDom=function(t){var e=t.style,o=(0,i.getDoc)(t);e.position="absolute",t.appendChild(this._client=this.$_createElement(o,"Client")),t.appendChild(this._topContent=this.$_createElement(o,"Top Content")),t.appendChild(this._leftContent=this.$_createElement(o,"Left Content")),t.appendChild(this._fixedContent=this.$_createElement(o,"Fixed Content")),t.appendChild(this._content=this.$_createElement(o,"Content")),t.appendChild(this._rightContent=this.$_createElement(o,"Right Content")),t.appendChild(this._grid=this.$_createElement(o,"Grid Bounds","b")),t.appendChild(this._data=this.$_createElement(o,"Data Bounds","g")),t.appendChild(this._nonFixed=this.$_createElement(o,"Non Fixed","g"))},o.prototype.$_createElement=function(t,e,o){void 0===o&&(o="r");var n=t.createElement("span"),r=n.style;return r.display="inline-block",r.position="absolute",r.boxSizing="border-box",r.pointerEvents="none","b"==o?(r.border="2px dashed rgba(0, 0, 255, 0.5)",r.color="blue"):"g"==o?(r.paddingTop="20px",r.border="2px solid rgba(0, 128, 0, 0.5)",r.color="rgb(0, 128, 0)"):(r.border="1px solid rgba(255, 0, 0, 0.7)",r.color="red"),r.fontWeight="bold",r.textAlign="center",r.verticalAlign="middle",r.whiteSpace="normal",n[i.Utils.TextProp]=e,n},o.prototype.$_setBounds=function(t,e){var i=t.style;e.isEmpty?i.display="none":(i.display="inline-block",i.left=e.x+"px",i.top=e.y+"px",i.width=e.width+"px",i.height=e.height+"px",i.lineHeight=e.height+"px")},o}(e.LayerElement);return el.DebugLayer=o,el}(),yt=function(){if(il)return ol;il=1,Object.defineProperty(ol,"__esModule",{value:!0}),ol.ProgressManager=void 0;var t=d,e=et(),i=S();!function(e){function o(){var t=e.call(this)||this;return t._min=0,t._max=100,t._step=1,t._next=0,t._completed=!1,t._timer=void 0,t}t.__extends(o,e),_dp(o,"min",{get:function(){return this._min},set:function(t){this._min=t}}),_dp(o,"max",{get:function(){return this._max},set:function(t){this._max=t}}),_dp(o,"step",{get:function(){return this._step},set:function(t){this._step=t}}),o.prototype.execute=function(t){if(t){this._runner=t,this._next=this._min;var e=(0,i.getWin)(t.container);t.container instanceof e.HTMLElement&&(this._view.setProperties(this._min,this._max,this._min),this._view.show(t.container)),this.$_runNext()}},o.prototype.$_runNext=function(){if(this._nextt&&(o+=Math.floor(100*(i-t)/(e-t))+"% ("+i+" / "+e+")")),this._view.setProperties(t,e,i,o,!0))},i.prototype.showLoader=function(t,e){this._loaderView||(this._loaderView=new r(t)),this._loaderView.setZIndex(e),this._loaderView.show(t||this._container)},i.prototype.closeLoader=function(){this._loaderView&&this._loaderView.close()},i.prototype.loaderShowing=function(){return this._loaderView&&this._loaderView.isShowing()},i}(e.EventAware);ol.ProgressManager=n;var r=function(e){function o(t){var o=e.call(this)||this,n=(0,i.getDoc)(t);return o._dom=o.$_createElement(n),o}return t.__extends(o,e),o.prototype.show=function(t){t.appendChild(this._dom)},o.prototype.setZIndex=function(t){this._dom.style.zIndex=String(t+5)},o.prototype.close=function(){i.Utils.detach(this._dom)},o.prototype.isShowing=function(){return!!this._dom.parentElement},o.prototype.$_createElement=function(t){var e=t.createElement("div");return e.className="rg-load-indicator",e.style.position="absolute",e},o}(e.EventAware);return ol}(),vt=Vr(),xt=ha(),bt=Go(),It=Xo(),Et=fs(),St=D(),Rt=function(){if(nl)return rl;nl=1,Object.defineProperty(rl,"__esModule",{value:!0}),rl.WaiOptions=void 0;var t=d,e=function(e){function i(t){var i=e.call(this,t)||this;return i._title="리얼그리드 테이블 (테이블에서 엔터키로 버튼 링크등의 기능이 실행됩니다)",i._description="${columns} 열로 이루어진 데이터 테이블입니다.",i}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(i,"title",{get:function(){return this._title},set:function(t){this._title!==t&&(this._title=t)}}),_dp(i,"description",{get:function(){return this._description},set:function(t){this._description!==t&&(this._description=t)}}),i.prototype.getDescription=function(){var t,e=this.title?""+this.title+"":"",i="";if(t=this.grid){var o=t.layoutManager.cellLayouts._dataCells,n=o&&o[0];n&&n.forEach((function(t){t.isProxy||(i+=t.displayText+", ")}))}return e+(i=this.description?""+this.description.replace("${columns}",i.substr(0,i.length-2))+"":"")},i}(_r().GridBaseOptions);return rl.WaiOptions=e,rl}(),Tt=function(){if(sl)return al;sl=1,Object.defineProperty(al,"__esModule",{value:!0}),al.WaterMarkLayer=void 0;var t=d,e=jn(),i=S(),o=function(e){function o(t){var i=e.call(this,t.doc,"watermark")||this;return i._grid=t,i}return t.__extends(o,e),o.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(o,"message",{get:function(){return this._message},set:function(t){this._message=t}}),_dp(o,"active",{get:function(){return this._active},set:function(t){this._active=t}}),o.prototype.refresh=function(){var t=32===this._grid.container._lkCheck;if(t){this._active=!0;var e=this._dom;e&&!e.parentElement&&this._grid._dom.appendChild(e),this.$_setDiv(e,t),this.$_setSpan(this._span,t,this.message||i.Base64.decode("6riw6rCE7J20IOunjOujjOuQmOyXiOyKteuLiOuLpA==")),this.resetSize(),this._grid.container.disabled=!0}},o.prototype._getCssSelector=function(){return"rg-watermark-layer"},o.prototype._initDom=function(t){var e=(0,i.getDoc)(t);t.appendChild(this._span=this.$_createElement(e,""))},o.prototype._setSizeStyle=function(t){var e=this._active;t.width=e?"100%":"0px",t.height=e?"100%":"0px"},o.prototype.$_setDiv=function(t,e){var i=t.style;i.position="absolute",i.zIndex="1",e?(this.setImportantStyle("background-color","rgba(80, 80, 80, 0.5)"),this.setImportantStyle("display","block"),i.removeProperty("pointer-events")):i.pointerEvents="none"},o.prototype.$_setSpan=function(t,e,o){var n=t.style;e&&(n.display="inline-block",n.position="absolute",n.boxSizing="border-box",n.pointerEvents="none",n.fontWeight="bold",n.textAlign="center",n.verticalAlign="middle",n.whiteSpace="normal",n.top="50%",n.left="50%",n.transform="translate(-50%, -50%)",n.fontSize="50px",t[i.Utils.TextProp]=o)},o.prototype.$_createElement=function(t,e){return t.createElement("span")},o}(e.LayerElement);return al.WaterMarkLayer=o,al}(),Dt=function(){if(ll)return hl;ll=1,Object.defineProperty(hl,"__esModule",{value:!0}),hl.FilterPanel=hl.FilterPanelCell=void 0;var t=d,e=Ct(),i=_t(),o=Ta(),n=S(),r=C(),s=uo(),a=io(),l=function(e){function i(){return e.call(this,"filterPanelCell")||this}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},i}(s.GridCell);hl.FilterPanelCell=l;var h=function(s){function a(t){var i=s.call(this,t)||this;return i._showInput=!0,i._height=23,i._minRowHeight=23,i._filterDelay=500,i._ignoreCase=!0,i._trimData=!1,i._beforeCommit=!0,i._defaultNumberOperator=r.InlineFilterOperator.GREATER_EQUAL,i._defaultTextOperator=r.InlineFilterOperator.CONTAINS,i._defaultDateOperator=r.InlineFilterOperator.GREATER_EQUAL,i.visible=!1,i.assignFrom(e.DefaultOptions.filterPanel),i._cell=new l,i}return t.__extends(a,s),_dp(a,"height",{get:function(){return this._height},set:function(t){t!==this._height&&(this._height=t,this._changed())}}),_dp(a,"minRowHeight",{get:function(){return this._minRowHeight},set:function(t){t!==this._minRowHeight&&(this._minRowHeight=t,this._changed())}}),_dp(a,"showInput",{get:function(){return this._showInput},set:function(t){t!=this._showInput&&(this._showInput=t)}}),_dp(a,"ignoreCase",{get:function(){return this._ignoreCase},set:function(t){t!==this._ignoreCase&&(this._ignoreCase=t)}}),_dp(a,"filterDelay",{get:function(){return this._filterDelay},set:function(t){this._filterDelay=t}}),_dp(a,"beforeCommit",{get:function(){return this._beforeCommit},set:function(t){t!=this._beforeCommit&&(this._beforeCommit=t)}}),_dp(a,"textOperators",{get:function(){if(!a.$_DefaultTextOperators){var t=i.Messages.messages;a.$_DefaultTextOperators={contains:t.filterOperatorContains,notContains:t.filterOperatorNotContains,startsWith:t.filterOperatorStartsWith,endsWith:t.filterOperatorEndsWith,equal:t.filterOperatorEqual,notEqual:t.filterOperatorNotEqual,empty:t.filterOperatorEmpty,reset:t.filterOperatorReset}}return this._textOperators||a.$_DefaultTextOperators},set:function(t){this._grid.closePopups(!1);var e=this.$_setOperators(t);e&&(this._textOperators=e),this.$_getPopup(a.$_TEXT_POPUP,this.textOperators,!0)}}),_dp(a,"numberOperators",{get:function(){if(!a.$_DefaultNumberOperators){var t=i.Messages.messages;a.$_DefaultNumberOperators={equal:t.filterOperatorEqual,notEqual:t.filterOperatorNotEqual,greater:t.filterOperatorGreater,greaterEqual:t.filterOperatorGreaterEqual,lower:t.filterOperatorLower,lowerEqual:t.filterOperatorLowerEqual,between:t.filterOperatorBetween,empty:t.filterOperatorEmpty,reset:t.filterOperatorReset}}return this._numberOperators||a.$_DefaultNumberOperators},set:function(t){this._grid.closePopups(!1);var e=this.$_setOperators(t);e&&(this._numberOperators=e),this.$_getPopup(a.$_NUMBER_POPUP,this.numberOperators,!0)}}),_dp(a,"dateOperators",{get:function(){if(!a.$_DefaultDateOperators){var t=i.Messages.messages;a.$_DefaultDateOperators={contains:t.filterOperatorContains,notContains:t.filterOperatorNotContains,startsWith:t.filterOperatorStartsWith,endsWith:t.filterOperatorEndsWith,equal:t.filterOperatorEqual,notEqual:t.filterOperatorNotEqual,greater:t.filterOperatorGreater,greaterEqual:t.filterOperatorGreaterEqual,lower:t.filterOperatorLower,lowerEqual:t.filterOperatorLowerEqual,empty:t.filterOperatorEmpty,reset:t.filterOperatorReset}}return this._dateOperators||a.$_DefaultDateOperators},set:function(t){this._grid.closePopups(!1);var e=this.$_setOperators(t);e&&(this._dateOperators=e),this.$_getPopup(a.$_DATE_POPUP,this.dateOperators,!0)}}),_dp(a,"trimData",{get:function(){return this._trimData},set:function(t){t!==this._trimData&&(this._trimData=t,this._changed())}}),_dp(a,"filterPanelCallback",{get:function(){return this._filterPanelCallback},set:function(t){this._filterPanelCallback=t}}),_dp(a,"styleName",{get:function(){return this._styleName},set:function(t){t!==this._styleName&&(this._styleName=t,this._changed())}}),a.prototype.getPopup=function(t){switch(t.valueType){case r.ValueType.DATE:case r.ValueType.DATETIME:return this.$_getPopup(a.$_DATE_POPUP,this.dateOperators,!1);case r.ValueType.NUMBER:case r.ValueType.UINT:case r.ValueType.INT:case r.ValueType.UNUM:return this.$_getPopup(a.$_NUMBER_POPUP,this.numberOperators,!1);case r.ValueType.TEXT:case r.ValueType.CHAR:return this.$_getPopup(a.$_TEXT_POPUP,this.textOperators,!1)}},a.prototype.clearInput=function(t){("string"!=typeof t||(t=this._grid.columnByName(t)))&&this._grid.clearInlineFilter(t)},a.prototype.getCell=function(t){var e=this._cell,i=t.getDataColumn();return e.index.set(-1,i),e.showInput=!!i&&i.filterable&&(this.showInput?!1!==i.showInlineFilter:i.showInlineFilter),e.filterOperator=i._inlineFilterOp||this.$_getDefaultOperator(i),e.filterText=i._inlineFilterText||"",e},a.prototype.assignFrom=function(t){s.prototype.assignFrom.call(this,t)},a.prototype._doChanged=function(){this._grid&&this._grid.invalidatePosition()},a.prototype.$_getPopup=function(t,e,i){var r=this._grid,s=r.popupMenuManager,a=s.getMenu(t);if(!a||i){for(var l=[],h=Object.keys(e),u=r.filterOperatorCallback.bind(r),d=0,c=h;d0){var n=Object.keys(r.InlineFilterOperator);e={};for(var s=0;s ").concat(c);break;case s.InlineFilterOperator.GREATER:r="".concat(a," > ").concat(c);break;case s.InlineFilterOperator.GREATER_EQUAL:r="".concat(a," >= ").concat(c);break;case s.InlineFilterOperator.LOWER:r="".concat(a," < ").concat(c);break;case s.InlineFilterOperator.LOWER_EQUAL:r="".concat(a," <= ").concat(c);break;case s.InlineFilterOperator.CONTAINS:r="".concat(a," like '%").concat(e,"%'");break;case s.InlineFilterOperator.NOT_CONTAINS:r="".concat(a," not like '%").concat(e,"%'");break;case s.InlineFilterOperator.STARTS_WITH:r="".concat(a," like '").concat(e,"%'");break;case s.InlineFilterOperator.ENDS_WITH:r="".concat(a," like '%").concat(e,"'");break;case s.InlineFilterOperator.EMPTY:r="value is empty";break;case s.InlineFilterOperator.BETWEEN:var p=c.split("~").sort((function(t,e){return parseFloat(t)-parseFloat(e)}));r=2===p.length&&p[1]?"(value >= ".concat(p[0],") and (value <= ").concat(p[1],")"):"value >= ".concat(p[0])}break;case s.ValueType.TEXT:default:a=o.lookupDisplay?"text":"value",a=t.trimData?"trim(".concat(a,")"):a;var _=t.ignoreCase?"i":"";switch(e=t.trimData&&e?e.trim():e,e=(e=t.ignoreCase&&e?e.toLowerCase():e).replace(/\\/g,"\\\\").replace(/\'/g,"\\'"),i){case s.InlineFilterOperator.CONTAINS:r="".concat(a," ").concat(_,"likehan '%").concat(e,"%'");break;case s.InlineFilterOperator.NOT_CONTAINS:r="".concat(a," not ").concat(_,"likehan '%").concat(e,"%'");break;case s.InlineFilterOperator.STARTS_WITH:r="".concat(a," ").concat(_,"likehan '").concat(e,"%'");break;case s.InlineFilterOperator.ENDS_WITH:r="".concat(a," ").concat(_,"likehan '%").concat(e,"'");break;case s.InlineFilterOperator.EQUAL:r="".concat(a," ").concat(_,"like '").concat(e,"'");break;case s.InlineFilterOperator.NOT_EQUAL:r="".concat(a," not ").concat(_,"like '").concat(e,"'");break;case s.InlineFilterOperator.EMPTY:r="value is empty"}}else r=void 0;var f=this.tableCellByLayout(o.layout);r!=f.criteria&&(f.criteria=r,o.setInlineFilter(r,!0)),i&&(o._inlineFilterOp=i),o._inlineFilterText=l},o.prototype._getStartCell=function(t){return t.getStartCell()},o.prototype._getEndCell=function(t){return t.getEndCell()},o.prototype.$_getCellHeight=function(t){var e=t.layout.hrow,i=this._rowPoints[e];return this._rowPoints[e+t.rowSpan]-i},o.prototype.$_refreshCells=function(t,e,i){for(var o=this._cells,n=i.children,r=n.length,s=this._getFirstCell(t),a=this._getLastCell(t)-s+1,h=o.length;h0){var m=0,y=d.vindex+1;if(p)for(;m++=0;I--){var E=b[I];y._tableViews[E.$_hash]=E}return y._contentPane.addChild(y._headerView),y._contentPane.addChild(y._headerSummaryView),y._contentPane.addChild(y._filterPanelView),y._contentPane.addChild(y._bodyView),y._contentPane.addChild(y._footerView),y._fixedContentPane.addChild(y._fixedBodyView),y._fixedContentPane.addChild(y._fixedFooterView),y._fixedContentPane.addChild(y._fixedHeaderSummaryView),y._fixedContentPane.addChild(y._fixedHeaderView),y._fixedContentPane.addChild(y._fixedFilterView),y._rightContentPane.addChild(y._rightBodyView),y._rightContentPane.addChild(y._rightFooterView),y._rightContentPane.addChild(y._rightHeaderSummaryView),y._rightContentPane.addChild(y._rightHeaderView),y._rightContentPane.addChild(y._rightFilterView),y._leftContentPane.addChild(y._rowBarContainer),y._leftContentPane.addChild(y._footView),y._leftContentPane.addChild(y._sumView),y._leftContentPane.addChild(y._headView),y._leftContentPane.addChild(y._filterView),y._doCreateOtherElements(),y.addElement(y._selectionLayer=y._createSelectionLayer()),y.addElement(y._feedbackLayer=new v.LayerElement(C,"feedbackLayer")),y.addFeedbackElement(y._rowHoverView=new U.RowHoverView(C)),y.addElement(y._hscrollBar=new k.ScrollBar(t,!1)),y.addElement(y._vscrollBar=new k.ScrollBar(t,!0)),y.addElement(y._scrollEdge=new k.ScrollEdge(C)),y._hscrollBar.addListener(y),y._vscrollBar.addListener(y),y._selections=new N.SelectionManager(y),y._selections.addListener(y),y._fixedOptions=new g.FixedOptions(y),y._displayOptions=new m.DisplayOptions(y),y._formatOptions=new F.FormatOptions(y),y._editOptions=new V.EditOptions(y),y._editorOptions=new V.EditorOptions(y),y._copyOptions=new V.CopyOptions(y),y._pasteOptions=new V.PasteOptions(y),y._dataDropOptions=new pt.DataDropOptions(y),y._sortingOptions=new L.SortingOptions(y),y._filteringOptions=new ot.FilteringOptions(y),y._waiOptions=new Rt.WaiOptions(y),y._mobileOptions=new V.MobileOptions(y),y._initStyles(),y._columns=new s.ColumnCollection(y),y._activeCellLayout=y._defaultCellLayout=new a.DefaultCellLayout(y),y._defaultCellLayout.addListener(y),y._delegate=y._createDelegate(),y._layoutManager=y._createLayoutManager(),y._editController=y._createEditController(),y._validationManager=new q.ValidationManager(y),y._lookupProvider=new X.LocalLookupSourceProvider,y._lookupProvider.addListener(y),y._clipboardManager=new K.ClipboardManager(y),y._progressManager=new yt.ProgressManager(y._container._containerDom),y._popupMenuManager=new Z.PopupMenuManager(y._container),y._popupMenuManager.addListener(y),y._tooltipManager=new st.TooltipManager(y),y._filterSelector=new nt.FilterSelector(y._container,y._filteringOptions,y),y._toastManager=new ht.ToastManager(y),y._currentIndex=new l.CellIndex(y),y._editorIndex=new l.CellIndex(y),y._focusedIndex=new l.CellIndex(y),i&&(y._waiOptions.assignFrom(n),y.checkBar.useImages=!0),y}return t.__extends(C,d),C.createColumn=function(t){if(t){var e=t.type;return"series"==e?new o.SeriesColumn(t):"literal"===e?new o.LiteralColumn(t):new o.DataColumn(t)}return null},C.prototype._doDispose=function(){return this.clearListener(),this._container=this._container.dispose(),this._gridObjects.length=0,this._header=this._header.dispose(),this._headerSummaries=this._headerSummaries.dispose(),this._footers=this._footers.dispose(),this._rowIndicator=this._rowIndicator.dispose(),this._stateBar=this._stateBar.dispose(),this._checkBar=this._checkBar.dispose(),this._body=this._body.dispose(),this._filterPanel=this._filterPanel.dispose(),this._rootElement=this._rootElement.dispose(),this._contentPane=this._contentPane.dispose(),this._rightContentPane=this._rightContentPane.dispose(),this._fixedContentPane=this._fixedContentPane.dispose(),this._leftContentPane=this._leftContentPane.dispose(),this._sideContentPane=this._sideContentPane&&this._sideContentPane.dispose(),this._topContentPane=this._topContentPane&&this._topContentPane.dispose(),this._bodyView=this._bodyView.dispose(),this._fixedBodyView=this._fixedBodyView.dispose(),this._rightBodyView=this._rightBodyView.dispose(),this._headerView=this._headerView.dispose(),this._fixedHeaderView=this._fixedHeaderView.dispose(),this._rightHeaderView=this._rightHeaderView.dispose(),this._headerSummaryView=this._headerSummaryView.dispose(),this._fixedHeaderSummaryView=this._fixedHeaderSummaryView.dispose(),this._rightHeaderSummaryView=this._rightHeaderSummaryView.dispose(),this._footerView=this._footerView.dispose(),this._fixedFooterView=this._fixedFooterView.dispose(),this._rightFooterView=this._rightFooterView.dispose(),this._rowBarContainer=this._rowBarContainer.dispose(),this._headView=this._headView.dispose(),this._sumView=this._sumView.dispose(),this._footView=this._footView.dispose(),this._filterPanelView=this._filterPanelView.dispose(),this._fixedFilterView=this._fixedFilterView.dispose(),this._rightFilterView=this._rightFilterView.dispose(),this._selectionLayer=this._selectionLayer.dispose(),this._feedbackLayer=this._feedbackLayer.dispose(),this._hscrollBar=this._hscrollBar.dispose(),this._vscrollBar=this._vscrollBar.dispose(),this._scrollEdge=this._scrollEdge.dispose(),this._selections=this._selections.dispose(),this._fixedOptions=this._fixedOptions.dispose(),this._displayOptions=this._displayOptions.dispose(),this._formatOptions=this._formatOptions.dispose(),this._editOptions=this._editOptions.dispose(),this._editorOptions=this._editorOptions.dispose(),this._copyOptions=this._copyOptions.dispose(),this._pasteOptions=this._pasteOptions.dispose(),this._sortingOptions=this._sortingOptions.dispose(),this._filteringOptions=this._filteringOptions.dispose(),this._mobileOptions=this._mobileOptions&&this._mobileOptions.dispose(),this._columns=this._columns.dispose(),this._activeCellLayout&&this._activeCellLayout.dispose(),this._activeCellLayout=null,this._defaultCellLayout=this._defaultCellLayout.dispose(),this._delegate=this._delegate.dispose(),this._layoutManager=this._layoutManager.dispose(),this._editController=this._editController&&this._editController.dispose(),this._filterSelector=this._filterSelector.dispose(),this._toastManager=this._toastManager.dispose(),this._tableViews=null,this._lookupProvider=this._lookupProvider&&this._lookupProvider.dispose(),this._columnSummaryRuntime=this._columnSummaryRuntime&&this._columnSummaryRuntime.dispose(),this._popupMenuManager=this._popupMenuManager&&this._popupMenuManager.dispose(),this._tooltipManager=this._tooltipManager&&this._tooltipManager.dispose(),this._focusedIndex=this._focusedIndex.dispose(),this._scrollTipView=this._scrollTipView&&this._scrollTipView.dispose(),this._waiOptions=this._waiOptions&&this._waiOptions.dispose(),this._watermarkLayer=this._watermarkLayer&&this._watermarkLayer.dispose(),l.CellIndex.clearTemp(),this._cellGhostStyle={},d.prototype._doDispose.call(this)},_dp(C,"debugging",{get:function(){return this._debugging},set:function(t){t!=this._debugging&&(this._debugging=t,t?(this.addChild(this._debugView),this.invalidateLayout()):this.removeChild(this._debugView))}}),_dp(C,"activeTool",{get:function(){return this.container.activeTool}}),_dp(C,"scrollBarWidth",{get:function(){return this._scrollBarWidth},set:function(t){(t=Math.max(0,t))!=this._scrollBarWidth&&(this._scrollBarWidth=t,this.invalidateLayout(),this.invalidatePosition())}}),_dp(C,"scrollBarHeight",{get:function(){return this._scrollBarHeight},set:function(t){(t=Math.max(0,t))!=this._scrollBarHeight&&(this._scrollBarHeight=t,this.invalidateLayout(),this.invalidatePosition())}}),_dp(C,"body",{get:function(){return this._body}}),_dp(C,"header",{get:function(){return this._header}}),_dp(C,"footers",{get:function(){return this._footers}}),_dp(C,"footer",{get:function(){return this._footers.get(0)}}),C.prototype.setFooters=function(t){this._footers.assignFrom(t)},_dp(C,"headerSummaries",{get:function(){return this._headerSummaries}}),_dp(C,"headerSummary",{get:function(){return this._headerSummaries.get(0)}}),C.prototype.setHeaderSummaries=function(t){this._headerSummaries.assignFrom(t)},_dp(C,"rowIndicator",{get:function(){return this._rowIndicator}}),_dp(C,"checkBar",{get:function(){return this._checkBar}}),_dp(C,"stateBar",{get:function(){return this._stateBar}}),_dp(C,"filterPanel",{get:function(){return this._filterPanel}}),_dp(C,"activeCellLayout",{get:function(){return this._activeCellLayout}}),C.prototype._cellLayoutChanged=function(){this._cellLayoutDirty=!0},_dp(C,"layoutCount",{get:function(){return this._activeCellLayout.visibleCount}}),_dp(C,"visibleLayoutCount",{get:function(){return this._activeCellLayout.visibleCount}}),_dp(C,"columnCount",{get:function(){return this._columns.count}}),_dp(C,"dataSource",{get:function(){return this._items?this._items.dataSource:null},set:function(t){this.dataSource;this._items&&(this._items.dataSource=t),this.dataSource}}),_dp(C,"itemSource",{get:function(){return this._items},set:function(t){this._items&&this._items.removeListener(this),this._items=t,this._items&&(this._items.addListener(this),this.fixedOptions&&this.fixedOptions._dirty&&this.fixedOptions.$_resetItemSource())}}),_dp(C,"maxItemCount",{get:function(){return this.itemSource.maxItemCount},set:function(t){this.itemSource.maxItemCount=Math.max(0,t)}}),_dp(C,"itemCount",{get:function(){return this._items?this._items.itemCount:0}}),_dp(C,"rowCount",{get:function(){return this._items?this._items.rowCount:0}}),_dp(C,"visibleRowCount",{get:function(){return this._items?this._items.rowCount:0}}),_dp(C,"dataCount",{get:function(){var t=this.dataSource;return t?t.rowCount:0}}),_dp(C,"columnSummaryRuntime",{get:function(){return this._columnSummaryRuntime}}),_dp(C,"columnValidationRuntime",{get:function(){return this._columnValidationRuntime}}),_dp(C,"rowValidationRuntime",{get:function(){return this._rowValidationRuntime}}),_dp(C,"focusedIndex",{get:function(){return this._focusedIndex}}),_dp(C,"focusedLayout",{get:function(){return this._focusedIndex&&this._focusedIndex.layout}}),_dp(C,"focusedColumn",{get:function(){return this._focusedIndex&&this._focusedIndex.layout&&this._focusedIndex.layout.firstColumn}}),_dp(C,"focusedRow",{get:function(){return this._focusedIndex?this._focusedIndex.itemIndex:-1}}),_dp(C,"focusedItem",{get:function(){return this._focusedIndex&&this._focusedIndex.item}}),_dp(C,"rowBarContainer",{get:function(){return this._rowBarContainer}}),_dp(C,"topContentPane",{get:function(){return this._topContentPane}}),_dp(C,"sideContentPane",{get:function(){return this._sideContentPane}}),_dp(C,"leftContentPane",{get:function(){return this._leftContentPane}}),_dp(C,"contentPane",{get:function(){return this._contentPane}}),_dp(C,"fixedContentPane",{get:function(){return this._fixedContentPane}}),_dp(C,"rightContentPane",{get:function(){return this._rightContentPane}}),_dp(C,"bodyView",{get:function(){return this._bodyView}}),_dp(C,"fixedBodyView",{get:function(){return this._fixedBodyView}}),_dp(C,"rightBodyView",{get:function(){return this._rightBodyView}}),_dp(C,"headerView",{get:function(){return this._headerView}}),_dp(C,"fixedHeaderView",{get:function(){return this._fixedHeaderView}}),_dp(C,"rightHeaderView",{get:function(){return this._rightHeaderView}}),_dp(C,"headerSummaryView",{get:function(){return this._headerSummaryView}}),_dp(C,"fixedHeaderSummaryView",{get:function(){return this._fixedHeaderSummaryView}}),_dp(C,"rightHeaderSummaryView",{get:function(){return this._rightHeaderSummaryView}}),_dp(C,"footerView",{get:function(){return this._footerView}}),_dp(C,"fixedFooterView",{get:function(){return this._fixedFooterView}}),_dp(C,"rightFooterView",{get:function(){return this._rightFooterView}}),_dp(C,"filterPanelView",{get:function(){return this._filterPanelView}}),_dp(C,"fixedFilterView",{get:function(){return this._fixedFilterView}}),_dp(C,"rightFilterView",{get:function(){return this._rightFilterView}}),_dp(C,"headView",{get:function(){return this._headView}}),_dp(C,"sumView",{get:function(){return this._sumView}}),_dp(C,"footView",{get:function(){return this._footView}}),_dp(C,"filterView",{get:function(){return this._filterView}}),_dp(C,"fixedOptions",{get:function(){return this._fixedOptions}}),_dp(C,"displayOptions",{get:function(){return this._displayOptions}}),_dp(C,"formatOptions",{get:function(){return this._formatOptions}}),_dp(C,"editOptions",{get:function(){return this._editOptions}}),_dp(C,"editorOptions",{get:function(){return this._editorOptions}}),_dp(C,"copyOptions",{get:function(){return this._copyOptions}}),_dp(C,"pasteOptions",{get:function(){return this._pasteOptions}}),_dp(C,"dataDropOptions",{get:function(){return this._dataDropOptions}}),_dp(C,"sortingOptions",{get:function(){return this._sortingOptions}}),_dp(C,"filteringOptions",{get:function(){return this._filteringOptions}}),_dp(C,"mobileOptions",{get:function(){return this._mobileOptions}}),_dp(C,"WaiOptions",{get:function(){return this._waiOptions}}),_dp(C,"accessibility",{get:function(){return this._accessibility}}),_dp(C,"delegate",{get:function(){return this._delegate}}),_dp(C,"heightMeasurer",{get:function(){return this.container.heightMeasurer}}),_dp(C,"layoutManager",{get:function(){return this._layoutManager}}),_dp(C,"selections",{get:function(){return this._selections}}),_dp(C,"selectionLayer",{get:function(){return this._selectionLayer}}),_dp(C,"editController",{get:function(){return this._editController}}),_dp(C,"validations",{get:function(){return this._validations},set:function(t){this._validations.assignFrom(t)}}),_dp(C,"validationManager",{get:function(){return this._validationManager}}),_dp(C,"popupMenuManager",{get:function(){return this._popupMenuManager}}),_dp(C,"tooltipManager",{get:function(){return this._tooltipManager}}),_dp(C,"toastManager",{get:function(){return this._toastManager}}),_dp(C,"topIndex",{get:function(){return this._topIndex},set:function(t){if((t=Math.max(0,Math.min(t,this.itemCount-this.layoutManager.fixedItemCount-1,this._vscrollBar?this._vscrollBar.maxPosition:0)))!=this._topIndex){var i=this.topIndexChanging(this._topIndex,t-this._topIndex,!1,!1);null==i||isNaN(i)||(t=this._topIndex+i,t=Math.min(this.itemCount-1,Math.max(0,t))),this._topIndex!==t&&(this._needRefresh=!0),this._topIndex=t,this.refreshView(),e.Utils.isMobile()&&this.isEditing()&&!this.isItemEditing()?this.closePopups(!1):this.closePopups()}}}),_dp(C,"topItem",{get:function(){return this._topIndex+this.layoutManager.fixedItemCount}}),_dp(C,"leftPos",{get:function(){return this._leftPos},set:function(t){(t=Math.max(0,Math.min(t,this._hscrollBar?this._hscrollBar._maxPosition:0)))!=this._leftPos&&(this._leftPos=t,this._horzScrolled=!0,this._displayOptions.refreshMode==y.RefreshMode.VISIBLE_ONLY||this.isRecycleMode()&&this._needRefresh?this.refreshView():this.invalidate(),this.closePopups()),!this.isRecycleMode()&&this._debugging&&this._debugView.layout()}}),_dp(C,"leftCell",{get:function(){return this._layoutManager.getCellIndex(this.leftPos)},set:function(t){this.leftPos=this._layoutManager.getCellPoint(t)}}),_dp(C,"leftLayout",{get:function(){return this._layoutManager.firstLayout},set:function(t){var e=this._layoutManager;t=Math.max(e.fixedLayoutCount,Math.min(t,e.layoutCount-1)),this.leftPos=e.getLayoutBounds(t).x}}),_dp(C,"lookupProvider",{get:function(){return this._lookupProvider}}),_dp(C,"hoveredCell",{get:function(){return this._hoveredCell}}),_dp(C,"empty",{get:function(){return 0==this.itemCount||0==this.visibleLayoutCount}}),_dp(C,"sorted",{get:function(){return this.itemSource.sorted}}),_dp(C,"spanned",{get:function(){return this._bodyView.visible&&this._bodyView.spanned||this._fixedBodyView.visible&&this._fixedBodyView.spanned||this._rightBodyView.visible&&this._rightBodyView.spanned}}),_dp(C,"isSwiping",{get:function(){var t=this.activeTool,e=t.dragTracker;return e instanceof Ft.TouchDragTracker&&e.dragging||t._touchMoving||this._keepLeftPos}}),_dp(C,"cellGhostStyle",{get:function(){return this._cellGhostStyle=this._cellGhostStyle||{}}}),C.prototype.addFeedbackElement=function(t){if(t&&!this._feedbackLayer.contains(t))return this._feedbackLayer.addChild(t),!0},C.prototype.removeFeedbackElement=function(t){var e=this._feedbackLayer.indexOf(t);return e>=0&&(this._feedbackLayer.removeChildAt(e),!0)},C.prototype.setEventFrom=function(t){this._eventFrom=t},C.prototype.getVisibleLayout=function(t){return this._activeCellLayout.getVisible(t)},C.prototype.getColumn=function(t){return this._columns.getColumn(t)},C.prototype.setColumns=function(t){var e=!1;this._columns.setColumns(t),this._columnMap={};for(var i=this._columns.count-1;i>=0;i--){var n=this._columns.getColumn(i);this._columnMap[n.$_hash]=n,n instanceof o.DataColumn&&n.getActiveFilters(!0).length>0&&(e=!0)}this._columnsReset(),e&&this.dataSource&&this.applyFilters()},C.prototype.setCellLayout=function(t){this._beforeChangeLayout();var e,i=this.isValid(this.focusedIndex)&&this.focusedIndex.column,o=this.activeCellLayout;try{t?(e=new a.GridCellLayout(this).load(t)).addListener(this):e=this._defaultCellLayout,e.isDefault()&&this.setColumns(this._columns.columns),e.resetColumns(this._columns)}catch(t){throw e&&!e.isDefault()&&e.dispose(),o&&o.resetColumns(this._columns),t}o&&!o.isDefault()&&o.dispose(),this._activeCellLayout=e,this._cellLayoutDirty=!0,this.invalidateLayout(),e.$_refresh(this._columns,this.displayOptions.minCellWidth),e.invalidate(),i&&(this.focusedIndex.layout=e.layoutByColumn(i)||e.layoutByColumn(e.firstColumn),this.$_makeFocusedIndexVisible()),this.clearAddSelection(!0,!!i,!1),this.clearRowHeights(),this._populateMerges(),this.refreshView()},C.prototype._checkEditing=function(){if(this.itemSource instanceof H.EditableItemProvider&&this.itemSource.isEditing())throw new Error("Item is editing")},C.prototype.addColumn=function(t,e){this._checkEditing();var i=this._columns.add(t,e);return i&&(this._columnMap[i.$_hash]=i,this._columnsReset(),i instanceof o.DataColumn&&i.getActiveFilters(!0).length>0&&this.dataSource&&this.applyFilters()),i},C.prototype.removeColumn=function(t){return"string"==typeof t&&(t=this.columnByName(t)),!!t&&(this._checkEditing(),!!this._columns.remove(t)&&(delete this._columnMap[t.$_hash],this._columnsReset(),t instanceof o.DataColumn&&t.getActiveFilters(!0).length>0&&this.dataSource&&this.applyFilters(),!0))},C.prototype.addLayout=function(t,e){return this.activeCellLayout.addLayout(t,e)},C.prototype.removeLayout=function(t){var e=this.focusedIndex,i=this.isValid(e);t=this.activeCellLayout.removeLayout(t),i&&t===e.layout&&(e.layout=this._activeCellLayout.first,e.normalize(this),!this._cellLayoutDirty&&this.clearAddSelection(!0))},C.prototype.restoreColumns=function(t){this._columns.restoreColumns(),this._columnsReset()},C.prototype.linearizeColumns=function(t){var i=this._activeCellLayout.collectColumns(!0,!0,!0);if(t=e.Utils.makeArray(t),i&&i.length>0){if(t&&t.length>0)for(var o=function(e){i.sort((function(i,o){var n=i[t[e]],r=o[t[e]];return nr?-1:0}))},n=0;n0){for(var t=0,e=0,i=this.itemCount;e=0?t:0,this.getFirstColumn())}return null},C.prototype.$_setEditFocused=function(t,i){if(t!=this.$_editFocused){if(this.$_editFocused=t,t&&this.$_showFocusCell){var o=this.focusedIndex;!o||this.isValid(o)}this.$_showFocusCell=!1}t&&i&&"focusin"==i.type&&e.Utils.isAncestorOf(this._container._container,i.target,i)&&T.VisualContainer.setActiveGrid(this.container.$_hash)},C.prototype.getItem=function(t){return this._items.getItem(t)},C.prototype.getItemIndexOfRow=function(t){return this._items.getIndexOfRow(t,!1)},C.prototype.getItemOfRow=function(t,e){return this._items.getItemOfRow(t,e)},C.prototype.getItemIndicesOfRows=function(t){return this._items.getIndicesOfRows(t,!1)},C.prototype.getRowOfItem=function(t){var e=this.getItem(t);return e?e.dataRow:-1},C.prototype.getItemOfModel=function(t){return null},C.prototype.getRowsOfItems=function(t,e){void 0===e&&(e=!1);for(var i=[],o=0,n=t;o=0)&&i.push(a)}return i},C.prototype.getIndicatorIndex=function(t,e){return e?this.itemCount-t.index-1:t.index},C.prototype.indicatorReverse=function(t){return t===c.IndicatorValue.REVERSE},C.prototype.getAllItems=function(){return this._items.getAllItems()},C.prototype.getImage=function(t){return null},C.prototype.getIndex=function(t,e){return void 0===t&&(t=-1),void 0===e&&(e=null),new l.CellIndex(this,t,e)},C.prototype.getDataCellIndex=function(t,e){var i=t.parentElement,o=this._tableViews[i.$_view],n=i.$_row,r=o.layoutByCell(t);return null!=e?e.set(n,r):l.CellIndex.temp(this,n,r)},_dp(C,"handler",{get:function(){return this.$_handler}}),C.prototype.getDataColumns=function(t){return void 0===t&&(t=!0),this._activeCellLayout.getDataColumns(t)},C.prototype.optionsChanged=function(t){this._columnsDirty=!0,this.refreshView()},C.prototype.sortOptionsChanged=function(){this.itemSource&&this.itemSource.setSortingOptions(this._sortingOptions)},C.prototype.scrollRow=function(t){var e=this.topIndex;this.topIndex=e+t},C.prototype.showFilterSelector=function(t,e){if(t&&t.hasFilters){var i=this.getHeaderCellAt(t.layout);return this.selectColumnFilters(i,e)}},C.prototype.selectColumnFilters=function(t,e){if(this.isItemEditing(null)){if(!this.filteringOptions.commitBeforeFiltering)return;try{if(!this.commit(!1))return}catch(t){var i=this.focusedItem;if(i&&t instanceof q.ValidationError)return void((t=this._fireValidationFail(i.index,t.column,t))&&alert(this.editOptions.showOnlyValidationMessage&&t.userMessage?t.userMessage:t.toString()));throw t}}var o=t.layout.boundColumn;if(this._fireFiltering(o))return this.hideEditor(!0),this._filterSelector.show(o,t.cell,this.dataSource,e),!0},C.prototype.closeFilterSelector=function(){this._filterSelector.hide()},C.prototype.closePopups=function(t){void 0===t&&(t=!0),this._filterRunning||this._filterSelector.hide(),this._popupMenuManager.close(),this._tooltipManager.close(),this._tooltipManager.closeMessage(),t&&this._editController.closeList(!1)},C.prototype.layoutByDataCell=function(t){var e=t.parentElement;return this._tableViews[e.$_view].layoutByCell(t)},C.prototype.columnByHash=function(t){return this._columnMap[t]},C.prototype.columnByDataCell=function(t){return this._bodyView.columnByCell(t)||this._fixedBodyView.columnByCell(t)||this._rightBodyView.columnByCell(t)},C.prototype.columnByName=function(t){return this._columns.columnByName(t)},C.prototype.columnByField=function(t){return"string"==typeof t&&(t=this.dataSource.getFieldIndex(t)),this._columns.columnByField(t)},C.prototype.columnsByField=function(t){return"string"==typeof t&&(t=this.dataSource.getFieldIndex(t)),this._columns.columnsByField(t)},C.prototype.columnByTag=function(t){return this._columns.columnByTag(t)},C.prototype.columnsByTag=function(t){return this._columns.columnsByTag(t)},C.prototype.getHorzColumns=function(t,e){return this._activeCellLayout.getHorzColumns(t,e)},C.prototype.getGroupLevel=function(t){return-1},C.prototype.isGroupedColumn=function(t){return!1},C.prototype.blankGroupData=function(){return!1},C.prototype.layoutByColumn=function(t){return t instanceof o.GridColumn||(t=this.columnByName(t)),t?this._activeCellLayout.layoutByColumn(t):null},C.prototype.layoutByName=function(t){return this._activeCellLayout.layoutByName(t)},C.prototype.setFocus=function(t,i){var o=this;void 0===i&&(i=!1);var n=function(t){o.$_showFocusCell=!0;var n=o.focusedIndex.clone();if(!i&&"keydown_tab"!==o._eventFrom||!n||o.isValid(n)||(n.set(Math.max(0===o.topIndex?0:o.topItem,0),o.getFirstColumn(),o),o.activeTool.setFocused(n,!0,!0)),o._accessibility&&!o.isEditing())if(o.isValid(n))if(o.layoutManager.cellIsVisible(n)&&!o._resetTdFocus){var r=o.getBodyCellAt(n,!0);if(r&&t!==r.cell)o.getBodyViewAt(n).refreshTdFocused(n,!1)}else o._resetTdFocus=!0;else 0===o.itemCount&&o._emptyView.visible?(o.container._containerDom.setAttribute("tabindex","-1"),o._emptyView.setFocus()):o.container.setFocus();else e.Utils.isMobile()?o.container.setFocus():o._editController.setFocus(!0,t);T.VisualContainer.getActiveGrid()!==o&&T.VisualContainer.setActiveGrid(o.container.$_hash)};this.activeCellLayout.visibleCount>0?n.call(this,t):(this._setFocusTimer&&clearTimeout(this._setFocusTimer),this._setFocusTimer=setTimeout(function(){this._setFocusTimer=null,n.call(this,t)}.bind(this),10))},C.prototype.getFirstLayout=function(){return this._activeCellLayout.first},C.prototype.getFirstColumn=function(){return this._activeCellLayout.firstColumn},C.prototype.collectColumns=function(t,e,i){return this._activeCellLayout.collectColumns(t,e,i)},C.prototype.collectColumnNames=function(t,e){return this._activeCellLayout.collectColumnNames(t,e)},C.prototype.collectGroupNames=function(){return this._activeCellLayout.collectColumnNames(!1,!1,!0)},C.prototype.getChildColumnNames=function(t){return this._activeCellLayout.collectColumnNames(!1,!1,!1,t)},C.prototype.collectDataColumns=function(t,e){return this._activeCellLayout.collectDataColumns(t,e)},C.prototype.isValid=function(t,e){void 0===e&&(e=!1);var i=t&&t.grid===this&&t.itemIndex>=0&&t.itemIndex=0),i},C.prototype.getSelection=function(t){return void 0===t&&(t=0),t>=0&&t0&&this.visibleLayoutCount>0&&this._selections.add(o,o,this._displayOptions.selectionStyle,i)},C.prototype.deleteSelection=function(t){void 0===t&&(t=!1),this.$_deleteSelection(null,t)},C.prototype.$_deleteSelection=function(t,i){function o(t,e){try{if(e&&e.length>0){for(var i=[],o=0,n=e.length;o=0&&i.push(r.dataRow)}if(i.length>0&&!t._fireRowsDeleting(i))return!1}}catch(t){return alert(t),!1}return!0}function r(t,e){var r=t.recursiveDeleting();return!!e&&((i||!t.editOptions.confirmWhenDelete||confirm(t.editOptions.deleteRowsMessage)&&o(t,[e.index]))&&(t.cancel(),(0,n.ItemState_isInserting)(e.itemState)||t.itemSource.remove(e,r)),!0)}function s(t,e){for(var i=null,o=e.length;o--;){var r=t.getItem(e[o]),s=r.itemState;if((0,n.ItemState_isEditing)(s)){i=r,(0,n.ItemState_isInserting)(s)&&e.splice(o,1);break}}var a=null;e.length>0&&(a=t.itemSource.getRemovableRows(e)),i&&t.cancel(),a&&t.itemSource.removeRows(a,t.recursiveDeleting())}void 0===i&&(i=!1);var a=this.editOptions,l=this.selections,h=this.itemSource;if((i||a.deletable)&&h instanceof H.EditableItemProvider)if(!this.isItemEditing(null)||a.deletableWhenEdit){if(this.commitEditor(!0),r(this,t))return!0;if(!function(t,e){if(0==e.count||1==e.count&&e.getItem(0).single){var i,o=-1;return(o=0==e.count?t.focusedIndex.itemIndex:e.getItem(0).getBounds().r1)>=0&&t.canDelete(i=t.getItem(o))&&r(t,i),!0}return!1}(this,l)){for(var u=l.count,d=[],c=0;c=0||y.editable)&&d.push(m)}}d.sort((function(t,e){return t-e}));var v=-1;for(c=d.length;c--;)d[c]==v?d.splice(c,1):v=d[c];d.length>0&&this.canDelete(this.getItem(d[0]))&&(i||!a.confirmWhenDelete?o(this,d)&&(s(this,d),this.clearAddSelection(!0)):confirm(a.deleteRowsMessage)&&o(this,d)&&(s(this,d),this.clearAddSelection(!0)))}}else alert(a.commitEditingMessage)},C.prototype.revertSelection=function(t){void 0===t&&(t=!1);var i=this.editOptions,o=this.selections,n=this.itemSource;if((t||i.revertable)&&n instanceof H.EditableItemProvider&&(this.commitEditor(!0),!function(t,e){if(0==e.count||1==e.count&&e.getItem(0).single){var i=-1;if((i=0==e.count?t.focusedIndex.itemIndex:e.getItem(0).getBounds().r1)>=0)return t.itemSource.revert(i),!0}return!1}(this,o))){for(var r=o.count,s=[],a=0;a=0||p.editable)&&s.push(c)}}s.sort((function(t,e){return t-e}));var _=-1;for(a=s.length;a--;)s[a]==_?s.splice(a,1):_=s[a];s.length>0&&n.revertAll(s)}},C.prototype.eraseSelection=function(t,i){var o=this.editOptions,n=this.copyOptions;var r=this.selections,s=this.itemSource;if(o.readOnly||!t&&!o.erasable||!o.updatable)return!1;if(!(s instanceof H.EditableItemProvider))return!1;if(this.isEditing())return!1;if(function(t,e){if(0==e.count||1==e.count&&e.getItem(0).single){var o=t.focusedIndex;return(t.getWritableAt(o,!1)||i&&n.cutReadOnlyCell)&&t.setCellValue(o,void 0),!0}return!1}(this,r))return!0;var a=r.count;if(a<1)return!1;if(this.isItemEditing()){var l=r.getItem(0)._getRows(),h=this.getEditItem();return l.fields.map((function(t){h.setData(t,void 0)})),!0}for(var u=[],d=0;d0){for(d=0;d=this.itemCount&&((e=this.focusedIndex.clone()).itemIndex=Math.max(-1,this.itemCount-1));var i=t;this.$_doSetFocusedIndex(e,!0,!1,!1,i)}finally{this._focusing=!1}}},C.prototype.getTableCell=function(t){if(!t)return null;for(var i=t,o=(0,e.getWin)(i);i&&!(i instanceof o.HTMLTableCellElement);)i=i.parentElement;if(i instanceof o.HTMLTableCellElement&&i.parentElement){var n=i.parentElement[y.T_VIEW];if(n)return i;for(i=i.parentElement;i;){if(i instanceof o.HTMLTableCellElement&&(n=i.parentElement[y.T_VIEW]))return i;i=i.parentElement}}return null},C.prototype.getTableView=function(t){return this._tableViews[t.parentElement[y.T_VIEW]]},C.prototype.getBodyViewAt=function(t){return this._layoutManager.getBodyView(t)},C.prototype.getBodyView=function(t){return this.getTableView(t)},C.prototype.getRowView=function(t,e){return t.getRowView(e)},C.prototype.getHeaderView=function(t){return this.getTableView(t)},C.prototype.getFooterView=function(t){return this.getTableView(t)},C.prototype.getSummaryView=function(t){return this.getTableView(t)},C.prototype.getFilterView=function(t){return this.getTableView(t)},C.prototype.getCellType=function(t){if(t){var e=t.parentElement;if(-99===e[y.T_ROW])return y.GridCellType.FIXED_BAR;var i=this._tableViews[e[y.T_VIEW]];if(!(i instanceof x.GridBodyElement))return i instanceof xt.RowBarContainer?i.getCellType(t):i instanceof w.HeaderElement?y.GridCellType.HEADER:i instanceof R.FooterElement?y.GridCellType.FOOTER:i instanceof tt.HeaderSummaryElement?y.GridCellType.SUMMARY:i instanceof kt.FilterPanelElement?y.GridCellType.INLINE_FILTER:i instanceof M.GridHeadElement?y.GridCellType.HEAD:i instanceof O.GridFootElement?y.GridCellType.FOOT:i instanceof it.GridSumElement?y.GridCellType.SUM:i instanceof Mt.GridFilterElement?y.GridCellType.FILTER:this._getCellTypeOf(i);var o=i.bodyCellByCell(t);if(o)return!(o.item instanceof n.GroupFooter)||o.dataColumn&&o.dataColumn.mergeGrouped?y.GridCellType.DATA:y.GridCellType.GROUP_FOOTER}},C.prototype._getCellTypeOf=function(t){},C.prototype.getBodyCellAt=function(t,e){var i=this._layoutManager,o=this._bodyView.visible&&this._bodyView.getCellAt(i,t)||this._fixedBodyView.visible&&this._fixedBodyView.getCellAt(i,t)||this._rightBodyView.visible&&this._rightBodyView.getCellAt(i,t);return o&&e&&o.merged&&o.head?o.head:o},C.prototype.getHeaderCellAt=function(t){return this._headerView.visible&&this._headerView.tableCellByLayout(t)||this._fixedHeaderView.visible&&this._fixedHeaderView.tableCellByLayout(t)||this._rightHeaderView.visible&&this._rightHeaderView.tableCellByLayout(t)},C.prototype.getSummaryCellsAt=function(t,e){for(var i=0;io.nonFixedBounds.width&&(a.width=o.nonFixedBounds.width),a}return e.Utils.$_INVISIBLE_EDIT_BOUNDS.clone()},C.prototype.getEditBounds=function(t,i){var o=i.item;if(!o)return null;var n=this.layoutManager,r=n.fixedItemCount;if(r>0&&o.index>=r&&o.index-r0&&e.index>=o&&e.index-o1,p=n.length>1,_=!0;if(n.length>1&&n.forEach((function(t){_=_&&(t instanceof N.RowSelection||t instanceof N.ColumnSelection),c=c&&t instanceof N.RowSelection,p=p&&t instanceof N.ColumnSelection})),!_)return alert(this.copyOptions.multiSelectionCopyFailText),null;u=c?this.getSelectedItemIndices(!1):null,d=p?this.getSelectedLayouts():null}i=i||(Array.isArray(n)?n[0].getBounds():n.getBounds()),r=s?this._clipboardManager.copyCellToClipboard(a):this._clipboardManager.copyToClipboard(i,u,d)}else r=null;else r=this._clipboardManager.copyEmtpyToClipboard();return null!=r&&h&&(t&&"cut"===t.type&&this.eraseSelection(!0,!0),t.clipboardData?t.clipboardData.setData("text/plain",r):window.clipboardData.setData("Text",r)),r}},C.prototype.toClipboard=function(t,i){void 0===i&&(i=!0);var n=function(t){var e;return"string"==typeof t?e=this.columnByName(t):t instanceof o.GridColumn&&(e=t),e&&e.layout}.bind(this);if(!this.empty){var r;if(!(t&&t instanceof l.CellRange)){var s=void 0,a=void 0;if(t?(s=n(t.startColumn),a=n(t.endColumn)):(s=this._activeCellLayout.first,a=this._activeCellLayout.last),!s||!a)return;var h=null==(t=t||{}).startItem?0:Math.max(0,t.startItem),u=null==t.endItem?this.itemCount-1:Math.min(t.endItem,this.itemCount-1);r=l.CellRange.createRange(h,s,u,a)}var d=this.copyToClipboard(null,r,!0);if(d=null==d?"":d,!i)return d;if(e.Utils.isIE&&window.clipboardData)window.clipboardData.setData("text",d);else{var c=this.doc,p=c.createElement("textarea"),_=p.style;_.position="absolute",_.top="-10000px",c.body.appendChild(p),p.value=d,p.select(),c.execCommand("copy"),setTimeout((function(){c.body.removeChild(p)}),100)}}},C.prototype.fromClipboard=function(t){var e=this.pasteOptions;try{var i=void 0,o=(t.originalEvent||t).clipboardData;null!=(i=o?o.getData("text/plain"):window.clipboardData.getData("text"))&&(t.preventDefault(),this.pasteFromClipboard(i,t))}catch(t){if(t instanceof q.ValidationError){if(e.throwValidationError)throw t}else if(t instanceof q.AbortError)alert(t.message);else if(t)throw t}},C.prototype.showToast=function(t,e){this._toastManager.show(t,e,null)},C.prototype.hideToast=function(t){this._toastManager.close(!1),t&&setTimeout(t,0)},C.prototype.showMessage=function(t,e,i){this._tooltipManager.showMessage(t,e,i)},C.prototype.showPopup=function(t,e,i){var o,n,r;if(this._popupMenuManager.close(),"number"==typeof t){var s=new b.Rectangle(t,e,0,0);s=this.boundsByScreen(s),o=this.container.doc.elementFromPoint(s.x,s.y),n=t,r=e}else if("object"==typeof t){var a=new l.CellIndex(this);if(a.assignFrom(t),!this.isValid(a)||!this.layoutManager.cellIsVisible(a))return!1;o=this.getBodyCellAt(a).cell;var h=this.layoutManager,u=h.getBodyView(a),d=u.getCellRectAt(h,a,!1);n=(d=u.boundsByContainer(d)).x+Math.floor(d.width/2),r=d.y+Math.floor(d.height/2),i=e}return this.doContextMenu({mouseX:n,mouseY:r},o,i,!1)},C.prototype.isEditing=function(t){return this._editController.editing&&(!t||l.CellIndex.areEquals(t,this._editController.editIndex))},C.prototype.getEditItem=function(){return this.itemSource instanceof H.EditableItemProvider&&this.itemSource.editingItem},C.prototype.isItemEditing=function(t){return(t=t||this.focusedIndex.item)&&this.itemSource instanceof H.EditableItemProvider&&this.itemSource.isEditing(t)},C.prototype.isItemEdited=function(t){return(t=t||this.focusedIndex.item)&&this.itemSource instanceof H.EditableItemProvider&&this.itemSource.isEdited(t)},C.prototype.getEditValue=function(t,e,i){return this._doGetEditValue(e,i)},C.prototype._doGetEditValue=function(t,e){return this._fireGetEditValue(t,e)},C.prototype.isCellEditing=function(){return!!this._editOptions.commitByCell&&this._items.isUpdating},C.prototype.editorCommit=function(t,e,i){return this._doCellCommit(t,e,i)},C.prototype.scrollOnEditing=function(){if(this.isEditing())switch(this.editOptions.scrollOnEditing){case y.ScrollOnEditing.CANCEL:this.cancelEditor(!0);break;case y.ScrollOnEditing.COMMIT:this.commitEditor(!0);case y.ScrollOnEditing.DEFAULT:}},C.prototype._doCellCommit=function(t,e,i){return this._fireEditCommit(t,e,i)},C.prototype.editorActivated=function(t){this._doEditorActivated(t.editIndex,!0,t)},C.prototype._doEditorActivated=function(t,e,i){var o=this.getBodyCellAt(t,!1),n=o&&this.getBodyView(o.cell);this.accessibility&&!e&&this.setFocus(),n&&n.$_buttonZIndexChanged(this,o,e,i)},C.prototype.setCellUpdateEventLock=function(t){this._cellUpdateEventLock=t},C.prototype.$_validateCellValue=function(t,e){try{var i=(0,n.ItemState_isInserting)(t.item.itemState);return this._validationManager.validateCell(t,i,!1),!0}catch(e){if(!(e instanceof q.ValidationError))throw e;this._validationManager.addInvalidateCell(t,e)}return!1},C.prototype.$_refreshInvalidList=function(t){this.itemCount<=0||t?this.validationManager.clearInvalidateList():this.validationManager.checkRowIds()},C.prototype.validateCellCommit=function(t,e){this.editOptions.validateOnEdited&&this.$_validateCellValue(t,e)},C.prototype.validateCells=function(t,e,i,o){return this._validationManager.validateCells(t,e,i,o)},C.prototype.getInvalidCells=function(t){return this._validationManager.getInvalidCells(t)},C.prototype.clearInvalidCells=function(t,e){if(t){if(null!=e){var i=this.columnByField(e),o=l.DummyCellIndex.tempItem(this,t,i);return this._validationManager.clearInvalidCell(o)}return this._validationManager.clearInvalidCells(t.dataId)}this._validationManager.clearInvalidCells()},C.prototype.addInvalidCell=function(t,e,i,o){var n=this.columnByField(e),r=l.DummyCellIndex.tempItem(this,t,n);return this._validationManager.addInvalidateCell(r,{level:i,message:o})},C.prototype.getEditableAt=function(t,e){var i=t.dataColumn;if(!i)return!1;if(e&&null!=e.editable)return e.editable;if(t.item.isDataRow){var o=t.item;if(null!=o.editable)return o.editable}var n=this.editOptions;if(n.columnEditableFirst){if(!(null!=i.editable?i.editable:n.editable))return!1}else{if(!n.editable)return!1;if(!1===i.editable)return!1}var r=this.fixedOptions;return!(t.colFixed&&!r.editable)&&!(t.rowFixed&&!r.rowEditable)},C.prototype.getReadOnlyAt=function(t,e){var i=t.dataColumn;if(!i)return!0;var o=this._items.getItem(t.itemIndex);return!o||(e&&null!=e.readOnly?e.readOnly:(o=o.merged&&o instanceof n.GroupItem?o.firstDataItem:o,!this.editOptions.updatable&&!(0,n.ItemState_isInsertItem)(o.itemState,o.rowState)||(!this._items.canUpdate(o,i.dataIndex)||(!!this._editOptions.readOnly||!!i.readOnly))))},C.prototype.getWritableAt=function(t,e){if(!this.isValid(t))return!1;var i=this.getBodyViewAt(t);if(i){var o=i.getCellAt(this._layoutManager,t);if(o&&!e){var r=o.merged&&o.head||o;return t.item.isDataRow&&(null==o.editable||o.editable||r.renderer2&&r.renderer2.canEdit())&&!o.readonly}var s=t.dataColumn;if(!s)return!1;var a=this.body.getCell(t),l=a&&s.getCellStyle(a),h=s.readOnly,u=s.isWritable(),d=!1;if(l&&"string"!=typeof l&&(h=null!==l.readOnly?l.readOnly:s.readOnly,l.hasOwnProperty("editable")&&(u=null!==l.editable?l.editable:u)),o&&e&&(d=(r=o.merged&&o.head||o).renderer2&&r.renderer2.canEdit()),!e){var c=this.fixedOptions,p=this.editOptions,_=l&&l.renderer||s.renderer,f=_&&("string"==typeof _?_:_.type),g=f&&this.delegate.createRenderer(f,_,null);g&&(g._index=t.clone(),d=g.canEdit(),g=g.dispose());var m=t.item;u=(u=u&&(!t.colFixed||c.editable))&&(!t.rowFixed||c.rowEditable),u=!!m.isDataRow&&(u&&(p.updatable||(0,n.ItemState_isInsertItem)(m.itemState,m.rowState)))}return u&&!h||d}},C.prototype.getWritable=function(t,e){var i=e.layout,o=l.CellIndex.temp(this,t,i,!0),n=this.getWritableAt(o,!1);return void 0===n?e.isWritable():n},C.prototype.canEditAt=function(t){var e=this.getBodyViewAt(t);if(e){var i=e.getCellAt(this._layoutManager,t);return i&&void 0!==i.editable?i.editable:this.getEditableAt(t,null)}},C.prototype.canWriteAt=function(t){var e=this.getBodyViewAt(t);if(e){var i=e.getCellAt(this._layoutManager,t);return i&&void 0!==i.readonly?!i.readonly:!this.getReadOnlyAt(t,null)}},C.prototype.canUpdate=function(t,e){return this.editOptions.canUpdate(t.rowState===St.RowState.CREATED)&&this.visibleLayoutCount>0&&this.itemSource&&this.itemSource.canUpdate(t,e)},C.prototype.canAppend=function(t){var e=this.itemSource,i=!this.isEditing()&&(t||this.editOptions.canAppend())&&this.visibleLayoutCount>0&&e&&e.canAppend();if(i)try{if(!this._fireRowInserting(e.itemCount,-1))return!1}catch(t){return alert(t.message||t),!1}return i},C.prototype.canInsert=function(t,e,i,o){var n=this.itemSource,r=!this.isEditing()&&this._doCanInsert(t,e,i)&&(this.editOptions.canInsert()||o)&&this.visibleLayoutCount>0&&n&&n.canInsert(t);if(r)try{if(!this._fireRowInserting(t.index+(e?1:0),-1))return!1}catch(t){return alert(t.message||t),!1}return r},C.prototype._doCanInsert=function(t,e,i){return!0},C.prototype.canDelete=function(t){var e=this.itemSource;return this.editOptions.canDelete()&&this.visibleLayoutCount>0&&e&&(this.isItemEditing(t)||e.canDelete(t))},C.prototype.canCommit=function(t){return this.isItemEditing(t)&&(this.isItemEdited()||this.editOptions.commitWhenNoEdit)},C.prototype.canCancel=function(t){return this.isItemEditing(t)},C.prototype.canMergeEditing=function(t){return!this.isTree()&&t&&t.merged&&this.editOptions.commitByCell&&t.dataColumn&&t.dataColumn.mergeEdit},C.prototype.edit=function(t){return t||(t=this.focusedIndex),!!(this.isValid(t)&&this.itemSource instanceof H.EditableItemProvider)&&(!(t.dataColumn&&!this.canUpdate(t.item,t.dataField))&&(!(0,n.ItemState_isEditing)(t.item.itemState)&&this.validationManager.cloneError(t.dataId,-1),this.itemSource.edit(t.item)))},C.prototype.insertAt=function(t,e,i){return this.insert(this.getItem(t),e,!1,!0,i)},C.prototype.insert=function(t,e,i,o,n){if(t||(t=this.focusedIndex?this.focusedIndex.item:null),!t)return-1;var r=this.itemSource;if(r instanceof H.EditableItemProvider&&this.canInsert(t,e,i,o)){var s=this.$_getInsertDefaults(n);return this._cancelDummy(),r.insert(t,s,e,i)}return-1},C.prototype.appendAt=function(t){return this.append(!0,t)},C.prototype.append=function(t,e){var i=this.itemSource;if(i instanceof H.EditableItemProvider&&i.dataSource&&this.canAppend(t)){var o=this.$_getInsertDefaults(e);return this._cancelDummy(),i.append(o)}return-1},C.prototype._appendDummy=function(){var t=this._editOptions;t.displayEmptyEditRow&&t.appendable&&this._items.appendDummy()},C.prototype._cancelDummy=function(){this._items.cancelDummy()},C.prototype.setValueAt=function(t,e,i){var o=this.getItem(t);if(o&&e>=0)if(o instanceof H.EditItem||o instanceof It.TreeEditItem)o.setValue(e,i);else{var n=o.dataRow;n>=0&&this.dataSource.setValue(n,e,i)}},C.prototype.setCellValue=function(t,e){this.isValid(t)&&this.setValueAt(t.itemIndex,t.dataField,e)},C.prototype.recallHeight=function(){this._container.recallHeight()},C.prototype.$_canShowEditor=function(t,e,i){return!!this.isValid(t)&&this._fireShowEditor(this._editorIndex.assign(t),e,i)},C.prototype.$_canShowEditCommand=function(t){if(this.isValid(t))return this._fireShowEditCommand(t)},C.prototype.hideEditor=function(t){void 0===t&&(t=!1),this._editController.closeList(!1),this._editController.hideEditor(),t&&this.activeTool.resetFocused()},C.prototype.requestPrepareEditor=function(){var t=this._editController;t&&t.requestPrepareEditor()},C.prototype.fillEditSearchItems=function(t,e,i,o,n){this._editController.fillSearchItems(t,e,i,o,n)},C.prototype.showEditor=function(t,e,i){if(void 0===e&&(e=!1),void 0===i&&(i=!1),t=t||this.focusedIndex,this._editController.showEditor(t,i))return this.activeTool.resetFocused(),e&&this._editController.caretToLast(),!0},C.prototype.showEditList=function(t){if(this._editController.showList(t))return!0},C.prototype.editorButtonClicked=function(t,e){this._editController.buttonClicked(t,e),this._fireEditButtonClicked(t)},_dp(C,"canUndo",{get:function(){var t=this.dataSource;return t&&t.canUndo&&!this.isItemEditing()}}),C.prototype.undo=function(){return!!this.canUndo&&(this.dataSource.undo(),!0)},_dp(C,"canRedo",{get:function(){var t=this.dataSource;return t&&t.canRedo&&!this.isItemEditing()}}),C.prototype.redo=function(){return!!this.canRedo&&(this.dataSource.redo(),!0)},C.prototype.execute=function(t){},C.prototype.clearCommandStack=function(t){this.dataSource.clearCommandStack()},C.prototype.setLookups=function(t){t&&(this._lookupProvider||(this._lookupProvider=new X.LocalLookupSourceProvider,this._lookupProvider.addListener(this)),this._lookupProvider.load(t))},C.prototype.addLookupSource=function(t){(this._lookupProvider||(this._lookupProvider=new X.LocalLookupSourceProvider)).add(t)},C.prototype.removeLookupSource=function(t){this._lookupProvider&&this._lookupProvider.remove(t)},C.prototype.existsLookupData=function(t,i){if(t&&i){var o=this._lookupProvider&&this._lookupProvider.getSource(t);if(!o)throw new Error("Invalid lookup source id: "+t);return o.exists(e.Utils.makeArray(i))}},C.prototype.getLookupData=function(t,i){var o;if(!t||!(o=this._lookupProvider&&this._lookupProvider.getSource(t)))throw new Error("Invalid lookup source id: "+t);return o.getLookupData(e.Utils.makeArray(i))},C.prototype.fillLookupData=function(t,e){if(t&&e){var i=this._lookupProvider&&this._lookupProvider.getSource(t);if(!i)throw new Error("Invalid lookup source id: "+t);e.rows?i.fillRows(e.rows):i.fill(e.keys,e.values,e.listResult)}},C.prototype.clearLookupData=function(t){if(t){var e=this._lookupProvider&&this._lookupProvider.getSource(t);if(!e)throw new Error("Invalid lookup source id: "+t);e.clear()}},C.prototype.addLookupData=function(t,i,o){if(void 0===o&&(o=null),t&&i){i=e.Utils.makeArray(i);var n=this._lookupProvider&&this._lookupProvider.getSource(t);if(!n)throw new Error("Invalid lookup source id: "+t);o?n.add(i,o):n.addRow(i)}},C.prototype.setOptions=function(t){},C.prototype.doContextMenu=function(t,e,i,o){void 0===o&&(o=!0);var n,r,s,a,h,u,d,c=t.mouseX,p=t.mouseY,_=this.activeTool,f=_._findTableCell(e),g=_.findElementAt(c,p,!1),m=i;if(f){var v=this.getTableView(f),C=this.getCellType(f),w=void 0,x=void 0;switch(C){case y.GridCellType.HEAD:n=U.ClickData.getSub(C,this.headView.getCellType(f)),r=this.headView.getHeadModel(f),m=m||r&&r.popupMenuName;break;case y.GridCellType.FOOT:n=U.ClickData.getSub(C,this.footView.getCellType(f)),r=this.footView.getFootModel(f),m=m||r&&r.popupMenuName;break;case y.GridCellType.INDICATOR:w=this.rowBarContainer.rowOf(f),x=this.getRowOfItem(w),n=U.ClickData.getItem(C,w,x),m=m||this.rowIndicator.popupMenuName;break;case y.GridCellType.STATE:w=this.rowBarContainer.rowOf(f),x=this.getRowOfItem(w),n=U.ClickData.getItem(C,w,x),m=m||this.stateBar.popupMenuName;break;case y.GridCellType.CHECK:w=this.rowBarContainer.rowOf(f),x=this.getRowOfItem(w),n=U.ClickData.getItem(C,w,x),m=m||this.checkBar.popupMenuName;break;case y.GridCellType.HEADER:d=v.layoutByCell(f),n=U.ClickData.getLayout(C,d),u=d.firstColumn,m=m||u.header.popupMenuName;break;case y.GridCellType.DATA:if((a=v.bodyCellByCell(f)).grouped)n=U.ClickData.getItem(y.GridCellType.GROUP_HEADER,a.item.index,null);else{var b=l.CellIndex.temp(this,g instanceof vt.RowElement?g.itemIndex:a.item.index,a.layout);n=U.ClickData.getCell(C,a,b),m=m||a.dataColumn.popupMenuName}break;case y.GridCellType.GROUP_FOOTER:a=v.bodyCellByCell(f),h=g&&g._item&&g._item.$_footerIndex,n=U.ClickData.getGroupFooter(C,a.item.index,a.layout,h);var I=a.dataColumn.groupFooters.get(h);m=m||I&&I.popupMenuName;break;case y.GridCellType.FOOTER:case y.GridCellType.SUMMARY:var E=v.tableCellByCell(f);h=E.summaryIndex;var S=C===y.GridCellType.FOOTER?E.layout.firstColumn.footers.get(h):E.layout.firstColumn.headerSummaries.get(h);n=U.ClickData.getSummary(C,E.summaryIndex,E.layout),m=m||S&&S.popupMenuName;break;case y.GridCellType.GROUP_HEAD:case y.GridCellType.GROUP_FOOT:var R=f[y.T_LEV];n=U.ClickData.getGroupElt(C,R);break;case y.GridCellType.GROUP_BAR:var T=f[y.T_ROW];x=this.getRowOfItem(T),n=U.ClickData.getItem(C,T,x)}}else g&&g===_._clickElement&&(n=_._getClickData(g,t));if(!1!==(s=this._fireContextMenuPopup(c,p,n,m||this._contextMenu,o))){var D=this._popupMenuManager;if("string"==typeof s?m=s:null!=s&&"object"==typeof s||(m=m||this._contextMenu),m){t.preventDefault&&t.preventDefault();var k=D.getMenu(m);k&&D.showContext(k,t,c,p,n)}}return null},C.prototype.setContextMenu=function(t){return t?this.addPopupMenu(this._contextMenu="gridContextMenu",t,!0,this):this._contextMenu=null},C.prototype.addPopupMenu=function(t,i,o,n){if(void 0===o&&(o=!0),i=e.Utils.makeArray(i),t&&i)return this.popupMenuManager.addMenu(t,i,o,n)},C.prototype.removePopupMenu=function(t){this.popupMenuManager.removeMenu(t)},C.prototype.getPopupMenu=function(t){return this.popupMenuManager.getMenu(t)},C.prototype.setCursor=function(t,e){if(t){var i=this.getTableCell(t),o=i?this.getTableView(i):this._tableViews[t[y.T_VIEW]];if(o instanceof J.VisualObjectElement)return void o.setCursor(e)}this._container.setCursor(e)},C.prototype.canMoveLayout=function(t){var e=t.root.vindex,i=this.layoutManager;return!(i.mergedRowGrouped&&e=i.fixedLayoutCount&&e0&&o&&o.length>0&&n){var l=void 0,h=void 0,u=void 0,d=void 0,c=i.length,p=[];for(l=0;l=0?p.push(h):(u=this.dataSource.getFieldIndex(i[l]))>=0&&p.push(u);if(p.length>0){var _=n.itemCount;r=s?Math.min(_-1,r):Math.max(0,r),(a=(s?r>=0:r<_)?n.findItem(p,o,t,r,s?0:_-1):-1)<0&&t.wrap&&(s?r<_-1:r>0)&&(a=n.findItem(p,o,t,s?_-1:0,s?r+1:r-1))}a>=0&&t.select&&(d=this.getIndex(a,e.Utils.pick(this.focusedIndex.column,this.getFirstColumn())),this.setFocusedIndex(d,!0,!0))}return a},C.prototype.searchCell=function(t){var i,n,r,s=this.itemSource,a=s&&s.dataSource,l=s.itemCount,h=t.fields=e.Utils.makeArray(t.fields),u=t.columns=e.Utils.makeArray(t.columns),d=[],c=null;if(a)if(!h&&u)for(i=0,n=u.length;i=0?d.push(r):d.push(a.getFieldIndex(h[i]));t instanceof gt.SearchCellOptions||(t.reverse&&(t.hasOwnProperty("startIndex")||(t.startIndex=l-1),t.hasOwnProperty("startFieldIndex")||(t.startFieldIndex=d.length-1)),t=new gt.SearchCellOptions(t));var _=t.wrap,f=t.select,g=t.value,m=t.reverse;if(a&&d&&d.length>0&&null!=g){if(d.length>0){var y=m?Math.min(l-1,t.startIndex):Math.max(0,t.startIndex),v=Math.max(m?-1:0,t.startFieldIndex),C=m?y>=0:y0||v>0,x=m?0:l-1;!(c=C?s.findCell(d,g,t,y,x,v):null)&&_&&w&&(c=s.findCell(d,g,t,m?l-1:0,y,m?v:0)),c&&(c.fieldName=a.getOrgFieldName(c.fieldIndex))}if(c&&f){var b=void 0;(b=u?this.getIndex(c.itemIndex,e.Utils.pick(this.columnByName(u[c.searchFieldIndex]),this.focusedIndex.column)):this.getIndex(c.itemIndex,e.Utils.pick(this.columnByField(c.fieldIndex),this.focusedIndex.column)))&&this.setFocusedIndex(b,!0,!0)}}return c},C.prototype.isCheckable=function(t){var e=this.getItem(t);return e&&e.checkable},C.prototype.isCheckableOfRow=function(t){var e=this.getItemOfRow(t,!0);return e&&e.checkable},C.prototype.setCheckable=function(t,e){var i=this.getItem(t);i&&i.setCheckable(e)},C.prototype.setCheckableOfRow=function(t,e){var i=this.getItemOfRow(t,!0);i&&i.setCheckable(e)},C.prototype.isIndeterminateItem=function(t){var e=this.getItem(t);return e&&e.indeterminate},C.prototype.isCheckedItem=function(t){var e=this.getItem(t);return e&&e.checked},C.prototype.isIndeterminateRow=function(t){var e=this._items.getItemOfRow(t,!0);return e&&e.indeterminate},C.prototype.isCheckedRow=function(t){var e=this._items.getItemOfRow(t,!0);return e&&e.checked},C.prototype.checkAll=function(t,e,i,o){var n=this._checkBar.showGroup&&!this._checkBar.merged;this._items.checkAll(t,e,i,o,n)},C.prototype.toggleCheck=function(t){var e=this.getItem(t);e&&e.checkable&&this.checkItem(e.index,!e.checked,this.checkBar.exclusive,!0)},C.prototype.toggleChecks=function(t,e){var i=[];if(e&&e.isDataRow&&e.checkable){if(this.checkBar.merged){var o=t[0],n=t[t.length-1],r=o.index,s=n.index,a=this.checkBar.merges,h=a.getRoom(l.CellIndex.temp(this,r,null));r=Math.min(r,h?h.head:r),h=a.getRoom(l.CellIndex.temp(this,s,null)),s=Math.max(s,h?h.tail:s),t=[];for(var u=r;u<=s;u++){var d=this.getItem(u);d.checkable&&d.isDataRow&&t.push(d)}}for(u=0;u=0&&i.push(t[u]);var c=!e.checked;this.checkBar.exclusive&&this.itemSource._clearChecked(),i.length>0&&this._items.checkItems(i,c,!0)}},C.prototype.indeterminateItem=function(t,e){var i=this.getItem(t);i&&this._items.setInditerminateItem(i,e)},C.prototype.checkItem=function(t,e,i,o){var n=this.getItem(t);n&&this._items.checkItem(n,e,i,o)},C.prototype.$_getItemIndexOfRow=function(t){var e,i=this.getItemIndexOfRow(t);return i>-1&&(e=this.getItem(i))&&(e=e instanceof H.EditItem?e:null),e||this.getItemOfRow(t,!0)},C.prototype.indeterminateRow=function(t,e){var i=this.$_getItemIndexOfRow(t);i&&this._items.setInditerminateItem(i,e)},C.prototype.checkRow=function(t,e,i,o){var n=this.$_getItemIndexOfRow(t);n&&this._items.checkItem(n,e,i,o)},C.prototype.checkModel=function(t,e,i,o){t&&this._items.checkItem(t,e,i,o)},C.prototype.indeterminateModel=function(t,e){t&&this._items.setInditerminateItem(t,e)},C.prototype.checkItems=function(t,e,i){var o=this._items.getItemsByIndices(t);this._items.checkItems(o,e,i)},C.prototype.checkRows=function(t,e,i){var o=this._items.getItemsByRows(t,!0);this._items.checkItems(o,e,i)},C.prototype.setAllCheck=function(t,e){var i=this.checkBar.exclusive;if(this._headView.allChecked=t,e&&(!i||!t)){var o=this.checkBar;this.checkAll(t,o.visibleOnly,o.checkableOnly,!1)}},_dp(C,"allChecked",{get:function(){return this._headView.allChecked}}),C.prototype.resetCheckables=function(){},C.prototype.applyCheckables=function(){},C.prototype.registerCustomRenderer=function(t,e){this._delegate.addCustomRenderer(t,e)},C.prototype.unregisterCustomRenderer=function(t){this._delegate.removeCustomRenderer(t)},C.prototype.existsCustomRenderer=function(t){return this._delegate.existsCustomRenderer(t)},C.prototype.unregisterAllCustomRenderer=function(){this._delegate.clearCustomRenderers()},C.prototype.getValueAt=function(t,e){var i=this.getItem(e),n=t.firstColumn;if(n instanceof o.DataColumn)return i&&i.getData(n.dataIndex)},C.prototype.getCellValue=function(t){if(this.isValid(t)){var e=this.getItem(t.itemIndex),i=t.dataColumn;if(e&&i)return e.getData(i.dataIndex)}},C.prototype.getDistinctItemValues=function(t,o,r){void 0===o&&(o=-1),void 0===r&&(r=y.SortDirection.ASCENDING);var s=this.columnByField(t);if(!s)return null;if(0!=o){for(var a=s.getField().dataType,l=[],h=0,u=this._items._rs.getAllItems();h=0){if(r instanceof n.GridRow||r instanceof bt.TreeItem){var s=r.getData(i),a=new o.ColumnStyle,l=this._body.getCellFormatters(e,null,t,a.clear());return ut.DataCell._getDisplayText(this,r,e,s,l)}if(r instanceof n.GroupFooter){var h=e.groupFooters.get(r.$_footerIndex);s=dt.RowGroupFooterCell.getValue(r,e),l=this._rowGroup.getFooterCellFormatters(h,null);return dt.RowGroupFooterCell.$_displayText(r,e,s,l)}}}else{if(e instanceof o.LiteralColumn){a=new o.ColumnStyle;if((r=t.item)instanceof n.GroupFooter){h=e.groupFooters.get(r.$_footerIndex),s=dt.RowGroupFooterCell.getValue(r,e);var u=this._rowGroup.getFooterCellFormatters(h,null);return dt.RowGroupFooterCell.$_displayText(r,e,s,u)}l=this._body.getCellFormatters(e,null,t,a.clear());return ut.LiteralCell.getDisplayText(this,r,e,e.value,l)}if(e instanceof o.SeriesColumn){var d=ut.SeriesCell.getValue(t);if(e.actualTarget&&(d=d.reverse()),d)return d.join(e.valueSeparator)}}return""},C.prototype._fitLayoutWidth=function(t,i,o){var n=this,r=function(t){var i=(0,e.getWin)(t).getComputedStyle(t),o=Number(n.displayOptions.fitLayoutPadding)||0,r=0,s={};if(i){u=i.paddingLeft;var a=parseInt(u.substr(0,u.indexOf("px")));r+=a>0?a:0,u=i.paddingRight,r+=(a=parseInt(u.substr(0,u.indexOf("px"))))>0?a:0,s={fontSize:i.fontSize,fontFamily:i.fontFamily,fontWeight:i.fontWeight,fontStyle:i.fontStyle}}return{w:r+o,font:s}};if(!t.visible)return 0;var s=this.itemSource,a=this.getIndex(this.topIndex,t.firstColumn),l=t.firstColumn.header,h="",u="",d=0,c=0,p=0,_=0,f=this.getHeaderCellAt(t);if(i){var g=f&&f.cell.firstElementChild;if(g){var m=r(g),v=m.w,C=m.font,w=f.marginLeft+f.marginRight+2+f.checkWidth;c=v+this.container.measureText("rg-header-cell",l.displayText,C)+w}else _=e.Utils.getTextLength(h),c=d+this.container.measureText("rg-header-cell",l.displayText,null)+2}if(o){var x=this.getFooterCellsAt(t);x&&x.forEach((function(e,i){var o=e&&e.cell.firstElementChild;if(o){var s=r(o),a=s.w,l=s.font,h=n.footers.getVisible(i).getCell(t).getDisplayText(e);p=Math.max(p,a+n.container.measureText("rg-footer-cell",h||"",l)+2)}}));var b=this.getHeaderSummaryCellsAt(t);b&&b.forEach((function(e,i){var o=e&&e.cell.firstElementChild;if(o){var s=r(o),a=s.w,l=s.font,h=n.headerSummaries.getVisible(i).getCell(t).getDisplayText(e);p=Math.max(p,a+n.container.measureText("rg-header-summary-cell",h||"",l)+2)}}))}var I,E=this.getBodyCellAt(a,!1),S=E&&E.renderer2&&E.renderer2._dom;if(S){var R=r(S),T=R.w;I=R.font,d=T}for(var D=0,k=s.itemCount;D_&&(_=e.Utils.getTextLength(u),h=u);if(_>0){d+=this.container.measureText("rg-data-cell",h,I)+2;var M=t.getDataColumn(),O=M.editor,F=this.delegate.getCellEditor(W.CellEditor.getEditorType(O));F.hasButton(this.displayOptions.showNativeEditButton,O)&&(d+=this.body.editButtonWidth*F.buttonCount),M.button!==y.CellButton.NONE&&(d+=this.body.cellButtonWidth)}return Math.max(d,c,p)},C.prototype.fitLayoutWidth=function(t,i,o,n,r){var s=0;function l(t,i){var o=this.getHeaderCellAt(t);if(n&&o){var r=o.textSpan,s=r.style.whiteSpace;r.style.whiteSpace="nowrap";var a=e.Utils.getSize(r).width;return r.style.whiteSpace=s,a+=o.expander?e.Utils.getSize(o.expander).width:0,Math.max(a+6,i)}return i}return n=null==n||n,r=null==r||r,t instanceof a.CellLayoutColumnItem?s=this._fitLayoutWidth(t,n,r):t instanceof a.CellLayoutGroupItem&&(s=function t(e){for(var i=e.direction===a.ColumnLayoutDirection.HORIZONTAL,o=0,r=0,s=e.visibles;rthis.displayOptions.minCellWidth&&(s=Math.max(s,o)),i&&i>this.displayOptions.minCellWidth&&(s=Math.min(s,i)),t.cellWidth=s},C.prototype.fitHeaderHeight=function(t,e){this.header.setCalcHeights([],!0),this.layoutManager.setFitHeader(t,Math.max(0,e)),this.refreshView()},C.prototype.canMoveRow=function(t,e){return void 0===e&&(e=!0),!this.isEditing()&&!this.isItemEditing()&&(e||this._editOptions.movable)&&(!t||this.itemSource.getMovable(e))},C.prototype.moveRows=function(t,e){if(this.canMoveRows(t,!0,e))return this._doMoveRows(t,e)},C.prototype.moveSelection=function(t,e){var i=this.getSelectedItems(!1);if(i&&i.length>0){var o=i[0],n=o.index,r=this.itemSource;if(t>0&&n+t<=r.itemCount||t<0&&n>0){var s=this._getMoveTarget(e,i,n,t);if(this.moveRows(i,s)){t=this.isTree()?o.index-n:t;var a=this.getSelection();a.moveRow(t),this._selections.clear(!0),this._selections.$_addItem(a,!0);var l=this._focusedIndex.clone();l.itemIndex=this.isTree()?o.index:n+t,this.setFocusedIndex(l,!1,!0,!1)}}}},C.prototype.isSelectedItem=function(t){return this.selections.containsItem(t,null)},C.prototype.isSelectedLayout=function(t){return this.selections.containsLayout(t)},C.prototype.getFilteredColumns=function(){for(var t=this.columnCount,e=[],i=0;i0){var n=i.topIndex,r=n+i.fullItemCount;this._topIndexChanged=n!==this._prevTop,this._prevTop=n,r==this._prevLast||r!=this.itemCount||e.Utils.included(this.displayOptions.syncGridHeight,[y.SyncGridHeight.ALWAYS,y.SyncGridHeight.OVER])||setTimeout(function(){this._fireScrollToBottom()}.bind(this),1),this._prevLast=r}this.$_checkCurrentRow(),this._editController.prepareEditor(this.focusedIndex),this._cellLayoutDirty=!1,this.container.defaultTool.layoutChanged(),!this._editController.resetEditor(!1)&&this.isValid(this._focusedIndex)&&this._editController.resetEditable(this._focusedIndex)},C.prototype.$_doLayout=function(t,e){var i=this._displayOptions,o=this._fixedOptions,n=e.clone(),r=i.vscrollBar?this._scrollBarWidth:0,s=i.hscrollBar?this._scrollBarHeight:0;this.setFocusedClass(this._focusedIndex,!1),this.setFocusedRowClass(this._focusedIndex,!1),this._activeCellLayout.$_refresh(this._columns,i.minCellWidth),this._columnsDirty&&this._activeCellLayout.$_prepareLayout(this,o.colCount,o.rightCount),this._needMerge&&(this.$_populateMerges(),this._needMerge=!1),this._body._prepareUpdate();var a=t.topIndex,l=t.leftPos;if(t.measure(n,this._leftPos,this._topIndex,r,s),a!==t.topIndex){var h=t.topIndex-a,u=[this.fixedBodyView,this.bodyView,this.rightBodyView];this.isRecycleMode()&&!this._dataLoad&&h&&Math.abs(h)0&&n.initialize(A.GridMergeRule.INIT_COUNT);else n.initialize(A.GridMergeRule.INIT_COUNT)}if(this._checkBar.canMerge())(n=this._checkBar.merges||new _.CheckBarMergeManager(this._checkBar)).clear(),n.initialize(A.GridMergeRule.INIT_COUNT)}},C.prototype._addSelectionView=function(t){this._selectionLayer.addView(t)},C.prototype._removeSelectionView=function(t){this._selectionLayer.removeView(t)},C.prototype._layoutSelectionViews=function(){this._layouted&&!this._resetting&&this._selectionLayer.layout()},C.prototype.$_checkCurrentRow=function(){var t=this;if(this.dataSource&&this._focusedIndex){var e=this._focusedIndex.dataId,i=this._focusedIndex.dataRow,o=this.dataSource.getDataRow(this._currentRowId);if(e!=this._currentRowId||this._currentRow!==o){clearTimeout(this._rowChangeTimer);var n=this.container.defaultTool,r=this._currentRow,s=this._displayOptions.rowChangeDelay,a=s<=0;return this._currentRowId=e,this._currentRow=i,a?(this._fireCurrentRowChanged(r,i),n.currentRowChanged(r,i)):s>0&&(this._rowChangeTimer=setTimeout((function(){t._fireCurrentRowChanged(r,i),n.currentRowChanged(r,i)}),s)),!0}}return!1},C.prototype.$_doSetFocusedIndex=function(t,e,i,o,r){if(void 0===o&&(o=!0),void 0===r&&(r=!0),!t){if(o)return!1;t=this.getIndex(-1,null)}var s,a,h,u=this.layoutManager;if(!this.isValid(t)&&o&&(t=t.clone()).normalize(this),!this.isValid(t)){var d=this.dataSource;if(!d||0==d.rowCount||0==this.itemCount)return this._focusedIndex.itemIndex=-1,this._focusedIndex.layout=null,this.clearAddSelection(!0),!1}var c=1===this.selections.count?this.getSelection(0):null;if(l.CellIndex.areEquals(t,this._focusedIndex))return!(c&&c.single&&this.selections.containsCell(t))&&this.clearAddSelection(e,r),i&&(u.focusIsVisible(this._focusedIndex)||this.editController.requestPrepareEditor()),!0;var p=this._editOptions,_=this._focusedIndex.clone(),f=this.itemSource,g=this.container.defaultTool;if(this.editOptions.currentChangingFirst?!this._fireCurrentChanging(_,t)||!this._editController.focusedIndexChanging():!this._editController.focusedIndexChanging()||!this._fireCurrentChanging(_,t)){var m=this.activeTool.dragTracker;return m instanceof Et.SelectTracker&&(m.dragging?m.cancel():this.activeTool.dragTracker=null),!1}var y=_.item;if(!this.isItemEditing(y)||this.isItemEdited(y)||t.itemIndex==_.itemIndex||y.itemState!==n.ItemState.UPDATING||p.commitWhenNoEdit){if(f&&t.itemIndex!=_.itemIndex)try{if(y)switch(y.itemState){case n.ItemState.INSERTING:if(!this.commit(p.forceInsert,!0))return this.cancel(!0),!1;break;case n.ItemState.APPENDING:if(!this.commit(p.forceAppend,!0))return this.cancel(!0),!1;break;case n.ItemState.UPDATING:if(!this.commit(p.commitWhenNoEdit,!0))return this.cancel(!0),!1}}catch(t){if(t instanceof q.ValidationError)return(t=this._fireValidationFail(y.index,t.column,t))&&alert(p.showOnlyValidationMessage&&t.userMessage?t.userMessage:t.toString()),this.invalidateLayout(),!1;if(t instanceof q.AbortError)return!1;throw t}}else this.cancel(!0);g.focusedIndexChanging(t),this._focusedIndex.assign(t),this.$_checkFocusedLayout(),h=this.getBodyCellAt(_,!1),a=this.getBodyCellAt(t,!1),this.isValid(_)&&(s=u.getBodyView(_)).$_focusChanged(this,h,!1),this.isValid(t)&&(s=u.getBodyView(t)).$_focusChanged(this,a,!0),f instanceof H.EditableItemProvider&&f.setDiffs(this._editOptions.checkDiff,this._editOptions.checkCellDiff,this._editOptions.strictDiff),this._editController.focusedIndexChanged(_,t,!1),g.focusedIndexChanged(_,t);var v=this._focusedIndex,C=this.isValid(v);if(!c||!(0,N.isSingleSelectionStyle)(c.style)||!this.selections.containsCell(v)){var w=i;this.clearAddSelection(e,r,w)}this._layouted&&this._refreshSideViews();var x=!l.CellIndex.areEquals(v,u._prevFocused);if(i||x)if(this.$_makeFocusedIndexVisible()){if(this._resetTdFocus=!1,this.accessibility)if(!this.isEditing()&&this.isValid(v)&&this.isValid(_))s=this.getBodyViewAt(_),"mousedown"!==this._eventFrom&&_.itemIndex!==v.itemIndex&&s&&s.tdClone(_),this._resetTdFocus=!0;else{var b=this._items.editingItem;this.isItemEditing()&&b.itemState===n.ItemState.APPENDING&&(this._resetTdFocus=!0)}}else{var I,E;if(this._editController.resetEditor(!1),this.isValid(v)&&this.getItem(v.itemIndex).canEdit()&&this._editController.prepareEditor(v),this.isValid(_))if(I=this.getBodyViewAt(_))(E=I.getRowView(_.item))instanceof vt.RowElement&&E.resetButtons(this,h,a);if(!this.container.isLayoutNeeded()&&C)if(I=this.getBodyViewAt(v))(E=I.getRowView(v.item))instanceof vt.RowElement&&E.resetButtons(this,h,a);this.accessibility&&!this.isEditing()&&this.isValid(v)&&this.layoutManager.cellIsVisible(v)&&((s=this.getBodyViewAt(v))&&s.refreshTdFocused(v,!0),this._editController.attachEditor(this.getEditContainer(v),!1))}return this._fireCurrentChanged(this._currentIndex.assign(v)),this.$_checkCurrentRow(),!0},C.prototype._refreshSideViews=function(){this.container.isLayoutNeeded()||(this._rowBarContainer.visible&&this._rowBarContainer.refresh(this),this._headerView.visible&&this._headerView.refresh(this),this._fixedHeaderView.visible&&this._fixedHeaderView.refresh(this),this._rightHeaderView.visible&&this._rightHeaderView.refresh(this))},C.prototype.$_makeFocusedIndexVisible=function(){return this.makeCellVisible(this._focusedIndex)},C.prototype.makeCellVisible=function(t){if(this.isValid(t)||t&&t.column){if(this.layoutManager.makeCellVisible(t),!this.layoutManager.focusIsVisible())return"mousedown"!==this._eventFrom&&this.invalidateLayout(),!0;this.layoutManager.clearFocusRequest()}return!1},C.prototype.makeColumnVisible=function(t){if(t){var e=this.getIndex(this._focusedIndex?this._focusedIndex.itemIndex:-1,t);this.makeCellVisible(e)}},C.prototype.makeItemVisible=function(t){if(t>=0){var e=this.getIndex(t,this._focusedIndex&&this._focusedIndex.layout);this.makeCellVisible(e)}},C.prototype.cancelEditor=function(t){this.isEditing()&&(t=!(arguments.length>0)||t,this._editController.cancelEditor(t))},C.prototype.itemEditCancel=function(){return this._fireItemEditCancel(this.itemSource.editingItem)},C.prototype.$_cancelItem=function(t,i){void 0===i&&(i=!1);var o=e.Utils.cast(this.itemSource,H.EditableItemProvider);return!!(o&&t&&o.isEditing(t))&&(this._validationManager.clearInvalidCells(-1),o.cancel(),i&&this.resetFocusedIndex(),!0)},C.prototype.cancel=function(t){void 0===t&&(t=!1);var e=this.editController;this.isEditing()&&(e.cancelEditor(!0),e.invalidateEditor());var i=this.focusedIndex;return!(!this.isValid(i)||!this.$_cancelItem(i.item))&&(i=i.clone(),this._rowBarContainer.stateError=void 0,e._prepareEditor(e._editIndex),i.normalize(this),i.item instanceof H.DummyEditItem&&i.up(),this.setFocusedIndex(i),t&&this.$_makeFocusedIndexVisible(),!0)},C.prototype.commitEditor=function(t,e){if(void 0===t&&(t=!0),void 0===e&&(e=!1),this.isEditing())return this.editController.commitEditor(t,!1,!0,e)},C.prototype.$_commitItem=function(t,i,o){var r=e.Utils.cast(this.itemSource,H.EditableItemProvider),s=this.validationManager,a=this.editOptions;if(r&&t&&r.isEditing(t)&&(i||r.isEdited(t))){var l=(0,n.ItemState_isInserting)(t.itemState);try{a.validateOnEdited&&s.validateRow(t,l,!1,!1),this._rowBarContainer.stateError=void 0}catch(t){throw t instanceof q.ValidationError&&(t.level=t.level||y.ValidationLevel.ERROR,!t.column&&(this._rowBarContainer.stateError=t)),t}if(!r.commit()){if(o)throw new q.AbortError("Commit failed.");return!1}return t.dataId>-1&&s.cloneError(-1,t.dataId),s.clearInvalidCells(-1),this.editOptions.removeValidateOnCommit&&t.dataId>-1&&s.clearInvalidCells(t.dataId),!0}},C.prototype.commit=function(t,e,i){void 0===i&&(i=!0);var o=this.focusedIndex,n=!0;return!!this.isValid(o)&&(this.isEditing()&&(n=this.editController.commitEditor(!0,!1,i,!1),this.editController.invalidateEditor()),n&&this.$_commitItem(o.item,t,e))},C.prototype.editorCancel=function(t,e){this._doCellCancel(e)},C.prototype._doCellCancel=function(t){return this._fireEditCanceled(t)},C.prototype.editorCanceled=function(){this.activeTool.resetFocused()},C.prototype._editorStarted=function(t,e){if(this.closePopups(!1),this.edit(e))return!0},C.prototype._editorChange=function(t,e,i){this._fireEditChange(e,i)},C.prototype._editorSearch=function(t,e,i){this._fireEditSearch(e,i)},C.prototype._searchCellButtonClick=function(t,e,i){return this._fireSearchCellButtonClick(e,i)},C.prototype.$_getFieldDefaults=function(t){for(var e=t.fieldCount,i=[],o=0;o=0?(r[l]=e,s[l]=i):o?(n.splice(0,0,a),r.splice(0,0,e),s.splice(0,0,i)):(n.push(a),r.push(e),s.push(i)),this._sortItems(n,r,s)},C.prototype._sortItems=function(t,e,i){var o=this,n=t.concat(),r=e?e.concat():[],s=i?i.concat():[];this._fireSorting(n,r)&&this._toastManager.show(this.sortingOptions.toast,!0,(function(){var e=o.sortingOptions.keepFocusedRow&&o.focusedIndex?o.focusedIndex.dataRow:-1;if(o._doSortItems(t,r,s),e>=0){var i=l.CellIndex.temp(o,o.getItemIndexOfRow(e),o.focusedIndex.column);o._keepLeftPos=!0,o.setFocusedIndex(i,!0,!0)}}))},C.prototype._doPrepareComparer=function(t){for(var e={},i=0;il?1:a=0){var r=l.CellIndex.temp(this,this.getItemIndexOfRow(o),this.focusedIndex.column,!0);this.isValid(r)?this.setFocusedIndex(r,!0,!0):this._filteringOptions.clearFocusWhenFiltered&&this.clearFocusedIndex()}else n!==this._items.itemCount&&(this.topIndex=0);this._filterRunning=!1}},C.prototype.$_addFilters=function(){for(var t=this.columnCount,e=0;e0)for(var n=0,r=o.count;n0)(s=o.getItem(0)).active&&this._items.addFilter(i.dataIndex,s)}},C.prototype.columnFilterChanged=function(t,e,i){this._doColumnFiltersChanged(t,e,i)},C.prototype.canGrouping=function(){return!1},C.prototype.$_layoutRowHover=function(t,e,i){var o=this._layoutManager,n=o.footerBounds.y+o.contentBounds.y,r=this.getBodyView(t.cell);if(r){var s=o.getTableRowIndex(e);if(!(s<0)){s=r.getViewIndex(s);var a=o.getTableItemBounds(s);switch(a.y+=o.contentBounds.y+o.bodyBounds.y,a.bottom>n&&(a.bottom=n),i){case y.RowMaskType.DATA:a.x=this._fixedContentPane.x,a.right=this._rightContentPane.width?this._rightContentPane.right:this._contentPane.right;break;case y.RowMaskType.FILL:a.x=0,a.width=this.width;break;case y.RowMaskType.CELL:var l=r.pointByContainer(0,0),h=r.getCellRect(o,t,!0);a.x=h.x+l.x,a.width=h.width;break;case y.RowMaskType.ROW:a.x=0,a.right=this._rightContentPane.width?this._rightContentPane.right:this._contentPane.right}this._rowHoverView.setRect(a)}}},C.prototype.$_resetHovering=function(t,e,i){void 0===i&&(i=!1);var o=this.activeTool,n=this.container.getTableCell(o.mouseEventTarget),r=this.getCellType(n),s=this.container._updateRequested;if(o instanceof U.GridSelectionTool&&!s){if(!this.isEditing()){if(i&&this.isRecycleMode()){var a=l.CellIndex.temp(this);this.layoutManager.mouseToIndex(n,t,e,a);var h=this.getBodyCellAt(a);h&&(n=h.cell)}var u=!1,d=!1,c=!1,p=!1;if(r===y.GridCellType.DATA){var _=this.getBodyCellbyCell(n);this.$_setHoveredCell(_,e,i),o.$_setHoveredCell(_,t,e),u=!0}else if(r===y.GridCellType.HEADER){_=this.getHeaderView(n).tableCellByCell(n);o.$_setHoveredHeaderCell(_,t,e),d=!0}else if(r===y.GridCellType.STATE||r===y.GridCellType.INDICATOR||r===y.GridCellType.CHECK)if(r===y.GridCellType.STATE&&this._rowBarContainer.stateError&&this._stateBar.errorVisible&&this.editOptions.hintOnError){var f=this._rowBarContainer.rowOf(n);this.isItemEditing(this.getItem(f))&&(c=!0,o.$_showStateError(n,this._rowBarContainer.stateError.message))}else{f=this._rowBarContainer.rowOf(n);var g=this.getItem(f);o.$_setHoveredRowBarCell(r,n,g),p=!0}return!(u||d||c||p)&&o._hideTooltip(),u||this.$_setHoveredCell(null,e,!1),!0}if(this.displayOptions.showTooltipWhileEditing){if(r===y.GridCellType.DATA){_=this.getBodyCellbyCell(n);return o.$_setHoveredCell(_,t,e),!0}if(r===y.GridCellType.HEADER){_=this.getHeaderView(n).tableCellByCell(n);return o.$_setHoveredHeaderCell(_,t,e),!0}}}},C.prototype.$_getCellAt=function(t,e){var i=this.getBodyView(t),o=this.layoutManager,n=this.getDataCellIndex(t,this._currentIndex),r=i.getCellAt(o,n);if(r&&r.merged){var s=o.getTableRowIndex(e);if(s<0)return r;var a=i.getRowIndex(s);return n.itemIndex=Math.min(Math.max(r.item.index,a),r.item.index+r.rowSpan-1),i.getCellAt(o,n)}return r},C.prototype.$_setHoveredCell=function(t,e,i){void 0===i&&(i=!1);var o=t?this.$_getCellAt(t.cell,e):t;if(i||o!==this._hoveredCell){if(this._hoveredCell&&this._hoveredCell.cell)this.getBodyView(this._hoveredCell.cell).$_mouseEnteredChanged(this,this._hoveredCell,!1);if(o)this.getBodyView(o.cell).$_mouseEnteredChanged(this,o,!0);this._doHoveredCellChanged(this._hoveredCell=o)}(i||e!=this._hoveredY)&&(this._hoveredY=e,this.$_resetRowHover())},C.prototype.$_resetRowHover=function(){var t=this._displayOptions.rowHoverType;this._hoveredCell&&t&&t!=y.RowMaskType.NONE?(this._rowHoverView.visible=!0,this.$_layoutRowHover(this._hoveredCell,this._hoveredY,t)):this._rowHoverView.visible=!1},C.prototype.$_resetFocusRender=function(t,e){var i=this.getBodyCellAt(this.focusedIndex,!0),o=i&&i.merged&&(i.renderer2||i.head.renderer2),n=this.canMergeEditing(i);if(o&&o.refreshFocusChanged){var r=this.layoutManager,s=this.getBodyViewAt(this.focusedIndex),a=s.getCellRectAt(r,this.focusedIndex,!1),l=s.getCellRectAt(r,this.focusedIndex,!0),h=a.top-l.top+a.height/2-l.height/2;o.moveClickElement(h,n)}},C.prototype._doHoveredCellChanged=function(t){},C.prototype._doCellButtonClicked=function(t){this._fireCellButtonClicked(t)},C.prototype._syncHeadCheck=function(t,e){var i=this.checkBar;if(i.syncHeadCheck){var o=i.showGroup&&!i.merged;if(!1===e)this._headView.allChecked=e;else if(null==t)this._headView.allChecked=e;else{for(var n=0,r=0,s=void 0,a=i.visibleOnly,l=a?this._items.itemCount:(s=this.getAllItems()).length,h=0;h0&&n!==r))break}this._headView.allChecked=n>0&&r===n,this._headView.indeterminate=i.headThreeStates&&r>0&&r0&&this.dataSource.removeRows(e)},C.prototype.$_dropData=function(t,e,i){var o=this.dataDropOptions,n=o.callback,r=i.index;if(n)n(t.handler,e,this.handler,i.index,i.column);else if(r>=0){var s=t.getRowsOfItems(e),a=void 0,l=o.fieldMapCallback;if(l&&(a=l(t.handler,e,this.handler,r,i.column)),a=a||o.fieldMap,r=0&&this.dataSource.insertRowsFrom(t.dataSource,a,s,h)}else this.dataSource.appendRowsFrom(t.dataSource,a,s)}o.dropMode==pt.DataDropMode.MOVE&&t.$_clearDropData(e)},C.prototype.$_checkFocusedLayout=function(){if(this._focusedIndex){var t=this.getBodyCellAt(this._focusedIndex);t&&t.spanned&&(this._focusedIndex.layout=t.spanHead.layout)}},C.prototype.$_isBottomCell=function(t){var e=this.getBodyCellAt(t);if(e)return this.getBodyView(e.cell).isBottomCell(e)},C.prototype.$_getLowerOfCell=function(t){var e=this.getBodyCellAt(t);if(e)return(e=this.getBodyView(e.cell).getLowerOf(e))&&e.layout.source},C.prototype.$_isTopCell=function(t){var e=this.getBodyCellAt(t);if(e)return this.getBodyView(e.cell).isTopCell(e)},C.prototype.$_getUpperOfCell=function(t){var e=this.getBodyCellAt(t);if(e)return(e=this.getBodyView(e.cell).getUpperOf(e))&&e.layout.source},C.prototype.setCheckFieldIndex=function(t){this._items.setCheckFieldIndex(t)},C.prototype._fireCurrentChanging=function(t,e){return this.fireConfirmEvent("onGridBaseCurrentChanging",t,e)},C.prototype._fireCurrentChanged=function(t){this.fireEvent("onGridBaseCurrentChanged",t)},C.prototype._fireCurrentRowChanged=function(t,e){this.fireEvent("onGridBaseCurrentRowChanged",t,e)},C.prototype._fireValidateCell=function(t,e,i){this.fireEvent("onGridBaseValidateCell",t,e,i)},C.prototype._fireValidateRow=function(t,e,i){this.fireEvent("onGridBaseValidateRow",t,e,i)},C.prototype._fireValidationFail=function(t,e,i){return this.fireObjectEvent("onGridBaseValidationFail",t,e,i)},C.prototype._fireCellClicked=function(t){this.fireEvent("onGridBaseCellClicked",t)},C.prototype._fireCellDblClicked=function(t){this.fireEvent("onGridBaseCellDblClicked",t)},C.prototype._fireCellItemClicked=function(t,e){return this.fireConfirmEvent("onGridBaseCellItemClicked",t,e)},C.prototype._fireColumnCheckedChanged=function(t){this.fireEvent("onGridBaseColumnCheckedChanged",t,t.checked)},C.prototype._fireMenuItemClicked=function(t,e){this.fireEvent("onGridBaseMenuItemClicked",t,e)},C.prototype._fireContextMenuPopup=function(t,e,i,o,n){return this.fireObjectEvent("onGridBaseContextMenuPopup",t,e,i,o,n)},C.prototype._fireContextMenuItemClicked=function(t,e){this.fireEvent("onGridBaseContextMenuItemClicked",t,e)},C.prototype._fireCellButtonClicked=function(t){this.fireEvent("onGridBaseCellButtonClicked",t)},C.prototype._fireEditButtonClicked=function(t){this.fireEvent("onGridBaseEditButtonClicked",t)},C.prototype._fireScrollToBottom=function(){this.fireEvent("onGridBaseScrollToBottom")},C.prototype._fireTopIndexChanging=function(t,e,i,o){return this.fireObjectEvent("onGridBaseTopIndexChanging",t,e,i,o)},C.prototype._fireTopIndexChanged=function(t){this.fireEvent("onGridBaseTopIndexChanged",t)},C.prototype._fireLeftPosChanged=function(t){this.fireEvent("onGridBaseLeftPosChanged",t)},C.prototype._fireDataCellClicked=function(t){this.fireEvent("onGridBaseDataCellClicked",t)},C.prototype._fireDataCellDblClicked=function(t){this.fireEvent("onGridBaseDataCellDblClicked",t)},C.prototype._fireRowsDeleting=function(t){return this.fireConfirmEvent("onGridBaseRowsDeleting",t)},C.prototype._fireRowInserting=function(t,e){return this.fireConfirmEvent("onGridBaseRowInserting",t,e)},C.prototype._fireItemCommit=function(t,e){this.fireEvent("onGridBaseItemCommit")},C.prototype._fireSelectionChanged=function(t){return this.fireEvent("onGridBaseSelectionChanged",t)},C.prototype._fireSelectionAdded=function(t){return this.fireEvent("onGridBaseSelectionAdded",t)},C.prototype._fireSelectionRemoved=function(){return this.fireEvent("onGridBaseSelectionRemoved")},C.prototype._fireSelectionCleared=function(){return this.fireEvent("onGridBaseSelectionCleared")},C.prototype._fireSelectionResized=function(t){return this.fireEvent("onGridBaseSelectionResized")},C.prototype._fireSelectionEnded=function(t){return this.fireEvent("onGridBaseSelectionEnded",t)},C.prototype._fireUpdateStarted=function(t,e){this.fireEvent("onGridBaseUpdateStarted",t)},C.prototype._fireInsertStarted=function(t,e){this.fireEvent("onGridBaseInsertStarted",t,e)},C.prototype._fireShowEditor=function(t,e,i){return this.fireConfirmEvent("onGridBaseShowEditor",t,e,i)},C.prototype._fireShowEditCommand=function(t){return this.fireConfirmEvent("onGridBaseShowEditCommand",t)},C.prototype._fireHideEditor=function(t){return this._doEditorActivated(t,!1,null),this.fireEvent("onGridBaseHideEditor",t)},C.prototype._fireEditChange=function(t,e){this.fireEvent("onGridBaseEditChange",t,e)},C.prototype._fireGetEditValue=function(t,e){return this.fireObjectEvent("onGridBaseGetEditValue",t,e)},C.prototype._fireEditCommit=function(t,e,i){return this.fireConfirmEvent("onGridBaseEditCommit",t,e,i)},C.prototype._fireEditCanceled=function(t){this.fireEvent("onGridBaseEditCanceled",t)},C.prototype._fireItemEditCancel=function(t){return this.fireConfirmEvent("onGridBaseItemEditCancel",t)},C.prototype._fireItemEditCanceled=function(t){this.fireEvent("onGridBaseItemEditCanceled",t)},C.prototype._fireEditSearch=function(t,e){this.fireEvent("onGridBaseEditSearch",t,e)},C.prototype._fireSearchCellButtonClick=function(t,e){return this.fireObjectEvent("onGridBaseSearchCellButtonClick",t,e)},C.prototype._fireCellEdited=function(t,e){this.fireEvent("onGridBaseCellEdited",t,e)},C.prototype._fireEditRowChanged=function(t,e,i,o){this.fireEvent("onGridBaseEditRowChanged",t,e,i,o)},C.prototype._fireEditItemPasted=function(t,e,i,o){this.fireEvent("onGridBaseEditRowPasted",t,e,i,o)},C.prototype._fireItemsPasted=function(t){this.fireEvent("onGridBaseRowsPasted",t)},C.prototype._fireCellPasting=function(t,e,i){return this.fireObjectEvent("onGridBaseCellPasting",t,e,i)},C.prototype._fireItemChecked=function(t){this.fireEvent("onGridBaseItemChecked",t,t.checked)},C.prototype._fireItemsChecked=function(t,e){this.fireEvent("onGridBaseItemsChecked",t,e)},C.prototype._fireItemAllChecked=function(t){this.fireEvent("onGridBaseItemAllChecked",t)},C.prototype._fireErrorClicked=function(t,e){this.fireEvent("onGridBaseErrorClicked",e)},C.prototype._fireSorting=function(t,e){return this.fireConfirmEvent("onGridBaseSorting",t,e)},C.prototype._fireFiltering=function(t){return this.fireConfirmEvent("onGridBaseFiltering",t)},C.prototype._fireKeyDown=function(t){return this.fireConfirmEvent("onGridBaseKeyDown",t)},C.prototype._fireWheel=function(t){return this.fireConfirmEvent("onGridBaseWheel",t)},C.prototype._fireKeyPress=function(t){this.fireEvent("onGridBaseKeyPress",t)},C.prototype._fireKeyUp=function(t){this.fireEvent("onGridBaseKeyUp",t)},C.prototype._fireShowTooltip=function(t,e,i){return this.fireObjectEvent("onGridBaseShowTooltip",t,e,i)},C.prototype._fireShowHeaderTooltip=function(t,e,i,o){return this.fireObjectEvent("onGridBaseShowHeaderTooltip",t,e,i,o)},C.prototype._fireShowRowBarTooltip=function(t,e,i){return this.fireObjectEvent("onGridBaseShowRowBarTooltip",t,e,i)},C.prototype._fireColumnPropertyChanged=function(t,e,i,o){this.fireEvent("onGridBaseColumnPropertyChanged",t,e,i,o)},C.prototype._fireLayoutPropertyChanged=function(t,e,i,o){this.fireEvent("onGridBaseLayoutPropertyChanged",t,e,i,o)},C.prototype._fireGridActivated=function(){return this.fireEvent("onGridBaseGridActivated",this)},C.prototype._fireGridFocusChanged=function(t,e,i){this.fireEvent("onGridBaseGridFocusChanged",t,e,i)},C.prototype._fireCopy=function(t,e){return this.fireConfirmEvent("onGridBaseCopy",t,e)},C.prototype._firePaste=function(t,e){return this.fireConfirmEvent("onGridBasePaste",t,e)},C.prototype._firePasted=function(){this.fireEvent("onGridBasePasted")},C.prototype._fireCommandStackChanged=function(t,e){this.fireEvent("onGridBaseCommandStackChanged",t,e)},C.prototype.onPopupMenuManagerMenuItemClicked=function(t,e,i){this._fireMenuItemClicked(e,i)},C.prototype.onPopupMenuManagerPopup=function(t,e,i,o,n,r){return this._fireContextMenuPopup(e,i,o,n,r)},C.prototype.onItemProviderOuterSort=function(t,e,i,o){var n=this;if(e instanceof Function){return function(t,i){var o=t.map((function(t,e,o){return{fieldName:n.dataSource.getFieldName(t),orgFieldName:n.dataSource.getOrgFieldName(t),direction:i[e]||y.SortDirection.ASCENDING}}));return e.call(n,n.handler,o)}(i,o)}},C.prototype.onScrollBarScrolled=function(t,i,o,n){var r,s,a,l=this.displayOptions,h=this.fixedOptions,u=l.scrollMessageCallback,d=i===k.ScrollEventType.SCROLL_END;if(!d&&this.scrollOnEditing(),t.vertical){var c=-1;switch(i){case k.ScrollEventType.LINE:return void this.scrollRow(o);case k.ScrollEventType.PAGE:c=Math.max(0,this.topIndex+o*t._page);break;case k.ScrollEventType.THUMB_TRACK:var p=l.scrollDuration;l.liveScroll||this._scrolledTime>0&&e.Utils.getTimer()-this._scrolledTime>p?(c=n,this._scrolledTime=0):(this._scrollTipView||(this._scrollTipView=new k.ScrollTipView(this.container)),this._vscrollBar.tipView=this._scrollTipView,this._vscrollBar.setPosition(n,!0),s=this._vscrollBar.pos+h.rowCount,r=u?u(this.handler,t.vertical,s):String(s+1),this._vscrollBar.setText(r),p>0&&0==this._scrolledTime&&(this._scrolledTime=e.Utils.getTimer()));break;case k.ScrollEventType.THUMB_END:this._scrollTipView&&this._scrollTipView.hide(),this._vscrollBar.tipView=null,c=n,d=!0;break;default:c=n}c>=0&&(this.topIndex=c)}else{var _=-1;switch(i){case k.ScrollEventType.LINE:_=Math.max(0,this.leftPos+8*o);break;case k.ScrollEventType.PAGE:_=o>0?this._layoutManager.scrollToNextCell():this._layoutManager.scrollToPrevCell();break;case k.ScrollEventType.THUMB_TRACK:p=l.hscrollDuration;l.liveScroll||this._scrolledTime>0&&e.Utils.getTimer()-this._scrolledTime>p?(_=n,this._scrolledTime=0):(this._scrollTipView||(this._scrollTipView=new k.ScrollTipView(this.container)),this._hscrollBar.tipView=this._scrollTipView,(a=this._layoutManager.getPositionToVIndex(n))>-1&&(r=u?u(this.handler,t.vertical,a):this.getVisibleLayout(a).getDataColumn().header.displayText,this._hscrollBar.setText(r)),this._hscrollBar.setPosition(n,!0),p>0&&0==this._scrolledTime&&(this._scrolledTime=e.Utils.getTimer()));break;case k.ScrollEventType.THUMB_END:this._scrollTipView&&this._scrollTipView.hide(),this._hscrollBar.tipView=null,_=n,d=!0;break;default:_=n}_>=0&&(this.leftPos=_)}d&&!e.Utils.isMobile()&&this.setFocus()},C.prototype.$_checkFocusedRow=function(t){void 0===t&&(t=!1),this.focusedRow>=this.itemCount&&this.clearFocusedIndex(t)},C.prototype.onItemProviderReset=function(t,e){this.hideEditor(),this._dataChanged=!0,this._needRefresh=!0,this.clearRowHeights(),this._columnsReset(),this._populateMerges(),this.$_checkFocusedRow(),this._itemCheckChanged=!0,this.resetGrid(e),this.$_refreshInvalidList(!0)},C.prototype.onItemProviderRefresh=function(t,e){this.hideEditor(),this._dataChanged=!0,this._needRefresh=!0,this._resetColumnSortStates(),!1!==e&&this.clearRowHeights(),this._populateMerges(),this._filterRunning&&this.filteringOptions.clearFocusWhenFiltered||this.$_checkFocusedRow(!0),this._itemCheckChanged=!0,this.refreshView(),this.$_refreshInvalidList(!1)},C.prototype.onItemProviderRefreshClient=function(t){this.hideEditor(),this._dataChanged=!0,this._needRefresh=!0,this._populateMerges(),this.$_checkFocusedRow(),this.refreshView()},C.prototype.onItemProviderItemInserted=function(t,e){if(t.dataSource.undoing||t.dataSource.redoing){var i=this._focusedIndex.clone();i.itemIndex=e.index,this.setFocusedIndex(i,!0,!0)}},C.prototype.onItemProviderItemDeleted=function(t,e){if(t.dataSource.undoing||t.dataSource.redoing){var i=this._focusedIndex.clone();i.itemIndex=e.index,this.setFocusedIndex(i,!0,!0)}},C.prototype.onItemProviderItemUpdated=function(t,e){if(t.dataSource.undoing||t.dataSource.redoing){var i=this._focusedIndex.clone();i.itemIndex=e.index,this.setFocusedIndex(i,!0,!0)}},C.prototype.onItemProviderCheckableChanged=function(t,e){this._itemCheckChanged=!0,this.refreshView()},C.prototype.onItemProviderItemChecked=function(t,e){this.refreshView(),this._fireItemChecked(e)},C.prototype.onItemProviderItemsChecked=function(t,e,i){this.refreshView(),this._fireItemsChecked(e,i)},C.prototype.onItemProviderItemAllChecked=function(t,e){this.refreshView(),this._fireItemAllChecked(e)},C.prototype.onItemProviderItemCheckChanged=function(t,e,i){this._itemCheckChanged=!0,!this.isTree()&&this.checkBar.canMerge()&&this._populateMerges()},C.prototype.onItemProviderRowStateChanged=function(t,e){this.refreshView()},C.prototype.onItemProviderRowStatesChanged=function(t,e){this.refreshView()},C.prototype.onItemProviderRowStatesCleared=function(t){this.refreshView()},C.prototype.onItemProviderSort=function(t,e,i){this.refreshView()},C.prototype.onItemProviderSorted=function(t){this.header.dirty=!0,this._needRefresh=!0,this.refreshView(),this.fireEvent("onGridBaseSortingChanged")},C.prototype.onItemProviderFiltered=function(t,e,i,o){this._populateMerges(),this._filterRunning&&this.filteringOptions.clearFocusWhenFiltered||this.$_checkFocusedRow(),this._itemCheckChanged=!this._loading,this.header.dirty=!0,this._needRefresh=!0,this.refreshView(),this.fireEvent("onGridBaseFilteringChanged",e,i,o)},C.prototype.onItemProviderCommandStackChanged=function(t,e,i){this._fireCommandStackChanged(e,i)},C.prototype.onItemProviderDataLoadComplated=function(t){this._prevLast=0,this._dataLoad=!0},C.prototype.$_focusEditItem=function(t){var e=this.getIndex(t.index,this.focusedIndex?this.focusedIndex.column:null);!e.column&&this.visibleLayoutCount>0&&(e._layout=this.getVisibleLayout(0)),this.setFocusedIndex(e,!0),this.makeCellVisible(this.focusedIndex)},C.prototype.$_beforeEditing=function(t,e){},C.prototype.onItemEditUpdateStarted=function(t,e){this.$_beforeEditing(t,e),this.refreshView(),this._fireUpdateStarted(e,!1)},C.prototype.onItemEditAppendStarted=function(t,e){this.$_beforeEditing(t,e),this.hideEditor(),this._populateMerges(),this.refreshView(),this.$_focusEditItem(e),this.requestPrepareEditor(),this._fireInsertStarted(e,!0)},C.prototype.onItemEditInsertStarted=function(t,e){this.$_beforeEditing(t,e),this.hideEditor(),this._populateMerges(),this.refreshView(),this.$_focusEditItem(e),this.requestPrepareEditor(),this._fireInsertStarted(e,!1)},C.prototype.onItemEditCellEdited=function(t,e,i){this.refreshView(),!this._cellUpdateEventLock&&this._fireCellEdited(e,i)},C.prototype.onItemEditCellUpdated=function(t,e,i,o,n){this.refreshView(),!this._cellUpdateEventLock&&this._fireEditRowChanged(e,i,o,n)},C.prototype.onItemEditCommitting=function(t,e){},C.prototype.onItemEditCommitted=function(t,e){this._appendDummy(),this.hideEditor(),this.refreshView()},C.prototype.onItemEditCanceled=function(t){this._appendDummy(),this.hideEditor(),this._populateMerges(),this.refreshView(),this._fireItemEditCanceled(t._editingItem)},C.prototype.onItemEditCommitRequest=function(t){this.commit(!1)},C.prototype.onItemEditCancelReuqest=function(t){this.cancel()},C.prototype.onLookupSourceProviderChanged=function(t){this._resetColumnIndices(),this.refreshView()},C.prototype.onSelectionChanged=function(t,e,i){this._refreshSideViews(),i&&this._fireSelectionChanged(e)},C.prototype.onSelectionAdded=function(t,e,i){this._addSelectionView(e),this._layoutSelectionViews(),i&&this._fireSelectionAdded(e)},C.prototype.onSelectionRemoved=function(t,e){this._removeSelectionView(e),this._fireSelectionRemoved()},C.prototype.onSelectionCleared=function(t,e){this._selectionLayer.clearViews(),this._refreshSideViews(),e&&this._fireSelectionCleared()},C.prototype.onSelectionResized=function(t,e){this._layoutSelectionViews(),this._fireSelectionResized(e)},C.prototype.onSelectionEnded=function(t,e){this._fireSelectionEnded(e)},C.prototype.onLayoutExpanding=function(t,e){return this.fireConfirmEvent("onGridBaseLayoutExpanding",e)},C.prototype.onLayoutExpanded=function(t,e){this.fireEvent("onGridBaseLayoutExpanded",e)},C.prototype.onLayoutCollapsing=function(t,e){return this.fireConfirmEvent("onGridBaseLayoutCollapsing",e)},C.prototype.onLayoutCollapsed=function(t,e){this.fireEvent("onGridBaseLayoutCollapsed",e)},C.prototype.onMenuItemClick=function(t,e){this._fireContextMenuItemClicked(t,e)},C}(v.ViewLayer);return _n.GridBase=Pt,_n}var yl,vl,Cl={},wl={};function xl(){if(yl)return wl;yl=1,Object.defineProperty(wl,"__esModule",{value:!0}),wl.GridExporterBase=void 0;var t=d,e=function(e){function i(){var t=e.call(this)||this;return t.prepareProgress=10,t.indicatorNo=1,t}return t.__extends(i,e),i.prototype.dispose=function(){return null},i.prototype.export=function(t,e){this.grid=t},i}(Mi().ExporterBase);return wl.GridExporterBase=e,wl}var bl,Il={};function El(){return bl||(bl=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.GridMultiExportOptions=t.GridExportOptions=t.ExportLayoutExpand=t.PIXELS_PER_CHAR=t.INDICATOR_REVERSE=t.INDICATOR_ROW=t.INDICATOR_ITEM=t.INDICATOR_DEFAULT=t.VIS_VISIBLE=t.VIS_HIDDEN=t.VIS_DEFAULT=t.DocumentTitle=void 0;var e,i=d,o=G(),n=S(),r=Dn(),s=Si(),a=function(t){function e(e){var i=t.call(this)||this;return i._styles=null,i.message="",i.visible=!0,i.spaceTop=0,i.spaceBottom=0,i.height=-1,i.styleName="",e&&i.extend(e),i._styles=e&&e.styles?e.styles:null,i}return i.__extends(e,t),e.prototype._doDispose=function(){this._styles=null,t.prototype._doDispose.call(this)},_dp(e,"cssStyle",{get:function(){return this._styles}}),e}(o.Base);t.DocumentTitle=a,t.VIS_DEFAULT="default",t.VIS_HIDDEN="hidden",t.VIS_VISIBLE="visible",t.INDICATOR_DEFAULT="default",t.INDICATOR_ITEM="item",t.INDICATOR_ROW="row",t.INDICATOR_REVERSE="reverse",t.PIXELS_PER_CHAR=7,(e=t.ExportLayoutExpand||(t.ExportLayoutExpand={})).IGNORE="ignore",e.CURRENT="current",e.EXPAND="expand",e.COLLAPSE="collapse";var l=function(e){function o(i){var o=e.call(this,i)||this;return o.nullDateText="",o.linear=!1,o.allColumns=!1,o.allItems=!0,o.onlyCheckedItems=!1,o.pagingAllItems=!1,o.indicator=t.VIS_DEFAULT,o.checkBar=t.VIS_HIDDEN,o.header=t.VIS_DEFAULT,o.footer=t.VIS_DEFAULT,o.headerSummary=t.VIS_DEFAULT,o.indicatorValue=t.INDICATOR_DEFAULT,o.checkMark="v",o.unCheckMark="",o.indenting=!0,o.separateRows=!1,o.fillMergeFooterValue=!1,o.lookupDisplay=!1,o.showLevelOutline=!1,o.outlineSummaryBelow=!0,o.outlineSummaryRight=!0,o.applyFitStyle=!0,o.applyDynamicStyles=!1,o.applyDefaultColumnFormat=!1,o.applyFixed=!1,o.sheetName=null,o.exportSeriesColumn=!1,o.showColumns=[],o.hideColumns=[],o.hiddenColumns=[],o.exportLink=!1,o.exportTemplate=!1,o.sheetAttrs=null,o.stylePrefix="",o.trailPointZeroFormat=void 0,o.layoutExpand=null,o.exportShape=void 0,o.exportImage=void 0,o.bulkImageDownload=!0,o.exportLayout=void 0,o.userCells=void 0,o.userCellsCallback=void 0,o.sheetProtect=!1,o.protectPassword=void 0,o.exportMemo=void 0,o.useComputedStyle=!1,o.extend(i),o}return i.__extends(o,e),o.prototype._doDispose=function(){this._documentTitle&&(this._documentTitle=this._documentTitle.dispose()),this._documentSubtitle&&(this._documentSubtitle=this._documentSubtitle.dispose()),this._documentTail&&(this._documentTail=this._documentTail.dispose()),e.prototype._doDispose.call(this)},_dp(o,"documentTitle",{get:function(){return this._documentTitle},set:function(t){this._documentTitle=new a(t)}}),_dp(o,"documentSubtitle",{get:function(){return this._documentSubtitle},set:function(t){this._documentSubtitle=new a(t)}}),_dp(o,"documentTail",{get:function(){return this._documentTail},set:function(t){this._documentTail=new a(t)}}),_dp(o,"protectProperties",{get:function(){return this.sheetProtect&&(this._protectProperties=this._protectProperties||{},n.Utils.extendObj({objects:"1",scenarios:"1"},this._protectProperties)),this._protectProperties},set:function(t){this._protectProperties=t?n.Utils.deepCopy(t):void 0}}),o.prototype.indicatorVisible=function(e){if(e)switch(this.indicator){case t.VIS_VISIBLE:return!0;case t.VIS_HIDDEN:return!1;case t.VIS_DEFAULT:default:return e.rowIndicator.visible}return!1},o.prototype.checkBarVisible=function(e){if(e)switch(this.checkBar){case t.VIS_VISIBLE:return!0;case t.VIS_HIDDEN:return!1;case t.VIS_DEFAULT:default:return e.checkBar.visible}return!1},o.prototype.headerVisible=function(e){if(e)switch(this.header){case t.VIS_VISIBLE:return!0;case t.VIS_HIDDEN:return!1;case t.VIS_DEFAULT:default:return e.header.visible}return!1},o.prototype.headerSummaryVisible=function(e){if(e)switch(this.headerSummary){case t.VIS_VISIBLE:return!0;case t.VIS_HIDDEN:return!1;case t.VIS_DEFAULT:default:return e.headerSummaries.visible&&e.headerSummaries.visibleCount>0}return!1},o.prototype.footerVisible=function(e){if(e)switch(this.footer){case t.VIS_VISIBLE:return!0;case t.VIS_HIDDEN:return!1;case t.VIS_DEFAULT:default:return e.footers.visible&&e.footers.visibleCount>0}return!1},o.prototype.showIndicatorRow=function(e){if(e)switch(this.indicatorValue){case t.INDICATOR_REVERSE:case t.INDICATOR_ITEM:return!1;case t.INDICATOR_ROW:return!0;case t.INDICATOR_DEFAULT:default:return e.rowIndicator.displayValue==r.IndicatorValue.ROW}return!1},o.prototype.showIndicatorReverse=function(e){if(e)switch(this.indicatorValue){case t.INDICATOR_ROW:case t.INDICATOR_ITEM:return!1;case t.INDICATOR_REVERSE:return!0;default:return e.rowIndicator.displayValue==r.IndicatorValue.REVERSE}},_dp(o,"yOffset",{get:function(){return null==this._yOffset?0:this._yOffset},set:function(t){this._yOffset=Math.floor(t)}}),_dp(o,"xOffset",{get:function(){return null==this._xOffset?0:this._xOffset},set:function(t){this._xOffset=Math.floor(t)}}),_dp(o,"xOffsetWidth",{get:function(){return null==this._xOffsetWidth?100:this._xOffsetWidth},set:function(t){this._xOffsetWidth=Math.floor(t)}}),o}(s.ExportOptions);t.GridExportOptions=l;var h=function(t){function e(e,i){var o=t.call(this,i)||this;return o._grids=[],o._parseGrids(e,i),o}return i.__extends(e,t),_dp(e,"exportGrids",{get:function(){return this._grids}}),e.prototype._doDispose=function(){this._grids=null,t.prototype._doDispose.call(this)},e.prototype._parseGrids=function(t,e){var i=e.exportGrids;if(i&&Array.isArray(i))for(var o=0,n=i.length;o>>24)/255,this._r=(16711680&t)>>16,this._g=(65280&t)>>8,this._b=255&t)}return i._parse=function(e,i,n,r){if(e){var s=e.length;if("#"==(e=e.trim().toLowerCase()).charAt(0))if(e=e.substr(1),--s>=6&&s<=8)i._b=t.Utils.toInt(e.substr(s-2,2),16),i._g=t.Utils.toInt(e.substr(s-4,2),16),i._r=t.Utils.toInt(e.substr(s-6,2),16),i._a=6==s?n?NaN:1:t.Utils.toInt(e.substr(0,s-6),16)/255;else{if(3!=s){if(r)throw"Invalid color value text: "+e;return!1}i._r=t.Utils.toInt(e.charAt(0)+e.charAt(0),16),i._g=t.Utils.toInt(e.charAt(1)+e.charAt(1),16),i._b=t.Utils.toInt(e.charAt(2)+e.charAt(2),16),i._a=n?NaN:1}else if(0==e.indexOf("rgba(")&&")"==e.charAt(s-1)){var a=(e=e.substring(5,s-1)).split(",");i._r=t.Utils.toInt(a[0]),i._g=t.Utils.toInt(a[1]),i._b=t.Utils.toInt(a[2]),i._a=t.Utils.toFloat(a[3])}else{if(0!=e.indexOf("rgb(")||")"!=e.charAt(s-1)){if(o.hasOwnProperty(e)){a=o[e];return i._r=a._r,i._g=a._g,i._b=a._b,i._a=a._a,a}if(r)throw new Error("Invalid color text: "+e);return!1}var a=(e=e.substring(4,s-1)).split(",");i._r=t.Utils.toInt(a[0]),i._g=t.Utils.toInt(a[1]),i._b=t.Utils.toInt(a[2]),i._a=n?NaN:1}return!0}return!1},i.prototype.toHex=function(){return""+e(Math.floor(255*this._a))+e(this._r)+e(this._g)+e(this._b)},i.prototype.toColorHex=function(){return""+e(this._r)+e(this._g)+e(this._b)},i.prototype.toString=function(){return"#"+e(Math.floor(255*this._a))+e(this._r)+e(this._g)+e(this._b)},i}();kl.Color=i;var o={transparent:new i("#00000000"),ltGray:new i("#d3d3d3"),ltgray:new i("#d3d3d3"),aliceblue:new i("#f0f8ff"),antiquewhite:new i("#faebd7"),aqua:new i("#00ffff"),aquamarine:new i("#7fffd4"),azure:new i("#f0ffff"),beige:new i("#f5f5dc"),bisque:new i("#ffe4c4"),black:new i("#000000"),blanchedalmond:new i("#ffebcd"),blue:new i("#0000ff"),blueviolet:new i("#8a2be2"),brown:new i("#a52a2a"),burlywood:new i("#deb887"),cadetblue:new i("#5f9ea0"),chartreuse:new i("#7fff00"),chocolate:new i("#d2691e"),coral:new i("#ff7f50"),cornflowerblue:new i("#6495ed"),cornsilk:new i("#fff8dc"),crimson:new i("#dc143c"),cyan:new i("#00ffff"),darkblue:new i("#00008b"),darkcyan:new i("#008b8b"),darkgoldenrod:new i("#b8860b"),darkgray:new i("#a9a9a9"),darkgreen:new i("#006400"),darkgrey:new i("#a9a9a9"),darkkhaki:new i("#bdb76b"),darkmagenta:new i("#8b008b"),darkolivegreen:new i("#556b2f"),darkorange:new i("#ff8c00"),darkorchid:new i("#9932cc"),darkred:new i("#8b0000"),darksalmon:new i("#e9967a"),darkseagreen:new i("#8fbc8f"),darkslateblue:new i("#483d8b"),darkslategray:new i("#2f4f4f"),darkslategrey:new i("#2f4f4f"),darkturquoise:new i("#00ced1"),darkviolet:new i("#9400d3"),deeppink:new i("#ff1493"),deepskyblue:new i("#00bfff"),dimgray:new i("#696969"),dimGray:new i("#696969"),dimgrey:new i("#696969"),dodgerblue:new i("#1e90ff"),firebrick:new i("#b22222"),floralwhite:new i("#fffaf0"),forestgreen:new i("#228b22"),fuchsia:new i("#ff00ff"),gainsboro:new i("#dcdcdc"),ghostwhite:new i("#f8f8ff"),goldenrod:new i("#daa520"),gold:new i("#ffd700"),gray:new i("#808080"),green:new i("#008000"),greenyellow:new i("#adff2f"),grey:new i("#808080"),honeydew:new i("#f0fff0"),hotpink:new i("#ff69b4"),indianred:new i("#cd5c5c"),indigo:new i("#4b0082"),ivory:new i("#fffff0"),khaki:new i("#f0e68c"),lavenderblush:new i("#fff0f5"),lavender:new i("#e6e6fa"),lawngreen:new i("#7cfc00"),lemonchiffon:new i("#fffacd"),lightblue:new i("#add8e6"),lightcoral:new i("#f08080"),lightcyan:new i("#e0ffff"),lightgoldenrodyellow:new i("#fafad2"),lightgray:new i("#d3d3d3"),lightgreen:new i("#90ee90"),lightgrey:new i("#d3d3d3"),lightpink:new i("#ffb6c1"),lightsalmon:new i("#ffa07a"),lightseagreen:new i("#20b2aa"),lightskyblue:new i("#87cefa"),lightslategray:new i("#778899"),lightslategrey:new i("#778899"),lightsteelblue:new i("#b0c4de"),lightyellow:new i("#ffffe0"),lime:new i("#00ff00"),limegreen:new i("#32cd32"),linen:new i("#faf0e6"),magenta:new i("#ff00ff"),maroon:new i("#800000"),mediumaquamarine:new i("#66cdaa"),mediumblue:new i("#0000cd"),mediumorchid:new i("#ba55d3"),mediumpurple:new i("#9370db"),mediumseagreen:new i("#3cb371"),mediumslateblue:new i("#7b68ee"),mediumspringgreen:new i("#00fa9a"),mediumturquoise:new i("#48d1cc"),mediumvioletred:new i("#c71585"),midnightblue:new i("#191970"),mintcream:new i("#f5fffa"),mistyrose:new i("#ffe4e1"),moccasin:new i("#ffe4b5"),navajowhite:new i("#ffdead"),navy:new i("#000080"),oldlace:new i("#fdf5e6"),olive:new i("#808000"),olivedrab:new i("#6b8e23"),orange:new i("#ffa500"),orangered:new i("#ff4500"),orchid:new i("#da70d6"),palegoldenrod:new i("#eee8aa"),palegreen:new i("#98fb98"),paleturquoise:new i("#afeeee"),palevioletred:new i("#db7093"),papayawhip:new i("#ffefd5"),peachpuff:new i("#ffdab9"),peru:new i("#cd853f"),pink:new i("#ffc0cb"),plum:new i("#dda0dd"),powderblue:new i("#b0e0e6"),purple:new i("#800080"),rebeccapurple:new i("#663399"),red:new i("#ff0000"),rosybrown:new i("#bc8f8f"),royalblue:new i("#4169e1"),saddlebrown:new i("#8b4513"),salmon:new i("#fa8072"),sandybrown:new i("#f4a460"),seagreen:new i("#2e8b57"),seashell:new i("#fff5ee"),sienna:new i("#a0522d"),silver:new i("#c0c0c0"),skyblue:new i("#87ceeb"),slateblue:new i("#6a5acd"),slategray:new i("#708090"),slategrey:new i("#708090"),snow:new i("#fffafa"),springgreen:new i("#00ff7f"),steelblue:new i("#4682b4"),tan:new i("#d2b48c"),teal:new i("#008080"),thistle:new i("#d8bfd8"),tomato:new i("#ff6347"),turquoise:new i("#40e0d0"),violet:new i("#ee82ee"),wheat:new i("#f5deb3"),white:new i("#ffffff"),whitesmoke:new i("#f5f5f5"),yellow:new i("#ffff00"),yellowgreen:new i("#9acd32")};return kl}function Ol(){if(Rl)return Dl;Rl=1,Object.defineProperty(Dl,"__esModule",{value:!0}),Dl.encryptExcelPassword=Dl.ImageFileDownLoader=Dl.ExcelFormatConverter=Dl.ExportPreparer=Dl.CssFactory=void 0;var t=d,e=rn(),i=dn(),o=Br(),n=Ml(),r=S(),s=C(),a=El(),l=function(){function t(){}return t.parseDocumentStyles=function(t){for(var e,i,o,n={},r=t.styleSheets,s=0,a=r.length;s-1)for(var u=h.split(","),d=u.length;d--;){var c=u[d].trim();c&&(n[c]=o.style)}else n[o.selectorText]=o.style}}return n},t.extendCssStyle=function(t,e){for(var i=0,o=t.length;i0;){var n=e.columnByField(i.groupField),r=n.layout;n.visible&&r.visible||o--,i=i.parent}return Math.max(o,0)},t.prototype.prepareLayout=function(){var t,e=this.grid,o=this._exportOptions,n=e.activeCellLayout;if(o.linear){for(var r=n.getDataColumns(!1),s=[],a=0;a<=r.length-1;a++){var l=r[a],h=l.visible&&l.layout.visible||o.allColumns;(h=h&&o.hideColumns.indexOf(l.name)<0||o.showColumns.indexOf(l.name)>=0)&&s.push({column:l.name,width:l.layout.domWidth||l.layout.width})}t=new i.GridCellLayout(e).load(s)}else t=o.exportLayout?new i.GridCellLayout(e).load(o.exportLayout):new i.GridCellLayout(e).load(e.activeCellLayout.getLayout(!0,o.applyFitStyle,o.allColumns,o.showColumns,o.hideColumns,o.layoutExpand));return t},t.prototype.parse=function(t){var e=this._grid,i=this._layout=this.prepareLayout(),o=this._exportOptions.stylePrefix;l.prefix=o?o.trim()+" ":void 0,i.$_refresh2(e._columns,e.displayOptions.minCellWidth),i.$_prepareLayout(e,e.fixedOptions.colCount,e.fixedOptions.rightCount),i.$_prepareMerges(e);var n=e.footers,r=e.headerSummaries;this._setCellInfo(i._headerCells,this._headerCells=[]),this._setCellInfo(i._dataCells,this._dataCells=[]),this._setFooterInfo(i._dataCells,t.footer===a.VIS_VISIBLE?n.count:n.visibleCount,this._footerCells=[]),this._setFooterInfo(i._dataCells,t.headerSummary===a.VIS_VISIBLE?r.count:r.visibleCount,this._summaryCells=[]),this._documentCssStyles=l.parseDocumentStyles(e.doc),this._setDataColumns(i._dataCells),this._setSparkInfo(this._dataCells)},t.prototype._setCellInfo=function(t,e){for(var i=0;i0)){var l=t.provider._expandedAdornments,h=t.provider._collapsedAdornments;a=i?e&&!t.expanded&&r.Utils.included(h,s.RowGroupAdornments.SUMMARY,s.RowGroupAdornments.FOOTER):(a=t.expanded&&l===s.RowGroupAdornments.SUMMARY)||!e&&!t.expanded&&r.Utils.included(h,s.RowGroupAdornments.SUMMARY,s.RowGroupAdornments.FOOTER)}for(var u=a?t.allFooterCount:t.footerCount,d=0;d0&&r(_,this._dataColumns);if(y){var v=u.firstStyle,C=u.lastStyle,w=u.highStyle,x=u.lowStyle,b=void 0,I=void 0,E=void 0;if(o.SparkLineRenderer.interfaced(u)){b="line",!C&&(C=o.SparkLineRenderer.LAST_STYLE),!w&&(w=o.SparkLineRenderer.HIGH_STYLE),!x&&(x=o.SparkLineRenderer.LOW_STYLE);var S=u.pointStyle?l.getSelectorStyle(p,"."+u.pointStyle):void 0;I=S?new n.Color(S.fill).toHex():void 0,E=(T=l.getSelectorStyle(p,"."+o.SparkLineRenderer.CHART_STYLE))?new n.Color(T.stroke).toHex():void 0}else{var R=void 0;o.SparkColumnRenderer.interfaced(u)?(b="column",R=o.SparkColumnRenderer.CHART_STYLE,!C&&(C=o.SparkColumnRenderer.LAST_STYLE),!w&&(w=o.SparkColumnRenderer.HIGH_STYLE),!x&&(x=o.SparkColumnRenderer.LOW_STYLE)):(b="stacked",R=o.SparkWinLossRenderer.CHART_STYLE);var T=l.getSelectorStyle(p,"."+R);E=new n.Color(T.fill).toHex()}var D=w?l.getSelectorStyle(p,"."+w):void 0,k=x?l.getSelectorStyle(p,"."+x):void 0,M=v?l.getSelectorStyle(p,"."+v):void 0,O=C?l.getSelectorStyle(p,"."+C):void 0,F={type:b,colors:{colorHigh:D&&D.fill?new n.Color(D.fill).toHex():void 0,colorLow:k&&k.fill?new n.Color(k.fill).toHex():void 0,colorFirst:M&&M.fill?new n.Color(M.fill).toHex():void 0,colorLast:O&&O.fill?new n.Color(O.fill).toHex():void 0,colorMarkers:I,colorSeries:E},sparkLines:{},range:y};s.sparkLineGroup=F,this._sparkColumns[h.$_hash]=s}}},t}();Dl.ExportPreparer=h;var u=function(){function t(){}return t.convertNumberFormat=function(t){return t.indexOf(";")>0&&(t=t.split(";")[0]),t.indexOf(".#")>0?t.replace(".#",".0"):t},t.convertDateFormat=function(t){for(var e="",i=t.length,o=0;o=i-1||"H"!=t.charAt(o+1))&&(e+="h");break;case"h":0!=o&&"h"==t.charAt(o-1)||(e+="h");break;case"S":case"T":case"t":case"Z":case"z":case"+":break;case".":case"/":case"-":case" ":(o>=i-1||"S"!=t.charAt(o+1))&&(e=e+"\\"+n);break;default:e=e+'"'+n+'"'}}return e},t}();Dl.ExcelFormatConverter=u;var c=function(){function e(){this._contentTypes={},this._bulkDownload=!0}return _dp(e,"bulkDownload",{get:function(){return this._bulkDownload},set:function(t){this._bulkDownload=t}}),e.prototype.executeDownLoad=function(e,i,o){return t.__awaiter(this,void 0,void 0,(function(){var n,s,a,l,h;return t.__generator(this,(function(t){switch(t.label){case 0:if(n=[],s=Object.keys(i),!this.bulkDownload)return[3,1];for(a=0;a=0?"svg":s.substring(6));var a=r.Utils.find(n,(function(t){return t.indexOf("octet-stream")>=0}));if(!o&&a&&e.byteLength>20){var l=new Uint8Array(e),h=i(l.slice(0,10)),u=i(l.slice(-18));0===h.indexOf("474946")?(o="gif",t="image/gif"):0===h.indexOf("89504e47")?(o="png",t="image/png"):0===h.indexOf("ffd8")&&"ffd9"===u.substr(-4)?(o="jpeg",t="image/jpeg"):0===h.indexOf("424d")&&(o="bmp",t="image/bmp")}return o&&!this._contentTypes.hasOwnProperty(o)&&(this._contentTypes[o]=t),{ext:o,type:t}}},e.prototype.download=function(t){var e=this;return new Promise((function(i,o){var n=new XMLHttpRequest;n.open("GET",t.url),n.onload=function(){if(200===n.status){var o=e.getExtension(n.getResponseHeader("content-type"),n.response),r=o.ext,s=o.type;r?(t.fileName="".concat(t.id,".").concat(r),t.type=s,t.buffer=n.response,i(t)):i(null)}else i(null)},n.onerror=function(){o()},n.responseType="arraybuffer",n.send()}))},e}();return Dl.ImageFileDownLoader=c,Dl.encryptExcelPassword=function(t){var e,i,o=0,n=function(t){for(var e=[],i=t.split(""),o=0;o=0;--s)o=((0==(16384&o)?0:1)|o<<1&32767)^e[s];return(52811^o).toString(16).toUpperCase()},Dl}var Fl,Ll,Pl={},Bl={};function Vl(){if(Ll)return Pl;Ll=1,Object.defineProperty(Pl,"__esModule",{value:!0}),Pl.ExcelWorkbook=Pl.ExcelWorksheet=Pl.ExcelRow=Pl.ExcelColumn=Pl.ExcelWorkbookStyles=Pl.ExcelStyle=Pl.ExcelUtil=void 0;var t=d,e=To(),i=Pe(),o=function(){if(Fl)return Bl;Fl=1,Object.defineProperty(Bl,"__esModule",{value:!0}),Bl.TextXmlManager=void 0;var t=/\<|\>|\&|\"|\'/;function e(e){return t.test(e)?e.replace(/\&/g,"&").replace(/\/g,">").replace(/\"/g,""").replace(/\'/g,"'"):e}var i=function(){function t(){}return t.createDocument=function(t,e){var i={name:t,attrs:{}};for(var o in e)i.attrs[o]=e[o];return i},t.removeItem=function(e){if(e.texts=null,e.attrs=null,e.childs)for(var i=e.childs.length;i--;)t.removeItem(e.childs[i]),delete e.childs[i];e.childs=null},t.addChild=function(i,o,n,r){var s={name:o,attrs:n};return r&&t.addText(s,e(r)),t.addChildElement(i,s),s},t.addChildElement=function(t,e){t.childs||(t.childs=[]),t.childs.push(e)},t.addProperty=function(t,i,o){t.attrs||(t.attrs={}),t.attrs[i]=e(o)},t.addText=function(t,e){t.texts||(t.texts=[]),t.texts.push(e)},t.toString=function(e){var i="<"+e.name;for(var o in e.attrs)i+=" "+o+'="'+e.attrs[o]+'"';if(e.childs||e.texts){if(i+=">",e.texts)for(var n=0,r=e.texts.length;n"}else i+="/>";return i},t.xmlEscape=function(t){return e(t)},t}();return Bl.TextXmlManager=i,Bl}(),n=Ml(),r=Ol(),s=S(),a=C(),l=function(){function t(){}return t.toColCaption=function(t){for(var e="";t>=0;)e=String.fromCharCode(t%26+65)+e,t=Math.floor(t/26)-1;return e},t.toRange=function(e,i,o,n,r){void 0===o&&(o=!1),void 0===n&&(n=1),void 0===r&&(r=1);var s=i+1;return o?t.toColCaption(e)+s+":"+t.toColCaption(e+n-1)+(s+r-1):t.toColCaption(e)+s},t.daysOfYear=function(e){for(var i=0,o=0;o=2){var n=e.getFullYear();(n%400==0||n%4==0&&n%100!=0)&&i++}return i+=e.getDate()},t.daysOfPriorYears=function(t){return t<=1900?0:365*(--t-1899)+(Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400)-460)},t.toExcelDate=function(e){var i=(1e3*(60*(60*e.getHours()+e.getMinutes())+e.getSeconds())+e.getMilliseconds())/t.$$_DAY_MILLISECONDS,o=t.daysOfPriorYears(e.getFullYear())+this.daysOfYear(e)+i;return o>=60&&o++,o},t.XML_HEAD_STRING='',t.$$_DAY_MILLISECONDS=864e5,t.$$_MONTH_DAYS=[31,28,31,30,31,30,31,31,30,31,30],t}();Pl.ExcelUtil=l;var h=function(){function t(){this._nextId=0,this._count=0,this._stringMap={},this._strings=[]}return t.prototype.dispose=function(){for(var t in this._strings=null,this._stringMap)delete this._stringMap[t];this._stringMap=null},_dp(t,"count",{get:function(){return this._count}}),t.prototype.uniqueCount=function(){return this._nextId},t.prototype.add=function(t){this._count++;var e=this._stringMap[t];return void 0===e&&(e=this._nextId++,this._stringMap[t]=e,this._strings[e]=t),e},t.prototype.getIndex=function(t){return this._stringMap[t]},t.prototype.createPart=function(){var t=o.TextXmlManager.createDocument("sst",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"});o.TextXmlManager.addProperty(t,"count",this._count.toString()),o.TextXmlManager.addProperty(t,"uniqueCount",this._nextId.toString());for(var e=/^\s|\s$|\r|\n|\r\n/,i=0,n=this._strings.length;i0?o/.75:-1}return t.prototype.getDrawingInfos=function(){return{col:this.col.toString(),fromColOff:Math.round(this.fromX*t.emu).toString(),row:this.row.toString(),fromRowOff:Math.round(this.fromY*t.emu).toString(),toCol:this.toCol.toString(),toColOff:Math.round(this.colOff*t.emu).toString(),toRow:this.toRow.toString(),toRowOff:Math.round(this.rowOff*t.emu).toString()}},t.prototype.drawPosition=function(t){var e=o.TextXmlManager,i=this.getDrawingInfos(),n=e.addChild(t,"xdr:from");e.addChild(n,"xdr:col",null,i.col),e.addChild(n,"xdr:colOff",null,i.fromColOff),e.addChild(n,"xdr:row",null,i.row),e.addChild(n,"xdr:rowOff",null,i.fromRowOff),n=e.addChild(t,"xdr:to"),e.addChild(n,"xdr:col",null,i.toCol),e.addChild(n,"xdr:colOff",null,i.toColOff),e.addChild(n,"xdr:row",null,i.toRow),e.addChild(n,"xdr:rowOff",null,i.toRowOff)},t.emu=9525,t}(),_=function(e){function i(t,i,o,n,r,s){void 0===s&&(s=!0);var a=e.call(this,t,i,o,n)||this;return a.offset=4,a.xLocation="left",a.yLocation="center",a.transparent=!1,a.text="",a.style=r,a.border=s,a}return t.__extends(i,e),_dp(i,"gradientFill",{get:function(){var t=this.style["background-image"],e="linear-gradient(",i=t?t.indexOf(e):-1;if(i>-1){var o=this.splitEscape(t.slice(i+16,t.length-1));return o.length>2?new n.Color(o[1]).toColorHex():new n.Color(o[0]).toColorHex()}}}),_dp(i,"fill",{get:function(){return new n.Color(this.style.fill||this.style["background-color"],!1).toColorHex()}}),_dp(i,"stroke",{get:function(){return this.style.stroke?new n.Color(this.style.stroke,!1).toColorHex():this.fill}}),i.prototype.splitEscape=function(t,e){if(void 0===e&&(e=","),t){for(var i=[],o=!1,n="",r=0;r=i[o]&&(this.col++,this.fromX-=n),this.fromX+this.width>i[o]&&(this.toCol++,this.colOff-=n);break;case"percent":t>=i[o]&&(this.col++,this.fromX-=n),t+this.width>i[o]&&(this.toCol++,this.colOff-=n);break;case"right":this.fromX>=i[o]&&(this.col++,this.fromX-=n),this.cWidth<=i[o]&&(o>1&&this.toCol++,this.colOff=n-2*this.offset)}}var r=this.cHeights||[];switch(this.yLocation){case"top":case"center":for(o=1;o=r[o]&&(this.row++,this.fromY-=r[o]-r[o-1]),e+this.height>r[o]&&(this.toRow++,this.rowOff-=r[o]-r[o-1]);break;case"bottom":for(o=r.length-1;o>0;o--)this.toRow++,this.rowOff-=r[o]-r[o-1],this.height0&&null!=i&&i>0?(o=i,n=e):null!=e&&e>0?(t=e/n,n=e,o*=t):null!=i&&i>0&&(t=i/o,o=i,n*=t),this.cWidth=this.cWidth<0?o:this.cWidth,this.cHeight=this.cHeight<0?n:this.cHeight,t=1,(this.cWidth=g[m]&&(l++,c-=g[m]-g[m-1]),s+n>g[m]&&(u++,_-=g[m]-g[m-1]);var y=this.cWidths||[];for(m=1;m=y[m]&&(h++,p-=y[m]-y[m-1]),r+o>y[m]&&(d++,f-=y[m]-y[m-1]);this.row=l,this.toRow=u,this.col=h,this.toCol=d,this.fromX=Math.max(1,p),this.fromY=Math.max(1,c),this.colOff=Math.min(f,this.cWidth-1),this.rowOff=Math.min(_,this.cHeight-1)},i.prototype.draw=function(t,e){var i=o.TextXmlManager;if(this.eImage&&this.eImage.fileName){this.imageWidth=this.eImage.width,this.imageHeight=this.eImage.height,this.calcPosition();var n=i.addChild(t,"xdr:twoCellAnchor",{editAs:"oneCell"});this.drawPosition(n);var r=i.addChild(n,"xdr:pic"),s=i.addChild(r,"xdr:nvPicPr");i.addChild(s,"xdr:cNvPr",{id:e+2,name:"picture "+e});var a=i.addChild(s,"xdr:cNvPicPr");i.addChild(a,"a:picLocks",{noChangeAspect:"1"});var l=i.addChild(r,"xdr:blipFill"),h=i.addChild(l,"a:blip",{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:embed":"rId"+this.imageIndex}),u=i.addChild(h,"a:extLst"),d=i.addChild(u,"a:ext",{uri:"{28A0092B-C50C-407E-A947-70E740481C1C}"});i.addChild(d,"a14:useLocalDpi",{"xmlns:a14":"http://schemas.microsoft.com/office/drawing/2010/main",val:"0"}),i.addChild(i.addChild(l,"a:stretch"),"a:fillRect");var c=i.addChild(r,"xdr:spPr"),p=i.addChild(c,"a:xfrm");i.addChild(p,"a:off",{x:"1",y:"1"}),i.addChild(p,"a:ext",{cx:"1181100",cy:"1189663"}),i.addChild(i.addChild(c,"a:prstGeom",{prst:"rect"}),"a:avLst"),i.addChild(n,"xdr:clientData")}},i}(p),g=function(){function t(t,e,i){this._infos=[],this._book=t,this._sheet=e,this._index=i}return t.prototype.dispose=function(){return null},_dp(t,"fileName",{get:function(){return"drawing"+this._index+".xml"}}),_dp(t,"relationId",{get:function(){return"rId"+this._rId}}),_dp(t,"rId",{set:function(t){this._rId=t}}),t.prototype.createPart=function(){for(var t=o.TextXmlManager.createDocument("xdr:wsDr",{"xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"}),e=this._infos,i=0;i0)){a=-1,s=[];break}s.push(a+=c._height/.75)}for(var p=r.col;p0?this._infos.push(d,c,p):this._infos.push(d,p)},t.prototype.addBar=function(t,i,o,n,r,s,a,l,h,u){var d=new _(t,i,o,n,a.barStyle,!1),c=new _(t,i,o,n,{},!1),p=u-h||1,f=Math.min(100,(r-h)/p*100);if(isNaN(l)){switch(s){case e.BarOrigin.LEFT:case e.BarOrigin.TOP:d.xLocation="left";break;case e.BarOrigin.RIGHT:case e.BarOrigin.BOTTOM:d.xLocation="right"}d.percentageWidth=Math.max(1,f)+"%",c.xLocation="left",c.percentageWidth="100%"}else d.xLocation="percent",r0||r=0?e:this._authors.push(t)-1},t.prototype.addMemo=function(t,e,i){for(var n=this.addAuthor(i.author),r=this.getMemoWidth(i),s=t+1,a=s,h=r,u=0;h>0;){var d=7*this._sheet.getColumnWidth(a);if(h+15<=d){u=h+15;break}h-=d,a++}var c=7*this._sheet.getColumnWidth(a),p=Math.round(u/c*1024),_='
').concat(s,", 15, ").concat(e>0?e-1:0,", 8, ").concat(a,", ").concat(p,", ").concat(e+2,", 17False").concat(e,"").concat(t,"
");this._vmlText.push(_);var f='').concat(i.authorVisible?''.concat(this._authors[n],':\n'):"",'').concat(o.TextXmlManager.xmlEscape(i.message),"");this._memoText.push(f)},t.prototype.getMemoWidth=function(t){var e=this,i=t.message,o=Math.ceil((t.fontSize||10)*(96/72))+"px";this._ctx.font=o+" Malgun Gothic";var n=i.split("\n"),r=0;if(n.forEach((function(t){r=Math.max(r,e._ctx.measureText(t).width)})),t.authorVisible&&t.author){this._ctx.font="bold ".concat(o," Malgun Gothic");var s=this._ctx.measureText(t.author).width;r=Math.max(r,s)}return Math.max(t.minWidth,Math.min(Math.ceil(r+6),t.maxWidth))},t.prototype.createSheetRel=function(){var t=o.TextXmlManager.createDocument("Relationships",{xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"}),e=o.TextXmlManager.addChild(t,"Relationship",{Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments"});o.TextXmlManager.addProperty(e,"Id","rId"+this.rId),o.TextXmlManager.addProperty(e,"Target","../"+this.fileName),e=o.TextXmlManager.addChild(t,"Relationship",{Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing"}),o.TextXmlManager.addProperty(e,"Id",this.vmlId),o.TextXmlManager.addProperty(e,"Target","../drawings/vmlDrawing1.vml");var i=o.TextXmlManager.toString(t);return l.XML_HEAD_STRING+i},t.prototype.createPart=function(){return''.concat(this._authors.map((function(t){return"".concat(t,"")})).join(""),"").concat(this._memoText.join(""),"")},t.prototype.createVmlPart=function(){return''.concat(this._vmlText.join(""),"")},t}(),y=function(){function t(t){this._id=t}return t.EqualsById=function(t,e){return!t&&!e||!(!t&&e||t&&!e)&&t._id==e.id},_dp(t,"id",{get:function(){return this._id}}),t.prototype.dispose=function(){},t}(),v=function(){function t(){this._items=[],this._indexer=0}return t.prototype.dispose=function(){for(var t=this._items.length;t--;)this._items[t].dispose();this._items=null},t.prototype.getIndexer=function(){return this._indexer++},t.prototype.create=function(){for(var t,e=[],i=0;i-1&&(e=e.split(",")[0]),e=e.replace(/\"/g,"")):e=void 0;var i=this.$_convertUnit(t["font-size"]);i=isNaN(i)?void 0:72*i/96;var o=t.color;o&&(o="#"==o.charAt(0)?t.color:new n.Color(o).toColorHex());var r="bold"==t["font-weight"],s="italic"==t["font-style"],a=t["text-decoration-line"],l=!!a&&a.indexOf("underline")>=0,h=!!a&&a.indexOf("line-through")>=0,u="double"===t["text-decoration-style"];return this.create(e,i,o,r,s,l,h,u)},o.prototype.toXml=function(t,e){for(var o=this._items.length,n=0;n0?parseFloat(t):t.indexOf("pt")>0?Math.round(1.3333*parseFloat(t)):t.indexOf("em")>0?parseFloat(t)*this._defFontSize:12:parseInt(t)},o}(v),b=function(e){function o(t,i,o,n,r,s,a){void 0===i&&(i="solid"),void 0===n&&(n=0),void 0===r&&(r=!1),void 0===a&&(a=90);var l=e.call(this,t)||this;return l._pattern=i,l._color=o,l._linear=r,l._color2=s,l._degree=a,l._tint=n,l}return t.__extends(o,e),o.prototype.assignFrom=function(t){this._pattern=t._pattern||this._pattern,this._color=t._color||this._color,this._tint=t._tint||this._tint,this._linear=null==t._linear?this._linear:t._linear,this._color2=t._color2||this._color2,this._degree=t._degree||this._degree},o.prototype.equalsObj=function(t){return this._pattern==t._pattern&&this._color==t._color&&this._color2==t._color2&&this._linear==t._linear&&this._degree==t._degree&&this._tint==t._tint},o.prototype.equals=function(t,e,i,o,n,r){return void 0===t&&(t="solid"),void 0===i&&(i=0),void 0===o&&(o=!1),void 0===r&&(r=90),this._pattern==t&&this._color==e&&this._color2==n&&this._linear==o&&this._degree==r&&this._tint==i},o.prototype.toXml=function(t,e){var o,n=this._tint||0;if(this._linear){var r=i.XmlUtils.addChildWithAttr(t,e,"gradientFill","degree",this._degree||90),s=i.XmlUtils.addChildWithAttr(t,r,"stop","position","0");o=i.XmlUtils.addChild(t,s,"color"),i.XmlUtils.setAttr(o,"rgb",this._color),i.XmlUtils.setAttr(o,"tint",this._tint||0),s=i.XmlUtils.addChildWithAttr(t,r,"stop","position","1"),o=i.XmlUtils.addChild(t,s,"color"),i.XmlUtils.setAttr(o,"rgb",this._color2),i.XmlUtils.setAttr(o,"tint",n)}else{var a=i.XmlUtils.addChildWithAttr(t,e,"patternFill","patternType",this._pattern.toString());"none"!=this._pattern&&null!=this._color&&(o=i.XmlUtils.addChild(t,a,"fgColor"),i.XmlUtils.setAttr(o,"rgb",this._color),i.XmlUtils.setAttr(o,"tint",n))}},o}(y),I=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(o,e),o.prototype.createInstance=function(t,e,i,o,n,r){return new b(this.getIndexer(),t,e,i,o,n,r)},o.prototype.createFromCss=function(t){var e=t["background-image"],i="linear-gradient(",o=e?e.indexOf(i):-1;if(o>-1){var r=this._splitEscape(e.slice(o+16,e.length-1)),s=void 0,a=void 0,l=void 0;r.length>2?(s=new n.Color(r[1]),a=new n.Color(r[2]),l=parseInt(r[0])):(s=new n.Color(r[0]),a=new n.Color(r[1]),l=180),l=(l+270)%360;var h=1-s._a;return this.create("none",s.toHex(),h,!0,a.toHex(),l)}if(t["background-color"]){var u=new n.Color(t["background-color"]);h=1-u._a;return u?this.create("solid",u.toHex(),h):this._items[0]}},o.prototype.toXml=function(t,e){for(var o=this._items.length,n=0;n0){var n=i.XmlUtils.addChild(e,o,"numFmts");this._createNumberFormats(e,n)}var r=i.XmlUtils.addChild(e,o,"fonts");this._createFonts(e,r);var s=i.XmlUtils.addChild(e,o,"fills");this._createFills(e,s);var a=i.XmlUtils.addChild(e,o,"borders");this._createBorders(e,a);var h=i.XmlUtils.addChild(e,o,"cellStyleXfs");this._createDefXfs(e,h);var u=i.XmlUtils.addChild(e,o,"cellXfs");return this._createStyles(e,u),t=i.XmlUtils.toString(e),l.XML_HEAD_STRING+t},t.prototype._createNumberFormats=function(e,o){for(var n=0,r=this._numberFmts.length;n"),this._fomula&&e.push("".concat(this._fomula,"")),null!=this._value&&e.push("".concat(this._value,"")),e.push(""),e.join("")},t.ELEMENT_NAME="c",t}(),B=function(){function t(t,e,i){this._row=0,this._sheet=t,this._book=t.workbook,this._index=e,this._height=i,this._cells=[]}return _dp(t,"outLineLevel",{get:function(){return this._outlineLevel},set:function(t){this._outlineLevel=t}}),_dp(t,"index",{get:function(){return this._index}}),t.prototype.dispose=function(){for(var t=this._cells.length;t--;)this._cells[t].dispose(),this._cells[t]=null;this._cells=null},t.prototype.toXmlText=function(){var e=[];e.push("<"+t.ELEMENT_NAME),e.push(' r="'.concat(this._index+1,'"')),this._height&&this._height>-1&&(e.push(' ht="'.concat(this._height,'"')),e.push(' customHeight="1"')),null!=this._outlineLevel&&e.push(' outlineLevel="'.concat(this._outlineLevel,'"')),e.push(">");for(var i=0,o=this._cells.length;i"),e.join("")},t.prototype.borrowCell=function(t,e,i,o,n,r){void 0===o&&(o="");var s=this._cells[t];r&&(e=s.style),s&&s.dispose(),s=new P(this._index,t,e,i,o,n),this._cells[t]=s},t.prototype.addBlank=function(t,e,i){this.borrowCell(t,e,void 0,"",void 0,i)},t.prototype.addCell=function(t,e,i,o,n){this.borrowCell(t,o,i,e,n)},t.prototype.addText=function(t,e,i){var o=null!=e?String(e):"",n=this._book.addSharedString(o);this.addCell(t,"s",n,i)},t.prototype.addNumber=function(t,e,i,o){var n=isNaN(e)||null==e?"":String(e);this.addCell(t,"n",n,i,o)},t.prototype.addBool=function(t,e,i){this.addCell(t,"b",null==e?"":e?1:0,i)},t.prototype.addDate=function(t,e,i){if(e){var o=l.toExcelDate(e);this.addNumber(t,o,i)}else this.addCell(t,"s","",i)},t.prototype.addLink=function(t,e,i,o){if(i&&""!=i){var n=document.createElement("div");n.innerText=n.textContent=i,i=n.innerHTML.replace(/(
|)/gi," "),n.innerText=n.textContent=e,i='HYPERLINK("'+i+((e=n.innerHTML.replace(/(
|)/gi,"\r\n"))?'","'+e+'")':'")'),this.addCell(t,"str",e,o,i)}else this.addText(t,e,o)},t.prototype.addImage=function(t,e,i,o,n,r,s,l){if(n)return e&&o!==a.IconLocation.CENTER?this.addText(t,e,r):this.addBlank(t,r),this._sheet.addImage(t,this._index,i,this._height,o,n,s,l);e?this.addText(t,e,r):this.addBlank(t,r)},t.prototype.addActualTarget=function(t,e,i,o,n,r,s){this.addBlank(t,s),this._sheet.addActualTarget(t,this._index,i,this._height,e,n,r,o)},t.prototype.addBar=function(t,e,i,o,n,r,s,a,l){this.addBlank(t,l),this._sheet.addBar(t,this._index,i,this._height,e,o,n,r,s,a)},t.prototype.addSignal=function(t,e,i,o,n,r,s,a,l,h){this.addBlank(t,h),this._sheet.addSignal(t,this._index,i,this._height,e,o,n,r,s,a,l)},t.prototype.addSparkLine=function(t,e,i,o){var n=i.layout.firstColumn,r=this._sheet,s=this._index,a=r.borrowSparkGroup(n.index,i.sparkLineGroup),h=a.range.start,u=a.range.end-h+1,d=a.range.row;d=null==d?0:d;var c=a.sparkLines,p="'".concat(r.name,"'!").concat(l.toRange(e+h,s+d,!0,u));c[l.toRange(t,this._index)]=p,this.addBlank(t,o)},t.ELEMENT_NAME="row",t.LINE_REGEX=/\r|\n|\r\n/,t.BR_REGEX=/
|/,t}();Pl.ExcelRow=B;var V=function(){function t(t,e,i,o){this._mergeCount=0,this._outlineLevel=0,this._dataRows=[],this._sparkGroups={},this._firstRow=-1,this._firstCol=-1,this._lastRow=-1,this._fixedCol=0,this._fixedRow=0,this._relation_indexer=1,this._mergeInfos={},this._book=t,this._index=e,this._name=i,this._attrs=o.sheetAttrs,this._protectPassword=o.protectPassword,this._protectProperties=o.protectProperties,this._sheetProtect=o.sheetProtect,this._outlineSummaryBelow=o.outlineSummaryBelow,this._outlineSummaryRight=o.outlineSummaryRight,this._columns=new L,this._prepare()}return t.prototype.dispose=function(){this._txmerge=null,o.TextXmlManager.removeItem(this._txdoc),this._txdoc=null,this._columns=null,this.clearRows(),this._dataRows=null,this._borderEdges=null},_dp(t,"id",{get:function(){return t.RELATION_ID+this._index}}),_dp(t,"name",{get:function(){return this._name}}),_dp(t,"colCount",{get:function(){return this._columns.count}}),_dp(t,"rowCount",{get:function(){return this._dataRows.length}}),_dp(t,"workbook",{get:function(){return this._book}}),_dp(t,"drawing",{get:function(){return this._drawing}}),_dp(t,"memo",{get:function(){return this._memo}}),t.prototype.setFirstRow=function(t){this._firstRow<0&&(this._firstRow=t)},t.prototype.setLastRow=function(t){this._lastRow=Math.max(this._lastRow,t)},t.prototype.setFirstCol=function(t){this._firstCol<0&&(this._firstCol=t)},t.prototype.clearRows=function(){for(var t=this._dataRows.length;t--;)this._dataRows[t].dispose(),this._dataRows[t]=null;this._dataRows=[]},t.prototype.addColumn=function(t,e,i,o,n){return this._columns.createUnique(t,e,i,o,n)},t.prototype.getColumn=function(t){return this._columns.getColumn(t)},t.prototype.getColumnWidth=function(t){return this._columns.getWidth(t)},t.prototype.getMergeInfo=function(t,e){return this._mergeInfos["".concat(t,":").concat(e)]},t.prototype.addRow=function(t,e){return this._dataRows[t]=new B(this,t,e)},t.prototype.getRow=function(t){return this._dataRows[t]},t.prototype.borrowRow=function(t,e){return this._dataRows[t]||this.addRow(t,e)},t.prototype.borrowSparkGroup=function(t,e){return this._sparkGroups[t]||(this._sparkGroups[t]=e),this._sparkGroups[t]},t.prototype.setRowLevel=function(t,e){if(e>=0){var i=this._dataRows[t];i&&(i.outLineLevel=e,this._outlineLevel=Math.max(e,this._outlineLevel))}},t.prototype.addMerge=function(t,e,i,o){if(i>1||o>1){var n=l.toRange(e,t,!0,o,i);this._mergeInfos["".concat(t,":").concat(e)]={row:t,rows:i,col:e,cols:o,range:n}}},t.prototype.createPart=function(){var t=this._txdoc,e="A1:"+l.toRange(this._columns.count-1,this._dataRows.length-1);if(this._outlineLevel>0){var i=o.TextXmlManager.addChild(t,"sheetPr");o.TextXmlManager.addChild(i,"outlinePr",{summaryBelow:this._outlineSummaryBelow,summaryRight:this._outlineSummaryRight}),o.TextXmlManager.addChild(t,"sheetFormatPtr",{outlineLevelRow:this._outlineLevel})}o.TextXmlManager.addChild(t,"dimension",{ref:e});var n=o.TextXmlManager.addChild(t,"sheetViews"),a={workbookViewId:0,showOutlineSymbols:"true"};this._attrs&&s.Utils.extendObj(this._attrs,a),0==this._book.count&&(a.tabSelected=1);var h=o.TextXmlManager.addChild(n,"sheetView",a);(this._fixedCol>0||this._fixedRow>0)&&o.TextXmlManager.addChild(h,"pane",{xSplit:this._fixedCol,ySplit:this._fixedRow,topLeftCell:l.toRange(this._fixedCol,this._fixedRow),activePane:"bottomRight",state:"frozen"}),this._columns&&this._columns.toTextXml(t);for(var u=o.TextXmlManager.addChild(t,"sheetData"),d=this._dataRows,c=this._borderEdges,p=0,_=d.length;p<_;p++){if(p==this._firstRow){for(var f=0,g=Math.max(0,this._firstCol);gthis._firstRow&&p0){for(var w in o.TextXmlManager.addProperty(this._txmerge,"count",this._mergeCount+""),this._mergeInfos)o.TextXmlManager.addChild(this._txmerge,"mergeCell",{ref:this._mergeInfos[w].range});o.TextXmlManager.addChildElement(this._txdoc,this._txmerge)}if(this._drawing&&o.TextXmlManager.addChild(t,"drawing",{"r:id":this._drawing.relationId}),Object.keys(this._sparkGroups).length>0){var x=o.TextXmlManager.addChild(t,"extLst"),b=o.TextXmlManager.addChild(x,"ext",{uri:"{05C60535-1F16-4fd2-B633-F4F36F0B64E0}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),I=o.TextXmlManager.addChild(b,"x14:sparklineGroups",{"xmlns:xm":"http://schemas.microsoft.com/office/excel/2006/main"});for(var p in this._sparkGroups){var E=this._sparkGroups[p],S=E.colors,R=E.sparkLines,T=o.TextXmlManager.addChild(I,"x14:sparklineGroup",{type:E.type||"line"});S.colorSeries&&o.TextXmlManager.addChild(T,"x14:colorSeries",{rgb:S.colorSeries}),S.colorMarkers&&(o.TextXmlManager.addProperty(T,"markers","1"),o.TextXmlManager.addChild(T,"x14:colorMarkers",{rgb:S.colorMarkers})),S.colorFirst&&(o.TextXmlManager.addProperty(T,"first","1"),o.TextXmlManager.addChild(T,"x14:colorFirst",{rgb:S.colorFirst})),S.colorLast&&(o.TextXmlManager.addProperty(T,"last","1"),o.TextXmlManager.addChild(T,"x14:colorLast",{rgb:S.colorLast})),S.colorHigh&&(o.TextXmlManager.addProperty(T,"high","1"),o.TextXmlManager.addChild(T,"x14:colorHigh",{rgb:S.colorHigh})),S.colorLow&&(o.TextXmlManager.addProperty(T,"low","1"),o.TextXmlManager.addChild(T,"x14:colorLow",{rgb:S.colorLow}));var D=o.TextXmlManager.addChild(T,"x14:sparklines");for(var k in R){var M=o.TextXmlManager.addChild(D,"x14:sparkline");o.TextXmlManager.addChild(M,"xm:f",void 0,R[k]),o.TextXmlManager.addChild(M,"xm:sqref",void 0,k)}}}return this._memo&&o.TextXmlManager.addChild(t,"legacyDrawing",{"r:id":this._memo.vmlId}),l.XML_HEAD_STRING+o.TextXmlManager.toString(t)},t.prototype.createBorderEdges=function(t){function e(e){var i={};return e.forEach((function(e){i["border-".concat(e,"-style")]=t["border-".concat(e,"-style")],i["border-".concat(e,"-color")]=t["border-".concat(e,"-color")],i["border-".concat(e,"-width")]=t["border-".concat(e,"-width")]})),this._book._styles._borders.createFromCss(i)||{}}t&&(this._borderEdges={leftTop:e.call(this,["left","top"]),top:e.call(this,["top"]),rightTop:e.call(this,["right","top"]),left:e.call(this,["left"]),right:e.call(this,["right"]),leftBottom:e.call(this,["left","bottom"]),bottom:e.call(this,["bottom"]),rightBottom:e.call(this,["right","bottom"])})},t.prototype.setFixedInfo=function(t,e){this._fixedRow=null==t?this._fixedRow:Math.max(this._fixedRow,t),this._fixedCol=null==e?this._fixedCol:Math.max(this._fixedCol,e)},t.prototype.addImage=function(t,e,i,o,n,r,s,a){this._createDrawing();var l=this._book.addImage(r);return this._drawing.addImage(t,e,i,o,n,l,s,a)},t.prototype.addActualTarget=function(t,e,i,o,n,r,s,a){this._createDrawing(),this._drawing.addActualTarget(t,e,i,o,n,r,s,a)},t.prototype.addBar=function(t,e,i,o,n,r,s,a,l,h){this._createDrawing(),this._drawing.addBar(t,e,i,o,n,r,s,a,l,h)},t.prototype.addSignal=function(t,e,i,o,n,r,s,a,l,h,u){this._createDrawing(),this._drawing.addSignal(t,e,i,o,n,r,s,a,l,h,u)},t.prototype.addMemo=function(t,e,i){this._createMemo(),this._memo.addMemo(t,e,i)},t.prototype._prepare=function(){this._txdoc=o.TextXmlManager.createDocument("worksheet",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships"}),this._txmerge=o.TextXmlManager.createDocument("mergeCells")},t.prototype._createDrawing=function(){void 0===this._drawing&&(this._drawing=this._book.createDrawing(this),this._drawing.rId=this._relation_indexer++)},t.prototype._createMemo=function(){void 0===this._memo&&(this._memo=this._book.createMemo(this),this._memo.rId=this._relation_indexer++,this._memo.vId=this._relation_indexer++)},t.RELATION_ID="rId",t}();Pl.ExcelWorksheet=V;var A=function(){function t(t){this._sheet_indexer=3,this._drawing_indexer=1,this._comments_indexer=1,this._parts={},this._parts={},this._strings=new h,this._images=new c,this._styles=new O(t),this._downloader=new r.ImageFileDownLoader,this._sheets=[],this._drawings=[],this._memos=[],this._preapreTemplateParts()}return t.prototype.dispose=function(){this._parts={},this._strings.dispose(),this._strings=null,this._styles.dispose(),this._styles=null,this._drawings.forEach((function(t){t.dispose()})),this._drawings=null,this._memos.forEach((function(t){t.dispose()})),this._memos=null,this._sheets.forEach((function(t){t.dispose()})),this._sheets=null},_dp(t,"currentSheet",{get:function(){return this._currentSheet}}),_dp(t,"count",{get:function(){return this._sheets?this._sheets.length:0}}),_dp(t,"styles",{get:function(){return this._styles}}),_dp(t,"downloader",{get:function(){return this._downloader}}),_dp(t,"hasImage",{get:function(){return this._images._images.length>0}}),t.prototype.createSheet=function(t,e){var i=new V(this,this._sheet_indexer++,t||"Sheet"+(this._sheets.length+1),e);return this._sheets.push(i),this._currentSheet=i,i},t.prototype.createDrawing=function(t){var e=new g(this,t,this._drawing_indexer++);return this._drawings.push(e),e},t.prototype.createMemo=function(t){var e=new m(t,this._comments_indexer++);return this._memos.push(e),e},t.prototype.addSharedString=function(t){return this._strings.add(t)},t.prototype.addImage=function(t){return this._images.add(t)},t.prototype.getImageMap=function(){return this._images.getImageMap()},t.prototype.getExcelImage=function(t){return this._images.getImage(t)},t.prototype.getImageIndex=function(t){return this._images.getImageId(t)},t.prototype.addNumberFormat=function(t){return this._styles.addNumberFormat(t)},t.prototype.addStyle=function(t,e,i,o,n,r){if(null==n){var s=t.whiteSpace||t["white-space"]||t["text-wrap-mode"];n=null!=s&&"none"!==s&&"nowrap"!==s}return this._styles.addStyle(t,e,i,o,n,r)},t.prototype.changeFormatId=function(t,e){return this._styles.changeFormatId(t,e)},t.prototype.changeBorderId=function(t,e){return this._styles.changeBorder(t,e)},t.prototype.extendStyle=function(t,e,i,o,n){return this._styles.extendStyle(t,e,i,o,n)},t.prototype.createParts=function(){var t=this._parts,e=o.TextXmlManager.createDocument("Types",{xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"});if(o.TextXmlManager.addChild(e,"Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),this._memos.length>0&&o.TextXmlManager.addChild(e,"Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),o.TextXmlManager.addChild(e,"Default",{Extension:"xml",ContentType:"application/xml"}),o.TextXmlManager.addChild(e,"Override",{PartName:"/docProps/app.xml",ContentType:"application/vnd.openxmlformats-officedocument.extended-properties+xml"}),o.TextXmlManager.addChild(e,"Override",{PartName:"/docProps/core.xml",ContentType:"application/vnd.openxmlformats-package.core-properties+xml"}),o.TextXmlManager.addChild(e,"Override",{PartName:"/xl/sharedStrings.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"}),o.TextXmlManager.addChild(e,"Override",{PartName:"/xl/styles.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"}),o.TextXmlManager.addChild(e,"Override",{PartName:"/xl/workbook.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"}),this._drawings.length>0){for(var i="application/vnd.openxmlformats-officedocument.drawing+xml",n=0;n0)for(i="application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml",n=0;n'+e+"",t)if("created"!==n){var r=("keywords"==n||"category"==n?"cp:":"dc:")+n;this._parts["docProps/core.xml"]+="<"+r+">"+o.TextXmlManager.xmlEscape(t[n])+""}this._parts["docProps/core.xml"]+=""},t.prototype._preapreTemplateParts=function(){var t=this._parts,e=l.XML_HEAD_STRING;t["_rels/.rels"]=e+'',t["docProps/app.xml"]=e+'RealGrid2.0'},t}();return Pl.ExcelWorkbook=A,Pl}var Al,Nl={},$l={};function Ul(){if(Al)return $l;Al=1,Object.defineProperty($l,"__esModule",{value:!0}),$l.GridItemProvider=void 0;var t=d,e=ji(),i=C(),o=Ho(),n=Ro(),r=qo(),s=function(e){function s(t,s){void 0===s&&(s=null);var a=e.call(this,null,t)||this;return a._groupSorting=!0,a._groupSortDirection=i.SortDirection.ASCENDING,a._groupSortCase=i.SortCase.SENSITIVE,a.source=a._rs=new o.DefaultItemProvider(!1),a._groupedProvider=new n.GroupedItemProvider(a._rs,!1),a._groupedProvider.footerCounter=s,a._summarizer=new r.DefaultSummarizer(a._rs),a}return t.__extends(s,e),s.prototype._doDispose=function(){this.clearListener(),this._rs&&this._rs.dispose(),this._rs=null,this._groupedProvider&&this._groupedProvider.dispose(),this._groupedProvider=null,this._summarizer&&this._summarizer.dispose(),this._summarizer=null,e.prototype._doDispose.call(this)},_dp(s,"maxRowCount",{get:function(){return this._rs.maxItemCount},set:function(t){this._rs.maxItemCount=Math.max(0,t)}}),_dp(s,"hideDeleted",{get:function(){return this._rs.hideDeleted},set:function(t){this._rs.hideDeleted=t}}),_dp(s,"inclusiveFiltering",{get:function(){return this._rs.isFilterOr},set:function(t){this._rs.isFilterOr=t}}),_dp(s,"summaryMode",{get:function(){return this._rs.summaryMode},set:function(t){this._rs.summaryMode=t}}),_dp(s,"groupSummaryMode",{get:function(){return this._groupedProvider.summaryMode},set:function(t){this._groupedProvider.summaryMode=t}}),_dp(s,"sortMode",{get:function(){return this._rs.sortMode},set:function(t){this._rs.sortMode=t}}),_dp(s,"filterMode",{get:function(){return this._rs.filterMode},set:function(t){this._rs.filterMode=t}}),_dp(s,"grouped",{get:function(){return this._groupedProvider.grouped}}),_dp(s,"mergedGrouped",{get:function(){return this._groupedProvider.grouped&&this._groupedProvider.mergeMode}}),_dp(s,"groupLevels",{get:function(){return this._groupedProvider.groupCount}}),_dp(s,"groupByFieldCount",{get:function(){return this._groupedProvider.groupCount}}),_dp(s,"groupByFields",{get:function(){return this._groupedProvider.groupedFields}}),_dp(s,"expandWhenGrouping",{set:function(t){this._groupedProvider.expandWhenGrouping=t}}),_dp(s,"summarizer",{get:function(){return this._summarizer}}),s.prototype.canGrouping=function(t){return this.source.canGrouping(t)},s.prototype.getFieldDomain=function(t){return this._rs.getFieldDomain(t)},s.prototype.isFiltered=function(t){return null!=t?this._rs.hasFilter(t):this._rs.hasFilters()},s.prototype.addFilter=function(t,e){this._rs.addFilter(t,e)},s.prototype.clearAllFilters=function(){this._rs.clearAllFilters()},s.prototype.beginFiltering=function(){this._rs.beginFilter()},s.prototype.endFiltering=function(t,e,i){this._rs.endFilter(!0,t,e,i)},s.prototype.setHideDeletedRows=function(t){this._rs.hideDeleted=t},s.prototype.orderBy=function(t,e,o){if(this._groupedProvider.grouped&&this._groupSorting){for(var n=e?e.length:0,r=o?o.length:0,s=this._groupedProvider.groupedFields,a=this._rs.getSortDirections(),l=this._rs.getSortCases(),h=[],u=0,d=s.length;uu?e[u]:n>0?e[n-1]:i.SortDirection.ASCENDING,f=r>u?o[u]:r>0?o[r-1]:i.SortCase.SENSITIVE,p<0?(h.push(c),a[h.length-1]=_,l[h.length-1]=f):(a[p]=_,l[p]=f)}s=h,this._rs.orderBy(s,a,l)}else this._rs.orderBy(t,e,o)},s.prototype.getSortFields=function(){return this._rs.getSortFields()},s.prototype.getSortDirections=function(){return this._rs.getSortDirections()},s.prototype.getSortCases=function(){return this._rs.getSortCases()},s.prototype.setLabelComparer=function(t){this._rs.labelComparer=t},s.prototype.groupBy=function(t,e,o,n){void 0===e&&(e=!0),void 0===o&&(o=i.SortDirection.ASCENDING),void 0===n&&(n=i.SortCase.SENSITIVE),(t&&!(t.length<1)||this._groupedProvider.grouped)&&this.canGrouping(t)&&(this._groupSorting=e,this._groupSortDirection=o,e&&this._rs.orderBy(t,[o],[n],!1),this.$_groupBy(t))},s.prototype.groupByMode=function(t,e){if(t&&t.length>0){if(this._groupSorting&&this._rs.orderBy(t,[this._groupSortDirection],[this._groupSortCase],!1),!this.canGrouping(t))return;this._groupedProvider.groupByMode(t,e)}else null!=e&&(this._groupedProvider._mergeMode=e)},s.prototype.$_groupBy=function(t,e){t&&t.length>0?(this.source=this._groupedProvider,this._groupedProvider.groupByMode(t,e)):(this._groupedProvider.groupByMode(t,e),this.source=this._rs)},s.prototype.addGroupBy=function(t,e,i){var o;if(this._groupedProvider.groupCount<1?o=[e]:(o=this._groupedProvider.groupedFields).splice(t,0,e),this._groupSorting=0===t?i:this._groupSorting,this.canGrouping(o)){if(this._groupSorting){var n=[this._groupSortDirection];this._rs.orderBy(o,n,null,!1)}this.$_groupBy(o)}},s.prototype.removeGroupBy=function(t,e){if(this._groupedProvider.grouped){for(var i=this._groupedProvider.groupedFields,o=-1,n=0,r=i.length-1;r>=0;r--)if(n++,i[r]==t){o=r;break}if(o>=0){if(i.splice(o,e?n:1),!this.canGrouping(i))return;this._groupSorting&&this._rs.orderBy(i,[this._groupSortDirection],null,!1),this.$_groupBy(i)}else{if(!this.canGrouping(null))return;this._groupSorting&&this._rs.orderBy(null,null,null,!1)}}},s.prototype.isGroupedField=function(t){return this._groupedProvider.isGroupedField(t)},s.prototype.getGroupLevel=function(t){return this._groupedProvider.getGroupLevel(t)},s.prototype.expand=function(t,e,i,o){this._groupedProvider.expand(t,e,i,o)},s.prototype.collapse=function(t,e,i,o){this._groupedProvider.collapse(t,e,i,o)},s.prototype.collapseAll=function(t){this._groupedProvider.collapseAll(t)},s.prototype.expandAll=function(t,e){this._groupedProvider.expandAll(t,e)},s.prototype.setPaging=function(t,e,i,o){this._rs.setPaging(t,e,i,o)},_dp(s,"page",{get:function(){return this._rs.page}}),s.prototype.setPage=function(t,e){this._rs.setPage(t,e)},_dp(s,"pageCount",{get:function(){return this._rs.pageCount},set:function(t){this._rs.pageCount=t}}),s.prototype.getPageOfDataRow=function(t){return this._rs.getPageOfDataRow(t)},s.prototype.getDisplayItemIndex=function(t){return this._rs.isPaging?t.index+this._rs.pageStartIndex:t.index},s.prototype.getCheckedRows=function(t){return this._rs.getCheckedRows(t)},_dp(s,"checkableExpression",{set:function(t){this._rs.checkableExpression=t}}),_dp(s,"checkableCallback",{set:function(t){this._rs.checkableCallback=t}}),s.prototype.resetCheckables=function(){this._rs.resetCheckables()},s.prototype.applyCheckables=function(){this._rs.applyCheckables()},s.prototype.getFirstRow=function(){if(this.itemCount>0)return this._groupedProvider.grouped?this._groupedProvider.getFirstRow():this._rs.getItem(0)},s.prototype.getLastRow=function(){if(this.itemCount>0)return this._groupedProvider.grouped?this._groupedProvider.getLastRow():this._rs.getItem(this._rs.itemCount-1)},s.prototype.getPrevRow=function(t){if(this.itemCount>0)return this._groupedProvider.grouped?this._groupedProvider.getPrevRow(t):t&&t.index>0?this._rs.getItem(t.index-1):this._rs.getItem(0)},s.prototype.getNextRow=function(t){if(this.itemCount>0)return this._groupedProvider.grouped?this._groupedProvider.getNextRow(t):t&&t.index0)for(var i=this.width/this._levels,o=0;oe;)this.removeLast()},i.prototype._doRender=function(t){},i.prototype._getCellCount=function(t){return this._levels},i.prototype._getCellWidth=function(t,e){return this._cells[e].width},i}(i.SimpleTableElement),x=function(e){function i(t){return e.call(this,t,"rowGroupHeadView")||this}return t.__extends(i,e),i.prototype._getCssSelector=function(){return"rg-rowgroup-head"},i.prototype._getTableRowHeight=function(t,e){var i=this.grid,o=[];return i.header.visible&&o.push(t.headBounds.height),i.filterPanel.visible&&o.push(t.filterPanelBounds.height),i.headerSummaries.visible&&o.push(t.sumBounds.height),o[e]||0},i.prototype.$_createCell=function(){return new v(this.doc,"rowGroupHeadCellView")},i.prototype._getTableRowCount=function(t){var e=this.grid,i=0;return e.header.visible&&i++,e.filterPanel.visible&&i++,e.headerSummaries.isVisible()&&i++,i},i.prototype.$_getRowClassName=function(t){var e=this.grid,i=[];return e.header.visible&&i.push(""),e.filterPanel.visible&&i.push("rg-rowgroup-filter-panel"),e.headerSummaries.isVisible()&&i.push("rg-rowgroup-summary"),i[t]||""},i}(w);Wl.RowGroupHeadElement=x;var b=function(e){function i(t){return e.call(this,t,"rowGroupFootView")||this}return t.__extends(i,e),i.prototype._getCssSelector=function(){return"rg-rowgroup-foot"},i.prototype._getTableRowHeight=function(t,e){return t.footBounds.height},i.prototype.$_createCell=function(){return new v(this.doc,"rowGroupFootCellView")},i.prototype._getTableRowCount=function(t){return 1},i.prototype.$_getRowClassName=function(t){return"rg-rowgroup-foot-row"},i}(w);Wl.RowGroupFootElement=b;var I="rg-rowgroup-expander",E=I+" rg-rowgroup-expander-expanded",R=I+" rg-rowgroup-expander-collapsed",T=function(e){function i(t,i){var o=e.call(this,t,i,"rowGroupExpandHandle")||this;return o._expanded=!1,o.clickable=!0,o}return t.__extends(i,e),i.isExpander=function(t){var e=t.className;return e&&e.indexOf(I)>=0},_dp(i,"expanded",{get:function(){return this._expanded},set:function(t){t!=this._expanded&&(this._expanded=t,this._changed())}}),i.prototype._createDom=function(t){return t.createElement("span")},i.prototype._initDom=function(t){e.prototype._initDom.call(this,t),t.style.position="",t.style.display="inline-block"},i.prototype._getCssSelector=function(){return this._expanded?E:R},i.prototype._getCssDisplay=function(){return""},i.prototype._beforeDraw=function(t){this._setClassName(t)},i}(c.CellHandle);Wl.RowGroupExpandHandle=T;var D=function(e){function i(t){var i=e.call(this,t,"rowGroupBarCell")||this;return i._level=0,i._expander=new T(t,i),i.addChild(i._expander),i}return t.__extends(i,e),_dp(i,"level",{get:function(){return this._level},set:function(t){this._level=t}}),i.prototype.updateCell=function(t,i,o){e.prototype.updateCell.call(this,t,i,o);var r,s=i.item,a=s.getAncestor(this.bar.l);if(a){var l=t.rowGroup;r=(a.expanded?l.expandedAdornments:l.collapsedAdornments)===g.RowGroupAdornments.SUMMARY}if(a&&(s instanceof n.GroupItemImpl&&s===a||a.getFirstVisibleItem(r)===s)&&a.level===this.bar.l){var h=this._expander._dom;o.appendChild(h),this._expander.setBounds(1,1,this.width-2,this.width-2),this._expander.expanded=a.expanded;var u=t.rowGroup.$_isExpanderVisible(a);this._expander.visible=!a.expanded||null==u||u,h[g.T_ROW]=s.index}else this._expander.visible=!1;o.style.paddingTop="2px"},i.prototype.validate=function(){e.prototype.validate.call(this);var t=this._expander._dom;p.Utils.detach(t)},i}(o.CellElement),k=function(e){function i(t,i){var o=e.call(this,t,i,"rowGroupBarContainer")||this;return o._cells=[],o._levels=0,o._bars=[],o}return t.__extends(i,e),i.prototype._doDispose=function(){this._cells=null,e.prototype._doDispose.call(this)},i.prototype.prepare=function(t,e){this._levels=e},i.prototype.getLevelIndent=function(t){return t*this.width/Math.max(1,this._levels)},i.prototype.getViewOf=function(t){for(var e=this.getChildren(),i=0,o=e.length;i0;this.childCount0?this._cells.pop():this._createCell(),this.addChild(e);for(;this.childCount>s;)(e=this.removeLast()).validate(),this._cells.push(e);for(var d=0;d0&&e>t.fixedItemCount?1:0;return t.getTableItemHeight(e-i)},i.prototype._getCellCount=function(t){return this._levels},i.prototype._getCellWidth=function(t,e){return this.width/Math.max(1,this._levels)},i.prototype._createCell=function(){return new D(this.doc)},i.prototype.$_calcLevels=function(t,e,i,o){for(var n,r=[],s=1,a=0,l=0;l0){for(var C=void 0,w=void 0;y0){var R=this.grid.rowGroup,T=S&&(S.expanded?R.expandedAdornments:R.collapsedAdornments)===g.RowGroupAdornments.SUMMARY,D=1===I&&S&&(E instanceof n.GroupItemImpl||S.getFirstVisibleItem(T)===E);(I>1||D)&&(h.push({r:y,tr1:v,tr2:v+I-1,c:u,l:f}),w.rowSpan=I),w.style.display="",p.Utils.setClassName(w,"rg-rowgroup-bar-cell rg-rowgroup-bar-level-"+String(f)),w[g.T_ROW]=E.index}else w.style.display="none",p.Utils.setClassName(w,"")}}h.sort((function(t,e){return t.r-e.r}))}},i}(i.DataTableElement);Wl.RowGroupBarContainer=k;var M=function(e){function i(t,i){var o=e.call(this,t,"rowGroupBarPane")||this;return o._barContainer=new k(t,i),o.addChild(o._barContainer),o._footView=new b(t),o.addChild(o._footView),o._headView=new x(t),o.addChild(o._headView),o}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(i,"levelCount",{get:function(){return this.grid.layoutManager.rowGroupLevels}}),_dp(i,"currentLevel",{get:function(){return this._barContainer.currentLevels}}),i.prototype.getLevelIndent=function(t){return this._barContainer.getLevelIndent(t)},i.prototype._doMeasure=function(t,e,i){var o=this._barContainer.model.getIndentCount(this.levelCount);return this._headView.prepare(o),this._footView.prepare(o),this._barContainer.prepare(t,o),new s.Size(o*t.rowGroup.levelIndent,i)},i.prototype._doLayoutContent=function(t){var e=this.grid,i=t.headBounds;if(this._headView.visible=e.header.visible||e.headerSummaries.isVisible()||e.filterPanel.visible){var o=0;e.header.visible&&(o+=i.height),e.headerSummaries.isVisible()&&(o+=t.summaryBounds.height),e.filterPanel.visible&&(o+=t.filterPanelBounds.height),this._headView.setBounds(0,i.y,this.width,o),this._headView.layoutContent(t)}i=t.footBounds,(this._footView.visible=e.footers.isVisible())&&(this._footView.setBounds(0,i.y,this.width,i.height),this._footView.layoutContent(t)),i=t.rowBarBounds,this._barContainer.setBounds(0,i.y,this.width,i.height),this._barContainer.layoutContent(t)},i.prototype._getCssSelector=function(){return"rg-rowgroup-bar-container"},i.prototype._visibleChanged=function(){var t=this;e.prototype._visibleChanged.call(this),this.getChildren().forEach((function(e){e.visible=t.visible}))},i}(e.ContentPane);Wl.RowGroupBarPane=M;var O=function(e){function i(t){return e.call(this,t,"rowGroupPane")||this}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},i}(e.ContentPane);Wl.RowGroupPane=O;var F=function(e){function i(t){var i=e.call(this,t,"rowGroupHeaderCellView")||this;return i._indent=0,i}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(i,"indent",{get:function(){return this._indent},set:function(t){this._indent=Math.max(0,t)}}),i.prototype._createDom=function(t){return t.createElement("div")},i.prototype._initDom=function(t){e.prototype._initDom.call(this,t);var i=t.style;i.top="50%",i.msTransform=i.transform="translate(0px, -50%)",i.setProperty("overflow","hidden","important"),i.setProperty("pointer-events","none","important")},i.prototype._beforeDraw=function(t){},i.prototype._doUpdateContent=function(t,e,i){i[p.Utils.TextProp]=e.text,i.style.left=this._indent>0?this._indent+"px":""},i}(o.CellElement);Wl.RowGroupHeaderCellElement=F;var L=function(e){function i(t){var i=e.call(this,t,"rowGroupHeaderView")||this;return i._cellView=new F(t),i.addChild(i._cellView),i}return t.__extends(i,e),i.prototype._doDispose=function(){this._item=null,this._cellView=null,e.prototype._doDispose.call(this)},_dp(i,"item",{get:function(){return this._item},set:function(t){this._item=t}}),_dp(i,"itemIndex",{get:function(){return this._item.index}}),i.prototype._initDom=function(t){e.prototype._initDom.call(this,t),t.style.setProperty("overflow","hidden","important")},i.prototype._getCssSelector=function(){return"rg-rowgroup-header rg-rowgroup-header-level-"+String(this._item.level)},i.prototype._doLayoutContent=function(t){var e=t.grid,i=e.rowGroup;this._cellView.indent=i.indentVisible?0:e.groupBarPane.getLevelIndent(this._item.level-1),this._cellView.updateCell(e,i.getHeaderCell(this._item),this._cellView._dom)},i}(h.GridElement);Wl.RowGroupHeaderElement=L;var P=function(e){function i(t){return e.call(this,t,"rowGroupRightHeaderView")||this}return t.__extends(i,e),i.prototype._doDispose=function(){this._item=null,e.prototype._doDispose.call(this)},_dp(i,"item",{get:function(){return this._item},set:function(t){this._item=t}}),i.prototype._getCssSelector=function(){return"rg-rowgroup-header rg-rowgroup-header-level-"+String(this._item.level)},i}(h.GridElement);Wl.RowGroupRightHeaderElement=P;var B=function(e){function i(t){return e.call(this,t,"rowGroupFooterView")||this}return t.__extends(i,e),i.prototype._doLayoutContent=function(t){var e=t.grid,i=e.rowGroup,o=t.cellLayouts._dataCells.length,n=this._getFirstCell(t),r=this._getStartCell(t)-n,s=r,l=this._getEndCell(t)-n,h=this._item instanceof _.MergedGroupFooter;h&&(s=Math.max(r,this._item.parent.level-n)),this.$_refreshSpans(this._item.index,this._item.$_footerIndex,o,s,l),s=0;for(var u=0;u0?v*i:f.rowspan||1,w=f.colspan||1;C=Math.min(C,y),h.set(w,C,!0);for(var x=0;x0){var S=0,R=u.vindex+1;if(c)for(;S++1&&(h.height=r[h.rowIndex+h.rowSpan]-r[h.rowIndex],h.cell.firstElementChild.style.maxHeight=h.height-2+"px")}}},i}(u.ItemElement);Wl.RowGroupFooterElement=B;var V=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(i,e),i.prototype._getBodyCells=function(t){return this.parent.$_getFixedBodyCells(t)},i.prototype._getTableRow=function(t,e){return this.parent.$_getFixedTableRow(e)},i.prototype._getTableCell=function(t){return this.parent.$_getFixedTableCell(this._domIndex,t)},i.prototype._getBodyView=function(){return this.parent._fixedView},i.prototype._getFirstCell=function(t){return this._getStartCell(t)},i.prototype._getLastCell=function(t){return this._getEndCell(t)},i.prototype._getStartCell=function(t){return 0},i.prototype._getEndCell=function(t){return t.fixedCellCount-1},i}(B);Wl.RowGroupFixedFooterElement=V;var A=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(i,e),i.prototype._getBodyCells=function(t){return this.parent.$_getRightBodyCells(t)},i.prototype._getTableRow=function(t,e){return this.parent.$_getRightTableRow(e)},i.prototype._getTableCell=function(t){return this.parent.$_getRightTableCell(this._domIndex,t)},i.prototype._getBodyView=function(){return this.parent._rightView},i.prototype._getFirstCell=function(t){return this._getStartCell(t)},i.prototype._getLastCell=function(t){return this._getEndCell(t)},i.prototype._getStartCell=function(t){return t.cellCount-t.rightCellCount},i.prototype._getEndCell=function(t){return t.cellCount-1},i}(B);Wl.RowGroupRightFooterElement=A;var N=function(e){function i(t,i){var o=e.call(this,t,i||"rowGroupLayer")||this;return o._headerPool=[],o._headerViews=[],o._rightHeaderPool=[],o._rightHeaderViews=[],o._footerPool=[],o._footerViews=[],o._fixedFooterPool=[],o._fixedFooterViews=[],o._rightFooterPool=[],o._rightFooterViews=[],o._indents=[],o}return t.__extends(i,e),i.prototype._doDispose=function(){this._bodyView=this._fixedView=this._rightView=null,e.prototype._doDispose.call(this)},_dp(i,"grid",{get:function(){return this.getAncestor(r.GridView)}}),i.prototype.layout=function(t){this._doPrepareContent(t),this._doLayoutContent(t)},i.prototype.getHeaderView=function(t){for(var e=0,i=this._headerViews;e0,l=this._rightView,h=t.contentBounds.right-t.sideContentBounds.x,u=0,d=0,c=t.trs,_=s,f=a?_*c+1:_*c;for(l&&(e=t.rightContentBounds.clone(),h=Math.min(h,this.width-e.width),e.x-=this.x,e.leftBy(t.rightBarWidth));_i;){var l=a.pop();this.removeChild(l),s.push(l)}var h=this._rightHeaderPool,u=this._rightHeaderViews;if(this._rightView){for(;u.lengthi;)l=u.pop(),this.removeChild(l),h.push(l)}else for(;u.length>0;)l=u.pop(),this.removeChild(l),h.push(l)},i.prototype.$_prepareGroupItems=function(t,e,i,o){this._bodyView=e,this._fixedView=i,this._rightView=o},i.prototype.$_prepareGroupFooters=function(t,e){for(var i=0,o=e.fixedItemCount,r=t.length;oi;){var s=this._footerViews.pop();this.removeChild(s),this._footerPool.push(s)}if(this._fixedView){for(;this._fixedFooterViews.lengthi;)s=this._fixedFooterViews.pop(),this.removeChild(s),this._fixedFooterPool.push(s)}else for(;this._fixedFooterViews.length>0;)s=this._fixedFooterViews.pop(),this.removeChild(s),this._fixedFooterPool.push(s);if(this._rightView){for(;this._rightFooterViews.lengthi;)s=this._rightFooterViews.pop(),this.removeChild(s),this._rightFooterPool.push(s)}else for(;this._rightFooterViews.length>0;)s=this._rightFooterViews.pop(),this.removeChild(s),this._rightFooterPool.push(s)},i.prototype.$_getTableRow=function(t,e){return this._bodyView._tbody.children[e]},i.prototype.$_getTableCell=function(t,e){return this._bodyView._tbody.children[t].children[e]},i.prototype.$_getFixedTableRow=function(t){return this._fixedView._tbody.children[t]},i.prototype.$_getFixedTableCell=function(t,e){return this._fixedView._tbody.children[t].children[e]},i.prototype.$_getRightTableRow=function(t){return this._rightView._tbody.children[t]},i.prototype.$_getRightTableCell=function(t,e){return this._rightView._tbody.children[t].children[e]},i.prototype.$_getBodyCells=function(t){return this._bodyView._cells[t]},i.prototype.$_getFixedBodyCells=function(t){return this._fixedView._cells[t]},i.prototype.$_getRightBodyCells=function(t){return this._rightView._cells[t]},i}(l.LayerElement);return Wl.RowGroupElement=N,Wl}(),h=Hr(),u=function(){if(Yl)return ql;Yl=1,Object.defineProperty(ql,"__esModule",{value:!0}),ql.GroupingOptions=void 0;var t=d,e=_r(),i=Bs(),o=_t(),n=Ct(),r=function(e){function r(t){var o=e.call(this,t)||this;return o._enabled=!0,o._expandWhenGrouping=!0,o._summarizing=!0,o._fixMergedColumns=!0,o._headerClickable=!1,o._toast=new i.ToastOptions({visible:!1,message:o._messageCallback}),o.assignFrom(n.DefaultOptions.grouping),o}return t.__extends(r,e),r.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(r,"enabled",{get:function(){return this._enabled},set:function(t){this._enabled=t}}),_dp(r,"prompt",{get:function(){return this._prompt||o.Messages.messages.groupingPrompt},set:function(t){t!=this._prompt&&(this._prompt=t,this._changed())}}),_dp(r,"expandWhenGrouping",{get:function(){return this._expandWhenGrouping},set:function(t){this._expandWhenGrouping=t,this._changed()}}),_dp(r,"summarizing",{get:function(){return this._summarizing},set:function(t){t!=this._summarizing&&(this._summarizing=t,this._changed())}}),_dp(r,"fixMergedColumns",{get:function(){return this._fixMergedColumns},set:function(t){this._fixMergedColumns=t}}),_dp(r,"headerClickable",{get:function(){return this._headerClickable},set:function(t){this._headerClickable=t}}),_dp(r,"toast",{get:function(){return this._toast},set:function(e){e&&!e.message&&((e=t.__assign(t.__assign({},e),{message:this._messageCallback})).message=this._messageCallback),this._toast.assignFrom(e)}}),r.prototype._changed=function(){this.grid._groupingOptionsChanged(this),this._layoutOwner()},r.prototype._messageCallback=function(){var t;return(null===(t=n.DefaultOptions.grouping.toast)||void 0===t?void 0:t.message)||o.Messages.messages.groupingToastMessage},r}(e.GridBaseOptions);return ql.GroupingOptions=r,ql}(),c=Ro(),p=Qa(),_=dn(),f=function(){if(Xl)return Zl;Xl=1,Object.defineProperty(Zl,"__esModule",{value:!0}),Zl.GroupPanelElement=Zl.GroupPanelResetView=Zl.GroupPanelItemView=void 0;var t=d,e=xr(),i=Rr(),o=S(),n=Ct(),r=_t(),s=function(i){function n(t){var e=i.call(this,t)||this;return e._field=-1,e._text="",e._textWidth=0,e._textHeight=0,e._closeHeight=0,e._padHorz=5,e._padVert=4,e._itemGap=8,e}return t.__extends(n,i),n.prototype._doDispose=function(){o.Utils.detach(this._textView),o.Utils.detach(this._closeView),this._textView=this._closeView=null,i.prototype._doDispose.call(this)},_dp(n,"field",{get:function(){return this._field}}),_dp(n,"text",{get:function(){return this._text}}),n.prototype.setColumn=function(t){this._field=t.dataIndex,this._textView[o.Utils.TextProp]=this._text=t.displayText},n.prototype.isCloseButton=function(t){return t===this._closeView},n.prototype._getCssSelector=function(){return"rg-header rg-header-cell rg-group-panel-item"},n.prototype._initDom=function(t){i.prototype._initDom.call(this,t);var e=(0,o.getDoc)(t);this._textView=e.createElement("span"),this._textView.className=this._getTextCss(),this._textView.style.display="inline-block",t.appendChild(this._textView),this._closeView=e.createElement("span"),this._closeView.className=this._getButtonCss(),t.appendChild(this._closeView)},n.prototype._doMeasure=function(t,i,o){var n=(this._textWidth=this._textView.offsetWidth)+this._itemGap+this._closeView.offsetWidth+2*this._padHorz,r=this._textHeight=this._textView.offsetHeight;return r=Math.max(r,this._closeHeight=this._closeView.offsetHeight),r+=2*this._padVert,new e.Size(n,r)},n.prototype._doLayoutContent=function(t){},n.prototype._doDraw=function(t){var e=this._dom.clientHeight;this._textView.style.left=this._padHorz+"px",this._textView.style.top=Math.floor((e-this._textHeight)/2)+"px",this._closeView.style.left=this._padHorz+this._textWidth+this._itemGap+"px",this._closeView.style.top=Math.floor((e-this._closeHeight)/2)+"px"},n.prototype._getTextCss=function(){return"rg-group-panel-item-text"},n.prototype._getButtonCss=function(){return"rg-group-panel-item-close"},n}(i.GridElement);Zl.GroupPanelItemView=s;var a=function(e){function i(t){return e.call(this,t)||this}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},i.prototype.setText=function(t){this._textView[o.Utils.TextProp]=this._text=t},i.prototype._getCssSelector=function(){return"rg-header rg-header-cell rg-group-panel-reset"},i.prototype._initDom=function(t){e.prototype._initDom.call(this,t)},i.prototype._doMeasure=function(t,i,o){if(this._text)return e.prototype._doMeasure.call(this,t,i,o);var n=e.prototype._doMeasure.call(this,t,i,o);return n.width=this._closeView.offsetWidth+2*this._padHorz,n},i.prototype._doDraw=function(t){if(this.text)e.prototype._doDraw.call(this,t);else{var i=this._dom,o=i.clientHeight,n=i.clientWidth,r=this._closeView.clientWidth;this._closeView.style.left=(n-r)/2+"px",this._closeView.style.top=Math.floor((o-this._closeHeight)/2)+"px"}},i.prototype._getTextCss=function(){return"rg-group-panel-reset-text"},i.prototype._getButtonCss=function(){return"rg-group-panel-reset-close"},i}(s);Zl.GroupPanelResetView=a;var l=function(i){function l(t,e){var o=i.call(this,t,e)||this;return o._minHeight=0,o._itemViews=[],o._count=0,o._padHorz=16,o._padVert=10,o._itemGap=20,o.visible=!1,o.assignFrom(n.DefaultOptions.groupPanel),o}return t.__extends(l,i),l.prototype._doDispose=function(){this._itemViews&&this._itemViews.forEach((function(t,e){t.dispose()})),this._itemViews=null,o.Utils.detach(this._messageView),this._messageView=null,this._resetView=this._resetView.dispose(),i.prototype._doDispose.call(this)},_dp(l,"showResetButton",{get:function(){return null!=this._showResetButton?this._showResetButton:n.DefaultOptions.groupPanel.showResetButton},set:function(t){this._showResetButton!=t&&(this._showResetButton=t,this._doSizeChanged())}}),_dp(l,"resetText",{get:function(){return null!=this._resetText?this._resetText:n.DefaultOptions.groupPanel.resetText||r.Messages.messages.groupResetText},set:function(t){this._resetText!=t&&(this._resetText=t,this._doSizeChanged())}}),_dp(l,"minHeight",{get:function(){return this._minHeight},set:function(t){this._minHeight!==t&&(this._minHeight=t,this._doSizeChanged())}}),l.prototype._getCssSelector=function(){return"rg-group-panel"},l.prototype._initDom=function(t){i.prototype._initDom.call(this,t);var e=(0,o.getDoc)(t);t.style.overflow="hidden";var n=this._messageView=e.createElement("span");this._resetView=new a(e),n.className="rg-group-panel-message",t.appendChild(n)},l.prototype._doMeasure=function(t,i,n){var r=t.groupingOptions;this._count=t.rowGroupLevels;var s=this.minHeight,a=0,l=this._messageView.style;if(this._count>0?l.display="none":(l.display="",this._messageView[o.Utils.TextProp]=r.prompt,a=this._messageView.offsetHeight,s=Math.max(s,a+2*this._padVert),l.left=this._padHorz+"px",l.top=(s-a)/2+"px"),this.$_prepareItemViews(t,this._count),this._count>0){for(var h=0;h0){var e=this._padHorz;this._padVert;for(var i=0;i0?(o.setText(this.resetText),this.addChild(o)):this.removeChild(o)},l}(i.VisualObjectElement);return Zl.GroupPanelElement=l,Zl}(),g=js(),m=gs(),y=_s(),v=jn(),w=cn(),x=rn(),b=Pn(),I=Ar(),E=Vr(),R=Nr(),T=nn(),D=Dn(),k=function(e){function o(t,i,o){var n=e.call(this,t,i,o)||this;n._rowGroupSummaryRuntime=new a.RowGroupSummaryRuntime,n._rs=n._createItemSource(),n.itemSource=n._rs,n._groupingOptions=new u.GroupingOptions(n),n._groupingOptionsChanged(n._groupingOptions),n._groupPanelView=new f.GroupPanelElement(n.doc,n.rowGroup),n.topContentPane.addChild(n._groupPanelView);for(var r=[n._groupBarPane._headView,n._groupBarPane._footView,n._groupBarPane._barContainer],s=r.length-1;s>=0;s--){var l=r[s];n._tableViews[l.$_hash]=l}return n.editOptions.displayEmptyEditRow&&n.editOptions.appendable&&n._rs.appendDummy(),n}return t.__extends(o,e),o.prototype._doDispose=function(){this._rs.dispose(),this._rs=null,this._groupPanelView=this.groupPanelView.dispose(),this._rowGroup=this._rowGroup&&this._rowGroup.dispose(),this._groupingOptions=this._groupingOptions.dispose(),e.prototype._doDispose.call(this)},o.prototype._doCreateOtherElements=function(){this._groupView=new l.RowGroupElement(this.doc),this.addElement(this._groupView)},_dp(o,"maxRowCount",{get:function(){return this._rs.maxRowCount},set:function(t){this._rs.maxRowCount=t}}),_dp(o,"rowGroup",{get:function(){return this._rowGroup}}),_dp(o,"groupPanelView",{get:function(){return this._groupPanelView}}),_dp(o,"groupBarPane",{get:function(){return this._groupBarPane}}),_dp(o,"groupView",{get:function(){return this._groupView}}),_dp(o,"groupingOptions",{get:function(){return this._groupingOptions}}),_dp(o,"paged",{get:function(){return this._rs.page>=0}}),_dp(o,"page",{get:function(){return this._rs.page},set:function(t){this.setPage(t)}}),_dp(o,"pageCount",{get:function(){return this._rs.pageCount},set:function(t){var e=this._rs.pageCount;this._rs.pageCount=t,this._rs.pageCount!=e&&this.$_firePageCountChanged(this._rs.pageCount)}}),_dp(o,"rowGroupLevels",{get:function(){return this._rs.groupLevels}}),_dp(o,"rowGroupFields",{get:function(){return this._rs.groupByFields}}),_dp(o,"rowGrouped",{get:function(){return this._rs.grouped}}),_dp(o,"mergedRowGrouped",{get:function(){return this._rs.mergedGrouped}}),_dp(o,"rowGroupSummaryRuntime",{get:function(){return this._rowGroupSummaryRuntime}}),o.prototype.isTree=function(){return!1},o.prototype.recursiveDeleting=function(){return!1},o.prototype._beforeChangeLayout=function(){this.ungroupBy()},o.prototype.isGrouped=function(t){return t&&t.groupLevel>0},o.prototype.isGroupedField=function(t){return this._rs.isGroupedField(t)},o.prototype.isSortByLabelColumn=function(t){return this.columnByField(t).sortByLabel},o.prototype.getGroupLevel=function(t){return this._rs.getGroupLevel(t)},o.prototype.groupByFieldNames=function(t,e,i){void 0===i&&(i=r.SortDirection.ASCENDING);var o=this.dataSource;if(o&&t&&t.length>0){for(var n=[],s=0;s=0&&n.push(l)}n.length>0&&(e=void 0===e?this.rowGroup.sorting:e,this.groupBy(n,e,i))}else this.ungroupBy()},o.prototype.groupBy=function(t,e,i){this._beforevIndex=null,this.isItemEditing(null)||this.toastManager.show(this.groupingOptions.toast,!0,function(){this.$_doGroupBy(t,e,i)}.bind(this))},o.prototype.clearGroupBy=function(){this.isItemEditing(null)||(this._rs.setLabelComparer(null),this._rs.groupBy(null,!0,r.SortDirection.ASCENDING),this.$_clearColumnMergeGrouped())},o.prototype.ungroupBy=function(){this.clearGroupBy()},o.prototype.addGroupBy=function(t,e){var i=this;e&&(this.isItemEditing(null)||this.isGrouped(e)||e.layout&&e.layout.visible&&(!e.layout.isRoot&&this.rowGroup.mergeMode||e.dataIndex>=0&&this.toastManager.show(this.groupingOptions.toast,!0,(function(){i.$_doAddGroupBy(t,e)}))))},o.prototype.removeGroupByField=function(t){if(!(t<0)&&!this.isItemEditing(null)&&this.isGroupedField(t)){this._rs.removeGroupBy(t,!1)}},o.prototype.expand=function(t,e,i,o){this.isItemEditing(null)||this._rs.expand(t,e,i,o)},o.prototype.expandAll=function(t,e){this.isItemEditing(null)||this._rs.expandAll(t,e)},o.prototype.collapse=function(t,e,i,o){this.isItemEditing(null)||this._rs.collapse(t,e,i,o)},o.prototype.collapseAll=function(t){this.isItemEditing(null)||this._rs.collapseAll(t)},o.prototype.isGroupedColumn=function(t){return t&&t.dataIndex>=0&&this._rs.isGroupedField(t.dataIndex)},o.prototype.blankGroupData=function(){return!this.rowGroup.mergeMode&&this.rowGroup.blankGroupData},o.prototype.getSortFields=function(){return this.itemSource.getSortFields()},o.prototype.getSortDirections=function(){return this.itemSource.getSortDirections()},o.prototype.getSortCases=function(){return this.itemSource.getSortCases()},o.prototype.setPaging=function(t,e,i){void 0===e&&(e=10),void 0===i&&(i=-1),this._rs.setPaging(t,e,i,null)},o.prototype.setPage=function(t,e){if(void 0===e&&(e=-1),(t=Math.max(0,Math.min(t,this._rs.pageCount-1)))!=this._rs.page){var i=!1;this.$_firePageChanging(t)&&(this._rs.setPage(t,e),i=!0),i&&this.$_firePageChanged(this._rs.page)}},o.prototype.getPageOfDataRow=function(t){return this._rs.getPageOfDataRow(t)},_dp(o,"isLayer",{get:function(){return!1}}),_dp(o,"summarizer",{get:function(){return this._rs.summarizer}}),o.prototype._createSidePane=function(){return this._addGridObject(this._rowGroup=new p.RowGroup(this)),this._groupBarPane=new l.RowGroupBarPane(this.doc,this.rowGroup)},o.prototype.isSidePaneVisible=function(){return this.rowGrouped&&!this.mergedRowGrouped&&this._rowGroup.indentVisible},o.prototype._createLayoutManager=function(){return new M(this)},o.prototype.canGrouping=function(){return this._groupPanelView.visible},o.prototype._canMerge=function(){return this.dataCount>0},_dp(o,"undoable",{get:function(){return this._rs.undoable},set:function(t){this._rs.undoable=t}}),_dp(o,"canUndo",{get:function(){return this._rs.canUndo}}),_dp(o,"canRedo",{get:function(){return this._rs.canRedo}}),_dp(o,"undoing",{get:function(){return this._rs.undoing}}),_dp(o,"redoing",{get:function(){return this._rs.redoing}}),o.prototype.undo=function(){return!!this._rs.canUndo&&(this._rs.cancelWhenLastUndo=this.editOptions.cancelWhenLastUndo,this.editController.cancelEditor(!0),this._rs.undo(),!0)},o.prototype.redo=function(){return!!this._rs.canRedo&&(this._rs.redo(),!0)},o.prototype.execute=function(t){this._rs.execute(t)},o.prototype.clearCommandStack=function(t){void 0===t&&(t=!0),this._rs.clearCommandStack(t)},o.prototype.getRowView=function(t,i){return i instanceof n.GroupItemImpl?this._groupView.getHeaderView(i):e.prototype.getRowView.call(this,t,i)},o.prototype._doSortItems=function(t,e,i){var o=this.itemSource;o.setLabelComparer(this._doPrepareComparer(t)),o.orderBy(t,e,i)},o.prototype._doColumnFiltersChanged=function(t,e,i){this.applyFilters(t,e,i),this.invalidateLayout()},o.prototype.setOptions=function(t){if(t){var i=this._rs;void 0!==t.hideDeleted&&(i.hideDeleted=t.hideDeleted),void 0!==t.hideDeletedRows&&(i.hideDeleted=t.hideDeletedRows),void 0!==t.inclusiveFiltering&&(i.inclusiveFiltering=t.inclusiveFiltering),void 0!==t.filterOr&&(i.inclusiveFiltering=t.filterOr),void 0!==t.summaryMode&&(i.summaryMode=t.summaryMode),void 0!==t.groupSummaryMode&&(i.groupSummaryMode=t.groupSummaryMode),void 0!==t.sortMode&&(i.sortMode=t.sortMode),void 0!==t.filterMode&&(i.filterMode=t.filterMode),t.rowGroup&&this.rowGroup.assignFrom(t.rowGroup),e.prototype.setOptions.call(this,t)}},o.prototype.$_beforeRender=function(){this._groupBarPane.levelCount!==this._groupBarPane.currentLevel&&(this._needPosition=!0),e.prototype.$_beforeRender.call(this)},o.prototype._visualObjectChanged=function(t){e.prototype._visualObjectChanged.call(this,t),t instanceof b.CheckBar&&(this._rs.checkableExpression=t.checkableExpression)},o.prototype.resetCheckables=function(){this._rs.resetCheckables()},o.prototype.applyCheckables=function(){this._rs.applyCheckables()},o.prototype.getCheckedRows=function(t,e,i){var o,n;if(e){o=[];for(var r=0,s=this.itemCount;r=0&&o.push(n.dataRow)}else o=this._rs.getCheckedRows(i);return t&&o.sort((function(t,e){return t-e})),o},o.prototype.getCheckedItemIndices=function(t){for(var e=[],i=0,o=this.itemCount;i=0)&&e.push(n.index)}return e},o.prototype.getCheckedItems=function(t){for(var e=[],i=0,o=this.itemCount;i=0)&&e.push(n)}return e},o.prototype.getMergedItems=function(t,e,i,o){var n=function(){return l.index0&&r.mergeGrouped&&!this.isTree()?T.RowGroupMergeRule.getDefault(c,this.rowGroup.mergeMode):s.$_mergeRuleObj()).parseBounds(this.itemSource,r.dataIndex,0,this.itemCount-1,a._flags),d=n()}if(!d&&o)return[t];if(d){for(var p=[],_=d.top;_<=d.bottom;_++)(this.getItem(_).isDataRow||!i)&&p.push(_);return p.length>0?p:null}return null},o.prototype.findGroupItem=function(t,e){var i=this.getGroupLevel(e);if(i>0)for(var o=t instanceof n.GroupItem?t:t.parent;o;){if(o.level==i)return o;o=o.parent}return null},o.prototype.getItemOfModel=function(t){return t instanceof n.GridItem?t:t.itemIndex>=0?this.getItem(t.itemIndex):t.id>=0?this._rs.getGroupItem(t.id):null},o.prototype.getJsonRows=function(){return this._rs.getJsonRows()},o.prototype.getIndicatorIndex=function(t,e){var i=this._rs.getDisplayItemIndex(t),o=this.paged?this._rs.itemLength:this.itemCount;return e?o-i-1:i},o.prototype.indicatorReverse=function(t){return!(this.rowGrouped&&this.paged)&&t===D.IndicatorValue.REVERSE},o.prototype.getFirstRow=function(){return this._rs.getFirstRow()},o.prototype.getLastRow=function(){return this._rs.getLastRow()},o.prototype.getPrevRow=function(t){return this._rs.getPrevRow(t)},o.prototype.getNextRow=function(t){return this._rs.getNextRow(t)},o.prototype.canMoveRows=function(t,e,i){if(i&&this.canMoveRow(e,!1)&&t){for(var o=!1,n=0;n=0){for(var o=[],n=0,r=t;n=0&&o.push(a)}if(o.length>0)return this.dataSource.moveRowList(o,i)}},o.prototype._getCellTypeOf=function(t){return t instanceof l.RowGroupHeadElement?r.GridCellType.GROUP_HEAD:t instanceof l.RowGroupFootElement?r.GridCellType.GROUP_FOOT:t instanceof l.RowGroupBarContainer?r.GridCellType.GROUP_BAR:void 0},o.prototype.updatePastedRow=function(t,e,i){var o=t.dataRow;if(o>=0){var n=this.dataSource;n&&n.updateRow(o,e,i)}},o.prototype.appendPastedRow=function(t){var e=this.dataSource;if(e)return e.appendRow(t)},o.prototype.getSummaryCount=function(t){return"groupFooter"===t?this.rowGroup.footers.count:e.prototype.getSummaryCount.call(this,t)},o.prototype.isRecycleMode=function(){return e.prototype.isRecycleMode.call(this)&&(!this.rowGrouped||1===this.activeCellLayout.dataRows)},o.prototype.resetGrid=function(t){var i=this.itemSource;i&&(i.grouped||i.source===i._rs||(i.source=i._rs,this.setNeedRefresh(!0))),e.prototype.resetGrid.call(this,t)},o.prototype.setColumns=function(t){e.prototype.setColumns.call(this,t),this.mergedRowGrouped&&this._doRowGroupMergeModeChanged()},o.prototype._createItemSource=function(){var t=new i.GridItemProvider(!0,this._rowGroup);return t.setSortingOptions(this.sortingOptions),t},o.prototype.$_rowGroupChanged=function(t){this._doRowGroupMergeModeChanged()},o.prototype._groupingOptionsChanged=function(t){this._rs.expandWhenGrouping=t.expandWhenGrouping,this.groupPanelView&&this.groupPanelView.invalidate()},o.prototype.$_rowGroupAdornmentsChanged=function(t,e){this._rs._groupedProvider.resetAdornments(this.handler,t,e)},o.prototype.$_getVisibleRootByField=function(t,e){for(var i=this.visibleLayoutCount,o=0;o0)for(var e=t.length-1;e>=0;e--){var i=this.$_getVisibleRootByField(t[e],!1);i?i.$_setMergeGrouped(!0):t.splice(e,1)}this._rs.groupByMode(t,!0)}else this._rs.groupByMode(t,!1)},o.prototype.$_doGroupBy=function(t,e,i){var o,n=this.dataSource;if(this.$_clearColumnMergeGrouped(),n&&t&&(o=t.length)>0){for(var s=n.fieldCount,a=[],l=0;l=0&&t[l]0){if(this.rowGroup.mergeMode)for(l=a.length-1;l>=0;l--){var h=this.$_getVisibleRootByField(a[l],!1);h?h.$_setMergeGrouped(!0):a.splice(l,1)}a.length>0&&(this._rs.setLabelComparer(this._doPrepareComparer(a)),this._rs.groupBy(a,e,i))}}else this._rs.setLabelComparer(null),this._rs.groupBy(null,!0,r.SortDirection.ASCENDING)},o.prototype.$_doAddGroupBy=function(t,e){var i=e.dataIndex;e.$_setMergeGrouped(this.rowGroup.mergeMode);try{var o=this.rowGroupFields?this.rowGroupFields.slice():[];o.push(i),this._rs.setLabelComparer(this._doPrepareComparer(o)),this._rs.addGroupBy(t,i,this.rowGroup.sorting)}catch(t){throw e.$_setMergeGrouped(!1),t}},o.prototype.$_clearGroupedIndices=function(){for(var t=this.columnCount-1;t>=0;t--){var e=s.Utils.cast(this.getColumn(t),x.DataColumn);e&&e.$_setGroupLevel(this._rs.getGroupLevel(-1))}},o.prototype.$_setGroupedIndices=function(){for(var t=this.columnCount-1;t>=0;t--){var e=s.Utils.cast(this.getColumn(t),x.DataColumn);e&&e.$_setGroupLevel(this._rs.getGroupLevel(e.dataIndex))}},o.prototype.$_firePageChanging=function(t){return this.fireConfirmEvent(o.PAGE_CHANGING,t)},o.prototype.$_firePageChanged=function(t){this.fireEvent(o.PAGE_CHANGED,t)},o.prototype.$_firePageCountChanged=function(t){this.fireEvent(o.PAGE_COUNT_CHANGED,t)},o.prototype.$_fireGrouping=function(t){return this.fireConfirmEvent(o.GROUPING,t)},o.prototype.$_fireGrouped=function(){this.fireEvent(o.GROUPED)},o.prototype.$_fireExpanding=function(t){return this.fireConfirmEvent(o.EXPANDING,t)},o.prototype.$_fireExpanded=function(t){this.fireEvent(o.EXPANDED,t)},o.prototype.$_fireCollapsing=function(t){return this.fireConfirmEvent(o.COLLAPSING,t)},o.prototype.$_fireCollapsed=function(t){this.fireEvent(o.COLLAPSED,t)},o.prototype.onGroupedItemProviderGrouping=function(t,e){return this.$_fireGrouping(e)},o.prototype.onGroupedItemProviderGrouped=function(t){this.selections.clear(!0),this.$_clearGroupedIndices(),this.groupPanelView.invalidate(),this.setNeedRefresh(!0);var e,i,o=this._rs.groupByFields;if(o&&o.length>0&&this.$_setGroupedIndices(),this.rowGroup.mergeMode){var n=[],r=this.visibleLayoutCount,a=this._beforevIndex;(e=!this._beforevIndex)&&(a=this._beforevIndex={});for(var l=[],h=0;h=0;){(c=a[l[h].$_hash]).hasGrouped&&(l[h].layout.vindex=c.vIndex)}if((r=n.length)>0){n=n.sort((function(t,e){return t.groupLevel-e.groupLevel}));for(h=0;ho.index){var n=this.layoutByColumn(this.columnByField(e.groupField)),s=w.DummyCellIndex.tempItem(this,o,n);w.CellIndex.areEquals(this.focusedIndex,s)?this.topIndex=s.itemIndex:this.setFocusedIndex(s)}}this.$_fireCollapsed(e)},o.PAGE_CHANGING="onGridViewPageChanging",o.PAGE_CHANGED="onGridViewPageChanged",o.PAGE_COUNT_CHANGED="onGridViewPageCountChanged",o.GROUPING="onGridViewGrouping",o.GROUPED="onGridViewGrouped",o.EXPANDING="onGridViewExpanding",o.EXPANDED="onGridViewExpanded",o.COLLAPSING="onGridViewCollapsing",o.COLLAPSED="onGridViewCollapsed",o}(e.GridBase);Nl.GridView=k;var M=function(e){function i(t){return e.call(this,t)||this}return t.__extends(i,e),_dp(i,"panelVisible",{get:function(){return this.grid.groupPanelView.visible}}),i.prototype.getLevelIndent=function(t){var e=this.grid;if(this.mergedRowGrouped){for(var i=this.fixedLayoutCount,o=0,n=0;ni?o=Math.max(this.fixedWidth,o+this.fixedBarWidth-this.leftPos):t===i&&(o+=this.fixedBarWidth):o-=this.leftPos,o}return e.rowGroup.indentVisible?e.groupBarPane.getLevelIndent(t):0},_dp(i,"grid",{get:function(){return this._grid}}),_dp(i,"topPanelVisible",{get:function(){return this.panelVisible}}),_dp(i,"rowGrouped",{get:function(){return!this.grid.rowGroup.mergeMode&&this.grid.rowGrouped}}),_dp(i,"mergedRowGrouped",{get:function(){return this.grid.rowGroup.mergeMode&&this.grid.rowGrouped}}),_dp(i,"rowGroupLevels",{get:function(){return this.grid.rowGroupLevels}}),_dp(i,"rowGroupFields",{get:function(){return this.grid.rowGroupFields}}),i.prototype.$_groupView=function(t){return this.grid.groupView},i.prototype.setLeftPos=function(t,i){e.prototype.setLeftPos.call(this,t,i);var o=this.grid,n=o.mergedRowGrouped,r=this.$_groupView(n);r.visible&&this.$_layoutRowGroupView(o,r)},i.prototype._prepareItems=function(t){e.prototype._prepareItems.call(this,t);var i=this.grid;if(i.rowGrouped){var o=i.mergedRowGrouped,n=this.$_groupView(o),r=this.contentBounds.isEmpty?null:i.bodyView,s=this.fixedContentBounds.isEmpty?null:i.fixedBodyView,a=this.rightContentBounds.isEmpty?null:i.rightBodyView;n.$_prepareGroupItems(this,r,s,a),n.$_prepareGroupFooters(this._items,this)}},i.prototype._doMeasureTopPane=function(t,e){var i=t.groupPanelView;if(this.panelVisible)if(i._dirty){var o=i.measure(t,e.width,e.height);e.height=o.height}else e.height=i.bounds.height;else e.height=1,e.width=1},i.prototype._doLayoutTopPane=function(t,e){var i=t.groupPanelView;i.setBounds(0,0,e.width,e.height),this.panelVisible&&i.layoutContent(this)},i.prototype._doLayout=function(t,i){e.prototype._doLayout.call(this,t,i)},i.prototype._adjustLayout=function(t,i,o){void 0===o&&(o=!1),e.prototype._adjustLayout.call(this,t,i,o);var n=t.rowGrouped,r=t.mergedRowGrouped,s=t._sideContentPane;s&&this._layoutSidePane(t,s);var a=this.$_groupView(r);this.$_groupView(!r).visible=!1,(a.visible=n)&&this.$_layoutRowGroupView(t,a)},i.prototype.isMergedCell=function(t){var e=this.grid;if(e.rowGroup.mergeMode&&e.isGroupedColumn(t.dataColumn))return!0;var i=t.layout;if(i&&i.isColumn&&t.layout.merged){var o=i.merges;if(o)return null!=o.getRoom(t)}return!1},i.prototype.$_layoutRowGroupView=function(t,e){var i=this.contentBounds,o=this.sideContentBounds.clone();o.top=i.y+this.bodyBounds.y,o.right=this.rightContentBounds.right,o.bottom=Math.min(this.footBounds.y+i.y,i.bottom),e.setRect(o),e.layout(this)},i}(h.GridLayoutManager);Nl.GridViewLayoutManager=M;var O=function(e){function i(t){var i=e.call(this,t,"gridSelectionTool")||this;return i._panelCellReq=new F,i._panelCellFeedback=new L(t.doc),i._groupingReq=new B,i}return t.__extends(i,e),i.prototype._doDispose=function(){this._panelCellReq=null,e.prototype._doDispose.call(this)},i.prototype._doPointerDown=function(t){var i=this.grid,o=this.mouseEventTarget;if(0===t.button&&(E.RowElement.isExpander(o)||l.RowGroupExpandHandle.isExpander(o))){var s=this._findTableCell(o),a=i.getTableView(s);if(E.RowElement.isExpander(o)&&a instanceof I.GridBodyElement){var h=i.getDataCellIndex(s,this._tempIndex),u=a.getCellAt(i.layoutManager,h),d=i.findGroupItem(u.item,u.layout.firstColumn.dataIndex);this.$_toggleExpanded(i,d,t)}else if(l.RowGroupExpandHandle.isExpander(o)&&a instanceof l.RowGroupBarContainer){var c=a.getViewOf(o);return void((d=(d=i.getItem(o[r.T_ROW])).getAncestor(c.level))instanceof n.GroupItemImpl&&this.$_toggleExpanded(i,d,t))}}e.prototype._doPointerDown.call(this,t)},i.prototype._doClick=function(t){var i=t.mouseX,o=t.mouseY,n=this.grid,r=this.findElementAt(i,o,!1);r instanceof f.GroupPanelResetView&&r._dom.contains(t.target)?n.ungroupBy():(r instanceof f.GroupPanelItemView&&r.isCloseButton(t.target)&&n.removeGroupByField(r.field),e.prototype._doClick.call(this,t))},i.prototype._doDblClick=function(t){var i=t.mouseX,o=t.mouseY,n=this.grid,r=this.findElementAt(i,o,!1);r instanceof l.RowGroupHeaderElement&&n.groupingOptions.headerClickable?this.$_toggleExpanded(n,r.item,t):e.prototype._doDblClick.call(this,t)},i.prototype._getEditRequest=function(t,i,o,n,r,s,a){var l=e.prototype._getEditRequest.call(this,t,i,o,n,r,s,a);if(l)return l;if(this.grid.container.contains(t)){var h=this.grid,u=this.findElementAt(o,n,!1),d=this._findTableCell(t),c=d&&h.getTableView(d);if(c instanceof R.HeaderElement&&!r){var p=c.layoutByCell(d),_=p.firstColumn;if(h.groupPanelView.visible&&_&&_.groupable&&h.groupingOptions.enabled){var g=h.layoutManager.getHeaderCellRect(p);return this._groupingReq.init(p,g,o,n)}}return u instanceof f.GroupPanelItemView?this._panelCellReq.init(u,o,n):void 0}},i.prototype._getDragTracker=function(t,i,o){var n=this.grid;return t instanceof F?new P(n,t,this._panelCellFeedback):t instanceof B?new V(n,t,this._panelCellFeedback):e.prototype._getDragTracker.call(this,t,i,o)},i.prototype.getNextRequest=function(t,i,n,r){if(!(t instanceof g.ColumnMoveRequest&&t.layout instanceof _.CellLayoutColumnItem))return t instanceof B&&t.layout instanceof _.CellLayoutColumnItem&&i instanceof o.HeaderCellFeedback?this._colMoveReq.init(t.layout,n,r,null):e.prototype.getNextRequest.call(this,t,i,n,r);var s=this.grid,a=t.layout.firstColumn;return s.groupingOptions.enabled&&s.layoutManager.topPanelVisible&&a instanceof x.DataColumn&&a.groupable&&r+3e.contentBounds.y&&t.removeGroupByField(this._request.field)},i.prototype._doEnded=function(){this.grid.removeFeedbackElement(this._feedback)},i}(y.GridDragTracker),B=function(e){function i(){return e.call(this)||this}return t.__extends(i,e),i.prototype._doDispose=function(){this._layout=null,this._source=null,e.prototype._doDispose.call(this)},_dp(i,"layout",{get:function(){return this._layout}}),_dp(i,"source",{get:function(){return this._source}}),_dp(i,"x",{get:function(){return this._x}}),_dp(i,"y",{get:function(){return this._y}}),i.prototype.init=function(t,e,i,o){return this._layout=t,this._source=e,this._x=i,this._y=o,this},_dp(i,"cursor",{get:function(){return"pointer"}}),i}(m.EditRequest),V=function(e){function i(t,i,o){var n=e.call(this,t,"groupingCellTracker")||this;return n._request=i,n._feedback=o,n}return t.__extends(i,e),i.prototype._doDispose=function(){this._request=null,this._feedback=null,e.prototype._doDispose.call(this)},i.prototype.getRequest=function(){return this._request},i.prototype._doStart=function(t,e,i,o){var n=this.grid,r=this._request.source,s=r instanceof v.VisualElement?r.boundsByContainer():r,a=n.isGroupedField(this._request.layout.firstColumn.dataIndex);return this._feedback.setRect(s),this._feedback.setField(this._request.layout.firstColumn.displayText,a),this._feedback.visible=!0,n.addFeedbackElement(this._feedback),this._offsetX=e-s.x,this._offsetY=s.height/3,!0},i.prototype._doDrag=function(t,e,i,o){return!(i>this.grid.layoutManager.topContentBounds.bottom)&&(e-=this._offsetX,i-=this._offsetY,this._feedback.move(e,i),!0)},i.prototype._doCompleted=function(){var t=this.grid,e=t.layoutManager;if(this.currentY=0)return!0;try{if(n.indexOf("rg-editor")>=0&&i.$_owner._grid.container!==this)return!1;if(n.indexOf("rg-root")>=0&&i!==this._containerDom)return!1;if(e.isEditing())for(var s=i;s;){if((s.className||"").indexOf("rg-")>=0)return!0;s=s.parentElement}}catch(t){r.Utils.log("check outer elements fail => ".concat(i))}return!1}},o.prototype._doPrepareContainer=function(t,e,o){t.className="rg-root rg-grid",r.Utils.isMobile()&&(t.style.touchAction="unset"),this._gridView=this._createGridView(e,o),this.addElement(this._gridView),this._heightMeasurer=new a(this.measurer),this._sizeInfo=new i.Rectangle(0,0,t.clientWidth,t.clientHeight)},o.prototype._createDefaultTool=function(){return new n.GridViewSelectionTool(this)},o.prototype._doLayout=function(t){var e=this._gridView,i=t.clone();e.setRect(i),i.x=i.y=0,e.$_layout(i)},o.prototype._layoutChildren=function(t){var e=this;this._sizeInfo.width=t.width,this._sizeInfo.height=t.height,(isNaN(this._zoomRatio)||this._gridView&&this._gridView._loading)&&(this._zoomRatio=r.Utils.getZoom(this._containerDom),setTimeout((function(){!e.disposing&&(e._zoomRatio=r.Utils.getZoom(e._containerDom,!0))}),500))},o.prototype._doBeforeRender=function(){var t=this.gridView,e=t._dom;if(e&&e.scrollLeft>0){var i=e.scrollLeft;t.leftPos=i,e.scrollLeft=0}t.visible&&t.$_beforeRender()},o.prototype._doAfterRender=function(){if(!this.gridView.fitSyncHeight()){var t=this._containerDom.parentElement;this._orgCssHeight=t.style.height}this._gridView.visible&&this._gridView.$_afterRender()},o.prototype._doPrepareRender=function(t){var e=t.clone();this._gridView.visible&&(this._gridView.setRect(e),e.x=e.y=0,this._gridView.$_prepareRender(e))},o.prototype._focusChanged=function(t,e,i){this._gridView&&this._gridView._fireGridFocusChanged(t,e,i)},o.prototype._createGridView=function(t,e){return new n.GridView(this,t,e)},o.prototype._resizeHandler=function(t){if(null==this._watchTimer){var e=this;this._resizeTimer=setTimeout((function(){e._displayObserver()}),100)}},o.prototype.$_displayObserver=function(){var t=this._containerDom,e=t.clientWidth,i=t.clientHeight,o=this._sizeInfo;e>0&&i>0&&(Math.abs(this._sizeInfo.width-e)>=1||Math.abs(this._sizeInfo.height-i)>=1)&&(this._gridView.fitSyncHeight()||(this._orgCssHeight=t.parentElement.style.height),o.width=e,o.height=i,this.invalidateLayout(),this._doResized(null))},o}(o.VisualContainer);eh.GridContainer=s;var a=function(e){function i(t){var i=e.call(this)||this;return i._bodyStyle="rg-body",i._summaryStyle="rg-header-summary",i._footerStyle="rg-footer",i._dataRowStyle="rg-data-row",i._summaryRowStyle="",i._footerRowStyle="",i._groupFooterStyle="rg-rowgroup-footer",i._dataCellStyle="rg-data-cell",i._summaryCellStyle="rg-header-summary-cell",i._footerCellStyle="rg-footer-cell",i._groupFooterCellStyle="rg-rowgroup-footer-cell",i._rowHeight=0,i._headerHeight=0,i._summaryHeight=0,i._footerHeight=0,i._gfooterHeight=0,i._dirty=!0,i._container=t,i.$_prepareElements(t),i}return t.__extends(i,e),i.prototype._doDispose=function(){this._container=null,e.prototype._doDispose.call(this)},_dp(i,"rowHeight",{get:function(){return this._rowHeight||(this._rowHeight=this.$_measure(this._bodyStyle,this._dataRowStyle,this._dataCellStyle))}}),i.prototype.headerHeight=function(t,e,i){return this._headerHeight||(this._headerHeight=this.$_measure(t,e,i)+1)},_dp(i,"summaryHeight",{get:function(){return this._summaryHeight||(this._summaryHeight=this.$_measure(this._summaryStyle,this._summaryRowStyle,this._summaryCellStyle))}}),_dp(i,"footerHeight",{get:function(){return this._footerHeight||(this._footerHeight=this.$_measure(this._footerStyle,this._footerRowStyle,this._footerCellStyle))}}),_dp(i,"groupFooterHeight",{get:function(){return this._gfooterHeight||this.$_measure(this._bodyStyle,this._groupFooterStyle,this._groupFooterCellStyle)}}),i.prototype.measure=function(t){this._dirty&&(this._dirty=!1)},i.prototype.invalidate=function(){this._dirty=!0},i.prototype.$_prepareElements=function(t){var e=(0,r.getDoc)(t),i=e.createElement("table");i.setAttribute("inert","");var o=i.createCaption();o.textContent="grid measurer table",o.style.width=o.style.height="0px",o.style.padding="none",o.style.boxSizing="border-box",o.style.overflow="hidden",i.createTHead().appendChild(document.createElement("tr")).appendChild(document.createElement("th")).scope="col",t.appendChild(i);var n=i.style;n.width="1000px",n.height="1px",n.left="-10000px",n.position="absolute",i.className="rg-table";var s=e.createElement("tbody");i.appendChild(s);var a=e.createElement("tr");s.appendChild(a);var l=e.createElement("td");l.className="rg-data-cell",a.appendChild(l);var h=e.createElement("div");l.appendChild(h),h[r.Utils.TextProp]="AYwyhi우리테크"},i.prototype.$_measure=function(t,e,i){var o=this._container,n=this._container.firstElementChild.tBodies[0].rows[0],r=n.cells[0];return o.className=t,n.className=e,r.className=i,n.offsetHeight},i.prototype.getTdStyle=function(t,e,i,o){var n=this._container;n.className=o||"",t&&(n.className+=" "+t);var s=this._container.firstElementChild.tBodies[0].rows[0].cells[0];s.style.cssText="",s.className=e,i&&"object"==typeof i&&r.Utils.assign(s.style,i);var a=(0,r.getWin)(n).getComputedStyle(s);return r.Utils.snapshotStyle(a)},i.prototype.getTrStyle=function(t,e,i,o){var n=this._container;n.className=o||"",t&&(n.className+=" "+t);var s=this._container.firstElementChild.tBodies[0].rows[0];s.style.cssText="",s.className=e+" ",i&&"object"==typeof i&&r.Utils.assign(s.style,i);var a=(0,r.getWin)(n).getComputedStyle(s);return r.Utils.snapshotStyle(a)},i}(e.Base);return eh.GridMeasurer=a,eh}var oh,nh={};var rh,sh,ah,lh,hh,uh={};function dh(){if(sh)return th;sh=1,Object.defineProperty(th,"__esModule",{value:!0}),th.TreeGridLayoutManager=th.TreeView=th.TreeContainer=th.TreeViewSelectionTool=void 0;var t=d,e=ml(),i=ih(),o=Hr(),n=ma(),r=Go(),s=uo(),a=Xo(),l=cn(),h=function(){if(oh)return nh;oh=1,Object.defineProperty(nh,"__esModule",{value:!0}),nh.TreeOptions=void 0;var t=d,e=_r(),i=C(),o=function(e){function o(t){var o=e.call(this,t)||this;return o._levelIndent=16,o._lineVisible=!0,o._showCheckBox=!1,o._iconImagesRoot="",o._defaultIcon=-1,o._collapseWhenLeftKey=!0,o._collapseWhenCtrlKey=!0,o._expandWhenRightKey=!0,o._expandWhenCtrlKey=!0,o._iconVisible=!0,o._expanderIconStyle=i.TreeExpanderIconStyle.TRIANGLE,o._expandedIcon=-1,o._collapsedIcon=-1,o._recursiveSoftDeleting=!1,o}return t.__extends(o,e),o.prototype._doDispose=function(){e.prototype._doDispose.call(this)},_dp(o,"levelIndent",{get:function(){return this._levelIndent}}),_dp(o,"lineVisible",{get:function(){return this._lineVisible},set:function(t){t!=this._lineVisible&&(this._lineVisible=t,this._changed())}}),_dp(o,"showCheckBox",{get:function(){return this._showCheckBox},set:function(t){t!=this._showCheckBox&&(this._showCheckBox=t,this._changed())}}),_dp(o,"iconImagesRoot",{get:function(){return this._iconImagesRoot},set:function(t){t!==this._iconImagesRoot&&(this._iconImagesRoot=t,this._changed())}}),_dp(o,"iconImages",{get:function(){return this._iconImages},set:function(t){t!==this._iconImages&&(this._iconImages=t?t.slice():[],this._changed())}}),_dp(o,"defaultIcon",{get:function(){return this._defaultIcon},set:function(t){t!=this._defaultIcon&&(this._defaultIcon=t,this._changed())}}),_dp(o,"expandedIcon",{get:function(){return this._expandedIcon},set:function(t){t!=this._expandedIcon&&(this._expandedIcon=t,this._changed())}}),_dp(o,"collapsedIcon",{get:function(){return this._collapsedIcon},set:function(t){t!=this._collapsedIcon&&(this._collapsedIcon=t,this._changed())}}),_dp(o,"iconCallback",{get:function(){return this._iconCallback},set:function(t){t!=this._iconCallback&&(this._iconCallback=t,this._changed())}}),_dp(o,"collapseWhenLeftKey",{get:function(){return this._collapseWhenLeftKey},set:function(t){this._collapseWhenLeftKey=t}}),_dp(o,"collapseWhenCtrlKey",{get:function(){return this._collapseWhenCtrlKey},set:function(t){this._collapseWhenCtrlKey=t}}),_dp(o,"expandWhenRightKey",{get:function(){return this._expandWhenRightKey},set:function(t){this._expandWhenRightKey=t}}),_dp(o,"expandWhenCtrlKey",{get:function(){return this._expandWhenCtrlKey},set:function(t){this._expandWhenCtrlKey=t}}),_dp(o,"iconVisible",{get:function(){return this._iconVisible},set:function(t){t!=this._iconVisible&&(this._iconVisible=t,this._changed())}}),_dp(o,"expanderIconStyle",{get:function(){return this._expanderIconStyle},set:function(t){t!=this._expanderIconStyle&&(this._expanderIconStyle=t,this._changed())}}),_dp(o,"recursiveDeleting",{get:function(){return this._recursiveSoftDeleting},set:function(t){this._recursiveSoftDeleting=t}}),_dp(o,"expandWhenSetData",{get:function(){return this._expandWhenSetData},set:function(t){t!==this._expandWhenSetData&&(this._expandWhenSetData=t,this._changed())}}),_dp(o,"templateOptions",{get:function(){return this._templateOptions},set:function(t){this._templateOptions=t,this._templateChanged=!0,this._changed()}}),o}(e.GridBaseOptions);return nh.TreeOptions=o,nh}(),u=C(),c=Pn(),p=(rh||(rh=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.TreeLinesElement=t.RightTreeBodyElement=t.FixedTreeBodyElement=t.TreeBodyElement=t.RightTreeItemElement=t.FixedTreeItemElement=t.TreeItemElement=t.TreeCellRenderer=t.TREE_INDENT=t.TreeExpandHandle=void 0;var e=d,i=Ar(),o=Vr(),n=zl(),r=jn(),s=Go(),a=To(),l=S(),h=C(),u=Fo(),c=Oo(),p=function(t){function i(e,i){var o=t.call(this,e,i,"treeExpandHandle")||this;return o._expanded=!1,o.clickable=!0,o}return e.__extends(i,t),_dp(i,"expanded",{get:function(){return this._expanded},set:function(t){t!=this._expanded&&(this._expanded=t,this._changed())}}),i.prototype._createDom=function(){return null},i}(n.CellHandle);t.TreeExpandHandle=p,t.TREE_INDENT=3;var _=function(i){function o(t){var e=i.call(this)||this;return e._exclusive=!1,e.assignFrom(t),e}return e.__extends(o,i),o.prototype._doDispose=function(){this._dom.style.removeProperty("padding-left"),this._expander=this._check=this._icon=this._span=this._label=this._checkImage=null,i.prototype._doDispose.call(this)},_dp(o,"template",{get:function(){return this._parser&&this._parser.template},set:function(t){t!=this.template&&(this._parser||(this._parser=new u.HtmlTemplateParser),this._parser.template=t)}}),_dp(o,"valueCallback",{get:function(){return this._valueCallback},set:function(t){this._valueCallback=t}}),_dp(o,"callback",{get:function(){return this._callback},set:function(t){this._callback=t}}),_dp(o,"templateEvents",{get:function(){return this._templateEvents},set:function(t){this._templateEvents=l.Utils.makeArray(t)}}),_dp(o,"inputFocusable",{get:function(){return this._inputFocusable},set:function(t){this._inputFocusable=t}}),_dp(o,"renderCallback",{get:function(){return this._renderCallback},set:function(t){this._renderCallback=t}}),_dp(o,"type",{get:function(){return o.TYPE}}),_dp(o,"styleName",{get:function(){var t=o.STYLE_NAME;return null==this.template&&null==this.callback||(t+=" rg-tree-template"),t}}),o.prototype.canClick=function(t){var e=(0,l.getWin)(this._dom),i=t.target;return!(i instanceof e.HTMLTableCellElement&&i.className.indexOf("rg-")>=0||this._div===i)},o.prototype._doClick=function(t,e,i){return{type:this.type,target:i||e.target,value:t.value}},o.prototype.$_setHtml=function(t,e){if(t!=this._html){var i=this._div;return this._html=t,i.innerHTML=t,this.renderCallback=e&&(0,c.attachTemplateEvent)(i,e),!0}return!1},o.prototype._doInitContent=function(t){var e=(0,l.getDoc)(t),i=this._expander=e.createElement("span");t.appendChild(i);var o=this._check=e.createElement("input");o.type="checkbox",o.className="rg-tree-checkbox",o.style.display="inline-block",(this._checkImage=e.createElement("label")).style.display="none";var n=this._icon=e.createElement("img");n.className="rg-tree-icon",n.alt="",t.appendChild(n);var r=this._span=e.createElement("span");t.appendChild(r);var s=this._div=e.createElement("div");s.style.display="none",t.appendChild(s);var a=this._label=e.createElement("label");a.style.display="none",t.appendChild(a)},o.prototype._doRenderCell=function(e,i,n,r,s){var a=e,u=a.treeOptions,d=u.showCheckBox,c=u.levelIndent,p=this._expander,_=this._dom,f=this._check,g=this._icon,m=this._span,y=this._label,v=i.item,C=n.cell,w=this._checkImage,x=e.checkBar,b=u.expanderIconStyle===h.TreeExpanderIconStyle.SQUARE?" square":"";if(p.className=v.isLeaf?"rg-tree-leaf":v.expanded?"rg-tree-expanded"+b:"rg-tree-collapsed"+b,e.accessibility&&(v.isLeaf?C.removeAttribute("aria-expanded"):C.setAttribute("aria-expanded",v.expanded?"true":"false")),this._exclusive!=x.exclusive&&(this._exclusive=x.exclusive,f.setAttribute("type",this._exclusive?"radio":"checkbox"),f.className=this._exclusive?"rg-tree-radio":"rg-tree-checkbox"),f.disabled=!(a.editOptions.checkable&&v.checkable),d){f.checked=v.checked,f.indeterminate=v.indeterminate;var I=f.id=o.FOR_ID+i.item.index+"-"+e.$_hash;if(y.setAttribute("for",I),y[l.Utils.TextProp]=this._makeText(e,i,n)+(f.checked?" checked":" unchecked"),x.useImages){f.style.display="none",w.style.display="inline-block",w.parentElement||(_.insertBefore(w,this._span),_.insertBefore(f,this._span)),w.setAttribute("for",I);var E="rg-tree-checkimage";E+=" ".concat(!x.exclusive&&v.indeterminate?"indeterminate":v.checked?"checked":"unchecked"),E+=" ".concat(x.exclusive?" radio":""),E+=" ".concat(f.disabled?" disabled":""),w.className=E.trim()}else f.style.display="inline-block",w.style.display="none",f.parentElement||_.insertBefore(f,this._span)}else f.parentElement&&(l.Utils.detach(f),l.Utils.detach(w));if(u.iconVisible){g.parentElement||_.insertBefore(g,this._span);var S=e.getTreeIcon(v);S?(g.src=S,g.removeAttribute("height"),g.style.removeProperty("visibility")):(g.removeAttribute("src"),g.height=1,g.style.visibility="hidden")}else g.parentElement&&_.removeChild(g);if(null!=this.template||null!=this.callback){var R=u.templateOptions;this._span.style.display="none",this._div.style.display="inline-block";var T,D=R.callback,k=l.Utils.makeArray(R.templateEvents);T=D?this.$_setHtml(D.call(this,e.handler,i,r,s),k):this.$_setHtml(this._parser.realize(e,i,n,R.valueCallback),k),this.renderCallback&&this.renderCallback.forEach((function(t){t.callback.call(null,e.handler,i,t.elt,T)}))}else this._span.style.removeProperty("display"),this._div.style.display="none",m[l.Utils.TextProp]=this._makeText(e,i,n);_.style.setProperty("padding-left",t.TREE_INDENT+(v.level-1)*c+"px","important")},o.TYPE="tree",o.FOR_ID="$$-tree-check",o.STYLE="rg-tree-renderer",o.STYLE_NAME="rg-renderer "+o.STYLE,o}(a.DataCellRenderer);t.TreeCellRenderer=_;var f=function(t){function i(e){return t.call(this,e,"treeItemView")||this}return e.__extends(i,t),i.prototype.isCheckBox=function(t){var e=t.className;return"rg-tree-checkbox"==e||"rg-tree-radio"==e},i.prototype.isCheckImage=function(t){var e=t.className;return e&&e.indexOf("rg-tree-checkimage")>=0},i.prototype._doLayoutContent=function(e){t.prototype._doLayoutContent.call(this,e)},i.prototype._createRenderer=function(i,o,n,r,s){var a=i;if(this.isTreeCell(i,o)){var l=a&&a.treeOptions.templateOptions;return new _(e.__assign(e.__assign({},r),l))}return t.prototype._createRenderer.call(this,i,o,n,r,s)},i.prototype.$_getRenderer=function(e,i,o,n,r){var s=e;return this.isTreeCell(e,i)&&s.treeOptions._templateChanged&&(r.rendererChanged=!0),t.prototype.$_getRenderer.call(this,e,i,o,n,r)},i.prototype.$_getDefaultRenderer=function(t,e){return this.isTreeCell(t,e)?_.TYPE:a.TextCellRenderer.TYPE},i.prototype.isTreeCell=function(t,e){return 0===t.layoutManager.getHorzColumnIndex(e.valueColumn.layout)},i}(o.RowElement);t.TreeItemElement=f;var g=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(i,t),i.prototype._getFirstCell=function(t){return this._getStartCell(t)},i.prototype._getLastCell=function(t){return this._getEndCell(t)},i.prototype._getStartCell=function(t){return 0},i.prototype._getEndCell=function(t){return t.fixedCellCount-1},i}(f);t.FixedTreeItemElement=g;var m=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(i,t),i.prototype._getFirstCell=function(t){return this._getStartCell(t)},i.prototype._getLastCell=function(t){return this._getEndCell(t)},i.prototype._getStartCell=function(t){return t.cellCount-t.rightCellCount},i.prototype._getEndCell=function(t){return t.cellCount-1},i}(f);t.RightTreeItemElement=m;var y=function(t){function i(e,i){return t.call(this,e,i)||this}return e.__extends(i,t),i.prototype.isTreeCell=function(t){var e=this.bodyCellAt(t);return e&&e.renderer2 instanceof _},i.prototype.createRowElement=function(){return new f(this.doc)},i}(i.GridBodyElement);t.TreeBodyElement=y;var v=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(i,t),i.prototype.isTreeCell=function(t){var e=this.bodyCellAt(t);return e&&e.renderer2 instanceof _},i.prototype.createRowElement=function(){return new g(this.doc)},i}(i.FixedBodyElement);t.FixedTreeBodyElement=v;var w=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(i,t),i.prototype.isTreeCell=function(t){var e=this.bodyCellAt(t);return e&&e.renderer2 instanceof _},i.prototype.createRowElement=function(){return new m(this.doc)},i}(i.RightBodyElement);t.RightTreeBodyElement=w;var x=function(i){function o(t){var e=i.call(this,t.doc)||this;return e._levelWidth=16,e._handleWidth=9,e._handleHeight=9,e._stroke="gray",e._linePool=[],e._lines=[],e._startIndex=-1,e._endIndex=-1,e._treeView=t,e}return e.__extends(o,i),o.prototype._doDispose=function(){this._linePool=null,this._lines=null,i.prototype._doDispose.call(this)},_dp(o,"levelWidth",{get:function(){return this._levelWidth},set:function(t){t!=this._levelWidth&&(this._levelWidth=t,this.invalidate())}}),_dp(o,"handleWidth",{get:function(){return this._handleWidth},set:function(t){t!=this._handleWidth&&(this._handleWidth=t,this.invalidate())}}),_dp(o,"handleHeight",{get:function(){return this._handleHeight},set:function(t){t!=this._handleHeight&&(this._handleHeight=t,this.invalidate())}}),_dp(o,"stroke",{get:function(){return this._stroke},set:function(t){t!=this._stroke&&(this._stroke=t,this.invalidate())}}),o.prototype.setRange=function(t,e,i){e==this._startIndex&&i==this._endIndex||(this._startIndex=e,this._endIndex=i,this.invalidate())},o.prototype.layout=function(t){var e=this._treeView;if(this.$_hideAll(),!(!e||this._startIndex<0||this._endIndex<0||this._startIndex>this._endIndex)){var i,o=null;for(i=this._startIndex;i<=this._endIndex&&!(o=e.getItem(i));i++);if(o){var n=o.level;if(n>1||o.childIndex>0){for(var r=0;r=i&&(a=this.$_findLevelItem(r+1,i),this.$_drawVertLine(t,this.$_borrowLine(),null,a,s.level))}o.childIndex>0&&this.$_drawVertLine(t,this.$_borrowLine(),null,o,o.parent.level)}for(;i<=this._endIndex;i++){var a,l=(o=e.getItem(i)).parent;(r=o.childIndex)this._endIndex&&(a=null),this.$_drawVertLine(t,this.$_borrowLine(),o,a,l.level)),(l=o)&&l.expanded&&l.count>0&&((a=l.getItem(0)).index>this._endIndex&&(a=null),this.$_drawChildLine(t,this.$_borrowLine(),o,a)),this.$_drawHorzLine(t,this.$_borrowLine(),o)}}}},o.prototype._getCssSelector=function(){return"rg-tree-lines"},o.prototype._initDom=function(t){i.prototype._initDom.call(this,t);var e=t.style;e.setProperty("pointer-events","none","important"),e.setProperty("overflow","hidden")},o.prototype._doDraw=function(t){},o.prototype.$_borrowLine=function(){var t=this._linePool.pop();return t||((t=this._treeView.doc.createElement("div")).className="rg-tree-line",t.style.position="absolute",this._dom.appendChild(t)),t.style.display="inline-block",this._lines.push(t),t},o.prototype.$_hideAll=function(){for(var t=this._lines.length-1;t>=0;t--)"none"!=this._lines[t].style.display&&(this._lines[t].style.display="none");this._linePool=this._linePool.concat(this._lines.splice(0,this._lines.length))},o.prototype.$_findLevelItem=function(t,e){for(var i=e;i<=this._endIndex;i++){var o=this._treeView.getItem(i);if(o&&o.level==t)return o}return null},o.prototype.$_setBounds=function(e,i,o,n,r){var s=e.style;s.left=t.TREE_INDENT+i+"px",s.top=o+"px",s.width=1==n?"1px":n+"px",s.height=1==r?"1px":r+"px"},o.prototype.$_drawVertLine=function(t,e,i,o,n){var r=t.topIndex,a=n*this._levelWidth+this._levelWidth/2,l=0,h=this.height,u=this._handleHeight;if(i){var d=t.getItemBounds(i.index-r),c=i instanceof s.TreeItem&&i.hasChildren?u+2:0;l=d.y+d.height/2+c/2+1}o&&(d=t.getItemBounds(o.index-r),c=o instanceof s.TreeItem&&o.hasChildren?u:0,h=d.y+d.height/2-c/2),this.$_setBounds(e,a,l,1,h-l)},o.prototype.$_drawHorzLine=function(t,e,i){var o,n=t.topIndex,r=i.parent.level*this._levelWidth+this._levelWidth/2,s=i.level*this._levelWidth+1;i.hasChildren&&(r+=this._handleWidth/2+1);var a=t.getItemBounds(i.index-n);o=a.y+a.height/2,this.$_setBounds(e,r,o,s-r,1)},o.prototype.$_drawChildLine=function(t,e,i,o){var n,r=t.topIndex,s=i.level*this._levelWidth+this._levelWidth/2,a=this.height,l=t.getItemBounds(i.index-r);if(n=l.y+l.height/2+5,o){l=t.getItemBounds(o.index-r);var h=o.hasChildren?this._handleHeight:0;a=l.y+l.height/2-h/2}this.$_setBounds(e,s,n,1,a-n)},o}(r.LayerElement);t.TreeLinesElement=x}(uh)),uh),_=Zn(),f=S(),g=Vr(),m=function(e){function i(t){return e.call(this,t,"treeViewSelectionTool")||this}return t.__extends(i,e),i.prototype._doDispose=function(){e.prototype._doDispose.call(this)},i.prototype._doKeyDown=function(t){var i,o=this.focused.clone(),n=this.grid.treeOptions,s=t.which,a=f.Utils.ctrlKey(t);if(o&&(i=o.item))switch(s){case 39:if(!a&&1==this.grid.visibleLayoutCount&&o.isRight&&n.expandWhenRightKey||a&&n.expandWhenCtrlKey){if(!i.expanded)return i.setExpanded(!0,!1,!1),!0;if(i.count>0)return o.down(),this.setFocused(o,!0,!0),!0}break;case 37:if(!a&&o.isLeft&&n.collapseWhenLeftKey||a&&n.collapseWhenCtrlKey){if(i.expanded)return i.setExpanded(!1,!1,!1),!0;if(!(i.parent instanceof r.RootTreeItem))return o.itemIndex=i.parent.index,this.setFocused(o,!0,!0),!0}}return e.prototype._doKeyDown.call(this,t)},i.prototype._doPointerDown=function(t){var i=t.mouseX,o=t.mouseY,n=t.altKey,s=this.grid,a=this.findElementAt(i,o,!1),l=this.mouseEventTarget;if(a instanceof p.TreeItemElement&&g.RowElement.isExpander(l)&&!n){var h=a._item;h instanceof r.TreeItem&&(h.expanded?s.collapse(h,!1):s.expand(h,!1,!1))}e.prototype._doPointerDown.call(this,t)},i.prototype._doClick=function(t,i,o){i=i||t.mouseX,o=o||t.mouseY;var n=t.shiftKey,r=this.grid,s=r.checkBar,a=this.findElementAt(i,o,!1),l=t.target;if(a instanceof p.TreeItemElement){if(a.isCheckImage(l))return;if(a.isCheckBox(l)){var h=r.getItem(a.itemIndex);r.editOptions.checkable&&h.checkable?(s.exclusive&&s.toggleRadio&&(l.checked=!h.checked),this._doCheck(l,h,n)):t.preventDefault()}}e.prototype._doClick.call(this,t,i,o)},i.prototype._canMoveRowAt=function(t,e,i){var o=t.boundsByContainer(t.getCellRectAt(this.grid.layoutManager,e,!1)),n=p.TREE_INDENT+(e.item.level-1)*this.grid.treeOptions.levelIndent;if(i1)for(var s=r[0].level,a=1;a-1?e.expandedIcon:t.hasChildren&&t.collapsed&&e.collapsedIcon>-1?e.collapsedIcon:t.iconIndex;var n=e.iconCallback;if(n){var r=n(this.handler,t.index,t.dataRow,o);if("string"==typeof r)return r;isNaN(r)||(o=r)}if((o<0||o>=i.length)&&(o=e.defaultIcon),o>=0&&o=0?this.getItem(t.itemIndex):t.dataRow>=0?this.getItemOfRow(t.dataRow,!1):0===t.level&&-1===t.parentId?this.itemSource.rootItem:null},i.prototype.getJsonRows=function(){return this._rs.getJsonRows()},_dp(i,"dataSource",{get:function(){return this._rs&&this._rs.dataSource},set:function(t){this._rs&&(this._rs.dataSource=t)}}),_dp(i,"maxItemCount",{get:function(){return this._rs?this._rs.maxItemCount:0},set:function(t){this._rs&&(this._rs.maxItemCount=t)}}),_dp(i,"summarizer",{get:function(){return this._rs.summarizer}}),i.prototype._initStyles=function(){e.prototype._initStyles.call(this),this._treeOptions=new h.TreeOptions(this)},i.prototype._createItemSource=function(){var t=new a.TreeGridItemProvider(!0);return t.setSortingOptions(this.sortingOptions),t},i.prototype._doContentPanesCreated=function(){this._linesView=new p.TreeLinesElement(this),this.addElement(this._linesView)},i.prototype._createSidePane=function(){return e.prototype._createSidePane.call(this)},i.prototype._createLayoutManager=function(){return new b(this)},i.prototype._createBodyView=function(t){return new p.TreeBodyElement(this.doc,t)},i.prototype._createFixedBodyView=function(t){return new p.FixedTreeBodyElement(this.doc,t)},i.prototype._createRightBodyView=function(t){return new p.RightTreeBodyElement(this.doc,t)},i.prototype._visualObjectChanged=function(t){e.prototype._visualObjectChanged.call(this,t),c.CheckBar},i.prototype.append=function(t,e){return this.insert(this._rs.rootItem,!1,!0,t,e)},i.prototype._doCanInsert=function(t,e,i){return t&&(t.count>0||!i||0==t.level||this.editOptions.appendable)},i.prototype._doMaxRowCountChanged=function(){this._rs.maxItemCount=this.maxItemCount},i.prototype.getSortFields=function(){return this._rs.getSortFields()},i.prototype.getSortDirections=function(){return this._rs.getSortDirections()},i.prototype.getSortCases=function(){return this._rs.getSortCases()},i.prototype._doSortItems=function(t,e,i){this._rs.setLabelComparer(this._doPrepareComparer(t)),this._rs.orderBy(t,e,i)},i.prototype._doColumnFiltersChanged=function(t,e,i){this._rs.includeParentItem=this.filteringOptions.includeParentItem,this.applyFilters(t,e,i)},i.prototype.setOptions=function(t){if(t){var i=this._rs;void 0!==t.hideDeleted&&(i.hideDeleted=t.hideDeleted),void 0!==t.hideDeletedRows&&(i.hideDeleted=t.hideDeletedRows),void 0!==t.summaryMode&&(i.summaryMode=t.summaryMode),void 0!==t.sortMode&&(i.sortMode=t.sortMode),e.prototype.setOptions.call(this,t)}},i.prototype._doPrepareRender=function(t){var i=this._horzScrolled;e.prototype._doPrepareRender.call(this,t),i&&this.layoutManager.$_layoutLines()},i.prototype.$_doLayout=function(t,i){this._treeOptions,e.prototype.$_doLayout.call(this,t,i)},i.prototype.assignImageList=function(t){},i.prototype.getEditBounds=function(t,i){return e.prototype.getEditBounds.call(this,t,i)},i.prototype.updatePastedRow=function(t,e,i){if(t instanceof r.TreeItem){var o=t.row;o&&o.update(e,i)}},i.prototype.appendPastedRow=function(t){var e=this.dataSource;if(e){var i=e.createRow(t,-1,!1);return e.rootRow.addChild(i,!1),i.rowId}},_dp(i,"undoable",{get:function(){return this._rs.undoable},set:function(t){this._rs.undoable=t}}),_dp(i,"canUndo",{get:function(){return this._rs.canUndo}}),_dp(i,"canRedo",{get:function(){return this._rs.canRedo}}),_dp(i,"undoing",{get:function(){return this._rs.undoing}}),_dp(i,"redoing",{get:function(){return this._rs.redoing}}),i.prototype.undo=function(){return!!this._rs.canUndo&&(this._rs.cancelWhenLastUndo=this.editOptions.cancelWhenLastUndo,this.editController.cancelEditor(!0),this._rs.undo(),!0)},i.prototype.redo=function(){return!!this._rs.canRedo&&(this._rs.redo(),!0)},i.prototype.execute=function(t){this._rs.execute(t)},i.prototype.clearCommandStack=function(t){void 0===t&&(t=!0),this._rs.clearCommandStack(t)},i.prototype.getFirstRow=function(){return null},i.prototype.getLastRow=function(){return null},i.prototype.getPrevRow=function(t){return null},i.prototype.getNextRow=function(t){return null},i.prototype.canMoveRows=function(t,e,i){if(i&&this.canMoveRow(e,!1)&&t&&t.length>0){var o=t[0].parent;if(o!==i.parent)return!1;for(var n=1,r=t.length;n=r.children.length&&o>0||0===n.childIndex&&o<0)return;var s=this.getItem(i+o);if(n.level===s.level)return s;var a=n.childIndex+o;if(!r||a<0||a>=r.children.length)return;return r.children[a]}return this.getItem(i+o)},i.prototype._doMoveRows=function(t,e){var i=e&&e.dataId;if(i>=0){for(var o=[],n=0,r=t;n=0&&o.push(a)}if(o.length>0){var l=this.dataSource,h=l.rowsByIds(o,!1);if(h.length>0)return l.moveRows(h,l.rowById(i))}}return!1},i.prototype._fitLayoutWidth=function(t){if(!t.visible)return 0;var e,i=this.itemSource,o=this.getIndex(this.topIndex,t.firstColumn),n="",r=0;e=n=t.firstColumn.header.displayText;var s,a=this.getBodyCellAt(o,!1),l=a&&a.renderer2&&a.renderer2._dom,h=a&&a.renderer2 instanceof p.TreeCellRenderer,d={0:f.Utils.getTextLength(e)},c={0:e};if(l){var g=(0,f.getWin)(l).getComputedStyle(l);if(g){n=g.paddingLeft;var m=parseInt(n.substr(0,n.indexOf("px")));r+=m>0?m:0,n=g.paddingRight,r+=(m=parseInt(n.substr(0,n.indexOf("px"))))>0?m:0,s={fontSize:g.fontSize,fontFamily:g.fontFamily,fontWeight:g.fontWeight,fontStyle:g.fontStyle}}}for(var y=0,v=i.itemCount;yd[I]&&(d[I]=f.Utils.getTextLength(n),c[I]=n)}for(var C=0,w=0,x=0,b=Object.keys(d);x0,o=(i?this.fixedBodyBounds:this.bodyBounds).clone();i?(o.y+=this.fixedContentBounds.y,o.x+=this.fixedContentBounds.x):(o.y+=this.contentBounds.y,o.x+=this.contentBounds.x),this.layoutCount>0?o.width=Math.max(0,this.getLayoutWidth(0)):o.width=0,e.setRect(o),e.levelWidth=16,e.setRange(t,this.topIndex,Math.min(t.itemCount,this.topIndex+this.itemCount)-1),e.layout(this)}},i}(o.GridLayoutManager);return th.TreeGridLayoutManager=b,th}function ch(){if(lh)return Vi;lh=1,Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.TreeView=Vi.GridView=Vi.GridBase=void 0;var t=d,e=C(),i=S(),o=G(),n=ji(),r=Gi(),s=cn(),a=ml(),l=rn(),h=Oi(),u=Ci(),c=Ee(),p=Go(),_=zn(),f=Ro(),g=function(){if(vl)return Cl;vl=1,Object.defineProperty(Cl,"__esModule",{value:!0}),Cl.GridCsvExporter=void 0;var t=d,e=Si(),i=xl(),o=rn(),n=cn(),r=C(),s=Go(),a=S(),l=S(),h=rt(),u=function(i){function u(){return i.call(this)||this}return t.__extends(u,i),u.prototype.dispose=function(){return i.prototype.dispose.call(this),null},u.prototype.export=function(t,e){i.prototype.export.call(this,t,e);var n=this._exportOptions=e;this._cols=[];var r=t.collectColumns(!0,!0,!0);this._cols=r.filter((function(t){return t instanceof o.ValueColumn}));var s=this.indicator=n.indicatorVisible(t)?t.rowIndicator:null;this.header=n.headerVisible(t),this.headerSummary=n.headerSummaryVisible(t),this.footer=n.footerVisible(t),this.indicatorHead=s&&a.Utils.toStr(s.headText),this.indicatorFoot=s&&a.Utils.toStr(s.footText),this.indicatorSummary=s&&a.Utils.toStr(s.sumText),this.done=function(){this.save()},this.buildBook()},u.prototype.prepare=function(){},u.prototype.finallize=function(){},u.prototype.buildBook=function(){this.buildSheet(this.grid)},u.prototype.buildSheet=function(t){this._rows=[],this.header&&this.buildHeader(t),this.headerSummary&&this.buildSummaryItem(t,!1,this._exportOptions.headerSummary),this.buildItems(t),this.footer&&this.buildSummaryItem(t,!0,this._exportOptions.footer),this.done()},u.prototype.addQuatation=function(t,e){return a.Utils.addQuatation(t,e===r.ValueType.TEXT,this._exportOptions.replaceLfText,this._exportOptions.replaceCrText)},u.prototype.buildHeader=function(t){var e=[],i=this._cols;this.indicator&&e.push(this.indicatorHead);for(var o=i.length,n=0;n=this._columns.length)throw new b.ExpressionEvaluationError("Data field index out of bounds:"+e);return this._columns[e]}throw new b.ExpressionEvaluationError("Invalid identifier indexer: "+t)},i.prototype.evaluateIndexerS=function(t,e,o){if(t!=i.ID_EXCELCOLUMN)throw new b.ExpressionEvaluationError("Invalid identifier indexer: "+t);if(this._columns){var r=this._columns.indexOf(e);if(r<0||r>=this._columns.length)throw new b.ExpressionEvaluationError("Column is not exists:"+e);return n.ExcelUtil.toColCaption(r+this._startCol)}},i.ID_EXCELCOLUMN=0,i.ID_ROW=1,i.IDENTS={excelcolumn:i.ID_EXCELCOLUMN,row:i.ID_ROW},i}(b.ExpressionRuntime);Tl.ColumnExportStatementRuntime=k;var M=function(i){function d(){var t=i.call(this)||this;return t._gridIndex=0,t._numberFormatId=0,t._textFormatId=49,t._dateFormatId=14,t._rowLevels=0,t._indentWidth=3,t._seriesCell=new p.SeriesCell,t._excelFormulaRuntime=new k,t}return t.__extends(d,i),d.prototype.dispose=function(){return i.prototype.dispose.call(this),this._seriesCell=this._seriesCell.dispose(),this._linkRenderer=this._linkRenderer&&this._linkRenderer.dispose(),this._templateRenderer=this._templateRenderer&&this._templateRenderer.dispose(),this._imageRenderer=this._imageRenderer&&this._imageRenderer.dispose(),this._bulletRenderer=this._bulletRenderer&&this._bulletRenderer.dispose(),this._barRenderer=this._barRenderer&&this._barRenderer.dispose(),this._signalRenderer=this._signalRenderer&&this._signalRenderer.dispose(),this._excelFormulaRuntime=this._excelFormulaRuntime.dispose(),this._css=null,null},d.prototype._progressCallback=function(t,e,i,o){var n=this._progressGrid,r=this._multiOptions;n&&n.setExportProgress(i,o+r.prepareProgress,r.progressMessage)},d.prototype.getShowOutline=function(){return this._rowGrouped&&this._exportOptions.showLevelOutline},d.prototype.export=function(t,e){if(i.prototype.export.call(this,t,e),this._progressGrid=t,e){var o=this._multiOptions=e,r=this._multiOptions.exportGrids;if(r&&!(r.length<=0)){var s=(0,y.getDoc)(t.container._containerDiv).documentElement;this._css=this.grid.doc.createElement("span").style;var a=new n.ExcelWorkbook(s);if(a.createCoreProperties(o.coreProperties||{creator:"Wooritech"}),this._mergeHeads={},o.showProgress)this.grid.container.cancelRequestAnimation(),this._allCount=this._prepareCount(o,r),this._progressMax=this._allCount+o.prepareProgress,this._progressPos=0,this._progressStep=Math.max(this._allCount/10|0,1),o.progressCallback?this.setProgress=o.progressCallback:(this._progressGrid&&this._progressGrid.beginExportProgress(o.progressMessage),this.setProgress=this._progressCallback),this._exportGridAsync(a,o,this._gridIndex=0,function i(){var n=++this._gridIndex;n0)for(var h=0;h0?n.start:0;var p=n.count>0?n.count:c;c=p>0?this._startItem+p>c?c-this._startItem:p:c-this._startItem}this._indexItem=this._startItem,this._lastItem=this._startItem+c,this._currentRow=n.yOffset,s.setFirstCol(this._startCol=n.xOffset),this._prepareCommonStyles(t),this._buildColumns(t),s.createBorderEdges(o.CssFactory.getSelectorStyle(this._preparer.documentCssStyles,".rg-grid")),this._buildDocumentTitle(r),this.header&&this.buildHeader(t),this.headerSummary&&this.buildSummaryItem(t,!1,n.headerSummary),this.buildItems(t,(function(){i.footer&&i.buildSummaryItem(t,!0,n.footer),i._buildDocumentTail(r),i._buildUserCells(t,r),e&&e()}))},d.prototype.buildHeader=function(e){for(var i=this._workbook,n=i.currentSheet,r=this._preparer,s=r.colCount,a=r.headerRowCount,l=e.header._fitHeights||e.header.heights||[],h=l&&l.length>0?e.header.minRowHeight:Math.max(e.header.height,e.header.minRowHeight*a)/a,u=this._exportOptions,c=[],p=0;p1){for(p=1;p1){for(p=1;p0){for(var w=0;w<_;w++){for(p=0;p0){var N=0,$=E.vindex+1;if(A)for(;N++1||H>1){n.addMerge(b,S,U,H);for(var G=0;G0?b/l:Math.max(n.minHeight,t.heightMeasurer.summaryHeight,b);for(var I=0;I0&&w[I]>0?v.push(w[I]*d.LINE_HEIGHT):y>0&&m[I]>0?v.push(m[I]*n.height/y*d.LINE_HEIGHT):v.push(-1===b?-1:b*d.LINE_HEIGHT)}for(C=0;C0){for(var T=0;T0?G*l:$.rowspan||1,j=$.colspan||1;o.call(this,f,P,L,I,V);for(var z=0,Y=0,q=0;q1||j>1)&&r.addMerge(D,P,z,Y)}else{if(N>0){var J=0,Q=F.vindex+1;if(H)for(;J++=this._lastItem?e&&e():setTimeout((function(){i.buildItems(t,e)}),0)},d.prototype.buildRow=function(t,e){var i,o,n=t.rowGroup,r=this._preparer,s=r.dataRowCount,a=r.colCount,h=t.layoutManager,u=this._columnMerged,p=this._mergeHeads,_=this._indents,f=this._workbook.currentSheet,g=this._currentRow;f.setFirstRow(this._currentRow);var m,y=this._startCol,v=t.displayOptions,C=v.rowHeightCallback;e.index>=0&&C&&(h.getRowHeightOfCallback(t,e.index),m=e.heights);var w=(m=m||h.getDataRowHeights(s)).reduce((function(t,e){return t+e}),0)||e.height;isNaN(w)&&(w=-1===v.rowHeight?-1:Math.max(v.rowHeight||0,v.minRowHeight*s)),w=-1===w?-1:w>0?w/s:w;for(var x=n.expandedAdornments===l.RowGroupAdornments.SUMMARY&&n.mergeMode,b=[],I=0;I0&&e.index==this._startItem&&!x)F=this._buildValueCell(t,f,E,e,k,T,R),p[O]={startRow:S,style:F},B=!0,V=!M.mergeGrouped&&e.isDataRow;else{var N=p[O];E.addBlank(T,N.style||F),(A.isTail(L)||this._lastItem>0&&e.index==this._lastItem-1)&&(P=S-N.startRow+s,f.addMerge(N.startRow,T,P,1+(N.cols||0)),delete p[O]),B=!0,V=!M.mergeGrouped&&e.isDataRow}else if(this.allItems&&!e.visible&&t.isGroupedColumn(M)&&this._mergedGrouped){for(E.addBlank(T,F),B=!0,o=e.parent;M.groupLevel!=o.level&&o;)o=o.parent;var $=p[O]?p[O].startRow:void 0;switch(t.rowGroup.expandedAdornments){case l.RowGroupAdornments.NONE:e==o.firstItem&&e==o.lastDataItem?B=!1:e==o.firstItem?(F=this._buildValueCell(t,f,E,e,k,T,R),p[O]={startRow:S,style:F}):e==o.lastDataItem&&(P=S-$+s,f.addMerge($,T,P,1));break;case l.RowGroupAdornments.BOTH:e==o.lastDataItem&&0==o.footerCount&&(P=S-$+s,f.addMerge($,T,P,1));break;case l.RowGroupAdornments.HEADER:case l.RowGroupAdornments.SUMMARY:e==o.firstItem&&e==o.lastDataItem?p[O]?(P=S-$+s,f.addMerge($,T,P,1),delete p[O]):B=!1:e==o.lastDataItem?(P=S-$+s,f.addMerge($,T,P,1),delete p[O]):o.firstDataItem;break;case l.RowGroupAdornments.FOOTER:e==o.firstItem&&(F=this._buildValueCell(t,f,E,e,k,T,R),p[O]={startRow:S,style:F}),e==o.lastDataItem&&(o.footerCount>0||(P=S-p[O].startRow+s,f.addMerge(p[O].startRow,T,P,1),delete p[O]))}}}if(!B||V){var U=!V&&this._buildValueCell(t,f,E,e,k,T,R),H=k.parent,G=H&&H.vertical,W=!0,j=k.spanCallback,z=j?j(t.handler,k,e.index):void 0;void 0===z&&(z=k.dataSpan),void 0===z&&(W=!1,z=k.cellSpan);var Y=0;if(z>0){var q=0,X=k.vindex+1;if(G)for(z--;q++1&&W)for(tt=1;tttt;tt++)r.getItem(I+tt,i+q).spanned=!0,r.getItem(I+tt,i+q).style=U;r.getItem(I,i+q).spanned=!0,r.getItem(I,i+q).style=U}}}if(V){var ot=p[O];ot&&(ot.cols=Y)}else G?f.addMerge(S,T,k._dspan+Y,k._defColSpan):f.addMerge(S,T,k._dspan,k._defColSpan+Y)}}}this.getShowOutline()&&(0,l.isHeaderAdornment)(this.grid.rowGroup.expandedAdornments)&&f.setRowLevel(S,e.level)}this._currentRow+=s,f.setLastRow(this._currentRow-1)},d.prototype.buildGroupHeader=function(t,e){var i=this._workbook,n=i.currentSheet,r=this._preparer,s=e.level-1,a=this._indentBarStyle,l=r.colCount,h=this._currentRow;n.setFirstRow(this._currentRow);var u=this._startCol,c=t.layoutManager.getDataRowHeights(r.dataRowCount).reduce((function(t,e){return t+e}),0);c=c||Math.max(t.displayOptions.rowHeight,t.displayOptions.minRowHeight,t.displayOptions.minTableRowHeight*r.dataRowCount);var p=this._exportOptions,_=n.borrowRow(h,c*d.LINE_HEIGHT);if(this.indicator&&this._buildIndicatorCell(t,n,_,this._indicatorNo,h,u++,1),this.checkBar&&this._buildCheckBarCell(t,n,_,e.checked,h,u++,1),p.indenting)for(var f=0;f0&&(l+=this._indents-(e.level-1));for(var x=1;x0)for(var M=0;M1&&s.addMerge(T,D,p,1),D++;for(M=0;M<_;M++){o=M+D;var O=S[R+E][M],F=O.layout;if(n=F.firstColumn,r=this._columnGroupFooterStyles[n.$_hash][e.footerIndex],h.applyDynamicStyles){var L=c.DummyCellIndex.tempItem(t,e,F),P=t.rowGroup.getFooterCell(L),B=P.getSummary();r=this.$_summaryStyleSet(P,B,r,O,e)}if(F.isProxy||O.spanned)k.addBlank(o,r);else{var V=F.parent,A=V&&V.vertical,N=0,$=0,U=F.getGroupFooterUserSpan(e.parent,e.footerIndex),H=U?0:F.getGroupFooterSpan(e.index,e.footerIndex)-1;if(U){var G=U.footerCount||0;N=G>0?G*p:U.rowspan||1,$=U.colspan||1,N=Math.min((e.parent.footerCount-e.vindex)*p,N),s.addMerge(T,o,N,$);for(var W=0;W0){var z=0;if(L=F.vindex+1,A)for(;z++1&&i.addMerge(l,n+h,1,a-n),this._currentRow++,i.setLastRow(this._currentRow-1)},d.prototype.buildMergedGroupFooter=function(t,e){function i(i,o,n,r,s){var l=a.RowGroupFooterCell.getValue(e,n),h=this._exportOptions;if(s&&null!=s.text)i.addText(o,s.text,r);else if(l instanceof Date)h.datetimeCallback?(l=h.datetimeCallback(e.index,n.name,l))instanceof Date?i.addDate(o,l,r):i.addText(o,l,r):i.addDate(o,l,r);else if(isNaN(l)){var u=c.DummyCellIndex.tempItem(t,e,n).clone(),d=t.getDisplayText(u)||"";i.addText(o,d,r)}else i.addNumber(o,l,r)}var o,n,r,s,h=this._workbook.currentSheet,u=this._exportOptions,p=this._preparer,_=p.dataRowCount,f=p.colCount,g=p.getItemLevel(e),m=this._currentRow;h.setFirstRow(this._currentRow);for(var y=this._startCol,v=t.rowGroup.expandedAdornments==l.RowGroupAdornments.SUMMARY,C=Math.max(Math.max(this._defaultHeight,t.displayOptions.minRowHeight)/_,t.displayOptions.minTableRowHeight),w=t.layoutManager.getDataRowHeights(_),x=[],b=0;b<_;b++){var I=h.borrowRow(m+b,(w[b]||C)*d.LINE_HEIGHT);I._row=b,x.push(I)}for(this.indicator&&this._buildIndicatorCell(t,h,x,this._indicatorNo,m,y++,_),this.checkBar&&this._buildCheckBarCell(t,h,x,e.checked,m,y++,_),o=0;o0?H*_:$.rowspan||1,N=$.colspan||1,A=Math.min((e.parent.footerCount-e.vindex)*_,A),h.addMerge(F,n,A,N);for(var G=0;G0){var j=0;if(T=L.vindex+1,V)for(;j++0?n.start:0;var u=n.count>0?n.count:a;a=u>0?this._startItem+u>a?a-this._startItem:u:a-this._startItem}this._lastItem=this._startItem+a,this._prepareCommonStyles(t),this._currentRow=n.yOffset,this._startCol=n.xOffset,this._buildColumns(t),l.createBorderEdges(o.CssFactory.getSelectorStyle(this._preparer.documentCssStyles,".rg-grid")),this._buildDocumentTitle(r),this.header&&this.buildHeader(t),this.headerSummary&&this.buildSummaryItem(t,!1,n.headerSummary),this.buildTreeItems(t,(function(){i.footer&&i.buildSummaryItem(t,!0,n.footer),i._buildDocumentTail(r),i._buildUserCells(t,r),e&&e()}))},d.prototype.buildTreeItems=function(t,e){for(var i=this,o=this._exportOptions.showIndicatorRow(t),n=this.allItems,r=this._progressStep?this._indexItem+Math.min(this._progressStep,this._lastItem-this._indexItem):this._lastItem,a=this._indexItem;a=this._lastItem?e&&e():setTimeout((function(){i.buildTreeItems(t,e)}),0)},d.prototype.buildTreeRow=function(t,e){var i,o=this._workbook.currentSheet,n=this._preparer,r=n.dataRowCount,s=n.colCount,a=this._indents,l=e.level,h=this._currentRow;o.setFirstRow(this._currentRow);var u=this._startCol,c=t.displayOptions,p=t.layoutManager.getDataRowHeights(r),_=p.reduce((function(t,e){return t+e}),0)||e.height;isNaN(_)&&(_=(c.rowHeight||c.minRowHeight)*r),_=-1===_?-1:_>0?_/r:_;for(var f=[],g=0;g0?u+l-1:u,w=n.getItem(g,0),x=w.layout,b=x.firstColumn,I=this._columnStyles[b.$_hash],E=a>0?a-l+1:0;for(i=0;i0?u+a:u,i=1;i0){var O=0,F=x.vindex+1;if(T)for(;O++=0&&(g=g.replace(/ xmlns=""/g,"").replace(/xmlns=""/g,"")),h.file(f,g)}var m=n.compression||"DEFLATE",y=null==n.streamFiles||n.streamFiles,v={level:n.compressionLevel||6};if(a)h.generateAsync?h.generateAsync({type:"blob",compression:m,streamFiles:y,compressionOptions:v},(function(t){n.progressCallback&&n.progressCallback(null,"zip",100,t.percent)})).then((function(t){n.done&&"function"==typeof n.done&&n.done(),l.saveLocal(r,t,o)})):(n.done&&"function"==typeof n.done&&n.done(),l.saveLocal(r,h.generate({type:"blob",compression:m,streamFiles:y,compressionOptions:v}),o));else if(n.target===e.ExportTarget.STREAM)if(h.generateAsync)h.generateAsync({type:"base64",compression:m,streamFiles:y,compressionOptions:v},(function(t){n.progressCallback&&n.progressCallback(null,"zip",100,t.percent)})).then((function(t){n.done&&"function"==typeof n.done&&n.done(t)}));else{var C=h.generate({type:"base64",compression:m,streamFiles:y,compressionOptions:v});n.done&&"function"==typeof n.done&&n.done(C)}else h.generateAsync?h.generateAsync({type:"base64",compression:m,streamFiles:y,compressionOptions:v},(function(t){n.progressCallback&&n.progressCallback(null,"zip",100,t.percent)})).then((function(t){n.done&&"function"==typeof n.done&&n.done(),l.saveServer(r,t,n.url,o,s)})):(n.done&&"function"==typeof n.done&&n.done(),l.saveServer(r,h.generate({type:"base64",compression:m,streamFiles:y,compressionOptions:v}),n.url,o,s))}.bind(this),o=this.grid.doc,n=this._multiOptions,r=n.fileName,s=n.params,a="local"==n.target,l=this,h=this._workbook;if(t.support.blob||!a)if(h.hasImage){var u=h.getImageMap();h.downloader.bulkDownload=n.bulkImageDownload,h.downloader.executeDownLoad(this,u,i)}else i();else alert("not supported on this browser")},d.prototype._prepareCount=function(t,e){for(var i=0,o=0,n=e.length;o0)for(var h=0;h0))for(_=0;_=0)),i=e.$_hash,!this._columnStyles[i]){var x=t.dataSource;if(e instanceof h.ValueColumn){var b=this._textFormatId;if(e instanceof h.DataColumn){var I=s.exportLink&&e.renderer&&e.renderer.type==w.LinkCellRenderer.TYPE&&!e.excelFormat,S=x.getField(e.dataIndex),R=S?S.dataType:l.ValueType.TEXT;R===l.ValueType.NUMBER?b=this._numberFormatId:R===l.ValueType.DATETIME&&(b=this._dateFormatId);var D=e.excelFormat,k=void 0,M=!0;if(null!=D)b="number"==typeof D||parseInt(D)>0?parseInt(D):a.addNumberFormat(D);else if(I)b=0;else{if(R==l.ValueType.NUMBER){var O=null===e.numberFormat?void 0:e.numberFormat||s.numberFormat||f.numberFormat;if(O)if(O.match(/^[#0]([#0,.;aAfFcC ]+$|$)/))D=o.ExcelFormatConverter.convertNumberFormat(O);else{var F=T.Locale.numberFormats&&T.Locale.numberFormats[O];D=F&&F.excelFormat,M=!1}}else R==l.ValueType.DATETIME&&"string"==typeof(D=e.datetimeFormat||s.datetimeFormat||f.datetimeFormat)&&(D=o.ExcelFormatConverter.convertDateFormat(D));D&&(M&&((k=e.prefix)&&(D='"'+k+'"'+D),(k=e.suffix)&&(D=D+'"'+k+'"')),b=a.addNumberFormat(D))}}this._columnStyles[i]=this._changeFormatId(a,C.isFixed?this._fixedCellStyle:this._bodyCellStyle,b),this._columnFixedStyles[i]=this._changeFormatId(a,this._bodyFixedCellStyle,b),this._columnFooterStyles[i]=[],this._columnSummaryStyles[i]=[],this._columnGroupFooterStyles[i]=[];for(var L=s.footer===E.VIS_VISIBLE,P=s.headerSummary===E.VIS_VISIBLE,B=0;B<(L?t.footers.count:t.footers.visibleCount);B++){var V=L?t.footers.get(B):t.footers.getVisible(B),A=e.footers.get(V._childIndex),N=this._preparer.getFooterItem(_+B*m,v);this._columnFooterStyles[i][B]=this.$_summaryStyleSet(V,A,this._footerCellStyles[B],N)}for(B=0;B<(P?t.headerSummaries.count:t.headerSummaries.visibleCount);B++){var $=P?t.headerSummaries.get(B):t.headerSummaries.getVisible(B),U=e.headerSummaries.get($._childIndex);N=this._preparer.getSummaryItem(_+B*m,v),this._columnSummaryStyles[i][B]=this.$_summaryStyleSet($,U,this._summaryCellStyles[B],N)}if(t instanceof r.GridView)for(B=0;B1){for(var l=1;l1){for(var d=1;d=0&&r.index=0,t=f._extendStyles(C,t,F,A,x,n),f._dynamicStyles[w]=t}}return{es:t,hasFormat:r}};if(T.blankWhenExport)n.addBlank(a,V);else if(T instanceof h.DataColumn){var $=T.dataIndex,U=m&&m.cellProtectProps||T.cellProtectProps,H=e.dataSource.getField($),G=E.exportLink&&!T.excelFormat&&T.renderer&&T.renderer.type==w.LinkCellRenderer.TYPE,W=E.exportTemplate&&T.renderer&&T.renderer.type===I.TemplateCellRenderer.TYPE,j=!1!==E.exportImage&&L&&(L.type===w.ImageCellRenderer.TYPE||L.type===w.IconCellRenderer.TYPE),z=(j=j&&(E.exportImage?!1!==L.exportImage:!!L.exportImage))&&L.type===w.IconCellRenderer.TYPE,Y=j&&L.type===w.ImageCellRenderer.TYPE,q=void 0;if(H){var X=r.getData($),K=m&&m.text;switch(q=null!=K?void 0:T.displayCallback,V=(d=N(V,H.dataType,G,U)).es,A=d.hasFormat,H.dataType){case"number":if(null!=K?X=K:(E.numberCallback||q)&&(X=E.numberCallback?E.numberCallback(r.index,T.name,X,e.handler,S.proxy()):q(e.handler,S.proxy(),X)),!A&&!T.excelFormat&&E.trailPointZeroFormat&&X===parseInt(X)){var Z=o.ExcelFormatConverter.convertNumberFormat(E.trailPointZeroFormat);V=this._changeFormatId(C,V,C.addNumberFormat(Z))}var J=T.excelFormulaExprStatement,Q=void 0;if(J){var tt=this._excelFormulaRuntime;tt.setItemIndex(n.index,u),tt.setColumns(this._preparer._dataCells[n._row]),Q=J.evaluate(tt)}if(null!=X&&B){if(L.type===w.BarCellRenderer.TYPE){this._barRenderer?(this._barRenderer.initOptions(),this._barRenderer.assignFrom(L)):this._barRenderer=e.delegate.createRenderer(w.BarCellRenderer.TYPE,L,null);var et=i.getColumnWidth(a),it=this._barRenderer,ot=this._preparer.documentCssStyles,nt={barStyle:this._inheritStyles(o.CssFactory.getSelectorStyles(ot,it.barStyle)),negativeStyle:this._inheritStyles(o.CssFactory.getSelectorStyles(ot,it.negativeStyle))};n.addBar(a,X,et,it.origin,nt,it.baseValue,it.minimum,it.maximum,V);break}if(L.type===w.SignalBarCellRenderer.TYPE){this._signalRenderer?(this._signalRenderer.initOptions(),this._signalRenderer.assignFrom(L)):this._signalRenderer=e.delegate.createRenderer(w.SignalBarCellRenderer.TYPE,L,null),et=i.getColumnWidth(a),it=this._signalRenderer,ot=this._preparer.documentCssStyles,nt={barStyle:this._inheritStyles(o.CssFactory.getSelectorStyles(ot,it.barStyle)),inactiveStyle:this._inheritStyles(o.CssFactory.getSelectorStyles(ot,it.inactiveStyle))};var rt=[isNaN(it.startRate)?50:it.startRate,isNaN(it.endRate)?100:it.endRate],st=it.barCount||10;n.addSignal(a,X,et,rt,st,it.absoluteValue,it.minimum,it.maximum,nt,V);break}}null!=X||Q?"number"==typeof X?n.addNumber(a,X,V,Q):n.addText(a,X,V):n.addBlank(a,V);break;case"datetime":case"date":null!=K?n.addText(a,K,V):X?E.datetimeCallback||q?(X=E.datetimeCallback?E.datetimeCallback(r.index,T.name,X,e.handler,S.proxy()):q(e.handler,S.proxy(),X))instanceof Date?n.addDate(a,X,V):n.addText(a,X,V):n.addDate(a,X,V):E.nullDateText?n.addText(a,E.nullDateText,V):n.addBlank(a,V);break;case"boolean":null!=K?n.addText(a,K,V):E.booleanCallback||q?"boolean"==typeof(X=E.booleanCallback?E.booleanCallback(r.index,T.name,X,e.handler,S.proxy()):q(e.handler,S.proxy(),X))?n.addBool(a,X,V):n.addText(a,X,V):E.booleanFormat?(X=R.BooleanFormatter.getFormatter(E.booleanFormat).formatValue(X),n.addText(a,X,V)):n.addBool(a,X,V);break;default:if(g=X||"",null!=K)g=K;else if(E.lookupDisplay&&(T.labelField||T.lookupDisplay))g=p.DataCell.getText(r,T);else if(W){this._templateRenderer?this._templateRenderer.clearAndAssignFrom(T.renderer):this._templateRenderer=e.delegate.createRenderer(I.TemplateCellRenderer.TYPE,T.renderer,null);var at=this._templateRenderer._parser,lt=T.renderer.callback,ht=e.body.getCell(S),ut=lt?lt.call(this,e.handler,ht,-1,-1):at.realize(e,ht,null,this._templateRenderer.valueCallback);g=ut?ut.replace(//gi,"\n").replace(/(<([^>]+)>)/gi,""):""}else if(H.dataType===l.ValueType.OBJECT&&"object"==typeof X)if(E.objectCallback)g=E.objectCallback(r.index,T.name,X,e.handler,S.proxy());else{var dt=T.objectKey||T.objectCallback,ct=dt?T.objectKey:H.objectKey,pt=dt?T.objectCallback:H.objectCallback;g=pt&&"function"==typeof pt?pt(H.orgFieldName,r.dataRow,X):ct&&X.hasOwnProperty(ct)?X[ct]:JSON.stringify(X)}else null!=X&&(g=T.textFormatter?T.textFormatter.getText(X):g);if("number"==typeof(g=E.textCallback?E.textCallback(r.index,T.name,g,e.handler,S.proxy()):q&&!T.textFormatter?q(e.handler,S.proxy(),X):g))n.addNumber(a,g,V);else if(g&&G)if(ht=e.body.getCell(S),this._linkRenderer?(this._linkRenderer.initOptions(),this._linkRenderer.assignFrom(T.renderer)):this._linkRenderer=e.delegate.createRenderer(w.LinkCellRenderer.TYPE,T.renderer,null),it=this._linkRenderer){var _t=it.$_getUrl(e,ht);n.addLink(a,g,_t,V)}else n.addText(a,g,V);else if(Y){ht=e.body.getCell(S),this._imageRenderer?(this._imageRenderer.initOptions(),this._imageRenderer.assignFrom(L)):this._imageRenderer=e.delegate.createRenderer(w.ImageCellRenderer.TYPE,L,null);var ft=(it=this._imageRenderer).$_getImageUrl(e,ht);et=i.getColumnWidth(a),ft?n.addImage(a,g,et,l.IconLocation.CENTER,ft,V,it.imageWidth,it.imageHeight):n.addText(a,g,V)}else z?(ht=e.body.getCell(S),this._iconRenderer?(this._iconRenderer.initOptions(),this._iconRenderer.assignFrom(L)):this._iconRenderer=e.delegate.createRenderer(w.IconCellRenderer.TYPE,L,null),ft=(it=this._iconRenderer).$_getIconUrl(e,ht),et=i.getColumnWidth(a),ft?n.addImage(a,g,et,it.iconLocation,ft,V,it.iconWidth,it.iconHeight):n.addText(a,g,V)):g?n.addText(a,g,V):n.addBlank(a,V)}}else n.addBlank(a,V)}else if(T instanceof h.LiteralColumn){V=N(V,l.ValueType.TEXT,!1,m&&m.cellProtectProps||T.cellProtectProps).es;var gt=m&&null!=m.text?m.text:T.value;n.addText(a,gt,V)}else if(T instanceof h.SeriesColumn){var mt=T.renderer,yt=mt&&(mt.type==D.ActualTargetBulletRenderer.TYPE||mt.type==D.ActualTargetTextRenderer.TYPE||mt.type==v.SeriesTextCellRenderer.SERIES_TYPE);if(mt&&mt.type&&!yt){var vt=this._preparer;E.exportSeriesColumn&&v.SparkChartRenderer.interfaced(mt)&&vt.sparkColumns[T.$_hash]?n.addSparkLine(a,u,vt.sparkColumns[T.$_hash],V):n.addBlank(a,V)}else{this._seriesCell.setIndex(S);var Ct=this._seriesCell.value;if(Ct&&Ct.some((function(t){return!isNaN(t)}))){var wt=T.valueSeparator;T.actualTarget&&mt.type==D.ActualTargetTextRenderer.TYPE?wt=mt.separator:!mt||mt.type&&mt.type!=v.SeriesTextCellRenderer.SERIES_TYPE||(wt=mt.valueSeparator);var xt=this._seriesCell.getDisplayText(e,wt);if(B){this._bulletRenderer?(this._bulletRenderer.initOptions(),this._bulletRenderer.assignFrom(L)):this._bulletRenderer=e.delegate.createRenderer(D.ActualTargetBulletRenderer.TYPE,L,null),et=i.getColumnWidth(a),it=this._bulletRenderer,ot=this._preparer.documentCssStyles;var bt={background:this._inheritStyles(o.CssFactory.getSelectorStyles(ot,it.backgroundStyle)),actual:this._inheritStyles(o.CssFactory.getSelectorStyles(ot,it.actualStyle)),target:this._inheritStyles(o.CssFactory.getSelectorStyles(ot,it.targetStyle))};n.addActualTarget(a,t.__spreadArray(t.__spreadArray([],Ct,!0),[mt.maxValue],!1),et,bt,it.actualHeight,it.targetWidth,V)}else n.addText(a,xt,V)}else n.addBlank(a,V)}}if(P){var It={author:P.author||"RealGrid",message:"",fontSize:10,authorVisible:void 0===P.authorVisible||P.authorVisible,minWidth:P.minWidth?P.minWidth:128,maxWidth:P.maxWidth?P.maxWidth:400},Et=(H=e.dataSource.getFieldIndex(null===(_=S.dataColumn)||void 0===_?void 0:_.fieldName),P.validation&&e.validationManager.cellList[r.dataRowId]),St=Et&&Et[H];St&&St.column===T.name&&(It.message=St.message);var Rt=(lt=P.callback)&<(e.handler,r.itemIndex,r.dataRow,T.name,It);this._prepareMemo(i,It,Rt,a,n.index)}return V},d.prototype._buildUserCells=function(t,e){var i=this,n=this._exportOptions,r=e.currentSheet,s=n.userCellsCallback,a=n.userCells||s&&s(t.handler,r.rowCount,r.colCount,r.name);if(y.Utils.isArray(a)){var h=this._dynamicStyles,u=this._preparer.documentCssStyles,c=r.workbook.styles._styles._items[0],p=this._css;a.forEach((function(t){var s,a,_;if(t.format&&(_=e.addNumberFormat(t.format)),t.styleName){var f=t.styleName;if(s="userCells;styleName=".concat(f,";formatId=").concat(_),!(a=h[s])){var g=o.CssFactory.getSelectorStyles(u,f),m=i._inheritStyles(g);a=h[s]=i._parseStyles(e,m,!!m.whiteSpace&&null),_&&(a._formatId=_)}}else if(t.styles){var v=y.Utils.objectToCssText(t.styles);s="userCells;styleName=".concat(v,";formatId=").concat(_),(a=h[s])||(p.cssText=v,a=h[s]=i._parseStyles(e,p,!!p.whiteSpace&&null),_&&(a._formatId=_))}else _&&(s="userCells;styleName=".concat(void 0,";formatId=").concat(_),(a=h[s])||(a=h[s]=i._extendStyles(e,c,{},!1,_)));a=a||c;for(var C=t.mergeRow||1,w=t.mergeCol||1,x=y.Utils.makeArray(t.heights,!0),b=y.Utils.makeArray(t.widths,!0),I=0;I1&&r.addMerge(t.row,t.col,C,w)}))}},d.prototype._getTextWrap=function(t,e){var i=t.whiteSpace||t["white-space"]||t.textWrap||t["text-wrap"]||t["text-wrap-mode"];return null==i?e:!("none"===i||"nowrap"===i)},d.CSS_HEAD="rg-header",d.CSS_FOOT="rg-footer",d.CSS_BODY="rg-body",d.CSS_FIXED="rg-fixed-body",d.CSS_TABLE="rg-table",d.CSS_ROWGROUP_BAR="rg-rowgroup-bar",d.CSS_ROWGROUP_HEAD="rg-rowgroup-head",d.CSS_ROWGROUP_FOOT="rg-rowgroup-foot",d.CSS_HEAD_CELL="rg-header-cell",d.CSS_INDICATOR="rg-rowindicator-cell",d.CSS_CHECK="rg-checkbar-cell",d.CSS_DATA_ROW="rg-data-row",d.PIXELS_PER_CHAR=7,d.LINE_HEIGHT=.75,d}(i.GridExporterBase);return Tl.GridExcelExporter=M,Tl}(),w=ih(),x=dh(),b=dn(),I=uo(),E=ms(),R=So(),T=Wi(),D=Qa(),k=function(){function t(){}return t.getColumn=function(t,e){if(e){if("string"==typeof e)return t.columnByName(e);if(e instanceof l.GridColumn)return e;if(e.$_hash)return t.columnByHash(e.$_hash);if(e.name)return t.columnByName(e.name)}return null},t.getItemProxy=function(e,i){var o=e.parent,n={type:void 0,id:e.id,parentId:null==o?-1:o.id,itemIndex:e.index,index:e.index,dataRow:-1,checked:e.checked,checkable:e.checkable,indeterminate:e.indeterminate};return i&&(n.childIndex=e.childIndex,n.level=e.level),e instanceof r.GridRow?(n.type="row",n.dataRow=e.dataRow):e instanceof r.GroupItem?(n.count=e.children.length,n.expanded=e.expanded,e instanceof r.GroupItemImpl||e instanceof f.MergedGroupHeader?(n.type="group",n.footerId=e.footer?e.footer.id:-1,e instanceof T.RootItem||i&&(n.firstItem=t.getItemProxy(e.firstItem),n.firstDataItem=t.getItemProxy(e.firstDataItem),n.dataRows=e.getRows())):e instanceof p.TreeItem&&(n.type="tree",n.dataRow=e.dataRow?e.dataRow:-1)):e instanceof r.GroupFooter&&(n.type="footer"),n},t.getItemIndices=function(t){for(var e=[],i=0,o=t.length;i=0){if(e instanceof p.TreeItem){var n=e.row,r=n.values;i.__rowId=n.rowId;for(var s=0,a=o.fieldCount;s=0)if(a instanceof u.LocalTreeDataProvider){var p=a.rowById(s);if(p){if(n=p.values||[],Array.isArray(i)){h=0;for(var _=i.length;h<_&&!(r=!a.getField(h).equalValues(n[h],i[h]));h++);}else for(h=0;h0){for(var n=this._dataProvider,r=[],s=0;s0},t.prototype.autoFiltersRefresh=function(t,e){t=t?i.Utils.makeArray(t):this._view.getChildColumnNames(null);for(var o=0;o=0&&e=0&&(o[e]=o[e]||{},i.Utils.extendObj(t,o[e]))}))})),Object.keys(o).forEach((function(e){t.push(o[e])})),t},t.prototype.copyToClipboard=function(t,e){return void 0===e&&(e=!0),this._view.toClipboard(t,e)},t.prototype.commitEditor=function(t,e){return void 0===t&&(t=!0),void 0===e&&(e=!0),this._view.commitEditor(t,e)},t.prototype.commit=function(t){return this._view.commit(t)},t.prototype.cancel=function(){return this._view.cancel()},t.prototype.fillEditSearchItems=function(t,e,i,o,n){var r=k.getColumn(this._view,t);this._view.fillEditSearchItems(r,e,i,o,n)},t.prototype.isItemEditing=function(){return this._view.isItemEditing()},t.prototype.isEditing=function(){return this._view.isEditing()},t.prototype.showEditor=function(t){void 0===t&&(t=!1),this._view.showEditor(null,null,t)},t.prototype.hideEditor=function(){this._view.hideEditor(!0)},t.prototype.cancelEditor=function(){this._view.cancelEditor(!0)},t.prototype.setValidations=function(t){this._view.validations=t},t.prototype.validateCells=function(t,e,o,n){return void 0===e&&(e=!0),void 0===o&&(o=!1),this._view.validateCells(i.Utils.makeArray(t),e,o,i.Utils.makeArray(n))},t.prototype.getInvalidCells=function(t){var e;return null!=t&&(e=this.getDataRow(t))<0?null:this._view.getInvalidCells(e)},t.prototype.getInvalidCellsOfRow=function(t){return null==t?null:this._view.getInvalidCells(t)},t.prototype.clearInvalidCells=function(t,e){var i;if(null==t||(i=this._view.getItem(t))&&i.isDataRow)return this._view.clearInvalidCells(i,e)},t.prototype.clearInvalidCellsOfRow=function(t,e){var i=this._view.getItemOfRow(t,!0);if(i)return this._view.clearInvalidCells(i,e)},t.prototype.addInvalidCell=function(t,e,i,o){var n=this._view.getItem(t);n&&this._view.addInvalidCell(n,e,i,o)},t.prototype.addInvalidCellOfRow=function(t,e,i,o){var n=this._view.getItemOfRow(t,!0);n&&this._view.addInvalidCell(n,e,i,o)},t.prototype.getEditingItem=function(){var t=this._view.getEditItem();return t?(t.getRowObject(),{itemIndex:t.index,dataRow:t.dataRow,values:t.getRowObject()}):null},t.prototype.getItemState=function(t){var e=this._view.getItem(t);if(e){var i=e.itemState;return i==r.ItemState.NORMAL&&this._view.focusedIndex.itemIndex==e.index&&(i=r.ItemState.FOCUSED),i}return null},t.prototype.showToast=function(t,e){this._view.showToast(t,e)},t.prototype.hideToast=function(t){this._view.hideToast(t)},t.prototype.showMessage=function(t,e,i){var o=this._view;if("object"==typeof e){var n=new s.CellIndex(this._view);if(n.assignFrom(e),!o.isValid(n,!0))return;var r=this.getCellBounds(n.itemIndex,n.column,!1);if(!r)return;e=r.x,i=r.y+r.height}"string"==typeof t&&(t={message:t}),this._view.showMessage(t,e,i)},t.prototype.showPopup=function(t,e,i){this._view.showPopup(t,e,i)},t.prototype.setLookups=function(t){this._view.setLookups(t)},t.prototype.addLookupSource=function(t){this._view.addLookupSource(t)},t.prototype.removeLookupSource=function(t){this._view.removeLookupSource(t)},t.prototype.existsLookupData=function(t,e){return this._view.existsLookupData(t,e)},t.prototype.fillLookupData=function(t,e){this._view.fillLookupData(t,e)},t.prototype.getLookupData=function(t,e){return this._view.getLookupData(t,e)},t.prototype.clearLookupData=function(t){this._view.clearLookupData(t)},t.prototype.isCheckable=function(t){return this._view.isCheckable(t)},t.prototype.isCheckableOfRow=function(t){return this._view.isCheckableOfRow(t)},t.prototype.setCheckable=function(t,e){this._view.setCheckable(t,e)},t.prototype.setCheckableOfRow=function(t,e){this._view.setCheckableOfRow(t,e)},t.prototype.isIndeterminateItem=function(t){return this._view.isIndeterminateItem(t)},t.prototype.isCheckedItem=function(t){return this._view.isCheckedItem(t)},t.prototype.isIndeterminateRow=function(t){return this._view.isIndeterminateRow(t)},t.prototype.isCheckedRow=function(t){return this._view.isCheckedRow(t)},t.prototype.indeterminateItem=function(t,e){void 0===e&&(e=!0),this._view.indeterminateItem(t,e)},t.prototype.checkItem=function(t,e,i,o){void 0===e&&(e=!0),void 0===o&&(o=!0),this._view.checkItem(t,e,i,o)},t.prototype.indeterminateRow=function(t,e){void 0===e&&(e=!0),this._view.indeterminateRow(t,e)},t.prototype.checkRow=function(t,e,i,o){void 0===e&&(e=!0),void 0===o&&(o=!0),this._view.checkRow(t,e,i,o)},t.prototype.checkModel=function(t,e,i,o){void 0===e&&(e=!0),void 0===o&&(o=!0);var n=this._view.getItemOfModel(t);this._view.checkModel(n,e,i,o)},t.prototype.isCheckedModel=function(t){return this._view.getItemOfModel(t).checked},t.prototype.isCheckableModel=function(t){return this._view.getItemOfModel(t).checkable},t.prototype.indeterminateModel=function(t,e){var i=this._view.getItemOfModel(t);this._view.indeterminateModel(i,e)},t.prototype.isIndeterminateModel=function(t){return this._view.getItemOfModel(t).indeterminate},t.prototype.checkItems=function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!0),this._view.checkItems(t,e,i)},t.prototype.checkRows=function(t,e,i){void 0===e&&(e=!0),void 0===i&&(i=!0),this._view.checkRows(t,e,i)},t.prototype.checkAll=function(t,e,i,o){void 0===t&&(t=!0),void 0===i&&(i=!0),void 0===o&&(o=!0),this._view.checkAll(t,e,i,o)},t.prototype.setAllCheck=function(t,e){void 0===t&&(t=!0),void 0===e&&(e=!0),this._view.setAllCheck(t,e)},t.prototype.isAllChecked=function(){return this._view.allChecked},t.prototype.resetCheckables=function(t){this._view.resetCheckables(),t&&(this._view.checkBar.checkableExpression=null,this._view.checkBar.checkableCallback=null)},t.prototype.applyCheckables=function(){this._view.applyCheckables()},t.prototype.setCheckableExpression=function(t,e){void 0===e&&(e=!0),this._view.checkBar.checkableExpression=t,e&&this._view.applyCheckables()},t.prototype.setCheckableCallback=function(t,e){void 0===e&&(e=!0),this._view.checkBar.checkableCallback=t,e&&this._view.applyCheckables()},t.prototype.getFilteredRows=function(t){return void 0===t&&(t=!0),this._view.getFilteredRows(t)},t.prototype.getSummary=function(t,e){var i=this._view.summarizer,o="string"==typeof t?this._dataProvider.getFieldIndex(t):t;if(-1==o)return null;switch(e){case"count":return i.getCount(o);case"sum":return i.getSum(o);case"max":return i.getMax(o);case"min":return i.getMin(o);case"avg":return i.getAvg(o);case"var":return i.getVar(o);case"varp":return i.getVarp(o);case"stdev":return i.getStdev(o);case"stdevp":return i.getStdevp(o);case"datacount":return i.getDataCount(o);case"dataavg":return i.getDataAvg(o)}},t.prototype.getModel=function(t,e){var i=this._view.getItem(t);return i&&k.getItemProxy(i,e)},t.prototype.getModelAs=function(t,e,o){var n=this._view.getItem(t);switch(e){case"row":n=i.Utils.cast(n,r.GridRow);break;case"group":n=i.Utils.cast(n,r.GroupItem);break;case"footer":n=i.Utils.cast(n,r.GroupFooter);break;case"tree":n=i.Utils.cast(n,p.TreeItem)}return n?k.getItemProxy(n,o):null},t.prototype.getGroupModel=function(t,e){var i=this._view.getItem(t);return!i||i instanceof r.GroupItem||(i=i.parent instanceof T.RootItem?null:i.parent),i?k.getItemProxy(i,e):null},t.prototype.getRootModel=function(t,e){if(!t||!this._view.isTree()&&!this._view.rowGrouped)return null;if(t){var i=this._view.getItem(t.index);if(i)return i.root?k.getItemProxy(i.root,e):null}return null},t.prototype.getModels=function(t,e){if(t=i.Utils.makeArray(t)){for(var o=[],n=0,r=t.length;n=0){var s={count:o.getNumber(n),sum:o.getSum(n),max:o.getMax(n),min:o.getMin(n),avg:o.getAvg(n),datacount:o.getDataCount(n),dataavg:o.getSum(n)/o.getDataCount(n)};return i&&(s.var=o.getVar(n,1),s.varp=o.getVar(n,0),s.stdev=o.getStdev(n,1),s.stdevp=o.getStdev(n,0)),s}}return null},t.prototype.getDistinctItemValues=function(t,i,o){return void 0===i&&(i=-1),void 0===o&&(o=e.SortDirection.ASCENDING),t=this._dataProvider.getFieldIndex(t),this._view.getDistinctItemValues(t,i,o)},t.prototype.showProgress=function(){this._view.showProgress()},t.prototype.setProgress=function(t,e,i,o){this._view.setProgress(t,e,i,o)},t.prototype.closeProgress=function(){this._view.closeProgress()},t.prototype.showLoading=function(t){this._view.showLoading(t)},t.prototype.closeLoading=function(){this._view&&this._view.hideLoading()},t.prototype.searchItem=function(t){return t?this._view.searchItem(t):-1},t.prototype.searchCell=function(t){return t?this._view.searchCell(t):null},t.prototype.resetSize=function(t){this._view.container.resetSize(t)},t.prototype.closeList=function(){this._view.closePopups()},t.prototype.exportGrid=function(t){if("csv"===t.type){var e=new m.GridExportOptions(t);(new g.GridCsvExporter).export(this._view,e)}else if("excel"===t.type){e=new m.GridMultiExportOptions(this._view,t);(new v.GridExcelExporter).export(this._view,e)}},t.prototype.scrollPage=function(t){this._view._vscrollBar._doScroll(E.ScrollEventType.PAGE,t,0)},t.prototype.getTopItem=function(){return this._view.topIndex},t.prototype.setTopItem=function(t){void 0===t&&(t=0),this._view.topIndex=t},t.prototype.getLeftPos=function(){return this._view.leftPos},t.prototype.setLeftPos=function(t){this._view.leftPos=t},t.prototype.setLeftCol=function(t){var e;if("string"==typeof t){var i=this._view.layoutByName(t);i&&(e=i._col)}else e=t;this._view.leftCell=e},t.prototype.getContainer=function(){return this._view.container._containerDiv},t.prototype.requestPrepareEditor=function(){this._view.requestPrepareEditor()},t.prototype.destroy=function(){return this.dispose()},t.prototype.fullItemCount=function(){return this._view.layoutManager.fullItemCount},t.prototype.undo=function(){return this._view.undo()},t.prototype.redo=function(){return this._view.redo()},t.prototype.clearCommandStack=function(t){void 0===t&&(t=!0),this._view.clearCommandStack(t)},t.prototype._getView=function(){return this._view},t}();Vi.GridBase=M;var O=function(e){function i(t,i,o){var n=e.call(this,t,i,o)||this;return n.onPageChanging=null,n.onPageChanged=null,n.onPageCountChanged=null,n.onGrouping=null,n.onGrouped=null,n.onExpanding=null,n.onExpanded=null,n.onCollapsing=null,n.onCollapsed=null,n}return t.__extends(i,e),_dp(i,"rowGroup",{get:function(){return this._view.rowGroup}}),_dp(i,"groupPanel",{get:function(){return this._view.groupPanelView}}),_dp(i,"filterMode",{get:function(){return this._view._rs.filterMode},set:function(t){this._view._rs.filterMode=t}}),_dp(i,"filterOr",{get:function(){return this._view._rs.inclusiveFiltering},set:function(t){this._view._rs.inclusiveFiltering=t}}),_dp(i,"groupSummaryMode",{get:function(){return this._view._rs.groupSummaryMode},set:function(t){this._view._rs.groupSummaryMode=t}}),_dp(i,"groupingOptions",{get:function(){return this._view.groupingOptions}}),i.prototype.getDataSource=function(){return this._dataDelegator},i.prototype.getRowGroup=function(){return this._view.rowGroup.toProxy()},i.prototype.setRowGroup=function(t){this._view.rowGroup.assignFrom(t)},i.prototype.getGroupPanel=function(){return{visible:this._view.groupPanelView.visible,height:this._view.groupPanelView.height,minHeight:this._view.groupPanelView.minHeight}},i.prototype.setGroupPanel=function(t){this._view.groupPanelView.assignFrom(t)},i.prototype.getOptions=function(){var t=e.prototype.getOptions.call(this),i=this._view._rs;return t.filterOr=i.inclusiveFiltering,t.groupSummaryMode=i.groupSummaryMode,t.filterMode=i.filterMode,t.grouping=this.groupingOptions,t.groupPanel=this.groupPanel,t},i.prototype.setOptions=function(t){e.prototype.setOptions.call(this,t),t.grouping&&this._view.groupingOptions.assignFrom(t.grouping),t.groupPanel&&this._view.groupPanelView.assignFrom(t.groupPanel)},i.prototype.getGroupingOptions=function(){return this._view.groupingOptions.toProxy()},i.prototype.setGroupingOptions=function(t){this._view.groupingOptions.assignFrom(t)},i.prototype.groupBy=function(t,e,i){this._view.groupByFieldNames(t,e,i)},i.prototype.isGrouped=function(){return this._view.rowGrouped},i.prototype.isMergedGrouped=function(){return this._view.mergedRowGrouped},i.prototype.getGroupFields=function(){return this._view.rowGroupFields},i.prototype.getGroupFieldNames=function(t){void 0===t&&(t=!0);var e=this._view.rowGroupFields;if(e){var i=this._dataProvider;if(i){for(var o=[],n=0,r=e.length;n-1?this._view.getGroupLevel(t):-1},i.prototype.getGroupIndex=function(t){var e=this._view.getItem(t);if(e){var i=e.parent;return i?i.index:-1}return-1},i.prototype.isGroupItem=function(t){return this._view.getItem(t)instanceof r.GroupItem},i.prototype.isParentVisible=function(t){var e=this._view.getItem(t);return e&&e.parent&&e.parent.visible},i.prototype.expandGroup=function(t,e,i,o){void 0===o&&(o=0);var n=this._view.getItem(t);n&&n instanceof r.GroupItem&&this._view.expand(n,e,i,o)},i.prototype.collapseGroup=function(t,e,i){var o=this._view.getItem(t);o&&o instanceof r.GroupItem&&this._view.collapse(o,e,i)},i.prototype.expandParent=function(t,e,i,o){void 0===o&&(o=0);var n=this._view.getItem(t);if(n){var r=n.parent;r&&r.expandable&&(r.collapsed||i)&&this._view.expand(r,e,i,o)}},i.prototype.collapseParent=function(t,e,i){var o=this._view.getItem(t);if(o){var n=o.parent;n&&n.collapsable&&n instanceof r.GroupItem&&this._view.collapse(n,e,i)}},i.prototype.collapse=function(t,e){var i=this;void 0===e&&(e=-1);var o=function(t){return!t||t instanceof T.RootItem?null:t instanceof r.GroupItem&&t.expanded&&(-1==e||t.level===e)&&(0,R.collapsable)(t,i.rowGroup.collapsedAdornments)?t:o(t.parent)},n=this._view.getItem(t),s=o(n);s&&this._view.collapse(s,!1,!1)},i.prototype.expand=function(t,e){void 0===e&&(e=-1);var i=this._view.getItem(t);!i||i instanceof T.RootItem||(i instanceof r.GroupItem||(i=i.parent),this._view.expand(i,!0,!0,e))},i.prototype.expandAll=function(t,e){void 0===t&&(t=!0),this._view.itemCount>0&&this._view.expandAll(t,e)},i.prototype.collapseAll=function(t){this._view.itemCount>0&&this._view.collapseAll(t)},i.prototype.getGroupSummaryValue=function(t,e,i){if(t&&this._view.rowGrouped){var o=this._view.getItemOfModel(t),n=k.getColumn(this._view,e);if(o instanceof r.GroupItemImpl){var s=o._allFooters;return null!=(i=1===o.allFooterCount?0:i)&&o._allFooters[i]?(o=o._allFooters[i],D.RowGroupFooterCell.getValue(o,n)):s.map((function(t){return D.RowGroupFooterCell.getValue(t,n)}))}if(o instanceof r.GroupFooter)return D.RowGroupFooterCell.getValue(o,n)}return null},i.prototype.layoutExpandAll=function(t){this._view.layoutExpandAll(!0,t)},i.prototype.layoutCollapseAll=function(t){this._view.layoutExpandAll(!1,t)},i.prototype.beginInsertRow=function(t,e,i){return void 0===t&&(t=-1),this._view.insertAt(t,e,i)},i.prototype.beginAppendRow=function(t){return this._view.appendAt(t)},i.prototype.beginUpdateRow=function(t){if(this._view.focusedIndex){var e=this._view.focusedIndex.clone();void 0!==t&&(e.itemIndex=t),this._view.edit(e)}},i.prototype.setPaging=function(t,e,i){void 0===e&&(e=10),void 0===i&&(i=-1),this._view.setPaging(t,e,i)},i.prototype.getPage=function(){return this._view.page},i.prototype.setPage=function(t,e){void 0===e&&(e=-1),this._view.setPage(t,e)},i.prototype.getPageCount=function(){return this._view.pageCount},i.prototype.setPageCount=function(t){this._view.pageCount=t},i.prototype.getPageOfDataRow=function(t){return this._view.getPageOfDataRow(t)},i.prototype.getCheckedItems=function(t){return void 0===t&&(t=!0),this._view.getCheckedItemIndices(!t)},i.prototype.getCheckedRows=function(t,e,i){return void 0===t&&(t=!0),this._view.getCheckedRows(t,e,i)},i.prototype.getMergedItems=function(t,e,i,o){return void 0===i&&(i=!0),void 0===o&&(o=!0),this._view.getMergedItems(t,e,i,o)},i.prototype.populateMerges=function(t){void 0===t&&(t=!0),this._view._populateMerges(t)},i.prototype._createView=function(t,e,i){return(this._container=new w.GridContainer(t,this,e,i)).gridView},i.prototype._createListener=function(t){return new P(this,t)},i}(M);Vi.GridView=O;var F=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.onTreeItemExpanding=null,t.onTreeItemExpanded=null,t.onTreeItemCollapsing=null,t.onTreeItemCollapsed=null,t.onTreeItemChanged=null,t}return t.__extends(i,e),_dp(i,"treeOptions",{get:function(){return this._view.treeOptions}}),i.prototype.getDataSource=function(){return this._dataDelegator},i.prototype.getTreeOptions=function(){return this._view.treeOptions.toProxy()},i.prototype.setTreeOptions=function(t){this._view.treeOptions.assignFrom(t)},i.prototype.getParent=function(t){var e=this._view.getItem(t);return e?e.parentIndex:-1},i.prototype.getChildren=function(t){var e=this._view.getItem(t);if(e){for(var i=[],o=0,n=e.count;o "+r)},n.prototype.onGridBaseEditRowPasted=function(t,e,o,n,r){return this._del.onEditRowPasted?this._del.onEditRowPasted(this._del,e.index,e.dataRow,o,n,r):i.Utils.log("onEditRowPasted: "+e.index+", "+e.dataRow,o,n,r)},n.prototype.onGridBaseRowsPasted=function(t,e){return this._del.onRowsPasted?this._del.onRowsPasted(this._del,e):i.Utils.log("onRowsPasted: ",e)},n.prototype.onGridBaseCellPasting=function(t,e,o,n){return this._del.onCellPasting?this._del.onCellPasting(this._del,e.proxy(),o,n):i.Utils.log("onCellPasting: ",e,o)},n.prototype.onGridBaseItemChecked=function(t,e,o){return this._del.onItemChecked?this._del.onItemChecked(this._del,e.index,o):i.Utils.log("onItemChecked",e.index,o)},n.prototype.onGridBaseItemsChecked=function(t,e,o){var n=k.getItemIndices(e);return this._del.onItemsChecked?this._del.onItemsChecked(this._del,n,o):i.Utils.log("onItemsChecked: "+o,n)},n.prototype.onGridBaseItemAllChecked=function(t,e){return this._del.onItemAllChecked?this._del.onItemAllChecked(this._del,e):i.Utils.log("onItemAllChecked: "+e)},n.prototype.onGridBaseErrorClicked=function(t,e){this._del.onErrorClicked?this._del.onErrorClicked(this._del,e):i.Utils.log("onErrorClicked: "+e)},n.prototype.onGridBaseSorting=function(t,e,o){for(var n=[],r=0,s=o.length;r